@qrvey/utils 1.2.9-28 → 1.2.9-30
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 +214 -214
- package/dist/cjs/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterExtraInfo.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterExtraInfo.js +2 -0
- package/dist/cjs/globalization/interfaces/filters/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/index.js +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +2 -2
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +4 -0
- package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +1 -1
- package/dist/cjs/services/api/getAllDatasets.api.js +1 -2
- package/dist/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
- package/dist/globalization/interfaces/filters/II18nFilterExtraInfo.d.ts +4 -0
- package/dist/globalization/interfaces/filters/II18nFilterExtraInfo.js +1 -0
- package/dist/globalization/interfaces/filters/index.d.ts +1 -0
- package/dist/globalization/interfaces/filters/index.js +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +2 -2
- package/dist/globalization/labels/filters/I18N_FILTER.js +4 -0
- package/dist/globalization/labels/panel/I18N_PANEL.js +1 -1
- package/dist/services/api/getAllDatasets.api.js +1 -2
- package/package.json +3 -6
- package/src/globalization/interfaces/filters/II18nFilter.ts +2 -0
- package/src/globalization/interfaces/filters/II18nFilterExtraInfo.ts +4 -0
- package/src/globalization/interfaces/filters/index.ts +1 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.ts +2 -2
- package/src/globalization/labels/filters/I18N_FILTER.ts +4 -0
- package/src/globalization/labels/panel/I18N_PANEL.ts +1 -1
- package/src/services/api/getAllDatasets.api.ts +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-
|
|
1
|
+
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-30*
|
|
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/adapters/monthYearToDate.js
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
####
|
|
86
|
+
#### monthYearToDate(monthYearDate, time)
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Transforms String Date from a [Month Year] format to Date object.
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
@@ -94,9 +94,8 @@ Gets a Date Object instance by a Date format
|
|
|
94
94
|
|
|
95
95
|
| Name | Type | Description | |
|
|
96
96
|
| ---- | ---- | ----------- | -------- |
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
| time | | flag to convert the formatted date to miliseconds | |
|
|
97
|
+
| monthYearDate | | String of [Month Year] date | |
|
|
98
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
100
99
|
|
|
101
100
|
|
|
102
101
|
|
|
@@ -104,17 +103,17 @@ Gets a Date Object instance by a Date format
|
|
|
104
103
|
##### Returns
|
|
105
104
|
|
|
106
105
|
|
|
107
|
-
-
|
|
106
|
+
- The date object or the date in milliseconds
|
|
108
107
|
|
|
109
108
|
|
|
110
109
|
|
|
111
110
|
|
|
112
|
-
### dist/dates/
|
|
111
|
+
### dist/dates/adapters/quarterYearToDate.js
|
|
113
112
|
|
|
114
113
|
|
|
115
|
-
####
|
|
114
|
+
#### quarterYearToDate(quarterYearDate, time)
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
Transforms String Date from a [Quarter Year] format to Date object.
|
|
118
117
|
|
|
119
118
|
|
|
120
119
|
|
|
@@ -123,7 +122,8 @@ Gets the date format by the given property
|
|
|
123
122
|
|
|
124
123
|
| Name | Type | Description | |
|
|
125
124
|
| ---- | ---- | ----------- | -------- |
|
|
126
|
-
|
|
|
125
|
+
| quarterYearDate | | String of [Quarter Year] date | |
|
|
126
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
@@ -131,17 +131,17 @@ Gets the date format by the given property
|
|
|
131
131
|
##### Returns
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
- The date
|
|
134
|
+
- The date object or the date in milliseconds
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
### dist/dates/
|
|
139
|
+
### dist/dates/adapters/weekYearToDate.js
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
####
|
|
142
|
+
#### weekYearToDate(date, time)
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
Transforms String Date from a [Week Year] format to Date object.
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
|
|
@@ -150,7 +150,8 @@ Gets an array of regular expressions by the given date format
|
|
|
150
150
|
|
|
151
151
|
| Name | Type | Description | |
|
|
152
152
|
| ---- | ---- | ----------- | -------- |
|
|
153
|
-
|
|
|
153
|
+
| date | | String of [Week Year] date | |
|
|
154
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
154
155
|
|
|
155
156
|
|
|
156
157
|
|
|
@@ -158,17 +159,17 @@ Gets an array of regular expressions by the given date format
|
|
|
158
159
|
##### Returns
|
|
159
160
|
|
|
160
161
|
|
|
161
|
-
-
|
|
162
|
+
- The date object or the date in milliseconds
|
|
162
163
|
|
|
163
164
|
|
|
164
165
|
|
|
165
166
|
|
|
166
|
-
### dist/dates/
|
|
167
|
+
### dist/dates/adapters/yearToDate.js
|
|
167
168
|
|
|
168
169
|
|
|
169
|
-
####
|
|
170
|
+
#### yearToDate(yearDate, time)
|
|
170
171
|
|
|
171
|
-
|
|
172
|
+
Transforms String Date from a [Year] format to Date object.
|
|
172
173
|
|
|
173
174
|
|
|
174
175
|
|
|
@@ -177,7 +178,8 @@ Gets the separator of the date format
|
|
|
177
178
|
|
|
178
179
|
| Name | Type | Description | |
|
|
179
180
|
| ---- | ---- | ----------- | -------- |
|
|
180
|
-
|
|
|
181
|
+
| yearDate | | String of [Year] date | |
|
|
182
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
181
183
|
|
|
182
184
|
|
|
183
185
|
|
|
@@ -185,18 +187,17 @@ Gets the separator of the date format
|
|
|
185
187
|
##### Returns
|
|
186
188
|
|
|
187
189
|
|
|
188
|
-
-
|
|
190
|
+
- The date object or the date in milliseconds
|
|
189
191
|
|
|
190
192
|
|
|
191
193
|
|
|
192
194
|
|
|
193
|
-
### dist/dates/
|
|
195
|
+
### dist/dates/adapters/mdyDateToDate.js
|
|
194
196
|
|
|
195
197
|
|
|
196
|
-
####
|
|
198
|
+
#### mdyDateToDate(monthYearDate, time)
|
|
197
199
|
|
|
198
|
-
|
|
199
|
-
Additionally, the month and the year
|
|
200
|
+
Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
200
201
|
|
|
201
202
|
|
|
202
203
|
|
|
@@ -205,7 +206,8 @@ Additionally, the month and the year
|
|
|
205
206
|
|
|
206
207
|
| Name | Type | Description | |
|
|
207
208
|
| ---- | ---- | ----------- | -------- |
|
|
208
|
-
|
|
|
209
|
+
| monthYearDate | | String of [mm/dd/yyyy] date | |
|
|
210
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
209
211
|
|
|
210
212
|
|
|
211
213
|
|
|
@@ -213,20 +215,17 @@ Additionally, the month and the year
|
|
|
213
215
|
##### Returns
|
|
214
216
|
|
|
215
217
|
|
|
216
|
-
-
|
|
218
|
+
- The date object or the date in milliseconds
|
|
217
219
|
|
|
218
220
|
|
|
219
221
|
|
|
220
222
|
|
|
221
|
-
### dist/dates/helpers/
|
|
223
|
+
### dist/dates/helpers/getDateByDateFormat.js
|
|
222
224
|
|
|
223
225
|
|
|
224
|
-
####
|
|
226
|
+
#### getDateByDateFormat(date, format, time)
|
|
225
227
|
|
|
226
|
-
|
|
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
|
|
228
|
+
Gets a Date Object instance by a Date format
|
|
230
229
|
|
|
231
230
|
|
|
232
231
|
|
|
@@ -235,8 +234,9 @@ Validate a string date depending on giving format
|
|
|
235
234
|
|
|
236
235
|
| Name | Type | Description | |
|
|
237
236
|
| ---- | ---- | ----------- | -------- |
|
|
238
|
-
| date | | String
|
|
239
|
-
| format | |
|
|
237
|
+
| date | | String with a formatted date | |
|
|
238
|
+
| format | | The date format | |
|
|
239
|
+
| time | | flag to convert the formatted date to miliseconds | |
|
|
240
240
|
|
|
241
241
|
|
|
242
242
|
|
|
@@ -244,17 +244,17 @@ Validate a string date depending on giving format
|
|
|
244
244
|
##### Returns
|
|
245
245
|
|
|
246
246
|
|
|
247
|
-
-
|
|
247
|
+
- a Date object, milisecond time or the same value if date format does not match.
|
|
248
248
|
|
|
249
249
|
|
|
250
250
|
|
|
251
251
|
|
|
252
|
-
### dist/dates/helpers/
|
|
252
|
+
### dist/dates/helpers/getDateFormatByProperty.js
|
|
253
253
|
|
|
254
254
|
|
|
255
|
-
####
|
|
255
|
+
#### getDateFormatByProperty(property)
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
Gets the date format by the given property
|
|
258
258
|
|
|
259
259
|
|
|
260
260
|
|
|
@@ -263,8 +263,7 @@ Validates the given string as Date by its date format.
|
|
|
263
263
|
|
|
264
264
|
| Name | Type | Description | |
|
|
265
265
|
| ---- | ---- | ----------- | -------- |
|
|
266
|
-
|
|
|
267
|
-
| dateForma | | the format of the date to validate the string | |
|
|
266
|
+
| property | | The Column Property | |
|
|
268
267
|
|
|
269
268
|
|
|
270
269
|
|
|
@@ -272,17 +271,17 @@ Validates the given string as Date by its date format.
|
|
|
272
271
|
##### Returns
|
|
273
272
|
|
|
274
273
|
|
|
275
|
-
-
|
|
274
|
+
- The date format
|
|
276
275
|
|
|
277
276
|
|
|
278
277
|
|
|
279
278
|
|
|
280
|
-
### dist/dates/
|
|
279
|
+
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
281
280
|
|
|
282
281
|
|
|
283
|
-
####
|
|
282
|
+
#### getDateFormatRegularExpressionInArray(dateFormat)
|
|
284
283
|
|
|
285
|
-
|
|
284
|
+
Gets an array of regular expressions by the given date format
|
|
286
285
|
|
|
287
286
|
|
|
288
287
|
|
|
@@ -291,8 +290,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
291
290
|
|
|
292
291
|
| Name | Type | Description | |
|
|
293
292
|
| ---- | ---- | ----------- | -------- |
|
|
294
|
-
|
|
|
295
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
293
|
+
| dateFormat | | the date format | |
|
|
296
294
|
|
|
297
295
|
|
|
298
296
|
|
|
@@ -300,17 +298,17 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
300
298
|
##### Returns
|
|
301
299
|
|
|
302
300
|
|
|
303
|
-
-
|
|
301
|
+
- an array of regular expressions
|
|
304
302
|
|
|
305
303
|
|
|
306
304
|
|
|
307
305
|
|
|
308
|
-
### dist/dates/
|
|
306
|
+
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
309
307
|
|
|
310
308
|
|
|
311
|
-
####
|
|
309
|
+
#### getSeparatorByDateFormat(format)
|
|
312
310
|
|
|
313
|
-
|
|
311
|
+
Gets the separator of the date format
|
|
314
312
|
|
|
315
313
|
|
|
316
314
|
|
|
@@ -319,8 +317,7 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
319
317
|
|
|
320
318
|
| Name | Type | Description | |
|
|
321
319
|
| ---- | ---- | ----------- | -------- |
|
|
322
|
-
|
|
|
323
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
320
|
+
| format | | the date format | |
|
|
324
321
|
|
|
325
322
|
|
|
326
323
|
|
|
@@ -328,17 +325,18 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
328
325
|
##### Returns
|
|
329
326
|
|
|
330
327
|
|
|
331
|
-
-
|
|
328
|
+
- a separator string
|
|
332
329
|
|
|
333
330
|
|
|
334
331
|
|
|
335
332
|
|
|
336
|
-
### dist/dates/
|
|
333
|
+
### dist/dates/helpers/getWeek.js
|
|
337
334
|
|
|
338
335
|
|
|
339
|
-
####
|
|
336
|
+
#### getWeek(date)
|
|
340
337
|
|
|
341
|
-
|
|
338
|
+
Gets the week number of the year
|
|
339
|
+
Additionally, the month and the year
|
|
342
340
|
|
|
343
341
|
|
|
344
342
|
|
|
@@ -347,8 +345,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
347
345
|
|
|
348
346
|
| Name | Type | Description | |
|
|
349
347
|
| ---- | ---- | ----------- | -------- |
|
|
350
|
-
|
|
|
351
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
348
|
+
| date | | the date object | |
|
|
352
349
|
|
|
353
350
|
|
|
354
351
|
|
|
@@ -356,17 +353,20 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
356
353
|
##### Returns
|
|
357
354
|
|
|
358
355
|
|
|
359
|
-
-
|
|
356
|
+
- an object with the week, month and year.
|
|
360
357
|
|
|
361
358
|
|
|
362
359
|
|
|
363
360
|
|
|
364
|
-
### dist/dates/
|
|
361
|
+
### dist/dates/helpers/validateDate.js
|
|
365
362
|
|
|
366
363
|
|
|
367
|
-
####
|
|
364
|
+
#### validateDate(date, format)
|
|
368
365
|
|
|
369
|
-
|
|
366
|
+
Validate a string date depending on giving format
|
|
367
|
+
- If the string is a token label, the function lets it pass.
|
|
368
|
+
- Otherwise depends of the format
|
|
369
|
+
- Some escenarios the string is a mix of token labels and dates
|
|
370
370
|
|
|
371
371
|
|
|
372
372
|
|
|
@@ -375,8 +375,8 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
375
375
|
|
|
376
376
|
| Name | Type | Description | |
|
|
377
377
|
| ---- | ---- | ----------- | -------- |
|
|
378
|
-
| date | | String of
|
|
379
|
-
|
|
|
378
|
+
| date | | String of date | |
|
|
379
|
+
| format | | String of the format to validate | |
|
|
380
380
|
|
|
381
381
|
|
|
382
382
|
|
|
@@ -384,17 +384,17 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
384
384
|
##### Returns
|
|
385
385
|
|
|
386
386
|
|
|
387
|
-
-
|
|
387
|
+
- True if it is valid or not. Undefined if date is undefined
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
|
|
391
391
|
|
|
392
|
-
### dist/dates/
|
|
392
|
+
### dist/dates/helpers/validateDateByDateFormat.js
|
|
393
393
|
|
|
394
394
|
|
|
395
|
-
####
|
|
395
|
+
#### validateDateByDateFormat(date, dateForma)
|
|
396
396
|
|
|
397
|
-
|
|
397
|
+
Validates the given string as Date by its date format.
|
|
398
398
|
|
|
399
399
|
|
|
400
400
|
|
|
@@ -403,8 +403,8 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
403
403
|
|
|
404
404
|
| Name | Type | Description | |
|
|
405
405
|
| ---- | ---- | ----------- | -------- |
|
|
406
|
-
|
|
|
407
|
-
|
|
|
406
|
+
| date | | a string to validate as date form | |
|
|
407
|
+
| dateForma | | the format of the date to validate the string | |
|
|
408
408
|
|
|
409
409
|
|
|
410
410
|
|
|
@@ -412,7 +412,65 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
412
412
|
##### Returns
|
|
413
413
|
|
|
414
414
|
|
|
415
|
-
-
|
|
415
|
+
- true: the string is a valida date
|
|
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,64 +688,6 @@ Output:
|
|
|
630
688
|
|
|
631
689
|
|
|
632
690
|
|
|
633
|
-
### dist/dates/range/getDateRange.js
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
#### getDateRange(value, dateGroupLabel, withTime)
|
|
637
|
-
|
|
638
|
-
Get date range object from a string date value
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
##### Parameters
|
|
644
|
-
|
|
645
|
-
| Name | Type | Description | |
|
|
646
|
-
| ---- | ---- | ----------- | -------- |
|
|
647
|
-
| value | `String` | string date value | |
|
|
648
|
-
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
649
|
-
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
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
|
-
}
|
|
664
|
-
|
|
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
|
-
|
|
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
|
-
|
|
682
|
-
|
|
683
|
-
##### Returns
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
- `Object` an object with the date range with two string date properties: from and to
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
691
|
### dist/filters/classes/FilterInputErrorHandler.js
|
|
692
692
|
|
|
693
693
|
|
|
@@ -2153,6 +2153,34 @@ Gets the length of the given array.
|
|
|
2153
2153
|
|
|
2154
2154
|
|
|
2155
2155
|
|
|
2156
|
+
### dist/general/object/cloneDeep.js
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
#### cloneDeep(obj)
|
|
2160
|
+
|
|
2161
|
+
A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
|
|
2162
|
+
Not to use this function with inner objects and functions
|
|
2163
|
+
|
|
2164
|
+
|
|
2165
|
+
|
|
2166
|
+
|
|
2167
|
+
##### Parameters
|
|
2168
|
+
|
|
2169
|
+
| Name | Type | Description | |
|
|
2170
|
+
| ---- | ---- | ----------- | -------- |
|
|
2171
|
+
| obj | | The object | |
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
|
|
2175
|
+
|
|
2176
|
+
##### Returns
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
- The new reference object or the given object if the parsing is incorrect or empty
|
|
2180
|
+
|
|
2181
|
+
|
|
2182
|
+
|
|
2183
|
+
|
|
2156
2184
|
### dist/general/object/get.js
|
|
2157
2185
|
|
|
2158
2186
|
|
|
@@ -2210,13 +2238,20 @@ _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
|
2210
2238
|
|
|
2211
2239
|
|
|
2212
2240
|
|
|
2213
|
-
### dist/general/object/
|
|
2241
|
+
### dist/general/object/getAttribute.js
|
|
2214
2242
|
|
|
2215
2243
|
|
|
2216
|
-
####
|
|
2244
|
+
#### getAttribute(obj, key)
|
|
2217
2245
|
|
|
2218
|
-
|
|
2219
|
-
|
|
2246
|
+
Searchs for properties in different case styles such as: lower, upper, camel and pascal
|
|
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
|
|
2220
2255
|
|
|
2221
2256
|
|
|
2222
2257
|
|
|
@@ -2225,15 +2260,23 @@ Not to use this function with inner objects and functions
|
|
|
2225
2260
|
|
|
2226
2261
|
| Name | Type | Description | |
|
|
2227
2262
|
| ---- | ---- | ----------- | -------- |
|
|
2228
|
-
| obj | |
|
|
2263
|
+
| obj | `object` | object to look for | |
|
|
2264
|
+
| key | `string` | String attribute in snake_case style | |
|
|
2265
|
+
|
|
2229
2266
|
|
|
2230
2267
|
|
|
2231
2268
|
|
|
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
|
+
|
|
2232
2275
|
|
|
2233
2276
|
##### Returns
|
|
2234
2277
|
|
|
2235
2278
|
|
|
2236
|
-
-
|
|
2279
|
+
- `Void`
|
|
2237
2280
|
|
|
2238
2281
|
|
|
2239
2282
|
|
|
@@ -2278,49 +2321,6 @@ _hasProperty(ob1, prop2) // false
|
|
|
2278
2321
|
|
|
2279
2322
|
|
|
2280
2323
|
|
|
2281
|
-
### dist/general/object/getAttribute.js
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
#### getAttribute(obj, key)
|
|
2285
|
-
|
|
2286
|
-
Searchs for properties in different case styles such as: lower, upper, camel and pascal
|
|
2287
|
-
- To optimize the searching, it is required a key in a snake_case style
|
|
2288
|
-
- List of cases that do not match
|
|
2289
|
-
-- From lower to snake case
|
|
2290
|
-
-- From upper to snake case
|
|
2291
|
-
-- From lower to camel case
|
|
2292
|
-
-- From upper to camel case
|
|
2293
|
-
-- From lower to pascal case
|
|
2294
|
-
-- From upper to pascal case
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
##### Parameters
|
|
2300
|
-
|
|
2301
|
-
| Name | Type | Description | |
|
|
2302
|
-
| ---- | ---- | ----------- | -------- |
|
|
2303
|
-
| obj | `object` | object to look for | |
|
|
2304
|
-
| key | `string` | String attribute in snake_case style | |
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
##### Examples
|
|
2310
|
-
|
|
2311
|
-
```javascript
|
|
2312
|
-
getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2313
|
-
```
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
##### Returns
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
- `Void`
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
2324
|
### dist/general/object/isObject.js
|
|
2325
2325
|
|
|
2326
2326
|
|
|
@@ -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/Throttled.js
|
|
2893
2893
|
|
|
2894
2894
|
|
|
2895
|
-
####
|
|
2895
|
+
#### Throttled(time)
|
|
2896
2896
|
|
|
2897
|
-
(Method Decorator)
|
|
2897
|
+
(Method Decorator) Throttled 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/Debounce.js
|
|
2920
2920
|
|
|
2921
2921
|
|
|
2922
|
-
####
|
|
2922
|
+
#### Debounce(time)
|
|
2923
2923
|
|
|
2924
|
-
(Method Decorator)
|
|
2924
|
+
(Method Decorator) Debounce Class Method
|
|
2925
2925
|
|
|
2926
2926
|
|
|
2927
2927
|
|
|
@@ -3025,6 +3025,33 @@ 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
|
+
|
|
3028
3055
|
### dist/filters/helpers/backend/buildExpression.js
|
|
3029
3056
|
|
|
3030
3057
|
|
|
@@ -3321,33 +3348,6 @@ Gets filters from the logic by the scopes hierarchy.
|
|
|
3321
3348
|
|
|
3322
3349
|
|
|
3323
3350
|
|
|
3324
|
-
### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
#### getFilterBuilderGeneralConfig(config)
|
|
3328
|
-
|
|
3329
|
-
Returns a filter builder config object by a any given config
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
##### Parameters
|
|
3335
|
-
|
|
3336
|
-
| Name | Type | Description | |
|
|
3337
|
-
| ---- | ---- | ----------- | -------- |
|
|
3338
|
-
| config | | any config object | |
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
##### Returns
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
- The filter builder config object
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
3351
|
### dist/filters/helpers/common/areFiltersEquals.js
|
|
3352
3352
|
|
|
3353
3353
|
|
|
@@ -8,8 +8,10 @@ import { II18nFilterScopes } from "./II18nFilterScopes";
|
|
|
8
8
|
import { II18nFilterPanelScopeTitle } from "./II18nFilterPanelScopeTitle";
|
|
9
9
|
import { II18nFilterDateSections } from "./II18nFilterDateSections";
|
|
10
10
|
import { II18nTokenBox } from './II18nTokenBox';
|
|
11
|
+
import { II18nFilterExtraInfo } from "./II18nFilterExtraInfo";
|
|
11
12
|
export interface II18nFilter {
|
|
12
13
|
date_sections: II18nFilterDateSections;
|
|
14
|
+
extra_info: II18nFilterExtraInfo;
|
|
13
15
|
operators: II18nFilterOperator;
|
|
14
16
|
ranking_container: II18nRankingContainer;
|
|
15
17
|
relative_container: II18nRelativeContainer;
|
|
@@ -7,6 +7,7 @@ export * from './II18nFilterBuilderScopes';
|
|
|
7
7
|
export * from './II18nFilterBuilderSelectedValuesContainer';
|
|
8
8
|
export * from './II18nFilterDateSections';
|
|
9
9
|
export * from './II18nFilterDisplay';
|
|
10
|
+
export * from './II18nFilterExtraInfo';
|
|
10
11
|
export * from './II18nFilterOperator';
|
|
11
12
|
export * from './II18nFilterPanel';
|
|
12
13
|
export * from './II18nFilterPanelCardAction';
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./II18nFilterBuilderScopes"), exports);
|
|
|
19
19
|
__exportStar(require("./II18nFilterBuilderSelectedValuesContainer"), exports);
|
|
20
20
|
__exportStar(require("./II18nFilterDateSections"), exports);
|
|
21
21
|
__exportStar(require("./II18nFilterDisplay"), exports);
|
|
22
|
+
__exportStar(require("./II18nFilterExtraInfo"), exports);
|
|
22
23
|
__exportStar(require("./II18nFilterOperator"), exports);
|
|
23
24
|
__exportStar(require("./II18nFilterPanel"), exports);
|
|
24
25
|
__exportStar(require("./II18nFilterPanelCardAction"), exports);
|
|
@@ -198,12 +198,12 @@ exports.I18N_CHART_BUILDER_GENERAL = {
|
|
|
198
198
|
max_limit: 'Only 10,000 max data points are supported.'
|
|
199
199
|
},
|
|
200
200
|
messages_crosstab: {
|
|
201
|
-
max_data: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max
|
|
201
|
+
max_data: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Records</i> and <i>Max Columns</i> to display.',
|
|
202
202
|
max_increment: 'Increasing the amount of records to display above {{max_rows_option}} rows or {{max_groups_option}} columns can affect chart performance.',
|
|
203
203
|
value_missing: 'A <i>Values</i> column could be added to this chart.'
|
|
204
204
|
},
|
|
205
205
|
messages_table_chart: {
|
|
206
|
-
max_data_simple: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max
|
|
206
|
+
max_data_simple: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Records</i> to display.',
|
|
207
207
|
max_data_grouped: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Groups</i> to display.',
|
|
208
208
|
max_increment: 'Increasing the amount of records to display above {{max_rows_option}} rows or {{max_groups_option}} groups can affect chart performance.',
|
|
209
209
|
grouped_column: '<i>Columns</i> are needed for this chart.',
|
|
@@ -14,6 +14,10 @@ exports.I18N_FILTER = {
|
|
|
14
14
|
absolute: FILTER_DATE_SECTION_LABEL_1.FILTER_DATE_SECTION_LABEL.ABSOLUTE,
|
|
15
15
|
relative: FILTER_DATE_SECTION_LABEL_1.FILTER_DATE_SECTION_LABEL.RELATIVE,
|
|
16
16
|
},
|
|
17
|
+
extra_info: {
|
|
18
|
+
date_picker_tooltip: 'Created with date picker',
|
|
19
|
+
input_box_tooltip: 'Input Box Filter',
|
|
20
|
+
},
|
|
17
21
|
operators: I18N_FILTER_OPERATOR_1.I18N_FILTER_OPERATOR,
|
|
18
22
|
ranking_container: I18N_RANKING_CONTAINER_1.I18N_RANKING_CONTAINER,
|
|
19
23
|
relative_container: I18N_RELATIVE_CONTAINER_1.I18N_RELATIVE_CONTAINER,
|
|
@@ -24,7 +24,7 @@ exports.I18N_PANEL = {
|
|
|
24
24
|
missing_linked_column: 'Missing linked column.',
|
|
25
25
|
no_data_found: 'No data found.',
|
|
26
26
|
refresh_panel: 'Refresh panel',
|
|
27
|
-
server_error: '
|
|
27
|
+
server_error: 'Server Error.',
|
|
28
28
|
restore_panel: 'Restore panel',
|
|
29
29
|
service_unavailable: '{{panel}} not available at the moment.',
|
|
30
30
|
try_again: 'Try Again',
|
|
@@ -14,8 +14,7 @@ function getAllDatasets(config, pickDatasets = []) {
|
|
|
14
14
|
return (0, getAllQrveys_api_1.getAllQrveys)(Object.assign({}, config), { status: ['RUNNING', 'FINISHED', 'PAUSED'], loadAll: true })
|
|
15
15
|
.then((qrveys) => {
|
|
16
16
|
let datasets = qrveys.Items.filter(filterSupportedDatasets);
|
|
17
|
-
|
|
18
|
-
datasets = datasets.filter(item => pickDatasets.includes(item.qrveyid));
|
|
17
|
+
datasets = (0, general_1.isEmpty)(pickDatasets) ? [] : datasets.filter(item => pickDatasets.includes(item.qrveyid));
|
|
19
18
|
return Promise.all(datasets.map(dataset => (0, getDatasetColumns_api_1.getDatasetColumns)(config, dataset.qrveyid))).then(response => (0, general_1.flattenDeep)(response));
|
|
20
19
|
}).catch(_e => Promise.all([]));
|
|
21
20
|
}
|
|
@@ -8,8 +8,10 @@ import { II18nFilterScopes } from "./II18nFilterScopes";
|
|
|
8
8
|
import { II18nFilterPanelScopeTitle } from "./II18nFilterPanelScopeTitle";
|
|
9
9
|
import { II18nFilterDateSections } from "./II18nFilterDateSections";
|
|
10
10
|
import { II18nTokenBox } from './II18nTokenBox';
|
|
11
|
+
import { II18nFilterExtraInfo } from "./II18nFilterExtraInfo";
|
|
11
12
|
export interface II18nFilter {
|
|
12
13
|
date_sections: II18nFilterDateSections;
|
|
14
|
+
extra_info: II18nFilterExtraInfo;
|
|
13
15
|
operators: II18nFilterOperator;
|
|
14
16
|
ranking_container: II18nRankingContainer;
|
|
15
17
|
relative_container: II18nRelativeContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,7 @@ export * from './II18nFilterBuilderScopes';
|
|
|
7
7
|
export * from './II18nFilterBuilderSelectedValuesContainer';
|
|
8
8
|
export * from './II18nFilterDateSections';
|
|
9
9
|
export * from './II18nFilterDisplay';
|
|
10
|
+
export * from './II18nFilterExtraInfo';
|
|
10
11
|
export * from './II18nFilterOperator';
|
|
11
12
|
export * from './II18nFilterPanel';
|
|
12
13
|
export * from './II18nFilterPanelCardAction';
|
|
@@ -7,6 +7,7 @@ export * from './II18nFilterBuilderScopes';
|
|
|
7
7
|
export * from './II18nFilterBuilderSelectedValuesContainer';
|
|
8
8
|
export * from './II18nFilterDateSections';
|
|
9
9
|
export * from './II18nFilterDisplay';
|
|
10
|
+
export * from './II18nFilterExtraInfo';
|
|
10
11
|
export * from './II18nFilterOperator';
|
|
11
12
|
export * from './II18nFilterPanel';
|
|
12
13
|
export * from './II18nFilterPanelCardAction';
|
|
@@ -195,12 +195,12 @@ export const I18N_CHART_BUILDER_GENERAL = {
|
|
|
195
195
|
max_limit: 'Only 10,000 max data points are supported.'
|
|
196
196
|
},
|
|
197
197
|
messages_crosstab: {
|
|
198
|
-
max_data: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max
|
|
198
|
+
max_data: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Records</i> and <i>Max Columns</i> to display.',
|
|
199
199
|
max_increment: 'Increasing the amount of records to display above {{max_rows_option}} rows or {{max_groups_option}} columns can affect chart performance.',
|
|
200
200
|
value_missing: 'A <i>Values</i> column could be added to this chart.'
|
|
201
201
|
},
|
|
202
202
|
messages_table_chart: {
|
|
203
|
-
max_data_simple: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max
|
|
203
|
+
max_data_simple: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Records</i> to display.',
|
|
204
204
|
max_data_grouped: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Groups</i> to display.',
|
|
205
205
|
max_increment: 'Increasing the amount of records to display above {{max_rows_option}} rows or {{max_groups_option}} groups can affect chart performance.',
|
|
206
206
|
grouped_column: '<i>Columns</i> are needed for this chart.',
|
|
@@ -11,6 +11,10 @@ export const I18N_FILTER = {
|
|
|
11
11
|
absolute: FILTER_DATE_SECTION_LABEL.ABSOLUTE,
|
|
12
12
|
relative: FILTER_DATE_SECTION_LABEL.RELATIVE,
|
|
13
13
|
},
|
|
14
|
+
extra_info: {
|
|
15
|
+
date_picker_tooltip: 'Created with date picker',
|
|
16
|
+
input_box_tooltip: 'Input Box Filter',
|
|
17
|
+
},
|
|
14
18
|
operators: I18N_FILTER_OPERATOR,
|
|
15
19
|
ranking_container: I18N_RANKING_CONTAINER,
|
|
16
20
|
relative_container: I18N_RELATIVE_CONTAINER,
|
|
@@ -21,7 +21,7 @@ export const I18N_PANEL = {
|
|
|
21
21
|
missing_linked_column: 'Missing linked column.',
|
|
22
22
|
no_data_found: 'No data found.',
|
|
23
23
|
refresh_panel: 'Refresh panel',
|
|
24
|
-
server_error: '
|
|
24
|
+
server_error: 'Server Error.',
|
|
25
25
|
restore_panel: 'Restore panel',
|
|
26
26
|
service_unavailable: '{{panel}} not available at the moment.',
|
|
27
27
|
try_again: 'Try Again',
|
|
@@ -11,8 +11,7 @@ export function getAllDatasets(config, pickDatasets = []) {
|
|
|
11
11
|
return getAllQrveys(Object.assign({}, config), { status: ['RUNNING', 'FINISHED', 'PAUSED'], loadAll: true })
|
|
12
12
|
.then((qrveys) => {
|
|
13
13
|
let datasets = qrveys.Items.filter(filterSupportedDatasets);
|
|
14
|
-
|
|
15
|
-
datasets = datasets.filter(item => pickDatasets.includes(item.qrveyid));
|
|
14
|
+
datasets = isEmpty(pickDatasets) ? [] : datasets.filter(item => pickDatasets.includes(item.qrveyid));
|
|
16
15
|
return Promise.all(datasets.map(dataset => getDatasetColumns(config, dataset.qrveyid))).then(response => flattenDeep(response));
|
|
17
16
|
}).catch(_e => Promise.all([]));
|
|
18
17
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qrvey/utils",
|
|
3
|
-
"version": "1.2.9-
|
|
3
|
+
"version": "1.2.9-30",
|
|
4
4
|
"description": "Helper, Utils for all Qrvey Projects",
|
|
5
5
|
"homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc && tsc -m commonjs --outDir dist/cjs",
|
|
9
|
-
"publish": "node prepareToPublish.js &&
|
|
9
|
+
"publish": "node prepareToPublish.js && np",
|
|
10
10
|
"publish-prerelease": "node prepareToPublish.js && npm login && np --any-branch --tag=$npm_config_tag",
|
|
11
11
|
"test": "jest test",
|
|
12
12
|
"test:watch": "jest --watch test",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@types/jest": "27.0.2",
|
|
20
20
|
"doxdox": "3.0.0",
|
|
21
21
|
"jest": "27.2.5",
|
|
22
|
-
"np": "7.
|
|
22
|
+
"np": "7.6.0",
|
|
23
23
|
"ts-jest": "27.0.5",
|
|
24
24
|
"typedoc": "0.22.5",
|
|
25
25
|
"typescript": "4.4.4",
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
"@typescript-eslint/parser": "5.3.0",
|
|
28
28
|
"eslint": "8.1.0"
|
|
29
29
|
},
|
|
30
|
-
"peerDependencies": {
|
|
31
|
-
"np": "^6.2.3"
|
|
32
|
-
},
|
|
33
30
|
"dependencies": {
|
|
34
31
|
"d3": "6.3.1",
|
|
35
32
|
"dayjs": "1.10.7",
|
|
@@ -8,9 +8,11 @@ import { II18nFilterScopes } from "./II18nFilterScopes";
|
|
|
8
8
|
import { II18nFilterPanelScopeTitle } from "./II18nFilterPanelScopeTitle";
|
|
9
9
|
import { II18nFilterDateSections } from "./II18nFilterDateSections";
|
|
10
10
|
import { II18nTokenBox } from './II18nTokenBox';
|
|
11
|
+
import { II18nFilterExtraInfo } from "./II18nFilterExtraInfo";
|
|
11
12
|
|
|
12
13
|
export interface II18nFilter {
|
|
13
14
|
date_sections: II18nFilterDateSections;
|
|
15
|
+
extra_info: II18nFilterExtraInfo;
|
|
14
16
|
operators: II18nFilterOperator;
|
|
15
17
|
ranking_container: II18nRankingContainer;
|
|
16
18
|
relative_container: II18nRelativeContainer;
|
|
@@ -8,6 +8,7 @@ export * from './II18nFilterBuilderSelectedValuesContainer';
|
|
|
8
8
|
|
|
9
9
|
export * from './II18nFilterDateSections';
|
|
10
10
|
export * from './II18nFilterDisplay';
|
|
11
|
+
export * from './II18nFilterExtraInfo';
|
|
11
12
|
export * from './II18nFilterOperator';
|
|
12
13
|
export * from './II18nFilterPanel';
|
|
13
14
|
export * from './II18nFilterPanelCardAction';
|
|
@@ -204,12 +204,12 @@ export const I18N_CHART_BUILDER_GENERAL: Pick<II18nChartBuilder, General> = {
|
|
|
204
204
|
max_limit: 'Only 10,000 max data points are supported.'
|
|
205
205
|
},
|
|
206
206
|
messages_crosstab: {
|
|
207
|
-
max_data: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max
|
|
207
|
+
max_data: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Records</i> and <i>Max Columns</i> to display.',
|
|
208
208
|
max_increment: 'Increasing the amount of records to display above {{max_rows_option}} rows or {{max_groups_option}} columns can affect chart performance.',
|
|
209
209
|
value_missing: 'A <i>Values</i> column could be added to this chart.'
|
|
210
210
|
},
|
|
211
211
|
messages_table_chart: {
|
|
212
|
-
max_data_simple: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max
|
|
212
|
+
max_data_simple: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Records</i> to display.',
|
|
213
213
|
max_data_grouped: 'Chart shows a maximum number of data points by default. To see more, go to <i>General</i> chart options and increase the <i>Max Groups</i> to display.',
|
|
214
214
|
max_increment: 'Increasing the amount of records to display above {{max_rows_option}} rows or {{max_groups_option}} groups can affect chart performance.',
|
|
215
215
|
grouped_column: '<i>Columns</i> are needed for this chart.',
|
|
@@ -13,6 +13,10 @@ export const I18N_FILTER: II18nFilter = {
|
|
|
13
13
|
absolute: FILTER_DATE_SECTION_LABEL.ABSOLUTE,
|
|
14
14
|
relative: FILTER_DATE_SECTION_LABEL.RELATIVE,
|
|
15
15
|
},
|
|
16
|
+
extra_info: {
|
|
17
|
+
date_picker_tooltip: 'Created with date picker',
|
|
18
|
+
input_box_tooltip: 'Input Box Filter',
|
|
19
|
+
},
|
|
16
20
|
operators: I18N_FILTER_OPERATOR,
|
|
17
21
|
ranking_container: I18N_RANKING_CONTAINER,
|
|
18
22
|
relative_container: I18N_RELATIVE_CONTAINER,
|
|
@@ -23,7 +23,7 @@ export const I18N_PANEL: II18nPanel = {
|
|
|
23
23
|
missing_linked_column: 'Missing linked column.',
|
|
24
24
|
no_data_found: 'No data found.',
|
|
25
25
|
refresh_panel: 'Refresh panel',
|
|
26
|
-
server_error: '
|
|
26
|
+
server_error: 'Server Error.',
|
|
27
27
|
restore_panel: 'Restore panel',
|
|
28
28
|
service_unavailable: '{{panel}} not available at the moment.',
|
|
29
29
|
try_again: 'Try Again',
|
|
@@ -14,7 +14,7 @@ export function getAllDatasets(config: IGeneralWidgetConfig, pickDatasets: strin
|
|
|
14
14
|
return getAllQrveys({ ...config }, { status: ['RUNNING', 'FINISHED', 'PAUSED'], loadAll: true })
|
|
15
15
|
.then((qrveys) => {
|
|
16
16
|
let datasets = qrveys.Items.filter(filterSupportedDatasets);
|
|
17
|
-
|
|
17
|
+
datasets = isEmpty(pickDatasets) ? [] : datasets.filter(item => pickDatasets.includes(item.qrveyid));
|
|
18
18
|
return Promise.all(datasets.map(dataset => getDatasetColumns(config, dataset.qrveyid))).then(response => flattenDeep(response));
|
|
19
19
|
}).catch(_e => Promise.all([]));
|
|
20
20
|
}
|