@qrvey/utils 1.2.9-30 → 1.2.9-31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-30*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-31*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -80,12 +80,12 @@ Get a text and evaluate if it matchs with a token box label.
80
80
 
81
81
 
82
82
 
83
- ### dist/dates/adapters/monthYearToDate.js
83
+ ### dist/dates/adapters/mdyDateToDate.js
84
84
 
85
85
 
86
- #### monthYearToDate(monthYearDate, time)
86
+ #### mdyDateToDate(monthYearDate, time)
87
87
 
88
- Transforms String Date from a [Month Year] format to Date object.
88
+ Transforms String Date from a [mm/dd/yyyy] format to Date object.
89
89
 
90
90
 
91
91
 
@@ -94,7 +94,7 @@ Transforms String Date from a [Month Year] format to Date object.
94
94
 
95
95
  | Name | Type | Description | |
96
96
  | ---- | ---- | ----------- | -------- |
97
- | monthYearDate | | String of [Month Year] date |   |
97
+ | monthYearDate | | String of [mm/dd/yyyy] date |   |
98
98
  | time | | Flag to parse the object date to milliseconds. |   |
99
99
 
100
100
 
@@ -108,12 +108,12 @@ Transforms String Date from a [Month Year] format to Date object.
108
108
 
109
109
 
110
110
 
111
- ### dist/dates/adapters/quarterYearToDate.js
111
+ ### dist/dates/adapters/monthYearToDate.js
112
112
 
113
113
 
114
- #### quarterYearToDate(quarterYearDate, time)
114
+ #### monthYearToDate(monthYearDate, time)
115
115
 
116
- Transforms String Date from a [Quarter Year] format to Date object.
116
+ Transforms String Date from a [Month Year] format to Date object.
117
117
 
118
118
 
119
119
 
@@ -122,7 +122,7 @@ Transforms String Date from a [Quarter Year] format to Date object.
122
122
 
123
123
  | Name | Type | Description | |
124
124
  | ---- | ---- | ----------- | -------- |
125
- | quarterYearDate | | String of [Quarter Year] date |   |
125
+ | monthYearDate | | String of [Month Year] date |   |
126
126
  | time | | Flag to parse the object date to milliseconds. |   |
127
127
 
128
128
 
@@ -136,12 +136,12 @@ Transforms String Date from a [Quarter Year] format to Date object.
136
136
 
137
137
 
138
138
 
139
- ### dist/dates/adapters/weekYearToDate.js
139
+ ### dist/dates/adapters/quarterYearToDate.js
140
140
 
141
141
 
142
- #### weekYearToDate(date, time)
142
+ #### quarterYearToDate(quarterYearDate, time)
143
143
 
144
- Transforms String Date from a [Week Year] format to Date object.
144
+ Transforms String Date from a [Quarter Year] format to Date object.
145
145
 
146
146
 
147
147
 
@@ -150,7 +150,7 @@ Transforms String Date from a [Week Year] format to Date object.
150
150
 
151
151
  | Name | Type | Description | |
152
152
  | ---- | ---- | ----------- | -------- |
153
- | date | | String of [Week Year] date |   |
153
+ | quarterYearDate | | String of [Quarter Year] date |   |
154
154
  | time | | Flag to parse the object date to milliseconds. |   |
155
155
 
156
156
 
@@ -164,12 +164,12 @@ Transforms String Date from a [Week Year] format to Date object.
164
164
 
165
165
 
166
166
 
167
- ### dist/dates/adapters/yearToDate.js
167
+ ### dist/dates/adapters/weekYearToDate.js
168
168
 
169
169
 
170
- #### yearToDate(yearDate, time)
170
+ #### weekYearToDate(date, time)
171
171
 
172
- Transforms String Date from a [Year] format to Date object.
172
+ Transforms String Date from a [Week Year] format to Date object.
173
173
 
174
174
 
175
175
 
@@ -178,7 +178,7 @@ Transforms String Date from a [Year] format to Date object.
178
178
 
179
179
  | Name | Type | Description | |
180
180
  | ---- | ---- | ----------- | -------- |
181
- | yearDate | | String of [Year] date |   |
181
+ | date | | String of [Week Year] date |   |
182
182
  | time | | Flag to parse the object date to milliseconds. |   |
183
183
 
184
184
 
@@ -192,12 +192,12 @@ Transforms String Date from a [Year] format to Date object.
192
192
 
193
193
 
194
194
 
195
- ### dist/dates/adapters/mdyDateToDate.js
195
+ ### dist/dates/adapters/yearToDate.js
196
196
 
197
197
 
198
- #### mdyDateToDate(monthYearDate, time)
198
+ #### yearToDate(yearDate, time)
199
199
 
200
- Transforms String Date from a [mm/dd/yyyy] format to Date object.
200
+ Transforms String Date from a [Year] format to Date object.
201
201
 
202
202
 
203
203
 
@@ -206,7 +206,7 @@ Transforms String Date from a [mm/dd/yyyy] format to Date object.
206
206
 
207
207
  | Name | Type | Description | |
208
208
  | ---- | ---- | ----------- | -------- |
209
- | monthYearDate | | String of [mm/dd/yyyy] date |   |
209
+ | yearDate | | String of [Year] date |   |
210
210
  | time | | Flag to parse the object date to milliseconds. |   |
211
211
 
212
212
 
@@ -417,64 +417,6 @@ Validates the given string as Date by its date format.
417
417
 
418
418
 
419
419
 
420
- ### dist/dates/range/getDateRange.js
421
-
422
-
423
- #### getDateRange(value, dateGroupLabel, withTime)
424
-
425
- Get date range object from a string date value
426
-
427
-
428
-
429
-
430
- ##### Parameters
431
-
432
- | Name | Type | Description | |
433
- | ---- | ---- | ----------- | -------- |
434
- | value | `String` | string date value |   |
435
- | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' |   |
436
- | withTime | `Boolean` | determines if the date range will include time. Default is true |   |
437
-
438
-
439
-
440
-
441
- ##### Examples
442
-
443
- ```javascript
444
- // 1) Year:
445
- getDateRange('2020', 'YEAR');
446
- // Will return:
447
- {
448
- from: '01/01/2020 00:00:00',
449
- to: '12/31/2020 23:59:59'
450
- }
451
-
452
- // 2) Quarter:
453
- getDateRange('Q3 2020', 'QUARTER');
454
- // Will return:
455
- {
456
- from: '07/01/2020 00:00:00',
457
- to: '09/30/2020 23:59:59'
458
- }
459
-
460
- // 3) Month:
461
- getDateRange('Oct 2020', 'MONTH');
462
- // Will return:
463
- {
464
- from: '10/01/2020 00:00:00',
465
- to: '10/31/2020 23:59:59'
466
- }
467
- ```
468
-
469
-
470
- ##### Returns
471
-
472
-
473
- - `Object` an object with the date range with two string date properties: from and to
474
-
475
-
476
-
477
-
478
420
  ### dist/dates/relative/Adapter.js
479
421
 
480
422
 
@@ -688,22 +630,60 @@ Output:
688
630
 
689
631
 
690
632
 
691
- ### dist/filters/classes/FilterInputErrorHandler.js
633
+ ### dist/dates/range/getDateRange.js
692
634
 
693
635
 
694
- #### new FilterInputErrorHandler()
636
+ #### getDateRange(value, dateGroupLabel, withTime)
695
637
 
638
+ Get date range object from a string date value
696
639
 
697
640
 
698
641
 
699
642
 
643
+ ##### Parameters
700
644
 
645
+ | Name | Type | Description | |
646
+ | ---- | ---- | ----------- | -------- |
647
+ | value | `String` | string date value |   |
648
+ | dateGroupLabel | `String` | could be 'YEAR', 'QUARTER', 'MONTH' or 'DAY'. Deafult is 'DAY' |   |
649
+ | withTime | `Boolean` | determines if the date range will include time. Default is true |   |
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
+ ```
701
681
 
702
682
 
703
683
  ##### Returns
704
684
 
705
685
 
706
- - `Void`
686
+ - `Object` an object with the date range with two string date properties: from and to
707
687
 
708
688
 
709
689
 
@@ -1558,6 +1538,26 @@ const filterData = transformFilters(oldPreferenceFilters, 'ANALYZE');
1558
1538
 
1559
1539
 
1560
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
1561
  ### dist/filters/helpers/applyHierarchyForAggFilters.js
1562
1562
 
1563
1563
 
@@ -3495,12 +3495,23 @@ Get an string of the properties of the given filter column.
3495
3495
 
3496
3496
 
3497
3497
 
3498
- ### dist/filters/helpers/common/getFilterLabel.js
3498
+ ### dist/filters/helpers/common/getFilterid.js
3499
3499
 
3500
3500
 
3501
- #### getFilterLabel(filter)
3501
+ #### getFilterid(filter)
3502
3502
 
3503
- Gets the Filter Label + Column label
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
3504
3515
 
3505
3516
 
3506
3517
 
@@ -3509,7 +3520,7 @@ Gets the Filter Label + Column label
3509
3520
 
3510
3521
  | Name | Type | Description | |
3511
3522
  | ---- | ---- | ----------- | -------- |
3512
- | filter | | the UI filter |   |
3523
+ | filter | | the filter structure |   |
3513
3524
 
3514
3525
 
3515
3526
 
@@ -3517,28 +3528,17 @@ Gets the Filter Label + Column label
3517
3528
  ##### Returns
3518
3529
 
3519
3530
 
3520
- - a sring label
3531
+ - a text to identify the filter
3521
3532
 
3522
3533
 
3523
3534
 
3524
3535
 
3525
- ### dist/filters/helpers/common/getFilterid.js
3536
+ ### dist/filters/helpers/common/getFilterLabel.js
3526
3537
 
3527
3538
 
3528
- #### getFilterid(filter)
3539
+ #### getFilterLabel(filter)
3529
3540
 
3530
- Get the Filter ID by the filter structure
3531
- The order of the epression ID is:
3532
- - Scope Type
3533
- - scopeid
3534
- - qrveyid
3535
- - panelid
3536
- - columnid
3537
- - validator
3538
- - property
3539
- - Column Aggregate
3540
- - Column Calculation
3541
- - Optional Index
3541
+ Gets the Filter Label + Column label
3542
3542
 
3543
3543
 
3544
3544
 
@@ -3547,7 +3547,7 @@ The order of the epression ID is:
3547
3547
 
3548
3548
  | Name | Type | Description | |
3549
3549
  | ---- | ---- | ----------- | -------- |
3550
- | filter | | the filter structure |   |
3550
+ | filter | | the UI filter |   |
3551
3551
 
3552
3552
 
3553
3553
 
@@ -3555,7 +3555,7 @@ The order of the epression ID is:
3555
3555
  ##### Returns
3556
3556
 
3557
3557
 
3558
- - a text to identify the filter
3558
+ - a sring label
3559
3559
 
3560
3560
 
3561
3561
 
@@ -27,4 +27,5 @@ export interface II18nChartBuilderTableCalculation {
27
27
  level_placeholder: string;
28
28
  level_table: string;
29
29
  calculation_disabled: string;
30
+ table_calculation_direction: string;
30
31
  }
@@ -73,6 +73,7 @@ exports.I18N_CHART_BUILDER_GENERAL_OPTIONS = {
73
73
  level_placeholder: 'Select level',
74
74
  level_table: 'Table',
75
75
  calculation_disabled: 'Table Calculations is disabled, add fields on the {{label_shelf}} to enable it.',
76
+ table_calculation_direction: "Table Calculation Direction"
76
77
  },
77
78
  legends: {
78
79
  title: 'Legends',
@@ -27,4 +27,5 @@ export interface II18nChartBuilderTableCalculation {
27
27
  level_placeholder: string;
28
28
  level_table: string;
29
29
  calculation_disabled: string;
30
+ table_calculation_direction: string;
30
31
  }
@@ -70,6 +70,7 @@ export const I18N_CHART_BUILDER_GENERAL_OPTIONS = {
70
70
  level_placeholder: 'Select level',
71
71
  level_table: 'Table',
72
72
  calculation_disabled: 'Table Calculations is disabled, add fields on the {{label_shelf}} to enable it.',
73
+ table_calculation_direction: "Table Calculation Direction"
73
74
  },
74
75
  legends: {
75
76
  title: 'Legends',
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.2.9-30",
3
+ "version": "1.2.9-31",
4
4
  "description": "Helper, Utils for all Qrvey Projects",
5
5
  "homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
8
8
  "build": "tsc && tsc -m commonjs --outDir dist/cjs",
9
- "publish": "node prepareToPublish.js && np",
10
- "publish-prerelease": "node prepareToPublish.js && npm login && np --any-branch --tag=$npm_config_tag",
9
+ "publishing": "node prepareToPublish.js && np",
10
+ "publishing-prerelease": "node prepareToPublish.js && np --any-branch --tag=$npm_config_tag",
11
11
  "test": "jest test",
12
12
  "test:watch": "jest --watch test",
13
13
  "lint": "eslint src --quiet --exit-on-fatal-error --ext .ts,.js",
@@ -27,4 +27,5 @@ export interface II18nChartBuilderTableCalculation {
27
27
  level_placeholder: string;
28
28
  level_table: string;
29
29
  calculation_disabled: string;
30
+ table_calculation_direction: string;
30
31
  }
@@ -73,6 +73,7 @@ export const I18N_CHART_BUILDER_GENERAL_OPTIONS: Pick<II18nChartBuilder, General
73
73
  level_placeholder: 'Select level',
74
74
  level_table: 'Table',
75
75
  calculation_disabled: 'Table Calculations is disabled, add fields on the {{label_shelf}} to enable it.',
76
+ table_calculation_direction: "Table Calculation Direction"
76
77
  },
77
78
  legends: {
78
79
  title: 'Legends',