@qrvey/utils 1.2.9-14 → 1.2.9-15

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 CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-14*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-15*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -220,64 +220,6 @@ Transforms String Date from a [Year] format to Date object.
220
220
 
221
221
 
222
222
 
223
- ### dist/dates/range/getDateRange.js
224
-
225
-
226
- #### getDateRange(value, dateGroupLabel, withTime)
227
-
228
- Get date range object from a string date value
229
-
230
-
231
-
232
-
233
- ##### Parameters
234
-
235
- | Name | Type | Description | |
236
- | ---- | ---- | ----------- | -------- |
237
- | value | `String` | string date value |   |
238
- | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' |   |
239
- | withTime | `Boolean` | determines if the date range will include time. Default is true |   |
240
-
241
-
242
-
243
-
244
- ##### Examples
245
-
246
- ```javascript
247
- // 1) Year:
248
- getDateRange('2020', 'YEAR');
249
- // Will return:
250
- {
251
- from: '01/01/2020 00:00:00',
252
- to: '12/31/2020 23:59:59'
253
- }
254
-
255
- // 2) Quarter:
256
- getDateRange('Q3 2020', 'QUARTER');
257
- // Will return:
258
- {
259
- from: '07/01/2020 00:00:00',
260
- to: '09/30/2020 23:59:59'
261
- }
262
-
263
- // 3) Month:
264
- getDateRange('Oct 2020', 'MONTH');
265
- // Will return:
266
- {
267
- from: '10/01/2020 00:00:00',
268
- to: '10/31/2020 23:59:59'
269
- }
270
- ```
271
-
272
-
273
- ##### Returns
274
-
275
-
276
- - `Object` an object with the date range with two string date properties: from and to
277
-
278
-
279
-
280
-
281
223
  ### dist/dates/helpers/getDateByDateFormat.js
282
224
 
283
225
 
@@ -475,6 +417,64 @@ Validates the given string as Date by its date format.
475
417
 
476
418
 
477
419
 
420
+ ### dist/dates/range/getDateRange.js
421
+
422
+
423
+ #### getDateRange(value, dateGroupLabel, withTime)
424
+
425
+ Get date range object from a string date value
426
+
427
+
428
+
429
+
430
+ ##### Parameters
431
+
432
+ | Name | Type | Description | |
433
+ | ---- | ---- | ----------- | -------- |
434
+ | value | `String` | string date value |   |
435
+ | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' |   |
436
+ | withTime | `Boolean` | determines if the date range will include time. Default is true |   |
437
+
438
+
439
+
440
+
441
+ ##### Examples
442
+
443
+ ```javascript
444
+ // 1) Year:
445
+ getDateRange('2020', 'YEAR');
446
+ // Will return:
447
+ {
448
+ from: '01/01/2020 00:00:00',
449
+ to: '12/31/2020 23:59:59'
450
+ }
451
+
452
+ // 2) Quarter:
453
+ getDateRange('Q3 2020', 'QUARTER');
454
+ // Will return:
455
+ {
456
+ from: '07/01/2020 00:00:00',
457
+ to: '09/30/2020 23:59:59'
458
+ }
459
+
460
+ // 3) Month:
461
+ getDateRange('Oct 2020', 'MONTH');
462
+ // Will return:
463
+ {
464
+ from: '10/01/2020 00:00:00',
465
+ to: '10/31/2020 23:59:59'
466
+ }
467
+ ```
468
+
469
+
470
+ ##### Returns
471
+
472
+
473
+ - `Object` an object with the date range with two string date properties: from and to
474
+
475
+
476
+
477
+
478
478
  ### dist/dates/relative/Adapter.js
479
479
 
480
480
 
@@ -688,12 +688,12 @@ Output:
688
688
 
689
689
 
690
690
 
691
- ### dist/general/array/delete.js
691
+ ### dist/filters/adapters/FDToFlatUI.js
692
692
 
693
693
 
694
- #### ArrayDelete(array, index)
694
+ #### FDToFlatUI(filterData, datasetsInfo)
695
695
 
696
- Inmutable Array Item deletion
696
+ Generates a Flattened UI filter structure from Filter Data structure.
697
697
 
698
698
 
699
699
 
@@ -702,8 +702,8 @@ Inmutable Array Item deletion
702
702
 
703
703
  | Name | Type | Description | |
704
704
  | ---- | ---- | ----------- | -------- |
705
- | array | `Array` | a collection of items to delete |   |
706
- | index | `Number` | the position of the item to delete |   |
705
+ | filterData | | The filter data object. |   |
706
+ | datasetsInfo | | Collection of datasets information |   |
707
707
 
708
708
 
709
709
 
@@ -711,20 +711,13 @@ Inmutable Array Item deletion
711
711
  ##### Returns
712
712
 
713
713
 
714
- - a new Array or the given parameter when is empty or not an array
715
-
716
-
717
-
714
+ - a flattened UI filters array
718
715
 
719
- ### dist/general/array/filterNestedTree.js
720
716
 
721
717
 
722
- #### filterNestedTree(arr, childArrKey, condition)
718
+ #### FD21ToFlatUI(scopes, datasetsInfo)
723
719
 
724
- Filters a nested tree array by a custom condition on the last child node
725
- - If the given arguments are not valid, the function returns the first argument.
726
- - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
727
- - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
720
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
728
721
 
729
722
 
730
723
 
@@ -733,9 +726,8 @@ Filters a nested tree array by a custom condition on the last child node
733
726
 
734
727
  | Name | Type | Description | |
735
728
  | ---- | ---- | ----------- | -------- |
736
- | arr | | nested tree array |   |
737
- | childArrKey | | property representing the children array on the nested tree |   |
738
- | condition | | function callback that determines if the filter is applied on the last child node of the nested tree |   |
729
+ | scopes | | The filter scope section |   |
730
+ | datasetsInfo | | Collection of datasets information |   |
739
731
 
740
732
 
741
733
 
@@ -743,17 +735,17 @@ Filters a nested tree array by a custom condition on the last child node
743
735
  ##### Returns
744
736
 
745
737
 
746
- - array filtered
738
+ - a flattened UI filters array
747
739
 
748
740
 
749
741
 
750
742
 
751
- ### dist/general/array/flattenDeep.js
743
+ ### dist/filters/adapters/FDToLogic.js
752
744
 
753
745
 
754
- #### flattenDeep(arr)
746
+ #### FDToLogic(filterData)
755
747
 
756
- Flat deeply an array
748
+ Generates a Filter Logic structure from Filter Data structure.
757
749
 
758
750
 
759
751
 
@@ -762,7 +754,7 @@ Flat deeply an array
762
754
 
763
755
  | Name | Type | Description | |
764
756
  | ---- | ---- | ----------- | -------- |
765
- | arr | | Array to flat deeply |   |
757
+ | filterData | | The filter data object. |   |
766
758
 
767
759
 
768
760
 
@@ -770,17 +762,13 @@ Flat deeply an array
770
762
  ##### Returns
771
763
 
772
764
 
773
- - flatten array
774
-
775
-
776
-
765
+ - a filter logic array
777
766
 
778
- ### dist/general/array/getFirstIndexFromArray.js
779
767
 
780
768
 
781
- #### getFirstIndexFromArray(array, callback)
769
+ #### getLogicBodyFromFD21(filterData)
782
770
 
783
- Gets the first index from the array by a callback condition
771
+ Gets the logic body
784
772
 
785
773
 
786
774
 
@@ -789,8 +777,7 @@ Gets the first index from the array by a callback condition
789
777
 
790
778
  | Name | Type | Description | |
791
779
  | ---- | ---- | ----------- | -------- |
792
- | array | | |   |
793
- | callback | | function callback |   |
780
+ | filterData | | The filter data object |   |
794
781
 
795
782
 
796
783
 
@@ -798,17 +785,17 @@ Gets the first index from the array by a callback condition
798
785
  ##### Returns
799
786
 
800
787
 
801
- - the first index of the array. -1 when the condition is not satisfied
788
+ - a filter logic array
802
789
 
803
790
 
804
791
 
805
792
 
806
- ### dist/general/array/getLastIndexFromArray.js
793
+ ### dist/filters/adapters/FDToUI.js
807
794
 
808
795
 
809
- #### getLastIndexFromArray(array, callback)
796
+ #### FDToUI(filterData, datasetsInfo)
810
797
 
811
- Gets the last index from the array by a callback condition
798
+ Generates a UI filter structure from Filter Data structure.
812
799
 
813
800
 
814
801
 
@@ -817,8 +804,8 @@ Gets the last index from the array by a callback condition
817
804
 
818
805
  | Name | Type | Description | |
819
806
  | ---- | ---- | ----------- | -------- |
820
- | array | | |   |
821
- | callback | | function callback |   |
807
+ | filterData | | The filter data object. |   |
808
+ | datasetsInfo | | Collection of datasets information |   |
822
809
 
823
810
 
824
811
 
@@ -826,17 +813,13 @@ Gets the last index from the array by a callback condition
826
813
  ##### Returns
827
814
 
828
815
 
829
- - the last index of the array. -1 when the condition is not satisfied
830
-
831
-
832
-
816
+ - a UI Filters structure
833
817
 
834
- ### dist/general/function/debounce.js
835
818
 
836
819
 
837
- #### debounce(fn, time)
820
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
838
821
 
839
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
822
+ Generates a UI filter Structure from the Filter Data structure v2.1
840
823
 
841
824
 
842
825
 
@@ -845,8 +828,10 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
845
828
 
846
829
  | Name | Type | Description | |
847
830
  | ---- | ---- | ----------- | -------- |
848
- | fn | `Function` | original Function |   |
849
- | time | `Number` | default 500ms |   |
831
+ | scopes | | The filter scope section |   |
832
+ | section | | The filter section. |   |
833
+ | version | | The version of the filter structure |   |
834
+ | datasetsInfo | | Collection of datasets information |   |
850
835
 
851
836
 
852
837
 
@@ -854,17 +839,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
854
839
  ##### Returns
855
840
 
856
841
 
857
- - `Function` debounced functions
842
+ - a UI filter Structure
858
843
 
859
844
 
860
845
 
861
846
 
862
- ### dist/general/function/throttled.js
847
+ ### dist/filters/adapters/UIToFD.js
863
848
 
864
849
 
865
- #### throttled(fn, time)
850
+ #### UIToFD(filterData)
866
851
 
867
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
852
+ Generates a Filter Data Structure structure from UI Filter Data structure.
868
853
 
869
854
 
870
855
 
@@ -873,8 +858,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
873
858
 
874
859
  | Name | Type | Description | |
875
860
  | ---- | ---- | ----------- | -------- |
876
- | fn | `Function` | original Function |   |
877
- | time | `Number` | default 500ms |   |
861
+ | filterData | | The UI filter data object. |   |
878
862
 
879
863
 
880
864
 
@@ -882,18 +866,13 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
882
866
  ##### Returns
883
867
 
884
868
 
885
- - `Function` throttled function
886
-
887
-
888
-
869
+ - a Filter Data structure
889
870
 
890
- ### dist/general/mix/compareDeep.js
891
871
 
892
872
 
893
- #### compareDeep(object1, object2)
873
+ #### UI21ToFD(uFilterData, version)
894
874
 
895
- Compares two objects to know if they are equals. Go across nested objects.
896
- Includes arrays in the comparison.
875
+ Builds the Fitler Data structure from UI filter data
897
876
 
898
877
 
899
878
 
@@ -902,8 +881,8 @@ Includes arrays in the comparison.
902
881
 
903
882
  | Name | Type | Description | |
904
883
  | ---- | ---- | ----------- | -------- |
905
- | object1 | | First Object to compare |   |
906
- | object2 | | Second Object to compare |   |
884
+ | uFilterData | | The UI filter Data object |   |
885
+ | version | | the version of the structure |   |
907
886
 
908
887
 
909
888
 
@@ -911,17 +890,17 @@ Includes arrays in the comparison.
911
890
  ##### Returns
912
891
 
913
892
 
914
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
893
+ -
915
894
 
916
895
 
917
896
 
918
897
 
919
- ### dist/general/mix/getTag.js
898
+ ### dist/filters/adapters/UIToFlatUI.js
920
899
 
921
900
 
922
- #### getTag(value)
901
+ #### UIToFlatUI(filterData, datasetsInfo)
923
902
 
924
- Gets the `toStringTag` of `value`.
903
+ Generates a Flattened UI filter structure from UI Filter Data structure.
925
904
 
926
905
 
927
906
 
@@ -930,7 +909,8 @@ Gets the `toStringTag` of `value`.
930
909
 
931
910
  | Name | Type | Description | |
932
911
  | ---- | ---- | ----------- | -------- |
933
- | value | | The value to query. |   |
912
+ | filterData | | The UI filter data object. |   |
913
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
934
914
 
935
915
 
936
916
 
@@ -938,17 +918,13 @@ Gets the `toStringTag` of `value`.
938
918
  ##### Returns
939
919
 
940
920
 
941
- - `string` Returns the `toStringTag`.
942
-
943
-
944
-
921
+ - a flattened UI filters array
945
922
 
946
- ### dist/general/mix/importScripts.js
947
923
 
948
924
 
949
- #### importScripts(scripts)
925
+ #### UI21ToFlatUI(scopes)
950
926
 
951
- Import a set of external Scripts given the URL in both serie and cascade way
927
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
952
928
 
953
929
 
954
930
 
@@ -957,54 +933,26 @@ Import a set of external Scripts given the URL in both serie and cascade way
957
933
 
958
934
  | Name | Type | Description | |
959
935
  | ---- | ---- | ----------- | -------- |
960
- | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
961
- | scripts.url | `String` | CDN URL | &nbsp; |
962
- | scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | &nbsp; |
963
- | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
964
- | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
965
- | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
936
+ | scopes | | The filter scope section | &nbsp; |
966
937
 
967
938
 
968
939
 
969
940
 
970
- ##### Examples
941
+ ##### Returns
971
942
 
972
- ```javascript
973
- // 1) Simple script (paralell loading)
974
- importScripts(['http://myscript.js', 'http://another.js']);
975
-
976
- // 2) Loading `.js` and `.esm.js` script (parallel loading)
977
- importScripts([
978
- { url: 'http://myscript.esm.js', type: 'module' },
979
- { url: 'http://myscript.js', noModule: true }
980
- ]);
981
-
982
- // 3) import dependent scripts (cascade)
983
- importScripts([
984
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
985
- ]);
986
-
987
- // 4) mix
988
- importScripts([
989
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
990
- { url: 'http://another.esm.js', type: 'module' },
991
- { url: 'http://another.js', noModule: true },
992
- 'http://simplescript.js'
993
- ]);
994
- ```
995
943
 
944
+ - a flattened UI filters array
996
945
 
997
- ##### Returns
998
946
 
999
947
 
1000
- - `Promise` Promise when all script have been loaded
1001
948
 
949
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
1002
950
 
1003
951
 
1004
- #### loadScript(url, type, noModule)
952
+ #### adaptDateGroupingProperty(property)
1005
953
 
1006
- Creates the script element and appends to document.head
1007
- return a Promise that is resolved when the script is loaded
954
+ [TODO: For 2022, eliminate this adapter]
955
+ Get the new property base on the old date grouping properties
1008
956
 
1009
957
 
1010
958
 
@@ -1013,9 +961,7 @@ return a Promise that is resolved when the script is loaded
1013
961
 
1014
962
  | Name | Type | Description | |
1015
963
  | ---- | ---- | ----------- | -------- |
1016
- | url | `String` | Cdn Url | &nbsp; |
1017
- | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1018
- | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
964
+ | property | | | &nbsp; |
1019
965
 
1020
966
 
1021
967
 
@@ -1023,17 +969,17 @@ return a Promise that is resolved when the script is loaded
1023
969
  ##### Returns
1024
970
 
1025
971
 
1026
- - `Void`
972
+ -
1027
973
 
1028
974
 
1029
975
 
1030
976
 
1031
- ### dist/general/mix/isEmpty.js
977
+ ### dist/filters/adapters/adaptFilterData.js
1032
978
 
1033
979
 
1034
- #### isEmpty(variable, includeFalsy)
980
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1035
981
 
1036
- Validates if the given argument is empty
982
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1037
983
 
1038
984
 
1039
985
 
@@ -1042,8 +988,9 @@ Validates if the given argument is empty
1042
988
 
1043
989
  | Name | Type | Description | |
1044
990
  | ---- | ---- | ----------- | -------- |
1045
- | variable | | the given variable | &nbsp; |
1046
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
991
+ | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
992
+ | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
993
+ | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
1047
994
 
1048
995
 
1049
996
 
@@ -1051,19 +998,18 @@ Validates if the given argument is empty
1051
998
  ##### Returns
1052
999
 
1053
1000
 
1054
- - true: the given argument is empty; false: is not.
1001
+ - A new filter data structure v2.1
1055
1002
 
1056
1003
 
1057
1004
 
1058
1005
 
1059
- ### dist/general/mix/isNaNV2.js
1006
+ ### dist/filters/adapters/adaptFilterValues.js
1060
1007
 
1061
1008
 
1062
- #### isNaNV2(variable)
1009
+ #### adaptFilterValues(filter)
1063
1010
 
1064
- Validates if the recieved number is NaN type.
1065
- This function recieves any variable but will return false.
1066
- Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
1011
+ [TODO: For 2022, eliminate this adapter]
1012
+ Gets an adapted filter value array. Validates the enabled property and sets
1067
1013
 
1068
1014
 
1069
1015
 
@@ -1072,7 +1018,7 @@ Validates if variable is null, undefined, or an empty string, also, the function
1072
1018
 
1073
1019
  | Name | Type | Description | |
1074
1020
  | ---- | ---- | ----------- | -------- |
1075
- | variable | | the variable to validate | &nbsp; |
1021
+ | filter | | The filter | &nbsp; |
1076
1022
 
1077
1023
 
1078
1024
 
@@ -1080,18 +1026,17 @@ Validates if variable is null, undefined, or an empty string, also, the function
1080
1026
  ##### Returns
1081
1027
 
1082
1028
 
1083
- - True if variable is a NaN or false otherwise
1029
+ - A new value array with the filled properties.
1084
1030
 
1085
1031
 
1086
1032
 
1087
1033
 
1088
- ### dist/general/mix/isNull.js
1034
+ ### dist/filters/adapters/flatUIToFD.js
1089
1035
 
1090
1036
 
1091
- #### isNull(arg)
1037
+ #### flatUIToFD(uFilters, version)
1092
1038
 
1093
- return if a given variable is either `null` or `undefined`
1094
- useful to avoid falsify validating Number Zero (0)
1039
+ Generates a filter data structure from the flatttened UI filters.
1095
1040
 
1096
1041
 
1097
1042
 
@@ -1100,7 +1045,8 @@ useful to avoid falsify validating Number Zero (0)
1100
1045
 
1101
1046
  | Name | Type | Description | |
1102
1047
  | ---- | ---- | ----------- | -------- |
1103
- | arg | `any` | | &nbsp; |
1048
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
1049
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1104
1050
 
1105
1051
 
1106
1052
 
@@ -1108,19 +1054,14 @@ useful to avoid falsify validating Number Zero (0)
1108
1054
  ##### Returns
1109
1055
 
1110
1056
 
1111
- - `Boolean`
1112
-
1113
-
1114
-
1057
+ - a Filter Data.
1115
1058
 
1116
- ### dist/general/mix/randomId.js
1117
1059
 
1118
1060
 
1119
- #### randomId(length, exclude)
1061
+ #### buildScopes(fbFilters)
1120
1062
 
1121
- Creates a random string
1122
- - If the first given argument is different than a length number, the variable is replaced by a default number
1123
- - If the optional second given argument is passed the random string is permutated.
1063
+ Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1064
+ Also, adds and organizes filters by datasets
1124
1065
 
1125
1066
 
1126
1067
 
@@ -1129,8 +1070,7 @@ Creates a random string
1129
1070
 
1130
1071
  | Name | Type | Description | |
1131
1072
  | ---- | ---- | ----------- | -------- |
1132
- | length | `Number` | size of the generated string. Default 8 | &nbsp; |
1133
- | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
1073
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
1134
1074
 
1135
1075
 
1136
1076
 
@@ -1138,19 +1078,13 @@ Creates a random string
1138
1078
  ##### Returns
1139
1079
 
1140
1080
 
1141
- - `String` Random string
1142
-
1143
-
1144
-
1081
+ - an array of scopes structure.
1145
1082
 
1146
- ### dist/general/mix/size.js
1147
1083
 
1148
1084
 
1149
- #### size(obj)
1085
+ #### buildScope(uFilter)
1150
1086
 
1151
- Gets the length of the given array.
1152
- - Useful for Object, Array and string type.
1153
- - For `null` or `undefined` or else argument the returned value will be 0.
1087
+ Gets an scope structure for the filter data
1154
1088
 
1155
1089
 
1156
1090
 
@@ -1159,7 +1093,7 @@ Gets the length of the given array.
1159
1093
 
1160
1094
  | Name | Type | Description | |
1161
1095
  | ---- | ---- | ----------- | -------- |
1162
- | obj | `Any` | Any object-type variable | &nbsp; |
1096
+ | uFilter | | UI structure filter | &nbsp; |
1163
1097
 
1164
1098
 
1165
1099
 
@@ -1167,18 +1101,13 @@ Gets the length of the given array.
1167
1101
  ##### Returns
1168
1102
 
1169
1103
 
1170
- - `Number` the size of the given variable
1171
-
1172
-
1173
-
1104
+ - an scope structure
1174
1105
 
1175
- ### dist/general/object/cloneDeep.js
1176
1106
 
1177
1107
 
1178
- #### cloneDeep(obj)
1108
+ #### buildDataset(uFilter)
1179
1109
 
1180
- A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
1181
- Not to use this function with inner objects and functions
1110
+ Gets an dataset structure for the filter data
1182
1111
 
1183
1112
 
1184
1113
 
@@ -1187,7 +1116,7 @@ Not to use this function with inner objects and functions
1187
1116
 
1188
1117
  | Name | Type | Description | |
1189
1118
  | ---- | ---- | ----------- | -------- |
1190
- | obj | | The object | &nbsp; |
1119
+ | uFilter | | a UI structure filter | &nbsp; |
1191
1120
 
1192
1121
 
1193
1122
 
@@ -1195,21 +1124,13 @@ Not to use this function with inner objects and functions
1195
1124
  ##### Returns
1196
1125
 
1197
1126
 
1198
- - The new reference object or the given object if the parsing is incorrect or empty
1199
-
1200
-
1201
-
1202
-
1203
- ### dist/general/object/get.js
1127
+ - an dataset structure
1204
1128
 
1205
1129
 
1206
- #### _get(baseObject, path, defaultValue)
1207
1130
 
1208
- Like lodash _.get.
1209
- Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
1131
+ #### buildFilter(uFilter)
1210
1132
 
1211
- Empty arrays and empty objects are returned but the defaultValue is not
1212
- Undefined and null values will return the defaultValue.
1133
+ Gets an filter structure for the filter data
1213
1134
 
1214
1135
 
1215
1136
 
@@ -1218,59 +1139,25 @@ Undefined and null values will return the defaultValue.
1218
1139
 
1219
1140
  | Name | Type | Description | |
1220
1141
  | ---- | ---- | ----------- | -------- |
1221
- | baseObject | | The object to query | &nbsp; |
1222
- | path | | The string path or collection of string paths of the property to get. | &nbsp; |
1223
- | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
1224
-
1225
-
1226
-
1142
+ | uFilter | | a UI structure filter | &nbsp; |
1227
1143
 
1228
- ##### Examples
1229
1144
 
1230
- ```javascript
1231
- // returns 'Hello'
1232
- _get({ item1: 'Hello', item2: 'World' }, 'item1')
1233
- ```
1234
- ```javascript
1235
- // returns 'A simple Hello'
1236
- _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
1237
- ```
1238
- ```javascript
1239
- // returns 'Hello Again'
1240
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
1241
- ```
1242
- ```javascript
1243
- // returns 'Hello 2'
1244
- _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
1245
- ```
1246
- ```javascript
1247
- // returns 'Hello Again'
1248
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
1249
- ```
1250
1145
 
1251
1146
 
1252
1147
  ##### Returns
1253
1148
 
1254
1149
 
1255
- - the resolved value.
1150
+ - an filter structure
1256
1151
 
1257
1152
 
1258
1153
 
1259
1154
 
1260
- ### dist/general/object/getAttribute.js
1155
+ ### dist/filters/adapters/flatUIToLogic.js
1261
1156
 
1262
1157
 
1263
- #### getAttribute(obj, key)
1158
+ #### flatUIToLogic(uFilter)
1264
1159
 
1265
- Searchs for properties in different case styles such as: lower, upper, camel and pascal
1266
- - To optimize the searching, it is required a key in a snake_case style
1267
- - List of cases that do not match
1268
- -- From lower to snake case
1269
- -- From upper to snake case
1270
- -- From lower to camel case
1271
- -- From upper to camel case
1272
- -- From lower to pascal case
1273
- -- From upper to pascal case
1160
+ Generates a Logic structure from flattened UI filters
1274
1161
 
1275
1162
 
1276
1163
 
@@ -1279,33 +1166,25 @@ Searchs for properties in different case styles such as: lower, upper, camel and
1279
1166
 
1280
1167
  | Name | Type | Description | |
1281
1168
  | ---- | ---- | ----------- | -------- |
1282
- | obj | `object` | object to look for | &nbsp; |
1283
- | key | `string` | String attribute in snake_case style | &nbsp; |
1284
-
1285
-
1286
-
1169
+ | uFilter | | Array of flat filters from UI | &nbsp; |
1287
1170
 
1288
- ##### Examples
1289
1171
 
1290
- ```javascript
1291
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
1292
- ```
1293
1172
 
1294
1173
 
1295
1174
  ##### Returns
1296
1175
 
1297
1176
 
1298
- - `Void`
1177
+ - The logic structure
1299
1178
 
1300
1179
 
1301
1180
 
1302
1181
 
1303
- ### dist/general/object/hasProperty.js
1182
+ ### dist/filters/adapters/flatUIToOldLogic.js
1304
1183
 
1305
1184
 
1306
- #### _hasProperty(obj, property)
1185
+ #### flatUIToOldLogic(uFilters)
1307
1186
 
1308
- Use the hasOwnProperty in order to verify if the given property exists in the object.
1187
+ Generates a Logic structure from flattened UI filters
1309
1188
 
1310
1189
 
1311
1190
 
@@ -1314,38 +1193,25 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
1314
1193
 
1315
1194
  | Name | Type | Description | |
1316
1195
  | ---- | ---- | ----------- | -------- |
1317
- | obj | `object` | an object | &nbsp; |
1318
- | property | `string` | String to verify if exists in the object as property | &nbsp; |
1319
-
1320
-
1321
-
1322
-
1323
- ##### Examples
1196
+ | uFilters | | Array of flat filters from UI | &nbsp; |
1324
1197
 
1325
- ```javascript
1326
- const prop = 'prop2'
1327
- const obj1 = { prop1: 'hello', prop2: 'world'}
1328
- _hasProperty(ob1, prop1) // true
1329
1198
 
1330
- const obj2 = { prop1: 'hello world' }
1331
- _hasProperty(ob1, prop2) // false
1332
- ```
1333
1199
 
1334
1200
 
1335
1201
  ##### Returns
1336
1202
 
1337
1203
 
1338
- - True if the object has the given property; otherwise, false.
1204
+ - The logic structure
1339
1205
 
1340
1206
 
1341
1207
 
1342
1208
 
1343
- ### dist/general/object/isObject.js
1209
+ ### dist/filters/adapters/flatUIToUI.js
1344
1210
 
1345
1211
 
1346
- #### isObject(obj)
1212
+ #### flatUIToUI(uFilters, version)
1347
1213
 
1348
- Checks if the given argument is an object type
1214
+ Generates a UI filter data structure from the flatttened UI filters.
1349
1215
 
1350
1216
 
1351
1217
 
@@ -1354,7 +1220,8 @@ Checks if the given argument is an object type
1354
1220
 
1355
1221
  | Name | Type | Description | |
1356
1222
  | ---- | ---- | ----------- | -------- |
1357
- | obj | | the variable to check | &nbsp; |
1223
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1358
1225
 
1359
1226
 
1360
1227
 
@@ -1362,18 +1229,14 @@ Checks if the given argument is an object type
1362
1229
  ##### Returns
1363
1230
 
1364
1231
 
1365
- - True: It is an object; False: It is not.
1366
-
1367
-
1368
-
1232
+ - a UI Filter Data.
1369
1233
 
1370
- ### dist/general/object/mapValues.js
1371
1234
 
1372
1235
 
1373
- #### mapValues(baseObject, iteratee)
1236
+ #### buildScopes(fbFilters)
1374
1237
 
1375
- Invoke iteratee (function) for each object key-value pair
1376
- and return a mapped object
1238
+ Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
1239
+ Also, adds and organizes filters by datasets
1377
1240
 
1378
1241
 
1379
1242
 
@@ -1382,8 +1245,7 @@ and return a mapped object
1382
1245
 
1383
1246
  | Name | Type | Description | |
1384
1247
  | ---- | ---- | ----------- | -------- |
1385
- | baseObject | `Object` | Base object. | &nbsp; |
1386
- | iteratee | `Function` | The executed per iteration. | &nbsp; |
1248
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
1387
1249
 
1388
1250
 
1389
1251
 
@@ -1391,18 +1253,13 @@ and return a mapped object
1391
1253
  ##### Returns
1392
1254
 
1393
1255
 
1394
- - `Object` New mapped object.
1395
-
1396
-
1397
-
1256
+ - an array of scopes structure.
1398
1257
 
1399
- ### dist/general/object/mergeDeep.js
1400
1258
 
1401
1259
 
1402
- #### mergeDeep(obj1, obj2, settings)
1260
+ #### buildScope(uFilter)
1403
1261
 
1404
- Merges two objects into a new one.
1405
- The second given argument to the first given argument.
1262
+ Gets an scope structure for the UI filter data
1406
1263
 
1407
1264
 
1408
1265
 
@@ -1411,9 +1268,7 @@ The second given argument to the first given argument.
1411
1268
 
1412
1269
  | Name | Type | Description | |
1413
1270
  | ---- | ---- | ----------- | -------- |
1414
- | obj1 | | The target object | &nbsp; |
1415
- | obj2 | | The object to be merged | &nbsp; |
1416
- | settings | | Object settings for this function | &nbsp; |
1271
+ | uFilter | | UI structure filter | &nbsp; |
1417
1272
 
1418
1273
 
1419
1274
 
@@ -1421,13 +1276,13 @@ The second given argument to the first given argument.
1421
1276
  ##### Returns
1422
1277
 
1423
1278
 
1424
- - a new merged object
1279
+ - an scope structure
1425
1280
 
1426
1281
 
1427
1282
 
1428
- #### isValid(obj1, obj2)
1283
+ #### buildDataset(uFilter)
1429
1284
 
1430
- Validates if the two arguments are objects
1285
+ Gets an dataset structure for the UI filter data
1431
1286
 
1432
1287
 
1433
1288
 
@@ -1436,8 +1291,7 @@ Validates if the two arguments are objects
1436
1291
 
1437
1292
  | Name | Type | Description | |
1438
1293
  | ---- | ---- | ----------- | -------- |
1439
- | obj1 | | The target object | &nbsp; |
1440
- | obj2 | | The object to be merged | &nbsp; |
1294
+ | uFilter | | a UI structure filter | &nbsp; |
1441
1295
 
1442
1296
 
1443
1297
 
@@ -1445,13 +1299,13 @@ Validates if the two arguments are objects
1445
1299
  ##### Returns
1446
1300
 
1447
1301
 
1448
- - true: they are valid; false: they are not
1302
+ - an dataset structure
1449
1303
 
1450
1304
 
1451
1305
 
1452
- #### getParamsToMergeDeep(settings)
1306
+ #### buildFilter(uFilter)
1453
1307
 
1454
- Validates and gets the settings with all set parameters.
1308
+ Gets an filter structure for the UI filter data
1455
1309
 
1456
1310
 
1457
1311
 
@@ -1460,7 +1314,7 @@ Validates and gets the settings with all set parameters.
1460
1314
 
1461
1315
  | Name | Type | Description | |
1462
1316
  | ---- | ---- | ----------- | -------- |
1463
- | settings | | the settings object | &nbsp; |
1317
+ | uFilter | | a UI structure filter | &nbsp; |
1464
1318
 
1465
1319
 
1466
1320
 
@@ -1468,17 +1322,17 @@ Validates and gets the settings with all set parameters.
1468
1322
  ##### Returns
1469
1323
 
1470
1324
 
1471
- - a new settings object with all set parameters.
1325
+ - an filter structure
1472
1326
 
1473
1327
 
1474
1328
 
1475
1329
 
1476
- ### dist/general/object/objectCopy.js
1330
+ ### dist/filters/adapters/logicToFD.js
1477
1331
 
1478
1332
 
1479
- #### objectCopy(entity, cache)
1333
+ #### logicToFD(filterData, version)
1480
1334
 
1481
- Created a new reference of the given argument
1335
+ Generates a filter data structure from the old logic structure (v2.0).
1482
1336
 
1483
1337
 
1484
1338
 
@@ -1487,8 +1341,8 @@ Created a new reference of the given argument
1487
1341
 
1488
1342
  | Name | Type | Description | |
1489
1343
  | ---- | ---- | ----------- | -------- |
1490
- | entity | | The variable to be copied | &nbsp; |
1491
- | cache | | | &nbsp; |
1344
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1492
1346
 
1493
1347
 
1494
1348
 
@@ -1496,17 +1350,17 @@ Created a new reference of the given argument
1496
1350
  ##### Returns
1497
1351
 
1498
1352
 
1499
- - A new reference of the given argument
1353
+ - a Filter Data.
1500
1354
 
1501
1355
 
1502
1356
 
1503
1357
 
1504
- ### dist/general/object/omit.js
1358
+ ### dist/filters/adapters/logicToFlatUI.js
1505
1359
 
1506
1360
 
1507
- #### omit(obj, props)
1361
+ #### logicToFlatUI(logics)
1508
1362
 
1509
- return a new Object excluding attributes in _props_ list
1363
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1510
1364
 
1511
1365
 
1512
1366
 
@@ -1515,8 +1369,7 @@ return a new Object excluding attributes in _props_ list
1515
1369
 
1516
1370
  | Name | Type | Description | |
1517
1371
  | ---- | ---- | ----------- | -------- |
1518
- | obj | `Object` | base object | &nbsp; |
1519
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
1372
+ | logics | | The old logic structure (v2.0) | &nbsp; |
1520
1373
 
1521
1374
 
1522
1375
 
@@ -1524,17 +1377,13 @@ return a new Object excluding attributes in _props_ list
1524
1377
  ##### Returns
1525
1378
 
1526
1379
 
1527
- - `Object` clean object
1528
-
1529
-
1530
-
1380
+ - The Flattened UI Filters array
1531
1381
 
1532
- ### dist/general/object/pick.js
1533
1382
 
1534
1383
 
1535
- #### pick(baseObject, keys)
1384
+ #### getFilter(filters, filter, getIndex)
1536
1385
 
1537
- return a new object just with attributes in _keys_ list
1386
+ Get the filter or the index of the given array, validating an old filter structure.
1538
1387
 
1539
1388
 
1540
1389
 
@@ -1543,8 +1392,9 @@ return a new object just with attributes in _keys_ list
1543
1392
 
1544
1393
  | Name | Type | Description | |
1545
1394
  | ---- | ---- | ----------- | -------- |
1546
- | baseObject | `Object` | base object | &nbsp; |
1547
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
1395
+ | filters | | The array of UI filters | &nbsp; |
1396
+ | filter | | The old logic structure filter | &nbsp; |
1397
+ | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
1548
1398
 
1549
1399
 
1550
1400
 
@@ -1552,17 +1402,13 @@ return a new object just with attributes in _keys_ list
1552
1402
  ##### Returns
1553
1403
 
1554
1404
 
1555
- - `Object` new object just with desired attributes
1556
-
1557
-
1558
-
1405
+ - the index or the UI filter object
1559
1406
 
1560
- ### dist/general/object/serialize.js
1561
1407
 
1562
1408
 
1563
- #### serialize(obj)
1409
+ #### refineRankingValues(values, uiValues)
1564
1410
 
1565
- serialize object to url param
1411
+ Refines the values of the Ranking column type.
1566
1412
 
1567
1413
 
1568
1414
 
@@ -1571,7 +1417,8 @@ serialize object to url param
1571
1417
 
1572
1418
  | Name | Type | Description | |
1573
1419
  | ---- | ---- | ----------- | -------- |
1574
- | obj | | - Object to be serialized | &nbsp; |
1420
+ | values | | the Array of Ranking values | &nbsp; |
1421
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1575
1422
 
1576
1423
 
1577
1424
 
@@ -1579,17 +1426,17 @@ serialize object to url param
1579
1426
  ##### Returns
1580
1427
 
1581
1428
 
1582
- - `Void`
1429
+ - the array of Ranking values
1583
1430
 
1584
1431
 
1585
1432
 
1586
1433
 
1587
- ### dist/general/string/capitalize.js
1434
+ ### dist/filters/adapters/logicToUI.js
1588
1435
 
1589
1436
 
1590
- #### capitalize(text)
1437
+ #### logicToUI(uFilters, datasetsInfo)
1591
1438
 
1592
- Upper case the first letter of a given text
1439
+ Generates a UI filter structure from the old logic structure (v2.0).
1593
1440
 
1594
1441
 
1595
1442
 
@@ -1598,7 +1445,8 @@ Upper case the first letter of a given text
1598
1445
 
1599
1446
  | Name | Type | Description | |
1600
1447
  | ---- | ---- | ----------- | -------- |
1601
- | text | `String` | | &nbsp; |
1448
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1602
1450
 
1603
1451
 
1604
1452
 
@@ -1606,17 +1454,17 @@ Upper case the first letter of a given text
1606
1454
  ##### Returns
1607
1455
 
1608
1456
 
1609
- - `String` a capitalized text
1457
+ - a UI Filter Data.
1610
1458
 
1611
1459
 
1612
1460
 
1613
1461
 
1614
- ### dist/filters/adapters/FDToLogic.js
1462
+ ### dist/filters/adapters/transformFilters.js
1615
1463
 
1616
1464
 
1617
- #### FDToLogic(filterData)
1465
+ #### transformFilters(oldFiltersObj, section)
1618
1466
 
1619
- Generates a Filter Logic structure from Filter Data structure.
1467
+ Transform the old filters structure into the new one
1620
1468
 
1621
1469
 
1622
1470
 
@@ -1625,30 +1473,79 @@ Generates a Filter Logic structure from Filter Data structure.
1625
1473
 
1626
1474
  | Name | Type | Description | |
1627
1475
  | ---- | ---- | ----------- | -------- |
1628
- | filterData | | The filter data object. | &nbsp; |
1476
+ | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
1477
+ | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
1478
+
1629
1479
 
1630
1480
 
1631
1481
 
1482
+ ##### Examples
1483
+
1484
+ ```javascript
1485
+
1486
+ const oldPreferenceFilters = {
1487
+ "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1488
+ "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1489
+ "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1490
+ "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1491
+ "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1492
+ "formulaId": null,
1493
+ "panelId": null,
1494
+ "values": [
1495
+ {
1496
+ "EQUALS": [
1497
+ {
1498
+ "id": "AK4M8UV2a0",
1499
+ "value": "A",
1500
+ "enabled": true,
1501
+ "imageUrl": null
1502
+ },
1503
+ {
1504
+ "id": "AK4M8UV2a1",
1505
+ "value": "B",
1506
+ "enabled": true,
1507
+ "imageUrl": null
1508
+ }
1509
+ ]
1510
+ }
1511
+ ],
1512
+ "bucketId": null,
1513
+ "text": "MC",
1514
+ "title": "MC",
1515
+ "type": "SINGLE_CHOICE",
1516
+ "qid": "AK4M8UV2",
1517
+ "dataset": {
1518
+ "sourceid": "xYOQAdpqT",
1519
+ "name": "Form All Questions",
1520
+ "qrveyid": "xYOQAdpqT",
1521
+ "text": "Form All Questions",
1522
+ "linkid": 0
1523
+ },
1524
+ "enabled": true,
1525
+ "linked": null
1526
+ }
1527
+ };
1528
+
1529
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
+ ```
1531
+
1632
1532
 
1633
1533
  ##### Returns
1634
1534
 
1635
1535
 
1636
- - a filter logic array
1536
+ - `Object` an object with the new filters structure
1637
1537
 
1638
1538
 
1639
1539
 
1640
- #### getLogicBodyFromFD21(filterData)
1641
1540
 
1642
- Gets the logic body
1541
+ ### dist/filters/classes/FilterInputErrorHandler.js
1542
+
1643
1543
 
1544
+ #### new FilterInputErrorHandler()
1644
1545
 
1645
1546
 
1646
1547
 
1647
- ##### Parameters
1648
1548
 
1649
- | Name | Type | Description | |
1650
- | ---- | ---- | ----------- | -------- |
1651
- | filterData | | The filter data object | &nbsp; |
1652
1549
 
1653
1550
 
1654
1551
 
@@ -1656,17 +1553,17 @@ Gets the logic body
1656
1553
  ##### Returns
1657
1554
 
1658
1555
 
1659
- - a filter logic array
1556
+ - `Void`
1660
1557
 
1661
1558
 
1662
1559
 
1663
1560
 
1664
- ### dist/filters/adapters/FDToFlatUI.js
1561
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
1665
1562
 
1666
1563
 
1667
- #### FDToFlatUI(filterData, datasetsInfo)
1564
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1668
1565
 
1669
- Generates a Flattened UI filter structure from Filter Data structure.
1566
+ [TODO: Make a proper description for this function]
1670
1567
 
1671
1568
 
1672
1569
 
@@ -1675,8 +1572,9 @@ Generates a Flattened UI filter structure from Filter Data structure.
1675
1572
 
1676
1573
  | Name | Type | Description | |
1677
1574
  | ---- | ---- | ----------- | -------- |
1678
- | filterData | | The filter data object. | &nbsp; |
1679
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1575
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
+ | scopes | | | &nbsp; |
1577
+ | currentScope | | | &nbsp; |
1680
1578
 
1681
1579
 
1682
1580
 
@@ -1684,13 +1582,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
1684
1582
  ##### Returns
1685
1583
 
1686
1584
 
1687
- - a flattened UI filters array
1585
+ -
1688
1586
 
1689
1587
 
1690
1588
 
1691
- #### FD21ToFlatUI(scopes, datasetsInfo)
1692
1589
 
1693
- Generates a Filter Builder Structure from the Filter Data structure v2.1
1590
+ ### dist/filters/helpers/getAvailableScopes.js
1591
+
1592
+
1593
+ #### getAvailableScopes(config)
1594
+
1595
+ Gets Scopes/Scope IDs by given IDs
1694
1596
 
1695
1597
 
1696
1598
 
@@ -1699,8 +1601,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
1699
1601
 
1700
1602
  | Name | Type | Description | |
1701
1603
  | ---- | ---- | ----------- | -------- |
1702
- | scopes | | The filter scope section | &nbsp; |
1703
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1604
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
1704
1605
 
1705
1606
 
1706
1607
 
@@ -1708,17 +1609,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
1708
1609
  ##### Returns
1709
1610
 
1710
1611
 
1711
- - a flattened UI filters array
1612
+ - a Scopes/Scope IDs array
1712
1613
 
1713
1614
 
1714
1615
 
1715
1616
 
1716
- ### dist/filters/adapters/FDToUI.js
1617
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1717
1618
 
1718
1619
 
1719
- #### FDToUI(filterData, datasetsInfo)
1620
+ #### getAvailableScopesIDsByConfig(config)
1720
1621
 
1721
- Generates a UI filter structure from Filter Data structure.
1622
+ Gets the Scopes IDS for the Available Scope function by any config
1722
1623
 
1723
1624
 
1724
1625
 
@@ -1727,8 +1628,7 @@ Generates a UI filter structure from Filter Data structure.
1727
1628
 
1728
1629
  | Name | Type | Description | |
1729
1630
  | ---- | ---- | ----------- | -------- |
1730
- | filterData | | The filter data object. | &nbsp; |
1731
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1631
+ | config | | any config | &nbsp; |
1732
1632
 
1733
1633
 
1734
1634
 
@@ -1736,13 +1636,17 @@ Generates a UI filter structure from Filter Data structure.
1736
1636
  ##### Returns
1737
1637
 
1738
1638
 
1739
- - a UI Filters structure
1639
+ - a Available Scope IDS config
1740
1640
 
1741
1641
 
1742
1642
 
1743
- #### FD21ToUI(scopes, section, version, datasetsInfo)
1744
1643
 
1745
- Generates a UI filter Structure from the Filter Data structure v2.1
1644
+ ### dist/filters/helpers/getScopesByHierarchy.js
1645
+
1646
+
1647
+ #### getScopesByHierarchy(scopes, currentScope)
1648
+
1649
+ [TODO: Make a description for this]
1746
1650
 
1747
1651
 
1748
1652
 
@@ -1751,10 +1655,8 @@ Generates a UI filter Structure from the Filter Data structure v2.1
1751
1655
 
1752
1656
  | Name | Type | Description | |
1753
1657
  | ---- | ---- | ----------- | -------- |
1754
- | scopes | | The filter scope section | &nbsp; |
1755
- | section | | The filter section. | &nbsp; |
1756
- | version | | The version of the filter structure | &nbsp; |
1757
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1658
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
+ | currentScope | | Current scope type | &nbsp; |
1758
1660
 
1759
1661
 
1760
1662
 
@@ -1762,17 +1664,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
1762
1664
  ##### Returns
1763
1665
 
1764
1666
 
1765
- - a UI filter Structure
1667
+ - A new array of Scopes/Scope IDs
1766
1668
 
1767
1669
 
1768
1670
 
1769
1671
 
1770
- ### dist/filters/adapters/UIToFD.js
1672
+ ### dist/general/array/delete.js
1771
1673
 
1772
1674
 
1773
- #### UIToFD(filterData)
1675
+ #### ArrayDelete(array, index)
1774
1676
 
1775
- Generates a Filter Data Structure structure from UI Filter Data structure.
1677
+ Inmutable Array Item deletion
1776
1678
 
1777
1679
 
1778
1680
 
@@ -1781,7 +1683,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
1781
1683
 
1782
1684
  | Name | Type | Description | |
1783
1685
  | ---- | ---- | ----------- | -------- |
1784
- | filterData | | The UI filter data object. | &nbsp; |
1686
+ | array | `Array` | a collection of items to delete | &nbsp; |
1687
+ | index | `Number` | the position of the item to delete | &nbsp; |
1785
1688
 
1786
1689
 
1787
1690
 
@@ -1789,13 +1692,20 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
1789
1692
  ##### Returns
1790
1693
 
1791
1694
 
1792
- - a Filter Data structure
1695
+ - a new Array or the given parameter when is empty or not an array
1793
1696
 
1794
1697
 
1795
1698
 
1796
- #### UI21ToFD(uFilterData, version)
1797
1699
 
1798
- Builds the Fitler Data structure from UI filter data
1700
+ ### dist/general/array/filterNestedTree.js
1701
+
1702
+
1703
+ #### filterNestedTree(arr, childArrKey, condition)
1704
+
1705
+ Filters a nested tree array by a custom condition on the last child node
1706
+ - If the given arguments are not valid, the function returns the first argument.
1707
+ - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
1708
+ - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
1799
1709
 
1800
1710
 
1801
1711
 
@@ -1804,8 +1714,9 @@ Builds the Fitler Data structure from UI filter data
1804
1714
 
1805
1715
  | Name | Type | Description | |
1806
1716
  | ---- | ---- | ----------- | -------- |
1807
- | uFilterData | | The UI filter Data object | &nbsp; |
1808
- | version | | the version of the structure | &nbsp; |
1717
+ | arr | | nested tree array | &nbsp; |
1718
+ | childArrKey | | property representing the children array on the nested tree | &nbsp; |
1719
+ | condition | | function callback that determines if the filter is applied on the last child node of the nested tree | &nbsp; |
1809
1720
 
1810
1721
 
1811
1722
 
@@ -1813,17 +1724,17 @@ Builds the Fitler Data structure from UI filter data
1813
1724
  ##### Returns
1814
1725
 
1815
1726
 
1816
- -
1727
+ - array filtered
1817
1728
 
1818
1729
 
1819
1730
 
1820
1731
 
1821
- ### dist/filters/adapters/UIToFlatUI.js
1732
+ ### dist/general/array/flattenDeep.js
1822
1733
 
1823
1734
 
1824
- #### UIToFlatUI(filterData, datasetsInfo)
1735
+ #### flattenDeep(arr)
1825
1736
 
1826
- Generates a Flattened UI filter structure from UI Filter Data structure.
1737
+ Flat deeply an array
1827
1738
 
1828
1739
 
1829
1740
 
@@ -1832,8 +1743,7 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
1832
1743
 
1833
1744
  | Name | Type | Description | |
1834
1745
  | ---- | ---- | ----------- | -------- |
1835
- | filterData | | The UI filter data object. | &nbsp; |
1836
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
1746
+ | arr | | Array to flat deeply | &nbsp; |
1837
1747
 
1838
1748
 
1839
1749
 
@@ -1841,13 +1751,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
1841
1751
  ##### Returns
1842
1752
 
1843
1753
 
1844
- - a flattened UI filters array
1754
+ - flatten array
1845
1755
 
1846
1756
 
1847
1757
 
1848
- #### UI21ToFlatUI(scopes)
1849
1758
 
1850
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1759
+ ### dist/general/array/getFirstIndexFromArray.js
1760
+
1761
+
1762
+ #### getFirstIndexFromArray(array, callback)
1763
+
1764
+ Gets the first index from the array by a callback condition
1851
1765
 
1852
1766
 
1853
1767
 
@@ -1856,7 +1770,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1856
1770
 
1857
1771
  | Name | Type | Description | |
1858
1772
  | ---- | ---- | ----------- | -------- |
1859
- | scopes | | The filter scope section | &nbsp; |
1773
+ | array | | | &nbsp; |
1774
+ | callback | | function callback | &nbsp; |
1860
1775
 
1861
1776
 
1862
1777
 
@@ -1864,18 +1779,17 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1864
1779
  ##### Returns
1865
1780
 
1866
1781
 
1867
- - a flattened UI filters array
1782
+ - the first index of the array. -1 when the condition is not satisfied
1868
1783
 
1869
1784
 
1870
1785
 
1871
1786
 
1872
- ### dist/filters/adapters/adaptDateGroupingProperty.js
1787
+ ### dist/general/array/getLastIndexFromArray.js
1873
1788
 
1874
1789
 
1875
- #### adaptDateGroupingProperty(property)
1790
+ #### getLastIndexFromArray(array, callback)
1876
1791
 
1877
- [TODO: For 2022, eliminate this adapter]
1878
- Get the new property base on the old date grouping properties
1792
+ Gets the last index from the array by a callback condition
1879
1793
 
1880
1794
 
1881
1795
 
@@ -1884,7 +1798,8 @@ Get the new property base on the old date grouping properties
1884
1798
 
1885
1799
  | Name | Type | Description | |
1886
1800
  | ---- | ---- | ----------- | -------- |
1887
- | property | | | &nbsp; |
1801
+ | array | | | &nbsp; |
1802
+ | callback | | function callback | &nbsp; |
1888
1803
 
1889
1804
 
1890
1805
 
@@ -1892,17 +1807,17 @@ Get the new property base on the old date grouping properties
1892
1807
  ##### Returns
1893
1808
 
1894
1809
 
1895
- -
1810
+ - the last index of the array. -1 when the condition is not satisfied
1896
1811
 
1897
1812
 
1898
1813
 
1899
1814
 
1900
- ### dist/filters/adapters/adaptFilterData.js
1815
+ ### dist/general/function/debounce.js
1901
1816
 
1902
1817
 
1903
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1818
+ #### debounce(fn, time)
1904
1819
 
1905
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
1820
+ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1906
1821
 
1907
1822
 
1908
1823
 
@@ -1911,9 +1826,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1911
1826
 
1912
1827
  | Name | Type | Description | |
1913
1828
  | ---- | ---- | ----------- | -------- |
1914
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
1915
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
1916
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
1829
+ | fn | `Function` | original Function | &nbsp; |
1830
+ | time | `Number` | default 500ms | &nbsp; |
1917
1831
 
1918
1832
 
1919
1833
 
@@ -1921,18 +1835,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1921
1835
  ##### Returns
1922
1836
 
1923
1837
 
1924
- - A new filter data structure v2.1
1838
+ - `Function` debounced functions
1925
1839
 
1926
1840
 
1927
1841
 
1928
1842
 
1929
- ### dist/filters/adapters/adaptFilterValues.js
1843
+ ### dist/general/function/throttled.js
1930
1844
 
1931
1845
 
1932
- #### adaptFilterValues(filter)
1846
+ #### throttled(fn, time)
1933
1847
 
1934
- [TODO: For 2022, eliminate this adapter]
1935
- Gets an adapted filter value array. Validates the enabled property and sets
1848
+ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1936
1849
 
1937
1850
 
1938
1851
 
@@ -1941,7 +1854,8 @@ Gets an adapted filter value array. Validates the enabled property and sets
1941
1854
 
1942
1855
  | Name | Type | Description | |
1943
1856
  | ---- | ---- | ----------- | -------- |
1944
- | filter | | The filter | &nbsp; |
1857
+ | fn | `Function` | original Function | &nbsp; |
1858
+ | time | `Number` | default 500ms | &nbsp; |
1945
1859
 
1946
1860
 
1947
1861
 
@@ -1949,17 +1863,18 @@ Gets an adapted filter value array. Validates the enabled property and sets
1949
1863
  ##### Returns
1950
1864
 
1951
1865
 
1952
- - A new value array with the filled properties.
1866
+ - `Function` throttled function
1953
1867
 
1954
1868
 
1955
1869
 
1956
1870
 
1957
- ### dist/filters/adapters/flatUIToFD.js
1871
+ ### dist/general/mix/compareDeep.js
1958
1872
 
1959
1873
 
1960
- #### flatUIToFD(uFilters, version)
1874
+ #### compareDeep(object1, object2)
1961
1875
 
1962
- Generates a filter data structure from the flatttened UI filters.
1876
+ Compares two objects to know if they are equals. Go across nested objects.
1877
+ Includes arrays in the comparison.
1963
1878
 
1964
1879
 
1965
1880
 
@@ -1968,8 +1883,8 @@ Generates a filter data structure from the flatttened UI filters.
1968
1883
 
1969
1884
  | Name | Type | Description | |
1970
1885
  | ---- | ---- | ----------- | -------- |
1971
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1972
- | version | | Tag for the version of the filter data structure | &nbsp; |
1886
+ | object1 | | First Object to compare | &nbsp; |
1887
+ | object2 | | Second Object to compare | &nbsp; |
1973
1888
 
1974
1889
 
1975
1890
 
@@ -1977,14 +1892,17 @@ Generates a filter data structure from the flatttened UI filters.
1977
1892
  ##### Returns
1978
1893
 
1979
1894
 
1980
- - a Filter Data.
1895
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1981
1896
 
1982
1897
 
1983
1898
 
1984
- #### buildScopes(fbFilters)
1985
1899
 
1986
- Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1987
- Also, adds and organizes filters by datasets
1900
+ ### dist/general/mix/getTag.js
1901
+
1902
+
1903
+ #### getTag(value)
1904
+
1905
+ Gets the `toStringTag` of `value`.
1988
1906
 
1989
1907
 
1990
1908
 
@@ -1993,7 +1911,7 @@ Also, adds and organizes filters by datasets
1993
1911
 
1994
1912
  | Name | Type | Description | |
1995
1913
  | ---- | ---- | ----------- | -------- |
1996
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1914
+ | value | | The value to query. | &nbsp; |
1997
1915
 
1998
1916
 
1999
1917
 
@@ -2001,13 +1919,17 @@ Also, adds and organizes filters by datasets
2001
1919
  ##### Returns
2002
1920
 
2003
1921
 
2004
- - an array of scopes structure.
1922
+ - `string` Returns the `toStringTag`.
2005
1923
 
2006
1924
 
2007
1925
 
2008
- #### buildScope(uFilter)
2009
1926
 
2010
- Gets an scope structure for the filter data
1927
+ ### dist/general/mix/importScripts.js
1928
+
1929
+
1930
+ #### importScripts(scripts)
1931
+
1932
+ Import a set of external Scripts given the URL in both serie and cascade way
2011
1933
 
2012
1934
 
2013
1935
 
@@ -2016,21 +1938,54 @@ Gets an scope structure for the filter data
2016
1938
 
2017
1939
  | Name | Type | Description | |
2018
1940
  | ---- | ---- | ----------- | -------- |
2019
- | uFilter | | UI structure filter | &nbsp; |
1941
+ | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1942
+ | scripts.url | `String` | CDN URL | &nbsp; |
1943
+ | scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | &nbsp; |
1944
+ | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1945
+ | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1946
+ | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
2020
1947
 
2021
1948
 
2022
1949
 
2023
1950
 
1951
+ ##### Examples
1952
+
1953
+ ```javascript
1954
+ // 1) Simple script (paralell loading)
1955
+ importScripts(['http://myscript.js', 'http://another.js']);
1956
+
1957
+ // 2) Loading `.js` and `.esm.js` script (parallel loading)
1958
+ importScripts([
1959
+ { url: 'http://myscript.esm.js', type: 'module' },
1960
+ { url: 'http://myscript.js', noModule: true }
1961
+ ]);
1962
+
1963
+ // 3) import dependent scripts (cascade)
1964
+ importScripts([
1965
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1966
+ ]);
1967
+
1968
+ // 4) mix
1969
+ importScripts([
1970
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1971
+ { url: 'http://another.esm.js', type: 'module' },
1972
+ { url: 'http://another.js', noModule: true },
1973
+ 'http://simplescript.js'
1974
+ ]);
1975
+ ```
1976
+
1977
+
2024
1978
  ##### Returns
2025
1979
 
2026
1980
 
2027
- - an scope structure
1981
+ - `Promise` Promise when all script have been loaded
2028
1982
 
2029
1983
 
2030
1984
 
2031
- #### buildDataset(uFilter)
1985
+ #### loadScript(url, type, noModule)
2032
1986
 
2033
- Gets an dataset structure for the filter data
1987
+ Creates the script element and appends to document.head
1988
+ return a Promise that is resolved when the script is loaded
2034
1989
 
2035
1990
 
2036
1991
 
@@ -2039,7 +1994,9 @@ Gets an dataset structure for the filter data
2039
1994
 
2040
1995
  | Name | Type | Description | |
2041
1996
  | ---- | ---- | ----------- | -------- |
2042
- | uFilter | | a UI structure filter | &nbsp; |
1997
+ | url | `String` | Cdn Url | &nbsp; |
1998
+ | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1999
+ | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
2043
2000
 
2044
2001
 
2045
2002
 
@@ -2047,13 +2004,17 @@ Gets an dataset structure for the filter data
2047
2004
  ##### Returns
2048
2005
 
2049
2006
 
2050
- - an dataset structure
2007
+ - `Void`
2051
2008
 
2052
2009
 
2053
2010
 
2054
- #### buildFilter(uFilter)
2055
2011
 
2056
- Gets an filter structure for the filter data
2012
+ ### dist/general/mix/isEmpty.js
2013
+
2014
+
2015
+ #### isEmpty(variable, includeFalsy)
2016
+
2017
+ Validates if the given argument is empty
2057
2018
 
2058
2019
 
2059
2020
 
@@ -2062,7 +2023,8 @@ Gets an filter structure for the filter data
2062
2023
 
2063
2024
  | Name | Type | Description | |
2064
2025
  | ---- | ---- | ----------- | -------- |
2065
- | uFilter | | a UI structure filter | &nbsp; |
2026
+ | variable | | the given variable | &nbsp; |
2027
+ | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
2066
2028
 
2067
2029
 
2068
2030
 
@@ -2070,17 +2032,19 @@ Gets an filter structure for the filter data
2070
2032
  ##### Returns
2071
2033
 
2072
2034
 
2073
- - an filter structure
2035
+ - true: the given argument is empty; false: is not.
2074
2036
 
2075
2037
 
2076
2038
 
2077
2039
 
2078
- ### dist/filters/adapters/flatUIToLogic.js
2040
+ ### dist/general/mix/isNaNV2.js
2079
2041
 
2080
2042
 
2081
- #### flatUIToLogic(uFilter)
2043
+ #### isNaNV2(variable)
2082
2044
 
2083
- Generates a Logic structure from flattened UI filters
2045
+ Validates if the recieved number is NaN type.
2046
+ This function recieves any variable but will return false.
2047
+ Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
2084
2048
 
2085
2049
 
2086
2050
 
@@ -2089,7 +2053,7 @@ Generates a Logic structure from flattened UI filters
2089
2053
 
2090
2054
  | Name | Type | Description | |
2091
2055
  | ---- | ---- | ----------- | -------- |
2092
- | uFilter | | Array of flat filters from UI | &nbsp; |
2056
+ | variable | | the variable to validate | &nbsp; |
2093
2057
 
2094
2058
 
2095
2059
 
@@ -2097,17 +2061,18 @@ Generates a Logic structure from flattened UI filters
2097
2061
  ##### Returns
2098
2062
 
2099
2063
 
2100
- - The logic structure
2064
+ - True if variable is a NaN or false otherwise
2101
2065
 
2102
2066
 
2103
2067
 
2104
2068
 
2105
- ### dist/filters/adapters/flatUIToOldLogic.js
2069
+ ### dist/general/mix/isNull.js
2106
2070
 
2107
2071
 
2108
- #### flatUIToOldLogic(uFilters)
2072
+ #### isNull(arg)
2109
2073
 
2110
- Generates a Logic structure from flattened UI filters
2074
+ return if a given variable is either `null` or `undefined`
2075
+ useful to avoid falsify validating Number Zero (0)
2111
2076
 
2112
2077
 
2113
2078
 
@@ -2116,7 +2081,7 @@ Generates a Logic structure from flattened UI filters
2116
2081
 
2117
2082
  | Name | Type | Description | |
2118
2083
  | ---- | ---- | ----------- | -------- |
2119
- | uFilters | | Array of flat filters from UI | &nbsp; |
2084
+ | arg | `any` | | &nbsp; |
2120
2085
 
2121
2086
 
2122
2087
 
@@ -2124,17 +2089,19 @@ Generates a Logic structure from flattened UI filters
2124
2089
  ##### Returns
2125
2090
 
2126
2091
 
2127
- - The logic structure
2092
+ - `Boolean`
2128
2093
 
2129
2094
 
2130
2095
 
2131
2096
 
2132
- ### dist/filters/adapters/flatUIToUI.js
2097
+ ### dist/general/mix/randomId.js
2133
2098
 
2134
2099
 
2135
- #### flatUIToUI(uFilters, version)
2100
+ #### randomId(length, exclude)
2136
2101
 
2137
- Generates a UI filter data structure from the flatttened UI filters.
2102
+ Creates a random string
2103
+ - If the first given argument is different than a length number, the variable is replaced by a default number
2104
+ - If the optional second given argument is passed the random string is permutated.
2138
2105
 
2139
2106
 
2140
2107
 
@@ -2143,8 +2110,8 @@ Generates a UI filter data structure from the flatttened UI filters.
2143
2110
 
2144
2111
  | Name | Type | Description | |
2145
2112
  | ---- | ---- | ----------- | -------- |
2146
- | uFilters | | Array of flattened filters from UI | &nbsp; |
2147
- | version | | Tag for the version of the filter data structure | &nbsp; |
2113
+ | length | `Number` | size of the generated string. Default 8 | &nbsp; |
2114
+ | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
2148
2115
 
2149
2116
 
2150
2117
 
@@ -2152,14 +2119,19 @@ Generates a UI filter data structure from the flatttened UI filters.
2152
2119
  ##### Returns
2153
2120
 
2154
2121
 
2155
- - a UI Filter Data.
2122
+ - `String` Random string
2156
2123
 
2157
2124
 
2158
2125
 
2159
- #### buildScopes(fbFilters)
2160
2126
 
2161
- Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
2162
- Also, adds and organizes filters by datasets
2127
+ ### dist/general/mix/size.js
2128
+
2129
+
2130
+ #### size(obj)
2131
+
2132
+ Gets the length of the given array.
2133
+ - Useful for Object, Array and string type.
2134
+ - For `null` or `undefined` or else argument the returned value will be 0.
2163
2135
 
2164
2136
 
2165
2137
 
@@ -2168,7 +2140,7 @@ Also, adds and organizes filters by datasets
2168
2140
 
2169
2141
  | Name | Type | Description | |
2170
2142
  | ---- | ---- | ----------- | -------- |
2171
- | fbFilters | | Array of flat filters from UI | &nbsp; |
2143
+ | obj | `Any` | Any object-type variable | &nbsp; |
2172
2144
 
2173
2145
 
2174
2146
 
@@ -2176,13 +2148,18 @@ Also, adds and organizes filters by datasets
2176
2148
  ##### Returns
2177
2149
 
2178
2150
 
2179
- - an array of scopes structure.
2151
+ - `Number` the size of the given variable
2180
2152
 
2181
2153
 
2182
2154
 
2183
- #### buildScope(uFilter)
2184
2155
 
2185
- Gets an scope structure for the UI filter data
2156
+ ### dist/general/object/cloneDeep.js
2157
+
2158
+
2159
+ #### cloneDeep(obj)
2160
+
2161
+ A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
2162
+ Not to use this function with inner objects and functions
2186
2163
 
2187
2164
 
2188
2165
 
@@ -2191,7 +2168,7 @@ Gets an scope structure for the UI filter data
2191
2168
 
2192
2169
  | Name | Type | Description | |
2193
2170
  | ---- | ---- | ----------- | -------- |
2194
- | uFilter | | UI structure filter | &nbsp; |
2171
+ | obj | | The object | &nbsp; |
2195
2172
 
2196
2173
 
2197
2174
 
@@ -2199,13 +2176,21 @@ Gets an scope structure for the UI filter data
2199
2176
  ##### Returns
2200
2177
 
2201
2178
 
2202
- - an scope structure
2179
+ - The new reference object or the given object if the parsing is incorrect or empty
2203
2180
 
2204
2181
 
2205
2182
 
2206
- #### buildDataset(uFilter)
2207
2183
 
2208
- Gets an dataset structure for the UI filter data
2184
+ ### dist/general/object/get.js
2185
+
2186
+
2187
+ #### _get(baseObject, path, defaultValue)
2188
+
2189
+ Like lodash _.get.
2190
+ Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
2191
+
2192
+ Empty arrays and empty objects are returned but the defaultValue is not
2193
+ Undefined and null values will return the defaultValue.
2209
2194
 
2210
2195
 
2211
2196
 
@@ -2214,21 +2199,59 @@ Gets an dataset structure for the UI filter data
2214
2199
 
2215
2200
  | Name | Type | Description | |
2216
2201
  | ---- | ---- | ----------- | -------- |
2217
- | uFilter | | a UI structure filter | &nbsp; |
2202
+ | baseObject | | The object to query | &nbsp; |
2203
+ | path | | The string path or collection of string paths of the property to get. | &nbsp; |
2204
+ | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
2205
+
2218
2206
 
2219
2207
 
2220
2208
 
2209
+ ##### Examples
2210
+
2211
+ ```javascript
2212
+ // returns 'Hello'
2213
+ _get({ item1: 'Hello', item2: 'World' }, 'item1')
2214
+ ```
2215
+ ```javascript
2216
+ // returns 'A simple Hello'
2217
+ _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
2218
+ ```
2219
+ ```javascript
2220
+ // returns 'Hello Again'
2221
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
2222
+ ```
2223
+ ```javascript
2224
+ // returns 'Hello 2'
2225
+ _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
2226
+ ```
2227
+ ```javascript
2228
+ // returns 'Hello Again'
2229
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
2230
+ ```
2231
+
2221
2232
 
2222
2233
  ##### Returns
2223
2234
 
2224
2235
 
2225
- - an dataset structure
2236
+ - the resolved value.
2226
2237
 
2227
2238
 
2228
2239
 
2229
- #### buildFilter(uFilter)
2230
2240
 
2231
- Gets an filter structure for the UI filter data
2241
+ ### dist/general/object/getAttribute.js
2242
+
2243
+
2244
+ #### getAttribute(obj, key)
2245
+
2246
+ Searchs for properties in different case styles such as: lower, upper, camel and pascal
2247
+ - To optimize the searching, it is required a key in a snake_case style
2248
+ - List of cases that do not match
2249
+ -- From lower to snake case
2250
+ -- From upper to snake case
2251
+ -- From lower to camel case
2252
+ -- From upper to camel case
2253
+ -- From lower to pascal case
2254
+ -- From upper to pascal case
2232
2255
 
2233
2256
 
2234
2257
 
@@ -2237,25 +2260,33 @@ Gets an filter structure for the UI filter data
2237
2260
 
2238
2261
  | Name | Type | Description | |
2239
2262
  | ---- | ---- | ----------- | -------- |
2240
- | uFilter | | a UI structure filter | &nbsp; |
2263
+ | obj | `object` | object to look for | &nbsp; |
2264
+ | key | `string` | String attribute in snake_case style | &nbsp; |
2265
+
2241
2266
 
2242
2267
 
2243
2268
 
2269
+ ##### Examples
2270
+
2271
+ ```javascript
2272
+ getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2273
+ ```
2274
+
2244
2275
 
2245
2276
  ##### Returns
2246
2277
 
2247
2278
 
2248
- - an filter structure
2279
+ - `Void`
2249
2280
 
2250
2281
 
2251
2282
 
2252
2283
 
2253
- ### dist/filters/adapters/logicToFD.js
2284
+ ### dist/general/object/hasProperty.js
2254
2285
 
2255
2286
 
2256
- #### logicToFD(filterData, version)
2287
+ #### _hasProperty(obj, property)
2257
2288
 
2258
- Generates a filter data structure from the old logic structure (v2.0).
2289
+ Use the hasOwnProperty in order to verify if the given property exists in the object.
2259
2290
 
2260
2291
 
2261
2292
 
@@ -2264,26 +2295,38 @@ Generates a filter data structure from the old logic structure (v2.0).
2264
2295
 
2265
2296
  | Name | Type | Description | |
2266
2297
  | ---- | ---- | ----------- | -------- |
2267
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
2268
- | version | | Tag for the version of the filter data structure | &nbsp; |
2298
+ | obj | `object` | an object | &nbsp; |
2299
+ | property | `string` | String to verify if exists in the object as property | &nbsp; |
2300
+
2269
2301
 
2270
2302
 
2271
2303
 
2304
+ ##### Examples
2305
+
2306
+ ```javascript
2307
+ const prop = 'prop2'
2308
+ const obj1 = { prop1: 'hello', prop2: 'world'}
2309
+ _hasProperty(ob1, prop1) // true
2310
+
2311
+ const obj2 = { prop1: 'hello world' }
2312
+ _hasProperty(ob1, prop2) // false
2313
+ ```
2314
+
2272
2315
 
2273
2316
  ##### Returns
2274
2317
 
2275
2318
 
2276
- - a Filter Data.
2319
+ - True if the object has the given property; otherwise, false.
2277
2320
 
2278
2321
 
2279
2322
 
2280
2323
 
2281
- ### dist/filters/adapters/logicToFlatUI.js
2324
+ ### dist/general/object/isObject.js
2282
2325
 
2283
2326
 
2284
- #### logicToFlatUI(logics)
2327
+ #### isObject(obj)
2285
2328
 
2286
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
2329
+ Checks if the given argument is an object type
2287
2330
 
2288
2331
 
2289
2332
 
@@ -2292,7 +2335,7 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
2292
2335
 
2293
2336
  | Name | Type | Description | |
2294
2337
  | ---- | ---- | ----------- | -------- |
2295
- | logics | | The old logic structure (v2.0) | &nbsp; |
2338
+ | obj | | the variable to check | &nbsp; |
2296
2339
 
2297
2340
 
2298
2341
 
@@ -2300,13 +2343,18 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
2300
2343
  ##### Returns
2301
2344
 
2302
2345
 
2303
- - The Flattened UI Filters array
2346
+ - True: It is an object; False: It is not.
2304
2347
 
2305
2348
 
2306
2349
 
2307
- #### getFilter(filters, filter, getIndex)
2308
2350
 
2309
- Get the filter or the index of the given array, validating an old filter structure.
2351
+ ### dist/general/object/mapValues.js
2352
+
2353
+
2354
+ #### mapValues(baseObject, iteratee)
2355
+
2356
+ Invoke iteratee (function) for each object key-value pair
2357
+ and return a mapped object
2310
2358
 
2311
2359
 
2312
2360
 
@@ -2315,9 +2363,8 @@ Get the filter or the index of the given array, validating an old filter structu
2315
2363
 
2316
2364
  | Name | Type | Description | |
2317
2365
  | ---- | ---- | ----------- | -------- |
2318
- | filters | | The array of UI filters | &nbsp; |
2319
- | filter | | The old logic structure filter | &nbsp; |
2320
- | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
2366
+ | baseObject | `Object` | Base object. | &nbsp; |
2367
+ | iteratee | `Function` | The executed per iteration. | &nbsp; |
2321
2368
 
2322
2369
 
2323
2370
 
@@ -2325,13 +2372,18 @@ Get the filter or the index of the given array, validating an old filter structu
2325
2372
  ##### Returns
2326
2373
 
2327
2374
 
2328
- - the index or the UI filter object
2375
+ - `Object` New mapped object.
2329
2376
 
2330
2377
 
2331
2378
 
2332
- #### refineRankingValues(values, uiValues)
2333
2379
 
2334
- Refines the values of the Ranking column type.
2380
+ ### dist/general/object/mergeDeep.js
2381
+
2382
+
2383
+ #### mergeDeep(obj1, obj2, settings)
2384
+
2385
+ Merges two objects into a new one.
2386
+ The second given argument to the first given argument.
2335
2387
 
2336
2388
 
2337
2389
 
@@ -2340,8 +2392,9 @@ Refines the values of the Ranking column type.
2340
2392
 
2341
2393
  | Name | Type | Description | |
2342
2394
  | ---- | ---- | ----------- | -------- |
2343
- | values | | the Array of Ranking values | &nbsp; |
2344
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
2395
+ | obj1 | | The target object | &nbsp; |
2396
+ | obj2 | | The object to be merged | &nbsp; |
2397
+ | settings | | Object settings for this function | &nbsp; |
2345
2398
 
2346
2399
 
2347
2400
 
@@ -2349,17 +2402,37 @@ Refines the values of the Ranking column type.
2349
2402
  ##### Returns
2350
2403
 
2351
2404
 
2352
- - the array of Ranking values
2405
+ - a new merged object
2353
2406
 
2354
2407
 
2355
2408
 
2409
+ #### isValid(obj1, obj2)
2356
2410
 
2357
- ### dist/filters/adapters/logicToUI.js
2411
+ Validates if the two arguments are objects
2358
2412
 
2359
2413
 
2360
- #### logicToUI(uFilters, datasetsInfo)
2361
2414
 
2362
- Generates a UI filter structure from the old logic structure (v2.0).
2415
+
2416
+ ##### Parameters
2417
+
2418
+ | Name | Type | Description | |
2419
+ | ---- | ---- | ----------- | -------- |
2420
+ | obj1 | | The target object | &nbsp; |
2421
+ | obj2 | | The object to be merged | &nbsp; |
2422
+
2423
+
2424
+
2425
+
2426
+ ##### Returns
2427
+
2428
+
2429
+ - true: they are valid; false: they are not
2430
+
2431
+
2432
+
2433
+ #### getParamsToMergeDeep(settings)
2434
+
2435
+ Validates and gets the settings with all set parameters.
2363
2436
 
2364
2437
 
2365
2438
 
@@ -2368,8 +2441,7 @@ Generates a UI filter structure from the old logic structure (v2.0).
2368
2441
 
2369
2442
  | Name | Type | Description | |
2370
2443
  | ---- | ---- | ----------- | -------- |
2371
- | uFilters | | Array of filters from old logic structure | &nbsp; |
2372
- | datasetsInfo | | Collection of datasets information | &nbsp; |
2444
+ | settings | | the settings object | &nbsp; |
2373
2445
 
2374
2446
 
2375
2447
 
@@ -2377,17 +2449,17 @@ Generates a UI filter structure from the old logic structure (v2.0).
2377
2449
  ##### Returns
2378
2450
 
2379
2451
 
2380
- - a UI Filter Data.
2452
+ - a new settings object with all set parameters.
2381
2453
 
2382
2454
 
2383
2455
 
2384
2456
 
2385
- ### dist/filters/adapters/transformFilters.js
2457
+ ### dist/general/object/objectCopy.js
2386
2458
 
2387
2459
 
2388
- #### transformFilters(oldFiltersObj, section)
2460
+ #### objectCopy(entity, cache)
2389
2461
 
2390
- Transform the old filters structure into the new one
2462
+ Created a new reference of the given argument
2391
2463
 
2392
2464
 
2393
2465
 
@@ -2396,79 +2468,64 @@ Transform the old filters structure into the new one
2396
2468
 
2397
2469
  | Name | Type | Description | |
2398
2470
  | ---- | ---- | ----------- | -------- |
2399
- | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
2400
- | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
2471
+ | entity | | The variable to be copied | &nbsp; |
2472
+ | cache | | | &nbsp; |
2401
2473
 
2402
2474
 
2403
2475
 
2404
2476
 
2405
- ##### Examples
2477
+ ##### Returns
2478
+
2479
+
2480
+ - A new reference of the given argument
2481
+
2482
+
2483
+
2484
+
2485
+ ### dist/general/object/omit.js
2486
+
2487
+
2488
+ #### omit(obj, props)
2489
+
2490
+ return a new Object excluding attributes in _props_ list
2406
2491
 
2407
- ```javascript
2408
2492
 
2409
- const oldPreferenceFilters = {
2410
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
2411
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
2412
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
2413
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
2414
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
2415
- "formulaId": null,
2416
- "panelId": null,
2417
- "values": [
2418
- {
2419
- "EQUALS": [
2420
- {
2421
- "id": "AK4M8UV2a0",
2422
- "value": "A",
2423
- "enabled": true,
2424
- "imageUrl": null
2425
- },
2426
- {
2427
- "id": "AK4M8UV2a1",
2428
- "value": "B",
2429
- "enabled": true,
2430
- "imageUrl": null
2431
- }
2432
- ]
2433
- }
2434
- ],
2435
- "bucketId": null,
2436
- "text": "MC",
2437
- "title": "MC",
2438
- "type": "SINGLE_CHOICE",
2439
- "qid": "AK4M8UV2",
2440
- "dataset": {
2441
- "sourceid": "xYOQAdpqT",
2442
- "name": "Form All Questions",
2443
- "qrveyid": "xYOQAdpqT",
2444
- "text": "Form All Questions",
2445
- "linkid": 0
2446
- },
2447
- "enabled": true,
2448
- "linked": null
2449
- }
2450
- };
2451
2493
 
2452
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2453
- ```
2494
+
2495
+ ##### Parameters
2496
+
2497
+ | Name | Type | Description | |
2498
+ | ---- | ---- | ----------- | -------- |
2499
+ | obj | `Object` | base object | &nbsp; |
2500
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2501
+
2502
+
2454
2503
 
2455
2504
 
2456
2505
  ##### Returns
2457
2506
 
2458
2507
 
2459
- - `Object` an object with the new filters structure
2508
+ - `Object` clean object
2460
2509
 
2461
2510
 
2462
2511
 
2463
2512
 
2464
- ### dist/filters/classes/FilterInputErrorHandler.js
2513
+ ### dist/general/object/pick.js
2465
2514
 
2466
2515
 
2467
- #### new FilterInputErrorHandler()
2516
+ #### pick(baseObject, keys)
2517
+
2518
+ return a new object just with attributes in _keys_ list
2468
2519
 
2469
2520
 
2470
2521
 
2471
2522
 
2523
+ ##### Parameters
2524
+
2525
+ | Name | Type | Description | |
2526
+ | ---- | ---- | ----------- | -------- |
2527
+ | baseObject | `Object` | base object | &nbsp; |
2528
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2472
2529
 
2473
2530
 
2474
2531
 
@@ -2476,17 +2533,17 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2476
2533
  ##### Returns
2477
2534
 
2478
2535
 
2479
- - `Void`
2536
+ - `Object` new object just with desired attributes
2480
2537
 
2481
2538
 
2482
2539
 
2483
2540
 
2484
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
2541
+ ### dist/general/object/serialize.js
2485
2542
 
2486
2543
 
2487
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
2544
+ #### serialize(obj)
2488
2545
 
2489
- [TODO: Make a proper description for this function]
2546
+ serialize object to url param
2490
2547
 
2491
2548
 
2492
2549
 
@@ -2495,9 +2552,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2495
2552
 
2496
2553
  | Name | Type | Description | |
2497
2554
  | ---- | ---- | ----------- | -------- |
2498
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
2499
- | scopes | | | &nbsp; |
2500
- | currentScope | | | &nbsp; |
2555
+ | obj | | - Object to be serialized | &nbsp; |
2501
2556
 
2502
2557
 
2503
2558
 
@@ -2505,17 +2560,17 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2505
2560
  ##### Returns
2506
2561
 
2507
2562
 
2508
- -
2563
+ - `Void`
2509
2564
 
2510
2565
 
2511
2566
 
2512
2567
 
2513
- ### dist/filters/helpers/getAvailableScopes.js
2568
+ ### dist/general/string/capitalize.js
2514
2569
 
2515
2570
 
2516
- #### getAvailableScopes(config)
2571
+ #### capitalize(text)
2517
2572
 
2518
- Gets Scopes/Scope IDs by given IDs
2573
+ Upper case the first letter of a given text
2519
2574
 
2520
2575
 
2521
2576
 
@@ -2524,7 +2579,7 @@ Gets Scopes/Scope IDs by given IDs
2524
2579
 
2525
2580
  | Name | Type | Description | |
2526
2581
  | ---- | ---- | ----------- | -------- |
2527
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
2582
+ | text | `String` | | &nbsp; |
2528
2583
 
2529
2584
 
2530
2585
 
@@ -2532,17 +2587,17 @@ Gets Scopes/Scope IDs by given IDs
2532
2587
  ##### Returns
2533
2588
 
2534
2589
 
2535
- - a Scopes/Scope IDs array
2590
+ - `String` a capitalized text
2536
2591
 
2537
2592
 
2538
2593
 
2539
2594
 
2540
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
2595
+ ### dist/qrvey/helpers/getColumnsLabel.js
2541
2596
 
2542
2597
 
2543
- #### getAvailableScopesIDsByConfig(config)
2598
+ #### getColumnLabels(column)
2544
2599
 
2545
- Gets the Scopes IDS for the Available Scope function by any config
2600
+ Get an string of the properties of the given column.
2546
2601
 
2547
2602
 
2548
2603
 
@@ -2551,7 +2606,7 @@ Gets the Scopes IDS for the Available Scope function by any config
2551
2606
 
2552
2607
  | Name | Type | Description | |
2553
2608
  | ---- | ---- | ----------- | -------- |
2554
- | config | | any config | &nbsp; |
2609
+ | column | | The column | &nbsp; |
2555
2610
 
2556
2611
 
2557
2612
 
@@ -2559,17 +2614,17 @@ Gets the Scopes IDS for the Available Scope function by any config
2559
2614
  ##### Returns
2560
2615
 
2561
2616
 
2562
- - a Available Scope IDS config
2617
+ - an string with the property, aggregate or calculation label.
2563
2618
 
2564
2619
 
2565
2620
 
2566
2621
 
2567
- ### dist/filters/helpers/getScopesByHierarchy.js
2622
+ ### dist/services/api/getAllDatasets.api.js
2568
2623
 
2569
2624
 
2570
- #### getScopesByHierarchy(scopes, currentScope)
2625
+ #### getAllDatasets(config, pickDatasets)
2571
2626
 
2572
- [TODO: Make a description for this]
2627
+ Get a dataset list from a collection of Qrvey IDs
2573
2628
 
2574
2629
 
2575
2630
 
@@ -2578,8 +2633,8 @@ Gets the Scopes IDS for the Available Scope function by any config
2578
2633
 
2579
2634
  | Name | Type | Description | |
2580
2635
  | ---- | ---- | ----------- | -------- |
2581
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
2582
- | currentScope | | Current scope type | &nbsp; |
2636
+ | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2637
+ | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2583
2638
 
2584
2639
 
2585
2640
 
@@ -2587,17 +2642,17 @@ Gets the Scopes IDS for the Available Scope function by any config
2587
2642
  ##### Returns
2588
2643
 
2589
2644
 
2590
- - A new array of Scopes/Scope IDs
2645
+ - a promise
2591
2646
 
2592
2647
 
2593
2648
 
2594
2649
 
2595
- ### dist/qrvey/helpers/getColumnsLabel.js
2650
+ ### dist/services/api/getAllQrveys.api.js
2596
2651
 
2597
2652
 
2598
- #### getColumnLabels(column)
2653
+ #### getAllQrveys(config, params)
2599
2654
 
2600
- Get an string of the properties of the given column.
2655
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2601
2656
 
2602
2657
 
2603
2658
 
@@ -2606,7 +2661,8 @@ Get an string of the properties of the given column.
2606
2661
 
2607
2662
  | Name | Type | Description | |
2608
2663
  | ---- | ---- | ----------- | -------- |
2609
- | column | | The column | &nbsp; |
2664
+ | config | | Configuration | &nbsp; |
2665
+ | params | | Object for getting precise data | &nbsp; |
2610
2666
 
2611
2667
 
2612
2668
 
@@ -2614,17 +2670,17 @@ Get an string of the properties of the given column.
2614
2670
  ##### Returns
2615
2671
 
2616
2672
 
2617
- - an string with the property, aggregate or calculation label.
2673
+ - `Void`
2618
2674
 
2619
2675
 
2620
2676
 
2621
2677
 
2622
- ### dist/services/api/getAllQrveys.api.js
2678
+ ### dist/services/api/getDatasetColumns.api.js
2623
2679
 
2624
2680
 
2625
- #### getAllQrveys(config, params)
2681
+ #### getDatasetColumns(qrveyid)
2626
2682
 
2627
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2683
+ Get a dataset by Qrvey ID
2628
2684
 
2629
2685
 
2630
2686
 
@@ -2633,8 +2689,7 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2633
2689
 
2634
2690
  | Name | Type | Description | |
2635
2691
  | ---- | ---- | ----------- | -------- |
2636
- | config | | Configuration | &nbsp; |
2637
- | params | | Object for getting precise data | &nbsp; |
2692
+ | qrveyid | | The Qrvey ID | &nbsp; |
2638
2693
 
2639
2694
 
2640
2695
 
@@ -2642,17 +2697,17 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2642
2697
  ##### Returns
2643
2698
 
2644
2699
 
2645
- - `Void`
2700
+ - a promise
2646
2701
 
2647
2702
 
2648
2703
 
2649
2704
 
2650
- ### dist/services/api/getAllDatasets.api.js
2705
+ ### dist/typescript/decorators/Throttled.js
2651
2706
 
2652
2707
 
2653
- #### getAllDatasets(config, pickDatasets)
2708
+ #### Throttled(time)
2654
2709
 
2655
- Get a dataset list from a collection of Qrvey IDs
2710
+ (Method Decorator) Throttled Class Method
2656
2711
 
2657
2712
 
2658
2713
 
@@ -2661,8 +2716,7 @@ Get a dataset list from a collection of Qrvey IDs
2661
2716
 
2662
2717
  | Name | Type | Description | |
2663
2718
  | ---- | ---- | ----------- | -------- |
2664
- | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2665
- | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2719
+ | time | | (optional) deafult 500 | &nbsp; |
2666
2720
 
2667
2721
 
2668
2722
 
@@ -2670,17 +2724,17 @@ Get a dataset list from a collection of Qrvey IDs
2670
2724
  ##### Returns
2671
2725
 
2672
2726
 
2673
- - a promise
2727
+ - `Void`
2674
2728
 
2675
2729
 
2676
2730
 
2677
2731
 
2678
- ### dist/services/api/getDatasetColumns.api.js
2732
+ ### dist/typescript/decorators/Debounce.js
2679
2733
 
2680
2734
 
2681
- #### getDatasetColumns(qrveyid)
2735
+ #### Debounce(time)
2682
2736
 
2683
- Get a dataset by Qrvey ID
2737
+ (Method Decorator) Debounce Class Method
2684
2738
 
2685
2739
 
2686
2740
 
@@ -2689,7 +2743,7 @@ Get a dataset by Qrvey ID
2689
2743
 
2690
2744
  | Name | Type | Description | |
2691
2745
  | ---- | ---- | ----------- | -------- |
2692
- | qrveyid | | The Qrvey ID | &nbsp; |
2746
+ | time | | (optional) deafult 500 | &nbsp; |
2693
2747
 
2694
2748
 
2695
2749
 
@@ -2697,7 +2751,7 @@ Get a dataset by Qrvey ID
2697
2751
  ##### Returns
2698
2752
 
2699
2753
 
2700
- - a promise
2754
+ - `Void`
2701
2755
 
2702
2756
 
2703
2757
 
@@ -2786,60 +2840,6 @@ try to find this string as a variable on Windows object
2786
2840
 
2787
2841
 
2788
2842
 
2789
- ### dist/typescript/decorators/Debounce.js
2790
-
2791
-
2792
- #### Debounce(time)
2793
-
2794
- (Method Decorator) Debounce Class Method
2795
-
2796
-
2797
-
2798
-
2799
- ##### Parameters
2800
-
2801
- | Name | Type | Description | |
2802
- | ---- | ---- | ----------- | -------- |
2803
- | time | | (optional) deafult 500 | &nbsp; |
2804
-
2805
-
2806
-
2807
-
2808
- ##### Returns
2809
-
2810
-
2811
- - `Void`
2812
-
2813
-
2814
-
2815
-
2816
- ### dist/typescript/decorators/Throttled.js
2817
-
2818
-
2819
- #### Throttled(time)
2820
-
2821
- (Method Decorator) Throttled Class Method
2822
-
2823
-
2824
-
2825
-
2826
- ##### Parameters
2827
-
2828
- | Name | Type | Description | |
2829
- | ---- | ---- | ----------- | -------- |
2830
- | time | | (optional) deafult 500 | &nbsp; |
2831
-
2832
-
2833
-
2834
-
2835
- ##### Returns
2836
-
2837
-
2838
- - `Void`
2839
-
2840
-
2841
-
2842
-
2843
2843
  ### dist/dates/relative/helpers/formatStatement.js
2844
2844
 
2845
2845
 
@@ -3365,12 +3365,12 @@ Excludes and returns a filter data without filters by the given scopes
3365
3365
 
3366
3366
 
3367
3367
 
3368
- ### dist/filters/helpers/common/getFilterColumnLabel.js
3368
+ ### dist/filters/helpers/common/getFilterLabel.js
3369
3369
 
3370
3370
 
3371
- #### getFilterColumnLabel(column)
3371
+ #### getFilterLabel(filter)
3372
3372
 
3373
- Get an string of the properties of the given filter column.
3373
+ Gets the Filter Label + Column label
3374
3374
 
3375
3375
 
3376
3376
 
@@ -3379,7 +3379,7 @@ Get an string of the properties of the given filter column.
3379
3379
 
3380
3380
  | Name | Type | Description | |
3381
3381
  | ---- | ---- | ----------- | -------- |
3382
- | column | | The filter column | &nbsp; |
3382
+ | filter | | the UI filter | &nbsp; |
3383
3383
 
3384
3384
 
3385
3385
 
@@ -3387,17 +3387,17 @@ Get an string of the properties of the given filter column.
3387
3387
  ##### Returns
3388
3388
 
3389
3389
 
3390
- - an string with the property, aggregate or calculation label.
3390
+ - a sring label
3391
3391
 
3392
3392
 
3393
3393
 
3394
3394
 
3395
- ### dist/filters/helpers/common/getFilterLabel.js
3395
+ ### dist/filters/helpers/common/getFilterColumnLabel.js
3396
3396
 
3397
3397
 
3398
- #### getFilterLabel(filter)
3398
+ #### getFilterColumnLabel(column)
3399
3399
 
3400
- Gets the Filter Label + Column label
3400
+ Get an string of the properties of the given filter column.
3401
3401
 
3402
3402
 
3403
3403
 
@@ -3406,7 +3406,7 @@ Gets the Filter Label + Column label
3406
3406
 
3407
3407
  | Name | Type | Description | |
3408
3408
  | ---- | ---- | ----------- | -------- |
3409
- | filter | | the UI filter | &nbsp; |
3409
+ | column | | The filter column | &nbsp; |
3410
3410
 
3411
3411
 
3412
3412
 
@@ -3414,7 +3414,7 @@ Gets the Filter Label + Column label
3414
3414
  ##### Returns
3415
3415
 
3416
3416
 
3417
- - a sring label
3417
+ - an string with the property, aggregate or calculation label.
3418
3418
 
3419
3419
 
3420
3420
 
@@ -3632,12 +3632,12 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
3632
3632
 
3633
3633
 
3634
3634
 
3635
- ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3635
+ ### dist/filters/helpers/common/haveFiltersByDataset.js
3636
3636
 
3637
3637
 
3638
- #### getParamsToGetFilterSettings(settings)
3638
+ #### haveFiltersByDataset(filterData, qrveyid)
3639
3639
 
3640
- Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3640
+ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3641
3641
 
3642
3642
 
3643
3643
 
@@ -3646,7 +3646,8 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
3646
3646
 
3647
3647
  | Name | Type | Description | |
3648
3648
  | ---- | ---- | ----------- | -------- |
3649
- | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
3649
+ | filterData | | the filter data or the UI filter data. | &nbsp; |
3650
+ | qrveyid | | The Qrvey ID | &nbsp; |
3650
3651
 
3651
3652
 
3652
3653
 
@@ -3654,17 +3655,17 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
3654
3655
  ##### Returns
3655
3656
 
3656
3657
 
3657
- - a new ParamsToGetFilter settings object.
3658
+ - true: the filter data has filters by the Qrvey ID
3658
3659
 
3659
3660
 
3660
3661
 
3661
3662
 
3662
- ### dist/filters/helpers/common/haveFiltersByDataset.js
3663
+ ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3663
3664
 
3664
3665
 
3665
- #### haveFiltersByDataset(filterData, qrveyid)
3666
+ #### getParamsToGetFilterSettings(settings)
3666
3667
 
3667
- Validates if the filter data has filters by a dataset ID (Qrvey ID).
3668
+ Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3668
3669
 
3669
3670
 
3670
3671
 
@@ -3673,8 +3674,7 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3673
3674
 
3674
3675
  | Name | Type | Description | |
3675
3676
  | ---- | ---- | ----------- | -------- |
3676
- | filterData | | the filter data or the UI filter data. | &nbsp; |
3677
- | qrveyid | | The Qrvey ID | &nbsp; |
3677
+ | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
3678
3678
 
3679
3679
 
3680
3680
 
@@ -3682,7 +3682,7 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3682
3682
  ##### Returns
3683
3683
 
3684
3684
 
3685
- - true: the filter data has filters by the Qrvey ID
3685
+ - a new ParamsToGetFilter settings object.
3686
3686
 
3687
3687
 
3688
3688
 
@@ -3742,12 +3742,12 @@ Determines if the filter column and property is a distinct group dates type
3742
3742
 
3743
3743
 
3744
3744
 
3745
- ### dist/filters/helpers/common/isInValidator.js
3745
+ ### dist/filters/helpers/common/isNullValidator.js
3746
3746
 
3747
3747
 
3748
- #### isInValidator(validator)
3748
+ #### isNullValidator(validator)
3749
3749
 
3750
- Validates if the given validator is a In type
3750
+ Checks if the given validator is a Null type.
3751
3751
 
3752
3752
 
3753
3753
 
@@ -3756,7 +3756,7 @@ Validates if the given validator is a In type
3756
3756
 
3757
3757
  | Name | Type | Description | |
3758
3758
  | ---- | ---- | ----------- | -------- |
3759
- | validator | | The validator | &nbsp; |
3759
+ | validator | | The Filter Validator | &nbsp; |
3760
3760
 
3761
3761
 
3762
3762
 
@@ -3764,17 +3764,17 @@ Validates if the given validator is a In type
3764
3764
  ##### Returns
3765
3765
 
3766
3766
 
3767
- - true: it is a In validator; false: it is not a In validator
3767
+ - True: It is a Null Validator; False: It is not a Null Validator.
3768
3768
 
3769
3769
 
3770
3770
 
3771
3771
 
3772
- ### dist/filters/helpers/common/isNullValidator.js
3772
+ ### dist/filters/helpers/common/isInValidator.js
3773
3773
 
3774
3774
 
3775
- #### isNullValidator(validator)
3775
+ #### isInValidator(validator)
3776
3776
 
3777
- Checks if the given validator is a Null type.
3777
+ Validates if the given validator is a In type
3778
3778
 
3779
3779
 
3780
3780
 
@@ -3783,7 +3783,7 @@ Checks if the given validator is a Null type.
3783
3783
 
3784
3784
  | Name | Type | Description | |
3785
3785
  | ---- | ---- | ----------- | -------- |
3786
- | validator | | The Filter Validator | &nbsp; |
3786
+ | validator | | The validator | &nbsp; |
3787
3787
 
3788
3788
 
3789
3789
 
@@ -3791,7 +3791,7 @@ Checks if the given validator is a Null type.
3791
3791
  ##### Returns
3792
3792
 
3793
3793
 
3794
- - True: It is a Null Validator; False: It is not a Null Validator.
3794
+ - true: it is a In validator; false: it is not a In validator
3795
3795
 
3796
3796
 
3797
3797
 
@@ -4151,6 +4151,34 @@ Gets the label of the filter property
4151
4151
 
4152
4152
 
4153
4153
 
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
+
4154
4182
  ### dist/filters/helpers/ui/getOutputFormatByColumn.js
4155
4183
 
4156
4184
 
@@ -4207,34 +4235,6 @@ Looks around all filter structure finding the qrveyid propertty in each dataset
4207
4235
 
4208
4236
 
4209
4237
 
4210
- ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
4211
-
4212
-
4213
- #### getUIFlatFilterByParams()
4214
-
4215
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4216
- The validation to filter the stored filter is depending on:
4217
- - Column
4218
- - Qrvey ID,
4219
- - Scope type
4220
- - Scope ID
4221
- - Panel ID
4222
- - Validator type
4223
- - Property type
4224
-
4225
-
4226
-
4227
-
4228
-
4229
-
4230
- ##### Returns
4231
-
4232
-
4233
- - The index of the uFilter array or the Filter object s
4234
-
4235
-
4236
-
4237
-
4238
4238
  ### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
4239
4239
 
4240
4240