@verbb/formie-browser 1.0.0 → 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.
Files changed (120) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/chunks/address-finder-CQW81kY0.js +37 -0
  3. package/dist/chunks/bpoint-D8OjLmsn.js +26 -0
  4. package/dist/chunks/calculations-BqZsENCq.js +147 -0
  5. package/dist/chunks/captcha-eu-DIa6aUWz.js +34 -0
  6. package/dist/chunks/checkbox-radio-BI-UjgMF.js +136 -0
  7. package/dist/chunks/conditions-BVl6jTYo.js +433 -0
  8. package/dist/chunks/date-picker-69TgvErA.js +4994 -0
  9. package/dist/chunks/eway-1GPxH6DU.js +74 -0
  10. package/dist/chunks/file-upload-BDZZftgL.js +281 -0
  11. package/dist/chunks/friendly-captcha-v1-DA2QPKA3.js +33 -0
  12. package/dist/chunks/friendly-captcha-v2-BorOWiz_.js +38 -0
  13. package/dist/chunks/go-cardless-DwBgERcA.js +24 -0
  14. package/dist/chunks/google-address-BcTBncyS.js +162 -0
  15. package/dist/chunks/hcaptcha-BchdVCqq.js +56 -0
  16. package/dist/chunks/hidden-D8RqSPt7.js +31 -0
  17. package/dist/chunks/index-BEsfee-D.js +1839 -0
  18. package/dist/chunks/index-BP7Unm5Y.js +863 -0
  19. package/dist/chunks/index-C1ZOKiAi.js +4229 -0
  20. package/dist/chunks/loqate-nXuTX7In.js +55 -0
  21. package/dist/chunks/mollie-qdCynQCd.js +24 -0
  22. package/dist/chunks/moneris-BNEA-laO.js +101 -0
  23. package/dist/chunks/opayo-BJtXOkuK.js +122 -0
  24. package/dist/chunks/paddle-D72Pa8kr.js +60 -0
  25. package/dist/chunks/paypal-Cqt2bned.js +100 -0
  26. package/dist/chunks/payway-BjCqsc0H.js +56 -0
  27. package/dist/chunks/phone-country-K9pYAlzM.js +3765 -0
  28. package/dist/chunks/place-kit-Dg6f_UoM.js +42 -0
  29. package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
  30. package/dist/chunks/recaptcha-enterprise--VYAeeqz.js +71 -0
  31. package/dist/chunks/recaptcha-shared-PSIEEEe1.js +15 -0
  32. package/dist/chunks/recaptcha-v2-checkbox-atBNe5ml.js +41 -0
  33. package/dist/chunks/recaptcha-v2-invisible-DnBufNPT.js +59 -0
  34. package/dist/chunks/recaptcha-v3-CF6O8rDj.js +28 -0
  35. package/dist/chunks/repeater-CB7Yojvx.js +124 -0
  36. package/dist/chunks/rich-text-nAV_SQZo.js +304 -0
  37. package/dist/chunks/scripts-BkAAux0i.js +36 -0
  38. package/dist/chunks/sdk-3SicTWby.js +1559 -0
  39. package/dist/chunks/shared-DGqeMvcJ.js +80 -0
  40. package/dist/chunks/signature-BT6CsQ6n.js +550 -0
  41. package/dist/chunks/snaptcha-C7qQo02f.js +8 -0
  42. package/dist/chunks/square-C5AH3trb.js +46 -0
  43. package/dist/chunks/stripe-EJK0RyUv.js +202 -0
  44. package/dist/chunks/styles-C3aqgtek.js +21 -0
  45. package/dist/chunks/summary-DC_ipXCU.js +126 -0
  46. package/dist/chunks/table-BEAI99qo.js +95 -0
  47. package/dist/chunks/text-limit-Blgq5G-G.js +135 -0
  48. package/dist/chunks/turnstile-_uCRwnU-.js +59 -0
  49. package/dist/chunks/utils-BntI3W4S.js +6149 -0
  50. package/dist/index.js +39 -3205
  51. package/package.json +5 -5
  52. package/src/js/modules/fields/file-upload.ts +1 -1
  53. package/src/js/modules/fields/repeater.ts +1 -1
  54. package/src/js/modules/fields/rich-text.ts +2 -2
  55. package/src/js/modules/fields/signature.ts +1 -1
  56. package/src/js/modules/fields/summary.ts +1 -1
  57. package/src/js/modules/fields/table.ts +1 -1
  58. package/src/js/modules/fields/text-limit.ts +1 -1
  59. package/src/js/modules/payments/paypal.ts +1 -1
  60. package/src/js/modules/payments/payway.ts +1 -1
  61. package/src/js/modules/payments/stripe.ts +1 -1
  62. package/dist/chunks/address-finder-DfMCiW89.js +0 -47
  63. package/dist/chunks/api-CbqEMQT5.js +0 -181
  64. package/dist/chunks/api-DE7LfK-R.js +0 -960
  65. package/dist/chunks/api-DOfDzYC_.js +0 -538
  66. package/dist/chunks/async-B3DUf1GZ.js +0 -26
  67. package/dist/chunks/bpoint-Ciy3yY9Q.js +0 -34
  68. package/dist/chunks/calculations-CkYAqO_-.js +0 -197
  69. package/dist/chunks/captcha-eu-DnOWhMwr.js +0 -43
  70. package/dist/chunks/checkbox-radio-0x7Tc0br.js +0 -197
  71. package/dist/chunks/chunk-K6L4z4UQ.js +0 -24
  72. package/dist/chunks/conditions-4fXKhEJS.js +0 -609
  73. package/dist/chunks/date-picker-B6iZkjHS.js +0 -6204
  74. package/dist/chunks/debug-KnZeKYBI.js +0 -39
  75. package/dist/chunks/dist-D09GnXMW.js +0 -2663
  76. package/dist/chunks/event-names-DamGPtXR.js +0 -51
  77. package/dist/chunks/eway-DEAYcwT0.js +0 -86
  78. package/dist/chunks/field-references.keys-BpBZ_quS.js +0 -24
  79. package/dist/chunks/field-references.resolver-Ba6xhiJC.js +0 -183
  80. package/dist/chunks/file-upload-Bh63PQSE.js +0 -430
  81. package/dist/chunks/friendly-captcha-v1-CqO4WVre.js +0 -40
  82. package/dist/chunks/friendly-captcha-v2-CyykcJcM.js +0 -47
  83. package/dist/chunks/friendly-challenge-Dg8XkStd.js +0 -1101
  84. package/dist/chunks/go-cardless-CuND59rR.js +0 -26
  85. package/dist/chunks/google-address--uR8WDSm.js +0 -208
  86. package/dist/chunks/hcaptcha-CmaFUesv.js +0 -72
  87. package/dist/chunks/hidden-CYnZYple.js +0 -36
  88. package/dist/chunks/http-18nn97DZ.js +0 -29
  89. package/dist/chunks/i18n-vUh-KGiH.js +0 -55
  90. package/dist/chunks/loqate-BICNJlVK.js +0 -97
  91. package/dist/chunks/mollie-DwlsgHZ1.js +0 -26
  92. package/dist/chunks/moneris-B_IFZFTx.js +0 -159
  93. package/dist/chunks/opayo-U2x_TOII.js +0 -192
  94. package/dist/chunks/paddle-BqXFrc79.js +0 -75
  95. package/dist/chunks/paypal-Cn_DYGDb.js +0 -121
  96. package/dist/chunks/payway-Rnq796eC.js +0 -75
  97. package/dist/chunks/phone-country-B6Me4lK0.js +0 -3317
  98. package/dist/chunks/place-kit-ldUl-u9w.js +0 -56
  99. package/dist/chunks/placekit-autocomplete.esm-D-lGeaZl.js +0 -1771
  100. package/dist/chunks/recaptcha-enterprise-DPJNyv1X.js +0 -72
  101. package/dist/chunks/recaptcha-shared-DTI4qWVR.js +0 -22
  102. package/dist/chunks/recaptcha-v2-checkbox-zFjpvJ5c.js +0 -49
  103. package/dist/chunks/recaptcha-v2-invisible-CnYtkNvz.js +0 -62
  104. package/dist/chunks/recaptcha-v3-EAlWhnkX.js +0 -33
  105. package/dist/chunks/repeater-CXD1eLSn.js +0 -151
  106. package/dist/chunks/rich-text-DkmZRhGj.js +0 -442
  107. package/dist/chunks/scripts-BGD_iU_6.js +0 -41
  108. package/dist/chunks/sdk-B7u9fTlP.js +0 -2103
  109. package/dist/chunks/shared-DC6_1u8X.js +0 -85
  110. package/dist/chunks/signature-E9KyYXS1.js +0 -765
  111. package/dist/chunks/snaptcha-CCDunGeb.js +0 -8
  112. package/dist/chunks/square-BLqK51rS.js +0 -61
  113. package/dist/chunks/stripe-B8gHpZNC.js +0 -273
  114. package/dist/chunks/styles-BIh6g7V_.js +0 -22
  115. package/dist/chunks/summary-EcNE0cvg.js +0 -191
  116. package/dist/chunks/table-yxEDL6kA.js +0 -124
  117. package/dist/chunks/text-limit-D0H_Ca2c.js +0 -179
  118. package/dist/chunks/theme-classes-vSHpdCUO.js +0 -59
  119. package/dist/chunks/turnstile-DP0bdR7T.js +0 -68
  120. package/dist/chunks/utils-ByrEVYrJ.js +0 -49584
@@ -1,85 +0,0 @@
1
- import { r as getFieldModuleEventName } from "./event-names-DamGPtXR.js";
2
- //#region src/js/modules/fields/shared.ts
3
- var fallbackCssEscape = (value) => {
4
- return value.replace(/["\\]/g, "\\$&");
5
- };
6
- var validatorRegistrations = /* @__PURE__ */ new WeakMap();
7
- function escapeSelectorValue(value) {
8
- if (typeof window.CSS?.escape === "function") return window.CSS.escape(value);
9
- return fallbackCssEscape(value);
10
- }
11
- function getModuleFieldContainers(ctx) {
12
- if (ctx.target instanceof HTMLElement && ctx.target.hasAttribute("data-formie-field-handle")) return [ctx.target];
13
- if (ctx.target instanceof HTMLElement) return Array.from(ctx.target.querySelectorAll("[data-formie-field-handle]")).filter((element) => {
14
- return element instanceof HTMLElement;
15
- });
16
- return [];
17
- }
18
- function getModuleFieldTarget(ctx) {
19
- return getModuleFieldContainers(ctx)[0] || null;
20
- }
21
- function getFormValidator(form) {
22
- if (!form) return null;
23
- return form.formieValidation || null;
24
- }
25
- function retainFormValidators(form, key, register) {
26
- if (!form) return;
27
- const formRegistrations = validatorRegistrations.get(form) || /* @__PURE__ */ new Map();
28
- const currentCount = formRegistrations.get(key) || 0;
29
- if (currentCount === 0) {
30
- const validator = getFormValidator(form);
31
- if (validator) register(validator);
32
- }
33
- formRegistrations.set(key, currentCount + 1);
34
- validatorRegistrations.set(form, formRegistrations);
35
- }
36
- function releaseFormValidators(form, key, validatorNames) {
37
- if (!form) return;
38
- const formRegistrations = validatorRegistrations.get(form);
39
- const currentCount = formRegistrations?.get(key) || 0;
40
- if (currentCount <= 1) {
41
- const validator = getFormValidator(form);
42
- validatorNames.forEach((validatorName) => {
43
- validator?.removeValidator(validatorName);
44
- });
45
- formRegistrations?.delete(key);
46
- if (!formRegistrations || formRegistrations.size === 0) {
47
- validatorRegistrations.delete(form);
48
- return;
49
- }
50
- validatorRegistrations.set(form, formRegistrations);
51
- return;
52
- }
53
- formRegistrations?.set(key, currentCount - 1);
54
- }
55
- function getOwnerDocument(root) {
56
- return root.ownerDocument || document;
57
- }
58
- function getTemplateSource(root, templateId) {
59
- const doc = getOwnerDocument(root);
60
- if (templateId) {
61
- const explicitCandidates = [
62
- root.querySelector(`template[data-formie-template-id="${escapeSelectorValue(templateId)}"]`),
63
- root.querySelector(`script[data-formie-template-id="${escapeSelectorValue(templateId)}"]`),
64
- doc.querySelector(`template[data-formie-template-id="${escapeSelectorValue(templateId)}"]`),
65
- doc.querySelector(`script[data-formie-template-id="${escapeSelectorValue(templateId)}"]`),
66
- doc.getElementById(templateId)
67
- ];
68
- for (const candidate of explicitCandidates) if (candidate instanceof HTMLTemplateElement || candidate instanceof HTMLScriptElement) return candidate;
69
- }
70
- return null;
71
- }
72
- function getTemplateSourceHtml(source) {
73
- if (source instanceof HTMLTemplateElement) return source.innerHTML;
74
- if (source instanceof HTMLScriptElement) return source.textContent || "";
75
- return source.innerHTML;
76
- }
77
- function dispatchFieldEvent(target, moduleId, name, detail) {
78
- const eventName = getFieldModuleEventName(moduleId, name);
79
- target.dispatchEvent(new CustomEvent(eventName, {
80
- bubbles: true,
81
- detail
82
- }));
83
- }
84
- //#endregion
85
- export { getTemplateSource as a, retainFormValidators as c, getModuleFieldTarget as i, escapeSelectorValue as n, getTemplateSourceHtml as o, getModuleFieldContainers as r, releaseFormValidators as s, dispatchFieldEvent as t };