eddev 2.2.0-beta.1 → 2.2.0-beta.3
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/dist/app/lib/blocks/ContentBlocks.d.ts.map +1 -1
- package/dist/app/lib/blocks/ContentBlocks.js +3 -0
- package/dist/app/lib/integrations/gravityforms/createGravityFormComponent.d.ts +10 -2
- package/dist/app/lib/integrations/gravityforms/createGravityFormComponent.d.ts.map +1 -1
- package/dist/app/lib/integrations/gravityforms/createGravityFormComponent.js +10 -2
- package/dist/app/lib/integrations/gravityforms/field-types.d.ts.map +1 -1
- package/dist/app/lib/integrations/gravityforms/field-types.js +17 -17
- package/dist/app/lib/integrations/gravityforms/useGravityForm.d.ts.map +1 -1
- package/dist/app/lib/integrations/gravityforms/useGravityForm.js +3 -2
- package/dist/node/cli/version.d.ts +1 -1
- package/dist/node/cli/version.js +1 -1
- package/package.json +1 -1
- package/types.meta.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBlocks.d.ts","sourceRoot":"","sources":["../../../../src/app/lib/blocks/ContentBlocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,YAAY,EAA4C,MAAM,OAAO,CAAA;AAQ3G,KAAK,iBAAiB,CAAC,KAAK,EAAE,MAAM,IAAI;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,KAAK,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,GAAG,CAAA;IACV,WAAW,CAAC,EAAE,YAAY,EAAE,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,GAAG,CAAA;CACZ,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAE5B;;GAEG;AACH,MAAM,MA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EAAE,aAAa,KAAK,YAAY,CAAA;IACxE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE;QACb,SAAS,EAAE,YAAY,EAAE,CAAA;QACzB,MAAM,CAAC,EAAE,YAAY,CAAA;QACrB,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;QACzB,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;QACzB,KAAK,EAAE,MAAM,CAAA;KACd,KAAK,YAAY,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED,KAAK,KAAK,GAAG;IACX,kDAAkD;IAClD,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;CACxB,GAAG,uBAAuB,CAAA;AAS3B;;GAEG;AACH,eAAO,MAAM,aAAa,8CAAgB,KAAK,oDAyF7C,CAAA;AAIF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,kDAqDpD"}
|
|
@@ -105,6 +105,9 @@ export function SingleContentBlock(props) {
|
|
|
105
105
|
result = _jsx("div", { "data-block-type": props.block.slug, children: result });
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
if (env.admin) {
|
|
109
|
+
result = _jsx(ReadonlyInlineEditingProvider, { children: result });
|
|
110
|
+
}
|
|
108
111
|
return _jsx(_Fragment, { children: result });
|
|
109
112
|
}
|
|
110
113
|
function useBlockComponent(block) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormEvent, ReactNode } from "react";
|
|
1
|
+
import { ComponentProps, FormEvent, ReactNode } from "react";
|
|
2
2
|
import { GFLayoutType, GravityFormsFieldState, GravityFormState, UseGravityFormResult } from "./useGravityForm";
|
|
3
3
|
import { GFFieldTypeSpec, GravityFormsField } from "./types";
|
|
4
4
|
import { GF_BUILTIN_FIELDS } from "./field-types";
|
|
@@ -9,6 +9,14 @@ declare const FORM_COMPONENTS: {
|
|
|
9
9
|
layout: GFLayoutType;
|
|
10
10
|
state: GravityFormState;
|
|
11
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Input(props: ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Select({ choices, ...props }: Omit<ComponentProps<"select">, "children"> & {
|
|
14
|
+
choices: {
|
|
15
|
+
value: string;
|
|
16
|
+
text: string;
|
|
17
|
+
}[];
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
20
|
Success(props: {
|
|
13
21
|
message: string;
|
|
14
22
|
state: GravityFormState;
|
|
@@ -41,7 +49,7 @@ declare const FORM_COMPONENTS: {
|
|
|
41
49
|
SubFieldRow(props: {
|
|
42
50
|
children: ReactNode;
|
|
43
51
|
basis?: number;
|
|
44
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
45
53
|
SubFieldStack(props: {
|
|
46
54
|
children: ReactNode;
|
|
47
55
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGravityFormComponent.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/integrations/gravityforms/createGravityFormComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAA8B,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createGravityFormComponent.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/integrations/gravityforms/createGravityFormComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAA8B,MAAM,OAAO,CAAA;AACxF,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC/G,OAAO,EAAgB,eAAe,EAAE,iBAAiB,EAAE,MAAM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AAC,CAAA;CAC3C,CAAA;AAED,wBAAgB,0BAA0B,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,qBAAqB,CAwHnF"}
|
|
@@ -5,6 +5,12 @@ const FORM_COMPONENTS = {
|
|
|
5
5
|
Form(props) {
|
|
6
6
|
return (_jsx("form", { className: "edgf-form", onSubmit: props.onSubmit, children: props.children }));
|
|
7
7
|
},
|
|
8
|
+
Input(props) {
|
|
9
|
+
return _jsx("input", { ...props });
|
|
10
|
+
},
|
|
11
|
+
Select({ choices, ...props }) {
|
|
12
|
+
return (_jsxs("select", { ...props, children: [props.placeholder && _jsx("option", { value: "", children: props.placeholder }), choices.map((choice) => (_jsx("option", { value: choice.value, children: choice.text }, choice.value)))] }));
|
|
13
|
+
},
|
|
8
14
|
Success(props) {
|
|
9
15
|
return (_jsxs("div", { className: "edgf-form-success", children: [_jsx("h2", { children: "Thank you for your submission!" }), _jsx("div", { dangerouslySetInnerHTML: { __html: props.message } })] }));
|
|
10
16
|
},
|
|
@@ -21,9 +27,11 @@ const FORM_COMPONENTS = {
|
|
|
21
27
|
return (_jsxs("div", { className: `edgf-field edgf-field-${props.field.type} ${props.field.className || ""}`.trim(), children: [props.showLabel ? props.labelElement : null, props.descriptionPlacement === "above" && props.descriptionElement, props.children, props.descriptionPlacement === "below" && props.descriptionElement, props.errorElement] }));
|
|
22
28
|
},
|
|
23
29
|
FieldLabel(props) {
|
|
24
|
-
return (_jsxs("label", { className: "edgf-field-label", htmlFor: props.htmlFor, children: [props.label, props.isRequired && _jsx("span", { className: "edgf-field-required-indicator" })] }));
|
|
30
|
+
return (_jsxs("label", { className: "edgf-field-label", htmlFor: props.htmlFor, children: [_jsx("span", { dangerouslySetInnerHTML: { __html: props.label } }), props.isRequired && _jsx("span", { className: "edgf-field-required-indicator" })] }));
|
|
25
31
|
},
|
|
26
32
|
SubFieldRow(props) {
|
|
33
|
+
if (!props.children || (Array.isArray(props.children) && props.children.length === 0))
|
|
34
|
+
return null;
|
|
27
35
|
return (_jsx("div", { className: "edgf-subfield-row", style: {
|
|
28
36
|
"--edgf-subfield-basis": props.basis ?? "auto",
|
|
29
37
|
}, children: props.children }));
|
|
@@ -35,7 +43,7 @@ const FORM_COMPONENTS = {
|
|
|
35
43
|
return (_jsxs("div", { className: `edgf-subfield ${props.className ?? ""}`.trim(), children: [props.label && (_jsx("label", { className: "edgf-subfield-label", htmlFor: props.labelId, children: props.label })), props.children] }));
|
|
36
44
|
},
|
|
37
45
|
FieldDescription(props) {
|
|
38
|
-
return !!props.description && _jsx("div", { className: "edgf-field-description",
|
|
46
|
+
return (!!props.description && (_jsx("div", { className: "edgf-field-description", dangerouslySetInnerHTML: { __html: props.description } })));
|
|
39
47
|
},
|
|
40
48
|
FieldError(props) {
|
|
41
49
|
return !!props.error && _jsx("div", { className: "edgf-field-error", children: props.error });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-types.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/integrations/gravityforms/field-types.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClC,YAAY,EAAE,aAAa,GAAG,eAAe,GAAG,cAAc,GAAG,gBAAgB,CAAA;CAClF,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,OAA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AAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,iBAAiB,CAAA;AA8B3D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"field-types.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/integrations/gravityforms/field-types.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClC,YAAY,EAAE,aAAa,GAAG,eAAe,GAAG,cAAc,GAAG,gBAAgB,CAAA;CAClF,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA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,MAAM,MAAM,UAAU,GAAG,OAAO,iBAAiB,CAAA;AAEjD,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAE5D,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,CAElF"}
|
|
@@ -35,7 +35,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
35
35
|
}),
|
|
36
36
|
defaultComponent(props) {
|
|
37
37
|
const id = useId();
|
|
38
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
38
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { id: id, type: "text", required: props.isRequired, name: `field_${props.id}`, disabled: props.disabled, placeholder: props.options?.placeholder || "", value: props.value || "", onChange: (e) => props.set(e.currentTarget.value) }) }));
|
|
39
39
|
},
|
|
40
40
|
}),
|
|
41
41
|
textarea: defineType({
|
|
@@ -58,7 +58,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
58
58
|
defaultComponent(props) {
|
|
59
59
|
const id = useId();
|
|
60
60
|
const isPlaceholder = props.value === "" || props.value == null || props.value === undefined;
|
|
61
|
-
return (_jsx(props.Wrapper, { labelId: id, children:
|
|
61
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Select, { id: id, name: `field_${props.id}`, required: props.isRequired, disabled: props.disabled, value: props.value || "", onChange: (e) => props.set(e.target.value), "data-is-placeholder": isPlaceholder ? "" : undefined, placeholder: isPlaceholder ? (props.placeholder ?? "") : undefined, choices: props.choices }) }));
|
|
62
62
|
},
|
|
63
63
|
}),
|
|
64
64
|
number: defineType({
|
|
@@ -72,7 +72,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
72
72
|
}),
|
|
73
73
|
defaultComponent(props) {
|
|
74
74
|
const id = useId();
|
|
75
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
75
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { id: id, type: "number", required: props.isRequired, name: `field_${props.id}`, disabled: props.disabled, placeholder: props.placeholder || "", value: props.value !== undefined && props.value !== null ? props.value : "", min: props.rangeMin, max: props.rangeMax, onChange: (e) => {
|
|
76
76
|
const number = parseFloat(e.currentTarget.value);
|
|
77
77
|
props.set(String(number) === e.currentTarget.value ? number : e.currentTarget.value);
|
|
78
78
|
} }) }));
|
|
@@ -92,7 +92,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
92
92
|
});
|
|
93
93
|
},
|
|
94
94
|
defaultComponent(props) {
|
|
95
|
-
return (_jsx(props.Wrapper, { children: _jsx("ul", { children: props.choices.map((choice, index) => (_jsx("li", { children: _jsxs("label", { children: [_jsx(
|
|
95
|
+
return (_jsx(props.Wrapper, { children: _jsx("ul", { children: props.choices.map((choice, index) => (_jsx("li", { children: _jsxs("label", { children: [_jsx(props.formComponents.Input, { type: "checkbox", name: `field_${props.id}[]`, value: choice.value, disabled: props.disabled, checked: props.value?.includes(choice.value), onChange: (e) => {
|
|
96
96
|
if (e.target.checked) {
|
|
97
97
|
props.set([...(props.value || []), choice.value]);
|
|
98
98
|
}
|
|
@@ -110,7 +110,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
110
110
|
columns: field.columns ? Number(field.columns) : undefined,
|
|
111
111
|
}),
|
|
112
112
|
defaultComponent(props) {
|
|
113
|
-
return (_jsx(props.Wrapper, { children: _jsx("ul", { children: props.choices.map((choice, index) => (_jsx("li", { children: _jsxs("label", { children: [_jsx(
|
|
113
|
+
return (_jsx(props.Wrapper, { children: _jsx("ul", { children: props.choices.map((choice, index) => (_jsx("li", { children: _jsxs("label", { children: [_jsx(props.formComponents.Input, { type: "radio", name: `field_${props.id}`, value: choice.value, disabled: props.disabled, checked: props.value === choice.value, onChange: (e) => {
|
|
114
114
|
props.set(choice.value);
|
|
115
115
|
} }), _jsx("span", { children: choice.text })] }) }, index))) }) }));
|
|
116
116
|
},
|
|
@@ -198,12 +198,12 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
198
198
|
for (const subfield of Object.values(props.subfields)) {
|
|
199
199
|
if (!subfield.visible)
|
|
200
200
|
continue;
|
|
201
|
-
fields.push(_jsx(props.formComponents.SubFieldWrapper, { label: subfield.label, labelId: id + subfield.name, children: subfield.choices?.length ? (
|
|
201
|
+
fields.push(_jsx(props.formComponents.SubFieldWrapper, { label: subfield.label, labelId: id + subfield.name, children: subfield.choices?.length ? (_jsx(props.formComponents.Select, { id: id + subfield.name, name: `field_${props.id}_${subfield.name}`, disabled: props.disabled, value: props.value?.[subfield.name] || "", onChange: (e) => {
|
|
202
202
|
props.set({
|
|
203
203
|
...(props.value || {}),
|
|
204
204
|
[subfield.name]: e.target.value,
|
|
205
205
|
});
|
|
206
|
-
},
|
|
206
|
+
}, placeholder: subfield.placeholder || "", choices: subfield.choices })) : (_jsx(props.formComponents.Input, { id: id + subfield.name, type: "text", name: `field_${props.id}_${subfield.name}`, disabled: props.disabled, placeholder: subfield.placeholder, value: props.value?.[subfield.name] || "", autoComplete: subfield.autocomplete, onChange: (e) => {
|
|
207
207
|
props.set({
|
|
208
208
|
...(props.value || {}),
|
|
209
209
|
[subfield.name]: e.currentTarget.value,
|
|
@@ -220,7 +220,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
220
220
|
},
|
|
221
221
|
defaultComponent(props) {
|
|
222
222
|
const id = useId();
|
|
223
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
223
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { type: "date", id: id, name: `field_${props.id}`, required: props.isRequired, disabled: props.disabled, placeholder: props.options?.placeholder || "", value: props.value || "", onChange: (e) => props.set(e.currentTarget.value) }) }));
|
|
224
224
|
},
|
|
225
225
|
}),
|
|
226
226
|
time: defineType({
|
|
@@ -230,7 +230,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
230
230
|
},
|
|
231
231
|
defaultComponent(props) {
|
|
232
232
|
const id = useId();
|
|
233
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
233
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { type: "time", id: id, name: `field_${props.id}`, required: props.isRequired, disabled: props.disabled, placeholder: props.options?.placeholder || "", value: props.value || "", onChange: (e) => props.set(e.currentTarget.value) }) }));
|
|
234
234
|
},
|
|
235
235
|
}),
|
|
236
236
|
phone: defineType({
|
|
@@ -240,7 +240,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
240
240
|
},
|
|
241
241
|
defaultComponent(props) {
|
|
242
242
|
const id = useId();
|
|
243
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
243
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { type: "tel", id: id, name: `field_${props.id}`, required: props.isRequired, disabled: props.disabled, placeholder: props.options?.placeholder || "", value: props.value || "", onChange: (e) => props.set(e.currentTarget.value) }) }));
|
|
244
244
|
},
|
|
245
245
|
}),
|
|
246
246
|
address: defineType({
|
|
@@ -291,7 +291,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
291
291
|
for (const subfield of Object.values(props.subfields)) {
|
|
292
292
|
if (!subfield.visible)
|
|
293
293
|
continue;
|
|
294
|
-
fields[subfield.name] = (_jsx(props.formComponents.SubFieldWrapper, { label: subfield.label, labelId: id + subfield.name, children: _jsx(
|
|
294
|
+
fields[subfield.name] = (_jsx(props.formComponents.SubFieldWrapper, { label: subfield.label, labelId: id + subfield.name, children: _jsx(props.formComponents.Input, { id: id + subfield.name, type: "text", name: `field_${props.id}_${subfield.name}`, disabled: props.disabled, placeholder: subfield.placeholder, autoComplete: subfield.autocomplete, value: props.value?.[subfield.name] || "", "data-address-component": subfield.name, onChange: (e) => {
|
|
295
295
|
props.set({
|
|
296
296
|
...(props.value || {}),
|
|
297
297
|
[subfield.name]: e.currentTarget.value,
|
|
@@ -312,7 +312,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
312
312
|
},
|
|
313
313
|
defaultComponent(props) {
|
|
314
314
|
const id = useId();
|
|
315
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
315
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { id: id, type: "url", name: `field_${props.id}`, required: props.isRequired, disabled: props.disabled, placeholder: props.options?.placeholder || "", value: props.value || "", onChange: (e) => props.set(e.currentTarget.value) }) }));
|
|
316
316
|
},
|
|
317
317
|
}),
|
|
318
318
|
email: defineType({
|
|
@@ -344,19 +344,19 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
344
344
|
const id = useId();
|
|
345
345
|
if (props.confirmation.enabled) {
|
|
346
346
|
const value = typeof props.value === "object" ? props.value : { email: props.value || "", confirmEmail: "" };
|
|
347
|
-
return (_jsx(props.Wrapper, { children: _jsxs(props.formComponents.SubFieldRow, { children: [_jsx(props.formComponents.SubFieldWrapper, { label: props.confirmation.emailLabel || "Email", labelId: id + "_email", children: _jsx(
|
|
347
|
+
return (_jsx(props.Wrapper, { children: _jsxs(props.formComponents.SubFieldRow, { children: [_jsx(props.formComponents.SubFieldWrapper, { label: props.confirmation.emailLabel || "Email", labelId: id + "_email", children: _jsx(props.formComponents.Input, { type: "email", id: id + "_email", required: props.isRequired, name: `field_${props.id}_email`, disabled: props.disabled, placeholder: props.confirmation.emailPlaceholder || "", value: typeof props.value === "object" ? props.value.email : props.value || "", onChange: (e) => {
|
|
348
348
|
props.set({
|
|
349
349
|
email: e.currentTarget.value,
|
|
350
350
|
confirmEmail: value.confirmEmail,
|
|
351
351
|
});
|
|
352
|
-
} }) }), _jsx(props.formComponents.SubFieldWrapper, { label: props.confirmation.confirmLabel || "Confirm Email", labelId: id + "_confirm", children: _jsx(
|
|
352
|
+
} }) }), _jsx(props.formComponents.SubFieldWrapper, { label: props.confirmation.confirmLabel || "Confirm Email", labelId: id + "_confirm", children: _jsx(props.formComponents.Input, { type: "email", id: id + "_confirm", required: props.isRequired, name: `field_${props.id}_email`, disabled: props.disabled, placeholder: props.confirmation.confirmPlaceholder || "", value: typeof props.value === "object" ? props.value.confirmEmail : props.value || "", onChange: (e) => {
|
|
353
353
|
props.set({
|
|
354
354
|
email: value.email,
|
|
355
355
|
confirmEmail: e.currentTarget.value,
|
|
356
356
|
});
|
|
357
357
|
} }) })] }) }));
|
|
358
358
|
}
|
|
359
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
359
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { type: "email", id: id, name: `field_${props.id}`, required: props.isRequired, disabled: props.disabled, placeholder: props.options?.placeholder || "", value: typeof props.value === "object" ? props.value.email : props.value || "", onChange: (e) => props.set(e.currentTarget.value) }) }));
|
|
360
360
|
},
|
|
361
361
|
}),
|
|
362
362
|
fileupload: defineType({
|
|
@@ -385,7 +385,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
385
385
|
},
|
|
386
386
|
defaultComponent(props) {
|
|
387
387
|
const id = useId();
|
|
388
|
-
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(
|
|
388
|
+
return (_jsx(props.Wrapper, { labelId: id, children: _jsx(props.formComponents.Input, { type: "file", id: id, name: `field_${props.id}${props.multiple ? "[]" : ""}`, required: props.isRequired, disabled: props.disabled, multiple: props.multiple, accept: props.allowedExtensions?.map((ext) => `.${ext}`).join(","), onChange: (e) => {
|
|
389
389
|
if (props.multiple) {
|
|
390
390
|
props.set(e.currentTarget.files ?? undefined);
|
|
391
391
|
}
|
|
@@ -416,7 +416,7 @@ export const GF_BUILTIN_FIELDS = {
|
|
|
416
416
|
},
|
|
417
417
|
defaultComponent(props) {
|
|
418
418
|
const id = useId();
|
|
419
|
-
return (_jsx(props.Wrapper, { descriptionElement: null, showLabel: false, children: _jsxs("div", { className: "edgf-consent-field", children: [_jsx(
|
|
419
|
+
return (_jsx(props.Wrapper, { descriptionElement: null, showLabel: false, children: _jsxs("div", { className: "edgf-consent-field", children: [_jsx(props.formComponents.Input, { type: "checkbox", name: `field_${props.id}`, required: props.isRequired, disabled: props.disabled, checked: props.value || false, onChange: (e) => props.set(e.target.checked), id: id }), _jsx("label", { htmlFor: id, className: "edgf-consent-label", dangerouslySetInnerHTML: { __html: props.checkboxLabel || "I Agree" } }), !!props.description && (_jsx("div", { className: "edgf-consent-agreement", dangerouslySetInnerHTML: { __html: props.description || "" } }))] }) }));
|
|
420
420
|
},
|
|
421
421
|
}),
|
|
422
422
|
captcha: defineType({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGravityForm.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/integrations/gravityforms/useGravityForm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE/E,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,eAAe,CAAA;IACrB,WAAW,CAAC,EAAE;QACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB,CAAA;CACF,CAAA;AAsBD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAEpE,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,GAAG,EAAE,IAAI,iBAAiB,GAAG;IAC7E,KAAK,EAAE,CAAC,GAAG,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,IAAI,CAAA;CAChC,GAAG,MAAM,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,sBAAsB,EAAE,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,GACpB;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,sBAAsB,EAAE,CAAA;CACjC,GACD;IACE,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAEL,MAAM,MAAM,YAAY,GACpB;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,YAAY,EAAE,CAAA;CACtB,GACD;IACE,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AA4HL,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO;;;gBAhLhC,MAAM;;;;;;
|
|
1
|
+
{"version":3,"file":"useGravityForm.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/integrations/gravityforms/useGravityForm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE/E,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,eAAe,CAAA;IACrB,WAAW,CAAC,EAAE;QACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB,CAAA;CACF,CAAA;AAsBD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAEpE,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,GAAG,EAAE,IAAI,iBAAiB,GAAG;IAC7E,KAAK,EAAE,CAAC,GAAG,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,IAAI,CAAA;CAChC,GAAG,MAAM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AAc,CAAC,CAAA"}
|
|
@@ -189,11 +189,12 @@ export function useGravityForm(opts) {
|
|
|
189
189
|
dispatch({ type: "goToPage", number: firstErrorPage });
|
|
190
190
|
}
|
|
191
191
|
}, [JSON.stringify(state.errors)]);
|
|
192
|
+
console.log("State is", state);
|
|
192
193
|
return {
|
|
193
194
|
...state,
|
|
194
195
|
submitLabel: state.page < state.pages.length - 1 ? "Next" : state.submitLabel || "Submit",
|
|
195
196
|
pageInfo: state.complete ? null : state.pages[state.page],
|
|
196
|
-
canGoBack: state.page > 0,
|
|
197
|
+
canGoBack: state.page > 0 && !state.complete,
|
|
197
198
|
canGoForward: state.page < state.pages.length - 1,
|
|
198
199
|
goBack: state.page > 0 ? () => dispatch({ type: "goToPage", number: state.page - 1 }) : null,
|
|
199
200
|
goForward: state.page < state.pages.length - 1 ? () => dispatch({ type: "goToPage", number: state.page + 1 }) : null,
|
|
@@ -210,7 +211,7 @@ export function useGravityForm(opts) {
|
|
|
210
211
|
items: fieldsLayout,
|
|
211
212
|
}),
|
|
212
213
|
submit() {
|
|
213
|
-
if (state.page === form.pagination?.pages.length - 1) {
|
|
214
|
+
if (state.page === form.pagination?.pages.length - 1 || !form.pagination?.pages.length) {
|
|
214
215
|
submitter?.submit(state);
|
|
215
216
|
}
|
|
216
217
|
else {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.2.0-beta.
|
|
1
|
+
export declare const VERSION = "2.2.0-beta.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.2.0-beta.
|
|
1
|
+
export const VERSION = "2.2.0-beta.3";
|
package/package.json
CHANGED
package/types.meta.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
type PostTypeName = keyof PostTypes
|
|
3
|
-
type TemplateName = keyof PageTemplates | (string & {})
|
|
3
|
+
type TemplateName = "default" | keyof PageTemplates | (string & {})
|
|
4
4
|
type BlockTypeName = Exclude<keyof BlockProps, "_core"> | (string & {})
|
|
5
5
|
type ChildBlockTypeName = BlockTypeName | keyof CoreBlockProps
|
|
6
6
|
type BlockTagName = keyof DefinedBlockTags
|