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