@qrvey/utils 1.2.4-25 → 1.2.4-26
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 +627 -627
- package/dist/charts/constants/AGGREGATE_INFO.js +9 -9
- package/dist/cjs/charts/constants/AGGREGATE_INFO.js +9 -9
- package/dist/cjs/columns/constants/COLUMN_INFO.js +1 -1
- package/dist/cjs/columns/constants/COLUMN_PROPERTY_INFO.js +2 -2
- package/dist/cjs/columns/constants/COMPLEX_COLUMN_INFO.js +5 -5
- package/dist/cjs/columns/constants/COMPLEX_COLUMN_PROPERTY_INFO.js +15 -15
- package/dist/cjs/columns/constants/COMPOUND_COLUMN_INFO.js +3 -3
- package/dist/cjs/columns/constants/COMPOUND_COLUMN_PROPERTY_INFO.js +12 -12
- package/dist/cjs/columns/constants/NUMERICAL_COLUMN_INFO.js +6 -6
- package/dist/cjs/dates/constants/DATE_DISTINCT_PROPERTY_INFO.js +3 -3
- package/dist/cjs/dates/constants/DATE_DISTINCT_TIME_PROPERTY_INFO.js +3 -3
- package/dist/cjs/dates/constants/DATE_GROUPING_PROPERTY_INFO.js +5 -5
- package/dist/cjs/dates/constants/DATE_GROUPING_TIME_PROPERTY_INFO.js +3 -3
- package/dist/cjs/dates/constants/DATE_YEAR_MONTHS_MMMM.d.ts +1 -0
- package/dist/cjs/dates/constants/DATE_YEAR_MONTHS_MMMM.js +4 -0
- package/dist/cjs/dates/constants/index.d.ts +1 -0
- package/dist/cjs/dates/constants/index.js +1 -0
- package/dist/cjs/dates/relative/constants/RELATIVE_CURSOR_INFO.js +3 -3
- package/dist/cjs/filters/constants/common/FILTER_DATE_SECTION_INFO.js +2 -2
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_INFO.js +8 -8
- package/dist/cjs/filters/constants/common/FILTER_VALIDATOR_INFO.js +21 -21
- package/dist/cjs/filters/helpers/ui/getFilterPropertyLabel.d.ts +2 -1
- package/dist/cjs/filters/helpers/ui/getFilterPropertyLabel.js +2 -2
- package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.d.ts +3 -0
- package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.js +61 -0
- package/dist/cjs/globalization/helpers/index.d.ts +1 -0
- package/dist/cjs/globalization/helpers/index.js +13 -0
- package/dist/cjs/globalization/index.d.ts +1 -0
- package/dist/cjs/globalization/index.js +1 -0
- package/dist/cjs/globalization/interfaces/II18nServiceTranslate.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/II18nServiceTranslate.js +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +1 -1
- package/dist/cjs/globalization/interfaces/common/II18nAgreggateLabels.d.ts +1 -1
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/common/II18nDateGrouping.d.ts +28 -0
- package/dist/cjs/globalization/interfaces/common/II18nDateGrouping.js +2 -0
- package/dist/cjs/globalization/interfaces/common/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/common/index.js +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilter.d.ts +3 -1
- package/dist/cjs/globalization/interfaces/filters/II18nFilterDateSections.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterDateSections.js +2 -0
- package/dist/cjs/globalization/interfaces/filters/II18nRelativeContainer.d.ts +1 -1
- package/dist/cjs/globalization/interfaces/filters/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/index.js +1 -0
- package/dist/cjs/globalization/interfaces/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/index.js +1 -0
- package/dist/cjs/globalization/labels/I18N_DEFAULT.js +2 -2
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +1 -1
- package/dist/cjs/globalization/labels/common/I18N_AGGREGATE_LABEL.js +1 -1
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/cjs/globalization/labels/common/I18N_DATE_GROUPING.d.ts +2 -0
- package/dist/cjs/globalization/labels/common/I18N_DATE_GROUPING.js +33 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +6 -1
- package/dist/cjs/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -1
- package/dist/cjs/interfaces/general/IGeneralInfo.d.ts +1 -0
- package/dist/cjs/qrvey/constants/CALCULATION_INFO.js +6 -6
- package/dist/cjs/qrvey/helpers/getPropertyLabel.d.ts +2 -1
- package/dist/cjs/qrvey/helpers/getPropertyLabel.js +6 -4
- package/dist/columns/constants/COLUMN_INFO.js +1 -1
- package/dist/columns/constants/COLUMN_PROPERTY_INFO.js +2 -2
- package/dist/columns/constants/COMPLEX_COLUMN_INFO.js +5 -5
- package/dist/columns/constants/COMPLEX_COLUMN_PROPERTY_INFO.js +15 -15
- package/dist/columns/constants/COMPOUND_COLUMN_INFO.js +3 -3
- package/dist/columns/constants/COMPOUND_COLUMN_PROPERTY_INFO.js +12 -12
- package/dist/columns/constants/NUMERICAL_COLUMN_INFO.js +6 -6
- package/dist/dates/constants/DATE_DISTINCT_PROPERTY_INFO.js +3 -3
- package/dist/dates/constants/DATE_DISTINCT_TIME_PROPERTY_INFO.js +3 -3
- package/dist/dates/constants/DATE_GROUPING_PROPERTY_INFO.js +5 -5
- package/dist/dates/constants/DATE_GROUPING_TIME_PROPERTY_INFO.js +3 -3
- package/dist/dates/constants/DATE_YEAR_MONTHS_MMMM.d.ts +1 -0
- package/dist/dates/constants/DATE_YEAR_MONTHS_MMMM.js +1 -0
- package/dist/dates/constants/index.d.ts +1 -0
- package/dist/dates/constants/index.js +1 -0
- package/dist/dates/relative/constants/RELATIVE_CURSOR_INFO.js +3 -3
- package/dist/filters/constants/common/FILTER_DATE_SECTION_INFO.js +2 -2
- package/dist/filters/constants/common/FILTER_SCOPE_INFO.js +8 -8
- package/dist/filters/constants/common/FILTER_VALIDATOR_INFO.js +21 -21
- package/dist/filters/helpers/ui/getFilterPropertyLabel.d.ts +2 -1
- package/dist/filters/helpers/ui/getFilterPropertyLabel.js +2 -2
- package/dist/globalization/helpers/getI18nDateGroupLabel.d.ts +3 -0
- package/dist/globalization/helpers/getI18nDateGroupLabel.js +57 -0
- package/dist/globalization/helpers/index.d.ts +1 -0
- package/dist/globalization/helpers/index.js +1 -0
- package/dist/globalization/index.d.ts +1 -0
- package/dist/globalization/index.js +1 -0
- package/dist/globalization/interfaces/II18nServiceTranslate.d.ts +4 -0
- package/dist/globalization/interfaces/II18nServiceTranslate.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +1 -1
- package/dist/globalization/interfaces/common/II18nAgreggateLabels.d.ts +1 -1
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/globalization/interfaces/common/II18nDateGrouping.d.ts +28 -0
- package/dist/globalization/interfaces/common/II18nDateGrouping.js +1 -0
- package/dist/globalization/interfaces/common/index.d.ts +1 -0
- package/dist/globalization/interfaces/common/index.js +1 -0
- package/dist/globalization/interfaces/filters/II18nFilter.d.ts +3 -1
- package/dist/globalization/interfaces/filters/II18nFilterDateSections.d.ts +4 -0
- package/dist/globalization/interfaces/filters/II18nFilterDateSections.js +1 -0
- package/dist/globalization/interfaces/filters/II18nRelativeContainer.d.ts +1 -1
- package/dist/globalization/interfaces/filters/index.d.ts +1 -0
- package/dist/globalization/interfaces/filters/index.js +1 -0
- package/dist/globalization/interfaces/index.d.ts +1 -0
- package/dist/globalization/interfaces/index.js +1 -0
- package/dist/globalization/labels/I18N_DEFAULT.js +2 -2
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +1 -1
- package/dist/globalization/labels/common/I18N_AGGREGATE_LABEL.js +1 -1
- package/dist/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/globalization/labels/common/I18N_DATE_GROUPING.d.ts +2 -0
- package/dist/globalization/labels/common/I18N_DATE_GROUPING.js +30 -0
- package/dist/globalization/labels/filters/I18N_FILTER.js +6 -1
- package/dist/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -1
- package/dist/interfaces/general/IGeneralInfo.d.ts +1 -0
- package/dist/qrvey/constants/CALCULATION_INFO.js +6 -6
- package/dist/qrvey/helpers/getPropertyLabel.d.ts +2 -1
- package/dist/qrvey/helpers/getPropertyLabel.js +6 -4
- package/package.json +1 -1
- package/src/charts/constants/AGGREGATE_INFO.ts +9 -9
- package/src/columns/constants/COLUMN_INFO.ts +22 -22
- package/src/columns/constants/COLUMN_PROPERTY_INFO.ts +2 -2
- package/src/columns/constants/COMPLEX_COLUMN_INFO.ts +5 -5
- package/src/columns/constants/COMPLEX_COLUMN_PROPERTY_INFO.ts +15 -15
- package/src/columns/constants/COMPOUND_COLUMN_INFO.ts +3 -3
- package/src/columns/constants/COMPOUND_COLUMN_PROPERTY_INFO.ts +12 -12
- package/src/columns/constants/NUMERICAL_COLUMN_INFO.ts +6 -6
- package/src/dates/constants/DATE_DISTINCT_PROPERTY_INFO.ts +3 -3
- package/src/dates/constants/DATE_DISTINCT_TIME_PROPERTY_INFO.ts +3 -3
- package/src/dates/constants/DATE_GROUPING_PROPERTY_INFO.ts +5 -5
- package/src/dates/constants/DATE_GROUPING_TIME_PROPERTY_INFO.ts +3 -3
- package/src/dates/constants/DATE_YEAR_MONTHS.ts +0 -1
- package/src/dates/constants/DATE_YEAR_MONTHS_MMMM.ts +1 -0
- package/src/dates/constants/index.ts +1 -0
- package/src/dates/relative/constants/RELATIVE_CURSOR_INFO.ts +3 -3
- package/src/filters/constants/common/FILTER_DATE_SECTION_INFO.ts +2 -2
- package/src/filters/constants/common/FILTER_SCOPE_INFO.ts +8 -8
- package/src/filters/constants/common/FILTER_VALIDATOR_INFO.ts +21 -21
- package/src/filters/helpers/ui/getFilterPropertyLabel.ts +3 -2
- package/src/globalization/helpers/getI18nDateGroupLabel.ts +66 -0
- package/src/globalization/helpers/index.ts +1 -0
- package/src/globalization/index.ts +1 -0
- package/src/globalization/interfaces/II18nServiceTranslate.ts +5 -0
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.ts +1 -1
- package/src/globalization/interfaces/common/II18nAgreggateLabels.ts +1 -1
- package/src/globalization/interfaces/common/II18nCommon.ts +2 -0
- package/src/globalization/interfaces/common/II18nDateGrouping.ts +30 -0
- package/src/globalization/interfaces/common/index.ts +2 -0
- package/src/globalization/interfaces/filters/II18nFilter.ts +3 -1
- package/src/globalization/interfaces/filters/II18nFilterDateSections.ts +4 -0
- package/src/globalization/interfaces/filters/II18nRelativeContainer.ts +1 -1
- package/src/globalization/interfaces/filters/index.ts +1 -0
- package/src/globalization/interfaces/index.ts +1 -0
- package/src/globalization/labels/I18N_DEFAULT.ts +2 -2
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.ts +1 -1
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +0 -1
- package/src/globalization/labels/common/I18N_AGGREGATE_LABEL.ts +1 -1
- package/src/globalization/labels/common/I18N_COMMON.ts +2 -0
- package/src/globalization/labels/common/I18N_DATE_GROUPING.ts +34 -0
- package/src/globalization/labels/filters/I18N_FILTER.ts +6 -1
- package/src/globalization/labels/filters/I18N_RELATIVE_CONTAINER.ts +1 -1
- package/src/interfaces/general/IGeneralInfo.ts +1 -0
- package/src/qrvey/constants/CALCULATION_INFO.ts +6 -6
- package/src/qrvey/helpers/getPropertyLabel.ts +6 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.4-
|
|
1
|
+
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.4-26*
|
|
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 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
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,13 +103,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
103
103
|
##### Returns
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
-
|
|
106
|
+
- The date object or the date in milliseconds
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
111
110
|
|
|
112
|
-
|
|
111
|
+
### dist/dates/adapters/monthYearToDate.js
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
#### monthYearToDate(monthYearDate, time)
|
|
115
|
+
|
|
116
|
+
Transforms String Date from a [Month Year] format to Date object.
|
|
113
117
|
|
|
114
118
|
|
|
115
119
|
|
|
@@ -118,8 +122,8 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
118
122
|
|
|
119
123
|
| Name | Type | Description | |
|
|
120
124
|
| ---- | ---- | ----------- | -------- |
|
|
121
|
-
|
|
|
122
|
-
|
|
|
125
|
+
| monthYearDate | | String of [Month Year] date | |
|
|
126
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
123
127
|
|
|
124
128
|
|
|
125
129
|
|
|
@@ -127,17 +131,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
127
131
|
##### Returns
|
|
128
132
|
|
|
129
133
|
|
|
130
|
-
-
|
|
134
|
+
- The date object or the date in milliseconds
|
|
131
135
|
|
|
132
136
|
|
|
133
137
|
|
|
134
138
|
|
|
135
|
-
### dist/
|
|
139
|
+
### dist/dates/adapters/quarterYearToDate.js
|
|
136
140
|
|
|
137
141
|
|
|
138
|
-
####
|
|
142
|
+
#### quarterYearToDate(quarterYearDate, time)
|
|
139
143
|
|
|
140
|
-
|
|
144
|
+
Transforms String Date from a [Quarter Year] format to Date object.
|
|
141
145
|
|
|
142
146
|
|
|
143
147
|
|
|
@@ -146,7 +150,8 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
146
150
|
|
|
147
151
|
| Name | Type | Description | |
|
|
148
152
|
| ---- | ---- | ----------- | -------- |
|
|
149
|
-
|
|
|
153
|
+
| quarterYearDate | | String of [Quarter Year] date | |
|
|
154
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
150
155
|
|
|
151
156
|
|
|
152
157
|
|
|
@@ -154,13 +159,17 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
154
159
|
##### Returns
|
|
155
160
|
|
|
156
161
|
|
|
157
|
-
-
|
|
162
|
+
- The date object or the date in milliseconds
|
|
158
163
|
|
|
159
164
|
|
|
160
165
|
|
|
161
|
-
#### getLogicBodyFromFD21(filterData)
|
|
162
166
|
|
|
163
|
-
|
|
167
|
+
### dist/dates/adapters/weekYearToDate.js
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
#### weekYearToDate(date, time)
|
|
171
|
+
|
|
172
|
+
Transforms String Date from a [Week Year] format to Date object.
|
|
164
173
|
|
|
165
174
|
|
|
166
175
|
|
|
@@ -169,7 +178,8 @@ Gets the logic body
|
|
|
169
178
|
|
|
170
179
|
| Name | Type | Description | |
|
|
171
180
|
| ---- | ---- | ----------- | -------- |
|
|
172
|
-
|
|
|
181
|
+
| date | | String of [Week Year] date | |
|
|
182
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
173
183
|
|
|
174
184
|
|
|
175
185
|
|
|
@@ -177,17 +187,17 @@ Gets the logic body
|
|
|
177
187
|
##### Returns
|
|
178
188
|
|
|
179
189
|
|
|
180
|
-
-
|
|
190
|
+
- The date object or the date in milliseconds
|
|
181
191
|
|
|
182
192
|
|
|
183
193
|
|
|
184
194
|
|
|
185
|
-
### dist/
|
|
195
|
+
### dist/dates/adapters/yearToDate.js
|
|
186
196
|
|
|
187
197
|
|
|
188
|
-
####
|
|
198
|
+
#### yearToDate(yearDate, time)
|
|
189
199
|
|
|
190
|
-
|
|
200
|
+
Transforms String Date from a [Year] format to Date object.
|
|
191
201
|
|
|
192
202
|
|
|
193
203
|
|
|
@@ -196,8 +206,8 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
196
206
|
|
|
197
207
|
| Name | Type | Description | |
|
|
198
208
|
| ---- | ---- | ----------- | -------- |
|
|
199
|
-
|
|
|
200
|
-
|
|
|
209
|
+
| yearDate | | String of [Year] date | |
|
|
210
|
+
| time | | Flag to parse the object date to milliseconds. | |
|
|
201
211
|
|
|
202
212
|
|
|
203
213
|
|
|
@@ -205,13 +215,17 @@ Generates a UI filter structure from Filter Data structure.
|
|
|
205
215
|
##### Returns
|
|
206
216
|
|
|
207
217
|
|
|
208
|
-
-
|
|
218
|
+
- The date object or the date in milliseconds
|
|
209
219
|
|
|
210
220
|
|
|
211
221
|
|
|
212
|
-
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
213
222
|
|
|
214
|
-
|
|
223
|
+
### dist/dates/helpers/getDateByDateFormat.js
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
#### getDateByDateFormat(date, format, time)
|
|
227
|
+
|
|
228
|
+
Gets a Date Object instance by a Date format
|
|
215
229
|
|
|
216
230
|
|
|
217
231
|
|
|
@@ -220,10 +234,9 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
220
234
|
|
|
221
235
|
| Name | Type | Description | |
|
|
222
236
|
| ---- | ---- | ----------- | -------- |
|
|
223
|
-
|
|
|
224
|
-
|
|
|
225
|
-
|
|
|
226
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
237
|
+
| date | | String with a formatted date | |
|
|
238
|
+
| format | | The date format | |
|
|
239
|
+
| time | | flag to convert the formatted date to miliseconds | |
|
|
227
240
|
|
|
228
241
|
|
|
229
242
|
|
|
@@ -231,17 +244,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
|
|
|
231
244
|
##### Returns
|
|
232
245
|
|
|
233
246
|
|
|
234
|
-
- a
|
|
247
|
+
- a Date object, milisecond time or the same value if date format does not match.
|
|
235
248
|
|
|
236
249
|
|
|
237
250
|
|
|
238
251
|
|
|
239
|
-
### dist/
|
|
252
|
+
### dist/dates/helpers/getDateFormatByProperty.js
|
|
240
253
|
|
|
241
254
|
|
|
242
|
-
####
|
|
255
|
+
#### getDateFormatByProperty(property)
|
|
243
256
|
|
|
244
|
-
|
|
257
|
+
Gets the date format by the given property
|
|
245
258
|
|
|
246
259
|
|
|
247
260
|
|
|
@@ -250,7 +263,7 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
250
263
|
|
|
251
264
|
| Name | Type | Description | |
|
|
252
265
|
| ---- | ---- | ----------- | -------- |
|
|
253
|
-
|
|
|
266
|
+
| property | | The Column Property | |
|
|
254
267
|
|
|
255
268
|
|
|
256
269
|
|
|
@@ -258,13 +271,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
|
258
271
|
##### Returns
|
|
259
272
|
|
|
260
273
|
|
|
261
|
-
-
|
|
274
|
+
- The date format
|
|
262
275
|
|
|
263
276
|
|
|
264
277
|
|
|
265
|
-
#### UI21ToFD(uFilterData, version)
|
|
266
278
|
|
|
267
|
-
|
|
279
|
+
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
#### getDateFormatRegularExpressionInArray(dateFormat)
|
|
283
|
+
|
|
284
|
+
Gets an array of regular expressions by the given date format
|
|
268
285
|
|
|
269
286
|
|
|
270
287
|
|
|
@@ -273,8 +290,7 @@ Builds the Fitler Data structure from UI filter data
|
|
|
273
290
|
|
|
274
291
|
| Name | Type | Description | |
|
|
275
292
|
| ---- | ---- | ----------- | -------- |
|
|
276
|
-
|
|
|
277
|
-
| version | | the version of the structure | |
|
|
293
|
+
| dateFormat | | the date format | |
|
|
278
294
|
|
|
279
295
|
|
|
280
296
|
|
|
@@ -282,17 +298,17 @@ Builds the Fitler Data structure from UI filter data
|
|
|
282
298
|
##### Returns
|
|
283
299
|
|
|
284
300
|
|
|
285
|
-
-
|
|
301
|
+
- an array of regular expressions
|
|
286
302
|
|
|
287
303
|
|
|
288
304
|
|
|
289
305
|
|
|
290
|
-
### dist/
|
|
306
|
+
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
291
307
|
|
|
292
308
|
|
|
293
|
-
####
|
|
309
|
+
#### getSeparatorByDateFormat(format)
|
|
294
310
|
|
|
295
|
-
|
|
311
|
+
Gets the separator of the date format
|
|
296
312
|
|
|
297
313
|
|
|
298
314
|
|
|
@@ -301,8 +317,7 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
301
317
|
|
|
302
318
|
| Name | Type | Description | |
|
|
303
319
|
| ---- | ---- | ----------- | -------- |
|
|
304
|
-
|
|
|
305
|
-
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
320
|
+
| format | | the date format | |
|
|
306
321
|
|
|
307
322
|
|
|
308
323
|
|
|
@@ -310,13 +325,18 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
|
310
325
|
##### Returns
|
|
311
326
|
|
|
312
327
|
|
|
313
|
-
- a
|
|
328
|
+
- a separator string
|
|
314
329
|
|
|
315
330
|
|
|
316
331
|
|
|
317
|
-
#### UI21ToFlatUI(scopes)
|
|
318
332
|
|
|
319
|
-
|
|
333
|
+
### dist/dates/helpers/getWeek.js
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
#### getWeek(date)
|
|
337
|
+
|
|
338
|
+
Gets the week number of the year
|
|
339
|
+
Additionally, the month and the year
|
|
320
340
|
|
|
321
341
|
|
|
322
342
|
|
|
@@ -325,7 +345,7 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
325
345
|
|
|
326
346
|
| Name | Type | Description | |
|
|
327
347
|
| ---- | ---- | ----------- | -------- |
|
|
328
|
-
|
|
|
348
|
+
| date | | the date object | |
|
|
329
349
|
|
|
330
350
|
|
|
331
351
|
|
|
@@ -333,18 +353,20 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
|
333
353
|
##### Returns
|
|
334
354
|
|
|
335
355
|
|
|
336
|
-
-
|
|
356
|
+
- an object with the week, month and year.
|
|
337
357
|
|
|
338
358
|
|
|
339
359
|
|
|
340
360
|
|
|
341
|
-
### dist/
|
|
361
|
+
### dist/dates/helpers/validateDate.js
|
|
342
362
|
|
|
343
363
|
|
|
344
|
-
####
|
|
364
|
+
#### validateDate(date, format)
|
|
345
365
|
|
|
346
|
-
|
|
347
|
-
|
|
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
|
|
348
370
|
|
|
349
371
|
|
|
350
372
|
|
|
@@ -353,7 +375,8 @@ Get the new property base on the old date grouping properties
|
|
|
353
375
|
|
|
354
376
|
| Name | Type | Description | |
|
|
355
377
|
| ---- | ---- | ----------- | -------- |
|
|
356
|
-
|
|
|
378
|
+
| date | | String of date | |
|
|
379
|
+
| format | | String of the format to validate | |
|
|
357
380
|
|
|
358
381
|
|
|
359
382
|
|
|
@@ -361,17 +384,17 @@ Get the new property base on the old date grouping properties
|
|
|
361
384
|
##### Returns
|
|
362
385
|
|
|
363
386
|
|
|
364
|
-
-
|
|
387
|
+
- True if it is valid or not. Undefined if date is undefined
|
|
365
388
|
|
|
366
389
|
|
|
367
390
|
|
|
368
391
|
|
|
369
|
-
### dist/
|
|
392
|
+
### dist/dates/helpers/validateDateByDateFormat.js
|
|
370
393
|
|
|
371
394
|
|
|
372
|
-
####
|
|
395
|
+
#### validateDateByDateFormat(date, dateForma)
|
|
373
396
|
|
|
374
|
-
|
|
397
|
+
Validates the given string as Date by its date format.
|
|
375
398
|
|
|
376
399
|
|
|
377
400
|
|
|
@@ -380,9 +403,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
380
403
|
|
|
381
404
|
| Name | Type | Description | |
|
|
382
405
|
| ---- | ---- | ----------- | -------- |
|
|
383
|
-
|
|
|
384
|
-
|
|
|
385
|
-
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
406
|
+
| date | | a string to validate as date form | |
|
|
407
|
+
| dateForma | | the format of the date to validate the string | |
|
|
386
408
|
|
|
387
409
|
|
|
388
410
|
|
|
@@ -390,18 +412,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
|
390
412
|
##### Returns
|
|
391
413
|
|
|
392
414
|
|
|
393
|
-
-
|
|
415
|
+
- true: the string is a valida date
|
|
394
416
|
|
|
395
417
|
|
|
396
418
|
|
|
397
419
|
|
|
398
|
-
### dist/
|
|
420
|
+
### dist/dates/range/getDateRange.js
|
|
399
421
|
|
|
400
422
|
|
|
401
|
-
####
|
|
423
|
+
#### getDateRange(value, dateGroupLabel, withTime)
|
|
402
424
|
|
|
403
|
-
|
|
404
|
-
Gets an adapted filter value array. Validates the enabled property and sets
|
|
425
|
+
Get date range object from a string date value
|
|
405
426
|
|
|
406
427
|
|
|
407
428
|
|
|
@@ -410,59 +431,74 @@ Gets an adapted filter value array. Validates the enabled property and sets
|
|
|
410
431
|
|
|
411
432
|
| Name | Type | Description | |
|
|
412
433
|
| ---- | ---- | ----------- | -------- |
|
|
413
|
-
|
|
|
414
|
-
|
|
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 | |
|
|
415
437
|
|
|
416
438
|
|
|
417
439
|
|
|
418
|
-
##### Returns
|
|
419
440
|
|
|
441
|
+
##### Examples
|
|
420
442
|
|
|
421
|
-
|
|
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
|
+
}
|
|
422
451
|
|
|
452
|
+
// 2) Quarter:
|
|
453
|
+
getDateRange('Q3 2020', 'QUARTER');
|
|
454
|
+
// Will return:
|
|
455
|
+
{
|
|
456
|
+
from: '07/01/2020 00:00:00',
|
|
457
|
+
to: '09/30/2020 23:59:59'
|
|
458
|
+
}
|
|
423
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
|
+
```
|
|
424
468
|
|
|
425
469
|
|
|
426
|
-
|
|
470
|
+
##### Returns
|
|
427
471
|
|
|
428
472
|
|
|
429
|
-
|
|
473
|
+
- `Object` an object with the date range with two string date properties: from and to
|
|
430
474
|
|
|
431
|
-
Generates a filter data structure from the flatttened UI filters.
|
|
432
475
|
|
|
433
476
|
|
|
434
477
|
|
|
478
|
+
### dist/dates/relative/Adapter.js
|
|
435
479
|
|
|
436
|
-
##### Parameters
|
|
437
480
|
|
|
438
|
-
|
|
439
|
-
| ---- | ---- | ----------- | -------- |
|
|
440
|
-
| uFilters | | Array of flattened filters from UI | |
|
|
441
|
-
| version | | Tag for the version of the filter data structure | |
|
|
481
|
+
#### value()
|
|
442
482
|
|
|
483
|
+
Resolves statement and returns statement value
|
|
443
484
|
|
|
444
485
|
|
|
445
486
|
|
|
446
|
-
##### Returns
|
|
447
487
|
|
|
448
488
|
|
|
449
|
-
- a Filter Data.
|
|
450
489
|
|
|
490
|
+
##### Returns
|
|
451
491
|
|
|
452
492
|
|
|
453
|
-
|
|
493
|
+
- `AbsoluteRange` `string`
|
|
454
494
|
|
|
455
|
-
Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
|
|
456
|
-
Also, adds and organizes filters by datasets
|
|
457
495
|
|
|
458
496
|
|
|
497
|
+
#### valueAsAnchor()
|
|
459
498
|
|
|
499
|
+
Resolves statement as an anchor
|
|
460
500
|
|
|
461
|
-
##### Parameters
|
|
462
501
|
|
|
463
|
-
| Name | Type | Description | |
|
|
464
|
-
| ---- | ---- | ----------- | -------- |
|
|
465
|
-
| fbFilters | | Array of flat filters from UI | |
|
|
466
502
|
|
|
467
503
|
|
|
468
504
|
|
|
@@ -470,86 +506,77 @@ Also, adds and organizes filters by datasets
|
|
|
470
506
|
##### Returns
|
|
471
507
|
|
|
472
508
|
|
|
473
|
-
-
|
|
509
|
+
- `string`
|
|
474
510
|
|
|
475
511
|
|
|
476
512
|
|
|
477
|
-
####
|
|
513
|
+
#### _statementToRange() *private method*
|
|
478
514
|
|
|
479
|
-
|
|
515
|
+
Convert verbal statement to range value
|
|
480
516
|
|
|
481
517
|
|
|
482
518
|
|
|
483
519
|
|
|
484
|
-
##### Parameters
|
|
485
520
|
|
|
486
|
-
| Name | Type | Description | |
|
|
487
|
-
| ---- | ---- | ----------- | -------- |
|
|
488
|
-
| uFilter | | UI structure filter | |
|
|
489
521
|
|
|
522
|
+
##### Returns
|
|
490
523
|
|
|
491
524
|
|
|
525
|
+
- `AbsoluteRange`
|
|
492
526
|
|
|
493
|
-
##### Returns
|
|
494
527
|
|
|
495
528
|
|
|
496
|
-
|
|
529
|
+
#### _resolveAsThis() *private method*
|
|
497
530
|
|
|
531
|
+
Apply 'this' cursor logic to statement
|
|
498
532
|
|
|
499
533
|
|
|
500
|
-
#### buildDataset(uFilter)
|
|
501
534
|
|
|
502
|
-
Gets an dataset structure for the filter data
|
|
503
535
|
|
|
504
536
|
|
|
505
537
|
|
|
538
|
+
##### Returns
|
|
506
539
|
|
|
507
|
-
##### Parameters
|
|
508
540
|
|
|
509
|
-
|
|
510
|
-
| ---- | ---- | ----------- | -------- |
|
|
511
|
-
| uFilter | | a UI structure filter | |
|
|
541
|
+
- `AbsoluteStatement`
|
|
512
542
|
|
|
513
543
|
|
|
514
544
|
|
|
545
|
+
#### _resolveAsTheLast() *private method*
|
|
515
546
|
|
|
516
|
-
|
|
547
|
+
Apply 'the last' cursor logic to statement
|
|
517
548
|
|
|
518
549
|
|
|
519
|
-
- an dataset structure
|
|
520
550
|
|
|
521
551
|
|
|
522
552
|
|
|
523
|
-
#### buildFilter(uFilter)
|
|
524
553
|
|
|
525
|
-
|
|
554
|
+
##### Returns
|
|
526
555
|
|
|
527
556
|
|
|
557
|
+
- `AbsoluteStatement`
|
|
528
558
|
|
|
529
559
|
|
|
530
|
-
##### Parameters
|
|
531
560
|
|
|
532
|
-
|
|
533
|
-
| ---- | ---- | ----------- | -------- |
|
|
534
|
-
| uFilter | | a UI structure filter | |
|
|
561
|
+
#### _resolveAsTheNext() *private method*
|
|
535
562
|
|
|
563
|
+
Apply 'the next' cursor logic to statement
|
|
536
564
|
|
|
537
565
|
|
|
538
566
|
|
|
539
|
-
##### Returns
|
|
540
567
|
|
|
541
568
|
|
|
542
|
-
- an filter structure
|
|
543
569
|
|
|
570
|
+
##### Returns
|
|
544
571
|
|
|
545
572
|
|
|
573
|
+
- `AbsoluteStatement`
|
|
546
574
|
|
|
547
|
-
### dist/filters/adapters/flatUIToLogic.js
|
|
548
575
|
|
|
549
576
|
|
|
550
|
-
####
|
|
577
|
+
#### replaceNowToken(value, now)
|
|
551
578
|
|
|
552
|
-
|
|
579
|
+
Replace '@now' token inside a string
|
|
553
580
|
|
|
554
581
|
|
|
555
582
|
|
|
@@ -558,7 +585,8 @@ Generates a Logic structure from flattened UI filters
|
|
|
558
585
|
|
|
559
586
|
| Name | Type | Description | |
|
|
560
587
|
| ---- | ---- | ----------- | -------- |
|
|
561
|
-
|
|
|
588
|
+
| value | `string` | | |
|
|
589
|
+
| now | `Date` | | |
|
|
562
590
|
|
|
563
591
|
|
|
564
592
|
|
|
@@ -566,17 +594,13 @@ Generates a Logic structure from flattened UI filters
|
|
|
566
594
|
##### Returns
|
|
567
595
|
|
|
568
596
|
|
|
569
|
-
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
597
|
+
- `string`
|
|
573
598
|
|
|
574
|
-
### dist/filters/adapters/flatUIToOldLogic.js
|
|
575
599
|
|
|
576
600
|
|
|
577
|
-
####
|
|
601
|
+
#### convertRelativeToAbsolute(args)
|
|
578
602
|
|
|
579
|
-
|
|
603
|
+
Returns a range object (date) from a group of statement params
|
|
580
604
|
|
|
581
605
|
|
|
582
606
|
|
|
@@ -585,25 +609,45 @@ Generates a Logic structure from flattened UI filters
|
|
|
585
609
|
|
|
586
610
|
| Name | Type | Description | |
|
|
587
611
|
| ---- | ---- | ----------- | -------- |
|
|
588
|
-
|
|
|
612
|
+
| args | `RelativeToAbsoluteStruct` | | |
|
|
589
613
|
|
|
590
614
|
|
|
591
615
|
|
|
592
616
|
|
|
617
|
+
##### Examples
|
|
618
|
+
|
|
619
|
+
```javascript
|
|
620
|
+
pivot = '2021-03-03T12:30:40'
|
|
621
|
+
unit = month
|
|
622
|
+
steps = 2
|
|
623
|
+
setTo = END
|
|
624
|
+
resolverAsCalendar: true
|
|
625
|
+
=> Returns '2021-05-31T23:59:59'
|
|
626
|
+
```
|
|
627
|
+
```javascript
|
|
628
|
+
pivot = '2021-03-03T12:30:40'
|
|
629
|
+
unit = month
|
|
630
|
+
steps = -2
|
|
631
|
+
setTo = START
|
|
632
|
+
resolverAsCalendar: false
|
|
633
|
+
=> Returns '2021-01-03T00:00:00'
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
|
|
593
637
|
##### Returns
|
|
594
638
|
|
|
595
639
|
|
|
596
|
-
-
|
|
640
|
+
- `string`
|
|
597
641
|
|
|
598
642
|
|
|
599
643
|
|
|
600
644
|
|
|
601
|
-
### dist/
|
|
645
|
+
### dist/dates/relative/relative.js
|
|
602
646
|
|
|
603
647
|
|
|
604
|
-
####
|
|
648
|
+
#### resolveRelative(statements, clock)
|
|
605
649
|
|
|
606
|
-
|
|
650
|
+
Resolve a list of relative statements according to operator
|
|
607
651
|
|
|
608
652
|
|
|
609
653
|
|
|
@@ -612,32 +656,46 @@ Generates a UI filter data structure from the flatttened UI filters.
|
|
|
612
656
|
|
|
613
657
|
| Name | Type | Description | |
|
|
614
658
|
| ---- | ---- | ----------- | -------- |
|
|
615
|
-
|
|
|
616
|
-
|
|
|
659
|
+
| statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | |
|
|
660
|
+
| clock | `Date` | - Clock/time reference for relative date resolution | |
|
|
617
661
|
|
|
618
662
|
|
|
619
663
|
|
|
620
664
|
|
|
665
|
+
##### Examples
|
|
666
|
+
|
|
667
|
+
```javascript
|
|
668
|
+
Input:
|
|
669
|
+
{
|
|
670
|
+
"cursor": "the_next",
|
|
671
|
+
"unit": "year",
|
|
672
|
+
"number": 1,
|
|
673
|
+
"includeCurrent": false,
|
|
674
|
+
"isCalendarDate": false,
|
|
675
|
+
"anchor": "03/05/2021"
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
Output:
|
|
679
|
+
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
|
|
621
683
|
##### Returns
|
|
622
684
|
|
|
623
685
|
|
|
624
|
-
-
|
|
686
|
+
- `Array.<AbsoluteRange>` `Array.<string>`
|
|
625
687
|
|
|
626
688
|
|
|
627
689
|
|
|
628
|
-
#### buildScopes(fbFilters)
|
|
629
690
|
|
|
630
|
-
|
|
631
|
-
Also, adds and organizes filters by datasets
|
|
691
|
+
### dist/filters/classes/FilterInputErrorHandler.js
|
|
632
692
|
|
|
633
693
|
|
|
694
|
+
#### new FilterInputErrorHandler()
|
|
695
|
+
|
|
634
696
|
|
|
635
697
|
|
|
636
|
-
##### Parameters
|
|
637
698
|
|
|
638
|
-
| Name | Type | Description | |
|
|
639
|
-
| ---- | ---- | ----------- | -------- |
|
|
640
|
-
| fbFilters | | Array of flat filters from UI | |
|
|
641
699
|
|
|
642
700
|
|
|
643
701
|
|
|
@@ -645,13 +703,17 @@ Also, adds and organizes filters by datasets
|
|
|
645
703
|
##### Returns
|
|
646
704
|
|
|
647
705
|
|
|
648
|
-
-
|
|
706
|
+
- `Void`
|
|
649
707
|
|
|
650
708
|
|
|
651
709
|
|
|
652
|
-
#### buildScope(uFilter)
|
|
653
710
|
|
|
654
|
-
|
|
711
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
715
|
+
|
|
716
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
655
717
|
|
|
656
718
|
|
|
657
719
|
|
|
@@ -660,7 +722,8 @@ Gets an scope structure for the UI filter data
|
|
|
660
722
|
|
|
661
723
|
| Name | Type | Description | |
|
|
662
724
|
| ---- | ---- | ----------- | -------- |
|
|
663
|
-
|
|
|
725
|
+
| filterData | | The filter data object. | |
|
|
726
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
664
727
|
|
|
665
728
|
|
|
666
729
|
|
|
@@ -668,13 +731,13 @@ Gets an scope structure for the UI filter data
|
|
|
668
731
|
##### Returns
|
|
669
732
|
|
|
670
733
|
|
|
671
|
-
-
|
|
734
|
+
- a flattened UI filters array
|
|
672
735
|
|
|
673
736
|
|
|
674
737
|
|
|
675
|
-
####
|
|
738
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
676
739
|
|
|
677
|
-
|
|
740
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
678
741
|
|
|
679
742
|
|
|
680
743
|
|
|
@@ -683,7 +746,8 @@ Gets an dataset structure for the UI filter data
|
|
|
683
746
|
|
|
684
747
|
| Name | Type | Description | |
|
|
685
748
|
| ---- | ---- | ----------- | -------- |
|
|
686
|
-
|
|
|
749
|
+
| scopes | | The filter scope section | |
|
|
750
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
687
751
|
|
|
688
752
|
|
|
689
753
|
|
|
@@ -691,13 +755,17 @@ Gets an dataset structure for the UI filter data
|
|
|
691
755
|
##### Returns
|
|
692
756
|
|
|
693
757
|
|
|
694
|
-
-
|
|
758
|
+
- a flattened UI filters array
|
|
695
759
|
|
|
696
760
|
|
|
697
761
|
|
|
698
|
-
#### buildFilter(uFilter)
|
|
699
762
|
|
|
700
|
-
|
|
763
|
+
### dist/filters/adapters/FDToLogic.js
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
#### FDToLogic(filterData)
|
|
767
|
+
|
|
768
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
701
769
|
|
|
702
770
|
|
|
703
771
|
|
|
@@ -706,7 +774,7 @@ Gets an filter structure for the UI filter data
|
|
|
706
774
|
|
|
707
775
|
| Name | Type | Description | |
|
|
708
776
|
| ---- | ---- | ----------- | -------- |
|
|
709
|
-
|
|
|
777
|
+
| filterData | | The filter data object. | |
|
|
710
778
|
|
|
711
779
|
|
|
712
780
|
|
|
@@ -714,17 +782,13 @@ Gets an filter structure for the UI filter data
|
|
|
714
782
|
##### Returns
|
|
715
783
|
|
|
716
784
|
|
|
717
|
-
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
785
|
+
- a filter logic array
|
|
721
786
|
|
|
722
|
-
### dist/filters/adapters/logicToFD.js
|
|
723
787
|
|
|
724
788
|
|
|
725
|
-
####
|
|
789
|
+
#### getLogicBodyFromFD21(filterData)
|
|
726
790
|
|
|
727
|
-
|
|
791
|
+
Gets the logic body
|
|
728
792
|
|
|
729
793
|
|
|
730
794
|
|
|
@@ -733,8 +797,7 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
733
797
|
|
|
734
798
|
| Name | Type | Description | |
|
|
735
799
|
| ---- | ---- | ----------- | -------- |
|
|
736
|
-
| filterData | | The
|
|
737
|
-
| version | | Tag for the version of the filter data structure | |
|
|
800
|
+
| filterData | | The filter data object | |
|
|
738
801
|
|
|
739
802
|
|
|
740
803
|
|
|
@@ -742,17 +805,17 @@ Generates a filter data structure from the old logic structure (v2.0).
|
|
|
742
805
|
##### Returns
|
|
743
806
|
|
|
744
807
|
|
|
745
|
-
- a
|
|
808
|
+
- a filter logic array
|
|
746
809
|
|
|
747
810
|
|
|
748
811
|
|
|
749
812
|
|
|
750
|
-
### dist/filters/adapters/
|
|
813
|
+
### dist/filters/adapters/FDToUI.js
|
|
751
814
|
|
|
752
815
|
|
|
753
|
-
####
|
|
816
|
+
#### FDToUI(filterData, datasetsInfo)
|
|
754
817
|
|
|
755
|
-
|
|
818
|
+
Generates a UI filter structure from Filter Data structure.
|
|
756
819
|
|
|
757
820
|
|
|
758
821
|
|
|
@@ -761,7 +824,8 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
761
824
|
|
|
762
825
|
| Name | Type | Description | |
|
|
763
826
|
| ---- | ---- | ----------- | -------- |
|
|
764
|
-
|
|
|
827
|
+
| filterData | | The filter data object. | |
|
|
828
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
765
829
|
|
|
766
830
|
|
|
767
831
|
|
|
@@ -769,13 +833,13 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
|
769
833
|
##### Returns
|
|
770
834
|
|
|
771
835
|
|
|
772
|
-
-
|
|
836
|
+
- a UI Filters structure
|
|
773
837
|
|
|
774
838
|
|
|
775
839
|
|
|
776
|
-
####
|
|
840
|
+
#### FD21ToUI(scopes, section, version, datasetsInfo)
|
|
777
841
|
|
|
778
|
-
|
|
842
|
+
Generates a UI filter Structure from the Filter Data structure v2.1
|
|
779
843
|
|
|
780
844
|
|
|
781
845
|
|
|
@@ -784,9 +848,10 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
784
848
|
|
|
785
849
|
| Name | Type | Description | |
|
|
786
850
|
| ---- | ---- | ----------- | -------- |
|
|
787
|
-
|
|
|
788
|
-
|
|
|
789
|
-
|
|
|
851
|
+
| scopes | | The filter scope section | |
|
|
852
|
+
| section | | The filter section. | |
|
|
853
|
+
| version | | The version of the filter structure | |
|
|
854
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
790
855
|
|
|
791
856
|
|
|
792
857
|
|
|
@@ -794,13 +859,17 @@ Get the filter or the index of the given array, validating an old filter structu
|
|
|
794
859
|
##### Returns
|
|
795
860
|
|
|
796
861
|
|
|
797
|
-
-
|
|
862
|
+
- a UI filter Structure
|
|
798
863
|
|
|
799
864
|
|
|
800
865
|
|
|
801
|
-
#### refineRankingValues(values, uiValues)
|
|
802
866
|
|
|
803
|
-
|
|
867
|
+
### dist/filters/adapters/UIToFD.js
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
#### UIToFD(filterData)
|
|
871
|
+
|
|
872
|
+
Generates a Filter Data Structure structure from UI Filter Data structure.
|
|
804
873
|
|
|
805
874
|
|
|
806
875
|
|
|
@@ -809,8 +878,7 @@ Refines the values of the Ranking column type.
|
|
|
809
878
|
|
|
810
879
|
| Name | Type | Description | |
|
|
811
880
|
| ---- | ---- | ----------- | -------- |
|
|
812
|
-
|
|
|
813
|
-
| uiValues | | Object with additional info about the values of the filter. | |
|
|
881
|
+
| filterData | | The UI filter data object. | |
|
|
814
882
|
|
|
815
883
|
|
|
816
884
|
|
|
@@ -818,17 +886,13 @@ Refines the values of the Ranking column type.
|
|
|
818
886
|
##### Returns
|
|
819
887
|
|
|
820
888
|
|
|
821
|
-
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
889
|
+
- a Filter Data structure
|
|
825
890
|
|
|
826
|
-
### dist/filters/adapters/logicToUI.js
|
|
827
891
|
|
|
828
892
|
|
|
829
|
-
####
|
|
893
|
+
#### UI21ToFD(uFilterData, version)
|
|
830
894
|
|
|
831
|
-
|
|
895
|
+
Builds the Fitler Data structure from UI filter data
|
|
832
896
|
|
|
833
897
|
|
|
834
898
|
|
|
@@ -837,8 +901,8 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
837
901
|
|
|
838
902
|
| Name | Type | Description | |
|
|
839
903
|
| ---- | ---- | ----------- | -------- |
|
|
840
|
-
|
|
|
841
|
-
|
|
|
904
|
+
| uFilterData | | The UI filter Data object | |
|
|
905
|
+
| version | | the version of the structure | |
|
|
842
906
|
|
|
843
907
|
|
|
844
908
|
|
|
@@ -846,17 +910,17 @@ Generates a UI filter structure from the old logic structure (v2.0).
|
|
|
846
910
|
##### Returns
|
|
847
911
|
|
|
848
912
|
|
|
849
|
-
-
|
|
913
|
+
-
|
|
850
914
|
|
|
851
915
|
|
|
852
916
|
|
|
853
917
|
|
|
854
|
-
### dist/filters/adapters/
|
|
918
|
+
### dist/filters/adapters/UIToFlatUI.js
|
|
855
919
|
|
|
856
920
|
|
|
857
|
-
####
|
|
921
|
+
#### UIToFlatUI(filterData, datasetsInfo)
|
|
858
922
|
|
|
859
|
-
|
|
923
|
+
Generates a Flattened UI filter structure from UI Filter Data structure.
|
|
860
924
|
|
|
861
925
|
|
|
862
926
|
|
|
@@ -865,97 +929,50 @@ Transform the old filters structure into the new one
|
|
|
865
929
|
|
|
866
930
|
| Name | Type | Description | |
|
|
867
931
|
| ---- | ---- | ----------- | -------- |
|
|
868
|
-
|
|
|
869
|
-
|
|
|
932
|
+
| filterData | | The UI filter data object. | |
|
|
933
|
+
| datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | |
|
|
870
934
|
|
|
871
935
|
|
|
872
936
|
|
|
873
937
|
|
|
874
|
-
#####
|
|
938
|
+
##### Returns
|
|
875
939
|
|
|
876
|
-
```javascript
|
|
877
940
|
|
|
878
|
-
|
|
879
|
-
"WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
|
|
880
|
-
"WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
|
|
881
|
-
"WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
|
|
882
|
-
"WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
|
|
883
|
-
"WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
|
|
884
|
-
"formulaId": null,
|
|
885
|
-
"panelId": null,
|
|
886
|
-
"values": [
|
|
887
|
-
{
|
|
888
|
-
"EQUALS": [
|
|
889
|
-
{
|
|
890
|
-
"id": "AK4M8UV2a0",
|
|
891
|
-
"value": "A",
|
|
892
|
-
"enabled": true,
|
|
893
|
-
"imageUrl": null
|
|
894
|
-
},
|
|
895
|
-
{
|
|
896
|
-
"id": "AK4M8UV2a1",
|
|
897
|
-
"value": "B",
|
|
898
|
-
"enabled": true,
|
|
899
|
-
"imageUrl": null
|
|
900
|
-
}
|
|
901
|
-
]
|
|
902
|
-
}
|
|
903
|
-
],
|
|
904
|
-
"bucketId": null,
|
|
905
|
-
"text": "MC",
|
|
906
|
-
"title": "MC",
|
|
907
|
-
"type": "SINGLE_CHOICE",
|
|
908
|
-
"qid": "AK4M8UV2",
|
|
909
|
-
"dataset": {
|
|
910
|
-
"sourceid": "xYOQAdpqT",
|
|
911
|
-
"name": "Form All Questions",
|
|
912
|
-
"qrveyid": "xYOQAdpqT",
|
|
913
|
-
"text": "Form All Questions",
|
|
914
|
-
"linkid": 0
|
|
915
|
-
},
|
|
916
|
-
"enabled": true,
|
|
917
|
-
"linked": null
|
|
918
|
-
}
|
|
919
|
-
};
|
|
941
|
+
- a flattened UI filters array
|
|
920
942
|
|
|
921
|
-
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
922
|
-
```
|
|
923
943
|
|
|
924
944
|
|
|
925
|
-
|
|
945
|
+
#### UI21ToFlatUI(scopes)
|
|
926
946
|
|
|
947
|
+
Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
|
|
927
948
|
|
|
928
|
-
- `Object` an object with the new filters structure
|
|
929
949
|
|
|
930
950
|
|
|
931
951
|
|
|
952
|
+
##### Parameters
|
|
932
953
|
|
|
933
|
-
|
|
954
|
+
| Name | Type | Description | |
|
|
955
|
+
| ---- | ---- | ----------- | -------- |
|
|
956
|
+
| scopes | | The filter scope section | |
|
|
934
957
|
|
|
935
958
|
|
|
936
|
-
#### new FilterInputErrorHandler()
|
|
937
959
|
|
|
938
960
|
|
|
961
|
+
##### Returns
|
|
939
962
|
|
|
940
963
|
|
|
964
|
+
- a flattened UI filters array
|
|
941
965
|
|
|
942
966
|
|
|
943
967
|
|
|
944
968
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
- `Void`
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
### dist/filters/helpers/applyHierarchyForAggFilters.js
|
|
969
|
+
### dist/filters/adapters/adaptDateGroupingProperty.js
|
|
954
970
|
|
|
955
971
|
|
|
956
|
-
####
|
|
972
|
+
#### adaptDateGroupingProperty(property)
|
|
957
973
|
|
|
958
|
-
[TODO:
|
|
974
|
+
[TODO: For 2022, eliminate this adapter]
|
|
975
|
+
Get the new property base on the old date grouping properties
|
|
959
976
|
|
|
960
977
|
|
|
961
978
|
|
|
@@ -964,9 +981,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
964
981
|
|
|
965
982
|
| Name | Type | Description | |
|
|
966
983
|
| ---- | ---- | ----------- | -------- |
|
|
967
|
-
|
|
|
968
|
-
| scopes | | | |
|
|
969
|
-
| currentScope | | | |
|
|
984
|
+
| property | | | |
|
|
970
985
|
|
|
971
986
|
|
|
972
987
|
|
|
@@ -979,12 +994,12 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
|
979
994
|
|
|
980
995
|
|
|
981
996
|
|
|
982
|
-
### dist/filters/
|
|
997
|
+
### dist/filters/adapters/adaptFilterData.js
|
|
983
998
|
|
|
984
999
|
|
|
985
|
-
####
|
|
1000
|
+
#### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
|
|
986
1001
|
|
|
987
|
-
|
|
1002
|
+
Checks and adapts the v2.0 Filter Data Structure to the v2.1
|
|
988
1003
|
|
|
989
1004
|
|
|
990
1005
|
|
|
@@ -993,7 +1008,9 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
993
1008
|
|
|
994
1009
|
| Name | Type | Description | |
|
|
995
1010
|
| ---- | ---- | ----------- | -------- |
|
|
996
|
-
|
|
|
1011
|
+
| filterData | | The filter data structure. Accepts both v2.1 or v2.0 | |
|
|
1012
|
+
| getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | |
|
|
1013
|
+
| datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | |
|
|
997
1014
|
|
|
998
1015
|
|
|
999
1016
|
|
|
@@ -1001,17 +1018,18 @@ Gets Scopes/Scope IDs by given IDs
|
|
|
1001
1018
|
##### Returns
|
|
1002
1019
|
|
|
1003
1020
|
|
|
1004
|
-
-
|
|
1021
|
+
- A new filter data structure v2.1
|
|
1005
1022
|
|
|
1006
1023
|
|
|
1007
1024
|
|
|
1008
1025
|
|
|
1009
|
-
### dist/filters/
|
|
1026
|
+
### dist/filters/adapters/adaptFilterValues.js
|
|
1010
1027
|
|
|
1011
1028
|
|
|
1012
|
-
####
|
|
1029
|
+
#### adaptFilterValues(filter)
|
|
1013
1030
|
|
|
1014
|
-
|
|
1031
|
+
[TODO: For 2022, eliminate this adapter]
|
|
1032
|
+
Gets an adapted filter value array. Validates the enabled property and sets
|
|
1015
1033
|
|
|
1016
1034
|
|
|
1017
1035
|
|
|
@@ -1020,7 +1038,7 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1020
1038
|
|
|
1021
1039
|
| Name | Type | Description | |
|
|
1022
1040
|
| ---- | ---- | ----------- | -------- |
|
|
1023
|
-
|
|
|
1041
|
+
| filter | | The filter | |
|
|
1024
1042
|
|
|
1025
1043
|
|
|
1026
1044
|
|
|
@@ -1028,17 +1046,17 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1028
1046
|
##### Returns
|
|
1029
1047
|
|
|
1030
1048
|
|
|
1031
|
-
-
|
|
1049
|
+
- A new value array with the filled properties.
|
|
1032
1050
|
|
|
1033
1051
|
|
|
1034
1052
|
|
|
1035
1053
|
|
|
1036
|
-
### dist/filters/
|
|
1054
|
+
### dist/filters/adapters/flatUIToFD.js
|
|
1037
1055
|
|
|
1038
1056
|
|
|
1039
|
-
####
|
|
1057
|
+
#### flatUIToFD(uFilters, version)
|
|
1040
1058
|
|
|
1041
|
-
|
|
1059
|
+
Generates a filter data structure from the flatttened UI filters.
|
|
1042
1060
|
|
|
1043
1061
|
|
|
1044
1062
|
|
|
@@ -1047,8 +1065,8 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1047
1065
|
|
|
1048
1066
|
| Name | Type | Description | |
|
|
1049
1067
|
| ---- | ---- | ----------- | -------- |
|
|
1050
|
-
|
|
|
1051
|
-
|
|
|
1068
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1069
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1052
1070
|
|
|
1053
1071
|
|
|
1054
1072
|
|
|
@@ -1056,17 +1074,14 @@ Gets the Scopes IDS for the Available Scope function by any config
|
|
|
1056
1074
|
##### Returns
|
|
1057
1075
|
|
|
1058
1076
|
|
|
1059
|
-
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1077
|
+
- a Filter Data.
|
|
1063
1078
|
|
|
1064
|
-
### dist/dates/adapters/mdyDateToDate.js
|
|
1065
1079
|
|
|
1066
1080
|
|
|
1067
|
-
####
|
|
1081
|
+
#### buildScopes(fbFilters)
|
|
1068
1082
|
|
|
1069
|
-
|
|
1083
|
+
Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
|
|
1084
|
+
Also, adds and organizes filters by datasets
|
|
1070
1085
|
|
|
1071
1086
|
|
|
1072
1087
|
|
|
@@ -1075,8 +1090,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
1075
1090
|
|
|
1076
1091
|
| Name | Type | Description | |
|
|
1077
1092
|
| ---- | ---- | ----------- | -------- |
|
|
1078
|
-
|
|
|
1079
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1093
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1080
1094
|
|
|
1081
1095
|
|
|
1082
1096
|
|
|
@@ -1084,17 +1098,13 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
|
|
|
1084
1098
|
##### Returns
|
|
1085
1099
|
|
|
1086
1100
|
|
|
1087
|
-
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1101
|
+
- an array of scopes structure.
|
|
1091
1102
|
|
|
1092
|
-
### dist/dates/adapters/monthYearToDate.js
|
|
1093
1103
|
|
|
1094
1104
|
|
|
1095
|
-
####
|
|
1105
|
+
#### buildScope(uFilter)
|
|
1096
1106
|
|
|
1097
|
-
|
|
1107
|
+
Gets an scope structure for the filter data
|
|
1098
1108
|
|
|
1099
1109
|
|
|
1100
1110
|
|
|
@@ -1103,8 +1113,7 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
1103
1113
|
|
|
1104
1114
|
| Name | Type | Description | |
|
|
1105
1115
|
| ---- | ---- | ----------- | -------- |
|
|
1106
|
-
|
|
|
1107
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1116
|
+
| uFilter | | UI structure filter | |
|
|
1108
1117
|
|
|
1109
1118
|
|
|
1110
1119
|
|
|
@@ -1112,17 +1121,13 @@ Transforms String Date from a [Month Year] format to Date object.
|
|
|
1112
1121
|
##### Returns
|
|
1113
1122
|
|
|
1114
1123
|
|
|
1115
|
-
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1124
|
+
- an scope structure
|
|
1118
1125
|
|
|
1119
1126
|
|
|
1120
|
-
### dist/dates/adapters/quarterYearToDate.js
|
|
1121
1127
|
|
|
1128
|
+
#### buildDataset(uFilter)
|
|
1122
1129
|
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
Transforms String Date from a [Quarter Year] format to Date object.
|
|
1130
|
+
Gets an dataset structure for the filter data
|
|
1126
1131
|
|
|
1127
1132
|
|
|
1128
1133
|
|
|
@@ -1131,8 +1136,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
1131
1136
|
|
|
1132
1137
|
| Name | Type | Description | |
|
|
1133
1138
|
| ---- | ---- | ----------- | -------- |
|
|
1134
|
-
|
|
|
1135
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1139
|
+
| uFilter | | a UI structure filter | |
|
|
1136
1140
|
|
|
1137
1141
|
|
|
1138
1142
|
|
|
@@ -1140,17 +1144,13 @@ Transforms String Date from a [Quarter Year] format to Date object.
|
|
|
1140
1144
|
##### Returns
|
|
1141
1145
|
|
|
1142
1146
|
|
|
1143
|
-
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
+
- an dataset structure
|
|
1147
1148
|
|
|
1148
|
-
### dist/dates/adapters/weekYearToDate.js
|
|
1149
1149
|
|
|
1150
1150
|
|
|
1151
|
-
####
|
|
1151
|
+
#### buildFilter(uFilter)
|
|
1152
1152
|
|
|
1153
|
-
|
|
1153
|
+
Gets an filter structure for the filter data
|
|
1154
1154
|
|
|
1155
1155
|
|
|
1156
1156
|
|
|
@@ -1159,8 +1159,7 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
1159
1159
|
|
|
1160
1160
|
| Name | Type | Description | |
|
|
1161
1161
|
| ---- | ---- | ----------- | -------- |
|
|
1162
|
-
|
|
|
1163
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1162
|
+
| uFilter | | a UI structure filter | |
|
|
1164
1163
|
|
|
1165
1164
|
|
|
1166
1165
|
|
|
@@ -1168,17 +1167,17 @@ Transforms String Date from a [Week Year] format to Date object.
|
|
|
1168
1167
|
##### Returns
|
|
1169
1168
|
|
|
1170
1169
|
|
|
1171
|
-
-
|
|
1170
|
+
- an filter structure
|
|
1172
1171
|
|
|
1173
1172
|
|
|
1174
1173
|
|
|
1175
1174
|
|
|
1176
|
-
### dist/
|
|
1175
|
+
### dist/filters/adapters/flatUIToLogic.js
|
|
1177
1176
|
|
|
1178
1177
|
|
|
1179
|
-
####
|
|
1178
|
+
#### flatUIToLogic(uFilter)
|
|
1180
1179
|
|
|
1181
|
-
|
|
1180
|
+
Generates a Logic structure from flattened UI filters
|
|
1182
1181
|
|
|
1183
1182
|
|
|
1184
1183
|
|
|
@@ -1187,8 +1186,7 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
1187
1186
|
|
|
1188
1187
|
| Name | Type | Description | |
|
|
1189
1188
|
| ---- | ---- | ----------- | -------- |
|
|
1190
|
-
|
|
|
1191
|
-
| time | | Flag to parse the object date to milliseconds. | |
|
|
1189
|
+
| uFilter | | Array of flat filters from UI | |
|
|
1192
1190
|
|
|
1193
1191
|
|
|
1194
1192
|
|
|
@@ -1196,17 +1194,17 @@ Transforms String Date from a [Year] format to Date object.
|
|
|
1196
1194
|
##### Returns
|
|
1197
1195
|
|
|
1198
1196
|
|
|
1199
|
-
- The
|
|
1197
|
+
- The logic structure
|
|
1200
1198
|
|
|
1201
1199
|
|
|
1202
1200
|
|
|
1203
1201
|
|
|
1204
|
-
### dist/
|
|
1202
|
+
### dist/filters/adapters/flatUIToOldLogic.js
|
|
1205
1203
|
|
|
1206
1204
|
|
|
1207
|
-
####
|
|
1205
|
+
#### flatUIToOldLogic(uFilters)
|
|
1208
1206
|
|
|
1209
|
-
|
|
1207
|
+
Generates a Logic structure from flattened UI filters
|
|
1210
1208
|
|
|
1211
1209
|
|
|
1212
1210
|
|
|
@@ -1215,56 +1213,25 @@ Get date range object from a string date value
|
|
|
1215
1213
|
|
|
1216
1214
|
| Name | Type | Description | |
|
|
1217
1215
|
| ---- | ---- | ----------- | -------- |
|
|
1218
|
-
|
|
|
1219
|
-
| dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | |
|
|
1220
|
-
| withTime | `Boolean` | determines if the date range will include time. Default is true | |
|
|
1221
|
-
|
|
1216
|
+
| uFilters | | Array of flat filters from UI | |
|
|
1222
1217
|
|
|
1223
1218
|
|
|
1224
1219
|
|
|
1225
|
-
##### Examples
|
|
1226
|
-
|
|
1227
|
-
```javascript
|
|
1228
|
-
// 1) Year:
|
|
1229
|
-
getDateRange('2020', 'YEAR');
|
|
1230
|
-
// Will return:
|
|
1231
|
-
{
|
|
1232
|
-
from: '01/01/2020 00:00:00',
|
|
1233
|
-
to: '12/31/2020 23:59:59'
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
// 2) Quarter:
|
|
1237
|
-
getDateRange('Q3 2020', 'QUARTER');
|
|
1238
|
-
// Will return:
|
|
1239
|
-
{
|
|
1240
|
-
from: '07/01/2020 00:00:00',
|
|
1241
|
-
to: '09/30/2020 23:59:59'
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
// 3) Month:
|
|
1245
|
-
getDateRange('Oct 2020', 'MONTH');
|
|
1246
|
-
// Will return:
|
|
1247
|
-
{
|
|
1248
|
-
from: '10/01/2020 00:00:00',
|
|
1249
|
-
to: '10/31/2020 23:59:59'
|
|
1250
|
-
}
|
|
1251
|
-
```
|
|
1252
|
-
|
|
1253
1220
|
|
|
1254
1221
|
##### Returns
|
|
1255
1222
|
|
|
1256
1223
|
|
|
1257
|
-
-
|
|
1224
|
+
- The logic structure
|
|
1258
1225
|
|
|
1259
1226
|
|
|
1260
1227
|
|
|
1261
1228
|
|
|
1262
|
-
### dist/
|
|
1229
|
+
### dist/filters/adapters/flatUIToUI.js
|
|
1263
1230
|
|
|
1264
1231
|
|
|
1265
|
-
####
|
|
1232
|
+
#### flatUIToUI(uFilters, version)
|
|
1266
1233
|
|
|
1267
|
-
|
|
1234
|
+
Generates a UI filter data structure from the flatttened UI filters.
|
|
1268
1235
|
|
|
1269
1236
|
|
|
1270
1237
|
|
|
@@ -1273,9 +1240,8 @@ Gets a Date Object instance by a Date format
|
|
|
1273
1240
|
|
|
1274
1241
|
| Name | Type | Description | |
|
|
1275
1242
|
| ---- | ---- | ----------- | -------- |
|
|
1276
|
-
|
|
|
1277
|
-
|
|
|
1278
|
-
| time | | flag to convert the formatted date to miliseconds | |
|
|
1243
|
+
| uFilters | | Array of flattened filters from UI | |
|
|
1244
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1279
1245
|
|
|
1280
1246
|
|
|
1281
1247
|
|
|
@@ -1283,17 +1249,14 @@ Gets a Date Object instance by a Date format
|
|
|
1283
1249
|
##### Returns
|
|
1284
1250
|
|
|
1285
1251
|
|
|
1286
|
-
- a
|
|
1287
|
-
|
|
1288
|
-
|
|
1252
|
+
- a UI Filter Data.
|
|
1289
1253
|
|
|
1290
1254
|
|
|
1291
|
-
### dist/dates/helpers/getDateFormatByProperty.js
|
|
1292
1255
|
|
|
1256
|
+
#### buildScopes(fbFilters)
|
|
1293
1257
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
Gets the date format by the given property
|
|
1258
|
+
Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
|
|
1259
|
+
Also, adds and organizes filters by datasets
|
|
1297
1260
|
|
|
1298
1261
|
|
|
1299
1262
|
|
|
@@ -1302,7 +1265,7 @@ Gets the date format by the given property
|
|
|
1302
1265
|
|
|
1303
1266
|
| Name | Type | Description | |
|
|
1304
1267
|
| ---- | ---- | ----------- | -------- |
|
|
1305
|
-
|
|
|
1268
|
+
| fbFilters | | Array of flat filters from UI | |
|
|
1306
1269
|
|
|
1307
1270
|
|
|
1308
1271
|
|
|
@@ -1310,17 +1273,13 @@ Gets the date format by the given property
|
|
|
1310
1273
|
##### Returns
|
|
1311
1274
|
|
|
1312
1275
|
|
|
1313
|
-
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1276
|
+
- an array of scopes structure.
|
|
1317
1277
|
|
|
1318
|
-
### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
|
|
1319
1278
|
|
|
1320
1279
|
|
|
1321
|
-
####
|
|
1280
|
+
#### buildScope(uFilter)
|
|
1322
1281
|
|
|
1323
|
-
Gets an
|
|
1282
|
+
Gets an scope structure for the UI filter data
|
|
1324
1283
|
|
|
1325
1284
|
|
|
1326
1285
|
|
|
@@ -1329,7 +1288,7 @@ Gets an array of regular expressions by the given date format
|
|
|
1329
1288
|
|
|
1330
1289
|
| Name | Type | Description | |
|
|
1331
1290
|
| ---- | ---- | ----------- | -------- |
|
|
1332
|
-
|
|
|
1291
|
+
| uFilter | | UI structure filter | |
|
|
1333
1292
|
|
|
1334
1293
|
|
|
1335
1294
|
|
|
@@ -1337,17 +1296,13 @@ Gets an array of regular expressions by the given date format
|
|
|
1337
1296
|
##### Returns
|
|
1338
1297
|
|
|
1339
1298
|
|
|
1340
|
-
- an
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1299
|
+
- an scope structure
|
|
1344
1300
|
|
|
1345
|
-
### dist/dates/helpers/getSeparatorByDateFormat.js
|
|
1346
1301
|
|
|
1347
1302
|
|
|
1348
|
-
####
|
|
1303
|
+
#### buildDataset(uFilter)
|
|
1349
1304
|
|
|
1350
|
-
Gets
|
|
1305
|
+
Gets an dataset structure for the UI filter data
|
|
1351
1306
|
|
|
1352
1307
|
|
|
1353
1308
|
|
|
@@ -1356,7 +1311,7 @@ Gets the separator of the date format
|
|
|
1356
1311
|
|
|
1357
1312
|
| Name | Type | Description | |
|
|
1358
1313
|
| ---- | ---- | ----------- | -------- |
|
|
1359
|
-
|
|
|
1314
|
+
| uFilter | | a UI structure filter | |
|
|
1360
1315
|
|
|
1361
1316
|
|
|
1362
1317
|
|
|
@@ -1364,18 +1319,13 @@ Gets the separator of the date format
|
|
|
1364
1319
|
##### Returns
|
|
1365
1320
|
|
|
1366
1321
|
|
|
1367
|
-
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1322
|
+
- an dataset structure
|
|
1371
1323
|
|
|
1372
|
-
### dist/dates/helpers/getWeek.js
|
|
1373
1324
|
|
|
1374
1325
|
|
|
1375
|
-
####
|
|
1326
|
+
#### buildFilter(uFilter)
|
|
1376
1327
|
|
|
1377
|
-
Gets
|
|
1378
|
-
Additionally, the month and the year
|
|
1328
|
+
Gets an filter structure for the UI filter data
|
|
1379
1329
|
|
|
1380
1330
|
|
|
1381
1331
|
|
|
@@ -1384,7 +1334,7 @@ Additionally, the month and the year
|
|
|
1384
1334
|
|
|
1385
1335
|
| Name | Type | Description | |
|
|
1386
1336
|
| ---- | ---- | ----------- | -------- |
|
|
1387
|
-
|
|
|
1337
|
+
| uFilter | | a UI structure filter | |
|
|
1388
1338
|
|
|
1389
1339
|
|
|
1390
1340
|
|
|
@@ -1392,20 +1342,17 @@ Additionally, the month and the year
|
|
|
1392
1342
|
##### Returns
|
|
1393
1343
|
|
|
1394
1344
|
|
|
1395
|
-
- an
|
|
1345
|
+
- an filter structure
|
|
1396
1346
|
|
|
1397
1347
|
|
|
1398
1348
|
|
|
1399
1349
|
|
|
1400
|
-
### dist/
|
|
1350
|
+
### dist/filters/adapters/logicToFD.js
|
|
1401
1351
|
|
|
1402
1352
|
|
|
1403
|
-
####
|
|
1353
|
+
#### logicToFD(filterData, version)
|
|
1404
1354
|
|
|
1405
|
-
|
|
1406
|
-
- If the string is a token label, the function lets it pass.
|
|
1407
|
-
- Otherwise depends of the format
|
|
1408
|
-
- Some escenarios the string is a mix of token labels and dates
|
|
1355
|
+
Generates a filter data structure from the old logic structure (v2.0).
|
|
1409
1356
|
|
|
1410
1357
|
|
|
1411
1358
|
|
|
@@ -1414,8 +1361,8 @@ Validate a string date depending on giving format
|
|
|
1414
1361
|
|
|
1415
1362
|
| Name | Type | Description | |
|
|
1416
1363
|
| ---- | ---- | ----------- | -------- |
|
|
1417
|
-
|
|
|
1418
|
-
|
|
|
1364
|
+
| filterData | | The old filter data structure with logic (v2.0) | |
|
|
1365
|
+
| version | | Tag for the version of the filter data structure | |
|
|
1419
1366
|
|
|
1420
1367
|
|
|
1421
1368
|
|
|
@@ -1423,17 +1370,17 @@ Validate a string date depending on giving format
|
|
|
1423
1370
|
##### Returns
|
|
1424
1371
|
|
|
1425
1372
|
|
|
1426
|
-
-
|
|
1373
|
+
- a Filter Data.
|
|
1427
1374
|
|
|
1428
1375
|
|
|
1429
1376
|
|
|
1430
1377
|
|
|
1431
|
-
### dist/
|
|
1378
|
+
### dist/filters/adapters/logicToFlatUI.js
|
|
1432
1379
|
|
|
1433
1380
|
|
|
1434
|
-
####
|
|
1381
|
+
#### logicToFlatUI(logics)
|
|
1435
1382
|
|
|
1436
|
-
|
|
1383
|
+
Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
|
|
1437
1384
|
|
|
1438
1385
|
|
|
1439
1386
|
|
|
@@ -1442,8 +1389,7 @@ Validates the given string as Date by its date format.
|
|
|
1442
1389
|
|
|
1443
1390
|
| Name | Type | Description | |
|
|
1444
1391
|
| ---- | ---- | ----------- | -------- |
|
|
1445
|
-
|
|
|
1446
|
-
| dateForma | | the format of the date to validate the string | |
|
|
1392
|
+
| logics | | The old logic structure (v2.0) | |
|
|
1447
1393
|
|
|
1448
1394
|
|
|
1449
1395
|
|
|
@@ -1451,17 +1397,13 @@ Validates the given string as Date by its date format.
|
|
|
1451
1397
|
##### Returns
|
|
1452
1398
|
|
|
1453
1399
|
|
|
1454
|
-
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1400
|
+
- The Flattened UI Filters array
|
|
1458
1401
|
|
|
1459
|
-
### dist/general/array/delete.js
|
|
1460
1402
|
|
|
1461
1403
|
|
|
1462
|
-
####
|
|
1404
|
+
#### getFilter(filters, filter, getIndex)
|
|
1463
1405
|
|
|
1464
|
-
|
|
1406
|
+
Get the filter or the index of the given array, validating an old filter structure.
|
|
1465
1407
|
|
|
1466
1408
|
|
|
1467
1409
|
|
|
@@ -1470,8 +1412,9 @@ Inmutable Array Item deletion
|
|
|
1470
1412
|
|
|
1471
1413
|
| Name | Type | Description | |
|
|
1472
1414
|
| ---- | ---- | ----------- | -------- |
|
|
1473
|
-
|
|
|
1474
|
-
|
|
|
1415
|
+
| filters | | The array of UI filters | |
|
|
1416
|
+
| filter | | The old logic structure filter | |
|
|
1417
|
+
| getIndex | | Determines if the index or returns the UI filter object | |
|
|
1475
1418
|
|
|
1476
1419
|
|
|
1477
1420
|
|
|
@@ -1479,20 +1422,13 @@ Inmutable Array Item deletion
|
|
|
1479
1422
|
##### Returns
|
|
1480
1423
|
|
|
1481
1424
|
|
|
1482
|
-
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1425
|
+
- the index or the UI filter object
|
|
1485
1426
|
|
|
1486
1427
|
|
|
1487
|
-
### dist/general/array/filterNestedTree.js
|
|
1488
1428
|
|
|
1429
|
+
#### refineRankingValues(values, uiValues)
|
|
1489
1430
|
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
Filters a nested tree array by a custom condition on the last child node
|
|
1493
|
-
- If the given arguments are not valid, the function returns the first argument.
|
|
1494
|
-
- If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
|
|
1495
|
-
- If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
|
|
1431
|
+
Refines the values of the Ranking column type.
|
|
1496
1432
|
|
|
1497
1433
|
|
|
1498
1434
|
|
|
@@ -1501,9 +1437,8 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1501
1437
|
|
|
1502
1438
|
| Name | Type | Description | |
|
|
1503
1439
|
| ---- | ---- | ----------- | -------- |
|
|
1504
|
-
|
|
|
1505
|
-
|
|
|
1506
|
-
| condition | | function callback that determines if the filter is applied on the last child node of the nested tree | |
|
|
1440
|
+
| values | | the Array of Ranking values | |
|
|
1441
|
+
| uiValues | | Object with additional info about the values of the filter. | |
|
|
1507
1442
|
|
|
1508
1443
|
|
|
1509
1444
|
|
|
@@ -1511,17 +1446,17 @@ Filters a nested tree array by a custom condition on the last child node
|
|
|
1511
1446
|
##### Returns
|
|
1512
1447
|
|
|
1513
1448
|
|
|
1514
|
-
- array
|
|
1449
|
+
- the array of Ranking values
|
|
1515
1450
|
|
|
1516
1451
|
|
|
1517
1452
|
|
|
1518
1453
|
|
|
1519
|
-
### dist/
|
|
1454
|
+
### dist/filters/adapters/logicToUI.js
|
|
1520
1455
|
|
|
1521
1456
|
|
|
1522
|
-
####
|
|
1457
|
+
#### logicToUI(uFilters, datasetsInfo)
|
|
1523
1458
|
|
|
1524
|
-
|
|
1459
|
+
Generates a UI filter structure from the old logic structure (v2.0).
|
|
1525
1460
|
|
|
1526
1461
|
|
|
1527
1462
|
|
|
@@ -1530,7 +1465,8 @@ Flat deeply an array
|
|
|
1530
1465
|
|
|
1531
1466
|
| Name | Type | Description | |
|
|
1532
1467
|
| ---- | ---- | ----------- | -------- |
|
|
1533
|
-
|
|
|
1468
|
+
| uFilters | | Array of filters from old logic structure | |
|
|
1469
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
1534
1470
|
|
|
1535
1471
|
|
|
1536
1472
|
|
|
@@ -1538,17 +1474,17 @@ Flat deeply an array
|
|
|
1538
1474
|
##### Returns
|
|
1539
1475
|
|
|
1540
1476
|
|
|
1541
|
-
-
|
|
1477
|
+
- a UI Filter Data.
|
|
1542
1478
|
|
|
1543
1479
|
|
|
1544
1480
|
|
|
1545
1481
|
|
|
1546
|
-
### dist/
|
|
1482
|
+
### dist/filters/adapters/transformFilters.js
|
|
1547
1483
|
|
|
1548
1484
|
|
|
1549
|
-
####
|
|
1485
|
+
#### transformFilters(oldFiltersObj, section)
|
|
1550
1486
|
|
|
1551
|
-
|
|
1487
|
+
Transform the old filters structure into the new one
|
|
1552
1488
|
|
|
1553
1489
|
|
|
1554
1490
|
|
|
@@ -1557,26 +1493,77 @@ Gets the first index from the array by a callback condition
|
|
|
1557
1493
|
|
|
1558
1494
|
| Name | Type | Description | |
|
|
1559
1495
|
| ---- | ---- | ----------- | -------- |
|
|
1560
|
-
|
|
|
1561
|
-
|
|
|
1496
|
+
| oldFiltersObj | `Object` | an object with the old filters structure | |
|
|
1497
|
+
| section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | |
|
|
1562
1498
|
|
|
1563
1499
|
|
|
1564
1500
|
|
|
1565
1501
|
|
|
1502
|
+
##### Examples
|
|
1503
|
+
|
|
1504
|
+
```javascript
|
|
1505
|
+
|
|
1506
|
+
const oldPreferenceFilters = {
|
|
1507
|
+
"WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
|
|
1508
|
+
"WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
|
|
1509
|
+
"WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
|
|
1510
|
+
"WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
|
|
1511
|
+
"WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
|
|
1512
|
+
"formulaId": null,
|
|
1513
|
+
"panelId": null,
|
|
1514
|
+
"values": [
|
|
1515
|
+
{
|
|
1516
|
+
"EQUALS": [
|
|
1517
|
+
{
|
|
1518
|
+
"id": "AK4M8UV2a0",
|
|
1519
|
+
"value": "A",
|
|
1520
|
+
"enabled": true,
|
|
1521
|
+
"imageUrl": null
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
"id": "AK4M8UV2a1",
|
|
1525
|
+
"value": "B",
|
|
1526
|
+
"enabled": true,
|
|
1527
|
+
"imageUrl": null
|
|
1528
|
+
}
|
|
1529
|
+
]
|
|
1530
|
+
}
|
|
1531
|
+
],
|
|
1532
|
+
"bucketId": null,
|
|
1533
|
+
"text": "MC",
|
|
1534
|
+
"title": "MC",
|
|
1535
|
+
"type": "SINGLE_CHOICE",
|
|
1536
|
+
"qid": "AK4M8UV2",
|
|
1537
|
+
"dataset": {
|
|
1538
|
+
"sourceid": "xYOQAdpqT",
|
|
1539
|
+
"name": "Form All Questions",
|
|
1540
|
+
"qrveyid": "xYOQAdpqT",
|
|
1541
|
+
"text": "Form All Questions",
|
|
1542
|
+
"linkid": 0
|
|
1543
|
+
},
|
|
1544
|
+
"enabled": true,
|
|
1545
|
+
"linked": null
|
|
1546
|
+
}
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1549
|
+
const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
|
|
1550
|
+
```
|
|
1551
|
+
|
|
1552
|
+
|
|
1566
1553
|
##### Returns
|
|
1567
1554
|
|
|
1568
1555
|
|
|
1569
|
-
-
|
|
1556
|
+
- `Object` an object with the new filters structure
|
|
1570
1557
|
|
|
1571
1558
|
|
|
1572
1559
|
|
|
1573
1560
|
|
|
1574
|
-
### dist/
|
|
1561
|
+
### dist/filters/helpers/applyHierarchyForAggFilters.js
|
|
1575
1562
|
|
|
1576
1563
|
|
|
1577
|
-
####
|
|
1564
|
+
#### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
|
|
1578
1565
|
|
|
1579
|
-
|
|
1566
|
+
[TODO: Make a proper description for this function]
|
|
1580
1567
|
|
|
1581
1568
|
|
|
1582
1569
|
|
|
@@ -1585,8 +1572,9 @@ Gets the last index from the array by a callback condition
|
|
|
1585
1572
|
|
|
1586
1573
|
| Name | Type | Description | |
|
|
1587
1574
|
| ---- | ---- | ----------- | -------- |
|
|
1588
|
-
|
|
|
1589
|
-
|
|
|
1575
|
+
| chartSettings | | Chart Settings for the Filter Builder | |
|
|
1576
|
+
| scopes | | | |
|
|
1577
|
+
| currentScope | | | |
|
|
1590
1578
|
|
|
1591
1579
|
|
|
1592
1580
|
|
|
@@ -1594,113 +1582,130 @@ Gets the last index from the array by a callback condition
|
|
|
1594
1582
|
##### Returns
|
|
1595
1583
|
|
|
1596
1584
|
|
|
1597
|
-
-
|
|
1585
|
+
-
|
|
1598
1586
|
|
|
1599
1587
|
|
|
1600
1588
|
|
|
1601
1589
|
|
|
1602
|
-
### dist/
|
|
1590
|
+
### dist/filters/helpers/getAvailableScopes.js
|
|
1603
1591
|
|
|
1604
1592
|
|
|
1605
|
-
####
|
|
1593
|
+
#### getAvailableScopes(config)
|
|
1606
1594
|
|
|
1607
|
-
|
|
1595
|
+
Gets Scopes/Scope IDs by given IDs
|
|
1608
1596
|
|
|
1609
1597
|
|
|
1610
1598
|
|
|
1611
1599
|
|
|
1600
|
+
##### Parameters
|
|
1612
1601
|
|
|
1602
|
+
| Name | Type | Description | |
|
|
1603
|
+
| ---- | ---- | ----------- | -------- |
|
|
1604
|
+
| config | | given Differnts IDs in order set a available scope | |
|
|
1613
1605
|
|
|
1614
|
-
##### Returns
|
|
1615
1606
|
|
|
1616
1607
|
|
|
1617
|
-
- `AbsoluteRange` `string`
|
|
1618
1608
|
|
|
1609
|
+
##### Returns
|
|
1619
1610
|
|
|
1620
1611
|
|
|
1621
|
-
|
|
1612
|
+
- a Scopes/Scope IDs array
|
|
1622
1613
|
|
|
1623
|
-
Resolves statement as an anchor
|
|
1624
1614
|
|
|
1625
1615
|
|
|
1626
1616
|
|
|
1617
|
+
### dist/filters/helpers/getAvailableScopesIDsByConfig.js
|
|
1627
1618
|
|
|
1628
1619
|
|
|
1620
|
+
#### getAvailableScopesIDsByConfig(config)
|
|
1629
1621
|
|
|
1630
|
-
|
|
1622
|
+
Gets the Scopes IDS for the Available Scope function by any config
|
|
1631
1623
|
|
|
1632
1624
|
|
|
1633
|
-
- `string`
|
|
1634
1625
|
|
|
1635
1626
|
|
|
1627
|
+
##### Parameters
|
|
1636
1628
|
|
|
1637
|
-
|
|
1629
|
+
| Name | Type | Description | |
|
|
1630
|
+
| ---- | ---- | ----------- | -------- |
|
|
1631
|
+
| config | | any config | |
|
|
1638
1632
|
|
|
1639
|
-
Convert verbal statement to range value
|
|
1640
1633
|
|
|
1641
1634
|
|
|
1642
1635
|
|
|
1636
|
+
##### Returns
|
|
1643
1637
|
|
|
1644
1638
|
|
|
1639
|
+
- a Available Scope IDS config
|
|
1645
1640
|
|
|
1646
|
-
##### Returns
|
|
1647
1641
|
|
|
1648
1642
|
|
|
1649
|
-
- `AbsoluteRange`
|
|
1650
1643
|
|
|
1644
|
+
### dist/filters/helpers/getScopesByHierarchy.js
|
|
1651
1645
|
|
|
1652
1646
|
|
|
1653
|
-
####
|
|
1647
|
+
#### getScopesByHierarchy(scopes, currentScope)
|
|
1654
1648
|
|
|
1655
|
-
|
|
1649
|
+
[TODO: Make a description for this]
|
|
1656
1650
|
|
|
1657
1651
|
|
|
1658
1652
|
|
|
1659
1653
|
|
|
1654
|
+
##### Parameters
|
|
1660
1655
|
|
|
1656
|
+
| Name | Type | Description | |
|
|
1657
|
+
| ---- | ---- | ----------- | -------- |
|
|
1658
|
+
| scopes | | the collection of Scopes/Scope IDs | |
|
|
1659
|
+
| currentScope | | Current scope type | |
|
|
1661
1660
|
|
|
1662
|
-
##### Returns
|
|
1663
1661
|
|
|
1664
1662
|
|
|
1665
|
-
- `AbsoluteStatement`
|
|
1666
1663
|
|
|
1664
|
+
##### Returns
|
|
1667
1665
|
|
|
1668
1666
|
|
|
1669
|
-
|
|
1667
|
+
- A new array of Scopes/Scope IDs
|
|
1670
1668
|
|
|
1671
|
-
Apply 'the last' cursor logic to statement
|
|
1672
1669
|
|
|
1673
1670
|
|
|
1674
1671
|
|
|
1672
|
+
### dist/general/array/delete.js
|
|
1675
1673
|
|
|
1676
1674
|
|
|
1675
|
+
#### ArrayDelete(array, index)
|
|
1677
1676
|
|
|
1678
|
-
|
|
1677
|
+
Inmutable Array Item deletion
|
|
1679
1678
|
|
|
1680
1679
|
|
|
1681
|
-
- `AbsoluteStatement`
|
|
1682
1680
|
|
|
1683
1681
|
|
|
1682
|
+
##### Parameters
|
|
1684
1683
|
|
|
1685
|
-
|
|
1684
|
+
| Name | Type | Description | |
|
|
1685
|
+
| ---- | ---- | ----------- | -------- |
|
|
1686
|
+
| array | `Array` | a collection of items to delete | |
|
|
1687
|
+
| index | `Number` | the position of the item to delete | |
|
|
1686
1688
|
|
|
1687
|
-
Apply 'the next' cursor logic to statement
|
|
1688
1689
|
|
|
1689
1690
|
|
|
1690
1691
|
|
|
1692
|
+
##### Returns
|
|
1691
1693
|
|
|
1692
1694
|
|
|
1695
|
+
- a new Array or the given parameter when is empty or not an array
|
|
1693
1696
|
|
|
1694
|
-
##### Returns
|
|
1695
1697
|
|
|
1696
1698
|
|
|
1697
|
-
- `AbsoluteStatement`
|
|
1698
1699
|
|
|
1700
|
+
### dist/general/array/filterNestedTree.js
|
|
1699
1701
|
|
|
1700
1702
|
|
|
1701
|
-
####
|
|
1703
|
+
#### filterNestedTree(arr, childArrKey, condition)
|
|
1702
1704
|
|
|
1703
|
-
|
|
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
|
|
1704
1709
|
|
|
1705
1710
|
|
|
1706
1711
|
|
|
@@ -1709,8 +1714,9 @@ Replace '@now' token inside a string
|
|
|
1709
1714
|
|
|
1710
1715
|
| Name | Type | Description | |
|
|
1711
1716
|
| ---- | ---- | ----------- | -------- |
|
|
1712
|
-
|
|
|
1713
|
-
|
|
|
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 | |
|
|
1714
1720
|
|
|
1715
1721
|
|
|
1716
1722
|
|
|
@@ -1718,60 +1724,44 @@ Replace '@now' token inside a string
|
|
|
1718
1724
|
##### Returns
|
|
1719
1725
|
|
|
1720
1726
|
|
|
1721
|
-
-
|
|
1727
|
+
- array filtered
|
|
1722
1728
|
|
|
1723
1729
|
|
|
1724
1730
|
|
|
1725
|
-
#### convertRelativeToAbsolute(args)
|
|
1726
1731
|
|
|
1727
|
-
|
|
1732
|
+
### dist/general/array/flattenDeep.js
|
|
1728
1733
|
|
|
1729
1734
|
|
|
1735
|
+
#### flattenDeep(arr)
|
|
1730
1736
|
|
|
1737
|
+
Flat deeply an array
|
|
1731
1738
|
|
|
1732
|
-
##### Parameters
|
|
1733
1739
|
|
|
1734
|
-
| Name | Type | Description | |
|
|
1735
|
-
| ---- | ---- | ----------- | -------- |
|
|
1736
|
-
| args | `RelativeToAbsoluteStruct` | | |
|
|
1737
1740
|
|
|
1738
1741
|
|
|
1742
|
+
##### Parameters
|
|
1739
1743
|
|
|
1744
|
+
| Name | Type | Description | |
|
|
1745
|
+
| ---- | ---- | ----------- | -------- |
|
|
1746
|
+
| arr | | Array to flat deeply | |
|
|
1740
1747
|
|
|
1741
|
-
##### Examples
|
|
1742
1748
|
|
|
1743
|
-
```javascript
|
|
1744
|
-
pivot = '2021-03-03T12:30:40'
|
|
1745
|
-
unit = month
|
|
1746
|
-
steps = 2
|
|
1747
|
-
setTo = END
|
|
1748
|
-
resolverAsCalendar: true
|
|
1749
|
-
=> Returns '2021-05-31T23:59:59'
|
|
1750
|
-
```
|
|
1751
|
-
```javascript
|
|
1752
|
-
pivot = '2021-03-03T12:30:40'
|
|
1753
|
-
unit = month
|
|
1754
|
-
steps = -2
|
|
1755
|
-
setTo = START
|
|
1756
|
-
resolverAsCalendar: false
|
|
1757
|
-
=> Returns '2021-01-03T00:00:00'
|
|
1758
|
-
```
|
|
1759
1749
|
|
|
1760
1750
|
|
|
1761
1751
|
##### Returns
|
|
1762
1752
|
|
|
1763
1753
|
|
|
1764
|
-
-
|
|
1754
|
+
- flatten array
|
|
1765
1755
|
|
|
1766
1756
|
|
|
1767
1757
|
|
|
1768
1758
|
|
|
1769
|
-
### dist/
|
|
1759
|
+
### dist/general/array/getLastIndexFromArray.js
|
|
1770
1760
|
|
|
1771
1761
|
|
|
1772
|
-
####
|
|
1762
|
+
#### getLastIndexFromArray(array, callback)
|
|
1773
1763
|
|
|
1774
|
-
|
|
1764
|
+
Gets the last index from the array by a callback condition
|
|
1775
1765
|
|
|
1776
1766
|
|
|
1777
1767
|
|
|
@@ -1780,44 +1770,26 @@ Resolve a list of relative statements according to operator
|
|
|
1780
1770
|
|
|
1781
1771
|
| Name | Type | Description | |
|
|
1782
1772
|
| ---- | ---- | ----------- | -------- |
|
|
1783
|
-
|
|
|
1784
|
-
|
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
##### Examples
|
|
1773
|
+
| array | | | |
|
|
1774
|
+
| callback | | function callback | |
|
|
1790
1775
|
|
|
1791
|
-
```javascript
|
|
1792
|
-
Input:
|
|
1793
|
-
{
|
|
1794
|
-
"cursor": "the_next",
|
|
1795
|
-
"unit": "year",
|
|
1796
|
-
"number": 1,
|
|
1797
|
-
"includeCurrent": false,
|
|
1798
|
-
"isCalendarDate": false,
|
|
1799
|
-
"anchor": "03/05/2021"
|
|
1800
|
-
}
|
|
1801
1776
|
|
|
1802
|
-
Output:
|
|
1803
|
-
{ gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
|
|
1804
|
-
```
|
|
1805
1777
|
|
|
1806
1778
|
|
|
1807
1779
|
##### Returns
|
|
1808
1780
|
|
|
1809
1781
|
|
|
1810
|
-
-
|
|
1782
|
+
- the last index of the array. -1 when the condition is not satisfied
|
|
1811
1783
|
|
|
1812
1784
|
|
|
1813
1785
|
|
|
1814
1786
|
|
|
1815
|
-
### dist/general/
|
|
1787
|
+
### dist/general/array/getFirstIndexFromArray.js
|
|
1816
1788
|
|
|
1817
1789
|
|
|
1818
|
-
####
|
|
1790
|
+
#### getFirstIndexFromArray(array, callback)
|
|
1819
1791
|
|
|
1820
|
-
|
|
1792
|
+
Gets the first index from the array by a callback condition
|
|
1821
1793
|
|
|
1822
1794
|
|
|
1823
1795
|
|
|
@@ -1826,8 +1798,8 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1826
1798
|
|
|
1827
1799
|
| Name | Type | Description | |
|
|
1828
1800
|
| ---- | ---- | ----------- | -------- |
|
|
1829
|
-
|
|
|
1830
|
-
|
|
|
1801
|
+
| array | | | |
|
|
1802
|
+
| callback | | function callback | |
|
|
1831
1803
|
|
|
1832
1804
|
|
|
1833
1805
|
|
|
@@ -1835,17 +1807,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
|
|
|
1835
1807
|
##### Returns
|
|
1836
1808
|
|
|
1837
1809
|
|
|
1838
|
-
-
|
|
1810
|
+
- the first index of the array. -1 when the condition is not satisfied
|
|
1839
1811
|
|
|
1840
1812
|
|
|
1841
1813
|
|
|
1842
1814
|
|
|
1843
|
-
### dist/general/function/
|
|
1815
|
+
### dist/general/function/debounce.js
|
|
1844
1816
|
|
|
1845
1817
|
|
|
1846
|
-
####
|
|
1818
|
+
#### debounce(fn, time)
|
|
1847
1819
|
|
|
1848
|
-
|
|
1820
|
+
Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
|
|
1849
1821
|
|
|
1850
1822
|
|
|
1851
1823
|
|
|
@@ -1863,17 +1835,17 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
|
1863
1835
|
##### Returns
|
|
1864
1836
|
|
|
1865
1837
|
|
|
1866
|
-
- `Function`
|
|
1838
|
+
- `Function` debounced functions
|
|
1867
1839
|
|
|
1868
1840
|
|
|
1869
1841
|
|
|
1870
1842
|
|
|
1871
|
-
### dist/general/
|
|
1843
|
+
### dist/general/function/throttled.js
|
|
1872
1844
|
|
|
1873
1845
|
|
|
1874
|
-
####
|
|
1846
|
+
#### throttled(fn, time)
|
|
1875
1847
|
|
|
1876
|
-
|
|
1848
|
+
Make sure to only invokes _fn_ at most once per every _time_ milliseconds
|
|
1877
1849
|
|
|
1878
1850
|
|
|
1879
1851
|
|
|
@@ -1882,7 +1854,8 @@ Upper case the first letter of a given text
|
|
|
1882
1854
|
|
|
1883
1855
|
| Name | Type | Description | |
|
|
1884
1856
|
| ---- | ---- | ----------- | -------- |
|
|
1885
|
-
|
|
|
1857
|
+
| fn | `Function` | original Function | |
|
|
1858
|
+
| time | `Number` | default 500ms | |
|
|
1886
1859
|
|
|
1887
1860
|
|
|
1888
1861
|
|
|
@@ -1890,7 +1863,7 @@ Upper case the first letter of a given text
|
|
|
1890
1863
|
##### Returns
|
|
1891
1864
|
|
|
1892
1865
|
|
|
1893
|
-
- `
|
|
1866
|
+
- `Function` throttled function
|
|
1894
1867
|
|
|
1895
1868
|
|
|
1896
1869
|
|
|
@@ -2592,12 +2565,12 @@ serialize object to url param
|
|
|
2592
2565
|
|
|
2593
2566
|
|
|
2594
2567
|
|
|
2595
|
-
### dist/
|
|
2568
|
+
### dist/general/string/capitalize.js
|
|
2596
2569
|
|
|
2597
2570
|
|
|
2598
|
-
####
|
|
2571
|
+
#### capitalize(text)
|
|
2599
2572
|
|
|
2600
|
-
|
|
2573
|
+
Upper case the first letter of a given text
|
|
2601
2574
|
|
|
2602
2575
|
|
|
2603
2576
|
|
|
@@ -2606,7 +2579,7 @@ Get an string of the properties of the given column.
|
|
|
2606
2579
|
|
|
2607
2580
|
| Name | Type | Description | |
|
|
2608
2581
|
| ---- | ---- | ----------- | -------- |
|
|
2609
|
-
|
|
|
2582
|
+
| text | `String` | | |
|
|
2610
2583
|
|
|
2611
2584
|
|
|
2612
2585
|
|
|
@@ -2614,7 +2587,7 @@ Get an string of the properties of the given column.
|
|
|
2614
2587
|
##### Returns
|
|
2615
2588
|
|
|
2616
2589
|
|
|
2617
|
-
-
|
|
2590
|
+
- `String` a capitalized text
|
|
2618
2591
|
|
|
2619
2592
|
|
|
2620
2593
|
|
|
@@ -2785,6 +2758,33 @@ try to find this string as a variable on Windows object
|
|
|
2785
2758
|
|
|
2786
2759
|
|
|
2787
2760
|
|
|
2761
|
+
### dist/qrvey/helpers/getColumnsLabel.js
|
|
2762
|
+
|
|
2763
|
+
|
|
2764
|
+
#### getColumnLabels(column)
|
|
2765
|
+
|
|
2766
|
+
Get an string of the properties of the given column.
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
##### Parameters
|
|
2772
|
+
|
|
2773
|
+
| Name | Type | Description | |
|
|
2774
|
+
| ---- | ---- | ----------- | -------- |
|
|
2775
|
+
| column | | The column | |
|
|
2776
|
+
|
|
2777
|
+
|
|
2778
|
+
|
|
2779
|
+
|
|
2780
|
+
##### Returns
|
|
2781
|
+
|
|
2782
|
+
|
|
2783
|
+
- an string with the property, aggregate or calculation label.
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
|
|
2787
|
+
|
|
2788
2788
|
### dist/typescript/decorators/Debounce.js
|
|
2789
2789
|
|
|
2790
2790
|
|
|
@@ -2839,6 +2839,88 @@ try to find this string as a variable on Windows object
|
|
|
2839
2839
|
|
|
2840
2840
|
|
|
2841
2841
|
|
|
2842
|
+
### dist/dates/relative/helpers/formatStatement.js
|
|
2843
|
+
|
|
2844
|
+
|
|
2845
|
+
#### formatStatement(statement)
|
|
2846
|
+
|
|
2847
|
+
Build a proper relative date statement type
|
|
2848
|
+
|
|
2849
|
+
|
|
2850
|
+
|
|
2851
|
+
|
|
2852
|
+
##### Parameters
|
|
2853
|
+
|
|
2854
|
+
| Name | Type | Description | |
|
|
2855
|
+
| ---- | ---- | ----------- | -------- |
|
|
2856
|
+
| statement | `RelativeStatement` | | |
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
|
|
2861
|
+
##### Returns
|
|
2862
|
+
|
|
2863
|
+
|
|
2864
|
+
- `RelativeStatement`
|
|
2865
|
+
|
|
2866
|
+
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
|
+
### dist/dates/relative/helpers/getStatementCase.js
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
#### getStatementCase(includeCurrent, isCalendarDate)
|
|
2873
|
+
|
|
2874
|
+
Returns a number/constant that identifies a relative date case
|
|
2875
|
+
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
|
+
##### Parameters
|
|
2880
|
+
|
|
2881
|
+
| Name | Type | Description | |
|
|
2882
|
+
| ---- | ---- | ----------- | -------- |
|
|
2883
|
+
| includeCurrent | `boolean` | | |
|
|
2884
|
+
| isCalendarDate | `boolean` | | |
|
|
2885
|
+
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
|
|
2889
|
+
##### Returns
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
- `number`
|
|
2893
|
+
|
|
2894
|
+
|
|
2895
|
+
|
|
2896
|
+
|
|
2897
|
+
### dist/dates/relative/helpers/parseDate.js
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
#### parseDate(date)
|
|
2901
|
+
|
|
2902
|
+
Parses a string date and returns a dayjs date
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
##### Parameters
|
|
2908
|
+
|
|
2909
|
+
| Name | Type | Description | |
|
|
2910
|
+
| ---- | ---- | ----------- | -------- |
|
|
2911
|
+
| date | `string` `Dayjs` `Date` | | |
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
|
|
2916
|
+
##### Returns
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
- `Dayjs` A dayjs date
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
|
|
2842
2924
|
### dist/filters/helpers/backend/buildExpression.js
|
|
2843
2925
|
|
|
2844
2926
|
|
|
@@ -4238,86 +4320,4 @@ Resolves conditions between UI flattened filter and given parameters
|
|
|
4238
4320
|
|
|
4239
4321
|
|
|
4240
4322
|
|
|
4241
|
-
### dist/dates/relative/helpers/formatStatement.js
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
#### formatStatement(statement)
|
|
4245
|
-
|
|
4246
|
-
Build a proper relative date statement type
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
##### Parameters
|
|
4252
|
-
|
|
4253
|
-
| Name | Type | Description | |
|
|
4254
|
-
| ---- | ---- | ----------- | -------- |
|
|
4255
|
-
| statement | `RelativeStatement` | | |
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
##### Returns
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
- `RelativeStatement`
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
### dist/dates/relative/helpers/getStatementCase.js
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
#### getStatementCase(includeCurrent, isCalendarDate)
|
|
4272
|
-
|
|
4273
|
-
Returns a number/constant that identifies a relative date case
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
##### Parameters
|
|
4279
|
-
|
|
4280
|
-
| Name | Type | Description | |
|
|
4281
|
-
| ---- | ---- | ----------- | -------- |
|
|
4282
|
-
| includeCurrent | `boolean` | | |
|
|
4283
|
-
| isCalendarDate | `boolean` | | |
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
##### Returns
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
- `number`
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
### dist/dates/relative/helpers/parseDate.js
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
#### parseDate(date)
|
|
4300
|
-
|
|
4301
|
-
Parses a string date and returns a dayjs date
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
##### Parameters
|
|
4307
|
-
|
|
4308
|
-
| Name | Type | Description | |
|
|
4309
|
-
| ---- | ---- | ----------- | -------- |
|
|
4310
|
-
| date | `string` `Dayjs` `Date` | | |
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
##### Returns
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
- `Dayjs` A dayjs date
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
4323
|
*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*
|