@verbb/formie-browser 1.0.16 → 1.0.17-next.10.g9cef3233dddb
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 +21 -0
- package/dist/chunks/{address-state-CHKit8AW.js → address-state-OHeW8r8p.js} +1 -1
- package/dist/chunks/{api-BR2Gqy37.js → api-DlW6054X.js} +3 -1
- package/dist/chunks/{bpoint-GvYfyPjD.js → bpoint-BKRpTj1e.js} +1 -1
- package/dist/chunks/{combobox-CJh2DoSO.js → combobox-CTfq6v4y.js} +12 -5
- package/dist/chunks/date-picker-dp41TnRq.js +5351 -0
- package/dist/chunks/{eway-BZuTBAUW.js → eway-9ZTEmiod.js} +1 -1
- package/dist/chunks/{file-upload-vEUr_EuP.js → file-upload-Bhxg5QZe.js} +2 -0
- package/dist/chunks/{go-cardless-DWZeB0Bq.js → go-cardless-BN096eDZ.js} +1 -1
- package/dist/chunks/{hcaptcha-COilLmRT.js → hcaptcha-lseqzFTP.js} +14 -14
- package/dist/chunks/{mollie-8OMXIYa8.js → mollie-DCBzpCmt.js} +1 -1
- package/dist/chunks/{moneris-qYHJ9EFy.js → moneris-CeryRRRJ.js} +1 -1
- package/dist/chunks/{opayo-DlWPEnla.js → opayo-D5cbEqJy.js} +1 -1
- package/dist/chunks/{paddle-CArfWih0.js → paddle-CDiiBCJ8.js} +1 -1
- package/dist/chunks/{paypal-BcaMCMGY.js → paypal-CA-kRKlJ.js} +1 -1
- package/dist/chunks/{payway-vxC7_bfR.js → payway-K9eUUMvk.js} +1 -1
- package/dist/chunks/phone-country-BMyw-Qcz.js +2647 -0
- package/dist/chunks/{square-Dyz0p_GU.js → square-Bn6y1M0R.js} +1 -1
- package/dist/chunks/{stripe-Bfd_jp_k.js → stripe-CmzSSdMg.js} +1 -1
- package/dist/chunks/{upload-manager-Ccg3d_4I.js → upload-manager-cGKWwGhu.js} +196 -192
- package/dist/css/formie-base.css +26 -26
- package/dist/css/theme-base/_primitives.css +9 -8
- package/dist/index.js +481 -452
- package/dist/js/core/client-rendered-modules.d.ts +6 -6
- package/dist/js/core/client-rendered-modules.d.ts.map +1 -1
- package/dist/js/core/create-formie-client.d.ts.map +1 -1
- 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/core/validation-focus.d.ts +1 -0
- package/dist/js/core/validation-focus.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/file-upload.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/css/formie-base.css +26 -26
- package/src/css/theme-base/_primitives.css +9 -8
- package/src/js/core/client-rendered-modules.ts +1 -1
- package/src/js/core/create-formie-client.ts +54 -33
- package/src/js/core/submit-flow.ts +2 -2
- package/src/js/core/submit-result-state.ts +5 -0
- package/src/js/core/submit-result-ui.ts +10 -2
- package/src/js/core/validation-focus.ts +40 -15
- package/src/js/modules/captchas/hcaptcha.ts +3 -2
- package/src/js/modules/fields/combobox.ts +27 -2
- package/src/js/modules/fields/date-picker.ts +3 -3
- package/src/js/modules/fields/file-upload.ts +7 -0
- package/src/js/modules/fields/phone-country.ts +25 -17
- package/src/js/modules/fields/upload-manager.ts +30 -14
- 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/utils/country-from-ip.ts +1 -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
|
@@ -248,6 +248,8 @@ function Z(e, t, n) {
|
|
|
248
248
|
try {
|
|
249
249
|
let a = await q(e, t, n);
|
|
250
250
|
if (i !== r.hydrationToken) return;
|
|
251
|
+
let o = I(e, t);
|
|
252
|
+
if (o.length !== n.length || o.some((e, t) => e.assetId !== n[t].assetId)) return;
|
|
251
253
|
r.uploadedAssets = a, U(r), s(e, b, "uploaded-assets-sync", {
|
|
252
254
|
fileUpload: e,
|
|
253
255
|
assets: a
|
|
@@ -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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./request-profile-DhwkeCpS.js";
|
|
2
2
|
import { t } from "./dist-CJReDlDK.js";
|
|
3
3
|
import { s as n } from "./event-names-BCI2FLD8.js";
|
|
4
|
-
import { n as r, t as i } from "./api-
|
|
4
|
+
import { n as r, t as i } from "./api-DlW6054X.js";
|
|
5
5
|
import { t as a } from "./debug-rhzqP1j2.js";
|
|
6
6
|
import { a as o } from "./theme-classes-DAQuEqdP.js";
|
|
7
7
|
import { t as s } from "./csrf-DxHg_ZYt.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as e } from "./event-names-BCI2FLD8.js";
|
|
2
|
-
import { t } from "./api-
|
|
2
|
+
import { t } from "./api-DlW6054X.js";
|
|
3
3
|
import { r as n } from "./scripts-DrccjrFv.js";
|
|
4
4
|
//#region src/js/modules/payments/paddle.ts
|
|
5
5
|
var r = "FORMIE_PADDLE_SCRIPT", i = e("paddle", "initialize"), a = t({
|