@qrvey/utils 1.2.9-24 → 1.2.9-27

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-24*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-27*
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/FDToFlatUI.js
112
104
 
113
105
 
114
- #### monthYearToDate(monthYearDate, time)
106
+ #### FDToFlatUI(filterData, datasetsInfo)
115
107
 
116
- Transforms String Date from a [Month Year] format to Date object.
108
+ Generates a Flattened UI filter structure from Filter Data structure.
117
109
 
118
110
 
119
111
 
@@ -122,8 +114,8 @@ 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. |   |
118
+ | datasetsInfo | | Collection of datasets information |   |
127
119
 
128
120
 
129
121
 
@@ -131,17 +123,13 @@ Transforms String Date from a [Month Year] format to Date object.
131
123
  ##### Returns
132
124
 
133
125
 
134
- - The date object or the date in milliseconds
135
-
136
-
137
-
126
+ - a flattened UI filters array
138
127
 
139
- ### dist/dates/adapters/quarterYearToDate.js
140
128
 
141
129
 
142
- #### quarterYearToDate(quarterYearDate, time)
130
+ #### FD21ToFlatUI(scopes, datasetsInfo)
143
131
 
144
- Transforms String Date from a [Quarter Year] format to Date object.
132
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
145
133
 
146
134
 
147
135
 
@@ -150,8 +138,8 @@ Transforms String Date from a [Quarter Year] format to Date object.
150
138
 
151
139
  | Name | Type | Description | |
152
140
  | ---- | ---- | ----------- | -------- |
153
- | quarterYearDate | | String of [Quarter Year] date |   |
154
- | time | | Flag to parse the object date to milliseconds. |   |
141
+ | scopes | | The filter scope section |   |
142
+ | datasetsInfo | | Collection of datasets information |   |
155
143
 
156
144
 
157
145
 
@@ -159,17 +147,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
159
147
  ##### Returns
160
148
 
161
149
 
162
- - The date object or the date in milliseconds
150
+ - a flattened UI filters array
163
151
 
164
152
 
165
153
 
166
154
 
167
- ### dist/dates/adapters/weekYearToDate.js
155
+ ### dist/filters/adapters/FDToLogic.js
168
156
 
169
157
 
170
- #### weekYearToDate(date, time)
158
+ #### FDToLogic(filterData)
171
159
 
172
- Transforms String Date from a [Week Year] format to Date object.
160
+ Generates a Filter Logic structure from Filter Data structure.
173
161
 
174
162
 
175
163
 
@@ -178,8 +166,7 @@ Transforms String Date from a [Week Year] format to Date object.
178
166
 
179
167
  | Name | Type | Description | |
180
168
  | ---- | ---- | ----------- | -------- |
181
- | date | | String of [Week Year] date |   |
182
- | time | | Flag to parse the object date to milliseconds. |   |
169
+ | filterData | | The filter data object. |   |
183
170
 
184
171
 
185
172
 
@@ -187,17 +174,13 @@ Transforms String Date from a [Week Year] format to Date object.
187
174
  ##### Returns
188
175
 
189
176
 
190
- - The date object or the date in milliseconds
191
-
192
-
193
-
177
+ - a filter logic array
194
178
 
195
- ### dist/dates/adapters/yearToDate.js
196
179
 
197
180
 
198
- #### yearToDate(yearDate, time)
181
+ #### getLogicBodyFromFD21(filterData)
199
182
 
200
- Transforms String Date from a [Year] format to Date object.
183
+ Gets the logic body
201
184
 
202
185
 
203
186
 
@@ -206,8 +189,7 @@ Transforms String Date from a [Year] format to Date object.
206
189
 
207
190
  | Name | Type | Description | |
208
191
  | ---- | ---- | ----------- | -------- |
209
- | yearDate | | String of [Year] date |   |
210
- | time | | Flag to parse the object date to milliseconds. |   |
192
+ | filterData | | The filter data object |   |
211
193
 
212
194
 
213
195
 
@@ -215,17 +197,17 @@ Transforms String Date from a [Year] format to Date object.
215
197
  ##### Returns
216
198
 
217
199
 
218
- - The date object or the date in milliseconds
200
+ - a filter logic array
219
201
 
220
202
 
221
203
 
222
204
 
223
- ### dist/dates/helpers/getDateByDateFormat.js
205
+ ### dist/filters/adapters/FDToUI.js
224
206
 
225
207
 
226
- #### getDateByDateFormat(date, format, time)
208
+ #### FDToUI(filterData, datasetsInfo)
227
209
 
228
- Gets a Date Object instance by a Date format
210
+ Generates a UI filter structure from Filter Data structure.
229
211
 
230
212
 
231
213
 
@@ -234,9 +216,8 @@ Gets a Date Object instance by a Date format
234
216
 
235
217
  | Name | Type | Description | |
236
218
  | ---- | ---- | ----------- | -------- |
237
- | date | | String with a formatted date |   |
238
- | format | | The date format |   |
239
- | time | | flag to convert the formatted date to miliseconds |   |
219
+ | filterData | | The filter data object. |   |
220
+ | datasetsInfo | | Collection of datasets information |   |
240
221
 
241
222
 
242
223
 
@@ -244,17 +225,13 @@ Gets a Date Object instance by a Date format
244
225
  ##### Returns
245
226
 
246
227
 
247
- - a Date object, milisecond time or the same value if date format does not match.
248
-
249
-
250
-
228
+ - a UI Filters structure
251
229
 
252
- ### dist/dates/helpers/getDateFormatByProperty.js
253
230
 
254
231
 
255
- #### getDateFormatByProperty(property)
232
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
256
233
 
257
- Gets the date format by the given property
234
+ Generates a UI filter Structure from the Filter Data structure v2.1
258
235
 
259
236
 
260
237
 
@@ -263,7 +240,10 @@ Gets the date format by the given property
263
240
 
264
241
  | Name | Type | Description | |
265
242
  | ---- | ---- | ----------- | -------- |
266
- | property | | The Column Property |   |
243
+ | scopes | | The filter scope section |   |
244
+ | section | | The filter section. |   |
245
+ | version | | The version of the filter structure |   |
246
+ | datasetsInfo | | Collection of datasets information |   |
267
247
 
268
248
 
269
249
 
@@ -271,17 +251,17 @@ Gets the date format by the given property
271
251
  ##### Returns
272
252
 
273
253
 
274
- - The date format
254
+ - a UI filter Structure
275
255
 
276
256
 
277
257
 
278
258
 
279
- ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
259
+ ### dist/filters/adapters/UIToFD.js
280
260
 
281
261
 
282
- #### getDateFormatRegularExpressionInArray(dateFormat)
262
+ #### UIToFD(filterData)
283
263
 
284
- Gets an array of regular expressions by the given date format
264
+ Generates a Filter Data Structure structure from UI Filter Data structure.
285
265
 
286
266
 
287
267
 
@@ -290,7 +270,7 @@ Gets an array of regular expressions by the given date format
290
270
 
291
271
  | Name | Type | Description | |
292
272
  | ---- | ---- | ----------- | -------- |
293
- | dateFormat | | the date format |   |
273
+ | filterData | | The UI filter data object. |   |
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 Filter Data structure
305
282
 
306
- ### dist/dates/helpers/getSeparatorByDateFormat.js
307
283
 
308
284
 
309
- #### getSeparatorByDateFormat(format)
285
+ #### UI21ToFD(uFilterData, version)
310
286
 
311
- Gets the separator of the date format
287
+ Builds the Fitler Data structure from UI filter data
312
288
 
313
289
 
314
290
 
@@ -317,7 +293,8 @@ Gets the separator of the date format
317
293
 
318
294
  | Name | Type | Description | |
319
295
  | ---- | ---- | ----------- | -------- |
320
- | format | | the date format |   |
296
+ | uFilterData | | The UI filter Data object |   |
297
+ | version | | the version of the structure |   |
321
298
 
322
299
 
323
300
 
@@ -325,18 +302,17 @@ Gets the separator of the date format
325
302
  ##### Returns
326
303
 
327
304
 
328
- - a separator string
305
+ -
329
306
 
330
307
 
331
308
 
332
309
 
333
- ### dist/dates/helpers/getWeek.js
310
+ ### dist/filters/adapters/UIToFlatUI.js
334
311
 
335
312
 
336
- #### getWeek(date)
313
+ #### UIToFlatUI(filterData, datasetsInfo)
337
314
 
338
- Gets the week number of the year
339
- Additionally, the month and the year
315
+ Generates a Flattened UI filter structure from UI Filter Data structure.
340
316
 
341
317
 
342
318
 
@@ -345,7 +321,8 @@ Additionally, the month and the year
345
321
 
346
322
  | Name | Type | Description | |
347
323
  | ---- | ---- | ----------- | -------- |
348
- | date | | the date object |   |
324
+ | filterData | | The UI filter data object. |   |
325
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
349
326
 
350
327
 
351
328
 
@@ -353,20 +330,13 @@ Additionally, the month and the year
353
330
  ##### Returns
354
331
 
355
332
 
356
- - an object with the week, month and year.
357
-
358
-
359
-
333
+ - a flattened UI filters array
360
334
 
361
- ### dist/dates/helpers/validateDate.js
362
335
 
363
336
 
364
- #### validateDate(date, format)
337
+ #### UI21ToFlatUI(scopes)
365
338
 
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
339
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
370
340
 
371
341
 
372
342
 
@@ -375,8 +345,7 @@ Validate a string date depending on giving format
375
345
 
376
346
  | Name | Type | Description | |
377
347
  | ---- | ---- | ----------- | -------- |
378
- | date | | String of date |   |
379
- | format | | String of the format to validate |   |
348
+ | scopes | | The filter scope section |   |
380
349
 
381
350
 
382
351
 
@@ -384,17 +353,18 @@ Validate a string date depending on giving format
384
353
  ##### Returns
385
354
 
386
355
 
387
- - True if it is valid or not. Undefined if date is undefined
356
+ - a flattened UI filters array
388
357
 
389
358
 
390
359
 
391
360
 
392
- ### dist/dates/helpers/validateDateByDateFormat.js
361
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
393
362
 
394
363
 
395
- #### validateDateByDateFormat(date, dateForma)
364
+ #### adaptDateGroupingProperty(property)
396
365
 
397
- Validates the given string as Date by its date format.
366
+ [TODO: For 2022, eliminate this adapter]
367
+ Get the new property base on the old date grouping properties
398
368
 
399
369
 
400
370
 
@@ -403,8 +373,7 @@ Validates the given string as Date by its date format.
403
373
 
404
374
  | Name | Type | Description | |
405
375
  | ---- | ---- | ----------- | -------- |
406
- | date | | a string to validate as date form |   |
407
- | dateForma | | the format of the date to validate the string |   |
376
+ | property | | |   |
408
377
 
409
378
 
410
379
 
@@ -412,17 +381,17 @@ Validates the given string as Date by its date format.
412
381
  ##### Returns
413
382
 
414
383
 
415
- - true: the string is a valida date
384
+ -
416
385
 
417
386
 
418
387
 
419
388
 
420
- ### dist/dates/range/getDateRange.js
389
+ ### dist/filters/adapters/adaptFilterData.js
421
390
 
422
391
 
423
- #### getDateRange(value, dateGroupLabel, withTime)
392
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
424
393
 
425
- Get date range object from a string date value
394
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
426
395
 
427
396
 
428
397
 
@@ -431,58 +400,37 @@ Get date range object from a string date value
431
400
 
432
401
  | Name | Type | Description | |
433
402
  | ---- | ---- | ----------- | -------- |
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
-
403
+ | filterData | | The filter data structure. Accepts both v2.1 or v2.0 |   |
404
+ | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) |   |
405
+ | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory |   |
439
406
 
440
407
 
441
- ##### Examples
442
408
 
443
- ```javascript
444
- // 1) Year:
445
- getDateRange('2020', 'YEAR');
446
- // Will return:
447
- {
448
- from: '01/01/2020 00:00:00',
449
- to: '12/31/2020 23:59:59'
450
- }
451
409
 
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
- }
410
+ ##### Returns
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
 
413
+ - A new filter data structure v2.1
469
414
 
470
- ##### Returns
471
415
 
472
416
 
473
- - `Object` an object with the date range with two string date properties: from and to
474
417
 
418
+ ### dist/filters/adapters/adaptFilterValues.js
475
419
 
476
420
 
421
+ #### adaptFilterValues(filter)
477
422
 
478
- ### dist/dates/relative/Adapter.js
423
+ [TODO: For 2022, eliminate this adapter]
424
+ Gets an adapted filter value array. Validates the enabled property and sets
479
425
 
480
426
 
481
- #### value()
482
427
 
483
- Resolves statement and returns statement value
484
428
 
429
+ ##### Parameters
485
430
 
431
+ | Name | Type | Description | |
432
+ | ---- | ---- | ----------- | -------- |
433
+ | filter | | The filter |   |
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 new value array with the filled properties.
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,29 +513,36 @@ Apply 'the last' cursor logic to statement
554
513
  ##### Returns
555
514
 
556
515
 
557
- - `AbsoluteStatement`
516
+ - an scope structure
558
517
 
559
518
 
560
519
 
561
- #### _resolveAsTheNext() *private method*
520
+ #### buildDataset(uFilter)
562
521
 
563
- Apply 'the next' cursor logic to statement
522
+ Gets an dataset structure for the filter data
564
523
 
565
524
 
566
525
 
567
526
 
527
+ ##### Parameters
528
+
529
+ | Name | Type | Description | |
530
+ | ---- | ---- | ----------- | -------- |
531
+ | uFilter | | a UI structure filter |   |
532
+
533
+
568
534
 
569
535
 
570
536
  ##### Returns
571
537
 
572
538
 
573
- - `AbsoluteStatement`
539
+ - an dataset structure
574
540
 
575
541
 
576
542
 
577
- #### replaceNowToken(value, now)
543
+ #### buildFilter(uFilter)
578
544
 
579
- Replace '@now' token inside a string
545
+ Gets an filter structure for the filter data
580
546
 
581
547
 
582
548
 
@@ -585,8 +551,7 @@ Replace '@now' token inside a string
585
551
 
586
552
  | Name | Type | Description | |
587
553
  | ---- | ---- | ----------- | -------- |
588
- | value | `string` | |   |
589
- | now | `Date` | |   |
554
+ | uFilter | | a UI structure filter |   |
590
555
 
591
556
 
592
557
 
@@ -594,13 +559,17 @@ Replace '@now' token inside a string
594
559
  ##### Returns
595
560
 
596
561
 
597
- - `string`
562
+ - an filter structure
598
563
 
599
564
 
600
565
 
601
- #### convertRelativeToAbsolute(args)
602
566
 
603
- Returns a range object (date) from a group of statement params
567
+ ### dist/filters/adapters/flatUIToLogic.js
568
+
569
+
570
+ #### flatUIToLogic(uFilter)
571
+
572
+ Generates a Logic structure from flattened UI filters
604
573
 
605
574
 
606
575
 
@@ -609,45 +578,25 @@ Returns a range object (date) from a group of statement params
609
578
 
610
579
  | Name | Type | Description | |
611
580
  | ---- | ---- | ----------- | -------- |
612
- | args | `RelativeToAbsoluteStruct` | |   |
613
-
581
+ | uFilter | | Array of flat filters from UI |   |
614
582
 
615
583
 
616
584
 
617
- ##### Examples
618
-
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
-
636
585
 
637
586
  ##### Returns
638
587
 
639
588
 
640
- - `string`
589
+ - The logic structure
641
590
 
642
591
 
643
592
 
644
593
 
645
- ### dist/dates/relative/relative.js
594
+ ### dist/filters/adapters/flatUIToOldLogic.js
646
595
 
647
596
 
648
- #### resolveRelative(statements, clock)
597
+ #### flatUIToOldLogic(uFilters)
649
598
 
650
- Resolve a list of relative statements according to operator
599
+ Generates a Logic structure from flattened UI filters
651
600
 
652
601
 
653
602
 
@@ -656,44 +605,25 @@ Resolve a list of relative statements according to operator
656
605
 
657
606
  | Name | Type | Description | |
658
607
  | ---- | ---- | ----------- | -------- |
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
608
+ | uFilters | | Array of flat filters from UI | &nbsp; |
666
609
 
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
610
 
678
- Output:
679
- { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
680
- ```
681
611
 
682
612
 
683
613
  ##### Returns
684
614
 
685
615
 
686
- - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
616
+ - The logic structure
687
617
 
688
618
 
689
619
 
690
620
 
691
- ### dist/filters/adapters/FDToFlatUI.js
621
+ ### dist/filters/adapters/flatUIToUI.js
692
622
 
693
623
 
694
- #### FDToFlatUI(filterData, datasetsInfo)
624
+ #### flatUIToUI(uFilters, version)
695
625
 
696
- Generates a Flattened UI filter structure from Filter Data structure.
626
+ Generates a UI filter data structure from the flatttened UI filters.
697
627
 
698
628
 
699
629
 
@@ -702,8 +632,8 @@ Generates a Flattened UI filter structure from Filter Data structure.
702
632
 
703
633
  | Name | Type | Description | |
704
634
  | ---- | ---- | ----------- | -------- |
705
- | filterData | | The filter data object. | &nbsp; |
706
- | datasetsInfo | | Collection of datasets information | &nbsp; |
635
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
636
+ | version | | Tag for the version of the filter data structure | &nbsp; |
707
637
 
708
638
 
709
639
 
@@ -711,13 +641,14 @@ Generates a Flattened UI filter structure from Filter Data structure.
711
641
  ##### Returns
712
642
 
713
643
 
714
- - a flattened UI filters array
644
+ - a UI Filter Data.
715
645
 
716
646
 
717
647
 
718
- #### FD21ToFlatUI(scopes, datasetsInfo)
648
+ #### buildScopes(fbFilters)
719
649
 
720
- Generates a Filter Builder Structure from the Filter Data structure v2.1
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
721
652
 
722
653
 
723
654
 
@@ -726,8 +657,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
726
657
 
727
658
  | Name | Type | Description | |
728
659
  | ---- | ---- | ----------- | -------- |
729
- | scopes | | The filter scope section | &nbsp; |
730
- | datasetsInfo | | Collection of datasets information | &nbsp; |
660
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
731
661
 
732
662
 
733
663
 
@@ -735,17 +665,36 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
735
665
  ##### Returns
736
666
 
737
667
 
738
- - a flattened UI filters array
668
+ - an array of scopes structure.
739
669
 
740
670
 
741
671
 
672
+ #### buildScope(uFilter)
742
673
 
743
- ### dist/filters/adapters/FDToLogic.js
674
+ Gets an scope structure for the UI filter data
675
+
676
+
677
+
678
+
679
+ ##### Parameters
680
+
681
+ | Name | Type | Description | |
682
+ | ---- | ---- | ----------- | -------- |
683
+ | uFilter | | UI structure filter | &nbsp; |
744
684
 
745
685
 
746
- #### FDToLogic(filterData)
747
686
 
748
- Generates a Filter Logic structure from Filter Data structure.
687
+
688
+ ##### Returns
689
+
690
+
691
+ - an scope structure
692
+
693
+
694
+
695
+ #### buildDataset(uFilter)
696
+
697
+ Gets an dataset structure for the UI filter data
749
698
 
750
699
 
751
700
 
@@ -754,7 +703,7 @@ Generates a Filter Logic structure from Filter Data structure.
754
703
 
755
704
  | Name | Type | Description | |
756
705
  | ---- | ---- | ----------- | -------- |
757
- | filterData | | The filter data object. | &nbsp; |
706
+ | uFilter | | a UI structure filter | &nbsp; |
758
707
 
759
708
 
760
709
 
@@ -762,13 +711,13 @@ Generates a Filter Logic structure from Filter Data structure.
762
711
  ##### Returns
763
712
 
764
713
 
765
- - a filter logic array
714
+ - an dataset structure
766
715
 
767
716
 
768
717
 
769
- #### getLogicBodyFromFD21(filterData)
718
+ #### buildFilter(uFilter)
770
719
 
771
- Gets the logic body
720
+ Gets an filter structure for the UI filter data
772
721
 
773
722
 
774
723
 
@@ -777,7 +726,7 @@ Gets the logic body
777
726
 
778
727
  | Name | Type | Description | |
779
728
  | ---- | ---- | ----------- | -------- |
780
- | filterData | | The filter data object | &nbsp; |
729
+ | uFilter | | a UI structure filter | &nbsp; |
781
730
 
782
731
 
783
732
 
@@ -785,17 +734,17 @@ Gets the logic body
785
734
  ##### Returns
786
735
 
787
736
 
788
- - a filter logic array
737
+ - an filter structure
789
738
 
790
739
 
791
740
 
792
741
 
793
- ### dist/filters/adapters/FDToUI.js
742
+ ### dist/filters/adapters/logicToFD.js
794
743
 
795
744
 
796
- #### FDToUI(filterData, datasetsInfo)
745
+ #### logicToFD(filterData, version)
797
746
 
798
- Generates a UI filter structure from Filter Data structure.
747
+ Generates a filter data structure from the old logic structure (v2.0).
799
748
 
800
749
 
801
750
 
@@ -804,8 +753,8 @@ Generates a UI filter structure from Filter Data structure.
804
753
 
805
754
  | Name | Type | Description | |
806
755
  | ---- | ---- | ----------- | -------- |
807
- | filterData | | The filter data object. | &nbsp; |
808
- | datasetsInfo | | Collection of datasets information | &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; |
809
758
 
810
759
 
811
760
 
@@ -813,13 +762,17 @@ Generates a UI filter structure from Filter Data structure.
813
762
  ##### Returns
814
763
 
815
764
 
816
- - a UI Filters structure
765
+ - a Filter Data.
817
766
 
818
767
 
819
768
 
820
- #### FD21ToUI(scopes, section, version, datasetsInfo)
821
769
 
822
- Generates a UI filter Structure from the Filter Data structure v2.1
770
+ ### dist/filters/adapters/logicToFlatUI.js
771
+
772
+
773
+ #### logicToFlatUI(logics)
774
+
775
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
823
776
 
824
777
 
825
778
 
@@ -828,10 +781,7 @@ Generates a UI filter Structure from the Filter Data structure v2.1
828
781
 
829
782
  | Name | Type | Description | |
830
783
  | ---- | ---- | ----------- | -------- |
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; |
784
+ | logics | | The old logic structure (v2.0) | &nbsp; |
835
785
 
836
786
 
837
787
 
@@ -839,17 +789,13 @@ Generates a UI filter Structure from the Filter Data structure v2.1
839
789
  ##### Returns
840
790
 
841
791
 
842
- - a UI filter Structure
843
-
844
-
845
-
792
+ - The Flattened UI Filters array
846
793
 
847
- ### dist/filters/adapters/UIToFD.js
848
794
 
849
795
 
850
- #### UIToFD(filterData)
796
+ #### getFilter(filters, filter, getIndex)
851
797
 
852
- Generates a Filter Data Structure structure from UI Filter Data structure.
798
+ Get the filter or the index of the given array, validating an old filter structure.
853
799
 
854
800
 
855
801
 
@@ -858,7 +804,9 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
858
804
 
859
805
  | Name | Type | Description | |
860
806
  | ---- | ---- | ----------- | -------- |
861
- | filterData | | The UI filter data object. | &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; |
862
810
 
863
811
 
864
812
 
@@ -866,13 +814,13 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
866
814
  ##### Returns
867
815
 
868
816
 
869
- - a Filter Data structure
817
+ - the index or the UI filter object
870
818
 
871
819
 
872
820
 
873
- #### UI21ToFD(uFilterData, version)
821
+ #### refineRankingValues(values, uiValues)
874
822
 
875
- Builds the Fitler Data structure from UI filter data
823
+ Refines the values of the Ranking column type.
876
824
 
877
825
 
878
826
 
@@ -881,8 +829,8 @@ Builds the Fitler Data structure from UI filter data
881
829
 
882
830
  | Name | Type | Description | |
883
831
  | ---- | ---- | ----------- | -------- |
884
- | uFilterData | | The UI filter Data object | &nbsp; |
885
- | version | | the version of the structure | &nbsp; |
832
+ | values | | the Array of Ranking values | &nbsp; |
833
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
886
834
 
887
835
 
888
836
 
@@ -890,17 +838,17 @@ Builds the Fitler Data structure from UI filter data
890
838
  ##### Returns
891
839
 
892
840
 
893
- -
841
+ - the array of Ranking values
894
842
 
895
843
 
896
844
 
897
845
 
898
- ### dist/filters/adapters/UIToFlatUI.js
846
+ ### dist/filters/adapters/logicToUI.js
899
847
 
900
848
 
901
- #### UIToFlatUI(filterData, datasetsInfo)
849
+ #### logicToUI(uFilters, datasetsInfo)
902
850
 
903
- Generates a Flattened UI filter structure from UI Filter Data structure.
851
+ Generates a UI filter structure from the old logic structure (v2.0).
904
852
 
905
853
 
906
854
 
@@ -909,8 +857,8 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
909
857
 
910
858
  | Name | Type | Description | |
911
859
  | ---- | ---- | ----------- | -------- |
912
- | filterData | | The UI filter data object. | &nbsp; |
913
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
860
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
861
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
914
862
 
915
863
 
916
864
 
@@ -918,13 +866,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
918
866
  ##### Returns
919
867
 
920
868
 
921
- - a flattened UI filters array
869
+ - a UI Filter Data.
922
870
 
923
871
 
924
872
 
925
- #### UI21ToFlatUI(scopes)
926
873
 
927
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
874
+ ### dist/filters/adapters/transformFilters.js
875
+
876
+
877
+ #### transformFilters(oldFiltersObj, section)
878
+
879
+ Transform the old filters structure into the new one
928
880
 
929
881
 
930
882
 
@@ -933,26 +885,77 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
933
885
 
934
886
  | Name | Type | Description | |
935
887
  | ---- | ---- | ----------- | -------- |
936
- | scopes | | The filter scope section | &nbsp; |
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; |
890
+
937
891
 
938
892
 
939
893
 
894
+ ##### Examples
895
+
896
+ ```javascript
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
+ };
940
+
941
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
942
+ ```
943
+
940
944
 
941
945
  ##### Returns
942
946
 
943
947
 
944
- - a flattened UI filters array
948
+ - `Object` an object with the new filters structure
945
949
 
946
950
 
947
951
 
948
952
 
949
- ### dist/filters/adapters/adaptDateGroupingProperty.js
953
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
950
954
 
951
955
 
952
- #### adaptDateGroupingProperty(property)
956
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
953
957
 
954
- [TODO: For 2022, eliminate this adapter]
955
- Get the new property base on the old date grouping properties
958
+ [TODO: Make a proper description for this function]
956
959
 
957
960
 
958
961
 
@@ -961,7 +964,9 @@ Get the new property base on the old date grouping properties
961
964
 
962
965
  | Name | Type | Description | |
963
966
  | ---- | ---- | ----------- | -------- |
964
- | property | | | &nbsp; |
967
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
968
+ | scopes | | | &nbsp; |
969
+ | currentScope | | | &nbsp; |
965
970
 
966
971
 
967
972
 
@@ -974,12 +979,12 @@ Get the new property base on the old date grouping properties
974
979
 
975
980
 
976
981
 
977
- ### dist/filters/adapters/adaptFilterData.js
982
+ ### dist/filters/helpers/getAvailableScopes.js
978
983
 
979
984
 
980
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
985
+ #### getAvailableScopes(config)
981
986
 
982
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
987
+ Gets Scopes/Scope IDs by given IDs
983
988
 
984
989
 
985
990
 
@@ -988,9 +993,7 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
988
993
 
989
994
  | Name | Type | Description | |
990
995
  | ---- | ---- | ----------- | -------- |
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; |
996
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
994
997
 
995
998
 
996
999
 
@@ -998,18 +1001,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
998
1001
  ##### Returns
999
1002
 
1000
1003
 
1001
- - A new filter data structure v2.1
1004
+ - a Scopes/Scope IDs array
1002
1005
 
1003
1006
 
1004
1007
 
1005
1008
 
1006
- ### dist/filters/adapters/adaptFilterValues.js
1009
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1007
1010
 
1008
1011
 
1009
- #### adaptFilterValues(filter)
1012
+ #### getAvailableScopesIDsByConfig(config)
1010
1013
 
1011
- [TODO: For 2022, eliminate this adapter]
1012
- Gets an adapted filter value array. Validates the enabled property and sets
1014
+ Gets the Scopes IDS for the Available Scope function by any config
1013
1015
 
1014
1016
 
1015
1017
 
@@ -1018,7 +1020,7 @@ Gets an adapted filter value array. Validates the enabled property and sets
1018
1020
 
1019
1021
  | Name | Type | Description | |
1020
1022
  | ---- | ---- | ----------- | -------- |
1021
- | filter | | The filter | &nbsp; |
1023
+ | config | | any config | &nbsp; |
1022
1024
 
1023
1025
 
1024
1026
 
@@ -1026,17 +1028,17 @@ Gets an adapted filter value array. Validates the enabled property and sets
1026
1028
  ##### Returns
1027
1029
 
1028
1030
 
1029
- - A new value array with the filled properties.
1031
+ - a Available Scope IDS config
1030
1032
 
1031
1033
 
1032
1034
 
1033
1035
 
1034
- ### dist/filters/adapters/flatUIToFD.js
1036
+ ### dist/filters/helpers/getScopesByHierarchy.js
1035
1037
 
1036
1038
 
1037
- #### flatUIToFD(uFilters, version)
1039
+ #### getScopesByHierarchy(scopes, currentScope)
1038
1040
 
1039
- Generates a filter data structure from the flatttened UI filters.
1041
+ [TODO: Make a description for this]
1040
1042
 
1041
1043
 
1042
1044
 
@@ -1045,8 +1047,8 @@ Generates a filter data structure from the flatttened UI filters.
1045
1047
 
1046
1048
  | Name | Type | Description | |
1047
1049
  | ---- | ---- | ----------- | -------- |
1048
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1049
- | version | | Tag for the version of the filter data structure | &nbsp; |
1050
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1051
+ | currentScope | | Current scope type | &nbsp; |
1050
1052
 
1051
1053
 
1052
1054
 
@@ -1054,14 +1056,17 @@ Generates a filter data structure from the flatttened UI filters.
1054
1056
  ##### Returns
1055
1057
 
1056
1058
 
1057
- - a Filter Data.
1059
+ - A new array of Scopes/Scope IDs
1058
1060
 
1059
1061
 
1060
1062
 
1061
- #### buildScopes(fbFilters)
1062
1063
 
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
1064
+ ### dist/dates/adapters/mdyDateToDate.js
1065
+
1066
+
1067
+ #### mdyDateToDate(monthYearDate, time)
1068
+
1069
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
1065
1070
 
1066
1071
 
1067
1072
 
@@ -1070,7 +1075,8 @@ Also, adds and organizes filters by datasets
1070
1075
 
1071
1076
  | Name | Type | Description | |
1072
1077
  | ---- | ---- | ----------- | -------- |
1073
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1078
+ | monthYearDate | | String of [mm/dd/yyyy] date | &nbsp; |
1079
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1074
1080
 
1075
1081
 
1076
1082
 
@@ -1078,13 +1084,17 @@ Also, adds and organizes filters by datasets
1078
1084
  ##### Returns
1079
1085
 
1080
1086
 
1081
- - an array of scopes structure.
1087
+ - The date object or the date in milliseconds
1082
1088
 
1083
1089
 
1084
1090
 
1085
- #### buildScope(uFilter)
1086
1091
 
1087
- Gets an scope structure for the filter data
1092
+ ### dist/dates/adapters/monthYearToDate.js
1093
+
1094
+
1095
+ #### monthYearToDate(monthYearDate, time)
1096
+
1097
+ Transforms String Date from a [Month Year] format to Date object.
1088
1098
 
1089
1099
 
1090
1100
 
@@ -1093,7 +1103,8 @@ Gets an scope structure for the filter data
1093
1103
 
1094
1104
  | Name | Type | Description | |
1095
1105
  | ---- | ---- | ----------- | -------- |
1096
- | uFilter | | UI structure filter | &nbsp; |
1106
+ | monthYearDate | | String of [Month Year] date | &nbsp; |
1107
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1097
1108
 
1098
1109
 
1099
1110
 
@@ -1101,13 +1112,17 @@ Gets an scope structure for the filter data
1101
1112
  ##### Returns
1102
1113
 
1103
1114
 
1104
- - an scope structure
1115
+ - The date object or the date in milliseconds
1105
1116
 
1106
1117
 
1107
1118
 
1108
- #### buildDataset(uFilter)
1109
1119
 
1110
- Gets an dataset structure for the filter data
1120
+ ### dist/dates/adapters/quarterYearToDate.js
1121
+
1122
+
1123
+ #### quarterYearToDate(quarterYearDate, time)
1124
+
1125
+ Transforms String Date from a [Quarter Year] format to Date object.
1111
1126
 
1112
1127
 
1113
1128
 
@@ -1116,7 +1131,8 @@ Gets an dataset structure for the filter data
1116
1131
 
1117
1132
  | Name | Type | Description | |
1118
1133
  | ---- | ---- | ----------- | -------- |
1119
- | uFilter | | a UI structure filter | &nbsp; |
1134
+ | quarterYearDate | | String of [Quarter Year] date | &nbsp; |
1135
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1120
1136
 
1121
1137
 
1122
1138
 
@@ -1124,13 +1140,17 @@ Gets an dataset structure for the filter data
1124
1140
  ##### Returns
1125
1141
 
1126
1142
 
1127
- - an dataset structure
1143
+ - The date object or the date in milliseconds
1128
1144
 
1129
1145
 
1130
1146
 
1131
- #### buildFilter(uFilter)
1132
1147
 
1133
- Gets an filter structure for the filter data
1148
+ ### dist/dates/adapters/weekYearToDate.js
1149
+
1150
+
1151
+ #### weekYearToDate(date, time)
1152
+
1153
+ Transforms String Date from a [Week Year] format to Date object.
1134
1154
 
1135
1155
 
1136
1156
 
@@ -1139,7 +1159,8 @@ Gets an filter structure for the filter data
1139
1159
 
1140
1160
  | Name | Type | Description | |
1141
1161
  | ---- | ---- | ----------- | -------- |
1142
- | uFilter | | a UI structure filter | &nbsp; |
1162
+ | date | | String of [Week Year] date | &nbsp; |
1163
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1143
1164
 
1144
1165
 
1145
1166
 
@@ -1147,17 +1168,17 @@ Gets an filter structure for the filter data
1147
1168
  ##### Returns
1148
1169
 
1149
1170
 
1150
- - an filter structure
1171
+ - The date object or the date in milliseconds
1151
1172
 
1152
1173
 
1153
1174
 
1154
1175
 
1155
- ### dist/filters/adapters/flatUIToLogic.js
1176
+ ### dist/dates/adapters/yearToDate.js
1156
1177
 
1157
1178
 
1158
- #### flatUIToLogic(uFilter)
1179
+ #### yearToDate(yearDate, time)
1159
1180
 
1160
- Generates a Logic structure from flattened UI filters
1181
+ Transforms String Date from a [Year] format to Date object.
1161
1182
 
1162
1183
 
1163
1184
 
@@ -1166,7 +1187,8 @@ Generates a Logic structure from flattened UI filters
1166
1187
 
1167
1188
  | Name | Type | Description | |
1168
1189
  | ---- | ---- | ----------- | -------- |
1169
- | uFilter | | Array of flat filters from UI | &nbsp; |
1190
+ | yearDate | | String of [Year] date | &nbsp; |
1191
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1170
1192
 
1171
1193
 
1172
1194
 
@@ -1174,17 +1196,17 @@ Generates a Logic structure from flattened UI filters
1174
1196
  ##### Returns
1175
1197
 
1176
1198
 
1177
- - The logic structure
1199
+ - The date object or the date in milliseconds
1178
1200
 
1179
1201
 
1180
1202
 
1181
1203
 
1182
- ### dist/filters/adapters/flatUIToOldLogic.js
1204
+ ### dist/dates/helpers/getDateByDateFormat.js
1183
1205
 
1184
1206
 
1185
- #### flatUIToOldLogic(uFilters)
1207
+ #### getDateByDateFormat(date, format, time)
1186
1208
 
1187
- Generates a Logic structure from flattened UI filters
1209
+ Gets a Date Object instance by a Date format
1188
1210
 
1189
1211
 
1190
1212
 
@@ -1193,7 +1215,9 @@ Generates a Logic structure from flattened UI filters
1193
1215
 
1194
1216
  | Name | Type | Description | |
1195
1217
  | ---- | ---- | ----------- | -------- |
1196
- | uFilters | | Array of flat filters from UI | &nbsp; |
1218
+ | date | | String with a formatted date | &nbsp; |
1219
+ | format | | The date format | &nbsp; |
1220
+ | time | | flag to convert the formatted date to miliseconds | &nbsp; |
1197
1221
 
1198
1222
 
1199
1223
 
@@ -1201,17 +1225,17 @@ Generates a Logic structure from flattened UI filters
1201
1225
  ##### Returns
1202
1226
 
1203
1227
 
1204
- - The logic structure
1228
+ - a Date object, milisecond time or the same value if date format does not match.
1205
1229
 
1206
1230
 
1207
1231
 
1208
1232
 
1209
- ### dist/filters/adapters/flatUIToUI.js
1233
+ ### dist/dates/helpers/getDateFormatByProperty.js
1210
1234
 
1211
1235
 
1212
- #### flatUIToUI(uFilters, version)
1236
+ #### getDateFormatByProperty(property)
1213
1237
 
1214
- Generates a UI filter data structure from the flatttened UI filters.
1238
+ Gets the date format by the given property
1215
1239
 
1216
1240
 
1217
1241
 
@@ -1220,8 +1244,7 @@ Generates a UI filter data structure from the flatttened UI filters.
1220
1244
 
1221
1245
  | Name | Type | Description | |
1222
1246
  | ---- | ---- | ----------- | -------- |
1223
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
- | version | | Tag for the version of the filter data structure | &nbsp; |
1247
+ | property | | The Column Property | &nbsp; |
1225
1248
 
1226
1249
 
1227
1250
 
@@ -1229,14 +1252,17 @@ Generates a UI filter data structure from the flatttened UI filters.
1229
1252
  ##### Returns
1230
1253
 
1231
1254
 
1232
- - a UI Filter Data.
1255
+ - The date format
1233
1256
 
1234
1257
 
1235
1258
 
1236
- #### buildScopes(fbFilters)
1237
1259
 
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
1260
+ ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
1261
+
1262
+
1263
+ #### getDateFormatRegularExpressionInArray(dateFormat)
1264
+
1265
+ Gets an array of regular expressions by the given date format
1240
1266
 
1241
1267
 
1242
1268
 
@@ -1245,7 +1271,7 @@ Also, adds and organizes filters by datasets
1245
1271
 
1246
1272
  | Name | Type | Description | |
1247
1273
  | ---- | ---- | ----------- | -------- |
1248
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1274
+ | dateFormat | | the date format | &nbsp; |
1249
1275
 
1250
1276
 
1251
1277
 
@@ -1253,13 +1279,17 @@ Also, adds and organizes filters by datasets
1253
1279
  ##### Returns
1254
1280
 
1255
1281
 
1256
- - an array of scopes structure.
1282
+ - an array of regular expressions
1257
1283
 
1258
1284
 
1259
1285
 
1260
- #### buildScope(uFilter)
1261
1286
 
1262
- Gets an scope structure for the UI filter data
1287
+ ### dist/dates/helpers/getSeparatorByDateFormat.js
1288
+
1289
+
1290
+ #### getSeparatorByDateFormat(format)
1291
+
1292
+ Gets the separator of the date format
1263
1293
 
1264
1294
 
1265
1295
 
@@ -1268,7 +1298,7 @@ Gets an scope structure for the UI filter data
1268
1298
 
1269
1299
  | Name | Type | Description | |
1270
1300
  | ---- | ---- | ----------- | -------- |
1271
- | uFilter | | UI structure filter | &nbsp; |
1301
+ | format | | the date format | &nbsp; |
1272
1302
 
1273
1303
 
1274
1304
 
@@ -1276,13 +1306,18 @@ Gets an scope structure for the UI filter data
1276
1306
  ##### Returns
1277
1307
 
1278
1308
 
1279
- - an scope structure
1309
+ - a separator string
1280
1310
 
1281
1311
 
1282
1312
 
1283
- #### buildDataset(uFilter)
1284
1313
 
1285
- Gets an dataset structure for the UI filter data
1314
+ ### dist/dates/helpers/getWeek.js
1315
+
1316
+
1317
+ #### getWeek(date)
1318
+
1319
+ Gets the week number of the year
1320
+ Additionally, the month and the year
1286
1321
 
1287
1322
 
1288
1323
 
@@ -1291,7 +1326,7 @@ Gets an dataset structure for the UI filter data
1291
1326
 
1292
1327
  | Name | Type | Description | |
1293
1328
  | ---- | ---- | ----------- | -------- |
1294
- | uFilter | | a UI structure filter | &nbsp; |
1329
+ | date | | the date object | &nbsp; |
1295
1330
 
1296
1331
 
1297
1332
 
@@ -1299,13 +1334,20 @@ Gets an dataset structure for the UI filter data
1299
1334
  ##### Returns
1300
1335
 
1301
1336
 
1302
- - an dataset structure
1337
+ - an object with the week, month and year.
1303
1338
 
1304
1339
 
1305
1340
 
1306
- #### buildFilter(uFilter)
1307
1341
 
1308
- Gets an filter structure for the UI filter data
1342
+ ### dist/dates/helpers/validateDate.js
1343
+
1344
+
1345
+ #### validateDate(date, format)
1346
+
1347
+ Validate a string date depending on giving format
1348
+ - If the string is a token label, the function lets it pass.
1349
+ - Otherwise depends of the format
1350
+ - Some escenarios the string is a mix of token labels and dates
1309
1351
 
1310
1352
 
1311
1353
 
@@ -1314,7 +1356,8 @@ Gets an filter structure for the UI filter data
1314
1356
 
1315
1357
  | Name | Type | Description | |
1316
1358
  | ---- | ---- | ----------- | -------- |
1317
- | uFilter | | a UI structure filter | &nbsp; |
1359
+ | date | | String of date | &nbsp; |
1360
+ | format | | String of the format to validate | &nbsp; |
1318
1361
 
1319
1362
 
1320
1363
 
@@ -1322,17 +1365,17 @@ Gets an filter structure for the UI filter data
1322
1365
  ##### Returns
1323
1366
 
1324
1367
 
1325
- - an filter structure
1368
+ - True if it is valid or not. Undefined if date is undefined
1326
1369
 
1327
1370
 
1328
1371
 
1329
1372
 
1330
- ### dist/filters/adapters/logicToFD.js
1373
+ ### dist/dates/helpers/validateDateByDateFormat.js
1331
1374
 
1332
1375
 
1333
- #### logicToFD(filterData, version)
1376
+ #### validateDateByDateFormat(date, dateForma)
1334
1377
 
1335
- Generates a filter data structure from the old logic structure (v2.0).
1378
+ Validates the given string as Date by its date format.
1336
1379
 
1337
1380
 
1338
1381
 
@@ -1341,8 +1384,8 @@ Generates a filter data structure from the old logic structure (v2.0).
1341
1384
 
1342
1385
  | Name | Type | Description | |
1343
1386
  | ---- | ---- | ----------- | -------- |
1344
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
- | version | | Tag for the version of the filter data structure | &nbsp; |
1387
+ | date | | a string to validate as date form | &nbsp; |
1388
+ | dateForma | | the format of the date to validate the string | &nbsp; |
1346
1389
 
1347
1390
 
1348
1391
 
@@ -1350,17 +1393,17 @@ Generates a filter data structure from the old logic structure (v2.0).
1350
1393
  ##### Returns
1351
1394
 
1352
1395
 
1353
- - a Filter Data.
1396
+ - true: the string is a valida date
1354
1397
 
1355
1398
 
1356
1399
 
1357
1400
 
1358
- ### dist/filters/adapters/logicToFlatUI.js
1401
+ ### dist/dates/range/getDateRange.js
1359
1402
 
1360
1403
 
1361
- #### logicToFlatUI(logics)
1404
+ #### getDateRange(value, dateGroupLabel, withTime)
1362
1405
 
1363
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1406
+ Get date range object from a string date value
1364
1407
 
1365
1408
 
1366
1409
 
@@ -1369,56 +1412,58 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1369
1412
 
1370
1413
  | Name | Type | Description | |
1371
1414
  | ---- | ---- | ----------- | -------- |
1372
- | logics | | The old logic structure (v2.0) | &nbsp; |
1373
-
1374
-
1375
-
1376
-
1377
- ##### Returns
1378
-
1379
-
1380
- - The Flattened UI Filters array
1381
-
1382
-
1383
-
1384
- #### getFilter(filters, filter, getIndex)
1385
-
1386
- Get the filter or the index of the given array, validating an old filter structure.
1415
+ | value | `String` | string date value | &nbsp; |
1416
+ | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | &nbsp; |
1417
+ | withTime | `Boolean` | determines if the date range will include time. Default is true | &nbsp; |
1387
1418
 
1388
1419
 
1389
1420
 
1390
1421
 
1391
- ##### Parameters
1422
+ ##### Examples
1392
1423
 
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; |
1424
+ ```javascript
1425
+ // 1) Year:
1426
+ getDateRange('2020', 'YEAR');
1427
+ // Will return:
1428
+ {
1429
+ from: '01/01/2020 00:00:00',
1430
+ to: '12/31/2020 23:59:59'
1431
+ }
1398
1432
 
1433
+ // 2) Quarter:
1434
+ getDateRange('Q3 2020', 'QUARTER');
1435
+ // Will return:
1436
+ {
1437
+ from: '07/01/2020 00:00:00',
1438
+ to: '09/30/2020 23:59:59'
1439
+ }
1399
1440
 
1441
+ // 3) Month:
1442
+ getDateRange('Oct 2020', 'MONTH');
1443
+ // Will return:
1444
+ {
1445
+ from: '10/01/2020 00:00:00',
1446
+ to: '10/31/2020 23:59:59'
1447
+ }
1448
+ ```
1400
1449
 
1401
1450
 
1402
1451
  ##### Returns
1403
1452
 
1404
1453
 
1405
- - the index or the UI filter object
1454
+ - `Object` an object with the date range with two string date properties: from and to
1406
1455
 
1407
1456
 
1408
1457
 
1409
- #### refineRankingValues(values, uiValues)
1410
1458
 
1411
- Refines the values of the Ranking column type.
1459
+ ### dist/dates/relative/Adapter.js
1412
1460
 
1413
1461
 
1462
+ #### value()
1414
1463
 
1464
+ Resolves statement and returns statement value
1415
1465
 
1416
- ##### Parameters
1417
1466
 
1418
- | Name | Type | Description | |
1419
- | ---- | ---- | ----------- | -------- |
1420
- | values | | the Array of Ranking values | &nbsp; |
1421
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1422
1467
 
1423
1468
 
1424
1469
 
@@ -1426,144 +1471,93 @@ Refines the values of the Ranking column type.
1426
1471
  ##### Returns
1427
1472
 
1428
1473
 
1429
- - the array of Ranking values
1474
+ - `AbsoluteRange` `string`
1430
1475
 
1431
1476
 
1432
1477
 
1478
+ #### valueAsAnchor()
1433
1479
 
1434
- ### dist/filters/adapters/logicToUI.js
1480
+ Resolves statement as an anchor
1435
1481
 
1436
1482
 
1437
- #### logicToUI(uFilters, datasetsInfo)
1438
1483
 
1439
- Generates a UI filter structure from the old logic structure (v2.0).
1440
1484
 
1441
1485
 
1442
1486
 
1487
+ ##### Returns
1443
1488
 
1444
- ##### Parameters
1445
1489
 
1446
- | Name | Type | Description | |
1447
- | ---- | ---- | ----------- | -------- |
1448
- | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1490
+ - `string`
1450
1491
 
1451
1492
 
1452
1493
 
1494
+ #### _statementToRange() *private method*
1453
1495
 
1454
- ##### Returns
1496
+ Convert verbal statement to range value
1455
1497
 
1456
1498
 
1457
- - a UI Filter Data.
1458
1499
 
1459
1500
 
1460
1501
 
1461
1502
 
1462
- ### dist/filters/adapters/transformFilters.js
1503
+ ##### Returns
1463
1504
 
1464
1505
 
1465
- #### transformFilters(oldFiltersObj, section)
1506
+ - `AbsoluteRange`
1466
1507
 
1467
- Transform the old filters structure into the new one
1468
1508
 
1469
1509
 
1510
+ #### _resolveAsThis() *private method*
1470
1511
 
1512
+ Apply 'this' cursor logic to statement
1471
1513
 
1472
- ##### Parameters
1473
1514
 
1474
- | Name | Type | Description | |
1475
- | ---- | ---- | ----------- | -------- |
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
1515
 
1479
1516
 
1480
1517
 
1481
1518
 
1482
- ##### Examples
1519
+ ##### Returns
1483
1520
 
1484
- ```javascript
1485
1521
 
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
- };
1522
+ - `AbsoluteStatement`
1528
1523
 
1529
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
- ```
1531
1524
 
1532
1525
 
1533
- ##### Returns
1526
+ #### _resolveAsTheLast() *private method*
1534
1527
 
1528
+ Apply 'the last' cursor logic to statement
1535
1529
 
1536
- - `Object` an object with the new filters structure
1537
1530
 
1538
1531
 
1539
1532
 
1540
1533
 
1541
- ### dist/filters/classes/FilterInputErrorHandler.js
1542
1534
 
1535
+ ##### Returns
1543
1536
 
1544
- #### new FilterInputErrorHandler()
1545
1537
 
1538
+ - `AbsoluteStatement`
1546
1539
 
1547
1540
 
1548
1541
 
1542
+ #### _resolveAsTheNext() *private method*
1549
1543
 
1544
+ Apply 'the next' cursor logic to statement
1550
1545
 
1551
1546
 
1552
1547
 
1553
- ##### Returns
1554
1548
 
1555
1549
 
1556
- - `Void`
1557
1550
 
1551
+ ##### Returns
1558
1552
 
1559
1553
 
1554
+ - `AbsoluteStatement`
1560
1555
 
1561
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
1562
1556
 
1563
1557
 
1564
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1558
+ #### replaceNowToken(value, now)
1565
1559
 
1566
- [TODO: Make a proper description for this function]
1560
+ Replace '@now' token inside a string
1567
1561
 
1568
1562
 
1569
1563
 
@@ -1572,9 +1566,8 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1572
1566
 
1573
1567
  | Name | Type | Description | |
1574
1568
  | ---- | ---- | ----------- | -------- |
1575
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
- | scopes | | | &nbsp; |
1577
- | currentScope | | | &nbsp; |
1569
+ | value | `string` | | &nbsp; |
1570
+ | now | `Date` | | &nbsp; |
1578
1571
 
1579
1572
 
1580
1573
 
@@ -1582,17 +1575,13 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1582
1575
  ##### Returns
1583
1576
 
1584
1577
 
1585
- -
1586
-
1587
-
1588
-
1578
+ - `string`
1589
1579
 
1590
- ### dist/filters/helpers/getAvailableScopes.js
1591
1580
 
1592
1581
 
1593
- #### getAvailableScopes(config)
1582
+ #### convertRelativeToAbsolute(args)
1594
1583
 
1595
- Gets Scopes/Scope IDs by given IDs
1584
+ Returns a range object (date) from a group of statement params
1596
1585
 
1597
1586
 
1598
1587
 
@@ -1601,25 +1590,45 @@ Gets Scopes/Scope IDs by given IDs
1601
1590
 
1602
1591
  | Name | Type | Description | |
1603
1592
  | ---- | ---- | ----------- | -------- |
1604
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
1593
+ | args | `RelativeToAbsoluteStruct` | | &nbsp; |
1594
+
1605
1595
 
1606
1596
 
1607
1597
 
1598
+ ##### Examples
1599
+
1600
+ ```javascript
1601
+ pivot = '2021-03-03T12:30:40'
1602
+ unit = month
1603
+ steps = 2
1604
+ setTo = END
1605
+ resolverAsCalendar: true
1606
+ => Returns '2021-05-31T23:59:59'
1607
+ ```
1608
+ ```javascript
1609
+ pivot = '2021-03-03T12:30:40'
1610
+ unit = month
1611
+ steps = -2
1612
+ setTo = START
1613
+ resolverAsCalendar: false
1614
+ => Returns '2021-01-03T00:00:00'
1615
+ ```
1616
+
1608
1617
 
1609
1618
  ##### Returns
1610
1619
 
1611
1620
 
1612
- - a Scopes/Scope IDs array
1621
+ - `string`
1613
1622
 
1614
1623
 
1615
1624
 
1616
1625
 
1617
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1626
+ ### dist/dates/relative/relative.js
1618
1627
 
1619
1628
 
1620
- #### getAvailableScopesIDsByConfig(config)
1629
+ #### resolveRelative(statements, clock)
1621
1630
 
1622
- Gets the Scopes IDS for the Available Scope function by any config
1631
+ Resolve a list of relative statements according to operator
1623
1632
 
1624
1633
 
1625
1634
 
@@ -1628,43 +1637,34 @@ Gets the Scopes IDS for the Available Scope function by any config
1628
1637
 
1629
1638
  | Name | Type | Description | |
1630
1639
  | ---- | ---- | ----------- | -------- |
1631
- | config | | any config | &nbsp; |
1632
-
1633
-
1634
-
1635
-
1636
- ##### Returns
1637
-
1638
-
1639
- - a Available Scope IDS config
1640
-
1641
-
1642
-
1643
-
1644
- ### dist/filters/helpers/getScopesByHierarchy.js
1645
-
1646
-
1647
- #### getScopesByHierarchy(scopes, currentScope)
1648
-
1649
- [TODO: Make a description for this]
1650
-
1640
+ | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
1641
+ | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
1651
1642
 
1652
1643
 
1653
1644
 
1654
- ##### Parameters
1655
1645
 
1656
- | Name | Type | Description | |
1657
- | ---- | ---- | ----------- | -------- |
1658
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
- | currentScope | | Current scope type | &nbsp; |
1646
+ ##### Examples
1660
1647
 
1648
+ ```javascript
1649
+ Input:
1650
+ {
1651
+ "cursor": "the_next",
1652
+ "unit": "year",
1653
+ "number": 1,
1654
+ "includeCurrent": false,
1655
+ "isCalendarDate": false,
1656
+ "anchor": "03/05/2021"
1657
+ }
1661
1658
 
1659
+ Output:
1660
+ { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
1661
+ ```
1662
1662
 
1663
1663
 
1664
1664
  ##### Returns
1665
1665
 
1666
1666
 
1667
- - A new array of Scopes/Scope IDs
1667
+ - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
1668
1668
 
1669
1669
 
1670
1670
 
@@ -2094,14 +2094,14 @@ useful to avoid falsify validating Number Zero (0)
2094
2094
 
2095
2095
 
2096
2096
 
2097
- ### dist/general/mix/randomId.js
2097
+ ### dist/general/mix/size.js
2098
2098
 
2099
2099
 
2100
- #### randomId(length, exclude)
2100
+ #### size(obj)
2101
2101
 
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.
2102
+ Gets the length of the given array.
2103
+ - Useful for Object, Array and string type.
2104
+ - For `null` or `undefined` or else argument the returned value will be 0.
2105
2105
 
2106
2106
 
2107
2107
 
@@ -2110,8 +2110,7 @@ Creates a random string
2110
2110
 
2111
2111
  | Name | Type | Description | |
2112
2112
  | ---- | ---- | ----------- | -------- |
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; |
2113
+ | obj | `Any` | Any object-type variable | &nbsp; |
2115
2114
 
2116
2115
 
2117
2116
 
@@ -2119,19 +2118,19 @@ Creates a random string
2119
2118
  ##### Returns
2120
2119
 
2121
2120
 
2122
- - `String` Random string
2121
+ - `Number` the size of the given variable
2123
2122
 
2124
2123
 
2125
2124
 
2126
2125
 
2127
- ### dist/general/mix/size.js
2126
+ ### dist/general/mix/randomId.js
2128
2127
 
2129
2128
 
2130
- #### size(obj)
2129
+ #### randomId(length, exclude)
2131
2130
 
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.
2131
+ Creates a random string
2132
+ - If the first given argument is different than a length number, the variable is replaced by a default number
2133
+ - If the optional second given argument is passed the random string is permutated.
2135
2134
 
2136
2135
 
2137
2136
 
@@ -2140,7 +2139,8 @@ Gets the length of the given array.
2140
2139
 
2141
2140
  | Name | Type | Description | |
2142
2141
  | ---- | ---- | ----------- | -------- |
2143
- | obj | `Any` | Any object-type variable | &nbsp; |
2142
+ | length | `Number` | size of the generated string. Default 8 | &nbsp; |
2143
+ | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
2144
2144
 
2145
2145
 
2146
2146
 
@@ -2148,7 +2148,7 @@ Gets the length of the given array.
2148
2148
  ##### Returns
2149
2149
 
2150
2150
 
2151
- - `Number` the size of the given variable
2151
+ - `String` Random string
2152
2152
 
2153
2153
 
2154
2154
 
@@ -2377,13 +2377,12 @@ and return a mapped object
2377
2377
 
2378
2378
 
2379
2379
 
2380
- ### dist/general/object/mergeDeep.js
2380
+ ### dist/general/object/objectCopy.js
2381
2381
 
2382
2382
 
2383
- #### mergeDeep(obj1, obj2, settings)
2383
+ #### objectCopy(entity, cache)
2384
2384
 
2385
- Merges two objects into a new one.
2386
- The second given argument to the first given argument.
2385
+ Created a new reference of the given argument
2387
2386
 
2388
2387
 
2389
2388
 
@@ -2392,9 +2391,8 @@ The second given argument to the first given argument.
2392
2391
 
2393
2392
  | Name | Type | Description | |
2394
2393
  | ---- | ---- | ----------- | -------- |
2395
- | obj1 | | The target object | &nbsp; |
2396
- | obj2 | | The object to be merged | &nbsp; |
2397
- | settings | | Object settings for this function | &nbsp; |
2394
+ | entity | | The variable to be copied | &nbsp; |
2395
+ | cache | | | &nbsp; |
2398
2396
 
2399
2397
 
2400
2398
 
@@ -2402,13 +2400,18 @@ The second given argument to the first given argument.
2402
2400
  ##### Returns
2403
2401
 
2404
2402
 
2405
- - a new merged object
2403
+ - A new reference of the given argument
2406
2404
 
2407
2405
 
2408
2406
 
2409
- #### isValid(obj1, obj2)
2410
2407
 
2411
- Validates if the two arguments are objects
2408
+ ### dist/general/object/mergeDeep.js
2409
+
2410
+
2411
+ #### mergeDeep(obj1, obj2, settings)
2412
+
2413
+ Merges two objects into a new one.
2414
+ The second given argument to the first given argument.
2412
2415
 
2413
2416
 
2414
2417
 
@@ -2419,6 +2422,7 @@ Validates if the two arguments are objects
2419
2422
  | ---- | ---- | ----------- | -------- |
2420
2423
  | obj1 | | The target object | &nbsp; |
2421
2424
  | obj2 | | The object to be merged | &nbsp; |
2425
+ | settings | | Object settings for this function | &nbsp; |
2422
2426
 
2423
2427
 
2424
2428
 
@@ -2426,13 +2430,13 @@ Validates if the two arguments are objects
2426
2430
  ##### Returns
2427
2431
 
2428
2432
 
2429
- - true: they are valid; false: they are not
2433
+ - a new merged object
2430
2434
 
2431
2435
 
2432
2436
 
2433
- #### getParamsToMergeDeep(settings)
2437
+ #### isValid(obj1, obj2)
2434
2438
 
2435
- Validates and gets the settings with all set parameters.
2439
+ Validates if the two arguments are objects
2436
2440
 
2437
2441
 
2438
2442
 
@@ -2441,7 +2445,8 @@ Validates and gets the settings with all set parameters.
2441
2445
 
2442
2446
  | Name | Type | Description | |
2443
2447
  | ---- | ---- | ----------- | -------- |
2444
- | settings | | the settings object | &nbsp; |
2448
+ | obj1 | | The target object | &nbsp; |
2449
+ | obj2 | | The object to be merged | &nbsp; |
2445
2450
 
2446
2451
 
2447
2452
 
@@ -2449,17 +2454,13 @@ Validates and gets the settings with all set parameters.
2449
2454
  ##### Returns
2450
2455
 
2451
2456
 
2452
- - a new settings object with all set parameters.
2453
-
2454
-
2455
-
2457
+ - true: they are valid; false: they are not
2456
2458
 
2457
- ### dist/general/object/objectCopy.js
2458
2459
 
2459
2460
 
2460
- #### objectCopy(entity, cache)
2461
+ #### getParamsToMergeDeep(settings)
2461
2462
 
2462
- Created a new reference of the given argument
2463
+ Validates and gets the settings with all set parameters.
2463
2464
 
2464
2465
 
2465
2466
 
@@ -2468,8 +2469,7 @@ Created a new reference of the given argument
2468
2469
 
2469
2470
  | Name | Type | Description | |
2470
2471
  | ---- | ---- | ----------- | -------- |
2471
- | entity | | The variable to be copied | &nbsp; |
2472
- | cache | | | &nbsp; |
2472
+ | settings | | the settings object | &nbsp; |
2473
2473
 
2474
2474
 
2475
2475
 
@@ -2477,7 +2477,7 @@ Created a new reference of the given argument
2477
2477
  ##### Returns
2478
2478
 
2479
2479
 
2480
- - A new reference of the given argument
2480
+ - a new settings object with all set parameters.
2481
2481
 
2482
2482
 
2483
2483
 
@@ -2943,88 +2943,6 @@ try to find this string as a variable on Windows object
2943
2943
 
2944
2944
 
2945
2945
 
2946
- ### dist/dates/relative/helpers/formatStatement.js
2947
-
2948
-
2949
- #### formatStatement(statement)
2950
-
2951
- Build a proper relative date statement type
2952
-
2953
-
2954
-
2955
-
2956
- ##### Parameters
2957
-
2958
- | Name | Type | Description | |
2959
- | ---- | ---- | ----------- | -------- |
2960
- | statement | `RelativeStatement` | | &nbsp; |
2961
-
2962
-
2963
-
2964
-
2965
- ##### Returns
2966
-
2967
-
2968
- - `RelativeStatement`
2969
-
2970
-
2971
-
2972
-
2973
- ### dist/dates/relative/helpers/getStatementCase.js
2974
-
2975
-
2976
- #### getStatementCase(includeCurrent, isCalendarDate)
2977
-
2978
- Returns a number/constant that identifies a relative date case
2979
-
2980
-
2981
-
2982
-
2983
- ##### Parameters
2984
-
2985
- | Name | Type | Description | |
2986
- | ---- | ---- | ----------- | -------- |
2987
- | includeCurrent | `boolean` | | &nbsp; |
2988
- | isCalendarDate | `boolean` | | &nbsp; |
2989
-
2990
-
2991
-
2992
-
2993
- ##### Returns
2994
-
2995
-
2996
- - `number`
2997
-
2998
-
2999
-
3000
-
3001
- ### dist/dates/relative/helpers/parseDate.js
3002
-
3003
-
3004
- #### parseDate(date)
3005
-
3006
- Parses a string date and returns a dayjs date
3007
-
3008
-
3009
-
3010
-
3011
- ##### Parameters
3012
-
3013
- | Name | Type | Description | |
3014
- | ---- | ---- | ----------- | -------- |
3015
- | date | `string` `Dayjs` `Date` | | &nbsp; |
3016
-
3017
-
3018
-
3019
-
3020
- ##### Returns
3021
-
3022
-
3023
- - `Dayjs` A dayjs date
3024
-
3025
-
3026
-
3027
-
3028
2946
  ### dist/filters/helpers/backend/buildExpression.js
3029
2947
 
3030
2948
 
@@ -3348,12 +3266,12 @@ Returns a filter builder config object by a any given config
3348
3266
 
3349
3267
 
3350
3268
 
3351
- ### dist/filters/helpers/ui/excludeUIFiltersByAggregate.js
3269
+ ### dist/filters/helpers/common/areFiltersEquals.js
3352
3270
 
3353
3271
 
3354
- #### excludeUIFiltersByAggregate(uFilters)
3272
+ #### areFiltersEquals(filter1, filter2)
3355
3273
 
3356
- Excludes Aggregate Filters in the Flattened UI Filters array
3274
+ Validates if both filters are the same
3357
3275
 
3358
3276
 
3359
3277
 
@@ -3362,7 +3280,8 @@ Excludes Aggregate Filters in the Flattened UI Filters array
3362
3280
 
3363
3281
  | Name | Type | Description | |
3364
3282
  | ---- | ---- | ----------- | -------- |
3365
- | uFilters | | Collection of Flat UI Filters | &nbsp; |
3283
+ | filter1 | | filter 1 | &nbsp; |
3284
+ | filter2 | | filter 2 | &nbsp; |
3366
3285
 
3367
3286
 
3368
3287
 
@@ -3370,17 +3289,17 @@ Excludes Aggregate Filters in the Flattened UI Filters array
3370
3289
  ##### Returns
3371
3290
 
3372
3291
 
3373
- - a new Flat UI Filters that were excluded the aggregate filters
3292
+ - true: the filters are equal; false: the filters are NOT equal
3374
3293
 
3375
3294
 
3376
3295
 
3377
3296
 
3378
- ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
3297
+ ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3379
3298
 
3380
3299
 
3381
- #### excludeUIFlatFiltersByScopes(uFilters, scopes)
3300
+ #### excludeFiltersByAggregateColumn(filterData)
3382
3301
 
3383
- Excludes and returns a UI Flat Filters without filters by the given scopes
3302
+ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3384
3303
 
3385
3304
 
3386
3305
 
@@ -3389,8 +3308,7 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
3389
3308
 
3390
3309
  | Name | Type | Description | |
3391
3310
  | ---- | ---- | ----------- | -------- |
3392
- | uFilters | | The Flatten UI Filters | &nbsp; |
3393
- | scopes | | collection of scopes types | &nbsp; |
3311
+ | filterData | | The filter data object | &nbsp; |
3394
3312
 
3395
3313
 
3396
3314
 
@@ -3398,17 +3316,26 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
3398
3316
  ##### Returns
3399
3317
 
3400
3318
 
3401
- - The new array of UI Flattened filters
3319
+ - The new filter data object that were excluded the aggregate filters
3402
3320
 
3403
3321
 
3404
3322
 
3405
3323
 
3406
- ### dist/filters/helpers/ui/getFilterPropertyLabel.js
3324
+ ### dist/filters/helpers/common/excludeFiltersByParams.js
3407
3325
 
3408
3326
 
3409
- #### getFilterPropertyLabel(filter)
3327
+ #### excludeFiltersByParams(filterData, params)
3410
3328
 
3411
- Gets the label of the filter property
3329
+ Excludes filters from the given Filters.
3330
+ The validation to filter the stored filter is depending on:
3331
+ - Column
3332
+ - Qrvey ID
3333
+ - Scope type
3334
+ - Scope ID
3335
+ - Panel ID
3336
+ - Validator type
3337
+ - Property type
3338
+ - Enabled flags
3412
3339
 
3413
3340
 
3414
3341
 
@@ -3417,7 +3344,8 @@ Gets the label of the filter property
3417
3344
 
3418
3345
  | Name | Type | Description | |
3419
3346
  | ---- | ---- | ----------- | -------- |
3420
- | filter | | The UI Filter | &nbsp; |
3347
+ | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3348
+ | params | | given parameters to validate the filter data | &nbsp; |
3421
3349
 
3422
3350
 
3423
3351
 
@@ -3425,17 +3353,17 @@ Gets the label of the filter property
3425
3353
  ##### Returns
3426
3354
 
3427
3355
 
3428
- - a string of the filter property label
3356
+ - a new Filter object structure
3429
3357
 
3430
3358
 
3431
3359
 
3432
3360
 
3433
- ### dist/filters/helpers/ui/getOutputFormatByColumn.js
3361
+ ### dist/filters/helpers/common/excludeFiltersByScopes.js
3434
3362
 
3435
3363
 
3436
- #### getOutputFormatByColumn(column, datasets)
3364
+ #### excludeFiltersByScopes(filterData, scopes)
3437
3365
 
3438
- Gets output format object from Datasets by the given column. Item of the datasets array must have outputformat item in order to be returned
3366
+ Excludes and returns a filter data without filters by the given scopes
3439
3367
 
3440
3368
 
3441
3369
 
@@ -3444,8 +3372,8 @@ Gets output format object from Datasets by the given column. Item of the dataset
3444
3372
 
3445
3373
  | Name | Type | Description | |
3446
3374
  | ---- | ---- | ----------- | -------- |
3447
- | column | | The column | &nbsp; |
3448
- | datasets | | array of datasets | &nbsp; |
3375
+ | filterData | | The Filter Data | &nbsp; |
3376
+ | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
3449
3377
 
3450
3378
 
3451
3379
 
@@ -3453,18 +3381,17 @@ Gets output format object from Datasets by the given column. Item of the dataset
3453
3381
  ##### Returns
3454
3382
 
3455
3383
 
3456
- - The output format object
3384
+ - The new Filter Data without filters by the given scopes.
3457
3385
 
3458
3386
 
3459
3387
 
3460
3388
 
3461
- ### dist/filters/helpers/ui/getQrveyIdsByUIFilters.js
3389
+ ### dist/filters/helpers/common/getFilterColumnLabel.js
3462
3390
 
3463
3391
 
3464
- #### getQrveyIdsByUIFilters(uiFilter)
3392
+ #### getFilterColumnLabel(column)
3465
3393
 
3466
- Gets a collection of Qrvey IDs in the UI Filter structure.
3467
- Looks around all filter structure finding the qrveyid propertty in each dataset
3394
+ Get an string of the properties of the given filter column.
3468
3395
 
3469
3396
 
3470
3397
 
@@ -3473,7 +3400,99 @@ Looks around all filter structure finding the qrveyid propertty in each dataset
3473
3400
 
3474
3401
  | Name | Type | Description | |
3475
3402
  | ---- | ---- | ----------- | -------- |
3476
- | uiFilter | | | &nbsp; |
3403
+ | column | | The filter column | &nbsp; |
3404
+
3405
+
3406
+
3407
+
3408
+ ##### Returns
3409
+
3410
+
3411
+ - an string with the property, aggregate or calculation label.
3412
+
3413
+
3414
+
3415
+
3416
+ ### dist/filters/helpers/common/getFilterLabel.js
3417
+
3418
+
3419
+ #### getFilterLabel(filter)
3420
+
3421
+ Gets the Filter Label + Column label
3422
+
3423
+
3424
+
3425
+
3426
+ ##### Parameters
3427
+
3428
+ | Name | Type | Description | |
3429
+ | ---- | ---- | ----------- | -------- |
3430
+ | filter | | the UI filter | &nbsp; |
3431
+
3432
+
3433
+
3434
+
3435
+ ##### Returns
3436
+
3437
+
3438
+ - a sring label
3439
+
3440
+
3441
+
3442
+
3443
+ ### dist/filters/helpers/common/getFilterid.js
3444
+
3445
+
3446
+ #### getFilterid(filter)
3447
+
3448
+ Get the Filter ID by the filter structure
3449
+ The order of the epression ID is:
3450
+ - Scope Type
3451
+ - scopeid
3452
+ - qrveyid
3453
+ - panelid
3454
+ - columnid
3455
+ - validator
3456
+ - property
3457
+ - Column Aggregate
3458
+ - Column Calculation
3459
+ - Optional Index
3460
+
3461
+
3462
+
3463
+
3464
+ ##### Parameters
3465
+
3466
+ | Name | Type | Description | |
3467
+ | ---- | ---- | ----------- | -------- |
3468
+ | filter | | the filter structure | &nbsp; |
3469
+
3470
+
3471
+
3472
+
3473
+ ##### Returns
3474
+
3475
+
3476
+ - a text to identify the filter
3477
+
3478
+
3479
+
3480
+
3481
+ ### dist/filters/helpers/common/getFiltersByAggregateColumn.js
3482
+
3483
+
3484
+ #### getFiltersByAggregateColumn(filterData)
3485
+
3486
+ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggregate is included.
3487
+
3488
+
3489
+
3490
+
3491
+ ##### Parameters
3492
+
3493
+ | Name | Type | Description | |
3494
+ | ---- | ---- | ----------- | -------- |
3495
+ | filterData | | The filter data object | &nbsp; |
3477
3496
 
3478
3497
 
3479
3498
 
@@ -3481,56 +3500,64 @@ Looks around all filter structure finding the qrveyid propertty in each dataset
3481
3500
  ##### Returns
3482
3501
 
3483
3502
 
3484
- - `Void`
3503
+ - The new filter data object that were get the aggregate filters
3485
3504
 
3486
3505
 
3487
3506
 
3488
3507
 
3489
- ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
3508
+ ### dist/filters/helpers/common/getFiltersByParams.js
3490
3509
 
3491
3510
 
3492
- #### getUIFlatFilterByParams()
3511
+ #### getFiltersByParams(filterData, params)
3493
3512
 
3494
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
3513
+ Gets filters from the given params.
3495
3514
  The validation to filter the stored filter is depending on:
3496
3515
  - Column
3497
- - Qrvey ID,
3516
+ - Qrvey ID
3498
3517
  - Scope type
3499
3518
  - Scope ID
3500
3519
  - Panel ID
3501
3520
  - Validator type
3502
3521
  - Property type
3522
+ - Enabled flags
3503
3523
 
3504
3524
 
3505
3525
 
3506
3526
 
3527
+ ##### Parameters
3528
+
3529
+ | Name | Type | Description | |
3530
+ | ---- | ---- | ----------- | -------- |
3531
+ | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3532
+ | params | | given parameters to validate the dataset | &nbsp; |
3533
+
3534
+
3507
3535
 
3508
3536
 
3509
3537
  ##### Returns
3510
3538
 
3511
3539
 
3512
- - The index of the uFilter array or the Filter object s
3540
+ - a new Filter object structure
3513
3541
 
3514
3542
 
3515
3543
 
3516
3544
 
3517
- ### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
3545
+ ### dist/filters/helpers/common/getFiltersByScopes.js
3546
+
3547
+
3548
+ #### getFiltersByScopes(filterData, scopes)
3549
+
3550
+ Filters and gets a Filter Data by the given scopes
3518
3551
 
3519
3552
 
3520
- #### getUIFlatFiltersByParams()
3521
3553
 
3522
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
3523
- The validation to filter the stored filter is depending on:
3524
- - Column
3525
- - Qrvey ID,
3526
- - Scope type
3527
- - Scope ID
3528
- - Panel ID
3529
- - Validator type
3530
- - Property type
3531
- - Enabled flags
3532
3554
 
3555
+ ##### Parameters
3533
3556
 
3557
+ | Name | Type | Description | |
3558
+ | ---- | ---- | ----------- | -------- |
3559
+ | filterData | | The Filter Data | &nbsp; |
3560
+ | scopes | | collection of scopes types | &nbsp; |
3534
3561
 
3535
3562
 
3536
3563
 
@@ -3538,17 +3565,17 @@ The validation to filter the stored filter is depending on:
3538
3565
  ##### Returns
3539
3566
 
3540
3567
 
3541
- - The index of the uFilter array or the Filter object s
3568
+ - The new Filter Data
3542
3569
 
3543
3570
 
3544
3571
 
3545
3572
 
3546
- ### dist/filters/helpers/ui/getUIFlatFiltersByScopes.js
3573
+ ### dist/filters/helpers/common/getFiltersByScopesIds.js
3547
3574
 
3548
3575
 
3549
- #### getUIFlatFiltersByScopes(uFilters, scopes)
3576
+ #### getFiltersByScopesIds(filterData, scopes)
3550
3577
 
3551
- Filters and gets a UI Flatten Filters by the given scopes
3578
+ Gets filters from Filter Data by Scopes/Scope IDs.
3552
3579
 
3553
3580
 
3554
3581
 
@@ -3557,8 +3584,8 @@ Filters and gets a UI Flatten Filters by the given scopes
3557
3584
 
3558
3585
  | Name | Type | Description | |
3559
3586
  | ---- | ---- | ----------- | -------- |
3560
- | uFilters | | The Flatten UI Filters | &nbsp; |
3561
- | scopes | | collection of scopes types | &nbsp; |
3587
+ | filterData | | The filter data | &nbsp; |
3588
+ | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3562
3589
 
3563
3590
 
3564
3591
 
@@ -3566,17 +3593,17 @@ Filters and gets a UI Flatten Filters by the given scopes
3566
3593
  ##### Returns
3567
3594
 
3568
3595
 
3569
- - The new array of UI Flattened filters
3570
-
3596
+ - a new Filter Data
3571
3597
 
3572
3598
 
3573
3599
 
3574
- ### dist/filters/helpers/ui/getUIValues.js
3575
3600
 
3601
+ ### dist/filters/helpers/common/getMergeFiltersSettings.js
3576
3602
 
3577
- #### getUIValues(filter, addEnableds, rankingGroupIndex)
3578
3603
 
3604
+ #### getMergeFiltersSettings(settings)
3579
3605
 
3606
+ Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
3580
3607
 
3581
3608
 
3582
3609
 
@@ -3585,9 +3612,7 @@ Filters and gets a UI Flatten Filters by the given scopes
3585
3612
 
3586
3613
  | Name | Type | Description | |
3587
3614
  | ---- | ---- | ----------- | -------- |
3588
- | filter | | | &nbsp; |
3589
- | addEnableds | | | &nbsp; |
3590
- | rankingGroupIndex | | | &nbsp; |
3615
+ | settings | | an object to the MergeFilters settings | &nbsp; |
3591
3616
 
3592
3617
 
3593
3618
 
@@ -3595,17 +3620,17 @@ Filters and gets a UI Flatten Filters by the given scopes
3595
3620
  ##### Returns
3596
3621
 
3597
3622
 
3598
- -
3623
+ - a new MergeFilters settings object.
3599
3624
 
3600
3625
 
3601
3626
 
3602
3627
 
3603
- ### dist/filters/helpers/ui/getUpdatedUIFilters.js
3628
+ ### dist/filters/helpers/common/getFiltersByVisibility.js
3604
3629
 
3605
3630
 
3606
- #### getUpdatedUIFilters(data, datasets)
3631
+ #### getFiltersByVisibility(filterData, scopes)
3607
3632
 
3608
- Gets a new UI Filter structure with a datasets/columns info updates
3633
+ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3609
3634
 
3610
3635
 
3611
3636
 
@@ -3614,8 +3639,8 @@ Gets a new UI Filter structure with a datasets/columns info updates
3614
3639
 
3615
3640
  | Name | Type | Description | |
3616
3641
  | ---- | ---- | ----------- | -------- |
3617
- | data | | The UI Filter structure | &nbsp; |
3618
- | datasets | | An array of datasets/column info used for updating the data | &nbsp; |
3642
+ | filterData | | a Filter Data or UI Filter Data | &nbsp; |
3643
+ | scopes | | a Scopes/Scope IDs array | &nbsp; |
3619
3644
 
3620
3645
 
3621
3646
 
@@ -3623,17 +3648,17 @@ Gets a new UI Filter structure with a datasets/columns info updates
3623
3648
  ##### Returns
3624
3649
 
3625
3650
 
3626
- - A new UI FIlter structure
3651
+ - a new Filter Data
3627
3652
 
3628
3653
 
3629
3654
 
3630
3655
 
3631
- ### dist/filters/helpers/ui/resolveUIFlatFiltersByParams.js
3656
+ ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3632
3657
 
3633
3658
 
3634
- #### resolveUIFlatFilterByParams(filter, params)
3659
+ #### getParamsToGetFilterSettings(settings)
3635
3660
 
3636
- Resolves conditions between UI flattened filter and given parameters
3661
+ Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3637
3662
 
3638
3663
 
3639
3664
 
@@ -3642,8 +3667,7 @@ Resolves conditions between UI flattened filter and given parameters
3642
3667
 
3643
3668
  | Name | Type | Description | |
3644
3669
  | ---- | ---- | ----------- | -------- |
3645
- | filter | | UI Flatten Filter | &nbsp; |
3646
- | params | | Parameters to validate | &nbsp; |
3670
+ | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
3647
3671
 
3648
3672
 
3649
3673
 
@@ -3651,17 +3675,17 @@ Resolves conditions between UI flattened filter and given parameters
3651
3675
  ##### Returns
3652
3676
 
3653
3677
 
3654
- - true: the conditions are satisfied.
3678
+ - a new ParamsToGetFilter settings object.
3655
3679
 
3656
3680
 
3657
3681
 
3658
3682
 
3659
- ### dist/filters/helpers/common/areFiltersEquals.js
3683
+ ### dist/filters/helpers/common/haveFiltersByDataset.js
3660
3684
 
3661
3685
 
3662
- #### areFiltersEquals(filter1, filter2)
3686
+ #### haveFiltersByDataset(filterData, qrveyid)
3663
3687
 
3664
- Validates if both filters are the same
3688
+ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3665
3689
 
3666
3690
 
3667
3691
 
@@ -3670,8 +3694,8 @@ Validates if both filters are the same
3670
3694
 
3671
3695
  | Name | Type | Description | |
3672
3696
  | ---- | ---- | ----------- | -------- |
3673
- | filter1 | | filter 1 | &nbsp; |
3674
- | filter2 | | filter 2 | &nbsp; |
3697
+ | filterData | | the filter data or the UI filter data. | &nbsp; |
3698
+ | qrveyid | | The Qrvey ID | &nbsp; |
3675
3699
 
3676
3700
 
3677
3701
 
@@ -3679,17 +3703,17 @@ Validates if both filters are the same
3679
3703
  ##### Returns
3680
3704
 
3681
3705
 
3682
- - true: the filters are equal; false: the filters are NOT equal
3706
+ - true: the filter data has filters by the Qrvey ID
3683
3707
 
3684
3708
 
3685
3709
 
3686
3710
 
3687
- ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3711
+ ### dist/filters/helpers/common/isBetweenValidator.js
3688
3712
 
3689
3713
 
3690
- #### excludeFiltersByAggregateColumn(filterData)
3714
+ #### isBetweenValidator(validator)
3691
3715
 
3692
- Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3716
+ Validates if the given validator is a Between type
3693
3717
 
3694
3718
 
3695
3719
 
@@ -3698,7 +3722,7 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3698
3722
 
3699
3723
  | Name | Type | Description | |
3700
3724
  | ---- | ---- | ----------- | -------- |
3701
- | filterData | | The filter data object | &nbsp; |
3725
+ | validator | | The validator | &nbsp; |
3702
3726
 
3703
3727
 
3704
3728
 
@@ -3706,26 +3730,17 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3706
3730
  ##### Returns
3707
3731
 
3708
3732
 
3709
- - The new filter data object that were excluded the aggregate filters
3733
+ - true: it is a between validator; false: it is not a between validator
3710
3734
 
3711
3735
 
3712
3736
 
3713
3737
 
3714
- ### dist/filters/helpers/common/excludeFiltersByParams.js
3738
+ ### dist/filters/helpers/common/isDateDistinctProperty.js
3715
3739
 
3716
3740
 
3717
- #### excludeFiltersByParams(filterData, params)
3741
+ #### isDateDistinctProperty(column, property)
3718
3742
 
3719
- Excludes filters from the given Filters.
3720
- The validation to filter the stored filter is depending on:
3721
- - Column
3722
- - Qrvey ID
3723
- - Scope type
3724
- - Scope ID
3725
- - Panel ID
3726
- - Validator type
3727
- - Property type
3728
- - Enabled flags
3743
+ Determines if the filter column and property is a distinct group dates type
3729
3744
 
3730
3745
 
3731
3746
 
@@ -3734,8 +3749,8 @@ The validation to filter the stored filter is depending on:
3734
3749
 
3735
3750
  | Name | Type | Description | |
3736
3751
  | ---- | ---- | ----------- | -------- |
3737
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3738
- | params | | given parameters to validate the filter data | &nbsp; |
3752
+ | column | | The filter column | &nbsp; |
3753
+ | property | | The filter property | &nbsp; |
3739
3754
 
3740
3755
 
3741
3756
 
@@ -3743,17 +3758,17 @@ The validation to filter the stored filter is depending on:
3743
3758
  ##### Returns
3744
3759
 
3745
3760
 
3746
- - a new Filter object structure
3761
+ - True if the given property is included from distinct group dates type
3747
3762
 
3748
3763
 
3749
3764
 
3750
3765
 
3751
- ### dist/filters/helpers/common/excludeFiltersByScopes.js
3766
+ ### dist/filters/helpers/common/isInValidator.js
3752
3767
 
3753
3768
 
3754
- #### excludeFiltersByScopes(filterData, scopes)
3769
+ #### isInValidator(validator)
3755
3770
 
3756
- Excludes and returns a filter data without filters by the given scopes
3771
+ Validates if the given validator is a In type
3757
3772
 
3758
3773
 
3759
3774
 
@@ -3762,8 +3777,7 @@ Excludes and returns a filter data without filters by the given scopes
3762
3777
 
3763
3778
  | Name | Type | Description | |
3764
3779
  | ---- | ---- | ----------- | -------- |
3765
- | filterData | | The Filter Data | &nbsp; |
3766
- | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
3780
+ | validator | | The validator | &nbsp; |
3767
3781
 
3768
3782
 
3769
3783
 
@@ -3771,17 +3785,17 @@ Excludes and returns a filter data without filters by the given scopes
3771
3785
  ##### Returns
3772
3786
 
3773
3787
 
3774
- - The new Filter Data without filters by the given scopes.
3788
+ - true: it is a In validator; false: it is not a In validator
3775
3789
 
3776
3790
 
3777
3791
 
3778
3792
 
3779
- ### dist/filters/helpers/common/getFilterColumnLabel.js
3793
+ ### dist/filters/helpers/common/isNullValidator.js
3780
3794
 
3781
3795
 
3782
- #### getFilterColumnLabel(column)
3796
+ #### isNullValidator(validator)
3783
3797
 
3784
- Get an string of the properties of the given filter column.
3798
+ Checks if the given validator is a Null type.
3785
3799
 
3786
3800
 
3787
3801
 
@@ -3790,7 +3804,7 @@ Get an string of the properties of the given filter column.
3790
3804
 
3791
3805
  | Name | Type | Description | |
3792
3806
  | ---- | ---- | ----------- | -------- |
3793
- | column | | The filter column | &nbsp; |
3807
+ | validator | | The Filter Validator | &nbsp; |
3794
3808
 
3795
3809
 
3796
3810
 
@@ -3798,17 +3812,17 @@ Get an string of the properties of the given filter column.
3798
3812
  ##### Returns
3799
3813
 
3800
3814
 
3801
- - an string with the property, aggregate or calculation label.
3815
+ - True: It is a Null Validator; False: It is not a Null Validator.
3802
3816
 
3803
3817
 
3804
3818
 
3805
3819
 
3806
- ### dist/filters/helpers/common/getFilterLabel.js
3820
+ ### dist/filters/helpers/common/isRangeValidator.js
3807
3821
 
3808
3822
 
3809
- #### getFilterLabel(filter)
3823
+ #### isRangeValidator(validator)
3810
3824
 
3811
- Gets the Filter Label + Column label
3825
+ Validates if the given validator is a Range type. Range type means the value has min and max values to filter
3812
3826
 
3813
3827
 
3814
3828
 
@@ -3817,7 +3831,7 @@ Gets the Filter Label + Column label
3817
3831
 
3818
3832
  | Name | Type | Description | |
3819
3833
  | ---- | ---- | ----------- | -------- |
3820
- | filter | | the UI filter | &nbsp; |
3834
+ | validator | | The filter validator | &nbsp; |
3821
3835
 
3822
3836
 
3823
3837
 
@@ -3825,17 +3839,17 @@ Gets the Filter Label + Column label
3825
3839
  ##### Returns
3826
3840
 
3827
3841
 
3828
- - a sring label
3842
+ - true: it is a range validator
3829
3843
 
3830
3844
 
3831
3845
 
3832
3846
 
3833
- ### dist/filters/helpers/common/getFiltersByAggregateColumn.js
3847
+ ### dist/filters/helpers/common/isRegularValidator.js
3834
3848
 
3835
3849
 
3836
- #### getFiltersByAggregateColumn(filterData)
3850
+ #### isRegularValidator(validator)
3837
3851
 
3838
- Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggregate is included.
3852
+ Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
3839
3853
 
3840
3854
 
3841
3855
 
@@ -3844,7 +3858,7 @@ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggr
3844
3858
 
3845
3859
  | Name | Type | Description | |
3846
3860
  | ---- | ---- | ----------- | -------- |
3847
- | filterData | | The filter data object | &nbsp; |
3861
+ | validator | | The filter validator | &nbsp; |
3848
3862
 
3849
3863
 
3850
3864
 
@@ -3852,28 +3866,17 @@ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggr
3852
3866
  ##### Returns
3853
3867
 
3854
3868
 
3855
- - The new filter data object that were get the aggregate filters
3869
+ - true: it is a range validator
3856
3870
 
3857
3871
 
3858
3872
 
3859
3873
 
3860
- ### dist/filters/helpers/common/getFilterid.js
3874
+ ### dist/filters/helpers/common/mergeFilters.js
3861
3875
 
3862
3876
 
3863
- #### getFilterid(filter)
3877
+ #### mergeFilters(filterData1, filterData2, overwriteValues)
3864
3878
 
3865
- Get the Filter ID by the filter structure
3866
- The order of the epression ID is:
3867
- - Scope Type
3868
- - scopeid
3869
- - qrveyid
3870
- - panelid
3871
- - columnid
3872
- - validator
3873
- - property
3874
- - Column Aggregate
3875
- - Column Calculation
3876
- - Optional Index
3879
+ Merge filter data structures in a new one. The first Filter Data passed in the argument has the priority
3877
3880
 
3878
3881
 
3879
3882
 
@@ -3882,7 +3885,9 @@ The order of the epression ID is:
3882
3885
 
3883
3886
  | Name | Type | Description | |
3884
3887
  | ---- | ---- | ----------- | -------- |
3885
- | filter | | the filter structure | &nbsp; |
3888
+ | filterData1 | | The target filter data | &nbsp; |
3889
+ | filterData2 | | the filter data to be merged | &nbsp; |
3890
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3886
3891
 
3887
3892
 
3888
3893
 
@@ -3890,26 +3895,13 @@ The order of the epression ID is:
3890
3895
  ##### Returns
3891
3896
 
3892
3897
 
3893
- - a text to identify the filter
3894
-
3895
-
3896
-
3898
+ - a new filter data structure
3897
3899
 
3898
- ### dist/filters/helpers/common/getFiltersByParams.js
3899
3900
 
3900
3901
 
3901
- #### getFiltersByParams(filterData, params)
3902
+ #### mergeScopes(scopes1, scopes2, overwriteValues)
3902
3903
 
3903
- Gets filters from the given params.
3904
- The validation to filter the stored filter is depending on:
3905
- - Column
3906
- - Qrvey ID
3907
- - Scope type
3908
- - Scope ID
3909
- - Panel ID
3910
- - Validator type
3911
- - Property type
3912
- - Enabled flags
3904
+ Gets a new scope structure array by merging two scope structures
3913
3905
 
3914
3906
 
3915
3907
 
@@ -3918,8 +3910,9 @@ The validation to filter the stored filter is depending on:
3918
3910
 
3919
3911
  | Name | Type | Description | |
3920
3912
  | ---- | ---- | ----------- | -------- |
3921
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3922
- | params | | given parameters to validate the dataset | &nbsp; |
3913
+ | scopes1 | | the target scope structure | &nbsp; |
3914
+ | scopes2 | | the scope to be merged | &nbsp; |
3915
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3923
3916
 
3924
3917
 
3925
3918
 
@@ -3927,17 +3920,13 @@ The validation to filter the stored filter is depending on:
3927
3920
  ##### Returns
3928
3921
 
3929
3922
 
3930
- - a new Filter object structure
3931
-
3932
-
3933
-
3923
+ - a new scope structure array
3934
3924
 
3935
- ### dist/filters/helpers/common/getFiltersByScopes.js
3936
3925
 
3937
3926
 
3938
- #### getFiltersByScopes(filterData, scopes)
3927
+ #### mergeDatasets(datasets1, datasets2, overwriteValues)
3939
3928
 
3940
- Filters and gets a Filter Data by the given scopes
3929
+ Gets a new dataset structure array by merging two dataset structures
3941
3930
 
3942
3931
 
3943
3932
 
@@ -3946,8 +3935,9 @@ Filters and gets a Filter Data by the given scopes
3946
3935
 
3947
3936
  | Name | Type | Description | |
3948
3937
  | ---- | ---- | ----------- | -------- |
3949
- | filterData | | The Filter Data | &nbsp; |
3950
- | scopes | | collection of scopes types | &nbsp; |
3938
+ | datasets1 | | the target dataset structure | &nbsp; |
3939
+ | datasets2 | | the dataset to be merged | &nbsp; |
3940
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3951
3941
 
3952
3942
 
3953
3943
 
@@ -3955,17 +3945,13 @@ Filters and gets a Filter Data by the given scopes
3955
3945
  ##### Returns
3956
3946
 
3957
3947
 
3958
- - The new Filter Data
3959
-
3960
-
3961
-
3948
+ - a new dataset structure array
3962
3949
 
3963
- ### dist/filters/helpers/common/getFiltersByScopesIds.js
3964
3950
 
3965
3951
 
3966
- #### getFiltersByScopesIds(filterData, scopes)
3952
+ #### mergeFilterss(filters1, filters2, overwriteValues)
3967
3953
 
3968
- Gets filters from Filter Data by Scopes/Scope IDs.
3954
+ Gets a new filter structure array by merging two filter structures
3969
3955
 
3970
3956
 
3971
3957
 
@@ -3974,26 +3960,23 @@ Gets filters from Filter Data by Scopes/Scope IDs.
3974
3960
 
3975
3961
  | Name | Type | Description | |
3976
3962
  | ---- | ---- | ----------- | -------- |
3977
- | filterData | | The filter data | &nbsp; |
3978
- | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3979
-
3980
-
3981
-
3963
+ | filters1 | | the target filter structure | &nbsp; |
3964
+ | filters2 | | the filter to be merged | &nbsp; |
3965
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3982
3966
 
3983
- ##### Returns
3984
3967
 
3985
3968
 
3986
- - a new Filter Data
3987
3969
 
3970
+ ##### Returns
3988
3971
 
3989
3972
 
3973
+ - a new filter structure array
3990
3974
 
3991
- ### dist/filters/helpers/common/getFiltersByVisibility.js
3992
3975
 
3993
3976
 
3994
- #### getFiltersByVisibility(filterData, scopes)
3977
+ #### mergeValues(filter1, filter2, overwrite)
3995
3978
 
3996
- Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3979
+ Gets a new value structure array by merging two value structures
3997
3980
 
3998
3981
 
3999
3982
 
@@ -4002,8 +3985,9 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
4002
3985
 
4003
3986
  | Name | Type | Description | |
4004
3987
  | ---- | ---- | ----------- | -------- |
4005
- | filterData | | a Filter Data or UI Filter Data | &nbsp; |
4006
- | scopes | | a Scopes/Scope IDs array | &nbsp; |
3988
+ | filter1 | | the target filter structure | &nbsp; |
3989
+ | filter2 | | the filter to be used to merge the values | &nbsp; |
3990
+ | overwrite | | Flag to overwrite or not the filter values | &nbsp; |
4007
3991
 
4008
3992
 
4009
3993
 
@@ -4011,17 +3995,17 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
4011
3995
  ##### Returns
4012
3996
 
4013
3997
 
4014
- - a new Filter Data
3998
+ - a new value structure array
4015
3999
 
4016
4000
 
4017
4001
 
4018
4002
 
4019
- ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
4003
+ ### dist/filters/helpers/common/resolveDatasetConditions.js
4020
4004
 
4021
4005
 
4022
- #### getParamsToGetFilterSettings(settings)
4006
+ #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4023
4007
 
4024
- Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
4008
+ Resolves the conditions by given params
4025
4009
 
4026
4010
 
4027
4011
 
@@ -4030,7 +4014,10 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
4030
4014
 
4031
4015
  | Name | Type | Description | |
4032
4016
  | ---- | ---- | ----------- | -------- |
4033
- | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
4017
+ | filter | | The dataset structure | &nbsp; |
4018
+ | params | | given parameters to validate the dataset | &nbsp; |
4019
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4020
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4034
4021
 
4035
4022
 
4036
4023
 
@@ -4038,17 +4025,17 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
4038
4025
  ##### Returns
4039
4026
 
4040
4027
 
4041
- - a new ParamsToGetFilter settings object.
4028
+ - true: the condition is satisfied
4042
4029
 
4043
4030
 
4044
4031
 
4045
4032
 
4046
- ### dist/filters/helpers/common/haveFiltersByDataset.js
4033
+ ### dist/filters/helpers/common/resolveFilterConditions.js
4047
4034
 
4048
4035
 
4049
- #### haveFiltersByDataset(filterData, qrveyid)
4036
+ #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4050
4037
 
4051
- Validates if the filter data has filters by a dataset ID (Qrvey ID).
4038
+ Resolves the conditions by given params
4052
4039
 
4053
4040
 
4054
4041
 
@@ -4057,8 +4044,10 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
4057
4044
 
4058
4045
  | Name | Type | Description | |
4059
4046
  | ---- | ---- | ----------- | -------- |
4060
- | filterData | | the filter data or the UI filter data. | &nbsp; |
4061
- | qrveyid | | The Qrvey ID | &nbsp; |
4047
+ | filter | | The filter | &nbsp; |
4048
+ | params | | given parameters to validate the filter | &nbsp; |
4049
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4050
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4062
4051
 
4063
4052
 
4064
4053
 
@@ -4066,17 +4055,17 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
4066
4055
  ##### Returns
4067
4056
 
4068
4057
 
4069
- - true: the filter data has filters by the Qrvey ID
4058
+ - true: the condition is satisfied
4070
4059
 
4071
4060
 
4072
4061
 
4073
4062
 
4074
- ### dist/filters/helpers/common/isBetweenValidator.js
4063
+ ### dist/filters/helpers/common/resolveScopeConditions.js
4075
4064
 
4076
4065
 
4077
- #### isBetweenValidator(validator)
4066
+ #### resolveScopeConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4078
4067
 
4079
- Validates if the given validator is a Between type
4068
+ Resolves the conditions by given params
4080
4069
 
4081
4070
 
4082
4071
 
@@ -4085,7 +4074,10 @@ Validates if the given validator is a Between type
4085
4074
 
4086
4075
  | Name | Type | Description | |
4087
4076
  | ---- | ---- | ----------- | -------- |
4088
- | validator | | The validator | &nbsp; |
4077
+ | filter | | The filter scope structure | &nbsp; |
4078
+ | params | | given parameters to validate the filter | &nbsp; |
4079
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4080
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4089
4081
 
4090
4082
 
4091
4083
 
@@ -4093,17 +4085,17 @@ Validates if the given validator is a Between type
4093
4085
  ##### Returns
4094
4086
 
4095
4087
 
4096
- - true: it is a between validator; false: it is not a between validator
4088
+ - true: the condition is satisfied
4097
4089
 
4098
4090
 
4099
4091
 
4100
4092
 
4101
- ### dist/filters/helpers/common/isDateDistinctProperty.js
4093
+ ### dist/filters/helpers/ui/excludeUIFiltersByAggregate.js
4102
4094
 
4103
4095
 
4104
- #### isDateDistinctProperty(column, property)
4096
+ #### excludeUIFiltersByAggregate(uFilters)
4105
4097
 
4106
- Determines if the filter column and property is a distinct group dates type
4098
+ Excludes Aggregate Filters in the Flattened UI Filters array
4107
4099
 
4108
4100
 
4109
4101
 
@@ -4112,8 +4104,7 @@ Determines if the filter column and property is a distinct group dates type
4112
4104
 
4113
4105
  | Name | Type | Description | |
4114
4106
  | ---- | ---- | ----------- | -------- |
4115
- | column | | The filter column | &nbsp; |
4116
- | property | | The filter property | &nbsp; |
4107
+ | uFilters | | Collection of Flat UI Filters | &nbsp; |
4117
4108
 
4118
4109
 
4119
4110
 
@@ -4121,17 +4112,17 @@ Determines if the filter column and property is a distinct group dates type
4121
4112
  ##### Returns
4122
4113
 
4123
4114
 
4124
- - True if the given property is included from distinct group dates type
4115
+ - a new Flat UI Filters that were excluded the aggregate filters
4125
4116
 
4126
4117
 
4127
4118
 
4128
4119
 
4129
- ### dist/filters/helpers/common/getMergeFiltersSettings.js
4120
+ ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
4130
4121
 
4131
4122
 
4132
- #### getMergeFiltersSettings(settings)
4123
+ #### excludeUIFlatFiltersByScopes(uFilters, scopes)
4133
4124
 
4134
- Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
4125
+ Excludes and returns a UI Flat Filters without filters by the given scopes
4135
4126
 
4136
4127
 
4137
4128
 
@@ -4140,7 +4131,8 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
4140
4131
 
4141
4132
  | Name | Type | Description | |
4142
4133
  | ---- | ---- | ----------- | -------- |
4143
- | settings | | an object to the MergeFilters settings | &nbsp; |
4134
+ | uFilters | | The Flatten UI Filters | &nbsp; |
4135
+ | scopes | | collection of scopes types | &nbsp; |
4144
4136
 
4145
4137
 
4146
4138
 
@@ -4148,17 +4140,17 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
4148
4140
  ##### Returns
4149
4141
 
4150
4142
 
4151
- - a new MergeFilters settings object.
4143
+ - The new array of UI Flattened filters
4152
4144
 
4153
4145
 
4154
4146
 
4155
4147
 
4156
- ### dist/filters/helpers/common/isInValidator.js
4148
+ ### dist/filters/helpers/ui/getFilterPropertyLabel.js
4157
4149
 
4158
4150
 
4159
- #### isInValidator(validator)
4151
+ #### getFilterPropertyLabel(filter)
4160
4152
 
4161
- Validates if the given validator is a In type
4153
+ Gets the label of the filter property
4162
4154
 
4163
4155
 
4164
4156
 
@@ -4167,7 +4159,7 @@ Validates if the given validator is a In type
4167
4159
 
4168
4160
  | Name | Type | Description | |
4169
4161
  | ---- | ---- | ----------- | -------- |
4170
- | validator | | The validator | &nbsp; |
4162
+ | filter | | The UI Filter | &nbsp; |
4171
4163
 
4172
4164
 
4173
4165
 
@@ -4175,17 +4167,17 @@ Validates if the given validator is a In type
4175
4167
  ##### Returns
4176
4168
 
4177
4169
 
4178
- - true: it is a In validator; false: it is not a In validator
4170
+ - a string of the filter property label
4179
4171
 
4180
4172
 
4181
4173
 
4182
4174
 
4183
- ### dist/filters/helpers/common/isNullValidator.js
4175
+ ### dist/filters/helpers/ui/getOutputFormatByColumn.js
4184
4176
 
4185
4177
 
4186
- #### isNullValidator(validator)
4178
+ #### getOutputFormatByColumn(column, datasets)
4187
4179
 
4188
- Checks if the given validator is a Null type.
4180
+ Gets output format object from Datasets by the given column. Item of the datasets array must have outputformat item in order to be returned
4189
4181
 
4190
4182
 
4191
4183
 
@@ -4194,7 +4186,8 @@ Checks if the given validator is a Null type.
4194
4186
 
4195
4187
  | Name | Type | Description | |
4196
4188
  | ---- | ---- | ----------- | -------- |
4197
- | validator | | The Filter Validator | &nbsp; |
4189
+ | column | | The column | &nbsp; |
4190
+ | datasets | | array of datasets | &nbsp; |
4198
4191
 
4199
4192
 
4200
4193
 
@@ -4202,17 +4195,18 @@ Checks if the given validator is a Null type.
4202
4195
  ##### Returns
4203
4196
 
4204
4197
 
4205
- - True: It is a Null Validator; False: It is not a Null Validator.
4198
+ - The output format object
4206
4199
 
4207
4200
 
4208
4201
 
4209
4202
 
4210
- ### dist/filters/helpers/common/isRangeValidator.js
4203
+ ### dist/filters/helpers/ui/getQrveyIdsByUIFilters.js
4211
4204
 
4212
4205
 
4213
- #### isRangeValidator(validator)
4206
+ #### getQrveyIdsByUIFilters(uiFilter)
4214
4207
 
4215
- Validates if the given validator is a Range type. Range type means the value has min and max values to filter
4208
+ Gets a collection of Qrvey IDs in the UI Filter structure.
4209
+ Looks around all filter structure finding the qrveyid propertty in each dataset
4216
4210
 
4217
4211
 
4218
4212
 
@@ -4221,7 +4215,7 @@ Validates if the given validator is a Range type. Range type means the value has
4221
4215
 
4222
4216
  | Name | Type | Description | |
4223
4217
  | ---- | ---- | ----------- | -------- |
4224
- | validator | | The filter validator | &nbsp; |
4218
+ | uiFilter | | | &nbsp; |
4225
4219
 
4226
4220
 
4227
4221
 
@@ -4229,26 +4223,27 @@ Validates if the given validator is a Range type. Range type means the value has
4229
4223
  ##### Returns
4230
4224
 
4231
4225
 
4232
- - true: it is a range validator
4233
-
4234
-
4235
-
4226
+ - `Void`
4236
4227
 
4237
- ### dist/filters/helpers/common/isRegularValidator.js
4238
4228
 
4239
4229
 
4240
- #### isRegularValidator(validator)
4241
4230
 
4242
- Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
4231
+ ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
4243
4232
 
4244
4233
 
4234
+ #### getUIFlatFilterByParams()
4245
4235
 
4236
+ Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4237
+ The validation to filter the stored filter is depending on:
4238
+ - Column
4239
+ - Qrvey ID,
4240
+ - Scope type
4241
+ - Scope ID
4242
+ - Panel ID
4243
+ - Validator type
4244
+ - Property type
4246
4245
 
4247
- ##### Parameters
4248
4246
 
4249
- | Name | Type | Description | |
4250
- | ---- | ---- | ----------- | -------- |
4251
- | validator | | The filter validator | &nbsp; |
4252
4247
 
4253
4248
 
4254
4249
 
@@ -4256,42 +4251,46 @@ Validates if the given validator is a regular type. Regular type means the filte
4256
4251
  ##### Returns
4257
4252
 
4258
4253
 
4259
- - true: it is a range validator
4254
+ - The index of the uFilter array or the Filter object s
4260
4255
 
4261
4256
 
4262
4257
 
4263
4258
 
4264
- ### dist/filters/helpers/common/mergeFilters.js
4259
+ ### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
4265
4260
 
4266
4261
 
4267
- #### mergeFilters(filterData1, filterData2, overwriteValues)
4262
+ #### getUIFlatFiltersByParams()
4268
4263
 
4269
- Merge filter data structures in a new one. The first Filter Data passed in the argument has the priority
4264
+ Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4265
+ The validation to filter the stored filter is depending on:
4266
+ - Column
4267
+ - Qrvey ID,
4268
+ - Scope type
4269
+ - Scope ID
4270
+ - Panel ID
4271
+ - Validator type
4272
+ - Property type
4273
+ - Enabled flags
4270
4274
 
4271
4275
 
4272
4276
 
4273
4277
 
4274
- ##### Parameters
4275
4278
 
4276
- | Name | Type | Description | |
4277
- | ---- | ---- | ----------- | -------- |
4278
- | filterData1 | | The target filter data | &nbsp; |
4279
- | filterData2 | | the filter data to be merged | &nbsp; |
4280
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4281
4279
 
4280
+ ##### Returns
4282
4281
 
4283
4282
 
4283
+ - The index of the uFilter array or the Filter object s
4284
4284
 
4285
- ##### Returns
4286
4285
 
4287
4286
 
4288
- - a new filter data structure
4289
4287
 
4288
+ ### dist/filters/helpers/ui/getUIFlatFiltersByScopes.js
4290
4289
 
4291
4290
 
4292
- #### mergeScopes(scopes1, scopes2, overwriteValues)
4291
+ #### getUIFlatFiltersByScopes(uFilters, scopes)
4293
4292
 
4294
- Gets a new scope structure array by merging two scope structures
4293
+ Filters and gets a UI Flatten Filters by the given scopes
4295
4294
 
4296
4295
 
4297
4296
 
@@ -4300,9 +4299,8 @@ Gets a new scope structure array by merging two scope structures
4300
4299
 
4301
4300
  | Name | Type | Description | |
4302
4301
  | ---- | ---- | ----------- | -------- |
4303
- | scopes1 | | the target scope structure | &nbsp; |
4304
- | scopes2 | | the scope to be merged | &nbsp; |
4305
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4302
+ | uFilters | | The Flatten UI Filters | &nbsp; |
4303
+ | scopes | | collection of scopes types | &nbsp; |
4306
4304
 
4307
4305
 
4308
4306
 
@@ -4310,13 +4308,17 @@ Gets a new scope structure array by merging two scope structures
4310
4308
  ##### Returns
4311
4309
 
4312
4310
 
4313
- - a new scope structure array
4311
+ - The new array of UI Flattened filters
4314
4312
 
4315
4313
 
4316
4314
 
4317
- #### mergeDatasets(datasets1, datasets2, overwriteValues)
4318
4315
 
4319
- Gets a new dataset structure array by merging two dataset structures
4316
+ ### dist/filters/helpers/ui/getUIValues.js
4317
+
4318
+
4319
+ #### getUIValues(filter, addEnableds, rankingGroupIndex)
4320
+
4321
+
4320
4322
 
4321
4323
 
4322
4324
 
@@ -4325,9 +4327,9 @@ Gets a new dataset structure array by merging two dataset structures
4325
4327
 
4326
4328
  | Name | Type | Description | |
4327
4329
  | ---- | ---- | ----------- | -------- |
4328
- | datasets1 | | the target dataset structure | &nbsp; |
4329
- | datasets2 | | the dataset to be merged | &nbsp; |
4330
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4330
+ | filter | | | &nbsp; |
4331
+ | addEnableds | | | &nbsp; |
4332
+ | rankingGroupIndex | | | &nbsp; |
4331
4333
 
4332
4334
 
4333
4335
 
@@ -4335,13 +4337,17 @@ Gets a new dataset structure array by merging two dataset structures
4335
4337
  ##### Returns
4336
4338
 
4337
4339
 
4338
- - a new dataset structure array
4340
+ -
4339
4341
 
4340
4342
 
4341
4343
 
4342
- #### mergeFilterss(filters1, filters2, overwriteValues)
4343
4344
 
4344
- Gets a new filter structure array by merging two filter structures
4345
+ ### dist/filters/helpers/ui/getUpdatedUIFilters.js
4346
+
4347
+
4348
+ #### getUpdatedUIFilters(data, datasets)
4349
+
4350
+ Gets a new UI Filter structure with a datasets/columns info updates
4345
4351
 
4346
4352
 
4347
4353
 
@@ -4350,9 +4356,8 @@ Gets a new filter structure array by merging two filter structures
4350
4356
 
4351
4357
  | Name | Type | Description | |
4352
4358
  | ---- | ---- | ----------- | -------- |
4353
- | filters1 | | the target filter structure | &nbsp; |
4354
- | filters2 | | the filter to be merged | &nbsp; |
4355
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4359
+ | data | | The UI Filter structure | &nbsp; |
4360
+ | datasets | | An array of datasets/column info used for updating the data | &nbsp; |
4356
4361
 
4357
4362
 
4358
4363
 
@@ -4360,13 +4365,17 @@ Gets a new filter structure array by merging two filter structures
4360
4365
  ##### Returns
4361
4366
 
4362
4367
 
4363
- - a new filter structure array
4368
+ - A new UI FIlter structure
4364
4369
 
4365
4370
 
4366
4371
 
4367
- #### mergeValues(filter1, filter2, overwrite)
4368
4372
 
4369
- Gets a new value structure array by merging two value structures
4373
+ ### dist/filters/helpers/ui/resolveUIFlatFiltersByParams.js
4374
+
4375
+
4376
+ #### resolveUIFlatFilterByParams(filter, params)
4377
+
4378
+ Resolves conditions between UI flattened filter and given parameters
4370
4379
 
4371
4380
 
4372
4381
 
@@ -4375,9 +4384,8 @@ Gets a new value structure array by merging two value structures
4375
4384
 
4376
4385
  | Name | Type | Description | |
4377
4386
  | ---- | ---- | ----------- | -------- |
4378
- | filter1 | | the target filter structure | &nbsp; |
4379
- | filter2 | | the filter to be used to merge the values | &nbsp; |
4380
- | overwrite | | Flag to overwrite or not the filter values | &nbsp; |
4387
+ | filter | | UI Flatten Filter | &nbsp; |
4388
+ | params | | Parameters to validate | &nbsp; |
4381
4389
 
4382
4390
 
4383
4391
 
@@ -4385,17 +4393,17 @@ Gets a new value structure array by merging two value structures
4385
4393
  ##### Returns
4386
4394
 
4387
4395
 
4388
- - a new value structure array
4396
+ - true: the conditions are satisfied.
4389
4397
 
4390
4398
 
4391
4399
 
4392
4400
 
4393
- ### dist/filters/helpers/common/resolveDatasetConditions.js
4401
+ ### dist/dates/relative/helpers/formatStatement.js
4394
4402
 
4395
4403
 
4396
- #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4404
+ #### formatStatement(statement)
4397
4405
 
4398
- Resolves the conditions by given params
4406
+ Build a proper relative date statement type
4399
4407
 
4400
4408
 
4401
4409
 
@@ -4404,10 +4412,7 @@ Resolves the conditions by given params
4404
4412
 
4405
4413
  | Name | Type | Description | |
4406
4414
  | ---- | ---- | ----------- | -------- |
4407
- | filter | | The dataset structure | &nbsp; |
4408
- | params | | given parameters to validate the dataset | &nbsp; |
4409
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4410
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4415
+ | statement | `RelativeStatement` | | &nbsp; |
4411
4416
 
4412
4417
 
4413
4418
 
@@ -4415,17 +4420,17 @@ Resolves the conditions by given params
4415
4420
  ##### Returns
4416
4421
 
4417
4422
 
4418
- - true: the condition is satisfied
4423
+ - `RelativeStatement`
4419
4424
 
4420
4425
 
4421
4426
 
4422
4427
 
4423
- ### dist/filters/helpers/common/resolveFilterConditions.js
4428
+ ### dist/dates/relative/helpers/getStatementCase.js
4424
4429
 
4425
4430
 
4426
- #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4431
+ #### getStatementCase(includeCurrent, isCalendarDate)
4427
4432
 
4428
- Resolves the conditions by given params
4433
+ Returns a number/constant that identifies a relative date case
4429
4434
 
4430
4435
 
4431
4436
 
@@ -4434,10 +4439,8 @@ Resolves the conditions by given params
4434
4439
 
4435
4440
  | Name | Type | Description | |
4436
4441
  | ---- | ---- | ----------- | -------- |
4437
- | filter | | The filter | &nbsp; |
4438
- | params | | given parameters to validate the filter | &nbsp; |
4439
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4440
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4442
+ | includeCurrent | `boolean` | | &nbsp; |
4443
+ | isCalendarDate | `boolean` | | &nbsp; |
4441
4444
 
4442
4445
 
4443
4446
 
@@ -4445,17 +4448,17 @@ Resolves the conditions by given params
4445
4448
  ##### Returns
4446
4449
 
4447
4450
 
4448
- - true: the condition is satisfied
4451
+ - `number`
4449
4452
 
4450
4453
 
4451
4454
 
4452
4455
 
4453
- ### dist/filters/helpers/common/resolveScopeConditions.js
4456
+ ### dist/dates/relative/helpers/parseDate.js
4454
4457
 
4455
4458
 
4456
- #### resolveScopeConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4459
+ #### parseDate(date)
4457
4460
 
4458
- Resolves the conditions by given params
4461
+ Parses a string date and returns a dayjs date
4459
4462
 
4460
4463
 
4461
4464
 
@@ -4464,10 +4467,7 @@ Resolves the conditions by given params
4464
4467
 
4465
4468
  | Name | Type | Description | |
4466
4469
  | ---- | ---- | ----------- | -------- |
4467
- | filter | | The filter scope structure | &nbsp; |
4468
- | params | | given parameters to validate the filter | &nbsp; |
4469
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4470
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4470
+ | date | `string` `Dayjs` `Date` | | &nbsp; |
4471
4471
 
4472
4472
 
4473
4473
 
@@ -4475,7 +4475,7 @@ Resolves the conditions by given params
4475
4475
  ##### Returns
4476
4476
 
4477
4477
 
4478
- - true: the condition is satisfied
4478
+ - `Dayjs` A dayjs date
4479
4479
 
4480
4480
 
4481
4481