@qrvey/utils 1.2.9-8 → 1.2.9-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-8*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-9*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -80,22 +80,14 @@ 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
84
-
85
-
86
- #### mdyDateToDate(monthYearDate, time)
83
+ ### dist/filters/classes/FilterInputErrorHandler.js
87
84
 
88
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
89
85
 
86
+ #### new FilterInputErrorHandler()
90
87
 
91
88
 
92
89
 
93
- ##### Parameters
94
90
 
95
- | Name | Type | Description | |
96
- | ---- | ---- | ----------- | -------- |
97
- | monthYearDate | | String of [mm/dd/yyyy] date |   |
98
- | time | | Flag to parse the object date to milliseconds. |   |
99
91
 
100
92
 
101
93
 
@@ -103,17 +95,17 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
103
95
  ##### Returns
104
96
 
105
97
 
106
- - The date object or the date in milliseconds
98
+ - `Void`
107
99
 
108
100
 
109
101
 
110
102
 
111
- ### dist/dates/adapters/monthYearToDate.js
103
+ ### dist/filters/adapters/FDToLogic.js
112
104
 
113
105
 
114
- #### monthYearToDate(monthYearDate, time)
106
+ #### FDToLogic(filterData)
115
107
 
116
- Transforms String Date from a [Month Year] format to Date object.
108
+ Generates a Filter Logic structure from Filter Data structure.
117
109
 
118
110
 
119
111
 
@@ -122,8 +114,7 @@ Transforms String Date from a [Month Year] format to Date object.
122
114
 
123
115
  | Name | Type | Description | |
124
116
  | ---- | ---- | ----------- | -------- |
125
- | monthYearDate | | String of [Month Year] date |   |
126
- | time | | Flag to parse the object date to milliseconds. |   |
117
+ | filterData | | The filter data object. |   |
127
118
 
128
119
 
129
120
 
@@ -131,17 +122,13 @@ Transforms String Date from a [Month Year] format to Date object.
131
122
  ##### Returns
132
123
 
133
124
 
134
- - The date object or the date in milliseconds
135
-
136
-
137
-
125
+ - a filter logic array
138
126
 
139
- ### dist/dates/adapters/quarterYearToDate.js
140
127
 
141
128
 
142
- #### quarterYearToDate(quarterYearDate, time)
129
+ #### getLogicBodyFromFD21(filterData)
143
130
 
144
- Transforms String Date from a [Quarter Year] format to Date object.
131
+ Gets the logic body
145
132
 
146
133
 
147
134
 
@@ -150,8 +137,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
150
137
 
151
138
  | Name | Type | Description | |
152
139
  | ---- | ---- | ----------- | -------- |
153
- | quarterYearDate | | String of [Quarter Year] date |   |
154
- | time | | Flag to parse the object date to milliseconds. |   |
140
+ | filterData | | The filter data object |   |
155
141
 
156
142
 
157
143
 
@@ -159,17 +145,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
159
145
  ##### Returns
160
146
 
161
147
 
162
- - The date object or the date in milliseconds
148
+ - a filter logic array
163
149
 
164
150
 
165
151
 
166
152
 
167
- ### dist/dates/adapters/weekYearToDate.js
153
+ ### dist/filters/adapters/FDToUI.js
168
154
 
169
155
 
170
- #### weekYearToDate(date, time)
156
+ #### FDToUI(filterData, datasetsInfo)
171
157
 
172
- Transforms String Date from a [Week Year] format to Date object.
158
+ Generates a UI filter structure from Filter Data structure.
173
159
 
174
160
 
175
161
 
@@ -178,8 +164,8 @@ Transforms String Date from a [Week Year] format to Date object.
178
164
 
179
165
  | Name | Type | Description | |
180
166
  | ---- | ---- | ----------- | -------- |
181
- | date | | String of [Week Year] date |   |
182
- | time | | Flag to parse the object date to milliseconds. |   |
167
+ | filterData | | The filter data object. |   |
168
+ | datasetsInfo | | Collection of datasets information |   |
183
169
 
184
170
 
185
171
 
@@ -187,17 +173,13 @@ Transforms String Date from a [Week Year] format to Date object.
187
173
  ##### Returns
188
174
 
189
175
 
190
- - The date object or the date in milliseconds
191
-
192
-
193
-
176
+ - a UI Filters structure
194
177
 
195
- ### dist/dates/adapters/yearToDate.js
196
178
 
197
179
 
198
- #### yearToDate(yearDate, time)
180
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
199
181
 
200
- Transforms String Date from a [Year] format to Date object.
182
+ Generates a UI filter Structure from the Filter Data structure v2.1
201
183
 
202
184
 
203
185
 
@@ -206,8 +188,10 @@ Transforms String Date from a [Year] format to Date object.
206
188
 
207
189
  | Name | Type | Description | |
208
190
  | ---- | ---- | ----------- | -------- |
209
- | yearDate | | String of [Year] date |   |
210
- | time | | Flag to parse the object date to milliseconds. |   |
191
+ | scopes | | The filter scope section |   |
192
+ | section | | The filter section. |   |
193
+ | version | | The version of the filter structure |   |
194
+ | datasetsInfo | | Collection of datasets information |   |
211
195
 
212
196
 
213
197
 
@@ -215,17 +199,17 @@ Transforms String Date from a [Year] format to Date object.
215
199
  ##### Returns
216
200
 
217
201
 
218
- - The date object or the date in milliseconds
202
+ - a UI filter Structure
219
203
 
220
204
 
221
205
 
222
206
 
223
- ### dist/dates/helpers/getDateByDateFormat.js
207
+ ### dist/filters/adapters/UIToFD.js
224
208
 
225
209
 
226
- #### getDateByDateFormat(date, format, time)
210
+ #### UIToFD(filterData)
227
211
 
228
- Gets a Date Object instance by a Date format
212
+ Generates a Filter Data Structure structure from UI Filter Data structure.
229
213
 
230
214
 
231
215
 
@@ -234,9 +218,7 @@ Gets a Date Object instance by a Date format
234
218
 
235
219
  | Name | Type | Description | |
236
220
  | ---- | ---- | ----------- | -------- |
237
- | date | | String with a formatted date |   |
238
- | format | | The date format |   |
239
- | time | | flag to convert the formatted date to miliseconds |   |
221
+ | filterData | | The UI filter data object. |   |
240
222
 
241
223
 
242
224
 
@@ -244,17 +226,13 @@ Gets a Date Object instance by a Date format
244
226
  ##### Returns
245
227
 
246
228
 
247
- - a Date object, milisecond time or the same value if date format does not match.
248
-
249
-
250
-
229
+ - a Filter Data structure
251
230
 
252
- ### dist/dates/helpers/getDateFormatByProperty.js
253
231
 
254
232
 
255
- #### getDateFormatByProperty(property)
233
+ #### UI21ToFD(uFilterData, version)
256
234
 
257
- Gets the date format by the given property
235
+ Builds the Fitler Data structure from UI filter data
258
236
 
259
237
 
260
238
 
@@ -263,7 +241,8 @@ Gets the date format by the given property
263
241
 
264
242
  | Name | Type | Description | |
265
243
  | ---- | ---- | ----------- | -------- |
266
- | property | | The Column Property |   |
244
+ | uFilterData | | The UI filter Data object |   |
245
+ | version | | the version of the structure |   |
267
246
 
268
247
 
269
248
 
@@ -271,17 +250,17 @@ Gets the date format by the given property
271
250
  ##### Returns
272
251
 
273
252
 
274
- - The date format
253
+ -
275
254
 
276
255
 
277
256
 
278
257
 
279
- ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
258
+ ### dist/filters/adapters/UIToFlatUI.js
280
259
 
281
260
 
282
- #### getDateFormatRegularExpressionInArray(dateFormat)
261
+ #### UIToFlatUI(filterData, datasetsInfo)
283
262
 
284
- Gets an array of regular expressions by the given date format
263
+ Generates a Flattened UI filter structure from UI Filter Data structure.
285
264
 
286
265
 
287
266
 
@@ -290,7 +269,8 @@ Gets an array of regular expressions by the given date format
290
269
 
291
270
  | Name | Type | Description | |
292
271
  | ---- | ---- | ----------- | -------- |
293
- | dateFormat | | the date format |   |
272
+ | filterData | | The UI filter data object. |   |
273
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
294
274
 
295
275
 
296
276
 
@@ -298,17 +278,13 @@ Gets an array of regular expressions by the given date format
298
278
  ##### Returns
299
279
 
300
280
 
301
- - an array of regular expressions
302
-
303
-
304
-
281
+ - a flattened UI filters array
305
282
 
306
- ### dist/dates/helpers/getSeparatorByDateFormat.js
307
283
 
308
284
 
309
- #### getSeparatorByDateFormat(format)
285
+ #### UI21ToFlatUI(scopes)
310
286
 
311
- Gets the separator of the date format
287
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
312
288
 
313
289
 
314
290
 
@@ -317,7 +293,7 @@ Gets the separator of the date format
317
293
 
318
294
  | Name | Type | Description | |
319
295
  | ---- | ---- | ----------- | -------- |
320
- | format | | the date format |   |
296
+ | scopes | | The filter scope section |   |
321
297
 
322
298
 
323
299
 
@@ -325,18 +301,18 @@ Gets the separator of the date format
325
301
  ##### Returns
326
302
 
327
303
 
328
- - a separator string
304
+ - a flattened UI filters array
329
305
 
330
306
 
331
307
 
332
308
 
333
- ### dist/dates/helpers/getWeek.js
309
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
334
310
 
335
311
 
336
- #### getWeek(date)
312
+ #### adaptDateGroupingProperty(property)
337
313
 
338
- Gets the week number of the year
339
- Additionally, the month and the year
314
+ [TODO: For 2022, eliminate this adapter]
315
+ Get the new property base on the old date grouping properties
340
316
 
341
317
 
342
318
 
@@ -345,7 +321,7 @@ Additionally, the month and the year
345
321
 
346
322
  | Name | Type | Description | |
347
323
  | ---- | ---- | ----------- | -------- |
348
- | date | | the date object |   |
324
+ | property | | |   |
349
325
 
350
326
 
351
327
 
@@ -353,20 +329,17 @@ Additionally, the month and the year
353
329
  ##### Returns
354
330
 
355
331
 
356
- - an object with the week, month and year.
332
+ -
357
333
 
358
334
 
359
335
 
360
336
 
361
- ### dist/dates/helpers/validateDate.js
337
+ ### dist/filters/adapters/adaptFilterData.js
362
338
 
363
339
 
364
- #### validateDate(date, format)
340
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
365
341
 
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
342
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
370
343
 
371
344
 
372
345
 
@@ -375,8 +348,9 @@ Validate a string date depending on giving format
375
348
 
376
349
  | Name | Type | Description | |
377
350
  | ---- | ---- | ----------- | -------- |
378
- | date | | String of date |   |
379
- | format | | String of the format to validate |   |
351
+ | filterData | | The filter data structure. Accepts both v2.1 or v2.0 |   |
352
+ | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) |   |
353
+ | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory |   |
380
354
 
381
355
 
382
356
 
@@ -384,17 +358,18 @@ Validate a string date depending on giving format
384
358
  ##### Returns
385
359
 
386
360
 
387
- - True if it is valid or not. Undefined if date is undefined
361
+ - A new filter data structure v2.1
388
362
 
389
363
 
390
364
 
391
365
 
392
- ### dist/dates/helpers/validateDateByDateFormat.js
366
+ ### dist/filters/adapters/adaptFilterValues.js
393
367
 
394
368
 
395
- #### validateDateByDateFormat(date, dateForma)
369
+ #### adaptFilterValues(filter)
396
370
 
397
- Validates the given string as Date by its date format.
371
+ [TODO: For 2022, eliminate this adapter]
372
+ Gets an adapted filter value array. Validates the enabled property and sets
398
373
 
399
374
 
400
375
 
@@ -403,8 +378,7 @@ Validates the given string as Date by its date format.
403
378
 
404
379
  | Name | Type | Description | |
405
380
  | ---- | ---- | ----------- | -------- |
406
- | date | | a string to validate as date form |   |
407
- | dateForma | | the format of the date to validate the string |   |
381
+ | filter | | The filter |   |
408
382
 
409
383
 
410
384
 
@@ -412,17 +386,17 @@ Validates the given string as Date by its date format.
412
386
  ##### Returns
413
387
 
414
388
 
415
- - true: the string is a valida date
389
+ - A new value array with the filled properties.
416
390
 
417
391
 
418
392
 
419
393
 
420
- ### dist/dates/range/getDateRange.js
394
+ ### dist/filters/adapters/FDToFlatUI.js
421
395
 
422
396
 
423
- #### getDateRange(value, dateGroupLabel, withTime)
397
+ #### FDToFlatUI(filterData, datasetsInfo)
424
398
 
425
- Get date range object from a string date value
399
+ Generates a Flattened UI filter structure from Filter Data structure.
426
400
 
427
401
 
428
402
 
@@ -431,58 +405,32 @@ Get date range object from a string date value
431
405
 
432
406
  | Name | Type | Description | |
433
407
  | ---- | ---- | ----------- | -------- |
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
- }
408
+ | filterData | | The filter data object. |   |
409
+ | datasetsInfo | | Collection of datasets information |   |
451
410
 
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
411
 
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
412
 
469
413
 
470
414
  ##### Returns
471
415
 
472
416
 
473
- - `Object` an object with the date range with two string date properties: from and to
417
+ - a flattened UI filters array
474
418
 
475
419
 
476
420
 
421
+ #### FD21ToFlatUI(scopes, datasetsInfo)
477
422
 
478
- ### dist/dates/relative/Adapter.js
423
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
479
424
 
480
425
 
481
- #### value()
482
426
 
483
- Resolves statement and returns statement value
484
427
 
428
+ ##### Parameters
485
429
 
430
+ | Name | Type | Description | |
431
+ | ---- | ---- | ----------- | -------- |
432
+ | scopes | | The filter scope section |   |
433
+ | datasetsInfo | | Collection of datasets information |   |
486
434
 
487
435
 
488
436
 
@@ -490,63 +438,74 @@ Resolves statement and returns statement value
490
438
  ##### Returns
491
439
 
492
440
 
493
- - `AbsoluteRange` `string`
441
+ - a flattened UI filters array
494
442
 
495
443
 
496
444
 
497
- #### valueAsAnchor()
498
445
 
499
- Resolves statement as an anchor
446
+ ### dist/filters/adapters/flatUIToFD.js
500
447
 
501
448
 
449
+ #### flatUIToFD(uFilters, version)
502
450
 
451
+ Generates a filter data structure from the flatttened UI filters.
503
452
 
504
453
 
505
454
 
506
- ##### Returns
507
455
 
456
+ ##### Parameters
508
457
 
509
- - `string`
458
+ | Name | Type | Description | |
459
+ | ---- | ---- | ----------- | -------- |
460
+ | uFilters | | Array of flattened filters from UI |   |
461
+ | version | | Tag for the version of the filter data structure |   |
510
462
 
511
463
 
512
464
 
513
- #### _statementToRange() *private method*
514
465
 
515
- Convert verbal statement to range value
466
+ ##### Returns
516
467
 
517
468
 
469
+ - a Filter Data.
518
470
 
519
471
 
520
472
 
473
+ #### buildScopes(fbFilters)
521
474
 
522
- ##### Returns
475
+ Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
476
+ Also, adds and organizes filters by datasets
523
477
 
524
478
 
525
- - `AbsoluteRange`
526
479
 
527
480
 
481
+ ##### Parameters
528
482
 
529
- #### _resolveAsThis() *private method*
483
+ | Name | Type | Description | |
484
+ | ---- | ---- | ----------- | -------- |
485
+ | fbFilters | | Array of flat filters from UI |   |
530
486
 
531
- Apply 'this' cursor logic to statement
532
487
 
533
488
 
534
489
 
490
+ ##### Returns
535
491
 
536
492
 
493
+ - an array of scopes structure.
537
494
 
538
- ##### Returns
539
495
 
540
496
 
541
- - `AbsoluteStatement`
497
+ #### buildScope(uFilter)
542
498
 
499
+ Gets an scope structure for the filter data
543
500
 
544
501
 
545
- #### _resolveAsTheLast() *private method*
546
502
 
547
- Apply 'the last' cursor logic to statement
548
503
 
504
+ ##### Parameters
549
505
 
506
+ | Name | Type | Description | |
507
+ | ---- | ---- | ----------- | -------- |
508
+ | uFilter | | UI structure filter |   |
550
509
 
551
510
 
552
511
 
@@ -554,39 +513,22 @@ Apply 'the last' cursor logic to statement
554
513
  ##### Returns
555
514
 
556
515
 
557
- - `AbsoluteStatement`
558
-
516
+ - an scope structure
559
517
 
560
518
 
561
- #### _resolveAsTheNext() *private method*
562
519
 
563
- Apply 'the next' cursor logic to statement
520
+ #### buildDataset(uFilter)
564
521
 
522
+ Gets an dataset structure for the filter data
565
523
 
566
524
 
567
525
 
568
526
 
569
-
570
- ##### Returns
571
-
572
-
573
- - `AbsoluteStatement`
574
-
575
-
576
-
577
- #### replaceNowToken(value, now)
578
-
579
- Replace '@now' token inside a string
580
-
581
-
582
-
583
-
584
- ##### Parameters
527
+ ##### Parameters
585
528
 
586
529
  | Name | Type | Description | |
587
530
  | ---- | ---- | ----------- | -------- |
588
- | value | `string` | |   |
589
- | now | `Date` | |   |
531
+ | uFilter | | a UI structure filter |   |
590
532
 
591
533
 
592
534
 
@@ -594,13 +536,13 @@ Replace '@now' token inside a string
594
536
  ##### Returns
595
537
 
596
538
 
597
- - `string`
539
+ - an dataset structure
598
540
 
599
541
 
600
542
 
601
- #### convertRelativeToAbsolute(args)
543
+ #### buildFilter(uFilter)
602
544
 
603
- Returns a range object (date) from a group of statement params
545
+ Gets an filter structure for the filter data
604
546
 
605
547
 
606
548
 
@@ -609,45 +551,25 @@ Returns a range object (date) from a group of statement params
609
551
 
610
552
  | Name | Type | Description | |
611
553
  | ---- | ---- | ----------- | -------- |
612
- | args | `RelativeToAbsoluteStruct` | |   |
613
-
614
-
615
-
554
+ | uFilter | | a UI structure filter |   |
616
555
 
617
- ##### Examples
618
556
 
619
- ```javascript
620
- pivot = '2021-03-03T12:30:40'
621
- unit = month
622
- steps = 2
623
- setTo = END
624
- resolverAsCalendar: true
625
- => Returns '2021-05-31T23:59:59'
626
- ```
627
- ```javascript
628
- pivot = '2021-03-03T12:30:40'
629
- unit = month
630
- steps = -2
631
- setTo = START
632
- resolverAsCalendar: false
633
- => Returns '2021-01-03T00:00:00'
634
- ```
635
557
 
636
558
 
637
559
  ##### Returns
638
560
 
639
561
 
640
- - `string`
562
+ - an filter structure
641
563
 
642
564
 
643
565
 
644
566
 
645
- ### dist/dates/relative/relative.js
567
+ ### dist/filters/adapters/flatUIToLogic.js
646
568
 
647
569
 
648
- #### resolveRelative(statements, clock)
570
+ #### flatUIToLogic(uFilter)
649
571
 
650
- Resolve a list of relative statements according to operator
572
+ Generates a Logic structure from flattened UI filters
651
573
 
652
574
 
653
575
 
@@ -656,68 +578,25 @@ Resolve a list of relative statements according to operator
656
578
 
657
579
  | Name | Type | Description | |
658
580
  | ---- | ---- | ----------- | -------- |
659
- | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
660
- | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
661
-
662
-
663
-
664
-
665
- ##### Examples
581
+ | uFilter | | Array of flat filters from UI | &nbsp; |
666
582
 
667
- ```javascript
668
- Input:
669
- {
670
- "cursor": "the_next",
671
- "unit": "year",
672
- "number": 1,
673
- "includeCurrent": false,
674
- "isCalendarDate": false,
675
- "anchor": "03/05/2021"
676
- }
677
583
 
678
- Output:
679
- { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
680
- ```
681
584
 
682
585
 
683
586
  ##### Returns
684
587
 
685
588
 
686
- - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
687
-
688
-
689
-
690
-
691
- ### dist/filters/adapters/FDToFlatUI.js
692
-
693
-
694
- #### FDToFlatUI(filterData, datasetsInfo)
695
-
696
- Generates a Flattened UI filter structure from Filter Data structure.
697
-
698
-
699
-
700
-
701
- ##### Parameters
702
-
703
- | Name | Type | Description | |
704
- | ---- | ---- | ----------- | -------- |
705
- | filterData | | The filter data object. | &nbsp; |
706
- | datasetsInfo | | Collection of datasets information | &nbsp; |
707
-
708
-
709
-
589
+ - The logic structure
710
590
 
711
- ##### Returns
712
591
 
713
592
 
714
- - a flattened UI filters array
715
593
 
594
+ ### dist/filters/adapters/flatUIToOldLogic.js
716
595
 
717
596
 
718
- #### FD21ToFlatUI(scopes, datasetsInfo)
597
+ #### flatUIToOldLogic(uFilters)
719
598
 
720
- Generates a Filter Builder Structure from the Filter Data structure v2.1
599
+ Generates a Logic structure from flattened UI filters
721
600
 
722
601
 
723
602
 
@@ -726,8 +605,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
726
605
 
727
606
  | Name | Type | Description | |
728
607
  | ---- | ---- | ----------- | -------- |
729
- | scopes | | The filter scope section | &nbsp; |
730
- | datasetsInfo | | Collection of datasets information | &nbsp; |
608
+ | uFilters | | Array of flat filters from UI | &nbsp; |
731
609
 
732
610
 
733
611
 
@@ -735,17 +613,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
735
613
  ##### Returns
736
614
 
737
615
 
738
- - a flattened UI filters array
616
+ - The logic structure
739
617
 
740
618
 
741
619
 
742
620
 
743
- ### dist/filters/adapters/FDToLogic.js
621
+ ### dist/filters/adapters/flatUIToUI.js
744
622
 
745
623
 
746
- #### FDToLogic(filterData)
624
+ #### flatUIToUI(uFilters, version)
747
625
 
748
- Generates a Filter Logic structure from Filter Data structure.
626
+ Generates a UI filter data structure from the flatttened UI filters.
749
627
 
750
628
 
751
629
 
@@ -754,7 +632,8 @@ Generates a Filter Logic structure from Filter Data structure.
754
632
 
755
633
  | Name | Type | Description | |
756
634
  | ---- | ---- | ----------- | -------- |
757
- | filterData | | The filter data object. | &nbsp; |
635
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
636
+ | version | | Tag for the version of the filter data structure | &nbsp; |
758
637
 
759
638
 
760
639
 
@@ -762,13 +641,14 @@ Generates a Filter Logic structure from Filter Data structure.
762
641
  ##### Returns
763
642
 
764
643
 
765
- - a filter logic array
644
+ - a UI Filter Data.
766
645
 
767
646
 
768
647
 
769
- #### getLogicBodyFromFD21(filterData)
648
+ #### buildScopes(fbFilters)
770
649
 
771
- Gets the logic body
650
+ Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
651
+ Also, adds and organizes filters by datasets
772
652
 
773
653
 
774
654
 
@@ -777,7 +657,7 @@ Gets the logic body
777
657
 
778
658
  | Name | Type | Description | |
779
659
  | ---- | ---- | ----------- | -------- |
780
- | filterData | | The filter data object | &nbsp; |
660
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
781
661
 
782
662
 
783
663
 
@@ -785,17 +665,13 @@ Gets the logic body
785
665
  ##### Returns
786
666
 
787
667
 
788
- - a filter logic array
789
-
790
-
791
-
668
+ - an array of scopes structure.
792
669
 
793
- ### dist/filters/adapters/FDToUI.js
794
670
 
795
671
 
796
- #### FDToUI(filterData, datasetsInfo)
672
+ #### buildScope(uFilter)
797
673
 
798
- Generates a UI filter structure from Filter Data structure.
674
+ Gets an scope structure for the UI filter data
799
675
 
800
676
 
801
677
 
@@ -804,8 +680,7 @@ Generates a UI filter structure from Filter Data structure.
804
680
 
805
681
  | Name | Type | Description | |
806
682
  | ---- | ---- | ----------- | -------- |
807
- | filterData | | The filter data object. | &nbsp; |
808
- | datasetsInfo | | Collection of datasets information | &nbsp; |
683
+ | uFilter | | UI structure filter | &nbsp; |
809
684
 
810
685
 
811
686
 
@@ -813,13 +688,13 @@ Generates a UI filter structure from Filter Data structure.
813
688
  ##### Returns
814
689
 
815
690
 
816
- - a UI Filters structure
691
+ - an scope structure
817
692
 
818
693
 
819
694
 
820
- #### FD21ToUI(scopes, section, version, datasetsInfo)
695
+ #### buildDataset(uFilter)
821
696
 
822
- Generates a UI filter Structure from the Filter Data structure v2.1
697
+ Gets an dataset structure for the UI filter data
823
698
 
824
699
 
825
700
 
@@ -828,10 +703,7 @@ Generates a UI filter Structure from the Filter Data structure v2.1
828
703
 
829
704
  | Name | Type | Description | |
830
705
  | ---- | ---- | ----------- | -------- |
831
- | scopes | | The filter scope section | &nbsp; |
832
- | section | | The filter section. | &nbsp; |
833
- | version | | The version of the filter structure | &nbsp; |
834
- | datasetsInfo | | Collection of datasets information | &nbsp; |
706
+ | uFilter | | a UI structure filter | &nbsp; |
835
707
 
836
708
 
837
709
 
@@ -839,17 +711,13 @@ Generates a UI filter Structure from the Filter Data structure v2.1
839
711
  ##### Returns
840
712
 
841
713
 
842
- - a UI filter Structure
843
-
844
-
845
-
714
+ - an dataset structure
846
715
 
847
- ### dist/filters/adapters/UIToFD.js
848
716
 
849
717
 
850
- #### UIToFD(filterData)
718
+ #### buildFilter(uFilter)
851
719
 
852
- Generates a Filter Data Structure structure from UI Filter Data structure.
720
+ Gets an filter structure for the UI filter data
853
721
 
854
722
 
855
723
 
@@ -858,7 +726,7 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
858
726
 
859
727
  | Name | Type | Description | |
860
728
  | ---- | ---- | ----------- | -------- |
861
- | filterData | | The UI filter data object. | &nbsp; |
729
+ | uFilter | | a UI structure filter | &nbsp; |
862
730
 
863
731
 
864
732
 
@@ -866,13 +734,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
866
734
  ##### Returns
867
735
 
868
736
 
869
- - a Filter Data structure
737
+ - an filter structure
870
738
 
871
739
 
872
740
 
873
- #### UI21ToFD(uFilterData, version)
874
741
 
875
- Builds the Fitler Data structure from UI filter data
742
+ ### dist/filters/adapters/logicToFD.js
743
+
744
+
745
+ #### logicToFD(filterData, version)
746
+
747
+ Generates a filter data structure from the old logic structure (v2.0).
876
748
 
877
749
 
878
750
 
@@ -881,8 +753,8 @@ Builds the Fitler Data structure from UI filter data
881
753
 
882
754
  | Name | Type | Description | |
883
755
  | ---- | ---- | ----------- | -------- |
884
- | uFilterData | | The UI filter Data object | &nbsp; |
885
- | version | | the version of the structure | &nbsp; |
756
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
757
+ | version | | Tag for the version of the filter data structure | &nbsp; |
886
758
 
887
759
 
888
760
 
@@ -890,17 +762,17 @@ Builds the Fitler Data structure from UI filter data
890
762
  ##### Returns
891
763
 
892
764
 
893
- -
765
+ - a Filter Data.
894
766
 
895
767
 
896
768
 
897
769
 
898
- ### dist/filters/adapters/UIToFlatUI.js
770
+ ### dist/filters/adapters/logicToFlatUI.js
899
771
 
900
772
 
901
- #### UIToFlatUI(filterData, datasetsInfo)
773
+ #### logicToFlatUI(logics)
902
774
 
903
- Generates a Flattened UI filter structure from UI Filter Data structure.
775
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
904
776
 
905
777
 
906
778
 
@@ -909,8 +781,7 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
909
781
 
910
782
  | Name | Type | Description | |
911
783
  | ---- | ---- | ----------- | -------- |
912
- | filterData | | The UI filter data object. | &nbsp; |
913
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
784
+ | logics | | The old logic structure (v2.0) | &nbsp; |
914
785
 
915
786
 
916
787
 
@@ -918,13 +789,13 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
918
789
  ##### Returns
919
790
 
920
791
 
921
- - a flattened UI filters array
792
+ - The Flattened UI Filters array
922
793
 
923
794
 
924
795
 
925
- #### UI21ToFlatUI(scopes)
796
+ #### getFilter(filters, filter, getIndex)
926
797
 
927
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
798
+ Get the filter or the index of the given array, validating an old filter structure.
928
799
 
929
800
 
930
801
 
@@ -933,7 +804,9 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
933
804
 
934
805
  | Name | Type | Description | |
935
806
  | ---- | ---- | ----------- | -------- |
936
- | scopes | | The filter scope section | &nbsp; |
807
+ | filters | | The array of UI filters | &nbsp; |
808
+ | filter | | The old logic structure filter | &nbsp; |
809
+ | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
937
810
 
938
811
 
939
812
 
@@ -941,18 +814,13 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
941
814
  ##### Returns
942
815
 
943
816
 
944
- - a flattened UI filters array
945
-
946
-
947
-
817
+ - the index or the UI filter object
948
818
 
949
- ### dist/filters/adapters/adaptDateGroupingProperty.js
950
819
 
951
820
 
952
- #### adaptDateGroupingProperty(property)
821
+ #### refineRankingValues(values, uiValues)
953
822
 
954
- [TODO: For 2022, eliminate this adapter]
955
- Get the new property base on the old date grouping properties
823
+ Refines the values of the Ranking column type.
956
824
 
957
825
 
958
826
 
@@ -961,7 +829,8 @@ Get the new property base on the old date grouping properties
961
829
 
962
830
  | Name | Type | Description | |
963
831
  | ---- | ---- | ----------- | -------- |
964
- | property | | | &nbsp; |
832
+ | values | | the Array of Ranking values | &nbsp; |
833
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
965
834
 
966
835
 
967
836
 
@@ -969,17 +838,17 @@ Get the new property base on the old date grouping properties
969
838
  ##### Returns
970
839
 
971
840
 
972
- -
841
+ - the array of Ranking values
973
842
 
974
843
 
975
844
 
976
845
 
977
- ### dist/filters/adapters/adaptFilterData.js
846
+ ### dist/filters/adapters/logicToUI.js
978
847
 
979
848
 
980
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
849
+ #### logicToUI(uFilters, datasetsInfo)
981
850
 
982
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
851
+ Generates a UI filter structure from the old logic structure (v2.0).
983
852
 
984
853
 
985
854
 
@@ -988,9 +857,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
988
857
 
989
858
  | Name | Type | Description | |
990
859
  | ---- | ---- | ----------- | -------- |
991
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
992
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
993
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
860
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
861
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
994
862
 
995
863
 
996
864
 
@@ -998,18 +866,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
998
866
  ##### Returns
999
867
 
1000
868
 
1001
- - A new filter data structure v2.1
869
+ - a UI Filter Data.
1002
870
 
1003
871
 
1004
872
 
1005
873
 
1006
- ### dist/filters/adapters/adaptFilterValues.js
874
+ ### dist/filters/adapters/transformFilters.js
1007
875
 
1008
876
 
1009
- #### adaptFilterValues(filter)
877
+ #### transformFilters(oldFiltersObj, section)
1010
878
 
1011
- [TODO: For 2022, eliminate this adapter]
1012
- Gets an adapted filter value array. Validates the enabled property and sets
879
+ Transform the old filters structure into the new one
1013
880
 
1014
881
 
1015
882
 
@@ -1018,50 +885,77 @@ Gets an adapted filter value array. Validates the enabled property and sets
1018
885
 
1019
886
  | Name | Type | Description | |
1020
887
  | ---- | ---- | ----------- | -------- |
1021
- | filter | | The filter | &nbsp; |
1022
-
1023
-
1024
-
1025
-
1026
- ##### Returns
1027
-
1028
-
1029
- - A new value array with the filled properties.
1030
-
1031
-
1032
-
888
+ | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
889
+ | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
1033
890
 
1034
- ### dist/filters/adapters/flatUIToFD.js
1035
891
 
1036
892
 
1037
- #### flatUIToFD(uFilters, version)
1038
-
1039
- Generates a filter data structure from the flatttened UI filters.
1040
893
 
894
+ ##### Examples
1041
895
 
896
+ ```javascript
1042
897
 
898
+ const oldPreferenceFilters = {
899
+ "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
900
+ "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
901
+ "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
902
+ "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
903
+ "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
904
+ "formulaId": null,
905
+ "panelId": null,
906
+ "values": [
907
+ {
908
+ "EQUALS": [
909
+ {
910
+ "id": "AK4M8UV2a0",
911
+ "value": "A",
912
+ "enabled": true,
913
+ "imageUrl": null
914
+ },
915
+ {
916
+ "id": "AK4M8UV2a1",
917
+ "value": "B",
918
+ "enabled": true,
919
+ "imageUrl": null
920
+ }
921
+ ]
922
+ }
923
+ ],
924
+ "bucketId": null,
925
+ "text": "MC",
926
+ "title": "MC",
927
+ "type": "SINGLE_CHOICE",
928
+ "qid": "AK4M8UV2",
929
+ "dataset": {
930
+ "sourceid": "xYOQAdpqT",
931
+ "name": "Form All Questions",
932
+ "qrveyid": "xYOQAdpqT",
933
+ "text": "Form All Questions",
934
+ "linkid": 0
935
+ },
936
+ "enabled": true,
937
+ "linked": null
938
+ }
939
+ };
1043
940
 
1044
- ##### Parameters
941
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
942
+ ```
1045
943
 
1046
- | Name | Type | Description | |
1047
- | ---- | ---- | ----------- | -------- |
1048
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1049
- | version | | Tag for the version of the filter data structure | &nbsp; |
1050
944
 
945
+ ##### Returns
1051
946
 
1052
947
 
948
+ - `Object` an object with the new filters structure
1053
949
 
1054
- ##### Returns
1055
950
 
1056
951
 
1057
- - a Filter Data.
1058
952
 
953
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
1059
954
 
1060
955
 
1061
- #### buildScopes(fbFilters)
956
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1062
957
 
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
958
+ [TODO: Make a proper description for this function]
1065
959
 
1066
960
 
1067
961
 
@@ -1070,7 +964,9 @@ Also, adds and organizes filters by datasets
1070
964
 
1071
965
  | Name | Type | Description | |
1072
966
  | ---- | ---- | ----------- | -------- |
1073
- | fbFilters | | Array of flat filters from UI | &nbsp; |
967
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
968
+ | scopes | | | &nbsp; |
969
+ | currentScope | | | &nbsp; |
1074
970
 
1075
971
 
1076
972
 
@@ -1078,13 +974,17 @@ Also, adds and organizes filters by datasets
1078
974
  ##### Returns
1079
975
 
1080
976
 
1081
- - an array of scopes structure.
977
+ -
1082
978
 
1083
979
 
1084
980
 
1085
- #### buildScope(uFilter)
1086
981
 
1087
- Gets an scope structure for the filter data
982
+ ### dist/filters/helpers/getAvailableScopes.js
983
+
984
+
985
+ #### getAvailableScopes(config)
986
+
987
+ Gets Scopes/Scope IDs by given IDs
1088
988
 
1089
989
 
1090
990
 
@@ -1093,7 +993,7 @@ Gets an scope structure for the filter data
1093
993
 
1094
994
  | Name | Type | Description | |
1095
995
  | ---- | ---- | ----------- | -------- |
1096
- | uFilter | | UI structure filter | &nbsp; |
996
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
1097
997
 
1098
998
 
1099
999
 
@@ -1101,13 +1001,17 @@ Gets an scope structure for the filter data
1101
1001
  ##### Returns
1102
1002
 
1103
1003
 
1104
- - an scope structure
1004
+ - a Scopes/Scope IDs array
1105
1005
 
1106
1006
 
1107
1007
 
1108
- #### buildDataset(uFilter)
1109
1008
 
1110
- Gets an dataset structure for the filter data
1009
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1010
+
1011
+
1012
+ #### getAvailableScopesIDsByConfig(config)
1013
+
1014
+ Gets the Scopes IDS for the Available Scope function by any config
1111
1015
 
1112
1016
 
1113
1017
 
@@ -1116,7 +1020,7 @@ Gets an dataset structure for the filter data
1116
1020
 
1117
1021
  | Name | Type | Description | |
1118
1022
  | ---- | ---- | ----------- | -------- |
1119
- | uFilter | | a UI structure filter | &nbsp; |
1023
+ | config | | any config | &nbsp; |
1120
1024
 
1121
1025
 
1122
1026
 
@@ -1124,13 +1028,17 @@ Gets an dataset structure for the filter data
1124
1028
  ##### Returns
1125
1029
 
1126
1030
 
1127
- - an dataset structure
1031
+ - a Available Scope IDS config
1128
1032
 
1129
1033
 
1130
1034
 
1131
- #### buildFilter(uFilter)
1132
1035
 
1133
- Gets an filter structure for the filter data
1036
+ ### dist/filters/helpers/getScopesByHierarchy.js
1037
+
1038
+
1039
+ #### getScopesByHierarchy(scopes, currentScope)
1040
+
1041
+ [TODO: Make a description for this]
1134
1042
 
1135
1043
 
1136
1044
 
@@ -1139,7 +1047,8 @@ Gets an filter structure for the filter data
1139
1047
 
1140
1048
  | Name | Type | Description | |
1141
1049
  | ---- | ---- | ----------- | -------- |
1142
- | uFilter | | a UI structure filter | &nbsp; |
1050
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1051
+ | currentScope | | Current scope type | &nbsp; |
1143
1052
 
1144
1053
 
1145
1054
 
@@ -1147,17 +1056,17 @@ Gets an filter structure for the filter data
1147
1056
  ##### Returns
1148
1057
 
1149
1058
 
1150
- - an filter structure
1059
+ - A new array of Scopes/Scope IDs
1151
1060
 
1152
1061
 
1153
1062
 
1154
1063
 
1155
- ### dist/filters/adapters/flatUIToLogic.js
1064
+ ### dist/general/function/debounce.js
1156
1065
 
1157
1066
 
1158
- #### flatUIToLogic(uFilter)
1067
+ #### debounce(fn, time)
1159
1068
 
1160
- Generates a Logic structure from flattened UI filters
1069
+ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1161
1070
 
1162
1071
 
1163
1072
 
@@ -1166,7 +1075,8 @@ Generates a Logic structure from flattened UI filters
1166
1075
 
1167
1076
  | Name | Type | Description | |
1168
1077
  | ---- | ---- | ----------- | -------- |
1169
- | uFilter | | Array of flat filters from UI | &nbsp; |
1078
+ | fn | `Function` | original Function | &nbsp; |
1079
+ | time | `Number` | default 500ms | &nbsp; |
1170
1080
 
1171
1081
 
1172
1082
 
@@ -1174,17 +1084,17 @@ Generates a Logic structure from flattened UI filters
1174
1084
  ##### Returns
1175
1085
 
1176
1086
 
1177
- - The logic structure
1087
+ - `Function` debounced functions
1178
1088
 
1179
1089
 
1180
1090
 
1181
1091
 
1182
- ### dist/filters/adapters/flatUIToOldLogic.js
1092
+ ### dist/general/function/throttled.js
1183
1093
 
1184
1094
 
1185
- #### flatUIToOldLogic(uFilters)
1095
+ #### throttled(fn, time)
1186
1096
 
1187
- Generates a Logic structure from flattened UI filters
1097
+ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1188
1098
 
1189
1099
 
1190
1100
 
@@ -1193,7 +1103,8 @@ Generates a Logic structure from flattened UI filters
1193
1103
 
1194
1104
  | Name | Type | Description | |
1195
1105
  | ---- | ---- | ----------- | -------- |
1196
- | uFilters | | Array of flat filters from UI | &nbsp; |
1106
+ | fn | `Function` | original Function | &nbsp; |
1107
+ | time | `Number` | default 500ms | &nbsp; |
1197
1108
 
1198
1109
 
1199
1110
 
@@ -1201,17 +1112,17 @@ Generates a Logic structure from flattened UI filters
1201
1112
  ##### Returns
1202
1113
 
1203
1114
 
1204
- - The logic structure
1115
+ - `Function` throttled function
1205
1116
 
1206
1117
 
1207
1118
 
1208
1119
 
1209
- ### dist/filters/adapters/flatUIToUI.js
1120
+ ### dist/general/array/delete.js
1210
1121
 
1211
1122
 
1212
- #### flatUIToUI(uFilters, version)
1123
+ #### ArrayDelete(array, index)
1213
1124
 
1214
- Generates a UI filter data structure from the flatttened UI filters.
1125
+ Inmutable Array Item deletion
1215
1126
 
1216
1127
 
1217
1128
 
@@ -1220,8 +1131,8 @@ Generates a UI filter data structure from the flatttened UI filters.
1220
1131
 
1221
1132
  | Name | Type | Description | |
1222
1133
  | ---- | ---- | ----------- | -------- |
1223
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
- | version | | Tag for the version of the filter data structure | &nbsp; |
1134
+ | array | `Array` | a collection of items to delete | &nbsp; |
1135
+ | index | `Number` | the position of the item to delete | &nbsp; |
1225
1136
 
1226
1137
 
1227
1138
 
@@ -1229,14 +1140,17 @@ Generates a UI filter data structure from the flatttened UI filters.
1229
1140
  ##### Returns
1230
1141
 
1231
1142
 
1232
- - a UI Filter Data.
1143
+ - a new Array or the given parameter when is empty or not an array
1233
1144
 
1234
1145
 
1235
1146
 
1236
- #### buildScopes(fbFilters)
1237
1147
 
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
1148
+ ### dist/general/array/flattenDeep.js
1149
+
1150
+
1151
+ #### flattenDeep(arr)
1152
+
1153
+ Flat deeply an array
1240
1154
 
1241
1155
 
1242
1156
 
@@ -1245,7 +1159,7 @@ Also, adds and organizes filters by datasets
1245
1159
 
1246
1160
  | Name | Type | Description | |
1247
1161
  | ---- | ---- | ----------- | -------- |
1248
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1162
+ | arr | | Array to flat deeply | &nbsp; |
1249
1163
 
1250
1164
 
1251
1165
 
@@ -1253,13 +1167,17 @@ Also, adds and organizes filters by datasets
1253
1167
  ##### Returns
1254
1168
 
1255
1169
 
1256
- - an array of scopes structure.
1170
+ - flatten array
1257
1171
 
1258
1172
 
1259
1173
 
1260
- #### buildScope(uFilter)
1261
1174
 
1262
- Gets an scope structure for the UI filter data
1175
+ ### dist/general/array/getFirstIndexFromArray.js
1176
+
1177
+
1178
+ #### getFirstIndexFromArray(array, callback)
1179
+
1180
+ Gets the first index from the array by a callback condition
1263
1181
 
1264
1182
 
1265
1183
 
@@ -1268,7 +1186,8 @@ Gets an scope structure for the UI filter data
1268
1186
 
1269
1187
  | Name | Type | Description | |
1270
1188
  | ---- | ---- | ----------- | -------- |
1271
- | uFilter | | UI structure filter | &nbsp; |
1189
+ | array | | | &nbsp; |
1190
+ | callback | | function callback | &nbsp; |
1272
1191
 
1273
1192
 
1274
1193
 
@@ -1276,13 +1195,17 @@ Gets an scope structure for the UI filter data
1276
1195
  ##### Returns
1277
1196
 
1278
1197
 
1279
- - an scope structure
1198
+ - the first index of the array. -1 when the condition is not satisfied
1280
1199
 
1281
1200
 
1282
1201
 
1283
- #### buildDataset(uFilter)
1284
1202
 
1285
- Gets an dataset structure for the UI filter data
1203
+ ### dist/general/array/getLastIndexFromArray.js
1204
+
1205
+
1206
+ #### getLastIndexFromArray(array, callback)
1207
+
1208
+ Gets the last index from the array by a callback condition
1286
1209
 
1287
1210
 
1288
1211
 
@@ -1291,7 +1214,8 @@ Gets an dataset structure for the UI filter data
1291
1214
 
1292
1215
  | Name | Type | Description | |
1293
1216
  | ---- | ---- | ----------- | -------- |
1294
- | uFilter | | a UI structure filter | &nbsp; |
1217
+ | array | | | &nbsp; |
1218
+ | callback | | function callback | &nbsp; |
1295
1219
 
1296
1220
 
1297
1221
 
@@ -1299,13 +1223,20 @@ Gets an dataset structure for the UI filter data
1299
1223
  ##### Returns
1300
1224
 
1301
1225
 
1302
- - an dataset structure
1226
+ - the last index of the array. -1 when the condition is not satisfied
1303
1227
 
1304
1228
 
1305
1229
 
1306
- #### buildFilter(uFilter)
1307
1230
 
1308
- Gets an filter structure for the UI filter data
1231
+ ### dist/general/array/filterNestedTree.js
1232
+
1233
+
1234
+ #### filterNestedTree(arr, childArrKey, condition)
1235
+
1236
+ Filters a nested tree array by a custom condition on the last child node
1237
+ - If the given arguments are not valid, the function returns the first argument.
1238
+ - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
1239
+ - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
1309
1240
 
1310
1241
 
1311
1242
 
@@ -1314,7 +1245,9 @@ Gets an filter structure for the UI filter data
1314
1245
 
1315
1246
  | Name | Type | Description | |
1316
1247
  | ---- | ---- | ----------- | -------- |
1317
- | uFilter | | a UI structure filter | &nbsp; |
1248
+ | arr | | nested tree array | &nbsp; |
1249
+ | childArrKey | | property representing the children array on the nested tree | &nbsp; |
1250
+ | condition | | function callback that determines if the filter is applied on the last child node of the nested tree | &nbsp; |
1318
1251
 
1319
1252
 
1320
1253
 
@@ -1322,17 +1255,18 @@ Gets an filter structure for the UI filter data
1322
1255
  ##### Returns
1323
1256
 
1324
1257
 
1325
- - an filter structure
1258
+ - array filtered
1326
1259
 
1327
1260
 
1328
1261
 
1329
1262
 
1330
- ### dist/filters/adapters/logicToFD.js
1263
+ ### dist/general/mix/compareDeep.js
1331
1264
 
1332
1265
 
1333
- #### logicToFD(filterData, version)
1266
+ #### compareDeep(object1, object2)
1334
1267
 
1335
- Generates a filter data structure from the old logic structure (v2.0).
1268
+ Compares two objects to know if they are equals. Go across nested objects.
1269
+ Includes arrays in the comparison.
1336
1270
 
1337
1271
 
1338
1272
 
@@ -1341,8 +1275,8 @@ Generates a filter data structure from the old logic structure (v2.0).
1341
1275
 
1342
1276
  | Name | Type | Description | |
1343
1277
  | ---- | ---- | ----------- | -------- |
1344
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
- | version | | Tag for the version of the filter data structure | &nbsp; |
1278
+ | object1 | | First Object to compare | &nbsp; |
1279
+ | object2 | | Second Object to compare | &nbsp; |
1346
1280
 
1347
1281
 
1348
1282
 
@@ -1350,17 +1284,17 @@ Generates a filter data structure from the old logic structure (v2.0).
1350
1284
  ##### Returns
1351
1285
 
1352
1286
 
1353
- - a Filter Data.
1287
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1354
1288
 
1355
1289
 
1356
1290
 
1357
1291
 
1358
- ### dist/filters/adapters/logicToFlatUI.js
1292
+ ### dist/general/mix/importScripts.js
1359
1293
 
1360
1294
 
1361
- #### logicToFlatUI(logics)
1295
+ #### importScripts(scripts)
1362
1296
 
1363
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1297
+ Import a set of external Scripts given the URL in both serie and cascade way
1364
1298
 
1365
1299
 
1366
1300
 
@@ -1369,46 +1303,54 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1369
1303
 
1370
1304
  | Name | Type | Description | |
1371
1305
  | ---- | ---- | ----------- | -------- |
1372
- | logics | | The old logic structure (v2.0) | &nbsp; |
1306
+ | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1307
+ | scripts.url | `String` | CDN URL | &nbsp; |
1308
+ | 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; |
1309
+ | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1310
+ | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1311
+ | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
1373
1312
 
1374
1313
 
1375
1314
 
1376
1315
 
1377
- ##### Returns
1316
+ ##### Examples
1378
1317
 
1318
+ ```javascript
1319
+ // 1) Simple script (paralell loading)
1320
+ importScripts(['http://myscript.js', 'http://another.js']);
1379
1321
 
1380
- - The Flattened UI Filters array
1322
+ // 2) Loading `.js` and `.esm.js` script (parallel loading)
1323
+ importScripts([
1324
+ { url: 'http://myscript.esm.js', type: 'module' },
1325
+ { url: 'http://myscript.js', noModule: true }
1326
+ ]);
1381
1327
 
1328
+ // 3) import dependent scripts (cascade)
1329
+ importScripts([
1330
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1331
+ ]);
1382
1332
 
1333
+ // 4) mix
1334
+ importScripts([
1335
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1336
+ { url: 'http://another.esm.js', type: 'module' },
1337
+ { url: 'http://another.js', noModule: true },
1338
+ 'http://simplescript.js'
1339
+ ]);
1340
+ ```
1383
1341
 
1384
- #### getFilter(filters, filter, getIndex)
1385
1342
 
1386
- Get the filter or the index of the given array, validating an old filter structure.
1343
+ ##### Returns
1387
1344
 
1388
1345
 
1346
+ - `Promise` Promise when all script have been loaded
1389
1347
 
1390
1348
 
1391
- ##### Parameters
1392
1349
 
1393
- | Name | Type | Description | |
1394
- | ---- | ---- | ----------- | -------- |
1395
- | filters | | The array of UI filters | &nbsp; |
1396
- | filter | | The old logic structure filter | &nbsp; |
1397
- | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
1350
+ #### loadScript(url, type, noModule)
1398
1351
 
1399
-
1400
-
1401
-
1402
- ##### Returns
1403
-
1404
-
1405
- - the index or the UI filter object
1406
-
1407
-
1408
-
1409
- #### refineRankingValues(values, uiValues)
1410
-
1411
- Refines the values of the Ranking column type.
1352
+ Creates the script element and appends to document.head
1353
+ return a Promise that is resolved when the script is loaded
1412
1354
 
1413
1355
 
1414
1356
 
@@ -1417,8 +1359,9 @@ Refines the values of the Ranking column type.
1417
1359
 
1418
1360
  | Name | Type | Description | |
1419
1361
  | ---- | ---- | ----------- | -------- |
1420
- | values | | the Array of Ranking values | &nbsp; |
1421
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1362
+ | url | `String` | Cdn Url | &nbsp; |
1363
+ | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1364
+ | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1422
1365
 
1423
1366
 
1424
1367
 
@@ -1426,17 +1369,17 @@ Refines the values of the Ranking column type.
1426
1369
  ##### Returns
1427
1370
 
1428
1371
 
1429
- - the array of Ranking values
1372
+ - `Void`
1430
1373
 
1431
1374
 
1432
1375
 
1433
1376
 
1434
- ### dist/filters/adapters/logicToUI.js
1377
+ ### dist/general/mix/getTag.js
1435
1378
 
1436
1379
 
1437
- #### logicToUI(uFilters, datasetsInfo)
1380
+ #### getTag(value)
1438
1381
 
1439
- Generates a UI filter structure from the old logic structure (v2.0).
1382
+ Gets the `toStringTag` of `value`.
1440
1383
 
1441
1384
 
1442
1385
 
@@ -1445,8 +1388,7 @@ Generates a UI filter structure from the old logic structure (v2.0).
1445
1388
 
1446
1389
  | Name | Type | Description | |
1447
1390
  | ---- | ---- | ----------- | -------- |
1448
- | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1391
+ | value | | The value to query. | &nbsp; |
1450
1392
 
1451
1393
 
1452
1394
 
@@ -1454,17 +1396,17 @@ Generates a UI filter structure from the old logic structure (v2.0).
1454
1396
  ##### Returns
1455
1397
 
1456
1398
 
1457
- - a UI Filter Data.
1399
+ - `string` Returns the `toStringTag`.
1458
1400
 
1459
1401
 
1460
1402
 
1461
1403
 
1462
- ### dist/filters/adapters/transformFilters.js
1404
+ ### dist/general/mix/isEmpty.js
1463
1405
 
1464
1406
 
1465
- #### transformFilters(oldFiltersObj, section)
1407
+ #### isEmpty(variable, includeFalsy)
1466
1408
 
1467
- Transform the old filters structure into the new one
1409
+ Validates if the given argument is empty
1468
1410
 
1469
1411
 
1470
1412
 
@@ -1473,79 +1415,37 @@ Transform the old filters structure into the new one
1473
1415
 
1474
1416
  | Name | Type | Description | |
1475
1417
  | ---- | ---- | ----------- | -------- |
1476
- | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
1477
- | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
1478
-
1479
-
1480
-
1418
+ | variable | | the given variable | &nbsp; |
1419
+ | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1481
1420
 
1482
- ##### Examples
1483
1421
 
1484
- ```javascript
1485
1422
 
1486
- const oldPreferenceFilters = {
1487
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1488
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1489
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1490
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1491
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1492
- "formulaId": null,
1493
- "panelId": null,
1494
- "values": [
1495
- {
1496
- "EQUALS": [
1497
- {
1498
- "id": "AK4M8UV2a0",
1499
- "value": "A",
1500
- "enabled": true,
1501
- "imageUrl": null
1502
- },
1503
- {
1504
- "id": "AK4M8UV2a1",
1505
- "value": "B",
1506
- "enabled": true,
1507
- "imageUrl": null
1508
- }
1509
- ]
1510
- }
1511
- ],
1512
- "bucketId": null,
1513
- "text": "MC",
1514
- "title": "MC",
1515
- "type": "SINGLE_CHOICE",
1516
- "qid": "AK4M8UV2",
1517
- "dataset": {
1518
- "sourceid": "xYOQAdpqT",
1519
- "name": "Form All Questions",
1520
- "qrveyid": "xYOQAdpqT",
1521
- "text": "Form All Questions",
1522
- "linkid": 0
1523
- },
1524
- "enabled": true,
1525
- "linked": null
1526
- }
1527
- };
1528
1423
 
1529
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
- ```
1424
+ ##### Returns
1531
1425
 
1532
1426
 
1533
- ##### Returns
1427
+ - true: the given argument is empty; false: is not.
1534
1428
 
1535
1429
 
1536
- - `Object` an object with the new filters structure
1537
1430
 
1538
1431
 
1432
+ ### dist/general/mix/isNaNV2.js
1539
1433
 
1540
1434
 
1541
- ### dist/filters/classes/FilterInputErrorHandler.js
1435
+ #### isNaNV2(variable)
1542
1436
 
1437
+ Validates if the recieved number is NaN type.
1438
+ This function recieves any variable but will return false.
1439
+ Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
1543
1440
 
1544
- #### new FilterInputErrorHandler()
1545
1441
 
1546
1442
 
1547
1443
 
1444
+ ##### Parameters
1548
1445
 
1446
+ | Name | Type | Description | |
1447
+ | ---- | ---- | ----------- | -------- |
1448
+ | variable | | the variable to validate | &nbsp; |
1549
1449
 
1550
1450
 
1551
1451
 
@@ -1553,17 +1453,18 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1553
1453
  ##### Returns
1554
1454
 
1555
1455
 
1556
- - `Void`
1456
+ - True if variable is a NaN or false otherwise
1557
1457
 
1558
1458
 
1559
1459
 
1560
1460
 
1561
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
1461
+ ### dist/general/mix/isNull.js
1562
1462
 
1563
1463
 
1564
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1464
+ #### isNull(arg)
1565
1465
 
1566
- [TODO: Make a proper description for this function]
1466
+ return if a given variable is either `null` or `undefined`
1467
+ useful to avoid falsify validating Number Zero (0)
1567
1468
 
1568
1469
 
1569
1470
 
@@ -1572,9 +1473,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1572
1473
 
1573
1474
  | Name | Type | Description | |
1574
1475
  | ---- | ---- | ----------- | -------- |
1575
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
- | scopes | | | &nbsp; |
1577
- | currentScope | | | &nbsp; |
1476
+ | arg | `any` | | &nbsp; |
1578
1477
 
1579
1478
 
1580
1479
 
@@ -1582,17 +1481,19 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1582
1481
  ##### Returns
1583
1482
 
1584
1483
 
1585
- -
1484
+ - `Boolean`
1586
1485
 
1587
1486
 
1588
1487
 
1589
1488
 
1590
- ### dist/filters/helpers/getAvailableScopes.js
1489
+ ### dist/general/mix/randomId.js
1591
1490
 
1592
1491
 
1593
- #### getAvailableScopes(config)
1492
+ #### randomId(length, exclude)
1594
1493
 
1595
- Gets Scopes/Scope IDs by given IDs
1494
+ Creates a random string
1495
+ - If the first given argument is different than a length number, the variable is replaced by a default number
1496
+ - If the optional second given argument is passed the random string is permutated.
1596
1497
 
1597
1498
 
1598
1499
 
@@ -1601,7 +1502,8 @@ Gets Scopes/Scope IDs by given IDs
1601
1502
 
1602
1503
  | Name | Type | Description | |
1603
1504
  | ---- | ---- | ----------- | -------- |
1604
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
1505
+ | length | `Number` | size of the generated string. Default 8 | &nbsp; |
1506
+ | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
1605
1507
 
1606
1508
 
1607
1509
 
@@ -1609,17 +1511,19 @@ Gets Scopes/Scope IDs by given IDs
1609
1511
  ##### Returns
1610
1512
 
1611
1513
 
1612
- - a Scopes/Scope IDs array
1514
+ - `String` Random string
1613
1515
 
1614
1516
 
1615
1517
 
1616
1518
 
1617
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1519
+ ### dist/general/mix/size.js
1618
1520
 
1619
1521
 
1620
- #### getAvailableScopesIDsByConfig(config)
1522
+ #### size(obj)
1621
1523
 
1622
- Gets the Scopes IDS for the Available Scope function by any config
1524
+ Gets the length of the given array.
1525
+ - Useful for Object, Array and string type.
1526
+ - For `null` or `undefined` or else argument the returned value will be 0.
1623
1527
 
1624
1528
 
1625
1529
 
@@ -1628,7 +1532,7 @@ Gets the Scopes IDS for the Available Scope function by any config
1628
1532
 
1629
1533
  | Name | Type | Description | |
1630
1534
  | ---- | ---- | ----------- | -------- |
1631
- | config | | any config | &nbsp; |
1535
+ | obj | `Any` | Any object-type variable | &nbsp; |
1632
1536
 
1633
1537
 
1634
1538
 
@@ -1636,17 +1540,18 @@ Gets the Scopes IDS for the Available Scope function by any config
1636
1540
  ##### Returns
1637
1541
 
1638
1542
 
1639
- - a Available Scope IDS config
1543
+ - `Number` the size of the given variable
1640
1544
 
1641
1545
 
1642
1546
 
1643
1547
 
1644
- ### dist/filters/helpers/getScopesByHierarchy.js
1548
+ ### dist/general/object/cloneDeep.js
1645
1549
 
1646
1550
 
1647
- #### getScopesByHierarchy(scopes, currentScope)
1551
+ #### cloneDeep(obj)
1648
1552
 
1649
- [TODO: Make a description for this]
1553
+ A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
1554
+ Not to use this function with inner objects and functions
1650
1555
 
1651
1556
 
1652
1557
 
@@ -1655,8 +1560,7 @@ Gets the Scopes IDS for the Available Scope function by any config
1655
1560
 
1656
1561
  | Name | Type | Description | |
1657
1562
  | ---- | ---- | ----------- | -------- |
1658
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
- | currentScope | | Current scope type | &nbsp; |
1563
+ | obj | | The object | &nbsp; |
1660
1564
 
1661
1565
 
1662
1566
 
@@ -1664,17 +1568,21 @@ Gets the Scopes IDS for the Available Scope function by any config
1664
1568
  ##### Returns
1665
1569
 
1666
1570
 
1667
- - A new array of Scopes/Scope IDs
1571
+ - The new reference object or the given object if the parsing is incorrect or empty
1668
1572
 
1669
1573
 
1670
1574
 
1671
1575
 
1672
- ### dist/general/array/delete.js
1576
+ ### dist/general/object/get.js
1673
1577
 
1674
1578
 
1675
- #### ArrayDelete(array, index)
1579
+ #### _get(baseObject, path, defaultValue)
1676
1580
 
1677
- Inmutable Array Item deletion
1581
+ Like lodash _.get.
1582
+ Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
1583
+
1584
+ Empty arrays and empty objects are returned but the defaultValue is not
1585
+ Undefined and null values will return the defaultValue.
1678
1586
 
1679
1587
 
1680
1588
 
@@ -1683,29 +1591,59 @@ Inmutable Array Item deletion
1683
1591
 
1684
1592
  | Name | Type | Description | |
1685
1593
  | ---- | ---- | ----------- | -------- |
1686
- | array | `Array` | a collection of items to delete | &nbsp; |
1687
- | index | `Number` | the position of the item to delete | &nbsp; |
1594
+ | baseObject | | The object to query | &nbsp; |
1595
+ | path | | The string path or collection of string paths of the property to get. | &nbsp; |
1596
+ | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
1597
+
1688
1598
 
1689
1599
 
1690
1600
 
1601
+ ##### Examples
1602
+
1603
+ ```javascript
1604
+ // returns 'Hello'
1605
+ _get({ item1: 'Hello', item2: 'World' }, 'item1')
1606
+ ```
1607
+ ```javascript
1608
+ // returns 'A simple Hello'
1609
+ _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
1610
+ ```
1611
+ ```javascript
1612
+ // returns 'Hello Again'
1613
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
1614
+ ```
1615
+ ```javascript
1616
+ // returns 'Hello 2'
1617
+ _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
1618
+ ```
1619
+ ```javascript
1620
+ // returns 'Hello Again'
1621
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
1622
+ ```
1623
+
1691
1624
 
1692
1625
  ##### Returns
1693
1626
 
1694
1627
 
1695
- - a new Array or the given parameter when is empty or not an array
1628
+ - the resolved value.
1696
1629
 
1697
1630
 
1698
1631
 
1699
1632
 
1700
- ### dist/general/array/filterNestedTree.js
1633
+ ### dist/general/object/getAttribute.js
1701
1634
 
1702
1635
 
1703
- #### filterNestedTree(arr, childArrKey, condition)
1636
+ #### getAttribute(obj, key)
1704
1637
 
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
1638
+ Searchs for properties in different case styles such as: lower, upper, camel and pascal
1639
+ - To optimize the searching, it is required a key in a snake_case style
1640
+ - List of cases that do not match
1641
+ -- From lower to snake case
1642
+ -- From upper to snake case
1643
+ -- From lower to camel case
1644
+ -- From upper to camel case
1645
+ -- From lower to pascal case
1646
+ -- From upper to pascal case
1709
1647
 
1710
1648
 
1711
1649
 
@@ -1714,27 +1652,33 @@ Filters a nested tree array by a custom condition on the last child node
1714
1652
 
1715
1653
  | Name | Type | Description | |
1716
1654
  | ---- | ---- | ----------- | -------- |
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; |
1655
+ | obj | `object` | object to look for | &nbsp; |
1656
+ | key | `string` | String attribute in snake_case style | &nbsp; |
1657
+
1720
1658
 
1721
1659
 
1722
1660
 
1661
+ ##### Examples
1662
+
1663
+ ```javascript
1664
+ getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
1665
+ ```
1666
+
1723
1667
 
1724
1668
  ##### Returns
1725
1669
 
1726
1670
 
1727
- - array filtered
1671
+ - `Void`
1728
1672
 
1729
1673
 
1730
1674
 
1731
1675
 
1732
- ### dist/general/array/flattenDeep.js
1676
+ ### dist/general/object/hasProperty.js
1733
1677
 
1734
1678
 
1735
- #### flattenDeep(arr)
1679
+ #### _hasProperty(obj, property)
1736
1680
 
1737
- Flat deeply an array
1681
+ Use the hasOwnProperty in order to verify if the given property exists in the object.
1738
1682
 
1739
1683
 
1740
1684
 
@@ -1743,35 +1687,47 @@ Flat deeply an array
1743
1687
 
1744
1688
  | Name | Type | Description | |
1745
1689
  | ---- | ---- | ----------- | -------- |
1746
- | arr | | Array to flat deeply | &nbsp; |
1690
+ | obj | `object` | an object | &nbsp; |
1691
+ | property | `string` | String to verify if exists in the object as property | &nbsp; |
1747
1692
 
1748
1693
 
1749
1694
 
1750
1695
 
1751
- ##### Returns
1696
+ ##### Examples
1752
1697
 
1698
+ ```javascript
1699
+ const prop = 'prop2'
1700
+ const obj1 = { prop1: 'hello', prop2: 'world'}
1701
+ _hasProperty(ob1, prop1) // true
1753
1702
 
1754
- - flatten array
1703
+ const obj2 = { prop1: 'hello world' }
1704
+ _hasProperty(ob1, prop2) // false
1705
+ ```
1755
1706
 
1756
1707
 
1708
+ ##### Returns
1757
1709
 
1758
1710
 
1759
- ### dist/general/array/getFirstIndexFromArray.js
1711
+ - True if the object has the given property; otherwise, false.
1760
1712
 
1761
1713
 
1762
- #### getFirstIndexFromArray(array, callback)
1763
1714
 
1764
- Gets the first index from the array by a callback condition
1765
1715
 
1716
+ ### dist/general/object/isObject.js
1766
1717
 
1767
1718
 
1719
+ #### isObject(obj)
1768
1720
 
1769
- ##### Parameters
1721
+ Checks if the given argument is an object type
1722
+
1723
+
1724
+
1725
+
1726
+ ##### Parameters
1770
1727
 
1771
1728
  | Name | Type | Description | |
1772
1729
  | ---- | ---- | ----------- | -------- |
1773
- | array | | | &nbsp; |
1774
- | callback | | function callback | &nbsp; |
1730
+ | obj | | the variable to check | &nbsp; |
1775
1731
 
1776
1732
 
1777
1733
 
@@ -1779,17 +1735,18 @@ Gets the first index from the array by a callback condition
1779
1735
  ##### Returns
1780
1736
 
1781
1737
 
1782
- - the first index of the array. -1 when the condition is not satisfied
1738
+ - True: It is an object; False: It is not.
1783
1739
 
1784
1740
 
1785
1741
 
1786
1742
 
1787
- ### dist/general/array/getLastIndexFromArray.js
1743
+ ### dist/general/object/mapValues.js
1788
1744
 
1789
1745
 
1790
- #### getLastIndexFromArray(array, callback)
1746
+ #### mapValues(baseObject, iteratee)
1791
1747
 
1792
- Gets the last index from the array by a callback condition
1748
+ Invoke iteratee (function) for each object key-value pair
1749
+ and return a mapped object
1793
1750
 
1794
1751
 
1795
1752
 
@@ -1798,8 +1755,8 @@ Gets the last index from the array by a callback condition
1798
1755
 
1799
1756
  | Name | Type | Description | |
1800
1757
  | ---- | ---- | ----------- | -------- |
1801
- | array | | | &nbsp; |
1802
- | callback | | function callback | &nbsp; |
1758
+ | baseObject | `Object` | Base object. | &nbsp; |
1759
+ | iteratee | `Function` | The executed per iteration. | &nbsp; |
1803
1760
 
1804
1761
 
1805
1762
 
@@ -1807,17 +1764,18 @@ Gets the last index from the array by a callback condition
1807
1764
  ##### Returns
1808
1765
 
1809
1766
 
1810
- - the last index of the array. -1 when the condition is not satisfied
1767
+ - `Object` New mapped object.
1811
1768
 
1812
1769
 
1813
1770
 
1814
1771
 
1815
- ### dist/general/function/debounce.js
1772
+ ### dist/general/object/mergeDeep.js
1816
1773
 
1817
1774
 
1818
- #### debounce(fn, time)
1775
+ #### mergeDeep(obj1, obj2, settings)
1819
1776
 
1820
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1777
+ Merges two objects into a new one.
1778
+ The second given argument to the first given argument.
1821
1779
 
1822
1780
 
1823
1781
 
@@ -1826,8 +1784,9 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
1826
1784
 
1827
1785
  | Name | Type | Description | |
1828
1786
  | ---- | ---- | ----------- | -------- |
1829
- | fn | `Function` | original Function | &nbsp; |
1830
- | time | `Number` | default 500ms | &nbsp; |
1787
+ | obj1 | | The target object | &nbsp; |
1788
+ | obj2 | | The object to be merged | &nbsp; |
1789
+ | settings | | Object settings for this function | &nbsp; |
1831
1790
 
1832
1791
 
1833
1792
 
@@ -1835,17 +1794,37 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
1835
1794
  ##### Returns
1836
1795
 
1837
1796
 
1838
- - `Function` debounced functions
1797
+ - a new merged object
1839
1798
 
1840
1799
 
1841
1800
 
1801
+ #### isValid(obj1, obj2)
1842
1802
 
1843
- ### dist/general/function/throttled.js
1803
+ Validates if the two arguments are objects
1844
1804
 
1845
1805
 
1846
- #### throttled(fn, time)
1847
1806
 
1848
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1807
+
1808
+ ##### Parameters
1809
+
1810
+ | Name | Type | Description | |
1811
+ | ---- | ---- | ----------- | -------- |
1812
+ | obj1 | | The target object | &nbsp; |
1813
+ | obj2 | | The object to be merged | &nbsp; |
1814
+
1815
+
1816
+
1817
+
1818
+ ##### Returns
1819
+
1820
+
1821
+ - true: they are valid; false: they are not
1822
+
1823
+
1824
+
1825
+ #### getParamsToMergeDeep(settings)
1826
+
1827
+ Validates and gets the settings with all set parameters.
1849
1828
 
1850
1829
 
1851
1830
 
@@ -1854,8 +1833,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1854
1833
 
1855
1834
  | Name | Type | Description | |
1856
1835
  | ---- | ---- | ----------- | -------- |
1857
- | fn | `Function` | original Function | &nbsp; |
1858
- | time | `Number` | default 500ms | &nbsp; |
1836
+ | settings | | the settings object | &nbsp; |
1859
1837
 
1860
1838
 
1861
1839
 
@@ -1863,18 +1841,17 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1863
1841
  ##### Returns
1864
1842
 
1865
1843
 
1866
- - `Function` throttled function
1844
+ - a new settings object with all set parameters.
1867
1845
 
1868
1846
 
1869
1847
 
1870
1848
 
1871
- ### dist/general/mix/compareDeep.js
1849
+ ### dist/general/object/objectCopy.js
1872
1850
 
1873
1851
 
1874
- #### compareDeep(object1, object2)
1852
+ #### objectCopy(entity, cache)
1875
1853
 
1876
- Compares two objects to know if they are equals. Go across nested objects.
1877
- Includes arrays in the comparison.
1854
+ Created a new reference of the given argument
1878
1855
 
1879
1856
 
1880
1857
 
@@ -1883,8 +1860,8 @@ Includes arrays in the comparison.
1883
1860
 
1884
1861
  | Name | Type | Description | |
1885
1862
  | ---- | ---- | ----------- | -------- |
1886
- | object1 | | First Object to compare | &nbsp; |
1887
- | object2 | | Second Object to compare | &nbsp; |
1863
+ | entity | | The variable to be copied | &nbsp; |
1864
+ | cache | | | &nbsp; |
1888
1865
 
1889
1866
 
1890
1867
 
@@ -1892,17 +1869,17 @@ Includes arrays in the comparison.
1892
1869
  ##### Returns
1893
1870
 
1894
1871
 
1895
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
1872
+ - A new reference of the given argument
1896
1873
 
1897
1874
 
1898
1875
 
1899
1876
 
1900
- ### dist/general/mix/getTag.js
1877
+ ### dist/general/object/omit.js
1901
1878
 
1902
1879
 
1903
- #### getTag(value)
1880
+ #### omit(obj, props)
1904
1881
 
1905
- Gets the `toStringTag` of `value`.
1882
+ return a new Object excluding attributes in _props_ list
1906
1883
 
1907
1884
 
1908
1885
 
@@ -1911,7 +1888,8 @@ Gets the `toStringTag` of `value`.
1911
1888
 
1912
1889
  | Name | Type | Description | |
1913
1890
  | ---- | ---- | ----------- | -------- |
1914
- | value | | The value to query. | &nbsp; |
1891
+ | obj | `Object` | base object | &nbsp; |
1892
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
1915
1893
 
1916
1894
 
1917
1895
 
@@ -1919,17 +1897,17 @@ Gets the `toStringTag` of `value`.
1919
1897
  ##### Returns
1920
1898
 
1921
1899
 
1922
- - `string` Returns the `toStringTag`.
1900
+ - `Object` clean object
1923
1901
 
1924
1902
 
1925
1903
 
1926
1904
 
1927
- ### dist/general/mix/importScripts.js
1905
+ ### dist/general/object/pick.js
1928
1906
 
1929
1907
 
1930
- #### importScripts(scripts)
1908
+ #### pick(baseObject, keys)
1931
1909
 
1932
- Import a set of external Scripts given the URL in both serie and cascade way
1910
+ return a new object just with attributes in _keys_ list
1933
1911
 
1934
1912
 
1935
1913
 
@@ -1938,54 +1916,26 @@ Import a set of external Scripts given the URL in both serie and cascade way
1938
1916
 
1939
1917
  | Name | Type | Description | |
1940
1918
  | ---- | ---- | ----------- | -------- |
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
-
1919
+ | baseObject | `Object` | base object | &nbsp; |
1920
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
1950
1921
 
1951
- ##### Examples
1952
1922
 
1953
- ```javascript
1954
- // 1) Simple script (paralell loading)
1955
- importScripts(['http://myscript.js', 'http://another.js']);
1956
1923
 
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
1924
 
1963
- // 3) import dependent scripts (cascade)
1964
- importScripts([
1965
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1966
- ]);
1925
+ ##### Returns
1967
1926
 
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
1927
 
1928
+ - `Object` new object just with desired attributes
1977
1929
 
1978
- ##### Returns
1979
1930
 
1980
1931
 
1981
- - `Promise` Promise when all script have been loaded
1982
1932
 
1933
+ ### dist/general/object/serialize.js
1983
1934
 
1984
1935
 
1985
- #### loadScript(url, type, noModule)
1936
+ #### serialize(obj)
1986
1937
 
1987
- Creates the script element and appends to document.head
1988
- return a Promise that is resolved when the script is loaded
1938
+ serialize object to url param
1989
1939
 
1990
1940
 
1991
1941
 
@@ -1994,9 +1944,7 @@ return a Promise that is resolved when the script is loaded
1994
1944
 
1995
1945
  | Name | Type | Description | |
1996
1946
  | ---- | ---- | ----------- | -------- |
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; |
1947
+ | obj | | - Object to be serialized | &nbsp; |
2000
1948
 
2001
1949
 
2002
1950
 
@@ -2009,12 +1957,12 @@ return a Promise that is resolved when the script is loaded
2009
1957
 
2010
1958
 
2011
1959
 
2012
- ### dist/general/mix/isEmpty.js
1960
+ ### dist/general/string/capitalize.js
2013
1961
 
2014
1962
 
2015
- #### isEmpty(variable, includeFalsy)
1963
+ #### capitalize(text)
2016
1964
 
2017
- Validates if the given argument is empty
1965
+ Upper case the first letter of a given text
2018
1966
 
2019
1967
 
2020
1968
 
@@ -2023,8 +1971,7 @@ Validates if the given argument is empty
2023
1971
 
2024
1972
  | Name | Type | Description | |
2025
1973
  | ---- | ---- | ----------- | -------- |
2026
- | variable | | the given variable | &nbsp; |
2027
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1974
+ | text | `String` | | &nbsp; |
2028
1975
 
2029
1976
 
2030
1977
 
@@ -2032,19 +1979,17 @@ Validates if the given argument is empty
2032
1979
  ##### Returns
2033
1980
 
2034
1981
 
2035
- - true: the given argument is empty; false: is not.
1982
+ - `String` a capitalized text
2036
1983
 
2037
1984
 
2038
1985
 
2039
1986
 
2040
- ### dist/general/mix/isNaNV2.js
1987
+ ### dist/dates/helpers/getDateByDateFormat.js
2041
1988
 
2042
1989
 
2043
- #### isNaNV2(variable)
1990
+ #### getDateByDateFormat(date, format, time)
2044
1991
 
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.
1992
+ Gets a Date Object instance by a Date format
2048
1993
 
2049
1994
 
2050
1995
 
@@ -2053,7 +1998,9 @@ Validates if variable is null, undefined, or an empty string, also, the function
2053
1998
 
2054
1999
  | Name | Type | Description | |
2055
2000
  | ---- | ---- | ----------- | -------- |
2056
- | variable | | the variable to validate | &nbsp; |
2001
+ | date | | String with a formatted date | &nbsp; |
2002
+ | format | | The date format | &nbsp; |
2003
+ | time | | flag to convert the formatted date to miliseconds | &nbsp; |
2057
2004
 
2058
2005
 
2059
2006
 
@@ -2061,18 +2008,17 @@ Validates if variable is null, undefined, or an empty string, also, the function
2061
2008
  ##### Returns
2062
2009
 
2063
2010
 
2064
- - True if variable is a NaN or false otherwise
2011
+ - a Date object, milisecond time or the same value if date format does not match.
2065
2012
 
2066
2013
 
2067
2014
 
2068
2015
 
2069
- ### dist/general/mix/isNull.js
2016
+ ### dist/dates/helpers/getDateFormatByProperty.js
2070
2017
 
2071
2018
 
2072
- #### isNull(arg)
2019
+ #### getDateFormatByProperty(property)
2073
2020
 
2074
- return if a given variable is either `null` or `undefined`
2075
- useful to avoid falsify validating Number Zero (0)
2021
+ Gets the date format by the given property
2076
2022
 
2077
2023
 
2078
2024
 
@@ -2081,7 +2027,7 @@ useful to avoid falsify validating Number Zero (0)
2081
2027
 
2082
2028
  | Name | Type | Description | |
2083
2029
  | ---- | ---- | ----------- | -------- |
2084
- | arg | `any` | | &nbsp; |
2030
+ | property | | The Column Property | &nbsp; |
2085
2031
 
2086
2032
 
2087
2033
 
@@ -2089,19 +2035,17 @@ useful to avoid falsify validating Number Zero (0)
2089
2035
  ##### Returns
2090
2036
 
2091
2037
 
2092
- - `Boolean`
2038
+ - The date format
2093
2039
 
2094
2040
 
2095
2041
 
2096
2042
 
2097
- ### dist/general/mix/randomId.js
2043
+ ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
2098
2044
 
2099
2045
 
2100
- #### randomId(length, exclude)
2046
+ #### getDateFormatRegularExpressionInArray(dateFormat)
2101
2047
 
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.
2048
+ Gets an array of regular expressions by the given date format
2105
2049
 
2106
2050
 
2107
2051
 
@@ -2110,8 +2054,7 @@ Creates a random string
2110
2054
 
2111
2055
  | Name | Type | Description | |
2112
2056
  | ---- | ---- | ----------- | -------- |
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; |
2057
+ | dateFormat | | the date format | &nbsp; |
2115
2058
 
2116
2059
 
2117
2060
 
@@ -2119,19 +2062,17 @@ Creates a random string
2119
2062
  ##### Returns
2120
2063
 
2121
2064
 
2122
- - `String` Random string
2065
+ - an array of regular expressions
2123
2066
 
2124
2067
 
2125
2068
 
2126
2069
 
2127
- ### dist/general/mix/size.js
2070
+ ### dist/dates/helpers/getSeparatorByDateFormat.js
2128
2071
 
2129
2072
 
2130
- #### size(obj)
2073
+ #### getSeparatorByDateFormat(format)
2131
2074
 
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.
2075
+ Gets the separator of the date format
2135
2076
 
2136
2077
 
2137
2078
 
@@ -2140,7 +2081,7 @@ Gets the length of the given array.
2140
2081
 
2141
2082
  | Name | Type | Description | |
2142
2083
  | ---- | ---- | ----------- | -------- |
2143
- | obj | `Any` | Any object-type variable | &nbsp; |
2084
+ | format | | the date format | &nbsp; |
2144
2085
 
2145
2086
 
2146
2087
 
@@ -2148,18 +2089,18 @@ Gets the length of the given array.
2148
2089
  ##### Returns
2149
2090
 
2150
2091
 
2151
- - `Number` the size of the given variable
2092
+ - a separator string
2152
2093
 
2153
2094
 
2154
2095
 
2155
2096
 
2156
- ### dist/general/object/cloneDeep.js
2097
+ ### dist/dates/helpers/getWeek.js
2157
2098
 
2158
2099
 
2159
- #### cloneDeep(obj)
2100
+ #### getWeek(date)
2160
2101
 
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
2102
+ Gets the week number of the year
2103
+ Additionally, the month and the year
2163
2104
 
2164
2105
 
2165
2106
 
@@ -2168,7 +2109,7 @@ Not to use this function with inner objects and functions
2168
2109
 
2169
2110
  | Name | Type | Description | |
2170
2111
  | ---- | ---- | ----------- | -------- |
2171
- | obj | | The object | &nbsp; |
2112
+ | date | | the date object | &nbsp; |
2172
2113
 
2173
2114
 
2174
2115
 
@@ -2176,21 +2117,20 @@ Not to use this function with inner objects and functions
2176
2117
  ##### Returns
2177
2118
 
2178
2119
 
2179
- - The new reference object or the given object if the parsing is incorrect or empty
2180
-
2120
+ - an object with the week, month and year.
2181
2121
 
2182
2122
 
2183
2123
 
2184
- ### dist/general/object/get.js
2185
2124
 
2125
+ ### dist/dates/helpers/validateDate.js
2186
2126
 
2187
- #### _get(baseObject, path, defaultValue)
2188
2127
 
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.
2128
+ #### validateDate(date, format)
2191
2129
 
2192
- Empty arrays and empty objects are returned but the defaultValue is not
2193
- Undefined and null values will return the defaultValue.
2130
+ Validate a string date depending on giving format
2131
+ - If the string is a token label, the function lets it pass.
2132
+ - Otherwise depends of the format
2133
+ - Some escenarios the string is a mix of token labels and dates
2194
2134
 
2195
2135
 
2196
2136
 
@@ -2199,59 +2139,54 @@ Undefined and null values will return the defaultValue.
2199
2139
 
2200
2140
  | Name | Type | Description | |
2201
2141
  | ---- | ---- | ----------- | -------- |
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; |
2142
+ | date | | String of date | &nbsp; |
2143
+ | format | | String of the format to validate | &nbsp; |
2205
2144
 
2206
2145
 
2207
2146
 
2208
2147
 
2209
- ##### Examples
2148
+ ##### Returns
2149
+
2150
+
2151
+ - True if it is valid or not. Undefined if date is undefined
2152
+
2153
+
2154
+
2155
+
2156
+ ### dist/dates/helpers/validateDateByDateFormat.js
2157
+
2158
+
2159
+ #### validateDateByDateFormat(date, dateForma)
2160
+
2161
+ Validates the given string as Date by its date format.
2162
+
2163
+
2164
+
2165
+
2166
+ ##### Parameters
2167
+
2168
+ | Name | Type | Description | |
2169
+ | ---- | ---- | ----------- | -------- |
2170
+ | date | | a string to validate as date form | &nbsp; |
2171
+ | dateForma | | the format of the date to validate the string | &nbsp; |
2172
+
2210
2173
 
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
2174
 
2232
2175
 
2233
2176
  ##### Returns
2234
2177
 
2235
2178
 
2236
- - the resolved value.
2179
+ - true: the string is a valida date
2237
2180
 
2238
2181
 
2239
2182
 
2240
2183
 
2241
- ### dist/general/object/getAttribute.js
2184
+ ### dist/dates/relative/relative.js
2242
2185
 
2243
2186
 
2244
- #### getAttribute(obj, key)
2187
+ #### resolveRelative(statements, clock)
2245
2188
 
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
2189
+ Resolve a list of relative statements according to operator
2255
2190
 
2256
2191
 
2257
2192
 
@@ -2260,8 +2195,8 @@ Searchs for properties in different case styles such as: lower, upper, camel and
2260
2195
 
2261
2196
  | Name | Type | Description | |
2262
2197
  | ---- | ---- | ----------- | -------- |
2263
- | obj | `object` | object to look for | &nbsp; |
2264
- | key | `string` | String attribute in snake_case style | &nbsp; |
2198
+ | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
2199
+ | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
2265
2200
 
2266
2201
 
2267
2202
 
@@ -2269,102 +2204,101 @@ Searchs for properties in different case styles such as: lower, upper, camel and
2269
2204
  ##### Examples
2270
2205
 
2271
2206
  ```javascript
2272
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2207
+ Input:
2208
+ {
2209
+ "cursor": "the_next",
2210
+ "unit": "year",
2211
+ "number": 1,
2212
+ "includeCurrent": false,
2213
+ "isCalendarDate": false,
2214
+ "anchor": "03/05/2021"
2215
+ }
2216
+
2217
+ Output:
2218
+ { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
2273
2219
  ```
2274
2220
 
2275
2221
 
2276
2222
  ##### Returns
2277
2223
 
2278
2224
 
2279
- - `Void`
2225
+ - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
2280
2226
 
2281
2227
 
2282
2228
 
2283
2229
 
2284
- ### dist/general/object/hasProperty.js
2230
+ ### dist/dates/relative/Adapter.js
2285
2231
 
2286
2232
 
2287
- #### _hasProperty(obj, property)
2233
+ #### value()
2288
2234
 
2289
- Use the hasOwnProperty in order to verify if the given property exists in the object.
2235
+ Resolves statement and returns statement value
2290
2236
 
2291
2237
 
2292
2238
 
2293
2239
 
2294
- ##### Parameters
2295
2240
 
2296
- | Name | Type | Description | |
2297
- | ---- | ---- | ----------- | -------- |
2298
- | obj | `object` | an object | &nbsp; |
2299
- | property | `string` | String to verify if exists in the object as property | &nbsp; |
2300
2241
 
2242
+ ##### Returns
2301
2243
 
2302
2244
 
2245
+ - `AbsoluteRange` `string`
2246
+
2247
+
2248
+
2249
+ #### valueAsAnchor()
2250
+
2251
+ Resolves statement as an anchor
2252
+
2303
2253
 
2304
- ##### Examples
2305
2254
 
2306
- ```javascript
2307
- const prop = 'prop2'
2308
- const obj1 = { prop1: 'hello', prop2: 'world'}
2309
- _hasProperty(ob1, prop1) // true
2310
2255
 
2311
- const obj2 = { prop1: 'hello world' }
2312
- _hasProperty(ob1, prop2) // false
2313
- ```
2314
2256
 
2315
2257
 
2316
2258
  ##### Returns
2317
2259
 
2318
2260
 
2319
- - True if the object has the given property; otherwise, false.
2261
+ - `string`
2320
2262
 
2321
2263
 
2322
2264
 
2265
+ #### _statementToRange() *private method*
2323
2266
 
2324
- ### dist/general/object/isObject.js
2267
+ Convert verbal statement to range value
2325
2268
 
2326
2269
 
2327
- #### isObject(obj)
2328
2270
 
2329
- Checks if the given argument is an object type
2330
2271
 
2331
2272
 
2332
2273
 
2274
+ ##### Returns
2333
2275
 
2334
- ##### Parameters
2335
2276
 
2336
- | Name | Type | Description | |
2337
- | ---- | ---- | ----------- | -------- |
2338
- | obj | | the variable to check | &nbsp; |
2277
+ - `AbsoluteRange`
2339
2278
 
2340
2279
 
2341
2280
 
2281
+ #### _resolveAsThis() *private method*
2342
2282
 
2343
- ##### Returns
2283
+ Apply 'this' cursor logic to statement
2344
2284
 
2345
2285
 
2346
- - True: It is an object; False: It is not.
2347
2286
 
2348
2287
 
2349
2288
 
2350
2289
 
2351
- ### dist/general/object/mapValues.js
2290
+ ##### Returns
2352
2291
 
2353
2292
 
2354
- #### mapValues(baseObject, iteratee)
2293
+ - `AbsoluteStatement`
2355
2294
 
2356
- Invoke iteratee (function) for each object key-value pair
2357
- and return a mapped object
2358
2295
 
2359
2296
 
2297
+ #### _resolveAsTheLast() *private method*
2360
2298
 
2299
+ Apply 'the last' cursor logic to statement
2361
2300
 
2362
- ##### Parameters
2363
2301
 
2364
- | Name | Type | Description | |
2365
- | ---- | ---- | ----------- | -------- |
2366
- | baseObject | `Object` | Base object. | &nbsp; |
2367
- | iteratee | `Function` | The executed per iteration. | &nbsp; |
2368
2302
 
2369
2303
 
2370
2304
 
@@ -2372,18 +2306,29 @@ and return a mapped object
2372
2306
  ##### Returns
2373
2307
 
2374
2308
 
2375
- - `Object` New mapped object.
2309
+ - `AbsoluteStatement`
2376
2310
 
2377
2311
 
2378
2312
 
2313
+ #### _resolveAsTheNext() *private method*
2379
2314
 
2380
- ### dist/general/object/mergeDeep.js
2315
+ Apply 'the next' cursor logic to statement
2381
2316
 
2382
2317
 
2383
- #### mergeDeep(obj1, obj2, settings)
2384
2318
 
2385
- Merges two objects into a new one.
2386
- The second given argument to the first given argument.
2319
+
2320
+
2321
+
2322
+ ##### Returns
2323
+
2324
+
2325
+ - `AbsoluteStatement`
2326
+
2327
+
2328
+
2329
+ #### replaceNowToken(value, now)
2330
+
2331
+ Replace '@now' token inside a string
2387
2332
 
2388
2333
 
2389
2334
 
@@ -2392,9 +2337,8 @@ The second given argument to the first given argument.
2392
2337
 
2393
2338
  | Name | Type | Description | |
2394
2339
  | ---- | ---- | ----------- | -------- |
2395
- | obj1 | | The target object | &nbsp; |
2396
- | obj2 | | The object to be merged | &nbsp; |
2397
- | settings | | Object settings for this function | &nbsp; |
2340
+ | value | `string` | | &nbsp; |
2341
+ | now | `Date` | | &nbsp; |
2398
2342
 
2399
2343
 
2400
2344
 
@@ -2402,13 +2346,13 @@ The second given argument to the first given argument.
2402
2346
  ##### Returns
2403
2347
 
2404
2348
 
2405
- - a new merged object
2349
+ - `string`
2406
2350
 
2407
2351
 
2408
2352
 
2409
- #### isValid(obj1, obj2)
2353
+ #### convertRelativeToAbsolute(args)
2410
2354
 
2411
- Validates if the two arguments are objects
2355
+ Returns a range object (date) from a group of statement params
2412
2356
 
2413
2357
 
2414
2358
 
@@ -2417,22 +2361,45 @@ Validates if the two arguments are objects
2417
2361
 
2418
2362
  | Name | Type | Description | |
2419
2363
  | ---- | ---- | ----------- | -------- |
2420
- | obj1 | | The target object | &nbsp; |
2421
- | obj2 | | The object to be merged | &nbsp; |
2364
+ | args | `RelativeToAbsoluteStruct` | | &nbsp; |
2365
+
2366
+
2367
+
2422
2368
 
2369
+ ##### Examples
2423
2370
 
2371
+ ```javascript
2372
+ pivot = '2021-03-03T12:30:40'
2373
+ unit = month
2374
+ steps = 2
2375
+ setTo = END
2376
+ resolverAsCalendar: true
2377
+ => Returns '2021-05-31T23:59:59'
2378
+ ```
2379
+ ```javascript
2380
+ pivot = '2021-03-03T12:30:40'
2381
+ unit = month
2382
+ steps = -2
2383
+ setTo = START
2384
+ resolverAsCalendar: false
2385
+ => Returns '2021-01-03T00:00:00'
2386
+ ```
2424
2387
 
2425
2388
 
2426
2389
  ##### Returns
2427
2390
 
2428
2391
 
2429
- - true: they are valid; false: they are not
2392
+ - `string`
2430
2393
 
2431
2394
 
2432
2395
 
2433
- #### getParamsToMergeDeep(settings)
2434
2396
 
2435
- Validates and gets the settings with all set parameters.
2397
+ ### dist/dates/range/getDateRange.js
2398
+
2399
+
2400
+ #### getDateRange(value, dateGroupLabel, withTime)
2401
+
2402
+ Get date range object from a string date value
2436
2403
 
2437
2404
 
2438
2405
 
@@ -2441,25 +2408,56 @@ Validates and gets the settings with all set parameters.
2441
2408
 
2442
2409
  | Name | Type | Description | |
2443
2410
  | ---- | ---- | ----------- | -------- |
2444
- | settings | | the settings object | &nbsp; |
2411
+ | value | `String` | string date value | &nbsp; |
2412
+ | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | &nbsp; |
2413
+ | withTime | `Boolean` | determines if the date range will include time. Default is true | &nbsp; |
2445
2414
 
2446
2415
 
2447
2416
 
2448
2417
 
2418
+ ##### Examples
2419
+
2420
+ ```javascript
2421
+ // 1) Year:
2422
+ getDateRange('2020', 'YEAR');
2423
+ // Will return:
2424
+ {
2425
+ from: '01/01/2020 00:00:00',
2426
+ to: '12/31/2020 23:59:59'
2427
+ }
2428
+
2429
+ // 2) Quarter:
2430
+ getDateRange('Q3 2020', 'QUARTER');
2431
+ // Will return:
2432
+ {
2433
+ from: '07/01/2020 00:00:00',
2434
+ to: '09/30/2020 23:59:59'
2435
+ }
2436
+
2437
+ // 3) Month:
2438
+ getDateRange('Oct 2020', 'MONTH');
2439
+ // Will return:
2440
+ {
2441
+ from: '10/01/2020 00:00:00',
2442
+ to: '10/31/2020 23:59:59'
2443
+ }
2444
+ ```
2445
+
2446
+
2449
2447
  ##### Returns
2450
2448
 
2451
2449
 
2452
- - a new settings object with all set parameters.
2450
+ - `Object` an object with the date range with two string date properties: from and to
2453
2451
 
2454
2452
 
2455
2453
 
2456
2454
 
2457
- ### dist/general/object/objectCopy.js
2455
+ ### dist/dates/adapters/monthYearToDate.js
2458
2456
 
2459
2457
 
2460
- #### objectCopy(entity, cache)
2458
+ #### monthYearToDate(monthYearDate, time)
2461
2459
 
2462
- Created a new reference of the given argument
2460
+ Transforms String Date from a [Month Year] format to Date object.
2463
2461
 
2464
2462
 
2465
2463
 
@@ -2468,8 +2466,8 @@ Created a new reference of the given argument
2468
2466
 
2469
2467
  | Name | Type | Description | |
2470
2468
  | ---- | ---- | ----------- | -------- |
2471
- | entity | | The variable to be copied | &nbsp; |
2472
- | cache | | | &nbsp; |
2469
+ | monthYearDate | | String of [Month Year] date | &nbsp; |
2470
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2473
2471
 
2474
2472
 
2475
2473
 
@@ -2477,17 +2475,17 @@ Created a new reference of the given argument
2477
2475
  ##### Returns
2478
2476
 
2479
2477
 
2480
- - A new reference of the given argument
2478
+ - The date object or the date in milliseconds
2481
2479
 
2482
2480
 
2483
2481
 
2484
2482
 
2485
- ### dist/general/object/omit.js
2483
+ ### dist/dates/adapters/quarterYearToDate.js
2486
2484
 
2487
2485
 
2488
- #### omit(obj, props)
2486
+ #### quarterYearToDate(quarterYearDate, time)
2489
2487
 
2490
- return a new Object excluding attributes in _props_ list
2488
+ Transforms String Date from a [Quarter Year] format to Date object.
2491
2489
 
2492
2490
 
2493
2491
 
@@ -2496,8 +2494,8 @@ return a new Object excluding attributes in _props_ list
2496
2494
 
2497
2495
  | Name | Type | Description | |
2498
2496
  | ---- | ---- | ----------- | -------- |
2499
- | obj | `Object` | base object | &nbsp; |
2500
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2497
+ | quarterYearDate | | String of [Quarter Year] date | &nbsp; |
2498
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2501
2499
 
2502
2500
 
2503
2501
 
@@ -2505,17 +2503,17 @@ return a new Object excluding attributes in _props_ list
2505
2503
  ##### Returns
2506
2504
 
2507
2505
 
2508
- - `Object` clean object
2506
+ - The date object or the date in milliseconds
2509
2507
 
2510
2508
 
2511
2509
 
2512
2510
 
2513
- ### dist/general/object/pick.js
2511
+ ### dist/dates/adapters/weekYearToDate.js
2514
2512
 
2515
2513
 
2516
- #### pick(baseObject, keys)
2514
+ #### weekYearToDate(date, time)
2517
2515
 
2518
- return a new object just with attributes in _keys_ list
2516
+ Transforms String Date from a [Week Year] format to Date object.
2519
2517
 
2520
2518
 
2521
2519
 
@@ -2524,8 +2522,8 @@ return a new object just with attributes in _keys_ list
2524
2522
 
2525
2523
  | Name | Type | Description | |
2526
2524
  | ---- | ---- | ----------- | -------- |
2527
- | baseObject | `Object` | base object | &nbsp; |
2528
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2525
+ | date | | String of [Week Year] date | &nbsp; |
2526
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2529
2527
 
2530
2528
 
2531
2529
 
@@ -2533,17 +2531,17 @@ return a new object just with attributes in _keys_ list
2533
2531
  ##### Returns
2534
2532
 
2535
2533
 
2536
- - `Object` new object just with desired attributes
2534
+ - The date object or the date in milliseconds
2537
2535
 
2538
2536
 
2539
2537
 
2540
2538
 
2541
- ### dist/general/object/serialize.js
2539
+ ### dist/dates/adapters/mdyDateToDate.js
2542
2540
 
2543
2541
 
2544
- #### serialize(obj)
2542
+ #### mdyDateToDate(monthYearDate, time)
2545
2543
 
2546
- serialize object to url param
2544
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
2547
2545
 
2548
2546
 
2549
2547
 
@@ -2552,7 +2550,8 @@ serialize object to url param
2552
2550
 
2553
2551
  | Name | Type | Description | |
2554
2552
  | ---- | ---- | ----------- | -------- |
2555
- | obj | | - Object to be serialized | &nbsp; |
2553
+ | monthYearDate | | String of [mm/dd/yyyy] date | &nbsp; |
2554
+ | time | | Flag to parse the object date to milliseconds. | &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
+ - The date object or the date in milliseconds
2564
2563
 
2565
2564
 
2566
2565
 
2567
2566
 
2568
- ### dist/general/string/capitalize.js
2567
+ ### dist/dates/adapters/yearToDate.js
2569
2568
 
2570
2569
 
2571
- #### capitalize(text)
2570
+ #### yearToDate(yearDate, time)
2572
2571
 
2573
- Upper case the first letter of a given text
2572
+ Transforms String Date from a [Year] format to Date object.
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
+ | yearDate | | String of [Year] date | &nbsp; |
2582
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2583
2583
 
2584
2584
 
2585
2585
 
@@ -2587,7 +2587,7 @@ Upper case the first letter of a given text
2587
2587
  ##### Returns
2588
2588
 
2589
2589
 
2590
- - `String` a capitalized text
2590
+ - The date object or the date in milliseconds
2591
2591
 
2592
2592
 
2593
2593
 
@@ -2701,39 +2701,6 @@ Get a dataset by Qrvey ID
2701
2701
 
2702
2702
 
2703
2703
 
2704
- ### dist/stencil/decorators/Config.js
2705
-
2706
-
2707
- #### Config()
2708
-
2709
- Stencil.js - Prop Decorator
2710
- Get and Parse the Widget Configuration Object and also provide the ability to get properties in different case styles such as: lower, upper, camel and pascal
2711
- But for this, is required ask for a property in `snake_case` style
2712
-
2713
-
2714
-
2715
-
2716
-
2717
-
2718
- ##### Examples
2719
-
2720
- ```javascript
2721
- \ @Config() @Prop() settings;
2722
-
2723
- someMethod() {
2724
- this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2725
- }
2726
- ```
2727
-
2728
-
2729
- ##### Returns
2730
-
2731
-
2732
- - `Void`
2733
-
2734
-
2735
-
2736
-
2737
2704
  ### dist/stencil/util/createRef.js
2738
2705
 
2739
2706
 
@@ -2785,23 +2752,29 @@ try to find this string as a variable on Windows object
2785
2752
 
2786
2753
 
2787
2754
 
2788
- ### dist/typescript/decorators/Debounce.js
2755
+ ### dist/stencil/decorators/Config.js
2789
2756
 
2790
2757
 
2791
- #### Debounce(time)
2758
+ #### Config()
2792
2759
 
2793
- (Method Decorator) Debounce Class Method
2760
+ Stencil.js - Prop Decorator
2761
+ Get and Parse the Widget Configuration Object and also provide the ability to get properties in different case styles such as: lower, upper, camel and pascal
2762
+ But for this, is required ask for a property in `snake_case` style
2794
2763
 
2795
2764
 
2796
2765
 
2797
2766
 
2798
- ##### Parameters
2799
2767
 
2800
- | Name | Type | Description | |
2801
- | ---- | ---- | ----------- | -------- |
2802
- | time | | (optional) deafult 500 | &nbsp; |
2803
2768
 
2769
+ ##### Examples
2770
+
2771
+ ```javascript
2772
+ \ @Config() @Prop() settings;
2804
2773
 
2774
+ someMethod() {
2775
+ this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2776
+ }
2777
+ ```
2805
2778
 
2806
2779
 
2807
2780
  ##### Returns
@@ -2812,12 +2785,12 @@ try to find this string as a variable on Windows object
2812
2785
 
2813
2786
 
2814
2787
 
2815
- ### dist/typescript/decorators/Throttled.js
2788
+ ### dist/typescript/decorators/Debounce.js
2816
2789
 
2817
2790
 
2818
- #### Throttled(time)
2791
+ #### Debounce(time)
2819
2792
 
2820
- (Method Decorator) Throttled Class Method
2793
+ (Method Decorator) Debounce Class Method
2821
2794
 
2822
2795
 
2823
2796
 
@@ -2839,39 +2812,12 @@ try to find this string as a variable on Windows object
2839
2812
 
2840
2813
 
2841
2814
 
2842
- ### dist/dates/relative/helpers/formatStatement.js
2843
-
2844
-
2845
- #### formatStatement(statement)
2846
-
2847
- Build a proper relative date statement type
2848
-
2849
-
2850
-
2851
-
2852
- ##### Parameters
2853
-
2854
- | Name | Type | Description | |
2855
- | ---- | ---- | ----------- | -------- |
2856
- | statement | `RelativeStatement` | | &nbsp; |
2857
-
2858
-
2859
-
2860
-
2861
- ##### Returns
2862
-
2863
-
2864
- - `RelativeStatement`
2865
-
2866
-
2867
-
2868
-
2869
- ### dist/dates/relative/helpers/getStatementCase.js
2815
+ ### dist/typescript/decorators/Throttled.js
2870
2816
 
2871
2817
 
2872
- #### getStatementCase(includeCurrent, isCalendarDate)
2818
+ #### Throttled(time)
2873
2819
 
2874
- Returns a number/constant that identifies a relative date case
2820
+ (Method Decorator) Throttled Class Method
2875
2821
 
2876
2822
 
2877
2823
 
@@ -2880,8 +2826,7 @@ Returns a number/constant that identifies a relative date case
2880
2826
 
2881
2827
  | Name | Type | Description | |
2882
2828
  | ---- | ---- | ----------- | -------- |
2883
- | includeCurrent | `boolean` | | &nbsp; |
2884
- | isCalendarDate | `boolean` | | &nbsp; |
2829
+ | time | | (optional) deafult 500 | &nbsp; |
2885
2830
 
2886
2831
 
2887
2832
 
@@ -2889,17 +2834,17 @@ Returns a number/constant that identifies a relative date case
2889
2834
  ##### Returns
2890
2835
 
2891
2836
 
2892
- - `number`
2837
+ - `Void`
2893
2838
 
2894
2839
 
2895
2840
 
2896
2841
 
2897
- ### dist/dates/relative/helpers/parseDate.js
2842
+ ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
2898
2843
 
2899
2844
 
2900
- #### parseDate(date)
2845
+ #### getFilterBuilderGeneralConfig(config)
2901
2846
 
2902
- Parses a string date and returns a dayjs date
2847
+ Returns a filter builder config object by a any given config
2903
2848
 
2904
2849
 
2905
2850
 
@@ -2908,7 +2853,7 @@ Parses a string date and returns a dayjs date
2908
2853
 
2909
2854
  | Name | Type | Description | |
2910
2855
  | ---- | ---- | ----------- | -------- |
2911
- | date | `string` `Dayjs` `Date` | | &nbsp; |
2856
+ | config | | any config object | &nbsp; |
2912
2857
 
2913
2858
 
2914
2859
 
@@ -2916,7 +2861,7 @@ Parses a string date and returns a dayjs date
2916
2861
  ##### Returns
2917
2862
 
2918
2863
 
2919
- - `Dayjs` A dayjs date
2864
+ - The filter builder config object
2920
2865
 
2921
2866
 
2922
2867
 
@@ -3217,12 +3162,12 @@ Gets filters from the logic by the scopes hierarchy.
3217
3162
 
3218
3163
 
3219
3164
 
3220
- ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
3165
+ ### dist/filters/helpers/common/areFiltersEquals.js
3221
3166
 
3222
3167
 
3223
- #### getFilterBuilderGeneralConfig(config)
3168
+ #### areFiltersEquals(filter1, filter2)
3224
3169
 
3225
- Returns a filter builder config object by a any given config
3170
+ Validates if both filters are the same
3226
3171
 
3227
3172
 
3228
3173
 
@@ -3231,7 +3176,8 @@ Returns a filter builder config object by a any given config
3231
3176
 
3232
3177
  | Name | Type | Description | |
3233
3178
  | ---- | ---- | ----------- | -------- |
3234
- | config | | any config object | &nbsp; |
3179
+ | filter1 | | filter 1 | &nbsp; |
3180
+ | filter2 | | filter 2 | &nbsp; |
3235
3181
 
3236
3182
 
3237
3183
 
@@ -3239,17 +3185,17 @@ Returns a filter builder config object by a any given config
3239
3185
  ##### Returns
3240
3186
 
3241
3187
 
3242
- - The filter builder config object
3188
+ - true: the filters are equal; false: the filters are NOT equal
3243
3189
 
3244
3190
 
3245
3191
 
3246
3192
 
3247
- ### dist/filters/helpers/ui/excludeUIFiltersByAggregate.js
3193
+ ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3248
3194
 
3249
3195
 
3250
- #### excludeUIFiltersByAggregate(uFilters)
3196
+ #### excludeFiltersByAggregateColumn(filterData)
3251
3197
 
3252
- Excludes Aggregate Filters in the Flattened UI Filters array
3198
+ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3253
3199
 
3254
3200
 
3255
3201
 
@@ -3258,7 +3204,7 @@ Excludes Aggregate Filters in the Flattened UI Filters array
3258
3204
 
3259
3205
  | Name | Type | Description | |
3260
3206
  | ---- | ---- | ----------- | -------- |
3261
- | uFilters | | Collection of Flat UI Filters | &nbsp; |
3207
+ | filterData | | The filter data object | &nbsp; |
3262
3208
 
3263
3209
 
3264
3210
 
@@ -3266,17 +3212,26 @@ Excludes Aggregate Filters in the Flattened UI Filters array
3266
3212
  ##### Returns
3267
3213
 
3268
3214
 
3269
- - a new Flat UI Filters that were excluded the aggregate filters
3215
+ - The new filter data object that were excluded the aggregate filters
3270
3216
 
3271
3217
 
3272
3218
 
3273
3219
 
3274
- ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
3220
+ ### dist/filters/helpers/common/excludeFiltersByParams.js
3275
3221
 
3276
3222
 
3277
- #### excludeUIFlatFiltersByScopes(uFilters, scopes)
3223
+ #### excludeFiltersByParams(filterData, params)
3278
3224
 
3279
- Excludes and returns a UI Flat Filters without filters by the given scopes
3225
+ Excludes filters from the given Filters.
3226
+ The validation to filter the stored filter is depending on:
3227
+ - Column
3228
+ - Qrvey ID
3229
+ - Scope type
3230
+ - Scope ID
3231
+ - Panel ID
3232
+ - Validator type
3233
+ - Property type
3234
+ - Enabled flags
3280
3235
 
3281
3236
 
3282
3237
 
@@ -3285,8 +3240,8 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
3285
3240
 
3286
3241
  | Name | Type | Description | |
3287
3242
  | ---- | ---- | ----------- | -------- |
3288
- | uFilters | | The Flatten UI Filters | &nbsp; |
3289
- | scopes | | collection of scopes types | &nbsp; |
3243
+ | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3244
+ | params | | given parameters to validate the filter data | &nbsp; |
3290
3245
 
3291
3246
 
3292
3247
 
@@ -3294,17 +3249,17 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
3294
3249
  ##### Returns
3295
3250
 
3296
3251
 
3297
- - The new array of UI Flattened filters
3252
+ - a new Filter object structure
3298
3253
 
3299
3254
 
3300
3255
 
3301
3256
 
3302
- ### dist/filters/helpers/ui/getFilterPropertyLabel.js
3257
+ ### dist/filters/helpers/common/excludeFiltersByScopes.js
3303
3258
 
3304
3259
 
3305
- #### getFilterPropertyLabel(filter)
3260
+ #### excludeFiltersByScopes(filterData, scopes)
3306
3261
 
3307
- Gets the label of the filter property
3262
+ Excludes and returns a filter data without filters by the given scopes
3308
3263
 
3309
3264
 
3310
3265
 
@@ -3313,7 +3268,62 @@ Gets the label of the filter property
3313
3268
 
3314
3269
  | Name | Type | Description | |
3315
3270
  | ---- | ---- | ----------- | -------- |
3316
- | filter | | The UI Filter | &nbsp; |
3271
+ | filterData | | The Filter Data | &nbsp; |
3272
+ | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
3273
+
3274
+
3275
+
3276
+
3277
+ ##### Returns
3278
+
3279
+
3280
+ - The new Filter Data without filters by the given scopes.
3281
+
3282
+
3283
+
3284
+
3285
+ ### dist/filters/helpers/common/getFilterColumnLabel.js
3286
+
3287
+
3288
+ #### getFilterColumnLabel(column)
3289
+
3290
+ Get an string of the properties of the given filter column.
3291
+
3292
+
3293
+
3294
+
3295
+ ##### Parameters
3296
+
3297
+ | Name | Type | Description | |
3298
+ | ---- | ---- | ----------- | -------- |
3299
+ | column | | The filter column | &nbsp; |
3300
+
3301
+
3302
+
3303
+
3304
+ ##### Returns
3305
+
3306
+
3307
+ - an string with the property, aggregate or calculation label.
3308
+
3309
+
3310
+
3311
+
3312
+ ### dist/filters/helpers/common/getFilterLabel.js
3313
+
3314
+
3315
+ #### getFilterLabel(filter)
3316
+
3317
+ Gets the Filter Label + Column label
3318
+
3319
+
3320
+
3321
+
3322
+ ##### Parameters
3323
+
3324
+ | Name | Type | Description | |
3325
+ | ---- | ---- | ----------- | -------- |
3326
+ | filter | | the UI filter | &nbsp; |
3317
3327
 
3318
3328
 
3319
3329
 
@@ -3321,17 +3331,28 @@ Gets the label of the filter property
3321
3331
  ##### Returns
3322
3332
 
3323
3333
 
3324
- - a string of the filter property label
3334
+ - a sring label
3325
3335
 
3326
3336
 
3327
3337
 
3328
3338
 
3329
- ### dist/filters/helpers/ui/getOutputFormatByColumn.js
3339
+ ### dist/filters/helpers/common/getFilterid.js
3330
3340
 
3331
3341
 
3332
- #### getOutputFormatByColumn(column, datasets)
3342
+ #### getFilterid(filter)
3333
3343
 
3334
- Gets output format object from Datasets by the given column. Item of the datasets array must have outputformat item in order to be returned
3344
+ Get the Filter ID by the filter structure
3345
+ The order of the epression ID is:
3346
+ - Scope Type
3347
+ - scopeid
3348
+ - qrveyid
3349
+ - panelid
3350
+ - columnid
3351
+ - validator
3352
+ - property
3353
+ - Column Aggregate
3354
+ - Column Calculation
3355
+ - Optional Index
3335
3356
 
3336
3357
 
3337
3358
 
@@ -3340,8 +3361,7 @@ Gets output format object from Datasets by the given column. Item of the dataset
3340
3361
 
3341
3362
  | Name | Type | Description | |
3342
3363
  | ---- | ---- | ----------- | -------- |
3343
- | column | | The column | &nbsp; |
3344
- | datasets | | array of datasets | &nbsp; |
3364
+ | filter | | the filter structure | &nbsp; |
3345
3365
 
3346
3366
 
3347
3367
 
@@ -3349,27 +3369,26 @@ Gets output format object from Datasets by the given column. Item of the dataset
3349
3369
  ##### Returns
3350
3370
 
3351
3371
 
3352
- - The output format object
3372
+ - a text to identify the filter
3353
3373
 
3354
3374
 
3355
3375
 
3356
3376
 
3357
- ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
3377
+ ### dist/filters/helpers/common/getFiltersByAggregateColumn.js
3358
3378
 
3359
3379
 
3360
- #### getUIFlatFilterByParams()
3380
+ #### getFiltersByAggregateColumn(filterData)
3381
+
3382
+ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggregate is included.
3383
+
3361
3384
 
3362
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
3363
- The validation to filter the stored filter is depending on:
3364
- - Column
3365
- - Qrvey ID,
3366
- - Scope type
3367
- - Scope ID
3368
- - Panel ID
3369
- - Validator type
3370
- - Property type
3371
3385
 
3372
3386
 
3387
+ ##### Parameters
3388
+
3389
+ | Name | Type | Description | |
3390
+ | ---- | ---- | ----------- | -------- |
3391
+ | filterData | | The filter data object | &nbsp; |
3373
3392
 
3374
3393
 
3375
3394
 
@@ -3377,20 +3396,20 @@ The validation to filter the stored filter is depending on:
3377
3396
  ##### Returns
3378
3397
 
3379
3398
 
3380
- - The index of the uFilter array or the Filter object s
3399
+ - The new filter data object that were get the aggregate filters
3381
3400
 
3382
3401
 
3383
3402
 
3384
3403
 
3385
- ### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
3404
+ ### dist/filters/helpers/common/getFiltersByParams.js
3386
3405
 
3387
3406
 
3388
- #### getUIFlatFiltersByParams()
3407
+ #### getFiltersByParams(filterData, params)
3389
3408
 
3390
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
3409
+ Gets filters from the given params.
3391
3410
  The validation to filter the stored filter is depending on:
3392
3411
  - Column
3393
- - Qrvey ID,
3412
+ - Qrvey ID
3394
3413
  - Scope type
3395
3414
  - Scope ID
3396
3415
  - Panel ID
@@ -3401,22 +3420,30 @@ The validation to filter the stored filter is depending on:
3401
3420
 
3402
3421
 
3403
3422
 
3423
+ ##### Parameters
3424
+
3425
+ | Name | Type | Description | |
3426
+ | ---- | ---- | ----------- | -------- |
3427
+ | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3428
+ | params | | given parameters to validate the dataset | &nbsp; |
3429
+
3430
+
3404
3431
 
3405
3432
 
3406
3433
  ##### Returns
3407
3434
 
3408
3435
 
3409
- - The index of the uFilter array or the Filter object s
3436
+ - a new Filter object structure
3410
3437
 
3411
3438
 
3412
3439
 
3413
3440
 
3414
- ### dist/filters/helpers/ui/getUIFlatFiltersByScopes.js
3441
+ ### dist/filters/helpers/common/getFiltersByScopes.js
3415
3442
 
3416
3443
 
3417
- #### getUIFlatFiltersByScopes(uFilters, scopes)
3444
+ #### getFiltersByScopes(filterData, scopes)
3418
3445
 
3419
- Filters and gets a UI Flatten Filters by the given scopes
3446
+ Filters and gets a Filter Data by the given scopes
3420
3447
 
3421
3448
 
3422
3449
 
@@ -3425,7 +3452,7 @@ Filters and gets a UI Flatten Filters by the given scopes
3425
3452
 
3426
3453
  | Name | Type | Description | |
3427
3454
  | ---- | ---- | ----------- | -------- |
3428
- | uFilters | | The Flatten UI Filters | &nbsp; |
3455
+ | filterData | | The Filter Data | &nbsp; |
3429
3456
  | scopes | | collection of scopes types | &nbsp; |
3430
3457
 
3431
3458
 
@@ -3434,17 +3461,17 @@ Filters and gets a UI Flatten Filters by the given scopes
3434
3461
  ##### Returns
3435
3462
 
3436
3463
 
3437
- - The new array of UI Flattened filters
3438
-
3464
+ - The new Filter Data
3439
3465
 
3440
3466
 
3441
3467
 
3442
- ### dist/filters/helpers/ui/getUIValues.js
3443
3468
 
3469
+ ### dist/filters/helpers/common/getFiltersByScopesIds.js
3444
3470
 
3445
- #### getUIValues(filter, addEnableds, rankingGroupIndex)
3446
3471
 
3472
+ #### getFiltersByScopesIds(filterData, scopes)
3447
3473
 
3474
+ Gets filters from Filter Data by Scopes/Scope IDs.
3448
3475
 
3449
3476
 
3450
3477
 
@@ -3453,9 +3480,8 @@ Filters and gets a UI Flatten Filters by the given scopes
3453
3480
 
3454
3481
  | Name | Type | Description | |
3455
3482
  | ---- | ---- | ----------- | -------- |
3456
- | filter | | | &nbsp; |
3457
- | addEnableds | | | &nbsp; |
3458
- | rankingGroupIndex | | | &nbsp; |
3483
+ | filterData | | The filter data | &nbsp; |
3484
+ | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3459
3485
 
3460
3486
 
3461
3487
 
@@ -3463,17 +3489,17 @@ Filters and gets a UI Flatten Filters by the given scopes
3463
3489
  ##### Returns
3464
3490
 
3465
3491
 
3466
- -
3492
+ - a new Filter Data
3467
3493
 
3468
3494
 
3469
3495
 
3470
3496
 
3471
- ### dist/filters/helpers/ui/resolveUIFlatFiltersByParams.js
3497
+ ### dist/filters/helpers/common/getFiltersByVisibility.js
3472
3498
 
3473
3499
 
3474
- #### resolveUIFlatFilterByParams(filter, params)
3500
+ #### getFiltersByVisibility(filterData, scopes)
3475
3501
 
3476
- Resolves conditions between UI flattened filter and given parameters
3502
+ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3477
3503
 
3478
3504
 
3479
3505
 
@@ -3482,8 +3508,8 @@ Resolves conditions between UI flattened filter and given parameters
3482
3508
 
3483
3509
  | Name | Type | Description | |
3484
3510
  | ---- | ---- | ----------- | -------- |
3485
- | filter | | UI Flatten Filter | &nbsp; |
3486
- | params | | Parameters to validate | &nbsp; |
3511
+ | filterData | | a Filter Data or UI Filter Data | &nbsp; |
3512
+ | scopes | | a Scopes/Scope IDs array | &nbsp; |
3487
3513
 
3488
3514
 
3489
3515
 
@@ -3491,17 +3517,17 @@ Resolves conditions between UI flattened filter and given parameters
3491
3517
  ##### Returns
3492
3518
 
3493
3519
 
3494
- - true: the conditions are satisfied.
3520
+ - a new Filter Data
3495
3521
 
3496
3522
 
3497
3523
 
3498
3524
 
3499
- ### dist/filters/helpers/common/areFiltersEquals.js
3525
+ ### dist/filters/helpers/common/getMergeFiltersSettings.js
3500
3526
 
3501
3527
 
3502
- #### areFiltersEquals(filter1, filter2)
3528
+ #### getMergeFiltersSettings(settings)
3503
3529
 
3504
- Validates if both filters are the same
3530
+ Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
3505
3531
 
3506
3532
 
3507
3533
 
@@ -3510,8 +3536,7 @@ Validates if both filters are the same
3510
3536
 
3511
3537
  | Name | Type | Description | |
3512
3538
  | ---- | ---- | ----------- | -------- |
3513
- | filter1 | | filter 1 | &nbsp; |
3514
- | filter2 | | filter 2 | &nbsp; |
3539
+ | settings | | an object to the MergeFilters settings | &nbsp; |
3515
3540
 
3516
3541
 
3517
3542
 
@@ -3519,17 +3544,17 @@ Validates if both filters are the same
3519
3544
  ##### Returns
3520
3545
 
3521
3546
 
3522
- - true: the filters are equal; false: the filters are NOT equal
3547
+ - a new MergeFilters settings object.
3523
3548
 
3524
3549
 
3525
3550
 
3526
3551
 
3527
- ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3552
+ ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3528
3553
 
3529
3554
 
3530
- #### excludeFiltersByAggregateColumn(filterData)
3555
+ #### getParamsToGetFilterSettings(settings)
3531
3556
 
3532
- Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3557
+ Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3533
3558
 
3534
3559
 
3535
3560
 
@@ -3538,7 +3563,7 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3538
3563
 
3539
3564
  | Name | Type | Description | |
3540
3565
  | ---- | ---- | ----------- | -------- |
3541
- | filterData | | The filter data object | &nbsp; |
3566
+ | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
3542
3567
 
3543
3568
 
3544
3569
 
@@ -3546,26 +3571,17 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3546
3571
  ##### Returns
3547
3572
 
3548
3573
 
3549
- - The new filter data object that were excluded the aggregate filters
3574
+ - a new ParamsToGetFilter settings object.
3550
3575
 
3551
3576
 
3552
3577
 
3553
3578
 
3554
- ### dist/filters/helpers/common/excludeFiltersByParams.js
3579
+ ### dist/filters/helpers/common/haveFiltersByDataset.js
3555
3580
 
3556
3581
 
3557
- #### excludeFiltersByParams(filterData, params)
3582
+ #### haveFiltersByDataset(filterData, qrveyid)
3558
3583
 
3559
- Excludes filters from the given Filters.
3560
- The validation to filter the stored filter is depending on:
3561
- - Column
3562
- - Qrvey ID
3563
- - Scope type
3564
- - Scope ID
3565
- - Panel ID
3566
- - Validator type
3567
- - Property type
3568
- - Enabled flags
3584
+ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3569
3585
 
3570
3586
 
3571
3587
 
@@ -3574,8 +3590,8 @@ The validation to filter the stored filter is depending on:
3574
3590
 
3575
3591
  | Name | Type | Description | |
3576
3592
  | ---- | ---- | ----------- | -------- |
3577
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3578
- | params | | given parameters to validate the filter data | &nbsp; |
3593
+ | filterData | | the filter data or the UI filter data. | &nbsp; |
3594
+ | qrveyid | | The Qrvey ID | &nbsp; |
3579
3595
 
3580
3596
 
3581
3597
 
@@ -3583,17 +3599,17 @@ The validation to filter the stored filter is depending on:
3583
3599
  ##### Returns
3584
3600
 
3585
3601
 
3586
- - a new Filter object structure
3602
+ - true: the filter data has filters by the Qrvey ID
3587
3603
 
3588
3604
 
3589
3605
 
3590
3606
 
3591
- ### dist/filters/helpers/common/excludeFiltersByScopes.js
3607
+ ### dist/filters/helpers/common/isBetweenValidator.js
3592
3608
 
3593
3609
 
3594
- #### excludeFiltersByScopes(filterData, scopes)
3610
+ #### isBetweenValidator(validator)
3595
3611
 
3596
- Excludes and returns a filter data without filters by the given scopes
3612
+ Validates if the given validator is a Between type
3597
3613
 
3598
3614
 
3599
3615
 
@@ -3602,8 +3618,7 @@ Excludes and returns a filter data without filters by the given scopes
3602
3618
 
3603
3619
  | Name | Type | Description | |
3604
3620
  | ---- | ---- | ----------- | -------- |
3605
- | filterData | | The Filter Data | &nbsp; |
3606
- | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
3621
+ | validator | | The validator | &nbsp; |
3607
3622
 
3608
3623
 
3609
3624
 
@@ -3611,17 +3626,17 @@ Excludes and returns a filter data without filters by the given scopes
3611
3626
  ##### Returns
3612
3627
 
3613
3628
 
3614
- - The new Filter Data without filters by the given scopes.
3629
+ - true: it is a between validator; false: it is not a between validator
3615
3630
 
3616
3631
 
3617
3632
 
3618
3633
 
3619
- ### dist/filters/helpers/common/getFilterLabel.js
3634
+ ### dist/filters/helpers/common/isDateDistinctProperty.js
3620
3635
 
3621
3636
 
3622
- #### getFilterLabel(filter)
3637
+ #### isDateDistinctProperty(column, property)
3623
3638
 
3624
- Gets the Filter Label + Column label
3639
+ Determines if the filter column and property is a distinct group dates type
3625
3640
 
3626
3641
 
3627
3642
 
@@ -3630,7 +3645,8 @@ Gets the Filter Label + Column label
3630
3645
 
3631
3646
  | Name | Type | Description | |
3632
3647
  | ---- | ---- | ----------- | -------- |
3633
- | filter | | the UI filter | &nbsp; |
3648
+ | column | | The filter column | &nbsp; |
3649
+ | property | | The filter property | &nbsp; |
3634
3650
 
3635
3651
 
3636
3652
 
@@ -3638,17 +3654,17 @@ Gets the Filter Label + Column label
3638
3654
  ##### Returns
3639
3655
 
3640
3656
 
3641
- - a sring label
3657
+ - True if the given property is included from distinct group dates type
3642
3658
 
3643
3659
 
3644
3660
 
3645
3661
 
3646
- ### dist/filters/helpers/common/getFilterColumnLabel.js
3662
+ ### dist/filters/helpers/common/isInValidator.js
3647
3663
 
3648
3664
 
3649
- #### getFilterColumnLabel(column)
3665
+ #### isInValidator(validator)
3650
3666
 
3651
- Get an string of the properties of the given filter column.
3667
+ Validates if the given validator is a In type
3652
3668
 
3653
3669
 
3654
3670
 
@@ -3657,7 +3673,7 @@ Get an string of the properties of the given filter column.
3657
3673
 
3658
3674
  | Name | Type | Description | |
3659
3675
  | ---- | ---- | ----------- | -------- |
3660
- | column | | The filter column | &nbsp; |
3676
+ | validator | | The validator | &nbsp; |
3661
3677
 
3662
3678
 
3663
3679
 
@@ -3665,28 +3681,17 @@ Get an string of the properties of the given filter column.
3665
3681
  ##### Returns
3666
3682
 
3667
3683
 
3668
- - an string with the property, aggregate or calculation label.
3684
+ - true: it is a In validator; false: it is not a In validator
3669
3685
 
3670
3686
 
3671
3687
 
3672
3688
 
3673
- ### dist/filters/helpers/common/getFilterid.js
3689
+ ### dist/filters/helpers/common/isNullValidator.js
3674
3690
 
3675
3691
 
3676
- #### getFilterid(filter)
3692
+ #### isNullValidator(validator)
3677
3693
 
3678
- Get the Filter ID by the filter structure
3679
- The order of the epression ID is:
3680
- - Scope Type
3681
- - scopeid
3682
- - qrveyid
3683
- - panelid
3684
- - columnid
3685
- - validator
3686
- - property
3687
- - Column Aggregate
3688
- - Column Calculation
3689
- - Optional Index
3694
+ Checks if the given validator is a Null type.
3690
3695
 
3691
3696
 
3692
3697
 
@@ -3695,7 +3700,7 @@ The order of the epression ID is:
3695
3700
 
3696
3701
  | Name | Type | Description | |
3697
3702
  | ---- | ---- | ----------- | -------- |
3698
- | filter | | the filter structure | &nbsp; |
3703
+ | validator | | The Filter Validator | &nbsp; |
3699
3704
 
3700
3705
 
3701
3706
 
@@ -3703,17 +3708,17 @@ The order of the epression ID is:
3703
3708
  ##### Returns
3704
3709
 
3705
3710
 
3706
- - a text to identify the filter
3711
+ - True: It is a Null Validator; False: It is not a Null Validator.
3707
3712
 
3708
3713
 
3709
3714
 
3710
3715
 
3711
- ### dist/filters/helpers/common/getFiltersByAggregateColumn.js
3716
+ ### dist/filters/helpers/common/isRangeValidator.js
3712
3717
 
3713
3718
 
3714
- #### getFiltersByAggregateColumn(filterData)
3719
+ #### isRangeValidator(validator)
3715
3720
 
3716
- Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggregate is included.
3721
+ Validates if the given validator is a Range type. Range type means the value has min and max values to filter
3717
3722
 
3718
3723
 
3719
3724
 
@@ -3722,7 +3727,7 @@ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggr
3722
3727
 
3723
3728
  | Name | Type | Description | |
3724
3729
  | ---- | ---- | ----------- | -------- |
3725
- | filterData | | The filter data object | &nbsp; |
3730
+ | validator | | The filter validator | &nbsp; |
3726
3731
 
3727
3732
 
3728
3733
 
@@ -3730,26 +3735,17 @@ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggr
3730
3735
  ##### Returns
3731
3736
 
3732
3737
 
3733
- - The new filter data object that were get the aggregate filters
3738
+ - true: it is a range validator
3734
3739
 
3735
3740
 
3736
3741
 
3737
3742
 
3738
- ### dist/filters/helpers/common/getFiltersByParams.js
3743
+ ### dist/filters/helpers/common/isRegularValidator.js
3739
3744
 
3740
3745
 
3741
- #### getFiltersByParams(filterData, params)
3746
+ #### isRegularValidator(validator)
3742
3747
 
3743
- Gets filters from the given params.
3744
- The validation to filter the stored filter is depending on:
3745
- - Column
3746
- - Qrvey ID
3747
- - Scope type
3748
- - Scope ID
3749
- - Panel ID
3750
- - Validator type
3751
- - Property type
3752
- - Enabled flags
3748
+ Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
3753
3749
 
3754
3750
 
3755
3751
 
@@ -3758,8 +3754,7 @@ The validation to filter the stored filter is depending on:
3758
3754
 
3759
3755
  | Name | Type | Description | |
3760
3756
  | ---- | ---- | ----------- | -------- |
3761
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3762
- | params | | given parameters to validate the dataset | &nbsp; |
3757
+ | validator | | The filter validator | &nbsp; |
3763
3758
 
3764
3759
 
3765
3760
 
@@ -3767,17 +3762,17 @@ The validation to filter the stored filter is depending on:
3767
3762
  ##### Returns
3768
3763
 
3769
3764
 
3770
- - a new Filter object structure
3765
+ - true: it is a range validator
3771
3766
 
3772
3767
 
3773
3768
 
3774
3769
 
3775
- ### dist/filters/helpers/common/getFiltersByScopes.js
3770
+ ### dist/filters/helpers/common/mergeFilters.js
3776
3771
 
3777
3772
 
3778
- #### getFiltersByScopes(filterData, scopes)
3773
+ #### mergeFilters(filterData1, filterData2, overwriteValues)
3779
3774
 
3780
- Filters and gets a Filter Data by the given scopes
3775
+ Merge filter data structures in a new one. The first Filter Data passed in the argument has the priority
3781
3776
 
3782
3777
 
3783
3778
 
@@ -3786,8 +3781,9 @@ Filters and gets a Filter Data by the given scopes
3786
3781
 
3787
3782
  | Name | Type | Description | |
3788
3783
  | ---- | ---- | ----------- | -------- |
3789
- | filterData | | The Filter Data | &nbsp; |
3790
- | scopes | | collection of scopes types | &nbsp; |
3784
+ | filterData1 | | The target filter data | &nbsp; |
3785
+ | filterData2 | | the filter data to be merged | &nbsp; |
3786
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3791
3787
 
3792
3788
 
3793
3789
 
@@ -3795,17 +3791,13 @@ Filters and gets a Filter Data by the given scopes
3795
3791
  ##### Returns
3796
3792
 
3797
3793
 
3798
- - The new Filter Data
3799
-
3800
-
3801
-
3794
+ - a new filter data structure
3802
3795
 
3803
- ### dist/filters/helpers/common/getFiltersByScopesIds.js
3804
3796
 
3805
3797
 
3806
- #### getFiltersByScopesIds(filterData, scopes)
3798
+ #### mergeScopes(scopes1, scopes2, overwriteValues)
3807
3799
 
3808
- Gets filters from Filter Data by Scopes/Scope IDs.
3800
+ Gets a new scope structure array by merging two scope structures
3809
3801
 
3810
3802
 
3811
3803
 
@@ -3814,26 +3806,23 @@ Gets filters from Filter Data by Scopes/Scope IDs.
3814
3806
 
3815
3807
  | Name | Type | Description | |
3816
3808
  | ---- | ---- | ----------- | -------- |
3817
- | filterData | | The filter data | &nbsp; |
3818
- | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3819
-
3820
-
3821
-
3809
+ | scopes1 | | the target scope structure | &nbsp; |
3810
+ | scopes2 | | the scope to be merged | &nbsp; |
3811
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3822
3812
 
3823
- ##### Returns
3824
3813
 
3825
3814
 
3826
- - a new Filter Data
3827
3815
 
3816
+ ##### Returns
3828
3817
 
3829
3818
 
3819
+ - a new scope structure array
3830
3820
 
3831
- ### dist/filters/helpers/common/getFiltersByVisibility.js
3832
3821
 
3833
3822
 
3834
- #### getFiltersByVisibility(filterData, scopes)
3823
+ #### mergeDatasets(datasets1, datasets2, overwriteValues)
3835
3824
 
3836
- Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3825
+ Gets a new dataset structure array by merging two dataset structures
3837
3826
 
3838
3827
 
3839
3828
 
@@ -3842,8 +3831,9 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3842
3831
 
3843
3832
  | Name | Type | Description | |
3844
3833
  | ---- | ---- | ----------- | -------- |
3845
- | filterData | | a Filter Data or UI Filter Data | &nbsp; |
3846
- | scopes | | a Scopes/Scope IDs array | &nbsp; |
3834
+ | datasets1 | | the target dataset structure | &nbsp; |
3835
+ | datasets2 | | the dataset to be merged | &nbsp; |
3836
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3847
3837
 
3848
3838
 
3849
3839
 
@@ -3851,17 +3841,13 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3851
3841
  ##### Returns
3852
3842
 
3853
3843
 
3854
- - a new Filter Data
3855
-
3856
-
3857
-
3844
+ - a new dataset structure array
3858
3845
 
3859
- ### dist/filters/helpers/common/getMergeFiltersSettings.js
3860
3846
 
3861
3847
 
3862
- #### getMergeFiltersSettings(settings)
3848
+ #### mergeFilterss(filters1, filters2, overwriteValues)
3863
3849
 
3864
- Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
3850
+ Gets a new filter structure array by merging two filter structures
3865
3851
 
3866
3852
 
3867
3853
 
@@ -3870,7 +3856,9 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
3870
3856
 
3871
3857
  | Name | Type | Description | |
3872
3858
  | ---- | ---- | ----------- | -------- |
3873
- | settings | | an object to the MergeFilters settings | &nbsp; |
3859
+ | filters1 | | the target filter structure | &nbsp; |
3860
+ | filters2 | | the filter to be merged | &nbsp; |
3861
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3874
3862
 
3875
3863
 
3876
3864
 
@@ -3878,17 +3866,13 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
3878
3866
  ##### Returns
3879
3867
 
3880
3868
 
3881
- - a new MergeFilters settings object.
3882
-
3883
-
3884
-
3869
+ - a new filter structure array
3885
3870
 
3886
- ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3887
3871
 
3888
3872
 
3889
- #### getParamsToGetFilterSettings(settings)
3873
+ #### mergeValues(filter1, filter2, overwrite)
3890
3874
 
3891
- Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3875
+ Gets a new value structure array by merging two value structures
3892
3876
 
3893
3877
 
3894
3878
 
@@ -3897,7 +3881,9 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
3897
3881
 
3898
3882
  | Name | Type | Description | |
3899
3883
  | ---- | ---- | ----------- | -------- |
3900
- | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
3884
+ | filter1 | | the target filter structure | &nbsp; |
3885
+ | filter2 | | the filter to be used to merge the values | &nbsp; |
3886
+ | overwrite | | Flag to overwrite or not the filter values | &nbsp; |
3901
3887
 
3902
3888
 
3903
3889
 
@@ -3905,17 +3891,17 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
3905
3891
  ##### Returns
3906
3892
 
3907
3893
 
3908
- - a new ParamsToGetFilter settings object.
3894
+ - a new value structure array
3909
3895
 
3910
3896
 
3911
3897
 
3912
3898
 
3913
- ### dist/filters/helpers/common/haveFiltersByDataset.js
3899
+ ### dist/filters/helpers/common/resolveDatasetConditions.js
3914
3900
 
3915
3901
 
3916
- #### haveFiltersByDataset(filterData, qrveyid)
3902
+ #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3917
3903
 
3918
- Validates if the filter data has filters by a dataset ID (Qrvey ID).
3904
+ Resolves the conditions by given params
3919
3905
 
3920
3906
 
3921
3907
 
@@ -3924,8 +3910,10 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3924
3910
 
3925
3911
  | Name | Type | Description | |
3926
3912
  | ---- | ---- | ----------- | -------- |
3927
- | filterData | | the filter data or the UI filter data. | &nbsp; |
3928
- | qrveyid | | The Qrvey ID | &nbsp; |
3913
+ | filter | | The dataset structure | &nbsp; |
3914
+ | params | | given parameters to validate the dataset | &nbsp; |
3915
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3916
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3929
3917
 
3930
3918
 
3931
3919
 
@@ -3933,17 +3921,17 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3933
3921
  ##### Returns
3934
3922
 
3935
3923
 
3936
- - true: the filter data has filters by the Qrvey ID
3924
+ - true: the condition is satisfied
3937
3925
 
3938
3926
 
3939
3927
 
3940
3928
 
3941
- ### dist/filters/helpers/common/isBetweenValidator.js
3929
+ ### dist/filters/helpers/common/resolveFilterConditions.js
3942
3930
 
3943
3931
 
3944
- #### isBetweenValidator(validator)
3932
+ #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3945
3933
 
3946
- Validates if the given validator is a Between type
3934
+ Resolves the conditions by given params
3947
3935
 
3948
3936
 
3949
3937
 
@@ -3952,7 +3940,10 @@ Validates if the given validator is a Between type
3952
3940
 
3953
3941
  | Name | Type | Description | |
3954
3942
  | ---- | ---- | ----------- | -------- |
3955
- | validator | | The validator | &nbsp; |
3943
+ | filter | | The filter | &nbsp; |
3944
+ | params | | given parameters to validate the filter | &nbsp; |
3945
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3946
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3956
3947
 
3957
3948
 
3958
3949
 
@@ -3960,17 +3951,17 @@ Validates if the given validator is a Between type
3960
3951
  ##### Returns
3961
3952
 
3962
3953
 
3963
- - true: it is a between validator; false: it is not a between validator
3954
+ - true: the condition is satisfied
3964
3955
 
3965
3956
 
3966
3957
 
3967
3958
 
3968
- ### dist/filters/helpers/common/isDateDistinctProperty.js
3959
+ ### dist/filters/helpers/common/resolveScopeConditions.js
3969
3960
 
3970
3961
 
3971
- #### isDateDistinctProperty(column, property)
3962
+ #### resolveScopeConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3972
3963
 
3973
- Determines if the filter column and property is a distinct group dates type
3964
+ Resolves the conditions by given params
3974
3965
 
3975
3966
 
3976
3967
 
@@ -3979,8 +3970,10 @@ Determines if the filter column and property is a distinct group dates type
3979
3970
 
3980
3971
  | Name | Type | Description | |
3981
3972
  | ---- | ---- | ----------- | -------- |
3982
- | column | | The filter column | &nbsp; |
3983
- | property | | The filter property | &nbsp; |
3973
+ | filter | | The filter scope structure | &nbsp; |
3974
+ | params | | given parameters to validate the filter | &nbsp; |
3975
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3976
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3984
3977
 
3985
3978
 
3986
3979
 
@@ -3988,17 +3981,17 @@ Determines if the filter column and property is a distinct group dates type
3988
3981
  ##### Returns
3989
3982
 
3990
3983
 
3991
- - True if the given property is included from distinct group dates type
3984
+ - true: the condition is satisfied
3992
3985
 
3993
3986
 
3994
3987
 
3995
3988
 
3996
- ### dist/filters/helpers/common/isInValidator.js
3989
+ ### dist/filters/helpers/ui/excludeUIFiltersByAggregate.js
3997
3990
 
3998
3991
 
3999
- #### isInValidator(validator)
3992
+ #### excludeUIFiltersByAggregate(uFilters)
4000
3993
 
4001
- Validates if the given validator is a In type
3994
+ Excludes Aggregate Filters in the Flattened UI Filters array
4002
3995
 
4003
3996
 
4004
3997
 
@@ -4007,7 +4000,7 @@ Validates if the given validator is a In type
4007
4000
 
4008
4001
  | Name | Type | Description | |
4009
4002
  | ---- | ---- | ----------- | -------- |
4010
- | validator | | The validator | &nbsp; |
4003
+ | uFilters | | Collection of Flat UI Filters | &nbsp; |
4011
4004
 
4012
4005
 
4013
4006
 
@@ -4015,17 +4008,17 @@ Validates if the given validator is a In type
4015
4008
  ##### Returns
4016
4009
 
4017
4010
 
4018
- - true: it is a In validator; false: it is not a In validator
4011
+ - a new Flat UI Filters that were excluded the aggregate filters
4019
4012
 
4020
4013
 
4021
4014
 
4022
4015
 
4023
- ### dist/filters/helpers/common/isNullValidator.js
4016
+ ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
4024
4017
 
4025
4018
 
4026
- #### isNullValidator(validator)
4019
+ #### excludeUIFlatFiltersByScopes(uFilters, scopes)
4027
4020
 
4028
- Checks if the given validator is a Null type.
4021
+ Excludes and returns a UI Flat Filters without filters by the given scopes
4029
4022
 
4030
4023
 
4031
4024
 
@@ -4034,7 +4027,8 @@ Checks if the given validator is a Null type.
4034
4027
 
4035
4028
  | Name | Type | Description | |
4036
4029
  | ---- | ---- | ----------- | -------- |
4037
- | validator | | The Filter Validator | &nbsp; |
4030
+ | uFilters | | The Flatten UI Filters | &nbsp; |
4031
+ | scopes | | collection of scopes types | &nbsp; |
4038
4032
 
4039
4033
 
4040
4034
 
@@ -4042,17 +4036,17 @@ Checks if the given validator is a Null type.
4042
4036
  ##### Returns
4043
4037
 
4044
4038
 
4045
- - True: It is a Null Validator; False: It is not a Null Validator.
4039
+ - The new array of UI Flattened filters
4046
4040
 
4047
4041
 
4048
4042
 
4049
4043
 
4050
- ### dist/filters/helpers/common/isRegularValidator.js
4044
+ ### dist/filters/helpers/ui/getFilterPropertyLabel.js
4051
4045
 
4052
4046
 
4053
- #### isRegularValidator(validator)
4047
+ #### getFilterPropertyLabel(filter)
4054
4048
 
4055
- Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
4049
+ Gets the label of the filter property
4056
4050
 
4057
4051
 
4058
4052
 
@@ -4061,7 +4055,7 @@ Validates if the given validator is a regular type. Regular type means the filte
4061
4055
 
4062
4056
  | Name | Type | Description | |
4063
4057
  | ---- | ---- | ----------- | -------- |
4064
- | validator | | The filter validator | &nbsp; |
4058
+ | filter | | The UI Filter | &nbsp; |
4065
4059
 
4066
4060
 
4067
4061
 
@@ -4069,17 +4063,17 @@ Validates if the given validator is a regular type. Regular type means the filte
4069
4063
  ##### Returns
4070
4064
 
4071
4065
 
4072
- - true: it is a range validator
4066
+ - a string of the filter property label
4073
4067
 
4074
4068
 
4075
4069
 
4076
4070
 
4077
- ### dist/filters/helpers/common/isRangeValidator.js
4071
+ ### dist/filters/helpers/ui/getOutputFormatByColumn.js
4078
4072
 
4079
4073
 
4080
- #### isRangeValidator(validator)
4074
+ #### getOutputFormatByColumn(column, datasets)
4081
4075
 
4082
- Validates if the given validator is a Range type. Range type means the value has min and max values to filter
4076
+ Gets output format object from Datasets by the given column. Item of the datasets array must have outputformat item in order to be returned
4083
4077
 
4084
4078
 
4085
4079
 
@@ -4088,7 +4082,8 @@ Validates if the given validator is a Range type. Range type means the value has
4088
4082
 
4089
4083
  | Name | Type | Description | |
4090
4084
  | ---- | ---- | ----------- | -------- |
4091
- | validator | | The filter validator | &nbsp; |
4085
+ | column | | The column | &nbsp; |
4086
+ | datasets | | array of datasets | &nbsp; |
4092
4087
 
4093
4088
 
4094
4089
 
@@ -4096,67 +4091,74 @@ Validates if the given validator is a Range type. Range type means the value has
4096
4091
  ##### Returns
4097
4092
 
4098
4093
 
4099
- - true: it is a range validator
4094
+ - The output format object
4100
4095
 
4101
4096
 
4102
4097
 
4103
4098
 
4104
- ### dist/filters/helpers/common/mergeFilters.js
4099
+ ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
4105
4100
 
4106
4101
 
4107
- #### mergeFilters(filterData1, filterData2, overwriteValues)
4102
+ #### getUIFlatFilterByParams()
4108
4103
 
4109
- Merge filter data structures in a new one. The first Filter Data passed in the argument has the priority
4104
+ Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4105
+ The validation to filter the stored filter is depending on:
4106
+ - Column
4107
+ - Qrvey ID,
4108
+ - Scope type
4109
+ - Scope ID
4110
+ - Panel ID
4111
+ - Validator type
4112
+ - Property type
4110
4113
 
4111
4114
 
4112
4115
 
4113
4116
 
4114
- ##### Parameters
4115
4117
 
4116
- | Name | Type | Description | |
4117
- | ---- | ---- | ----------- | -------- |
4118
- | filterData1 | | The target filter data | &nbsp; |
4119
- | filterData2 | | the filter data to be merged | &nbsp; |
4120
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4121
4118
 
4119
+ ##### Returns
4122
4120
 
4123
4121
 
4122
+ - The index of the uFilter array or the Filter object s
4124
4123
 
4125
- ##### Returns
4126
4124
 
4127
4125
 
4128
- - a new filter data structure
4129
4126
 
4127
+ ### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
4130
4128
 
4131
4129
 
4132
- #### mergeScopes(scopes1, scopes2, overwriteValues)
4130
+ #### getUIFlatFiltersByParams()
4133
4131
 
4134
- Gets a new scope structure array by merging two scope structures
4132
+ Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4133
+ The validation to filter the stored filter is depending on:
4134
+ - Column
4135
+ - Qrvey ID,
4136
+ - Scope type
4137
+ - Scope ID
4138
+ - Panel ID
4139
+ - Validator type
4140
+ - Property type
4141
+ - Enabled flags
4135
4142
 
4136
4143
 
4137
4144
 
4138
4145
 
4139
- ##### Parameters
4140
4146
 
4141
- | Name | Type | Description | |
4142
- | ---- | ---- | ----------- | -------- |
4143
- | scopes1 | | the target scope structure | &nbsp; |
4144
- | scopes2 | | the scope to be merged | &nbsp; |
4145
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4146
4147
 
4148
+ ##### Returns
4147
4149
 
4148
4150
 
4151
+ - The index of the uFilter array or the Filter object s
4149
4152
 
4150
- ##### Returns
4151
4153
 
4152
4154
 
4153
- - a new scope structure array
4154
4155
 
4156
+ ### dist/filters/helpers/ui/getUIFlatFiltersByScopes.js
4155
4157
 
4156
4158
 
4157
- #### mergeDatasets(datasets1, datasets2, overwriteValues)
4159
+ #### getUIFlatFiltersByScopes(uFilters, scopes)
4158
4160
 
4159
- Gets a new dataset structure array by merging two dataset structures
4161
+ Filters and gets a UI Flatten Filters by the given scopes
4160
4162
 
4161
4163
 
4162
4164
 
@@ -4165,9 +4167,8 @@ Gets a new dataset structure array by merging two dataset structures
4165
4167
 
4166
4168
  | Name | Type | Description | |
4167
4169
  | ---- | ---- | ----------- | -------- |
4168
- | datasets1 | | the target dataset structure | &nbsp; |
4169
- | datasets2 | | the dataset to be merged | &nbsp; |
4170
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4170
+ | uFilters | | The Flatten UI Filters | &nbsp; |
4171
+ | scopes | | collection of scopes types | &nbsp; |
4171
4172
 
4172
4173
 
4173
4174
 
@@ -4175,13 +4176,17 @@ Gets a new dataset structure array by merging two dataset structures
4175
4176
  ##### Returns
4176
4177
 
4177
4178
 
4178
- - a new dataset structure array
4179
+ - The new array of UI Flattened filters
4179
4180
 
4180
4181
 
4181
4182
 
4182
- #### mergeFilterss(filters1, filters2, overwriteValues)
4183
4183
 
4184
- Gets a new filter structure array by merging two filter structures
4184
+ ### dist/filters/helpers/ui/getUIValues.js
4185
+
4186
+
4187
+ #### getUIValues(filter, addEnableds, rankingGroupIndex)
4188
+
4189
+
4185
4190
 
4186
4191
 
4187
4192
 
@@ -4190,9 +4195,9 @@ Gets a new filter structure array by merging two filter structures
4190
4195
 
4191
4196
  | Name | Type | Description | |
4192
4197
  | ---- | ---- | ----------- | -------- |
4193
- | filters1 | | the target filter structure | &nbsp; |
4194
- | filters2 | | the filter to be merged | &nbsp; |
4195
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4198
+ | filter | | | &nbsp; |
4199
+ | addEnableds | | | &nbsp; |
4200
+ | rankingGroupIndex | | | &nbsp; |
4196
4201
 
4197
4202
 
4198
4203
 
@@ -4200,13 +4205,17 @@ Gets a new filter structure array by merging two filter structures
4200
4205
  ##### Returns
4201
4206
 
4202
4207
 
4203
- - a new filter structure array
4208
+ -
4204
4209
 
4205
4210
 
4206
4211
 
4207
- #### mergeValues(filter1, filter2, overwrite)
4208
4212
 
4209
- Gets a new value structure array by merging two value structures
4213
+ ### dist/filters/helpers/ui/resolveUIFlatFiltersByParams.js
4214
+
4215
+
4216
+ #### resolveUIFlatFilterByParams(filter, params)
4217
+
4218
+ Resolves conditions between UI flattened filter and given parameters
4210
4219
 
4211
4220
 
4212
4221
 
@@ -4215,9 +4224,8 @@ Gets a new value structure array by merging two value structures
4215
4224
 
4216
4225
  | Name | Type | Description | |
4217
4226
  | ---- | ---- | ----------- | -------- |
4218
- | filter1 | | the target filter structure | &nbsp; |
4219
- | filter2 | | the filter to be used to merge the values | &nbsp; |
4220
- | overwrite | | Flag to overwrite or not the filter values | &nbsp; |
4227
+ | filter | | UI Flatten Filter | &nbsp; |
4228
+ | params | | Parameters to validate | &nbsp; |
4221
4229
 
4222
4230
 
4223
4231
 
@@ -4225,17 +4233,17 @@ Gets a new value structure array by merging two value structures
4225
4233
  ##### Returns
4226
4234
 
4227
4235
 
4228
- - a new value structure array
4236
+ - true: the conditions are satisfied.
4229
4237
 
4230
4238
 
4231
4239
 
4232
4240
 
4233
- ### dist/filters/helpers/common/resolveDatasetConditions.js
4241
+ ### dist/dates/relative/helpers/formatStatement.js
4234
4242
 
4235
4243
 
4236
- #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4244
+ #### formatStatement(statement)
4237
4245
 
4238
- Resolves the conditions by given params
4246
+ Build a proper relative date statement type
4239
4247
 
4240
4248
 
4241
4249
 
@@ -4244,10 +4252,7 @@ Resolves the conditions by given params
4244
4252
 
4245
4253
  | Name | Type | Description | |
4246
4254
  | ---- | ---- | ----------- | -------- |
4247
- | filter | | The dataset structure | &nbsp; |
4248
- | params | | given parameters to validate the dataset | &nbsp; |
4249
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4250
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4255
+ | statement | `RelativeStatement` | | &nbsp; |
4251
4256
 
4252
4257
 
4253
4258
 
@@ -4255,17 +4260,17 @@ Resolves the conditions by given params
4255
4260
  ##### Returns
4256
4261
 
4257
4262
 
4258
- - true: the condition is satisfied
4263
+ - `RelativeStatement`
4259
4264
 
4260
4265
 
4261
4266
 
4262
4267
 
4263
- ### dist/filters/helpers/common/resolveFilterConditions.js
4268
+ ### dist/dates/relative/helpers/parseDate.js
4264
4269
 
4265
4270
 
4266
- #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4271
+ #### parseDate(date)
4267
4272
 
4268
- Resolves the conditions by given params
4273
+ Parses a string date and returns a dayjs date
4269
4274
 
4270
4275
 
4271
4276
 
@@ -4274,10 +4279,7 @@ Resolves the conditions by given params
4274
4279
 
4275
4280
  | Name | Type | Description | |
4276
4281
  | ---- | ---- | ----------- | -------- |
4277
- | filter | | The filter | &nbsp; |
4278
- | params | | given parameters to validate the filter | &nbsp; |
4279
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4280
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4282
+ | date | `string` `Dayjs` `Date` | | &nbsp; |
4281
4283
 
4282
4284
 
4283
4285
 
@@ -4285,17 +4287,17 @@ Resolves the conditions by given params
4285
4287
  ##### Returns
4286
4288
 
4287
4289
 
4288
- - true: the condition is satisfied
4290
+ - `Dayjs` A dayjs date
4289
4291
 
4290
4292
 
4291
4293
 
4292
4294
 
4293
- ### dist/filters/helpers/common/resolveScopeConditions.js
4295
+ ### dist/dates/relative/helpers/getStatementCase.js
4294
4296
 
4295
4297
 
4296
- #### resolveScopeConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4298
+ #### getStatementCase(includeCurrent, isCalendarDate)
4297
4299
 
4298
- Resolves the conditions by given params
4300
+ Returns a number/constant that identifies a relative date case
4299
4301
 
4300
4302
 
4301
4303
 
@@ -4304,10 +4306,8 @@ Resolves the conditions by given params
4304
4306
 
4305
4307
  | Name | Type | Description | |
4306
4308
  | ---- | ---- | ----------- | -------- |
4307
- | filter | | The filter scope structure | &nbsp; |
4308
- | params | | given parameters to validate the filter | &nbsp; |
4309
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4310
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4309
+ | includeCurrent | `boolean` | | &nbsp; |
4310
+ | isCalendarDate | `boolean` | | &nbsp; |
4311
4311
 
4312
4312
 
4313
4313
 
@@ -4315,7 +4315,7 @@ Resolves the conditions by given params
4315
4315
  ##### Returns
4316
4316
 
4317
4317
 
4318
- - true: the condition is satisfied
4318
+ - `number`
4319
4319
 
4320
4320
 
4321
4321