@qrvey/utils 1.2.9-2 → 1.2.9-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +682 -682
  2. package/dist/cjs/filters/adapters/FDToFlatUI.js +0 -2
  3. package/dist/cjs/filters/adapters/FDToUI.js +1 -2
  4. package/dist/cjs/filters/adapters/UIToFD.js +0 -1
  5. package/dist/cjs/filters/adapters/UIToFlatUI.js +0 -2
  6. package/dist/cjs/filters/adapters/UIToOldLogic.js +1 -1
  7. package/dist/cjs/filters/adapters/flatUIToOldLogic.js +1 -1
  8. package/dist/cjs/filters/adapters/flatUIToUI.js +0 -2
  9. package/dist/cjs/filters/adapters/logicToFlatUI.js +0 -2
  10. package/dist/cjs/filters/helpers/ui/getUIValues.d.ts +2 -1
  11. package/dist/cjs/filters/helpers/ui/getUIValues.js +25 -12
  12. package/dist/cjs/filters/interfaces/ui/IFUFilter.d.ts +1 -1
  13. package/dist/cjs/filters/interfaces/ui/IFUUIValueSettings.d.ts +6 -0
  14. package/dist/cjs/filters/interfaces/ui/IFUUIValueSettings.js +2 -0
  15. package/dist/cjs/filters/interfaces/ui/index.d.ts +1 -0
  16. package/dist/cjs/filters/interfaces/ui/index.js +1 -0
  17. package/dist/cjs/globalization/interfaces/panel/II18nPanelErrors.d.ts +11 -9
  18. package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +1 -1
  19. package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +11 -9
  20. package/dist/filters/adapters/FDToFlatUI.js +0 -2
  21. package/dist/filters/adapters/FDToUI.js +1 -2
  22. package/dist/filters/adapters/UIToFD.js +0 -1
  23. package/dist/filters/adapters/UIToFlatUI.js +0 -2
  24. package/dist/filters/adapters/UIToOldLogic.js +1 -1
  25. package/dist/filters/adapters/flatUIToOldLogic.js +1 -1
  26. package/dist/filters/adapters/flatUIToUI.js +0 -2
  27. package/dist/filters/adapters/logicToFlatUI.js +0 -2
  28. package/dist/filters/helpers/ui/getUIValues.d.ts +2 -1
  29. package/dist/filters/helpers/ui/getUIValues.js +25 -12
  30. package/dist/filters/interfaces/ui/IFUFilter.d.ts +1 -1
  31. package/dist/filters/interfaces/ui/IFUUIValueSettings.d.ts +6 -0
  32. package/dist/filters/interfaces/ui/IFUUIValueSettings.js +1 -0
  33. package/dist/filters/interfaces/ui/index.d.ts +1 -0
  34. package/dist/filters/interfaces/ui/index.js +1 -0
  35. package/dist/globalization/interfaces/panel/II18nPanelErrors.d.ts +11 -9
  36. package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +1 -1
  37. package/dist/globalization/labels/panel/I18N_PANEL.js +11 -9
  38. package/package.json +1 -1
  39. package/src/filters/adapters/FDToFlatUI.ts +0 -2
  40. package/src/filters/adapters/FDToUI.ts +0 -2
  41. package/src/filters/adapters/UIToFD.ts +0 -1
  42. package/src/filters/adapters/UIToFlatUI.ts +0 -2
  43. package/src/filters/adapters/UIToOldLogic.ts +1 -1
  44. package/src/filters/adapters/flatUIToOldLogic.ts +1 -1
  45. package/src/filters/adapters/flatUIToUI.ts +0 -2
  46. package/src/filters/adapters/logicToFlatUI.ts +1 -3
  47. package/src/filters/helpers/ui/getUIValues.ts +28 -12
  48. package/src/filters/interfaces/ui/IFUFilter.ts +1 -1
  49. package/src/filters/interfaces/ui/IFUUIValueSettings.ts +7 -0
  50. package/src/filters/interfaces/ui/index.ts +1 -0
  51. package/src/globalization/interfaces/panel/II18nPanelErrors.ts +11 -9
  52. package/src/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.ts +1 -1
  53. package/src/globalization/labels/panel/I18N_PANEL.ts +11 -9
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-2*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-3*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -80,12 +80,12 @@ Get a text and evaluate if it matchs with a token box label.
80
80
 
81
81
 
82
82
 
83
- ### dist/filters/adapters/FDToFlatUI.js
83
+ ### dist/dates/adapters/mdyDateToDate.js
84
84
 
85
85
 
86
- #### FDToFlatUI(filterData, datasetsInfo)
86
+ #### mdyDateToDate(monthYearDate, time)
87
87
 
88
- Generates a Flattened UI filter structure from Filter Data structure.
88
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
89
89
 
90
90
 
91
91
 
@@ -94,8 +94,8 @@ Generates a Flattened UI filter structure from Filter Data structure.
94
94
 
95
95
  | Name | Type | Description | |
96
96
  | ---- | ---- | ----------- | -------- |
97
- | filterData | | The filter data object. |   |
98
- | datasetsInfo | | Collection of datasets information |   |
97
+ | monthYearDate | | String of [mm/dd/yyyy] date |   |
98
+ | time | | Flag to parse the object date to milliseconds. |   |
99
99
 
100
100
 
101
101
 
@@ -103,13 +103,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
103
103
  ##### Returns
104
104
 
105
105
 
106
- - a flattened UI filters array
106
+ - The date object or the date in milliseconds
107
107
 
108
108
 
109
109
 
110
- #### FD21ToFlatUI(scopes, datasetsInfo)
111
110
 
112
- Generates a Filter Builder Structure from the Filter Data structure v2.1
111
+ ### dist/dates/adapters/monthYearToDate.js
112
+
113
+
114
+ #### monthYearToDate(monthYearDate, time)
115
+
116
+ Transforms String Date from a [Month Year] format to Date object.
113
117
 
114
118
 
115
119
 
@@ -118,8 +122,8 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
118
122
 
119
123
  | Name | Type | Description | |
120
124
  | ---- | ---- | ----------- | -------- |
121
- | scopes | | The filter scope section |   |
122
- | datasetsInfo | | Collection of datasets information |   |
125
+ | monthYearDate | | String of [Month Year] date |   |
126
+ | time | | Flag to parse the object date to milliseconds. |   |
123
127
 
124
128
 
125
129
 
@@ -127,17 +131,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
127
131
  ##### Returns
128
132
 
129
133
 
130
- - a flattened UI filters array
134
+ - The date object or the date in milliseconds
131
135
 
132
136
 
133
137
 
134
138
 
135
- ### dist/filters/adapters/FDToLogic.js
139
+ ### dist/dates/adapters/quarterYearToDate.js
136
140
 
137
141
 
138
- #### FDToLogic(filterData)
142
+ #### quarterYearToDate(quarterYearDate, time)
139
143
 
140
- Generates a Filter Logic structure from Filter Data structure.
144
+ Transforms String Date from a [Quarter Year] format to Date object.
141
145
 
142
146
 
143
147
 
@@ -146,7 +150,8 @@ Generates a Filter Logic structure from Filter Data structure.
146
150
 
147
151
  | Name | Type | Description | |
148
152
  | ---- | ---- | ----------- | -------- |
149
- | filterData | | The filter data object. |   |
153
+ | quarterYearDate | | String of [Quarter Year] date |   |
154
+ | time | | Flag to parse the object date to milliseconds. |   |
150
155
 
151
156
 
152
157
 
@@ -154,13 +159,17 @@ Generates a Filter Logic structure from Filter Data structure.
154
159
  ##### Returns
155
160
 
156
161
 
157
- - a filter logic array
162
+ - The date object or the date in milliseconds
158
163
 
159
164
 
160
165
 
161
- #### getLogicBodyFromFD21(filterData)
162
166
 
163
- Gets the logic body
167
+ ### dist/dates/adapters/weekYearToDate.js
168
+
169
+
170
+ #### weekYearToDate(date, time)
171
+
172
+ Transforms String Date from a [Week Year] format to Date object.
164
173
 
165
174
 
166
175
 
@@ -169,7 +178,8 @@ Gets the logic body
169
178
 
170
179
  | Name | Type | Description | |
171
180
  | ---- | ---- | ----------- | -------- |
172
- | filterData | | The filter data object |   |
181
+ | date | | String of [Week Year] date |   |
182
+ | time | | Flag to parse the object date to milliseconds. |   |
173
183
 
174
184
 
175
185
 
@@ -177,17 +187,17 @@ Gets the logic body
177
187
  ##### Returns
178
188
 
179
189
 
180
- - a filter logic array
190
+ - The date object or the date in milliseconds
181
191
 
182
192
 
183
193
 
184
194
 
185
- ### dist/filters/adapters/FDToUI.js
195
+ ### dist/dates/adapters/yearToDate.js
186
196
 
187
197
 
188
- #### FDToUI(filterData, datasetsInfo)
198
+ #### yearToDate(yearDate, time)
189
199
 
190
- Generates a UI filter structure from Filter Data structure.
200
+ Transforms String Date from a [Year] format to Date object.
191
201
 
192
202
 
193
203
 
@@ -196,8 +206,8 @@ Generates a UI filter structure from Filter Data structure.
196
206
 
197
207
  | Name | Type | Description | |
198
208
  | ---- | ---- | ----------- | -------- |
199
- | filterData | | The filter data object. |   |
200
- | datasetsInfo | | Collection of datasets information |   |
209
+ | yearDate | | String of [Year] date |   |
210
+ | time | | Flag to parse the object date to milliseconds. |   |
201
211
 
202
212
 
203
213
 
@@ -205,13 +215,17 @@ Generates a UI filter structure from Filter Data structure.
205
215
  ##### Returns
206
216
 
207
217
 
208
- - a UI Filters structure
218
+ - The date object or the date in milliseconds
209
219
 
210
220
 
211
221
 
212
- #### FD21ToUI(scopes, section, version, datasetsInfo)
213
222
 
214
- Generates a UI filter Structure from the Filter Data structure v2.1
223
+ ### dist/dates/helpers/getDateByDateFormat.js
224
+
225
+
226
+ #### getDateByDateFormat(date, format, time)
227
+
228
+ Gets a Date Object instance by a Date format
215
229
 
216
230
 
217
231
 
@@ -220,10 +234,9 @@ Generates a UI filter Structure from the Filter Data structure v2.1
220
234
 
221
235
  | Name | Type | Description | |
222
236
  | ---- | ---- | ----------- | -------- |
223
- | scopes | | The filter scope section |   |
224
- | section | | The filter section. |   |
225
- | version | | The version of the filter structure |   |
226
- | datasetsInfo | | Collection of datasets information |   |
237
+ | date | | String with a formatted date |   |
238
+ | format | | The date format |   |
239
+ | time | | flag to convert the formatted date to miliseconds |   |
227
240
 
228
241
 
229
242
 
@@ -231,17 +244,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
231
244
  ##### Returns
232
245
 
233
246
 
234
- - a UI filter Structure
247
+ - a Date object, milisecond time or the same value if date format does not match.
235
248
 
236
249
 
237
250
 
238
251
 
239
- ### dist/filters/adapters/UIToFD.js
252
+ ### dist/dates/helpers/getDateFormatByProperty.js
240
253
 
241
254
 
242
- #### UIToFD(filterData)
255
+ #### getDateFormatByProperty(property)
243
256
 
244
- Generates a Filter Data Structure structure from UI Filter Data structure.
257
+ Gets the date format by the given property
245
258
 
246
259
 
247
260
 
@@ -250,7 +263,7 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
250
263
 
251
264
  | Name | Type | Description | |
252
265
  | ---- | ---- | ----------- | -------- |
253
- | filterData | | The UI filter data object. |   |
266
+ | property | | The Column Property |   |
254
267
 
255
268
 
256
269
 
@@ -258,13 +271,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
258
271
  ##### Returns
259
272
 
260
273
 
261
- - a Filter Data structure
274
+ - The date format
262
275
 
263
276
 
264
277
 
265
- #### UI21ToFD(uFilterData, version)
266
278
 
267
- Builds the Fitler Data structure from UI filter data
279
+ ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
280
+
281
+
282
+ #### getDateFormatRegularExpressionInArray(dateFormat)
283
+
284
+ Gets an array of regular expressions by the given date format
268
285
 
269
286
 
270
287
 
@@ -273,8 +290,7 @@ Builds the Fitler Data structure from UI filter data
273
290
 
274
291
  | Name | Type | Description | |
275
292
  | ---- | ---- | ----------- | -------- |
276
- | uFilterData | | The UI filter Data object |   |
277
- | version | | the version of the structure |   |
293
+ | dateFormat | | the date format |   |
278
294
 
279
295
 
280
296
 
@@ -282,17 +298,17 @@ Builds the Fitler Data structure from UI filter data
282
298
  ##### Returns
283
299
 
284
300
 
285
- -
301
+ - an array of regular expressions
286
302
 
287
303
 
288
304
 
289
305
 
290
- ### dist/filters/adapters/UIToFlatUI.js
306
+ ### dist/dates/helpers/getSeparatorByDateFormat.js
291
307
 
292
308
 
293
- #### UIToFlatUI(filterData, datasetsInfo)
309
+ #### getSeparatorByDateFormat(format)
294
310
 
295
- Generates a Flattened UI filter structure from UI Filter Data structure.
311
+ Gets the separator of the date format
296
312
 
297
313
 
298
314
 
@@ -301,8 +317,7 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
301
317
 
302
318
  | Name | Type | Description | |
303
319
  | ---- | ---- | ----------- | -------- |
304
- | filterData | | The UI filter data object. |   |
305
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
320
+ | format | | the date format |   |
306
321
 
307
322
 
308
323
 
@@ -310,13 +325,18 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
310
325
  ##### Returns
311
326
 
312
327
 
313
- - a flattened UI filters array
328
+ - a separator string
314
329
 
315
330
 
316
331
 
317
- #### UI21ToFlatUI(scopes)
318
332
 
319
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
333
+ ### dist/dates/helpers/getWeek.js
334
+
335
+
336
+ #### getWeek(date)
337
+
338
+ Gets the week number of the year
339
+ Additionally, the month and the year
320
340
 
321
341
 
322
342
 
@@ -325,7 +345,7 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
325
345
 
326
346
  | Name | Type | Description | |
327
347
  | ---- | ---- | ----------- | -------- |
328
- | scopes | | The filter scope section |   |
348
+ | date | | the date object |   |
329
349
 
330
350
 
331
351
 
@@ -333,18 +353,20 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
333
353
  ##### Returns
334
354
 
335
355
 
336
- - a flattened UI filters array
356
+ - an object with the week, month and year.
337
357
 
338
358
 
339
359
 
340
360
 
341
- ### dist/filters/adapters/adaptDateGroupingProperty.js
361
+ ### dist/dates/helpers/validateDate.js
342
362
 
343
363
 
344
- #### adaptDateGroupingProperty(property)
364
+ #### validateDate(date, format)
345
365
 
346
- [TODO: For 2022, eliminate this adapter]
347
- Get the new property base on the old date grouping properties
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
348
370
 
349
371
 
350
372
 
@@ -353,7 +375,8 @@ Get the new property base on the old date grouping properties
353
375
 
354
376
  | Name | Type | Description | |
355
377
  | ---- | ---- | ----------- | -------- |
356
- | property | | |   |
378
+ | date | | String of date |   |
379
+ | format | | String of the format to validate |   |
357
380
 
358
381
 
359
382
 
@@ -361,18 +384,17 @@ Get the new property base on the old date grouping properties
361
384
  ##### Returns
362
385
 
363
386
 
364
- -
387
+ - True if it is valid or not. Undefined if date is undefined
365
388
 
366
389
 
367
390
 
368
391
 
369
- ### dist/filters/adapters/adaptFilterValues.js
392
+ ### dist/dates/helpers/validateDateByDateFormat.js
370
393
 
371
394
 
372
- #### adaptFilterValues(filter)
395
+ #### validateDateByDateFormat(date, dateForma)
373
396
 
374
- [TODO: For 2022, eliminate this adapter]
375
- Gets an adapted filter value array. Validates the enabled property and sets
397
+ Validates the given string as Date by its date format.
376
398
 
377
399
 
378
400
 
@@ -381,7 +403,8 @@ Gets an adapted filter value array. Validates the enabled property and sets
381
403
 
382
404
  | Name | Type | Description | |
383
405
  | ---- | ---- | ----------- | -------- |
384
- | filter | | The filter |   |
406
+ | date | | a string to validate as date form |   |
407
+ | dateForma | | the format of the date to validate the string |   |
385
408
 
386
409
 
387
410
 
@@ -389,17 +412,17 @@ Gets an adapted filter value array. Validates the enabled property and sets
389
412
  ##### Returns
390
413
 
391
414
 
392
- - A new value array with the filled properties.
415
+ - true: the string is a valida date
393
416
 
394
417
 
395
418
 
396
419
 
397
- ### dist/filters/adapters/flatUIToFD.js
420
+ ### dist/dates/range/getDateRange.js
398
421
 
399
422
 
400
- #### flatUIToFD(uFilters, version)
423
+ #### getDateRange(value, dateGroupLabel, withTime)
401
424
 
402
- Generates a filter data structure from the flatttened UI filters.
425
+ Get date range object from a string date value
403
426
 
404
427
 
405
428
 
@@ -408,78 +431,90 @@ Generates a filter data structure from the flatttened UI filters.
408
431
 
409
432
  | Name | Type | Description | |
410
433
  | ---- | ---- | ----------- | -------- |
411
- | uFilters | | Array of flattened filters from UI |   |
412
- | version | | Tag for the version of the filter data structure |   |
413
-
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 |   |
414
437
 
415
438
 
416
439
 
417
- ##### Returns
418
440
 
441
+ ##### Examples
419
442
 
420
- - a Filter Data.
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
+ }
421
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
+ }
422
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
+ ```
423
468
 
424
- #### buildScopes(fbFilters)
425
469
 
426
- Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
427
- Also, adds and organizes filters by datasets
470
+ ##### Returns
428
471
 
429
472
 
473
+ - `Object` an object with the date range with two string date properties: from and to
430
474
 
431
475
 
432
- ##### Parameters
433
476
 
434
- | Name | Type | Description | |
435
- | ---- | ---- | ----------- | -------- |
436
- | fbFilters | | Array of flat filters from UI |   |
437
477
 
478
+ ### dist/dates/relative/Adapter.js
438
479
 
439
480
 
481
+ #### value()
440
482
 
441
- ##### Returns
483
+ Resolves statement and returns statement value
442
484
 
443
485
 
444
- - an array of scopes structure.
445
486
 
446
487
 
447
488
 
448
- #### buildScope(uFilter)
449
489
 
450
- Gets an scope structure for the filter data
490
+ ##### Returns
451
491
 
452
492
 
493
+ - `AbsoluteRange` `string`
453
494
 
454
495
 
455
- ##### Parameters
456
496
 
457
- | Name | Type | Description | |
458
- | ---- | ---- | ----------- | -------- |
459
- | uFilter | | UI structure filter |   |
497
+ #### valueAsAnchor()
460
498
 
499
+ Resolves statement as an anchor
461
500
 
462
501
 
463
502
 
464
- ##### Returns
465
503
 
466
504
 
467
- - an scope structure
468
505
 
506
+ ##### Returns
469
507
 
470
508
 
471
- #### buildDataset(uFilter)
509
+ - `string`
472
510
 
473
- Gets an dataset structure for the filter data
474
511
 
475
512
 
513
+ #### _statementToRange() *private method*
476
514
 
515
+ Convert verbal statement to range value
477
516
 
478
- ##### Parameters
479
517
 
480
- | Name | Type | Description | |
481
- | ---- | ---- | ----------- | -------- |
482
- | uFilter | | a UI structure filter |   |
483
518
 
484
519
 
485
520
 
@@ -487,69 +522,61 @@ Gets an dataset structure for the filter data
487
522
  ##### Returns
488
523
 
489
524
 
490
- - an dataset structure
525
+ - `AbsoluteRange`
491
526
 
492
527
 
493
528
 
494
- #### buildFilter(uFilter)
529
+ #### _resolveAsThis() *private method*
495
530
 
496
- Gets an filter structure for the filter data
531
+ Apply 'this' cursor logic to statement
497
532
 
498
533
 
499
534
 
500
535
 
501
- ##### Parameters
502
536
 
503
- | Name | Type | Description | |
504
- | ---- | ---- | ----------- | -------- |
505
- | uFilter | | a UI structure filter |   |
506
537
 
538
+ ##### Returns
507
539
 
508
540
 
541
+ - `AbsoluteStatement`
509
542
 
510
- ##### Returns
511
543
 
512
544
 
513
- - an filter structure
545
+ #### _resolveAsTheLast() *private method*
514
546
 
547
+ Apply 'the last' cursor logic to statement
515
548
 
516
549
 
517
550
 
518
- ### dist/filters/adapters/adaptFilterData.js
519
551
 
520
552
 
521
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
522
553
 
523
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
554
+ ##### Returns
524
555
 
525
556
 
557
+ - `AbsoluteStatement`
526
558
 
527
559
 
528
- ##### Parameters
529
560
 
530
- | Name | Type | Description | |
531
- | ---- | ---- | ----------- | -------- |
532
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 |   |
533
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) |   |
534
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory |   |
561
+ #### _resolveAsTheNext() *private method*
535
562
 
563
+ Apply 'the next' cursor logic to statement
536
564
 
537
565
 
538
566
 
539
- ##### Returns
540
567
 
541
568
 
542
- - A new filter data structure v2.1
543
569
 
570
+ ##### Returns
544
571
 
545
572
 
573
+ - `AbsoluteStatement`
546
574
 
547
- ### dist/filters/adapters/flatUIToLogic.js
548
575
 
549
576
 
550
- #### flatUIToLogic(uFilter)
577
+ #### replaceNowToken(value, now)
551
578
 
552
- Generates a Logic structure from flattened UI filters
579
+ Replace '@now' token inside a string
553
580
 
554
581
 
555
582
 
@@ -558,7 +585,8 @@ Generates a Logic structure from flattened UI filters
558
585
 
559
586
  | Name | Type | Description | |
560
587
  | ---- | ---- | ----------- | -------- |
561
- | uFilter | | Array of flat filters from UI |   |
588
+ | value | `string` | |   |
589
+ | now | `Date` | |   |
562
590
 
563
591
 
564
592
 
@@ -566,17 +594,13 @@ Generates a Logic structure from flattened UI filters
566
594
  ##### Returns
567
595
 
568
596
 
569
- - The logic structure
570
-
571
-
597
+ - `string`
572
598
 
573
599
 
574
- ### dist/filters/adapters/flatUIToOldLogic.js
575
600
 
601
+ #### convertRelativeToAbsolute(args)
576
602
 
577
- #### flatUIToOldLogic(uFilters)
578
-
579
- Generates a Logic structure from flattened UI filters
603
+ Returns a range object (date) from a group of statement params
580
604
 
581
605
 
582
606
 
@@ -585,25 +609,45 @@ Generates a Logic structure from flattened UI filters
585
609
 
586
610
  | Name | Type | Description | |
587
611
  | ---- | ---- | ----------- | -------- |
588
- | uFilters | | Array of flat filters from UI |   |
612
+ | args | `RelativeToAbsoluteStruct` | |   |
613
+
589
614
 
590
615
 
591
616
 
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
+
592
636
 
593
637
  ##### Returns
594
638
 
595
639
 
596
- - The logic structure
640
+ - `string`
597
641
 
598
642
 
599
643
 
600
644
 
601
- ### dist/filters/adapters/flatUIToUI.js
645
+ ### dist/dates/relative/relative.js
602
646
 
603
647
 
604
- #### flatUIToUI(uFilters, version)
648
+ #### resolveRelative(statements, clock)
605
649
 
606
- Generates a UI filter data structure from the flatttened UI filters.
650
+ Resolve a list of relative statements according to operator
607
651
 
608
652
 
609
653
 
@@ -612,23 +656,44 @@ Generates a UI filter data structure from the flatttened UI filters.
612
656
 
613
657
  | Name | Type | Description | |
614
658
  | ---- | ---- | ----------- | -------- |
615
- | uFilters | | Array of flattened filters from UI |   |
616
- | version | | Tag for the version of the filter data structure |   |
659
+ | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
660
+ | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
661
+
662
+
663
+
617
664
 
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
+ }
618
677
 
678
+ Output:
679
+ { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
680
+ ```
619
681
 
620
682
 
621
683
  ##### Returns
622
684
 
623
685
 
624
- - a UI Filter Data.
686
+ - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
625
687
 
626
688
 
627
689
 
628
- #### buildScopes(fbFilters)
629
690
 
630
- Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
631
- Also, adds and organizes filters by datasets
691
+ ### dist/filters/adapters/FDToFlatUI.js
692
+
693
+
694
+ #### FDToFlatUI(filterData, datasetsInfo)
695
+
696
+ Generates a Flattened UI filter structure from Filter Data structure.
632
697
 
633
698
 
634
699
 
@@ -637,7 +702,8 @@ Also, adds and organizes filters by datasets
637
702
 
638
703
  | Name | Type | Description | |
639
704
  | ---- | ---- | ----------- | -------- |
640
- | fbFilters | | Array of flat filters from UI | &nbsp; |
705
+ | filterData | | The filter data object. | &nbsp; |
706
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
641
707
 
642
708
 
643
709
 
@@ -645,13 +711,13 @@ Also, adds and organizes filters by datasets
645
711
  ##### Returns
646
712
 
647
713
 
648
- - an array of scopes structure.
714
+ - a flattened UI filters array
649
715
 
650
716
 
651
717
 
652
- #### buildScope(uFilter)
718
+ #### FD21ToFlatUI(scopes, datasetsInfo)
653
719
 
654
- Gets an scope structure for the UI filter data
720
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
655
721
 
656
722
 
657
723
 
@@ -660,7 +726,8 @@ Gets an scope structure for the UI filter data
660
726
 
661
727
  | Name | Type | Description | |
662
728
  | ---- | ---- | ----------- | -------- |
663
- | uFilter | | UI structure filter | &nbsp; |
729
+ | scopes | | The filter scope section | &nbsp; |
730
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
664
731
 
665
732
 
666
733
 
@@ -668,13 +735,17 @@ Gets an scope structure for the UI filter data
668
735
  ##### Returns
669
736
 
670
737
 
671
- - an scope structure
738
+ - a flattened UI filters array
672
739
 
673
740
 
674
741
 
675
- #### buildDataset(uFilter)
676
742
 
677
- Gets an dataset structure for the UI filter data
743
+ ### dist/filters/adapters/FDToLogic.js
744
+
745
+
746
+ #### FDToLogic(filterData)
747
+
748
+ Generates a Filter Logic structure from Filter Data structure.
678
749
 
679
750
 
680
751
 
@@ -683,7 +754,7 @@ Gets an dataset structure for the UI filter data
683
754
 
684
755
  | Name | Type | Description | |
685
756
  | ---- | ---- | ----------- | -------- |
686
- | uFilter | | a UI structure filter | &nbsp; |
757
+ | filterData | | The filter data object. | &nbsp; |
687
758
 
688
759
 
689
760
 
@@ -691,13 +762,13 @@ Gets an dataset structure for the UI filter data
691
762
  ##### Returns
692
763
 
693
764
 
694
- - an dataset structure
765
+ - a filter logic array
695
766
 
696
767
 
697
768
 
698
- #### buildFilter(uFilter)
769
+ #### getLogicBodyFromFD21(filterData)
699
770
 
700
- Gets an filter structure for the UI filter data
771
+ Gets the logic body
701
772
 
702
773
 
703
774
 
@@ -706,7 +777,7 @@ Gets an filter structure for the UI filter data
706
777
 
707
778
  | Name | Type | Description | |
708
779
  | ---- | ---- | ----------- | -------- |
709
- | uFilter | | a UI structure filter | &nbsp; |
780
+ | filterData | | The filter data object | &nbsp; |
710
781
 
711
782
 
712
783
 
@@ -714,17 +785,17 @@ Gets an filter structure for the UI filter data
714
785
  ##### Returns
715
786
 
716
787
 
717
- - an filter structure
788
+ - a filter logic array
718
789
 
719
790
 
720
791
 
721
792
 
722
- ### dist/filters/adapters/logicToFD.js
793
+ ### dist/filters/adapters/FDToUI.js
723
794
 
724
795
 
725
- #### logicToFD(filterData, version)
796
+ #### FDToUI(filterData, datasetsInfo)
726
797
 
727
- Generates a filter data structure from the old logic structure (v2.0).
798
+ Generates a UI filter structure from Filter Data structure.
728
799
 
729
800
 
730
801
 
@@ -733,8 +804,8 @@ Generates a filter data structure from the old logic structure (v2.0).
733
804
 
734
805
  | Name | Type | Description | |
735
806
  | ---- | ---- | ----------- | -------- |
736
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
737
- | version | | Tag for the version of the filter data structure | &nbsp; |
807
+ | filterData | | The filter data object. | &nbsp; |
808
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
738
809
 
739
810
 
740
811
 
@@ -742,17 +813,13 @@ Generates a filter data structure from the old logic structure (v2.0).
742
813
  ##### Returns
743
814
 
744
815
 
745
- - a Filter Data.
746
-
747
-
748
-
816
+ - a UI Filters structure
749
817
 
750
- ### dist/filters/adapters/logicToFlatUI.js
751
818
 
752
819
 
753
- #### logicToFlatUI(logics)
820
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
754
821
 
755
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
822
+ Generates a UI filter Structure from the Filter Data structure v2.1
756
823
 
757
824
 
758
825
 
@@ -761,7 +828,10 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
761
828
 
762
829
  | Name | Type | Description | |
763
830
  | ---- | ---- | ----------- | -------- |
764
- | logics | | The old logic structure (v2.0) | &nbsp; |
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; |
765
835
 
766
836
 
767
837
 
@@ -769,13 +839,17 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
769
839
  ##### Returns
770
840
 
771
841
 
772
- - The Flattened UI Filters array
842
+ - a UI filter Structure
773
843
 
774
844
 
775
845
 
776
- #### getFilter(filters, filter, getIndex)
777
846
 
778
- Get the filter or the index of the given array, validating an old filter structure.
847
+ ### dist/filters/adapters/UIToFD.js
848
+
849
+
850
+ #### UIToFD(filterData)
851
+
852
+ Generates a Filter Data Structure structure from UI Filter Data structure.
779
853
 
780
854
 
781
855
 
@@ -784,9 +858,7 @@ Get the filter or the index of the given array, validating an old filter structu
784
858
 
785
859
  | Name | Type | Description | |
786
860
  | ---- | ---- | ----------- | -------- |
787
- | filters | | The array of UI filters | &nbsp; |
788
- | filter | | The old logic structure filter | &nbsp; |
789
- | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
861
+ | filterData | | The UI filter data object. | &nbsp; |
790
862
 
791
863
 
792
864
 
@@ -794,13 +866,13 @@ Get the filter or the index of the given array, validating an old filter structu
794
866
  ##### Returns
795
867
 
796
868
 
797
- - the index or the UI filter object
869
+ - a Filter Data structure
798
870
 
799
871
 
800
872
 
801
- #### refineRankingValues(values, uiValues)
873
+ #### UI21ToFD(uFilterData, version)
802
874
 
803
- Refines the values of the Ranking column type.
875
+ Builds the Fitler Data structure from UI filter data
804
876
 
805
877
 
806
878
 
@@ -809,8 +881,8 @@ Refines the values of the Ranking column type.
809
881
 
810
882
  | Name | Type | Description | |
811
883
  | ---- | ---- | ----------- | -------- |
812
- | values | | the Array of Ranking values | &nbsp; |
813
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
884
+ | uFilterData | | The UI filter Data object | &nbsp; |
885
+ | version | | the version of the structure | &nbsp; |
814
886
 
815
887
 
816
888
 
@@ -818,17 +890,17 @@ Refines the values of the Ranking column type.
818
890
  ##### Returns
819
891
 
820
892
 
821
- - the array of Ranking values
893
+ -
822
894
 
823
895
 
824
896
 
825
897
 
826
- ### dist/filters/adapters/logicToUI.js
898
+ ### dist/filters/adapters/UIToFlatUI.js
827
899
 
828
900
 
829
- #### logicToUI(uFilters, datasetsInfo)
901
+ #### UIToFlatUI(filterData, datasetsInfo)
830
902
 
831
- Generates a UI filter structure from the old logic structure (v2.0).
903
+ Generates a Flattened UI filter structure from UI Filter Data structure.
832
904
 
833
905
 
834
906
 
@@ -837,8 +909,8 @@ Generates a UI filter structure from the old logic structure (v2.0).
837
909
 
838
910
  | Name | Type | Description | |
839
911
  | ---- | ---- | ----------- | -------- |
840
- | uFilters | | Array of filters from old logic structure | &nbsp; |
841
- | datasetsInfo | | Collection of datasets information | &nbsp; |
912
+ | filterData | | The UI filter data object. | &nbsp; |
913
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
842
914
 
843
915
 
844
916
 
@@ -846,17 +918,13 @@ Generates a UI filter structure from the old logic structure (v2.0).
846
918
  ##### Returns
847
919
 
848
920
 
849
- - a UI Filter Data.
850
-
851
-
852
-
921
+ - a flattened UI filters array
853
922
 
854
- ### dist/filters/adapters/transformFilters.js
855
923
 
856
924
 
857
- #### transformFilters(oldFiltersObj, section)
925
+ #### UI21ToFlatUI(scopes)
858
926
 
859
- Transform the old filters structure into the new one
927
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
860
928
 
861
929
 
862
930
 
@@ -865,77 +933,26 @@ Transform the old filters structure into the new one
865
933
 
866
934
  | Name | Type | Description | |
867
935
  | ---- | ---- | ----------- | -------- |
868
- | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
869
- | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
870
-
871
-
936
+ | scopes | | The filter scope section | &nbsp; |
872
937
 
873
938
 
874
- ##### Examples
875
-
876
- ```javascript
877
-
878
- const oldPreferenceFilters = {
879
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
880
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
881
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
882
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
883
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
884
- "formulaId": null,
885
- "panelId": null,
886
- "values": [
887
- {
888
- "EQUALS": [
889
- {
890
- "id": "AK4M8UV2a0",
891
- "value": "A",
892
- "enabled": true,
893
- "imageUrl": null
894
- },
895
- {
896
- "id": "AK4M8UV2a1",
897
- "value": "B",
898
- "enabled": true,
899
- "imageUrl": null
900
- }
901
- ]
902
- }
903
- ],
904
- "bucketId": null,
905
- "text": "MC",
906
- "title": "MC",
907
- "type": "SINGLE_CHOICE",
908
- "qid": "AK4M8UV2",
909
- "dataset": {
910
- "sourceid": "xYOQAdpqT",
911
- "name": "Form All Questions",
912
- "qrveyid": "xYOQAdpqT",
913
- "text": "Form All Questions",
914
- "linkid": 0
915
- },
916
- "enabled": true,
917
- "linked": null
918
- }
919
- };
920
-
921
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
922
- ```
923
939
 
924
940
 
925
941
  ##### Returns
926
942
 
927
943
 
928
- - `Object` an object with the new filters structure
944
+ - a flattened UI filters array
929
945
 
930
946
 
931
947
 
932
948
 
933
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
949
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
934
950
 
935
951
 
936
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
952
+ #### adaptDateGroupingProperty(property)
937
953
 
938
- [TODO: Make a proper description for this function]
954
+ [TODO: For 2022, eliminate this adapter]
955
+ Get the new property base on the old date grouping properties
939
956
 
940
957
 
941
958
 
@@ -944,9 +961,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
944
961
 
945
962
  | Name | Type | Description | |
946
963
  | ---- | ---- | ----------- | -------- |
947
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
948
- | scopes | | | &nbsp; |
949
- | currentScope | | | &nbsp; |
964
+ | property | | | &nbsp; |
950
965
 
951
966
 
952
967
 
@@ -959,12 +974,12 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
959
974
 
960
975
 
961
976
 
962
- ### dist/filters/helpers/getAvailableScopes.js
977
+ ### dist/filters/adapters/adaptFilterData.js
963
978
 
964
979
 
965
- #### getAvailableScopes(config)
980
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
966
981
 
967
- Gets Scopes/Scope IDs by given IDs
982
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
968
983
 
969
984
 
970
985
 
@@ -973,7 +988,9 @@ Gets Scopes/Scope IDs by given IDs
973
988
 
974
989
  | Name | Type | Description | |
975
990
  | ---- | ---- | ----------- | -------- |
976
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
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; |
977
994
 
978
995
 
979
996
 
@@ -981,17 +998,17 @@ Gets Scopes/Scope IDs by given IDs
981
998
  ##### Returns
982
999
 
983
1000
 
984
- - a Scopes/Scope IDs array
1001
+ - A new filter data structure v2.1
985
1002
 
986
1003
 
987
1004
 
988
1005
 
989
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1006
+ ### dist/filters/adapters/flatUIToFD.js
990
1007
 
991
1008
 
992
- #### getAvailableScopesIDsByConfig(config)
1009
+ #### flatUIToFD(uFilters, version)
993
1010
 
994
- Gets the Scopes IDS for the Available Scope function by any config
1011
+ Generates a filter data structure from the flatttened UI filters.
995
1012
 
996
1013
 
997
1014
 
@@ -1000,7 +1017,8 @@ Gets the Scopes IDS for the Available Scope function by any config
1000
1017
 
1001
1018
  | Name | Type | Description | |
1002
1019
  | ---- | ---- | ----------- | -------- |
1003
- | config | | any config | &nbsp; |
1020
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
1021
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1004
1022
 
1005
1023
 
1006
1024
 
@@ -1008,17 +1026,37 @@ Gets the Scopes IDS for the Available Scope function by any config
1008
1026
  ##### Returns
1009
1027
 
1010
1028
 
1011
- - a Available Scope IDS config
1029
+ - a Filter Data.
1012
1030
 
1013
1031
 
1014
1032
 
1033
+ #### buildScopes(fbFilters)
1015
1034
 
1016
- ### dist/filters/helpers/getScopesByHierarchy.js
1035
+ Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1036
+ Also, adds and organizes filters by datasets
1017
1037
 
1018
1038
 
1019
- #### getScopesByHierarchy(scopes, currentScope)
1020
1039
 
1021
- [TODO: Make a description for this]
1040
+
1041
+ ##### Parameters
1042
+
1043
+ | Name | Type | Description | |
1044
+ | ---- | ---- | ----------- | -------- |
1045
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
1046
+
1047
+
1048
+
1049
+
1050
+ ##### Returns
1051
+
1052
+
1053
+ - an array of scopes structure.
1054
+
1055
+
1056
+
1057
+ #### buildScope(uFilter)
1058
+
1059
+ Gets an scope structure for the filter data
1022
1060
 
1023
1061
 
1024
1062
 
@@ -1027,8 +1065,7 @@ Gets the Scopes IDS for the Available Scope function by any config
1027
1065
 
1028
1066
  | Name | Type | Description | |
1029
1067
  | ---- | ---- | ----------- | -------- |
1030
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1031
- | currentScope | | Current scope type | &nbsp; |
1068
+ | uFilter | | UI structure filter | &nbsp; |
1032
1069
 
1033
1070
 
1034
1071
 
@@ -1036,19 +1073,45 @@ Gets the Scopes IDS for the Available Scope function by any config
1036
1073
  ##### Returns
1037
1074
 
1038
1075
 
1039
- - A new array of Scopes/Scope IDs
1076
+ - an scope structure
1077
+
1040
1078
 
1041
1079
 
1080
+ #### buildDataset(uFilter)
1042
1081
 
1082
+ Gets an dataset structure for the filter data
1043
1083
 
1044
- ### dist/filters/classes/FilterInputErrorHandler.js
1045
1084
 
1046
1085
 
1047
- #### new FilterInputErrorHandler()
1086
+
1087
+ ##### Parameters
1088
+
1089
+ | Name | Type | Description | |
1090
+ | ---- | ---- | ----------- | -------- |
1091
+ | uFilter | | a UI structure filter | &nbsp; |
1092
+
1048
1093
 
1049
1094
 
1050
1095
 
1096
+ ##### Returns
1097
+
1098
+
1099
+ - an dataset structure
1100
+
1101
+
1102
+
1103
+ #### buildFilter(uFilter)
1104
+
1105
+ Gets an filter structure for the filter data
1106
+
1107
+
1108
+
1109
+
1110
+ ##### Parameters
1051
1111
 
1112
+ | Name | Type | Description | |
1113
+ | ---- | ---- | ----------- | -------- |
1114
+ | uFilter | | a UI structure filter | &nbsp; |
1052
1115
 
1053
1116
 
1054
1117
 
@@ -1056,17 +1119,18 @@ Gets the Scopes IDS for the Available Scope function by any config
1056
1119
  ##### Returns
1057
1120
 
1058
1121
 
1059
- - `Void`
1122
+ - an filter structure
1060
1123
 
1061
1124
 
1062
1125
 
1063
1126
 
1064
- ### dist/dates/adapters/mdyDateToDate.js
1127
+ ### dist/filters/adapters/adaptFilterValues.js
1065
1128
 
1066
1129
 
1067
- #### mdyDateToDate(monthYearDate, time)
1130
+ #### adaptFilterValues(filter)
1068
1131
 
1069
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
1132
+ [TODO: For 2022, eliminate this adapter]
1133
+ Gets an adapted filter value array. Validates the enabled property and sets
1070
1134
 
1071
1135
 
1072
1136
 
@@ -1075,8 +1139,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
1075
1139
 
1076
1140
  | Name | Type | Description | |
1077
1141
  | ---- | ---- | ----------- | -------- |
1078
- | monthYearDate | | String of [mm/dd/yyyy] date | &nbsp; |
1079
- | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1142
+ | filter | | The filter | &nbsp; |
1080
1143
 
1081
1144
 
1082
1145
 
@@ -1084,17 +1147,17 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
1084
1147
  ##### Returns
1085
1148
 
1086
1149
 
1087
- - The date object or the date in milliseconds
1150
+ - A new value array with the filled properties.
1088
1151
 
1089
1152
 
1090
1153
 
1091
1154
 
1092
- ### dist/dates/adapters/monthYearToDate.js
1155
+ ### dist/filters/adapters/flatUIToLogic.js
1093
1156
 
1094
1157
 
1095
- #### monthYearToDate(monthYearDate, time)
1158
+ #### flatUIToLogic(uFilter)
1096
1159
 
1097
- Transforms String Date from a [Month Year] format to Date object.
1160
+ Generates a Logic structure from flattened UI filters
1098
1161
 
1099
1162
 
1100
1163
 
@@ -1103,8 +1166,7 @@ Transforms String Date from a [Month Year] format to Date object.
1103
1166
 
1104
1167
  | Name | Type | Description | |
1105
1168
  | ---- | ---- | ----------- | -------- |
1106
- | monthYearDate | | String of [Month Year] date | &nbsp; |
1107
- | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1169
+ | uFilter | | Array of flat filters from UI | &nbsp; |
1108
1170
 
1109
1171
 
1110
1172
 
@@ -1112,17 +1174,17 @@ Transforms String Date from a [Month Year] format to Date object.
1112
1174
  ##### Returns
1113
1175
 
1114
1176
 
1115
- - The date object or the date in milliseconds
1177
+ - The logic structure
1116
1178
 
1117
1179
 
1118
1180
 
1119
1181
 
1120
- ### dist/dates/adapters/quarterYearToDate.js
1182
+ ### dist/filters/adapters/flatUIToOldLogic.js
1121
1183
 
1122
1184
 
1123
- #### quarterYearToDate(quarterYearDate, time)
1185
+ #### flatUIToOldLogic(uFilters)
1124
1186
 
1125
- Transforms String Date from a [Quarter Year] format to Date object.
1187
+ Generates a Logic structure from flattened UI filters
1126
1188
 
1127
1189
 
1128
1190
 
@@ -1131,8 +1193,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
1131
1193
 
1132
1194
  | Name | Type | Description | |
1133
1195
  | ---- | ---- | ----------- | -------- |
1134
- | quarterYearDate | | String of [Quarter Year] date | &nbsp; |
1135
- | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1196
+ | uFilters | | Array of flat filters from UI | &nbsp; |
1136
1197
 
1137
1198
 
1138
1199
 
@@ -1140,17 +1201,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
1140
1201
  ##### Returns
1141
1202
 
1142
1203
 
1143
- - The date object or the date in milliseconds
1204
+ - The logic structure
1144
1205
 
1145
1206
 
1146
1207
 
1147
1208
 
1148
- ### dist/dates/adapters/weekYearToDate.js
1209
+ ### dist/filters/adapters/flatUIToUI.js
1149
1210
 
1150
1211
 
1151
- #### weekYearToDate(date, time)
1212
+ #### flatUIToUI(uFilters, version)
1152
1213
 
1153
- Transforms String Date from a [Week Year] format to Date object.
1214
+ Generates a UI filter data structure from the flatttened UI filters.
1154
1215
 
1155
1216
 
1156
1217
 
@@ -1159,8 +1220,8 @@ Transforms String Date from a [Week Year] format to Date object.
1159
1220
 
1160
1221
  | Name | Type | Description | |
1161
1222
  | ---- | ---- | ----------- | -------- |
1162
- | date | | String of [Week Year] date | &nbsp; |
1163
- | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1223
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1164
1225
 
1165
1226
 
1166
1227
 
@@ -1168,17 +1229,14 @@ Transforms String Date from a [Week Year] format to Date object.
1168
1229
  ##### Returns
1169
1230
 
1170
1231
 
1171
- - The date object or the date in milliseconds
1172
-
1173
-
1174
-
1232
+ - a UI Filter Data.
1175
1233
 
1176
- ### dist/dates/adapters/yearToDate.js
1177
1234
 
1178
1235
 
1179
- #### yearToDate(yearDate, time)
1236
+ #### buildScopes(fbFilters)
1180
1237
 
1181
- Transforms String Date from a [Year] format to Date object.
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
1182
1240
 
1183
1241
 
1184
1242
 
@@ -1187,8 +1245,7 @@ Transforms String Date from a [Year] format to Date object.
1187
1245
 
1188
1246
  | Name | Type | Description | |
1189
1247
  | ---- | ---- | ----------- | -------- |
1190
- | yearDate | | String of [Year] date | &nbsp; |
1191
- | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1248
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
1192
1249
 
1193
1250
 
1194
1251
 
@@ -1196,17 +1253,13 @@ Transforms String Date from a [Year] format to Date object.
1196
1253
  ##### Returns
1197
1254
 
1198
1255
 
1199
- - The date object or the date in milliseconds
1200
-
1201
-
1202
-
1256
+ - an array of scopes structure.
1203
1257
 
1204
- ### dist/dates/helpers/getDateByDateFormat.js
1205
1258
 
1206
1259
 
1207
- #### getDateByDateFormat(date, format, time)
1260
+ #### buildScope(uFilter)
1208
1261
 
1209
- Gets a Date Object instance by a Date format
1262
+ Gets an scope structure for the UI filter data
1210
1263
 
1211
1264
 
1212
1265
 
@@ -1215,9 +1268,7 @@ Gets a Date Object instance by a Date format
1215
1268
 
1216
1269
  | Name | Type | Description | |
1217
1270
  | ---- | ---- | ----------- | -------- |
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; |
1271
+ | uFilter | | UI structure filter | &nbsp; |
1221
1272
 
1222
1273
 
1223
1274
 
@@ -1225,17 +1276,13 @@ Gets a Date Object instance by a Date format
1225
1276
  ##### Returns
1226
1277
 
1227
1278
 
1228
- - a Date object, milisecond time or the same value if date format does not match.
1229
-
1230
-
1231
-
1279
+ - an scope structure
1232
1280
 
1233
- ### dist/dates/helpers/getDateFormatByProperty.js
1234
1281
 
1235
1282
 
1236
- #### getDateFormatByProperty(property)
1283
+ #### buildDataset(uFilter)
1237
1284
 
1238
- Gets the date format by the given property
1285
+ Gets an dataset structure for the UI filter data
1239
1286
 
1240
1287
 
1241
1288
 
@@ -1244,7 +1291,7 @@ Gets the date format by the given property
1244
1291
 
1245
1292
  | Name | Type | Description | |
1246
1293
  | ---- | ---- | ----------- | -------- |
1247
- | property | | The Column Property | &nbsp; |
1294
+ | uFilter | | a UI structure filter | &nbsp; |
1248
1295
 
1249
1296
 
1250
1297
 
@@ -1252,17 +1299,13 @@ Gets the date format by the given property
1252
1299
  ##### Returns
1253
1300
 
1254
1301
 
1255
- - The date format
1256
-
1257
-
1258
-
1302
+ - an dataset structure
1259
1303
 
1260
- ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
1261
1304
 
1262
1305
 
1263
- #### getDateFormatRegularExpressionInArray(dateFormat)
1306
+ #### buildFilter(uFilter)
1264
1307
 
1265
- Gets an array of regular expressions by the given date format
1308
+ Gets an filter structure for the UI filter data
1266
1309
 
1267
1310
 
1268
1311
 
@@ -1271,7 +1314,7 @@ Gets an array of regular expressions by the given date format
1271
1314
 
1272
1315
  | Name | Type | Description | |
1273
1316
  | ---- | ---- | ----------- | -------- |
1274
- | dateFormat | | the date format | &nbsp; |
1317
+ | uFilter | | a UI structure filter | &nbsp; |
1275
1318
 
1276
1319
 
1277
1320
 
@@ -1279,17 +1322,17 @@ Gets an array of regular expressions by the given date format
1279
1322
  ##### Returns
1280
1323
 
1281
1324
 
1282
- - an array of regular expressions
1325
+ - an filter structure
1283
1326
 
1284
1327
 
1285
1328
 
1286
1329
 
1287
- ### dist/dates/helpers/getSeparatorByDateFormat.js
1330
+ ### dist/filters/adapters/logicToFD.js
1288
1331
 
1289
1332
 
1290
- #### getSeparatorByDateFormat(format)
1333
+ #### logicToFD(filterData, version)
1291
1334
 
1292
- Gets the separator of the date format
1335
+ Generates a filter data structure from the old logic structure (v2.0).
1293
1336
 
1294
1337
 
1295
1338
 
@@ -1298,7 +1341,8 @@ Gets the separator of the date format
1298
1341
 
1299
1342
  | Name | Type | Description | |
1300
1343
  | ---- | ---- | ----------- | -------- |
1301
- | format | | the date format | &nbsp; |
1344
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1302
1346
 
1303
1347
 
1304
1348
 
@@ -1306,18 +1350,17 @@ Gets the separator of the date format
1306
1350
  ##### Returns
1307
1351
 
1308
1352
 
1309
- - a separator string
1353
+ - a Filter Data.
1310
1354
 
1311
1355
 
1312
1356
 
1313
1357
 
1314
- ### dist/dates/helpers/getWeek.js
1358
+ ### dist/filters/adapters/logicToFlatUI.js
1315
1359
 
1316
1360
 
1317
- #### getWeek(date)
1361
+ #### logicToFlatUI(logics)
1318
1362
 
1319
- Gets the week number of the year
1320
- Additionally, the month and the year
1363
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1321
1364
 
1322
1365
 
1323
1366
 
@@ -1326,7 +1369,7 @@ Additionally, the month and the year
1326
1369
 
1327
1370
  | Name | Type | Description | |
1328
1371
  | ---- | ---- | ----------- | -------- |
1329
- | date | | the date object | &nbsp; |
1372
+ | logics | | The old logic structure (v2.0) | &nbsp; |
1330
1373
 
1331
1374
 
1332
1375
 
@@ -1334,20 +1377,13 @@ Additionally, the month and the year
1334
1377
  ##### Returns
1335
1378
 
1336
1379
 
1337
- - an object with the week, month and year.
1338
-
1339
-
1340
-
1380
+ - The Flattened UI Filters array
1341
1381
 
1342
- ### dist/dates/helpers/validateDate.js
1343
1382
 
1344
1383
 
1345
- #### validateDate(date, format)
1384
+ #### getFilter(filters, filter, getIndex)
1346
1385
 
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
1386
+ Get the filter or the index of the given array, validating an old filter structure.
1351
1387
 
1352
1388
 
1353
1389
 
@@ -1356,8 +1392,9 @@ Validate a string date depending on giving format
1356
1392
 
1357
1393
  | Name | Type | Description | |
1358
1394
  | ---- | ---- | ----------- | -------- |
1359
- | date | | String of date | &nbsp; |
1360
- | format | | String of the format to validate | &nbsp; |
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; |
1361
1398
 
1362
1399
 
1363
1400
 
@@ -1365,17 +1402,13 @@ Validate a string date depending on giving format
1365
1402
  ##### Returns
1366
1403
 
1367
1404
 
1368
- - True if it is valid or not. Undefined if date is undefined
1369
-
1370
-
1371
-
1405
+ - the index or the UI filter object
1372
1406
 
1373
- ### dist/dates/helpers/validateDateByDateFormat.js
1374
1407
 
1375
1408
 
1376
- #### validateDateByDateFormat(date, dateForma)
1409
+ #### refineRankingValues(values, uiValues)
1377
1410
 
1378
- Validates the given string as Date by its date format.
1411
+ Refines the values of the Ranking column type.
1379
1412
 
1380
1413
 
1381
1414
 
@@ -1384,8 +1417,8 @@ Validates the given string as Date by its date format.
1384
1417
 
1385
1418
  | Name | Type | Description | |
1386
1419
  | ---- | ---- | ----------- | -------- |
1387
- | date | | a string to validate as date form | &nbsp; |
1388
- | dateForma | | the format of the date to validate the string | &nbsp; |
1420
+ | values | | the Array of Ranking values | &nbsp; |
1421
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1389
1422
 
1390
1423
 
1391
1424
 
@@ -1393,17 +1426,17 @@ Validates the given string as Date by its date format.
1393
1426
  ##### Returns
1394
1427
 
1395
1428
 
1396
- - true: the string is a valida date
1429
+ - the array of Ranking values
1397
1430
 
1398
1431
 
1399
1432
 
1400
1433
 
1401
- ### dist/dates/range/getDateRange.js
1434
+ ### dist/filters/adapters/logicToUI.js
1402
1435
 
1403
1436
 
1404
- #### getDateRange(value, dateGroupLabel, withTime)
1437
+ #### logicToUI(uFilters, datasetsInfo)
1405
1438
 
1406
- Get date range object from a string date value
1439
+ Generates a UI filter structure from the old logic structure (v2.0).
1407
1440
 
1408
1441
 
1409
1442
 
@@ -1412,104 +1445,105 @@ Get date range object from a string date value
1412
1445
 
1413
1446
  | Name | Type | Description | |
1414
1447
  | ---- | ---- | ----------- | -------- |
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; |
1418
-
1419
-
1420
-
1421
-
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
- }
1448
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1432
1450
 
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
- }
1440
1451
 
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
- ```
1449
1452
 
1450
1453
 
1451
1454
  ##### Returns
1452
1455
 
1453
1456
 
1454
- - `Object` an object with the date range with two string date properties: from and to
1455
-
1456
-
1457
-
1458
-
1459
- ### dist/dates/relative/Adapter.js
1457
+ - a UI Filter Data.
1460
1458
 
1461
1459
 
1462
- #### value()
1463
1460
 
1464
- Resolves statement and returns statement value
1465
1461
 
1462
+ ### dist/filters/adapters/transformFilters.js
1466
1463
 
1467
1464
 
1465
+ #### transformFilters(oldFiltersObj, section)
1468
1466
 
1467
+ Transform the old filters structure into the new one
1469
1468
 
1470
1469
 
1471
- ##### Returns
1472
1470
 
1473
1471
 
1474
- - `AbsoluteRange` `string`
1472
+ ##### Parameters
1475
1473
 
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; |
1476
1478
 
1477
1479
 
1478
- #### valueAsAnchor()
1479
1480
 
1480
- Resolves statement as an anchor
1481
1481
 
1482
+ ##### Examples
1482
1483
 
1484
+ ```javascript
1483
1485
 
1486
+ const oldPreferenceFilters = {
1487
+ "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1488
+ "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1489
+ "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1490
+ "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1491
+ "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1492
+ "formulaId": null,
1493
+ "panelId": null,
1494
+ "values": [
1495
+ {
1496
+ "EQUALS": [
1497
+ {
1498
+ "id": "AK4M8UV2a0",
1499
+ "value": "A",
1500
+ "enabled": true,
1501
+ "imageUrl": null
1502
+ },
1503
+ {
1504
+ "id": "AK4M8UV2a1",
1505
+ "value": "B",
1506
+ "enabled": true,
1507
+ "imageUrl": null
1508
+ }
1509
+ ]
1510
+ }
1511
+ ],
1512
+ "bucketId": null,
1513
+ "text": "MC",
1514
+ "title": "MC",
1515
+ "type": "SINGLE_CHOICE",
1516
+ "qid": "AK4M8UV2",
1517
+ "dataset": {
1518
+ "sourceid": "xYOQAdpqT",
1519
+ "name": "Form All Questions",
1520
+ "qrveyid": "xYOQAdpqT",
1521
+ "text": "Form All Questions",
1522
+ "linkid": 0
1523
+ },
1524
+ "enabled": true,
1525
+ "linked": null
1526
+ }
1527
+ };
1484
1528
 
1529
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
+ ```
1485
1531
 
1486
1532
 
1487
1533
  ##### Returns
1488
1534
 
1489
1535
 
1490
- - `string`
1491
-
1492
-
1493
-
1494
- #### _statementToRange() *private method*
1495
-
1496
- Convert verbal statement to range value
1497
-
1498
-
1499
-
1500
-
1536
+ - `Object` an object with the new filters structure
1501
1537
 
1502
1538
 
1503
- ##### Returns
1504
1539
 
1505
1540
 
1506
- - `AbsoluteRange`
1541
+ ### dist/filters/classes/FilterInputErrorHandler.js
1507
1542
 
1508
1543
 
1544
+ #### new FilterInputErrorHandler()
1509
1545
 
1510
- #### _resolveAsThis() *private method*
1511
1546
 
1512
- Apply 'this' cursor logic to statement
1513
1547
 
1514
1548
 
1515
1549
 
@@ -1519,45 +1553,46 @@ Apply 'this' cursor logic to statement
1519
1553
  ##### Returns
1520
1554
 
1521
1555
 
1522
- - `AbsoluteStatement`
1523
-
1524
-
1525
-
1526
- #### _resolveAsTheLast() *private method*
1556
+ - `Void`
1527
1557
 
1528
- Apply 'the last' cursor logic to statement
1529
1558
 
1530
1559
 
1531
1560
 
1561
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
1532
1562
 
1533
1563
 
1564
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1534
1565
 
1535
- ##### Returns
1566
+ [TODO: Make a proper description for this function]
1536
1567
 
1537
1568
 
1538
- - `AbsoluteStatement`
1539
1569
 
1540
1570
 
1571
+ ##### Parameters
1541
1572
 
1542
- #### _resolveAsTheNext() *private method*
1573
+ | Name | Type | Description | |
1574
+ | ---- | ---- | ----------- | -------- |
1575
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
+ | scopes | | | &nbsp; |
1577
+ | currentScope | | | &nbsp; |
1543
1578
 
1544
- Apply 'the next' cursor logic to statement
1545
1579
 
1546
1580
 
1547
1581
 
1582
+ ##### Returns
1548
1583
 
1549
1584
 
1585
+ -
1550
1586
 
1551
- ##### Returns
1552
1587
 
1553
1588
 
1554
- - `AbsoluteStatement`
1555
1589
 
1590
+ ### dist/filters/helpers/getAvailableScopes.js
1556
1591
 
1557
1592
 
1558
- #### replaceNowToken(value, now)
1593
+ #### getAvailableScopes(config)
1559
1594
 
1560
- Replace '@now' token inside a string
1595
+ Gets Scopes/Scope IDs by given IDs
1561
1596
 
1562
1597
 
1563
1598
 
@@ -1566,8 +1601,7 @@ Replace '@now' token inside a string
1566
1601
 
1567
1602
  | Name | Type | Description | |
1568
1603
  | ---- | ---- | ----------- | -------- |
1569
- | value | `string` | | &nbsp; |
1570
- | now | `Date` | | &nbsp; |
1604
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
1571
1605
 
1572
1606
 
1573
1607
 
@@ -1575,13 +1609,17 @@ Replace '@now' token inside a string
1575
1609
  ##### Returns
1576
1610
 
1577
1611
 
1578
- - `string`
1612
+ - a Scopes/Scope IDs array
1579
1613
 
1580
1614
 
1581
1615
 
1582
- #### convertRelativeToAbsolute(args)
1583
1616
 
1584
- Returns a range object (date) from a group of statement params
1617
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1618
+
1619
+
1620
+ #### getAvailableScopesIDsByConfig(config)
1621
+
1622
+ Gets the Scopes IDS for the Available Scope function by any config
1585
1623
 
1586
1624
 
1587
1625
 
@@ -1590,45 +1628,25 @@ Returns a range object (date) from a group of statement params
1590
1628
 
1591
1629
  | Name | Type | Description | |
1592
1630
  | ---- | ---- | ----------- | -------- |
1593
- | args | `RelativeToAbsoluteStruct` | | &nbsp; |
1594
-
1595
-
1596
-
1631
+ | config | | any config | &nbsp; |
1597
1632
 
1598
- ##### Examples
1599
1633
 
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
1634
 
1617
1635
 
1618
1636
  ##### Returns
1619
1637
 
1620
1638
 
1621
- - `string`
1639
+ - a Available Scope IDS config
1622
1640
 
1623
1641
 
1624
1642
 
1625
1643
 
1626
- ### dist/dates/relative/relative.js
1644
+ ### dist/filters/helpers/getScopesByHierarchy.js
1627
1645
 
1628
1646
 
1629
- #### resolveRelative(statements, clock)
1647
+ #### getScopesByHierarchy(scopes, currentScope)
1630
1648
 
1631
- Resolve a list of relative statements according to operator
1649
+ [TODO: Make a description for this]
1632
1650
 
1633
1651
 
1634
1652
 
@@ -1637,34 +1655,16 @@ Resolve a list of relative statements according to operator
1637
1655
 
1638
1656
  | Name | Type | Description | |
1639
1657
  | ---- | ---- | ----------- | -------- |
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
1658
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
+ | currentScope | | Current scope type | &nbsp; |
1647
1660
 
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
- }
1658
1661
 
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
- - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
1667
+ - A new array of Scopes/Scope IDs
1668
1668
 
1669
1669
 
1670
1670
 
@@ -2153,33 +2153,6 @@ Gets the length of the given array.
2153
2153
 
2154
2154
 
2155
2155
 
2156
- ### dist/general/string/capitalize.js
2157
-
2158
-
2159
- #### capitalize(text)
2160
-
2161
- Upper case the first letter of a given text
2162
-
2163
-
2164
-
2165
-
2166
- ##### Parameters
2167
-
2168
- | Name | Type | Description | |
2169
- | ---- | ---- | ----------- | -------- |
2170
- | text | `String` | | &nbsp; |
2171
-
2172
-
2173
-
2174
-
2175
- ##### Returns
2176
-
2177
-
2178
- - `String` a capitalized text
2179
-
2180
-
2181
-
2182
-
2183
2156
  ### dist/general/object/cloneDeep.js
2184
2157
 
2185
2158
 
@@ -2444,8 +2417,115 @@ Validates if the two arguments are objects
2444
2417
 
2445
2418
  | Name | Type | Description | |
2446
2419
  | ---- | ---- | ----------- | -------- |
2447
- | obj1 | | The target object | &nbsp; |
2448
- | obj2 | | The object to be merged | &nbsp; |
2420
+ | obj1 | | The target object | &nbsp; |
2421
+ | obj2 | | The object to be merged | &nbsp; |
2422
+
2423
+
2424
+
2425
+
2426
+ ##### Returns
2427
+
2428
+
2429
+ - true: they are valid; false: they are not
2430
+
2431
+
2432
+
2433
+ #### getParamsToMergeDeep(settings)
2434
+
2435
+ Validates and gets the settings with all set parameters.
2436
+
2437
+
2438
+
2439
+
2440
+ ##### Parameters
2441
+
2442
+ | Name | Type | Description | |
2443
+ | ---- | ---- | ----------- | -------- |
2444
+ | settings | | the settings object | &nbsp; |
2445
+
2446
+
2447
+
2448
+
2449
+ ##### Returns
2450
+
2451
+
2452
+ - a new settings object with all set parameters.
2453
+
2454
+
2455
+
2456
+
2457
+ ### dist/general/object/objectCopy.js
2458
+
2459
+
2460
+ #### objectCopy(entity, cache)
2461
+
2462
+ Created a new reference of the given argument
2463
+
2464
+
2465
+
2466
+
2467
+ ##### Parameters
2468
+
2469
+ | Name | Type | Description | |
2470
+ | ---- | ---- | ----------- | -------- |
2471
+ | entity | | The variable to be copied | &nbsp; |
2472
+ | cache | | | &nbsp; |
2473
+
2474
+
2475
+
2476
+
2477
+ ##### Returns
2478
+
2479
+
2480
+ - A new reference of the given argument
2481
+
2482
+
2483
+
2484
+
2485
+ ### dist/general/object/omit.js
2486
+
2487
+
2488
+ #### omit(obj, props)
2489
+
2490
+ return a new Object excluding attributes in _props_ list
2491
+
2492
+
2493
+
2494
+
2495
+ ##### Parameters
2496
+
2497
+ | Name | Type | Description | |
2498
+ | ---- | ---- | ----------- | -------- |
2499
+ | obj | `Object` | base object | &nbsp; |
2500
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2501
+
2502
+
2503
+
2504
+
2505
+ ##### Returns
2506
+
2507
+
2508
+ - `Object` clean object
2509
+
2510
+
2511
+
2512
+
2513
+ ### dist/general/object/pick.js
2514
+
2515
+
2516
+ #### pick(baseObject, keys)
2517
+
2518
+ return a new object just with attributes in _keys_ list
2519
+
2520
+
2521
+
2522
+
2523
+ ##### Parameters
2524
+
2525
+ | Name | Type | Description | |
2526
+ | ---- | ---- | ----------- | -------- |
2527
+ | baseObject | `Object` | base object | &nbsp; |
2528
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2449
2529
 
2450
2530
 
2451
2531
 
@@ -2453,13 +2533,17 @@ Validates if the two arguments are objects
2453
2533
  ##### Returns
2454
2534
 
2455
2535
 
2456
- - true: they are valid; false: they are not
2536
+ - `Object` new object just with desired attributes
2457
2537
 
2458
2538
 
2459
2539
 
2460
- #### getParamsToMergeDeep(settings)
2461
2540
 
2462
- Validates and gets the settings with all set parameters.
2541
+ ### dist/general/object/serialize.js
2542
+
2543
+
2544
+ #### serialize(obj)
2545
+
2546
+ serialize object to url param
2463
2547
 
2464
2548
 
2465
2549
 
@@ -2468,7 +2552,7 @@ Validates and gets the settings with all set parameters.
2468
2552
 
2469
2553
  | Name | Type | Description | |
2470
2554
  | ---- | ---- | ----------- | -------- |
2471
- | settings | | the settings object | &nbsp; |
2555
+ | obj | | - Object to be serialized | &nbsp; |
2472
2556
 
2473
2557
 
2474
2558
 
@@ -2476,17 +2560,17 @@ Validates and gets the settings with all set parameters.
2476
2560
  ##### Returns
2477
2561
 
2478
2562
 
2479
- - a new settings object with all set parameters.
2563
+ - `Void`
2480
2564
 
2481
2565
 
2482
2566
 
2483
2567
 
2484
- ### dist/general/object/objectCopy.js
2568
+ ### dist/general/string/capitalize.js
2485
2569
 
2486
2570
 
2487
- #### objectCopy(entity, cache)
2571
+ #### capitalize(text)
2488
2572
 
2489
- Created a new reference of the given argument
2573
+ Upper case the first letter of a given text
2490
2574
 
2491
2575
 
2492
2576
 
@@ -2495,8 +2579,7 @@ Created a new reference of the given argument
2495
2579
 
2496
2580
  | Name | Type | Description | |
2497
2581
  | ---- | ---- | ----------- | -------- |
2498
- | entity | | The variable to be copied | &nbsp; |
2499
- | cache | | | &nbsp; |
2582
+ | text | `String` | | &nbsp; |
2500
2583
 
2501
2584
 
2502
2585
 
@@ -2504,17 +2587,17 @@ Created a new reference of the given argument
2504
2587
  ##### Returns
2505
2588
 
2506
2589
 
2507
- - A new reference of the given argument
2590
+ - `String` a capitalized text
2508
2591
 
2509
2592
 
2510
2593
 
2511
2594
 
2512
- ### dist/general/object/omit.js
2595
+ ### dist/qrvey/helpers/getColumnsLabel.js
2513
2596
 
2514
2597
 
2515
- #### omit(obj, props)
2598
+ #### getColumnLabels(column)
2516
2599
 
2517
- return a new Object excluding attributes in _props_ list
2600
+ Get an string of the properties of the given column.
2518
2601
 
2519
2602
 
2520
2603
 
@@ -2523,8 +2606,7 @@ return a new Object excluding attributes in _props_ list
2523
2606
 
2524
2607
  | Name | Type | Description | |
2525
2608
  | ---- | ---- | ----------- | -------- |
2526
- | obj | `Object` | base object | &nbsp; |
2527
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2609
+ | column | | The column | &nbsp; |
2528
2610
 
2529
2611
 
2530
2612
 
@@ -2532,17 +2614,17 @@ return a new Object excluding attributes in _props_ list
2532
2614
  ##### Returns
2533
2615
 
2534
2616
 
2535
- - `Object` clean object
2617
+ - an string with the property, aggregate or calculation label.
2536
2618
 
2537
2619
 
2538
2620
 
2539
2621
 
2540
- ### dist/general/object/pick.js
2622
+ ### dist/services/api/getAllDatasets.api.js
2541
2623
 
2542
2624
 
2543
- #### pick(baseObject, keys)
2625
+ #### getAllDatasets(qrveyids)
2544
2626
 
2545
- return a new object just with attributes in _keys_ list
2627
+ Get a dataset list from a collection of Qrvey IDs
2546
2628
 
2547
2629
 
2548
2630
 
@@ -2551,8 +2633,7 @@ return a new object just with attributes in _keys_ list
2551
2633
 
2552
2634
  | Name | Type | Description | |
2553
2635
  | ---- | ---- | ----------- | -------- |
2554
- | baseObject | `Object` | base object | &nbsp; |
2555
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2636
+ | qrveyids | | Collection of Qrvey IDs | &nbsp; |
2556
2637
 
2557
2638
 
2558
2639
 
@@ -2560,17 +2641,17 @@ return a new object just with attributes in _keys_ list
2560
2641
  ##### Returns
2561
2642
 
2562
2643
 
2563
- - `Object` new object just with desired attributes
2644
+ - a promise
2564
2645
 
2565
2646
 
2566
2647
 
2567
2648
 
2568
- ### dist/general/object/serialize.js
2649
+ ### dist/services/api/getAllQrveys.api.js
2569
2650
 
2570
2651
 
2571
- #### serialize(obj)
2652
+ #### getAllQrveys(config, params)
2572
2653
 
2573
- serialize object to url param
2654
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2574
2655
 
2575
2656
 
2576
2657
 
@@ -2579,7 +2660,8 @@ serialize object to url param
2579
2660
 
2580
2661
  | Name | Type | Description | |
2581
2662
  | ---- | ---- | ----------- | -------- |
2582
- | obj | | - Object to be serialized | &nbsp; |
2663
+ | config | | Configuration | &nbsp; |
2664
+ | params | | Object for getting precise data | &nbsp; |
2583
2665
 
2584
2666
 
2585
2667
 
@@ -2592,12 +2674,12 @@ serialize object to url param
2592
2674
 
2593
2675
 
2594
2676
 
2595
- ### dist/qrvey/helpers/getColumnsLabel.js
2677
+ ### dist/services/api/getDatasetColumns.api.js
2596
2678
 
2597
2679
 
2598
- #### getColumnLabels(column)
2680
+ #### getDatasetColumns(qrveyid)
2599
2681
 
2600
- Get an string of the properties of the given column.
2682
+ Get a dataset by Qrvey ID
2601
2683
 
2602
2684
 
2603
2685
 
@@ -2606,7 +2688,7 @@ Get an string of the properties of the given column.
2606
2688
 
2607
2689
  | Name | Type | Description | |
2608
2690
  | ---- | ---- | ----------- | -------- |
2609
- | column | | The column | &nbsp; |
2691
+ | qrveyid | | The Qrvey ID | &nbsp; |
2610
2692
 
2611
2693
 
2612
2694
 
@@ -2614,7 +2696,7 @@ Get an string of the properties of the given column.
2614
2696
  ##### Returns
2615
2697
 
2616
2698
 
2617
- - an string with the property, aggregate or calculation label.
2699
+ - a promise
2618
2700
 
2619
2701
 
2620
2702
 
@@ -2703,12 +2785,12 @@ try to find this string as a variable on Windows object
2703
2785
 
2704
2786
 
2705
2787
 
2706
- ### dist/services/api/getAllDatasets.api.js
2788
+ ### dist/typescript/decorators/Debounce.js
2707
2789
 
2708
2790
 
2709
- #### getAllDatasets(qrveyids)
2791
+ #### Debounce(time)
2710
2792
 
2711
- Get a dataset list from a collection of Qrvey IDs
2793
+ (Method Decorator) Debounce Class Method
2712
2794
 
2713
2795
 
2714
2796
 
@@ -2717,7 +2799,7 @@ Get a dataset list from a collection of Qrvey IDs
2717
2799
 
2718
2800
  | Name | Type | Description | |
2719
2801
  | ---- | ---- | ----------- | -------- |
2720
- | qrveyids | | Collection of Qrvey IDs | &nbsp; |
2802
+ | time | | (optional) deafult 500 | &nbsp; |
2721
2803
 
2722
2804
 
2723
2805
 
@@ -2725,17 +2807,17 @@ Get a dataset list from a collection of Qrvey IDs
2725
2807
  ##### Returns
2726
2808
 
2727
2809
 
2728
- - a promise
2810
+ - `Void`
2729
2811
 
2730
2812
 
2731
2813
 
2732
2814
 
2733
- ### dist/services/api/getAllQrveys.api.js
2815
+ ### dist/typescript/decorators/Throttled.js
2734
2816
 
2735
2817
 
2736
- #### getAllQrveys(config, params)
2818
+ #### Throttled(time)
2737
2819
 
2738
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2820
+ (Method Decorator) Throttled Class Method
2739
2821
 
2740
2822
 
2741
2823
 
@@ -2744,8 +2826,7 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2744
2826
 
2745
2827
  | Name | Type | Description | |
2746
2828
  | ---- | ---- | ----------- | -------- |
2747
- | config | | Configuration | &nbsp; |
2748
- | params | | Object for getting precise data | &nbsp; |
2829
+ | time | | (optional) deafult 500 | &nbsp; |
2749
2830
 
2750
2831
 
2751
2832
 
@@ -2758,12 +2839,12 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2758
2839
 
2759
2840
 
2760
2841
 
2761
- ### dist/services/api/getDatasetColumns.api.js
2842
+ ### dist/dates/relative/helpers/formatStatement.js
2762
2843
 
2763
2844
 
2764
- #### getDatasetColumns(qrveyid)
2845
+ #### formatStatement(statement)
2765
2846
 
2766
- Get a dataset by Qrvey ID
2847
+ Build a proper relative date statement type
2767
2848
 
2768
2849
 
2769
2850
 
@@ -2772,7 +2853,7 @@ Get a dataset by Qrvey ID
2772
2853
 
2773
2854
  | Name | Type | Description | |
2774
2855
  | ---- | ---- | ----------- | -------- |
2775
- | qrveyid | | The Qrvey ID | &nbsp; |
2856
+ | statement | `RelativeStatement` | | &nbsp; |
2776
2857
 
2777
2858
 
2778
2859
 
@@ -2780,17 +2861,17 @@ Get a dataset by Qrvey ID
2780
2861
  ##### Returns
2781
2862
 
2782
2863
 
2783
- - a promise
2864
+ - `RelativeStatement`
2784
2865
 
2785
2866
 
2786
2867
 
2787
2868
 
2788
- ### dist/typescript/decorators/Debounce.js
2869
+ ### dist/dates/relative/helpers/getStatementCase.js
2789
2870
 
2790
2871
 
2791
- #### Debounce(time)
2872
+ #### getStatementCase(includeCurrent, isCalendarDate)
2792
2873
 
2793
- (Method Decorator) Debounce Class Method
2874
+ Returns a number/constant that identifies a relative date case
2794
2875
 
2795
2876
 
2796
2877
 
@@ -2799,7 +2880,8 @@ Get a dataset by Qrvey ID
2799
2880
 
2800
2881
  | Name | Type | Description | |
2801
2882
  | ---- | ---- | ----------- | -------- |
2802
- | time | | (optional) deafult 500 | &nbsp; |
2883
+ | includeCurrent | `boolean` | | &nbsp; |
2884
+ | isCalendarDate | `boolean` | | &nbsp; |
2803
2885
 
2804
2886
 
2805
2887
 
@@ -2807,17 +2889,17 @@ Get a dataset by Qrvey ID
2807
2889
  ##### Returns
2808
2890
 
2809
2891
 
2810
- - `Void`
2892
+ - `number`
2811
2893
 
2812
2894
 
2813
2895
 
2814
2896
 
2815
- ### dist/typescript/decorators/Throttled.js
2897
+ ### dist/dates/relative/helpers/parseDate.js
2816
2898
 
2817
2899
 
2818
- #### Throttled(time)
2900
+ #### parseDate(date)
2819
2901
 
2820
- (Method Decorator) Throttled Class Method
2902
+ Parses a string date and returns a dayjs date
2821
2903
 
2822
2904
 
2823
2905
 
@@ -2826,7 +2908,7 @@ Get a dataset by Qrvey ID
2826
2908
 
2827
2909
  | Name | Type | Description | |
2828
2910
  | ---- | ---- | ----------- | -------- |
2829
- | time | | (optional) deafult 500 | &nbsp; |
2911
+ | date | `string` `Dayjs` `Date` | | &nbsp; |
2830
2912
 
2831
2913
 
2832
2914
 
@@ -2834,7 +2916,34 @@ Get a dataset by Qrvey ID
2834
2916
  ##### Returns
2835
2917
 
2836
2918
 
2837
- - `Void`
2919
+ - `Dayjs` A dayjs date
2920
+
2921
+
2922
+
2923
+
2924
+ ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
2925
+
2926
+
2927
+ #### getFilterBuilderGeneralConfig(config)
2928
+
2929
+ Returns a filter builder config object by a any given config
2930
+
2931
+
2932
+
2933
+
2934
+ ##### Parameters
2935
+
2936
+ | Name | Type | Description | |
2937
+ | ---- | ---- | ----------- | -------- |
2938
+ | config | | any config object | &nbsp; |
2939
+
2940
+
2941
+
2942
+
2943
+ ##### Returns
2944
+
2945
+
2946
+ - The filter builder config object
2838
2947
 
2839
2948
 
2840
2949
 
@@ -3135,33 +3244,6 @@ Gets filters from the logic by the scopes hierarchy.
3135
3244
 
3136
3245
 
3137
3246
 
3138
- ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
3139
-
3140
-
3141
- #### getFilterBuilderGeneralConfig(config)
3142
-
3143
- Returns a filter builder config object by a any given config
3144
-
3145
-
3146
-
3147
-
3148
- ##### Parameters
3149
-
3150
- | Name | Type | Description | |
3151
- | ---- | ---- | ----------- | -------- |
3152
- | config | | any config object | &nbsp; |
3153
-
3154
-
3155
-
3156
-
3157
- ##### Returns
3158
-
3159
-
3160
- - The filter builder config object
3161
-
3162
-
3163
-
3164
-
3165
3247
  ### dist/filters/helpers/common/areFiltersEquals.js
3166
3248
 
3167
3249
 
@@ -4238,86 +4320,4 @@ Resolves conditions between UI flattened filter and given parameters
4238
4320
 
4239
4321
 
4240
4322
 
4241
- ### dist/dates/relative/helpers/formatStatement.js
4242
-
4243
-
4244
- #### formatStatement(statement)
4245
-
4246
- Build a proper relative date statement type
4247
-
4248
-
4249
-
4250
-
4251
- ##### Parameters
4252
-
4253
- | Name | Type | Description | |
4254
- | ---- | ---- | ----------- | -------- |
4255
- | statement | `RelativeStatement` | | &nbsp; |
4256
-
4257
-
4258
-
4259
-
4260
- ##### Returns
4261
-
4262
-
4263
- - `RelativeStatement`
4264
-
4265
-
4266
-
4267
-
4268
- ### dist/dates/relative/helpers/getStatementCase.js
4269
-
4270
-
4271
- #### getStatementCase(includeCurrent, isCalendarDate)
4272
-
4273
- Returns a number/constant that identifies a relative date case
4274
-
4275
-
4276
-
4277
-
4278
- ##### Parameters
4279
-
4280
- | Name | Type | Description | |
4281
- | ---- | ---- | ----------- | -------- |
4282
- | includeCurrent | `boolean` | | &nbsp; |
4283
- | isCalendarDate | `boolean` | | &nbsp; |
4284
-
4285
-
4286
-
4287
-
4288
- ##### Returns
4289
-
4290
-
4291
- - `number`
4292
-
4293
-
4294
-
4295
-
4296
- ### dist/dates/relative/helpers/parseDate.js
4297
-
4298
-
4299
- #### parseDate(date)
4300
-
4301
- Parses a string date and returns a dayjs date
4302
-
4303
-
4304
-
4305
-
4306
- ##### Parameters
4307
-
4308
- | Name | Type | Description | |
4309
- | ---- | ---- | ----------- | -------- |
4310
- | date | `string` `Dayjs` `Date` | | &nbsp; |
4311
-
4312
-
4313
-
4314
-
4315
- ##### Returns
4316
-
4317
-
4318
- - `Dayjs` A dayjs date
4319
-
4320
-
4321
-
4322
-
4323
4323
  *Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*