@wix/form-public 0.54.0 → 0.56.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 +122 -1692
- package/dist/_tsup-dts-rollup.d.ts +122 -1692
- package/dist/index.cjs +560 -255
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +561 -257
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var React14 = require('react');
|
|
4
4
|
var camelCase = require('lodash.camelcase');
|
|
5
5
|
var mapKeys = require('lodash.mapkeys');
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var i18next = require('i18next');
|
|
8
7
|
var reactI18next = require('react-i18next');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
|
|
10
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
|
|
@@ -15772,6 +15772,7 @@ var require_messages_en = __commonJS({
|
|
|
15772
15772
|
module.exports = {
|
|
15773
15773
|
"contacts-url-input.input.error.message.format-error": "Enter a web URL like https://www.example.com.",
|
|
15774
15774
|
"field-context-menu.cut": "Cut",
|
|
15775
|
+
"search.keyword.basic.full-name": "full name, name, first and last",
|
|
15775
15776
|
"input.error.message.incomplete-date-error.day-time": "Enter a day and time.",
|
|
15776
15777
|
"field.signature.a11y.action-description.type": "Use the keyboard to type.",
|
|
15777
15778
|
"input.error.message.required-error-forced": "This field is required.",
|
|
@@ -15782,24 +15783,34 @@ var require_messages_en = __commonJS({
|
|
|
15782
15783
|
"form.file-upload.uploading": "Uploading {count, plural, =0 {...} other {#%...}}",
|
|
15783
15784
|
"rating-input.a11y.reaction-label": "{count} {count, plural, =1 {star} other {stars}}",
|
|
15784
15785
|
"contacts-company.input.error.message.required-error": "Enter a company name.",
|
|
15786
|
+
"search.keyword.events.rsvp": "rsvp, attendance, reply",
|
|
15785
15787
|
"dext-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15788
|
+
"search.keyword.quiz.short-text": "quiz short text, short answer",
|
|
15786
15789
|
"field.signature.clear-button.label": "Clear",
|
|
15787
15790
|
"input.error.message.type-error": "Choose a {type}.",
|
|
15788
15791
|
"payment-input.input.error.message.required-error": "Enter a payment amount.",
|
|
15789
15792
|
"form.login-bar.action.logout": "Log out",
|
|
15790
15793
|
"date-picker.a11y.arrow-left": "Go to previous month",
|
|
15794
|
+
"search.keyword.address.address-line": "address line, street address, line 1",
|
|
15791
15795
|
"mla-subdivision.input.error.message.required-error.tr": "Choose a city.",
|
|
15796
|
+
"search.keyword.dext.radio-group": "radio group, radio buttons, single select",
|
|
15797
|
+
"search.keyword.quiz.image-choice": "image choice, picture options",
|
|
15792
15798
|
"input.error.message.value-range-error": "Enter a number from {minLimit} to {maxLimit}.",
|
|
15793
15799
|
"input.error.message.incomplete-date-error.year-month": "Enter a month and year.",
|
|
15800
|
+
"search.keyword.ecom.company-name": "company name, business name",
|
|
15794
15801
|
"mla-address-line.input.error.message.required-error": "Enter an address.",
|
|
15802
|
+
"search.keyword.ecom.email": "email, contact email",
|
|
15803
|
+
"search.keyword.scheduling.services-dropdown": "services dropdown, service list, select service",
|
|
15795
15804
|
"contacts-position.input.error.message.required-error": "Enter a position or job title.",
|
|
15796
15805
|
"bookings-phone.input.error.message.format-error": "Enter a valid phone number.",
|
|
15797
15806
|
"input.error.message.incomplete-date-error.year-month-time": "Enter a month, time and year.",
|
|
15807
|
+
"search.keyword.transaction.donation": "donation, contribute, give, contribution",
|
|
15798
15808
|
"field.number.aria-role-description": "Number",
|
|
15799
15809
|
"signature.input.error.message.required-error": "Sign in the box above.",
|
|
15800
15810
|
"field.date.label.month": "Month",
|
|
15801
15811
|
"field.rich-text.read-more-button.label": "Read more",
|
|
15802
15812
|
"field.time.label.period": "AM/PM setting",
|
|
15813
|
+
"search.keyword.dext.text-input": "text input, single line, field",
|
|
15803
15814
|
"submit.failed.message": "We could not submit your form. Try again later.",
|
|
15804
15815
|
"dext-email.input.error.message.required-error": "Enter an email address like example@mysite.com.",
|
|
15805
15816
|
"mla-city.input.error.message.required-error.tr": "Enter a district.",
|
|
@@ -15809,17 +15820,23 @@ var require_messages_en = __commonJS({
|
|
|
15809
15820
|
"form.login-bar.title.logged-out-state": "Have an account? ",
|
|
15810
15821
|
"form.appointment.slots-not-found.text": "There\u2019s no availability for this date. Try selecting another date.",
|
|
15811
15822
|
"input.error.message.format-error": 'Use the format "{format}."',
|
|
15823
|
+
"search.keyword.basic.date-picker": "date picker, calendar, pick date",
|
|
15824
|
+
"search.keyword.address.street-number": "street number, house number",
|
|
15812
15825
|
"contacts-address.input.error.message.required-error": "Enter an address.",
|
|
15813
15826
|
"field-context-menu.copy": "Copy to clipboard",
|
|
15827
|
+
"search.keyword.ecom.subscriptions": "subscriptions, subscribe, membership",
|
|
15814
15828
|
"field.signature.a11y.state.empty": "Signature field is empty.",
|
|
15815
15829
|
"dext-date-picker.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15816
15830
|
"payment-input.input.error.message.min-value-error": "Enter a payment amount greater than {currency}{limit}.",
|
|
15831
|
+
"search.keyword.multi-elements.radio-buttons": "radio buttons, single choice, option",
|
|
15817
15832
|
"input.error.message.incomplete-date-error.year-time": "Enter a 4 digit year and time.",
|
|
15818
15833
|
"field.signature.a11y.state.signed": "Signed.",
|
|
15819
15834
|
"field.quiz-answer-feedback.wrong": "Incorrect",
|
|
15835
|
+
"search.keyword.scheduling.services-multi-choice": "services multi choice, multiple services",
|
|
15820
15836
|
"mla-city.input.error.message.required-error": "Enter a city.",
|
|
15821
15837
|
"field.rich-text.read-less-button.label": "Read less",
|
|
15822
15838
|
"form.appointment.accessibility.calendar.previous-week.aria-label": "Show previous week",
|
|
15839
|
+
"search.keyword.dext.email": "email, e-mail address, mail",
|
|
15823
15840
|
"field.signature.mode.upload.description": "Upload mode selected. Upload an image of your signature.",
|
|
15824
15841
|
"field.quiz-file-upload.skipped": "This question was skipped. ",
|
|
15825
15842
|
"ecom.email.label": "Email",
|
|
@@ -15833,10 +15850,12 @@ var require_messages_en = __commonJS({
|
|
|
15833
15850
|
"field-context-menu.delete": "Delete",
|
|
15834
15851
|
"field.date.label.year": "Year",
|
|
15835
15852
|
"mla-address-line-2.input.error.message.required-error": "Enter a second address line (e.g., apartment, suite, floor).",
|
|
15853
|
+
"search.keyword.basic.signature": "signature, sign, e-sign, autograph",
|
|
15836
15854
|
"form.login-bar.title.logged-in-state": "Logged in as {user}",
|
|
15837
15855
|
"payment-input.input.error.message.max-value-error": "Enter a payment amount less than {currency}{limit}.",
|
|
15838
15856
|
"ecom-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15839
15857
|
"payment-input.input.error.message.value-range-error": "Enter a payment amount between {currency}{minLimit} and {currency}{maxLimit}.",
|
|
15858
|
+
"search.keyword.dext.date-picker": "date picker, calendar",
|
|
15840
15859
|
"input.error.message.incomplete-date-error.year-day": "Enter a day and year.",
|
|
15841
15860
|
"submission-table.signature.not-signed": "Not signed",
|
|
15842
15861
|
"dext-url-input.input.error.message.format-error": "Enter a web URL like https://www.example.com.",
|
|
@@ -15846,28 +15865,41 @@ var require_messages_en = __commonJS({
|
|
|
15846
15865
|
"input.error.message.incomplete-date-error.day": "Enter a day.",
|
|
15847
15866
|
"date-input.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15848
15867
|
"input.error.message.invalid-location-id-error": "Location is invalid",
|
|
15868
|
+
"search.keyword.basic.rating-input": "rating, stars, score, review",
|
|
15849
15869
|
"input.error.message.max-length-error": "Enter less than {limit, plural, one {# character} other {# characters}}.",
|
|
15850
15870
|
"field.date.placeholder.day": "Day",
|
|
15871
|
+
"search.keyword.dext.tags": "tags, chips, labels",
|
|
15851
15872
|
"services-dropdown.input.error.message.required-error": "Select a Service",
|
|
15852
15873
|
"ecom-email.input.error.message.required-error": "Enter an email address like example@mysite.com.",
|
|
15853
15874
|
"dext-phone.input.error.message.not-allowed-value": "Phone numbers with this country code aren\u2019t accepted.",
|
|
15854
15875
|
"dext-url-input.input.error.message.required-error": "Enter a web URL like https://www.example.com.",
|
|
15855
15876
|
"contacts-date-input.input.error.message.format-error": "Enter a month, day and year.",
|
|
15877
|
+
"search.keyword.multi-elements.dropdown": "dropdown, select, chooser, menu",
|
|
15856
15878
|
"signature.input.error.message.required-error.with-upload": "Sign in the box above or upload your signature.",
|
|
15857
15879
|
"contacts-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15880
|
+
"search.keyword.quiz.file-upload": "quiz file upload, attachment",
|
|
15881
|
+
"search.keyword.dext.checkbox-group": "checkbox group, multiple checkboxes",
|
|
15858
15882
|
"field.phone.country-selector-button.aria-label": "Select a country code",
|
|
15883
|
+
"search.keyword.identity.password": "password, passcode, secret",
|
|
15859
15884
|
"field-context-menu.move-up": "Move up",
|
|
15885
|
+
"search.keyword.basic.time": "time, clock, hour, minute",
|
|
15860
15886
|
"dext-text-input.input.error.message.required-error": "Enter an answer.",
|
|
15861
15887
|
"settings.required-indicator-text": "(Required)",
|
|
15862
15888
|
"file-upload.dropzone.overlay.button": " Drop your files here",
|
|
15889
|
+
"search.keyword.address.apartment": "apartment, unit, suite, floor",
|
|
15863
15890
|
"field.time.perdiod.PM": "PM",
|
|
15864
15891
|
"contacts-birthdate.input.error.message.format-error": "Enter a month, day and year.",
|
|
15865
15892
|
"field.quiz-answer-feedback.correct": "Correct",
|
|
15893
|
+
"search.keyword.basic.long-answer": "long answer, paragraph, multiline, textarea",
|
|
15866
15894
|
"vat-id.input.error.message.required-error": "Enter a CPF/CNPJ number.",
|
|
15895
|
+
"search.keyword.events.repeater": "repeater, list, repeating group",
|
|
15867
15896
|
"bookings-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
15897
|
+
"search.keyword.contacts.email": "email, e-mail, mail, address",
|
|
15868
15898
|
"input.error.message.character-length-range-error": "Enter between {minLimit} and {maxLimit} characters.",
|
|
15869
15899
|
"bookings-phone.input.error.message.not-allowed-value": "Phone numbers with this country code aren\u2019t accepted.",
|
|
15900
|
+
"search.keyword.transaction.fixed-payment": "fixed payment, set amount, one-time",
|
|
15870
15901
|
"contacts-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
15902
|
+
"search.keyword.dext.checkbox": "checkbox, tick, boolean",
|
|
15871
15903
|
"dropdown.input.error.message.required-error": "Choose an option.",
|
|
15872
15904
|
"dext-text-area.input.error.message.required-error": "Enter an answer.",
|
|
15873
15905
|
"field.signature.settings.upload-button.label": "Upload Image",
|
|
@@ -15877,25 +15909,32 @@ var require_messages_en = __commonJS({
|
|
|
15877
15909
|
"contacts-number-input.input.error.message.required-error": "Enter a number.",
|
|
15878
15910
|
"date-picker.a11y.aria-label": "Show date picker",
|
|
15879
15911
|
"field.phone.country-search-input.aria-label": "Search",
|
|
15912
|
+
"search.keyword.basic.submit": "submit, send, save, continue",
|
|
15880
15913
|
"field.signature.a11y.state.drawing": "Writing signature...",
|
|
15881
15914
|
"input.error.message.unknown-value-error": "Must have additional properties.",
|
|
15882
15915
|
"dext-date-picker.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
15916
|
+
"search.keyword.bookings.header": "header, title, section heading",
|
|
15917
|
+
"search.keyword.basic.date": "date, calendar, day, pick a date",
|
|
15883
15918
|
"form.appointment.empty-state.notification.text": "Currently, there\u2019s no available time slots to schedule. Contact us to complete your request.",
|
|
15884
15919
|
"mla-country.input.error.message.required-error": "Choose a country/region.",
|
|
15885
15920
|
"field.time.label.hours": "Hours",
|
|
15921
|
+
"search.keyword.basic.nested-form": "nested form, subform, repeater group, group",
|
|
15886
15922
|
"file-upload.delete-file.aria-label": "Delete file",
|
|
15887
15923
|
"field.vat-id.label-br": "CPF/CNPJ",
|
|
15888
15924
|
"ecom-header.contact-details": "Customer details",
|
|
15889
15925
|
"input.error.message.invalid-staff-id-error": "This field is invalid.",
|
|
15926
|
+
"search.keyword.contacts.subscribe": "subscribe, subscription, opt in, newsletter, marketing, subscriber",
|
|
15890
15927
|
"date-input.input.error.message.format-error": "Enter a month, day and year.",
|
|
15891
15928
|
"contacts-first-name.input.error.message.required-error": "Enter a first name.",
|
|
15892
15929
|
"file-upload.dropzone.title": "Upload your file",
|
|
15930
|
+
"search.keyword.scheduling.appointment": "appointment, booking, schedule",
|
|
15893
15931
|
"form.a11y.step.index.title": "Step {index} out of {total}",
|
|
15894
15932
|
"field-context-menu.move-down": "Move down",
|
|
15895
15933
|
"contacts-url-input.input.error.message.required-error": "Enter a web URL like https://www.example.com.",
|
|
15896
15934
|
"field.time.label.minutes": "Minutes",
|
|
15897
15935
|
"dext-phone.input.error.message.format-error": "Enter a valid phone number.",
|
|
15898
15936
|
"bookings-phone.input.error.message.required-error": "Enter a phone number.",
|
|
15937
|
+
"search.keyword.multi-elements.tags": "tags, chips, labels, keywords",
|
|
15899
15938
|
"form.file-upload.explanation-text": "{count, plural, =1 {# file} other {# files}} uploaded",
|
|
15900
15939
|
"contacts-last-name.input.error.message.required-error": "Enter a last name.",
|
|
15901
15940
|
"field.signature.mode.selector.aria-label": "Signature input mode",
|
|
@@ -15904,25 +15943,33 @@ var require_messages_en = __commonJS({
|
|
|
15904
15943
|
"date-picker.a11y.dropdown-year": "Select year",
|
|
15905
15944
|
"time-input.input.error.message.format-error": "Enter hours and minutes.",
|
|
15906
15945
|
"field-context-menu.hide-field": "Hide field",
|
|
15946
|
+
"search.keyword.basic.number": "number, numeric, quantity, digits",
|
|
15907
15947
|
"input.error.message.not-allowed-value": "The chosen value is not allowed.",
|
|
15908
15948
|
"input.error.message.min-value-error": "Enter a number that is {limit} or more.",
|
|
15949
|
+
"search.keyword.dext.number-input": "number input, numeric field",
|
|
15909
15950
|
"input.error.message.incomplete-date-error.month-day": "Enter a month and day.",
|
|
15910
15951
|
"field.date.placeholder.time": "HH:MM",
|
|
15911
15952
|
"submit.checkout.message": "Redirecting to checkout...",
|
|
15912
15953
|
"input.error.message.invalid-phone-country-code-error": "Enter a valid country code.",
|
|
15913
15954
|
"mla-street-name.input.error.message.required-error": "Enter a street name.",
|
|
15955
|
+
"search.keyword.bookings.first-name": "first name, given name",
|
|
15914
15956
|
"bookings-first-name.input.error.message.required-error": "Enter a first name.",
|
|
15915
15957
|
"vat-id.input.error.message.format-error": "Enter a valid CPF/CNPJ number.",
|
|
15958
|
+
"search.keyword.contacts.first-name": "first name, given name, forename",
|
|
15916
15959
|
"form.appointment.accessibility.calendar.next-week.aria-label": "Show next week",
|
|
15917
15960
|
"donation.input.error.message.required-error": "Choose a donation amount.",
|
|
15918
15961
|
"input.error.message.incomplete-date-error.month": "Enter a month.",
|
|
15919
15962
|
"input.error.message.incomplete-date-error.year": "Enter a 4 digit year.",
|
|
15920
15963
|
"vat-id.input.error.message.format-error.il": "Enter a valid 9 digit ID (\u201Cteudat zehut\u201D) or Company number (\u201Chet pey\u201D).",
|
|
15964
|
+
"search.keyword.quiz.single-choice": "quiz single choice, one answer",
|
|
15921
15965
|
"field.phone.aria-label": "Phone",
|
|
15922
15966
|
"field.signature.canvas.aria-label.empty": "Signature drawing area (empty)",
|
|
15923
15967
|
"file-upload.dropzone.limit-reached.title": "You\u2019ve reached the file upload limit.",
|
|
15968
|
+
"search.keyword.transaction.payment-input": "payment input, amount, pay",
|
|
15969
|
+
"search.keyword.contacts.tax-id": "tax id, vat, tin, ein, tax number",
|
|
15924
15970
|
"form.appointment.accessibility.calendar.has-availability.aria-label": "This day has available time slots.",
|
|
15925
15971
|
"bookings-phone.input.error.message.pattern-error": "Enter a valid phone number.",
|
|
15972
|
+
"search.keyword.bookings.last-name": "last name, surname",
|
|
15926
15973
|
"input.error.message.incomplete-date-error.month-time": "Enter a month and time.",
|
|
15927
15974
|
"product-list.input.error.message.required-error": "Choose an option.",
|
|
15928
15975
|
"field-context-menu.move-to-next-page": "Move to next page",
|
|
@@ -15931,6 +15978,9 @@ var require_messages_en = __commonJS({
|
|
|
15931
15978
|
"vat-id.input.error.message.format-error.br": "Enter a valid CPF/CNPJ number.",
|
|
15932
15979
|
"input.error.message.exact-character-length-error": "Enter exactly {limit, plural, one {# character} other {# characters}}.",
|
|
15933
15980
|
"submission-table.signature.signed": "Signed",
|
|
15981
|
+
"search.keyword.contacts.last-name": "last name, surname, family name",
|
|
15982
|
+
"search.keyword.quiz.number": "quiz number, numeric question",
|
|
15983
|
+
"search.keyword.dext.text-area": "text area, multiline, paragraph",
|
|
15934
15984
|
"input.error.message.incomplete-date-error": "Enter a month, day and year.",
|
|
15935
15985
|
"ecom-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
15936
15986
|
"field.vat-id.label-il": "ID/Company number",
|
|
@@ -15944,27 +15994,42 @@ var require_messages_en = __commonJS({
|
|
|
15944
15994
|
"field.signature.mode.upload.label": "Upload",
|
|
15945
15995
|
"input.error.message.unknown-error": "Unknown error, please contact Support.",
|
|
15946
15996
|
"input.error.message.max-items-error": "Choose up to {limit, plural, one {# option} other {# options}}.",
|
|
15997
|
+
"search.keyword.basic.multiline-address": "multiline address, full address, address block",
|
|
15947
15998
|
"file-upload.popover.aria-label": "List of uploaded files",
|
|
15999
|
+
"search.keyword.address.street-name": "street name, road, avenue",
|
|
16000
|
+
"search.keyword.layout-elements.login-bar": "login bar, member bar, account",
|
|
15948
16001
|
"input.error.message.multiple-of-value-error": "Choose a multiple of {multipleOf}.",
|
|
15949
16002
|
"full-name-last-name.input.error.message.required-error": "Enter a last name.",
|
|
16003
|
+
"search.keyword.ecom.shipping-details": "shipping details, delivery, shipping address",
|
|
15950
16004
|
"field-context-menu.paste": "Paste",
|
|
16005
|
+
"search.keyword.basic.full-name-last-name": "last name, surname",
|
|
15951
16006
|
"input.error.message.pattern-error": 'Match the pattern "{pattern}".',
|
|
15952
16007
|
"dext-number-input.input.error.message.required-error": "Enter a number.",
|
|
15953
16008
|
"field-context-menu.ai-assistant": "Ask AI",
|
|
15954
16009
|
"field-context-menu.move-to-previous-page": "Move to previous page",
|
|
15955
16010
|
"dext-date-picker.input.error.message.required-error": "Choose a date.",
|
|
16011
|
+
"search.keyword.address.city": "city, town",
|
|
15956
16012
|
"date-input.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
15957
16013
|
"dext-checkbox-group.input.error.message.required-error": "Choose an option.",
|
|
15958
16014
|
"file-upload.dropzone.subtitle": "Choose a file or drag and drop one here.",
|
|
15959
16015
|
"dext-radio-group.input.error.message.required-error": "Choose an option.",
|
|
16016
|
+
"search.keyword.multi-elements.multi-checkbox": "multi checkbox, checkboxes, multiple selection",
|
|
16017
|
+
"search.keyword.basic.short-answer": "short answer, text, single line, input",
|
|
15960
16018
|
"checkbox.input.error.message.not-allowed-value": "Check the box to continue.",
|
|
15961
16019
|
"contacts-birthdate.input.error.message.max-value-error": "Enter a date from January 1, 1900 to today.",
|
|
16020
|
+
"search.keyword.dext.rating-input": "rating input, stars, score, review",
|
|
16021
|
+
"search.keyword.dext.url-input": "url input, link, website, web address",
|
|
15962
16022
|
"input.error.message.incomplete-date-error.month-day-time": "Enter a month, day and time.",
|
|
15963
16023
|
"file-upload.aria-roledescription": "File upload",
|
|
16024
|
+
"search.keyword.basic.vat-id": "vat id, vat number, tax id",
|
|
15964
16025
|
"contacts-phone.input.error.message.pattern-error": "Enter a valid phone number.",
|
|
15965
16026
|
"mla-street-number.input.error.message.required-error": "Enter a house number.",
|
|
16027
|
+
"search.keyword.ecom.contact-details": "contact details, customer info",
|
|
15966
16028
|
"date-picker.a11y.dropdown-month": "Select month",
|
|
15967
16029
|
"field.signature.mode.type.label": "Type",
|
|
16030
|
+
"search.keyword.contacts.address": "address, location, street, city, country, postal code, area",
|
|
16031
|
+
"search.keyword.bookings.phone": "phone, contact number, telephone, mobile",
|
|
16032
|
+
"search.keyword.address.subdivision": "state, province, region, subdivision",
|
|
15968
16033
|
"date-picker.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15969
16034
|
"date-time-input.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
|
|
15970
16035
|
"dext-checkbox.input.error.message.required-error": "Check the box to continue.",
|
|
@@ -15973,6 +16038,7 @@ var require_messages_en = __commonJS({
|
|
|
15973
16038
|
"dext-checkbox.input.error.message.not-allowed-value": "Check the box to continue.",
|
|
15974
16039
|
"field.date.placeholder.year": "Year",
|
|
15975
16040
|
"date-picker.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
16041
|
+
"search.keyword.bookings.rich-text": "rich text, formatted text, description",
|
|
15976
16042
|
"field.signature.text.placeholder": "Type your signature",
|
|
15977
16043
|
"dext-date-picker.input.error.message.format-error": "Choose a date.",
|
|
15978
16044
|
"form.file-upload.error.upload-limit": "There is an upload limit of {limit, plural, one {# file} other {# files}}.",
|
|
@@ -15981,44 +16047,67 @@ var require_messages_en = __commonJS({
|
|
|
15981
16047
|
"field.mla-apartment.label": "Apartment",
|
|
15982
16048
|
"text-area.input.error.message.required-error": "Enter an answer.",
|
|
15983
16049
|
"field.phone.country-search-input.placeholder": "Search",
|
|
16050
|
+
"search.keyword.layout-elements.header": "header, page header, top bar",
|
|
16051
|
+
"search.keyword.ecom.additional-info": "additional info, notes, instructions",
|
|
15984
16052
|
"donation.other-option.placeholder": "Enter an amount",
|
|
15985
16053
|
"dext-rating-input.input.error.message.required-error": "Choose a star rating.",
|
|
15986
16054
|
"field.signature.a11y.action-description.draw": "Sign in the box.",
|
|
16055
|
+
"search.keyword.ecom.full-name": "full name, recipient name, first and last",
|
|
15987
16056
|
"contacts-birthdate.input.error.message.min-value-error": "Enter a date from January 1, 1900 to today.",
|
|
15988
16057
|
"mla-subdivision.input.error.message.required-error": "Choose an option.",
|
|
15989
16058
|
"dext-dropdown.input.error.message.required-error": "Choose an option.",
|
|
15990
16059
|
"contacts-text-input.input.error.message.required-error": "Enter an answer.",
|
|
16060
|
+
"search.keyword.dext.phone": "phone, telephone, mobile",
|
|
15991
16061
|
"field.date.label.day": "Day",
|
|
16062
|
+
"search.keyword.basic.url": "url, website, link, web address",
|
|
15992
16063
|
"vat-id.input.error.message.required-error.br": "Enter a CPF/CNPJ number.",
|
|
16064
|
+
"search.keyword.bookings.email": "email, contact email, mail",
|
|
15993
16065
|
"date-picker.calendar.close-button": "Close",
|
|
16066
|
+
"search.keyword.contacts.phone": "phone, telephone, mobile, cell, number",
|
|
15994
16067
|
"input.error.message.invalid-value-for-pattern": "Enter a valid answer.",
|
|
15995
16068
|
"radio-group.input.error.message.required-error": "Choose an option.",
|
|
15996
16069
|
"input.error.message.min-items-error": "Choose at least {limit, plural, one {# option} other {# options}}.",
|
|
15997
16070
|
"ecom.form.field-type.ecom-subscriptions.label": "I agree to receive news to the email address and/or phone numbers added",
|
|
16071
|
+
"search.keyword.ecom.phone": "phone, contact number, telephone, mobile",
|
|
15998
16072
|
"input.error.message.decimal_point_error": "Add {number} number(s) after the decimal point.",
|
|
15999
16073
|
"bookings-email.input.error.message.required-error": "Enter an email address like example@mysite.com.",
|
|
16074
|
+
"search.keyword.layout-elements.rich-text": "rich text, formatted content, paragraph",
|
|
16000
16075
|
"contacts-subscribe.input.error.message.required-error": "Check the box to continue.",
|
|
16076
|
+
"search.keyword.dext.dropdown": "dropdown, select, menu",
|
|
16077
|
+
"search.keyword.address.postal-code": "postal code, zip, postcode",
|
|
16001
16078
|
"form.appointment.show-more-slots.text": "Show more slots",
|
|
16002
16079
|
"form.file-upload.error.upload-failed": "File upload failed.",
|
|
16003
16080
|
"dext-email.input.error.message.format-error": "Enter an email address like example@mysite.com.",
|
|
16004
16081
|
"full-name-first-name.input.error.message.required-error": "Enter a first name.",
|
|
16005
16082
|
"field-context-menu.settings": "Settings",
|
|
16083
|
+
"search.keyword.quiz.multi-choice": "quiz multiple choice, multi select",
|
|
16084
|
+
"search.keyword.address.address-line-2": "address line 2, apt, suite, unit",
|
|
16006
16085
|
"bookings-last-name.input.error.message.required-error": "Enter a last name.",
|
|
16007
16086
|
"actions.rules.button.label_DELETE_THIS": "Rules",
|
|
16087
|
+
"search.keyword.transaction.product": "product, item, sku, purchase",
|
|
16008
16088
|
"appointment.input.error.message.required-error": "This field is required.",
|
|
16009
16089
|
"field-context-menu.make-required": "Make required",
|
|
16090
|
+
"search.keyword.contacts.position": "position, job title, role, occupation",
|
|
16091
|
+
"search.keyword.bookings.address": "address, location",
|
|
16092
|
+
"search.keyword.multi-elements.checkbox": "checkbox, tick box, check",
|
|
16010
16093
|
"date-time-input.input.error.message.format-error": "Enter a month, day and year.",
|
|
16011
16094
|
"field.date.label.time": "Time",
|
|
16095
|
+
"search.keyword.basic.full-name-first-name": "first name, given name",
|
|
16012
16096
|
"input.error.message.required-error": "This field is required.",
|
|
16013
16097
|
"field.phone.country-selector-dropdown.no-result": "No results found...",
|
|
16014
16098
|
"input.error.message.exact-items-number-error": "Choose {limit, plural, one {# option} other {# options}}.",
|
|
16015
16099
|
"form.appointment.timezone.label": "Time zone",
|
|
16100
|
+
"search.keyword.address.country": "country, nation",
|
|
16101
|
+
"search.keyword.basic.file-upload": "file upload, attachment, upload, file",
|
|
16016
16102
|
"date-time-input.input.error.message.max-value-error": "Enter a valid date from January 1, 1000 to today.",
|
|
16017
16103
|
"date-picker.a11y.arrow-right": "Go to next month",
|
|
16104
|
+
"search.keyword.quiz.long-text": "quiz long text, paragraph",
|
|
16018
16105
|
"input.error.message.incomplete-date-error.time": "Enter a time.",
|
|
16019
16106
|
"field.signature.canvas.aria-label.signed": "Signature drawing area (signed)",
|
|
16020
16107
|
"contacts-phone.input.error.message.format-error": "Enter a valid phone number.",
|
|
16021
16108
|
"tags.input.error.message.required-error": "Choose an option.",
|
|
16109
|
+
"search.keyword.contacts.birthdate": "birthdate, birthday, date of birth, dob",
|
|
16110
|
+
"search.keyword.basic.date-time": "date time, datetime, timestamp, schedule",
|
|
16022
16111
|
"file-upload.dropzone.limit-reached.subtitle": "Delete a file to add a different one.",
|
|
16023
16112
|
"input.error.message.max-value-error": "Enter a number that is {limit} or less.",
|
|
16024
16113
|
"input.error.message.min-length-error": "Enter at least {limit, plural, one {# character} other {# characters}}.",
|
|
@@ -16675,6 +16764,386 @@ var useError = (_ref2) => {
|
|
|
16675
16764
|
errorMessage
|
|
16676
16765
|
};
|
|
16677
16766
|
};
|
|
16767
|
+
var FieldPropsContext = /* @__PURE__ */ React14.createContext(null);
|
|
16768
|
+
function useFieldProps() {
|
|
16769
|
+
const context = React14.useContext(FieldPropsContext);
|
|
16770
|
+
if (context === null) {
|
|
16771
|
+
throw new Error("useFieldProps must be used within a FieldPropsProvider");
|
|
16772
|
+
}
|
|
16773
|
+
return context;
|
|
16774
|
+
}
|
|
16775
|
+
|
|
16776
|
+
// ../form-fields/dist/esm/mappers/public-props-map.js
|
|
16777
|
+
init_esm();
|
|
16778
|
+
var allCallingCountryCodes = Object.keys(CALLING_COUNTRY_CODES);
|
|
16779
|
+
var MinMaxLengthMapper = (validation) => {
|
|
16780
|
+
var _validation$string, _validation$string2;
|
|
16781
|
+
return {
|
|
16782
|
+
maxLength: validation == null || (_validation$string = validation.string) == null ? void 0 : _validation$string.maxLength,
|
|
16783
|
+
minLength: validation == null || (_validation$string2 = validation.string) == null ? void 0 : _validation$string2.minLength
|
|
16784
|
+
};
|
|
16785
|
+
};
|
|
16786
|
+
var MinMaxItemsMapper = (validation) => {
|
|
16787
|
+
var _validation$array, _validation$array2;
|
|
16788
|
+
return {
|
|
16789
|
+
minItems: validation == null || (_validation$array = validation.array) == null ? void 0 : _validation$array.minItems,
|
|
16790
|
+
maxItems: validation == null || (_validation$array2 = validation.array) == null ? void 0 : _validation$array2.maxItems
|
|
16791
|
+
};
|
|
16792
|
+
};
|
|
16793
|
+
var MinMaxValuesMapper = (validation) => {
|
|
16794
|
+
var _validation$predefine, _validation$predefine2;
|
|
16795
|
+
return {
|
|
16796
|
+
minValue: validation == null || (_validation$predefine = validation.predefined) == null || (_validation$predefine = _validation$predefine.paymentOptions) == null || (_validation$predefine = _validation$predefine.products) == null || (_validation$predefine = _validation$predefine[0]) == null ? void 0 : _validation$predefine.dynamicPriceOptions.minPrice,
|
|
16797
|
+
maxValue: validation == null || (_validation$predefine2 = validation.predefined) == null || (_validation$predefine2 = _validation$predefine2.paymentOptions) == null || (_validation$predefine2 = _validation$predefine2.products) == null || (_validation$predefine2 = _validation$predefine2[0]) == null ? void 0 : _validation$predefine2.dynamicPriceOptions.maxPrice
|
|
16798
|
+
};
|
|
16799
|
+
};
|
|
16800
|
+
var AcceptedDatesMapper = (validation) => {
|
|
16801
|
+
var _validation$string3, _validation$string4;
|
|
16802
|
+
return {
|
|
16803
|
+
acceptedDates: (validation == null || (_validation$string3 = validation.string) == null || (_validation$string3 = _validation$string3.dateOptions) == null ? void 0 : _validation$string3.minimum) === "$now" ? "future" : (validation == null || (_validation$string4 = validation.string) == null || (_validation$string4 = _validation$string4.dateOptions) == null ? void 0 : _validation$string4.maximum) === "$now" ? "past" : "all"
|
|
16804
|
+
};
|
|
16805
|
+
};
|
|
16806
|
+
var CustomOptionMapper = (props) => {
|
|
16807
|
+
const {
|
|
16808
|
+
addOther,
|
|
16809
|
+
addOtherLabel,
|
|
16810
|
+
addOtherPlaceholder
|
|
16811
|
+
} = props;
|
|
16812
|
+
return {
|
|
16813
|
+
customOption: addOther ? {
|
|
16814
|
+
label: addOtherLabel,
|
|
16815
|
+
placeholder: addOtherPlaceholder
|
|
16816
|
+
} : void 0
|
|
16817
|
+
};
|
|
16818
|
+
};
|
|
16819
|
+
var ErrorMapper = (error) => {
|
|
16820
|
+
if (!error) {
|
|
16821
|
+
return void 0;
|
|
16822
|
+
}
|
|
16823
|
+
return error.errorMessage || "Validation error";
|
|
16824
|
+
};
|
|
16825
|
+
var BaseMapper = (props) => {
|
|
16826
|
+
const {
|
|
16827
|
+
hideLabel,
|
|
16828
|
+
error,
|
|
16829
|
+
showLabel,
|
|
16830
|
+
...rest
|
|
16831
|
+
} = props;
|
|
16832
|
+
return {
|
|
16833
|
+
...rest,
|
|
16834
|
+
showLabel: hideLabel === void 0 ? true : !hideLabel,
|
|
16835
|
+
error: ErrorMapper(error)
|
|
16836
|
+
};
|
|
16837
|
+
};
|
|
16838
|
+
var TextFieldMapper = (props) => ({
|
|
16839
|
+
...props,
|
|
16840
|
+
...MinMaxLengthMapper(props == null ? void 0 : props.validation),
|
|
16841
|
+
...BaseMapper(props)
|
|
16842
|
+
});
|
|
16843
|
+
var TextAreaMapper = (props) => ({
|
|
16844
|
+
...props,
|
|
16845
|
+
...MinMaxLengthMapper(props == null ? void 0 : props.validation),
|
|
16846
|
+
...BaseMapper(props)
|
|
16847
|
+
});
|
|
16848
|
+
var PhoneInputMapper = (props) => {
|
|
16849
|
+
var _validation$string5;
|
|
16850
|
+
const {
|
|
16851
|
+
defaultCountry,
|
|
16852
|
+
defaultCountryCode,
|
|
16853
|
+
validation
|
|
16854
|
+
} = props;
|
|
16855
|
+
const allowedCountryCodes = validation == null || (_validation$string5 = validation.string) == null || (_validation$string5 = _validation$string5.phoneOptions) == null ? void 0 : _validation$string5.allowedCountryCodes;
|
|
16856
|
+
return {
|
|
16857
|
+
...props,
|
|
16858
|
+
...BaseMapper(props),
|
|
16859
|
+
defaultCountryCode: defaultCountry ?? defaultCountryCode,
|
|
16860
|
+
countryCodes: allowedCountryCodes && allowedCountryCodes.length > 0 ? allowedCountryCodes : allCallingCountryCodes
|
|
16861
|
+
};
|
|
16862
|
+
};
|
|
16863
|
+
var MultilineAddressMapper = (props) => {
|
|
16864
|
+
var _view$fieldSettings, _validation$predefine3;
|
|
16865
|
+
const {
|
|
16866
|
+
view,
|
|
16867
|
+
validation
|
|
16868
|
+
} = props;
|
|
16869
|
+
return {
|
|
16870
|
+
...props,
|
|
16871
|
+
...BaseMapper(props),
|
|
16872
|
+
showAddressLine2: view == null || (_view$fieldSettings = view.fieldSettings) == null || (_view$fieldSettings = _view$fieldSettings.addressLine2) == null ? void 0 : _view$fieldSettings.show,
|
|
16873
|
+
addressLine2Required: validation == null || (_validation$predefine3 = validation.predefined) == null || (_validation$predefine3 = _validation$predefine3.multilineAddressOptions) == null || (_validation$predefine3 = _validation$predefine3.fields) == null || (_validation$predefine3 = _validation$predefine3.addressLine2) == null ? void 0 : _validation$predefine3.required
|
|
16874
|
+
};
|
|
16875
|
+
};
|
|
16876
|
+
var DateInputMapper = (props) => {
|
|
16877
|
+
const {
|
|
16878
|
+
hidePlaceholder,
|
|
16879
|
+
validation
|
|
16880
|
+
} = props;
|
|
16881
|
+
return {
|
|
16882
|
+
...props,
|
|
16883
|
+
...BaseMapper(props),
|
|
16884
|
+
...AcceptedDatesMapper(validation),
|
|
16885
|
+
showPlaceholder: hidePlaceholder === void 0 ? true : !hidePlaceholder
|
|
16886
|
+
};
|
|
16887
|
+
};
|
|
16888
|
+
var DatePickerMapper = (props) => {
|
|
16889
|
+
const {
|
|
16890
|
+
validation
|
|
16891
|
+
} = props;
|
|
16892
|
+
return {
|
|
16893
|
+
...props,
|
|
16894
|
+
...BaseMapper(props),
|
|
16895
|
+
...AcceptedDatesMapper(validation)
|
|
16896
|
+
};
|
|
16897
|
+
};
|
|
16898
|
+
var DateTimeInputMapper = (props) => {
|
|
16899
|
+
const {
|
|
16900
|
+
hidePlaceholder,
|
|
16901
|
+
validation
|
|
16902
|
+
} = props;
|
|
16903
|
+
return {
|
|
16904
|
+
...props,
|
|
16905
|
+
...BaseMapper(props),
|
|
16906
|
+
...AcceptedDatesMapper(validation),
|
|
16907
|
+
showPlaceholder: hidePlaceholder === void 0 ? true : !hidePlaceholder
|
|
16908
|
+
};
|
|
16909
|
+
};
|
|
16910
|
+
var FileUploadMapper = (props) => {
|
|
16911
|
+
const {
|
|
16912
|
+
valueSliderLimit,
|
|
16913
|
+
uploadFileFormats
|
|
16914
|
+
} = props;
|
|
16915
|
+
return {
|
|
16916
|
+
...props,
|
|
16917
|
+
...BaseMapper(props),
|
|
16918
|
+
maxFiles: valueSliderLimit,
|
|
16919
|
+
allowedFileFormats: uploadFileFormats
|
|
16920
|
+
};
|
|
16921
|
+
};
|
|
16922
|
+
var NumberInputMapper = (props) => BaseMapper(props);
|
|
16923
|
+
var CheckboxMapper = (props) => {
|
|
16924
|
+
const {
|
|
16925
|
+
error,
|
|
16926
|
+
...rest
|
|
16927
|
+
} = props;
|
|
16928
|
+
return {
|
|
16929
|
+
...rest,
|
|
16930
|
+
error: ErrorMapper(error)
|
|
16931
|
+
};
|
|
16932
|
+
};
|
|
16933
|
+
var SignatureMapper = (props) => {
|
|
16934
|
+
const {
|
|
16935
|
+
uploadEnabled
|
|
16936
|
+
} = props;
|
|
16937
|
+
return {
|
|
16938
|
+
...props,
|
|
16939
|
+
...BaseMapper(props),
|
|
16940
|
+
imageUploadEnabled: uploadEnabled
|
|
16941
|
+
};
|
|
16942
|
+
};
|
|
16943
|
+
var RatingInputMapper = (props) => BaseMapper(props);
|
|
16944
|
+
var RadioGroupMapper = (props) => {
|
|
16945
|
+
return {
|
|
16946
|
+
...props,
|
|
16947
|
+
...BaseMapper(props),
|
|
16948
|
+
...CustomOptionMapper(props)
|
|
16949
|
+
};
|
|
16950
|
+
};
|
|
16951
|
+
var CheckboxGroupMapper = (props) => {
|
|
16952
|
+
const {
|
|
16953
|
+
validation
|
|
16954
|
+
} = props;
|
|
16955
|
+
return {
|
|
16956
|
+
...props,
|
|
16957
|
+
...BaseMapper(props),
|
|
16958
|
+
...CustomOptionMapper(props),
|
|
16959
|
+
...MinMaxItemsMapper(validation)
|
|
16960
|
+
};
|
|
16961
|
+
};
|
|
16962
|
+
var DropdownMapper = (props) => BaseMapper(props);
|
|
16963
|
+
var TagsMapper = (props) => {
|
|
16964
|
+
const {
|
|
16965
|
+
validation
|
|
16966
|
+
} = props;
|
|
16967
|
+
return {
|
|
16968
|
+
...props,
|
|
16969
|
+
...BaseMapper(props),
|
|
16970
|
+
...CustomOptionMapper(props),
|
|
16971
|
+
...MinMaxItemsMapper(validation)
|
|
16972
|
+
};
|
|
16973
|
+
};
|
|
16974
|
+
var TimeInputMapper = (props) => {
|
|
16975
|
+
const {
|
|
16976
|
+
hidePlaceholder
|
|
16977
|
+
} = props;
|
|
16978
|
+
return {
|
|
16979
|
+
...props,
|
|
16980
|
+
...BaseMapper(props),
|
|
16981
|
+
showPlaceholder: hidePlaceholder === void 0 ? true : !hidePlaceholder
|
|
16982
|
+
};
|
|
16983
|
+
};
|
|
16984
|
+
var TextMapper = (props) => props;
|
|
16985
|
+
var SubmitButtonMapper = (props) => {
|
|
16986
|
+
return {
|
|
16987
|
+
...props
|
|
16988
|
+
};
|
|
16989
|
+
};
|
|
16990
|
+
var ProductListMapper = (props) => {
|
|
16991
|
+
return {
|
|
16992
|
+
...props,
|
|
16993
|
+
...BaseMapper(props),
|
|
16994
|
+
...MinMaxItemsMapper(props == null ? void 0 : props.validation)
|
|
16995
|
+
};
|
|
16996
|
+
};
|
|
16997
|
+
var FixedPaymentMapper = (props) => {
|
|
16998
|
+
var _validation$predefine4, _paymentValidation$fi;
|
|
16999
|
+
const {
|
|
17000
|
+
validation,
|
|
17001
|
+
hideLabel,
|
|
17002
|
+
showLabel,
|
|
17003
|
+
...rest
|
|
17004
|
+
} = props;
|
|
17005
|
+
const paymentValidation = validation == null || (_validation$predefine4 = validation.predefined) == null || (_validation$predefine4 = _validation$predefine4.paymentOptions) == null || (_validation$predefine4 = _validation$predefine4.products) == null ? void 0 : _validation$predefine4[0];
|
|
17006
|
+
const fixedPaymentValue = paymentValidation == null || (_paymentValidation$fi = paymentValidation.fixedPriceOptions) == null ? void 0 : _paymentValidation$fi.price;
|
|
17007
|
+
return {
|
|
17008
|
+
...rest,
|
|
17009
|
+
validation,
|
|
17010
|
+
showLabel: hideLabel === void 0 ? true : !hideLabel,
|
|
17011
|
+
amount: fixedPaymentValue
|
|
17012
|
+
};
|
|
17013
|
+
};
|
|
17014
|
+
var PaymentInputMapper = (props) => {
|
|
17015
|
+
const {
|
|
17016
|
+
validation
|
|
17017
|
+
} = props;
|
|
17018
|
+
return {
|
|
17019
|
+
...props,
|
|
17020
|
+
...BaseMapper(props),
|
|
17021
|
+
...MinMaxValuesMapper(validation)
|
|
17022
|
+
};
|
|
17023
|
+
};
|
|
17024
|
+
var DonationMapper = (props) => {
|
|
17025
|
+
return {
|
|
17026
|
+
...props,
|
|
17027
|
+
...BaseMapper(props),
|
|
17028
|
+
...CustomOptionMapper(props)
|
|
17029
|
+
};
|
|
17030
|
+
};
|
|
17031
|
+
var AppointmentMapper = (props) => BaseMapper(props);
|
|
17032
|
+
var ImageChoiceMapper = (props) => {
|
|
17033
|
+
const {
|
|
17034
|
+
isMultipleAnswers,
|
|
17035
|
+
choiceImageResize
|
|
17036
|
+
} = props;
|
|
17037
|
+
return {
|
|
17038
|
+
...props,
|
|
17039
|
+
...BaseMapper(props),
|
|
17040
|
+
multiple: isMultipleAnswers,
|
|
17041
|
+
imageAspectRatio: choiceImageResize
|
|
17042
|
+
};
|
|
17043
|
+
};
|
|
17044
|
+
var DefaultMapper = (props) => {
|
|
17045
|
+
const {
|
|
17046
|
+
error,
|
|
17047
|
+
...rest
|
|
17048
|
+
} = props;
|
|
17049
|
+
return {
|
|
17050
|
+
...rest,
|
|
17051
|
+
error: ErrorMapper(error)
|
|
17052
|
+
};
|
|
17053
|
+
};
|
|
17054
|
+
var FIELD_PROPS_MAPPERS = {
|
|
17055
|
+
TEXT_INPUT: TextFieldMapper,
|
|
17056
|
+
TEXT_AREA: TextAreaMapper,
|
|
17057
|
+
NUMBER_INPUT: NumberInputMapper,
|
|
17058
|
+
URL_INPUT: TextFieldMapper,
|
|
17059
|
+
DATE_INPUT: DateInputMapper,
|
|
17060
|
+
DATE_PICKER: DatePickerMapper,
|
|
17061
|
+
DATE_TIME_INPUT: DateTimeInputMapper,
|
|
17062
|
+
TIME_INPUT: TimeInputMapper,
|
|
17063
|
+
CONTACTS_COMPANY: TextFieldMapper,
|
|
17064
|
+
CONTACTS_POSITION: TextFieldMapper,
|
|
17065
|
+
CONTACTS_TAX_ID: TextFieldMapper,
|
|
17066
|
+
CONTACTS_FIRST_NAME: TextFieldMapper,
|
|
17067
|
+
CONTACTS_LAST_NAME: TextFieldMapper,
|
|
17068
|
+
CONTACTS_EMAIL: TextFieldMapper,
|
|
17069
|
+
CONTACTS_BIRTHDATE: DateInputMapper,
|
|
17070
|
+
CONTACTS_PHONE: PhoneInputMapper,
|
|
17071
|
+
CONTACTS_ADDRESS: TextFieldMapper,
|
|
17072
|
+
CONTACTS_SUBSCRIBE: CheckboxMapper,
|
|
17073
|
+
RADIO_GROUP: RadioGroupMapper,
|
|
17074
|
+
CHECKBOX: CheckboxMapper,
|
|
17075
|
+
CHECKBOX_GROUP: CheckboxGroupMapper,
|
|
17076
|
+
DROPDOWN: DropdownMapper,
|
|
17077
|
+
TAGS: TagsMapper,
|
|
17078
|
+
QUIZ_IMAGE_CHOICE: ImageChoiceMapper,
|
|
17079
|
+
QUIZ_MULTI_CHOICE: CheckboxGroupMapper,
|
|
17080
|
+
QUIZ_SINGLE_CHOICE: RadioGroupMapper,
|
|
17081
|
+
QUIZ_SHORT_TEXT: TextFieldMapper,
|
|
17082
|
+
QUIZ_LONG_TEXT: TextAreaMapper,
|
|
17083
|
+
QUIZ_NUMBER: NumberInputMapper,
|
|
17084
|
+
QUIZ_FILE_UPLOAD: FileUploadMapper,
|
|
17085
|
+
DEXT_TEXT_INPUT: TextFieldMapper,
|
|
17086
|
+
DEXT_TEXT_AREA: TextAreaMapper,
|
|
17087
|
+
DEXT_DROPDOWN: DropdownMapper,
|
|
17088
|
+
DEXT_URL_INPUT: TextFieldMapper,
|
|
17089
|
+
DEXT_RADIO_GROUP: RadioGroupMapper,
|
|
17090
|
+
DEXT_NUMBER_INPUT: NumberInputMapper,
|
|
17091
|
+
DEXT_CHECKBOX: CheckboxMapper,
|
|
17092
|
+
DEXT_CHECKBOX_GROUP: CheckboxGroupMapper,
|
|
17093
|
+
DEXT_EMAIL: TextFieldMapper,
|
|
17094
|
+
DEXT_PHONE: PhoneInputMapper,
|
|
17095
|
+
DEXT_RATING_INPUT: RatingInputMapper,
|
|
17096
|
+
DEXT_DATE_PICKER: DatePickerMapper,
|
|
17097
|
+
DEXT_TAGS: TagsMapper,
|
|
17098
|
+
MULTILINE_ADDRESS: MultilineAddressMapper,
|
|
17099
|
+
MLA_COUNTRY: DropdownMapper,
|
|
17100
|
+
MLA_CITY: TextFieldMapper,
|
|
17101
|
+
MLA_ADDRESS_LINE: TextFieldMapper,
|
|
17102
|
+
MLA_ADDRESS_LINE_2: TextFieldMapper,
|
|
17103
|
+
MLA_POSTAL_CODE: TextFieldMapper,
|
|
17104
|
+
MLA_SUBDIVISION: DropdownMapper,
|
|
17105
|
+
MLA_STREET_NAME: TextFieldMapper,
|
|
17106
|
+
MLA_STREET_NUMBER: TextFieldMapper,
|
|
17107
|
+
MLA_APARTMENT: TextFieldMapper,
|
|
17108
|
+
FULL_NAME: TextFieldMapper,
|
|
17109
|
+
FULL_NAME_FIRST_NAME: TextFieldMapper,
|
|
17110
|
+
FULL_NAME_LAST_NAME: TextFieldMapper,
|
|
17111
|
+
ECOM_ADDITIONAL_INFO: TextAreaMapper,
|
|
17112
|
+
ECOM_ADDRESS: TextFieldMapper,
|
|
17113
|
+
ECOM_FULL_NAME: TextFieldMapper,
|
|
17114
|
+
ECOM_PHONE: PhoneInputMapper,
|
|
17115
|
+
ECOM_COMPANY_NAME: TextFieldMapper,
|
|
17116
|
+
ECOM_EMAIL: TextFieldMapper,
|
|
17117
|
+
ECOM_SUBSCRIPTION: CheckboxMapper,
|
|
17118
|
+
ECOM_CONTACT_DETAILS: TextMapper,
|
|
17119
|
+
ECOM_SHIPPING_DETAILS: TextMapper,
|
|
17120
|
+
BOOKINGS_FIRST_NAME: TextFieldMapper,
|
|
17121
|
+
BOOKINGS_LAST_NAME: TextFieldMapper,
|
|
17122
|
+
BOOKINGS_EMAIL: TextFieldMapper,
|
|
17123
|
+
BOOKINGS_PHONE: PhoneInputMapper,
|
|
17124
|
+
BOOKINGS_ADDRESS: TextFieldMapper,
|
|
17125
|
+
BOOKINGS_HEADER: TextMapper,
|
|
17126
|
+
BOOKINGS_RICH_TEXT: TextMapper,
|
|
17127
|
+
BOOKINGS_LOGIN_BAR: DefaultMapper,
|
|
17128
|
+
APPOINTMENT: AppointmentMapper,
|
|
17129
|
+
SERVICES_DROPDOWN: DropdownMapper,
|
|
17130
|
+
SERVICES_MULTI_CHOICE: CheckboxGroupMapper,
|
|
17131
|
+
PRODUCT_LIST: ProductListMapper,
|
|
17132
|
+
FIXED_PAYMENT: FixedPaymentMapper,
|
|
17133
|
+
PAYMENT_INPUT: PaymentInputMapper,
|
|
17134
|
+
DONATION: DonationMapper,
|
|
17135
|
+
EVENTS_RSVP: RadioGroupMapper,
|
|
17136
|
+
EVENTS_REPEATER: TextMapper,
|
|
17137
|
+
FILE_UPLOAD: FileUploadMapper,
|
|
17138
|
+
SIGNATURE: SignatureMapper,
|
|
17139
|
+
RATING_INPUT: RatingInputMapper,
|
|
17140
|
+
VAT_ID: TextFieldMapper,
|
|
17141
|
+
NESTED_FORM: DefaultMapper,
|
|
17142
|
+
HEADER: TextMapper,
|
|
17143
|
+
RICH_TEXT: TextMapper,
|
|
17144
|
+
SUBMIT_BUTTON: SubmitButtonMapper,
|
|
17145
|
+
IDENTITY_PASSWORD: DefaultMapper
|
|
17146
|
+
};
|
|
16678
17147
|
|
|
16679
17148
|
// ../form-fields/dist/esm/ui/form/components/form/input-field.js
|
|
16680
17149
|
var InputField = (_ref) => {
|
|
@@ -16701,6 +17170,7 @@ var InputField = (_ref) => {
|
|
|
16701
17170
|
requiredIndicator,
|
|
16702
17171
|
requiredIndicatorPlacement
|
|
16703
17172
|
} = form.requiredIndicatorProperties || {};
|
|
17173
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
16704
17174
|
const _onBlur = () => {
|
|
16705
17175
|
bi == null || bi.report(formFieldFocus({
|
|
16706
17176
|
action_type: "blur",
|
|
@@ -16747,7 +17217,28 @@ var InputField = (_ref) => {
|
|
|
16747
17217
|
if (!FieldComponent) {
|
|
16748
17218
|
return null;
|
|
16749
17219
|
}
|
|
16750
|
-
return /* @__PURE__ */ React14__default.default.createElement(
|
|
17220
|
+
return /* @__PURE__ */ React14__default.default.createElement(FieldPropsContext.Provider, {
|
|
17221
|
+
value: {
|
|
17222
|
+
...propsMapper({
|
|
17223
|
+
...field.properties,
|
|
17224
|
+
id: field.id,
|
|
17225
|
+
target: field.target,
|
|
17226
|
+
path: field.path,
|
|
17227
|
+
error: fieldError,
|
|
17228
|
+
errors: fieldErrors,
|
|
17229
|
+
value: fieldValue,
|
|
17230
|
+
externalData,
|
|
17231
|
+
fieldType: field.fieldType,
|
|
17232
|
+
requiredIndicatorType: requiredIndicator,
|
|
17233
|
+
requiredIndicatorPlacement
|
|
17234
|
+
}),
|
|
17235
|
+
onChange: handleChange,
|
|
17236
|
+
onBlur: _onBlur,
|
|
17237
|
+
onFocus: _onFocus,
|
|
17238
|
+
hasError,
|
|
17239
|
+
errorMessage
|
|
17240
|
+
}
|
|
17241
|
+
}, /* @__PURE__ */ React14__default.default.createElement(FieldComponent, (0, import_extends.default)({}, field.properties, {
|
|
16751
17242
|
onChange: handleChange,
|
|
16752
17243
|
onBlur: _onBlur,
|
|
16753
17244
|
onFocus: _onFocus,
|
|
@@ -16764,7 +17255,7 @@ var InputField = (_ref) => {
|
|
|
16764
17255
|
FieldLayout,
|
|
16765
17256
|
requiredIndicatorType: requiredIndicator,
|
|
16766
17257
|
requiredIndicatorPlacement
|
|
16767
|
-
}));
|
|
17258
|
+
})));
|
|
16768
17259
|
};
|
|
16769
17260
|
|
|
16770
17261
|
// ../form-fields/dist/esm/ui/form/components/form/read-only-field.js
|
|
@@ -16781,18 +17272,30 @@ var ReadOnlyField = (_ref) => {
|
|
|
16781
17272
|
requiredIndicator,
|
|
16782
17273
|
requiredIndicatorPlacement
|
|
16783
17274
|
} = form.requiredIndicatorProperties || {};
|
|
17275
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
16784
17276
|
const FieldComponent = componentsById[field.fieldType];
|
|
16785
17277
|
if (!FieldComponent) {
|
|
16786
17278
|
return null;
|
|
16787
17279
|
}
|
|
16788
|
-
return /* @__PURE__ */ React14__default.default.createElement(
|
|
17280
|
+
return /* @__PURE__ */ React14__default.default.createElement(FieldPropsContext.Provider, {
|
|
17281
|
+
value: {
|
|
17282
|
+
...propsMapper({
|
|
17283
|
+
...field.properties,
|
|
17284
|
+
id: field.id,
|
|
17285
|
+
externalData,
|
|
17286
|
+
fieldType: field.fieldType,
|
|
17287
|
+
requiredIndicatorType: requiredIndicator,
|
|
17288
|
+
requiredIndicatorPlacement
|
|
17289
|
+
})
|
|
17290
|
+
}
|
|
17291
|
+
}, /* @__PURE__ */ React14__default.default.createElement(FieldComponent, (0, import_extends2.default)({}, field.properties, {
|
|
16789
17292
|
id: field.id,
|
|
16790
17293
|
externalData,
|
|
16791
17294
|
fieldType: field.fieldType,
|
|
16792
17295
|
FieldLayout,
|
|
16793
17296
|
requiredIndicatorType: requiredIndicator,
|
|
16794
17297
|
requiredIndicatorPlacement
|
|
16795
|
-
}));
|
|
17298
|
+
})));
|
|
16796
17299
|
};
|
|
16797
17300
|
|
|
16798
17301
|
// ../form-fields/dist/esm/ui/form/components/form/nested-form-field.js
|
|
@@ -16817,6 +17320,7 @@ var NestedFormField = (_ref) => {
|
|
|
16817
17320
|
requiredIndicator,
|
|
16818
17321
|
requiredIndicatorPlacement
|
|
16819
17322
|
} = form.requiredIndicatorProperties || {};
|
|
17323
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
16820
17324
|
const handleChange = React14.useCallback((value) => {
|
|
16821
17325
|
if (!value) {
|
|
16822
17326
|
value = null;
|
|
@@ -16827,7 +17331,24 @@ var NestedFormField = (_ref) => {
|
|
|
16827
17331
|
if (!FieldComponent) {
|
|
16828
17332
|
return null;
|
|
16829
17333
|
}
|
|
16830
|
-
return /* @__PURE__ */ React14__default.default.createElement(
|
|
17334
|
+
return /* @__PURE__ */ React14__default.default.createElement(FieldPropsContext.Provider, {
|
|
17335
|
+
value: {
|
|
17336
|
+
...propsMapper({
|
|
17337
|
+
...field.properties,
|
|
17338
|
+
id: field.id,
|
|
17339
|
+
target: field.target,
|
|
17340
|
+
path: field.path,
|
|
17341
|
+
error: fieldError,
|
|
17342
|
+
errors: fieldErrors,
|
|
17343
|
+
value: fieldValue,
|
|
17344
|
+
externalData,
|
|
17345
|
+
fieldType: field.fieldType,
|
|
17346
|
+
requiredIndicatorType: requiredIndicator,
|
|
17347
|
+
requiredIndicatorPlacement
|
|
17348
|
+
}),
|
|
17349
|
+
onChange: handleChange
|
|
17350
|
+
}
|
|
17351
|
+
}, /* @__PURE__ */ React14__default.default.createElement(FieldComponent, (0, import_extends3.default)({}, field.properties, {
|
|
16831
17352
|
onChange: handleChange,
|
|
16832
17353
|
error: fieldError,
|
|
16833
17354
|
errors: fieldErrors,
|
|
@@ -16840,7 +17361,7 @@ var NestedFormField = (_ref) => {
|
|
|
16840
17361
|
FieldLayout,
|
|
16841
17362
|
requiredIndicatorType: requiredIndicator,
|
|
16842
17363
|
requiredIndicatorPlacement
|
|
16843
|
-
}));
|
|
17364
|
+
})));
|
|
16844
17365
|
};
|
|
16845
17366
|
|
|
16846
17367
|
// ../form-fields/dist/esm/ui/form/components/form/submit-button-field.js
|
|
@@ -16947,11 +17468,33 @@ var SubmitButtonField = (_ref) => {
|
|
|
16947
17468
|
const submitButtonText = submitText || text || "";
|
|
16948
17469
|
const previousButtonText = previousText || "";
|
|
16949
17470
|
const nextButtonText = nextText || "";
|
|
17471
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
16950
17472
|
const FieldComponent = componentsById[field.fieldType];
|
|
16951
17473
|
if (!FieldComponent) {
|
|
16952
17474
|
return null;
|
|
16953
17475
|
}
|
|
16954
|
-
return /* @__PURE__ */ React14__default.default.createElement(
|
|
17476
|
+
return /* @__PURE__ */ React14__default.default.createElement(FieldPropsContext.Provider, {
|
|
17477
|
+
value: {
|
|
17478
|
+
...propsMapper({
|
|
17479
|
+
...field.properties,
|
|
17480
|
+
id: field.id,
|
|
17481
|
+
externalData,
|
|
17482
|
+
fieldType: field.fieldType,
|
|
17483
|
+
hasSteps,
|
|
17484
|
+
isDisabled,
|
|
17485
|
+
isInProgress,
|
|
17486
|
+
showPreviousButton,
|
|
17487
|
+
showNextButton,
|
|
17488
|
+
showSubmitButton,
|
|
17489
|
+
submitText: submitButtonText,
|
|
17490
|
+
previousText: previousButtonText,
|
|
17491
|
+
nextText: nextButtonText,
|
|
17492
|
+
onSubmitClick: handleSubmitClick,
|
|
17493
|
+
onPreviousClick: () => actions == null ? void 0 : actions.setPreviousStep(),
|
|
17494
|
+
onNextClick: () => actions == null ? void 0 : actions.setNextStep()
|
|
17495
|
+
})
|
|
17496
|
+
}
|
|
17497
|
+
}, /* @__PURE__ */ React14__default.default.createElement(FieldComponent, (0, import_extends4.default)({}, field.properties, {
|
|
16955
17498
|
id: field.id,
|
|
16956
17499
|
externalData,
|
|
16957
17500
|
fieldType: field.fieldType,
|
|
@@ -16968,7 +17511,7 @@ var SubmitButtonField = (_ref) => {
|
|
|
16968
17511
|
onSubmitClick: handleSubmitClick,
|
|
16969
17512
|
onPreviousClick: () => actions == null ? void 0 : actions.setPreviousStep(),
|
|
16970
17513
|
onNextClick: () => actions == null ? void 0 : actions.setNextStep()
|
|
16971
|
-
}));
|
|
17514
|
+
})));
|
|
16972
17515
|
};
|
|
16973
17516
|
|
|
16974
17517
|
// ../form-fields/dist/esm/services/multiline-address.js
|
|
@@ -21869,232 +22412,6 @@ function normalizeSchema(obj) {
|
|
|
21869
22412
|
return obj;
|
|
21870
22413
|
}
|
|
21871
22414
|
|
|
21872
|
-
// src/mappers/props-map.ts
|
|
21873
|
-
var MinMaxLengthMapper = (validation) => ({
|
|
21874
|
-
maxLength: validation?.string?.maxLength,
|
|
21875
|
-
minLength: validation?.string?.minLength
|
|
21876
|
-
});
|
|
21877
|
-
var MinMaxItemsMapper = (validation) => ({
|
|
21878
|
-
minItems: validation?.array?.minItems,
|
|
21879
|
-
maxItems: validation?.array?.maxItems
|
|
21880
|
-
});
|
|
21881
|
-
var MinMaxValuesMapper = (validation) => ({
|
|
21882
|
-
minValue: validation.predefined.paymentOptions.products[0].dynamicPriceOptions.minPrice,
|
|
21883
|
-
maxValue: validation.predefined.paymentOptions.products[0].dynamicPriceOptions.maxPrice
|
|
21884
|
-
});
|
|
21885
|
-
var AcceptedDatesMapper = (validation) => ({
|
|
21886
|
-
acceptedDates: validation?.string?.dateOptions?.minimum === "$now" ? "future" : validation?.string?.dateOptions?.maximum === "$now" ? "past" : "all"
|
|
21887
|
-
});
|
|
21888
|
-
var CustomOptionMapper = (props) => {
|
|
21889
|
-
const { addOther, addOtherLabel, addOtherPlaceholder } = props;
|
|
21890
|
-
return {
|
|
21891
|
-
customOption: addOther ? {
|
|
21892
|
-
label: addOtherLabel,
|
|
21893
|
-
placeholder: addOtherPlaceholder
|
|
21894
|
-
} : void 0
|
|
21895
|
-
};
|
|
21896
|
-
};
|
|
21897
|
-
var ErrorMapper = (props) => {
|
|
21898
|
-
return {
|
|
21899
|
-
...props,
|
|
21900
|
-
// TODO
|
|
21901
|
-
error: ""
|
|
21902
|
-
};
|
|
21903
|
-
};
|
|
21904
|
-
var BaseMapper = (props) => {
|
|
21905
|
-
const { hideLabel } = props;
|
|
21906
|
-
return {
|
|
21907
|
-
...props,
|
|
21908
|
-
showLabel: hideLabel === void 0 ? true : !hideLabel,
|
|
21909
|
-
...ErrorMapper(props)
|
|
21910
|
-
};
|
|
21911
|
-
};
|
|
21912
|
-
var TextFieldMapper = (props) => ({
|
|
21913
|
-
...props,
|
|
21914
|
-
...MinMaxLengthMapper(props?.validation),
|
|
21915
|
-
...BaseMapper(props)
|
|
21916
|
-
});
|
|
21917
|
-
var TextAreaMapper = (props) => ({
|
|
21918
|
-
...props,
|
|
21919
|
-
...MinMaxLengthMapper(props?.validation),
|
|
21920
|
-
...BaseMapper(props)
|
|
21921
|
-
});
|
|
21922
|
-
var PhoneInputMapper = (props) => {
|
|
21923
|
-
const { defaultCountry, defaultCountryCode, validation } = props;
|
|
21924
|
-
return {
|
|
21925
|
-
...props,
|
|
21926
|
-
...BaseMapper(props),
|
|
21927
|
-
defaultCountryCode: defaultCountry ?? defaultCountryCode,
|
|
21928
|
-
allowedCountryCodes: validation?.string?.phoneOptions?.allowedCountryCodes
|
|
21929
|
-
};
|
|
21930
|
-
};
|
|
21931
|
-
var MultilineAddressMapper = (props) => {
|
|
21932
|
-
const { view, validation } = props;
|
|
21933
|
-
return {
|
|
21934
|
-
...props,
|
|
21935
|
-
...BaseMapper(props),
|
|
21936
|
-
showAddressLine2: view?.fieldSettings?.addressLine2?.show,
|
|
21937
|
-
addressLine2Required: validation?.predefined?.multilineAddressOptions?.fields?.addressLine2?.required
|
|
21938
|
-
};
|
|
21939
|
-
};
|
|
21940
|
-
var DateInputMapper = (props) => {
|
|
21941
|
-
const { hidePlaceholder, validation } = props;
|
|
21942
|
-
return {
|
|
21943
|
-
...props,
|
|
21944
|
-
...BaseMapper(props),
|
|
21945
|
-
...AcceptedDatesMapper(validation),
|
|
21946
|
-
showPlaceholder: hidePlaceholder === void 0 ? true : !hidePlaceholder
|
|
21947
|
-
};
|
|
21948
|
-
};
|
|
21949
|
-
var DatePickerMapper = (props) => {
|
|
21950
|
-
const { validation } = props;
|
|
21951
|
-
return {
|
|
21952
|
-
...props,
|
|
21953
|
-
...BaseMapper(props),
|
|
21954
|
-
...AcceptedDatesMapper(validation)
|
|
21955
|
-
};
|
|
21956
|
-
};
|
|
21957
|
-
var DateTimeInputMapper = (props) => {
|
|
21958
|
-
const { hidePlaceholder, validation } = props;
|
|
21959
|
-
return {
|
|
21960
|
-
...props,
|
|
21961
|
-
...BaseMapper(props),
|
|
21962
|
-
...AcceptedDatesMapper(validation),
|
|
21963
|
-
showPlaceholder: hidePlaceholder === void 0 ? true : !hidePlaceholder
|
|
21964
|
-
};
|
|
21965
|
-
};
|
|
21966
|
-
var FileUploadMapper = (props) => {
|
|
21967
|
-
const { valueSliderLimit, uploadFileFormats } = props;
|
|
21968
|
-
return {
|
|
21969
|
-
...props,
|
|
21970
|
-
...BaseMapper(props),
|
|
21971
|
-
maxFiles: valueSliderLimit,
|
|
21972
|
-
allowedFileFormats: uploadFileFormats
|
|
21973
|
-
};
|
|
21974
|
-
};
|
|
21975
|
-
var NumberInputMapper = (props) => BaseMapper(props);
|
|
21976
|
-
var CheckboxMapper = (props) => ErrorMapper(props);
|
|
21977
|
-
var SignatureMapper = (props) => {
|
|
21978
|
-
const { uploadEnabled } = props;
|
|
21979
|
-
return {
|
|
21980
|
-
...props,
|
|
21981
|
-
...BaseMapper(props),
|
|
21982
|
-
imageUploadEnabled: uploadEnabled
|
|
21983
|
-
};
|
|
21984
|
-
};
|
|
21985
|
-
var RatingInputMapper = (props) => BaseMapper(props);
|
|
21986
|
-
var RadioGroupMapper = (props) => {
|
|
21987
|
-
return {
|
|
21988
|
-
...props,
|
|
21989
|
-
...BaseMapper(props),
|
|
21990
|
-
...CustomOptionMapper(props)
|
|
21991
|
-
};
|
|
21992
|
-
};
|
|
21993
|
-
var CheckboxGroupMapper = (props) => {
|
|
21994
|
-
const { validation } = props;
|
|
21995
|
-
return {
|
|
21996
|
-
...props,
|
|
21997
|
-
...BaseMapper(props),
|
|
21998
|
-
...CustomOptionMapper(props),
|
|
21999
|
-
...MinMaxItemsMapper(validation)
|
|
22000
|
-
};
|
|
22001
|
-
};
|
|
22002
|
-
var DropdownMapper = (props) => BaseMapper(props);
|
|
22003
|
-
var TagsMapper = (props) => {
|
|
22004
|
-
const { validation } = props;
|
|
22005
|
-
return {
|
|
22006
|
-
...props,
|
|
22007
|
-
...BaseMapper(props),
|
|
22008
|
-
...CustomOptionMapper(props),
|
|
22009
|
-
...MinMaxItemsMapper(validation)
|
|
22010
|
-
};
|
|
22011
|
-
};
|
|
22012
|
-
var TimeInputMapper = (props) => {
|
|
22013
|
-
const { hidePlaceholder } = props;
|
|
22014
|
-
return {
|
|
22015
|
-
...props,
|
|
22016
|
-
...BaseMapper(props),
|
|
22017
|
-
showPlaceholder: hidePlaceholder === void 0 ? true : !hidePlaceholder
|
|
22018
|
-
};
|
|
22019
|
-
};
|
|
22020
|
-
var TextMapper = (props) => props;
|
|
22021
|
-
var SubmitButtonMapper = (props) => {
|
|
22022
|
-
return {
|
|
22023
|
-
...props
|
|
22024
|
-
};
|
|
22025
|
-
};
|
|
22026
|
-
var ProductListMapper = (props) => {
|
|
22027
|
-
return {
|
|
22028
|
-
...props,
|
|
22029
|
-
...BaseMapper(props),
|
|
22030
|
-
...MinMaxItemsMapper(props?.validation)
|
|
22031
|
-
};
|
|
22032
|
-
};
|
|
22033
|
-
var FixedPaymentMapper = (props) => {
|
|
22034
|
-
const { validation, hideLabel } = props;
|
|
22035
|
-
const paymentValidation = validation?.predefined?.paymentOptions?.products?.[0];
|
|
22036
|
-
const fixedPaymentValue = paymentValidation?.fixedPriceOptions?.price;
|
|
22037
|
-
return {
|
|
22038
|
-
...props,
|
|
22039
|
-
showLabel: hideLabel === void 0 ? true : !hideLabel,
|
|
22040
|
-
amount: fixedPaymentValue
|
|
22041
|
-
};
|
|
22042
|
-
};
|
|
22043
|
-
var PaymentInputMapper = (props) => {
|
|
22044
|
-
const { validation } = props;
|
|
22045
|
-
return {
|
|
22046
|
-
...props,
|
|
22047
|
-
...BaseMapper(props),
|
|
22048
|
-
...MinMaxValuesMapper(validation)
|
|
22049
|
-
};
|
|
22050
|
-
};
|
|
22051
|
-
var DonationMapper = (props) => {
|
|
22052
|
-
return {
|
|
22053
|
-
...props,
|
|
22054
|
-
...BaseMapper(props),
|
|
22055
|
-
...CustomOptionMapper(props)
|
|
22056
|
-
};
|
|
22057
|
-
};
|
|
22058
|
-
var AppointmentMapper = (props) => BaseMapper(props);
|
|
22059
|
-
var ImageChoiceMapper = (props) => {
|
|
22060
|
-
const { isMultipleAnswers, choiceImageResize } = props;
|
|
22061
|
-
return {
|
|
22062
|
-
...props,
|
|
22063
|
-
...BaseMapper(props),
|
|
22064
|
-
multiple: isMultipleAnswers,
|
|
22065
|
-
imageAspectRatio: choiceImageResize
|
|
22066
|
-
};
|
|
22067
|
-
};
|
|
22068
|
-
var FIELD_PROP_MAP = {
|
|
22069
|
-
TEXT_INPUT: TextFieldMapper,
|
|
22070
|
-
TEXT_AREA: TextAreaMapper,
|
|
22071
|
-
PHONE_INPUT: PhoneInputMapper,
|
|
22072
|
-
MULTILINE_ADDRESS: MultilineAddressMapper,
|
|
22073
|
-
DATE_INPUT: DateInputMapper,
|
|
22074
|
-
DATE_PICKER: DatePickerMapper,
|
|
22075
|
-
DATE_TIME_INPUT: DateTimeInputMapper,
|
|
22076
|
-
FILE_UPLOAD: FileUploadMapper,
|
|
22077
|
-
NUMBER_INPUT: NumberInputMapper,
|
|
22078
|
-
CHECKBOX: CheckboxMapper,
|
|
22079
|
-
SIGNATURE: SignatureMapper,
|
|
22080
|
-
RATING_INPUT: RatingInputMapper,
|
|
22081
|
-
RADIO_GROUP: RadioGroupMapper,
|
|
22082
|
-
CHECKBOX_GROUP: CheckboxGroupMapper,
|
|
22083
|
-
DROPDOWN: DropdownMapper,
|
|
22084
|
-
TAGS: TagsMapper,
|
|
22085
|
-
TIME_INPUT: TimeInputMapper,
|
|
22086
|
-
TEXT: TextMapper,
|
|
22087
|
-
SUBMIT_BUTTON: SubmitButtonMapper,
|
|
22088
|
-
PRODUCT_LIST: ProductListMapper,
|
|
22089
|
-
FIXED_PAYMENT: FixedPaymentMapper,
|
|
22090
|
-
PAYMENT_INPUT: PaymentInputMapper,
|
|
22091
|
-
DONATION: DonationMapper,
|
|
22092
|
-
APPOINTMENT: AppointmentMapper,
|
|
22093
|
-
IMAGE_CHOICE: ImageChoiceMapper,
|
|
22094
|
-
// fields that have not been implemented
|
|
22095
|
-
"": () => ({})
|
|
22096
|
-
};
|
|
22097
|
-
|
|
22098
22415
|
// src/mappers/field-type-map.ts
|
|
22099
22416
|
var FIELD_TYPE_MAP = {
|
|
22100
22417
|
// CONTACTS_FIELD_TYPES
|
|
@@ -22195,21 +22512,12 @@ var FIELD_TYPE_MAP = {
|
|
|
22195
22512
|
SUBMIT_BUTTON: "SUBMIT_BUTTON",
|
|
22196
22513
|
SERVICES_MULTI_CHOICE: "CHECKBOX_GROUP",
|
|
22197
22514
|
// fields that have not been implemented
|
|
22198
|
-
NESTED_FORM: "",
|
|
22199
|
-
IDENTITY_PASSWORD: "",
|
|
22200
|
-
BOOKINGS_LOGIN_BAR: ""
|
|
22515
|
+
NESTED_FORM: "TEXT_INPUT",
|
|
22516
|
+
IDENTITY_PASSWORD: "TEXT_INPUT",
|
|
22517
|
+
BOOKINGS_LOGIN_BAR: "TEXT_INPUT"
|
|
22201
22518
|
};
|
|
22202
|
-
|
|
22203
|
-
|
|
22204
|
-
fieldType,
|
|
22205
|
-
mappers[fieldType] ? (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22206
|
-
Component,
|
|
22207
|
-
{
|
|
22208
|
-
...mappers[fieldType](props)
|
|
22209
|
-
}
|
|
22210
|
-
) : Component
|
|
22211
|
-
])
|
|
22212
|
-
);
|
|
22519
|
+
|
|
22520
|
+
// src/utils/mappers.tsx
|
|
22213
22521
|
var mapFieldTypes = (fields, typeMap) => ({
|
|
22214
22522
|
...fields,
|
|
22215
22523
|
...Object.fromEntries(
|
|
@@ -22235,13 +22543,9 @@ var useForm3 = ({
|
|
|
22235
22543
|
console.log("upload file not implemented");
|
|
22236
22544
|
}
|
|
22237
22545
|
};
|
|
22238
|
-
const mappedFieldProps = React14.useMemo(
|
|
22239
|
-
() => mapFieldProps(fields, FIELD_PROP_MAP),
|
|
22240
|
-
[fields]
|
|
22241
|
-
);
|
|
22242
22546
|
const mappedFieldTypes = React14.useMemo(
|
|
22243
|
-
() => mapFieldTypes(
|
|
22244
|
-
[
|
|
22547
|
+
() => mapFieldTypes(fields, FIELD_TYPE_MAP),
|
|
22548
|
+
[fields]
|
|
22245
22549
|
);
|
|
22246
22550
|
const { currentView, formFields } = useForm2({
|
|
22247
22551
|
form,
|
|
@@ -22403,6 +22707,7 @@ var FormProvider = ({
|
|
|
22403
22707
|
*/
|
|
22404
22708
|
|
|
22405
22709
|
exports.FormProvider = FormProvider;
|
|
22710
|
+
exports.useFieldProps = useFieldProps;
|
|
22406
22711
|
exports.useForm = useForm3;
|
|
22407
22712
|
//# sourceMappingURL=index.cjs.map
|
|
22408
22713
|
//# sourceMappingURL=index.cjs.map
|