@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.
- package/README.md +214 -111
- package/dist/cjs/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
- package/dist/cjs/filters/helpers/ui/index.d.ts +1 -0
- package/dist/cjs/filters/helpers/ui/index.js +1 -0
- package/dist/cjs/filters/helpers/ui/transformFilterValues.d.ts +4 -0
- package/dist/cjs/filters/helpers/ui/transformFilterValues.js +22 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
- package/dist/cjs/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
- package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
- package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +2 -0
- package/dist/cjs/filters/interfaces/ui/index.d.ts +3 -2
- package/dist/cjs/filters/interfaces/ui/index.js +3 -2
- package/dist/cjs/format/definition.d.ts +17 -0
- package/dist/cjs/format/definition.js +31 -1
- package/dist/cjs/format/format.d.ts +2 -1
- package/dist/cjs/format/format.js +8 -5
- package/dist/cjs/format/index.d.ts +1 -0
- package/dist/cjs/format/index.js +1 -0
- package/dist/cjs/format/localization.d.ts +4 -0
- package/dist/cjs/format/localization.js +65 -0
- package/dist/cjs/globalization/helpers/getI18nCalendar.d.ts +4 -0
- package/dist/cjs/globalization/helpers/getI18nCalendar.js +69 -0
- package/dist/cjs/globalization/helpers/index.d.ts +1 -0
- package/dist/cjs/globalization/helpers/index.js +1 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.js +2 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.js +2 -0
- package/dist/cjs/globalization/interfaces/calendar/index.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/calendar/index.js +14 -0
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.js +2 -0
- package/dist/cjs/globalization/interfaces/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/index.js +1 -0
- package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
- package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.js +10 -0
- package/dist/cjs/globalization/labels/calendar/index.d.ts +1 -0
- package/dist/cjs/globalization/labels/calendar/index.js +13 -0
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/cjs/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +6 -0
- package/dist/cjs/globalization/labels/index.d.ts +1 -0
- package/dist/cjs/globalization/labels/index.js +1 -0
- package/dist/cjs/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
- package/dist/cjs/interfaces/format/IFormatConfig.Interface.js +2 -0
- package/dist/cjs/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
- package/dist/cjs/interfaces/format/IFormatCurrency.Interface.js +2 -0
- package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
- package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.js +2 -0
- package/dist/cjs/interfaces/format/index.d.ts +3 -0
- package/dist/cjs/interfaces/format/index.js +15 -0
- package/dist/cjs/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
- package/dist/cjs/interfaces/index.d.ts +1 -0
- package/dist/cjs/interfaces/index.js +1 -0
- package/dist/cjs/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
- package/dist/cjs/qrvey/helpers/getValueWithSuffixes.js +23 -0
- package/dist/cjs/qrvey/helpers/index.d.ts +2 -0
- package/dist/cjs/qrvey/helpers/index.js +2 -0
- package/dist/cjs/qrvey/helpers/transformValue.d.ts +8 -0
- package/dist/cjs/qrvey/helpers/transformValue.js +46 -0
- package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
- package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.js +2 -0
- package/dist/cjs/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
- package/dist/cjs/qrvey/interfaces/ITransformValueSettings.js +2 -0
- package/dist/cjs/qrvey/interfaces/index.d.ts +2 -0
- package/dist/cjs/qrvey/interfaces/index.js +2 -0
- package/dist/cjs/services/api/getDatasetColumns.api.js +3 -1
- package/dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
- package/dist/filters/helpers/ui/index.d.ts +1 -0
- package/dist/filters/helpers/ui/index.js +1 -0
- package/dist/filters/helpers/ui/transformFilterValues.d.ts +4 -0
- package/dist/filters/helpers/ui/transformFilterValues.js +18 -0
- package/dist/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
- package/dist/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
- package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
- package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +1 -0
- package/dist/filters/interfaces/ui/index.d.ts +3 -2
- package/dist/filters/interfaces/ui/index.js +3 -2
- package/dist/format/definition.d.ts +17 -0
- package/dist/format/definition.js +30 -0
- package/dist/format/format.d.ts +2 -1
- package/dist/format/format.js +6 -3
- package/dist/format/index.d.ts +1 -0
- package/dist/format/index.js +1 -0
- package/dist/format/localization.d.ts +4 -0
- package/dist/format/localization.js +59 -0
- package/dist/globalization/helpers/getI18nCalendar.d.ts +4 -0
- package/dist/globalization/helpers/getI18nCalendar.js +65 -0
- package/dist/globalization/helpers/index.d.ts +1 -0
- package/dist/globalization/helpers/index.js +1 -0
- package/dist/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
- package/dist/globalization/interfaces/calendar/II18nCalendar.js +1 -0
- package/dist/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
- package/dist/globalization/interfaces/calendar/II18nCalendarProperties.js +1 -0
- package/dist/globalization/interfaces/calendar/index.d.ts +2 -0
- package/dist/globalization/interfaces/calendar/index.js +2 -0
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
- package/dist/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
- package/dist/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
- package/dist/globalization/interfaces/filters/II18nTokenBox.js +1 -0
- package/dist/globalization/interfaces/index.d.ts +1 -0
- package/dist/globalization/interfaces/index.js +1 -0
- package/dist/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
- package/dist/globalization/labels/calendar/I18N_CALENDAR.js +7 -0
- package/dist/globalization/labels/calendar/index.d.ts +1 -0
- package/dist/globalization/labels/calendar/index.js +1 -0
- package/dist/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
- package/dist/globalization/labels/filters/I18N_FILTER.js +6 -0
- package/dist/globalization/labels/index.d.ts +1 -0
- package/dist/globalization/labels/index.js +1 -0
- package/dist/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
- package/dist/interfaces/format/IFormatConfig.Interface.js +1 -0
- package/dist/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
- package/dist/interfaces/format/IFormatCurrency.Interface.js +1 -0
- package/dist/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
- package/dist/interfaces/format/IFormatOutputFormat.Interface.js +1 -0
- package/dist/interfaces/format/index.d.ts +3 -0
- package/dist/interfaces/format/index.js +3 -0
- package/dist/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
- package/dist/qrvey/helpers/getValueWithSuffixes.js +19 -0
- package/dist/qrvey/helpers/index.d.ts +2 -0
- package/dist/qrvey/helpers/index.js +2 -0
- package/dist/qrvey/helpers/transformValue.d.ts +8 -0
- package/dist/qrvey/helpers/transformValue.js +42 -0
- package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
- package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.js +1 -0
- package/dist/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
- package/dist/qrvey/interfaces/ITransformValueSettings.js +1 -0
- package/dist/qrvey/interfaces/index.d.ts +2 -0
- package/dist/qrvey/interfaces/index.js +2 -0
- package/dist/services/api/getDatasetColumns.api.js +3 -1
- package/package.json +1 -1
- package/src/filters/helpers/builder/getFilterBuilderGeneralConfig.ts +1 -0
- package/src/filters/helpers/ui/index.ts +1 -0
- package/src/filters/helpers/ui/transformFilterValues.ts +29 -0
- package/src/filters/interfaces/builder/IFilterBuilderGeneralConfig.ts +2 -1
- package/src/filters/interfaces/panel/IFilterPanelConfig.ts +1 -0
- package/src/filters/interfaces/ui/IFUTransformFilterValuesSettings.ts +7 -0
- package/src/filters/interfaces/ui/index.ts +3 -2
- package/src/format/definition.ts +45 -0
- package/src/format/format.ts +19 -15
- package/src/format/index.ts +1 -0
- package/src/format/localization.ts +62 -0
- package/src/globalization/helpers/getI18nCalendar.ts +68 -0
- package/src/globalization/helpers/index.ts +1 -0
- package/src/globalization/interfaces/calendar/II18nCalendar.ts +7 -0
- package/src/globalization/interfaces/calendar/II18nCalendarProperties.ts +9 -0
- package/src/globalization/interfaces/calendar/index.ts +2 -0
- package/src/globalization/interfaces/common/II18nCommon.ts +2 -0
- package/src/globalization/interfaces/common/II18nDayNames.ts +8 -0
- package/src/globalization/interfaces/filters/II18nFilter.ts +2 -0
- package/src/globalization/interfaces/filters/II18nTokenBox.ts +6 -0
- package/src/globalization/interfaces/index.ts +1 -0
- package/src/globalization/labels/calendar/I18N_CALENDAR.ts +9 -0
- package/src/globalization/labels/calendar/index.ts +1 -0
- package/src/globalization/labels/common/I18N_COMMON.ts +2 -0
- package/src/globalization/labels/common/I18N_DAY_NAMES.ts +8 -0
- package/src/globalization/labels/filters/I18N_FILTER.ts +6 -0
- package/src/globalization/labels/index.ts +1 -0
- package/src/interfaces/format/IFormatConfig.Interface.ts +5 -0
- package/src/interfaces/format/IFormatCurrency.Interface.ts +4 -0
- package/src/interfaces/format/IFormatOutputFormat.Interface.ts +9 -0
- package/src/interfaces/format/index.ts +3 -0
- package/src/interfaces/general/IGeneralWidgetConfig.ts +2 -0
- package/src/interfaces/index.ts +1 -0
- package/src/qrvey/helpers/getValueWithSuffixes.ts +19 -0
- package/src/qrvey/helpers/index.ts +2 -0
- package/src/qrvey/helpers/transformValue.ts +47 -0
- package/src/qrvey/interfaces/IGetValueWithSuffixesSettings.ts +12 -0
- package/src/qrvey/interfaces/ITransformValueSettings.ts +12 -0
- package/src/qrvey/interfaces/index.ts +2 -0
- package/src/services/api/getDatasetColumns.api.ts +3 -1
- package/test/columns/isNumericalColumn.test.js +154 -0
- 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-
|
|
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/
|
|
2622
|
+
### dist/qrvey/helpers/getValueWithSuffixes.js
|
|
2623
2623
|
|
|
2624
2624
|
|
|
2625
|
-
####
|
|
2625
|
+
#### getValueWithSuffixes(value, suffixes)
|
|
2626
2626
|
|
|
2627
|
-
Get a
|
|
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
|
-
|
|
|
2637
|
-
|
|
|
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
|
|
2646
|
+
- a string value with suffix
|
|
2646
2647
|
|
|
2647
2648
|
|
|
2648
2649
|
|
|
2649
2650
|
|
|
2650
|
-
### dist/
|
|
2651
|
+
### dist/qrvey/helpers/transformValue.js
|
|
2651
2652
|
|
|
2652
2653
|
|
|
2653
|
-
####
|
|
2654
|
+
#### transformValue(value, settings)
|
|
2654
2655
|
|
|
2655
|
-
|
|
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
|
-
|
|
|
2665
|
-
|
|
|
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
|
-
-
|
|
2674
|
+
- A transformed value
|
|
2674
2675
|
|
|
2675
2676
|
|
|
2676
2677
|
|
|
2678
|
+
#### getOutputFormat(settings)
|
|
2677
2679
|
|
|
2678
|
-
|
|
2680
|
+
Gets the outputformat settings
|
|
2679
2681
|
|
|
2680
2682
|
|
|
2681
|
-
#### getDatasetColumns(qrveyid)
|
|
2682
2683
|
|
|
2683
|
-
|
|
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
|
-
|
|
|
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
|
-
-
|
|
2720
|
+
- the format config
|
|
2701
2721
|
|
|
2702
2722
|
|
|
2703
2723
|
|
|
2704
2724
|
|
|
2705
|
-
### dist/
|
|
2725
|
+
### dist/stencil/decorators/Config.js
|
|
2706
2726
|
|
|
2707
2727
|
|
|
2708
|
-
####
|
|
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
|
-
|
|
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
|
-
|
|
|
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/
|
|
2809
|
+
### dist/services/api/getAllDatasets.api.js
|
|
2733
2810
|
|
|
2734
2811
|
|
|
2735
|
-
####
|
|
2812
|
+
#### getAllDatasets(config, pickDatasets)
|
|
2736
2813
|
|
|
2737
|
-
|
|
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
|
-
|
|
|
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
|
-
-
|
|
2832
|
+
- a promise
|
|
2755
2833
|
|
|
2756
2834
|
|
|
2757
2835
|
|
|
2758
2836
|
|
|
2759
|
-
### dist/
|
|
2760
|
-
|
|
2837
|
+
### dist/services/api/getAllQrveys.api.js
|
|
2761
2838
|
|
|
2762
|
-
#### Config()
|
|
2763
2839
|
|
|
2764
|
-
|
|
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
|
-
|
|
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/
|
|
2865
|
+
### dist/services/api/getDatasetColumns.api.js
|
|
2793
2866
|
|
|
2794
2867
|
|
|
2795
|
-
####
|
|
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
|
-
-
|
|
2887
|
+
- a promise
|
|
2808
2888
|
|
|
2809
2889
|
|
|
2810
2890
|
|
|
2811
2891
|
|
|
2812
|
-
### dist/
|
|
2892
|
+
### dist/typescript/decorators/Debounce.js
|
|
2813
2893
|
|
|
2814
2894
|
|
|
2815
|
-
####
|
|
2895
|
+
#### Debounce(time)
|
|
2816
2896
|
|
|
2817
|
-
|
|
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
|
-
|
|
|
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/
|
|
3471
|
+
### dist/filters/helpers/common/getFilterColumnLabel.js
|
|
3369
3472
|
|
|
3370
3473
|
|
|
3371
|
-
####
|
|
3474
|
+
#### getFilterColumnLabel(column)
|
|
3372
3475
|
|
|
3373
|
-
|
|
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
|
-
|
|
|
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
|
-
-
|
|
3493
|
+
- an string with the property, aggregate or calculation label.
|
|
3391
3494
|
|
|
3392
3495
|
|
|
3393
3496
|
|
|
3394
3497
|
|
|
3395
|
-
### dist/filters/helpers/common/
|
|
3498
|
+
### dist/filters/helpers/common/getFilterLabel.js
|
|
3396
3499
|
|
|
3397
3500
|
|
|
3398
|
-
####
|
|
3501
|
+
#### getFilterLabel(filter)
|
|
3399
3502
|
|
|
3400
|
-
|
|
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
|
-
|
|
|
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
|
-
-
|
|
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/
|
|
3738
|
+
### dist/filters/helpers/common/getParamsToGetFilterSettings.js
|
|
3636
3739
|
|
|
3637
3740
|
|
|
3638
|
-
####
|
|
3741
|
+
#### getParamsToGetFilterSettings(settings)
|
|
3639
3742
|
|
|
3640
|
-
|
|
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
|
-
|
|
|
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
|
-
-
|
|
3760
|
+
- a new ParamsToGetFilter settings object.
|
|
3659
3761
|
|
|
3660
3762
|
|
|
3661
3763
|
|
|
3662
3764
|
|
|
3663
|
-
### dist/filters/helpers/common/
|
|
3765
|
+
### dist/filters/helpers/common/haveFiltersByDataset.js
|
|
3664
3766
|
|
|
3665
3767
|
|
|
3666
|
-
####
|
|
3768
|
+
#### haveFiltersByDataset(filterData, qrveyid)
|
|
3667
3769
|
|
|
3668
|
-
|
|
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
|
-
|
|
|
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
|
-
-
|
|
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/
|
|
3848
|
+
### dist/filters/helpers/common/isInValidator.js
|
|
3746
3849
|
|
|
3747
3850
|
|
|
3748
|
-
####
|
|
3851
|
+
#### isInValidator(validator)
|
|
3749
3852
|
|
|
3750
|
-
|
|
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
|
|
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
|
-
-
|
|
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/
|
|
3875
|
+
### dist/filters/helpers/common/isNullValidator.js
|
|
3773
3876
|
|
|
3774
3877
|
|
|
3775
|
-
####
|
|
3878
|
+
#### isNullValidator(validator)
|
|
3776
3879
|
|
|
3777
|
-
|
|
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
|
|
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
|
-
-
|
|
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,
|
|
@@ -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;
|