@wix/headless-forms 0.0.28 → 0.0.29
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/cjs/dist/react/Form.js +3 -2
- package/dist/react/Form.js +3 -2
- package/package.json +3 -3
package/cjs/dist/react/Form.js
CHANGED
|
@@ -556,10 +556,10 @@ exports.Fields = react_1.default.forwardRef((props, ref) => {
|
|
|
556
556
|
return ((0, jsx_runtime_1.jsx)(Form_js_1.Fields, { children: ({ form, formValues, submitForm, handleForm, addressTemplates, siteConfig, }) => {
|
|
557
557
|
if (!form)
|
|
558
558
|
return null;
|
|
559
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, children: (0, jsx_runtime_1.jsx)(form_public_1.FormProvider, { currency: siteConfig?.currency ?? index_js_1.DEFAULT_CURRENCY, locale: currentLanguage, regionalFormat: currentLocale, addressTemplates: addressTemplates, children: (0, jsx_runtime_1.jsx)(form_public_1.UniqueFieldSuffixContextProvider, { parentId: form._id ?? '', children: (0, jsx_runtime_1.jsx)(FieldsWithForm, { form: form, values: formValues, onChange: handleForm, errors: formErrors, onValidate: handleFormValidate, fields: props.fieldMap, submitForm: submitForm, rowGapClassname: props.rowGapClassname, columnGapClassname: props.columnGapClassname, formRef: formRef }) }) }) }));
|
|
559
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, children: (0, jsx_runtime_1.jsx)(form_public_1.FormProvider, { currency: siteConfig?.currency ?? index_js_1.DEFAULT_CURRENCY, locale: currentLanguage, regionalFormat: currentLocale, addressTemplates: addressTemplates, children: (0, jsx_runtime_1.jsx)(form_public_1.UniqueFieldSuffixContextProvider, { parentId: form._id ?? '', children: (0, jsx_runtime_1.jsx)(FieldsWithForm, { addressTemplates: addressTemplates, form: form, values: formValues, onChange: handleForm, errors: formErrors, onValidate: handleFormValidate, fields: props.fieldMap, submitForm: submitForm, rowGapClassname: props.rowGapClassname, columnGapClassname: props.columnGapClassname, formRef: formRef }) }) }) }));
|
|
560
560
|
} }));
|
|
561
561
|
});
|
|
562
|
-
const FieldsWithForm = ({ form, submitForm, values, onChange, errors, onValidate, fields: fieldMap, rowGapClassname, columnGapClassname, formRef, }) => {
|
|
562
|
+
const FieldsWithForm = ({ form, submitForm, values, onChange, errors, onValidate, fields: fieldMap, rowGapClassname, columnGapClassname, formRef, addressTemplates, }) => {
|
|
563
563
|
const coreUploadFile = async ({ file, formId, }) => {
|
|
564
564
|
const uploadUrl = await (0, index_js_1.getUploadUrl)(formId, file);
|
|
565
565
|
if (uploadUrl === undefined) {
|
|
@@ -583,6 +583,7 @@ const FieldsWithForm = ({ form, submitForm, values, onChange, errors, onValidate
|
|
|
583
583
|
uploadFile: coreUploadFile,
|
|
584
584
|
fieldMap,
|
|
585
585
|
forwardedRef: formRef,
|
|
586
|
+
addressTemplates,
|
|
586
587
|
});
|
|
587
588
|
if (!formData)
|
|
588
589
|
return null;
|
package/dist/react/Form.js
CHANGED
|
@@ -520,10 +520,10 @@ export const Fields = React.forwardRef((props, ref) => {
|
|
|
520
520
|
return (_jsx(CoreFields, { children: ({ form, formValues, submitForm, handleForm, addressTemplates, siteConfig, }) => {
|
|
521
521
|
if (!form)
|
|
522
522
|
return null;
|
|
523
|
-
return (_jsx("div", { ref: ref, children: _jsx(FormProvider, { currency: siteConfig?.currency ?? DEFAULT_CURRENCY, locale: currentLanguage, regionalFormat: currentLocale, addressTemplates: addressTemplates, children: _jsx(UniqueFieldSuffixContextProvider, { parentId: form._id ?? '', children: _jsx(FieldsWithForm, { form: form, values: formValues, onChange: handleForm, errors: formErrors, onValidate: handleFormValidate, fields: props.fieldMap, submitForm: submitForm, rowGapClassname: props.rowGapClassname, columnGapClassname: props.columnGapClassname, formRef: formRef }) }) }) }));
|
|
523
|
+
return (_jsx("div", { ref: ref, children: _jsx(FormProvider, { currency: siteConfig?.currency ?? DEFAULT_CURRENCY, locale: currentLanguage, regionalFormat: currentLocale, addressTemplates: addressTemplates, children: _jsx(UniqueFieldSuffixContextProvider, { parentId: form._id ?? '', children: _jsx(FieldsWithForm, { addressTemplates: addressTemplates, form: form, values: formValues, onChange: handleForm, errors: formErrors, onValidate: handleFormValidate, fields: props.fieldMap, submitForm: submitForm, rowGapClassname: props.rowGapClassname, columnGapClassname: props.columnGapClassname, formRef: formRef }) }) }) }));
|
|
524
524
|
} }));
|
|
525
525
|
});
|
|
526
|
-
const FieldsWithForm = ({ form, submitForm, values, onChange, errors, onValidate, fields: fieldMap, rowGapClassname, columnGapClassname, formRef, }) => {
|
|
526
|
+
const FieldsWithForm = ({ form, submitForm, values, onChange, errors, onValidate, fields: fieldMap, rowGapClassname, columnGapClassname, formRef, addressTemplates, }) => {
|
|
527
527
|
const coreUploadFile = async ({ file, formId, }) => {
|
|
528
528
|
const uploadUrl = await getUploadUrl(formId, file);
|
|
529
529
|
if (uploadUrl === undefined) {
|
|
@@ -547,6 +547,7 @@ const FieldsWithForm = ({ form, submitForm, values, onChange, errors, onValidate
|
|
|
547
547
|
uploadFile: coreUploadFile,
|
|
548
548
|
fieldMap,
|
|
549
549
|
forwardedRef: formRef,
|
|
550
|
+
addressTemplates,
|
|
550
551
|
});
|
|
551
552
|
if (!formData)
|
|
552
553
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-forms",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vitest": "^3.1.4"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@wix/form-public": "^0.
|
|
45
|
+
"@wix/form-public": "^0.118.0",
|
|
46
46
|
"@wix/forms": "^1.0.373",
|
|
47
47
|
"@wix/headless-utils": "0.0.8",
|
|
48
48
|
"@wix/locale-dataset-javascript": "^2.3.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"groupId": "com.wixpress.headless-components"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
"falconPackageHash": "
|
|
63
|
+
"falconPackageHash": "03e64994e9a255b7cb74eaa44f63bd943b9d49cf757e3891490aec32"
|
|
64
64
|
}
|