@qrvey/utils 1.2.9-17 → 1.2.9-20
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 +729 -729
- package/dist/cjs/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -1
- package/dist/cjs/filters/helpers/ui/getUIValues.js +1 -1
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderConfig.d.ts +0 -2
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +2 -1
- package/dist/cjs/filters/interfaces/panel/IFilterPanelConfig.d.ts +2 -3
- package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +2 -1
- package/dist/cjs/format/localization.d.ts +1 -0
- package/dist/cjs/format/localization.js +12 -3
- package/dist/cjs/globalization/helpers/getI18nCalendar.d.ts +4 -0
- package/dist/cjs/globalization/helpers/getI18nCalendar.js +69 -0
- package/dist/cjs/globalization/helpers/index.d.ts +1 -0
- package/dist/cjs/globalization/helpers/index.js +1 -0
- package/dist/cjs/globalization/interfaces/II18nConfig.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/{IResourceI18n.js → II18nConfig.js} +0 -0
- package/dist/cjs/globalization/interfaces/{IResourceI18n.d.ts → II18nResource.d.ts} +1 -1
- package/dist/cjs/globalization/interfaces/II18nResource.js +2 -0
- package/dist/cjs/globalization/interfaces/bucket_builder/II18nBucketBuilderModalBucket.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.js +2 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.js +2 -0
- package/dist/cjs/globalization/interfaces/calendar/index.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/calendar/index.js +14 -0
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderListModal.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/index.d.ts +3 -1
- package/dist/cjs/globalization/interfaces/index.js +3 -1
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTooltips.d.ts +1 -0
- package/dist/cjs/globalization/labels/I18N_DEFAULT.d.ts +2 -2
- package/dist/cjs/globalization/labels/bucket_builder/I18N_BUCKET_BUILDER.js +2 -0
- package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
- package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.js +10 -0
- package/dist/cjs/globalization/labels/calendar/index.d.ts +1 -0
- package/dist/cjs/globalization/labels/calendar/index.js +13 -0
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/cjs/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +6 -0
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +3 -1
- package/dist/cjs/globalization/labels/index.d.ts +1 -0
- package/dist/cjs/globalization/labels/index.js +1 -0
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +1 -0
- package/dist/cjs/globalization/service/i18nextBuilder.d.ts +3 -3
- package/dist/cjs/globalization/service/initI18n.d.ts +2 -2
- package/dist/cjs/qrvey/helpers/transformValue.js +2 -1
- package/dist/cjs/qrvey/interfaces/ITransformValueSettings.d.ts +2 -1
- package/dist/cjs/services/api/getDatasetColumns.api.js +2 -3
- package/dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -1
- package/dist/filters/helpers/ui/getUIValues.js +1 -1
- package/dist/filters/interfaces/builder/IFilterBuilderConfig.d.ts +0 -2
- package/dist/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +2 -1
- package/dist/filters/interfaces/panel/IFilterPanelConfig.d.ts +2 -3
- package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +2 -1
- package/dist/format/localization.d.ts +1 -0
- package/dist/format/localization.js +10 -2
- package/dist/globalization/helpers/getI18nCalendar.d.ts +4 -0
- package/dist/globalization/helpers/getI18nCalendar.js +65 -0
- package/dist/globalization/helpers/index.d.ts +1 -0
- package/dist/globalization/helpers/index.js +1 -0
- package/dist/globalization/interfaces/II18nConfig.d.ts +6 -0
- package/dist/globalization/interfaces/{IResourceI18n.js → II18nConfig.js} +0 -0
- package/dist/globalization/interfaces/{IResourceI18n.d.ts → II18nResource.d.ts} +1 -1
- package/dist/globalization/interfaces/II18nResource.js +1 -0
- package/dist/globalization/interfaces/bucket_builder/II18nBucketBuilderModalBucket.d.ts +2 -0
- package/dist/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
- package/dist/globalization/interfaces/calendar/II18nCalendar.js +1 -0
- package/dist/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
- package/dist/globalization/interfaces/calendar/II18nCalendarProperties.js +1 -0
- package/dist/globalization/interfaces/calendar/index.d.ts +2 -0
- package/dist/globalization/interfaces/calendar/index.js +2 -0
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
- package/dist/globalization/interfaces/filters/II18nFilter.d.ts +2 -0
- package/dist/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
- package/dist/globalization/interfaces/filters/II18nTokenBox.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderListModal.d.ts +2 -0
- package/dist/globalization/interfaces/index.d.ts +3 -1
- package/dist/globalization/interfaces/index.js +3 -1
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTooltips.d.ts +1 -0
- package/dist/globalization/labels/I18N_DEFAULT.d.ts +2 -2
- package/dist/globalization/labels/bucket_builder/I18N_BUCKET_BUILDER.js +2 -0
- package/dist/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
- package/dist/globalization/labels/calendar/I18N_CALENDAR.js +7 -0
- package/dist/globalization/labels/calendar/index.d.ts +1 -0
- package/dist/globalization/labels/calendar/index.js +1 -0
- package/dist/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
- package/dist/globalization/labels/filters/I18N_FILTER.js +6 -0
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +3 -1
- package/dist/globalization/labels/index.d.ts +1 -0
- package/dist/globalization/labels/index.js +1 -0
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +1 -0
- package/dist/globalization/service/i18nextBuilder.d.ts +3 -3
- package/dist/globalization/service/initI18n.d.ts +2 -2
- package/dist/qrvey/helpers/transformValue.js +2 -1
- package/dist/qrvey/interfaces/ITransformValueSettings.d.ts +2 -1
- package/dist/services/api/getDatasetColumns.api.js +3 -4
- package/package.json +1 -1
- package/src/filters/helpers/builder/getFilterBuilderGeneralConfig.ts +1 -1
- package/src/filters/helpers/ui/getUIValues.ts +1 -1
- package/src/filters/interfaces/builder/IFilterBuilderConfig.ts +0 -2
- package/src/filters/interfaces/builder/IFilterBuilderGeneralConfig.ts +3 -1
- package/src/filters/interfaces/panel/IFilterPanelConfig.ts +2 -3
- package/src/filters/interfaces/ui/IFUTransformFilterValuesSettings.ts +2 -1
- package/src/format/localization.ts +12 -2
- package/src/globalization/helpers/getI18nCalendar.ts +68 -0
- package/src/globalization/helpers/index.ts +1 -0
- package/src/globalization/interfaces/II18nConfig.ts +7 -0
- package/src/globalization/interfaces/{IResourceI18n.ts → II18nResource.ts} +1 -1
- package/src/globalization/interfaces/bucket_builder/II18nBucketBuilderModalBucket.ts +2 -0
- package/src/globalization/interfaces/calendar/II18nCalendar.ts +7 -0
- package/src/globalization/interfaces/calendar/II18nCalendarProperties.ts +9 -0
- package/src/globalization/interfaces/calendar/index.ts +2 -0
- package/src/globalization/interfaces/common/II18nCommon.ts +2 -0
- package/src/globalization/interfaces/common/II18nDayNames.ts +8 -0
- package/src/globalization/interfaces/filters/II18nFilter.ts +2 -0
- package/src/globalization/interfaces/filters/II18nTokenBox.ts +6 -0
- package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderListModal.ts +3 -1
- package/src/globalization/interfaces/index.ts +3 -1
- package/src/globalization/interfaces/style_themes/II18nStyleThemesTooltips.ts +1 -0
- package/src/globalization/labels/I18N_DEFAULT.ts +2 -2
- package/src/globalization/labels/bucket_builder/I18N_BUCKET_BUILDER.ts +2 -0
- package/src/globalization/labels/calendar/I18N_CALENDAR.ts +9 -0
- package/src/globalization/labels/calendar/index.ts +1 -0
- package/src/globalization/labels/common/I18N_COMMON.ts +2 -0
- package/src/globalization/labels/common/I18N_DAY_NAMES.ts +8 -0
- package/src/globalization/labels/filters/I18N_FILTER.ts +6 -0
- package/src/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.ts +3 -1
- package/src/globalization/labels/index.ts +1 -0
- package/src/globalization/labels/style_themes/I18N_STYLE_THEMES.ts +1 -0
- package/src/globalization/service/i18nextBuilder.ts +4 -4
- package/src/globalization/service/initI18n.ts +3 -3
- package/src/qrvey/helpers/transformValue.ts +1 -1
- package/src/qrvey/interfaces/ITransformValueSettings.ts +2 -1
- package/src/services/api/getDatasetColumns.api.ts +3 -4
- package/test/columns/isNumericalColumn.test.js +154 -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-20*
|
|
2
2
|
|
|
3
3
|
> Helper, Utils for all Qrvey Projects
|
|
4
4
|
|
|
@@ -80,12 +80,12 @@ Get a text and evaluate if it matchs with a token box label.
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
### dist/
|
|
83
|
+
### dist/dates/adapters/mdyDateToDate.js
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
####
|
|
86
|
+
#### mdyDateToDate(monthYearDate, time)
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
@@ -94,8 +94,8 @@ Inmutable Array Item deletion
|
|
|
94
94
|
|
|
95
95
|
| Name | Type | Description | |
|
|
96
96
|
| ---- | ---- | ----------- | -------- |
|
|
97
|
-
|
|
|
98
|
-
|
|
|
97
|
+
| monthYearDate | | String of [mm/dd/yyyy] date | |
|
|
98
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
@@ -103,20 +103,17 @@ Inmutable Array Item deletion
|
|
|
103
103
|
##### Returns
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
-
|
|
106
|
+
- The date object or the date in milliseconds
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
### dist/
|
|
111
|
+
### dist/dates/adapters/monthYearToDate.js
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
####
|
|
114
|
+
#### monthYearToDate(monthYearDate, time)
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
- If the given arguments are not valid, the function returns the first argument.
|
|
118
|
-
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
119
|
-
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
116
|
+
Transforms String Date from a [Month Year] format to Date object.
|
|
120
117
|
|
|
121
118
|
|
|
122
119
|
|
|
@@ -125,9 +122,8 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
125
122
|
|
|
126
123
|
| Name | Type | Description | |
|
|
127
124
|
| ---- | ---- | ----------- | -------- |
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
125
|
+
| monthYearDate | | String of [Month Year] date | |
|
|
126
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
131
127
|
|
|
132
128
|
|
|
133
129
|
|
|
@@ -135,17 +131,17 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
135
131
|
##### Returns
|
|
136
132
|
|
|
137
133
|
|
|
138
|
-
-
|
|
134
|
+
- The date object or the date in milliseconds
|
|
139
135
|
|
|
140
136
|
|
|
141
137
|
|
|
142
138
|
|
|
143
|
-
### dist/
|
|
139
|
+
### dist/dates/adapters/quarterYearToDate.js
|
|
144
140
|
|
|
145
141
|
|
|
146
|
-
####
|
|
142
|
+
#### quarterYearToDate(quarterYearDate, time)
|
|
147
143
|
|
|
148
|
-
|
|
144
|
+
Transforms String Date from a [Quarter Year] format to Date object.
|
|
149
145
|
|
|
150
146
|
|
|
151
147
|
|
|
@@ -154,7 +150,8 @@ Flat deeply an array
|
|
|
154
150
|
|
|
155
151
|
| Name | Type | Description | |
|
|
156
152
|
| ---- | ---- | ----------- | -------- |
|
|
157
|
-
|
|
|
153
|
+
| quarterYearDate | | String of [Quarter Year] date | |
|
|
154
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
158
155
|
|
|
159
156
|
|
|
160
157
|
|
|
@@ -162,17 +159,17 @@ Flat deeply an array
|
|
|
162
159
|
##### Returns
|
|
163
160
|
|
|
164
161
|
|
|
165
|
-
-
|
|
162
|
+
- The date object or the date in milliseconds
|
|
166
163
|
|
|
167
164
|
|
|
168
165
|
|
|
169
166
|
|
|
170
|
-
### dist/
|
|
167
|
+
### dist/dates/adapters/weekYearToDate.js
|
|
171
168
|
|
|
172
169
|
|
|
173
|
-
####
|
|
170
|
+
#### weekYearToDate(date, time)
|
|
174
171
|
|
|
175
|
-
|
|
172
|
+
Transforms String Date from a [Week Year] format to Date object.
|
|
176
173
|
|
|
177
174
|
|
|
178
175
|
|
|
@@ -181,8 +178,8 @@ Gets the first index from the array by a callback condition
|
|
|
181
178
|
|
|
182
179
|
| Name | Type | Description | |
|
|
183
180
|
| ---- | ---- | ----------- | -------- |
|
|
184
|
-
|
|
|
185
|
-
|
|
|
181
|
+
| date | | String of [Week Year] date | |
|
|
182
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
186
183
|
|
|
187
184
|
|
|
188
185
|
|
|
@@ -190,17 +187,17 @@ Gets the first index from the array by a callback condition
|
|
|
190
187
|
##### Returns
|
|
191
188
|
|
|
192
189
|
|
|
193
|
-
-
|
|
190
|
+
- The date object or the date in milliseconds
|
|
194
191
|
|
|
195
192
|
|
|
196
193
|
|
|
197
194
|
|
|
198
|
-
### dist/
|
|
195
|
+
### dist/dates/adapters/yearToDate.js
|
|
199
196
|
|
|
200
197
|
|
|
201
|
-
####
|
|
198
|
+
#### yearToDate(yearDate, time)
|
|
202
199
|
|
|
203
|
-
|
|
200
|
+
Transforms String Date from a [Year] format to Date object.
|
|
204
201
|
|
|
205
202
|
|
|
206
203
|
|
|
@@ -209,8 +206,8 @@ Gets the last index from the array by a callback condition
|
|
|
209
206
|
|
|
210
207
|
| Name | Type | Description | |
|
|
211
208
|
| ---- | ---- | ----------- | -------- |
|
|
212
|
-
|
|
|
213
|
-
|
|
|
209
|
+
| yearDate | | String of [Year] date | |
|
|
210
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
214
211
|
|
|
215
212
|
|
|
216
213
|
|
|
@@ -218,17 +215,17 @@ Gets the last index from the array by a callback condition
|
|
|
218
215
|
##### Returns
|
|
219
216
|
|
|
220
217
|
|
|
221
|
-
-
|
|
218
|
+
- The date object or the date in milliseconds
|
|
222
219
|
|
|
223
220
|
|
|
224
221
|
|
|
225
222
|
|
|
226
|
-
### dist/
|
|
223
|
+
### dist/dates/helpers/getDateByDateFormat.js
|
|
227
224
|
|
|
228
225
|
|
|
229
|
-
####
|
|
226
|
+
#### getDateByDateFormat(date, format, time)
|
|
230
227
|
|
|
231
|
-
|
|
228
|
+
Gets a Date Object instance by a Date format
|
|
232
229
|
|
|
233
230
|
|
|
234
231
|
|
|
@@ -237,8 +234,9 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
237
234
|
|
|
238
235
|
| Name | Type | Description | |
|
|
239
236
|
| ---- | ---- | ----------- | -------- |
|
|
240
|
-
|
|
|
241
|
-
|
|
|
237
|
+
| date | | String with a formatted date | |
|
|
238
|
+
| format | | The date format | |
|
|
239
|
+
| time | | flag to convert the formatted date to miliseconds | |
|
|
242
240
|
|
|
243
241
|
|
|
244
242
|
|
|
@@ -246,17 +244,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
246
244
|
##### Returns
|
|
247
245
|
|
|
248
246
|
|
|
249
|
-
-
|
|
247
|
+
- a Date object, milisecond time or the same value if date format does not match.
|
|
250
248
|
|
|
251
249
|
|
|
252
250
|
|
|
253
251
|
|
|
254
|
-
### dist/
|
|
252
|
+
### dist/dates/helpers/getDateFormatByProperty.js
|
|
255
253
|
|
|
256
254
|
|
|
257
|
-
####
|
|
255
|
+
#### getDateFormatByProperty(property)
|
|
258
256
|
|
|
259
|
-
|
|
257
|
+
Gets the date format by the given property
|
|
260
258
|
|
|
261
259
|
|
|
262
260
|
|
|
@@ -265,8 +263,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
265
263
|
|
|
266
264
|
| Name | Type | Description | |
|
|
267
265
|
| ---- | ---- | ----------- | -------- |
|
|
268
|
-
|
|
|
269
|
-
| time | `Number` | default 500ms | |
|
|
266
|
+
| property | | The Column Property | |
|
|
270
267
|
|
|
271
268
|
|
|
272
269
|
|
|
@@ -274,18 +271,17 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
274
271
|
##### Returns
|
|
275
272
|
|
|
276
273
|
|
|
277
|
-
-
|
|
274
|
+
- The date format
|
|
278
275
|
|
|
279
276
|
|
|
280
277
|
|
|
281
278
|
|
|
282
|
-
### dist/
|
|
279
|
+
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
283
280
|
|
|
284
281
|
|
|
285
|
-
####
|
|
282
|
+
#### getDateFormatRegularExpressionInArray(dateFormat)
|
|
286
283
|
|
|
287
|
-
|
|
288
|
-
Includes arrays in the comparison.
|
|
284
|
+
Gets an array of regular expressions by the given date format
|
|
289
285
|
|
|
290
286
|
|
|
291
287
|
|
|
@@ -294,8 +290,7 @@ Includes arrays in the comparison.
|
|
|
294
290
|
|
|
295
291
|
| Name | Type | Description | |
|
|
296
292
|
| ---- | ---- | ----------- | -------- |
|
|
297
|
-
|
|
|
298
|
-
| object2 | | Second Object to compare | |
|
|
293
|
+
| dateFormat | | the date format | |
|
|
299
294
|
|
|
300
295
|
|
|
301
296
|
|
|
@@ -303,17 +298,17 @@ Includes arrays in the comparison.
|
|
|
303
298
|
##### Returns
|
|
304
299
|
|
|
305
300
|
|
|
306
|
-
-
|
|
301
|
+
- an array of regular expressions
|
|
307
302
|
|
|
308
303
|
|
|
309
304
|
|
|
310
305
|
|
|
311
|
-
### dist/
|
|
306
|
+
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
312
307
|
|
|
313
308
|
|
|
314
|
-
####
|
|
309
|
+
#### getSeparatorByDateFormat(format)
|
|
315
310
|
|
|
316
|
-
Gets the
|
|
311
|
+
Gets the separator of the date format
|
|
317
312
|
|
|
318
313
|
|
|
319
314
|
|
|
@@ -322,7 +317,7 @@ Gets the `toStringTag` of `value`.
|
|
|
322
317
|
|
|
323
318
|
| Name | Type | Description | |
|
|
324
319
|
| ---- | ---- | ----------- | -------- |
|
|
325
|
-
|
|
|
320
|
+
| format | | the date format | |
|
|
326
321
|
|
|
327
322
|
|
|
328
323
|
|
|
@@ -330,17 +325,18 @@ Gets the `toStringTag` of `value`.
|
|
|
330
325
|
##### Returns
|
|
331
326
|
|
|
332
327
|
|
|
333
|
-
-
|
|
328
|
+
- a separator string
|
|
334
329
|
|
|
335
330
|
|
|
336
331
|
|
|
337
332
|
|
|
338
|
-
### dist/
|
|
333
|
+
### dist/dates/helpers/getWeek.js
|
|
339
334
|
|
|
340
335
|
|
|
341
|
-
####
|
|
336
|
+
#### getWeek(date)
|
|
342
337
|
|
|
343
|
-
|
|
338
|
+
Gets the week number of the year
|
|
339
|
+
Additionally, the month and the year
|
|
344
340
|
|
|
345
341
|
|
|
346
342
|
|
|
@@ -349,54 +345,28 @@ Import a set of external Scripts given the URL in both serie and cascade way
|
|
|
349
345
|
|
|
350
346
|
| Name | Type | Description | |
|
|
351
347
|
| ---- | ---- | ----------- | -------- |
|
|
352
|
-
|
|
|
353
|
-
| scripts.url | `String` | CDN URL | |
|
|
354
|
-
| 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 | |
|
|
355
|
-
| scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
356
|
-
| scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
357
|
-
| scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | |
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
348
|
+
| date | | the date object | |
|
|
361
349
|
|
|
362
|
-
##### Examples
|
|
363
350
|
|
|
364
|
-
```javascript
|
|
365
|
-
// 1) Simple script (paralell loading)
|
|
366
|
-
importScripts(['http://myscript.js', 'http://another.js']);
|
|
367
351
|
|
|
368
|
-
// 2) Loading `.js` and `.esm.js` script (parallel loading)
|
|
369
|
-
importScripts([
|
|
370
|
-
{ url: 'http://myscript.esm.js', type: 'module' },
|
|
371
|
-
{ url: 'http://myscript.js', noModule: true }
|
|
372
|
-
]);
|
|
373
352
|
|
|
374
|
-
|
|
375
|
-
importScripts([
|
|
376
|
-
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
|
|
377
|
-
]);
|
|
353
|
+
##### Returns
|
|
378
354
|
|
|
379
|
-
// 4) mix
|
|
380
|
-
importScripts([
|
|
381
|
-
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
|
|
382
|
-
{ url: 'http://another.esm.js', type: 'module' },
|
|
383
|
-
{ url: 'http://another.js', noModule: true },
|
|
384
|
-
'http://simplescript.js'
|
|
385
|
-
]);
|
|
386
|
-
```
|
|
387
355
|
|
|
356
|
+
- an object with the week, month and year.
|
|
388
357
|
|
|
389
|
-
##### Returns
|
|
390
358
|
|
|
391
359
|
|
|
392
|
-
- `Promise` Promise when all script have been loaded
|
|
393
360
|
|
|
361
|
+
### dist/dates/helpers/validateDate.js
|
|
394
362
|
|
|
395
363
|
|
|
396
|
-
####
|
|
364
|
+
#### validateDate(date, format)
|
|
397
365
|
|
|
398
|
-
|
|
399
|
-
|
|
366
|
+
Validate a string date depending on giving format
|
|
367
|
+
- If the string is a token label, the function lets it pass.
|
|
368
|
+
- Otherwise depends of the format
|
|
369
|
+
- Some escenarios the string is a mix of token labels and dates
|
|
400
370
|
|
|
401
371
|
|
|
402
372
|
|
|
@@ -405,9 +375,8 @@ return a Promise that is resolved when the script is loaded
|
|
|
405
375
|
|
|
406
376
|
| Name | Type | Description | |
|
|
407
377
|
| ---- | ---- | ----------- | -------- |
|
|
408
|
-
|
|
|
409
|
-
|
|
|
410
|
-
| noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
378
|
+
| date | | String of date | |
|
|
379
|
+
| format | | String of the format to validate | |
|
|
411
380
|
|
|
412
381
|
|
|
413
382
|
|
|
@@ -415,19 +384,17 @@ return a Promise that is resolved when the script is loaded
|
|
|
415
384
|
##### Returns
|
|
416
385
|
|
|
417
386
|
|
|
418
|
-
-
|
|
387
|
+
- True if it is valid or not. Undefined if date is undefined
|
|
419
388
|
|
|
420
389
|
|
|
421
390
|
|
|
422
391
|
|
|
423
|
-
### dist/
|
|
392
|
+
### dist/dates/helpers/validateDateByDateFormat.js
|
|
424
393
|
|
|
425
394
|
|
|
426
|
-
####
|
|
395
|
+
#### validateDateByDateFormat(date, dateForma)
|
|
427
396
|
|
|
428
|
-
Validates
|
|
429
|
-
This function recieves any variable but will return false.
|
|
430
|
-
Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
|
|
397
|
+
Validates the given string as Date by its date format.
|
|
431
398
|
|
|
432
399
|
|
|
433
400
|
|
|
@@ -436,7 +403,8 @@ Validates if variable is null, undefined, or an empty string, also, the function
|
|
|
436
403
|
|
|
437
404
|
| Name | Type | Description | |
|
|
438
405
|
| ---- | ---- | ----------- | -------- |
|
|
439
|
-
|
|
|
406
|
+
| date | | a string to validate as date form | |
|
|
407
|
+
| dateForma | | the format of the date to validate the string | |
|
|
440
408
|
|
|
441
409
|
|
|
442
410
|
|
|
@@ -444,17 +412,17 @@ Validates if variable is null, undefined, or an empty string, also, the function
|
|
|
444
412
|
##### Returns
|
|
445
413
|
|
|
446
414
|
|
|
447
|
-
-
|
|
415
|
+
- true: the string is a valida date
|
|
448
416
|
|
|
449
417
|
|
|
450
418
|
|
|
451
419
|
|
|
452
|
-
### dist/
|
|
420
|
+
### dist/dates/range/getDateRange.js
|
|
453
421
|
|
|
454
422
|
|
|
455
|
-
####
|
|
423
|
+
#### getDateRange(value, dateGroupLabel, withTime)
|
|
456
424
|
|
|
457
|
-
|
|
425
|
+
Get date range object from a string date value
|
|
458
426
|
|
|
459
427
|
|
|
460
428
|
|
|
@@ -463,36 +431,58 @@ Validates if the given argument is empty
|
|
|
463
431
|
|
|
464
432
|
| Name | Type | Description | |
|
|
465
433
|
| ---- | ---- | ----------- | -------- |
|
|
466
|
-
|
|
|
467
|
-
|
|
|
434
|
+
| value | `String` | string date value | |
|
|
435
|
+
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
436
|
+
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
468
437
|
|
|
469
438
|
|
|
470
439
|
|
|
471
440
|
|
|
472
|
-
#####
|
|
441
|
+
##### Examples
|
|
473
442
|
|
|
443
|
+
```javascript
|
|
444
|
+
// 1) Year:
|
|
445
|
+
getDateRange('2020', 'YEAR');
|
|
446
|
+
// Will return:
|
|
447
|
+
{
|
|
448
|
+
from: '01/01/2020 00:00:00',
|
|
449
|
+
to: '12/31/2020 23:59:59'
|
|
450
|
+
}
|
|
474
451
|
|
|
475
|
-
|
|
452
|
+
// 2) Quarter:
|
|
453
|
+
getDateRange('Q3 2020', 'QUARTER');
|
|
454
|
+
// Will return:
|
|
455
|
+
{
|
|
456
|
+
from: '07/01/2020 00:00:00',
|
|
457
|
+
to: '09/30/2020 23:59:59'
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// 3) Month:
|
|
461
|
+
getDateRange('Oct 2020', 'MONTH');
|
|
462
|
+
// Will return:
|
|
463
|
+
{
|
|
464
|
+
from: '10/01/2020 00:00:00',
|
|
465
|
+
to: '10/31/2020 23:59:59'
|
|
466
|
+
}
|
|
467
|
+
```
|
|
476
468
|
|
|
477
469
|
|
|
470
|
+
##### Returns
|
|
478
471
|
|
|
479
472
|
|
|
480
|
-
|
|
473
|
+
- `Object` an object with the date range with two string date properties: from and to
|
|
481
474
|
|
|
482
475
|
|
|
483
|
-
#### isNull(arg)
|
|
484
476
|
|
|
485
|
-
return if a given variable is either `null` or `undefined`
|
|
486
|
-
useful to avoid falsify validating Number Zero (0)
|
|
487
477
|
|
|
478
|
+
### dist/dates/relative/Adapter.js
|
|
488
479
|
|
|
489
480
|
|
|
481
|
+
#### value()
|
|
482
|
+
|
|
483
|
+
Resolves statement and returns statement value
|
|
490
484
|
|
|
491
|
-
##### Parameters
|
|
492
485
|
|
|
493
|
-
| Name | Type | Description | |
|
|
494
|
-
| ---- | ---- | ----------- | -------- |
|
|
495
|
-
| arg | `any` | | |
|
|
496
486
|
|
|
497
487
|
|
|
498
488
|
|
|
@@ -500,58 +490,47 @@ useful to avoid falsify validating Number Zero (0)
|
|
|
500
490
|
##### Returns
|
|
501
491
|
|
|
502
492
|
|
|
503
|
-
- `
|
|
493
|
+
- `AbsoluteRange` `string`
|
|
504
494
|
|
|
505
495
|
|
|
506
496
|
|
|
497
|
+
#### valueAsAnchor()
|
|
507
498
|
|
|
508
|
-
|
|
499
|
+
Resolves statement as an anchor
|
|
509
500
|
|
|
510
501
|
|
|
511
|
-
#### size(obj)
|
|
512
502
|
|
|
513
|
-
Gets the length of the given array.
|
|
514
|
-
- Useful for Object, Array and string type.
|
|
515
|
-
- For `null` or `undefined` or else argument the returned value will be 0.
|
|
516
503
|
|
|
517
504
|
|
|
518
505
|
|
|
506
|
+
##### Returns
|
|
519
507
|
|
|
520
|
-
##### Parameters
|
|
521
508
|
|
|
522
|
-
|
|
523
|
-
| ---- | ---- | ----------- | -------- |
|
|
524
|
-
| obj | `Any` | Any object-type variable | |
|
|
509
|
+
- `string`
|
|
525
510
|
|
|
526
511
|
|
|
527
512
|
|
|
513
|
+
#### _statementToRange() *private method*
|
|
528
514
|
|
|
529
|
-
|
|
515
|
+
Convert verbal statement to range value
|
|
530
516
|
|
|
531
517
|
|
|
532
|
-
- `Number` the size of the given variable
|
|
533
518
|
|
|
534
519
|
|
|
535
520
|
|
|
536
521
|
|
|
537
|
-
|
|
522
|
+
##### Returns
|
|
538
523
|
|
|
539
524
|
|
|
540
|
-
|
|
525
|
+
- `AbsoluteRange`
|
|
541
526
|
|
|
542
|
-
Creates a random string
|
|
543
|
-
- If the first given argument is different than a length number, the variable is replaced by a default number
|
|
544
|
-
- If the optional second given argument is passed the random string is permutated.
|
|
545
527
|
|
|
546
528
|
|
|
529
|
+
#### _resolveAsThis() *private method*
|
|
547
530
|
|
|
531
|
+
Apply 'this' cursor logic to statement
|
|
548
532
|
|
|
549
|
-
##### Parameters
|
|
550
533
|
|
|
551
|
-
| Name | Type | Description | |
|
|
552
|
-
| ---- | ---- | ----------- | -------- |
|
|
553
|
-
| length | `Number` | size of the generated string. Default 8 | |
|
|
554
|
-
| exclude | `Array` | collection of strings that is going to be excluded of the random string. | |
|
|
555
534
|
|
|
556
535
|
|
|
557
536
|
|
|
@@ -559,49 +538,45 @@ Creates a random string
|
|
|
559
538
|
##### Returns
|
|
560
539
|
|
|
561
540
|
|
|
562
|
-
- `
|
|
541
|
+
- `AbsoluteStatement`
|
|
563
542
|
|
|
564
543
|
|
|
565
544
|
|
|
545
|
+
#### _resolveAsTheLast() *private method*
|
|
566
546
|
|
|
567
|
-
|
|
547
|
+
Apply 'the last' cursor logic to statement
|
|
568
548
|
|
|
569
549
|
|
|
570
|
-
#### cloneDeep(obj)
|
|
571
550
|
|
|
572
|
-
A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
|
|
573
|
-
Not to use this function with inner objects and functions
|
|
574
551
|
|
|
575
552
|
|
|
576
553
|
|
|
554
|
+
##### Returns
|
|
577
555
|
|
|
578
|
-
##### Parameters
|
|
579
556
|
|
|
580
|
-
|
|
581
|
-
| ---- | ---- | ----------- | -------- |
|
|
582
|
-
| obj | | The object | |
|
|
557
|
+
- `AbsoluteStatement`
|
|
583
558
|
|
|
584
559
|
|
|
585
560
|
|
|
561
|
+
#### _resolveAsTheNext() *private method*
|
|
586
562
|
|
|
587
|
-
|
|
563
|
+
Apply 'the next' cursor logic to statement
|
|
588
564
|
|
|
589
565
|
|
|
590
|
-
- The new reference object or the given object if the parsing is incorrect or empty
|
|
591
566
|
|
|
592
567
|
|
|
593
568
|
|
|
594
569
|
|
|
595
|
-
|
|
570
|
+
##### Returns
|
|
596
571
|
|
|
597
572
|
|
|
598
|
-
|
|
573
|
+
- `AbsoluteStatement`
|
|
599
574
|
|
|
600
|
-
Like lodash _.get.
|
|
601
|
-
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
602
575
|
|
|
603
|
-
|
|
604
|
-
|
|
576
|
+
|
|
577
|
+
#### replaceNowToken(value, now)
|
|
578
|
+
|
|
579
|
+
Replace '@now' token inside a string
|
|
605
580
|
|
|
606
581
|
|
|
607
582
|
|
|
@@ -610,59 +585,22 @@ Undefined and null values will return the defaultValue.
|
|
|
610
585
|
|
|
611
586
|
| Name | Type | Description | |
|
|
612
587
|
| ---- | ---- | ----------- | -------- |
|
|
613
|
-
|
|
|
614
|
-
|
|
|
615
|
-
| defaultValue | | The value returned for undefined resolved values. | |
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
588
|
+
| value | `string` | | |
|
|
589
|
+
| now | `Date` | | |
|
|
619
590
|
|
|
620
|
-
##### Examples
|
|
621
591
|
|
|
622
|
-
```javascript
|
|
623
|
-
// returns 'Hello'
|
|
624
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
625
|
-
```
|
|
626
|
-
```javascript
|
|
627
|
-
// returns 'A simple Hello'
|
|
628
|
-
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
629
|
-
```
|
|
630
|
-
```javascript
|
|
631
|
-
// returns 'Hello Again'
|
|
632
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
633
|
-
```
|
|
634
|
-
```javascript
|
|
635
|
-
// returns 'Hello 2'
|
|
636
|
-
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
637
|
-
```
|
|
638
|
-
```javascript
|
|
639
|
-
// returns 'Hello Again'
|
|
640
|
-
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
641
|
-
```
|
|
642
592
|
|
|
643
593
|
|
|
644
594
|
##### Returns
|
|
645
595
|
|
|
646
596
|
|
|
647
|
-
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
597
|
+
- `string`
|
|
651
598
|
|
|
652
|
-
### dist/general/object/getAttribute.js
|
|
653
599
|
|
|
654
600
|
|
|
655
|
-
####
|
|
601
|
+
#### convertRelativeToAbsolute(args)
|
|
656
602
|
|
|
657
|
-
|
|
658
|
-
- To optimize the searching, it is required a key in a snake_case style
|
|
659
|
-
- List of cases that do not match
|
|
660
|
-
-- From lower to snake case
|
|
661
|
-
-- From upper to snake case
|
|
662
|
-
-- From lower to camel case
|
|
663
|
-
-- From upper to camel case
|
|
664
|
-
-- From lower to pascal case
|
|
665
|
-
-- From upper to pascal case
|
|
603
|
+
Returns a range object (date) from a group of statement params
|
|
666
604
|
|
|
667
605
|
|
|
668
606
|
|
|
@@ -671,8 +609,7 @@ Searchs for properties in different case styles such as: lower, upper, camel and
|
|
|
671
609
|
|
|
672
610
|
| Name | Type | Description | |
|
|
673
611
|
| ---- | ---- | ----------- | -------- |
|
|
674
|
-
|
|
|
675
|
-
| key | `string` | String attribute in snake_case style | |
|
|
612
|
+
| args | `RelativeToAbsoluteStruct` | | |
|
|
676
613
|
|
|
677
614
|
|
|
678
615
|
|
|
@@ -680,24 +617,37 @@ Searchs for properties in different case styles such as: lower, upper, camel and
|
|
|
680
617
|
##### Examples
|
|
681
618
|
|
|
682
619
|
```javascript
|
|
683
|
-
|
|
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'
|
|
684
634
|
```
|
|
685
635
|
|
|
686
636
|
|
|
687
637
|
##### Returns
|
|
688
638
|
|
|
689
639
|
|
|
690
|
-
- `
|
|
640
|
+
- `string`
|
|
691
641
|
|
|
692
642
|
|
|
693
643
|
|
|
694
644
|
|
|
695
|
-
### dist/
|
|
645
|
+
### dist/dates/relative/relative.js
|
|
696
646
|
|
|
697
647
|
|
|
698
|
-
####
|
|
648
|
+
#### resolveRelative(statements, clock)
|
|
699
649
|
|
|
700
|
-
|
|
650
|
+
Resolve a list of relative statements according to operator
|
|
701
651
|
|
|
702
652
|
|
|
703
653
|
|
|
@@ -706,8 +656,8 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
|
|
|
706
656
|
|
|
707
657
|
| Name | Type | Description | |
|
|
708
658
|
| ---- | ---- | ----------- | -------- |
|
|
709
|
-
|
|
|
710
|
-
|
|
|
659
|
+
| statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | |
|
|
660
|
+
| clock | `Date` | - Clock/time reference for relative date resolution | |
|
|
711
661
|
|
|
712
662
|
|
|
713
663
|
|
|
@@ -715,29 +665,35 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
|
|
|
715
665
|
##### Examples
|
|
716
666
|
|
|
717
667
|
```javascript
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
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
|
+
}
|
|
721
677
|
|
|
722
|
-
|
|
723
|
-
|
|
678
|
+
Output:
|
|
679
|
+
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
724
680
|
```
|
|
725
681
|
|
|
726
682
|
|
|
727
683
|
##### Returns
|
|
728
684
|
|
|
729
685
|
|
|
730
|
-
-
|
|
686
|
+
- `Array.<AbsoluteRange>` `Array.<string>`
|
|
731
687
|
|
|
732
688
|
|
|
733
689
|
|
|
734
690
|
|
|
735
|
-
### dist/
|
|
691
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
736
692
|
|
|
737
693
|
|
|
738
|
-
####
|
|
694
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
739
695
|
|
|
740
|
-
|
|
696
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
741
697
|
|
|
742
698
|
|
|
743
699
|
|
|
@@ -746,7 +702,8 @@ Checks if the given argument is an object type
|
|
|
746
702
|
|
|
747
703
|
| Name | Type | Description | |
|
|
748
704
|
| ---- | ---- | ----------- | -------- |
|
|
749
|
-
|
|
|
705
|
+
| filterData | | The filter data object. | |
|
|
706
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
750
707
|
|
|
751
708
|
|
|
752
709
|
|
|
@@ -754,18 +711,13 @@ Checks if the given argument is an object type
|
|
|
754
711
|
##### Returns
|
|
755
712
|
|
|
756
713
|
|
|
757
|
-
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
714
|
+
- a flattened UI filters array
|
|
761
715
|
|
|
762
|
-
### dist/general/object/mapValues.js
|
|
763
716
|
|
|
764
717
|
|
|
765
|
-
####
|
|
718
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
766
719
|
|
|
767
|
-
|
|
768
|
-
and return a mapped object
|
|
720
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
769
721
|
|
|
770
722
|
|
|
771
723
|
|
|
@@ -774,8 +726,8 @@ and return a mapped object
|
|
|
774
726
|
|
|
775
727
|
| Name | Type | Description | |
|
|
776
728
|
| ---- | ---- | ----------- | -------- |
|
|
777
|
-
|
|
|
778
|
-
|
|
|
729
|
+
| scopes | | The filter scope section | |
|
|
730
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
779
731
|
|
|
780
732
|
|
|
781
733
|
|
|
@@ -783,18 +735,17 @@ and return a mapped object
|
|
|
783
735
|
##### Returns
|
|
784
736
|
|
|
785
737
|
|
|
786
|
-
-
|
|
738
|
+
- a flattened UI filters array
|
|
787
739
|
|
|
788
740
|
|
|
789
741
|
|
|
790
742
|
|
|
791
|
-
### dist/
|
|
743
|
+
### dist/filters/adapters/FDToLogic.js
|
|
792
744
|
|
|
793
745
|
|
|
794
|
-
####
|
|
746
|
+
#### FDToLogic(filterData)
|
|
795
747
|
|
|
796
|
-
|
|
797
|
-
The second given argument to the first given argument.
|
|
748
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
798
749
|
|
|
799
750
|
|
|
800
751
|
|
|
@@ -803,9 +754,7 @@ The second given argument to the first given argument.
|
|
|
803
754
|
|
|
804
755
|
| Name | Type | Description | |
|
|
805
756
|
| ---- | ---- | ----------- | -------- |
|
|
806
|
-
|
|
|
807
|
-
| obj2 | | The object to be merged | |
|
|
808
|
-
| settings | | Object settings for this function | |
|
|
757
|
+
| filterData | | The filter data object. | |
|
|
809
758
|
|
|
810
759
|
|
|
811
760
|
|
|
@@ -813,13 +762,13 @@ The second given argument to the first given argument.
|
|
|
813
762
|
##### Returns
|
|
814
763
|
|
|
815
764
|
|
|
816
|
-
- a
|
|
765
|
+
- a filter logic array
|
|
817
766
|
|
|
818
767
|
|
|
819
768
|
|
|
820
|
-
####
|
|
769
|
+
#### getLogicBodyFromFD21(filterData)
|
|
821
770
|
|
|
822
|
-
|
|
771
|
+
Gets the logic body
|
|
823
772
|
|
|
824
773
|
|
|
825
774
|
|
|
@@ -828,8 +777,7 @@ Validates if the two arguments are objects
|
|
|
828
777
|
|
|
829
778
|
| Name | Type | Description | |
|
|
830
779
|
| ---- | ---- | ----------- | -------- |
|
|
831
|
-
|
|
|
832
|
-
| obj2 | | The object to be merged | |
|
|
780
|
+
| filterData | | The filter data object | |
|
|
833
781
|
|
|
834
782
|
|
|
835
783
|
|
|
@@ -837,13 +785,17 @@ Validates if the two arguments are objects
|
|
|
837
785
|
##### Returns
|
|
838
786
|
|
|
839
787
|
|
|
840
|
-
-
|
|
788
|
+
- a filter logic array
|
|
841
789
|
|
|
842
790
|
|
|
843
791
|
|
|
844
|
-
#### getParamsToMergeDeep(settings)
|
|
845
792
|
|
|
846
|
-
|
|
793
|
+
### dist/filters/adapters/FDToUI.js
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
#### FDToUI(filterData, datasetsInfo)
|
|
797
|
+
|
|
798
|
+
Generates a UI filter structure from Filter Data structure.
|
|
847
799
|
|
|
848
800
|
|
|
849
801
|
|
|
@@ -852,7 +804,8 @@ Validates and gets the settings with all set parameters.
|
|
|
852
804
|
|
|
853
805
|
| Name | Type | Description | |
|
|
854
806
|
| ---- | ---- | ----------- | -------- |
|
|
855
|
-
|
|
|
807
|
+
| filterData | | The filter data object. | |
|
|
808
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
856
809
|
|
|
857
810
|
|
|
858
811
|
|
|
@@ -860,17 +813,13 @@ Validates and gets the settings with all set parameters.
|
|
|
860
813
|
##### Returns
|
|
861
814
|
|
|
862
815
|
|
|
863
|
-
- a
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
816
|
+
- a UI Filters structure
|
|
867
817
|
|
|
868
|
-
### dist/general/object/objectCopy.js
|
|
869
818
|
|
|
870
819
|
|
|
871
|
-
####
|
|
820
|
+
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
872
821
|
|
|
873
|
-
|
|
822
|
+
Generates a UI filter Structure from the Filter Data structure v2.1
|
|
874
823
|
|
|
875
824
|
|
|
876
825
|
|
|
@@ -879,8 +828,10 @@ Created a new reference of the given argument
|
|
|
879
828
|
|
|
880
829
|
| Name | Type | Description | |
|
|
881
830
|
| ---- | ---- | ----------- | -------- |
|
|
882
|
-
|
|
|
883
|
-
|
|
|
831
|
+
| scopes | | The filter scope section | |
|
|
832
|
+
| section | | The filter section. | |
|
|
833
|
+
| version | | The version of the filter structure | |
|
|
834
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
884
835
|
|
|
885
836
|
|
|
886
837
|
|
|
@@ -888,17 +839,17 @@ Created a new reference of the given argument
|
|
|
888
839
|
##### Returns
|
|
889
840
|
|
|
890
841
|
|
|
891
|
-
-
|
|
842
|
+
- a UI filter Structure
|
|
892
843
|
|
|
893
844
|
|
|
894
845
|
|
|
895
846
|
|
|
896
|
-
### dist/
|
|
847
|
+
### dist/filters/adapters/UIToFD.js
|
|
897
848
|
|
|
898
849
|
|
|
899
|
-
####
|
|
850
|
+
#### UIToFD(filterData)
|
|
900
851
|
|
|
901
|
-
|
|
852
|
+
Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
902
853
|
|
|
903
854
|
|
|
904
855
|
|
|
@@ -907,8 +858,7 @@ return a new Object excluding attributes in _props_ list
|
|
|
907
858
|
|
|
908
859
|
| Name | Type | Description | |
|
|
909
860
|
| ---- | ---- | ----------- | -------- |
|
|
910
|
-
|
|
|
911
|
-
| props | `Array.<String>` | list of attribute to exclude | |
|
|
861
|
+
| filterData | | The UI filter data object. | |
|
|
912
862
|
|
|
913
863
|
|
|
914
864
|
|
|
@@ -916,17 +866,13 @@ return a new Object excluding attributes in _props_ list
|
|
|
916
866
|
##### Returns
|
|
917
867
|
|
|
918
868
|
|
|
919
|
-
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
869
|
+
- a Filter Data structure
|
|
923
870
|
|
|
924
|
-
### dist/general/object/pick.js
|
|
925
871
|
|
|
926
872
|
|
|
927
|
-
####
|
|
873
|
+
#### UI21ToFD(uFilterData, version)
|
|
928
874
|
|
|
929
|
-
|
|
875
|
+
Builds the Fitler Data structure from UI filter data
|
|
930
876
|
|
|
931
877
|
|
|
932
878
|
|
|
@@ -935,8 +881,8 @@ return a new object just with attributes in _keys_ list
|
|
|
935
881
|
|
|
936
882
|
| Name | Type | Description | |
|
|
937
883
|
| ---- | ---- | ----------- | -------- |
|
|
938
|
-
|
|
|
939
|
-
|
|
|
884
|
+
| uFilterData | | The UI filter Data object | |
|
|
885
|
+
| version | | the version of the structure | |
|
|
940
886
|
|
|
941
887
|
|
|
942
888
|
|
|
@@ -944,17 +890,17 @@ return a new object just with attributes in _keys_ list
|
|
|
944
890
|
##### Returns
|
|
945
891
|
|
|
946
892
|
|
|
947
|
-
-
|
|
893
|
+
-
|
|
948
894
|
|
|
949
895
|
|
|
950
896
|
|
|
951
897
|
|
|
952
|
-
### dist/
|
|
898
|
+
### dist/filters/adapters/UIToFlatUI.js
|
|
953
899
|
|
|
954
900
|
|
|
955
|
-
####
|
|
901
|
+
#### UIToFlatUI(filterData, datasetsInfo)
|
|
956
902
|
|
|
957
|
-
|
|
903
|
+
Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
958
904
|
|
|
959
905
|
|
|
960
906
|
|
|
@@ -963,7 +909,8 @@ serialize object to url param
|
|
|
963
909
|
|
|
964
910
|
| Name | Type | Description | |
|
|
965
911
|
| ---- | ---- | ----------- | -------- |
|
|
966
|
-
|
|
|
912
|
+
| filterData | | The UI filter data object. | |
|
|
913
|
+
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
967
914
|
|
|
968
915
|
|
|
969
916
|
|
|
@@ -971,17 +918,13 @@ serialize object to url param
|
|
|
971
918
|
##### Returns
|
|
972
919
|
|
|
973
920
|
|
|
974
|
-
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
921
|
+
- a flattened UI filters array
|
|
978
922
|
|
|
979
|
-
### dist/general/string/capitalize.js
|
|
980
923
|
|
|
981
924
|
|
|
982
|
-
####
|
|
925
|
+
#### UI21ToFlatUI(scopes)
|
|
983
926
|
|
|
984
|
-
|
|
927
|
+
Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
985
928
|
|
|
986
929
|
|
|
987
930
|
|
|
@@ -990,7 +933,7 @@ Upper case the first letter of a given text
|
|
|
990
933
|
|
|
991
934
|
| Name | Type | Description | |
|
|
992
935
|
| ---- | ---- | ----------- | -------- |
|
|
993
|
-
|
|
|
936
|
+
| scopes | | The filter scope section | |
|
|
994
937
|
|
|
995
938
|
|
|
996
939
|
|
|
@@ -998,17 +941,18 @@ Upper case the first letter of a given text
|
|
|
998
941
|
##### Returns
|
|
999
942
|
|
|
1000
943
|
|
|
1001
|
-
-
|
|
944
|
+
- a flattened UI filters array
|
|
1002
945
|
|
|
1003
946
|
|
|
1004
947
|
|
|
1005
948
|
|
|
1006
|
-
### dist/
|
|
949
|
+
### dist/filters/adapters/adaptDateGroupingProperty.js
|
|
1007
950
|
|
|
1008
951
|
|
|
1009
|
-
####
|
|
952
|
+
#### adaptDateGroupingProperty(property)
|
|
1010
953
|
|
|
1011
|
-
|
|
954
|
+
[TODO: For 2022, eliminate this adapter]
|
|
955
|
+
Get the new property base on the old date grouping properties
|
|
1012
956
|
|
|
1013
957
|
|
|
1014
958
|
|
|
@@ -1017,8 +961,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
1017
961
|
|
|
1018
962
|
| Name | Type | Description | |
|
|
1019
963
|
| ---- | ---- | ----------- | -------- |
|
|
1020
|
-
|
|
|
1021
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
964
|
+
| property | | | |
|
|
1022
965
|
|
|
1023
966
|
|
|
1024
967
|
|
|
@@ -1026,17 +969,17 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
1026
969
|
##### Returns
|
|
1027
970
|
|
|
1028
971
|
|
|
1029
|
-
-
|
|
972
|
+
-
|
|
1030
973
|
|
|
1031
974
|
|
|
1032
975
|
|
|
1033
976
|
|
|
1034
|
-
### dist/
|
|
977
|
+
### dist/filters/adapters/adaptFilterData.js
|
|
1035
978
|
|
|
1036
979
|
|
|
1037
|
-
####
|
|
980
|
+
#### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
|
|
1038
981
|
|
|
1039
|
-
|
|
982
|
+
Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
1040
983
|
|
|
1041
984
|
|
|
1042
985
|
|
|
@@ -1045,8 +988,9 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
1045
988
|
|
|
1046
989
|
| Name | Type | Description | |
|
|
1047
990
|
| ---- | ---- | ----------- | -------- |
|
|
1048
|
-
|
|
|
1049
|
-
|
|
|
991
|
+
| filterData | | The filter data structure. Accepts both v2.1 or v2.0 | |
|
|
992
|
+
| getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | |
|
|
993
|
+
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
1050
994
|
|
|
1051
995
|
|
|
1052
996
|
|
|
@@ -1054,17 +998,18 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
1054
998
|
##### Returns
|
|
1055
999
|
|
|
1056
1000
|
|
|
1057
|
-
-
|
|
1001
|
+
- A new filter data structure v2.1
|
|
1058
1002
|
|
|
1059
1003
|
|
|
1060
1004
|
|
|
1061
1005
|
|
|
1062
|
-
### dist/
|
|
1006
|
+
### dist/filters/adapters/adaptFilterValues.js
|
|
1063
1007
|
|
|
1064
1008
|
|
|
1065
|
-
####
|
|
1009
|
+
#### adaptFilterValues(filter)
|
|
1066
1010
|
|
|
1067
|
-
|
|
1011
|
+
[TODO: For 2022, eliminate this adapter]
|
|
1012
|
+
Gets an adapted filter value array. Validates the enabled property and sets
|
|
1068
1013
|
|
|
1069
1014
|
|
|
1070
1015
|
|
|
@@ -1073,8 +1018,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
1073
1018
|
|
|
1074
1019
|
| Name | Type | Description | |
|
|
1075
1020
|
| ---- | ---- | ----------- | -------- |
|
|
1076
|
-
|
|
|
1077
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1021
|
+
| filter | | The filter | |
|
|
1078
1022
|
|
|
1079
1023
|
|
|
1080
1024
|
|
|
@@ -1082,17 +1026,17 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
1082
1026
|
##### Returns
|
|
1083
1027
|
|
|
1084
1028
|
|
|
1085
|
-
-
|
|
1029
|
+
- A new value array with the filled properties.
|
|
1086
1030
|
|
|
1087
1031
|
|
|
1088
1032
|
|
|
1089
1033
|
|
|
1090
|
-
### dist/
|
|
1034
|
+
### dist/filters/adapters/flatUIToFD.js
|
|
1091
1035
|
|
|
1092
1036
|
|
|
1093
|
-
####
|
|
1037
|
+
#### flatUIToFD(uFilters, version)
|
|
1094
1038
|
|
|
1095
|
-
|
|
1039
|
+
Generates a filter data structure from the flatttened UI filters.
|
|
1096
1040
|
|
|
1097
1041
|
|
|
1098
1042
|
|
|
@@ -1101,8 +1045,8 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
1101
1045
|
|
|
1102
1046
|
| Name | Type | Description | |
|
|
1103
1047
|
| ---- | ---- | ----------- | -------- |
|
|
1104
|
-
|
|
|
1105
|
-
|
|
|
1048
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1049
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1106
1050
|
|
|
1107
1051
|
|
|
1108
1052
|
|
|
@@ -1110,17 +1054,14 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
1110
1054
|
##### Returns
|
|
1111
1055
|
|
|
1112
1056
|
|
|
1113
|
-
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1057
|
+
- a Filter Data.
|
|
1117
1058
|
|
|
1118
|
-
### dist/dates/adapters/yearToDate.js
|
|
1119
1059
|
|
|
1120
1060
|
|
|
1121
|
-
####
|
|
1061
|
+
#### buildScopes(fbFilters)
|
|
1122
1062
|
|
|
1123
|
-
|
|
1063
|
+
Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
|
|
1064
|
+
Also, adds and organizes filters by datasets
|
|
1124
1065
|
|
|
1125
1066
|
|
|
1126
1067
|
|
|
@@ -1129,8 +1070,7 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
1129
1070
|
|
|
1130
1071
|
| Name | Type | Description | |
|
|
1131
1072
|
| ---- | ---- | ----------- | -------- |
|
|
1132
|
-
|
|
|
1133
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1073
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1134
1074
|
|
|
1135
1075
|
|
|
1136
1076
|
|
|
@@ -1138,17 +1078,13 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
1138
1078
|
##### Returns
|
|
1139
1079
|
|
|
1140
1080
|
|
|
1141
|
-
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1081
|
+
- an array of scopes structure.
|
|
1145
1082
|
|
|
1146
|
-
### dist/dates/helpers/getDateByDateFormat.js
|
|
1147
1083
|
|
|
1148
1084
|
|
|
1149
|
-
####
|
|
1085
|
+
#### buildScope(uFilter)
|
|
1150
1086
|
|
|
1151
|
-
Gets
|
|
1087
|
+
Gets an scope structure for the filter data
|
|
1152
1088
|
|
|
1153
1089
|
|
|
1154
1090
|
|
|
@@ -1157,9 +1093,7 @@ Gets a Date Object instance by a Date format
|
|
|
1157
1093
|
|
|
1158
1094
|
| Name | Type | Description | |
|
|
1159
1095
|
| ---- | ---- | ----------- | -------- |
|
|
1160
|
-
|
|
|
1161
|
-
| format | | The date format | |
|
|
1162
|
-
| time | | flag to convert the formatted date to miliseconds | |
|
|
1096
|
+
| uFilter | | UI structure filter | |
|
|
1163
1097
|
|
|
1164
1098
|
|
|
1165
1099
|
|
|
@@ -1167,17 +1101,13 @@ Gets a Date Object instance by a Date format
|
|
|
1167
1101
|
##### Returns
|
|
1168
1102
|
|
|
1169
1103
|
|
|
1170
|
-
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1104
|
+
- an scope structure
|
|
1174
1105
|
|
|
1175
|
-
### dist/dates/helpers/getDateFormatByProperty.js
|
|
1176
1106
|
|
|
1177
1107
|
|
|
1178
|
-
####
|
|
1108
|
+
#### buildDataset(uFilter)
|
|
1179
1109
|
|
|
1180
|
-
Gets
|
|
1110
|
+
Gets an dataset structure for the filter data
|
|
1181
1111
|
|
|
1182
1112
|
|
|
1183
1113
|
|
|
@@ -1186,7 +1116,7 @@ Gets the date format by the given property
|
|
|
1186
1116
|
|
|
1187
1117
|
| Name | Type | Description | |
|
|
1188
1118
|
| ---- | ---- | ----------- | -------- |
|
|
1189
|
-
|
|
|
1119
|
+
| uFilter | | a UI structure filter | |
|
|
1190
1120
|
|
|
1191
1121
|
|
|
1192
1122
|
|
|
@@ -1194,17 +1124,13 @@ Gets the date format by the given property
|
|
|
1194
1124
|
##### Returns
|
|
1195
1125
|
|
|
1196
1126
|
|
|
1197
|
-
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1127
|
+
- an dataset structure
|
|
1201
1128
|
|
|
1202
|
-
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
1203
1129
|
|
|
1204
1130
|
|
|
1205
|
-
####
|
|
1131
|
+
#### buildFilter(uFilter)
|
|
1206
1132
|
|
|
1207
|
-
Gets an
|
|
1133
|
+
Gets an filter structure for the filter data
|
|
1208
1134
|
|
|
1209
1135
|
|
|
1210
1136
|
|
|
@@ -1213,7 +1139,7 @@ Gets an array of regular expressions by the given date format
|
|
|
1213
1139
|
|
|
1214
1140
|
| Name | Type | Description | |
|
|
1215
1141
|
| ---- | ---- | ----------- | -------- |
|
|
1216
|
-
|
|
|
1142
|
+
| uFilter | | a UI structure filter | |
|
|
1217
1143
|
|
|
1218
1144
|
|
|
1219
1145
|
|
|
@@ -1221,17 +1147,17 @@ Gets an array of regular expressions by the given date format
|
|
|
1221
1147
|
##### Returns
|
|
1222
1148
|
|
|
1223
1149
|
|
|
1224
|
-
- an
|
|
1150
|
+
- an filter structure
|
|
1225
1151
|
|
|
1226
1152
|
|
|
1227
1153
|
|
|
1228
1154
|
|
|
1229
|
-
### dist/
|
|
1155
|
+
### dist/filters/adapters/flatUIToLogic.js
|
|
1230
1156
|
|
|
1231
1157
|
|
|
1232
|
-
####
|
|
1158
|
+
#### flatUIToLogic(uFilter)
|
|
1233
1159
|
|
|
1234
|
-
|
|
1160
|
+
Generates a Logic structure from flattened UI filters
|
|
1235
1161
|
|
|
1236
1162
|
|
|
1237
1163
|
|
|
@@ -1240,7 +1166,7 @@ Gets the separator of the date format
|
|
|
1240
1166
|
|
|
1241
1167
|
| Name | Type | Description | |
|
|
1242
1168
|
| ---- | ---- | ----------- | -------- |
|
|
1243
|
-
|
|
|
1169
|
+
| uFilter | | Array of flat filters from UI | |
|
|
1244
1170
|
|
|
1245
1171
|
|
|
1246
1172
|
|
|
@@ -1248,18 +1174,17 @@ Gets the separator of the date format
|
|
|
1248
1174
|
##### Returns
|
|
1249
1175
|
|
|
1250
1176
|
|
|
1251
|
-
-
|
|
1177
|
+
- The logic structure
|
|
1252
1178
|
|
|
1253
1179
|
|
|
1254
1180
|
|
|
1255
1181
|
|
|
1256
|
-
### dist/
|
|
1182
|
+
### dist/filters/adapters/flatUIToOldLogic.js
|
|
1257
1183
|
|
|
1258
1184
|
|
|
1259
|
-
####
|
|
1185
|
+
#### flatUIToOldLogic(uFilters)
|
|
1260
1186
|
|
|
1261
|
-
|
|
1262
|
-
Additionally, the month and the year
|
|
1187
|
+
Generates a Logic structure from flattened UI filters
|
|
1263
1188
|
|
|
1264
1189
|
|
|
1265
1190
|
|
|
@@ -1268,7 +1193,7 @@ Additionally, the month and the year
|
|
|
1268
1193
|
|
|
1269
1194
|
| Name | Type | Description | |
|
|
1270
1195
|
| ---- | ---- | ----------- | -------- |
|
|
1271
|
-
|
|
|
1196
|
+
| uFilters | | Array of flat filters from UI | |
|
|
1272
1197
|
|
|
1273
1198
|
|
|
1274
1199
|
|
|
@@ -1276,20 +1201,17 @@ Additionally, the month and the year
|
|
|
1276
1201
|
##### Returns
|
|
1277
1202
|
|
|
1278
1203
|
|
|
1279
|
-
-
|
|
1204
|
+
- The logic structure
|
|
1280
1205
|
|
|
1281
1206
|
|
|
1282
1207
|
|
|
1283
1208
|
|
|
1284
|
-
### dist/
|
|
1209
|
+
### dist/filters/adapters/flatUIToUI.js
|
|
1285
1210
|
|
|
1286
1211
|
|
|
1287
|
-
####
|
|
1212
|
+
#### flatUIToUI(uFilters, version)
|
|
1288
1213
|
|
|
1289
|
-
|
|
1290
|
-
- If the string is a token label, the function lets it pass.
|
|
1291
|
-
- Otherwise depends of the format
|
|
1292
|
-
- Some escenarios the string is a mix of token labels and dates
|
|
1214
|
+
Generates a UI filter data structure from the flatttened UI filters.
|
|
1293
1215
|
|
|
1294
1216
|
|
|
1295
1217
|
|
|
@@ -1298,8 +1220,8 @@ Validate a string date depending on giving format
|
|
|
1298
1220
|
|
|
1299
1221
|
| Name | Type | Description | |
|
|
1300
1222
|
| ---- | ---- | ----------- | -------- |
|
|
1301
|
-
|
|
|
1302
|
-
|
|
|
1223
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1224
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1303
1225
|
|
|
1304
1226
|
|
|
1305
1227
|
|
|
@@ -1307,17 +1229,14 @@ Validate a string date depending on giving format
|
|
|
1307
1229
|
##### Returns
|
|
1308
1230
|
|
|
1309
1231
|
|
|
1310
|
-
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1232
|
+
- a UI Filter Data.
|
|
1314
1233
|
|
|
1315
|
-
### dist/dates/helpers/validateDateByDateFormat.js
|
|
1316
1234
|
|
|
1317
1235
|
|
|
1318
|
-
####
|
|
1236
|
+
#### buildScopes(fbFilters)
|
|
1319
1237
|
|
|
1320
|
-
|
|
1238
|
+
Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
|
|
1239
|
+
Also, adds and organizes filters by datasets
|
|
1321
1240
|
|
|
1322
1241
|
|
|
1323
1242
|
|
|
@@ -1326,8 +1245,7 @@ Validates the given string as Date by its date format.
|
|
|
1326
1245
|
|
|
1327
1246
|
| Name | Type | Description | |
|
|
1328
1247
|
| ---- | ---- | ----------- | -------- |
|
|
1329
|
-
|
|
|
1330
|
-
| dateForma | | the format of the date to validate the string | |
|
|
1248
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1331
1249
|
|
|
1332
1250
|
|
|
1333
1251
|
|
|
@@ -1335,19 +1253,22 @@ Validates the given string as Date by its date format.
|
|
|
1335
1253
|
##### Returns
|
|
1336
1254
|
|
|
1337
1255
|
|
|
1338
|
-
-
|
|
1256
|
+
- an array of scopes structure.
|
|
1339
1257
|
|
|
1340
1258
|
|
|
1341
1259
|
|
|
1260
|
+
#### buildScope(uFilter)
|
|
1342
1261
|
|
|
1343
|
-
|
|
1262
|
+
Gets an scope structure for the UI filter data
|
|
1344
1263
|
|
|
1345
1264
|
|
|
1346
|
-
#### value()
|
|
1347
1265
|
|
|
1348
|
-
Resolves statement and returns statement value
|
|
1349
1266
|
|
|
1267
|
+
##### Parameters
|
|
1350
1268
|
|
|
1269
|
+
| Name | Type | Description | |
|
|
1270
|
+
| ---- | ---- | ----------- | -------- |
|
|
1271
|
+
| uFilter | | UI structure filter | |
|
|
1351
1272
|
|
|
1352
1273
|
|
|
1353
1274
|
|
|
@@ -1355,15 +1276,22 @@ Resolves statement and returns statement value
|
|
|
1355
1276
|
##### Returns
|
|
1356
1277
|
|
|
1357
1278
|
|
|
1358
|
-
-
|
|
1279
|
+
- an scope structure
|
|
1359
1280
|
|
|
1360
1281
|
|
|
1361
1282
|
|
|
1362
|
-
####
|
|
1283
|
+
#### buildDataset(uFilter)
|
|
1284
|
+
|
|
1285
|
+
Gets an dataset structure for the UI filter data
|
|
1286
|
+
|
|
1287
|
+
|
|
1363
1288
|
|
|
1364
|
-
Resolves statement as an anchor
|
|
1365
1289
|
|
|
1290
|
+
##### Parameters
|
|
1366
1291
|
|
|
1292
|
+
| Name | Type | Description | |
|
|
1293
|
+
| ---- | ---- | ----------- | -------- |
|
|
1294
|
+
| uFilter | | a UI structure filter | |
|
|
1367
1295
|
|
|
1368
1296
|
|
|
1369
1297
|
|
|
@@ -1371,15 +1299,22 @@ Resolves statement as an anchor
|
|
|
1371
1299
|
##### Returns
|
|
1372
1300
|
|
|
1373
1301
|
|
|
1374
|
-
-
|
|
1302
|
+
- an dataset structure
|
|
1375
1303
|
|
|
1376
1304
|
|
|
1377
1305
|
|
|
1378
|
-
####
|
|
1306
|
+
#### buildFilter(uFilter)
|
|
1307
|
+
|
|
1308
|
+
Gets an filter structure for the UI filter data
|
|
1309
|
+
|
|
1379
1310
|
|
|
1380
|
-
Convert verbal statement to range value
|
|
1381
1311
|
|
|
1382
1312
|
|
|
1313
|
+
##### Parameters
|
|
1314
|
+
|
|
1315
|
+
| Name | Type | Description | |
|
|
1316
|
+
| ---- | ---- | ----------- | -------- |
|
|
1317
|
+
| uFilter | | a UI structure filter | |
|
|
1383
1318
|
|
|
1384
1319
|
|
|
1385
1320
|
|
|
@@ -1387,47 +1322,54 @@ Convert verbal statement to range value
|
|
|
1387
1322
|
##### Returns
|
|
1388
1323
|
|
|
1389
1324
|
|
|
1390
|
-
-
|
|
1325
|
+
- an filter structure
|
|
1391
1326
|
|
|
1392
1327
|
|
|
1393
1328
|
|
|
1394
|
-
#### _resolveAsThis() *private method*
|
|
1395
1329
|
|
|
1396
|
-
|
|
1330
|
+
### dist/filters/adapters/logicToFD.js
|
|
1397
1331
|
|
|
1398
1332
|
|
|
1333
|
+
#### logicToFD(filterData, version)
|
|
1399
1334
|
|
|
1335
|
+
Generates a filter data structure from the old logic structure (v2.0).
|
|
1400
1336
|
|
|
1401
1337
|
|
|
1402
1338
|
|
|
1403
|
-
##### Returns
|
|
1404
1339
|
|
|
1340
|
+
##### Parameters
|
|
1405
1341
|
|
|
1406
|
-
|
|
1342
|
+
| Name | Type | Description | |
|
|
1343
|
+
| ---- | ---- | ----------- | -------- |
|
|
1344
|
+
| filterData | | The old filter data structure with logic (v2.0) | |
|
|
1345
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1407
1346
|
|
|
1408
1347
|
|
|
1409
1348
|
|
|
1410
|
-
#### _resolveAsTheLast() *private method*
|
|
1411
1349
|
|
|
1412
|
-
|
|
1350
|
+
##### Returns
|
|
1413
1351
|
|
|
1414
1352
|
|
|
1353
|
+
- a Filter Data.
|
|
1415
1354
|
|
|
1416
1355
|
|
|
1417
1356
|
|
|
1418
1357
|
|
|
1419
|
-
|
|
1358
|
+
### dist/filters/adapters/logicToFlatUI.js
|
|
1420
1359
|
|
|
1421
1360
|
|
|
1422
|
-
|
|
1361
|
+
#### logicToFlatUI(logics)
|
|
1423
1362
|
|
|
1363
|
+
Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
1424
1364
|
|
|
1425
1365
|
|
|
1426
|
-
#### _resolveAsTheNext() *private method*
|
|
1427
1366
|
|
|
1428
|
-
Apply 'the next' cursor logic to statement
|
|
1429
1367
|
|
|
1368
|
+
##### Parameters
|
|
1430
1369
|
|
|
1370
|
+
| Name | Type | Description | |
|
|
1371
|
+
| ---- | ---- | ----------- | -------- |
|
|
1372
|
+
| logics | | The old logic structure (v2.0) | |
|
|
1431
1373
|
|
|
1432
1374
|
|
|
1433
1375
|
|
|
@@ -1435,13 +1377,13 @@ Apply 'the next' cursor logic to statement
|
|
|
1435
1377
|
##### Returns
|
|
1436
1378
|
|
|
1437
1379
|
|
|
1438
|
-
-
|
|
1380
|
+
- The Flattened UI Filters array
|
|
1439
1381
|
|
|
1440
1382
|
|
|
1441
1383
|
|
|
1442
|
-
####
|
|
1384
|
+
#### getFilter(filters, filter, getIndex)
|
|
1443
1385
|
|
|
1444
|
-
|
|
1386
|
+
Get the filter or the index of the given array, validating an old filter structure.
|
|
1445
1387
|
|
|
1446
1388
|
|
|
1447
1389
|
|
|
@@ -1450,8 +1392,9 @@ Replace '@now' token inside a string
|
|
|
1450
1392
|
|
|
1451
1393
|
| Name | Type | Description | |
|
|
1452
1394
|
| ---- | ---- | ----------- | -------- |
|
|
1453
|
-
|
|
|
1454
|
-
|
|
|
1395
|
+
| filters | | The array of UI filters | |
|
|
1396
|
+
| filter | | The old logic structure filter | |
|
|
1397
|
+
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
1455
1398
|
|
|
1456
1399
|
|
|
1457
1400
|
|
|
@@ -1459,13 +1402,13 @@ Replace '@now' token inside a string
|
|
|
1459
1402
|
##### Returns
|
|
1460
1403
|
|
|
1461
1404
|
|
|
1462
|
-
-
|
|
1405
|
+
- the index or the UI filter object
|
|
1463
1406
|
|
|
1464
1407
|
|
|
1465
1408
|
|
|
1466
|
-
####
|
|
1409
|
+
#### refineRankingValues(values, uiValues)
|
|
1467
1410
|
|
|
1468
|
-
|
|
1411
|
+
Refines the values of the Ranking column type.
|
|
1469
1412
|
|
|
1470
1413
|
|
|
1471
1414
|
|
|
@@ -1474,45 +1417,26 @@ Returns a range object (date) from a group of statement params
|
|
|
1474
1417
|
|
|
1475
1418
|
| Name | Type | Description | |
|
|
1476
1419
|
| ---- | ---- | ----------- | -------- |
|
|
1477
|
-
|
|
|
1420
|
+
| values | | the Array of Ranking values | |
|
|
1421
|
+
| uiValues | | Object with additional info about the values of the filter. | |
|
|
1478
1422
|
|
|
1479
1423
|
|
|
1480
1424
|
|
|
1481
1425
|
|
|
1482
|
-
#####
|
|
1426
|
+
##### Returns
|
|
1483
1427
|
|
|
1484
|
-
```javascript
|
|
1485
|
-
pivot = '2021-03-03T12:30:40'
|
|
1486
|
-
unit = month
|
|
1487
|
-
steps = 2
|
|
1488
|
-
setTo = END
|
|
1489
|
-
resolverAsCalendar: true
|
|
1490
|
-
=> Returns '2021-05-31T23:59:59'
|
|
1491
|
-
```
|
|
1492
|
-
```javascript
|
|
1493
|
-
pivot = '2021-03-03T12:30:40'
|
|
1494
|
-
unit = month
|
|
1495
|
-
steps = -2
|
|
1496
|
-
setTo = START
|
|
1497
|
-
resolverAsCalendar: false
|
|
1498
|
-
=> Returns '2021-01-03T00:00:00'
|
|
1499
|
-
```
|
|
1500
1428
|
|
|
1501
|
-
|
|
1502
|
-
##### Returns
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
- `string`
|
|
1429
|
+
- the array of Ranking values
|
|
1506
1430
|
|
|
1507
1431
|
|
|
1508
1432
|
|
|
1509
1433
|
|
|
1510
|
-
### dist/
|
|
1434
|
+
### dist/filters/adapters/logicToUI.js
|
|
1511
1435
|
|
|
1512
1436
|
|
|
1513
|
-
####
|
|
1437
|
+
#### logicToUI(uFilters, datasetsInfo)
|
|
1514
1438
|
|
|
1515
|
-
|
|
1439
|
+
Generates a UI filter structure from the old logic structure (v2.0).
|
|
1516
1440
|
|
|
1517
1441
|
|
|
1518
1442
|
|
|
@@ -1521,44 +1445,26 @@ Resolve a list of relative statements according to operator
|
|
|
1521
1445
|
|
|
1522
1446
|
| Name | Type | Description | |
|
|
1523
1447
|
| ---- | ---- | ----------- | -------- |
|
|
1524
|
-
|
|
|
1525
|
-
|
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
##### Examples
|
|
1448
|
+
| uFilters | | Array of filters from old logic structure | |
|
|
1449
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1531
1450
|
|
|
1532
|
-
```javascript
|
|
1533
|
-
Input:
|
|
1534
|
-
{
|
|
1535
|
-
"cursor": "the_next",
|
|
1536
|
-
"unit": "year",
|
|
1537
|
-
"number": 1,
|
|
1538
|
-
"includeCurrent": false,
|
|
1539
|
-
"isCalendarDate": false,
|
|
1540
|
-
"anchor": "03/05/2021"
|
|
1541
|
-
}
|
|
1542
1451
|
|
|
1543
|
-
Output:
|
|
1544
|
-
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
1545
|
-
```
|
|
1546
1452
|
|
|
1547
1453
|
|
|
1548
1454
|
##### Returns
|
|
1549
1455
|
|
|
1550
1456
|
|
|
1551
|
-
-
|
|
1457
|
+
- a UI Filter Data.
|
|
1552
1458
|
|
|
1553
1459
|
|
|
1554
1460
|
|
|
1555
1461
|
|
|
1556
|
-
### dist/
|
|
1462
|
+
### dist/filters/adapters/transformFilters.js
|
|
1557
1463
|
|
|
1558
1464
|
|
|
1559
|
-
####
|
|
1465
|
+
#### transformFilters(oldFiltersObj, section)
|
|
1560
1466
|
|
|
1561
|
-
|
|
1467
|
+
Transform the old filters structure into the new one
|
|
1562
1468
|
|
|
1563
1469
|
|
|
1564
1470
|
|
|
@@ -1567,9 +1473,8 @@ Get date range object from a string date value
|
|
|
1567
1473
|
|
|
1568
1474
|
| Name | Type | Description | |
|
|
1569
1475
|
| ---- | ---- | ----------- | -------- |
|
|
1570
|
-
|
|
|
1571
|
-
|
|
|
1572
|
-
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
1476
|
+
| oldFiltersObj | `Object` | an object with the old filters structure | |
|
|
1477
|
+
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
1573
1478
|
|
|
1574
1479
|
|
|
1575
1480
|
|
|
@@ -1577,36 +1482,58 @@ Get date range object from a string date value
|
|
|
1577
1482
|
##### Examples
|
|
1578
1483
|
|
|
1579
1484
|
```javascript
|
|
1580
|
-
// 1) Year:
|
|
1581
|
-
getDateRange('2020', 'YEAR');
|
|
1582
|
-
// Will return:
|
|
1583
|
-
{
|
|
1584
|
-
from: '01/01/2020 00:00:00',
|
|
1585
|
-
to: '12/31/2020 23:59:59'
|
|
1586
|
-
}
|
|
1587
1485
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
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
|
+
};
|
|
1595
1528
|
|
|
1596
|
-
|
|
1597
|
-
getDateRange('Oct 2020', 'MONTH');
|
|
1598
|
-
// Will return:
|
|
1599
|
-
{
|
|
1600
|
-
from: '10/01/2020 00:00:00',
|
|
1601
|
-
to: '10/31/2020 23:59:59'
|
|
1602
|
-
}
|
|
1529
|
+
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
1603
1530
|
```
|
|
1604
1531
|
|
|
1605
1532
|
|
|
1606
1533
|
##### Returns
|
|
1607
1534
|
|
|
1608
1535
|
|
|
1609
|
-
- `Object` an object with the
|
|
1536
|
+
- `Object` an object with the new filters structure
|
|
1610
1537
|
|
|
1611
1538
|
|
|
1612
1539
|
|
|
@@ -1631,12 +1558,12 @@ getDateRange('Oct 2020', 'MONTH');
|
|
|
1631
1558
|
|
|
1632
1559
|
|
|
1633
1560
|
|
|
1634
|
-
### dist/filters/
|
|
1561
|
+
### dist/filters/helpers/applyHierarchyForAggFilters.js
|
|
1635
1562
|
|
|
1636
1563
|
|
|
1637
|
-
####
|
|
1564
|
+
#### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
|
|
1638
1565
|
|
|
1639
|
-
|
|
1566
|
+
[TODO: Make a proper description for this function]
|
|
1640
1567
|
|
|
1641
1568
|
|
|
1642
1569
|
|
|
@@ -1645,8 +1572,9 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
1645
1572
|
|
|
1646
1573
|
| Name | Type | Description | |
|
|
1647
1574
|
| ---- | ---- | ----------- | -------- |
|
|
1648
|
-
|
|
|
1649
|
-
|
|
|
1575
|
+
| chartSettings | | Chart Settings for the Filter Builder | |
|
|
1576
|
+
| scopes | | | |
|
|
1577
|
+
| currentScope | | | |
|
|
1650
1578
|
|
|
1651
1579
|
|
|
1652
1580
|
|
|
@@ -1654,13 +1582,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
1654
1582
|
##### Returns
|
|
1655
1583
|
|
|
1656
1584
|
|
|
1657
|
-
-
|
|
1585
|
+
-
|
|
1658
1586
|
|
|
1659
1587
|
|
|
1660
1588
|
|
|
1661
|
-
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
1662
1589
|
|
|
1663
|
-
|
|
1590
|
+
### dist/filters/helpers/getAvailableScopes.js
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
#### getAvailableScopes(config)
|
|
1594
|
+
|
|
1595
|
+
Gets Scopes/Scope IDs by given IDs
|
|
1664
1596
|
|
|
1665
1597
|
|
|
1666
1598
|
|
|
@@ -1669,8 +1601,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
1669
1601
|
|
|
1670
1602
|
| Name | Type | Description | |
|
|
1671
1603
|
| ---- | ---- | ----------- | -------- |
|
|
1672
|
-
|
|
|
1673
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
1604
|
+
| config | | given Differnts IDs in order set a available scope | |
|
|
1674
1605
|
|
|
1675
1606
|
|
|
1676
1607
|
|
|
@@ -1678,17 +1609,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
1678
1609
|
##### Returns
|
|
1679
1610
|
|
|
1680
1611
|
|
|
1681
|
-
- a
|
|
1612
|
+
- a Scopes/Scope IDs array
|
|
1682
1613
|
|
|
1683
1614
|
|
|
1684
1615
|
|
|
1685
1616
|
|
|
1686
|
-
### dist/filters/
|
|
1617
|
+
### dist/filters/helpers/getAvailableScopesIDsByConfig.js
|
|
1687
1618
|
|
|
1688
1619
|
|
|
1689
|
-
####
|
|
1620
|
+
#### getAvailableScopesIDsByConfig(config)
|
|
1690
1621
|
|
|
1691
|
-
|
|
1622
|
+
Gets the Scopes IDS for the Available Scope function by any config
|
|
1692
1623
|
|
|
1693
1624
|
|
|
1694
1625
|
|
|
@@ -1697,7 +1628,7 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
1697
1628
|
|
|
1698
1629
|
| Name | Type | Description | |
|
|
1699
1630
|
| ---- | ---- | ----------- | -------- |
|
|
1700
|
-
|
|
|
1631
|
+
| config | | any config | |
|
|
1701
1632
|
|
|
1702
1633
|
|
|
1703
1634
|
|
|
@@ -1705,13 +1636,17 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
1705
1636
|
##### Returns
|
|
1706
1637
|
|
|
1707
1638
|
|
|
1708
|
-
- a
|
|
1639
|
+
- a Available Scope IDS config
|
|
1709
1640
|
|
|
1710
1641
|
|
|
1711
1642
|
|
|
1712
|
-
#### getLogicBodyFromFD21(filterData)
|
|
1713
1643
|
|
|
1714
|
-
|
|
1644
|
+
### dist/filters/helpers/getScopesByHierarchy.js
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
#### getScopesByHierarchy(scopes, currentScope)
|
|
1648
|
+
|
|
1649
|
+
[TODO: Make a description for this]
|
|
1715
1650
|
|
|
1716
1651
|
|
|
1717
1652
|
|
|
@@ -1720,7 +1655,8 @@ Gets the logic body
|
|
|
1720
1655
|
|
|
1721
1656
|
| Name | Type | Description | |
|
|
1722
1657
|
| ---- | ---- | ----------- | -------- |
|
|
1723
|
-
|
|
|
1658
|
+
| scopes | | the collection of Scopes/Scope IDs | |
|
|
1659
|
+
| currentScope | | Current scope type | |
|
|
1724
1660
|
|
|
1725
1661
|
|
|
1726
1662
|
|
|
@@ -1728,17 +1664,17 @@ Gets the logic body
|
|
|
1728
1664
|
##### Returns
|
|
1729
1665
|
|
|
1730
1666
|
|
|
1731
|
-
-
|
|
1667
|
+
- A new array of Scopes/Scope IDs
|
|
1732
1668
|
|
|
1733
1669
|
|
|
1734
1670
|
|
|
1735
1671
|
|
|
1736
|
-
### dist/
|
|
1672
|
+
### dist/general/array/delete.js
|
|
1737
1673
|
|
|
1738
1674
|
|
|
1739
|
-
####
|
|
1675
|
+
#### ArrayDelete(array, index)
|
|
1740
1676
|
|
|
1741
|
-
|
|
1677
|
+
Inmutable Array Item deletion
|
|
1742
1678
|
|
|
1743
1679
|
|
|
1744
1680
|
|
|
@@ -1747,8 +1683,8 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
1747
1683
|
|
|
1748
1684
|
| Name | Type | Description | |
|
|
1749
1685
|
| ---- | ---- | ----------- | -------- |
|
|
1750
|
-
|
|
|
1751
|
-
|
|
|
1686
|
+
| array | `Array` | a collection of items to delete | |
|
|
1687
|
+
| index | `Number` | the position of the item to delete | |
|
|
1752
1688
|
|
|
1753
1689
|
|
|
1754
1690
|
|
|
@@ -1756,13 +1692,20 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
1756
1692
|
##### Returns
|
|
1757
1693
|
|
|
1758
1694
|
|
|
1759
|
-
- a
|
|
1695
|
+
- a new Array or the given parameter when is empty or not an array
|
|
1760
1696
|
|
|
1761
1697
|
|
|
1762
1698
|
|
|
1763
|
-
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
1764
1699
|
|
|
1765
|
-
|
|
1700
|
+
### dist/general/array/filterNestedTree.js
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
#### filterNestedTree(arr, childArrKey, condition)
|
|
1704
|
+
|
|
1705
|
+
Filters a nested tree array by a custom condition on the last child node
|
|
1706
|
+
- If the given arguments are not valid, the function returns the first argument.
|
|
1707
|
+
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
1708
|
+
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
1766
1709
|
|
|
1767
1710
|
|
|
1768
1711
|
|
|
@@ -1771,10 +1714,9 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
1771
1714
|
|
|
1772
1715
|
| Name | Type | Description | |
|
|
1773
1716
|
| ---- | ---- | ----------- | -------- |
|
|
1774
|
-
|
|
|
1775
|
-
|
|
|
1776
|
-
|
|
|
1777
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
1717
|
+
| arr | | nested tree array | |
|
|
1718
|
+
| childArrKey | | property representing the children array on the nested tree | |
|
|
1719
|
+
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
1778
1720
|
|
|
1779
1721
|
|
|
1780
1722
|
|
|
@@ -1782,17 +1724,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
1782
1724
|
##### Returns
|
|
1783
1725
|
|
|
1784
1726
|
|
|
1785
|
-
-
|
|
1727
|
+
- array filtered
|
|
1786
1728
|
|
|
1787
1729
|
|
|
1788
1730
|
|
|
1789
1731
|
|
|
1790
|
-
### dist/
|
|
1732
|
+
### dist/general/array/flattenDeep.js
|
|
1791
1733
|
|
|
1792
1734
|
|
|
1793
|
-
####
|
|
1735
|
+
#### flattenDeep(arr)
|
|
1794
1736
|
|
|
1795
|
-
|
|
1737
|
+
Flat deeply an array
|
|
1796
1738
|
|
|
1797
1739
|
|
|
1798
1740
|
|
|
@@ -1801,7 +1743,7 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
1801
1743
|
|
|
1802
1744
|
| Name | Type | Description | |
|
|
1803
1745
|
| ---- | ---- | ----------- | -------- |
|
|
1804
|
-
|
|
|
1746
|
+
| arr | | Array to flat deeply | |
|
|
1805
1747
|
|
|
1806
1748
|
|
|
1807
1749
|
|
|
@@ -1809,13 +1751,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
1809
1751
|
##### Returns
|
|
1810
1752
|
|
|
1811
1753
|
|
|
1812
|
-
-
|
|
1754
|
+
- flatten array
|
|
1813
1755
|
|
|
1814
1756
|
|
|
1815
1757
|
|
|
1816
|
-
#### UI21ToFD(uFilterData, version)
|
|
1817
1758
|
|
|
1818
|
-
|
|
1759
|
+
### dist/general/array/getFirstIndexFromArray.js
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
#### getFirstIndexFromArray(array, callback)
|
|
1763
|
+
|
|
1764
|
+
Gets the first index from the array by a callback condition
|
|
1819
1765
|
|
|
1820
1766
|
|
|
1821
1767
|
|
|
@@ -1824,8 +1770,8 @@ Builds the Fitler Data structure from UI filter data
|
|
|
1824
1770
|
|
|
1825
1771
|
| Name | Type | Description | |
|
|
1826
1772
|
| ---- | ---- | ----------- | -------- |
|
|
1827
|
-
|
|
|
1828
|
-
|
|
|
1773
|
+
| array | | | |
|
|
1774
|
+
| callback | | function callback | |
|
|
1829
1775
|
|
|
1830
1776
|
|
|
1831
1777
|
|
|
@@ -1833,17 +1779,17 @@ Builds the Fitler Data structure from UI filter data
|
|
|
1833
1779
|
##### Returns
|
|
1834
1780
|
|
|
1835
1781
|
|
|
1836
|
-
-
|
|
1782
|
+
- the first index of the array. -1 when the condition is not satisfied
|
|
1837
1783
|
|
|
1838
1784
|
|
|
1839
1785
|
|
|
1840
1786
|
|
|
1841
|
-
### dist/
|
|
1787
|
+
### dist/general/array/getLastIndexFromArray.js
|
|
1842
1788
|
|
|
1843
1789
|
|
|
1844
|
-
####
|
|
1790
|
+
#### getLastIndexFromArray(array, callback)
|
|
1845
1791
|
|
|
1846
|
-
|
|
1792
|
+
Gets the last index from the array by a callback condition
|
|
1847
1793
|
|
|
1848
1794
|
|
|
1849
1795
|
|
|
@@ -1852,8 +1798,8 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
1852
1798
|
|
|
1853
1799
|
| Name | Type | Description | |
|
|
1854
1800
|
| ---- | ---- | ----------- | -------- |
|
|
1855
|
-
|
|
|
1856
|
-
|
|
|
1801
|
+
| array | | | |
|
|
1802
|
+
| callback | | function callback | |
|
|
1857
1803
|
|
|
1858
1804
|
|
|
1859
1805
|
|
|
@@ -1861,13 +1807,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
1861
1807
|
##### Returns
|
|
1862
1808
|
|
|
1863
1809
|
|
|
1864
|
-
-
|
|
1810
|
+
- the last index of the array. -1 when the condition is not satisfied
|
|
1865
1811
|
|
|
1866
1812
|
|
|
1867
1813
|
|
|
1868
|
-
#### UI21ToFlatUI(scopes)
|
|
1869
1814
|
|
|
1870
|
-
|
|
1815
|
+
### dist/general/function/debounce.js
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
#### debounce(fn, time)
|
|
1819
|
+
|
|
1820
|
+
Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
|
|
1871
1821
|
|
|
1872
1822
|
|
|
1873
1823
|
|
|
@@ -1876,7 +1826,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
1876
1826
|
|
|
1877
1827
|
| Name | Type | Description | |
|
|
1878
1828
|
| ---- | ---- | ----------- | -------- |
|
|
1879
|
-
|
|
|
1829
|
+
| fn | `Function` | original Function | |
|
|
1830
|
+
| time | `Number` | default 500ms | |
|
|
1880
1831
|
|
|
1881
1832
|
|
|
1882
1833
|
|
|
@@ -1884,18 +1835,17 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
1884
1835
|
##### Returns
|
|
1885
1836
|
|
|
1886
1837
|
|
|
1887
|
-
-
|
|
1838
|
+
- `Function` debounced functions
|
|
1888
1839
|
|
|
1889
1840
|
|
|
1890
1841
|
|
|
1891
1842
|
|
|
1892
|
-
### dist/
|
|
1843
|
+
### dist/general/function/throttled.js
|
|
1893
1844
|
|
|
1894
1845
|
|
|
1895
|
-
####
|
|
1846
|
+
#### throttled(fn, time)
|
|
1896
1847
|
|
|
1897
|
-
|
|
1898
|
-
Get the new property base on the old date grouping properties
|
|
1848
|
+
Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
1899
1849
|
|
|
1900
1850
|
|
|
1901
1851
|
|
|
@@ -1904,7 +1854,8 @@ Get the new property base on the old date grouping properties
|
|
|
1904
1854
|
|
|
1905
1855
|
| Name | Type | Description | |
|
|
1906
1856
|
| ---- | ---- | ----------- | -------- |
|
|
1907
|
-
|
|
|
1857
|
+
| fn | `Function` | original Function | |
|
|
1858
|
+
| time | `Number` | default 500ms | |
|
|
1908
1859
|
|
|
1909
1860
|
|
|
1910
1861
|
|
|
@@ -1912,17 +1863,18 @@ Get the new property base on the old date grouping properties
|
|
|
1912
1863
|
##### Returns
|
|
1913
1864
|
|
|
1914
1865
|
|
|
1915
|
-
-
|
|
1866
|
+
- `Function` throttled function
|
|
1916
1867
|
|
|
1917
1868
|
|
|
1918
1869
|
|
|
1919
1870
|
|
|
1920
|
-
### dist/
|
|
1871
|
+
### dist/general/mix/compareDeep.js
|
|
1921
1872
|
|
|
1922
1873
|
|
|
1923
|
-
####
|
|
1874
|
+
#### compareDeep(object1, object2)
|
|
1924
1875
|
|
|
1925
|
-
|
|
1876
|
+
Compares two objects to know if they are equals. Go across nested objects.
|
|
1877
|
+
Includes arrays in the comparison.
|
|
1926
1878
|
|
|
1927
1879
|
|
|
1928
1880
|
|
|
@@ -1931,9 +1883,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
1931
1883
|
|
|
1932
1884
|
| Name | Type | Description | |
|
|
1933
1885
|
| ---- | ---- | ----------- | -------- |
|
|
1934
|
-
|
|
|
1935
|
-
|
|
|
1936
|
-
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
1886
|
+
| object1 | | First Object to compare | |
|
|
1887
|
+
| object2 | | Second Object to compare | |
|
|
1937
1888
|
|
|
1938
1889
|
|
|
1939
1890
|
|
|
@@ -1941,18 +1892,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
1941
1892
|
##### Returns
|
|
1942
1893
|
|
|
1943
1894
|
|
|
1944
|
-
-
|
|
1895
|
+
- True: objects are equal. False: Objects are not equal. Undefined: invalid
|
|
1945
1896
|
|
|
1946
1897
|
|
|
1947
1898
|
|
|
1948
1899
|
|
|
1949
|
-
### dist/
|
|
1900
|
+
### dist/general/mix/getTag.js
|
|
1950
1901
|
|
|
1951
1902
|
|
|
1952
|
-
####
|
|
1903
|
+
#### getTag(value)
|
|
1953
1904
|
|
|
1954
|
-
|
|
1955
|
-
Gets an adapted filter value array. Validates the enabled property and sets
|
|
1905
|
+
Gets the `toStringTag` of `value`.
|
|
1956
1906
|
|
|
1957
1907
|
|
|
1958
1908
|
|
|
@@ -1961,7 +1911,7 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
1961
1911
|
|
|
1962
1912
|
| Name | Type | Description | |
|
|
1963
1913
|
| ---- | ---- | ----------- | -------- |
|
|
1964
|
-
|
|
|
1914
|
+
| value | | The value to query. | |
|
|
1965
1915
|
|
|
1966
1916
|
|
|
1967
1917
|
|
|
@@ -1969,17 +1919,17 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
1969
1919
|
##### Returns
|
|
1970
1920
|
|
|
1971
1921
|
|
|
1972
|
-
-
|
|
1922
|
+
- `string` Returns the `toStringTag`.
|
|
1973
1923
|
|
|
1974
1924
|
|
|
1975
1925
|
|
|
1976
1926
|
|
|
1977
|
-
### dist/
|
|
1927
|
+
### dist/general/mix/importScripts.js
|
|
1978
1928
|
|
|
1979
1929
|
|
|
1980
|
-
####
|
|
1930
|
+
#### importScripts(scripts)
|
|
1981
1931
|
|
|
1982
|
-
|
|
1932
|
+
Import a set of external Scripts given the URL in both serie and cascade way
|
|
1983
1933
|
|
|
1984
1934
|
|
|
1985
1935
|
|
|
@@ -1988,23 +1938,54 @@ Generates a filter data structure from the flatttened UI filters.
|
|
|
1988
1938
|
|
|
1989
1939
|
| Name | Type | Description | |
|
|
1990
1940
|
| ---- | ---- | ----------- | -------- |
|
|
1991
|
-
|
|
|
1992
|
-
|
|
|
1941
|
+
| scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | |
|
|
1942
|
+
| scripts.url | `String` | CDN URL | |
|
|
1943
|
+
| 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 | |
|
|
1944
|
+
| scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1945
|
+
| scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
1946
|
+
| scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | |
|
|
1947
|
+
|
|
1948
|
+
|
|
1949
|
+
|
|
1993
1950
|
|
|
1951
|
+
##### Examples
|
|
1952
|
+
|
|
1953
|
+
```javascript
|
|
1954
|
+
// 1) Simple script (paralell loading)
|
|
1955
|
+
importScripts(['http://myscript.js', 'http://another.js']);
|
|
1956
|
+
|
|
1957
|
+
// 2) Loading `.js` and `.esm.js` script (parallel loading)
|
|
1958
|
+
importScripts([
|
|
1959
|
+
{ url: 'http://myscript.esm.js', type: 'module' },
|
|
1960
|
+
{ url: 'http://myscript.js', noModule: true }
|
|
1961
|
+
]);
|
|
1962
|
+
|
|
1963
|
+
// 3) import dependent scripts (cascade)
|
|
1964
|
+
importScripts([
|
|
1965
|
+
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
|
|
1966
|
+
]);
|
|
1994
1967
|
|
|
1968
|
+
// 4) mix
|
|
1969
|
+
importScripts([
|
|
1970
|
+
{ url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
|
|
1971
|
+
{ url: 'http://another.esm.js', type: 'module' },
|
|
1972
|
+
{ url: 'http://another.js', noModule: true },
|
|
1973
|
+
'http://simplescript.js'
|
|
1974
|
+
]);
|
|
1975
|
+
```
|
|
1995
1976
|
|
|
1996
1977
|
|
|
1997
1978
|
##### Returns
|
|
1998
1979
|
|
|
1999
1980
|
|
|
2000
|
-
-
|
|
1981
|
+
- `Promise` Promise when all script have been loaded
|
|
2001
1982
|
|
|
2002
1983
|
|
|
2003
1984
|
|
|
2004
|
-
####
|
|
1985
|
+
#### loadScript(url, type, noModule)
|
|
2005
1986
|
|
|
2006
|
-
|
|
2007
|
-
|
|
1987
|
+
Creates the script element and appends to document.head
|
|
1988
|
+
return a Promise that is resolved when the script is loaded
|
|
2008
1989
|
|
|
2009
1990
|
|
|
2010
1991
|
|
|
@@ -2013,7 +1994,9 @@ Also, adds and organizes filters by datasets
|
|
|
2013
1994
|
|
|
2014
1995
|
| Name | Type | Description | |
|
|
2015
1996
|
| ---- | ---- | ----------- | -------- |
|
|
2016
|
-
|
|
|
1997
|
+
| url | `String` | Cdn Url | |
|
|
1998
|
+
| type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | |
|
|
1999
|
+
| noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | |
|
|
2017
2000
|
|
|
2018
2001
|
|
|
2019
2002
|
|
|
@@ -2021,13 +2004,17 @@ Also, adds and organizes filters by datasets
|
|
|
2021
2004
|
##### Returns
|
|
2022
2005
|
|
|
2023
2006
|
|
|
2024
|
-
-
|
|
2007
|
+
- `Void`
|
|
2025
2008
|
|
|
2026
2009
|
|
|
2027
2010
|
|
|
2028
|
-
#### buildScope(uFilter)
|
|
2029
2011
|
|
|
2030
|
-
|
|
2012
|
+
### dist/general/mix/isEmpty.js
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
#### isEmpty(variable, includeFalsy)
|
|
2016
|
+
|
|
2017
|
+
Validates if the given argument is empty
|
|
2031
2018
|
|
|
2032
2019
|
|
|
2033
2020
|
|
|
@@ -2036,7 +2023,8 @@ Gets an scope structure for the filter data
|
|
|
2036
2023
|
|
|
2037
2024
|
| Name | Type | Description | |
|
|
2038
2025
|
| ---- | ---- | ----------- | -------- |
|
|
2039
|
-
|
|
|
2026
|
+
| variable | | the given variable | |
|
|
2027
|
+
| includeFalsy | | flag to determine include the falsy variables into the validation | |
|
|
2040
2028
|
|
|
2041
2029
|
|
|
2042
2030
|
|
|
@@ -2044,13 +2032,19 @@ Gets an scope structure for the filter data
|
|
|
2044
2032
|
##### Returns
|
|
2045
2033
|
|
|
2046
2034
|
|
|
2047
|
-
-
|
|
2035
|
+
- true: the given argument is empty; false: is not.
|
|
2048
2036
|
|
|
2049
2037
|
|
|
2050
2038
|
|
|
2051
|
-
#### buildDataset(uFilter)
|
|
2052
2039
|
|
|
2053
|
-
|
|
2040
|
+
### dist/general/mix/isNaNV2.js
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
#### isNaNV2(variable)
|
|
2044
|
+
|
|
2045
|
+
Validates if the recieved number is NaN type.
|
|
2046
|
+
This function recieves any variable but will return false.
|
|
2047
|
+
Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
|
|
2054
2048
|
|
|
2055
2049
|
|
|
2056
2050
|
|
|
@@ -2059,7 +2053,7 @@ Gets an dataset structure for the filter data
|
|
|
2059
2053
|
|
|
2060
2054
|
| Name | Type | Description | |
|
|
2061
2055
|
| ---- | ---- | ----------- | -------- |
|
|
2062
|
-
|
|
|
2056
|
+
| variable | | the variable to validate | |
|
|
2063
2057
|
|
|
2064
2058
|
|
|
2065
2059
|
|
|
@@ -2067,13 +2061,18 @@ Gets an dataset structure for the filter data
|
|
|
2067
2061
|
##### Returns
|
|
2068
2062
|
|
|
2069
2063
|
|
|
2070
|
-
-
|
|
2064
|
+
- True if variable is a NaN or false otherwise
|
|
2071
2065
|
|
|
2072
2066
|
|
|
2073
2067
|
|
|
2074
|
-
#### buildFilter(uFilter)
|
|
2075
2068
|
|
|
2076
|
-
|
|
2069
|
+
### dist/general/mix/isNull.js
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
#### isNull(arg)
|
|
2073
|
+
|
|
2074
|
+
return if a given variable is either `null` or `undefined`
|
|
2075
|
+
useful to avoid falsify validating Number Zero (0)
|
|
2077
2076
|
|
|
2078
2077
|
|
|
2079
2078
|
|
|
@@ -2082,7 +2081,7 @@ Gets an filter structure for the filter data
|
|
|
2082
2081
|
|
|
2083
2082
|
| Name | Type | Description | |
|
|
2084
2083
|
| ---- | ---- | ----------- | -------- |
|
|
2085
|
-
|
|
|
2084
|
+
| arg | `any` | | |
|
|
2086
2085
|
|
|
2087
2086
|
|
|
2088
2087
|
|
|
@@ -2090,17 +2089,19 @@ Gets an filter structure for the filter data
|
|
|
2090
2089
|
##### Returns
|
|
2091
2090
|
|
|
2092
2091
|
|
|
2093
|
-
-
|
|
2092
|
+
- `Boolean`
|
|
2094
2093
|
|
|
2095
2094
|
|
|
2096
2095
|
|
|
2097
2096
|
|
|
2098
|
-
### dist/
|
|
2097
|
+
### dist/general/mix/randomId.js
|
|
2099
2098
|
|
|
2100
2099
|
|
|
2101
|
-
####
|
|
2100
|
+
#### randomId(length, exclude)
|
|
2102
2101
|
|
|
2103
|
-
|
|
2102
|
+
Creates a random string
|
|
2103
|
+
- If the first given argument is different than a length number, the variable is replaced by a default number
|
|
2104
|
+
- If the optional second given argument is passed the random string is permutated.
|
|
2104
2105
|
|
|
2105
2106
|
|
|
2106
2107
|
|
|
@@ -2109,7 +2110,8 @@ Generates a Logic structure from flattened UI filters
|
|
|
2109
2110
|
|
|
2110
2111
|
| Name | Type | Description | |
|
|
2111
2112
|
| ---- | ---- | ----------- | -------- |
|
|
2112
|
-
|
|
|
2113
|
+
| length | `Number` | size of the generated string. Default 8 | |
|
|
2114
|
+
| exclude | `Array` | collection of strings that is going to be excluded of the random string. | |
|
|
2113
2115
|
|
|
2114
2116
|
|
|
2115
2117
|
|
|
@@ -2117,17 +2119,19 @@ Generates a Logic structure from flattened UI filters
|
|
|
2117
2119
|
##### Returns
|
|
2118
2120
|
|
|
2119
2121
|
|
|
2120
|
-
-
|
|
2122
|
+
- `String` Random string
|
|
2121
2123
|
|
|
2122
2124
|
|
|
2123
2125
|
|
|
2124
2126
|
|
|
2125
|
-
### dist/
|
|
2127
|
+
### dist/general/mix/size.js
|
|
2126
2128
|
|
|
2127
2129
|
|
|
2128
|
-
####
|
|
2130
|
+
#### size(obj)
|
|
2129
2131
|
|
|
2130
|
-
|
|
2132
|
+
Gets the length of the given array.
|
|
2133
|
+
- Useful for Object, Array and string type.
|
|
2134
|
+
- For `null` or `undefined` or else argument the returned value will be 0.
|
|
2131
2135
|
|
|
2132
2136
|
|
|
2133
2137
|
|
|
@@ -2136,7 +2140,7 @@ Generates a Logic structure from flattened UI filters
|
|
|
2136
2140
|
|
|
2137
2141
|
| Name | Type | Description | |
|
|
2138
2142
|
| ---- | ---- | ----------- | -------- |
|
|
2139
|
-
|
|
|
2143
|
+
| obj | `Any` | Any object-type variable | |
|
|
2140
2144
|
|
|
2141
2145
|
|
|
2142
2146
|
|
|
@@ -2144,17 +2148,18 @@ Generates a Logic structure from flattened UI filters
|
|
|
2144
2148
|
##### Returns
|
|
2145
2149
|
|
|
2146
2150
|
|
|
2147
|
-
-
|
|
2151
|
+
- `Number` the size of the given variable
|
|
2148
2152
|
|
|
2149
2153
|
|
|
2150
2154
|
|
|
2151
2155
|
|
|
2152
|
-
### dist/
|
|
2156
|
+
### dist/general/object/cloneDeep.js
|
|
2153
2157
|
|
|
2154
2158
|
|
|
2155
|
-
####
|
|
2159
|
+
#### cloneDeep(obj)
|
|
2156
2160
|
|
|
2157
|
-
|
|
2161
|
+
A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
|
|
2162
|
+
Not to use this function with inner objects and functions
|
|
2158
2163
|
|
|
2159
2164
|
|
|
2160
2165
|
|
|
@@ -2163,8 +2168,7 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
2163
2168
|
|
|
2164
2169
|
| Name | Type | Description | |
|
|
2165
2170
|
| ---- | ---- | ----------- | -------- |
|
|
2166
|
-
|
|
|
2167
|
-
| version | | Tag for the version of the filter data structure | |
|
|
2171
|
+
| obj | | The object | |
|
|
2168
2172
|
|
|
2169
2173
|
|
|
2170
2174
|
|
|
@@ -2172,14 +2176,21 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
2172
2176
|
##### Returns
|
|
2173
2177
|
|
|
2174
2178
|
|
|
2175
|
-
-
|
|
2179
|
+
- The new reference object or the given object if the parsing is incorrect or empty
|
|
2176
2180
|
|
|
2177
2181
|
|
|
2178
2182
|
|
|
2179
|
-
#### buildScopes(fbFilters)
|
|
2180
2183
|
|
|
2181
|
-
|
|
2182
|
-
|
|
2184
|
+
### dist/general/object/get.js
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
#### _get(baseObject, path, defaultValue)
|
|
2188
|
+
|
|
2189
|
+
Like lodash _.get.
|
|
2190
|
+
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
|
|
2191
|
+
|
|
2192
|
+
Empty arrays and empty objects are returned but the defaultValue is not
|
|
2193
|
+
Undefined and null values will return the defaultValue.
|
|
2183
2194
|
|
|
2184
2195
|
|
|
2185
2196
|
|
|
@@ -2188,67 +2199,94 @@ Also, adds and organizes filters by datasets
|
|
|
2188
2199
|
|
|
2189
2200
|
| Name | Type | Description | |
|
|
2190
2201
|
| ---- | ---- | ----------- | -------- |
|
|
2191
|
-
|
|
|
2192
|
-
|
|
2193
|
-
|
|
2202
|
+
| baseObject | | The object to query | |
|
|
2203
|
+
| path | | The string path or collection of string paths of the property to get. | |
|
|
2204
|
+
| defaultValue | | The value returned for undefined resolved values. | |
|
|
2194
2205
|
|
|
2195
2206
|
|
|
2196
|
-
##### Returns
|
|
2197
2207
|
|
|
2198
2208
|
|
|
2199
|
-
|
|
2200
|
-
|
|
2209
|
+
##### Examples
|
|
2201
2210
|
|
|
2211
|
+
```javascript
|
|
2212
|
+
// returns 'Hello'
|
|
2213
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item1')
|
|
2214
|
+
```
|
|
2215
|
+
```javascript
|
|
2216
|
+
// returns 'A simple Hello'
|
|
2217
|
+
_get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
|
|
2218
|
+
```
|
|
2219
|
+
```javascript
|
|
2220
|
+
// returns 'Hello Again'
|
|
2221
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
|
|
2222
|
+
```
|
|
2223
|
+
```javascript
|
|
2224
|
+
// returns 'Hello 2'
|
|
2225
|
+
_get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
|
|
2226
|
+
```
|
|
2227
|
+
```javascript
|
|
2228
|
+
// returns 'Hello Again'
|
|
2229
|
+
_get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
|
|
2230
|
+
```
|
|
2202
2231
|
|
|
2203
|
-
#### buildScope(uFilter)
|
|
2204
2232
|
|
|
2205
|
-
|
|
2233
|
+
##### Returns
|
|
2206
2234
|
|
|
2207
2235
|
|
|
2236
|
+
- the resolved value.
|
|
2208
2237
|
|
|
2209
2238
|
|
|
2210
|
-
##### Parameters
|
|
2211
2239
|
|
|
2212
|
-
| Name | Type | Description | |
|
|
2213
|
-
| ---- | ---- | ----------- | -------- |
|
|
2214
|
-
| uFilter | | UI structure filter | |
|
|
2215
2240
|
|
|
2241
|
+
### dist/general/object/getAttribute.js
|
|
2216
2242
|
|
|
2217
2243
|
|
|
2244
|
+
#### getAttribute(obj, key)
|
|
2218
2245
|
|
|
2219
|
-
|
|
2246
|
+
Searchs for properties in different case styles such as: lower, upper, camel and pascal
|
|
2247
|
+
- To optimize the searching, it is required a key in a snake_case style
|
|
2248
|
+
- List of cases that do not match
|
|
2249
|
+
-- From lower to snake case
|
|
2250
|
+
-- From upper to snake case
|
|
2251
|
+
-- From lower to camel case
|
|
2252
|
+
-- From upper to camel case
|
|
2253
|
+
-- From lower to pascal case
|
|
2254
|
+
-- From upper to pascal case
|
|
2220
2255
|
|
|
2221
2256
|
|
|
2222
|
-
- an scope structure
|
|
2223
2257
|
|
|
2224
2258
|
|
|
2259
|
+
##### Parameters
|
|
2225
2260
|
|
|
2226
|
-
|
|
2261
|
+
| Name | Type | Description | |
|
|
2262
|
+
| ---- | ---- | ----------- | -------- |
|
|
2263
|
+
| obj | `object` | object to look for | |
|
|
2264
|
+
| key | `string` | String attribute in snake_case style | |
|
|
2227
2265
|
|
|
2228
|
-
Gets an dataset structure for the UI filter data
|
|
2229
2266
|
|
|
2230
2267
|
|
|
2231
2268
|
|
|
2269
|
+
##### Examples
|
|
2232
2270
|
|
|
2233
|
-
|
|
2271
|
+
```javascript
|
|
2272
|
+
getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2273
|
+
```
|
|
2234
2274
|
|
|
2235
|
-
| Name | Type | Description | |
|
|
2236
|
-
| ---- | ---- | ----------- | -------- |
|
|
2237
|
-
| uFilter | | a UI structure filter | |
|
|
2238
2275
|
|
|
2276
|
+
##### Returns
|
|
2239
2277
|
|
|
2240
2278
|
|
|
2279
|
+
- `Void`
|
|
2241
2280
|
|
|
2242
|
-
##### Returns
|
|
2243
2281
|
|
|
2244
2282
|
|
|
2245
|
-
- an dataset structure
|
|
2246
2283
|
|
|
2284
|
+
### dist/general/object/hasProperty.js
|
|
2247
2285
|
|
|
2248
2286
|
|
|
2249
|
-
####
|
|
2287
|
+
#### _hasProperty(obj, property)
|
|
2250
2288
|
|
|
2251
|
-
|
|
2289
|
+
Use the hasOwnProperty in order to verify if the given property exists in the object.
|
|
2252
2290
|
|
|
2253
2291
|
|
|
2254
2292
|
|
|
@@ -2257,25 +2295,38 @@ Gets an filter structure for the UI filter data
|
|
|
2257
2295
|
|
|
2258
2296
|
| Name | Type | Description | |
|
|
2259
2297
|
| ---- | ---- | ----------- | -------- |
|
|
2260
|
-
|
|
|
2298
|
+
| obj | `object` | an object | |
|
|
2299
|
+
| property | `string` | String to verify if exists in the object as property | |
|
|
2261
2300
|
|
|
2262
2301
|
|
|
2263
2302
|
|
|
2264
2303
|
|
|
2304
|
+
##### Examples
|
|
2305
|
+
|
|
2306
|
+
```javascript
|
|
2307
|
+
const prop = 'prop2'
|
|
2308
|
+
const obj1 = { prop1: 'hello', prop2: 'world'}
|
|
2309
|
+
_hasProperty(ob1, prop1) // true
|
|
2310
|
+
|
|
2311
|
+
const obj2 = { prop1: 'hello world' }
|
|
2312
|
+
_hasProperty(ob1, prop2) // false
|
|
2313
|
+
```
|
|
2314
|
+
|
|
2315
|
+
|
|
2265
2316
|
##### Returns
|
|
2266
2317
|
|
|
2267
2318
|
|
|
2268
|
-
-
|
|
2319
|
+
- True if the object has the given property; otherwise, false.
|
|
2269
2320
|
|
|
2270
2321
|
|
|
2271
2322
|
|
|
2272
2323
|
|
|
2273
|
-
### dist/
|
|
2324
|
+
### dist/general/object/isObject.js
|
|
2274
2325
|
|
|
2275
2326
|
|
|
2276
|
-
####
|
|
2327
|
+
#### isObject(obj)
|
|
2277
2328
|
|
|
2278
|
-
|
|
2329
|
+
Checks if the given argument is an object type
|
|
2279
2330
|
|
|
2280
2331
|
|
|
2281
2332
|
|
|
@@ -2284,8 +2335,7 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
2284
2335
|
|
|
2285
2336
|
| Name | Type | Description | |
|
|
2286
2337
|
| ---- | ---- | ----------- | -------- |
|
|
2287
|
-
|
|
|
2288
|
-
| version | | Tag for the version of the filter data structure | |
|
|
2338
|
+
| obj | | the variable to check | |
|
|
2289
2339
|
|
|
2290
2340
|
|
|
2291
2341
|
|
|
@@ -2293,17 +2343,18 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
2293
2343
|
##### Returns
|
|
2294
2344
|
|
|
2295
2345
|
|
|
2296
|
-
-
|
|
2346
|
+
- True: It is an object; False: It is not.
|
|
2297
2347
|
|
|
2298
2348
|
|
|
2299
2349
|
|
|
2300
2350
|
|
|
2301
|
-
### dist/
|
|
2351
|
+
### dist/general/object/mapValues.js
|
|
2302
2352
|
|
|
2303
2353
|
|
|
2304
|
-
####
|
|
2354
|
+
#### mapValues(baseObject, iteratee)
|
|
2305
2355
|
|
|
2306
|
-
|
|
2356
|
+
Invoke iteratee (function) for each object key-value pair
|
|
2357
|
+
and return a mapped object
|
|
2307
2358
|
|
|
2308
2359
|
|
|
2309
2360
|
|
|
@@ -2312,7 +2363,8 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
2312
2363
|
|
|
2313
2364
|
| Name | Type | Description | |
|
|
2314
2365
|
| ---- | ---- | ----------- | -------- |
|
|
2315
|
-
|
|
|
2366
|
+
| baseObject | `Object` | Base object. | |
|
|
2367
|
+
| iteratee | `Function` | The executed per iteration. | |
|
|
2316
2368
|
|
|
2317
2369
|
|
|
2318
2370
|
|
|
@@ -2320,13 +2372,18 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
2320
2372
|
##### Returns
|
|
2321
2373
|
|
|
2322
2374
|
|
|
2323
|
-
-
|
|
2375
|
+
- `Object` New mapped object.
|
|
2324
2376
|
|
|
2325
2377
|
|
|
2326
2378
|
|
|
2327
|
-
#### getFilter(filters, filter, getIndex)
|
|
2328
2379
|
|
|
2329
|
-
|
|
2380
|
+
### dist/general/object/mergeDeep.js
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
#### mergeDeep(obj1, obj2, settings)
|
|
2384
|
+
|
|
2385
|
+
Merges two objects into a new one.
|
|
2386
|
+
The second given argument to the first given argument.
|
|
2330
2387
|
|
|
2331
2388
|
|
|
2332
2389
|
|
|
@@ -2335,9 +2392,9 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
2335
2392
|
|
|
2336
2393
|
| Name | Type | Description | |
|
|
2337
2394
|
| ---- | ---- | ----------- | -------- |
|
|
2338
|
-
|
|
|
2339
|
-
|
|
|
2340
|
-
|
|
|
2395
|
+
| obj1 | | The target object | |
|
|
2396
|
+
| obj2 | | The object to be merged | |
|
|
2397
|
+
| settings | | Object settings for this function | |
|
|
2341
2398
|
|
|
2342
2399
|
|
|
2343
2400
|
|
|
@@ -2345,13 +2402,13 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
2345
2402
|
##### Returns
|
|
2346
2403
|
|
|
2347
2404
|
|
|
2348
|
-
-
|
|
2405
|
+
- a new merged object
|
|
2349
2406
|
|
|
2350
2407
|
|
|
2351
2408
|
|
|
2352
|
-
####
|
|
2409
|
+
#### isValid(obj1, obj2)
|
|
2353
2410
|
|
|
2354
|
-
|
|
2411
|
+
Validates if the two arguments are objects
|
|
2355
2412
|
|
|
2356
2413
|
|
|
2357
2414
|
|
|
@@ -2360,8 +2417,8 @@ Refines the values of the Ranking column type.
|
|
|
2360
2417
|
|
|
2361
2418
|
| Name | Type | Description | |
|
|
2362
2419
|
| ---- | ---- | ----------- | -------- |
|
|
2363
|
-
|
|
|
2364
|
-
|
|
|
2420
|
+
| obj1 | | The target object | |
|
|
2421
|
+
| obj2 | | The object to be merged | |
|
|
2365
2422
|
|
|
2366
2423
|
|
|
2367
2424
|
|
|
@@ -2369,17 +2426,13 @@ Refines the values of the Ranking column type.
|
|
|
2369
2426
|
##### Returns
|
|
2370
2427
|
|
|
2371
2428
|
|
|
2372
|
-
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2429
|
+
- true: they are valid; false: they are not
|
|
2376
2430
|
|
|
2377
|
-
### dist/filters/adapters/logicToUI.js
|
|
2378
2431
|
|
|
2379
2432
|
|
|
2380
|
-
####
|
|
2433
|
+
#### getParamsToMergeDeep(settings)
|
|
2381
2434
|
|
|
2382
|
-
|
|
2435
|
+
Validates and gets the settings with all set parameters.
|
|
2383
2436
|
|
|
2384
2437
|
|
|
2385
2438
|
|
|
@@ -2388,8 +2441,7 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
2388
2441
|
|
|
2389
2442
|
| Name | Type | Description | |
|
|
2390
2443
|
| ---- | ---- | ----------- | -------- |
|
|
2391
|
-
|
|
|
2392
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
2444
|
+
| settings | | the settings object | |
|
|
2393
2445
|
|
|
2394
2446
|
|
|
2395
2447
|
|
|
@@ -2397,17 +2449,17 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
2397
2449
|
##### Returns
|
|
2398
2450
|
|
|
2399
2451
|
|
|
2400
|
-
- a
|
|
2452
|
+
- a new settings object with all set parameters.
|
|
2401
2453
|
|
|
2402
2454
|
|
|
2403
2455
|
|
|
2404
2456
|
|
|
2405
|
-
### dist/
|
|
2457
|
+
### dist/general/object/objectCopy.js
|
|
2406
2458
|
|
|
2407
2459
|
|
|
2408
|
-
####
|
|
2460
|
+
#### objectCopy(entity, cache)
|
|
2409
2461
|
|
|
2410
|
-
|
|
2462
|
+
Created a new reference of the given argument
|
|
2411
2463
|
|
|
2412
2464
|
|
|
2413
2465
|
|
|
@@ -2416,77 +2468,26 @@ Transform the old filters structure into the new one
|
|
|
2416
2468
|
|
|
2417
2469
|
| Name | Type | Description | |
|
|
2418
2470
|
| ---- | ---- | ----------- | -------- |
|
|
2419
|
-
|
|
|
2420
|
-
|
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
##### Examples
|
|
2426
|
-
|
|
2427
|
-
```javascript
|
|
2471
|
+
| entity | | The variable to be copied | |
|
|
2472
|
+
| cache | | | |
|
|
2428
2473
|
|
|
2429
|
-
const oldPreferenceFilters = {
|
|
2430
|
-
"WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
|
|
2431
|
-
"WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
|
|
2432
|
-
"WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
|
|
2433
|
-
"WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
|
|
2434
|
-
"WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
|
|
2435
|
-
"formulaId": null,
|
|
2436
|
-
"panelId": null,
|
|
2437
|
-
"values": [
|
|
2438
|
-
{
|
|
2439
|
-
"EQUALS": [
|
|
2440
|
-
{
|
|
2441
|
-
"id": "AK4M8UV2a0",
|
|
2442
|
-
"value": "A",
|
|
2443
|
-
"enabled": true,
|
|
2444
|
-
"imageUrl": null
|
|
2445
|
-
},
|
|
2446
|
-
{
|
|
2447
|
-
"id": "AK4M8UV2a1",
|
|
2448
|
-
"value": "B",
|
|
2449
|
-
"enabled": true,
|
|
2450
|
-
"imageUrl": null
|
|
2451
|
-
}
|
|
2452
|
-
]
|
|
2453
|
-
}
|
|
2454
|
-
],
|
|
2455
|
-
"bucketId": null,
|
|
2456
|
-
"text": "MC",
|
|
2457
|
-
"title": "MC",
|
|
2458
|
-
"type": "SINGLE_CHOICE",
|
|
2459
|
-
"qid": "AK4M8UV2",
|
|
2460
|
-
"dataset": {
|
|
2461
|
-
"sourceid": "xYOQAdpqT",
|
|
2462
|
-
"name": "Form All Questions",
|
|
2463
|
-
"qrveyid": "xYOQAdpqT",
|
|
2464
|
-
"text": "Form All Questions",
|
|
2465
|
-
"linkid": 0
|
|
2466
|
-
},
|
|
2467
|
-
"enabled": true,
|
|
2468
|
-
"linked": null
|
|
2469
|
-
}
|
|
2470
|
-
};
|
|
2471
2474
|
|
|
2472
|
-
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
2473
|
-
```
|
|
2474
2475
|
|
|
2475
2476
|
|
|
2476
2477
|
##### Returns
|
|
2477
2478
|
|
|
2478
2479
|
|
|
2479
|
-
-
|
|
2480
|
+
- A new reference of the given argument
|
|
2480
2481
|
|
|
2481
2482
|
|
|
2482
2483
|
|
|
2483
2484
|
|
|
2484
|
-
### dist/
|
|
2485
|
+
### dist/general/object/omit.js
|
|
2485
2486
|
|
|
2486
2487
|
|
|
2487
|
-
####
|
|
2488
|
+
#### omit(obj, props)
|
|
2488
2489
|
|
|
2489
|
-
|
|
2490
|
+
return a new Object excluding attributes in _props_ list
|
|
2490
2491
|
|
|
2491
2492
|
|
|
2492
2493
|
|
|
@@ -2495,9 +2496,8 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
2495
2496
|
|
|
2496
2497
|
| Name | Type | Description | |
|
|
2497
2498
|
| ---- | ---- | ----------- | -------- |
|
|
2498
|
-
|
|
|
2499
|
-
|
|
|
2500
|
-
| currentScope | | | |
|
|
2499
|
+
| obj | `Object` | base object | |
|
|
2500
|
+
| props | `Array.<String>` | list of attribute to exclude | |
|
|
2501
2501
|
|
|
2502
2502
|
|
|
2503
2503
|
|
|
@@ -2505,17 +2505,17 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
2505
2505
|
##### Returns
|
|
2506
2506
|
|
|
2507
2507
|
|
|
2508
|
-
-
|
|
2508
|
+
- `Object` clean object
|
|
2509
2509
|
|
|
2510
2510
|
|
|
2511
2511
|
|
|
2512
2512
|
|
|
2513
|
-
### dist/
|
|
2513
|
+
### dist/general/object/pick.js
|
|
2514
2514
|
|
|
2515
2515
|
|
|
2516
|
-
####
|
|
2516
|
+
#### pick(baseObject, keys)
|
|
2517
2517
|
|
|
2518
|
-
|
|
2518
|
+
return a new object just with attributes in _keys_ list
|
|
2519
2519
|
|
|
2520
2520
|
|
|
2521
2521
|
|
|
@@ -2524,7 +2524,8 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
2524
2524
|
|
|
2525
2525
|
| Name | Type | Description | |
|
|
2526
2526
|
| ---- | ---- | ----------- | -------- |
|
|
2527
|
-
|
|
|
2527
|
+
| baseObject | `Object` | base object | |
|
|
2528
|
+
| keys | `Array.<String>` | list of attributes to preserve | |
|
|
2528
2529
|
|
|
2529
2530
|
|
|
2530
2531
|
|
|
@@ -2532,17 +2533,17 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
2532
2533
|
##### Returns
|
|
2533
2534
|
|
|
2534
2535
|
|
|
2535
|
-
-
|
|
2536
|
+
- `Object` new object just with desired attributes
|
|
2536
2537
|
|
|
2537
2538
|
|
|
2538
2539
|
|
|
2539
2540
|
|
|
2540
|
-
### dist/
|
|
2541
|
+
### dist/general/object/serialize.js
|
|
2541
2542
|
|
|
2542
2543
|
|
|
2543
|
-
####
|
|
2544
|
+
#### serialize(obj)
|
|
2544
2545
|
|
|
2545
|
-
|
|
2546
|
+
serialize object to url param
|
|
2546
2547
|
|
|
2547
2548
|
|
|
2548
2549
|
|
|
@@ -2551,7 +2552,7 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
2551
2552
|
|
|
2552
2553
|
| Name | Type | Description | |
|
|
2553
2554
|
| ---- | ---- | ----------- | -------- |
|
|
2554
|
-
|
|
|
2555
|
+
| obj | | - Object to be serialized | |
|
|
2555
2556
|
|
|
2556
2557
|
|
|
2557
2558
|
|
|
@@ -2559,17 +2560,17 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
2559
2560
|
##### Returns
|
|
2560
2561
|
|
|
2561
2562
|
|
|
2562
|
-
-
|
|
2563
|
+
- `Void`
|
|
2563
2564
|
|
|
2564
2565
|
|
|
2565
2566
|
|
|
2566
2567
|
|
|
2567
|
-
### dist/
|
|
2568
|
+
### dist/general/string/capitalize.js
|
|
2568
2569
|
|
|
2569
2570
|
|
|
2570
|
-
####
|
|
2571
|
+
#### capitalize(text)
|
|
2571
2572
|
|
|
2572
|
-
|
|
2573
|
+
Upper case the first letter of a given text
|
|
2573
2574
|
|
|
2574
2575
|
|
|
2575
2576
|
|
|
@@ -2578,8 +2579,7 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
2578
2579
|
|
|
2579
2580
|
| Name | Type | Description | |
|
|
2580
2581
|
| ---- | ---- | ----------- | -------- |
|
|
2581
|
-
|
|
|
2582
|
-
| currentScope | | Current scope type | |
|
|
2582
|
+
| text | `String` | | |
|
|
2583
2583
|
|
|
2584
2584
|
|
|
2585
2585
|
|
|
@@ -2587,7 +2587,7 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
2587
2587
|
##### Returns
|
|
2588
2588
|
|
|
2589
2589
|
|
|
2590
|
-
-
|
|
2590
|
+
- `String` a capitalized text
|
|
2591
2591
|
|
|
2592
2592
|
|
|
2593
2593
|
|