@qrvey/utils 1.2.4-10 → 1.2.4-11

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.4-10*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.4-11*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -351,12 +351,12 @@ Output:
351
351
 
352
352
 
353
353
 
354
- ### dist/general/array/delete.js
354
+ ### dist/filters/adapters/FDToFlatUI.js
355
355
 
356
356
 
357
- #### ArrayDelete(array, index)
357
+ #### FDToFlatUI(filterData, datasetsInfo)
358
358
 
359
- Inmutable Array Item deletion
359
+ Generates a Flattened UI filter structure from Filter Data structure.
360
360
 
361
361
 
362
362
 
@@ -365,8 +365,8 @@ Inmutable Array Item deletion
365
365
 
366
366
  | Name | Type | Description | |
367
367
  | ---- | ---- | ----------- | -------- |
368
- | array | `Array` | a collection of items to delete |   |
369
- | index | `Number` | the position of the item to delete |   |
368
+ | filterData | | The filter data object. |   |
369
+ | datasetsInfo | | Collection of datasets information |   |
370
370
 
371
371
 
372
372
 
@@ -374,20 +374,13 @@ Inmutable Array Item deletion
374
374
  ##### Returns
375
375
 
376
376
 
377
- - a new Array or the given parameter when is empty or not an array
378
-
379
-
380
-
377
+ - a flattened UI filters array
381
378
 
382
- ### dist/general/array/filterNestedTree.js
383
379
 
384
380
 
385
- #### filterNestedTree(arr, childArrKey, condition)
381
+ #### FD21ToFlatUI(scopes, datasetsInfo)
386
382
 
387
- Filters a nested tree array by a custom condition on the last child node
388
- - If the given arguments are not valid, the function returns the first argument.
389
- - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
390
- - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
383
+ Generates a Filter Builder Structure from the Filter Data structure v2.1
391
384
 
392
385
 
393
386
 
@@ -396,9 +389,8 @@ Filters a nested tree array by a custom condition on the last child node
396
389
 
397
390
  | Name | Type | Description | |
398
391
  | ---- | ---- | ----------- | -------- |
399
- | arr | | nested tree array |   |
400
- | childArrKey | | property representing the children array on the nested tree |   |
401
- | condition | | function callback that determines if the filter is applied on the last child node of the nested tree |   |
392
+ | scopes | | The filter scope section |   |
393
+ | datasetsInfo | | Collection of datasets information |   |
402
394
 
403
395
 
404
396
 
@@ -406,17 +398,17 @@ Filters a nested tree array by a custom condition on the last child node
406
398
  ##### Returns
407
399
 
408
400
 
409
- - array filtered
401
+ - a flattened UI filters array
410
402
 
411
403
 
412
404
 
413
405
 
414
- ### dist/general/array/flattenDeep.js
406
+ ### dist/filters/adapters/FDToLogic.js
415
407
 
416
408
 
417
- #### flattenDeep(arr)
409
+ #### FDToLogic(filterData)
418
410
 
419
- Flat deeply an array
411
+ Generates a Filter Logic structure from Filter Data structure.
420
412
 
421
413
 
422
414
 
@@ -425,7 +417,7 @@ Flat deeply an array
425
417
 
426
418
  | Name | Type | Description | |
427
419
  | ---- | ---- | ----------- | -------- |
428
- | arr | | Array to flat deeply |   |
420
+ | filterData | | The filter data object. |   |
429
421
 
430
422
 
431
423
 
@@ -433,17 +425,13 @@ Flat deeply an array
433
425
  ##### Returns
434
426
 
435
427
 
436
- - flatten array
437
-
438
-
439
-
428
+ - a filter logic array
440
429
 
441
- ### dist/general/array/getFirstIndexFromArray.js
442
430
 
443
431
 
444
- #### getFirstIndexFromArray(array, callback)
432
+ #### getLogicBodyFromFD21(filterData)
445
433
 
446
- Gets the first index from the array by a callback condition
434
+ Gets the logic body
447
435
 
448
436
 
449
437
 
@@ -452,8 +440,7 @@ Gets the first index from the array by a callback condition
452
440
 
453
441
  | Name | Type | Description | |
454
442
  | ---- | ---- | ----------- | -------- |
455
- | array | | |   |
456
- | callback | | function callback |   |
443
+ | filterData | | The filter data object |   |
457
444
 
458
445
 
459
446
 
@@ -461,17 +448,17 @@ Gets the first index from the array by a callback condition
461
448
  ##### Returns
462
449
 
463
450
 
464
- - the first index of the array. -1 when the condition is not satisfied
451
+ - a filter logic array
465
452
 
466
453
 
467
454
 
468
455
 
469
- ### dist/general/array/getLastIndexFromArray.js
456
+ ### dist/filters/adapters/FDToUI.js
470
457
 
471
458
 
472
- #### getLastIndexFromArray(array, callback)
459
+ #### FDToUI(filterData, datasetsInfo)
473
460
 
474
- Gets the last index from the array by a callback condition
461
+ Generates a UI filter structure from Filter Data structure.
475
462
 
476
463
 
477
464
 
@@ -480,8 +467,8 @@ Gets the last index from the array by a callback condition
480
467
 
481
468
  | Name | Type | Description | |
482
469
  | ---- | ---- | ----------- | -------- |
483
- | array | | |   |
484
- | callback | | function callback |   |
470
+ | filterData | | The filter data object. |   |
471
+ | datasetsInfo | | Collection of datasets information |   |
485
472
 
486
473
 
487
474
 
@@ -489,17 +476,13 @@ Gets the last index from the array by a callback condition
489
476
  ##### Returns
490
477
 
491
478
 
492
- - the last index of the array. -1 when the condition is not satisfied
493
-
494
-
495
-
479
+ - a UI Filters structure
496
480
 
497
- ### dist/general/function/debounce.js
498
481
 
499
482
 
500
- #### debounce(fn, time)
483
+ #### FD21ToUI(scopes, section, version, datasetsInfo)
501
484
 
502
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
485
+ Generates a UI filter Structure from the Filter Data structure v2.1
503
486
 
504
487
 
505
488
 
@@ -508,8 +491,10 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
508
491
 
509
492
  | Name | Type | Description | |
510
493
  | ---- | ---- | ----------- | -------- |
511
- | fn | `Function` | original Function |   |
512
- | time | `Number` | default 500ms |   |
494
+ | scopes | | The filter scope section |   |
495
+ | section | | The filter section. |   |
496
+ | version | | The version of the filter structure |   |
497
+ | datasetsInfo | | Collection of datasets information |   |
513
498
 
514
499
 
515
500
 
@@ -517,17 +502,17 @@ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last
517
502
  ##### Returns
518
503
 
519
504
 
520
- - `Function` debounced functions
505
+ - a UI filter Structure
521
506
 
522
507
 
523
508
 
524
509
 
525
- ### dist/general/function/throttled.js
510
+ ### dist/filters/adapters/UIToFD.js
526
511
 
527
512
 
528
- #### throttled(fn, time)
513
+ #### UIToFD(filterData)
529
514
 
530
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
515
+ Generates a Filter Data Structure structure from UI Filter Data structure.
531
516
 
532
517
 
533
518
 
@@ -536,8 +521,7 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
536
521
 
537
522
  | Name | Type | Description | |
538
523
  | ---- | ---- | ----------- | -------- |
539
- | fn | `Function` | original Function |   |
540
- | time | `Number` | default 500ms |   |
524
+ | filterData | | The UI filter data object. |   |
541
525
 
542
526
 
543
527
 
@@ -545,18 +529,13 @@ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
545
529
  ##### Returns
546
530
 
547
531
 
548
- - `Function` throttled function
549
-
550
-
551
-
532
+ - a Filter Data structure
552
533
 
553
- ### dist/general/mix/compareDeep.js
554
534
 
555
535
 
556
- #### compareDeep(object1, object2)
536
+ #### UI21ToFD(uFilterData, version)
557
537
 
558
- Compares two objects to know if they are equals. Go across nested objects.
559
- Includes arrays in the comparison.
538
+ Builds the Fitler Data structure from UI filter data
560
539
 
561
540
 
562
541
 
@@ -565,8 +544,8 @@ Includes arrays in the comparison.
565
544
 
566
545
  | Name | Type | Description | |
567
546
  | ---- | ---- | ----------- | -------- |
568
- | object1 | | First Object to compare |   |
569
- | object2 | | Second Object to compare |   |
547
+ | uFilterData | | The UI filter Data object |   |
548
+ | version | | the version of the structure |   |
570
549
 
571
550
 
572
551
 
@@ -574,17 +553,17 @@ Includes arrays in the comparison.
574
553
  ##### Returns
575
554
 
576
555
 
577
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
556
+ -
578
557
 
579
558
 
580
559
 
581
560
 
582
- ### dist/general/mix/getTag.js
561
+ ### dist/filters/adapters/UIToFlatUI.js
583
562
 
584
563
 
585
- #### getTag(value)
564
+ #### UIToFlatUI(filterData, datasetsInfo)
586
565
 
587
- Gets the `toStringTag` of `value`.
566
+ Generates a Flattened UI filter structure from UI Filter Data structure.
588
567
 
589
568
 
590
569
 
@@ -593,7 +572,8 @@ Gets the `toStringTag` of `value`.
593
572
 
594
573
  | Name | Type | Description | |
595
574
  | ---- | ---- | ----------- | -------- |
596
- | value | | The value to query. |   |
575
+ | filterData | | The UI filter data object. |   |
576
+ | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info |   |
597
577
 
598
578
 
599
579
 
@@ -601,17 +581,13 @@ Gets the `toStringTag` of `value`.
601
581
  ##### Returns
602
582
 
603
583
 
604
- - `string` Returns the `toStringTag`.
605
-
606
-
607
-
584
+ - a flattened UI filters array
608
585
 
609
- ### dist/general/mix/importScripts.js
610
586
 
611
587
 
612
- #### importScripts(scripts)
588
+ #### UI21ToFlatUI(scopes)
613
589
 
614
- Import a set of external Scripts given the URL in both serie and cascade way
590
+ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
615
591
 
616
592
 
617
593
 
@@ -620,54 +596,26 @@ Import a set of external Scripts given the URL in both serie and cascade way
620
596
 
621
597
  | Name | Type | Description | |
622
598
  | ---- | ---- | ----------- | -------- |
623
- | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
624
- | scripts.url | `String` | CDN URL | &nbsp; |
625
- | 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; |
626
- | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
627
- | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
628
- | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
629
-
630
-
631
-
599
+ | scopes | | The filter scope section | &nbsp; |
632
600
 
633
- ##### Examples
634
601
 
635
- ```javascript
636
- // 1) Simple script (paralell loading)
637
- importScripts(['http://myscript.js', 'http://another.js']);
638
602
 
639
- // 2) Loading `.js` and `.esm.js` script (parallel loading)
640
- importScripts([
641
- { url: 'http://myscript.esm.js', type: 'module' },
642
- { url: 'http://myscript.js', noModule: true }
643
- ]);
644
603
 
645
- // 3) import dependent scripts (cascade)
646
- importScripts([
647
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
648
- ]);
604
+ ##### Returns
649
605
 
650
- // 4) mix
651
- importScripts([
652
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
653
- { url: 'http://another.esm.js', type: 'module' },
654
- { url: 'http://another.js', noModule: true },
655
- 'http://simplescript.js'
656
- ]);
657
- ```
658
606
 
607
+ - a flattened UI filters array
659
608
 
660
- ##### Returns
661
609
 
662
610
 
663
- - `Promise` Promise when all script have been loaded
664
611
 
612
+ ### dist/filters/adapters/adaptDateGroupingProperty.js
665
613
 
666
614
 
667
- #### loadScript(url, type, noModule)
615
+ #### adaptDateGroupingProperty(property)
668
616
 
669
- Creates the script element and appends to document.head
670
- return a Promise that is resolved when the script is loaded
617
+ [TODO: For 2022, eliminate this adapter]
618
+ Get the new property base on the old date grouping properties
671
619
 
672
620
 
673
621
 
@@ -676,9 +624,7 @@ return a Promise that is resolved when the script is loaded
676
624
 
677
625
  | Name | Type | Description | |
678
626
  | ---- | ---- | ----------- | -------- |
679
- | url | `String` | Cdn Url | &nbsp; |
680
- | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
681
- | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
627
+ | property | | | &nbsp; |
682
628
 
683
629
 
684
630
 
@@ -686,17 +632,17 @@ return a Promise that is resolved when the script is loaded
686
632
  ##### Returns
687
633
 
688
634
 
689
- - `Void`
635
+ -
690
636
 
691
637
 
692
638
 
693
639
 
694
- ### dist/general/mix/isEmpty.js
640
+ ### dist/filters/adapters/adaptFilterData.js
695
641
 
696
642
 
697
- #### isEmpty(variable, includeFalsy)
643
+ #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
698
644
 
699
- Validates if the given argument is empty
645
+ Checks and adapts the v2.0 Filter Data Structure to the v2.1
700
646
 
701
647
 
702
648
 
@@ -705,8 +651,9 @@ Validates if the given argument is empty
705
651
 
706
652
  | Name | Type | Description | |
707
653
  | ---- | ---- | ----------- | -------- |
708
- | variable | | the given variable | &nbsp; |
709
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
654
+ | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
655
+ | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
656
+ | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
710
657
 
711
658
 
712
659
 
@@ -714,18 +661,18 @@ Validates if the given argument is empty
714
661
  ##### Returns
715
662
 
716
663
 
717
- - true: the given argument is empty; false: is not.
664
+ - A new filter data structure v2.1
718
665
 
719
666
 
720
667
 
721
668
 
722
- ### dist/general/mix/isNull.js
669
+ ### dist/filters/adapters/adaptFilterValues.js
723
670
 
724
671
 
725
- #### isNull(arg)
672
+ #### adaptFilterValues(filter)
726
673
 
727
- return if a given variable is either `null` or `undefined`
728
- useful to avoid falsify validating Number Zero (0)
674
+ [TODO: For 2022, eliminate this adapter]
675
+ Gets an adapted filter value array. Validates the enabled property and sets
729
676
 
730
677
 
731
678
 
@@ -734,7 +681,7 @@ useful to avoid falsify validating Number Zero (0)
734
681
 
735
682
  | Name | Type | Description | |
736
683
  | ---- | ---- | ----------- | -------- |
737
- | arg | `any` | | &nbsp; |
684
+ | filter | | The filter | &nbsp; |
738
685
 
739
686
 
740
687
 
@@ -742,19 +689,17 @@ useful to avoid falsify validating Number Zero (0)
742
689
  ##### Returns
743
690
 
744
691
 
745
- - `Boolean`
692
+ - A new value array with the filled properties.
746
693
 
747
694
 
748
695
 
749
696
 
750
- ### dist/general/mix/randomId.js
697
+ ### dist/filters/adapters/flatUIToFD.js
751
698
 
752
699
 
753
- #### randomId(length, exclude)
700
+ #### flatUIToFD(uFilters, version)
754
701
 
755
- Creates a random string
756
- - If the first given argument is different than a length number, the variable is replaced by a default number
757
- - If the optional second given argument is passed the random string is permutated.
702
+ Generates a filter data structure from the flatttened UI filters.
758
703
 
759
704
 
760
705
 
@@ -763,8 +708,8 @@ Creates a random string
763
708
 
764
709
  | Name | Type | Description | |
765
710
  | ---- | ---- | ----------- | -------- |
766
- | length | `Number` | size of the generated string. Default 8 | &nbsp; |
767
- | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
711
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
712
+ | version | | Tag for the version of the filter data structure | &nbsp; |
768
713
 
769
714
 
770
715
 
@@ -772,19 +717,14 @@ Creates a random string
772
717
  ##### Returns
773
718
 
774
719
 
775
- - `String` Random string
776
-
777
-
778
-
720
+ - a Filter Data.
779
721
 
780
- ### dist/general/mix/size.js
781
722
 
782
723
 
783
- #### size(obj)
724
+ #### buildScopes(fbFilters)
784
725
 
785
- Gets the length of the given array.
786
- - Useful for Object, Array and string type.
787
- - For `null` or `undefined` or else argument the returned value will be 0.
726
+ Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
727
+ Also, adds and organizes filters by datasets
788
728
 
789
729
 
790
730
 
@@ -793,7 +733,7 @@ Gets the length of the given array.
793
733
 
794
734
  | Name | Type | Description | |
795
735
  | ---- | ---- | ----------- | -------- |
796
- | obj | `Any` | Any object-type variable | &nbsp; |
736
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
797
737
 
798
738
 
799
739
 
@@ -801,17 +741,13 @@ Gets the length of the given array.
801
741
  ##### Returns
802
742
 
803
743
 
804
- - `Number` the size of the given variable
805
-
806
-
807
-
744
+ - an array of scopes structure.
808
745
 
809
- ### dist/general/string/capitalize.js
810
746
 
811
747
 
812
- #### capitalize(text)
748
+ #### buildScope(uFilter)
813
749
 
814
- Upper case the first letter of a given text
750
+ Gets an scope structure for the filter data
815
751
 
816
752
 
817
753
 
@@ -820,7 +756,7 @@ Upper case the first letter of a given text
820
756
 
821
757
  | Name | Type | Description | |
822
758
  | ---- | ---- | ----------- | -------- |
823
- | text | `String` | | &nbsp; |
759
+ | uFilter | | UI structure filter | &nbsp; |
824
760
 
825
761
 
826
762
 
@@ -828,18 +764,13 @@ Upper case the first letter of a given text
828
764
  ##### Returns
829
765
 
830
766
 
831
- - `String` a capitalized text
832
-
833
-
834
-
767
+ - an scope structure
835
768
 
836
- ### dist/general/object/cloneDeep.js
837
769
 
838
770
 
839
- #### cloneDeep(obj)
771
+ #### buildDataset(uFilter)
840
772
 
841
- A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
842
- Not to use this function with inner objects and functions
773
+ Gets an dataset structure for the filter data
843
774
 
844
775
 
845
776
 
@@ -848,7 +779,7 @@ Not to use this function with inner objects and functions
848
779
 
849
780
  | Name | Type | Description | |
850
781
  | ---- | ---- | ----------- | -------- |
851
- | obj | | The object | &nbsp; |
782
+ | uFilter | | a UI structure filter | &nbsp; |
852
783
 
853
784
 
854
785
 
@@ -856,82 +787,67 @@ Not to use this function with inner objects and functions
856
787
  ##### Returns
857
788
 
858
789
 
859
- - The new reference object or the given object if the parsing is incorrect or empty
790
+ - an dataset structure
860
791
 
861
792
 
862
793
 
794
+ #### buildFilter(uFilter)
863
795
 
864
- ### dist/general/object/get.js
796
+ Gets an filter structure for the filter data
865
797
 
866
798
 
867
- #### _get(baseObject, path, defaultValue)
868
799
 
869
- Like lodash _.get.
870
- Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
871
800
 
872
- Empty arrays and empty objects are returned but the defaultValue is not
873
- Undefined and null values will return the defaultValue.
801
+ ##### Parameters
874
802
 
803
+ | Name | Type | Description | |
804
+ | ---- | ---- | ----------- | -------- |
805
+ | uFilter | | a UI structure filter | &nbsp; |
875
806
 
876
807
 
877
808
 
878
- ##### Parameters
879
809
 
880
- | Name | Type | Description | |
881
- | ---- | ---- | ----------- | -------- |
882
- | baseObject | | The object to query | &nbsp; |
883
- | path | | The string path or collection of string paths of the property to get. | &nbsp; |
884
- | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
810
+ ##### Returns
885
811
 
886
812
 
813
+ - an filter structure
887
814
 
888
815
 
889
- ##### Examples
890
816
 
891
- ```javascript
892
- // returns 'Hello'
893
- _get({ item1: 'Hello', item2: 'World' }, 'item1')
894
- ```
895
- ```javascript
896
- // returns 'A simple Hello'
897
- _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
898
- ```
899
- ```javascript
900
- // returns 'Hello Again'
901
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
902
- ```
903
- ```javascript
904
- // returns 'Hello 2'
905
- _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
906
- ```
907
- ```javascript
908
- // returns 'Hello Again'
909
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
910
- ```
817
+
818
+ ### dist/filters/adapters/flatUIToLogic.js
819
+
820
+
821
+ #### flatUIToLogic(uFilter)
822
+
823
+ Generates a Logic structure from flattened UI filters
824
+
825
+
826
+
827
+
828
+ ##### Parameters
829
+
830
+ | Name | Type | Description | |
831
+ | ---- | ---- | ----------- | -------- |
832
+ | uFilter | | Array of flat filters from UI | &nbsp; |
833
+
834
+
911
835
 
912
836
 
913
837
  ##### Returns
914
838
 
915
839
 
916
- - the resolved value.
840
+ - The logic structure
917
841
 
918
842
 
919
843
 
920
844
 
921
- ### dist/general/object/getAttribute.js
845
+ ### dist/filters/adapters/flatUIToOldLogic.js
922
846
 
923
847
 
924
- #### getAttribute(obj, key)
848
+ #### flatUIToOldLogic(uFilters)
925
849
 
926
- Searchs for properties in different case styles such as: lower, upper, camel and pascal
927
- - To optimize the searching, it is required a key in a snake_case style
928
- - List of cases that do not match
929
- -- From lower to snake case
930
- -- From upper to snake case
931
- -- From lower to camel case
932
- -- From upper to camel case
933
- -- From lower to pascal case
934
- -- From upper to pascal case
850
+ Generates a Logic structure from flattened UI filters
935
851
 
936
852
 
937
853
 
@@ -940,33 +856,25 @@ Searchs for properties in different case styles such as: lower, upper, camel and
940
856
 
941
857
  | Name | Type | Description | |
942
858
  | ---- | ---- | ----------- | -------- |
943
- | obj | `object` | object to look for | &nbsp; |
944
- | key | `string` | String attribute in snake_case style | &nbsp; |
945
-
946
-
947
-
859
+ | uFilters | | Array of flat filters from UI | &nbsp; |
948
860
 
949
- ##### Examples
950
861
 
951
- ```javascript
952
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
953
- ```
954
862
 
955
863
 
956
864
  ##### Returns
957
865
 
958
866
 
959
- - `Void`
867
+ - The logic structure
960
868
 
961
869
 
962
870
 
963
871
 
964
- ### dist/general/object/hasProperty.js
872
+ ### dist/filters/adapters/flatUIToUI.js
965
873
 
966
874
 
967
- #### _hasProperty(obj, property)
875
+ #### flatUIToUI(uFilters, version)
968
876
 
969
- Use the hasOwnProperty in order to verify if the given property exists in the object.
877
+ Generates a UI filter data structure from the flatttened UI filters.
970
878
 
971
879
 
972
880
 
@@ -975,38 +883,46 @@ Use the hasOwnProperty in order to verify if the given property exists in the ob
975
883
 
976
884
  | Name | Type | Description | |
977
885
  | ---- | ---- | ----------- | -------- |
978
- | obj | `object` | an object | &nbsp; |
979
- | property | `string` | String to verify if exists in the object as property | &nbsp; |
886
+ | uFilters | | Array of flattened filters from UI | &nbsp; |
887
+ | version | | Tag for the version of the filter data structure | &nbsp; |
980
888
 
981
889
 
982
890
 
983
891
 
984
- ##### Examples
892
+ ##### Returns
985
893
 
986
- ```javascript
987
- const prop = 'prop2'
988
- const obj1 = { prop1: 'hello', prop2: 'world'}
989
- _hasProperty(ob1, prop1) // true
990
894
 
991
- const obj2 = { prop1: 'hello world' }
992
- _hasProperty(ob1, prop2) // false
993
- ```
895
+ - a UI Filter Data.
994
896
 
995
897
 
996
- ##### Returns
997
898
 
899
+ #### buildScopes(fbFilters)
998
900
 
999
- - True if the object has the given property; otherwise, false.
901
+ Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
902
+ Also, adds and organizes filters by datasets
1000
903
 
1001
904
 
1002
905
 
1003
906
 
1004
- ### dist/general/object/isObject.js
907
+ ##### Parameters
908
+
909
+ | Name | Type | Description | |
910
+ | ---- | ---- | ----------- | -------- |
911
+ | fbFilters | | Array of flat filters from UI | &nbsp; |
1005
912
 
1006
913
 
1007
- #### isObject(obj)
1008
914
 
1009
- Checks if the given argument is an object type
915
+
916
+ ##### Returns
917
+
918
+
919
+ - an array of scopes structure.
920
+
921
+
922
+
923
+ #### buildScope(uFilter)
924
+
925
+ Gets an scope structure for the UI filter data
1010
926
 
1011
927
 
1012
928
 
@@ -1015,7 +931,7 @@ Checks if the given argument is an object type
1015
931
 
1016
932
  | Name | Type | Description | |
1017
933
  | ---- | ---- | ----------- | -------- |
1018
- | obj | | the variable to check | &nbsp; |
934
+ | uFilter | | UI structure filter | &nbsp; |
1019
935
 
1020
936
 
1021
937
 
@@ -1023,18 +939,36 @@ Checks if the given argument is an object type
1023
939
  ##### Returns
1024
940
 
1025
941
 
1026
- - True: It is an object; False: It is not.
942
+ - an scope structure
1027
943
 
1028
944
 
1029
945
 
946
+ #### buildDataset(uFilter)
1030
947
 
1031
- ### dist/general/object/mapValues.js
948
+ Gets an dataset structure for the UI filter data
1032
949
 
1033
950
 
1034
- #### mapValues(baseObject, iteratee)
1035
951
 
1036
- Invoke iteratee (function) for each object key-value pair
1037
- and return a mapped object
952
+
953
+ ##### Parameters
954
+
955
+ | Name | Type | Description | |
956
+ | ---- | ---- | ----------- | -------- |
957
+ | uFilter | | a UI structure filter | &nbsp; |
958
+
959
+
960
+
961
+
962
+ ##### Returns
963
+
964
+
965
+ - an dataset structure
966
+
967
+
968
+
969
+ #### buildFilter(uFilter)
970
+
971
+ Gets an filter structure for the UI filter data
1038
972
 
1039
973
 
1040
974
 
@@ -1043,8 +977,7 @@ and return a mapped object
1043
977
 
1044
978
  | Name | Type | Description | |
1045
979
  | ---- | ---- | ----------- | -------- |
1046
- | baseObject | `Object` | Base object. | &nbsp; |
1047
- | iteratee | `Function` | The executed per iteration. | &nbsp; |
980
+ | uFilter | | a UI structure filter | &nbsp; |
1048
981
 
1049
982
 
1050
983
 
@@ -1052,18 +985,17 @@ and return a mapped object
1052
985
  ##### Returns
1053
986
 
1054
987
 
1055
- - `Object` New mapped object.
988
+ - an filter structure
1056
989
 
1057
990
 
1058
991
 
1059
992
 
1060
- ### dist/general/object/mergeDeep.js
993
+ ### dist/filters/adapters/logicToFD.js
1061
994
 
1062
995
 
1063
- #### mergeDeep(obj1, obj2, settings)
996
+ #### logicToFD(filterData, version)
1064
997
 
1065
- Merges two objects into a new one.
1066
- The second given argument to the first given argument.
998
+ Generates a filter data structure from the old logic structure (v2.0).
1067
999
 
1068
1000
 
1069
1001
 
@@ -1072,9 +1004,8 @@ The second given argument to the first given argument.
1072
1004
 
1073
1005
  | Name | Type | Description | |
1074
1006
  | ---- | ---- | ----------- | -------- |
1075
- | obj1 | | The target object | &nbsp; |
1076
- | obj2 | | The object to be merged | &nbsp; |
1077
- | settings | | Object settings for this function | &nbsp; |
1007
+ | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1008
+ | version | | Tag for the version of the filter data structure | &nbsp; |
1078
1009
 
1079
1010
 
1080
1011
 
@@ -1082,13 +1013,17 @@ The second given argument to the first given argument.
1082
1013
  ##### Returns
1083
1014
 
1084
1015
 
1085
- - a new merged object
1016
+ - a Filter Data.
1086
1017
 
1087
1018
 
1088
1019
 
1089
- #### isValid(obj1, obj2)
1090
1020
 
1091
- Validates if the two arguments are objects
1021
+ ### dist/filters/adapters/logicToFlatUI.js
1022
+
1023
+
1024
+ #### logicToFlatUI(logics)
1025
+
1026
+ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1092
1027
 
1093
1028
 
1094
1029
 
@@ -1097,8 +1032,7 @@ Validates if the two arguments are objects
1097
1032
 
1098
1033
  | Name | Type | Description | |
1099
1034
  | ---- | ---- | ----------- | -------- |
1100
- | obj1 | | The target object | &nbsp; |
1101
- | obj2 | | The object to be merged | &nbsp; |
1035
+ | logics | | The old logic structure (v2.0) | &nbsp; |
1102
1036
 
1103
1037
 
1104
1038
 
@@ -1106,13 +1040,13 @@ Validates if the two arguments are objects
1106
1040
  ##### Returns
1107
1041
 
1108
1042
 
1109
- - true: they are valid; false: they are not
1043
+ - The Flattened UI Filters array
1110
1044
 
1111
1045
 
1112
1046
 
1113
- #### getParamsToMergeDeep(settings)
1047
+ #### getFilter(filters, filter, getIndex)
1114
1048
 
1115
- Validates and gets the settings with all set parameters.
1049
+ Get the filter or the index of the given array, validating an old filter structure.
1116
1050
 
1117
1051
 
1118
1052
 
@@ -1121,7 +1055,9 @@ Validates and gets the settings with all set parameters.
1121
1055
 
1122
1056
  | Name | Type | Description | |
1123
1057
  | ---- | ---- | ----------- | -------- |
1124
- | settings | | the settings object | &nbsp; |
1058
+ | filters | | The array of UI filters | &nbsp; |
1059
+ | filter | | The old logic structure filter | &nbsp; |
1060
+ | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
1125
1061
 
1126
1062
 
1127
1063
 
@@ -1129,17 +1065,13 @@ Validates and gets the settings with all set parameters.
1129
1065
  ##### Returns
1130
1066
 
1131
1067
 
1132
- - a new settings object with all set parameters.
1133
-
1134
-
1135
-
1068
+ - the index or the UI filter object
1136
1069
 
1137
- ### dist/general/object/objectCopy.js
1138
1070
 
1139
1071
 
1140
- #### objectCopy(entity, cache)
1072
+ #### refineRankingValues(values, uiValues)
1141
1073
 
1142
- Created a new reference of the given argument
1074
+ Refines the values of the Ranking column type.
1143
1075
 
1144
1076
 
1145
1077
 
@@ -1148,8 +1080,8 @@ Created a new reference of the given argument
1148
1080
 
1149
1081
  | Name | Type | Description | |
1150
1082
  | ---- | ---- | ----------- | -------- |
1151
- | entity | | The variable to be copied | &nbsp; |
1152
- | cache | | | &nbsp; |
1083
+ | values | | the Array of Ranking values | &nbsp; |
1084
+ | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1153
1085
 
1154
1086
 
1155
1087
 
@@ -1157,17 +1089,17 @@ Created a new reference of the given argument
1157
1089
  ##### Returns
1158
1090
 
1159
1091
 
1160
- - A new reference of the given argument
1092
+ - the array of Ranking values
1161
1093
 
1162
1094
 
1163
1095
 
1164
1096
 
1165
- ### dist/general/object/omit.js
1097
+ ### dist/filters/adapters/logicToUI.js
1166
1098
 
1167
1099
 
1168
- #### omit(obj, props)
1100
+ #### logicToUI(uFilters, datasetsInfo)
1169
1101
 
1170
- return a new Object excluding attributes in _props_ list
1102
+ Generates a UI filter structure from the old logic structure (v2.0).
1171
1103
 
1172
1104
 
1173
1105
 
@@ -1176,8 +1108,8 @@ return a new Object excluding attributes in _props_ list
1176
1108
 
1177
1109
  | Name | Type | Description | |
1178
1110
  | ---- | ---- | ----------- | -------- |
1179
- | obj | `Object` | base object | &nbsp; |
1180
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
1111
+ | uFilters | | Array of filters from old logic structure | &nbsp; |
1112
+ | datasetsInfo | | Collection of datasets information | &nbsp; |
1181
1113
 
1182
1114
 
1183
1115
 
@@ -1185,17 +1117,17 @@ return a new Object excluding attributes in _props_ list
1185
1117
  ##### Returns
1186
1118
 
1187
1119
 
1188
- - `Object` clean object
1120
+ - a UI Filter Data.
1189
1121
 
1190
1122
 
1191
1123
 
1192
1124
 
1193
- ### dist/general/object/pick.js
1125
+ ### dist/filters/adapters/transformFilters.js
1194
1126
 
1195
1127
 
1196
- #### pick(baseObject, keys)
1128
+ #### transformFilters(oldFiltersObj, section)
1197
1129
 
1198
- return a new object just with attributes in _keys_ list
1130
+ Transform the old filters structure into the new one
1199
1131
 
1200
1132
 
1201
1133
 
@@ -1204,26 +1136,77 @@ return a new object just with attributes in _keys_ list
1204
1136
 
1205
1137
  | Name | Type | Description | |
1206
1138
  | ---- | ---- | ----------- | -------- |
1207
- | baseObject | `Object` | base object | &nbsp; |
1208
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
1139
+ | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
1140
+ | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
1141
+
1142
+
1143
+
1144
+
1145
+ ##### Examples
1146
+
1147
+ ```javascript
1209
1148
 
1149
+ const oldPreferenceFilters = {
1150
+ "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1151
+ "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1152
+ "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1153
+ "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1154
+ "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1155
+ "formulaId": null,
1156
+ "panelId": null,
1157
+ "values": [
1158
+ {
1159
+ "EQUALS": [
1160
+ {
1161
+ "id": "AK4M8UV2a0",
1162
+ "value": "A",
1163
+ "enabled": true,
1164
+ "imageUrl": null
1165
+ },
1166
+ {
1167
+ "id": "AK4M8UV2a1",
1168
+ "value": "B",
1169
+ "enabled": true,
1170
+ "imageUrl": null
1171
+ }
1172
+ ]
1173
+ }
1174
+ ],
1175
+ "bucketId": null,
1176
+ "text": "MC",
1177
+ "title": "MC",
1178
+ "type": "SINGLE_CHOICE",
1179
+ "qid": "AK4M8UV2",
1180
+ "dataset": {
1181
+ "sourceid": "xYOQAdpqT",
1182
+ "name": "Form All Questions",
1183
+ "qrveyid": "xYOQAdpqT",
1184
+ "text": "Form All Questions",
1185
+ "linkid": 0
1186
+ },
1187
+ "enabled": true,
1188
+ "linked": null
1189
+ }
1190
+ };
1210
1191
 
1192
+ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1193
+ ```
1211
1194
 
1212
1195
 
1213
1196
  ##### Returns
1214
1197
 
1215
1198
 
1216
- - `Object` new object just with desired attributes
1199
+ - `Object` an object with the new filters structure
1217
1200
 
1218
1201
 
1219
1202
 
1220
1203
 
1221
- ### dist/general/object/serialize.js
1204
+ ### dist/filters/helpers/applyHierarchyForAggFilters.js
1222
1205
 
1223
1206
 
1224
- #### serialize(obj)
1207
+ #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1225
1208
 
1226
- serialize object to url param
1209
+ [TODO: Make a proper description for this function]
1227
1210
 
1228
1211
 
1229
1212
 
@@ -1232,7 +1215,9 @@ serialize object to url param
1232
1215
 
1233
1216
  | Name | Type | Description | |
1234
1217
  | ---- | ---- | ----------- | -------- |
1235
- | obj | | - Object to be serialized | &nbsp; |
1218
+ | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1219
+ | scopes | | | &nbsp; |
1220
+ | currentScope | | | &nbsp; |
1236
1221
 
1237
1222
 
1238
1223
 
@@ -1240,17 +1225,17 @@ serialize object to url param
1240
1225
  ##### Returns
1241
1226
 
1242
1227
 
1243
- - `Void`
1228
+ -
1244
1229
 
1245
1230
 
1246
1231
 
1247
1232
 
1248
- ### dist/filters/adapters/FDToFlatUI.js
1233
+ ### dist/filters/helpers/getAvailableScopes.js
1249
1234
 
1250
1235
 
1251
- #### FDToFlatUI(filterData, datasetsInfo)
1236
+ #### getAvailableScopes(config)
1252
1237
 
1253
- Generates a Flattened UI filter structure from Filter Data structure.
1238
+ Gets Scopes/Scope IDs by given IDs
1254
1239
 
1255
1240
 
1256
1241
 
@@ -1259,8 +1244,7 @@ Generates a Flattened UI filter structure from Filter Data structure.
1259
1244
 
1260
1245
  | Name | Type | Description | |
1261
1246
  | ---- | ---- | ----------- | -------- |
1262
- | filterData | | The filter data object. | &nbsp; |
1263
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1247
+ | config | | given Differnts IDs in order set a available scope | &nbsp; |
1264
1248
 
1265
1249
 
1266
1250
 
@@ -1268,13 +1252,17 @@ Generates a Flattened UI filter structure from Filter Data structure.
1268
1252
  ##### Returns
1269
1253
 
1270
1254
 
1271
- - a flattened UI filters array
1255
+ - a Scopes/Scope IDs array
1272
1256
 
1273
1257
 
1274
1258
 
1275
- #### FD21ToFlatUI(scopes, datasetsInfo)
1276
1259
 
1277
- Generates a Filter Builder Structure from the Filter Data structure v2.1
1260
+ ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1261
+
1262
+
1263
+ #### getAvailableScopesIDsByConfig(config)
1264
+
1265
+ Gets the Scopes IDS for the Available Scope function by any config
1278
1266
 
1279
1267
 
1280
1268
 
@@ -1283,8 +1271,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
1283
1271
 
1284
1272
  | Name | Type | Description | |
1285
1273
  | ---- | ---- | ----------- | -------- |
1286
- | scopes | | The filter scope section | &nbsp; |
1287
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1274
+ | config | | any config | &nbsp; |
1288
1275
 
1289
1276
 
1290
1277
 
@@ -1292,17 +1279,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
1292
1279
  ##### Returns
1293
1280
 
1294
1281
 
1295
- - a flattened UI filters array
1282
+ - a Available Scope IDS config
1296
1283
 
1297
1284
 
1298
1285
 
1299
1286
 
1300
- ### dist/filters/adapters/FDToLogic.js
1287
+ ### dist/filters/helpers/getScopesByHierarchy.js
1301
1288
 
1302
1289
 
1303
- #### FDToLogic(filterData)
1290
+ #### getScopesByHierarchy(scopes, currentScope)
1304
1291
 
1305
- Generates a Filter Logic structure from Filter Data structure.
1292
+ [TODO: Make a description for this]
1306
1293
 
1307
1294
 
1308
1295
 
@@ -1311,7 +1298,8 @@ Generates a Filter Logic structure from Filter Data structure.
1311
1298
 
1312
1299
  | Name | Type | Description | |
1313
1300
  | ---- | ---- | ----------- | -------- |
1314
- | filterData | | The filter data object. | &nbsp; |
1301
+ | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1302
+ | currentScope | | Current scope type | &nbsp; |
1315
1303
 
1316
1304
 
1317
1305
 
@@ -1319,13 +1307,17 @@ Generates a Filter Logic structure from Filter Data structure.
1319
1307
  ##### Returns
1320
1308
 
1321
1309
 
1322
- - a filter logic array
1310
+ - A new array of Scopes/Scope IDs
1323
1311
 
1324
1312
 
1325
1313
 
1326
- #### getLogicBodyFromFD21(filterData)
1327
1314
 
1328
- Gets the logic body
1315
+ ### dist/general/array/delete.js
1316
+
1317
+
1318
+ #### ArrayDelete(array, index)
1319
+
1320
+ Inmutable Array Item deletion
1329
1321
 
1330
1322
 
1331
1323
 
@@ -1334,7 +1326,8 @@ Gets the logic body
1334
1326
 
1335
1327
  | Name | Type | Description | |
1336
1328
  | ---- | ---- | ----------- | -------- |
1337
- | filterData | | The filter data object | &nbsp; |
1329
+ | array | `Array` | a collection of items to delete | &nbsp; |
1330
+ | index | `Number` | the position of the item to delete | &nbsp; |
1338
1331
 
1339
1332
 
1340
1333
 
@@ -1342,17 +1335,20 @@ Gets the logic body
1342
1335
  ##### Returns
1343
1336
 
1344
1337
 
1345
- - a filter logic array
1338
+ - a new Array or the given parameter when is empty or not an array
1346
1339
 
1347
1340
 
1348
1341
 
1349
1342
 
1350
- ### dist/filters/adapters/FDToUI.js
1343
+ ### dist/general/array/filterNestedTree.js
1351
1344
 
1352
1345
 
1353
- #### FDToUI(filterData, datasetsInfo)
1346
+ #### filterNestedTree(arr, childArrKey, condition)
1354
1347
 
1355
- Generates a UI filter structure from Filter Data structure.
1348
+ Filters a nested tree array by a custom condition on the last child node
1349
+ - If the given arguments are not valid, the function returns the first argument.
1350
+ - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
1351
+ - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
1356
1352
 
1357
1353
 
1358
1354
 
@@ -1361,8 +1357,9 @@ Generates a UI filter structure from Filter Data structure.
1361
1357
 
1362
1358
  | Name | Type | Description | |
1363
1359
  | ---- | ---- | ----------- | -------- |
1364
- | filterData | | The filter data object. | &nbsp; |
1365
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1360
+ | arr | | nested tree array | &nbsp; |
1361
+ | childArrKey | | property representing the children array on the nested tree | &nbsp; |
1362
+ | condition | | function callback that determines if the filter is applied on the last child node of the nested tree | &nbsp; |
1366
1363
 
1367
1364
 
1368
1365
 
@@ -1370,13 +1367,17 @@ Generates a UI filter structure from Filter Data structure.
1370
1367
  ##### Returns
1371
1368
 
1372
1369
 
1373
- - a UI Filters structure
1370
+ - array filtered
1374
1371
 
1375
1372
 
1376
1373
 
1377
- #### FD21ToUI(scopes, section, version, datasetsInfo)
1378
1374
 
1379
- Generates a UI filter Structure from the Filter Data structure v2.1
1375
+ ### dist/general/array/flattenDeep.js
1376
+
1377
+
1378
+ #### flattenDeep(arr)
1379
+
1380
+ Flat deeply an array
1380
1381
 
1381
1382
 
1382
1383
 
@@ -1385,10 +1386,7 @@ Generates a UI filter Structure from the Filter Data structure v2.1
1385
1386
 
1386
1387
  | Name | Type | Description | |
1387
1388
  | ---- | ---- | ----------- | -------- |
1388
- | scopes | | The filter scope section | &nbsp; |
1389
- | section | | The filter section. | &nbsp; |
1390
- | version | | The version of the filter structure | &nbsp; |
1391
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1389
+ | arr | | Array to flat deeply | &nbsp; |
1392
1390
 
1393
1391
 
1394
1392
 
@@ -1396,17 +1394,17 @@ Generates a UI filter Structure from the Filter Data structure v2.1
1396
1394
  ##### Returns
1397
1395
 
1398
1396
 
1399
- - a UI filter Structure
1397
+ - flatten array
1400
1398
 
1401
1399
 
1402
1400
 
1403
1401
 
1404
- ### dist/filters/adapters/UIToFD.js
1402
+ ### dist/general/array/getFirstIndexFromArray.js
1405
1403
 
1406
1404
 
1407
- #### UIToFD(filterData)
1405
+ #### getFirstIndexFromArray(array, callback)
1408
1406
 
1409
- Generates a Filter Data Structure structure from UI Filter Data structure.
1407
+ Gets the first index from the array by a callback condition
1410
1408
 
1411
1409
 
1412
1410
 
@@ -1415,7 +1413,8 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
1415
1413
 
1416
1414
  | Name | Type | Description | |
1417
1415
  | ---- | ---- | ----------- | -------- |
1418
- | filterData | | The UI filter data object. | &nbsp; |
1416
+ | array | | | &nbsp; |
1417
+ | callback | | function callback | &nbsp; |
1419
1418
 
1420
1419
 
1421
1420
 
@@ -1423,13 +1422,17 @@ Generates a Filter Data Structure structure from UI Filter Data structure.
1423
1422
  ##### Returns
1424
1423
 
1425
1424
 
1426
- - a Filter Data structure
1425
+ - the first index of the array. -1 when the condition is not satisfied
1427
1426
 
1428
1427
 
1429
1428
 
1430
- #### UI21ToFD(uFilterData, version)
1431
1429
 
1432
- Builds the Fitler Data structure from UI filter data
1430
+ ### dist/general/array/getLastIndexFromArray.js
1431
+
1432
+
1433
+ #### getLastIndexFromArray(array, callback)
1434
+
1435
+ Gets the last index from the array by a callback condition
1433
1436
 
1434
1437
 
1435
1438
 
@@ -1438,8 +1441,8 @@ Builds the Fitler Data structure from UI filter data
1438
1441
 
1439
1442
  | Name | Type | Description | |
1440
1443
  | ---- | ---- | ----------- | -------- |
1441
- | uFilterData | | The UI filter Data object | &nbsp; |
1442
- | version | | the version of the structure | &nbsp; |
1444
+ | array | | | &nbsp; |
1445
+ | callback | | function callback | &nbsp; |
1443
1446
 
1444
1447
 
1445
1448
 
@@ -1447,17 +1450,17 @@ Builds the Fitler Data structure from UI filter data
1447
1450
  ##### Returns
1448
1451
 
1449
1452
 
1450
- -
1453
+ - the last index of the array. -1 when the condition is not satisfied
1451
1454
 
1452
1455
 
1453
1456
 
1454
1457
 
1455
- ### dist/filters/adapters/UIToFlatUI.js
1458
+ ### dist/general/function/debounce.js
1456
1459
 
1457
1460
 
1458
- #### UIToFlatUI(filterData, datasetsInfo)
1461
+ #### debounce(fn, time)
1459
1462
 
1460
- Generates a Flattened UI filter structure from UI Filter Data structure.
1463
+ Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1461
1464
 
1462
1465
 
1463
1466
 
@@ -1466,8 +1469,8 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
1466
1469
 
1467
1470
  | Name | Type | Description | |
1468
1471
  | ---- | ---- | ----------- | -------- |
1469
- | filterData | | The UI filter data object. | &nbsp; |
1470
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
1472
+ | fn | `Function` | original Function | &nbsp; |
1473
+ | time | `Number` | default 500ms | &nbsp; |
1471
1474
 
1472
1475
 
1473
1476
 
@@ -1475,13 +1478,17 @@ Generates a Flattened UI filter structure from UI Filter Data structure.
1475
1478
  ##### Returns
1476
1479
 
1477
1480
 
1478
- - a flattened UI filters array
1481
+ - `Function` debounced functions
1479
1482
 
1480
1483
 
1481
1484
 
1482
- #### UI21ToFlatUI(scopes)
1483
1485
 
1484
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1486
+ ### dist/general/function/throttled.js
1487
+
1488
+
1489
+ #### throttled(fn, time)
1490
+
1491
+ Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1485
1492
 
1486
1493
 
1487
1494
 
@@ -1490,7 +1497,8 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1490
1497
 
1491
1498
  | Name | Type | Description | |
1492
1499
  | ---- | ---- | ----------- | -------- |
1493
- | scopes | | The filter scope section | &nbsp; |
1500
+ | fn | `Function` | original Function | &nbsp; |
1501
+ | time | `Number` | default 500ms | &nbsp; |
1494
1502
 
1495
1503
 
1496
1504
 
@@ -1498,18 +1506,18 @@ Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
1498
1506
  ##### Returns
1499
1507
 
1500
1508
 
1501
- - a flattened UI filters array
1509
+ - `Function` throttled function
1502
1510
 
1503
1511
 
1504
1512
 
1505
1513
 
1506
- ### dist/filters/adapters/adaptDateGroupingProperty.js
1514
+ ### dist/general/mix/compareDeep.js
1507
1515
 
1508
1516
 
1509
- #### adaptDateGroupingProperty(property)
1517
+ #### compareDeep(object1, object2)
1510
1518
 
1511
- [TODO: For 2022, eliminate this adapter]
1512
- Get the new property base on the old date grouping properties
1519
+ Compares two objects to know if they are equals. Go across nested objects.
1520
+ Includes arrays in the comparison.
1513
1521
 
1514
1522
 
1515
1523
 
@@ -1518,7 +1526,8 @@ Get the new property base on the old date grouping properties
1518
1526
 
1519
1527
  | Name | Type | Description | |
1520
1528
  | ---- | ---- | ----------- | -------- |
1521
- | property | | | &nbsp; |
1529
+ | object1 | | First Object to compare | &nbsp; |
1530
+ | object2 | | Second Object to compare | &nbsp; |
1522
1531
 
1523
1532
 
1524
1533
 
@@ -1526,17 +1535,17 @@ Get the new property base on the old date grouping properties
1526
1535
  ##### Returns
1527
1536
 
1528
1537
 
1529
- -
1538
+ - True: objects are equal. False: Objects are not equal. Undefined: invalid
1530
1539
 
1531
1540
 
1532
1541
 
1533
1542
 
1534
- ### dist/filters/adapters/adaptFilterData.js
1543
+ ### dist/general/mix/getTag.js
1535
1544
 
1536
1545
 
1537
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
1546
+ #### getTag(value)
1538
1547
 
1539
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
1548
+ Gets the `toStringTag` of `value`.
1540
1549
 
1541
1550
 
1542
1551
 
@@ -1545,9 +1554,7 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1545
1554
 
1546
1555
  | Name | Type | Description | |
1547
1556
  | ---- | ---- | ----------- | -------- |
1548
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
1549
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
1550
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
1557
+ | value | | The value to query. | &nbsp; |
1551
1558
 
1552
1559
 
1553
1560
 
@@ -1555,18 +1562,17 @@ Checks and adapts the v2.0 Filter Data Structure to the v2.1
1555
1562
  ##### Returns
1556
1563
 
1557
1564
 
1558
- - A new filter data structure v2.1
1565
+ - `string` Returns the `toStringTag`.
1559
1566
 
1560
1567
 
1561
1568
 
1562
1569
 
1563
- ### dist/filters/adapters/adaptFilterValues.js
1570
+ ### dist/general/mix/importScripts.js
1564
1571
 
1565
1572
 
1566
- #### adaptFilterValues(filter)
1573
+ #### importScripts(scripts)
1567
1574
 
1568
- [TODO: For 2022, eliminate this adapter]
1569
- Gets an adapted filter value array. Validates the enabled property and sets
1575
+ Import a set of external Scripts given the URL in both serie and cascade way
1570
1576
 
1571
1577
 
1572
1578
 
@@ -1575,25 +1581,54 @@ Gets an adapted filter value array. Validates the enabled property and sets
1575
1581
 
1576
1582
  | Name | Type | Description | |
1577
1583
  | ---- | ---- | ----------- | -------- |
1578
- | filter | | The filter | &nbsp; |
1584
+ | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1585
+ | scripts.url | `String` | CDN URL | &nbsp; |
1586
+ | 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; |
1587
+ | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1588
+ | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1589
+ | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
1579
1590
 
1580
1591
 
1581
1592
 
1582
1593
 
1583
- ##### Returns
1594
+ ##### Examples
1595
+
1596
+ ```javascript
1597
+ // 1) Simple script (paralell loading)
1598
+ importScripts(['http://myscript.js', 'http://another.js']);
1599
+
1600
+ // 2) Loading `.js` and `.esm.js` script (parallel loading)
1601
+ importScripts([
1602
+ { url: 'http://myscript.esm.js', type: 'module' },
1603
+ { url: 'http://myscript.js', noModule: true }
1604
+ ]);
1605
+
1606
+ // 3) import dependent scripts (cascade)
1607
+ importScripts([
1608
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1609
+ ]);
1584
1610
 
1611
+ // 4) mix
1612
+ importScripts([
1613
+ { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1614
+ { url: 'http://another.esm.js', type: 'module' },
1615
+ { url: 'http://another.js', noModule: true },
1616
+ 'http://simplescript.js'
1617
+ ]);
1618
+ ```
1585
1619
 
1586
- - A new value array with the filled properties.
1587
1620
 
1621
+ ##### Returns
1588
1622
 
1589
1623
 
1624
+ - `Promise` Promise when all script have been loaded
1590
1625
 
1591
- ### dist/filters/adapters/flatUIToLogic.js
1592
1626
 
1593
1627
 
1594
- #### flatUIToLogic(uFilter)
1628
+ #### loadScript(url, type, noModule)
1595
1629
 
1596
- Generates a Logic structure from flattened UI filters
1630
+ Creates the script element and appends to document.head
1631
+ return a Promise that is resolved when the script is loaded
1597
1632
 
1598
1633
 
1599
1634
 
@@ -1602,7 +1637,9 @@ Generates a Logic structure from flattened UI filters
1602
1637
 
1603
1638
  | Name | Type | Description | |
1604
1639
  | ---- | ---- | ----------- | -------- |
1605
- | uFilter | | Array of flat filters from UI | &nbsp; |
1640
+ | url | `String` | Cdn Url | &nbsp; |
1641
+ | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1642
+ | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1606
1643
 
1607
1644
 
1608
1645
 
@@ -1610,17 +1647,17 @@ Generates a Logic structure from flattened UI filters
1610
1647
  ##### Returns
1611
1648
 
1612
1649
 
1613
- - The logic structure
1650
+ - `Void`
1614
1651
 
1615
1652
 
1616
1653
 
1617
1654
 
1618
- ### dist/filters/adapters/flatUIToFD.js
1655
+ ### dist/general/mix/isEmpty.js
1619
1656
 
1620
1657
 
1621
- #### flatUIToFD(uFilters, version)
1658
+ #### isEmpty(variable, includeFalsy)
1622
1659
 
1623
- Generates a filter data structure from the flatttened UI filters.
1660
+ Validates if the given argument is empty
1624
1661
 
1625
1662
 
1626
1663
 
@@ -1629,8 +1666,8 @@ Generates a filter data structure from the flatttened UI filters.
1629
1666
 
1630
1667
  | Name | Type | Description | |
1631
1668
  | ---- | ---- | ----------- | -------- |
1632
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1633
- | version | | Tag for the version of the filter data structure | &nbsp; |
1669
+ | variable | | the given variable | &nbsp; |
1670
+ | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
1634
1671
 
1635
1672
 
1636
1673
 
@@ -1638,14 +1675,18 @@ Generates a filter data structure from the flatttened UI filters.
1638
1675
  ##### Returns
1639
1676
 
1640
1677
 
1641
- - a Filter Data.
1678
+ - true: the given argument is empty; false: is not.
1642
1679
 
1643
1680
 
1644
1681
 
1645
- #### buildScopes(fbFilters)
1646
1682
 
1647
- Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1648
- Also, adds and organizes filters by datasets
1683
+ ### dist/general/mix/isNull.js
1684
+
1685
+
1686
+ #### isNull(arg)
1687
+
1688
+ return if a given variable is either `null` or `undefined`
1689
+ useful to avoid falsify validating Number Zero (0)
1649
1690
 
1650
1691
 
1651
1692
 
@@ -1654,7 +1695,7 @@ Also, adds and organizes filters by datasets
1654
1695
 
1655
1696
  | Name | Type | Description | |
1656
1697
  | ---- | ---- | ----------- | -------- |
1657
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1698
+ | arg | `any` | | &nbsp; |
1658
1699
 
1659
1700
 
1660
1701
 
@@ -1662,13 +1703,19 @@ Also, adds and organizes filters by datasets
1662
1703
  ##### Returns
1663
1704
 
1664
1705
 
1665
- - an array of scopes structure.
1706
+ - `Boolean`
1666
1707
 
1667
1708
 
1668
1709
 
1669
- #### buildScope(uFilter)
1670
1710
 
1671
- Gets an scope structure for the filter data
1711
+ ### dist/general/mix/randomId.js
1712
+
1713
+
1714
+ #### randomId(length, exclude)
1715
+
1716
+ Creates a random string
1717
+ - If the first given argument is different than a length number, the variable is replaced by a default number
1718
+ - If the optional second given argument is passed the random string is permutated.
1672
1719
 
1673
1720
 
1674
1721
 
@@ -1677,7 +1724,8 @@ Gets an scope structure for the filter data
1677
1724
 
1678
1725
  | Name | Type | Description | |
1679
1726
  | ---- | ---- | ----------- | -------- |
1680
- | uFilter | | UI structure filter | &nbsp; |
1727
+ | length | `Number` | size of the generated string. Default 8 | &nbsp; |
1728
+ | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
1681
1729
 
1682
1730
 
1683
1731
 
@@ -1685,13 +1733,19 @@ Gets an scope structure for the filter data
1685
1733
  ##### Returns
1686
1734
 
1687
1735
 
1688
- - an scope structure
1736
+ - `String` Random string
1689
1737
 
1690
1738
 
1691
1739
 
1692
- #### buildDataset(uFilter)
1693
1740
 
1694
- Gets an dataset structure for the filter data
1741
+ ### dist/general/mix/size.js
1742
+
1743
+
1744
+ #### size(obj)
1745
+
1746
+ Gets the length of the given array.
1747
+ - Useful for Object, Array and string type.
1748
+ - For `null` or `undefined` or else argument the returned value will be 0.
1695
1749
 
1696
1750
 
1697
1751
 
@@ -1700,7 +1754,7 @@ Gets an dataset structure for the filter data
1700
1754
 
1701
1755
  | Name | Type | Description | |
1702
1756
  | ---- | ---- | ----------- | -------- |
1703
- | uFilter | | a UI structure filter | &nbsp; |
1757
+ | obj | `Any` | Any object-type variable | &nbsp; |
1704
1758
 
1705
1759
 
1706
1760
 
@@ -1708,13 +1762,18 @@ Gets an dataset structure for the filter data
1708
1762
  ##### Returns
1709
1763
 
1710
1764
 
1711
- - an dataset structure
1765
+ - `Number` the size of the given variable
1712
1766
 
1713
1767
 
1714
1768
 
1715
- #### buildFilter(uFilter)
1716
1769
 
1717
- Gets an filter structure for the filter data
1770
+ ### dist/general/object/cloneDeep.js
1771
+
1772
+
1773
+ #### cloneDeep(obj)
1774
+
1775
+ A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
1776
+ Not to use this function with inner objects and functions
1718
1777
 
1719
1778
 
1720
1779
 
@@ -1723,7 +1782,7 @@ Gets an filter structure for the filter data
1723
1782
 
1724
1783
  | Name | Type | Description | |
1725
1784
  | ---- | ---- | ----------- | -------- |
1726
- | uFilter | | a UI structure filter | &nbsp; |
1785
+ | obj | | The object | &nbsp; |
1727
1786
 
1728
1787
 
1729
1788
 
@@ -1731,17 +1790,21 @@ Gets an filter structure for the filter data
1731
1790
  ##### Returns
1732
1791
 
1733
1792
 
1734
- - an filter structure
1793
+ - The new reference object or the given object if the parsing is incorrect or empty
1735
1794
 
1736
1795
 
1737
1796
 
1738
1797
 
1739
- ### dist/filters/adapters/flatUIToOldLogic.js
1798
+ ### dist/general/object/get.js
1740
1799
 
1741
1800
 
1742
- #### flatUIToOldLogic(uFilters)
1801
+ #### _get(baseObject, path, defaultValue)
1743
1802
 
1744
- Generates a Logic structure from flattened UI filters
1803
+ Like lodash _.get.
1804
+ Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
1805
+
1806
+ Empty arrays and empty objects are returned but the defaultValue is not
1807
+ Undefined and null values will return the defaultValue.
1745
1808
 
1746
1809
 
1747
1810
 
@@ -1750,25 +1813,59 @@ Generates a Logic structure from flattened UI filters
1750
1813
 
1751
1814
  | Name | Type | Description | |
1752
1815
  | ---- | ---- | ----------- | -------- |
1753
- | uFilters | | Array of flat filters from UI | &nbsp; |
1816
+ | baseObject | | The object to query | &nbsp; |
1817
+ | path | | The string path or collection of string paths of the property to get. | &nbsp; |
1818
+ | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
1819
+
1820
+
1821
+
1754
1822
 
1823
+ ##### Examples
1755
1824
 
1825
+ ```javascript
1826
+ // returns 'Hello'
1827
+ _get({ item1: 'Hello', item2: 'World' }, 'item1')
1828
+ ```
1829
+ ```javascript
1830
+ // returns 'A simple Hello'
1831
+ _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
1832
+ ```
1833
+ ```javascript
1834
+ // returns 'Hello Again'
1835
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
1836
+ ```
1837
+ ```javascript
1838
+ // returns 'Hello 2'
1839
+ _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
1840
+ ```
1841
+ ```javascript
1842
+ // returns 'Hello Again'
1843
+ _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
1844
+ ```
1756
1845
 
1757
1846
 
1758
1847
  ##### Returns
1759
1848
 
1760
1849
 
1761
- - The logic structure
1850
+ - the resolved value.
1762
1851
 
1763
1852
 
1764
1853
 
1765
1854
 
1766
- ### dist/filters/adapters/flatUIToUI.js
1855
+ ### dist/general/object/getAttribute.js
1767
1856
 
1768
1857
 
1769
- #### flatUIToUI(uFilters, version)
1858
+ #### getAttribute(obj, key)
1770
1859
 
1771
- Generates a UI filter data structure from the flatttened UI filters.
1860
+ Searchs for properties in different case styles such as: lower, upper, camel and pascal
1861
+ - To optimize the searching, it is required a key in a snake_case style
1862
+ - List of cases that do not match
1863
+ -- From lower to snake case
1864
+ -- From upper to snake case
1865
+ -- From lower to camel case
1866
+ -- From upper to camel case
1867
+ -- From lower to pascal case
1868
+ -- From upper to pascal case
1772
1869
 
1773
1870
 
1774
1871
 
@@ -1777,69 +1874,73 @@ Generates a UI filter data structure from the flatttened UI filters.
1777
1874
 
1778
1875
  | Name | Type | Description | |
1779
1876
  | ---- | ---- | ----------- | -------- |
1780
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1781
- | version | | Tag for the version of the filter data structure | &nbsp; |
1782
-
1783
-
1877
+ | obj | `object` | object to look for | &nbsp; |
1878
+ | key | `string` | String attribute in snake_case style | &nbsp; |
1784
1879
 
1785
1880
 
1786
- ##### Returns
1787
1881
 
1788
1882
 
1789
- - a UI Filter Data.
1883
+ ##### Examples
1790
1884
 
1885
+ ```javascript
1886
+ getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
1887
+ ```
1791
1888
 
1792
1889
 
1793
- #### buildScopes(fbFilters)
1890
+ ##### Returns
1794
1891
 
1795
- Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
1796
- Also, adds and organizes filters by datasets
1797
1892
 
1893
+ - `Void`
1798
1894
 
1799
1895
 
1800
1896
 
1801
- ##### Parameters
1802
1897
 
1803
- | Name | Type | Description | |
1804
- | ---- | ---- | ----------- | -------- |
1805
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1898
+ ### dist/general/object/hasProperty.js
1806
1899
 
1807
1900
 
1901
+ #### _hasProperty(obj, property)
1808
1902
 
1903
+ Use the hasOwnProperty in order to verify if the given property exists in the object.
1809
1904
 
1810
- ##### Returns
1811
1905
 
1812
1906
 
1813
- - an array of scopes structure.
1814
1907
 
1908
+ ##### Parameters
1815
1909
 
1910
+ | Name | Type | Description | |
1911
+ | ---- | ---- | ----------- | -------- |
1912
+ | obj | `object` | an object | &nbsp; |
1913
+ | property | `string` | String to verify if exists in the object as property | &nbsp; |
1816
1914
 
1817
- #### buildScope(uFilter)
1818
1915
 
1819
- Gets an scope structure for the UI filter data
1820
1916
 
1821
1917
 
1918
+ ##### Examples
1822
1919
 
1920
+ ```javascript
1921
+ const prop = 'prop2'
1922
+ const obj1 = { prop1: 'hello', prop2: 'world'}
1923
+ _hasProperty(ob1, prop1) // true
1823
1924
 
1824
- ##### Parameters
1925
+ const obj2 = { prop1: 'hello world' }
1926
+ _hasProperty(ob1, prop2) // false
1927
+ ```
1825
1928
 
1826
- | Name | Type | Description | |
1827
- | ---- | ---- | ----------- | -------- |
1828
- | uFilter | | UI structure filter | &nbsp; |
1829
1929
 
1930
+ ##### Returns
1830
1931
 
1831
1932
 
1933
+ - True if the object has the given property; otherwise, false.
1832
1934
 
1833
- ##### Returns
1834
1935
 
1835
1936
 
1836
- - an scope structure
1837
1937
 
1938
+ ### dist/general/object/isObject.js
1838
1939
 
1839
1940
 
1840
- #### buildDataset(uFilter)
1941
+ #### isObject(obj)
1841
1942
 
1842
- Gets an dataset structure for the UI filter data
1943
+ Checks if the given argument is an object type
1843
1944
 
1844
1945
 
1845
1946
 
@@ -1848,7 +1949,7 @@ Gets an dataset structure for the UI filter data
1848
1949
 
1849
1950
  | Name | Type | Description | |
1850
1951
  | ---- | ---- | ----------- | -------- |
1851
- | uFilter | | a UI structure filter | &nbsp; |
1952
+ | obj | | the variable to check | &nbsp; |
1852
1953
 
1853
1954
 
1854
1955
 
@@ -1856,13 +1957,18 @@ Gets an dataset structure for the UI filter data
1856
1957
  ##### Returns
1857
1958
 
1858
1959
 
1859
- - an dataset structure
1960
+ - True: It is an object; False: It is not.
1860
1961
 
1861
1962
 
1862
1963
 
1863
- #### buildFilter(uFilter)
1864
1964
 
1865
- Gets an filter structure for the UI filter data
1965
+ ### dist/general/object/mapValues.js
1966
+
1967
+
1968
+ #### mapValues(baseObject, iteratee)
1969
+
1970
+ Invoke iteratee (function) for each object key-value pair
1971
+ and return a mapped object
1866
1972
 
1867
1973
 
1868
1974
 
@@ -1871,7 +1977,8 @@ Gets an filter structure for the UI filter data
1871
1977
 
1872
1978
  | Name | Type | Description | |
1873
1979
  | ---- | ---- | ----------- | -------- |
1874
- | uFilter | | a UI structure filter | &nbsp; |
1980
+ | baseObject | `Object` | Base object. | &nbsp; |
1981
+ | iteratee | `Function` | The executed per iteration. | &nbsp; |
1875
1982
 
1876
1983
 
1877
1984
 
@@ -1879,17 +1986,18 @@ Gets an filter structure for the UI filter data
1879
1986
  ##### Returns
1880
1987
 
1881
1988
 
1882
- - an filter structure
1989
+ - `Object` New mapped object.
1883
1990
 
1884
1991
 
1885
1992
 
1886
1993
 
1887
- ### dist/filters/adapters/logicToFD.js
1994
+ ### dist/general/object/mergeDeep.js
1888
1995
 
1889
1996
 
1890
- #### logicToFD(filterData, version)
1997
+ #### mergeDeep(obj1, obj2, settings)
1891
1998
 
1892
- Generates a filter data structure from the old logic structure (v2.0).
1999
+ Merges two objects into a new one.
2000
+ The second given argument to the first given argument.
1893
2001
 
1894
2002
 
1895
2003
 
@@ -1898,8 +2006,9 @@ Generates a filter data structure from the old logic structure (v2.0).
1898
2006
 
1899
2007
  | Name | Type | Description | |
1900
2008
  | ---- | ---- | ----------- | -------- |
1901
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1902
- | version | | Tag for the version of the filter data structure | &nbsp; |
2009
+ | obj1 | | The target object | &nbsp; |
2010
+ | obj2 | | The object to be merged | &nbsp; |
2011
+ | settings | | Object settings for this function | &nbsp; |
1903
2012
 
1904
2013
 
1905
2014
 
@@ -1907,17 +2016,13 @@ Generates a filter data structure from the old logic structure (v2.0).
1907
2016
  ##### Returns
1908
2017
 
1909
2018
 
1910
- - a Filter Data.
1911
-
1912
-
1913
-
2019
+ - a new merged object
1914
2020
 
1915
- ### dist/filters/adapters/logicToFlatUI.js
1916
2021
 
1917
2022
 
1918
- #### logicToFlatUI(logics)
2023
+ #### isValid(obj1, obj2)
1919
2024
 
1920
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
2025
+ Validates if the two arguments are objects
1921
2026
 
1922
2027
 
1923
2028
 
@@ -1926,7 +2031,8 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1926
2031
 
1927
2032
  | Name | Type | Description | |
1928
2033
  | ---- | ---- | ----------- | -------- |
1929
- | logics | | The old logic structure (v2.0) | &nbsp; |
2034
+ | obj1 | | The target object | &nbsp; |
2035
+ | obj2 | | The object to be merged | &nbsp; |
1930
2036
 
1931
2037
 
1932
2038
 
@@ -1934,13 +2040,13 @@ Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1934
2040
  ##### Returns
1935
2041
 
1936
2042
 
1937
- - The Flattened UI Filters array
2043
+ - true: they are valid; false: they are not
1938
2044
 
1939
2045
 
1940
2046
 
1941
- #### getFilter(filters, filter, getIndex)
2047
+ #### getParamsToMergeDeep(settings)
1942
2048
 
1943
- Get the filter or the index of the given array, validating an old filter structure.
2049
+ Validates and gets the settings with all set parameters.
1944
2050
 
1945
2051
 
1946
2052
 
@@ -1949,23 +2055,25 @@ Get the filter or the index of the given array, validating an old filter structu
1949
2055
 
1950
2056
  | Name | Type | Description | |
1951
2057
  | ---- | ---- | ----------- | -------- |
1952
- | filters | | The array of UI filters | &nbsp; |
1953
- | filter | | The old logic structure filter | &nbsp; |
1954
- | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
2058
+ | settings | | the settings object | &nbsp; |
1955
2059
 
1956
2060
 
1957
2061
 
1958
2062
 
1959
- ##### Returns
2063
+ ##### Returns
2064
+
2065
+
2066
+ - a new settings object with all set parameters.
2067
+
1960
2068
 
1961
2069
 
1962
- - the index or the UI filter object
1963
2070
 
2071
+ ### dist/general/object/objectCopy.js
1964
2072
 
1965
2073
 
1966
- #### refineRankingValues(values, uiValues)
2074
+ #### objectCopy(entity, cache)
1967
2075
 
1968
- Refines the values of the Ranking column type.
2076
+ Created a new reference of the given argument
1969
2077
 
1970
2078
 
1971
2079
 
@@ -1974,8 +2082,8 @@ Refines the values of the Ranking column type.
1974
2082
 
1975
2083
  | Name | Type | Description | |
1976
2084
  | ---- | ---- | ----------- | -------- |
1977
- | values | | the Array of Ranking values | &nbsp; |
1978
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
2085
+ | entity | | The variable to be copied | &nbsp; |
2086
+ | cache | | | &nbsp; |
1979
2087
 
1980
2088
 
1981
2089
 
@@ -1983,17 +2091,17 @@ Refines the values of the Ranking column type.
1983
2091
  ##### Returns
1984
2092
 
1985
2093
 
1986
- - the array of Ranking values
2094
+ - A new reference of the given argument
1987
2095
 
1988
2096
 
1989
2097
 
1990
2098
 
1991
- ### dist/filters/adapters/logicToUI.js
2099
+ ### dist/general/object/omit.js
1992
2100
 
1993
2101
 
1994
- #### logicToUI(uFilters, datasetsInfo)
2102
+ #### omit(obj, props)
1995
2103
 
1996
- Generates a UI filter structure from the old logic structure (v2.0).
2104
+ return a new Object excluding attributes in _props_ list
1997
2105
 
1998
2106
 
1999
2107
 
@@ -2002,8 +2110,8 @@ Generates a UI filter structure from the old logic structure (v2.0).
2002
2110
 
2003
2111
  | Name | Type | Description | |
2004
2112
  | ---- | ---- | ----------- | -------- |
2005
- | uFilters | | Array of filters from old logic structure | &nbsp; |
2006
- | datasetsInfo | | Collection of datasets information | &nbsp; |
2113
+ | obj | `Object` | base object | &nbsp; |
2114
+ | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2007
2115
 
2008
2116
 
2009
2117
 
@@ -2011,17 +2119,17 @@ Generates a UI filter structure from the old logic structure (v2.0).
2011
2119
  ##### Returns
2012
2120
 
2013
2121
 
2014
- - a UI Filter Data.
2122
+ - `Object` clean object
2015
2123
 
2016
2124
 
2017
2125
 
2018
2126
 
2019
- ### dist/filters/adapters/transformFilters.js
2127
+ ### dist/general/object/pick.js
2020
2128
 
2021
2129
 
2022
- #### transformFilters(oldFiltersObj, section)
2130
+ #### pick(baseObject, keys)
2023
2131
 
2024
- Transform the old filters structure into the new one
2132
+ return a new object just with attributes in _keys_ list
2025
2133
 
2026
2134
 
2027
2135
 
@@ -2030,77 +2138,26 @@ Transform the old filters structure into the new one
2030
2138
 
2031
2139
  | Name | Type | Description | |
2032
2140
  | ---- | ---- | ----------- | -------- |
2033
- | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
2034
- | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
2035
-
2036
-
2037
-
2038
-
2039
- ##### Examples
2040
-
2041
- ```javascript
2141
+ | baseObject | `Object` | base object | &nbsp; |
2142
+ | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2042
2143
 
2043
- const oldPreferenceFilters = {
2044
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
2045
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
2046
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
2047
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
2048
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
2049
- "formulaId": null,
2050
- "panelId": null,
2051
- "values": [
2052
- {
2053
- "EQUALS": [
2054
- {
2055
- "id": "AK4M8UV2a0",
2056
- "value": "A",
2057
- "enabled": true,
2058
- "imageUrl": null
2059
- },
2060
- {
2061
- "id": "AK4M8UV2a1",
2062
- "value": "B",
2063
- "enabled": true,
2064
- "imageUrl": null
2065
- }
2066
- ]
2067
- }
2068
- ],
2069
- "bucketId": null,
2070
- "text": "MC",
2071
- "title": "MC",
2072
- "type": "SINGLE_CHOICE",
2073
- "qid": "AK4M8UV2",
2074
- "dataset": {
2075
- "sourceid": "xYOQAdpqT",
2076
- "name": "Form All Questions",
2077
- "qrveyid": "xYOQAdpqT",
2078
- "text": "Form All Questions",
2079
- "linkid": 0
2080
- },
2081
- "enabled": true,
2082
- "linked": null
2083
- }
2084
- };
2085
2144
 
2086
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2087
- ```
2088
2145
 
2089
2146
 
2090
2147
  ##### Returns
2091
2148
 
2092
2149
 
2093
- - `Object` an object with the new filters structure
2150
+ - `Object` new object just with desired attributes
2094
2151
 
2095
2152
 
2096
2153
 
2097
2154
 
2098
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
2155
+ ### dist/general/object/serialize.js
2099
2156
 
2100
2157
 
2101
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
2158
+ #### serialize(obj)
2102
2159
 
2103
- [TODO: Make a proper description for this function]
2160
+ serialize object to url param
2104
2161
 
2105
2162
 
2106
2163
 
@@ -2109,9 +2166,7 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2109
2166
 
2110
2167
  | Name | Type | Description | |
2111
2168
  | ---- | ---- | ----------- | -------- |
2112
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
2113
- | scopes | | | &nbsp; |
2114
- | currentScope | | | &nbsp; |
2169
+ | obj | | - Object to be serialized | &nbsp; |
2115
2170
 
2116
2171
 
2117
2172
 
@@ -2119,17 +2174,17 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
2119
2174
  ##### Returns
2120
2175
 
2121
2176
 
2122
- -
2177
+ - `Void`
2123
2178
 
2124
2179
 
2125
2180
 
2126
2181
 
2127
- ### dist/filters/helpers/getAvailableScopes.js
2182
+ ### dist/general/string/capitalize.js
2128
2183
 
2129
2184
 
2130
- #### getAvailableScopes(config)
2185
+ #### capitalize(text)
2131
2186
 
2132
- Gets Scopes/Scope IDs by given IDs
2187
+ Upper case the first letter of a given text
2133
2188
 
2134
2189
 
2135
2190
 
@@ -2138,7 +2193,7 @@ Gets Scopes/Scope IDs by given IDs
2138
2193
 
2139
2194
  | Name | Type | Description | |
2140
2195
  | ---- | ---- | ----------- | -------- |
2141
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
2196
+ | text | `String` | | &nbsp; |
2142
2197
 
2143
2198
 
2144
2199
 
@@ -2146,17 +2201,17 @@ Gets Scopes/Scope IDs by given IDs
2146
2201
  ##### Returns
2147
2202
 
2148
2203
 
2149
- - a Scopes/Scope IDs array
2204
+ - `String` a capitalized text
2150
2205
 
2151
2206
 
2152
2207
 
2153
2208
 
2154
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
2209
+ ### dist/services/api/getAllDatasets.api.js
2155
2210
 
2156
2211
 
2157
- #### getAvailableScopesIDsByConfig(config)
2212
+ #### getAllDatasets(qrveyids)
2158
2213
 
2159
- Gets the Scopes IDS for the Available Scope function by any config
2214
+ Get a dataset list from a collection of Qrvey IDs
2160
2215
 
2161
2216
 
2162
2217
 
@@ -2165,7 +2220,7 @@ Gets the Scopes IDS for the Available Scope function by any config
2165
2220
 
2166
2221
  | Name | Type | Description | |
2167
2222
  | ---- | ---- | ----------- | -------- |
2168
- | config | | any config | &nbsp; |
2223
+ | qrveyids | | Collection of Qrvey IDs | &nbsp; |
2169
2224
 
2170
2225
 
2171
2226
 
@@ -2173,17 +2228,17 @@ Gets the Scopes IDS for the Available Scope function by any config
2173
2228
  ##### Returns
2174
2229
 
2175
2230
 
2176
- - a Available Scope IDS config
2231
+ - a promise
2177
2232
 
2178
2233
 
2179
2234
 
2180
2235
 
2181
- ### dist/filters/helpers/getScopesByHierarchy.js
2236
+ ### dist/services/api/getAllQrveys.api.js
2182
2237
 
2183
2238
 
2184
- #### getScopesByHierarchy(scopes, currentScope)
2239
+ #### getAllQrveys(config, params)
2185
2240
 
2186
- [TODO: Make a description for this]
2241
+ POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2187
2242
 
2188
2243
 
2189
2244
 
@@ -2192,8 +2247,8 @@ Gets the Scopes IDS for the Available Scope function by any config
2192
2247
 
2193
2248
  | Name | Type | Description | |
2194
2249
  | ---- | ---- | ----------- | -------- |
2195
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
2196
- | currentScope | | Current scope type | &nbsp; |
2250
+ | config | | Configuration | &nbsp; |
2251
+ | params | | Object for getting precise data | &nbsp; |
2197
2252
 
2198
2253
 
2199
2254
 
@@ -2201,17 +2256,17 @@ Gets the Scopes IDS for the Available Scope function by any config
2201
2256
  ##### Returns
2202
2257
 
2203
2258
 
2204
- - A new array of Scopes/Scope IDs
2259
+ - `Void`
2205
2260
 
2206
2261
 
2207
2262
 
2208
2263
 
2209
- ### dist/qrvey/helpers/getColumnsLabel.js
2264
+ ### dist/services/api/getDatasetColumns.api.js
2210
2265
 
2211
2266
 
2212
- #### getColumnLabels(column)
2267
+ #### getDatasetColumns(qrveyid)
2213
2268
 
2214
- Get an string of the properties of the given column.
2269
+ Get a dataset by Qrvey ID
2215
2270
 
2216
2271
 
2217
2272
 
@@ -2220,7 +2275,7 @@ Get an string of the properties of the given column.
2220
2275
 
2221
2276
  | Name | Type | Description | |
2222
2277
  | ---- | ---- | ----------- | -------- |
2223
- | column | | The column | &nbsp; |
2278
+ | qrveyid | | The Qrvey ID | &nbsp; |
2224
2279
 
2225
2280
 
2226
2281
 
@@ -2228,7 +2283,7 @@ Get an string of the properties of the given column.
2228
2283
  ##### Returns
2229
2284
 
2230
2285
 
2231
- - an string with the property, aggregate or calculation label.
2286
+ - a promise
2232
2287
 
2233
2288
 
2234
2289
 
@@ -2317,67 +2372,12 @@ try to find this string as a variable on Windows object
2317
2372
 
2318
2373
 
2319
2374
 
2320
- ### dist/services/api/getAllDatasets.api.js
2321
-
2322
-
2323
- #### getAllDatasets(qrveyids)
2324
-
2325
- Get a dataset list from a collection of Qrvey IDs
2326
-
2327
-
2328
-
2329
-
2330
- ##### Parameters
2331
-
2332
- | Name | Type | Description | |
2333
- | ---- | ---- | ----------- | -------- |
2334
- | qrveyids | | Collection of Qrvey IDs | &nbsp; |
2335
-
2336
-
2337
-
2338
-
2339
- ##### Returns
2340
-
2341
-
2342
- - a promise
2343
-
2344
-
2345
-
2346
-
2347
- ### dist/services/api/getAllQrveys.api.js
2348
-
2349
-
2350
- #### getAllQrveys(config, params)
2351
-
2352
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2353
-
2354
-
2355
-
2356
-
2357
- ##### Parameters
2358
-
2359
- | Name | Type | Description | |
2360
- | ---- | ---- | ----------- | -------- |
2361
- | config | | Configuration | &nbsp; |
2362
- | params | | Object for getting precise data | &nbsp; |
2363
-
2364
-
2365
-
2366
-
2367
- ##### Returns
2368
-
2369
-
2370
- - `Void`
2371
-
2372
-
2373
-
2374
-
2375
- ### dist/services/api/getDatasetColumns.api.js
2375
+ ### dist/qrvey/helpers/getColumnsLabel.js
2376
2376
 
2377
2377
 
2378
- #### getDatasetColumns(qrveyid)
2378
+ #### getColumnLabels(column)
2379
2379
 
2380
- Get a dataset by Qrvey ID
2380
+ Get an string of the properties of the given column.
2381
2381
 
2382
2382
 
2383
2383
 
@@ -2386,7 +2386,7 @@ Get a dataset by Qrvey ID
2386
2386
 
2387
2387
  | Name | Type | Description | |
2388
2388
  | ---- | ---- | ----------- | -------- |
2389
- | qrveyid | | The Qrvey ID | &nbsp; |
2389
+ | column | | The column | &nbsp; |
2390
2390
 
2391
2391
 
2392
2392
 
@@ -2394,7 +2394,7 @@ Get a dataset by Qrvey ID
2394
2394
  ##### Returns
2395
2395
 
2396
2396
 
2397
- - a promise
2397
+ - an string with the property, aggregate or calculation label.
2398
2398
 
2399
2399
 
2400
2400
 
@@ -2535,12 +2535,13 @@ Parses a string date and returns a dayjs date
2535
2535
 
2536
2536
 
2537
2537
 
2538
- ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
2538
+ ### dist/filters/helpers/backend/buildExpression.js
2539
2539
 
2540
2540
 
2541
- #### getFilterBuilderGeneralConfig(config)
2541
+ #### buildExpression(filter)
2542
2542
 
2543
- Returns a filter builder config object by a any given config
2543
+ Builds filter expression by the filter data.
2544
+ - If the resulting value array is empty the enabled property will be false.
2544
2545
 
2545
2546
 
2546
2547
 
@@ -2549,7 +2550,7 @@ Returns a filter builder config object by a any given config
2549
2550
 
2550
2551
  | Name | Type | Description | |
2551
2552
  | ---- | ---- | ----------- | -------- |
2552
- | config | | any config object | &nbsp; |
2553
+ | filter | | The filter to transform | &nbsp; |
2553
2554
 
2554
2555
 
2555
2556
 
@@ -2557,17 +2558,17 @@ Returns a filter builder config object by a any given config
2557
2558
  ##### Returns
2558
2559
 
2559
2560
 
2560
- - The filter builder config object
2561
+ - a filter expression
2561
2562
 
2562
2563
 
2563
2564
 
2564
2565
 
2565
- ### dist/filters/helpers/common/areFiltersEquals.js
2566
+ ### dist/filters/helpers/backend/buildUserFilters.js
2566
2567
 
2567
2568
 
2568
- #### areFiltersEquals(filter1, filter2)
2569
+ #### buildUserFilters(userFilters)
2569
2570
 
2570
- Validates if both filters are the same
2571
+ Transform user Filters array into Filter Logic structure
2571
2572
 
2572
2573
 
2573
2574
 
@@ -2576,8 +2577,7 @@ Validates if both filters are the same
2576
2577
 
2577
2578
  | Name | Type | Description | |
2578
2579
  | ---- | ---- | ----------- | -------- |
2579
- | filter1 | | filter 1 | &nbsp; |
2580
- | filter2 | | filter 2 | &nbsp; |
2580
+ | userFilters | | The filters that the user defined. | &nbsp; |
2581
2581
 
2582
2582
 
2583
2583
 
@@ -2585,17 +2585,17 @@ Validates if both filters are the same
2585
2585
  ##### Returns
2586
2586
 
2587
2587
 
2588
- - true: the filters are equal; false: the filters are NOT equal
2588
+ - The filter logic for the given user filters. if No a given object is recieved, it will return an empty array.
2589
2589
 
2590
2590
 
2591
2591
 
2592
2592
 
2593
- ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
2593
+ ### dist/filters/helpers/backend/getAggFiltersBySummaryIndex.js
2594
2594
 
2595
2595
 
2596
- #### excludeFiltersByAggregateColumn(filterData)
2596
+ #### getAggFiltersBySummaryIndex(aggFilters, summaryIndex)
2597
+
2597
2598
 
2598
- Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
2599
2599
 
2600
2600
 
2601
2601
 
@@ -2604,7 +2604,8 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
2604
2604
 
2605
2605
  | Name | Type | Description | |
2606
2606
  | ---- | ---- | ----------- | -------- |
2607
- | filterData | | The filter data object | &nbsp; |
2607
+ | aggFilters | | | &nbsp; |
2608
+ | summaryIndex | | | &nbsp; |
2608
2609
 
2609
2610
 
2610
2611
 
@@ -2612,26 +2613,17 @@ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column
2612
2613
  ##### Returns
2613
2614
 
2614
2615
 
2615
- - The new filter data object that were excluded the aggregate filters
2616
-
2617
-
2616
+ -
2618
2617
 
2619
2618
 
2620
- ### dist/filters/helpers/common/excludeFiltersByParams.js
2621
2619
 
2622
2620
 
2623
- #### excludeFiltersByParams(filterData, params)
2621
+ ### dist/filters/helpers/backend/getBackendGroupValue.js
2624
2622
 
2625
- Excludes filters from the given Filters.
2626
- The validation to filter the stored filter is depending on:
2627
- - Column
2628
- - Qrvey ID
2629
- - Scope type
2630
- - Scope ID
2631
- - Panel ID
2632
- - Validator type
2633
- - Property type
2634
- - Enabled flags
2623
+
2624
+ #### getBackendGroupValue(filter)
2625
+
2626
+ Gets a group value for the backend logic structure
2635
2627
 
2636
2628
 
2637
2629
 
@@ -2640,8 +2632,7 @@ The validation to filter the stored filter is depending on:
2640
2632
 
2641
2633
  | Name | Type | Description | |
2642
2634
  | ---- | ---- | ----------- | -------- |
2643
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
2644
- | params | | given parameters to validate the filter data | &nbsp; |
2635
+ | filter | | The filter | &nbsp; |
2645
2636
 
2646
2637
 
2647
2638
 
@@ -2649,17 +2640,17 @@ The validation to filter the stored filter is depending on:
2649
2640
  ##### Returns
2650
2641
 
2651
2642
 
2652
- - a new Filter object structure
2643
+ - a property
2653
2644
 
2654
2645
 
2655
2646
 
2656
2647
 
2657
- ### dist/filters/helpers/common/excludeFiltersByScopes.js
2648
+ ### dist/filters/helpers/backend/getBackendProperty.js
2658
2649
 
2659
2650
 
2660
- #### excludeFiltersByScopes(filterData, scopes)
2651
+ #### getBackendProperty(filter)
2661
2652
 
2662
- Excludes and returns a filter data without filters by the given scopes
2653
+ Gets a property for the logic structure
2663
2654
 
2664
2655
 
2665
2656
 
@@ -2668,8 +2659,7 @@ Excludes and returns a filter data without filters by the given scopes
2668
2659
 
2669
2660
  | Name | Type | Description | |
2670
2661
  | ---- | ---- | ----------- | -------- |
2671
- | filterData | | The Filter Data | &nbsp; |
2672
- | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
2662
+ | filter | | The filter | &nbsp; |
2673
2663
 
2674
2664
 
2675
2665
 
@@ -2677,17 +2667,17 @@ Excludes and returns a filter data without filters by the given scopes
2677
2667
  ##### Returns
2678
2668
 
2679
2669
 
2680
- - The new Filter Data without filters by the given scopes.
2670
+ - a property
2681
2671
 
2682
2672
 
2683
2673
 
2684
2674
 
2685
- ### dist/filters/helpers/common/getFilterColumnLabel.js
2675
+ ### dist/filters/helpers/backend/getBackendValidator.js
2686
2676
 
2687
2677
 
2688
- #### getFilterColumnLabel(column)
2678
+ #### getBackendValidator(validator)
2689
2679
 
2690
- Get an string of the properties of the given filter column.
2680
+ Gets the Validator that is used in requests
2691
2681
 
2692
2682
 
2693
2683
 
@@ -2696,7 +2686,7 @@ Get an string of the properties of the given filter column.
2696
2686
 
2697
2687
  | Name | Type | Description | |
2698
2688
  | ---- | ---- | ----------- | -------- |
2699
- | column | | The filter column | &nbsp; |
2689
+ | validator | | Filter Validator used in UI | &nbsp; |
2700
2690
 
2701
2691
 
2702
2692
 
@@ -2704,17 +2694,17 @@ Get an string of the properties of the given filter column.
2704
2694
  ##### Returns
2705
2695
 
2706
2696
 
2707
- - an string with the property, aggregate or calculation label.
2697
+ - Filter Validator used in Backend
2708
2698
 
2709
2699
 
2710
2700
 
2711
2701
 
2712
- ### dist/filters/helpers/common/getFilterLabel.js
2702
+ ### dist/filters/helpers/backend/getBackendValues.js
2713
2703
 
2714
2704
 
2715
- #### getFilterLabel(filter)
2705
+ #### getBackendValues(filter)
2716
2706
 
2717
- Gets the Filter Label + Column label
2707
+ Gets the expresion values in the logic format
2718
2708
 
2719
2709
 
2720
2710
 
@@ -2723,7 +2713,7 @@ Gets the Filter Label + Column label
2723
2713
 
2724
2714
  | Name | Type | Description | |
2725
2715
  | ---- | ---- | ----------- | -------- |
2726
- | filter | | the UI filter | &nbsp; |
2716
+ | filter | | The filter structure | &nbsp; |
2727
2717
 
2728
2718
 
2729
2719
 
@@ -2731,28 +2721,13 @@ Gets the Filter Label + Column label
2731
2721
  ##### Returns
2732
2722
 
2733
2723
 
2734
- - a sring label
2735
-
2736
-
2737
-
2724
+ - A collection of backend expression value
2738
2725
 
2739
- ### dist/filters/helpers/common/getFilterid.js
2740
2726
 
2741
2727
 
2742
- #### getFilterid(filter)
2728
+ #### getResultValues(values, filter)
2743
2729
 
2744
- Get the Filter ID by the filter structure
2745
- The order of the epression ID is:
2746
- - Scope Type
2747
- - scopeid
2748
- - qrveyid
2749
- - panelid
2750
- - columnid
2751
- - validator
2752
- - property
2753
- - Column Aggregate
2754
- - Column Calculation
2755
- - Optional Index
2730
+ Gets the expression values. Depending on the column type
2756
2731
 
2757
2732
 
2758
2733
 
@@ -2761,7 +2736,8 @@ The order of the epression ID is:
2761
2736
 
2762
2737
  | Name | Type | Description | |
2763
2738
  | ---- | ---- | ----------- | -------- |
2764
- | filter | | the filter structure | &nbsp; |
2739
+ | values | | a collection of filter values | &nbsp; |
2740
+ | filter | | The filter structure | &nbsp; |
2765
2741
 
2766
2742
 
2767
2743
 
@@ -2769,17 +2745,13 @@ The order of the epression ID is:
2769
2745
  ##### Returns
2770
2746
 
2771
2747
 
2772
- - a text to identify the filter
2773
-
2774
-
2775
-
2748
+ -
2776
2749
 
2777
- ### dist/filters/helpers/common/getFiltersByAggregateColumn.js
2778
2750
 
2779
2751
 
2780
- #### getFiltersByAggregateColumn(filterData)
2752
+ #### getRankingValues(values, rankingGroupIndex)
2781
2753
 
2782
- Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggregate is included.
2754
+ Gets the Ranking values.
2783
2755
 
2784
2756
 
2785
2757
 
@@ -2788,7 +2760,8 @@ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggr
2788
2760
 
2789
2761
  | Name | Type | Description | |
2790
2762
  | ---- | ---- | ----------- | -------- |
2791
- | filterData | | The filter data object | &nbsp; |
2763
+ | values | | a collection of filter values in the ranking structure | &nbsp; |
2764
+ | rankingGroupIndex | | determine the value by this index to build and return it | &nbsp; |
2792
2765
 
2793
2766
 
2794
2767
 
@@ -2796,26 +2769,17 @@ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggr
2796
2769
  ##### Returns
2797
2770
 
2798
2771
 
2799
- - The new filter data object that were get the aggregate filters
2772
+ - Expression values for ranking
2800
2773
 
2801
2774
 
2802
2775
 
2803
2776
 
2804
- ### dist/filters/helpers/common/getFiltersByParams.js
2777
+ ### dist/filters/helpers/backend/getLogicByScopes.js
2805
2778
 
2806
2779
 
2807
- #### getFiltersByParams(filterData, params)
2780
+ #### getLogicByScopes(logics, scopes)
2808
2781
 
2809
- Gets filters from the given params.
2810
- The validation to filter the stored filter is depending on:
2811
- - Column
2812
- - Qrvey ID
2813
- - Scope type
2814
- - Scope ID
2815
- - Panel ID
2816
- - Validator type
2817
- - Property type
2818
- - Enabled flags
2782
+ Gets the filters from logic data by Scopes/Scope IDs.
2819
2783
 
2820
2784
 
2821
2785
 
@@ -2824,8 +2788,8 @@ The validation to filter the stored filter is depending on:
2824
2788
 
2825
2789
  | Name | Type | Description | |
2826
2790
  | ---- | ---- | ----------- | -------- |
2827
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
2828
- | params | | given parameters to validate the dataset | &nbsp; |
2791
+ | logics | | The logic array | &nbsp; |
2792
+ | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
2829
2793
 
2830
2794
 
2831
2795
 
@@ -2833,17 +2797,17 @@ The validation to filter the stored filter is depending on:
2833
2797
  ##### Returns
2834
2798
 
2835
2799
 
2836
- - a new Filter object structure
2800
+ - a new Logic array
2837
2801
 
2838
2802
 
2839
2803
 
2840
2804
 
2841
- ### dist/filters/helpers/common/getFiltersByScopes.js
2805
+ ### dist/filters/helpers/backend/getLogicByScopesHierarchy.js
2842
2806
 
2843
2807
 
2844
- #### getFiltersByScopes(filterData, scopes)
2808
+ #### getLogicByScopesHierarchy(filterData, scopes, currentScope)
2845
2809
 
2846
- Filters and gets a Filter Data by the given scopes
2810
+ Gets filters from the logic by the scopes hierarchy.
2847
2811
 
2848
2812
 
2849
2813
 
@@ -2852,8 +2816,9 @@ Filters and gets a Filter Data by the given scopes
2852
2816
 
2853
2817
  | Name | Type | Description | |
2854
2818
  | ---- | ---- | ----------- | -------- |
2855
- | filterData | | The Filter Data | &nbsp; |
2856
- | scopes | | collection of scopes types | &nbsp; |
2819
+ | filterData | | | &nbsp; |
2820
+ | scopes | | | &nbsp; |
2821
+ | currentScope | | | &nbsp; |
2857
2822
 
2858
2823
 
2859
2824
 
@@ -2861,17 +2826,17 @@ Filters and gets a Filter Data by the given scopes
2861
2826
  ##### Returns
2862
2827
 
2863
2828
 
2864
- - The new Filter Data
2829
+ - a new array of Logic
2865
2830
 
2866
2831
 
2867
2832
 
2868
2833
 
2869
- ### dist/filters/helpers/common/getFiltersByScopesIds.js
2834
+ ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
2870
2835
 
2871
2836
 
2872
- #### getFiltersByScopesIds(filterData, scopes)
2837
+ #### getFilterBuilderGeneralConfig(config)
2873
2838
 
2874
- Gets filters from Filter Data by Scopes/Scope IDs.
2839
+ Returns a filter builder config object by a any given config
2875
2840
 
2876
2841
 
2877
2842
 
@@ -2880,8 +2845,7 @@ Gets filters from Filter Data by Scopes/Scope IDs.
2880
2845
 
2881
2846
  | Name | Type | Description | |
2882
2847
  | ---- | ---- | ----------- | -------- |
2883
- | filterData | | The filter data | &nbsp; |
2884
- | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
2848
+ | config | | any config object | &nbsp; |
2885
2849
 
2886
2850
 
2887
2851
 
@@ -2889,17 +2853,17 @@ Gets filters from Filter Data by Scopes/Scope IDs.
2889
2853
  ##### Returns
2890
2854
 
2891
2855
 
2892
- - a new Filter Data
2856
+ - The filter builder config object
2893
2857
 
2894
2858
 
2895
2859
 
2896
2860
 
2897
- ### dist/filters/helpers/common/getFiltersByVisibility.js
2861
+ ### dist/filters/helpers/common/areFiltersEquals.js
2898
2862
 
2899
2863
 
2900
- #### getFiltersByVisibility(filterData, scopes)
2864
+ #### areFiltersEquals(filter1, filter2)
2901
2865
 
2902
- Get a new Filter Data by filtering scopes/scope IDs and enabled flags
2866
+ Validates if both filters are the same
2903
2867
 
2904
2868
 
2905
2869
 
@@ -2908,8 +2872,8 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
2908
2872
 
2909
2873
  | Name | Type | Description | |
2910
2874
  | ---- | ---- | ----------- | -------- |
2911
- | filterData | | a Filter Data or UI Filter Data | &nbsp; |
2912
- | scopes | | a Scopes/Scope IDs array | &nbsp; |
2875
+ | filter1 | | filter 1 | &nbsp; |
2876
+ | filter2 | | filter 2 | &nbsp; |
2913
2877
 
2914
2878
 
2915
2879
 
@@ -2917,17 +2881,17 @@ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
2917
2881
  ##### Returns
2918
2882
 
2919
2883
 
2920
- - a new Filter Data
2884
+ - true: the filters are equal; false: the filters are NOT equal
2921
2885
 
2922
2886
 
2923
2887
 
2924
2888
 
2925
- ### dist/filters/helpers/common/getMergeFiltersSettings.js
2889
+ ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
2926
2890
 
2927
2891
 
2928
- #### getMergeFiltersSettings(settings)
2892
+ #### excludeFiltersByAggregateColumn(filterData)
2929
2893
 
2930
- Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
2894
+ Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
2931
2895
 
2932
2896
 
2933
2897
 
@@ -2936,7 +2900,7 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
2936
2900
 
2937
2901
  | Name | Type | Description | |
2938
2902
  | ---- | ---- | ----------- | -------- |
2939
- | settings | | an object to the MergeFilters settings | &nbsp; |
2903
+ | filterData | | The filter data object | &nbsp; |
2940
2904
 
2941
2905
 
2942
2906
 
@@ -2944,17 +2908,26 @@ Transforms the given MergeFilters settings object. Adds the missing properties i
2944
2908
  ##### Returns
2945
2909
 
2946
2910
 
2947
- - a new MergeFilters settings object.
2911
+ - The new filter data object that were excluded the aggregate filters
2948
2912
 
2949
2913
 
2950
2914
 
2951
2915
 
2952
- ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
2916
+ ### dist/filters/helpers/common/excludeFiltersByParams.js
2953
2917
 
2954
2918
 
2955
- #### getParamsToGetFilterSettings(settings)
2919
+ #### excludeFiltersByParams(filterData, params)
2956
2920
 
2957
- Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
2921
+ Excludes filters from the given Filters.
2922
+ The validation to filter the stored filter is depending on:
2923
+ - Column
2924
+ - Qrvey ID
2925
+ - Scope type
2926
+ - Scope ID
2927
+ - Panel ID
2928
+ - Validator type
2929
+ - Property type
2930
+ - Enabled flags
2958
2931
 
2959
2932
 
2960
2933
 
@@ -2963,7 +2936,8 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
2963
2936
 
2964
2937
  | Name | Type | Description | |
2965
2938
  | ---- | ---- | ----------- | -------- |
2966
- | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
2939
+ | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
2940
+ | params | | given parameters to validate the filter data | &nbsp; |
2967
2941
 
2968
2942
 
2969
2943
 
@@ -2971,17 +2945,17 @@ Transforms the given ParamsToGetFilter settings object. Adds the missing propert
2971
2945
  ##### Returns
2972
2946
 
2973
2947
 
2974
- - a new ParamsToGetFilter settings object.
2948
+ - a new Filter object structure
2975
2949
 
2976
2950
 
2977
2951
 
2978
2952
 
2979
- ### dist/filters/helpers/common/haveFiltersByDataset.js
2953
+ ### dist/filters/helpers/common/excludeFiltersByScopes.js
2980
2954
 
2981
2955
 
2982
- #### haveFiltersByDataset(filterData, qrveyid)
2956
+ #### excludeFiltersByScopes(filterData, scopes)
2983
2957
 
2984
- Validates if the filter data has filters by a dataset ID (Qrvey ID).
2958
+ Excludes and returns a filter data without filters by the given scopes
2985
2959
 
2986
2960
 
2987
2961
 
@@ -2990,8 +2964,8 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
2990
2964
 
2991
2965
  | Name | Type | Description | |
2992
2966
  | ---- | ---- | ----------- | -------- |
2993
- | filterData | | the filter data or the UI filter data. | &nbsp; |
2994
- | qrveyid | | The Qrvey ID | &nbsp; |
2967
+ | filterData | | The Filter Data | &nbsp; |
2968
+ | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
2995
2969
 
2996
2970
 
2997
2971
 
@@ -2999,17 +2973,17 @@ Validates if the filter data has filters by a dataset ID (Qrvey ID).
2999
2973
  ##### Returns
3000
2974
 
3001
2975
 
3002
- - true: the filter data has filters by the Qrvey ID
2976
+ - The new Filter Data without filters by the given scopes.
3003
2977
 
3004
2978
 
3005
2979
 
3006
2980
 
3007
- ### dist/filters/helpers/common/isBetweenValidator.js
2981
+ ### dist/filters/helpers/common/getFilterColumnLabel.js
3008
2982
 
3009
2983
 
3010
- #### isBetweenValidator(validator)
2984
+ #### getFilterColumnLabel(column)
3011
2985
 
3012
- Validates if the given validator is a Between type
2986
+ Get an string of the properties of the given filter column.
3013
2987
 
3014
2988
 
3015
2989
 
@@ -3018,7 +2992,7 @@ Validates if the given validator is a Between type
3018
2992
 
3019
2993
  | Name | Type | Description | |
3020
2994
  | ---- | ---- | ----------- | -------- |
3021
- | validator | | The validator | &nbsp; |
2995
+ | column | | The filter column | &nbsp; |
3022
2996
 
3023
2997
 
3024
2998
 
@@ -3026,17 +3000,17 @@ Validates if the given validator is a Between type
3026
3000
  ##### Returns
3027
3001
 
3028
3002
 
3029
- - true: it is a between validator; false: it is not a between validator
3003
+ - an string with the property, aggregate or calculation label.
3030
3004
 
3031
3005
 
3032
3006
 
3033
3007
 
3034
- ### dist/filters/helpers/common/isDateDistinctProperty.js
3008
+ ### dist/filters/helpers/common/getFilterLabel.js
3035
3009
 
3036
3010
 
3037
- #### isDateDistinctProperty(column, property)
3011
+ #### getFilterLabel(filter)
3038
3012
 
3039
- Determines if the filter column and property is a distinct group dates type
3013
+ Gets the Filter Label + Column label
3040
3014
 
3041
3015
 
3042
3016
 
@@ -3045,8 +3019,7 @@ Determines if the filter column and property is a distinct group dates type
3045
3019
 
3046
3020
  | Name | Type | Description | |
3047
3021
  | ---- | ---- | ----------- | -------- |
3048
- | column | | The filter column | &nbsp; |
3049
- | property | | The filter property | &nbsp; |
3022
+ | filter | | the UI filter | &nbsp; |
3050
3023
 
3051
3024
 
3052
3025
 
@@ -3054,17 +3027,28 @@ Determines if the filter column and property is a distinct group dates type
3054
3027
  ##### Returns
3055
3028
 
3056
3029
 
3057
- - True if the given property is included from distinct group dates type
3030
+ - a sring label
3058
3031
 
3059
3032
 
3060
3033
 
3061
3034
 
3062
- ### dist/filters/helpers/common/isInValidator.js
3035
+ ### dist/filters/helpers/common/getFilterid.js
3063
3036
 
3064
3037
 
3065
- #### isInValidator(validator)
3038
+ #### getFilterid(filter)
3066
3039
 
3067
- Validates if the given validator is a In type
3040
+ Get the Filter ID by the filter structure
3041
+ The order of the epression ID is:
3042
+ - Scope Type
3043
+ - scopeid
3044
+ - qrveyid
3045
+ - panelid
3046
+ - columnid
3047
+ - validator
3048
+ - property
3049
+ - Column Aggregate
3050
+ - Column Calculation
3051
+ - Optional Index
3068
3052
 
3069
3053
 
3070
3054
 
@@ -3073,7 +3057,7 @@ Validates if the given validator is a In type
3073
3057
 
3074
3058
  | Name | Type | Description | |
3075
3059
  | ---- | ---- | ----------- | -------- |
3076
- | validator | | The validator | &nbsp; |
3060
+ | filter | | the filter structure | &nbsp; |
3077
3061
 
3078
3062
 
3079
3063
 
@@ -3081,17 +3065,17 @@ Validates if the given validator is a In type
3081
3065
  ##### Returns
3082
3066
 
3083
3067
 
3084
- - true: it is a In validator; false: it is not a In validator
3068
+ - a text to identify the filter
3085
3069
 
3086
3070
 
3087
3071
 
3088
3072
 
3089
- ### dist/filters/helpers/common/isNullValidator.js
3073
+ ### dist/filters/helpers/common/getFiltersByAggregateColumn.js
3090
3074
 
3091
3075
 
3092
- #### isNullValidator(validator)
3076
+ #### getFiltersByAggregateColumn(filterData)
3093
3077
 
3094
- Checks if the given validator is a Null type.
3078
+ Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggregate is included.
3095
3079
 
3096
3080
 
3097
3081
 
@@ -3100,7 +3084,7 @@ Checks if the given validator is a Null type.
3100
3084
 
3101
3085
  | Name | Type | Description | |
3102
3086
  | ---- | ---- | ----------- | -------- |
3103
- | validator | | The Filter Validator | &nbsp; |
3087
+ | filterData | | The filter data object | &nbsp; |
3104
3088
 
3105
3089
 
3106
3090
 
@@ -3108,17 +3092,26 @@ Checks if the given validator is a Null type.
3108
3092
  ##### Returns
3109
3093
 
3110
3094
 
3111
- - True: It is a Null Validator; False: It is not a Null Validator.
3095
+ - The new filter data object that were get the aggregate filters
3112
3096
 
3113
3097
 
3114
3098
 
3115
3099
 
3116
- ### dist/filters/helpers/common/isRangeValidator.js
3100
+ ### dist/filters/helpers/common/getFiltersByParams.js
3117
3101
 
3118
3102
 
3119
- #### isRangeValidator(validator)
3103
+ #### getFiltersByParams(filterData, params)
3120
3104
 
3121
- Validates if the given validator is a Range type. Range type means the value has min and max values to filter
3105
+ Gets filters from the given params.
3106
+ The validation to filter the stored filter is depending on:
3107
+ - Column
3108
+ - Qrvey ID
3109
+ - Scope type
3110
+ - Scope ID
3111
+ - Panel ID
3112
+ - Validator type
3113
+ - Property type
3114
+ - Enabled flags
3122
3115
 
3123
3116
 
3124
3117
 
@@ -3127,7 +3120,8 @@ Validates if the given validator is a Range type. Range type means the value has
3127
3120
 
3128
3121
  | Name | Type | Description | |
3129
3122
  | ---- | ---- | ----------- | -------- |
3130
- | validator | | The filter validator | &nbsp; |
3123
+ | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3124
+ | params | | given parameters to validate the dataset | &nbsp; |
3131
3125
 
3132
3126
 
3133
3127
 
@@ -3135,17 +3129,17 @@ Validates if the given validator is a Range type. Range type means the value has
3135
3129
  ##### Returns
3136
3130
 
3137
3131
 
3138
- - true: it is a range validator
3132
+ - a new Filter object structure
3139
3133
 
3140
3134
 
3141
3135
 
3142
3136
 
3143
- ### dist/filters/helpers/common/isRegularValidator.js
3137
+ ### dist/filters/helpers/common/getFiltersByScopes.js
3144
3138
 
3145
3139
 
3146
- #### isRegularValidator(validator)
3140
+ #### getFiltersByScopes(filterData, scopes)
3147
3141
 
3148
- Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
3142
+ Filters and gets a Filter Data by the given scopes
3149
3143
 
3150
3144
 
3151
3145
 
@@ -3154,7 +3148,8 @@ Validates if the given validator is a regular type. Regular type means the filte
3154
3148
 
3155
3149
  | Name | Type | Description | |
3156
3150
  | ---- | ---- | ----------- | -------- |
3157
- | validator | | The filter validator | &nbsp; |
3151
+ | filterData | | The Filter Data | &nbsp; |
3152
+ | scopes | | collection of scopes types | &nbsp; |
3158
3153
 
3159
3154
 
3160
3155
 
@@ -3162,17 +3157,17 @@ Validates if the given validator is a regular type. Regular type means the filte
3162
3157
  ##### Returns
3163
3158
 
3164
3159
 
3165
- - true: it is a range validator
3160
+ - The new Filter Data
3166
3161
 
3167
3162
 
3168
3163
 
3169
3164
 
3170
- ### dist/filters/helpers/common/mergeFilters.js
3165
+ ### dist/filters/helpers/common/getFiltersByScopesIds.js
3171
3166
 
3172
3167
 
3173
- #### mergeFilters(filterData1, filterData2, overwriteValues)
3168
+ #### getFiltersByScopesIds(filterData, scopes)
3174
3169
 
3175
- Merge filter data structures in a new one. The first Filter Data passed in the argument has the priority
3170
+ Gets filters from Filter Data by Scopes/Scope IDs.
3176
3171
 
3177
3172
 
3178
3173
 
@@ -3181,9 +3176,8 @@ Merge filter data structures in a new one. The first Filter Data passed in the a
3181
3176
 
3182
3177
  | Name | Type | Description | |
3183
3178
  | ---- | ---- | ----------- | -------- |
3184
- | filterData1 | | The target filter data | &nbsp; |
3185
- | filterData2 | | the filter data to be merged | &nbsp; |
3186
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3179
+ | filterData | | The filter data | &nbsp; |
3180
+ | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3187
3181
 
3188
3182
 
3189
3183
 
@@ -3191,13 +3185,17 @@ Merge filter data structures in a new one. The first Filter Data passed in the a
3191
3185
  ##### Returns
3192
3186
 
3193
3187
 
3194
- - a new filter data structure
3188
+ - a new Filter Data
3195
3189
 
3196
3190
 
3197
3191
 
3198
- #### mergeScopes(scopes1, scopes2, overwriteValues)
3199
3192
 
3200
- Gets a new scope structure array by merging two scope structures
3193
+ ### dist/filters/helpers/common/getFiltersByVisibility.js
3194
+
3195
+
3196
+ #### getFiltersByVisibility(filterData, scopes)
3197
+
3198
+ Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3201
3199
 
3202
3200
 
3203
3201
 
@@ -3206,9 +3204,8 @@ Gets a new scope structure array by merging two scope structures
3206
3204
 
3207
3205
  | Name | Type | Description | |
3208
3206
  | ---- | ---- | ----------- | -------- |
3209
- | scopes1 | | the target scope structure | &nbsp; |
3210
- | scopes2 | | the scope to be merged | &nbsp; |
3211
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3207
+ | filterData | | a Filter Data or UI Filter Data | &nbsp; |
3208
+ | scopes | | a Scopes/Scope IDs array | &nbsp; |
3212
3209
 
3213
3210
 
3214
3211
 
@@ -3216,13 +3213,17 @@ Gets a new scope structure array by merging two scope structures
3216
3213
  ##### Returns
3217
3214
 
3218
3215
 
3219
- - a new scope structure array
3216
+ - a new Filter Data
3220
3217
 
3221
3218
 
3222
3219
 
3223
- #### mergeDatasets(datasets1, datasets2, overwriteValues)
3224
3220
 
3225
- Gets a new dataset structure array by merging two dataset structures
3221
+ ### dist/filters/helpers/common/getMergeFiltersSettings.js
3222
+
3223
+
3224
+ #### getMergeFiltersSettings(settings)
3225
+
3226
+ Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
3226
3227
 
3227
3228
 
3228
3229
 
@@ -3231,9 +3232,7 @@ Gets a new dataset structure array by merging two dataset structures
3231
3232
 
3232
3233
  | Name | Type | Description | |
3233
3234
  | ---- | ---- | ----------- | -------- |
3234
- | datasets1 | | the target dataset structure | &nbsp; |
3235
- | datasets2 | | the dataset to be merged | &nbsp; |
3236
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3235
+ | settings | | an object to the MergeFilters settings | &nbsp; |
3237
3236
 
3238
3237
 
3239
3238
 
@@ -3241,13 +3240,17 @@ Gets a new dataset structure array by merging two dataset structures
3241
3240
  ##### Returns
3242
3241
 
3243
3242
 
3244
- - a new dataset structure array
3243
+ - a new MergeFilters settings object.
3245
3244
 
3246
3245
 
3247
3246
 
3248
- #### mergeFilterss(filters1, filters2, overwriteValues)
3249
3247
 
3250
- Gets a new filter structure array by merging two filter structures
3248
+ ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3249
+
3250
+
3251
+ #### getParamsToGetFilterSettings(settings)
3252
+
3253
+ Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3251
3254
 
3252
3255
 
3253
3256
 
@@ -3256,9 +3259,7 @@ Gets a new filter structure array by merging two filter structures
3256
3259
 
3257
3260
  | Name | Type | Description | |
3258
3261
  | ---- | ---- | ----------- | -------- |
3259
- | filters1 | | the target filter structure | &nbsp; |
3260
- | filters2 | | the filter to be merged | &nbsp; |
3261
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3262
+ | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
3262
3263
 
3263
3264
 
3264
3265
 
@@ -3266,13 +3267,17 @@ Gets a new filter structure array by merging two filter structures
3266
3267
  ##### Returns
3267
3268
 
3268
3269
 
3269
- - a new filter structure array
3270
+ - a new ParamsToGetFilter settings object.
3270
3271
 
3271
3272
 
3272
3273
 
3273
- #### mergeValues(filter1, filter2, overwrite)
3274
3274
 
3275
- Gets a new value structure array by merging two value structures
3275
+ ### dist/filters/helpers/common/haveFiltersByDataset.js
3276
+
3277
+
3278
+ #### haveFiltersByDataset(filterData, qrveyid)
3279
+
3280
+ Validates if the filter data has filters by a dataset ID (Qrvey ID).
3276
3281
 
3277
3282
 
3278
3283
 
@@ -3281,9 +3286,8 @@ Gets a new value structure array by merging two value structures
3281
3286
 
3282
3287
  | Name | Type | Description | |
3283
3288
  | ---- | ---- | ----------- | -------- |
3284
- | filter1 | | the target filter structure | &nbsp; |
3285
- | filter2 | | the filter to be used to merge the values | &nbsp; |
3286
- | overwrite | | Flag to overwrite or not the filter values | &nbsp; |
3289
+ | filterData | | the filter data or the UI filter data. | &nbsp; |
3290
+ | qrveyid | | The Qrvey ID | &nbsp; |
3287
3291
 
3288
3292
 
3289
3293
 
@@ -3291,17 +3295,17 @@ Gets a new value structure array by merging two value structures
3291
3295
  ##### Returns
3292
3296
 
3293
3297
 
3294
- - a new value structure array
3298
+ - true: the filter data has filters by the Qrvey ID
3295
3299
 
3296
3300
 
3297
3301
 
3298
3302
 
3299
- ### dist/filters/helpers/common/resolveDatasetConditions.js
3303
+ ### dist/filters/helpers/common/isBetweenValidator.js
3300
3304
 
3301
3305
 
3302
- #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3306
+ #### isBetweenValidator(validator)
3303
3307
 
3304
- Resolves the conditions by given params
3308
+ Validates if the given validator is a Between type
3305
3309
 
3306
3310
 
3307
3311
 
@@ -3310,10 +3314,7 @@ Resolves the conditions by given params
3310
3314
 
3311
3315
  | Name | Type | Description | |
3312
3316
  | ---- | ---- | ----------- | -------- |
3313
- | filter | | The dataset structure | &nbsp; |
3314
- | params | | given parameters to validate the dataset | &nbsp; |
3315
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3316
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3317
+ | validator | | The validator | &nbsp; |
3317
3318
 
3318
3319
 
3319
3320
 
@@ -3321,17 +3322,17 @@ Resolves the conditions by given params
3321
3322
  ##### Returns
3322
3323
 
3323
3324
 
3324
- - true: the condition is satisfied
3325
+ - true: it is a between validator; false: it is not a between validator
3325
3326
 
3326
3327
 
3327
3328
 
3328
3329
 
3329
- ### dist/filters/helpers/common/resolveFilterConditions.js
3330
+ ### dist/filters/helpers/common/isDateDistinctProperty.js
3330
3331
 
3331
3332
 
3332
- #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3333
+ #### isDateDistinctProperty(column, property)
3333
3334
 
3334
- Resolves the conditions by given params
3335
+ Determines if the filter column and property is a distinct group dates type
3335
3336
 
3336
3337
 
3337
3338
 
@@ -3340,10 +3341,8 @@ Resolves the conditions by given params
3340
3341
 
3341
3342
  | Name | Type | Description | |
3342
3343
  | ---- | ---- | ----------- | -------- |
3343
- | filter | | The filter | &nbsp; |
3344
- | params | | given parameters to validate the filter | &nbsp; |
3345
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3346
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3344
+ | column | | The filter column | &nbsp; |
3345
+ | property | | The filter property | &nbsp; |
3347
3346
 
3348
3347
 
3349
3348
 
@@ -3351,17 +3350,17 @@ Resolves the conditions by given params
3351
3350
  ##### Returns
3352
3351
 
3353
3352
 
3354
- - true: the condition is satisfied
3353
+ - True if the given property is included from distinct group dates type
3355
3354
 
3356
3355
 
3357
3356
 
3358
3357
 
3359
- ### dist/filters/helpers/common/resolveScopeConditions.js
3358
+ ### dist/filters/helpers/common/isInValidator.js
3360
3359
 
3361
3360
 
3362
- #### resolveScopeConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3361
+ #### isInValidator(validator)
3363
3362
 
3364
- Resolves the conditions by given params
3363
+ Validates if the given validator is a In type
3365
3364
 
3366
3365
 
3367
3366
 
@@ -3370,10 +3369,7 @@ Resolves the conditions by given params
3370
3369
 
3371
3370
  | Name | Type | Description | |
3372
3371
  | ---- | ---- | ----------- | -------- |
3373
- | filter | | The filter scope structure | &nbsp; |
3374
- | params | | given parameters to validate the filter | &nbsp; |
3375
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3376
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3372
+ | validator | | The validator | &nbsp; |
3377
3373
 
3378
3374
 
3379
3375
 
@@ -3381,18 +3377,17 @@ Resolves the conditions by given params
3381
3377
  ##### Returns
3382
3378
 
3383
3379
 
3384
- - true: the condition is satisfied
3380
+ - true: it is a In validator; false: it is not a In validator
3385
3381
 
3386
3382
 
3387
3383
 
3388
3384
 
3389
- ### dist/filters/helpers/backend/buildExpression.js
3385
+ ### dist/filters/helpers/common/isNullValidator.js
3390
3386
 
3391
3387
 
3392
- #### buildExpression(filter)
3388
+ #### isNullValidator(validator)
3393
3389
 
3394
- Builds filter expression by the filter data.
3395
- - If the resulting value array is empty the enabled property will be false.
3390
+ Checks if the given validator is a Null type.
3396
3391
 
3397
3392
 
3398
3393
 
@@ -3401,7 +3396,7 @@ Builds filter expression by the filter data.
3401
3396
 
3402
3397
  | Name | Type | Description | |
3403
3398
  | ---- | ---- | ----------- | -------- |
3404
- | filter | | The filter to transform | &nbsp; |
3399
+ | validator | | The Filter Validator | &nbsp; |
3405
3400
 
3406
3401
 
3407
3402
 
@@ -3409,17 +3404,17 @@ Builds filter expression by the filter data.
3409
3404
  ##### Returns
3410
3405
 
3411
3406
 
3412
- - a filter expression
3407
+ - True: It is a Null Validator; False: It is not a Null Validator.
3413
3408
 
3414
3409
 
3415
3410
 
3416
3411
 
3417
- ### dist/filters/helpers/backend/buildUserFilters.js
3412
+ ### dist/filters/helpers/common/isRangeValidator.js
3418
3413
 
3419
3414
 
3420
- #### buildUserFilters(userFilters)
3415
+ #### isRangeValidator(validator)
3421
3416
 
3422
- Transform user Filters array into Filter Logic structure
3417
+ Validates if the given validator is a Range type. Range type means the value has min and max values to filter
3423
3418
 
3424
3419
 
3425
3420
 
@@ -3428,7 +3423,7 @@ Transform user Filters array into Filter Logic structure
3428
3423
 
3429
3424
  | Name | Type | Description | |
3430
3425
  | ---- | ---- | ----------- | -------- |
3431
- | userFilters | | The filters that the user defined. | &nbsp; |
3426
+ | validator | | The filter validator | &nbsp; |
3432
3427
 
3433
3428
 
3434
3429
 
@@ -3436,17 +3431,17 @@ Transform user Filters array into Filter Logic structure
3436
3431
  ##### Returns
3437
3432
 
3438
3433
 
3439
- - The filter logic for the given user filters. if No a given object is recieved, it will return an empty array.
3440
-
3434
+ - true: it is a range validator
3441
3435
 
3442
3436
 
3443
3437
 
3444
- ### dist/filters/helpers/backend/getAggFiltersBySummaryIndex.js
3445
3438
 
3439
+ ### dist/filters/helpers/common/isRegularValidator.js
3446
3440
 
3447
- #### getAggFiltersBySummaryIndex(aggFilters, summaryIndex)
3448
3441
 
3442
+ #### isRegularValidator(validator)
3449
3443
 
3444
+ Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
3450
3445
 
3451
3446
 
3452
3447
 
@@ -3455,8 +3450,7 @@ Transform user Filters array into Filter Logic structure
3455
3450
 
3456
3451
  | Name | Type | Description | |
3457
3452
  | ---- | ---- | ----------- | -------- |
3458
- | aggFilters | | | &nbsp; |
3459
- | summaryIndex | | | &nbsp; |
3453
+ | validator | | The filter validator | &nbsp; |
3460
3454
 
3461
3455
 
3462
3456
 
@@ -3464,17 +3458,17 @@ Transform user Filters array into Filter Logic structure
3464
3458
  ##### Returns
3465
3459
 
3466
3460
 
3467
- -
3461
+ - true: it is a range validator
3468
3462
 
3469
3463
 
3470
3464
 
3471
3465
 
3472
- ### dist/filters/helpers/backend/getBackendGroupValue.js
3466
+ ### dist/filters/helpers/common/mergeFilters.js
3473
3467
 
3474
3468
 
3475
- #### getBackendGroupValue(filter)
3469
+ #### mergeFilters(filterData1, filterData2, overwriteValues)
3476
3470
 
3477
- Gets a group value for the backend logic structure
3471
+ Merge filter data structures in a new one. The first Filter Data passed in the argument has the priority
3478
3472
 
3479
3473
 
3480
3474
 
@@ -3483,7 +3477,9 @@ Gets a group value for the backend logic structure
3483
3477
 
3484
3478
  | Name | Type | Description | |
3485
3479
  | ---- | ---- | ----------- | -------- |
3486
- | filter | | The filter | &nbsp; |
3480
+ | filterData1 | | The target filter data | &nbsp; |
3481
+ | filterData2 | | the filter data to be merged | &nbsp; |
3482
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3487
3483
 
3488
3484
 
3489
3485
 
@@ -3491,17 +3487,13 @@ Gets a group value for the backend logic structure
3491
3487
  ##### Returns
3492
3488
 
3493
3489
 
3494
- - a property
3495
-
3496
-
3497
-
3490
+ - a new filter data structure
3498
3491
 
3499
- ### dist/filters/helpers/backend/getBackendProperty.js
3500
3492
 
3501
3493
 
3502
- #### getBackendProperty(filter)
3494
+ #### mergeScopes(scopes1, scopes2, overwriteValues)
3503
3495
 
3504
- Gets a property for the logic structure
3496
+ Gets a new scope structure array by merging two scope structures
3505
3497
 
3506
3498
 
3507
3499
 
@@ -3510,7 +3502,9 @@ Gets a property for the logic structure
3510
3502
 
3511
3503
  | Name | Type | Description | |
3512
3504
  | ---- | ---- | ----------- | -------- |
3513
- | filter | | The filter | &nbsp; |
3505
+ | scopes1 | | the target scope structure | &nbsp; |
3506
+ | scopes2 | | the scope to be merged | &nbsp; |
3507
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3514
3508
 
3515
3509
 
3516
3510
 
@@ -3518,17 +3512,13 @@ Gets a property for the logic structure
3518
3512
  ##### Returns
3519
3513
 
3520
3514
 
3521
- - a property
3522
-
3523
-
3524
-
3515
+ - a new scope structure array
3525
3516
 
3526
- ### dist/filters/helpers/backend/getBackendValidator.js
3527
3517
 
3528
3518
 
3529
- #### getBackendValidator(validator)
3519
+ #### mergeDatasets(datasets1, datasets2, overwriteValues)
3530
3520
 
3531
- Gets the Validator that is used in requests
3521
+ Gets a new dataset structure array by merging two dataset structures
3532
3522
 
3533
3523
 
3534
3524
 
@@ -3537,7 +3527,9 @@ Gets the Validator that is used in requests
3537
3527
 
3538
3528
  | Name | Type | Description | |
3539
3529
  | ---- | ---- | ----------- | -------- |
3540
- | validator | | Filter Validator used in UI | &nbsp; |
3530
+ | datasets1 | | the target dataset structure | &nbsp; |
3531
+ | datasets2 | | the dataset to be merged | &nbsp; |
3532
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3541
3533
 
3542
3534
 
3543
3535
 
@@ -3545,17 +3537,13 @@ Gets the Validator that is used in requests
3545
3537
  ##### Returns
3546
3538
 
3547
3539
 
3548
- - Filter Validator used in Backend
3549
-
3550
-
3551
-
3540
+ - a new dataset structure array
3552
3541
 
3553
- ### dist/filters/helpers/backend/getBackendValues.js
3554
3542
 
3555
3543
 
3556
- #### getBackendValues(filter)
3544
+ #### mergeFilterss(filters1, filters2, overwriteValues)
3557
3545
 
3558
- Gets the expresion values in the logic format
3546
+ Gets a new filter structure array by merging two filter structures
3559
3547
 
3560
3548
 
3561
3549
 
@@ -3564,7 +3552,9 @@ Gets the expresion values in the logic format
3564
3552
 
3565
3553
  | Name | Type | Description | |
3566
3554
  | ---- | ---- | ----------- | -------- |
3567
- | filter | | The filter structure | &nbsp; |
3555
+ | filters1 | | the target filter structure | &nbsp; |
3556
+ | filters2 | | the filter to be merged | &nbsp; |
3557
+ | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3568
3558
 
3569
3559
 
3570
3560
 
@@ -3572,13 +3562,13 @@ Gets the expresion values in the logic format
3572
3562
  ##### Returns
3573
3563
 
3574
3564
 
3575
- - A collection of backend expression value
3565
+ - a new filter structure array
3576
3566
 
3577
3567
 
3578
3568
 
3579
- #### getResultValues(values, filter)
3569
+ #### mergeValues(filter1, filter2, overwrite)
3580
3570
 
3581
- Gets the expression values. Depending on the column type
3571
+ Gets a new value structure array by merging two value structures
3582
3572
 
3583
3573
 
3584
3574
 
@@ -3587,8 +3577,9 @@ Gets the expression values. Depending on the column type
3587
3577
 
3588
3578
  | Name | Type | Description | |
3589
3579
  | ---- | ---- | ----------- | -------- |
3590
- | values | | a collection of filter values | &nbsp; |
3591
- | filter | | The filter structure | &nbsp; |
3580
+ | filter1 | | the target filter structure | &nbsp; |
3581
+ | filter2 | | the filter to be used to merge the values | &nbsp; |
3582
+ | overwrite | | Flag to overwrite or not the filter values | &nbsp; |
3592
3583
 
3593
3584
 
3594
3585
 
@@ -3596,13 +3587,17 @@ Gets the expression values. Depending on the column type
3596
3587
  ##### Returns
3597
3588
 
3598
3589
 
3599
- -
3590
+ - a new value structure array
3600
3591
 
3601
3592
 
3602
3593
 
3603
- #### getRankingValues(values, rankingGroupIndex)
3604
3594
 
3605
- Gets the Ranking values.
3595
+ ### dist/filters/helpers/common/resolveDatasetConditions.js
3596
+
3597
+
3598
+ #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3599
+
3600
+ Resolves the conditions by given params
3606
3601
 
3607
3602
 
3608
3603
 
@@ -3611,8 +3606,10 @@ Gets the Ranking values.
3611
3606
 
3612
3607
  | Name | Type | Description | |
3613
3608
  | ---- | ---- | ----------- | -------- |
3614
- | values | | a collection of filter values in the ranking structure | &nbsp; |
3615
- | rankingGroupIndex | | determine the value by this index to build and return it | &nbsp; |
3609
+ | filter | | The dataset structure | &nbsp; |
3610
+ | params | | given parameters to validate the dataset | &nbsp; |
3611
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3612
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3616
3613
 
3617
3614
 
3618
3615
 
@@ -3620,17 +3617,17 @@ Gets the Ranking values.
3620
3617
  ##### Returns
3621
3618
 
3622
3619
 
3623
- - Expression values for ranking
3620
+ - true: the condition is satisfied
3624
3621
 
3625
3622
 
3626
3623
 
3627
3624
 
3628
- ### dist/filters/helpers/backend/getLogicByScopes.js
3625
+ ### dist/filters/helpers/common/resolveFilterConditions.js
3629
3626
 
3630
3627
 
3631
- #### getLogicByScopes(logics, scopes)
3628
+ #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3632
3629
 
3633
- Gets the filters from logic data by Scopes/Scope IDs.
3630
+ Resolves the conditions by given params
3634
3631
 
3635
3632
 
3636
3633
 
@@ -3639,8 +3636,10 @@ Gets the filters from logic data by Scopes/Scope IDs.
3639
3636
 
3640
3637
  | Name | Type | Description | |
3641
3638
  | ---- | ---- | ----------- | -------- |
3642
- | logics | | The logic array | &nbsp; |
3643
- | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3639
+ | filter | | The filter | &nbsp; |
3640
+ | params | | given parameters to validate the filter | &nbsp; |
3641
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3642
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3644
3643
 
3645
3644
 
3646
3645
 
@@ -3648,17 +3647,17 @@ Gets the filters from logic data by Scopes/Scope IDs.
3648
3647
  ##### Returns
3649
3648
 
3650
3649
 
3651
- - a new Logic array
3650
+ - true: the condition is satisfied
3652
3651
 
3653
3652
 
3654
3653
 
3655
3654
 
3656
- ### dist/filters/helpers/backend/getLogicByScopesHierarchy.js
3655
+ ### dist/filters/helpers/common/resolveScopeConditions.js
3657
3656
 
3658
3657
 
3659
- #### getLogicByScopesHierarchy(filterData, scopes, currentScope)
3658
+ #### resolveScopeConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
3660
3659
 
3661
- Gets filters from the logic by the scopes hierarchy.
3660
+ Resolves the conditions by given params
3662
3661
 
3663
3662
 
3664
3663
 
@@ -3667,9 +3666,10 @@ Gets filters from the logic by the scopes hierarchy.
3667
3666
 
3668
3667
  | Name | Type | Description | |
3669
3668
  | ---- | ---- | ----------- | -------- |
3670
- | filterData | | | &nbsp; |
3671
- | scopes | | | &nbsp; |
3672
- | currentScope | | | &nbsp; |
3669
+ | filter | | The filter scope structure | &nbsp; |
3670
+ | params | | given parameters to validate the filter | &nbsp; |
3671
+ | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
3672
+ | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
3673
3673
 
3674
3674
 
3675
3675
 
@@ -3677,7 +3677,7 @@ Gets filters from the logic by the scopes hierarchy.
3677
3677
  ##### Returns
3678
3678
 
3679
3679
 
3680
- - a new array of Logic
3680
+ - true: the condition is satisfied
3681
3681
 
3682
3682
 
3683
3683