@gravitywiz/types 0.0.17 → 0.0.19-rc.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.
Files changed (2) hide show
  1. package/index.d.ts +20 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -101,6 +101,7 @@ declare global {
101
101
  inputType: GFInputType;
102
102
  productId: string;
103
103
  validateState?: boolean;
104
+ displayOnly?: boolean | '';
104
105
  }
105
106
 
106
107
  type GFSurveyField = GFBaseField & {
@@ -109,7 +110,22 @@ declare global {
109
110
  gsurveyLikertRows?: { text: string; value: string }[];
110
111
  }
111
112
 
112
- type GFField<Extra = {}> = (GFBaseField | GFSurveyField) & Extra;
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;
113
129
 
114
130
  interface GFChoice {
115
131
  text: string;
@@ -178,6 +194,8 @@ declare global {
178
194
  code: string;
179
195
  }
180
196
 
197
+ type NumberFormat = 'currency' | 'decimal_comma' | 'decimal_dot' | string;
198
+
181
199
  class GFCurrency {
182
200
  constructor(currency: GFCurrencyConfig);
183
201
  toNumber(text: string): number;
@@ -198,7 +216,7 @@ declare global {
198
216
  ): number;
199
217
  static isNumeric(val: string | number): boolean;
200
218
  static getDecimalSeparator(
201
- numberFormat: 'currency' | 'decimal_comma' | 'decimal_dot' | string
219
+ numberFormat: NumberFormat
202
220
  ): GFCurrencySeparator;
203
221
  static htmlDecode(text: string): string;
204
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitywiz/types",
3
- "version": "0.0.17",
3
+ "version": "0.0.19-rc.1",
4
4
  "description": "TypesScript type definitions for Gravity Forms and Gravity Wiz.",
5
5
  "author": "Gravity Wiz",
6
6
  "license": "GPL-2.0-or-later",