@qrvey/utils 1.2.9-31 → 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 (42) hide show
  1. package/README.md +847 -847
  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 +2 -1
  12. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
  13. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
  14. package/dist/cjs/qrvey/helpers/transformValue.js +3 -0
  15. package/dist/filters/adapters/adaptFilterValues.js +1 -1
  16. package/dist/filters/adapters/flatUIToFD.js +4 -0
  17. package/dist/filters/adapters/flatUIToOldLogic.js +1 -1
  18. package/dist/filters/adapters/flatUIToUI.js +4 -0
  19. package/dist/filters/helpers/backend/getBackendProperty.js +1 -1
  20. package/dist/filters/helpers/backend/getBackendValues.js +1 -1
  21. package/dist/filters/interfaces/common/IFSValue.d.ts +1 -1
  22. package/dist/filters/interfaces/ui/IFUValue.d.ts +1 -1
  23. package/dist/format/format.js +4 -2
  24. package/dist/format/localization.js +2 -1
  25. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
  26. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
  27. package/dist/qrvey/helpers/transformValue.js +3 -0
  28. package/package.json +1 -1
  29. package/prepareToPublish.js +2 -1
  30. package/src/filters/adapters/adaptFilterValues.ts +1 -1
  31. package/src/filters/adapters/flatUIToFD.ts +5 -0
  32. package/src/filters/adapters/flatUIToOldLogic.ts +1 -1
  33. package/src/filters/adapters/flatUIToUI.ts +5 -0
  34. package/src/filters/helpers/backend/getBackendProperty.ts +2 -1
  35. package/src/filters/helpers/backend/getBackendValues.ts +1 -1
  36. package/src/filters/interfaces/common/IFSValue.ts +1 -1
  37. package/src/filters/interfaces/ui/IFUValue.ts +1 -1
  38. package/src/format/format.ts +3 -2
  39. package/src/format/localization.ts +2 -1
  40. package/src/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.ts +2 -0
  41. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.ts +2 -0
  42. 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-31*
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,65 @@ 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
+
417
+
418
+
419
+
420
+ ### dist/dates/range/getDateRange.js
421
+
422
+
423
+ #### getDateRange(value, dateGroupLabel, withTime)
424
+
425
+ Get date range object from a string date value
426
+
427
+
428
+
429
+
430
+ ##### Parameters
431
+
432
+ | Name | Type | Description | |
433
+ | ---- | ---- | ----------- | -------- |
434
+ | value | `String` | string date value |   |
435
+ | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' |   |
436
+ | withTime | `Boolean` | determines if the date range will include time. Default is true |   |
437
+
438
+
439
+
440
+
441
+ ##### Examples
442
+
443
+ ```javascript
444
+ // 1) Year:
445
+ getDateRange('2020', 'YEAR');
446
+ // Will return:
447
+ {
448
+ from: '01/01/2020 00:00:00',
449
+ to: '12/31/2020 23:59:59'
450
+ }
451
+
452
+ // 2) Quarter:
453
+ getDateRange('Q3 2020', 'QUARTER');
454
+ // Will return:
455
+ {
456
+ from: '07/01/2020 00:00:00',
457
+ to: '09/30/2020 23:59:59'
458
+ }
459
+
460
+ // 3) Month:
461
+ getDateRange('Oct 2020', 'MONTH');
462
+ // Will return:
463
+ {
464
+ from: '10/01/2020 00:00:00',
465
+ to: '10/31/2020 23:59:59'
466
+ }
467
+ ```
468
+
469
+
470
+ ##### Returns
471
+
472
+
473
+ - `Object` an object with the date range with two string date properties: from and to
416
474
 
417
475
 
418
476
 
@@ -630,12 +688,12 @@ Output:
630
688
 
631
689
 
632
690
 
633
- ### dist/dates/range/getDateRange.js
691
+ ### dist/general/array/delete.js
634
692
 
635
693
 
636
- #### getDateRange(value, dateGroupLabel, withTime)
694
+ #### ArrayDelete(array, index)
637
695
 
638
- Get date range object from a string date value
696
+ Inmutable Array Item deletion
639
697
 
640
698
 
641
699
 
@@ -644,56 +702,29 @@ Get date range object from a string date value
644
702
 
645
703
  | Name | Type | Description | |
646
704
  | ---- | ---- | ----------- | -------- |
647
- | value | `String` | string date value |   |
648
- | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' |   |
649
- | withTime | `Boolean` | determines if the date range will include time. Default is true |   |
650
-
651
-
652
-
653
-
654
- ##### Examples
655
-
656
- ```javascript
657
- // 1) Year:
658
- getDateRange('2020', 'YEAR');
659
- // Will return:
660
- {
661
- from: '01/01/2020 00:00:00',
662
- to: '12/31/2020 23:59:59'
663
- }
705
+ | array | `Array` | a collection of items to delete |   |
706
+ | index | `Number` | the position of the item to delete |   |
664
707
 
665
- // 2) Quarter:
666
- getDateRange('Q3 2020', 'QUARTER');
667
- // Will return:
668
- {
669
- from: '07/01/2020 00:00:00',
670
- to: '09/30/2020 23:59:59'
671
- }
672
708
 
673
- // 3) Month:
674
- getDateRange('Oct 2020', 'MONTH');
675
- // Will return:
676
- {
677
- from: '10/01/2020 00:00:00',
678
- to: '10/31/2020 23:59:59'
679
- }
680
- ```
681
709
 
682
710
 
683
711
  ##### Returns
684
712
 
685
713
 
686
- - `Object` an object with the date range with two string date properties: from and to
714
+ - a new Array or the given parameter when is empty or not an array
687
715
 
688
716
 
689
717
 
690
718
 
691
- ### dist/filters/adapters/FDToFlatUI.js
719
+ ### dist/general/array/filterNestedTree.js
692
720
 
693
721
 
694
- #### FDToFlatUI(filterData, datasetsInfo)
722
+ #### filterNestedTree(arr, childArrKey, condition)
695
723
 
696
- Generates a Flattened UI filter structure from Filter Data structure.
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
697
728
 
698
729
 
699
730
 
@@ -702,8 +733,9 @@ Generates a Flattened UI filter structure from Filter Data structure.
702
733
 
703
734
  | Name | Type | Description | |
704
735
  | ---- | ---- | ----------- | -------- |
705
- | filterData | | The filter data object. |   |
706
- | datasetsInfo | | Collection of datasets information |   |
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 |   |
707
739
 
708
740
 
709
741
 
@@ -711,13 +743,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
711
743
  ##### Returns
712
744
 
713
745
 
714
- - a flattened UI filters array
746
+ - array filtered
715
747
 
716
748
 
717
749
 
718
- #### FD21ToFlatUI(scopes, datasetsInfo)
719
750
 
720
- Generates a Filter Builder Structure from the Filter Data structure v2.1
751
+ ### dist/general/array/flattenDeep.js
752
+
753
+
754
+ #### flattenDeep(arr)
755
+
756
+ Flat deeply an array
721
757
 
722
758
 
723
759
 
@@ -726,8 +762,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
726
762
 
727
763
  | Name | Type | Description | |
728
764
  | ---- | ---- | ----------- | -------- |
729
- | scopes | | The filter scope section |   |
730
- | datasetsInfo | | Collection of datasets information |   |
765
+ | arr | | Array to flat deeply |   |
731
766
 
732
767
 
733
768
 
@@ -735,17 +770,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
735
770
  ##### Returns
736
771
 
737
772
 
738
- - a flattened UI filters array
773
+ - flatten array
739
774
 
740
775
 
741
776
 
742
777
 
743
- ### dist/filters/adapters/FDToLogic.js
778
+ ### dist/general/array/getFirstIndexFromArray.js
744
779
 
745
780
 
746
- #### FDToLogic(filterData)
781
+ #### getFirstIndexFromArray(array, callback)
747
782
 
748
- Generates a Filter Logic structure from Filter Data structure.
783
+ Gets the first index from the array by a callback condition
749
784
 
750
785
 
751
786
 
@@ -754,7 +789,8 @@ Generates a Filter Logic structure from Filter Data structure.
754
789
 
755
790
  | Name | Type | Description | |
756
791
  | ---- | ---- | ----------- | -------- |
757
- | filterData | | The filter data object. |   |
792
+ | array | | |   |
793
+ | callback | | function callback |   |
758
794
 
759
795
 
760
796
 
@@ -762,13 +798,17 @@ Generates a Filter Logic structure from Filter Data structure.
762
798
  ##### Returns
763
799
 
764
800
 
765
- - a filter logic array
801
+ - the first index of the array. -1 when the condition is not satisfied
766
802
 
767
803
 
768
804
 
769
- #### getLogicBodyFromFD21(filterData)
770
805
 
771
- Gets the logic body
806
+ ### dist/general/array/getLastIndexFromArray.js
807
+
808
+
809
+ #### getLastIndexFromArray(array, callback)
810
+
811
+ Gets the last index from the array by a callback condition
772
812
 
773
813
 
774
814
 
@@ -777,7 +817,8 @@ Gets the logic body
777
817
 
778
818
  | Name | Type | Description | |
779
819
  | ---- | ---- | ----------- | -------- |
780
- | filterData | | The filter data object |   |
820
+ | array | | |   |
821
+ | callback | | function callback |   |
781
822
 
782
823
 
783
824
 
@@ -785,17 +826,17 @@ Gets the logic body
785
826
  ##### Returns
786
827
 
787
828
 
788
- - a filter logic array
829
+ - the last index of the array. -1 when the condition is not satisfied
789
830
 
790
831
 
791
832
 
792
833
 
793
- ### dist/filters/adapters/FDToUI.js
834
+ ### dist/general/function/debounce.js
794
835
 
795
836
 
796
- #### FDToUI(filterData, datasetsInfo)
837
+ #### debounce(fn, time)
797
838
 
798
- Generates a UI filter structure from Filter Data structure.
839
+ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
799
840
 
800
841
 
801
842
 
@@ -804,8 +845,8 @@ Generates a UI filter structure from Filter Data structure.
804
845
 
805
846
  | Name | Type | Description | |
806
847
  | ---- | ---- | ----------- | -------- |
807
- | filterData | | The filter data object. |   |
808
- | datasetsInfo | | Collection of datasets information |   |
848
+ | fn | `Function` | original Function |   |
849
+ | time | `Number` | default 500ms |   |
809
850
 
810
851
 
811
852
 
@@ -813,13 +854,17 @@ Generates a UI filter structure from Filter Data structure.
813
854
  ##### Returns
814
855
 
815
856
 
816
- - a UI Filters structure
857
+ - `Function` debounced functions
817
858
 
818
859
 
819
860
 
820
- #### FD21ToUI(scopes, section, version, datasetsInfo)
821
861
 
822
- Generates a UI filter Structure from the Filter Data structure v2.1
862
+ ### dist/general/function/throttled.js
863
+
864
+
865
+ #### throttled(fn, time)
866
+
867
+ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
823
868
 
824
869
 
825
870
 
@@ -828,10 +873,8 @@ Generates a UI filter Structure from the Filter Data structure v2.1
828
873
 
829
874
  | Name | Type | Description | |
830
875
  | ---- | ---- | ----------- | -------- |
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 |   |
876
+ | fn | `Function` | original Function |   |
877
+ | time | `Number` | default 500ms |   |
835
878
 
836
879
 
837
880
 
@@ -839,17 +882,18 @@ Generates a UI filter Structure from the Filter Data structure v2.1
839
882
  ##### Returns
840
883
 
841
884
 
842
- - a UI filter Structure
885
+ - `Function` throttled function
843
886
 
844
887
 
845
888
 
846
889
 
847
- ### dist/filters/adapters/UIToFD.js
890
+ ### dist/general/object/cloneDeep.js
848
891
 
849
892
 
850
- #### UIToFD(filterData)
893
+ #### cloneDeep(obj)
851
894
 
852
- Generates a Filter Data Structure structure from UI Filter Data structure.
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
853
897
 
854
898
 
855
899
 
@@ -858,7 +902,7 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
858
902
 
859
903
  | Name | Type | Description | |
860
904
  | ---- | ---- | ----------- | -------- |
861
- | filterData | | The UI filter data object. |   |
905
+ | obj | | The object |   |
862
906
 
863
907
 
864
908
 
@@ -866,13 +910,21 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
866
910
  ##### Returns
867
911
 
868
912
 
869
- - a Filter Data structure
913
+ - The new reference object or the given object if the parsing is incorrect or empty
870
914
 
871
915
 
872
916
 
873
- #### UI21ToFD(uFilterData, version)
874
917
 
875
- Builds the Fitler Data structure from UI filter data
918
+ ### dist/general/object/get.js
919
+
920
+
921
+ #### _get(baseObject, path, defaultValue)
922
+
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.
876
928
 
877
929
 
878
930
 
@@ -881,26 +933,59 @@ Builds the Fitler Data structure from UI filter data
881
933
 
882
934
  | Name | Type | Description | |
883
935
  | ---- | ---- | ----------- | -------- |
884
- | uFilterData | | The UI filter Data object |   |
885
- | version | | the version of the structure |   |
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
+
886
940
 
887
941
 
888
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
+
889
966
 
890
967
  ##### Returns
891
968
 
892
969
 
893
- -
970
+ - the resolved value.
894
971
 
895
972
 
896
973
 
897
974
 
898
- ### dist/filters/adapters/UIToFlatUI.js
975
+ ### dist/general/object/getAttribute.js
899
976
 
900
977
 
901
- #### UIToFlatUI(filterData, datasetsInfo)
978
+ #### getAttribute(obj, key)
902
979
 
903
- Generates a Flattened UI filter structure from UI Filter Data structure.
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
904
989
 
905
990
 
906
991
 
@@ -909,22 +994,33 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
909
994
 
910
995
  | Name | Type | Description | |
911
996
  | ---- | ---- | ----------- | -------- |
912
- | filterData | | The UI filter data object. |   |
913
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
997
+ | obj | `object` | object to look for |   |
998
+ | key | `string` | String attribute in snake_case style |   |
999
+
914
1000
 
915
1001
 
916
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
+
917
1009
 
918
1010
  ##### Returns
919
1011
 
920
1012
 
921
- - a flattened UI filters array
1013
+ - `Void`
922
1014
 
923
1015
 
924
1016
 
925
- #### UI21ToFlatUI(scopes)
926
1017
 
927
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1018
+ ### dist/general/object/hasProperty.js
1019
+
1020
+
1021
+ #### _hasProperty(obj, property)
1022
+
1023
+ Use the hasOwnProperty in order to verify if the given property exists in the object.
928
1024
 
929
1025
 
930
1026
 
@@ -933,26 +1029,38 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
933
1029
 
934
1030
  | Name | Type | Description | |
935
1031
  | ---- | ---- | ----------- | -------- |
936
- | scopes | | The filter scope section |   |
1032
+ | obj | `object` | an object |   |
1033
+ | property | `string` | String to verify if exists in the object as property |   |
1034
+
1035
+
1036
+
1037
+
1038
+ ##### Examples
937
1039
 
1040
+ ```javascript
1041
+ const prop = 'prop2'
1042
+ const obj1 = { prop1: 'hello', prop2: 'world'}
1043
+ _hasProperty(ob1, prop1) // true
938
1044
 
1045
+ const obj2 = { prop1: 'hello world' }
1046
+ _hasProperty(ob1, prop2) // false
1047
+ ```
939
1048
 
940
1049
 
941
1050
  ##### Returns
942
1051
 
943
1052
 
944
- - a flattened UI filters array
1053
+ - True if the object has the given property; otherwise, false.
945
1054
 
946
1055
 
947
1056
 
948
1057
 
949
- ### dist/filters/adapters/adaptDateGroupingProperty.js
1058
+ ### dist/general/object/isObject.js
950
1059
 
951
1060
 
952
- #### adaptDateGroupingProperty(property)
1061
+ #### isObject(obj)
953
1062
 
954
- [TODO: For 2022, eliminate this adapter]
955
- Get the new property base on the old date grouping properties
1063
+ Checks if the given argument is an object type
956
1064
 
957
1065
 
958
1066
 
@@ -961,7 +1069,7 @@ Get the new property base on the old date grouping properties
961
1069
 
962
1070
  | Name | Type | Description | |
963
1071
  | ---- | ---- | ----------- | -------- |
964
- | property | | |   |
1072
+ | obj | | the variable to check |   |
965
1073
 
966
1074
 
967
1075
 
@@ -969,17 +1077,18 @@ Get the new property base on the old date grouping properties
969
1077
  ##### Returns
970
1078
 
971
1079
 
972
- -
1080
+ - True: It is an object; False: It is not.
973
1081
 
974
1082
 
975
1083
 
976
1084
 
977
- ### dist/filters/adapters/adaptFilterData.js
1085
+ ### dist/general/object/mapValues.js
978
1086
 
979
1087
 
980
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1088
+ #### mapValues(baseObject, iteratee)
981
1089
 
982
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
1090
+ Invoke iteratee (function) for each object key-value pair
1091
+ and return a mapped object
983
1092
 
984
1093
 
985
1094
 
@@ -988,9 +1097,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
988
1097
 
989
1098
  | Name | Type | Description | |
990
1099
  | ---- | ---- | ----------- | -------- |
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 |   |
1100
+ | baseObject | `Object` | Base object. |   |
1101
+ | iteratee | `Function` | The executed per iteration. |   |
994
1102
 
995
1103
 
996
1104
 
@@ -998,18 +1106,18 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
998
1106
  ##### Returns
999
1107
 
1000
1108
 
1001
- - A new filter data structure v2.1
1109
+ - `Object` New mapped object.
1002
1110
 
1003
1111
 
1004
1112
 
1005
1113
 
1006
- ### dist/filters/adapters/adaptFilterValues.js
1114
+ ### dist/general/object/mergeDeep.js
1007
1115
 
1008
1116
 
1009
- #### adaptFilterValues(filter)
1117
+ #### mergeDeep(obj1, obj2, settings)
1010
1118
 
1011
- [TODO: For 2022, eliminate this adapter]
1012
- Gets an adapted filter value array. Validates the enabled property and sets
1119
+ Merges two objects into a new one.
1120
+ The second given argument to the first given argument.
1013
1121
 
1014
1122
 
1015
1123
 
@@ -1018,7 +1126,9 @@ Gets an adapted filter value array. Validates the enabled property and sets
1018
1126
 
1019
1127
  | Name | Type | Description | |
1020
1128
  | ---- | ---- | ----------- | -------- |
1021
- | filter | | The filter |   |
1129
+ | obj1 | | The target object |   |
1130
+ | obj2 | | The object to be merged |   |
1131
+ | settings | | Object settings for this function |   |
1022
1132
 
1023
1133
 
1024
1134
 
@@ -1026,17 +1136,13 @@ Gets an adapted filter value array. Validates the enabled property and sets
1026
1136
  ##### Returns
1027
1137
 
1028
1138
 
1029
- - A new value array with the filled properties.
1030
-
1031
-
1032
-
1139
+ - a new merged object
1033
1140
 
1034
- ### dist/filters/adapters/flatUIToFD.js
1035
1141
 
1036
1142
 
1037
- #### flatUIToFD(uFilters, version)
1143
+ #### isValid(obj1, obj2)
1038
1144
 
1039
- Generates a filter data structure from the flatttened UI filters.
1145
+ Validates if the two arguments are objects
1040
1146
 
1041
1147
 
1042
1148
 
@@ -1045,8 +1151,8 @@ Generates a filter data structure from the flatttened UI filters.
1045
1151
 
1046
1152
  | Name | Type | Description | |
1047
1153
  | ---- | ---- | ----------- | -------- |
1048
- | uFilters | | Array of flattened filters from UI |   |
1049
- | version | | Tag for the version of the filter data structure |   |
1154
+ | obj1 | | The target object |   |
1155
+ | obj2 | | The object to be merged |   |
1050
1156
 
1051
1157
 
1052
1158
 
@@ -1054,14 +1160,13 @@ Generates a filter data structure from the flatttened UI filters.
1054
1160
  ##### Returns
1055
1161
 
1056
1162
 
1057
- - a Filter Data.
1163
+ - true: they are valid; false: they are not
1058
1164
 
1059
1165
 
1060
1166
 
1061
- #### buildScopes(fbFilters)
1167
+ #### getParamsToMergeDeep(settings)
1062
1168
 
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
1169
+ Validates and gets the settings with all set parameters.
1065
1170
 
1066
1171
 
1067
1172
 
@@ -1070,7 +1175,7 @@ Also, adds and organizes filters by datasets
1070
1175
 
1071
1176
  | Name | Type | Description | |
1072
1177
  | ---- | ---- | ----------- | -------- |
1073
- | fbFilters | | Array of flat filters from UI |   |
1178
+ | settings | | the settings object |   |
1074
1179
 
1075
1180
 
1076
1181
 
@@ -1078,13 +1183,17 @@ Also, adds and organizes filters by datasets
1078
1183
  ##### Returns
1079
1184
 
1080
1185
 
1081
- - an array of scopes structure.
1186
+ - a new settings object with all set parameters.
1082
1187
 
1083
1188
 
1084
1189
 
1085
- #### buildScope(uFilter)
1086
1190
 
1087
- Gets an scope 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
1088
1197
 
1089
1198
 
1090
1199
 
@@ -1093,7 +1202,8 @@ Gets an scope structure for the filter data
1093
1202
 
1094
1203
  | Name | Type | Description | |
1095
1204
  | ---- | ---- | ----------- | -------- |
1096
- | uFilter | | UI structure filter |   |
1205
+ | entity | | The variable to be copied |   |
1206
+ | cache | | |   |
1097
1207
 
1098
1208
 
1099
1209
 
@@ -1101,13 +1211,17 @@ Gets an scope structure for the filter data
1101
1211
  ##### Returns
1102
1212
 
1103
1213
 
1104
- - an scope structure
1214
+ - A new reference of the given argument
1105
1215
 
1106
1216
 
1107
1217
 
1108
- #### buildDataset(uFilter)
1109
1218
 
1110
- Gets an dataset 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
1111
1225
 
1112
1226
 
1113
1227
 
@@ -1116,7 +1230,8 @@ Gets an dataset structure for the filter data
1116
1230
 
1117
1231
  | Name | Type | Description | |
1118
1232
  | ---- | ---- | ----------- | -------- |
1119
- | uFilter | | a UI structure filter |   |
1233
+ | obj | `Object` | base object |   |
1234
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
1120
1235
 
1121
1236
 
1122
1237
 
@@ -1124,13 +1239,17 @@ Gets an dataset structure for the filter data
1124
1239
  ##### Returns
1125
1240
 
1126
1241
 
1127
- - an dataset structure
1242
+ - `Object` clean object
1128
1243
 
1129
1244
 
1130
1245
 
1131
- #### buildFilter(uFilter)
1132
1246
 
1133
- Gets an filter structure for the filter data
1247
+ ### dist/general/object/pick.js
1248
+
1249
+
1250
+ #### pick(baseObject, keys)
1251
+
1252
+ return a new object just with attributes in _keys_ list
1134
1253
 
1135
1254
 
1136
1255
 
@@ -1139,7 +1258,8 @@ Gets an filter structure for the filter data
1139
1258
 
1140
1259
  | Name | Type | Description | |
1141
1260
  | ---- | ---- | ----------- | -------- |
1142
- | uFilter | | a UI structure filter | &nbsp; |
1261
+ | baseObject | `Object` | base object | &nbsp; |
1262
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
1143
1263
 
1144
1264
 
1145
1265
 
@@ -1147,17 +1267,17 @@ Gets an filter structure for the filter data
1147
1267
  ##### Returns
1148
1268
 
1149
1269
 
1150
- - an filter structure
1270
+ - `Object` new object just with desired attributes
1151
1271
 
1152
1272
 
1153
1273
 
1154
1274
 
1155
- ### dist/filters/adapters/flatUIToLogic.js
1275
+ ### dist/general/object/serialize.js
1156
1276
 
1157
1277
 
1158
- #### flatUIToLogic(uFilter)
1278
+ #### serialize(obj)
1159
1279
 
1160
- Generates a Logic structure from flattened UI filters
1280
+ serialize object to url param
1161
1281
 
1162
1282
 
1163
1283
 
@@ -1166,7 +1286,7 @@ Generates a Logic structure from flattened UI filters
1166
1286
 
1167
1287
  | Name | Type | Description | |
1168
1288
  | ---- | ---- | ----------- | -------- |
1169
- | uFilter | | Array of flat filters from UI | &nbsp; |
1289
+ | obj | | - Object to be serialized | &nbsp; |
1170
1290
 
1171
1291
 
1172
1292
 
@@ -1174,17 +1294,17 @@ Generates a Logic structure from flattened UI filters
1174
1294
  ##### Returns
1175
1295
 
1176
1296
 
1177
- - The logic structure
1297
+ - `Void`
1178
1298
 
1179
1299
 
1180
1300
 
1181
1301
 
1182
- ### dist/filters/adapters/flatUIToOldLogic.js
1302
+ ### dist/general/string/capitalize.js
1183
1303
 
1184
1304
 
1185
- #### flatUIToOldLogic(uFilters)
1305
+ #### capitalize(text)
1186
1306
 
1187
- Generates a Logic structure from flattened UI filters
1307
+ Upper case the first letter of a given text
1188
1308
 
1189
1309
 
1190
1310
 
@@ -1193,7 +1313,7 @@ Generates a Logic structure from flattened UI filters
1193
1313
 
1194
1314
  | Name | Type | Description | |
1195
1315
  | ---- | ---- | ----------- | -------- |
1196
- | uFilters | | Array of flat filters from UI | &nbsp; |
1316
+ | text | `String` | | &nbsp; |
1197
1317
 
1198
1318
 
1199
1319
 
@@ -1201,17 +1321,18 @@ Generates a Logic structure from flattened UI filters
1201
1321
  ##### Returns
1202
1322
 
1203
1323
 
1204
- - The logic structure
1324
+ - `String` a capitalized text
1205
1325
 
1206
1326
 
1207
1327
 
1208
1328
 
1209
- ### dist/filters/adapters/flatUIToUI.js
1329
+ ### dist/general/mix/compareDeep.js
1210
1330
 
1211
1331
 
1212
- #### flatUIToUI(uFilters, version)
1332
+ #### compareDeep(object1, object2)
1213
1333
 
1214
- Generates a UI filter data structure from the flatttened UI filters.
1334
+ Compares two objects to know if they are equals. Go across nested objects.
1335
+ Includes arrays in the comparison.
1215
1336
 
1216
1337
 
1217
1338
 
@@ -1220,8 +1341,8 @@ Generates a UI filter data structure from the flatttened UI filters.
1220
1341
 
1221
1342
  | Name | Type | Description | |
1222
1343
  | ---- | ---- | ----------- | -------- |
1223
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
- | version | | Tag for the version of the filter data structure | &nbsp; |
1344
+ | object1 | | First Object to compare | &nbsp; |
1345
+ | object2 | | Second Object to compare | &nbsp; |
1225
1346
 
1226
1347
 
1227
1348
 
@@ -1229,14 +1350,17 @@ Generates a UI filter data structure from the flatttened UI filters.
1229
1350
  ##### Returns
1230
1351
 
1231
1352
 
1232
- - a UI Filter Data.
1353
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1233
1354
 
1234
1355
 
1235
1356
 
1236
- #### buildScopes(fbFilters)
1237
1357
 
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
1358
+ ### dist/general/mix/getTag.js
1359
+
1360
+
1361
+ #### getTag(value)
1362
+
1363
+ Gets the `toStringTag` of `value`.
1240
1364
 
1241
1365
 
1242
1366
 
@@ -1245,7 +1369,7 @@ Also, adds and organizes filters by datasets
1245
1369
 
1246
1370
  | Name | Type | Description | |
1247
1371
  | ---- | ---- | ----------- | -------- |
1248
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1372
+ | value | | The value to query. | &nbsp; |
1249
1373
 
1250
1374
 
1251
1375
 
@@ -1253,13 +1377,17 @@ Also, adds and organizes filters by datasets
1253
1377
  ##### Returns
1254
1378
 
1255
1379
 
1256
- - an array of scopes structure.
1380
+ - `string` Returns the `toStringTag`.
1257
1381
 
1258
1382
 
1259
1383
 
1260
- #### buildScope(uFilter)
1261
1384
 
1262
- Gets an scope structure for the UI filter data
1385
+ ### dist/general/mix/importScripts.js
1386
+
1387
+
1388
+ #### importScripts(scripts)
1389
+
1390
+ Import a set of external Scripts given the URL in both serie and cascade way
1263
1391
 
1264
1392
 
1265
1393
 
@@ -1268,21 +1396,54 @@ Gets an scope structure for the UI filter data
1268
1396
 
1269
1397
  | Name | Type | Description | |
1270
1398
  | ---- | ---- | ----------- | -------- |
1271
- | uFilter | | UI structure filter | &nbsp; |
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; |
1405
+
1406
+
1407
+
1408
+
1409
+ ##### Examples
1410
+
1411
+ ```javascript
1412
+ // 1) Simple script (paralell loading)
1413
+ importScripts(['http://myscript.js', 'http://another.js']);
1414
+
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
+ ]);
1272
1420
 
1421
+ // 3) import dependent scripts (cascade)
1422
+ importScripts([
1423
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1424
+ ]);
1273
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
+ ```
1274
1434
 
1275
1435
 
1276
1436
  ##### Returns
1277
1437
 
1278
1438
 
1279
- - an scope structure
1439
+ - `Promise` Promise when all script have been loaded
1280
1440
 
1281
1441
 
1282
1442
 
1283
- #### buildDataset(uFilter)
1443
+ #### loadScript(url, type, noModule)
1284
1444
 
1285
- Gets an dataset structure for the UI filter data
1445
+ Creates the script element and appends to document.head
1446
+ return a Promise that is resolved when the script is loaded
1286
1447
 
1287
1448
 
1288
1449
 
@@ -1291,7 +1452,9 @@ Gets an dataset structure for the UI filter data
1291
1452
 
1292
1453
  | Name | Type | Description | |
1293
1454
  | ---- | ---- | ----------- | -------- |
1294
- | uFilter | | a UI structure filter | &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; |
1295
1458
 
1296
1459
 
1297
1460
 
@@ -1299,13 +1462,17 @@ Gets an dataset structure for the UI filter data
1299
1462
  ##### Returns
1300
1463
 
1301
1464
 
1302
- - an dataset structure
1465
+ - `Void`
1303
1466
 
1304
1467
 
1305
1468
 
1306
- #### buildFilter(uFilter)
1307
1469
 
1308
- Gets an filter structure for the UI filter data
1470
+ ### dist/general/mix/isEmpty.js
1471
+
1472
+
1473
+ #### isEmpty(variable, includeFalsy)
1474
+
1475
+ Validates if the given argument is empty
1309
1476
 
1310
1477
 
1311
1478
 
@@ -1314,7 +1481,8 @@ Gets an filter structure for the UI filter data
1314
1481
 
1315
1482
  | Name | Type | Description | |
1316
1483
  | ---- | ---- | ----------- | -------- |
1317
- | uFilter | | a UI structure filter | &nbsp; |
1484
+ | variable | | the given variable | &nbsp; |
1485
+ | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1318
1486
 
1319
1487
 
1320
1488
 
@@ -1322,17 +1490,19 @@ Gets an filter structure for the UI filter data
1322
1490
  ##### Returns
1323
1491
 
1324
1492
 
1325
- - an filter structure
1493
+ - true: the given argument is empty; false: is not.
1326
1494
 
1327
1495
 
1328
1496
 
1329
1497
 
1330
- ### dist/filters/adapters/logicToFD.js
1498
+ ### dist/general/mix/isNaNV2.js
1331
1499
 
1332
1500
 
1333
- #### logicToFD(filterData, version)
1501
+ #### isNaNV2(variable)
1334
1502
 
1335
- Generates a filter data structure from the old logic structure (v2.0).
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.
1336
1506
 
1337
1507
 
1338
1508
 
@@ -1341,8 +1511,7 @@ Generates a filter data structure from the old logic structure (v2.0).
1341
1511
 
1342
1512
  | Name | Type | Description | |
1343
1513
  | ---- | ---- | ----------- | -------- |
1344
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
- | version | | Tag for the version of the filter data structure | &nbsp; |
1514
+ | variable | | the variable to validate | &nbsp; |
1346
1515
 
1347
1516
 
1348
1517
 
@@ -1350,17 +1519,18 @@ Generates a filter data structure from the old logic structure (v2.0).
1350
1519
  ##### Returns
1351
1520
 
1352
1521
 
1353
- - a Filter Data.
1522
+ - True if variable is a NaN or false otherwise
1354
1523
 
1355
1524
 
1356
1525
 
1357
1526
 
1358
- ### dist/filters/adapters/logicToFlatUI.js
1527
+ ### dist/general/mix/isNull.js
1359
1528
 
1360
1529
 
1361
- #### logicToFlatUI(logics)
1530
+ #### isNull(arg)
1362
1531
 
1363
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1532
+ return if a given variable is either `null` or `undefined`
1533
+ useful to avoid falsify validating Number Zero (0)
1364
1534
 
1365
1535
 
1366
1536
 
@@ -1369,7 +1539,7 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1369
1539
 
1370
1540
  | Name | Type | Description | |
1371
1541
  | ---- | ---- | ----------- | -------- |
1372
- | logics | | The old logic structure (v2.0) | &nbsp; |
1542
+ | arg | `any` | | &nbsp; |
1373
1543
 
1374
1544
 
1375
1545
 
@@ -1377,13 +1547,19 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1377
1547
  ##### Returns
1378
1548
 
1379
1549
 
1380
- - The Flattened UI Filters array
1550
+ - `Boolean`
1381
1551
 
1382
1552
 
1383
1553
 
1384
- #### getFilter(filters, filter, getIndex)
1385
1554
 
1386
- Get the filter or the index of the given array, validating an old filter structure.
1555
+ ### dist/general/mix/randomId.js
1556
+
1557
+
1558
+ #### randomId(length, exclude)
1559
+
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.
1387
1563
 
1388
1564
 
1389
1565
 
@@ -1392,9 +1568,8 @@ Get the filter or the index of the given array, validating an old filter structu
1392
1568
 
1393
1569
  | Name | Type | Description | |
1394
1570
  | ---- | ---- | ----------- | -------- |
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; |
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; |
1398
1573
 
1399
1574
 
1400
1575
 
@@ -1402,13 +1577,19 @@ Get the filter or the index of the given array, validating an old filter structu
1402
1577
  ##### Returns
1403
1578
 
1404
1579
 
1405
- - the index or the UI filter object
1580
+ - `String` Random string
1406
1581
 
1407
1582
 
1408
1583
 
1409
- #### refineRankingValues(values, uiValues)
1410
1584
 
1411
- Refines the values of the Ranking column type.
1585
+ ### dist/general/mix/size.js
1586
+
1587
+
1588
+ #### size(obj)
1589
+
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.
1412
1593
 
1413
1594
 
1414
1595
 
@@ -1417,8 +1598,7 @@ Refines the values of the Ranking column type.
1417
1598
 
1418
1599
  | Name | Type | Description | |
1419
1600
  | ---- | ---- | ----------- | -------- |
1420
- | values | | the Array of Ranking values | &nbsp; |
1421
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1601
+ | obj | `Any` | Any object-type variable | &nbsp; |
1422
1602
 
1423
1603
 
1424
1604
 
@@ -1426,17 +1606,17 @@ Refines the values of the Ranking column type.
1426
1606
  ##### Returns
1427
1607
 
1428
1608
 
1429
- - the array of Ranking values
1609
+ - `Number` the size of the given variable
1430
1610
 
1431
1611
 
1432
1612
 
1433
1613
 
1434
- ### dist/filters/adapters/logicToUI.js
1614
+ ### dist/filters/adapters/FDToFlatUI.js
1435
1615
 
1436
1616
 
1437
- #### logicToUI(uFilters, datasetsInfo)
1617
+ #### FDToFlatUI(filterData, datasetsInfo)
1438
1618
 
1439
- Generates a UI filter structure from the old logic structure (v2.0).
1619
+ Generates a Flattened UI filter structure from Filter Data structure.
1440
1620
 
1441
1621
 
1442
1622
 
@@ -1445,7 +1625,7 @@ Generates a UI filter structure from the old logic structure (v2.0).
1445
1625
 
1446
1626
  | Name | Type | Description | |
1447
1627
  | ---- | ---- | ----------- | -------- |
1448
- | uFilters | | Array of filters from old logic structure | &nbsp; |
1628
+ | filterData | | The filter data object. | &nbsp; |
1449
1629
  | datasetsInfo | | Collection of datasets information | &nbsp; |
1450
1630
 
1451
1631
 
@@ -1454,17 +1634,41 @@ Generates a UI filter structure from the old logic structure (v2.0).
1454
1634
  ##### Returns
1455
1635
 
1456
1636
 
1457
- - a UI Filter Data.
1637
+ - a flattened UI filters array
1458
1638
 
1459
1639
 
1460
1640
 
1641
+ #### FD21ToFlatUI(scopes, datasetsInfo)
1461
1642
 
1462
- ### dist/filters/adapters/transformFilters.js
1643
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
1463
1644
 
1464
1645
 
1465
- #### transformFilters(oldFiltersObj, section)
1466
1646
 
1467
- Transform the old filters structure into the new one
1647
+
1648
+ ##### Parameters
1649
+
1650
+ | Name | Type | Description | |
1651
+ | ---- | ---- | ----------- | -------- |
1652
+ | scopes | | The filter scope section | &nbsp; |
1653
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1654
+
1655
+
1656
+
1657
+
1658
+ ##### Returns
1659
+
1660
+
1661
+ - a flattened UI filters array
1662
+
1663
+
1664
+
1665
+
1666
+ ### dist/filters/adapters/FDToLogic.js
1667
+
1668
+
1669
+ #### FDToLogic(filterData)
1670
+
1671
+ Generates a Filter Logic structure from Filter Data structure.
1468
1672
 
1469
1673
 
1470
1674
 
@@ -1473,97 +1677,72 @@ Transform the old filters structure into the new one
1473
1677
 
1474
1678
  | Name | Type | Description | |
1475
1679
  | ---- | ---- | ----------- | -------- |
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; |
1680
+ | filterData | | The filter data object. | &nbsp; |
1478
1681
 
1479
1682
 
1480
1683
 
1481
1684
 
1482
- ##### Examples
1685
+ ##### Returns
1483
1686
 
1484
- ```javascript
1485
1687
 
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
- };
1688
+ - a filter logic array
1528
1689
 
1529
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
- ```
1531
1690
 
1532
1691
 
1533
- ##### Returns
1692
+ #### getLogicBodyFromFD21(filterData)
1693
+
1694
+ Gets the logic body
1534
1695
 
1535
1696
 
1536
- - `Object` an object with the new filters structure
1537
1697
 
1538
1698
 
1699
+ ##### Parameters
1700
+
1701
+ | Name | Type | Description | |
1702
+ | ---- | ---- | ----------- | -------- |
1703
+ | filterData | | The filter data object | &nbsp; |
1539
1704
 
1540
1705
 
1541
- ### dist/filters/classes/FilterInputErrorHandler.js
1542
1706
 
1543
1707
 
1544
- #### new FilterInputErrorHandler()
1708
+ ##### Returns
1545
1709
 
1546
1710
 
1711
+ - a filter logic array
1547
1712
 
1548
1713
 
1549
1714
 
1550
1715
 
1716
+ ### dist/filters/adapters/FDToUI.js
1551
1717
 
1552
1718
 
1553
- ##### Returns
1719
+ #### FDToUI(filterData, datasetsInfo)
1554
1720
 
1721
+ Generates a UI filter structure from Filter Data structure.
1555
1722
 
1556
- - `Void`
1557
1723
 
1558
1724
 
1559
1725
 
1726
+ ##### Parameters
1560
1727
 
1561
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
1728
+ | Name | Type | Description | |
1729
+ | ---- | ---- | ----------- | -------- |
1730
+ | filterData | | The filter data object. | &nbsp; |
1731
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1562
1732
 
1563
1733
 
1564
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1565
1734
 
1566
- [TODO: Make a proper description for this function]
1735
+
1736
+ ##### Returns
1737
+
1738
+
1739
+ - a UI Filters structure
1740
+
1741
+
1742
+
1743
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
1744
+
1745
+ Generates a UI filter Structure from the Filter Data structure v2.1
1567
1746
 
1568
1747
 
1569
1748
 
@@ -1572,9 +1751,10 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1572
1751
 
1573
1752
  | Name | Type | Description | |
1574
1753
  | ---- | ---- | ----------- | -------- |
1575
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
- | scopes | | | &nbsp; |
1577
- | currentScope | | | &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; |
1578
1758
 
1579
1759
 
1580
1760
 
@@ -1582,17 +1762,17 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1582
1762
  ##### Returns
1583
1763
 
1584
1764
 
1585
- -
1765
+ - a UI filter Structure
1586
1766
 
1587
1767
 
1588
1768
 
1589
1769
 
1590
- ### dist/filters/helpers/getAvailableScopes.js
1770
+ ### dist/filters/adapters/UIToFD.js
1591
1771
 
1592
1772
 
1593
- #### getAvailableScopes(config)
1773
+ #### UIToFD(filterData)
1594
1774
 
1595
- Gets Scopes/Scope IDs by given IDs
1775
+ Generates a Filter Data Structure structure from UI Filter Data structure.
1596
1776
 
1597
1777
 
1598
1778
 
@@ -1601,7 +1781,7 @@ Gets Scopes/Scope IDs by given IDs
1601
1781
 
1602
1782
  | Name | Type | Description | |
1603
1783
  | ---- | ---- | ----------- | -------- |
1604
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
1784
+ | filterData | | The UI filter data object. | &nbsp; |
1605
1785
 
1606
1786
 
1607
1787
 
@@ -1609,17 +1789,13 @@ Gets Scopes/Scope IDs by given IDs
1609
1789
  ##### Returns
1610
1790
 
1611
1791
 
1612
- - a Scopes/Scope IDs array
1613
-
1614
-
1615
-
1792
+ - a Filter Data structure
1616
1793
 
1617
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1618
1794
 
1619
1795
 
1620
- #### getAvailableScopesIDsByConfig(config)
1796
+ #### UI21ToFD(uFilterData, version)
1621
1797
 
1622
- Gets the Scopes IDS for the Available Scope function by any config
1798
+ Builds the Fitler Data structure from UI filter data
1623
1799
 
1624
1800
 
1625
1801
 
@@ -1628,7 +1804,8 @@ Gets the Scopes IDS for the Available Scope function by any config
1628
1804
 
1629
1805
  | Name | Type | Description | |
1630
1806
  | ---- | ---- | ----------- | -------- |
1631
- | config | | any config | &nbsp; |
1807
+ | uFilterData | | The UI filter Data object | &nbsp; |
1808
+ | version | | the version of the structure | &nbsp; |
1632
1809
 
1633
1810
 
1634
1811
 
@@ -1636,17 +1813,17 @@ Gets the Scopes IDS for the Available Scope function by any config
1636
1813
  ##### Returns
1637
1814
 
1638
1815
 
1639
- - a Available Scope IDS config
1816
+ -
1640
1817
 
1641
1818
 
1642
1819
 
1643
1820
 
1644
- ### dist/filters/helpers/getScopesByHierarchy.js
1821
+ ### dist/filters/adapters/UIToFlatUI.js
1645
1822
 
1646
1823
 
1647
- #### getScopesByHierarchy(scopes, currentScope)
1824
+ #### UIToFlatUI(filterData, datasetsInfo)
1648
1825
 
1649
- [TODO: Make a description for this]
1826
+ Generates a Flattened UI filter structure from UI Filter Data structure.
1650
1827
 
1651
1828
 
1652
1829
 
@@ -1655,8 +1832,8 @@ Gets the Scopes IDS for the Available Scope function by any config
1655
1832
 
1656
1833
  | Name | Type | Description | |
1657
1834
  | ---- | ---- | ----------- | -------- |
1658
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
- | currentScope | | Current scope type | &nbsp; |
1835
+ | filterData | | The UI filter data object. | &nbsp; |
1836
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
1660
1837
 
1661
1838
 
1662
1839
 
@@ -1664,17 +1841,13 @@ Gets the Scopes IDS for the Available Scope function by any config
1664
1841
  ##### Returns
1665
1842
 
1666
1843
 
1667
- - A new array of Scopes/Scope IDs
1668
-
1669
-
1670
-
1844
+ - a flattened UI filters array
1671
1845
 
1672
- ### dist/general/array/delete.js
1673
1846
 
1674
1847
 
1675
- #### ArrayDelete(array, index)
1848
+ #### UI21ToFlatUI(scopes)
1676
1849
 
1677
- Inmutable Array Item deletion
1850
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1678
1851
 
1679
1852
 
1680
1853
 
@@ -1683,8 +1856,7 @@ Inmutable Array Item deletion
1683
1856
 
1684
1857
  | Name | Type | Description | |
1685
1858
  | ---- | ---- | ----------- | -------- |
1686
- | array | `Array` | a collection of items to delete | &nbsp; |
1687
- | index | `Number` | the position of the item to delete | &nbsp; |
1859
+ | scopes | | The filter scope section | &nbsp; |
1688
1860
 
1689
1861
 
1690
1862
 
@@ -1692,20 +1864,18 @@ Inmutable Array Item deletion
1692
1864
  ##### Returns
1693
1865
 
1694
1866
 
1695
- - a new Array or the given parameter when is empty or not an array
1867
+ - a flattened UI filters array
1696
1868
 
1697
1869
 
1698
1870
 
1699
1871
 
1700
- ### dist/general/array/filterNestedTree.js
1872
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
1701
1873
 
1702
1874
 
1703
- #### filterNestedTree(arr, childArrKey, condition)
1875
+ #### adaptDateGroupingProperty(property)
1704
1876
 
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
1877
+ [TODO: For 2022, eliminate this adapter]
1878
+ Get the new property base on the old date grouping properties
1709
1879
 
1710
1880
 
1711
1881
 
@@ -1714,9 +1884,7 @@ Filters a nested tree array by a custom condition on the last child node
1714
1884
 
1715
1885
  | Name | Type | Description | |
1716
1886
  | ---- | ---- | ----------- | -------- |
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; |
1887
+ | property | | | &nbsp; |
1720
1888
 
1721
1889
 
1722
1890
 
@@ -1724,17 +1892,17 @@ Filters a nested tree array by a custom condition on the last child node
1724
1892
  ##### Returns
1725
1893
 
1726
1894
 
1727
- - array filtered
1895
+ -
1728
1896
 
1729
1897
 
1730
1898
 
1731
1899
 
1732
- ### dist/general/array/flattenDeep.js
1900
+ ### dist/filters/adapters/adaptFilterData.js
1733
1901
 
1734
1902
 
1735
- #### flattenDeep(arr)
1903
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1736
1904
 
1737
- Flat deeply an array
1905
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1738
1906
 
1739
1907
 
1740
1908
 
@@ -1743,7 +1911,9 @@ Flat deeply an array
1743
1911
 
1744
1912
  | Name | Type | Description | |
1745
1913
  | ---- | ---- | ----------- | -------- |
1746
- | arr | | Array to flat deeply | &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; |
1747
1917
 
1748
1918
 
1749
1919
 
@@ -1751,17 +1921,17 @@ Flat deeply an array
1751
1921
  ##### Returns
1752
1922
 
1753
1923
 
1754
- - flatten array
1924
+ - A new filter data structure v2.1
1755
1925
 
1756
1926
 
1757
1927
 
1758
1928
 
1759
- ### dist/general/array/getFirstIndexFromArray.js
1929
+ ### dist/filters/adapters/flatUIToFD.js
1760
1930
 
1761
1931
 
1762
- #### getFirstIndexFromArray(array, callback)
1932
+ #### flatUIToFD(uFilters, version)
1763
1933
 
1764
- Gets the first index from the array by a callback condition
1934
+ Generates a filter data structure from the flatttened UI filters.
1765
1935
 
1766
1936
 
1767
1937
 
@@ -1770,8 +1940,8 @@ Gets the first index from the array by a callback condition
1770
1940
 
1771
1941
  | Name | Type | Description | |
1772
1942
  | ---- | ---- | ----------- | -------- |
1773
- | array | | | &nbsp; |
1774
- | callback | | function callback | &nbsp; |
1943
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
1944
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1775
1945
 
1776
1946
 
1777
1947
 
@@ -1779,17 +1949,14 @@ Gets the first index from the array by a callback condition
1779
1949
  ##### Returns
1780
1950
 
1781
1951
 
1782
- - the first index of the array. -1 when the condition is not satisfied
1783
-
1784
-
1785
-
1952
+ - a Filter Data.
1786
1953
 
1787
- ### dist/general/array/getLastIndexFromArray.js
1788
1954
 
1789
1955
 
1790
- #### getLastIndexFromArray(array, callback)
1956
+ #### buildScopes(fbFilters)
1791
1957
 
1792
- Gets the last index from the array by a callback condition
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
1793
1960
 
1794
1961
 
1795
1962
 
@@ -1798,8 +1965,7 @@ Gets the last index from the array by a callback condition
1798
1965
 
1799
1966
  | Name | Type | Description | |
1800
1967
  | ---- | ---- | ----------- | -------- |
1801
- | array | | | &nbsp; |
1802
- | callback | | function callback | &nbsp; |
1968
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
1803
1969
 
1804
1970
 
1805
1971
 
@@ -1807,17 +1973,13 @@ Gets the last index from the array by a callback condition
1807
1973
  ##### Returns
1808
1974
 
1809
1975
 
1810
- - the last index of the array. -1 when the condition is not satisfied
1811
-
1812
-
1813
-
1976
+ - an array of scopes structure.
1814
1977
 
1815
- ### dist/general/function/debounce.js
1816
1978
 
1817
1979
 
1818
- #### debounce(fn, time)
1980
+ #### buildScope(uFilter)
1819
1981
 
1820
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1982
+ Gets an scope structure for the filter data
1821
1983
 
1822
1984
 
1823
1985
 
@@ -1826,8 +1988,7 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
1826
1988
 
1827
1989
  | Name | Type | Description | |
1828
1990
  | ---- | ---- | ----------- | -------- |
1829
- | fn | `Function` | original Function | &nbsp; |
1830
- | time | `Number` | default 500ms | &nbsp; |
1991
+ | uFilter | | UI structure filter | &nbsp; |
1831
1992
 
1832
1993
 
1833
1994
 
@@ -1835,17 +1996,36 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
1835
1996
  ##### Returns
1836
1997
 
1837
1998
 
1838
- - `Function` debounced functions
1999
+ - an scope structure
1839
2000
 
1840
2001
 
1841
2002
 
2003
+ #### buildDataset(uFilter)
1842
2004
 
1843
- ### dist/general/function/throttled.js
2005
+ Gets an dataset structure for the filter data
1844
2006
 
1845
2007
 
1846
- #### throttled(fn, time)
1847
2008
 
1848
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
2009
+
2010
+ ##### Parameters
2011
+
2012
+ | Name | Type | Description | |
2013
+ | ---- | ---- | ----------- | -------- |
2014
+ | uFilter | | a UI structure filter | &nbsp; |
2015
+
2016
+
2017
+
2018
+
2019
+ ##### Returns
2020
+
2021
+
2022
+ - an dataset structure
2023
+
2024
+
2025
+
2026
+ #### buildFilter(uFilter)
2027
+
2028
+ Gets an filter structure for the filter data
1849
2029
 
1850
2030
 
1851
2031
 
@@ -1854,8 +2034,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1854
2034
 
1855
2035
  | Name | Type | Description | |
1856
2036
  | ---- | ---- | ----------- | -------- |
1857
- | fn | `Function` | original Function | &nbsp; |
1858
- | time | `Number` | default 500ms | &nbsp; |
2037
+ | uFilter | | a UI structure filter | &nbsp; |
1859
2038
 
1860
2039
 
1861
2040
 
@@ -1863,18 +2042,18 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1863
2042
  ##### Returns
1864
2043
 
1865
2044
 
1866
- - `Function` throttled function
2045
+ - an filter structure
1867
2046
 
1868
2047
 
1869
2048
 
1870
2049
 
1871
- ### dist/general/mix/compareDeep.js
2050
+ ### dist/filters/adapters/adaptFilterValues.js
1872
2051
 
1873
2052
 
1874
- #### compareDeep(object1, object2)
2053
+ #### adaptFilterValues(filter)
1875
2054
 
1876
- Compares two objects to know if they are equals. Go across nested objects.
1877
- Includes arrays in the comparison.
2055
+ [TODO: For 2022, eliminate this adapter]
2056
+ Gets an adapted filter value array. Validates the enabled property and sets
1878
2057
 
1879
2058
 
1880
2059
 
@@ -1883,8 +2062,7 @@ Includes arrays in the comparison.
1883
2062
 
1884
2063
  | Name | Type | Description | |
1885
2064
  | ---- | ---- | ----------- | -------- |
1886
- | object1 | | First Object to compare | &nbsp; |
1887
- | object2 | | Second Object to compare | &nbsp; |
2065
+ | filter | | The filter | &nbsp; |
1888
2066
 
1889
2067
 
1890
2068
 
@@ -1892,17 +2070,17 @@ Includes arrays in the comparison.
1892
2070
  ##### Returns
1893
2071
 
1894
2072
 
1895
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
2073
+ - A new value array with the filled properties.
1896
2074
 
1897
2075
 
1898
2076
 
1899
2077
 
1900
- ### dist/general/mix/getTag.js
2078
+ ### dist/filters/adapters/flatUIToLogic.js
1901
2079
 
1902
2080
 
1903
- #### getTag(value)
2081
+ #### flatUIToLogic(uFilter)
1904
2082
 
1905
- Gets the `toStringTag` of `value`.
2083
+ Generates a Logic structure from flattened UI filters
1906
2084
 
1907
2085
 
1908
2086
 
@@ -1911,7 +2089,7 @@ Gets the `toStringTag` of `value`.
1911
2089
 
1912
2090
  | Name | Type | Description | |
1913
2091
  | ---- | ---- | ----------- | -------- |
1914
- | value | | The value to query. | &nbsp; |
2092
+ | uFilter | | Array of flat filters from UI | &nbsp; |
1915
2093
 
1916
2094
 
1917
2095
 
@@ -1919,17 +2097,17 @@ Gets the `toStringTag` of `value`.
1919
2097
  ##### Returns
1920
2098
 
1921
2099
 
1922
- - `string` Returns the `toStringTag`.
2100
+ - The logic structure
1923
2101
 
1924
2102
 
1925
2103
 
1926
2104
 
1927
- ### dist/general/mix/importScripts.js
2105
+ ### dist/filters/adapters/flatUIToOldLogic.js
1928
2106
 
1929
2107
 
1930
- #### importScripts(scripts)
2108
+ #### flatUIToOldLogic(uFilters)
1931
2109
 
1932
- Import a set of external Scripts given the URL in both serie and cascade way
2110
+ Generates a Logic structure from flattened UI filters
1933
2111
 
1934
2112
 
1935
2113
 
@@ -1938,65 +2116,7 @@ Import a set of external Scripts given the URL in both serie and cascade way
1938
2116
 
1939
2117
  | Name | Type | Description | |
1940
2118
  | ---- | ---- | ----------- | -------- |
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
- ]);
1962
-
1963
- // 3) import dependent scripts (cascade)
1964
- importScripts([
1965
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1966
- ]);
1967
-
1968
- // 4) mix
1969
- importScripts([
1970
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1971
- { url: 'http://another.esm.js', type: 'module' },
1972
- { url: 'http://another.js', noModule: true },
1973
- 'http://simplescript.js'
1974
- ]);
1975
- ```
1976
-
1977
-
1978
- ##### Returns
1979
-
1980
-
1981
- - `Promise` Promise when all script have been loaded
1982
-
1983
-
1984
-
1985
- #### loadScript(url, type, noModule)
1986
-
1987
- Creates the script element and appends to document.head
1988
- return a Promise that is resolved when the script is loaded
1989
-
1990
-
1991
-
1992
-
1993
- ##### Parameters
1994
-
1995
- | Name | Type | Description | |
1996
- | ---- | ---- | ----------- | -------- |
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; |
2119
+ | uFilters | | Array of flat filters from UI | &nbsp; |
2000
2120
 
2001
2121
 
2002
2122
 
@@ -2004,47 +2124,17 @@ return a Promise that is resolved when the script is loaded
2004
2124
  ##### Returns
2005
2125
 
2006
2126
 
2007
- - `Void`
2008
-
2009
-
2010
-
2011
-
2012
- ### dist/general/mix/isEmpty.js
2013
-
2014
-
2015
- #### isEmpty(variable, includeFalsy)
2016
-
2017
- Validates if the given argument is empty
2018
-
2019
-
2020
-
2021
-
2022
- ##### Parameters
2023
-
2024
- | Name | Type | Description | |
2025
- | ---- | ---- | ----------- | -------- |
2026
- | variable | | the given variable | &nbsp; |
2027
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
2028
-
2029
-
2030
-
2031
-
2032
- ##### Returns
2033
-
2034
-
2035
- - true: the given argument is empty; false: is not.
2127
+ - The logic structure
2036
2128
 
2037
2129
 
2038
2130
 
2039
2131
 
2040
- ### dist/general/mix/isNaNV2.js
2132
+ ### dist/filters/adapters/flatUIToUI.js
2041
2133
 
2042
2134
 
2043
- #### isNaNV2(variable)
2135
+ #### flatUIToUI(uFilters, version)
2044
2136
 
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.
2137
+ Generates a UI filter data structure from the flatttened UI filters.
2048
2138
 
2049
2139
 
2050
2140
 
@@ -2053,7 +2143,8 @@ Validates if variable is null, undefined, or an empty string, also, the function
2053
2143
 
2054
2144
  | Name | Type | Description | |
2055
2145
  | ---- | ---- | ----------- | -------- |
2056
- | variable | | the variable to validate | &nbsp; |
2146
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
2147
+ | version | | Tag for the version of the filter data structure | &nbsp; |
2057
2148
 
2058
2149
 
2059
2150
 
@@ -2061,18 +2152,14 @@ Validates if variable is null, undefined, or an empty string, also, the function
2061
2152
  ##### Returns
2062
2153
 
2063
2154
 
2064
- - True if variable is a NaN or false otherwise
2065
-
2066
-
2067
-
2155
+ - a UI Filter Data.
2068
2156
 
2069
- ### dist/general/mix/isNull.js
2070
2157
 
2071
2158
 
2072
- #### isNull(arg)
2159
+ #### buildScopes(fbFilters)
2073
2160
 
2074
- return if a given variable is either `null` or `undefined`
2075
- useful to avoid falsify validating Number Zero (0)
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
2076
2163
 
2077
2164
 
2078
2165
 
@@ -2081,7 +2168,7 @@ useful to avoid falsify validating Number Zero (0)
2081
2168
 
2082
2169
  | Name | Type | Description | |
2083
2170
  | ---- | ---- | ----------- | -------- |
2084
- | arg | `any` | | &nbsp; |
2171
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
2085
2172
 
2086
2173
 
2087
2174
 
@@ -2089,19 +2176,13 @@ useful to avoid falsify validating Number Zero (0)
2089
2176
  ##### Returns
2090
2177
 
2091
2178
 
2092
- - `Boolean`
2093
-
2094
-
2095
-
2179
+ - an array of scopes structure.
2096
2180
 
2097
- ### dist/general/mix/randomId.js
2098
2181
 
2099
2182
 
2100
- #### randomId(length, exclude)
2183
+ #### buildScope(uFilter)
2101
2184
 
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.
2185
+ Gets an scope structure for the UI filter data
2105
2186
 
2106
2187
 
2107
2188
 
@@ -2110,8 +2191,7 @@ Creates a random string
2110
2191
 
2111
2192
  | Name | Type | Description | |
2112
2193
  | ---- | ---- | ----------- | -------- |
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; |
2194
+ | uFilter | | UI structure filter | &nbsp; |
2115
2195
 
2116
2196
 
2117
2197
 
@@ -2119,19 +2199,13 @@ Creates a random string
2119
2199
  ##### Returns
2120
2200
 
2121
2201
 
2122
- - `String` Random string
2123
-
2124
-
2125
-
2202
+ - an scope structure
2126
2203
 
2127
- ### dist/general/mix/size.js
2128
2204
 
2129
2205
 
2130
- #### size(obj)
2206
+ #### buildDataset(uFilter)
2131
2207
 
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.
2208
+ Gets an dataset structure for the UI filter data
2135
2209
 
2136
2210
 
2137
2211
 
@@ -2140,7 +2214,7 @@ Gets the length of the given array.
2140
2214
 
2141
2215
  | Name | Type | Description | |
2142
2216
  | ---- | ---- | ----------- | -------- |
2143
- | obj | `Any` | Any object-type variable | &nbsp; |
2217
+ | uFilter | | a UI structure filter | &nbsp; |
2144
2218
 
2145
2219
 
2146
2220
 
@@ -2148,18 +2222,13 @@ Gets the length of the given array.
2148
2222
  ##### Returns
2149
2223
 
2150
2224
 
2151
- - `Number` the size of the given variable
2152
-
2153
-
2154
-
2225
+ - an dataset structure
2155
2226
 
2156
- ### dist/general/object/cloneDeep.js
2157
2227
 
2158
2228
 
2159
- #### cloneDeep(obj)
2229
+ #### buildFilter(uFilter)
2160
2230
 
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
2231
+ Gets an filter structure for the UI filter data
2163
2232
 
2164
2233
 
2165
2234
 
@@ -2168,7 +2237,7 @@ Not to use this function with inner objects and functions
2168
2237
 
2169
2238
  | Name | Type | Description | |
2170
2239
  | ---- | ---- | ----------- | -------- |
2171
- | obj | | The object | &nbsp; |
2240
+ | uFilter | | a UI structure filter | &nbsp; |
2172
2241
 
2173
2242
 
2174
2243
 
@@ -2176,21 +2245,17 @@ Not to use this function with inner objects and functions
2176
2245
  ##### Returns
2177
2246
 
2178
2247
 
2179
- - The new reference object or the given object if the parsing is incorrect or empty
2180
-
2248
+ - an filter structure
2181
2249
 
2182
2250
 
2183
2251
 
2184
- ### dist/general/object/get.js
2185
2252
 
2253
+ ### dist/filters/adapters/logicToFD.js
2186
2254
 
2187
- #### _get(baseObject, path, defaultValue)
2188
2255
 
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.
2256
+ #### logicToFD(filterData, version)
2191
2257
 
2192
- Empty arrays and empty objects are returned but the defaultValue is not
2193
- Undefined and null values will return the defaultValue.
2258
+ Generates a filter data structure from the old logic structure (v2.0).
2194
2259
 
2195
2260
 
2196
2261
 
@@ -2199,59 +2264,26 @@ Undefined and null values will return the defaultValue.
2199
2264
 
2200
2265
  | Name | Type | Description | |
2201
2266
  | ---- | ---- | ----------- | -------- |
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
-
2267
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
2268
+ | version | | Tag for the version of the filter data structure | &nbsp; |
2206
2269
 
2207
2270
 
2208
2271
 
2209
- ##### Examples
2210
-
2211
- ```javascript
2212
- // returns 'Hello'
2213
- _get({ item1: 'Hello', item2: 'World' }, 'item1')
2214
- ```
2215
- ```javascript
2216
- // returns 'A simple Hello'
2217
- _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
2218
- ```
2219
- ```javascript
2220
- // returns 'Hello Again'
2221
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
2222
- ```
2223
- ```javascript
2224
- // returns 'Hello 2'
2225
- _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
2226
- ```
2227
- ```javascript
2228
- // returns 'Hello Again'
2229
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
2230
- ```
2231
-
2232
2272
 
2233
2273
  ##### Returns
2234
2274
 
2235
2275
 
2236
- - the resolved value.
2276
+ - a Filter Data.
2237
2277
 
2238
2278
 
2239
2279
 
2240
2280
 
2241
- ### dist/general/object/getAttribute.js
2281
+ ### dist/filters/adapters/logicToFlatUI.js
2242
2282
 
2243
2283
 
2244
- #### getAttribute(obj, key)
2284
+ #### logicToFlatUI(logics)
2245
2285
 
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
2286
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
2255
2287
 
2256
2288
 
2257
2289
 
@@ -2260,33 +2292,21 @@ Searchs for properties in different case styles such as: lower, upper, camel and
2260
2292
 
2261
2293
  | Name | Type | Description | |
2262
2294
  | ---- | ---- | ----------- | -------- |
2263
- | obj | `object` | object to look for | &nbsp; |
2264
- | key | `string` | String attribute in snake_case style | &nbsp; |
2295
+ | logics | | The old logic structure (v2.0) | &nbsp; |
2265
2296
 
2266
2297
 
2267
2298
 
2268
2299
 
2269
- ##### Examples
2270
-
2271
- ```javascript
2272
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2273
- ```
2274
-
2275
-
2276
2300
  ##### Returns
2277
2301
 
2278
2302
 
2279
- - `Void`
2280
-
2281
-
2282
-
2303
+ - The Flattened UI Filters array
2283
2304
 
2284
- ### dist/general/object/hasProperty.js
2285
2305
 
2286
2306
 
2287
- #### _hasProperty(obj, property)
2307
+ #### getFilter(filters, filter, getIndex)
2288
2308
 
2289
- Use the hasOwnProperty in order to verify if the given property exists in the object.
2309
+ Get the filter or the index of the given array, validating an old filter structure.
2290
2310
 
2291
2311
 
2292
2312
 
@@ -2295,38 +2315,23 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
2295
2315
 
2296
2316
  | Name | Type | Description | |
2297
2317
  | ---- | ---- | ----------- | -------- |
2298
- | obj | `object` | an object | &nbsp; |
2299
- | property | `string` | String to verify if exists in the object as property | &nbsp; |
2300
-
2301
-
2302
-
2303
-
2304
- ##### Examples
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; |
2305
2321
 
2306
- ```javascript
2307
- const prop = 'prop2'
2308
- const obj1 = { prop1: 'hello', prop2: 'world'}
2309
- _hasProperty(ob1, prop1) // true
2310
2322
 
2311
- const obj2 = { prop1: 'hello world' }
2312
- _hasProperty(ob1, prop2) // false
2313
- ```
2314
2323
 
2315
2324
 
2316
2325
  ##### Returns
2317
2326
 
2318
2327
 
2319
- - True if the object has the given property; otherwise, false.
2320
-
2321
-
2322
-
2328
+ - the index or the UI filter object
2323
2329
 
2324
- ### dist/general/object/isObject.js
2325
2330
 
2326
2331
 
2327
- #### isObject(obj)
2332
+ #### refineRankingValues(values, uiValues)
2328
2333
 
2329
- Checks if the given argument is an object type
2334
+ Refines the values of the Ranking column type.
2330
2335
 
2331
2336
 
2332
2337
 
@@ -2335,7 +2340,8 @@ Checks if the given argument is an object type
2335
2340
 
2336
2341
  | Name | Type | Description | |
2337
2342
  | ---- | ---- | ----------- | -------- |
2338
- | obj | | the variable to check | &nbsp; |
2343
+ | values | | the Array of Ranking values | &nbsp; |
2344
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
2339
2345
 
2340
2346
 
2341
2347
 
@@ -2343,18 +2349,17 @@ Checks if the given argument is an object type
2343
2349
  ##### Returns
2344
2350
 
2345
2351
 
2346
- - True: It is an object; False: It is not.
2352
+ - the array of Ranking values
2347
2353
 
2348
2354
 
2349
2355
 
2350
2356
 
2351
- ### dist/general/object/mapValues.js
2357
+ ### dist/filters/adapters/logicToUI.js
2352
2358
 
2353
2359
 
2354
- #### mapValues(baseObject, iteratee)
2360
+ #### logicToUI(uFilters, datasetsInfo)
2355
2361
 
2356
- Invoke iteratee (function) for each object key-value pair
2357
- and return a mapped object
2362
+ Generates a UI filter structure from the old logic structure (v2.0).
2358
2363
 
2359
2364
 
2360
2365
 
@@ -2363,8 +2368,8 @@ and return a mapped object
2363
2368
 
2364
2369
  | Name | Type | Description | |
2365
2370
  | ---- | ---- | ----------- | -------- |
2366
- | baseObject | `Object` | Base object. | &nbsp; |
2367
- | iteratee | `Function` | The executed per iteration. | &nbsp; |
2371
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
2372
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
2368
2373
 
2369
2374
 
2370
2375
 
@@ -2372,43 +2377,17 @@ and return a mapped object
2372
2377
  ##### Returns
2373
2378
 
2374
2379
 
2375
- - `Object` New mapped object.
2376
-
2377
-
2378
-
2379
-
2380
- ### dist/general/object/mergeDeep.js
2381
-
2382
-
2383
- #### mergeDeep(obj1, obj2, settings)
2384
-
2385
- Merges two objects into a new one.
2386
- The second given argument to the first given argument.
2387
-
2388
-
2389
-
2390
-
2391
- ##### Parameters
2392
-
2393
- | Name | Type | Description | |
2394
- | ---- | ---- | ----------- | -------- |
2395
- | obj1 | | The target object | &nbsp; |
2396
- | obj2 | | The object to be merged | &nbsp; |
2397
- | settings | | Object settings for this function | &nbsp; |
2398
-
2399
-
2380
+ - a UI Filter Data.
2400
2381
 
2401
2382
 
2402
- ##### Returns
2403
2383
 
2404
2384
 
2405
- - a new merged object
2406
-
2385
+ ### dist/filters/adapters/transformFilters.js
2407
2386
 
2408
2387
 
2409
- #### isValid(obj1, obj2)
2388
+ #### transformFilters(oldFiltersObj, section)
2410
2389
 
2411
- Validates if the two arguments are objects
2390
+ Transform the old filters structure into the new one
2412
2391
 
2413
2392
 
2414
2393
 
@@ -2417,59 +2396,79 @@ Validates if the two arguments are objects
2417
2396
 
2418
2397
  | Name | Type | Description | |
2419
2398
  | ---- | ---- | ----------- | -------- |
2420
- | obj1 | | The target object | &nbsp; |
2421
- | obj2 | | The object to be merged | &nbsp; |
2422
-
2423
-
2424
-
2425
-
2426
- ##### Returns
2427
-
2428
-
2429
- - true: they are valid; false: they are not
2430
-
2431
-
2432
-
2433
- #### getParamsToMergeDeep(settings)
2434
-
2435
- Validates and gets the settings with all set parameters.
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; |
2436
2401
 
2437
2402
 
2438
2403
 
2439
2404
 
2440
- ##### Parameters
2405
+ ##### Examples
2441
2406
 
2442
- | Name | Type | Description | |
2443
- | ---- | ---- | ----------- | -------- |
2444
- | settings | | the settings object | &nbsp; |
2407
+ ```javascript
2445
2408
 
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
+ };
2446
2451
 
2452
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2453
+ ```
2447
2454
 
2448
2455
 
2449
2456
  ##### Returns
2450
2457
 
2451
2458
 
2452
- - a new settings object with all set parameters.
2453
-
2454
-
2459
+ - `Object` an object with the new filters structure
2455
2460
 
2456
2461
 
2457
- ### dist/general/object/objectCopy.js
2458
2462
 
2459
2463
 
2460
- #### objectCopy(entity, cache)
2464
+ ### dist/filters/classes/FilterInputErrorHandler.js
2461
2465
 
2462
- Created a new reference of the given argument
2463
2466
 
2467
+ #### new FilterInputErrorHandler()
2464
2468
 
2465
2469
 
2466
2470
 
2467
- ##### Parameters
2468
2471
 
2469
- | Name | Type | Description | |
2470
- | ---- | ---- | ----------- | -------- |
2471
- | entity | | The variable to be copied | &nbsp; |
2472
- | cache | | | &nbsp; |
2473
2472
 
2474
2473
 
2475
2474
 
@@ -2477,17 +2476,17 @@ Created a new reference of the given argument
2477
2476
  ##### Returns
2478
2477
 
2479
2478
 
2480
- - A new reference of the given argument
2479
+ - `Void`
2481
2480
 
2482
2481
 
2483
2482
 
2484
2483
 
2485
- ### dist/general/object/omit.js
2484
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
2486
2485
 
2487
2486
 
2488
- #### omit(obj, props)
2487
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
2489
2488
 
2490
- return a new Object excluding attributes in _props_ list
2489
+ [TODO: Make a proper description for this function]
2491
2490
 
2492
2491
 
2493
2492
 
@@ -2496,8 +2495,9 @@ return a new Object excluding attributes in _props_ list
2496
2495
 
2497
2496
  | Name | Type | Description | |
2498
2497
  | ---- | ---- | ----------- | -------- |
2499
- | obj | `Object` | base object | &nbsp; |
2500
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2498
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
2499
+ | scopes | | | &nbsp; |
2500
+ | currentScope | | | &nbsp; |
2501
2501
 
2502
2502
 
2503
2503
 
@@ -2505,17 +2505,17 @@ return a new Object excluding attributes in _props_ list
2505
2505
  ##### Returns
2506
2506
 
2507
2507
 
2508
- - `Object` clean object
2508
+ -
2509
2509
 
2510
2510
 
2511
2511
 
2512
2512
 
2513
- ### dist/general/object/pick.js
2513
+ ### dist/filters/helpers/getAvailableScopes.js
2514
2514
 
2515
2515
 
2516
- #### pick(baseObject, keys)
2516
+ #### getAvailableScopes(config)
2517
2517
 
2518
- return a new object just with attributes in _keys_ list
2518
+ Gets Scopes/Scope IDs by given IDs
2519
2519
 
2520
2520
 
2521
2521
 
@@ -2524,8 +2524,7 @@ return a new object just with attributes in _keys_ list
2524
2524
 
2525
2525
  | Name | Type | Description | |
2526
2526
  | ---- | ---- | ----------- | -------- |
2527
- | baseObject | `Object` | base object | &nbsp; |
2528
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2527
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
2529
2528
 
2530
2529
 
2531
2530
 
@@ -2533,17 +2532,17 @@ return a new object just with attributes in _keys_ list
2533
2532
  ##### Returns
2534
2533
 
2535
2534
 
2536
- - `Object` new object just with desired attributes
2535
+ - a Scopes/Scope IDs array
2537
2536
 
2538
2537
 
2539
2538
 
2540
2539
 
2541
- ### dist/general/object/serialize.js
2540
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
2542
2541
 
2543
2542
 
2544
- #### serialize(obj)
2543
+ #### getAvailableScopesIDsByConfig(config)
2545
2544
 
2546
- serialize object to url param
2545
+ Gets the Scopes IDS for the Available Scope function by any config
2547
2546
 
2548
2547
 
2549
2548
 
@@ -2552,7 +2551,7 @@ serialize object to url param
2552
2551
 
2553
2552
  | Name | Type | Description | |
2554
2553
  | ---- | ---- | ----------- | -------- |
2555
- | obj | | - Object to be serialized | &nbsp; |
2554
+ | config | | any config | &nbsp; |
2556
2555
 
2557
2556
 
2558
2557
 
@@ -2560,17 +2559,17 @@ serialize object to url param
2560
2559
  ##### Returns
2561
2560
 
2562
2561
 
2563
- - `Void`
2562
+ - a Available Scope IDS config
2564
2563
 
2565
2564
 
2566
2565
 
2567
2566
 
2568
- ### dist/general/string/capitalize.js
2567
+ ### dist/filters/helpers/getScopesByHierarchy.js
2569
2568
 
2570
2569
 
2571
- #### capitalize(text)
2570
+ #### getScopesByHierarchy(scopes, currentScope)
2572
2571
 
2573
- Upper case the first letter of a given text
2572
+ [TODO: Make a description for this]
2574
2573
 
2575
2574
 
2576
2575
 
@@ -2579,7 +2578,8 @@ Upper case the first letter of a given text
2579
2578
 
2580
2579
  | Name | Type | Description | |
2581
2580
  | ---- | ---- | ----------- | -------- |
2582
- | text | `String` | | &nbsp; |
2581
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
2582
+ | currentScope | | Current scope type | &nbsp; |
2583
2583
 
2584
2584
 
2585
2585
 
@@ -2587,17 +2587,17 @@ Upper case the first letter of a given text
2587
2587
  ##### Returns
2588
2588
 
2589
2589
 
2590
- - `String` a capitalized text
2590
+ - A new array of Scopes/Scope IDs
2591
2591
 
2592
2592
 
2593
2593
 
2594
2594
 
2595
- ### dist/qrvey/helpers/getColumnsLabel.js
2595
+ ### dist/services/api/getAllDatasets.api.js
2596
2596
 
2597
2597
 
2598
- #### getColumnLabels(column)
2598
+ #### getAllDatasets(config, pickDatasets)
2599
2599
 
2600
- Get an string of the properties of the given column.
2600
+ Get a dataset list from a collection of Qrvey IDs
2601
2601
 
2602
2602
 
2603
2603
 
@@ -2606,7 +2606,8 @@ Get an string of the properties of the given column.
2606
2606
 
2607
2607
  | Name | Type | Description | |
2608
2608
  | ---- | ---- | ----------- | -------- |
2609
- | column | | The column | &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; |
2610
2611
 
2611
2612
 
2612
2613
 
@@ -2614,18 +2615,17 @@ Get an string of the properties of the given column.
2614
2615
  ##### Returns
2615
2616
 
2616
2617
 
2617
- - an string with the property, aggregate or calculation label.
2618
+ - a promise
2618
2619
 
2619
2620
 
2620
2621
 
2621
2622
 
2622
- ### dist/qrvey/helpers/getValueWithSuffixes.js
2623
+ ### dist/services/api/getAllQrveys.api.js
2623
2624
 
2624
2625
 
2625
- #### getValueWithSuffixes(value, suffixes)
2626
+ #### getAllQrveys(config, params)
2626
2627
 
2627
- Get a string value with suffixes if available.
2628
- Add suffix into the value string. Prioritized for numeric values.
2628
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2629
2629
 
2630
2630
 
2631
2631
 
@@ -2634,8 +2634,8 @@ Add suffix into the value string. Prioritized for numeric values.
2634
2634
 
2635
2635
  | Name | Type | Description | |
2636
2636
  | ---- | ---- | ----------- | -------- |
2637
- | value | | a number or string | &nbsp; |
2638
- | suffixes | | An object with singular or plural suffix string. | &nbsp; |
2637
+ | config | | Configuration | &nbsp; |
2638
+ | params | | Object for getting precise data | &nbsp; |
2639
2639
 
2640
2640
 
2641
2641
 
@@ -2643,17 +2643,17 @@ Add suffix into the value string. Prioritized for numeric values.
2643
2643
  ##### Returns
2644
2644
 
2645
2645
 
2646
- - a string value with suffix
2646
+ - `Void`
2647
2647
 
2648
2648
 
2649
2649
 
2650
2650
 
2651
- ### dist/qrvey/helpers/transformValue.js
2651
+ ### dist/services/api/getDatasetColumns.api.js
2652
2652
 
2653
2653
 
2654
- #### transformValue(value, settings)
2654
+ #### getDatasetColumns(qrveyid)
2655
2655
 
2656
- Transforms a value depending of localization/globalization and extras settings.
2656
+ Get a dataset by Qrvey ID
2657
2657
 
2658
2658
 
2659
2659
 
@@ -2662,8 +2662,7 @@ Transforms a value depending of localization/globalization and extras settings.
2662
2662
 
2663
2663
  | Name | Type | Description | |
2664
2664
  | ---- | ---- | ----------- | -------- |
2665
- | value | | A value to transform | &nbsp; |
2666
- | settings | | The settings of the transformValue function | &nbsp; |
2665
+ | qrveyid | | The Qrvey ID | &nbsp; |
2667
2666
 
2668
2667
 
2669
2668
 
@@ -2671,13 +2670,17 @@ Transforms a value depending of localization/globalization and extras settings.
2671
2670
  ##### Returns
2672
2671
 
2673
2672
 
2674
- - A transformed value
2673
+ - a promise
2675
2674
 
2676
2675
 
2677
2676
 
2678
- #### getOutputFormat(settings)
2679
2677
 
2680
- Gets the outputformat settings
2678
+ ### dist/qrvey/helpers/getColumnsLabel.js
2679
+
2680
+
2681
+ #### getColumnLabels(column)
2682
+
2683
+ Get an string of the properties of the given column.
2681
2684
 
2682
2685
 
2683
2686
 
@@ -2686,7 +2689,7 @@ Gets the outputformat settings
2686
2689
 
2687
2690
  | Name | Type | Description | |
2688
2691
  | ---- | ---- | ----------- | -------- |
2689
- | settings | | The settings of the transformValue function | &nbsp; |
2692
+ | column | | The column | &nbsp; |
2690
2693
 
2691
2694
 
2692
2695
 
@@ -2694,13 +2697,18 @@ Gets the outputformat settings
2694
2697
  ##### Returns
2695
2698
 
2696
2699
 
2697
- - the outputformat settings
2700
+ - an string with the property, aggregate or calculation label.
2698
2701
 
2699
2702
 
2700
2703
 
2701
- #### getFormatConfig(settings)
2702
2704
 
2703
- Gets the format config
2705
+ ### dist/qrvey/helpers/getValueWithSuffixes.js
2706
+
2707
+
2708
+ #### getValueWithSuffixes(value, suffixes)
2709
+
2710
+ Get a string value with suffixes if available.
2711
+ Add suffix into the value string. Prioritized for numeric values.
2704
2712
 
2705
2713
 
2706
2714
 
@@ -2709,7 +2717,8 @@ Gets the format config
2709
2717
 
2710
2718
  | Name | Type | Description | |
2711
2719
  | ---- | ---- | ----------- | -------- |
2712
- | settings | | The settings of the transformValue function | &nbsp; |
2720
+ | value | | a number or string | &nbsp; |
2721
+ | suffixes | | An object with singular or plural suffix string. | &nbsp; |
2713
2722
 
2714
2723
 
2715
2724
 
@@ -2717,17 +2726,17 @@ Gets the format config
2717
2726
  ##### Returns
2718
2727
 
2719
2728
 
2720
- - the format config
2729
+ - a string value with suffix
2721
2730
 
2722
2731
 
2723
2732
 
2724
2733
 
2725
- ### dist/services/api/getAllDatasets.api.js
2734
+ ### dist/qrvey/helpers/transformValue.js
2726
2735
 
2727
2736
 
2728
- #### getAllDatasets(config, pickDatasets)
2737
+ #### transformValue(value, settings)
2729
2738
 
2730
- Get a dataset list from a collection of Qrvey IDs
2739
+ Transforms a value depending of localization/globalization and extras settings.
2731
2740
 
2732
2741
 
2733
2742
 
@@ -2736,8 +2745,8 @@ Get a dataset list from a collection of Qrvey IDs
2736
2745
 
2737
2746
  | Name | Type | Description | |
2738
2747
  | ---- | ---- | ----------- | -------- |
2739
- | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2740
- | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2748
+ | value | | A value to transform | &nbsp; |
2749
+ | settings | | The settings of the transformValue function | &nbsp; |
2741
2750
 
2742
2751
 
2743
2752
 
@@ -2745,17 +2754,13 @@ Get a dataset list from a collection of Qrvey IDs
2745
2754
  ##### Returns
2746
2755
 
2747
2756
 
2748
- - a promise
2749
-
2750
-
2751
-
2757
+ - A transformed value
2752
2758
 
2753
- ### dist/services/api/getAllQrveys.api.js
2754
2759
 
2755
2760
 
2756
- #### getAllQrveys(config, params)
2761
+ #### getOutputFormat(settings)
2757
2762
 
2758
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2763
+ Gets the outputformat settings
2759
2764
 
2760
2765
 
2761
2766
 
@@ -2764,8 +2769,7 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2764
2769
 
2765
2770
  | Name | Type | Description | |
2766
2771
  | ---- | ---- | ----------- | -------- |
2767
- | config | | Configuration | &nbsp; |
2768
- | params | | Object for getting precise data | &nbsp; |
2772
+ | settings | | The settings of the transformValue function | &nbsp; |
2769
2773
 
2770
2774
 
2771
2775
 
@@ -2773,17 +2777,13 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2773
2777
  ##### Returns
2774
2778
 
2775
2779
 
2776
- - `Void`
2777
-
2778
-
2779
-
2780
+ - the outputformat settings
2780
2781
 
2781
- ### dist/services/api/getDatasetColumns.api.js
2782
2782
 
2783
2783
 
2784
- #### getDatasetColumns(qrveyid)
2784
+ #### getFormatConfig(settings)
2785
2785
 
2786
- Get a dataset by Qrvey ID
2786
+ Gets the format config
2787
2787
 
2788
2788
 
2789
2789
 
@@ -2792,7 +2792,7 @@ Get a dataset by Qrvey ID
2792
2792
 
2793
2793
  | Name | Type | Description | |
2794
2794
  | ---- | ---- | ----------- | -------- |
2795
- | qrveyid | | The Qrvey ID | &nbsp; |
2795
+ | settings | | The settings of the transformValue function | &nbsp; |
2796
2796
 
2797
2797
 
2798
2798
 
@@ -2800,7 +2800,7 @@ Get a dataset by Qrvey ID
2800
2800
  ##### Returns
2801
2801
 
2802
2802
 
2803
- - a promise
2803
+ - the format config
2804
2804
 
2805
2805
 
2806
2806
 
@@ -2889,12 +2889,12 @@ try to find this string as a variable on Windows object
2889
2889
 
2890
2890
 
2891
2891
 
2892
- ### dist/typescript/decorators/Throttled.js
2892
+ ### dist/typescript/decorators/Debounce.js
2893
2893
 
2894
2894
 
2895
- #### Throttled(time)
2895
+ #### Debounce(time)
2896
2896
 
2897
- (Method Decorator) Throttled Class Method
2897
+ (Method Decorator) Debounce Class Method
2898
2898
 
2899
2899
 
2900
2900
 
@@ -2916,12 +2916,12 @@ try to find this string as a variable on Windows object
2916
2916
 
2917
2917
 
2918
2918
 
2919
- ### dist/typescript/decorators/Debounce.js
2919
+ ### dist/typescript/decorators/Throttled.js
2920
2920
 
2921
2921
 
2922
- #### Debounce(time)
2922
+ #### Throttled(time)
2923
2923
 
2924
- (Method Decorator) Debounce Class Method
2924
+ (Method Decorator) Throttled Class Method
2925
2925
 
2926
2926
 
2927
2927
 
@@ -3025,33 +3025,6 @@ Parses a string date and returns a dayjs date
3025
3025
 
3026
3026
 
3027
3027
 
3028
- ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
3029
-
3030
-
3031
- #### getFilterBuilderGeneralConfig(config)
3032
-
3033
- Returns a filter builder config object by a any given config
3034
-
3035
-
3036
-
3037
-
3038
- ##### Parameters
3039
-
3040
- | Name | Type | Description | |
3041
- | ---- | ---- | ----------- | -------- |
3042
- | config | | any config object | &nbsp; |
3043
-
3044
-
3045
-
3046
-
3047
- ##### Returns
3048
-
3049
-
3050
- - The filter builder config object
3051
-
3052
-
3053
-
3054
-
3055
3028
  ### dist/filters/helpers/backend/buildExpression.js
3056
3029
 
3057
3030
 
@@ -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
 
@@ -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