@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
|
@@ -21,7 +21,7 @@ import strikethroughIcon from '#icons/rich-text/strikethrough.svg?raw';
|
|
|
21
21
|
import ulistIcon from '#icons/rich-text/ulist.svg?raw';
|
|
22
22
|
import underlineIcon from '#icons/rich-text/underline.svg?raw';
|
|
23
23
|
|
|
24
|
-
import type {
|
|
24
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
25
25
|
import { dispatchFieldEvent, getModuleFieldContainers } from '#modules/fields/shared';
|
|
26
26
|
import { ensureModuleStyles } from '#modules/styles';
|
|
27
27
|
|
|
@@ -141,7 +141,9 @@ function initRichTextField(container: HTMLElement, input: RichTextInput, options
|
|
|
141
141
|
actions: getActions(options.buttons),
|
|
142
142
|
onChange: (html: string) => {
|
|
143
143
|
const emptyParagraph = '<p><br></p>';
|
|
144
|
-
|
|
144
|
+
// Treat Pell's empty document as blank so required validation matches
|
|
145
|
+
// a never-touched textarea (and so clearing the editor can fail required).
|
|
146
|
+
input.value = (!html || html === emptyParagraph) ? '' : html;
|
|
145
147
|
// Bubble both generic input and a namespaced rich-text change hook.
|
|
146
148
|
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
147
149
|
dispatchFieldEvent(input, MODULE_ID, 'populate', {
|
|
@@ -166,6 +168,17 @@ function initRichTextField(container: HTMLElement, input: RichTextInput, options
|
|
|
166
168
|
input.richText = editor;
|
|
167
169
|
editor.content.innerHTML = input.value || '';
|
|
168
170
|
|
|
171
|
+
const form = input.form;
|
|
172
|
+
const onReset = (event: Event) => {
|
|
173
|
+
// Wait for the textarea to regain its default value before updating Pell.
|
|
174
|
+
queueMicrotask(() => {
|
|
175
|
+
if (!event.defaultPrevented) {
|
|
176
|
+
editor.content.innerHTML = input.value || '';
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
form?.addEventListener('reset', onReset);
|
|
181
|
+
|
|
169
182
|
if (input.placeholder) {
|
|
170
183
|
editor.content.setAttribute('data-placeholder', input.placeholder);
|
|
171
184
|
}
|
|
@@ -175,13 +188,16 @@ function initRichTextField(container: HTMLElement, input: RichTextInput, options
|
|
|
175
188
|
});
|
|
176
189
|
|
|
177
190
|
return () => {
|
|
191
|
+
form?.removeEventListener('reset', onReset);
|
|
178
192
|
container.innerHTML = '';
|
|
179
193
|
delete input.richText;
|
|
180
194
|
};
|
|
181
195
|
}
|
|
182
196
|
|
|
183
|
-
export const richTextModule:
|
|
184
|
-
|
|
197
|
+
export const richTextModule: BrowserModuleDefinition = {
|
|
198
|
+
moduleId: `formie:${MODULE_ID}`,
|
|
199
|
+
version: 2,
|
|
200
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
185
201
|
kind: 'field',
|
|
186
202
|
match: (ctx) => {
|
|
187
203
|
return ctx.target instanceof HTMLElement && hasRichTextField(ctx.target);
|
|
@@ -17,6 +17,19 @@ const fallbackCssEscape = (value: string): string => {
|
|
|
17
17
|
};
|
|
18
18
|
const validatorRegistrations = new WeakMap<HTMLFormElement, Map<string, number>>();
|
|
19
19
|
|
|
20
|
+
// Conditions clear ordinary controls directly. Enhanced controls also need to
|
|
21
|
+
// clear their hidden transport values before their modules are unmounted.
|
|
22
|
+
export function bindConditionalClear(input: HTMLElement, clear: () => void): () => void {
|
|
23
|
+
const root = input.getRootNode();
|
|
24
|
+
const handler = (event: Event) => {
|
|
25
|
+
if (event.target instanceof Element && event.target.contains(input)) {
|
|
26
|
+
clear();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
root.addEventListener('formie:field:clear', handler);
|
|
30
|
+
return () => root.removeEventListener('formie:field:clear', handler);
|
|
31
|
+
}
|
|
32
|
+
|
|
20
33
|
export function escapeSelectorValue(value: string): string {
|
|
21
34
|
if (typeof window.CSS?.escape === 'function') {
|
|
22
35
|
return window.CSS.escape(value);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import SignaturePad from 'signature_pad';
|
|
2
2
|
import signatureCss from '#theme-css/fields/_signature.css?inline';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
5
|
-
import { dispatchFieldEvent, getModuleFieldContainers } from '#modules/fields/shared';
|
|
4
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
5
|
+
import { bindConditionalClear, dispatchFieldEvent, getModuleFieldContainers } from '#modules/fields/shared';
|
|
6
6
|
import { ensureModuleStyles } from '#modules/styles';
|
|
7
7
|
|
|
8
8
|
const INPUT_SELECTOR = 'input[data-formie-signature-input]';
|
|
@@ -165,6 +165,8 @@ function initSignatureField(
|
|
|
165
165
|
clearButton: HTMLElement | null,
|
|
166
166
|
options: SignatureOptions,
|
|
167
167
|
): () => void {
|
|
168
|
+
const initialValue = input.value;
|
|
169
|
+
const form = input.form;
|
|
168
170
|
const messages = getSignatureMessages(field);
|
|
169
171
|
|
|
170
172
|
if (!supportsCanvas()) {
|
|
@@ -349,6 +351,20 @@ function initSignatureField(
|
|
|
349
351
|
syncInputValue('');
|
|
350
352
|
};
|
|
351
353
|
|
|
354
|
+
const onReset = (event: Event) => {
|
|
355
|
+
// Hidden inputs do not restore an earlier value through native reset.
|
|
356
|
+
// Reset both the submitted signature and the pad to their initial state.
|
|
357
|
+
queueMicrotask(() => {
|
|
358
|
+
if (!event.defaultPrevented) {
|
|
359
|
+
signaturePad.clear();
|
|
360
|
+
syncInputValue(initialValue);
|
|
361
|
+
void restoreSignatureValue(signaturePad, canvas, initialValue);
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
form?.addEventListener('reset', onReset);
|
|
366
|
+
|
|
367
|
+
const unbindConditionalClear = bindConditionalClear(input, clearSignature);
|
|
352
368
|
signaturePad.addEventListener('endStroke', syncValue);
|
|
353
369
|
window.addEventListener('resize', resizeHandler);
|
|
354
370
|
root.addEventListener('formie:page:navigate:after', pageNavigateHandler as EventListener);
|
|
@@ -365,6 +381,8 @@ function initSignatureField(
|
|
|
365
381
|
|
|
366
382
|
return () => {
|
|
367
383
|
clearSizeRetry();
|
|
384
|
+
unbindConditionalClear();
|
|
385
|
+
form?.removeEventListener('reset', onReset);
|
|
368
386
|
signaturePad.removeEventListener('endStroke', syncValue);
|
|
369
387
|
window.removeEventListener('resize', resizeHandler);
|
|
370
388
|
root.removeEventListener('formie:page:navigate:after', pageNavigateHandler as EventListener);
|
|
@@ -378,8 +396,10 @@ function initSignatureField(
|
|
|
378
396
|
};
|
|
379
397
|
}
|
|
380
398
|
|
|
381
|
-
export const signatureModule:
|
|
382
|
-
|
|
399
|
+
export const signatureModule: BrowserModuleDefinition = {
|
|
400
|
+
moduleId: `formie:${MODULE_ID}`,
|
|
401
|
+
version: 2,
|
|
402
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
383
403
|
kind: 'field',
|
|
384
404
|
match: (ctx) => {
|
|
385
405
|
return !!ctx.target.querySelector(CANVAS_SELECTOR);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import summaryCss from '#theme-css/fields/_summary.css?inline';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
4
4
|
import { dispatchFieldEvent, getModuleFieldContainers } from '#modules/fields/shared';
|
|
5
5
|
import { ensureModuleStyles } from '#modules/styles';
|
|
6
6
|
import { toggleThemeClasses } from '#theme/theme-classes';
|
|
@@ -11,8 +11,6 @@ import { requestText } from '#utils/http';
|
|
|
11
11
|
const BLOCKS_SELECTOR = '[data-formie-summary-blocks]';
|
|
12
12
|
const CONTAINER_SELECTOR = '[data-formie-summary-container]';
|
|
13
13
|
const SUMMARY_ACTION = 'formie/fields/get-summary-html';
|
|
14
|
-
const THEME_CONFIG_ATTR = 'data-formie-theme-config';
|
|
15
|
-
const FRONTEND_THEME_ATTR = 'data-formie-frontend-theme';
|
|
16
14
|
const MODULE_ID = 'summary';
|
|
17
15
|
const debug = createDebug('fields', 'summary');
|
|
18
16
|
|
|
@@ -20,8 +18,6 @@ ensureModuleStyles(MODULE_ID, [summaryCss]);
|
|
|
20
18
|
|
|
21
19
|
type SummaryRequestState = {
|
|
22
20
|
accessToken: string | null;
|
|
23
|
-
themeConfig: string | null;
|
|
24
|
-
frontendTheme: string | null;
|
|
25
21
|
};
|
|
26
22
|
|
|
27
23
|
function getSummaryRequestUrl(): string {
|
|
@@ -31,14 +27,12 @@ function getSummaryRequestUrl(): string {
|
|
|
31
27
|
return url.toString();
|
|
32
28
|
}
|
|
33
29
|
|
|
34
|
-
function getSummaryRequestState(field: HTMLElement
|
|
30
|
+
function getSummaryRequestState(field: HTMLElement): SummaryRequestState {
|
|
35
31
|
const summaryTokenInput = field.querySelector('[data-formie-summary-token]') as HTMLInputElement | null;
|
|
36
32
|
const accessToken = summaryTokenInput?.value?.trim() || null;
|
|
37
33
|
|
|
38
34
|
return {
|
|
39
35
|
accessToken,
|
|
40
|
-
themeConfig: form.getAttribute(THEME_CONFIG_ATTR)?.trim() || null,
|
|
41
|
-
frontendTheme: form.getAttribute(FRONTEND_THEME_ATTR)?.trim() || null,
|
|
42
36
|
};
|
|
43
37
|
}
|
|
44
38
|
|
|
@@ -53,14 +47,6 @@ async function requestSummaryHtml(form: HTMLFormElement, state: SummaryRequestSt
|
|
|
53
47
|
formData.set('action', SUMMARY_ACTION);
|
|
54
48
|
formData.set('accessToken', state.accessToken);
|
|
55
49
|
|
|
56
|
-
if (state.themeConfig) {
|
|
57
|
-
formData.set('themeConfig', state.themeConfig);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (state.frontendTheme) {
|
|
61
|
-
formData.set('frontendTheme', state.frontendTheme);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
50
|
return requestText(getSummaryRequestUrl(), {
|
|
65
51
|
method: 'POST',
|
|
66
52
|
body: formData,
|
|
@@ -115,7 +101,7 @@ function initSummaryField(field: HTMLElement, root: Element): () => void {
|
|
|
115
101
|
toggleThemeClasses(blocks, form, 'loading', false);
|
|
116
102
|
};
|
|
117
103
|
|
|
118
|
-
const initialState = getSummaryRequestState(field
|
|
104
|
+
const initialState = getSummaryRequestState(field);
|
|
119
105
|
setLoadingState(!!initialState.accessToken);
|
|
120
106
|
|
|
121
107
|
const queueFetch = (): void => {
|
|
@@ -128,7 +114,7 @@ function initSummaryField(field: HTMLElement, root: Element): () => void {
|
|
|
128
114
|
};
|
|
129
115
|
|
|
130
116
|
const fetchSummary = debounce(async() => {
|
|
131
|
-
const state = getSummaryRequestState(field
|
|
117
|
+
const state = getSummaryRequestState(field);
|
|
132
118
|
|
|
133
119
|
if (!getBlocks() || !state.accessToken) {
|
|
134
120
|
debug.warn('Missing state for fetch.', state);
|
|
@@ -256,8 +242,10 @@ function initSummaryField(field: HTMLElement, root: Element): () => void {
|
|
|
256
242
|
};
|
|
257
243
|
}
|
|
258
244
|
|
|
259
|
-
export const summaryModule:
|
|
260
|
-
|
|
245
|
+
export const summaryModule: BrowserModuleDefinition = {
|
|
246
|
+
moduleId: `formie:${MODULE_ID}`,
|
|
247
|
+
version: 2,
|
|
248
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
261
249
|
kind: 'field',
|
|
262
250
|
match: (ctx) => {
|
|
263
251
|
return !!ctx.target.querySelector(BLOCKS_SELECTOR);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import surveyPresentationsCss from '#theme-css/fields/_survey-presentations.css?inline';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
4
4
|
import { ensureModuleStyles } from '#modules/styles';
|
|
5
5
|
import { createDebug } from '#utils/debug';
|
|
6
6
|
|
|
@@ -10,8 +10,10 @@ const debug = createDebug('fields', 'survey-likert');
|
|
|
10
10
|
|
|
11
11
|
ensureModuleStyles(MODULE_ID, [surveyPresentationsCss]);
|
|
12
12
|
|
|
13
|
-
export const surveyLikertModule:
|
|
14
|
-
|
|
13
|
+
export const surveyLikertModule: BrowserModuleDefinition = {
|
|
14
|
+
moduleId: `formie:${MODULE_ID}`,
|
|
15
|
+
version: 2,
|
|
16
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
15
17
|
kind: 'field',
|
|
16
18
|
match: (ctx) => {
|
|
17
19
|
return ctx.target instanceof HTMLElement && (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import surveyPresentationsCss from '#theme-css/fields/_survey-presentations.css?inline';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
4
4
|
import { dispatchFieldEvent } from '#modules/fields/shared';
|
|
5
5
|
import { ensureModuleStyles } from '#modules/styles';
|
|
6
6
|
import { createDebug } from '#utils/debug';
|
|
@@ -183,6 +183,8 @@ function bindRankField(field: HTMLElement): () => void {
|
|
|
183
183
|
return () => {};
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
const initialItems = getRankItems(list);
|
|
187
|
+
const form = field.closest('form');
|
|
186
188
|
let draggedItem: HTMLElement | null = null;
|
|
187
189
|
let placeholder: HTMLElement | null = null;
|
|
188
190
|
let ghostStyleSnapshot: GhostStyleSnapshot | null = null;
|
|
@@ -325,9 +327,23 @@ function bindRankField(field: HTMLElement): () => void {
|
|
|
325
327
|
});
|
|
326
328
|
});
|
|
327
329
|
|
|
330
|
+
const onReset = (event: Event) => {
|
|
331
|
+
queueMicrotask(() => {
|
|
332
|
+
if (!event.defaultPrevented) {
|
|
333
|
+
document.removeEventListener('pointermove', onPointerMove);
|
|
334
|
+
document.removeEventListener('pointerup', onPointerUp);
|
|
335
|
+
document.removeEventListener('pointercancel', onPointerUp);
|
|
336
|
+
finishDrag();
|
|
337
|
+
initialItems.forEach((item) => list.appendChild(item));
|
|
338
|
+
syncRankInputs(list);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
form?.addEventListener('reset', onReset);
|
|
328
343
|
syncRankInputs(list);
|
|
329
344
|
|
|
330
345
|
return () => {
|
|
346
|
+
form?.removeEventListener('reset', onReset);
|
|
331
347
|
document.removeEventListener('pointermove', onPointerMove);
|
|
332
348
|
document.removeEventListener('pointerup', onPointerUp);
|
|
333
349
|
document.removeEventListener('pointercancel', onPointerUp);
|
|
@@ -338,8 +354,10 @@ function bindRankField(field: HTMLElement): () => void {
|
|
|
338
354
|
};
|
|
339
355
|
}
|
|
340
356
|
|
|
341
|
-
export const surveyRankModule:
|
|
342
|
-
|
|
357
|
+
export const surveyRankModule: BrowserModuleDefinition = {
|
|
358
|
+
moduleId: `formie:${MODULE_ID}`,
|
|
359
|
+
version: 2,
|
|
360
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
343
361
|
kind: 'field',
|
|
344
362
|
match: (ctx) => {
|
|
345
363
|
return ctx.target instanceof HTMLElement && (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import surveyPresentationsCss from '#theme-css/fields/_survey-presentations.css?inline';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
4
4
|
import { dispatchFieldEvent } from '#modules/fields/shared';
|
|
5
5
|
import { ensureModuleStyles } from '#modules/styles';
|
|
6
6
|
import { createDebug } from '#utils/debug';
|
|
@@ -124,9 +124,21 @@ function bindRatingField(field: HTMLElement): () => void {
|
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
+
const form = field.closest('form');
|
|
128
|
+
const onReset = (event: Event) => {
|
|
129
|
+
queueMicrotask(() => {
|
|
130
|
+
if (!event.defaultPrevented) {
|
|
131
|
+
clearHover();
|
|
132
|
+
getRatingInputs(stars).forEach((input) => input.removeAttribute(PRESSED_WHILE_CHECKED));
|
|
133
|
+
updateRatingValue(stars);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
form?.addEventListener('reset', onReset);
|
|
127
138
|
updateRatingValue(stars);
|
|
128
139
|
|
|
129
140
|
return () => {
|
|
141
|
+
form?.removeEventListener('reset', onReset);
|
|
130
142
|
cleanups.forEach((cleanup) => {
|
|
131
143
|
cleanup();
|
|
132
144
|
});
|
|
@@ -135,8 +147,10 @@ function bindRatingField(field: HTMLElement): () => void {
|
|
|
135
147
|
};
|
|
136
148
|
}
|
|
137
149
|
|
|
138
|
-
export const surveyRatingModule:
|
|
139
|
-
|
|
150
|
+
export const surveyRatingModule: BrowserModuleDefinition = {
|
|
151
|
+
moduleId: `formie:${MODULE_ID}`,
|
|
152
|
+
version: 2,
|
|
153
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
140
154
|
kind: 'field',
|
|
141
155
|
match: (ctx) => {
|
|
142
156
|
return ctx.target instanceof HTMLElement && (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import tableCss from '#theme-css/fields/_table.css?inline';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
4
4
|
import { dispatchFieldEvent, getTemplateSource, getTemplateSourceHtml } from '#modules/fields/shared';
|
|
5
5
|
import { ensureModuleStyles } from '#modules/styles';
|
|
6
6
|
import { sleep } from '#utils/async';
|
|
@@ -156,8 +156,10 @@ function bindTableField(field: HTMLElement, options: TableOptions): () => void {
|
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
export const tableModule:
|
|
160
|
-
|
|
159
|
+
export const tableModule: BrowserModuleDefinition = {
|
|
160
|
+
moduleId: `formie:${MODULE_ID}`,
|
|
161
|
+
version: 2,
|
|
162
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
161
163
|
kind: 'field',
|
|
162
164
|
match: (ctx) => {
|
|
163
165
|
return ctx.target instanceof HTMLElement && (
|
|
@@ -2,7 +2,7 @@ import textLimitCss from '#theme-css/fields/_text-limit.css?inline';
|
|
|
2
2
|
|
|
3
3
|
import { getTextLimitMetrics } from '@verbb/formie-core';
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { BrowserModuleDefinition } from '#contracts/modules';
|
|
6
6
|
import { getModuleFieldTarget, releaseFormValidators, retainFormValidators } from '#modules/fields/shared';
|
|
7
7
|
import { ensureModuleStyles } from '#modules/styles';
|
|
8
8
|
import { t } from '#utils/i18n';
|
|
@@ -282,8 +282,10 @@ function updateCounter(input: HTMLInputElement | HTMLTextAreaElement): void {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
export const textLimitModule:
|
|
286
|
-
|
|
285
|
+
export const textLimitModule: BrowserModuleDefinition = {
|
|
286
|
+
moduleId: 'formie:text-limit',
|
|
287
|
+
version: 2,
|
|
288
|
+
surfaces: ['server-rendered', 'client-rendered', 'cp-edit'],
|
|
287
289
|
kind: 'field',
|
|
288
290
|
match: (ctx) => {
|
|
289
291
|
return !!ctx.target.querySelector(INPUT_SELECTOR);
|