@qrvey/utils 1.2.9-31 → 1.2.9-34
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 +847 -847
- package/dist/cjs/filters/adapters/adaptFilterValues.js +1 -1
- package/dist/cjs/filters/adapters/flatUIToFD.js +4 -0
- package/dist/cjs/filters/adapters/flatUIToOldLogic.js +1 -1
- package/dist/cjs/filters/adapters/flatUIToUI.js +4 -0
- package/dist/cjs/filters/helpers/backend/getBackendProperty.js +1 -1
- package/dist/cjs/filters/helpers/backend/getBackendValues.js +1 -1
- package/dist/cjs/filters/interfaces/common/IFSValue.d.ts +1 -1
- package/dist/cjs/filters/interfaces/ui/IFUValue.d.ts +1 -1
- package/dist/cjs/format/format.js +4 -2
- package/dist/cjs/format/localization.js +2 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
- package/dist/cjs/qrvey/helpers/transformValue.js +3 -0
- package/dist/filters/adapters/adaptFilterValues.js +1 -1
- package/dist/filters/adapters/flatUIToFD.js +4 -0
- package/dist/filters/adapters/flatUIToOldLogic.js +1 -1
- package/dist/filters/adapters/flatUIToUI.js +4 -0
- package/dist/filters/helpers/backend/getBackendProperty.js +1 -1
- package/dist/filters/helpers/backend/getBackendValues.js +1 -1
- package/dist/filters/interfaces/common/IFSValue.d.ts +1 -1
- package/dist/filters/interfaces/ui/IFUValue.d.ts +1 -1
- package/dist/format/format.js +4 -2
- package/dist/format/localization.js +2 -1
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
- package/dist/qrvey/helpers/transformValue.js +3 -0
- package/package.json +1 -1
- package/prepareToPublish.js +2 -1
- package/src/filters/adapters/adaptFilterValues.ts +1 -1
- package/src/filters/adapters/flatUIToFD.ts +5 -0
- package/src/filters/adapters/flatUIToOldLogic.ts +1 -1
- package/src/filters/adapters/flatUIToUI.ts +5 -0
- package/src/filters/helpers/backend/getBackendProperty.ts +2 -1
- package/src/filters/helpers/backend/getBackendValues.ts +1 -1
- package/src/filters/interfaces/common/IFSValue.ts +1 -1
- package/src/filters/interfaces/ui/IFUValue.ts +1 -1
- package/src/format/format.ts +3 -2
- package/src/format/localization.ts +2 -1
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.ts +2 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.ts +2 -0
- package/src/qrvey/helpers/transformValue.ts +3 -0
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-34*
|
|
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/dates/
|
|
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 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
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,17 +104,17 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
103
104
|
##### Returns
|
|
104
105
|
|
|
105
106
|
|
|
106
|
-
-
|
|
107
|
+
- a Date object, milisecond time or the same value if date format does not match.
|
|
107
108
|
|
|
108
109
|
|
|
109
110
|
|
|
110
111
|
|
|
111
|
-
### dist/dates/
|
|
112
|
+
### dist/dates/helpers/getDateFormatByProperty.js
|
|
112
113
|
|
|
113
114
|
|
|
114
|
-
####
|
|
115
|
+
#### getDateFormatByProperty(property)
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
Gets the date format by the given property
|
|
117
118
|
|
|
118
119
|
|
|
119
120
|
|
|
@@ -122,8 +123,7 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
122
123
|
|
|
123
124
|
| Name | Type | Description | |
|
|
124
125
|
| ---- | ---- | ----------- | -------- |
|
|
125
|
-
|
|
|
126
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
126
|
+
| property | | The Column Property | |
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
@@ -131,17 +131,17 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
131
131
|
##### Returns
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
- The date
|
|
134
|
+
- The date format
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
### dist/dates/
|
|
139
|
+
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
####
|
|
142
|
+
#### getDateFormatRegularExpressionInArray(dateFormat)
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
Gets an array of regular expressions by the given date format
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
|
|
@@ -150,8 +150,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
150
150
|
|
|
151
151
|
| Name | Type | Description | |
|
|
152
152
|
| ---- | ---- | ----------- | -------- |
|
|
153
|
-
|
|
|
154
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
153
|
+
| dateFormat | | the date format | |
|
|
155
154
|
|
|
156
155
|
|
|
157
156
|
|
|
@@ -159,17 +158,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
159
158
|
##### Returns
|
|
160
159
|
|
|
161
160
|
|
|
162
|
-
-
|
|
161
|
+
- an array of regular expressions
|
|
163
162
|
|
|
164
163
|
|
|
165
164
|
|
|
166
165
|
|
|
167
|
-
### dist/dates/
|
|
166
|
+
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
168
167
|
|
|
169
168
|
|
|
170
|
-
####
|
|
169
|
+
#### getSeparatorByDateFormat(format)
|
|
171
170
|
|
|
172
|
-
|
|
171
|
+
Gets the separator of the date format
|
|
173
172
|
|
|
174
173
|
|
|
175
174
|
|
|
@@ -178,8 +177,7 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
178
177
|
|
|
179
178
|
| Name | Type | Description | |
|
|
180
179
|
| ---- | ---- | ----------- | -------- |
|
|
181
|
-
|
|
|
182
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
180
|
+
| format | | the date format | |
|
|
183
181
|
|
|
184
182
|
|
|
185
183
|
|
|
@@ -187,17 +185,18 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
187
185
|
##### Returns
|
|
188
186
|
|
|
189
187
|
|
|
190
|
-
-
|
|
188
|
+
- a separator string
|
|
191
189
|
|
|
192
190
|
|
|
193
191
|
|
|
194
192
|
|
|
195
|
-
### dist/dates/
|
|
193
|
+
### dist/dates/helpers/getWeek.js
|
|
196
194
|
|
|
197
195
|
|
|
198
|
-
####
|
|
196
|
+
#### getWeek(date)
|
|
199
197
|
|
|
200
|
-
|
|
198
|
+
Gets the week number of the year
|
|
199
|
+
Additionally, the month and the year
|
|
201
200
|
|
|
202
201
|
|
|
203
202
|
|
|
@@ -206,8 +205,7 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
206
205
|
|
|
207
206
|
| Name | Type | Description | |
|
|
208
207
|
| ---- | ---- | ----------- | -------- |
|
|
209
|
-
|
|
|
210
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
208
|
+
| date | | the date object | |
|
|
211
209
|
|
|
212
210
|
|
|
213
211
|
|
|
@@ -215,17 +213,20 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
215
213
|
##### Returns
|
|
216
214
|
|
|
217
215
|
|
|
218
|
-
-
|
|
216
|
+
- an object with the week, month and year.
|
|
219
217
|
|
|
220
218
|
|
|
221
219
|
|
|
222
220
|
|
|
223
|
-
### dist/dates/helpers/
|
|
221
|
+
### dist/dates/helpers/validateDate.js
|
|
224
222
|
|
|
225
223
|
|
|
226
|
-
####
|
|
224
|
+
#### validateDate(date, format)
|
|
227
225
|
|
|
228
|
-
|
|
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
|
|
229
230
|
|
|
230
231
|
|
|
231
232
|
|
|
@@ -234,9 +235,8 @@ Gets a Date Object instance by a Date format
|
|
|
234
235
|
|
|
235
236
|
| Name | Type | Description | |
|
|
236
237
|
| ---- | ---- | ----------- | -------- |
|
|
237
|
-
| date | | String
|
|
238
|
-
| format | |
|
|
239
|
-
| time | | flag to convert the formatted date to miliseconds | |
|
|
238
|
+
| date | | String of date | |
|
|
239
|
+
| format | | String of the format to validate | |
|
|
240
240
|
|
|
241
241
|
|
|
242
242
|
|
|
@@ -244,17 +244,17 @@ Gets a Date Object instance by a Date format
|
|
|
244
244
|
##### Returns
|
|
245
245
|
|
|
246
246
|
|
|
247
|
-
-
|
|
247
|
+
- True if it is valid or not. Undefined if date is undefined
|
|
248
248
|
|
|
249
249
|
|
|
250
250
|
|
|
251
251
|
|
|
252
|
-
### dist/dates/helpers/
|
|
252
|
+
### dist/dates/helpers/validateDateByDateFormat.js
|
|
253
253
|
|
|
254
254
|
|
|
255
|
-
####
|
|
255
|
+
#### validateDateByDateFormat(date, dateForma)
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
Validates the given string as Date by its date format.
|
|
258
258
|
|
|
259
259
|
|
|
260
260
|
|
|
@@ -263,7 +263,8 @@ Gets the date format by the given property
|
|
|
263
263
|
|
|
264
264
|
| Name | Type | Description | |
|
|
265
265
|
| ---- | ---- | ----------- | -------- |
|
|
266
|
-
|
|
|
266
|
+
| date | | a string to validate as date form | |
|
|
267
|
+
| dateForma | | the format of the date to validate the string | |
|
|
267
268
|
|
|
268
269
|
|
|
269
270
|
|
|
@@ -271,17 +272,17 @@ Gets the date format by the given property
|
|
|
271
272
|
##### Returns
|
|
272
273
|
|
|
273
274
|
|
|
274
|
-
-
|
|
275
|
+
- true: the string is a valida date
|
|
275
276
|
|
|
276
277
|
|
|
277
278
|
|
|
278
279
|
|
|
279
|
-
### dist/dates/
|
|
280
|
+
### dist/dates/adapters/mdyDateToDate.js
|
|
280
281
|
|
|
281
282
|
|
|
282
|
-
####
|
|
283
|
+
#### mdyDateToDate(monthYearDate, time)
|
|
283
284
|
|
|
284
|
-
|
|
285
|
+
Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
285
286
|
|
|
286
287
|
|
|
287
288
|
|
|
@@ -290,7 +291,8 @@ Gets an array of regular expressions by the given date format
|
|
|
290
291
|
|
|
291
292
|
| Name | Type | Description | |
|
|
292
293
|
| ---- | ---- | ----------- | -------- |
|
|
293
|
-
|
|
|
294
|
+
| monthYearDate | | String of [mm/dd/yyyy] date | |
|
|
295
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
294
296
|
|
|
295
297
|
|
|
296
298
|
|
|
@@ -298,17 +300,17 @@ Gets an array of regular expressions by the given date format
|
|
|
298
300
|
##### Returns
|
|
299
301
|
|
|
300
302
|
|
|
301
|
-
-
|
|
303
|
+
- The date object or the date in milliseconds
|
|
302
304
|
|
|
303
305
|
|
|
304
306
|
|
|
305
307
|
|
|
306
|
-
### dist/dates/
|
|
308
|
+
### dist/dates/adapters/monthYearToDate.js
|
|
307
309
|
|
|
308
310
|
|
|
309
|
-
####
|
|
311
|
+
#### monthYearToDate(monthYearDate, time)
|
|
310
312
|
|
|
311
|
-
|
|
313
|
+
Transforms String Date from a [Month Year] format to Date object.
|
|
312
314
|
|
|
313
315
|
|
|
314
316
|
|
|
@@ -317,7 +319,8 @@ Gets the separator of the date format
|
|
|
317
319
|
|
|
318
320
|
| Name | Type | Description | |
|
|
319
321
|
| ---- | ---- | ----------- | -------- |
|
|
320
|
-
|
|
|
322
|
+
| monthYearDate | | String of [Month Year] date | |
|
|
323
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
321
324
|
|
|
322
325
|
|
|
323
326
|
|
|
@@ -325,18 +328,17 @@ Gets the separator of the date format
|
|
|
325
328
|
##### Returns
|
|
326
329
|
|
|
327
330
|
|
|
328
|
-
-
|
|
331
|
+
- The date object or the date in milliseconds
|
|
329
332
|
|
|
330
333
|
|
|
331
334
|
|
|
332
335
|
|
|
333
|
-
### dist/dates/
|
|
336
|
+
### dist/dates/adapters/quarterYearToDate.js
|
|
334
337
|
|
|
335
338
|
|
|
336
|
-
####
|
|
339
|
+
#### quarterYearToDate(quarterYearDate, time)
|
|
337
340
|
|
|
338
|
-
|
|
339
|
-
Additionally, the month and the year
|
|
341
|
+
Transforms String Date from a [Quarter Year] format to Date object.
|
|
340
342
|
|
|
341
343
|
|
|
342
344
|
|
|
@@ -345,7 +347,8 @@ Additionally, the month and the year
|
|
|
345
347
|
|
|
346
348
|
| Name | Type | Description | |
|
|
347
349
|
| ---- | ---- | ----------- | -------- |
|
|
348
|
-
|
|
|
350
|
+
| quarterYearDate | | String of [Quarter Year] date | |
|
|
351
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
349
352
|
|
|
350
353
|
|
|
351
354
|
|
|
@@ -353,20 +356,17 @@ Additionally, the month and the year
|
|
|
353
356
|
##### Returns
|
|
354
357
|
|
|
355
358
|
|
|
356
|
-
-
|
|
359
|
+
- The date object or the date in milliseconds
|
|
357
360
|
|
|
358
361
|
|
|
359
362
|
|
|
360
363
|
|
|
361
|
-
### dist/dates/
|
|
364
|
+
### dist/dates/adapters/weekYearToDate.js
|
|
362
365
|
|
|
363
366
|
|
|
364
|
-
####
|
|
367
|
+
#### weekYearToDate(date, time)
|
|
365
368
|
|
|
366
|
-
|
|
367
|
-
- If the string is a token label, the function lets it pass.
|
|
368
|
-
- Otherwise depends of the format
|
|
369
|
-
- Some escenarios the string is a mix of token labels and dates
|
|
369
|
+
Transforms String Date from a [Week Year] format to Date object.
|
|
370
370
|
|
|
371
371
|
|
|
372
372
|
|
|
@@ -375,8 +375,8 @@ Validate a string date depending on giving format
|
|
|
375
375
|
|
|
376
376
|
| Name | Type | Description | |
|
|
377
377
|
| ---- | ---- | ----------- | -------- |
|
|
378
|
-
| date | | String of date | |
|
|
379
|
-
|
|
|
378
|
+
| date | | String of [Week Year] date | |
|
|
379
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
380
380
|
|
|
381
381
|
|
|
382
382
|
|
|
@@ -384,17 +384,17 @@ Validate a string date depending on giving format
|
|
|
384
384
|
##### Returns
|
|
385
385
|
|
|
386
386
|
|
|
387
|
-
-
|
|
387
|
+
- The date object or the date in milliseconds
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
|
|
391
391
|
|
|
392
|
-
### dist/dates/
|
|
392
|
+
### dist/dates/adapters/yearToDate.js
|
|
393
393
|
|
|
394
394
|
|
|
395
|
-
####
|
|
395
|
+
#### yearToDate(yearDate, time)
|
|
396
396
|
|
|
397
|
-
|
|
397
|
+
Transforms String Date from a [Year] format to Date object.
|
|
398
398
|
|
|
399
399
|
|
|
400
400
|
|
|
@@ -403,8 +403,8 @@ Validates the given string as Date by its date format.
|
|
|
403
403
|
|
|
404
404
|
| Name | Type | Description | |
|
|
405
405
|
| ---- | ---- | ----------- | -------- |
|
|
406
|
-
|
|
|
407
|
-
|
|
|
406
|
+
| yearDate | | String of [Year] date | |
|
|
407
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
408
408
|
|
|
409
409
|
|
|
410
410
|
|
|
@@ -412,7 +412,65 @@ Validates the given string as Date by its date format.
|
|
|
412
412
|
##### Returns
|
|
413
413
|
|
|
414
414
|
|
|
415
|
-
-
|
|
415
|
+
- The date object or the date in milliseconds
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
### dist/dates/range/getDateRange.js
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
#### getDateRange(value, dateGroupLabel, withTime)
|
|
424
|
+
|
|
425
|
+
Get date range object from a string date value
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
##### Parameters
|
|
431
|
+
|
|
432
|
+
| Name | Type | Description | |
|
|
433
|
+
| ---- | ---- | ----------- | -------- |
|
|
434
|
+
| value | `String` | string date value | |
|
|
435
|
+
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
436
|
+
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
##### Examples
|
|
442
|
+
|
|
443
|
+
```javascript
|
|
444
|
+
// 1) Year:
|
|
445
|
+
getDateRange('2020', 'YEAR');
|
|
446
|
+
// Will return:
|
|
447
|
+
{
|
|
448
|
+
from: '01/01/2020 00:00:00',
|
|
449
|
+
to: '12/31/2020 23:59:59'
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// 2) Quarter:
|
|
453
|
+
getDateRange('Q3 2020', 'QUARTER');
|
|
454
|
+
// Will return:
|
|
455
|
+
{
|
|
456
|
+
from: '07/01/2020 00:00:00',
|
|
457
|
+
to: '09/30/2020 23:59:59'
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// 3) Month:
|
|
461
|
+
getDateRange('Oct 2020', 'MONTH');
|
|
462
|
+
// Will return:
|
|
463
|
+
{
|
|
464
|
+
from: '10/01/2020 00:00:00',
|
|
465
|
+
to: '10/31/2020 23:59:59'
|
|
466
|
+
}
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
##### Returns
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
- `Object` an object with the date range with two string date properties: from and to
|
|
416
474
|
|
|
417
475
|
|
|
418
476
|
|
|
@@ -630,12 +688,12 @@ Output:
|
|
|
630
688
|
|
|
631
689
|
|
|
632
690
|
|
|
633
|
-
### dist/
|
|
691
|
+
### dist/general/array/delete.js
|
|
634
692
|
|
|
635
693
|
|
|
636
|
-
####
|
|
694
|
+
#### ArrayDelete(array, index)
|
|
637
695
|
|
|
638
|
-
|
|
696
|
+
Inmutable Array Item deletion
|
|
639
697
|
|
|
640
698
|
|
|
641
699
|
|
|
@@ -644,56 +702,29 @@ Get date range object from a string date value
|
|
|
644
702
|
|
|
645
703
|
| Name | Type | Description | |
|
|
646
704
|
| ---- | ---- | ----------- | -------- |
|
|
647
|
-
|
|
|
648
|
-
|
|
|
649
|
-
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
##### Examples
|
|
655
|
-
|
|
656
|
-
```javascript
|
|
657
|
-
// 1) Year:
|
|
658
|
-
getDateRange('2020', 'YEAR');
|
|
659
|
-
// Will return:
|
|
660
|
-
{
|
|
661
|
-
from: '01/01/2020 00:00:00',
|
|
662
|
-
to: '12/31/2020 23:59:59'
|
|
663
|
-
}
|
|
705
|
+
| array | `Array` | a collection of items to delete | |
|
|
706
|
+
| index | `Number` | the position of the item to delete | |
|
|
664
707
|
|
|
665
|
-
// 2) Quarter:
|
|
666
|
-
getDateRange('Q3 2020', 'QUARTER');
|
|
667
|
-
// Will return:
|
|
668
|
-
{
|
|
669
|
-
from: '07/01/2020 00:00:00',
|
|
670
|
-
to: '09/30/2020 23:59:59'
|
|
671
|
-
}
|
|
672
708
|
|
|
673
|
-
// 3) Month:
|
|
674
|
-
getDateRange('Oct 2020', 'MONTH');
|
|
675
|
-
// Will return:
|
|
676
|
-
{
|
|
677
|
-
from: '10/01/2020 00:00:00',
|
|
678
|
-
to: '10/31/2020 23:59:59'
|
|
679
|
-
}
|
|
680
|
-
```
|
|
681
709
|
|
|
682
710
|
|
|
683
711
|
##### Returns
|
|
684
712
|
|
|
685
713
|
|
|
686
|
-
-
|
|
714
|
+
- a new Array or the given parameter when is empty or not an array
|
|
687
715
|
|
|
688
716
|
|
|
689
717
|
|
|
690
718
|
|
|
691
|
-
### dist/
|
|
719
|
+
### dist/general/array/filterNestedTree.js
|
|
692
720
|
|
|
693
721
|
|
|
694
|
-
####
|
|
722
|
+
#### filterNestedTree(arr, childArrKey, condition)
|
|
695
723
|
|
|
696
|
-
|
|
724
|
+
Filters a nested tree array by a custom condition on the last child node
|
|
725
|
+
- If the given arguments are not valid, the function returns the first argument.
|
|
726
|
+
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
727
|
+
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
697
728
|
|
|
698
729
|
|
|
699
730
|
|
|
@@ -702,8 +733,9 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
702
733
|
|
|
703
734
|
| Name | Type | Description | |
|
|
704
735
|
| ---- | ---- | ----------- | -------- |
|
|
705
|
-
|
|
|
706
|
-
|
|
|
736
|
+
| arr | | nested tree array | |
|
|
737
|
+
| childArrKey | | property representing the children array on the nested tree | |
|
|
738
|
+
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
707
739
|
|
|
708
740
|
|
|
709
741
|
|
|
@@ -711,13 +743,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
711
743
|
##### Returns
|
|
712
744
|
|
|
713
745
|
|
|
714
|
-
-
|
|
746
|
+
- array filtered
|
|
715
747
|
|
|
716
748
|
|
|
717
749
|
|
|
718
|
-
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
719
750
|
|
|
720
|
-
|
|
751
|
+
### dist/general/array/flattenDeep.js
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
#### flattenDeep(arr)
|
|
755
|
+
|
|
756
|
+
Flat deeply an array
|
|
721
757
|
|
|
722
758
|
|
|
723
759
|
|
|
@@ -726,8 +762,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
726
762
|
|
|
727
763
|
| Name | Type | Description | |
|
|
728
764
|
| ---- | ---- | ----------- | -------- |
|
|
729
|
-
|
|
|
730
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
765
|
+
| arr | | Array to flat deeply | |
|
|
731
766
|
|
|
732
767
|
|
|
733
768
|
|
|
@@ -735,17 +770,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
735
770
|
##### Returns
|
|
736
771
|
|
|
737
772
|
|
|
738
|
-
-
|
|
773
|
+
- flatten array
|
|
739
774
|
|
|
740
775
|
|
|
741
776
|
|
|
742
777
|
|
|
743
|
-
### dist/
|
|
778
|
+
### dist/general/array/getFirstIndexFromArray.js
|
|
744
779
|
|
|
745
780
|
|
|
746
|
-
####
|
|
781
|
+
#### getFirstIndexFromArray(array, callback)
|
|
747
782
|
|
|
748
|
-
|
|
783
|
+
Gets the first index from the array by a callback condition
|
|
749
784
|
|
|
750
785
|
|
|
751
786
|
|
|
@@ -754,7 +789,8 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
754
789
|
|
|
755
790
|
| Name | Type | Description | |
|
|
756
791
|
| ---- | ---- | ----------- | -------- |
|
|
757
|
-
|
|
|
792
|
+
| array | | | |
|
|
793
|
+
| callback | | function callback | |
|
|
758
794
|
|
|
759
795
|
|
|
760
796
|
|
|
@@ -762,13 +798,17 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
762
798
|
##### Returns
|
|
763
799
|
|
|
764
800
|
|
|
765
|
-
-
|
|
801
|
+
- the first index of the array. -1 when the condition is not satisfied
|
|
766
802
|
|
|
767
803
|
|
|
768
804
|
|
|
769
|
-
#### getLogicBodyFromFD21(filterData)
|
|
770
805
|
|
|
771
|
-
|
|
806
|
+
### dist/general/array/getLastIndexFromArray.js
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
#### getLastIndexFromArray(array, callback)
|
|
810
|
+
|
|
811
|
+
Gets the last index from the array by a callback condition
|
|
772
812
|
|
|
773
813
|
|
|
774
814
|
|
|
@@ -777,7 +817,8 @@ Gets the logic body
|
|
|
777
817
|
|
|
778
818
|
| Name | Type | Description | |
|
|
779
819
|
| ---- | ---- | ----------- | -------- |
|
|
780
|
-
|
|
|
820
|
+
| array | | | |
|
|
821
|
+
| callback | | function callback | |
|
|
781
822
|
|
|
782
823
|
|
|
783
824
|
|
|
@@ -785,17 +826,17 @@ Gets the logic body
|
|
|
785
826
|
##### Returns
|
|
786
827
|
|
|
787
828
|
|
|
788
|
-
-
|
|
829
|
+
- the last index of the array. -1 when the condition is not satisfied
|
|
789
830
|
|
|
790
831
|
|
|
791
832
|
|
|
792
833
|
|
|
793
|
-
### dist/
|
|
834
|
+
### dist/general/function/debounce.js
|
|
794
835
|
|
|
795
836
|
|
|
796
|
-
####
|
|
837
|
+
#### debounce(fn, time)
|
|
797
838
|
|
|
798
|
-
|
|
839
|
+
Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
|
|
799
840
|
|
|
800
841
|
|
|
801
842
|
|
|
@@ -804,8 +845,8 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
804
845
|
|
|
805
846
|
| Name | Type | Description | |
|
|
806
847
|
| ---- | ---- | ----------- | -------- |
|
|
807
|
-
|
|
|
808
|
-
|
|
|
848
|
+
| fn | `Function` | original Function | |
|
|
849
|
+
| time | `Number` | default 500ms | |
|
|
809
850
|
|
|
810
851
|
|
|
811
852
|
|
|
@@ -813,13 +854,17 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
813
854
|
##### Returns
|
|
814
855
|
|
|
815
856
|
|
|
816
|
-
-
|
|
857
|
+
- `Function` debounced functions
|
|
817
858
|
|
|
818
859
|
|
|
819
860
|
|
|
820
|
-
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
821
861
|
|
|
822
|
-
|
|
862
|
+
### dist/general/function/throttled.js
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
#### throttled(fn, time)
|
|
866
|
+
|
|
867
|
+
Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
823
868
|
|
|
824
869
|
|
|
825
870
|
|
|
@@ -828,10 +873,8 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
828
873
|
|
|
829
874
|
| Name | Type | Description | |
|
|
830
875
|
| ---- | ---- | ----------- | -------- |
|
|
831
|
-
|
|
|
832
|
-
|
|
|
833
|
-
| version | | The version of the filter structure | |
|
|
834
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
876
|
+
| fn | `Function` | original Function | |
|
|
877
|
+
| time | `Number` | default 500ms | |
|
|
835
878
|
|
|
836
879
|
|
|
837
880
|
|
|
@@ -839,17 +882,18 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
839
882
|
##### Returns
|
|
840
883
|
|
|
841
884
|
|
|
842
|
-
-
|
|
885
|
+
- `Function` throttled function
|
|
843
886
|
|
|
844
887
|
|
|
845
888
|
|
|
846
889
|
|
|
847
|
-
### dist/
|
|
890
|
+
### dist/general/object/cloneDeep.js
|
|
848
891
|
|
|
849
892
|
|
|
850
|
-
####
|
|
893
|
+
#### cloneDeep(obj)
|
|
851
894
|
|
|
852
|
-
|
|
895
|
+
A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
|
|
896
|
+
Not to use this function with inner objects and functions
|
|
853
897
|
|
|
854
898
|
|
|
855
899
|
|
|
@@ -858,7 +902,7 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
858
902
|
|
|
859
903
|
| Name | Type | Description | |
|
|
860
904
|
| ---- | ---- | ----------- | -------- |
|
|
861
|
-
|
|
|
905
|
+
| obj | | The object | |
|
|
862
906
|
|
|
863
907
|
|
|
864
908
|
|
|
@@ -866,13 +910,21 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
866
910
|
##### Returns
|
|
867
911
|
|
|
868
912
|
|
|
869
|
-
-
|
|
913
|
+
- The new reference object or the given object if the parsing is incorrect or empty
|
|
870
914
|
|
|
871
915
|
|
|
872
916
|
|
|
873
|
-
#### UI21ToFD(uFilterData, version)
|
|
874
917
|
|
|
875
|
-
|
|
918
|
+
### dist/general/object/get.js
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
#### _get(baseObject, path, defaultValue)
|
|
922
|
+
|
|
923
|
+
Like lodash _.get.
|
|
924
|
+
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
925
|
+
|
|
926
|
+
Empty arrays and empty objects are returned but the defaultValue is not
|
|
927
|
+
Undefined and null values will return the defaultValue.
|
|
876
928
|
|
|
877
929
|
|
|
878
930
|
|
|
@@ -881,26 +933,59 @@ Builds the Fitler Data structure from UI filter data
|
|
|
881
933
|
|
|
882
934
|
| Name | Type | Description | |
|
|
883
935
|
| ---- | ---- | ----------- | -------- |
|
|
884
|
-
|
|
|
885
|
-
|
|
|
936
|
+
| baseObject | | The object to query | |
|
|
937
|
+
| path | | The string path or collection of string paths of the property to get. | |
|
|
938
|
+
| defaultValue | | The value returned for undefined resolved values. | |
|
|
939
|
+
|
|
886
940
|
|
|
887
941
|
|
|
888
942
|
|
|
943
|
+
##### Examples
|
|
944
|
+
|
|
945
|
+
```javascript
|
|
946
|
+
// returns 'Hello'
|
|
947
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
948
|
+
```
|
|
949
|
+
```javascript
|
|
950
|
+
// returns 'A simple Hello'
|
|
951
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
952
|
+
```
|
|
953
|
+
```javascript
|
|
954
|
+
// returns 'Hello Again'
|
|
955
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
956
|
+
```
|
|
957
|
+
```javascript
|
|
958
|
+
// returns 'Hello 2'
|
|
959
|
+
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
960
|
+
```
|
|
961
|
+
```javascript
|
|
962
|
+
// returns 'Hello Again'
|
|
963
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
964
|
+
```
|
|
965
|
+
|
|
889
966
|
|
|
890
967
|
##### Returns
|
|
891
968
|
|
|
892
969
|
|
|
893
|
-
-
|
|
970
|
+
- the resolved value.
|
|
894
971
|
|
|
895
972
|
|
|
896
973
|
|
|
897
974
|
|
|
898
|
-
### dist/
|
|
975
|
+
### dist/general/object/getAttribute.js
|
|
899
976
|
|
|
900
977
|
|
|
901
|
-
####
|
|
978
|
+
#### getAttribute(obj, key)
|
|
902
979
|
|
|
903
|
-
|
|
980
|
+
Searchs for properties in different case styles such as: lower, upper, camel and pascal
|
|
981
|
+
- To optimize the searching, it is required a key in a snake_case style
|
|
982
|
+
- List of cases that do not match
|
|
983
|
+
-- From lower to snake case
|
|
984
|
+
-- From upper to snake case
|
|
985
|
+
-- From lower to camel case
|
|
986
|
+
-- From upper to camel case
|
|
987
|
+
-- From lower to pascal case
|
|
988
|
+
-- From upper to pascal case
|
|
904
989
|
|
|
905
990
|
|
|
906
991
|
|
|
@@ -909,22 +994,33 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
909
994
|
|
|
910
995
|
| Name | Type | Description | |
|
|
911
996
|
| ---- | ---- | ----------- | -------- |
|
|
912
|
-
|
|
|
913
|
-
|
|
|
997
|
+
| obj | `object` | object to look for | |
|
|
998
|
+
| key | `string` | String attribute in snake_case style | |
|
|
999
|
+
|
|
914
1000
|
|
|
915
1001
|
|
|
916
1002
|
|
|
1003
|
+
##### Examples
|
|
1004
|
+
|
|
1005
|
+
```javascript
|
|
1006
|
+
getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
1007
|
+
```
|
|
1008
|
+
|
|
917
1009
|
|
|
918
1010
|
##### Returns
|
|
919
1011
|
|
|
920
1012
|
|
|
921
|
-
-
|
|
1013
|
+
- `Void`
|
|
922
1014
|
|
|
923
1015
|
|
|
924
1016
|
|
|
925
|
-
#### UI21ToFlatUI(scopes)
|
|
926
1017
|
|
|
927
|
-
|
|
1018
|
+
### dist/general/object/hasProperty.js
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
#### _hasProperty(obj, property)
|
|
1022
|
+
|
|
1023
|
+
Use the hasOwnProperty in order to verify if the given property exists in the object.
|
|
928
1024
|
|
|
929
1025
|
|
|
930
1026
|
|
|
@@ -933,26 +1029,38 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
933
1029
|
|
|
934
1030
|
| Name | Type | Description | |
|
|
935
1031
|
| ---- | ---- | ----------- | -------- |
|
|
936
|
-
|
|
|
1032
|
+
| obj | `object` | an object | |
|
|
1033
|
+
| property | `string` | String to verify if exists in the object as property | |
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
##### Examples
|
|
937
1039
|
|
|
1040
|
+
```javascript
|
|
1041
|
+
const prop = 'prop2'
|
|
1042
|
+
const obj1 = { prop1: 'hello', prop2: 'world'}
|
|
1043
|
+
_hasProperty(ob1, prop1) // true
|
|
938
1044
|
|
|
1045
|
+
const obj2 = { prop1: 'hello world' }
|
|
1046
|
+
_hasProperty(ob1, prop2) // false
|
|
1047
|
+
```
|
|
939
1048
|
|
|
940
1049
|
|
|
941
1050
|
##### Returns
|
|
942
1051
|
|
|
943
1052
|
|
|
944
|
-
-
|
|
1053
|
+
- True if the object has the given property; otherwise, false.
|
|
945
1054
|
|
|
946
1055
|
|
|
947
1056
|
|
|
948
1057
|
|
|
949
|
-
### dist/
|
|
1058
|
+
### dist/general/object/isObject.js
|
|
950
1059
|
|
|
951
1060
|
|
|
952
|
-
####
|
|
1061
|
+
#### isObject(obj)
|
|
953
1062
|
|
|
954
|
-
|
|
955
|
-
Get the new property base on the old date grouping properties
|
|
1063
|
+
Checks if the given argument is an object type
|
|
956
1064
|
|
|
957
1065
|
|
|
958
1066
|
|
|
@@ -961,7 +1069,7 @@ Get the new property base on the old date grouping properties
|
|
|
961
1069
|
|
|
962
1070
|
| Name | Type | Description | |
|
|
963
1071
|
| ---- | ---- | ----------- | -------- |
|
|
964
|
-
|
|
|
1072
|
+
| obj | | the variable to check | |
|
|
965
1073
|
|
|
966
1074
|
|
|
967
1075
|
|
|
@@ -969,17 +1077,18 @@ Get the new property base on the old date grouping properties
|
|
|
969
1077
|
##### Returns
|
|
970
1078
|
|
|
971
1079
|
|
|
972
|
-
-
|
|
1080
|
+
- True: It is an object; False: It is not.
|
|
973
1081
|
|
|
974
1082
|
|
|
975
1083
|
|
|
976
1084
|
|
|
977
|
-
### dist/
|
|
1085
|
+
### dist/general/object/mapValues.js
|
|
978
1086
|
|
|
979
1087
|
|
|
980
|
-
####
|
|
1088
|
+
#### mapValues(baseObject, iteratee)
|
|
981
1089
|
|
|
982
|
-
|
|
1090
|
+
Invoke iteratee (function) for each object key-value pair
|
|
1091
|
+
and return a mapped object
|
|
983
1092
|
|
|
984
1093
|
|
|
985
1094
|
|
|
@@ -988,9 +1097,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
988
1097
|
|
|
989
1098
|
| Name | Type | Description | |
|
|
990
1099
|
| ---- | ---- | ----------- | -------- |
|
|
991
|
-
|
|
|
992
|
-
|
|
|
993
|
-
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
1100
|
+
| baseObject | `Object` | Base object. | |
|
|
1101
|
+
| iteratee | `Function` | The executed per iteration. | |
|
|
994
1102
|
|
|
995
1103
|
|
|
996
1104
|
|
|
@@ -998,18 +1106,18 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
998
1106
|
##### Returns
|
|
999
1107
|
|
|
1000
1108
|
|
|
1001
|
-
-
|
|
1109
|
+
- `Object` New mapped object.
|
|
1002
1110
|
|
|
1003
1111
|
|
|
1004
1112
|
|
|
1005
1113
|
|
|
1006
|
-
### dist/
|
|
1114
|
+
### dist/general/object/mergeDeep.js
|
|
1007
1115
|
|
|
1008
1116
|
|
|
1009
|
-
####
|
|
1117
|
+
#### mergeDeep(obj1, obj2, settings)
|
|
1010
1118
|
|
|
1011
|
-
|
|
1012
|
-
|
|
1119
|
+
Merges two objects into a new one.
|
|
1120
|
+
The second given argument to the first given argument.
|
|
1013
1121
|
|
|
1014
1122
|
|
|
1015
1123
|
|
|
@@ -1018,7 +1126,9 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
1018
1126
|
|
|
1019
1127
|
| Name | Type | Description | |
|
|
1020
1128
|
| ---- | ---- | ----------- | -------- |
|
|
1021
|
-
|
|
|
1129
|
+
| obj1 | | The target object | |
|
|
1130
|
+
| obj2 | | The object to be merged | |
|
|
1131
|
+
| settings | | Object settings for this function | |
|
|
1022
1132
|
|
|
1023
1133
|
|
|
1024
1134
|
|
|
@@ -1026,17 +1136,13 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
1026
1136
|
##### Returns
|
|
1027
1137
|
|
|
1028
1138
|
|
|
1029
|
-
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1139
|
+
- a new merged object
|
|
1033
1140
|
|
|
1034
|
-
### dist/filters/adapters/flatUIToFD.js
|
|
1035
1141
|
|
|
1036
1142
|
|
|
1037
|
-
####
|
|
1143
|
+
#### isValid(obj1, obj2)
|
|
1038
1144
|
|
|
1039
|
-
|
|
1145
|
+
Validates if the two arguments are objects
|
|
1040
1146
|
|
|
1041
1147
|
|
|
1042
1148
|
|
|
@@ -1045,8 +1151,8 @@ Generates a filter data structure from the flatttened UI filters.
|
|
|
1045
1151
|
|
|
1046
1152
|
| Name | Type | Description | |
|
|
1047
1153
|
| ---- | ---- | ----------- | -------- |
|
|
1048
|
-
|
|
|
1049
|
-
|
|
|
1154
|
+
| obj1 | | The target object | |
|
|
1155
|
+
| obj2 | | The object to be merged | |
|
|
1050
1156
|
|
|
1051
1157
|
|
|
1052
1158
|
|
|
@@ -1054,14 +1160,13 @@ Generates a filter data structure from the flatttened UI filters.
|
|
|
1054
1160
|
##### Returns
|
|
1055
1161
|
|
|
1056
1162
|
|
|
1057
|
-
-
|
|
1163
|
+
- true: they are valid; false: they are not
|
|
1058
1164
|
|
|
1059
1165
|
|
|
1060
1166
|
|
|
1061
|
-
####
|
|
1167
|
+
#### getParamsToMergeDeep(settings)
|
|
1062
1168
|
|
|
1063
|
-
|
|
1064
|
-
Also, adds and organizes filters by datasets
|
|
1169
|
+
Validates and gets the settings with all set parameters.
|
|
1065
1170
|
|
|
1066
1171
|
|
|
1067
1172
|
|
|
@@ -1070,7 +1175,7 @@ Also, adds and organizes filters by datasets
|
|
|
1070
1175
|
|
|
1071
1176
|
| Name | Type | Description | |
|
|
1072
1177
|
| ---- | ---- | ----------- | -------- |
|
|
1073
|
-
|
|
|
1178
|
+
| settings | | the settings object | |
|
|
1074
1179
|
|
|
1075
1180
|
|
|
1076
1181
|
|
|
@@ -1078,13 +1183,17 @@ Also, adds and organizes filters by datasets
|
|
|
1078
1183
|
##### Returns
|
|
1079
1184
|
|
|
1080
1185
|
|
|
1081
|
-
-
|
|
1186
|
+
- a new settings object with all set parameters.
|
|
1082
1187
|
|
|
1083
1188
|
|
|
1084
1189
|
|
|
1085
|
-
#### buildScope(uFilter)
|
|
1086
1190
|
|
|
1087
|
-
|
|
1191
|
+
### dist/general/object/objectCopy.js
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
#### objectCopy(entity, cache)
|
|
1195
|
+
|
|
1196
|
+
Created a new reference of the given argument
|
|
1088
1197
|
|
|
1089
1198
|
|
|
1090
1199
|
|
|
@@ -1093,7 +1202,8 @@ Gets an scope structure for the filter data
|
|
|
1093
1202
|
|
|
1094
1203
|
| Name | Type | Description | |
|
|
1095
1204
|
| ---- | ---- | ----------- | -------- |
|
|
1096
|
-
|
|
|
1205
|
+
| entity | | The variable to be copied | |
|
|
1206
|
+
| cache | | | |
|
|
1097
1207
|
|
|
1098
1208
|
|
|
1099
1209
|
|
|
@@ -1101,13 +1211,17 @@ Gets an scope structure for the filter data
|
|
|
1101
1211
|
##### Returns
|
|
1102
1212
|
|
|
1103
1213
|
|
|
1104
|
-
-
|
|
1214
|
+
- A new reference of the given argument
|
|
1105
1215
|
|
|
1106
1216
|
|
|
1107
1217
|
|
|
1108
|
-
#### buildDataset(uFilter)
|
|
1109
1218
|
|
|
1110
|
-
|
|
1219
|
+
### dist/general/object/omit.js
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
#### omit(obj, props)
|
|
1223
|
+
|
|
1224
|
+
return a new Object excluding attributes in _props_ list
|
|
1111
1225
|
|
|
1112
1226
|
|
|
1113
1227
|
|
|
@@ -1116,7 +1230,8 @@ Gets an dataset structure for the filter data
|
|
|
1116
1230
|
|
|
1117
1231
|
| Name | Type | Description | |
|
|
1118
1232
|
| ---- | ---- | ----------- | -------- |
|
|
1119
|
-
|
|
|
1233
|
+
| obj | `Object` | base object | |
|
|
1234
|
+
| props | `Array.<String>` | list of attribute to exclude | |
|
|
1120
1235
|
|
|
1121
1236
|
|
|
1122
1237
|
|
|
@@ -1124,13 +1239,17 @@ Gets an dataset structure for the filter data
|
|
|
1124
1239
|
##### Returns
|
|
1125
1240
|
|
|
1126
1241
|
|
|
1127
|
-
-
|
|
1242
|
+
- `Object` clean object
|
|
1128
1243
|
|
|
1129
1244
|
|
|
1130
1245
|
|
|
1131
|
-
#### buildFilter(uFilter)
|
|
1132
1246
|
|
|
1133
|
-
|
|
1247
|
+
### dist/general/object/pick.js
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
#### pick(baseObject, keys)
|
|
1251
|
+
|
|
1252
|
+
return a new object just with attributes in _keys_ list
|
|
1134
1253
|
|
|
1135
1254
|
|
|
1136
1255
|
|
|
@@ -1139,7 +1258,8 @@ Gets an filter structure for the filter data
|
|
|
1139
1258
|
|
|
1140
1259
|
| Name | Type | Description | |
|
|
1141
1260
|
| ---- | ---- | ----------- | -------- |
|
|
1142
|
-
|
|
|
1261
|
+
| baseObject | `Object` | base object | |
|
|
1262
|
+
| keys | `Array.<String>` | list of attributes to preserve | |
|
|
1143
1263
|
|
|
1144
1264
|
|
|
1145
1265
|
|
|
@@ -1147,17 +1267,17 @@ Gets an filter structure for the filter data
|
|
|
1147
1267
|
##### Returns
|
|
1148
1268
|
|
|
1149
1269
|
|
|
1150
|
-
-
|
|
1270
|
+
- `Object` new object just with desired attributes
|
|
1151
1271
|
|
|
1152
1272
|
|
|
1153
1273
|
|
|
1154
1274
|
|
|
1155
|
-
### dist/
|
|
1275
|
+
### dist/general/object/serialize.js
|
|
1156
1276
|
|
|
1157
1277
|
|
|
1158
|
-
####
|
|
1278
|
+
#### serialize(obj)
|
|
1159
1279
|
|
|
1160
|
-
|
|
1280
|
+
serialize object to url param
|
|
1161
1281
|
|
|
1162
1282
|
|
|
1163
1283
|
|
|
@@ -1166,7 +1286,7 @@ Generates a Logic structure from flattened UI filters
|
|
|
1166
1286
|
|
|
1167
1287
|
| Name | Type | Description | |
|
|
1168
1288
|
| ---- | ---- | ----------- | -------- |
|
|
1169
|
-
|
|
|
1289
|
+
| obj | | - Object to be serialized | |
|
|
1170
1290
|
|
|
1171
1291
|
|
|
1172
1292
|
|
|
@@ -1174,17 +1294,17 @@ Generates a Logic structure from flattened UI filters
|
|
|
1174
1294
|
##### Returns
|
|
1175
1295
|
|
|
1176
1296
|
|
|
1177
|
-
-
|
|
1297
|
+
- `Void`
|
|
1178
1298
|
|
|
1179
1299
|
|
|
1180
1300
|
|
|
1181
1301
|
|
|
1182
|
-
### dist/
|
|
1302
|
+
### dist/general/string/capitalize.js
|
|
1183
1303
|
|
|
1184
1304
|
|
|
1185
|
-
####
|
|
1305
|
+
#### capitalize(text)
|
|
1186
1306
|
|
|
1187
|
-
|
|
1307
|
+
Upper case the first letter of a given text
|
|
1188
1308
|
|
|
1189
1309
|
|
|
1190
1310
|
|
|
@@ -1193,7 +1313,7 @@ Generates a Logic structure from flattened UI filters
|
|
|
1193
1313
|
|
|
1194
1314
|
| Name | Type | Description | |
|
|
1195
1315
|
| ---- | ---- | ----------- | -------- |
|
|
1196
|
-
|
|
|
1316
|
+
| text | `String` | | |
|
|
1197
1317
|
|
|
1198
1318
|
|
|
1199
1319
|
|
|
@@ -1201,17 +1321,18 @@ Generates a Logic structure from flattened UI filters
|
|
|
1201
1321
|
##### Returns
|
|
1202
1322
|
|
|
1203
1323
|
|
|
1204
|
-
-
|
|
1324
|
+
- `String` a capitalized text
|
|
1205
1325
|
|
|
1206
1326
|
|
|
1207
1327
|
|
|
1208
1328
|
|
|
1209
|
-
### dist/
|
|
1329
|
+
### dist/general/mix/compareDeep.js
|
|
1210
1330
|
|
|
1211
1331
|
|
|
1212
|
-
####
|
|
1332
|
+
#### compareDeep(object1, object2)
|
|
1213
1333
|
|
|
1214
|
-
|
|
1334
|
+
Compares two objects to know if they are equals. Go across nested objects.
|
|
1335
|
+
Includes arrays in the comparison.
|
|
1215
1336
|
|
|
1216
1337
|
|
|
1217
1338
|
|
|
@@ -1220,8 +1341,8 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
1220
1341
|
|
|
1221
1342
|
| Name | Type | Description | |
|
|
1222
1343
|
| ---- | ---- | ----------- | -------- |
|
|
1223
|
-
|
|
|
1224
|
-
|
|
|
1344
|
+
| object1 | | First Object to compare | |
|
|
1345
|
+
| object2 | | Second Object to compare | |
|
|
1225
1346
|
|
|
1226
1347
|
|
|
1227
1348
|
|
|
@@ -1229,14 +1350,17 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
1229
1350
|
##### Returns
|
|
1230
1351
|
|
|
1231
1352
|
|
|
1232
|
-
-
|
|
1353
|
+
- True: objects are equal. False: Objects are not equal. Undefined: invalid
|
|
1233
1354
|
|
|
1234
1355
|
|
|
1235
1356
|
|
|
1236
|
-
#### buildScopes(fbFilters)
|
|
1237
1357
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1358
|
+
### dist/general/mix/getTag.js
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
#### getTag(value)
|
|
1362
|
+
|
|
1363
|
+
Gets the `toStringTag` of `value`.
|
|
1240
1364
|
|
|
1241
1365
|
|
|
1242
1366
|
|
|
@@ -1245,7 +1369,7 @@ Also, adds and organizes filters by datasets
|
|
|
1245
1369
|
|
|
1246
1370
|
| Name | Type | Description | |
|
|
1247
1371
|
| ---- | ---- | ----------- | -------- |
|
|
1248
|
-
|
|
|
1372
|
+
| value | | The value to query. | |
|
|
1249
1373
|
|
|
1250
1374
|
|
|
1251
1375
|
|
|
@@ -1253,13 +1377,17 @@ Also, adds and organizes filters by datasets
|
|
|
1253
1377
|
##### Returns
|
|
1254
1378
|
|
|
1255
1379
|
|
|
1256
|
-
-
|
|
1380
|
+
- `string` Returns the `toStringTag`.
|
|
1257
1381
|
|
|
1258
1382
|
|
|
1259
1383
|
|
|
1260
|
-
#### buildScope(uFilter)
|
|
1261
1384
|
|
|
1262
|
-
|
|
1385
|
+
### dist/general/mix/importScripts.js
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
#### importScripts(scripts)
|
|
1389
|
+
|
|
1390
|
+
Import a set of external Scripts given the URL in both serie and cascade way
|
|
1263
1391
|
|
|
1264
1392
|
|
|
1265
1393
|
|
|
@@ -1268,21 +1396,54 @@ Gets an scope structure for the UI filter data
|
|
|
1268
1396
|
|
|
1269
1397
|
| Name | Type | Description | |
|
|
1270
1398
|
| ---- | ---- | ----------- | -------- |
|
|
1271
|
-
|
|
|
1399
|
+
| scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | |
|
|
1400
|
+
| scripts.url | `String` | CDN URL | |
|
|
1401
|
+
| 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 | |
|
|
1402
|
+
| scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1403
|
+
| scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1404
|
+
| scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | |
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
##### Examples
|
|
1410
|
+
|
|
1411
|
+
```javascript
|
|
1412
|
+
// 1) Simple script (paralell loading)
|
|
1413
|
+
importScripts(['http://myscript.js', 'http://another.js']);
|
|
1414
|
+
|
|
1415
|
+
// 2) Loading `.js` and `.esm.js` script (parallel loading)
|
|
1416
|
+
importScripts([
|
|
1417
|
+
{ url: 'http://myscript.esm.js', type: 'module' },
|
|
1418
|
+
{ url: 'http://myscript.js', noModule: true }
|
|
1419
|
+
]);
|
|
1272
1420
|
|
|
1421
|
+
// 3) import dependent scripts (cascade)
|
|
1422
|
+
importScripts([
|
|
1423
|
+
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
|
|
1424
|
+
]);
|
|
1273
1425
|
|
|
1426
|
+
// 4) mix
|
|
1427
|
+
importScripts([
|
|
1428
|
+
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
|
|
1429
|
+
{ url: 'http://another.esm.js', type: 'module' },
|
|
1430
|
+
{ url: 'http://another.js', noModule: true },
|
|
1431
|
+
'http://simplescript.js'
|
|
1432
|
+
]);
|
|
1433
|
+
```
|
|
1274
1434
|
|
|
1275
1435
|
|
|
1276
1436
|
##### Returns
|
|
1277
1437
|
|
|
1278
1438
|
|
|
1279
|
-
-
|
|
1439
|
+
- `Promise` Promise when all script have been loaded
|
|
1280
1440
|
|
|
1281
1441
|
|
|
1282
1442
|
|
|
1283
|
-
####
|
|
1443
|
+
#### loadScript(url, type, noModule)
|
|
1284
1444
|
|
|
1285
|
-
|
|
1445
|
+
Creates the script element and appends to document.head
|
|
1446
|
+
return a Promise that is resolved when the script is loaded
|
|
1286
1447
|
|
|
1287
1448
|
|
|
1288
1449
|
|
|
@@ -1291,7 +1452,9 @@ Gets an dataset structure for the UI filter data
|
|
|
1291
1452
|
|
|
1292
1453
|
| Name | Type | Description | |
|
|
1293
1454
|
| ---- | ---- | ----------- | -------- |
|
|
1294
|
-
|
|
|
1455
|
+
| url | `String` | Cdn Url | |
|
|
1456
|
+
| type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1457
|
+
| noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1295
1458
|
|
|
1296
1459
|
|
|
1297
1460
|
|
|
@@ -1299,13 +1462,17 @@ Gets an dataset structure for the UI filter data
|
|
|
1299
1462
|
##### Returns
|
|
1300
1463
|
|
|
1301
1464
|
|
|
1302
|
-
-
|
|
1465
|
+
- `Void`
|
|
1303
1466
|
|
|
1304
1467
|
|
|
1305
1468
|
|
|
1306
|
-
#### buildFilter(uFilter)
|
|
1307
1469
|
|
|
1308
|
-
|
|
1470
|
+
### dist/general/mix/isEmpty.js
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
#### isEmpty(variable, includeFalsy)
|
|
1474
|
+
|
|
1475
|
+
Validates if the given argument is empty
|
|
1309
1476
|
|
|
1310
1477
|
|
|
1311
1478
|
|
|
@@ -1314,7 +1481,8 @@ Gets an filter structure for the UI filter data
|
|
|
1314
1481
|
|
|
1315
1482
|
| Name | Type | Description | |
|
|
1316
1483
|
| ---- | ---- | ----------- | -------- |
|
|
1317
|
-
|
|
|
1484
|
+
| variable | | the given variable | |
|
|
1485
|
+
| includeFalsy | | flag to determine include the falsy variables into the validation | |
|
|
1318
1486
|
|
|
1319
1487
|
|
|
1320
1488
|
|
|
@@ -1322,17 +1490,19 @@ Gets an filter structure for the UI filter data
|
|
|
1322
1490
|
##### Returns
|
|
1323
1491
|
|
|
1324
1492
|
|
|
1325
|
-
-
|
|
1493
|
+
- true: the given argument is empty; false: is not.
|
|
1326
1494
|
|
|
1327
1495
|
|
|
1328
1496
|
|
|
1329
1497
|
|
|
1330
|
-
### dist/
|
|
1498
|
+
### dist/general/mix/isNaNV2.js
|
|
1331
1499
|
|
|
1332
1500
|
|
|
1333
|
-
####
|
|
1501
|
+
#### isNaNV2(variable)
|
|
1334
1502
|
|
|
1335
|
-
|
|
1503
|
+
Validates if the recieved number is NaN type.
|
|
1504
|
+
This function recieves any variable but will return false.
|
|
1505
|
+
Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
|
|
1336
1506
|
|
|
1337
1507
|
|
|
1338
1508
|
|
|
@@ -1341,8 +1511,7 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
1341
1511
|
|
|
1342
1512
|
| Name | Type | Description | |
|
|
1343
1513
|
| ---- | ---- | ----------- | -------- |
|
|
1344
|
-
|
|
|
1345
|
-
| version | | Tag for the version of the filter data structure | |
|
|
1514
|
+
| variable | | the variable to validate | |
|
|
1346
1515
|
|
|
1347
1516
|
|
|
1348
1517
|
|
|
@@ -1350,17 +1519,18 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
1350
1519
|
##### Returns
|
|
1351
1520
|
|
|
1352
1521
|
|
|
1353
|
-
- a
|
|
1522
|
+
- True if variable is a NaN or false otherwise
|
|
1354
1523
|
|
|
1355
1524
|
|
|
1356
1525
|
|
|
1357
1526
|
|
|
1358
|
-
### dist/
|
|
1527
|
+
### dist/general/mix/isNull.js
|
|
1359
1528
|
|
|
1360
1529
|
|
|
1361
|
-
####
|
|
1530
|
+
#### isNull(arg)
|
|
1362
1531
|
|
|
1363
|
-
|
|
1532
|
+
return if a given variable is either `null` or `undefined`
|
|
1533
|
+
useful to avoid falsify validating Number Zero (0)
|
|
1364
1534
|
|
|
1365
1535
|
|
|
1366
1536
|
|
|
@@ -1369,7 +1539,7 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
1369
1539
|
|
|
1370
1540
|
| Name | Type | Description | |
|
|
1371
1541
|
| ---- | ---- | ----------- | -------- |
|
|
1372
|
-
|
|
|
1542
|
+
| arg | `any` | | |
|
|
1373
1543
|
|
|
1374
1544
|
|
|
1375
1545
|
|
|
@@ -1377,13 +1547,19 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
1377
1547
|
##### Returns
|
|
1378
1548
|
|
|
1379
1549
|
|
|
1380
|
-
-
|
|
1550
|
+
- `Boolean`
|
|
1381
1551
|
|
|
1382
1552
|
|
|
1383
1553
|
|
|
1384
|
-
#### getFilter(filters, filter, getIndex)
|
|
1385
1554
|
|
|
1386
|
-
|
|
1555
|
+
### dist/general/mix/randomId.js
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
#### randomId(length, exclude)
|
|
1559
|
+
|
|
1560
|
+
Creates a random string
|
|
1561
|
+
- If the first given argument is different than a length number, the variable is replaced by a default number
|
|
1562
|
+
- If the optional second given argument is passed the random string is permutated.
|
|
1387
1563
|
|
|
1388
1564
|
|
|
1389
1565
|
|
|
@@ -1392,9 +1568,8 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
1392
1568
|
|
|
1393
1569
|
| Name | Type | Description | |
|
|
1394
1570
|
| ---- | ---- | ----------- | -------- |
|
|
1395
|
-
|
|
|
1396
|
-
|
|
|
1397
|
-
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
1571
|
+
| length | `Number` | size of the generated string. Default 8 | |
|
|
1572
|
+
| exclude | `Array` | collection of strings that is going to be excluded of the random string. | |
|
|
1398
1573
|
|
|
1399
1574
|
|
|
1400
1575
|
|
|
@@ -1402,13 +1577,19 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
1402
1577
|
##### Returns
|
|
1403
1578
|
|
|
1404
1579
|
|
|
1405
|
-
-
|
|
1580
|
+
- `String` Random string
|
|
1406
1581
|
|
|
1407
1582
|
|
|
1408
1583
|
|
|
1409
|
-
#### refineRankingValues(values, uiValues)
|
|
1410
1584
|
|
|
1411
|
-
|
|
1585
|
+
### dist/general/mix/size.js
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
#### size(obj)
|
|
1589
|
+
|
|
1590
|
+
Gets the length of the given array.
|
|
1591
|
+
- Useful for Object, Array and string type.
|
|
1592
|
+
- For `null` or `undefined` or else argument the returned value will be 0.
|
|
1412
1593
|
|
|
1413
1594
|
|
|
1414
1595
|
|
|
@@ -1417,8 +1598,7 @@ Refines the values of the Ranking column type.
|
|
|
1417
1598
|
|
|
1418
1599
|
| Name | Type | Description | |
|
|
1419
1600
|
| ---- | ---- | ----------- | -------- |
|
|
1420
|
-
|
|
|
1421
|
-
| uiValues | | Object with additional info about the values of the filter. | |
|
|
1601
|
+
| obj | `Any` | Any object-type variable | |
|
|
1422
1602
|
|
|
1423
1603
|
|
|
1424
1604
|
|
|
@@ -1426,17 +1606,17 @@ Refines the values of the Ranking column type.
|
|
|
1426
1606
|
##### Returns
|
|
1427
1607
|
|
|
1428
1608
|
|
|
1429
|
-
- the
|
|
1609
|
+
- `Number` the size of the given variable
|
|
1430
1610
|
|
|
1431
1611
|
|
|
1432
1612
|
|
|
1433
1613
|
|
|
1434
|
-
### dist/filters/adapters/
|
|
1614
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
1435
1615
|
|
|
1436
1616
|
|
|
1437
|
-
####
|
|
1617
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
1438
1618
|
|
|
1439
|
-
Generates a UI filter structure from
|
|
1619
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
1440
1620
|
|
|
1441
1621
|
|
|
1442
1622
|
|
|
@@ -1445,7 +1625,7 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
1445
1625
|
|
|
1446
1626
|
| Name | Type | Description | |
|
|
1447
1627
|
| ---- | ---- | ----------- | -------- |
|
|
1448
|
-
|
|
|
1628
|
+
| filterData | | The filter data object. | |
|
|
1449
1629
|
| datasetsInfo | | Collection of datasets information | |
|
|
1450
1630
|
|
|
1451
1631
|
|
|
@@ -1454,17 +1634,41 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
1454
1634
|
##### Returns
|
|
1455
1635
|
|
|
1456
1636
|
|
|
1457
|
-
- a UI
|
|
1637
|
+
- a flattened UI filters array
|
|
1458
1638
|
|
|
1459
1639
|
|
|
1460
1640
|
|
|
1641
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
1461
1642
|
|
|
1462
|
-
|
|
1643
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
1463
1644
|
|
|
1464
1645
|
|
|
1465
|
-
#### transformFilters(oldFiltersObj, section)
|
|
1466
1646
|
|
|
1467
|
-
|
|
1647
|
+
|
|
1648
|
+
##### Parameters
|
|
1649
|
+
|
|
1650
|
+
| Name | Type | Description | |
|
|
1651
|
+
| ---- | ---- | ----------- | -------- |
|
|
1652
|
+
| scopes | | The filter scope section | |
|
|
1653
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
|
|
1658
|
+
##### Returns
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
- a flattened UI filters array
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
### dist/filters/adapters/FDToLogic.js
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
#### FDToLogic(filterData)
|
|
1670
|
+
|
|
1671
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
1468
1672
|
|
|
1469
1673
|
|
|
1470
1674
|
|
|
@@ -1473,97 +1677,72 @@ Transform the old filters structure into the new one
|
|
|
1473
1677
|
|
|
1474
1678
|
| Name | Type | Description | |
|
|
1475
1679
|
| ---- | ---- | ----------- | -------- |
|
|
1476
|
-
|
|
|
1477
|
-
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
1680
|
+
| filterData | | The filter data object. | |
|
|
1478
1681
|
|
|
1479
1682
|
|
|
1480
1683
|
|
|
1481
1684
|
|
|
1482
|
-
#####
|
|
1685
|
+
##### Returns
|
|
1483
1686
|
|
|
1484
|
-
```javascript
|
|
1485
1687
|
|
|
1486
|
-
|
|
1487
|
-
"WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
|
|
1488
|
-
"WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
|
|
1489
|
-
"WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
|
|
1490
|
-
"WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
|
|
1491
|
-
"WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
|
|
1492
|
-
"formulaId": null,
|
|
1493
|
-
"panelId": null,
|
|
1494
|
-
"values": [
|
|
1495
|
-
{
|
|
1496
|
-
"EQUALS": [
|
|
1497
|
-
{
|
|
1498
|
-
"id": "AK4M8UV2a0",
|
|
1499
|
-
"value": "A",
|
|
1500
|
-
"enabled": true,
|
|
1501
|
-
"imageUrl": null
|
|
1502
|
-
},
|
|
1503
|
-
{
|
|
1504
|
-
"id": "AK4M8UV2a1",
|
|
1505
|
-
"value": "B",
|
|
1506
|
-
"enabled": true,
|
|
1507
|
-
"imageUrl": null
|
|
1508
|
-
}
|
|
1509
|
-
]
|
|
1510
|
-
}
|
|
1511
|
-
],
|
|
1512
|
-
"bucketId": null,
|
|
1513
|
-
"text": "MC",
|
|
1514
|
-
"title": "MC",
|
|
1515
|
-
"type": "SINGLE_CHOICE",
|
|
1516
|
-
"qid": "AK4M8UV2",
|
|
1517
|
-
"dataset": {
|
|
1518
|
-
"sourceid": "xYOQAdpqT",
|
|
1519
|
-
"name": "Form All Questions",
|
|
1520
|
-
"qrveyid": "xYOQAdpqT",
|
|
1521
|
-
"text": "Form All Questions",
|
|
1522
|
-
"linkid": 0
|
|
1523
|
-
},
|
|
1524
|
-
"enabled": true,
|
|
1525
|
-
"linked": null
|
|
1526
|
-
}
|
|
1527
|
-
};
|
|
1688
|
+
- a filter logic array
|
|
1528
1689
|
|
|
1529
|
-
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
1530
|
-
```
|
|
1531
1690
|
|
|
1532
1691
|
|
|
1533
|
-
|
|
1692
|
+
#### getLogicBodyFromFD21(filterData)
|
|
1693
|
+
|
|
1694
|
+
Gets the logic body
|
|
1534
1695
|
|
|
1535
1696
|
|
|
1536
|
-
- `Object` an object with the new filters structure
|
|
1537
1697
|
|
|
1538
1698
|
|
|
1699
|
+
##### Parameters
|
|
1700
|
+
|
|
1701
|
+
| Name | Type | Description | |
|
|
1702
|
+
| ---- | ---- | ----------- | -------- |
|
|
1703
|
+
| filterData | | The filter data object | |
|
|
1539
1704
|
|
|
1540
1705
|
|
|
1541
|
-
### dist/filters/classes/FilterInputErrorHandler.js
|
|
1542
1706
|
|
|
1543
1707
|
|
|
1544
|
-
|
|
1708
|
+
##### Returns
|
|
1545
1709
|
|
|
1546
1710
|
|
|
1711
|
+
- a filter logic array
|
|
1547
1712
|
|
|
1548
1713
|
|
|
1549
1714
|
|
|
1550
1715
|
|
|
1716
|
+
### dist/filters/adapters/FDToUI.js
|
|
1551
1717
|
|
|
1552
1718
|
|
|
1553
|
-
|
|
1719
|
+
#### FDToUI(filterData, datasetsInfo)
|
|
1554
1720
|
|
|
1721
|
+
Generates a UI filter structure from Filter Data structure.
|
|
1555
1722
|
|
|
1556
|
-
- `Void`
|
|
1557
1723
|
|
|
1558
1724
|
|
|
1559
1725
|
|
|
1726
|
+
##### Parameters
|
|
1560
1727
|
|
|
1561
|
-
|
|
1728
|
+
| Name | Type | Description | |
|
|
1729
|
+
| ---- | ---- | ----------- | -------- |
|
|
1730
|
+
| filterData | | The filter data object. | |
|
|
1731
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1562
1732
|
|
|
1563
1733
|
|
|
1564
|
-
#### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
|
|
1565
1734
|
|
|
1566
|
-
|
|
1735
|
+
|
|
1736
|
+
##### Returns
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
- a UI Filters structure
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
1744
|
+
|
|
1745
|
+
Generates a UI filter Structure from the Filter Data structure v2.1
|
|
1567
1746
|
|
|
1568
1747
|
|
|
1569
1748
|
|
|
@@ -1572,9 +1751,10 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
1572
1751
|
|
|
1573
1752
|
| Name | Type | Description | |
|
|
1574
1753
|
| ---- | ---- | ----------- | -------- |
|
|
1575
|
-
|
|
|
1576
|
-
|
|
|
1577
|
-
|
|
|
1754
|
+
| scopes | | The filter scope section | |
|
|
1755
|
+
| section | | The filter section. | |
|
|
1756
|
+
| version | | The version of the filter structure | |
|
|
1757
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1578
1758
|
|
|
1579
1759
|
|
|
1580
1760
|
|
|
@@ -1582,17 +1762,17 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
1582
1762
|
##### Returns
|
|
1583
1763
|
|
|
1584
1764
|
|
|
1585
|
-
-
|
|
1765
|
+
- a UI filter Structure
|
|
1586
1766
|
|
|
1587
1767
|
|
|
1588
1768
|
|
|
1589
1769
|
|
|
1590
|
-
### dist/filters/
|
|
1770
|
+
### dist/filters/adapters/UIToFD.js
|
|
1591
1771
|
|
|
1592
1772
|
|
|
1593
|
-
####
|
|
1773
|
+
#### UIToFD(filterData)
|
|
1594
1774
|
|
|
1595
|
-
|
|
1775
|
+
Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
1596
1776
|
|
|
1597
1777
|
|
|
1598
1778
|
|
|
@@ -1601,7 +1781,7 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
1601
1781
|
|
|
1602
1782
|
| Name | Type | Description | |
|
|
1603
1783
|
| ---- | ---- | ----------- | -------- |
|
|
1604
|
-
|
|
|
1784
|
+
| filterData | | The UI filter data object. | |
|
|
1605
1785
|
|
|
1606
1786
|
|
|
1607
1787
|
|
|
@@ -1609,17 +1789,13 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
1609
1789
|
##### Returns
|
|
1610
1790
|
|
|
1611
1791
|
|
|
1612
|
-
- a
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1792
|
+
- a Filter Data structure
|
|
1616
1793
|
|
|
1617
|
-
### dist/filters/helpers/getAvailableScopesIDsByConfig.js
|
|
1618
1794
|
|
|
1619
1795
|
|
|
1620
|
-
####
|
|
1796
|
+
#### UI21ToFD(uFilterData, version)
|
|
1621
1797
|
|
|
1622
|
-
|
|
1798
|
+
Builds the Fitler Data structure from UI filter data
|
|
1623
1799
|
|
|
1624
1800
|
|
|
1625
1801
|
|
|
@@ -1628,7 +1804,8 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1628
1804
|
|
|
1629
1805
|
| Name | Type | Description | |
|
|
1630
1806
|
| ---- | ---- | ----------- | -------- |
|
|
1631
|
-
|
|
|
1807
|
+
| uFilterData | | The UI filter Data object | |
|
|
1808
|
+
| version | | the version of the structure | |
|
|
1632
1809
|
|
|
1633
1810
|
|
|
1634
1811
|
|
|
@@ -1636,17 +1813,17 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1636
1813
|
##### Returns
|
|
1637
1814
|
|
|
1638
1815
|
|
|
1639
|
-
-
|
|
1816
|
+
-
|
|
1640
1817
|
|
|
1641
1818
|
|
|
1642
1819
|
|
|
1643
1820
|
|
|
1644
|
-
### dist/filters/
|
|
1821
|
+
### dist/filters/adapters/UIToFlatUI.js
|
|
1645
1822
|
|
|
1646
1823
|
|
|
1647
|
-
####
|
|
1824
|
+
#### UIToFlatUI(filterData, datasetsInfo)
|
|
1648
1825
|
|
|
1649
|
-
|
|
1826
|
+
Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
1650
1827
|
|
|
1651
1828
|
|
|
1652
1829
|
|
|
@@ -1655,8 +1832,8 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1655
1832
|
|
|
1656
1833
|
| Name | Type | Description | |
|
|
1657
1834
|
| ---- | ---- | ----------- | -------- |
|
|
1658
|
-
|
|
|
1659
|
-
|
|
|
1835
|
+
| filterData | | The UI filter data object. | |
|
|
1836
|
+
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
1660
1837
|
|
|
1661
1838
|
|
|
1662
1839
|
|
|
@@ -1664,17 +1841,13 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1664
1841
|
##### Returns
|
|
1665
1842
|
|
|
1666
1843
|
|
|
1667
|
-
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1844
|
+
- a flattened UI filters array
|
|
1671
1845
|
|
|
1672
|
-
### dist/general/array/delete.js
|
|
1673
1846
|
|
|
1674
1847
|
|
|
1675
|
-
####
|
|
1848
|
+
#### UI21ToFlatUI(scopes)
|
|
1676
1849
|
|
|
1677
|
-
|
|
1850
|
+
Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
1678
1851
|
|
|
1679
1852
|
|
|
1680
1853
|
|
|
@@ -1683,8 +1856,7 @@ Inmutable Array Item deletion
|
|
|
1683
1856
|
|
|
1684
1857
|
| Name | Type | Description | |
|
|
1685
1858
|
| ---- | ---- | ----------- | -------- |
|
|
1686
|
-
|
|
|
1687
|
-
| index | `Number` | the position of the item to delete | |
|
|
1859
|
+
| scopes | | The filter scope section | |
|
|
1688
1860
|
|
|
1689
1861
|
|
|
1690
1862
|
|
|
@@ -1692,20 +1864,18 @@ Inmutable Array Item deletion
|
|
|
1692
1864
|
##### Returns
|
|
1693
1865
|
|
|
1694
1866
|
|
|
1695
|
-
- a
|
|
1867
|
+
- a flattened UI filters array
|
|
1696
1868
|
|
|
1697
1869
|
|
|
1698
1870
|
|
|
1699
1871
|
|
|
1700
|
-
### dist/
|
|
1872
|
+
### dist/filters/adapters/adaptDateGroupingProperty.js
|
|
1701
1873
|
|
|
1702
1874
|
|
|
1703
|
-
####
|
|
1875
|
+
#### adaptDateGroupingProperty(property)
|
|
1704
1876
|
|
|
1705
|
-
|
|
1706
|
-
|
|
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
|
|
1877
|
+
[TODO: For 2022, eliminate this adapter]
|
|
1878
|
+
Get the new property base on the old date grouping properties
|
|
1709
1879
|
|
|
1710
1880
|
|
|
1711
1881
|
|
|
@@ -1714,9 +1884,7 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1714
1884
|
|
|
1715
1885
|
| Name | Type | Description | |
|
|
1716
1886
|
| ---- | ---- | ----------- | -------- |
|
|
1717
|
-
|
|
|
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 | |
|
|
1887
|
+
| property | | | |
|
|
1720
1888
|
|
|
1721
1889
|
|
|
1722
1890
|
|
|
@@ -1724,17 +1892,17 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1724
1892
|
##### Returns
|
|
1725
1893
|
|
|
1726
1894
|
|
|
1727
|
-
-
|
|
1895
|
+
-
|
|
1728
1896
|
|
|
1729
1897
|
|
|
1730
1898
|
|
|
1731
1899
|
|
|
1732
|
-
### dist/
|
|
1900
|
+
### dist/filters/adapters/adaptFilterData.js
|
|
1733
1901
|
|
|
1734
1902
|
|
|
1735
|
-
####
|
|
1903
|
+
#### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
|
|
1736
1904
|
|
|
1737
|
-
|
|
1905
|
+
Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
1738
1906
|
|
|
1739
1907
|
|
|
1740
1908
|
|
|
@@ -1743,7 +1911,9 @@ Flat deeply an array
|
|
|
1743
1911
|
|
|
1744
1912
|
| Name | Type | Description | |
|
|
1745
1913
|
| ---- | ---- | ----------- | -------- |
|
|
1746
|
-
|
|
|
1914
|
+
| filterData | | The filter data structure. Accepts both v2.1 or v2.0 | |
|
|
1915
|
+
| getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | |
|
|
1916
|
+
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
1747
1917
|
|
|
1748
1918
|
|
|
1749
1919
|
|
|
@@ -1751,17 +1921,17 @@ Flat deeply an array
|
|
|
1751
1921
|
##### Returns
|
|
1752
1922
|
|
|
1753
1923
|
|
|
1754
|
-
-
|
|
1924
|
+
- A new filter data structure v2.1
|
|
1755
1925
|
|
|
1756
1926
|
|
|
1757
1927
|
|
|
1758
1928
|
|
|
1759
|
-
### dist/
|
|
1929
|
+
### dist/filters/adapters/flatUIToFD.js
|
|
1760
1930
|
|
|
1761
1931
|
|
|
1762
|
-
####
|
|
1932
|
+
#### flatUIToFD(uFilters, version)
|
|
1763
1933
|
|
|
1764
|
-
|
|
1934
|
+
Generates a filter data structure from the flatttened UI filters.
|
|
1765
1935
|
|
|
1766
1936
|
|
|
1767
1937
|
|
|
@@ -1770,8 +1940,8 @@ Gets the first index from the array by a callback condition
|
|
|
1770
1940
|
|
|
1771
1941
|
| Name | Type | Description | |
|
|
1772
1942
|
| ---- | ---- | ----------- | -------- |
|
|
1773
|
-
|
|
|
1774
|
-
|
|
|
1943
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1944
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1775
1945
|
|
|
1776
1946
|
|
|
1777
1947
|
|
|
@@ -1779,17 +1949,14 @@ Gets the first index from the array by a callback condition
|
|
|
1779
1949
|
##### Returns
|
|
1780
1950
|
|
|
1781
1951
|
|
|
1782
|
-
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1952
|
+
- a Filter Data.
|
|
1786
1953
|
|
|
1787
|
-
### dist/general/array/getLastIndexFromArray.js
|
|
1788
1954
|
|
|
1789
1955
|
|
|
1790
|
-
####
|
|
1956
|
+
#### buildScopes(fbFilters)
|
|
1791
1957
|
|
|
1792
|
-
Gets
|
|
1958
|
+
Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
|
|
1959
|
+
Also, adds and organizes filters by datasets
|
|
1793
1960
|
|
|
1794
1961
|
|
|
1795
1962
|
|
|
@@ -1798,8 +1965,7 @@ Gets the last index from the array by a callback condition
|
|
|
1798
1965
|
|
|
1799
1966
|
| Name | Type | Description | |
|
|
1800
1967
|
| ---- | ---- | ----------- | -------- |
|
|
1801
|
-
|
|
|
1802
|
-
| callback | | function callback | |
|
|
1968
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1803
1969
|
|
|
1804
1970
|
|
|
1805
1971
|
|
|
@@ -1807,17 +1973,13 @@ Gets the last index from the array by a callback condition
|
|
|
1807
1973
|
##### Returns
|
|
1808
1974
|
|
|
1809
1975
|
|
|
1810
|
-
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1976
|
+
- an array of scopes structure.
|
|
1814
1977
|
|
|
1815
|
-
### dist/general/function/debounce.js
|
|
1816
1978
|
|
|
1817
1979
|
|
|
1818
|
-
####
|
|
1980
|
+
#### buildScope(uFilter)
|
|
1819
1981
|
|
|
1820
|
-
|
|
1982
|
+
Gets an scope structure for the filter data
|
|
1821
1983
|
|
|
1822
1984
|
|
|
1823
1985
|
|
|
@@ -1826,8 +1988,7 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1826
1988
|
|
|
1827
1989
|
| Name | Type | Description | |
|
|
1828
1990
|
| ---- | ---- | ----------- | -------- |
|
|
1829
|
-
|
|
|
1830
|
-
| time | `Number` | default 500ms | |
|
|
1991
|
+
| uFilter | | UI structure filter | |
|
|
1831
1992
|
|
|
1832
1993
|
|
|
1833
1994
|
|
|
@@ -1835,17 +1996,36 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1835
1996
|
##### Returns
|
|
1836
1997
|
|
|
1837
1998
|
|
|
1838
|
-
-
|
|
1999
|
+
- an scope structure
|
|
1839
2000
|
|
|
1840
2001
|
|
|
1841
2002
|
|
|
2003
|
+
#### buildDataset(uFilter)
|
|
1842
2004
|
|
|
1843
|
-
|
|
2005
|
+
Gets an dataset structure for the filter data
|
|
1844
2006
|
|
|
1845
2007
|
|
|
1846
|
-
#### throttled(fn, time)
|
|
1847
2008
|
|
|
1848
|
-
|
|
2009
|
+
|
|
2010
|
+
##### Parameters
|
|
2011
|
+
|
|
2012
|
+
| Name | Type | Description | |
|
|
2013
|
+
| ---- | ---- | ----------- | -------- |
|
|
2014
|
+
| uFilter | | a UI structure filter | |
|
|
2015
|
+
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
|
|
2019
|
+
##### Returns
|
|
2020
|
+
|
|
2021
|
+
|
|
2022
|
+
- an dataset structure
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
|
|
2026
|
+
#### buildFilter(uFilter)
|
|
2027
|
+
|
|
2028
|
+
Gets an filter structure for the filter data
|
|
1849
2029
|
|
|
1850
2030
|
|
|
1851
2031
|
|
|
@@ -1854,8 +2034,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
1854
2034
|
|
|
1855
2035
|
| Name | Type | Description | |
|
|
1856
2036
|
| ---- | ---- | ----------- | -------- |
|
|
1857
|
-
|
|
|
1858
|
-
| time | `Number` | default 500ms | |
|
|
2037
|
+
| uFilter | | a UI structure filter | |
|
|
1859
2038
|
|
|
1860
2039
|
|
|
1861
2040
|
|
|
@@ -1863,18 +2042,18 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
1863
2042
|
##### Returns
|
|
1864
2043
|
|
|
1865
2044
|
|
|
1866
|
-
-
|
|
2045
|
+
- an filter structure
|
|
1867
2046
|
|
|
1868
2047
|
|
|
1869
2048
|
|
|
1870
2049
|
|
|
1871
|
-
### dist/
|
|
2050
|
+
### dist/filters/adapters/adaptFilterValues.js
|
|
1872
2051
|
|
|
1873
2052
|
|
|
1874
|
-
####
|
|
2053
|
+
#### adaptFilterValues(filter)
|
|
1875
2054
|
|
|
1876
|
-
|
|
1877
|
-
|
|
2055
|
+
[TODO: For 2022, eliminate this adapter]
|
|
2056
|
+
Gets an adapted filter value array. Validates the enabled property and sets
|
|
1878
2057
|
|
|
1879
2058
|
|
|
1880
2059
|
|
|
@@ -1883,8 +2062,7 @@ Includes arrays in the comparison.
|
|
|
1883
2062
|
|
|
1884
2063
|
| Name | Type | Description | |
|
|
1885
2064
|
| ---- | ---- | ----------- | -------- |
|
|
1886
|
-
|
|
|
1887
|
-
| object2 | | Second Object to compare | |
|
|
2065
|
+
| filter | | The filter | |
|
|
1888
2066
|
|
|
1889
2067
|
|
|
1890
2068
|
|
|
@@ -1892,17 +2070,17 @@ Includes arrays in the comparison.
|
|
|
1892
2070
|
##### Returns
|
|
1893
2071
|
|
|
1894
2072
|
|
|
1895
|
-
-
|
|
2073
|
+
- A new value array with the filled properties.
|
|
1896
2074
|
|
|
1897
2075
|
|
|
1898
2076
|
|
|
1899
2077
|
|
|
1900
|
-
### dist/
|
|
2078
|
+
### dist/filters/adapters/flatUIToLogic.js
|
|
1901
2079
|
|
|
1902
2080
|
|
|
1903
|
-
####
|
|
2081
|
+
#### flatUIToLogic(uFilter)
|
|
1904
2082
|
|
|
1905
|
-
|
|
2083
|
+
Generates a Logic structure from flattened UI filters
|
|
1906
2084
|
|
|
1907
2085
|
|
|
1908
2086
|
|
|
@@ -1911,7 +2089,7 @@ Gets the `toStringTag` of `value`.
|
|
|
1911
2089
|
|
|
1912
2090
|
| Name | Type | Description | |
|
|
1913
2091
|
| ---- | ---- | ----------- | -------- |
|
|
1914
|
-
|
|
|
2092
|
+
| uFilter | | Array of flat filters from UI | |
|
|
1915
2093
|
|
|
1916
2094
|
|
|
1917
2095
|
|
|
@@ -1919,17 +2097,17 @@ Gets the `toStringTag` of `value`.
|
|
|
1919
2097
|
##### Returns
|
|
1920
2098
|
|
|
1921
2099
|
|
|
1922
|
-
-
|
|
2100
|
+
- The logic structure
|
|
1923
2101
|
|
|
1924
2102
|
|
|
1925
2103
|
|
|
1926
2104
|
|
|
1927
|
-
### dist/
|
|
2105
|
+
### dist/filters/adapters/flatUIToOldLogic.js
|
|
1928
2106
|
|
|
1929
2107
|
|
|
1930
|
-
####
|
|
2108
|
+
#### flatUIToOldLogic(uFilters)
|
|
1931
2109
|
|
|
1932
|
-
|
|
2110
|
+
Generates a Logic structure from flattened UI filters
|
|
1933
2111
|
|
|
1934
2112
|
|
|
1935
2113
|
|
|
@@ -1938,65 +2116,7 @@ Import a set of external Scripts given the URL in both serie and cascade way
|
|
|
1938
2116
|
|
|
1939
2117
|
| Name | Type | Description | |
|
|
1940
2118
|
| ---- | ---- | ----------- | -------- |
|
|
1941
|
-
|
|
|
1942
|
-
| scripts.url | `String` | CDN URL | |
|
|
1943
|
-
| 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 | |
|
|
1944
|
-
| scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1945
|
-
| scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1946
|
-
| scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | |
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
##### Examples
|
|
1952
|
-
|
|
1953
|
-
```javascript
|
|
1954
|
-
// 1) Simple script (paralell loading)
|
|
1955
|
-
importScripts(['http://myscript.js', 'http://another.js']);
|
|
1956
|
-
|
|
1957
|
-
// 2) Loading `.js` and `.esm.js` script (parallel loading)
|
|
1958
|
-
importScripts([
|
|
1959
|
-
{ url: 'http://myscript.esm.js', type: 'module' },
|
|
1960
|
-
{ url: 'http://myscript.js', noModule: true }
|
|
1961
|
-
]);
|
|
1962
|
-
|
|
1963
|
-
// 3) import dependent scripts (cascade)
|
|
1964
|
-
importScripts([
|
|
1965
|
-
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
|
|
1966
|
-
]);
|
|
1967
|
-
|
|
1968
|
-
// 4) mix
|
|
1969
|
-
importScripts([
|
|
1970
|
-
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
|
|
1971
|
-
{ url: 'http://another.esm.js', type: 'module' },
|
|
1972
|
-
{ url: 'http://another.js', noModule: true },
|
|
1973
|
-
'http://simplescript.js'
|
|
1974
|
-
]);
|
|
1975
|
-
```
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
##### Returns
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
- `Promise` Promise when all script have been loaded
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
#### loadScript(url, type, noModule)
|
|
1986
|
-
|
|
1987
|
-
Creates the script element and appends to document.head
|
|
1988
|
-
return a Promise that is resolved when the script is loaded
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
##### Parameters
|
|
1994
|
-
|
|
1995
|
-
| Name | Type | Description | |
|
|
1996
|
-
| ---- | ---- | ----------- | -------- |
|
|
1997
|
-
| url | `String` | Cdn Url | |
|
|
1998
|
-
| type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1999
|
-
| noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
2119
|
+
| uFilters | | Array of flat filters from UI | |
|
|
2000
2120
|
|
|
2001
2121
|
|
|
2002
2122
|
|
|
@@ -2004,47 +2124,17 @@ return a Promise that is resolved when the script is loaded
|
|
|
2004
2124
|
##### Returns
|
|
2005
2125
|
|
|
2006
2126
|
|
|
2007
|
-
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
### dist/general/mix/isEmpty.js
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
#### isEmpty(variable, includeFalsy)
|
|
2016
|
-
|
|
2017
|
-
Validates if the given argument is empty
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
##### Parameters
|
|
2023
|
-
|
|
2024
|
-
| Name | Type | Description | |
|
|
2025
|
-
| ---- | ---- | ----------- | -------- |
|
|
2026
|
-
| variable | | the given variable | |
|
|
2027
|
-
| includeFalsy | | flag to determine include the falsy variables into the validation | |
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
##### Returns
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
- true: the given argument is empty; false: is not.
|
|
2127
|
+
- The logic structure
|
|
2036
2128
|
|
|
2037
2129
|
|
|
2038
2130
|
|
|
2039
2131
|
|
|
2040
|
-
### dist/
|
|
2132
|
+
### dist/filters/adapters/flatUIToUI.js
|
|
2041
2133
|
|
|
2042
2134
|
|
|
2043
|
-
####
|
|
2135
|
+
#### flatUIToUI(uFilters, version)
|
|
2044
2136
|
|
|
2045
|
-
|
|
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.
|
|
2137
|
+
Generates a UI filter data structure from the flatttened UI filters.
|
|
2048
2138
|
|
|
2049
2139
|
|
|
2050
2140
|
|
|
@@ -2053,7 +2143,8 @@ Validates if variable is null, undefined, or an empty string, also, the function
|
|
|
2053
2143
|
|
|
2054
2144
|
| Name | Type | Description | |
|
|
2055
2145
|
| ---- | ---- | ----------- | -------- |
|
|
2056
|
-
|
|
|
2146
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
2147
|
+
| version | | Tag for the version of the filter data structure | |
|
|
2057
2148
|
|
|
2058
2149
|
|
|
2059
2150
|
|
|
@@ -2061,18 +2152,14 @@ Validates if variable is null, undefined, or an empty string, also, the function
|
|
|
2061
2152
|
##### Returns
|
|
2062
2153
|
|
|
2063
2154
|
|
|
2064
|
-
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2155
|
+
- a UI Filter Data.
|
|
2068
2156
|
|
|
2069
|
-
### dist/general/mix/isNull.js
|
|
2070
2157
|
|
|
2071
2158
|
|
|
2072
|
-
####
|
|
2159
|
+
#### buildScopes(fbFilters)
|
|
2073
2160
|
|
|
2074
|
-
|
|
2075
|
-
|
|
2161
|
+
Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
|
|
2162
|
+
Also, adds and organizes filters by datasets
|
|
2076
2163
|
|
|
2077
2164
|
|
|
2078
2165
|
|
|
@@ -2081,7 +2168,7 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
2081
2168
|
|
|
2082
2169
|
| Name | Type | Description | |
|
|
2083
2170
|
| ---- | ---- | ----------- | -------- |
|
|
2084
|
-
|
|
|
2171
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
2085
2172
|
|
|
2086
2173
|
|
|
2087
2174
|
|
|
@@ -2089,19 +2176,13 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
2089
2176
|
##### Returns
|
|
2090
2177
|
|
|
2091
2178
|
|
|
2092
|
-
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2179
|
+
- an array of scopes structure.
|
|
2096
2180
|
|
|
2097
|
-
### dist/general/mix/randomId.js
|
|
2098
2181
|
|
|
2099
2182
|
|
|
2100
|
-
####
|
|
2183
|
+
#### buildScope(uFilter)
|
|
2101
2184
|
|
|
2102
|
-
|
|
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.
|
|
2185
|
+
Gets an scope structure for the UI filter data
|
|
2105
2186
|
|
|
2106
2187
|
|
|
2107
2188
|
|
|
@@ -2110,8 +2191,7 @@ Creates a random string
|
|
|
2110
2191
|
|
|
2111
2192
|
| Name | Type | Description | |
|
|
2112
2193
|
| ---- | ---- | ----------- | -------- |
|
|
2113
|
-
|
|
|
2114
|
-
| exclude | `Array` | collection of strings that is going to be excluded of the random string. | |
|
|
2194
|
+
| uFilter | | UI structure filter | |
|
|
2115
2195
|
|
|
2116
2196
|
|
|
2117
2197
|
|
|
@@ -2119,19 +2199,13 @@ Creates a random string
|
|
|
2119
2199
|
##### Returns
|
|
2120
2200
|
|
|
2121
2201
|
|
|
2122
|
-
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2202
|
+
- an scope structure
|
|
2126
2203
|
|
|
2127
|
-
### dist/general/mix/size.js
|
|
2128
2204
|
|
|
2129
2205
|
|
|
2130
|
-
####
|
|
2206
|
+
#### buildDataset(uFilter)
|
|
2131
2207
|
|
|
2132
|
-
Gets
|
|
2133
|
-
- Useful for Object, Array and string type.
|
|
2134
|
-
- For `null` or `undefined` or else argument the returned value will be 0.
|
|
2208
|
+
Gets an dataset structure for the UI filter data
|
|
2135
2209
|
|
|
2136
2210
|
|
|
2137
2211
|
|
|
@@ -2140,7 +2214,7 @@ Gets the length of the given array.
|
|
|
2140
2214
|
|
|
2141
2215
|
| Name | Type | Description | |
|
|
2142
2216
|
| ---- | ---- | ----------- | -------- |
|
|
2143
|
-
|
|
|
2217
|
+
| uFilter | | a UI structure filter | |
|
|
2144
2218
|
|
|
2145
2219
|
|
|
2146
2220
|
|
|
@@ -2148,18 +2222,13 @@ Gets the length of the given array.
|
|
|
2148
2222
|
##### Returns
|
|
2149
2223
|
|
|
2150
2224
|
|
|
2151
|
-
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2225
|
+
- an dataset structure
|
|
2155
2226
|
|
|
2156
|
-
### dist/general/object/cloneDeep.js
|
|
2157
2227
|
|
|
2158
2228
|
|
|
2159
|
-
####
|
|
2229
|
+
#### buildFilter(uFilter)
|
|
2160
2230
|
|
|
2161
|
-
|
|
2162
|
-
Not to use this function with inner objects and functions
|
|
2231
|
+
Gets an filter structure for the UI filter data
|
|
2163
2232
|
|
|
2164
2233
|
|
|
2165
2234
|
|
|
@@ -2168,7 +2237,7 @@ Not to use this function with inner objects and functions
|
|
|
2168
2237
|
|
|
2169
2238
|
| Name | Type | Description | |
|
|
2170
2239
|
| ---- | ---- | ----------- | -------- |
|
|
2171
|
-
|
|
|
2240
|
+
| uFilter | | a UI structure filter | |
|
|
2172
2241
|
|
|
2173
2242
|
|
|
2174
2243
|
|
|
@@ -2176,21 +2245,17 @@ Not to use this function with inner objects and functions
|
|
|
2176
2245
|
##### Returns
|
|
2177
2246
|
|
|
2178
2247
|
|
|
2179
|
-
-
|
|
2180
|
-
|
|
2248
|
+
- an filter structure
|
|
2181
2249
|
|
|
2182
2250
|
|
|
2183
2251
|
|
|
2184
|
-
### dist/general/object/get.js
|
|
2185
2252
|
|
|
2253
|
+
### dist/filters/adapters/logicToFD.js
|
|
2186
2254
|
|
|
2187
|
-
#### _get(baseObject, path, defaultValue)
|
|
2188
2255
|
|
|
2189
|
-
|
|
2190
|
-
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
2256
|
+
#### logicToFD(filterData, version)
|
|
2191
2257
|
|
|
2192
|
-
|
|
2193
|
-
Undefined and null values will return the defaultValue.
|
|
2258
|
+
Generates a filter data structure from the old logic structure (v2.0).
|
|
2194
2259
|
|
|
2195
2260
|
|
|
2196
2261
|
|
|
@@ -2199,59 +2264,26 @@ Undefined and null values will return the defaultValue.
|
|
|
2199
2264
|
|
|
2200
2265
|
| Name | Type | Description | |
|
|
2201
2266
|
| ---- | ---- | ----------- | -------- |
|
|
2202
|
-
|
|
|
2203
|
-
|
|
|
2204
|
-
| defaultValue | | The value returned for undefined resolved values. | |
|
|
2205
|
-
|
|
2267
|
+
| filterData | | The old filter data structure with logic (v2.0) | |
|
|
2268
|
+
| version | | Tag for the version of the filter data structure | |
|
|
2206
2269
|
|
|
2207
2270
|
|
|
2208
2271
|
|
|
2209
|
-
##### Examples
|
|
2210
|
-
|
|
2211
|
-
```javascript
|
|
2212
|
-
// returns 'Hello'
|
|
2213
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
2214
|
-
```
|
|
2215
|
-
```javascript
|
|
2216
|
-
// returns 'A simple Hello'
|
|
2217
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
2218
|
-
```
|
|
2219
|
-
```javascript
|
|
2220
|
-
// returns 'Hello Again'
|
|
2221
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
2222
|
-
```
|
|
2223
|
-
```javascript
|
|
2224
|
-
// returns 'Hello 2'
|
|
2225
|
-
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
2226
|
-
```
|
|
2227
|
-
```javascript
|
|
2228
|
-
// returns 'Hello Again'
|
|
2229
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
2230
|
-
```
|
|
2231
|
-
|
|
2232
2272
|
|
|
2233
2273
|
##### Returns
|
|
2234
2274
|
|
|
2235
2275
|
|
|
2236
|
-
-
|
|
2276
|
+
- a Filter Data.
|
|
2237
2277
|
|
|
2238
2278
|
|
|
2239
2279
|
|
|
2240
2280
|
|
|
2241
|
-
### dist/
|
|
2281
|
+
### dist/filters/adapters/logicToFlatUI.js
|
|
2242
2282
|
|
|
2243
2283
|
|
|
2244
|
-
####
|
|
2284
|
+
#### logicToFlatUI(logics)
|
|
2245
2285
|
|
|
2246
|
-
|
|
2247
|
-
- To optimize the searching, it is required a key in a snake_case style
|
|
2248
|
-
- List of cases that do not match
|
|
2249
|
-
-- From lower to snake case
|
|
2250
|
-
-- From upper to snake case
|
|
2251
|
-
-- From lower to camel case
|
|
2252
|
-
-- From upper to camel case
|
|
2253
|
-
-- From lower to pascal case
|
|
2254
|
-
-- From upper to pascal case
|
|
2286
|
+
Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
2255
2287
|
|
|
2256
2288
|
|
|
2257
2289
|
|
|
@@ -2260,33 +2292,21 @@ Searchs for properties in different case styles such as: lower, upper, camel and
|
|
|
2260
2292
|
|
|
2261
2293
|
| Name | Type | Description | |
|
|
2262
2294
|
| ---- | ---- | ----------- | -------- |
|
|
2263
|
-
|
|
|
2264
|
-
| key | `string` | String attribute in snake_case style | |
|
|
2295
|
+
| logics | | The old logic structure (v2.0) | |
|
|
2265
2296
|
|
|
2266
2297
|
|
|
2267
2298
|
|
|
2268
2299
|
|
|
2269
|
-
##### Examples
|
|
2270
|
-
|
|
2271
|
-
```javascript
|
|
2272
|
-
getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2273
|
-
```
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
2300
|
##### Returns
|
|
2277
2301
|
|
|
2278
2302
|
|
|
2279
|
-
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2303
|
+
- The Flattened UI Filters array
|
|
2283
2304
|
|
|
2284
|
-
### dist/general/object/hasProperty.js
|
|
2285
2305
|
|
|
2286
2306
|
|
|
2287
|
-
####
|
|
2307
|
+
#### getFilter(filters, filter, getIndex)
|
|
2288
2308
|
|
|
2289
|
-
|
|
2309
|
+
Get the filter or the index of the given array, validating an old filter structure.
|
|
2290
2310
|
|
|
2291
2311
|
|
|
2292
2312
|
|
|
@@ -2295,38 +2315,23 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
|
|
|
2295
2315
|
|
|
2296
2316
|
| Name | Type | Description | |
|
|
2297
2317
|
| ---- | ---- | ----------- | -------- |
|
|
2298
|
-
|
|
|
2299
|
-
|
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
##### Examples
|
|
2318
|
+
| filters | | The array of UI filters | |
|
|
2319
|
+
| filter | | The old logic structure filter | |
|
|
2320
|
+
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
2305
2321
|
|
|
2306
|
-
```javascript
|
|
2307
|
-
const prop = 'prop2'
|
|
2308
|
-
const obj1 = { prop1: 'hello', prop2: 'world'}
|
|
2309
|
-
_hasProperty(ob1, prop1) // true
|
|
2310
2322
|
|
|
2311
|
-
const obj2 = { prop1: 'hello world' }
|
|
2312
|
-
_hasProperty(ob1, prop2) // false
|
|
2313
|
-
```
|
|
2314
2323
|
|
|
2315
2324
|
|
|
2316
2325
|
##### Returns
|
|
2317
2326
|
|
|
2318
2327
|
|
|
2319
|
-
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2328
|
+
- the index or the UI filter object
|
|
2323
2329
|
|
|
2324
|
-
### dist/general/object/isObject.js
|
|
2325
2330
|
|
|
2326
2331
|
|
|
2327
|
-
####
|
|
2332
|
+
#### refineRankingValues(values, uiValues)
|
|
2328
2333
|
|
|
2329
|
-
|
|
2334
|
+
Refines the values of the Ranking column type.
|
|
2330
2335
|
|
|
2331
2336
|
|
|
2332
2337
|
|
|
@@ -2335,7 +2340,8 @@ Checks if the given argument is an object type
|
|
|
2335
2340
|
|
|
2336
2341
|
| Name | Type | Description | |
|
|
2337
2342
|
| ---- | ---- | ----------- | -------- |
|
|
2338
|
-
|
|
|
2343
|
+
| values | | the Array of Ranking values | |
|
|
2344
|
+
| uiValues | | Object with additional info about the values of the filter. | |
|
|
2339
2345
|
|
|
2340
2346
|
|
|
2341
2347
|
|
|
@@ -2343,18 +2349,17 @@ Checks if the given argument is an object type
|
|
|
2343
2349
|
##### Returns
|
|
2344
2350
|
|
|
2345
2351
|
|
|
2346
|
-
-
|
|
2352
|
+
- the array of Ranking values
|
|
2347
2353
|
|
|
2348
2354
|
|
|
2349
2355
|
|
|
2350
2356
|
|
|
2351
|
-
### dist/
|
|
2357
|
+
### dist/filters/adapters/logicToUI.js
|
|
2352
2358
|
|
|
2353
2359
|
|
|
2354
|
-
####
|
|
2360
|
+
#### logicToUI(uFilters, datasetsInfo)
|
|
2355
2361
|
|
|
2356
|
-
|
|
2357
|
-
and return a mapped object
|
|
2362
|
+
Generates a UI filter structure from the old logic structure (v2.0).
|
|
2358
2363
|
|
|
2359
2364
|
|
|
2360
2365
|
|
|
@@ -2363,8 +2368,8 @@ and return a mapped object
|
|
|
2363
2368
|
|
|
2364
2369
|
| Name | Type | Description | |
|
|
2365
2370
|
| ---- | ---- | ----------- | -------- |
|
|
2366
|
-
|
|
|
2367
|
-
|
|
|
2371
|
+
| uFilters | | Array of filters from old logic structure | |
|
|
2372
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
2368
2373
|
|
|
2369
2374
|
|
|
2370
2375
|
|
|
@@ -2372,43 +2377,17 @@ and return a mapped object
|
|
|
2372
2377
|
##### Returns
|
|
2373
2378
|
|
|
2374
2379
|
|
|
2375
|
-
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
### dist/general/object/mergeDeep.js
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
#### mergeDeep(obj1, obj2, settings)
|
|
2384
|
-
|
|
2385
|
-
Merges two objects into a new one.
|
|
2386
|
-
The second given argument to the first given argument.
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
##### Parameters
|
|
2392
|
-
|
|
2393
|
-
| Name | Type | Description | |
|
|
2394
|
-
| ---- | ---- | ----------- | -------- |
|
|
2395
|
-
| obj1 | | The target object | |
|
|
2396
|
-
| obj2 | | The object to be merged | |
|
|
2397
|
-
| settings | | Object settings for this function | |
|
|
2398
|
-
|
|
2399
|
-
|
|
2380
|
+
- a UI Filter Data.
|
|
2400
2381
|
|
|
2401
2382
|
|
|
2402
|
-
##### Returns
|
|
2403
2383
|
|
|
2404
2384
|
|
|
2405
|
-
|
|
2406
|
-
|
|
2385
|
+
### dist/filters/adapters/transformFilters.js
|
|
2407
2386
|
|
|
2408
2387
|
|
|
2409
|
-
####
|
|
2388
|
+
#### transformFilters(oldFiltersObj, section)
|
|
2410
2389
|
|
|
2411
|
-
|
|
2390
|
+
Transform the old filters structure into the new one
|
|
2412
2391
|
|
|
2413
2392
|
|
|
2414
2393
|
|
|
@@ -2417,59 +2396,79 @@ Validates if the two arguments are objects
|
|
|
2417
2396
|
|
|
2418
2397
|
| Name | Type | Description | |
|
|
2419
2398
|
| ---- | ---- | ----------- | -------- |
|
|
2420
|
-
|
|
|
2421
|
-
|
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
##### Returns
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
- true: they are valid; false: they are not
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
#### getParamsToMergeDeep(settings)
|
|
2434
|
-
|
|
2435
|
-
Validates and gets the settings with all set parameters.
|
|
2399
|
+
| oldFiltersObj | `Object` | an object with the old filters structure | |
|
|
2400
|
+
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
2436
2401
|
|
|
2437
2402
|
|
|
2438
2403
|
|
|
2439
2404
|
|
|
2440
|
-
#####
|
|
2405
|
+
##### Examples
|
|
2441
2406
|
|
|
2442
|
-
|
|
2443
|
-
| ---- | ---- | ----------- | -------- |
|
|
2444
|
-
| settings | | the settings object | |
|
|
2407
|
+
```javascript
|
|
2445
2408
|
|
|
2409
|
+
const oldPreferenceFilters = {
|
|
2410
|
+
"WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
|
|
2411
|
+
"WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
|
|
2412
|
+
"WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
|
|
2413
|
+
"WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
|
|
2414
|
+
"WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
|
|
2415
|
+
"formulaId": null,
|
|
2416
|
+
"panelId": null,
|
|
2417
|
+
"values": [
|
|
2418
|
+
{
|
|
2419
|
+
"EQUALS": [
|
|
2420
|
+
{
|
|
2421
|
+
"id": "AK4M8UV2a0",
|
|
2422
|
+
"value": "A",
|
|
2423
|
+
"enabled": true,
|
|
2424
|
+
"imageUrl": null
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"id": "AK4M8UV2a1",
|
|
2428
|
+
"value": "B",
|
|
2429
|
+
"enabled": true,
|
|
2430
|
+
"imageUrl": null
|
|
2431
|
+
}
|
|
2432
|
+
]
|
|
2433
|
+
}
|
|
2434
|
+
],
|
|
2435
|
+
"bucketId": null,
|
|
2436
|
+
"text": "MC",
|
|
2437
|
+
"title": "MC",
|
|
2438
|
+
"type": "SINGLE_CHOICE",
|
|
2439
|
+
"qid": "AK4M8UV2",
|
|
2440
|
+
"dataset": {
|
|
2441
|
+
"sourceid": "xYOQAdpqT",
|
|
2442
|
+
"name": "Form All Questions",
|
|
2443
|
+
"qrveyid": "xYOQAdpqT",
|
|
2444
|
+
"text": "Form All Questions",
|
|
2445
|
+
"linkid": 0
|
|
2446
|
+
},
|
|
2447
|
+
"enabled": true,
|
|
2448
|
+
"linked": null
|
|
2449
|
+
}
|
|
2450
|
+
};
|
|
2446
2451
|
|
|
2452
|
+
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
2453
|
+
```
|
|
2447
2454
|
|
|
2448
2455
|
|
|
2449
2456
|
##### Returns
|
|
2450
2457
|
|
|
2451
2458
|
|
|
2452
|
-
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2459
|
+
- `Object` an object with the new filters structure
|
|
2455
2460
|
|
|
2456
2461
|
|
|
2457
|
-
### dist/general/object/objectCopy.js
|
|
2458
2462
|
|
|
2459
2463
|
|
|
2460
|
-
|
|
2464
|
+
### dist/filters/classes/FilterInputErrorHandler.js
|
|
2461
2465
|
|
|
2462
|
-
Created a new reference of the given argument
|
|
2463
2466
|
|
|
2467
|
+
#### new FilterInputErrorHandler()
|
|
2464
2468
|
|
|
2465
2469
|
|
|
2466
2470
|
|
|
2467
|
-
##### Parameters
|
|
2468
2471
|
|
|
2469
|
-
| Name | Type | Description | |
|
|
2470
|
-
| ---- | ---- | ----------- | -------- |
|
|
2471
|
-
| entity | | The variable to be copied | |
|
|
2472
|
-
| cache | | | |
|
|
2473
2472
|
|
|
2474
2473
|
|
|
2475
2474
|
|
|
@@ -2477,17 +2476,17 @@ Created a new reference of the given argument
|
|
|
2477
2476
|
##### Returns
|
|
2478
2477
|
|
|
2479
2478
|
|
|
2480
|
-
-
|
|
2479
|
+
- `Void`
|
|
2481
2480
|
|
|
2482
2481
|
|
|
2483
2482
|
|
|
2484
2483
|
|
|
2485
|
-
### dist/
|
|
2484
|
+
### dist/filters/helpers/applyHierarchyForAggFilters.js
|
|
2486
2485
|
|
|
2487
2486
|
|
|
2488
|
-
####
|
|
2487
|
+
#### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
|
|
2489
2488
|
|
|
2490
|
-
|
|
2489
|
+
[TODO: Make a proper description for this function]
|
|
2491
2490
|
|
|
2492
2491
|
|
|
2493
2492
|
|
|
@@ -2496,8 +2495,9 @@ return a new Object excluding attributes in _props_ list
|
|
|
2496
2495
|
|
|
2497
2496
|
| Name | Type | Description | |
|
|
2498
2497
|
| ---- | ---- | ----------- | -------- |
|
|
2499
|
-
|
|
|
2500
|
-
|
|
|
2498
|
+
| chartSettings | | Chart Settings for the Filter Builder | |
|
|
2499
|
+
| scopes | | | |
|
|
2500
|
+
| currentScope | | | |
|
|
2501
2501
|
|
|
2502
2502
|
|
|
2503
2503
|
|
|
@@ -2505,17 +2505,17 @@ return a new Object excluding attributes in _props_ list
|
|
|
2505
2505
|
##### Returns
|
|
2506
2506
|
|
|
2507
2507
|
|
|
2508
|
-
-
|
|
2508
|
+
-
|
|
2509
2509
|
|
|
2510
2510
|
|
|
2511
2511
|
|
|
2512
2512
|
|
|
2513
|
-
### dist/
|
|
2513
|
+
### dist/filters/helpers/getAvailableScopes.js
|
|
2514
2514
|
|
|
2515
2515
|
|
|
2516
|
-
####
|
|
2516
|
+
#### getAvailableScopes(config)
|
|
2517
2517
|
|
|
2518
|
-
|
|
2518
|
+
Gets Scopes/Scope IDs by given IDs
|
|
2519
2519
|
|
|
2520
2520
|
|
|
2521
2521
|
|
|
@@ -2524,8 +2524,7 @@ return a new object just with attributes in _keys_ list
|
|
|
2524
2524
|
|
|
2525
2525
|
| Name | Type | Description | |
|
|
2526
2526
|
| ---- | ---- | ----------- | -------- |
|
|
2527
|
-
|
|
|
2528
|
-
| keys | `Array.<String>` | list of attributes to preserve | |
|
|
2527
|
+
| config | | given Differnts IDs in order set a available scope | |
|
|
2529
2528
|
|
|
2530
2529
|
|
|
2531
2530
|
|
|
@@ -2533,17 +2532,17 @@ return a new object just with attributes in _keys_ list
|
|
|
2533
2532
|
##### Returns
|
|
2534
2533
|
|
|
2535
2534
|
|
|
2536
|
-
-
|
|
2535
|
+
- a Scopes/Scope IDs array
|
|
2537
2536
|
|
|
2538
2537
|
|
|
2539
2538
|
|
|
2540
2539
|
|
|
2541
|
-
### dist/
|
|
2540
|
+
### dist/filters/helpers/getAvailableScopesIDsByConfig.js
|
|
2542
2541
|
|
|
2543
2542
|
|
|
2544
|
-
####
|
|
2543
|
+
#### getAvailableScopesIDsByConfig(config)
|
|
2545
2544
|
|
|
2546
|
-
|
|
2545
|
+
Gets the Scopes IDS for the Available Scope function by any config
|
|
2547
2546
|
|
|
2548
2547
|
|
|
2549
2548
|
|
|
@@ -2552,7 +2551,7 @@ serialize object to url param
|
|
|
2552
2551
|
|
|
2553
2552
|
| Name | Type | Description | |
|
|
2554
2553
|
| ---- | ---- | ----------- | -------- |
|
|
2555
|
-
|
|
|
2554
|
+
| config | | any config | |
|
|
2556
2555
|
|
|
2557
2556
|
|
|
2558
2557
|
|
|
@@ -2560,17 +2559,17 @@ serialize object to url param
|
|
|
2560
2559
|
##### Returns
|
|
2561
2560
|
|
|
2562
2561
|
|
|
2563
|
-
-
|
|
2562
|
+
- a Available Scope IDS config
|
|
2564
2563
|
|
|
2565
2564
|
|
|
2566
2565
|
|
|
2567
2566
|
|
|
2568
|
-
### dist/
|
|
2567
|
+
### dist/filters/helpers/getScopesByHierarchy.js
|
|
2569
2568
|
|
|
2570
2569
|
|
|
2571
|
-
####
|
|
2570
|
+
#### getScopesByHierarchy(scopes, currentScope)
|
|
2572
2571
|
|
|
2573
|
-
|
|
2572
|
+
[TODO: Make a description for this]
|
|
2574
2573
|
|
|
2575
2574
|
|
|
2576
2575
|
|
|
@@ -2579,7 +2578,8 @@ Upper case the first letter of a given text
|
|
|
2579
2578
|
|
|
2580
2579
|
| Name | Type | Description | |
|
|
2581
2580
|
| ---- | ---- | ----------- | -------- |
|
|
2582
|
-
|
|
|
2581
|
+
| scopes | | the collection of Scopes/Scope IDs | |
|
|
2582
|
+
| currentScope | | Current scope type | |
|
|
2583
2583
|
|
|
2584
2584
|
|
|
2585
2585
|
|
|
@@ -2587,17 +2587,17 @@ Upper case the first letter of a given text
|
|
|
2587
2587
|
##### Returns
|
|
2588
2588
|
|
|
2589
2589
|
|
|
2590
|
-
-
|
|
2590
|
+
- A new array of Scopes/Scope IDs
|
|
2591
2591
|
|
|
2592
2592
|
|
|
2593
2593
|
|
|
2594
2594
|
|
|
2595
|
-
### dist/
|
|
2595
|
+
### dist/services/api/getAllDatasets.api.js
|
|
2596
2596
|
|
|
2597
2597
|
|
|
2598
|
-
####
|
|
2598
|
+
#### getAllDatasets(config, pickDatasets)
|
|
2599
2599
|
|
|
2600
|
-
Get
|
|
2600
|
+
Get a dataset list from a collection of Qrvey IDs
|
|
2601
2601
|
|
|
2602
2602
|
|
|
2603
2603
|
|
|
@@ -2606,7 +2606,8 @@ Get an string of the properties of the given column.
|
|
|
2606
2606
|
|
|
2607
2607
|
| Name | Type | Description | |
|
|
2608
2608
|
| ---- | ---- | ----------- | -------- |
|
|
2609
|
-
|
|
|
2609
|
+
| config | | the widget config. Includes the appid and others configuration properties | |
|
|
2610
|
+
| pickDatasets | | Collection of Qrvey IDs for filtering the request | |
|
|
2610
2611
|
|
|
2611
2612
|
|
|
2612
2613
|
|
|
@@ -2614,18 +2615,17 @@ Get an string of the properties of the given column.
|
|
|
2614
2615
|
##### Returns
|
|
2615
2616
|
|
|
2616
2617
|
|
|
2617
|
-
-
|
|
2618
|
+
- a promise
|
|
2618
2619
|
|
|
2619
2620
|
|
|
2620
2621
|
|
|
2621
2622
|
|
|
2622
|
-
### dist/
|
|
2623
|
+
### dist/services/api/getAllQrveys.api.js
|
|
2623
2624
|
|
|
2624
2625
|
|
|
2625
|
-
####
|
|
2626
|
+
#### getAllQrveys(config, params)
|
|
2626
2627
|
|
|
2627
|
-
|
|
2628
|
-
Add suffix into the value string. Prioritized for numeric values.
|
|
2628
|
+
POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
|
|
2629
2629
|
|
|
2630
2630
|
|
|
2631
2631
|
|
|
@@ -2634,8 +2634,8 @@ Add suffix into the value string. Prioritized for numeric values.
|
|
|
2634
2634
|
|
|
2635
2635
|
| Name | Type | Description | |
|
|
2636
2636
|
| ---- | ---- | ----------- | -------- |
|
|
2637
|
-
|
|
|
2638
|
-
|
|
|
2637
|
+
| config | | Configuration | |
|
|
2638
|
+
| params | | Object for getting precise data | |
|
|
2639
2639
|
|
|
2640
2640
|
|
|
2641
2641
|
|
|
@@ -2643,17 +2643,17 @@ Add suffix into the value string. Prioritized for numeric values.
|
|
|
2643
2643
|
##### Returns
|
|
2644
2644
|
|
|
2645
2645
|
|
|
2646
|
-
-
|
|
2646
|
+
- `Void`
|
|
2647
2647
|
|
|
2648
2648
|
|
|
2649
2649
|
|
|
2650
2650
|
|
|
2651
|
-
### dist/
|
|
2651
|
+
### dist/services/api/getDatasetColumns.api.js
|
|
2652
2652
|
|
|
2653
2653
|
|
|
2654
|
-
####
|
|
2654
|
+
#### getDatasetColumns(qrveyid)
|
|
2655
2655
|
|
|
2656
|
-
|
|
2656
|
+
Get a dataset by Qrvey ID
|
|
2657
2657
|
|
|
2658
2658
|
|
|
2659
2659
|
|
|
@@ -2662,8 +2662,7 @@ Transforms a value depending of localization/globalization and extras settings.
|
|
|
2662
2662
|
|
|
2663
2663
|
| Name | Type | Description | |
|
|
2664
2664
|
| ---- | ---- | ----------- | -------- |
|
|
2665
|
-
|
|
|
2666
|
-
| settings | | The settings of the transformValue function | |
|
|
2665
|
+
| qrveyid | | The Qrvey ID | |
|
|
2667
2666
|
|
|
2668
2667
|
|
|
2669
2668
|
|
|
@@ -2671,13 +2670,17 @@ Transforms a value depending of localization/globalization and extras settings.
|
|
|
2671
2670
|
##### Returns
|
|
2672
2671
|
|
|
2673
2672
|
|
|
2674
|
-
-
|
|
2673
|
+
- a promise
|
|
2675
2674
|
|
|
2676
2675
|
|
|
2677
2676
|
|
|
2678
|
-
#### getOutputFormat(settings)
|
|
2679
2677
|
|
|
2680
|
-
|
|
2678
|
+
### dist/qrvey/helpers/getColumnsLabel.js
|
|
2679
|
+
|
|
2680
|
+
|
|
2681
|
+
#### getColumnLabels(column)
|
|
2682
|
+
|
|
2683
|
+
Get an string of the properties of the given column.
|
|
2681
2684
|
|
|
2682
2685
|
|
|
2683
2686
|
|
|
@@ -2686,7 +2689,7 @@ Gets the outputformat settings
|
|
|
2686
2689
|
|
|
2687
2690
|
| Name | Type | Description | |
|
|
2688
2691
|
| ---- | ---- | ----------- | -------- |
|
|
2689
|
-
|
|
|
2692
|
+
| column | | The column | |
|
|
2690
2693
|
|
|
2691
2694
|
|
|
2692
2695
|
|
|
@@ -2694,13 +2697,18 @@ Gets the outputformat settings
|
|
|
2694
2697
|
##### Returns
|
|
2695
2698
|
|
|
2696
2699
|
|
|
2697
|
-
- the
|
|
2700
|
+
- an string with the property, aggregate or calculation label.
|
|
2698
2701
|
|
|
2699
2702
|
|
|
2700
2703
|
|
|
2701
|
-
#### getFormatConfig(settings)
|
|
2702
2704
|
|
|
2703
|
-
|
|
2705
|
+
### dist/qrvey/helpers/getValueWithSuffixes.js
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
#### getValueWithSuffixes(value, suffixes)
|
|
2709
|
+
|
|
2710
|
+
Get a string value with suffixes if available.
|
|
2711
|
+
Add suffix into the value string. Prioritized for numeric values.
|
|
2704
2712
|
|
|
2705
2713
|
|
|
2706
2714
|
|
|
@@ -2709,7 +2717,8 @@ Gets the format config
|
|
|
2709
2717
|
|
|
2710
2718
|
| Name | Type | Description | |
|
|
2711
2719
|
| ---- | ---- | ----------- | -------- |
|
|
2712
|
-
|
|
|
2720
|
+
| value | | a number or string | |
|
|
2721
|
+
| suffixes | | An object with singular or plural suffix string. | |
|
|
2713
2722
|
|
|
2714
2723
|
|
|
2715
2724
|
|
|
@@ -2717,17 +2726,17 @@ Gets the format config
|
|
|
2717
2726
|
##### Returns
|
|
2718
2727
|
|
|
2719
2728
|
|
|
2720
|
-
-
|
|
2729
|
+
- a string value with suffix
|
|
2721
2730
|
|
|
2722
2731
|
|
|
2723
2732
|
|
|
2724
2733
|
|
|
2725
|
-
### dist/
|
|
2734
|
+
### dist/qrvey/helpers/transformValue.js
|
|
2726
2735
|
|
|
2727
2736
|
|
|
2728
|
-
####
|
|
2737
|
+
#### transformValue(value, settings)
|
|
2729
2738
|
|
|
2730
|
-
|
|
2739
|
+
Transforms a value depending of localization/globalization and extras settings.
|
|
2731
2740
|
|
|
2732
2741
|
|
|
2733
2742
|
|
|
@@ -2736,8 +2745,8 @@ Get a dataset list from a collection of Qrvey IDs
|
|
|
2736
2745
|
|
|
2737
2746
|
| Name | Type | Description | |
|
|
2738
2747
|
| ---- | ---- | ----------- | -------- |
|
|
2739
|
-
|
|
|
2740
|
-
|
|
|
2748
|
+
| value | | A value to transform | |
|
|
2749
|
+
| settings | | The settings of the transformValue function | |
|
|
2741
2750
|
|
|
2742
2751
|
|
|
2743
2752
|
|
|
@@ -2745,17 +2754,13 @@ Get a dataset list from a collection of Qrvey IDs
|
|
|
2745
2754
|
##### Returns
|
|
2746
2755
|
|
|
2747
2756
|
|
|
2748
|
-
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2757
|
+
- A transformed value
|
|
2752
2758
|
|
|
2753
|
-
### dist/services/api/getAllQrveys.api.js
|
|
2754
2759
|
|
|
2755
2760
|
|
|
2756
|
-
####
|
|
2761
|
+
#### getOutputFormat(settings)
|
|
2757
2762
|
|
|
2758
|
-
|
|
2763
|
+
Gets the outputformat settings
|
|
2759
2764
|
|
|
2760
2765
|
|
|
2761
2766
|
|
|
@@ -2764,8 +2769,7 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
|
|
|
2764
2769
|
|
|
2765
2770
|
| Name | Type | Description | |
|
|
2766
2771
|
| ---- | ---- | ----------- | -------- |
|
|
2767
|
-
|
|
|
2768
|
-
| params | | Object for getting precise data | |
|
|
2772
|
+
| settings | | The settings of the transformValue function | |
|
|
2769
2773
|
|
|
2770
2774
|
|
|
2771
2775
|
|
|
@@ -2773,17 +2777,13 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
|
|
|
2773
2777
|
##### Returns
|
|
2774
2778
|
|
|
2775
2779
|
|
|
2776
|
-
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
+
- the outputformat settings
|
|
2780
2781
|
|
|
2781
|
-
### dist/services/api/getDatasetColumns.api.js
|
|
2782
2782
|
|
|
2783
2783
|
|
|
2784
|
-
####
|
|
2784
|
+
#### getFormatConfig(settings)
|
|
2785
2785
|
|
|
2786
|
-
|
|
2786
|
+
Gets the format config
|
|
2787
2787
|
|
|
2788
2788
|
|
|
2789
2789
|
|
|
@@ -2792,7 +2792,7 @@ Get a dataset by Qrvey ID
|
|
|
2792
2792
|
|
|
2793
2793
|
| Name | Type | Description | |
|
|
2794
2794
|
| ---- | ---- | ----------- | -------- |
|
|
2795
|
-
|
|
|
2795
|
+
| settings | | The settings of the transformValue function | |
|
|
2796
2796
|
|
|
2797
2797
|
|
|
2798
2798
|
|
|
@@ -2800,7 +2800,7 @@ Get a dataset by Qrvey ID
|
|
|
2800
2800
|
##### Returns
|
|
2801
2801
|
|
|
2802
2802
|
|
|
2803
|
-
-
|
|
2803
|
+
- the format config
|
|
2804
2804
|
|
|
2805
2805
|
|
|
2806
2806
|
|
|
@@ -2889,12 +2889,12 @@ try to find this string as a variable on Windows object
|
|
|
2889
2889
|
|
|
2890
2890
|
|
|
2891
2891
|
|
|
2892
|
-
### dist/typescript/decorators/
|
|
2892
|
+
### dist/typescript/decorators/Debounce.js
|
|
2893
2893
|
|
|
2894
2894
|
|
|
2895
|
-
####
|
|
2895
|
+
#### Debounce(time)
|
|
2896
2896
|
|
|
2897
|
-
(Method Decorator)
|
|
2897
|
+
(Method Decorator) Debounce Class Method
|
|
2898
2898
|
|
|
2899
2899
|
|
|
2900
2900
|
|
|
@@ -2916,12 +2916,12 @@ try to find this string as a variable on Windows object
|
|
|
2916
2916
|
|
|
2917
2917
|
|
|
2918
2918
|
|
|
2919
|
-
### dist/typescript/decorators/
|
|
2919
|
+
### dist/typescript/decorators/Throttled.js
|
|
2920
2920
|
|
|
2921
2921
|
|
|
2922
|
-
####
|
|
2922
|
+
#### Throttled(time)
|
|
2923
2923
|
|
|
2924
|
-
(Method Decorator)
|
|
2924
|
+
(Method Decorator) Throttled Class Method
|
|
2925
2925
|
|
|
2926
2926
|
|
|
2927
2927
|
|
|
@@ -3025,33 +3025,6 @@ Parses a string date and returns a dayjs date
|
|
|
3025
3025
|
|
|
3026
3026
|
|
|
3027
3027
|
|
|
3028
|
-
### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
#### getFilterBuilderGeneralConfig(config)
|
|
3032
|
-
|
|
3033
|
-
Returns a filter builder config object by a any given config
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
##### Parameters
|
|
3039
|
-
|
|
3040
|
-
| Name | Type | Description | |
|
|
3041
|
-
| ---- | ---- | ----------- | -------- |
|
|
3042
|
-
| config | | any config object | |
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
##### Returns
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
- The filter builder config object
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
3028
|
### dist/filters/helpers/backend/buildExpression.js
|
|
3056
3029
|
|
|
3057
3030
|
|
|
@@ -3348,12 +3321,12 @@ Gets filters from the logic by the scopes hierarchy.
|
|
|
3348
3321
|
|
|
3349
3322
|
|
|
3350
3323
|
|
|
3351
|
-
### dist/filters/helpers/
|
|
3324
|
+
### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
|
|
3352
3325
|
|
|
3353
3326
|
|
|
3354
|
-
####
|
|
3327
|
+
#### getFilterBuilderGeneralConfig(config)
|
|
3355
3328
|
|
|
3356
|
-
|
|
3329
|
+
Returns a filter builder config object by a any given config
|
|
3357
3330
|
|
|
3358
3331
|
|
|
3359
3332
|
|
|
@@ -3362,8 +3335,7 @@ Validates if both filters are the same
|
|
|
3362
3335
|
|
|
3363
3336
|
| Name | Type | Description | |
|
|
3364
3337
|
| ---- | ---- | ----------- | -------- |
|
|
3365
|
-
|
|
|
3366
|
-
| filter2 | | filter 2 | |
|
|
3338
|
+
| config | | any config object | |
|
|
3367
3339
|
|
|
3368
3340
|
|
|
3369
3341
|
|
|
@@ -3371,7 +3343,7 @@ Validates if both filters are the same
|
|
|
3371
3343
|
##### Returns
|
|
3372
3344
|
|
|
3373
3345
|
|
|
3374
|
-
-
|
|
3346
|
+
- The filter builder config object
|
|
3375
3347
|
|
|
3376
3348
|
|
|
3377
3349
|
|
|
@@ -3403,6 +3375,34 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
|
|
|
3403
3375
|
|
|
3404
3376
|
|
|
3405
3377
|
|
|
3378
|
+
### dist/filters/helpers/common/areFiltersEquals.js
|
|
3379
|
+
|
|
3380
|
+
|
|
3381
|
+
#### areFiltersEquals(filter1, filter2)
|
|
3382
|
+
|
|
3383
|
+
Validates if both filters are the same
|
|
3384
|
+
|
|
3385
|
+
|
|
3386
|
+
|
|
3387
|
+
|
|
3388
|
+
##### Parameters
|
|
3389
|
+
|
|
3390
|
+
| Name | Type | Description | |
|
|
3391
|
+
| ---- | ---- | ----------- | -------- |
|
|
3392
|
+
| filter1 | | filter 1 | |
|
|
3393
|
+
| filter2 | | filter 2 | |
|
|
3394
|
+
|
|
3395
|
+
|
|
3396
|
+
|
|
3397
|
+
|
|
3398
|
+
##### Returns
|
|
3399
|
+
|
|
3400
|
+
|
|
3401
|
+
- true: the filters are equal; false: the filters are NOT equal
|
|
3402
|
+
|
|
3403
|
+
|
|
3404
|
+
|
|
3405
|
+
|
|
3406
3406
|
### dist/filters/helpers/common/excludeFiltersByParams.js
|
|
3407
3407
|
|
|
3408
3408
|
|
|
@@ -3817,12 +3817,12 @@ Validates if the given validator is a Between type
|
|
|
3817
3817
|
|
|
3818
3818
|
|
|
3819
3819
|
|
|
3820
|
-
### dist/filters/helpers/common/
|
|
3820
|
+
### dist/filters/helpers/common/isInValidator.js
|
|
3821
3821
|
|
|
3822
3822
|
|
|
3823
|
-
####
|
|
3823
|
+
#### isInValidator(validator)
|
|
3824
3824
|
|
|
3825
|
-
|
|
3825
|
+
Validates if the given validator is a In type
|
|
3826
3826
|
|
|
3827
3827
|
|
|
3828
3828
|
|
|
@@ -3831,8 +3831,7 @@ Determines if the filter column and property is a distinct group dates type
|
|
|
3831
3831
|
|
|
3832
3832
|
| Name | Type | Description | |
|
|
3833
3833
|
| ---- | ---- | ----------- | -------- |
|
|
3834
|
-
|
|
|
3835
|
-
| property | | The filter property | |
|
|
3834
|
+
| validator | | The validator | |
|
|
3836
3835
|
|
|
3837
3836
|
|
|
3838
3837
|
|
|
@@ -3840,17 +3839,17 @@ Determines if the filter column and property is a distinct group dates type
|
|
|
3840
3839
|
##### Returns
|
|
3841
3840
|
|
|
3842
3841
|
|
|
3843
|
-
-
|
|
3842
|
+
- true: it is a In validator; false: it is not a In validator
|
|
3844
3843
|
|
|
3845
3844
|
|
|
3846
3845
|
|
|
3847
3846
|
|
|
3848
|
-
### dist/filters/helpers/common/
|
|
3847
|
+
### dist/filters/helpers/common/isDateDistinctProperty.js
|
|
3849
3848
|
|
|
3850
3849
|
|
|
3851
|
-
####
|
|
3850
|
+
#### isDateDistinctProperty(column, property)
|
|
3852
3851
|
|
|
3853
|
-
|
|
3852
|
+
Determines if the filter column and property is a distinct group dates type
|
|
3854
3853
|
|
|
3855
3854
|
|
|
3856
3855
|
|
|
@@ -3859,7 +3858,8 @@ Validates if the given validator is a In type
|
|
|
3859
3858
|
|
|
3860
3859
|
| Name | Type | Description | |
|
|
3861
3860
|
| ---- | ---- | ----------- | -------- |
|
|
3862
|
-
|
|
|
3861
|
+
| column | | The filter column | |
|
|
3862
|
+
| property | | The filter property | |
|
|
3863
3863
|
|
|
3864
3864
|
|
|
3865
3865
|
|
|
@@ -3867,7 +3867,7 @@ Validates if the given validator is a In type
|
|
|
3867
3867
|
##### Returns
|
|
3868
3868
|
|
|
3869
3869
|
|
|
3870
|
-
-
|
|
3870
|
+
- True if the given property is included from distinct group dates type
|
|
3871
3871
|
|
|
3872
3872
|
|
|
3873
3873
|
|
|
@@ -4082,10 +4082,10 @@ Gets a new value structure array by merging two value structures
|
|
|
4082
4082
|
|
|
4083
4083
|
|
|
4084
4084
|
|
|
4085
|
-
### dist/filters/helpers/common/
|
|
4085
|
+
### dist/filters/helpers/common/resolveFilterConditions.js
|
|
4086
4086
|
|
|
4087
4087
|
|
|
4088
|
-
####
|
|
4088
|
+
#### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
|
|
4089
4089
|
|
|
4090
4090
|
Resolves the conditions by given params
|
|
4091
4091
|
|
|
@@ -4096,8 +4096,8 @@ Resolves the conditions by given params
|
|
|
4096
4096
|
|
|
4097
4097
|
| Name | Type | Description | |
|
|
4098
4098
|
| ---- | ---- | ----------- | -------- |
|
|
4099
|
-
| filter | | The
|
|
4100
|
-
| params | | given parameters to validate the
|
|
4099
|
+
| filter | | The filter | |
|
|
4100
|
+
| params | | given parameters to validate the filter | |
|
|
4101
4101
|
| letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | |
|
|
4102
4102
|
| letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | |
|
|
4103
4103
|
|
|
@@ -4112,10 +4112,10 @@ Resolves the conditions by given params
|
|
|
4112
4112
|
|
|
4113
4113
|
|
|
4114
4114
|
|
|
4115
|
-
### dist/filters/helpers/common/
|
|
4115
|
+
### dist/filters/helpers/common/resolveDatasetConditions.js
|
|
4116
4116
|
|
|
4117
4117
|
|
|
4118
|
-
####
|
|
4118
|
+
#### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
|
|
4119
4119
|
|
|
4120
4120
|
Resolves the conditions by given params
|
|
4121
4121
|
|
|
@@ -4126,8 +4126,8 @@ Resolves the conditions by given params
|
|
|
4126
4126
|
|
|
4127
4127
|
| Name | Type | Description | |
|
|
4128
4128
|
| ---- | ---- | ----------- | -------- |
|
|
4129
|
-
| filter | | The
|
|
4130
|
-
| params | | given parameters to validate the
|
|
4129
|
+
| filter | | The dataset structure | |
|
|
4130
|
+
| params | | given parameters to validate the dataset | |
|
|
4131
4131
|
| letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | |
|
|
4132
4132
|
| letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | |
|
|
4133
4133
|
|
|
@@ -4199,12 +4199,12 @@ Excludes Aggregate Filters in the Flattened UI Filters array
|
|
|
4199
4199
|
|
|
4200
4200
|
|
|
4201
4201
|
|
|
4202
|
-
### dist/filters/helpers/ui/
|
|
4202
|
+
### dist/filters/helpers/ui/getFilterPropertyLabel.js
|
|
4203
4203
|
|
|
4204
4204
|
|
|
4205
|
-
####
|
|
4205
|
+
#### getFilterPropertyLabel(filter)
|
|
4206
4206
|
|
|
4207
|
-
|
|
4207
|
+
Gets the label of the filter property
|
|
4208
4208
|
|
|
4209
4209
|
|
|
4210
4210
|
|
|
@@ -4213,8 +4213,7 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
|
|
|
4213
4213
|
|
|
4214
4214
|
| Name | Type | Description | |
|
|
4215
4215
|
| ---- | ---- | ----------- | -------- |
|
|
4216
|
-
|
|
|
4217
|
-
| scopes | | collection of scopes types | |
|
|
4216
|
+
| filter | | The UI Filter | |
|
|
4218
4217
|
|
|
4219
4218
|
|
|
4220
4219
|
|
|
@@ -4222,17 +4221,17 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
|
|
|
4222
4221
|
##### Returns
|
|
4223
4222
|
|
|
4224
4223
|
|
|
4225
|
-
-
|
|
4224
|
+
- a string of the filter property label
|
|
4226
4225
|
|
|
4227
4226
|
|
|
4228
4227
|
|
|
4229
4228
|
|
|
4230
|
-
### dist/filters/helpers/ui/
|
|
4229
|
+
### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
|
|
4231
4230
|
|
|
4232
4231
|
|
|
4233
|
-
####
|
|
4232
|
+
#### excludeUIFlatFiltersByScopes(uFilters, scopes)
|
|
4234
4233
|
|
|
4235
|
-
|
|
4234
|
+
Excludes and returns a UI Flat Filters without filters by the given scopes
|
|
4236
4235
|
|
|
4237
4236
|
|
|
4238
4237
|
|
|
@@ -4241,7 +4240,8 @@ Gets the label of the filter property
|
|
|
4241
4240
|
|
|
4242
4241
|
| Name | Type | Description | |
|
|
4243
4242
|
| ---- | ---- | ----------- | -------- |
|
|
4244
|
-
|
|
|
4243
|
+
| uFilters | | The Flatten UI Filters | |
|
|
4244
|
+
| scopes | | collection of scopes types | |
|
|
4245
4245
|
|
|
4246
4246
|
|
|
4247
4247
|
|
|
@@ -4249,7 +4249,7 @@ Gets the label of the filter property
|
|
|
4249
4249
|
##### Returns
|
|
4250
4250
|
|
|
4251
4251
|
|
|
4252
|
-
-
|
|
4252
|
+
- The new array of UI Flattened filters
|
|
4253
4253
|
|
|
4254
4254
|
|
|
4255
4255
|
|