@verbb/formie-browser 1.0.13 → 1.0.15
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/CHANGELOG.md +80 -0
- package/dist/chunks/{address-country-Rx6GQTND.js → address-country-BcEQKw0T.js} +11 -5
- package/dist/chunks/{address-finder-k7_BXaRe.js → address-finder-BWGINCSA.js} +3 -3
- package/dist/chunks/address-state-DI3ndhMU.js +365 -0
- package/dist/chunks/{api-BUb6P-xu.js → api-BK9b340y.js} +93 -63
- package/dist/chunks/{api-DqpfkZWL.js → api-Dxl_CKw-.js} +202 -193
- package/dist/chunks/{api-sPqGbOww.js → api-ghNr2uxX.js} +15 -9
- package/dist/chunks/{async-nPFRNQ06.js → async-2GdXNFCE.js} +18 -1
- package/dist/chunks/{bpoint-Dlq34XH1.js → bpoint-BwtuyN_O.js} +3 -3
- package/dist/chunks/calculations-YEoVCG2q.js +310 -0
- package/dist/chunks/{captcha-eu-CGm8Lbrj.js → captcha-eu-DWLoQFKB.js} +6 -5
- package/dist/chunks/{checkbox-radio-BY2aTCOG.js → checkbox-radio-gsm8QPJg.js} +74 -75
- package/dist/chunks/{combobox-C0EuExSI.js → combobox-Ba08_cHL.js} +340 -328
- package/dist/chunks/conditions-Ceeg6ReZ.js +467 -0
- package/dist/chunks/country-from-ip-DDj_mFki.js +29 -0
- package/dist/chunks/csrf-DxHg_ZYt.js +61 -0
- package/dist/chunks/{custom-google-maps-BsaSirEZ.js → custom-google-maps-C4l2S3GO.js} +9 -3
- package/dist/chunks/{custom-link-CJ1-FjEM.js → custom-link-CLazgKYH.js} +8 -2
- package/dist/chunks/{custom-maps-DYW_pBid.js → custom-maps-DqcAlD0v.js} +10 -4
- package/dist/chunks/{date-picker-F9BUBDSW.js → date-picker-DaPvMrop.js} +467 -443
- package/dist/chunks/{dist-D6i-VNgM.js → dist-ZLeW0zZ3.js} +1281 -453
- package/dist/chunks/{eway-D9_m8ooj.js → eway-uw0DzU-L.js} +5 -5
- package/dist/chunks/field-references.resolver-Ca8MguFv.js +104 -0
- package/dist/chunks/{file-upload-rqfZNqlH.js → file-upload-B8_mH012.js} +119 -99
- package/dist/chunks/friendly-captcha-v1-CVXaXgDO.js +34 -0
- package/dist/chunks/{friendly-captcha-v2-CLSAbkqx.js → friendly-captcha-v2-DkeIVTKI.js} +6 -5
- package/dist/chunks/{friendly-challenge-8uPatWqk.js → friendly-challenge-DPG9MJb1.js} +111 -102
- package/dist/chunks/{go-cardless-DAT3ZaQf.js → go-cardless-c4wLJdOt.js} +2 -2
- package/dist/chunks/google-address-JHYvjwgN.js +168 -0
- package/dist/chunks/{hcaptcha-CGLAmgjO.js → hcaptcha-Dt3ELLlP.js} +4 -4
- package/dist/chunks/{hidden-D7_Ch-QN.js → hidden-BZhXnNPe.js} +8 -2
- package/dist/chunks/http-C2QdHuWO.js +27 -0
- package/dist/chunks/{leaflet-src-j-lHNmhR.js → leaflet-src-DE6rv6M-.js} +42 -46
- package/dist/chunks/{loqate-CJPzBmSm.js → loqate-m51iPyO1.js} +3 -3
- package/dist/chunks/{mollie-Bibhl67p.js → mollie-Bn0PX173.js} +2 -2
- package/dist/chunks/{moneris-H2wSqk9h.js → moneris-BRbUvI4t.js} +3 -3
- package/dist/chunks/opayo-BwWdInEP.js +188 -0
- package/dist/chunks/{paddle-DkvIxQdG.js → paddle-CympHVvd.js} +4 -4
- package/dist/chunks/{password-validation-D06uH9va.js → password-validation-C8_uO_c_.js} +18 -12
- package/dist/chunks/{paypal-CQpAF7Ua.js → paypal-h75h6wae.js} +8 -6
- package/dist/chunks/{payway-CwDkC7YZ.js → payway-C9rHTCC_.js} +4 -4
- package/dist/chunks/{phone-country-D3ayr60L.js → phone-country-B8fv-L5_.js} +80 -63
- package/dist/chunks/{place-kit-BGHklIZ-.js → place-kit-BnZGQ-L1.js} +11 -11
- package/dist/chunks/{placekit-autocomplete.esm-DWVabQlq.js → placekit-autocomplete.esm-CZZERYur.js} +11 -15
- package/dist/chunks/{recaptcha-enterprise-XPId5-bS.js → recaptcha-enterprise-CUs8BO6V.js} +4 -4
- package/dist/chunks/{recaptcha-shared-CLYJvojk.js → recaptcha-shared-DTbTw-MF.js} +2 -2
- package/dist/chunks/{recaptcha-v2-checkbox-Cy-0PEPc.js → recaptcha-v2-checkbox-P1McW4Pv.js} +4 -4
- package/dist/chunks/{recaptcha-v2-invisible-BwRH540O.js → recaptcha-v2-invisible-FGDqozSP.js} +4 -4
- package/dist/chunks/{recaptcha-v3-No4Ykrhk.js → recaptcha-v3-CflUHeZD.js} +4 -4
- package/dist/chunks/{repeater-BVnPUqTj.js → repeater-CyhDbozO.js} +60 -40
- package/dist/chunks/request-profile-DhwkeCpS.js +10 -0
- package/dist/chunks/rich-text-uV4o_pGk.js +361 -0
- package/dist/chunks/{chunk-3b4jIN3o.js → rolldown-runtime-DtPi1Y-2.js} +2 -2
- package/dist/chunks/{scripts-CbQ7agX3.js → scripts-DrccjrFv.js} +1 -1
- package/dist/chunks/{sdk-BhHAYgga.js → sdk-lkwSvlpM.js} +282 -234
- package/dist/chunks/{shared-Bx9s0i0P.js → shared-OKhSay59.js} +27 -21
- package/dist/chunks/{signature-IOhuicje.js → signature-7cldFbqj.js} +138 -112
- package/dist/chunks/skip-CEW89ExY.js +7 -0
- package/dist/chunks/{snaptcha-DKx98oon.js → snaptcha-C3QLYxFT.js} +2 -2
- package/dist/chunks/{square-DwdcOI1G.js → square-C1z5DPVw.js} +9 -7
- package/dist/chunks/{stripe-DaoG2FT1.js → stripe-Dmkdkq1y.js} +11 -12
- package/dist/chunks/{summary-Dks0gXS3.js → summary-Bn-g5SDx.js} +48 -46
- package/dist/chunks/{survey-likert-DkE6bR7B.js → survey-likert-fk1hUPff.js} +7 -1
- package/dist/chunks/{survey-rank-DN6x4IZM.js → survey-rank-BsLGl2LX.js} +37 -25
- package/dist/chunks/{survey-rating-BnsNL9U5.js → survey-rating-DVS6e6fM.js} +17 -5
- package/dist/chunks/{table-CAjCJHrL.js → table-j7MlLLCc.js} +22 -16
- package/dist/chunks/{text-limit-BGaY0jhI.js → text-limit-LGMPhFuC.js} +40 -34
- package/dist/chunks/{theme-classes-Tv7q7ToE.js → theme-classes-DAQuEqdP.js} +1 -1
- package/dist/chunks/{turnstile-DJakPzQD.js → turnstile-ptihQfLl.js} +4 -4
- package/dist/chunks/{upload-manager-W-QDgxKD.js → upload-manager-BW7l-BhF.js} +459 -387
- package/dist/chunks/{utils-Vqp8i_RM.js → utils-DpUBPadZ.js} +20 -14
- package/dist/css/formie-base.css +104 -1
- package/dist/css/theme/_messages.css +2 -0
- package/dist/css/theme/_tokens.css +31 -25
- package/dist/css/theme/forms/_form.css +5 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1779 -1415
- package/dist/js/contracts/client.d.ts +5 -3
- package/dist/js/contracts/client.d.ts.map +1 -1
- package/dist/js/contracts/common.d.ts +2 -2
- package/dist/js/contracts/common.d.ts.map +1 -1
- package/dist/js/contracts/modules.d.ts +37 -12
- package/dist/js/contracts/modules.d.ts.map +1 -1
- package/dist/js/contracts/schema.d.ts +20 -38
- package/dist/js/contracts/schema.d.ts.map +1 -1
- package/dist/js/contracts/theme.d.ts +4 -1
- package/dist/js/contracts/theme.d.ts.map +1 -1
- package/dist/js/core/client-rendered-modules.d.ts +17 -0
- package/dist/js/core/client-rendered-modules.d.ts.map +1 -0
- package/dist/js/core/create-formie-client.d.ts.map +1 -1
- package/dist/js/core/field-error-aria.d.ts +23 -0
- package/dist/js/core/field-error-aria.d.ts.map +1 -0
- package/dist/js/core/hydrate-modules.d.ts +10 -8
- package/dist/js/core/hydrate-modules.d.ts.map +1 -1
- package/dist/js/core/submit-result-state.d.ts.map +1 -1
- package/dist/js/core/submit-result-ui.d.ts +3 -1
- package/dist/js/core/submit-result-ui.d.ts.map +1 -1
- package/dist/js/core/validation-focus.d.ts.map +1 -1
- package/dist/js/modules/address/address-finder.d.ts +1 -1
- package/dist/js/modules/address/address-finder.d.ts.map +1 -1
- package/dist/js/modules/address/factories.d.ts +3 -3
- package/dist/js/modules/address/factories.d.ts.map +1 -1
- package/dist/js/modules/address/google-address.d.ts +12 -1
- package/dist/js/modules/address/google-address.d.ts.map +1 -1
- package/dist/js/modules/address/index.d.ts +2 -2
- package/dist/js/modules/address/index.d.ts.map +1 -1
- package/dist/js/modules/address/loqate.d.ts +1 -1
- package/dist/js/modules/address/loqate.d.ts.map +1 -1
- package/dist/js/modules/address/place-kit.d.ts +1 -1
- package/dist/js/modules/address/place-kit.d.ts.map +1 -1
- package/dist/js/modules/captchas/captcha-eu.d.ts +1 -1
- package/dist/js/modules/captchas/captcha-eu.d.ts.map +1 -1
- package/dist/js/modules/captchas/factories.d.ts +11 -11
- package/dist/js/modules/captchas/factories.d.ts.map +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts.map +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts.map +1 -1
- package/dist/js/modules/captchas/hcaptcha.d.ts +1 -1
- package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -1
- package/dist/js/modules/captchas/index.d.ts +2 -2
- package/dist/js/modules/captchas/index.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-v3.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
- package/dist/js/modules/captchas/snaptcha.d.ts +1 -1
- package/dist/js/modules/captchas/snaptcha.d.ts.map +1 -1
- package/dist/js/modules/captchas/turnstile.d.ts +1 -1
- package/dist/js/modules/captchas/turnstile.d.ts.map +1 -1
- package/dist/js/modules/fields/address-country.d.ts +2 -2
- package/dist/js/modules/fields/address-country.d.ts.map +1 -1
- package/dist/js/modules/fields/address-state.d.ts +2 -2
- package/dist/js/modules/fields/address-state.d.ts.map +1 -1
- package/dist/js/modules/fields/calculations.d.ts +2 -2
- package/dist/js/modules/fields/calculations.d.ts.map +1 -1
- package/dist/js/modules/fields/checkbox-radio.d.ts +2 -2
- package/dist/js/modules/fields/checkbox-radio.d.ts.map +1 -1
- package/dist/js/modules/fields/combobox.d.ts +2 -2
- package/dist/js/modules/fields/combobox.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/config.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/effects.d.ts +1 -0
- package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/evaluator.d.ts +4 -1
- package/dist/js/modules/fields/conditions/evaluator.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/references.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/submission-context.d.ts +15 -0
- package/dist/js/modules/fields/conditions/submission-context.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/types.d.ts +3 -1
- package/dist/js/modules/fields/conditions/types.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/values.d.ts +1 -1
- package/dist/js/modules/fields/conditions/values.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions.d.ts +2 -2
- package/dist/js/modules/fields/conditions.d.ts.map +1 -1
- package/dist/js/modules/fields/custom-google-maps.d.ts +2 -2
- package/dist/js/modules/fields/custom-google-maps.d.ts.map +1 -1
- package/dist/js/modules/fields/custom-link.d.ts +2 -2
- package/dist/js/modules/fields/custom-link.d.ts.map +1 -1
- package/dist/js/modules/fields/custom-maps.d.ts +2 -2
- package/dist/js/modules/fields/custom-maps.d.ts.map +1 -1
- package/dist/js/modules/fields/date-picker.d.ts +2 -2
- package/dist/js/modules/fields/date-picker.d.ts.map +1 -1
- package/dist/js/modules/fields/file-upload.d.ts +2 -2
- package/dist/js/modules/fields/file-upload.d.ts.map +1 -1
- package/dist/js/modules/fields/hidden.d.ts +2 -2
- package/dist/js/modules/fields/hidden.d.ts.map +1 -1
- package/dist/js/modules/fields/index.d.ts +2 -2
- package/dist/js/modules/fields/index.d.ts.map +1 -1
- package/dist/js/modules/fields/password-validation.d.ts +2 -2
- package/dist/js/modules/fields/password-validation.d.ts.map +1 -1
- package/dist/js/modules/fields/phone-country.d.ts +2 -2
- package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
- package/dist/js/modules/fields/repeater.d.ts +2 -2
- package/dist/js/modules/fields/repeater.d.ts.map +1 -1
- package/dist/js/modules/fields/rich-text.d.ts +2 -2
- package/dist/js/modules/fields/rich-text.d.ts.map +1 -1
- package/dist/js/modules/fields/shared.d.ts +1 -0
- package/dist/js/modules/fields/shared.d.ts.map +1 -1
- package/dist/js/modules/fields/signature.d.ts +2 -2
- package/dist/js/modules/fields/signature.d.ts.map +1 -1
- package/dist/js/modules/fields/summary.d.ts +2 -2
- package/dist/js/modules/fields/summary.d.ts.map +1 -1
- package/dist/js/modules/fields/survey-likert.d.ts +2 -2
- package/dist/js/modules/fields/survey-likert.d.ts.map +1 -1
- package/dist/js/modules/fields/survey-rank.d.ts +2 -2
- package/dist/js/modules/fields/survey-rank.d.ts.map +1 -1
- package/dist/js/modules/fields/survey-rating.d.ts +2 -2
- package/dist/js/modules/fields/survey-rating.d.ts.map +1 -1
- package/dist/js/modules/fields/table.d.ts +2 -2
- package/dist/js/modules/fields/table.d.ts.map +1 -1
- package/dist/js/modules/fields/text-limit.d.ts +2 -2
- package/dist/js/modules/fields/text-limit.d.ts.map +1 -1
- package/dist/js/modules/fields/upload-manager.d.ts +2 -2
- package/dist/js/modules/fields/upload-manager.d.ts.map +1 -1
- package/dist/js/modules/loader.d.ts +10 -4
- package/dist/js/modules/loader.d.ts.map +1 -1
- package/dist/js/modules/payments/bpoint.d.ts +1 -1
- package/dist/js/modules/payments/bpoint.d.ts.map +1 -1
- package/dist/js/modules/payments/eway.d.ts +1 -1
- package/dist/js/modules/payments/eway.d.ts.map +1 -1
- package/dist/js/modules/payments/factories.d.ts +7 -7
- package/dist/js/modules/payments/factories.d.ts.map +1 -1
- package/dist/js/modules/payments/go-cardless.d.ts +1 -1
- package/dist/js/modules/payments/go-cardless.d.ts.map +1 -1
- package/dist/js/modules/payments/index.d.ts +2 -2
- package/dist/js/modules/payments/index.d.ts.map +1 -1
- package/dist/js/modules/payments/mollie.d.ts +1 -1
- package/dist/js/modules/payments/mollie.d.ts.map +1 -1
- package/dist/js/modules/payments/moneris.d.ts +1 -1
- package/dist/js/modules/payments/moneris.d.ts.map +1 -1
- package/dist/js/modules/payments/opayo.d.ts +1 -1
- package/dist/js/modules/payments/opayo.d.ts.map +1 -1
- package/dist/js/modules/payments/paddle.d.ts +1 -1
- package/dist/js/modules/payments/paddle.d.ts.map +1 -1
- package/dist/js/modules/payments/paypal.d.ts +1 -1
- package/dist/js/modules/payments/paypal.d.ts.map +1 -1
- package/dist/js/modules/payments/payway.d.ts +1 -1
- package/dist/js/modules/payments/payway.d.ts.map +1 -1
- package/dist/js/modules/payments/square.d.ts +1 -1
- package/dist/js/modules/payments/square.d.ts.map +1 -1
- package/dist/js/modules/payments/stripe.d.ts +1 -1
- package/dist/js/modules/payments/stripe.d.ts.map +1 -1
- package/dist/js/modules/payments/utils.d.ts +6 -0
- package/dist/js/modules/payments/utils.d.ts.map +1 -1
- package/dist/js/modules/registry.d.ts +6 -4
- package/dist/js/modules/registry.d.ts.map +1 -1
- package/dist/js/submit/pipeline.d.ts.map +1 -1
- package/dist/js/theme/browser-theme-state.generated.d.ts +24 -0
- package/dist/js/theme/browser-theme-state.generated.d.ts.map +1 -0
- package/dist/js/theme/theme-classes.d.ts +3 -3
- package/dist/js/theme/theme-classes.d.ts.map +1 -1
- package/dist/js/transport/forms-api.d.ts +5 -3
- package/dist/js/transport/forms-api.d.ts.map +1 -1
- package/dist/js/utils/async.d.ts +1 -0
- package/dist/js/utils/async.d.ts.map +1 -1
- package/dist/js/utils/country-from-ip.d.ts +2 -2
- package/dist/js/utils/country-from-ip.d.ts.map +1 -1
- package/dist/js/utils/csrf.d.ts +17 -0
- package/dist/js/utils/csrf.d.ts.map +1 -0
- package/dist/js/utils/field-references.parser.d.ts +1 -0
- package/dist/js/utils/field-references.parser.d.ts.map +1 -1
- package/dist/js/utils/field-references.resolver.d.ts.map +1 -1
- package/dist/js/utils/field-references.types.d.ts +1 -0
- package/dist/js/utils/field-references.types.d.ts.map +1 -1
- package/dist/js/utils/http.d.ts +3 -1
- package/dist/js/utils/http.d.ts.map +1 -1
- package/dist/js/utils/request-profile.d.ts +4 -0
- package/dist/js/utils/request-profile.d.ts.map +1 -0
- package/dist/js/utils/unload-warning.d.ts.map +1 -1
- package/dist/js/validation/rules/email.d.ts.map +1 -1
- package/dist/js/validation/rules/match.d.ts.map +1 -1
- package/dist/js/validation/rules/number.d.ts.map +1 -1
- package/dist/js/validation/rules/required.d.ts.map +1 -1
- package/dist/js/validation/rules/shared.d.ts.map +1 -1
- package/dist/js/validation/rules/url.d.ts.map +1 -1
- package/dist/js/validation/skip.d.ts +7 -0
- package/dist/js/validation/skip.d.ts.map +1 -0
- package/dist/js/validation/submit-readiness.d.ts.map +1 -1
- package/dist/js/validation/validator.d.ts.map +1 -1
- package/package.json +43 -12
- package/src/css/formie-base.css +104 -1
- package/src/css/theme/_messages.css +2 -0
- package/src/css/theme/_tokens.css +31 -25
- package/src/css/theme/forms/_form.css +5 -1
- package/src/index.ts +13 -8
- package/src/js/contracts/client.ts +5 -3
- package/src/js/contracts/common.ts +5 -6
- package/src/js/contracts/modules.ts +41 -12
- package/src/js/contracts/schema.ts +21 -43
- package/src/js/contracts/theme.ts +6 -1
- package/src/js/core/client-rendered-modules.ts +69 -0
- package/src/js/core/create-formie-client.ts +132 -86
- package/src/js/core/field-error-aria.ts +93 -0
- package/src/js/core/hydrate-modules.ts +54 -29
- package/src/js/core/submit-result-state.ts +51 -45
- package/src/js/core/submit-result-ui.ts +25 -68
- package/src/js/core/validation-focus.ts +20 -20
- package/src/js/modules/address/address-finder.ts +1 -1
- package/src/js/modules/address/factories.ts +15 -13
- package/src/js/modules/address/google-address.ts +102 -40
- package/src/js/modules/address/index.ts +2 -2
- package/src/js/modules/address/loqate.ts +1 -1
- package/src/js/modules/address/place-kit.ts +14 -8
- package/src/js/modules/captchas/captcha-eu.ts +2 -2
- package/src/js/modules/captchas/factories.ts +66 -42
- package/src/js/modules/captchas/friendly-captcha-v1.ts +12 -2
- package/src/js/modules/captchas/friendly-captcha-v2.ts +4 -2
- package/src/js/modules/captchas/hcaptcha.ts +5 -5
- package/src/js/modules/captchas/index.ts +2 -2
- package/src/js/modules/captchas/recaptcha-enterprise.ts +2 -2
- package/src/js/modules/captchas/recaptcha-v2-checkbox.ts +3 -3
- package/src/js/modules/captchas/recaptcha-v2-invisible.ts +2 -2
- package/src/js/modules/captchas/recaptcha-v3.ts +2 -2
- package/src/js/modules/captchas/snaptcha.ts +1 -1
- package/src/js/modules/captchas/turnstile.ts +3 -3
- package/src/js/modules/fields/address-country.ts +11 -9
- package/src/js/modules/fields/address-state.ts +94 -35
- package/src/js/modules/fields/calculations.ts +5 -3
- package/src/js/modules/fields/checkbox-radio.ts +24 -42
- package/src/js/modules/fields/combobox.ts +28 -9
- package/src/js/modules/fields/conditions/config.ts +17 -20
- package/src/js/modules/fields/conditions/effects.ts +25 -29
- package/src/js/modules/fields/conditions/evaluator.ts +21 -29
- package/src/js/modules/fields/conditions/references.ts +16 -5
- package/src/js/modules/fields/conditions/submission-context.ts +80 -0
- package/src/js/modules/fields/conditions/types.ts +3 -1
- package/src/js/modules/fields/conditions/values.ts +31 -6
- package/src/js/modules/fields/conditions.ts +65 -18
- package/src/js/modules/fields/custom-google-maps.ts +5 -3
- package/src/js/modules/fields/custom-link.ts +5 -3
- package/src/js/modules/fields/custom-maps.ts +5 -3
- package/src/js/modules/fields/date-picker.ts +40 -7
- package/src/js/modules/fields/file-upload.ts +62 -23
- package/src/js/modules/fields/hidden.ts +5 -3
- package/src/js/modules/fields/index.ts +2 -2
- package/src/js/modules/fields/password-validation.ts +5 -3
- package/src/js/modules/fields/phone-country.ts +35 -8
- package/src/js/modules/fields/repeater.ts +60 -7
- package/src/js/modules/fields/rich-text.ts +20 -4
- package/src/js/modules/fields/shared.ts +13 -0
- package/src/js/modules/fields/signature.ts +24 -4
- package/src/js/modules/fields/summary.ts +8 -20
- package/src/js/modules/fields/survey-likert.ts +5 -3
- package/src/js/modules/fields/survey-rank.ts +21 -3
- package/src/js/modules/fields/survey-rating.ts +17 -3
- package/src/js/modules/fields/table.ts +5 -3
- package/src/js/modules/fields/text-limit.ts +5 -3
- package/src/js/modules/fields/upload-manager.ts +244 -67
- package/src/js/modules/loader.ts +345 -281
- package/src/js/modules/payments/bpoint.ts +2 -2
- package/src/js/modules/payments/eway.ts +2 -2
- package/src/js/modules/payments/factories.ts +53 -52
- package/src/js/modules/payments/go-cardless.ts +1 -1
- package/src/js/modules/payments/index.ts +2 -2
- package/src/js/modules/payments/mollie.ts +1 -1
- package/src/js/modules/payments/moneris.ts +2 -2
- package/src/js/modules/payments/opayo.ts +21 -8
- package/src/js/modules/payments/paddle.ts +10 -6
- package/src/js/modules/payments/payment.ts +22 -18
- package/src/js/modules/payments/paypal.ts +1 -1
- package/src/js/modules/payments/payway.ts +2 -2
- package/src/js/modules/payments/square.ts +2 -2
- package/src/js/modules/payments/stripe.ts +5 -5
- package/src/js/modules/payments/utils.ts +14 -0
- package/src/js/modules/registry.ts +19 -11
- package/src/js/submit/pipeline.ts +10 -11
- package/src/js/theme/browser-theme-state.generated.ts +25 -0
- package/src/js/theme/theme-classes.ts +3 -3
- package/src/js/transport/forms-api.ts +66 -67
- package/src/js/utils/async.ts +34 -0
- package/src/js/utils/country-from-ip.ts +14 -9
- package/src/js/utils/csrf.ts +136 -0
- package/src/js/utils/field-references.parser.ts +13 -113
- package/src/js/utils/field-references.resolver.ts +27 -64
- package/src/js/utils/field-references.row-scope.ts +1 -1
- package/src/js/utils/field-references.types.ts +1 -0
- package/src/js/utils/http.ts +5 -5
- package/src/js/utils/request-profile.ts +10 -0
- package/src/js/utils/unload-warning.ts +12 -4
- package/src/js/validation/rules/email.ts +3 -5
- package/src/js/validation/rules/match.ts +2 -1
- package/src/js/validation/rules/minmax.ts +4 -43
- package/src/js/validation/rules/number.ts +3 -47
- package/src/js/validation/rules/pattern.ts +3 -8
- package/src/js/validation/rules/required.ts +14 -1
- package/src/js/validation/rules/shared.ts +5 -1
- package/src/js/validation/rules/url.ts +3 -10
- package/src/js/validation/skip.ts +9 -0
- package/src/js/validation/submit-readiness.ts +9 -2
- package/src/js/validation/validator.ts +49 -61
- package/dist/chunks/address-state-BwE01m2_.js +0 -344
- package/dist/chunks/calculations-Dv3hYb8_.js +0 -299
- package/dist/chunks/conditions-CPH1snCx.js +0 -424
- package/dist/chunks/country-from-ip-BwxKaBuJ.js +0 -26
- package/dist/chunks/field-references.resolver-CHwn0G0L.js +0 -145
- package/dist/chunks/friendly-captcha-v1-C_2reOXr.js +0 -31
- package/dist/chunks/google-address-BH3Zhi06.js +0 -161
- package/dist/chunks/http-D-JExro7.js +0 -27
- package/dist/chunks/opayo-CR0DtsLa.js +0 -179
- package/dist/chunks/rich-text-Bg_--4TG.js +0 -349
- package/dist/js/modules/fields/conditions/transforms.d.ts +0 -3
- package/dist/js/modules/fields/conditions/transforms.d.ts.map +0 -1
- package/src/js/modules/fields/conditions/transforms.ts +0 -206
- package/src/js/modules/payments/stub-payment-module.ts +0 -87
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./debug-BV0DvdHx.js";
|
|
2
2
|
import { i as t, r as n, t as r } from "./constants-DVcJAvc5.js";
|
|
3
3
|
//#region src/js/modules/address/host.ts
|
|
4
|
-
var i = new Set(["handle"]);
|
|
4
|
+
var i = /* @__PURE__ */ new Set(["handle"]);
|
|
5
5
|
function a(e, t) {
|
|
6
6
|
return (typeof t.handle == "string" && t.handle.trim() !== "" ? t.handle.trim() : "") || e;
|
|
7
7
|
}
|
|
@@ -57,19 +57,25 @@ function u(e) {
|
|
|
57
57
|
}
|
|
58
58
|
function d(e) {
|
|
59
59
|
return {
|
|
60
|
-
|
|
60
|
+
moduleId: e.moduleId,
|
|
61
|
+
version: 2,
|
|
62
|
+
surfaces: [
|
|
63
|
+
"server-rendered",
|
|
64
|
+
"client-rendered",
|
|
65
|
+
"cp-edit"
|
|
66
|
+
],
|
|
61
67
|
kind: "address",
|
|
62
68
|
match: (e) => !!e.target.querySelector("[data-formie-address-autocomplete-input]"),
|
|
63
69
|
setup: async (t) => {
|
|
64
|
-
let n = o(e.
|
|
65
|
-
l.log("Setup module.", { moduleId: e.
|
|
70
|
+
let n = o(e.moduleId.split(":")[1], t.options || {}), r = c(t);
|
|
71
|
+
l.log("Setup module.", { moduleId: e.moduleId });
|
|
66
72
|
let i = {
|
|
67
73
|
...t,
|
|
68
74
|
options: n,
|
|
69
75
|
services: r
|
|
70
76
|
}, a = [], s = null, d = null;
|
|
71
|
-
if (!r.input.getAutocomplete()) return console.warn(`[formie] Address module "${e.
|
|
72
|
-
let f = async () => (s ||= (l.log("Loading provider API.", { moduleId: e.
|
|
77
|
+
if (!r.input.getAutocomplete()) return console.warn(`[formie] Address module "${e.moduleId}" skipped: no autocomplete input found in target. Ensure the Address field has the Auto-Complete subfield enabled.`), l.warn("Autocomplete input missing; skipping module.", { moduleId: e.moduleId }), { destroy: () => {} };
|
|
78
|
+
let f = async () => (s ||= (l.log("Loading provider API.", { moduleId: e.moduleId }), e.load(i)), s), p = async () => {
|
|
73
79
|
if (d || !u(t.target)) return;
|
|
74
80
|
let i = await f();
|
|
75
81
|
d = await e.mount({
|
|
@@ -78,7 +84,7 @@ function d(e) {
|
|
|
78
84
|
services: r,
|
|
79
85
|
options: n,
|
|
80
86
|
provider: n.provider
|
|
81
|
-
}), l.log("Widget mounted.", { moduleId: e.
|
|
87
|
+
}), l.log("Widget mounted.", { moduleId: e.moduleId });
|
|
82
88
|
};
|
|
83
89
|
u(t.target) && await p(), ["formie:page:navigate:after", "formie:submit:result"].forEach((e) => {
|
|
84
90
|
let n = () => {
|
|
@@ -103,7 +109,7 @@ function d(e) {
|
|
|
103
109
|
})();
|
|
104
110
|
});
|
|
105
111
|
return m && a.push(m), { destroy: async () => {
|
|
106
|
-
if (l.log("Destroying module.", { moduleId: e.
|
|
112
|
+
if (l.log("Destroying module.", { moduleId: e.moduleId }), a.forEach((e) => e()), d && e.unmount) {
|
|
107
113
|
let i = await f();
|
|
108
114
|
await e.unmount({
|
|
109
115
|
api: i,
|
|
@@ -112,7 +118,7 @@ function d(e) {
|
|
|
112
118
|
services: r,
|
|
113
119
|
options: n,
|
|
114
120
|
provider: n.provider
|
|
115
|
-
}), l.log("Widget unmounted.", { moduleId: e.
|
|
121
|
+
}), l.log("Widget unmounted.", { moduleId: e.moduleId });
|
|
116
122
|
}
|
|
117
123
|
} };
|
|
118
124
|
}
|
|
@@ -21,5 +21,22 @@ function n(e, t) {
|
|
|
21
21
|
}, Math.max(t, 0));
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
+
function r(e, t = document, n = 1e4) {
|
|
25
|
+
return new Promise((r, i) => {
|
|
26
|
+
if (!t.querySelector(e)) {
|
|
27
|
+
r();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
let a = null, o = new MutationObserver(() => {
|
|
31
|
+
t.querySelector(e) || (o.disconnect(), a !== null && window.clearTimeout(a), r());
|
|
32
|
+
});
|
|
33
|
+
o.observe(t, {
|
|
34
|
+
childList: !0,
|
|
35
|
+
subtree: !0
|
|
36
|
+
}), a = window.setTimeout(() => {
|
|
37
|
+
o.disconnect(), i(/* @__PURE__ */ Error(`Timed out waiting for "${e}" to be removed.`));
|
|
38
|
+
}, Math.max(n, 0));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
24
41
|
//#endregion
|
|
25
|
-
export { e as n, t as r, n as t };
|
|
42
|
+
export { r as i, e as n, t as r, n as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
1
|
+
import { t as e } from "./api-Dxl_CKw-.js";
|
|
2
2
|
//#region src/js/modules/payments/bpoint.ts
|
|
3
3
|
var t = e({
|
|
4
|
-
|
|
4
|
+
moduleId: "formie:bpoint",
|
|
5
5
|
defaultRequiredInputSuffixes: ["bpointToken"],
|
|
6
6
|
load: async () => null,
|
|
7
|
-
|
|
7
|
+
onBeforePayment: async ({ field: e, services: t }) => {
|
|
8
8
|
if ((e.querySelector("input[name$=\"[bpointToken]\"]")?.value || "").trim() !== "") return !0;
|
|
9
9
|
let n = e.querySelector("[data-bpoint-card=\"cardholder-name\"]")?.value?.trim() || "", r = e.querySelector("[data-bpoint-card=\"card-number\"]")?.value?.replace(/\s+/g, "") || "", i = e.querySelector("[data-bpoint-card=\"expiry-date\"]")?.value || "", a = e.querySelector("[data-bpoint-card=\"security-code\"]")?.value?.trim() || "", o = (i.match(/\d/g) || []).join("").slice(0, 4);
|
|
10
10
|
if (!r || o.length !== 4 || !a) return t.addError("Please provide valid card details to continue."), !1;
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { h as e, n as t, o as n, r, s as i } from "./dist-ZLeW0zZ3.js";
|
|
2
|
+
import { t as a } from "./debug-BV0DvdHx.js";
|
|
3
|
+
import { r as o, t as s } from "./field-references.keys-58ZSTrCW.js";
|
|
4
|
+
import { n as c, r as l } from "./field-references.resolver-Ca8MguFv.js";
|
|
5
|
+
import { i as u, n as d } from "./shared-OKhSay59.js";
|
|
6
|
+
//#region src/js/utils/field-references.row-scope.ts
|
|
7
|
+
var f = /* @__PURE__ */ new Set([
|
|
8
|
+
"first",
|
|
9
|
+
"last",
|
|
10
|
+
"index",
|
|
11
|
+
"all",
|
|
12
|
+
"count",
|
|
13
|
+
"rows"
|
|
14
|
+
]);
|
|
15
|
+
function p(e) {
|
|
16
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17
|
+
}
|
|
18
|
+
function m(e, t) {
|
|
19
|
+
let n = String(e || "").trim().toLowerCase();
|
|
20
|
+
if (!n || t <= 0) return [];
|
|
21
|
+
if (n === "even") {
|
|
22
|
+
let e = [];
|
|
23
|
+
for (let n = 1; n <= t; n++) n % 2 == 0 && e.push(n - 1);
|
|
24
|
+
return e;
|
|
25
|
+
}
|
|
26
|
+
if (n === "odd") {
|
|
27
|
+
let e = [];
|
|
28
|
+
for (let n = 1; n <= t; n++) n % 2 == 1 && e.push(n - 1);
|
|
29
|
+
return e;
|
|
30
|
+
}
|
|
31
|
+
let r = n.match(/^every:(\d+)$/);
|
|
32
|
+
if (r) {
|
|
33
|
+
let e = Math.max(1, Number.parseInt(r[1] || "1", 10)), n = [];
|
|
34
|
+
for (let r = 1; r <= t; r += e) n.push(r - 1);
|
|
35
|
+
return n;
|
|
36
|
+
}
|
|
37
|
+
let i = [];
|
|
38
|
+
return n.split(/\s*,\s*/).forEach((e) => {
|
|
39
|
+
let n = e.trim();
|
|
40
|
+
if (!n) return;
|
|
41
|
+
let r = n.match(/^(\d+)\s*-\s*(\d+)$/);
|
|
42
|
+
if (r) {
|
|
43
|
+
let e = Number.parseInt(r[1] || "0", 10), n = Number.parseInt(r[2] || "0", 10);
|
|
44
|
+
e > n && ([e, n] = [n, e]);
|
|
45
|
+
for (let r = Math.max(1, e); r <= Math.min(t, n); r++) r >= 1 && r <= t && i.push(r - 1);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let a = Number.parseInt(n, 10);
|
|
49
|
+
Number.isFinite(a) && a >= 1 && a <= t && i.push(a - 1);
|
|
50
|
+
}), [...new Set(i)].sort((e, t) => e - t);
|
|
51
|
+
}
|
|
52
|
+
function h(e) {
|
|
53
|
+
let t = o(e), n = t.split(".").filter(Boolean);
|
|
54
|
+
return n.length < 2 ? {
|
|
55
|
+
fieldKey: t,
|
|
56
|
+
columnKey: n[n.length - 1] || ""
|
|
57
|
+
} : n.length >= 3 && /^\d+$/.test(n[1] || "") ? {
|
|
58
|
+
fieldKey: n[0] || "",
|
|
59
|
+
columnKey: n.slice(2).join(".")
|
|
60
|
+
} : {
|
|
61
|
+
fieldKey: n[0] || "",
|
|
62
|
+
columnKey: n.slice(1).join(".")
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function g(e, t, n) {
|
|
66
|
+
let r = RegExp(`^${p(e)}\\.(\\d+)\\.${p(t)}$`);
|
|
67
|
+
return [...n.keys()].filter((e) => r.test(e)).sort((e, t) => Number.parseInt(e.split(".")[1] || "0", 10) - Number.parseInt(t.split(".")[1] || "0", 10));
|
|
68
|
+
}
|
|
69
|
+
function _(e, t) {
|
|
70
|
+
return c(e, t).value;
|
|
71
|
+
}
|
|
72
|
+
function v(e, t, n) {
|
|
73
|
+
let r = /* @__PURE__ */ new Set(), { fieldKey: i, columnKey: a } = h(e), o = String(t.scope || "").trim().toLowerCase();
|
|
74
|
+
if (!i || !a || !f.has(o)) {
|
|
75
|
+
let t = s(e);
|
|
76
|
+
return t && (r.add(t), r.add(`${t}[]`)), r;
|
|
77
|
+
}
|
|
78
|
+
return g(i, a, n).forEach((e) => {
|
|
79
|
+
let t = n.get(e);
|
|
80
|
+
if (t?.names?.length) {
|
|
81
|
+
t.names.forEach((e) => {
|
|
82
|
+
r.add(e);
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
let i = s(e);
|
|
87
|
+
i && (r.add(i), r.add(`${i}[]`));
|
|
88
|
+
}), r;
|
|
89
|
+
}
|
|
90
|
+
function y(e, t, n) {
|
|
91
|
+
let r = String(t.scope || "").trim().toLowerCase();
|
|
92
|
+
if (!r || !f.has(r)) return c(e, n);
|
|
93
|
+
let { fieldKey: i, columnKey: a } = h(e);
|
|
94
|
+
if (!i || !a) return c(e, n);
|
|
95
|
+
let o = g(i, a, n), s = o.map((e) => _(e, n));
|
|
96
|
+
if (r === "count") return {
|
|
97
|
+
key: `${i}.${a}`,
|
|
98
|
+
value: String(o.length),
|
|
99
|
+
found: !0
|
|
100
|
+
};
|
|
101
|
+
if (r === "first") return {
|
|
102
|
+
key: o[0] || `${i}.0.${a}`,
|
|
103
|
+
value: s[0] ?? "",
|
|
104
|
+
found: o.length > 0
|
|
105
|
+
};
|
|
106
|
+
if (r === "last") return {
|
|
107
|
+
key: o[o.length - 1] || `${i}.0.${a}`,
|
|
108
|
+
value: s[s.length - 1] ?? "",
|
|
109
|
+
found: o.length > 0
|
|
110
|
+
};
|
|
111
|
+
if (r === "index") {
|
|
112
|
+
let e = `${i}.${Number.parseInt(String(t.index ?? "0"), 10)}.${a}`;
|
|
113
|
+
return c(e, n);
|
|
114
|
+
}
|
|
115
|
+
if (r === "all") {
|
|
116
|
+
let e = s.flatMap((e) => Array.isArray(e) ? e : e === "" ? [] : [e]);
|
|
117
|
+
return {
|
|
118
|
+
key: `${i}.${a}`,
|
|
119
|
+
value: e,
|
|
120
|
+
found: e.length > 0
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (r === "rows") {
|
|
124
|
+
let e = m(String(t.rows || ""), o.length);
|
|
125
|
+
if (e.length === 0) return {
|
|
126
|
+
key: `${i}.${a}`,
|
|
127
|
+
value: "",
|
|
128
|
+
found: !1
|
|
129
|
+
};
|
|
130
|
+
if (e.length === 1) return {
|
|
131
|
+
key: o[e[0]] || `${i}.${e[0]}.${a}`,
|
|
132
|
+
value: s[e[0]] ?? "",
|
|
133
|
+
found: !0
|
|
134
|
+
};
|
|
135
|
+
let n = e.flatMap((e) => {
|
|
136
|
+
let t = s[e];
|
|
137
|
+
return Array.isArray(t) ? t : t === "" ? [] : [t];
|
|
138
|
+
});
|
|
139
|
+
return {
|
|
140
|
+
key: `${i}.${a}`,
|
|
141
|
+
value: n,
|
|
142
|
+
found: n.length > 0
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return c(e, n);
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/js/modules/fields/calculations.ts
|
|
149
|
+
var b = "input[data-formie-calculation-input]";
|
|
150
|
+
function x(e) {
|
|
151
|
+
let t = e;
|
|
152
|
+
return {
|
|
153
|
+
scope: t.scope,
|
|
154
|
+
index: t.index,
|
|
155
|
+
rows: t.rows,
|
|
156
|
+
fieldKind: t.fieldKind
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
var S = "calculations", C = a("fields", "calculations");
|
|
160
|
+
function w(e, t, n) {
|
|
161
|
+
let a = l(e), o = {};
|
|
162
|
+
return t.forEach(([e, t]) => {
|
|
163
|
+
let n = x(t);
|
|
164
|
+
if (String(n.scope || "").trim()) {
|
|
165
|
+
let i = y(t.sourceKey || "", n, a);
|
|
166
|
+
o[e] = r(t, i.value);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
let i = c(t.sourceKey || "", a);
|
|
170
|
+
o[e] = r(t, i.value);
|
|
171
|
+
}), i(o, n.formatting);
|
|
172
|
+
}
|
|
173
|
+
function T(e, t) {
|
|
174
|
+
let n = l(e), r = /* @__PURE__ */ new Set();
|
|
175
|
+
return t.forEach(([, e]) => {
|
|
176
|
+
let t = x(e);
|
|
177
|
+
if (String(t.scope || "").trim()) {
|
|
178
|
+
v(e.sourceKey || "", t, n).forEach((e) => {
|
|
179
|
+
r.add(e);
|
|
180
|
+
});
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
let i = o(e.sourceKey || ""), a = n.get(i);
|
|
184
|
+
if (a?.names?.length) {
|
|
185
|
+
a.names.forEach((e) => {
|
|
186
|
+
r.add(e);
|
|
187
|
+
});
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
let c = s(i);
|
|
191
|
+
c && (r.add(c), r.add(`${c}[]`));
|
|
192
|
+
}), r;
|
|
193
|
+
}
|
|
194
|
+
function E(r, i, a, o) {
|
|
195
|
+
let s = t(o), c = n(o), l = /* @__PURE__ */ new Map(), u = null, f = !1, p = !1, m = !1, h = () => {
|
|
196
|
+
l.forEach((e, t) => {
|
|
197
|
+
e.forEach((e, n) => {
|
|
198
|
+
t.removeEventListener(n, e);
|
|
199
|
+
});
|
|
200
|
+
}), l.clear();
|
|
201
|
+
}, g = (e) => {
|
|
202
|
+
e && !f && queueMicrotask(() => {
|
|
203
|
+
f || (a.dispatchEvent(new Event("input", { bubbles: !0 })), a.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
204
|
+
});
|
|
205
|
+
}, _ = (t = !1) => {
|
|
206
|
+
let n = w(r, c, o);
|
|
207
|
+
C.log("Evaluate requested.", {
|
|
208
|
+
fieldHandle: i.getAttribute("data-formie-field-handle") || null,
|
|
209
|
+
isInit: t
|
|
210
|
+
});
|
|
211
|
+
let l = {
|
|
212
|
+
calculations: a,
|
|
213
|
+
init: t,
|
|
214
|
+
formula: s,
|
|
215
|
+
variables: n
|
|
216
|
+
};
|
|
217
|
+
if (d(i, S, "before-evaluate", l), !l.formula) {
|
|
218
|
+
let e = a.value !== "";
|
|
219
|
+
a.value = "", g(e);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
try {
|
|
223
|
+
let n = e(l.formula, l.variables, o), r = {
|
|
224
|
+
calculations: a,
|
|
225
|
+
init: t,
|
|
226
|
+
formula: l.formula,
|
|
227
|
+
variables: l.variables,
|
|
228
|
+
result: n
|
|
229
|
+
};
|
|
230
|
+
d(i, S, "after-evaluate", r);
|
|
231
|
+
let s = typeof r.result == "string" || typeof r.result == "number" ? String(r.result) : "", c = a.value !== s;
|
|
232
|
+
a.value = s, C.log("Evaluate complete.", {
|
|
233
|
+
fieldHandle: i.getAttribute("data-formie-field-handle") || null,
|
|
234
|
+
valueChanged: c,
|
|
235
|
+
nextValue: s
|
|
236
|
+
}), g(c);
|
|
237
|
+
} catch (e) {
|
|
238
|
+
let t = a.value !== "";
|
|
239
|
+
console.error("[formie] Failed to evaluate calculation.", e), C.warn("Evaluate failed.", {
|
|
240
|
+
fieldHandle: i.getAttribute("data-formie-field-handle") || null,
|
|
241
|
+
error: e instanceof Error ? e.message : e
|
|
242
|
+
}), a.value = "", g(t);
|
|
243
|
+
}
|
|
244
|
+
}, v = (e = !1) => {
|
|
245
|
+
p || f || (p = !0, queueMicrotask(() => {
|
|
246
|
+
p = !1, _(e);
|
|
247
|
+
}));
|
|
248
|
+
}, y = () => {
|
|
249
|
+
h();
|
|
250
|
+
let e = T(r, c);
|
|
251
|
+
if (C.log("Binding variable watchers.", {
|
|
252
|
+
fieldHandle: i.getAttribute("data-formie-field-handle") || null,
|
|
253
|
+
watchCount: e.size
|
|
254
|
+
}), !e.size) return;
|
|
255
|
+
let t = (t) => {
|
|
256
|
+
let n = t.target?.name || "";
|
|
257
|
+
n && e.has(n) && (C.log("Source change detected.", {
|
|
258
|
+
fieldHandle: i.getAttribute("data-formie-field-handle") || null,
|
|
259
|
+
sourceName: n,
|
|
260
|
+
eventType: t.type
|
|
261
|
+
}), v(!1));
|
|
262
|
+
};
|
|
263
|
+
["input", "change"].forEach((e) => {
|
|
264
|
+
r.addEventListener(e, t);
|
|
265
|
+
let n = l.get(r) || /* @__PURE__ */ new Map();
|
|
266
|
+
n.set(e, t), l.set(r, n);
|
|
267
|
+
});
|
|
268
|
+
}, b = () => {
|
|
269
|
+
m || f || (m = !0, queueMicrotask(() => {
|
|
270
|
+
m = !1, y(), v(!1);
|
|
271
|
+
}));
|
|
272
|
+
};
|
|
273
|
+
return y(), u = new MutationObserver(() => {
|
|
274
|
+
b();
|
|
275
|
+
}), u.observe(r, {
|
|
276
|
+
childList: !0,
|
|
277
|
+
subtree: !0
|
|
278
|
+
}), _(!0), () => {
|
|
279
|
+
f = !0, u?.disconnect(), h();
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
var D = {
|
|
283
|
+
moduleId: `formie:${S}`,
|
|
284
|
+
version: 2,
|
|
285
|
+
surfaces: [
|
|
286
|
+
"server-rendered",
|
|
287
|
+
"client-rendered",
|
|
288
|
+
"cp-edit"
|
|
289
|
+
],
|
|
290
|
+
kind: "field",
|
|
291
|
+
match: (e) => !!e.target.querySelector(b),
|
|
292
|
+
setup: async (e) => {
|
|
293
|
+
let t = e.options || {}, n = u(e);
|
|
294
|
+
C.log("Module setup.", {
|
|
295
|
+
fieldCount: n.length,
|
|
296
|
+
formatting: t.formatting || null
|
|
297
|
+
});
|
|
298
|
+
let r = n.map((n) => {
|
|
299
|
+
let r = n.querySelector(b);
|
|
300
|
+
return r instanceof HTMLInputElement ? E(e.root, n, r, t) : () => {};
|
|
301
|
+
});
|
|
302
|
+
return await e.emit("formie:module:calculations:init", { count: r.length }), { destroy: () => {
|
|
303
|
+
C.log("Module destroy.", { fieldCount: r.length }), r.forEach((e) => {
|
|
304
|
+
e();
|
|
305
|
+
}), e.emit("formie:module:calculations:destroy", {});
|
|
306
|
+
} };
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
//#endregion
|
|
310
|
+
export { D as calculationsModule };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { a as e, t } from "./api-
|
|
2
|
-
import { r as n } from "./scripts-
|
|
1
|
+
import { a as e, t } from "./api-BK9b340y.js";
|
|
2
|
+
import { r as n } from "./scripts-DrccjrFv.js";
|
|
3
3
|
//#region src/js/modules/captchas/captcha-eu.ts
|
|
4
4
|
async function r(t) {
|
|
5
|
+
let r = String(t.endPoint || "https://www.captcha.eu").trim().replace(/\/+$/, "");
|
|
5
6
|
return n("KROT", {
|
|
6
7
|
id: "FORMIE_CAPTCHA_EU_SCRIPT",
|
|
7
|
-
src: `${
|
|
8
|
+
src: `${r}/sdk.js`,
|
|
8
9
|
async: !0,
|
|
9
10
|
defer: !0,
|
|
10
11
|
timeoutMs: e
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
var i = t({
|
|
14
|
-
|
|
15
|
+
moduleId: "formie:captcha-eu",
|
|
15
16
|
defaultPlaceholderSelector: "[data-captcha-eu-placeholder]",
|
|
16
17
|
defaultTokenFieldNames: ["captcha-eu-token"],
|
|
17
18
|
load: ({ options: e }) => r(e.provider),
|
|
@@ -20,7 +21,7 @@ var i = t({
|
|
|
20
21
|
}, t), e.on("CPT_EXPIRED", () => {
|
|
21
22
|
r.tokens.clear(), r.errors.clear();
|
|
22
23
|
}, t), t),
|
|
23
|
-
|
|
24
|
+
challenge: async ({ placeholder: e, services: t, stageCtx: n }) => {
|
|
24
25
|
if (!await t.tokens.wait()) {
|
|
25
26
|
let r = t.errors.getDefaultMessage();
|
|
26
27
|
t.errors.show(r, e), n.abort(r);
|