@qrvey/utils 1.2.9-31 → 1.2.9-32

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,4483 +0,0 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-31*
2
-
3
- > Helper, Utils for all Qrvey Projects
4
-
5
-
6
- ### dist/format/format.js
7
-
8
-
9
- #### isValidDateString(bytes)
10
-
11
- Apply to the given date format to a date value
12
-
13
-
14
-
15
-
16
- ##### Parameters
17
-
18
- | Name | Type | Description | |
19
- | ---- | ---- | ----------- | -------- |
20
- | bytes | | type number |   |
21
-
22
-
23
-
24
-
25
- ##### Returns
26
-
27
-
28
- - `Void`
29
-
30
-
31
-
32
- #### formatFileSize(bytes)
33
-
34
- Set convert Bytes into MB
35
-
36
-
37
-
38
-
39
- ##### Parameters
40
-
41
- | Name | Type | Description | |
42
- | ---- | ---- | ----------- | -------- |
43
- | bytes | | type number |   |
44
-
45
-
46
-
47
-
48
- ##### Returns
49
-
50
-
51
- - `Void`
52
-
53
-
54
-
55
-
56
- ### dist/tokens/isTokenLabel.js
57
-
58
-
59
- #### isTokenLabel(label)
60
-
61
- Get a text and evaluate if it matchs with a token box label.
62
-
63
-
64
-
65
-
66
- ##### Parameters
67
-
68
- | Name | Type | Description | |
69
- | ---- | ---- | ----------- | -------- |
70
- | label | | string to evaluate |   |
71
-
72
-
73
-
74
-
75
- ##### Returns
76
-
77
-
78
- - True is label matchs; otherwise false
79
-
80
-
81
-
82
-
83
- ### dist/dates/adapters/mdyDateToDate.js
84
-
85
-
86
- #### mdyDateToDate(monthYearDate, time)
87
-
88
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
89
-
90
-
91
-
92
-
93
- ##### Parameters
94
-
95
- | Name | Type | Description | |
96
- | ---- | ---- | ----------- | -------- |
97
- | monthYearDate | | String of [mm/dd/yyyy] date |   |
98
- | time | | Flag to parse the object date to milliseconds. |   |
99
-
100
-
101
-
102
-
103
- ##### Returns
104
-
105
-
106
- - The date object or the date in milliseconds
107
-
108
-
109
-
110
-
111
- ### dist/dates/adapters/monthYearToDate.js
112
-
113
-
114
- #### monthYearToDate(monthYearDate, time)
115
-
116
- Transforms String Date from a [Month Year] format to Date object.
117
-
118
-
119
-
120
-
121
- ##### Parameters
122
-
123
- | Name | Type | Description | |
124
- | ---- | ---- | ----------- | -------- |
125
- | monthYearDate | | String of [Month Year] date |   |
126
- | time | | Flag to parse the object date to milliseconds. |   |
127
-
128
-
129
-
130
-
131
- ##### Returns
132
-
133
-
134
- - The date object or the date in milliseconds
135
-
136
-
137
-
138
-
139
- ### dist/dates/adapters/quarterYearToDate.js
140
-
141
-
142
- #### quarterYearToDate(quarterYearDate, time)
143
-
144
- Transforms String Date from a [Quarter Year] format to Date object.
145
-
146
-
147
-
148
-
149
- ##### Parameters
150
-
151
- | Name | Type | Description | |
152
- | ---- | ---- | ----------- | -------- |
153
- | quarterYearDate | | String of [Quarter Year] date |   |
154
- | time | | Flag to parse the object date to milliseconds. |   |
155
-
156
-
157
-
158
-
159
- ##### Returns
160
-
161
-
162
- - The date object or the date in milliseconds
163
-
164
-
165
-
166
-
167
- ### dist/dates/adapters/weekYearToDate.js
168
-
169
-
170
- #### weekYearToDate(date, time)
171
-
172
- Transforms String Date from a [Week Year] format to Date object.
173
-
174
-
175
-
176
-
177
- ##### Parameters
178
-
179
- | Name | Type | Description | |
180
- | ---- | ---- | ----------- | -------- |
181
- | date | | String of [Week Year] date |   |
182
- | time | | Flag to parse the object date to milliseconds. |   |
183
-
184
-
185
-
186
-
187
- ##### Returns
188
-
189
-
190
- - The date object or the date in milliseconds
191
-
192
-
193
-
194
-
195
- ### dist/dates/adapters/yearToDate.js
196
-
197
-
198
- #### yearToDate(yearDate, time)
199
-
200
- Transforms String Date from a [Year] format to Date object.
201
-
202
-
203
-
204
-
205
- ##### Parameters
206
-
207
- | Name | Type | Description | |
208
- | ---- | ---- | ----------- | -------- |
209
- | yearDate | | String of [Year] date |   |
210
- | time | | Flag to parse the object date to milliseconds. |   |
211
-
212
-
213
-
214
-
215
- ##### Returns
216
-
217
-
218
- - The date object or the date in milliseconds
219
-
220
-
221
-
222
-
223
- ### dist/dates/helpers/getDateByDateFormat.js
224
-
225
-
226
- #### getDateByDateFormat(date, format, time)
227
-
228
- Gets a Date Object instance by a Date format
229
-
230
-
231
-
232
-
233
- ##### Parameters
234
-
235
- | Name | Type | Description | |
236
- | ---- | ---- | ----------- | -------- |
237
- | date | | String with a formatted date |   |
238
- | format | | The date format |   |
239
- | time | | flag to convert the formatted date to miliseconds |   |
240
-
241
-
242
-
243
-
244
- ##### Returns
245
-
246
-
247
- - a Date object, milisecond time or the same value if date format does not match.
248
-
249
-
250
-
251
-
252
- ### dist/dates/helpers/getDateFormatByProperty.js
253
-
254
-
255
- #### getDateFormatByProperty(property)
256
-
257
- Gets the date format by the given property
258
-
259
-
260
-
261
-
262
- ##### Parameters
263
-
264
- | Name | Type | Description | |
265
- | ---- | ---- | ----------- | -------- |
266
- | property | | The Column Property |   |
267
-
268
-
269
-
270
-
271
- ##### Returns
272
-
273
-
274
- - The date format
275
-
276
-
277
-
278
-
279
- ### dist/dates/helpers/getDateFormatRegularExpressionInArray.js
280
-
281
-
282
- #### getDateFormatRegularExpressionInArray(dateFormat)
283
-
284
- Gets an array of regular expressions by the given date format
285
-
286
-
287
-
288
-
289
- ##### Parameters
290
-
291
- | Name | Type | Description | |
292
- | ---- | ---- | ----------- | -------- |
293
- | dateFormat | | the date format |   |
294
-
295
-
296
-
297
-
298
- ##### Returns
299
-
300
-
301
- - an array of regular expressions
302
-
303
-
304
-
305
-
306
- ### dist/dates/helpers/getSeparatorByDateFormat.js
307
-
308
-
309
- #### getSeparatorByDateFormat(format)
310
-
311
- Gets the separator of the date format
312
-
313
-
314
-
315
-
316
- ##### Parameters
317
-
318
- | Name | Type | Description | |
319
- | ---- | ---- | ----------- | -------- |
320
- | format | | the date format |   |
321
-
322
-
323
-
324
-
325
- ##### Returns
326
-
327
-
328
- - a separator string
329
-
330
-
331
-
332
-
333
- ### dist/dates/helpers/getWeek.js
334
-
335
-
336
- #### getWeek(date)
337
-
338
- Gets the week number of the year
339
- Additionally, the month and the year
340
-
341
-
342
-
343
-
344
- ##### Parameters
345
-
346
- | Name | Type | Description | |
347
- | ---- | ---- | ----------- | -------- |
348
- | date | | the date object |   |
349
-
350
-
351
-
352
-
353
- ##### Returns
354
-
355
-
356
- - an object with the week, month and year.
357
-
358
-
359
-
360
-
361
- ### dist/dates/helpers/validateDate.js
362
-
363
-
364
- #### validateDate(date, format)
365
-
366
- Validate a string date depending on giving format
367
- - If the string is a token label, the function lets it pass.
368
- - Otherwise depends of the format
369
- - Some escenarios the string is a mix of token labels and dates
370
-
371
-
372
-
373
-
374
- ##### Parameters
375
-
376
- | Name | Type | Description | |
377
- | ---- | ---- | ----------- | -------- |
378
- | date | | String of date |   |
379
- | format | | String of the format to validate |   |
380
-
381
-
382
-
383
-
384
- ##### Returns
385
-
386
-
387
- - True if it is valid or not. Undefined if date is undefined
388
-
389
-
390
-
391
-
392
- ### dist/dates/helpers/validateDateByDateFormat.js
393
-
394
-
395
- #### validateDateByDateFormat(date, dateForma)
396
-
397
- Validates the given string as Date by its date format.
398
-
399
-
400
-
401
-
402
- ##### Parameters
403
-
404
- | Name | Type | Description | |
405
- | ---- | ---- | ----------- | -------- |
406
- | date | | a string to validate as date form |   |
407
- | dateForma | | the format of the date to validate the string |   |
408
-
409
-
410
-
411
-
412
- ##### Returns
413
-
414
-
415
- - true: the string is a valida date
416
-
417
-
418
-
419
-
420
- ### dist/dates/relative/Adapter.js
421
-
422
-
423
- #### value()
424
-
425
- Resolves statement and returns statement value
426
-
427
-
428
-
429
-
430
-
431
-
432
- ##### Returns
433
-
434
-
435
- - `AbsoluteRange` `string`
436
-
437
-
438
-
439
- #### valueAsAnchor()
440
-
441
- Resolves statement as an anchor
442
-
443
-
444
-
445
-
446
-
447
-
448
- ##### Returns
449
-
450
-
451
- - `string`
452
-
453
-
454
-
455
- #### _statementToRange() *private method*
456
-
457
- Convert verbal statement to range value
458
-
459
-
460
-
461
-
462
-
463
-
464
- ##### Returns
465
-
466
-
467
- - `AbsoluteRange`
468
-
469
-
470
-
471
- #### _resolveAsThis() *private method*
472
-
473
- Apply 'this' cursor logic to statement
474
-
475
-
476
-
477
-
478
-
479
-
480
- ##### Returns
481
-
482
-
483
- - `AbsoluteStatement`
484
-
485
-
486
-
487
- #### _resolveAsTheLast() *private method*
488
-
489
- Apply 'the last' cursor logic to statement
490
-
491
-
492
-
493
-
494
-
495
-
496
- ##### Returns
497
-
498
-
499
- - `AbsoluteStatement`
500
-
501
-
502
-
503
- #### _resolveAsTheNext() *private method*
504
-
505
- Apply 'the next' cursor logic to statement
506
-
507
-
508
-
509
-
510
-
511
-
512
- ##### Returns
513
-
514
-
515
- - `AbsoluteStatement`
516
-
517
-
518
-
519
- #### replaceNowToken(value, now)
520
-
521
- Replace '@now' token inside a string
522
-
523
-
524
-
525
-
526
- ##### Parameters
527
-
528
- | Name | Type | Description | |
529
- | ---- | ---- | ----------- | -------- |
530
- | value | `string` | |   |
531
- | now | `Date` | |   |
532
-
533
-
534
-
535
-
536
- ##### Returns
537
-
538
-
539
- - `string`
540
-
541
-
542
-
543
- #### convertRelativeToAbsolute(args)
544
-
545
- Returns a range object (date) from a group of statement params
546
-
547
-
548
-
549
-
550
- ##### Parameters
551
-
552
- | Name | Type | Description | |
553
- | ---- | ---- | ----------- | -------- |
554
- | args | `RelativeToAbsoluteStruct` | |   |
555
-
556
-
557
-
558
-
559
- ##### Examples
560
-
561
- ```javascript
562
- pivot = '2021-03-03T12:30:40'
563
- unit = month
564
- steps = 2
565
- setTo = END
566
- resolverAsCalendar: true
567
- => Returns '2021-05-31T23:59:59'
568
- ```
569
- ```javascript
570
- pivot = '2021-03-03T12:30:40'
571
- unit = month
572
- steps = -2
573
- setTo = START
574
- resolverAsCalendar: false
575
- => Returns '2021-01-03T00:00:00'
576
- ```
577
-
578
-
579
- ##### Returns
580
-
581
-
582
- - `string`
583
-
584
-
585
-
586
-
587
- ### dist/dates/relative/relative.js
588
-
589
-
590
- #### resolveRelative(statements, clock)
591
-
592
- Resolve a list of relative statements according to operator
593
-
594
-
595
-
596
-
597
- ##### Parameters
598
-
599
- | Name | Type | Description | |
600
- | ---- | ---- | ----------- | -------- |
601
- | statements | `Array.<RelativeStatement>` `Array.<string>` | - Raw statements/values | &nbsp; |
602
- | clock | `Date` | - Clock/time reference for relative date resolution | &nbsp; |
603
-
604
-
605
-
606
-
607
- ##### Examples
608
-
609
- ```javascript
610
- Input:
611
- {
612
- "cursor": "the_next",
613
- "unit": "year",
614
- "number": 1,
615
- "includeCurrent": false,
616
- "isCalendarDate": false,
617
- "anchor": "03/05/2021"
618
- }
619
-
620
- Output:
621
- { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
622
- ```
623
-
624
-
625
- ##### Returns
626
-
627
-
628
- - `Array.&lt;AbsoluteRange&gt;` `Array.&lt;string&gt;`
629
-
630
-
631
-
632
-
633
- ### dist/dates/range/getDateRange.js
634
-
635
-
636
- #### getDateRange(value, dateGroupLabel, withTime)
637
-
638
- Get date range object from a string date value
639
-
640
-
641
-
642
-
643
- ##### Parameters
644
-
645
- | Name | Type | Description | |
646
- | ---- | ---- | ----------- | -------- |
647
- | value | `String` | string date value | &nbsp; |
648
- | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' | &nbsp; |
649
- | withTime | `Boolean` | determines if the date range will include time. Default is true | &nbsp; |
650
-
651
-
652
-
653
-
654
- ##### Examples
655
-
656
- ```javascript
657
- // 1) Year:
658
- getDateRange('2020', 'YEAR');
659
- // Will return:
660
- {
661
- from: '01/01/2020 00:00:00',
662
- to: '12/31/2020 23:59:59'
663
- }
664
-
665
- // 2) Quarter:
666
- getDateRange('Q3 2020', 'QUARTER');
667
- // Will return:
668
- {
669
- from: '07/01/2020 00:00:00',
670
- to: '09/30/2020 23:59:59'
671
- }
672
-
673
- // 3) Month:
674
- getDateRange('Oct 2020', 'MONTH');
675
- // Will return:
676
- {
677
- from: '10/01/2020 00:00:00',
678
- to: '10/31/2020 23:59:59'
679
- }
680
- ```
681
-
682
-
683
- ##### Returns
684
-
685
-
686
- - `Object` an object with the date range with two string date properties: from and to
687
-
688
-
689
-
690
-
691
- ### dist/filters/adapters/FDToFlatUI.js
692
-
693
-
694
- #### FDToFlatUI(filterData, datasetsInfo)
695
-
696
- Generates a Flattened UI filter structure from Filter Data structure.
697
-
698
-
699
-
700
-
701
- ##### Parameters
702
-
703
- | Name | Type | Description | |
704
- | ---- | ---- | ----------- | -------- |
705
- | filterData | | The filter data object. | &nbsp; |
706
- | datasetsInfo | | Collection of datasets information | &nbsp; |
707
-
708
-
709
-
710
-
711
- ##### Returns
712
-
713
-
714
- - a flattened UI filters array
715
-
716
-
717
-
718
- #### FD21ToFlatUI(scopes, datasetsInfo)
719
-
720
- Generates a Filter Builder Structure from the Filter Data structure v2.1
721
-
722
-
723
-
724
-
725
- ##### Parameters
726
-
727
- | Name | Type | Description | |
728
- | ---- | ---- | ----------- | -------- |
729
- | scopes | | The filter scope section | &nbsp; |
730
- | datasetsInfo | | Collection of datasets information | &nbsp; |
731
-
732
-
733
-
734
-
735
- ##### Returns
736
-
737
-
738
- - a flattened UI filters array
739
-
740
-
741
-
742
-
743
- ### dist/filters/adapters/FDToLogic.js
744
-
745
-
746
- #### FDToLogic(filterData)
747
-
748
- Generates a Filter Logic structure from Filter Data structure.
749
-
750
-
751
-
752
-
753
- ##### Parameters
754
-
755
- | Name | Type | Description | |
756
- | ---- | ---- | ----------- | -------- |
757
- | filterData | | The filter data object. | &nbsp; |
758
-
759
-
760
-
761
-
762
- ##### Returns
763
-
764
-
765
- - a filter logic array
766
-
767
-
768
-
769
- #### getLogicBodyFromFD21(filterData)
770
-
771
- Gets the logic body
772
-
773
-
774
-
775
-
776
- ##### Parameters
777
-
778
- | Name | Type | Description | |
779
- | ---- | ---- | ----------- | -------- |
780
- | filterData | | The filter data object | &nbsp; |
781
-
782
-
783
-
784
-
785
- ##### Returns
786
-
787
-
788
- - a filter logic array
789
-
790
-
791
-
792
-
793
- ### dist/filters/adapters/FDToUI.js
794
-
795
-
796
- #### FDToUI(filterData, datasetsInfo)
797
-
798
- Generates a UI filter structure from Filter Data structure.
799
-
800
-
801
-
802
-
803
- ##### Parameters
804
-
805
- | Name | Type | Description | |
806
- | ---- | ---- | ----------- | -------- |
807
- | filterData | | The filter data object. | &nbsp; |
808
- | datasetsInfo | | Collection of datasets information | &nbsp; |
809
-
810
-
811
-
812
-
813
- ##### Returns
814
-
815
-
816
- - a UI Filters structure
817
-
818
-
819
-
820
- #### FD21ToUI(scopes, section, version, datasetsInfo)
821
-
822
- Generates a UI filter Structure from the Filter Data structure v2.1
823
-
824
-
825
-
826
-
827
- ##### Parameters
828
-
829
- | Name | Type | Description | |
830
- | ---- | ---- | ----------- | -------- |
831
- | scopes | | The filter scope section | &nbsp; |
832
- | section | | The filter section. | &nbsp; |
833
- | version | | The version of the filter structure | &nbsp; |
834
- | datasetsInfo | | Collection of datasets information | &nbsp; |
835
-
836
-
837
-
838
-
839
- ##### Returns
840
-
841
-
842
- - a UI filter Structure
843
-
844
-
845
-
846
-
847
- ### dist/filters/adapters/UIToFD.js
848
-
849
-
850
- #### UIToFD(filterData)
851
-
852
- Generates a Filter Data Structure structure from UI Filter Data structure.
853
-
854
-
855
-
856
-
857
- ##### Parameters
858
-
859
- | Name | Type | Description | |
860
- | ---- | ---- | ----------- | -------- |
861
- | filterData | | The UI filter data object. | &nbsp; |
862
-
863
-
864
-
865
-
866
- ##### Returns
867
-
868
-
869
- - a Filter Data structure
870
-
871
-
872
-
873
- #### UI21ToFD(uFilterData, version)
874
-
875
- Builds the Fitler Data structure from UI filter data
876
-
877
-
878
-
879
-
880
- ##### Parameters
881
-
882
- | Name | Type | Description | |
883
- | ---- | ---- | ----------- | -------- |
884
- | uFilterData | | The UI filter Data object | &nbsp; |
885
- | version | | the version of the structure | &nbsp; |
886
-
887
-
888
-
889
-
890
- ##### Returns
891
-
892
-
893
- -
894
-
895
-
896
-
897
-
898
- ### dist/filters/adapters/UIToFlatUI.js
899
-
900
-
901
- #### UIToFlatUI(filterData, datasetsInfo)
902
-
903
- Generates a Flattened UI filter structure from UI Filter Data structure.
904
-
905
-
906
-
907
-
908
- ##### Parameters
909
-
910
- | Name | Type | Description | |
911
- | ---- | ---- | ----------- | -------- |
912
- | filterData | | The UI filter data object. | &nbsp; |
913
- | datasetsInfo | | Collection of datasets information. Optional for updating the datasets info | &nbsp; |
914
-
915
-
916
-
917
-
918
- ##### Returns
919
-
920
-
921
- - a flattened UI filters array
922
-
923
-
924
-
925
- #### UI21ToFlatUI(scopes)
926
-
927
- Generates a Flattened UI Filter Structure from the UI Filter Data structure v2.1
928
-
929
-
930
-
931
-
932
- ##### Parameters
933
-
934
- | Name | Type | Description | |
935
- | ---- | ---- | ----------- | -------- |
936
- | scopes | | The filter scope section | &nbsp; |
937
-
938
-
939
-
940
-
941
- ##### Returns
942
-
943
-
944
- - a flattened UI filters array
945
-
946
-
947
-
948
-
949
- ### dist/filters/adapters/adaptDateGroupingProperty.js
950
-
951
-
952
- #### adaptDateGroupingProperty(property)
953
-
954
- [TODO: For 2022, eliminate this adapter]
955
- Get the new property base on the old date grouping properties
956
-
957
-
958
-
959
-
960
- ##### Parameters
961
-
962
- | Name | Type | Description | |
963
- | ---- | ---- | ----------- | -------- |
964
- | property | | | &nbsp; |
965
-
966
-
967
-
968
-
969
- ##### Returns
970
-
971
-
972
- -
973
-
974
-
975
-
976
-
977
- ### dist/filters/adapters/adaptFilterData.js
978
-
979
-
980
- #### adaptFilterData(filterData, getUIFilterData, datasetsInfo)
981
-
982
- Checks and adapts the v2.0 Filter Data Structure to the v2.1
983
-
984
-
985
-
986
-
987
- ##### Parameters
988
-
989
- | Name | Type | Description | |
990
- | ---- | ---- | ----------- | -------- |
991
- | filterData | | The filter data structure. Accepts both v2.1 or v2.0 | &nbsp; |
992
- | getUIFilterData | | Flag to get a Filter Data (False) or the UI Filter Data (True) | &nbsp; |
993
- | datasetsInfo | | Collection of datasets information. If getUIFilterData is true, the datasetsInfo should be mandatory | &nbsp; |
994
-
995
-
996
-
997
-
998
- ##### Returns
999
-
1000
-
1001
- - A new filter data structure v2.1
1002
-
1003
-
1004
-
1005
-
1006
- ### dist/filters/adapters/adaptFilterValues.js
1007
-
1008
-
1009
- #### adaptFilterValues(filter)
1010
-
1011
- [TODO: For 2022, eliminate this adapter]
1012
- Gets an adapted filter value array. Validates the enabled property and sets
1013
-
1014
-
1015
-
1016
-
1017
- ##### Parameters
1018
-
1019
- | Name | Type | Description | |
1020
- | ---- | ---- | ----------- | -------- |
1021
- | filter | | The filter | &nbsp; |
1022
-
1023
-
1024
-
1025
-
1026
- ##### Returns
1027
-
1028
-
1029
- - A new value array with the filled properties.
1030
-
1031
-
1032
-
1033
-
1034
- ### dist/filters/adapters/flatUIToFD.js
1035
-
1036
-
1037
- #### flatUIToFD(uFilters, version)
1038
-
1039
- Generates a filter data structure from the flatttened UI filters.
1040
-
1041
-
1042
-
1043
-
1044
- ##### Parameters
1045
-
1046
- | Name | Type | Description | |
1047
- | ---- | ---- | ----------- | -------- |
1048
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1049
- | version | | Tag for the version of the filter data structure | &nbsp; |
1050
-
1051
-
1052
-
1053
-
1054
- ##### Returns
1055
-
1056
-
1057
- - a Filter Data.
1058
-
1059
-
1060
-
1061
- #### buildScopes(fbFilters)
1062
-
1063
- Gets an array of scopes structure for the filter data. The scopes is organized by scope types and scope IDs
1064
- Also, adds and organizes filters by datasets
1065
-
1066
-
1067
-
1068
-
1069
- ##### Parameters
1070
-
1071
- | Name | Type | Description | |
1072
- | ---- | ---- | ----------- | -------- |
1073
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1074
-
1075
-
1076
-
1077
-
1078
- ##### Returns
1079
-
1080
-
1081
- - an array of scopes structure.
1082
-
1083
-
1084
-
1085
- #### buildScope(uFilter)
1086
-
1087
- Gets an scope structure for the filter data
1088
-
1089
-
1090
-
1091
-
1092
- ##### Parameters
1093
-
1094
- | Name | Type | Description | |
1095
- | ---- | ---- | ----------- | -------- |
1096
- | uFilter | | UI structure filter | &nbsp; |
1097
-
1098
-
1099
-
1100
-
1101
- ##### Returns
1102
-
1103
-
1104
- - an scope structure
1105
-
1106
-
1107
-
1108
- #### buildDataset(uFilter)
1109
-
1110
- Gets an dataset structure for the filter data
1111
-
1112
-
1113
-
1114
-
1115
- ##### Parameters
1116
-
1117
- | Name | Type | Description | |
1118
- | ---- | ---- | ----------- | -------- |
1119
- | uFilter | | a UI structure filter | &nbsp; |
1120
-
1121
-
1122
-
1123
-
1124
- ##### Returns
1125
-
1126
-
1127
- - an dataset structure
1128
-
1129
-
1130
-
1131
- #### buildFilter(uFilter)
1132
-
1133
- Gets an filter structure for the filter data
1134
-
1135
-
1136
-
1137
-
1138
- ##### Parameters
1139
-
1140
- | Name | Type | Description | |
1141
- | ---- | ---- | ----------- | -------- |
1142
- | uFilter | | a UI structure filter | &nbsp; |
1143
-
1144
-
1145
-
1146
-
1147
- ##### Returns
1148
-
1149
-
1150
- - an filter structure
1151
-
1152
-
1153
-
1154
-
1155
- ### dist/filters/adapters/flatUIToLogic.js
1156
-
1157
-
1158
- #### flatUIToLogic(uFilter)
1159
-
1160
- Generates a Logic structure from flattened UI filters
1161
-
1162
-
1163
-
1164
-
1165
- ##### Parameters
1166
-
1167
- | Name | Type | Description | |
1168
- | ---- | ---- | ----------- | -------- |
1169
- | uFilter | | Array of flat filters from UI | &nbsp; |
1170
-
1171
-
1172
-
1173
-
1174
- ##### Returns
1175
-
1176
-
1177
- - The logic structure
1178
-
1179
-
1180
-
1181
-
1182
- ### dist/filters/adapters/flatUIToOldLogic.js
1183
-
1184
-
1185
- #### flatUIToOldLogic(uFilters)
1186
-
1187
- Generates a Logic structure from flattened UI filters
1188
-
1189
-
1190
-
1191
-
1192
- ##### Parameters
1193
-
1194
- | Name | Type | Description | |
1195
- | ---- | ---- | ----------- | -------- |
1196
- | uFilters | | Array of flat filters from UI | &nbsp; |
1197
-
1198
-
1199
-
1200
-
1201
- ##### Returns
1202
-
1203
-
1204
- - The logic structure
1205
-
1206
-
1207
-
1208
-
1209
- ### dist/filters/adapters/flatUIToUI.js
1210
-
1211
-
1212
- #### flatUIToUI(uFilters, version)
1213
-
1214
- Generates a UI filter data structure from the flatttened UI filters.
1215
-
1216
-
1217
-
1218
-
1219
- ##### Parameters
1220
-
1221
- | Name | Type | Description | |
1222
- | ---- | ---- | ----------- | -------- |
1223
- | uFilters | | Array of flattened filters from UI | &nbsp; |
1224
- | version | | Tag for the version of the filter data structure | &nbsp; |
1225
-
1226
-
1227
-
1228
-
1229
- ##### Returns
1230
-
1231
-
1232
- - a UI Filter Data.
1233
-
1234
-
1235
-
1236
- #### buildScopes(fbFilters)
1237
-
1238
- Gets an array of scopes structure for the UI filter data. The scopes is organized by scope types and scope IDs
1239
- Also, adds and organizes filters by datasets
1240
-
1241
-
1242
-
1243
-
1244
- ##### Parameters
1245
-
1246
- | Name | Type | Description | |
1247
- | ---- | ---- | ----------- | -------- |
1248
- | fbFilters | | Array of flat filters from UI | &nbsp; |
1249
-
1250
-
1251
-
1252
-
1253
- ##### Returns
1254
-
1255
-
1256
- - an array of scopes structure.
1257
-
1258
-
1259
-
1260
- #### buildScope(uFilter)
1261
-
1262
- Gets an scope structure for the UI filter data
1263
-
1264
-
1265
-
1266
-
1267
- ##### Parameters
1268
-
1269
- | Name | Type | Description | |
1270
- | ---- | ---- | ----------- | -------- |
1271
- | uFilter | | UI structure filter | &nbsp; |
1272
-
1273
-
1274
-
1275
-
1276
- ##### Returns
1277
-
1278
-
1279
- - an scope structure
1280
-
1281
-
1282
-
1283
- #### buildDataset(uFilter)
1284
-
1285
- Gets an dataset structure for the UI filter data
1286
-
1287
-
1288
-
1289
-
1290
- ##### Parameters
1291
-
1292
- | Name | Type | Description | |
1293
- | ---- | ---- | ----------- | -------- |
1294
- | uFilter | | a UI structure filter | &nbsp; |
1295
-
1296
-
1297
-
1298
-
1299
- ##### Returns
1300
-
1301
-
1302
- - an dataset structure
1303
-
1304
-
1305
-
1306
- #### buildFilter(uFilter)
1307
-
1308
- Gets an filter structure for the UI filter data
1309
-
1310
-
1311
-
1312
-
1313
- ##### Parameters
1314
-
1315
- | Name | Type | Description | |
1316
- | ---- | ---- | ----------- | -------- |
1317
- | uFilter | | a UI structure filter | &nbsp; |
1318
-
1319
-
1320
-
1321
-
1322
- ##### Returns
1323
-
1324
-
1325
- - an filter structure
1326
-
1327
-
1328
-
1329
-
1330
- ### dist/filters/adapters/logicToFD.js
1331
-
1332
-
1333
- #### logicToFD(filterData, version)
1334
-
1335
- Generates a filter data structure from the old logic structure (v2.0).
1336
-
1337
-
1338
-
1339
-
1340
- ##### Parameters
1341
-
1342
- | Name | Type | Description | |
1343
- | ---- | ---- | ----------- | -------- |
1344
- | filterData | | The old filter data structure with logic (v2.0) | &nbsp; |
1345
- | version | | Tag for the version of the filter data structure | &nbsp; |
1346
-
1347
-
1348
-
1349
-
1350
- ##### Returns
1351
-
1352
-
1353
- - a Filter Data.
1354
-
1355
-
1356
-
1357
-
1358
- ### dist/filters/adapters/logicToFlatUI.js
1359
-
1360
-
1361
- #### logicToFlatUI(logics)
1362
-
1363
- Adapts the Old logic structure (v2.0) to the flattened UI filter Structure.
1364
-
1365
-
1366
-
1367
-
1368
- ##### Parameters
1369
-
1370
- | Name | Type | Description | |
1371
- | ---- | ---- | ----------- | -------- |
1372
- | logics | | The old logic structure (v2.0) | &nbsp; |
1373
-
1374
-
1375
-
1376
-
1377
- ##### Returns
1378
-
1379
-
1380
- - The Flattened UI Filters array
1381
-
1382
-
1383
-
1384
- #### getFilter(filters, filter, getIndex)
1385
-
1386
- Get the filter or the index of the given array, validating an old filter structure.
1387
-
1388
-
1389
-
1390
-
1391
- ##### Parameters
1392
-
1393
- | Name | Type | Description | |
1394
- | ---- | ---- | ----------- | -------- |
1395
- | filters | | The array of UI filters | &nbsp; |
1396
- | filter | | The old logic structure filter | &nbsp; |
1397
- | getIndex | | Determines if the index or returns the UI filter object | &nbsp; |
1398
-
1399
-
1400
-
1401
-
1402
- ##### Returns
1403
-
1404
-
1405
- - the index or the UI filter object
1406
-
1407
-
1408
-
1409
- #### refineRankingValues(values, uiValues)
1410
-
1411
- Refines the values of the Ranking column type.
1412
-
1413
-
1414
-
1415
-
1416
- ##### Parameters
1417
-
1418
- | Name | Type | Description | |
1419
- | ---- | ---- | ----------- | -------- |
1420
- | values | | the Array of Ranking values | &nbsp; |
1421
- | uiValues | | Object with additional info about the values of the filter. | &nbsp; |
1422
-
1423
-
1424
-
1425
-
1426
- ##### Returns
1427
-
1428
-
1429
- - the array of Ranking values
1430
-
1431
-
1432
-
1433
-
1434
- ### dist/filters/adapters/logicToUI.js
1435
-
1436
-
1437
- #### logicToUI(uFilters, datasetsInfo)
1438
-
1439
- Generates a UI filter structure from the old logic structure (v2.0).
1440
-
1441
-
1442
-
1443
-
1444
- ##### Parameters
1445
-
1446
- | Name | Type | Description | |
1447
- | ---- | ---- | ----------- | -------- |
1448
- | uFilters | | Array of filters from old logic structure | &nbsp; |
1449
- | datasetsInfo | | Collection of datasets information | &nbsp; |
1450
-
1451
-
1452
-
1453
-
1454
- ##### Returns
1455
-
1456
-
1457
- - a UI Filter Data.
1458
-
1459
-
1460
-
1461
-
1462
- ### dist/filters/adapters/transformFilters.js
1463
-
1464
-
1465
- #### transformFilters(oldFiltersObj, section)
1466
-
1467
- Transform the old filters structure into the new one
1468
-
1469
-
1470
-
1471
-
1472
- ##### Parameters
1473
-
1474
- | Name | Type | Description | |
1475
- | ---- | ---- | ----------- | -------- |
1476
- | oldFiltersObj | `Object` | an object with the old filters structure | &nbsp; |
1477
- | section | `String` | could be 'ANALYZE', 'PB', 'UM' or any other value. Deafult is 'ANYWHERE' | &nbsp; |
1478
-
1479
-
1480
-
1481
-
1482
- ##### Examples
1483
-
1484
- ```javascript
1485
-
1486
- const oldPreferenceFilters = {
1487
- "WWXHAULtR-_-xYOQAdpqT__ENABLED": true,
1488
- "WWXHAULtR-_-xYOQAdpqT__ALL--ENABLED": true,
1489
- "WWXHAULtR-_-xYOQAdpqT__COLLAPSED": false,
1490
- "WWXHAULtR-_-xYOQAdpqT__LABEL": "GLOBAL",
1491
- "WWXHAULtR-_-xYOQAdpqT-_-AK4M8UV2": {
1492
- "formulaId": null,
1493
- "panelId": null,
1494
- "values": [
1495
- {
1496
- "EQUALS": [
1497
- {
1498
- "id": "AK4M8UV2a0",
1499
- "value": "A",
1500
- "enabled": true,
1501
- "imageUrl": null
1502
- },
1503
- {
1504
- "id": "AK4M8UV2a1",
1505
- "value": "B",
1506
- "enabled": true,
1507
- "imageUrl": null
1508
- }
1509
- ]
1510
- }
1511
- ],
1512
- "bucketId": null,
1513
- "text": "MC",
1514
- "title": "MC",
1515
- "type": "SINGLE_CHOICE",
1516
- "qid": "AK4M8UV2",
1517
- "dataset": {
1518
- "sourceid": "xYOQAdpqT",
1519
- "name": "Form All Questions",
1520
- "qrveyid": "xYOQAdpqT",
1521
- "text": "Form All Questions",
1522
- "linkid": 0
1523
- },
1524
- "enabled": true,
1525
- "linked": null
1526
- }
1527
- };
1528
-
1529
- const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1530
- ```
1531
-
1532
-
1533
- ##### Returns
1534
-
1535
-
1536
- - `Object` an object with the new filters structure
1537
-
1538
-
1539
-
1540
-
1541
- ### dist/filters/classes/FilterInputErrorHandler.js
1542
-
1543
-
1544
- #### new FilterInputErrorHandler()
1545
-
1546
-
1547
-
1548
-
1549
-
1550
-
1551
-
1552
-
1553
- ##### Returns
1554
-
1555
-
1556
- - `Void`
1557
-
1558
-
1559
-
1560
-
1561
- ### dist/filters/helpers/applyHierarchyForAggFilters.js
1562
-
1563
-
1564
- #### applyHierarchyForAggFilters(chartSettings, scopes, currentScope)
1565
-
1566
- [TODO: Make a proper description for this function]
1567
-
1568
-
1569
-
1570
-
1571
- ##### Parameters
1572
-
1573
- | Name | Type | Description | |
1574
- | ---- | ---- | ----------- | -------- |
1575
- | chartSettings | | Chart Settings for the Filter Builder | &nbsp; |
1576
- | scopes | | | &nbsp; |
1577
- | currentScope | | | &nbsp; |
1578
-
1579
-
1580
-
1581
-
1582
- ##### Returns
1583
-
1584
-
1585
- -
1586
-
1587
-
1588
-
1589
-
1590
- ### dist/filters/helpers/getAvailableScopes.js
1591
-
1592
-
1593
- #### getAvailableScopes(config)
1594
-
1595
- Gets Scopes/Scope IDs by given IDs
1596
-
1597
-
1598
-
1599
-
1600
- ##### Parameters
1601
-
1602
- | Name | Type | Description | |
1603
- | ---- | ---- | ----------- | -------- |
1604
- | config | | given Differnts IDs in order set a available scope | &nbsp; |
1605
-
1606
-
1607
-
1608
-
1609
- ##### Returns
1610
-
1611
-
1612
- - a Scopes/Scope IDs array
1613
-
1614
-
1615
-
1616
-
1617
- ### dist/filters/helpers/getAvailableScopesIDsByConfig.js
1618
-
1619
-
1620
- #### getAvailableScopesIDsByConfig(config)
1621
-
1622
- Gets the Scopes IDS for the Available Scope function by any config
1623
-
1624
-
1625
-
1626
-
1627
- ##### Parameters
1628
-
1629
- | Name | Type | Description | |
1630
- | ---- | ---- | ----------- | -------- |
1631
- | config | | any config | &nbsp; |
1632
-
1633
-
1634
-
1635
-
1636
- ##### Returns
1637
-
1638
-
1639
- - a Available Scope IDS config
1640
-
1641
-
1642
-
1643
-
1644
- ### dist/filters/helpers/getScopesByHierarchy.js
1645
-
1646
-
1647
- #### getScopesByHierarchy(scopes, currentScope)
1648
-
1649
- [TODO: Make a description for this]
1650
-
1651
-
1652
-
1653
-
1654
- ##### Parameters
1655
-
1656
- | Name | Type | Description | |
1657
- | ---- | ---- | ----------- | -------- |
1658
- | scopes | | the collection of Scopes/Scope IDs | &nbsp; |
1659
- | currentScope | | Current scope type | &nbsp; |
1660
-
1661
-
1662
-
1663
-
1664
- ##### Returns
1665
-
1666
-
1667
- - A new array of Scopes/Scope IDs
1668
-
1669
-
1670
-
1671
-
1672
- ### dist/general/array/delete.js
1673
-
1674
-
1675
- #### ArrayDelete(array, index)
1676
-
1677
- Inmutable Array Item deletion
1678
-
1679
-
1680
-
1681
-
1682
- ##### Parameters
1683
-
1684
- | Name | Type | Description | |
1685
- | ---- | ---- | ----------- | -------- |
1686
- | array | `Array` | a collection of items to delete | &nbsp; |
1687
- | index | `Number` | the position of the item to delete | &nbsp; |
1688
-
1689
-
1690
-
1691
-
1692
- ##### Returns
1693
-
1694
-
1695
- - a new Array or the given parameter when is empty or not an array
1696
-
1697
-
1698
-
1699
-
1700
- ### dist/general/array/filterNestedTree.js
1701
-
1702
-
1703
- #### filterNestedTree(arr, childArrKey, condition)
1704
-
1705
- Filters a nested tree array by a custom condition on the last child node
1706
- - If the given arguments are not valid, the function returns the first argument.
1707
- - If the childArrKey is not matched in the object, the condition tries to resolve the filter anyway and returns an empty array.
1708
- - If the condition is not fulfilled, the function returns a filtered array, probably a empty array inside of the child array
1709
-
1710
-
1711
-
1712
-
1713
- ##### Parameters
1714
-
1715
- | Name | Type | Description | |
1716
- | ---- | ---- | ----------- | -------- |
1717
- | arr | | nested tree array | &nbsp; |
1718
- | childArrKey | | property representing the children array on the nested tree | &nbsp; |
1719
- | condition | | function callback that determines if the filter is applied on the last child node of the nested tree | &nbsp; |
1720
-
1721
-
1722
-
1723
-
1724
- ##### Returns
1725
-
1726
-
1727
- - array filtered
1728
-
1729
-
1730
-
1731
-
1732
- ### dist/general/array/flattenDeep.js
1733
-
1734
-
1735
- #### flattenDeep(arr)
1736
-
1737
- Flat deeply an array
1738
-
1739
-
1740
-
1741
-
1742
- ##### Parameters
1743
-
1744
- | Name | Type | Description | |
1745
- | ---- | ---- | ----------- | -------- |
1746
- | arr | | Array to flat deeply | &nbsp; |
1747
-
1748
-
1749
-
1750
-
1751
- ##### Returns
1752
-
1753
-
1754
- - flatten array
1755
-
1756
-
1757
-
1758
-
1759
- ### dist/general/array/getFirstIndexFromArray.js
1760
-
1761
-
1762
- #### getFirstIndexFromArray(array, callback)
1763
-
1764
- Gets the first index from the array by a callback condition
1765
-
1766
-
1767
-
1768
-
1769
- ##### Parameters
1770
-
1771
- | Name | Type | Description | |
1772
- | ---- | ---- | ----------- | -------- |
1773
- | array | | | &nbsp; |
1774
- | callback | | function callback | &nbsp; |
1775
-
1776
-
1777
-
1778
-
1779
- ##### Returns
1780
-
1781
-
1782
- - the first index of the array. -1 when the condition is not satisfied
1783
-
1784
-
1785
-
1786
-
1787
- ### dist/general/array/getLastIndexFromArray.js
1788
-
1789
-
1790
- #### getLastIndexFromArray(array, callback)
1791
-
1792
- Gets the last index from the array by a callback condition
1793
-
1794
-
1795
-
1796
-
1797
- ##### Parameters
1798
-
1799
- | Name | Type | Description | |
1800
- | ---- | ---- | ----------- | -------- |
1801
- | array | | | &nbsp; |
1802
- | callback | | function callback | &nbsp; |
1803
-
1804
-
1805
-
1806
-
1807
- ##### Returns
1808
-
1809
-
1810
- - the last index of the array. -1 when the condition is not satisfied
1811
-
1812
-
1813
-
1814
-
1815
- ### dist/general/function/debounce.js
1816
-
1817
-
1818
- #### debounce(fn, time)
1819
-
1820
- Delays invoking _fn_ until after _time_ milliseconds have elapsed since the last time the debounced function was invoked.
1821
-
1822
-
1823
-
1824
-
1825
- ##### Parameters
1826
-
1827
- | Name | Type | Description | |
1828
- | ---- | ---- | ----------- | -------- |
1829
- | fn | `Function` | original Function | &nbsp; |
1830
- | time | `Number` | default 500ms | &nbsp; |
1831
-
1832
-
1833
-
1834
-
1835
- ##### Returns
1836
-
1837
-
1838
- - `Function` debounced functions
1839
-
1840
-
1841
-
1842
-
1843
- ### dist/general/function/throttled.js
1844
-
1845
-
1846
- #### throttled(fn, time)
1847
-
1848
- Make sure to only invokes _fn_ at most once per every _time_ milliseconds
1849
-
1850
-
1851
-
1852
-
1853
- ##### Parameters
1854
-
1855
- | Name | Type | Description | |
1856
- | ---- | ---- | ----------- | -------- |
1857
- | fn | `Function` | original Function | &nbsp; |
1858
- | time | `Number` | default 500ms | &nbsp; |
1859
-
1860
-
1861
-
1862
-
1863
- ##### Returns
1864
-
1865
-
1866
- - `Function` throttled function
1867
-
1868
-
1869
-
1870
-
1871
- ### dist/general/mix/compareDeep.js
1872
-
1873
-
1874
- #### compareDeep(object1, object2)
1875
-
1876
- Compares two objects to know if they are equals. Go across nested objects.
1877
- Includes arrays in the comparison.
1878
-
1879
-
1880
-
1881
-
1882
- ##### Parameters
1883
-
1884
- | Name | Type | Description | |
1885
- | ---- | ---- | ----------- | -------- |
1886
- | object1 | | First Object to compare | &nbsp; |
1887
- | object2 | | Second Object to compare | &nbsp; |
1888
-
1889
-
1890
-
1891
-
1892
- ##### Returns
1893
-
1894
-
1895
- - True: objects are equal. False: Objects are not equal. Undefined: invalid
1896
-
1897
-
1898
-
1899
-
1900
- ### dist/general/mix/getTag.js
1901
-
1902
-
1903
- #### getTag(value)
1904
-
1905
- Gets the `toStringTag` of `value`.
1906
-
1907
-
1908
-
1909
-
1910
- ##### Parameters
1911
-
1912
- | Name | Type | Description | |
1913
- | ---- | ---- | ----------- | -------- |
1914
- | value | | The value to query. | &nbsp; |
1915
-
1916
-
1917
-
1918
-
1919
- ##### Returns
1920
-
1921
-
1922
- - `string` Returns the `toStringTag`.
1923
-
1924
-
1925
-
1926
-
1927
- ### dist/general/mix/importScripts.js
1928
-
1929
-
1930
- #### importScripts(scripts)
1931
-
1932
- Import a set of external Scripts given the URL in both serie and cascade way
1933
-
1934
-
1935
-
1936
-
1937
- ##### Parameters
1938
-
1939
- | Name | Type | Description | |
1940
- | ---- | ---- | ----------- | -------- |
1941
- | scripts | `Array.<String>` `Array.<Object>` | can be an array of string or an array of object with the follow structure: | &nbsp; |
1942
- | scripts.url | `String` | CDN URL | &nbsp; |
1943
- | scripts.namespace | `String` `Function` | (Optional) if is a String, that name is evaluated on Window[namespace] object otherwise the Function is invoked expecting a Thrutly value | &nbsp; |
1944
- | scripts.type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1945
- | scripts.noModule | `Boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
1946
- | scripts.dependencies | `Array.<Object>` | an array with the same structure to load in cascade mode | &nbsp; |
1947
-
1948
-
1949
-
1950
-
1951
- ##### Examples
1952
-
1953
- ```javascript
1954
- // 1) Simple script (paralell loading)
1955
- importScripts(['http://myscript.js', 'http://another.js']);
1956
-
1957
- // 2) Loading `.js` and `.esm.js` script (parallel loading)
1958
- importScripts([
1959
- { url: 'http://myscript.esm.js', type: 'module' },
1960
- { url: 'http://myscript.js', noModule: true }
1961
- ]);
1962
-
1963
- // 3) import dependent scripts (cascade)
1964
- importScripts([
1965
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] }
1966
- ]);
1967
-
1968
- // 4) mix
1969
- importScripts([
1970
- { url: 'http://myscript.js', dependencies: ['http://myscript.plugin.js'] },
1971
- { url: 'http://another.esm.js', type: 'module' },
1972
- { url: 'http://another.js', noModule: true },
1973
- 'http://simplescript.js'
1974
- ]);
1975
- ```
1976
-
1977
-
1978
- ##### Returns
1979
-
1980
-
1981
- - `Promise` Promise when all script have been loaded
1982
-
1983
-
1984
-
1985
- #### loadScript(url, type, noModule)
1986
-
1987
- Creates the script element and appends to document.head
1988
- return a Promise that is resolved when the script is loaded
1989
-
1990
-
1991
-
1992
-
1993
- ##### Parameters
1994
-
1995
- | Name | Type | Description | |
1996
- | ---- | ---- | ----------- | -------- |
1997
- | url | `String` | Cdn Url | &nbsp; |
1998
- | type | `String` | (Optional) it could be `module` of `text/javascript`. Default `text/javascript` | &nbsp; |
1999
- | noModule | `boolean` | (Optional) add `momodule` attribute to script tag. Default `false` | &nbsp; |
2000
-
2001
-
2002
-
2003
-
2004
- ##### Returns
2005
-
2006
-
2007
- - `Void`
2008
-
2009
-
2010
-
2011
-
2012
- ### dist/general/mix/isEmpty.js
2013
-
2014
-
2015
- #### isEmpty(variable, includeFalsy)
2016
-
2017
- Validates if the given argument is empty
2018
-
2019
-
2020
-
2021
-
2022
- ##### Parameters
2023
-
2024
- | Name | Type | Description | |
2025
- | ---- | ---- | ----------- | -------- |
2026
- | variable | | the given variable | &nbsp; |
2027
- | includeFalsy | | flag to determine include the falsy variables into the validation | &nbsp; |
2028
-
2029
-
2030
-
2031
-
2032
- ##### Returns
2033
-
2034
-
2035
- - true: the given argument is empty; false: is not.
2036
-
2037
-
2038
-
2039
-
2040
- ### dist/general/mix/isNaNV2.js
2041
-
2042
-
2043
- #### isNaNV2(variable)
2044
-
2045
- Validates if the recieved number is NaN type.
2046
- This function recieves any variable but will return false.
2047
- Validates if variable is null, undefined, or an empty string, also, the function uses isNaN native function.
2048
-
2049
-
2050
-
2051
-
2052
- ##### Parameters
2053
-
2054
- | Name | Type | Description | |
2055
- | ---- | ---- | ----------- | -------- |
2056
- | variable | | the variable to validate | &nbsp; |
2057
-
2058
-
2059
-
2060
-
2061
- ##### Returns
2062
-
2063
-
2064
- - True if variable is a NaN or false otherwise
2065
-
2066
-
2067
-
2068
-
2069
- ### dist/general/mix/isNull.js
2070
-
2071
-
2072
- #### isNull(arg)
2073
-
2074
- return if a given variable is either `null` or `undefined`
2075
- useful to avoid falsify validating Number Zero (0)
2076
-
2077
-
2078
-
2079
-
2080
- ##### Parameters
2081
-
2082
- | Name | Type | Description | |
2083
- | ---- | ---- | ----------- | -------- |
2084
- | arg | `any` | | &nbsp; |
2085
-
2086
-
2087
-
2088
-
2089
- ##### Returns
2090
-
2091
-
2092
- - `Boolean`
2093
-
2094
-
2095
-
2096
-
2097
- ### dist/general/mix/randomId.js
2098
-
2099
-
2100
- #### randomId(length, exclude)
2101
-
2102
- Creates a random string
2103
- - If the first given argument is different than a length number, the variable is replaced by a default number
2104
- - If the optional second given argument is passed the random string is permutated.
2105
-
2106
-
2107
-
2108
-
2109
- ##### Parameters
2110
-
2111
- | Name | Type | Description | |
2112
- | ---- | ---- | ----------- | -------- |
2113
- | length | `Number` | size of the generated string. Default 8 | &nbsp; |
2114
- | exclude | `Array` | collection of strings that is going to be excluded of the random string. | &nbsp; |
2115
-
2116
-
2117
-
2118
-
2119
- ##### Returns
2120
-
2121
-
2122
- - `String` Random string
2123
-
2124
-
2125
-
2126
-
2127
- ### dist/general/mix/size.js
2128
-
2129
-
2130
- #### size(obj)
2131
-
2132
- Gets the length of the given array.
2133
- - Useful for Object, Array and string type.
2134
- - For `null` or `undefined` or else argument the returned value will be 0.
2135
-
2136
-
2137
-
2138
-
2139
- ##### Parameters
2140
-
2141
- | Name | Type | Description | |
2142
- | ---- | ---- | ----------- | -------- |
2143
- | obj | `Any` | Any object-type variable | &nbsp; |
2144
-
2145
-
2146
-
2147
-
2148
- ##### Returns
2149
-
2150
-
2151
- - `Number` the size of the given variable
2152
-
2153
-
2154
-
2155
-
2156
- ### dist/general/object/cloneDeep.js
2157
-
2158
-
2159
- #### cloneDeep(obj)
2160
-
2161
- A simple Deep Cloning function. Valid only for primivite values and object with primitive values.
2162
- Not to use this function with inner objects and functions
2163
-
2164
-
2165
-
2166
-
2167
- ##### Parameters
2168
-
2169
- | Name | Type | Description | |
2170
- | ---- | ---- | ----------- | -------- |
2171
- | obj | | The object | &nbsp; |
2172
-
2173
-
2174
-
2175
-
2176
- ##### Returns
2177
-
2178
-
2179
- - The new reference object or the given object if the parsing is incorrect or empty
2180
-
2181
-
2182
-
2183
-
2184
- ### dist/general/object/get.js
2185
-
2186
-
2187
- #### _get(baseObject, path, defaultValue)
2188
-
2189
- Like lodash _.get.
2190
- Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
2191
-
2192
- Empty arrays and empty objects are returned but the defaultValue is not
2193
- Undefined and null values will return the defaultValue.
2194
-
2195
-
2196
-
2197
-
2198
- ##### Parameters
2199
-
2200
- | Name | Type | Description | |
2201
- | ---- | ---- | ----------- | -------- |
2202
- | baseObject | | The object to query | &nbsp; |
2203
- | path | | The string path or collection of string paths of the property to get. | &nbsp; |
2204
- | defaultValue | | The value returned for undefined resolved values. | &nbsp; |
2205
-
2206
-
2207
-
2208
-
2209
- ##### Examples
2210
-
2211
- ```javascript
2212
- // returns 'Hello'
2213
- _get({ item1: 'Hello', item2: 'World' }, 'item1')
2214
- ```
2215
- ```javascript
2216
- // returns 'A simple Hello'
2217
- _get({ item1: 'Hello', item2: 'World' }, 'item3', 'A simple Hello')
2218
- ```
2219
- ```javascript
2220
- // returns 'Hello Again'
2221
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, 'item1.item11')
2222
- ```
2223
- ```javascript
2224
- // returns 'Hello 2'
2225
- _get({ item1: ['Hello 1', 'Hello 2' }, item2: [] }, 'item1[1]')
2226
- ```
2227
- ```javascript
2228
- // returns 'Hello Again'
2229
- _get({ item1: { item11: 'Hello Again' }, item2: {} }, ['item1', 'item11'])
2230
- ```
2231
-
2232
-
2233
- ##### Returns
2234
-
2235
-
2236
- - the resolved value.
2237
-
2238
-
2239
-
2240
-
2241
- ### dist/general/object/getAttribute.js
2242
-
2243
-
2244
- #### getAttribute(obj, key)
2245
-
2246
- Searchs for properties in different case styles such as: lower, upper, camel and pascal
2247
- - To optimize the searching, it is required a key in a snake_case style
2248
- - List of cases that do not match
2249
- -- From lower to snake case
2250
- -- From upper to snake case
2251
- -- From lower to camel case
2252
- -- From upper to camel case
2253
- -- From lower to pascal case
2254
- -- From upper to pascal case
2255
-
2256
-
2257
-
2258
-
2259
- ##### Parameters
2260
-
2261
- | Name | Type | Description | |
2262
- | ---- | ---- | ----------- | -------- |
2263
- | obj | `object` | object to look for | &nbsp; |
2264
- | key | `string` | String attribute in snake_case style | &nbsp; |
2265
-
2266
-
2267
-
2268
-
2269
- ##### Examples
2270
-
2271
- ```javascript
2272
- getAttribute(obj, 'snake_case') //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2273
- ```
2274
-
2275
-
2276
- ##### Returns
2277
-
2278
-
2279
- - `Void`
2280
-
2281
-
2282
-
2283
-
2284
- ### dist/general/object/hasProperty.js
2285
-
2286
-
2287
- #### _hasProperty(obj, property)
2288
-
2289
- Use the hasOwnProperty in order to verify if the given property exists in the object.
2290
-
2291
-
2292
-
2293
-
2294
- ##### Parameters
2295
-
2296
- | Name | Type | Description | |
2297
- | ---- | ---- | ----------- | -------- |
2298
- | obj | `object` | an object | &nbsp; |
2299
- | property | `string` | String to verify if exists in the object as property | &nbsp; |
2300
-
2301
-
2302
-
2303
-
2304
- ##### Examples
2305
-
2306
- ```javascript
2307
- const prop = 'prop2'
2308
- const obj1 = { prop1: 'hello', prop2: 'world'}
2309
- _hasProperty(ob1, prop1) // true
2310
-
2311
- const obj2 = { prop1: 'hello world' }
2312
- _hasProperty(ob1, prop2) // false
2313
- ```
2314
-
2315
-
2316
- ##### Returns
2317
-
2318
-
2319
- - True if the object has the given property; otherwise, false.
2320
-
2321
-
2322
-
2323
-
2324
- ### dist/general/object/isObject.js
2325
-
2326
-
2327
- #### isObject(obj)
2328
-
2329
- Checks if the given argument is an object type
2330
-
2331
-
2332
-
2333
-
2334
- ##### Parameters
2335
-
2336
- | Name | Type | Description | |
2337
- | ---- | ---- | ----------- | -------- |
2338
- | obj | | the variable to check | &nbsp; |
2339
-
2340
-
2341
-
2342
-
2343
- ##### Returns
2344
-
2345
-
2346
- - True: It is an object; False: It is not.
2347
-
2348
-
2349
-
2350
-
2351
- ### dist/general/object/mapValues.js
2352
-
2353
-
2354
- #### mapValues(baseObject, iteratee)
2355
-
2356
- Invoke iteratee (function) for each object key-value pair
2357
- and return a mapped object
2358
-
2359
-
2360
-
2361
-
2362
- ##### Parameters
2363
-
2364
- | Name | Type | Description | |
2365
- | ---- | ---- | ----------- | -------- |
2366
- | baseObject | `Object` | Base object. | &nbsp; |
2367
- | iteratee | `Function` | The executed per iteration. | &nbsp; |
2368
-
2369
-
2370
-
2371
-
2372
- ##### Returns
2373
-
2374
-
2375
- - `Object` New mapped object.
2376
-
2377
-
2378
-
2379
-
2380
- ### dist/general/object/mergeDeep.js
2381
-
2382
-
2383
- #### mergeDeep(obj1, obj2, settings)
2384
-
2385
- Merges two objects into a new one.
2386
- The second given argument to the first given argument.
2387
-
2388
-
2389
-
2390
-
2391
- ##### Parameters
2392
-
2393
- | Name | Type | Description | |
2394
- | ---- | ---- | ----------- | -------- |
2395
- | obj1 | | The target object | &nbsp; |
2396
- | obj2 | | The object to be merged | &nbsp; |
2397
- | settings | | Object settings for this function | &nbsp; |
2398
-
2399
-
2400
-
2401
-
2402
- ##### Returns
2403
-
2404
-
2405
- - a new merged object
2406
-
2407
-
2408
-
2409
- #### isValid(obj1, obj2)
2410
-
2411
- Validates if the two arguments are objects
2412
-
2413
-
2414
-
2415
-
2416
- ##### Parameters
2417
-
2418
- | Name | Type | Description | |
2419
- | ---- | ---- | ----------- | -------- |
2420
- | obj1 | | The target object | &nbsp; |
2421
- | obj2 | | The object to be merged | &nbsp; |
2422
-
2423
-
2424
-
2425
-
2426
- ##### Returns
2427
-
2428
-
2429
- - true: they are valid; false: they are not
2430
-
2431
-
2432
-
2433
- #### getParamsToMergeDeep(settings)
2434
-
2435
- Validates and gets the settings with all set parameters.
2436
-
2437
-
2438
-
2439
-
2440
- ##### Parameters
2441
-
2442
- | Name | Type | Description | |
2443
- | ---- | ---- | ----------- | -------- |
2444
- | settings | | the settings object | &nbsp; |
2445
-
2446
-
2447
-
2448
-
2449
- ##### Returns
2450
-
2451
-
2452
- - a new settings object with all set parameters.
2453
-
2454
-
2455
-
2456
-
2457
- ### dist/general/object/objectCopy.js
2458
-
2459
-
2460
- #### objectCopy(entity, cache)
2461
-
2462
- Created a new reference of the given argument
2463
-
2464
-
2465
-
2466
-
2467
- ##### Parameters
2468
-
2469
- | Name | Type | Description | |
2470
- | ---- | ---- | ----------- | -------- |
2471
- | entity | | The variable to be copied | &nbsp; |
2472
- | cache | | | &nbsp; |
2473
-
2474
-
2475
-
2476
-
2477
- ##### Returns
2478
-
2479
-
2480
- - A new reference of the given argument
2481
-
2482
-
2483
-
2484
-
2485
- ### dist/general/object/omit.js
2486
-
2487
-
2488
- #### omit(obj, props)
2489
-
2490
- return a new Object excluding attributes in _props_ list
2491
-
2492
-
2493
-
2494
-
2495
- ##### Parameters
2496
-
2497
- | Name | Type | Description | |
2498
- | ---- | ---- | ----------- | -------- |
2499
- | obj | `Object` | base object | &nbsp; |
2500
- | props | `Array.<String>` | list of attribute to exclude | &nbsp; |
2501
-
2502
-
2503
-
2504
-
2505
- ##### Returns
2506
-
2507
-
2508
- - `Object` clean object
2509
-
2510
-
2511
-
2512
-
2513
- ### dist/general/object/pick.js
2514
-
2515
-
2516
- #### pick(baseObject, keys)
2517
-
2518
- return a new object just with attributes in _keys_ list
2519
-
2520
-
2521
-
2522
-
2523
- ##### Parameters
2524
-
2525
- | Name | Type | Description | |
2526
- | ---- | ---- | ----------- | -------- |
2527
- | baseObject | `Object` | base object | &nbsp; |
2528
- | keys | `Array.<String>` | list of attributes to preserve | &nbsp; |
2529
-
2530
-
2531
-
2532
-
2533
- ##### Returns
2534
-
2535
-
2536
- - `Object` new object just with desired attributes
2537
-
2538
-
2539
-
2540
-
2541
- ### dist/general/object/serialize.js
2542
-
2543
-
2544
- #### serialize(obj)
2545
-
2546
- serialize object to url param
2547
-
2548
-
2549
-
2550
-
2551
- ##### Parameters
2552
-
2553
- | Name | Type | Description | |
2554
- | ---- | ---- | ----------- | -------- |
2555
- | obj | | - Object to be serialized | &nbsp; |
2556
-
2557
-
2558
-
2559
-
2560
- ##### Returns
2561
-
2562
-
2563
- - `Void`
2564
-
2565
-
2566
-
2567
-
2568
- ### dist/general/string/capitalize.js
2569
-
2570
-
2571
- #### capitalize(text)
2572
-
2573
- Upper case the first letter of a given text
2574
-
2575
-
2576
-
2577
-
2578
- ##### Parameters
2579
-
2580
- | Name | Type | Description | |
2581
- | ---- | ---- | ----------- | -------- |
2582
- | text | `String` | | &nbsp; |
2583
-
2584
-
2585
-
2586
-
2587
- ##### Returns
2588
-
2589
-
2590
- - `String` a capitalized text
2591
-
2592
-
2593
-
2594
-
2595
- ### dist/qrvey/helpers/getColumnsLabel.js
2596
-
2597
-
2598
- #### getColumnLabels(column)
2599
-
2600
- Get an string of the properties of the given column.
2601
-
2602
-
2603
-
2604
-
2605
- ##### Parameters
2606
-
2607
- | Name | Type | Description | |
2608
- | ---- | ---- | ----------- | -------- |
2609
- | column | | The column | &nbsp; |
2610
-
2611
-
2612
-
2613
-
2614
- ##### Returns
2615
-
2616
-
2617
- - an string with the property, aggregate or calculation label.
2618
-
2619
-
2620
-
2621
-
2622
- ### dist/qrvey/helpers/getValueWithSuffixes.js
2623
-
2624
-
2625
- #### getValueWithSuffixes(value, suffixes)
2626
-
2627
- Get a string value with suffixes if available.
2628
- Add suffix into the value string. Prioritized for numeric values.
2629
-
2630
-
2631
-
2632
-
2633
- ##### Parameters
2634
-
2635
- | Name | Type | Description | |
2636
- | ---- | ---- | ----------- | -------- |
2637
- | value | | a number or string | &nbsp; |
2638
- | suffixes | | An object with singular or plural suffix string. | &nbsp; |
2639
-
2640
-
2641
-
2642
-
2643
- ##### Returns
2644
-
2645
-
2646
- - a string value with suffix
2647
-
2648
-
2649
-
2650
-
2651
- ### dist/qrvey/helpers/transformValue.js
2652
-
2653
-
2654
- #### transformValue(value, settings)
2655
-
2656
- Transforms a value depending of localization/globalization and extras settings.
2657
-
2658
-
2659
-
2660
-
2661
- ##### Parameters
2662
-
2663
- | Name | Type | Description | |
2664
- | ---- | ---- | ----------- | -------- |
2665
- | value | | A value to transform | &nbsp; |
2666
- | settings | | The settings of the transformValue function | &nbsp; |
2667
-
2668
-
2669
-
2670
-
2671
- ##### Returns
2672
-
2673
-
2674
- - A transformed value
2675
-
2676
-
2677
-
2678
- #### getOutputFormat(settings)
2679
-
2680
- Gets the outputformat settings
2681
-
2682
-
2683
-
2684
-
2685
- ##### Parameters
2686
-
2687
- | Name | Type | Description | |
2688
- | ---- | ---- | ----------- | -------- |
2689
- | settings | | The settings of the transformValue function | &nbsp; |
2690
-
2691
-
2692
-
2693
-
2694
- ##### Returns
2695
-
2696
-
2697
- - the outputformat settings
2698
-
2699
-
2700
-
2701
- #### getFormatConfig(settings)
2702
-
2703
- Gets the format config
2704
-
2705
-
2706
-
2707
-
2708
- ##### Parameters
2709
-
2710
- | Name | Type | Description | |
2711
- | ---- | ---- | ----------- | -------- |
2712
- | settings | | The settings of the transformValue function | &nbsp; |
2713
-
2714
-
2715
-
2716
-
2717
- ##### Returns
2718
-
2719
-
2720
- - the format config
2721
-
2722
-
2723
-
2724
-
2725
- ### dist/services/api/getAllDatasets.api.js
2726
-
2727
-
2728
- #### getAllDatasets(config, pickDatasets)
2729
-
2730
- Get a dataset list from a collection of Qrvey IDs
2731
-
2732
-
2733
-
2734
-
2735
- ##### Parameters
2736
-
2737
- | Name | Type | Description | |
2738
- | ---- | ---- | ----------- | -------- |
2739
- | config | | the widget config. Includes the appid and others configuration properties | &nbsp; |
2740
- | pickDatasets | | Collection of Qrvey IDs for filtering the request | &nbsp; |
2741
-
2742
-
2743
-
2744
-
2745
- ##### Returns
2746
-
2747
-
2748
- - a promise
2749
-
2750
-
2751
-
2752
-
2753
- ### dist/services/api/getAllQrveys.api.js
2754
-
2755
-
2756
- #### getAllQrveys(config, params)
2757
-
2758
- POST Request for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
2759
-
2760
-
2761
-
2762
-
2763
- ##### Parameters
2764
-
2765
- | Name | Type | Description | |
2766
- | ---- | ---- | ----------- | -------- |
2767
- | config | | Configuration | &nbsp; |
2768
- | params | | Object for getting precise data | &nbsp; |
2769
-
2770
-
2771
-
2772
-
2773
- ##### Returns
2774
-
2775
-
2776
- - `Void`
2777
-
2778
-
2779
-
2780
-
2781
- ### dist/services/api/getDatasetColumns.api.js
2782
-
2783
-
2784
- #### getDatasetColumns(qrveyid)
2785
-
2786
- Get a dataset by Qrvey ID
2787
-
2788
-
2789
-
2790
-
2791
- ##### Parameters
2792
-
2793
- | Name | Type | Description | |
2794
- | ---- | ---- | ----------- | -------- |
2795
- | qrveyid | | The Qrvey ID | &nbsp; |
2796
-
2797
-
2798
-
2799
-
2800
- ##### Returns
2801
-
2802
-
2803
- - a promise
2804
-
2805
-
2806
-
2807
-
2808
- ### dist/stencil/decorators/Config.js
2809
-
2810
-
2811
- #### Config()
2812
-
2813
- Stencil.js - Prop Decorator
2814
- Get and Parse the Widget Configuration Object and also provide the ability to get properties in different case styles such as: lower, upper, camel and pascal
2815
- But for this, is required ask for a property in `snake_case` style
2816
-
2817
-
2818
-
2819
-
2820
-
2821
-
2822
- ##### Examples
2823
-
2824
- ```javascript
2825
- \ @Config() @Prop() settings;
2826
-
2827
- someMethod() {
2828
- this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
2829
- }
2830
- ```
2831
-
2832
-
2833
- ##### Returns
2834
-
2835
-
2836
- - `Void`
2837
-
2838
-
2839
-
2840
-
2841
- ### dist/stencil/util/createRef.js
2842
-
2843
-
2844
- #### createRef()
2845
-
2846
- lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom.html)
2847
-
2848
-
2849
-
2850
-
2851
-
2852
-
2853
- ##### Returns
2854
-
2855
-
2856
- - function - Function to use in ref prop in html elements
2857
-
2858
-
2859
-
2860
-
2861
- ### dist/stencil/util/getConfig.js
2862
-
2863
-
2864
- #### getConfig(cfg)
2865
-
2866
- verify the Config object type and try to return a parsed Object
2867
- - In case _cfg_ is a string, first try to make a JSON parse in other case
2868
- try to find this string as a variable on Windows object
2869
- - If _cfg_ is a fuction, tis is invoked and parsed
2870
- - Finally, if is an object, _cfg_ is inmediatly returned
2871
-
2872
-
2873
-
2874
-
2875
- ##### Parameters
2876
-
2877
- | Name | Type | Description | |
2878
- | ---- | ---- | ----------- | -------- |
2879
- | cfg | | | &nbsp; |
2880
-
2881
-
2882
-
2883
-
2884
- ##### Returns
2885
-
2886
-
2887
- - `Void`
2888
-
2889
-
2890
-
2891
-
2892
- ### dist/typescript/decorators/Throttled.js
2893
-
2894
-
2895
- #### Throttled(time)
2896
-
2897
- (Method Decorator) Throttled Class Method
2898
-
2899
-
2900
-
2901
-
2902
- ##### Parameters
2903
-
2904
- | Name | Type | Description | |
2905
- | ---- | ---- | ----------- | -------- |
2906
- | time | | (optional) deafult 500 | &nbsp; |
2907
-
2908
-
2909
-
2910
-
2911
- ##### Returns
2912
-
2913
-
2914
- - `Void`
2915
-
2916
-
2917
-
2918
-
2919
- ### dist/typescript/decorators/Debounce.js
2920
-
2921
-
2922
- #### Debounce(time)
2923
-
2924
- (Method Decorator) Debounce Class Method
2925
-
2926
-
2927
-
2928
-
2929
- ##### Parameters
2930
-
2931
- | Name | Type | Description | |
2932
- | ---- | ---- | ----------- | -------- |
2933
- | time | | (optional) deafult 500 | &nbsp; |
2934
-
2935
-
2936
-
2937
-
2938
- ##### Returns
2939
-
2940
-
2941
- - `Void`
2942
-
2943
-
2944
-
2945
-
2946
- ### dist/dates/relative/helpers/formatStatement.js
2947
-
2948
-
2949
- #### formatStatement(statement)
2950
-
2951
- Build a proper relative date statement type
2952
-
2953
-
2954
-
2955
-
2956
- ##### Parameters
2957
-
2958
- | Name | Type | Description | |
2959
- | ---- | ---- | ----------- | -------- |
2960
- | statement | `RelativeStatement` | | &nbsp; |
2961
-
2962
-
2963
-
2964
-
2965
- ##### Returns
2966
-
2967
-
2968
- - `RelativeStatement`
2969
-
2970
-
2971
-
2972
-
2973
- ### dist/dates/relative/helpers/getStatementCase.js
2974
-
2975
-
2976
- #### getStatementCase(includeCurrent, isCalendarDate)
2977
-
2978
- Returns a number/constant that identifies a relative date case
2979
-
2980
-
2981
-
2982
-
2983
- ##### Parameters
2984
-
2985
- | Name | Type | Description | |
2986
- | ---- | ---- | ----------- | -------- |
2987
- | includeCurrent | `boolean` | | &nbsp; |
2988
- | isCalendarDate | `boolean` | | &nbsp; |
2989
-
2990
-
2991
-
2992
-
2993
- ##### Returns
2994
-
2995
-
2996
- - `number`
2997
-
2998
-
2999
-
3000
-
3001
- ### dist/dates/relative/helpers/parseDate.js
3002
-
3003
-
3004
- #### parseDate(date)
3005
-
3006
- Parses a string date and returns a dayjs date
3007
-
3008
-
3009
-
3010
-
3011
- ##### Parameters
3012
-
3013
- | Name | Type | Description | |
3014
- | ---- | ---- | ----------- | -------- |
3015
- | date | `string` `Dayjs` `Date` | | &nbsp; |
3016
-
3017
-
3018
-
3019
-
3020
- ##### Returns
3021
-
3022
-
3023
- - `Dayjs` A dayjs date
3024
-
3025
-
3026
-
3027
-
3028
- ### dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js
3029
-
3030
-
3031
- #### getFilterBuilderGeneralConfig(config)
3032
-
3033
- Returns a filter builder config object by a any given config
3034
-
3035
-
3036
-
3037
-
3038
- ##### Parameters
3039
-
3040
- | Name | Type | Description | |
3041
- | ---- | ---- | ----------- | -------- |
3042
- | config | | any config object | &nbsp; |
3043
-
3044
-
3045
-
3046
-
3047
- ##### Returns
3048
-
3049
-
3050
- - The filter builder config object
3051
-
3052
-
3053
-
3054
-
3055
- ### dist/filters/helpers/backend/buildExpression.js
3056
-
3057
-
3058
- #### buildExpression(filter)
3059
-
3060
- Builds filter expression by the filter data.
3061
- - If the resulting value array is empty the enabled property will be false.
3062
-
3063
-
3064
-
3065
-
3066
- ##### Parameters
3067
-
3068
- | Name | Type | Description | |
3069
- | ---- | ---- | ----------- | -------- |
3070
- | filter | | The filter to transform | &nbsp; |
3071
-
3072
-
3073
-
3074
-
3075
- ##### Returns
3076
-
3077
-
3078
- - a filter expression
3079
-
3080
-
3081
-
3082
-
3083
- ### dist/filters/helpers/backend/buildUserFilters.js
3084
-
3085
-
3086
- #### buildUserFilters(userFilters)
3087
-
3088
- Transform user Filters array into Filter Logic structure
3089
-
3090
-
3091
-
3092
-
3093
- ##### Parameters
3094
-
3095
- | Name | Type | Description | |
3096
- | ---- | ---- | ----------- | -------- |
3097
- | userFilters | | The filters that the user defined. | &nbsp; |
3098
-
3099
-
3100
-
3101
-
3102
- ##### Returns
3103
-
3104
-
3105
- - The filter logic for the given user filters. if No a given object is recieved, it will return an empty array.
3106
-
3107
-
3108
-
3109
-
3110
- ### dist/filters/helpers/backend/getAggFiltersBySummaryIndex.js
3111
-
3112
-
3113
- #### getAggFiltersBySummaryIndex(aggFilters, summaryIndex)
3114
-
3115
-
3116
-
3117
-
3118
-
3119
-
3120
- ##### Parameters
3121
-
3122
- | Name | Type | Description | |
3123
- | ---- | ---- | ----------- | -------- |
3124
- | aggFilters | | | &nbsp; |
3125
- | summaryIndex | | | &nbsp; |
3126
-
3127
-
3128
-
3129
-
3130
- ##### Returns
3131
-
3132
-
3133
- -
3134
-
3135
-
3136
-
3137
-
3138
- ### dist/filters/helpers/backend/getBackendGroupValue.js
3139
-
3140
-
3141
- #### getBackendGroupValue(filter)
3142
-
3143
- Gets a group value for the backend logic structure
3144
-
3145
-
3146
-
3147
-
3148
- ##### Parameters
3149
-
3150
- | Name | Type | Description | |
3151
- | ---- | ---- | ----------- | -------- |
3152
- | filter | | The filter | &nbsp; |
3153
-
3154
-
3155
-
3156
-
3157
- ##### Returns
3158
-
3159
-
3160
- - a property
3161
-
3162
-
3163
-
3164
-
3165
- ### dist/filters/helpers/backend/getBackendProperty.js
3166
-
3167
-
3168
- #### getBackendProperty(filter)
3169
-
3170
- Gets a property for the logic structure
3171
-
3172
-
3173
-
3174
-
3175
- ##### Parameters
3176
-
3177
- | Name | Type | Description | |
3178
- | ---- | ---- | ----------- | -------- |
3179
- | filter | | The filter | &nbsp; |
3180
-
3181
-
3182
-
3183
-
3184
- ##### Returns
3185
-
3186
-
3187
- - a property
3188
-
3189
-
3190
-
3191
-
3192
- ### dist/filters/helpers/backend/getBackendValidator.js
3193
-
3194
-
3195
- #### getBackendValidator(validator)
3196
-
3197
- Gets the Validator that is used in requests
3198
-
3199
-
3200
-
3201
-
3202
- ##### Parameters
3203
-
3204
- | Name | Type | Description | |
3205
- | ---- | ---- | ----------- | -------- |
3206
- | validator | | Filter Validator used in UI | &nbsp; |
3207
-
3208
-
3209
-
3210
-
3211
- ##### Returns
3212
-
3213
-
3214
- - Filter Validator used in Backend
3215
-
3216
-
3217
-
3218
-
3219
- ### dist/filters/helpers/backend/getBackendValues.js
3220
-
3221
-
3222
- #### getBackendValues(filter)
3223
-
3224
- Gets the expresion values in the logic format
3225
-
3226
-
3227
-
3228
-
3229
- ##### Parameters
3230
-
3231
- | Name | Type | Description | |
3232
- | ---- | ---- | ----------- | -------- |
3233
- | filter | | The filter structure | &nbsp; |
3234
-
3235
-
3236
-
3237
-
3238
- ##### Returns
3239
-
3240
-
3241
- - A collection of backend expression value
3242
-
3243
-
3244
-
3245
- #### getResultValues(values, filter)
3246
-
3247
- Gets the expression values. Depending on the column type
3248
-
3249
-
3250
-
3251
-
3252
- ##### Parameters
3253
-
3254
- | Name | Type | Description | |
3255
- | ---- | ---- | ----------- | -------- |
3256
- | values | | a collection of filter values | &nbsp; |
3257
- | filter | | The filter structure | &nbsp; |
3258
-
3259
-
3260
-
3261
-
3262
- ##### Returns
3263
-
3264
-
3265
- -
3266
-
3267
-
3268
-
3269
- #### getRankingValues(values, rankingGroupIndex)
3270
-
3271
- Gets the Ranking values.
3272
-
3273
-
3274
-
3275
-
3276
- ##### Parameters
3277
-
3278
- | Name | Type | Description | |
3279
- | ---- | ---- | ----------- | -------- |
3280
- | values | | a collection of filter values in the ranking structure | &nbsp; |
3281
- | rankingGroupIndex | | determine the value by this index to build and return it | &nbsp; |
3282
-
3283
-
3284
-
3285
-
3286
- ##### Returns
3287
-
3288
-
3289
- - Expression values for ranking
3290
-
3291
-
3292
-
3293
-
3294
- ### dist/filters/helpers/backend/getLogicByScopes.js
3295
-
3296
-
3297
- #### getLogicByScopes(logics, scopes)
3298
-
3299
- Gets the filters from logic data by Scopes/Scope IDs.
3300
-
3301
-
3302
-
3303
-
3304
- ##### Parameters
3305
-
3306
- | Name | Type | Description | |
3307
- | ---- | ---- | ----------- | -------- |
3308
- | logics | | The logic array | &nbsp; |
3309
- | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3310
-
3311
-
3312
-
3313
-
3314
- ##### Returns
3315
-
3316
-
3317
- - a new Logic array
3318
-
3319
-
3320
-
3321
-
3322
- ### dist/filters/helpers/backend/getLogicByScopesHierarchy.js
3323
-
3324
-
3325
- #### getLogicByScopesHierarchy(filterData, scopes, currentScope)
3326
-
3327
- Gets filters from the logic by the scopes hierarchy.
3328
-
3329
-
3330
-
3331
-
3332
- ##### Parameters
3333
-
3334
- | Name | Type | Description | |
3335
- | ---- | ---- | ----------- | -------- |
3336
- | filterData | | | &nbsp; |
3337
- | scopes | | | &nbsp; |
3338
- | currentScope | | | &nbsp; |
3339
-
3340
-
3341
-
3342
-
3343
- ##### Returns
3344
-
3345
-
3346
- - a new array of Logic
3347
-
3348
-
3349
-
3350
-
3351
- ### dist/filters/helpers/common/areFiltersEquals.js
3352
-
3353
-
3354
- #### areFiltersEquals(filter1, filter2)
3355
-
3356
- Validates if both filters are the same
3357
-
3358
-
3359
-
3360
-
3361
- ##### Parameters
3362
-
3363
- | Name | Type | Description | |
3364
- | ---- | ---- | ----------- | -------- |
3365
- | filter1 | | filter 1 | &nbsp; |
3366
- | filter2 | | filter 2 | &nbsp; |
3367
-
3368
-
3369
-
3370
-
3371
- ##### Returns
3372
-
3373
-
3374
- - true: the filters are equal; false: the filters are NOT equal
3375
-
3376
-
3377
-
3378
-
3379
- ### dist/filters/helpers/common/excludeFiltersByAggregateColumn.js
3380
-
3381
-
3382
- #### excludeFiltersByAggregateColumn(filterData)
3383
-
3384
- Excludes Aggregate Filters in the Filter Data. Excluding filters when the column.aggregate is included.
3385
-
3386
-
3387
-
3388
-
3389
- ##### Parameters
3390
-
3391
- | Name | Type | Description | |
3392
- | ---- | ---- | ----------- | -------- |
3393
- | filterData | | The filter data object | &nbsp; |
3394
-
3395
-
3396
-
3397
-
3398
- ##### Returns
3399
-
3400
-
3401
- - The new filter data object that were excluded the aggregate filters
3402
-
3403
-
3404
-
3405
-
3406
- ### dist/filters/helpers/common/excludeFiltersByParams.js
3407
-
3408
-
3409
- #### excludeFiltersByParams(filterData, params)
3410
-
3411
- Excludes filters from the given Filters.
3412
- The validation to filter the stored filter is depending on:
3413
- - Column
3414
- - Qrvey ID
3415
- - Scope type
3416
- - Scope ID
3417
- - Panel ID
3418
- - Validator type
3419
- - Property type
3420
- - Enabled flags
3421
-
3422
-
3423
-
3424
-
3425
- ##### Parameters
3426
-
3427
- | Name | Type | Description | |
3428
- | ---- | ---- | ----------- | -------- |
3429
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3430
- | params | | given parameters to validate the filter data | &nbsp; |
3431
-
3432
-
3433
-
3434
-
3435
- ##### Returns
3436
-
3437
-
3438
- - a new Filter object structure
3439
-
3440
-
3441
-
3442
-
3443
- ### dist/filters/helpers/common/excludeFiltersByScopes.js
3444
-
3445
-
3446
- #### excludeFiltersByScopes(filterData, scopes)
3447
-
3448
- Excludes and returns a filter data without filters by the given scopes
3449
-
3450
-
3451
-
3452
-
3453
- ##### Parameters
3454
-
3455
- | Name | Type | Description | |
3456
- | ---- | ---- | ----------- | -------- |
3457
- | filterData | | The Filter Data | &nbsp; |
3458
- | scopes | | collection of scopes to be as filtering parameters | &nbsp; |
3459
-
3460
-
3461
-
3462
-
3463
- ##### Returns
3464
-
3465
-
3466
- - The new Filter Data without filters by the given scopes.
3467
-
3468
-
3469
-
3470
-
3471
- ### dist/filters/helpers/common/getFilterColumnLabel.js
3472
-
3473
-
3474
- #### getFilterColumnLabel(column)
3475
-
3476
- Get an string of the properties of the given filter column.
3477
-
3478
-
3479
-
3480
-
3481
- ##### Parameters
3482
-
3483
- | Name | Type | Description | |
3484
- | ---- | ---- | ----------- | -------- |
3485
- | column | | The filter column | &nbsp; |
3486
-
3487
-
3488
-
3489
-
3490
- ##### Returns
3491
-
3492
-
3493
- - an string with the property, aggregate or calculation label.
3494
-
3495
-
3496
-
3497
-
3498
- ### dist/filters/helpers/common/getFilterid.js
3499
-
3500
-
3501
- #### getFilterid(filter)
3502
-
3503
- Get the Filter ID by the filter structure
3504
- The order of the epression ID is:
3505
- - Scope Type
3506
- - scopeid
3507
- - qrveyid
3508
- - panelid
3509
- - columnid
3510
- - validator
3511
- - property
3512
- - Column Aggregate
3513
- - Column Calculation
3514
- - Optional Index
3515
-
3516
-
3517
-
3518
-
3519
- ##### Parameters
3520
-
3521
- | Name | Type | Description | |
3522
- | ---- | ---- | ----------- | -------- |
3523
- | filter | | the filter structure | &nbsp; |
3524
-
3525
-
3526
-
3527
-
3528
- ##### Returns
3529
-
3530
-
3531
- - a text to identify the filter
3532
-
3533
-
3534
-
3535
-
3536
- ### dist/filters/helpers/common/getFilterLabel.js
3537
-
3538
-
3539
- #### getFilterLabel(filter)
3540
-
3541
- Gets the Filter Label + Column label
3542
-
3543
-
3544
-
3545
-
3546
- ##### Parameters
3547
-
3548
- | Name | Type | Description | |
3549
- | ---- | ---- | ----------- | -------- |
3550
- | filter | | the UI filter | &nbsp; |
3551
-
3552
-
3553
-
3554
-
3555
- ##### Returns
3556
-
3557
-
3558
- - a sring label
3559
-
3560
-
3561
-
3562
-
3563
- ### dist/filters/helpers/common/getFiltersByAggregateColumn.js
3564
-
3565
-
3566
- #### getFiltersByAggregateColumn(filterData)
3567
-
3568
- Gets Aggregate Filters in the Filter Data. Gets the filters when the column.aggregate is included.
3569
-
3570
-
3571
-
3572
-
3573
- ##### Parameters
3574
-
3575
- | Name | Type | Description | |
3576
- | ---- | ---- | ----------- | -------- |
3577
- | filterData | | The filter data object | &nbsp; |
3578
-
3579
-
3580
-
3581
-
3582
- ##### Returns
3583
-
3584
-
3585
- - The new filter data object that were get the aggregate filters
3586
-
3587
-
3588
-
3589
-
3590
- ### dist/filters/helpers/common/getFiltersByParams.js
3591
-
3592
-
3593
- #### getFiltersByParams(filterData, params)
3594
-
3595
- Gets filters from the given params.
3596
- The validation to filter the stored filter is depending on:
3597
- - Column
3598
- - Qrvey ID
3599
- - Scope type
3600
- - Scope ID
3601
- - Panel ID
3602
- - Validator type
3603
- - Property type
3604
- - Enabled flags
3605
-
3606
-
3607
-
3608
-
3609
- ##### Parameters
3610
-
3611
- | Name | Type | Description | |
3612
- | ---- | ---- | ----------- | -------- |
3613
- | filterData | | The Filter Data or the UI Filter Data | &nbsp; |
3614
- | params | | given parameters to validate the dataset | &nbsp; |
3615
-
3616
-
3617
-
3618
-
3619
- ##### Returns
3620
-
3621
-
3622
- - a new Filter object structure
3623
-
3624
-
3625
-
3626
-
3627
- ### dist/filters/helpers/common/getFiltersByScopes.js
3628
-
3629
-
3630
- #### getFiltersByScopes(filterData, scopes)
3631
-
3632
- Filters and gets a Filter Data by the given scopes
3633
-
3634
-
3635
-
3636
-
3637
- ##### Parameters
3638
-
3639
- | Name | Type | Description | |
3640
- | ---- | ---- | ----------- | -------- |
3641
- | filterData | | The Filter Data | &nbsp; |
3642
- | scopes | | collection of scopes types | &nbsp; |
3643
-
3644
-
3645
-
3646
-
3647
- ##### Returns
3648
-
3649
-
3650
- - The new Filter Data
3651
-
3652
-
3653
-
3654
-
3655
- ### dist/filters/helpers/common/getFiltersByScopesIds.js
3656
-
3657
-
3658
- #### getFiltersByScopesIds(filterData, scopes)
3659
-
3660
- Gets filters from Filter Data by Scopes/Scope IDs.
3661
-
3662
-
3663
-
3664
-
3665
- ##### Parameters
3666
-
3667
- | Name | Type | Description | |
3668
- | ---- | ---- | ----------- | -------- |
3669
- | filterData | | The filter data | &nbsp; |
3670
- | scopes | | The collection of Scopes/Scope IDs | &nbsp; |
3671
-
3672
-
3673
-
3674
-
3675
- ##### Returns
3676
-
3677
-
3678
- - a new Filter Data
3679
-
3680
-
3681
-
3682
-
3683
- ### dist/filters/helpers/common/getFiltersByVisibility.js
3684
-
3685
-
3686
- #### getFiltersByVisibility(filterData, scopes)
3687
-
3688
- Get a new Filter Data by filtering scopes/scope IDs and enabled flags
3689
-
3690
-
3691
-
3692
-
3693
- ##### Parameters
3694
-
3695
- | Name | Type | Description | |
3696
- | ---- | ---- | ----------- | -------- |
3697
- | filterData | | a Filter Data or UI Filter Data | &nbsp; |
3698
- | scopes | | a Scopes/Scope IDs array | &nbsp; |
3699
-
3700
-
3701
-
3702
-
3703
- ##### Returns
3704
-
3705
-
3706
- - a new Filter Data
3707
-
3708
-
3709
-
3710
-
3711
- ### dist/filters/helpers/common/getMergeFiltersSettings.js
3712
-
3713
-
3714
- #### getMergeFiltersSettings(settings)
3715
-
3716
- Transforms the given MergeFilters settings object. Adds the missing properties if they do not exist.
3717
-
3718
-
3719
-
3720
-
3721
- ##### Parameters
3722
-
3723
- | Name | Type | Description | |
3724
- | ---- | ---- | ----------- | -------- |
3725
- | settings | | an object to the MergeFilters settings | &nbsp; |
3726
-
3727
-
3728
-
3729
-
3730
- ##### Returns
3731
-
3732
-
3733
- - a new MergeFilters settings object.
3734
-
3735
-
3736
-
3737
-
3738
- ### dist/filters/helpers/common/getParamsToGetFilterSettings.js
3739
-
3740
-
3741
- #### getParamsToGetFilterSettings(settings)
3742
-
3743
- Transforms the given ParamsToGetFilter settings object. Adds the missing properties if they do not exist.
3744
-
3745
-
3746
-
3747
-
3748
- ##### Parameters
3749
-
3750
- | Name | Type | Description | |
3751
- | ---- | ---- | ----------- | -------- |
3752
- | settings | | an object to the ParamsToGetFilter settings | &nbsp; |
3753
-
3754
-
3755
-
3756
-
3757
- ##### Returns
3758
-
3759
-
3760
- - a new ParamsToGetFilter settings object.
3761
-
3762
-
3763
-
3764
-
3765
- ### dist/filters/helpers/common/haveFiltersByDataset.js
3766
-
3767
-
3768
- #### haveFiltersByDataset(filterData, qrveyid)
3769
-
3770
- Validates if the filter data has filters by a dataset ID (Qrvey ID).
3771
-
3772
-
3773
-
3774
-
3775
- ##### Parameters
3776
-
3777
- | Name | Type | Description | |
3778
- | ---- | ---- | ----------- | -------- |
3779
- | filterData | | the filter data or the UI filter data. | &nbsp; |
3780
- | qrveyid | | The Qrvey ID | &nbsp; |
3781
-
3782
-
3783
-
3784
-
3785
- ##### Returns
3786
-
3787
-
3788
- - true: the filter data has filters by the Qrvey ID
3789
-
3790
-
3791
-
3792
-
3793
- ### dist/filters/helpers/common/isBetweenValidator.js
3794
-
3795
-
3796
- #### isBetweenValidator(validator)
3797
-
3798
- Validates if the given validator is a Between type
3799
-
3800
-
3801
-
3802
-
3803
- ##### Parameters
3804
-
3805
- | Name | Type | Description | |
3806
- | ---- | ---- | ----------- | -------- |
3807
- | validator | | The validator | &nbsp; |
3808
-
3809
-
3810
-
3811
-
3812
- ##### Returns
3813
-
3814
-
3815
- - true: it is a between validator; false: it is not a between validator
3816
-
3817
-
3818
-
3819
-
3820
- ### dist/filters/helpers/common/isDateDistinctProperty.js
3821
-
3822
-
3823
- #### isDateDistinctProperty(column, property)
3824
-
3825
- Determines if the filter column and property is a distinct group dates type
3826
-
3827
-
3828
-
3829
-
3830
- ##### Parameters
3831
-
3832
- | Name | Type | Description | |
3833
- | ---- | ---- | ----------- | -------- |
3834
- | column | | The filter column | &nbsp; |
3835
- | property | | The filter property | &nbsp; |
3836
-
3837
-
3838
-
3839
-
3840
- ##### Returns
3841
-
3842
-
3843
- - True if the given property is included from distinct group dates type
3844
-
3845
-
3846
-
3847
-
3848
- ### dist/filters/helpers/common/isInValidator.js
3849
-
3850
-
3851
- #### isInValidator(validator)
3852
-
3853
- Validates if the given validator is a In type
3854
-
3855
-
3856
-
3857
-
3858
- ##### Parameters
3859
-
3860
- | Name | Type | Description | |
3861
- | ---- | ---- | ----------- | -------- |
3862
- | validator | | The validator | &nbsp; |
3863
-
3864
-
3865
-
3866
-
3867
- ##### Returns
3868
-
3869
-
3870
- - true: it is a In validator; false: it is not a In validator
3871
-
3872
-
3873
-
3874
-
3875
- ### dist/filters/helpers/common/isNullValidator.js
3876
-
3877
-
3878
- #### isNullValidator(validator)
3879
-
3880
- Checks if the given validator is a Null type.
3881
-
3882
-
3883
-
3884
-
3885
- ##### Parameters
3886
-
3887
- | Name | Type | Description | |
3888
- | ---- | ---- | ----------- | -------- |
3889
- | validator | | The Filter Validator | &nbsp; |
3890
-
3891
-
3892
-
3893
-
3894
- ##### Returns
3895
-
3896
-
3897
- - True: It is a Null Validator; False: It is not a Null Validator.
3898
-
3899
-
3900
-
3901
-
3902
- ### dist/filters/helpers/common/isRangeValidator.js
3903
-
3904
-
3905
- #### isRangeValidator(validator)
3906
-
3907
- Validates if the given validator is a Range type. Range type means the value has min and max values to filter
3908
-
3909
-
3910
-
3911
-
3912
- ##### Parameters
3913
-
3914
- | Name | Type | Description | |
3915
- | ---- | ---- | ----------- | -------- |
3916
- | validator | | The filter validator | &nbsp; |
3917
-
3918
-
3919
-
3920
-
3921
- ##### Returns
3922
-
3923
-
3924
- - true: it is a range validator
3925
-
3926
-
3927
-
3928
-
3929
- ### dist/filters/helpers/common/isRegularValidator.js
3930
-
3931
-
3932
- #### isRegularValidator(validator)
3933
-
3934
- Validates if the given validator is a regular type. Regular type means the filter object has a value as string to filter
3935
-
3936
-
3937
-
3938
-
3939
- ##### Parameters
3940
-
3941
- | Name | Type | Description | |
3942
- | ---- | ---- | ----------- | -------- |
3943
- | validator | | The filter validator | &nbsp; |
3944
-
3945
-
3946
-
3947
-
3948
- ##### Returns
3949
-
3950
-
3951
- - true: it is a range validator
3952
-
3953
-
3954
-
3955
-
3956
- ### dist/filters/helpers/common/mergeFilters.js
3957
-
3958
-
3959
- #### mergeFilters(filterData1, filterData2, overwriteValues)
3960
-
3961
- Merge filter data structures in a new one. The first Filter Data passed in the argument has the priority
3962
-
3963
-
3964
-
3965
-
3966
- ##### Parameters
3967
-
3968
- | Name | Type | Description | |
3969
- | ---- | ---- | ----------- | -------- |
3970
- | filterData1 | | The target filter data | &nbsp; |
3971
- | filterData2 | | the filter data to be merged | &nbsp; |
3972
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3973
-
3974
-
3975
-
3976
-
3977
- ##### Returns
3978
-
3979
-
3980
- - a new filter data structure
3981
-
3982
-
3983
-
3984
- #### mergeScopes(scopes1, scopes2, overwriteValues)
3985
-
3986
- Gets a new scope structure array by merging two scope structures
3987
-
3988
-
3989
-
3990
-
3991
- ##### Parameters
3992
-
3993
- | Name | Type | Description | |
3994
- | ---- | ---- | ----------- | -------- |
3995
- | scopes1 | | the target scope structure | &nbsp; |
3996
- | scopes2 | | the scope to be merged | &nbsp; |
3997
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
3998
-
3999
-
4000
-
4001
-
4002
- ##### Returns
4003
-
4004
-
4005
- - a new scope structure array
4006
-
4007
-
4008
-
4009
- #### mergeDatasets(datasets1, datasets2, overwriteValues)
4010
-
4011
- Gets a new dataset structure array by merging two dataset structures
4012
-
4013
-
4014
-
4015
-
4016
- ##### Parameters
4017
-
4018
- | Name | Type | Description | |
4019
- | ---- | ---- | ----------- | -------- |
4020
- | datasets1 | | the target dataset structure | &nbsp; |
4021
- | datasets2 | | the dataset to be merged | &nbsp; |
4022
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4023
-
4024
-
4025
-
4026
-
4027
- ##### Returns
4028
-
4029
-
4030
- - a new dataset structure array
4031
-
4032
-
4033
-
4034
- #### mergeFilterss(filters1, filters2, overwriteValues)
4035
-
4036
- Gets a new filter structure array by merging two filter structures
4037
-
4038
-
4039
-
4040
-
4041
- ##### Parameters
4042
-
4043
- | Name | Type | Description | |
4044
- | ---- | ---- | ----------- | -------- |
4045
- | filters1 | | the target filter structure | &nbsp; |
4046
- | filters2 | | the filter to be merged | &nbsp; |
4047
- | overwriteValues | | Flag to overwrite or not the filter values | &nbsp; |
4048
-
4049
-
4050
-
4051
-
4052
- ##### Returns
4053
-
4054
-
4055
- - a new filter structure array
4056
-
4057
-
4058
-
4059
- #### mergeValues(filter1, filter2, overwrite)
4060
-
4061
- Gets a new value structure array by merging two value structures
4062
-
4063
-
4064
-
4065
-
4066
- ##### Parameters
4067
-
4068
- | Name | Type | Description | |
4069
- | ---- | ---- | ----------- | -------- |
4070
- | filter1 | | the target filter structure | &nbsp; |
4071
- | filter2 | | the filter to be used to merge the values | &nbsp; |
4072
- | overwrite | | Flag to overwrite or not the filter values | &nbsp; |
4073
-
4074
-
4075
-
4076
-
4077
- ##### Returns
4078
-
4079
-
4080
- - a new value structure array
4081
-
4082
-
4083
-
4084
-
4085
- ### dist/filters/helpers/common/resolveDatasetConditions.js
4086
-
4087
-
4088
- #### resolveDatasetConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4089
-
4090
- Resolves the conditions by given params
4091
-
4092
-
4093
-
4094
-
4095
- ##### Parameters
4096
-
4097
- | Name | Type | Description | |
4098
- | ---- | ---- | ----------- | -------- |
4099
- | filter | | The dataset structure | &nbsp; |
4100
- | params | | given parameters to validate the dataset | &nbsp; |
4101
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4102
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4103
-
4104
-
4105
-
4106
-
4107
- ##### Returns
4108
-
4109
-
4110
- - true: the condition is satisfied
4111
-
4112
-
4113
-
4114
-
4115
- ### dist/filters/helpers/common/resolveFilterConditions.js
4116
-
4117
-
4118
- #### resolveFilterConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4119
-
4120
- Resolves the conditions by given params
4121
-
4122
-
4123
-
4124
-
4125
- ##### Parameters
4126
-
4127
- | Name | Type | Description | |
4128
- | ---- | ---- | ----------- | -------- |
4129
- | filter | | The filter | &nbsp; |
4130
- | params | | given parameters to validate the filter | &nbsp; |
4131
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4132
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4133
-
4134
-
4135
-
4136
-
4137
- ##### Returns
4138
-
4139
-
4140
- - true: the condition is satisfied
4141
-
4142
-
4143
-
4144
-
4145
- ### dist/filters/helpers/common/resolveScopeConditions.js
4146
-
4147
-
4148
- #### resolveScopeConditions(filter, params, letPassUndefinedProperties, letPassUndefinedParams)
4149
-
4150
- Resolves the conditions by given params
4151
-
4152
-
4153
-
4154
-
4155
- ##### Parameters
4156
-
4157
- | Name | Type | Description | |
4158
- | ---- | ---- | ----------- | -------- |
4159
- | filter | | The filter scope structure | &nbsp; |
4160
- | params | | given parameters to validate the filter | &nbsp; |
4161
- | letPassUndefinedProperties | | Flag to avoid applying the condition when the filter properties are undefined | &nbsp; |
4162
- | letPassUndefinedParams | | Flag to avoid applying the condition when the param properties are explicit undefined. | &nbsp; |
4163
-
4164
-
4165
-
4166
-
4167
- ##### Returns
4168
-
4169
-
4170
- - true: the condition is satisfied
4171
-
4172
-
4173
-
4174
-
4175
- ### dist/filters/helpers/ui/excludeUIFiltersByAggregate.js
4176
-
4177
-
4178
- #### excludeUIFiltersByAggregate(uFilters)
4179
-
4180
- Excludes Aggregate Filters in the Flattened UI Filters array
4181
-
4182
-
4183
-
4184
-
4185
- ##### Parameters
4186
-
4187
- | Name | Type | Description | |
4188
- | ---- | ---- | ----------- | -------- |
4189
- | uFilters | | Collection of Flat UI Filters | &nbsp; |
4190
-
4191
-
4192
-
4193
-
4194
- ##### Returns
4195
-
4196
-
4197
- - a new Flat UI Filters that were excluded the aggregate filters
4198
-
4199
-
4200
-
4201
-
4202
- ### dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js
4203
-
4204
-
4205
- #### excludeUIFlatFiltersByScopes(uFilters, scopes)
4206
-
4207
- Excludes and returns a UI Flat Filters without filters by the given scopes
4208
-
4209
-
4210
-
4211
-
4212
- ##### Parameters
4213
-
4214
- | Name | Type | Description | |
4215
- | ---- | ---- | ----------- | -------- |
4216
- | uFilters | | The Flatten UI Filters | &nbsp; |
4217
- | scopes | | collection of scopes types | &nbsp; |
4218
-
4219
-
4220
-
4221
-
4222
- ##### Returns
4223
-
4224
-
4225
- - The new array of UI Flattened filters
4226
-
4227
-
4228
-
4229
-
4230
- ### dist/filters/helpers/ui/getFilterPropertyLabel.js
4231
-
4232
-
4233
- #### getFilterPropertyLabel(filter)
4234
-
4235
- Gets the label of the filter property
4236
-
4237
-
4238
-
4239
-
4240
- ##### Parameters
4241
-
4242
- | Name | Type | Description | |
4243
- | ---- | ---- | ----------- | -------- |
4244
- | filter | | The UI Filter | &nbsp; |
4245
-
4246
-
4247
-
4248
-
4249
- ##### Returns
4250
-
4251
-
4252
- - a string of the filter property label
4253
-
4254
-
4255
-
4256
-
4257
- ### dist/filters/helpers/ui/getOutputFormatByColumn.js
4258
-
4259
-
4260
- #### getOutputFormatByColumn(column, datasets)
4261
-
4262
- Gets output format object from Datasets by the given column. Item of the datasets array must have outputformat item in order to be returned
4263
-
4264
-
4265
-
4266
-
4267
- ##### Parameters
4268
-
4269
- | Name | Type | Description | |
4270
- | ---- | ---- | ----------- | -------- |
4271
- | column | | The column | &nbsp; |
4272
- | datasets | | array of datasets | &nbsp; |
4273
-
4274
-
4275
-
4276
-
4277
- ##### Returns
4278
-
4279
-
4280
- - The output format object
4281
-
4282
-
4283
-
4284
-
4285
- ### dist/filters/helpers/ui/getQrveyIdsByUIFilters.js
4286
-
4287
-
4288
- #### getQrveyIdsByUIFilters(uiFilter)
4289
-
4290
- Gets a collection of Qrvey IDs in the UI Filter structure.
4291
- Looks around all filter structure finding the qrveyid propertty in each dataset
4292
-
4293
-
4294
-
4295
-
4296
- ##### Parameters
4297
-
4298
- | Name | Type | Description | |
4299
- | ---- | ---- | ----------- | -------- |
4300
- | uiFilter | | | &nbsp; |
4301
-
4302
-
4303
-
4304
-
4305
- ##### Returns
4306
-
4307
-
4308
- - `Void`
4309
-
4310
-
4311
-
4312
-
4313
- ### dist/filters/helpers/ui/getUIFlatFilterByParams.js
4314
-
4315
-
4316
- #### getUIFlatFilterByParams()
4317
-
4318
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4319
- The validation to filter the stored filter is depending on:
4320
- - Column
4321
- - Qrvey ID,
4322
- - Scope type
4323
- - Scope ID
4324
- - Panel ID
4325
- - Validator type
4326
- - Property type
4327
-
4328
-
4329
-
4330
-
4331
-
4332
-
4333
- ##### Returns
4334
-
4335
-
4336
- - The index of the uFilter array or the Filter object s
4337
-
4338
-
4339
-
4340
-
4341
- ### dist/filters/helpers/ui/getUIFlatFiltersByParams.js
4342
-
4343
-
4344
- #### getUIFlatFiltersByParams()
4345
-
4346
- Gets a filter from the given Flattened UI Filters by given params. Return a index of the array or an object
4347
- The validation to filter the stored filter is depending on:
4348
- - Column
4349
- - Qrvey ID,
4350
- - Scope type
4351
- - Scope ID
4352
- - Panel ID
4353
- - Validator type
4354
- - Property type
4355
- - Enabled flags
4356
-
4357
-
4358
-
4359
-
4360
-
4361
-
4362
- ##### Returns
4363
-
4364
-
4365
- - The index of the uFilter array or the Filter object s
4366
-
4367
-
4368
-
4369
-
4370
- ### dist/filters/helpers/ui/getUIFlatFiltersByScopes.js
4371
-
4372
-
4373
- #### getUIFlatFiltersByScopes(uFilters, scopes)
4374
-
4375
- Filters and gets a UI Flatten Filters by the given scopes
4376
-
4377
-
4378
-
4379
-
4380
- ##### Parameters
4381
-
4382
- | Name | Type | Description | |
4383
- | ---- | ---- | ----------- | -------- |
4384
- | uFilters | | The Flatten UI Filters | &nbsp; |
4385
- | scopes | | collection of scopes types | &nbsp; |
4386
-
4387
-
4388
-
4389
-
4390
- ##### Returns
4391
-
4392
-
4393
- - The new array of UI Flattened filters
4394
-
4395
-
4396
-
4397
-
4398
- ### dist/filters/helpers/ui/getUIValues.js
4399
-
4400
-
4401
- #### getUIValues(filter, addEnableds, rankingGroupIndex)
4402
-
4403
-
4404
-
4405
-
4406
-
4407
-
4408
- ##### Parameters
4409
-
4410
- | Name | Type | Description | |
4411
- | ---- | ---- | ----------- | -------- |
4412
- | filter | | | &nbsp; |
4413
- | addEnableds | | | &nbsp; |
4414
- | rankingGroupIndex | | | &nbsp; |
4415
-
4416
-
4417
-
4418
-
4419
- ##### Returns
4420
-
4421
-
4422
- -
4423
-
4424
-
4425
-
4426
-
4427
- ### dist/filters/helpers/ui/getUpdatedUIFilters.js
4428
-
4429
-
4430
- #### getUpdatedUIFilters(data, datasets)
4431
-
4432
- Gets a new UI Filter structure with a datasets/columns info updates
4433
-
4434
-
4435
-
4436
-
4437
- ##### Parameters
4438
-
4439
- | Name | Type | Description | |
4440
- | ---- | ---- | ----------- | -------- |
4441
- | data | | The UI Filter structure | &nbsp; |
4442
- | datasets | | An array of datasets/column info used for updating the data | &nbsp; |
4443
-
4444
-
4445
-
4446
-
4447
- ##### Returns
4448
-
4449
-
4450
- - A new UI FIlter structure
4451
-
4452
-
4453
-
4454
-
4455
- ### dist/filters/helpers/ui/resolveUIFlatFiltersByParams.js
4456
-
4457
-
4458
- #### resolveUIFlatFilterByParams(filter, params)
4459
-
4460
- Resolves conditions between UI flattened filter and given parameters
4461
-
4462
-
4463
-
4464
-
4465
- ##### Parameters
4466
-
4467
- | Name | Type | Description | |
4468
- | ---- | ---- | ----------- | -------- |
4469
- | filter | | UI Flatten Filter | &nbsp; |
4470
- | params | | Parameters to validate | &nbsp; |
4471
-
4472
-
4473
-
4474
-
4475
- ##### Returns
4476
-
4477
-
4478
- - true: the conditions are satisfied.
4479
-
4480
-
4481
-
4482
-
4483
- *Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*