@qrvey/utils 1.2.9-6 → 1.2.9-7
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 +881 -881
- package/dist/cjs/globalization/interfaces/filters/II18nRelativeContainer.d.ts +4 -2
- package/dist/cjs/globalization/interfaces/panel/II18nPanelSummaryViews.d.ts +11 -9
- package/dist/cjs/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +4 -2
- package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +12 -10
- package/dist/globalization/interfaces/filters/II18nRelativeContainer.d.ts +4 -2
- package/dist/globalization/interfaces/panel/II18nPanelSummaryViews.d.ts +11 -9
- package/dist/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +4 -2
- package/dist/globalization/labels/panel/I18N_PANEL.js +12 -10
- package/package.json +1 -1
- package/src/globalization/interfaces/filters/II18nRelativeContainer.ts +4 -2
- package/src/globalization/interfaces/panel/II18nPanelSummaryViews.ts +11 -9
- package/src/globalization/labels/filters/I18N_RELATIVE_CONTAINER.ts +4 -2
- package/src/globalization/labels/panel/I18N_PANEL.ts +12 -10
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-7*
|
|
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/
|
|
83
|
+
### dist/dates/helpers/getDateByDateFormat.js
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
####
|
|
86
|
+
#### getDateByDateFormat(date, format, time)
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Gets a Date Object instance by a Date format
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
@@ -94,8 +94,9 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
94
94
|
|
|
95
95
|
| Name | Type | Description | |
|
|
96
96
|
| ---- | ---- | ----------- | -------- |
|
|
97
|
-
|
|
|
98
|
-
|
|
|
97
|
+
| date | | String with a formatted date | |
|
|
98
|
+
| format | | The date format | |
|
|
99
|
+
| time | | flag to convert the formatted date to miliseconds | |
|
|
99
100
|
|
|
100
101
|
|
|
101
102
|
|
|
@@ -103,13 +104,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
103
104
|
##### Returns
|
|
104
105
|
|
|
105
106
|
|
|
106
|
-
- a
|
|
107
|
+
- a Date object, milisecond time or the same value if date format does not match.
|
|
107
108
|
|
|
108
109
|
|
|
109
110
|
|
|
110
|
-
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
### dist/dates/helpers/getDateFormatByProperty.js
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
#### getDateFormatByProperty(property)
|
|
116
|
+
|
|
117
|
+
Gets the date format by the given property
|
|
113
118
|
|
|
114
119
|
|
|
115
120
|
|
|
@@ -118,8 +123,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
118
123
|
|
|
119
124
|
| Name | Type | Description | |
|
|
120
125
|
| ---- | ---- | ----------- | -------- |
|
|
121
|
-
|
|
|
122
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
126
|
+
| property | | The Column Property | |
|
|
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
|
-
-
|
|
134
|
+
- The date format
|
|
131
135
|
|
|
132
136
|
|
|
133
137
|
|
|
134
138
|
|
|
135
|
-
### dist/
|
|
139
|
+
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
136
140
|
|
|
137
141
|
|
|
138
|
-
####
|
|
142
|
+
#### getDateFormatRegularExpressionInArray(dateFormat)
|
|
139
143
|
|
|
140
|
-
|
|
144
|
+
Gets an array of regular expressions by the given date format
|
|
141
145
|
|
|
142
146
|
|
|
143
147
|
|
|
@@ -146,7 +150,7 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
146
150
|
|
|
147
151
|
| Name | Type | Description | |
|
|
148
152
|
| ---- | ---- | ----------- | -------- |
|
|
149
|
-
|
|
|
153
|
+
| dateFormat | | the date format | |
|
|
150
154
|
|
|
151
155
|
|
|
152
156
|
|
|
@@ -154,13 +158,17 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
154
158
|
##### Returns
|
|
155
159
|
|
|
156
160
|
|
|
157
|
-
-
|
|
161
|
+
- an array of regular expressions
|
|
158
162
|
|
|
159
163
|
|
|
160
164
|
|
|
161
|
-
#### getLogicBodyFromFD21(filterData)
|
|
162
165
|
|
|
163
|
-
|
|
166
|
+
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
#### getSeparatorByDateFormat(format)
|
|
170
|
+
|
|
171
|
+
Gets the separator of the date format
|
|
164
172
|
|
|
165
173
|
|
|
166
174
|
|
|
@@ -169,7 +177,7 @@ Gets the logic body
|
|
|
169
177
|
|
|
170
178
|
| Name | Type | Description | |
|
|
171
179
|
| ---- | ---- | ----------- | -------- |
|
|
172
|
-
|
|
|
180
|
+
| format | | the date format | |
|
|
173
181
|
|
|
174
182
|
|
|
175
183
|
|
|
@@ -177,17 +185,18 @@ Gets the logic body
|
|
|
177
185
|
##### Returns
|
|
178
186
|
|
|
179
187
|
|
|
180
|
-
- a
|
|
188
|
+
- a separator string
|
|
181
189
|
|
|
182
190
|
|
|
183
191
|
|
|
184
192
|
|
|
185
|
-
### dist/
|
|
193
|
+
### dist/dates/helpers/getWeek.js
|
|
186
194
|
|
|
187
195
|
|
|
188
|
-
####
|
|
196
|
+
#### getWeek(date)
|
|
189
197
|
|
|
190
|
-
|
|
198
|
+
Gets the week number of the year
|
|
199
|
+
Additionally, the month and the year
|
|
191
200
|
|
|
192
201
|
|
|
193
202
|
|
|
@@ -196,8 +205,7 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
196
205
|
|
|
197
206
|
| Name | Type | Description | |
|
|
198
207
|
| ---- | ---- | ----------- | -------- |
|
|
199
|
-
|
|
|
200
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
208
|
+
| date | | the date object | |
|
|
201
209
|
|
|
202
210
|
|
|
203
211
|
|
|
@@ -205,13 +213,20 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
205
213
|
##### Returns
|
|
206
214
|
|
|
207
215
|
|
|
208
|
-
-
|
|
216
|
+
- an object with the week, month and year.
|
|
209
217
|
|
|
210
218
|
|
|
211
219
|
|
|
212
|
-
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
213
220
|
|
|
214
|
-
|
|
221
|
+
### dist/dates/helpers/validateDate.js
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
#### validateDate(date, format)
|
|
225
|
+
|
|
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
|
|
215
230
|
|
|
216
231
|
|
|
217
232
|
|
|
@@ -220,10 +235,8 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
220
235
|
|
|
221
236
|
| Name | Type | Description | |
|
|
222
237
|
| ---- | ---- | ----------- | -------- |
|
|
223
|
-
|
|
|
224
|
-
|
|
|
225
|
-
| version | | The version of the filter structure | |
|
|
226
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
238
|
+
| date | | String of date | |
|
|
239
|
+
| format | | String of the format to validate | |
|
|
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
|
-
-
|
|
247
|
+
- True if it is valid or not. Undefined if date is undefined
|
|
235
248
|
|
|
236
249
|
|
|
237
250
|
|
|
238
251
|
|
|
239
|
-
### dist/
|
|
252
|
+
### dist/dates/helpers/validateDateByDateFormat.js
|
|
240
253
|
|
|
241
254
|
|
|
242
|
-
####
|
|
255
|
+
#### validateDateByDateFormat(date, dateForma)
|
|
243
256
|
|
|
244
|
-
|
|
257
|
+
Validates the given string as Date by its date format.
|
|
245
258
|
|
|
246
259
|
|
|
247
260
|
|
|
@@ -250,7 +263,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
250
263
|
|
|
251
264
|
| Name | Type | Description | |
|
|
252
265
|
| ---- | ---- | ----------- | -------- |
|
|
253
|
-
|
|
|
266
|
+
| date | | a string to validate as date form | |
|
|
267
|
+
| dateForma | | the format of the date to validate the string | |
|
|
254
268
|
|
|
255
269
|
|
|
256
270
|
|
|
@@ -258,13 +272,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
258
272
|
##### Returns
|
|
259
273
|
|
|
260
274
|
|
|
261
|
-
- a
|
|
275
|
+
- true: the string is a valida date
|
|
262
276
|
|
|
263
277
|
|
|
264
278
|
|
|
265
|
-
#### UI21ToFD(uFilterData, version)
|
|
266
279
|
|
|
267
|
-
|
|
280
|
+
### dist/dates/adapters/mdyDateToDate.js
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
#### mdyDateToDate(monthYearDate, time)
|
|
284
|
+
|
|
285
|
+
Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
268
286
|
|
|
269
287
|
|
|
270
288
|
|
|
@@ -273,8 +291,8 @@ Builds the Fitler Data structure from UI filter data
|
|
|
273
291
|
|
|
274
292
|
| Name | Type | Description | |
|
|
275
293
|
| ---- | ---- | ----------- | -------- |
|
|
276
|
-
|
|
|
277
|
-
|
|
|
294
|
+
| monthYearDate | | String of [mm/dd/yyyy] date | |
|
|
295
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
278
296
|
|
|
279
297
|
|
|
280
298
|
|
|
@@ -282,17 +300,17 @@ Builds the Fitler Data structure from UI filter data
|
|
|
282
300
|
##### Returns
|
|
283
301
|
|
|
284
302
|
|
|
285
|
-
-
|
|
303
|
+
- The date object or the date in milliseconds
|
|
286
304
|
|
|
287
305
|
|
|
288
306
|
|
|
289
307
|
|
|
290
|
-
### dist/
|
|
308
|
+
### dist/dates/adapters/monthYearToDate.js
|
|
291
309
|
|
|
292
310
|
|
|
293
|
-
####
|
|
311
|
+
#### monthYearToDate(monthYearDate, time)
|
|
294
312
|
|
|
295
|
-
|
|
313
|
+
Transforms String Date from a [Month Year] format to Date object.
|
|
296
314
|
|
|
297
315
|
|
|
298
316
|
|
|
@@ -301,8 +319,8 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
301
319
|
|
|
302
320
|
| Name | Type | Description | |
|
|
303
321
|
| ---- | ---- | ----------- | -------- |
|
|
304
|
-
|
|
|
305
|
-
|
|
|
322
|
+
| monthYearDate | | String of [Month Year] date | |
|
|
323
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
306
324
|
|
|
307
325
|
|
|
308
326
|
|
|
@@ -310,13 +328,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
310
328
|
##### Returns
|
|
311
329
|
|
|
312
330
|
|
|
313
|
-
-
|
|
331
|
+
- The date object or the date in milliseconds
|
|
314
332
|
|
|
315
333
|
|
|
316
334
|
|
|
317
|
-
#### UI21ToFlatUI(scopes)
|
|
318
335
|
|
|
319
|
-
|
|
336
|
+
### dist/dates/adapters/quarterYearToDate.js
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
#### quarterYearToDate(quarterYearDate, time)
|
|
340
|
+
|
|
341
|
+
Transforms String Date from a [Quarter Year] format to Date object.
|
|
320
342
|
|
|
321
343
|
|
|
322
344
|
|
|
@@ -325,7 +347,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
325
347
|
|
|
326
348
|
| Name | Type | Description | |
|
|
327
349
|
| ---- | ---- | ----------- | -------- |
|
|
328
|
-
|
|
|
350
|
+
| quarterYearDate | | String of [Quarter Year] date | |
|
|
351
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
329
352
|
|
|
330
353
|
|
|
331
354
|
|
|
@@ -333,18 +356,17 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
333
356
|
##### Returns
|
|
334
357
|
|
|
335
358
|
|
|
336
|
-
-
|
|
359
|
+
- The date object or the date in milliseconds
|
|
337
360
|
|
|
338
361
|
|
|
339
362
|
|
|
340
363
|
|
|
341
|
-
### dist/
|
|
364
|
+
### dist/dates/adapters/weekYearToDate.js
|
|
342
365
|
|
|
343
366
|
|
|
344
|
-
####
|
|
367
|
+
#### weekYearToDate(date, time)
|
|
345
368
|
|
|
346
|
-
[
|
|
347
|
-
Get the new property base on the old date grouping properties
|
|
369
|
+
Transforms String Date from a [Week Year] format to Date object.
|
|
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
|
-
|
|
|
378
|
+
| date | | String of [Week Year] date | |
|
|
379
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
357
380
|
|
|
358
381
|
|
|
359
382
|
|
|
@@ -361,17 +384,17 @@ Get the new property base on the old date grouping properties
|
|
|
361
384
|
##### Returns
|
|
362
385
|
|
|
363
386
|
|
|
364
|
-
-
|
|
387
|
+
- The date object or the date in milliseconds
|
|
365
388
|
|
|
366
389
|
|
|
367
390
|
|
|
368
391
|
|
|
369
|
-
### dist/
|
|
392
|
+
### dist/dates/adapters/yearToDate.js
|
|
370
393
|
|
|
371
394
|
|
|
372
|
-
####
|
|
395
|
+
#### yearToDate(yearDate, time)
|
|
373
396
|
|
|
374
|
-
|
|
397
|
+
Transforms String Date from a [Year] format to Date object.
|
|
375
398
|
|
|
376
399
|
|
|
377
400
|
|
|
@@ -380,9 +403,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
380
403
|
|
|
381
404
|
| Name | Type | Description | |
|
|
382
405
|
| ---- | ---- | ----------- | -------- |
|
|
383
|
-
|
|
|
384
|
-
|
|
|
385
|
-
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
406
|
+
| yearDate | | String of [Year] date | |
|
|
407
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
386
408
|
|
|
387
409
|
|
|
388
410
|
|
|
@@ -390,18 +412,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
390
412
|
##### Returns
|
|
391
413
|
|
|
392
414
|
|
|
393
|
-
-
|
|
415
|
+
- The date object or the date in milliseconds
|
|
394
416
|
|
|
395
417
|
|
|
396
418
|
|
|
397
419
|
|
|
398
|
-
### dist/
|
|
420
|
+
### dist/dates/range/getDateRange.js
|
|
399
421
|
|
|
400
422
|
|
|
401
|
-
####
|
|
423
|
+
#### getDateRange(value, dateGroupLabel, withTime)
|
|
402
424
|
|
|
403
|
-
|
|
404
|
-
Gets an adapted filter value array. Validates the enabled property and sets
|
|
425
|
+
Get date range object from a string date value
|
|
405
426
|
|
|
406
427
|
|
|
407
428
|
|
|
@@ -410,59 +431,74 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
410
431
|
|
|
411
432
|
| Name | Type | Description | |
|
|
412
433
|
| ---- | ---- | ----------- | -------- |
|
|
413
|
-
|
|
|
414
|
-
|
|
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 | |
|
|
415
437
|
|
|
416
438
|
|
|
417
439
|
|
|
418
|
-
##### Returns
|
|
419
440
|
|
|
441
|
+
##### Examples
|
|
420
442
|
|
|
421
|
-
|
|
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
|
+
}
|
|
422
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
|
+
}
|
|
423
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
|
+
```
|
|
424
468
|
|
|
425
469
|
|
|
426
|
-
|
|
470
|
+
##### Returns
|
|
427
471
|
|
|
428
472
|
|
|
429
|
-
|
|
473
|
+
- `Object` an object with the date range with two string date properties: from and to
|
|
430
474
|
|
|
431
|
-
Generates a filter data structure from the flatttened UI filters.
|
|
432
475
|
|
|
433
476
|
|
|
434
477
|
|
|
478
|
+
### dist/dates/relative/Adapter.js
|
|
435
479
|
|
|
436
|
-
##### Parameters
|
|
437
480
|
|
|
438
|
-
|
|
439
|
-
| ---- | ---- | ----------- | -------- |
|
|
440
|
-
| uFilters | | Array of flattened filters from UI | |
|
|
441
|
-
| version | | Tag for the version of the filter data structure | |
|
|
481
|
+
#### value()
|
|
442
482
|
|
|
483
|
+
Resolves statement and returns statement value
|
|
443
484
|
|
|
444
485
|
|
|
445
486
|
|
|
446
|
-
##### Returns
|
|
447
487
|
|
|
448
488
|
|
|
449
|
-
- a Filter Data.
|
|
450
489
|
|
|
490
|
+
##### Returns
|
|
451
491
|
|
|
452
492
|
|
|
453
|
-
|
|
493
|
+
- `AbsoluteRange` `string`
|
|
454
494
|
|
|
455
|
-
Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
|
|
456
|
-
Also, adds and organizes filters by datasets
|
|
457
495
|
|
|
458
496
|
|
|
497
|
+
#### valueAsAnchor()
|
|
459
498
|
|
|
499
|
+
Resolves statement as an anchor
|
|
460
500
|
|
|
461
|
-
##### Parameters
|
|
462
501
|
|
|
463
|
-
| Name | Type | Description | |
|
|
464
|
-
| ---- | ---- | ----------- | -------- |
|
|
465
|
-
| fbFilters | | Array of flat filters from UI | |
|
|
466
502
|
|
|
467
503
|
|
|
468
504
|
|
|
@@ -470,86 +506,77 @@ Also, adds and organizes filters by datasets
|
|
|
470
506
|
##### Returns
|
|
471
507
|
|
|
472
508
|
|
|
473
|
-
-
|
|
509
|
+
- `string`
|
|
474
510
|
|
|
475
511
|
|
|
476
512
|
|
|
477
|
-
####
|
|
513
|
+
#### _statementToRange() *private method*
|
|
478
514
|
|
|
479
|
-
|
|
515
|
+
Convert verbal statement to range value
|
|
480
516
|
|
|
481
517
|
|
|
482
518
|
|
|
483
519
|
|
|
484
|
-
##### Parameters
|
|
485
520
|
|
|
486
|
-
| Name | Type | Description | |
|
|
487
|
-
| ---- | ---- | ----------- | -------- |
|
|
488
|
-
| uFilter | | UI structure filter | |
|
|
489
521
|
|
|
522
|
+
##### Returns
|
|
490
523
|
|
|
491
524
|
|
|
525
|
+
- `AbsoluteRange`
|
|
492
526
|
|
|
493
|
-
##### Returns
|
|
494
527
|
|
|
495
528
|
|
|
496
|
-
|
|
529
|
+
#### _resolveAsThis() *private method*
|
|
497
530
|
|
|
531
|
+
Apply 'this' cursor logic to statement
|
|
498
532
|
|
|
499
533
|
|
|
500
|
-
#### buildDataset(uFilter)
|
|
501
534
|
|
|
502
|
-
Gets an dataset structure for the filter data
|
|
503
535
|
|
|
504
536
|
|
|
505
537
|
|
|
538
|
+
##### Returns
|
|
506
539
|
|
|
507
|
-
##### Parameters
|
|
508
540
|
|
|
509
|
-
|
|
510
|
-
| ---- | ---- | ----------- | -------- |
|
|
511
|
-
| uFilter | | a UI structure filter | |
|
|
541
|
+
- `AbsoluteStatement`
|
|
512
542
|
|
|
513
543
|
|
|
514
544
|
|
|
545
|
+
#### _resolveAsTheLast() *private method*
|
|
515
546
|
|
|
516
|
-
|
|
547
|
+
Apply 'the last' cursor logic to statement
|
|
517
548
|
|
|
518
549
|
|
|
519
|
-
- an dataset structure
|
|
520
550
|
|
|
521
551
|
|
|
522
552
|
|
|
523
|
-
#### buildFilter(uFilter)
|
|
524
553
|
|
|
525
|
-
|
|
554
|
+
##### Returns
|
|
526
555
|
|
|
527
556
|
|
|
557
|
+
- `AbsoluteStatement`
|
|
528
558
|
|
|
529
559
|
|
|
530
|
-
##### Parameters
|
|
531
560
|
|
|
532
|
-
|
|
533
|
-
| ---- | ---- | ----------- | -------- |
|
|
534
|
-
| uFilter | | a UI structure filter | |
|
|
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
|
-
- an filter structure
|
|
543
569
|
|
|
570
|
+
##### Returns
|
|
544
571
|
|
|
545
572
|
|
|
573
|
+
- `AbsoluteStatement`
|
|
546
574
|
|
|
547
|
-
### dist/filters/adapters/flatUIToLogic.js
|
|
548
575
|
|
|
549
576
|
|
|
550
|
-
####
|
|
577
|
+
#### replaceNowToken(value, now)
|
|
551
578
|
|
|
552
|
-
|
|
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
|
-
|
|
|
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
|
-
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
597
|
+
- `string`
|
|
573
598
|
|
|
574
|
-
### dist/filters/adapters/flatUIToOldLogic.js
|
|
575
599
|
|
|
576
600
|
|
|
577
|
-
####
|
|
601
|
+
#### convertRelativeToAbsolute(args)
|
|
578
602
|
|
|
579
|
-
|
|
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
|
-
|
|
|
612
|
+
| args | `RelativeToAbsoluteStruct` | | |
|
|
589
613
|
|
|
590
614
|
|
|
591
615
|
|
|
592
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
|
+
|
|
636
|
+
|
|
593
637
|
##### Returns
|
|
594
638
|
|
|
595
639
|
|
|
596
|
-
-
|
|
640
|
+
- `string`
|
|
597
641
|
|
|
598
642
|
|
|
599
643
|
|
|
600
644
|
|
|
601
|
-
### dist/
|
|
645
|
+
### dist/dates/relative/relative.js
|
|
602
646
|
|
|
603
647
|
|
|
604
|
-
####
|
|
648
|
+
#### resolveRelative(statements, clock)
|
|
605
649
|
|
|
606
|
-
|
|
650
|
+
Resolve a list of relative statements according to operator
|
|
607
651
|
|
|
608
652
|
|
|
609
653
|
|
|
@@ -612,32 +656,46 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
612
656
|
|
|
613
657
|
| Name | Type | Description | |
|
|
614
658
|
| ---- | ---- | ----------- | -------- |
|
|
615
|
-
|
|
|
616
|
-
|
|
|
659
|
+
| statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | |
|
|
660
|
+
| clock | `Date` | - Clock/time reference for relative date resolution | |
|
|
617
661
|
|
|
618
662
|
|
|
619
663
|
|
|
620
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
|
+
}
|
|
677
|
+
|
|
678
|
+
Output:
|
|
679
|
+
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
|
|
621
683
|
##### Returns
|
|
622
684
|
|
|
623
685
|
|
|
624
|
-
-
|
|
686
|
+
- `Array.<AbsoluteRange>` `Array.<string>`
|
|
625
687
|
|
|
626
688
|
|
|
627
689
|
|
|
628
|
-
#### buildScopes(fbFilters)
|
|
629
690
|
|
|
630
|
-
|
|
631
|
-
Also, adds and organizes filters by datasets
|
|
691
|
+
### dist/filters/classes/FilterInputErrorHandler.js
|
|
632
692
|
|
|
633
693
|
|
|
694
|
+
#### new FilterInputErrorHandler()
|
|
695
|
+
|
|
634
696
|
|
|
635
697
|
|
|
636
|
-
##### Parameters
|
|
637
698
|
|
|
638
|
-
| Name | Type | Description | |
|
|
639
|
-
| ---- | ---- | ----------- | -------- |
|
|
640
|
-
| fbFilters | | Array of flat filters from UI | |
|
|
641
699
|
|
|
642
700
|
|
|
643
701
|
|
|
@@ -645,13 +703,17 @@ Also, adds and organizes filters by datasets
|
|
|
645
703
|
##### Returns
|
|
646
704
|
|
|
647
705
|
|
|
648
|
-
-
|
|
706
|
+
- `Void`
|
|
649
707
|
|
|
650
708
|
|
|
651
709
|
|
|
652
|
-
#### buildScope(uFilter)
|
|
653
710
|
|
|
654
|
-
|
|
711
|
+
### dist/filters/adapters/FDToLogic.js
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
#### FDToLogic(filterData)
|
|
715
|
+
|
|
716
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
655
717
|
|
|
656
718
|
|
|
657
719
|
|
|
@@ -660,7 +722,7 @@ Gets an scope structure for the UI filter data
|
|
|
660
722
|
|
|
661
723
|
| Name | Type | Description | |
|
|
662
724
|
| ---- | ---- | ----------- | -------- |
|
|
663
|
-
|
|
|
725
|
+
| filterData | | The filter data object. | |
|
|
664
726
|
|
|
665
727
|
|
|
666
728
|
|
|
@@ -668,13 +730,13 @@ Gets an scope structure for the UI filter data
|
|
|
668
730
|
##### Returns
|
|
669
731
|
|
|
670
732
|
|
|
671
|
-
-
|
|
733
|
+
- a filter logic array
|
|
672
734
|
|
|
673
735
|
|
|
674
736
|
|
|
675
|
-
####
|
|
737
|
+
#### getLogicBodyFromFD21(filterData)
|
|
676
738
|
|
|
677
|
-
Gets
|
|
739
|
+
Gets the logic body
|
|
678
740
|
|
|
679
741
|
|
|
680
742
|
|
|
@@ -683,7 +745,7 @@ Gets an dataset structure for the UI filter data
|
|
|
683
745
|
|
|
684
746
|
| Name | Type | Description | |
|
|
685
747
|
| ---- | ---- | ----------- | -------- |
|
|
686
|
-
|
|
|
748
|
+
| filterData | | The filter data object | |
|
|
687
749
|
|
|
688
750
|
|
|
689
751
|
|
|
@@ -691,13 +753,17 @@ Gets an dataset structure for the UI filter data
|
|
|
691
753
|
##### Returns
|
|
692
754
|
|
|
693
755
|
|
|
694
|
-
-
|
|
756
|
+
- a filter logic array
|
|
695
757
|
|
|
696
758
|
|
|
697
759
|
|
|
698
|
-
#### buildFilter(uFilter)
|
|
699
760
|
|
|
700
|
-
|
|
761
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
765
|
+
|
|
766
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
701
767
|
|
|
702
768
|
|
|
703
769
|
|
|
@@ -706,7 +772,8 @@ Gets an filter structure for the UI filter data
|
|
|
706
772
|
|
|
707
773
|
| Name | Type | Description | |
|
|
708
774
|
| ---- | ---- | ----------- | -------- |
|
|
709
|
-
|
|
|
775
|
+
| filterData | | The filter data object. | |
|
|
776
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
710
777
|
|
|
711
778
|
|
|
712
779
|
|
|
@@ -714,17 +781,13 @@ Gets an filter structure for the UI filter data
|
|
|
714
781
|
##### Returns
|
|
715
782
|
|
|
716
783
|
|
|
717
|
-
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
784
|
+
- a flattened UI filters array
|
|
721
785
|
|
|
722
|
-
### dist/filters/adapters/logicToFD.js
|
|
723
786
|
|
|
724
787
|
|
|
725
|
-
####
|
|
788
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
726
789
|
|
|
727
|
-
Generates a
|
|
790
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
728
791
|
|
|
729
792
|
|
|
730
793
|
|
|
@@ -733,8 +796,8 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
733
796
|
|
|
734
797
|
| Name | Type | Description | |
|
|
735
798
|
| ---- | ---- | ----------- | -------- |
|
|
736
|
-
|
|
|
737
|
-
|
|
|
799
|
+
| scopes | | The filter scope section | |
|
|
800
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
738
801
|
|
|
739
802
|
|
|
740
803
|
|
|
@@ -742,17 +805,17 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
742
805
|
##### Returns
|
|
743
806
|
|
|
744
807
|
|
|
745
|
-
- a
|
|
808
|
+
- a flattened UI filters array
|
|
746
809
|
|
|
747
810
|
|
|
748
811
|
|
|
749
812
|
|
|
750
|
-
### dist/filters/adapters/
|
|
813
|
+
### dist/filters/adapters/FDToUI.js
|
|
751
814
|
|
|
752
815
|
|
|
753
|
-
####
|
|
816
|
+
#### FDToUI(filterData, datasetsInfo)
|
|
754
817
|
|
|
755
|
-
|
|
818
|
+
Generates a UI filter structure from Filter Data structure.
|
|
756
819
|
|
|
757
820
|
|
|
758
821
|
|
|
@@ -761,7 +824,8 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
761
824
|
|
|
762
825
|
| Name | Type | Description | |
|
|
763
826
|
| ---- | ---- | ----------- | -------- |
|
|
764
|
-
|
|
|
827
|
+
| filterData | | The filter data object. | |
|
|
828
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
765
829
|
|
|
766
830
|
|
|
767
831
|
|
|
@@ -769,13 +833,13 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
769
833
|
##### Returns
|
|
770
834
|
|
|
771
835
|
|
|
772
|
-
-
|
|
836
|
+
- a UI Filters structure
|
|
773
837
|
|
|
774
838
|
|
|
775
839
|
|
|
776
|
-
####
|
|
840
|
+
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
777
841
|
|
|
778
|
-
|
|
842
|
+
Generates a UI filter Structure from the Filter Data structure v2.1
|
|
779
843
|
|
|
780
844
|
|
|
781
845
|
|
|
@@ -784,9 +848,10 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
784
848
|
|
|
785
849
|
| Name | Type | Description | |
|
|
786
850
|
| ---- | ---- | ----------- | -------- |
|
|
787
|
-
|
|
|
788
|
-
|
|
|
789
|
-
|
|
|
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 | |
|
|
790
855
|
|
|
791
856
|
|
|
792
857
|
|
|
@@ -794,13 +859,17 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
794
859
|
##### Returns
|
|
795
860
|
|
|
796
861
|
|
|
797
|
-
-
|
|
862
|
+
- a UI filter Structure
|
|
798
863
|
|
|
799
864
|
|
|
800
865
|
|
|
801
|
-
#### refineRankingValues(values, uiValues)
|
|
802
866
|
|
|
803
|
-
|
|
867
|
+
### dist/filters/adapters/UIToFD.js
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
#### UIToFD(filterData)
|
|
871
|
+
|
|
872
|
+
Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
804
873
|
|
|
805
874
|
|
|
806
875
|
|
|
@@ -809,8 +878,7 @@ Refines the values of the Ranking column type.
|
|
|
809
878
|
|
|
810
879
|
| Name | Type | Description | |
|
|
811
880
|
| ---- | ---- | ----------- | -------- |
|
|
812
|
-
|
|
|
813
|
-
| uiValues | | Object with additional info about the values of the filter. | |
|
|
881
|
+
| filterData | | The UI filter data object. | |
|
|
814
882
|
|
|
815
883
|
|
|
816
884
|
|
|
@@ -818,17 +886,13 @@ Refines the values of the Ranking column type.
|
|
|
818
886
|
##### Returns
|
|
819
887
|
|
|
820
888
|
|
|
821
|
-
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
889
|
+
- a Filter Data structure
|
|
825
890
|
|
|
826
|
-
### dist/filters/adapters/logicToUI.js
|
|
827
891
|
|
|
828
892
|
|
|
829
|
-
####
|
|
893
|
+
#### UI21ToFD(uFilterData, version)
|
|
830
894
|
|
|
831
|
-
|
|
895
|
+
Builds the Fitler Data structure from UI filter data
|
|
832
896
|
|
|
833
897
|
|
|
834
898
|
|
|
@@ -837,8 +901,8 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
837
901
|
|
|
838
902
|
| Name | Type | Description | |
|
|
839
903
|
| ---- | ---- | ----------- | -------- |
|
|
840
|
-
|
|
|
841
|
-
|
|
|
904
|
+
| uFilterData | | The UI filter Data object | |
|
|
905
|
+
| version | | the version of the structure | |
|
|
842
906
|
|
|
843
907
|
|
|
844
908
|
|
|
@@ -846,17 +910,17 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
846
910
|
##### Returns
|
|
847
911
|
|
|
848
912
|
|
|
849
|
-
-
|
|
913
|
+
-
|
|
850
914
|
|
|
851
915
|
|
|
852
916
|
|
|
853
917
|
|
|
854
|
-
### dist/filters/adapters/
|
|
918
|
+
### dist/filters/adapters/UIToFlatUI.js
|
|
855
919
|
|
|
856
920
|
|
|
857
|
-
####
|
|
921
|
+
#### UIToFlatUI(filterData, datasetsInfo)
|
|
858
922
|
|
|
859
|
-
|
|
923
|
+
Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
860
924
|
|
|
861
925
|
|
|
862
926
|
|
|
@@ -865,97 +929,50 @@ Transform the old filters structure into the new one
|
|
|
865
929
|
|
|
866
930
|
| Name | Type | Description | |
|
|
867
931
|
| ---- | ---- | ----------- | -------- |
|
|
868
|
-
|
|
|
869
|
-
|
|
|
932
|
+
| filterData | | The UI filter data object. | |
|
|
933
|
+
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
870
934
|
|
|
871
935
|
|
|
872
936
|
|
|
873
937
|
|
|
874
|
-
#####
|
|
938
|
+
##### Returns
|
|
875
939
|
|
|
876
|
-
```javascript
|
|
877
940
|
|
|
878
|
-
|
|
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
|
-
};
|
|
941
|
+
- a flattened UI filters array
|
|
920
942
|
|
|
921
|
-
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
922
|
-
```
|
|
923
943
|
|
|
924
944
|
|
|
925
|
-
|
|
945
|
+
#### UI21ToFlatUI(scopes)
|
|
926
946
|
|
|
947
|
+
Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
927
948
|
|
|
928
|
-
- `Object` an object with the new filters structure
|
|
929
949
|
|
|
930
950
|
|
|
931
951
|
|
|
952
|
+
##### Parameters
|
|
932
953
|
|
|
933
|
-
|
|
954
|
+
| Name | Type | Description | |
|
|
955
|
+
| ---- | ---- | ----------- | -------- |
|
|
956
|
+
| scopes | | The filter scope section | |
|
|
934
957
|
|
|
935
958
|
|
|
936
|
-
#### new FilterInputErrorHandler()
|
|
937
959
|
|
|
938
960
|
|
|
961
|
+
##### Returns
|
|
939
962
|
|
|
940
963
|
|
|
964
|
+
- a flattened UI filters array
|
|
941
965
|
|
|
942
966
|
|
|
943
967
|
|
|
944
968
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
- `Void`
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
### dist/filters/helpers/applyHierarchyForAggFilters.js
|
|
969
|
+
### dist/filters/adapters/adaptDateGroupingProperty.js
|
|
954
970
|
|
|
955
971
|
|
|
956
|
-
####
|
|
972
|
+
#### adaptDateGroupingProperty(property)
|
|
957
973
|
|
|
958
|
-
[TODO:
|
|
974
|
+
[TODO: For 2022, eliminate this adapter]
|
|
975
|
+
Get the new property base on the old date grouping properties
|
|
959
976
|
|
|
960
977
|
|
|
961
978
|
|
|
@@ -964,9 +981,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
964
981
|
|
|
965
982
|
| Name | Type | Description | |
|
|
966
983
|
| ---- | ---- | ----------- | -------- |
|
|
967
|
-
|
|
|
968
|
-
| scopes | | | |
|
|
969
|
-
| currentScope | | | |
|
|
984
|
+
| property | | | |
|
|
970
985
|
|
|
971
986
|
|
|
972
987
|
|
|
@@ -979,12 +994,12 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
979
994
|
|
|
980
995
|
|
|
981
996
|
|
|
982
|
-
### dist/filters/
|
|
997
|
+
### dist/filters/adapters/adaptFilterData.js
|
|
983
998
|
|
|
984
999
|
|
|
985
|
-
####
|
|
1000
|
+
#### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
|
|
986
1001
|
|
|
987
|
-
|
|
1002
|
+
Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
988
1003
|
|
|
989
1004
|
|
|
990
1005
|
|
|
@@ -993,7 +1008,9 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
993
1008
|
|
|
994
1009
|
| Name | Type | Description | |
|
|
995
1010
|
| ---- | ---- | ----------- | -------- |
|
|
996
|
-
|
|
|
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 | |
|
|
997
1014
|
|
|
998
1015
|
|
|
999
1016
|
|
|
@@ -1001,17 +1018,18 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
1001
1018
|
##### Returns
|
|
1002
1019
|
|
|
1003
1020
|
|
|
1004
|
-
-
|
|
1021
|
+
- A new filter data structure v2.1
|
|
1005
1022
|
|
|
1006
1023
|
|
|
1007
1024
|
|
|
1008
1025
|
|
|
1009
|
-
### dist/filters/
|
|
1026
|
+
### dist/filters/adapters/adaptFilterValues.js
|
|
1010
1027
|
|
|
1011
1028
|
|
|
1012
|
-
####
|
|
1029
|
+
#### adaptFilterValues(filter)
|
|
1013
1030
|
|
|
1014
|
-
|
|
1031
|
+
[TODO: For 2022, eliminate this adapter]
|
|
1032
|
+
Gets an adapted filter value array. Validates the enabled property and sets
|
|
1015
1033
|
|
|
1016
1034
|
|
|
1017
1035
|
|
|
@@ -1020,7 +1038,7 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1020
1038
|
|
|
1021
1039
|
| Name | Type | Description | |
|
|
1022
1040
|
| ---- | ---- | ----------- | -------- |
|
|
1023
|
-
|
|
|
1041
|
+
| filter | | The filter | |
|
|
1024
1042
|
|
|
1025
1043
|
|
|
1026
1044
|
|
|
@@ -1028,17 +1046,17 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1028
1046
|
##### Returns
|
|
1029
1047
|
|
|
1030
1048
|
|
|
1031
|
-
-
|
|
1049
|
+
- A new value array with the filled properties.
|
|
1032
1050
|
|
|
1033
1051
|
|
|
1034
1052
|
|
|
1035
1053
|
|
|
1036
|
-
### dist/filters/
|
|
1054
|
+
### dist/filters/adapters/flatUIToFD.js
|
|
1037
1055
|
|
|
1038
1056
|
|
|
1039
|
-
####
|
|
1057
|
+
#### flatUIToFD(uFilters, version)
|
|
1040
1058
|
|
|
1041
|
-
|
|
1059
|
+
Generates a filter data structure from the flatttened UI filters.
|
|
1042
1060
|
|
|
1043
1061
|
|
|
1044
1062
|
|
|
@@ -1047,8 +1065,8 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1047
1065
|
|
|
1048
1066
|
| Name | Type | Description | |
|
|
1049
1067
|
| ---- | ---- | ----------- | -------- |
|
|
1050
|
-
|
|
|
1051
|
-
|
|
|
1068
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1069
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1052
1070
|
|
|
1053
1071
|
|
|
1054
1072
|
|
|
@@ -1056,17 +1074,14 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1056
1074
|
##### Returns
|
|
1057
1075
|
|
|
1058
1076
|
|
|
1059
|
-
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1077
|
+
- a Filter Data.
|
|
1063
1078
|
|
|
1064
|
-
### dist/general/array/delete.js
|
|
1065
1079
|
|
|
1066
1080
|
|
|
1067
|
-
####
|
|
1081
|
+
#### buildScopes(fbFilters)
|
|
1068
1082
|
|
|
1069
|
-
|
|
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
|
|
1070
1085
|
|
|
1071
1086
|
|
|
1072
1087
|
|
|
@@ -1075,8 +1090,7 @@ Inmutable Array Item deletion
|
|
|
1075
1090
|
|
|
1076
1091
|
| Name | Type | Description | |
|
|
1077
1092
|
| ---- | ---- | ----------- | -------- |
|
|
1078
|
-
|
|
|
1079
|
-
| index | `Number` | the position of the item to delete | |
|
|
1093
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1080
1094
|
|
|
1081
1095
|
|
|
1082
1096
|
|
|
@@ -1084,20 +1098,13 @@ Inmutable Array Item deletion
|
|
|
1084
1098
|
##### Returns
|
|
1085
1099
|
|
|
1086
1100
|
|
|
1087
|
-
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1101
|
+
- an array of scopes structure.
|
|
1091
1102
|
|
|
1092
|
-
### dist/general/array/filterNestedTree.js
|
|
1093
1103
|
|
|
1094
1104
|
|
|
1095
|
-
####
|
|
1105
|
+
#### buildScope(uFilter)
|
|
1096
1106
|
|
|
1097
|
-
|
|
1098
|
-
- If the given arguments are not valid, the function returns the first argument.
|
|
1099
|
-
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
1100
|
-
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
1107
|
+
Gets an scope structure for the filter data
|
|
1101
1108
|
|
|
1102
1109
|
|
|
1103
1110
|
|
|
@@ -1106,9 +1113,7 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1106
1113
|
|
|
1107
1114
|
| Name | Type | Description | |
|
|
1108
1115
|
| ---- | ---- | ----------- | -------- |
|
|
1109
|
-
|
|
|
1110
|
-
| childArrKey | | property representing the children array on the nested tree | |
|
|
1111
|
-
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
1116
|
+
| uFilter | | UI structure filter | |
|
|
1112
1117
|
|
|
1113
1118
|
|
|
1114
1119
|
|
|
@@ -1116,17 +1121,13 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1116
1121
|
##### Returns
|
|
1117
1122
|
|
|
1118
1123
|
|
|
1119
|
-
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1124
|
+
- an scope structure
|
|
1123
1125
|
|
|
1124
|
-
### dist/general/array/flattenDeep.js
|
|
1125
1126
|
|
|
1126
1127
|
|
|
1127
|
-
####
|
|
1128
|
+
#### buildDataset(uFilter)
|
|
1128
1129
|
|
|
1129
|
-
|
|
1130
|
+
Gets an dataset structure for the filter data
|
|
1130
1131
|
|
|
1131
1132
|
|
|
1132
1133
|
|
|
@@ -1135,7 +1136,7 @@ Flat deeply an array
|
|
|
1135
1136
|
|
|
1136
1137
|
| Name | Type | Description | |
|
|
1137
1138
|
| ---- | ---- | ----------- | -------- |
|
|
1138
|
-
|
|
|
1139
|
+
| uFilter | | a UI structure filter | |
|
|
1139
1140
|
|
|
1140
1141
|
|
|
1141
1142
|
|
|
@@ -1143,17 +1144,13 @@ Flat deeply an array
|
|
|
1143
1144
|
##### Returns
|
|
1144
1145
|
|
|
1145
1146
|
|
|
1146
|
-
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1147
|
+
- an dataset structure
|
|
1150
1148
|
|
|
1151
|
-
### dist/general/array/getFirstIndexFromArray.js
|
|
1152
1149
|
|
|
1153
1150
|
|
|
1154
|
-
####
|
|
1151
|
+
#### buildFilter(uFilter)
|
|
1155
1152
|
|
|
1156
|
-
Gets
|
|
1153
|
+
Gets an filter structure for the filter data
|
|
1157
1154
|
|
|
1158
1155
|
|
|
1159
1156
|
|
|
@@ -1162,8 +1159,7 @@ Gets the first index from the array by a callback condition
|
|
|
1162
1159
|
|
|
1163
1160
|
| Name | Type | Description | |
|
|
1164
1161
|
| ---- | ---- | ----------- | -------- |
|
|
1165
|
-
|
|
|
1166
|
-
| callback | | function callback | |
|
|
1162
|
+
| uFilter | | a UI structure filter | |
|
|
1167
1163
|
|
|
1168
1164
|
|
|
1169
1165
|
|
|
@@ -1171,17 +1167,17 @@ Gets the first index from the array by a callback condition
|
|
|
1171
1167
|
##### Returns
|
|
1172
1168
|
|
|
1173
1169
|
|
|
1174
|
-
-
|
|
1170
|
+
- an filter structure
|
|
1175
1171
|
|
|
1176
1172
|
|
|
1177
1173
|
|
|
1178
1174
|
|
|
1179
|
-
### dist/
|
|
1175
|
+
### dist/filters/adapters/flatUIToLogic.js
|
|
1180
1176
|
|
|
1181
1177
|
|
|
1182
|
-
####
|
|
1178
|
+
#### flatUIToLogic(uFilter)
|
|
1183
1179
|
|
|
1184
|
-
|
|
1180
|
+
Generates a Logic structure from flattened UI filters
|
|
1185
1181
|
|
|
1186
1182
|
|
|
1187
1183
|
|
|
@@ -1190,8 +1186,7 @@ Gets the last index from the array by a callback condition
|
|
|
1190
1186
|
|
|
1191
1187
|
| Name | Type | Description | |
|
|
1192
1188
|
| ---- | ---- | ----------- | -------- |
|
|
1193
|
-
|
|
|
1194
|
-
| callback | | function callback | |
|
|
1189
|
+
| uFilter | | Array of flat filters from UI | |
|
|
1195
1190
|
|
|
1196
1191
|
|
|
1197
1192
|
|
|
@@ -1199,17 +1194,17 @@ Gets the last index from the array by a callback condition
|
|
|
1199
1194
|
##### Returns
|
|
1200
1195
|
|
|
1201
1196
|
|
|
1202
|
-
-
|
|
1197
|
+
- The logic structure
|
|
1203
1198
|
|
|
1204
1199
|
|
|
1205
1200
|
|
|
1206
1201
|
|
|
1207
|
-
### dist/
|
|
1202
|
+
### dist/filters/adapters/flatUIToOldLogic.js
|
|
1208
1203
|
|
|
1209
1204
|
|
|
1210
|
-
####
|
|
1205
|
+
#### flatUIToOldLogic(uFilters)
|
|
1211
1206
|
|
|
1212
|
-
|
|
1207
|
+
Generates a Logic structure from flattened UI filters
|
|
1213
1208
|
|
|
1214
1209
|
|
|
1215
1210
|
|
|
@@ -1218,8 +1213,7 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1218
1213
|
|
|
1219
1214
|
| Name | Type | Description | |
|
|
1220
1215
|
| ---- | ---- | ----------- | -------- |
|
|
1221
|
-
|
|
|
1222
|
-
| time | `Number` | default 500ms | |
|
|
1216
|
+
| uFilters | | Array of flat filters from UI | |
|
|
1223
1217
|
|
|
1224
1218
|
|
|
1225
1219
|
|
|
@@ -1227,17 +1221,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1227
1221
|
##### Returns
|
|
1228
1222
|
|
|
1229
1223
|
|
|
1230
|
-
-
|
|
1224
|
+
- The logic structure
|
|
1231
1225
|
|
|
1232
1226
|
|
|
1233
1227
|
|
|
1234
1228
|
|
|
1235
|
-
### dist/
|
|
1229
|
+
### dist/filters/adapters/flatUIToUI.js
|
|
1236
1230
|
|
|
1237
1231
|
|
|
1238
|
-
####
|
|
1232
|
+
#### flatUIToUI(uFilters, version)
|
|
1239
1233
|
|
|
1240
|
-
|
|
1234
|
+
Generates a UI filter data structure from the flatttened UI filters.
|
|
1241
1235
|
|
|
1242
1236
|
|
|
1243
1237
|
|
|
@@ -1246,8 +1240,8 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
1246
1240
|
|
|
1247
1241
|
| Name | Type | Description | |
|
|
1248
1242
|
| ---- | ---- | ----------- | -------- |
|
|
1249
|
-
|
|
|
1250
|
-
|
|
|
1243
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1244
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1251
1245
|
|
|
1252
1246
|
|
|
1253
1247
|
|
|
@@ -1255,18 +1249,14 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
1255
1249
|
##### Returns
|
|
1256
1250
|
|
|
1257
1251
|
|
|
1258
|
-
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1252
|
+
- a UI Filter Data.
|
|
1262
1253
|
|
|
1263
|
-
### dist/general/mix/compareDeep.js
|
|
1264
1254
|
|
|
1265
1255
|
|
|
1266
|
-
####
|
|
1256
|
+
#### buildScopes(fbFilters)
|
|
1267
1257
|
|
|
1268
|
-
|
|
1269
|
-
|
|
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
|
|
1270
1260
|
|
|
1271
1261
|
|
|
1272
1262
|
|
|
@@ -1275,8 +1265,7 @@ Includes arrays in the comparison.
|
|
|
1275
1265
|
|
|
1276
1266
|
| Name | Type | Description | |
|
|
1277
1267
|
| ---- | ---- | ----------- | -------- |
|
|
1278
|
-
|
|
|
1279
|
-
| object2 | | Second Object to compare | |
|
|
1268
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1280
1269
|
|
|
1281
1270
|
|
|
1282
1271
|
|
|
@@ -1284,17 +1273,13 @@ Includes arrays in the comparison.
|
|
|
1284
1273
|
##### Returns
|
|
1285
1274
|
|
|
1286
1275
|
|
|
1287
|
-
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1276
|
+
- an array of scopes structure.
|
|
1291
1277
|
|
|
1292
|
-
### dist/general/mix/getTag.js
|
|
1293
1278
|
|
|
1294
1279
|
|
|
1295
|
-
####
|
|
1280
|
+
#### buildScope(uFilter)
|
|
1296
1281
|
|
|
1297
|
-
Gets the
|
|
1282
|
+
Gets an scope structure for the UI filter data
|
|
1298
1283
|
|
|
1299
1284
|
|
|
1300
1285
|
|
|
@@ -1303,7 +1288,7 @@ Gets the `toStringTag` of `value`.
|
|
|
1303
1288
|
|
|
1304
1289
|
| Name | Type | Description | |
|
|
1305
1290
|
| ---- | ---- | ----------- | -------- |
|
|
1306
|
-
|
|
|
1291
|
+
| uFilter | | UI structure filter | |
|
|
1307
1292
|
|
|
1308
1293
|
|
|
1309
1294
|
|
|
@@ -1311,17 +1296,13 @@ Gets the `toStringTag` of `value`.
|
|
|
1311
1296
|
##### Returns
|
|
1312
1297
|
|
|
1313
1298
|
|
|
1314
|
-
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1299
|
+
- an scope structure
|
|
1318
1300
|
|
|
1319
|
-
### dist/general/mix/importScripts.js
|
|
1320
1301
|
|
|
1321
1302
|
|
|
1322
|
-
####
|
|
1303
|
+
#### buildDataset(uFilter)
|
|
1323
1304
|
|
|
1324
|
-
|
|
1305
|
+
Gets an dataset structure for the UI filter data
|
|
1325
1306
|
|
|
1326
1307
|
|
|
1327
1308
|
|
|
@@ -1330,54 +1311,21 @@ Import a set of external Scripts given the URL in both serie and cascade way
|
|
|
1330
1311
|
|
|
1331
1312
|
| Name | Type | Description | |
|
|
1332
1313
|
| ---- | ---- | ----------- | -------- |
|
|
1333
|
-
|
|
|
1334
|
-
| scripts.url | `String` | CDN URL | |
|
|
1335
|
-
| scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | |
|
|
1336
|
-
| scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1337
|
-
| scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1338
|
-
| scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | |
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
##### Examples
|
|
1344
|
-
|
|
1345
|
-
```javascript
|
|
1346
|
-
// 1) Simple script (paralell loading)
|
|
1347
|
-
importScripts(['http://myscript.js', 'http://another.js']);
|
|
1348
|
-
|
|
1349
|
-
// 2) Loading `.js` and `.esm.js` script (parallel loading)
|
|
1350
|
-
importScripts([
|
|
1351
|
-
{ url: 'http://myscript.esm.js', type: 'module' },
|
|
1352
|
-
{ url: 'http://myscript.js', noModule: true }
|
|
1353
|
-
]);
|
|
1314
|
+
| uFilter | | a UI structure filter | |
|
|
1354
1315
|
|
|
1355
|
-
// 3) import dependent scripts (cascade)
|
|
1356
|
-
importScripts([
|
|
1357
|
-
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
|
|
1358
|
-
]);
|
|
1359
1316
|
|
|
1360
|
-
// 4) mix
|
|
1361
|
-
importScripts([
|
|
1362
|
-
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
|
|
1363
|
-
{ url: 'http://another.esm.js', type: 'module' },
|
|
1364
|
-
{ url: 'http://another.js', noModule: true },
|
|
1365
|
-
'http://simplescript.js'
|
|
1366
|
-
]);
|
|
1367
|
-
```
|
|
1368
1317
|
|
|
1369
1318
|
|
|
1370
1319
|
##### Returns
|
|
1371
1320
|
|
|
1372
1321
|
|
|
1373
|
-
-
|
|
1322
|
+
- an dataset structure
|
|
1374
1323
|
|
|
1375
1324
|
|
|
1376
1325
|
|
|
1377
|
-
####
|
|
1326
|
+
#### buildFilter(uFilter)
|
|
1378
1327
|
|
|
1379
|
-
|
|
1380
|
-
return a Promise that is resolved when the script is loaded
|
|
1328
|
+
Gets an filter structure for the UI filter data
|
|
1381
1329
|
|
|
1382
1330
|
|
|
1383
1331
|
|
|
@@ -1386,9 +1334,7 @@ return a Promise that is resolved when the script is loaded
|
|
|
1386
1334
|
|
|
1387
1335
|
| Name | Type | Description | |
|
|
1388
1336
|
| ---- | ---- | ----------- | -------- |
|
|
1389
|
-
|
|
|
1390
|
-
| type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1391
|
-
| noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1337
|
+
| uFilter | | a UI structure filter | |
|
|
1392
1338
|
|
|
1393
1339
|
|
|
1394
1340
|
|
|
@@ -1396,17 +1342,17 @@ return a Promise that is resolved when the script is loaded
|
|
|
1396
1342
|
##### Returns
|
|
1397
1343
|
|
|
1398
1344
|
|
|
1399
|
-
-
|
|
1345
|
+
- an filter structure
|
|
1400
1346
|
|
|
1401
1347
|
|
|
1402
1348
|
|
|
1403
1349
|
|
|
1404
|
-
### dist/
|
|
1350
|
+
### dist/filters/adapters/logicToFD.js
|
|
1405
1351
|
|
|
1406
1352
|
|
|
1407
|
-
####
|
|
1353
|
+
#### logicToFD(filterData, version)
|
|
1408
1354
|
|
|
1409
|
-
|
|
1355
|
+
Generates a filter data structure from the old logic structure (v2.0).
|
|
1410
1356
|
|
|
1411
1357
|
|
|
1412
1358
|
|
|
@@ -1415,8 +1361,8 @@ Validates if the given argument is empty
|
|
|
1415
1361
|
|
|
1416
1362
|
| Name | Type | Description | |
|
|
1417
1363
|
| ---- | ---- | ----------- | -------- |
|
|
1418
|
-
|
|
|
1419
|
-
|
|
|
1364
|
+
| filterData | | The old filter data structure with logic (v2.0) | |
|
|
1365
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1420
1366
|
|
|
1421
1367
|
|
|
1422
1368
|
|
|
@@ -1424,19 +1370,17 @@ Validates if the given argument is empty
|
|
|
1424
1370
|
##### Returns
|
|
1425
1371
|
|
|
1426
1372
|
|
|
1427
|
-
-
|
|
1373
|
+
- a Filter Data.
|
|
1428
1374
|
|
|
1429
1375
|
|
|
1430
1376
|
|
|
1431
1377
|
|
|
1432
|
-
### dist/
|
|
1378
|
+
### dist/filters/adapters/logicToFlatUI.js
|
|
1433
1379
|
|
|
1434
1380
|
|
|
1435
|
-
####
|
|
1381
|
+
#### logicToFlatUI(logics)
|
|
1436
1382
|
|
|
1437
|
-
|
|
1438
|
-
This function recieves any variable but will return false.
|
|
1439
|
-
Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
|
|
1383
|
+
Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
1440
1384
|
|
|
1441
1385
|
|
|
1442
1386
|
|
|
@@ -1445,7 +1389,7 @@ Validates if variable is null, undefined, or an empty string, also, the function
|
|
|
1445
1389
|
|
|
1446
1390
|
| Name | Type | Description | |
|
|
1447
1391
|
| ---- | ---- | ----------- | -------- |
|
|
1448
|
-
|
|
|
1392
|
+
| logics | | The old logic structure (v2.0) | |
|
|
1449
1393
|
|
|
1450
1394
|
|
|
1451
1395
|
|
|
@@ -1453,18 +1397,38 @@ Validates if variable is null, undefined, or an empty string, also, the function
|
|
|
1453
1397
|
##### Returns
|
|
1454
1398
|
|
|
1455
1399
|
|
|
1456
|
-
-
|
|
1400
|
+
- The Flattened UI Filters array
|
|
1457
1401
|
|
|
1458
1402
|
|
|
1459
1403
|
|
|
1404
|
+
#### getFilter(filters, filter, getIndex)
|
|
1460
1405
|
|
|
1461
|
-
|
|
1406
|
+
Get the filter or the index of the given array, validating an old filter structure.
|
|
1462
1407
|
|
|
1463
1408
|
|
|
1464
|
-
#### isNull(arg)
|
|
1465
1409
|
|
|
1466
|
-
|
|
1467
|
-
|
|
1410
|
+
|
|
1411
|
+
##### Parameters
|
|
1412
|
+
|
|
1413
|
+
| Name | Type | Description | |
|
|
1414
|
+
| ---- | ---- | ----------- | -------- |
|
|
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 | |
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
##### Returns
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
- the index or the UI filter object
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
#### refineRankingValues(values, uiValues)
|
|
1430
|
+
|
|
1431
|
+
Refines the values of the Ranking column type.
|
|
1468
1432
|
|
|
1469
1433
|
|
|
1470
1434
|
|
|
@@ -1473,7 +1437,8 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
1473
1437
|
|
|
1474
1438
|
| Name | Type | Description | |
|
|
1475
1439
|
| ---- | ---- | ----------- | -------- |
|
|
1476
|
-
|
|
|
1440
|
+
| values | | the Array of Ranking values | |
|
|
1441
|
+
| uiValues | | Object with additional info about the values of the filter. | |
|
|
1477
1442
|
|
|
1478
1443
|
|
|
1479
1444
|
|
|
@@ -1481,19 +1446,17 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
1481
1446
|
##### Returns
|
|
1482
1447
|
|
|
1483
1448
|
|
|
1484
|
-
-
|
|
1449
|
+
- the array of Ranking values
|
|
1485
1450
|
|
|
1486
1451
|
|
|
1487
1452
|
|
|
1488
1453
|
|
|
1489
|
-
### dist/
|
|
1454
|
+
### dist/filters/adapters/logicToUI.js
|
|
1490
1455
|
|
|
1491
1456
|
|
|
1492
|
-
####
|
|
1457
|
+
#### logicToUI(uFilters, datasetsInfo)
|
|
1493
1458
|
|
|
1494
|
-
|
|
1495
|
-
- If the first given argument is different than a length number, the variable is replaced by a default number
|
|
1496
|
-
- If the optional second given argument is passed the random string is permutated.
|
|
1459
|
+
Generates a UI filter structure from the old logic structure (v2.0).
|
|
1497
1460
|
|
|
1498
1461
|
|
|
1499
1462
|
|
|
@@ -1502,8 +1465,8 @@ Creates a random string
|
|
|
1502
1465
|
|
|
1503
1466
|
| Name | Type | Description | |
|
|
1504
1467
|
| ---- | ---- | ----------- | -------- |
|
|
1505
|
-
|
|
|
1506
|
-
|
|
|
1468
|
+
| uFilters | | Array of filters from old logic structure | |
|
|
1469
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1507
1470
|
|
|
1508
1471
|
|
|
1509
1472
|
|
|
@@ -1511,19 +1474,17 @@ Creates a random string
|
|
|
1511
1474
|
##### Returns
|
|
1512
1475
|
|
|
1513
1476
|
|
|
1514
|
-
-
|
|
1477
|
+
- a UI Filter Data.
|
|
1515
1478
|
|
|
1516
1479
|
|
|
1517
1480
|
|
|
1518
1481
|
|
|
1519
|
-
### dist/
|
|
1482
|
+
### dist/filters/adapters/transformFilters.js
|
|
1520
1483
|
|
|
1521
1484
|
|
|
1522
|
-
####
|
|
1485
|
+
#### transformFilters(oldFiltersObj, section)
|
|
1523
1486
|
|
|
1524
|
-
|
|
1525
|
-
- Useful for Object, Array and string type.
|
|
1526
|
-
- For `null` or `undefined` or else argument the returned value will be 0.
|
|
1487
|
+
Transform the old filters structure into the new one
|
|
1527
1488
|
|
|
1528
1489
|
|
|
1529
1490
|
|
|
@@ -1532,25 +1493,77 @@ Gets the length of the given array.
|
|
|
1532
1493
|
|
|
1533
1494
|
| Name | Type | Description | |
|
|
1534
1495
|
| ---- | ---- | ----------- | -------- |
|
|
1535
|
-
|
|
|
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' | |
|
|
1498
|
+
|
|
1536
1499
|
|
|
1537
1500
|
|
|
1538
1501
|
|
|
1502
|
+
##### Examples
|
|
1503
|
+
|
|
1504
|
+
```javascript
|
|
1505
|
+
|
|
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
|
+
};
|
|
1548
|
+
|
|
1549
|
+
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
1550
|
+
```
|
|
1551
|
+
|
|
1539
1552
|
|
|
1540
1553
|
##### Returns
|
|
1541
1554
|
|
|
1542
1555
|
|
|
1543
|
-
- `
|
|
1556
|
+
- `Object` an object with the new filters structure
|
|
1544
1557
|
|
|
1545
1558
|
|
|
1546
1559
|
|
|
1547
1560
|
|
|
1548
|
-
### dist/
|
|
1561
|
+
### dist/filters/helpers/applyHierarchyForAggFilters.js
|
|
1549
1562
|
|
|
1550
1563
|
|
|
1551
|
-
####
|
|
1564
|
+
#### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
|
|
1552
1565
|
|
|
1553
|
-
|
|
1566
|
+
[TODO: Make a proper description for this function]
|
|
1554
1567
|
|
|
1555
1568
|
|
|
1556
1569
|
|
|
@@ -1559,7 +1572,9 @@ Upper case the first letter of a given text
|
|
|
1559
1572
|
|
|
1560
1573
|
| Name | Type | Description | |
|
|
1561
1574
|
| ---- | ---- | ----------- | -------- |
|
|
1562
|
-
|
|
|
1575
|
+
| chartSettings | | Chart Settings for the Filter Builder | |
|
|
1576
|
+
| scopes | | | |
|
|
1577
|
+
| currentScope | | | |
|
|
1563
1578
|
|
|
1564
1579
|
|
|
1565
1580
|
|
|
@@ -1567,18 +1582,17 @@ Upper case the first letter of a given text
|
|
|
1567
1582
|
##### Returns
|
|
1568
1583
|
|
|
1569
1584
|
|
|
1570
|
-
-
|
|
1585
|
+
-
|
|
1571
1586
|
|
|
1572
1587
|
|
|
1573
1588
|
|
|
1574
1589
|
|
|
1575
|
-
### dist/
|
|
1590
|
+
### dist/filters/helpers/getAvailableScopes.js
|
|
1576
1591
|
|
|
1577
1592
|
|
|
1578
|
-
####
|
|
1593
|
+
#### getAvailableScopes(config)
|
|
1579
1594
|
|
|
1580
|
-
|
|
1581
|
-
Not to use this function with inner objects and functions
|
|
1595
|
+
Gets Scopes/Scope IDs by given IDs
|
|
1582
1596
|
|
|
1583
1597
|
|
|
1584
1598
|
|
|
@@ -1587,7 +1601,7 @@ Not to use this function with inner objects and functions
|
|
|
1587
1601
|
|
|
1588
1602
|
| Name | Type | Description | |
|
|
1589
1603
|
| ---- | ---- | ----------- | -------- |
|
|
1590
|
-
|
|
|
1604
|
+
| config | | given Differnts IDs in order set a available scope | |
|
|
1591
1605
|
|
|
1592
1606
|
|
|
1593
1607
|
|
|
@@ -1595,21 +1609,17 @@ Not to use this function with inner objects and functions
|
|
|
1595
1609
|
##### Returns
|
|
1596
1610
|
|
|
1597
1611
|
|
|
1598
|
-
-
|
|
1599
|
-
|
|
1612
|
+
- a Scopes/Scope IDs array
|
|
1600
1613
|
|
|
1601
1614
|
|
|
1602
1615
|
|
|
1603
|
-
### dist/general/object/get.js
|
|
1604
1616
|
|
|
1617
|
+
### dist/filters/helpers/getAvailableScopesIDsByConfig.js
|
|
1605
1618
|
|
|
1606
|
-
#### _get(baseObject, path, defaultValue)
|
|
1607
1619
|
|
|
1608
|
-
|
|
1609
|
-
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
1620
|
+
#### getAvailableScopesIDsByConfig(config)
|
|
1610
1621
|
|
|
1611
|
-
|
|
1612
|
-
Undefined and null values will return the defaultValue.
|
|
1622
|
+
Gets the Scopes IDS for the Available Scope function by any config
|
|
1613
1623
|
|
|
1614
1624
|
|
|
1615
1625
|
|
|
@@ -1618,59 +1628,53 @@ Undefined and null values will return the defaultValue.
|
|
|
1618
1628
|
|
|
1619
1629
|
| Name | Type | Description | |
|
|
1620
1630
|
| ---- | ---- | ----------- | -------- |
|
|
1621
|
-
|
|
|
1622
|
-
| path | | The string path or collection of string paths of the property to get. | |
|
|
1623
|
-
| defaultValue | | The value returned for undefined resolved values. | |
|
|
1631
|
+
| config | | any config | |
|
|
1624
1632
|
|
|
1625
1633
|
|
|
1626
1634
|
|
|
1627
1635
|
|
|
1628
|
-
#####
|
|
1636
|
+
##### Returns
|
|
1637
|
+
|
|
1638
|
+
|
|
1639
|
+
- a Available Scope IDS config
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
### dist/filters/helpers/getScopesByHierarchy.js
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
#### getScopesByHierarchy(scopes, currentScope)
|
|
1648
|
+
|
|
1649
|
+
[TODO: Make a description for this]
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
##### Parameters
|
|
1655
|
+
|
|
1656
|
+
| Name | Type | Description | |
|
|
1657
|
+
| ---- | ---- | ----------- | -------- |
|
|
1658
|
+
| scopes | | the collection of Scopes/Scope IDs | |
|
|
1659
|
+
| currentScope | | Current scope type | |
|
|
1660
|
+
|
|
1629
1661
|
|
|
1630
|
-
```javascript
|
|
1631
|
-
// returns 'Hello'
|
|
1632
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
1633
|
-
```
|
|
1634
|
-
```javascript
|
|
1635
|
-
// returns 'A simple Hello'
|
|
1636
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
1637
|
-
```
|
|
1638
|
-
```javascript
|
|
1639
|
-
// returns 'Hello Again'
|
|
1640
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
1641
|
-
```
|
|
1642
|
-
```javascript
|
|
1643
|
-
// returns 'Hello 2'
|
|
1644
|
-
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
1645
|
-
```
|
|
1646
|
-
```javascript
|
|
1647
|
-
// returns 'Hello Again'
|
|
1648
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
1649
|
-
```
|
|
1650
1662
|
|
|
1651
1663
|
|
|
1652
1664
|
##### Returns
|
|
1653
1665
|
|
|
1654
1666
|
|
|
1655
|
-
-
|
|
1667
|
+
- A new array of Scopes/Scope IDs
|
|
1656
1668
|
|
|
1657
1669
|
|
|
1658
1670
|
|
|
1659
1671
|
|
|
1660
|
-
### dist/general/
|
|
1672
|
+
### dist/general/array/delete.js
|
|
1661
1673
|
|
|
1662
1674
|
|
|
1663
|
-
####
|
|
1675
|
+
#### ArrayDelete(array, index)
|
|
1664
1676
|
|
|
1665
|
-
|
|
1666
|
-
- To optimize the searching, it is required a key in a snake_case style
|
|
1667
|
-
- List of cases that do not match
|
|
1668
|
-
-- From lower to snake case
|
|
1669
|
-
-- From upper to snake case
|
|
1670
|
-
-- From lower to camel case
|
|
1671
|
-
-- From upper to camel case
|
|
1672
|
-
-- From lower to pascal case
|
|
1673
|
-
-- From upper to pascal case
|
|
1677
|
+
Inmutable Array Item deletion
|
|
1674
1678
|
|
|
1675
1679
|
|
|
1676
1680
|
|
|
@@ -1679,33 +1683,58 @@ Searchs for properties in different case styles such as: lower, upper, camel and
|
|
|
1679
1683
|
|
|
1680
1684
|
| Name | Type | Description | |
|
|
1681
1685
|
| ---- | ---- | ----------- | -------- |
|
|
1682
|
-
|
|
|
1683
|
-
|
|
|
1686
|
+
| array | `Array` | a collection of items to delete | |
|
|
1687
|
+
| index | `Number` | the position of the item to delete | |
|
|
1684
1688
|
|
|
1685
1689
|
|
|
1686
1690
|
|
|
1687
1691
|
|
|
1688
|
-
#####
|
|
1692
|
+
##### Returns
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
- a new Array or the given parameter when is empty or not an array
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
### dist/general/array/filterNestedTree.js
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
#### filterNestedTree(arr, childArrKey, condition)
|
|
1704
|
+
|
|
1705
|
+
Filters a nested tree array by a custom condition on the last child node
|
|
1706
|
+
- If the given arguments are not valid, the function returns the first argument.
|
|
1707
|
+
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
1708
|
+
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
##### Parameters
|
|
1714
|
+
|
|
1715
|
+
| Name | Type | Description | |
|
|
1716
|
+
| ---- | ---- | ----------- | -------- |
|
|
1717
|
+
| arr | | nested tree array | |
|
|
1718
|
+
| childArrKey | | property representing the children array on the nested tree | |
|
|
1719
|
+
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
1720
|
+
|
|
1689
1721
|
|
|
1690
|
-
```javascript
|
|
1691
|
-
getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
1692
|
-
```
|
|
1693
1722
|
|
|
1694
1723
|
|
|
1695
1724
|
##### Returns
|
|
1696
1725
|
|
|
1697
1726
|
|
|
1698
|
-
-
|
|
1727
|
+
- array filtered
|
|
1699
1728
|
|
|
1700
1729
|
|
|
1701
1730
|
|
|
1702
1731
|
|
|
1703
|
-
### dist/general/
|
|
1732
|
+
### dist/general/array/flattenDeep.js
|
|
1704
1733
|
|
|
1705
1734
|
|
|
1706
|
-
####
|
|
1735
|
+
#### flattenDeep(arr)
|
|
1707
1736
|
|
|
1708
|
-
|
|
1737
|
+
Flat deeply an array
|
|
1709
1738
|
|
|
1710
1739
|
|
|
1711
1740
|
|
|
@@ -1714,38 +1743,53 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
|
|
|
1714
1743
|
|
|
1715
1744
|
| Name | Type | Description | |
|
|
1716
1745
|
| ---- | ---- | ----------- | -------- |
|
|
1717
|
-
|
|
|
1718
|
-
| property | `string` | String to verify if exists in the object as property | |
|
|
1746
|
+
| arr | | Array to flat deeply | |
|
|
1719
1747
|
|
|
1720
1748
|
|
|
1721
1749
|
|
|
1722
1750
|
|
|
1723
|
-
#####
|
|
1751
|
+
##### Returns
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
- flatten array
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
### dist/general/array/getFirstIndexFromArray.js
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
#### getFirstIndexFromArray(array, callback)
|
|
1763
|
+
|
|
1764
|
+
Gets the first index from the array by a callback condition
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
##### Parameters
|
|
1770
|
+
|
|
1771
|
+
| Name | Type | Description | |
|
|
1772
|
+
| ---- | ---- | ----------- | -------- |
|
|
1773
|
+
| array | | | |
|
|
1774
|
+
| callback | | function callback | |
|
|
1724
1775
|
|
|
1725
|
-
```javascript
|
|
1726
|
-
const prop = 'prop2'
|
|
1727
|
-
const obj1 = { prop1: 'hello', prop2: 'world'}
|
|
1728
|
-
_hasProperty(ob1, prop1) // true
|
|
1729
1776
|
|
|
1730
|
-
const obj2 = { prop1: 'hello world' }
|
|
1731
|
-
_hasProperty(ob1, prop2) // false
|
|
1732
|
-
```
|
|
1733
1777
|
|
|
1734
1778
|
|
|
1735
1779
|
##### Returns
|
|
1736
1780
|
|
|
1737
1781
|
|
|
1738
|
-
-
|
|
1782
|
+
- the first index of the array. -1 when the condition is not satisfied
|
|
1739
1783
|
|
|
1740
1784
|
|
|
1741
1785
|
|
|
1742
1786
|
|
|
1743
|
-
### dist/general/
|
|
1787
|
+
### dist/general/array/getLastIndexFromArray.js
|
|
1744
1788
|
|
|
1745
1789
|
|
|
1746
|
-
####
|
|
1790
|
+
#### getLastIndexFromArray(array, callback)
|
|
1747
1791
|
|
|
1748
|
-
|
|
1792
|
+
Gets the last index from the array by a callback condition
|
|
1749
1793
|
|
|
1750
1794
|
|
|
1751
1795
|
|
|
@@ -1754,7 +1798,8 @@ Checks if the given argument is an object type
|
|
|
1754
1798
|
|
|
1755
1799
|
| Name | Type | Description | |
|
|
1756
1800
|
| ---- | ---- | ----------- | -------- |
|
|
1757
|
-
|
|
|
1801
|
+
| array | | | |
|
|
1802
|
+
| callback | | function callback | |
|
|
1758
1803
|
|
|
1759
1804
|
|
|
1760
1805
|
|
|
@@ -1762,18 +1807,17 @@ Checks if the given argument is an object type
|
|
|
1762
1807
|
##### Returns
|
|
1763
1808
|
|
|
1764
1809
|
|
|
1765
|
-
-
|
|
1810
|
+
- the last index of the array. -1 when the condition is not satisfied
|
|
1766
1811
|
|
|
1767
1812
|
|
|
1768
1813
|
|
|
1769
1814
|
|
|
1770
|
-
### dist/general/
|
|
1815
|
+
### dist/general/function/debounce.js
|
|
1771
1816
|
|
|
1772
1817
|
|
|
1773
|
-
####
|
|
1818
|
+
#### debounce(fn, time)
|
|
1774
1819
|
|
|
1775
|
-
|
|
1776
|
-
and return a mapped object
|
|
1820
|
+
Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
|
|
1777
1821
|
|
|
1778
1822
|
|
|
1779
1823
|
|
|
@@ -1782,8 +1826,8 @@ and return a mapped object
|
|
|
1782
1826
|
|
|
1783
1827
|
| Name | Type | Description | |
|
|
1784
1828
|
| ---- | ---- | ----------- | -------- |
|
|
1785
|
-
|
|
|
1786
|
-
|
|
|
1829
|
+
| fn | `Function` | original Function | |
|
|
1830
|
+
| time | `Number` | default 500ms | |
|
|
1787
1831
|
|
|
1788
1832
|
|
|
1789
1833
|
|
|
@@ -1791,18 +1835,17 @@ and return a mapped object
|
|
|
1791
1835
|
##### Returns
|
|
1792
1836
|
|
|
1793
1837
|
|
|
1794
|
-
- `
|
|
1838
|
+
- `Function` debounced functions
|
|
1795
1839
|
|
|
1796
1840
|
|
|
1797
1841
|
|
|
1798
1842
|
|
|
1799
|
-
### dist/general/
|
|
1843
|
+
### dist/general/function/throttled.js
|
|
1800
1844
|
|
|
1801
1845
|
|
|
1802
|
-
####
|
|
1846
|
+
#### throttled(fn, time)
|
|
1803
1847
|
|
|
1804
|
-
|
|
1805
|
-
The second given argument to the first given argument.
|
|
1848
|
+
Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
1806
1849
|
|
|
1807
1850
|
|
|
1808
1851
|
|
|
@@ -1811,9 +1854,8 @@ The second given argument to the first given argument.
|
|
|
1811
1854
|
|
|
1812
1855
|
| Name | Type | Description | |
|
|
1813
1856
|
| ---- | ---- | ----------- | -------- |
|
|
1814
|
-
|
|
|
1815
|
-
|
|
|
1816
|
-
| settings | | Object settings for this function | |
|
|
1857
|
+
| fn | `Function` | original Function | |
|
|
1858
|
+
| time | `Number` | default 500ms | |
|
|
1817
1859
|
|
|
1818
1860
|
|
|
1819
1861
|
|
|
@@ -1821,13 +1863,17 @@ The second given argument to the first given argument.
|
|
|
1821
1863
|
##### Returns
|
|
1822
1864
|
|
|
1823
1865
|
|
|
1824
|
-
-
|
|
1866
|
+
- `Function` throttled function
|
|
1825
1867
|
|
|
1826
1868
|
|
|
1827
1869
|
|
|
1828
|
-
#### isValid(obj1, obj2)
|
|
1829
1870
|
|
|
1830
|
-
|
|
1871
|
+
### dist/general/mix/getTag.js
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
#### getTag(value)
|
|
1875
|
+
|
|
1876
|
+
Gets the `toStringTag` of `value`.
|
|
1831
1877
|
|
|
1832
1878
|
|
|
1833
1879
|
|
|
@@ -1836,8 +1882,7 @@ Validates if the two arguments are objects
|
|
|
1836
1882
|
|
|
1837
1883
|
| Name | Type | Description | |
|
|
1838
1884
|
| ---- | ---- | ----------- | -------- |
|
|
1839
|
-
|
|
|
1840
|
-
| obj2 | | The object to be merged | |
|
|
1885
|
+
| value | | The value to query. | |
|
|
1841
1886
|
|
|
1842
1887
|
|
|
1843
1888
|
|
|
@@ -1845,13 +1890,17 @@ Validates if the two arguments are objects
|
|
|
1845
1890
|
##### Returns
|
|
1846
1891
|
|
|
1847
1892
|
|
|
1848
|
-
-
|
|
1893
|
+
- `string` Returns the `toStringTag`.
|
|
1849
1894
|
|
|
1850
1895
|
|
|
1851
1896
|
|
|
1852
|
-
#### getParamsToMergeDeep(settings)
|
|
1853
1897
|
|
|
1854
|
-
|
|
1898
|
+
### dist/general/mix/importScripts.js
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
#### importScripts(scripts)
|
|
1902
|
+
|
|
1903
|
+
Import a set of external Scripts given the URL in both serie and cascade way
|
|
1855
1904
|
|
|
1856
1905
|
|
|
1857
1906
|
|
|
@@ -1860,25 +1909,54 @@ Validates and gets the settings with all set parameters.
|
|
|
1860
1909
|
|
|
1861
1910
|
| Name | Type | Description | |
|
|
1862
1911
|
| ---- | ---- | ----------- | -------- |
|
|
1863
|
-
|
|
|
1912
|
+
| scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | |
|
|
1913
|
+
| scripts.url | `String` | CDN URL | |
|
|
1914
|
+
| scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | |
|
|
1915
|
+
| scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1916
|
+
| scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1917
|
+
| scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | |
|
|
1864
1918
|
|
|
1865
1919
|
|
|
1866
1920
|
|
|
1867
1921
|
|
|
1868
|
-
#####
|
|
1922
|
+
##### Examples
|
|
1869
1923
|
|
|
1924
|
+
```javascript
|
|
1925
|
+
// 1) Simple script (paralell loading)
|
|
1926
|
+
importScripts(['http://myscript.js', 'http://another.js']);
|
|
1870
1927
|
|
|
1871
|
-
|
|
1928
|
+
// 2) Loading `.js` and `.esm.js` script (parallel loading)
|
|
1929
|
+
importScripts([
|
|
1930
|
+
{ url: 'http://myscript.esm.js', type: 'module' },
|
|
1931
|
+
{ url: 'http://myscript.js', noModule: true }
|
|
1932
|
+
]);
|
|
1933
|
+
|
|
1934
|
+
// 3) import dependent scripts (cascade)
|
|
1935
|
+
importScripts([
|
|
1936
|
+
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
|
|
1937
|
+
]);
|
|
1938
|
+
|
|
1939
|
+
// 4) mix
|
|
1940
|
+
importScripts([
|
|
1941
|
+
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
|
|
1942
|
+
{ url: 'http://another.esm.js', type: 'module' },
|
|
1943
|
+
{ url: 'http://another.js', noModule: true },
|
|
1944
|
+
'http://simplescript.js'
|
|
1945
|
+
]);
|
|
1946
|
+
```
|
|
1872
1947
|
|
|
1873
1948
|
|
|
1949
|
+
##### Returns
|
|
1874
1950
|
|
|
1875
1951
|
|
|
1876
|
-
|
|
1952
|
+
- `Promise` Promise when all script have been loaded
|
|
1877
1953
|
|
|
1878
1954
|
|
|
1879
|
-
#### objectCopy(entity, cache)
|
|
1880
1955
|
|
|
1881
|
-
|
|
1956
|
+
#### loadScript(url, type, noModule)
|
|
1957
|
+
|
|
1958
|
+
Creates the script element and appends to document.head
|
|
1959
|
+
return a Promise that is resolved when the script is loaded
|
|
1882
1960
|
|
|
1883
1961
|
|
|
1884
1962
|
|
|
@@ -1887,8 +1965,9 @@ Created a new reference of the given argument
|
|
|
1887
1965
|
|
|
1888
1966
|
| Name | Type | Description | |
|
|
1889
1967
|
| ---- | ---- | ----------- | -------- |
|
|
1890
|
-
|
|
|
1891
|
-
|
|
|
1968
|
+
| url | `String` | Cdn Url | |
|
|
1969
|
+
| type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1970
|
+
| noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1892
1971
|
|
|
1893
1972
|
|
|
1894
1973
|
|
|
@@ -1896,17 +1975,18 @@ Created a new reference of the given argument
|
|
|
1896
1975
|
##### Returns
|
|
1897
1976
|
|
|
1898
1977
|
|
|
1899
|
-
-
|
|
1978
|
+
- `Void`
|
|
1900
1979
|
|
|
1901
1980
|
|
|
1902
1981
|
|
|
1903
1982
|
|
|
1904
|
-
### dist/general/
|
|
1983
|
+
### dist/general/mix/compareDeep.js
|
|
1905
1984
|
|
|
1906
1985
|
|
|
1907
|
-
####
|
|
1986
|
+
#### compareDeep(object1, object2)
|
|
1908
1987
|
|
|
1909
|
-
|
|
1988
|
+
Compares two objects to know if they are equals. Go across nested objects.
|
|
1989
|
+
Includes arrays in the comparison.
|
|
1910
1990
|
|
|
1911
1991
|
|
|
1912
1992
|
|
|
@@ -1915,8 +1995,8 @@ return a new Object excluding attributes in _props_ list
|
|
|
1915
1995
|
|
|
1916
1996
|
| Name | Type | Description | |
|
|
1917
1997
|
| ---- | ---- | ----------- | -------- |
|
|
1918
|
-
|
|
|
1919
|
-
|
|
|
1998
|
+
| object1 | | First Object to compare | |
|
|
1999
|
+
| object2 | | Second Object to compare | |
|
|
1920
2000
|
|
|
1921
2001
|
|
|
1922
2002
|
|
|
@@ -1924,17 +2004,17 @@ return a new Object excluding attributes in _props_ list
|
|
|
1924
2004
|
##### Returns
|
|
1925
2005
|
|
|
1926
2006
|
|
|
1927
|
-
-
|
|
2007
|
+
- True: objects are equal. False: Objects are not equal. Undefined: invalid
|
|
1928
2008
|
|
|
1929
2009
|
|
|
1930
2010
|
|
|
1931
2011
|
|
|
1932
|
-
### dist/general/
|
|
2012
|
+
### dist/general/mix/isEmpty.js
|
|
1933
2013
|
|
|
1934
2014
|
|
|
1935
|
-
####
|
|
2015
|
+
#### isEmpty(variable, includeFalsy)
|
|
1936
2016
|
|
|
1937
|
-
|
|
2017
|
+
Validates if the given argument is empty
|
|
1938
2018
|
|
|
1939
2019
|
|
|
1940
2020
|
|
|
@@ -1943,8 +2023,8 @@ return a new object just with attributes in _keys_ list
|
|
|
1943
2023
|
|
|
1944
2024
|
| Name | Type | Description | |
|
|
1945
2025
|
| ---- | ---- | ----------- | -------- |
|
|
1946
|
-
|
|
|
1947
|
-
|
|
|
2026
|
+
| variable | | the given variable | |
|
|
2027
|
+
| includeFalsy | | flag to determine include the falsy variables into the validation | |
|
|
1948
2028
|
|
|
1949
2029
|
|
|
1950
2030
|
|
|
@@ -1952,17 +2032,19 @@ return a new object just with attributes in _keys_ list
|
|
|
1952
2032
|
##### Returns
|
|
1953
2033
|
|
|
1954
2034
|
|
|
1955
|
-
-
|
|
2035
|
+
- true: the given argument is empty; false: is not.
|
|
1956
2036
|
|
|
1957
2037
|
|
|
1958
2038
|
|
|
1959
2039
|
|
|
1960
|
-
### dist/general/
|
|
2040
|
+
### dist/general/mix/isNaNV2.js
|
|
1961
2041
|
|
|
1962
2042
|
|
|
1963
|
-
####
|
|
2043
|
+
#### isNaNV2(variable)
|
|
1964
2044
|
|
|
1965
|
-
|
|
2045
|
+
Validates if the recieved number is NaN type.
|
|
2046
|
+
This function recieves any variable but will return false.
|
|
2047
|
+
Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
|
|
1966
2048
|
|
|
1967
2049
|
|
|
1968
2050
|
|
|
@@ -1971,7 +2053,7 @@ serialize object to url param
|
|
|
1971
2053
|
|
|
1972
2054
|
| Name | Type | Description | |
|
|
1973
2055
|
| ---- | ---- | ----------- | -------- |
|
|
1974
|
-
|
|
|
2056
|
+
| variable | | the variable to validate | |
|
|
1975
2057
|
|
|
1976
2058
|
|
|
1977
2059
|
|
|
@@ -1979,17 +2061,18 @@ serialize object to url param
|
|
|
1979
2061
|
##### Returns
|
|
1980
2062
|
|
|
1981
2063
|
|
|
1982
|
-
-
|
|
2064
|
+
- True if variable is a NaN or false otherwise
|
|
1983
2065
|
|
|
1984
2066
|
|
|
1985
2067
|
|
|
1986
2068
|
|
|
1987
|
-
### dist/
|
|
2069
|
+
### dist/general/mix/isNull.js
|
|
1988
2070
|
|
|
1989
2071
|
|
|
1990
|
-
####
|
|
2072
|
+
#### isNull(arg)
|
|
1991
2073
|
|
|
1992
|
-
|
|
2074
|
+
return if a given variable is either `null` or `undefined`
|
|
2075
|
+
useful to avoid falsify validating Number Zero (0)
|
|
1993
2076
|
|
|
1994
2077
|
|
|
1995
2078
|
|
|
@@ -1998,8 +2081,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
1998
2081
|
|
|
1999
2082
|
| Name | Type | Description | |
|
|
2000
2083
|
| ---- | ---- | ----------- | -------- |
|
|
2001
|
-
|
|
|
2002
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
2084
|
+
| arg | `any` | | |
|
|
2003
2085
|
|
|
2004
2086
|
|
|
2005
2087
|
|
|
@@ -2007,17 +2089,19 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
2007
2089
|
##### Returns
|
|
2008
2090
|
|
|
2009
2091
|
|
|
2010
|
-
-
|
|
2092
|
+
- `Boolean`
|
|
2011
2093
|
|
|
2012
2094
|
|
|
2013
2095
|
|
|
2014
2096
|
|
|
2015
|
-
### dist/
|
|
2097
|
+
### dist/general/mix/randomId.js
|
|
2016
2098
|
|
|
2017
2099
|
|
|
2018
|
-
####
|
|
2100
|
+
#### randomId(length, exclude)
|
|
2019
2101
|
|
|
2020
|
-
|
|
2102
|
+
Creates a random string
|
|
2103
|
+
- If the first given argument is different than a length number, the variable is replaced by a default number
|
|
2104
|
+
- If the optional second given argument is passed the random string is permutated.
|
|
2021
2105
|
|
|
2022
2106
|
|
|
2023
2107
|
|
|
@@ -2026,8 +2110,8 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
2026
2110
|
|
|
2027
2111
|
| Name | Type | Description | |
|
|
2028
2112
|
| ---- | ---- | ----------- | -------- |
|
|
2029
|
-
|
|
|
2030
|
-
|
|
|
2113
|
+
| length | `Number` | size of the generated string. Default 8 | |
|
|
2114
|
+
| exclude | `Array` | collection of strings that is going to be excluded of the random string. | |
|
|
2031
2115
|
|
|
2032
2116
|
|
|
2033
2117
|
|
|
@@ -2035,17 +2119,19 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
2035
2119
|
##### Returns
|
|
2036
2120
|
|
|
2037
2121
|
|
|
2038
|
-
-
|
|
2122
|
+
- `String` Random string
|
|
2039
2123
|
|
|
2040
2124
|
|
|
2041
2125
|
|
|
2042
2126
|
|
|
2043
|
-
### dist/
|
|
2127
|
+
### dist/general/mix/size.js
|
|
2044
2128
|
|
|
2045
2129
|
|
|
2046
|
-
####
|
|
2130
|
+
#### size(obj)
|
|
2047
2131
|
|
|
2048
|
-
|
|
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.
|
|
2049
2135
|
|
|
2050
2136
|
|
|
2051
2137
|
|
|
@@ -2054,8 +2140,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
2054
2140
|
|
|
2055
2141
|
| Name | Type | Description | |
|
|
2056
2142
|
| ---- | ---- | ----------- | -------- |
|
|
2057
|
-
|
|
|
2058
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
2143
|
+
| obj | `Any` | Any object-type variable | |
|
|
2059
2144
|
|
|
2060
2145
|
|
|
2061
2146
|
|
|
@@ -2063,17 +2148,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
2063
2148
|
##### Returns
|
|
2064
2149
|
|
|
2065
2150
|
|
|
2066
|
-
-
|
|
2151
|
+
- `Number` the size of the given variable
|
|
2067
2152
|
|
|
2068
2153
|
|
|
2069
2154
|
|
|
2070
2155
|
|
|
2071
|
-
### dist/
|
|
2156
|
+
### dist/general/string/capitalize.js
|
|
2072
2157
|
|
|
2073
2158
|
|
|
2074
|
-
####
|
|
2159
|
+
#### capitalize(text)
|
|
2075
2160
|
|
|
2076
|
-
|
|
2161
|
+
Upper case the first letter of a given text
|
|
2077
2162
|
|
|
2078
2163
|
|
|
2079
2164
|
|
|
@@ -2082,8 +2167,7 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
2082
2167
|
|
|
2083
2168
|
| Name | Type | Description | |
|
|
2084
2169
|
| ---- | ---- | ----------- | -------- |
|
|
2085
|
-
|
|
|
2086
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
2170
|
+
| text | `String` | | |
|
|
2087
2171
|
|
|
2088
2172
|
|
|
2089
2173
|
|
|
@@ -2091,17 +2175,18 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
2091
2175
|
##### Returns
|
|
2092
2176
|
|
|
2093
2177
|
|
|
2094
|
-
-
|
|
2178
|
+
- `String` a capitalized text
|
|
2095
2179
|
|
|
2096
2180
|
|
|
2097
2181
|
|
|
2098
2182
|
|
|
2099
|
-
### dist/
|
|
2183
|
+
### dist/general/object/cloneDeep.js
|
|
2100
2184
|
|
|
2101
2185
|
|
|
2102
|
-
####
|
|
2186
|
+
#### cloneDeep(obj)
|
|
2103
2187
|
|
|
2104
|
-
|
|
2188
|
+
A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
|
|
2189
|
+
Not to use this function with inner objects and functions
|
|
2105
2190
|
|
|
2106
2191
|
|
|
2107
2192
|
|
|
@@ -2110,8 +2195,7 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
2110
2195
|
|
|
2111
2196
|
| Name | Type | Description | |
|
|
2112
2197
|
| ---- | ---- | ----------- | -------- |
|
|
2113
|
-
|
|
|
2114
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
2198
|
+
| obj | | The object | |
|
|
2115
2199
|
|
|
2116
2200
|
|
|
2117
2201
|
|
|
@@ -2119,17 +2203,21 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
2119
2203
|
##### Returns
|
|
2120
2204
|
|
|
2121
2205
|
|
|
2122
|
-
- The
|
|
2206
|
+
- The new reference object or the given object if the parsing is incorrect or empty
|
|
2123
2207
|
|
|
2124
2208
|
|
|
2125
2209
|
|
|
2126
2210
|
|
|
2127
|
-
### dist/
|
|
2211
|
+
### dist/general/object/get.js
|
|
2128
2212
|
|
|
2129
2213
|
|
|
2130
|
-
####
|
|
2214
|
+
#### _get(baseObject, path, defaultValue)
|
|
2131
2215
|
|
|
2132
|
-
|
|
2216
|
+
Like lodash _.get.
|
|
2217
|
+
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
2218
|
+
|
|
2219
|
+
Empty arrays and empty objects are returned but the defaultValue is not
|
|
2220
|
+
Undefined and null values will return the defaultValue.
|
|
2133
2221
|
|
|
2134
2222
|
|
|
2135
2223
|
|
|
@@ -2138,27 +2226,51 @@ Gets a Date Object instance by a Date format
|
|
|
2138
2226
|
|
|
2139
2227
|
| Name | Type | Description | |
|
|
2140
2228
|
| ---- | ---- | ----------- | -------- |
|
|
2141
|
-
|
|
|
2142
|
-
|
|
|
2143
|
-
|
|
|
2229
|
+
| baseObject | | The object to query | |
|
|
2230
|
+
| path | | The string path or collection of string paths of the property to get. | |
|
|
2231
|
+
| defaultValue | | The value returned for undefined resolved values. | |
|
|
2144
2232
|
|
|
2145
2233
|
|
|
2146
2234
|
|
|
2147
2235
|
|
|
2236
|
+
##### Examples
|
|
2237
|
+
|
|
2238
|
+
```javascript
|
|
2239
|
+
// returns 'Hello'
|
|
2240
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
2241
|
+
```
|
|
2242
|
+
```javascript
|
|
2243
|
+
// returns 'A simple Hello'
|
|
2244
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
2245
|
+
```
|
|
2246
|
+
```javascript
|
|
2247
|
+
// returns 'Hello Again'
|
|
2248
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
2249
|
+
```
|
|
2250
|
+
```javascript
|
|
2251
|
+
// returns 'Hello 2'
|
|
2252
|
+
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
2253
|
+
```
|
|
2254
|
+
```javascript
|
|
2255
|
+
// returns 'Hello Again'
|
|
2256
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
2257
|
+
```
|
|
2258
|
+
|
|
2259
|
+
|
|
2148
2260
|
##### Returns
|
|
2149
2261
|
|
|
2150
2262
|
|
|
2151
|
-
-
|
|
2263
|
+
- the resolved value.
|
|
2152
2264
|
|
|
2153
2265
|
|
|
2154
2266
|
|
|
2155
2267
|
|
|
2156
|
-
### dist/
|
|
2268
|
+
### dist/general/object/hasProperty.js
|
|
2157
2269
|
|
|
2158
2270
|
|
|
2159
|
-
####
|
|
2271
|
+
#### _hasProperty(obj, property)
|
|
2160
2272
|
|
|
2161
|
-
|
|
2273
|
+
Use the hasOwnProperty in order to verify if the given property exists in the object.
|
|
2162
2274
|
|
|
2163
2275
|
|
|
2164
2276
|
|
|
@@ -2167,25 +2279,46 @@ Gets the date format by the given property
|
|
|
2167
2279
|
|
|
2168
2280
|
| Name | Type | Description | |
|
|
2169
2281
|
| ---- | ---- | ----------- | -------- |
|
|
2170
|
-
|
|
|
2282
|
+
| obj | `object` | an object | |
|
|
2283
|
+
| property | `string` | String to verify if exists in the object as property | |
|
|
2284
|
+
|
|
2171
2285
|
|
|
2172
2286
|
|
|
2173
2287
|
|
|
2288
|
+
##### Examples
|
|
2289
|
+
|
|
2290
|
+
```javascript
|
|
2291
|
+
const prop = 'prop2'
|
|
2292
|
+
const obj1 = { prop1: 'hello', prop2: 'world'}
|
|
2293
|
+
_hasProperty(ob1, prop1) // true
|
|
2294
|
+
|
|
2295
|
+
const obj2 = { prop1: 'hello world' }
|
|
2296
|
+
_hasProperty(ob1, prop2) // false
|
|
2297
|
+
```
|
|
2298
|
+
|
|
2174
2299
|
|
|
2175
2300
|
##### Returns
|
|
2176
2301
|
|
|
2177
2302
|
|
|
2178
|
-
-
|
|
2303
|
+
- True if the object has the given property; otherwise, false.
|
|
2179
2304
|
|
|
2180
2305
|
|
|
2181
2306
|
|
|
2182
2307
|
|
|
2183
|
-
### dist/
|
|
2308
|
+
### dist/general/object/getAttribute.js
|
|
2184
2309
|
|
|
2185
2310
|
|
|
2186
|
-
####
|
|
2311
|
+
#### getAttribute(obj, key)
|
|
2187
2312
|
|
|
2188
|
-
|
|
2313
|
+
Searchs for properties in different case styles such as: lower, upper, camel and pascal
|
|
2314
|
+
- To optimize the searching, it is required a key in a snake_case style
|
|
2315
|
+
- List of cases that do not match
|
|
2316
|
+
-- From lower to snake case
|
|
2317
|
+
-- From upper to snake case
|
|
2318
|
+
-- From lower to camel case
|
|
2319
|
+
-- From upper to camel case
|
|
2320
|
+
-- From lower to pascal case
|
|
2321
|
+
-- From upper to pascal case
|
|
2189
2322
|
|
|
2190
2323
|
|
|
2191
2324
|
|
|
@@ -2194,25 +2327,33 @@ Gets an array of regular expressions by the given date format
|
|
|
2194
2327
|
|
|
2195
2328
|
| Name | Type | Description | |
|
|
2196
2329
|
| ---- | ---- | ----------- | -------- |
|
|
2197
|
-
|
|
|
2330
|
+
| obj | `object` | object to look for | |
|
|
2331
|
+
| key | `string` | String attribute in snake_case style | |
|
|
2332
|
+
|
|
2333
|
+
|
|
2198
2334
|
|
|
2199
2335
|
|
|
2336
|
+
##### Examples
|
|
2337
|
+
|
|
2338
|
+
```javascript
|
|
2339
|
+
getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2340
|
+
```
|
|
2200
2341
|
|
|
2201
2342
|
|
|
2202
2343
|
##### Returns
|
|
2203
2344
|
|
|
2204
2345
|
|
|
2205
|
-
-
|
|
2346
|
+
- `Void`
|
|
2206
2347
|
|
|
2207
2348
|
|
|
2208
2349
|
|
|
2209
2350
|
|
|
2210
|
-
### dist/
|
|
2351
|
+
### dist/general/object/isObject.js
|
|
2211
2352
|
|
|
2212
2353
|
|
|
2213
|
-
####
|
|
2354
|
+
#### isObject(obj)
|
|
2214
2355
|
|
|
2215
|
-
|
|
2356
|
+
Checks if the given argument is an object type
|
|
2216
2357
|
|
|
2217
2358
|
|
|
2218
2359
|
|
|
@@ -2221,7 +2362,7 @@ Gets the separator of the date format
|
|
|
2221
2362
|
|
|
2222
2363
|
| Name | Type | Description | |
|
|
2223
2364
|
| ---- | ---- | ----------- | -------- |
|
|
2224
|
-
|
|
|
2365
|
+
| obj | | the variable to check | |
|
|
2225
2366
|
|
|
2226
2367
|
|
|
2227
2368
|
|
|
@@ -2229,18 +2370,18 @@ Gets the separator of the date format
|
|
|
2229
2370
|
##### Returns
|
|
2230
2371
|
|
|
2231
2372
|
|
|
2232
|
-
-
|
|
2373
|
+
- True: It is an object; False: It is not.
|
|
2233
2374
|
|
|
2234
2375
|
|
|
2235
2376
|
|
|
2236
2377
|
|
|
2237
|
-
### dist/
|
|
2378
|
+
### dist/general/object/mapValues.js
|
|
2238
2379
|
|
|
2239
2380
|
|
|
2240
|
-
####
|
|
2381
|
+
#### mapValues(baseObject, iteratee)
|
|
2241
2382
|
|
|
2242
|
-
|
|
2243
|
-
|
|
2383
|
+
Invoke iteratee (function) for each object key-value pair
|
|
2384
|
+
and return a mapped object
|
|
2244
2385
|
|
|
2245
2386
|
|
|
2246
2387
|
|
|
@@ -2249,7 +2390,8 @@ Additionally, the month and the year
|
|
|
2249
2390
|
|
|
2250
2391
|
| Name | Type | Description | |
|
|
2251
2392
|
| ---- | ---- | ----------- | -------- |
|
|
2252
|
-
|
|
|
2393
|
+
| baseObject | `Object` | Base object. | |
|
|
2394
|
+
| iteratee | `Function` | The executed per iteration. | |
|
|
2253
2395
|
|
|
2254
2396
|
|
|
2255
2397
|
|
|
@@ -2257,20 +2399,18 @@ Additionally, the month and the year
|
|
|
2257
2399
|
##### Returns
|
|
2258
2400
|
|
|
2259
2401
|
|
|
2260
|
-
-
|
|
2402
|
+
- `Object` New mapped object.
|
|
2261
2403
|
|
|
2262
2404
|
|
|
2263
2405
|
|
|
2264
2406
|
|
|
2265
|
-
### dist/
|
|
2407
|
+
### dist/general/object/mergeDeep.js
|
|
2266
2408
|
|
|
2267
2409
|
|
|
2268
|
-
####
|
|
2410
|
+
#### mergeDeep(obj1, obj2, settings)
|
|
2269
2411
|
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
- Otherwise depends of the format
|
|
2273
|
-
- Some escenarios the string is a mix of token labels and dates
|
|
2412
|
+
Merges two objects into a new one.
|
|
2413
|
+
The second given argument to the first given argument.
|
|
2274
2414
|
|
|
2275
2415
|
|
|
2276
2416
|
|
|
@@ -2279,8 +2419,9 @@ Validate a string date depending on giving format
|
|
|
2279
2419
|
|
|
2280
2420
|
| Name | Type | Description | |
|
|
2281
2421
|
| ---- | ---- | ----------- | -------- |
|
|
2282
|
-
|
|
|
2283
|
-
|
|
|
2422
|
+
| obj1 | | The target object | |
|
|
2423
|
+
| obj2 | | The object to be merged | |
|
|
2424
|
+
| settings | | Object settings for this function | |
|
|
2284
2425
|
|
|
2285
2426
|
|
|
2286
2427
|
|
|
@@ -2288,17 +2429,13 @@ Validate a string date depending on giving format
|
|
|
2288
2429
|
##### Returns
|
|
2289
2430
|
|
|
2290
2431
|
|
|
2291
|
-
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2432
|
+
- a new merged object
|
|
2295
2433
|
|
|
2296
|
-
### dist/dates/helpers/validateDateByDateFormat.js
|
|
2297
2434
|
|
|
2298
2435
|
|
|
2299
|
-
####
|
|
2436
|
+
#### isValid(obj1, obj2)
|
|
2300
2437
|
|
|
2301
|
-
Validates the
|
|
2438
|
+
Validates if the two arguments are objects
|
|
2302
2439
|
|
|
2303
2440
|
|
|
2304
2441
|
|
|
@@ -2307,8 +2444,8 @@ Validates the given string as Date by its date format.
|
|
|
2307
2444
|
|
|
2308
2445
|
| Name | Type | Description | |
|
|
2309
2446
|
| ---- | ---- | ----------- | -------- |
|
|
2310
|
-
|
|
|
2311
|
-
|
|
|
2447
|
+
| obj1 | | The target object | |
|
|
2448
|
+
| obj2 | | The object to be merged | |
|
|
2312
2449
|
|
|
2313
2450
|
|
|
2314
2451
|
|
|
@@ -2316,17 +2453,13 @@ Validates the given string as Date by its date format.
|
|
|
2316
2453
|
##### Returns
|
|
2317
2454
|
|
|
2318
2455
|
|
|
2319
|
-
- true:
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2456
|
+
- true: they are valid; false: they are not
|
|
2323
2457
|
|
|
2324
|
-
### dist/dates/range/getDateRange.js
|
|
2325
2458
|
|
|
2326
2459
|
|
|
2327
|
-
####
|
|
2460
|
+
#### getParamsToMergeDeep(settings)
|
|
2328
2461
|
|
|
2329
|
-
|
|
2462
|
+
Validates and gets the settings with all set parameters.
|
|
2330
2463
|
|
|
2331
2464
|
|
|
2332
2465
|
|
|
@@ -2335,58 +2468,35 @@ Get date range object from a string date value
|
|
|
2335
2468
|
|
|
2336
2469
|
| Name | Type | Description | |
|
|
2337
2470
|
| ---- | ---- | ----------- | -------- |
|
|
2338
|
-
|
|
|
2339
|
-
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
2340
|
-
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
2341
|
-
|
|
2342
|
-
|
|
2471
|
+
| settings | | the settings object | |
|
|
2343
2472
|
|
|
2344
2473
|
|
|
2345
|
-
##### Examples
|
|
2346
2474
|
|
|
2347
|
-
```javascript
|
|
2348
|
-
// 1) Year:
|
|
2349
|
-
getDateRange('2020', 'YEAR');
|
|
2350
|
-
// Will return:
|
|
2351
|
-
{
|
|
2352
|
-
from: '01/01/2020 00:00:00',
|
|
2353
|
-
to: '12/31/2020 23:59:59'
|
|
2354
|
-
}
|
|
2355
2475
|
|
|
2356
|
-
|
|
2357
|
-
getDateRange('Q3 2020', 'QUARTER');
|
|
2358
|
-
// Will return:
|
|
2359
|
-
{
|
|
2360
|
-
from: '07/01/2020 00:00:00',
|
|
2361
|
-
to: '09/30/2020 23:59:59'
|
|
2362
|
-
}
|
|
2476
|
+
##### Returns
|
|
2363
2477
|
|
|
2364
|
-
// 3) Month:
|
|
2365
|
-
getDateRange('Oct 2020', 'MONTH');
|
|
2366
|
-
// Will return:
|
|
2367
|
-
{
|
|
2368
|
-
from: '10/01/2020 00:00:00',
|
|
2369
|
-
to: '10/31/2020 23:59:59'
|
|
2370
|
-
}
|
|
2371
|
-
```
|
|
2372
2478
|
|
|
2479
|
+
- a new settings object with all set parameters.
|
|
2373
2480
|
|
|
2374
|
-
##### Returns
|
|
2375
2481
|
|
|
2376
2482
|
|
|
2377
|
-
- `Object` an object with the date range with two string date properties: from and to
|
|
2378
2483
|
|
|
2484
|
+
### dist/general/object/objectCopy.js
|
|
2379
2485
|
|
|
2380
2486
|
|
|
2487
|
+
#### objectCopy(entity, cache)
|
|
2381
2488
|
|
|
2382
|
-
|
|
2489
|
+
Created a new reference of the given argument
|
|
2383
2490
|
|
|
2384
2491
|
|
|
2385
|
-
#### value()
|
|
2386
2492
|
|
|
2387
|
-
Resolves statement and returns statement value
|
|
2388
2493
|
|
|
2494
|
+
##### Parameters
|
|
2389
2495
|
|
|
2496
|
+
| Name | Type | Description | |
|
|
2497
|
+
| ---- | ---- | ----------- | -------- |
|
|
2498
|
+
| entity | | The variable to be copied | |
|
|
2499
|
+
| cache | | | |
|
|
2390
2500
|
|
|
2391
2501
|
|
|
2392
2502
|
|
|
@@ -2394,47 +2504,55 @@ Resolves statement and returns statement value
|
|
|
2394
2504
|
##### Returns
|
|
2395
2505
|
|
|
2396
2506
|
|
|
2397
|
-
-
|
|
2507
|
+
- A new reference of the given argument
|
|
2398
2508
|
|
|
2399
2509
|
|
|
2400
2510
|
|
|
2401
|
-
#### valueAsAnchor()
|
|
2402
2511
|
|
|
2403
|
-
|
|
2512
|
+
### dist/general/object/omit.js
|
|
2404
2513
|
|
|
2405
2514
|
|
|
2515
|
+
#### omit(obj, props)
|
|
2406
2516
|
|
|
2517
|
+
return a new Object excluding attributes in _props_ list
|
|
2407
2518
|
|
|
2408
2519
|
|
|
2409
2520
|
|
|
2410
|
-
##### Returns
|
|
2411
2521
|
|
|
2522
|
+
##### Parameters
|
|
2412
2523
|
|
|
2413
|
-
|
|
2524
|
+
| Name | Type | Description | |
|
|
2525
|
+
| ---- | ---- | ----------- | -------- |
|
|
2526
|
+
| obj | `Object` | base object | |
|
|
2527
|
+
| props | `Array.<String>` | list of attribute to exclude | |
|
|
2414
2528
|
|
|
2415
2529
|
|
|
2416
2530
|
|
|
2417
|
-
#### _statementToRange() *private method*
|
|
2418
2531
|
|
|
2419
|
-
|
|
2532
|
+
##### Returns
|
|
2420
2533
|
|
|
2421
2534
|
|
|
2535
|
+
- `Object` clean object
|
|
2422
2536
|
|
|
2423
2537
|
|
|
2424
2538
|
|
|
2425
2539
|
|
|
2426
|
-
|
|
2540
|
+
### dist/general/object/pick.js
|
|
2427
2541
|
|
|
2428
2542
|
|
|
2429
|
-
|
|
2543
|
+
#### pick(baseObject, keys)
|
|
2430
2544
|
|
|
2545
|
+
return a new object just with attributes in _keys_ list
|
|
2431
2546
|
|
|
2432
2547
|
|
|
2433
|
-
#### _resolveAsThis() *private method*
|
|
2434
2548
|
|
|
2435
|
-
Apply 'this' cursor logic to statement
|
|
2436
2549
|
|
|
2550
|
+
##### Parameters
|
|
2437
2551
|
|
|
2552
|
+
| Name | Type | Description | |
|
|
2553
|
+
| ---- | ---- | ----------- | -------- |
|
|
2554
|
+
| baseObject | `Object` | base object | |
|
|
2555
|
+
| keys | `Array.<String>` | list of attributes to preserve | |
|
|
2438
2556
|
|
|
2439
2557
|
|
|
2440
2558
|
|
|
@@ -2442,45 +2560,44 @@ Apply 'this' cursor logic to statement
|
|
|
2442
2560
|
##### Returns
|
|
2443
2561
|
|
|
2444
2562
|
|
|
2445
|
-
- `
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
#### _resolveAsTheLast() *private method*
|
|
2563
|
+
- `Object` new object just with desired attributes
|
|
2450
2564
|
|
|
2451
|
-
Apply 'the last' cursor logic to statement
|
|
2452
2565
|
|
|
2453
2566
|
|
|
2454
2567
|
|
|
2568
|
+
### dist/general/object/serialize.js
|
|
2455
2569
|
|
|
2456
2570
|
|
|
2571
|
+
#### serialize(obj)
|
|
2457
2572
|
|
|
2458
|
-
|
|
2573
|
+
serialize object to url param
|
|
2459
2574
|
|
|
2460
2575
|
|
|
2461
|
-
- `AbsoluteStatement`
|
|
2462
2576
|
|
|
2463
2577
|
|
|
2578
|
+
##### Parameters
|
|
2464
2579
|
|
|
2465
|
-
|
|
2580
|
+
| Name | Type | Description | |
|
|
2581
|
+
| ---- | ---- | ----------- | -------- |
|
|
2582
|
+
| obj | | - Object to be serialized | |
|
|
2466
2583
|
|
|
2467
|
-
Apply 'the next' cursor logic to statement
|
|
2468
2584
|
|
|
2469
2585
|
|
|
2470
2586
|
|
|
2587
|
+
##### Returns
|
|
2471
2588
|
|
|
2472
2589
|
|
|
2590
|
+
- `Void`
|
|
2473
2591
|
|
|
2474
|
-
##### Returns
|
|
2475
2592
|
|
|
2476
2593
|
|
|
2477
|
-
- `AbsoluteStatement`
|
|
2478
2594
|
|
|
2595
|
+
### dist/qrvey/helpers/getColumnsLabel.js
|
|
2479
2596
|
|
|
2480
2597
|
|
|
2481
|
-
####
|
|
2598
|
+
#### getColumnLabels(column)
|
|
2482
2599
|
|
|
2483
|
-
|
|
2600
|
+
Get an string of the properties of the given column.
|
|
2484
2601
|
|
|
2485
2602
|
|
|
2486
2603
|
|
|
@@ -2489,8 +2606,7 @@ Replace '@now' token inside a string
|
|
|
2489
2606
|
|
|
2490
2607
|
| Name | Type | Description | |
|
|
2491
2608
|
| ---- | ---- | ----------- | -------- |
|
|
2492
|
-
|
|
|
2493
|
-
| now | `Date` | | |
|
|
2609
|
+
| column | | The column | |
|
|
2494
2610
|
|
|
2495
2611
|
|
|
2496
2612
|
|
|
@@ -2498,60 +2614,45 @@ Replace '@now' token inside a string
|
|
|
2498
2614
|
##### Returns
|
|
2499
2615
|
|
|
2500
2616
|
|
|
2501
|
-
-
|
|
2617
|
+
- an string with the property, aggregate or calculation label.
|
|
2502
2618
|
|
|
2503
2619
|
|
|
2504
2620
|
|
|
2505
|
-
#### convertRelativeToAbsolute(args)
|
|
2506
2621
|
|
|
2507
|
-
|
|
2622
|
+
### dist/services/api/getAllQrveys.api.js
|
|
2508
2623
|
|
|
2509
2624
|
|
|
2625
|
+
#### getAllQrveys(config, params)
|
|
2510
2626
|
|
|
2627
|
+
POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
|
|
2511
2628
|
|
|
2512
|
-
##### Parameters
|
|
2513
2629
|
|
|
2514
|
-
| Name | Type | Description | |
|
|
2515
|
-
| ---- | ---- | ----------- | -------- |
|
|
2516
|
-
| args | `RelativeToAbsoluteStruct` | | |
|
|
2517
2630
|
|
|
2518
2631
|
|
|
2632
|
+
##### Parameters
|
|
2519
2633
|
|
|
2634
|
+
| Name | Type | Description | |
|
|
2635
|
+
| ---- | ---- | ----------- | -------- |
|
|
2636
|
+
| config | | Configuration | |
|
|
2637
|
+
| params | | Object for getting precise data | |
|
|
2520
2638
|
|
|
2521
|
-
##### Examples
|
|
2522
2639
|
|
|
2523
|
-
```javascript
|
|
2524
|
-
pivot = '2021-03-03T12:30:40'
|
|
2525
|
-
unit = month
|
|
2526
|
-
steps = 2
|
|
2527
|
-
setTo = END
|
|
2528
|
-
resolverAsCalendar: true
|
|
2529
|
-
=> Returns '2021-05-31T23:59:59'
|
|
2530
|
-
```
|
|
2531
|
-
```javascript
|
|
2532
|
-
pivot = '2021-03-03T12:30:40'
|
|
2533
|
-
unit = month
|
|
2534
|
-
steps = -2
|
|
2535
|
-
setTo = START
|
|
2536
|
-
resolverAsCalendar: false
|
|
2537
|
-
=> Returns '2021-01-03T00:00:00'
|
|
2538
|
-
```
|
|
2539
2640
|
|
|
2540
2641
|
|
|
2541
2642
|
##### Returns
|
|
2542
2643
|
|
|
2543
2644
|
|
|
2544
|
-
- `
|
|
2645
|
+
- `Void`
|
|
2545
2646
|
|
|
2546
2647
|
|
|
2547
2648
|
|
|
2548
2649
|
|
|
2549
|
-
### dist/
|
|
2650
|
+
### dist/services/api/getDatasetColumns.api.js
|
|
2550
2651
|
|
|
2551
2652
|
|
|
2552
|
-
####
|
|
2653
|
+
#### getDatasetColumns(qrveyid)
|
|
2553
2654
|
|
|
2554
|
-
|
|
2655
|
+
Get a dataset by Qrvey ID
|
|
2555
2656
|
|
|
2556
2657
|
|
|
2557
2658
|
|
|
@@ -2560,44 +2661,25 @@ Resolve a list of relative statements according to operator
|
|
|
2560
2661
|
|
|
2561
2662
|
| Name | Type | Description | |
|
|
2562
2663
|
| ---- | ---- | ----------- | -------- |
|
|
2563
|
-
|
|
|
2564
|
-
| clock | `Date` | - Clock/time reference for relative date resolution | |
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
##### Examples
|
|
2664
|
+
| qrveyid | | The Qrvey ID | |
|
|
2570
2665
|
|
|
2571
|
-
```javascript
|
|
2572
|
-
Input:
|
|
2573
|
-
{
|
|
2574
|
-
"cursor": "the_next",
|
|
2575
|
-
"unit": "year",
|
|
2576
|
-
"number": 1,
|
|
2577
|
-
"includeCurrent": false,
|
|
2578
|
-
"isCalendarDate": false,
|
|
2579
|
-
"anchor": "03/05/2021"
|
|
2580
|
-
}
|
|
2581
2666
|
|
|
2582
|
-
Output:
|
|
2583
|
-
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
2584
|
-
```
|
|
2585
2667
|
|
|
2586
2668
|
|
|
2587
2669
|
##### Returns
|
|
2588
2670
|
|
|
2589
2671
|
|
|
2590
|
-
-
|
|
2672
|
+
- a promise
|
|
2591
2673
|
|
|
2592
2674
|
|
|
2593
2675
|
|
|
2594
2676
|
|
|
2595
|
-
### dist/
|
|
2677
|
+
### dist/services/api/getAllDatasets.api.js
|
|
2596
2678
|
|
|
2597
2679
|
|
|
2598
|
-
####
|
|
2680
|
+
#### getAllDatasets(qrveyids)
|
|
2599
2681
|
|
|
2600
|
-
Get
|
|
2682
|
+
Get a dataset list from a collection of Qrvey IDs
|
|
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
|
-
|
|
|
2691
|
+
| qrveyids | | Collection of Qrvey IDs | |
|
|
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
|
-
-
|
|
2699
|
+
- a promise
|
|
2618
2700
|
|
|
2619
2701
|
|
|
2620
2702
|
|
|
@@ -2757,12 +2839,12 @@ try to find this string as a variable on Windows object
|
|
|
2757
2839
|
|
|
2758
2840
|
|
|
2759
2841
|
|
|
2760
|
-
### dist/
|
|
2842
|
+
### dist/dates/relative/helpers/formatStatement.js
|
|
2761
2843
|
|
|
2762
2844
|
|
|
2763
|
-
####
|
|
2845
|
+
#### formatStatement(statement)
|
|
2764
2846
|
|
|
2765
|
-
|
|
2847
|
+
Build a proper relative date statement type
|
|
2766
2848
|
|
|
2767
2849
|
|
|
2768
2850
|
|
|
@@ -2771,7 +2853,7 @@ Get a dataset list from a collection of Qrvey IDs
|
|
|
2771
2853
|
|
|
2772
2854
|
| Name | Type | Description | |
|
|
2773
2855
|
| ---- | ---- | ----------- | -------- |
|
|
2774
|
-
|
|
|
2856
|
+
| statement | `RelativeStatement` | | |
|
|
2775
2857
|
|
|
2776
2858
|
|
|
2777
2859
|
|
|
@@ -2779,17 +2861,17 @@ Get a dataset list from a collection of Qrvey IDs
|
|
|
2779
2861
|
##### Returns
|
|
2780
2862
|
|
|
2781
2863
|
|
|
2782
|
-
-
|
|
2864
|
+
- `RelativeStatement`
|
|
2783
2865
|
|
|
2784
2866
|
|
|
2785
2867
|
|
|
2786
2868
|
|
|
2787
|
-
### dist/
|
|
2869
|
+
### dist/dates/relative/helpers/getStatementCase.js
|
|
2788
2870
|
|
|
2789
2871
|
|
|
2790
|
-
####
|
|
2872
|
+
#### getStatementCase(includeCurrent, isCalendarDate)
|
|
2791
2873
|
|
|
2792
|
-
|
|
2874
|
+
Returns a number/constant that identifies a relative date case
|
|
2793
2875
|
|
|
2794
2876
|
|
|
2795
2877
|
|
|
@@ -2798,8 +2880,8 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
|
|
|
2798
2880
|
|
|
2799
2881
|
| Name | Type | Description | |
|
|
2800
2882
|
| ---- | ---- | ----------- | -------- |
|
|
2801
|
-
|
|
|
2802
|
-
|
|
|
2883
|
+
| includeCurrent | `boolean` | | |
|
|
2884
|
+
| isCalendarDate | `boolean` | | |
|
|
2803
2885
|
|
|
2804
2886
|
|
|
2805
2887
|
|
|
@@ -2807,17 +2889,17 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
|
|
|
2807
2889
|
##### Returns
|
|
2808
2890
|
|
|
2809
2891
|
|
|
2810
|
-
- `
|
|
2892
|
+
- `number`
|
|
2811
2893
|
|
|
2812
2894
|
|
|
2813
2895
|
|
|
2814
2896
|
|
|
2815
|
-
### dist/
|
|
2897
|
+
### dist/dates/relative/helpers/parseDate.js
|
|
2816
2898
|
|
|
2817
2899
|
|
|
2818
|
-
####
|
|
2900
|
+
#### parseDate(date)
|
|
2819
2901
|
|
|
2820
|
-
|
|
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
|
-
|
|
|
2911
|
+
| date | `string` `Dayjs` `Date` | | |
|
|
2830
2912
|
|
|
2831
2913
|
|
|
2832
2914
|
|
|
@@ -2834,7 +2916,7 @@ Get a dataset by Qrvey ID
|
|
|
2834
2916
|
##### Returns
|
|
2835
2917
|
|
|
2836
2918
|
|
|
2837
|
-
-
|
|
2919
|
+
- `Dayjs` A dayjs date
|
|
2838
2920
|
|
|
2839
2921
|
|
|
2840
2922
|
|
|
@@ -3135,33 +3217,6 @@ Gets filters from the logic by the scopes hierarchy.
|
|
|
3135
3217
|
|
|
3136
3218
|
|
|
3137
3219
|
|
|
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 | |
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
##### Returns
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
- The filter builder config object
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
3220
|
### dist/filters/helpers/common/areFiltersEquals.js
|
|
3166
3221
|
|
|
3167
3222
|
|
|
@@ -3986,6 +4041,33 @@ Resolves the conditions by given params
|
|
|
3986
4041
|
|
|
3987
4042
|
|
|
3988
4043
|
|
|
4044
|
+
### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
|
|
4045
|
+
|
|
4046
|
+
|
|
4047
|
+
#### getFilterBuilderGeneralConfig(config)
|
|
4048
|
+
|
|
4049
|
+
Returns a filter builder config object by a any given config
|
|
4050
|
+
|
|
4051
|
+
|
|
4052
|
+
|
|
4053
|
+
|
|
4054
|
+
##### Parameters
|
|
4055
|
+
|
|
4056
|
+
| Name | Type | Description | |
|
|
4057
|
+
| ---- | ---- | ----------- | -------- |
|
|
4058
|
+
| config | | any config object | |
|
|
4059
|
+
|
|
4060
|
+
|
|
4061
|
+
|
|
4062
|
+
|
|
4063
|
+
##### Returns
|
|
4064
|
+
|
|
4065
|
+
|
|
4066
|
+
- The filter builder config object
|
|
4067
|
+
|
|
4068
|
+
|
|
4069
|
+
|
|
4070
|
+
|
|
3989
4071
|
### dist/filters/helpers/ui/excludeUIFiltersByAggregate.js
|
|
3990
4072
|
|
|
3991
4073
|
|
|
@@ -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` | | |
|
|
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` | | |
|
|
4283
|
-
| isCalendarDate | `boolean` | | |
|
|
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` | | |
|
|
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).*
|