@verbb/formie-browser 1.0.1 → 1.0.2
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 +8 -0
- package/dist/chunks/address-finder-CQW81kY0.js +37 -0
- package/dist/chunks/bpoint-D8OjLmsn.js +26 -0
- package/dist/chunks/calculations-BqZsENCq.js +147 -0
- package/dist/chunks/captcha-eu-DIa6aUWz.js +34 -0
- package/dist/chunks/checkbox-radio-BI-UjgMF.js +136 -0
- package/dist/chunks/conditions-BVl6jTYo.js +433 -0
- package/dist/chunks/date-picker-69TgvErA.js +4994 -0
- package/dist/chunks/eway-1GPxH6DU.js +74 -0
- package/dist/chunks/file-upload-BDZZftgL.js +281 -0
- package/dist/chunks/friendly-captcha-v1-DA2QPKA3.js +33 -0
- package/dist/chunks/friendly-captcha-v2-BorOWiz_.js +38 -0
- package/dist/chunks/go-cardless-DwBgERcA.js +24 -0
- package/dist/chunks/google-address-BcTBncyS.js +162 -0
- package/dist/chunks/hcaptcha-BchdVCqq.js +56 -0
- package/dist/chunks/hidden-D8RqSPt7.js +31 -0
- package/dist/chunks/index-BEsfee-D.js +1839 -0
- package/dist/chunks/index-BP7Unm5Y.js +863 -0
- package/dist/chunks/index-C1ZOKiAi.js +4229 -0
- package/dist/chunks/loqate-nXuTX7In.js +55 -0
- package/dist/chunks/mollie-qdCynQCd.js +24 -0
- package/dist/chunks/moneris-BNEA-laO.js +101 -0
- package/dist/chunks/opayo-BJtXOkuK.js +122 -0
- package/dist/chunks/paddle-D72Pa8kr.js +60 -0
- package/dist/chunks/paypal-Cqt2bned.js +100 -0
- package/dist/chunks/payway-BjCqsc0H.js +56 -0
- package/dist/chunks/phone-country-K9pYAlzM.js +3765 -0
- package/dist/chunks/place-kit-Dg6f_UoM.js +42 -0
- package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
- package/dist/chunks/recaptcha-enterprise--VYAeeqz.js +71 -0
- package/dist/chunks/recaptcha-shared-PSIEEEe1.js +15 -0
- package/dist/chunks/recaptcha-v2-checkbox-atBNe5ml.js +41 -0
- package/dist/chunks/recaptcha-v2-invisible-DnBufNPT.js +59 -0
- package/dist/chunks/recaptcha-v3-CF6O8rDj.js +28 -0
- package/dist/chunks/repeater-CB7Yojvx.js +124 -0
- package/dist/chunks/rich-text-nAV_SQZo.js +304 -0
- package/dist/chunks/scripts-BkAAux0i.js +36 -0
- package/dist/chunks/sdk-3SicTWby.js +1559 -0
- package/dist/chunks/shared-DGqeMvcJ.js +80 -0
- package/dist/chunks/signature-BT6CsQ6n.js +550 -0
- package/dist/chunks/snaptcha-C7qQo02f.js +8 -0
- package/dist/chunks/square-C5AH3trb.js +46 -0
- package/dist/chunks/stripe-EJK0RyUv.js +202 -0
- package/dist/chunks/styles-C3aqgtek.js +21 -0
- package/dist/chunks/summary-DC_ipXCU.js +126 -0
- package/dist/chunks/table-BEAI99qo.js +95 -0
- package/dist/chunks/text-limit-Blgq5G-G.js +135 -0
- package/dist/chunks/turnstile-_uCRwnU-.js +59 -0
- package/dist/chunks/utils-BntI3W4S.js +6149 -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 +2 -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 +2 -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/types.d.ts +44 -0
- package/dist/js/validation/types.d.ts.map +1 -0
- package/dist/js/validation/validator.d.ts +53 -0
- package/dist/js/validation/validator.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/js/modules/fields/file-upload.ts +1 -1
- 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/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
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { u as I, v as C, x as E, y as g } from "./index-C1ZOKiAi.js";
|
|
2
|
+
import { e as P } from "./styles-C3aqgtek.js";
|
|
3
|
+
import { l as A } from "./scripts-BkAAux0i.js";
|
|
4
|
+
const R = "@layer formie-theme{.formie-stripe-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--formie-space-2);min-height:12rem;width:100%;padding:var(--formie-space-4);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm);background:var(--formie-color-surface);color:var(--formie-color-text-muted);text-align:center;box-sizing:border-box}.formie-stripe-placeholder[hidden]{display:none}}";
|
|
5
|
+
P("stripe", [R]);
|
|
6
|
+
const L = "FORMIE_STRIPE_SCRIPT", U = C("stripe", "confirm"), F = "[data-formie-stripe-elements-placeholder]", w = /* @__PURE__ */ new Set([
|
|
7
|
+
"BIF",
|
|
8
|
+
"CLP",
|
|
9
|
+
"DJF",
|
|
10
|
+
"GNF",
|
|
11
|
+
"JPY",
|
|
12
|
+
"KMF",
|
|
13
|
+
"KRW",
|
|
14
|
+
"MGA",
|
|
15
|
+
"PYG",
|
|
16
|
+
"RWF",
|
|
17
|
+
"UGX",
|
|
18
|
+
"VND",
|
|
19
|
+
"VUV",
|
|
20
|
+
"XAF",
|
|
21
|
+
"XOF",
|
|
22
|
+
"XPF"
|
|
23
|
+
]);
|
|
24
|
+
function M(r, e) {
|
|
25
|
+
return w.has(e.toUpperCase()) ? Math.ceil(r) : Math.ceil(r * 100);
|
|
26
|
+
}
|
|
27
|
+
function b(r, e) {
|
|
28
|
+
r && (g(r, e, "fieldErrors", "fieldError"), r.querySelectorAll("[data-payment-placeholder-error]").forEach((s) => {
|
|
29
|
+
g(s, e, "fieldError");
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
function T(r, e, s = "Loading payment options...") {
|
|
33
|
+
if (!r)
|
|
34
|
+
return;
|
|
35
|
+
b(r, e), r.removeAttribute("hidden"), r.innerHTML = "";
|
|
36
|
+
const i = document.createElement("div");
|
|
37
|
+
i.className = "formie-loading";
|
|
38
|
+
const t = document.createElement("div");
|
|
39
|
+
t.textContent = s, r.append(i, t);
|
|
40
|
+
}
|
|
41
|
+
function v(r, e, s) {
|
|
42
|
+
if (!r)
|
|
43
|
+
return;
|
|
44
|
+
b(r, e), r.removeAttribute("hidden"), E(r, e, "fieldErrors"), r.innerHTML = "";
|
|
45
|
+
const i = document.createElement("div");
|
|
46
|
+
i.setAttribute("data-payment-placeholder-error", ""), i.textContent = s, E(i, e, "fieldError"), r.appendChild(i);
|
|
47
|
+
}
|
|
48
|
+
const k = I({
|
|
49
|
+
id: "stripe",
|
|
50
|
+
defaultRequiredInputSuffixes: ["stripePaymentIntentId"],
|
|
51
|
+
load: async (r) => {
|
|
52
|
+
const { provider: e } = r.options, s = e.publishableKey;
|
|
53
|
+
return s?.trim() ? (await A("Stripe", {
|
|
54
|
+
id: L,
|
|
55
|
+
src: "https://js.stripe.com/v3"
|
|
56
|
+
}))(s) : (console.error("[formie] Missing publishableKey for Stripe."), null);
|
|
57
|
+
},
|
|
58
|
+
mount: async (r) => {
|
|
59
|
+
const { api: e, field: s, services: i, provider: t } = r, u = s.querySelector("[data-formie-stripe-elements]"), a = s.querySelector(F), d = s, c = i.form || i.root;
|
|
60
|
+
if (!u || !e)
|
|
61
|
+
return null;
|
|
62
|
+
const l = t.initialPaymentInformation || {}, _ = [l.amount, l.currency].map((o) => String(o ?? "").trim()).filter((o, n) => (n === 0 ? t.amountType : t.currencyType) === "dynamic" && o !== ""), y = () => {
|
|
63
|
+
const o = i.resolveAmount({ value: l.amount });
|
|
64
|
+
if (!o.ok)
|
|
65
|
+
return {
|
|
66
|
+
ok: !1,
|
|
67
|
+
error: "error" in o ? o.error : "Provide a payment amount to proceed."
|
|
68
|
+
};
|
|
69
|
+
const n = i.resolveCurrency({ value: l.currency });
|
|
70
|
+
if (!n.ok)
|
|
71
|
+
return {
|
|
72
|
+
ok: !1,
|
|
73
|
+
error: "error" in n ? n.error : "Provide a payment currency to proceed."
|
|
74
|
+
};
|
|
75
|
+
const m = n.value.toLowerCase(), p = t.amountType === "dynamic" ? M(o.value, m) : o.value;
|
|
76
|
+
return {
|
|
77
|
+
ok: !0,
|
|
78
|
+
value: {
|
|
79
|
+
...l,
|
|
80
|
+
capture_method: "automatic",
|
|
81
|
+
mode: t.paymentType === "subscription" ? "subscription" : "payment",
|
|
82
|
+
appearance: {},
|
|
83
|
+
amount: p,
|
|
84
|
+
currency: m
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}, S = () => {
|
|
88
|
+
try {
|
|
89
|
+
d.__formieStripeWidget?.paymentElement?.destroy?.();
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
92
|
+
d.__formieStripeWidget = null, d.__formieStripeElements = void 0, u.innerHTML = "";
|
|
93
|
+
}, f = () => {
|
|
94
|
+
const o = y();
|
|
95
|
+
if (!o.ok) {
|
|
96
|
+
S(), v(
|
|
97
|
+
a,
|
|
98
|
+
c,
|
|
99
|
+
"error" in o ? o.error : "Unable to resolve payment details."
|
|
100
|
+
);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
if (d.__formieStripeWidget && d.__formieStripeElements) {
|
|
105
|
+
d.__formieStripeElements.update(o.value), b(a, c), a?.setAttribute("hidden", "hidden");
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
T(a, c);
|
|
109
|
+
const n = e.elements(o.value), m = n.create("payment", {});
|
|
110
|
+
m.mount(u), m.on?.("loaderror", (p) => {
|
|
111
|
+
const h = p?.error?.message || "Unable to load payment options.";
|
|
112
|
+
S(), v(a, c, h);
|
|
113
|
+
}), m.on?.("ready", () => {
|
|
114
|
+
b(a, c), a?.setAttribute("hidden", "hidden");
|
|
115
|
+
}), d.__formieStripeElements = n, d.__formieStripeInstance = e, d.__formieStripeWidget = { elements: n, paymentElement: m }, m.on || (b(a, c), a?.setAttribute("hidden", "hidden"));
|
|
116
|
+
} catch (n) {
|
|
117
|
+
S(), v(
|
|
118
|
+
a,
|
|
119
|
+
c,
|
|
120
|
+
n instanceof Error ? n.message : "Unable to initialize Stripe payment element."
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
return d.__formieStripeEvaluateAndRender = f, d.__formieStripeDynamicUnbind?.(), _.length > 0 && (d.__formieStripeDynamicUnbind = i.watchFieldValueChanges(_, () => {
|
|
125
|
+
f();
|
|
126
|
+
}, 600)), f(), d.__formieStripeWidget || null;
|
|
127
|
+
},
|
|
128
|
+
unmount: async (r) => {
|
|
129
|
+
r.widget?.paymentElement?.destroy();
|
|
130
|
+
const e = r.field;
|
|
131
|
+
e.__formieStripeWidget = null, e.__formieStripeElements = void 0, e.__formieStripeInstance = null, e.__formieStripeLastClientSecret = void 0, e.__formieStripeEvaluateAndRender = null, e.__formieStripeDynamicUnbind?.(), e.__formieStripeDynamicUnbind = null;
|
|
132
|
+
},
|
|
133
|
+
onBeforeAuthorize: async (r) => {
|
|
134
|
+
const { widget: e, services: s, field: i } = r, t = i;
|
|
135
|
+
let u = e;
|
|
136
|
+
if (u?.elements || (t.__formieStripeEvaluateAndRender?.(), u = t.__formieStripeWidget || null), !u?.elements)
|
|
137
|
+
return !1;
|
|
138
|
+
const a = await u.elements.submit();
|
|
139
|
+
return a?.error ? (s.addError(a.error.message), !1) : !0;
|
|
140
|
+
},
|
|
141
|
+
setup: async (r) => {
|
|
142
|
+
const { services: e, options: s } = r, i = s.provider, t = r.target, u = async (d) => {
|
|
143
|
+
try {
|
|
144
|
+
const l = d.detail?.data;
|
|
145
|
+
if (!l?.clientSecret || t.__formieStripeConfirming || t.__formieStripeLastClientSecret === l.clientSecret)
|
|
146
|
+
return;
|
|
147
|
+
const _ = t.__formieStripeElements;
|
|
148
|
+
if (!_) {
|
|
149
|
+
e.addError("Stripe elements not ready for 3DS.");
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const y = t.__formieStripeInstance, S = i.publishableKey;
|
|
153
|
+
if (!y || !S) {
|
|
154
|
+
e.addError("Stripe is not initialized.");
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
t.__formieStripeConfirming = !0;
|
|
158
|
+
const f = new URL(l.returnUrl || window.location.href);
|
|
159
|
+
f.searchParams.set("origin", window.location.href);
|
|
160
|
+
const n = await (l.type === "setup" ? y.confirmSetup : y.confirmPayment)({
|
|
161
|
+
elements: _,
|
|
162
|
+
clientSecret: l.clientSecret,
|
|
163
|
+
redirect: "if_required",
|
|
164
|
+
confirmParams: { return_url: f.toString() }
|
|
165
|
+
});
|
|
166
|
+
if (n?.error) {
|
|
167
|
+
e.releaseSubmitLoading(), e.addError(n.error.message);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
l.subscriptionId && e.updateInputs("stripeSubscriptionId", l.subscriptionId);
|
|
171
|
+
const m = n && "paymentIntent" in n ? n.paymentIntent : null, p = n && "setupIntent" in n ? n.setupIntent : null;
|
|
172
|
+
if (m?.id)
|
|
173
|
+
e.updateInputs("stripePaymentIntentId", m.id);
|
|
174
|
+
else if (p?.id)
|
|
175
|
+
e.updateInputs("stripePaymentIntentId", p.id);
|
|
176
|
+
else {
|
|
177
|
+
e.releaseSubmitLoading(), e.addError("Stripe confirmation did not return an intent ID.");
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
t.__formieStripeLastClientSecret = l.clientSecret, e.triggerSubmit();
|
|
181
|
+
} catch (c) {
|
|
182
|
+
e.releaseSubmitLoading(), e.addError(c instanceof Error ? c.message : "Unable to confirm Stripe payment.");
|
|
183
|
+
} finally {
|
|
184
|
+
t.__formieStripeConfirming = !1;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
t.__formieStripeConfirmUnbind?.();
|
|
188
|
+
const a = e.events.onForm(U, u);
|
|
189
|
+
return t.__formieStripeConfirmUnbind = a, {
|
|
190
|
+
destroy: () => {
|
|
191
|
+
t.__formieStripeConfirmUnbind?.(), t.__formieStripeConfirmUnbind = null;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
onAfterSubmit: async (r) => {
|
|
196
|
+
const e = r.field;
|
|
197
|
+
r.result?.ok && !r.result?.nextPage && (e.__formieStripeWidget?.paymentElement?.destroy?.(), e.__formieStripeWidget = null, e.__formieStripeElements = void 0, r.services.updateInputs(["stripePaymentIntentId", "stripeSubscriptionId"], ""), e.__formieStripeLastClientSecret = void 0);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
export {
|
|
201
|
+
k as stripeModule
|
|
202
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const t = /* @__PURE__ */ new Set();
|
|
2
|
+
function l(n, r) {
|
|
3
|
+
if (typeof document > "u")
|
|
4
|
+
return;
|
|
5
|
+
const e = `formie-module-style:${n}`;
|
|
6
|
+
if (t.has(e) || document.querySelector(`style[data-formie-module-style="${n}"]`)) {
|
|
7
|
+
t.add(e);
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const d = r.filter((s) => typeof s == "string" && s.trim().length > 0).join(`
|
|
11
|
+
`);
|
|
12
|
+
if (!d) {
|
|
13
|
+
t.add(e);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const o = document.createElement("style");
|
|
17
|
+
o.setAttribute("data-formie-module-style", n), o.textContent = d, document.head.appendChild(o), t.add(e);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
l as e
|
|
21
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { g as H, d as M } from "./shared-DGqeMvcJ.js";
|
|
2
|
+
import { e as I } from "./styles-C3aqgtek.js";
|
|
3
|
+
import { h as x, t as L, o as V, p as z } from "./index-C1ZOKiAi.js";
|
|
4
|
+
const N = '@layer formie-theme{.formie-summary-container{padding:var(--formie-summary-padding);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm)}.formie-summary-heading{color:var(--formie-color-heading)}.formie-summary-blocks{display:grid;gap:var(--formie-gap-summary)}.formie-summary-blocks[data-formie-loading=true]{position:relative;min-height:calc(var(--formie-loading-size) + var(--formie-space-4))}.formie-summary-blocks[data-formie-loading=true]>*{opacity:0;pointer-events:none}.formie-summary-blocks[data-formie-loading=true]:before{position:absolute;inset:0;content:"";display:block;background:var(--formie-color-bg);border-radius:inherit;z-index:1}.formie-summary-blocks[data-formie-loading=true]:after{position:absolute;top:50%;left:50%;width:var(--formie-loading-size);height:var(--formie-loading-size);content:"";display:block;border:var(--formie-loading-border-width) solid var(--formie-loading-color);border-top-color:transparent;border-right-color:transparent;border-radius:var(--formie-radius-full);transform:translate(-50%,-50%);z-index:2;animation:formie-loading-spin var(--formie-loading-speed) linear infinite}}', C = "[data-formie-summary-blocks]", q = "[data-formie-summary-container]", U = "formie/fields/get-summary-html", b = "summary", i = x("fields", "summary");
|
|
5
|
+
I(b, [N]);
|
|
6
|
+
function _() {
|
|
7
|
+
const e = new URL(window.location.href);
|
|
8
|
+
return e.hash = "", e.toString();
|
|
9
|
+
}
|
|
10
|
+
function w(e) {
|
|
11
|
+
return {
|
|
12
|
+
accessToken: e.querySelector("[data-formie-summary-token]")?.value?.trim() || null
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
async function P(e, n, t) {
|
|
16
|
+
if (!n.accessToken)
|
|
17
|
+
throw new Error("Summary field requires an access token.");
|
|
18
|
+
const m = new FormData(e);
|
|
19
|
+
return m.set("action", U), m.set("accessToken", n.accessToken), z(_(), {
|
|
20
|
+
method: "POST",
|
|
21
|
+
body: m,
|
|
22
|
+
signal: t,
|
|
23
|
+
headers: {
|
|
24
|
+
Accept: "text/html"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function B(e, n) {
|
|
29
|
+
const t = e.closest("form");
|
|
30
|
+
if (!(t instanceof HTMLFormElement))
|
|
31
|
+
return i.warn("Missing form ancestor; skipping field."), () => {
|
|
32
|
+
};
|
|
33
|
+
let m = !1, a = !0, h = !1, l = 0, d = 0, u = null;
|
|
34
|
+
const v = () => {
|
|
35
|
+
const r = e.querySelector(C);
|
|
36
|
+
return r instanceof HTMLElement ? r : null;
|
|
37
|
+
}, F = () => {
|
|
38
|
+
const r = e.querySelector(q);
|
|
39
|
+
return r instanceof HTMLElement ? r : null;
|
|
40
|
+
}, f = (r) => {
|
|
41
|
+
const o = v();
|
|
42
|
+
if (o) {
|
|
43
|
+
if (r) {
|
|
44
|
+
o.setAttribute("data-formie-loading", "true"), o.setAttribute("aria-busy", "true"), L(o, t, "loading", !0);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
o.removeAttribute("data-formie-loading"), o.removeAttribute("aria-busy"), L(o, t, "loading", !1);
|
|
48
|
+
}
|
|
49
|
+
}, A = w(e);
|
|
50
|
+
f(!!A.accessToken);
|
|
51
|
+
const c = () => {
|
|
52
|
+
!h || m && !a || (i.log("Queueing fetch."), R());
|
|
53
|
+
}, R = V(async () => {
|
|
54
|
+
const r = w(e);
|
|
55
|
+
if (!v() || !r.accessToken) {
|
|
56
|
+
i.warn("Missing state for fetch.", r), f(!1);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
d += 1;
|
|
60
|
+
const o = d, O = l;
|
|
61
|
+
u?.abort(), u = new AbortController(), f(!0);
|
|
62
|
+
try {
|
|
63
|
+
const s = await P(t, r, u.signal);
|
|
64
|
+
if (o !== d)
|
|
65
|
+
return;
|
|
66
|
+
const y = F(), S = document.createElement("template");
|
|
67
|
+
S.innerHTML = s.trim();
|
|
68
|
+
const T = S.content.querySelector(q);
|
|
69
|
+
y && T instanceof HTMLElement ? y.replaceWith(T) : y && (y.innerHTML = s), m = !0, a = l !== O, i.log("Fetch complete.", {
|
|
70
|
+
isDirty: a,
|
|
71
|
+
dirtyVersion: l,
|
|
72
|
+
requestVersion: o
|
|
73
|
+
}), M(e, b, "fetch-summary", {
|
|
74
|
+
summary: e,
|
|
75
|
+
html: s
|
|
76
|
+
});
|
|
77
|
+
} catch (s) {
|
|
78
|
+
if (s instanceof DOMException && s.name === "AbortError") {
|
|
79
|
+
i.log("Fetch aborted.");
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
console.error("[formie] Failed to load summary field HTML.", s);
|
|
83
|
+
} finally {
|
|
84
|
+
o === d && (f(!1), u = null, a && c());
|
|
85
|
+
}
|
|
86
|
+
}, 300), D = (r) => {
|
|
87
|
+
const o = r?.target;
|
|
88
|
+
o instanceof Node && e.contains(o) || (a = !0, l += 1, i.log("Marked dirty.", { dirtyVersion: l }));
|
|
89
|
+
}, g = (r) => {
|
|
90
|
+
D(r), c();
|
|
91
|
+
}, p = () => {
|
|
92
|
+
a = !0, i.log("Submit result received; refreshing."), c();
|
|
93
|
+
}, k = () => {
|
|
94
|
+
a = !0, i.log("Page navigation received; refreshing."), c();
|
|
95
|
+
}, E = new IntersectionObserver((r) => {
|
|
96
|
+
h = !!r[0]?.isIntersecting, h && (i.log("Field became visible."), M(e, b, "field-visible", {
|
|
97
|
+
summary: e
|
|
98
|
+
}), c());
|
|
99
|
+
}, {
|
|
100
|
+
root: t,
|
|
101
|
+
rootMargin: "50px"
|
|
102
|
+
});
|
|
103
|
+
return E.observe(e), t.addEventListener("input", g), t.addEventListener("change", g), n.addEventListener("formie:page:navigate:after", k), n.addEventListener("formie:submit:result", p), () => {
|
|
104
|
+
u?.abort(), E.disconnect(), t.removeEventListener("input", g), t.removeEventListener("change", g), n.removeEventListener("formie:page:navigate:after", k), n.removeEventListener("formie:submit:result", p), i.log("Field destroyed.");
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
const Y = {
|
|
108
|
+
id: b,
|
|
109
|
+
kind: "field",
|
|
110
|
+
match: (e) => !!e.target.querySelector(C),
|
|
111
|
+
setup: async (e) => {
|
|
112
|
+
const n = H(e).map((t) => B(t, e.root));
|
|
113
|
+
return i.log("Module setup.", { fieldCount: n.length }), await e.emit("formie:module:summary:init", {
|
|
114
|
+
count: n.length
|
|
115
|
+
}), {
|
|
116
|
+
destroy: () => {
|
|
117
|
+
n.forEach((t) => {
|
|
118
|
+
t();
|
|
119
|
+
}), i.log("Module destroy.", { fieldCount: n.length }), e.emit("formie:module:summary:destroy", {});
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
Y as summaryModule
|
|
126
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { d as h, c as L, f as A } from "./shared-DGqeMvcJ.js";
|
|
2
|
+
import { e as M } from "./styles-C3aqgtek.js";
|
|
3
|
+
import { s as R } from "./index-C1ZOKiAi.js";
|
|
4
|
+
const S = '@layer formie-theme{.formie-table-wrapper{max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.formie-table{width:var(--formie-table-width);margin-bottom:var(--formie-table-margin-bottom);border-collapse:var(--formie-table-border-collapse)}.formie-table th{text-align:var(--formie-table-th-text-align);font-size:var(--formie-table-th-font-size);font-weight:var(--formie-table-th-font-weight);color:var(--formie-table-th-color, var(--formie-gray-500))}.formie-table th,.formie-table td{padding:var(--formie-table-row-padding);vertical-align:top}.formie-table th:first-child,.formie-table td:first-child{padding-left:0}.formie-table th:last-child,.formie-table td:last-child{padding-right:0}.formie-table [data-col-remove]{width:calc(var(--formie-button-icon-button-size) + (var(--formie-table-row-padding) * 2));min-width:calc(var(--formie-button-icon-button-size) + (var(--formie-table-row-padding) * 2));white-space:nowrap;text-align:center;vertical-align:middle}.formie-table [data-formie-table-column-type=checkbox]{text-align:center;vertical-align:middle}.formie-table [data-formie-table-column-type=checkbox] .formie-checkbox-option{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--formie-check-size);margin:0}.formie-table [data-formie-table-column-type=checkbox] .formie-checkbox-option-label{display:block;width:var(--formie-check-size);min-width:var(--formie-check-size);height:var(--formie-check-size);margin:0 auto;padding-left:0;font-size:0;line-height:0}.formie-table [data-formie-table-column-type=checkbox] .formie-checkbox-option-label:before{position:static}.formie-table-color-input{min-width:4rem;padding:var(--formie-space-1)}.formie-table-multiline-input{min-height:calc(var(--formie-control-height) + var(--formie-space-2))}.formie-table-remove-button{display:inline-flex;vertical-align:middle}.formie-button.formie-table-add-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:auto;max-width:100%;justify-self:start;padding-left:var(--formie-table-add-button-padding-left)}.formie-button.formie-table-add-button:before{position:absolute;content:"";display:block;width:var(--formie-table-add-button-width);height:var(--formie-table-add-button-height);left:var(--formie-table-add-button-left);top:50%;transform:translateY(-50%);background-color:currentColor;-webkit-mask-image:var(--formie-table-add-button-icon-mask);mask-image:var(--formie-table-add-button-icon-mask);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}}', b = "[data-formie-table-field-layout]", H = "[data-formie-table]", _ = "[data-formie-table-body]", g = "[data-formie-table-row]", x = "[data-formie-table-add]", O = "[data-formie-table-remove]", y = "data-formie-template-id", k = "data-formie-table-row-id", s = "table";
|
|
5
|
+
M(s, [S]);
|
|
6
|
+
function z(e, o) {
|
|
7
|
+
return A(e, o);
|
|
8
|
+
}
|
|
9
|
+
function c(e) {
|
|
10
|
+
return e.querySelectorAll(g).length;
|
|
11
|
+
}
|
|
12
|
+
function B(e) {
|
|
13
|
+
return Array.from(e.querySelectorAll(g)).reduce((o, r) => {
|
|
14
|
+
const i = parseInt(r.getAttribute(k) || "", 10);
|
|
15
|
+
return Number.isNaN(i) ? o : Math.max(o, i + 1);
|
|
16
|
+
}, 0);
|
|
17
|
+
}
|
|
18
|
+
function p(e, o) {
|
|
19
|
+
if (!e)
|
|
20
|
+
return;
|
|
21
|
+
const r = parseInt(e.getAttribute("data-formie-max-rows") || "", 10);
|
|
22
|
+
e.disabled = r > 0 && o >= r;
|
|
23
|
+
}
|
|
24
|
+
function C(e, o) {
|
|
25
|
+
const r = e.querySelector(H), i = e.querySelector(_), t = e.querySelector(x);
|
|
26
|
+
if (!(r instanceof HTMLElement) || !(i instanceof HTMLElement))
|
|
27
|
+
return () => {
|
|
28
|
+
};
|
|
29
|
+
const u = /* @__PURE__ */ new Map();
|
|
30
|
+
let v = B(e);
|
|
31
|
+
const w = () => {
|
|
32
|
+
e.querySelectorAll(O).forEach((a) => {
|
|
33
|
+
if (!(a instanceof HTMLElement) || u.has(a))
|
|
34
|
+
return;
|
|
35
|
+
const n = (d) => {
|
|
36
|
+
d.preventDefault();
|
|
37
|
+
const l = a.closest(g);
|
|
38
|
+
if (!(l instanceof HTMLElement))
|
|
39
|
+
return;
|
|
40
|
+
const f = parseInt((t instanceof HTMLButtonElement ? t.getAttribute("data-formie-min-rows") : "") || "", 10);
|
|
41
|
+
f > 0 && c(e) <= f || (l.remove(), p(t instanceof HTMLButtonElement ? t : null, c(e)), h(e, s, "remove", {
|
|
42
|
+
table: e,
|
|
43
|
+
row: l
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
a.addEventListener("click", n), u.set(a, n);
|
|
47
|
+
});
|
|
48
|
+
}, T = async () => {
|
|
49
|
+
if (o.static || !(t instanceof HTMLButtonElement) || !t.getAttribute("data-formie-table-add"))
|
|
50
|
+
return;
|
|
51
|
+
const n = t.getAttribute(y) || e.getAttribute(y), d = parseInt(t.getAttribute("data-formie-max-rows") || "", 10);
|
|
52
|
+
if (d > 0 && c(e) >= d)
|
|
53
|
+
return;
|
|
54
|
+
const l = z(e, n);
|
|
55
|
+
if (!l)
|
|
56
|
+
return;
|
|
57
|
+
const f = L(l).replaceAll("__ROW__", String(v++)), m = document.createElement("tr");
|
|
58
|
+
m.setAttribute("data-formie-table-row", "true"), m.setAttribute(k, String(v - 1)), m.innerHTML = f, i.appendChild(m), await R(50), w(), p(t, c(e)), h(e, s, "append", {
|
|
59
|
+
table: e,
|
|
60
|
+
row: m
|
|
61
|
+
});
|
|
62
|
+
}, E = (a) => {
|
|
63
|
+
a.preventDefault(), T();
|
|
64
|
+
};
|
|
65
|
+
return t instanceof HTMLButtonElement && !o.static && t.addEventListener("click", E), w(), p(t instanceof HTMLButtonElement ? t : null, c(e)), h(e, s, "init", {
|
|
66
|
+
table: e
|
|
67
|
+
}), () => {
|
|
68
|
+
t instanceof HTMLButtonElement && t.removeEventListener("click", E), u.forEach((a, n) => {
|
|
69
|
+
n.removeEventListener("click", a);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const N = {
|
|
74
|
+
id: s,
|
|
75
|
+
kind: "field",
|
|
76
|
+
match: (e) => e.target instanceof HTMLElement && (e.target.matches(b) || !!e.target.querySelector(b)),
|
|
77
|
+
setup: async (e) => {
|
|
78
|
+
const o = e.options || {};
|
|
79
|
+
if (!(e.target instanceof HTMLElement))
|
|
80
|
+
return;
|
|
81
|
+
const r = e.target.matches(b) ? [e.target] : Array.from(e.target.querySelectorAll(b)).filter((t) => t instanceof HTMLElement), i = r.map((t) => C(t, o));
|
|
82
|
+
return await e.emit("formie:module:table:init", {
|
|
83
|
+
count: r.length
|
|
84
|
+
}), {
|
|
85
|
+
destroy: () => {
|
|
86
|
+
i.forEach((t) => {
|
|
87
|
+
t();
|
|
88
|
+
}), e.emit("formie:module:table:destroy", {});
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
N as tableModule
|
|
95
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { z as u } from "./index-BEsfee-D.js";
|
|
2
|
+
import { b as L, r as w, a as T } from "./shared-DGqeMvcJ.js";
|
|
3
|
+
import { e as v } from "./styles-C3aqgtek.js";
|
|
4
|
+
const C = "@layer formie-theme{.formie-limit-number{font-weight:var(--formie-font-weight-semibold);color:var(--formie-color-text)}.formie-limit-number-error{color:var(--formie-color-danger)}}", c = "input[data-formie-single-line-text-input], textarea[data-formie-multi-line-text-input]", E = [
|
|
5
|
+
"textMinCharacterLimit",
|
|
6
|
+
"textMaxCharacterLimit",
|
|
7
|
+
"textMinWordLimit",
|
|
8
|
+
"textMaxWordLimit"
|
|
9
|
+
], A = "text-limit", f = "data-formie-text-limit-allow-overtype", n = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
v("text-limit", [C]);
|
|
11
|
+
function d(t) {
|
|
12
|
+
return t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement;
|
|
13
|
+
}
|
|
14
|
+
function m(t, i) {
|
|
15
|
+
return parseInt(t.getAttribute(i) || "", 10) || 0;
|
|
16
|
+
}
|
|
17
|
+
function M(t) {
|
|
18
|
+
return t.hasAttribute("data-formie-min-chars") || t.hasAttribute("data-formie-max-chars") || t.hasAttribute("data-formie-min-words") || t.hasAttribute("data-formie-max-words");
|
|
19
|
+
}
|
|
20
|
+
function y(t) {
|
|
21
|
+
return t.hasAttribute("data-formie-max-chars") || t.hasAttribute("data-formie-max-words");
|
|
22
|
+
}
|
|
23
|
+
function h(t) {
|
|
24
|
+
return t.hasAttribute(f);
|
|
25
|
+
}
|
|
26
|
+
function x(t) {
|
|
27
|
+
return t.value === "";
|
|
28
|
+
}
|
|
29
|
+
function V(t) {
|
|
30
|
+
w(t, A, (i) => {
|
|
31
|
+
i.addValidator("textMinCharacterLimit", ({ input: e }) => {
|
|
32
|
+
if (!d(e))
|
|
33
|
+
return !0;
|
|
34
|
+
const r = m(e, "data-formie-min-chars");
|
|
35
|
+
return !r || x(e) ? !0 : u(e.value).graphemeCount >= r;
|
|
36
|
+
}, ({ label: e, input: r, t: a }) => a("{attribute} must be no less than {min} characters.", {
|
|
37
|
+
attribute: e,
|
|
38
|
+
min: r.getAttribute("data-formie-min-chars") || ""
|
|
39
|
+
})), i.addValidator("textMaxCharacterLimit", ({ input: e }) => {
|
|
40
|
+
if (!d(e) || h(e))
|
|
41
|
+
return !0;
|
|
42
|
+
const r = m(e, "data-formie-max-chars");
|
|
43
|
+
return !r || x(e) ? !0 : u(e.value).graphemeCount <= r;
|
|
44
|
+
}, ({ label: e, input: r, t: a }) => a("{attribute} must be no greater than {max} characters.", {
|
|
45
|
+
attribute: e,
|
|
46
|
+
max: r.getAttribute("data-formie-max-chars") || ""
|
|
47
|
+
})), i.addValidator("textMinWordLimit", ({ input: e }) => {
|
|
48
|
+
if (!d(e))
|
|
49
|
+
return !0;
|
|
50
|
+
const r = m(e, "data-formie-min-words");
|
|
51
|
+
return !r || e.value.trim() === "" ? !0 : u(e.value).wordCount >= r;
|
|
52
|
+
}, ({ label: e, input: r, t: a }) => a("{attribute} must be no less than {min} words.", {
|
|
53
|
+
attribute: e,
|
|
54
|
+
min: r.getAttribute("data-formie-min-words") || ""
|
|
55
|
+
})), i.addValidator("textMaxWordLimit", ({ input: e }) => {
|
|
56
|
+
if (!d(e) || h(e))
|
|
57
|
+
return !0;
|
|
58
|
+
const r = m(e, "data-formie-max-words");
|
|
59
|
+
return !r || e.value.trim() === "" ? !0 : u(e.value).wordCount <= r;
|
|
60
|
+
}, ({ label: e, input: r, t: a }) => a("{attribute} must be no greater than {max} words.", {
|
|
61
|
+
attribute: e,
|
|
62
|
+
max: r.getAttribute("data-formie-max-words") || ""
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function I(t) {
|
|
67
|
+
T(t, A, E);
|
|
68
|
+
}
|
|
69
|
+
function O(t) {
|
|
70
|
+
if (n.has(t))
|
|
71
|
+
return n.get(t) || null;
|
|
72
|
+
const i = t.closest("[data-formie-field-handle]");
|
|
73
|
+
if (!i)
|
|
74
|
+
return n.set(t, null), null;
|
|
75
|
+
const e = i.querySelector("[data-formie-limit-text]");
|
|
76
|
+
if (e)
|
|
77
|
+
return n.set(t, e), e;
|
|
78
|
+
const r = i.querySelector("[data-formie-field-control]"), a = document.createElement("div");
|
|
79
|
+
return a.className = "formie-field-limit formie-limit-text", a.setAttribute("data-formie-field-limit", "true"), a.setAttribute("data-formie-limit-text", "true"), r?.parentElement ? (r.insertAdjacentElement("afterend", a), n.set(t, a), a) : (i.appendChild(a), n.set(t, a), a);
|
|
80
|
+
}
|
|
81
|
+
function b(t, i, e) {
|
|
82
|
+
const r = document.createElement("span");
|
|
83
|
+
r.className = i < 0 ? "formie-limit-number formie-limit-number-error" : "formie-limit-number", r.textContent = String(i), t.replaceChildren(
|
|
84
|
+
r,
|
|
85
|
+
document.createTextNode(` ${Math.abs(i) === 1 ? e : `${e}s`} left`)
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function g(t) {
|
|
89
|
+
const i = m(t, "data-formie-max-chars"), e = m(t, "data-formie-max-words"), r = O(t);
|
|
90
|
+
if (!r)
|
|
91
|
+
return;
|
|
92
|
+
const a = u(t.value);
|
|
93
|
+
if (i > 0) {
|
|
94
|
+
const s = i - a.graphemeCount;
|
|
95
|
+
b(r, s, "character");
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (e > 0) {
|
|
99
|
+
const s = e - a.wordCount;
|
|
100
|
+
b(r, s, "word");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const _ = {
|
|
104
|
+
id: "text-limit",
|
|
105
|
+
kind: "field",
|
|
106
|
+
match: (t) => !!t.target.querySelector(c),
|
|
107
|
+
setup: async (t) => {
|
|
108
|
+
const i = t.options || {}, e = L(t), r = Array.from((e || t.target).querySelectorAll(c)).filter((o) => (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement) && M(o)), a = r.filter((o) => y(o));
|
|
109
|
+
i.allowOvertype && r.forEach((o) => {
|
|
110
|
+
o.setAttribute(f, "true");
|
|
111
|
+
}), V(t.form);
|
|
112
|
+
const s = a.map((o) => {
|
|
113
|
+
const l = () => {
|
|
114
|
+
g(o);
|
|
115
|
+
};
|
|
116
|
+
return o.addEventListener("input", l), o.addEventListener("change", l), g(o), () => {
|
|
117
|
+
o.removeEventListener("input", l), o.removeEventListener("change", l);
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
return await t.emit("formie:module:text-limit:init", {
|
|
121
|
+
count: r.length
|
|
122
|
+
}), {
|
|
123
|
+
destroy: () => {
|
|
124
|
+
s.forEach((o) => {
|
|
125
|
+
o();
|
|
126
|
+
}), i.allowOvertype && r.forEach((o) => {
|
|
127
|
+
o.removeAttribute(f);
|
|
128
|
+
}), I(t.form), t.emit("formie:module:text-limit:destroy", {});
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
export {
|
|
134
|
+
_ as textLimitModule
|
|
135
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { a as s, c as u, f as i, b as d, C as p } from "./index-C1ZOKiAi.js";
|
|
2
|
+
import { l as f } from "./scripts-BkAAux0i.js";
|
|
3
|
+
function m(e) {
|
|
4
|
+
const r = e.appearance || "always";
|
|
5
|
+
return (e.execution || (r === "execute" ? "execute" : "render")) === "execute" ? u : i;
|
|
6
|
+
}
|
|
7
|
+
async function _(e) {
|
|
8
|
+
const { async: r, defer: t } = d(e.loadingMethod);
|
|
9
|
+
return f("turnstile", {
|
|
10
|
+
id: "FORMIE_TURNSTILE_SCRIPT",
|
|
11
|
+
src: "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",
|
|
12
|
+
async: r,
|
|
13
|
+
defer: t,
|
|
14
|
+
timeoutMs: p
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const A = s({
|
|
18
|
+
id: "turnstile",
|
|
19
|
+
defaultPlaceholderSelector: "[data-turnstile-placeholder]",
|
|
20
|
+
defaultTokenFieldNames: ["cf-turnstile-response"],
|
|
21
|
+
load: ({ options: e }) => _(e.provider),
|
|
22
|
+
mount: ({ api: e, container: r, provider: t, services: a }) => {
|
|
23
|
+
const l = t.appearance || "always", o = t.execution || (l === "execute" ? "execute" : "render");
|
|
24
|
+
return e.render(r, {
|
|
25
|
+
sitekey: t.siteKey || "",
|
|
26
|
+
theme: t.theme || "auto",
|
|
27
|
+
size: t.size || "normal",
|
|
28
|
+
appearance: l,
|
|
29
|
+
execution: o,
|
|
30
|
+
callback: (n) => {
|
|
31
|
+
typeof n == "string" && n.trim() !== "" && a.tokens.write(n.trim()), a.errors.clear();
|
|
32
|
+
},
|
|
33
|
+
"expired-callback": () => {
|
|
34
|
+
a.tokens.clear(), a.errors.clear();
|
|
35
|
+
},
|
|
36
|
+
"timeout-callback": () => {
|
|
37
|
+
a.tokens.clear(), a.errors.clear();
|
|
38
|
+
},
|
|
39
|
+
"error-callback": () => {
|
|
40
|
+
a.tokens.clear();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
screen: ({ api: e, widget: r, placeholder: t, services: a, provider: l, stageCtx: o }) => {
|
|
45
|
+
if (!a.tokens.has())
|
|
46
|
+
return e.execute(r), a.tokens.wait(m(l)).then((n) => {
|
|
47
|
+
if (!n) {
|
|
48
|
+
const c = a.errors.getDefaultMessage();
|
|
49
|
+
a.errors.show(c, t), o.abort(c);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
unmount: ({ api: e, widget: r, services: t }) => {
|
|
54
|
+
e.reset(r), t.tokens.clear();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
A as turnstileModule
|
|
59
|
+
};
|