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