@verbb/formie-browser 1.0.14 → 1.0.16
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 +66 -0
- package/dist/chunks/{address-country-Dn71jroa.js → address-country-DLJF-OkC.js} +5 -9
- package/dist/chunks/{address-finder-O49uDRoR.js → address-finder-QK1m1eyv.js} +2 -2
- package/dist/chunks/{address-state-ByYatUur.js → address-state-CHKit8AW.js} +113 -112
- package/dist/chunks/{api-DYYsVIub.js → api-BPtH5RBA.js} +162 -130
- package/dist/chunks/{api-D6kJ7kXZ.js → api-BR2Gqy37.js} +313 -303
- package/dist/chunks/{api-ghNr2uxX.js → api-CmuOZ0i3.js} +1 -1
- package/dist/chunks/{async-nPFRNQ06.js → async-2GdXNFCE.js} +18 -1
- package/dist/chunks/{bpoint-D0RKFM4F.js → bpoint-GvYfyPjD.js} +1 -1
- package/dist/chunks/{calculations-YEoVCG2q.js → calculations-DeEmdUDq.js} +5 -7
- package/dist/chunks/{captcha-eu-DERJbXnH.js → captcha-eu-eU_M6snp.js} +2 -2
- package/dist/chunks/{checkbox-radio-gsm8QPJg.js → checkbox-radio-CSXo6svm.js} +4 -12
- package/dist/chunks/{combobox-CWNdx4Fk.js → combobox-CJh2DoSO.js} +323 -363
- package/dist/chunks/{conditions-DqNHLTbN.js → conditions-Dz3068K0.js} +140 -153
- package/dist/chunks/{country-from-ip-DDj_mFki.js → country-from-ip-BqQ-BqLH.js} +1 -1
- package/dist/chunks/{custom-google-maps-C4l2S3GO.js → custom-google-maps-rNm5VFbb.js} +2 -6
- package/dist/chunks/{custom-link-CLazgKYH.js → custom-link-CLqFCssQ.js} +1 -1
- package/dist/chunks/{custom-maps-DqcAlD0v.js → custom-maps-DgjYQDLj.js} +4 -8
- package/dist/chunks/{date-picker-RUnevF7l.js → date-picker-BVJxJVYT.js} +42 -58
- package/dist/chunks/{debug-BV0DvdHx.js → debug-rhzqP1j2.js} +2 -14
- package/dist/chunks/{dist-ZLeW0zZ3.js → dist-CJReDlDK.js} +13 -8
- package/dist/chunks/{eway-or6dtjoT.js → eway-BZuTBAUW.js} +3 -3
- package/dist/chunks/{field-references.resolver-Ca8MguFv.js → field-references.resolver-uSHf5-NP.js} +1 -1
- package/dist/chunks/{file-upload-Bm-TXyNB.js → file-upload-vEUr_EuP.js} +131 -113
- package/dist/chunks/{friendly-captcha-v1-GFqCt1Mh.js → friendly-captcha-v1-C_cF1WD2.js} +2 -2
- package/dist/chunks/{friendly-captcha-v2-WoW246JG.js → friendly-captcha-v2-BenESH-n.js} +2 -2
- package/dist/chunks/{friendly-challenge-DPG9MJb1.js → friendly-challenge-BgPBEMXx.js} +21 -35
- package/dist/chunks/{go-cardless-DzJ-0FKg.js → go-cardless-DWZeB0Bq.js} +2 -6
- package/dist/chunks/{google-address-C1P1nTDM.js → google-address-DQR6rsbh.js} +15 -10
- package/dist/chunks/{hcaptcha-D0T8aIHz.js → hcaptcha-COilLmRT.js} +2 -2
- package/dist/chunks/{hidden-BZhXnNPe.js → hidden-Bc2TpcgF.js} +1 -1
- package/dist/chunks/{http-C2QdHuWO.js → http-Dj_skqaa.js} +1 -1
- package/dist/chunks/{leaflet-src-DE6rv6M-.js → leaflet-src-Cg-LUOD8.js} +74 -122
- package/dist/chunks/{loqate-DD1S7PY9.js → loqate-ZZClcacr.js} +2 -2
- package/dist/chunks/{mollie-DG8Ju83x.js → mollie-8OMXIYa8.js} +2 -6
- package/dist/chunks/{moneris-C8m3Fvqu.js → moneris-qYHJ9EFy.js} +1 -1
- package/dist/chunks/opayo-DlWPEnla.js +159 -0
- package/dist/chunks/{paddle-BIYR9Um3.js → paddle-CArfWih0.js} +2 -2
- package/dist/chunks/{password-validation-C8_uO_c_.js → password-validation-HGOU9kf3.js} +2 -2
- package/dist/chunks/{paypal-B_yxIo2d.js → paypal-BcaMCMGY.js} +2 -2
- package/dist/chunks/{payway-CeOzS0sL.js → payway-vxC7_bfR.js} +4 -12
- package/dist/chunks/{phone-country-bAqje17P.js → phone-country-Bx9EG50h.js} +124 -141
- package/dist/chunks/{place-kit-BE5gi3vo.js → place-kit-BKk8xDXf.js} +10 -10
- package/dist/chunks/{placekit-autocomplete.esm-CZZERYur.js → placekit-autocomplete.esm-D2A_0iVU.js} +2 -5
- package/dist/chunks/{recaptcha-enterprise-CruXddZq.js → recaptcha-enterprise-Cx6HUpMa.js} +6 -12
- package/dist/chunks/recaptcha-shared-CcMI-r8t.js +33 -0
- package/dist/chunks/{recaptcha-v2-checkbox-CCnJYCnG.js → recaptcha-v2-checkbox-DQ9BJzcv.js} +2 -2
- package/dist/chunks/{recaptcha-v2-invisible-BuVqRRYn.js → recaptcha-v2-invisible-BP0T8Pan.js} +2 -2
- package/dist/chunks/recaptcha-v3-DKMGQ27K.js +38 -0
- package/dist/chunks/{repeater-DwE27jI1.js → repeater-BR0RUvTs.js} +50 -40
- package/dist/chunks/{rich-text-uV4o_pGk.js → rich-text-H2A6cm1t.js} +33 -11
- package/dist/chunks/{rolldown-runtime-DtPi1Y-2.js → rolldown-runtime-VHNaYcLd.js} +1 -1
- package/dist/chunks/{scripts-CbQ7agX3.js → scripts-DrccjrFv.js} +1 -1
- package/dist/chunks/{sdk-lkwSvlpM.js → sdk-_cmrRYgp.js} +4 -16
- package/dist/chunks/{shared-OKhSay59.js → shared-CJ1LIEh3.js} +1 -3
- package/dist/chunks/{signature-7cldFbqj.js → signature-CfKA_poI.js} +9 -41
- package/dist/chunks/skip-CEW89ExY.js +7 -0
- package/dist/chunks/{snaptcha-C04kNGYQ.js → snaptcha-P3EoSQud.js} +1 -1
- package/dist/chunks/{square-DEzxv9D9.js → square-Dyz0p_GU.js} +2 -2
- package/dist/chunks/{stripe-CVPQGDz3.js → stripe-Bfd_jp_k.js} +4 -7
- package/dist/chunks/{summary-BF_8mrXI.js → summary-B3CAebLV.js} +45 -37
- package/dist/chunks/{survey-likert-fk1hUPff.js → survey-likert-CEtUceag.js} +1 -1
- package/dist/chunks/{survey-rank-BsLGl2LX.js → survey-rank-Dtt97y6s.js} +3 -7
- package/dist/chunks/{survey-rating-DVS6e6fM.js → survey-rating-mlDMI0uq.js} +9 -23
- package/dist/chunks/{table-DnIBdeKF.js → table-0k6Md0IO.js} +2 -2
- package/dist/chunks/{text-limit-LGMPhFuC.js → text-limit-CTVML6s7.js} +10 -10
- package/dist/chunks/{turnstile-n9DNyPxi.js → turnstile-Sp4ubowK.js} +2 -2
- package/dist/chunks/{upload-manager-BbiUosZq.js → upload-manager-Ccg3d_4I.js} +258 -260
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +743 -734
- package/dist/js/core/create-formie-client.d.ts.map +1 -1
- package/dist/js/core/dom-events.d.ts +5 -0
- package/dist/js/core/dom-events.d.ts.map +1 -1
- package/dist/js/core/page-client-event.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 +3 -1
- package/dist/js/core/submit-result-ui.d.ts.map +1 -1
- package/dist/js/core/validation-focus.d.ts.map +1 -1
- package/dist/js/modules/address/google-address.d.ts +10 -0
- package/dist/js/modules/address/google-address.d.ts.map +1 -1
- package/dist/js/modules/address/place-kit.d.ts.map +1 -1
- package/dist/js/modules/captchas/factories.d.ts.map +1 -1
- package/dist/js/modules/captchas/host.d.ts +4 -1
- package/dist/js/modules/captchas/host.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-shared.d.ts +1 -1
- 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/fields/address-state.d.ts.map +1 -1
- package/dist/js/modules/fields/combobox.d.ts +2 -0
- package/dist/js/modules/fields/combobox.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions.d.ts.map +1 -1
- package/dist/js/modules/fields/date-picker.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/repeater.d.ts.map +1 -1
- package/dist/js/modules/fields/rich-text.d.ts.map +1 -1
- package/dist/js/modules/fields/summary.d.ts.map +1 -1
- package/dist/js/modules/fields/text-limit.d.ts.map +1 -1
- package/dist/js/modules/fields/upload-manager.d.ts.map +1 -1
- package/dist/js/modules/payments/factories.d.ts.map +1 -1
- package/dist/js/modules/payments/opayo.d.ts.map +1 -1
- package/dist/js/submit/pipeline.d.ts +2 -0
- package/dist/js/submit/pipeline.d.ts.map +1 -1
- package/dist/js/utils/async.d.ts +1 -0
- package/dist/js/utils/async.d.ts.map +1 -1
- package/dist/js/utils/form-started-at.d.ts +1 -0
- package/dist/js/utils/form-started-at.d.ts.map +1 -1
- package/dist/js/utils/unload-warning.d.ts +4 -0
- package/dist/js/utils/unload-warning.d.ts.map +1 -1
- package/dist/js/validation/rules/required.d.ts.map +1 -1
- package/dist/js/validation/submit-readiness.d.ts.map +1 -1
- package/dist/js/validation/validator.d.ts +1 -0
- package/dist/js/validation/validator.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/js/core/create-formie-client.ts +37 -28
- package/src/js/core/dom-events.ts +30 -1
- package/src/js/core/page-client-event.ts +5 -7
- package/src/js/core/submit-result-state.ts +30 -2
- package/src/js/core/submit-result-ui.ts +25 -3
- package/src/js/core/validation-focus.ts +17 -3
- package/src/js/modules/address/google-address.ts +95 -37
- package/src/js/modules/address/place-kit.ts +13 -7
- package/src/js/modules/captchas/factories.ts +241 -101
- package/src/js/modules/captchas/host.ts +16 -0
- package/src/js/modules/captchas/recaptcha-enterprise.ts +1 -1
- package/src/js/modules/captchas/recaptcha-shared.ts +23 -5
- package/src/js/modules/captchas/recaptcha-v3.ts +23 -14
- package/src/js/modules/fields/address-country.ts +5 -5
- package/src/js/modules/fields/address-state.ts +80 -27
- package/src/js/modules/fields/combobox.ts +22 -1
- package/src/js/modules/fields/conditions/effects.ts +4 -5
- package/src/js/modules/fields/conditions.ts +9 -0
- package/src/js/modules/fields/date-picker.ts +6 -3
- package/src/js/modules/fields/file-upload.ts +55 -18
- package/src/js/modules/fields/phone-country.ts +25 -2
- package/src/js/modules/fields/repeater.ts +55 -4
- package/src/js/modules/fields/rich-text.ts +33 -0
- package/src/js/modules/fields/summary.ts +63 -10
- package/src/js/modules/fields/text-limit.ts +11 -0
- package/src/js/modules/fields/upload-manager.ts +54 -18
- package/src/js/modules/payments/factories.ts +87 -54
- package/src/js/modules/payments/opayo.ts +7 -0
- package/src/js/submit/pipeline.ts +16 -9
- package/src/js/utils/async.ts +34 -0
- package/src/js/utils/form-started-at.ts +19 -4
- package/src/js/utils/unload-warning.ts +63 -7
- package/src/js/validation/rules/required.ts +18 -0
- package/src/js/validation/submit-readiness.ts +2 -0
- package/src/js/validation/validator.ts +29 -6
- package/src/vendor.d.ts +2 -0
- package/dist/chunks/opayo-B3EvrVxw.js +0 -188
- package/dist/chunks/recaptcha-shared-AQRMDMme.js +0 -27
- package/dist/chunks/recaptcha-v3-CloqhO2A.js +0 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./debug-
|
|
1
|
+
import { t as e } from "./debug-rhzqP1j2.js";
|
|
2
2
|
import { t } from "./styles-BfoIZwJp.js";
|
|
3
|
-
import { n } from "./shared-
|
|
3
|
+
import { n } from "./shared-CJ1LIEh3.js";
|
|
4
4
|
import { t as r } from "./_survey-presentations-RbSqcQph.js";
|
|
5
5
|
//#region src/js/modules/fields/survey-rating.ts
|
|
6
6
|
var i = "[data-formie-survey-rating]", a = "[data-formie-survey-rating-stars]", o = "[data-formie-rating-option]", s = "input[data-formie-rating-input]", c = "data-formie-rating-pressed-while-checked", l = "survey-rating", u = e("fields", "survey-rating");
|
|
@@ -10,11 +10,7 @@ function d(e) {
|
|
|
10
10
|
}
|
|
11
11
|
function f(e) {
|
|
12
12
|
let t = d(e).findIndex((e) => e.checked);
|
|
13
|
-
|
|
14
|
-
e.setAttribute("data-formie-rating-value", String(t + 1));
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
e.removeAttribute("data-formie-rating-value");
|
|
13
|
+
t >= 0 ? e.setAttribute("data-formie-rating-value", String(t + 1)) : e.removeAttribute("data-formie-rating-value");
|
|
18
14
|
}
|
|
19
15
|
function p(e) {
|
|
20
16
|
let t = e.querySelector(a);
|
|
@@ -28,13 +24,7 @@ function p(e) {
|
|
|
28
24
|
t.querySelectorAll(o).forEach((e) => {
|
|
29
25
|
if (!(e instanceof HTMLElement)) return;
|
|
30
26
|
let t = e.querySelector(s), n = () => {
|
|
31
|
-
|
|
32
|
-
if (t.checked) {
|
|
33
|
-
t.setAttribute(c, "true");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
t.removeAttribute(c);
|
|
37
|
-
}
|
|
27
|
+
t instanceof HTMLInputElement && (t.checked ? t.setAttribute(c, "true") : t.removeAttribute(c));
|
|
38
28
|
}, i = () => {
|
|
39
29
|
p(e);
|
|
40
30
|
};
|
|
@@ -45,19 +35,15 @@ function p(e) {
|
|
|
45
35
|
t.removeEventListener("mouseleave", i);
|
|
46
36
|
}), d(t).forEach((i) => {
|
|
47
37
|
let a = (r) => {
|
|
48
|
-
|
|
49
|
-
f(t), n(e, l, "change", {
|
|
50
|
-
ratingField: e,
|
|
51
|
-
value: i.checked ? i.value : ""
|
|
52
|
-
});
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
r.preventDefault(), d(t).forEach((e) => {
|
|
38
|
+
i.getAttribute(c) === "true" ? (r.preventDefault(), d(t).forEach((e) => {
|
|
56
39
|
e.checked = !1, e.removeAttribute(c);
|
|
57
40
|
}), f(t), n(e, l, "change", {
|
|
58
41
|
ratingField: e,
|
|
59
42
|
value: ""
|
|
60
|
-
})
|
|
43
|
+
})) : (f(t), n(e, l, "change", {
|
|
44
|
+
ratingField: e,
|
|
45
|
+
value: i.checked ? i.value : ""
|
|
46
|
+
}));
|
|
61
47
|
};
|
|
62
48
|
i.addEventListener("click", a), r.push(() => {
|
|
63
49
|
i.removeEventListener("click", a), i.removeAttribute(c);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as e } from "./async-
|
|
1
|
+
import { n as e } from "./async-2GdXNFCE.js";
|
|
2
2
|
import { t } from "./styles-BfoIZwJp.js";
|
|
3
|
-
import { n, o as r, s as i } from "./shared-
|
|
3
|
+
import { n, o as r, s as i } from "./shared-CJ1LIEh3.js";
|
|
4
4
|
//#region src/css/theme/fields/_table.css?inline
|
|
5
5
|
var a = "@layer formie-theme{.formie-table-wrapper{-webkit-overflow-scrolling:touch;max-width:100%;overflow:auto hidden}.formie-table{width:var(--formie-table-width);margin-bottom:var(--formie-table-margin-bottom);border-collapse:var(--formie-table-border-collapse)}.formie-table th{text-align:var(--formie-table-th-text-align);font-size:var(--formie-table-th-font-size);font-weight:var(--formie-table-th-font-weight);color:var(--formie-table-th-color,var(--formie-color-text-muted))}.formie-table th,.formie-table td{padding:var(--formie-table-row-padding);vertical-align:top}.formie-table th:first-child,.formie-table td:first-child{padding-left:0}.formie-table th:last-child,.formie-table td:last-child{padding-right:0}.formie-table [data-col-remove]{width:calc(var(--formie-button-icon-button-size) + (var(--formie-table-row-padding) * 2));min-width:calc(var(--formie-button-icon-button-size) + (var(--formie-table-row-padding) * 2));white-space:nowrap;text-align:center;vertical-align:middle}.formie-table [data-formie-table-column-type=checkbox]{text-align:center;vertical-align:middle}.formie-table [data-formie-table-column-type=checkbox] .formie-checkbox-option{width:100%;min-height:var(--formie-check-size);justify-content:center;align-items:center;margin:0;display:flex}.formie-table [data-formie-table-column-type=checkbox] .formie-checkbox-option-label{width:var(--formie-check-size);min-width:var(--formie-check-size);height:var(--formie-check-size);margin:0 auto;padding-left:0;font-size:0;line-height:0;display:block}.formie-table [data-formie-table-column-type=checkbox] .formie-checkbox-option-label:before{position:static}.formie-table-color-input{min-width:4rem;padding:var(--formie-space-1)}.formie-table-multiline-input{min-height:calc(var(--formie-control-height) + var(--formie-space-2))}.formie-table-remove-button{vertical-align:middle;display:inline-flex}.formie-button.formie-table-add-button{width:auto;max-width:100%;padding-left:var(--formie-table-add-button-padding-left);justify-content:center;justify-self:start;align-items:center;display:inline-flex;position:relative}.formie-button.formie-table-add-button:before{content:\"\";width:var(--formie-table-add-button-width);height:var(--formie-table-add-button-height);left:var(--formie-table-add-button-left);-webkit-mask-image:var(--formie-table-add-button-icon-mask);-webkit-mask-image:var(--formie-table-add-button-icon-mask);mask-image:var(--formie-table-add-button-icon-mask);background-color:currentColor;display:block;position:absolute;top:50%;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}}", o = "[data-formie-table-field-layout]", s = "[data-formie-table]", c = "[data-formie-table-body]", l = "[data-formie-table-row]", u = "[data-formie-table-add]", d = "[data-formie-table-remove]", f = "data-formie-template-id", p = "data-formie-table-row-id", m = "table";
|
|
6
6
|
t(m, [a]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as e } from "./dist-
|
|
1
|
+
import { p as e } from "./dist-CJReDlDK.js";
|
|
2
2
|
import { i as t } from "./i18n-BY1ds1BL.js";
|
|
3
3
|
import { t as n } from "./styles-BfoIZwJp.js";
|
|
4
|
-
import { a as r, l as i, u as a } from "./shared-
|
|
4
|
+
import { a as r, l as i, u as a } from "./shared-CJ1LIEh3.js";
|
|
5
5
|
//#region src/css/theme/fields/_text-limit.css?inline
|
|
6
6
|
var o = "@layer formie-theme{.formie-limit-number{font-weight:var(--formie-font-weight-semibold);color:var(--formie-color-text)}.formie-limit-number-error{color:var(--formie-color-danger)}}", s = "input[data-formie-single-line-text-input], textarea[data-formie-multi-line-text-input]", c = [
|
|
7
7
|
"textMinCharacterLimit",
|
|
@@ -89,11 +89,7 @@ function A(t) {
|
|
|
89
89
|
let n = y(t, "data-formie-max-chars"), r = y(t, "data-formie-max-words"), i = E(t);
|
|
90
90
|
if (!i) return;
|
|
91
91
|
let a = e(t.value);
|
|
92
|
-
|
|
93
|
-
k(i, t, n - a.graphemeCount, n, "character");
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
r > 0 && k(i, t, r - a.wordCount, r, "word");
|
|
92
|
+
n > 0 ? k(i, t, n - a.graphemeCount, n, "character") : r > 0 && k(i, t, r - a.wordCount, r, "word");
|
|
97
93
|
}
|
|
98
94
|
var j = {
|
|
99
95
|
moduleId: "formie:text-limit",
|
|
@@ -117,9 +113,13 @@ var j = {
|
|
|
117
113
|
return e.addEventListener("input", t), e.addEventListener("change", t), A(e), () => {
|
|
118
114
|
e.removeEventListener("input", t), e.removeEventListener("change", t);
|
|
119
115
|
};
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
}), c = (e) => {
|
|
117
|
+
queueMicrotask(() => {
|
|
118
|
+
e.defaultPrevented || a.forEach(A);
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
return e.form?.addEventListener("reset", c), await e.emit("formie:module:text-limit:init", { count: i.length }), { destroy: () => {
|
|
122
|
+
e.form?.removeEventListener("reset", c), o.forEach((e) => {
|
|
123
123
|
e();
|
|
124
124
|
}), t.allowOvertype && i.forEach((e) => {
|
|
125
125
|
e.removeAttribute(u);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, r, t as i } from "./api-
|
|
2
|
-
import { r as a } from "./scripts-
|
|
1
|
+
import { a as e, i as t, o as n, r, t as i } from "./api-BPtH5RBA.js";
|
|
2
|
+
import { r as a } from "./scripts-DrccjrFv.js";
|
|
3
3
|
//#region src/js/modules/captchas/turnstile.ts
|
|
4
4
|
function o(e) {
|
|
5
5
|
let r = e.appearance || "always";
|