@gravitywiz/types 0.0.10 → 0.0.12
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 +24 -6
- package/package.json +5 -1
package/index.d.ts
CHANGED
|
@@ -7,19 +7,37 @@ declare global {
|
|
|
7
7
|
// TODO type ...any better (e.g. provide a way to for the caller to declare what these arguments should be).
|
|
8
8
|
type GFHookCallback = (...args: any[]) => void;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
type GFFieldType = 'text' | 'date' | 'website' | 'email' | 'phone' | 'survey';
|
|
11
|
+
|
|
12
|
+
type GFInputType = 'text' | 'email' | 'fileupload' | 'date' | 'website' | 'total' | 'rating';
|
|
13
|
+
|
|
14
|
+
interface GFFieldInput {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
name: string;
|
|
18
|
+
isHidden?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface GFBaseField {
|
|
21
|
+
inputs?: GFFieldInput[] | null;
|
|
22
|
+
choices?: GFChoice[];
|
|
13
23
|
label: string;
|
|
14
24
|
adminLabel?: string;
|
|
15
25
|
id: number;
|
|
16
26
|
formId: number;
|
|
17
|
-
type:
|
|
27
|
+
type: GFFieldType;
|
|
18
28
|
enableEnhancedUI?: boolean;
|
|
19
|
-
inputType:
|
|
20
|
-
|
|
29
|
+
inputType: GFInputType;
|
|
30
|
+
productId: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type GFSurveyField = GFBaseField & {
|
|
34
|
+
gsurveyLikertEnableMultipleRows?: boolean;
|
|
35
|
+
gsurveyLikertEnableScoring?: boolean;
|
|
36
|
+
gsurveyLikertRows?: { text: string; value: string }[];
|
|
21
37
|
}
|
|
22
38
|
|
|
39
|
+
type GFField = GFBaseField | GFSurveyField;
|
|
40
|
+
|
|
23
41
|
interface GFChoice {
|
|
24
42
|
isSelected?: boolean;
|
|
25
43
|
price?: string;
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravitywiz/types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
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",
|
|
7
7
|
"main": "",
|
|
8
8
|
"types": "index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
11
|
+
"format": "yarn lint --fix"
|
|
12
|
+
},
|
|
9
13
|
"dependencies": {
|
|
10
14
|
"@types/jquery": "^3.5.16",
|
|
11
15
|
"@types/plupload": "^2.0.10"
|