@qrvey/utils 1.2.9-16 → 1.2.9-17

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