@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.
- package/CHANGELOG.md +15 -0
- package/dist/chunks/{address-state-CHKit8AW.js → address-state-D9KfV-qB.js} +1 -1
- package/dist/chunks/{combobox-CJh2DoSO.js → combobox-B6ROYFW7.js} +1 -1
- package/dist/chunks/date-picker-dp41TnRq.js +5351 -0
- package/dist/chunks/{hcaptcha-COilLmRT.js → hcaptcha-lseqzFTP.js} +14 -14
- package/dist/chunks/phone-country-BMyw-Qcz.js +2647 -0
- package/dist/chunks/{upload-manager-Ccg3d_4I.js → upload-manager-CkmsPJRl.js} +1 -1
- package/dist/index.js +407 -386
- package/dist/js/core/create-formie-client.d.ts.map +1 -1
- package/dist/js/core/submit-result-ui.d.ts.map +1 -1
- package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -1
- package/dist/js/modules/fields/combobox.d.ts.map +1 -1
- package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
- package/dist/js/modules/fields/upload-manager.d.ts.map +1 -1
- package/dist/js/modules/loader.d.ts.map +1 -1
- package/dist/js/theme/message-attributes.d.ts +4 -0
- package/dist/js/theme/message-attributes.d.ts.map +1 -0
- package/dist/js/transport/forms-api.d.ts +1 -1
- package/dist/js/transport/forms-api.d.ts.map +1 -1
- package/dist/js/validation/validator.d.ts.map +1 -1
- package/package.json +6 -4
- package/src/js/core/create-formie-client.ts +49 -33
- package/src/js/core/submit-result-ui.ts +10 -2
- package/src/js/modules/captchas/hcaptcha.ts +3 -2
- package/src/js/modules/fields/combobox.ts +4 -0
- package/src/js/modules/fields/date-picker.ts +3 -3
- package/src/js/modules/fields/phone-country.ts +25 -17
- package/src/js/modules/fields/upload-manager.ts +3 -2
- package/src/js/modules/loader.ts +7 -0
- package/src/js/theme/message-attributes.ts +54 -0
- package/src/js/transport/forms-api.ts +6 -1
- package/src/js/validation/validator.ts +3 -2
- package/src/vendor.d.ts +2 -3
- package/dist/chunks/date-picker-BVJxJVYT.js +0 -5321
- package/dist/chunks/phone-country-Bx9EG50h.js +0 -2645
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import { n as
|
|
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
|
|
5
|
-
let
|
|
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
|
|
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(
|
|
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,
|
|
17
|
+
}), await d, a("hcaptcha", e);
|
|
18
18
|
}
|
|
19
|
-
var
|
|
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 }) =>
|
|
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:
|
|
42
|
-
if (!
|
|
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 =
|
|
45
|
-
|
|
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 {
|
|
54
|
+
export { s as hcaptchaModule };
|