@verbb/formie-browser 1.0.5 → 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.
- package/CHANGELOG.md +25 -0
- package/dist/chunks/{address-finder-yXU5yMjG.js → address-finder-k7_BXaRe.js} +1 -1
- package/dist/chunks/{api-DMK8NSUI.js → api-BUb6P-xu.js} +57 -51
- package/dist/chunks/{api-CmwLRq_n.js → api-DztsCJ4r.js} +178 -170
- package/dist/chunks/{bpoint-DSjqRv63.js → bpoint-2qDxlKD9.js} +1 -1
- package/dist/chunks/{calculations-CgVJcQ2P.js → calculations-CeDgB9jt.js} +13 -13
- package/dist/chunks/{captcha-eu-CWJb64_j.js → captcha-eu-CGm8Lbrj.js} +2 -2
- package/dist/chunks/{conditions-CZ3FU5QO.js → conditions-B6_nzpeE.js} +97 -85
- package/dist/chunks/dist-BQ4a9hmy.js +2659 -0
- package/dist/chunks/{eway-D3ctTbEk.js → eway-CImXrB4g.js} +2 -2
- package/dist/chunks/{friendly-captcha-v1-ByXzENYZ.js → friendly-captcha-v1-C_2reOXr.js} +1 -1
- package/dist/chunks/{friendly-captcha-v2-BPdlmhQu.js → friendly-captcha-v2-CLSAbkqx.js} +1 -1
- package/dist/chunks/{go-cardless-BwASSYSK.js → go-cardless-Bz7HHtH0.js} +1 -1
- package/dist/chunks/{google-address-OhKilPWE.js → google-address-BH3Zhi06.js} +1 -1
- package/dist/chunks/{hcaptcha-CdCd9oEi.js → hcaptcha-CGLAmgjO.js} +2 -2
- package/dist/chunks/{loqate-Cp2zvwpE.js → loqate-CJPzBmSm.js} +1 -1
- package/dist/chunks/{mollie-COG-ko2D.js → mollie-BtnB3KGh.js} +1 -1
- package/dist/chunks/{moneris-CMH8PlRc.js → moneris-Bd4vUk8b.js} +1 -1
- package/dist/chunks/{opayo-D2jsR5vh.js → opayo-B-eRIXo-.js} +4 -4
- package/dist/chunks/{paddle-DxF88RfC.js → paddle-BUFeEU4d.js} +2 -2
- package/dist/chunks/{paypal-b5pnwrA2.js → paypal-8Euw7Hrn.js} +2 -2
- package/dist/chunks/{payway-BJYu9DIR.js → payway-dV0SzJxy.js} +2 -2
- package/dist/chunks/{recaptcha-enterprise-BSwi8IVX.js → recaptcha-enterprise-XPId5-bS.js} +19 -20
- package/dist/chunks/{recaptcha-shared-B4zAescW.js → recaptcha-shared-CLYJvojk.js} +15 -3
- package/dist/chunks/{recaptcha-v2-checkbox-CnDQmsKa.js → recaptcha-v2-checkbox-Cy-0PEPc.js} +2 -2
- package/dist/chunks/{recaptcha-v2-invisible-Cz5uIlp-.js → recaptcha-v2-invisible-BwRH540O.js} +2 -2
- package/dist/chunks/recaptcha-v3-No4Ykrhk.js +28 -0
- package/dist/chunks/rich-text-D0sb8bmX.js +349 -0
- package/dist/chunks/scripts-CbQ7agX3.js +30 -0
- package/dist/chunks/{signature-CpgqHCEx.js → signature-xz4QO7CR.js} +107 -34
- package/dist/chunks/{snaptcha-vz1RnZ15.js → snaptcha-DKx98oon.js} +1 -1
- package/dist/chunks/{square-BP8RWAKB.js → square-reyJukb7.js} +2 -2
- package/dist/chunks/{stripe-MihN63uC.js → stripe-BC-2PBvY.js} +2 -2
- package/dist/chunks/{text-limit-B09elPDB.js → text-limit-DbgEFHLO.js} +1 -1
- package/dist/chunks/{turnstile-D_Pi1CKM.js → turnstile-DJakPzQD.js} +3 -3
- package/dist/chunks/upload-manager-BpqWSHmU.js +2558 -0
- package/dist/css/theme/_buttons.css +16 -0
- package/dist/css/theme/_tokens.css +2 -0
- package/dist/css/theme/fields/_signature.css +19 -0
- package/dist/css/theme/fields/_upload-manager.css +279 -0
- package/dist/index.js +629 -578
- package/dist/js/core/create-formie-client.d.ts.map +1 -1
- package/dist/js/core/error-aria-live.d.ts +6 -0
- package/dist/js/core/error-aria-live.d.ts.map +1 -0
- package/dist/js/core/submit-result-state.d.ts.map +1 -1
- package/dist/js/core/submit-result-ui.d.ts.map +1 -1
- package/dist/js/modules/captchas/factories.d.ts.map +1 -1
- package/dist/js/modules/captchas/host.d.ts +1 -0
- package/dist/js/modules/captchas/host.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-shared.d.ts +1 -0
- package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
- package/dist/js/modules/captchas/turnstile.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -1
- package/dist/js/modules/fields/index.d.ts.map +1 -1
- package/dist/js/modules/fields/signature.d.ts.map +1 -1
- package/dist/js/modules/fields/upload-manager.d.ts +3 -0
- package/dist/js/modules/fields/upload-manager.d.ts.map +1 -0
- package/dist/js/utils/form-started-at.d.ts +2 -0
- package/dist/js/utils/form-started-at.d.ts.map +1 -0
- package/dist/js/utils/scripts.d.ts.map +1 -1
- package/dist/js/utils/unload-warning.d.ts.map +1 -1
- package/dist/js/validation/enter-key-guard.d.ts +2 -0
- package/dist/js/validation/enter-key-guard.d.ts.map +1 -0
- package/dist/js/validation/types.d.ts +1 -0
- package/dist/js/validation/types.d.ts.map +1 -1
- package/dist/js/validation/validator.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/css/theme/_buttons.css +16 -0
- package/src/css/theme/_tokens.css +2 -0
- package/src/css/theme/fields/_signature.css +19 -0
- package/src/css/theme/fields/_upload-manager.css +279 -0
- package/src/js/core/create-formie-client.ts +7 -0
- package/src/js/core/error-aria-live.ts +45 -0
- package/src/js/core/submit-result-state.ts +4 -0
- package/src/js/core/submit-result-ui.ts +8 -4
- package/src/js/modules/captchas/factories.ts +4 -0
- package/src/js/modules/captchas/host.ts +14 -2
- package/src/js/modules/captchas/recaptcha-enterprise.ts +14 -11
- package/src/js/modules/captchas/recaptcha-shared.ts +14 -0
- package/src/js/modules/captchas/recaptcha-v3.ts +7 -4
- package/src/js/modules/captchas/turnstile.ts +9 -3
- package/src/js/modules/fields/conditions/effects.ts +42 -0
- package/src/js/modules/fields/index.ts +1 -0
- package/src/js/modules/fields/signature.ts +199 -15
- package/src/js/modules/fields/upload-manager.ts +1277 -0
- package/src/js/utils/form-started-at.ts +25 -0
- package/src/js/utils/scripts.ts +16 -0
- package/src/js/utils/unload-warning.ts +1 -0
- package/src/js/validation/enter-key-guard.ts +63 -0
- package/src/js/validation/types.ts +1 -0
- package/src/js/validation/validator.ts +14 -5
- package/src/vendor.d.ts +1 -1
- package/dist/chunks/dist-BF5GU3_9.js +0 -2674
- package/dist/chunks/recaptcha-v3-BtbbP111.js +0 -27
- package/dist/chunks/rich-text-Cv8ADyk-.js +0 -349
- package/dist/chunks/scripts-6CYSUGKQ.js +0 -24
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
1
|
+
import { t as e } from "./api-DztsCJ4r.js";
|
|
2
2
|
import { r as t } from "./async-nPFRNQ06.js";
|
|
3
|
-
import { r as n } from "./scripts-
|
|
3
|
+
import { r as n } from "./scripts-CbQ7agX3.js";
|
|
4
4
|
//#region src/js/modules/payments/eway.ts
|
|
5
5
|
var r = [{
|
|
6
6
|
id: "FORMIE_EWAY_SCRIPT_MIN",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e } from "./event-names-BCI2FLD8.js";
|
|
2
2
|
import { t } from "./api-sPqGbOww.js";
|
|
3
|
-
import { n, t as r } from "./scripts-
|
|
3
|
+
import { n, t as r } from "./scripts-CbQ7agX3.js";
|
|
4
4
|
//#region src/js/modules/address/google-address.ts
|
|
5
5
|
var i = "FORMIE_GOOGLE_ADDRESS_SCRIPT", a = "formieGoogleMapsReady", o = null;
|
|
6
6
|
async function s(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, r as t, t as n } from "./api-
|
|
2
|
-
import { n as r, t as i } from "./scripts-
|
|
1
|
+
import { a as e, r as t, t as n } from "./api-BUb6P-xu.js";
|
|
2
|
+
import { n as r, t as i } from "./scripts-CbQ7agX3.js";
|
|
3
3
|
//#region src/js/modules/captchas/hcaptcha.ts
|
|
4
4
|
async function a(n) {
|
|
5
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as e } from "./constants-DVcJAvc5.js";
|
|
2
2
|
import { t } from "./api-sPqGbOww.js";
|
|
3
|
-
import { r as n } from "./scripts-
|
|
3
|
+
import { r as n } from "./scripts-CbQ7agX3.js";
|
|
4
4
|
//#region src/js/modules/address/loqate.ts
|
|
5
5
|
var r = "FORMIE_LOQATE_SCRIPT", i = t({
|
|
6
6
|
id: "loqate",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as e } from "./event-names-BCI2FLD8.js";
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as n } from "./
|
|
4
|
-
import { r } from "./scripts-
|
|
2
|
+
import { t } from "./api-DztsCJ4r.js";
|
|
3
|
+
import { t as n } from "./debug-BV0DvdHx.js";
|
|
4
|
+
import { r } from "./scripts-CbQ7agX3.js";
|
|
5
5
|
//#region src/js/modules/payments/opayo.ts
|
|
6
|
-
var i = "FORMIE_OPAYO_SCRIPT", a = "https://live.opayo.eu.elavon.com/api/v1/js/sagepay.js", o = "https://sandbox.opayo.eu.elavon.com/api/v1/js/sagepay.js", s =
|
|
6
|
+
var i = "FORMIE_OPAYO_SCRIPT", a = "https://live.opayo.eu.elavon.com/api/v1/js/sagepay.js", o = "https://sandbox.opayo.eu.elavon.com/api/v1/js/sagepay.js", s = n("payments", "opayo"), c = e("opayo", "challenge"), l = "formie:payment:opayo:challenge:response", u = t({
|
|
7
7
|
id: "opayo",
|
|
8
8
|
defaultRequiredInputSuffixes: ["opayoTokenId"],
|
|
9
9
|
load: async (e) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as e } from "./event-names-BCI2FLD8.js";
|
|
2
|
-
import { t } from "./api-
|
|
3
|
-
import { r as n } from "./scripts-
|
|
2
|
+
import { t } from "./api-DztsCJ4r.js";
|
|
3
|
+
import { r as n } from "./scripts-CbQ7agX3.js";
|
|
4
4
|
//#region src/js/modules/payments/paddle.ts
|
|
5
5
|
var r = "FORMIE_PADDLE_SCRIPT", i = e("paddle", "initialize"), a = t({
|
|
6
6
|
id: "paddle",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
2
|
-
import { r as t } from "./scripts-
|
|
1
|
+
import { t as e } from "./api-DztsCJ4r.js";
|
|
2
|
+
import { r as t } from "./scripts-CbQ7agX3.js";
|
|
3
3
|
import { t as n } from "./styles-BfoIZwJp.js";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/js/modules/payments/paypal.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
2
|
-
import { r as t } from "./scripts-
|
|
1
|
+
import { t as e } from "./api-DztsCJ4r.js";
|
|
2
|
+
import { r as t } from "./scripts-CbQ7agX3.js";
|
|
3
3
|
import { t as n } from "./styles-BfoIZwJp.js";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/js/modules/payments/payway.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
2
|
-
import { t } from "./recaptcha-shared-
|
|
1
|
+
import { t as e } from "./api-BUb6P-xu.js";
|
|
2
|
+
import { n as t, t as n } from "./recaptcha-shared-CLYJvojk.js";
|
|
3
3
|
//#region src/js/modules/captchas/recaptcha-enterprise.ts
|
|
4
|
-
var
|
|
4
|
+
var r = e({
|
|
5
5
|
id: "recaptcha-enterprise",
|
|
6
6
|
defaultPlaceholderSelector: "[data-recaptcha-placeholder]",
|
|
7
7
|
defaultTokenFieldNames: ["g-recaptcha-response"],
|
|
8
|
-
load: ({ options: e }) =>
|
|
8
|
+
load: ({ options: e }) => n(e.provider, !0, (e.provider.enterpriseType === "score" || e.provider.enterpriseType === "policy") && e.provider.siteKey || void 0),
|
|
9
9
|
mount: ({ api: e, container: t, provider: n, services: r }) => {
|
|
10
10
|
let i = e.enterprise || e;
|
|
11
11
|
return new Promise((e) => {
|
|
@@ -33,23 +33,22 @@ var n = e({
|
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
},
|
|
36
|
-
screen: async ({ api: e, widget:
|
|
37
|
-
let
|
|
38
|
-
if (
|
|
39
|
-
if (
|
|
40
|
-
let e =
|
|
41
|
-
|
|
36
|
+
screen: async ({ api: e, widget: n, provider: r, placeholder: i, services: a, stageCtx: o }) => {
|
|
37
|
+
let s = e.enterprise || e;
|
|
38
|
+
if (r.enterpriseType === "checkbox") {
|
|
39
|
+
if (a.tokens.has()) return;
|
|
40
|
+
let e = a.errors.getDefaultMessage();
|
|
41
|
+
a.errors.show(e, i), o.abort(e);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
if (!
|
|
45
|
-
if (
|
|
46
|
-
let e = await
|
|
47
|
-
typeof e == "string" && e.trim() !== "" &&
|
|
48
|
-
} else
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
44
|
+
if (!a.tokens.has() && (await t(e, async () => {
|
|
45
|
+
if (r.enterpriseType === "score" || r.enterpriseType === "policy") {
|
|
46
|
+
let e = await s.execute(r.siteKey || "", { action: r.action || "submit" });
|
|
47
|
+
typeof e == "string" && e.trim() !== "" && a.tokens.write(e.trim());
|
|
48
|
+
} else s.execute(n);
|
|
49
|
+
}), !await a.tokens.wait(12e4))) {
|
|
50
|
+
let e = a.errors.getDefaultMessage();
|
|
51
|
+
a.errors.show(e, i), o.abort(e);
|
|
53
52
|
}
|
|
54
53
|
},
|
|
55
54
|
reset: ({ api: e, widget: t, provider: n, services: r }) => {
|
|
@@ -62,4 +61,4 @@ var n = e({
|
|
|
62
61
|
}
|
|
63
62
|
});
|
|
64
63
|
//#endregion
|
|
65
|
-
export {
|
|
64
|
+
export { r as recaptchaEnterpriseModule };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, r as t } from "./api-
|
|
2
|
-
import { r as n } from "./scripts-
|
|
1
|
+
import { a as e, r as t } from "./api-BUb6P-xu.js";
|
|
2
|
+
import { r as n } from "./scripts-CbQ7agX3.js";
|
|
3
3
|
//#region src/js/modules/captchas/recaptcha-shared.ts
|
|
4
4
|
async function r(r, i = !1, a) {
|
|
5
5
|
let o = typeof r.language == "string" && r.language.trim() !== "" ? r.language.trim() : "en", { async: s, defer: c } = t(r.loadingMethod), l = i ? "https://www.google.com/recaptcha/enterprise.js" : "https://www.recaptcha.net/recaptcha/api.js", u = typeof a == "string" && a.trim() !== "" ? a.trim() : "explicit", d = new URL(l);
|
|
@@ -11,5 +11,17 @@ async function r(r, i = !1, a) {
|
|
|
11
11
|
timeoutMs: e
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
+
function i(e, t) {
|
|
15
|
+
let n = e.enterprise || e;
|
|
16
|
+
return new Promise((e, r) => {
|
|
17
|
+
try {
|
|
18
|
+
n.ready(() => {
|
|
19
|
+
Promise.resolve(t()).then(e).catch(r);
|
|
20
|
+
});
|
|
21
|
+
} catch (e) {
|
|
22
|
+
r(e);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
14
26
|
//#endregion
|
|
15
|
-
export { r as t };
|
|
27
|
+
export { i as n, r as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
2
|
-
import { t } from "./recaptcha-shared-
|
|
1
|
+
import { t as e } from "./api-BUb6P-xu.js";
|
|
2
|
+
import { t } from "./recaptcha-shared-CLYJvojk.js";
|
|
3
3
|
//#region src/js/modules/captchas/recaptcha-v2-checkbox.ts
|
|
4
4
|
var n = e({
|
|
5
5
|
id: "recaptcha-v2-checkbox",
|
package/dist/chunks/{recaptcha-v2-invisible-Cz5uIlp-.js → recaptcha-v2-invisible-BwRH540O.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
2
|
-
import { t } from "./recaptcha-shared-
|
|
1
|
+
import { t as e } from "./api-BUb6P-xu.js";
|
|
2
|
+
import { t } from "./recaptcha-shared-CLYJvojk.js";
|
|
3
3
|
//#region src/js/modules/captchas/recaptcha-v2-invisible.ts
|
|
4
4
|
async function n(e, t, n = 1e3) {
|
|
5
5
|
let r = Date.now() + n;
|
|
@@ -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 };
|