@verbb/formie-browser 1.0.6 → 1.0.8
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 +23 -0
- package/dist/chunks/_survey-presentations-CFsgToRT.js +4 -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-C8wyLC-s.js} +235 -193
- package/dist/chunks/{bpoint-DSjqRv63.js → bpoint-CwSw_p7A.js} +1 -1
- package/dist/chunks/{captcha-eu-CWJb64_j.js → captcha-eu-CGm8Lbrj.js} +2 -2
- package/dist/chunks/{conditions-DjZOtHfS.js → conditions-B6_nzpeE.js} +95 -83
- package/dist/chunks/{eway-D3ctTbEk.js → eway-B30BMlDp.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-BiF3iLel.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-D__SwtcH.js} +1 -1
- package/dist/chunks/{moneris-CMH8PlRc.js → moneris-KJS1BKx7.js} +1 -1
- package/dist/chunks/{opayo-D2jsR5vh.js → opayo-A_LIkc-v.js} +4 -4
- package/dist/chunks/{paddle-DxF88RfC.js → paddle-BjbOOb0m.js} +2 -2
- package/dist/chunks/{paypal-b5pnwrA2.js → paypal-CyjHIV8v.js} +2 -2
- package/dist/chunks/{payway-BJYu9DIR.js → payway-a_cyrr3j.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/scripts-CbQ7agX3.js +30 -0
- package/dist/chunks/{snaptcha-vz1RnZ15.js → snaptcha-DKx98oon.js} +1 -1
- package/dist/chunks/{square-BP8RWAKB.js → square-Bga6WXHV.js} +2 -2
- package/dist/chunks/{stripe-MihN63uC.js → stripe-BlqVocl3.js} +2 -2
- package/dist/chunks/{summary-D3AjxpYN.js → summary-Dks0gXS3.js} +42 -38
- package/dist/chunks/survey-likert-DmJ3klhP.js +20 -0
- package/dist/chunks/survey-rank-DeUenftw.js +127 -0
- package/dist/chunks/survey-rating-BPUYDgBJ.js +88 -0
- package/dist/chunks/{turnstile-D_Pi1CKM.js → turnstile-DJakPzQD.js} +3 -3
- package/dist/css/formie-theme.css +1 -0
- package/dist/css/theme/fields/_survey-presentations.css +396 -0
- package/dist/index.js +651 -597
- package/dist/js/contracts/schema.d.ts +5 -0
- package/dist/js/contracts/schema.d.ts.map +1 -1
- 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/page-client-event.d.ts +8 -4
- 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.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/summary.d.ts.map +1 -1
- package/dist/js/modules/fields/survey-likert.d.ts +3 -0
- package/dist/js/modules/fields/survey-likert.d.ts.map +1 -0
- package/dist/js/modules/fields/survey-rank.d.ts +3 -0
- package/dist/js/modules/fields/survey-rank.d.ts.map +1 -0
- package/dist/js/modules/fields/survey-rating.d.ts +3 -0
- package/dist/js/modules/fields/survey-rating.d.ts.map +1 -0
- package/dist/js/transport/forms-api.d.ts.map +1 -1
- 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 +2 -2
- package/src/css/formie-theme.css +1 -0
- package/src/css/theme/fields/_survey-presentations.css +396 -0
- package/src/js/contracts/schema.ts +6 -0
- package/src/js/core/create-formie-client.ts +21 -1
- package/src/js/core/error-aria-live.ts +45 -0
- package/src/js/core/page-client-event.ts +86 -18
- package/src/js/core/submit-result-state.ts +10 -2
- 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 +3 -0
- package/src/js/modules/fields/summary.ts +17 -3
- package/src/js/modules/fields/survey-likert.ts +50 -0
- package/src/js/modules/fields/survey-rank.ts +385 -0
- package/src/js/modules/fields/survey-rating.ts +182 -0
- package/src/js/transport/forms-api.ts +1 -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/dist/chunks/recaptcha-v3-BtbbP111.js +0 -27
- package/dist/chunks/scripts-6CYSUGKQ.js +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.0.8 - 2026-06-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Add `survey-likert`, `survey-rank`, and `survey-rating` field modules for Survey fields, including Likert layout styling, drag-and-drop rank ordering with submitted order preserved on validation re-render, and interactive star rating controls. ([#605](https://github.com/verbb/formie/issues/605), [#798](https://github.com/verbb/formie/issues/798), [#2282](https://github.com/verbb/formie/issues/2282))
|
|
9
|
+
- Dispatch server-resolved `clientEvents` from Ajax submit responses to `dataLayer` and the `formie:client-event` DOM event, with support for multiple named events per page and pending client events on mount. ([#888](https://github.com/verbb/formie/issues/888))
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Persist `themeConfig` and `frontendTheme` on the form element during client mount so Ajax field modules can round-trip render-time theme settings.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Fix Summary field Ajax refreshes ignoring custom `themeConfig` classes by round-tripping render-time theme config through the summary HTML endpoint. ([#1721](https://github.com/verbb/formie/issues/1721))
|
|
16
|
+
|
|
17
|
+
## 1.0.7 - 2026-06-18
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- Add configurable `aria-live` behaviour for field and form validation errors via the plugin `errorAriaLive` setting (`polite`, `assertive`, or `off`). Live validation while typing always uses polite announcements. ([#2505](https://github.com/verbb/formie/issues/2505))
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Skip validation for fields disabled by conditional logic, and disable conditionally hidden submit/next buttons so Enter no longer triggers hidden actions. ([#2727](https://github.com/verbb/formie/issues/2727), [#1136](https://github.com/verbb/formie/issues/1136), [Discussion #1628](https://github.com/verbb/formie/discussions/1628))
|
|
24
|
+
- Initialise captcha placeholders immediately when multipage forms change page via tabs or Ajax **Next**, so providers mount on the visible page before submit. ([#1893](https://github.com/verbb/formie/issues/1893))
|
|
25
|
+
- Tear down Cloudflare Turnstile widgets with `remove()` during remounts and apply CSP nonces to dynamically loaded captcha scripts where available. ([#2535](https://github.com/verbb/formie/issues/2535))
|
|
26
|
+
- Wait for reCAPTCHA Enterprise readiness before executing score/policy challenges on multipage navigation. ([#2224](https://github.com/verbb/formie/issues/2224))
|
|
27
|
+
|
|
5
28
|
## 1.0.6 - 2026-06-14
|
|
6
29
|
|
|
7
30
|
### Added
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/css/theme/fields/_survey-presentations.css?inline
|
|
2
|
+
var e = "@layer formie-theme{.formie-likert-field-layout{table-layout:fixed;border-collapse:collapse;border-spacing:0;width:100%;display:table}.formie-likert-field-layout thead{display:table-header-group}.formie-likert-field-layout tbody{display:table-row-group}.formie-likert-field-layout tr{display:table-row}.formie-likert-field-layout th,.formie-likert-field-layout td{display:table-cell}.formie-likert-column-label{text-align:center;color:var(--formie-survey-likert-label-color,var(--formie-color-heading));word-break:break-word;vertical-align:bottom;font-size:var(--formie-survey-likert-column-label-font-size,.875rem);padding:0 .35rem .5rem;line-height:1.3}[data-formie-field-control]:has(>[data-formie-likert-multiple-rows]){-webkit-overflow-scrolling:touch;overflow-x:auto}@media (width>=40rem){.formie-likert-field-layout[data-formie-likert-multiple-rows]{width:max-content;min-width:100%}.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-column-label,.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-option{min-width:var(--formie-survey-likert-column-min-width,5.5rem)}}.formie-likert-row-label-header,.formie-likert-row-label{text-align:left;color:var(--formie-survey-likert-label-color,var(--formie-color-heading));word-break:break-word;vertical-align:middle;font-weight:var(--formie-font-weight-medium);padding:.65rem .75rem .65rem 0}.formie-likert-row-label-header{font-weight:var(--formie-font-weight-normal);padding-bottom:.5rem}.formie-likert-field-layout[data-formie-likert-multiple-rows]{table-layout:auto}.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-row-label-header,.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-row-label{white-space:nowrap;width:1%;padding-right:1rem}.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-inputs-row .formie-likert-row-label{border-top-left-radius:var(--formie-border-radius);border-bottom-left-radius:var(--formie-border-radius)}.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-inputs-row .formie-likert-option:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.formie-likert-inputs-row--alt .formie-likert-row-label,.formie-likert-inputs-row--alt .formie-likert-option{background-color:var(--formie-survey-likert-option-background-alt,var(--formie-color-surface))}.formie-likert-option{text-align:center;vertical-align:middle;background-color:var(--formie-survey-likert-option-background,var(--formie-color-surface-muted));padding:.65rem .35rem}.formie-likert-inputs-row .formie-likert-option:first-child{border-top-left-radius:var(--formie-border-radius);border-bottom-left-radius:var(--formie-border-radius)}.formie-likert-inputs-row .formie-likert-option:last-child{border-top-right-radius:var(--formie-border-radius);border-bottom-right-radius:var(--formie-border-radius)}.formie-likert-option .formie-radio-option-label{width:var(--formie-check-size);height:var(--formie-check-size);line-height:var(--formie-check-size);padding-left:0;overflow:hidden}.formie-likert-option .formie-likert-option-label-text{display:none}.formie-likert-option .formie-radio-option-label:before{top:0;left:0}@media (width<=39.999rem){[data-formie-field-control]:has(>[data-formie-likert-field-layout]){overflow-x:visible}.formie-likert-field-layout{table-layout:auto;background-color:#0000;border-radius:0;width:100%;padding:0;display:block}.formie-likert-column-labels{clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.formie-likert-field-layout thead,.formie-likert-field-layout tbody,.formie-likert-field-layout tr,.formie-likert-field-layout th,.formie-likert-field-layout td{width:100%;display:block}.formie-likert-inputs-row{margin:0 0 var(--formie-space-2);padding:var(--formie-space-2) var(--formie-space-3);border-radius:var(--formie-border-radius);background-color:var(--formie-survey-likert-option-background,var(--formie-color-surface-muted))}.formie-likert-inputs-row:last-child{margin-bottom:0}.formie-likert-inputs-row--alt{background-color:var(--formie-survey-likert-option-background-alt,var(--formie-color-surface))}.formie-likert-option{padding:var(--formie-space-2) 0;text-align:left;background-color:#0000;border-radius:0;min-width:0;display:block}.formie-likert-option:first-child{padding-top:0}.formie-likert-option:last-child{padding-bottom:0}.formie-likert-option .formie-radio-option-label{width:auto;height:auto;padding-left:var(--formie-check-label-padding-left);line-height:var(--formie-check-line-height);font-weight:var(--formie-font-weight-normal);color:var(--formie-color-text);overflow:visible}.formie-likert-option .formie-likert-option-label-text{display:inline}.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-row-label{width:100%;padding:0 0 var(--formie-space-2);font-weight:var(--formie-font-weight-medium);white-space:normal;background-color:#0000;display:block}.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-inputs-row{border-top:0}.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-inputs-row .formie-likert-row-label,.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-inputs-row .formie-likert-option:first-child,.formie-likert-field-layout[data-formie-likert-multiple-rows] .formie-likert-inputs-row .formie-likert-option:last-child{border-radius:0}}.formie-rank-field-layout{width:100%}.formie-rank-list,.formie-rank-field-layout .formie-rank-list.formie-field-options{margin:var(--formie-space-1) 0 0;gap:var(--formie-survey-rank-list-gap,var(--formie-space-2));flex-flow:column;padding:0;list-style:none;display:flex}.formie-rank-list[data-formie-rank-sorting=true]{-webkit-user-select:none;user-select:none}.formie-rank-item{align-items:center;gap:var(--formie-space-2);padding:var(--formie-space-2) var(--formie-space-3);border:var(--formie-border-width) solid var(--formie-survey-rank-item-border-color,var(--formie-color-border));border-radius:var(--formie-border-radius);background:var(--formie-survey-rank-item-background,var(--formie-color-surface));cursor:move;touch-action:none;margin:0;display:flex}.formie-rank-placeholder{box-sizing:border-box;background:0 0;border:0;margin:0;padding:0;list-style:none}.formie-rank-handle{width:.875rem;height:1.125rem;color:var(--formie-survey-rank-handle-color,var(--formie-color-text-muted));opacity:.6;cursor:move;pointer-events:none;background:0 0;border:0;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.formie-rank-handle:before{content:\"\";background:currentColor;width:13px;height:.875rem;display:block;-webkit-mask:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M288 128C288 92.7 259.3 64 224 64C188.7 64 160 92.7 160 128C160 163.3 188.7 192 224 192C259.3 192 288 163.3 288 128zM288 320C288 284.7 259.3 256 224 256C188.7 256 160 284.7 160 320C160 355.3 188.7 384 224 384C259.3 384 288 355.3 288 320zM160 512C160 547.3 188.7 576 224 576C259.3 576 288 547.3 288 512C288 476.7 259.3 448 224 448C188.7 448 160 476.7 160 512zM480 128C480 92.7 451.3 64 416 64C380.7 64 352 92.7 352 128C352 163.3 380.7 192 416 192C451.3 192 480 163.3 480 128zM352 320C352 355.3 380.7 384 416 384C451.3 384 480 355.3 480 320C480 284.7 451.3 256 416 256C380.7 256 352 284.7 352 320zM480 512C480 476.7 451.3 448 416 448C380.7 448 352 476.7 352 512C352 547.3 380.7 576 416 576C451.3 576 480 547.3 480 512z'/%3E%3C/svg%3E\") 50%/contain no-repeat;mask:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cpath d='M288 128C288 92.7 259.3 64 224 64C188.7 64 160 92.7 160 128C160 163.3 188.7 192 224 192C259.3 192 288 163.3 288 128zM288 320C288 284.7 259.3 256 224 256C188.7 256 160 284.7 160 320C160 355.3 188.7 384 224 384C259.3 384 288 355.3 288 320zM160 512C160 547.3 188.7 576 224 576C259.3 576 288 547.3 288 512C288 476.7 259.3 448 224 448C188.7 448 160 476.7 160 512zM480 128C480 92.7 451.3 64 416 64C380.7 64 352 92.7 352 128C352 163.3 380.7 192 416 192C451.3 192 480 163.3 480 128zM352 320C352 355.3 380.7 384 416 384C451.3 384 480 355.3 480 320C480 284.7 451.3 256 416 256C380.7 256 352 284.7 352 320zM480 512C480 476.7 451.3 448 416 448C380.7 448 352 476.7 352 512C352 547.3 380.7 576 416 576C451.3 576 480 547.3 480 512z'/%3E%3C/svg%3E\") 50%/contain no-repeat}.formie-rank-option-label{font-size:var(--formie-check-font-size);line-height:var(--formie-check-line-height);flex:auto}.formie-rank-input{display:none}.formie-rating-field-layout{width:100%}.formie-rating-stars,.formie-rating-field-layout .formie-rating-stars.formie-field-options{padding:var(--formie-space-2) 0;--formie-survey-rating-star-size:26px;--formie-survey-rating-star-spacing:var(--formie-space-1);--formie-survey-rating-star-outline:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2023%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M22.2%208.05333L15.7466%207.49333L13.2266%201.56C12.7733%200.48%2011.2266%200.48%2010.7733%201.56L8.25331%207.50667L1.81331%208.05333C0.639975%208.14667%200.159975%209.61333%201.05331%2010.3867L5.94664%2014.6267L4.47998%2020.92C4.21331%2022.0667%205.45331%2022.9733%206.46664%2022.36L12%2019.0267L17.5333%2022.3733C18.5466%2022.9867%2019.7866%2022.08%2019.52%2020.9333L18.0533%2014.6267L22.9466%2010.3867C23.84%209.61333%2023.3733%208.14667%2022.2%208.05333ZM12%2016.5333L6.98664%2019.56L8.31998%2013.8533L3.89331%2010.0133L9.73331%209.50667L12%204.13333L14.28%209.52L20.12%2010.0267L15.6933%2013.8667L17.0266%2019.5733L12%2016.5333Z%22%20fill%3D%22%23E27730%22%2F%3E%3C%2Fsvg%3E);--formie-survey-rating-star-filled:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2023%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M12%2019.0267L17.5333%2022.3733C18.5466%2022.9867%2019.7866%2022.08%2019.52%2020.9333L18.0533%2014.64L22.9466%2010.4C23.84%209.62667%2023.36%208.16%2022.1866%208.06667L15.7466%207.52L13.2266%201.57334C12.7733%200.493336%2011.2266%200.493336%2010.7733%201.57334L8.25331%207.50667L1.81331%208.05334C0.639975%208.14667%200.159975%209.61334%201.05331%2010.3867L5.94664%2014.6267L4.47997%2020.92C4.21331%2022.0667%205.45331%2022.9733%206.46664%2022.36L12%2019.0267Z%22%20fill%3D%22%23E27730%22%2F%3E%3C%2Fsvg%3E);flex-wrap:nowrap;align-items:center;gap:0;display:inline-flex}.formie-rating-option{cursor:pointer;align-items:center;gap:0;margin:0;position:relative}.formie-rating-input{clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.formie-rating-option-label{cursor:pointer;padding-inline:calc(var(--formie-survey-rating-star-spacing,var(--formie-space-1)) / 2);display:inline-flex}.formie-rating-star{width:var(--formie-survey-rating-star-size,26px);height:var(--formie-survey-rating-star-size,26px);background:50%/contain no-repeat;background-image:var(--formie-survey-rating-star-outline);display:block}.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"1\"] .formie-rating-option:nth-child(-n+1) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"2\"] .formie-rating-option:nth-child(-n+2) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"3\"] .formie-rating-option:nth-child(-n+3) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"4\"] .formie-rating-option:nth-child(-n+4) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"5\"] .formie-rating-option:nth-child(-n+5) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"6\"] .formie-rating-option:nth-child(-n+6) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"7\"] .formie-rating-option:nth-child(-n+7) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"8\"] .formie-rating-option:nth-child(-n+8) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"9\"] .formie-rating-option:nth-child(-n+9) .formie-rating-star,.formie-rating-stars:not([data-formie-rating-hover])[data-formie-rating-value=\"10\"] .formie-rating-option:nth-child(-n+10) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"1\"] .formie-rating-option:nth-child(-n+1) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"2\"] .formie-rating-option:nth-child(-n+2) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"3\"] .formie-rating-option:nth-child(-n+3) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"4\"] .formie-rating-option:nth-child(-n+4) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"5\"] .formie-rating-option:nth-child(-n+5) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"6\"] .formie-rating-option:nth-child(-n+6) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"7\"] .formie-rating-option:nth-child(-n+7) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"8\"] .formie-rating-option:nth-child(-n+8) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"9\"] .formie-rating-option:nth-child(-n+9) .formie-rating-star,.formie-rating-stars[data-formie-rating-hover=\"10\"] .formie-rating-option:nth-child(-n+10) .formie-rating-star{background-image:var(--formie-survey-rating-star-filled)}.formie-rating-input:focus-visible+.formie-rating-option-label .formie-rating-star{outline:2px solid var(--formie-color-focus-ring);outline-offset:2px}}";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as t };
|
|
@@ -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 { r as n } from "./scripts-
|
|
3
|
+
import { r as n } from "./scripts-CbQ7agX3.js";
|
|
4
4
|
//#region src/js/modules/address/address-finder.ts
|
|
5
5
|
var r = "FORMIE_ADDRESS_FINDER_SCRIPT", i = t({
|
|
6
6
|
id: "address-finder",
|
|
@@ -54,52 +54,52 @@ var g = new Set([
|
|
|
54
54
|
"formie:page:navigate",
|
|
55
55
|
"formie:page:navigate:after",
|
|
56
56
|
"formie:submit:result"
|
|
57
|
-
];
|
|
58
|
-
function
|
|
57
|
+
], y = new Set(["formie:page:navigate", "formie:page:navigate:after"]);
|
|
58
|
+
function b(e, t, n) {
|
|
59
59
|
return e.addEventListener(t, n), () => {
|
|
60
60
|
e.removeEventListener(t, n);
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function x(e, t) {
|
|
64
64
|
return e instanceof HTMLElement && e.matches(t) ? [e, ...Array.from(e.querySelectorAll(t))] : Array.from(e.querySelectorAll(t));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function S(e) {
|
|
67
67
|
if (!(e instanceof HTMLElement) || !e.isConnected || e.hidden || e.closest("[hidden]") || e.closest("[data-formie-page-hidden]") || e.closest("[aria-hidden=\"true\"]")) return !1;
|
|
68
68
|
let t = window.getComputedStyle(e);
|
|
69
|
-
return t.display !== "none" && t.visibility !== "hidden";
|
|
69
|
+
return t.display !== "none" && t.visibility !== "hidden" && e.getClientRects().length > 0;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
let n =
|
|
73
|
-
return n.find((e) =>
|
|
71
|
+
function C(e, t) {
|
|
72
|
+
let n = x(e, t);
|
|
73
|
+
return n.find((e) => S(e)) || n[0] || null;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function w(e) {
|
|
76
76
|
e.innerHTML = "";
|
|
77
77
|
let t = document.createElement("div");
|
|
78
78
|
return e.appendChild(t), t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function T(e) {
|
|
81
81
|
e?.querySelector(_)?.remove();
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function E(e, t, r) {
|
|
84
84
|
if (!e) return;
|
|
85
|
-
|
|
85
|
+
T(e);
|
|
86
86
|
let i = document.createElement("div");
|
|
87
87
|
i.setAttribute("data-formie-captcha-error-container", ""), i.setAttribute("aria-live", "polite"), i.setAttribute("aria-atomic", "true"), n(i, r || e, "fieldErrors");
|
|
88
88
|
let a = document.createElement("div");
|
|
89
89
|
a.setAttribute("data-formie-captcha-error", ""), a.setAttribute("role", "alert"), n(a, r || e, "fieldError"), a.textContent = t, i.appendChild(a), e.appendChild(i);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function D(e) {
|
|
92
92
|
let t = e instanceof CustomEvent ? e.detail : null;
|
|
93
93
|
return !t || typeof t != "object" ? null : t;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function O(e, t) {
|
|
96
96
|
if (!e?.captchas || typeof e.captchas != "object") return null;
|
|
97
97
|
let n = e.captchas[t];
|
|
98
98
|
return !n || typeof n != "object" ? null : n;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function k(e, t, n, r) {
|
|
101
101
|
let i = /* @__PURE__ */ new Set(), o = () => {
|
|
102
|
-
let a =
|
|
102
|
+
let a = x(e, t), o = new Set(a.filter((e) => S(e)));
|
|
103
103
|
a.forEach((e) => {
|
|
104
104
|
o.has(e) && !i.has(e) && (i.add(e), n(e));
|
|
105
105
|
}), Array.from(i).forEach((e) => {
|
|
@@ -120,9 +120,13 @@ function O(e, t, n, r) {
|
|
|
120
120
|
"data-formie-page-hidden"
|
|
121
121
|
]
|
|
122
122
|
});
|
|
123
|
-
let l = [
|
|
123
|
+
let l = [b(window, "resize", () => {
|
|
124
124
|
s();
|
|
125
|
-
}), ...v.map((t) =>
|
|
125
|
+
}), ...v.map((t) => b(e, t, () => {
|
|
126
|
+
if (y.has(t)) {
|
|
127
|
+
o();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
126
130
|
s();
|
|
127
131
|
}))];
|
|
128
132
|
return o(), {
|
|
@@ -134,16 +138,17 @@ function O(e, t, n, r) {
|
|
|
134
138
|
}), i.clear();
|
|
135
139
|
},
|
|
136
140
|
reconcile: s,
|
|
137
|
-
|
|
141
|
+
reconcileImmediate: o,
|
|
142
|
+
getVisible: () => x(e, t).filter((e) => S(e))
|
|
138
143
|
};
|
|
139
144
|
}
|
|
140
|
-
function
|
|
145
|
+
function A(e, t) {
|
|
141
146
|
return (typeof t.handle == "string" && t.handle.trim() !== "" ? t.handle.trim() : "") || e;
|
|
142
147
|
}
|
|
143
|
-
function
|
|
148
|
+
function j(e, t, { defaultPlaceholderSelector: n, defaultTokenFieldNames: i = [], defaultWaitForValueMs: a = o }) {
|
|
144
149
|
let s = t || {}, c = Object.entries(s).reduce((e, [t, n]) => (g.has(t) || (e[t] = n), e), {}), l = i.map(String).filter(Boolean), u = Number(a), d = typeof s.placeholderSelector == "string" && s.placeholderSelector.trim() !== "" ? s.placeholderSelector.trim() : n, f = typeof s.errorMessage == "string" && s.errorMessage.trim() !== "" ? s.errorMessage.trim() : r("Captcha challenge must be completed."), p = typeof s.sessionKey == "string" && s.sessionKey.trim() !== "" ? s.sessionKey.trim() : null, m = typeof s.value == "string" ? s.value : null;
|
|
145
150
|
return {
|
|
146
|
-
handle:
|
|
151
|
+
handle: A(e, s),
|
|
147
152
|
ui: {
|
|
148
153
|
placeholderSelector: d,
|
|
149
154
|
errorMessage: f
|
|
@@ -157,27 +162,27 @@ function A(e, t, { defaultPlaceholderSelector: n, defaultTokenFieldNames: i = []
|
|
|
157
162
|
provider: c
|
|
158
163
|
};
|
|
159
164
|
}
|
|
160
|
-
function
|
|
165
|
+
function M(e, t) {
|
|
161
166
|
let n = e.form || e.root, r = t.ui.placeholderSelector, i = t.handle;
|
|
162
167
|
return {
|
|
163
168
|
form: e.form,
|
|
164
169
|
root: e.root,
|
|
165
170
|
placeholder: {
|
|
166
|
-
query: () =>
|
|
167
|
-
getPrimary: () =>
|
|
168
|
-
observe: (t, n) =>
|
|
169
|
-
createContainer: (e) =>
|
|
171
|
+
query: () => x(e.root, r),
|
|
172
|
+
getPrimary: () => C(e.root, r),
|
|
173
|
+
observe: (t, n) => k(e.root, r, t, n),
|
|
174
|
+
createContainer: (e) => w(e),
|
|
170
175
|
clear: (e) => {
|
|
171
|
-
e && (
|
|
176
|
+
e && (T(e), e.innerHTML = "");
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
errors: {
|
|
175
180
|
getDefaultMessage: () => t.ui.errorMessage,
|
|
176
181
|
show: (n, i) => {
|
|
177
|
-
|
|
182
|
+
E(i || C(e.root, r), n || t.ui.errorMessage, e.form || e.root);
|
|
178
183
|
},
|
|
179
184
|
clear: (t) => {
|
|
180
|
-
|
|
185
|
+
T(t || C(e.root, r));
|
|
181
186
|
}
|
|
182
187
|
},
|
|
183
188
|
tokens: {
|
|
@@ -200,8 +205,8 @@ function j(e, t) {
|
|
|
200
205
|
refresh: {
|
|
201
206
|
providerHandle: i,
|
|
202
207
|
onTokensRefreshed: (t) => {
|
|
203
|
-
let n = ["formie:refresh-tokens:after", "formie:refresh-tokens:refreshed"].map((n) =>
|
|
204
|
-
let n = D(
|
|
208
|
+
let n = ["formie:refresh-tokens:after", "formie:refresh-tokens:refreshed"].map((n) => b(e.root, n, (e) => {
|
|
209
|
+
let n = O(D(e), i);
|
|
205
210
|
n && t(n);
|
|
206
211
|
}));
|
|
207
212
|
return () => {
|
|
@@ -212,31 +217,31 @@ function j(e, t) {
|
|
|
212
217
|
}
|
|
213
218
|
},
|
|
214
219
|
events: {
|
|
215
|
-
onRoot: (t, n) =>
|
|
216
|
-
onForm: (t, n) => e.form ?
|
|
220
|
+
onRoot: (t, n) => b(e.root, t, n),
|
|
221
|
+
onForm: (t, n) => e.form ? b(e.form, t, n) : () => {}
|
|
217
222
|
}
|
|
218
223
|
};
|
|
219
224
|
}
|
|
220
225
|
//#endregion
|
|
221
226
|
//#region src/js/modules/captchas/factories.ts
|
|
222
|
-
var
|
|
223
|
-
function
|
|
227
|
+
var N = t("captchas");
|
|
228
|
+
function P({ id: e, defaultPlaceholderSelector: t, defaultTokenFieldNames: n = [], defaultWaitForValueMs: r = o, setup: i }) {
|
|
224
229
|
return {
|
|
225
230
|
id: e,
|
|
226
231
|
kind: "captcha",
|
|
227
232
|
match: () => !0,
|
|
228
233
|
setup: async (a) => {
|
|
229
|
-
let o =
|
|
234
|
+
let o = j(e, a.options || {}, {
|
|
230
235
|
defaultPlaceholderSelector: t,
|
|
231
236
|
defaultTokenFieldNames: n,
|
|
232
237
|
defaultWaitForValueMs: r
|
|
233
238
|
});
|
|
234
|
-
|
|
239
|
+
N.log("Setup module.", {
|
|
235
240
|
moduleId: e,
|
|
236
241
|
placeholderSelector: o.ui.placeholderSelector,
|
|
237
242
|
tokenFieldNames: o.transport.tokenFieldNames
|
|
238
243
|
});
|
|
239
|
-
let s =
|
|
244
|
+
let s = M(a, o);
|
|
240
245
|
return i({
|
|
241
246
|
...a,
|
|
242
247
|
options: o,
|
|
@@ -245,8 +250,8 @@ function N({ id: e, defaultPlaceholderSelector: t, defaultTokenFieldNames: n = [
|
|
|
245
250
|
}
|
|
246
251
|
};
|
|
247
252
|
}
|
|
248
|
-
function
|
|
249
|
-
return
|
|
253
|
+
function F({ id: e, defaultPlaceholderSelector: t, defaultTokenFieldNames: n = [], defaultWaitForValueMs: r = o }) {
|
|
254
|
+
return P({
|
|
250
255
|
id: e,
|
|
251
256
|
defaultPlaceholderSelector: t,
|
|
252
257
|
defaultTokenFieldNames: n,
|
|
@@ -258,7 +263,7 @@ function P({ id: e, defaultPlaceholderSelector: t, defaultTokenFieldNames: n = [
|
|
|
258
263
|
container: e
|
|
259
264
|
}));
|
|
260
265
|
}, l = t.placeholder.observe((t) => {
|
|
261
|
-
a = t,
|
|
266
|
+
a = t, N.log("Passive placeholder visible.", { moduleId: e }), c(t);
|
|
262
267
|
}, (e) => {
|
|
263
268
|
a === e && (a = t.placeholder.getPrimary()), e.innerHTML = "";
|
|
264
269
|
});
|
|
@@ -277,7 +282,7 @@ function P({ id: e, defaultPlaceholderSelector: t, defaultTokenFieldNames: n = [
|
|
|
277
282
|
let s = o ? [o] : n.transport.tokenFieldNames;
|
|
278
283
|
if (s.length !== 0 && !await h(r, s, n.transport.waitForValueMs)) {
|
|
279
284
|
let n = t.errors.getDefaultMessage();
|
|
280
|
-
t.errors.show(n, a),
|
|
285
|
+
t.errors.show(n, a), N.warn("Passive captcha missing token.", {
|
|
281
286
|
moduleId: e,
|
|
282
287
|
tokenFieldNames: s
|
|
283
288
|
}), i.abort(n);
|
|
@@ -287,13 +292,13 @@ function P({ id: e, defaultPlaceholderSelector: t, defaultTokenFieldNames: n = [
|
|
|
287
292
|
}
|
|
288
293
|
});
|
|
289
294
|
}
|
|
290
|
-
function
|
|
291
|
-
return
|
|
295
|
+
function I(t) {
|
|
296
|
+
return P({
|
|
292
297
|
id: t.id,
|
|
293
298
|
defaultPlaceholderSelector: t.defaultPlaceholderSelector,
|
|
294
299
|
defaultTokenFieldNames: t.defaultTokenFieldNames,
|
|
295
300
|
setup: async (n) => {
|
|
296
|
-
let r = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = n.services.placeholder.getPrimary(), s = !1, c = null, l = async () => (c ||= (
|
|
301
|
+
let r = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = n.services.placeholder.getPrimary(), s = !1, c = null, l = async () => (c ||= (N.log("Loading captcha provider API.", { moduleId: t.id }), t.load(n)), c), u = async (e) => {
|
|
297
302
|
let r = i.get(e);
|
|
298
303
|
if (n.services.errors.clear(e), !r) {
|
|
299
304
|
e.innerHTML = "";
|
|
@@ -307,7 +312,7 @@ function F(t) {
|
|
|
307
312
|
services: n.services,
|
|
308
313
|
options: n.options,
|
|
309
314
|
provider: n.options.provider
|
|
310
|
-
}), i.delete(e), e.innerHTML = "", n.services.tokens.clear(),
|
|
315
|
+
}), i.delete(e), e.innerHTML = "", n.services.tokens.clear(), N.log("Unmounted captcha placeholder widget.", { moduleId: t.id }), o === e && (o = n.services.placeholder.getPrimary());
|
|
311
316
|
}, d = async (e) => {
|
|
312
317
|
if (s || i.has(e) || a.has(e)) return;
|
|
313
318
|
let r = (async () => {
|
|
@@ -321,7 +326,7 @@ function F(t) {
|
|
|
321
326
|
options: n.options,
|
|
322
327
|
provider: n.options.provider
|
|
323
328
|
});
|
|
324
|
-
i.set(e, c), o = e,
|
|
329
|
+
i.set(e, c), o = e, N.log("Mounted captcha placeholder widget.", { moduleId: t.id });
|
|
325
330
|
})().finally(() => {
|
|
326
331
|
a.delete(e);
|
|
327
332
|
});
|
|
@@ -375,6 +380,7 @@ function F(t) {
|
|
|
375
380
|
},
|
|
376
381
|
onBeforeStage: async (e) => {
|
|
377
382
|
if (e.stage !== "screen" || e.action !== "submit") return;
|
|
383
|
+
f.reconcileImmediate();
|
|
378
384
|
let r = f.getVisible();
|
|
379
385
|
if (r.length === 0) return;
|
|
380
386
|
let a = r.find((e) => e === o) || r[0];
|
|
@@ -382,7 +388,7 @@ function F(t) {
|
|
|
382
388
|
let s = i.get(a);
|
|
383
389
|
if (!s) {
|
|
384
390
|
let r = n.services.errors.getDefaultMessage();
|
|
385
|
-
n.services.errors.show(r, a),
|
|
391
|
+
n.services.errors.show(r, a), N.warn("Captcha widget unavailable at screen stage.", { moduleId: t.id }), e.abort(r);
|
|
386
392
|
return;
|
|
387
393
|
}
|
|
388
394
|
let c = await l();
|
|
@@ -402,6 +408,6 @@ function F(t) {
|
|
|
402
408
|
}
|
|
403
409
|
//#endregion
|
|
404
410
|
//#region src/js/modules/captchas/api.ts
|
|
405
|
-
var
|
|
411
|
+
var L = I, R = F;
|
|
406
412
|
//#endregion
|
|
407
|
-
export { s as a, l as i,
|
|
413
|
+
export { s as a, l as i, R as n, c as o, u as r, L as t };
|