@qrvey/utils 1.2.0-0 → 1.2.0-1
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 +707 -707
- package/dist/cjs/dates/constants/DATE_GROUPING_TIME_PROPERTY_LABEL.d.ts +1 -1
- package/dist/cjs/dates/constants/DATE_GROUPING_TIME_PROPERTY_LABEL.js +1 -1
- package/dist/dates/constants/DATE_GROUPING_TIME_PROPERTY_LABEL.d.ts +1 -1
- package/dist/dates/constants/DATE_GROUPING_TIME_PROPERTY_LABEL.js +1 -1
- package/package.json +1 -1
- package/src/dates/constants/DATE_GROUPING_TIME_PROPERTY_LABEL.ts +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.0-
|
|
1
|
+
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.0-1*
|
|
2
2
|
|
|
3
3
|
> Helper, Utils for all Qrvey Projects
|
|
4
4
|
|
|
@@ -80,12 +80,12 @@ Get a text and evaluate if it matchs with a token box label.
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
### dist/
|
|
83
|
+
### dist/dates/range/getDateRange.js
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
####
|
|
86
|
+
#### getDateRange(value, dateGroupLabel, withTime)
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Get date range object from a string date value
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
@@ -94,59 +94,74 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
94
94
|
|
|
95
95
|
| Name | Type | Description | |
|
|
96
96
|
| ---- | ---- | ----------- | -------- |
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
97
|
+
| value | `String` | string date value | |
|
|
98
|
+
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
99
|
+
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
##### Returns
|
|
104
103
|
|
|
104
|
+
##### Examples
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
```javascript
|
|
107
|
+
// 1) Year:
|
|
108
|
+
getDateRange('2020', 'YEAR');
|
|
109
|
+
// Will return:
|
|
110
|
+
{
|
|
111
|
+
from: '01/01/2020 00:00:00',
|
|
112
|
+
to: '12/31/2020 23:59:59'
|
|
113
|
+
}
|
|
107
114
|
|
|
115
|
+
// 2) Quarter:
|
|
116
|
+
getDateRange('Q3 2020', 'QUARTER');
|
|
117
|
+
// Will return:
|
|
118
|
+
{
|
|
119
|
+
from: '07/01/2020 00:00:00',
|
|
120
|
+
to: '09/30/2020 23:59:59'
|
|
121
|
+
}
|
|
108
122
|
|
|
123
|
+
// 3) Month:
|
|
124
|
+
getDateRange('Oct 2020', 'MONTH');
|
|
125
|
+
// Will return:
|
|
126
|
+
{
|
|
127
|
+
from: '10/01/2020 00:00:00',
|
|
128
|
+
to: '10/31/2020 23:59:59'
|
|
129
|
+
}
|
|
130
|
+
```
|
|
109
131
|
|
|
110
|
-
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
111
132
|
|
|
112
|
-
|
|
133
|
+
##### Returns
|
|
113
134
|
|
|
114
135
|
|
|
136
|
+
- `Object` an object with the date range with two string date properties: from and to
|
|
115
137
|
|
|
116
138
|
|
|
117
|
-
##### Parameters
|
|
118
139
|
|
|
119
|
-
| Name | Type | Description | |
|
|
120
|
-
| ---- | ---- | ----------- | -------- |
|
|
121
|
-
| scopes | | The filter scope section | |
|
|
122
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
123
140
|
|
|
141
|
+
### dist/dates/relative/Adapter.js
|
|
124
142
|
|
|
125
143
|
|
|
144
|
+
#### value()
|
|
126
145
|
|
|
127
|
-
|
|
146
|
+
Resolves statement and returns statement value
|
|
128
147
|
|
|
129
148
|
|
|
130
|
-
- a flattened UI filters array
|
|
131
149
|
|
|
132
150
|
|
|
133
151
|
|
|
134
152
|
|
|
135
|
-
|
|
153
|
+
##### Returns
|
|
136
154
|
|
|
137
155
|
|
|
138
|
-
|
|
156
|
+
- `AbsoluteRange` `string`
|
|
139
157
|
|
|
140
|
-
Generates a Filter Logic structure from Filter Data structure.
|
|
141
158
|
|
|
142
159
|
|
|
160
|
+
#### valueAsAnchor()
|
|
143
161
|
|
|
162
|
+
Resolves statement as an anchor
|
|
144
163
|
|
|
145
|
-
##### Parameters
|
|
146
164
|
|
|
147
|
-
| Name | Type | Description | |
|
|
148
|
-
| ---- | ---- | ----------- | -------- |
|
|
149
|
-
| filterData | | The filter data object. | |
|
|
150
165
|
|
|
151
166
|
|
|
152
167
|
|
|
@@ -154,22 +169,15 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
154
169
|
##### Returns
|
|
155
170
|
|
|
156
171
|
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
#### getLogicBodyFromFD21(filterData)
|
|
172
|
+
- `string`
|
|
162
173
|
|
|
163
|
-
Gets the logic body
|
|
164
174
|
|
|
165
175
|
|
|
176
|
+
#### _statementToRange() *private method*
|
|
166
177
|
|
|
178
|
+
Convert verbal statement to range value
|
|
167
179
|
|
|
168
|
-
##### Parameters
|
|
169
180
|
|
|
170
|
-
| Name | Type | Description | |
|
|
171
|
-
| ---- | ---- | ----------- | -------- |
|
|
172
|
-
| filterData | | The filter data object | |
|
|
173
181
|
|
|
174
182
|
|
|
175
183
|
|
|
@@ -177,71 +185,61 @@ Gets the logic body
|
|
|
177
185
|
##### Returns
|
|
178
186
|
|
|
179
187
|
|
|
180
|
-
-
|
|
188
|
+
- `AbsoluteRange`
|
|
181
189
|
|
|
182
190
|
|
|
183
191
|
|
|
192
|
+
#### _resolveAsThis() *private method*
|
|
184
193
|
|
|
185
|
-
|
|
194
|
+
Apply 'this' cursor logic to statement
|
|
186
195
|
|
|
187
196
|
|
|
188
|
-
#### FDToUI(filterData, datasetsInfo)
|
|
189
197
|
|
|
190
|
-
Generates a UI filter structure from Filter Data structure.
|
|
191
198
|
|
|
192
199
|
|
|
193
200
|
|
|
201
|
+
##### Returns
|
|
194
202
|
|
|
195
|
-
##### Parameters
|
|
196
203
|
|
|
197
|
-
|
|
198
|
-
| ---- | ---- | ----------- | -------- |
|
|
199
|
-
| filterData | | The filter data object. | |
|
|
200
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
204
|
+
- `AbsoluteStatement`
|
|
201
205
|
|
|
202
206
|
|
|
203
207
|
|
|
208
|
+
#### _resolveAsTheLast() *private method*
|
|
204
209
|
|
|
205
|
-
|
|
210
|
+
Apply 'the last' cursor logic to statement
|
|
206
211
|
|
|
207
212
|
|
|
208
|
-
- a UI Filters structure
|
|
209
213
|
|
|
210
214
|
|
|
211
215
|
|
|
212
|
-
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
213
216
|
|
|
214
|
-
|
|
217
|
+
##### Returns
|
|
215
218
|
|
|
216
219
|
|
|
220
|
+
- `AbsoluteStatement`
|
|
217
221
|
|
|
218
222
|
|
|
219
|
-
##### Parameters
|
|
220
223
|
|
|
221
|
-
|
|
222
|
-
| ---- | ---- | ----------- | -------- |
|
|
223
|
-
| scopes | | The filter scope section | |
|
|
224
|
-
| section | | The filter section. | |
|
|
225
|
-
| version | | The version of the filter structure | |
|
|
226
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
224
|
+
#### _resolveAsTheNext() *private method*
|
|
227
225
|
|
|
226
|
+
Apply 'the next' cursor logic to statement
|
|
228
227
|
|
|
229
228
|
|
|
230
229
|
|
|
231
|
-
##### Returns
|
|
232
230
|
|
|
233
231
|
|
|
234
|
-
- a UI filter Structure
|
|
235
232
|
|
|
233
|
+
##### Returns
|
|
236
234
|
|
|
237
235
|
|
|
236
|
+
- `AbsoluteStatement`
|
|
238
237
|
|
|
239
|
-
### dist/filters/adapters/UIToFD.js
|
|
240
238
|
|
|
241
239
|
|
|
242
|
-
####
|
|
240
|
+
#### replaceNowToken(value, now)
|
|
243
241
|
|
|
244
|
-
|
|
242
|
+
Replace '@now' token inside a string
|
|
245
243
|
|
|
246
244
|
|
|
247
245
|
|
|
@@ -250,7 +248,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
250
248
|
|
|
251
249
|
| Name | Type | Description | |
|
|
252
250
|
| ---- | ---- | ----------- | -------- |
|
|
253
|
-
|
|
|
251
|
+
| value | `string` | | |
|
|
252
|
+
| now | `Date` | | |
|
|
254
253
|
|
|
255
254
|
|
|
256
255
|
|
|
@@ -258,13 +257,13 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
258
257
|
##### Returns
|
|
259
258
|
|
|
260
259
|
|
|
261
|
-
-
|
|
260
|
+
- `string`
|
|
262
261
|
|
|
263
262
|
|
|
264
263
|
|
|
265
|
-
####
|
|
264
|
+
#### convertRelativeToAbsolute(args)
|
|
266
265
|
|
|
267
|
-
|
|
266
|
+
Returns a range object (date) from a group of statement params
|
|
268
267
|
|
|
269
268
|
|
|
270
269
|
|
|
@@ -273,26 +272,45 @@ Builds the Fitler Data structure from UI filter data
|
|
|
273
272
|
|
|
274
273
|
| Name | Type | Description | |
|
|
275
274
|
| ---- | ---- | ----------- | -------- |
|
|
276
|
-
|
|
|
277
|
-
| version | | the version of the structure | |
|
|
275
|
+
| args | `RelativeToAbsoluteStruct` | | |
|
|
278
276
|
|
|
279
277
|
|
|
280
278
|
|
|
281
279
|
|
|
280
|
+
##### Examples
|
|
281
|
+
|
|
282
|
+
```javascript
|
|
283
|
+
pivot = '2021-03-03T12:30:40'
|
|
284
|
+
unit = month
|
|
285
|
+
steps = 2
|
|
286
|
+
setTo = END
|
|
287
|
+
resolverAsCalendar: true
|
|
288
|
+
=> Returns '2021-05-31T23:59:59'
|
|
289
|
+
```
|
|
290
|
+
```javascript
|
|
291
|
+
pivot = '2021-03-03T12:30:40'
|
|
292
|
+
unit = month
|
|
293
|
+
steps = -2
|
|
294
|
+
setTo = START
|
|
295
|
+
resolverAsCalendar: false
|
|
296
|
+
=> Returns '2021-01-03T00:00:00'
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
|
|
282
300
|
##### Returns
|
|
283
301
|
|
|
284
302
|
|
|
285
|
-
-
|
|
303
|
+
- `string`
|
|
286
304
|
|
|
287
305
|
|
|
288
306
|
|
|
289
307
|
|
|
290
|
-
### dist/
|
|
308
|
+
### dist/dates/relative/relative.js
|
|
291
309
|
|
|
292
310
|
|
|
293
|
-
####
|
|
311
|
+
#### resolveRelative(statements, clock)
|
|
294
312
|
|
|
295
|
-
|
|
313
|
+
Resolve a list of relative statements according to operator
|
|
296
314
|
|
|
297
315
|
|
|
298
316
|
|
|
@@ -301,22 +319,44 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
301
319
|
|
|
302
320
|
| Name | Type | Description | |
|
|
303
321
|
| ---- | ---- | ----------- | -------- |
|
|
304
|
-
|
|
|
305
|
-
|
|
|
322
|
+
| statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | |
|
|
323
|
+
| clock | `Date` | - Clock/time reference for relative date resolution | |
|
|
306
324
|
|
|
307
325
|
|
|
308
326
|
|
|
309
327
|
|
|
328
|
+
##### Examples
|
|
329
|
+
|
|
330
|
+
```javascript
|
|
331
|
+
Input:
|
|
332
|
+
{
|
|
333
|
+
"cursor": "the_next",
|
|
334
|
+
"unit": "year",
|
|
335
|
+
"number": 1,
|
|
336
|
+
"includeCurrent": false,
|
|
337
|
+
"isCalendarDate": false,
|
|
338
|
+
"anchor": "03/05/2021"
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
Output:
|
|
342
|
+
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
|
|
310
346
|
##### Returns
|
|
311
347
|
|
|
312
348
|
|
|
313
|
-
-
|
|
349
|
+
- `Array.<AbsoluteRange>` `Array.<string>`
|
|
314
350
|
|
|
315
351
|
|
|
316
352
|
|
|
317
|
-
#### UI21ToFlatUI(scopes)
|
|
318
353
|
|
|
319
|
-
|
|
354
|
+
### dist/filters/adapters/FDToLogic.js
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
#### FDToLogic(filterData)
|
|
358
|
+
|
|
359
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
320
360
|
|
|
321
361
|
|
|
322
362
|
|
|
@@ -325,7 +365,7 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
325
365
|
|
|
326
366
|
| Name | Type | Description | |
|
|
327
367
|
| ---- | ---- | ----------- | -------- |
|
|
328
|
-
|
|
|
368
|
+
| filterData | | The filter data object. | |
|
|
329
369
|
|
|
330
370
|
|
|
331
371
|
|
|
@@ -333,18 +373,13 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
333
373
|
##### Returns
|
|
334
374
|
|
|
335
375
|
|
|
336
|
-
- a
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
376
|
+
- a filter logic array
|
|
340
377
|
|
|
341
|
-
### dist/filters/adapters/adaptDateGroupingProperty.js
|
|
342
378
|
|
|
343
379
|
|
|
344
|
-
####
|
|
380
|
+
#### getLogicBodyFromFD21(filterData)
|
|
345
381
|
|
|
346
|
-
|
|
347
|
-
Get the new property base on the old date grouping properties
|
|
382
|
+
Gets the logic body
|
|
348
383
|
|
|
349
384
|
|
|
350
385
|
|
|
@@ -353,7 +388,7 @@ Get the new property base on the old date grouping properties
|
|
|
353
388
|
|
|
354
389
|
| Name | Type | Description | |
|
|
355
390
|
| ---- | ---- | ----------- | -------- |
|
|
356
|
-
|
|
|
391
|
+
| filterData | | The filter data object | |
|
|
357
392
|
|
|
358
393
|
|
|
359
394
|
|
|
@@ -361,17 +396,17 @@ Get the new property base on the old date grouping properties
|
|
|
361
396
|
##### Returns
|
|
362
397
|
|
|
363
398
|
|
|
364
|
-
-
|
|
399
|
+
- a filter logic array
|
|
365
400
|
|
|
366
401
|
|
|
367
402
|
|
|
368
403
|
|
|
369
|
-
### dist/filters/adapters/
|
|
404
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
370
405
|
|
|
371
406
|
|
|
372
|
-
####
|
|
407
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
373
408
|
|
|
374
|
-
|
|
409
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
375
410
|
|
|
376
411
|
|
|
377
412
|
|
|
@@ -380,9 +415,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
380
415
|
|
|
381
416
|
| Name | Type | Description | |
|
|
382
417
|
| ---- | ---- | ----------- | -------- |
|
|
383
|
-
| filterData | | The filter data
|
|
384
|
-
|
|
|
385
|
-
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
418
|
+
| filterData | | The filter data object. | |
|
|
419
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
386
420
|
|
|
387
421
|
|
|
388
422
|
|
|
@@ -390,18 +424,13 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
390
424
|
##### Returns
|
|
391
425
|
|
|
392
426
|
|
|
393
|
-
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
427
|
+
- a flattened UI filters array
|
|
397
428
|
|
|
398
|
-
### dist/filters/adapters/adaptFilterValues.js
|
|
399
429
|
|
|
400
430
|
|
|
401
|
-
####
|
|
431
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
402
432
|
|
|
403
|
-
|
|
404
|
-
Gets an adapted filter value array. Validates the enabled property and sets
|
|
433
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
405
434
|
|
|
406
435
|
|
|
407
436
|
|
|
@@ -410,7 +439,8 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
410
439
|
|
|
411
440
|
| Name | Type | Description | |
|
|
412
441
|
| ---- | ---- | ----------- | -------- |
|
|
413
|
-
|
|
|
442
|
+
| scopes | | The filter scope section | |
|
|
443
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
414
444
|
|
|
415
445
|
|
|
416
446
|
|
|
@@ -418,17 +448,17 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
418
448
|
##### Returns
|
|
419
449
|
|
|
420
450
|
|
|
421
|
-
-
|
|
451
|
+
- a flattened UI filters array
|
|
422
452
|
|
|
423
453
|
|
|
424
454
|
|
|
425
455
|
|
|
426
|
-
### dist/filters/adapters/
|
|
456
|
+
### dist/filters/adapters/FDToUI.js
|
|
427
457
|
|
|
428
458
|
|
|
429
|
-
####
|
|
459
|
+
#### FDToUI(filterData, datasetsInfo)
|
|
430
460
|
|
|
431
|
-
Generates a filter
|
|
461
|
+
Generates a UI filter structure from Filter Data structure.
|
|
432
462
|
|
|
433
463
|
|
|
434
464
|
|
|
@@ -437,8 +467,8 @@ Generates a filter data structure from the flatttened UI filters.
|
|
|
437
467
|
|
|
438
468
|
| Name | Type | Description | |
|
|
439
469
|
| ---- | ---- | ----------- | -------- |
|
|
440
|
-
|
|
|
441
|
-
|
|
|
470
|
+
| filterData | | The filter data object. | |
|
|
471
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
442
472
|
|
|
443
473
|
|
|
444
474
|
|
|
@@ -446,14 +476,13 @@ Generates a filter data structure from the flatttened UI filters.
|
|
|
446
476
|
##### Returns
|
|
447
477
|
|
|
448
478
|
|
|
449
|
-
- a
|
|
479
|
+
- a UI Filters structure
|
|
450
480
|
|
|
451
481
|
|
|
452
482
|
|
|
453
|
-
####
|
|
483
|
+
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
454
484
|
|
|
455
|
-
|
|
456
|
-
Also, adds and organizes filters by datasets
|
|
485
|
+
Generates a UI filter Structure from the Filter Data structure v2.1
|
|
457
486
|
|
|
458
487
|
|
|
459
488
|
|
|
@@ -462,7 +491,10 @@ Also, adds and organizes filters by datasets
|
|
|
462
491
|
|
|
463
492
|
| Name | Type | Description | |
|
|
464
493
|
| ---- | ---- | ----------- | -------- |
|
|
465
|
-
|
|
|
494
|
+
| scopes | | The filter scope section | |
|
|
495
|
+
| section | | The filter section. | |
|
|
496
|
+
| version | | The version of the filter structure | |
|
|
497
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
466
498
|
|
|
467
499
|
|
|
468
500
|
|
|
@@ -470,13 +502,17 @@ Also, adds and organizes filters by datasets
|
|
|
470
502
|
##### Returns
|
|
471
503
|
|
|
472
504
|
|
|
473
|
-
-
|
|
505
|
+
- a UI filter Structure
|
|
474
506
|
|
|
475
507
|
|
|
476
508
|
|
|
477
|
-
#### buildScope(uFilter)
|
|
478
509
|
|
|
479
|
-
|
|
510
|
+
### dist/filters/adapters/UIToFD.js
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
#### UIToFD(filterData)
|
|
514
|
+
|
|
515
|
+
Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
480
516
|
|
|
481
517
|
|
|
482
518
|
|
|
@@ -485,7 +521,7 @@ Gets an scope structure for the filter data
|
|
|
485
521
|
|
|
486
522
|
| Name | Type | Description | |
|
|
487
523
|
| ---- | ---- | ----------- | -------- |
|
|
488
|
-
|
|
|
524
|
+
| filterData | | The UI filter data object. | |
|
|
489
525
|
|
|
490
526
|
|
|
491
527
|
|
|
@@ -493,13 +529,13 @@ Gets an scope structure for the filter data
|
|
|
493
529
|
##### Returns
|
|
494
530
|
|
|
495
531
|
|
|
496
|
-
-
|
|
532
|
+
- a Filter Data structure
|
|
497
533
|
|
|
498
534
|
|
|
499
535
|
|
|
500
|
-
####
|
|
536
|
+
#### UI21ToFD(uFilterData, version)
|
|
501
537
|
|
|
502
|
-
|
|
538
|
+
Builds the Fitler Data structure from UI filter data
|
|
503
539
|
|
|
504
540
|
|
|
505
541
|
|
|
@@ -508,7 +544,8 @@ Gets an dataset structure for the filter data
|
|
|
508
544
|
|
|
509
545
|
| Name | Type | Description | |
|
|
510
546
|
| ---- | ---- | ----------- | -------- |
|
|
511
|
-
|
|
|
547
|
+
| uFilterData | | The UI filter Data object | |
|
|
548
|
+
| version | | the version of the structure | |
|
|
512
549
|
|
|
513
550
|
|
|
514
551
|
|
|
@@ -516,13 +553,17 @@ Gets an dataset structure for the filter data
|
|
|
516
553
|
##### Returns
|
|
517
554
|
|
|
518
555
|
|
|
519
|
-
-
|
|
556
|
+
-
|
|
520
557
|
|
|
521
558
|
|
|
522
559
|
|
|
523
|
-
#### buildFilter(uFilter)
|
|
524
560
|
|
|
525
|
-
|
|
561
|
+
### dist/filters/adapters/UIToFlatUI.js
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
#### UIToFlatUI(filterData, datasetsInfo)
|
|
565
|
+
|
|
566
|
+
Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
526
567
|
|
|
527
568
|
|
|
528
569
|
|
|
@@ -531,7 +572,8 @@ Gets an filter structure for the filter data
|
|
|
531
572
|
|
|
532
573
|
| Name | Type | Description | |
|
|
533
574
|
| ---- | ---- | ----------- | -------- |
|
|
534
|
-
|
|
|
575
|
+
| filterData | | The UI filter data object. | |
|
|
576
|
+
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
535
577
|
|
|
536
578
|
|
|
537
579
|
|
|
@@ -539,17 +581,40 @@ Gets an filter structure for the filter data
|
|
|
539
581
|
##### Returns
|
|
540
582
|
|
|
541
583
|
|
|
542
|
-
-
|
|
584
|
+
- a flattened UI filters array
|
|
543
585
|
|
|
544
586
|
|
|
545
587
|
|
|
588
|
+
#### UI21ToFlatUI(scopes)
|
|
546
589
|
|
|
547
|
-
|
|
590
|
+
Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
##### Parameters
|
|
596
|
+
|
|
597
|
+
| Name | Type | Description | |
|
|
598
|
+
| ---- | ---- | ----------- | -------- |
|
|
599
|
+
| scopes | | The filter scope section | |
|
|
548
600
|
|
|
549
601
|
|
|
550
|
-
#### flatUIToLogic(uFilter)
|
|
551
602
|
|
|
552
|
-
|
|
603
|
+
|
|
604
|
+
##### Returns
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
- a flattened UI filters array
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
### dist/filters/adapters/adaptFilterData.js
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
#### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
|
|
616
|
+
|
|
617
|
+
Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
553
618
|
|
|
554
619
|
|
|
555
620
|
|
|
@@ -558,7 +623,9 @@ Generates a Logic structure from flattened UI filters
|
|
|
558
623
|
|
|
559
624
|
| Name | Type | Description | |
|
|
560
625
|
| ---- | ---- | ----------- | -------- |
|
|
561
|
-
|
|
|
626
|
+
| filterData | | The filter data structure. Accepts both v2.1 or v2.0 | |
|
|
627
|
+
| getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | |
|
|
628
|
+
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
562
629
|
|
|
563
630
|
|
|
564
631
|
|
|
@@ -566,17 +633,73 @@ Generates a Logic structure from flattened UI filters
|
|
|
566
633
|
##### Returns
|
|
567
634
|
|
|
568
635
|
|
|
569
|
-
-
|
|
636
|
+
- A new filter data structure v2.1
|
|
570
637
|
|
|
571
638
|
|
|
572
639
|
|
|
573
640
|
|
|
574
|
-
### dist/filters/adapters/
|
|
641
|
+
### dist/filters/adapters/adaptDateGroupingProperty.js
|
|
575
642
|
|
|
576
643
|
|
|
577
|
-
####
|
|
644
|
+
#### adaptDateGroupingProperty(property)
|
|
578
645
|
|
|
579
|
-
|
|
646
|
+
[TODO: For 2022, eliminate this adapter]
|
|
647
|
+
Get the new property base on the old date grouping properties
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
##### Parameters
|
|
653
|
+
|
|
654
|
+
| Name | Type | Description | |
|
|
655
|
+
| ---- | ---- | ----------- | -------- |
|
|
656
|
+
| property | | | |
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
##### Returns
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
-
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
### dist/filters/adapters/adaptFilterValues.js
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
#### adaptFilterValues(filter)
|
|
673
|
+
|
|
674
|
+
[TODO: For 2022, eliminate this adapter]
|
|
675
|
+
Gets an adapted filter value array. Validates the enabled property and sets
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
##### Parameters
|
|
681
|
+
|
|
682
|
+
| Name | Type | Description | |
|
|
683
|
+
| ---- | ---- | ----------- | -------- |
|
|
684
|
+
| filter | | The filter | |
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
##### Returns
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
- A new value array with the filled properties.
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
### dist/filters/adapters/flatUIToFD.js
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
#### flatUIToFD(uFilters, version)
|
|
701
|
+
|
|
702
|
+
Generates a filter data structure from the flatttened UI filters.
|
|
580
703
|
|
|
581
704
|
|
|
582
705
|
|
|
@@ -594,13 +717,13 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
594
717
|
##### Returns
|
|
595
718
|
|
|
596
719
|
|
|
597
|
-
- a
|
|
720
|
+
- a Filter Data.
|
|
598
721
|
|
|
599
722
|
|
|
600
723
|
|
|
601
724
|
#### buildScopes(fbFilters)
|
|
602
725
|
|
|
603
|
-
Gets an array of scopes structure for the
|
|
726
|
+
Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
|
|
604
727
|
Also, adds and organizes filters by datasets
|
|
605
728
|
|
|
606
729
|
|
|
@@ -624,7 +747,7 @@ Also, adds and organizes filters by datasets
|
|
|
624
747
|
|
|
625
748
|
#### buildScope(uFilter)
|
|
626
749
|
|
|
627
|
-
Gets an scope structure for the
|
|
750
|
+
Gets an scope structure for the filter data
|
|
628
751
|
|
|
629
752
|
|
|
630
753
|
|
|
@@ -647,7 +770,7 @@ Gets an scope structure for the UI filter data
|
|
|
647
770
|
|
|
648
771
|
#### buildDataset(uFilter)
|
|
649
772
|
|
|
650
|
-
Gets an dataset structure for the
|
|
773
|
+
Gets an dataset structure for the filter data
|
|
651
774
|
|
|
652
775
|
|
|
653
776
|
|
|
@@ -670,7 +793,7 @@ Gets an dataset structure for the UI filter data
|
|
|
670
793
|
|
|
671
794
|
#### buildFilter(uFilter)
|
|
672
795
|
|
|
673
|
-
Gets an filter structure for the
|
|
796
|
+
Gets an filter structure for the filter data
|
|
674
797
|
|
|
675
798
|
|
|
676
799
|
|
|
@@ -692,6 +815,33 @@ Gets an filter structure for the UI filter data
|
|
|
692
815
|
|
|
693
816
|
|
|
694
817
|
|
|
818
|
+
### dist/filters/adapters/flatUIToLogic.js
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
#### flatUIToLogic(uFilter)
|
|
822
|
+
|
|
823
|
+
Generates a Logic structure from flattened UI filters
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
##### Parameters
|
|
829
|
+
|
|
830
|
+
| Name | Type | Description | |
|
|
831
|
+
| ---- | ---- | ----------- | -------- |
|
|
832
|
+
| uFilter | | Array of flat filters from UI | |
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
##### Returns
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
- The logic structure
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
|
|
695
845
|
### dist/filters/adapters/flatUIToOldLogic.js
|
|
696
846
|
|
|
697
847
|
|
|
@@ -719,12 +869,12 @@ Generates a Logic structure from flattened UI filters
|
|
|
719
869
|
|
|
720
870
|
|
|
721
871
|
|
|
722
|
-
### dist/filters/adapters/
|
|
872
|
+
### dist/filters/adapters/flatUIToUI.js
|
|
723
873
|
|
|
724
874
|
|
|
725
|
-
####
|
|
875
|
+
#### flatUIToUI(uFilters, version)
|
|
726
876
|
|
|
727
|
-
Generates a filter data structure from the
|
|
877
|
+
Generates a UI filter data structure from the flatttened UI filters.
|
|
728
878
|
|
|
729
879
|
|
|
730
880
|
|
|
@@ -733,7 +883,7 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
733
883
|
|
|
734
884
|
| Name | Type | Description | |
|
|
735
885
|
| ---- | ---- | ----------- | -------- |
|
|
736
|
-
|
|
|
886
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
737
887
|
| version | | Tag for the version of the filter data structure | |
|
|
738
888
|
|
|
739
889
|
|
|
@@ -742,17 +892,37 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
742
892
|
##### Returns
|
|
743
893
|
|
|
744
894
|
|
|
745
|
-
- a Filter Data.
|
|
895
|
+
- a UI Filter Data.
|
|
746
896
|
|
|
747
897
|
|
|
748
898
|
|
|
899
|
+
#### buildScopes(fbFilters)
|
|
749
900
|
|
|
750
|
-
|
|
901
|
+
Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
|
|
902
|
+
Also, adds and organizes filters by datasets
|
|
751
903
|
|
|
752
904
|
|
|
753
|
-
#### logicToFlatUI(logics)
|
|
754
905
|
|
|
755
|
-
|
|
906
|
+
|
|
907
|
+
##### Parameters
|
|
908
|
+
|
|
909
|
+
| Name | Type | Description | |
|
|
910
|
+
| ---- | ---- | ----------- | -------- |
|
|
911
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
##### Returns
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
- an array of scopes structure.
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
#### buildScope(uFilter)
|
|
924
|
+
|
|
925
|
+
Gets an scope structure for the UI filter data
|
|
756
926
|
|
|
757
927
|
|
|
758
928
|
|
|
@@ -761,7 +931,7 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
761
931
|
|
|
762
932
|
| Name | Type | Description | |
|
|
763
933
|
| ---- | ---- | ----------- | -------- |
|
|
764
|
-
|
|
|
934
|
+
| uFilter | | UI structure filter | |
|
|
765
935
|
|
|
766
936
|
|
|
767
937
|
|
|
@@ -769,13 +939,13 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
769
939
|
##### Returns
|
|
770
940
|
|
|
771
941
|
|
|
772
|
-
-
|
|
942
|
+
- an scope structure
|
|
773
943
|
|
|
774
944
|
|
|
775
945
|
|
|
776
|
-
####
|
|
946
|
+
#### buildDataset(uFilter)
|
|
777
947
|
|
|
778
|
-
|
|
948
|
+
Gets an dataset structure for the UI filter data
|
|
779
949
|
|
|
780
950
|
|
|
781
951
|
|
|
@@ -784,9 +954,7 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
784
954
|
|
|
785
955
|
| Name | Type | Description | |
|
|
786
956
|
| ---- | ---- | ----------- | -------- |
|
|
787
|
-
|
|
|
788
|
-
| filter | | The old logic structure filter | |
|
|
789
|
-
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
957
|
+
| uFilter | | a UI structure filter | |
|
|
790
958
|
|
|
791
959
|
|
|
792
960
|
|
|
@@ -794,13 +962,13 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
794
962
|
##### Returns
|
|
795
963
|
|
|
796
964
|
|
|
797
|
-
-
|
|
965
|
+
- an dataset structure
|
|
798
966
|
|
|
799
967
|
|
|
800
968
|
|
|
801
|
-
####
|
|
969
|
+
#### buildFilter(uFilter)
|
|
802
970
|
|
|
803
|
-
|
|
971
|
+
Gets an filter structure for the UI filter data
|
|
804
972
|
|
|
805
973
|
|
|
806
974
|
|
|
@@ -809,8 +977,7 @@ Refines the values of the Ranking column type.
|
|
|
809
977
|
|
|
810
978
|
| Name | Type | Description | |
|
|
811
979
|
| ---- | ---- | ----------- | -------- |
|
|
812
|
-
|
|
|
813
|
-
| uiValues | | Object with additional info about the values of the filter. | |
|
|
980
|
+
| uFilter | | a UI structure filter | |
|
|
814
981
|
|
|
815
982
|
|
|
816
983
|
|
|
@@ -818,17 +985,17 @@ Refines the values of the Ranking column type.
|
|
|
818
985
|
##### Returns
|
|
819
986
|
|
|
820
987
|
|
|
821
|
-
-
|
|
988
|
+
- an filter structure
|
|
822
989
|
|
|
823
990
|
|
|
824
991
|
|
|
825
992
|
|
|
826
|
-
### dist/filters/adapters/
|
|
993
|
+
### dist/filters/adapters/logicToFD.js
|
|
827
994
|
|
|
828
995
|
|
|
829
|
-
####
|
|
996
|
+
#### logicToFD(filterData, version)
|
|
830
997
|
|
|
831
|
-
Generates a
|
|
998
|
+
Generates a filter data structure from the old logic structure (v2.0).
|
|
832
999
|
|
|
833
1000
|
|
|
834
1001
|
|
|
@@ -837,8 +1004,8 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
837
1004
|
|
|
838
1005
|
| Name | Type | Description | |
|
|
839
1006
|
| ---- | ---- | ----------- | -------- |
|
|
840
|
-
|
|
|
841
|
-
|
|
|
1007
|
+
| filterData | | The old filter data structure with logic (v2.0) | |
|
|
1008
|
+
| version | | Tag for the version of the filter data structure | |
|
|
842
1009
|
|
|
843
1010
|
|
|
844
1011
|
|
|
@@ -846,17 +1013,17 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
846
1013
|
##### Returns
|
|
847
1014
|
|
|
848
1015
|
|
|
849
|
-
- a
|
|
1016
|
+
- a Filter Data.
|
|
850
1017
|
|
|
851
1018
|
|
|
852
1019
|
|
|
853
1020
|
|
|
854
|
-
### dist/filters/adapters/
|
|
1021
|
+
### dist/filters/adapters/logicToFlatUI.js
|
|
855
1022
|
|
|
856
1023
|
|
|
857
|
-
####
|
|
1024
|
+
#### logicToFlatUI(logics)
|
|
858
1025
|
|
|
859
|
-
|
|
1026
|
+
Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
860
1027
|
|
|
861
1028
|
|
|
862
1029
|
|
|
@@ -865,21 +1032,125 @@ Transform the old filters structure into the new one
|
|
|
865
1032
|
|
|
866
1033
|
| Name | Type | Description | |
|
|
867
1034
|
| ---- | ---- | ----------- | -------- |
|
|
868
|
-
|
|
|
869
|
-
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
1035
|
+
| logics | | The old logic structure (v2.0) | |
|
|
870
1036
|
|
|
871
1037
|
|
|
872
1038
|
|
|
873
1039
|
|
|
874
|
-
#####
|
|
1040
|
+
##### Returns
|
|
875
1041
|
|
|
876
|
-
```javascript
|
|
877
1042
|
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
1043
|
+
- The Flattened UI Filters array
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
#### getFilter(filters, filter, getIndex)
|
|
1048
|
+
|
|
1049
|
+
Get the filter or the index of the given array, validating an old filter structure.
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
##### Parameters
|
|
1055
|
+
|
|
1056
|
+
| Name | Type | Description | |
|
|
1057
|
+
| ---- | ---- | ----------- | -------- |
|
|
1058
|
+
| filters | | The array of UI filters | |
|
|
1059
|
+
| filter | | The old logic structure filter | |
|
|
1060
|
+
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
##### Returns
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
- the index or the UI filter object
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
#### refineRankingValues(values, uiValues)
|
|
1073
|
+
|
|
1074
|
+
Refines the values of the Ranking column type.
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
##### Parameters
|
|
1080
|
+
|
|
1081
|
+
| Name | Type | Description | |
|
|
1082
|
+
| ---- | ---- | ----------- | -------- |
|
|
1083
|
+
| values | | the Array of Ranking values | |
|
|
1084
|
+
| uiValues | | Object with additional info about the values of the filter. | |
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
##### Returns
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
- the array of Ranking values
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
### dist/filters/adapters/logicToUI.js
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
#### logicToUI(uFilters, datasetsInfo)
|
|
1101
|
+
|
|
1102
|
+
Generates a UI filter structure from the old logic structure (v2.0).
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
##### Parameters
|
|
1108
|
+
|
|
1109
|
+
| Name | Type | Description | |
|
|
1110
|
+
| ---- | ---- | ----------- | -------- |
|
|
1111
|
+
| uFilters | | Array of filters from old logic structure | |
|
|
1112
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
##### Returns
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
- a UI Filter Data.
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
### dist/filters/adapters/transformFilters.js
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
#### transformFilters(oldFiltersObj, section)
|
|
1129
|
+
|
|
1130
|
+
Transform the old filters structure into the new one
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
##### Parameters
|
|
1136
|
+
|
|
1137
|
+
| Name | Type | Description | |
|
|
1138
|
+
| ---- | ---- | ----------- | -------- |
|
|
1139
|
+
| oldFiltersObj | `Object` | an object with the old filters structure | |
|
|
1140
|
+
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
##### Examples
|
|
1146
|
+
|
|
1147
|
+
```javascript
|
|
1148
|
+
|
|
1149
|
+
const oldPreferenceFilters = {
|
|
1150
|
+
"WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
|
|
1151
|
+
"WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
|
|
1152
|
+
"WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
|
|
1153
|
+
"WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
|
|
883
1154
|
"WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
|
|
884
1155
|
"formulaId": null,
|
|
885
1156
|
"panelId": null,
|
|
@@ -1184,89 +1455,6 @@ Gets the last index from the array by a callback condition
|
|
|
1184
1455
|
|
|
1185
1456
|
|
|
1186
1457
|
|
|
1187
|
-
### dist/general/function/debounce.js
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
#### debounce(fn, time)
|
|
1191
|
-
|
|
1192
|
-
Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
##### Parameters
|
|
1198
|
-
|
|
1199
|
-
| Name | Type | Description | |
|
|
1200
|
-
| ---- | ---- | ----------- | -------- |
|
|
1201
|
-
| fn | `Function` | original Function | |
|
|
1202
|
-
| time | `Number` | default 500ms | |
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
##### Returns
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
- `Function` debounced functions
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
### dist/general/function/throttled.js
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
#### throttled(fn, time)
|
|
1219
|
-
|
|
1220
|
-
Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
##### Parameters
|
|
1226
|
-
|
|
1227
|
-
| Name | Type | Description | |
|
|
1228
|
-
| ---- | ---- | ----------- | -------- |
|
|
1229
|
-
| fn | `Function` | original Function | |
|
|
1230
|
-
| time | `Number` | default 500ms | |
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
##### Returns
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
- `Function` throttled function
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
### dist/general/string/capitalize.js
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
#### capitalize(text)
|
|
1247
|
-
|
|
1248
|
-
Upper case the first letter of a given text
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
##### Parameters
|
|
1254
|
-
|
|
1255
|
-
| Name | Type | Description | |
|
|
1256
|
-
| ---- | ---- | ----------- | -------- |
|
|
1257
|
-
| text | `String` | | |
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
##### Returns
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
- `String` a capitalized text
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
1458
|
### dist/general/mix/getTag.js
|
|
1271
1459
|
|
|
1272
1460
|
|
|
@@ -1494,13 +1682,12 @@ Gets the length of the given array.
|
|
|
1494
1682
|
|
|
1495
1683
|
|
|
1496
1684
|
|
|
1497
|
-
### dist/general/
|
|
1685
|
+
### dist/general/function/debounce.js
|
|
1498
1686
|
|
|
1499
1687
|
|
|
1500
|
-
####
|
|
1688
|
+
#### debounce(fn, time)
|
|
1501
1689
|
|
|
1502
|
-
|
|
1503
|
-
Not to use this function with inner objects and functions
|
|
1690
|
+
Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
|
|
1504
1691
|
|
|
1505
1692
|
|
|
1506
1693
|
|
|
@@ -1509,7 +1696,8 @@ Not to use this function with inner objects and functions
|
|
|
1509
1696
|
|
|
1510
1697
|
| Name | Type | Description | |
|
|
1511
1698
|
| ---- | ---- | ----------- | -------- |
|
|
1512
|
-
|
|
|
1699
|
+
| fn | `Function` | original Function | |
|
|
1700
|
+
| time | `Number` | default 500ms | |
|
|
1513
1701
|
|
|
1514
1702
|
|
|
1515
1703
|
|
|
@@ -1517,21 +1705,17 @@ Not to use this function with inner objects and functions
|
|
|
1517
1705
|
##### Returns
|
|
1518
1706
|
|
|
1519
1707
|
|
|
1520
|
-
-
|
|
1521
|
-
|
|
1708
|
+
- `Function` debounced functions
|
|
1522
1709
|
|
|
1523
1710
|
|
|
1524
1711
|
|
|
1525
|
-
### dist/general/object/get.js
|
|
1526
1712
|
|
|
1713
|
+
### dist/general/function/throttled.js
|
|
1527
1714
|
|
|
1528
|
-
#### _get(baseObject, path, defaultValue)
|
|
1529
1715
|
|
|
1530
|
-
|
|
1531
|
-
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
1716
|
+
#### throttled(fn, time)
|
|
1532
1717
|
|
|
1533
|
-
|
|
1534
|
-
Undefined and null values will return the defaultValue.
|
|
1718
|
+
Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
1535
1719
|
|
|
1536
1720
|
|
|
1537
1721
|
|
|
@@ -1540,55 +1724,142 @@ Undefined and null values will return the defaultValue.
|
|
|
1540
1724
|
|
|
1541
1725
|
| Name | Type | Description | |
|
|
1542
1726
|
| ---- | ---- | ----------- | -------- |
|
|
1543
|
-
|
|
|
1544
|
-
|
|
|
1545
|
-
| defaultValue | | The value returned for undefined resolved values. | |
|
|
1727
|
+
| fn | `Function` | original Function | |
|
|
1728
|
+
| time | `Number` | default 500ms | |
|
|
1546
1729
|
|
|
1547
1730
|
|
|
1548
1731
|
|
|
1549
1732
|
|
|
1550
|
-
#####
|
|
1733
|
+
##### Returns
|
|
1551
1734
|
|
|
1552
|
-
```javascript
|
|
1553
|
-
// returns 'Hello'
|
|
1554
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
1555
|
-
```
|
|
1556
|
-
```javascript
|
|
1557
|
-
// returns 'A simple Hello'
|
|
1558
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
1559
|
-
```
|
|
1560
|
-
```javascript
|
|
1561
|
-
// returns 'Hello Again'
|
|
1562
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
1563
|
-
```
|
|
1564
|
-
```javascript
|
|
1565
|
-
// returns 'Hello 2'
|
|
1566
|
-
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
1567
|
-
```
|
|
1568
|
-
```javascript
|
|
1569
|
-
// returns 'Hello Again'
|
|
1570
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
1571
|
-
```
|
|
1572
1735
|
|
|
1736
|
+
- `Function` throttled function
|
|
1573
1737
|
|
|
1574
|
-
##### Returns
|
|
1575
1738
|
|
|
1576
1739
|
|
|
1577
|
-
- the resolved value.
|
|
1578
1740
|
|
|
1741
|
+
### dist/general/string/capitalize.js
|
|
1579
1742
|
|
|
1580
1743
|
|
|
1744
|
+
#### capitalize(text)
|
|
1581
1745
|
|
|
1582
|
-
|
|
1746
|
+
Upper case the first letter of a given text
|
|
1583
1747
|
|
|
1584
1748
|
|
|
1585
|
-
#### getAttribute(obj, key)
|
|
1586
1749
|
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1750
|
+
|
|
1751
|
+
##### Parameters
|
|
1752
|
+
|
|
1753
|
+
| Name | Type | Description | |
|
|
1754
|
+
| ---- | ---- | ----------- | -------- |
|
|
1755
|
+
| text | `String` | | |
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
##### Returns
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
- `String` a capitalized text
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
### dist/general/object/cloneDeep.js
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
#### cloneDeep(obj)
|
|
1772
|
+
|
|
1773
|
+
A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
|
|
1774
|
+
Not to use this function with inner objects and functions
|
|
1775
|
+
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
##### Parameters
|
|
1780
|
+
|
|
1781
|
+
| Name | Type | Description | |
|
|
1782
|
+
| ---- | ---- | ----------- | -------- |
|
|
1783
|
+
| obj | | The object | |
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
##### Returns
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
- The new reference object or the given object if the parsing is incorrect or empty
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
### dist/general/object/get.js
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
#### _get(baseObject, path, defaultValue)
|
|
1800
|
+
|
|
1801
|
+
Like lodash _.get.
|
|
1802
|
+
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
1803
|
+
|
|
1804
|
+
Empty arrays and empty objects are returned but the defaultValue is not
|
|
1805
|
+
Undefined and null values will return the defaultValue.
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
##### Parameters
|
|
1811
|
+
|
|
1812
|
+
| Name | Type | Description | |
|
|
1813
|
+
| ---- | ---- | ----------- | -------- |
|
|
1814
|
+
| baseObject | | The object to query | |
|
|
1815
|
+
| path | | The string path or collection of string paths of the property to get. | |
|
|
1816
|
+
| defaultValue | | The value returned for undefined resolved values. | |
|
|
1817
|
+
|
|
1818
|
+
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
##### Examples
|
|
1822
|
+
|
|
1823
|
+
```javascript
|
|
1824
|
+
// returns 'Hello'
|
|
1825
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
1826
|
+
```
|
|
1827
|
+
```javascript
|
|
1828
|
+
// returns 'A simple Hello'
|
|
1829
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
1830
|
+
```
|
|
1831
|
+
```javascript
|
|
1832
|
+
// returns 'Hello Again'
|
|
1833
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
1834
|
+
```
|
|
1835
|
+
```javascript
|
|
1836
|
+
// returns 'Hello 2'
|
|
1837
|
+
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
1838
|
+
```
|
|
1839
|
+
```javascript
|
|
1840
|
+
// returns 'Hello Again'
|
|
1841
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
1842
|
+
```
|
|
1843
|
+
|
|
1844
|
+
|
|
1845
|
+
##### Returns
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
- the resolved value.
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
### dist/general/object/getAttribute.js
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
#### getAttribute(obj, key)
|
|
1857
|
+
|
|
1858
|
+
Searchs for properties in different case styles such as: lower, upper, camel and pascal
|
|
1859
|
+
- To optimize the searching, it is required a key in a snake_case style
|
|
1860
|
+
- List of cases that do not match
|
|
1861
|
+
-- From lower to snake case
|
|
1862
|
+
-- From upper to snake case
|
|
1592
1863
|
-- From lower to camel case
|
|
1593
1864
|
-- From upper to camel case
|
|
1594
1865
|
-- From lower to pascal case
|
|
@@ -1829,39 +2100,12 @@ serialize object to url param
|
|
|
1829
2100
|
|
|
1830
2101
|
|
|
1831
2102
|
|
|
1832
|
-
### dist/
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
#### getColumnLabels(column)
|
|
1836
|
-
|
|
1837
|
-
Get an string of the properties of the given column.
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
##### Parameters
|
|
1843
|
-
|
|
1844
|
-
| Name | Type | Description | |
|
|
1845
|
-
| ---- | ---- | ----------- | -------- |
|
|
1846
|
-
| column | | The column | |
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
##### Returns
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
- an string with the property, aggregate or calculation label.
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
### dist/dates/range/getDateRange.js
|
|
2103
|
+
### dist/services/api/getAllDatasets.api.js
|
|
1860
2104
|
|
|
1861
2105
|
|
|
1862
|
-
####
|
|
2106
|
+
#### getAllDatasets(qrveyids)
|
|
1863
2107
|
|
|
1864
|
-
Get
|
|
2108
|
+
Get a dataset list from a collection of Qrvey IDs
|
|
1865
2109
|
|
|
1866
2110
|
|
|
1867
2111
|
|
|
@@ -1870,138 +2114,7 @@ Get date range object from a string date value
|
|
|
1870
2114
|
|
|
1871
2115
|
| Name | Type | Description | |
|
|
1872
2116
|
| ---- | ---- | ----------- | -------- |
|
|
1873
|
-
|
|
|
1874
|
-
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
1875
|
-
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
##### Examples
|
|
1881
|
-
|
|
1882
|
-
```javascript
|
|
1883
|
-
// 1) Year:
|
|
1884
|
-
getDateRange('2020', 'YEAR');
|
|
1885
|
-
// Will return:
|
|
1886
|
-
{
|
|
1887
|
-
from: '01/01/2020 00:00:00',
|
|
1888
|
-
to: '12/31/2020 23:59:59'
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
// 2) Quarter:
|
|
1892
|
-
getDateRange('Q3 2020', 'QUARTER');
|
|
1893
|
-
// Will return:
|
|
1894
|
-
{
|
|
1895
|
-
from: '07/01/2020 00:00:00',
|
|
1896
|
-
to: '09/30/2020 23:59:59'
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
// 3) Month:
|
|
1900
|
-
getDateRange('Oct 2020', 'MONTH');
|
|
1901
|
-
// Will return:
|
|
1902
|
-
{
|
|
1903
|
-
from: '10/01/2020 00:00:00',
|
|
1904
|
-
to: '10/31/2020 23:59:59'
|
|
1905
|
-
}
|
|
1906
|
-
```
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
##### Returns
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
- `Object` an object with the date range with two string date properties: from and to
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
### dist/dates/relative/Adapter.js
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
#### value()
|
|
1921
|
-
|
|
1922
|
-
Resolves statement and returns statement value
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
##### Returns
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
- `AbsoluteRange` `string`
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
#### valueAsAnchor()
|
|
1937
|
-
|
|
1938
|
-
Resolves statement as an anchor
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
##### Returns
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
- `string`
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
#### _statementToRange() *private method*
|
|
1953
|
-
|
|
1954
|
-
Convert verbal statement to range value
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
##### Returns
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
- `AbsoluteRange`
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
#### _resolveAsThis() *private method*
|
|
1969
|
-
|
|
1970
|
-
Apply 'this' cursor logic to statement
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
##### Returns
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
- `AbsoluteStatement`
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
#### _resolveAsTheLast() *private method*
|
|
1985
|
-
|
|
1986
|
-
Apply 'the last' cursor logic to statement
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
##### Returns
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
- `AbsoluteStatement`
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
#### _resolveAsTheNext() *private method*
|
|
2001
|
-
|
|
2002
|
-
Apply 'the next' cursor logic to statement
|
|
2003
|
-
|
|
2004
|
-
|
|
2117
|
+
| qrveyids | | Collection of Qrvey IDs | |
|
|
2005
2118
|
|
|
2006
2119
|
|
|
2007
2120
|
|
|
@@ -2009,37 +2122,17 @@ Apply 'the next' cursor logic to statement
|
|
|
2009
2122
|
##### Returns
|
|
2010
2123
|
|
|
2011
2124
|
|
|
2012
|
-
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
#### replaceNowToken(value, now)
|
|
2017
|
-
|
|
2018
|
-
Replace '@now' token inside a string
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
##### Parameters
|
|
2024
|
-
|
|
2025
|
-
| Name | Type | Description | |
|
|
2026
|
-
| ---- | ---- | ----------- | -------- |
|
|
2027
|
-
| value | `string` | | |
|
|
2028
|
-
| now | `Date` | | |
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2125
|
+
- a promise
|
|
2032
2126
|
|
|
2033
|
-
##### Returns
|
|
2034
2127
|
|
|
2035
2128
|
|
|
2036
|
-
- `string`
|
|
2037
2129
|
|
|
2130
|
+
### dist/services/api/getAllQrveys.api.js
|
|
2038
2131
|
|
|
2039
2132
|
|
|
2040
|
-
####
|
|
2133
|
+
#### getAllQrveys(config, params)
|
|
2041
2134
|
|
|
2042
|
-
|
|
2135
|
+
POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
|
|
2043
2136
|
|
|
2044
2137
|
|
|
2045
2138
|
|
|
@@ -2048,45 +2141,26 @@ Returns a range object (date) from a group of statement params
|
|
|
2048
2141
|
|
|
2049
2142
|
| Name | Type | Description | |
|
|
2050
2143
|
| ---- | ---- | ----------- | -------- |
|
|
2051
|
-
|
|
|
2052
|
-
|
|
2144
|
+
| config | | Configuration | |
|
|
2145
|
+
| params | | Object for getting precise data | |
|
|
2053
2146
|
|
|
2054
2147
|
|
|
2055
2148
|
|
|
2056
|
-
##### Examples
|
|
2057
|
-
|
|
2058
|
-
```javascript
|
|
2059
|
-
pivot = '2021-03-03T12:30:40'
|
|
2060
|
-
unit = month
|
|
2061
|
-
steps = 2
|
|
2062
|
-
setTo = END
|
|
2063
|
-
resolverAsCalendar: true
|
|
2064
|
-
=> Returns '2021-05-31T23:59:59'
|
|
2065
|
-
```
|
|
2066
|
-
```javascript
|
|
2067
|
-
pivot = '2021-03-03T12:30:40'
|
|
2068
|
-
unit = month
|
|
2069
|
-
steps = -2
|
|
2070
|
-
setTo = START
|
|
2071
|
-
resolverAsCalendar: false
|
|
2072
|
-
=> Returns '2021-01-03T00:00:00'
|
|
2073
|
-
```
|
|
2074
|
-
|
|
2075
2149
|
|
|
2076
2150
|
##### Returns
|
|
2077
2151
|
|
|
2078
2152
|
|
|
2079
|
-
- `
|
|
2153
|
+
- `Void`
|
|
2080
2154
|
|
|
2081
2155
|
|
|
2082
2156
|
|
|
2083
2157
|
|
|
2084
|
-
### dist/
|
|
2158
|
+
### dist/services/api/getDatasetColumns.api.js
|
|
2085
2159
|
|
|
2086
2160
|
|
|
2087
|
-
####
|
|
2161
|
+
#### getDatasetColumns(qrveyid)
|
|
2088
2162
|
|
|
2089
|
-
|
|
2163
|
+
Get a dataset by Qrvey ID
|
|
2090
2164
|
|
|
2091
2165
|
|
|
2092
2166
|
|
|
@@ -2095,44 +2169,25 @@ Resolve a list of relative statements according to operator
|
|
|
2095
2169
|
|
|
2096
2170
|
| Name | Type | Description | |
|
|
2097
2171
|
| ---- | ---- | ----------- | -------- |
|
|
2098
|
-
|
|
|
2099
|
-
| clock | `Date` | - Clock/time reference for relative date resolution | |
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
##### Examples
|
|
2172
|
+
| qrveyid | | The Qrvey ID | |
|
|
2105
2173
|
|
|
2106
|
-
```javascript
|
|
2107
|
-
Input:
|
|
2108
|
-
{
|
|
2109
|
-
"cursor": "the_next",
|
|
2110
|
-
"unit": "year",
|
|
2111
|
-
"number": 1,
|
|
2112
|
-
"includeCurrent": false,
|
|
2113
|
-
"isCalendarDate": false,
|
|
2114
|
-
"anchor": "03/05/2021"
|
|
2115
|
-
}
|
|
2116
2174
|
|
|
2117
|
-
Output:
|
|
2118
|
-
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
2119
|
-
```
|
|
2120
2175
|
|
|
2121
2176
|
|
|
2122
2177
|
##### Returns
|
|
2123
2178
|
|
|
2124
2179
|
|
|
2125
|
-
-
|
|
2180
|
+
- a promise
|
|
2126
2181
|
|
|
2127
2182
|
|
|
2128
2183
|
|
|
2129
2184
|
|
|
2130
|
-
### dist/
|
|
2185
|
+
### dist/qrvey/helpers/getColumnsLabel.js
|
|
2131
2186
|
|
|
2132
2187
|
|
|
2133
|
-
####
|
|
2188
|
+
#### getColumnLabels(column)
|
|
2134
2189
|
|
|
2135
|
-
Get
|
|
2190
|
+
Get an string of the properties of the given column.
|
|
2136
2191
|
|
|
2137
2192
|
|
|
2138
2193
|
|
|
@@ -2141,7 +2196,7 @@ Get a dataset list from a collection of Qrvey IDs
|
|
|
2141
2196
|
|
|
2142
2197
|
| Name | Type | Description | |
|
|
2143
2198
|
| ---- | ---- | ----------- | -------- |
|
|
2144
|
-
|
|
|
2199
|
+
| column | | The column | |
|
|
2145
2200
|
|
|
2146
2201
|
|
|
2147
2202
|
|
|
@@ -2149,27 +2204,19 @@ Get a dataset list from a collection of Qrvey IDs
|
|
|
2149
2204
|
##### Returns
|
|
2150
2205
|
|
|
2151
2206
|
|
|
2152
|
-
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2207
|
+
- an string with the property, aggregate or calculation label.
|
|
2156
2208
|
|
|
2157
|
-
### dist/services/api/getAllQrveys.api.js
|
|
2158
2209
|
|
|
2159
2210
|
|
|
2160
|
-
#### getAllQrveys(config, params)
|
|
2161
2211
|
|
|
2162
|
-
|
|
2212
|
+
### dist/stencil/util/createRef.js
|
|
2163
2213
|
|
|
2164
2214
|
|
|
2215
|
+
#### createRef()
|
|
2165
2216
|
|
|
2217
|
+
lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom.html)
|
|
2166
2218
|
|
|
2167
|
-
##### Parameters
|
|
2168
2219
|
|
|
2169
|
-
| Name | Type | Description | |
|
|
2170
|
-
| ---- | ---- | ----------- | -------- |
|
|
2171
|
-
| config | | Configuration | |
|
|
2172
|
-
| params | | Object for getting precise data | |
|
|
2173
2220
|
|
|
2174
2221
|
|
|
2175
2222
|
|
|
@@ -2177,17 +2224,21 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
|
|
|
2177
2224
|
##### Returns
|
|
2178
2225
|
|
|
2179
2226
|
|
|
2180
|
-
-
|
|
2227
|
+
- function - Function to use in ref prop in html elements
|
|
2181
2228
|
|
|
2182
2229
|
|
|
2183
2230
|
|
|
2184
2231
|
|
|
2185
|
-
### dist/
|
|
2232
|
+
### dist/stencil/util/getConfig.js
|
|
2186
2233
|
|
|
2187
2234
|
|
|
2188
|
-
####
|
|
2235
|
+
#### getConfig(cfg)
|
|
2189
2236
|
|
|
2190
|
-
|
|
2237
|
+
verify the Config object type and try to return a parsed Object
|
|
2238
|
+
- In case _cfg_ is a string, first try to make a JSON parse in other case
|
|
2239
|
+
try to find this string as a variable on Windows object
|
|
2240
|
+
- If _cfg_ is a fuction, tis is invoked and parsed
|
|
2241
|
+
- Finally, if is an object, _cfg_ is inmediatly returned
|
|
2191
2242
|
|
|
2192
2243
|
|
|
2193
2244
|
|
|
@@ -2196,7 +2247,7 @@ Get a dataset by Qrvey ID
|
|
|
2196
2247
|
|
|
2197
2248
|
| Name | Type | Description | |
|
|
2198
2249
|
| ---- | ---- | ----------- | -------- |
|
|
2199
|
-
|
|
|
2250
|
+
| cfg | | | |
|
|
2200
2251
|
|
|
2201
2252
|
|
|
2202
2253
|
|
|
@@ -2204,7 +2255,7 @@ Get a dataset by Qrvey ID
|
|
|
2204
2255
|
##### Returns
|
|
2205
2256
|
|
|
2206
2257
|
|
|
2207
|
-
-
|
|
2258
|
+
- `Void`
|
|
2208
2259
|
|
|
2209
2260
|
|
|
2210
2261
|
|
|
@@ -2242,36 +2293,39 @@ someMethod() {
|
|
|
2242
2293
|
|
|
2243
2294
|
|
|
2244
2295
|
|
|
2245
|
-
### dist/
|
|
2296
|
+
### dist/typescript/decorators/Debounce.js
|
|
2246
2297
|
|
|
2247
2298
|
|
|
2248
|
-
####
|
|
2299
|
+
#### Debounce(time)
|
|
2300
|
+
|
|
2301
|
+
(Method Decorator) Debounce Class Method
|
|
2249
2302
|
|
|
2250
|
-
lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom.html)
|
|
2251
2303
|
|
|
2252
2304
|
|
|
2253
2305
|
|
|
2306
|
+
##### Parameters
|
|
2307
|
+
|
|
2308
|
+
| Name | Type | Description | |
|
|
2309
|
+
| ---- | ---- | ----------- | -------- |
|
|
2310
|
+
| time | | (optional) deafult 500 | |
|
|
2311
|
+
|
|
2254
2312
|
|
|
2255
2313
|
|
|
2256
2314
|
|
|
2257
2315
|
##### Returns
|
|
2258
2316
|
|
|
2259
2317
|
|
|
2260
|
-
-
|
|
2318
|
+
- `Void`
|
|
2261
2319
|
|
|
2262
2320
|
|
|
2263
2321
|
|
|
2264
2322
|
|
|
2265
|
-
### dist/
|
|
2323
|
+
### dist/typescript/decorators/Throttled.js
|
|
2266
2324
|
|
|
2267
2325
|
|
|
2268
|
-
####
|
|
2326
|
+
#### Throttled(time)
|
|
2269
2327
|
|
|
2270
|
-
|
|
2271
|
-
- In case _cfg_ is a string, first try to make a JSON parse in other case
|
|
2272
|
-
try to find this string as a variable on Windows object
|
|
2273
|
-
- If _cfg_ is a fuction, tis is invoked and parsed
|
|
2274
|
-
- Finally, if is an object, _cfg_ is inmediatly returned
|
|
2328
|
+
(Method Decorator) Throttled Class Method
|
|
2275
2329
|
|
|
2276
2330
|
|
|
2277
2331
|
|
|
@@ -2280,7 +2334,7 @@ try to find this string as a variable on Windows object
|
|
|
2280
2334
|
|
|
2281
2335
|
| Name | Type | Description | |
|
|
2282
2336
|
| ---- | ---- | ----------- | -------- |
|
|
2283
|
-
|
|
|
2337
|
+
| time | | (optional) deafult 500 | |
|
|
2284
2338
|
|
|
2285
2339
|
|
|
2286
2340
|
|
|
@@ -2293,12 +2347,12 @@ try to find this string as a variable on Windows object
|
|
|
2293
2347
|
|
|
2294
2348
|
|
|
2295
2349
|
|
|
2296
|
-
### dist/
|
|
2350
|
+
### dist/dates/relative/helpers/formatStatement.js
|
|
2297
2351
|
|
|
2298
2352
|
|
|
2299
|
-
####
|
|
2353
|
+
#### formatStatement(statement)
|
|
2300
2354
|
|
|
2301
|
-
|
|
2355
|
+
Build a proper relative date statement type
|
|
2302
2356
|
|
|
2303
2357
|
|
|
2304
2358
|
|
|
@@ -2307,7 +2361,7 @@ try to find this string as a variable on Windows object
|
|
|
2307
2361
|
|
|
2308
2362
|
| Name | Type | Description | |
|
|
2309
2363
|
| ---- | ---- | ----------- | -------- |
|
|
2310
|
-
|
|
|
2364
|
+
| statement | `RelativeStatement` | | |
|
|
2311
2365
|
|
|
2312
2366
|
|
|
2313
2367
|
|
|
@@ -2315,17 +2369,17 @@ try to find this string as a variable on Windows object
|
|
|
2315
2369
|
##### Returns
|
|
2316
2370
|
|
|
2317
2371
|
|
|
2318
|
-
- `
|
|
2372
|
+
- `RelativeStatement`
|
|
2319
2373
|
|
|
2320
2374
|
|
|
2321
2375
|
|
|
2322
2376
|
|
|
2323
|
-
### dist/
|
|
2377
|
+
### dist/dates/relative/helpers/getStatementCase.js
|
|
2324
2378
|
|
|
2325
2379
|
|
|
2326
|
-
####
|
|
2380
|
+
#### getStatementCase(includeCurrent, isCalendarDate)
|
|
2327
2381
|
|
|
2328
|
-
|
|
2382
|
+
Returns a number/constant that identifies a relative date case
|
|
2329
2383
|
|
|
2330
2384
|
|
|
2331
2385
|
|
|
@@ -2334,7 +2388,8 @@ try to find this string as a variable on Windows object
|
|
|
2334
2388
|
|
|
2335
2389
|
| Name | Type | Description | |
|
|
2336
2390
|
| ---- | ---- | ----------- | -------- |
|
|
2337
|
-
|
|
|
2391
|
+
| includeCurrent | `boolean` | | |
|
|
2392
|
+
| isCalendarDate | `boolean` | | |
|
|
2338
2393
|
|
|
2339
2394
|
|
|
2340
2395
|
|
|
@@ -2342,7 +2397,34 @@ try to find this string as a variable on Windows object
|
|
|
2342
2397
|
##### Returns
|
|
2343
2398
|
|
|
2344
2399
|
|
|
2345
|
-
- `
|
|
2400
|
+
- `number`
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
### dist/dates/relative/helpers/parseDate.js
|
|
2406
|
+
|
|
2407
|
+
|
|
2408
|
+
#### parseDate(date)
|
|
2409
|
+
|
|
2410
|
+
Parses a string date and returns a dayjs date
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
##### Parameters
|
|
2416
|
+
|
|
2417
|
+
| Name | Type | Description | |
|
|
2418
|
+
| ---- | ---- | ----------- | -------- |
|
|
2419
|
+
| date | `string` `Dayjs` `Date` | | |
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
##### Returns
|
|
2425
|
+
|
|
2426
|
+
|
|
2427
|
+
- `Dayjs` A dayjs date
|
|
2346
2428
|
|
|
2347
2429
|
|
|
2348
2430
|
|
|
@@ -2402,12 +2484,12 @@ Transform user Filters array into Filter Logic structure
|
|
|
2402
2484
|
|
|
2403
2485
|
|
|
2404
2486
|
|
|
2405
|
-
### dist/filters/helpers/backend/
|
|
2487
|
+
### dist/filters/helpers/backend/getAggFiltersBySummaryIndex.js
|
|
2406
2488
|
|
|
2407
2489
|
|
|
2408
|
-
####
|
|
2490
|
+
#### getAggFiltersBySummaryIndex(aggFilters, summaryIndex)
|
|
2491
|
+
|
|
2409
2492
|
|
|
2410
|
-
Gets a group value for the backend logic structure
|
|
2411
2493
|
|
|
2412
2494
|
|
|
2413
2495
|
|
|
@@ -2416,7 +2498,8 @@ Gets a group value for the backend logic structure
|
|
|
2416
2498
|
|
|
2417
2499
|
| Name | Type | Description | |
|
|
2418
2500
|
| ---- | ---- | ----------- | -------- |
|
|
2419
|
-
|
|
|
2501
|
+
| aggFilters | | | |
|
|
2502
|
+
| summaryIndex | | | |
|
|
2420
2503
|
|
|
2421
2504
|
|
|
2422
2505
|
|
|
@@ -2424,17 +2507,17 @@ Gets a group value for the backend logic structure
|
|
|
2424
2507
|
##### Returns
|
|
2425
2508
|
|
|
2426
2509
|
|
|
2427
|
-
-
|
|
2428
|
-
|
|
2510
|
+
-
|
|
2429
2511
|
|
|
2430
2512
|
|
|
2431
2513
|
|
|
2432
|
-
### dist/filters/helpers/backend/getAggFiltersBySummaryIndex.js
|
|
2433
2514
|
|
|
2515
|
+
### dist/filters/helpers/backend/getBackendGroupValue.js
|
|
2434
2516
|
|
|
2435
|
-
#### getAggFiltersBySummaryIndex(aggFilters, summaryIndex)
|
|
2436
2517
|
|
|
2518
|
+
#### getBackendGroupValue(filter)
|
|
2437
2519
|
|
|
2520
|
+
Gets a group value for the backend logic structure
|
|
2438
2521
|
|
|
2439
2522
|
|
|
2440
2523
|
|
|
@@ -2443,8 +2526,7 @@ Gets a group value for the backend logic structure
|
|
|
2443
2526
|
|
|
2444
2527
|
| Name | Type | Description | |
|
|
2445
2528
|
| ---- | ---- | ----------- | -------- |
|
|
2446
|
-
|
|
|
2447
|
-
| summaryIndex | | | |
|
|
2529
|
+
| filter | | The filter | |
|
|
2448
2530
|
|
|
2449
2531
|
|
|
2450
2532
|
|
|
@@ -2452,7 +2534,7 @@ Gets a group value for the backend logic structure
|
|
|
2452
2534
|
##### Returns
|
|
2453
2535
|
|
|
2454
2536
|
|
|
2455
|
-
-
|
|
2537
|
+
- a property
|
|
2456
2538
|
|
|
2457
2539
|
|
|
2458
2540
|
|
|
@@ -3221,6 +3303,33 @@ Checks if the given validator is a Null type.
|
|
|
3221
3303
|
|
|
3222
3304
|
|
|
3223
3305
|
|
|
3306
|
+
### dist/filters/helpers/common/isRegularValidator.js
|
|
3307
|
+
|
|
3308
|
+
|
|
3309
|
+
#### isRegularValidator(validator)
|
|
3310
|
+
|
|
3311
|
+
Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
|
|
3312
|
+
|
|
3313
|
+
|
|
3314
|
+
|
|
3315
|
+
|
|
3316
|
+
##### Parameters
|
|
3317
|
+
|
|
3318
|
+
| Name | Type | Description | |
|
|
3319
|
+
| ---- | ---- | ----------- | -------- |
|
|
3320
|
+
| validator | | The filter validator | |
|
|
3321
|
+
|
|
3322
|
+
|
|
3323
|
+
|
|
3324
|
+
|
|
3325
|
+
##### Returns
|
|
3326
|
+
|
|
3327
|
+
|
|
3328
|
+
- true: it is a range validator
|
|
3329
|
+
|
|
3330
|
+
|
|
3331
|
+
|
|
3332
|
+
|
|
3224
3333
|
### dist/filters/helpers/common/isRangeValidator.js
|
|
3225
3334
|
|
|
3226
3335
|
|
|
@@ -3407,33 +3516,6 @@ Resolves the conditions by given params
|
|
|
3407
3516
|
|
|
3408
3517
|
|
|
3409
3518
|
|
|
3410
|
-
### dist/filters/helpers/common/isRegularValidator.js
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
#### isRegularValidator(validator)
|
|
3414
|
-
|
|
3415
|
-
Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
##### Parameters
|
|
3421
|
-
|
|
3422
|
-
| Name | Type | Description | |
|
|
3423
|
-
| ---- | ---- | ----------- | -------- |
|
|
3424
|
-
| validator | | The filter validator | |
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
##### Returns
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
- true: it is a range validator
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
3519
|
### dist/filters/helpers/common/resolveFilterConditions.js
|
|
3438
3520
|
|
|
3439
3521
|
|
|
@@ -3604,10 +3686,10 @@ Gets output format object from Datasets by the given column. Item of the dataset
|
|
|
3604
3686
|
|
|
3605
3687
|
|
|
3606
3688
|
|
|
3607
|
-
### dist/filters/helpers/ui/
|
|
3689
|
+
### dist/filters/helpers/ui/getUIFlatFilterByParams.js
|
|
3608
3690
|
|
|
3609
3691
|
|
|
3610
|
-
####
|
|
3692
|
+
#### getUIFlatFilterByParams()
|
|
3611
3693
|
|
|
3612
3694
|
Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
|
|
3613
3695
|
The validation to filter the stored filter is depending on:
|
|
@@ -3618,7 +3700,6 @@ The validation to filter the stored filter is depending on:
|
|
|
3618
3700
|
- Panel ID
|
|
3619
3701
|
- Validator type
|
|
3620
3702
|
- Property type
|
|
3621
|
-
- Enabled flags
|
|
3622
3703
|
|
|
3623
3704
|
|
|
3624
3705
|
|
|
@@ -3633,10 +3714,10 @@ The validation to filter the stored filter is depending on:
|
|
|
3633
3714
|
|
|
3634
3715
|
|
|
3635
3716
|
|
|
3636
|
-
### dist/filters/helpers/ui/
|
|
3717
|
+
### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
|
|
3637
3718
|
|
|
3638
3719
|
|
|
3639
|
-
####
|
|
3720
|
+
#### getUIFlatFiltersByParams()
|
|
3640
3721
|
|
|
3641
3722
|
Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
|
|
3642
3723
|
The validation to filter the stored filter is depending on:
|
|
@@ -3647,6 +3728,7 @@ The validation to filter the stored filter is depending on:
|
|
|
3647
3728
|
- Panel ID
|
|
3648
3729
|
- Validator type
|
|
3649
3730
|
- Property type
|
|
3731
|
+
- Enabled flags
|
|
3650
3732
|
|
|
3651
3733
|
|
|
3652
3734
|
|
|
@@ -3746,86 +3828,4 @@ Resolves conditions between UI flattened filter and given parameters
|
|
|
3746
3828
|
|
|
3747
3829
|
|
|
3748
3830
|
|
|
3749
|
-
### dist/dates/relative/helpers/formatStatement.js
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
#### formatStatement(statement)
|
|
3753
|
-
|
|
3754
|
-
Build a proper relative date statement type
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
##### Parameters
|
|
3760
|
-
|
|
3761
|
-
| Name | Type | Description | |
|
|
3762
|
-
| ---- | ---- | ----------- | -------- |
|
|
3763
|
-
| statement | `RelativeStatement` | | |
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
##### Returns
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
- `RelativeStatement`
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
### dist/dates/relative/helpers/getStatementCase.js
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
#### getStatementCase(includeCurrent, isCalendarDate)
|
|
3780
|
-
|
|
3781
|
-
Returns a number/constant that identifies a relative date case
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
##### Parameters
|
|
3787
|
-
|
|
3788
|
-
| Name | Type | Description | |
|
|
3789
|
-
| ---- | ---- | ----------- | -------- |
|
|
3790
|
-
| includeCurrent | `boolean` | | |
|
|
3791
|
-
| isCalendarDate | `boolean` | | |
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
##### Returns
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
- `number`
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
### dist/dates/relative/helpers/parseDate.js
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
#### parseDate(date)
|
|
3808
|
-
|
|
3809
|
-
Parses a string date and returns a dayjs date
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
##### Parameters
|
|
3815
|
-
|
|
3816
|
-
| Name | Type | Description | |
|
|
3817
|
-
| ---- | ---- | ----------- | -------- |
|
|
3818
|
-
| date | `string` `Dayjs` `Date` | | |
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
##### Returns
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
- `Dayjs` A dayjs date
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
3831
|
*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*
|