@qrvey/utils 1.2.9-34 → 1.2.9-37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +753 -753
  2. package/bitbucket-pipelines.yml +1 -1
  3. package/dist/cjs/charts/constants/index.js +5 -1
  4. package/dist/cjs/charts/helpers/index.js +5 -1
  5. package/dist/cjs/charts/index.js +5 -1
  6. package/dist/cjs/charts/interfaces/index.js +5 -1
  7. package/dist/cjs/columns/constants/COLUMN_LABEL.d.ts +1 -0
  8. package/dist/cjs/columns/constants/COLUMN_LABEL.js +1 -1
  9. package/dist/cjs/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
  10. package/dist/cjs/columns/constants/index.js +5 -1
  11. package/dist/cjs/columns/helpers/index.js +5 -1
  12. package/dist/cjs/columns/index.js +5 -1
  13. package/dist/cjs/columns/interfaces/index.js +5 -1
  14. package/dist/cjs/constants/index.js +5 -1
  15. package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSION.js +1 -1
  16. package/dist/cjs/dates/constants/index.js +5 -1
  17. package/dist/cjs/dates/helpers/getSeparatorByDateFormat.js +1 -1
  18. package/dist/cjs/dates/helpers/index.js +5 -1
  19. package/dist/cjs/dates/index.js +5 -1
  20. package/dist/cjs/dates/interfaces/index.js +5 -1
  21. package/dist/cjs/dates/range/index.js +5 -1
  22. package/dist/cjs/dates/relative/constants/index.js +5 -1
  23. package/dist/cjs/dates/relative/constants/ui/index.js +5 -1
  24. package/dist/cjs/dates/relative/helpers/dayjs-module.js +5 -1
  25. package/dist/cjs/dates/relative/helpers/index.js +5 -1
  26. package/dist/cjs/dates/relative/index.js +5 -1
  27. package/dist/cjs/dates/relative/interfaces/index.js +5 -1
  28. package/dist/cjs/dates/relative/interfaces/ui/index.js +5 -1
  29. package/dist/cjs/filters/adapters/index.js +5 -1
  30. package/dist/cjs/filters/classes/index.js +5 -1
  31. package/dist/cjs/filters/constants/backend/index.js +5 -1
  32. package/dist/cjs/filters/constants/builder/index.js +5 -1
  33. package/dist/cjs/filters/constants/common/index.js +5 -1
  34. package/dist/cjs/filters/constants/index.js +5 -1
  35. package/dist/cjs/filters/constants/panel/index.js +5 -1
  36. package/dist/cjs/filters/helpers/backend/index.js +5 -1
  37. package/dist/cjs/filters/helpers/builder/index.js +5 -1
  38. package/dist/cjs/filters/helpers/common/index.js +5 -1
  39. package/dist/cjs/filters/helpers/index.js +5 -1
  40. package/dist/cjs/filters/helpers/ui/index.js +5 -1
  41. package/dist/cjs/filters/index.js +5 -1
  42. package/dist/cjs/filters/interfaces/backend/index.js +5 -1
  43. package/dist/cjs/filters/interfaces/builder/index.js +5 -1
  44. package/dist/cjs/filters/interfaces/common/index.js +5 -1
  45. package/dist/cjs/filters/interfaces/index.js +5 -1
  46. package/dist/cjs/filters/interfaces/panel/index.js +5 -1
  47. package/dist/cjs/filters/interfaces/ui/index.js +5 -1
  48. package/dist/cjs/format/format.d.ts +1 -1
  49. package/dist/cjs/format/format.js +3 -0
  50. package/dist/cjs/format/index.js +5 -1
  51. package/dist/cjs/format/localization.js +18 -4
  52. package/dist/cjs/formulas/constants/index.js +5 -1
  53. package/dist/cjs/formulas/index.js +5 -1
  54. package/dist/cjs/formulas/interfaces/index.js +5 -1
  55. package/dist/cjs/general/array/index.js +5 -1
  56. package/dist/cjs/general/function/index.js +5 -1
  57. package/dist/cjs/general/index.js +5 -1
  58. package/dist/cjs/general/mix/index.js +5 -1
  59. package/dist/cjs/general/object/index.js +5 -1
  60. package/dist/cjs/general/string/index.js +5 -1
  61. package/dist/cjs/globalization/helpers/index.js +5 -1
  62. package/dist/cjs/globalization/index.js +5 -1
  63. package/dist/cjs/globalization/interfaces/bucket_builder/index.js +5 -1
  64. package/dist/cjs/globalization/interfaces/calendar/index.js +5 -1
  65. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.d.ts +6 -0
  66. package/dist/cjs/globalization/interfaces/chart_builder/index.js +5 -1
  67. package/dist/cjs/globalization/interfaces/columns/index.js +5 -1
  68. package/dist/cjs/globalization/interfaces/common/II18nColumnTypes.d.ts +1 -0
  69. package/dist/cjs/globalization/interfaces/common/index.js +5 -1
  70. package/dist/cjs/globalization/interfaces/cross_tabs/index.js +5 -1
  71. package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
  72. package/dist/cjs/globalization/interfaces/dashboard/index.js +5 -1
  73. package/dist/cjs/globalization/interfaces/filters/index.js +5 -1
  74. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.d.ts +3 -3
  75. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.d.ts +5 -5
  76. package/dist/cjs/globalization/interfaces/formula_builder/index.js +5 -1
  77. package/dist/cjs/globalization/interfaces/index.js +5 -1
  78. package/dist/cjs/globalization/interfaces/panel/index.js +5 -1
  79. package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +2 -0
  80. package/dist/cjs/globalization/interfaces/style_themes/index.js +5 -1
  81. package/dist/cjs/globalization/interfaces/table_charts/index.js +5 -1
  82. package/dist/cjs/globalization/labels/bucket_builder/index.js +5 -1
  83. package/dist/cjs/globalization/labels/calendar/index.js +5 -1
  84. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +6 -0
  85. package/dist/cjs/globalization/labels/chart_builder/index.js +5 -1
  86. package/dist/cjs/globalization/labels/columns/index.js +5 -1
  87. package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
  88. package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
  89. package/dist/cjs/globalization/labels/common/index.js +5 -1
  90. package/dist/cjs/globalization/labels/cross_tabs/index.js +5 -1
  91. package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
  92. package/dist/cjs/globalization/labels/dashboard/index.js +5 -1
  93. package/dist/cjs/globalization/labels/filters/index.js +5 -1
  94. package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +9 -9
  95. package/dist/cjs/globalization/labels/formula_builder/index.js +5 -1
  96. package/dist/cjs/globalization/labels/index.js +5 -1
  97. package/dist/cjs/globalization/labels/panel/index.js +5 -1
  98. package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
  99. package/dist/cjs/globalization/labels/style_themes/index.js +5 -1
  100. package/dist/cjs/globalization/labels/table_charts/index.js +5 -1
  101. package/dist/cjs/globalization/service/index.js +5 -1
  102. package/dist/cjs/index.js +5 -1
  103. package/dist/cjs/interfaces/format/index.js +5 -1
  104. package/dist/cjs/interfaces/general/index.js +5 -1
  105. package/dist/cjs/interfaces/index.js +5 -1
  106. package/dist/cjs/qrvey/constants/index.js +5 -1
  107. package/dist/cjs/qrvey/helpers/index.js +5 -1
  108. package/dist/cjs/qrvey/index.js +5 -1
  109. package/dist/cjs/qrvey/interfaces/index.js +5 -1
  110. package/dist/cjs/services/adapters/index.js +5 -1
  111. package/dist/cjs/services/api/index.js +5 -1
  112. package/dist/cjs/services/constants/index.js +5 -1
  113. package/dist/cjs/services/helpers/index.js +5 -1
  114. package/dist/cjs/services/index.js +5 -1
  115. package/dist/cjs/services/interfaces/index.js +5 -1
  116. package/dist/cjs/stencil/decorators/index.js +5 -1
  117. package/dist/cjs/stencil/index.js +5 -1
  118. package/dist/cjs/stencil/util/index.js +5 -1
  119. package/dist/cjs/tokens/index.js +5 -1
  120. package/dist/cjs/typescript/decorators/index.js +5 -1
  121. package/dist/cjs/typescript/index.js +5 -1
  122. package/dist/columns/constants/COLUMN_LABEL.d.ts +1 -0
  123. package/dist/columns/constants/COLUMN_LABEL.js +1 -1
  124. package/dist/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
  125. package/dist/dates/constants/DATE_REGULAR_EXPRESSION.js +1 -1
  126. package/dist/dates/helpers/getSeparatorByDateFormat.js +1 -1
  127. package/dist/format/format.d.ts +1 -1
  128. package/dist/format/format.js +3 -0
  129. package/dist/format/localization.js +18 -4
  130. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.d.ts +6 -0
  131. package/dist/globalization/interfaces/common/II18nColumnTypes.d.ts +1 -0
  132. package/dist/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
  133. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.d.ts +3 -3
  134. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.d.ts +5 -5
  135. package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +2 -0
  136. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +6 -0
  137. package/dist/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
  138. package/dist/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
  139. package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
  140. package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +9 -9
  141. package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
  142. package/package.json +22 -16
  143. package/scripts/clean-build/index.js +62 -0
  144. package/scripts/generating-docs/index.js +133 -0
  145. package/{prepareToPublish.js → scripts/prepare-publish/index.js} +0 -0
  146. package/scripts/publishing/index.js +209 -0
  147. package/src/columns/constants/COLUMN_LABEL.ts +1 -0
  148. package/src/columns/constants/COLUMN_PROPERTY_INFO.ts +1 -1
  149. package/src/dates/constants/DATE_REGULAR_EXPRESSION.ts +1 -1
  150. package/src/dates/helpers/getSeparatorByDateFormat.ts +1 -1
  151. package/src/dates/helpers/validateDate.ts +1 -1
  152. package/src/dates/helpers/validateDateByDateFormat.ts +1 -1
  153. package/src/format/format.ts +3 -1
  154. package/src/format/localization.ts +16 -2
  155. package/src/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.ts +6 -0
  156. package/src/globalization/interfaces/common/II18nColumnTypes.ts +1 -0
  157. package/src/globalization/interfaces/dashboard/II18nDashboardToast.ts +1 -0
  158. package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.ts +3 -3
  159. package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.ts +5 -5
  160. package/src/globalization/interfaces/style_themes/II18nStyleThemesTheme.ts +2 -0
  161. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +6 -0
  162. package/src/globalization/labels/common/I18N_COLUMN_LABEL.ts +1 -0
  163. package/src/globalization/labels/dashboard/I18N_DASHBOARD.ts +1 -0
  164. package/src/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.ts +9 -9
  165. package/src/globalization/labels/style_themes/I18N_STYLE_THEMES.ts +2 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-34*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-37*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -80,12 +80,12 @@ Get a text and evaluate if it matchs with a token box label.
80
80
 
81
81
 
82
82
 
83
- ### dist/dates/helpers/getDateByDateFormat.js
83
+ ### dist/dates/adapters/mdyDateToDate.js
84
84
 
85
85
 
86
- #### getDateByDateFormat(date, format, time)
86
+ #### mdyDateToDate(monthYearDate, time)
87
87
 
88
- Gets a Date Object instance by a Date format
88
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
89
89
 
90
90
 
91
91
 
@@ -94,9 +94,8 @@ Gets a Date Object instance by a Date format
94
94
 
95
95
  | Name | Type | Description | |
96
96
  | ---- | ---- | ----------- | -------- |
97
- | date | | String with a formatted date |   |
98
- | format | | The date format |   |
99
- | time | | flag to convert the formatted date to miliseconds |   |
97
+ | monthYearDate | | String of [mm/dd/yyyy] date |   |
98
+ | time | | Flag to parse the object date to milliseconds. |   |
100
99
 
101
100
 
102
101
 
@@ -104,17 +103,17 @@ Gets a Date Object instance by a Date format
104
103
  ##### Returns
105
104
 
106
105
 
107
- - a Date object, milisecond time or the same value if date format does not match.
106
+ - The date object or the date in milliseconds
108
107
 
109
108
 
110
109
 
111
110
 
112
- ### dist/dates/helpers/getDateFormatByProperty.js
111
+ ### dist/dates/adapters/monthYearToDate.js
113
112
 
114
113
 
115
- #### getDateFormatByProperty(property)
114
+ #### monthYearToDate(monthYearDate, time)
116
115
 
117
- Gets the date format by the given property
116
+ Transforms String Date from a [Month Year] format to Date object.
118
117
 
119
118
 
120
119
 
@@ -123,7 +122,8 @@ Gets the date format by the given property
123
122
 
124
123
  | Name | Type | Description | |
125
124
  | ---- | ---- | ----------- | -------- |
126
- | property | | The Column Property |   |
125
+ | monthYearDate | | String of [Month Year] date |   |
126
+ | time | | Flag to parse the object date to milliseconds. |   |
127
127
 
128
128
 
129
129
 
@@ -131,17 +131,17 @@ Gets the date format by the given property
131
131
  ##### Returns
132
132
 
133
133
 
134
- - The date format
134
+ - The date object or the date in milliseconds
135
135
 
136
136
 
137
137
 
138
138
 
139
- ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
139
+ ### dist/dates/adapters/quarterYearToDate.js
140
140
 
141
141
 
142
- #### getDateFormatRegularExpressionInArray(dateFormat)
142
+ #### quarterYearToDate(quarterYearDate, time)
143
143
 
144
- Gets an array of regular expressions by the given date format
144
+ Transforms String Date from a [Quarter Year] format to Date object.
145
145
 
146
146
 
147
147
 
@@ -150,7 +150,8 @@ Gets an array of regular expressions by the given date format
150
150
 
151
151
  | Name | Type | Description | |
152
152
  | ---- | ---- | ----------- | -------- |
153
- | dateFormat | | the date format |   |
153
+ | quarterYearDate | | String of [Quarter Year] date |   |
154
+ | time | | Flag to parse the object date to milliseconds. |   |
154
155
 
155
156
 
156
157
 
@@ -158,17 +159,17 @@ Gets an array of regular expressions by the given date format
158
159
  ##### Returns
159
160
 
160
161
 
161
- - an array of regular expressions
162
+ - The date object or the date in milliseconds
162
163
 
163
164
 
164
165
 
165
166
 
166
- ### dist/dates/helpers/getSeparatorByDateFormat.js
167
+ ### dist/dates/adapters/weekYearToDate.js
167
168
 
168
169
 
169
- #### getSeparatorByDateFormat(format)
170
+ #### weekYearToDate(date, time)
170
171
 
171
- Gets the separator of the date format
172
+ Transforms String Date from a [Week Year] format to Date object.
172
173
 
173
174
 
174
175
 
@@ -177,7 +178,8 @@ Gets the separator of the date format
177
178
 
178
179
  | Name | Type | Description | |
179
180
  | ---- | ---- | ----------- | -------- |
180
- | format | | the date format |   |
181
+ | date | | String of [Week Year] date |   |
182
+ | time | | Flag to parse the object date to milliseconds. |   |
181
183
 
182
184
 
183
185
 
@@ -185,18 +187,17 @@ Gets the separator of the date format
185
187
  ##### Returns
186
188
 
187
189
 
188
- - a separator string
190
+ - The date object or the date in milliseconds
189
191
 
190
192
 
191
193
 
192
194
 
193
- ### dist/dates/helpers/getWeek.js
195
+ ### dist/dates/adapters/yearToDate.js
194
196
 
195
197
 
196
- #### getWeek(date)
198
+ #### yearToDate(yearDate, time)
197
199
 
198
- Gets the week number of the year
199
- Additionally, the month and the year
200
+ Transforms String Date from a [Year] format to Date object.
200
201
 
201
202
 
202
203
 
@@ -205,7 +206,8 @@ Additionally, the month and the year
205
206
 
206
207
  | Name | Type | Description | |
207
208
  | ---- | ---- | ----------- | -------- |
208
- | date | | the date object |   |
209
+ | yearDate | | String of [Year] date |   |
210
+ | time | | Flag to parse the object date to milliseconds. |   |
209
211
 
210
212
 
211
213
 
@@ -213,20 +215,17 @@ Additionally, the month and the year
213
215
  ##### Returns
214
216
 
215
217
 
216
- - an object with the week, month and year.
218
+ - The date object or the date in milliseconds
217
219
 
218
220
 
219
221
 
220
222
 
221
- ### dist/dates/helpers/validateDate.js
223
+ ### dist/dates/helpers/getDateByDateFormat.js
222
224
 
223
225
 
224
- #### validateDate(date, format)
226
+ #### getDateByDateFormat(date, format, time)
225
227
 
226
- Validate a string date depending on giving format
227
- - If the string is a token label, the function lets it pass.
228
- - Otherwise depends of the format
229
- - Some escenarios the string is a mix of token labels and dates
228
+ Gets a Date Object instance by a Date format
230
229
 
231
230
 
232
231
 
@@ -235,8 +234,9 @@ Validate a string date depending on giving format
235
234
 
236
235
  | Name | Type | Description | |
237
236
  | ---- | ---- | ----------- | -------- |
238
- | date | | String of date |   |
239
- | format | | String of the format to validate |   |
237
+ | date | | String with a formatted date |   |
238
+ | format | | The date format |   |
239
+ | time | | flag to convert the formatted date to miliseconds |   |
240
240
 
241
241
 
242
242
 
@@ -244,17 +244,17 @@ Validate a string date depending on giving format
244
244
  ##### Returns
245
245
 
246
246
 
247
- - True if it is valid or not. Undefined if date is undefined
247
+ - a Date object, milisecond time or the same value if date format does not match.
248
248
 
249
249
 
250
250
 
251
251
 
252
- ### dist/dates/helpers/validateDateByDateFormat.js
252
+ ### dist/dates/helpers/getDateFormatByProperty.js
253
253
 
254
254
 
255
- #### validateDateByDateFormat(date, dateForma)
255
+ #### getDateFormatByProperty(property)
256
256
 
257
- Validates the given string as Date by its date format.
257
+ Gets the date format by the given property
258
258
 
259
259
 
260
260
 
@@ -263,8 +263,7 @@ Validates the given string as Date by its date format.
263
263
 
264
264
  | Name | Type | Description | |
265
265
  | ---- | ---- | ----------- | -------- |
266
- | date | | a string to validate as date form |   |
267
- | dateForma | | the format of the date to validate the string |   |
266
+ | property | | The Column Property |   |
268
267
 
269
268
 
270
269
 
@@ -272,17 +271,17 @@ Validates the given string as Date by its date format.
272
271
  ##### Returns
273
272
 
274
273
 
275
- - true: the string is a valida date
274
+ - The date format
276
275
 
277
276
 
278
277
 
279
278
 
280
- ### dist/dates/adapters/mdyDateToDate.js
279
+ ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
281
280
 
282
281
 
283
- #### mdyDateToDate(monthYearDate, time)
282
+ #### getDateFormatRegularExpressionInArray(dateFormat)
284
283
 
285
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
284
+ Gets an array of regular expressions by the given date format
286
285
 
287
286
 
288
287
 
@@ -291,8 +290,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
291
290
 
292
291
  | Name | Type | Description | |
293
292
  | ---- | ---- | ----------- | -------- |
294
- | monthYearDate | | String of [mm/dd/yyyy] date |   |
295
- | time | | Flag to parse the object date to milliseconds. |   |
293
+ | dateFormat | | the date format |   |
296
294
 
297
295
 
298
296
 
@@ -300,17 +298,17 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
300
298
  ##### Returns
301
299
 
302
300
 
303
- - The date object or the date in milliseconds
301
+ - an array of regular expressions
304
302
 
305
303
 
306
304
 
307
305
 
308
- ### dist/dates/adapters/monthYearToDate.js
306
+ ### dist/dates/helpers/getSeparatorByDateFormat.js
309
307
 
310
308
 
311
- #### monthYearToDate(monthYearDate, time)
309
+ #### getSeparatorByDateFormat(format)
312
310
 
313
- Transforms String Date from a [Month Year] format to Date object.
311
+ Gets the separator of the date format
314
312
 
315
313
 
316
314
 
@@ -319,8 +317,7 @@ Transforms String Date from a [Month Year] format to Date object.
319
317
 
320
318
  | Name | Type | Description | |
321
319
  | ---- | ---- | ----------- | -------- |
322
- | monthYearDate | | String of [Month Year] date |   |
323
- | time | | Flag to parse the object date to milliseconds. |   |
320
+ | format | | the date format |   |
324
321
 
325
322
 
326
323
 
@@ -328,17 +325,18 @@ Transforms String Date from a [Month Year] format to Date object.
328
325
  ##### Returns
329
326
 
330
327
 
331
- - The date object or the date in milliseconds
328
+ - a separator string
332
329
 
333
330
 
334
331
 
335
332
 
336
- ### dist/dates/adapters/quarterYearToDate.js
333
+ ### dist/dates/helpers/getWeek.js
337
334
 
338
335
 
339
- #### quarterYearToDate(quarterYearDate, time)
336
+ #### getWeek(date)
340
337
 
341
- Transforms String Date from a [Quarter Year] format to Date object.
338
+ Gets the week number of the year
339
+ Additionally, the month and the year
342
340
 
343
341
 
344
342
 
@@ -347,8 +345,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
347
345
 
348
346
  | Name | Type | Description | |
349
347
  | ---- | ---- | ----------- | -------- |
350
- | quarterYearDate | | String of [Quarter Year] date |   |
351
- | time | | Flag to parse the object date to milliseconds. |   |
348
+ | date | | the date object |   |
352
349
 
353
350
 
354
351
 
@@ -356,17 +353,20 @@ Transforms String Date from a [Quarter Year] format to Date object.
356
353
  ##### Returns
357
354
 
358
355
 
359
- - The date object or the date in milliseconds
356
+ - an object with the week, month and year.
360
357
 
361
358
 
362
359
 
363
360
 
364
- ### dist/dates/adapters/weekYearToDate.js
361
+ ### dist/dates/helpers/validateDate.js
365
362
 
366
363
 
367
- #### weekYearToDate(date, time)
364
+ #### validateDate(date, format)
368
365
 
369
- Transforms String Date from a [Week Year] format to Date object.
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
370
370
 
371
371
 
372
372
 
@@ -375,8 +375,8 @@ Transforms String Date from a [Week Year] format to Date object.
375
375
 
376
376
  | Name | Type | Description | |
377
377
  | ---- | ---- | ----------- | -------- |
378
- | date | | String of [Week Year] date |   |
379
- | time | | Flag to parse the object date to milliseconds. |   |
378
+ | date | | String of date |   |
379
+ | format | | String of the format to validate |   |
380
380
 
381
381
 
382
382
 
@@ -384,17 +384,17 @@ Transforms String Date from a [Week Year] format to Date object.
384
384
  ##### Returns
385
385
 
386
386
 
387
- - The date object or the date in milliseconds
387
+ - True if it is valid or not. Undefined if date is undefined
388
388
 
389
389
 
390
390
 
391
391
 
392
- ### dist/dates/adapters/yearToDate.js
392
+ ### dist/dates/helpers/validateDateByDateFormat.js
393
393
 
394
394
 
395
- #### yearToDate(yearDate, time)
395
+ #### validateDateByDateFormat(date, dateForma)
396
396
 
397
- Transforms String Date from a [Year] format to Date object.
397
+ Validates the given string as Date by its date format.
398
398
 
399
399
 
400
400
 
@@ -403,8 +403,8 @@ Transforms String Date from a [Year] format to Date object.
403
403
 
404
404
  | Name | Type | Description | |
405
405
  | ---- | ---- | ----------- | -------- |
406
- | yearDate | | String of [Year] date |   |
407
- | time | | Flag to parse the object date to milliseconds. |   |
406
+ | date | | a string to validate as date form |   |
407
+ | dateForma | | the format of the date to validate the string |   |
408
408
 
409
409
 
410
410
 
@@ -412,7 +412,7 @@ Transforms String Date from a [Year] format to Date object.
412
412
  ##### Returns
413
413
 
414
414
 
415
- - The date object or the date in milliseconds
415
+ - true: the string is a valida date
416
416
 
417
417
 
418
418
 
@@ -688,12 +688,12 @@ Output:
688
688
 
689
689
 
690
690
 
691
- ### dist/general/array/delete.js
691
+ ### dist/filters/adapters/FDToFlatUI.js
692
692
 
693
693
 
694
- #### ArrayDelete(array, index)
694
+ #### FDToFlatUI(filterData, datasetsInfo)
695
695
 
696
- Inmutable Array Item deletion
696
+ Generates a Flattened UI filter structure from Filter Data structure.
697
697
 
698
698
 
699
699
 
@@ -702,8 +702,8 @@ Inmutable Array Item deletion
702
702
 
703
703
  | Name | Type | Description | |
704
704
  | ---- | ---- | ----------- | -------- |
705
- | array | `Array` | a collection of items to delete |   |
706
- | index | `Number` | the position of the item to delete |   |
705
+ | filterData | | The filter data object. |   |
706
+ | datasetsInfo | | Collection of datasets information |   |
707
707
 
708
708
 
709
709
 
@@ -711,20 +711,13 @@ Inmutable Array Item deletion
711
711
  ##### Returns
712
712
 
713
713
 
714
- - a new Array or the given parameter when is empty or not an array
715
-
716
-
717
-
714
+ - a flattened UI filters array
718
715
 
719
- ### dist/general/array/filterNestedTree.js
720
716
 
721
717
 
722
- #### filterNestedTree(arr, childArrKey, condition)
718
+ #### FD21ToFlatUI(scopes, datasetsInfo)
723
719
 
724
- Filters a nested tree array by a custom condition on the last child node
725
- - If the given arguments are not valid, the function returns the first argument.
726
- - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
727
- - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
720
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
728
721
 
729
722
 
730
723
 
@@ -733,9 +726,8 @@ Filters a nested tree array by a custom condition on the last child node
733
726
 
734
727
  | Name | Type | Description | |
735
728
  | ---- | ---- | ----------- | -------- |
736
- | arr | | nested tree array |   |
737
- | childArrKey | | property representing the children array on the nested tree |   |
738
- | condition | | function callback that determines if the filter is applied on the last child node of the nested tree |   |
729
+ | scopes | | The filter scope section |   |
730
+ | datasetsInfo | | Collection of datasets information |   |
739
731
 
740
732
 
741
733
 
@@ -743,17 +735,17 @@ Filters a nested tree array by a custom condition on the last child node
743
735
  ##### Returns
744
736
 
745
737
 
746
- - array filtered
738
+ - a flattened UI filters array
747
739
 
748
740
 
749
741
 
750
742
 
751
- ### dist/general/array/flattenDeep.js
743
+ ### dist/filters/adapters/FDToLogic.js
752
744
 
753
745
 
754
- #### flattenDeep(arr)
746
+ #### FDToLogic(filterData)
755
747
 
756
- Flat deeply an array
748
+ Generates a Filter Logic structure from Filter Data structure.
757
749
 
758
750
 
759
751
 
@@ -762,7 +754,7 @@ Flat deeply an array
762
754
 
763
755
  | Name | Type | Description | |
764
756
  | ---- | ---- | ----------- | -------- |
765
- | arr | | Array to flat deeply |   |
757
+ | filterData | | The filter data object. |   |
766
758
 
767
759
 
768
760
 
@@ -770,17 +762,13 @@ Flat deeply an array
770
762
  ##### Returns
771
763
 
772
764
 
773
- - flatten array
774
-
775
-
776
-
765
+ - a filter logic array
777
766
 
778
- ### dist/general/array/getFirstIndexFromArray.js
779
767
 
780
768
 
781
- #### getFirstIndexFromArray(array, callback)
769
+ #### getLogicBodyFromFD21(filterData)
782
770
 
783
- Gets the first index from the array by a callback condition
771
+ Gets the logic body
784
772
 
785
773
 
786
774
 
@@ -789,8 +777,7 @@ Gets the first index from the array by a callback condition
789
777
 
790
778
  | Name | Type | Description | |
791
779
  | ---- | ---- | ----------- | -------- |
792
- | array | | |   |
793
- | callback | | function callback |   |
780
+ | filterData | | The filter data object |   |
794
781
 
795
782
 
796
783
 
@@ -798,17 +785,17 @@ Gets the first index from the array by a callback condition
798
785
  ##### Returns
799
786
 
800
787
 
801
- - the first index of the array. -1 when the condition is not satisfied
788
+ - a filter logic array
802
789
 
803
790
 
804
791
 
805
792
 
806
- ### dist/general/array/getLastIndexFromArray.js
793
+ ### dist/filters/adapters/FDToUI.js
807
794
 
808
795
 
809
- #### getLastIndexFromArray(array, callback)
796
+ #### FDToUI(filterData, datasetsInfo)
810
797
 
811
- Gets the last index from the array by a callback condition
798
+ Generates a UI filter structure from Filter Data structure.
812
799
 
813
800
 
814
801
 
@@ -817,8 +804,8 @@ Gets the last index from the array by a callback condition
817
804
 
818
805
  | Name | Type | Description | |
819
806
  | ---- | ---- | ----------- | -------- |
820
- | array | | |   |
821
- | callback | | function callback |   |
807
+ | filterData | | The filter data object. |   |
808
+ | datasetsInfo | | Collection of datasets information |   |
822
809
 
823
810
 
824
811
 
@@ -826,17 +813,13 @@ Gets the last index from the array by a callback condition
826
813
  ##### Returns
827
814
 
828
815
 
829
- - the last index of the array. -1 when the condition is not satisfied
830
-
831
-
832
-
816
+ - a UI Filters structure
833
817
 
834
- ### dist/general/function/debounce.js
835
818
 
836
819
 
837
- #### debounce(fn, time)
820
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
838
821
 
839
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
822
+ Generates a UI filter Structure from the Filter Data structure v2.1
840
823
 
841
824
 
842
825
 
@@ -845,8 +828,10 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
845
828
 
846
829
  | Name | Type | Description | |
847
830
  | ---- | ---- | ----------- | -------- |
848
- | fn | `Function` | original Function |   |
849
- | time | `Number` | default 500ms |   |
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 |   |
850
835
 
851
836
 
852
837
 
@@ -854,17 +839,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
854
839
  ##### Returns
855
840
 
856
841
 
857
- - `Function` debounced functions
842
+ - a UI filter Structure
858
843
 
859
844
 
860
845
 
861
846
 
862
- ### dist/general/function/throttled.js
847
+ ### dist/filters/adapters/UIToFD.js
863
848
 
864
849
 
865
- #### throttled(fn, time)
850
+ #### UIToFD(filterData)
866
851
 
867
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
852
+ Generates a Filter Data Structure structure from UI Filter Data structure.
868
853
 
869
854
 
870
855
 
@@ -873,8 +858,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
873
858
 
874
859
  | Name | Type | Description | |
875
860
  | ---- | ---- | ----------- | -------- |
876
- | fn | `Function` | original Function |   |
877
- | time | `Number` | default 500ms |   |
861
+ | filterData | | The UI filter data object. |   |
878
862
 
879
863
 
880
864
 
@@ -882,18 +866,13 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
882
866
  ##### Returns
883
867
 
884
868
 
885
- - `Function` throttled function
886
-
887
-
888
-
869
+ - a Filter Data structure
889
870
 
890
- ### dist/general/object/cloneDeep.js
891
871
 
892
872
 
893
- #### cloneDeep(obj)
873
+ #### UI21ToFD(uFilterData, version)
894
874
 
895
- A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
896
- Not to use this function with inner objects and functions
875
+ Builds the Fitler Data structure from UI filter data
897
876
 
898
877
 
899
878
 
@@ -902,7 +881,8 @@ Not to use this function with inner objects and functions
902
881
 
903
882
  | Name | Type | Description | |
904
883
  | ---- | ---- | ----------- | -------- |
905
- | obj | | The object |   |
884
+ | uFilterData | | The UI filter Data object |   |
885
+ | version | | the version of the structure |   |
906
886
 
907
887
 
908
888
 
@@ -910,21 +890,17 @@ Not to use this function with inner objects and functions
910
890
  ##### Returns
911
891
 
912
892
 
913
- - The new reference object or the given object if the parsing is incorrect or empty
893
+ -
914
894
 
915
895
 
916
896
 
917
897
 
918
- ### dist/general/object/get.js
898
+ ### dist/filters/adapters/UIToFlatUI.js
919
899
 
920
900
 
921
- #### _get(baseObject, path, defaultValue)
901
+ #### UIToFlatUI(filterData, datasetsInfo)
922
902
 
923
- Like lodash _.get.
924
- Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
925
-
926
- Empty arrays and empty objects are returned but the defaultValue is not
927
- Undefined and null values will return the defaultValue.
903
+ Generates a Flattened UI filter structure from UI Filter Data structure.
928
904
 
929
905
 
930
906
 
@@ -933,59 +909,22 @@ Undefined and null values will return the defaultValue.
933
909
 
934
910
  | Name | Type | Description | |
935
911
  | ---- | ---- | ----------- | -------- |
936
- | baseObject | | The object to query |   |
937
- | path | | The string path or collection of string paths of the property to get. |   |
938
- | defaultValue | | The value returned for undefined resolved values. |   |
939
-
940
-
941
-
912
+ | filterData | | The UI filter data object. |   |
913
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
942
914
 
943
- ##### Examples
944
915
 
945
- ```javascript
946
- // returns 'Hello'
947
- _get({ item1: 'Hello', item2: 'World' }, 'item1')
948
- ```
949
- ```javascript
950
- // returns 'A simple Hello'
951
- _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
952
- ```
953
- ```javascript
954
- // returns 'Hello Again'
955
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
956
- ```
957
- ```javascript
958
- // returns 'Hello 2'
959
- _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
960
- ```
961
- ```javascript
962
- // returns 'Hello Again'
963
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
964
- ```
965
916
 
966
917
 
967
918
  ##### Returns
968
919
 
969
920
 
970
- - the resolved value.
971
-
972
-
973
-
921
+ - a flattened UI filters array
974
922
 
975
- ### dist/general/object/getAttribute.js
976
923
 
977
924
 
978
- #### getAttribute(obj, key)
925
+ #### UI21ToFlatUI(scopes)
979
926
 
980
- Searchs for properties in different case styles such as: lower, upper, camel and pascal
981
- - To optimize the searching, it is required a key in a snake_case style
982
- - List of cases that do not match
983
- -- From lower to snake case
984
- -- From upper to snake case
985
- -- From lower to camel case
986
- -- From upper to camel case
987
- -- From lower to pascal case
988
- -- From upper to pascal case
927
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
989
928
 
990
929
 
991
930
 
@@ -994,33 +933,26 @@ Searchs for properties in different case styles such as: lower, upper, camel and
994
933
 
995
934
  | Name | Type | Description | |
996
935
  | ---- | ---- | ----------- | -------- |
997
- | obj | `object` | object to look for |   |
998
- | key | `string` | String attribute in snake_case style |   |
999
-
1000
-
1001
-
936
+ | scopes | | The filter scope section |   |
1002
937
 
1003
- ##### Examples
1004
938
 
1005
- ```javascript
1006
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
1007
- ```
1008
939
 
1009
940
 
1010
941
  ##### Returns
1011
942
 
1012
943
 
1013
- - `Void`
944
+ - a flattened UI filters array
1014
945
 
1015
946
 
1016
947
 
1017
948
 
1018
- ### dist/general/object/hasProperty.js
949
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
1019
950
 
1020
951
 
1021
- #### _hasProperty(obj, property)
952
+ #### adaptDateGroupingProperty(property)
1022
953
 
1023
- Use the hasOwnProperty in order to verify if the given property exists in the object.
954
+ [TODO: For 2022, eliminate this adapter]
955
+ Get the new property base on the old date grouping properties
1024
956
 
1025
957
 
1026
958
 
@@ -1029,38 +961,25 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
1029
961
 
1030
962
  | Name | Type | Description | |
1031
963
  | ---- | ---- | ----------- | -------- |
1032
- | obj | `object` | an object |   |
1033
- | property | `string` | String to verify if exists in the object as property |   |
1034
-
1035
-
1036
-
1037
-
1038
- ##### Examples
964
+ | property | | |   |
1039
965
 
1040
- ```javascript
1041
- const prop = 'prop2'
1042
- const obj1 = { prop1: 'hello', prop2: 'world'}
1043
- _hasProperty(ob1, prop1) // true
1044
966
 
1045
- const obj2 = { prop1: 'hello world' }
1046
- _hasProperty(ob1, prop2) // false
1047
- ```
1048
967
 
1049
968
 
1050
969
  ##### Returns
1051
970
 
1052
971
 
1053
- - True if the object has the given property; otherwise, false.
972
+ -
1054
973
 
1055
974
 
1056
975
 
1057
976
 
1058
- ### dist/general/object/isObject.js
977
+ ### dist/filters/adapters/adaptFilterData.js
1059
978
 
1060
979
 
1061
- #### isObject(obj)
980
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1062
981
 
1063
- Checks if the given argument is an object type
982
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1064
983
 
1065
984
 
1066
985
 
@@ -1069,7 +988,9 @@ Checks if the given argument is an object type
1069
988
 
1070
989
  | Name | Type | Description | |
1071
990
  | ---- | ---- | ----------- | -------- |
1072
- | obj | | the variable to check |   |
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 |   |
1073
994
 
1074
995
 
1075
996
 
@@ -1077,18 +998,18 @@ Checks if the given argument is an object type
1077
998
  ##### Returns
1078
999
 
1079
1000
 
1080
- - True: It is an object; False: It is not.
1001
+ - A new filter data structure v2.1
1081
1002
 
1082
1003
 
1083
1004
 
1084
1005
 
1085
- ### dist/general/object/mapValues.js
1006
+ ### dist/filters/adapters/adaptFilterValues.js
1086
1007
 
1087
1008
 
1088
- #### mapValues(baseObject, iteratee)
1009
+ #### adaptFilterValues(filter)
1089
1010
 
1090
- Invoke iteratee (function) for each object key-value pair
1091
- and return a mapped object
1011
+ [TODO: For 2022, eliminate this adapter]
1012
+ Gets an adapted filter value array. Validates the enabled property and sets
1092
1013
 
1093
1014
 
1094
1015
 
@@ -1097,8 +1018,7 @@ and return a mapped object
1097
1018
 
1098
1019
  | Name | Type | Description | |
1099
1020
  | ---- | ---- | ----------- | -------- |
1100
- | baseObject | `Object` | Base object. |   |
1101
- | iteratee | `Function` | The executed per iteration. |   |
1021
+ | filter | | The filter |   |
1102
1022
 
1103
1023
 
1104
1024
 
@@ -1106,18 +1026,17 @@ and return a mapped object
1106
1026
  ##### Returns
1107
1027
 
1108
1028
 
1109
- - `Object` New mapped object.
1029
+ - A new value array with the filled properties.
1110
1030
 
1111
1031
 
1112
1032
 
1113
1033
 
1114
- ### dist/general/object/mergeDeep.js
1034
+ ### dist/filters/adapters/flatUIToFD.js
1115
1035
 
1116
1036
 
1117
- #### mergeDeep(obj1, obj2, settings)
1037
+ #### flatUIToFD(uFilters, version)
1118
1038
 
1119
- Merges two objects into a new one.
1120
- The second given argument to the first given argument.
1039
+ Generates a filter data structure from the flatttened UI filters.
1121
1040
 
1122
1041
 
1123
1042
 
@@ -1126,9 +1045,8 @@ The second given argument to the first given argument.
1126
1045
 
1127
1046
  | Name | Type | Description | |
1128
1047
  | ---- | ---- | ----------- | -------- |
1129
- | obj1 | | The target object |   |
1130
- | obj2 | | The object to be merged |   |
1131
- | settings | | Object settings for this function |   |
1048
+ | uFilters | | Array of flattened filters from UI |   |
1049
+ | version | | Tag for the version of the filter data structure |   |
1132
1050
 
1133
1051
 
1134
1052
 
@@ -1136,13 +1054,14 @@ The second given argument to the first given argument.
1136
1054
  ##### Returns
1137
1055
 
1138
1056
 
1139
- - a new merged object
1057
+ - a Filter Data.
1140
1058
 
1141
1059
 
1142
1060
 
1143
- #### isValid(obj1, obj2)
1061
+ #### buildScopes(fbFilters)
1144
1062
 
1145
- Validates if the two arguments are objects
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
1146
1065
 
1147
1066
 
1148
1067
 
@@ -1151,8 +1070,7 @@ Validates if the two arguments are objects
1151
1070
 
1152
1071
  | Name | Type | Description | |
1153
1072
  | ---- | ---- | ----------- | -------- |
1154
- | obj1 | | The target object |   |
1155
- | obj2 | | The object to be merged |   |
1073
+ | fbFilters | | Array of flat filters from UI |   |
1156
1074
 
1157
1075
 
1158
1076
 
@@ -1160,13 +1078,13 @@ Validates if the two arguments are objects
1160
1078
  ##### Returns
1161
1079
 
1162
1080
 
1163
- - true: they are valid; false: they are not
1081
+ - an array of scopes structure.
1164
1082
 
1165
1083
 
1166
1084
 
1167
- #### getParamsToMergeDeep(settings)
1085
+ #### buildScope(uFilter)
1168
1086
 
1169
- Validates and gets the settings with all set parameters.
1087
+ Gets an scope structure for the filter data
1170
1088
 
1171
1089
 
1172
1090
 
@@ -1175,7 +1093,7 @@ Validates and gets the settings with all set parameters.
1175
1093
 
1176
1094
  | Name | Type | Description | |
1177
1095
  | ---- | ---- | ----------- | -------- |
1178
- | settings | | the settings object |   |
1096
+ | uFilter | | UI structure filter |   |
1179
1097
 
1180
1098
 
1181
1099
 
@@ -1183,17 +1101,13 @@ Validates and gets the settings with all set parameters.
1183
1101
  ##### Returns
1184
1102
 
1185
1103
 
1186
- - a new settings object with all set parameters.
1187
-
1188
-
1189
-
1104
+ - an scope structure
1190
1105
 
1191
- ### dist/general/object/objectCopy.js
1192
1106
 
1193
1107
 
1194
- #### objectCopy(entity, cache)
1108
+ #### buildDataset(uFilter)
1195
1109
 
1196
- Created a new reference of the given argument
1110
+ Gets an dataset structure for the filter data
1197
1111
 
1198
1112
 
1199
1113
 
@@ -1202,8 +1116,7 @@ Created a new reference of the given argument
1202
1116
 
1203
1117
  | Name | Type | Description | |
1204
1118
  | ---- | ---- | ----------- | -------- |
1205
- | entity | | The variable to be copied |   |
1206
- | cache | | |   |
1119
+ | uFilter | | a UI structure filter |   |
1207
1120
 
1208
1121
 
1209
1122
 
@@ -1211,17 +1124,13 @@ Created a new reference of the given argument
1211
1124
  ##### Returns
1212
1125
 
1213
1126
 
1214
- - A new reference of the given argument
1215
-
1216
-
1217
-
1127
+ - an dataset structure
1218
1128
 
1219
- ### dist/general/object/omit.js
1220
1129
 
1221
1130
 
1222
- #### omit(obj, props)
1131
+ #### buildFilter(uFilter)
1223
1132
 
1224
- return a new Object excluding attributes in _props_ list
1133
+ Gets an filter structure for the filter data
1225
1134
 
1226
1135
 
1227
1136
 
@@ -1230,8 +1139,7 @@ return a new Object excluding attributes in _props_ list
1230
1139
 
1231
1140
  | Name | Type | Description | |
1232
1141
  | ---- | ---- | ----------- | -------- |
1233
- | obj | `Object` | base object |   |
1234
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
1142
+ | uFilter | | a UI structure filter | &nbsp; |
1235
1143
 
1236
1144
 
1237
1145
 
@@ -1239,17 +1147,17 @@ return a new Object excluding attributes in _props_ list
1239
1147
  ##### Returns
1240
1148
 
1241
1149
 
1242
- - `Object` clean object
1150
+ - an filter structure
1243
1151
 
1244
1152
 
1245
1153
 
1246
1154
 
1247
- ### dist/general/object/pick.js
1155
+ ### dist/filters/adapters/flatUIToLogic.js
1248
1156
 
1249
1157
 
1250
- #### pick(baseObject, keys)
1158
+ #### flatUIToLogic(uFilter)
1251
1159
 
1252
- return a new object just with attributes in _keys_ list
1160
+ Generates a Logic structure from flattened UI filters
1253
1161
 
1254
1162
 
1255
1163
 
@@ -1258,8 +1166,7 @@ return a new object just with attributes in _keys_ list
1258
1166
 
1259
1167
  | Name | Type | Description | |
1260
1168
  | ---- | ---- | ----------- | -------- |
1261
- | baseObject | `Object` | base object | &nbsp; |
1262
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
1169
+ | uFilter | | Array of flat filters from UI | &nbsp; |
1263
1170
 
1264
1171
 
1265
1172
 
@@ -1267,17 +1174,17 @@ return a new object just with attributes in _keys_ list
1267
1174
  ##### Returns
1268
1175
 
1269
1176
 
1270
- - `Object` new object just with desired attributes
1177
+ - The logic structure
1271
1178
 
1272
1179
 
1273
1180
 
1274
1181
 
1275
- ### dist/general/object/serialize.js
1182
+ ### dist/filters/adapters/flatUIToOldLogic.js
1276
1183
 
1277
1184
 
1278
- #### serialize(obj)
1185
+ #### flatUIToOldLogic(uFilters)
1279
1186
 
1280
- serialize object to url param
1187
+ Generates a Logic structure from flattened UI filters
1281
1188
 
1282
1189
 
1283
1190
 
@@ -1286,7 +1193,7 @@ serialize object to url param
1286
1193
 
1287
1194
  | Name | Type | Description | |
1288
1195
  | ---- | ---- | ----------- | -------- |
1289
- | obj | | - Object to be serialized | &nbsp; |
1196
+ | uFilters | | Array of flat filters from UI | &nbsp; |
1290
1197
 
1291
1198
 
1292
1199
 
@@ -1294,17 +1201,17 @@ serialize object to url param
1294
1201
  ##### Returns
1295
1202
 
1296
1203
 
1297
- - `Void`
1204
+ - The logic structure
1298
1205
 
1299
1206
 
1300
1207
 
1301
1208
 
1302
- ### dist/general/string/capitalize.js
1209
+ ### dist/filters/adapters/flatUIToUI.js
1303
1210
 
1304
1211
 
1305
- #### capitalize(text)
1212
+ #### flatUIToUI(uFilters, version)
1306
1213
 
1307
- Upper case the first letter of a given text
1214
+ Generates a UI filter data structure from the flatttened UI filters.
1308
1215
 
1309
1216
 
1310
1217
 
@@ -1313,7 +1220,8 @@ Upper case the first letter of a given text
1313
1220
 
1314
1221
  | Name | Type | Description | |
1315
1222
  | ---- | ---- | ----------- | -------- |
1316
- | text | `String` | | &nbsp; |
1223
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1317
1225
 
1318
1226
 
1319
1227
 
@@ -1321,18 +1229,14 @@ Upper case the first letter of a given text
1321
1229
  ##### Returns
1322
1230
 
1323
1231
 
1324
- - `String` a capitalized text
1325
-
1326
-
1327
-
1232
+ - a UI Filter Data.
1328
1233
 
1329
- ### dist/general/mix/compareDeep.js
1330
1234
 
1331
1235
 
1332
- #### compareDeep(object1, object2)
1236
+ #### buildScopes(fbFilters)
1333
1237
 
1334
- Compares two objects to know if they are equals. Go across nested objects.
1335
- Includes arrays in the comparison.
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
1336
1240
 
1337
1241
 
1338
1242
 
@@ -1341,8 +1245,7 @@ Includes arrays in the comparison.
1341
1245
 
1342
1246
  | Name | Type | Description | |
1343
1247
  | ---- | ---- | ----------- | -------- |
1344
- | object1 | | First Object to compare | &nbsp; |
1345
- | object2 | | Second Object to compare | &nbsp; |
1248
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
1346
1249
 
1347
1250
 
1348
1251
 
@@ -1350,17 +1253,13 @@ Includes arrays in the comparison.
1350
1253
  ##### Returns
1351
1254
 
1352
1255
 
1353
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
1354
-
1355
-
1356
-
1256
+ - an array of scopes structure.
1357
1257
 
1358
- ### dist/general/mix/getTag.js
1359
1258
 
1360
1259
 
1361
- #### getTag(value)
1260
+ #### buildScope(uFilter)
1362
1261
 
1363
- Gets the `toStringTag` of `value`.
1262
+ Gets an scope structure for the UI filter data
1364
1263
 
1365
1264
 
1366
1265
 
@@ -1369,7 +1268,7 @@ Gets the `toStringTag` of `value`.
1369
1268
 
1370
1269
  | Name | Type | Description | |
1371
1270
  | ---- | ---- | ----------- | -------- |
1372
- | value | | The value to query. | &nbsp; |
1271
+ | uFilter | | UI structure filter | &nbsp; |
1373
1272
 
1374
1273
 
1375
1274
 
@@ -1377,17 +1276,13 @@ Gets the `toStringTag` of `value`.
1377
1276
  ##### Returns
1378
1277
 
1379
1278
 
1380
- - `string` Returns the `toStringTag`.
1381
-
1382
-
1383
-
1279
+ - an scope structure
1384
1280
 
1385
- ### dist/general/mix/importScripts.js
1386
1281
 
1387
1282
 
1388
- #### importScripts(scripts)
1283
+ #### buildDataset(uFilter)
1389
1284
 
1390
- Import a set of external Scripts given the URL in both serie and cascade way
1285
+ Gets an dataset structure for the UI filter data
1391
1286
 
1392
1287
 
1393
1288
 
@@ -1396,54 +1291,21 @@ Import a set of external Scripts given the URL in both serie and cascade way
1396
1291
 
1397
1292
  | Name | Type | Description | |
1398
1293
  | ---- | ---- | ----------- | -------- |
1399
- | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1400
- | scripts.url | `String` | CDN URL | &nbsp; |
1401
- | scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | &nbsp; |
1402
- | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1403
- | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1404
- | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
1294
+ | uFilter | | a UI structure filter | &nbsp; |
1405
1295
 
1406
1296
 
1407
1297
 
1408
1298
 
1409
- ##### Examples
1299
+ ##### Returns
1410
1300
 
1411
- ```javascript
1412
- // 1) Simple script (paralell loading)
1413
- importScripts(['http://myscript.js', 'http://another.js']);
1414
1301
 
1415
- // 2) Loading `.js` and `.esm.js` script (parallel loading)
1416
- importScripts([
1417
- { url: 'http://myscript.esm.js', type: 'module' },
1418
- { url: 'http://myscript.js', noModule: true }
1419
- ]);
1420
-
1421
- // 3) import dependent scripts (cascade)
1422
- importScripts([
1423
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1424
- ]);
1425
-
1426
- // 4) mix
1427
- importScripts([
1428
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1429
- { url: 'http://another.esm.js', type: 'module' },
1430
- { url: 'http://another.js', noModule: true },
1431
- 'http://simplescript.js'
1432
- ]);
1433
- ```
1434
-
1435
-
1436
- ##### Returns
1437
-
1438
-
1439
- - `Promise` Promise when all script have been loaded
1302
+ - an dataset structure
1440
1303
 
1441
1304
 
1442
1305
 
1443
- #### loadScript(url, type, noModule)
1306
+ #### buildFilter(uFilter)
1444
1307
 
1445
- Creates the script element and appends to document.head
1446
- return a Promise that is resolved when the script is loaded
1308
+ Gets an filter structure for the UI filter data
1447
1309
 
1448
1310
 
1449
1311
 
@@ -1452,9 +1314,7 @@ return a Promise that is resolved when the script is loaded
1452
1314
 
1453
1315
  | Name | Type | Description | |
1454
1316
  | ---- | ---- | ----------- | -------- |
1455
- | url | `String` | Cdn Url | &nbsp; |
1456
- | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1457
- | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1317
+ | uFilter | | a UI structure filter | &nbsp; |
1458
1318
 
1459
1319
 
1460
1320
 
@@ -1462,17 +1322,17 @@ return a Promise that is resolved when the script is loaded
1462
1322
  ##### Returns
1463
1323
 
1464
1324
 
1465
- - `Void`
1325
+ - an filter structure
1466
1326
 
1467
1327
 
1468
1328
 
1469
1329
 
1470
- ### dist/general/mix/isEmpty.js
1330
+ ### dist/filters/adapters/logicToFD.js
1471
1331
 
1472
1332
 
1473
- #### isEmpty(variable, includeFalsy)
1333
+ #### logicToFD(filterData, version)
1474
1334
 
1475
- Validates if the given argument is empty
1335
+ Generates a filter data structure from the old logic structure (v2.0).
1476
1336
 
1477
1337
 
1478
1338
 
@@ -1481,8 +1341,8 @@ Validates if the given argument is empty
1481
1341
 
1482
1342
  | Name | Type | Description | |
1483
1343
  | ---- | ---- | ----------- | -------- |
1484
- | variable | | the given variable | &nbsp; |
1485
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1344
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1486
1346
 
1487
1347
 
1488
1348
 
@@ -1490,19 +1350,17 @@ Validates if the given argument is empty
1490
1350
  ##### Returns
1491
1351
 
1492
1352
 
1493
- - true: the given argument is empty; false: is not.
1353
+ - a Filter Data.
1494
1354
 
1495
1355
 
1496
1356
 
1497
1357
 
1498
- ### dist/general/mix/isNaNV2.js
1358
+ ### dist/filters/adapters/logicToFlatUI.js
1499
1359
 
1500
1360
 
1501
- #### isNaNV2(variable)
1361
+ #### logicToFlatUI(logics)
1502
1362
 
1503
- Validates if the recieved number is NaN type.
1504
- This function recieves any variable but will return false.
1505
- Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
1363
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1506
1364
 
1507
1365
 
1508
1366
 
@@ -1511,7 +1369,7 @@ Validates if variable is null, undefined, or an empty string, also, the function
1511
1369
 
1512
1370
  | Name | Type | Description | |
1513
1371
  | ---- | ---- | ----------- | -------- |
1514
- | variable | | the variable to validate | &nbsp; |
1372
+ | logics | | The old logic structure (v2.0) | &nbsp; |
1515
1373
 
1516
1374
 
1517
1375
 
@@ -1519,18 +1377,13 @@ Validates if variable is null, undefined, or an empty string, also, the function
1519
1377
  ##### Returns
1520
1378
 
1521
1379
 
1522
- - True if variable is a NaN or false otherwise
1523
-
1524
-
1525
-
1380
+ - The Flattened UI Filters array
1526
1381
 
1527
- ### dist/general/mix/isNull.js
1528
1382
 
1529
1383
 
1530
- #### isNull(arg)
1384
+ #### getFilter(filters, filter, getIndex)
1531
1385
 
1532
- return if a given variable is either `null` or `undefined`
1533
- useful to avoid falsify validating Number Zero (0)
1386
+ Get the filter or the index of the given array, validating an old filter structure.
1534
1387
 
1535
1388
 
1536
1389
 
@@ -1539,7 +1392,9 @@ useful to avoid falsify validating Number Zero (0)
1539
1392
 
1540
1393
  | Name | Type | Description | |
1541
1394
  | ---- | ---- | ----------- | -------- |
1542
- | arg | `any` | | &nbsp; |
1395
+ | filters | | The array of UI filters | &nbsp; |
1396
+ | filter | | The old logic structure filter | &nbsp; |
1397
+ | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
1543
1398
 
1544
1399
 
1545
1400
 
@@ -1547,19 +1402,13 @@ useful to avoid falsify validating Number Zero (0)
1547
1402
  ##### Returns
1548
1403
 
1549
1404
 
1550
- - `Boolean`
1551
-
1552
-
1553
-
1405
+ - the index or the UI filter object
1554
1406
 
1555
- ### dist/general/mix/randomId.js
1556
1407
 
1557
1408
 
1558
- #### randomId(length, exclude)
1409
+ #### refineRankingValues(values, uiValues)
1559
1410
 
1560
- Creates a random string
1561
- - If the first given argument is different than a length number, the variable is replaced by a default number
1562
- - If the optional second given argument is passed the random string is permutated.
1411
+ Refines the values of the Ranking column type.
1563
1412
 
1564
1413
 
1565
1414
 
@@ -1568,8 +1417,8 @@ Creates a random string
1568
1417
 
1569
1418
  | Name | Type | Description | |
1570
1419
  | ---- | ---- | ----------- | -------- |
1571
- | length | `Number` | size of the generated string. Default 8 | &nbsp; |
1572
- | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
1420
+ | values | | the Array of Ranking values | &nbsp; |
1421
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1573
1422
 
1574
1423
 
1575
1424
 
@@ -1577,19 +1426,17 @@ Creates a random string
1577
1426
  ##### Returns
1578
1427
 
1579
1428
 
1580
- - `String` Random string
1429
+ - the array of Ranking values
1581
1430
 
1582
1431
 
1583
1432
 
1584
1433
 
1585
- ### dist/general/mix/size.js
1434
+ ### dist/filters/adapters/logicToUI.js
1586
1435
 
1587
1436
 
1588
- #### size(obj)
1437
+ #### logicToUI(uFilters, datasetsInfo)
1589
1438
 
1590
- Gets the length of the given array.
1591
- - Useful for Object, Array and string type.
1592
- - For `null` or `undefined` or else argument the returned value will be 0.
1439
+ Generates a UI filter structure from the old logic structure (v2.0).
1593
1440
 
1594
1441
 
1595
1442
 
@@ -1598,7 +1445,8 @@ Gets the length of the given array.
1598
1445
 
1599
1446
  | Name | Type | Description | |
1600
1447
  | ---- | ---- | ----------- | -------- |
1601
- | obj | `Any` | Any object-type variable | &nbsp; |
1448
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1602
1450
 
1603
1451
 
1604
1452
 
@@ -1606,17 +1454,17 @@ Gets the length of the given array.
1606
1454
  ##### Returns
1607
1455
 
1608
1456
 
1609
- - `Number` the size of the given variable
1457
+ - a UI Filter Data.
1610
1458
 
1611
1459
 
1612
1460
 
1613
1461
 
1614
- ### dist/filters/adapters/FDToFlatUI.js
1462
+ ### dist/filters/adapters/transformFilters.js
1615
1463
 
1616
1464
 
1617
- #### FDToFlatUI(filterData, datasetsInfo)
1465
+ #### transformFilters(oldFiltersObj, section)
1618
1466
 
1619
- Generates a Flattened UI filter structure from Filter Data structure.
1467
+ Transform the old filters structure into the new one
1620
1468
 
1621
1469
 
1622
1470
 
@@ -1625,32 +1473,79 @@ Generates a Flattened UI filter structure from Filter Data structure.
1625
1473
 
1626
1474
  | Name | Type | Description | |
1627
1475
  | ---- | ---- | ----------- | -------- |
1628
- | filterData | | The filter data object. | &nbsp; |
1629
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1476
+ | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
1477
+ | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
1478
+
1479
+
1630
1480
 
1631
1481
 
1482
+ ##### Examples
1483
+
1484
+ ```javascript
1485
+
1486
+ const oldPreferenceFilters = {
1487
+ "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1488
+ "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1489
+ "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1490
+ "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1491
+ "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1492
+ "formulaId": null,
1493
+ "panelId": null,
1494
+ "values": [
1495
+ {
1496
+ "EQUALS": [
1497
+ {
1498
+ "id": "AK4M8UV2a0",
1499
+ "value": "A",
1500
+ "enabled": true,
1501
+ "imageUrl": null
1502
+ },
1503
+ {
1504
+ "id": "AK4M8UV2a1",
1505
+ "value": "B",
1506
+ "enabled": true,
1507
+ "imageUrl": null
1508
+ }
1509
+ ]
1510
+ }
1511
+ ],
1512
+ "bucketId": null,
1513
+ "text": "MC",
1514
+ "title": "MC",
1515
+ "type": "SINGLE_CHOICE",
1516
+ "qid": "AK4M8UV2",
1517
+ "dataset": {
1518
+ "sourceid": "xYOQAdpqT",
1519
+ "name": "Form All Questions",
1520
+ "qrveyid": "xYOQAdpqT",
1521
+ "text": "Form All Questions",
1522
+ "linkid": 0
1523
+ },
1524
+ "enabled": true,
1525
+ "linked": null
1526
+ }
1527
+ };
1528
+
1529
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
+ ```
1632
1531
 
1633
1532
 
1634
1533
  ##### Returns
1635
1534
 
1636
1535
 
1637
- - a flattened UI filters array
1536
+ - `Object` an object with the new filters structure
1638
1537
 
1639
1538
 
1640
1539
 
1641
- #### FD21ToFlatUI(scopes, datasetsInfo)
1642
1540
 
1643
- Generates a Filter Builder Structure from the Filter Data structure v2.1
1541
+ ### dist/filters/classes/FilterInputErrorHandler.js
1644
1542
 
1645
1543
 
1544
+ #### new FilterInputErrorHandler()
1545
+
1646
1546
 
1647
1547
 
1648
- ##### Parameters
1649
1548
 
1650
- | Name | Type | Description | |
1651
- | ---- | ---- | ----------- | -------- |
1652
- | scopes | | The filter scope section | &nbsp; |
1653
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1654
1549
 
1655
1550
 
1656
1551
 
@@ -1658,17 +1553,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
1658
1553
  ##### Returns
1659
1554
 
1660
1555
 
1661
- - a flattened UI filters array
1556
+ - `Void`
1662
1557
 
1663
1558
 
1664
1559
 
1665
1560
 
1666
- ### dist/filters/adapters/FDToLogic.js
1561
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
1667
1562
 
1668
1563
 
1669
- #### FDToLogic(filterData)
1564
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1670
1565
 
1671
- Generates a Filter Logic structure from Filter Data structure.
1566
+ [TODO: Make a proper description for this function]
1672
1567
 
1673
1568
 
1674
1569
 
@@ -1677,7 +1572,9 @@ Generates a Filter Logic structure from Filter Data structure.
1677
1572
 
1678
1573
  | Name | Type | Description | |
1679
1574
  | ---- | ---- | ----------- | -------- |
1680
- | filterData | | The filter data object. | &nbsp; |
1575
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
+ | scopes | | | &nbsp; |
1577
+ | currentScope | | | &nbsp; |
1681
1578
 
1682
1579
 
1683
1580
 
@@ -1685,13 +1582,17 @@ Generates a Filter Logic structure from Filter Data structure.
1685
1582
  ##### Returns
1686
1583
 
1687
1584
 
1688
- - a filter logic array
1585
+ -
1689
1586
 
1690
1587
 
1691
1588
 
1692
- #### getLogicBodyFromFD21(filterData)
1693
1589
 
1694
- Gets the logic body
1590
+ ### dist/filters/helpers/getAvailableScopes.js
1591
+
1592
+
1593
+ #### getAvailableScopes(config)
1594
+
1595
+ Gets Scopes/Scope IDs by given IDs
1695
1596
 
1696
1597
 
1697
1598
 
@@ -1700,7 +1601,7 @@ Gets the logic body
1700
1601
 
1701
1602
  | Name | Type | Description | |
1702
1603
  | ---- | ---- | ----------- | -------- |
1703
- | filterData | | The filter data object | &nbsp; |
1604
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
1704
1605
 
1705
1606
 
1706
1607
 
@@ -1708,17 +1609,17 @@ Gets the logic body
1708
1609
  ##### Returns
1709
1610
 
1710
1611
 
1711
- - a filter logic array
1612
+ - a Scopes/Scope IDs array
1712
1613
 
1713
1614
 
1714
1615
 
1715
1616
 
1716
- ### dist/filters/adapters/FDToUI.js
1617
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1717
1618
 
1718
1619
 
1719
- #### FDToUI(filterData, datasetsInfo)
1620
+ #### getAvailableScopesIDsByConfig(config)
1720
1621
 
1721
- Generates a UI filter structure from Filter Data structure.
1622
+ Gets the Scopes IDS for the Available Scope function by any config
1722
1623
 
1723
1624
 
1724
1625
 
@@ -1727,8 +1628,7 @@ Generates a UI filter structure from Filter Data structure.
1727
1628
 
1728
1629
  | Name | Type | Description | |
1729
1630
  | ---- | ---- | ----------- | -------- |
1730
- | filterData | | The filter data object. | &nbsp; |
1731
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1631
+ | config | | any config | &nbsp; |
1732
1632
 
1733
1633
 
1734
1634
 
@@ -1736,13 +1636,17 @@ Generates a UI filter structure from Filter Data structure.
1736
1636
  ##### Returns
1737
1637
 
1738
1638
 
1739
- - a UI Filters structure
1639
+ - a Available Scope IDS config
1740
1640
 
1741
1641
 
1742
1642
 
1743
- #### FD21ToUI(scopes, section, version, datasetsInfo)
1744
1643
 
1745
- Generates a UI filter Structure from the Filter Data structure v2.1
1644
+ ### dist/filters/helpers/getScopesByHierarchy.js
1645
+
1646
+
1647
+ #### getScopesByHierarchy(scopes, currentScope)
1648
+
1649
+ [TODO: Make a description for this]
1746
1650
 
1747
1651
 
1748
1652
 
@@ -1751,10 +1655,8 @@ Generates a UI filter Structure from the Filter Data structure v2.1
1751
1655
 
1752
1656
  | Name | Type | Description | |
1753
1657
  | ---- | ---- | ----------- | -------- |
1754
- | scopes | | The filter scope section | &nbsp; |
1755
- | section | | The filter section. | &nbsp; |
1756
- | version | | The version of the filter structure | &nbsp; |
1757
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1658
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
+ | currentScope | | Current scope type | &nbsp; |
1758
1660
 
1759
1661
 
1760
1662
 
@@ -1762,17 +1664,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
1762
1664
  ##### Returns
1763
1665
 
1764
1666
 
1765
- - a UI filter Structure
1667
+ - A new array of Scopes/Scope IDs
1766
1668
 
1767
1669
 
1768
1670
 
1769
1671
 
1770
- ### dist/filters/adapters/UIToFD.js
1672
+ ### dist/general/array/delete.js
1771
1673
 
1772
1674
 
1773
- #### UIToFD(filterData)
1675
+ #### ArrayDelete(array, index)
1774
1676
 
1775
- Generates a Filter Data Structure structure from UI Filter Data structure.
1677
+ Inmutable Array Item deletion
1776
1678
 
1777
1679
 
1778
1680
 
@@ -1781,7 +1683,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
1781
1683
 
1782
1684
  | Name | Type | Description | |
1783
1685
  | ---- | ---- | ----------- | -------- |
1784
- | filterData | | The UI filter data object. | &nbsp; |
1686
+ | array | `Array` | a collection of items to delete | &nbsp; |
1687
+ | index | `Number` | the position of the item to delete | &nbsp; |
1785
1688
 
1786
1689
 
1787
1690
 
@@ -1789,13 +1692,20 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
1789
1692
  ##### Returns
1790
1693
 
1791
1694
 
1792
- - a Filter Data structure
1695
+ - a new Array or the given parameter when is empty or not an array
1793
1696
 
1794
1697
 
1795
1698
 
1796
- #### UI21ToFD(uFilterData, version)
1797
1699
 
1798
- Builds the Fitler Data structure from UI filter data
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
1799
1709
 
1800
1710
 
1801
1711
 
@@ -1804,8 +1714,9 @@ Builds the Fitler Data structure from UI filter data
1804
1714
 
1805
1715
  | Name | Type | Description | |
1806
1716
  | ---- | ---- | ----------- | -------- |
1807
- | uFilterData | | The UI filter Data object | &nbsp; |
1808
- | version | | the version of the structure | &nbsp; |
1717
+ | arr | | nested tree array | &nbsp; |
1718
+ | childArrKey | | property representing the children array on the nested tree | &nbsp; |
1719
+ | condition | | function callback that determines if the filter is applied on the last child node of the nested tree | &nbsp; |
1809
1720
 
1810
1721
 
1811
1722
 
@@ -1813,17 +1724,17 @@ Builds the Fitler Data structure from UI filter data
1813
1724
  ##### Returns
1814
1725
 
1815
1726
 
1816
- -
1727
+ - array filtered
1817
1728
 
1818
1729
 
1819
1730
 
1820
1731
 
1821
- ### dist/filters/adapters/UIToFlatUI.js
1732
+ ### dist/general/array/flattenDeep.js
1822
1733
 
1823
1734
 
1824
- #### UIToFlatUI(filterData, datasetsInfo)
1735
+ #### flattenDeep(arr)
1825
1736
 
1826
- Generates a Flattened UI filter structure from UI Filter Data structure.
1737
+ Flat deeply an array
1827
1738
 
1828
1739
 
1829
1740
 
@@ -1832,8 +1743,7 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
1832
1743
 
1833
1744
  | Name | Type | Description | |
1834
1745
  | ---- | ---- | ----------- | -------- |
1835
- | filterData | | The UI filter data object. | &nbsp; |
1836
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
1746
+ | arr | | Array to flat deeply | &nbsp; |
1837
1747
 
1838
1748
 
1839
1749
 
@@ -1841,13 +1751,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
1841
1751
  ##### Returns
1842
1752
 
1843
1753
 
1844
- - a flattened UI filters array
1754
+ - flatten array
1845
1755
 
1846
1756
 
1847
1757
 
1848
- #### UI21ToFlatUI(scopes)
1849
1758
 
1850
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
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
1851
1765
 
1852
1766
 
1853
1767
 
@@ -1856,7 +1770,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1856
1770
 
1857
1771
  | Name | Type | Description | |
1858
1772
  | ---- | ---- | ----------- | -------- |
1859
- | scopes | | The filter scope section | &nbsp; |
1773
+ | array | | | &nbsp; |
1774
+ | callback | | function callback | &nbsp; |
1860
1775
 
1861
1776
 
1862
1777
 
@@ -1864,18 +1779,17 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1864
1779
  ##### Returns
1865
1780
 
1866
1781
 
1867
- - a flattened UI filters array
1782
+ - the first index of the array. -1 when the condition is not satisfied
1868
1783
 
1869
1784
 
1870
1785
 
1871
1786
 
1872
- ### dist/filters/adapters/adaptDateGroupingProperty.js
1787
+ ### dist/general/array/getLastIndexFromArray.js
1873
1788
 
1874
1789
 
1875
- #### adaptDateGroupingProperty(property)
1790
+ #### getLastIndexFromArray(array, callback)
1876
1791
 
1877
- [TODO: For 2022, eliminate this adapter]
1878
- Get the new property base on the old date grouping properties
1792
+ Gets the last index from the array by a callback condition
1879
1793
 
1880
1794
 
1881
1795
 
@@ -1884,7 +1798,8 @@ Get the new property base on the old date grouping properties
1884
1798
 
1885
1799
  | Name | Type | Description | |
1886
1800
  | ---- | ---- | ----------- | -------- |
1887
- | property | | | &nbsp; |
1801
+ | array | | | &nbsp; |
1802
+ | callback | | function callback | &nbsp; |
1888
1803
 
1889
1804
 
1890
1805
 
@@ -1892,17 +1807,17 @@ Get the new property base on the old date grouping properties
1892
1807
  ##### Returns
1893
1808
 
1894
1809
 
1895
- -
1810
+ - the last index of the array. -1 when the condition is not satisfied
1896
1811
 
1897
1812
 
1898
1813
 
1899
1814
 
1900
- ### dist/filters/adapters/adaptFilterData.js
1815
+ ### dist/general/function/debounce.js
1901
1816
 
1902
1817
 
1903
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1818
+ #### debounce(fn, time)
1904
1819
 
1905
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
1820
+ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1906
1821
 
1907
1822
 
1908
1823
 
@@ -1911,9 +1826,8 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1911
1826
 
1912
1827
  | Name | Type | Description | |
1913
1828
  | ---- | ---- | ----------- | -------- |
1914
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
1915
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
1916
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
1829
+ | fn | `Function` | original Function | &nbsp; |
1830
+ | time | `Number` | default 500ms | &nbsp; |
1917
1831
 
1918
1832
 
1919
1833
 
@@ -1921,17 +1835,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1921
1835
  ##### Returns
1922
1836
 
1923
1837
 
1924
- - A new filter data structure v2.1
1838
+ - `Function` debounced functions
1925
1839
 
1926
1840
 
1927
1841
 
1928
1842
 
1929
- ### dist/filters/adapters/flatUIToFD.js
1843
+ ### dist/general/function/throttled.js
1930
1844
 
1931
1845
 
1932
- #### flatUIToFD(uFilters, version)
1846
+ #### throttled(fn, time)
1933
1847
 
1934
- Generates a filter data structure from the flatttened UI filters.
1848
+ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1935
1849
 
1936
1850
 
1937
1851
 
@@ -1940,8 +1854,8 @@ Generates a filter data structure from the flatttened UI filters.
1940
1854
 
1941
1855
  | Name | Type | Description | |
1942
1856
  | ---- | ---- | ----------- | -------- |
1943
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1944
- | version | | Tag for the version of the filter data structure | &nbsp; |
1857
+ | fn | `Function` | original Function | &nbsp; |
1858
+ | time | `Number` | default 500ms | &nbsp; |
1945
1859
 
1946
1860
 
1947
1861
 
@@ -1949,14 +1863,18 @@ Generates a filter data structure from the flatttened UI filters.
1949
1863
  ##### Returns
1950
1864
 
1951
1865
 
1952
- - a Filter Data.
1866
+ - `Function` throttled function
1953
1867
 
1954
1868
 
1955
1869
 
1956
- #### buildScopes(fbFilters)
1957
1870
 
1958
- Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1959
- Also, adds and organizes filters by datasets
1871
+ ### dist/general/mix/compareDeep.js
1872
+
1873
+
1874
+ #### compareDeep(object1, object2)
1875
+
1876
+ Compares two objects to know if they are equals. Go across nested objects.
1877
+ Includes arrays in the comparison.
1960
1878
 
1961
1879
 
1962
1880
 
@@ -1965,7 +1883,8 @@ Also, adds and organizes filters by datasets
1965
1883
 
1966
1884
  | Name | Type | Description | |
1967
1885
  | ---- | ---- | ----------- | -------- |
1968
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1886
+ | object1 | | First Object to compare | &nbsp; |
1887
+ | object2 | | Second Object to compare | &nbsp; |
1969
1888
 
1970
1889
 
1971
1890
 
@@ -1973,13 +1892,17 @@ Also, adds and organizes filters by datasets
1973
1892
  ##### Returns
1974
1893
 
1975
1894
 
1976
- - an array of scopes structure.
1895
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1977
1896
 
1978
1897
 
1979
1898
 
1980
- #### buildScope(uFilter)
1981
1899
 
1982
- Gets an scope structure for the filter data
1900
+ ### dist/general/mix/getTag.js
1901
+
1902
+
1903
+ #### getTag(value)
1904
+
1905
+ Gets the `toStringTag` of `value`.
1983
1906
 
1984
1907
 
1985
1908
 
@@ -1988,7 +1911,7 @@ Gets an scope structure for the filter data
1988
1911
 
1989
1912
  | Name | Type | Description | |
1990
1913
  | ---- | ---- | ----------- | -------- |
1991
- | uFilter | | UI structure filter | &nbsp; |
1914
+ | value | | The value to query. | &nbsp; |
1992
1915
 
1993
1916
 
1994
1917
 
@@ -1996,64 +1919,73 @@ Gets an scope structure for the filter data
1996
1919
  ##### Returns
1997
1920
 
1998
1921
 
1999
- - an scope structure
2000
-
2001
-
2002
-
2003
- #### buildDataset(uFilter)
2004
-
2005
- Gets an dataset structure for the filter data
2006
-
1922
+ - `string` Returns the `toStringTag`.
2007
1923
 
2008
1924
 
2009
1925
 
2010
- ##### Parameters
2011
-
2012
- | Name | Type | Description | |
2013
- | ---- | ---- | ----------- | -------- |
2014
- | uFilter | | a UI structure filter | &nbsp; |
2015
1926
 
1927
+ ### dist/general/mix/importScripts.js
2016
1928
 
2017
1929
 
1930
+ #### importScripts(scripts)
2018
1931
 
2019
- ##### Returns
1932
+ Import a set of external Scripts given the URL in both serie and cascade way
2020
1933
 
2021
1934
 
2022
- - an dataset structure
2023
1935
 
2024
1936
 
1937
+ ##### Parameters
2025
1938
 
2026
- #### buildFilter(uFilter)
1939
+ | Name | Type | Description | |
1940
+ | ---- | ---- | ----------- | -------- |
1941
+ | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1942
+ | scripts.url | `String` | CDN URL | &nbsp; |
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 | &nbsp; |
1944
+ | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1945
+ | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1946
+ | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
2027
1947
 
2028
- Gets an filter structure for the filter data
2029
1948
 
2030
1949
 
2031
1950
 
1951
+ ##### Examples
2032
1952
 
2033
- ##### Parameters
1953
+ ```javascript
1954
+ // 1) Simple script (paralell loading)
1955
+ importScripts(['http://myscript.js', 'http://another.js']);
2034
1956
 
2035
- | Name | Type | Description | |
2036
- | ---- | ---- | ----------- | -------- |
2037
- | uFilter | | a UI structure filter | &nbsp; |
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
+ ]);
2038
1962
 
1963
+ // 3) import dependent scripts (cascade)
1964
+ importScripts([
1965
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1966
+ ]);
2039
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
+ ```
2040
1976
 
2041
1977
 
2042
1978
  ##### Returns
2043
1979
 
2044
1980
 
2045
- - an filter structure
2046
-
2047
-
2048
-
1981
+ - `Promise` Promise when all script have been loaded
2049
1982
 
2050
- ### dist/filters/adapters/adaptFilterValues.js
2051
1983
 
2052
1984
 
2053
- #### adaptFilterValues(filter)
1985
+ #### loadScript(url, type, noModule)
2054
1986
 
2055
- [TODO: For 2022, eliminate this adapter]
2056
- Gets an adapted filter value array. Validates the enabled property and sets
1987
+ Creates the script element and appends to document.head
1988
+ return a Promise that is resolved when the script is loaded
2057
1989
 
2058
1990
 
2059
1991
 
@@ -2062,7 +1994,9 @@ Gets an adapted filter value array. Validates the enabled property and sets
2062
1994
 
2063
1995
  | Name | Type | Description | |
2064
1996
  | ---- | ---- | ----------- | -------- |
2065
- | filter | | The filter | &nbsp; |
1997
+ | url | `String` | Cdn Url | &nbsp; |
1998
+ | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1999
+ | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
2066
2000
 
2067
2001
 
2068
2002
 
@@ -2070,17 +2004,17 @@ Gets an adapted filter value array. Validates the enabled property and sets
2070
2004
  ##### Returns
2071
2005
 
2072
2006
 
2073
- - A new value array with the filled properties.
2007
+ - `Void`
2074
2008
 
2075
2009
 
2076
2010
 
2077
2011
 
2078
- ### dist/filters/adapters/flatUIToLogic.js
2012
+ ### dist/general/mix/isEmpty.js
2079
2013
 
2080
2014
 
2081
- #### flatUIToLogic(uFilter)
2015
+ #### isEmpty(variable, includeFalsy)
2082
2016
 
2083
- Generates a Logic structure from flattened UI filters
2017
+ Validates if the given argument is empty
2084
2018
 
2085
2019
 
2086
2020
 
@@ -2089,7 +2023,8 @@ Generates a Logic structure from flattened UI filters
2089
2023
 
2090
2024
  | Name | Type | Description | |
2091
2025
  | ---- | ---- | ----------- | -------- |
2092
- | uFilter | | Array of flat filters from UI | &nbsp; |
2026
+ | variable | | the given variable | &nbsp; |
2027
+ | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
2093
2028
 
2094
2029
 
2095
2030
 
@@ -2097,17 +2032,19 @@ Generates a Logic structure from flattened UI filters
2097
2032
  ##### Returns
2098
2033
 
2099
2034
 
2100
- - The logic structure
2035
+ - true: the given argument is empty; false: is not.
2101
2036
 
2102
2037
 
2103
2038
 
2104
2039
 
2105
- ### dist/filters/adapters/flatUIToOldLogic.js
2040
+ ### dist/general/mix/isNaNV2.js
2106
2041
 
2107
2042
 
2108
- #### flatUIToOldLogic(uFilters)
2043
+ #### isNaNV2(variable)
2109
2044
 
2110
- Generates a Logic structure from flattened UI filters
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.
2111
2048
 
2112
2049
 
2113
2050
 
@@ -2116,7 +2053,7 @@ Generates a Logic structure from flattened UI filters
2116
2053
 
2117
2054
  | Name | Type | Description | |
2118
2055
  | ---- | ---- | ----------- | -------- |
2119
- | uFilters | | Array of flat filters from UI | &nbsp; |
2056
+ | variable | | the variable to validate | &nbsp; |
2120
2057
 
2121
2058
 
2122
2059
 
@@ -2124,17 +2061,18 @@ Generates a Logic structure from flattened UI filters
2124
2061
  ##### Returns
2125
2062
 
2126
2063
 
2127
- - The logic structure
2064
+ - True if variable is a NaN or false otherwise
2128
2065
 
2129
2066
 
2130
2067
 
2131
2068
 
2132
- ### dist/filters/adapters/flatUIToUI.js
2069
+ ### dist/general/mix/isNull.js
2133
2070
 
2134
2071
 
2135
- #### flatUIToUI(uFilters, version)
2072
+ #### isNull(arg)
2136
2073
 
2137
- Generates a UI filter data structure from the flatttened UI filters.
2074
+ return if a given variable is either `null` or `undefined`
2075
+ useful to avoid falsify validating Number Zero (0)
2138
2076
 
2139
2077
 
2140
2078
 
@@ -2143,8 +2081,7 @@ Generates a UI filter data structure from the flatttened UI filters.
2143
2081
 
2144
2082
  | Name | Type | Description | |
2145
2083
  | ---- | ---- | ----------- | -------- |
2146
- | uFilters | | Array of flattened filters from UI | &nbsp; |
2147
- | version | | Tag for the version of the filter data structure | &nbsp; |
2084
+ | arg | `any` | | &nbsp; |
2148
2085
 
2149
2086
 
2150
2087
 
@@ -2152,37 +2089,19 @@ Generates a UI filter data structure from the flatttened UI filters.
2152
2089
  ##### Returns
2153
2090
 
2154
2091
 
2155
- - a UI Filter Data.
2156
-
2157
-
2158
-
2159
- #### buildScopes(fbFilters)
2160
-
2161
- Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
2162
- Also, adds and organizes filters by datasets
2163
-
2164
-
2165
-
2166
-
2167
- ##### Parameters
2168
-
2169
- | Name | Type | Description | |
2170
- | ---- | ---- | ----------- | -------- |
2171
- | fbFilters | | Array of flat filters from UI | &nbsp; |
2172
-
2173
-
2174
-
2092
+ - `Boolean`
2175
2093
 
2176
- ##### Returns
2177
2094
 
2178
2095
 
2179
- - an array of scopes structure.
2180
2096
 
2097
+ ### dist/general/mix/randomId.js
2181
2098
 
2182
2099
 
2183
- #### buildScope(uFilter)
2100
+ #### randomId(length, exclude)
2184
2101
 
2185
- Gets an scope structure for the UI filter data
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.
2186
2105
 
2187
2106
 
2188
2107
 
@@ -2191,7 +2110,8 @@ Gets an scope structure for the UI filter data
2191
2110
 
2192
2111
  | Name | Type | Description | |
2193
2112
  | ---- | ---- | ----------- | -------- |
2194
- | uFilter | | UI structure filter | &nbsp; |
2113
+ | length | `Number` | size of the generated string. Default 8 | &nbsp; |
2114
+ | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
2195
2115
 
2196
2116
 
2197
2117
 
@@ -2199,13 +2119,19 @@ Gets an scope structure for the UI filter data
2199
2119
  ##### Returns
2200
2120
 
2201
2121
 
2202
- - an scope structure
2122
+ - `String` Random string
2203
2123
 
2204
2124
 
2205
2125
 
2206
- #### buildDataset(uFilter)
2207
2126
 
2208
- Gets an dataset structure for the UI filter data
2127
+ ### dist/general/mix/size.js
2128
+
2129
+
2130
+ #### size(obj)
2131
+
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.
2209
2135
 
2210
2136
 
2211
2137
 
@@ -2214,7 +2140,7 @@ Gets an dataset structure for the UI filter data
2214
2140
 
2215
2141
  | Name | Type | Description | |
2216
2142
  | ---- | ---- | ----------- | -------- |
2217
- | uFilter | | a UI structure filter | &nbsp; |
2143
+ | obj | `Any` | Any object-type variable | &nbsp; |
2218
2144
 
2219
2145
 
2220
2146
 
@@ -2222,13 +2148,18 @@ Gets an dataset structure for the UI filter data
2222
2148
  ##### Returns
2223
2149
 
2224
2150
 
2225
- - an dataset structure
2151
+ - `Number` the size of the given variable
2226
2152
 
2227
2153
 
2228
2154
 
2229
- #### buildFilter(uFilter)
2230
2155
 
2231
- Gets an filter structure for the UI filter data
2156
+ ### dist/general/object/cloneDeep.js
2157
+
2158
+
2159
+ #### cloneDeep(obj)
2160
+
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
2232
2163
 
2233
2164
 
2234
2165
 
@@ -2237,7 +2168,7 @@ Gets an filter structure for the UI filter data
2237
2168
 
2238
2169
  | Name | Type | Description | |
2239
2170
  | ---- | ---- | ----------- | -------- |
2240
- | uFilter | | a UI structure filter | &nbsp; |
2171
+ | obj | | The object | &nbsp; |
2241
2172
 
2242
2173
 
2243
2174
 
@@ -2245,17 +2176,21 @@ Gets an filter structure for the UI filter data
2245
2176
  ##### Returns
2246
2177
 
2247
2178
 
2248
- - an filter structure
2179
+ - The new reference object or the given object if the parsing is incorrect or empty
2249
2180
 
2250
2181
 
2251
2182
 
2252
2183
 
2253
- ### dist/filters/adapters/logicToFD.js
2184
+ ### dist/general/object/get.js
2254
2185
 
2255
2186
 
2256
- #### logicToFD(filterData, version)
2187
+ #### _get(baseObject, path, defaultValue)
2257
2188
 
2258
- Generates a filter data structure from the old logic structure (v2.0).
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.
2259
2194
 
2260
2195
 
2261
2196
 
@@ -2264,26 +2199,59 @@ Generates a filter data structure from the old logic structure (v2.0).
2264
2199
 
2265
2200
  | Name | Type | Description | |
2266
2201
  | ---- | ---- | ----------- | -------- |
2267
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
2268
- | version | | Tag for the version of the filter data structure | &nbsp; |
2202
+ | baseObject | | The object to query | &nbsp; |
2203
+ | path | | The string path or collection of string paths of the property to get. | &nbsp; |
2204
+ | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
2205
+
2206
+
2269
2207
 
2270
2208
 
2209
+ ##### Examples
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
+ ```
2271
2231
 
2272
2232
 
2273
2233
  ##### Returns
2274
2234
 
2275
2235
 
2276
- - a Filter Data.
2236
+ - the resolved value.
2277
2237
 
2278
2238
 
2279
2239
 
2280
2240
 
2281
- ### dist/filters/adapters/logicToFlatUI.js
2241
+ ### dist/general/object/getAttribute.js
2282
2242
 
2283
2243
 
2284
- #### logicToFlatUI(logics)
2244
+ #### getAttribute(obj, key)
2285
2245
 
2286
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
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
2287
2255
 
2288
2256
 
2289
2257
 
@@ -2292,74 +2260,73 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
2292
2260
 
2293
2261
  | Name | Type | Description | |
2294
2262
  | ---- | ---- | ----------- | -------- |
2295
- | logics | | The old logic structure (v2.0) | &nbsp; |
2296
-
2297
-
2298
-
2299
-
2300
- ##### Returns
2301
-
2263
+ | obj | `object` | object to look for | &nbsp; |
2264
+ | key | `string` | String attribute in snake_case style | &nbsp; |
2302
2265
 
2303
- - The Flattened UI Filters array
2304
2266
 
2305
2267
 
2306
2268
 
2307
- #### getFilter(filters, filter, getIndex)
2269
+ ##### Examples
2308
2270
 
2309
- Get the filter or the index of the given array, validating an old filter structure.
2271
+ ```javascript
2272
+ getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2273
+ ```
2310
2274
 
2311
2275
 
2276
+ ##### Returns
2312
2277
 
2313
2278
 
2314
- ##### Parameters
2279
+ - `Void`
2315
2280
 
2316
- | Name | Type | Description | |
2317
- | ---- | ---- | ----------- | -------- |
2318
- | filters | | The array of UI filters | &nbsp; |
2319
- | filter | | The old logic structure filter | &nbsp; |
2320
- | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
2321
2281
 
2322
2282
 
2323
2283
 
2284
+ ### dist/general/object/hasProperty.js
2324
2285
 
2325
- ##### Returns
2326
2286
 
2287
+ #### _hasProperty(obj, property)
2327
2288
 
2328
- - the index or the UI filter object
2289
+ Use the hasOwnProperty in order to verify if the given property exists in the object.
2329
2290
 
2330
2291
 
2331
2292
 
2332
- #### refineRankingValues(values, uiValues)
2333
2293
 
2334
- Refines the values of the Ranking column type.
2294
+ ##### Parameters
2335
2295
 
2296
+ | Name | Type | Description | |
2297
+ | ---- | ---- | ----------- | -------- |
2298
+ | obj | `object` | an object | &nbsp; |
2299
+ | property | `string` | String to verify if exists in the object as property | &nbsp; |
2336
2300
 
2337
2301
 
2338
2302
 
2339
- ##### Parameters
2340
2303
 
2341
- | Name | Type | Description | |
2342
- | ---- | ---- | ----------- | -------- |
2343
- | values | | the Array of Ranking values | &nbsp; |
2344
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
2304
+ ##### Examples
2345
2305
 
2306
+ ```javascript
2307
+ const prop = 'prop2'
2308
+ const obj1 = { prop1: 'hello', prop2: 'world'}
2309
+ _hasProperty(ob1, prop1) // true
2346
2310
 
2311
+ const obj2 = { prop1: 'hello world' }
2312
+ _hasProperty(ob1, prop2) // false
2313
+ ```
2347
2314
 
2348
2315
 
2349
2316
  ##### Returns
2350
2317
 
2351
2318
 
2352
- - the array of Ranking values
2319
+ - True if the object has the given property; otherwise, false.
2353
2320
 
2354
2321
 
2355
2322
 
2356
2323
 
2357
- ### dist/filters/adapters/logicToUI.js
2324
+ ### dist/general/object/isObject.js
2358
2325
 
2359
2326
 
2360
- #### logicToUI(uFilters, datasetsInfo)
2327
+ #### isObject(obj)
2361
2328
 
2362
- Generates a UI filter structure from the old logic structure (v2.0).
2329
+ Checks if the given argument is an object type
2363
2330
 
2364
2331
 
2365
2332
 
@@ -2368,8 +2335,7 @@ Generates a UI filter structure from the old logic structure (v2.0).
2368
2335
 
2369
2336
  | Name | Type | Description | |
2370
2337
  | ---- | ---- | ----------- | -------- |
2371
- | uFilters | | Array of filters from old logic structure | &nbsp; |
2372
- | datasetsInfo | | Collection of datasets information | &nbsp; |
2338
+ | obj | | the variable to check | &nbsp; |
2373
2339
 
2374
2340
 
2375
2341
 
@@ -2377,17 +2343,18 @@ Generates a UI filter structure from the old logic structure (v2.0).
2377
2343
  ##### Returns
2378
2344
 
2379
2345
 
2380
- - a UI Filter Data.
2346
+ - True: It is an object; False: It is not.
2381
2347
 
2382
2348
 
2383
2349
 
2384
2350
 
2385
- ### dist/filters/adapters/transformFilters.js
2351
+ ### dist/general/object/mapValues.js
2386
2352
 
2387
2353
 
2388
- #### transformFilters(oldFiltersObj, section)
2354
+ #### mapValues(baseObject, iteratee)
2389
2355
 
2390
- Transform the old filters structure into the new one
2356
+ Invoke iteratee (function) for each object key-value pair
2357
+ and return a mapped object
2391
2358
 
2392
2359
 
2393
2360
 
@@ -2396,97 +2363,52 @@ Transform the old filters structure into the new one
2396
2363
 
2397
2364
  | Name | Type | Description | |
2398
2365
  | ---- | ---- | ----------- | -------- |
2399
- | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
2400
- | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
2401
-
2402
-
2403
-
2404
-
2405
- ##### Examples
2406
-
2407
- ```javascript
2366
+ | baseObject | `Object` | Base object. | &nbsp; |
2367
+ | iteratee | `Function` | The executed per iteration. | &nbsp; |
2408
2368
 
2409
- const oldPreferenceFilters = {
2410
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
2411
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
2412
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
2413
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
2414
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
2415
- "formulaId": null,
2416
- "panelId": null,
2417
- "values": [
2418
- {
2419
- "EQUALS": [
2420
- {
2421
- "id": "AK4M8UV2a0",
2422
- "value": "A",
2423
- "enabled": true,
2424
- "imageUrl": null
2425
- },
2426
- {
2427
- "id": "AK4M8UV2a1",
2428
- "value": "B",
2429
- "enabled": true,
2430
- "imageUrl": null
2431
- }
2432
- ]
2433
- }
2434
- ],
2435
- "bucketId": null,
2436
- "text": "MC",
2437
- "title": "MC",
2438
- "type": "SINGLE_CHOICE",
2439
- "qid": "AK4M8UV2",
2440
- "dataset": {
2441
- "sourceid": "xYOQAdpqT",
2442
- "name": "Form All Questions",
2443
- "qrveyid": "xYOQAdpqT",
2444
- "text": "Form All Questions",
2445
- "linkid": 0
2446
- },
2447
- "enabled": true,
2448
- "linked": null
2449
- }
2450
- };
2451
2369
 
2452
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2453
- ```
2454
2370
 
2455
2371
 
2456
2372
  ##### Returns
2457
2373
 
2458
2374
 
2459
- - `Object` an object with the new filters structure
2460
-
2375
+ - `Object` New mapped object.
2461
2376
 
2462
2377
 
2463
2378
 
2464
- ### dist/filters/classes/FilterInputErrorHandler.js
2465
2379
 
2380
+ ### dist/general/object/mergeDeep.js
2466
2381
 
2467
- #### new FilterInputErrorHandler()
2468
2382
 
2383
+ #### mergeDeep(obj1, obj2, settings)
2469
2384
 
2385
+ Merges two objects into a new one.
2386
+ The second given argument to the first given argument.
2470
2387
 
2471
2388
 
2472
2389
 
2473
2390
 
2391
+ ##### Parameters
2474
2392
 
2393
+ | Name | Type | Description | |
2394
+ | ---- | ---- | ----------- | -------- |
2395
+ | obj1 | | The target object | &nbsp; |
2396
+ | obj2 | | The object to be merged | &nbsp; |
2397
+ | settings | | Object settings for this function | &nbsp; |
2475
2398
 
2476
- ##### Returns
2477
2399
 
2478
2400
 
2479
- - `Void`
2480
2401
 
2402
+ ##### Returns
2481
2403
 
2482
2404
 
2405
+ - a new merged object
2483
2406
 
2484
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
2485
2407
 
2486
2408
 
2487
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
2409
+ #### isValid(obj1, obj2)
2488
2410
 
2489
- [TODO: Make a proper description for this function]
2411
+ Validates if the two arguments are objects
2490
2412
 
2491
2413
 
2492
2414
 
@@ -2495,9 +2417,8 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2495
2417
 
2496
2418
  | Name | Type | Description | |
2497
2419
  | ---- | ---- | ----------- | -------- |
2498
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
2499
- | scopes | | | &nbsp; |
2500
- | currentScope | | | &nbsp; |
2420
+ | obj1 | | The target object | &nbsp; |
2421
+ | obj2 | | The object to be merged | &nbsp; |
2501
2422
 
2502
2423
 
2503
2424
 
@@ -2505,17 +2426,13 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2505
2426
  ##### Returns
2506
2427
 
2507
2428
 
2508
- -
2509
-
2510
-
2511
-
2429
+ - true: they are valid; false: they are not
2512
2430
 
2513
- ### dist/filters/helpers/getAvailableScopes.js
2514
2431
 
2515
2432
 
2516
- #### getAvailableScopes(config)
2433
+ #### getParamsToMergeDeep(settings)
2517
2434
 
2518
- Gets Scopes/Scope IDs by given IDs
2435
+ Validates and gets the settings with all set parameters.
2519
2436
 
2520
2437
 
2521
2438
 
@@ -2524,7 +2441,7 @@ Gets Scopes/Scope IDs by given IDs
2524
2441
 
2525
2442
  | Name | Type | Description | |
2526
2443
  | ---- | ---- | ----------- | -------- |
2527
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
2444
+ | settings | | the settings object | &nbsp; |
2528
2445
 
2529
2446
 
2530
2447
 
@@ -2532,17 +2449,17 @@ Gets Scopes/Scope IDs by given IDs
2532
2449
  ##### Returns
2533
2450
 
2534
2451
 
2535
- - a Scopes/Scope IDs array
2452
+ - a new settings object with all set parameters.
2536
2453
 
2537
2454
 
2538
2455
 
2539
2456
 
2540
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
2457
+ ### dist/general/object/objectCopy.js
2541
2458
 
2542
2459
 
2543
- #### getAvailableScopesIDsByConfig(config)
2460
+ #### objectCopy(entity, cache)
2544
2461
 
2545
- Gets the Scopes IDS for the Available Scope function by any config
2462
+ Created a new reference of the given argument
2546
2463
 
2547
2464
 
2548
2465
 
@@ -2551,7 +2468,8 @@ Gets the Scopes IDS for the Available Scope function by any config
2551
2468
 
2552
2469
  | Name | Type | Description | |
2553
2470
  | ---- | ---- | ----------- | -------- |
2554
- | config | | any config | &nbsp; |
2471
+ | entity | | The variable to be copied | &nbsp; |
2472
+ | cache | | | &nbsp; |
2555
2473
 
2556
2474
 
2557
2475
 
@@ -2559,17 +2477,17 @@ Gets the Scopes IDS for the Available Scope function by any config
2559
2477
  ##### Returns
2560
2478
 
2561
2479
 
2562
- - a Available Scope IDS config
2480
+ - A new reference of the given argument
2563
2481
 
2564
2482
 
2565
2483
 
2566
2484
 
2567
- ### dist/filters/helpers/getScopesByHierarchy.js
2485
+ ### dist/general/object/omit.js
2568
2486
 
2569
2487
 
2570
- #### getScopesByHierarchy(scopes, currentScope)
2488
+ #### omit(obj, props)
2571
2489
 
2572
- [TODO: Make a description for this]
2490
+ return a new Object excluding attributes in _props_ list
2573
2491
 
2574
2492
 
2575
2493
 
@@ -2578,8 +2496,8 @@ Gets the Scopes IDS for the Available Scope function by any config
2578
2496
 
2579
2497
  | Name | Type | Description | |
2580
2498
  | ---- | ---- | ----------- | -------- |
2581
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
2582
- | currentScope | | Current scope type | &nbsp; |
2499
+ | obj | `Object` | base object | &nbsp; |
2500
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2583
2501
 
2584
2502
 
2585
2503
 
@@ -2587,17 +2505,17 @@ Gets the Scopes IDS for the Available Scope function by any config
2587
2505
  ##### Returns
2588
2506
 
2589
2507
 
2590
- - A new array of Scopes/Scope IDs
2508
+ - `Object` clean object
2591
2509
 
2592
2510
 
2593
2511
 
2594
2512
 
2595
- ### dist/services/api/getAllDatasets.api.js
2513
+ ### dist/general/object/pick.js
2596
2514
 
2597
2515
 
2598
- #### getAllDatasets(config, pickDatasets)
2516
+ #### pick(baseObject, keys)
2599
2517
 
2600
- Get a dataset list from a collection of Qrvey IDs
2518
+ return a new object just with attributes in _keys_ list
2601
2519
 
2602
2520
 
2603
2521
 
@@ -2606,8 +2524,8 @@ Get a dataset list from a collection of Qrvey IDs
2606
2524
 
2607
2525
  | Name | Type | Description | |
2608
2526
  | ---- | ---- | ----------- | -------- |
2609
- | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2610
- | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2527
+ | baseObject | `Object` | base object | &nbsp; |
2528
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2611
2529
 
2612
2530
 
2613
2531
 
@@ -2615,17 +2533,17 @@ Get a dataset list from a collection of Qrvey IDs
2615
2533
  ##### Returns
2616
2534
 
2617
2535
 
2618
- - a promise
2536
+ - `Object` new object just with desired attributes
2619
2537
 
2620
2538
 
2621
2539
 
2622
2540
 
2623
- ### dist/services/api/getAllQrveys.api.js
2541
+ ### dist/general/object/serialize.js
2624
2542
 
2625
2543
 
2626
- #### getAllQrveys(config, params)
2544
+ #### serialize(obj)
2627
2545
 
2628
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2546
+ serialize object to url param
2629
2547
 
2630
2548
 
2631
2549
 
@@ -2634,8 +2552,7 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2634
2552
 
2635
2553
  | Name | Type | Description | |
2636
2554
  | ---- | ---- | ----------- | -------- |
2637
- | config | | Configuration | &nbsp; |
2638
- | params | | Object for getting precise data | &nbsp; |
2555
+ | obj | | - Object to be serialized | &nbsp; |
2639
2556
 
2640
2557
 
2641
2558
 
@@ -2648,12 +2565,12 @@ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for g
2648
2565
 
2649
2566
 
2650
2567
 
2651
- ### dist/services/api/getDatasetColumns.api.js
2568
+ ### dist/general/string/capitalize.js
2652
2569
 
2653
2570
 
2654
- #### getDatasetColumns(qrveyid)
2571
+ #### capitalize(text)
2655
2572
 
2656
- Get a dataset by Qrvey ID
2573
+ Upper case the first letter of a given text
2657
2574
 
2658
2575
 
2659
2576
 
@@ -2662,7 +2579,7 @@ Get a dataset by Qrvey ID
2662
2579
 
2663
2580
  | Name | Type | Description | |
2664
2581
  | ---- | ---- | ----------- | -------- |
2665
- | qrveyid | | The Qrvey ID | &nbsp; |
2582
+ | text | `String` | | &nbsp; |
2666
2583
 
2667
2584
 
2668
2585
 
@@ -2670,7 +2587,7 @@ Get a dataset by Qrvey ID
2670
2587
  ##### Returns
2671
2588
 
2672
2589
 
2673
- - a promise
2590
+ - `String` a capitalized text
2674
2591
 
2675
2592
 
2676
2593
 
@@ -2889,6 +2806,89 @@ try to find this string as a variable on Windows object
2889
2806
 
2890
2807
 
2891
2808
 
2809
+ ### dist/services/api/getAllDatasets.api.js
2810
+
2811
+
2812
+ #### getAllDatasets(config, pickDatasets)
2813
+
2814
+ Get a dataset list from a collection of Qrvey IDs
2815
+
2816
+
2817
+
2818
+
2819
+ ##### Parameters
2820
+
2821
+ | Name | Type | Description | |
2822
+ | ---- | ---- | ----------- | -------- |
2823
+ | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2824
+ | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2825
+
2826
+
2827
+
2828
+
2829
+ ##### Returns
2830
+
2831
+
2832
+ - a promise
2833
+
2834
+
2835
+
2836
+
2837
+ ### dist/services/api/getAllQrveys.api.js
2838
+
2839
+
2840
+ #### getAllQrveys(config, params)
2841
+
2842
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2843
+
2844
+
2845
+
2846
+
2847
+ ##### Parameters
2848
+
2849
+ | Name | Type | Description | |
2850
+ | ---- | ---- | ----------- | -------- |
2851
+ | config | | Configuration | &nbsp; |
2852
+ | params | | Object for getting precise data | &nbsp; |
2853
+
2854
+
2855
+
2856
+
2857
+ ##### Returns
2858
+
2859
+
2860
+ - `Void`
2861
+
2862
+
2863
+
2864
+
2865
+ ### dist/services/api/getDatasetColumns.api.js
2866
+
2867
+
2868
+ #### getDatasetColumns(qrveyid)
2869
+
2870
+ Get a dataset by Qrvey ID
2871
+
2872
+
2873
+
2874
+
2875
+ ##### Parameters
2876
+
2877
+ | Name | Type | Description | |
2878
+ | ---- | ---- | ----------- | -------- |
2879
+ | qrveyid | | The Qrvey ID | &nbsp; |
2880
+
2881
+
2882
+
2883
+
2884
+ ##### Returns
2885
+
2886
+
2887
+ - a promise
2888
+
2889
+
2890
+
2891
+
2892
2892
  ### dist/typescript/decorators/Debounce.js
2893
2893
 
2894
2894
 
@@ -3348,12 +3348,12 @@ Returns a filter builder config object by a any given config
3348
3348
 
3349
3349
 
3350
3350
 
3351
- ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3351
+ ### dist/filters/helpers/common/areFiltersEquals.js
3352
3352
 
3353
3353
 
3354
- #### excludeFiltersByAggregateColumn(filterData)
3354
+ #### areFiltersEquals(filter1, filter2)
3355
3355
 
3356
- Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3356
+ Validates if both filters are the same
3357
3357
 
3358
3358
 
3359
3359
 
@@ -3362,7 +3362,8 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3362
3362
 
3363
3363
  | Name | Type | Description | |
3364
3364
  | ---- | ---- | ----------- | -------- |
3365
- | filterData | | The filter data object | &nbsp; |
3365
+ | filter1 | | filter 1 | &nbsp; |
3366
+ | filter2 | | filter 2 | &nbsp; |
3366
3367
 
3367
3368
 
3368
3369
 
@@ -3370,17 +3371,17 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
3370
3371
  ##### Returns
3371
3372
 
3372
3373
 
3373
- - The new filter data object that were excluded the aggregate filters
3374
+ - true: the filters are equal; false: the filters are NOT equal
3374
3375
 
3375
3376
 
3376
3377
 
3377
3378
 
3378
- ### dist/filters/helpers/common/areFiltersEquals.js
3379
+ ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3379
3380
 
3380
3381
 
3381
- #### areFiltersEquals(filter1, filter2)
3382
+ #### excludeFiltersByAggregateColumn(filterData)
3382
3383
 
3383
- Validates if both filters are the same
3384
+ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3384
3385
 
3385
3386
 
3386
3387
 
@@ -3389,8 +3390,7 @@ Validates if both filters are the same
3389
3390
 
3390
3391
  | Name | Type | Description | |
3391
3392
  | ---- | ---- | ----------- | -------- |
3392
- | filter1 | | filter 1 | &nbsp; |
3393
- | filter2 | | filter 2 | &nbsp; |
3393
+ | filterData | | The filter data object | &nbsp; |
3394
3394
 
3395
3395
 
3396
3396
 
@@ -3398,7 +3398,7 @@ Validates if both filters are the same
3398
3398
  ##### Returns
3399
3399
 
3400
3400
 
3401
- - true: the filters are equal; false: the filters are NOT equal
3401
+ - The new filter data object that were excluded the aggregate filters
3402
3402
 
3403
3403
 
3404
3404
 
@@ -3495,23 +3495,12 @@ Get an string of the properties of the given filter column.
3495
3495
 
3496
3496
 
3497
3497
 
3498
- ### dist/filters/helpers/common/getFilterid.js
3498
+ ### dist/filters/helpers/common/getFilterLabel.js
3499
3499
 
3500
3500
 
3501
- #### getFilterid(filter)
3501
+ #### getFilterLabel(filter)
3502
3502
 
3503
- Get the Filter ID by the filter structure
3504
- The order of the epression ID is:
3505
- - Scope Type
3506
- - scopeid
3507
- - qrveyid
3508
- - panelid
3509
- - columnid
3510
- - validator
3511
- - property
3512
- - Column Aggregate
3513
- - Column Calculation
3514
- - Optional Index
3503
+ Gets the Filter Label + Column label
3515
3504
 
3516
3505
 
3517
3506
 
@@ -3520,7 +3509,7 @@ The order of the epression ID is:
3520
3509
 
3521
3510
  | Name | Type | Description | |
3522
3511
  | ---- | ---- | ----------- | -------- |
3523
- | filter | | the filter structure | &nbsp; |
3512
+ | filter | | the UI filter | &nbsp; |
3524
3513
 
3525
3514
 
3526
3515
 
@@ -3528,17 +3517,28 @@ The order of the epression ID is:
3528
3517
  ##### Returns
3529
3518
 
3530
3519
 
3531
- - a text to identify the filter
3520
+ - a sring label
3532
3521
 
3533
3522
 
3534
3523
 
3535
3524
 
3536
- ### dist/filters/helpers/common/getFilterLabel.js
3525
+ ### dist/filters/helpers/common/getFilterid.js
3537
3526
 
3538
3527
 
3539
- #### getFilterLabel(filter)
3528
+ #### getFilterid(filter)
3540
3529
 
3541
- Gets the Filter Label + Column label
3530
+ Get the Filter ID by the filter structure
3531
+ The order of the epression ID is:
3532
+ - Scope Type
3533
+ - scopeid
3534
+ - qrveyid
3535
+ - panelid
3536
+ - columnid
3537
+ - validator
3538
+ - property
3539
+ - Column Aggregate
3540
+ - Column Calculation
3541
+ - Optional Index
3542
3542
 
3543
3543
 
3544
3544
 
@@ -3547,7 +3547,7 @@ Gets the Filter Label + Column label
3547
3547
 
3548
3548
  | Name | Type | Description | |
3549
3549
  | ---- | ---- | ----------- | -------- |
3550
- | filter | | the UI filter | &nbsp; |
3550
+ | filter | | the filter structure | &nbsp; |
3551
3551
 
3552
3552
 
3553
3553
 
@@ -3555,7 +3555,7 @@ Gets the Filter Label + Column label
3555
3555
  ##### Returns
3556
3556
 
3557
3557
 
3558
- - a sring label
3558
+ - a text to identify the filter
3559
3559
 
3560
3560
 
3561
3561
 
@@ -3817,12 +3817,12 @@ Validates if the given validator is a Between type
3817
3817
 
3818
3818
 
3819
3819
 
3820
- ### dist/filters/helpers/common/isInValidator.js
3820
+ ### dist/filters/helpers/common/isDateDistinctProperty.js
3821
3821
 
3822
3822
 
3823
- #### isInValidator(validator)
3823
+ #### isDateDistinctProperty(column, property)
3824
3824
 
3825
- Validates if the given validator is a In type
3825
+ Determines if the filter column and property is a distinct group dates type
3826
3826
 
3827
3827
 
3828
3828
 
@@ -3831,7 +3831,8 @@ Validates if the given validator is a In type
3831
3831
 
3832
3832
  | Name | Type | Description | |
3833
3833
  | ---- | ---- | ----------- | -------- |
3834
- | validator | | The validator | &nbsp; |
3834
+ | column | | The filter column | &nbsp; |
3835
+ | property | | The filter property | &nbsp; |
3835
3836
 
3836
3837
 
3837
3838
 
@@ -3839,17 +3840,17 @@ Validates if the given validator is a In type
3839
3840
  ##### Returns
3840
3841
 
3841
3842
 
3842
- - true: it is a In validator; false: it is not a In validator
3843
+ - True if the given property is included from distinct group dates type
3843
3844
 
3844
3845
 
3845
3846
 
3846
3847
 
3847
- ### dist/filters/helpers/common/isDateDistinctProperty.js
3848
+ ### dist/filters/helpers/common/isInValidator.js
3848
3849
 
3849
3850
 
3850
- #### isDateDistinctProperty(column, property)
3851
+ #### isInValidator(validator)
3851
3852
 
3852
- Determines if the filter column and property is a distinct group dates type
3853
+ Validates if the given validator is a In type
3853
3854
 
3854
3855
 
3855
3856
 
@@ -3858,8 +3859,7 @@ Determines if the filter column and property is a distinct group dates type
3858
3859
 
3859
3860
  | Name | Type | Description | |
3860
3861
  | ---- | ---- | ----------- | -------- |
3861
- | column | | The filter column | &nbsp; |
3862
- | property | | The filter property | &nbsp; |
3862
+ | validator | | The validator | &nbsp; |
3863
3863
 
3864
3864
 
3865
3865
 
@@ -3867,7 +3867,7 @@ Determines if the filter column and property is a distinct group dates type
3867
3867
  ##### Returns
3868
3868
 
3869
3869
 
3870
- - True if the given property is included from distinct group dates type
3870
+ - true: it is a In validator; false: it is not a In validator
3871
3871
 
3872
3872
 
3873
3873
 
@@ -4082,10 +4082,10 @@ Gets a new value structure array by merging two value structures
4082
4082
 
4083
4083
 
4084
4084
 
4085
- ### dist/filters/helpers/common/resolveFilterConditions.js
4085
+ ### dist/filters/helpers/common/resolveDatasetConditions.js
4086
4086
 
4087
4087
 
4088
- #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4088
+ #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4089
4089
 
4090
4090
  Resolves the conditions by given params
4091
4091
 
@@ -4096,8 +4096,8 @@ Resolves the conditions by given params
4096
4096
 
4097
4097
  | Name | Type | Description | |
4098
4098
  | ---- | ---- | ----------- | -------- |
4099
- | filter | | The filter | &nbsp; |
4100
- | params | | given parameters to validate the filter | &nbsp; |
4099
+ | filter | | The dataset structure | &nbsp; |
4100
+ | params | | given parameters to validate the dataset | &nbsp; |
4101
4101
  | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4102
4102
  | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4103
4103
 
@@ -4112,10 +4112,10 @@ Resolves the conditions by given params
4112
4112
 
4113
4113
 
4114
4114
 
4115
- ### dist/filters/helpers/common/resolveDatasetConditions.js
4115
+ ### dist/filters/helpers/common/resolveFilterConditions.js
4116
4116
 
4117
4117
 
4118
- #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4118
+ #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4119
4119
 
4120
4120
  Resolves the conditions by given params
4121
4121
 
@@ -4126,8 +4126,8 @@ Resolves the conditions by given params
4126
4126
 
4127
4127
  | Name | Type | Description | |
4128
4128
  | ---- | ---- | ----------- | -------- |
4129
- | filter | | The dataset structure | &nbsp; |
4130
- | params | | given parameters to validate the dataset | &nbsp; |
4129
+ | filter | | The filter | &nbsp; |
4130
+ | params | | given parameters to validate the filter | &nbsp; |
4131
4131
  | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4132
4132
  | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4133
4133
 
@@ -4199,12 +4199,12 @@ Excludes Aggregate Filters in the Flattened UI Filters array
4199
4199
 
4200
4200
 
4201
4201
 
4202
- ### dist/filters/helpers/ui/getFilterPropertyLabel.js
4202
+ ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
4203
4203
 
4204
4204
 
4205
- #### getFilterPropertyLabel(filter)
4205
+ #### excludeUIFlatFiltersByScopes(uFilters, scopes)
4206
4206
 
4207
- Gets the label of the filter property
4207
+ Excludes and returns a UI Flat Filters without filters by the given scopes
4208
4208
 
4209
4209
 
4210
4210
 
@@ -4213,7 +4213,8 @@ Gets the label of the filter property
4213
4213
 
4214
4214
  | Name | Type | Description | |
4215
4215
  | ---- | ---- | ----------- | -------- |
4216
- | filter | | The UI Filter | &nbsp; |
4216
+ | uFilters | | The Flatten UI Filters | &nbsp; |
4217
+ | scopes | | collection of scopes types | &nbsp; |
4217
4218
 
4218
4219
 
4219
4220
 
@@ -4221,17 +4222,17 @@ Gets the label of the filter property
4221
4222
  ##### Returns
4222
4223
 
4223
4224
 
4224
- - a string of the filter property label
4225
+ - The new array of UI Flattened filters
4225
4226
 
4226
4227
 
4227
4228
 
4228
4229
 
4229
- ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
4230
+ ### dist/filters/helpers/ui/getFilterPropertyLabel.js
4230
4231
 
4231
4232
 
4232
- #### excludeUIFlatFiltersByScopes(uFilters, scopes)
4233
+ #### getFilterPropertyLabel(filter)
4233
4234
 
4234
- Excludes and returns a UI Flat Filters without filters by the given scopes
4235
+ Gets the label of the filter property
4235
4236
 
4236
4237
 
4237
4238
 
@@ -4240,8 +4241,7 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
4240
4241
 
4241
4242
  | Name | Type | Description | |
4242
4243
  | ---- | ---- | ----------- | -------- |
4243
- | uFilters | | The Flatten UI Filters | &nbsp; |
4244
- | scopes | | collection of scopes types | &nbsp; |
4244
+ | filter | | The UI Filter | &nbsp; |
4245
4245
 
4246
4246
 
4247
4247
 
@@ -4249,7 +4249,7 @@ Excludes and returns a UI Flat Filters without filters by the given scopes
4249
4249
  ##### Returns
4250
4250
 
4251
4251
 
4252
- - The new array of UI Flattened filters
4252
+ - a string of the filter property label
4253
4253
 
4254
4254
 
4255
4255