@qrvey/utils 1.2.9-5 → 1.2.9-9

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