@qrvey/utils 1.2.9-27 → 1.2.9-28
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 +670 -670
- package/dist/cjs/filters/adapters/FDToUI.js +1 -2
- package/dist/cjs/filters/helpers/ui/getUpdatedUIFilters.js +2 -0
- package/dist/filters/adapters/FDToUI.js +1 -2
- package/dist/filters/helpers/ui/getUpdatedUIFilters.js +2 -0
- package/package.json +1 -1
- package/src/filters/adapters/FDToUI.ts +1 -2
- package/src/filters/helpers/ui/getUpdatedUIFilters.ts +2 -0
- package/src/qrvey/helpers/transformValue.ts +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-
|
|
1
|
+
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-28*
|
|
2
2
|
|
|
3
3
|
> Helper, Utils for all Qrvey Projects
|
|
4
4
|
|
|
@@ -80,14 +80,23 @@ Get a text and evaluate if it matchs with a token box label.
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
### dist/
|
|
83
|
+
### dist/dates/helpers/getDateByDateFormat.js
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
####
|
|
86
|
+
#### getDateByDateFormat(date, format, time)
|
|
87
|
+
|
|
88
|
+
Gets a Date Object instance by a Date format
|
|
87
89
|
|
|
88
90
|
|
|
89
91
|
|
|
90
92
|
|
|
93
|
+
##### Parameters
|
|
94
|
+
|
|
95
|
+
| Name | Type | Description | |
|
|
96
|
+
| ---- | ---- | ----------- | -------- |
|
|
97
|
+
| date | | String with a formatted date | |
|
|
98
|
+
| format | | The date format | |
|
|
99
|
+
| time | | flag to convert the formatted date to miliseconds | |
|
|
91
100
|
|
|
92
101
|
|
|
93
102
|
|
|
@@ -95,17 +104,17 @@ Get a text and evaluate if it matchs with a token box label.
|
|
|
95
104
|
##### Returns
|
|
96
105
|
|
|
97
106
|
|
|
98
|
-
-
|
|
107
|
+
- a Date object, milisecond time or the same value if date format does not match.
|
|
99
108
|
|
|
100
109
|
|
|
101
110
|
|
|
102
111
|
|
|
103
|
-
### dist/
|
|
112
|
+
### dist/dates/helpers/getDateFormatByProperty.js
|
|
104
113
|
|
|
105
114
|
|
|
106
|
-
####
|
|
115
|
+
#### getDateFormatByProperty(property)
|
|
107
116
|
|
|
108
|
-
|
|
117
|
+
Gets the date format by the given property
|
|
109
118
|
|
|
110
119
|
|
|
111
120
|
|
|
@@ -114,8 +123,7 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
114
123
|
|
|
115
124
|
| Name | Type | Description | |
|
|
116
125
|
| ---- | ---- | ----------- | -------- |
|
|
117
|
-
|
|
|
118
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
126
|
+
| property | | The Column Property | |
|
|
119
127
|
|
|
120
128
|
|
|
121
129
|
|
|
@@ -123,13 +131,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
123
131
|
##### Returns
|
|
124
132
|
|
|
125
133
|
|
|
126
|
-
-
|
|
134
|
+
- The date format
|
|
127
135
|
|
|
128
136
|
|
|
129
137
|
|
|
130
|
-
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
131
138
|
|
|
132
|
-
|
|
139
|
+
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
#### getDateFormatRegularExpressionInArray(dateFormat)
|
|
143
|
+
|
|
144
|
+
Gets an array of regular expressions by the given date format
|
|
133
145
|
|
|
134
146
|
|
|
135
147
|
|
|
@@ -138,8 +150,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
138
150
|
|
|
139
151
|
| Name | Type | Description | |
|
|
140
152
|
| ---- | ---- | ----------- | -------- |
|
|
141
|
-
|
|
|
142
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
153
|
+
| dateFormat | | the date format | |
|
|
143
154
|
|
|
144
155
|
|
|
145
156
|
|
|
@@ -147,17 +158,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
147
158
|
##### Returns
|
|
148
159
|
|
|
149
160
|
|
|
150
|
-
-
|
|
161
|
+
- an array of regular expressions
|
|
151
162
|
|
|
152
163
|
|
|
153
164
|
|
|
154
165
|
|
|
155
|
-
### dist/
|
|
166
|
+
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
156
167
|
|
|
157
168
|
|
|
158
|
-
####
|
|
169
|
+
#### getSeparatorByDateFormat(format)
|
|
159
170
|
|
|
160
|
-
|
|
171
|
+
Gets the separator of the date format
|
|
161
172
|
|
|
162
173
|
|
|
163
174
|
|
|
@@ -166,7 +177,7 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
166
177
|
|
|
167
178
|
| Name | Type | Description | |
|
|
168
179
|
| ---- | ---- | ----------- | -------- |
|
|
169
|
-
|
|
|
180
|
+
| format | | the date format | |
|
|
170
181
|
|
|
171
182
|
|
|
172
183
|
|
|
@@ -174,13 +185,18 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
174
185
|
##### Returns
|
|
175
186
|
|
|
176
187
|
|
|
177
|
-
- a
|
|
188
|
+
- a separator string
|
|
178
189
|
|
|
179
190
|
|
|
180
191
|
|
|
181
|
-
#### getLogicBodyFromFD21(filterData)
|
|
182
192
|
|
|
183
|
-
|
|
193
|
+
### dist/dates/helpers/getWeek.js
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
#### getWeek(date)
|
|
197
|
+
|
|
198
|
+
Gets the week number of the year
|
|
199
|
+
Additionally, the month and the year
|
|
184
200
|
|
|
185
201
|
|
|
186
202
|
|
|
@@ -189,7 +205,7 @@ Gets the logic body
|
|
|
189
205
|
|
|
190
206
|
| Name | Type | Description | |
|
|
191
207
|
| ---- | ---- | ----------- | -------- |
|
|
192
|
-
|
|
|
208
|
+
| date | | the date object | |
|
|
193
209
|
|
|
194
210
|
|
|
195
211
|
|
|
@@ -197,17 +213,20 @@ Gets the logic body
|
|
|
197
213
|
##### Returns
|
|
198
214
|
|
|
199
215
|
|
|
200
|
-
-
|
|
216
|
+
- an object with the week, month and year.
|
|
201
217
|
|
|
202
218
|
|
|
203
219
|
|
|
204
220
|
|
|
205
|
-
### dist/
|
|
221
|
+
### dist/dates/helpers/validateDate.js
|
|
206
222
|
|
|
207
223
|
|
|
208
|
-
####
|
|
224
|
+
#### validateDate(date, format)
|
|
209
225
|
|
|
210
|
-
|
|
226
|
+
Validate a string date depending on giving format
|
|
227
|
+
- If the string is a token label, the function lets it pass.
|
|
228
|
+
- Otherwise depends of the format
|
|
229
|
+
- Some escenarios the string is a mix of token labels and dates
|
|
211
230
|
|
|
212
231
|
|
|
213
232
|
|
|
@@ -216,8 +235,8 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
216
235
|
|
|
217
236
|
| Name | Type | Description | |
|
|
218
237
|
| ---- | ---- | ----------- | -------- |
|
|
219
|
-
|
|
|
220
|
-
|
|
|
238
|
+
| date | | String of date | |
|
|
239
|
+
| format | | String of the format to validate | |
|
|
221
240
|
|
|
222
241
|
|
|
223
242
|
|
|
@@ -225,13 +244,17 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
225
244
|
##### Returns
|
|
226
245
|
|
|
227
246
|
|
|
228
|
-
-
|
|
247
|
+
- True if it is valid or not. Undefined if date is undefined
|
|
229
248
|
|
|
230
249
|
|
|
231
250
|
|
|
232
|
-
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
233
251
|
|
|
234
|
-
|
|
252
|
+
### dist/dates/helpers/validateDateByDateFormat.js
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
#### validateDateByDateFormat(date, dateForma)
|
|
256
|
+
|
|
257
|
+
Validates the given string as Date by its date format.
|
|
235
258
|
|
|
236
259
|
|
|
237
260
|
|
|
@@ -240,10 +263,8 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
240
263
|
|
|
241
264
|
| Name | Type | Description | |
|
|
242
265
|
| ---- | ---- | ----------- | -------- |
|
|
243
|
-
|
|
|
244
|
-
|
|
|
245
|
-
| version | | The version of the filter structure | |
|
|
246
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
266
|
+
| date | | a string to validate as date form | |
|
|
267
|
+
| dateForma | | the format of the date to validate the string | |
|
|
247
268
|
|
|
248
269
|
|
|
249
270
|
|
|
@@ -251,17 +272,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
251
272
|
##### Returns
|
|
252
273
|
|
|
253
274
|
|
|
254
|
-
- a
|
|
275
|
+
- true: the string is a valida date
|
|
255
276
|
|
|
256
277
|
|
|
257
278
|
|
|
258
279
|
|
|
259
|
-
### dist/
|
|
280
|
+
### dist/dates/adapters/mdyDateToDate.js
|
|
260
281
|
|
|
261
282
|
|
|
262
|
-
####
|
|
283
|
+
#### mdyDateToDate(monthYearDate, time)
|
|
263
284
|
|
|
264
|
-
|
|
285
|
+
Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
265
286
|
|
|
266
287
|
|
|
267
288
|
|
|
@@ -270,7 +291,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
270
291
|
|
|
271
292
|
| Name | Type | Description | |
|
|
272
293
|
| ---- | ---- | ----------- | -------- |
|
|
273
|
-
|
|
|
294
|
+
| monthYearDate | | String of [mm/dd/yyyy] date | |
|
|
295
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
274
296
|
|
|
275
297
|
|
|
276
298
|
|
|
@@ -278,13 +300,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
278
300
|
##### Returns
|
|
279
301
|
|
|
280
302
|
|
|
281
|
-
-
|
|
303
|
+
- The date object or the date in milliseconds
|
|
282
304
|
|
|
283
305
|
|
|
284
306
|
|
|
285
|
-
#### UI21ToFD(uFilterData, version)
|
|
286
307
|
|
|
287
|
-
|
|
308
|
+
### dist/dates/adapters/monthYearToDate.js
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
#### monthYearToDate(monthYearDate, time)
|
|
312
|
+
|
|
313
|
+
Transforms String Date from a [Month Year] format to Date object.
|
|
288
314
|
|
|
289
315
|
|
|
290
316
|
|
|
@@ -293,8 +319,8 @@ Builds the Fitler Data structure from UI filter data
|
|
|
293
319
|
|
|
294
320
|
| Name | Type | Description | |
|
|
295
321
|
| ---- | ---- | ----------- | -------- |
|
|
296
|
-
|
|
|
297
|
-
|
|
|
322
|
+
| monthYearDate | | String of [Month Year] date | |
|
|
323
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
298
324
|
|
|
299
325
|
|
|
300
326
|
|
|
@@ -302,17 +328,17 @@ Builds the Fitler Data structure from UI filter data
|
|
|
302
328
|
##### Returns
|
|
303
329
|
|
|
304
330
|
|
|
305
|
-
-
|
|
331
|
+
- The date object or the date in milliseconds
|
|
306
332
|
|
|
307
333
|
|
|
308
334
|
|
|
309
335
|
|
|
310
|
-
### dist/
|
|
336
|
+
### dist/dates/adapters/quarterYearToDate.js
|
|
311
337
|
|
|
312
338
|
|
|
313
|
-
####
|
|
339
|
+
#### quarterYearToDate(quarterYearDate, time)
|
|
314
340
|
|
|
315
|
-
|
|
341
|
+
Transforms String Date from a [Quarter Year] format to Date object.
|
|
316
342
|
|
|
317
343
|
|
|
318
344
|
|
|
@@ -321,8 +347,8 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
321
347
|
|
|
322
348
|
| Name | Type | Description | |
|
|
323
349
|
| ---- | ---- | ----------- | -------- |
|
|
324
|
-
|
|
|
325
|
-
|
|
|
350
|
+
| quarterYearDate | | String of [Quarter Year] date | |
|
|
351
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
326
352
|
|
|
327
353
|
|
|
328
354
|
|
|
@@ -330,13 +356,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
330
356
|
##### Returns
|
|
331
357
|
|
|
332
358
|
|
|
333
|
-
-
|
|
359
|
+
- The date object or the date in milliseconds
|
|
334
360
|
|
|
335
361
|
|
|
336
362
|
|
|
337
|
-
#### UI21ToFlatUI(scopes)
|
|
338
363
|
|
|
339
|
-
|
|
364
|
+
### dist/dates/adapters/weekYearToDate.js
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
#### weekYearToDate(date, time)
|
|
368
|
+
|
|
369
|
+
Transforms String Date from a [Week Year] format to Date object.
|
|
340
370
|
|
|
341
371
|
|
|
342
372
|
|
|
@@ -345,7 +375,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
345
375
|
|
|
346
376
|
| Name | Type | Description | |
|
|
347
377
|
| ---- | ---- | ----------- | -------- |
|
|
348
|
-
|
|
|
378
|
+
| date | | String of [Week Year] date | |
|
|
379
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
349
380
|
|
|
350
381
|
|
|
351
382
|
|
|
@@ -353,18 +384,17 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
353
384
|
##### Returns
|
|
354
385
|
|
|
355
386
|
|
|
356
|
-
-
|
|
387
|
+
- The date object or the date in milliseconds
|
|
357
388
|
|
|
358
389
|
|
|
359
390
|
|
|
360
391
|
|
|
361
|
-
### dist/
|
|
392
|
+
### dist/dates/adapters/yearToDate.js
|
|
362
393
|
|
|
363
394
|
|
|
364
|
-
####
|
|
395
|
+
#### yearToDate(yearDate, time)
|
|
365
396
|
|
|
366
|
-
|
|
367
|
-
Get the new property base on the old date grouping properties
|
|
397
|
+
Transforms String Date from a [Year] format to Date object.
|
|
368
398
|
|
|
369
399
|
|
|
370
400
|
|
|
@@ -373,7 +403,8 @@ Get the new property base on the old date grouping properties
|
|
|
373
403
|
|
|
374
404
|
| Name | Type | Description | |
|
|
375
405
|
| ---- | ---- | ----------- | -------- |
|
|
376
|
-
|
|
|
406
|
+
| yearDate | | String of [Year] date | |
|
|
407
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
377
408
|
|
|
378
409
|
|
|
379
410
|
|
|
@@ -381,28 +412,19 @@ Get the new property base on the old date grouping properties
|
|
|
381
412
|
##### Returns
|
|
382
413
|
|
|
383
414
|
|
|
384
|
-
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
415
|
+
- The date object or the date in milliseconds
|
|
388
416
|
|
|
389
|
-
### dist/filters/adapters/adaptFilterData.js
|
|
390
417
|
|
|
391
418
|
|
|
392
|
-
#### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
|
|
393
419
|
|
|
394
|
-
|
|
420
|
+
### dist/dates/relative/Adapter.js
|
|
395
421
|
|
|
396
422
|
|
|
423
|
+
#### value()
|
|
397
424
|
|
|
425
|
+
Resolves statement and returns statement value
|
|
398
426
|
|
|
399
|
-
##### Parameters
|
|
400
427
|
|
|
401
|
-
| Name | Type | Description | |
|
|
402
|
-
| ---- | ---- | ----------- | -------- |
|
|
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 | |
|
|
406
428
|
|
|
407
429
|
|
|
408
430
|
|
|
@@ -410,55 +432,47 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
410
432
|
##### Returns
|
|
411
433
|
|
|
412
434
|
|
|
413
|
-
-
|
|
435
|
+
- `AbsoluteRange` `string`
|
|
414
436
|
|
|
415
437
|
|
|
416
438
|
|
|
439
|
+
#### valueAsAnchor()
|
|
417
440
|
|
|
418
|
-
|
|
441
|
+
Resolves statement as an anchor
|
|
419
442
|
|
|
420
443
|
|
|
421
|
-
#### adaptFilterValues(filter)
|
|
422
444
|
|
|
423
|
-
[TODO: For 2022, eliminate this adapter]
|
|
424
|
-
Gets an adapted filter value array. Validates the enabled property and sets
|
|
425
445
|
|
|
426
446
|
|
|
427
447
|
|
|
448
|
+
##### Returns
|
|
428
449
|
|
|
429
|
-
##### Parameters
|
|
430
450
|
|
|
431
|
-
|
|
432
|
-
| ---- | ---- | ----------- | -------- |
|
|
433
|
-
| filter | | The filter | |
|
|
451
|
+
- `string`
|
|
434
452
|
|
|
435
453
|
|
|
436
454
|
|
|
455
|
+
#### _statementToRange() *private method*
|
|
437
456
|
|
|
438
|
-
|
|
457
|
+
Convert verbal statement to range value
|
|
439
458
|
|
|
440
459
|
|
|
441
|
-
- A new value array with the filled properties.
|
|
442
460
|
|
|
443
461
|
|
|
444
462
|
|
|
445
463
|
|
|
446
|
-
|
|
464
|
+
##### Returns
|
|
447
465
|
|
|
448
466
|
|
|
449
|
-
|
|
467
|
+
- `AbsoluteRange`
|
|
450
468
|
|
|
451
|
-
Generates a filter data structure from the flatttened UI filters.
|
|
452
469
|
|
|
453
470
|
|
|
471
|
+
#### _resolveAsThis() *private method*
|
|
454
472
|
|
|
473
|
+
Apply 'this' cursor logic to statement
|
|
455
474
|
|
|
456
|
-
##### Parameters
|
|
457
475
|
|
|
458
|
-
| Name | Type | Description | |
|
|
459
|
-
| ---- | ---- | ----------- | -------- |
|
|
460
|
-
| uFilters | | Array of flattened filters from UI | |
|
|
461
|
-
| version | | Tag for the version of the filter data structure | |
|
|
462
476
|
|
|
463
477
|
|
|
464
478
|
|
|
@@ -466,23 +480,15 @@ Generates a filter data structure from the flatttened UI filters.
|
|
|
466
480
|
##### Returns
|
|
467
481
|
|
|
468
482
|
|
|
469
|
-
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
#### buildScopes(fbFilters)
|
|
483
|
+
- `AbsoluteStatement`
|
|
474
484
|
|
|
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
|
|
477
485
|
|
|
478
486
|
|
|
487
|
+
#### _resolveAsTheLast() *private method*
|
|
479
488
|
|
|
489
|
+
Apply 'the last' cursor logic to statement
|
|
480
490
|
|
|
481
|
-
##### Parameters
|
|
482
491
|
|
|
483
|
-
| Name | Type | Description | |
|
|
484
|
-
| ---- | ---- | ----------- | -------- |
|
|
485
|
-
| fbFilters | | Array of flat filters from UI | |
|
|
486
492
|
|
|
487
493
|
|
|
488
494
|
|
|
@@ -490,22 +496,15 @@ Also, adds and organizes filters by datasets
|
|
|
490
496
|
##### Returns
|
|
491
497
|
|
|
492
498
|
|
|
493
|
-
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
#### buildScope(uFilter)
|
|
499
|
+
- `AbsoluteStatement`
|
|
498
500
|
|
|
499
|
-
Gets an scope structure for the filter data
|
|
500
501
|
|
|
501
502
|
|
|
503
|
+
#### _resolveAsTheNext() *private method*
|
|
502
504
|
|
|
505
|
+
Apply 'the next' cursor logic to statement
|
|
503
506
|
|
|
504
|
-
##### Parameters
|
|
505
507
|
|
|
506
|
-
| Name | Type | Description | |
|
|
507
|
-
| ---- | ---- | ----------- | -------- |
|
|
508
|
-
| uFilter | | UI structure filter | |
|
|
509
508
|
|
|
510
509
|
|
|
511
510
|
|
|
@@ -513,13 +512,13 @@ Gets an scope structure for the filter data
|
|
|
513
512
|
##### Returns
|
|
514
513
|
|
|
515
514
|
|
|
516
|
-
-
|
|
515
|
+
- `AbsoluteStatement`
|
|
517
516
|
|
|
518
517
|
|
|
519
518
|
|
|
520
|
-
####
|
|
519
|
+
#### replaceNowToken(value, now)
|
|
521
520
|
|
|
522
|
-
|
|
521
|
+
Replace '@now' token inside a string
|
|
523
522
|
|
|
524
523
|
|
|
525
524
|
|
|
@@ -528,7 +527,8 @@ Gets an dataset structure for the filter data
|
|
|
528
527
|
|
|
529
528
|
| Name | Type | Description | |
|
|
530
529
|
| ---- | ---- | ----------- | -------- |
|
|
531
|
-
|
|
|
530
|
+
| value | `string` | | |
|
|
531
|
+
| now | `Date` | | |
|
|
532
532
|
|
|
533
533
|
|
|
534
534
|
|
|
@@ -536,13 +536,13 @@ Gets an dataset structure for the filter data
|
|
|
536
536
|
##### Returns
|
|
537
537
|
|
|
538
538
|
|
|
539
|
-
-
|
|
539
|
+
- `string`
|
|
540
540
|
|
|
541
541
|
|
|
542
542
|
|
|
543
|
-
####
|
|
543
|
+
#### convertRelativeToAbsolute(args)
|
|
544
544
|
|
|
545
|
-
|
|
545
|
+
Returns a range object (date) from a group of statement params
|
|
546
546
|
|
|
547
547
|
|
|
548
548
|
|
|
@@ -551,25 +551,45 @@ Gets an filter structure for the filter data
|
|
|
551
551
|
|
|
552
552
|
| Name | Type | Description | |
|
|
553
553
|
| ---- | ---- | ----------- | -------- |
|
|
554
|
-
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
##### Returns
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
- an filter structure
|
|
563
|
-
|
|
554
|
+
| args | `RelativeToAbsoluteStruct` | | |
|
|
564
555
|
|
|
565
556
|
|
|
566
557
|
|
|
567
|
-
### dist/filters/adapters/flatUIToLogic.js
|
|
568
558
|
|
|
559
|
+
##### Examples
|
|
569
560
|
|
|
570
|
-
|
|
561
|
+
```javascript
|
|
562
|
+
pivot = '2021-03-03T12:30:40'
|
|
563
|
+
unit = month
|
|
564
|
+
steps = 2
|
|
565
|
+
setTo = END
|
|
566
|
+
resolverAsCalendar: true
|
|
567
|
+
=> Returns '2021-05-31T23:59:59'
|
|
568
|
+
```
|
|
569
|
+
```javascript
|
|
570
|
+
pivot = '2021-03-03T12:30:40'
|
|
571
|
+
unit = month
|
|
572
|
+
steps = -2
|
|
573
|
+
setTo = START
|
|
574
|
+
resolverAsCalendar: false
|
|
575
|
+
=> Returns '2021-01-03T00:00:00'
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
##### Returns
|
|
571
580
|
|
|
572
|
-
|
|
581
|
+
|
|
582
|
+
- `string`
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
### dist/dates/relative/relative.js
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
#### resolveRelative(statements, clock)
|
|
591
|
+
|
|
592
|
+
Resolve a list of relative statements according to operator
|
|
573
593
|
|
|
574
594
|
|
|
575
595
|
|
|
@@ -578,25 +598,44 @@ Generates a Logic structure from flattened UI filters
|
|
|
578
598
|
|
|
579
599
|
| Name | Type | Description | |
|
|
580
600
|
| ---- | ---- | ----------- | -------- |
|
|
581
|
-
|
|
|
601
|
+
| statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | |
|
|
602
|
+
| clock | `Date` | - Clock/time reference for relative date resolution | |
|
|
582
603
|
|
|
583
604
|
|
|
584
605
|
|
|
585
606
|
|
|
607
|
+
##### Examples
|
|
608
|
+
|
|
609
|
+
```javascript
|
|
610
|
+
Input:
|
|
611
|
+
{
|
|
612
|
+
"cursor": "the_next",
|
|
613
|
+
"unit": "year",
|
|
614
|
+
"number": 1,
|
|
615
|
+
"includeCurrent": false,
|
|
616
|
+
"isCalendarDate": false,
|
|
617
|
+
"anchor": "03/05/2021"
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
Output:
|
|
621
|
+
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
|
|
586
625
|
##### Returns
|
|
587
626
|
|
|
588
627
|
|
|
589
|
-
-
|
|
628
|
+
- `Array.<AbsoluteRange>` `Array.<string>`
|
|
590
629
|
|
|
591
630
|
|
|
592
631
|
|
|
593
632
|
|
|
594
|
-
### dist/
|
|
633
|
+
### dist/dates/range/getDateRange.js
|
|
595
634
|
|
|
596
635
|
|
|
597
|
-
####
|
|
636
|
+
#### getDateRange(value, dateGroupLabel, withTime)
|
|
598
637
|
|
|
599
|
-
|
|
638
|
+
Get date range object from a string date value
|
|
600
639
|
|
|
601
640
|
|
|
602
641
|
|
|
@@ -605,35 +644,58 @@ Generates a Logic structure from flattened UI filters
|
|
|
605
644
|
|
|
606
645
|
| Name | Type | Description | |
|
|
607
646
|
| ---- | ---- | ----------- | -------- |
|
|
608
|
-
|
|
|
647
|
+
| value | `String` | string date value | |
|
|
648
|
+
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
649
|
+
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
609
650
|
|
|
610
651
|
|
|
611
652
|
|
|
612
653
|
|
|
613
|
-
#####
|
|
654
|
+
##### Examples
|
|
614
655
|
|
|
656
|
+
```javascript
|
|
657
|
+
// 1) Year:
|
|
658
|
+
getDateRange('2020', 'YEAR');
|
|
659
|
+
// Will return:
|
|
660
|
+
{
|
|
661
|
+
from: '01/01/2020 00:00:00',
|
|
662
|
+
to: '12/31/2020 23:59:59'
|
|
663
|
+
}
|
|
615
664
|
|
|
616
|
-
|
|
665
|
+
// 2) Quarter:
|
|
666
|
+
getDateRange('Q3 2020', 'QUARTER');
|
|
667
|
+
// Will return:
|
|
668
|
+
{
|
|
669
|
+
from: '07/01/2020 00:00:00',
|
|
670
|
+
to: '09/30/2020 23:59:59'
|
|
671
|
+
}
|
|
617
672
|
|
|
673
|
+
// 3) Month:
|
|
674
|
+
getDateRange('Oct 2020', 'MONTH');
|
|
675
|
+
// Will return:
|
|
676
|
+
{
|
|
677
|
+
from: '10/01/2020 00:00:00',
|
|
678
|
+
to: '10/31/2020 23:59:59'
|
|
679
|
+
}
|
|
680
|
+
```
|
|
618
681
|
|
|
619
682
|
|
|
683
|
+
##### Returns
|
|
620
684
|
|
|
621
|
-
### dist/filters/adapters/flatUIToUI.js
|
|
622
685
|
|
|
686
|
+
- `Object` an object with the date range with two string date properties: from and to
|
|
623
687
|
|
|
624
|
-
#### flatUIToUI(uFilters, version)
|
|
625
688
|
|
|
626
|
-
Generates a UI filter data structure from the flatttened UI filters.
|
|
627
689
|
|
|
628
690
|
|
|
691
|
+
### dist/filters/classes/FilterInputErrorHandler.js
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
#### new FilterInputErrorHandler()
|
|
695
|
+
|
|
629
696
|
|
|
630
697
|
|
|
631
|
-
##### Parameters
|
|
632
698
|
|
|
633
|
-
| Name | Type | Description | |
|
|
634
|
-
| ---- | ---- | ----------- | -------- |
|
|
635
|
-
| uFilters | | Array of flattened filters from UI | |
|
|
636
|
-
| version | | Tag for the version of the filter data structure | |
|
|
637
699
|
|
|
638
700
|
|
|
639
701
|
|
|
@@ -641,14 +703,17 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
641
703
|
##### Returns
|
|
642
704
|
|
|
643
705
|
|
|
644
|
-
-
|
|
706
|
+
- `Void`
|
|
645
707
|
|
|
646
708
|
|
|
647
709
|
|
|
648
|
-
#### buildScopes(fbFilters)
|
|
649
710
|
|
|
650
|
-
|
|
651
|
-
|
|
711
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
715
|
+
|
|
716
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
652
717
|
|
|
653
718
|
|
|
654
719
|
|
|
@@ -657,7 +722,8 @@ Also, adds and organizes filters by datasets
|
|
|
657
722
|
|
|
658
723
|
| Name | Type | Description | |
|
|
659
724
|
| ---- | ---- | ----------- | -------- |
|
|
660
|
-
|
|
|
725
|
+
| filterData | | The filter data object. | |
|
|
726
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
661
727
|
|
|
662
728
|
|
|
663
729
|
|
|
@@ -665,13 +731,13 @@ Also, adds and organizes filters by datasets
|
|
|
665
731
|
##### Returns
|
|
666
732
|
|
|
667
733
|
|
|
668
|
-
-
|
|
734
|
+
- a flattened UI filters array
|
|
669
735
|
|
|
670
736
|
|
|
671
737
|
|
|
672
|
-
####
|
|
738
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
673
739
|
|
|
674
|
-
|
|
740
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
675
741
|
|
|
676
742
|
|
|
677
743
|
|
|
@@ -680,7 +746,8 @@ Gets an scope structure for the UI filter data
|
|
|
680
746
|
|
|
681
747
|
| Name | Type | Description | |
|
|
682
748
|
| ---- | ---- | ----------- | -------- |
|
|
683
|
-
|
|
|
749
|
+
| scopes | | The filter scope section | |
|
|
750
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
684
751
|
|
|
685
752
|
|
|
686
753
|
|
|
@@ -688,13 +755,17 @@ Gets an scope structure for the UI filter data
|
|
|
688
755
|
##### Returns
|
|
689
756
|
|
|
690
757
|
|
|
691
|
-
-
|
|
758
|
+
- a flattened UI filters array
|
|
692
759
|
|
|
693
760
|
|
|
694
761
|
|
|
695
|
-
#### buildDataset(uFilter)
|
|
696
762
|
|
|
697
|
-
|
|
763
|
+
### dist/filters/adapters/FDToLogic.js
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
#### FDToLogic(filterData)
|
|
767
|
+
|
|
768
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
698
769
|
|
|
699
770
|
|
|
700
771
|
|
|
@@ -703,7 +774,7 @@ Gets an dataset structure for the UI filter data
|
|
|
703
774
|
|
|
704
775
|
| Name | Type | Description | |
|
|
705
776
|
| ---- | ---- | ----------- | -------- |
|
|
706
|
-
|
|
|
777
|
+
| filterData | | The filter data object. | |
|
|
707
778
|
|
|
708
779
|
|
|
709
780
|
|
|
@@ -711,13 +782,13 @@ Gets an dataset structure for the UI filter data
|
|
|
711
782
|
##### Returns
|
|
712
783
|
|
|
713
784
|
|
|
714
|
-
-
|
|
785
|
+
- a filter logic array
|
|
715
786
|
|
|
716
787
|
|
|
717
788
|
|
|
718
|
-
####
|
|
789
|
+
#### getLogicBodyFromFD21(filterData)
|
|
719
790
|
|
|
720
|
-
Gets
|
|
791
|
+
Gets the logic body
|
|
721
792
|
|
|
722
793
|
|
|
723
794
|
|
|
@@ -726,7 +797,7 @@ Gets an filter structure for the UI filter data
|
|
|
726
797
|
|
|
727
798
|
| Name | Type | Description | |
|
|
728
799
|
| ---- | ---- | ----------- | -------- |
|
|
729
|
-
|
|
|
800
|
+
| filterData | | The filter data object | |
|
|
730
801
|
|
|
731
802
|
|
|
732
803
|
|
|
@@ -734,17 +805,17 @@ Gets an filter structure for the UI filter data
|
|
|
734
805
|
##### Returns
|
|
735
806
|
|
|
736
807
|
|
|
737
|
-
-
|
|
808
|
+
- a filter logic array
|
|
738
809
|
|
|
739
810
|
|
|
740
811
|
|
|
741
812
|
|
|
742
|
-
### dist/filters/adapters/
|
|
813
|
+
### dist/filters/adapters/FDToUI.js
|
|
743
814
|
|
|
744
815
|
|
|
745
|
-
####
|
|
816
|
+
#### FDToUI(filterData, datasetsInfo)
|
|
746
817
|
|
|
747
|
-
Generates a filter
|
|
818
|
+
Generates a UI filter structure from Filter Data structure.
|
|
748
819
|
|
|
749
820
|
|
|
750
821
|
|
|
@@ -753,8 +824,8 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
753
824
|
|
|
754
825
|
| Name | Type | Description | |
|
|
755
826
|
| ---- | ---- | ----------- | -------- |
|
|
756
|
-
| filterData | | The
|
|
757
|
-
|
|
|
827
|
+
| filterData | | The filter data object. | |
|
|
828
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
758
829
|
|
|
759
830
|
|
|
760
831
|
|
|
@@ -762,17 +833,13 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
762
833
|
##### Returns
|
|
763
834
|
|
|
764
835
|
|
|
765
|
-
- a
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
836
|
+
- a UI Filters structure
|
|
769
837
|
|
|
770
|
-
### dist/filters/adapters/logicToFlatUI.js
|
|
771
838
|
|
|
772
839
|
|
|
773
|
-
####
|
|
840
|
+
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
774
841
|
|
|
775
|
-
|
|
842
|
+
Generates a UI filter Structure from the Filter Data structure v2.1
|
|
776
843
|
|
|
777
844
|
|
|
778
845
|
|
|
@@ -781,7 +848,10 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
781
848
|
|
|
782
849
|
| Name | Type | Description | |
|
|
783
850
|
| ---- | ---- | ----------- | -------- |
|
|
784
|
-
|
|
|
851
|
+
| scopes | | The filter scope section | |
|
|
852
|
+
| section | | The filter section. | |
|
|
853
|
+
| version | | The version of the filter structure | |
|
|
854
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
785
855
|
|
|
786
856
|
|
|
787
857
|
|
|
@@ -789,13 +859,17 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
789
859
|
##### Returns
|
|
790
860
|
|
|
791
861
|
|
|
792
|
-
-
|
|
862
|
+
- a UI filter Structure
|
|
793
863
|
|
|
794
864
|
|
|
795
865
|
|
|
796
|
-
#### getFilter(filters, filter, getIndex)
|
|
797
866
|
|
|
798
|
-
|
|
867
|
+
### dist/filters/adapters/UIToFD.js
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
#### UIToFD(filterData)
|
|
871
|
+
|
|
872
|
+
Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
799
873
|
|
|
800
874
|
|
|
801
875
|
|
|
@@ -804,9 +878,7 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
804
878
|
|
|
805
879
|
| Name | Type | Description | |
|
|
806
880
|
| ---- | ---- | ----------- | -------- |
|
|
807
|
-
|
|
|
808
|
-
| filter | | The old logic structure filter | |
|
|
809
|
-
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
881
|
+
| filterData | | The UI filter data object. | |
|
|
810
882
|
|
|
811
883
|
|
|
812
884
|
|
|
@@ -814,13 +886,13 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
814
886
|
##### Returns
|
|
815
887
|
|
|
816
888
|
|
|
817
|
-
-
|
|
889
|
+
- a Filter Data structure
|
|
818
890
|
|
|
819
891
|
|
|
820
892
|
|
|
821
|
-
####
|
|
893
|
+
#### UI21ToFD(uFilterData, version)
|
|
822
894
|
|
|
823
|
-
|
|
895
|
+
Builds the Fitler Data structure from UI filter data
|
|
824
896
|
|
|
825
897
|
|
|
826
898
|
|
|
@@ -829,8 +901,8 @@ Refines the values of the Ranking column type.
|
|
|
829
901
|
|
|
830
902
|
| Name | Type | Description | |
|
|
831
903
|
| ---- | ---- | ----------- | -------- |
|
|
832
|
-
|
|
|
833
|
-
|
|
|
904
|
+
| uFilterData | | The UI filter Data object | |
|
|
905
|
+
| version | | the version of the structure | |
|
|
834
906
|
|
|
835
907
|
|
|
836
908
|
|
|
@@ -838,17 +910,17 @@ Refines the values of the Ranking column type.
|
|
|
838
910
|
##### Returns
|
|
839
911
|
|
|
840
912
|
|
|
841
|
-
-
|
|
913
|
+
-
|
|
842
914
|
|
|
843
915
|
|
|
844
916
|
|
|
845
917
|
|
|
846
|
-
### dist/filters/adapters/
|
|
918
|
+
### dist/filters/adapters/UIToFlatUI.js
|
|
847
919
|
|
|
848
920
|
|
|
849
|
-
####
|
|
921
|
+
#### UIToFlatUI(filterData, datasetsInfo)
|
|
850
922
|
|
|
851
|
-
Generates a UI filter structure from
|
|
923
|
+
Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
852
924
|
|
|
853
925
|
|
|
854
926
|
|
|
@@ -857,8 +929,8 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
857
929
|
|
|
858
930
|
| Name | Type | Description | |
|
|
859
931
|
| ---- | ---- | ----------- | -------- |
|
|
860
|
-
|
|
|
861
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
932
|
+
| filterData | | The UI filter data object. | |
|
|
933
|
+
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
862
934
|
|
|
863
935
|
|
|
864
936
|
|
|
@@ -866,17 +938,13 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
866
938
|
##### Returns
|
|
867
939
|
|
|
868
940
|
|
|
869
|
-
- a UI
|
|
870
|
-
|
|
871
|
-
|
|
941
|
+
- a flattened UI filters array
|
|
872
942
|
|
|
873
943
|
|
|
874
|
-
### dist/filters/adapters/transformFilters.js
|
|
875
944
|
|
|
945
|
+
#### UI21ToFlatUI(scopes)
|
|
876
946
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
Transform the old filters structure into the new one
|
|
947
|
+
Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
880
948
|
|
|
881
949
|
|
|
882
950
|
|
|
@@ -885,77 +953,53 @@ Transform the old filters structure into the new one
|
|
|
885
953
|
|
|
886
954
|
| Name | Type | Description | |
|
|
887
955
|
| ---- | ---- | ----------- | -------- |
|
|
888
|
-
|
|
|
889
|
-
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
956
|
+
| scopes | | The filter scope section | |
|
|
890
957
|
|
|
891
958
|
|
|
892
959
|
|
|
893
960
|
|
|
894
|
-
#####
|
|
961
|
+
##### Returns
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
- a flattened UI filters array
|
|
895
965
|
|
|
896
|
-
```javascript
|
|
897
966
|
|
|
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
967
|
|
|
941
|
-
|
|
942
|
-
|
|
968
|
+
|
|
969
|
+
### dist/filters/adapters/adaptDateGroupingProperty.js
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
#### adaptDateGroupingProperty(property)
|
|
973
|
+
|
|
974
|
+
[TODO: For 2022, eliminate this adapter]
|
|
975
|
+
Get the new property base on the old date grouping properties
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
##### Parameters
|
|
981
|
+
|
|
982
|
+
| Name | Type | Description | |
|
|
983
|
+
| ---- | ---- | ----------- | -------- |
|
|
984
|
+
| property | | | |
|
|
985
|
+
|
|
986
|
+
|
|
943
987
|
|
|
944
988
|
|
|
945
989
|
##### Returns
|
|
946
990
|
|
|
947
991
|
|
|
948
|
-
-
|
|
992
|
+
-
|
|
949
993
|
|
|
950
994
|
|
|
951
995
|
|
|
952
996
|
|
|
953
|
-
### dist/filters/
|
|
997
|
+
### dist/filters/adapters/adaptFilterData.js
|
|
954
998
|
|
|
955
999
|
|
|
956
|
-
####
|
|
1000
|
+
#### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
|
|
957
1001
|
|
|
958
|
-
|
|
1002
|
+
Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
959
1003
|
|
|
960
1004
|
|
|
961
1005
|
|
|
@@ -964,9 +1008,9 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
964
1008
|
|
|
965
1009
|
| Name | Type | Description | |
|
|
966
1010
|
| ---- | ---- | ----------- | -------- |
|
|
967
|
-
|
|
|
968
|
-
|
|
|
969
|
-
|
|
|
1011
|
+
| filterData | | The filter data structure. Accepts both v2.1 or v2.0 | |
|
|
1012
|
+
| getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | |
|
|
1013
|
+
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
970
1014
|
|
|
971
1015
|
|
|
972
1016
|
|
|
@@ -974,17 +1018,18 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
974
1018
|
##### Returns
|
|
975
1019
|
|
|
976
1020
|
|
|
977
|
-
-
|
|
1021
|
+
- A new filter data structure v2.1
|
|
978
1022
|
|
|
979
1023
|
|
|
980
1024
|
|
|
981
1025
|
|
|
982
|
-
### dist/filters/
|
|
1026
|
+
### dist/filters/adapters/adaptFilterValues.js
|
|
983
1027
|
|
|
984
1028
|
|
|
985
|
-
####
|
|
1029
|
+
#### adaptFilterValues(filter)
|
|
986
1030
|
|
|
987
|
-
|
|
1031
|
+
[TODO: For 2022, eliminate this adapter]
|
|
1032
|
+
Gets an adapted filter value array. Validates the enabled property and sets
|
|
988
1033
|
|
|
989
1034
|
|
|
990
1035
|
|
|
@@ -993,7 +1038,7 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
993
1038
|
|
|
994
1039
|
| Name | Type | Description | |
|
|
995
1040
|
| ---- | ---- | ----------- | -------- |
|
|
996
|
-
|
|
|
1041
|
+
| filter | | The filter | |
|
|
997
1042
|
|
|
998
1043
|
|
|
999
1044
|
|
|
@@ -1001,17 +1046,17 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
1001
1046
|
##### Returns
|
|
1002
1047
|
|
|
1003
1048
|
|
|
1004
|
-
-
|
|
1049
|
+
- A new value array with the filled properties.
|
|
1005
1050
|
|
|
1006
1051
|
|
|
1007
1052
|
|
|
1008
1053
|
|
|
1009
|
-
### dist/filters/
|
|
1054
|
+
### dist/filters/adapters/flatUIToFD.js
|
|
1010
1055
|
|
|
1011
1056
|
|
|
1012
|
-
####
|
|
1057
|
+
#### flatUIToFD(uFilters, version)
|
|
1013
1058
|
|
|
1014
|
-
|
|
1059
|
+
Generates a filter data structure from the flatttened UI filters.
|
|
1015
1060
|
|
|
1016
1061
|
|
|
1017
1062
|
|
|
@@ -1020,7 +1065,8 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1020
1065
|
|
|
1021
1066
|
| Name | Type | Description | |
|
|
1022
1067
|
| ---- | ---- | ----------- | -------- |
|
|
1023
|
-
|
|
|
1068
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1069
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1024
1070
|
|
|
1025
1071
|
|
|
1026
1072
|
|
|
@@ -1028,17 +1074,14 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1028
1074
|
##### Returns
|
|
1029
1075
|
|
|
1030
1076
|
|
|
1031
|
-
- a
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1077
|
+
- a Filter Data.
|
|
1035
1078
|
|
|
1036
|
-
### dist/filters/helpers/getScopesByHierarchy.js
|
|
1037
1079
|
|
|
1038
1080
|
|
|
1039
|
-
####
|
|
1081
|
+
#### buildScopes(fbFilters)
|
|
1040
1082
|
|
|
1041
|
-
|
|
1083
|
+
Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
|
|
1084
|
+
Also, adds and organizes filters by datasets
|
|
1042
1085
|
|
|
1043
1086
|
|
|
1044
1087
|
|
|
@@ -1047,8 +1090,7 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1047
1090
|
|
|
1048
1091
|
| Name | Type | Description | |
|
|
1049
1092
|
| ---- | ---- | ----------- | -------- |
|
|
1050
|
-
|
|
|
1051
|
-
| currentScope | | Current scope type | |
|
|
1093
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1052
1094
|
|
|
1053
1095
|
|
|
1054
1096
|
|
|
@@ -1056,17 +1098,13 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1056
1098
|
##### Returns
|
|
1057
1099
|
|
|
1058
1100
|
|
|
1059
|
-
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1101
|
+
- an array of scopes structure.
|
|
1063
1102
|
|
|
1064
|
-
### dist/dates/adapters/mdyDateToDate.js
|
|
1065
1103
|
|
|
1066
1104
|
|
|
1067
|
-
####
|
|
1105
|
+
#### buildScope(uFilter)
|
|
1068
1106
|
|
|
1069
|
-
|
|
1107
|
+
Gets an scope structure for the filter data
|
|
1070
1108
|
|
|
1071
1109
|
|
|
1072
1110
|
|
|
@@ -1075,8 +1113,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
1075
1113
|
|
|
1076
1114
|
| Name | Type | Description | |
|
|
1077
1115
|
| ---- | ---- | ----------- | -------- |
|
|
1078
|
-
|
|
|
1079
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1116
|
+
| uFilter | | UI structure filter | |
|
|
1080
1117
|
|
|
1081
1118
|
|
|
1082
1119
|
|
|
@@ -1084,17 +1121,13 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
1084
1121
|
##### Returns
|
|
1085
1122
|
|
|
1086
1123
|
|
|
1087
|
-
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1124
|
+
- an scope structure
|
|
1091
1125
|
|
|
1092
|
-
### dist/dates/adapters/monthYearToDate.js
|
|
1093
1126
|
|
|
1094
1127
|
|
|
1095
|
-
####
|
|
1128
|
+
#### buildDataset(uFilter)
|
|
1096
1129
|
|
|
1097
|
-
|
|
1130
|
+
Gets an dataset structure for the filter data
|
|
1098
1131
|
|
|
1099
1132
|
|
|
1100
1133
|
|
|
@@ -1103,8 +1136,7 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
1103
1136
|
|
|
1104
1137
|
| Name | Type | Description | |
|
|
1105
1138
|
| ---- | ---- | ----------- | -------- |
|
|
1106
|
-
|
|
|
1107
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1139
|
+
| uFilter | | a UI structure filter | |
|
|
1108
1140
|
|
|
1109
1141
|
|
|
1110
1142
|
|
|
@@ -1112,17 +1144,13 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
1112
1144
|
##### Returns
|
|
1113
1145
|
|
|
1114
1146
|
|
|
1115
|
-
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1147
|
+
- an dataset structure
|
|
1119
1148
|
|
|
1120
|
-
### dist/dates/adapters/quarterYearToDate.js
|
|
1121
1149
|
|
|
1122
1150
|
|
|
1123
|
-
####
|
|
1151
|
+
#### buildFilter(uFilter)
|
|
1124
1152
|
|
|
1125
|
-
|
|
1153
|
+
Gets an filter structure for the filter data
|
|
1126
1154
|
|
|
1127
1155
|
|
|
1128
1156
|
|
|
@@ -1131,8 +1159,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
1131
1159
|
|
|
1132
1160
|
| Name | Type | Description | |
|
|
1133
1161
|
| ---- | ---- | ----------- | -------- |
|
|
1134
|
-
|
|
|
1135
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1162
|
+
| uFilter | | a UI structure filter | |
|
|
1136
1163
|
|
|
1137
1164
|
|
|
1138
1165
|
|
|
@@ -1140,17 +1167,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
1140
1167
|
##### Returns
|
|
1141
1168
|
|
|
1142
1169
|
|
|
1143
|
-
-
|
|
1170
|
+
- an filter structure
|
|
1144
1171
|
|
|
1145
1172
|
|
|
1146
1173
|
|
|
1147
1174
|
|
|
1148
|
-
### dist/
|
|
1175
|
+
### dist/filters/adapters/flatUIToLogic.js
|
|
1149
1176
|
|
|
1150
1177
|
|
|
1151
|
-
####
|
|
1178
|
+
#### flatUIToLogic(uFilter)
|
|
1152
1179
|
|
|
1153
|
-
|
|
1180
|
+
Generates a Logic structure from flattened UI filters
|
|
1154
1181
|
|
|
1155
1182
|
|
|
1156
1183
|
|
|
@@ -1159,8 +1186,7 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
1159
1186
|
|
|
1160
1187
|
| Name | Type | Description | |
|
|
1161
1188
|
| ---- | ---- | ----------- | -------- |
|
|
1162
|
-
|
|
|
1163
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1189
|
+
| uFilter | | Array of flat filters from UI | |
|
|
1164
1190
|
|
|
1165
1191
|
|
|
1166
1192
|
|
|
@@ -1168,17 +1194,17 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
1168
1194
|
##### Returns
|
|
1169
1195
|
|
|
1170
1196
|
|
|
1171
|
-
- The
|
|
1197
|
+
- The logic structure
|
|
1172
1198
|
|
|
1173
1199
|
|
|
1174
1200
|
|
|
1175
1201
|
|
|
1176
|
-
### dist/
|
|
1202
|
+
### dist/filters/adapters/flatUIToOldLogic.js
|
|
1177
1203
|
|
|
1178
1204
|
|
|
1179
|
-
####
|
|
1205
|
+
#### flatUIToOldLogic(uFilters)
|
|
1180
1206
|
|
|
1181
|
-
|
|
1207
|
+
Generates a Logic structure from flattened UI filters
|
|
1182
1208
|
|
|
1183
1209
|
|
|
1184
1210
|
|
|
@@ -1187,8 +1213,7 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
1187
1213
|
|
|
1188
1214
|
| Name | Type | Description | |
|
|
1189
1215
|
| ---- | ---- | ----------- | -------- |
|
|
1190
|
-
|
|
|
1191
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1216
|
+
| uFilters | | Array of flat filters from UI | |
|
|
1192
1217
|
|
|
1193
1218
|
|
|
1194
1219
|
|
|
@@ -1196,17 +1221,17 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
1196
1221
|
##### Returns
|
|
1197
1222
|
|
|
1198
1223
|
|
|
1199
|
-
- The
|
|
1224
|
+
- The logic structure
|
|
1200
1225
|
|
|
1201
1226
|
|
|
1202
1227
|
|
|
1203
1228
|
|
|
1204
|
-
### dist/
|
|
1229
|
+
### dist/filters/adapters/flatUIToUI.js
|
|
1205
1230
|
|
|
1206
1231
|
|
|
1207
|
-
####
|
|
1232
|
+
#### flatUIToUI(uFilters, version)
|
|
1208
1233
|
|
|
1209
|
-
|
|
1234
|
+
Generates a UI filter data structure from the flatttened UI filters.
|
|
1210
1235
|
|
|
1211
1236
|
|
|
1212
1237
|
|
|
@@ -1215,9 +1240,8 @@ Gets a Date Object instance by a Date format
|
|
|
1215
1240
|
|
|
1216
1241
|
| Name | Type | Description | |
|
|
1217
1242
|
| ---- | ---- | ----------- | -------- |
|
|
1218
|
-
|
|
|
1219
|
-
|
|
|
1220
|
-
| time | | flag to convert the formatted date to miliseconds | |
|
|
1243
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1244
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1221
1245
|
|
|
1222
1246
|
|
|
1223
1247
|
|
|
@@ -1225,17 +1249,14 @@ Gets a Date Object instance by a Date format
|
|
|
1225
1249
|
##### Returns
|
|
1226
1250
|
|
|
1227
1251
|
|
|
1228
|
-
- a
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1252
|
+
- a UI Filter Data.
|
|
1232
1253
|
|
|
1233
|
-
### dist/dates/helpers/getDateFormatByProperty.js
|
|
1234
1254
|
|
|
1235
1255
|
|
|
1236
|
-
####
|
|
1256
|
+
#### buildScopes(fbFilters)
|
|
1237
1257
|
|
|
1238
|
-
Gets the
|
|
1258
|
+
Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
|
|
1259
|
+
Also, adds and organizes filters by datasets
|
|
1239
1260
|
|
|
1240
1261
|
|
|
1241
1262
|
|
|
@@ -1244,7 +1265,7 @@ Gets the date format by the given property
|
|
|
1244
1265
|
|
|
1245
1266
|
| Name | Type | Description | |
|
|
1246
1267
|
| ---- | ---- | ----------- | -------- |
|
|
1247
|
-
|
|
|
1268
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1248
1269
|
|
|
1249
1270
|
|
|
1250
1271
|
|
|
@@ -1252,17 +1273,13 @@ Gets the date format by the given property
|
|
|
1252
1273
|
##### Returns
|
|
1253
1274
|
|
|
1254
1275
|
|
|
1255
|
-
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1276
|
+
- an array of scopes structure.
|
|
1259
1277
|
|
|
1260
|
-
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
1261
1278
|
|
|
1262
1279
|
|
|
1263
|
-
####
|
|
1280
|
+
#### buildScope(uFilter)
|
|
1264
1281
|
|
|
1265
|
-
Gets an
|
|
1282
|
+
Gets an scope structure for the UI filter data
|
|
1266
1283
|
|
|
1267
1284
|
|
|
1268
1285
|
|
|
@@ -1271,7 +1288,7 @@ Gets an array of regular expressions by the given date format
|
|
|
1271
1288
|
|
|
1272
1289
|
| Name | Type | Description | |
|
|
1273
1290
|
| ---- | ---- | ----------- | -------- |
|
|
1274
|
-
|
|
|
1291
|
+
| uFilter | | UI structure filter | |
|
|
1275
1292
|
|
|
1276
1293
|
|
|
1277
1294
|
|
|
@@ -1279,17 +1296,13 @@ Gets an array of regular expressions by the given date format
|
|
|
1279
1296
|
##### Returns
|
|
1280
1297
|
|
|
1281
1298
|
|
|
1282
|
-
- an
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1299
|
+
- an scope structure
|
|
1286
1300
|
|
|
1287
|
-
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
1288
1301
|
|
|
1289
1302
|
|
|
1290
|
-
####
|
|
1303
|
+
#### buildDataset(uFilter)
|
|
1291
1304
|
|
|
1292
|
-
Gets
|
|
1305
|
+
Gets an dataset structure for the UI filter data
|
|
1293
1306
|
|
|
1294
1307
|
|
|
1295
1308
|
|
|
@@ -1298,7 +1311,7 @@ Gets the separator of the date format
|
|
|
1298
1311
|
|
|
1299
1312
|
| Name | Type | Description | |
|
|
1300
1313
|
| ---- | ---- | ----------- | -------- |
|
|
1301
|
-
|
|
|
1314
|
+
| uFilter | | a UI structure filter | |
|
|
1302
1315
|
|
|
1303
1316
|
|
|
1304
1317
|
|
|
@@ -1306,18 +1319,13 @@ Gets the separator of the date format
|
|
|
1306
1319
|
##### Returns
|
|
1307
1320
|
|
|
1308
1321
|
|
|
1309
|
-
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1322
|
+
- an dataset structure
|
|
1313
1323
|
|
|
1314
|
-
### dist/dates/helpers/getWeek.js
|
|
1315
1324
|
|
|
1316
1325
|
|
|
1317
|
-
####
|
|
1326
|
+
#### buildFilter(uFilter)
|
|
1318
1327
|
|
|
1319
|
-
Gets
|
|
1320
|
-
Additionally, the month and the year
|
|
1328
|
+
Gets an filter structure for the UI filter data
|
|
1321
1329
|
|
|
1322
1330
|
|
|
1323
1331
|
|
|
@@ -1326,7 +1334,7 @@ Additionally, the month and the year
|
|
|
1326
1334
|
|
|
1327
1335
|
| Name | Type | Description | |
|
|
1328
1336
|
| ---- | ---- | ----------- | -------- |
|
|
1329
|
-
|
|
|
1337
|
+
| uFilter | | a UI structure filter | |
|
|
1330
1338
|
|
|
1331
1339
|
|
|
1332
1340
|
|
|
@@ -1334,20 +1342,17 @@ Additionally, the month and the year
|
|
|
1334
1342
|
##### Returns
|
|
1335
1343
|
|
|
1336
1344
|
|
|
1337
|
-
- an
|
|
1345
|
+
- an filter structure
|
|
1338
1346
|
|
|
1339
1347
|
|
|
1340
1348
|
|
|
1341
1349
|
|
|
1342
|
-
### dist/
|
|
1350
|
+
### dist/filters/adapters/logicToFD.js
|
|
1343
1351
|
|
|
1344
1352
|
|
|
1345
|
-
####
|
|
1353
|
+
#### logicToFD(filterData, version)
|
|
1346
1354
|
|
|
1347
|
-
|
|
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
|
|
1355
|
+
Generates a filter data structure from the old logic structure (v2.0).
|
|
1351
1356
|
|
|
1352
1357
|
|
|
1353
1358
|
|
|
@@ -1356,8 +1361,8 @@ Validate a string date depending on giving format
|
|
|
1356
1361
|
|
|
1357
1362
|
| Name | Type | Description | |
|
|
1358
1363
|
| ---- | ---- | ----------- | -------- |
|
|
1359
|
-
|
|
|
1360
|
-
|
|
|
1364
|
+
| filterData | | The old filter data structure with logic (v2.0) | |
|
|
1365
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1361
1366
|
|
|
1362
1367
|
|
|
1363
1368
|
|
|
@@ -1365,17 +1370,17 @@ Validate a string date depending on giving format
|
|
|
1365
1370
|
##### Returns
|
|
1366
1371
|
|
|
1367
1372
|
|
|
1368
|
-
-
|
|
1373
|
+
- a Filter Data.
|
|
1369
1374
|
|
|
1370
1375
|
|
|
1371
1376
|
|
|
1372
1377
|
|
|
1373
|
-
### dist/
|
|
1378
|
+
### dist/filters/adapters/logicToFlatUI.js
|
|
1374
1379
|
|
|
1375
1380
|
|
|
1376
|
-
####
|
|
1381
|
+
#### logicToFlatUI(logics)
|
|
1377
1382
|
|
|
1378
|
-
|
|
1383
|
+
Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
1379
1384
|
|
|
1380
1385
|
|
|
1381
1386
|
|
|
@@ -1384,8 +1389,7 @@ Validates the given string as Date by its date format.
|
|
|
1384
1389
|
|
|
1385
1390
|
| Name | Type | Description | |
|
|
1386
1391
|
| ---- | ---- | ----------- | -------- |
|
|
1387
|
-
|
|
|
1388
|
-
| dateForma | | the format of the date to validate the string | |
|
|
1392
|
+
| logics | | The old logic structure (v2.0) | |
|
|
1389
1393
|
|
|
1390
1394
|
|
|
1391
1395
|
|
|
@@ -1393,17 +1397,13 @@ Validates the given string as Date by its date format.
|
|
|
1393
1397
|
##### Returns
|
|
1394
1398
|
|
|
1395
1399
|
|
|
1396
|
-
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
+
- The Flattened UI Filters array
|
|
1400
1401
|
|
|
1401
|
-
### dist/dates/range/getDateRange.js
|
|
1402
1402
|
|
|
1403
1403
|
|
|
1404
|
-
####
|
|
1404
|
+
#### getFilter(filters, filter, getIndex)
|
|
1405
1405
|
|
|
1406
|
-
Get
|
|
1406
|
+
Get the filter or the index of the given array, validating an old filter structure.
|
|
1407
1407
|
|
|
1408
1408
|
|
|
1409
1409
|
|
|
@@ -1412,58 +1412,33 @@ Get date range object from a string date value
|
|
|
1412
1412
|
|
|
1413
1413
|
| Name | Type | Description | |
|
|
1414
1414
|
| ---- | ---- | ----------- | -------- |
|
|
1415
|
-
|
|
|
1416
|
-
|
|
|
1417
|
-
|
|
|
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
|
-
}
|
|
1415
|
+
| filters | | The array of UI filters | |
|
|
1416
|
+
| filter | | The old logic structure filter | |
|
|
1417
|
+
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
1432
1418
|
|
|
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
1419
|
|
|
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
1420
|
|
|
1450
1421
|
|
|
1451
1422
|
##### Returns
|
|
1452
1423
|
|
|
1453
1424
|
|
|
1454
|
-
-
|
|
1425
|
+
- the index or the UI filter object
|
|
1455
1426
|
|
|
1456
1427
|
|
|
1457
1428
|
|
|
1429
|
+
#### refineRankingValues(values, uiValues)
|
|
1458
1430
|
|
|
1459
|
-
|
|
1431
|
+
Refines the values of the Ranking column type.
|
|
1460
1432
|
|
|
1461
1433
|
|
|
1462
|
-
#### value()
|
|
1463
1434
|
|
|
1464
|
-
Resolves statement and returns statement value
|
|
1465
1435
|
|
|
1436
|
+
##### Parameters
|
|
1466
1437
|
|
|
1438
|
+
| Name | Type | Description | |
|
|
1439
|
+
| ---- | ---- | ----------- | -------- |
|
|
1440
|
+
| values | | the Array of Ranking values | |
|
|
1441
|
+
| uiValues | | Object with additional info about the values of the filter. | |
|
|
1467
1442
|
|
|
1468
1443
|
|
|
1469
1444
|
|
|
@@ -1471,93 +1446,153 @@ Resolves statement and returns statement value
|
|
|
1471
1446
|
##### Returns
|
|
1472
1447
|
|
|
1473
1448
|
|
|
1474
|
-
-
|
|
1449
|
+
- the array of Ranking values
|
|
1475
1450
|
|
|
1476
1451
|
|
|
1477
1452
|
|
|
1478
|
-
#### valueAsAnchor()
|
|
1479
1453
|
|
|
1480
|
-
|
|
1454
|
+
### dist/filters/adapters/logicToUI.js
|
|
1481
1455
|
|
|
1482
1456
|
|
|
1457
|
+
#### logicToUI(uFilters, datasetsInfo)
|
|
1483
1458
|
|
|
1459
|
+
Generates a UI filter structure from the old logic structure (v2.0).
|
|
1484
1460
|
|
|
1485
1461
|
|
|
1486
1462
|
|
|
1487
|
-
##### Returns
|
|
1488
1463
|
|
|
1464
|
+
##### Parameters
|
|
1489
1465
|
|
|
1490
|
-
|
|
1466
|
+
| Name | Type | Description | |
|
|
1467
|
+
| ---- | ---- | ----------- | -------- |
|
|
1468
|
+
| uFilters | | Array of filters from old logic structure | |
|
|
1469
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1491
1470
|
|
|
1492
1471
|
|
|
1493
1472
|
|
|
1494
|
-
#### _statementToRange() *private method*
|
|
1495
1473
|
|
|
1496
|
-
|
|
1474
|
+
##### Returns
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
- a UI Filter Data.
|
|
1497
1478
|
|
|
1498
1479
|
|
|
1499
1480
|
|
|
1500
1481
|
|
|
1482
|
+
### dist/filters/adapters/transformFilters.js
|
|
1501
1483
|
|
|
1502
1484
|
|
|
1503
|
-
|
|
1485
|
+
#### transformFilters(oldFiltersObj, section)
|
|
1504
1486
|
|
|
1487
|
+
Transform the old filters structure into the new one
|
|
1505
1488
|
|
|
1506
|
-
- `AbsoluteRange`
|
|
1507
1489
|
|
|
1508
1490
|
|
|
1509
1491
|
|
|
1510
|
-
|
|
1492
|
+
##### Parameters
|
|
1511
1493
|
|
|
1512
|
-
|
|
1494
|
+
| Name | Type | Description | |
|
|
1495
|
+
| ---- | ---- | ----------- | -------- |
|
|
1496
|
+
| oldFiltersObj | `Object` | an object with the old filters structure | |
|
|
1497
|
+
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
1513
1498
|
|
|
1514
1499
|
|
|
1515
1500
|
|
|
1516
1501
|
|
|
1502
|
+
##### Examples
|
|
1517
1503
|
|
|
1504
|
+
```javascript
|
|
1518
1505
|
|
|
1519
|
-
|
|
1506
|
+
const oldPreferenceFilters = {
|
|
1507
|
+
"WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
|
|
1508
|
+
"WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
|
|
1509
|
+
"WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
|
|
1510
|
+
"WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
|
|
1511
|
+
"WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
|
|
1512
|
+
"formulaId": null,
|
|
1513
|
+
"panelId": null,
|
|
1514
|
+
"values": [
|
|
1515
|
+
{
|
|
1516
|
+
"EQUALS": [
|
|
1517
|
+
{
|
|
1518
|
+
"id": "AK4M8UV2a0",
|
|
1519
|
+
"value": "A",
|
|
1520
|
+
"enabled": true,
|
|
1521
|
+
"imageUrl": null
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
"id": "AK4M8UV2a1",
|
|
1525
|
+
"value": "B",
|
|
1526
|
+
"enabled": true,
|
|
1527
|
+
"imageUrl": null
|
|
1528
|
+
}
|
|
1529
|
+
]
|
|
1530
|
+
}
|
|
1531
|
+
],
|
|
1532
|
+
"bucketId": null,
|
|
1533
|
+
"text": "MC",
|
|
1534
|
+
"title": "MC",
|
|
1535
|
+
"type": "SINGLE_CHOICE",
|
|
1536
|
+
"qid": "AK4M8UV2",
|
|
1537
|
+
"dataset": {
|
|
1538
|
+
"sourceid": "xYOQAdpqT",
|
|
1539
|
+
"name": "Form All Questions",
|
|
1540
|
+
"qrveyid": "xYOQAdpqT",
|
|
1541
|
+
"text": "Form All Questions",
|
|
1542
|
+
"linkid": 0
|
|
1543
|
+
},
|
|
1544
|
+
"enabled": true,
|
|
1545
|
+
"linked": null
|
|
1546
|
+
}
|
|
1547
|
+
};
|
|
1520
1548
|
|
|
1549
|
+
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
1550
|
+
```
|
|
1521
1551
|
|
|
1522
|
-
- `AbsoluteStatement`
|
|
1523
1552
|
|
|
1553
|
+
##### Returns
|
|
1524
1554
|
|
|
1525
1555
|
|
|
1526
|
-
|
|
1556
|
+
- `Object` an object with the new filters structure
|
|
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
|
-
|
|
1566
|
+
[TODO: Make a proper description for this function]
|
|
1536
1567
|
|
|
1537
1568
|
|
|
1538
|
-
- `AbsoluteStatement`
|
|
1539
1569
|
|
|
1540
1570
|
|
|
1571
|
+
##### Parameters
|
|
1541
1572
|
|
|
1542
|
-
|
|
1573
|
+
| Name | Type | Description | |
|
|
1574
|
+
| ---- | ---- | ----------- | -------- |
|
|
1575
|
+
| chartSettings | | Chart Settings for the Filter Builder | |
|
|
1576
|
+
| scopes | | | |
|
|
1577
|
+
| currentScope | | | |
|
|
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
|
-
####
|
|
1593
|
+
#### getAvailableScopes(config)
|
|
1559
1594
|
|
|
1560
|
-
|
|
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
|
-
|
|
|
1570
|
-
| now | `Date` | | |
|
|
1604
|
+
| config | | given Differnts IDs in order set a available scope | |
|
|
1571
1605
|
|
|
1572
1606
|
|
|
1573
1607
|
|
|
@@ -1575,13 +1609,17 @@ Replace '@now' token inside a string
|
|
|
1575
1609
|
##### Returns
|
|
1576
1610
|
|
|
1577
1611
|
|
|
1578
|
-
-
|
|
1612
|
+
- a Scopes/Scope IDs array
|
|
1579
1613
|
|
|
1580
1614
|
|
|
1581
1615
|
|
|
1582
|
-
#### convertRelativeToAbsolute(args)
|
|
1583
1616
|
|
|
1584
|
-
|
|
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
|
-
|
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1631
|
+
| config | | any config | |
|
|
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
|
-
-
|
|
1639
|
+
- a Available Scope IDS config
|
|
1622
1640
|
|
|
1623
1641
|
|
|
1624
1642
|
|
|
1625
1643
|
|
|
1626
|
-
### dist/
|
|
1644
|
+
### dist/filters/helpers/getScopesByHierarchy.js
|
|
1627
1645
|
|
|
1628
1646
|
|
|
1629
|
-
####
|
|
1647
|
+
#### getScopesByHierarchy(scopes, currentScope)
|
|
1630
1648
|
|
|
1631
|
-
|
|
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
|
-
|
|
|
1641
|
-
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
##### Examples
|
|
1658
|
+
| scopes | | the collection of Scopes/Scope IDs | |
|
|
1659
|
+
| currentScope | | Current scope type | |
|
|
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
|
-
-
|
|
1667
|
+
- A new array of Scopes/Scope IDs
|
|
1668
1668
|
|
|
1669
1669
|
|
|
1670
1670
|
|
|
@@ -2094,35 +2094,6 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
2094
2094
|
|
|
2095
2095
|
|
|
2096
2096
|
|
|
2097
|
-
### dist/general/mix/size.js
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
#### size(obj)
|
|
2101
|
-
|
|
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
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
##### Parameters
|
|
2110
|
-
|
|
2111
|
-
| Name | Type | Description | |
|
|
2112
|
-
| ---- | ---- | ----------- | -------- |
|
|
2113
|
-
| obj | `Any` | Any object-type variable | |
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
##### Returns
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
- `Number` the size of the given variable
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
2097
|
### dist/general/mix/randomId.js
|
|
2127
2098
|
|
|
2128
2099
|
|
|
@@ -2153,13 +2124,14 @@ Creates a random string
|
|
|
2153
2124
|
|
|
2154
2125
|
|
|
2155
2126
|
|
|
2156
|
-
### dist/general/
|
|
2127
|
+
### dist/general/mix/size.js
|
|
2157
2128
|
|
|
2158
2129
|
|
|
2159
|
-
####
|
|
2130
|
+
#### size(obj)
|
|
2160
2131
|
|
|
2161
|
-
|
|
2162
|
-
|
|
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.
|
|
2163
2135
|
|
|
2164
2136
|
|
|
2165
2137
|
|
|
@@ -2168,7 +2140,7 @@ Not to use this function with inner objects and functions
|
|
|
2168
2140
|
|
|
2169
2141
|
| Name | Type | Description | |
|
|
2170
2142
|
| ---- | ---- | ----------- | -------- |
|
|
2171
|
-
| obj | |
|
|
2143
|
+
| obj | `Any` | Any object-type variable | |
|
|
2172
2144
|
|
|
2173
2145
|
|
|
2174
2146
|
|
|
@@ -2176,7 +2148,7 @@ Not to use this function with inner objects and functions
|
|
|
2176
2148
|
##### Returns
|
|
2177
2149
|
|
|
2178
2150
|
|
|
2179
|
-
-
|
|
2151
|
+
- `Number` the size of the given variable
|
|
2180
2152
|
|
|
2181
2153
|
|
|
2182
2154
|
|
|
@@ -2238,20 +2210,13 @@ _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
|
2238
2210
|
|
|
2239
2211
|
|
|
2240
2212
|
|
|
2241
|
-
### dist/general/object/
|
|
2213
|
+
### dist/general/object/cloneDeep.js
|
|
2242
2214
|
|
|
2243
2215
|
|
|
2244
|
-
####
|
|
2216
|
+
#### cloneDeep(obj)
|
|
2245
2217
|
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
- List of cases that do not match
|
|
2249
|
-
-- From lower to snake case
|
|
2250
|
-
-- From upper to snake case
|
|
2251
|
-
-- From lower to camel case
|
|
2252
|
-
-- From upper to camel case
|
|
2253
|
-
-- From lower to pascal case
|
|
2254
|
-
-- From upper to pascal case
|
|
2218
|
+
A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
|
|
2219
|
+
Not to use this function with inner objects and functions
|
|
2255
2220
|
|
|
2256
2221
|
|
|
2257
2222
|
|
|
@@ -2260,8 +2225,35 @@ Searchs for properties in different case styles such as: lower, upper, camel and
|
|
|
2260
2225
|
|
|
2261
2226
|
| Name | Type | Description | |
|
|
2262
2227
|
| ---- | ---- | ----------- | -------- |
|
|
2263
|
-
| obj |
|
|
2264
|
-
|
|
2228
|
+
| obj | | The object | |
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
##### Returns
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
- The new reference object or the given object if the parsing is incorrect or empty
|
|
2237
|
+
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
### dist/general/object/hasProperty.js
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
#### _hasProperty(obj, property)
|
|
2245
|
+
|
|
2246
|
+
Use the hasOwnProperty in order to verify if the given property exists in the object.
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
##### Parameters
|
|
2252
|
+
|
|
2253
|
+
| Name | Type | Description | |
|
|
2254
|
+
| ---- | ---- | ----------- | -------- |
|
|
2255
|
+
| obj | `object` | an object | |
|
|
2256
|
+
| property | `string` | String to verify if exists in the object as property | |
|
|
2265
2257
|
|
|
2266
2258
|
|
|
2267
2259
|
|
|
@@ -2269,24 +2261,37 @@ Searchs for properties in different case styles such as: lower, upper, camel and
|
|
|
2269
2261
|
##### Examples
|
|
2270
2262
|
|
|
2271
2263
|
```javascript
|
|
2272
|
-
|
|
2264
|
+
const prop = 'prop2'
|
|
2265
|
+
const obj1 = { prop1: 'hello', prop2: 'world'}
|
|
2266
|
+
_hasProperty(ob1, prop1) // true
|
|
2267
|
+
|
|
2268
|
+
const obj2 = { prop1: 'hello world' }
|
|
2269
|
+
_hasProperty(ob1, prop2) // false
|
|
2273
2270
|
```
|
|
2274
2271
|
|
|
2275
2272
|
|
|
2276
2273
|
##### Returns
|
|
2277
2274
|
|
|
2278
2275
|
|
|
2279
|
-
-
|
|
2276
|
+
- True if the object has the given property; otherwise, false.
|
|
2280
2277
|
|
|
2281
2278
|
|
|
2282
2279
|
|
|
2283
2280
|
|
|
2284
|
-
### dist/general/object/
|
|
2281
|
+
### dist/general/object/getAttribute.js
|
|
2285
2282
|
|
|
2286
2283
|
|
|
2287
|
-
####
|
|
2284
|
+
#### getAttribute(obj, key)
|
|
2288
2285
|
|
|
2289
|
-
|
|
2286
|
+
Searchs for properties in different case styles such as: lower, upper, camel and pascal
|
|
2287
|
+
- To optimize the searching, it is required a key in a snake_case style
|
|
2288
|
+
- List of cases that do not match
|
|
2289
|
+
-- From lower to snake case
|
|
2290
|
+
-- From upper to snake case
|
|
2291
|
+
-- From lower to camel case
|
|
2292
|
+
-- From upper to camel case
|
|
2293
|
+
-- From lower to pascal case
|
|
2294
|
+
-- From upper to pascal case
|
|
2290
2295
|
|
|
2291
2296
|
|
|
2292
2297
|
|
|
@@ -2295,8 +2300,8 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
|
|
|
2295
2300
|
|
|
2296
2301
|
| Name | Type | Description | |
|
|
2297
2302
|
| ---- | ---- | ----------- | -------- |
|
|
2298
|
-
| obj | `object` |
|
|
2299
|
-
|
|
|
2303
|
+
| obj | `object` | object to look for | |
|
|
2304
|
+
| key | `string` | String attribute in snake_case style | |
|
|
2300
2305
|
|
|
2301
2306
|
|
|
2302
2307
|
|
|
@@ -2304,19 +2309,14 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
|
|
|
2304
2309
|
##### Examples
|
|
2305
2310
|
|
|
2306
2311
|
```javascript
|
|
2307
|
-
|
|
2308
|
-
const obj1 = { prop1: 'hello', prop2: 'world'}
|
|
2309
|
-
_hasProperty(ob1, prop1) // true
|
|
2310
|
-
|
|
2311
|
-
const obj2 = { prop1: 'hello world' }
|
|
2312
|
-
_hasProperty(ob1, prop2) // false
|
|
2312
|
+
getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2313
2313
|
```
|
|
2314
2314
|
|
|
2315
2315
|
|
|
2316
2316
|
##### Returns
|
|
2317
2317
|
|
|
2318
2318
|
|
|
2319
|
-
-
|
|
2319
|
+
- `Void`
|
|
2320
2320
|
|
|
2321
2321
|
|
|
2322
2322
|
|
|
@@ -2377,12 +2377,13 @@ and return a mapped object
|
|
|
2377
2377
|
|
|
2378
2378
|
|
|
2379
2379
|
|
|
2380
|
-
### dist/general/object/
|
|
2380
|
+
### dist/general/object/mergeDeep.js
|
|
2381
2381
|
|
|
2382
2382
|
|
|
2383
|
-
####
|
|
2383
|
+
#### mergeDeep(obj1, obj2, settings)
|
|
2384
2384
|
|
|
2385
|
-
|
|
2385
|
+
Merges two objects into a new one.
|
|
2386
|
+
The second given argument to the first given argument.
|
|
2386
2387
|
|
|
2387
2388
|
|
|
2388
2389
|
|
|
@@ -2391,8 +2392,9 @@ Created a new reference of the given argument
|
|
|
2391
2392
|
|
|
2392
2393
|
| Name | Type | Description | |
|
|
2393
2394
|
| ---- | ---- | ----------- | -------- |
|
|
2394
|
-
|
|
|
2395
|
-
|
|
|
2395
|
+
| obj1 | | The target object | |
|
|
2396
|
+
| obj2 | | The object to be merged | |
|
|
2397
|
+
| settings | | Object settings for this function | |
|
|
2396
2398
|
|
|
2397
2399
|
|
|
2398
2400
|
|
|
@@ -2400,18 +2402,13 @@ Created a new reference of the given argument
|
|
|
2400
2402
|
##### Returns
|
|
2401
2403
|
|
|
2402
2404
|
|
|
2403
|
-
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2405
|
+
- a new merged object
|
|
2407
2406
|
|
|
2408
|
-
### dist/general/object/mergeDeep.js
|
|
2409
2407
|
|
|
2410
2408
|
|
|
2411
|
-
####
|
|
2409
|
+
#### isValid(obj1, obj2)
|
|
2412
2410
|
|
|
2413
|
-
|
|
2414
|
-
The second given argument to the first given argument.
|
|
2411
|
+
Validates if the two arguments are objects
|
|
2415
2412
|
|
|
2416
2413
|
|
|
2417
2414
|
|
|
@@ -2422,7 +2419,6 @@ The second given argument to the first given argument.
|
|
|
2422
2419
|
| ---- | ---- | ----------- | -------- |
|
|
2423
2420
|
| obj1 | | The target object | |
|
|
2424
2421
|
| obj2 | | The object to be merged | |
|
|
2425
|
-
| settings | | Object settings for this function | |
|
|
2426
2422
|
|
|
2427
2423
|
|
|
2428
2424
|
|
|
@@ -2430,13 +2426,13 @@ The second given argument to the first given argument.
|
|
|
2430
2426
|
##### Returns
|
|
2431
2427
|
|
|
2432
2428
|
|
|
2433
|
-
-
|
|
2429
|
+
- true: they are valid; false: they are not
|
|
2434
2430
|
|
|
2435
2431
|
|
|
2436
2432
|
|
|
2437
|
-
####
|
|
2433
|
+
#### getParamsToMergeDeep(settings)
|
|
2438
2434
|
|
|
2439
|
-
Validates
|
|
2435
|
+
Validates and gets the settings with all set parameters.
|
|
2440
2436
|
|
|
2441
2437
|
|
|
2442
2438
|
|
|
@@ -2445,8 +2441,7 @@ Validates if the two arguments are objects
|
|
|
2445
2441
|
|
|
2446
2442
|
| Name | Type | Description | |
|
|
2447
2443
|
| ---- | ---- | ----------- | -------- |
|
|
2448
|
-
|
|
|
2449
|
-
| obj2 | | The object to be merged | |
|
|
2444
|
+
| settings | | the settings object | |
|
|
2450
2445
|
|
|
2451
2446
|
|
|
2452
2447
|
|
|
@@ -2454,13 +2449,17 @@ Validates if the two arguments are objects
|
|
|
2454
2449
|
##### Returns
|
|
2455
2450
|
|
|
2456
2451
|
|
|
2457
|
-
-
|
|
2452
|
+
- a new settings object with all set parameters.
|
|
2458
2453
|
|
|
2459
2454
|
|
|
2460
2455
|
|
|
2461
|
-
#### getParamsToMergeDeep(settings)
|
|
2462
2456
|
|
|
2463
|
-
|
|
2457
|
+
### dist/general/object/objectCopy.js
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
#### objectCopy(entity, cache)
|
|
2461
|
+
|
|
2462
|
+
Created a new reference of the given argument
|
|
2464
2463
|
|
|
2465
2464
|
|
|
2466
2465
|
|
|
@@ -2469,7 +2468,8 @@ Validates and gets the settings with all set parameters.
|
|
|
2469
2468
|
|
|
2470
2469
|
| Name | Type | Description | |
|
|
2471
2470
|
| ---- | ---- | ----------- | -------- |
|
|
2472
|
-
|
|
|
2471
|
+
| entity | | The variable to be copied | |
|
|
2472
|
+
| cache | | | |
|
|
2473
2473
|
|
|
2474
2474
|
|
|
2475
2475
|
|
|
@@ -2477,7 +2477,7 @@ Validates and gets the settings with all set parameters.
|
|
|
2477
2477
|
##### Returns
|
|
2478
2478
|
|
|
2479
2479
|
|
|
2480
|
-
-
|
|
2480
|
+
- A new reference of the given argument
|
|
2481
2481
|
|
|
2482
2482
|
|
|
2483
2483
|
|
|
@@ -2943,6 +2943,88 @@ 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` | | |
|
|
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` | | |
|
|
2988
|
+
| isCalendarDate | `boolean` | | |
|
|
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` | | |
|
|
3016
|
+
|
|
3017
|
+
|
|
3018
|
+
|
|
3019
|
+
|
|
3020
|
+
##### Returns
|
|
3021
|
+
|
|
3022
|
+
|
|
3023
|
+
- `Dayjs` A dayjs date
|
|
3024
|
+
|
|
3025
|
+
|
|
3026
|
+
|
|
3027
|
+
|
|
2946
3028
|
### dist/filters/helpers/backend/buildExpression.js
|
|
2947
3029
|
|
|
2948
3030
|
|
|
@@ -3598,12 +3680,12 @@ Gets filters from Filter Data by Scopes/Scope IDs.
|
|
|
3598
3680
|
|
|
3599
3681
|
|
|
3600
3682
|
|
|
3601
|
-
### dist/filters/helpers/common/
|
|
3683
|
+
### dist/filters/helpers/common/getFiltersByVisibility.js
|
|
3602
3684
|
|
|
3603
3685
|
|
|
3604
|
-
####
|
|
3686
|
+
#### getFiltersByVisibility(filterData, scopes)
|
|
3605
3687
|
|
|
3606
|
-
|
|
3688
|
+
Get a new Filter Data by filtering scopes/scope IDs and enabled flags
|
|
3607
3689
|
|
|
3608
3690
|
|
|
3609
3691
|
|
|
@@ -3612,7 +3694,8 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
|
|
|
3612
3694
|
|
|
3613
3695
|
| Name | Type | Description | |
|
|
3614
3696
|
| ---- | ---- | ----------- | -------- |
|
|
3615
|
-
|
|
|
3697
|
+
| filterData | | a Filter Data or UI Filter Data | |
|
|
3698
|
+
| scopes | | a Scopes/Scope IDs array | |
|
|
3616
3699
|
|
|
3617
3700
|
|
|
3618
3701
|
|
|
@@ -3620,17 +3703,17 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
|
|
|
3620
3703
|
##### Returns
|
|
3621
3704
|
|
|
3622
3705
|
|
|
3623
|
-
- a new
|
|
3706
|
+
- a new Filter Data
|
|
3624
3707
|
|
|
3625
3708
|
|
|
3626
3709
|
|
|
3627
3710
|
|
|
3628
|
-
### dist/filters/helpers/common/
|
|
3711
|
+
### dist/filters/helpers/common/getMergeFiltersSettings.js
|
|
3629
3712
|
|
|
3630
3713
|
|
|
3631
|
-
####
|
|
3714
|
+
#### getMergeFiltersSettings(settings)
|
|
3632
3715
|
|
|
3633
|
-
|
|
3716
|
+
Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
|
|
3634
3717
|
|
|
3635
3718
|
|
|
3636
3719
|
|
|
@@ -3639,8 +3722,7 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
|
|
|
3639
3722
|
|
|
3640
3723
|
| Name | Type | Description | |
|
|
3641
3724
|
| ---- | ---- | ----------- | -------- |
|
|
3642
|
-
|
|
|
3643
|
-
| scopes | | a Scopes/Scope IDs array | |
|
|
3725
|
+
| settings | | an object to the MergeFilters settings | |
|
|
3644
3726
|
|
|
3645
3727
|
|
|
3646
3728
|
|
|
@@ -3648,7 +3730,7 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
|
|
|
3648
3730
|
##### Returns
|
|
3649
3731
|
|
|
3650
3732
|
|
|
3651
|
-
- a new
|
|
3733
|
+
- a new MergeFilters settings object.
|
|
3652
3734
|
|
|
3653
3735
|
|
|
3654
3736
|
|
|
@@ -4398,86 +4480,4 @@ Resolves conditions between UI flattened filter and given parameters
|
|
|
4398
4480
|
|
|
4399
4481
|
|
|
4400
4482
|
|
|
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` | | |
|
|
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` | | |
|
|
4443
|
-
| isCalendarDate | `boolean` | | |
|
|
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` | | |
|
|
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).*
|