@verbb/formie-browser 1.0.16 → 1.0.17-next.7.gf88643cc06da

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 (35) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/chunks/{address-state-CHKit8AW.js → address-state-D9KfV-qB.js} +1 -1
  3. package/dist/chunks/{combobox-CJh2DoSO.js → combobox-B6ROYFW7.js} +1 -1
  4. package/dist/chunks/date-picker-dp41TnRq.js +5351 -0
  5. package/dist/chunks/{hcaptcha-COilLmRT.js → hcaptcha-lseqzFTP.js} +14 -14
  6. package/dist/chunks/phone-country-BMyw-Qcz.js +2647 -0
  7. package/dist/chunks/{upload-manager-Ccg3d_4I.js → upload-manager-CkmsPJRl.js} +1 -1
  8. package/dist/index.js +407 -386
  9. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  10. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  11. package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -1
  12. package/dist/js/modules/fields/combobox.d.ts.map +1 -1
  13. package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
  14. package/dist/js/modules/fields/upload-manager.d.ts.map +1 -1
  15. package/dist/js/modules/loader.d.ts.map +1 -1
  16. package/dist/js/theme/message-attributes.d.ts +4 -0
  17. package/dist/js/theme/message-attributes.d.ts.map +1 -0
  18. package/dist/js/transport/forms-api.d.ts +1 -1
  19. package/dist/js/transport/forms-api.d.ts.map +1 -1
  20. package/dist/js/validation/validator.d.ts.map +1 -1
  21. package/package.json +6 -4
  22. package/src/js/core/create-formie-client.ts +49 -33
  23. package/src/js/core/submit-result-ui.ts +10 -2
  24. package/src/js/modules/captchas/hcaptcha.ts +3 -2
  25. package/src/js/modules/fields/combobox.ts +4 -0
  26. package/src/js/modules/fields/date-picker.ts +3 -3
  27. package/src/js/modules/fields/phone-country.ts +25 -17
  28. package/src/js/modules/fields/upload-manager.ts +3 -2
  29. package/src/js/modules/loader.ts +7 -0
  30. package/src/js/theme/message-attributes.ts +54 -0
  31. package/src/js/transport/forms-api.ts +6 -1
  32. package/src/js/validation/validator.ts +3 -2
  33. package/src/vendor.d.ts +2 -3
  34. package/dist/chunks/date-picker-BVJxJVYT.js +0 -5321
  35. package/dist/chunks/phone-country-Bx9EG50h.js +0 -2645
@@ -1,26 +1,26 @@
1
- import { a as e, r as t, t as n } from "./api-BPtH5RBA.js";
2
- import { n as r, t as i } from "./scripts-DrccjrFv.js";
1
+ import { a as e, i as t, r as n, t as r } from "./api-BPtH5RBA.js";
2
+ import { n as i, t as a } from "./scripts-DrccjrFv.js";
3
3
  //#region src/js/modules/captchas/hcaptcha.ts
4
- async function a(n) {
5
- let a = typeof n.language == "string" && n.language.trim() !== "" ? n.language.trim() : "en", { async: o, defer: s } = t(n.loadingMethod), c = "FORMIE_HCAPTCHA_ONLOAD", l = window, u = l.hcaptcha;
4
+ async function o(t) {
5
+ let r = typeof t.language == "string" && t.language.trim() !== "" ? t.language.trim() : "en", { async: o, defer: s } = n(t.loadingMethod), c = "FORMIE_HCAPTCHA_ONLOAD", l = window, u = l.hcaptcha;
6
6
  if (u) return u;
7
7
  let d = new Promise((e) => {
8
8
  l[c] = () => {
9
9
  delete l[c], e();
10
10
  };
11
11
  });
12
- return await r({
12
+ return await i({
13
13
  id: "FORMIE_HCAPTCHA_SCRIPT",
14
- src: `https://js.hcaptcha.com/1/api.js?recaptchacompat=off&render=explicit&onload=FORMIE_HCAPTCHA_ONLOAD&hl=${encodeURIComponent(a)}`,
14
+ src: `https://js.hcaptcha.com/1/api.js?recaptchacompat=off&render=explicit&onload=FORMIE_HCAPTCHA_ONLOAD&hl=${encodeURIComponent(r)}`,
15
15
  async: o,
16
16
  defer: s
17
- }), await d, i("hcaptcha", e);
17
+ }), await d, a("hcaptcha", e);
18
18
  }
19
- var o = n({
19
+ var s = r({
20
20
  moduleId: "formie:hcaptcha",
21
21
  defaultPlaceholderSelector: "[data-hcaptcha-placeholder]",
22
22
  defaultTokenFieldNames: ["h-captcha-response"],
23
- load: ({ options: e }) => a(e.provider),
23
+ load: ({ options: e }) => o(e.provider),
24
24
  mount: ({ api: e, container: t, provider: n, services: r }) => e.render(t, {
25
25
  sitekey: n.siteKey || "",
26
26
  theme: n.theme || "light",
@@ -38,11 +38,11 @@ var o = n({
38
38
  r.tokens.clear();
39
39
  }
40
40
  }),
41
- challenge: ({ api: e, widget: t, placeholder: n, services: r, stageCtx: i }) => {
42
- if (!r.tokens.has()) return e.execute(t), r.tokens.wait().then((e) => {
41
+ challenge: ({ api: e, widget: n, placeholder: r, services: i, stageCtx: a }) => {
42
+ if (!i.tokens.has()) return e.execute(n), i.tokens.wait(t).then((e) => {
43
43
  if (!e) {
44
- let e = r.errors.getDefaultMessage();
45
- r.errors.show(e, n), i.abort(e);
44
+ let e = i.errors.getDefaultMessage();
45
+ i.errors.show(e, r), a.abort(e);
46
46
  }
47
47
  });
48
48
  },
@@ -51,4 +51,4 @@ var o = n({
51
51
  }
52
52
  });
53
53
  //#endregion
54
- export { o as hcaptchaModule };
54
+ export { s as hcaptchaModule };