@verbb/formie-browser 1.0.1 → 1.0.3
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 +16 -0
- package/dist/chunks/address-finder-BjMuEiwF.js +37 -0
- package/dist/chunks/bpoint-KudsBCo2.js +26 -0
- package/dist/chunks/calculations-DlGSkQ3W.js +147 -0
- package/dist/chunks/captcha-eu-CterYFok.js +34 -0
- package/dist/chunks/checkbox-radio-CBvgk3hR.js +136 -0
- package/dist/chunks/conditions-DYy1-Hwt.js +459 -0
- package/dist/chunks/date-picker-BlD--zfe.js +4994 -0
- package/dist/chunks/eway-qwc-B5Us.js +74 -0
- package/dist/chunks/file-upload-CIgHrXfp.js +316 -0
- package/dist/chunks/friendly-captcha-v1-EDFac33c.js +33 -0
- package/dist/chunks/friendly-captcha-v2-BDpSvFGR.js +38 -0
- package/dist/chunks/go-cardless-DuDMVsnz.js +24 -0
- package/dist/chunks/google-address-Bmjp01pH.js +181 -0
- package/dist/chunks/hcaptcha-BTQ6An6g.js +56 -0
- package/dist/chunks/hidden-DbPdOxKb.js +31 -0
- package/dist/chunks/index-BEsfee-D.js +1839 -0
- package/dist/chunks/index-BP7Unm5Y.js +863 -0
- package/dist/chunks/index-BcqwpPNE.js +4314 -0
- package/dist/chunks/loqate-BdNGv93o.js +55 -0
- package/dist/chunks/mollie-DFOjTuGX.js +24 -0
- package/dist/chunks/moneris-BbFfl-EL.js +101 -0
- package/dist/chunks/opayo-CmgYa9ya.js +122 -0
- package/dist/chunks/paddle-BUi7w1_o.js +60 -0
- package/dist/chunks/paypal-A-ePfh6k.js +100 -0
- package/dist/chunks/payway-BqFCbhyo.js +56 -0
- package/dist/chunks/phone-country-DPMiqk4L.js +3765 -0
- package/dist/chunks/place-kit-CX7tamAg.js +42 -0
- package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
- package/dist/chunks/recaptcha-enterprise-DxF6cW95.js +71 -0
- package/dist/chunks/recaptcha-shared-DhGcbiaq.js +15 -0
- package/dist/chunks/recaptcha-v2-checkbox-R9EfbZ4k.js +41 -0
- package/dist/chunks/recaptcha-v2-invisible-DV9hswAp.js +59 -0
- package/dist/chunks/recaptcha-v3-V0xc-Edh.js +28 -0
- package/dist/chunks/repeater-DKUT6TGI.js +124 -0
- package/dist/chunks/rich-text-SH7KiaKH.js +304 -0
- package/dist/chunks/scripts-D9N2d5rN.js +36 -0
- package/dist/chunks/sdk-3SicTWby.js +1559 -0
- package/dist/chunks/shared-BmntPmnW.js +80 -0
- package/dist/chunks/signature-BA3tQsGT.js +550 -0
- package/dist/chunks/snaptcha-DV7p6J9k.js +8 -0
- package/dist/chunks/square-Bs-ndqYK.js +46 -0
- package/dist/chunks/stripe-DkZAHxtn.js +202 -0
- package/dist/chunks/styles-C3aqgtek.js +21 -0
- package/dist/chunks/summary-Dq2i9TQk.js +126 -0
- package/dist/chunks/table-Cu4WfVcw.js +95 -0
- package/dist/chunks/text-limit-2ycmB-Ae.js +135 -0
- package/dist/chunks/turnstile-CId90tRr.js +59 -0
- package/dist/chunks/utils-BntI3W4S.js +6149 -0
- package/dist/css/theme/forms/_form.css +28 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -3205
- package/dist/js/compatibility/dom-adapter.d.ts +12 -0
- package/dist/js/compatibility/dom-adapter.d.ts.map +1 -0
- package/dist/js/compatibility/event-map.d.ts +25 -0
- package/dist/js/compatibility/event-map.d.ts.map +1 -0
- package/dist/js/compatibility/validator-adapter.d.ts +17 -0
- package/dist/js/compatibility/validator-adapter.d.ts.map +1 -0
- package/dist/js/contracts/client.d.ts +40 -0
- package/dist/js/contracts/client.d.ts.map +1 -0
- package/dist/js/contracts/common.d.ts +5 -0
- package/dist/js/contracts/common.d.ts.map +1 -0
- package/dist/js/contracts/modules.d.ts +47 -0
- package/dist/js/contracts/modules.d.ts.map +1 -0
- package/dist/js/contracts/schema.d.ts +79 -0
- package/dist/js/contracts/schema.d.ts.map +1 -0
- package/dist/js/contracts/theme.d.ts +2 -0
- package/dist/js/contracts/theme.d.ts.map +1 -0
- package/dist/js/core/create-formie-client.d.ts +3 -0
- package/dist/js/core/create-formie-client.d.ts.map +1 -0
- package/dist/js/core/dom-events.d.ts +2 -0
- package/dist/js/core/dom-events.d.ts.map +1 -0
- package/dist/js/core/formie.d.ts +27 -0
- package/dist/js/core/formie.d.ts.map +1 -0
- package/dist/js/core/hydrate-modules.d.ts +22 -0
- package/dist/js/core/hydrate-modules.d.ts.map +1 -0
- package/dist/js/core/page-client-event.d.ts +9 -0
- package/dist/js/core/page-client-event.d.ts.map +1 -0
- package/dist/js/core/page-tab-errors.d.ts +2 -0
- package/dist/js/core/page-tab-errors.d.ts.map +1 -0
- package/dist/js/core/submit-flow.d.ts +21 -0
- package/dist/js/core/submit-flow.d.ts.map +1 -0
- package/dist/js/core/submit-result-state.d.ts +8 -0
- package/dist/js/core/submit-result-state.d.ts.map +1 -0
- package/dist/js/core/submit-result-ui.d.ts +10 -0
- package/dist/js/core/submit-result-ui.d.ts.map +1 -0
- package/dist/js/events/event-bus.d.ts +21 -0
- package/dist/js/events/event-bus.d.ts.map +1 -0
- package/dist/js/modules/address/address-finder.d.ts +2 -0
- package/dist/js/modules/address/address-finder.d.ts.map +1 -0
- package/dist/js/modules/address/api.d.ts +8 -0
- package/dist/js/modules/address/api.d.ts.map +1 -0
- package/dist/js/modules/address/constants.d.ts +15 -0
- package/dist/js/modules/address/constants.d.ts.map +1 -0
- package/dist/js/modules/address/factories.d.ts +35 -0
- package/dist/js/modules/address/factories.d.ts.map +1 -0
- package/dist/js/modules/address/google-address.d.ts +9 -0
- package/dist/js/modules/address/google-address.d.ts.map +1 -0
- package/dist/js/modules/address/host.d.ts +30 -0
- package/dist/js/modules/address/host.d.ts.map +1 -0
- package/dist/js/modules/address/index.d.ts +3 -0
- package/dist/js/modules/address/index.d.ts.map +1 -0
- package/dist/js/modules/address/loqate.d.ts +2 -0
- package/dist/js/modules/address/loqate.d.ts.map +1 -0
- package/dist/js/modules/address/place-kit.d.ts +2 -0
- package/dist/js/modules/address/place-kit.d.ts.map +1 -0
- package/dist/js/modules/captchas/api.d.ts +9 -0
- package/dist/js/modules/captchas/api.d.ts.map +1 -0
- package/dist/js/modules/captchas/captcha-eu.d.ts +2 -0
- package/dist/js/modules/captchas/captcha-eu.d.ts.map +1 -0
- package/dist/js/modules/captchas/constants.d.ts +5 -0
- package/dist/js/modules/captchas/constants.d.ts.map +1 -0
- package/dist/js/modules/captchas/factories.d.ts +63 -0
- package/dist/js/modules/captchas/factories.d.ts.map +1 -0
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts +2 -0
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts.map +1 -0
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts +2 -0
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts.map +1 -0
- package/dist/js/modules/captchas/hcaptcha.d.ts +2 -0
- package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -0
- package/dist/js/modules/captchas/host.d.ts +78 -0
- package/dist/js/modules/captchas/host.d.ts.map +1 -0
- package/dist/js/modules/captchas/index.d.ts +3 -0
- package/dist/js/modules/captchas/index.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-shared.d.ts +26 -0
- package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-v3.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -0
- package/dist/js/modules/captchas/snaptcha.d.ts +2 -0
- package/dist/js/modules/captchas/snaptcha.d.ts.map +1 -0
- package/dist/js/modules/captchas/turnstile.d.ts +2 -0
- package/dist/js/modules/captchas/turnstile.d.ts.map +1 -0
- package/dist/js/modules/captchas/utils.d.ts +13 -0
- package/dist/js/modules/captchas/utils.d.ts.map +1 -0
- package/dist/js/modules/fields/calculations.d.ts +3 -0
- package/dist/js/modules/fields/calculations.d.ts.map +1 -0
- package/dist/js/modules/fields/checkbox-radio.d.ts +3 -0
- package/dist/js/modules/fields/checkbox-radio.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/config.d.ts +5 -0
- package/dist/js/modules/fields/conditions/config.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/effects.d.ts +4 -0
- package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/evaluator.d.ts +6 -0
- package/dist/js/modules/fields/conditions/evaluator.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/references.d.ts +5 -0
- package/dist/js/modules/fields/conditions/references.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/transforms.d.ts +3 -0
- package/dist/js/modules/fields/conditions/transforms.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/types.d.ts +30 -0
- package/dist/js/modules/fields/conditions/types.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/values.d.ts +5 -0
- package/dist/js/modules/fields/conditions/values.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions.d.ts +3 -0
- package/dist/js/modules/fields/conditions.d.ts.map +1 -0
- package/dist/js/modules/fields/date-picker.d.ts +3 -0
- package/dist/js/modules/fields/date-picker.d.ts.map +1 -0
- package/dist/js/modules/fields/file-upload.d.ts +3 -0
- package/dist/js/modules/fields/file-upload.d.ts.map +1 -0
- package/dist/js/modules/fields/hidden.d.ts +3 -0
- package/dist/js/modules/fields/hidden.d.ts.map +1 -0
- package/dist/js/modules/fields/index.d.ts +3 -0
- package/dist/js/modules/fields/index.d.ts.map +1 -0
- package/dist/js/modules/fields/phone-country.d.ts +3 -0
- package/dist/js/modules/fields/phone-country.d.ts.map +1 -0
- package/dist/js/modules/fields/repeater.d.ts +3 -0
- package/dist/js/modules/fields/repeater.d.ts.map +1 -0
- package/dist/js/modules/fields/rich-text.d.ts +3 -0
- package/dist/js/modules/fields/rich-text.d.ts.map +1 -0
- package/dist/js/modules/fields/shared.d.ts +20 -0
- package/dist/js/modules/fields/shared.d.ts.map +1 -0
- package/dist/js/modules/fields/signature.d.ts +3 -0
- package/dist/js/modules/fields/signature.d.ts.map +1 -0
- package/dist/js/modules/fields/summary.d.ts +3 -0
- package/dist/js/modules/fields/summary.d.ts.map +1 -0
- package/dist/js/modules/fields/table.d.ts +3 -0
- package/dist/js/modules/fields/table.d.ts.map +1 -0
- package/dist/js/modules/fields/text-limit.d.ts +3 -0
- package/dist/js/modules/fields/text-limit.d.ts.map +1 -0
- package/dist/js/modules/loader.d.ts +11 -0
- package/dist/js/modules/loader.d.ts.map +1 -0
- package/dist/js/modules/payments/api.d.ts +8 -0
- package/dist/js/modules/payments/api.d.ts.map +1 -0
- package/dist/js/modules/payments/bpoint.d.ts +2 -0
- package/dist/js/modules/payments/bpoint.d.ts.map +1 -0
- package/dist/js/modules/payments/constants.d.ts +5 -0
- package/dist/js/modules/payments/constants.d.ts.map +1 -0
- package/dist/js/modules/payments/eway.d.ts +9 -0
- package/dist/js/modules/payments/eway.d.ts.map +1 -0
- package/dist/js/modules/payments/factories.d.ts +54 -0
- package/dist/js/modules/payments/factories.d.ts.map +1 -0
- package/dist/js/modules/payments/go-cardless.d.ts +2 -0
- package/dist/js/modules/payments/go-cardless.d.ts.map +1 -0
- package/dist/js/modules/payments/host.d.ts +70 -0
- package/dist/js/modules/payments/host.d.ts.map +1 -0
- package/dist/js/modules/payments/index.d.ts +3 -0
- package/dist/js/modules/payments/index.d.ts.map +1 -0
- package/dist/js/modules/payments/mollie.d.ts +2 -0
- package/dist/js/modules/payments/mollie.d.ts.map +1 -0
- package/dist/js/modules/payments/moneris.d.ts +2 -0
- package/dist/js/modules/payments/moneris.d.ts.map +1 -0
- package/dist/js/modules/payments/opayo.d.ts +25 -0
- package/dist/js/modules/payments/opayo.d.ts.map +1 -0
- package/dist/js/modules/payments/paddle.d.ts +2 -0
- package/dist/js/modules/payments/paddle.d.ts.map +1 -0
- package/dist/js/modules/payments/paypal.d.ts +2 -0
- package/dist/js/modules/payments/paypal.d.ts.map +1 -0
- package/dist/js/modules/payments/payway.d.ts +2 -0
- package/dist/js/modules/payments/payway.d.ts.map +1 -0
- package/dist/js/modules/payments/square.d.ts +2 -0
- package/dist/js/modules/payments/square.d.ts.map +1 -0
- package/dist/js/modules/payments/stripe.d.ts +2 -0
- package/dist/js/modules/payments/stripe.d.ts.map +1 -0
- package/dist/js/modules/payments/utils.d.ts +17 -0
- package/dist/js/modules/payments/utils.d.ts.map +1 -0
- package/dist/js/modules/registry.d.ts +9 -0
- package/dist/js/modules/registry.d.ts.map +1 -0
- package/dist/js/modules/styles.d.ts +2 -0
- package/dist/js/modules/styles.d.ts.map +1 -0
- package/dist/js/submit/pipeline.d.ts +18 -0
- package/dist/js/submit/pipeline.d.ts.map +1 -0
- package/dist/js/theme/theme-classes.d.ts +10 -0
- package/dist/js/theme/theme-classes.d.ts.map +1 -0
- package/dist/js/transport/forms-api.d.ts +11 -0
- package/dist/js/transport/forms-api.d.ts.map +1 -0
- package/dist/js/utils/async.d.ts +8 -0
- package/dist/js/utils/async.d.ts.map +1 -0
- package/dist/js/utils/debug.d.ts +10 -0
- package/dist/js/utils/debug.d.ts.map +1 -0
- package/dist/js/utils/event-names.d.ts +13 -0
- package/dist/js/utils/event-names.d.ts.map +1 -0
- package/dist/js/utils/field-references.d.ts +6 -0
- package/dist/js/utils/field-references.d.ts.map +1 -0
- package/dist/js/utils/field-references.keys.d.ts +4 -0
- package/dist/js/utils/field-references.keys.d.ts.map +1 -0
- package/dist/js/utils/field-references.parser.d.ts +3 -0
- package/dist/js/utils/field-references.parser.d.ts.map +1 -0
- package/dist/js/utils/field-references.registry.d.ts +3 -0
- package/dist/js/utils/field-references.registry.d.ts.map +1 -0
- package/dist/js/utils/field-references.resolver.d.ts +4 -0
- package/dist/js/utils/field-references.resolver.d.ts.map +1 -0
- package/dist/js/utils/field-references.types.d.ts +27 -0
- package/dist/js/utils/field-references.types.d.ts.map +1 -0
- package/dist/js/utils/fields.d.ts +5 -0
- package/dist/js/utils/fields.d.ts.map +1 -0
- package/dist/js/utils/http.d.ts +9 -0
- package/dist/js/utils/http.d.ts.map +1 -0
- package/dist/js/utils/i18n.d.ts +7 -0
- package/dist/js/utils/i18n.d.ts.map +1 -0
- package/dist/js/utils/scripts.d.ts +13 -0
- package/dist/js/utils/scripts.d.ts.map +1 -0
- package/dist/js/utils/unload-warning.d.ts +10 -0
- package/dist/js/utils/unload-warning.d.ts.map +1 -0
- package/dist/js/validation/rules/email.d.ts +4 -0
- package/dist/js/validation/rules/email.d.ts.map +1 -0
- package/dist/js/validation/rules/match.d.ts +4 -0
- package/dist/js/validation/rules/match.d.ts.map +1 -0
- package/dist/js/validation/rules/number.d.ts +4 -0
- package/dist/js/validation/rules/number.d.ts.map +1 -0
- package/dist/js/validation/rules/required.d.ts +4 -0
- package/dist/js/validation/rules/required.d.ts.map +1 -0
- package/dist/js/validation/rules/shared.d.ts +7 -0
- package/dist/js/validation/rules/shared.d.ts.map +1 -0
- package/dist/js/validation/rules/url.d.ts +4 -0
- package/dist/js/validation/rules/url.d.ts.map +1 -0
- package/dist/js/validation/rules.d.ts +10 -0
- package/dist/js/validation/rules.d.ts.map +1 -0
- package/dist/js/validation/scope.d.ts +6 -0
- package/dist/js/validation/scope.d.ts.map +1 -0
- package/dist/js/validation/submit-readiness.d.ts +4 -0
- package/dist/js/validation/submit-readiness.d.ts.map +1 -0
- package/dist/js/validation/types.d.ts +44 -0
- package/dist/js/validation/types.d.ts.map +1 -0
- package/dist/js/validation/validator.d.ts +54 -0
- package/dist/js/validation/validator.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/css/theme/forms/_form.css +28 -0
- package/src/js/core/create-formie-client.ts +6 -0
- package/src/js/core/submit-result-state.ts +17 -0
- package/src/js/modules/address/google-address.ts +33 -1
- package/src/js/modules/fields/conditions/effects.ts +79 -2
- package/src/js/modules/fields/conditions.ts +53 -11
- package/src/js/modules/fields/file-upload.ts +189 -97
- package/src/js/modules/fields/repeater.ts +1 -1
- package/src/js/modules/fields/rich-text.ts +2 -2
- package/src/js/modules/fields/signature.ts +1 -1
- package/src/js/modules/fields/summary.ts +1 -1
- package/src/js/modules/fields/table.ts +1 -1
- package/src/js/modules/fields/text-limit.ts +1 -1
- package/src/js/modules/payments/paypal.ts +1 -1
- package/src/js/modules/payments/payway.ts +1 -1
- package/src/js/modules/payments/stripe.ts +1 -1
- package/src/js/submit/pipeline.ts +3 -28
- package/src/js/validation/scope.ts +25 -0
- package/src/js/validation/submit-readiness.ts +157 -0
- package/src/js/validation/validator.ts +4 -0
- package/dist/chunks/address-finder-DfMCiW89.js +0 -47
- package/dist/chunks/api-CbqEMQT5.js +0 -181
- package/dist/chunks/api-DE7LfK-R.js +0 -960
- package/dist/chunks/api-DOfDzYC_.js +0 -538
- package/dist/chunks/async-B3DUf1GZ.js +0 -26
- package/dist/chunks/bpoint-Ciy3yY9Q.js +0 -34
- package/dist/chunks/calculations-CkYAqO_-.js +0 -197
- package/dist/chunks/captcha-eu-DnOWhMwr.js +0 -43
- package/dist/chunks/checkbox-radio-0x7Tc0br.js +0 -197
- package/dist/chunks/chunk-K6L4z4UQ.js +0 -24
- package/dist/chunks/conditions-4fXKhEJS.js +0 -609
- package/dist/chunks/date-picker-B6iZkjHS.js +0 -6204
- package/dist/chunks/debug-KnZeKYBI.js +0 -39
- package/dist/chunks/dist-D09GnXMW.js +0 -2663
- package/dist/chunks/event-names-DamGPtXR.js +0 -51
- package/dist/chunks/eway-DEAYcwT0.js +0 -86
- package/dist/chunks/field-references.keys-BpBZ_quS.js +0 -24
- package/dist/chunks/field-references.resolver-Ba6xhiJC.js +0 -183
- package/dist/chunks/file-upload-BIj85NFH.js +0 -428
- package/dist/chunks/friendly-captcha-v1-CqO4WVre.js +0 -40
- package/dist/chunks/friendly-captcha-v2-CyykcJcM.js +0 -47
- package/dist/chunks/friendly-challenge-Dg8XkStd.js +0 -1101
- package/dist/chunks/go-cardless-CuND59rR.js +0 -26
- package/dist/chunks/google-address--uR8WDSm.js +0 -208
- package/dist/chunks/hcaptcha-CmaFUesv.js +0 -72
- package/dist/chunks/hidden-CYnZYple.js +0 -36
- package/dist/chunks/http-18nn97DZ.js +0 -29
- package/dist/chunks/i18n-vUh-KGiH.js +0 -55
- package/dist/chunks/loqate-BICNJlVK.js +0 -97
- package/dist/chunks/mollie-DwlsgHZ1.js +0 -26
- package/dist/chunks/moneris-B_IFZFTx.js +0 -159
- package/dist/chunks/opayo-U2x_TOII.js +0 -192
- package/dist/chunks/paddle-BqXFrc79.js +0 -75
- package/dist/chunks/paypal-VowQ3ilP.js +0 -121
- package/dist/chunks/payway-VOO-ajyg.js +0 -75
- package/dist/chunks/phone-country-B6Me4lK0.js +0 -3317
- package/dist/chunks/place-kit-ldUl-u9w.js +0 -56
- package/dist/chunks/placekit-autocomplete.esm-D-lGeaZl.js +0 -1771
- package/dist/chunks/recaptcha-enterprise-DPJNyv1X.js +0 -72
- package/dist/chunks/recaptcha-shared-DTI4qWVR.js +0 -22
- package/dist/chunks/recaptcha-v2-checkbox-zFjpvJ5c.js +0 -49
- package/dist/chunks/recaptcha-v2-invisible-CnYtkNvz.js +0 -62
- package/dist/chunks/recaptcha-v3-EAlWhnkX.js +0 -33
- package/dist/chunks/repeater-BPm7Mkyn.js +0 -149
- package/dist/chunks/rich-text-CHSly1Hq.js +0 -438
- package/dist/chunks/scripts-BGD_iU_6.js +0 -41
- package/dist/chunks/sdk-B7u9fTlP.js +0 -2103
- package/dist/chunks/shared-DC6_1u8X.js +0 -85
- package/dist/chunks/signature-DNMCgrMd.js +0 -763
- package/dist/chunks/snaptcha-CCDunGeb.js +0 -8
- package/dist/chunks/square-BLqK51rS.js +0 -61
- package/dist/chunks/stripe-B6ZcDQdx.js +0 -273
- package/dist/chunks/styles-BIh6g7V_.js +0 -22
- package/dist/chunks/summary-BTG0uIOt.js +0 -189
- package/dist/chunks/table-BTYc0Qm8.js +0 -122
- package/dist/chunks/text-limit-CgBMu4sJ.js +0 -177
- package/dist/chunks/theme-classes-vSHpdCUO.js +0 -59
- package/dist/chunks/turnstile-DP0bdR7T.js +0 -68
- package/dist/chunks/utils-ByrEVYrJ.js +0 -49584
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { t as createDebug } from "./debug-KnZeKYBI.js";
|
|
2
|
-
import { r as normalizeFieldKey, t as fieldKeyToInputName } from "./field-references.keys-BpBZ_quS.js";
|
|
3
|
-
import { n as resolveFieldReferenceLive, r as buildFieldValueRegistry } from "./field-references.resolver-Ba6xhiJC.js";
|
|
4
|
-
import { c as we, i as Te, n as K, s as q, t as Ce } from "./dist-D09GnXMW.js";
|
|
5
|
-
import { r as getModuleFieldContainers, t as dispatchFieldEvent } from "./shared-DC6_1u8X.js";
|
|
6
|
-
//#region src/js/modules/fields/calculations.ts
|
|
7
|
-
var INPUT_SELECTOR = "input[data-formie-calculation-input]";
|
|
8
|
-
var MODULE_ID = "calculations";
|
|
9
|
-
var debug = createDebug("fields", "calculations");
|
|
10
|
-
function resolveVariables(root, variableEntries, options) {
|
|
11
|
-
const registry = buildFieldValueRegistry(root);
|
|
12
|
-
const variables = {};
|
|
13
|
-
variableEntries.forEach(([variableKey, variable]) => {
|
|
14
|
-
variables[variableKey] = K(variable, resolveFieldReferenceLive(variable.sourceKey || "", registry).value);
|
|
15
|
-
});
|
|
16
|
-
return Te(variables, options.formatting);
|
|
17
|
-
}
|
|
18
|
-
function getWatchNames(root, variableEntries) {
|
|
19
|
-
const registry = buildFieldValueRegistry(root);
|
|
20
|
-
const watchNames = /* @__PURE__ */ new Set();
|
|
21
|
-
variableEntries.forEach(([, variable]) => {
|
|
22
|
-
const key = normalizeFieldKey(variable.sourceKey || "");
|
|
23
|
-
const entry = registry.get(key);
|
|
24
|
-
if (entry?.names?.length) {
|
|
25
|
-
entry.names.forEach((name) => {
|
|
26
|
-
watchNames.add(name);
|
|
27
|
-
});
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const fallback = fieldKeyToInputName(key);
|
|
31
|
-
if (fallback) {
|
|
32
|
-
watchNames.add(fallback);
|
|
33
|
-
watchNames.add(`${fallback}[]`);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
return watchNames;
|
|
37
|
-
}
|
|
38
|
-
function bindCalculationsField(root, field, input, options) {
|
|
39
|
-
const formula = Ce(options);
|
|
40
|
-
const variableEntries = we(options);
|
|
41
|
-
const sourceBindings = /* @__PURE__ */ new Map();
|
|
42
|
-
let observer = null;
|
|
43
|
-
let destroyed = false;
|
|
44
|
-
let evaluateQueued = false;
|
|
45
|
-
let rebindQueued = false;
|
|
46
|
-
const cleanupBindings = () => {
|
|
47
|
-
sourceBindings.forEach((listeners, target) => {
|
|
48
|
-
listeners.forEach((listener, eventName) => {
|
|
49
|
-
target.removeEventListener(eventName, listener);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
sourceBindings.clear();
|
|
53
|
-
};
|
|
54
|
-
const dispatchCalculatedValueChanged = (valueChanged) => {
|
|
55
|
-
if (!valueChanged || destroyed) return;
|
|
56
|
-
queueMicrotask(() => {
|
|
57
|
-
if (destroyed) return;
|
|
58
|
-
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
59
|
-
input.dispatchEvent(new Event("change", { bubbles: true }));
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
const evaluate = (isInit = false) => {
|
|
63
|
-
const variables = resolveVariables(root, variableEntries, options);
|
|
64
|
-
debug.log("Evaluate requested.", {
|
|
65
|
-
fieldHandle: field.getAttribute("data-formie-field-handle") || null,
|
|
66
|
-
isInit
|
|
67
|
-
});
|
|
68
|
-
const beforeDetail = {
|
|
69
|
-
calculations: input,
|
|
70
|
-
init: isInit,
|
|
71
|
-
formula,
|
|
72
|
-
variables
|
|
73
|
-
};
|
|
74
|
-
dispatchFieldEvent(field, MODULE_ID, "before-evaluate", beforeDetail);
|
|
75
|
-
if (!beforeDetail.formula) {
|
|
76
|
-
const valueChanged = input.value !== "";
|
|
77
|
-
input.value = "";
|
|
78
|
-
dispatchCalculatedValueChanged(valueChanged);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
try {
|
|
82
|
-
const result = q(beforeDetail.formula, beforeDetail.variables, options);
|
|
83
|
-
const afterDetail = {
|
|
84
|
-
calculations: input,
|
|
85
|
-
init: isInit,
|
|
86
|
-
formula: beforeDetail.formula,
|
|
87
|
-
variables: beforeDetail.variables,
|
|
88
|
-
result
|
|
89
|
-
};
|
|
90
|
-
dispatchFieldEvent(field, MODULE_ID, "after-evaluate", afterDetail);
|
|
91
|
-
const nextValue = typeof afterDetail.result === "string" || typeof afterDetail.result === "number" ? String(afterDetail.result) : "";
|
|
92
|
-
const valueChanged = input.value !== nextValue;
|
|
93
|
-
input.value = nextValue;
|
|
94
|
-
debug.log("Evaluate complete.", {
|
|
95
|
-
fieldHandle: field.getAttribute("data-formie-field-handle") || null,
|
|
96
|
-
valueChanged,
|
|
97
|
-
nextValue
|
|
98
|
-
});
|
|
99
|
-
dispatchCalculatedValueChanged(valueChanged);
|
|
100
|
-
} catch (error) {
|
|
101
|
-
const valueChanged = input.value !== "";
|
|
102
|
-
console.error("[formie] Failed to evaluate calculation.", error);
|
|
103
|
-
debug.warn("Evaluate failed.", {
|
|
104
|
-
fieldHandle: field.getAttribute("data-formie-field-handle") || null,
|
|
105
|
-
error: error instanceof Error ? error.message : error
|
|
106
|
-
});
|
|
107
|
-
input.value = "";
|
|
108
|
-
dispatchCalculatedValueChanged(valueChanged);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
const scheduleEvaluate = (isInit = false) => {
|
|
112
|
-
if (evaluateQueued || destroyed) return;
|
|
113
|
-
evaluateQueued = true;
|
|
114
|
-
queueMicrotask(() => {
|
|
115
|
-
evaluateQueued = false;
|
|
116
|
-
evaluate(isInit);
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
const bindSources = () => {
|
|
120
|
-
cleanupBindings();
|
|
121
|
-
const watchNames = getWatchNames(root, variableEntries);
|
|
122
|
-
debug.log("Binding variable watchers.", {
|
|
123
|
-
fieldHandle: field.getAttribute("data-formie-field-handle") || null,
|
|
124
|
-
watchCount: watchNames.size
|
|
125
|
-
});
|
|
126
|
-
if (!watchNames.size) return;
|
|
127
|
-
const listener = (event) => {
|
|
128
|
-
const name = event.target?.name || "";
|
|
129
|
-
if (!name || !watchNames.has(name)) return;
|
|
130
|
-
debug.log("Source change detected.", {
|
|
131
|
-
fieldHandle: field.getAttribute("data-formie-field-handle") || null,
|
|
132
|
-
sourceName: name,
|
|
133
|
-
eventType: event.type
|
|
134
|
-
});
|
|
135
|
-
scheduleEvaluate(false);
|
|
136
|
-
};
|
|
137
|
-
["input", "change"].forEach((eventName) => {
|
|
138
|
-
root.addEventListener(eventName, listener);
|
|
139
|
-
const listeners = sourceBindings.get(root) || /* @__PURE__ */ new Map();
|
|
140
|
-
listeners.set(eventName, listener);
|
|
141
|
-
sourceBindings.set(root, listeners);
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
const scheduleRebind = () => {
|
|
145
|
-
if (rebindQueued || destroyed) return;
|
|
146
|
-
rebindQueued = true;
|
|
147
|
-
queueMicrotask(() => {
|
|
148
|
-
rebindQueued = false;
|
|
149
|
-
bindSources();
|
|
150
|
-
scheduleEvaluate(false);
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
bindSources();
|
|
154
|
-
observer = new MutationObserver(() => {
|
|
155
|
-
scheduleRebind();
|
|
156
|
-
});
|
|
157
|
-
observer.observe(root, {
|
|
158
|
-
childList: true,
|
|
159
|
-
subtree: true
|
|
160
|
-
});
|
|
161
|
-
evaluate(true);
|
|
162
|
-
return () => {
|
|
163
|
-
destroyed = true;
|
|
164
|
-
observer?.disconnect();
|
|
165
|
-
cleanupBindings();
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
var calculationsModule = {
|
|
169
|
-
id: MODULE_ID,
|
|
170
|
-
kind: "field",
|
|
171
|
-
match: (ctx) => {
|
|
172
|
-
return !!ctx.target.querySelector(INPUT_SELECTOR);
|
|
173
|
-
},
|
|
174
|
-
setup: async (ctx) => {
|
|
175
|
-
const options = ctx.options || {};
|
|
176
|
-
const fields = getModuleFieldContainers(ctx);
|
|
177
|
-
debug.log("Module setup.", {
|
|
178
|
-
fieldCount: fields.length,
|
|
179
|
-
formatting: options.formatting || null
|
|
180
|
-
});
|
|
181
|
-
const cleanups = fields.map((field) => {
|
|
182
|
-
const input = field.querySelector(INPUT_SELECTOR);
|
|
183
|
-
if (!(input instanceof HTMLInputElement)) return () => {};
|
|
184
|
-
return bindCalculationsField(ctx.root, field, input, options);
|
|
185
|
-
});
|
|
186
|
-
await ctx.emit("formie:module:calculations:init", { count: cleanups.length });
|
|
187
|
-
return { destroy: () => {
|
|
188
|
-
debug.log("Module destroy.", { fieldCount: cleanups.length });
|
|
189
|
-
cleanups.forEach((cleanup) => {
|
|
190
|
-
cleanup();
|
|
191
|
-
});
|
|
192
|
-
ctx.emit("formie:module:calculations:destroy", {});
|
|
193
|
-
} };
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
//#endregion
|
|
197
|
-
export { calculationsModule };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { a as CAPTCHA_PROVIDER_LOAD_TIMEOUT_MS, t as defineCaptchaModule } from "./api-DOfDzYC_.js";
|
|
2
|
-
import { r as loadScriptAndEnsureGlobal } from "./scripts-BGD_iU_6.js";
|
|
3
|
-
//#region src/js/modules/captchas/captcha-eu.ts
|
|
4
|
-
async function loadCaptchaEuGlobal(options) {
|
|
5
|
-
return loadScriptAndEnsureGlobal("KROT", {
|
|
6
|
-
id: "FORMIE_CAPTCHA_EU_SCRIPT",
|
|
7
|
-
src: `${String(options.endPoint || "https://www.captcha.eu").trim().replace(/\/+$/, "")}/sdk.js`,
|
|
8
|
-
async: true,
|
|
9
|
-
defer: true,
|
|
10
|
-
timeoutMs: CAPTCHA_PROVIDER_LOAD_TIMEOUT_MS
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
var captchaEuModule = defineCaptchaModule({
|
|
14
|
-
id: "captcha-eu",
|
|
15
|
-
defaultPlaceholderSelector: "[data-captcha-eu-placeholder]",
|
|
16
|
-
defaultTokenFieldNames: ["captcha-eu-token"],
|
|
17
|
-
load: ({ options }) => {
|
|
18
|
-
return loadCaptchaEuGlobal(options.provider);
|
|
19
|
-
},
|
|
20
|
-
mount: ({ api, container, provider, services }) => {
|
|
21
|
-
api.init();
|
|
22
|
-
api.setup(String(provider.publicKey || ""));
|
|
23
|
-
api.WidgetV2.render(container);
|
|
24
|
-
api.on("CPT_OK", (event) => {
|
|
25
|
-
services.tokens.write(JSON.stringify(event.detail || {}), { container });
|
|
26
|
-
services.errors.clear();
|
|
27
|
-
}, container);
|
|
28
|
-
api.on("CPT_EXPIRED", () => {
|
|
29
|
-
services.tokens.clear();
|
|
30
|
-
services.errors.clear();
|
|
31
|
-
}, container);
|
|
32
|
-
return container;
|
|
33
|
-
},
|
|
34
|
-
screen: async ({ placeholder, services, stageCtx }) => {
|
|
35
|
-
if (!await services.tokens.wait()) {
|
|
36
|
-
const message = services.errors.getDefaultMessage();
|
|
37
|
-
services.errors.show(message, placeholder);
|
|
38
|
-
stageCtx.abort(message);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
//#endregion
|
|
43
|
-
export { captchaEuModule };
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { t as createDebug } from "./debug-KnZeKYBI.js";
|
|
2
|
-
import { c as retainFormValidators, n as escapeSelectorValue, s as releaseFormValidators, t as dispatchFieldEvent } from "./shared-DC6_1u8X.js";
|
|
3
|
-
//#region src/js/modules/fields/checkbox-radio.ts
|
|
4
|
-
var FIELD_SELECTOR = "[data-formie-checkboxes-field-layout], [data-formie-radio-field-layout]";
|
|
5
|
-
var CHECKBOX_MINMAX_VALIDATOR = "minmaxOptions";
|
|
6
|
-
var MAX_DISABLED_ATTR = "data-formie-checkbox-radio-max-disabled";
|
|
7
|
-
var MODULE_ID = "checkbox-radio";
|
|
8
|
-
var VALIDATOR_SCOPE = "checkbox-radio";
|
|
9
|
-
var debug = createDebug("fields", "checkbox-radio");
|
|
10
|
-
function isToggleCheckbox(input) {
|
|
11
|
-
return input.hasAttribute("data-checkbox-toggle") || input.hasAttribute("data-formie-checkbox-toggle");
|
|
12
|
-
}
|
|
13
|
-
function getMinMaxRule(getRule) {
|
|
14
|
-
const rule = getRule(CHECKBOX_MINMAX_VALIDATOR);
|
|
15
|
-
if (!rule || rule === true || typeof rule !== "object") return {
|
|
16
|
-
min: null,
|
|
17
|
-
max: null
|
|
18
|
-
};
|
|
19
|
-
const candidate = rule;
|
|
20
|
-
return {
|
|
21
|
-
min: typeof candidate.min === "number" ? candidate.min : null,
|
|
22
|
-
max: typeof candidate.max === "number" ? candidate.max : null
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function registerValidators(form) {
|
|
26
|
-
retainFormValidators(form, VALIDATOR_SCOPE, (validator) => {
|
|
27
|
-
validator.addValidator(CHECKBOX_MINMAX_VALIDATOR, ({ field, getRule }) => {
|
|
28
|
-
if (!field || !getRule(CHECKBOX_MINMAX_VALIDATOR)) return true;
|
|
29
|
-
const selected = Array.from(field.querySelectorAll("input[type=\"checkbox\"]")).filter((input) => {
|
|
30
|
-
return input instanceof HTMLInputElement && !isToggleCheckbox(input);
|
|
31
|
-
}).filter((input) => {
|
|
32
|
-
return input.checked;
|
|
33
|
-
}).length;
|
|
34
|
-
const { min, max } = getMinMaxRule(getRule);
|
|
35
|
-
if (min !== null && selected < min) return false;
|
|
36
|
-
if (max !== null && selected > max) return false;
|
|
37
|
-
return true;
|
|
38
|
-
}, ({ field, label, t, getRule }) => {
|
|
39
|
-
const { min, max } = field ? getMinMaxRule(getRule) : {
|
|
40
|
-
min: null,
|
|
41
|
-
max: null
|
|
42
|
-
};
|
|
43
|
-
if (min !== null && max !== null) return t("{attribute} must select between {min} and {max}.", {
|
|
44
|
-
attribute: label,
|
|
45
|
-
min,
|
|
46
|
-
max
|
|
47
|
-
});
|
|
48
|
-
if (min !== null) return t("{attribute} must select no less than {min}.", {
|
|
49
|
-
attribute: label,
|
|
50
|
-
min
|
|
51
|
-
});
|
|
52
|
-
if (max !== null) return t("{attribute} must select no greater than {max}.", {
|
|
53
|
-
attribute: label,
|
|
54
|
-
max
|
|
55
|
-
});
|
|
56
|
-
return t("{attribute} has an invalid value.", { attribute: label });
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function unregisterValidators(form) {
|
|
61
|
-
releaseFormValidators(form, VALIDATOR_SCOPE, [CHECKBOX_MINMAX_VALIDATOR]);
|
|
62
|
-
}
|
|
63
|
-
function syncCheckedAttribute(input) {
|
|
64
|
-
if (input.checked) input.setAttribute("checked", "");
|
|
65
|
-
else input.removeAttribute("checked");
|
|
66
|
-
}
|
|
67
|
-
function syncRequiredCheckboxes(field) {
|
|
68
|
-
const requiredCheckboxes = Array.from(field.querySelectorAll("input[type=\"checkbox\"][required][data-formie-checkbox-input]")).filter((input) => {
|
|
69
|
-
return input instanceof HTMLInputElement;
|
|
70
|
-
});
|
|
71
|
-
if (!requiredCheckboxes.length) return;
|
|
72
|
-
const hasCheckedValue = requiredCheckboxes.some((input) => {
|
|
73
|
-
return input.checked;
|
|
74
|
-
});
|
|
75
|
-
requiredCheckboxes.forEach((input) => {
|
|
76
|
-
if (hasCheckedValue) {
|
|
77
|
-
input.removeAttribute("required");
|
|
78
|
-
input.setAttribute("aria-required", "false");
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
input.setAttribute("required", "true");
|
|
82
|
-
input.setAttribute("aria-required", "true");
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function enforceMaxOptions(field) {
|
|
86
|
-
const maxOptions = parseInt(field.closest("[data-formie-field-handle]")?.getAttribute("data-formie-max-options") || "", 10);
|
|
87
|
-
if (!(maxOptions > 0)) return;
|
|
88
|
-
const checkboxes = Array.from(field.querySelectorAll("input[type=\"checkbox\"]")).filter((input) => {
|
|
89
|
-
return input instanceof HTMLInputElement && !isToggleCheckbox(input);
|
|
90
|
-
});
|
|
91
|
-
const disableUnchecked = checkboxes.filter((input) => {
|
|
92
|
-
return input.checked;
|
|
93
|
-
}).length >= maxOptions;
|
|
94
|
-
checkboxes.forEach((input) => {
|
|
95
|
-
const shouldDisableForMax = disableUnchecked && !input.checked;
|
|
96
|
-
const wasDisabledForMax = input.hasAttribute(MAX_DISABLED_ATTR);
|
|
97
|
-
if (shouldDisableForMax) {
|
|
98
|
-
if (!input.disabled) {
|
|
99
|
-
input.disabled = true;
|
|
100
|
-
input.setAttribute(MAX_DISABLED_ATTR, "true");
|
|
101
|
-
}
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
if (wasDisabledForMax) {
|
|
105
|
-
input.disabled = false;
|
|
106
|
-
input.removeAttribute(MAX_DISABLED_ATTR);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function toggleCheckboxGroup(field, toggle) {
|
|
111
|
-
Array.from(field.querySelectorAll("input[type=\"checkbox\"]")).filter((input) => {
|
|
112
|
-
return input instanceof HTMLInputElement && input !== toggle && !isToggleCheckbox(input);
|
|
113
|
-
}).forEach((input) => {
|
|
114
|
-
if (input.disabled && !input.checked) return;
|
|
115
|
-
input.checked = toggle.checked;
|
|
116
|
-
syncCheckedAttribute(input);
|
|
117
|
-
input.dispatchEvent(new Event("change", { bubbles: true }));
|
|
118
|
-
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
function syncRadioGroup(input, field) {
|
|
122
|
-
if (!input.checked || !input.name) {
|
|
123
|
-
syncCheckedAttribute(input);
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
Array.from(field.querySelectorAll(`input[type="radio"][name="${escapeSelectorValue(input.name)}"]`)).filter((radio) => {
|
|
127
|
-
return radio instanceof HTMLInputElement;
|
|
128
|
-
}).forEach((radio) => {
|
|
129
|
-
syncCheckedAttribute(radio);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function bindField(field) {
|
|
133
|
-
const inputs = Array.from(field.querySelectorAll("input[type=\"checkbox\"], input[type=\"radio\"]")).filter((input) => {
|
|
134
|
-
return input instanceof HTMLInputElement;
|
|
135
|
-
});
|
|
136
|
-
if (!inputs.length) {
|
|
137
|
-
debug.log("No checkbox/radio inputs found for field.");
|
|
138
|
-
return () => {};
|
|
139
|
-
}
|
|
140
|
-
const listeners = inputs.map((input) => {
|
|
141
|
-
const eventName = input.type === "radio" ? "change" : "click";
|
|
142
|
-
const handler = () => {
|
|
143
|
-
syncCheckedAttribute(input);
|
|
144
|
-
if (input.type === "checkbox" && isToggleCheckbox(input)) toggleCheckboxGroup(field, input);
|
|
145
|
-
if (input.type === "radio") syncRadioGroup(input, field);
|
|
146
|
-
syncRequiredCheckboxes(field);
|
|
147
|
-
enforceMaxOptions(field);
|
|
148
|
-
debug.log("Input interaction processed.", {
|
|
149
|
-
inputName: input.name,
|
|
150
|
-
inputType: input.type,
|
|
151
|
-
checked: input.checked
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
input.addEventListener(eventName, handler);
|
|
155
|
-
syncCheckedAttribute(input);
|
|
156
|
-
return () => {
|
|
157
|
-
input.removeEventListener(eventName, handler);
|
|
158
|
-
};
|
|
159
|
-
});
|
|
160
|
-
syncRequiredCheckboxes(field);
|
|
161
|
-
enforceMaxOptions(field);
|
|
162
|
-
dispatchFieldEvent(field, MODULE_ID, "init", { checkboxRadio: field });
|
|
163
|
-
return () => {
|
|
164
|
-
listeners.forEach((unbind) => {
|
|
165
|
-
unbind();
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
var checkboxRadioModule = {
|
|
170
|
-
id: MODULE_ID,
|
|
171
|
-
kind: "field",
|
|
172
|
-
match: (ctx) => {
|
|
173
|
-
return ctx.target instanceof HTMLElement && (ctx.target.matches(FIELD_SELECTOR) || !!ctx.target.querySelector(FIELD_SELECTOR));
|
|
174
|
-
},
|
|
175
|
-
setup: async (ctx) => {
|
|
176
|
-
if (!(ctx.target instanceof HTMLElement)) return;
|
|
177
|
-
const fields = ctx.target.matches(FIELD_SELECTOR) ? [ctx.target] : Array.from(ctx.target.querySelectorAll(FIELD_SELECTOR)).filter((field) => {
|
|
178
|
-
return field instanceof HTMLElement;
|
|
179
|
-
});
|
|
180
|
-
registerValidators(ctx.form);
|
|
181
|
-
debug.log("Module setup.", { fieldCount: fields.length });
|
|
182
|
-
const destroyBindings = fields.map((field) => {
|
|
183
|
-
return bindField(field);
|
|
184
|
-
});
|
|
185
|
-
await ctx.emit("formie:module:checkbox-radio:init", { count: fields.length });
|
|
186
|
-
return { destroy: () => {
|
|
187
|
-
destroyBindings.forEach((destroyBinding) => {
|
|
188
|
-
destroyBinding();
|
|
189
|
-
});
|
|
190
|
-
unregisterValidators(ctx.form);
|
|
191
|
-
debug.log("Module destroy.", { fieldCount: fields.length });
|
|
192
|
-
ctx.emit("formie:module:checkbox-radio:destroy", {});
|
|
193
|
-
} };
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
//#endregion
|
|
197
|
-
export { checkboxRadioModule };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
-
get: ((k) => from[k]).bind(null, key),
|
|
14
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
-
value: mod,
|
|
21
|
-
enumerable: true
|
|
22
|
-
}) : target, mod));
|
|
23
|
-
//#endregion
|
|
24
|
-
export { __toESM as n, __commonJSMin as t };
|