@wssto2/vue-core 0.3.0 → 0.4.0
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/README.md +3 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js → AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js} +1 -1
- package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js → ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js} +2 -2
- package/dist/{Activity-DviO0VQ8.js → Activity-2gGxQn7v.js} +9 -9
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-BoinCY93.js} +3 -3
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js → AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js → AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js → Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js → Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js} +1 -1
- package/dist/{Changes-DlT5mN9G.js → Changes-Bm8xvagD.js} +8 -8
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js → CollectionPage.vue_vue_type_script_setup_true_lang-DCBVw2Qd.js} +176 -172
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js → DataTable.vue_vue_type_script_setup_true_lang-UH6f9puS.js} +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +255 -0
- package/dist/DeadLetters-CMRtXn_N.js +104 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js → EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js} +1 -1
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js → FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js} +1 -1
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js → FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js} +10 -10
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js → FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js} +2 -2
- package/dist/{General-BD-Hcz0a.js → General-CTqd0SLK.js} +8 -8
- package/dist/HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js +45 -0
- package/dist/{Icon.vue_vue_type_script_lang-VvcV2Bzo.js → Icon.vue_vue_type_script_lang-D7oC-d-S.js} +33 -29
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js → IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js} +1 -1
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js → Menu.vue_vue_type_script_setup_true_lang-DTbAcDzL.js} +30 -26
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js → Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js} +2 -2
- package/dist/{NewRolePage-Dla4YnMs.js → NewRolePage-DTOWIxxC.js} +4 -4
- package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js → NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js → NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js} +1 -1
- package/dist/{PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js → PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js} +1 -1
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js → Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js} +1 -1
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +46 -0
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js → PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js} +1 -1
- package/dist/ProfilePage-BlpiWH_W.js +654 -0
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js → RecordHeader.vue_vue_type_script_setup_true_lang-C_ymvhHU.js} +2 -2
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js → ResourcePage.vue_vue_type_script_setup_true_lang-CwI_sROp.js} +5 -5
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js → RoleEditor.vue_vue_type_script_setup_true_lang-CmwvSytD.js} +30 -29
- package/dist/{RolePage-bZzv_E4l.js → RolePage-DZk7BZOc.js} +13 -13
- package/dist/{RolesPage-BniZv0nB.js → RolesPage-DzGGCMnm.js} +9 -9
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js → SectionList.vue_vue_type_script_setup_true_lang-BFYls8fR.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DSMXEaCs.js} +5 -5
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js → SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js → SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js} +15 -14
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js → SessionList.vue_vue_type_script_setup_true_lang-D5KRitar.js} +4 -4
- package/dist/{Sessions-Co5-xdeb.js → Sessions-CWqjjTr1.js} +6 -6
- package/dist/SettingsPage-C4s0IdkW.js +255 -0
- package/dist/{Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js → Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js} +48 -45
- package/dist/{SignIn-BWwFbxki.js → SignIn-zzKY__df.js} +7 -7
- package/dist/{SignInPage-FnLtoi2q.js → SignInPage-Rqnus_s-.js} +6 -6
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js → SignInTable.vue_vue_type_script_setup_true_lang-CEbAvZ_C.js} +1 -1
- package/dist/{SignIns-3UcI64_h.js → SignIns-Cnf9BVR0.js} +6 -6
- package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js → SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js} +1 -1
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +64 -0
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js → Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js → TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js} +3 -3
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +68 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +164 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js → Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js} +1 -1
- package/dist/{UserRecord-Ci8HfwbX.js → UserRecord-DqigxVxH.js} +12 -12
- package/dist/{UsersList-vEJ-cgkT.js → UsersList-DNlZsI9J.js} +8 -8
- package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js → ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js} +1 -1
- package/dist/access/index.js +1 -1
- package/dist/app/index.js +9 -9
- package/dist/button/index.js +1 -1
- package/dist/client/index.js +11 -19
- package/dist/{client-Bw0aM5Gu.js → client-k9euDWF4.js} +19 -19
- package/dist/collection/definition.d.ts +3 -0
- package/dist/collection/index.js +6 -6
- package/dist/collection/useCollection.d.ts +2 -0
- package/dist/content/index.js +2 -2
- package/dist/{contributions-CDDg3fKp.js → contributions-DsfmDoRD.js} +1 -1
- package/dist/control-7EP4tjYy.js +313 -0
- package/dist/controls/index.js +4 -4
- package/dist/form/index.js +987 -1134
- package/dist/{guards-Cd1V28oG.js → guards-Dve61KjR.js} +1 -1
- package/dist/{http-DGGSKWvU.js → http-CNcDHSOj.js} +9 -8
- package/dist/i18n/index.js +20 -20
- package/dist/icon/core.d.ts +4 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/index-BsJ92eub.js +504 -0
- package/dist/{index-BAcl44SC.js → index-CGv-u1Ws.js} +19 -19
- package/dist/{index-B2dbYZR9.js → index-GcLnFF-z.js} +15 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/Sheet.vue.d.ts +2 -0
- package/dist/modal/index.js +5 -5
- package/dist/modules/events/entities.d.ts +16 -0
- package/dist/modules/events/routes.d.ts +17 -0
- package/dist/modules/events/schemas.d.ts +16 -0
- package/dist/modules/notification/entities.d.ts +46 -0
- package/dist/modules/notification/routes.d.ts +26 -0
- package/dist/modules/notification/schemas.d.ts +25 -0
- package/dist/{navigation-BPWa63ge.js → navigation-Cm3iChlR.js} +1 -1
- package/dist/{neighbors-D0WRBxXI.js → neighbors-DpaIMQAL.js} +1 -1
- package/dist/notifications/InboxPanel.vue.d.ts +16 -0
- package/dist/notifications/MarkAllRead.vue.d.ts +7 -0
- package/dist/notifications/NotificationBell.vue.d.ts +2 -0
- package/dist/notifications/SettingsLink.vue.d.ts +6 -0
- package/dist/notifications/context.d.ts +20 -0
- package/dist/notifications/deadletters/DeadLetters.vue.d.ts +2 -0
- package/dist/notifications/deadletters/access.d.ts +3 -0
- package/dist/notifications/deadletters/list.d.ts +3 -0
- package/dist/notifications/deadletters/routes.d.ts +13 -0
- package/dist/notifications/feature.d.ts +31 -0
- package/dist/notifications/inbox.d.ts +62 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.js +8 -0
- package/dist/notifications/settings/EmailPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/QuietHoursPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/SettingsMenuItem.vue.d.ts +2 -0
- package/dist/notifications/settings/SettingsPage.vue.d.ts +2 -0
- package/dist/notifications/settings/categoryText.d.ts +9 -0
- package/dist/notifications/settings/routes.d.ts +13 -0
- package/dist/notifications/settings/settings.d.ts +18 -0
- package/dist/notifications/settings/state.d.ts +16 -0
- package/dist/notifications/state.d.ts +27 -0
- package/dist/notifications/stream.d.ts +21 -0
- package/dist/options-Ba_0uLWN.js +18 -0
- package/dist/overlay/index.js +3 -3
- package/dist/page/index.js +7 -7
- package/dist/phone/index.js +68 -67
- package/dist/platform/index.js +2 -2
- package/dist/{platform-hunMqFdB.js → platform-q3cjODLx.js} +1 -1
- package/dist/resource/index.js +1 -1
- package/dist/route-goWMxDUN.js +13 -0
- package/dist/router/index.js +4 -4
- package/dist/{rowLayout-BI7a3Kom.js → rowLayout-BqTEhEuy.js} +5 -5
- package/dist/{sections-BEqW1dOc.js → sections-CntvUTxn.js} +1 -1
- package/dist/shell/index.js +460 -496
- package/dist/state/index.js +4 -4
- package/dist/{status-C9aXR-Jb.js → status-BuP3ULjH.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{suggestions-BJAqOj4c.js → suggestions-BxMm6MQA.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/transport-BnP7WC0Y.js +4 -0
- package/dist/{useCommand-BgRwnYlV.js → useCommand-BkONMn3X.js} +2 -2
- package/dist/{useResourceForm-Bgc9jMcu.js → useResourceForm-D1hIpwW5.js} +1 -1
- package/dist/useTypedEntry-aTfPBAhw.js +857 -0
- package/package.json +6 -2
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +0 -1099
- package/dist/ProfilePage-OJMQ8cr8.js +0 -691
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +0 -127
- package/dist/options-BXkMR63B.js +0 -329
package/dist/form/index.js
CHANGED
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { E as
|
|
3
|
-
import { f as ze } from "../useCommand-
|
|
4
|
-
import { _ as
|
|
5
|
-
import { ref as
|
|
6
|
-
import { a as
|
|
7
|
-
import { M as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { u as
|
|
23
|
-
import { u as
|
|
24
|
-
import { _ as
|
|
25
|
-
import {
|
|
26
|
-
import { _ as
|
|
27
|
-
import {
|
|
28
|
-
import { _ as
|
|
29
|
-
import { a as
|
|
30
|
-
import { _ as
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { _ as
|
|
34
|
-
import {
|
|
35
|
-
import { _ as
|
|
36
|
-
import {
|
|
37
|
-
import { _ as
|
|
38
|
-
import { _ as
|
|
39
|
-
import { _ as
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { _ as
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
import { _ as Me, s as Ke, c as $e, f as Xe } from "../FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js";
|
|
2
|
+
import { E as qo, u as Mo } from "../FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js";
|
|
3
|
+
import { f as ze } from "../useCommand-BkONMn3X.js";
|
|
4
|
+
import { _ as jo, a as Ro, u as To } from "../useCommand-BkONMn3X.js";
|
|
5
|
+
import { ref as I, computed as y, defineComponent as G, openBlock as i, createBlock as q, mergeProps as J, unref as s, withCtx as C, createElementVNode as p, normalizeClass as R, createElementBlock as g, Fragment as ne, renderList as xe, createVNode as M, createCommentVNode as D, toDisplayString as $, mergeDefaults as ie, useModel as oe, useId as Oe, withKeys as Se, withModifiers as pe, renderSlot as le, createTextVNode as Y, mergeModels as se, useTemplateRef as P, shallowRef as De, watch as re, nextTick as ye, provide as Ve, inject as Qe, createSlots as Ze, onBeforeUnmount as je, onMounted as ot, toRef as st, toValue as qe, getCurrentScope as nt, onScopeDispose as rt, shallowReactive as Pe, normalizeStyle as it, resolveDynamicComponent as ut } from "vue";
|
|
6
|
+
import { a as Re } from "../leaveGuard-Cc8yeLxM.js";
|
|
7
|
+
import { M as Io, c as Go, i as No, l as Ko, u as Po } from "../leaveGuard-Cc8yeLxM.js";
|
|
8
|
+
import { _ as Uo } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js";
|
|
9
|
+
import { u as Wo } from "../useResourceForm-D1hIpwW5.js";
|
|
10
|
+
import { _ as H } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
11
|
+
import { u as et, _ as ge, f as ue, b as de, a as tt, c as Te, e as dt, h as ct, i as ft, d as mt } from "../control-7EP4tjYy.js";
|
|
12
|
+
import { useI18n as Q } from "vue-i18n";
|
|
13
|
+
import { b as vt } from "../controlSurface-t7OEFESJ.js";
|
|
14
|
+
import { a as pt } from "../TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js";
|
|
15
|
+
import { _ as Ho } from "../TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js";
|
|
16
|
+
import { u as bt, l as gt } from "../suggestions-BxMm6MQA.js";
|
|
17
|
+
import { r as Qo } from "../suggestions-BxMm6MQA.js";
|
|
18
|
+
import { s as ke, u as Ae, i as ht, o as we, e as Ce, k as yt, _ as xt, l as _t, c as kt, b as wt, t as Be, g as $t, q as St } from "../useTypedEntry-aTfPBAhw.js";
|
|
19
|
+
import { u as Ct, a as Ft, s as Lt } from "../DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js";
|
|
20
|
+
import { _ as es } from "../DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js";
|
|
21
|
+
import { _ as at } from "../DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js";
|
|
22
|
+
import { u as Bt } from "../format-B8mJm946.js";
|
|
23
|
+
import { u as Ee } from "../mediaQuery-CygcXmFW.js";
|
|
24
|
+
import { _ as Ie } from "../Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
|
|
25
|
+
import { u as zt } from "../TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js";
|
|
26
|
+
import { _ as as } from "../TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js";
|
|
27
|
+
import { _ as be } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
28
|
+
import { _ as Dt, r as Vt } from "../FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js";
|
|
29
|
+
import { a as os, c as ss, p as ns, u as rs } from "../FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js";
|
|
30
|
+
import { _ as us } from "../FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js";
|
|
31
|
+
import { a as qt } from "../environment-Dva-SG8D.js";
|
|
32
|
+
import { _ as Mt } from "../NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js";
|
|
33
|
+
import { _ as Ot } from "../Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
34
|
+
import { u as jt, a as Ue } from "../SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js";
|
|
35
|
+
import { _ as cs, b as fs } from "../SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js";
|
|
36
|
+
import { g as vs, m as ps } from "../options-Ba_0uLWN.js";
|
|
37
|
+
import { _ as gs } from "../OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js";
|
|
38
|
+
import { _ as Ye } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js";
|
|
39
|
+
import { _ as ys } from "../SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js";
|
|
40
|
+
import { _ as _s } from "../SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js";
|
|
41
|
+
import { _ as ws } from "../TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js";
|
|
42
|
+
import { _ as Rt } from "../Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
43
|
+
import { _ as We } from "../Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js";
|
|
44
|
+
import { D as Tt } from "../useWaitStatus-fsacMl4W.js";
|
|
45
|
+
import { t as Et } from "../toast-D9Z5To38.js";
|
|
46
|
+
import { a as It } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-BoinCY93.js";
|
|
47
|
+
import { _ as Gt, a as Nt } from "../SectionList.vue_vue_type_script_setup_true_lang-BFYls8fR.js";
|
|
48
|
+
import { p as Kt } from "../sectionIndex-BS0ic5W7.js";
|
|
49
|
+
import { u as Pt } from "../useSaveChrome-chi6D3HY.js";
|
|
50
|
+
import { matchedRouteKey as At, onBeforeRouteLeave as Ut } from "vue-router";
|
|
51
|
+
function Yt(o) {
|
|
52
|
+
const t = I(null);
|
|
49
53
|
return {
|
|
50
|
-
isDirty:
|
|
54
|
+
isDirty: y(() => t.value !== null && JSON.stringify(o()) !== t.value),
|
|
51
55
|
markClean: () => t.value = JSON.stringify(o())
|
|
52
56
|
};
|
|
53
57
|
}
|
|
54
|
-
function
|
|
55
|
-
const t =
|
|
58
|
+
function uo(o) {
|
|
59
|
+
const t = I(!1), e = Yt(o), { confirmDiscard: a } = Re(() => t.value && e.isDirty.value);
|
|
56
60
|
return {
|
|
57
61
|
/** The sheet was just filled: its current values are the baseline. */
|
|
58
62
|
opened: () => {
|
|
@@ -65,16 +69,16 @@ function vo(o) {
|
|
|
65
69
|
beforeDismiss: a
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
|
-
const
|
|
72
|
+
const Wt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Jt = ["name", "value", "checked", "disabled", "onChange"], Ht = { class: "min-w-0 flex-1" }, Xt = { class: "block text-body font-semibold text-content-strong" }, Qt = {
|
|
69
73
|
key: 0,
|
|
70
74
|
class: "mt-0.5 block text-footnote text-content-muted"
|
|
71
|
-
},
|
|
75
|
+
}, Zt = {
|
|
72
76
|
key: 1,
|
|
73
77
|
class: "flex size-5 shrink-0 items-center justify-center rounded-full bg-control-on text-white",
|
|
74
78
|
"aria-hidden": "true"
|
|
75
|
-
},
|
|
79
|
+
}, co = /* @__PURE__ */ G({
|
|
76
80
|
__name: "CardSelectField",
|
|
77
|
-
props: /* @__PURE__ */
|
|
81
|
+
props: /* @__PURE__ */ ie({
|
|
78
82
|
label: {},
|
|
79
83
|
hint: {},
|
|
80
84
|
error: {},
|
|
@@ -87,68 +91,68 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Zt = ["name
|
|
|
87
91
|
modelValue: {},
|
|
88
92
|
options: {},
|
|
89
93
|
columns: {}
|
|
90
|
-
}, { ...
|
|
94
|
+
}, { ...de, modelValue: null, columns: 2 }),
|
|
91
95
|
emits: ["update:modelValue"],
|
|
92
96
|
setup(o, { emit: t }) {
|
|
93
|
-
const e = o, a = t, { editable: n } =
|
|
94
|
-
return (
|
|
95
|
-
value: e.options.find((
|
|
97
|
+
const e = o, a = t, { editable: n } = et(e), l = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4" }, d = y(() => l[e.columns]);
|
|
98
|
+
return (m, b) => (i(), q(ge, J(s(ue)(e), {
|
|
99
|
+
value: e.options.find((h) => h.value === e.modelValue)?.label ?? null,
|
|
96
100
|
"row-layout": "stacked"
|
|
97
101
|
}), {
|
|
98
|
-
default:
|
|
102
|
+
default: C(({ id: h, describedby: k, invalid: x }) => [
|
|
99
103
|
p("div", {
|
|
100
|
-
id:
|
|
104
|
+
id: h,
|
|
101
105
|
role: "radiogroup",
|
|
102
106
|
"aria-label": e.label,
|
|
103
|
-
"aria-describedby":
|
|
107
|
+
"aria-describedby": k,
|
|
104
108
|
"aria-invalid": x || void 0,
|
|
105
|
-
class:
|
|
109
|
+
class: R(["grid w-full gap-2.5", d.value]),
|
|
106
110
|
"data-test": "card-select"
|
|
107
111
|
}, [
|
|
108
|
-
(i(!0),
|
|
112
|
+
(i(!0), g(ne, null, xe(e.options, (r) => (i(), g("label", {
|
|
109
113
|
key: r.value,
|
|
110
|
-
class:
|
|
114
|
+
class: R(["relative flex items-center gap-3 rounded-group bg-fill p-3.5 transition-colors duration-motion-fast focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-border-focus", [r.value === e.modelValue ? "bg-tint-soft ring-[1.5px] ring-inset ring-border-selected" : "hover:bg-fill-strong", e.disabled || !s(n) || r.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]])
|
|
111
115
|
}, [
|
|
112
116
|
p("input", {
|
|
113
117
|
type: "radio",
|
|
114
118
|
class: "sr-only",
|
|
115
|
-
name: e.name ??
|
|
119
|
+
name: e.name ?? h,
|
|
116
120
|
value: r.value,
|
|
117
121
|
checked: r.value === e.modelValue,
|
|
118
|
-
disabled: e.disabled || !
|
|
122
|
+
disabled: e.disabled || !s(n) || r.disabled,
|
|
119
123
|
onChange: (u) => a("update:modelValue", r.value)
|
|
120
|
-
}, null, 40,
|
|
121
|
-
r.icon ? (i(),
|
|
124
|
+
}, null, 40, Jt),
|
|
125
|
+
r.icon ? (i(), g("span", {
|
|
122
126
|
key: 0,
|
|
123
|
-
class:
|
|
127
|
+
class: R(["flex size-9 shrink-0 items-center justify-center rounded-control", r.value === e.modelValue ? "bg-control-on text-white" : "bg-fill-strong text-content-muted"])
|
|
124
128
|
}, [
|
|
125
|
-
|
|
129
|
+
M(s(H), {
|
|
126
130
|
name: r.icon,
|
|
127
131
|
size: 18
|
|
128
132
|
}, null, 8, ["name"])
|
|
129
|
-
], 2)) :
|
|
130
|
-
p("span",
|
|
131
|
-
p("span",
|
|
132
|
-
r.description ? (i(),
|
|
133
|
+
], 2)) : D("", !0),
|
|
134
|
+
p("span", Ht, [
|
|
135
|
+
p("span", Xt, $(r.label), 1),
|
|
136
|
+
r.description ? (i(), g("span", Qt, $(r.description), 1)) : D("", !0)
|
|
133
137
|
]),
|
|
134
|
-
r.value === e.modelValue ? (i(),
|
|
135
|
-
|
|
138
|
+
r.value === e.modelValue ? (i(), g("span", Zt, [
|
|
139
|
+
M(s(H), {
|
|
136
140
|
name: "checkCustom",
|
|
137
141
|
size: 12
|
|
138
142
|
})
|
|
139
|
-
])) :
|
|
143
|
+
])) : D("", !0)
|
|
140
144
|
], 2))), 128))
|
|
141
|
-
], 10,
|
|
145
|
+
], 10, Wt)
|
|
142
146
|
]),
|
|
143
147
|
_: 1
|
|
144
148
|
}, 16, ["value"]));
|
|
145
149
|
}
|
|
146
|
-
}),
|
|
150
|
+
}), ea = ["data-field-error"], ta = ["aria-checked", "aria-disabled", "aria-describedby", "aria-invalid", "tabindex", "onKeydown"], aa = { class: "flex min-w-0 flex-1 flex-col items-start" }, la = {
|
|
147
151
|
key: 0,
|
|
148
152
|
class: "flex shrink-0 items-center gap-2.5"
|
|
149
|
-
},
|
|
153
|
+
}, oa = ["id"], fo = /* @__PURE__ */ G({
|
|
150
154
|
__name: "CheckboxField",
|
|
151
|
-
props: /* @__PURE__ */
|
|
155
|
+
props: /* @__PURE__ */ se({
|
|
152
156
|
label: {},
|
|
153
157
|
description: { default: void 0 },
|
|
154
158
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -160,76 +164,76 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Zt = ["name
|
|
|
160
164
|
}),
|
|
161
165
|
emits: ["update:modelValue"],
|
|
162
166
|
setup(o) {
|
|
163
|
-
const t = o, e =
|
|
167
|
+
const t = o, e = oe(o, "modelValue"), a = !!tt(), n = Oe(), l = () => {
|
|
164
168
|
t.disabled || (e.value = !e.value);
|
|
165
169
|
};
|
|
166
|
-
return (d,
|
|
170
|
+
return (d, m) => (i(), g("div", {
|
|
167
171
|
"data-field-error": t.error ? "true" : void 0
|
|
168
172
|
}, [
|
|
169
173
|
p("div", {
|
|
170
174
|
role: "checkbox",
|
|
171
175
|
"aria-checked": e.value,
|
|
172
176
|
"aria-disabled": t.disabled || void 0,
|
|
173
|
-
"aria-describedby": t.error ? `${
|
|
177
|
+
"aria-describedby": t.error ? `${s(n)}-error` : void 0,
|
|
174
178
|
"aria-invalid": t.error ? !0 : void 0,
|
|
175
179
|
tabindex: t.disabled ? -1 : 0,
|
|
176
180
|
"data-test": "checkbox",
|
|
177
|
-
class:
|
|
178
|
-
onClick:
|
|
181
|
+
class: R(["group/check flex items-center transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", [t.variant === "row" ? "gap-3 pl-row-inset focus-visible:-outline-offset-2" : "gap-2.5 rounded-control px-2 py-1.5 focus-visible:outline-offset-1", a && t.variant === "row" ? "first:rounded-t-group last:rounded-b-group" : "", t.disabled ? "cursor-not-allowed" : t.variant === "row" ? "cursor-pointer hover:bg-fill/60 active:bg-fill" : "cursor-pointer hover:bg-fill"]]),
|
|
182
|
+
onClick: l,
|
|
179
183
|
onKeydown: [
|
|
180
|
-
|
|
181
|
-
|
|
184
|
+
Se(pe(l, ["prevent"]), ["space"]),
|
|
185
|
+
Se(pe(l, ["prevent"]), ["enter"])
|
|
182
186
|
]
|
|
183
187
|
}, [
|
|
184
188
|
p("span", {
|
|
185
|
-
class:
|
|
189
|
+
class: R(["flex shrink-0 items-center justify-center rounded-full border-2", [t.variant === "row" ? "size-5.5" : "size-5", e.value ? t.disabled ? "border-content-disabled bg-content-disabled text-white" : "border-control-on bg-control-on text-white" : "border-border-control"]]),
|
|
186
190
|
"aria-hidden": "true"
|
|
187
191
|
}, [
|
|
188
|
-
e.value ? (i(),
|
|
192
|
+
e.value ? (i(), q(s(H), {
|
|
189
193
|
key: 0,
|
|
190
194
|
name: "checkCustom",
|
|
191
195
|
size: 12
|
|
192
|
-
})) :
|
|
196
|
+
})) : D("", !0)
|
|
193
197
|
], 2),
|
|
194
198
|
p("div", {
|
|
195
|
-
class:
|
|
199
|
+
class: R(["flex min-w-0 flex-1 items-center gap-3", t.variant === "row" ? "min-h-row border-t border-border-separator py-2 pr-row-inset group-first/check:border-t-0" : ""])
|
|
196
200
|
}, [
|
|
197
|
-
p("div",
|
|
201
|
+
p("div", aa, [
|
|
198
202
|
p("p", {
|
|
199
|
-
class:
|
|
200
|
-
},
|
|
201
|
-
t.description ? (i(),
|
|
203
|
+
class: R(["w-full text-body", [t.variant === "row" ? "break-words" : "truncate", t.disabled ? "text-content-muted" : e.value ? "text-content-strong" : "text-content"]])
|
|
204
|
+
}, $(t.label), 3),
|
|
205
|
+
t.description ? (i(), g("p", {
|
|
202
206
|
key: 0,
|
|
203
|
-
class:
|
|
204
|
-
},
|
|
205
|
-
|
|
207
|
+
class: R(["tabular-nums text-content-muted", t.variant === "row" ? "text-footnote" : "text-xs"])
|
|
208
|
+
}, $(t.description), 3)) : D("", !0),
|
|
209
|
+
le(d.$slots, "default")
|
|
206
210
|
]),
|
|
207
|
-
d.$slots.trailing ? (i(),
|
|
208
|
-
|
|
209
|
-
])) :
|
|
211
|
+
d.$slots.trailing ? (i(), g("div", la, [
|
|
212
|
+
le(d.$slots, "trailing")
|
|
213
|
+
])) : D("", !0)
|
|
210
214
|
], 2)
|
|
211
|
-
], 42,
|
|
212
|
-
t.error ? (i(),
|
|
215
|
+
], 42, ta),
|
|
216
|
+
t.error ? (i(), g("p", {
|
|
213
217
|
key: 0,
|
|
214
|
-
id: `${
|
|
218
|
+
id: `${s(n)}-error`,
|
|
215
219
|
role: "alert",
|
|
216
220
|
class: "flex items-start gap-1.5 px-2 pt-1 text-footnote text-content-destructive"
|
|
217
221
|
}, [
|
|
218
|
-
|
|
222
|
+
M(s(H), {
|
|
219
223
|
name: "alertTriangle",
|
|
220
224
|
size: 14,
|
|
221
225
|
class: "mt-px shrink-0"
|
|
222
226
|
}),
|
|
223
|
-
|
|
224
|
-
], 8,
|
|
225
|
-
], 8,
|
|
227
|
+
Y(" " + $(t.error), 1)
|
|
228
|
+
], 8, oa)) : D("", !0)
|
|
229
|
+
], 8, ea));
|
|
226
230
|
}
|
|
227
|
-
}),
|
|
231
|
+
}), sa = {
|
|
228
232
|
key: 0,
|
|
229
233
|
class: "text-body text-content-muted"
|
|
230
|
-
},
|
|
234
|
+
}, na = ["id", "aria-label", "aria-describedby", "aria-invalid"], ra = ["aria-pressed", "disabled", "onClick"], mo = /* @__PURE__ */ G({
|
|
231
235
|
__name: "ChoiceChips",
|
|
232
|
-
props: /* @__PURE__ */
|
|
236
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
233
237
|
label: {},
|
|
234
238
|
hint: {},
|
|
235
239
|
error: {},
|
|
@@ -240,51 +244,51 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Zt = ["name
|
|
|
240
244
|
presentation: {},
|
|
241
245
|
name: {},
|
|
242
246
|
options: {}
|
|
243
|
-
}, { ...
|
|
247
|
+
}, { ...de }), {
|
|
244
248
|
modelValue: { default: () => [] },
|
|
245
249
|
modelModifiers: {}
|
|
246
250
|
}),
|
|
247
251
|
emits: ["update:modelValue"],
|
|
248
252
|
setup(o) {
|
|
249
|
-
const t = o, e =
|
|
250
|
-
return (n,
|
|
253
|
+
const t = o, e = oe(o, "modelValue"), a = (n) => e.value = e.value.includes(n) ? e.value.filter((l) => l !== n) : [...e.value, n];
|
|
254
|
+
return (n, l) => (i(), q(ge, J(s(ue)(t), {
|
|
251
255
|
value: t.options.filter((d) => e.value.includes(d.value)).map((d) => d.label).join(", ") || null,
|
|
252
256
|
"row-layout": "stacked"
|
|
253
257
|
}), {
|
|
254
|
-
default:
|
|
255
|
-
t.options.length === 0 ? (i(),
|
|
258
|
+
default: C(({ id: d, describedby: m, invalid: b }) => [
|
|
259
|
+
t.options.length === 0 ? (i(), g("span", sa, "—")) : (i(), g("div", {
|
|
256
260
|
key: 1,
|
|
257
261
|
id: d,
|
|
258
262
|
role: "group",
|
|
259
263
|
"aria-label": t.label,
|
|
260
|
-
"aria-describedby":
|
|
264
|
+
"aria-describedby": m,
|
|
261
265
|
"aria-invalid": b || void 0,
|
|
262
266
|
class: "flex flex-wrap gap-1.5 py-1",
|
|
263
267
|
"data-test": "choice-chips"
|
|
264
268
|
}, [
|
|
265
|
-
(i(!0),
|
|
266
|
-
key:
|
|
269
|
+
(i(!0), g(ne, null, xe(t.options, (h) => (i(), g("button", {
|
|
270
|
+
key: h.value,
|
|
267
271
|
type: "button",
|
|
268
|
-
"aria-pressed": e.value.includes(
|
|
269
|
-
disabled: t.disabled ||
|
|
270
|
-
class:
|
|
271
|
-
onClick: (
|
|
272
|
+
"aria-pressed": e.value.includes(h.value),
|
|
273
|
+
disabled: t.disabled || h.disabled,
|
|
274
|
+
class: R(["inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-full px-3 text-subheadline transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-60", e.value.includes(h.value) ? "bg-tint-soft font-semibold text-content-link" : "bg-fill font-medium text-content-strong hover:bg-fill-strong"]),
|
|
275
|
+
onClick: (k) => a(h.value)
|
|
272
276
|
}, [
|
|
273
|
-
e.value.includes(
|
|
277
|
+
e.value.includes(h.value) ? (i(), q(s(H), {
|
|
274
278
|
key: 0,
|
|
275
279
|
name: "checkCustom",
|
|
276
280
|
size: 12
|
|
277
|
-
})) :
|
|
278
|
-
|
|
279
|
-
], 10,
|
|
280
|
-
], 8,
|
|
281
|
+
})) : D("", !0),
|
|
282
|
+
Y(" " + $(h.label), 1)
|
|
283
|
+
], 10, ra))), 128))
|
|
284
|
+
], 8, na))
|
|
281
285
|
]),
|
|
282
286
|
_: 1
|
|
283
287
|
}, 16, ["value"]));
|
|
284
288
|
}
|
|
285
|
-
}),
|
|
289
|
+
}), ia = ["id", "value", "name", "placeholder", "disabled", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-required", "aria-invalid", "aria-describedby"], vo = /* @__PURE__ */ G({
|
|
286
290
|
__name: "ComboField",
|
|
287
|
-
props: /* @__PURE__ */
|
|
291
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
288
292
|
label: {},
|
|
289
293
|
hint: {},
|
|
290
294
|
error: {},
|
|
@@ -303,52 +307,52 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Zt = ["name
|
|
|
303
307
|
limit: {},
|
|
304
308
|
recents: {},
|
|
305
309
|
width: {}
|
|
306
|
-
}, { ...
|
|
310
|
+
}, { ...de, options: void 0, search: void 0, selected: null, placeholder: void 0, minLength: 1, debounce: 300, limit: 30, recents: void 0, width: "md" }), {
|
|
307
311
|
modelValue: { default: null },
|
|
308
312
|
modelModifiers: {}
|
|
309
313
|
}),
|
|
310
|
-
emits: /* @__PURE__ */
|
|
314
|
+
emits: /* @__PURE__ */ se(["picked"], ["update:modelValue"]),
|
|
311
315
|
setup(o, { expose: t, emit: e }) {
|
|
312
|
-
const a = o, n =
|
|
316
|
+
const a = o, n = oe(o, "modelValue"), l = e, { t: d } = Q(), m = !!tt(), b = Te("text", () => a.error ? "error" : a.disabled ? "locked" : "rest"), h = y(() => m ? vt(a.width) : "w-full"), k = P("input"), x = P("anchor"), r = De(null), u = De(""), v = bt({
|
|
313
317
|
source: () => a.search ?? a.options,
|
|
314
318
|
minLength: () => a.minLength,
|
|
315
319
|
debounce: () => a.debounce,
|
|
316
320
|
limit: () => a.limit,
|
|
317
321
|
listAllWhenEmpty: !0,
|
|
318
322
|
recents: () => a.recents
|
|
319
|
-
}), { items:
|
|
320
|
-
const
|
|
321
|
-
return
|
|
323
|
+
}), { items: F, open: B, status: _, highlighted: E, showingRecent: w } = v, O = y(() => {
|
|
324
|
+
const N = n.value;
|
|
325
|
+
return N === null ? null : [r.value, a.selected, ...a.options ?? []].find((W) => W?.value === N) ?? null;
|
|
322
326
|
});
|
|
323
|
-
|
|
324
|
-
B.value || (u.value =
|
|
327
|
+
re(O, (N) => {
|
|
328
|
+
B.value || (u.value = N?.label ?? "");
|
|
325
329
|
}, { immediate: !0 });
|
|
326
|
-
function
|
|
327
|
-
u.value =
|
|
330
|
+
function T(N) {
|
|
331
|
+
u.value = N.target.value, v.ask(u.value), u.value === "" && (n.value = null, r.value = null);
|
|
328
332
|
}
|
|
329
|
-
function
|
|
333
|
+
function A() {
|
|
330
334
|
a.disabled || v.show("");
|
|
331
335
|
}
|
|
332
|
-
function
|
|
333
|
-
v.close(), v.remember(
|
|
336
|
+
function Z(N) {
|
|
337
|
+
v.close(), v.remember(N), r.value = N, n.value = N.value, u.value = N.label, l("picked", N);
|
|
334
338
|
}
|
|
335
|
-
function
|
|
336
|
-
v.close(), u.value =
|
|
339
|
+
function ee() {
|
|
340
|
+
v.close(), u.value = O.value?.label ?? "";
|
|
337
341
|
}
|
|
338
|
-
const
|
|
339
|
-
return t({ focus: () =>
|
|
340
|
-
value:
|
|
342
|
+
const X = y(() => gt(B.value, F.value.length, _.value, !0));
|
|
343
|
+
return t({ focus: () => k.value?.focus() }), (N, W) => (i(), q(ge, J(s(ue)(a), {
|
|
344
|
+
value: O.value?.label ?? null
|
|
341
345
|
}), {
|
|
342
|
-
default:
|
|
346
|
+
default: C(({ id: U, describedby: K, invalid: te }) => [
|
|
343
347
|
p("div", {
|
|
344
348
|
ref_key: "anchor",
|
|
345
349
|
ref: x,
|
|
346
|
-
class:
|
|
350
|
+
class: R(["flex items-center gap-1.5", [s(b), h.value]])
|
|
347
351
|
}, [
|
|
348
352
|
p("input", {
|
|
349
|
-
id:
|
|
353
|
+
id: U,
|
|
350
354
|
ref_key: "input",
|
|
351
|
-
ref:
|
|
355
|
+
ref: k,
|
|
352
356
|
role: "combobox",
|
|
353
357
|
type: "text",
|
|
354
358
|
autocomplete: "off",
|
|
@@ -358,64 +362,51 @@ const Xt = ["id", "aria-label", "aria-describedby", "aria-invalid"], Zt = ["name
|
|
|
358
362
|
disabled: a.disabled,
|
|
359
363
|
required: a.required,
|
|
360
364
|
"aria-autocomplete": "list",
|
|
361
|
-
"aria-expanded":
|
|
362
|
-
"aria-controls": `${
|
|
363
|
-
"aria-activedescendant":
|
|
365
|
+
"aria-expanded": X.value,
|
|
366
|
+
"aria-controls": `${U}-list`,
|
|
367
|
+
"aria-activedescendant": X.value && s(F).length > 0 ? `${U}-option-${s(E)}` : void 0,
|
|
364
368
|
"aria-required": a.required || void 0,
|
|
365
|
-
"aria-invalid":
|
|
366
|
-
"aria-describedby":
|
|
367
|
-
class:
|
|
368
|
-
onInput:
|
|
369
|
-
onFocus:
|
|
370
|
-
onBlur:
|
|
371
|
-
onKeydown:
|
|
372
|
-
}, null, 42,
|
|
373
|
-
|
|
369
|
+
"aria-invalid": te || void 0,
|
|
370
|
+
"aria-describedby": K,
|
|
371
|
+
class: R(["block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed", m ? "compact:text-right" : ""]),
|
|
372
|
+
onInput: T,
|
|
373
|
+
onFocus: A,
|
|
374
|
+
onBlur: ee,
|
|
375
|
+
onKeydown: W[0] || (W[0] = (ae) => s(v).keydown(ae, { pick: Z, enterNeedsMove: !1 }))
|
|
376
|
+
}, null, 42, ia),
|
|
377
|
+
M(s(H), {
|
|
374
378
|
name: "search",
|
|
375
379
|
size: 14,
|
|
376
380
|
class: "shrink-0 text-content-muted"
|
|
377
381
|
})
|
|
378
382
|
], 2),
|
|
379
|
-
|
|
380
|
-
id:
|
|
383
|
+
M(pt, {
|
|
384
|
+
id: U,
|
|
381
385
|
anchor: x.value,
|
|
382
|
-
open:
|
|
383
|
-
items:
|
|
384
|
-
highlighted:
|
|
386
|
+
open: s(B),
|
|
387
|
+
items: s(F),
|
|
388
|
+
highlighted: s(E),
|
|
385
389
|
query: u.value,
|
|
386
|
-
status:
|
|
387
|
-
recent:
|
|
390
|
+
status: s(_),
|
|
391
|
+
recent: s(w),
|
|
388
392
|
"empty-message": !0,
|
|
389
|
-
hint:
|
|
390
|
-
onPick:
|
|
391
|
-
onHover:
|
|
393
|
+
hint: s(d)("core.form.suggestions.keys_pick"),
|
|
394
|
+
onPick: Z,
|
|
395
|
+
onHover: W[1] || (W[1] = (ae) => s(v).highlight(ae))
|
|
392
396
|
}, null, 8, ["id", "anchor", "open", "items", "highlighted", "query", "status", "recent", "hint"])
|
|
393
397
|
]),
|
|
394
398
|
_: 1
|
|
395
399
|
}, 16, ["value"]));
|
|
396
400
|
}
|
|
397
|
-
})
|
|
398
|
-
function it(o) {
|
|
399
|
-
const { t } = ee(), e = h(() => [t("core.form.time.words.now").toLowerCase(), "now"]);
|
|
400
|
-
return {
|
|
401
|
-
placeholder: h(() => t("core.form.time.placeholder")),
|
|
402
|
-
parse(a) {
|
|
403
|
-
if (e.value.includes(a.trim().toLowerCase())) return { value: Se(o()) };
|
|
404
|
-
const n = Ct(a, o());
|
|
405
|
-
return "time" in n ? { value: n.time } : { error: n.error === "step" ? t("core.form.time.step", { step: o() }) : t("core.form.time.invalid") };
|
|
406
|
-
},
|
|
407
|
-
shortcuts: (a) => (a ?? $t).map((n) => St(n, t("core.form.time.now"), Se(o())))
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
const ma = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], va = ["aria-label", "onClick"], pa = {
|
|
401
|
+
}), ua = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], da = ["aria-label", "onClick"], ca = {
|
|
411
402
|
class: "-m-3 flex",
|
|
412
403
|
"data-test": "date-time-popover"
|
|
413
|
-
},
|
|
404
|
+
}, fa = { class: "flex w-75 flex-col gap-2.5 border-r border-border-separator p-3.5" }, ma = {
|
|
414
405
|
key: 0,
|
|
415
406
|
class: "border-t border-border-separator pt-2.5"
|
|
416
|
-
},
|
|
407
|
+
}, va = { class: "flex w-48 flex-col gap-2.5 px-3 py-3.5" }, pa = ["for"], ba = ["id", "value", "placeholder", "aria-invalid"], ga = ["onClick"], po = /* @__PURE__ */ G({
|
|
417
408
|
__name: "DateTimeField",
|
|
418
|
-
props: /* @__PURE__ */
|
|
409
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
419
410
|
label: {},
|
|
420
411
|
hint: {},
|
|
421
412
|
error: {},
|
|
@@ -431,185 +422,185 @@ const ma = ["id", "name", "value", "placeholder", "disabled", "required", "aria-
|
|
|
431
422
|
openOn: {},
|
|
432
423
|
minuteStep: {},
|
|
433
424
|
quickPicks: {}
|
|
434
|
-
}, { ...
|
|
425
|
+
}, { ...de, min: void 0, max: void 0, disabledDates: void 0, openOn: void 0, minuteStep: 1, quickPicks: void 0 }), {
|
|
435
426
|
modelValue: { default: null },
|
|
436
427
|
modelModifiers: {}
|
|
437
428
|
}),
|
|
438
429
|
emits: ["update:modelValue"],
|
|
439
430
|
setup(o, { expose: t }) {
|
|
440
|
-
const e = o, a =
|
|
441
|
-
function E(
|
|
442
|
-
const { date:
|
|
443
|
-
if (!
|
|
444
|
-
let
|
|
445
|
-
if (
|
|
446
|
-
const L = B.parse(
|
|
431
|
+
const e = o, a = oe(o, "modelValue"), { t: n } = Q(), l = Bt(), d = Ee(), m = P("input"), b = P("popover"), h = P("calendar"), k = P("sheet"), x = y(() => ({ min: e.min?.slice(0, 10), max: e.max?.slice(0, 10), disabled: e.disabledDates })), r = y(() => e.min && e.min.length === 10 ? `${e.min}T00:00` : e.min), u = y(() => e.max && e.max.length === 10 ? `${e.max}T23:59` : e.max), v = (S, j) => !$t(j, { disabled: e.disabledDates }) && (!r.value || S >= r.value) && (!u.value || S <= u.value), F = Ct(() => x.value), B = zt(() => e.minuteStep), _ = y(() => ke(a.value));
|
|
432
|
+
function E(S) {
|
|
433
|
+
const { date: j, time: fe } = Lt(S), c = j === null ? _.value.day ?? Ce() : F.parse(j);
|
|
434
|
+
if (!c) return { error: F.invalidMessage() };
|
|
435
|
+
let V = _.value.time ?? Be(e.minuteStep);
|
|
436
|
+
if (fe !== null) {
|
|
437
|
+
const L = B.parse(fe);
|
|
447
438
|
if ("error" in L) return L;
|
|
448
|
-
|
|
439
|
+
V = L.value;
|
|
449
440
|
}
|
|
450
|
-
const
|
|
451
|
-
return v(
|
|
441
|
+
const f = we(c, V);
|
|
442
|
+
return v(f, c) ? { value: f } : { error: F.unavailableMessage() };
|
|
452
443
|
}
|
|
453
|
-
const
|
|
454
|
-
get: () =>
|
|
455
|
-
set: (
|
|
456
|
-
|
|
444
|
+
const w = Ae({ model: a, display: (S) => `${l.date(ke(S).day)} ${ke(S).time ?? ""}`.trim(), parse: E }), O = y({
|
|
445
|
+
get: () => _.value.time,
|
|
446
|
+
set: (S) => {
|
|
447
|
+
S && ht(S) && (a.value = we(_.value.day ?? Ce(), S));
|
|
457
448
|
}
|
|
458
|
-
}),
|
|
459
|
-
const
|
|
460
|
-
return
|
|
461
|
-
}),
|
|
462
|
-
function
|
|
463
|
-
|
|
449
|
+
}), T = Ae({ model: O, display: (S) => S, parse: B.parse }), A = Ft(() => e.quickPicks ?? (d.value ? void 0 : []), () => d.value, () => x.value), Z = y(() => e.error || w.message.value || T.message.value), ee = y(() => a.value ? l.dateTime(a.value) : null), X = Te("date", () => Z.value ? "error" : e.disabled ? "locked" : "rest"), N = y(() => {
|
|
450
|
+
const S = w.typed.value;
|
|
451
|
+
return S ? ke(S).day ?? null : null;
|
|
452
|
+
}), W = y(() => N.value ?? (yt(_.value.day) ? _.value.day : null)), U = y(() => w.typed.value ? ke(w.typed.value).time : _.value.time);
|
|
453
|
+
function K(S) {
|
|
454
|
+
S && w.set(we(S, _.value.time ?? Be(e.minuteStep)));
|
|
464
455
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
456
|
+
function te(S) {
|
|
457
|
+
S && w.set(we(_.value.day ?? Ce(), S));
|
|
467
458
|
}
|
|
468
|
-
function
|
|
469
|
-
|
|
459
|
+
function ae(S) {
|
|
460
|
+
w.set(we(Ce(), Be(e.minuteStep))), S();
|
|
470
461
|
}
|
|
471
|
-
const
|
|
472
|
-
async function
|
|
473
|
-
e.disabled || (b.value?.present(),
|
|
462
|
+
const he = Oe();
|
|
463
|
+
async function ce(S) {
|
|
464
|
+
e.disabled || (b.value?.present(), S && (await ye(), await ye(), h.value?.focus()));
|
|
474
465
|
}
|
|
475
|
-
function
|
|
476
|
-
|
|
466
|
+
function _e(S) {
|
|
467
|
+
S.key === "Enter" ? (w.commit(), b.value?.dismiss()) : S.key === "ArrowDown" && (S.preventDefault(), ce(!0));
|
|
477
468
|
}
|
|
478
|
-
return t({ focus: () =>
|
|
479
|
-
value:
|
|
469
|
+
return t({ focus: () => m.value?.focus() }), (S, j) => (i(), q(ge, J({ ...s(ue)(e), error: Z.value }, {
|
|
470
|
+
value: ee.value,
|
|
480
471
|
"value-style": "numeric"
|
|
481
472
|
}), {
|
|
482
|
-
default:
|
|
483
|
-
|
|
484
|
-
|
|
473
|
+
default: C(({ id: fe, describedby: c, invalid: V }) => [
|
|
474
|
+
s(d) ? (i(), g(ne, { key: 0 }, [
|
|
475
|
+
M(at, J({ id: fe, "aria-describedby": c }, {
|
|
485
476
|
disabled: e.disabled,
|
|
486
|
-
invalid:
|
|
487
|
-
placeholder:
|
|
488
|
-
onClick:
|
|
477
|
+
invalid: V,
|
|
478
|
+
placeholder: s(n)("core.form.select.choose"),
|
|
479
|
+
onClick: j[0] || (j[0] = (f) => k.value?.present())
|
|
489
480
|
}), {
|
|
490
|
-
default:
|
|
491
|
-
a.value ? (i(),
|
|
492
|
-
|
|
493
|
-
], 64)) :
|
|
481
|
+
default: C(() => [
|
|
482
|
+
a.value ? (i(), g(ne, { key: 0 }, [
|
|
483
|
+
Y($(s(w).text.value), 1)
|
|
484
|
+
], 64)) : D("", !0)
|
|
494
485
|
]),
|
|
495
486
|
_: 1
|
|
496
487
|
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
497
|
-
|
|
488
|
+
M(xt, {
|
|
498
489
|
ref_key: "sheet",
|
|
499
|
-
ref:
|
|
500
|
-
title: e.label ??
|
|
490
|
+
ref: k,
|
|
491
|
+
title: e.label ?? s(n)("core.form.date.calendar"),
|
|
501
492
|
mode: "datetime",
|
|
502
493
|
"model-value": a.value,
|
|
503
494
|
min: x.value.min,
|
|
504
495
|
max: x.value.max,
|
|
505
496
|
"disabled-dates": e.disabledDates,
|
|
506
497
|
"open-on": e.openOn,
|
|
507
|
-
shortcuts:
|
|
498
|
+
shortcuts: s(A),
|
|
508
499
|
step: e.minuteStep,
|
|
509
500
|
clearable: !e.required,
|
|
510
|
-
"onUpdate:modelValue":
|
|
501
|
+
"onUpdate:modelValue": s(w).set
|
|
511
502
|
}, null, 8, ["title", "model-value", "min", "max", "disabled-dates", "open-on", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
512
|
-
], 64)) : (i(),
|
|
503
|
+
], 64)) : (i(), q(Ie, {
|
|
513
504
|
key: 1,
|
|
514
505
|
ref_key: "popover",
|
|
515
506
|
ref: b,
|
|
516
|
-
label: e.label ??
|
|
507
|
+
label: e.label ?? s(n)("core.form.date.calendar"),
|
|
517
508
|
width: "auto",
|
|
518
509
|
placement: "bottom-start",
|
|
519
510
|
arrow: !1,
|
|
520
511
|
autofocus: !1
|
|
521
512
|
}, {
|
|
522
|
-
trigger:
|
|
513
|
+
trigger: C(({ attrs: f, presented: L }) => [
|
|
523
514
|
p("div", {
|
|
524
|
-
class:
|
|
515
|
+
class: R(["inline-flex max-w-full items-center gap-2", s(X)])
|
|
525
516
|
}, [
|
|
526
517
|
p("input", J({
|
|
527
|
-
id:
|
|
518
|
+
id: fe,
|
|
528
519
|
ref_key: "input",
|
|
529
|
-
ref:
|
|
530
|
-
},
|
|
520
|
+
ref: m
|
|
521
|
+
}, f, {
|
|
531
522
|
type: "text",
|
|
532
523
|
role: "combobox",
|
|
533
524
|
autocomplete: "off",
|
|
534
525
|
size: "20",
|
|
535
526
|
name: e.name,
|
|
536
|
-
value:
|
|
537
|
-
placeholder:
|
|
527
|
+
value: s(w).text.value,
|
|
528
|
+
placeholder: s(F).placeholder.value,
|
|
538
529
|
disabled: e.disabled,
|
|
539
530
|
required: e.required,
|
|
540
531
|
"aria-required": e.required || void 0,
|
|
541
|
-
"aria-invalid":
|
|
542
|
-
"aria-describedby":
|
|
532
|
+
"aria-invalid": V || void 0,
|
|
533
|
+
"aria-describedby": c,
|
|
543
534
|
class: "block min-h-7 min-w-0 border-0 bg-transparent py-1 pl-2.5 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
544
|
-
onInput:
|
|
545
|
-
onBlur:
|
|
546
|
-
onKeydown:
|
|
547
|
-
onClick:
|
|
548
|
-
}), null, 16,
|
|
549
|
-
e.disabled ?
|
|
535
|
+
onInput: j[1] || (j[1] = (z) => s(w).input(z.target.value)),
|
|
536
|
+
onBlur: j[2] || (j[2] = (z) => s(w).commit()),
|
|
537
|
+
onKeydown: _e,
|
|
538
|
+
onClick: j[3] || (j[3] = (z) => ce(!1))
|
|
539
|
+
}), null, 16, ua),
|
|
540
|
+
e.disabled ? D("", !0) : (i(), g("button", {
|
|
550
541
|
key: 0,
|
|
551
542
|
type: "button",
|
|
552
543
|
tabindex: "-1",
|
|
553
|
-
"aria-label":
|
|
544
|
+
"aria-label": s(n)("core.form.date.open"),
|
|
554
545
|
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
555
|
-
onClick: (
|
|
546
|
+
onClick: (z) => L ? b.value?.dismiss() : ce(!0)
|
|
556
547
|
}, [
|
|
557
|
-
|
|
548
|
+
M(s(H), {
|
|
558
549
|
name: "calendarLine",
|
|
559
550
|
size: 18
|
|
560
551
|
})
|
|
561
|
-
], 8,
|
|
552
|
+
], 8, da))
|
|
562
553
|
], 2)
|
|
563
554
|
]),
|
|
564
|
-
default:
|
|
565
|
-
p("div",
|
|
566
|
-
p("div",
|
|
567
|
-
|
|
555
|
+
default: C(({ dismiss: f }) => [
|
|
556
|
+
p("div", ca, [
|
|
557
|
+
p("div", fa, [
|
|
558
|
+
M(_t, {
|
|
568
559
|
ref_key: "calendar",
|
|
569
|
-
ref:
|
|
570
|
-
"model-value":
|
|
560
|
+
ref: h,
|
|
561
|
+
"model-value": W.value,
|
|
571
562
|
min: x.value.min,
|
|
572
563
|
max: x.value.max,
|
|
573
564
|
"disabled-dates": e.disabledDates,
|
|
574
565
|
"open-on": e.openOn,
|
|
575
|
-
"onUpdate:modelValue":
|
|
566
|
+
"onUpdate:modelValue": K
|
|
576
567
|
}, null, 8, ["model-value", "min", "max", "disabled-dates", "open-on"]),
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
items:
|
|
580
|
-
selected:
|
|
581
|
-
onPick:
|
|
568
|
+
s(A).length > 0 ? (i(), g("div", ma, [
|
|
569
|
+
M(kt, {
|
|
570
|
+
items: s(A),
|
|
571
|
+
selected: W.value,
|
|
572
|
+
onPick: K
|
|
582
573
|
}, null, 8, ["items", "selected"])
|
|
583
|
-
])) :
|
|
574
|
+
])) : D("", !0)
|
|
584
575
|
]),
|
|
585
|
-
p("div",
|
|
576
|
+
p("div", va, [
|
|
586
577
|
p("label", {
|
|
587
|
-
for:
|
|
578
|
+
for: s(he),
|
|
588
579
|
class: "text-footnote font-semibold text-content-muted"
|
|
589
|
-
},
|
|
580
|
+
}, $(s(n)("core.form.time.label")), 9, pa),
|
|
590
581
|
p("input", {
|
|
591
|
-
id:
|
|
582
|
+
id: s(he),
|
|
592
583
|
type: "text",
|
|
593
584
|
autocomplete: "off",
|
|
594
585
|
inputmode: "numeric",
|
|
595
|
-
value:
|
|
596
|
-
placeholder:
|
|
597
|
-
"aria-invalid":
|
|
586
|
+
value: s(T).text.value,
|
|
587
|
+
placeholder: s(B).placeholder.value,
|
|
588
|
+
"aria-invalid": s(T).message.value ? !0 : void 0,
|
|
598
589
|
class: "rounded-control bg-fill p-1.5 text-center text-[20px] font-semibold tabular-nums text-content-strong placeholder:text-base placeholder:font-normal placeholder:text-content-disabled focus:outline-2 focus:outline-border-focus",
|
|
599
|
-
onInput:
|
|
600
|
-
onBlur:
|
|
601
|
-
onKeydown:
|
|
602
|
-
}, null, 40,
|
|
603
|
-
|
|
604
|
-
"model-value":
|
|
590
|
+
onInput: j[4] || (j[4] = (L) => s(T).input(L.target.value)),
|
|
591
|
+
onBlur: j[5] || (j[5] = (L) => s(T).commit()),
|
|
592
|
+
onKeydown: j[6] || (j[6] = Se(pe((L) => s(T).commit(), ["prevent"]), ["enter"]))
|
|
593
|
+
}, null, 40, ba),
|
|
594
|
+
M(wt, {
|
|
595
|
+
"model-value": U.value,
|
|
605
596
|
step: e.minuteStep,
|
|
606
|
-
"onUpdate:modelValue":
|
|
597
|
+
"onUpdate:modelValue": te
|
|
607
598
|
}, null, 8, ["model-value", "step"]),
|
|
608
599
|
p("button", {
|
|
609
600
|
type: "button",
|
|
610
601
|
class: "cursor-pointer self-start rounded-full bg-tint-soft px-2.5 py-1.5 text-footnote font-medium text-content-link focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
611
|
-
onClick: (L) =>
|
|
612
|
-
},
|
|
602
|
+
onClick: (L) => ae(f)
|
|
603
|
+
}, $(s(n)("core.form.time.now")), 9, ga)
|
|
613
604
|
])
|
|
614
605
|
])
|
|
615
606
|
]),
|
|
@@ -620,27 +611,27 @@ const ma = ["id", "name", "value", "placeholder", "disabled", "required", "aria-
|
|
|
620
611
|
}, 16, ["value"]));
|
|
621
612
|
}
|
|
622
613
|
});
|
|
623
|
-
function
|
|
614
|
+
function lt(o, t = {}) {
|
|
624
615
|
const e = t.accept ?? [];
|
|
625
616
|
if (e.length > 0) {
|
|
626
|
-
const a = o.name.lastIndexOf("."), n = a === -1 ? "" : o.name.slice(a).toLowerCase(),
|
|
627
|
-
if (!e.some((
|
|
628
|
-
const b =
|
|
629
|
-
return b.startsWith(".") ? b === n : b.endsWith("/*") ?
|
|
617
|
+
const a = o.name.lastIndexOf("."), n = a === -1 ? "" : o.name.slice(a).toLowerCase(), l = o.type.toLowerCase();
|
|
618
|
+
if (!e.some((m) => {
|
|
619
|
+
const b = m.trim().toLowerCase();
|
|
620
|
+
return b.startsWith(".") ? b === n : b.endsWith("/*") ? l.startsWith(b.slice(0, -1)) : b === l;
|
|
630
621
|
})) return "invalid_type";
|
|
631
622
|
}
|
|
632
623
|
return (t.maxSize ?? 0) > 0 && o.size > (t.maxSize ?? 0) ? "too_large" : null;
|
|
633
624
|
}
|
|
634
|
-
function
|
|
625
|
+
function Fe(o) {
|
|
635
626
|
return o < 1024 ? `${o} B` : o < 1024 * 1024 ? `${Math.round(o / 1024)} KB` : `${(o / (1024 * 1024)).toFixed(o % (1024 * 1024) === 0 ? 0 : 1)} MB`;
|
|
636
627
|
}
|
|
637
|
-
const
|
|
628
|
+
const ha = { class: "w-full" }, ya = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], xa = {
|
|
638
629
|
key: 0,
|
|
639
630
|
class: "flex items-center gap-3 rounded-group bg-fill p-3",
|
|
640
631
|
"data-test": "file-selected"
|
|
641
|
-
},
|
|
632
|
+
}, _a = { class: "min-w-0 flex-1" }, ka = { class: "truncate text-body font-medium text-content-strong" }, wa = { class: "text-footnote text-content-muted" }, $a = ["disabled", "aria-label", "title"], Sa = ["aria-disabled"], Ca = { class: "font-semibold text-content-link" }, Fa = { class: "text-content-muted" }, bo = /* @__PURE__ */ G({
|
|
642
633
|
__name: "FileField",
|
|
643
|
-
props: /* @__PURE__ */
|
|
634
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
644
635
|
label: {},
|
|
645
636
|
hint: {},
|
|
646
637
|
error: {},
|
|
@@ -653,91 +644,91 @@ const _a = { class: "w-full" }, wa = ["id", "accept", "disabled", "aria-describe
|
|
|
653
644
|
variant: {},
|
|
654
645
|
accept: {},
|
|
655
646
|
maxSize: {}
|
|
656
|
-
}, { ...
|
|
647
|
+
}, { ...de, variant: "button", accept: () => [], maxSize: 0 }), {
|
|
657
648
|
modelValue: { default: null },
|
|
658
649
|
modelModifiers: {}
|
|
659
650
|
}),
|
|
660
651
|
emits: ["update:modelValue"],
|
|
661
652
|
setup(o, { expose: t }) {
|
|
662
|
-
const e = o, a =
|
|
653
|
+
const e = o, a = oe(o, "modelValue"), { t: n } = Q(), l = P("chooser"), d = I(!1), m = I(null), b = y(() => {
|
|
663
654
|
if (e.hint) return e.hint;
|
|
664
655
|
const x = [];
|
|
665
|
-
return e.accept.length && x.push(n("core.form.file.allowed", { formats: e.accept.map((r) => r.replace(/^\./, "").toUpperCase()).join(", ") })), e.maxSize > 0 && x.push(n("core.form.file.max_size", { size:
|
|
656
|
+
return e.accept.length && x.push(n("core.form.file.allowed", { formats: e.accept.map((r) => r.replace(/^\./, "").toUpperCase()).join(", ") })), e.maxSize > 0 && x.push(n("core.form.file.max_size", { size: Fe(e.maxSize) })), x.join(" · ") || void 0;
|
|
666
657
|
});
|
|
667
|
-
function
|
|
658
|
+
function h(x) {
|
|
668
659
|
if (!x) return;
|
|
669
|
-
const r =
|
|
670
|
-
r ? (
|
|
660
|
+
const r = lt(x, { accept: e.accept, maxSize: e.maxSize });
|
|
661
|
+
r ? (m.value = r === "invalid_type" ? n("core.form.file.invalid_type") : n("core.form.file.too_large", { size: Fe(e.maxSize) }), a.value = null) : (m.value = null, a.value = x);
|
|
671
662
|
}
|
|
672
|
-
function
|
|
673
|
-
a.value = null,
|
|
663
|
+
function k() {
|
|
664
|
+
a.value = null, m.value = null;
|
|
674
665
|
}
|
|
675
|
-
return
|
|
676
|
-
!x &&
|
|
677
|
-
}), t({ clear:
|
|
666
|
+
return re(a, (x) => {
|
|
667
|
+
!x && l.value && (l.value.value = "");
|
|
668
|
+
}), t({ clear: k }), (x, r) => (i(), q(ge, J({ ...s(ue)(e), hint: b.value, error: m.value ?? e.error }, {
|
|
678
669
|
value: a.value?.name ?? null,
|
|
679
670
|
"row-layout": "stacked"
|
|
680
671
|
}), {
|
|
681
|
-
default:
|
|
682
|
-
p("div",
|
|
672
|
+
default: C(({ id: u, describedby: v, invalid: F }) => [
|
|
673
|
+
p("div", ha, [
|
|
683
674
|
p("input", {
|
|
684
675
|
id: u,
|
|
685
676
|
ref_key: "chooser",
|
|
686
|
-
ref:
|
|
677
|
+
ref: l,
|
|
687
678
|
type: "file",
|
|
688
679
|
class: "sr-only",
|
|
689
680
|
tabindex: "-1",
|
|
690
681
|
accept: e.accept.join(",") || void 0,
|
|
691
682
|
disabled: e.disabled,
|
|
692
683
|
"aria-describedby": v,
|
|
693
|
-
"aria-invalid":
|
|
694
|
-
onChange: r[0] || (r[0] = (B) =>
|
|
695
|
-
}, null, 40,
|
|
696
|
-
a.value ? (i(),
|
|
697
|
-
p("div",
|
|
698
|
-
p("p",
|
|
699
|
-
p("p",
|
|
684
|
+
"aria-invalid": F || void 0,
|
|
685
|
+
onChange: r[0] || (r[0] = (B) => h(B.target.files?.[0]))
|
|
686
|
+
}, null, 40, ya),
|
|
687
|
+
a.value ? (i(), g("div", xa, [
|
|
688
|
+
p("div", _a, [
|
|
689
|
+
p("p", ka, $(a.value.name), 1),
|
|
690
|
+
p("p", wa, $(s(Fe)(a.value.size)), 1)
|
|
700
691
|
]),
|
|
701
692
|
p("button", {
|
|
702
693
|
type: "button",
|
|
703
694
|
disabled: e.disabled,
|
|
704
|
-
"aria-label":
|
|
705
|
-
title:
|
|
695
|
+
"aria-label": s(n)("core.form.file.remove"),
|
|
696
|
+
title: s(n)("core.form.file.remove"),
|
|
706
697
|
class: "flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full text-content-muted hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-not-allowed",
|
|
707
|
-
onClick:
|
|
698
|
+
onClick: k
|
|
708
699
|
}, [
|
|
709
|
-
|
|
700
|
+
M(s(H), {
|
|
710
701
|
name: "close",
|
|
711
702
|
size: 14
|
|
712
703
|
})
|
|
713
|
-
], 8,
|
|
714
|
-
])) : e.variant === "dropzone" ? (i(),
|
|
704
|
+
], 8, $a)
|
|
705
|
+
])) : e.variant === "dropzone" ? (i(), g("div", {
|
|
715
706
|
key: 1,
|
|
716
707
|
role: "button",
|
|
717
708
|
tabindex: "0",
|
|
718
709
|
"data-test": "file-dropzone",
|
|
719
710
|
"aria-disabled": e.disabled || void 0,
|
|
720
|
-
class:
|
|
721
|
-
onClick: r[1] || (r[1] = (B) => !e.disabled &&
|
|
711
|
+
class: R(["cursor-pointer rounded-group border-2 border-dashed p-6 text-center text-body transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", d.value ? "border-border-focus bg-tint-soft" : "border-border-control hover:bg-fill"]),
|
|
712
|
+
onClick: r[1] || (r[1] = (B) => !e.disabled && l.value?.click()),
|
|
722
713
|
onKeydown: [
|
|
723
|
-
r[2] || (r[2] =
|
|
724
|
-
r[3] || (r[3] =
|
|
714
|
+
r[2] || (r[2] = Se(pe((B) => !e.disabled && l.value?.click(), ["prevent"]), ["enter"])),
|
|
715
|
+
r[3] || (r[3] = Se(pe((B) => !e.disabled && l.value?.click(), ["prevent"]), ["space"]))
|
|
725
716
|
],
|
|
726
|
-
onDragover: r[4] || (r[4] =
|
|
727
|
-
onDragleave: r[5] || (r[5] =
|
|
728
|
-
onDrop: r[6] || (r[6] =
|
|
729
|
-
d.value = !1, e.disabled ||
|
|
717
|
+
onDragover: r[4] || (r[4] = pe((B) => d.value = !0, ["prevent"])),
|
|
718
|
+
onDragleave: r[5] || (r[5] = pe((B) => d.value = !1, ["prevent"])),
|
|
719
|
+
onDrop: r[6] || (r[6] = pe((B) => {
|
|
720
|
+
d.value = !1, e.disabled || h(B.dataTransfer?.files?.[0]);
|
|
730
721
|
}, ["prevent"]))
|
|
731
722
|
}, [
|
|
732
|
-
p("span",
|
|
733
|
-
p("span",
|
|
734
|
-
], 42,
|
|
723
|
+
p("span", Ca, $(s(n)("core.form.file.choose")), 1),
|
|
724
|
+
p("span", Fa, $(s(n)("core.form.file.drop")), 1)
|
|
725
|
+
], 42, Sa)) : (i(), q(be, {
|
|
735
726
|
key: 2,
|
|
736
727
|
disabled: e.disabled,
|
|
737
|
-
onClick: r[7] || (r[7] = (B) =>
|
|
728
|
+
onClick: r[7] || (r[7] = (B) => l.value?.click())
|
|
738
729
|
}, {
|
|
739
|
-
default:
|
|
740
|
-
|
|
730
|
+
default: C(() => [
|
|
731
|
+
Y($(s(n)("core.form.file.choose")), 1)
|
|
741
732
|
]),
|
|
742
733
|
_: 1
|
|
743
734
|
}, 8, ["disabled"]))
|
|
@@ -746,7 +737,7 @@ const _a = { class: "w-full" }, wa = ["id", "accept", "disabled", "aria-describe
|
|
|
746
737
|
_: 1
|
|
747
738
|
}, 16, ["value"]));
|
|
748
739
|
}
|
|
749
|
-
}),
|
|
740
|
+
}), La = ["disabled"], go = /* @__PURE__ */ G({
|
|
750
741
|
__name: "FormGroupButton",
|
|
751
742
|
props: {
|
|
752
743
|
label: {},
|
|
@@ -756,16 +747,16 @@ const _a = { class: "w-full" }, wa = ["id", "accept", "disabled", "aria-describe
|
|
|
756
747
|
emits: ["click"],
|
|
757
748
|
setup(o, { emit: t }) {
|
|
758
749
|
const e = o, a = t;
|
|
759
|
-
return (n,
|
|
760
|
-
default:
|
|
761
|
-
|
|
762
|
-
default:
|
|
750
|
+
return (n, l) => (i(), q(Dt, null, {
|
|
751
|
+
default: C(() => [
|
|
752
|
+
M(dt, { layout: "stacked" }, {
|
|
753
|
+
default: C(() => [
|
|
763
754
|
p("button", {
|
|
764
755
|
type: "button",
|
|
765
756
|
disabled: e.disabled,
|
|
766
|
-
class:
|
|
767
|
-
onClick:
|
|
768
|
-
},
|
|
757
|
+
class: R(["w-full py-1 text-center text-body focus-visible:outline-2 focus-visible:outline-border-focus disabled:text-content-disabled", e.tone === "critical" ? "text-content-destructive" : "text-content-link"]),
|
|
758
|
+
onClick: l[0] || (l[0] = (d) => a("click"))
|
|
759
|
+
}, $(e.label), 11, La)
|
|
769
760
|
]),
|
|
770
761
|
_: 1
|
|
771
762
|
})
|
|
@@ -773,31 +764,31 @@ const _a = { class: "w-full" }, wa = ["id", "accept", "disabled", "aria-describe
|
|
|
773
764
|
_: 1
|
|
774
765
|
}));
|
|
775
766
|
}
|
|
776
|
-
}),
|
|
767
|
+
}), ho = /* @__PURE__ */ G({
|
|
777
768
|
__name: "FormIndent",
|
|
778
769
|
setup(o) {
|
|
779
|
-
return
|
|
770
|
+
return Ve(ct, ft() + 1), (t, e) => le(t.$slots, "default");
|
|
780
771
|
}
|
|
781
772
|
});
|
|
782
|
-
function
|
|
773
|
+
function Ba(o, t) {
|
|
783
774
|
return t.filter((e) => (o?.[e] ?? "").trim() === "");
|
|
784
775
|
}
|
|
785
|
-
const
|
|
776
|
+
const za = ["id", "aria-labelledby"], Da = ["id", "value", "lang", "name", "rows", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], Va = ["id", "value", "lang", "name", "placeholder", "maxlength", "disabled", "aria-required", "aria-invalid", "aria-describedby"], qa = {
|
|
786
777
|
key: 0,
|
|
787
778
|
class: "mt-1.5 flex items-center gap-2"
|
|
788
|
-
},
|
|
779
|
+
}, Ma = {
|
|
789
780
|
key: 0,
|
|
790
781
|
class: "flex-1 text-footnote text-status-warning-content",
|
|
791
782
|
"data-test": "i18n-missing"
|
|
792
|
-
},
|
|
783
|
+
}, Oa = {
|
|
793
784
|
key: 1,
|
|
794
785
|
class: "flex-1"
|
|
795
|
-
},
|
|
786
|
+
}, ja = ["aria-label"], Ra = ["id", "aria-selected", "tabindex", "aria-controls", "aria-label", "title", "onClick", "onKeydown"], Ta = ["data-state"], Ea = { class: "w-full" }, Ia = { class: "whitespace-pre-line break-words text-body text-content-strong" }, Ga = ["aria-expanded"], Na = { class: "flex-1" }, Ka = {
|
|
796
787
|
key: 0,
|
|
797
788
|
class: "mt-1 flex flex-col gap-1.5"
|
|
798
|
-
},
|
|
789
|
+
}, Pa = ["title"], yo = /* @__PURE__ */ G({
|
|
799
790
|
__name: "I18nField",
|
|
800
|
-
props: /* @__PURE__ */
|
|
791
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
801
792
|
label: {},
|
|
802
793
|
hint: {},
|
|
803
794
|
error: {},
|
|
@@ -814,191 +805,191 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
814
805
|
rows: {},
|
|
815
806
|
placeholder: {},
|
|
816
807
|
maxLength: {}
|
|
817
|
-
}, { ...
|
|
808
|
+
}, { ...de, locales: void 0, defaultLocale: void 0, requiredLocales: () => [], multiline: !1, rows: 3, placeholder: void 0, maxLength: void 0 }), {
|
|
818
809
|
modelValue: { default: () => ({}) },
|
|
819
810
|
modelModifiers: {}
|
|
820
811
|
}),
|
|
821
812
|
emits: ["update:modelValue"],
|
|
822
813
|
setup(o, { expose: t }) {
|
|
823
|
-
const e = o, a =
|
|
824
|
-
function
|
|
814
|
+
const e = o, a = oe(o, "modelValue"), { t: n, locale: l, availableLocales: d } = Q(), m = Qe(qt, null), b = Oe(), h = P("field"), k = P("root"), { editable: x } = et(e), r = Te(e.multiline ? "area" : "text", () => e.error || te.value ? "error" : e.disabled ? "locked" : "rest"), u = y(() => e.locales ?? m?.locales ?? d), v = y(() => e.defaultLocale ?? u.value[0] ?? ""), F = y(() => u.value.includes(v.value) ? [v.value, ...u.value.filter((f) => f !== v.value)] : u.value), B = I(null), _ = y(() => B.value !== null && F.value.includes(B.value) ? B.value : F.value.includes(l.value) ? l.value : v.value), E = (f) => a.value[f] ?? "", w = (f) => E(f).trim() !== "", O = (f) => f.toUpperCase();
|
|
815
|
+
function T(f) {
|
|
825
816
|
try {
|
|
826
|
-
return new Intl.DisplayNames([
|
|
817
|
+
return new Intl.DisplayNames([l.value], { type: "language" }).of(f) ?? O(f);
|
|
827
818
|
} catch {
|
|
828
|
-
return
|
|
819
|
+
return O(f);
|
|
829
820
|
}
|
|
830
821
|
}
|
|
831
|
-
const
|
|
832
|
-
function
|
|
833
|
-
a.value = { ...a.value, [
|
|
822
|
+
const A = (f) => f.map(T).join(", ");
|
|
823
|
+
function Z(f, L) {
|
|
824
|
+
a.value = { ...a.value, [f]: L };
|
|
834
825
|
}
|
|
835
|
-
const
|
|
836
|
-
function
|
|
837
|
-
B.value =
|
|
826
|
+
const ee = (f) => `${b}-tab-${f}`;
|
|
827
|
+
function X(f, L) {
|
|
828
|
+
B.value = f, L && ye(() => h.value?.focus());
|
|
838
829
|
}
|
|
839
|
-
function
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
|
|
830
|
+
function N(f, L) {
|
|
831
|
+
const z = F.value.length - 1, me = { ArrowRight: L + 1, ArrowLeft: L - 1, Home: 0, End: z }[f.key];
|
|
832
|
+
if (me === void 0) return;
|
|
833
|
+
f.preventDefault();
|
|
834
|
+
const ve = F.value[(me + F.value.length) % F.value.length];
|
|
835
|
+
ve !== void 0 && (X(ve, !1), ye(() => document.getElementById(ee(ve))?.focus()));
|
|
845
836
|
}
|
|
846
|
-
const
|
|
847
|
-
function
|
|
848
|
-
|
|
837
|
+
const W = I(!1);
|
|
838
|
+
function U(f) {
|
|
839
|
+
k.value?.contains(f.relatedTarget) || (W.value = !0);
|
|
849
840
|
}
|
|
850
|
-
const
|
|
851
|
-
function
|
|
852
|
-
const
|
|
853
|
-
a.value = { ...a.value, ...Object.fromEntries(
|
|
841
|
+
const K = y(() => Ba(a.value, e.requiredLocales)), te = y(() => W.value && K.value.length > 0 ? n("core.form.i18n.required", { languages: A(K.value) }) : void 0), ae = y(() => e.requiredLocales.length > 0 ? K.value.length === 0 : F.value.some(w)), he = y(() => F.value.filter((f) => !w(f) && !(te.value && K.value.includes(f)))), ce = y(() => w(v.value) && F.value.some((f) => f !== v.value && !w(f)));
|
|
842
|
+
function _e() {
|
|
843
|
+
const f = E(v.value);
|
|
844
|
+
a.value = { ...a.value, ...Object.fromEntries(F.value.filter((L) => !w(L)).map((L) => [L, f])) };
|
|
854
845
|
}
|
|
855
|
-
const
|
|
856
|
-
return t({ focus: () =>
|
|
857
|
-
value:
|
|
846
|
+
const S = y(() => [l.value, v.value, ...F.value].find((f) => F.value.includes(f) && w(f))), j = y(() => F.value.filter((f) => f !== S.value)), fe = y(() => j.value.filter(w).length), c = I(!1), V = y(() => e.label && !x.value && S.value ? `${e.label} · ${O(S.value)}` : e.label);
|
|
847
|
+
return t({ focus: () => h.value?.focus() }), (f, L) => (i(), q(ge, J({ ...s(ue)(e), label: V.value, error: e.error ?? te.value, required: e.required || e.requiredLocales.length > 0 }, {
|
|
848
|
+
value: s(x) ? ae.value ? "written" : null : S.value ? E(S.value) : null,
|
|
858
849
|
"row-layout": "stacked"
|
|
859
|
-
}),
|
|
860
|
-
default:
|
|
850
|
+
}), Ze({
|
|
851
|
+
default: C(({ id: z, describedby: me, invalid: ve }) => [
|
|
861
852
|
p("div", {
|
|
862
853
|
ref_key: "root",
|
|
863
|
-
ref:
|
|
854
|
+
ref: k,
|
|
864
855
|
class: "w-full",
|
|
865
|
-
onFocusout:
|
|
856
|
+
onFocusout: U
|
|
866
857
|
}, [
|
|
867
858
|
p("div", {
|
|
868
|
-
id: `${
|
|
859
|
+
id: `${s(b)}-panel`,
|
|
869
860
|
role: "tabpanel",
|
|
870
|
-
"aria-labelledby":
|
|
861
|
+
"aria-labelledby": ee(_.value)
|
|
871
862
|
}, [
|
|
872
863
|
p("div", {
|
|
873
|
-
class:
|
|
864
|
+
class: R(["w-full", s(r)])
|
|
874
865
|
}, [
|
|
875
|
-
e.multiline ? (i(),
|
|
866
|
+
e.multiline ? (i(), g("textarea", {
|
|
876
867
|
key: 0,
|
|
877
|
-
id:
|
|
868
|
+
id: z,
|
|
878
869
|
ref_key: "field",
|
|
879
|
-
ref:
|
|
880
|
-
value: E(
|
|
881
|
-
lang:
|
|
870
|
+
ref: h,
|
|
871
|
+
value: E(_.value),
|
|
872
|
+
lang: _.value,
|
|
882
873
|
name: e.name,
|
|
883
874
|
rows: e.rows,
|
|
884
875
|
placeholder: e.placeholder,
|
|
885
876
|
maxlength: e.maxLength,
|
|
886
877
|
disabled: e.disabled,
|
|
887
878
|
"aria-required": e.required || void 0,
|
|
888
|
-
"aria-invalid":
|
|
889
|
-
"aria-describedby":
|
|
879
|
+
"aria-invalid": ve || void 0,
|
|
880
|
+
"aria-describedby": me,
|
|
890
881
|
"data-test": "i18n-input",
|
|
891
882
|
class: "block w-full resize-y border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
892
|
-
onInput: L[0] || (L[0] = (
|
|
893
|
-
}, null, 40,
|
|
883
|
+
onInput: L[0] || (L[0] = (Le) => Z(_.value, Le.target.value))
|
|
884
|
+
}, null, 40, Da)) : (i(), g("input", {
|
|
894
885
|
key: 1,
|
|
895
|
-
id:
|
|
886
|
+
id: z,
|
|
896
887
|
ref_key: "field",
|
|
897
|
-
ref:
|
|
898
|
-
value: E(
|
|
899
|
-
lang:
|
|
888
|
+
ref: h,
|
|
889
|
+
value: E(_.value),
|
|
890
|
+
lang: _.value,
|
|
900
891
|
type: "text",
|
|
901
892
|
name: e.name,
|
|
902
893
|
placeholder: e.placeholder,
|
|
903
894
|
maxlength: e.maxLength,
|
|
904
895
|
disabled: e.disabled,
|
|
905
896
|
"aria-required": e.required || void 0,
|
|
906
|
-
"aria-invalid":
|
|
907
|
-
"aria-describedby":
|
|
897
|
+
"aria-invalid": ve || void 0,
|
|
898
|
+
"aria-describedby": me,
|
|
908
899
|
"data-test": "i18n-input",
|
|
909
900
|
class: "block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
910
|
-
onInput: L[1] || (L[1] = (
|
|
911
|
-
}, null, 40,
|
|
901
|
+
onInput: L[1] || (L[1] = (Le) => Z(_.value, Le.target.value))
|
|
902
|
+
}, null, 40, Va))
|
|
912
903
|
], 2)
|
|
913
|
-
], 8,
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
904
|
+
], 8, za),
|
|
905
|
+
he.value.length > 0 || ce.value ? (i(), g("div", qa, [
|
|
906
|
+
he.value.length > 0 ? (i(), g("p", Ma, $(s(n)("core.form.i18n.missing", { languages: A(he.value) })), 1)) : (i(), g("span", Oa)),
|
|
907
|
+
ce.value && !e.disabled ? (i(), g("button", {
|
|
917
908
|
key: 2,
|
|
918
909
|
type: "button",
|
|
919
910
|
"data-test": "i18n-copy",
|
|
920
911
|
class: "shrink-0 cursor-pointer rounded-control bg-tint-soft px-2.5 py-1.5 text-footnote font-medium text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
921
|
-
onClick:
|
|
922
|
-
},
|
|
923
|
-
])) :
|
|
912
|
+
onClick: _e
|
|
913
|
+
}, $(s(n)("core.form.i18n.copy", { language: O(v.value) })), 1)) : D("", !0)
|
|
914
|
+
])) : D("", !0)
|
|
924
915
|
], 544)
|
|
925
916
|
]),
|
|
926
|
-
labelTrailing:
|
|
917
|
+
labelTrailing: C(() => [
|
|
927
918
|
p("div", {
|
|
928
919
|
role: "tablist",
|
|
929
|
-
"aria-label":
|
|
920
|
+
"aria-label": s(n)("core.form.i18n.languages"),
|
|
930
921
|
class: "flex shrink-0 gap-0.5 rounded-control bg-fill p-0.5",
|
|
931
922
|
"data-test": "i18n-tabs"
|
|
932
923
|
}, [
|
|
933
|
-
(i(!0),
|
|
934
|
-
id:
|
|
935
|
-
key:
|
|
924
|
+
(i(!0), g(ne, null, xe(F.value, (z, me) => (i(), g("button", {
|
|
925
|
+
id: ee(z),
|
|
926
|
+
key: z,
|
|
936
927
|
type: "button",
|
|
937
928
|
role: "tab",
|
|
938
|
-
"aria-selected":
|
|
939
|
-
tabindex:
|
|
940
|
-
"aria-controls": `${
|
|
941
|
-
"aria-label":
|
|
942
|
-
title:
|
|
943
|
-
class:
|
|
944
|
-
onClick: (
|
|
945
|
-
onKeydown: (
|
|
929
|
+
"aria-selected": z === _.value,
|
|
930
|
+
tabindex: z === _.value ? 0 : -1,
|
|
931
|
+
"aria-controls": `${s(b)}-panel`,
|
|
932
|
+
"aria-label": s(n)(w(z) ? "core.form.i18n.tab_written" : "core.form.i18n.tab_empty", { language: T(z) }),
|
|
933
|
+
title: T(z),
|
|
934
|
+
class: R(["flex min-h-7 cursor-pointer items-center gap-1.5 rounded-control px-2.5 py-1 text-footnote font-semibold transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", z === _.value ? "bg-segment-selected text-content-strong shadow-sm" : "text-content-muted hover:text-content-strong"]),
|
|
935
|
+
onClick: (ve) => X(z, !0),
|
|
936
|
+
onKeydown: (ve) => N(ve, me)
|
|
946
937
|
}, [
|
|
947
|
-
|
|
938
|
+
Y($(O(z)) + " ", 1),
|
|
948
939
|
p("span", {
|
|
949
940
|
"aria-hidden": "true",
|
|
950
|
-
class:
|
|
941
|
+
class: R(["size-1.5 rounded-full", w(z) ? "bg-status-success-solid" : te.value && K.value.includes(z) ? "bg-content-destructive" : "bg-content-disabled"]),
|
|
951
942
|
"data-test": "i18n-dot",
|
|
952
|
-
"data-state":
|
|
953
|
-
}, null, 10,
|
|
954
|
-
], 42,
|
|
955
|
-
], 8,
|
|
943
|
+
"data-state": w(z) ? "written" : te.value && K.value.includes(z) ? "required" : "empty"
|
|
944
|
+
}, null, 10, Ta)
|
|
945
|
+
], 42, Ra))), 128))
|
|
946
|
+
], 8, ja)
|
|
956
947
|
]),
|
|
957
948
|
_: 2
|
|
958
949
|
}, [
|
|
959
|
-
|
|
950
|
+
S.value ? {
|
|
960
951
|
name: "readonly",
|
|
961
|
-
fn:
|
|
962
|
-
p("div",
|
|
963
|
-
p("p",
|
|
964
|
-
|
|
952
|
+
fn: C(() => [
|
|
953
|
+
p("div", Ea, [
|
|
954
|
+
p("p", Ia, $(E(S.value)), 1),
|
|
955
|
+
j.value.length > 0 ? (i(), g(ne, { key: 0 }, [
|
|
965
956
|
p("button", {
|
|
966
957
|
type: "button",
|
|
967
|
-
"aria-expanded":
|
|
958
|
+
"aria-expanded": c.value,
|
|
968
959
|
class: "mt-1.5 flex w-full cursor-pointer items-center gap-2 text-left text-footnote text-content-muted focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
969
|
-
onClick: L[2] || (L[2] = (
|
|
960
|
+
onClick: L[2] || (L[2] = (z) => c.value = !c.value)
|
|
970
961
|
}, [
|
|
971
|
-
p("span",
|
|
972
|
-
|
|
962
|
+
p("span", Na, $(s(n)("core.form.i18n.more", { count: j.value.length, filled: fe.value })), 1),
|
|
963
|
+
M(s(H), {
|
|
973
964
|
name: "arrowRightSLine",
|
|
974
965
|
size: 16,
|
|
975
|
-
class:
|
|
966
|
+
class: R(["shrink-0 transition-transform duration-motion-fast", c.value ? "rotate-90" : ""])
|
|
976
967
|
}, null, 8, ["class"])
|
|
977
|
-
], 8,
|
|
978
|
-
|
|
979
|
-
(i(!0),
|
|
980
|
-
key:
|
|
968
|
+
], 8, Ga),
|
|
969
|
+
c.value ? (i(), g("dl", Ka, [
|
|
970
|
+
(i(!0), g(ne, null, xe(j.value, (z) => (i(), g("div", {
|
|
971
|
+
key: z,
|
|
981
972
|
class: "flex gap-2 text-body"
|
|
982
973
|
}, [
|
|
983
974
|
p("dt", {
|
|
984
975
|
class: "w-8 shrink-0 text-footnote font-semibold leading-6 text-content-muted",
|
|
985
|
-
title:
|
|
986
|
-
},
|
|
976
|
+
title: T(z)
|
|
977
|
+
}, $(O(z)), 9, Pa),
|
|
987
978
|
p("dd", {
|
|
988
|
-
class:
|
|
989
|
-
},
|
|
979
|
+
class: R(["min-w-0 flex-1 whitespace-pre-line break-words", w(z) ? "text-content-strong" : "text-content-disabled"])
|
|
980
|
+
}, $(w(z) ? E(z) : s(n)("core.state.no_value")), 3)
|
|
990
981
|
]))), 128))
|
|
991
|
-
])) :
|
|
992
|
-
], 64)) :
|
|
982
|
+
])) : D("", !0)
|
|
983
|
+
], 64)) : D("", !0)
|
|
993
984
|
])
|
|
994
985
|
]),
|
|
995
986
|
key: "0"
|
|
996
987
|
} : void 0
|
|
997
988
|
]), 1040, ["value"]));
|
|
998
989
|
}
|
|
999
|
-
}),
|
|
990
|
+
}), xo = /* @__PURE__ */ G({
|
|
1000
991
|
__name: "MoneyField",
|
|
1001
|
-
props: /* @__PURE__ */
|
|
992
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
1002
993
|
label: {},
|
|
1003
994
|
hint: {},
|
|
1004
995
|
error: {},
|
|
@@ -1012,28 +1003,28 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1012
1003
|
decimals: {},
|
|
1013
1004
|
negative: { type: Boolean },
|
|
1014
1005
|
width: {}
|
|
1015
|
-
}, { ...
|
|
1006
|
+
}, { ...de, decimals: 2, negative: !1, width: "sm" }), {
|
|
1016
1007
|
modelValue: { default: null },
|
|
1017
1008
|
modelModifiers: {}
|
|
1018
1009
|
}),
|
|
1019
1010
|
emits: ["update:modelValue"],
|
|
1020
1011
|
setup(o, { expose: t }) {
|
|
1021
|
-
const e = o, a =
|
|
1022
|
-
return t({ focus: () => n.value?.focus() }), (
|
|
1012
|
+
const e = o, a = oe(o, "modelValue"), n = P("field");
|
|
1013
|
+
return t({ focus: () => n.value?.focus() }), (l, d) => (i(), q(Mt, J({
|
|
1023
1014
|
ref_key: "field",
|
|
1024
1015
|
ref: n,
|
|
1025
1016
|
modelValue: a.value,
|
|
1026
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1027
|
-
},
|
|
1017
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => a.value = m)
|
|
1018
|
+
}, s(ue)(e), {
|
|
1028
1019
|
decimals: e.decimals,
|
|
1029
1020
|
negative: e.negative,
|
|
1030
1021
|
suffix: e.currency,
|
|
1031
1022
|
width: e.width
|
|
1032
1023
|
}), null, 16, ["modelValue", "decimals", "negative", "suffix", "width"]));
|
|
1033
1024
|
}
|
|
1034
|
-
}),
|
|
1025
|
+
}), Aa = { class: "flex flex-col gap-2" }, Ua = ["onClick"], _o = /* @__PURE__ */ G({
|
|
1035
1026
|
__name: "MonthYearField",
|
|
1036
|
-
props: /* @__PURE__ */
|
|
1027
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
1037
1028
|
label: {},
|
|
1038
1029
|
hint: {},
|
|
1039
1030
|
error: {},
|
|
@@ -1045,7 +1036,7 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1045
1036
|
name: {},
|
|
1046
1037
|
minYear: {},
|
|
1047
1038
|
maxYear: {}
|
|
1048
|
-
}, { ...
|
|
1039
|
+
}, { ...de, minYear: 1970, maxYear: () => (/* @__PURE__ */ new Date()).getFullYear() + 1 }), {
|
|
1049
1040
|
month: { default: null },
|
|
1050
1041
|
monthModifiers: {},
|
|
1051
1042
|
year: { default: null },
|
|
@@ -1053,58 +1044,58 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1053
1044
|
}),
|
|
1054
1045
|
emits: ["update:month", "update:year"],
|
|
1055
1046
|
setup(o) {
|
|
1056
|
-
const t = o, e =
|
|
1057
|
-
function b(
|
|
1058
|
-
e.value =
|
|
1047
|
+
const t = o, e = oe(o, "month"), a = oe(o, "year"), { t: n } = Q(), l = y(() => e.value !== null && e.value >= 1 && e.value <= 12), d = (k, x) => n(`core.form.months.${x}.${k}`), m = y(() => l.value && a.value !== null ? n("core.form.months.with_year", { month: d(e.value, "long"), year: a.value }) : a.value !== null ? String(a.value) : l.value ? d(e.value, "long") : "");
|
|
1048
|
+
function b(k, x) {
|
|
1049
|
+
e.value = k.month, a.value = k.year, x();
|
|
1059
1050
|
}
|
|
1060
|
-
function
|
|
1061
|
-
e.value = null, a.value = null,
|
|
1051
|
+
function h(k) {
|
|
1052
|
+
e.value = null, a.value = null, k();
|
|
1062
1053
|
}
|
|
1063
|
-
return (
|
|
1064
|
-
value:
|
|
1054
|
+
return (k, x) => (i(), q(ge, J(s(ue)(t), {
|
|
1055
|
+
value: m.value || null
|
|
1065
1056
|
}), {
|
|
1066
|
-
default:
|
|
1067
|
-
|
|
1068
|
-
label: t.label ??
|
|
1057
|
+
default: C(({ id: r, describedby: u, invalid: v }) => [
|
|
1058
|
+
M(Ie, {
|
|
1059
|
+
label: t.label ?? m.value,
|
|
1069
1060
|
width: "sm",
|
|
1070
1061
|
placement: "bottom-start",
|
|
1071
1062
|
arrow: !1
|
|
1072
1063
|
}, {
|
|
1073
|
-
trigger:
|
|
1074
|
-
|
|
1064
|
+
trigger: C(({ toggle: F, presented: B }) => [
|
|
1065
|
+
M(at, J({ id: r, "aria-describedby": u }, {
|
|
1075
1066
|
expanded: B,
|
|
1076
1067
|
disabled: t.disabled,
|
|
1077
1068
|
invalid: v,
|
|
1078
|
-
onClick:
|
|
1069
|
+
onClick: F
|
|
1079
1070
|
}), {
|
|
1080
|
-
default:
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1071
|
+
default: C(() => [
|
|
1072
|
+
m.value ? (i(), g(ne, { key: 0 }, [
|
|
1073
|
+
Y($(m.value), 1),
|
|
1074
|
+
M(s(H), {
|
|
1084
1075
|
name: "calendarLine",
|
|
1085
1076
|
size: 16,
|
|
1086
1077
|
class: "ml-2 shrink-0 text-content-muted"
|
|
1087
1078
|
})
|
|
1088
|
-
], 64)) :
|
|
1079
|
+
], 64)) : D("", !0)
|
|
1089
1080
|
]),
|
|
1090
1081
|
_: 1
|
|
1091
1082
|
}, 16, ["expanded", "disabled", "invalid", "onClick"])
|
|
1092
1083
|
]),
|
|
1093
|
-
default:
|
|
1094
|
-
p("div",
|
|
1095
|
-
|
|
1084
|
+
default: C(({ dismiss: F }) => [
|
|
1085
|
+
p("div", Aa, [
|
|
1086
|
+
M(St, {
|
|
1096
1087
|
month: e.value,
|
|
1097
1088
|
year: a.value,
|
|
1098
1089
|
"min-year": t.minYear,
|
|
1099
1090
|
"max-year": t.maxYear,
|
|
1100
|
-
onPick: (B) => b(B,
|
|
1091
|
+
onPick: (B) => b(B, F)
|
|
1101
1092
|
}, null, 8, ["month", "year", "min-year", "max-year", "onPick"]),
|
|
1102
|
-
|
|
1093
|
+
l.value || a.value !== null ? (i(), g("button", {
|
|
1103
1094
|
key: 0,
|
|
1104
1095
|
type: "button",
|
|
1105
1096
|
class: "cursor-pointer self-start rounded-control px-1 text-footnote text-content-link",
|
|
1106
|
-
onClick: (B) =>
|
|
1107
|
-
},
|
|
1097
|
+
onClick: (B) => h(F)
|
|
1098
|
+
}, $(s(n)("core.form.select.clear")), 9, Ua)) : D("", !0)
|
|
1108
1099
|
])
|
|
1109
1100
|
]),
|
|
1110
1101
|
_: 2
|
|
@@ -1113,9 +1104,9 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1113
1104
|
_: 1
|
|
1114
1105
|
}, 16, ["value"]));
|
|
1115
1106
|
}
|
|
1116
|
-
}),
|
|
1107
|
+
}), Ya = { class: "flex min-w-0 flex-wrap items-center gap-1.5 py-0.5" }, Wa = { class: "truncate" }, Ja = ["disabled", "aria-label", "onClick"], Ha = ["id", "disabled", "aria-expanded", "aria-invalid", "aria-describedby", "aria-busy"], Xa = ["id", "disabled", "aria-invalid", "aria-describedby", "aria-busy", "onClick"], Qa = { class: "max-h-72 overflow-y-auto" }, Za = { class: "flex items-center justify-between gap-2" }, Je = "inline-flex min-h-7 cursor-pointer items-center gap-1 rounded-control bg-fill px-2.5 py-1 text-body text-content-muted hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-45", ko = /* @__PURE__ */ G({
|
|
1117
1108
|
__name: "MultiSelectField",
|
|
1118
|
-
props: /* @__PURE__ */
|
|
1109
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
1119
1110
|
label: {},
|
|
1120
1111
|
hint: {},
|
|
1121
1112
|
error: {},
|
|
@@ -1129,49 +1120,49 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1129
1120
|
selected: {},
|
|
1130
1121
|
placeholder: {},
|
|
1131
1122
|
searchFrom: {}
|
|
1132
|
-
}, { ...
|
|
1123
|
+
}, { ...de, selected: () => [], placeholder: void 0, searchFrom: 9 }), {
|
|
1133
1124
|
modelValue: { default: () => [] },
|
|
1134
1125
|
modelModifiers: {}
|
|
1135
1126
|
}),
|
|
1136
1127
|
emits: ["update:modelValue"],
|
|
1137
1128
|
setup(o) {
|
|
1138
|
-
const t = o, e =
|
|
1139
|
-
const u = e.value.filter((v) => r.some((
|
|
1129
|
+
const t = o, e = oe(o, "modelValue"), { t: a } = Q(), n = Ee(), l = P("sheet"), d = I(!1), m = jt(() => t.options, (r) => {
|
|
1130
|
+
const u = e.value.filter((v) => r.some((F) => F.value === v));
|
|
1140
1131
|
u.length !== e.value.length && (e.value = u);
|
|
1141
|
-
}), b =
|
|
1142
|
-
const u =
|
|
1132
|
+
}), b = y(() => e.value.flatMap((r) => {
|
|
1133
|
+
const u = m.known.value.find((v) => v.value === r) ?? t.selected.find((v) => v.value === r);
|
|
1143
1134
|
return u ? [u] : [];
|
|
1144
|
-
})),
|
|
1145
|
-
function
|
|
1135
|
+
})), h = y(() => t.placeholder ?? a("core.form.select.choose"));
|
|
1136
|
+
function k(r) {
|
|
1146
1137
|
r !== null && (e.value = e.value.includes(r) ? e.value.filter((u) => u !== r) : [...e.value, r]);
|
|
1147
1138
|
}
|
|
1148
1139
|
const x = (r) => e.value = e.value.filter((u) => u !== r);
|
|
1149
|
-
return (r, u) => (i(),
|
|
1140
|
+
return (r, u) => (i(), q(ge, J(s(ue)(t), {
|
|
1150
1141
|
value: b.value.length ? b.value.map((v) => v.label).join(", ") : null,
|
|
1151
1142
|
"row-layout": "stacked"
|
|
1152
1143
|
}), {
|
|
1153
|
-
default:
|
|
1154
|
-
p("div",
|
|
1155
|
-
(i(!0),
|
|
1156
|
-
key: String(
|
|
1144
|
+
default: C(({ id: v, describedby: F, invalid: B }) => [
|
|
1145
|
+
p("div", Ya, [
|
|
1146
|
+
(i(!0), g(ne, null, xe(b.value, (_) => (i(), g("span", {
|
|
1147
|
+
key: String(_.value),
|
|
1157
1148
|
"data-test": "chip",
|
|
1158
1149
|
class: "inline-flex min-h-7 max-w-full items-center gap-1 rounded-full bg-tint-soft pl-3 pr-1 text-subheadline font-medium text-content-link"
|
|
1159
1150
|
}, [
|
|
1160
|
-
p("span",
|
|
1151
|
+
p("span", Wa, $(_.label), 1),
|
|
1161
1152
|
p("button", {
|
|
1162
1153
|
type: "button",
|
|
1163
1154
|
disabled: t.disabled,
|
|
1164
|
-
"aria-label": `${
|
|
1155
|
+
"aria-label": `${s(a)("core.form.select.clear")}: ${_.label}`,
|
|
1165
1156
|
class: "flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-not-allowed",
|
|
1166
|
-
onClick: (E) => x(
|
|
1157
|
+
onClick: (E) => x(_.value)
|
|
1167
1158
|
}, [
|
|
1168
|
-
|
|
1159
|
+
M(s(H), {
|
|
1169
1160
|
name: "close",
|
|
1170
1161
|
size: 12
|
|
1171
1162
|
})
|
|
1172
|
-
], 8,
|
|
1163
|
+
], 8, Ja)
|
|
1173
1164
|
]))), 128)),
|
|
1174
|
-
|
|
1165
|
+
s(n) ? (i(), g("button", {
|
|
1175
1166
|
key: 0,
|
|
1176
1167
|
id: v,
|
|
1177
1168
|
type: "button",
|
|
@@ -1179,27 +1170,27 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1179
1170
|
"aria-haspopup": "dialog",
|
|
1180
1171
|
"aria-expanded": d.value,
|
|
1181
1172
|
"aria-invalid": B || void 0,
|
|
1182
|
-
"aria-describedby":
|
|
1183
|
-
"aria-busy":
|
|
1184
|
-
class:
|
|
1185
|
-
onClick: u[0] || (u[0] = (
|
|
1173
|
+
"aria-describedby": F,
|
|
1174
|
+
"aria-busy": s(m).loading.value || void 0,
|
|
1175
|
+
class: R(Je),
|
|
1176
|
+
onClick: u[0] || (u[0] = (_) => l.value?.present())
|
|
1186
1177
|
}, [
|
|
1187
|
-
|
|
1178
|
+
s(m).loading.value ? (i(), q(s(H), {
|
|
1188
1179
|
key: 0,
|
|
1189
1180
|
name: "loader4Line",
|
|
1190
1181
|
size: 14,
|
|
1191
1182
|
class: "shrink-0 animate-spin"
|
|
1192
|
-
})) :
|
|
1193
|
-
|
|
1194
|
-
], 8,
|
|
1183
|
+
})) : D("", !0),
|
|
1184
|
+
Y(" " + $(b.value.length ? s(a)("core.actions.edit") : h.value), 1)
|
|
1185
|
+
], 8, Ha)) : (i(), q(Ie, {
|
|
1195
1186
|
key: 1,
|
|
1196
|
-
label: t.label ??
|
|
1187
|
+
label: t.label ?? h.value,
|
|
1197
1188
|
width: "md",
|
|
1198
1189
|
"match-trigger-width": "",
|
|
1199
1190
|
placement: "bottom-start",
|
|
1200
1191
|
arrow: !1
|
|
1201
1192
|
}, {
|
|
1202
|
-
trigger:
|
|
1193
|
+
trigger: C(({ toggle: _, attrs: E }) => [
|
|
1203
1194
|
p("button", J({
|
|
1204
1195
|
id: v,
|
|
1205
1196
|
type: "button"
|
|
@@ -1207,89 +1198,89 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1207
1198
|
"aria-haspopup": "listbox",
|
|
1208
1199
|
disabled: t.disabled,
|
|
1209
1200
|
"aria-invalid": B || void 0,
|
|
1210
|
-
"aria-describedby":
|
|
1211
|
-
"aria-busy":
|
|
1212
|
-
class:
|
|
1213
|
-
onClick:
|
|
1201
|
+
"aria-describedby": F,
|
|
1202
|
+
"aria-busy": s(m).loading.value || void 0,
|
|
1203
|
+
class: Je,
|
|
1204
|
+
onClick: _
|
|
1214
1205
|
}), [
|
|
1215
|
-
|
|
1206
|
+
s(m).loading.value ? (i(), q(s(H), {
|
|
1216
1207
|
key: 0,
|
|
1217
1208
|
name: "loader4Line",
|
|
1218
1209
|
size: 14,
|
|
1219
1210
|
class: "shrink-0 animate-spin"
|
|
1220
|
-
})) :
|
|
1221
|
-
|
|
1222
|
-
], 16,
|
|
1211
|
+
})) : D("", !0),
|
|
1212
|
+
Y(" " + $(b.value.length ? s(a)("core.actions.edit") : h.value), 1)
|
|
1213
|
+
], 16, Xa)
|
|
1223
1214
|
]),
|
|
1224
|
-
default:
|
|
1225
|
-
p("div",
|
|
1226
|
-
|
|
1227
|
-
options:
|
|
1228
|
-
status:
|
|
1215
|
+
default: C(() => [
|
|
1216
|
+
p("div", Qa, [
|
|
1217
|
+
M(Ue, {
|
|
1218
|
+
options: s(m).rows.value,
|
|
1219
|
+
status: s(m).status.value,
|
|
1229
1220
|
"model-value": e.value,
|
|
1230
1221
|
multiple: "",
|
|
1231
1222
|
"search-from": t.searchFrom,
|
|
1232
1223
|
presentation: "plain",
|
|
1233
|
-
onSelect:
|
|
1234
|
-
onRetry: u[1] || (u[1] = (
|
|
1224
|
+
onSelect: k,
|
|
1225
|
+
onRetry: u[1] || (u[1] = (_) => s(m).reload())
|
|
1235
1226
|
}, null, 8, ["options", "status", "model-value", "search-from"])
|
|
1236
1227
|
])
|
|
1237
1228
|
]),
|
|
1238
1229
|
_: 2
|
|
1239
1230
|
}, 1032, ["label"]))
|
|
1240
1231
|
]),
|
|
1241
|
-
|
|
1232
|
+
s(n) ? (i(), q(Ot, {
|
|
1242
1233
|
key: 0,
|
|
1243
1234
|
ref_key: "sheet",
|
|
1244
|
-
ref:
|
|
1245
|
-
title: t.label ??
|
|
1235
|
+
ref: l,
|
|
1236
|
+
title: t.label ?? h.value,
|
|
1246
1237
|
grouped: "",
|
|
1247
|
-
onPresented: u[5] || (u[5] = (
|
|
1248
|
-
onDismissed: u[6] || (u[6] = (
|
|
1238
|
+
onPresented: u[5] || (u[5] = (_) => d.value = !0),
|
|
1239
|
+
onDismissed: u[6] || (u[6] = (_) => d.value = !1)
|
|
1249
1240
|
}, {
|
|
1250
|
-
footer:
|
|
1251
|
-
p("div",
|
|
1252
|
-
|
|
1241
|
+
footer: C(() => [
|
|
1242
|
+
p("div", Za, [
|
|
1243
|
+
M(be, {
|
|
1253
1244
|
prominence: "plain",
|
|
1254
1245
|
disabled: e.value.length === 0,
|
|
1255
|
-
onClick: u[3] || (u[3] = (
|
|
1246
|
+
onClick: u[3] || (u[3] = (_) => e.value = [])
|
|
1256
1247
|
}, {
|
|
1257
|
-
default:
|
|
1258
|
-
|
|
1248
|
+
default: C(() => [
|
|
1249
|
+
Y($(s(a)("core.form.select.clear")), 1)
|
|
1259
1250
|
]),
|
|
1260
1251
|
_: 1
|
|
1261
1252
|
}, 8, ["disabled"]),
|
|
1262
|
-
|
|
1253
|
+
M(be, {
|
|
1263
1254
|
prominence: "primary",
|
|
1264
|
-
onClick: u[4] || (u[4] = (
|
|
1255
|
+
onClick: u[4] || (u[4] = (_) => l.value?.dismiss())
|
|
1265
1256
|
}, {
|
|
1266
|
-
default:
|
|
1267
|
-
|
|
1257
|
+
default: C(() => [
|
|
1258
|
+
Y($(s(a)("core.form.select.done")), 1)
|
|
1268
1259
|
]),
|
|
1269
1260
|
_: 1
|
|
1270
1261
|
})
|
|
1271
1262
|
])
|
|
1272
1263
|
]),
|
|
1273
|
-
default:
|
|
1274
|
-
|
|
1275
|
-
options:
|
|
1276
|
-
status:
|
|
1264
|
+
default: C(() => [
|
|
1265
|
+
M(Ue, {
|
|
1266
|
+
options: s(m).rows.value,
|
|
1267
|
+
status: s(m).status.value,
|
|
1277
1268
|
"model-value": e.value,
|
|
1278
1269
|
multiple: "",
|
|
1279
1270
|
"search-from": t.searchFrom,
|
|
1280
|
-
onSelect:
|
|
1281
|
-
onRetry: u[2] || (u[2] = (
|
|
1271
|
+
onSelect: k,
|
|
1272
|
+
onRetry: u[2] || (u[2] = (_) => s(m).reload())
|
|
1282
1273
|
}, null, 8, ["options", "status", "model-value", "search-from"])
|
|
1283
1274
|
]),
|
|
1284
1275
|
_: 1
|
|
1285
|
-
}, 8, ["title"])) :
|
|
1276
|
+
}, 8, ["title"])) : D("", !0)
|
|
1286
1277
|
]),
|
|
1287
1278
|
_: 1
|
|
1288
1279
|
}, 16, ["value"]));
|
|
1289
1280
|
}
|
|
1290
|
-
}),
|
|
1281
|
+
}), el = ["aria-label"], tl = ["src"], al = { class: "flex flex-wrap items-center gap-3" }, ll = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], ol = ["aria-label"], sl = ["src"], wo = /* @__PURE__ */ G({
|
|
1291
1282
|
__name: "PhotoField",
|
|
1292
|
-
props: /* @__PURE__ */
|
|
1283
|
+
props: /* @__PURE__ */ se(/* @__PURE__ */ ie({
|
|
1293
1284
|
label: {},
|
|
1294
1285
|
hint: {},
|
|
1295
1286
|
error: {},
|
|
@@ -1301,57 +1292,57 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1301
1292
|
name: {},
|
|
1302
1293
|
accept: {},
|
|
1303
1294
|
maxSize: {}
|
|
1304
|
-
}, { ...
|
|
1295
|
+
}, { ...de, accept: () => ["image/jpeg", "image/png", "image/webp", "image/gif"], maxSize: 5 * 1024 * 1024 }), {
|
|
1305
1296
|
modelValue: { default: null },
|
|
1306
1297
|
modelModifiers: {}
|
|
1307
1298
|
}),
|
|
1308
1299
|
emits: ["update:modelValue"],
|
|
1309
1300
|
setup(o) {
|
|
1310
|
-
const t = o, e =
|
|
1311
|
-
function
|
|
1301
|
+
const t = o, e = oe(o, "modelValue"), { t: a } = Q(), n = P("chooser"), l = I(null), d = I(null);
|
|
1302
|
+
function m() {
|
|
1312
1303
|
d.value && URL.revokeObjectURL(d.value), d.value = null;
|
|
1313
1304
|
}
|
|
1314
|
-
|
|
1305
|
+
re(
|
|
1315
1306
|
e,
|
|
1316
1307
|
(r) => {
|
|
1317
|
-
|
|
1308
|
+
m(), r instanceof File && (d.value = URL.createObjectURL(r)), r === null && n.value && (n.value.value = "");
|
|
1318
1309
|
},
|
|
1319
1310
|
{ immediate: !0 }
|
|
1320
|
-
),
|
|
1321
|
-
const b =
|
|
1311
|
+
), je(m);
|
|
1312
|
+
const b = y(() => e.value instanceof File ? d.value : e.value), h = P("viewer"), k = y(() => b.value ? [{ src: b.value, alt: t.label ?? a("core.viewer.label"), downloadName: e.value instanceof File ? e.value.name : void 0 }] : []);
|
|
1322
1313
|
function x(r) {
|
|
1323
1314
|
if (!r) return;
|
|
1324
|
-
const u =
|
|
1325
|
-
u ?
|
|
1315
|
+
const u = lt(r, { accept: t.accept, maxSize: t.maxSize });
|
|
1316
|
+
u ? l.value = u === "invalid_type" ? a("core.form.file.invalid_type") : a("core.form.file.too_large", { size: Fe(t.maxSize) }) : (l.value = null, e.value = r);
|
|
1326
1317
|
}
|
|
1327
|
-
return (r, u) => (i(),
|
|
1328
|
-
value: b.value ?
|
|
1318
|
+
return (r, u) => (i(), q(ge, J({ ...s(ue)(t), error: l.value ?? t.error }, {
|
|
1319
|
+
value: b.value ? s(a)("core.form.file.choose") : null,
|
|
1329
1320
|
"row-layout": "stacked"
|
|
1330
1321
|
}), {
|
|
1331
|
-
readonly:
|
|
1332
|
-
b.value ? (i(),
|
|
1322
|
+
readonly: C(() => [
|
|
1323
|
+
b.value ? (i(), g("button", {
|
|
1333
1324
|
key: 0,
|
|
1334
1325
|
type: "button",
|
|
1335
|
-
"aria-label":
|
|
1326
|
+
"aria-label": s(a)("core.viewer.open"),
|
|
1336
1327
|
"data-test": "photo-open",
|
|
1337
1328
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1338
|
-
onClick: u[0] || (u[0] = (v) =>
|
|
1329
|
+
onClick: u[0] || (u[0] = (v) => h.value?.present(0))
|
|
1339
1330
|
}, [
|
|
1340
1331
|
p("img", {
|
|
1341
1332
|
src: b.value,
|
|
1342
1333
|
alt: "",
|
|
1343
1334
|
class: "size-40 rounded-group object-cover"
|
|
1344
|
-
}, null, 8,
|
|
1345
|
-
], 8,
|
|
1346
|
-
b.value ? (i(),
|
|
1335
|
+
}, null, 8, tl)
|
|
1336
|
+
], 8, el)) : D("", !0),
|
|
1337
|
+
b.value ? (i(), q(Ye, {
|
|
1347
1338
|
key: 1,
|
|
1348
1339
|
ref_key: "viewer",
|
|
1349
|
-
ref:
|
|
1350
|
-
items:
|
|
1351
|
-
}, null, 8, ["items"])) :
|
|
1340
|
+
ref: h,
|
|
1341
|
+
items: k.value
|
|
1342
|
+
}, null, 8, ["items"])) : D("", !0)
|
|
1352
1343
|
]),
|
|
1353
|
-
default:
|
|
1354
|
-
p("div",
|
|
1344
|
+
default: C(({ id: v, describedby: F, invalid: B }) => [
|
|
1345
|
+
p("div", al, [
|
|
1355
1346
|
p("input", {
|
|
1356
1347
|
id: v,
|
|
1357
1348
|
ref_key: "chooser",
|
|
@@ -1361,198 +1352,60 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1361
1352
|
tabindex: "-1",
|
|
1362
1353
|
accept: t.accept.join(","),
|
|
1363
1354
|
disabled: t.disabled,
|
|
1364
|
-
"aria-describedby":
|
|
1355
|
+
"aria-describedby": F,
|
|
1365
1356
|
"aria-invalid": B || void 0,
|
|
1366
|
-
onChange: u[1] || (u[1] = (
|
|
1367
|
-
}, null, 40,
|
|
1368
|
-
b.value ? (i(),
|
|
1357
|
+
onChange: u[1] || (u[1] = (_) => x(_.target.files?.[0]))
|
|
1358
|
+
}, null, 40, ll),
|
|
1359
|
+
b.value ? (i(), g("button", {
|
|
1369
1360
|
key: 0,
|
|
1370
1361
|
type: "button",
|
|
1371
|
-
"aria-label":
|
|
1362
|
+
"aria-label": s(a)("core.viewer.open"),
|
|
1372
1363
|
"data-test": "photo-open",
|
|
1373
1364
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1374
|
-
onClick: u[2] || (u[2] = (
|
|
1365
|
+
onClick: u[2] || (u[2] = (_) => h.value?.present(0))
|
|
1375
1366
|
}, [
|
|
1376
1367
|
p("img", {
|
|
1377
1368
|
src: b.value,
|
|
1378
1369
|
alt: "",
|
|
1379
1370
|
"data-test": "photo-preview",
|
|
1380
1371
|
class: "size-28 rounded-group object-cover"
|
|
1381
|
-
}, null, 8,
|
|
1382
|
-
], 8,
|
|
1383
|
-
|
|
1372
|
+
}, null, 8, sl)
|
|
1373
|
+
], 8, ol)) : D("", !0),
|
|
1374
|
+
M(be, {
|
|
1384
1375
|
disabled: t.disabled,
|
|
1385
|
-
onClick: u[3] || (u[3] = (
|
|
1376
|
+
onClick: u[3] || (u[3] = (_) => n.value?.click())
|
|
1386
1377
|
}, {
|
|
1387
|
-
default:
|
|
1388
|
-
|
|
1378
|
+
default: C(() => [
|
|
1379
|
+
Y($(s(a)("core.form.file.choose")), 1)
|
|
1389
1380
|
]),
|
|
1390
1381
|
_: 1
|
|
1391
1382
|
}, 8, ["disabled"]),
|
|
1392
|
-
b.value ? (i(),
|
|
1383
|
+
b.value ? (i(), q(be, {
|
|
1393
1384
|
key: 1,
|
|
1394
1385
|
prominence: "plain",
|
|
1395
1386
|
tone: "critical",
|
|
1396
1387
|
disabled: t.disabled,
|
|
1397
|
-
onClick: u[4] || (u[4] = (
|
|
1398
|
-
e.value = null,
|
|
1388
|
+
onClick: u[4] || (u[4] = (_) => {
|
|
1389
|
+
e.value = null, l.value = null;
|
|
1399
1390
|
})
|
|
1400
1391
|
}, {
|
|
1401
|
-
default:
|
|
1402
|
-
|
|
1392
|
+
default: C(() => [
|
|
1393
|
+
Y($(s(a)("core.form.file.remove")), 1)
|
|
1403
1394
|
]),
|
|
1404
1395
|
_: 1
|
|
1405
|
-
}, 8, ["disabled"])) :
|
|
1396
|
+
}, 8, ["disabled"])) : D("", !0)
|
|
1406
1397
|
]),
|
|
1407
|
-
b.value ? (i(),
|
|
1398
|
+
b.value ? (i(), q(Ye, {
|
|
1408
1399
|
key: 0,
|
|
1409
1400
|
ref_key: "viewer",
|
|
1410
|
-
ref:
|
|
1411
|
-
items:
|
|
1412
|
-
}, null, 8, ["items"])) :
|
|
1413
|
-
]),
|
|
1414
|
-
_: 1
|
|
1415
|
-
}, 16, ["value"]));
|
|
1416
|
-
}
|
|
1417
|
-
}), dl = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], cl = ["aria-label", "onClick"], Bo = /* @__PURE__ */ N({
|
|
1418
|
-
__name: "TimeField",
|
|
1419
|
-
props: /* @__PURE__ */ le(/* @__PURE__ */ re({
|
|
1420
|
-
label: {},
|
|
1421
|
-
hint: {},
|
|
1422
|
-
error: {},
|
|
1423
|
-
required: { type: Boolean },
|
|
1424
|
-
editable: { type: Boolean },
|
|
1425
|
-
disabled: { type: Boolean },
|
|
1426
|
-
lockedReason: {},
|
|
1427
|
-
presentation: {},
|
|
1428
|
-
name: {},
|
|
1429
|
-
minuteStep: {},
|
|
1430
|
-
quickTimes: {}
|
|
1431
|
-
}, { ...ue, minuteStep: 1, quickTimes: void 0 }), {
|
|
1432
|
-
modelValue: { default: null },
|
|
1433
|
-
modelModifiers: {}
|
|
1434
|
-
}),
|
|
1435
|
-
emits: ["update:modelValue"],
|
|
1436
|
-
setup(o, { expose: t }) {
|
|
1437
|
-
const e = o, a = ae(o, "modelValue"), { t: n } = ee(), s = rt(), d = qe(), c = K("input"), b = K("popover"), g = K("panel"), _ = K("sheet"), x = it(() => e.minuteStep), r = Oe({ model: a, display: (q) => q, parse: x.parse }), u = h(() => x.shortcuts(e.quickTimes)), v = h(() => e.error || r.message.value), C = Le("date", () => v.value ? "error" : e.disabled ? "locked" : "rest"), B = h(() => {
|
|
1438
|
-
const q = Tt(a.value);
|
|
1439
|
-
return q ? s.time(new Date(2e3, 0, 1, q.hour, q.minute)) : null;
|
|
1440
|
-
}), k = h(() => Re(r.typed.value) ? r.typed.value : Re(a.value) ? a.value : null);
|
|
1441
|
-
async function E(q) {
|
|
1442
|
-
e.disabled || (b.value?.present(), q && (await ce(), await ce(), g.value?.querySelector("[role=listbox]")?.focus()));
|
|
1443
|
-
}
|
|
1444
|
-
function $(q) {
|
|
1445
|
-
q.key === "Enter" ? (r.commit(), b.value?.dismiss()) : q.key === "ArrowDown" && (q.preventDefault(), E(!0));
|
|
1446
|
-
}
|
|
1447
|
-
return t({ focus: () => c.value?.focus() }), (q, M) => (i(), z(fe, J({ ...l(ie)(e), error: v.value }, {
|
|
1448
|
-
value: B.value,
|
|
1449
|
-
"value-style": "numeric"
|
|
1450
|
-
}), {
|
|
1451
|
-
default: w(({ id: P, describedby: Q, invalid: X }) => [
|
|
1452
|
-
l(d) ? (i(), y(te, { key: 0 }, [
|
|
1453
|
-
j(Ke, J({ id: P, "aria-describedby": Q }, {
|
|
1454
|
-
disabled: e.disabled,
|
|
1455
|
-
invalid: X,
|
|
1456
|
-
placeholder: l(n)("core.form.select.choose"),
|
|
1457
|
-
onClick: M[0] || (M[0] = (Y) => _.value?.present())
|
|
1458
|
-
}), {
|
|
1459
|
-
default: w(() => [
|
|
1460
|
-
a.value ? (i(), y(te, { key: 0 }, [
|
|
1461
|
-
W(S(a.value), 1)
|
|
1462
|
-
], 64)) : V("", !0)
|
|
1463
|
-
]),
|
|
1464
|
-
_: 1
|
|
1465
|
-
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
1466
|
-
j(ot, {
|
|
1467
|
-
ref_key: "sheet",
|
|
1468
|
-
ref: _,
|
|
1469
|
-
title: e.label ?? l(n)("core.form.time.label"),
|
|
1470
|
-
mode: "time",
|
|
1471
|
-
"model-value": a.value,
|
|
1472
|
-
shortcuts: u.value,
|
|
1473
|
-
step: e.minuteStep,
|
|
1474
|
-
clearable: !e.required,
|
|
1475
|
-
"onUpdate:modelValue": l(r).set
|
|
1476
|
-
}, null, 8, ["title", "model-value", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
1477
|
-
], 64)) : (i(), z(Ve, {
|
|
1478
|
-
key: 1,
|
|
1479
|
-
ref_key: "popover",
|
|
1480
|
-
ref: b,
|
|
1481
|
-
label: e.label ?? l(n)("core.form.time.label"),
|
|
1482
|
-
width: "sm",
|
|
1483
|
-
placement: "bottom-start",
|
|
1484
|
-
arrow: !1,
|
|
1485
|
-
autofocus: !1
|
|
1486
|
-
}, {
|
|
1487
|
-
trigger: w(({ attrs: Y, presented: I }) => [
|
|
1488
|
-
p("div", {
|
|
1489
|
-
class: O(["inline-flex max-w-full items-center gap-2", l(C)])
|
|
1490
|
-
}, [
|
|
1491
|
-
p("input", J({
|
|
1492
|
-
id: P,
|
|
1493
|
-
ref_key: "input",
|
|
1494
|
-
ref: c
|
|
1495
|
-
}, Y, {
|
|
1496
|
-
type: "text",
|
|
1497
|
-
role: "combobox",
|
|
1498
|
-
autocomplete: "off",
|
|
1499
|
-
size: "10",
|
|
1500
|
-
name: e.name,
|
|
1501
|
-
value: l(r).text.value,
|
|
1502
|
-
placeholder: l(x).placeholder.value,
|
|
1503
|
-
disabled: e.disabled,
|
|
1504
|
-
required: e.required,
|
|
1505
|
-
"aria-required": e.required || void 0,
|
|
1506
|
-
"aria-invalid": X || void 0,
|
|
1507
|
-
"aria-describedby": Q,
|
|
1508
|
-
class: "block min-h-7 min-w-0 border-0 bg-transparent py-1 pl-2.5 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
1509
|
-
onInput: M[1] || (M[1] = (A) => l(r).input(A.target.value)),
|
|
1510
|
-
onBlur: M[2] || (M[2] = (A) => l(r).commit()),
|
|
1511
|
-
onKeydown: $,
|
|
1512
|
-
onClick: M[3] || (M[3] = (A) => E(!1))
|
|
1513
|
-
}), null, 16, dl),
|
|
1514
|
-
e.disabled ? V("", !0) : (i(), y("button", {
|
|
1515
|
-
key: 0,
|
|
1516
|
-
type: "button",
|
|
1517
|
-
tabindex: "-1",
|
|
1518
|
-
"aria-label": l(n)("core.form.time.open"),
|
|
1519
|
-
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
1520
|
-
onClick: (A) => I ? b.value?.dismiss() : E(!0)
|
|
1521
|
-
}, [
|
|
1522
|
-
j(l(Z), {
|
|
1523
|
-
name: "timeLine",
|
|
1524
|
-
size: 18
|
|
1525
|
-
})
|
|
1526
|
-
], 8, cl))
|
|
1527
|
-
], 2)
|
|
1528
|
-
]),
|
|
1529
|
-
default: w(({ dismiss: Y }) => [
|
|
1530
|
-
p("div", {
|
|
1531
|
-
ref_key: "panel",
|
|
1532
|
-
ref: g,
|
|
1533
|
-
class: "flex flex-col gap-2.5"
|
|
1534
|
-
}, [
|
|
1535
|
-
j(nt, {
|
|
1536
|
-
"model-value": k.value,
|
|
1537
|
-
step: e.minuteStep,
|
|
1538
|
-
"onUpdate:modelValue": l(r).set
|
|
1539
|
-
}, null, 8, ["model-value", "step", "onUpdate:modelValue"]),
|
|
1540
|
-
j(st, {
|
|
1541
|
-
items: u.value,
|
|
1542
|
-
selected: k.value,
|
|
1543
|
-
onPick: (I) => {
|
|
1544
|
-
l(r).set(I), Y();
|
|
1545
|
-
}
|
|
1546
|
-
}, null, 8, ["items", "selected", "onPick"])
|
|
1547
|
-
], 512)
|
|
1548
|
-
]),
|
|
1549
|
-
_: 2
|
|
1550
|
-
}, 1032, ["label"]))
|
|
1401
|
+
ref: h,
|
|
1402
|
+
items: k.value
|
|
1403
|
+
}, null, 8, ["items"])) : D("", !0)
|
|
1551
1404
|
]),
|
|
1552
1405
|
_: 1
|
|
1553
1406
|
}, 16, ["value"]));
|
|
1554
1407
|
}
|
|
1555
|
-
}),
|
|
1408
|
+
}), nl = { class: "text-footnote" }, rl = { class: "text-footnote" }, $o = /* @__PURE__ */ G({
|
|
1556
1409
|
__name: "GroupSheet",
|
|
1557
1410
|
props: {
|
|
1558
1411
|
sheet: {},
|
|
@@ -1565,72 +1418,72 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1565
1418
|
},
|
|
1566
1419
|
emits: ["saved"],
|
|
1567
1420
|
setup(o, { emit: t }) {
|
|
1568
|
-
const e = o, a = t, { t: n } =
|
|
1421
|
+
const e = o, a = t, { t: n } = Q(), l = P("modal"), d = P("body"), m = I(!1);
|
|
1569
1422
|
let b = null;
|
|
1570
|
-
|
|
1571
|
-
x ? (
|
|
1572
|
-
}),
|
|
1573
|
-
e.sheet.open.value &&
|
|
1574
|
-
}),
|
|
1423
|
+
re(() => e.sheet.open.value, (x) => {
|
|
1424
|
+
x ? (m.value = !1, l.value?.present()) : l.value?.dismiss();
|
|
1425
|
+
}), ot(() => {
|
|
1426
|
+
e.sheet.open.value && l.value?.present();
|
|
1427
|
+
}), je(() => {
|
|
1575
1428
|
b && clearTimeout(b);
|
|
1576
1429
|
});
|
|
1577
|
-
async function
|
|
1578
|
-
await e.sheet.save() && (
|
|
1430
|
+
async function h() {
|
|
1431
|
+
await e.sheet.save() && (m.value = !0, a("saved"), b = setTimeout(() => e.sheet.dismiss(), Tt));
|
|
1579
1432
|
}
|
|
1580
|
-
const
|
|
1581
|
-
return (x, r) => (i(),
|
|
1433
|
+
const k = y(() => e.sheet.saving.value ? "processing" : m.value ? "done" : "idle");
|
|
1434
|
+
return (x, r) => (i(), q(Rt, {
|
|
1582
1435
|
ref_key: "modal",
|
|
1583
|
-
ref:
|
|
1436
|
+
ref: l,
|
|
1584
1437
|
size: e.size,
|
|
1585
1438
|
grouped: "",
|
|
1586
1439
|
title: e.title,
|
|
1587
1440
|
subtitle: e.subtitle,
|
|
1588
1441
|
"before-dismiss": e.sheet.beforeDismiss,
|
|
1589
|
-
"primary-label": e.editable ?
|
|
1590
|
-
status:
|
|
1591
|
-
"processing-label":
|
|
1592
|
-
"done-label":
|
|
1593
|
-
onPrimary:
|
|
1442
|
+
"primary-label": e.editable ? s(n)("core.actions.save") : void 0,
|
|
1443
|
+
status: k.value,
|
|
1444
|
+
"processing-label": s(n)("core.actions.saving"),
|
|
1445
|
+
"done-label": s(n)("core.actions.saved"),
|
|
1446
|
+
onPrimary: h,
|
|
1594
1447
|
onDismissed: r[0] || (r[0] = (u) => e.sheet.closed())
|
|
1595
1448
|
}, {
|
|
1596
|
-
default:
|
|
1449
|
+
default: C(() => [
|
|
1597
1450
|
p("div", {
|
|
1598
1451
|
ref_key: "body",
|
|
1599
1452
|
ref: d,
|
|
1600
1453
|
class: "flex min-w-0 flex-col gap-group-gap"
|
|
1601
1454
|
}, [
|
|
1602
|
-
e.sheet.notice.value ? (i(),
|
|
1455
|
+
e.sheet.notice.value ? (i(), q(We, {
|
|
1603
1456
|
key: 0,
|
|
1604
1457
|
tone: "warning",
|
|
1605
1458
|
"data-test": "group-sheet-notice"
|
|
1606
1459
|
}, {
|
|
1607
|
-
default:
|
|
1608
|
-
p("p",
|
|
1460
|
+
default: C(() => [
|
|
1461
|
+
p("p", nl, $(e.sheet.notice.value), 1)
|
|
1609
1462
|
]),
|
|
1610
1463
|
_: 1
|
|
1611
|
-
})) :
|
|
1612
|
-
e.sheet.foreignGroups.value.length ? (i(),
|
|
1464
|
+
})) : D("", !0),
|
|
1465
|
+
e.sheet.foreignGroups.value.length ? (i(), q(We, {
|
|
1613
1466
|
key: 1,
|
|
1614
1467
|
tone: "warning",
|
|
1615
1468
|
"data-test": "group-sheet-foreign"
|
|
1616
1469
|
}, {
|
|
1617
|
-
default:
|
|
1618
|
-
p("p",
|
|
1470
|
+
default: C(() => [
|
|
1471
|
+
p("p", rl, $(s(n)("core.form.group.foreign", { groups: e.sheet.foreignGroups.value.map(e.groupLabel).join(", ") })), 1)
|
|
1619
1472
|
]),
|
|
1620
1473
|
_: 1
|
|
1621
|
-
})) :
|
|
1622
|
-
|
|
1474
|
+
})) : D("", !0),
|
|
1475
|
+
M(Me, {
|
|
1623
1476
|
form: e.sheet.form,
|
|
1624
1477
|
label: e.fieldLabel,
|
|
1625
1478
|
scope: d.value
|
|
1626
1479
|
}, null, 8, ["form", "label", "scope"]),
|
|
1627
|
-
|
|
1480
|
+
le(x.$slots, "default")
|
|
1628
1481
|
], 512)
|
|
1629
1482
|
]),
|
|
1630
1483
|
_: 3
|
|
1631
1484
|
}, 8, ["size", "title", "subtitle", "before-dismiss", "primary-label", "status", "processing-label", "done-label"]));
|
|
1632
1485
|
}
|
|
1633
|
-
}),
|
|
1486
|
+
}), il = ["data-group"], So = /* @__PURE__ */ G({
|
|
1634
1487
|
__name: "RecordGroupScope",
|
|
1635
1488
|
props: {
|
|
1636
1489
|
only: {},
|
|
@@ -1638,82 +1491,82 @@ const Ta = ["id", "aria-labelledby"], ja = ["id", "value", "lang", "name", "rows
|
|
|
1638
1491
|
},
|
|
1639
1492
|
setup(o) {
|
|
1640
1493
|
const t = o;
|
|
1641
|
-
return
|
|
1494
|
+
return Ve(Vt, { only: st(t, "only") }), Ve(mt, y(() => t.editable)), (e, a) => (i(), g("div", {
|
|
1642
1495
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
1643
1496
|
"data-test": "record-group-scope",
|
|
1644
1497
|
"data-group": t.only
|
|
1645
1498
|
}, [
|
|
1646
|
-
|
|
1647
|
-
], 8,
|
|
1499
|
+
le(e.$slots, "default")
|
|
1500
|
+
], 8, il));
|
|
1648
1501
|
}
|
|
1649
1502
|
});
|
|
1650
|
-
function
|
|
1503
|
+
function Co(o) {
|
|
1651
1504
|
const { form: t } = o;
|
|
1652
1505
|
if (o.rebase && !t.rebase) throw new Error("useGroupSheet: `rebase` needs a record form (useResourceForm), which can take the freshly read record as its base.");
|
|
1653
|
-
const e = () => typeof o.fields == "function" ? o.fields() : o.fields, a = () =>
|
|
1654
|
-
let
|
|
1655
|
-
const
|
|
1506
|
+
const e = () => typeof o.fields == "function" ? o.fields() : o.fields, a = () => qe(o.restore) ?? e(), n = I(!1), l = I(!1), d = I([]), m = I(null), b = De({});
|
|
1507
|
+
let h = {};
|
|
1508
|
+
const k = (w) => Object.fromEntries(w.map((O) => [O, $e(t.values[O])])), x = y(() => n.value && !Ke(k(a()), b.value)), { confirmDiscard: r } = Re(() => x.value);
|
|
1656
1509
|
function u() {
|
|
1657
|
-
|
|
1510
|
+
h = k(a()), b.value = $e(h);
|
|
1658
1511
|
}
|
|
1659
1512
|
function v() {
|
|
1660
|
-
u(), d.value = [],
|
|
1513
|
+
u(), d.value = [], m.value = null, t.dismissFailure(), n.value = !0;
|
|
1661
1514
|
}
|
|
1662
|
-
function
|
|
1515
|
+
function F() {
|
|
1663
1516
|
if (n.value) {
|
|
1664
|
-
x.value && Object.assign(t.values, $e(
|
|
1665
|
-
for (const
|
|
1517
|
+
x.value && Object.assign(t.values, $e(h));
|
|
1518
|
+
for (const w of e()) t.errors.clear(w);
|
|
1666
1519
|
t.dismissFailure(), n.value = !1;
|
|
1667
1520
|
}
|
|
1668
1521
|
}
|
|
1669
|
-
function B(
|
|
1670
|
-
const
|
|
1671
|
-
for (const
|
|
1672
|
-
const
|
|
1673
|
-
if (
|
|
1674
|
-
const
|
|
1675
|
-
|
|
1522
|
+
function B(w) {
|
|
1523
|
+
const O = new Set(e()), T = qe(o.group), A = /* @__PURE__ */ new Set();
|
|
1524
|
+
for (const Z of Object.keys(w.all())) {
|
|
1525
|
+
const ee = Xe(Z);
|
|
1526
|
+
if (O.has(ee)) continue;
|
|
1527
|
+
const X = o.groupOf?.(ee) ?? o.fallbackGroup;
|
|
1528
|
+
X && X !== T && A.add(X);
|
|
1676
1529
|
}
|
|
1677
|
-
d.value = [...
|
|
1530
|
+
d.value = [...A];
|
|
1678
1531
|
}
|
|
1679
|
-
async function
|
|
1680
|
-
const
|
|
1532
|
+
async function _(w) {
|
|
1533
|
+
const O = $e(k(e().filter((T) => !Ke(t.values[T], b.value[T]))));
|
|
1681
1534
|
try {
|
|
1682
|
-
await
|
|
1535
|
+
await w.reload();
|
|
1683
1536
|
} catch {
|
|
1684
1537
|
return;
|
|
1685
1538
|
}
|
|
1686
|
-
t.rebase?.() && (u(), Object.assign(t.values,
|
|
1539
|
+
t.rebase?.() && (u(), Object.assign(t.values, O), m.value = w.message());
|
|
1687
1540
|
}
|
|
1688
1541
|
async function E() {
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1542
|
+
if (l.value) return !1;
|
|
1543
|
+
l.value = !0, d.value = [], m.value = null;
|
|
1691
1544
|
try {
|
|
1692
|
-
const
|
|
1693
|
-
let
|
|
1694
|
-
if (o.save)
|
|
1695
|
-
else if (t.save)
|
|
1545
|
+
const w = o.onSaved ? () => o.onSaved?.() : void 0;
|
|
1546
|
+
let O;
|
|
1547
|
+
if (o.save) O = await t.submitFields(e(), o.save, { refresh: w });
|
|
1548
|
+
else if (t.save) O = await t.save({ refresh: w });
|
|
1696
1549
|
else throw new Error("useGroupSheet: the form has no full-record save(), so give the sheet its own `save` for a dedicated endpoint.");
|
|
1697
|
-
switch (
|
|
1550
|
+
switch (O.status) {
|
|
1698
1551
|
case "saved":
|
|
1699
1552
|
return u(), !0;
|
|
1700
1553
|
case "saved-refresh-failed":
|
|
1701
|
-
return u(),
|
|
1554
|
+
return u(), Et.warning(t.failure.value?.message ?? ""), !0;
|
|
1702
1555
|
case "aborted":
|
|
1703
1556
|
return !1;
|
|
1704
1557
|
case "failed":
|
|
1705
|
-
return
|
|
1558
|
+
return O.failure.kind === "conflict" && o.rebase ? await _(o.rebase) : B(t.errors), !1;
|
|
1706
1559
|
}
|
|
1707
1560
|
} finally {
|
|
1708
|
-
|
|
1561
|
+
l.value = !1;
|
|
1709
1562
|
}
|
|
1710
1563
|
}
|
|
1711
1564
|
return {
|
|
1712
1565
|
open: n,
|
|
1713
|
-
saving:
|
|
1566
|
+
saving: l,
|
|
1714
1567
|
dirty: x,
|
|
1715
1568
|
foreignGroups: d,
|
|
1716
|
-
notice:
|
|
1569
|
+
notice: m,
|
|
1717
1570
|
failure: t.failure,
|
|
1718
1571
|
form: t,
|
|
1719
1572
|
present: v,
|
|
@@ -1722,56 +1575,56 @@ function Vo(o) {
|
|
|
1722
1575
|
},
|
|
1723
1576
|
save: E,
|
|
1724
1577
|
beforeDismiss: r,
|
|
1725
|
-
closed:
|
|
1578
|
+
closed: F
|
|
1726
1579
|
};
|
|
1727
1580
|
}
|
|
1728
|
-
const
|
|
1581
|
+
const ul = { hidden: "" }, dl = /* @__PURE__ */ G({
|
|
1729
1582
|
__name: "EditorChrome",
|
|
1730
1583
|
props: {
|
|
1731
1584
|
options: {}
|
|
1732
1585
|
},
|
|
1733
1586
|
setup(o) {
|
|
1734
|
-
return
|
|
1587
|
+
return Pt(o.options), (e, a) => (i(), g("span", ul));
|
|
1735
1588
|
}
|
|
1736
1589
|
});
|
|
1737
|
-
function
|
|
1738
|
-
const t =
|
|
1590
|
+
function cl(o) {
|
|
1591
|
+
const t = I(0);
|
|
1739
1592
|
let e = 0;
|
|
1740
1593
|
const a = () => {
|
|
1741
1594
|
e || (e = requestAnimationFrame(() => {
|
|
1742
1595
|
e = 0, t.value++;
|
|
1743
1596
|
}));
|
|
1744
1597
|
}, n = typeof MutationObserver > "u" ? null : new MutationObserver(a);
|
|
1745
|
-
|
|
1598
|
+
re(
|
|
1746
1599
|
() => o.sections.value,
|
|
1747
|
-
(
|
|
1600
|
+
(m) => {
|
|
1748
1601
|
n?.disconnect();
|
|
1749
|
-
for (const b of
|
|
1602
|
+
for (const b of m)
|
|
1750
1603
|
n?.observe(b.element, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["data-field-error", "data-field-required", "data-field-filled"] });
|
|
1751
1604
|
a();
|
|
1752
1605
|
},
|
|
1753
1606
|
{ immediate: !0 }
|
|
1754
|
-
),
|
|
1607
|
+
), nt() && rt(() => {
|
|
1755
1608
|
n?.disconnect(), e && cancelAnimationFrame(e);
|
|
1756
1609
|
});
|
|
1757
|
-
const
|
|
1758
|
-
o.sections.value.map((
|
|
1759
|
-
|
|
1610
|
+
const l = y(() => (t.value, Object.fromEntries(
|
|
1611
|
+
o.sections.value.map((m) => [
|
|
1612
|
+
m.id,
|
|
1760
1613
|
{
|
|
1761
|
-
errors:
|
|
1762
|
-
required: { total:
|
|
1614
|
+
errors: m.element.querySelectorAll("[data-field-error]").length,
|
|
1615
|
+
required: { total: m.element.querySelectorAll("[data-field-required]").length, filled: m.element.querySelectorAll("[data-field-required][data-field-filled]").length }
|
|
1763
1616
|
}
|
|
1764
1617
|
])
|
|
1765
|
-
))), d =
|
|
1766
|
-
return { states:
|
|
1618
|
+
))), d = y(() => Object.values(l.value).reduce((m, b) => ({ filled: m.filled + b.required.filled, total: m.total + b.required.total }), { filled: 0, total: 0 }));
|
|
1619
|
+
return { states: l, totals: d };
|
|
1767
1620
|
}
|
|
1768
|
-
const
|
|
1621
|
+
const fl = {
|
|
1769
1622
|
class: "grid min-w-0 grid-cols-1 items-start gap-8 lg:grid-cols-[12.5rem_minmax(0,1fr)]",
|
|
1770
1623
|
"data-test": "editor-page"
|
|
1771
|
-
},
|
|
1624
|
+
}, ml = {
|
|
1772
1625
|
key: 0,
|
|
1773
1626
|
class: "sticky top-[calc(var(--app-bar-height)+1.5rem+var(--shell-banner-h,0px))] hidden min-w-0 flex-col gap-4 self-start lg:flex"
|
|
1774
|
-
},
|
|
1627
|
+
}, Fo = /* @__PURE__ */ G({
|
|
1775
1628
|
__name: "EditorPage",
|
|
1776
1629
|
props: {
|
|
1777
1630
|
title: {},
|
|
@@ -1783,7 +1636,7 @@ const yl = {
|
|
|
1783
1636
|
},
|
|
1784
1637
|
emits: ["save", "cancel"],
|
|
1785
1638
|
setup(o, { emit: t }) {
|
|
1786
|
-
const e = o, a = t, { t: n } =
|
|
1639
|
+
const e = o, a = t, { t: n } = Q(), l = Ee(), d = Kt(), { states: m, totals: b } = cl(d), h = P("content"), k = y(
|
|
1787
1640
|
() => e.form ? {
|
|
1788
1641
|
form: e.form,
|
|
1789
1642
|
label: () => e.saveLabel ?? n("core.actions.save"),
|
|
@@ -1796,90 +1649,90 @@ const yl = {
|
|
|
1796
1649
|
}
|
|
1797
1650
|
} : null
|
|
1798
1651
|
);
|
|
1799
|
-
|
|
1652
|
+
re(
|
|
1800
1653
|
() => e.form?.failure.value,
|
|
1801
1654
|
async (r) => {
|
|
1802
|
-
r?.kind === "invalid" && (await
|
|
1655
|
+
r?.kind === "invalid" && (await ye(), await ze(h.value ?? document, d));
|
|
1803
1656
|
}
|
|
1804
1657
|
);
|
|
1805
1658
|
function x(r) {
|
|
1806
1659
|
const u = d.sections.value.find((v) => v.id === r)?.element;
|
|
1807
|
-
u &&
|
|
1660
|
+
u && ye(() => ze(u));
|
|
1808
1661
|
}
|
|
1809
|
-
return (r, u) => (i(),
|
|
1662
|
+
return (r, u) => (i(), q(It, {
|
|
1810
1663
|
title: e.title,
|
|
1811
1664
|
back: e.back,
|
|
1812
1665
|
width: "content"
|
|
1813
|
-
},
|
|
1814
|
-
default:
|
|
1815
|
-
|
|
1666
|
+
}, Ze({
|
|
1667
|
+
default: C(() => [
|
|
1668
|
+
k.value ? (i(), q(dl, {
|
|
1816
1669
|
key: 0,
|
|
1817
|
-
options:
|
|
1818
|
-
}, null, 8, ["options"])) :
|
|
1819
|
-
p("div",
|
|
1820
|
-
l
|
|
1821
|
-
|
|
1670
|
+
options: k.value
|
|
1671
|
+
}, null, 8, ["options"])) : D("", !0),
|
|
1672
|
+
p("div", fl, [
|
|
1673
|
+
s(l) ? D("", !0) : (i(), g("aside", ml, [
|
|
1674
|
+
M(Gt, {
|
|
1822
1675
|
standalone: "",
|
|
1823
|
-
states:
|
|
1824
|
-
progress:
|
|
1676
|
+
states: s(m),
|
|
1677
|
+
progress: s(b),
|
|
1825
1678
|
onSelect: x
|
|
1826
1679
|
}, null, 8, ["states", "progress"]),
|
|
1827
|
-
|
|
1680
|
+
le(r.$slots, "aside")
|
|
1828
1681
|
])),
|
|
1829
1682
|
p("div", {
|
|
1830
1683
|
ref_key: "content",
|
|
1831
|
-
ref:
|
|
1684
|
+
ref: h,
|
|
1832
1685
|
class: "flex min-w-0 flex-col gap-section-gap"
|
|
1833
1686
|
}, [
|
|
1834
|
-
e.form ? (i(),
|
|
1687
|
+
e.form ? (i(), q(Me, {
|
|
1835
1688
|
key: 0,
|
|
1836
1689
|
form: e.form,
|
|
1837
1690
|
label: e.fieldLabel,
|
|
1838
|
-
scope:
|
|
1839
|
-
}, null, 8, ["form", "label", "scope"])) :
|
|
1840
|
-
|
|
1691
|
+
scope: h.value
|
|
1692
|
+
}, null, 8, ["form", "label", "scope"])) : D("", !0),
|
|
1693
|
+
le(r.$slots, "default")
|
|
1841
1694
|
], 512)
|
|
1842
1695
|
]),
|
|
1843
|
-
l
|
|
1696
|
+
s(l) ? (i(), q(Nt, {
|
|
1844
1697
|
key: 1,
|
|
1845
|
-
states:
|
|
1846
|
-
}, null, 8, ["states"])) :
|
|
1698
|
+
states: s(m)
|
|
1699
|
+
}, null, 8, ["states"])) : D("", !0)
|
|
1847
1700
|
]),
|
|
1848
1701
|
_: 2
|
|
1849
1702
|
}, [
|
|
1850
1703
|
r.$slots.header ? {
|
|
1851
1704
|
name: "header",
|
|
1852
|
-
fn:
|
|
1853
|
-
|
|
1705
|
+
fn: C(() => [
|
|
1706
|
+
le(r.$slots, "header")
|
|
1854
1707
|
]),
|
|
1855
1708
|
key: "0"
|
|
1856
1709
|
} : void 0,
|
|
1857
1710
|
r.$slots.pager ? {
|
|
1858
1711
|
name: "pager",
|
|
1859
|
-
fn:
|
|
1860
|
-
|
|
1712
|
+
fn: C(() => [
|
|
1713
|
+
le(r.$slots, "pager")
|
|
1861
1714
|
]),
|
|
1862
1715
|
key: "1"
|
|
1863
1716
|
} : void 0,
|
|
1864
1717
|
r.$slots.notices ? {
|
|
1865
1718
|
name: "notices",
|
|
1866
|
-
fn:
|
|
1867
|
-
|
|
1719
|
+
fn: C(() => [
|
|
1720
|
+
le(r.$slots, "notices")
|
|
1868
1721
|
]),
|
|
1869
1722
|
key: "2"
|
|
1870
1723
|
} : void 0,
|
|
1871
1724
|
r.$slots.bottom ? {
|
|
1872
1725
|
name: "bottom",
|
|
1873
|
-
fn:
|
|
1874
|
-
|
|
1726
|
+
fn: C(() => [
|
|
1727
|
+
le(r.$slots, "bottom")
|
|
1875
1728
|
]),
|
|
1876
1729
|
key: "3"
|
|
1877
1730
|
} : void 0
|
|
1878
1731
|
]), 1032, ["title", "back"]));
|
|
1879
1732
|
}
|
|
1880
|
-
}),
|
|
1733
|
+
}), vl = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], Lo = /* @__PURE__ */ G({
|
|
1881
1734
|
__name: "NumberCell",
|
|
1882
|
-
props: /* @__PURE__ */
|
|
1735
|
+
props: /* @__PURE__ */ se({
|
|
1883
1736
|
label: {},
|
|
1884
1737
|
min: { default: 0 },
|
|
1885
1738
|
max: { default: 9999 },
|
|
@@ -1893,13 +1746,13 @@ const yl = {
|
|
|
1893
1746
|
}),
|
|
1894
1747
|
emits: ["update:modelValue"],
|
|
1895
1748
|
setup(o) {
|
|
1896
|
-
const t = o, e =
|
|
1897
|
-
function a(
|
|
1898
|
-
const d =
|
|
1749
|
+
const t = o, e = oe(o, "modelValue");
|
|
1750
|
+
function a(l) {
|
|
1751
|
+
const d = l.target.value.replace(/\D/g, "");
|
|
1899
1752
|
e.value = d === "" ? null : Math.min(t.max, Math.max(t.min, Number(d)));
|
|
1900
1753
|
}
|
|
1901
|
-
const n = (
|
|
1902
|
-
return (
|
|
1754
|
+
const n = (l) => l.target.value = e.value === null ? "" : String(e.value);
|
|
1755
|
+
return (l, d) => (i(), g("input", {
|
|
1903
1756
|
value: e.value ?? "",
|
|
1904
1757
|
type: "text",
|
|
1905
1758
|
inputmode: "numeric",
|
|
@@ -1908,22 +1761,22 @@ const yl = {
|
|
|
1908
1761
|
disabled: t.disabled,
|
|
1909
1762
|
"aria-invalid": t.invalid || void 0,
|
|
1910
1763
|
placeholder: t.placeholder,
|
|
1911
|
-
class:
|
|
1764
|
+
class: R(["rounded-control bg-fill px-2 py-1 text-right text-body tabular-nums text-content-strong transition-[background-color,box-shadow] duration-motion-fast ease-motion-standard placeholder:text-content-disabled focus:bg-surface-cell focus:outline-none focus:ring-[1.5px] focus:ring-inset focus:ring-border-focus disabled:opacity-45", [t.wide ? "w-28" : "w-16", t.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" : ""]]),
|
|
1912
1765
|
onInput: a,
|
|
1913
1766
|
onBlur: n
|
|
1914
|
-
}, null, 42,
|
|
1767
|
+
}, null, 42, vl));
|
|
1915
1768
|
}
|
|
1916
|
-
}),
|
|
1917
|
-
function
|
|
1769
|
+
}), Ge = "vue-core:step-draft:";
|
|
1770
|
+
function Ne(o) {
|
|
1918
1771
|
try {
|
|
1919
1772
|
return (o.storage === "local" ? window.localStorage : window.sessionStorage) ?? null;
|
|
1920
1773
|
} catch {
|
|
1921
1774
|
return null;
|
|
1922
1775
|
}
|
|
1923
1776
|
}
|
|
1924
|
-
function
|
|
1777
|
+
function pl(o) {
|
|
1925
1778
|
try {
|
|
1926
|
-
const t =
|
|
1779
|
+
const t = Ne(o)?.getItem(Ge + o.key);
|
|
1927
1780
|
if (!t) return null;
|
|
1928
1781
|
const e = JSON.parse(t);
|
|
1929
1782
|
return !e || e.version !== (o.version ?? 1) || typeof e.values != "object" || e.values === null || typeof e.step != "string" || !Array.isArray(e.passed) ? null : e;
|
|
@@ -1931,308 +1784,308 @@ function kl(o) {
|
|
|
1931
1784
|
return null;
|
|
1932
1785
|
}
|
|
1933
1786
|
}
|
|
1934
|
-
function
|
|
1787
|
+
function bl(o, t) {
|
|
1935
1788
|
try {
|
|
1936
|
-
const e =
|
|
1789
|
+
const e = Ne(o);
|
|
1937
1790
|
if (!e) return !1;
|
|
1938
|
-
const a = (n,
|
|
1939
|
-
return e.setItem(
|
|
1791
|
+
const a = (n, l) => typeof Blob < "u" && l instanceof Blob ? null : l;
|
|
1792
|
+
return e.setItem(Ge + o.key, JSON.stringify({ version: o.version ?? 1, ...t }, a)), !0;
|
|
1940
1793
|
} catch {
|
|
1941
1794
|
return !1;
|
|
1942
1795
|
}
|
|
1943
1796
|
}
|
|
1944
|
-
function
|
|
1797
|
+
function He(o) {
|
|
1945
1798
|
try {
|
|
1946
|
-
|
|
1799
|
+
Ne(o)?.removeItem(Ge + o.key);
|
|
1947
1800
|
} catch {
|
|
1948
1801
|
}
|
|
1949
1802
|
}
|
|
1950
|
-
function
|
|
1803
|
+
function gl(o, t) {
|
|
1951
1804
|
for (const [e, a] of Object.entries(o)) {
|
|
1952
1805
|
if (!(e in t)) continue;
|
|
1953
1806
|
const n = t[e];
|
|
1954
1807
|
(n === null || a === null || a === void 0 || typeof n == typeof a && Array.isArray(n) === Array.isArray(a)) && (o[e] = n);
|
|
1955
1808
|
}
|
|
1956
1809
|
}
|
|
1957
|
-
function
|
|
1958
|
-
const { t: e } =
|
|
1810
|
+
function Bo(o, t) {
|
|
1811
|
+
const { t: e } = Q(), a = y(() => qe(t.steps));
|
|
1959
1812
|
if (a.value.length === 0) throw new Error("useStepForm: a flow needs at least one step.");
|
|
1960
|
-
const n =
|
|
1813
|
+
const n = I(a.value[0].name), l = Pe(/* @__PURE__ */ new Set()), d = Pe(/* @__PURE__ */ new Set([a.value[0].name])), m = I(null), b = I(!1), h = I(0), k = I(!1), x = I(!1);
|
|
1961
1814
|
let r = !1, u = 0;
|
|
1962
|
-
const v =
|
|
1963
|
-
() => a.value.map((
|
|
1964
|
-
const
|
|
1815
|
+
const v = y(() => Math.max(0, a.value.findIndex((c) => c.name === n.value))), F = (c) => c.fields?.filter((V) => o.errors.has(V)).length ?? 0, B = y(
|
|
1816
|
+
() => a.value.map((c, V) => {
|
|
1817
|
+
const f = F(c), L = V === v.value;
|
|
1965
1818
|
return {
|
|
1966
|
-
name:
|
|
1967
|
-
label:
|
|
1968
|
-
position:
|
|
1969
|
-
state: L ? "current" :
|
|
1970
|
-
errors:
|
|
1971
|
-
reachable: !L && (d.has(
|
|
1819
|
+
name: c.name,
|
|
1820
|
+
label: c.label,
|
|
1821
|
+
position: V + 1,
|
|
1822
|
+
state: L ? "current" : l.has(c.name) && f === 0 ? "done" : "todo",
|
|
1823
|
+
errors: f,
|
|
1824
|
+
reachable: !L && (d.has(c.name) || V < v.value)
|
|
1972
1825
|
};
|
|
1973
1826
|
})
|
|
1974
|
-
),
|
|
1975
|
-
function
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1827
|
+
), _ = y(() => B.value[v.value]), E = y(() => B.value.length), w = y(() => v.value === 0), O = y(() => v.value === E.value - 1), T = y(() => b.value || o.submitting.value);
|
|
1828
|
+
function A(c) {
|
|
1829
|
+
const V = a.value[c];
|
|
1830
|
+
V && (m.value = c > v.value ? "forward" : "back", n.value = V.name, d.add(V.name), u = c, k.value = !1);
|
|
1978
1831
|
}
|
|
1979
|
-
|
|
1980
|
-
() => a.value.map((
|
|
1832
|
+
re(
|
|
1833
|
+
() => a.value.map((c) => c.name).join("\0"),
|
|
1981
1834
|
() => {
|
|
1982
|
-
const
|
|
1983
|
-
n.value = f
|
|
1984
|
-
|
|
1835
|
+
const c = a.value, V = c.findIndex((L) => L.name === n.value), f = V === -1 ? Math.min(u, c.length - 1) : V;
|
|
1836
|
+
n.value = c[f].name, u = f, c.forEach((L, z) => {
|
|
1837
|
+
z > f && (l.delete(L.name), d.delete(L.name));
|
|
1985
1838
|
}), d.add(n.value);
|
|
1986
|
-
for (const L of [
|
|
1839
|
+
for (const L of [l, d]) for (const z of [...L]) c.some((me) => me.name === z) || L.delete(z);
|
|
1987
1840
|
}
|
|
1988
1841
|
);
|
|
1989
|
-
function
|
|
1990
|
-
const
|
|
1991
|
-
if (!
|
|
1992
|
-
const
|
|
1993
|
-
return
|
|
1842
|
+
function Z(c) {
|
|
1843
|
+
const V = c.fields;
|
|
1844
|
+
if (!V?.length) return !0;
|
|
1845
|
+
const f = Object.entries(o.errors.all()).filter(([z]) => !V.includes(Xe(z))), L = o.check(c.fields);
|
|
1846
|
+
return f.length > 0 && o.errors.set({ ...Object.fromEntries(f), ...o.errors.all() }), L;
|
|
1994
1847
|
}
|
|
1995
|
-
async function
|
|
1996
|
-
if (!
|
|
1997
|
-
return
|
|
1998
|
-
if (!
|
|
1848
|
+
async function ee(c) {
|
|
1849
|
+
if (!Z(c))
|
|
1850
|
+
return h.value++, !1;
|
|
1851
|
+
if (!c.beforeNext) return !0;
|
|
1999
1852
|
b.value = !0;
|
|
2000
1853
|
try {
|
|
2001
|
-
if (await
|
|
1854
|
+
if (await c.beforeNext()) return !0;
|
|
2002
1855
|
} finally {
|
|
2003
1856
|
b.value = !1;
|
|
2004
1857
|
}
|
|
2005
|
-
return
|
|
1858
|
+
return h.value++, !1;
|
|
2006
1859
|
}
|
|
2007
|
-
async function
|
|
2008
|
-
const
|
|
2009
|
-
if (
|
|
2010
|
-
return r = !0,
|
|
2011
|
-
if (
|
|
2012
|
-
const
|
|
2013
|
-
|
|
1860
|
+
async function X() {
|
|
1861
|
+
const c = await o.submit(t.submit, t.submitOptions);
|
|
1862
|
+
if (c.status === "saved" || c.status === "saved-refresh-failed")
|
|
1863
|
+
return r = !0, ae(), t.onSaved?.(c.value), !0;
|
|
1864
|
+
if (c.status === "failed" && (h.value++, _.value.errors === 0)) {
|
|
1865
|
+
const V = B.value.findIndex((f) => f.errors > 0);
|
|
1866
|
+
V !== -1 && A(V);
|
|
2014
1867
|
}
|
|
2015
1868
|
return !1;
|
|
2016
1869
|
}
|
|
2017
|
-
async function
|
|
2018
|
-
if (
|
|
2019
|
-
const
|
|
2020
|
-
return await
|
|
1870
|
+
async function N() {
|
|
1871
|
+
if (T.value) return !1;
|
|
1872
|
+
const c = a.value[v.value];
|
|
1873
|
+
return await ee(c) ? (l.add(c.name), v.value < E.value - 1 ? (A(v.value + 1), !0) : X()) : !1;
|
|
2021
1874
|
}
|
|
2022
|
-
async function
|
|
2023
|
-
if (
|
|
2024
|
-
const
|
|
2025
|
-
if (
|
|
2026
|
-
if (
|
|
2027
|
-
return
|
|
2028
|
-
if (!d.has(
|
|
2029
|
-
for (; v.value <
|
|
2030
|
-
return v.value ===
|
|
1875
|
+
async function W(c) {
|
|
1876
|
+
if (T.value) return !1;
|
|
1877
|
+
const V = a.value.findIndex((f) => f.name === c);
|
|
1878
|
+
if (V === -1) return !1;
|
|
1879
|
+
if (V <= v.value)
|
|
1880
|
+
return V < v.value && A(V), !0;
|
|
1881
|
+
if (!d.has(c)) return !1;
|
|
1882
|
+
for (; v.value < V; ) if (!await N()) return !1;
|
|
1883
|
+
return v.value === V;
|
|
2031
1884
|
}
|
|
2032
|
-
const
|
|
2033
|
-
let
|
|
2034
|
-
function
|
|
2035
|
-
if (
|
|
1885
|
+
const U = t.draft;
|
|
1886
|
+
let K;
|
|
1887
|
+
function te() {
|
|
1888
|
+
if (K = void 0, !(!U || r)) {
|
|
2036
1889
|
if (!o.dirty.value) {
|
|
2037
|
-
|
|
1890
|
+
He(U), x.value = !1;
|
|
2038
1891
|
return;
|
|
2039
1892
|
}
|
|
2040
|
-
x.value =
|
|
1893
|
+
x.value = bl(U, { values: $e(o.values), step: n.value, passed: [...l] });
|
|
2041
1894
|
}
|
|
2042
1895
|
}
|
|
2043
|
-
function
|
|
2044
|
-
r = !0, clearTimeout(
|
|
1896
|
+
function ae() {
|
|
1897
|
+
r = !0, clearTimeout(K), K = void 0, x.value = !1, U && He(U);
|
|
2045
1898
|
}
|
|
2046
|
-
if (
|
|
2047
|
-
const
|
|
2048
|
-
if (
|
|
2049
|
-
|
|
2050
|
-
const
|
|
2051
|
-
|
|
2052
|
-
for (const
|
|
2053
|
-
for (const
|
|
2054
|
-
u = v.value,
|
|
1899
|
+
if (U) {
|
|
1900
|
+
const c = pl(U);
|
|
1901
|
+
if (c) {
|
|
1902
|
+
gl(o.values, c.values);
|
|
1903
|
+
const V = a.value.map((f) => f.name);
|
|
1904
|
+
V.includes(c.step) && (n.value = c.step);
|
|
1905
|
+
for (const f of c.passed) V.includes(f) && l.add(f);
|
|
1906
|
+
for (const f of [...l, n.value]) d.add(f);
|
|
1907
|
+
u = v.value, k.value = o.dirty.value, x.value = k.value;
|
|
2055
1908
|
}
|
|
2056
|
-
|
|
2057
|
-
[() => o.values, n, () => [...
|
|
1909
|
+
re(
|
|
1910
|
+
[() => o.values, n, () => [...l].join("\0")],
|
|
2058
1911
|
() => {
|
|
2059
|
-
r || (clearTimeout(
|
|
1912
|
+
r || (clearTimeout(K), K = setTimeout(te, 400));
|
|
2060
1913
|
},
|
|
2061
1914
|
{ deep: !0 }
|
|
2062
|
-
),
|
|
2063
|
-
|
|
1915
|
+
), je(() => {
|
|
1916
|
+
K !== void 0 && (clearTimeout(K), te());
|
|
2064
1917
|
});
|
|
2065
1918
|
}
|
|
2066
|
-
const { confirmDiscard:
|
|
2067
|
-
|
|
2068
|
-
async function
|
|
2069
|
-
const
|
|
2070
|
-
return
|
|
1919
|
+
const { confirmDiscard: he } = Re(() => !r && o.dirty.value);
|
|
1920
|
+
Qe(At, null) && Ut(() => (r || ae(), !0));
|
|
1921
|
+
async function ce() {
|
|
1922
|
+
const c = await he();
|
|
1923
|
+
return c && ae(), c;
|
|
2071
1924
|
}
|
|
2072
|
-
function
|
|
2073
|
-
o.reset(),
|
|
1925
|
+
function _e() {
|
|
1926
|
+
o.reset(), l.clear(), d.clear(), m.value = null, n.value = a.value[0].name, d.add(n.value), u = 0, k.value = !1, ae(), r = !1;
|
|
2074
1927
|
}
|
|
2075
|
-
const
|
|
2076
|
-
const
|
|
2077
|
-
return x.value &&
|
|
2078
|
-
}),
|
|
2079
|
-
const
|
|
2080
|
-
return
|
|
2081
|
-
}),
|
|
1928
|
+
const S = y(() => {
|
|
1929
|
+
const c = [e("core.steps.position", { current: v.value + 1, total: E.value }), _.value.label];
|
|
1930
|
+
return x.value && c.push(e("core.steps.draft_saved")), c.join(" · ");
|
|
1931
|
+
}), j = y(() => {
|
|
1932
|
+
const c = a.value[v.value];
|
|
1933
|
+
return c.nextLabel ? c.nextLabel : O.value ? t.submitLabel ?? e("core.actions.save") : e("core.steps.next_named", { step: a.value[v.value + 1].label });
|
|
1934
|
+
}), fe = y(() => w.value ? null : a.value[v.value - 1].label);
|
|
2082
1935
|
return {
|
|
2083
1936
|
steps: B,
|
|
2084
|
-
current:
|
|
1937
|
+
current: _,
|
|
2085
1938
|
index: v,
|
|
2086
1939
|
count: E,
|
|
2087
|
-
isFirst:
|
|
2088
|
-
isLast:
|
|
2089
|
-
busy:
|
|
2090
|
-
direction:
|
|
2091
|
-
subtitle:
|
|
2092
|
-
nextLabel:
|
|
2093
|
-
backLabel:
|
|
2094
|
-
restored:
|
|
2095
|
-
refusals:
|
|
1940
|
+
isFirst: w,
|
|
1941
|
+
isLast: O,
|
|
1942
|
+
busy: T,
|
|
1943
|
+
direction: m,
|
|
1944
|
+
subtitle: S,
|
|
1945
|
+
nextLabel: j,
|
|
1946
|
+
backLabel: fe,
|
|
1947
|
+
restored: k,
|
|
1948
|
+
refusals: h,
|
|
2096
1949
|
errors: o.errors,
|
|
2097
1950
|
failure: o.failure,
|
|
2098
|
-
next:
|
|
2099
|
-
back: () =>
|
|
2100
|
-
goTo:
|
|
2101
|
-
restart:
|
|
2102
|
-
confirmDiscard:
|
|
2103
|
-
bindDialog: () => ({ subtitle:
|
|
1951
|
+
next: N,
|
|
1952
|
+
back: () => A(v.value - 1),
|
|
1953
|
+
goTo: W,
|
|
1954
|
+
restart: _e,
|
|
1955
|
+
confirmDiscard: ce,
|
|
1956
|
+
bindDialog: () => ({ subtitle: S.value, primaryLabel: j.value, status: T.value ? "processing" : "idle", beforeDismiss: ce })
|
|
2104
1957
|
};
|
|
2105
1958
|
}
|
|
2106
|
-
const
|
|
1959
|
+
const hl = {
|
|
2107
1960
|
class: "flex flex-wrap items-center gap-2.5 border-t border-border-separator pt-3.5",
|
|
2108
1961
|
"data-test": "step-navigation"
|
|
2109
|
-
},
|
|
1962
|
+
}, yl = /* @__PURE__ */ G({
|
|
2110
1963
|
__name: "StepNavigation",
|
|
2111
1964
|
props: {
|
|
2112
1965
|
flow: {}
|
|
2113
1966
|
},
|
|
2114
1967
|
emits: ["cancel"],
|
|
2115
1968
|
setup(o) {
|
|
2116
|
-
const t = o, { t: e } =
|
|
2117
|
-
return (a, n) => (i(),
|
|
2118
|
-
t.flow.backLabel.value ? (i(),
|
|
1969
|
+
const t = o, { t: e } = Q();
|
|
1970
|
+
return (a, n) => (i(), g("div", hl, [
|
|
1971
|
+
t.flow.backLabel.value ? (i(), q(be, {
|
|
2119
1972
|
key: 0,
|
|
2120
1973
|
prominence: "plain",
|
|
2121
1974
|
icon: "arrowLeftSLine",
|
|
2122
1975
|
disabled: t.flow.busy.value,
|
|
2123
1976
|
"data-test": "step-back",
|
|
2124
|
-
onClick: n[0] || (n[0] = (
|
|
1977
|
+
onClick: n[0] || (n[0] = (l) => t.flow.back())
|
|
2125
1978
|
}, {
|
|
2126
|
-
default:
|
|
2127
|
-
|
|
1979
|
+
default: C(() => [
|
|
1980
|
+
Y($(t.flow.backLabel.value), 1)
|
|
2128
1981
|
]),
|
|
2129
1982
|
_: 1
|
|
2130
|
-
}, 8, ["disabled"])) :
|
|
1983
|
+
}, 8, ["disabled"])) : D("", !0),
|
|
2131
1984
|
n[3] || (n[3] = p("div", { class: "grow" }, null, -1)),
|
|
2132
|
-
|
|
1985
|
+
M(be, {
|
|
2133
1986
|
prominence: "plain",
|
|
2134
1987
|
"data-test": "step-cancel",
|
|
2135
|
-
onClick: n[1] || (n[1] = (
|
|
1988
|
+
onClick: n[1] || (n[1] = (l) => a.$emit("cancel"))
|
|
2136
1989
|
}, {
|
|
2137
|
-
default:
|
|
2138
|
-
|
|
1990
|
+
default: C(() => [
|
|
1991
|
+
Y($(s(e)("core.actions.cancel")), 1)
|
|
2139
1992
|
]),
|
|
2140
1993
|
_: 1
|
|
2141
1994
|
}),
|
|
2142
|
-
|
|
1995
|
+
M(be, {
|
|
2143
1996
|
prominence: "primary",
|
|
2144
1997
|
processing: t.flow.busy.value,
|
|
2145
1998
|
"data-test": "step-next",
|
|
2146
|
-
onClick: n[2] || (n[2] = (
|
|
1999
|
+
onClick: n[2] || (n[2] = (l) => t.flow.next())
|
|
2147
2000
|
}, {
|
|
2148
|
-
default:
|
|
2149
|
-
|
|
2001
|
+
default: C(() => [
|
|
2002
|
+
Y($(t.flow.nextLabel.value), 1)
|
|
2150
2003
|
]),
|
|
2151
2004
|
_: 1
|
|
2152
2005
|
}, 8, ["processing"])
|
|
2153
2006
|
]));
|
|
2154
2007
|
}
|
|
2155
|
-
}),
|
|
2008
|
+
}), xl = ["aria-label"], _l = ["aria-current"], kl = ["aria-label"], wl = {
|
|
2156
2009
|
key: 2,
|
|
2157
2010
|
class: "sr-only"
|
|
2158
|
-
},
|
|
2011
|
+
}, $l = {
|
|
2159
2012
|
key: 1,
|
|
2160
2013
|
"data-test": "step-dots",
|
|
2161
2014
|
class: "flex justify-center gap-1.5",
|
|
2162
2015
|
"aria-hidden": "true"
|
|
2163
|
-
},
|
|
2016
|
+
}, Sl = ["data-state"], Cl = /* @__PURE__ */ G({
|
|
2164
2017
|
__name: "StepProgress",
|
|
2165
2018
|
props: {
|
|
2166
2019
|
flow: {},
|
|
2167
2020
|
progress: { default: "bar" }
|
|
2168
2021
|
},
|
|
2169
2022
|
setup(o) {
|
|
2170
|
-
const t = o, { t: e } =
|
|
2171
|
-
return (a, n) => t.progress === "bar" ? (i(),
|
|
2023
|
+
const t = o, { t: e } = Q();
|
|
2024
|
+
return (a, n) => t.progress === "bar" ? (i(), g("ol", {
|
|
2172
2025
|
key: 0,
|
|
2173
|
-
"aria-label":
|
|
2026
|
+
"aria-label": s(e)("core.steps.label"),
|
|
2174
2027
|
"data-test": "step-bar",
|
|
2175
2028
|
class: "grid min-w-0 gap-2",
|
|
2176
|
-
style:
|
|
2029
|
+
style: it({ gridTemplateColumns: `repeat(${t.flow.count.value}, minmax(0, 1fr))` })
|
|
2177
2030
|
}, [
|
|
2178
|
-
(i(!0),
|
|
2179
|
-
key:
|
|
2031
|
+
(i(!0), g(ne, null, xe(t.flow.steps.value, (l) => (i(), g("li", {
|
|
2032
|
+
key: l.name,
|
|
2180
2033
|
class: "flex min-w-0",
|
|
2181
|
-
"aria-current":
|
|
2034
|
+
"aria-current": l.state === "current" ? "step" : void 0
|
|
2182
2035
|
}, [
|
|
2183
|
-
(i(),
|
|
2184
|
-
type:
|
|
2185
|
-
disabled:
|
|
2186
|
-
"data-test": `step-${
|
|
2187
|
-
"data-state":
|
|
2188
|
-
class:
|
|
2189
|
-
onClick: (d) =>
|
|
2036
|
+
(i(), q(ut(l.reachable ? "button" : "div"), {
|
|
2037
|
+
type: l.reachable ? "button" : void 0,
|
|
2038
|
+
disabled: l.reachable ? t.flow.busy.value : void 0,
|
|
2039
|
+
"data-test": `step-${l.name}`,
|
|
2040
|
+
"data-state": l.errors > 0 ? "error" : l.state,
|
|
2041
|
+
class: R(["group flex min-w-0 flex-1 flex-col gap-1.5 text-left", l.reachable ? "cursor-pointer rounded-control focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-default" : ""]),
|
|
2042
|
+
onClick: (d) => l.reachable ? t.flow.goTo(l.name) : void 0
|
|
2190
2043
|
}, {
|
|
2191
|
-
default:
|
|
2044
|
+
default: C(() => [
|
|
2192
2045
|
p("span", {
|
|
2193
|
-
class:
|
|
2046
|
+
class: R(["h-1 rounded-full transition-colors duration-motion-normal", l.errors > 0 ? "bg-status-danger-solid" : l.state === "current" ? "bg-tint" : l.state === "done" ? "bg-control-on" : "bg-fill-strong"]),
|
|
2194
2047
|
"aria-hidden": "true"
|
|
2195
2048
|
}, null, 2),
|
|
2196
2049
|
p("span", {
|
|
2197
|
-
class:
|
|
2050
|
+
class: R(["flex min-w-0 items-center gap-1.5 text-footnote", l.state === "current" ? "font-bold text-content-strong" : l.state === "done" ? "font-medium text-content-link" : "font-medium text-content-muted"])
|
|
2198
2051
|
}, [
|
|
2199
|
-
|
|
2052
|
+
l.state === "done" ? (i(), q(s(H), {
|
|
2200
2053
|
key: 0,
|
|
2201
2054
|
name: "checkCustom",
|
|
2202
2055
|
size: 12,
|
|
2203
2056
|
class: "shrink-0"
|
|
2204
|
-
})) :
|
|
2057
|
+
})) : D("", !0),
|
|
2205
2058
|
p("span", {
|
|
2206
|
-
class:
|
|
2207
|
-
},
|
|
2208
|
-
|
|
2059
|
+
class: R(["truncate", l.reachable ? "group-hover:text-content-link" : ""])
|
|
2060
|
+
}, $(l.position) + ". " + $(l.label), 3),
|
|
2061
|
+
l.errors > 0 ? (i(), g("span", {
|
|
2209
2062
|
key: 1,
|
|
2210
2063
|
"data-test": "step-errors",
|
|
2211
|
-
"aria-label":
|
|
2064
|
+
"aria-label": s(e)("core.form.sections.errors", { count: l.errors }),
|
|
2212
2065
|
class: "min-w-4.5 shrink-0 rounded-full bg-status-danger-solid px-1.5 text-center text-caption font-semibold text-white"
|
|
2213
|
-
},
|
|
2214
|
-
|
|
2066
|
+
}, $(l.errors), 9, kl)) : D("", !0),
|
|
2067
|
+
l.state === "done" ? (i(), g("span", wl, $(s(e)("core.steps.done")), 1)) : D("", !0)
|
|
2215
2068
|
], 2)
|
|
2216
2069
|
]),
|
|
2217
2070
|
_: 2
|
|
2218
2071
|
}, 1032, ["type", "disabled", "data-test", "data-state", "class", "onClick"]))
|
|
2219
|
-
], 8,
|
|
2220
|
-
], 12,
|
|
2221
|
-
(i(!0),
|
|
2222
|
-
key:
|
|
2223
|
-
class:
|
|
2224
|
-
"data-state":
|
|
2225
|
-
}, null, 10,
|
|
2072
|
+
], 8, _l))), 128))
|
|
2073
|
+
], 12, xl)) : (i(), g("div", $l, [
|
|
2074
|
+
(i(!0), g(ne, null, xe(t.flow.steps.value, (l) => (i(), g("span", {
|
|
2075
|
+
key: l.name,
|
|
2076
|
+
class: R(["h-1.5 rounded-full transition-all duration-motion-fast", [l.state === "current" ? "w-4.5" : "w-1.5", l.errors > 0 ? "bg-status-danger-solid" : l.state === "todo" && l.position > t.flow.index.value ? "bg-fill-strong" : "bg-tint"]]),
|
|
2077
|
+
"data-state": l.errors > 0 ? "error" : l.state
|
|
2078
|
+
}, null, 10, Sl))), 128))
|
|
2226
2079
|
]));
|
|
2227
2080
|
}
|
|
2228
|
-
}),
|
|
2081
|
+
}), Fl = ["data-step"], Ll = {
|
|
2229
2082
|
class: "sr-only",
|
|
2230
2083
|
"aria-live": "polite"
|
|
2231
|
-
},
|
|
2084
|
+
}, Bl = {
|
|
2232
2085
|
key: 1,
|
|
2233
2086
|
"data-test": "step-restored",
|
|
2234
2087
|
class: "flex items-center gap-2 text-footnote text-content-muted"
|
|
2235
|
-
},
|
|
2088
|
+
}, zo = /* @__PURE__ */ G({
|
|
2236
2089
|
__name: "StepForm",
|
|
2237
2090
|
props: {
|
|
2238
2091
|
flow: {},
|
|
@@ -2241,136 +2094,136 @@ const $l = {
|
|
|
2241
2094
|
},
|
|
2242
2095
|
emits: ["cancel"],
|
|
2243
2096
|
setup(o) {
|
|
2244
|
-
const t = o, { t: e } =
|
|
2245
|
-
return
|
|
2246
|
-
await
|
|
2247
|
-
}),
|
|
2248
|
-
await
|
|
2249
|
-
}), (n,
|
|
2097
|
+
const t = o, { t: e } = Q(), a = P("body");
|
|
2098
|
+
return re(() => t.flow.current.value.name, async () => {
|
|
2099
|
+
await ye(), a.value?.focus();
|
|
2100
|
+
}), re(() => t.flow.refusals.value, async () => {
|
|
2101
|
+
await ye(), a.value && await ze(a.value);
|
|
2102
|
+
}), (n, l) => (i(), g("div", {
|
|
2250
2103
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
2251
2104
|
"data-test": "step-form",
|
|
2252
2105
|
"data-step": t.flow.current.value.name
|
|
2253
2106
|
}, [
|
|
2254
|
-
t.progress !== "none" ? (i(),
|
|
2107
|
+
t.progress !== "none" ? (i(), q(Cl, {
|
|
2255
2108
|
key: 0,
|
|
2256
2109
|
flow: t.flow,
|
|
2257
2110
|
progress: t.progress
|
|
2258
|
-
}, null, 8, ["flow", "progress"])) :
|
|
2259
|
-
p("p",
|
|
2260
|
-
t.flow.restored.value ? (i(),
|
|
2261
|
-
p("span", null,
|
|
2262
|
-
|
|
2111
|
+
}, null, 8, ["flow", "progress"])) : D("", !0),
|
|
2112
|
+
p("p", Ll, $(t.flow.subtitle.value), 1),
|
|
2113
|
+
t.flow.restored.value ? (i(), g("div", Bl, [
|
|
2114
|
+
p("span", null, $(s(e)("core.steps.restored")), 1),
|
|
2115
|
+
M(be, {
|
|
2263
2116
|
prominence: "link",
|
|
2264
2117
|
size: "sm",
|
|
2265
|
-
onClick:
|
|
2118
|
+
onClick: l[0] || (l[0] = (d) => t.flow.restart())
|
|
2266
2119
|
}, {
|
|
2267
|
-
default:
|
|
2268
|
-
|
|
2120
|
+
default: C(() => [
|
|
2121
|
+
Y($(s(e)("core.steps.start_over")), 1)
|
|
2269
2122
|
]),
|
|
2270
2123
|
_: 1
|
|
2271
2124
|
})
|
|
2272
|
-
])) :
|
|
2273
|
-
(i(),
|
|
2125
|
+
])) : D("", !0),
|
|
2126
|
+
(i(), q(Me, {
|
|
2274
2127
|
key: t.flow.current.value.name,
|
|
2275
2128
|
form: t.flow
|
|
2276
2129
|
}, null, 8, ["form"])),
|
|
2277
|
-
(i(),
|
|
2130
|
+
(i(), g("form", {
|
|
2278
2131
|
key: t.flow.current.value.name,
|
|
2279
2132
|
ref_key: "body",
|
|
2280
2133
|
ref: a,
|
|
2281
2134
|
tabindex: "-1",
|
|
2282
2135
|
novalidate: "",
|
|
2283
2136
|
"data-test": "step-body",
|
|
2284
|
-
class:
|
|
2285
|
-
onSubmit:
|
|
2137
|
+
class: R(["flex min-w-0 flex-col gap-group-gap outline-none", t.flow.direction.value === "back" ? "animate-step-back" : t.flow.direction.value === "forward" ? "animate-step-in" : ""]),
|
|
2138
|
+
onSubmit: l[1] || (l[1] = pe((d) => t.flow.next(), ["prevent"]))
|
|
2286
2139
|
}, [
|
|
2287
|
-
|
|
2288
|
-
|
|
2140
|
+
le(n.$slots, t.flow.current.value.name),
|
|
2141
|
+
l[3] || (l[3] = p("button", {
|
|
2289
2142
|
type: "submit",
|
|
2290
2143
|
class: "sr-only",
|
|
2291
2144
|
tabindex: "-1",
|
|
2292
2145
|
"aria-hidden": "true"
|
|
2293
2146
|
}, null, -1))
|
|
2294
2147
|
], 34)),
|
|
2295
|
-
t.navigation === "inline" ? (i(),
|
|
2148
|
+
t.navigation === "inline" ? (i(), q(yl, {
|
|
2296
2149
|
key: 2,
|
|
2297
2150
|
flow: t.flow,
|
|
2298
|
-
onCancel:
|
|
2299
|
-
}, null, 8, ["flow"])) :
|
|
2300
|
-
], 8,
|
|
2151
|
+
onCancel: l[2] || (l[2] = (d) => n.$emit("cancel"))
|
|
2152
|
+
}, null, 8, ["flow"])) : D("", !0)
|
|
2153
|
+
], 8, Fl));
|
|
2301
2154
|
}
|
|
2302
2155
|
});
|
|
2303
2156
|
export {
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2157
|
+
_t as Calendar,
|
|
2158
|
+
co as CardSelectField,
|
|
2159
|
+
fo as CheckboxField,
|
|
2160
|
+
mo as ChoiceChips,
|
|
2161
|
+
vo as ComboField,
|
|
2162
|
+
jo as CommandDialog,
|
|
2163
|
+
es as DateField,
|
|
2164
|
+
po as DateTimeField,
|
|
2165
|
+
Fo as EditorPage,
|
|
2166
|
+
qo as ErrorBag,
|
|
2167
|
+
ge as Field,
|
|
2168
|
+
bo as FileField,
|
|
2169
|
+
Me as FormErrors,
|
|
2170
|
+
Dt as FormGroup,
|
|
2171
|
+
go as FormGroupButton,
|
|
2172
|
+
ho as FormIndent,
|
|
2173
|
+
dt as FormRow,
|
|
2174
|
+
us as FormView,
|
|
2175
|
+
os as GroupEditAction,
|
|
2176
|
+
$o as GroupSheet,
|
|
2177
|
+
yo as I18nField,
|
|
2178
|
+
Uo as LeaveGuardRoot,
|
|
2179
|
+
Io as MissingLeaveGuardRootError,
|
|
2180
|
+
xo as MoneyField,
|
|
2181
|
+
_o as MonthYearField,
|
|
2182
|
+
ko as MultiSelectField,
|
|
2183
|
+
Lo as NumberCell,
|
|
2184
|
+
Mt as NumberField,
|
|
2185
|
+
Ue as OptionList,
|
|
2186
|
+
gs as OtpInput,
|
|
2187
|
+
wo as PhotoField,
|
|
2188
|
+
So as RecordGroupScope,
|
|
2189
|
+
ys as SegmentedField,
|
|
2190
|
+
cs as SelectField,
|
|
2191
|
+
zo as StepForm,
|
|
2192
|
+
yl as StepNavigation,
|
|
2193
|
+
Cl as StepProgress,
|
|
2194
|
+
_s as SwitchField,
|
|
2195
|
+
Ho as TextField,
|
|
2196
|
+
ws as TextareaField,
|
|
2197
|
+
as as TimeField,
|
|
2198
|
+
lt as checkFile,
|
|
2199
|
+
ss as createFieldGroups,
|
|
2200
|
+
Go as createLeaveGuard,
|
|
2201
|
+
de as fieldDefaults,
|
|
2202
|
+
Ro as fieldKey,
|
|
2203
|
+
ue as fieldProps,
|
|
2351
2204
|
ze as focusFirstError,
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2205
|
+
mt as formEditableKey,
|
|
2206
|
+
Fe as formatBytes,
|
|
2207
|
+
vs as groupOptions,
|
|
2208
|
+
No as installLeaveGuard,
|
|
2209
|
+
Ko as leaveGuardKey,
|
|
2210
|
+
ps as matchOptions,
|
|
2211
|
+
Ba as missingLocales,
|
|
2212
|
+
ns as provideRecordGroups,
|
|
2213
|
+
Qo as recentChoicesKey,
|
|
2214
|
+
Vt as recordGroupsKey,
|
|
2215
|
+
To as useCommand,
|
|
2216
|
+
Yt as useDirtySnapshot,
|
|
2217
|
+
et as useFieldMode,
|
|
2218
|
+
Mo as useForm,
|
|
2219
|
+
Co as useGroupSheet,
|
|
2220
|
+
Re as useLeaveGuard,
|
|
2221
|
+
Po as useLeaveGuardContext,
|
|
2222
|
+
fs as useOptions,
|
|
2223
|
+
rs as useRecordGroups,
|
|
2224
|
+
Wo as useResourceForm,
|
|
2225
|
+
Pt as useSaveChrome,
|
|
2226
|
+
cl as useSectionStates,
|
|
2227
|
+
uo as useSheetDiscardGuard,
|
|
2228
|
+
Bo as useStepForm
|
|
2376
2229
|
};
|