@gravitywiz/types 0.0.18 → 0.0.19
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/index.d.ts +19 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -110,7 +110,22 @@ declare global {
|
|
|
110
110
|
gsurveyLikertRows?: { text: string; value: string }[];
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
type
|
|
113
|
+
type GFNumberInputField = GFBaseField & {
|
|
114
|
+
rangeMin: string | number;
|
|
115
|
+
rangeMax: string | number;
|
|
116
|
+
numberFormat: NumberFormat;
|
|
117
|
+
inputType: 'number'
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
type GFNumberField = GFNumberInputField & {
|
|
121
|
+
type: 'number';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type GFQuantityField = GFNumberInputField & {
|
|
125
|
+
type: 'quantity';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
type GFField<Extra = {}> = (GFBaseField | GFSurveyField | GFNumberField | GFQuantityField) & Extra;
|
|
114
129
|
|
|
115
130
|
interface GFChoice {
|
|
116
131
|
text: string;
|
|
@@ -179,6 +194,8 @@ declare global {
|
|
|
179
194
|
code: string;
|
|
180
195
|
}
|
|
181
196
|
|
|
197
|
+
type NumberFormat = 'currency' | 'decimal_comma' | 'decimal_dot' | string;
|
|
198
|
+
|
|
182
199
|
class GFCurrency {
|
|
183
200
|
constructor(currency: GFCurrencyConfig);
|
|
184
201
|
toNumber(text: string): number;
|
|
@@ -199,7 +216,7 @@ declare global {
|
|
|
199
216
|
): number;
|
|
200
217
|
static isNumeric(val: string | number): boolean;
|
|
201
218
|
static getDecimalSeparator(
|
|
202
|
-
numberFormat:
|
|
219
|
+
numberFormat: NumberFormat
|
|
203
220
|
): GFCurrencySeparator;
|
|
204
221
|
static htmlDecode(text: string): string;
|
|
205
222
|
}
|