@wix/form-public 0.50.0 → 0.52.0
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/_tsup-dts-rollup.d.cts +12 -4
- package/dist/_tsup-dts-rollup.d.ts +12 -4
- package/dist/index.cjs +385 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +0 -105
- package/dist/index.css.map +1 -1
- package/dist/index.js +385 -23
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ErrorType } from '@wix/ambassador-forms-v1-validation-result/types';
|
|
2
2
|
import { Form } from '@wix/ambassador-forms-v4-form/types';
|
|
3
3
|
import { FormFields } from '@wix/form-fields';
|
|
4
|
+
import type { i18n } from '@wix/fe-essentials/i18n';
|
|
4
5
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
6
|
import { Layout } from '@wix/form-fields';
|
|
6
7
|
import { default as React_2 } from 'react';
|
|
@@ -71,7 +72,8 @@ declare interface BaseFieldProps {
|
|
|
71
72
|
id: string;
|
|
72
73
|
required: boolean;
|
|
73
74
|
readOnly: boolean;
|
|
74
|
-
|
|
75
|
+
hasError: boolean;
|
|
76
|
+
errorMessage: string | undefined;
|
|
75
77
|
onChange: (value: unknown) => void;
|
|
76
78
|
onBlur: () => void;
|
|
77
79
|
onFocus: () => void;
|
|
@@ -421,6 +423,8 @@ declare interface ChoiceOption {
|
|
|
421
423
|
default: boolean;
|
|
422
424
|
}
|
|
423
425
|
|
|
426
|
+
export declare function createI18n(locale: string): Promise<i18n>;
|
|
427
|
+
|
|
424
428
|
declare type Currency = {
|
|
425
429
|
sign?: string;
|
|
426
430
|
code?: string;
|
|
@@ -854,6 +858,8 @@ declare interface FixedPaymentProps {
|
|
|
854
858
|
export { FixedPaymentProps }
|
|
855
859
|
export { FixedPaymentProps as FixedPaymentProps_alias_1 }
|
|
856
860
|
|
|
861
|
+
export declare const FORM_VIEWER_NAMESPACE = "form-viewer";
|
|
862
|
+
|
|
857
863
|
declare interface FormError {
|
|
858
864
|
errorPath: string;
|
|
859
865
|
errorType: ErrorType;
|
|
@@ -864,13 +870,15 @@ declare interface FormError {
|
|
|
864
870
|
export { FormError }
|
|
865
871
|
export { FormError as FormError_alias_1 }
|
|
866
872
|
|
|
867
|
-
declare const FormProvider: ({ children, currency }: FormProviderProps) => JSX_2.Element;
|
|
873
|
+
declare const FormProvider: ({ children, currency, locale, regionalFormat, }: FormProviderProps) => JSX_2.Element | null;
|
|
868
874
|
export { FormProvider }
|
|
869
875
|
export { FormProvider as FormProvider_alias_1 }
|
|
870
876
|
|
|
871
|
-
declare interface FormProviderProps {
|
|
872
|
-
currency: Currency;
|
|
877
|
+
export declare interface FormProviderProps {
|
|
873
878
|
children: React_2.ReactNode;
|
|
879
|
+
currency: Currency;
|
|
880
|
+
locale: string;
|
|
881
|
+
regionalFormat?: string;
|
|
874
882
|
}
|
|
875
883
|
|
|
876
884
|
declare type FormValues = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ErrorType } from '@wix/ambassador-forms-v1-validation-result/types';
|
|
2
2
|
import { Form } from '@wix/ambassador-forms-v4-form/types';
|
|
3
3
|
import { FormFields } from '@wix/form-fields';
|
|
4
|
+
import type { i18n } from '@wix/fe-essentials/i18n';
|
|
4
5
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
6
|
import { Layout } from '@wix/form-fields';
|
|
6
7
|
import { default as React_2 } from 'react';
|
|
@@ -71,7 +72,8 @@ declare interface BaseFieldProps {
|
|
|
71
72
|
id: string;
|
|
72
73
|
required: boolean;
|
|
73
74
|
readOnly: boolean;
|
|
74
|
-
|
|
75
|
+
hasError: boolean;
|
|
76
|
+
errorMessage: string | undefined;
|
|
75
77
|
onChange: (value: unknown) => void;
|
|
76
78
|
onBlur: () => void;
|
|
77
79
|
onFocus: () => void;
|
|
@@ -421,6 +423,8 @@ declare interface ChoiceOption {
|
|
|
421
423
|
default: boolean;
|
|
422
424
|
}
|
|
423
425
|
|
|
426
|
+
export declare function createI18n(locale: string): Promise<i18n>;
|
|
427
|
+
|
|
424
428
|
declare type Currency = {
|
|
425
429
|
sign?: string;
|
|
426
430
|
code?: string;
|
|
@@ -854,6 +858,8 @@ declare interface FixedPaymentProps {
|
|
|
854
858
|
export { FixedPaymentProps }
|
|
855
859
|
export { FixedPaymentProps as FixedPaymentProps_alias_1 }
|
|
856
860
|
|
|
861
|
+
export declare const FORM_VIEWER_NAMESPACE = "form-viewer";
|
|
862
|
+
|
|
857
863
|
declare interface FormError {
|
|
858
864
|
errorPath: string;
|
|
859
865
|
errorType: ErrorType;
|
|
@@ -864,13 +870,15 @@ declare interface FormError {
|
|
|
864
870
|
export { FormError }
|
|
865
871
|
export { FormError as FormError_alias_1 }
|
|
866
872
|
|
|
867
|
-
declare const FormProvider: ({ children, currency }: FormProviderProps) => JSX_2.Element;
|
|
873
|
+
declare const FormProvider: ({ children, currency, locale, regionalFormat, }: FormProviderProps) => JSX_2.Element | null;
|
|
868
874
|
export { FormProvider }
|
|
869
875
|
export { FormProvider as FormProvider_alias_1 }
|
|
870
876
|
|
|
871
|
-
declare interface FormProviderProps {
|
|
872
|
-
currency: Currency;
|
|
877
|
+
export declare interface FormProviderProps {
|
|
873
878
|
children: React_2.ReactNode;
|
|
879
|
+
currency: Currency;
|
|
880
|
+
locale: string;
|
|
881
|
+
regionalFormat?: string;
|
|
874
882
|
}
|
|
875
883
|
|
|
876
884
|
declare type FormValues = {
|
package/dist/index.cjs
CHANGED
|
@@ -4,12 +4,15 @@ var React14 = require('react');
|
|
|
4
4
|
var camelCase = require('lodash.camelcase');
|
|
5
5
|
var mapKeys = require('lodash.mapkeys');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var i18next = require('i18next');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
7
9
|
|
|
8
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
11
|
|
|
10
12
|
var React14__default = /*#__PURE__*/_interopDefault(React14);
|
|
11
13
|
var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
|
|
12
14
|
var mapKeys__default = /*#__PURE__*/_interopDefault(mapKeys);
|
|
15
|
+
var i18next__default = /*#__PURE__*/_interopDefault(i18next);
|
|
13
16
|
|
|
14
17
|
var __create = Object.create;
|
|
15
18
|
var __defProp = Object.defineProperty;
|
|
@@ -40,7 +43,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
40
43
|
// file that has been converted to a CommonJS file using a Babel-
|
|
41
44
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
42
45
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
43
|
-
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
46
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
44
47
|
mod
|
|
45
48
|
));
|
|
46
49
|
|
|
@@ -798,6 +801,22 @@ var init_types_impl = __esm({
|
|
|
798
801
|
}
|
|
799
802
|
});
|
|
800
803
|
|
|
804
|
+
// ../../node_modules/@babel/runtime/helpers/extends.js
|
|
805
|
+
var require_extends = __commonJS({
|
|
806
|
+
"../../node_modules/@babel/runtime/helpers/extends.js"(exports, module) {
|
|
807
|
+
function _extends7() {
|
|
808
|
+
return module.exports = _extends7 = Object.assign ? Object.assign.bind() : function(n) {
|
|
809
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
810
|
+
var t = arguments[e];
|
|
811
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
812
|
+
}
|
|
813
|
+
return n;
|
|
814
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends7.apply(null, arguments);
|
|
815
|
+
}
|
|
816
|
+
module.exports = _extends7, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
|
|
801
820
|
// ../../node_modules/@babel/runtime/helpers/typeof.js
|
|
802
821
|
var require_typeof = __commonJS({
|
|
803
822
|
"../../node_modules/@babel/runtime/helpers/typeof.js"(exports, module) {
|
|
@@ -860,22 +879,6 @@ var require_defineProperty = __commonJS({
|
|
|
860
879
|
}
|
|
861
880
|
});
|
|
862
881
|
|
|
863
|
-
// ../../node_modules/@babel/runtime/helpers/extends.js
|
|
864
|
-
var require_extends = __commonJS({
|
|
865
|
-
"../../node_modules/@babel/runtime/helpers/extends.js"(exports, module) {
|
|
866
|
-
function _extends7() {
|
|
867
|
-
return module.exports = _extends7 = Object.assign ? Object.assign.bind() : function(n) {
|
|
868
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
869
|
-
var t = arguments[e];
|
|
870
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
871
|
-
}
|
|
872
|
-
return n;
|
|
873
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends7.apply(null, arguments);
|
|
874
|
-
}
|
|
875
|
-
module.exports = _extends7, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
876
|
-
}
|
|
877
|
-
});
|
|
878
|
-
|
|
879
882
|
// ../../node_modules/@wix/ambassador-forms-v1-validation-result/build/es/types.impl.js
|
|
880
883
|
var ErrorType, Format2, ValidationFormat2, ProductType2, PriceType2, FormatEnumFormat2, StringComponentType2, NodeType2, WidthType2, PluginContainerDataAlignment2, Type2, Target2, TextAlignment2, LineStyle2, Width2, Alignment2, ViewMode2, LayoutType2, Orientation2, Crop2, ThumbnailsAlignment2, GIFType2, Source2, Position2, MapType2, ViewRole2, VoteRole2, PollLayoutType2, PollLayoutDirection2, BackgroundType2, DecorationType2, FontType2, ImageStylesPosition2, AspectRatio2, Resizing2, Placement2, CardStylesType2, CardStylesAlignment2, CardStylesLayout2, AppType2, InitialExpandedItems2, Direction2, VerticalAlignment2, NullValue2, Scaling2, LayoutDataImagePosition2, VerticalAlignmentAlignment2, ResponsivenessBehaviour2, ImagePosition2, AlignmentEnumAlignment2, ImageFit2, NumberOfColumns2, FirstDayOfWeekEnumFirstDayOfWeek2, NumberComponentType2, BooleanComponentType2, ItemType2, PropertiesTypeEnum2, ComponentType2, WixFileComponentType2, UploadFileFormat2, PaymentComponentType2, SchedulingComponentType2, AppointmentFormat2, MultilineAddressComponentType2, DefaultCountryConfigType2, InputType2, EmailInfoTag2, PhoneInfoTag2, Tag2, OptInLevel2, ContactField2, FieldType2, DisplayFieldType2, FieldFieldType2, StringTypeFormatEnumFormat2, InputFieldStringComponentType2, InputFieldNumberComponentType2, InputFieldBooleanComponentType2, ArrayItemsItemType2, PropertiesTypePropertiesTypeEnum2, ArrayComponentType2, InputFieldWixFileComponentType2, InputFieldPaymentComponentType2, AddressComponentType2, ObjectArrayComponentType2, InputFieldSchedulingComponentType2, InputFieldInputType2, FormFieldContactInfoEmailInfoTag2, FormFieldContactInfoPhoneInfoTag2, AddressInfoTag2, ConfirmationLevel2, FormFieldContactInfoContactField2, DisplayFieldDisplayFieldType2, OverrideEntityType2, Kind2, SpamFilterProtectionLevel2, RequiredIndicator2, RequiredIndicatorPlacement2, UrlTargetEnumTarget2, SubmitSuccessAction2, ChangeableProperty2, OverrideEntityTypeEnumOverrideEntityType2, Operator2, ValidationMode, Feature, AscendPlan, ActionType;
|
|
881
884
|
var init_types_impl2 = __esm({
|
|
@@ -15763,6 +15766,270 @@ var require_isSameOrBefore = __commonJS({
|
|
|
15763
15766
|
}
|
|
15764
15767
|
});
|
|
15765
15768
|
|
|
15769
|
+
// ../form-fields/dist/esm/assets/locale/viewer/messages_en.json
|
|
15770
|
+
var require_messages_en = __commonJS({
|
|
15771
|
+
"../form-fields/dist/esm/assets/locale/viewer/messages_en.json"(exports, module) {
|
|
15772
|
+
module.exports = {
|
|
15773
|
+
"contacts-url-input.input.error.message.format-error": "Enter a web URL like https://www.example.com.",
|
|
15774
|
+
"field-context-menu.cut": "Cut",
|
|
15775
|
+
"input.error.message.incomplete-date-error.day-time": "Enter a day and time.",
|
|
15776
|
+
"field.signature.a11y.action-description.type": "Use the keyboard to type.",
|
|
15777
|
+
"input.error.message.required-error-forced": "This field is required.",
|
|
15778
|
+
"field-context-menu.show-field": "Show field",
|
|
15779
|
+
"date-picker.input.error.message.format-error": "Choose a date.",
|
|
15780
|
+
"form.login-bar.actions.login": "Log in",
|
|
15781
|
+
"date-picker.a11y.clear-button": "Clear",
|
|
15782
|
+
"form.file-upload.uploading": "Uploading {count, plural, =0 {...} other {#%...}}",
|
|
15783
|
+
"rating-input.a11y.reaction-label": "{count} {count, plural, =1 {star} other {stars}}",
|
|
15784
|
+
"contacts-company.input.error.message.required-error": "Enter a company name.",
|
|
15785
|
+
"dext-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15786
|
+
"field.signature.clear-button.label": "Clear",
|
|
15787
|
+
"input.error.message.type-error": "Choose a {type}.",
|
|
15788
|
+
"payment-input.input.error.message.required-error": "Enter a payment amount.",
|
|
15789
|
+
"form.login-bar.action.logout": "Log out",
|
|
15790
|
+
"date-picker.a11y.arrow-left": "Go to previous month",
|
|
15791
|
+
"mla-subdivision.input.error.message.required-error.tr": "Choose a city.",
|
|
15792
|
+
"input.error.message.value-range-error": "Enter a number from {minLimit} to {maxLimit}.",
|
|
15793
|
+
"input.error.message.incomplete-date-error.year-month": "Enter a month and year.",
|
|
15794
|
+
"mla-address-line.input.error.message.required-error": "Enter an address.",
|
|
15795
|
+
"contacts-position.input.error.message.required-error": "Enter a position or job title.",
|
|
15796
|
+
"bookings-phone.input.error.message.format-error": "Enter a valid phone number.",
|
|
15797
|
+
"input.error.message.incomplete-date-error.year-month-time": "Enter a month, time and year.",
|
|
15798
|
+
"field.number.aria-role-description": "Number",
|
|
15799
|
+
"signature.input.error.message.required-error": "Sign in the box above.",
|
|
15800
|
+
"field.date.label.month": "Month",
|
|
15801
|
+
"field.rich-text.read-more-button.label": "Read more",
|
|
15802
|
+
"field.time.label.period": "AM/PM setting",
|
|
15803
|
+
"submit.failed.message": "We could not submit your form. Try again later.",
|
|
15804
|
+
"dext-email.input.error.message.required-error": "Enter an email address like example@mysite.com.",
|
|
15805
|
+
"mla-city.input.error.message.required-error.tr": "Enter a district.",
|
|
15806
|
+
"date-picker.a11y.calendar-button.role-description": "Calendar dialog pop up collapsed",
|
|
15807
|
+
"field.signature.a11y.action-description.draw-or-type": "Sign in the box or use the keyboard to type.",
|
|
15808
|
+
"field.time.perdiod.AM": "AM",
|
|
15809
|
+
"form.login-bar.title.logged-out-state": "Have an account? ",
|
|
15810
|
+
"form.appointment.slots-not-found.text": "There\u2019s no availability for this date. Try selecting another date.",
|
|
15811
|
+
"input.error.message.format-error": 'Use the format "{format}."',
|
|
15812
|
+
"contacts-address.input.error.message.required-error": "Enter an address.",
|
|
15813
|
+
"field-context-menu.copy": "Copy to clipboard",
|
|
15814
|
+
"field.signature.a11y.state.empty": "Signature field is empty.",
|
|
15815
|
+
"dext-date-picker.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15816
|
+
"payment-input.input.error.message.min-value-error": "Enter a payment amount greater than {currency}{limit}.",
|
|
15817
|
+
"input.error.message.incomplete-date-error.year-time": "Enter a 4 digit year and time.",
|
|
15818
|
+
"field.signature.a11y.state.signed": "Signed.",
|
|
15819
|
+
"field.quiz-answer-feedback.wrong": "Incorrect",
|
|
15820
|
+
"mla-city.input.error.message.required-error": "Enter a city.",
|
|
15821
|
+
"field.rich-text.read-less-button.label": "Read less",
|
|
15822
|
+
"form.appointment.accessibility.calendar.previous-week.aria-label": "Show previous week",
|
|
15823
|
+
"field.signature.mode.upload.description": "Upload mode selected. Upload an image of your signature.",
|
|
15824
|
+
"field.quiz-file-upload.skipped": "This question was skipped. ",
|
|
15825
|
+
"ecom.email.label": "Email",
|
|
15826
|
+
"input.error.message.incomplete-date-error.year-month-day": "Enter a month, day and year.",
|
|
15827
|
+
"field-context-menu.make-optional": "Make optional",
|
|
15828
|
+
"contacts-subscribe.input.error.message.not-allowed-value": "Check the box to continue.",
|
|
15829
|
+
"field.signature.mode.draw.description": "Drawing mode selected. Drawing requires a mouse or touchpad. For keyboard accessibility, select Type or Upload.",
|
|
15830
|
+
"checkbox.input.error.message.required-error": "Check the box to continue.",
|
|
15831
|
+
"date-picker.input.error.message.required-error": "Choose a date.",
|
|
15832
|
+
"dext-tags.input.error.message.required-error": "Choose an option.",
|
|
15833
|
+
"field-context-menu.delete": "Delete",
|
|
15834
|
+
"field.date.label.year": "Year",
|
|
15835
|
+
"mla-address-line-2.input.error.message.required-error": "Enter a second address line (e.g., apartment, suite, floor).",
|
|
15836
|
+
"form.login-bar.title.logged-in-state": "Logged in as {user}",
|
|
15837
|
+
"payment-input.input.error.message.max-value-error": "Enter a payment amount less than {currency}{limit}.",
|
|
15838
|
+
"ecom-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15839
|
+
"payment-input.input.error.message.value-range-error": "Enter a payment amount between {currency}{minLimit} and {currency}{maxLimit}.",
|
|
15840
|
+
"input.error.message.incomplete-date-error.year-day": "Enter a day and year.",
|
|
15841
|
+
"submission-table.signature.not-signed": "Not signed",
|
|
15842
|
+
"dext-url-input.input.error.message.format-error": "Enter a web URL like https://www.example.com.",
|
|
15843
|
+
"ecom-phone.input.error.message.pattern-error": "Enter a valid phone number.",
|
|
15844
|
+
"contacts-phone.input.error.message.not-allowed-value": "Phone numbers with this country code aren\u2019t accepted.",
|
|
15845
|
+
"vat-id.input.error.message.required-error.il": "Enter a valid 9 digit ID (\u201Cteudat zehut\u201D) or Company number (\u201Chet pey\u201D).",
|
|
15846
|
+
"input.error.message.incomplete-date-error.day": "Enter a day.",
|
|
15847
|
+
"date-input.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15848
|
+
"input.error.message.invalid-location-id-error": "Location is invalid",
|
|
15849
|
+
"input.error.message.max-length-error": "Enter less than {limit, plural, one {# character} other {# characters}}.",
|
|
15850
|
+
"field.date.placeholder.day": "Day",
|
|
15851
|
+
"services-dropdown.input.error.message.required-error": "Select a Service",
|
|
15852
|
+
"ecom-email.input.error.message.required-error": "Enter an email address like example@mysite.com.",
|
|
15853
|
+
"dext-phone.input.error.message.not-allowed-value": "Phone numbers with this country code aren\u2019t accepted.",
|
|
15854
|
+
"dext-url-input.input.error.message.required-error": "Enter a web URL like https://www.example.com.",
|
|
15855
|
+
"contacts-date-input.input.error.message.format-error": "Enter a month, day and year.",
|
|
15856
|
+
"signature.input.error.message.required-error.with-upload": "Sign in the box above or upload your signature.",
|
|
15857
|
+
"contacts-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15858
|
+
"field.phone.country-selector-button.aria-label": "Select a country code",
|
|
15859
|
+
"field-context-menu.move-up": "Move up",
|
|
15860
|
+
"dext-text-input.input.error.message.required-error": "Enter an answer.",
|
|
15861
|
+
"settings.required-indicator-text": "(Required)",
|
|
15862
|
+
"file-upload.dropzone.overlay.button": " Drop your files here",
|
|
15863
|
+
"field.time.perdiod.PM": "PM",
|
|
15864
|
+
"contacts-birthdate.input.error.message.format-error": "Enter a month, day and year.",
|
|
15865
|
+
"field.quiz-answer-feedback.correct": "Correct",
|
|
15866
|
+
"vat-id.input.error.message.required-error": "Enter a CPF/CNPJ number.",
|
|
15867
|
+
"bookings-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
15868
|
+
"input.error.message.character-length-range-error": "Enter between {minLimit} and {maxLimit} characters.",
|
|
15869
|
+
"bookings-phone.input.error.message.not-allowed-value": "Phone numbers with this country code aren\u2019t accepted.",
|
|
15870
|
+
"contacts-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
15871
|
+
"dropdown.input.error.message.required-error": "Choose an option.",
|
|
15872
|
+
"dext-text-area.input.error.message.required-error": "Enter an answer.",
|
|
15873
|
+
"field.signature.settings.upload-button.label": "Upload Image",
|
|
15874
|
+
"field.date.placeholder.month": "Month",
|
|
15875
|
+
"form.error.prefix.a11y": "Error:",
|
|
15876
|
+
"contacts-tax-id.input.error.message.required-error": "Enter a VAT ID number.",
|
|
15877
|
+
"contacts-number-input.input.error.message.required-error": "Enter a number.",
|
|
15878
|
+
"date-picker.a11y.aria-label": "Show date picker",
|
|
15879
|
+
"field.phone.country-search-input.aria-label": "Search",
|
|
15880
|
+
"field.signature.a11y.state.drawing": "Writing signature...",
|
|
15881
|
+
"input.error.message.unknown-value-error": "Must have additional properties.",
|
|
15882
|
+
"dext-date-picker.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
15883
|
+
"form.appointment.empty-state.notification.text": "Currently, there\u2019s no available time slots to schedule. Contact us to complete your request.",
|
|
15884
|
+
"mla-country.input.error.message.required-error": "Choose a country/region.",
|
|
15885
|
+
"field.time.label.hours": "Hours",
|
|
15886
|
+
"file-upload.delete-file.aria-label": "Delete file",
|
|
15887
|
+
"field.vat-id.label-br": "CPF/CNPJ",
|
|
15888
|
+
"ecom-header.contact-details": "Customer details",
|
|
15889
|
+
"input.error.message.invalid-staff-id-error": "This field is invalid.",
|
|
15890
|
+
"date-input.input.error.message.format-error": "Enter a month, day and year.",
|
|
15891
|
+
"contacts-first-name.input.error.message.required-error": "Enter a first name.",
|
|
15892
|
+
"file-upload.dropzone.title": "Upload your file",
|
|
15893
|
+
"form.a11y.step.index.title": "Step {index} out of {total}",
|
|
15894
|
+
"field-context-menu.move-down": "Move down",
|
|
15895
|
+
"contacts-url-input.input.error.message.required-error": "Enter a web URL like https://www.example.com.",
|
|
15896
|
+
"field.time.label.minutes": "Minutes",
|
|
15897
|
+
"dext-phone.input.error.message.format-error": "Enter a valid phone number.",
|
|
15898
|
+
"bookings-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15899
|
+
"form.file-upload.explanation-text": "{count, plural, =1 {# file} other {# files}} uploaded",
|
|
15900
|
+
"contacts-last-name.input.error.message.required-error": "Enter a last name.",
|
|
15901
|
+
"field.signature.mode.selector.aria-label": "Signature input mode",
|
|
15902
|
+
"field.signature.mode.draw.label": "Draw",
|
|
15903
|
+
"mla-postal-code.input.error.message.pattern-error": "Enter a valid zip/postal code.",
|
|
15904
|
+
"date-picker.a11y.dropdown-year": "Select year",
|
|
15905
|
+
"time-input.input.error.message.format-error": "Enter hours and minutes.",
|
|
15906
|
+
"field-context-menu.hide-field": "Hide field",
|
|
15907
|
+
"input.error.message.not-allowed-value": "The chosen value is not allowed.",
|
|
15908
|
+
"input.error.message.min-value-error": "Enter a number that is {limit} or more.",
|
|
15909
|
+
"input.error.message.incomplete-date-error.month-day": "Enter a month and day.",
|
|
15910
|
+
"field.date.placeholder.time": "HH:MM",
|
|
15911
|
+
"submit.checkout.message": "Redirecting to checkout...",
|
|
15912
|
+
"input.error.message.invalid-phone-country-code-error": "Enter a valid country code.",
|
|
15913
|
+
"mla-street-name.input.error.message.required-error": "Enter a street name.",
|
|
15914
|
+
"bookings-first-name.input.error.message.required-error": "Enter a first name.",
|
|
15915
|
+
"vat-id.input.error.message.format-error": "Enter a valid CPF/CNPJ number.",
|
|
15916
|
+
"form.appointment.accessibility.calendar.next-week.aria-label": "Show next week",
|
|
15917
|
+
"donation.input.error.message.required-error": "Choose a donation amount.",
|
|
15918
|
+
"input.error.message.incomplete-date-error.month": "Enter a month.",
|
|
15919
|
+
"input.error.message.incomplete-date-error.year": "Enter a 4 digit year.",
|
|
15920
|
+
"vat-id.input.error.message.format-error.il": "Enter a valid 9 digit ID (\u201Cteudat zehut\u201D) or Company number (\u201Chet pey\u201D).",
|
|
15921
|
+
"field.phone.aria-label": "Phone",
|
|
15922
|
+
"field.signature.canvas.aria-label.empty": "Signature drawing area (empty)",
|
|
15923
|
+
"file-upload.dropzone.limit-reached.title": "You\u2019ve reached the file upload limit.",
|
|
15924
|
+
"form.appointment.accessibility.calendar.has-availability.aria-label": "This day has available time slots.",
|
|
15925
|
+
"bookings-phone.input.error.message.pattern-error": "Enter a valid phone number.",
|
|
15926
|
+
"input.error.message.incomplete-date-error.month-time": "Enter a month and time.",
|
|
15927
|
+
"product-list.input.error.message.required-error": "Choose an option.",
|
|
15928
|
+
"field-context-menu.move-to-next-page": "Move to next page",
|
|
15929
|
+
"mla-postal-code.input.error.message.required-error": "Enter a zip/postal code.",
|
|
15930
|
+
"file-upload.input.error.message.required-error": "Upload a file.",
|
|
15931
|
+
"vat-id.input.error.message.format-error.br": "Enter a valid CPF/CNPJ number.",
|
|
15932
|
+
"input.error.message.exact-character-length-error": "Enter exactly {limit, plural, one {# character} other {# characters}}.",
|
|
15933
|
+
"submission-table.signature.signed": "Signed",
|
|
15934
|
+
"input.error.message.incomplete-date-error": "Enter a month, day and year.",
|
|
15935
|
+
"ecom-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
15936
|
+
"field.vat-id.label-il": "ID/Company number",
|
|
15937
|
+
"text-input.input.error.message.required-error": "Enter an answer.",
|
|
15938
|
+
"url-input.input.error.message.required-error": "Enter a web URL like https://www.example.com.",
|
|
15939
|
+
"ecom-header.shipping-details": "Delivery details",
|
|
15940
|
+
"service-dropdown.input.error.message.required-error": "Select a Service",
|
|
15941
|
+
"field.signature.mode.type.description": "Type mode selected. Type your signature using the keyboard.",
|
|
15942
|
+
"input.error.message.incomplete-date-error.year-day-time": "Enter a day, time and year.",
|
|
15943
|
+
"number-input.input.error.message.required-error": "Enter a number.",
|
|
15944
|
+
"field.signature.mode.upload.label": "Upload",
|
|
15945
|
+
"input.error.message.unknown-error": "Unknown error, please contact Support.",
|
|
15946
|
+
"input.error.message.max-items-error": "Choose up to {limit, plural, one {# option} other {# options}}.",
|
|
15947
|
+
"file-upload.popover.aria-label": "List of uploaded files",
|
|
15948
|
+
"input.error.message.multiple-of-value-error": "Choose a multiple of {multipleOf}.",
|
|
15949
|
+
"full-name-last-name.input.error.message.required-error": "Enter a last name.",
|
|
15950
|
+
"field-context-menu.paste": "Paste",
|
|
15951
|
+
"input.error.message.pattern-error": 'Match the pattern "{pattern}".',
|
|
15952
|
+
"dext-number-input.input.error.message.required-error": "Enter a number.",
|
|
15953
|
+
"field-context-menu.ai-assistant": "Ask AI",
|
|
15954
|
+
"field-context-menu.move-to-previous-page": "Move to previous page",
|
|
15955
|
+
"dext-date-picker.input.error.message.required-error": "Choose a date.",
|
|
15956
|
+
"date-input.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
15957
|
+
"dext-checkbox-group.input.error.message.required-error": "Choose an option.",
|
|
15958
|
+
"file-upload.dropzone.subtitle": "Choose a file or drag and drop one here.",
|
|
15959
|
+
"dext-radio-group.input.error.message.required-error": "Choose an option.",
|
|
15960
|
+
"checkbox.input.error.message.not-allowed-value": "Check the box to continue.",
|
|
15961
|
+
"contacts-birthdate.input.error.message.max-value-error": "Enter a date from January 1, 1900 to today.",
|
|
15962
|
+
"input.error.message.incomplete-date-error.month-day-time": "Enter a month, day and time.",
|
|
15963
|
+
"file-upload.aria-roledescription": "File upload",
|
|
15964
|
+
"contacts-phone.input.error.message.pattern-error": "Enter a valid phone number.",
|
|
15965
|
+
"mla-street-number.input.error.message.required-error": "Enter a house number.",
|
|
15966
|
+
"date-picker.a11y.dropdown-month": "Select month",
|
|
15967
|
+
"field.signature.mode.type.label": "Type",
|
|
15968
|
+
"date-picker.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15969
|
+
"date-time-input.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15970
|
+
"dext-checkbox.input.error.message.required-error": "Check the box to continue.",
|
|
15971
|
+
"url-input.input.error.message.format-error": "Enter a web URL like https://www.example.com.",
|
|
15972
|
+
"add-other.default-other-option-label": "Other",
|
|
15973
|
+
"dext-checkbox.input.error.message.not-allowed-value": "Check the box to continue.",
|
|
15974
|
+
"field.date.placeholder.year": "Year",
|
|
15975
|
+
"date-picker.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
15976
|
+
"field.signature.text.placeholder": "Type your signature",
|
|
15977
|
+
"dext-date-picker.input.error.message.format-error": "Choose a date.",
|
|
15978
|
+
"form.file-upload.error.upload-limit": "There is an upload limit of {limit, plural, one {# file} other {# files}}.",
|
|
15979
|
+
"checkbox-group.input.error.message.required-error": "Choose an option.",
|
|
15980
|
+
"rating-input.input.error.message.required-error": "Choose a star rating.",
|
|
15981
|
+
"field.mla-apartment.label": "Apartment",
|
|
15982
|
+
"text-area.input.error.message.required-error": "Enter an answer.",
|
|
15983
|
+
"field.phone.country-search-input.placeholder": "Search",
|
|
15984
|
+
"donation.other-option.placeholder": "Enter an amount",
|
|
15985
|
+
"dext-rating-input.input.error.message.required-error": "Choose a star rating.",
|
|
15986
|
+
"field.signature.a11y.action-description.draw": "Sign in the box.",
|
|
15987
|
+
"contacts-birthdate.input.error.message.min-value-error": "Enter a date from January 1, 1900 to today.",
|
|
15988
|
+
"mla-subdivision.input.error.message.required-error": "Choose an option.",
|
|
15989
|
+
"dext-dropdown.input.error.message.required-error": "Choose an option.",
|
|
15990
|
+
"contacts-text-input.input.error.message.required-error": "Enter an answer.",
|
|
15991
|
+
"field.date.label.day": "Day",
|
|
15992
|
+
"vat-id.input.error.message.required-error.br": "Enter a CPF/CNPJ number.",
|
|
15993
|
+
"date-picker.calendar.close-button": "Close",
|
|
15994
|
+
"input.error.message.invalid-value-for-pattern": "Enter a valid answer.",
|
|
15995
|
+
"radio-group.input.error.message.required-error": "Choose an option.",
|
|
15996
|
+
"input.error.message.min-items-error": "Choose at least {limit, plural, one {# option} other {# options}}.",
|
|
15997
|
+
"ecom.form.field-type.ecom-subscriptions.label": "I agree to receive news to the email address and/or phone numbers added",
|
|
15998
|
+
"input.error.message.decimal_point_error": "Add {number} number(s) after the decimal point.",
|
|
15999
|
+
"bookings-email.input.error.message.required-error": "Enter an email address like example@mysite.com.",
|
|
16000
|
+
"contacts-subscribe.input.error.message.required-error": "Check the box to continue.",
|
|
16001
|
+
"form.appointment.show-more-slots.text": "Show more slots",
|
|
16002
|
+
"form.file-upload.error.upload-failed": "File upload failed.",
|
|
16003
|
+
"dext-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
16004
|
+
"full-name-first-name.input.error.message.required-error": "Enter a first name.",
|
|
16005
|
+
"field-context-menu.settings": "Settings",
|
|
16006
|
+
"bookings-last-name.input.error.message.required-error": "Enter a last name.",
|
|
16007
|
+
"actions.rules.button.label_DELETE_THIS": "Rules",
|
|
16008
|
+
"appointment.input.error.message.required-error": "This field is required.",
|
|
16009
|
+
"field-context-menu.make-required": "Make required",
|
|
16010
|
+
"date-time-input.input.error.message.format-error": "Enter a month, day and year.",
|
|
16011
|
+
"field.date.label.time": "Time",
|
|
16012
|
+
"input.error.message.required-error": "This field is required.",
|
|
16013
|
+
"field.phone.country-selector-dropdown.no-result": "No results found...",
|
|
16014
|
+
"input.error.message.exact-items-number-error": "Choose {limit, plural, one {# option} other {# options}}.",
|
|
16015
|
+
"form.appointment.timezone.label": "Time zone",
|
|
16016
|
+
"date-time-input.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
16017
|
+
"date-picker.a11y.arrow-right": "Go to next month",
|
|
16018
|
+
"input.error.message.incomplete-date-error.time": "Enter a time.",
|
|
16019
|
+
"field.signature.canvas.aria-label.signed": "Signature drawing area (signed)",
|
|
16020
|
+
"contacts-phone.input.error.message.format-error": "Enter a valid phone number.",
|
|
16021
|
+
"tags.input.error.message.required-error": "Choose an option.",
|
|
16022
|
+
"file-upload.dropzone.limit-reached.subtitle": "Delete a file to add a different one.",
|
|
16023
|
+
"input.error.message.max-value-error": "Enter a number that is {limit} or less.",
|
|
16024
|
+
"input.error.message.min-length-error": "Enter at least {limit, plural, one {# character} other {# characters}}.",
|
|
16025
|
+
"form.appointment.meeting-format.in-person-location-method-os-location": "Business location",
|
|
16026
|
+
"form.file-upload.error.limit": "You've reached your upload limit of {limit, number} files.",
|
|
16027
|
+
"contacts-email.input.error.message.required-error": "Enter an email address like example@mysite.com.",
|
|
16028
|
+
"field-context-menu.duplicate": "Duplicate"
|
|
16029
|
+
};
|
|
16030
|
+
}
|
|
16031
|
+
});
|
|
16032
|
+
|
|
15766
16033
|
// ../form-fields/dist/esm/constants/input-field-types.js
|
|
15767
16034
|
var CONTACTS_FIELD_TYPES = {
|
|
15768
16035
|
CONTACTS_COMPANY: "CONTACTS_COMPANY",
|
|
@@ -22012,16 +22279,112 @@ var useForm3 = ({
|
|
|
22012
22279
|
fieldsLayout
|
|
22013
22280
|
} : null;
|
|
22014
22281
|
};
|
|
22015
|
-
var
|
|
22282
|
+
var SUPPORTED_LOCALES = [
|
|
22283
|
+
"ar",
|
|
22284
|
+
"bg",
|
|
22285
|
+
"ca",
|
|
22286
|
+
"cs",
|
|
22287
|
+
"da",
|
|
22288
|
+
"de",
|
|
22289
|
+
"el",
|
|
22290
|
+
"en",
|
|
22291
|
+
"es",
|
|
22292
|
+
"fi",
|
|
22293
|
+
"fr",
|
|
22294
|
+
"he",
|
|
22295
|
+
"hi",
|
|
22296
|
+
"hu",
|
|
22297
|
+
"id",
|
|
22298
|
+
"it",
|
|
22299
|
+
"ja",
|
|
22300
|
+
"ko",
|
|
22301
|
+
"lt",
|
|
22302
|
+
"ms",
|
|
22303
|
+
"nl",
|
|
22304
|
+
"no",
|
|
22305
|
+
"pl",
|
|
22306
|
+
"pt",
|
|
22307
|
+
"ro",
|
|
22308
|
+
"ru",
|
|
22309
|
+
"sv",
|
|
22310
|
+
"th",
|
|
22311
|
+
"tl",
|
|
22312
|
+
"tr",
|
|
22313
|
+
"uk",
|
|
22314
|
+
"vi",
|
|
22315
|
+
"zh"
|
|
22316
|
+
];
|
|
22317
|
+
var FORM_VIEWER_NAMESPACE = "form-viewer";
|
|
22318
|
+
async function loadFieldViewerTranslations(locale) {
|
|
22319
|
+
try {
|
|
22320
|
+
const supportedLocale = SUPPORTED_LOCALES.includes(locale) ? locale : "en";
|
|
22321
|
+
const fieldMessages = await import(`@wix/form-fields/dist/esm/assets/locale/viewer/messages_${supportedLocale}.json`);
|
|
22322
|
+
return fieldMessages.default;
|
|
22323
|
+
} catch (error) {
|
|
22324
|
+
console.warn(
|
|
22325
|
+
`Failed to load translations for locale ${locale}, falling back to English`,
|
|
22326
|
+
error
|
|
22327
|
+
);
|
|
22328
|
+
try {
|
|
22329
|
+
const fallbackMessages = await Promise.resolve().then(() => __toESM(require_messages_en(), 1));
|
|
22330
|
+
return fallbackMessages.default;
|
|
22331
|
+
} catch {
|
|
22332
|
+
return {};
|
|
22333
|
+
}
|
|
22334
|
+
}
|
|
22335
|
+
}
|
|
22336
|
+
async function createI18n(locale) {
|
|
22337
|
+
const i18nInstance = i18next__default.default.createInstance();
|
|
22338
|
+
await i18nInstance.use(reactI18next.initReactI18next).init({
|
|
22339
|
+
lng: locale,
|
|
22340
|
+
fallbackLng: "en",
|
|
22341
|
+
interpolation: {
|
|
22342
|
+
escapeValue: false
|
|
22343
|
+
},
|
|
22344
|
+
defaultNS: "translation",
|
|
22345
|
+
ns: ["translation", FORM_VIEWER_NAMESPACE],
|
|
22346
|
+
resources: {}
|
|
22347
|
+
});
|
|
22348
|
+
const fieldTranslations = await loadFieldViewerTranslations(locale);
|
|
22349
|
+
i18nInstance.addResourceBundle(
|
|
22350
|
+
locale,
|
|
22351
|
+
FORM_VIEWER_NAMESPACE,
|
|
22352
|
+
fieldTranslations,
|
|
22353
|
+
true,
|
|
22354
|
+
true
|
|
22355
|
+
);
|
|
22356
|
+
return i18nInstance;
|
|
22357
|
+
}
|
|
22358
|
+
var FormProvider = ({
|
|
22359
|
+
children,
|
|
22360
|
+
currency,
|
|
22361
|
+
locale,
|
|
22362
|
+
regionalFormat = "en"
|
|
22363
|
+
}) => {
|
|
22364
|
+
const [i18nInstance, setI18nInstance] = React14.useState(null);
|
|
22365
|
+
React14.useEffect(() => {
|
|
22366
|
+
const initializeI18n = async () => {
|
|
22367
|
+
try {
|
|
22368
|
+
const newI18n = await createI18n(locale);
|
|
22369
|
+
setI18nInstance(newI18n);
|
|
22370
|
+
} catch (error) {
|
|
22371
|
+
console.error("Failed to initialize i18n:", error);
|
|
22372
|
+
}
|
|
22373
|
+
};
|
|
22374
|
+
initializeI18n();
|
|
22375
|
+
}, [locale]);
|
|
22376
|
+
if (!i18nInstance) {
|
|
22377
|
+
return null;
|
|
22378
|
+
}
|
|
22016
22379
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22017
22380
|
FormViewerProvider,
|
|
22018
22381
|
{
|
|
22019
|
-
i18n:
|
|
22020
|
-
} },
|
|
22382
|
+
i18n: i18nInstance,
|
|
22021
22383
|
form: {},
|
|
22022
|
-
locale
|
|
22023
|
-
regionalFormat
|
|
22384
|
+
locale,
|
|
22385
|
+
regionalFormat,
|
|
22024
22386
|
currency,
|
|
22387
|
+
translationNamespace: FORM_VIEWER_NAMESPACE,
|
|
22025
22388
|
WixRicosViewer: () => null,
|
|
22026
22389
|
children: /* @__PURE__ */ jsxRuntime.jsx(ExternalDataProvider, { externalData: {}, children: /* @__PURE__ */ jsxRuntime.jsx(FormStatusProvider, { children }) })
|
|
22027
22390
|
}
|