Exemple #1
0
  def content(self) -> JsHtml.ContentFormatters:
    """
    Description:
    ------------

    """
    if self.component._jsStyles['type'] in ['bar']:
      return JsHtml.ContentFormatters(self.page, 'event.sparklines[0].getCurrentRegionFields()[0].value')

    return JsHtml.ContentFormatters(self.page, 'event.sparklines[0].getCurrentRegionFields().y')
Exemple #2
0
    def content(self):
        """
    Description:
    ------------

    """
        if self._src._jsStyles['type'] in ['bar']:
            return JsHtml.ContentFormatters(
                self._report,
                'event.sparklines[0].getCurrentRegionFields()[0].value')

        return JsHtml.ContentFormatters(
            self._report, 'event.sparklines[0].getCurrentRegionFields().y')
Exemple #3
0
  def content(self) -> JsHtml.ContentFormatters:
    """
    Description:
    ------------

    """
    return JsHtml.ContentFormatters(self.page, '%s.val()' % self.component.input.dom.jquery.varId)
Exemple #4
0
  def content(self) -> JsHtml.ContentFormatters:
    """
    Description:
    ------------

    """
    return JsHtml.ContentFormatters(self.page, '%s.progressbar("value")' % self.component.dom.jquery.varId)
Exemple #5
0
 def content(self):
     """
 Description:
 ------------
 """
     return JsHtml.ContentFormatters(
         self.page, "%s.checked" % self.component.checkbox.dom.varName)
Exemple #6
0
 def content(self):
     """
 Description:
 ------------
 Common function to get the component content.
 """
     return JsHtml.ContentFormatters(self.page, "%s.checked" % self.varName)
Exemple #7
0
 def content(self):
   """
   Description:
   -----------
   Return the content of the component
   """
   return JsHtml.ContentFormatters(self._report, "%s.innerHTML" % self.varName)
Exemple #8
0
  def min_select(self) -> JsHtml.ContentFormatters:
    """
    Description:
    ------------
    Get the minimum value selected for range slider, returns the value otherwise.
    """
    if self.component.options.range:
      if self.component.options.range == "min":
        return JsHtml.ContentFormatters(self.page, '%s.slider("option", "min")' % self.component.dom.jquery.varId)

      if self.component.options.range == "max":
        return JsHtml.ContentFormatters(self.page, '%s.slider("value")' % self.component.dom.jquery.varId)

      return JsHtml.ContentFormatters(self.page, '%s.slider("values")[0]' % self.component.dom.jquery.varId)

    return self.content
Exemple #9
0
  def content(self):
    """
    Description:
    -----------

    """
    return JsHtml.ContentFormatters(self.page, "%s.getValue()" % self.component.editorId)
Exemple #10
0
  def content(self):
    """
    Description:
    -----------

    """
    return JsHtml.ContentFormatters(self.page, "%s.value" % self.varName)
Exemple #11
0
 def content(self):
     """
 Description:
 ------------
 Get the current index in the tiny slider
 """
     return JsHtml.ContentFormatters(
         self._report, "%s.getInfo().index" % self._src.jsonId)
Exemple #12
0
    def content(self):
        """
    Description:
    ------------

    """
        return JsHtml.ContentFormatters(
            self._report, '%s.val()' % self._src.input.dom.jquery.varId)
Exemple #13
0
    def value(self):
        if self._src._jsStyles['type'] in ['bar']:
            return JsHtml.ContentFormatters(
                self._report,
                'event.sparklines[0].getCurrentRegionFields()[0].value')

        return JsObjects.JsNumber.JsNumber(
            "event.sparklines[0].getCurrentRegionFields().y", isPyData=False)
Exemple #14
0
  def content(self) -> JsHtml.ContentFormatters:
    """
    Description:
    ------------

    """
    return JsHtml.ContentFormatters(
      self.page, 'new Date(%s.slider("value") * 1000).toISOString().split("T")[0]' % self.component.dom.jquery.varId)
Exemple #15
0
    def content(self):
        """
    Description:
    ------------

    """
        return JsHtml.ContentFormatters(
            self._report, '%s.slider("values")' % self._src.dom.jquery.varId)
Exemple #16
0
 def content(self):
     """
 Description:
 ------------
 The Javascript value of the component. This returned only a value corresponding to the state of the component
 """
     return JsHtml.ContentFormatters(self._report,
                                     "%s.dataset.level" % self.varName)
Exemple #17
0
 def content(self):
     """
 Description:
 ------------
 Get the current index in the tiny slider.
 """
     return JsHtml.ContentFormatters(
         self.page, "%s.getInfo().index" % self.component.jsonId)
Exemple #18
0
    def content(self):
        """
    Description:
    -----------

    """
        return JsHtml.ContentFormatters(
            self.page, "%s.getData()" % self.component.tableId)
Exemple #19
0
 def content(self) -> JsHtml.ContentFormatters:
     """
 Description:
 ------------
 The Javascript value of the component. This returned only a value corresponding to the state of the component.
 """
     return JsHtml.ContentFormatters(
         self.page, "%s.getAttribute('data-current_slide')" % self.varName)
Exemple #20
0
 def content(self):
     """
 Description:
 ------------
 Common function to get the component content.
 """
     return JsHtml.ContentFormatters(
         self.page, "%s.value" % self.querySelector("input").varId)
Exemple #21
0
  def content(self):
    """
    Description:
    ------------
    Get the selected content from the Select component

    """
    return JsHtml.ContentFormatters(self._report, "%s.val()" % self.jquery.varId)
Exemple #22
0
 def content(self):
   """
   Description:
   ------------
   Get the selected content from the Select component
   """
   # the option variable is coming from the Tick class to get the icon details
   return JsHtml.ContentFormatters(self._report, "%s.querySelector('input:checked').getAttribute('data-content')" % self._src.dom.varName)
Exemple #23
0
 def content(self):
   """
   Description:
   ------------
   Get the selected content from the Select component
   """
   # the option variable is coming from the Tick class to get the icon details
   return JsHtml.ContentFormatters(self._report, "%s.classList.contains('%s')" % (self._src.icon.dom.varName, self.options['true'].split(" ")[-1]))
Exemple #24
0
    def content(self):
        """
    Description:
    -----------

    """
        return JsHtml.ContentFormatters(self._report,
                                        "%s.getData()" % self._src.tableId)
Exemple #25
0
    def content(self):
        """
    Description:
    ------------

    """
        return JsHtml.ContentFormatters(
            self._report, '%s.dateSelected' % self._src.js.varName)
Exemple #26
0
 def content(self) -> JsHtml.ContentFormatters:
     """
 Description:
 ------------
 The Javascript value of the component. This returned only a value corresponding to the state of the component.
 """
     return JsHtml.ContentFormatters(
         self.page, "JSON.stringify(%s.json)" % self.component.jsonId)
Exemple #27
0
    def selected(self):
        """

    :return:
    """
        return JsHtml.ContentFormatters(
            self._report,
            "document.body.querySelector('input[name='+%s+']:checked').getAttribute('data-content')"
            % self._src.input.dom.getAttribute('name'))
Exemple #28
0
 def all(self):
     return JsHtml.ContentFormatters(
         self.page, '''
     (function(dom){var values = []; dom.childNodes.forEach( function(dom, k){  
         const item = dom.querySelector('[name=value]');
         if (item != null){
           values.push(dom.querySelector('[name=value]').innerHTML)
         }
     }); return values})(%s)''' % self.varName)
Exemple #29
0
    def content(self):
        """
    Description:
    -----------

    :return:
    """
        return JsHtml.ContentFormatters(
            self._report, "%s.checked" % self._src.input.dom.varName)
Exemple #30
0
    def content(self):
        """
    Description:
    -----------

    :return:
    """
        return JsHtml.ContentFormatters(self._report,
                                        "%s.value" % self.varName)