@qrvey/utils 1.2.9-5 → 1.2.9-6

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.
Files changed (108) hide show
  1. package/README.md +929 -929
  2. package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO.d.ts +5 -0
  3. package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO.js +11 -0
  4. package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.d.ts +5 -0
  5. package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +14 -0
  6. package/dist/cjs/dates/relative/constants/index.d.ts +2 -0
  7. package/dist/cjs/dates/relative/constants/index.js +2 -0
  8. package/dist/cjs/dates/relative/interfaces/IRelativeUnit.d.ts +2 -0
  9. package/dist/cjs/{globalization/interfaces/chart_builder/II18nChartBuilderChartLabes.js → dates/relative/interfaces/IRelativeUnit.js} +0 -0
  10. package/dist/cjs/dates/relative/interfaces/IRelativeUnitInfo.d.ts +5 -0
  11. package/dist/cjs/dates/relative/interfaces/IRelativeUnitInfo.js +2 -0
  12. package/dist/cjs/dates/relative/interfaces/index.d.ts +2 -0
  13. package/dist/cjs/dates/relative/interfaces/index.js +2 -0
  14. package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.js +2 -0
  15. package/dist/cjs/globalization/helpers/getReverseI18nGroupLabel.js +2 -0
  16. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -2
  17. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +19 -18
  18. package/dist/cjs/globalization/interfaces/chart_builder/{II18nChartBuilderChartLabes.d.ts → II18nChartBuilderChartLabels.d.ts} +1 -1
  19. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.js +2 -0
  20. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderColorSettings.d.ts +5 -4
  21. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComparisionOptions.d.ts +1 -1
  22. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderSorting.d.ts +3 -1
  23. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +19 -16
  24. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.d.ts +1 -1
  25. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTooltipSettings.d.ts +1 -1
  26. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTrendChart.d.ts +15 -3
  27. package/dist/cjs/globalization/interfaces/chart_builder/index.d.ts +1 -1
  28. package/dist/cjs/globalization/interfaces/chart_builder/index.js +1 -1
  29. package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
  30. package/dist/cjs/globalization/interfaces/common/II18nUnits.d.ts +7 -0
  31. package/dist/cjs/globalization/interfaces/common/II18nUnits.js +2 -0
  32. package/dist/cjs/globalization/interfaces/common/index.d.ts +2 -0
  33. package/dist/cjs/globalization/interfaces/common/index.js +2 -0
  34. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_COMPARISION_OPTIONS.js +1 -1
  35. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
  36. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +21 -9
  37. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +5 -3
  38. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +43 -38
  39. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.js +1 -1
  40. package/dist/cjs/globalization/labels/common/I18N_COMMON.js +8 -0
  41. package/dist/dates/relative/constants/RELATIVE_UNIT_INFO.d.ts +5 -0
  42. package/dist/dates/relative/constants/RELATIVE_UNIT_INFO.js +8 -0
  43. package/dist/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.d.ts +5 -0
  44. package/dist/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +11 -0
  45. package/dist/dates/relative/constants/index.d.ts +2 -0
  46. package/dist/dates/relative/constants/index.js +2 -0
  47. package/dist/dates/relative/interfaces/IRelativeUnit.d.ts +2 -0
  48. package/dist/{globalization/interfaces/chart_builder/II18nChartBuilderChartLabes.js → dates/relative/interfaces/IRelativeUnit.js} +0 -0
  49. package/dist/dates/relative/interfaces/IRelativeUnitInfo.d.ts +5 -0
  50. package/dist/dates/relative/interfaces/IRelativeUnitInfo.js +1 -0
  51. package/dist/dates/relative/interfaces/index.d.ts +2 -0
  52. package/dist/dates/relative/interfaces/index.js +2 -0
  53. package/dist/globalization/helpers/getI18nDateGroupLabel.js +2 -0
  54. package/dist/globalization/helpers/getReverseI18nGroupLabel.js +2 -0
  55. package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -2
  56. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +19 -18
  57. package/dist/globalization/interfaces/chart_builder/{II18nChartBuilderChartLabes.d.ts → II18nChartBuilderChartLabels.d.ts} +1 -1
  58. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.js +1 -0
  59. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderColorSettings.d.ts +5 -4
  60. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComparisionOptions.d.ts +1 -1
  61. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderSorting.d.ts +3 -1
  62. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +19 -16
  63. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.d.ts +1 -1
  64. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTooltipSettings.d.ts +1 -1
  65. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTrendChart.d.ts +15 -3
  66. package/dist/globalization/interfaces/chart_builder/index.d.ts +1 -1
  67. package/dist/globalization/interfaces/chart_builder/index.js +1 -1
  68. package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
  69. package/dist/globalization/interfaces/common/II18nUnits.d.ts +7 -0
  70. package/dist/globalization/interfaces/common/II18nUnits.js +1 -0
  71. package/dist/globalization/interfaces/common/index.d.ts +2 -0
  72. package/dist/globalization/interfaces/common/index.js +2 -0
  73. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_COMPARISION_OPTIONS.js +1 -1
  74. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
  75. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +21 -9
  76. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +5 -3
  77. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +43 -38
  78. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.js +1 -1
  79. package/dist/globalization/labels/common/I18N_COMMON.js +8 -0
  80. package/package.json +1 -1
  81. package/src/dates/relative/constants/RELATIVE_UNIT_INFO.ts +11 -0
  82. package/src/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.ts +13 -0
  83. package/src/dates/relative/constants/index.ts +2 -0
  84. package/src/dates/relative/interfaces/IRelativeUnit.ts +3 -0
  85. package/src/dates/relative/interfaces/IRelativeUnitInfo.ts +7 -0
  86. package/src/dates/relative/interfaces/index.ts +2 -0
  87. package/src/globalization/helpers/getI18nDateGroupLabel.ts +2 -0
  88. package/src/globalization/helpers/getReverseI18nGroupLabel.ts +2 -0
  89. package/src/globalization/interfaces/chart_builder/II18nChartBuilder.ts +2 -2
  90. package/src/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.ts +19 -18
  91. package/src/globalization/interfaces/chart_builder/{II18nChartBuilderChartLabes.ts → II18nChartBuilderChartLabels.ts} +1 -1
  92. package/src/globalization/interfaces/chart_builder/II18nChartBuilderColorSettings.ts +5 -4
  93. package/src/globalization/interfaces/chart_builder/II18nChartBuilderComparisionOptions.ts +1 -1
  94. package/src/globalization/interfaces/chart_builder/II18nChartBuilderSorting.ts +3 -1
  95. package/src/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.ts +19 -16
  96. package/src/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.ts +1 -1
  97. package/src/globalization/interfaces/chart_builder/II18nChartBuilderTooltipSettings.ts +1 -1
  98. package/src/globalization/interfaces/chart_builder/II18nChartBuilderTrendChart.ts +15 -3
  99. package/src/globalization/interfaces/chart_builder/index.ts +1 -1
  100. package/src/globalization/interfaces/common/II18nCommon.ts +2 -0
  101. package/src/globalization/interfaces/common/II18nUnits.ts +7 -0
  102. package/src/globalization/interfaces/common/index.ts +3 -0
  103. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_COMPARISION_OPTIONS.ts +1 -1
  104. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.ts +22 -11
  105. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.ts +5 -4
  106. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +43 -38
  107. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.ts +1 -1
  108. package/src/globalization/labels/common/I18N_COMMON.ts +8 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-5*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-6*
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/adapters/mdyDateToDate.js
83
+ ### dist/filters/adapters/FDToFlatUI.js
84
84
 
85
85
 
86
- #### mdyDateToDate(monthYearDate, time)
86
+ #### FDToFlatUI(filterData, datasetsInfo)
87
87
 
88
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
88
+ Generates a Flattened UI filter structure from Filter Data structure.
89
89
 
90
90
 
91
91
 
@@ -94,8 +94,8 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
94
94
 
95
95
  | Name | Type | Description | |
96
96
  | ---- | ---- | ----------- | -------- |
97
- | monthYearDate | | String of [mm/dd/yyyy] date |   |
98
- | time | | Flag to parse the object date to milliseconds. |   |
97
+ | filterData | | The filter data object. |   |
98
+ | datasetsInfo | | Collection of datasets information |   |
99
99
 
100
100
 
101
101
 
@@ -103,17 +103,13 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
103
103
  ##### Returns
104
104
 
105
105
 
106
- - The date object or the date in milliseconds
107
-
108
-
109
-
106
+ - a flattened UI filters array
110
107
 
111
- ### dist/dates/adapters/monthYearToDate.js
112
108
 
113
109
 
114
- #### monthYearToDate(monthYearDate, time)
110
+ #### FD21ToFlatUI(scopes, datasetsInfo)
115
111
 
116
- Transforms String Date from a [Month Year] format to Date object.
112
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
117
113
 
118
114
 
119
115
 
@@ -122,8 +118,8 @@ Transforms String Date from a [Month Year] format to Date object.
122
118
 
123
119
  | Name | Type | Description | |
124
120
  | ---- | ---- | ----------- | -------- |
125
- | monthYearDate | | String of [Month Year] date |   |
126
- | time | | Flag to parse the object date to milliseconds. |   |
121
+ | scopes | | The filter scope section |   |
122
+ | datasetsInfo | | Collection of datasets information |   |
127
123
 
128
124
 
129
125
 
@@ -131,17 +127,17 @@ Transforms String Date from a [Month Year] format to Date object.
131
127
  ##### Returns
132
128
 
133
129
 
134
- - The date object or the date in milliseconds
130
+ - a flattened UI filters array
135
131
 
136
132
 
137
133
 
138
134
 
139
- ### dist/dates/adapters/quarterYearToDate.js
135
+ ### dist/filters/adapters/FDToLogic.js
140
136
 
141
137
 
142
- #### quarterYearToDate(quarterYearDate, time)
138
+ #### FDToLogic(filterData)
143
139
 
144
- Transforms String Date from a [Quarter Year] format to Date object.
140
+ Generates a Filter Logic structure from Filter Data structure.
145
141
 
146
142
 
147
143
 
@@ -150,8 +146,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
150
146
 
151
147
  | Name | Type | Description | |
152
148
  | ---- | ---- | ----------- | -------- |
153
- | quarterYearDate | | String of [Quarter Year] date |   |
154
- | time | | Flag to parse the object date to milliseconds. |   |
149
+ | filterData | | The filter data object. |   |
155
150
 
156
151
 
157
152
 
@@ -159,17 +154,13 @@ Transforms String Date from a [Quarter Year] format to Date object.
159
154
  ##### Returns
160
155
 
161
156
 
162
- - The date object or the date in milliseconds
163
-
164
-
165
-
157
+ - a filter logic array
166
158
 
167
- ### dist/dates/adapters/weekYearToDate.js
168
159
 
169
160
 
170
- #### weekYearToDate(date, time)
161
+ #### getLogicBodyFromFD21(filterData)
171
162
 
172
- Transforms String Date from a [Week Year] format to Date object.
163
+ Gets the logic body
173
164
 
174
165
 
175
166
 
@@ -178,8 +169,7 @@ Transforms String Date from a [Week Year] format to Date object.
178
169
 
179
170
  | Name | Type | Description | |
180
171
  | ---- | ---- | ----------- | -------- |
181
- | date | | String of [Week Year] date |   |
182
- | time | | Flag to parse the object date to milliseconds. |   |
172
+ | filterData | | The filter data object |   |
183
173
 
184
174
 
185
175
 
@@ -187,17 +177,17 @@ Transforms String Date from a [Week Year] format to Date object.
187
177
  ##### Returns
188
178
 
189
179
 
190
- - The date object or the date in milliseconds
180
+ - a filter logic array
191
181
 
192
182
 
193
183
 
194
184
 
195
- ### dist/dates/adapters/yearToDate.js
185
+ ### dist/filters/adapters/FDToUI.js
196
186
 
197
187
 
198
- #### yearToDate(yearDate, time)
188
+ #### FDToUI(filterData, datasetsInfo)
199
189
 
200
- Transforms String Date from a [Year] format to Date object.
190
+ Generates a UI filter structure from Filter Data structure.
201
191
 
202
192
 
203
193
 
@@ -206,8 +196,8 @@ Transforms String Date from a [Year] format to Date object.
206
196
 
207
197
  | Name | Type | Description | |
208
198
  | ---- | ---- | ----------- | -------- |
209
- | yearDate | | String of [Year] date |   |
210
- | time | | Flag to parse the object date to milliseconds. |   |
199
+ | filterData | | The filter data object. |   |
200
+ | datasetsInfo | | Collection of datasets information |   |
211
201
 
212
202
 
213
203
 
@@ -215,17 +205,13 @@ Transforms String Date from a [Year] format to Date object.
215
205
  ##### Returns
216
206
 
217
207
 
218
- - The date object or the date in milliseconds
219
-
220
-
221
-
208
+ - a UI Filters structure
222
209
 
223
- ### dist/dates/helpers/getDateByDateFormat.js
224
210
 
225
211
 
226
- #### getDateByDateFormat(date, format, time)
212
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
227
213
 
228
- Gets a Date Object instance by a Date format
214
+ Generates a UI filter Structure from the Filter Data structure v2.1
229
215
 
230
216
 
231
217
 
@@ -234,9 +220,10 @@ Gets a Date Object instance by a Date format
234
220
 
235
221
  | Name | Type | Description | |
236
222
  | ---- | ---- | ----------- | -------- |
237
- | date | | String with a formatted date |   |
238
- | format | | The date format |   |
239
- | time | | flag to convert the formatted date to miliseconds |   |
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 |   |
240
227
 
241
228
 
242
229
 
@@ -244,17 +231,17 @@ Gets a Date Object instance by a Date format
244
231
  ##### Returns
245
232
 
246
233
 
247
- - a Date object, milisecond time or the same value if date format does not match.
234
+ - a UI filter Structure
248
235
 
249
236
 
250
237
 
251
238
 
252
- ### dist/dates/helpers/getDateFormatByProperty.js
239
+ ### dist/filters/adapters/UIToFD.js
253
240
 
254
241
 
255
- #### getDateFormatByProperty(property)
242
+ #### UIToFD(filterData)
256
243
 
257
- Gets the date format by the given property
244
+ Generates a Filter Data Structure structure from UI Filter Data structure.
258
245
 
259
246
 
260
247
 
@@ -263,7 +250,7 @@ Gets the date format by the given property
263
250
 
264
251
  | Name | Type | Description | |
265
252
  | ---- | ---- | ----------- | -------- |
266
- | property | | The Column Property |   |
253
+ | filterData | | The UI filter data object. |   |
267
254
 
268
255
 
269
256
 
@@ -271,17 +258,13 @@ Gets the date format by the given property
271
258
  ##### Returns
272
259
 
273
260
 
274
- - The date format
275
-
276
-
277
-
261
+ - a Filter Data structure
278
262
 
279
- ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
280
263
 
281
264
 
282
- #### getDateFormatRegularExpressionInArray(dateFormat)
265
+ #### UI21ToFD(uFilterData, version)
283
266
 
284
- Gets an array of regular expressions by the given date format
267
+ Builds the Fitler Data structure from UI filter data
285
268
 
286
269
 
287
270
 
@@ -290,7 +273,8 @@ Gets an array of regular expressions by the given date format
290
273
 
291
274
  | Name | Type | Description | |
292
275
  | ---- | ---- | ----------- | -------- |
293
- | dateFormat | | the date format |   |
276
+ | uFilterData | | The UI filter Data object |   |
277
+ | version | | the version of the structure |   |
294
278
 
295
279
 
296
280
 
@@ -298,17 +282,17 @@ Gets an array of regular expressions by the given date format
298
282
  ##### Returns
299
283
 
300
284
 
301
- - an array of regular expressions
285
+ -
302
286
 
303
287
 
304
288
 
305
289
 
306
- ### dist/dates/helpers/getSeparatorByDateFormat.js
290
+ ### dist/filters/adapters/UIToFlatUI.js
307
291
 
308
292
 
309
- #### getSeparatorByDateFormat(format)
293
+ #### UIToFlatUI(filterData, datasetsInfo)
310
294
 
311
- Gets the separator of the date format
295
+ Generates a Flattened UI filter structure from UI Filter Data structure.
312
296
 
313
297
 
314
298
 
@@ -317,7 +301,8 @@ Gets the separator of the date format
317
301
 
318
302
  | Name | Type | Description | |
319
303
  | ---- | ---- | ----------- | -------- |
320
- | format | | the date format |   |
304
+ | filterData | | The UI filter data object. |   |
305
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
321
306
 
322
307
 
323
308
 
@@ -325,18 +310,13 @@ Gets the separator of the date format
325
310
  ##### Returns
326
311
 
327
312
 
328
- - a separator string
329
-
330
-
331
-
313
+ - a flattened UI filters array
332
314
 
333
- ### dist/dates/helpers/getWeek.js
334
315
 
335
316
 
336
- #### getWeek(date)
317
+ #### UI21ToFlatUI(scopes)
337
318
 
338
- Gets the week number of the year
339
- Additionally, the month and the year
319
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
340
320
 
341
321
 
342
322
 
@@ -345,7 +325,7 @@ Additionally, the month and the year
345
325
 
346
326
  | Name | Type | Description | |
347
327
  | ---- | ---- | ----------- | -------- |
348
- | date | | the date object |   |
328
+ | scopes | | The filter scope section |   |
349
329
 
350
330
 
351
331
 
@@ -353,20 +333,18 @@ Additionally, the month and the year
353
333
  ##### Returns
354
334
 
355
335
 
356
- - an object with the week, month and year.
336
+ - a flattened UI filters array
357
337
 
358
338
 
359
339
 
360
340
 
361
- ### dist/dates/helpers/validateDate.js
341
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
362
342
 
363
343
 
364
- #### validateDate(date, format)
344
+ #### adaptDateGroupingProperty(property)
365
345
 
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
346
+ [TODO: For 2022, eliminate this adapter]
347
+ Get the new property base on the old date grouping properties
370
348
 
371
349
 
372
350
 
@@ -375,8 +353,7 @@ Validate a string date depending on giving format
375
353
 
376
354
  | Name | Type | Description | |
377
355
  | ---- | ---- | ----------- | -------- |
378
- | date | | String of date |   |
379
- | format | | String of the format to validate |   |
356
+ | property | | |   |
380
357
 
381
358
 
382
359
 
@@ -384,17 +361,17 @@ Validate a string date depending on giving format
384
361
  ##### Returns
385
362
 
386
363
 
387
- - True if it is valid or not. Undefined if date is undefined
364
+ -
388
365
 
389
366
 
390
367
 
391
368
 
392
- ### dist/dates/helpers/validateDateByDateFormat.js
369
+ ### dist/filters/adapters/adaptFilterData.js
393
370
 
394
371
 
395
- #### validateDateByDateFormat(date, dateForma)
372
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
396
373
 
397
- Validates the given string as Date by its date format.
374
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
398
375
 
399
376
 
400
377
 
@@ -403,8 +380,9 @@ Validates the given string as Date by its date format.
403
380
 
404
381
  | Name | Type | Description | |
405
382
  | ---- | ---- | ----------- | -------- |
406
- | date | | a string to validate as date form |   |
407
- | dateForma | | the format of the date to validate the string |   |
383
+ | filterData | | The filter data structure. Accepts both v2.1 or v2.0 |   |
384
+ | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) |   |
385
+ | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory |   |
408
386
 
409
387
 
410
388
 
@@ -412,17 +390,18 @@ Validates the given string as Date by its date format.
412
390
  ##### Returns
413
391
 
414
392
 
415
- - true: the string is a valida date
393
+ - A new filter data structure v2.1
416
394
 
417
395
 
418
396
 
419
397
 
420
- ### dist/dates/range/getDateRange.js
398
+ ### dist/filters/adapters/adaptFilterValues.js
421
399
 
422
400
 
423
- #### getDateRange(value, dateGroupLabel, withTime)
401
+ #### adaptFilterValues(filter)
424
402
 
425
- Get date range object from a string date value
403
+ [TODO: For 2022, eliminate this adapter]
404
+ Gets an adapted filter value array. Validates the enabled property and sets
426
405
 
427
406
 
428
407
 
@@ -431,74 +410,59 @@ Get date range object from a string date value
431
410
 
432
411
  | Name | Type | Description | |
433
412
  | ---- | ---- | ----------- | -------- |
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 |   |
413
+ | filter | | The filter |   |
437
414
 
438
415
 
439
416
 
440
417
 
441
- ##### Examples
418
+ ##### Returns
442
419
 
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
420
 
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
- }
421
+ - A new value array with the filled properties.
459
422
 
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
423
 
469
424
 
470
- ##### Returns
471
425
 
426
+ ### dist/filters/adapters/flatUIToFD.js
472
427
 
473
- - `Object` an object with the date range with two string date properties: from and to
474
428
 
429
+ #### flatUIToFD(uFilters, version)
475
430
 
431
+ Generates a filter data structure from the flatttened UI filters.
476
432
 
477
433
 
478
- ### dist/dates/relative/Adapter.js
479
434
 
480
435
 
481
- #### value()
436
+ ##### Parameters
482
437
 
483
- Resolves statement and returns statement value
438
+ | Name | Type | Description | |
439
+ | ---- | ---- | ----------- | -------- |
440
+ | uFilters | | Array of flattened filters from UI |   |
441
+ | version | | Tag for the version of the filter data structure |   |
484
442
 
485
443
 
486
444
 
487
445
 
446
+ ##### Returns
488
447
 
489
448
 
490
- ##### Returns
449
+ - a Filter Data.
491
450
 
492
451
 
493
- - `AbsoluteRange` `string`
494
452
 
453
+ #### buildScopes(fbFilters)
454
+
455
+ Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
456
+ Also, adds and organizes filters by datasets
495
457
 
496
458
 
497
- #### valueAsAnchor()
498
459
 
499
- Resolves statement as an anchor
500
460
 
461
+ ##### Parameters
501
462
 
463
+ | Name | Type | Description | |
464
+ | ---- | ---- | ----------- | -------- |
465
+ | fbFilters | | Array of flat filters from UI |   |
502
466
 
503
467
 
504
468
 
@@ -506,77 +470,86 @@ Resolves statement as an anchor
506
470
  ##### Returns
507
471
 
508
472
 
509
- - `string`
473
+ - an array of scopes structure.
510
474
 
511
475
 
512
476
 
513
- #### _statementToRange() *private method*
477
+ #### buildScope(uFilter)
514
478
 
515
- Convert verbal statement to range value
479
+ Gets an scope structure for the filter data
516
480
 
517
481
 
518
482
 
519
483
 
484
+ ##### Parameters
520
485
 
486
+ | Name | Type | Description | |
487
+ | ---- | ---- | ----------- | -------- |
488
+ | uFilter | | UI structure filter |   |
521
489
 
522
- ##### Returns
523
490
 
524
491
 
525
- - `AbsoluteRange`
526
492
 
493
+ ##### Returns
527
494
 
528
495
 
529
- #### _resolveAsThis() *private method*
496
+ - an scope structure
530
497
 
531
- Apply 'this' cursor logic to statement
532
498
 
533
499
 
500
+ #### buildDataset(uFilter)
534
501
 
502
+ Gets an dataset structure for the filter data
535
503
 
536
504
 
537
505
 
538
- ##### Returns
539
506
 
507
+ ##### Parameters
540
508
 
541
- - `AbsoluteStatement`
509
+ | Name | Type | Description | |
510
+ | ---- | ---- | ----------- | -------- |
511
+ | uFilter | | a UI structure filter |   |
542
512
 
543
513
 
544
514
 
545
- #### _resolveAsTheLast() *private method*
546
515
 
547
- Apply 'the last' cursor logic to statement
516
+ ##### Returns
548
517
 
549
518
 
519
+ - an dataset structure
550
520
 
551
521
 
552
522
 
523
+ #### buildFilter(uFilter)
553
524
 
554
- ##### Returns
525
+ Gets an filter structure for the filter data
555
526
 
556
527
 
557
- - `AbsoluteStatement`
558
528
 
559
529
 
530
+ ##### Parameters
560
531
 
561
- #### _resolveAsTheNext() *private method*
532
+ | Name | Type | Description | |
533
+ | ---- | ---- | ----------- | -------- |
534
+ | uFilter | | a UI structure filter |   |
562
535
 
563
- Apply 'the next' cursor logic to statement
564
536
 
565
537
 
566
538
 
539
+ ##### Returns
567
540
 
568
541
 
542
+ - an filter structure
569
543
 
570
- ##### Returns
571
544
 
572
545
 
573
- - `AbsoluteStatement`
574
546
 
547
+ ### dist/filters/adapters/flatUIToLogic.js
575
548
 
576
549
 
577
- #### replaceNowToken(value, now)
550
+ #### flatUIToLogic(uFilter)
578
551
 
579
- Replace '@now' token inside a string
552
+ Generates a Logic structure from flattened UI filters
580
553
 
581
554
 
582
555
 
@@ -585,8 +558,7 @@ Replace '@now' token inside a string
585
558
 
586
559
  | Name | Type | Description | |
587
560
  | ---- | ---- | ----------- | -------- |
588
- | value | `string` | |   |
589
- | now | `Date` | |   |
561
+ | uFilter | | Array of flat filters from UI |   |
590
562
 
591
563
 
592
564
 
@@ -594,60 +566,44 @@ Replace '@now' token inside a string
594
566
  ##### Returns
595
567
 
596
568
 
597
- - `string`
569
+ - The logic structure
598
570
 
599
571
 
600
572
 
601
- #### convertRelativeToAbsolute(args)
602
573
 
603
- Returns a range object (date) from a group of statement params
574
+ ### dist/filters/adapters/flatUIToOldLogic.js
604
575
 
605
576
 
577
+ #### flatUIToOldLogic(uFilters)
606
578
 
579
+ Generates a Logic structure from flattened UI filters
607
580
 
608
- ##### Parameters
609
581
 
610
- | Name | Type | Description | |
611
- | ---- | ---- | ----------- | -------- |
612
- | args | `RelativeToAbsoluteStruct` | |   |
613
582
 
614
583
 
584
+ ##### Parameters
615
585
 
586
+ | Name | Type | Description | |
587
+ | ---- | ---- | ----------- | -------- |
588
+ | uFilters | | Array of flat filters from UI |   |
616
589
 
617
- ##### Examples
618
590
 
619
- ```javascript
620
- pivot = '2021-03-03T12:30:40'
621
- unit = month
622
- steps = 2
623
- setTo = END
624
- resolverAsCalendar: true
625
- => Returns '2021-05-31T23:59:59'
626
- ```
627
- ```javascript
628
- pivot = '2021-03-03T12:30:40'
629
- unit = month
630
- steps = -2
631
- setTo = START
632
- resolverAsCalendar: false
633
- => Returns '2021-01-03T00:00:00'
634
- ```
635
591
 
636
592
 
637
593
  ##### Returns
638
594
 
639
595
 
640
- - `string`
596
+ - The logic structure
641
597
 
642
598
 
643
599
 
644
600
 
645
- ### dist/dates/relative/relative.js
601
+ ### dist/filters/adapters/flatUIToUI.js
646
602
 
647
603
 
648
- #### resolveRelative(statements, clock)
604
+ #### flatUIToUI(uFilters, version)
649
605
 
650
- Resolve a list of relative statements according to operator
606
+ Generates a UI filter data structure from the flatttened UI filters.
651
607
 
652
608
 
653
609
 
@@ -656,44 +612,23 @@ Resolve a list of relative statements according to operator
656
612
 
657
613
  | Name | Type | Description | |
658
614
  | ---- | ---- | ----------- | -------- |
659
- | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
660
- | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
661
-
662
-
663
-
664
-
665
- ##### Examples
615
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
616
+ | version | | Tag for the version of the filter data structure | &nbsp; |
666
617
 
667
- ```javascript
668
- Input:
669
- {
670
- "cursor": "the_next",
671
- "unit": "year",
672
- "number": 1,
673
- "includeCurrent": false,
674
- "isCalendarDate": false,
675
- "anchor": "03/05/2021"
676
- }
677
618
 
678
- Output:
679
- { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
680
- ```
681
619
 
682
620
 
683
621
  ##### Returns
684
622
 
685
623
 
686
- - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
687
-
688
-
689
-
624
+ - a UI Filter Data.
690
625
 
691
- ### dist/filters/adapters/FDToFlatUI.js
692
626
 
693
627
 
694
- #### FDToFlatUI(filterData, datasetsInfo)
628
+ #### buildScopes(fbFilters)
695
629
 
696
- Generates a Flattened UI filter structure from Filter Data structure.
630
+ Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
631
+ Also, adds and organizes filters by datasets
697
632
 
698
633
 
699
634
 
@@ -702,8 +637,7 @@ Generates a Flattened UI filter structure from Filter Data structure.
702
637
 
703
638
  | Name | Type | Description | |
704
639
  | ---- | ---- | ----------- | -------- |
705
- | filterData | | The filter data object. | &nbsp; |
706
- | datasetsInfo | | Collection of datasets information | &nbsp; |
640
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
707
641
 
708
642
 
709
643
 
@@ -711,13 +645,13 @@ Generates a Flattened UI filter structure from Filter Data structure.
711
645
  ##### Returns
712
646
 
713
647
 
714
- - a flattened UI filters array
648
+ - an array of scopes structure.
715
649
 
716
650
 
717
651
 
718
- #### FD21ToFlatUI(scopes, datasetsInfo)
652
+ #### buildScope(uFilter)
719
653
 
720
- Generates a Filter Builder Structure from the Filter Data structure v2.1
654
+ Gets an scope structure for the UI filter data
721
655
 
722
656
 
723
657
 
@@ -726,8 +660,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
726
660
 
727
661
  | Name | Type | Description | |
728
662
  | ---- | ---- | ----------- | -------- |
729
- | scopes | | The filter scope section | &nbsp; |
730
- | datasetsInfo | | Collection of datasets information | &nbsp; |
663
+ | uFilter | | UI structure filter | &nbsp; |
731
664
 
732
665
 
733
666
 
@@ -735,17 +668,13 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
735
668
  ##### Returns
736
669
 
737
670
 
738
- - a flattened UI filters array
739
-
740
-
741
-
671
+ - an scope structure
742
672
 
743
- ### dist/filters/adapters/FDToLogic.js
744
673
 
745
674
 
746
- #### FDToLogic(filterData)
675
+ #### buildDataset(uFilter)
747
676
 
748
- Generates a Filter Logic structure from Filter Data structure.
677
+ Gets an dataset structure for the UI filter data
749
678
 
750
679
 
751
680
 
@@ -754,7 +683,7 @@ Generates a Filter Logic structure from Filter Data structure.
754
683
 
755
684
  | Name | Type | Description | |
756
685
  | ---- | ---- | ----------- | -------- |
757
- | filterData | | The filter data object. | &nbsp; |
686
+ | uFilter | | a UI structure filter | &nbsp; |
758
687
 
759
688
 
760
689
 
@@ -762,13 +691,13 @@ Generates a Filter Logic structure from Filter Data structure.
762
691
  ##### Returns
763
692
 
764
693
 
765
- - a filter logic array
694
+ - an dataset structure
766
695
 
767
696
 
768
697
 
769
- #### getLogicBodyFromFD21(filterData)
698
+ #### buildFilter(uFilter)
770
699
 
771
- Gets the logic body
700
+ Gets an filter structure for the UI filter data
772
701
 
773
702
 
774
703
 
@@ -777,7 +706,7 @@ Gets the logic body
777
706
 
778
707
  | Name | Type | Description | |
779
708
  | ---- | ---- | ----------- | -------- |
780
- | filterData | | The filter data object | &nbsp; |
709
+ | uFilter | | a UI structure filter | &nbsp; |
781
710
 
782
711
 
783
712
 
@@ -785,17 +714,17 @@ Gets the logic body
785
714
  ##### Returns
786
715
 
787
716
 
788
- - a filter logic array
717
+ - an filter structure
789
718
 
790
719
 
791
720
 
792
721
 
793
- ### dist/filters/adapters/FDToUI.js
722
+ ### dist/filters/adapters/logicToFD.js
794
723
 
795
724
 
796
- #### FDToUI(filterData, datasetsInfo)
725
+ #### logicToFD(filterData, version)
797
726
 
798
- Generates a UI filter structure from Filter Data structure.
727
+ Generates a filter data structure from the old logic structure (v2.0).
799
728
 
800
729
 
801
730
 
@@ -804,8 +733,8 @@ Generates a UI filter structure from Filter Data structure.
804
733
 
805
734
  | Name | Type | Description | |
806
735
  | ---- | ---- | ----------- | -------- |
807
- | filterData | | The filter data object. | &nbsp; |
808
- | datasetsInfo | | Collection of datasets information | &nbsp; |
736
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
737
+ | version | | Tag for the version of the filter data structure | &nbsp; |
809
738
 
810
739
 
811
740
 
@@ -813,13 +742,17 @@ Generates a UI filter structure from Filter Data structure.
813
742
  ##### Returns
814
743
 
815
744
 
816
- - a UI Filters structure
745
+ - a Filter Data.
817
746
 
818
747
 
819
748
 
820
- #### FD21ToUI(scopes, section, version, datasetsInfo)
821
749
 
822
- Generates a UI filter Structure from the Filter Data structure v2.1
750
+ ### dist/filters/adapters/logicToFlatUI.js
751
+
752
+
753
+ #### logicToFlatUI(logics)
754
+
755
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
823
756
 
824
757
 
825
758
 
@@ -828,10 +761,7 @@ Generates a UI filter Structure from the Filter Data structure v2.1
828
761
 
829
762
  | Name | Type | Description | |
830
763
  | ---- | ---- | ----------- | -------- |
831
- | scopes | | The filter scope section | &nbsp; |
832
- | section | | The filter section. | &nbsp; |
833
- | version | | The version of the filter structure | &nbsp; |
834
- | datasetsInfo | | Collection of datasets information | &nbsp; |
764
+ | logics | | The old logic structure (v2.0) | &nbsp; |
835
765
 
836
766
 
837
767
 
@@ -839,17 +769,13 @@ Generates a UI filter Structure from the Filter Data structure v2.1
839
769
  ##### Returns
840
770
 
841
771
 
842
- - a UI filter Structure
843
-
844
-
845
-
772
+ - The Flattened UI Filters array
846
773
 
847
- ### dist/filters/adapters/UIToFD.js
848
774
 
849
775
 
850
- #### UIToFD(filterData)
776
+ #### getFilter(filters, filter, getIndex)
851
777
 
852
- Generates a Filter Data Structure structure from UI Filter Data structure.
778
+ Get the filter or the index of the given array, validating an old filter structure.
853
779
 
854
780
 
855
781
 
@@ -858,7 +784,9 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
858
784
 
859
785
  | Name | Type | Description | |
860
786
  | ---- | ---- | ----------- | -------- |
861
- | filterData | | The UI filter data object. | &nbsp; |
787
+ | filters | | The array of UI filters | &nbsp; |
788
+ | filter | | The old logic structure filter | &nbsp; |
789
+ | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
862
790
 
863
791
 
864
792
 
@@ -866,13 +794,13 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
866
794
  ##### Returns
867
795
 
868
796
 
869
- - a Filter Data structure
797
+ - the index or the UI filter object
870
798
 
871
799
 
872
800
 
873
- #### UI21ToFD(uFilterData, version)
801
+ #### refineRankingValues(values, uiValues)
874
802
 
875
- Builds the Fitler Data structure from UI filter data
803
+ Refines the values of the Ranking column type.
876
804
 
877
805
 
878
806
 
@@ -881,8 +809,8 @@ Builds the Fitler Data structure from UI filter data
881
809
 
882
810
  | Name | Type | Description | |
883
811
  | ---- | ---- | ----------- | -------- |
884
- | uFilterData | | The UI filter Data object | &nbsp; |
885
- | version | | the version of the structure | &nbsp; |
812
+ | values | | the Array of Ranking values | &nbsp; |
813
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
886
814
 
887
815
 
888
816
 
@@ -890,17 +818,17 @@ Builds the Fitler Data structure from UI filter data
890
818
  ##### Returns
891
819
 
892
820
 
893
- -
821
+ - the array of Ranking values
894
822
 
895
823
 
896
824
 
897
825
 
898
- ### dist/filters/adapters/UIToFlatUI.js
826
+ ### dist/filters/adapters/logicToUI.js
899
827
 
900
828
 
901
- #### UIToFlatUI(filterData, datasetsInfo)
829
+ #### logicToUI(uFilters, datasetsInfo)
902
830
 
903
- Generates a Flattened UI filter structure from UI Filter Data structure.
831
+ Generates a UI filter structure from the old logic structure (v2.0).
904
832
 
905
833
 
906
834
 
@@ -909,8 +837,8 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
909
837
 
910
838
  | Name | Type | Description | |
911
839
  | ---- | ---- | ----------- | -------- |
912
- | filterData | | The UI filter data object. | &nbsp; |
913
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
840
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
841
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
914
842
 
915
843
 
916
844
 
@@ -918,13 +846,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
918
846
  ##### Returns
919
847
 
920
848
 
921
- - a flattened UI filters array
849
+ - a UI Filter Data.
922
850
 
923
851
 
924
852
 
925
- #### UI21ToFlatUI(scopes)
926
853
 
927
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
854
+ ### dist/filters/adapters/transformFilters.js
855
+
856
+
857
+ #### transformFilters(oldFiltersObj, section)
858
+
859
+ Transform the old filters structure into the new one
928
860
 
929
861
 
930
862
 
@@ -933,53 +865,97 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
933
865
 
934
866
  | Name | Type | Description | |
935
867
  | ---- | ---- | ----------- | -------- |
936
- | scopes | | The filter scope section | &nbsp; |
868
+ | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
869
+ | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
937
870
 
938
871
 
939
872
 
940
873
 
941
- ##### Returns
874
+ ##### Examples
942
875
 
876
+ ```javascript
943
877
 
944
- - a flattened UI filters array
878
+ const oldPreferenceFilters = {
879
+ "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
880
+ "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
881
+ "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
882
+ "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
883
+ "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
884
+ "formulaId": null,
885
+ "panelId": null,
886
+ "values": [
887
+ {
888
+ "EQUALS": [
889
+ {
890
+ "id": "AK4M8UV2a0",
891
+ "value": "A",
892
+ "enabled": true,
893
+ "imageUrl": null
894
+ },
895
+ {
896
+ "id": "AK4M8UV2a1",
897
+ "value": "B",
898
+ "enabled": true,
899
+ "imageUrl": null
900
+ }
901
+ ]
902
+ }
903
+ ],
904
+ "bucketId": null,
905
+ "text": "MC",
906
+ "title": "MC",
907
+ "type": "SINGLE_CHOICE",
908
+ "qid": "AK4M8UV2",
909
+ "dataset": {
910
+ "sourceid": "xYOQAdpqT",
911
+ "name": "Form All Questions",
912
+ "qrveyid": "xYOQAdpqT",
913
+ "text": "Form All Questions",
914
+ "linkid": 0
915
+ },
916
+ "enabled": true,
917
+ "linked": null
918
+ }
919
+ };
945
920
 
921
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
922
+ ```
946
923
 
947
924
 
925
+ ##### Returns
948
926
 
949
- ### dist/filters/adapters/adaptDateGroupingProperty.js
950
927
 
928
+ - `Object` an object with the new filters structure
951
929
 
952
- #### adaptDateGroupingProperty(property)
953
930
 
954
- [TODO: For 2022, eliminate this adapter]
955
- Get the new property base on the old date grouping properties
956
931
 
957
932
 
933
+ ### dist/filters/classes/FilterInputErrorHandler.js
958
934
 
959
935
 
960
- ##### Parameters
936
+ #### new FilterInputErrorHandler()
961
937
 
962
- | Name | Type | Description | |
963
- | ---- | ---- | ----------- | -------- |
964
- | property | | | &nbsp; |
965
938
 
966
939
 
967
940
 
968
941
 
969
- ##### Returns
970
942
 
971
943
 
972
- -
973
944
 
945
+ ##### Returns
974
946
 
975
947
 
948
+ - `Void`
976
949
 
977
- ### dist/filters/adapters/adaptFilterData.js
978
950
 
979
951
 
980
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
981
952
 
982
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
953
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
954
+
955
+
956
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
957
+
958
+ [TODO: Make a proper description for this function]
983
959
 
984
960
 
985
961
 
@@ -988,9 +964,9 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
988
964
 
989
965
  | Name | Type | Description | |
990
966
  | ---- | ---- | ----------- | -------- |
991
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
992
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
993
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
967
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
968
+ | scopes | | | &nbsp; |
969
+ | currentScope | | | &nbsp; |
994
970
 
995
971
 
996
972
 
@@ -998,18 +974,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
998
974
  ##### Returns
999
975
 
1000
976
 
1001
- - A new filter data structure v2.1
977
+ -
1002
978
 
1003
979
 
1004
980
 
1005
981
 
1006
- ### dist/filters/adapters/adaptFilterValues.js
982
+ ### dist/filters/helpers/getAvailableScopes.js
1007
983
 
1008
984
 
1009
- #### adaptFilterValues(filter)
985
+ #### getAvailableScopes(config)
1010
986
 
1011
- [TODO: For 2022, eliminate this adapter]
1012
- Gets an adapted filter value array. Validates the enabled property and sets
987
+ Gets Scopes/Scope IDs by given IDs
1013
988
 
1014
989
 
1015
990
 
@@ -1018,7 +993,7 @@ Gets an adapted filter value array. Validates the enabled property and sets
1018
993
 
1019
994
  | Name | Type | Description | |
1020
995
  | ---- | ---- | ----------- | -------- |
1021
- | filter | | The filter | &nbsp; |
996
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
1022
997
 
1023
998
 
1024
999
 
@@ -1026,17 +1001,17 @@ Gets an adapted filter value array. Validates the enabled property and sets
1026
1001
  ##### Returns
1027
1002
 
1028
1003
 
1029
- - A new value array with the filled properties.
1004
+ - a Scopes/Scope IDs array
1030
1005
 
1031
1006
 
1032
1007
 
1033
1008
 
1034
- ### dist/filters/adapters/flatUIToFD.js
1009
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1035
1010
 
1036
1011
 
1037
- #### flatUIToFD(uFilters, version)
1012
+ #### getAvailableScopesIDsByConfig(config)
1038
1013
 
1039
- Generates a filter data structure from the flatttened UI filters.
1014
+ Gets the Scopes IDS for the Available Scope function by any config
1040
1015
 
1041
1016
 
1042
1017
 
@@ -1045,8 +1020,7 @@ Generates a filter data structure from the flatttened UI filters.
1045
1020
 
1046
1021
  | Name | Type | Description | |
1047
1022
  | ---- | ---- | ----------- | -------- |
1048
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1049
- | version | | Tag for the version of the filter data structure | &nbsp; |
1023
+ | config | | any config | &nbsp; |
1050
1024
 
1051
1025
 
1052
1026
 
@@ -1054,14 +1028,17 @@ Generates a filter data structure from the flatttened UI filters.
1054
1028
  ##### Returns
1055
1029
 
1056
1030
 
1057
- - a Filter Data.
1031
+ - a Available Scope IDS config
1058
1032
 
1059
1033
 
1060
1034
 
1061
- #### buildScopes(fbFilters)
1062
1035
 
1063
- Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1064
- Also, adds and organizes filters by datasets
1036
+ ### dist/filters/helpers/getScopesByHierarchy.js
1037
+
1038
+
1039
+ #### getScopesByHierarchy(scopes, currentScope)
1040
+
1041
+ [TODO: Make a description for this]
1065
1042
 
1066
1043
 
1067
1044
 
@@ -1070,7 +1047,8 @@ Also, adds and organizes filters by datasets
1070
1047
 
1071
1048
  | Name | Type | Description | |
1072
1049
  | ---- | ---- | ----------- | -------- |
1073
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1050
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1051
+ | currentScope | | Current scope type | &nbsp; |
1074
1052
 
1075
1053
 
1076
1054
 
@@ -1078,13 +1056,17 @@ Also, adds and organizes filters by datasets
1078
1056
  ##### Returns
1079
1057
 
1080
1058
 
1081
- - an array of scopes structure.
1059
+ - A new array of Scopes/Scope IDs
1082
1060
 
1083
1061
 
1084
1062
 
1085
- #### buildScope(uFilter)
1086
1063
 
1087
- Gets an scope structure for the filter data
1064
+ ### dist/general/array/delete.js
1065
+
1066
+
1067
+ #### ArrayDelete(array, index)
1068
+
1069
+ Inmutable Array Item deletion
1088
1070
 
1089
1071
 
1090
1072
 
@@ -1093,7 +1075,8 @@ Gets an scope structure for the filter data
1093
1075
 
1094
1076
  | Name | Type | Description | |
1095
1077
  | ---- | ---- | ----------- | -------- |
1096
- | uFilter | | UI structure filter | &nbsp; |
1078
+ | array | `Array` | a collection of items to delete | &nbsp; |
1079
+ | index | `Number` | the position of the item to delete | &nbsp; |
1097
1080
 
1098
1081
 
1099
1082
 
@@ -1101,13 +1084,20 @@ Gets an scope structure for the filter data
1101
1084
  ##### Returns
1102
1085
 
1103
1086
 
1104
- - an scope structure
1087
+ - a new Array or the given parameter when is empty or not an array
1105
1088
 
1106
1089
 
1107
1090
 
1108
- #### buildDataset(uFilter)
1109
1091
 
1110
- Gets an dataset structure for the filter data
1092
+ ### dist/general/array/filterNestedTree.js
1093
+
1094
+
1095
+ #### filterNestedTree(arr, childArrKey, condition)
1096
+
1097
+ Filters a nested tree array by a custom condition on the last child node
1098
+ - If the given arguments are not valid, the function returns the first argument.
1099
+ - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
1100
+ - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
1111
1101
 
1112
1102
 
1113
1103
 
@@ -1116,7 +1106,9 @@ Gets an dataset structure for the filter data
1116
1106
 
1117
1107
  | Name | Type | Description | |
1118
1108
  | ---- | ---- | ----------- | -------- |
1119
- | uFilter | | a UI structure filter | &nbsp; |
1109
+ | arr | | nested tree array | &nbsp; |
1110
+ | childArrKey | | property representing the children array on the nested tree | &nbsp; |
1111
+ | condition | | function callback that determines if the filter is applied on the last child node of the nested tree | &nbsp; |
1120
1112
 
1121
1113
 
1122
1114
 
@@ -1124,13 +1116,17 @@ Gets an dataset structure for the filter data
1124
1116
  ##### Returns
1125
1117
 
1126
1118
 
1127
- - an dataset structure
1119
+ - array filtered
1128
1120
 
1129
1121
 
1130
1122
 
1131
- #### buildFilter(uFilter)
1132
1123
 
1133
- Gets an filter structure for the filter data
1124
+ ### dist/general/array/flattenDeep.js
1125
+
1126
+
1127
+ #### flattenDeep(arr)
1128
+
1129
+ Flat deeply an array
1134
1130
 
1135
1131
 
1136
1132
 
@@ -1139,7 +1135,7 @@ Gets an filter structure for the filter data
1139
1135
 
1140
1136
  | Name | Type | Description | |
1141
1137
  | ---- | ---- | ----------- | -------- |
1142
- | uFilter | | a UI structure filter | &nbsp; |
1138
+ | arr | | Array to flat deeply | &nbsp; |
1143
1139
 
1144
1140
 
1145
1141
 
@@ -1147,17 +1143,17 @@ Gets an filter structure for the filter data
1147
1143
  ##### Returns
1148
1144
 
1149
1145
 
1150
- - an filter structure
1146
+ - flatten array
1151
1147
 
1152
1148
 
1153
1149
 
1154
1150
 
1155
- ### dist/filters/adapters/flatUIToLogic.js
1151
+ ### dist/general/array/getFirstIndexFromArray.js
1156
1152
 
1157
1153
 
1158
- #### flatUIToLogic(uFilter)
1154
+ #### getFirstIndexFromArray(array, callback)
1159
1155
 
1160
- Generates a Logic structure from flattened UI filters
1156
+ Gets the first index from the array by a callback condition
1161
1157
 
1162
1158
 
1163
1159
 
@@ -1166,7 +1162,8 @@ Generates a Logic structure from flattened UI filters
1166
1162
 
1167
1163
  | Name | Type | Description | |
1168
1164
  | ---- | ---- | ----------- | -------- |
1169
- | uFilter | | Array of flat filters from UI | &nbsp; |
1165
+ | array | | | &nbsp; |
1166
+ | callback | | function callback | &nbsp; |
1170
1167
 
1171
1168
 
1172
1169
 
@@ -1174,17 +1171,17 @@ Generates a Logic structure from flattened UI filters
1174
1171
  ##### Returns
1175
1172
 
1176
1173
 
1177
- - The logic structure
1174
+ - the first index of the array. -1 when the condition is not satisfied
1178
1175
 
1179
1176
 
1180
1177
 
1181
1178
 
1182
- ### dist/filters/adapters/flatUIToOldLogic.js
1179
+ ### dist/general/array/getLastIndexFromArray.js
1183
1180
 
1184
1181
 
1185
- #### flatUIToOldLogic(uFilters)
1182
+ #### getLastIndexFromArray(array, callback)
1186
1183
 
1187
- Generates a Logic structure from flattened UI filters
1184
+ Gets the last index from the array by a callback condition
1188
1185
 
1189
1186
 
1190
1187
 
@@ -1193,7 +1190,8 @@ Generates a Logic structure from flattened UI filters
1193
1190
 
1194
1191
  | Name | Type | Description | |
1195
1192
  | ---- | ---- | ----------- | -------- |
1196
- | uFilters | | Array of flat filters from UI | &nbsp; |
1193
+ | array | | | &nbsp; |
1194
+ | callback | | function callback | &nbsp; |
1197
1195
 
1198
1196
 
1199
1197
 
@@ -1201,17 +1199,17 @@ Generates a Logic structure from flattened UI filters
1201
1199
  ##### Returns
1202
1200
 
1203
1201
 
1204
- - The logic structure
1202
+ - the last index of the array. -1 when the condition is not satisfied
1205
1203
 
1206
1204
 
1207
1205
 
1208
1206
 
1209
- ### dist/filters/adapters/flatUIToUI.js
1207
+ ### dist/general/function/debounce.js
1210
1208
 
1211
1209
 
1212
- #### flatUIToUI(uFilters, version)
1210
+ #### debounce(fn, time)
1213
1211
 
1214
- Generates a UI filter data structure from the flatttened UI filters.
1212
+ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1215
1213
 
1216
1214
 
1217
1215
 
@@ -1220,8 +1218,8 @@ Generates a UI filter data structure from the flatttened UI filters.
1220
1218
 
1221
1219
  | Name | Type | Description | |
1222
1220
  | ---- | ---- | ----------- | -------- |
1223
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
- | version | | Tag for the version of the filter data structure | &nbsp; |
1221
+ | fn | `Function` | original Function | &nbsp; |
1222
+ | time | `Number` | default 500ms | &nbsp; |
1225
1223
 
1226
1224
 
1227
1225
 
@@ -1229,14 +1227,17 @@ Generates a UI filter data structure from the flatttened UI filters.
1229
1227
  ##### Returns
1230
1228
 
1231
1229
 
1232
- - a UI Filter Data.
1230
+ - `Function` debounced functions
1233
1231
 
1234
1232
 
1235
1233
 
1236
- #### buildScopes(fbFilters)
1237
1234
 
1238
- Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
1239
- Also, adds and organizes filters by datasets
1235
+ ### dist/general/function/throttled.js
1236
+
1237
+
1238
+ #### throttled(fn, time)
1239
+
1240
+ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1240
1241
 
1241
1242
 
1242
1243
 
@@ -1245,7 +1246,8 @@ Also, adds and organizes filters by datasets
1245
1246
 
1246
1247
  | Name | Type | Description | |
1247
1248
  | ---- | ---- | ----------- | -------- |
1248
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1249
+ | fn | `Function` | original Function | &nbsp; |
1250
+ | time | `Number` | default 500ms | &nbsp; |
1249
1251
 
1250
1252
 
1251
1253
 
@@ -1253,13 +1255,18 @@ Also, adds and organizes filters by datasets
1253
1255
  ##### Returns
1254
1256
 
1255
1257
 
1256
- - an array of scopes structure.
1258
+ - `Function` throttled function
1257
1259
 
1258
1260
 
1259
1261
 
1260
- #### buildScope(uFilter)
1261
1262
 
1262
- Gets an scope structure for the UI filter data
1263
+ ### dist/general/mix/compareDeep.js
1264
+
1265
+
1266
+ #### compareDeep(object1, object2)
1267
+
1268
+ Compares two objects to know if they are equals. Go across nested objects.
1269
+ Includes arrays in the comparison.
1263
1270
 
1264
1271
 
1265
1272
 
@@ -1268,7 +1275,8 @@ Gets an scope structure for the UI filter data
1268
1275
 
1269
1276
  | Name | Type | Description | |
1270
1277
  | ---- | ---- | ----------- | -------- |
1271
- | uFilter | | UI structure filter | &nbsp; |
1278
+ | object1 | | First Object to compare | &nbsp; |
1279
+ | object2 | | Second Object to compare | &nbsp; |
1272
1280
 
1273
1281
 
1274
1282
 
@@ -1276,13 +1284,17 @@ Gets an scope structure for the UI filter data
1276
1284
  ##### Returns
1277
1285
 
1278
1286
 
1279
- - an scope structure
1287
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1280
1288
 
1281
1289
 
1282
1290
 
1283
- #### buildDataset(uFilter)
1284
1291
 
1285
- Gets an dataset structure for the UI filter data
1292
+ ### dist/general/mix/getTag.js
1293
+
1294
+
1295
+ #### getTag(value)
1296
+
1297
+ Gets the `toStringTag` of `value`.
1286
1298
 
1287
1299
 
1288
1300
 
@@ -1291,7 +1303,7 @@ Gets an dataset structure for the UI filter data
1291
1303
 
1292
1304
  | Name | Type | Description | |
1293
1305
  | ---- | ---- | ----------- | -------- |
1294
- | uFilter | | a UI structure filter | &nbsp; |
1306
+ | value | | The value to query. | &nbsp; |
1295
1307
 
1296
1308
 
1297
1309
 
@@ -1299,13 +1311,17 @@ Gets an dataset structure for the UI filter data
1299
1311
  ##### Returns
1300
1312
 
1301
1313
 
1302
- - an dataset structure
1314
+ - `string` Returns the `toStringTag`.
1303
1315
 
1304
1316
 
1305
1317
 
1306
- #### buildFilter(uFilter)
1307
1318
 
1308
- Gets an filter structure for the UI filter data
1319
+ ### dist/general/mix/importScripts.js
1320
+
1321
+
1322
+ #### importScripts(scripts)
1323
+
1324
+ Import a set of external Scripts given the URL in both serie and cascade way
1309
1325
 
1310
1326
 
1311
1327
 
@@ -1314,25 +1330,54 @@ Gets an filter structure for the UI filter data
1314
1330
 
1315
1331
  | Name | Type | Description | |
1316
1332
  | ---- | ---- | ----------- | -------- |
1317
- | uFilter | | a UI structure filter | &nbsp; |
1333
+ | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1334
+ | scripts.url | `String` | CDN URL | &nbsp; |
1335
+ | scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | &nbsp; |
1336
+ | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1337
+ | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1338
+ | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
1318
1339
 
1319
1340
 
1320
1341
 
1321
1342
 
1322
- ##### Returns
1343
+ ##### Examples
1323
1344
 
1345
+ ```javascript
1346
+ // 1) Simple script (paralell loading)
1347
+ importScripts(['http://myscript.js', 'http://another.js']);
1324
1348
 
1325
- - an filter structure
1349
+ // 2) Loading `.js` and `.esm.js` script (parallel loading)
1350
+ importScripts([
1351
+ { url: 'http://myscript.esm.js', type: 'module' },
1352
+ { url: 'http://myscript.js', noModule: true }
1353
+ ]);
1354
+
1355
+ // 3) import dependent scripts (cascade)
1356
+ importScripts([
1357
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1358
+ ]);
1359
+
1360
+ // 4) mix
1361
+ importScripts([
1362
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1363
+ { url: 'http://another.esm.js', type: 'module' },
1364
+ { url: 'http://another.js', noModule: true },
1365
+ 'http://simplescript.js'
1366
+ ]);
1367
+ ```
1326
1368
 
1327
1369
 
1370
+ ##### Returns
1328
1371
 
1329
1372
 
1330
- ### dist/filters/adapters/logicToFD.js
1373
+ - `Promise` Promise when all script have been loaded
1331
1374
 
1332
1375
 
1333
- #### logicToFD(filterData, version)
1334
1376
 
1335
- Generates a filter data structure from the old logic structure (v2.0).
1377
+ #### loadScript(url, type, noModule)
1378
+
1379
+ Creates the script element and appends to document.head
1380
+ return a Promise that is resolved when the script is loaded
1336
1381
 
1337
1382
 
1338
1383
 
@@ -1341,8 +1386,9 @@ Generates a filter data structure from the old logic structure (v2.0).
1341
1386
 
1342
1387
  | Name | Type | Description | |
1343
1388
  | ---- | ---- | ----------- | -------- |
1344
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
- | version | | Tag for the version of the filter data structure | &nbsp; |
1389
+ | url | `String` | Cdn Url | &nbsp; |
1390
+ | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1391
+ | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1346
1392
 
1347
1393
 
1348
1394
 
@@ -1350,17 +1396,17 @@ Generates a filter data structure from the old logic structure (v2.0).
1350
1396
  ##### Returns
1351
1397
 
1352
1398
 
1353
- - a Filter Data.
1399
+ - `Void`
1354
1400
 
1355
1401
 
1356
1402
 
1357
1403
 
1358
- ### dist/filters/adapters/logicToFlatUI.js
1404
+ ### dist/general/mix/isEmpty.js
1359
1405
 
1360
1406
 
1361
- #### logicToFlatUI(logics)
1407
+ #### isEmpty(variable, includeFalsy)
1362
1408
 
1363
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1409
+ Validates if the given argument is empty
1364
1410
 
1365
1411
 
1366
1412
 
@@ -1369,7 +1415,8 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1369
1415
 
1370
1416
  | Name | Type | Description | |
1371
1417
  | ---- | ---- | ----------- | -------- |
1372
- | logics | | The old logic structure (v2.0) | &nbsp; |
1418
+ | variable | | the given variable | &nbsp; |
1419
+ | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1373
1420
 
1374
1421
 
1375
1422
 
@@ -1377,13 +1424,19 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1377
1424
  ##### Returns
1378
1425
 
1379
1426
 
1380
- - The Flattened UI Filters array
1427
+ - true: the given argument is empty; false: is not.
1381
1428
 
1382
1429
 
1383
1430
 
1384
- #### getFilter(filters, filter, getIndex)
1385
1431
 
1386
- Get the filter or the index of the given array, validating an old filter structure.
1432
+ ### dist/general/mix/isNaNV2.js
1433
+
1434
+
1435
+ #### isNaNV2(variable)
1436
+
1437
+ Validates if the recieved number is NaN type.
1438
+ This function recieves any variable but will return false.
1439
+ Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
1387
1440
 
1388
1441
 
1389
1442
 
@@ -1392,9 +1445,7 @@ Get the filter or the index of the given array, validating an old filter structu
1392
1445
 
1393
1446
  | Name | Type | Description | |
1394
1447
  | ---- | ---- | ----------- | -------- |
1395
- | filters | | The array of UI filters | &nbsp; |
1396
- | filter | | The old logic structure filter | &nbsp; |
1397
- | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
1448
+ | variable | | the variable to validate | &nbsp; |
1398
1449
 
1399
1450
 
1400
1451
 
@@ -1402,13 +1453,18 @@ Get the filter or the index of the given array, validating an old filter structu
1402
1453
  ##### Returns
1403
1454
 
1404
1455
 
1405
- - the index or the UI filter object
1456
+ - True if variable is a NaN or false otherwise
1406
1457
 
1407
1458
 
1408
1459
 
1409
- #### refineRankingValues(values, uiValues)
1410
1460
 
1411
- Refines the values of the Ranking column type.
1461
+ ### dist/general/mix/isNull.js
1462
+
1463
+
1464
+ #### isNull(arg)
1465
+
1466
+ return if a given variable is either `null` or `undefined`
1467
+ useful to avoid falsify validating Number Zero (0)
1412
1468
 
1413
1469
 
1414
1470
 
@@ -1417,8 +1473,7 @@ Refines the values of the Ranking column type.
1417
1473
 
1418
1474
  | Name | Type | Description | |
1419
1475
  | ---- | ---- | ----------- | -------- |
1420
- | values | | the Array of Ranking values | &nbsp; |
1421
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1476
+ | arg | `any` | | &nbsp; |
1422
1477
 
1423
1478
 
1424
1479
 
@@ -1426,17 +1481,19 @@ Refines the values of the Ranking column type.
1426
1481
  ##### Returns
1427
1482
 
1428
1483
 
1429
- - the array of Ranking values
1484
+ - `Boolean`
1430
1485
 
1431
1486
 
1432
1487
 
1433
1488
 
1434
- ### dist/filters/adapters/logicToUI.js
1489
+ ### dist/general/mix/randomId.js
1435
1490
 
1436
1491
 
1437
- #### logicToUI(uFilters, datasetsInfo)
1492
+ #### randomId(length, exclude)
1438
1493
 
1439
- Generates a UI filter structure from the old logic structure (v2.0).
1494
+ Creates a random string
1495
+ - If the first given argument is different than a length number, the variable is replaced by a default number
1496
+ - If the optional second given argument is passed the random string is permutated.
1440
1497
 
1441
1498
 
1442
1499
 
@@ -1445,8 +1502,8 @@ Generates a UI filter structure from the old logic structure (v2.0).
1445
1502
 
1446
1503
  | Name | Type | Description | |
1447
1504
  | ---- | ---- | ----------- | -------- |
1448
- | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1505
+ | length | `Number` | size of the generated string. Default 8 | &nbsp; |
1506
+ | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
1450
1507
 
1451
1508
 
1452
1509
 
@@ -1454,17 +1511,19 @@ Generates a UI filter structure from the old logic structure (v2.0).
1454
1511
  ##### Returns
1455
1512
 
1456
1513
 
1457
- - a UI Filter Data.
1514
+ - `String` Random string
1458
1515
 
1459
1516
 
1460
1517
 
1461
1518
 
1462
- ### dist/filters/adapters/transformFilters.js
1519
+ ### dist/general/mix/size.js
1463
1520
 
1464
1521
 
1465
- #### transformFilters(oldFiltersObj, section)
1522
+ #### size(obj)
1466
1523
 
1467
- Transform the old filters structure into the new one
1524
+ Gets the length of the given array.
1525
+ - Useful for Object, Array and string type.
1526
+ - For `null` or `undefined` or else argument the returned value will be 0.
1468
1527
 
1469
1528
 
1470
1529
 
@@ -1473,79 +1532,34 @@ Transform the old filters structure into the new one
1473
1532
 
1474
1533
  | Name | Type | Description | |
1475
1534
  | ---- | ---- | ----------- | -------- |
1476
- | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
1477
- | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
1478
-
1479
-
1480
-
1535
+ | obj | `Any` | Any object-type variable | &nbsp; |
1481
1536
 
1482
- ##### Examples
1483
1537
 
1484
- ```javascript
1485
1538
 
1486
- const oldPreferenceFilters = {
1487
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1488
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1489
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1490
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1491
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1492
- "formulaId": null,
1493
- "panelId": null,
1494
- "values": [
1495
- {
1496
- "EQUALS": [
1497
- {
1498
- "id": "AK4M8UV2a0",
1499
- "value": "A",
1500
- "enabled": true,
1501
- "imageUrl": null
1502
- },
1503
- {
1504
- "id": "AK4M8UV2a1",
1505
- "value": "B",
1506
- "enabled": true,
1507
- "imageUrl": null
1508
- }
1509
- ]
1510
- }
1511
- ],
1512
- "bucketId": null,
1513
- "text": "MC",
1514
- "title": "MC",
1515
- "type": "SINGLE_CHOICE",
1516
- "qid": "AK4M8UV2",
1517
- "dataset": {
1518
- "sourceid": "xYOQAdpqT",
1519
- "name": "Form All Questions",
1520
- "qrveyid": "xYOQAdpqT",
1521
- "text": "Form All Questions",
1522
- "linkid": 0
1523
- },
1524
- "enabled": true,
1525
- "linked": null
1526
- }
1527
- };
1528
1539
 
1529
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
- ```
1540
+ ##### Returns
1531
1541
 
1532
1542
 
1533
- ##### Returns
1543
+ - `Number` the size of the given variable
1534
1544
 
1535
1545
 
1536
- - `Object` an object with the new filters structure
1537
1546
 
1538
1547
 
1548
+ ### dist/general/string/capitalize.js
1539
1549
 
1540
1550
 
1541
- ### dist/filters/classes/FilterInputErrorHandler.js
1551
+ #### capitalize(text)
1542
1552
 
1553
+ Upper case the first letter of a given text
1543
1554
 
1544
- #### new FilterInputErrorHandler()
1545
1555
 
1546
1556
 
1547
1557
 
1558
+ ##### Parameters
1548
1559
 
1560
+ | Name | Type | Description | |
1561
+ | ---- | ---- | ----------- | -------- |
1562
+ | text | `String` | | &nbsp; |
1549
1563
 
1550
1564
 
1551
1565
 
@@ -1553,17 +1567,18 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1553
1567
  ##### Returns
1554
1568
 
1555
1569
 
1556
- - `Void`
1570
+ - `String` a capitalized text
1557
1571
 
1558
1572
 
1559
1573
 
1560
1574
 
1561
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
1575
+ ### dist/general/object/cloneDeep.js
1562
1576
 
1563
1577
 
1564
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1578
+ #### cloneDeep(obj)
1565
1579
 
1566
- [TODO: Make a proper description for this function]
1580
+ A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
1581
+ Not to use this function with inner objects and functions
1567
1582
 
1568
1583
 
1569
1584
 
@@ -1572,9 +1587,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1572
1587
 
1573
1588
  | Name | Type | Description | |
1574
1589
  | ---- | ---- | ----------- | -------- |
1575
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
- | scopes | | | &nbsp; |
1577
- | currentScope | | | &nbsp; |
1590
+ | obj | | The object | &nbsp; |
1578
1591
 
1579
1592
 
1580
1593
 
@@ -1582,17 +1595,21 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1582
1595
  ##### Returns
1583
1596
 
1584
1597
 
1585
- -
1598
+ - The new reference object or the given object if the parsing is incorrect or empty
1586
1599
 
1587
1600
 
1588
1601
 
1589
1602
 
1590
- ### dist/filters/helpers/getAvailableScopes.js
1603
+ ### dist/general/object/get.js
1591
1604
 
1592
1605
 
1593
- #### getAvailableScopes(config)
1606
+ #### _get(baseObject, path, defaultValue)
1594
1607
 
1595
- Gets Scopes/Scope IDs by given IDs
1608
+ Like lodash _.get.
1609
+ Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
1610
+
1611
+ Empty arrays and empty objects are returned but the defaultValue is not
1612
+ Undefined and null values will return the defaultValue.
1596
1613
 
1597
1614
 
1598
1615
 
@@ -1601,25 +1618,59 @@ Gets Scopes/Scope IDs by given IDs
1601
1618
 
1602
1619
  | Name | Type | Description | |
1603
1620
  | ---- | ---- | ----------- | -------- |
1604
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
1621
+ | baseObject | | The object to query | &nbsp; |
1622
+ | path | | The string path or collection of string paths of the property to get. | &nbsp; |
1623
+ | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
1624
+
1605
1625
 
1606
1626
 
1607
1627
 
1628
+ ##### Examples
1629
+
1630
+ ```javascript
1631
+ // returns 'Hello'
1632
+ _get({ item1: 'Hello', item2: 'World' }, 'item1')
1633
+ ```
1634
+ ```javascript
1635
+ // returns 'A simple Hello'
1636
+ _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
1637
+ ```
1638
+ ```javascript
1639
+ // returns 'Hello Again'
1640
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
1641
+ ```
1642
+ ```javascript
1643
+ // returns 'Hello 2'
1644
+ _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
1645
+ ```
1646
+ ```javascript
1647
+ // returns 'Hello Again'
1648
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
1649
+ ```
1650
+
1608
1651
 
1609
1652
  ##### Returns
1610
1653
 
1611
1654
 
1612
- - a Scopes/Scope IDs array
1655
+ - the resolved value.
1613
1656
 
1614
1657
 
1615
1658
 
1616
1659
 
1617
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1660
+ ### dist/general/object/getAttribute.js
1618
1661
 
1619
1662
 
1620
- #### getAvailableScopesIDsByConfig(config)
1663
+ #### getAttribute(obj, key)
1621
1664
 
1622
- Gets the Scopes IDS for the Available Scope function by any config
1665
+ Searchs for properties in different case styles such as: lower, upper, camel and pascal
1666
+ - To optimize the searching, it is required a key in a snake_case style
1667
+ - List of cases that do not match
1668
+ -- From lower to snake case
1669
+ -- From upper to snake case
1670
+ -- From lower to camel case
1671
+ -- From upper to camel case
1672
+ -- From lower to pascal case
1673
+ -- From upper to pascal case
1623
1674
 
1624
1675
 
1625
1676
 
@@ -1628,25 +1679,33 @@ Gets the Scopes IDS for the Available Scope function by any config
1628
1679
 
1629
1680
  | Name | Type | Description | |
1630
1681
  | ---- | ---- | ----------- | -------- |
1631
- | config | | any config | &nbsp; |
1682
+ | obj | `object` | object to look for | &nbsp; |
1683
+ | key | `string` | String attribute in snake_case style | &nbsp; |
1684
+
1685
+
1632
1686
 
1633
1687
 
1688
+ ##### Examples
1689
+
1690
+ ```javascript
1691
+ getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
1692
+ ```
1634
1693
 
1635
1694
 
1636
1695
  ##### Returns
1637
1696
 
1638
1697
 
1639
- - a Available Scope IDS config
1698
+ - `Void`
1640
1699
 
1641
1700
 
1642
1701
 
1643
1702
 
1644
- ### dist/filters/helpers/getScopesByHierarchy.js
1703
+ ### dist/general/object/hasProperty.js
1645
1704
 
1646
1705
 
1647
- #### getScopesByHierarchy(scopes, currentScope)
1706
+ #### _hasProperty(obj, property)
1648
1707
 
1649
- [TODO: Make a description for this]
1708
+ Use the hasOwnProperty in order to verify if the given property exists in the object.
1650
1709
 
1651
1710
 
1652
1711
 
@@ -1655,26 +1714,38 @@ Gets the Scopes IDS for the Available Scope function by any config
1655
1714
 
1656
1715
  | Name | Type | Description | |
1657
1716
  | ---- | ---- | ----------- | -------- |
1658
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
- | currentScope | | Current scope type | &nbsp; |
1717
+ | obj | `object` | an object | &nbsp; |
1718
+ | property | `string` | String to verify if exists in the object as property | &nbsp; |
1719
+
1720
+
1721
+
1660
1722
 
1723
+ ##### Examples
1724
+
1725
+ ```javascript
1726
+ const prop = 'prop2'
1727
+ const obj1 = { prop1: 'hello', prop2: 'world'}
1728
+ _hasProperty(ob1, prop1) // true
1661
1729
 
1730
+ const obj2 = { prop1: 'hello world' }
1731
+ _hasProperty(ob1, prop2) // false
1732
+ ```
1662
1733
 
1663
1734
 
1664
1735
  ##### Returns
1665
1736
 
1666
1737
 
1667
- - A new array of Scopes/Scope IDs
1738
+ - True if the object has the given property; otherwise, false.
1668
1739
 
1669
1740
 
1670
1741
 
1671
1742
 
1672
- ### dist/general/array/delete.js
1743
+ ### dist/general/object/isObject.js
1673
1744
 
1674
1745
 
1675
- #### ArrayDelete(array, index)
1746
+ #### isObject(obj)
1676
1747
 
1677
- Inmutable Array Item deletion
1748
+ Checks if the given argument is an object type
1678
1749
 
1679
1750
 
1680
1751
 
@@ -1683,8 +1754,7 @@ Inmutable Array Item deletion
1683
1754
 
1684
1755
  | Name | Type | Description | |
1685
1756
  | ---- | ---- | ----------- | -------- |
1686
- | array | `Array` | a collection of items to delete | &nbsp; |
1687
- | index | `Number` | the position of the item to delete | &nbsp; |
1757
+ | obj | | the variable to check | &nbsp; |
1688
1758
 
1689
1759
 
1690
1760
 
@@ -1692,20 +1762,18 @@ Inmutable Array Item deletion
1692
1762
  ##### Returns
1693
1763
 
1694
1764
 
1695
- - a new Array or the given parameter when is empty or not an array
1765
+ - True: It is an object; False: It is not.
1696
1766
 
1697
1767
 
1698
1768
 
1699
1769
 
1700
- ### dist/general/array/filterNestedTree.js
1770
+ ### dist/general/object/mapValues.js
1701
1771
 
1702
1772
 
1703
- #### filterNestedTree(arr, childArrKey, condition)
1773
+ #### mapValues(baseObject, iteratee)
1704
1774
 
1705
- Filters a nested tree array by a custom condition on the last child node
1706
- - If the given arguments are not valid, the function returns the first argument.
1707
- - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
1708
- - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
1775
+ Invoke iteratee (function) for each object key-value pair
1776
+ and return a mapped object
1709
1777
 
1710
1778
 
1711
1779
 
@@ -1714,9 +1782,8 @@ Filters a nested tree array by a custom condition on the last child node
1714
1782
 
1715
1783
  | Name | Type | Description | |
1716
1784
  | ---- | ---- | ----------- | -------- |
1717
- | arr | | nested tree array | &nbsp; |
1718
- | childArrKey | | property representing the children array on the nested tree | &nbsp; |
1719
- | condition | | function callback that determines if the filter is applied on the last child node of the nested tree | &nbsp; |
1785
+ | baseObject | `Object` | Base object. | &nbsp; |
1786
+ | iteratee | `Function` | The executed per iteration. | &nbsp; |
1720
1787
 
1721
1788
 
1722
1789
 
@@ -1724,17 +1791,18 @@ Filters a nested tree array by a custom condition on the last child node
1724
1791
  ##### Returns
1725
1792
 
1726
1793
 
1727
- - array filtered
1794
+ - `Object` New mapped object.
1728
1795
 
1729
1796
 
1730
1797
 
1731
1798
 
1732
- ### dist/general/array/flattenDeep.js
1799
+ ### dist/general/object/mergeDeep.js
1733
1800
 
1734
1801
 
1735
- #### flattenDeep(arr)
1802
+ #### mergeDeep(obj1, obj2, settings)
1736
1803
 
1737
- Flat deeply an array
1804
+ Merges two objects into a new one.
1805
+ The second given argument to the first given argument.
1738
1806
 
1739
1807
 
1740
1808
 
@@ -1743,7 +1811,9 @@ Flat deeply an array
1743
1811
 
1744
1812
  | Name | Type | Description | |
1745
1813
  | ---- | ---- | ----------- | -------- |
1746
- | arr | | Array to flat deeply | &nbsp; |
1814
+ | obj1 | | The target object | &nbsp; |
1815
+ | obj2 | | The object to be merged | &nbsp; |
1816
+ | settings | | Object settings for this function | &nbsp; |
1747
1817
 
1748
1818
 
1749
1819
 
@@ -1751,17 +1821,13 @@ Flat deeply an array
1751
1821
  ##### Returns
1752
1822
 
1753
1823
 
1754
- - flatten array
1755
-
1756
-
1757
-
1824
+ - a new merged object
1758
1825
 
1759
- ### dist/general/array/getFirstIndexFromArray.js
1760
1826
 
1761
1827
 
1762
- #### getFirstIndexFromArray(array, callback)
1828
+ #### isValid(obj1, obj2)
1763
1829
 
1764
- Gets the first index from the array by a callback condition
1830
+ Validates if the two arguments are objects
1765
1831
 
1766
1832
 
1767
1833
 
@@ -1770,8 +1836,8 @@ Gets the first index from the array by a callback condition
1770
1836
 
1771
1837
  | Name | Type | Description | |
1772
1838
  | ---- | ---- | ----------- | -------- |
1773
- | array | | | &nbsp; |
1774
- | callback | | function callback | &nbsp; |
1839
+ | obj1 | | The target object | &nbsp; |
1840
+ | obj2 | | The object to be merged | &nbsp; |
1775
1841
 
1776
1842
 
1777
1843
 
@@ -1779,17 +1845,13 @@ Gets the first index from the array by a callback condition
1779
1845
  ##### Returns
1780
1846
 
1781
1847
 
1782
- - the first index of the array. -1 when the condition is not satisfied
1783
-
1784
-
1785
-
1848
+ - true: they are valid; false: they are not
1786
1849
 
1787
- ### dist/general/array/getLastIndexFromArray.js
1788
1850
 
1789
1851
 
1790
- #### getLastIndexFromArray(array, callback)
1852
+ #### getParamsToMergeDeep(settings)
1791
1853
 
1792
- Gets the last index from the array by a callback condition
1854
+ Validates and gets the settings with all set parameters.
1793
1855
 
1794
1856
 
1795
1857
 
@@ -1798,8 +1860,7 @@ Gets the last index from the array by a callback condition
1798
1860
 
1799
1861
  | Name | Type | Description | |
1800
1862
  | ---- | ---- | ----------- | -------- |
1801
- | array | | | &nbsp; |
1802
- | callback | | function callback | &nbsp; |
1863
+ | settings | | the settings object | &nbsp; |
1803
1864
 
1804
1865
 
1805
1866
 
@@ -1807,17 +1868,17 @@ Gets the last index from the array by a callback condition
1807
1868
  ##### Returns
1808
1869
 
1809
1870
 
1810
- - the last index of the array. -1 when the condition is not satisfied
1871
+ - a new settings object with all set parameters.
1811
1872
 
1812
1873
 
1813
1874
 
1814
1875
 
1815
- ### dist/general/function/debounce.js
1876
+ ### dist/general/object/objectCopy.js
1816
1877
 
1817
1878
 
1818
- #### debounce(fn, time)
1879
+ #### objectCopy(entity, cache)
1819
1880
 
1820
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1881
+ Created a new reference of the given argument
1821
1882
 
1822
1883
 
1823
1884
 
@@ -1826,8 +1887,8 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
1826
1887
 
1827
1888
  | Name | Type | Description | |
1828
1889
  | ---- | ---- | ----------- | -------- |
1829
- | fn | `Function` | original Function | &nbsp; |
1830
- | time | `Number` | default 500ms | &nbsp; |
1890
+ | entity | | The variable to be copied | &nbsp; |
1891
+ | cache | | | &nbsp; |
1831
1892
 
1832
1893
 
1833
1894
 
@@ -1835,17 +1896,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
1835
1896
  ##### Returns
1836
1897
 
1837
1898
 
1838
- - `Function` debounced functions
1899
+ - A new reference of the given argument
1839
1900
 
1840
1901
 
1841
1902
 
1842
1903
 
1843
- ### dist/general/function/throttled.js
1904
+ ### dist/general/object/omit.js
1844
1905
 
1845
1906
 
1846
- #### throttled(fn, time)
1907
+ #### omit(obj, props)
1847
1908
 
1848
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1909
+ return a new Object excluding attributes in _props_ list
1849
1910
 
1850
1911
 
1851
1912
 
@@ -1854,8 +1915,8 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1854
1915
 
1855
1916
  | Name | Type | Description | |
1856
1917
  | ---- | ---- | ----------- | -------- |
1857
- | fn | `Function` | original Function | &nbsp; |
1858
- | time | `Number` | default 500ms | &nbsp; |
1918
+ | obj | `Object` | base object | &nbsp; |
1919
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
1859
1920
 
1860
1921
 
1861
1922
 
@@ -1863,18 +1924,17 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1863
1924
  ##### Returns
1864
1925
 
1865
1926
 
1866
- - `Function` throttled function
1927
+ - `Object` clean object
1867
1928
 
1868
1929
 
1869
1930
 
1870
1931
 
1871
- ### dist/general/object/cloneDeep.js
1932
+ ### dist/general/object/pick.js
1872
1933
 
1873
1934
 
1874
- #### cloneDeep(obj)
1935
+ #### pick(baseObject, keys)
1875
1936
 
1876
- A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
1877
- Not to use this function with inner objects and functions
1937
+ return a new object just with attributes in _keys_ list
1878
1938
 
1879
1939
 
1880
1940
 
@@ -1883,7 +1943,8 @@ Not to use this function with inner objects and functions
1883
1943
 
1884
1944
  | Name | Type | Description | |
1885
1945
  | ---- | ---- | ----------- | -------- |
1886
- | obj | | The object | &nbsp; |
1946
+ | baseObject | `Object` | base object | &nbsp; |
1947
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
1887
1948
 
1888
1949
 
1889
1950
 
@@ -1891,21 +1952,17 @@ Not to use this function with inner objects and functions
1891
1952
  ##### Returns
1892
1953
 
1893
1954
 
1894
- - The new reference object or the given object if the parsing is incorrect or empty
1895
-
1955
+ - `Object` new object just with desired attributes
1896
1956
 
1897
1957
 
1898
1958
 
1899
- ### dist/general/object/get.js
1900
1959
 
1960
+ ### dist/general/object/serialize.js
1901
1961
 
1902
- #### _get(baseObject, path, defaultValue)
1903
1962
 
1904
- Like lodash _.get.
1905
- Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
1963
+ #### serialize(obj)
1906
1964
 
1907
- Empty arrays and empty objects are returned but the defaultValue is not
1908
- Undefined and null values will return the defaultValue.
1965
+ serialize object to url param
1909
1966
 
1910
1967
 
1911
1968
 
@@ -1914,59 +1971,25 @@ Undefined and null values will return the defaultValue.
1914
1971
 
1915
1972
  | Name | Type | Description | |
1916
1973
  | ---- | ---- | ----------- | -------- |
1917
- | baseObject | | The object to query | &nbsp; |
1918
- | path | | The string path or collection of string paths of the property to get. | &nbsp; |
1919
- | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
1920
-
1921
-
1922
-
1974
+ | obj | | - Object to be serialized | &nbsp; |
1923
1975
 
1924
- ##### Examples
1925
1976
 
1926
- ```javascript
1927
- // returns 'Hello'
1928
- _get({ item1: 'Hello', item2: 'World' }, 'item1')
1929
- ```
1930
- ```javascript
1931
- // returns 'A simple Hello'
1932
- _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
1933
- ```
1934
- ```javascript
1935
- // returns 'Hello Again'
1936
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
1937
- ```
1938
- ```javascript
1939
- // returns 'Hello 2'
1940
- _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
1941
- ```
1942
- ```javascript
1943
- // returns 'Hello Again'
1944
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
1945
- ```
1946
1977
 
1947
1978
 
1948
1979
  ##### Returns
1949
1980
 
1950
1981
 
1951
- - the resolved value.
1982
+ - `Void`
1952
1983
 
1953
1984
 
1954
1985
 
1955
1986
 
1956
- ### dist/general/object/getAttribute.js
1987
+ ### dist/dates/adapters/mdyDateToDate.js
1957
1988
 
1958
1989
 
1959
- #### getAttribute(obj, key)
1990
+ #### mdyDateToDate(monthYearDate, time)
1960
1991
 
1961
- Searchs for properties in different case styles such as: lower, upper, camel and pascal
1962
- - To optimize the searching, it is required a key in a snake_case style
1963
- - List of cases that do not match
1964
- -- From lower to snake case
1965
- -- From upper to snake case
1966
- -- From lower to camel case
1967
- -- From upper to camel case
1968
- -- From lower to pascal case
1969
- -- From upper to pascal case
1992
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
1970
1993
 
1971
1994
 
1972
1995
 
@@ -1975,33 +1998,26 @@ Searchs for properties in different case styles such as: lower, upper, camel and
1975
1998
 
1976
1999
  | Name | Type | Description | |
1977
2000
  | ---- | ---- | ----------- | -------- |
1978
- | obj | `object` | object to look for | &nbsp; |
1979
- | key | `string` | String attribute in snake_case style | &nbsp; |
1980
-
1981
-
1982
-
2001
+ | monthYearDate | | String of [mm/dd/yyyy] date | &nbsp; |
2002
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
1983
2003
 
1984
- ##### Examples
1985
2004
 
1986
- ```javascript
1987
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
1988
- ```
1989
2005
 
1990
2006
 
1991
2007
  ##### Returns
1992
2008
 
1993
2009
 
1994
- - `Void`
2010
+ - The date object or the date in milliseconds
1995
2011
 
1996
2012
 
1997
2013
 
1998
2014
 
1999
- ### dist/general/object/hasProperty.js
2015
+ ### dist/dates/adapters/monthYearToDate.js
2000
2016
 
2001
2017
 
2002
- #### _hasProperty(obj, property)
2018
+ #### monthYearToDate(monthYearDate, time)
2003
2019
 
2004
- Use the hasOwnProperty in order to verify if the given property exists in the object.
2020
+ Transforms String Date from a [Month Year] format to Date object.
2005
2021
 
2006
2022
 
2007
2023
 
@@ -2010,38 +2026,26 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
2010
2026
 
2011
2027
  | Name | Type | Description | |
2012
2028
  | ---- | ---- | ----------- | -------- |
2013
- | obj | `object` | an object | &nbsp; |
2014
- | property | `string` | String to verify if exists in the object as property | &nbsp; |
2015
-
2016
-
2017
-
2018
-
2019
- ##### Examples
2029
+ | monthYearDate | | String of [Month Year] date | &nbsp; |
2030
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2020
2031
 
2021
- ```javascript
2022
- const prop = 'prop2'
2023
- const obj1 = { prop1: 'hello', prop2: 'world'}
2024
- _hasProperty(ob1, prop1) // true
2025
2032
 
2026
- const obj2 = { prop1: 'hello world' }
2027
- _hasProperty(ob1, prop2) // false
2028
- ```
2029
2033
 
2030
2034
 
2031
2035
  ##### Returns
2032
2036
 
2033
2037
 
2034
- - True if the object has the given property; otherwise, false.
2038
+ - The date object or the date in milliseconds
2035
2039
 
2036
2040
 
2037
2041
 
2038
2042
 
2039
- ### dist/general/object/isObject.js
2043
+ ### dist/dates/adapters/quarterYearToDate.js
2040
2044
 
2041
2045
 
2042
- #### isObject(obj)
2046
+ #### quarterYearToDate(quarterYearDate, time)
2043
2047
 
2044
- Checks if the given argument is an object type
2048
+ Transforms String Date from a [Quarter Year] format to Date object.
2045
2049
 
2046
2050
 
2047
2051
 
@@ -2050,7 +2054,8 @@ Checks if the given argument is an object type
2050
2054
 
2051
2055
  | Name | Type | Description | |
2052
2056
  | ---- | ---- | ----------- | -------- |
2053
- | obj | | the variable to check | &nbsp; |
2057
+ | quarterYearDate | | String of [Quarter Year] date | &nbsp; |
2058
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2054
2059
 
2055
2060
 
2056
2061
 
@@ -2058,18 +2063,17 @@ Checks if the given argument is an object type
2058
2063
  ##### Returns
2059
2064
 
2060
2065
 
2061
- - True: It is an object; False: It is not.
2066
+ - The date object or the date in milliseconds
2062
2067
 
2063
2068
 
2064
2069
 
2065
2070
 
2066
- ### dist/general/object/mapValues.js
2071
+ ### dist/dates/adapters/weekYearToDate.js
2067
2072
 
2068
2073
 
2069
- #### mapValues(baseObject, iteratee)
2074
+ #### weekYearToDate(date, time)
2070
2075
 
2071
- Invoke iteratee (function) for each object key-value pair
2072
- and return a mapped object
2076
+ Transforms String Date from a [Week Year] format to Date object.
2073
2077
 
2074
2078
 
2075
2079
 
@@ -2078,8 +2082,8 @@ and return a mapped object
2078
2082
 
2079
2083
  | Name | Type | Description | |
2080
2084
  | ---- | ---- | ----------- | -------- |
2081
- | baseObject | `Object` | Base object. | &nbsp; |
2082
- | iteratee | `Function` | The executed per iteration. | &nbsp; |
2085
+ | date | | String of [Week Year] date | &nbsp; |
2086
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2083
2087
 
2084
2088
 
2085
2089
 
@@ -2087,18 +2091,17 @@ and return a mapped object
2087
2091
  ##### Returns
2088
2092
 
2089
2093
 
2090
- - `Object` New mapped object.
2094
+ - The date object or the date in milliseconds
2091
2095
 
2092
2096
 
2093
2097
 
2094
2098
 
2095
- ### dist/general/object/mergeDeep.js
2099
+ ### dist/dates/adapters/yearToDate.js
2096
2100
 
2097
2101
 
2098
- #### mergeDeep(obj1, obj2, settings)
2102
+ #### yearToDate(yearDate, time)
2099
2103
 
2100
- Merges two objects into a new one.
2101
- The second given argument to the first given argument.
2104
+ Transforms String Date from a [Year] format to Date object.
2102
2105
 
2103
2106
 
2104
2107
 
@@ -2107,9 +2110,8 @@ The second given argument to the first given argument.
2107
2110
 
2108
2111
  | Name | Type | Description | |
2109
2112
  | ---- | ---- | ----------- | -------- |
2110
- | obj1 | | The target object | &nbsp; |
2111
- | obj2 | | The object to be merged | &nbsp; |
2112
- | settings | | Object settings for this function | &nbsp; |
2113
+ | yearDate | | String of [Year] date | &nbsp; |
2114
+ | time | | Flag to parse the object date to milliseconds. | &nbsp; |
2113
2115
 
2114
2116
 
2115
2117
 
@@ -2117,13 +2119,17 @@ The second given argument to the first given argument.
2117
2119
  ##### Returns
2118
2120
 
2119
2121
 
2120
- - a new merged object
2122
+ - The date object or the date in milliseconds
2121
2123
 
2122
2124
 
2123
2125
 
2124
- #### isValid(obj1, obj2)
2125
2126
 
2126
- Validates if the two arguments are objects
2127
+ ### dist/dates/helpers/getDateByDateFormat.js
2128
+
2129
+
2130
+ #### getDateByDateFormat(date, format, time)
2131
+
2132
+ Gets a Date Object instance by a Date format
2127
2133
 
2128
2134
 
2129
2135
 
@@ -2132,8 +2138,9 @@ Validates if the two arguments are objects
2132
2138
 
2133
2139
  | Name | Type | Description | |
2134
2140
  | ---- | ---- | ----------- | -------- |
2135
- | obj1 | | The target object | &nbsp; |
2136
- | obj2 | | The object to be merged | &nbsp; |
2141
+ | date | | String with a formatted date | &nbsp; |
2142
+ | format | | The date format | &nbsp; |
2143
+ | time | | flag to convert the formatted date to miliseconds | &nbsp; |
2137
2144
 
2138
2145
 
2139
2146
 
@@ -2141,13 +2148,17 @@ Validates if the two arguments are objects
2141
2148
  ##### Returns
2142
2149
 
2143
2150
 
2144
- - true: they are valid; false: they are not
2151
+ - a Date object, milisecond time or the same value if date format does not match.
2145
2152
 
2146
2153
 
2147
2154
 
2148
- #### getParamsToMergeDeep(settings)
2149
2155
 
2150
- Validates and gets the settings with all set parameters.
2156
+ ### dist/dates/helpers/getDateFormatByProperty.js
2157
+
2158
+
2159
+ #### getDateFormatByProperty(property)
2160
+
2161
+ Gets the date format by the given property
2151
2162
 
2152
2163
 
2153
2164
 
@@ -2156,7 +2167,7 @@ Validates and gets the settings with all set parameters.
2156
2167
 
2157
2168
  | Name | Type | Description | |
2158
2169
  | ---- | ---- | ----------- | -------- |
2159
- | settings | | the settings object | &nbsp; |
2170
+ | property | | The Column Property | &nbsp; |
2160
2171
 
2161
2172
 
2162
2173
 
@@ -2164,17 +2175,17 @@ Validates and gets the settings with all set parameters.
2164
2175
  ##### Returns
2165
2176
 
2166
2177
 
2167
- - a new settings object with all set parameters.
2178
+ - The date format
2168
2179
 
2169
2180
 
2170
2181
 
2171
2182
 
2172
- ### dist/general/object/objectCopy.js
2183
+ ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
2173
2184
 
2174
2185
 
2175
- #### objectCopy(entity, cache)
2186
+ #### getDateFormatRegularExpressionInArray(dateFormat)
2176
2187
 
2177
- Created a new reference of the given argument
2188
+ Gets an array of regular expressions by the given date format
2178
2189
 
2179
2190
 
2180
2191
 
@@ -2183,8 +2194,7 @@ Created a new reference of the given argument
2183
2194
 
2184
2195
  | Name | Type | Description | |
2185
2196
  | ---- | ---- | ----------- | -------- |
2186
- | entity | | The variable to be copied | &nbsp; |
2187
- | cache | | | &nbsp; |
2197
+ | dateFormat | | the date format | &nbsp; |
2188
2198
 
2189
2199
 
2190
2200
 
@@ -2192,17 +2202,17 @@ Created a new reference of the given argument
2192
2202
  ##### Returns
2193
2203
 
2194
2204
 
2195
- - A new reference of the given argument
2205
+ - an array of regular expressions
2196
2206
 
2197
2207
 
2198
2208
 
2199
2209
 
2200
- ### dist/general/object/omit.js
2210
+ ### dist/dates/helpers/getSeparatorByDateFormat.js
2201
2211
 
2202
2212
 
2203
- #### omit(obj, props)
2213
+ #### getSeparatorByDateFormat(format)
2204
2214
 
2205
- return a new Object excluding attributes in _props_ list
2215
+ Gets the separator of the date format
2206
2216
 
2207
2217
 
2208
2218
 
@@ -2211,8 +2221,7 @@ return a new Object excluding attributes in _props_ list
2211
2221
 
2212
2222
  | Name | Type | Description | |
2213
2223
  | ---- | ---- | ----------- | -------- |
2214
- | obj | `Object` | base object | &nbsp; |
2215
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2224
+ | format | | the date format | &nbsp; |
2216
2225
 
2217
2226
 
2218
2227
 
@@ -2220,17 +2229,18 @@ return a new Object excluding attributes in _props_ list
2220
2229
  ##### Returns
2221
2230
 
2222
2231
 
2223
- - `Object` clean object
2232
+ - a separator string
2224
2233
 
2225
2234
 
2226
2235
 
2227
2236
 
2228
- ### dist/general/object/pick.js
2237
+ ### dist/dates/helpers/getWeek.js
2229
2238
 
2230
2239
 
2231
- #### pick(baseObject, keys)
2240
+ #### getWeek(date)
2232
2241
 
2233
- return a new object just with attributes in _keys_ list
2242
+ Gets the week number of the year
2243
+ Additionally, the month and the year
2234
2244
 
2235
2245
 
2236
2246
 
@@ -2239,8 +2249,7 @@ return a new object just with attributes in _keys_ list
2239
2249
 
2240
2250
  | Name | Type | Description | |
2241
2251
  | ---- | ---- | ----------- | -------- |
2242
- | baseObject | `Object` | base object | &nbsp; |
2243
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2252
+ | date | | the date object | &nbsp; |
2244
2253
 
2245
2254
 
2246
2255
 
@@ -2248,17 +2257,20 @@ return a new object just with attributes in _keys_ list
2248
2257
  ##### Returns
2249
2258
 
2250
2259
 
2251
- - `Object` new object just with desired attributes
2260
+ - an object with the week, month and year.
2252
2261
 
2253
2262
 
2254
2263
 
2255
2264
 
2256
- ### dist/general/object/serialize.js
2265
+ ### dist/dates/helpers/validateDate.js
2257
2266
 
2258
2267
 
2259
- #### serialize(obj)
2268
+ #### validateDate(date, format)
2260
2269
 
2261
- serialize object to url param
2270
+ Validate a string date depending on giving format
2271
+ - If the string is a token label, the function lets it pass.
2272
+ - Otherwise depends of the format
2273
+ - Some escenarios the string is a mix of token labels and dates
2262
2274
 
2263
2275
 
2264
2276
 
@@ -2267,7 +2279,8 @@ serialize object to url param
2267
2279
 
2268
2280
  | Name | Type | Description | |
2269
2281
  | ---- | ---- | ----------- | -------- |
2270
- | obj | | - Object to be serialized | &nbsp; |
2282
+ | date | | String of date | &nbsp; |
2283
+ | format | | String of the format to validate | &nbsp; |
2271
2284
 
2272
2285
 
2273
2286
 
@@ -2275,18 +2288,17 @@ serialize object to url param
2275
2288
  ##### Returns
2276
2289
 
2277
2290
 
2278
- - `Void`
2291
+ - True if it is valid or not. Undefined if date is undefined
2279
2292
 
2280
2293
 
2281
2294
 
2282
2295
 
2283
- ### dist/general/mix/compareDeep.js
2296
+ ### dist/dates/helpers/validateDateByDateFormat.js
2284
2297
 
2285
2298
 
2286
- #### compareDeep(object1, object2)
2299
+ #### validateDateByDateFormat(date, dateForma)
2287
2300
 
2288
- Compares two objects to know if they are equals. Go across nested objects.
2289
- Includes arrays in the comparison.
2301
+ Validates the given string as Date by its date format.
2290
2302
 
2291
2303
 
2292
2304
 
@@ -2295,8 +2307,8 @@ Includes arrays in the comparison.
2295
2307
 
2296
2308
  | Name | Type | Description | |
2297
2309
  | ---- | ---- | ----------- | -------- |
2298
- | object1 | | First Object to compare | &nbsp; |
2299
- | object2 | | Second Object to compare | &nbsp; |
2310
+ | date | | a string to validate as date form | &nbsp; |
2311
+ | dateForma | | the format of the date to validate the string | &nbsp; |
2300
2312
 
2301
2313
 
2302
2314
 
@@ -2304,17 +2316,17 @@ Includes arrays in the comparison.
2304
2316
  ##### Returns
2305
2317
 
2306
2318
 
2307
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
2319
+ - true: the string is a valida date
2308
2320
 
2309
2321
 
2310
2322
 
2311
2323
 
2312
- ### dist/general/mix/getTag.js
2324
+ ### dist/dates/range/getDateRange.js
2313
2325
 
2314
2326
 
2315
- #### getTag(value)
2327
+ #### getDateRange(value, dateGroupLabel, withTime)
2316
2328
 
2317
- Gets the `toStringTag` of `value`.
2329
+ Get date range object from a string date value
2318
2330
 
2319
2331
 
2320
2332
 
@@ -2323,92 +2335,74 @@ Gets the `toStringTag` of `value`.
2323
2335
 
2324
2336
  | Name | Type | Description | |
2325
2337
  | ---- | ---- | ----------- | -------- |
2326
- | value | | The value to query. | &nbsp; |
2327
-
2328
-
2329
-
2330
-
2331
- ##### Returns
2338
+ | value | `String` | string date value | &nbsp; |
2339
+ | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | &nbsp; |
2340
+ | withTime | `Boolean` | determines if the date range will include time. Default is true | &nbsp; |
2332
2341
 
2333
2342
 
2334
- - `string` Returns the `toStringTag`.
2335
2343
 
2336
2344
 
2345
+ ##### Examples
2337
2346
 
2347
+ ```javascript
2348
+ // 1) Year:
2349
+ getDateRange('2020', 'YEAR');
2350
+ // Will return:
2351
+ {
2352
+ from: '01/01/2020 00:00:00',
2353
+ to: '12/31/2020 23:59:59'
2354
+ }
2338
2355
 
2339
- ### dist/general/mix/importScripts.js
2356
+ // 2) Quarter:
2357
+ getDateRange('Q3 2020', 'QUARTER');
2358
+ // Will return:
2359
+ {
2360
+ from: '07/01/2020 00:00:00',
2361
+ to: '09/30/2020 23:59:59'
2362
+ }
2340
2363
 
2364
+ // 3) Month:
2365
+ getDateRange('Oct 2020', 'MONTH');
2366
+ // Will return:
2367
+ {
2368
+ from: '10/01/2020 00:00:00',
2369
+ to: '10/31/2020 23:59:59'
2370
+ }
2371
+ ```
2341
2372
 
2342
- #### importScripts(scripts)
2343
2373
 
2344
- Import a set of external Scripts given the URL in both serie and cascade way
2374
+ ##### Returns
2345
2375
 
2346
2376
 
2377
+ - `Object` an object with the date range with two string date properties: from and to
2347
2378
 
2348
2379
 
2349
- ##### Parameters
2350
2380
 
2351
- | Name | Type | Description | |
2352
- | ---- | ---- | ----------- | -------- |
2353
- | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
2354
- | scripts.url | `String` | CDN URL | &nbsp; |
2355
- | scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | &nbsp; |
2356
- | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
2357
- | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
2358
- | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
2359
2381
 
2382
+ ### dist/dates/relative/Adapter.js
2360
2383
 
2361
2384
 
2385
+ #### value()
2362
2386
 
2363
- ##### Examples
2387
+ Resolves statement and returns statement value
2364
2388
 
2365
- ```javascript
2366
- // 1) Simple script (paralell loading)
2367
- importScripts(['http://myscript.js', 'http://another.js']);
2368
2389
 
2369
- // 2) Loading `.js` and `.esm.js` script (parallel loading)
2370
- importScripts([
2371
- { url: 'http://myscript.esm.js', type: 'module' },
2372
- { url: 'http://myscript.js', noModule: true }
2373
- ]);
2374
2390
 
2375
- // 3) import dependent scripts (cascade)
2376
- importScripts([
2377
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
2378
- ]);
2379
2391
 
2380
- // 4) mix
2381
- importScripts([
2382
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
2383
- { url: 'http://another.esm.js', type: 'module' },
2384
- { url: 'http://another.js', noModule: true },
2385
- 'http://simplescript.js'
2386
- ]);
2387
- ```
2388
2392
 
2389
2393
 
2390
2394
  ##### Returns
2391
2395
 
2392
2396
 
2393
- - `Promise` Promise when all script have been loaded
2394
-
2395
-
2396
-
2397
- #### loadScript(url, type, noModule)
2397
+ - `AbsoluteRange` `string`
2398
2398
 
2399
- Creates the script element and appends to document.head
2400
- return a Promise that is resolved when the script is loaded
2401
2399
 
2402
2400
 
2401
+ #### valueAsAnchor()
2403
2402
 
2403
+ Resolves statement as an anchor
2404
2404
 
2405
- ##### Parameters
2406
2405
 
2407
- | Name | Type | Description | |
2408
- | ---- | ---- | ----------- | -------- |
2409
- | url | `String` | Cdn Url | &nbsp; |
2410
- | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
2411
- | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
2412
2406
 
2413
2407
 
2414
2408
 
@@ -2416,27 +2410,15 @@ return a Promise that is resolved when the script is loaded
2416
2410
  ##### Returns
2417
2411
 
2418
2412
 
2419
- - `Void`
2420
-
2421
-
2422
-
2423
-
2424
- ### dist/general/mix/isEmpty.js
2425
-
2426
-
2427
- #### isEmpty(variable, includeFalsy)
2413
+ - `string`
2428
2414
 
2429
- Validates if the given argument is empty
2430
2415
 
2431
2416
 
2417
+ #### _statementToRange() *private method*
2432
2418
 
2419
+ Convert verbal statement to range value
2433
2420
 
2434
- ##### Parameters
2435
2421
 
2436
- | Name | Type | Description | |
2437
- | ---- | ---- | ----------- | -------- |
2438
- | variable | | the given variable | &nbsp; |
2439
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
2440
2422
 
2441
2423
 
2442
2424
 
@@ -2444,56 +2426,47 @@ Validates if the given argument is empty
2444
2426
  ##### Returns
2445
2427
 
2446
2428
 
2447
- - true: the given argument is empty; false: is not.
2429
+ - `AbsoluteRange`
2448
2430
 
2449
2431
 
2450
2432
 
2433
+ #### _resolveAsThis() *private method*
2451
2434
 
2452
- ### dist/general/mix/isNaNV2.js
2435
+ Apply 'this' cursor logic to statement
2453
2436
 
2454
2437
 
2455
- #### isNaNV2(variable)
2456
2438
 
2457
- Validates if the recieved number is NaN type.
2458
- This function recieves any variable but will return false.
2459
- Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
2460
2439
 
2461
2440
 
2462
2441
 
2442
+ ##### Returns
2463
2443
 
2464
- ##### Parameters
2465
2444
 
2466
- | Name | Type | Description | |
2467
- | ---- | ---- | ----------- | -------- |
2468
- | variable | | the variable to validate | &nbsp; |
2445
+ - `AbsoluteStatement`
2469
2446
 
2470
2447
 
2471
2448
 
2449
+ #### _resolveAsTheLast() *private method*
2472
2450
 
2473
- ##### Returns
2451
+ Apply 'the last' cursor logic to statement
2474
2452
 
2475
2453
 
2476
- - True if variable is a NaN or false otherwise
2477
2454
 
2478
2455
 
2479
2456
 
2480
2457
 
2481
- ### dist/general/mix/isNull.js
2458
+ ##### Returns
2482
2459
 
2483
2460
 
2484
- #### isNull(arg)
2461
+ - `AbsoluteStatement`
2485
2462
 
2486
- return if a given variable is either `null` or `undefined`
2487
- useful to avoid falsify validating Number Zero (0)
2488
2463
 
2489
2464
 
2465
+ #### _resolveAsTheNext() *private method*
2490
2466
 
2467
+ Apply 'the next' cursor logic to statement
2491
2468
 
2492
- ##### Parameters
2493
2469
 
2494
- | Name | Type | Description | |
2495
- | ---- | ---- | ----------- | -------- |
2496
- | arg | `any` | | &nbsp; |
2497
2470
 
2498
2471
 
2499
2472
 
@@ -2501,19 +2474,13 @@ useful to avoid falsify validating Number Zero (0)
2501
2474
  ##### Returns
2502
2475
 
2503
2476
 
2504
- - `Boolean`
2505
-
2506
-
2507
-
2477
+ - `AbsoluteStatement`
2508
2478
 
2509
- ### dist/general/mix/size.js
2510
2479
 
2511
2480
 
2512
- #### size(obj)
2481
+ #### replaceNowToken(value, now)
2513
2482
 
2514
- Gets the length of the given array.
2515
- - Useful for Object, Array and string type.
2516
- - For `null` or `undefined` or else argument the returned value will be 0.
2483
+ Replace '@now' token inside a string
2517
2484
 
2518
2485
 
2519
2486
 
@@ -2522,7 +2489,8 @@ Gets the length of the given array.
2522
2489
 
2523
2490
  | Name | Type | Description | |
2524
2491
  | ---- | ---- | ----------- | -------- |
2525
- | obj | `Any` | Any object-type variable | &nbsp; |
2492
+ | value | `string` | | &nbsp; |
2493
+ | now | `Date` | | &nbsp; |
2526
2494
 
2527
2495
 
2528
2496
 
@@ -2530,19 +2498,13 @@ Gets the length of the given array.
2530
2498
  ##### Returns
2531
2499
 
2532
2500
 
2533
- - `Number` the size of the given variable
2534
-
2535
-
2536
-
2501
+ - `string`
2537
2502
 
2538
- ### dist/general/mix/randomId.js
2539
2503
 
2540
2504
 
2541
- #### randomId(length, exclude)
2505
+ #### convertRelativeToAbsolute(args)
2542
2506
 
2543
- Creates a random string
2544
- - If the first given argument is different than a length number, the variable is replaced by a default number
2545
- - If the optional second given argument is passed the random string is permutated.
2507
+ Returns a range object (date) from a group of statement params
2546
2508
 
2547
2509
 
2548
2510
 
@@ -2551,26 +2513,45 @@ Creates a random string
2551
2513
 
2552
2514
  | Name | Type | Description | |
2553
2515
  | ---- | ---- | ----------- | -------- |
2554
- | length | `Number` | size of the generated string. Default 8 | &nbsp; |
2555
- | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
2516
+ | args | `RelativeToAbsoluteStruct` | | &nbsp; |
2556
2517
 
2557
2518
 
2558
2519
 
2559
2520
 
2521
+ ##### Examples
2522
+
2523
+ ```javascript
2524
+ pivot = '2021-03-03T12:30:40'
2525
+ unit = month
2526
+ steps = 2
2527
+ setTo = END
2528
+ resolverAsCalendar: true
2529
+ => Returns '2021-05-31T23:59:59'
2530
+ ```
2531
+ ```javascript
2532
+ pivot = '2021-03-03T12:30:40'
2533
+ unit = month
2534
+ steps = -2
2535
+ setTo = START
2536
+ resolverAsCalendar: false
2537
+ => Returns '2021-01-03T00:00:00'
2538
+ ```
2539
+
2540
+
2560
2541
  ##### Returns
2561
2542
 
2562
2543
 
2563
- - `String` Random string
2544
+ - `string`
2564
2545
 
2565
2546
 
2566
2547
 
2567
2548
 
2568
- ### dist/general/string/capitalize.js
2549
+ ### dist/dates/relative/relative.js
2569
2550
 
2570
2551
 
2571
- #### capitalize(text)
2552
+ #### resolveRelative(statements, clock)
2572
2553
 
2573
- Upper case the first letter of a given text
2554
+ Resolve a list of relative statements according to operator
2574
2555
 
2575
2556
 
2576
2557
 
@@ -2579,15 +2560,34 @@ Upper case the first letter of a given text
2579
2560
 
2580
2561
  | Name | Type | Description | |
2581
2562
  | ---- | ---- | ----------- | -------- |
2582
- | text | `String` | | &nbsp; |
2563
+ | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
2564
+ | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
2565
+
2566
+
2567
+
2568
+
2569
+ ##### Examples
2583
2570
 
2571
+ ```javascript
2572
+ Input:
2573
+ {
2574
+ "cursor": "the_next",
2575
+ "unit": "year",
2576
+ "number": 1,
2577
+ "includeCurrent": false,
2578
+ "isCalendarDate": false,
2579
+ "anchor": "03/05/2021"
2580
+ }
2584
2581
 
2582
+ Output:
2583
+ { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
2584
+ ```
2585
2585
 
2586
2586
 
2587
2587
  ##### Returns
2588
2588
 
2589
2589
 
2590
- - `String` a capitalized text
2590
+ - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
2591
2591
 
2592
2592
 
2593
2593
 
@@ -2680,90 +2680,8 @@ lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom
2680
2680
  verify the Config object type and try to return a parsed Object
2681
2681
  - In case _cfg_ is a string, first try to make a JSON parse in other case
2682
2682
  try to find this string as a variable on Windows object
2683
- - If _cfg_ is a fuction, tis is invoked and parsed
2684
- - Finally, if is an object, _cfg_ is inmediatly returned
2685
-
2686
-
2687
-
2688
-
2689
- ##### Parameters
2690
-
2691
- | Name | Type | Description | |
2692
- | ---- | ---- | ----------- | -------- |
2693
- | cfg | | | &nbsp; |
2694
-
2695
-
2696
-
2697
-
2698
- ##### Returns
2699
-
2700
-
2701
- - `Void`
2702
-
2703
-
2704
-
2705
-
2706
- ### dist/services/api/getAllDatasets.api.js
2707
-
2708
-
2709
- #### getAllDatasets(qrveyids)
2710
-
2711
- Get a dataset list from a collection of Qrvey IDs
2712
-
2713
-
2714
-
2715
-
2716
- ##### Parameters
2717
-
2718
- | Name | Type | Description | |
2719
- | ---- | ---- | ----------- | -------- |
2720
- | qrveyids | | Collection of Qrvey IDs | &nbsp; |
2721
-
2722
-
2723
-
2724
-
2725
- ##### Returns
2726
-
2727
-
2728
- - a promise
2729
-
2730
-
2731
-
2732
-
2733
- ### dist/services/api/getAllQrveys.api.js
2734
-
2735
-
2736
- #### getAllQrveys(config, params)
2737
-
2738
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2739
-
2740
-
2741
-
2742
-
2743
- ##### Parameters
2744
-
2745
- | Name | Type | Description | |
2746
- | ---- | ---- | ----------- | -------- |
2747
- | config | | Configuration | &nbsp; |
2748
- | params | | Object for getting precise data | &nbsp; |
2749
-
2750
-
2751
-
2752
-
2753
- ##### Returns
2754
-
2755
-
2756
- - `Void`
2757
-
2758
-
2759
-
2760
-
2761
- ### dist/services/api/getDatasetColumns.api.js
2762
-
2763
-
2764
- #### getDatasetColumns(qrveyid)
2765
-
2766
- Get a dataset by Qrvey ID
2683
+ - If _cfg_ is a fuction, tis is invoked and parsed
2684
+ - Finally, if is an object, _cfg_ is inmediatly returned
2767
2685
 
2768
2686
 
2769
2687
 
@@ -2772,7 +2690,7 @@ Get a dataset by Qrvey ID
2772
2690
 
2773
2691
  | Name | Type | Description | |
2774
2692
  | ---- | ---- | ----------- | -------- |
2775
- | qrveyid | | The Qrvey ID | &nbsp; |
2693
+ | cfg | | | &nbsp; |
2776
2694
 
2777
2695
 
2778
2696
 
@@ -2780,7 +2698,7 @@ Get a dataset by Qrvey ID
2780
2698
  ##### Returns
2781
2699
 
2782
2700
 
2783
- - a promise
2701
+ - `Void`
2784
2702
 
2785
2703
 
2786
2704
 
@@ -2839,12 +2757,12 @@ Get a dataset by Qrvey ID
2839
2757
 
2840
2758
 
2841
2759
 
2842
- ### dist/dates/relative/helpers/formatStatement.js
2760
+ ### dist/services/api/getAllDatasets.api.js
2843
2761
 
2844
2762
 
2845
- #### formatStatement(statement)
2763
+ #### getAllDatasets(qrveyids)
2846
2764
 
2847
- Build a proper relative date statement type
2765
+ Get a dataset list from a collection of Qrvey IDs
2848
2766
 
2849
2767
 
2850
2768
 
@@ -2853,7 +2771,7 @@ Build a proper relative date statement type
2853
2771
 
2854
2772
  | Name | Type | Description | |
2855
2773
  | ---- | ---- | ----------- | -------- |
2856
- | statement | `RelativeStatement` | | &nbsp; |
2774
+ | qrveyids | | Collection of Qrvey IDs | &nbsp; |
2857
2775
 
2858
2776
 
2859
2777
 
@@ -2861,17 +2779,17 @@ Build a proper relative date statement type
2861
2779
  ##### Returns
2862
2780
 
2863
2781
 
2864
- - `RelativeStatement`
2782
+ - a promise
2865
2783
 
2866
2784
 
2867
2785
 
2868
2786
 
2869
- ### dist/dates/relative/helpers/getStatementCase.js
2787
+ ### dist/services/api/getAllQrveys.api.js
2870
2788
 
2871
2789
 
2872
- #### getStatementCase(includeCurrent, isCalendarDate)
2790
+ #### getAllQrveys(config, params)
2873
2791
 
2874
- Returns a number/constant that identifies a relative date case
2792
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2875
2793
 
2876
2794
 
2877
2795
 
@@ -2880,8 +2798,8 @@ Returns a number/constant that identifies a relative date case
2880
2798
 
2881
2799
  | Name | Type | Description | |
2882
2800
  | ---- | ---- | ----------- | -------- |
2883
- | includeCurrent | `boolean` | | &nbsp; |
2884
- | isCalendarDate | `boolean` | | &nbsp; |
2801
+ | config | | Configuration | &nbsp; |
2802
+ | params | | Object for getting precise data | &nbsp; |
2885
2803
 
2886
2804
 
2887
2805
 
@@ -2889,17 +2807,17 @@ Returns a number/constant that identifies a relative date case
2889
2807
  ##### Returns
2890
2808
 
2891
2809
 
2892
- - `number`
2810
+ - `Void`
2893
2811
 
2894
2812
 
2895
2813
 
2896
2814
 
2897
- ### dist/dates/relative/helpers/parseDate.js
2815
+ ### dist/services/api/getDatasetColumns.api.js
2898
2816
 
2899
2817
 
2900
- #### parseDate(date)
2818
+ #### getDatasetColumns(qrveyid)
2901
2819
 
2902
- Parses a string date and returns a dayjs date
2820
+ Get a dataset by Qrvey ID
2903
2821
 
2904
2822
 
2905
2823
 
@@ -2908,7 +2826,7 @@ Parses a string date and returns a dayjs date
2908
2826
 
2909
2827
  | Name | Type | Description | |
2910
2828
  | ---- | ---- | ----------- | -------- |
2911
- | date | `string` `Dayjs` `Date` | | &nbsp; |
2829
+ | qrveyid | | The Qrvey ID | &nbsp; |
2912
2830
 
2913
2831
 
2914
2832
 
@@ -2916,17 +2834,18 @@ Parses a string date and returns a dayjs date
2916
2834
  ##### Returns
2917
2835
 
2918
2836
 
2919
- - `Dayjs` A dayjs date
2837
+ - a promise
2920
2838
 
2921
2839
 
2922
2840
 
2923
2841
 
2924
- ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
2842
+ ### dist/filters/helpers/backend/buildExpression.js
2925
2843
 
2926
2844
 
2927
- #### getFilterBuilderGeneralConfig(config)
2845
+ #### buildExpression(filter)
2928
2846
 
2929
- Returns a filter builder config object by a any given config
2847
+ Builds filter expression by the filter data.
2848
+ - If the resulting value array is empty the enabled property will be false.
2930
2849
 
2931
2850
 
2932
2851
 
@@ -2935,7 +2854,7 @@ Returns a filter builder config object by a any given config
2935
2854
 
2936
2855
  | Name | Type | Description | |
2937
2856
  | ---- | ---- | ----------- | -------- |
2938
- | config | | any config object | &nbsp; |
2857
+ | filter | | The filter to transform | &nbsp; |
2939
2858
 
2940
2859
 
2941
2860
 
@@ -2943,18 +2862,17 @@ Returns a filter builder config object by a any given config
2943
2862
  ##### Returns
2944
2863
 
2945
2864
 
2946
- - The filter builder config object
2865
+ - a filter expression
2947
2866
 
2948
2867
 
2949
2868
 
2950
2869
 
2951
- ### dist/filters/helpers/backend/buildExpression.js
2870
+ ### dist/filters/helpers/backend/buildUserFilters.js
2952
2871
 
2953
2872
 
2954
- #### buildExpression(filter)
2873
+ #### buildUserFilters(userFilters)
2955
2874
 
2956
- Builds filter expression by the filter data.
2957
- - If the resulting value array is empty the enabled property will be false.
2875
+ Transform user Filters array into Filter Logic structure
2958
2876
 
2959
2877
 
2960
2878
 
@@ -2963,7 +2881,7 @@ Builds filter expression by the filter data.
2963
2881
 
2964
2882
  | Name | Type | Description | |
2965
2883
  | ---- | ---- | ----------- | -------- |
2966
- | filter | | The filter to transform | &nbsp; |
2884
+ | userFilters | | The filters that the user defined. | &nbsp; |
2967
2885
 
2968
2886
 
2969
2887
 
@@ -2971,17 +2889,17 @@ Builds filter expression by the filter data.
2971
2889
  ##### Returns
2972
2890
 
2973
2891
 
2974
- - a filter expression
2892
+ - The filter logic for the given user filters. if No a given object is recieved, it will return an empty array.
2975
2893
 
2976
2894
 
2977
2895
 
2978
2896
 
2979
- ### dist/filters/helpers/backend/buildUserFilters.js
2897
+ ### dist/filters/helpers/backend/getAggFiltersBySummaryIndex.js
2980
2898
 
2981
2899
 
2982
- #### buildUserFilters(userFilters)
2900
+ #### getAggFiltersBySummaryIndex(aggFilters, summaryIndex)
2901
+
2983
2902
 
2984
- Transform user Filters array into Filter Logic structure
2985
2903
 
2986
2904
 
2987
2905
 
@@ -2990,7 +2908,8 @@ Transform user Filters array into Filter Logic structure
2990
2908
 
2991
2909
  | Name | Type | Description | |
2992
2910
  | ---- | ---- | ----------- | -------- |
2993
- | userFilters | | The filters that the user defined. | &nbsp; |
2911
+ | aggFilters | | | &nbsp; |
2912
+ | summaryIndex | | | &nbsp; |
2994
2913
 
2995
2914
 
2996
2915
 
@@ -2998,17 +2917,17 @@ Transform user Filters array into Filter Logic structure
2998
2917
  ##### Returns
2999
2918
 
3000
2919
 
3001
- - The filter logic for the given user filters. if No a given object is recieved, it will return an empty array.
3002
-
2920
+ -
3003
2921
 
3004
2922
 
3005
2923
 
3006
- ### dist/filters/helpers/backend/getAggFiltersBySummaryIndex.js
3007
2924
 
2925
+ ### dist/filters/helpers/backend/getBackendGroupValue.js
3008
2926
 
3009
- #### getAggFiltersBySummaryIndex(aggFilters, summaryIndex)
3010
2927
 
2928
+ #### getBackendGroupValue(filter)
3011
2929
 
2930
+ Gets a group value for the backend logic structure
3012
2931
 
3013
2932
 
3014
2933
 
@@ -3017,8 +2936,7 @@ Transform user Filters array into Filter Logic structure
3017
2936
 
3018
2937
  | Name | Type | Description | |
3019
2938
  | ---- | ---- | ----------- | -------- |
3020
- | aggFilters | | | &nbsp; |
3021
- | summaryIndex | | | &nbsp; |
2939
+ | filter | | The filter | &nbsp; |
3022
2940
 
3023
2941
 
3024
2942
 
@@ -3026,17 +2944,17 @@ Transform user Filters array into Filter Logic structure
3026
2944
  ##### Returns
3027
2945
 
3028
2946
 
3029
- -
2947
+ - a property
3030
2948
 
3031
2949
 
3032
2950
 
3033
2951
 
3034
- ### dist/filters/helpers/backend/getBackendGroupValue.js
2952
+ ### dist/filters/helpers/backend/getBackendProperty.js
3035
2953
 
3036
2954
 
3037
- #### getBackendGroupValue(filter)
2955
+ #### getBackendProperty(filter)
3038
2956
 
3039
- Gets a group value for the backend logic structure
2957
+ Gets a property for the logic structure
3040
2958
 
3041
2959
 
3042
2960
 
@@ -3160,12 +3078,12 @@ Gets the Ranking values.
3160
3078
 
3161
3079
 
3162
3080
 
3163
- ### dist/filters/helpers/backend/getBackendProperty.js
3081
+ ### dist/filters/helpers/backend/getLogicByScopes.js
3164
3082
 
3165
3083
 
3166
- #### getBackendProperty(filter)
3084
+ #### getLogicByScopes(logics, scopes)
3167
3085
 
3168
- Gets a property for the logic structure
3086
+ Gets the filters from logic data by Scopes/Scope IDs.
3169
3087
 
3170
3088
 
3171
3089
 
@@ -3174,7 +3092,8 @@ Gets a property for the logic structure
3174
3092
 
3175
3093
  | Name | Type | Description | |
3176
3094
  | ---- | ---- | ----------- | -------- |
3177
- | filter | | The filter | &nbsp; |
3095
+ | logics | | The logic array | &nbsp; |
3096
+ | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3178
3097
 
3179
3098
 
3180
3099
 
@@ -3182,7 +3101,7 @@ Gets a property for the logic structure
3182
3101
  ##### Returns
3183
3102
 
3184
3103
 
3185
- - a property
3104
+ - a new Logic array
3186
3105
 
3187
3106
 
3188
3107
 
@@ -3216,12 +3135,12 @@ Gets filters from the logic by the scopes hierarchy.
3216
3135
 
3217
3136
 
3218
3137
 
3219
- ### dist/filters/helpers/backend/getLogicByScopes.js
3138
+ ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
3220
3139
 
3221
3140
 
3222
- #### getLogicByScopes(logics, scopes)
3141
+ #### getFilterBuilderGeneralConfig(config)
3223
3142
 
3224
- Gets the filters from logic data by Scopes/Scope IDs.
3143
+ Returns a filter builder config object by a any given config
3225
3144
 
3226
3145
 
3227
3146
 
@@ -3230,8 +3149,7 @@ Gets the filters from logic data by Scopes/Scope IDs.
3230
3149
 
3231
3150
  | Name | Type | Description | |
3232
3151
  | ---- | ---- | ----------- | -------- |
3233
- | logics | | The logic array | &nbsp; |
3234
- | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3152
+ | config | | any config object | &nbsp; |
3235
3153
 
3236
3154
 
3237
3155
 
@@ -3239,17 +3157,17 @@ Gets the filters from logic data by Scopes/Scope IDs.
3239
3157
  ##### Returns
3240
3158
 
3241
3159
 
3242
- - a new Logic array
3160
+ - The filter builder config object
3243
3161
 
3244
3162
 
3245
3163
 
3246
3164
 
3247
- ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3165
+ ### dist/filters/helpers/common/areFiltersEquals.js
3248
3166
 
3249
3167
 
3250
- #### excludeFiltersByAggregateColumn(filterData)
3168
+ #### areFiltersEquals(filter1, filter2)
3251
3169
 
3252
- Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3170
+ Validates if both filters are the same
3253
3171
 
3254
3172
 
3255
3173
 
@@ -3258,7 +3176,8 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3258
3176
 
3259
3177
  | Name | Type | Description | |
3260
3178
  | ---- | ---- | ----------- | -------- |
3261
- | filterData | | The filter data object | &nbsp; |
3179
+ | filter1 | | filter 1 | &nbsp; |
3180
+ | filter2 | | filter 2 | &nbsp; |
3262
3181
 
3263
3182
 
3264
3183
 
@@ -3266,17 +3185,17 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3266
3185
  ##### Returns
3267
3186
 
3268
3187
 
3269
- - The new filter data object that were excluded the aggregate filters
3188
+ - true: the filters are equal; false: the filters are NOT equal
3270
3189
 
3271
3190
 
3272
3191
 
3273
3192
 
3274
- ### dist/filters/helpers/common/areFiltersEquals.js
3193
+ ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3275
3194
 
3276
3195
 
3277
- #### areFiltersEquals(filter1, filter2)
3196
+ #### excludeFiltersByAggregateColumn(filterData)
3278
3197
 
3279
- Validates if both filters are the same
3198
+ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3280
3199
 
3281
3200
 
3282
3201
 
@@ -3285,8 +3204,7 @@ Validates if both filters are the same
3285
3204
 
3286
3205
  | Name | Type | Description | |
3287
3206
  | ---- | ---- | ----------- | -------- |
3288
- | filter1 | | filter 1 | &nbsp; |
3289
- | filter2 | | filter 2 | &nbsp; |
3207
+ | filterData | | The filter data object | &nbsp; |
3290
3208
 
3291
3209
 
3292
3210
 
@@ -3294,17 +3212,26 @@ Validates if both filters are the same
3294
3212
  ##### Returns
3295
3213
 
3296
3214
 
3297
- - true: the filters are equal; false: the filters are NOT equal
3215
+ - The new filter data object that were excluded the aggregate filters
3298
3216
 
3299
3217
 
3300
3218
 
3301
3219
 
3302
- ### dist/filters/helpers/common/excludeFiltersByScopes.js
3220
+ ### dist/filters/helpers/common/excludeFiltersByParams.js
3303
3221
 
3304
3222
 
3305
- #### excludeFiltersByScopes(filterData, scopes)
3223
+ #### excludeFiltersByParams(filterData, params)
3306
3224
 
3307
- Excludes and returns a filter data without filters by the given scopes
3225
+ Excludes filters from the given Filters.
3226
+ The validation to filter the stored filter is depending on:
3227
+ - Column
3228
+ - Qrvey ID
3229
+ - Scope type
3230
+ - Scope ID
3231
+ - Panel ID
3232
+ - Validator type
3233
+ - Property type
3234
+ - Enabled flags
3308
3235
 
3309
3236
 
3310
3237
 
@@ -3313,8 +3240,8 @@ Excludes and returns a filter data without filters by the given scopes
3313
3240
 
3314
3241
  | Name | Type | Description | |
3315
3242
  | ---- | ---- | ----------- | -------- |
3316
- | filterData | | The Filter Data | &nbsp; |
3317
- | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
3243
+ | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3244
+ | params | | given parameters to validate the filter data | &nbsp; |
3318
3245
 
3319
3246
 
3320
3247
 
@@ -3322,26 +3249,17 @@ Excludes and returns a filter data without filters by the given scopes
3322
3249
  ##### Returns
3323
3250
 
3324
3251
 
3325
- - The new Filter Data without filters by the given scopes.
3252
+ - a new Filter object structure
3326
3253
 
3327
3254
 
3328
3255
 
3329
3256
 
3330
- ### dist/filters/helpers/common/excludeFiltersByParams.js
3257
+ ### dist/filters/helpers/common/excludeFiltersByScopes.js
3331
3258
 
3332
3259
 
3333
- #### excludeFiltersByParams(filterData, params)
3260
+ #### excludeFiltersByScopes(filterData, scopes)
3334
3261
 
3335
- Excludes filters from the given Filters.
3336
- The validation to filter the stored filter is depending on:
3337
- - Column
3338
- - Qrvey ID
3339
- - Scope type
3340
- - Scope ID
3341
- - Panel ID
3342
- - Validator type
3343
- - Property type
3344
- - Enabled flags
3262
+ Excludes and returns a filter data without filters by the given scopes
3345
3263
 
3346
3264
 
3347
3265
 
@@ -3350,8 +3268,8 @@ The validation to filter the stored filter is depending on:
3350
3268
 
3351
3269
  | Name | Type | Description | |
3352
3270
  | ---- | ---- | ----------- | -------- |
3353
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3354
- | params | | given parameters to validate the filter data | &nbsp; |
3271
+ | filterData | | The Filter Data | &nbsp; |
3272
+ | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
3355
3273
 
3356
3274
 
3357
3275
 
@@ -3359,7 +3277,7 @@ The validation to filter the stored filter is depending on:
3359
3277
  ##### Returns
3360
3278
 
3361
3279
 
3362
- - a new Filter object structure
3280
+ - The new Filter Data without filters by the given scopes.
3363
3281
 
3364
3282
 
3365
3283
 
@@ -4320,4 +4238,86 @@ Resolves conditions between UI flattened filter and given parameters
4320
4238
 
4321
4239
 
4322
4240
 
4241
+ ### dist/dates/relative/helpers/formatStatement.js
4242
+
4243
+
4244
+ #### formatStatement(statement)
4245
+
4246
+ Build a proper relative date statement type
4247
+
4248
+
4249
+
4250
+
4251
+ ##### Parameters
4252
+
4253
+ | Name | Type | Description | |
4254
+ | ---- | ---- | ----------- | -------- |
4255
+ | statement | `RelativeStatement` | | &nbsp; |
4256
+
4257
+
4258
+
4259
+
4260
+ ##### Returns
4261
+
4262
+
4263
+ - `RelativeStatement`
4264
+
4265
+
4266
+
4267
+
4268
+ ### dist/dates/relative/helpers/getStatementCase.js
4269
+
4270
+
4271
+ #### getStatementCase(includeCurrent, isCalendarDate)
4272
+
4273
+ Returns a number/constant that identifies a relative date case
4274
+
4275
+
4276
+
4277
+
4278
+ ##### Parameters
4279
+
4280
+ | Name | Type | Description | |
4281
+ | ---- | ---- | ----------- | -------- |
4282
+ | includeCurrent | `boolean` | | &nbsp; |
4283
+ | isCalendarDate | `boolean` | | &nbsp; |
4284
+
4285
+
4286
+
4287
+
4288
+ ##### Returns
4289
+
4290
+
4291
+ - `number`
4292
+
4293
+
4294
+
4295
+
4296
+ ### dist/dates/relative/helpers/parseDate.js
4297
+
4298
+
4299
+ #### parseDate(date)
4300
+
4301
+ Parses a string date and returns a dayjs date
4302
+
4303
+
4304
+
4305
+
4306
+ ##### Parameters
4307
+
4308
+ | Name | Type | Description | |
4309
+ | ---- | ---- | ----------- | -------- |
4310
+ | date | `string` `Dayjs` `Date` | | &nbsp; |
4311
+
4312
+
4313
+
4314
+
4315
+ ##### Returns
4316
+
4317
+
4318
+ - `Dayjs` A dayjs date
4319
+
4320
+
4321
+
4322
+
4323
4323
  *Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*