@qrvey/utils 1.2.9-30 → 1.2.9-33
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 +102 -102
- package/dist/cjs/format/localization.js +2 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.d.ts +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +1 -0
- package/dist/format/localization.js +2 -1
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.d.ts +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +1 -0
- package/package.json +3 -3
- package/prepareToPublish.js +2 -1
- package/src/format/localization.ts +2 -1
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.ts +2 -0
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.ts +1 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.ts +2 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.ts +1 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-
|
|
1
|
+
# [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.2.9-33*
|
|
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/
|
|
83
|
+
### dist/dates/adapters/mdyDateToDate.js
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
####
|
|
86
|
+
#### mdyDateToDate(monthYearDate, time)
|
|
87
87
|
|
|
88
|
-
Transforms String Date from a [
|
|
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 [
|
|
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/
|
|
111
|
+
### dist/dates/adapters/monthYearToDate.js
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
####
|
|
114
|
+
#### monthYearToDate(monthYearDate, time)
|
|
115
115
|
|
|
116
|
-
Transforms String Date from a [
|
|
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
|
-
|
|
|
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/
|
|
139
|
+
### dist/dates/adapters/quarterYearToDate.js
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
####
|
|
142
|
+
#### quarterYearToDate(quarterYearDate, time)
|
|
143
143
|
|
|
144
|
-
Transforms String Date from a [
|
|
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
|
-
|
|
|
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/
|
|
167
|
+
### dist/dates/adapters/weekYearToDate.js
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
####
|
|
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
|
-
|
|
|
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/
|
|
195
|
+
### dist/dates/adapters/yearToDate.js
|
|
196
196
|
|
|
197
197
|
|
|
198
|
-
####
|
|
198
|
+
#### yearToDate(yearDate, time)
|
|
199
199
|
|
|
200
|
-
Transforms String Date from a [
|
|
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
|
-
|
|
|
209
|
+
| yearDate | | String of [Year] date | |
|
|
210
210
|
| time | | Flag to parse the object date to milliseconds. | |
|
|
211
211
|
|
|
212
212
|
|
|
@@ -688,32 +688,12 @@ Output:
|
|
|
688
688
|
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
### dist/filters/
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
#### new FilterInputErrorHandler()
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
##### Returns
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
- `Void`
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
### dist/filters/adapters/FDToFlatUI.js
|
|
691
|
+
### dist/filters/adapters/FDToLogic.js
|
|
712
692
|
|
|
713
693
|
|
|
714
|
-
####
|
|
694
|
+
#### FDToLogic(filterData)
|
|
715
695
|
|
|
716
|
-
Generates a
|
|
696
|
+
Generates a Filter Logic structure from Filter Data structure.
|
|
717
697
|
|
|
718
698
|
|
|
719
699
|
|
|
@@ -723,7 +703,6 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
723
703
|
| Name | Type | Description | |
|
|
724
704
|
| ---- | ---- | ----------- | -------- |
|
|
725
705
|
| filterData | | The filter data object. | |
|
|
726
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
727
706
|
|
|
728
707
|
|
|
729
708
|
|
|
@@ -731,13 +710,13 @@ Generates a Flattened UI filter structure from Filter Data structure.
|
|
|
731
710
|
##### Returns
|
|
732
711
|
|
|
733
712
|
|
|
734
|
-
- a
|
|
713
|
+
- a filter logic array
|
|
735
714
|
|
|
736
715
|
|
|
737
716
|
|
|
738
|
-
####
|
|
717
|
+
#### getLogicBodyFromFD21(filterData)
|
|
739
718
|
|
|
740
|
-
|
|
719
|
+
Gets the logic body
|
|
741
720
|
|
|
742
721
|
|
|
743
722
|
|
|
@@ -746,8 +725,7 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
746
725
|
|
|
747
726
|
| Name | Type | Description | |
|
|
748
727
|
| ---- | ---- | ----------- | -------- |
|
|
749
|
-
|
|
|
750
|
-
| datasetsInfo | | Collection of datasets information | |
|
|
728
|
+
| filterData | | The filter data object | |
|
|
751
729
|
|
|
752
730
|
|
|
753
731
|
|
|
@@ -755,17 +733,17 @@ Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
|
755
733
|
##### Returns
|
|
756
734
|
|
|
757
735
|
|
|
758
|
-
- a
|
|
736
|
+
- a filter logic array
|
|
759
737
|
|
|
760
738
|
|
|
761
739
|
|
|
762
740
|
|
|
763
|
-
### dist/filters/adapters/
|
|
741
|
+
### dist/filters/adapters/FDToFlatUI.js
|
|
764
742
|
|
|
765
743
|
|
|
766
|
-
####
|
|
744
|
+
#### FDToFlatUI(filterData, datasetsInfo)
|
|
767
745
|
|
|
768
|
-
Generates a
|
|
746
|
+
Generates a Flattened UI filter structure from Filter Data structure.
|
|
769
747
|
|
|
770
748
|
|
|
771
749
|
|
|
@@ -775,6 +753,7 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
775
753
|
| Name | Type | Description | |
|
|
776
754
|
| ---- | ---- | ----------- | -------- |
|
|
777
755
|
| filterData | | The filter data object. | |
|
|
756
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
778
757
|
|
|
779
758
|
|
|
780
759
|
|
|
@@ -782,13 +761,13 @@ Generates a Filter Logic structure from Filter Data structure.
|
|
|
782
761
|
##### Returns
|
|
783
762
|
|
|
784
763
|
|
|
785
|
-
- a
|
|
764
|
+
- a flattened UI filters array
|
|
786
765
|
|
|
787
766
|
|
|
788
767
|
|
|
789
|
-
####
|
|
768
|
+
#### FD21ToFlatUI(scopes, datasetsInfo)
|
|
790
769
|
|
|
791
|
-
|
|
770
|
+
Generates a Filter Builder Structure from the Filter Data structure v2.1
|
|
792
771
|
|
|
793
772
|
|
|
794
773
|
|
|
@@ -797,7 +776,8 @@ Gets the logic body
|
|
|
797
776
|
|
|
798
777
|
| Name | Type | Description | |
|
|
799
778
|
| ---- | ---- | ----------- | -------- |
|
|
800
|
-
|
|
|
779
|
+
| scopes | | The filter scope section | |
|
|
780
|
+
| datasetsInfo | | Collection of datasets information | |
|
|
801
781
|
|
|
802
782
|
|
|
803
783
|
|
|
@@ -805,7 +785,7 @@ Gets the logic body
|
|
|
805
785
|
##### Returns
|
|
806
786
|
|
|
807
787
|
|
|
808
|
-
- a
|
|
788
|
+
- a flattened UI filters array
|
|
809
789
|
|
|
810
790
|
|
|
811
791
|
|
|
@@ -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
|
|
|
@@ -2805,29 +2805,23 @@ Get a dataset by Qrvey ID
|
|
|
2805
2805
|
|
|
2806
2806
|
|
|
2807
2807
|
|
|
2808
|
-
### dist/
|
|
2809
|
-
|
|
2808
|
+
### dist/typescript/decorators/Debounce.js
|
|
2810
2809
|
|
|
2811
|
-
#### Config()
|
|
2812
2810
|
|
|
2813
|
-
|
|
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
|
|
2811
|
+
#### Debounce(time)
|
|
2816
2812
|
|
|
2813
|
+
(Method Decorator) Debounce Class Method
|
|
2817
2814
|
|
|
2818
2815
|
|
|
2819
2816
|
|
|
2820
2817
|
|
|
2818
|
+
##### Parameters
|
|
2821
2819
|
|
|
2822
|
-
|
|
2820
|
+
| Name | Type | Description | |
|
|
2821
|
+
| ---- | ---- | ----------- | -------- |
|
|
2822
|
+
| time | | (optional) deafult 500 | |
|
|
2823
2823
|
|
|
2824
|
-
```javascript
|
|
2825
|
-
\ @Config() @Prop() settings;
|
|
2826
2824
|
|
|
2827
|
-
someMethod() {
|
|
2828
|
-
this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2829
|
-
}
|
|
2830
|
-
```
|
|
2831
2825
|
|
|
2832
2826
|
|
|
2833
2827
|
##### Returns
|
|
@@ -2838,72 +2832,74 @@ someMethod() {
|
|
|
2838
2832
|
|
|
2839
2833
|
|
|
2840
2834
|
|
|
2841
|
-
### dist/
|
|
2835
|
+
### dist/typescript/decorators/Throttled.js
|
|
2842
2836
|
|
|
2843
2837
|
|
|
2844
|
-
####
|
|
2838
|
+
#### Throttled(time)
|
|
2845
2839
|
|
|
2846
|
-
|
|
2840
|
+
(Method Decorator) Throttled Class Method
|
|
2847
2841
|
|
|
2848
2842
|
|
|
2849
2843
|
|
|
2850
2844
|
|
|
2845
|
+
##### Parameters
|
|
2851
2846
|
|
|
2847
|
+
| Name | Type | Description | |
|
|
2848
|
+
| ---- | ---- | ----------- | -------- |
|
|
2849
|
+
| time | | (optional) deafult 500 | |
|
|
2852
2850
|
|
|
2853
|
-
##### Returns
|
|
2854
2851
|
|
|
2855
2852
|
|
|
2856
|
-
- function - Function to use in ref prop in html elements
|
|
2857
2853
|
|
|
2854
|
+
##### Returns
|
|
2858
2855
|
|
|
2859
2856
|
|
|
2857
|
+
- `Void`
|
|
2860
2858
|
|
|
2861
|
-
### dist/stencil/util/getConfig.js
|
|
2862
2859
|
|
|
2863
2860
|
|
|
2864
|
-
#### getConfig(cfg)
|
|
2865
2861
|
|
|
2866
|
-
|
|
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
|
|
2862
|
+
### dist/stencil/decorators/Config.js
|
|
2871
2863
|
|
|
2872
2864
|
|
|
2865
|
+
#### Config()
|
|
2873
2866
|
|
|
2867
|
+
Stencil.js - Prop Decorator
|
|
2868
|
+
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
|
|
2869
|
+
But for this, is required ask for a property in `snake_case` style
|
|
2874
2870
|
|
|
2875
|
-
##### Parameters
|
|
2876
2871
|
|
|
2877
|
-
| Name | Type | Description | |
|
|
2878
|
-
| ---- | ---- | ----------- | -------- |
|
|
2879
|
-
| cfg | | | |
|
|
2880
2872
|
|
|
2881
2873
|
|
|
2882
2874
|
|
|
2883
2875
|
|
|
2884
|
-
#####
|
|
2876
|
+
##### Examples
|
|
2885
2877
|
|
|
2878
|
+
```javascript
|
|
2879
|
+
\ @Config() @Prop() settings;
|
|
2886
2880
|
|
|
2887
|
-
|
|
2881
|
+
someMethod() {
|
|
2882
|
+
this.settings.snake_case //it search for: obj.snake_case || obj.snakeCase || obj.SnakeCase || obj.snakecase || obj.SNAKECASE
|
|
2883
|
+
}
|
|
2884
|
+
```
|
|
2888
2885
|
|
|
2889
2886
|
|
|
2887
|
+
##### Returns
|
|
2890
2888
|
|
|
2891
2889
|
|
|
2892
|
-
|
|
2890
|
+
- `Void`
|
|
2893
2891
|
|
|
2894
2892
|
|
|
2895
|
-
#### Throttled(time)
|
|
2896
2893
|
|
|
2897
|
-
(Method Decorator) Throttled Class Method
|
|
2898
2894
|
|
|
2895
|
+
### dist/stencil/util/createRef.js
|
|
2899
2896
|
|
|
2900
2897
|
|
|
2898
|
+
#### createRef()
|
|
2899
|
+
|
|
2900
|
+
lit implementation of React createRef (https://reactjs.org/docs/refs-and-the-dom.html)
|
|
2901
2901
|
|
|
2902
|
-
##### Parameters
|
|
2903
2902
|
|
|
2904
|
-
| Name | Type | Description | |
|
|
2905
|
-
| ---- | ---- | ----------- | -------- |
|
|
2906
|
-
| time | | (optional) deafult 500 | |
|
|
2907
2903
|
|
|
2908
2904
|
|
|
2909
2905
|
|
|
@@ -2911,17 +2907,21 @@ try to find this string as a variable on Windows object
|
|
|
2911
2907
|
##### Returns
|
|
2912
2908
|
|
|
2913
2909
|
|
|
2914
|
-
-
|
|
2910
|
+
- function - Function to use in ref prop in html elements
|
|
2915
2911
|
|
|
2916
2912
|
|
|
2917
2913
|
|
|
2918
2914
|
|
|
2919
|
-
### dist/
|
|
2915
|
+
### dist/stencil/util/getConfig.js
|
|
2920
2916
|
|
|
2921
2917
|
|
|
2922
|
-
####
|
|
2918
|
+
#### getConfig(cfg)
|
|
2923
2919
|
|
|
2924
|
-
|
|
2920
|
+
verify the Config object type and try to return a parsed Object
|
|
2921
|
+
- In case _cfg_ is a string, first try to make a JSON parse in other case
|
|
2922
|
+
try to find this string as a variable on Windows object
|
|
2923
|
+
- If _cfg_ is a fuction, tis is invoked and parsed
|
|
2924
|
+
- Finally, if is an object, _cfg_ is inmediatly returned
|
|
2925
2925
|
|
|
2926
2926
|
|
|
2927
2927
|
|
|
@@ -2930,7 +2930,7 @@ try to find this string as a variable on Windows object
|
|
|
2930
2930
|
|
|
2931
2931
|
| Name | Type | Description | |
|
|
2932
2932
|
| ---- | ---- | ----------- | -------- |
|
|
2933
|
-
|
|
|
2933
|
+
| cfg | | | |
|
|
2934
2934
|
|
|
2935
2935
|
|
|
2936
2936
|
|
|
@@ -32,7 +32,8 @@ const formatWithLocale = (value, outputFormat, config = {}) => {
|
|
|
32
32
|
exports.formatWithLocale = formatWithLocale;
|
|
33
33
|
function formatLocaleDate(value, outputFormat, config) {
|
|
34
34
|
const { lang = definition_1.LANG_DEFAULT, options } = config;
|
|
35
|
-
const
|
|
35
|
+
const dateValue = value === null || value === void 0 ? void 0 : value.replace('.000Z', '');
|
|
36
|
+
const dateParam = new Date(dateValue);
|
|
36
37
|
let langOpts = options;
|
|
37
38
|
if (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.originalFormat) {
|
|
38
39
|
const { format } = outputFormat.originalFormat;
|
|
@@ -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',
|
|
@@ -26,7 +26,8 @@ export const formatWithLocale = (value, outputFormat, config = {}) => {
|
|
|
26
26
|
};
|
|
27
27
|
function formatLocaleDate(value, outputFormat, config) {
|
|
28
28
|
const { lang = LANG_DEFAULT, options } = config;
|
|
29
|
-
const
|
|
29
|
+
const dateValue = value === null || value === void 0 ? void 0 : value.replace('.000Z', '');
|
|
30
|
+
const dateParam = new Date(dateValue);
|
|
30
31
|
let langOpts = options;
|
|
31
32
|
if (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.originalFormat) {
|
|
32
33
|
const { format } = outputFormat.originalFormat;
|
|
@@ -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-
|
|
3
|
+
"version": "1.2.9-33",
|
|
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
|
-
"
|
|
10
|
-
"
|
|
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",
|
package/prepareToPublish.js
CHANGED
|
@@ -38,9 +38,10 @@ function init() {
|
|
|
38
38
|
await execute("rm -f package-lock.json && rm -f -R node_modules/ && rm -f -R dist/", "-> Cleaning project...");
|
|
39
39
|
await execute("npm install", "-> Installing Dependencies...");
|
|
40
40
|
await execute("npm run build", "-> Generating Build...");
|
|
41
|
-
await execute("doxdox 'dist/**/*.js' --layout markdown --output
|
|
41
|
+
await execute("doxdox 'dist/**/*.js' --layout markdown --output README.md --ignore 'dist/cjs/**/*.js'", "-> Generating Docs...");
|
|
42
42
|
changeDocsVersion(oldVersion, newVersion);
|
|
43
43
|
await execute(`git add README.md && git commit -m "📝 docs: Updated docs for ${version}"`, "-> Commit Docs changes...");
|
|
44
|
+
await execute(`git checkout README.md`);
|
|
44
45
|
console.log('-> Ready to Publish!');
|
|
45
46
|
console.log('-> Please login to npm');
|
|
46
47
|
|
|
@@ -29,7 +29,8 @@ export const formatWithLocale = (value: any, outputFormat: IFormatOutputFormat,
|
|
|
29
29
|
|
|
30
30
|
function formatLocaleDate(value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig) {
|
|
31
31
|
const { lang = LANG_DEFAULT, options } = config;
|
|
32
|
-
const
|
|
32
|
+
const dateValue = value?.replace('.000Z', '');
|
|
33
|
+
const dateParam = new Date(dateValue);
|
|
33
34
|
let langOpts = options;
|
|
34
35
|
if (outputFormat?.originalFormat) {
|
|
35
36
|
const { format } = outputFormat.originalFormat;
|
|
@@ -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',
|