@qrvey/utils 1.2.9-26 → 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-26*
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
-
281
+ - a Filter Data structure
304
282
 
305
283
 
306
- ### dist/dates/helpers/getSeparatorByDateFormat.js
307
284
 
285
+ #### UI21ToFD(uFilterData, version)
308
286
 
309
- #### getSeparatorByDateFormat(format)
310
-
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,74 +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
-
443
- ```javascript
444
- // 1) Year:
445
- getDateRange('2020', 'YEAR');
446
- // Will return:
447
- {
448
- from: '01/01/2020 00:00:00',
449
- to: '12/31/2020 23:59:59'
450
- }
451
-
452
- // 2) Quarter:
453
- getDateRange('Q3 2020', 'QUARTER');
454
- // Will return:
455
- {
456
- from: '07/01/2020 00:00:00',
457
- to: '09/30/2020 23:59:59'
458
- }
459
-
460
- // 3) Month:
461
- getDateRange('Oct 2020', 'MONTH');
462
- // Will return:
463
- {
464
- from: '10/01/2020 00:00:00',
465
- to: '10/31/2020 23:59:59'
466
- }
467
- ```
468
408
 
469
409
 
470
410
  ##### Returns
471
411
 
472
412
 
473
- - `Object` an object with the date range with two string date properties: from and to
474
-
475
-
476
-
477
-
478
- ### dist/dates/relative/Adapter.js
479
-
480
-
481
- #### value()
482
-
483
- Resolves statement and returns statement value
484
-
485
-
413
+ - A new filter data structure v2.1
486
414
 
487
415
 
488
416
 
489
417
 
490
- ##### Returns
418
+ ### dist/filters/adapters/adaptFilterValues.js
491
419
 
492
420
 
493
- - `AbsoluteRange` `string`
421
+ #### adaptFilterValues(filter)
494
422
 
423
+ [TODO: For 2022, eliminate this adapter]
424
+ Gets an adapted filter value array. Validates the enabled property and sets
495
425
 
496
426
 
497
- #### valueAsAnchor()
498
427
 
499
- Resolves statement as an anchor
500
428
 
429
+ ##### Parameters
501
430
 
431
+ | Name | Type | Description | |
432
+ | ---- | ---- | ----------- | -------- |
433
+ | filter | | The filter |   |
502
434
 
503
435
 
504
436
 
@@ -506,63 +438,74 @@ Resolves statement as an anchor
506
438
  ##### Returns
507
439
 
508
440
 
509
- - `string`
441
+ - A new value array with the filled properties.
510
442
 
511
443
 
512
444
 
513
- #### _statementToRange() *private method*
514
445
 
515
- Convert verbal statement to range value
446
+ ### dist/filters/adapters/flatUIToFD.js
516
447
 
517
448
 
449
+ #### flatUIToFD(uFilters, version)
518
450
 
451
+ Generates a filter data structure from the flatttened UI filters.
519
452
 
520
453
 
521
454
 
522
- ##### Returns
523
455
 
456
+ ##### Parameters
524
457
 
525
- - `AbsoluteRange`
458
+ | Name | Type | Description | |
459
+ | ---- | ---- | ----------- | -------- |
460
+ | uFilters | | Array of flattened filters from UI |   |
461
+ | version | | Tag for the version of the filter data structure |   |
526
462
 
527
463
 
528
464
 
529
- #### _resolveAsThis() *private method*
530
465
 
531
- Apply 'this' cursor logic to statement
466
+ ##### Returns
532
467
 
533
468
 
469
+ - a Filter Data.
534
470
 
535
471
 
536
472
 
473
+ #### buildScopes(fbFilters)
537
474
 
538
- ##### 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
539
477
 
540
478
 
541
- - `AbsoluteStatement`
542
479
 
543
480
 
481
+ ##### Parameters
544
482
 
545
- #### _resolveAsTheLast() *private method*
483
+ | Name | Type | Description | |
484
+ | ---- | ---- | ----------- | -------- |
485
+ | fbFilters | | Array of flat filters from UI |   |
546
486
 
547
- Apply 'the last' cursor logic to statement
548
487
 
549
488
 
550
489
 
490
+ ##### Returns
551
491
 
552
492
 
493
+ - an array of scopes structure.
553
494
 
554
- ##### Returns
555
495
 
556
496
 
557
- - `AbsoluteStatement`
497
+ #### buildScope(uFilter)
558
498
 
499
+ Gets an scope structure for the filter data
559
500
 
560
501
 
561
- #### _resolveAsTheNext() *private method*
562
502
 
563
- Apply 'the next' cursor logic to statement
564
503
 
504
+ ##### Parameters
565
505
 
506
+ | Name | Type | Description | |
507
+ | ---- | ---- | ----------- | -------- |
508
+ | uFilter | | UI structure filter |   |
566
509
 
567
510
 
568
511
 
@@ -570,13 +513,13 @@ Apply 'the next' cursor logic to statement
570
513
  ##### Returns
571
514
 
572
515
 
573
- - `AbsoluteStatement`
516
+ - an scope structure
574
517
 
575
518
 
576
519
 
577
- #### replaceNowToken(value, now)
520
+ #### buildDataset(uFilter)
578
521
 
579
- Replace '@now' token inside a string
522
+ Gets an dataset structure for the filter data
580
523
 
581
524
 
582
525
 
@@ -585,8 +528,7 @@ Replace '@now' token inside a string
585
528
 
586
529
  | Name | Type | Description | |
587
530
  | ---- | ---- | ----------- | -------- |
588
- | value | `string` | |   |
589
- | now | `Date` | |   |
531
+ | uFilter | | a UI structure filter |   |
590
532
 
591
533
 
592
534
 
@@ -594,13 +536,13 @@ Replace '@now' token inside a string
594
536
  ##### Returns
595
537
 
596
538
 
597
- - `string`
539
+ - an dataset structure
598
540
 
599
541
 
600
542
 
601
- #### convertRelativeToAbsolute(args)
543
+ #### buildFilter(uFilter)
602
544
 
603
- Returns a range object (date) from a group of statement params
545
+ Gets an filter structure for the filter data
604
546
 
605
547
 
606
548
 
@@ -609,45 +551,25 @@ Returns a range object (date) from a group of statement params
609
551
 
610
552
  | Name | Type | Description | |
611
553
  | ---- | ---- | ----------- | -------- |
612
- | args | `RelativeToAbsoluteStruct` | |   |
613
-
614
-
615
-
554
+ | uFilter | | a UI structure filter |   |
616
555
 
617
- ##### Examples
618
556
 
619
- ```javascript
620
- pivot = '2021-03-03T12:30:40'
621
- unit = month
622
- steps = 2
623
- setTo = END
624
- resolverAsCalendar: true
625
- => Returns '2021-05-31T23:59:59'
626
- ```
627
- ```javascript
628
- pivot = '2021-03-03T12:30:40'
629
- unit = month
630
- steps = -2
631
- setTo = START
632
- resolverAsCalendar: false
633
- => Returns '2021-01-03T00:00:00'
634
- ```
635
557
 
636
558
 
637
559
  ##### Returns
638
560
 
639
561
 
640
- - `string`
562
+ - an filter structure
641
563
 
642
564
 
643
565
 
644
566
 
645
- ### dist/dates/relative/relative.js
567
+ ### dist/filters/adapters/flatUIToLogic.js
646
568
 
647
569
 
648
- #### resolveRelative(statements, clock)
570
+ #### flatUIToLogic(uFilter)
649
571
 
650
- Resolve a list of relative statements according to operator
572
+ Generates a Logic structure from flattened UI filters
651
573
 
652
574
 
653
575
 
@@ -656,44 +578,25 @@ Resolve a list of relative statements according to operator
656
578
 
657
579
  | Name | Type | Description | |
658
580
  | ---- | ---- | ----------- | -------- |
659
- | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
660
- | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
661
-
581
+ | uFilter | | Array of flat filters from UI | &nbsp; |
662
582
 
663
583
 
664
584
 
665
- ##### Examples
666
-
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
-
678
- Output:
679
- { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
680
- ```
681
-
682
585
 
683
586
  ##### Returns
684
587
 
685
588
 
686
- - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
589
+ - The logic structure
687
590
 
688
591
 
689
592
 
690
593
 
691
- ### dist/filters/adapters/FDToFlatUI.js
594
+ ### dist/filters/adapters/flatUIToOldLogic.js
692
595
 
693
596
 
694
- #### FDToFlatUI(filterData, datasetsInfo)
597
+ #### flatUIToOldLogic(uFilters)
695
598
 
696
- Generates a Flattened UI filter structure from Filter Data structure.
599
+ Generates a Logic structure from flattened UI filters
697
600
 
698
601
 
699
602
 
@@ -702,8 +605,7 @@ Generates a Flattened UI filter structure from Filter Data structure.
702
605
 
703
606
  | Name | Type | Description | |
704
607
  | ---- | ---- | ----------- | -------- |
705
- | filterData | | The filter data object. | &nbsp; |
706
- | datasetsInfo | | Collection of datasets information | &nbsp; |
608
+ | uFilters | | Array of flat filters from UI | &nbsp; |
707
609
 
708
610
 
709
611
 
@@ -711,13 +613,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
711
613
  ##### Returns
712
614
 
713
615
 
714
- - a flattened UI filters array
616
+ - The logic structure
715
617
 
716
618
 
717
619
 
718
- #### FD21ToFlatUI(scopes, datasetsInfo)
719
620
 
720
- Generates a Filter Builder Structure from the Filter Data structure v2.1
621
+ ### dist/filters/adapters/flatUIToUI.js
622
+
623
+
624
+ #### flatUIToUI(uFilters, version)
625
+
626
+ Generates a UI filter data structure from the flatttened UI filters.
721
627
 
722
628
 
723
629
 
@@ -726,8 +632,8 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
726
632
 
727
633
  | Name | Type | Description | |
728
634
  | ---- | ---- | ----------- | -------- |
729
- | scopes | | The filter scope section | &nbsp; |
730
- | 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; |
731
637
 
732
638
 
733
639
 
@@ -735,17 +641,14 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
735
641
  ##### Returns
736
642
 
737
643
 
738
- - a flattened UI filters array
739
-
740
-
741
-
644
+ - a UI Filter Data.
742
645
 
743
- ### dist/filters/adapters/FDToLogic.js
744
646
 
745
647
 
746
- #### FDToLogic(filterData)
648
+ #### buildScopes(fbFilters)
747
649
 
748
- Generates a Filter Logic structure from Filter Data structure.
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
749
652
 
750
653
 
751
654
 
@@ -754,7 +657,7 @@ Generates a Filter Logic structure from Filter Data structure.
754
657
 
755
658
  | Name | Type | Description | |
756
659
  | ---- | ---- | ----------- | -------- |
757
- | filterData | | The filter data object. | &nbsp; |
660
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
758
661
 
759
662
 
760
663
 
@@ -762,13 +665,13 @@ Generates a Filter Logic structure from Filter Data structure.
762
665
  ##### Returns
763
666
 
764
667
 
765
- - a filter logic array
668
+ - an array of scopes structure.
766
669
 
767
670
 
768
671
 
769
- #### getLogicBodyFromFD21(filterData)
672
+ #### buildScope(uFilter)
770
673
 
771
- Gets the logic body
674
+ Gets an scope structure for the UI filter data
772
675
 
773
676
 
774
677
 
@@ -777,7 +680,7 @@ Gets the logic body
777
680
 
778
681
  | Name | Type | Description | |
779
682
  | ---- | ---- | ----------- | -------- |
780
- | filterData | | The filter data object | &nbsp; |
683
+ | uFilter | | UI structure filter | &nbsp; |
781
684
 
782
685
 
783
686
 
@@ -785,17 +688,13 @@ Gets the logic body
785
688
  ##### Returns
786
689
 
787
690
 
788
- - a filter logic array
789
-
790
-
791
-
691
+ - an scope structure
792
692
 
793
- ### dist/filters/adapters/FDToUI.js
794
693
 
795
694
 
796
- #### FDToUI(filterData, datasetsInfo)
695
+ #### buildDataset(uFilter)
797
696
 
798
- Generates a UI filter structure from Filter Data structure.
697
+ Gets an dataset structure for the UI filter data
799
698
 
800
699
 
801
700
 
@@ -804,8 +703,7 @@ Generates a UI filter structure from Filter Data structure.
804
703
 
805
704
  | Name | Type | Description | |
806
705
  | ---- | ---- | ----------- | -------- |
807
- | filterData | | The filter data object. | &nbsp; |
808
- | datasetsInfo | | Collection of datasets information | &nbsp; |
706
+ | uFilter | | a UI structure filter | &nbsp; |
809
707
 
810
708
 
811
709
 
@@ -813,13 +711,13 @@ Generates a UI filter structure from Filter Data structure.
813
711
  ##### Returns
814
712
 
815
713
 
816
- - a UI Filters structure
714
+ - an dataset structure
817
715
 
818
716
 
819
717
 
820
- #### FD21ToUI(scopes, section, version, datasetsInfo)
718
+ #### buildFilter(uFilter)
821
719
 
822
- Generates a UI filter Structure from the Filter Data structure v2.1
720
+ Gets an filter structure for the UI filter data
823
721
 
824
722
 
825
723
 
@@ -828,10 +726,7 @@ Generates a UI filter Structure from the Filter Data structure v2.1
828
726
 
829
727
  | Name | Type | Description | |
830
728
  | ---- | ---- | ----------- | -------- |
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; |
729
+ | uFilter | | a UI structure filter | &nbsp; |
835
730
 
836
731
 
837
732
 
@@ -839,17 +734,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
839
734
  ##### Returns
840
735
 
841
736
 
842
- - a UI filter Structure
737
+ - an filter structure
843
738
 
844
739
 
845
740
 
846
741
 
847
- ### dist/filters/adapters/UIToFD.js
742
+ ### dist/filters/adapters/logicToFD.js
848
743
 
849
744
 
850
- #### UIToFD(filterData)
745
+ #### logicToFD(filterData, version)
851
746
 
852
- Generates a Filter Data Structure structure from UI Filter Data structure.
747
+ Generates a filter data structure from the old logic structure (v2.0).
853
748
 
854
749
 
855
750
 
@@ -858,7 +753,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
858
753
 
859
754
  | Name | Type | Description | |
860
755
  | ---- | ---- | ----------- | -------- |
861
- | filterData | | The UI filter data object. | &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; |
862
758
 
863
759
 
864
760
 
@@ -866,13 +762,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
866
762
  ##### Returns
867
763
 
868
764
 
869
- - a Filter Data structure
765
+ - a Filter Data.
870
766
 
871
767
 
872
768
 
873
- #### UI21ToFD(uFilterData, version)
874
769
 
875
- Builds the Fitler Data structure from UI filter data
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.
876
776
 
877
777
 
878
778
 
@@ -881,8 +781,7 @@ Builds the Fitler Data structure from UI filter data
881
781
 
882
782
  | Name | Type | Description | |
883
783
  | ---- | ---- | ----------- | -------- |
884
- | uFilterData | | The UI filter Data object | &nbsp; |
885
- | version | | the version of the structure | &nbsp; |
784
+ | logics | | The old logic structure (v2.0) | &nbsp; |
886
785
 
887
786
 
888
787
 
@@ -890,17 +789,13 @@ Builds the Fitler Data structure from UI filter data
890
789
  ##### Returns
891
790
 
892
791
 
893
- -
894
-
895
-
896
-
792
+ - The Flattened UI Filters array
897
793
 
898
- ### dist/filters/adapters/UIToFlatUI.js
899
794
 
900
795
 
901
- #### UIToFlatUI(filterData, datasetsInfo)
796
+ #### getFilter(filters, filter, getIndex)
902
797
 
903
- Generates a Flattened UI filter structure from UI Filter Data structure.
798
+ Get the filter or the index of the given array, validating an old filter structure.
904
799
 
905
800
 
906
801
 
@@ -909,8 +804,9 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
909
804
 
910
805
  | Name | Type | Description | |
911
806
  | ---- | ---- | ----------- | -------- |
912
- | filterData | | The UI filter data object. | &nbsp; |
913
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &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; |
914
810
 
915
811
 
916
812
 
@@ -918,13 +814,13 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
918
814
  ##### Returns
919
815
 
920
816
 
921
- - a flattened UI filters array
817
+ - the index or the UI filter object
922
818
 
923
819
 
924
820
 
925
- #### UI21ToFlatUI(scopes)
821
+ #### refineRankingValues(values, uiValues)
926
822
 
927
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
823
+ Refines the values of the Ranking column type.
928
824
 
929
825
 
930
826
 
@@ -933,7 +829,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
933
829
 
934
830
  | Name | Type | Description | |
935
831
  | ---- | ---- | ----------- | -------- |
936
- | scopes | | The filter scope section | &nbsp; |
832
+ | values | | the Array of Ranking values | &nbsp; |
833
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
937
834
 
938
835
 
939
836
 
@@ -941,18 +838,17 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
941
838
  ##### Returns
942
839
 
943
840
 
944
- - a flattened UI filters array
841
+ - the array of Ranking values
945
842
 
946
843
 
947
844
 
948
845
 
949
- ### dist/filters/adapters/adaptDateGroupingProperty.js
846
+ ### dist/filters/adapters/logicToUI.js
950
847
 
951
848
 
952
- #### adaptDateGroupingProperty(property)
849
+ #### logicToUI(uFilters, datasetsInfo)
953
850
 
954
- [TODO: For 2022, eliminate this adapter]
955
- Get the new property base on the old date grouping properties
851
+ Generates a UI filter structure from the old logic structure (v2.0).
956
852
 
957
853
 
958
854
 
@@ -961,7 +857,8 @@ Get the new property base on the old date grouping properties
961
857
 
962
858
  | Name | Type | Description | |
963
859
  | ---- | ---- | ----------- | -------- |
964
- | property | | | &nbsp; |
860
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
861
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
965
862
 
966
863
 
967
864
 
@@ -969,17 +866,17 @@ Get the new property base on the old date grouping properties
969
866
  ##### Returns
970
867
 
971
868
 
972
- -
869
+ - a UI Filter Data.
973
870
 
974
871
 
975
872
 
976
873
 
977
- ### dist/filters/adapters/adaptFilterData.js
874
+ ### dist/filters/adapters/transformFilters.js
978
875
 
979
876
 
980
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
877
+ #### transformFilters(oldFiltersObj, section)
981
878
 
982
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
879
+ Transform the old filters structure into the new one
983
880
 
984
881
 
985
882
 
@@ -988,28 +885,77 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
988
885
 
989
886
  | Name | Type | Description | |
990
887
  | ---- | ---- | ----------- | -------- |
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; |
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
+
891
+
994
892
 
995
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
+ ```
996
943
 
997
944
 
998
945
  ##### Returns
999
946
 
1000
947
 
1001
- - A new filter data structure v2.1
948
+ - `Object` an object with the new filters structure
1002
949
 
1003
950
 
1004
951
 
1005
952
 
1006
- ### dist/filters/adapters/adaptFilterValues.js
953
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
1007
954
 
1008
955
 
1009
- #### adaptFilterValues(filter)
956
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1010
957
 
1011
- [TODO: For 2022, eliminate this adapter]
1012
- Gets an adapted filter value array. Validates the enabled property and sets
958
+ [TODO: Make a proper description for this function]
1013
959
 
1014
960
 
1015
961
 
@@ -1018,7 +964,9 @@ Gets an adapted filter value array. Validates the enabled property and sets
1018
964
 
1019
965
  | Name | Type | Description | |
1020
966
  | ---- | ---- | ----------- | -------- |
1021
- | filter | | The filter | &nbsp; |
967
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
968
+ | scopes | | | &nbsp; |
969
+ | currentScope | | | &nbsp; |
1022
970
 
1023
971
 
1024
972
 
@@ -1026,17 +974,17 @@ Gets an adapted filter value array. Validates the enabled property and sets
1026
974
  ##### Returns
1027
975
 
1028
976
 
1029
- - A new value array with the filled properties.
977
+ -
1030
978
 
1031
979
 
1032
980
 
1033
981
 
1034
- ### dist/filters/adapters/flatUIToFD.js
982
+ ### dist/filters/helpers/getAvailableScopes.js
1035
983
 
1036
984
 
1037
- #### flatUIToFD(uFilters, version)
985
+ #### getAvailableScopes(config)
1038
986
 
1039
- Generates a filter data structure from the flatttened UI filters.
987
+ Gets Scopes/Scope IDs by given IDs
1040
988
 
1041
989
 
1042
990
 
@@ -1045,8 +993,7 @@ Generates a filter data structure from the flatttened UI filters.
1045
993
 
1046
994
  | Name | Type | Description | |
1047
995
  | ---- | ---- | ----------- | -------- |
1048
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1049
- | version | | Tag for the version of the filter data structure | &nbsp; |
996
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
1050
997
 
1051
998
 
1052
999
 
@@ -1054,14 +1001,17 @@ Generates a filter data structure from the flatttened UI filters.
1054
1001
  ##### Returns
1055
1002
 
1056
1003
 
1057
- - a Filter Data.
1004
+ - a Scopes/Scope IDs array
1058
1005
 
1059
1006
 
1060
1007
 
1061
- #### buildScopes(fbFilters)
1062
1008
 
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
1009
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1010
+
1011
+
1012
+ #### getAvailableScopesIDsByConfig(config)
1013
+
1014
+ Gets the Scopes IDS for the Available Scope function by any config
1065
1015
 
1066
1016
 
1067
1017
 
@@ -1070,7 +1020,7 @@ Also, adds and organizes filters by datasets
1070
1020
 
1071
1021
  | Name | Type | Description | |
1072
1022
  | ---- | ---- | ----------- | -------- |
1073
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1023
+ | config | | any config | &nbsp; |
1074
1024
 
1075
1025
 
1076
1026
 
@@ -1078,13 +1028,17 @@ Also, adds and organizes filters by datasets
1078
1028
  ##### Returns
1079
1029
 
1080
1030
 
1081
- - an array of scopes structure.
1031
+ - a Available Scope IDS config
1082
1032
 
1083
1033
 
1084
1034
 
1085
- #### buildScope(uFilter)
1086
1035
 
1087
- Gets an scope structure for the filter data
1036
+ ### dist/filters/helpers/getScopesByHierarchy.js
1037
+
1038
+
1039
+ #### getScopesByHierarchy(scopes, currentScope)
1040
+
1041
+ [TODO: Make a description for this]
1088
1042
 
1089
1043
 
1090
1044
 
@@ -1093,7 +1047,8 @@ Gets an scope structure for the filter data
1093
1047
 
1094
1048
  | Name | Type | Description | |
1095
1049
  | ---- | ---- | ----------- | -------- |
1096
- | uFilter | | UI structure filter | &nbsp; |
1050
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1051
+ | currentScope | | Current scope type | &nbsp; |
1097
1052
 
1098
1053
 
1099
1054
 
@@ -1101,13 +1056,17 @@ Gets an scope structure for the filter data
1101
1056
  ##### Returns
1102
1057
 
1103
1058
 
1104
- - an scope structure
1059
+ - A new array of Scopes/Scope IDs
1105
1060
 
1106
1061
 
1107
1062
 
1108
- #### buildDataset(uFilter)
1109
1063
 
1110
- Gets an dataset structure for the filter data
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.
1111
1070
 
1112
1071
 
1113
1072
 
@@ -1116,7 +1075,8 @@ Gets an dataset structure for the filter data
1116
1075
 
1117
1076
  | Name | Type | Description | |
1118
1077
  | ---- | ---- | ----------- | -------- |
1119
- | uFilter | | a UI structure filter | &nbsp; |
1078
+ | monthYearDate | | String of [mm/dd/yyyy] date | &nbsp; |
1079
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1120
1080
 
1121
1081
 
1122
1082
 
@@ -1124,13 +1084,17 @@ Gets an dataset structure for the filter data
1124
1084
  ##### Returns
1125
1085
 
1126
1086
 
1127
- - an dataset structure
1087
+ - The date object or the date in milliseconds
1128
1088
 
1129
1089
 
1130
1090
 
1131
- #### buildFilter(uFilter)
1132
1091
 
1133
- Gets an filter 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.
1134
1098
 
1135
1099
 
1136
1100
 
@@ -1139,7 +1103,8 @@ Gets an filter structure for the filter data
1139
1103
 
1140
1104
  | Name | Type | Description | |
1141
1105
  | ---- | ---- | ----------- | -------- |
1142
- | uFilter | | a UI structure filter | &nbsp; |
1106
+ | monthYearDate | | String of [Month Year] date | &nbsp; |
1107
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1143
1108
 
1144
1109
 
1145
1110
 
@@ -1147,17 +1112,17 @@ Gets an filter structure for the filter data
1147
1112
  ##### Returns
1148
1113
 
1149
1114
 
1150
- - an filter structure
1115
+ - The date object or the date in milliseconds
1151
1116
 
1152
1117
 
1153
1118
 
1154
1119
 
1155
- ### dist/filters/adapters/flatUIToLogic.js
1120
+ ### dist/dates/adapters/quarterYearToDate.js
1156
1121
 
1157
1122
 
1158
- #### flatUIToLogic(uFilter)
1123
+ #### quarterYearToDate(quarterYearDate, time)
1159
1124
 
1160
- Generates a Logic structure from flattened UI filters
1125
+ Transforms String Date from a [Quarter Year] format to Date object.
1161
1126
 
1162
1127
 
1163
1128
 
@@ -1166,7 +1131,8 @@ Generates a Logic structure from flattened UI filters
1166
1131
 
1167
1132
  | Name | Type | Description | |
1168
1133
  | ---- | ---- | ----------- | -------- |
1169
- | uFilter | | Array of flat filters from UI | &nbsp; |
1134
+ | quarterYearDate | | String of [Quarter Year] date | &nbsp; |
1135
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1170
1136
 
1171
1137
 
1172
1138
 
@@ -1174,17 +1140,17 @@ Generates a Logic structure from flattened UI filters
1174
1140
  ##### Returns
1175
1141
 
1176
1142
 
1177
- - The logic structure
1143
+ - The date object or the date in milliseconds
1178
1144
 
1179
1145
 
1180
1146
 
1181
1147
 
1182
- ### dist/filters/adapters/flatUIToOldLogic.js
1148
+ ### dist/dates/adapters/weekYearToDate.js
1183
1149
 
1184
1150
 
1185
- #### flatUIToOldLogic(uFilters)
1151
+ #### weekYearToDate(date, time)
1186
1152
 
1187
- Generates a Logic structure from flattened UI filters
1153
+ Transforms String Date from a [Week Year] format to Date object.
1188
1154
 
1189
1155
 
1190
1156
 
@@ -1193,7 +1159,8 @@ Generates a Logic structure from flattened UI filters
1193
1159
 
1194
1160
  | Name | Type | Description | |
1195
1161
  | ---- | ---- | ----------- | -------- |
1196
- | uFilters | | Array of flat filters from UI | &nbsp; |
1162
+ | date | | String of [Week Year] date | &nbsp; |
1163
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1197
1164
 
1198
1165
 
1199
1166
 
@@ -1201,17 +1168,17 @@ Generates a Logic structure from flattened UI filters
1201
1168
  ##### Returns
1202
1169
 
1203
1170
 
1204
- - The logic structure
1171
+ - The date object or the date in milliseconds
1205
1172
 
1206
1173
 
1207
1174
 
1208
1175
 
1209
- ### dist/filters/adapters/flatUIToUI.js
1176
+ ### dist/dates/adapters/yearToDate.js
1210
1177
 
1211
1178
 
1212
- #### flatUIToUI(uFilters, version)
1179
+ #### yearToDate(yearDate, time)
1213
1180
 
1214
- Generates a UI filter data structure from the flatttened UI filters.
1181
+ Transforms String Date from a [Year] format to Date object.
1215
1182
 
1216
1183
 
1217
1184
 
@@ -1220,8 +1187,8 @@ Generates a UI filter data structure from the flatttened UI filters.
1220
1187
 
1221
1188
  | Name | Type | Description | |
1222
1189
  | ---- | ---- | ----------- | -------- |
1223
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
- | version | | Tag for the version of the filter data structure | &nbsp; |
1190
+ | yearDate | | String of [Year] date | &nbsp; |
1191
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1225
1192
 
1226
1193
 
1227
1194
 
@@ -1229,14 +1196,17 @@ Generates a UI filter data structure from the flatttened UI filters.
1229
1196
  ##### Returns
1230
1197
 
1231
1198
 
1232
- - a UI Filter Data.
1199
+ - The date object or the date in milliseconds
1233
1200
 
1234
1201
 
1235
1202
 
1236
- #### buildScopes(fbFilters)
1237
1203
 
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
1204
+ ### dist/dates/helpers/getDateByDateFormat.js
1205
+
1206
+
1207
+ #### getDateByDateFormat(date, format, time)
1208
+
1209
+ Gets a Date Object instance by a Date format
1240
1210
 
1241
1211
 
1242
1212
 
@@ -1245,7 +1215,9 @@ Also, adds and organizes filters by datasets
1245
1215
 
1246
1216
  | Name | Type | Description | |
1247
1217
  | ---- | ---- | ----------- | -------- |
1248
- | fbFilters | | 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; |
1249
1221
 
1250
1222
 
1251
1223
 
@@ -1253,13 +1225,17 @@ Also, adds and organizes filters by datasets
1253
1225
  ##### Returns
1254
1226
 
1255
1227
 
1256
- - an array of scopes structure.
1228
+ - a Date object, milisecond time or the same value if date format does not match.
1257
1229
 
1258
1230
 
1259
1231
 
1260
- #### buildScope(uFilter)
1261
1232
 
1262
- Gets an scope structure for the UI filter data
1233
+ ### dist/dates/helpers/getDateFormatByProperty.js
1234
+
1235
+
1236
+ #### getDateFormatByProperty(property)
1237
+
1238
+ Gets the date format by the given property
1263
1239
 
1264
1240
 
1265
1241
 
@@ -1268,7 +1244,7 @@ Gets an scope structure for the UI filter data
1268
1244
 
1269
1245
  | Name | Type | Description | |
1270
1246
  | ---- | ---- | ----------- | -------- |
1271
- | uFilter | | UI structure filter | &nbsp; |
1247
+ | property | | The Column Property | &nbsp; |
1272
1248
 
1273
1249
 
1274
1250
 
@@ -1276,13 +1252,17 @@ Gets an scope structure for the UI filter data
1276
1252
  ##### Returns
1277
1253
 
1278
1254
 
1279
- - an scope structure
1255
+ - The date format
1280
1256
 
1281
1257
 
1282
1258
 
1283
- #### buildDataset(uFilter)
1284
1259
 
1285
- Gets an dataset structure for the UI filter data
1260
+ ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
1261
+
1262
+
1263
+ #### getDateFormatRegularExpressionInArray(dateFormat)
1264
+
1265
+ Gets an array of regular expressions by the given date format
1286
1266
 
1287
1267
 
1288
1268
 
@@ -1291,7 +1271,7 @@ Gets an dataset structure for the UI filter data
1291
1271
 
1292
1272
  | Name | Type | Description | |
1293
1273
  | ---- | ---- | ----------- | -------- |
1294
- | uFilter | | a UI structure filter | &nbsp; |
1274
+ | dateFormat | | the date format | &nbsp; |
1295
1275
 
1296
1276
 
1297
1277
 
@@ -1299,13 +1279,17 @@ Gets an dataset structure for the UI filter data
1299
1279
  ##### Returns
1300
1280
 
1301
1281
 
1302
- - an dataset structure
1282
+ - an array of regular expressions
1303
1283
 
1304
1284
 
1305
1285
 
1306
- #### buildFilter(uFilter)
1307
1286
 
1308
- Gets an filter 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
1309
1293
 
1310
1294
 
1311
1295
 
@@ -1314,7 +1298,7 @@ Gets an filter structure for the UI filter data
1314
1298
 
1315
1299
  | Name | Type | Description | |
1316
1300
  | ---- | ---- | ----------- | -------- |
1317
- | uFilter | | a UI structure filter | &nbsp; |
1301
+ | format | | the date format | &nbsp; |
1318
1302
 
1319
1303
 
1320
1304
 
@@ -1322,17 +1306,18 @@ Gets an filter structure for the UI filter data
1322
1306
  ##### Returns
1323
1307
 
1324
1308
 
1325
- - an filter structure
1309
+ - a separator string
1326
1310
 
1327
1311
 
1328
1312
 
1329
1313
 
1330
- ### dist/filters/adapters/logicToFD.js
1314
+ ### dist/dates/helpers/getWeek.js
1331
1315
 
1332
1316
 
1333
- #### logicToFD(filterData, version)
1317
+ #### getWeek(date)
1334
1318
 
1335
- Generates a filter data structure from the old logic structure (v2.0).
1319
+ Gets the week number of the year
1320
+ Additionally, the month and the year
1336
1321
 
1337
1322
 
1338
1323
 
@@ -1341,8 +1326,7 @@ Generates a filter data structure from the old logic structure (v2.0).
1341
1326
 
1342
1327
  | Name | Type | Description | |
1343
1328
  | ---- | ---- | ----------- | -------- |
1344
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
- | version | | Tag for the version of the filter data structure | &nbsp; |
1329
+ | date | | the date object | &nbsp; |
1346
1330
 
1347
1331
 
1348
1332
 
@@ -1350,17 +1334,20 @@ Generates a filter data structure from the old logic structure (v2.0).
1350
1334
  ##### Returns
1351
1335
 
1352
1336
 
1353
- - a Filter Data.
1337
+ - an object with the week, month and year.
1354
1338
 
1355
1339
 
1356
1340
 
1357
1341
 
1358
- ### dist/filters/adapters/logicToFlatUI.js
1342
+ ### dist/dates/helpers/validateDate.js
1359
1343
 
1360
1344
 
1361
- #### logicToFlatUI(logics)
1345
+ #### validateDate(date, format)
1362
1346
 
1363
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
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
1364
1351
 
1365
1352
 
1366
1353
 
@@ -1369,7 +1356,8 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1369
1356
 
1370
1357
  | Name | Type | Description | |
1371
1358
  | ---- | ---- | ----------- | -------- |
1372
- | logics | | The old logic structure (v2.0) | &nbsp; |
1359
+ | date | | String of date | &nbsp; |
1360
+ | format | | String of the format to validate | &nbsp; |
1373
1361
 
1374
1362
 
1375
1363
 
@@ -1377,13 +1365,17 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1377
1365
  ##### Returns
1378
1366
 
1379
1367
 
1380
- - The Flattened UI Filters array
1368
+ - True if it is valid or not. Undefined if date is undefined
1381
1369
 
1382
1370
 
1383
1371
 
1384
- #### getFilter(filters, filter, getIndex)
1385
1372
 
1386
- Get the filter or the index of the given array, validating an old filter structure.
1373
+ ### dist/dates/helpers/validateDateByDateFormat.js
1374
+
1375
+
1376
+ #### validateDateByDateFormat(date, dateForma)
1377
+
1378
+ Validates the given string as Date by its date format.
1387
1379
 
1388
1380
 
1389
1381
 
@@ -1392,9 +1384,8 @@ Get the filter or the index of the given array, validating an old filter structu
1392
1384
 
1393
1385
  | Name | Type | Description | |
1394
1386
  | ---- | ---- | ----------- | -------- |
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; |
1387
+ | date | | a string to validate as date form | &nbsp; |
1388
+ | dateForma | | the format of the date to validate the string | &nbsp; |
1398
1389
 
1399
1390
 
1400
1391
 
@@ -1402,13 +1393,17 @@ Get the filter or the index of the given array, validating an old filter structu
1402
1393
  ##### Returns
1403
1394
 
1404
1395
 
1405
- - the index or the UI filter object
1396
+ - true: the string is a valida date
1406
1397
 
1407
1398
 
1408
1399
 
1409
- #### refineRankingValues(values, uiValues)
1410
1400
 
1411
- Refines the values of the Ranking column type.
1401
+ ### dist/dates/range/getDateRange.js
1402
+
1403
+
1404
+ #### getDateRange(value, dateGroupLabel, withTime)
1405
+
1406
+ Get date range object from a string date value
1412
1407
 
1413
1408
 
1414
1409
 
@@ -1417,36 +1412,58 @@ Refines the values of the Ranking column type.
1417
1412
 
1418
1413
  | Name | Type | Description | |
1419
1414
  | ---- | ---- | ----------- | -------- |
1420
- | values | | the Array of Ranking values | &nbsp; |
1421
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
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; |
1422
1418
 
1423
1419
 
1424
1420
 
1425
1421
 
1426
- ##### Returns
1422
+ ##### Examples
1423
+
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
+ }
1427
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
+ }
1428
1440
 
1429
- - the array of Ranking values
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
+ ```
1430
1449
 
1431
1450
 
1451
+ ##### Returns
1432
1452
 
1433
1453
 
1434
- ### dist/filters/adapters/logicToUI.js
1454
+ - `Object` an object with the date range with two string date properties: from and to
1435
1455
 
1436
1456
 
1437
- #### logicToUI(uFilters, datasetsInfo)
1438
1457
 
1439
- Generates a UI filter structure from the old logic structure (v2.0).
1440
1458
 
1459
+ ### dist/dates/relative/Adapter.js
1441
1460
 
1442
1461
 
1462
+ #### value()
1463
+
1464
+ Resolves statement and returns statement value
1443
1465
 
1444
- ##### Parameters
1445
1466
 
1446
- | Name | Type | Description | |
1447
- | ---- | ---- | ----------- | -------- |
1448
- | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1450
1467
 
1451
1468
 
1452
1469
 
@@ -1454,145 +1471,93 @@ Generates a UI filter structure from the old logic structure (v2.0).
1454
1471
  ##### Returns
1455
1472
 
1456
1473
 
1457
- - a UI Filter Data.
1474
+ - `AbsoluteRange` `string`
1458
1475
 
1459
1476
 
1460
1477
 
1478
+ #### valueAsAnchor()
1461
1479
 
1462
- ### dist/filters/adapters/transformFilters.js
1480
+ Resolves statement as an anchor
1463
1481
 
1464
1482
 
1465
- #### transformFilters(oldFiltersObj, section)
1466
1483
 
1467
- Transform the old filters structure into the new one
1468
1484
 
1469
1485
 
1470
1486
 
1487
+ ##### Returns
1471
1488
 
1472
- ##### Parameters
1473
1489
 
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; |
1490
+ - `string`
1478
1491
 
1479
1492
 
1480
1493
 
1494
+ #### _statementToRange() *private method*
1481
1495
 
1482
- ##### Examples
1496
+ Convert verbal statement to range value
1483
1497
 
1484
- ```javascript
1485
1498
 
1486
- const oldPreferenceFilters = {
1487
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1488
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1489
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1490
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1491
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1492
- "formulaId": null,
1493
- "panelId": null,
1494
- "values": [
1495
- {
1496
- "EQUALS": [
1497
- {
1498
- "id": "AK4M8UV2a0",
1499
- "value": "A",
1500
- "enabled": true,
1501
- "imageUrl": null
1502
- },
1503
- {
1504
- "id": "AK4M8UV2a1",
1505
- "value": "B",
1506
- "enabled": true,
1507
- "imageUrl": null
1508
- }
1509
- ]
1510
- }
1511
- ],
1512
- "bucketId": null,
1513
- "text": "MC",
1514
- "title": "MC",
1515
- "type": "SINGLE_CHOICE",
1516
- "qid": "AK4M8UV2",
1517
- "dataset": {
1518
- "sourceid": "xYOQAdpqT",
1519
- "name": "Form All Questions",
1520
- "qrveyid": "xYOQAdpqT",
1521
- "text": "Form All Questions",
1522
- "linkid": 0
1523
- },
1524
- "enabled": true,
1525
- "linked": null
1526
- }
1527
- };
1528
1499
 
1529
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
- ```
1531
1500
 
1532
1501
 
1533
- ##### Returns
1534
1502
 
1503
+ ##### Returns
1535
1504
 
1536
- - `Object` an object with the new filters structure
1537
1505
 
1506
+ - `AbsoluteRange`
1538
1507
 
1539
1508
 
1540
1509
 
1541
- ### dist/filters/classes/FilterInputErrorHandler.js
1510
+ #### _resolveAsThis() *private method*
1542
1511
 
1512
+ Apply 'this' cursor logic to statement
1543
1513
 
1544
- #### new FilterInputErrorHandler()
1545
1514
 
1546
1515
 
1547
1516
 
1548
1517
 
1549
1518
 
1519
+ ##### Returns
1550
1520
 
1551
1521
 
1522
+ - `AbsoluteStatement`
1552
1523
 
1553
- ##### Returns
1554
1524
 
1555
1525
 
1556
- - `Void`
1526
+ #### _resolveAsTheLast() *private method*
1557
1527
 
1528
+ Apply 'the last' cursor logic to statement
1558
1529
 
1559
1530
 
1560
1531
 
1561
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
1562
1532
 
1563
1533
 
1564
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1565
1534
 
1566
- [TODO: Make a proper description for this function]
1535
+ ##### Returns
1567
1536
 
1568
1537
 
1538
+ - `AbsoluteStatement`
1569
1539
 
1570
1540
 
1571
- ##### Parameters
1572
1541
 
1573
- | Name | Type | Description | |
1574
- | ---- | ---- | ----------- | -------- |
1575
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
- | scopes | | | &nbsp; |
1577
- | currentScope | | | &nbsp; |
1542
+ #### _resolveAsTheNext() *private method*
1578
1543
 
1544
+ Apply 'the next' cursor logic to statement
1579
1545
 
1580
1546
 
1581
1547
 
1582
- ##### Returns
1583
1548
 
1584
1549
 
1585
- -
1586
1550
 
1551
+ ##### Returns
1587
1552
 
1588
1553
 
1554
+ - `AbsoluteStatement`
1589
1555
 
1590
- ### dist/filters/helpers/getAvailableScopes.js
1591
1556
 
1592
1557
 
1593
- #### getAvailableScopes(config)
1558
+ #### replaceNowToken(value, now)
1594
1559
 
1595
- Gets Scopes/Scope IDs by given IDs
1560
+ Replace '@now' token inside a string
1596
1561
 
1597
1562
 
1598
1563
 
@@ -1601,7 +1566,8 @@ Gets Scopes/Scope IDs by given IDs
1601
1566
 
1602
1567
  | Name | Type | Description | |
1603
1568
  | ---- | ---- | ----------- | -------- |
1604
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
1569
+ | value | `string` | | &nbsp; |
1570
+ | now | `Date` | | &nbsp; |
1605
1571
 
1606
1572
 
1607
1573
 
@@ -1609,17 +1575,13 @@ Gets Scopes/Scope IDs by given IDs
1609
1575
  ##### Returns
1610
1576
 
1611
1577
 
1612
- - a Scopes/Scope IDs array
1613
-
1614
-
1615
-
1578
+ - `string`
1616
1579
 
1617
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1618
1580
 
1619
1581
 
1620
- #### getAvailableScopesIDsByConfig(config)
1582
+ #### convertRelativeToAbsolute(args)
1621
1583
 
1622
- Gets the Scopes IDS for the Available Scope function by any config
1584
+ Returns a range object (date) from a group of statement params
1623
1585
 
1624
1586
 
1625
1587
 
@@ -1628,25 +1590,45 @@ Gets the Scopes IDS for the Available Scope function by any config
1628
1590
 
1629
1591
  | Name | Type | Description | |
1630
1592
  | ---- | ---- | ----------- | -------- |
1631
- | config | | any config | &nbsp; |
1593
+ | args | `RelativeToAbsoluteStruct` | | &nbsp; |
1632
1594
 
1633
1595
 
1634
1596
 
1635
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
+
1617
+
1636
1618
  ##### Returns
1637
1619
 
1638
1620
 
1639
- - a Available Scope IDS config
1621
+ - `string`
1640
1622
 
1641
1623
 
1642
1624
 
1643
1625
 
1644
- ### dist/filters/helpers/getScopesByHierarchy.js
1626
+ ### dist/dates/relative/relative.js
1645
1627
 
1646
1628
 
1647
- #### getScopesByHierarchy(scopes, currentScope)
1629
+ #### resolveRelative(statements, clock)
1648
1630
 
1649
- [TODO: Make a description for this]
1631
+ Resolve a list of relative statements according to operator
1650
1632
 
1651
1633
 
1652
1634
 
@@ -1655,16 +1637,34 @@ Gets the Scopes IDS for the Available Scope function by any config
1655
1637
 
1656
1638
  | Name | Type | Description | |
1657
1639
  | ---- | ---- | ----------- | -------- |
1658
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
- | currentScope | | Current scope type | &nbsp; |
1640
+ | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
1641
+ | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
1642
+
1643
+
1644
+
1645
+
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
 
@@ -3680,12 +3598,12 @@ Gets filters from Filter Data by Scopes/Scope IDs.
3680
3598
 
3681
3599
 
3682
3600
 
3683
- ### dist/filters/helpers/common/getFiltersByVisibility.js
3601
+ ### dist/filters/helpers/common/getMergeFiltersSettings.js
3684
3602
 
3685
3603
 
3686
- #### getFiltersByVisibility(filterData, scopes)
3604
+ #### getMergeFiltersSettings(settings)
3687
3605
 
3688
- Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3606
+ Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
3689
3607
 
3690
3608
 
3691
3609
 
@@ -3694,8 +3612,7 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3694
3612
 
3695
3613
  | Name | Type | Description | |
3696
3614
  | ---- | ---- | ----------- | -------- |
3697
- | filterData | | a Filter Data or UI Filter Data | &nbsp; |
3698
- | scopes | | a Scopes/Scope IDs array | &nbsp; |
3615
+ | settings | | an object to the MergeFilters settings | &nbsp; |
3699
3616
 
3700
3617
 
3701
3618
 
@@ -3703,17 +3620,17 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3703
3620
  ##### Returns
3704
3621
 
3705
3622
 
3706
- - a new Filter Data
3623
+ - a new MergeFilters settings object.
3707
3624
 
3708
3625
 
3709
3626
 
3710
3627
 
3711
- ### dist/filters/helpers/common/getMergeFiltersSettings.js
3628
+ ### dist/filters/helpers/common/getFiltersByVisibility.js
3712
3629
 
3713
3630
 
3714
- #### getMergeFiltersSettings(settings)
3631
+ #### getFiltersByVisibility(filterData, scopes)
3715
3632
 
3716
- Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
3633
+ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3717
3634
 
3718
3635
 
3719
3636
 
@@ -3722,7 +3639,8 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
3722
3639
 
3723
3640
  | Name | Type | Description | |
3724
3641
  | ---- | ---- | ----------- | -------- |
3725
- | settings | | an object to the MergeFilters settings | &nbsp; |
3642
+ | filterData | | a Filter Data or UI Filter Data | &nbsp; |
3643
+ | scopes | | a Scopes/Scope IDs array | &nbsp; |
3726
3644
 
3727
3645
 
3728
3646
 
@@ -3730,7 +3648,7 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
3730
3648
  ##### Returns
3731
3649
 
3732
3650
 
3733
- - a new MergeFilters settings object.
3651
+ - a new Filter Data
3734
3652
 
3735
3653
 
3736
3654
 
@@ -4480,4 +4398,86 @@ Resolves conditions between UI flattened filter and given parameters
4480
4398
 
4481
4399
 
4482
4400
 
4401
+ ### dist/dates/relative/helpers/formatStatement.js
4402
+
4403
+
4404
+ #### formatStatement(statement)
4405
+
4406
+ Build a proper relative date statement type
4407
+
4408
+
4409
+
4410
+
4411
+ ##### Parameters
4412
+
4413
+ | Name | Type | Description | |
4414
+ | ---- | ---- | ----------- | -------- |
4415
+ | statement | `RelativeStatement` | | &nbsp; |
4416
+
4417
+
4418
+
4419
+
4420
+ ##### Returns
4421
+
4422
+
4423
+ - `RelativeStatement`
4424
+
4425
+
4426
+
4427
+
4428
+ ### dist/dates/relative/helpers/getStatementCase.js
4429
+
4430
+
4431
+ #### getStatementCase(includeCurrent, isCalendarDate)
4432
+
4433
+ Returns a number/constant that identifies a relative date case
4434
+
4435
+
4436
+
4437
+
4438
+ ##### Parameters
4439
+
4440
+ | Name | Type | Description | |
4441
+ | ---- | ---- | ----------- | -------- |
4442
+ | includeCurrent | `boolean` | | &nbsp; |
4443
+ | isCalendarDate | `boolean` | | &nbsp; |
4444
+
4445
+
4446
+
4447
+
4448
+ ##### Returns
4449
+
4450
+
4451
+ - `number`
4452
+
4453
+
4454
+
4455
+
4456
+ ### dist/dates/relative/helpers/parseDate.js
4457
+
4458
+
4459
+ #### parseDate(date)
4460
+
4461
+ Parses a string date and returns a dayjs date
4462
+
4463
+
4464
+
4465
+
4466
+ ##### Parameters
4467
+
4468
+ | Name | Type | Description | |
4469
+ | ---- | ---- | ----------- | -------- |
4470
+ | date | `string` `Dayjs` `Date` | | &nbsp; |
4471
+
4472
+
4473
+
4474
+
4475
+ ##### Returns
4476
+
4477
+
4478
+ - `Dayjs` A dayjs date
4479
+
4480
+
4481
+
4482
+
4483
4483
  *Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*