@verbb/formie-browser 1.0.6 → 1.0.7

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 (74) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/chunks/{address-finder-yXU5yMjG.js → address-finder-k7_BXaRe.js} +1 -1
  3. package/dist/chunks/{api-DMK8NSUI.js → api-BUb6P-xu.js} +57 -51
  4. package/dist/chunks/{api-CmwLRq_n.js → api-DztsCJ4r.js} +178 -170
  5. package/dist/chunks/{bpoint-DSjqRv63.js → bpoint-2qDxlKD9.js} +1 -1
  6. package/dist/chunks/{captcha-eu-CWJb64_j.js → captcha-eu-CGm8Lbrj.js} +2 -2
  7. package/dist/chunks/{conditions-DjZOtHfS.js → conditions-B6_nzpeE.js} +95 -83
  8. package/dist/chunks/{eway-D3ctTbEk.js → eway-CImXrB4g.js} +2 -2
  9. package/dist/chunks/{friendly-captcha-v1-ByXzENYZ.js → friendly-captcha-v1-C_2reOXr.js} +1 -1
  10. package/dist/chunks/{friendly-captcha-v2-BPdlmhQu.js → friendly-captcha-v2-CLSAbkqx.js} +1 -1
  11. package/dist/chunks/{go-cardless-BwASSYSK.js → go-cardless-Bz7HHtH0.js} +1 -1
  12. package/dist/chunks/{google-address-OhKilPWE.js → google-address-BH3Zhi06.js} +1 -1
  13. package/dist/chunks/{hcaptcha-CdCd9oEi.js → hcaptcha-CGLAmgjO.js} +2 -2
  14. package/dist/chunks/{loqate-Cp2zvwpE.js → loqate-CJPzBmSm.js} +1 -1
  15. package/dist/chunks/{mollie-COG-ko2D.js → mollie-BtnB3KGh.js} +1 -1
  16. package/dist/chunks/{moneris-CMH8PlRc.js → moneris-Bd4vUk8b.js} +1 -1
  17. package/dist/chunks/{opayo-D2jsR5vh.js → opayo-B-eRIXo-.js} +4 -4
  18. package/dist/chunks/{paddle-DxF88RfC.js → paddle-BUFeEU4d.js} +2 -2
  19. package/dist/chunks/{paypal-b5pnwrA2.js → paypal-8Euw7Hrn.js} +2 -2
  20. package/dist/chunks/{payway-BJYu9DIR.js → payway-dV0SzJxy.js} +2 -2
  21. package/dist/chunks/{recaptcha-enterprise-BSwi8IVX.js → recaptcha-enterprise-XPId5-bS.js} +19 -20
  22. package/dist/chunks/{recaptcha-shared-B4zAescW.js → recaptcha-shared-CLYJvojk.js} +15 -3
  23. package/dist/chunks/{recaptcha-v2-checkbox-CnDQmsKa.js → recaptcha-v2-checkbox-Cy-0PEPc.js} +2 -2
  24. package/dist/chunks/{recaptcha-v2-invisible-Cz5uIlp-.js → recaptcha-v2-invisible-BwRH540O.js} +2 -2
  25. package/dist/chunks/recaptcha-v3-No4Ykrhk.js +28 -0
  26. package/dist/chunks/scripts-CbQ7agX3.js +30 -0
  27. package/dist/chunks/{snaptcha-vz1RnZ15.js → snaptcha-DKx98oon.js} +1 -1
  28. package/dist/chunks/{square-BP8RWAKB.js → square-reyJukb7.js} +2 -2
  29. package/dist/chunks/{stripe-MihN63uC.js → stripe-BC-2PBvY.js} +2 -2
  30. package/dist/chunks/{turnstile-D_Pi1CKM.js → turnstile-DJakPzQD.js} +3 -3
  31. package/dist/index.js +624 -574
  32. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  33. package/dist/js/core/error-aria-live.d.ts +6 -0
  34. package/dist/js/core/error-aria-live.d.ts.map +1 -0
  35. package/dist/js/core/submit-result-state.d.ts.map +1 -1
  36. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  37. package/dist/js/modules/captchas/factories.d.ts.map +1 -1
  38. package/dist/js/modules/captchas/host.d.ts +1 -0
  39. package/dist/js/modules/captchas/host.d.ts.map +1 -1
  40. package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -1
  41. package/dist/js/modules/captchas/recaptcha-shared.d.ts +1 -0
  42. package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -1
  43. package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
  44. package/dist/js/modules/captchas/turnstile.d.ts.map +1 -1
  45. package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -1
  46. package/dist/js/utils/form-started-at.d.ts +2 -0
  47. package/dist/js/utils/form-started-at.d.ts.map +1 -0
  48. package/dist/js/utils/scripts.d.ts.map +1 -1
  49. package/dist/js/utils/unload-warning.d.ts.map +1 -1
  50. package/dist/js/validation/enter-key-guard.d.ts +2 -0
  51. package/dist/js/validation/enter-key-guard.d.ts.map +1 -0
  52. package/dist/js/validation/types.d.ts +1 -0
  53. package/dist/js/validation/types.d.ts.map +1 -1
  54. package/dist/js/validation/validator.d.ts.map +1 -1
  55. package/package.json +2 -2
  56. package/src/js/core/create-formie-client.ts +7 -0
  57. package/src/js/core/error-aria-live.ts +45 -0
  58. package/src/js/core/submit-result-state.ts +4 -0
  59. package/src/js/core/submit-result-ui.ts +8 -4
  60. package/src/js/modules/captchas/factories.ts +4 -0
  61. package/src/js/modules/captchas/host.ts +14 -2
  62. package/src/js/modules/captchas/recaptcha-enterprise.ts +14 -11
  63. package/src/js/modules/captchas/recaptcha-shared.ts +14 -0
  64. package/src/js/modules/captchas/recaptcha-v3.ts +7 -4
  65. package/src/js/modules/captchas/turnstile.ts +9 -3
  66. package/src/js/modules/fields/conditions/effects.ts +42 -0
  67. package/src/js/utils/form-started-at.ts +25 -0
  68. package/src/js/utils/scripts.ts +16 -0
  69. package/src/js/utils/unload-warning.ts +1 -0
  70. package/src/js/validation/enter-key-guard.ts +63 -0
  71. package/src/js/validation/types.ts +1 -0
  72. package/src/js/validation/validator.ts +14 -5
  73. package/dist/chunks/recaptcha-v3-BtbbP111.js +0 -27
  74. package/dist/chunks/scripts-6CYSUGKQ.js +0 -24
@@ -0,0 +1,28 @@
1
+ import { t as e } from "./api-BUb6P-xu.js";
2
+ import { n as t, t as n } from "./recaptcha-shared-CLYJvojk.js";
3
+ //#region src/js/modules/captchas/recaptcha-v3.ts
4
+ var r = e({
5
+ id: "recaptcha-v3",
6
+ defaultPlaceholderSelector: "[data-recaptcha-placeholder]",
7
+ defaultTokenFieldNames: ["g-recaptcha-response"],
8
+ load: ({ options: e }) => n(e.provider, !1, e.provider.siteKey || void 0),
9
+ mount: ({ api: e, provider: t }) => new Promise((n) => {
10
+ e.ready(() => {
11
+ n(t.siteKey || "recaptcha-v3");
12
+ });
13
+ }),
14
+ screen: async ({ api: e, provider: n, placeholder: r, services: i, stageCtx: a }) => {
15
+ if (!i.tokens.has() && (await t(e, async () => {
16
+ let t = await e.execute(n.siteKey || "", { action: n.action || "submit" });
17
+ typeof t == "string" && t.trim() !== "" && i.tokens.write(t.trim());
18
+ }), !await i.tokens.wait(12e4))) {
19
+ let e = i.errors.getDefaultMessage();
20
+ i.errors.show(e, r), a.abort(e);
21
+ }
22
+ },
23
+ unmount: ({ services: e }) => {
24
+ e.tokens.clear();
25
+ }
26
+ });
27
+ //#endregion
28
+ export { r as recaptchaV3Module };
@@ -0,0 +1,30 @@
1
+ import { r as e } from "./async-nPFRNQ06.js";
2
+ //#region src/js/utils/scripts.ts
3
+ var t = /* @__PURE__ */ new Map();
4
+ function n() {
5
+ let e = document.querySelector("meta[property=\"csp-nonce\"], meta[name=\"csp-nonce\"]");
6
+ return e && (e.nonce || e.getAttribute("nonce") || e.getAttribute("content")) || null;
7
+ }
8
+ async function r(t, n = 5e3) {
9
+ return e(() => window[t] ?? null, {
10
+ timeoutMs: n,
11
+ intervalMs: 30
12
+ });
13
+ }
14
+ async function i({ id: e, src: r, async: i = !0, defer: a = !0 }) {
15
+ return document.getElementById(e) || (t.has(e) || t.set(e, new Promise((o, s) => {
16
+ let c = document.createElement("script");
17
+ c.id = e, c.src = r, c.async = i, c.defer = a;
18
+ let l = n();
19
+ l && c.setAttribute("nonce", l), c.onload = () => {
20
+ o(c);
21
+ }, c.onerror = () => {
22
+ t.delete(e), s(/* @__PURE__ */ Error(`Failed to load external script: ${r}`));
23
+ }, document.body.appendChild(c);
24
+ })), t.get(e));
25
+ }
26
+ async function a(e, t) {
27
+ return window[e] ?? (await i(t), r(e, t.timeoutMs));
28
+ }
29
+ //#endregion
30
+ export { i as n, a as r, r as t };
@@ -1,4 +1,4 @@
1
- import { n as e } from "./api-DMK8NSUI.js";
1
+ import { n as e } from "./api-BUb6P-xu.js";
2
2
  //#region src/js/modules/captchas/snaptcha.ts
3
3
  var t = e({
4
4
  id: "snaptcha",
@@ -1,5 +1,5 @@
1
- import { t as e } from "./api-CmwLRq_n.js";
2
- import { r as t } from "./scripts-6CYSUGKQ.js";
1
+ import { t as e } from "./api-DztsCJ4r.js";
2
+ import { r as t } from "./scripts-CbQ7agX3.js";
3
3
  //#region src/js/modules/payments/square.ts
4
4
  var n = "FORMIE_SQUARE_SCRIPT", r = e({
5
5
  id: "square",
@@ -1,7 +1,7 @@
1
1
  import { s as e } from "./event-names-BCI2FLD8.js";
2
- import { t } from "./api-CmwLRq_n.js";
2
+ import { t } from "./api-DztsCJ4r.js";
3
3
  import { r as n, t as r } from "./theme-classes-Tv7q7ToE.js";
4
- import { r as i } from "./scripts-6CYSUGKQ.js";
4
+ import { r as i } from "./scripts-CbQ7agX3.js";
5
5
  import { t as a } from "./styles-BfoIZwJp.js";
6
6
  //#endregion
7
7
  //#region src/js/modules/payments/stripe.ts
@@ -1,5 +1,5 @@
1
- import { a as e, i as t, o as n, r, t as i } from "./api-DMK8NSUI.js";
2
- import { r as a } from "./scripts-6CYSUGKQ.js";
1
+ import { a as e, i as t, o as n, r, t as i } from "./api-BUb6P-xu.js";
2
+ import { r as a } from "./scripts-CbQ7agX3.js";
3
3
  //#region src/js/modules/captchas/turnstile.ts
4
4
  function o(e) {
5
5
  let r = e.appearance || "always";
@@ -51,7 +51,7 @@ var c = i({
51
51
  });
52
52
  },
53
53
  unmount: ({ api: e, widget: t, services: n }) => {
54
- e.reset(t), n.tokens.clear();
54
+ typeof e.remove == "function" ? e.remove(t) : e.reset(t), n.tokens.clear();
55
55
  }
56
56
  });
57
57
  //#endregion