@qrvey/utils 1.2.9-15 → 1.2.9-19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +214 -111
  2. package/dist/cjs/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
  3. package/dist/cjs/filters/helpers/ui/index.d.ts +1 -0
  4. package/dist/cjs/filters/helpers/ui/index.js +1 -0
  5. package/dist/cjs/filters/helpers/ui/transformFilterValues.d.ts +4 -0
  6. package/dist/cjs/filters/helpers/ui/transformFilterValues.js +22 -0
  7. package/dist/cjs/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
  8. package/dist/cjs/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
  9. package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
  10. package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +2 -0
  11. package/dist/cjs/filters/interfaces/ui/index.d.ts +3 -2
  12. package/dist/cjs/filters/interfaces/ui/index.js +3 -2
  13. package/dist/cjs/format/definition.d.ts +17 -0
  14. package/dist/cjs/format/definition.js +31 -1
  15. package/dist/cjs/format/format.d.ts +2 -1
  16. package/dist/cjs/format/format.js +8 -5
  17. package/dist/cjs/format/index.d.ts +1 -0
  18. package/dist/cjs/format/index.js +1 -0
  19. package/dist/cjs/format/localization.d.ts +4 -0
  20. package/dist/cjs/format/localization.js +65 -0
  21. package/dist/cjs/globalization/helpers/getI18nCalendar.d.ts +4 -0
  22. package/dist/cjs/globalization/helpers/getI18nCalendar.js +69 -0
  23. package/dist/cjs/globalization/helpers/index.d.ts +1 -0
  24. package/dist/cjs/globalization/helpers/index.js +1 -0
  25. package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
  26. package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.js +2 -0
  27. package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
  28. package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.js +2 -0
  29. package/dist/cjs/globalization/interfaces/calendar/index.d.ts +2 -0
  30. package/dist/cjs/globalization/interfaces/calendar/index.js +14 -0
  31. package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
  32. package/dist/cjs/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
  33. package/dist/cjs/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
  34. package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
  35. package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.js +2 -0
  36. package/dist/cjs/globalization/interfaces/index.d.ts +1 -0
  37. package/dist/cjs/globalization/interfaces/index.js +1 -0
  38. package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
  39. package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.js +10 -0
  40. package/dist/cjs/globalization/labels/calendar/index.d.ts +1 -0
  41. package/dist/cjs/globalization/labels/calendar/index.js +13 -0
  42. package/dist/cjs/globalization/labels/common/I18N_COMMON.js +2 -0
  43. package/dist/cjs/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
  44. package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +6 -0
  45. package/dist/cjs/globalization/labels/index.d.ts +1 -0
  46. package/dist/cjs/globalization/labels/index.js +1 -0
  47. package/dist/cjs/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
  48. package/dist/cjs/interfaces/format/IFormatConfig.Interface.js +2 -0
  49. package/dist/cjs/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
  50. package/dist/cjs/interfaces/format/IFormatCurrency.Interface.js +2 -0
  51. package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
  52. package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.js +2 -0
  53. package/dist/cjs/interfaces/format/index.d.ts +3 -0
  54. package/dist/cjs/interfaces/format/index.js +15 -0
  55. package/dist/cjs/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
  56. package/dist/cjs/interfaces/index.d.ts +1 -0
  57. package/dist/cjs/interfaces/index.js +1 -0
  58. package/dist/cjs/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
  59. package/dist/cjs/qrvey/helpers/getValueWithSuffixes.js +23 -0
  60. package/dist/cjs/qrvey/helpers/index.d.ts +2 -0
  61. package/dist/cjs/qrvey/helpers/index.js +2 -0
  62. package/dist/cjs/qrvey/helpers/transformValue.d.ts +8 -0
  63. package/dist/cjs/qrvey/helpers/transformValue.js +46 -0
  64. package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
  65. package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.js +2 -0
  66. package/dist/cjs/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
  67. package/dist/cjs/qrvey/interfaces/ITransformValueSettings.js +2 -0
  68. package/dist/cjs/qrvey/interfaces/index.d.ts +2 -0
  69. package/dist/cjs/qrvey/interfaces/index.js +2 -0
  70. package/dist/cjs/services/api/getDatasetColumns.api.js +3 -1
  71. package/dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
  72. package/dist/filters/helpers/ui/index.d.ts +1 -0
  73. package/dist/filters/helpers/ui/index.js +1 -0
  74. package/dist/filters/helpers/ui/transformFilterValues.d.ts +4 -0
  75. package/dist/filters/helpers/ui/transformFilterValues.js +18 -0
  76. package/dist/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
  77. package/dist/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
  78. package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
  79. package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +1 -0
  80. package/dist/filters/interfaces/ui/index.d.ts +3 -2
  81. package/dist/filters/interfaces/ui/index.js +3 -2
  82. package/dist/format/definition.d.ts +17 -0
  83. package/dist/format/definition.js +30 -0
  84. package/dist/format/format.d.ts +2 -1
  85. package/dist/format/format.js +6 -3
  86. package/dist/format/index.d.ts +1 -0
  87. package/dist/format/index.js +1 -0
  88. package/dist/format/localization.d.ts +4 -0
  89. package/dist/format/localization.js +59 -0
  90. package/dist/globalization/helpers/getI18nCalendar.d.ts +4 -0
  91. package/dist/globalization/helpers/getI18nCalendar.js +65 -0
  92. package/dist/globalization/helpers/index.d.ts +1 -0
  93. package/dist/globalization/helpers/index.js +1 -0
  94. package/dist/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
  95. package/dist/globalization/interfaces/calendar/II18nCalendar.js +1 -0
  96. package/dist/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
  97. package/dist/globalization/interfaces/calendar/II18nCalendarProperties.js +1 -0
  98. package/dist/globalization/interfaces/calendar/index.d.ts +2 -0
  99. package/dist/globalization/interfaces/calendar/index.js +2 -0
  100. package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
  101. package/dist/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
  102. package/dist/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
  103. package/dist/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
  104. package/dist/globalization/interfaces/filters/II18nTokenBox.js +1 -0
  105. package/dist/globalization/interfaces/index.d.ts +1 -0
  106. package/dist/globalization/interfaces/index.js +1 -0
  107. package/dist/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
  108. package/dist/globalization/labels/calendar/I18N_CALENDAR.js +7 -0
  109. package/dist/globalization/labels/calendar/index.d.ts +1 -0
  110. package/dist/globalization/labels/calendar/index.js +1 -0
  111. package/dist/globalization/labels/common/I18N_COMMON.js +2 -0
  112. package/dist/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
  113. package/dist/globalization/labels/filters/I18N_FILTER.js +6 -0
  114. package/dist/globalization/labels/index.d.ts +1 -0
  115. package/dist/globalization/labels/index.js +1 -0
  116. package/dist/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
  117. package/dist/interfaces/format/IFormatConfig.Interface.js +1 -0
  118. package/dist/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
  119. package/dist/interfaces/format/IFormatCurrency.Interface.js +1 -0
  120. package/dist/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
  121. package/dist/interfaces/format/IFormatOutputFormat.Interface.js +1 -0
  122. package/dist/interfaces/format/index.d.ts +3 -0
  123. package/dist/interfaces/format/index.js +3 -0
  124. package/dist/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
  125. package/dist/interfaces/index.d.ts +1 -0
  126. package/dist/interfaces/index.js +1 -0
  127. package/dist/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
  128. package/dist/qrvey/helpers/getValueWithSuffixes.js +19 -0
  129. package/dist/qrvey/helpers/index.d.ts +2 -0
  130. package/dist/qrvey/helpers/index.js +2 -0
  131. package/dist/qrvey/helpers/transformValue.d.ts +8 -0
  132. package/dist/qrvey/helpers/transformValue.js +42 -0
  133. package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
  134. package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.js +1 -0
  135. package/dist/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
  136. package/dist/qrvey/interfaces/ITransformValueSettings.js +1 -0
  137. package/dist/qrvey/interfaces/index.d.ts +2 -0
  138. package/dist/qrvey/interfaces/index.js +2 -0
  139. package/dist/services/api/getDatasetColumns.api.js +3 -1
  140. package/package.json +1 -1
  141. package/src/filters/helpers/builder/getFilterBuilderGeneralConfig.ts +1 -0
  142. package/src/filters/helpers/ui/index.ts +1 -0
  143. package/src/filters/helpers/ui/transformFilterValues.ts +29 -0
  144. package/src/filters/interfaces/builder/IFilterBuilderGeneralConfig.ts +2 -1
  145. package/src/filters/interfaces/panel/IFilterPanelConfig.ts +1 -0
  146. package/src/filters/interfaces/ui/IFUTransformFilterValuesSettings.ts +7 -0
  147. package/src/filters/interfaces/ui/index.ts +3 -2
  148. package/src/format/definition.ts +45 -0
  149. package/src/format/format.ts +19 -15
  150. package/src/format/index.ts +1 -0
  151. package/src/format/localization.ts +62 -0
  152. package/src/globalization/helpers/getI18nCalendar.ts +68 -0
  153. package/src/globalization/helpers/index.ts +1 -0
  154. package/src/globalization/interfaces/calendar/II18nCalendar.ts +7 -0
  155. package/src/globalization/interfaces/calendar/II18nCalendarProperties.ts +9 -0
  156. package/src/globalization/interfaces/calendar/index.ts +2 -0
  157. package/src/globalization/interfaces/common/II18nCommon.ts +2 -0
  158. package/src/globalization/interfaces/common/II18nDayNames.ts +8 -0
  159. package/src/globalization/interfaces/filters/II18nFilter.ts +2 -0
  160. package/src/globalization/interfaces/filters/II18nTokenBox.ts +6 -0
  161. package/src/globalization/interfaces/index.ts +1 -0
  162. package/src/globalization/labels/calendar/I18N_CALENDAR.ts +9 -0
  163. package/src/globalization/labels/calendar/index.ts +1 -0
  164. package/src/globalization/labels/common/I18N_COMMON.ts +2 -0
  165. package/src/globalization/labels/common/I18N_DAY_NAMES.ts +8 -0
  166. package/src/globalization/labels/filters/I18N_FILTER.ts +6 -0
  167. package/src/globalization/labels/index.ts +1 -0
  168. package/src/interfaces/format/IFormatConfig.Interface.ts +5 -0
  169. package/src/interfaces/format/IFormatCurrency.Interface.ts +4 -0
  170. package/src/interfaces/format/IFormatOutputFormat.Interface.ts +9 -0
  171. package/src/interfaces/format/index.ts +3 -0
  172. package/src/interfaces/general/IGeneralWidgetConfig.ts +2 -0
  173. package/src/interfaces/index.ts +1 -0
  174. package/src/qrvey/helpers/getValueWithSuffixes.ts +19 -0
  175. package/src/qrvey/helpers/index.ts +2 -0
  176. package/src/qrvey/helpers/transformValue.ts +47 -0
  177. package/src/qrvey/interfaces/IGetValueWithSuffixesSettings.ts +12 -0
  178. package/src/qrvey/interfaces/ITransformValueSettings.ts +12 -0
  179. package/src/qrvey/interfaces/index.ts +2 -0
  180. package/src/services/api/getDatasetColumns.api.ts +3 -1
  181. package/test/columns/isNumericalColumn.test.js +154 -0
  182. package/test/format.test.js +11 -11
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-15*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-19*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -2619,12 +2619,13 @@ Get an string of the properties of the given column.
2619
2619
 
2620
2620
 
2621
2621
 
2622
- ### dist/services/api/getAllDatasets.api.js
2622
+ ### dist/qrvey/helpers/getValueWithSuffixes.js
2623
2623
 
2624
2624
 
2625
- #### getAllDatasets(config, pickDatasets)
2625
+ #### getValueWithSuffixes(value, suffixes)
2626
2626
 
2627
- Get a dataset list from a collection of Qrvey IDs
2627
+ Get a string value with suffixes if available.
2628
+ Add suffix into the value string. Prioritized for numeric values.
2628
2629
 
2629
2630
 
2630
2631
 
@@ -2633,8 +2634,8 @@ Get a dataset list from a collection of Qrvey IDs
2633
2634
 
2634
2635
  | Name | Type | Description | |
2635
2636
  | ---- | ---- | ----------- | -------- |
2636
- | config | | the widget config. Includes the appid and others configuration properties |   |
2637
- | pickDatasets | | Collection of Qrvey IDs for filtering the request |   |
2637
+ | value | | a number or string |   |
2638
+ | suffixes | | An object with singular or plural suffix string. |   |
2638
2639
 
2639
2640
 
2640
2641
 
@@ -2642,17 +2643,17 @@ Get a dataset list from a collection of Qrvey IDs
2642
2643
  ##### Returns
2643
2644
 
2644
2645
 
2645
- - a promise
2646
+ - a string value with suffix
2646
2647
 
2647
2648
 
2648
2649
 
2649
2650
 
2650
- ### dist/services/api/getAllQrveys.api.js
2651
+ ### dist/qrvey/helpers/transformValue.js
2651
2652
 
2652
2653
 
2653
- #### getAllQrveys(config, params)
2654
+ #### transformValue(value, settings)
2654
2655
 
2655
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2656
+ Transforms a value depending of localization/globalization and extras settings.
2656
2657
 
2657
2658
 
2658
2659
 
@@ -2661,8 +2662,8 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2661
2662
 
2662
2663
  | Name | Type | Description | |
2663
2664
  | ---- | ---- | ----------- | -------- |
2664
- | config | | Configuration |   |
2665
- | params | | Object for getting precise data |   |
2665
+ | value | | A value to transform |   |
2666
+ | settings | | The settings of the transformValue function |   |
2666
2667
 
2667
2668
 
2668
2669
 
@@ -2670,17 +2671,36 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2670
2671
  ##### Returns
2671
2672
 
2672
2673
 
2673
- - `Void`
2674
+ - A transformed value
2674
2675
 
2675
2676
 
2676
2677
 
2678
+ #### getOutputFormat(settings)
2677
2679
 
2678
- ### dist/services/api/getDatasetColumns.api.js
2680
+ Gets the outputformat settings
2679
2681
 
2680
2682
 
2681
- #### getDatasetColumns(qrveyid)
2682
2683
 
2683
- Get a dataset by Qrvey ID
2684
+
2685
+ ##### Parameters
2686
+
2687
+ | Name | Type | Description | |
2688
+ | ---- | ---- | ----------- | -------- |
2689
+ | settings | | The settings of the transformValue function |   |
2690
+
2691
+
2692
+
2693
+
2694
+ ##### Returns
2695
+
2696
+
2697
+ - the outputformat settings
2698
+
2699
+
2700
+
2701
+ #### getFormatConfig(settings)
2702
+
2703
+ Gets the format config
2684
2704
 
2685
2705
 
2686
2706
 
@@ -2689,7 +2709,7 @@ Get a dataset by Qrvey ID
2689
2709
 
2690
2710
  | Name | Type | Description | |
2691
2711
  | ---- | ---- | ----------- | -------- |
2692
- | qrveyid | | The Qrvey ID |   |
2712
+ | settings | | The settings of the transformValue function |   |
2693
2713
 
2694
2714
 
2695
2715
 
@@ -2697,17 +2717,74 @@ Get a dataset by Qrvey ID
2697
2717
  ##### Returns
2698
2718
 
2699
2719
 
2700
- - a promise
2720
+ - the format config
2701
2721
 
2702
2722
 
2703
2723
 
2704
2724
 
2705
- ### dist/typescript/decorators/Throttled.js
2725
+ ### dist/stencil/decorators/Config.js
2706
2726
 
2707
2727
 
2708
- #### Throttled(time)
2728
+ #### Config()
2729
+
2730
+ Stencil.js - Prop Decorator
2731
+ Get and Parse the Widget Configuration Object and also provide the ability to get properties in different case styles such as: lower, upper, camel and pascal
2732
+ But for this, is required ask for a property in `snake_case` style
2733
+
2734
+
2735
+
2736
+
2737
+
2738
+
2739
+ ##### Examples
2740
+
2741
+ ```javascript
2742
+ \ @Config() @Prop() settings;
2743
+
2744
+ someMethod() {
2745
+ this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2746
+ }
2747
+ ```
2709
2748
 
2710
- (Method Decorator) Throttled Class Method
2749
+
2750
+ ##### Returns
2751
+
2752
+
2753
+ - `Void`
2754
+
2755
+
2756
+
2757
+
2758
+ ### dist/stencil/util/createRef.js
2759
+
2760
+
2761
+ #### createRef()
2762
+
2763
+ lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom.html)
2764
+
2765
+
2766
+
2767
+
2768
+
2769
+
2770
+ ##### Returns
2771
+
2772
+
2773
+ - function - Function to use in ref prop in html elements
2774
+
2775
+
2776
+
2777
+
2778
+ ### dist/stencil/util/getConfig.js
2779
+
2780
+
2781
+ #### getConfig(cfg)
2782
+
2783
+ verify the Config object type and try to return a parsed Object
2784
+ - In case _cfg_ is a string, first try to make a JSON parse in other case
2785
+ try to find this string as a variable on Windows object
2786
+ - If _cfg_ is a fuction, tis is invoked and parsed
2787
+ - Finally, if is an object, _cfg_ is inmediatly returned
2711
2788
 
2712
2789
 
2713
2790
 
@@ -2716,7 +2793,7 @@ Get a dataset by Qrvey ID
2716
2793
 
2717
2794
  | Name | Type | Description | |
2718
2795
  | ---- | ---- | ----------- | -------- |
2719
- | time | | (optional) deafult 500 |   |
2796
+ | cfg | | |   |
2720
2797
 
2721
2798
 
2722
2799
 
@@ -2729,12 +2806,12 @@ Get a dataset by Qrvey ID
2729
2806
 
2730
2807
 
2731
2808
 
2732
- ### dist/typescript/decorators/Debounce.js
2809
+ ### dist/services/api/getAllDatasets.api.js
2733
2810
 
2734
2811
 
2735
- #### Debounce(time)
2812
+ #### getAllDatasets(config, pickDatasets)
2736
2813
 
2737
- (Method Decorator) Debounce Class Method
2814
+ Get a dataset list from a collection of Qrvey IDs
2738
2815
 
2739
2816
 
2740
2817
 
@@ -2743,7 +2820,8 @@ Get a dataset by Qrvey ID
2743
2820
 
2744
2821
  | Name | Type | Description | |
2745
2822
  | ---- | ---- | ----------- | -------- |
2746
- | time | | (optional) deafult 500 |   |
2823
+ | config | | the widget config. Includes the appid and others configuration properties |   |
2824
+ | pickDatasets | | Collection of Qrvey IDs for filtering the request |   |
2747
2825
 
2748
2826
 
2749
2827
 
@@ -2751,34 +2829,29 @@ Get a dataset by Qrvey ID
2751
2829
  ##### Returns
2752
2830
 
2753
2831
 
2754
- - `Void`
2832
+ - a promise
2755
2833
 
2756
2834
 
2757
2835
 
2758
2836
 
2759
- ### dist/stencil/decorators/Config.js
2760
-
2837
+ ### dist/services/api/getAllQrveys.api.js
2761
2838
 
2762
- #### Config()
2763
2839
 
2764
- Stencil.js - Prop Decorator
2765
- Get and Parse the Widget Configuration Object and also provide the ability to get properties in different case styles such as: lower, upper, camel and pascal
2766
- But for this, is required ask for a property in `snake_case` style
2840
+ #### getAllQrveys(config, params)
2767
2841
 
2842
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2768
2843
 
2769
2844
 
2770
2845
 
2771
2846
 
2847
+ ##### Parameters
2772
2848
 
2773
- ##### Examples
2849
+ | Name | Type | Description | |
2850
+ | ---- | ---- | ----------- | -------- |
2851
+ | config | | Configuration |   |
2852
+ | params | | Object for getting precise data |   |
2774
2853
 
2775
- ```javascript
2776
- \ @Config() @Prop() settings;
2777
2854
 
2778
- someMethod() {
2779
- this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2780
- }
2781
- ```
2782
2855
 
2783
2856
 
2784
2857
  ##### Returns
@@ -2789,14 +2862,21 @@ someMethod() {
2789
2862
 
2790
2863
 
2791
2864
 
2792
- ### dist/stencil/util/createRef.js
2865
+ ### dist/services/api/getDatasetColumns.api.js
2793
2866
 
2794
2867
 
2795
- #### createRef()
2868
+ #### getDatasetColumns(qrveyid)
2869
+
2870
+ Get a dataset by Qrvey ID
2871
+
2796
2872
 
2797
- lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom.html)
2798
2873
 
2799
2874
 
2875
+ ##### Parameters
2876
+
2877
+ | Name | Type | Description | |
2878
+ | ---- | ---- | ----------- | -------- |
2879
+ | qrveyid | | The Qrvey ID |   |
2800
2880
 
2801
2881
 
2802
2882
 
@@ -2804,21 +2884,17 @@ lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom
2804
2884
  ##### Returns
2805
2885
 
2806
2886
 
2807
- - function - Function to use in ref prop in html elements
2887
+ - a promise
2808
2888
 
2809
2889
 
2810
2890
 
2811
2891
 
2812
- ### dist/stencil/util/getConfig.js
2892
+ ### dist/typescript/decorators/Debounce.js
2813
2893
 
2814
2894
 
2815
- #### getConfig(cfg)
2895
+ #### Debounce(time)
2816
2896
 
2817
- verify the Config object type and try to return a parsed Object
2818
- - In case _cfg_ is a string, first try to make a JSON parse in other case
2819
- try to find this string as a variable on Windows object
2820
- - If _cfg_ is a fuction, tis is invoked and parsed
2821
- - Finally, if is an object, _cfg_ is inmediatly returned
2897
+ (Method Decorator) Debounce Class Method
2822
2898
 
2823
2899
 
2824
2900
 
@@ -2827,7 +2903,34 @@ try to find this string as a variable on Windows object
2827
2903
 
2828
2904
  | Name | Type | Description | |
2829
2905
  | ---- | ---- | ----------- | -------- |
2830
- | cfg | | |   |
2906
+ | time | | (optional) deafult 500 |   |
2907
+
2908
+
2909
+
2910
+
2911
+ ##### Returns
2912
+
2913
+
2914
+ - `Void`
2915
+
2916
+
2917
+
2918
+
2919
+ ### dist/typescript/decorators/Throttled.js
2920
+
2921
+
2922
+ #### Throttled(time)
2923
+
2924
+ (Method Decorator) Throttled Class Method
2925
+
2926
+
2927
+
2928
+
2929
+ ##### Parameters
2930
+
2931
+ | Name | Type | Description | |
2932
+ | ---- | ---- | ----------- | -------- |
2933
+ | time | | (optional) deafult 500 |   |
2831
2934
 
2832
2935
 
2833
2936
 
@@ -3365,12 +3468,12 @@ Excludes and returns a filter data without filters by the given scopes
3365
3468
 
3366
3469
 
3367
3470
 
3368
- ### dist/filters/helpers/common/getFilterLabel.js
3471
+ ### dist/filters/helpers/common/getFilterColumnLabel.js
3369
3472
 
3370
3473
 
3371
- #### getFilterLabel(filter)
3474
+ #### getFilterColumnLabel(column)
3372
3475
 
3373
- Gets the Filter Label + Column label
3476
+ Get an string of the properties of the given filter column.
3374
3477
 
3375
3478
 
3376
3479
 
@@ -3379,7 +3482,7 @@ Gets the Filter Label + Column label
3379
3482
 
3380
3483
  | Name | Type | Description | |
3381
3484
  | ---- | ---- | ----------- | -------- |
3382
- | filter | | the UI filter |   |
3485
+ | column | | The filter column |   |
3383
3486
 
3384
3487
 
3385
3488
 
@@ -3387,17 +3490,17 @@ Gets the Filter Label + Column label
3387
3490
  ##### Returns
3388
3491
 
3389
3492
 
3390
- - a sring label
3493
+ - an string with the property, aggregate or calculation label.
3391
3494
 
3392
3495
 
3393
3496
 
3394
3497
 
3395
- ### dist/filters/helpers/common/getFilterColumnLabel.js
3498
+ ### dist/filters/helpers/common/getFilterLabel.js
3396
3499
 
3397
3500
 
3398
- #### getFilterColumnLabel(column)
3501
+ #### getFilterLabel(filter)
3399
3502
 
3400
- Get an string of the properties of the given filter column.
3503
+ Gets the Filter Label + Column label
3401
3504
 
3402
3505
 
3403
3506
 
@@ -3406,7 +3509,7 @@ Get an string of the properties of the given filter column.
3406
3509
 
3407
3510
  | Name | Type | Description | |
3408
3511
  | ---- | ---- | ----------- | -------- |
3409
- | column | | The filter column |   |
3512
+ | filter | | the UI filter |   |
3410
3513
 
3411
3514
 
3412
3515
 
@@ -3414,7 +3517,7 @@ Get an string of the properties of the given filter column.
3414
3517
  ##### Returns
3415
3518
 
3416
3519
 
3417
- - an string with the property, aggregate or calculation label.
3520
+ - a sring label
3418
3521
 
3419
3522
 
3420
3523
 
@@ -3632,12 +3735,12 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
3632
3735
 
3633
3736
 
3634
3737
 
3635
- ### dist/filters/helpers/common/haveFiltersByDataset.js
3738
+ ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3636
3739
 
3637
3740
 
3638
- #### haveFiltersByDataset(filterData, qrveyid)
3741
+ #### getParamsToGetFilterSettings(settings)
3639
3742
 
3640
- Validates if the filter data has filters by a dataset ID (Qrvey ID).
3743
+ Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3641
3744
 
3642
3745
 
3643
3746
 
@@ -3646,8 +3749,7 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3646
3749
 
3647
3750
  | Name | Type | Description | |
3648
3751
  | ---- | ---- | ----------- | -------- |
3649
- | filterData | | the filter data or the UI filter data. |   |
3650
- | qrveyid | | The Qrvey ID |   |
3752
+ | settings | | an object to the ParamsToGetFilter settings |   |
3651
3753
 
3652
3754
 
3653
3755
 
@@ -3655,17 +3757,17 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3655
3757
  ##### Returns
3656
3758
 
3657
3759
 
3658
- - true: the filter data has filters by the Qrvey ID
3760
+ - a new ParamsToGetFilter settings object.
3659
3761
 
3660
3762
 
3661
3763
 
3662
3764
 
3663
- ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3765
+ ### dist/filters/helpers/common/haveFiltersByDataset.js
3664
3766
 
3665
3767
 
3666
- #### getParamsToGetFilterSettings(settings)
3768
+ #### haveFiltersByDataset(filterData, qrveyid)
3667
3769
 
3668
- Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3770
+ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3669
3771
 
3670
3772
 
3671
3773
 
@@ -3674,7 +3776,8 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
3674
3776
 
3675
3777
  | Name | Type | Description | |
3676
3778
  | ---- | ---- | ----------- | -------- |
3677
- | settings | | an object to the ParamsToGetFilter settings |   |
3779
+ | filterData | | the filter data or the UI filter data. |   |
3780
+ | qrveyid | | The Qrvey ID |   |
3678
3781
 
3679
3782
 
3680
3783
 
@@ -3682,7 +3785,7 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
3682
3785
  ##### Returns
3683
3786
 
3684
3787
 
3685
- - a new ParamsToGetFilter settings object.
3788
+ - true: the filter data has filters by the Qrvey ID
3686
3789
 
3687
3790
 
3688
3791
 
@@ -3742,12 +3845,12 @@ Determines if the filter column and property is a distinct group dates type
3742
3845
 
3743
3846
 
3744
3847
 
3745
- ### dist/filters/helpers/common/isNullValidator.js
3848
+ ### dist/filters/helpers/common/isInValidator.js
3746
3849
 
3747
3850
 
3748
- #### isNullValidator(validator)
3851
+ #### isInValidator(validator)
3749
3852
 
3750
- Checks if the given validator is a Null type.
3853
+ Validates if the given validator is a In type
3751
3854
 
3752
3855
 
3753
3856
 
@@ -3756,7 +3859,7 @@ Checks if the given validator is a Null type.
3756
3859
 
3757
3860
  | Name | Type | Description | |
3758
3861
  | ---- | ---- | ----------- | -------- |
3759
- | validator | | The Filter Validator |   |
3862
+ | validator | | The validator |   |
3760
3863
 
3761
3864
 
3762
3865
 
@@ -3764,17 +3867,17 @@ Checks if the given validator is a Null type.
3764
3867
  ##### Returns
3765
3868
 
3766
3869
 
3767
- - True: It is a Null Validator; False: It is not a Null Validator.
3870
+ - true: it is a In validator; false: it is not a In validator
3768
3871
 
3769
3872
 
3770
3873
 
3771
3874
 
3772
- ### dist/filters/helpers/common/isInValidator.js
3875
+ ### dist/filters/helpers/common/isNullValidator.js
3773
3876
 
3774
3877
 
3775
- #### isInValidator(validator)
3878
+ #### isNullValidator(validator)
3776
3879
 
3777
- Validates if the given validator is a In type
3880
+ Checks if the given validator is a Null type.
3778
3881
 
3779
3882
 
3780
3883
 
@@ -3783,7 +3886,7 @@ Validates if the given validator is a In type
3783
3886
 
3784
3887
  | Name | Type | Description | |
3785
3888
  | ---- | ---- | ----------- | -------- |
3786
- | validator | | The validator |   |
3889
+ | validator | | The Filter Validator |   |
3787
3890
 
3788
3891
 
3789
3892
 
@@ -3791,7 +3894,7 @@ Validates if the given validator is a In type
3791
3894
  ##### Returns
3792
3895
 
3793
3896
 
3794
- - true: it is a In validator; false: it is not a In validator
3897
+ - True: It is a Null Validator; False: It is not a Null Validator.
3795
3898
 
3796
3899
 
3797
3900
 
@@ -4151,34 +4254,6 @@ Gets the label of the filter property
4151
4254
 
4152
4255
 
4153
4256
 
4154
- ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
4155
-
4156
-
4157
- #### getUIFlatFilterByParams()
4158
-
4159
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4160
- The validation to filter the stored filter is depending on:
4161
- - Column
4162
- - Qrvey ID,
4163
- - Scope type
4164
- - Scope ID
4165
- - Panel ID
4166
- - Validator type
4167
- - Property type
4168
-
4169
-
4170
-
4171
-
4172
-
4173
-
4174
- ##### Returns
4175
-
4176
-
4177
- - The index of the uFilter array or the Filter object s
4178
-
4179
-
4180
-
4181
-
4182
4257
  ### dist/filters/helpers/ui/getOutputFormatByColumn.js
4183
4258
 
4184
4259
 
@@ -4235,6 +4310,34 @@ Looks around all filter structure finding the qrveyid propertty in each dataset
4235
4310
 
4236
4311
 
4237
4312
 
4313
+ ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
4314
+
4315
+
4316
+ #### getUIFlatFilterByParams()
4317
+
4318
+ Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4319
+ The validation to filter the stored filter is depending on:
4320
+ - Column
4321
+ - Qrvey ID,
4322
+ - Scope type
4323
+ - Scope ID
4324
+ - Panel ID
4325
+ - Validator type
4326
+ - Property type
4327
+
4328
+
4329
+
4330
+
4331
+
4332
+
4333
+ ##### Returns
4334
+
4335
+
4336
+ - The index of the uFilter array or the Filter object s
4337
+
4338
+
4339
+
4340
+
4238
4341
  ### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
4239
4342
 
4240
4343
 
@@ -12,6 +12,7 @@ function getFilterBuilderGeneralConfig(config = {}) {
12
12
  apiKey: (0, getAttribute_1.getAttribute)(config, 'api_key') || config.apiKey,
13
13
  appid: (0, getAttribute_1.getAttribute)(config, 'app_id') || config.appid,
14
14
  domain: config.domain,
15
+ locale: config.locale,
15
16
  qv_token: config.qv_token,
16
17
  timezoneControl: (0, getAttribute_1.getAttribute)(config, 'timezone_control') || config.timezoneControl,
17
18
  userid: (0, getAttribute_1.getAttribute)(config, 'user_id') || config.userid,
@@ -8,3 +8,4 @@ export * from './getUIFlatFiltersByParams';
8
8
  export * from './getUIFlatFiltersByScopes';
9
9
  export * from './getUIValues';
10
10
  export * from './getUpdatedUIFilters';
11
+ export * from './transformFilterValues';
@@ -20,3 +20,4 @@ __exportStar(require("./getUIFlatFiltersByParams"), exports);
20
20
  __exportStar(require("./getUIFlatFiltersByScopes"), exports);
21
21
  __exportStar(require("./getUIValues"), exports);
22
22
  __exportStar(require("./getUpdatedUIFilters"), exports);
23
+ __exportStar(require("./transformFilterValues"), exports);
@@ -0,0 +1,4 @@
1
+ import { IFSFilter } from "../../interfaces/common/IFSFilter";
2
+ import { IFValue } from "../../interfaces/IFValue";
3
+ import { IFUTransformFilterValuesSettings } from "../../interfaces/ui/IFUTransformFilterValuesSettings";
4
+ export declare function transformFilterValues(filter: IFSFilter, settings: IFUTransformFilterValuesSettings): IFValue[];
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformFilterValues = void 0;
4
+ const isEmpty_1 = require("../../../general/mix/isEmpty");
5
+ const transformValue_1 = require("../../../qrvey/helpers/transformValue");
6
+ const isRangeValidator_1 = require("../common/isRangeValidator");
7
+ const isRegularValidator_1 = require("../common/isRegularValidator");
8
+ function transformFilterValues(filter, settings) {
9
+ const transformValueSettings = Object.assign(Object.assign({}, settings), { column: filter.column, property: filter.property });
10
+ if ((0, isEmpty_1.isEmpty)(filter))
11
+ return [];
12
+ if ((0, isRegularValidator_1.isRegularValidator)(filter.validator)) {
13
+ return filter.values.map((value) => (Object.assign(Object.assign({}, value), { value: (0, transformValue_1.transformValue)(value.value, transformValueSettings) })));
14
+ }
15
+ else if ((0, isRangeValidator_1.isRangeValidator)(filter.validator)) {
16
+ return filter.values.map((value) => (Object.assign(Object.assign({}, value), { min: (0, transformValue_1.transformValue)(value.min, transformValueSettings), max: (0, transformValue_1.transformValue)(value.max, transformValueSettings) })));
17
+ }
18
+ else {
19
+ return filter.values;
20
+ }
21
+ }
22
+ exports.transformFilterValues = transformFilterValues;
@@ -7,5 +7,6 @@ export interface IFilterBuilderGeneralConfig {
7
7
  domain: string;
8
8
  qv_token?: string;
9
9
  timezoneControl?: string;
10
+ locale?: string;
10
11
  userid: string;
11
12
  }
@@ -7,4 +7,5 @@ import { IFUDataStore } from "../ui/IFUDataStore";
7
7
  export interface IFilterPanelConfig extends IFUDataStore {
8
8
  filterBuilderConfig?: IFilterBuilderConfig;
9
9
  i18n?: IResourceI18n;
10
+ locale?: string;
10
11
  }
@@ -0,0 +1,6 @@
1
+ import { II18nServiceTranslate } from "../../../globalization/interfaces/II18nServiceTranslate";
2
+ export interface IFUTransformFilterValuesSettings {
3
+ translate: II18nServiceTranslate;
4
+ locale: string;
5
+ suffixTranslateLabel?: string;
6
+ }