@qrvey/utils 1.2.10-0 → 1.2.10-1
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 +170 -170
- package/dist/cjs/interfaces/general/index.d.ts +0 -1
- package/dist/cjs/interfaces/general/index.js +0 -1
- package/dist/cjs/services/api/getAllDatasets.api.d.ts +2 -2
- package/dist/cjs/services/api/getDatasetColumns.api.d.ts +2 -2
- package/dist/cjs/services/api/getDatasetsByIds.api.d.ts +2 -2
- package/dist/interfaces/general/index.d.ts +0 -1
- package/dist/interfaces/general/index.js +0 -1
- package/dist/services/api/getAllDatasets.api.d.ts +2 -2
- package/dist/services/api/getDatasetColumns.api.d.ts +2 -2
- package/dist/services/api/getDatasetsByIds.api.d.ts +2 -2
- package/package.json +1 -1
- package/src/interfaces/general/index.ts +0 -1
- package/src/services/api/getAllDatasets.api.ts +2 -2
- package/src/services/api/getDatasetColumns.api.ts +2 -2
- package/src/services/api/getDatasetsByIds.api.ts +2 -2
- package/dist/cjs/interfaces/general/IGeneralWidgetConfig.d.ts +0 -12
- package/dist/cjs/interfaces/general/IGeneralWidgetConfig.js +0 -2
- package/dist/interfaces/general/IGeneralWidgetConfig.d.ts +0 -12
- package/dist/interfaces/general/IGeneralWidgetConfig.js +0 -1
- package/src/interfaces/general/IGeneralWidgetConfig.ts +0 -12
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.10-
|
|
1
|
+
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.10-1*
|
|
2
2
|
|
|
3
3
|
> Helper, Utils for all Qrvey Projects
|
|
4
4
|
|
|
@@ -80,6 +80,85 @@ Get a text and evaluate if it matchs with a token box label.
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
+
### dist/columns/helpers/getColumnsLabel.js
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
#### getColumnLabels(column)
|
|
87
|
+
|
|
88
|
+
Get an string of the properties of the given column.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
##### Parameters
|
|
94
|
+
|
|
95
|
+
| Name | Type | Description | |
|
|
96
|
+
| ---- | ---- | ----------- | -------- |
|
|
97
|
+
| column | | The column | |
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
##### Returns
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
- an string with the property, aggregate or calculation label.
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### dist/columns/helpers/getModelColumn.js
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
#### getModelColumn(column, model)
|
|
114
|
+
|
|
115
|
+
Get a model question by column id.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
##### Parameters
|
|
121
|
+
|
|
122
|
+
| Name | Type | Description | |
|
|
123
|
+
| ---- | ---- | ----------- | -------- |
|
|
124
|
+
| column | | The column with info | |
|
|
125
|
+
| model | | The model object | |
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
##### Returns
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
- the model question
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
#### getQuestionData(model)
|
|
138
|
+
|
|
139
|
+
[TODO: Change the question.data access path. IModel structure is different]
|
|
140
|
+
Get the question data array from model object
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
##### Parameters
|
|
146
|
+
|
|
147
|
+
| Name | Type | Description | |
|
|
148
|
+
| ---- | ---- | ----------- | -------- |
|
|
149
|
+
| model | | The model object | |
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
##### Returns
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
- the question data array from model object
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
83
162
|
### dist/dates/adapters/mdyDateToDate.js
|
|
84
163
|
|
|
85
164
|
|
|
@@ -688,85 +767,6 @@ Output:
|
|
|
688
767
|
|
|
689
768
|
|
|
690
769
|
|
|
691
|
-
### dist/columns/helpers/getColumnsLabel.js
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
#### getColumnLabels(column)
|
|
695
|
-
|
|
696
|
-
Get an string of the properties of the given column.
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
##### Parameters
|
|
702
|
-
|
|
703
|
-
| Name | Type | Description | |
|
|
704
|
-
| ---- | ---- | ----------- | -------- |
|
|
705
|
-
| column | | The column | |
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
##### Returns
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
- an string with the property, aggregate or calculation label.
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
### dist/columns/helpers/getModelColumn.js
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
#### getModelColumn(column, model)
|
|
722
|
-
|
|
723
|
-
Get a model question by column id.
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
##### Parameters
|
|
729
|
-
|
|
730
|
-
| Name | Type | Description | |
|
|
731
|
-
| ---- | ---- | ----------- | -------- |
|
|
732
|
-
| column | | The column with info | |
|
|
733
|
-
| model | | The model object | |
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
##### Returns
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
- the model question
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
#### getQuestionData(model)
|
|
746
|
-
|
|
747
|
-
[TODO: Change the question.data access path. IModel structure is different]
|
|
748
|
-
Get the question data array from model object
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
##### Parameters
|
|
754
|
-
|
|
755
|
-
| Name | Type | Description | |
|
|
756
|
-
| ---- | ---- | ----------- | -------- |
|
|
757
|
-
| model | | The model object | |
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
##### Returns
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
- the question data array from model object
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
770
|
### dist/filters/adapters/FDToFlatUI.js
|
|
771
771
|
|
|
772
772
|
|
|
@@ -2674,12 +2674,12 @@ Flat deeply an array
|
|
|
2674
2674
|
|
|
2675
2675
|
|
|
2676
2676
|
|
|
2677
|
-
### dist/general/array/
|
|
2677
|
+
### dist/general/array/getFirstIndexFromArray.js
|
|
2678
2678
|
|
|
2679
2679
|
|
|
2680
|
-
####
|
|
2680
|
+
#### getFirstIndexFromArray(array, callback)
|
|
2681
2681
|
|
|
2682
|
-
Gets
|
|
2682
|
+
Gets the first index from the array by a callback condition
|
|
2683
2683
|
|
|
2684
2684
|
|
|
2685
2685
|
|
|
@@ -2688,8 +2688,8 @@ Gets a collection of object values by the given property
|
|
|
2688
2688
|
|
|
2689
2689
|
| Name | Type | Description | |
|
|
2690
2690
|
| ---- | ---- | ----------- | -------- |
|
|
2691
|
-
|
|
|
2692
|
-
|
|
|
2691
|
+
| array | | | |
|
|
2692
|
+
| callback | | function callback | |
|
|
2693
2693
|
|
|
2694
2694
|
|
|
2695
2695
|
|
|
@@ -2697,17 +2697,17 @@ Gets a collection of object values by the given property
|
|
|
2697
2697
|
##### Returns
|
|
2698
2698
|
|
|
2699
2699
|
|
|
2700
|
-
-
|
|
2700
|
+
- the first index of the array. -1 when the condition is not satisfied
|
|
2701
2701
|
|
|
2702
2702
|
|
|
2703
2703
|
|
|
2704
2704
|
|
|
2705
|
-
### dist/general/array/
|
|
2705
|
+
### dist/general/array/getArrayByProperty.js
|
|
2706
2706
|
|
|
2707
2707
|
|
|
2708
|
-
####
|
|
2708
|
+
#### getArrayByProperty(arr, property)
|
|
2709
2709
|
|
|
2710
|
-
Gets
|
|
2710
|
+
Gets a collection of object values by the given property
|
|
2711
2711
|
|
|
2712
2712
|
|
|
2713
2713
|
|
|
@@ -2716,8 +2716,8 @@ Gets the first index from the array by a callback condition
|
|
|
2716
2716
|
|
|
2717
2717
|
| Name | Type | Description | |
|
|
2718
2718
|
| ---- | ---- | ----------- | -------- |
|
|
2719
|
-
|
|
|
2720
|
-
|
|
|
2719
|
+
| arr | | An array | |
|
|
2720
|
+
| property | | the property to get the value collection | |
|
|
2721
2721
|
|
|
2722
2722
|
|
|
2723
2723
|
|
|
@@ -2725,7 +2725,7 @@ Gets the first index from the array by a callback condition
|
|
|
2725
2725
|
##### Returns
|
|
2726
2726
|
|
|
2727
2727
|
|
|
2728
|
-
-
|
|
2728
|
+
- a collection of values by property
|
|
2729
2729
|
|
|
2730
2730
|
|
|
2731
2731
|
|
|
@@ -3129,33 +3129,6 @@ Gets the length of the given array.
|
|
|
3129
3129
|
|
|
3130
3130
|
|
|
3131
3131
|
|
|
3132
|
-
### dist/general/string/capitalize.js
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
#### capitalize(text)
|
|
3136
|
-
|
|
3137
|
-
Upper case the first letter of a given text
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
##### Parameters
|
|
3143
|
-
|
|
3144
|
-
| Name | Type | Description | |
|
|
3145
|
-
| ---- | ---- | ----------- | -------- |
|
|
3146
|
-
| text | `String` | | |
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
##### Returns
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
- `String` a capitalized text
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
3132
|
### dist/general/object/cloneDeep.js
|
|
3160
3133
|
|
|
3161
3134
|
|
|
@@ -3380,12 +3353,13 @@ and return a mapped object
|
|
|
3380
3353
|
|
|
3381
3354
|
|
|
3382
3355
|
|
|
3383
|
-
### dist/general/object/
|
|
3356
|
+
### dist/general/object/mergeDeep.js
|
|
3384
3357
|
|
|
3385
3358
|
|
|
3386
|
-
####
|
|
3359
|
+
#### mergeDeep(obj1, obj2, settings)
|
|
3387
3360
|
|
|
3388
|
-
|
|
3361
|
+
Merges two objects into a new one.
|
|
3362
|
+
The second given argument to the first given argument.
|
|
3389
3363
|
|
|
3390
3364
|
|
|
3391
3365
|
|
|
@@ -3394,8 +3368,9 @@ Created a new reference of the given argument
|
|
|
3394
3368
|
|
|
3395
3369
|
| Name | Type | Description | |
|
|
3396
3370
|
| ---- | ---- | ----------- | -------- |
|
|
3397
|
-
|
|
|
3398
|
-
|
|
|
3371
|
+
| obj1 | | The target object | |
|
|
3372
|
+
| obj2 | | The object to be merged | |
|
|
3373
|
+
| settings | | Object settings for this function | |
|
|
3399
3374
|
|
|
3400
3375
|
|
|
3401
3376
|
|
|
@@ -3403,17 +3378,13 @@ Created a new reference of the given argument
|
|
|
3403
3378
|
##### Returns
|
|
3404
3379
|
|
|
3405
3380
|
|
|
3406
|
-
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3381
|
+
- a new merged object
|
|
3409
3382
|
|
|
3410
3383
|
|
|
3411
|
-
### dist/general/object/omit.js
|
|
3412
3384
|
|
|
3385
|
+
#### isValid(obj1, obj2)
|
|
3413
3386
|
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
return a new Object excluding attributes in _props_ list
|
|
3387
|
+
Validates if the two arguments are objects
|
|
3417
3388
|
|
|
3418
3389
|
|
|
3419
3390
|
|
|
@@ -3422,8 +3393,8 @@ return a new Object excluding attributes in _props_ list
|
|
|
3422
3393
|
|
|
3423
3394
|
| Name | Type | Description | |
|
|
3424
3395
|
| ---- | ---- | ----------- | -------- |
|
|
3425
|
-
|
|
|
3426
|
-
|
|
|
3396
|
+
| obj1 | | The target object | |
|
|
3397
|
+
| obj2 | | The object to be merged | |
|
|
3427
3398
|
|
|
3428
3399
|
|
|
3429
3400
|
|
|
@@ -3431,18 +3402,13 @@ return a new Object excluding attributes in _props_ list
|
|
|
3431
3402
|
##### Returns
|
|
3432
3403
|
|
|
3433
3404
|
|
|
3434
|
-
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3405
|
+
- true: they are valid; false: they are not
|
|
3438
3406
|
|
|
3439
|
-
### dist/general/object/mergeDeep.js
|
|
3440
3407
|
|
|
3441
3408
|
|
|
3442
|
-
####
|
|
3409
|
+
#### getParamsToMergeDeep(settings)
|
|
3443
3410
|
|
|
3444
|
-
|
|
3445
|
-
The second given argument to the first given argument.
|
|
3411
|
+
Validates and gets the settings with all set parameters.
|
|
3446
3412
|
|
|
3447
3413
|
|
|
3448
3414
|
|
|
@@ -3451,9 +3417,7 @@ The second given argument to the first given argument.
|
|
|
3451
3417
|
|
|
3452
3418
|
| Name | Type | Description | |
|
|
3453
3419
|
| ---- | ---- | ----------- | -------- |
|
|
3454
|
-
|
|
|
3455
|
-
| obj2 | | The object to be merged | |
|
|
3456
|
-
| settings | | Object settings for this function | |
|
|
3420
|
+
| settings | | the settings object | |
|
|
3457
3421
|
|
|
3458
3422
|
|
|
3459
3423
|
|
|
@@ -3461,13 +3425,17 @@ The second given argument to the first given argument.
|
|
|
3461
3425
|
##### Returns
|
|
3462
3426
|
|
|
3463
3427
|
|
|
3464
|
-
- a new
|
|
3428
|
+
- a new settings object with all set parameters.
|
|
3465
3429
|
|
|
3466
3430
|
|
|
3467
3431
|
|
|
3468
|
-
#### isValid(obj1, obj2)
|
|
3469
3432
|
|
|
3470
|
-
|
|
3433
|
+
### dist/general/object/objectCopy.js
|
|
3434
|
+
|
|
3435
|
+
|
|
3436
|
+
#### objectCopy(entity, cache)
|
|
3437
|
+
|
|
3438
|
+
Created a new reference of the given argument
|
|
3471
3439
|
|
|
3472
3440
|
|
|
3473
3441
|
|
|
@@ -3476,8 +3444,8 @@ Validates if the two arguments are objects
|
|
|
3476
3444
|
|
|
3477
3445
|
| Name | Type | Description | |
|
|
3478
3446
|
| ---- | ---- | ----------- | -------- |
|
|
3479
|
-
|
|
|
3480
|
-
|
|
|
3447
|
+
| entity | | The variable to be copied | |
|
|
3448
|
+
| cache | | | |
|
|
3481
3449
|
|
|
3482
3450
|
|
|
3483
3451
|
|
|
@@ -3485,13 +3453,17 @@ Validates if the two arguments are objects
|
|
|
3485
3453
|
##### Returns
|
|
3486
3454
|
|
|
3487
3455
|
|
|
3488
|
-
-
|
|
3456
|
+
- A new reference of the given argument
|
|
3489
3457
|
|
|
3490
3458
|
|
|
3491
3459
|
|
|
3492
|
-
#### getParamsToMergeDeep(settings)
|
|
3493
3460
|
|
|
3494
|
-
|
|
3461
|
+
### dist/general/object/omit.js
|
|
3462
|
+
|
|
3463
|
+
|
|
3464
|
+
#### omit(obj, props)
|
|
3465
|
+
|
|
3466
|
+
return a new Object excluding attributes in _props_ list
|
|
3495
3467
|
|
|
3496
3468
|
|
|
3497
3469
|
|
|
@@ -3500,7 +3472,8 @@ Validates and gets the settings with all set parameters.
|
|
|
3500
3472
|
|
|
3501
3473
|
| Name | Type | Description | |
|
|
3502
3474
|
| ---- | ---- | ----------- | -------- |
|
|
3503
|
-
|
|
|
3475
|
+
| obj | `Object` | base object | |
|
|
3476
|
+
| props | `Array.<String>` | list of attribute to exclude | |
|
|
3504
3477
|
|
|
3505
3478
|
|
|
3506
3479
|
|
|
@@ -3508,7 +3481,7 @@ Validates and gets the settings with all set parameters.
|
|
|
3508
3481
|
##### Returns
|
|
3509
3482
|
|
|
3510
3483
|
|
|
3511
|
-
-
|
|
3484
|
+
- `Object` clean object
|
|
3512
3485
|
|
|
3513
3486
|
|
|
3514
3487
|
|
|
@@ -3568,6 +3541,33 @@ serialize object to url param
|
|
|
3568
3541
|
|
|
3569
3542
|
|
|
3570
3543
|
|
|
3544
|
+
### dist/general/string/capitalize.js
|
|
3545
|
+
|
|
3546
|
+
|
|
3547
|
+
#### capitalize(text)
|
|
3548
|
+
|
|
3549
|
+
Upper case the first letter of a given text
|
|
3550
|
+
|
|
3551
|
+
|
|
3552
|
+
|
|
3553
|
+
|
|
3554
|
+
##### Parameters
|
|
3555
|
+
|
|
3556
|
+
| Name | Type | Description | |
|
|
3557
|
+
| ---- | ---- | ----------- | -------- |
|
|
3558
|
+
| text | `String` | | |
|
|
3559
|
+
|
|
3560
|
+
|
|
3561
|
+
|
|
3562
|
+
|
|
3563
|
+
##### Returns
|
|
3564
|
+
|
|
3565
|
+
|
|
3566
|
+
- `String` a capitalized text
|
|
3567
|
+
|
|
3568
|
+
|
|
3569
|
+
|
|
3570
|
+
|
|
3571
3571
|
### dist/qrvey/helpers/areStaticColumnValues.js
|
|
3572
3572
|
|
|
3573
3573
|
|
|
@@ -3658,12 +3658,13 @@ For the others columns, answers is located in the property of the same name.
|
|
|
3658
3658
|
|
|
3659
3659
|
|
|
3660
3660
|
|
|
3661
|
-
### dist/qrvey/helpers/
|
|
3661
|
+
### dist/qrvey/helpers/getDropdownAnswers.js
|
|
3662
3662
|
|
|
3663
3663
|
|
|
3664
|
-
####
|
|
3664
|
+
#### getDropdownAnswers(question)
|
|
3665
3665
|
|
|
3666
|
-
Get the answers of
|
|
3666
|
+
Get the answers of dropdown columns.
|
|
3667
|
+
Answers is a direct array of strings so it is necessary to format them.
|
|
3667
3668
|
|
|
3668
3669
|
|
|
3669
3670
|
|
|
@@ -3672,8 +3673,7 @@ Get the answers of expression columns. Depends of the property attribute and if
|
|
|
3672
3673
|
|
|
3673
3674
|
| Name | Type | Description | |
|
|
3674
3675
|
| ---- | ---- | ----------- | -------- |
|
|
3675
|
-
|
|
|
3676
|
-
| property | | Optional Attribute, especially for expression columns. | |
|
|
3676
|
+
| question | | The column located inside the model object. | |
|
|
3677
3677
|
|
|
3678
3678
|
|
|
3679
3679
|
|
|
@@ -3686,13 +3686,12 @@ Get the answers of expression columns. Depends of the property attribute and if
|
|
|
3686
3686
|
|
|
3687
3687
|
|
|
3688
3688
|
|
|
3689
|
-
### dist/qrvey/helpers/
|
|
3689
|
+
### dist/qrvey/helpers/getExpressionAnswers.js
|
|
3690
3690
|
|
|
3691
3691
|
|
|
3692
|
-
####
|
|
3692
|
+
#### getExpressionAnswers(column, property)
|
|
3693
3693
|
|
|
3694
|
-
Get the answers of
|
|
3695
|
-
Answers is a direct array of strings so it is necessary to format them.
|
|
3694
|
+
Get the answers of expression columns. Depends of the property attribute and if the column is categorizable.
|
|
3696
3695
|
|
|
3697
3696
|
|
|
3698
3697
|
|
|
@@ -3701,7 +3700,8 @@ Answers is a direct array of strings so it is necessary to format them.
|
|
|
3701
3700
|
|
|
3702
3701
|
| Name | Type | Description | |
|
|
3703
3702
|
| ---- | ---- | ----------- | -------- |
|
|
3704
|
-
|
|
|
3703
|
+
| column | | The column located inside the model object. | |
|
|
3704
|
+
| property | | Optional Attribute, especially for expression columns. | |
|
|
3705
3705
|
|
|
3706
3706
|
|
|
3707
3707
|
|
|
@@ -4207,12 +4207,12 @@ try to find this string as a variable on Windows object
|
|
|
4207
4207
|
|
|
4208
4208
|
|
|
4209
4209
|
|
|
4210
|
-
### dist/typescript/decorators/
|
|
4210
|
+
### dist/typescript/decorators/Debounce.js
|
|
4211
4211
|
|
|
4212
4212
|
|
|
4213
|
-
####
|
|
4213
|
+
#### Debounce(time)
|
|
4214
4214
|
|
|
4215
|
-
(Method Decorator)
|
|
4215
|
+
(Method Decorator) Debounce Class Method
|
|
4216
4216
|
|
|
4217
4217
|
|
|
4218
4218
|
|
|
@@ -4234,12 +4234,12 @@ try to find this string as a variable on Windows object
|
|
|
4234
4234
|
|
|
4235
4235
|
|
|
4236
4236
|
|
|
4237
|
-
### dist/typescript/decorators/
|
|
4237
|
+
### dist/typescript/decorators/Throttled.js
|
|
4238
4238
|
|
|
4239
4239
|
|
|
4240
|
-
####
|
|
4240
|
+
#### Throttled(time)
|
|
4241
4241
|
|
|
4242
|
-
(Method Decorator)
|
|
4242
|
+
(Method Decorator) Throttled Class Method
|
|
4243
4243
|
|
|
4244
4244
|
|
|
4245
4245
|
|
|
@@ -11,5 +11,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./IGeneralInfo"), exports);
|
|
14
|
-
__exportStar(require("./IGeneralWidgetConfig"), exports);
|
|
15
14
|
__exportStar(require("./IWidgetConfig"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWidgetConfig } from "../../interfaces/general/IWidgetConfig";
|
|
2
2
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
3
3
|
/**
|
|
4
4
|
* Get a dataset list from a collection of Qrvey IDs
|
|
@@ -10,4 +10,4 @@ import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
|
10
10
|
* @param qrveyids Collection of Qrvey IDs for returning a set of available datasets
|
|
11
11
|
* @returns a promise that if it is resolved displays a collection of dataset info.
|
|
12
12
|
*/
|
|
13
|
-
export declare function getAllDatasets(config:
|
|
13
|
+
export declare function getAllDatasets(config: IWidgetConfig, qrveyids?: string[]): Promise<IDataset[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IGeneralWidgetConfig } from '../../interfaces/general/IGeneralWidgetConfig';
|
|
2
1
|
import { IDataset } from '../../qrvey/interfaces/IDataset';
|
|
2
|
+
import { IWidgetConfig } from '../../interfaces/general/IWidgetConfig';
|
|
3
3
|
/**
|
|
4
4
|
* Get a dataset by Qrvey ID
|
|
5
5
|
* @param qrveyid The Qrvey ID
|
|
6
6
|
* @returns a promise
|
|
7
7
|
*/
|
|
8
|
-
export declare function getDatasetColumns(config:
|
|
8
|
+
export declare function getDatasetColumns(config: IWidgetConfig, qrveyid?: string): Promise<IDataset[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IGeneralWidgetConfig } from '../../interfaces/general/IGeneralWidgetConfig';
|
|
2
1
|
import { IDataset } from '../../qrvey/interfaces/IDataset';
|
|
2
|
+
import { IWidgetConfig } from '../../interfaces/general/IWidgetConfig';
|
|
3
3
|
/**
|
|
4
4
|
* Get a dataset by Qrvey ID
|
|
5
5
|
* @param qrveyid The Qrvey ID
|
|
6
6
|
* @returns a promise
|
|
7
7
|
*/
|
|
8
|
-
export declare function getDatasetsByIds(config:
|
|
8
|
+
export declare function getDatasetsByIds(config: IWidgetConfig, qrveyids?: string[]): Promise<IDataset[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWidgetConfig } from "../../interfaces/general/IWidgetConfig";
|
|
2
2
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
3
3
|
/**
|
|
4
4
|
* Get a dataset list from a collection of Qrvey IDs
|
|
@@ -10,4 +10,4 @@ import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
|
10
10
|
* @param qrveyids Collection of Qrvey IDs for returning a set of available datasets
|
|
11
11
|
* @returns a promise that if it is resolved displays a collection of dataset info.
|
|
12
12
|
*/
|
|
13
|
-
export declare function getAllDatasets(config:
|
|
13
|
+
export declare function getAllDatasets(config: IWidgetConfig, qrveyids?: string[]): Promise<IDataset[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IGeneralWidgetConfig } from '../../interfaces/general/IGeneralWidgetConfig';
|
|
2
1
|
import { IDataset } from '../../qrvey/interfaces/IDataset';
|
|
2
|
+
import { IWidgetConfig } from '../../interfaces/general/IWidgetConfig';
|
|
3
3
|
/**
|
|
4
4
|
* Get a dataset by Qrvey ID
|
|
5
5
|
* @param qrveyid The Qrvey ID
|
|
6
6
|
* @returns a promise
|
|
7
7
|
*/
|
|
8
|
-
export declare function getDatasetColumns(config:
|
|
8
|
+
export declare function getDatasetColumns(config: IWidgetConfig, qrveyid?: string): Promise<IDataset[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IGeneralWidgetConfig } from '../../interfaces/general/IGeneralWidgetConfig';
|
|
2
1
|
import { IDataset } from '../../qrvey/interfaces/IDataset';
|
|
2
|
+
import { IWidgetConfig } from '../../interfaces/general/IWidgetConfig';
|
|
3
3
|
/**
|
|
4
4
|
* Get a dataset by Qrvey ID
|
|
5
5
|
* @param qrveyid The Qrvey ID
|
|
6
6
|
* @returns a promise
|
|
7
7
|
*/
|
|
8
|
-
export declare function getDatasetsByIds(config:
|
|
8
|
+
export declare function getDatasetsByIds(config: IWidgetConfig, qrveyids?: string[]): Promise<IDataset[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getArrayByProperty } from "../../general/array/getArrayByProperty";
|
|
2
2
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
3
|
-
import {
|
|
3
|
+
import { IWidgetConfig } from "../../interfaces/general/IWidgetConfig";
|
|
4
4
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
5
5
|
import { getAllQrveys } from "./getAllQrveys.api";
|
|
6
6
|
import { getDatasetsByIds } from "./getDatasetsByIds.api";
|
|
@@ -15,7 +15,7 @@ import { getDatasetsByIds } from "./getDatasetsByIds.api";
|
|
|
15
15
|
* @param qrveyids Collection of Qrvey IDs for returning a set of available datasets
|
|
16
16
|
* @returns a promise that if it is resolved displays a collection of dataset info.
|
|
17
17
|
*/
|
|
18
|
-
export function getAllDatasets(config:
|
|
18
|
+
export function getAllDatasets(config: IWidgetConfig, qrveyids?: string[]): Promise<IDataset[]> {
|
|
19
19
|
if (Array.isArray(qrveyids) && isEmpty(qrveyids)) {
|
|
20
20
|
return Promise.resolve([] as IDataset[]);
|
|
21
21
|
} else if (Array.isArray(qrveyids) && !isEmpty(qrveyids)) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { IGeneralWidgetConfig } from '../../interfaces/general/IGeneralWidgetConfig';
|
|
2
1
|
import { IDataset } from '../../qrvey/interfaces/IDataset';
|
|
3
2
|
import { CHART_ENDPOINT } from '../constants/CHART_ENDPOINT';
|
|
4
3
|
import Request from '../helpers/Request';
|
|
5
4
|
import { BDatasetsToUIDatasets } from '../adapters/BDatasetsToUIDatasets.adapter';
|
|
6
5
|
import { getDefaultQuestionListOptionsAttributes } from '../helpers/getDefaultQuestionListOptionsAttributes';
|
|
7
6
|
import { chooseLang } from '../../format/localization';
|
|
7
|
+
import { IWidgetConfig } from '../../interfaces/general/IWidgetConfig';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Get a dataset by Qrvey ID
|
|
11
11
|
* @param qrveyid The Qrvey ID
|
|
12
12
|
* @returns a promise
|
|
13
13
|
*/
|
|
14
|
-
export function getDatasetColumns(config:
|
|
14
|
+
export function getDatasetColumns(config: IWidgetConfig, qrveyid?: string): Promise<IDataset[]> {
|
|
15
15
|
const lang = chooseLang(config);
|
|
16
16
|
return Request.post({ ...config, qrveyid, endpoint: CHART_ENDPOINT }, '/question/list', {
|
|
17
17
|
optionsAttributes: getDefaultQuestionListOptionsAttributes(),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IGeneralWidgetConfig } from '../../interfaces/general/IGeneralWidgetConfig';
|
|
2
1
|
import { IDataset } from '../../qrvey/interfaces/IDataset';
|
|
3
2
|
import Request from '../helpers/Request';
|
|
4
3
|
import { BDatasetsToUIDatasets } from '../adapters/BDatasetsToUIDatasets.adapter';
|
|
@@ -6,13 +5,14 @@ import { isEmpty } from '../../general/mix/isEmpty';
|
|
|
6
5
|
import { chooseLang } from '../../format/localization';
|
|
7
6
|
import { getDefaultQuestionListOptionsAttributes } from '../helpers/getDefaultQuestionListOptionsAttributes';
|
|
8
7
|
import { QUESTION_LIST_BULK_ENDPOINT } from '../constants/QUESTION_LIST_BULK_ENDPOINT';
|
|
8
|
+
import { IWidgetConfig } from '../../interfaces/general/IWidgetConfig';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Get a dataset by Qrvey ID
|
|
12
12
|
* @param qrveyid The Qrvey ID
|
|
13
13
|
* @returns a promise
|
|
14
14
|
*/
|
|
15
|
-
export function getDatasetsByIds(config:
|
|
15
|
+
export function getDatasetsByIds(config: IWidgetConfig, qrveyids: string[] = []): Promise<IDataset[]> {
|
|
16
16
|
if (Array.isArray(qrveyids) && !isEmpty(qrveyids)) {
|
|
17
17
|
const lang = chooseLang(config);
|
|
18
18
|
return Request.post({ ...config, endpoint: QUESTION_LIST_BULK_ENDPOINT }, '', {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|