@qrvey/utils 1.2.9-33 → 1.2.9-34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +801 -801
  2. package/dist/cjs/filters/adapters/adaptFilterValues.js +1 -1
  3. package/dist/cjs/filters/adapters/flatUIToFD.js +4 -0
  4. package/dist/cjs/filters/adapters/flatUIToOldLogic.js +1 -1
  5. package/dist/cjs/filters/adapters/flatUIToUI.js +4 -0
  6. package/dist/cjs/filters/helpers/backend/getBackendProperty.js +1 -1
  7. package/dist/cjs/filters/helpers/backend/getBackendValues.js +1 -1
  8. package/dist/cjs/filters/interfaces/common/IFSValue.d.ts +1 -1
  9. package/dist/cjs/filters/interfaces/ui/IFUValue.d.ts +1 -1
  10. package/dist/cjs/format/format.js +4 -2
  11. package/dist/cjs/format/localization.js +1 -1
  12. package/dist/cjs/qrvey/helpers/transformValue.js +3 -0
  13. package/dist/filters/adapters/adaptFilterValues.js +1 -1
  14. package/dist/filters/adapters/flatUIToFD.js +4 -0
  15. package/dist/filters/adapters/flatUIToOldLogic.js +1 -1
  16. package/dist/filters/adapters/flatUIToUI.js +4 -0
  17. package/dist/filters/helpers/backend/getBackendProperty.js +1 -1
  18. package/dist/filters/helpers/backend/getBackendValues.js +1 -1
  19. package/dist/filters/interfaces/common/IFSValue.d.ts +1 -1
  20. package/dist/filters/interfaces/ui/IFUValue.d.ts +1 -1
  21. package/dist/format/format.js +4 -2
  22. package/dist/format/localization.js +1 -1
  23. package/dist/qrvey/helpers/transformValue.js +3 -0
  24. package/package.json +1 -1
  25. package/src/filters/adapters/adaptFilterValues.ts +1 -1
  26. package/src/filters/adapters/flatUIToFD.ts +5 -0
  27. package/src/filters/adapters/flatUIToOldLogic.ts +1 -1
  28. package/src/filters/adapters/flatUIToUI.ts +5 -0
  29. package/src/filters/helpers/backend/getBackendProperty.ts +2 -1
  30. package/src/filters/helpers/backend/getBackendValues.ts +1 -1
  31. package/src/filters/interfaces/common/IFSValue.ts +1 -1
  32. package/src/filters/interfaces/ui/IFUValue.ts +1 -1
  33. package/src/format/format.ts +3 -2
  34. package/src/format/localization.ts +1 -1
  35. package/src/qrvey/helpers/transformValue.ts +3 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-33*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-34*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -80,12 +80,12 @@ Get a text and evaluate if it matchs with a token box label.
80
80
 
81
81
 
82
82
 
83
- ### dist/dates/adapters/mdyDateToDate.js
83
+ ### dist/dates/helpers/getDateByDateFormat.js
84
84
 
85
85
 
86
- #### mdyDateToDate(monthYearDate, time)
86
+ #### getDateByDateFormat(date, format, time)
87
87
 
88
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
88
+ Gets a Date Object instance by a Date format
89
89
 
90
90
 
91
91
 
@@ -94,8 +94,9 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
94
94
 
95
95
  | Name | Type | Description | |
96
96
  | ---- | ---- | ----------- | -------- |
97
- | monthYearDate | | String of [mm/dd/yyyy] date |   |
98
- | time | | Flag to parse the object date to milliseconds. |   |
97
+ | date | | String with a formatted date |   |
98
+ | format | | The date format |   |
99
+ | time | | flag to convert the formatted date to miliseconds |   |
99
100
 
100
101
 
101
102
 
@@ -103,17 +104,17 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
103
104
  ##### Returns
104
105
 
105
106
 
106
- - The date object or the date in milliseconds
107
+ - a Date object, milisecond time or the same value if date format does not match.
107
108
 
108
109
 
109
110
 
110
111
 
111
- ### dist/dates/adapters/monthYearToDate.js
112
+ ### dist/dates/helpers/getDateFormatByProperty.js
112
113
 
113
114
 
114
- #### monthYearToDate(monthYearDate, time)
115
+ #### getDateFormatByProperty(property)
115
116
 
116
- Transforms String Date from a [Month Year] format to Date object.
117
+ Gets the date format by the given property
117
118
 
118
119
 
119
120
 
@@ -122,8 +123,7 @@ Transforms String Date from a [Month Year] format to Date object.
122
123
 
123
124
  | Name | Type | Description | |
124
125
  | ---- | ---- | ----------- | -------- |
125
- | monthYearDate | | String of [Month Year] date |   |
126
- | time | | Flag to parse the object date to milliseconds. |   |
126
+ | property | | The Column Property |   |
127
127
 
128
128
 
129
129
 
@@ -131,17 +131,17 @@ Transforms String Date from a [Month Year] format to Date object.
131
131
  ##### Returns
132
132
 
133
133
 
134
- - The date object or the date in milliseconds
134
+ - The date format
135
135
 
136
136
 
137
137
 
138
138
 
139
- ### dist/dates/adapters/quarterYearToDate.js
139
+ ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
140
140
 
141
141
 
142
- #### quarterYearToDate(quarterYearDate, time)
142
+ #### getDateFormatRegularExpressionInArray(dateFormat)
143
143
 
144
- Transforms String Date from a [Quarter Year] format to Date object.
144
+ Gets an array of regular expressions by the given date format
145
145
 
146
146
 
147
147
 
@@ -150,8 +150,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
150
150
 
151
151
  | Name | Type | Description | |
152
152
  | ---- | ---- | ----------- | -------- |
153
- | quarterYearDate | | String of [Quarter Year] date |   |
154
- | time | | Flag to parse the object date to milliseconds. |   |
153
+ | dateFormat | | the date format |   |
155
154
 
156
155
 
157
156
 
@@ -159,17 +158,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
159
158
  ##### Returns
160
159
 
161
160
 
162
- - The date object or the date in milliseconds
161
+ - an array of regular expressions
163
162
 
164
163
 
165
164
 
166
165
 
167
- ### dist/dates/adapters/weekYearToDate.js
166
+ ### dist/dates/helpers/getSeparatorByDateFormat.js
168
167
 
169
168
 
170
- #### weekYearToDate(date, time)
169
+ #### getSeparatorByDateFormat(format)
171
170
 
172
- Transforms String Date from a [Week Year] format to Date object.
171
+ Gets the separator of the date format
173
172
 
174
173
 
175
174
 
@@ -178,8 +177,7 @@ Transforms String Date from a [Week Year] format to Date object.
178
177
 
179
178
  | Name | Type | Description | |
180
179
  | ---- | ---- | ----------- | -------- |
181
- | date | | String of [Week Year] date |   |
182
- | time | | Flag to parse the object date to milliseconds. |   |
180
+ | format | | the date format |   |
183
181
 
184
182
 
185
183
 
@@ -187,17 +185,18 @@ Transforms String Date from a [Week Year] format to Date object.
187
185
  ##### Returns
188
186
 
189
187
 
190
- - The date object or the date in milliseconds
188
+ - a separator string
191
189
 
192
190
 
193
191
 
194
192
 
195
- ### dist/dates/adapters/yearToDate.js
193
+ ### dist/dates/helpers/getWeek.js
196
194
 
197
195
 
198
- #### yearToDate(yearDate, time)
196
+ #### getWeek(date)
199
197
 
200
- Transforms String Date from a [Year] format to Date object.
198
+ Gets the week number of the year
199
+ Additionally, the month and the year
201
200
 
202
201
 
203
202
 
@@ -206,8 +205,7 @@ Transforms String Date from a [Year] format to Date object.
206
205
 
207
206
  | Name | Type | Description | |
208
207
  | ---- | ---- | ----------- | -------- |
209
- | yearDate | | String of [Year] date |   |
210
- | time | | Flag to parse the object date to milliseconds. |   |
208
+ | date | | the date object |   |
211
209
 
212
210
 
213
211
 
@@ -215,17 +213,20 @@ Transforms String Date from a [Year] format to Date object.
215
213
  ##### Returns
216
214
 
217
215
 
218
- - The date object or the date in milliseconds
216
+ - an object with the week, month and year.
219
217
 
220
218
 
221
219
 
222
220
 
223
- ### dist/dates/helpers/getDateByDateFormat.js
221
+ ### dist/dates/helpers/validateDate.js
224
222
 
225
223
 
226
- #### getDateByDateFormat(date, format, time)
224
+ #### validateDate(date, format)
227
225
 
228
- Gets a Date Object instance by a Date format
226
+ Validate a string date depending on giving format
227
+ - If the string is a token label, the function lets it pass.
228
+ - Otherwise depends of the format
229
+ - Some escenarios the string is a mix of token labels and dates
229
230
 
230
231
 
231
232
 
@@ -234,9 +235,8 @@ Gets a Date Object instance by a Date format
234
235
 
235
236
  | Name | Type | Description | |
236
237
  | ---- | ---- | ----------- | -------- |
237
- | date | | String with a formatted date |   |
238
- | format | | The date format |   |
239
- | time | | flag to convert the formatted date to miliseconds |   |
238
+ | date | | String of date |   |
239
+ | format | | String of the format to validate |   |
240
240
 
241
241
 
242
242
 
@@ -244,17 +244,17 @@ Gets a Date Object instance by a Date format
244
244
  ##### Returns
245
245
 
246
246
 
247
- - a Date object, milisecond time or the same value if date format does not match.
247
+ - True if it is valid or not. Undefined if date is undefined
248
248
 
249
249
 
250
250
 
251
251
 
252
- ### dist/dates/helpers/getDateFormatByProperty.js
252
+ ### dist/dates/helpers/validateDateByDateFormat.js
253
253
 
254
254
 
255
- #### getDateFormatByProperty(property)
255
+ #### validateDateByDateFormat(date, dateForma)
256
256
 
257
- Gets the date format by the given property
257
+ Validates the given string as Date by its date format.
258
258
 
259
259
 
260
260
 
@@ -263,7 +263,8 @@ Gets the date format by the given property
263
263
 
264
264
  | Name | Type | Description | |
265
265
  | ---- | ---- | ----------- | -------- |
266
- | property | | The Column Property |   |
266
+ | date | | a string to validate as date form |   |
267
+ | dateForma | | the format of the date to validate the string |   |
267
268
 
268
269
 
269
270
 
@@ -271,17 +272,17 @@ Gets the date format by the given property
271
272
  ##### Returns
272
273
 
273
274
 
274
- - The date format
275
+ - true: the string is a valida date
275
276
 
276
277
 
277
278
 
278
279
 
279
- ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
280
+ ### dist/dates/adapters/mdyDateToDate.js
280
281
 
281
282
 
282
- #### getDateFormatRegularExpressionInArray(dateFormat)
283
+ #### mdyDateToDate(monthYearDate, time)
283
284
 
284
- Gets an array of regular expressions by the given date format
285
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
285
286
 
286
287
 
287
288
 
@@ -290,7 +291,8 @@ Gets an array of regular expressions by the given date format
290
291
 
291
292
  | Name | Type | Description | |
292
293
  | ---- | ---- | ----------- | -------- |
293
- | dateFormat | | the date format |   |
294
+ | monthYearDate | | String of [mm/dd/yyyy] date |   |
295
+ | time | | Flag to parse the object date to milliseconds. |   |
294
296
 
295
297
 
296
298
 
@@ -298,17 +300,17 @@ Gets an array of regular expressions by the given date format
298
300
  ##### Returns
299
301
 
300
302
 
301
- - an array of regular expressions
303
+ - The date object or the date in milliseconds
302
304
 
303
305
 
304
306
 
305
307
 
306
- ### dist/dates/helpers/getSeparatorByDateFormat.js
308
+ ### dist/dates/adapters/monthYearToDate.js
307
309
 
308
310
 
309
- #### getSeparatorByDateFormat(format)
311
+ #### monthYearToDate(monthYearDate, time)
310
312
 
311
- Gets the separator of the date format
313
+ Transforms String Date from a [Month Year] format to Date object.
312
314
 
313
315
 
314
316
 
@@ -317,7 +319,8 @@ Gets the separator of the date format
317
319
 
318
320
  | Name | Type | Description | |
319
321
  | ---- | ---- | ----------- | -------- |
320
- | format | | the date format |   |
322
+ | monthYearDate | | String of [Month Year] date |   |
323
+ | time | | Flag to parse the object date to milliseconds. |   |
321
324
 
322
325
 
323
326
 
@@ -325,18 +328,17 @@ Gets the separator of the date format
325
328
  ##### Returns
326
329
 
327
330
 
328
- - a separator string
331
+ - The date object or the date in milliseconds
329
332
 
330
333
 
331
334
 
332
335
 
333
- ### dist/dates/helpers/getWeek.js
336
+ ### dist/dates/adapters/quarterYearToDate.js
334
337
 
335
338
 
336
- #### getWeek(date)
339
+ #### quarterYearToDate(quarterYearDate, time)
337
340
 
338
- Gets the week number of the year
339
- Additionally, the month and the year
341
+ Transforms String Date from a [Quarter Year] format to Date object.
340
342
 
341
343
 
342
344
 
@@ -345,7 +347,8 @@ Additionally, the month and the year
345
347
 
346
348
  | Name | Type | Description | |
347
349
  | ---- | ---- | ----------- | -------- |
348
- | date | | the date object |   |
350
+ | quarterYearDate | | String of [Quarter Year] date |   |
351
+ | time | | Flag to parse the object date to milliseconds. |   |
349
352
 
350
353
 
351
354
 
@@ -353,20 +356,17 @@ Additionally, the month and the year
353
356
  ##### Returns
354
357
 
355
358
 
356
- - an object with the week, month and year.
359
+ - The date object or the date in milliseconds
357
360
 
358
361
 
359
362
 
360
363
 
361
- ### dist/dates/helpers/validateDate.js
364
+ ### dist/dates/adapters/weekYearToDate.js
362
365
 
363
366
 
364
- #### validateDate(date, format)
367
+ #### weekYearToDate(date, time)
365
368
 
366
- Validate a string date depending on giving format
367
- - If the string is a token label, the function lets it pass.
368
- - Otherwise depends of the format
369
- - Some escenarios the string is a mix of token labels and dates
369
+ Transforms String Date from a [Week Year] format to Date object.
370
370
 
371
371
 
372
372
 
@@ -375,8 +375,8 @@ Validate a string date depending on giving format
375
375
 
376
376
  | Name | Type | Description | |
377
377
  | ---- | ---- | ----------- | -------- |
378
- | date | | String of date |   |
379
- | format | | String of the format to validate |   |
378
+ | date | | String of [Week Year] date |   |
379
+ | time | | Flag to parse the object date to milliseconds. |   |
380
380
 
381
381
 
382
382
 
@@ -384,17 +384,17 @@ Validate a string date depending on giving format
384
384
  ##### Returns
385
385
 
386
386
 
387
- - True if it is valid or not. Undefined if date is undefined
387
+ - The date object or the date in milliseconds
388
388
 
389
389
 
390
390
 
391
391
 
392
- ### dist/dates/helpers/validateDateByDateFormat.js
392
+ ### dist/dates/adapters/yearToDate.js
393
393
 
394
394
 
395
- #### validateDateByDateFormat(date, dateForma)
395
+ #### yearToDate(yearDate, time)
396
396
 
397
- Validates the given string as Date by its date format.
397
+ Transforms String Date from a [Year] format to Date object.
398
398
 
399
399
 
400
400
 
@@ -403,8 +403,8 @@ Validates the given string as Date by its date format.
403
403
 
404
404
  | Name | Type | Description | |
405
405
  | ---- | ---- | ----------- | -------- |
406
- | date | | a string to validate as date form |   |
407
- | dateForma | | the format of the date to validate the string |   |
406
+ | yearDate | | String of [Year] date |   |
407
+ | time | | Flag to parse the object date to milliseconds. |   |
408
408
 
409
409
 
410
410
 
@@ -412,7 +412,7 @@ Validates the given string as Date by its date format.
412
412
  ##### Returns
413
413
 
414
414
 
415
- - true: the string is a valida date
415
+ - The date object or the date in milliseconds
416
416
 
417
417
 
418
418
 
@@ -688,12 +688,12 @@ Output:
688
688
 
689
689
 
690
690
 
691
- ### dist/filters/adapters/FDToLogic.js
691
+ ### dist/general/array/delete.js
692
692
 
693
693
 
694
- #### FDToLogic(filterData)
694
+ #### ArrayDelete(array, index)
695
695
 
696
- Generates a Filter Logic structure from Filter Data structure.
696
+ Inmutable Array Item deletion
697
697
 
698
698
 
699
699
 
@@ -702,7 +702,8 @@ Generates a Filter Logic structure from Filter Data structure.
702
702
 
703
703
  | Name | Type | Description | |
704
704
  | ---- | ---- | ----------- | -------- |
705
- | filterData | | The filter data object. |   |
705
+ | array | `Array` | a collection of items to delete |   |
706
+ | index | `Number` | the position of the item to delete |   |
706
707
 
707
708
 
708
709
 
@@ -710,13 +711,20 @@ Generates a Filter Logic structure from Filter Data structure.
710
711
  ##### Returns
711
712
 
712
713
 
713
- - a filter logic array
714
+ - a new Array or the given parameter when is empty or not an array
714
715
 
715
716
 
716
717
 
717
- #### getLogicBodyFromFD21(filterData)
718
718
 
719
- Gets the logic body
719
+ ### dist/general/array/filterNestedTree.js
720
+
721
+
722
+ #### filterNestedTree(arr, childArrKey, condition)
723
+
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
728
 
721
729
 
722
730
 
@@ -725,7 +733,9 @@ Gets the logic body
725
733
 
726
734
  | Name | Type | Description | |
727
735
  | ---- | ---- | ----------- | -------- |
728
- | filterData | | The filter data object |   |
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
739
 
730
740
 
731
741
 
@@ -733,17 +743,17 @@ Gets the logic body
733
743
  ##### Returns
734
744
 
735
745
 
736
- - a filter logic array
746
+ - array filtered
737
747
 
738
748
 
739
749
 
740
750
 
741
- ### dist/filters/adapters/FDToFlatUI.js
751
+ ### dist/general/array/flattenDeep.js
742
752
 
743
753
 
744
- #### FDToFlatUI(filterData, datasetsInfo)
754
+ #### flattenDeep(arr)
745
755
 
746
- Generates a Flattened UI filter structure from Filter Data structure.
756
+ Flat deeply an array
747
757
 
748
758
 
749
759
 
@@ -752,8 +762,7 @@ Generates a Flattened UI filter structure from Filter Data structure.
752
762
 
753
763
  | Name | Type | Description | |
754
764
  | ---- | ---- | ----------- | -------- |
755
- | filterData | | The filter data object. |   |
756
- | datasetsInfo | | Collection of datasets information |   |
765
+ | arr | | Array to flat deeply |   |
757
766
 
758
767
 
759
768
 
@@ -761,13 +770,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
761
770
  ##### Returns
762
771
 
763
772
 
764
- - a flattened UI filters array
773
+ - flatten array
765
774
 
766
775
 
767
776
 
768
- #### FD21ToFlatUI(scopes, datasetsInfo)
769
777
 
770
- Generates a Filter Builder Structure from the Filter Data structure v2.1
778
+ ### dist/general/array/getFirstIndexFromArray.js
779
+
780
+
781
+ #### getFirstIndexFromArray(array, callback)
782
+
783
+ Gets the first index from the array by a callback condition
771
784
 
772
785
 
773
786
 
@@ -776,8 +789,8 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
776
789
 
777
790
  | Name | Type | Description | |
778
791
  | ---- | ---- | ----------- | -------- |
779
- | scopes | | The filter scope section |   |
780
- | datasetsInfo | | Collection of datasets information |   |
792
+ | array | | |   |
793
+ | callback | | function callback |   |
781
794
 
782
795
 
783
796
 
@@ -785,17 +798,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
785
798
  ##### Returns
786
799
 
787
800
 
788
- - a flattened UI filters array
801
+ - the first index of the array. -1 when the condition is not satisfied
789
802
 
790
803
 
791
804
 
792
805
 
793
- ### dist/filters/adapters/FDToUI.js
806
+ ### dist/general/array/getLastIndexFromArray.js
794
807
 
795
808
 
796
- #### FDToUI(filterData, datasetsInfo)
809
+ #### getLastIndexFromArray(array, callback)
797
810
 
798
- Generates a UI filter structure from Filter Data structure.
811
+ Gets the last index from the array by a callback condition
799
812
 
800
813
 
801
814
 
@@ -804,8 +817,8 @@ Generates a UI filter structure from Filter Data structure.
804
817
 
805
818
  | Name | Type | Description | |
806
819
  | ---- | ---- | ----------- | -------- |
807
- | filterData | | The filter data object. |   |
808
- | datasetsInfo | | Collection of datasets information |   |
820
+ | array | | |   |
821
+ | callback | | function callback |   |
809
822
 
810
823
 
811
824
 
@@ -813,13 +826,17 @@ Generates a UI filter structure from Filter Data structure.
813
826
  ##### Returns
814
827
 
815
828
 
816
- - a UI Filters structure
829
+ - the last index of the array. -1 when the condition is not satisfied
817
830
 
818
831
 
819
832
 
820
- #### FD21ToUI(scopes, section, version, datasetsInfo)
821
833
 
822
- Generates a UI filter Structure from the Filter Data structure v2.1
834
+ ### dist/general/function/debounce.js
835
+
836
+
837
+ #### debounce(fn, time)
838
+
839
+ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
823
840
 
824
841
 
825
842
 
@@ -828,10 +845,8 @@ Generates a UI filter Structure from the Filter Data structure v2.1
828
845
 
829
846
  | Name | Type | Description | |
830
847
  | ---- | ---- | ----------- | -------- |
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 |   |
848
+ | fn | `Function` | original Function |   |
849
+ | time | `Number` | default 500ms |   |
835
850
 
836
851
 
837
852
 
@@ -839,17 +854,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
839
854
  ##### Returns
840
855
 
841
856
 
842
- - a UI filter Structure
857
+ - `Function` debounced functions
843
858
 
844
859
 
845
860
 
846
861
 
847
- ### dist/filters/adapters/UIToFD.js
862
+ ### dist/general/function/throttled.js
848
863
 
849
864
 
850
- #### UIToFD(filterData)
865
+ #### throttled(fn, time)
851
866
 
852
- Generates a Filter Data Structure structure from UI Filter Data structure.
867
+ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
853
868
 
854
869
 
855
870
 
@@ -858,7 +873,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
858
873
 
859
874
  | Name | Type | Description | |
860
875
  | ---- | ---- | ----------- | -------- |
861
- | filterData | | The UI filter data object. |   |
876
+ | fn | `Function` | original Function |   |
877
+ | time | `Number` | default 500ms |   |
862
878
 
863
879
 
864
880
 
@@ -866,13 +882,18 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
866
882
  ##### Returns
867
883
 
868
884
 
869
- - a Filter Data structure
885
+ - `Function` throttled function
870
886
 
871
887
 
872
888
 
873
- #### UI21ToFD(uFilterData, version)
874
889
 
875
- Builds the Fitler Data structure from UI filter data
890
+ ### dist/general/object/cloneDeep.js
891
+
892
+
893
+ #### cloneDeep(obj)
894
+
895
+ A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
896
+ Not to use this function with inner objects and functions
876
897
 
877
898
 
878
899
 
@@ -881,8 +902,7 @@ Builds the Fitler Data structure from UI filter data
881
902
 
882
903
  | Name | Type | Description | |
883
904
  | ---- | ---- | ----------- | -------- |
884
- | uFilterData | | The UI filter Data object |   |
885
- | version | | the version of the structure |   |
905
+ | obj | | The object |   |
886
906
 
887
907
 
888
908
 
@@ -890,17 +910,21 @@ Builds the Fitler Data structure from UI filter data
890
910
  ##### Returns
891
911
 
892
912
 
893
- -
913
+ - The new reference object or the given object if the parsing is incorrect or empty
894
914
 
895
915
 
896
916
 
897
917
 
898
- ### dist/filters/adapters/UIToFlatUI.js
918
+ ### dist/general/object/get.js
899
919
 
900
920
 
901
- #### UIToFlatUI(filterData, datasetsInfo)
921
+ #### _get(baseObject, path, defaultValue)
902
922
 
903
- Generates a Flattened UI filter structure from UI Filter Data structure.
923
+ Like lodash _.get.
924
+ Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
925
+
926
+ Empty arrays and empty objects are returned but the defaultValue is not
927
+ Undefined and null values will return the defaultValue.
904
928
 
905
929
 
906
930
 
@@ -909,22 +933,59 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
909
933
 
910
934
  | Name | Type | Description | |
911
935
  | ---- | ---- | ----------- | -------- |
912
- | filterData | | The UI filter data object. |   |
913
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
936
+ | baseObject | | The object to query |   |
937
+ | path | | The string path or collection of string paths of the property to get. |   |
938
+ | defaultValue | | The value returned for undefined resolved values. |   |
939
+
914
940
 
915
941
 
916
942
 
943
+ ##### Examples
944
+
945
+ ```javascript
946
+ // returns 'Hello'
947
+ _get({ item1: 'Hello', item2: 'World' }, 'item1')
948
+ ```
949
+ ```javascript
950
+ // returns 'A simple Hello'
951
+ _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
952
+ ```
953
+ ```javascript
954
+ // returns 'Hello Again'
955
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
956
+ ```
957
+ ```javascript
958
+ // returns 'Hello 2'
959
+ _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
960
+ ```
961
+ ```javascript
962
+ // returns 'Hello Again'
963
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
964
+ ```
965
+
917
966
 
918
967
  ##### Returns
919
968
 
920
969
 
921
- - a flattened UI filters array
970
+ - the resolved value.
922
971
 
923
972
 
924
973
 
925
- #### UI21ToFlatUI(scopes)
926
974
 
927
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
975
+ ### dist/general/object/getAttribute.js
976
+
977
+
978
+ #### getAttribute(obj, key)
979
+
980
+ Searchs for properties in different case styles such as: lower, upper, camel and pascal
981
+ - To optimize the searching, it is required a key in a snake_case style
982
+ - List of cases that do not match
983
+ -- From lower to snake case
984
+ -- From upper to snake case
985
+ -- From lower to camel case
986
+ -- From upper to camel case
987
+ -- From lower to pascal case
988
+ -- From upper to pascal case
928
989
 
929
990
 
930
991
 
@@ -933,26 +994,33 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
933
994
 
934
995
  | Name | Type | Description | |
935
996
  | ---- | ---- | ----------- | -------- |
936
- | scopes | | The filter scope section |   |
997
+ | obj | `object` | object to look for |   |
998
+ | key | `string` | String attribute in snake_case style |   |
937
999
 
938
1000
 
939
1001
 
940
1002
 
1003
+ ##### Examples
1004
+
1005
+ ```javascript
1006
+ getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
1007
+ ```
1008
+
1009
+
941
1010
  ##### Returns
942
1011
 
943
1012
 
944
- - a flattened UI filters array
1013
+ - `Void`
945
1014
 
946
1015
 
947
1016
 
948
1017
 
949
- ### dist/filters/adapters/adaptDateGroupingProperty.js
1018
+ ### dist/general/object/hasProperty.js
950
1019
 
951
1020
 
952
- #### adaptDateGroupingProperty(property)
1021
+ #### _hasProperty(obj, property)
953
1022
 
954
- [TODO: For 2022, eliminate this adapter]
955
- Get the new property base on the old date grouping properties
1023
+ Use the hasOwnProperty in order to verify if the given property exists in the object.
956
1024
 
957
1025
 
958
1026
 
@@ -961,25 +1029,38 @@ Get the new property base on the old date grouping properties
961
1029
 
962
1030
  | Name | Type | Description | |
963
1031
  | ---- | ---- | ----------- | -------- |
964
- | property | | |   |
1032
+ | obj | `object` | an object |   |
1033
+ | property | `string` | String to verify if exists in the object as property |   |
1034
+
1035
+
1036
+
1037
+
1038
+ ##### Examples
965
1039
 
1040
+ ```javascript
1041
+ const prop = 'prop2'
1042
+ const obj1 = { prop1: 'hello', prop2: 'world'}
1043
+ _hasProperty(ob1, prop1) // true
966
1044
 
1045
+ const obj2 = { prop1: 'hello world' }
1046
+ _hasProperty(ob1, prop2) // false
1047
+ ```
967
1048
 
968
1049
 
969
1050
  ##### Returns
970
1051
 
971
1052
 
972
- -
1053
+ - True if the object has the given property; otherwise, false.
973
1054
 
974
1055
 
975
1056
 
976
1057
 
977
- ### dist/filters/adapters/adaptFilterData.js
1058
+ ### dist/general/object/isObject.js
978
1059
 
979
1060
 
980
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1061
+ #### isObject(obj)
981
1062
 
982
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
1063
+ Checks if the given argument is an object type
983
1064
 
984
1065
 
985
1066
 
@@ -988,9 +1069,7 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
988
1069
 
989
1070
  | Name | Type | Description | |
990
1071
  | ---- | ---- | ----------- | -------- |
991
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 |   |
992
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) |   |
993
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory |   |
1072
+ | obj | | the variable to check |   |
994
1073
 
995
1074
 
996
1075
 
@@ -998,18 +1077,18 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
998
1077
  ##### Returns
999
1078
 
1000
1079
 
1001
- - A new filter data structure v2.1
1080
+ - True: It is an object; False: It is not.
1002
1081
 
1003
1082
 
1004
1083
 
1005
1084
 
1006
- ### dist/filters/adapters/adaptFilterValues.js
1085
+ ### dist/general/object/mapValues.js
1007
1086
 
1008
1087
 
1009
- #### adaptFilterValues(filter)
1088
+ #### mapValues(baseObject, iteratee)
1010
1089
 
1011
- [TODO: For 2022, eliminate this adapter]
1012
- Gets an adapted filter value array. Validates the enabled property and sets
1090
+ Invoke iteratee (function) for each object key-value pair
1091
+ and return a mapped object
1013
1092
 
1014
1093
 
1015
1094
 
@@ -1018,7 +1097,8 @@ Gets an adapted filter value array. Validates the enabled property and sets
1018
1097
 
1019
1098
  | Name | Type | Description | |
1020
1099
  | ---- | ---- | ----------- | -------- |
1021
- | filter | | The filter |   |
1100
+ | baseObject | `Object` | Base object. |   |
1101
+ | iteratee | `Function` | The executed per iteration. |   |
1022
1102
 
1023
1103
 
1024
1104
 
@@ -1026,17 +1106,18 @@ Gets an adapted filter value array. Validates the enabled property and sets
1026
1106
  ##### Returns
1027
1107
 
1028
1108
 
1029
- - A new value array with the filled properties.
1109
+ - `Object` New mapped object.
1030
1110
 
1031
1111
 
1032
1112
 
1033
1113
 
1034
- ### dist/filters/adapters/flatUIToFD.js
1114
+ ### dist/general/object/mergeDeep.js
1035
1115
 
1036
1116
 
1037
- #### flatUIToFD(uFilters, version)
1117
+ #### mergeDeep(obj1, obj2, settings)
1038
1118
 
1039
- Generates a filter data structure from the flatttened UI filters.
1119
+ Merges two objects into a new one.
1120
+ The second given argument to the first given argument.
1040
1121
 
1041
1122
 
1042
1123
 
@@ -1045,8 +1126,9 @@ Generates a filter data structure from the flatttened UI filters.
1045
1126
 
1046
1127
  | Name | Type | Description | |
1047
1128
  | ---- | ---- | ----------- | -------- |
1048
- | uFilters | | Array of flattened filters from UI |   |
1049
- | version | | Tag for the version of the filter data structure |   |
1129
+ | obj1 | | The target object |   |
1130
+ | obj2 | | The object to be merged |   |
1131
+ | settings | | Object settings for this function |   |
1050
1132
 
1051
1133
 
1052
1134
 
@@ -1054,14 +1136,13 @@ Generates a filter data structure from the flatttened UI filters.
1054
1136
  ##### Returns
1055
1137
 
1056
1138
 
1057
- - a Filter Data.
1139
+ - a new merged object
1058
1140
 
1059
1141
 
1060
1142
 
1061
- #### buildScopes(fbFilters)
1143
+ #### isValid(obj1, obj2)
1062
1144
 
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
1145
+ Validates if the two arguments are objects
1065
1146
 
1066
1147
 
1067
1148
 
@@ -1070,7 +1151,8 @@ Also, adds and organizes filters by datasets
1070
1151
 
1071
1152
  | Name | Type | Description | |
1072
1153
  | ---- | ---- | ----------- | -------- |
1073
- | fbFilters | | Array of flat filters from UI |   |
1154
+ | obj1 | | The target object |   |
1155
+ | obj2 | | The object to be merged |   |
1074
1156
 
1075
1157
 
1076
1158
 
@@ -1078,13 +1160,13 @@ Also, adds and organizes filters by datasets
1078
1160
  ##### Returns
1079
1161
 
1080
1162
 
1081
- - an array of scopes structure.
1163
+ - true: they are valid; false: they are not
1082
1164
 
1083
1165
 
1084
1166
 
1085
- #### buildScope(uFilter)
1167
+ #### getParamsToMergeDeep(settings)
1086
1168
 
1087
- Gets an scope structure for the filter data
1169
+ Validates and gets the settings with all set parameters.
1088
1170
 
1089
1171
 
1090
1172
 
@@ -1093,7 +1175,7 @@ Gets an scope structure for the filter data
1093
1175
 
1094
1176
  | Name | Type | Description | |
1095
1177
  | ---- | ---- | ----------- | -------- |
1096
- | uFilter | | UI structure filter |   |
1178
+ | settings | | the settings object |   |
1097
1179
 
1098
1180
 
1099
1181
 
@@ -1101,13 +1183,17 @@ Gets an scope structure for the filter data
1101
1183
  ##### Returns
1102
1184
 
1103
1185
 
1104
- - an scope structure
1186
+ - a new settings object with all set parameters.
1105
1187
 
1106
1188
 
1107
1189
 
1108
- #### buildDataset(uFilter)
1109
1190
 
1110
- Gets an dataset structure for the filter data
1191
+ ### dist/general/object/objectCopy.js
1192
+
1193
+
1194
+ #### objectCopy(entity, cache)
1195
+
1196
+ Created a new reference of the given argument
1111
1197
 
1112
1198
 
1113
1199
 
@@ -1116,7 +1202,8 @@ Gets an dataset structure for the filter data
1116
1202
 
1117
1203
  | Name | Type | Description | |
1118
1204
  | ---- | ---- | ----------- | -------- |
1119
- | uFilter | | a UI structure filter |   |
1205
+ | entity | | The variable to be copied |   |
1206
+ | cache | | |   |
1120
1207
 
1121
1208
 
1122
1209
 
@@ -1124,13 +1211,17 @@ Gets an dataset structure for the filter data
1124
1211
  ##### Returns
1125
1212
 
1126
1213
 
1127
- - an dataset structure
1214
+ - A new reference of the given argument
1128
1215
 
1129
1216
 
1130
1217
 
1131
- #### buildFilter(uFilter)
1132
1218
 
1133
- Gets an filter structure for the filter data
1219
+ ### dist/general/object/omit.js
1220
+
1221
+
1222
+ #### omit(obj, props)
1223
+
1224
+ return a new Object excluding attributes in _props_ list
1134
1225
 
1135
1226
 
1136
1227
 
@@ -1139,7 +1230,8 @@ Gets an filter structure for the filter data
1139
1230
 
1140
1231
  | Name | Type | Description | |
1141
1232
  | ---- | ---- | ----------- | -------- |
1142
- | uFilter | | a UI structure filter |   |
1233
+ | obj | `Object` | base object |   |
1234
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
1143
1235
 
1144
1236
 
1145
1237
 
@@ -1147,17 +1239,17 @@ Gets an filter structure for the filter data
1147
1239
  ##### Returns
1148
1240
 
1149
1241
 
1150
- - an filter structure
1242
+ - `Object` clean object
1151
1243
 
1152
1244
 
1153
1245
 
1154
1246
 
1155
- ### dist/filters/adapters/flatUIToLogic.js
1247
+ ### dist/general/object/pick.js
1156
1248
 
1157
1249
 
1158
- #### flatUIToLogic(uFilter)
1250
+ #### pick(baseObject, keys)
1159
1251
 
1160
- Generates a Logic structure from flattened UI filters
1252
+ return a new object just with attributes in _keys_ list
1161
1253
 
1162
1254
 
1163
1255
 
@@ -1166,7 +1258,8 @@ Generates a Logic structure from flattened UI filters
1166
1258
 
1167
1259
  | Name | Type | Description | |
1168
1260
  | ---- | ---- | ----------- | -------- |
1169
- | uFilter | | Array of flat filters from UI | &nbsp; |
1261
+ | baseObject | `Object` | base object | &nbsp; |
1262
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
1170
1263
 
1171
1264
 
1172
1265
 
@@ -1174,17 +1267,17 @@ Generates a Logic structure from flattened UI filters
1174
1267
  ##### Returns
1175
1268
 
1176
1269
 
1177
- - The logic structure
1270
+ - `Object` new object just with desired attributes
1178
1271
 
1179
1272
 
1180
1273
 
1181
1274
 
1182
- ### dist/filters/adapters/flatUIToOldLogic.js
1275
+ ### dist/general/object/serialize.js
1183
1276
 
1184
1277
 
1185
- #### flatUIToOldLogic(uFilters)
1278
+ #### serialize(obj)
1186
1279
 
1187
- Generates a Logic structure from flattened UI filters
1280
+ serialize object to url param
1188
1281
 
1189
1282
 
1190
1283
 
@@ -1193,7 +1286,7 @@ Generates a Logic structure from flattened UI filters
1193
1286
 
1194
1287
  | Name | Type | Description | |
1195
1288
  | ---- | ---- | ----------- | -------- |
1196
- | uFilters | | Array of flat filters from UI | &nbsp; |
1289
+ | obj | | - Object to be serialized | &nbsp; |
1197
1290
 
1198
1291
 
1199
1292
 
@@ -1201,17 +1294,17 @@ Generates a Logic structure from flattened UI filters
1201
1294
  ##### Returns
1202
1295
 
1203
1296
 
1204
- - The logic structure
1297
+ - `Void`
1205
1298
 
1206
1299
 
1207
1300
 
1208
1301
 
1209
- ### dist/filters/adapters/flatUIToUI.js
1302
+ ### dist/general/string/capitalize.js
1210
1303
 
1211
1304
 
1212
- #### flatUIToUI(uFilters, version)
1305
+ #### capitalize(text)
1213
1306
 
1214
- Generates a UI filter data structure from the flatttened UI filters.
1307
+ Upper case the first letter of a given text
1215
1308
 
1216
1309
 
1217
1310
 
@@ -1220,8 +1313,7 @@ Generates a UI filter data structure from the flatttened UI filters.
1220
1313
 
1221
1314
  | Name | Type | Description | |
1222
1315
  | ---- | ---- | ----------- | -------- |
1223
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
- | version | | Tag for the version of the filter data structure | &nbsp; |
1316
+ | text | `String` | | &nbsp; |
1225
1317
 
1226
1318
 
1227
1319
 
@@ -1229,14 +1321,18 @@ Generates a UI filter data structure from the flatttened UI filters.
1229
1321
  ##### Returns
1230
1322
 
1231
1323
 
1232
- - a UI Filter Data.
1324
+ - `String` a capitalized text
1233
1325
 
1234
1326
 
1235
1327
 
1236
- #### buildScopes(fbFilters)
1237
1328
 
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
1329
+ ### dist/general/mix/compareDeep.js
1330
+
1331
+
1332
+ #### compareDeep(object1, object2)
1333
+
1334
+ Compares two objects to know if they are equals. Go across nested objects.
1335
+ Includes arrays in the comparison.
1240
1336
 
1241
1337
 
1242
1338
 
@@ -1245,7 +1341,8 @@ Also, adds and organizes filters by datasets
1245
1341
 
1246
1342
  | Name | Type | Description | |
1247
1343
  | ---- | ---- | ----------- | -------- |
1248
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1344
+ | object1 | | First Object to compare | &nbsp; |
1345
+ | object2 | | Second Object to compare | &nbsp; |
1249
1346
 
1250
1347
 
1251
1348
 
@@ -1253,13 +1350,17 @@ Also, adds and organizes filters by datasets
1253
1350
  ##### Returns
1254
1351
 
1255
1352
 
1256
- - an array of scopes structure.
1353
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1257
1354
 
1258
1355
 
1259
1356
 
1260
- #### buildScope(uFilter)
1261
1357
 
1262
- Gets an scope structure for the UI filter data
1358
+ ### dist/general/mix/getTag.js
1359
+
1360
+
1361
+ #### getTag(value)
1362
+
1363
+ Gets the `toStringTag` of `value`.
1263
1364
 
1264
1365
 
1265
1366
 
@@ -1268,7 +1369,7 @@ Gets an scope structure for the UI filter data
1268
1369
 
1269
1370
  | Name | Type | Description | |
1270
1371
  | ---- | ---- | ----------- | -------- |
1271
- | uFilter | | UI structure filter | &nbsp; |
1372
+ | value | | The value to query. | &nbsp; |
1272
1373
 
1273
1374
 
1274
1375
 
@@ -1276,63 +1377,73 @@ Gets an scope structure for the UI filter data
1276
1377
  ##### Returns
1277
1378
 
1278
1379
 
1279
- - an scope structure
1380
+ - `string` Returns the `toStringTag`.
1280
1381
 
1281
1382
 
1282
1383
 
1283
- #### buildDataset(uFilter)
1284
1384
 
1285
- Gets an dataset structure for the UI filter data
1385
+ ### dist/general/mix/importScripts.js
1286
1386
 
1287
1387
 
1388
+ #### importScripts(scripts)
1288
1389
 
1390
+ Import a set of external Scripts given the URL in both serie and cascade way
1289
1391
 
1290
- ##### Parameters
1291
1392
 
1292
- | Name | Type | Description | |
1293
- | ---- | ---- | ----------- | -------- |
1294
- | uFilter | | a UI structure filter | &nbsp; |
1295
1393
 
1296
1394
 
1395
+ ##### Parameters
1297
1396
 
1397
+ | Name | Type | Description | |
1398
+ | ---- | ---- | ----------- | -------- |
1399
+ | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1400
+ | scripts.url | `String` | CDN URL | &nbsp; |
1401
+ | 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; |
1402
+ | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1403
+ | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1404
+ | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
1298
1405
 
1299
- ##### Returns
1300
1406
 
1301
1407
 
1302
- - an dataset structure
1303
1408
 
1409
+ ##### Examples
1304
1410
 
1411
+ ```javascript
1412
+ // 1) Simple script (paralell loading)
1413
+ importScripts(['http://myscript.js', 'http://another.js']);
1305
1414
 
1306
- #### buildFilter(uFilter)
1307
-
1308
- Gets an filter structure for the UI filter data
1309
-
1310
-
1311
-
1312
-
1313
- ##### Parameters
1314
-
1315
- | Name | Type | Description | |
1316
- | ---- | ---- | ----------- | -------- |
1317
- | uFilter | | a UI structure filter | &nbsp; |
1415
+ // 2) Loading `.js` and `.esm.js` script (parallel loading)
1416
+ importScripts([
1417
+ { url: 'http://myscript.esm.js', type: 'module' },
1418
+ { url: 'http://myscript.js', noModule: true }
1419
+ ]);
1318
1420
 
1421
+ // 3) import dependent scripts (cascade)
1422
+ importScripts([
1423
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1424
+ ]);
1319
1425
 
1426
+ // 4) mix
1427
+ importScripts([
1428
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1429
+ { url: 'http://another.esm.js', type: 'module' },
1430
+ { url: 'http://another.js', noModule: true },
1431
+ 'http://simplescript.js'
1432
+ ]);
1433
+ ```
1320
1434
 
1321
1435
 
1322
1436
  ##### Returns
1323
1437
 
1324
1438
 
1325
- - an filter structure
1326
-
1327
-
1439
+ - `Promise` Promise when all script have been loaded
1328
1440
 
1329
1441
 
1330
- ### dist/filters/adapters/logicToFD.js
1331
1442
 
1443
+ #### loadScript(url, type, noModule)
1332
1444
 
1333
- #### logicToFD(filterData, version)
1334
-
1335
- Generates a filter data structure from the old logic structure (v2.0).
1445
+ Creates the script element and appends to document.head
1446
+ return a Promise that is resolved when the script is loaded
1336
1447
 
1337
1448
 
1338
1449
 
@@ -1341,8 +1452,9 @@ Generates a filter data structure from the old logic structure (v2.0).
1341
1452
 
1342
1453
  | Name | Type | Description | |
1343
1454
  | ---- | ---- | ----------- | -------- |
1344
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
- | version | | Tag for the version of the filter data structure | &nbsp; |
1455
+ | url | `String` | Cdn Url | &nbsp; |
1456
+ | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1457
+ | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1346
1458
 
1347
1459
 
1348
1460
 
@@ -1350,17 +1462,17 @@ Generates a filter data structure from the old logic structure (v2.0).
1350
1462
  ##### Returns
1351
1463
 
1352
1464
 
1353
- - a Filter Data.
1465
+ - `Void`
1354
1466
 
1355
1467
 
1356
1468
 
1357
1469
 
1358
- ### dist/filters/adapters/logicToFlatUI.js
1470
+ ### dist/general/mix/isEmpty.js
1359
1471
 
1360
1472
 
1361
- #### logicToFlatUI(logics)
1473
+ #### isEmpty(variable, includeFalsy)
1362
1474
 
1363
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1475
+ Validates if the given argument is empty
1364
1476
 
1365
1477
 
1366
1478
 
@@ -1369,7 +1481,8 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1369
1481
 
1370
1482
  | Name | Type | Description | |
1371
1483
  | ---- | ---- | ----------- | -------- |
1372
- | logics | | The old logic structure (v2.0) | &nbsp; |
1484
+ | variable | | the given variable | &nbsp; |
1485
+ | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1373
1486
 
1374
1487
 
1375
1488
 
@@ -1377,38 +1490,19 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1377
1490
  ##### Returns
1378
1491
 
1379
1492
 
1380
- - The Flattened UI Filters array
1381
-
1382
-
1383
-
1384
- #### getFilter(filters, filter, getIndex)
1385
-
1386
- Get the filter or the index of the given array, validating an old filter structure.
1387
-
1388
-
1389
-
1390
-
1391
- ##### Parameters
1392
-
1393
- | Name | Type | Description | |
1394
- | ---- | ---- | ----------- | -------- |
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; |
1398
-
1399
-
1493
+ - true: the given argument is empty; false: is not.
1400
1494
 
1401
1495
 
1402
- ##### Returns
1403
1496
 
1404
1497
 
1405
- - the index or the UI filter object
1406
-
1498
+ ### dist/general/mix/isNaNV2.js
1407
1499
 
1408
1500
 
1409
- #### refineRankingValues(values, uiValues)
1501
+ #### isNaNV2(variable)
1410
1502
 
1411
- Refines the values of the Ranking column type.
1503
+ Validates if the recieved number is NaN type.
1504
+ This function recieves any variable but will return false.
1505
+ Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
1412
1506
 
1413
1507
 
1414
1508
 
@@ -1417,8 +1511,7 @@ Refines the values of the Ranking column type.
1417
1511
 
1418
1512
  | Name | Type | Description | |
1419
1513
  | ---- | ---- | ----------- | -------- |
1420
- | values | | the Array of Ranking values | &nbsp; |
1421
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1514
+ | variable | | the variable to validate | &nbsp; |
1422
1515
 
1423
1516
 
1424
1517
 
@@ -1426,17 +1519,18 @@ Refines the values of the Ranking column type.
1426
1519
  ##### Returns
1427
1520
 
1428
1521
 
1429
- - the array of Ranking values
1522
+ - True if variable is a NaN or false otherwise
1430
1523
 
1431
1524
 
1432
1525
 
1433
1526
 
1434
- ### dist/filters/adapters/logicToUI.js
1527
+ ### dist/general/mix/isNull.js
1435
1528
 
1436
1529
 
1437
- #### logicToUI(uFilters, datasetsInfo)
1530
+ #### isNull(arg)
1438
1531
 
1439
- Generates a UI filter structure from the old logic structure (v2.0).
1532
+ return if a given variable is either `null` or `undefined`
1533
+ useful to avoid falsify validating Number Zero (0)
1440
1534
 
1441
1535
 
1442
1536
 
@@ -1445,8 +1539,7 @@ Generates a UI filter structure from the old logic structure (v2.0).
1445
1539
 
1446
1540
  | Name | Type | Description | |
1447
1541
  | ---- | ---- | ----------- | -------- |
1448
- | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1542
+ | arg | `any` | | &nbsp; |
1450
1543
 
1451
1544
 
1452
1545
 
@@ -1454,17 +1547,19 @@ Generates a UI filter structure from the old logic structure (v2.0).
1454
1547
  ##### Returns
1455
1548
 
1456
1549
 
1457
- - a UI Filter Data.
1550
+ - `Boolean`
1458
1551
 
1459
1552
 
1460
1553
 
1461
1554
 
1462
- ### dist/filters/adapters/transformFilters.js
1555
+ ### dist/general/mix/randomId.js
1463
1556
 
1464
1557
 
1465
- #### transformFilters(oldFiltersObj, section)
1558
+ #### randomId(length, exclude)
1466
1559
 
1467
- Transform the old filters structure into the new one
1560
+ Creates a random string
1561
+ - If the first given argument is different than a length number, the variable is replaced by a default number
1562
+ - If the optional second given argument is passed the random string is permutated.
1468
1563
 
1469
1564
 
1470
1565
 
@@ -1473,79 +1568,8 @@ Transform the old filters structure into the new one
1473
1568
 
1474
1569
  | Name | Type | Description | |
1475
1570
  | ---- | ---- | ----------- | -------- |
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
-
1479
-
1480
-
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
-
1532
-
1533
- ##### Returns
1534
-
1535
-
1536
- - `Object` an object with the new filters structure
1537
-
1538
-
1539
-
1540
-
1541
- ### dist/filters/classes/FilterInputErrorHandler.js
1542
-
1543
-
1544
- #### new FilterInputErrorHandler()
1545
-
1546
-
1547
-
1548
-
1571
+ | length | `Number` | size of the generated string. Default 8 | &nbsp; |
1572
+ | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
1549
1573
 
1550
1574
 
1551
1575
 
@@ -1553,17 +1577,19 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1553
1577
  ##### Returns
1554
1578
 
1555
1579
 
1556
- - `Void`
1580
+ - `String` Random string
1557
1581
 
1558
1582
 
1559
1583
 
1560
1584
 
1561
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
1585
+ ### dist/general/mix/size.js
1562
1586
 
1563
1587
 
1564
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1588
+ #### size(obj)
1565
1589
 
1566
- [TODO: Make a proper description for this function]
1590
+ Gets the length of the given array.
1591
+ - Useful for Object, Array and string type.
1592
+ - For `null` or `undefined` or else argument the returned value will be 0.
1567
1593
 
1568
1594
 
1569
1595
 
@@ -1572,9 +1598,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1572
1598
 
1573
1599
  | Name | Type | Description | |
1574
1600
  | ---- | ---- | ----------- | -------- |
1575
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
- | scopes | | | &nbsp; |
1577
- | currentScope | | | &nbsp; |
1601
+ | obj | `Any` | Any object-type variable | &nbsp; |
1578
1602
 
1579
1603
 
1580
1604
 
@@ -1582,17 +1606,17 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1582
1606
  ##### Returns
1583
1607
 
1584
1608
 
1585
- -
1609
+ - `Number` the size of the given variable
1586
1610
 
1587
1611
 
1588
1612
 
1589
1613
 
1590
- ### dist/filters/helpers/getAvailableScopes.js
1614
+ ### dist/filters/adapters/FDToFlatUI.js
1591
1615
 
1592
1616
 
1593
- #### getAvailableScopes(config)
1617
+ #### FDToFlatUI(filterData, datasetsInfo)
1594
1618
 
1595
- Gets Scopes/Scope IDs by given IDs
1619
+ Generates a Flattened UI filter structure from Filter Data structure.
1596
1620
 
1597
1621
 
1598
1622
 
@@ -1601,7 +1625,8 @@ Gets Scopes/Scope IDs by given IDs
1601
1625
 
1602
1626
  | Name | Type | Description | |
1603
1627
  | ---- | ---- | ----------- | -------- |
1604
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
1628
+ | filterData | | The filter data object. | &nbsp; |
1629
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1605
1630
 
1606
1631
 
1607
1632
 
@@ -1609,17 +1634,13 @@ Gets Scopes/Scope IDs by given IDs
1609
1634
  ##### Returns
1610
1635
 
1611
1636
 
1612
- - a Scopes/Scope IDs array
1613
-
1614
-
1615
-
1637
+ - a flattened UI filters array
1616
1638
 
1617
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1618
1639
 
1619
1640
 
1620
- #### getAvailableScopesIDsByConfig(config)
1641
+ #### FD21ToFlatUI(scopes, datasetsInfo)
1621
1642
 
1622
- Gets the Scopes IDS for the Available Scope function by any config
1643
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
1623
1644
 
1624
1645
 
1625
1646
 
@@ -1628,7 +1649,8 @@ Gets the Scopes IDS for the Available Scope function by any config
1628
1649
 
1629
1650
  | Name | Type | Description | |
1630
1651
  | ---- | ---- | ----------- | -------- |
1631
- | config | | any config | &nbsp; |
1652
+ | scopes | | The filter scope section | &nbsp; |
1653
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1632
1654
 
1633
1655
 
1634
1656
 
@@ -1636,17 +1658,17 @@ Gets the Scopes IDS for the Available Scope function by any config
1636
1658
  ##### Returns
1637
1659
 
1638
1660
 
1639
- - a Available Scope IDS config
1661
+ - a flattened UI filters array
1640
1662
 
1641
1663
 
1642
1664
 
1643
1665
 
1644
- ### dist/filters/helpers/getScopesByHierarchy.js
1666
+ ### dist/filters/adapters/FDToLogic.js
1645
1667
 
1646
1668
 
1647
- #### getScopesByHierarchy(scopes, currentScope)
1669
+ #### FDToLogic(filterData)
1648
1670
 
1649
- [TODO: Make a description for this]
1671
+ Generates a Filter Logic structure from Filter Data structure.
1650
1672
 
1651
1673
 
1652
1674
 
@@ -1655,8 +1677,7 @@ Gets the Scopes IDS for the Available Scope function by any config
1655
1677
 
1656
1678
  | Name | Type | Description | |
1657
1679
  | ---- | ---- | ----------- | -------- |
1658
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
- | currentScope | | Current scope type | &nbsp; |
1680
+ | filterData | | The filter data object. | &nbsp; |
1660
1681
 
1661
1682
 
1662
1683
 
@@ -1664,17 +1685,13 @@ Gets the Scopes IDS for the Available Scope function by any config
1664
1685
  ##### Returns
1665
1686
 
1666
1687
 
1667
- - A new array of Scopes/Scope IDs
1668
-
1669
-
1670
-
1688
+ - a filter logic array
1671
1689
 
1672
- ### dist/general/array/delete.js
1673
1690
 
1674
1691
 
1675
- #### ArrayDelete(array, index)
1692
+ #### getLogicBodyFromFD21(filterData)
1676
1693
 
1677
- Inmutable Array Item deletion
1694
+ Gets the logic body
1678
1695
 
1679
1696
 
1680
1697
 
@@ -1683,8 +1700,7 @@ Inmutable Array Item deletion
1683
1700
 
1684
1701
  | Name | Type | Description | |
1685
1702
  | ---- | ---- | ----------- | -------- |
1686
- | array | `Array` | a collection of items to delete | &nbsp; |
1687
- | index | `Number` | the position of the item to delete | &nbsp; |
1703
+ | filterData | | The filter data object | &nbsp; |
1688
1704
 
1689
1705
 
1690
1706
 
@@ -1692,20 +1708,17 @@ Inmutable Array Item deletion
1692
1708
  ##### Returns
1693
1709
 
1694
1710
 
1695
- - a new Array or the given parameter when is empty or not an array
1711
+ - a filter logic array
1696
1712
 
1697
1713
 
1698
1714
 
1699
1715
 
1700
- ### dist/general/array/filterNestedTree.js
1716
+ ### dist/filters/adapters/FDToUI.js
1701
1717
 
1702
1718
 
1703
- #### filterNestedTree(arr, childArrKey, condition)
1719
+ #### FDToUI(filterData, datasetsInfo)
1704
1720
 
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
1721
+ Generates a UI filter structure from Filter Data structure.
1709
1722
 
1710
1723
 
1711
1724
 
@@ -1714,9 +1727,8 @@ Filters a nested tree array by a custom condition on the last child node
1714
1727
 
1715
1728
  | Name | Type | Description | |
1716
1729
  | ---- | ---- | ----------- | -------- |
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; |
1730
+ | filterData | | The filter data object. | &nbsp; |
1731
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1720
1732
 
1721
1733
 
1722
1734
 
@@ -1724,17 +1736,13 @@ Filters a nested tree array by a custom condition on the last child node
1724
1736
  ##### Returns
1725
1737
 
1726
1738
 
1727
- - array filtered
1728
-
1729
-
1730
-
1739
+ - a UI Filters structure
1731
1740
 
1732
- ### dist/general/array/flattenDeep.js
1733
1741
 
1734
1742
 
1735
- #### flattenDeep(arr)
1743
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
1736
1744
 
1737
- Flat deeply an array
1745
+ Generates a UI filter Structure from the Filter Data structure v2.1
1738
1746
 
1739
1747
 
1740
1748
 
@@ -1743,7 +1751,10 @@ Flat deeply an array
1743
1751
 
1744
1752
  | Name | Type | Description | |
1745
1753
  | ---- | ---- | ----------- | -------- |
1746
- | arr | | Array to flat deeply | &nbsp; |
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; |
1747
1758
 
1748
1759
 
1749
1760
 
@@ -1751,17 +1762,17 @@ Flat deeply an array
1751
1762
  ##### Returns
1752
1763
 
1753
1764
 
1754
- - flatten array
1765
+ - a UI filter Structure
1755
1766
 
1756
1767
 
1757
1768
 
1758
1769
 
1759
- ### dist/general/array/getFirstIndexFromArray.js
1770
+ ### dist/filters/adapters/UIToFD.js
1760
1771
 
1761
1772
 
1762
- #### getFirstIndexFromArray(array, callback)
1773
+ #### UIToFD(filterData)
1763
1774
 
1764
- Gets the first index from the array by a callback condition
1775
+ Generates a Filter Data Structure structure from UI Filter Data structure.
1765
1776
 
1766
1777
 
1767
1778
 
@@ -1770,8 +1781,7 @@ Gets the first index from the array by a callback condition
1770
1781
 
1771
1782
  | Name | Type | Description | |
1772
1783
  | ---- | ---- | ----------- | -------- |
1773
- | array | | | &nbsp; |
1774
- | callback | | function callback | &nbsp; |
1784
+ | filterData | | The UI filter data object. | &nbsp; |
1775
1785
 
1776
1786
 
1777
1787
 
@@ -1779,17 +1789,13 @@ Gets the first index from the array by a callback condition
1779
1789
  ##### Returns
1780
1790
 
1781
1791
 
1782
- - the first index of the array. -1 when the condition is not satisfied
1783
-
1784
-
1785
-
1792
+ - a Filter Data structure
1786
1793
 
1787
- ### dist/general/array/getLastIndexFromArray.js
1788
1794
 
1789
1795
 
1790
- #### getLastIndexFromArray(array, callback)
1796
+ #### UI21ToFD(uFilterData, version)
1791
1797
 
1792
- Gets the last index from the array by a callback condition
1798
+ Builds the Fitler Data structure from UI filter data
1793
1799
 
1794
1800
 
1795
1801
 
@@ -1798,8 +1804,8 @@ Gets the last index from the array by a callback condition
1798
1804
 
1799
1805
  | Name | Type | Description | |
1800
1806
  | ---- | ---- | ----------- | -------- |
1801
- | array | | | &nbsp; |
1802
- | callback | | function callback | &nbsp; |
1807
+ | uFilterData | | The UI filter Data object | &nbsp; |
1808
+ | version | | the version of the structure | &nbsp; |
1803
1809
 
1804
1810
 
1805
1811
 
@@ -1807,17 +1813,17 @@ Gets the last index from the array by a callback condition
1807
1813
  ##### Returns
1808
1814
 
1809
1815
 
1810
- - the last index of the array. -1 when the condition is not satisfied
1816
+ -
1811
1817
 
1812
1818
 
1813
1819
 
1814
1820
 
1815
- ### dist/general/function/debounce.js
1821
+ ### dist/filters/adapters/UIToFlatUI.js
1816
1822
 
1817
1823
 
1818
- #### debounce(fn, time)
1824
+ #### UIToFlatUI(filterData, datasetsInfo)
1819
1825
 
1820
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1826
+ Generates a Flattened UI filter structure from UI Filter Data structure.
1821
1827
 
1822
1828
 
1823
1829
 
@@ -1826,26 +1832,22 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
1826
1832
 
1827
1833
  | Name | Type | Description | |
1828
1834
  | ---- | ---- | ----------- | -------- |
1829
- | fn | `Function` | original Function | &nbsp; |
1830
- | time | `Number` | default 500ms | &nbsp; |
1831
-
1832
-
1833
-
1835
+ | filterData | | The UI filter data object. | &nbsp; |
1836
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
1834
1837
 
1835
- ##### Returns
1836
1838
 
1837
1839
 
1838
- - `Function` debounced functions
1839
1840
 
1841
+ ##### Returns
1840
1842
 
1841
1843
 
1844
+ - a flattened UI filters array
1842
1845
 
1843
- ### dist/general/function/throttled.js
1844
1846
 
1845
1847
 
1846
- #### throttled(fn, time)
1848
+ #### UI21ToFlatUI(scopes)
1847
1849
 
1848
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1850
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1849
1851
 
1850
1852
 
1851
1853
 
@@ -1854,8 +1856,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1854
1856
 
1855
1857
  | Name | Type | Description | |
1856
1858
  | ---- | ---- | ----------- | -------- |
1857
- | fn | `Function` | original Function | &nbsp; |
1858
- | time | `Number` | default 500ms | &nbsp; |
1859
+ | scopes | | The filter scope section | &nbsp; |
1859
1860
 
1860
1861
 
1861
1862
 
@@ -1863,18 +1864,18 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1863
1864
  ##### Returns
1864
1865
 
1865
1866
 
1866
- - `Function` throttled function
1867
+ - a flattened UI filters array
1867
1868
 
1868
1869
 
1869
1870
 
1870
1871
 
1871
- ### dist/general/mix/compareDeep.js
1872
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
1872
1873
 
1873
1874
 
1874
- #### compareDeep(object1, object2)
1875
+ #### adaptDateGroupingProperty(property)
1875
1876
 
1876
- Compares two objects to know if they are equals. Go across nested objects.
1877
- Includes arrays in the comparison.
1877
+ [TODO: For 2022, eliminate this adapter]
1878
+ Get the new property base on the old date grouping properties
1878
1879
 
1879
1880
 
1880
1881
 
@@ -1883,8 +1884,7 @@ Includes arrays in the comparison.
1883
1884
 
1884
1885
  | Name | Type | Description | |
1885
1886
  | ---- | ---- | ----------- | -------- |
1886
- | object1 | | First Object to compare | &nbsp; |
1887
- | object2 | | Second Object to compare | &nbsp; |
1887
+ | property | | | &nbsp; |
1888
1888
 
1889
1889
 
1890
1890
 
@@ -1892,17 +1892,17 @@ Includes arrays in the comparison.
1892
1892
  ##### Returns
1893
1893
 
1894
1894
 
1895
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
1895
+ -
1896
1896
 
1897
1897
 
1898
1898
 
1899
1899
 
1900
- ### dist/general/mix/getTag.js
1900
+ ### dist/filters/adapters/adaptFilterData.js
1901
1901
 
1902
1902
 
1903
- #### getTag(value)
1903
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1904
1904
 
1905
- Gets the `toStringTag` of `value`.
1905
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1906
1906
 
1907
1907
 
1908
1908
 
@@ -1911,7 +1911,9 @@ Gets the `toStringTag` of `value`.
1911
1911
 
1912
1912
  | Name | Type | Description | |
1913
1913
  | ---- | ---- | ----------- | -------- |
1914
- | value | | The value to query. | &nbsp; |
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; |
1915
1917
 
1916
1918
 
1917
1919
 
@@ -1919,17 +1921,17 @@ Gets the `toStringTag` of `value`.
1919
1921
  ##### Returns
1920
1922
 
1921
1923
 
1922
- - `string` Returns the `toStringTag`.
1924
+ - A new filter data structure v2.1
1923
1925
 
1924
1926
 
1925
1927
 
1926
1928
 
1927
- ### dist/general/mix/importScripts.js
1929
+ ### dist/filters/adapters/flatUIToFD.js
1928
1930
 
1929
1931
 
1930
- #### importScripts(scripts)
1932
+ #### flatUIToFD(uFilters, version)
1931
1933
 
1932
- Import a set of external Scripts given the URL in both serie and cascade way
1934
+ Generates a filter data structure from the flatttened UI filters.
1933
1935
 
1934
1936
 
1935
1937
 
@@ -1938,54 +1940,23 @@ Import a set of external Scripts given the URL in both serie and cascade way
1938
1940
 
1939
1941
  | Name | Type | Description | |
1940
1942
  | ---- | ---- | ----------- | -------- |
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; |
1947
-
1948
-
1949
-
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
- ]);
1943
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
1944
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1962
1945
 
1963
- // 3) import dependent scripts (cascade)
1964
- importScripts([
1965
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1966
- ]);
1967
1946
 
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
1947
 
1977
1948
 
1978
1949
  ##### Returns
1979
1950
 
1980
1951
 
1981
- - `Promise` Promise when all script have been loaded
1952
+ - a Filter Data.
1982
1953
 
1983
1954
 
1984
1955
 
1985
- #### loadScript(url, type, noModule)
1956
+ #### buildScopes(fbFilters)
1986
1957
 
1987
- Creates the script element and appends to document.head
1988
- return a Promise that is resolved when the script is loaded
1958
+ Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1959
+ Also, adds and organizes filters by datasets
1989
1960
 
1990
1961
 
1991
1962
 
@@ -1994,9 +1965,7 @@ return a Promise that is resolved when the script is loaded
1994
1965
 
1995
1966
  | Name | Type | Description | |
1996
1967
  | ---- | ---- | ----------- | -------- |
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; |
1968
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
2000
1969
 
2001
1970
 
2002
1971
 
@@ -2004,17 +1973,13 @@ return a Promise that is resolved when the script is loaded
2004
1973
  ##### Returns
2005
1974
 
2006
1975
 
2007
- - `Void`
2008
-
2009
-
2010
-
1976
+ - an array of scopes structure.
2011
1977
 
2012
- ### dist/general/mix/isEmpty.js
2013
1978
 
2014
1979
 
2015
- #### isEmpty(variable, includeFalsy)
1980
+ #### buildScope(uFilter)
2016
1981
 
2017
- Validates if the given argument is empty
1982
+ Gets an scope structure for the filter data
2018
1983
 
2019
1984
 
2020
1985
 
@@ -2023,8 +1988,7 @@ Validates if the given argument is empty
2023
1988
 
2024
1989
  | Name | Type | Description | |
2025
1990
  | ---- | ---- | ----------- | -------- |
2026
- | variable | | the given variable | &nbsp; |
2027
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1991
+ | uFilter | | UI structure filter | &nbsp; |
2028
1992
 
2029
1993
 
2030
1994
 
@@ -2032,19 +1996,13 @@ Validates if the given argument is empty
2032
1996
  ##### Returns
2033
1997
 
2034
1998
 
2035
- - true: the given argument is empty; false: is not.
2036
-
2037
-
2038
-
1999
+ - an scope structure
2039
2000
 
2040
- ### dist/general/mix/isNaNV2.js
2041
2001
 
2042
2002
 
2043
- #### isNaNV2(variable)
2003
+ #### buildDataset(uFilter)
2044
2004
 
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.
2005
+ Gets an dataset structure for the filter data
2048
2006
 
2049
2007
 
2050
2008
 
@@ -2053,7 +2011,7 @@ Validates if variable is null, undefined, or an empty string, also, the function
2053
2011
 
2054
2012
  | Name | Type | Description | |
2055
2013
  | ---- | ---- | ----------- | -------- |
2056
- | variable | | the variable to validate | &nbsp; |
2014
+ | uFilter | | a UI structure filter | &nbsp; |
2057
2015
 
2058
2016
 
2059
2017
 
@@ -2061,18 +2019,13 @@ Validates if variable is null, undefined, or an empty string, also, the function
2061
2019
  ##### Returns
2062
2020
 
2063
2021
 
2064
- - True if variable is a NaN or false otherwise
2065
-
2066
-
2067
-
2022
+ - an dataset structure
2068
2023
 
2069
- ### dist/general/mix/isNull.js
2070
2024
 
2071
2025
 
2072
- #### isNull(arg)
2026
+ #### buildFilter(uFilter)
2073
2027
 
2074
- return if a given variable is either `null` or `undefined`
2075
- useful to avoid falsify validating Number Zero (0)
2028
+ Gets an filter structure for the filter data
2076
2029
 
2077
2030
 
2078
2031
 
@@ -2081,7 +2034,7 @@ useful to avoid falsify validating Number Zero (0)
2081
2034
 
2082
2035
  | Name | Type | Description | |
2083
2036
  | ---- | ---- | ----------- | -------- |
2084
- | arg | `any` | | &nbsp; |
2037
+ | uFilter | | a UI structure filter | &nbsp; |
2085
2038
 
2086
2039
 
2087
2040
 
@@ -2089,19 +2042,18 @@ useful to avoid falsify validating Number Zero (0)
2089
2042
  ##### Returns
2090
2043
 
2091
2044
 
2092
- - `Boolean`
2045
+ - an filter structure
2093
2046
 
2094
2047
 
2095
2048
 
2096
2049
 
2097
- ### dist/general/mix/randomId.js
2050
+ ### dist/filters/adapters/adaptFilterValues.js
2098
2051
 
2099
2052
 
2100
- #### randomId(length, exclude)
2053
+ #### adaptFilterValues(filter)
2101
2054
 
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.
2055
+ [TODO: For 2022, eliminate this adapter]
2056
+ Gets an adapted filter value array. Validates the enabled property and sets
2105
2057
 
2106
2058
 
2107
2059
 
@@ -2110,8 +2062,7 @@ Creates a random string
2110
2062
 
2111
2063
  | Name | Type | Description | |
2112
2064
  | ---- | ---- | ----------- | -------- |
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; |
2065
+ | filter | | The filter | &nbsp; |
2115
2066
 
2116
2067
 
2117
2068
 
@@ -2119,19 +2070,17 @@ Creates a random string
2119
2070
  ##### Returns
2120
2071
 
2121
2072
 
2122
- - `String` Random string
2073
+ - A new value array with the filled properties.
2123
2074
 
2124
2075
 
2125
2076
 
2126
2077
 
2127
- ### dist/general/mix/size.js
2078
+ ### dist/filters/adapters/flatUIToLogic.js
2128
2079
 
2129
2080
 
2130
- #### size(obj)
2081
+ #### flatUIToLogic(uFilter)
2131
2082
 
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.
2083
+ Generates a Logic structure from flattened UI filters
2135
2084
 
2136
2085
 
2137
2086
 
@@ -2140,7 +2089,7 @@ Gets the length of the given array.
2140
2089
 
2141
2090
  | Name | Type | Description | |
2142
2091
  | ---- | ---- | ----------- | -------- |
2143
- | obj | `Any` | Any object-type variable | &nbsp; |
2092
+ | uFilter | | Array of flat filters from UI | &nbsp; |
2144
2093
 
2145
2094
 
2146
2095
 
@@ -2148,18 +2097,17 @@ Gets the length of the given array.
2148
2097
  ##### Returns
2149
2098
 
2150
2099
 
2151
- - `Number` the size of the given variable
2100
+ - The logic structure
2152
2101
 
2153
2102
 
2154
2103
 
2155
2104
 
2156
- ### dist/general/object/cloneDeep.js
2105
+ ### dist/filters/adapters/flatUIToOldLogic.js
2157
2106
 
2158
2107
 
2159
- #### cloneDeep(obj)
2108
+ #### flatUIToOldLogic(uFilters)
2160
2109
 
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
2110
+ Generates a Logic structure from flattened UI filters
2163
2111
 
2164
2112
 
2165
2113
 
@@ -2168,7 +2116,7 @@ Not to use this function with inner objects and functions
2168
2116
 
2169
2117
  | Name | Type | Description | |
2170
2118
  | ---- | ---- | ----------- | -------- |
2171
- | obj | | The object | &nbsp; |
2119
+ | uFilters | | Array of flat filters from UI | &nbsp; |
2172
2120
 
2173
2121
 
2174
2122
 
@@ -2176,21 +2124,17 @@ Not to use this function with inner objects and functions
2176
2124
  ##### Returns
2177
2125
 
2178
2126
 
2179
- - The new reference object or the given object if the parsing is incorrect or empty
2180
-
2127
+ - The logic structure
2181
2128
 
2182
2129
 
2183
2130
 
2184
- ### dist/general/object/get.js
2185
2131
 
2132
+ ### dist/filters/adapters/flatUIToUI.js
2186
2133
 
2187
- #### _get(baseObject, path, defaultValue)
2188
2134
 
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.
2135
+ #### flatUIToUI(uFilters, version)
2191
2136
 
2192
- Empty arrays and empty objects are returned but the defaultValue is not
2193
- Undefined and null values will return the defaultValue.
2137
+ Generates a UI filter data structure from the flatttened UI filters.
2194
2138
 
2195
2139
 
2196
2140
 
@@ -2199,59 +2143,23 @@ Undefined and null values will return the defaultValue.
2199
2143
 
2200
2144
  | Name | Type | Description | |
2201
2145
  | ---- | ---- | ----------- | -------- |
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
-
2206
-
2207
-
2146
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
2147
+ | version | | Tag for the version of the filter data structure | &nbsp; |
2208
2148
 
2209
- ##### Examples
2210
2149
 
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
2150
 
2232
2151
 
2233
2152
  ##### Returns
2234
2153
 
2235
2154
 
2236
- - the resolved value.
2237
-
2238
-
2239
-
2155
+ - a UI Filter Data.
2240
2156
 
2241
- ### dist/general/object/getAttribute.js
2242
2157
 
2243
2158
 
2244
- #### getAttribute(obj, key)
2159
+ #### buildScopes(fbFilters)
2245
2160
 
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
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
2255
2163
 
2256
2164
 
2257
2165
 
@@ -2260,73 +2168,67 @@ Searchs for properties in different case styles such as: lower, upper, camel and
2260
2168
 
2261
2169
  | Name | Type | Description | |
2262
2170
  | ---- | ---- | ----------- | -------- |
2263
- | obj | `object` | object to look for | &nbsp; |
2264
- | key | `string` | String attribute in snake_case style | &nbsp; |
2171
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
2265
2172
 
2266
2173
 
2267
2174
 
2268
2175
 
2269
- ##### Examples
2176
+ ##### Returns
2270
2177
 
2271
- ```javascript
2272
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2273
- ```
2274
2178
 
2179
+ - an array of scopes structure.
2275
2180
 
2276
- ##### Returns
2277
2181
 
2278
2182
 
2279
- - `Void`
2183
+ #### buildScope(uFilter)
2280
2184
 
2185
+ Gets an scope structure for the UI filter data
2281
2186
 
2282
2187
 
2283
2188
 
2284
- ### dist/general/object/hasProperty.js
2285
2189
 
2190
+ ##### Parameters
2286
2191
 
2287
- #### _hasProperty(obj, property)
2192
+ | Name | Type | Description | |
2193
+ | ---- | ---- | ----------- | -------- |
2194
+ | uFilter | | UI structure filter | &nbsp; |
2288
2195
 
2289
- Use the hasOwnProperty in order to verify if the given property exists in the object.
2290
2196
 
2291
2197
 
2292
2198
 
2199
+ ##### Returns
2293
2200
 
2294
- ##### Parameters
2295
2201
 
2296
- | Name | Type | Description | |
2297
- | ---- | ---- | ----------- | -------- |
2298
- | obj | `object` | an object | &nbsp; |
2299
- | property | `string` | String to verify if exists in the object as property | &nbsp; |
2202
+ - an scope structure
2203
+
2300
2204
 
2301
2205
 
2206
+ #### buildDataset(uFilter)
2302
2207
 
2208
+ Gets an dataset structure for the UI filter data
2303
2209
 
2304
- ##### Examples
2305
2210
 
2306
- ```javascript
2307
- const prop = 'prop2'
2308
- const obj1 = { prop1: 'hello', prop2: 'world'}
2309
- _hasProperty(ob1, prop1) // true
2310
2211
 
2311
- const obj2 = { prop1: 'hello world' }
2312
- _hasProperty(ob1, prop2) // false
2313
- ```
2314
2212
 
2213
+ ##### Parameters
2315
2214
 
2316
- ##### Returns
2215
+ | Name | Type | Description | |
2216
+ | ---- | ---- | ----------- | -------- |
2217
+ | uFilter | | a UI structure filter | &nbsp; |
2317
2218
 
2318
2219
 
2319
- - True if the object has the given property; otherwise, false.
2320
2220
 
2321
2221
 
2222
+ ##### Returns
2322
2223
 
2323
2224
 
2324
- ### dist/general/object/isObject.js
2225
+ - an dataset structure
2325
2226
 
2326
2227
 
2327
- #### isObject(obj)
2328
2228
 
2329
- Checks if the given argument is an object type
2229
+ #### buildFilter(uFilter)
2230
+
2231
+ Gets an filter structure for the UI filter data
2330
2232
 
2331
2233
 
2332
2234
 
@@ -2335,7 +2237,7 @@ Checks if the given argument is an object type
2335
2237
 
2336
2238
  | Name | Type | Description | |
2337
2239
  | ---- | ---- | ----------- | -------- |
2338
- | obj | | the variable to check | &nbsp; |
2240
+ | uFilter | | a UI structure filter | &nbsp; |
2339
2241
 
2340
2242
 
2341
2243
 
@@ -2343,18 +2245,17 @@ Checks if the given argument is an object type
2343
2245
  ##### Returns
2344
2246
 
2345
2247
 
2346
- - True: It is an object; False: It is not.
2248
+ - an filter structure
2347
2249
 
2348
2250
 
2349
2251
 
2350
2252
 
2351
- ### dist/general/object/mapValues.js
2253
+ ### dist/filters/adapters/logicToFD.js
2352
2254
 
2353
2255
 
2354
- #### mapValues(baseObject, iteratee)
2256
+ #### logicToFD(filterData, version)
2355
2257
 
2356
- Invoke iteratee (function) for each object key-value pair
2357
- and return a mapped object
2258
+ Generates a filter data structure from the old logic structure (v2.0).
2358
2259
 
2359
2260
 
2360
2261
 
@@ -2363,8 +2264,8 @@ and return a mapped object
2363
2264
 
2364
2265
  | Name | Type | Description | |
2365
2266
  | ---- | ---- | ----------- | -------- |
2366
- | baseObject | `Object` | Base object. | &nbsp; |
2367
- | iteratee | `Function` | The executed per iteration. | &nbsp; |
2267
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
2268
+ | version | | Tag for the version of the filter data structure | &nbsp; |
2368
2269
 
2369
2270
 
2370
2271
 
@@ -2372,18 +2273,17 @@ and return a mapped object
2372
2273
  ##### Returns
2373
2274
 
2374
2275
 
2375
- - `Object` New mapped object.
2276
+ - a Filter Data.
2376
2277
 
2377
2278
 
2378
2279
 
2379
2280
 
2380
- ### dist/general/object/mergeDeep.js
2281
+ ### dist/filters/adapters/logicToFlatUI.js
2381
2282
 
2382
2283
 
2383
- #### mergeDeep(obj1, obj2, settings)
2284
+ #### logicToFlatUI(logics)
2384
2285
 
2385
- Merges two objects into a new one.
2386
- The second given argument to the first given argument.
2286
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
2387
2287
 
2388
2288
 
2389
2289
 
@@ -2392,9 +2292,7 @@ The second given argument to the first given argument.
2392
2292
 
2393
2293
  | Name | Type | Description | |
2394
2294
  | ---- | ---- | ----------- | -------- |
2395
- | obj1 | | The target object | &nbsp; |
2396
- | obj2 | | The object to be merged | &nbsp; |
2397
- | settings | | Object settings for this function | &nbsp; |
2295
+ | logics | | The old logic structure (v2.0) | &nbsp; |
2398
2296
 
2399
2297
 
2400
2298
 
@@ -2402,13 +2300,13 @@ The second given argument to the first given argument.
2402
2300
  ##### Returns
2403
2301
 
2404
2302
 
2405
- - a new merged object
2303
+ - The Flattened UI Filters array
2406
2304
 
2407
2305
 
2408
2306
 
2409
- #### isValid(obj1, obj2)
2307
+ #### getFilter(filters, filter, getIndex)
2410
2308
 
2411
- Validates if the two arguments are objects
2309
+ Get the filter or the index of the given array, validating an old filter structure.
2412
2310
 
2413
2311
 
2414
2312
 
@@ -2417,8 +2315,9 @@ Validates if the two arguments are objects
2417
2315
 
2418
2316
  | Name | Type | Description | |
2419
2317
  | ---- | ---- | ----------- | -------- |
2420
- | obj1 | | The target object | &nbsp; |
2421
- | obj2 | | The object to be merged | &nbsp; |
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; |
2422
2321
 
2423
2322
 
2424
2323
 
@@ -2426,13 +2325,13 @@ Validates if the two arguments are objects
2426
2325
  ##### Returns
2427
2326
 
2428
2327
 
2429
- - true: they are valid; false: they are not
2328
+ - the index or the UI filter object
2430
2329
 
2431
2330
 
2432
2331
 
2433
- #### getParamsToMergeDeep(settings)
2332
+ #### refineRankingValues(values, uiValues)
2434
2333
 
2435
- Validates and gets the settings with all set parameters.
2334
+ Refines the values of the Ranking column type.
2436
2335
 
2437
2336
 
2438
2337
 
@@ -2441,7 +2340,8 @@ Validates and gets the settings with all set parameters.
2441
2340
 
2442
2341
  | Name | Type | Description | |
2443
2342
  | ---- | ---- | ----------- | -------- |
2444
- | settings | | the settings object | &nbsp; |
2343
+ | values | | the Array of Ranking values | &nbsp; |
2344
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
2445
2345
 
2446
2346
 
2447
2347
 
@@ -2449,17 +2349,17 @@ Validates and gets the settings with all set parameters.
2449
2349
  ##### Returns
2450
2350
 
2451
2351
 
2452
- - a new settings object with all set parameters.
2352
+ - the array of Ranking values
2453
2353
 
2454
2354
 
2455
2355
 
2456
2356
 
2457
- ### dist/general/object/objectCopy.js
2357
+ ### dist/filters/adapters/logicToUI.js
2458
2358
 
2459
2359
 
2460
- #### objectCopy(entity, cache)
2360
+ #### logicToUI(uFilters, datasetsInfo)
2461
2361
 
2462
- Created a new reference of the given argument
2362
+ Generates a UI filter structure from the old logic structure (v2.0).
2463
2363
 
2464
2364
 
2465
2365
 
@@ -2468,8 +2368,8 @@ Created a new reference of the given argument
2468
2368
 
2469
2369
  | Name | Type | Description | |
2470
2370
  | ---- | ---- | ----------- | -------- |
2471
- | entity | | The variable to be copied | &nbsp; |
2472
- | cache | | | &nbsp; |
2371
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
2372
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
2473
2373
 
2474
2374
 
2475
2375
 
@@ -2477,17 +2377,17 @@ Created a new reference of the given argument
2477
2377
  ##### Returns
2478
2378
 
2479
2379
 
2480
- - A new reference of the given argument
2380
+ - a UI Filter Data.
2481
2381
 
2482
2382
 
2483
2383
 
2484
2384
 
2485
- ### dist/general/object/omit.js
2385
+ ### dist/filters/adapters/transformFilters.js
2486
2386
 
2487
2387
 
2488
- #### omit(obj, props)
2388
+ #### transformFilters(oldFiltersObj, section)
2489
2389
 
2490
- return a new Object excluding attributes in _props_ list
2390
+ Transform the old filters structure into the new one
2491
2391
 
2492
2392
 
2493
2393
 
@@ -2496,36 +2396,79 @@ return a new Object excluding attributes in _props_ list
2496
2396
 
2497
2397
  | Name | Type | Description | |
2498
2398
  | ---- | ---- | ----------- | -------- |
2499
- | obj | `Object` | base object | &nbsp; |
2500
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
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; |
2501
2401
 
2502
2402
 
2503
2403
 
2504
2404
 
2505
- ##### Returns
2405
+ ##### Examples
2506
2406
 
2407
+ ```javascript
2507
2408
 
2508
- - `Object` clean object
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
+
2452
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2453
+ ```
2509
2454
 
2510
2455
 
2456
+ ##### Returns
2511
2457
 
2512
2458
 
2513
- ### dist/general/object/pick.js
2459
+ - `Object` an object with the new filters structure
2514
2460
 
2515
2461
 
2516
- #### pick(baseObject, keys)
2517
2462
 
2518
- return a new object just with attributes in _keys_ list
2463
+
2464
+ ### dist/filters/classes/FilterInputErrorHandler.js
2519
2465
 
2520
2466
 
2467
+ #### new FilterInputErrorHandler()
2468
+
2521
2469
 
2522
2470
 
2523
- ##### Parameters
2524
2471
 
2525
- | Name | Type | Description | |
2526
- | ---- | ---- | ----------- | -------- |
2527
- | baseObject | `Object` | base object | &nbsp; |
2528
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2529
2472
 
2530
2473
 
2531
2474
 
@@ -2533,17 +2476,17 @@ return a new object just with attributes in _keys_ list
2533
2476
  ##### Returns
2534
2477
 
2535
2478
 
2536
- - `Object` new object just with desired attributes
2479
+ - `Void`
2537
2480
 
2538
2481
 
2539
2482
 
2540
2483
 
2541
- ### dist/general/object/serialize.js
2484
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
2542
2485
 
2543
2486
 
2544
- #### serialize(obj)
2487
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
2545
2488
 
2546
- serialize object to url param
2489
+ [TODO: Make a proper description for this function]
2547
2490
 
2548
2491
 
2549
2492
 
@@ -2552,7 +2495,9 @@ serialize object to url param
2552
2495
 
2553
2496
  | Name | Type | Description | |
2554
2497
  | ---- | ---- | ----------- | -------- |
2555
- | obj | | - Object to be serialized | &nbsp; |
2498
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
2499
+ | scopes | | | &nbsp; |
2500
+ | currentScope | | | &nbsp; |
2556
2501
 
2557
2502
 
2558
2503
 
@@ -2560,17 +2505,17 @@ serialize object to url param
2560
2505
  ##### Returns
2561
2506
 
2562
2507
 
2563
- - `Void`
2508
+ -
2564
2509
 
2565
2510
 
2566
2511
 
2567
2512
 
2568
- ### dist/general/string/capitalize.js
2513
+ ### dist/filters/helpers/getAvailableScopes.js
2569
2514
 
2570
2515
 
2571
- #### capitalize(text)
2516
+ #### getAvailableScopes(config)
2572
2517
 
2573
- Upper case the first letter of a given text
2518
+ Gets Scopes/Scope IDs by given IDs
2574
2519
 
2575
2520
 
2576
2521
 
@@ -2579,7 +2524,7 @@ Upper case the first letter of a given text
2579
2524
 
2580
2525
  | Name | Type | Description | |
2581
2526
  | ---- | ---- | ----------- | -------- |
2582
- | text | `String` | | &nbsp; |
2527
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
2583
2528
 
2584
2529
 
2585
2530
 
@@ -2587,17 +2532,17 @@ Upper case the first letter of a given text
2587
2532
  ##### Returns
2588
2533
 
2589
2534
 
2590
- - `String` a capitalized text
2535
+ - a Scopes/Scope IDs array
2591
2536
 
2592
2537
 
2593
2538
 
2594
2539
 
2595
- ### dist/qrvey/helpers/getColumnsLabel.js
2540
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
2596
2541
 
2597
2542
 
2598
- #### getColumnLabels(column)
2543
+ #### getAvailableScopesIDsByConfig(config)
2599
2544
 
2600
- Get an string of the properties of the given column.
2545
+ Gets the Scopes IDS for the Available Scope function by any config
2601
2546
 
2602
2547
 
2603
2548
 
@@ -2606,7 +2551,7 @@ Get an string of the properties of the given column.
2606
2551
 
2607
2552
  | Name | Type | Description | |
2608
2553
  | ---- | ---- | ----------- | -------- |
2609
- | column | | The column | &nbsp; |
2554
+ | config | | any config | &nbsp; |
2610
2555
 
2611
2556
 
2612
2557
 
@@ -2614,18 +2559,17 @@ Get an string of the properties of the given column.
2614
2559
  ##### Returns
2615
2560
 
2616
2561
 
2617
- - an string with the property, aggregate or calculation label.
2562
+ - a Available Scope IDS config
2618
2563
 
2619
2564
 
2620
2565
 
2621
2566
 
2622
- ### dist/qrvey/helpers/getValueWithSuffixes.js
2567
+ ### dist/filters/helpers/getScopesByHierarchy.js
2623
2568
 
2624
2569
 
2625
- #### getValueWithSuffixes(value, suffixes)
2570
+ #### getScopesByHierarchy(scopes, currentScope)
2626
2571
 
2627
- Get a string value with suffixes if available.
2628
- Add suffix into the value string. Prioritized for numeric values.
2572
+ [TODO: Make a description for this]
2629
2573
 
2630
2574
 
2631
2575
 
@@ -2634,8 +2578,8 @@ Add suffix into the value string. Prioritized for numeric values.
2634
2578
 
2635
2579
  | Name | Type | Description | |
2636
2580
  | ---- | ---- | ----------- | -------- |
2637
- | value | | a number or string | &nbsp; |
2638
- | suffixes | | An object with singular or plural suffix string. | &nbsp; |
2581
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
2582
+ | currentScope | | Current scope type | &nbsp; |
2639
2583
 
2640
2584
 
2641
2585
 
@@ -2643,17 +2587,17 @@ Add suffix into the value string. Prioritized for numeric values.
2643
2587
  ##### Returns
2644
2588
 
2645
2589
 
2646
- - a string value with suffix
2590
+ - A new array of Scopes/Scope IDs
2647
2591
 
2648
2592
 
2649
2593
 
2650
2594
 
2651
- ### dist/qrvey/helpers/transformValue.js
2595
+ ### dist/services/api/getAllDatasets.api.js
2652
2596
 
2653
2597
 
2654
- #### transformValue(value, settings)
2598
+ #### getAllDatasets(config, pickDatasets)
2655
2599
 
2656
- Transforms a value depending of localization/globalization and extras settings.
2600
+ Get a dataset list from a collection of Qrvey IDs
2657
2601
 
2658
2602
 
2659
2603
 
@@ -2662,8 +2606,8 @@ Transforms a value depending of localization/globalization and extras settings.
2662
2606
 
2663
2607
  | Name | Type | Description | |
2664
2608
  | ---- | ---- | ----------- | -------- |
2665
- | value | | A value to transform | &nbsp; |
2666
- | settings | | The settings of the transformValue function | &nbsp; |
2609
+ | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2610
+ | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2667
2611
 
2668
2612
 
2669
2613
 
@@ -2671,13 +2615,17 @@ Transforms a value depending of localization/globalization and extras settings.
2671
2615
  ##### Returns
2672
2616
 
2673
2617
 
2674
- - A transformed value
2618
+ - a promise
2675
2619
 
2676
2620
 
2677
2621
 
2678
- #### getOutputFormat(settings)
2679
2622
 
2680
- Gets the outputformat settings
2623
+ ### dist/services/api/getAllQrveys.api.js
2624
+
2625
+
2626
+ #### getAllQrveys(config, params)
2627
+
2628
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2681
2629
 
2682
2630
 
2683
2631
 
@@ -2686,7 +2634,8 @@ Gets the outputformat settings
2686
2634
 
2687
2635
  | Name | Type | Description | |
2688
2636
  | ---- | ---- | ----------- | -------- |
2689
- | settings | | The settings of the transformValue function | &nbsp; |
2637
+ | config | | Configuration | &nbsp; |
2638
+ | params | | Object for getting precise data | &nbsp; |
2690
2639
 
2691
2640
 
2692
2641
 
@@ -2694,13 +2643,17 @@ Gets the outputformat settings
2694
2643
  ##### Returns
2695
2644
 
2696
2645
 
2697
- - the outputformat settings
2646
+ - `Void`
2698
2647
 
2699
2648
 
2700
2649
 
2701
- #### getFormatConfig(settings)
2702
2650
 
2703
- Gets the format config
2651
+ ### dist/services/api/getDatasetColumns.api.js
2652
+
2653
+
2654
+ #### getDatasetColumns(qrveyid)
2655
+
2656
+ Get a dataset by Qrvey ID
2704
2657
 
2705
2658
 
2706
2659
 
@@ -2709,7 +2662,7 @@ Gets the format config
2709
2662
 
2710
2663
  | Name | Type | Description | |
2711
2664
  | ---- | ---- | ----------- | -------- |
2712
- | settings | | The settings of the transformValue function | &nbsp; |
2665
+ | qrveyid | | The Qrvey ID | &nbsp; |
2713
2666
 
2714
2667
 
2715
2668
 
@@ -2717,17 +2670,17 @@ Gets the format config
2717
2670
  ##### Returns
2718
2671
 
2719
2672
 
2720
- - the format config
2673
+ - a promise
2721
2674
 
2722
2675
 
2723
2676
 
2724
2677
 
2725
- ### dist/services/api/getAllDatasets.api.js
2678
+ ### dist/qrvey/helpers/getColumnsLabel.js
2726
2679
 
2727
2680
 
2728
- #### getAllDatasets(config, pickDatasets)
2681
+ #### getColumnLabels(column)
2729
2682
 
2730
- Get a dataset list from a collection of Qrvey IDs
2683
+ Get an string of the properties of the given column.
2731
2684
 
2732
2685
 
2733
2686
 
@@ -2736,8 +2689,7 @@ Get a dataset list from a collection of Qrvey IDs
2736
2689
 
2737
2690
  | Name | Type | Description | |
2738
2691
  | ---- | ---- | ----------- | -------- |
2739
- | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2740
- | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2692
+ | column | | The column | &nbsp; |
2741
2693
 
2742
2694
 
2743
2695
 
@@ -2745,17 +2697,18 @@ Get a dataset list from a collection of Qrvey IDs
2745
2697
  ##### Returns
2746
2698
 
2747
2699
 
2748
- - a promise
2700
+ - an string with the property, aggregate or calculation label.
2749
2701
 
2750
2702
 
2751
2703
 
2752
2704
 
2753
- ### dist/services/api/getAllQrveys.api.js
2705
+ ### dist/qrvey/helpers/getValueWithSuffixes.js
2754
2706
 
2755
2707
 
2756
- #### getAllQrveys(config, params)
2708
+ #### getValueWithSuffixes(value, suffixes)
2757
2709
 
2758
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2710
+ Get a string value with suffixes if available.
2711
+ Add suffix into the value string. Prioritized for numeric values.
2759
2712
 
2760
2713
 
2761
2714
 
@@ -2764,8 +2717,8 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2764
2717
 
2765
2718
  | Name | Type | Description | |
2766
2719
  | ---- | ---- | ----------- | -------- |
2767
- | config | | Configuration | &nbsp; |
2768
- | params | | Object for getting precise data | &nbsp; |
2720
+ | value | | a number or string | &nbsp; |
2721
+ | suffixes | | An object with singular or plural suffix string. | &nbsp; |
2769
2722
 
2770
2723
 
2771
2724
 
@@ -2773,17 +2726,17 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2773
2726
  ##### Returns
2774
2727
 
2775
2728
 
2776
- - `Void`
2729
+ - a string value with suffix
2777
2730
 
2778
2731
 
2779
2732
 
2780
2733
 
2781
- ### dist/services/api/getDatasetColumns.api.js
2734
+ ### dist/qrvey/helpers/transformValue.js
2782
2735
 
2783
2736
 
2784
- #### getDatasetColumns(qrveyid)
2737
+ #### transformValue(value, settings)
2785
2738
 
2786
- Get a dataset by Qrvey ID
2739
+ Transforms a value depending of localization/globalization and extras settings.
2787
2740
 
2788
2741
 
2789
2742
 
@@ -2792,7 +2745,8 @@ Get a dataset by Qrvey ID
2792
2745
 
2793
2746
  | Name | Type | Description | |
2794
2747
  | ---- | ---- | ----------- | -------- |
2795
- | qrveyid | | The Qrvey ID | &nbsp; |
2748
+ | value | | A value to transform | &nbsp; |
2749
+ | settings | | The settings of the transformValue function | &nbsp; |
2796
2750
 
2797
2751
 
2798
2752
 
@@ -2800,17 +2754,13 @@ Get a dataset by Qrvey ID
2800
2754
  ##### Returns
2801
2755
 
2802
2756
 
2803
- - a promise
2804
-
2805
-
2806
-
2757
+ - A transformed value
2807
2758
 
2808
- ### dist/typescript/decorators/Debounce.js
2809
2759
 
2810
2760
 
2811
- #### Debounce(time)
2761
+ #### getOutputFormat(settings)
2812
2762
 
2813
- (Method Decorator) Debounce Class Method
2763
+ Gets the outputformat settings
2814
2764
 
2815
2765
 
2816
2766
 
@@ -2819,7 +2769,7 @@ Get a dataset by Qrvey ID
2819
2769
 
2820
2770
  | Name | Type | Description | |
2821
2771
  | ---- | ---- | ----------- | -------- |
2822
- | time | | (optional) deafult 500 | &nbsp; |
2772
+ | settings | | The settings of the transformValue function | &nbsp; |
2823
2773
 
2824
2774
 
2825
2775
 
@@ -2827,17 +2777,13 @@ Get a dataset by Qrvey ID
2827
2777
  ##### Returns
2828
2778
 
2829
2779
 
2830
- - `Void`
2831
-
2832
-
2833
-
2780
+ - the outputformat settings
2834
2781
 
2835
- ### dist/typescript/decorators/Throttled.js
2836
2782
 
2837
2783
 
2838
- #### Throttled(time)
2784
+ #### getFormatConfig(settings)
2839
2785
 
2840
- (Method Decorator) Throttled Class Method
2786
+ Gets the format config
2841
2787
 
2842
2788
 
2843
2789
 
@@ -2846,7 +2792,7 @@ Get a dataset by Qrvey ID
2846
2792
 
2847
2793
  | Name | Type | Description | |
2848
2794
  | ---- | ---- | ----------- | -------- |
2849
- | time | | (optional) deafult 500 | &nbsp; |
2795
+ | settings | | The settings of the transformValue function | &nbsp; |
2850
2796
 
2851
2797
 
2852
2798
 
@@ -2854,7 +2800,7 @@ Get a dataset by Qrvey ID
2854
2800
  ##### Returns
2855
2801
 
2856
2802
 
2857
- - `Void`
2803
+ - the format config
2858
2804
 
2859
2805
 
2860
2806
 
@@ -2943,12 +2889,12 @@ try to find this string as a variable on Windows object
2943
2889
 
2944
2890
 
2945
2891
 
2946
- ### dist/dates/relative/helpers/formatStatement.js
2892
+ ### dist/typescript/decorators/Debounce.js
2947
2893
 
2948
2894
 
2949
- #### formatStatement(statement)
2895
+ #### Debounce(time)
2950
2896
 
2951
- Build a proper relative date statement type
2897
+ (Method Decorator) Debounce Class Method
2952
2898
 
2953
2899
 
2954
2900
 
@@ -2957,7 +2903,7 @@ Build a proper relative date statement type
2957
2903
 
2958
2904
  | Name | Type | Description | |
2959
2905
  | ---- | ---- | ----------- | -------- |
2960
- | statement | `RelativeStatement` | | &nbsp; |
2906
+ | time | | (optional) deafult 500 | &nbsp; |
2961
2907
 
2962
2908
 
2963
2909
 
@@ -2965,17 +2911,17 @@ Build a proper relative date statement type
2965
2911
  ##### Returns
2966
2912
 
2967
2913
 
2968
- - `RelativeStatement`
2914
+ - `Void`
2969
2915
 
2970
2916
 
2971
2917
 
2972
2918
 
2973
- ### dist/dates/relative/helpers/getStatementCase.js
2919
+ ### dist/typescript/decorators/Throttled.js
2974
2920
 
2975
2921
 
2976
- #### getStatementCase(includeCurrent, isCalendarDate)
2922
+ #### Throttled(time)
2977
2923
 
2978
- Returns a number/constant that identifies a relative date case
2924
+ (Method Decorator) Throttled Class Method
2979
2925
 
2980
2926
 
2981
2927
 
@@ -2984,8 +2930,7 @@ Returns a number/constant that identifies a relative date case
2984
2930
 
2985
2931
  | Name | Type | Description | |
2986
2932
  | ---- | ---- | ----------- | -------- |
2987
- | includeCurrent | `boolean` | | &nbsp; |
2988
- | isCalendarDate | `boolean` | | &nbsp; |
2933
+ | time | | (optional) deafult 500 | &nbsp; |
2989
2934
 
2990
2935
 
2991
2936
 
@@ -2993,17 +2938,17 @@ Returns a number/constant that identifies a relative date case
2993
2938
  ##### Returns
2994
2939
 
2995
2940
 
2996
- - `number`
2941
+ - `Void`
2997
2942
 
2998
2943
 
2999
2944
 
3000
2945
 
3001
- ### dist/dates/relative/helpers/parseDate.js
2946
+ ### dist/dates/relative/helpers/formatStatement.js
3002
2947
 
3003
2948
 
3004
- #### parseDate(date)
2949
+ #### formatStatement(statement)
3005
2950
 
3006
- Parses a string date and returns a dayjs date
2951
+ Build a proper relative date statement type
3007
2952
 
3008
2953
 
3009
2954
 
@@ -3012,7 +2957,7 @@ Parses a string date and returns a dayjs date
3012
2957
 
3013
2958
  | Name | Type | Description | |
3014
2959
  | ---- | ---- | ----------- | -------- |
3015
- | date | `string` `Dayjs` `Date` | | &nbsp; |
2960
+ | statement | `RelativeStatement` | | &nbsp; |
3016
2961
 
3017
2962
 
3018
2963
 
@@ -3020,17 +2965,17 @@ Parses a string date and returns a dayjs date
3020
2965
  ##### Returns
3021
2966
 
3022
2967
 
3023
- - `Dayjs` A dayjs date
2968
+ - `RelativeStatement`
3024
2969
 
3025
2970
 
3026
2971
 
3027
2972
 
3028
- ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
2973
+ ### dist/dates/relative/helpers/getStatementCase.js
3029
2974
 
3030
2975
 
3031
- #### getFilterBuilderGeneralConfig(config)
2976
+ #### getStatementCase(includeCurrent, isCalendarDate)
3032
2977
 
3033
- Returns a filter builder config object by a any given config
2978
+ Returns a number/constant that identifies a relative date case
3034
2979
 
3035
2980
 
3036
2981
 
@@ -3039,7 +2984,8 @@ Returns a filter builder config object by a any given config
3039
2984
 
3040
2985
  | Name | Type | Description | |
3041
2986
  | ---- | ---- | ----------- | -------- |
3042
- | config | | any config object | &nbsp; |
2987
+ | includeCurrent | `boolean` | | &nbsp; |
2988
+ | isCalendarDate | `boolean` | | &nbsp; |
3043
2989
 
3044
2990
 
3045
2991
 
@@ -3047,7 +2993,34 @@ Returns a filter builder config object by a any given config
3047
2993
  ##### Returns
3048
2994
 
3049
2995
 
3050
- - The filter builder config object
2996
+ - `number`
2997
+
2998
+
2999
+
3000
+
3001
+ ### dist/dates/relative/helpers/parseDate.js
3002
+
3003
+
3004
+ #### parseDate(date)
3005
+
3006
+ Parses a string date and returns a dayjs date
3007
+
3008
+
3009
+
3010
+
3011
+ ##### Parameters
3012
+
3013
+ | Name | Type | Description | |
3014
+ | ---- | ---- | ----------- | -------- |
3015
+ | date | `string` `Dayjs` `Date` | | &nbsp; |
3016
+
3017
+
3018
+
3019
+
3020
+ ##### Returns
3021
+
3022
+
3023
+ - `Dayjs` A dayjs date
3051
3024
 
3052
3025
 
3053
3026
 
@@ -3348,12 +3321,12 @@ Gets filters from the logic by the scopes hierarchy.
3348
3321
 
3349
3322
 
3350
3323
 
3351
- ### dist/filters/helpers/common/areFiltersEquals.js
3324
+ ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
3352
3325
 
3353
3326
 
3354
- #### areFiltersEquals(filter1, filter2)
3327
+ #### getFilterBuilderGeneralConfig(config)
3355
3328
 
3356
- Validates if both filters are the same
3329
+ Returns a filter builder config object by a any given config
3357
3330
 
3358
3331
 
3359
3332
 
@@ -3362,8 +3335,7 @@ Validates if both filters are the same
3362
3335
 
3363
3336
  | Name | Type | Description | |
3364
3337
  | ---- | ---- | ----------- | -------- |
3365
- | filter1 | | filter 1 | &nbsp; |
3366
- | filter2 | | filter 2 | &nbsp; |
3338
+ | config | | any config object | &nbsp; |
3367
3339
 
3368
3340
 
3369
3341
 
@@ -3371,7 +3343,7 @@ Validates if both filters are the same
3371
3343
  ##### Returns
3372
3344
 
3373
3345
 
3374
- - true: the filters are equal; false: the filters are NOT equal
3346
+ - The filter builder config object
3375
3347
 
3376
3348
 
3377
3349
 
@@ -3403,6 +3375,34 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3403
3375
 
3404
3376
 
3405
3377
 
3378
+ ### dist/filters/helpers/common/areFiltersEquals.js
3379
+
3380
+
3381
+ #### areFiltersEquals(filter1, filter2)
3382
+
3383
+ Validates if both filters are the same
3384
+
3385
+
3386
+
3387
+
3388
+ ##### Parameters
3389
+
3390
+ | Name | Type | Description | |
3391
+ | ---- | ---- | ----------- | -------- |
3392
+ | filter1 | | filter 1 | &nbsp; |
3393
+ | filter2 | | filter 2 | &nbsp; |
3394
+
3395
+
3396
+
3397
+
3398
+ ##### Returns
3399
+
3400
+
3401
+ - true: the filters are equal; false: the filters are NOT equal
3402
+
3403
+
3404
+
3405
+
3406
3406
  ### dist/filters/helpers/common/excludeFiltersByParams.js
3407
3407
 
3408
3408
 
@@ -3495,12 +3495,23 @@ Get an string of the properties of the given filter column.
3495
3495
 
3496
3496
 
3497
3497
 
3498
- ### dist/filters/helpers/common/getFilterLabel.js
3498
+ ### dist/filters/helpers/common/getFilterid.js
3499
3499
 
3500
3500
 
3501
- #### getFilterLabel(filter)
3501
+ #### getFilterid(filter)
3502
3502
 
3503
- Gets the Filter Label + Column label
3503
+ Get the Filter ID by the filter structure
3504
+ The order of the epression ID is:
3505
+ - Scope Type
3506
+ - scopeid
3507
+ - qrveyid
3508
+ - panelid
3509
+ - columnid
3510
+ - validator
3511
+ - property
3512
+ - Column Aggregate
3513
+ - Column Calculation
3514
+ - Optional Index
3504
3515
 
3505
3516
 
3506
3517
 
@@ -3509,7 +3520,7 @@ Gets the Filter Label + Column label
3509
3520
 
3510
3521
  | Name | Type | Description | |
3511
3522
  | ---- | ---- | ----------- | -------- |
3512
- | filter | | the UI filter | &nbsp; |
3523
+ | filter | | the filter structure | &nbsp; |
3513
3524
 
3514
3525
 
3515
3526
 
@@ -3517,28 +3528,17 @@ Gets the Filter Label + Column label
3517
3528
  ##### Returns
3518
3529
 
3519
3530
 
3520
- - a sring label
3531
+ - a text to identify the filter
3521
3532
 
3522
3533
 
3523
3534
 
3524
3535
 
3525
- ### dist/filters/helpers/common/getFilterid.js
3536
+ ### dist/filters/helpers/common/getFilterLabel.js
3526
3537
 
3527
3538
 
3528
- #### getFilterid(filter)
3539
+ #### getFilterLabel(filter)
3529
3540
 
3530
- Get the Filter ID by the filter structure
3531
- The order of the epression ID is:
3532
- - Scope Type
3533
- - scopeid
3534
- - qrveyid
3535
- - panelid
3536
- - columnid
3537
- - validator
3538
- - property
3539
- - Column Aggregate
3540
- - Column Calculation
3541
- - Optional Index
3541
+ Gets the Filter Label + Column label
3542
3542
 
3543
3543
 
3544
3544
 
@@ -3547,7 +3547,7 @@ The order of the epression ID is:
3547
3547
 
3548
3548
  | Name | Type | Description | |
3549
3549
  | ---- | ---- | ----------- | -------- |
3550
- | filter | | the filter structure | &nbsp; |
3550
+ | filter | | the UI filter | &nbsp; |
3551
3551
 
3552
3552
 
3553
3553
 
@@ -3555,7 +3555,7 @@ The order of the epression ID is:
3555
3555
  ##### Returns
3556
3556
 
3557
3557
 
3558
- - a text to identify the filter
3558
+ - a sring label
3559
3559
 
3560
3560
 
3561
3561
 
@@ -3817,12 +3817,12 @@ Validates if the given validator is a Between type
3817
3817
 
3818
3818
 
3819
3819
 
3820
- ### dist/filters/helpers/common/isDateDistinctProperty.js
3820
+ ### dist/filters/helpers/common/isInValidator.js
3821
3821
 
3822
3822
 
3823
- #### isDateDistinctProperty(column, property)
3823
+ #### isInValidator(validator)
3824
3824
 
3825
- Determines if the filter column and property is a distinct group dates type
3825
+ Validates if the given validator is a In type
3826
3826
 
3827
3827
 
3828
3828
 
@@ -3831,8 +3831,7 @@ Determines if the filter column and property is a distinct group dates type
3831
3831
 
3832
3832
  | Name | Type | Description | |
3833
3833
  | ---- | ---- | ----------- | -------- |
3834
- | column | | The filter column | &nbsp; |
3835
- | property | | The filter property | &nbsp; |
3834
+ | validator | | The validator | &nbsp; |
3836
3835
 
3837
3836
 
3838
3837
 
@@ -3840,17 +3839,17 @@ Determines if the filter column and property is a distinct group dates type
3840
3839
  ##### Returns
3841
3840
 
3842
3841
 
3843
- - True if the given property is included from distinct group dates type
3842
+ - true: it is a In validator; false: it is not a In validator
3844
3843
 
3845
3844
 
3846
3845
 
3847
3846
 
3848
- ### dist/filters/helpers/common/isInValidator.js
3847
+ ### dist/filters/helpers/common/isDateDistinctProperty.js
3849
3848
 
3850
3849
 
3851
- #### isInValidator(validator)
3850
+ #### isDateDistinctProperty(column, property)
3852
3851
 
3853
- Validates if the given validator is a In type
3852
+ Determines if the filter column and property is a distinct group dates type
3854
3853
 
3855
3854
 
3856
3855
 
@@ -3859,7 +3858,8 @@ Validates if the given validator is a In type
3859
3858
 
3860
3859
  | Name | Type | Description | |
3861
3860
  | ---- | ---- | ----------- | -------- |
3862
- | validator | | The validator | &nbsp; |
3861
+ | column | | The filter column | &nbsp; |
3862
+ | property | | The filter property | &nbsp; |
3863
3863
 
3864
3864
 
3865
3865
 
@@ -3867,7 +3867,7 @@ Validates if the given validator is a In type
3867
3867
  ##### Returns
3868
3868
 
3869
3869
 
3870
- - true: it is a In validator; false: it is not a In validator
3870
+ - True if the given property is included from distinct group dates type
3871
3871
 
3872
3872
 
3873
3873
 
@@ -4082,10 +4082,10 @@ Gets a new value structure array by merging two value structures
4082
4082
 
4083
4083
 
4084
4084
 
4085
- ### dist/filters/helpers/common/resolveDatasetConditions.js
4085
+ ### dist/filters/helpers/common/resolveFilterConditions.js
4086
4086
 
4087
4087
 
4088
- #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4088
+ #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4089
4089
 
4090
4090
  Resolves the conditions by given params
4091
4091
 
@@ -4096,8 +4096,8 @@ Resolves the conditions by given params
4096
4096
 
4097
4097
  | Name | Type | Description | |
4098
4098
  | ---- | ---- | ----------- | -------- |
4099
- | filter | | The dataset structure | &nbsp; |
4100
- | params | | given parameters to validate the dataset | &nbsp; |
4099
+ | filter | | The filter | &nbsp; |
4100
+ | params | | given parameters to validate the filter | &nbsp; |
4101
4101
  | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4102
4102
  | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4103
4103
 
@@ -4112,10 +4112,10 @@ Resolves the conditions by given params
4112
4112
 
4113
4113
 
4114
4114
 
4115
- ### dist/filters/helpers/common/resolveFilterConditions.js
4115
+ ### dist/filters/helpers/common/resolveDatasetConditions.js
4116
4116
 
4117
4117
 
4118
- #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4118
+ #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4119
4119
 
4120
4120
  Resolves the conditions by given params
4121
4121
 
@@ -4126,8 +4126,8 @@ Resolves the conditions by given params
4126
4126
 
4127
4127
  | Name | Type | Description | |
4128
4128
  | ---- | ---- | ----------- | -------- |
4129
- | filter | | The filter | &nbsp; |
4130
- | params | | given parameters to validate the filter | &nbsp; |
4129
+ | filter | | The dataset structure | &nbsp; |
4130
+ | params | | given parameters to validate the dataset | &nbsp; |
4131
4131
  | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4132
4132
  | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4133
4133
 
@@ -4199,12 +4199,12 @@ Excludes Aggregate Filters in the Flattened UI Filters array
4199
4199
 
4200
4200
 
4201
4201
 
4202
- ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
4202
+ ### dist/filters/helpers/ui/getFilterPropertyLabel.js
4203
4203
 
4204
4204
 
4205
- #### excludeUIFlatFiltersByScopes(uFilters, scopes)
4205
+ #### getFilterPropertyLabel(filter)
4206
4206
 
4207
- Excludes and returns a UI Flat Filters without filters by the given scopes
4207
+ Gets the label of the filter property
4208
4208
 
4209
4209
 
4210
4210
 
@@ -4213,8 +4213,7 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
4213
4213
 
4214
4214
  | Name | Type | Description | |
4215
4215
  | ---- | ---- | ----------- | -------- |
4216
- | uFilters | | The Flatten UI Filters | &nbsp; |
4217
- | scopes | | collection of scopes types | &nbsp; |
4216
+ | filter | | The UI Filter | &nbsp; |
4218
4217
 
4219
4218
 
4220
4219
 
@@ -4222,17 +4221,17 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
4222
4221
  ##### Returns
4223
4222
 
4224
4223
 
4225
- - The new array of UI Flattened filters
4224
+ - a string of the filter property label
4226
4225
 
4227
4226
 
4228
4227
 
4229
4228
 
4230
- ### dist/filters/helpers/ui/getFilterPropertyLabel.js
4229
+ ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
4231
4230
 
4232
4231
 
4233
- #### getFilterPropertyLabel(filter)
4232
+ #### excludeUIFlatFiltersByScopes(uFilters, scopes)
4234
4233
 
4235
- Gets the label of the filter property
4234
+ Excludes and returns a UI Flat Filters without filters by the given scopes
4236
4235
 
4237
4236
 
4238
4237
 
@@ -4241,7 +4240,8 @@ Gets the label of the filter property
4241
4240
 
4242
4241
  | Name | Type | Description | |
4243
4242
  | ---- | ---- | ----------- | -------- |
4244
- | filter | | The UI Filter | &nbsp; |
4243
+ | uFilters | | The Flatten UI Filters | &nbsp; |
4244
+ | scopes | | collection of scopes types | &nbsp; |
4245
4245
 
4246
4246
 
4247
4247
 
@@ -4249,7 +4249,7 @@ Gets the label of the filter property
4249
4249
  ##### Returns
4250
4250
 
4251
4251
 
4252
- - a string of the filter property label
4252
+ - The new array of UI Flattened filters
4253
4253
 
4254
4254
 
4255
4255