@wssto2/vue-core 0.19.0 → 0.20.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/CHANGELOG.md +16 -0
- package/README.md +3 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js → AccessGate.vue_vue_type_script_setup_true_lang-Dw_pnsh9.js} +1 -1
- package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-rmH1XbU9.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js → ActionRow.vue_vue_type_script_setup_true_lang-_TDoIg53.js} +2 -2
- package/dist/{Activity-CiYn5E6A.js → Activity-BDVYmNgy.js} +9 -9
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-DryXyklZ.js} +6 -6
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-WuGvAOrj.js → AlertDialog.vue_vue_type_script_setup_true_lang-QYvbly_-.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CX8mpXRE.js → AsyncSection.vue_vue_type_script_setup_true_lang-DRP4BnMb.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js → Banner.vue_vue_type_script_setup_true_lang-ukLpznql.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js → Button.vue_vue_type_script_setup_true_lang-DkRuLqQK.js} +1 -1
- package/dist/{Changes-Cy8STpLX.js → Changes-DRij0rEQ.js} +5 -5
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js → CollectionPage.vue_vue_type_script_setup_true_lang-Aoof1prZ.js} +12 -12
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js → DataTable.vue_vue_type_script_setup_true_lang-DGcNcRkO.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js → DateField.vue_vue_type_script_setup_true_lang-J04KjxmR.js} +4 -4
- package/dist/{DeadLetters-DhJkMpd_.js → DeadLetters-Dpm4UY__.js} +4 -4
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-92szOrYd.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-CxNVKoYI.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js → EmptyState.vue_vue_type_script_setup_true_lang-ByKvrNSg.js} +1 -1
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js → FormGroup.vue_vue_type_script_setup_true_lang-7bIssY9f.js} +4 -4
- package/dist/{FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js → FormRow.vue_vue_type_script_setup_true_lang-okuxbKyI.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js → FormView.vue_vue_type_script_setup_true_lang-CiYprNRr.js} +2 -2
- package/dist/{General-CwTPC5UP.js → General-BmVEbYqv.js} +8 -8
- package/dist/{HeaderAction.vue_vue_type_script_setup_true_lang-Da59TLBh.js → HeaderAction.vue_vue_type_script_setup_true_lang-DVfkuOy-.js} +2 -2
- package/dist/{Icon.vue_vue_type_script_lang-BhhsFYwp.js → Icon.vue_vue_type_script_lang-0pW1XBaE.js} +35 -33
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js → IconTile.vue_vue_type_script_setup_true_lang-BWHQiA7d.js} +1 -1
- package/dist/{IncidentRecord-hXEGuLGg.js → IncidentRecord-DWY6Bws1.js} +17 -17
- package/dist/{IncidentsList-C41VyDwK.js → IncidentsList-C21UNIhT.js} +6 -6
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CrGrjrlO.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CpEd_Psg.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-Cqu4Ebsb.js → Menu.vue_vue_type_script_setup_true_lang-DobycRxf.js} +1 -1
- package/dist/{MenuButton.vue_vue_type_script_setup_true_lang-C-XRr5f2.js → MenuButton.vue_vue_type_script_setup_true_lang-qDKt6gX9.js} +1 -1
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js → Modal.vue_vue_type_script_setup_true_lang-C0tQAYQ4.js} +2 -2
- package/dist/{NewRolePage-BYYZJkK7.js → NewRolePage-K5zts3e_.js} +4 -4
- package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js → NoAccess.vue_vue_type_script_setup_true_lang-BYnTQCtW.js} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js → NumberField.vue_vue_type_script_setup_true_lang-CxgVJrdv.js} +2 -2
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js → Panel.vue_vue_type_script_setup_true_lang-DTCmFSwg.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js → PersonAccess.vue_vue_type_script_setup_true_lang-Kp9g93wE.js} +12 -12
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DmMg1T_V.js → PhotoViewer.vue_vue_type_script_setup_true_lang-D2-uQbSV.js} +1 -1
- package/dist/{ProfilePage-DGEsIycR.js → ProfilePage-C3mLBer6.js} +17 -17
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js → RecordHeader.vue_vue_type_script_setup_true_lang-Dz5Qw8II.js} +2 -2
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js → ResourcePage.vue_vue_type_script_setup_true_lang-R3eJKPq5.js} +4 -4
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js → RoleEditor.vue_vue_type_script_setup_true_lang-CGMpBpnK.js} +12 -12
- package/dist/{RolePage-C08ZUqw1.js → RolePage-C62_sGxx.js} +13 -13
- package/dist/{RolesPage-FOuY1VKg.js → RolesPage-CS8ryIQq.js} +9 -9
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CodyVezo.js → SectionList.vue_vue_type_script_setup_true_lang-C6eOVjpa.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DqDcFvS0.js} +6 -6
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js → SegmentedField.vue_vue_type_script_setup_true_lang-Du4YUcw9.js} +2 -2
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js → SelectField.vue_vue_type_script_setup_true_lang-BA5YMCXA.js} +6 -6
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-BoeV2_MN.js} +8 -8
- package/dist/{ServiceAccountRecord-kWwIQGZb.js → ServiceAccountRecord-BDkaaOte.js} +18 -18
- package/dist/{ServiceAccountsList-CKy9_YHP.js → ServiceAccountsList-KaZwNlK5.js} +10 -10
- package/dist/{Sessions-BDc8gdYH.js → Sessions-DhOpUlRc.js} +7 -7
- package/dist/{SettingsPage-t-8kmFVT.js → SettingsPage-DPzg7zwX.js} +18 -18
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-C1jpmLYN.js +163 -0
- package/dist/{SignIn-CqtkvtCZ.js → SignIn-4aUxE2LU.js} +8 -8
- package/dist/{SignInPage-DcdNKZIb.js → SignInPage-B80pQ8tG.js} +6 -6
- package/dist/{SignIns-D4-nGu0B.js → SignIns-CLX8Puf1.js} +5 -5
- package/dist/{StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js → StatusLine.vue_vue_type_script_setup_true_lang-BN8nG1CW.js} +1 -1
- package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-D8SiC0G7.js → SwipeActions.vue_vue_type_script_setup_true_lang-BBqcW3MR.js} +1 -1
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js → SwitchField.vue_vue_type_script_setup_true_lang-Dw7BbBU4.js} +2 -2
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-Cma_ma6V.js +169 -0
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js → TextField.vue_vue_type_script_setup_true_lang-DS6RPR-h.js} +4 -4
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js → TextareaField.vue_vue_type_script_setup_true_lang-BqpZt1Hv.js} +2 -2
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js → TimeField.vue_vue_type_script_setup_true_lang-BeS1cfqL.js} +4 -4
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js → Timestamp.vue_vue_type_script_setup_true_lang-XbbupD9A.js} +1 -1
- package/dist/{UserRecord-CwZCr9Im.js → UserRecord-BFqw2Pi8.js} +10 -10
- package/dist/{UsersList-Cn19sFgv.js → UsersList-C52C1lN1.js} +3 -3
- package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-BjdDXE3T.js → ViewTabs.vue_vue_type_script_setup_true_lang-CBYrLPL4.js} +1 -1
- package/dist/access/index.js +7 -7
- package/dist/app/index.js +2 -2
- package/dist/{application-CDSweJb9.js → application-cTqMhmFf.js} +8 -8
- package/dist/{back-LcLlFodC.js → back-CeozxCgQ.js} +2 -2
- package/dist/button/index.js +1 -1
- package/dist/collection/index.js +9 -9
- package/dist/content/DiffView.vue.d.ts +22 -0
- package/dist/content/PreviewFrame.vue.d.ts +46 -0
- package/dist/content/diff.d.ts +27 -0
- package/dist/content/index.d.ts +4 -0
- package/dist/content/index.js +552 -218
- package/dist/content/previewFrame.d.ts +50 -0
- package/dist/{contributions-B0x5x5xD.js → contributions-BSmIRPg1.js} +1 -1
- package/dist/controls/SortableList.vue.d.ts +31 -0
- package/dist/controls/Tabs.vue.d.ts +2 -0
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/index.js +132 -33
- package/dist/form/CodeEditor.vue.d.ts +61 -0
- package/dist/form/I18nField.vue.d.ts +1 -1
- package/dist/form/MarkerList.vue.d.ts +20 -0
- package/dist/form/TextareaField.vue.d.ts +1 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +1550 -1428
- package/dist/{guards-CNJ0ATVC.js → guards-BP9x7CLF.js} +1 -1
- package/dist/i18n/index.js +18 -18
- package/dist/icon/core.d.ts +2 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/index.js +3 -3
- package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
- package/dist/incidents/index.js +1 -1
- package/dist/{index-BA2w8uwD.js → index-CMx77x5P.js} +27 -27
- package/dist/{index-1HS7O2-e.js → index-CxUfs3Xz.js} +10 -10
- package/dist/{index-SLJWm40T.js → index-DLkQwWt9.js} +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/Sheet.vue.d.ts +13 -0
- package/dist/modal/TabbedSheet.vue.d.ts +46 -0
- package/dist/modal/index.d.ts +1 -0
- package/dist/modal/index.js +123 -41
- package/dist/navigation-C05vGEN8.js +55 -0
- package/dist/{neighbors-Dg_LU9ry.js → neighbors-BqfO6zf3.js} +2 -2
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/index.js +2 -2
- package/dist/{options-mOOX6JSS.js → options-DIp_lVAj.js} +2 -2
- package/dist/overlay/index.js +4 -4
- package/dist/page/SectionNavigator.vue.d.ts +1 -1
- package/dist/page/SplitPane.vue.d.ts +54 -0
- package/dist/page/WorkbenchPage.vue.d.ts +72 -0
- package/dist/page/index.d.ts +2 -0
- package/dist/page/index.js +343 -104
- package/dist/phone/index.js +3 -3
- package/dist/platform/index.js +3 -3
- package/dist/platform/navigation.d.ts +10 -0
- package/dist/{platform-DU9QFts8.js → platform-YWfOO7b2.js} +94 -88
- package/dist/pwa/index.js +3 -3
- package/dist/resource/index.js +1 -1
- package/dist/{resources-BZLlAtoS.js → resources-BAxfEEv1.js} +1 -1
- package/dist/router/index.js +4 -4
- package/dist/router/navigation.d.ts +2 -0
- package/dist/{rowLayout-PIuD7MGo.js → rowLayout-3W9TvFNt.js} +5 -5
- package/dist/{sectionIndex-BS0ic5W7.js → sectionIndex-CSr457Lb.js} +2 -2
- package/dist/{sections-BpiRLntE.js → sections-DXso1JSV.js} +2 -2
- package/dist/shell/NavigationList.vue.d.ts +1 -1
- package/dist/shell/index.js +522 -501
- package/dist/shell/navigationGroups.d.ts +4 -1
- package/dist/state/index.js +8 -8
- package/dist/{state-z1iPF1DT.js → state-DqCZdet7.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{suggestions-DeMgs_ki.js → suggestions-D0-qmRFy.js} +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/{useCommand-DQKvro1n.js → useCommand-D6K6o6dx.js} +4 -4
- package/dist/{useGroupSheet-CRw3MUmX.js → useGroupSheet-Daxi2mzi.js} +5 -5
- package/dist/{usePreferences-DB29UTFD.js → usePreferences-D38x73re.js} +1 -1
- package/dist/{useRecordDialog-0azHxxvm.js → useRecordDialog-CfBp0kuP.js} +1 -1
- package/dist/{useResourceForm-zVuWerSn.js → useResourceForm-Ddxk7mc0.js} +1 -1
- package/dist/{useTypedEntry-BsMV66Yc.js → useTypedEntry-r4AqWlV7.js} +2 -2
- package/package.json +1 -1
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-BG8HUNfs.js +0 -145
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js +0 -155
- package/dist/navigation-d-JAPBGA.js +0 -53
package/dist/form/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { b as
|
|
3
|
-
import { f as Oe } from "../useCommand-
|
|
4
|
-
import { _ as
|
|
5
|
-
import { ref as
|
|
1
|
+
import { a as qt, _ as ct, c as Ft, f as Lt, E as Tt } from "../FormGroup.vue_vue_type_script_setup_true_lang-7bIssY9f.js";
|
|
2
|
+
import { b as nr, d as rr, p as sr, r as ir, u as ur, e as dr, g as cr } from "../FormGroup.vue_vue_type_script_setup_true_lang-7bIssY9f.js";
|
|
3
|
+
import { f as Oe } from "../useCommand-D6K6o6dx.js";
|
|
4
|
+
import { _ as fr, a as pr, u as vr } from "../useCommand-D6K6o6dx.js";
|
|
5
|
+
import { ref as W, computed as L, defineComponent as J, openBlock as d, createBlock as R, mergeProps as P, unref as s, createSlots as de, withCtx as w, createElementVNode as $, normalizeClass as G, createElementBlock as g, Fragment as X, renderList as ce, createVNode as N, createCommentVNode as z, toDisplayString as F, renderSlot as E, mergeDefaults as me, useModel as ke, useId as Ae, withKeys as qe, withModifiers as he, createTextVNode as Q, mergeModels as ye, useTemplateRef as oe, shallowRef as Je, watch as re, normalizeProps as Ee, guardReactiveProps as Ne, nextTick as we, provide as mt, inject as ze, onBeforeUnmount as Fe, getCurrentScope as Mt, onScopeDispose as zt, toValue as Dt, shallowReactive as Ze, normalizeStyle as De, resolveDynamicComponent as Rt, onMounted as Ie, withDirectives as ft, vModelText as pt } from "vue";
|
|
6
6
|
import { a as vt } from "../leaveGuard-Cc8yeLxM.js";
|
|
7
|
-
import { M as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as be, u as Pe } from "../options-
|
|
12
|
-
import { g as
|
|
13
|
-
import { u as Se, f as
|
|
14
|
-
import { c as
|
|
15
|
-
import { useI18n as
|
|
7
|
+
import { M as yr, c as gr, i as hr, l as kr, u as _r } from "../leaveGuard-Cc8yeLxM.js";
|
|
8
|
+
import { _ as wr } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CpEd_Psg.js";
|
|
9
|
+
import { u as Vr } from "../useResourceForm-Ddxk7mc0.js";
|
|
10
|
+
import { _ as ie } from "../Icon.vue_vue_type_script_lang-0pW1XBaE.js";
|
|
11
|
+
import { _ as be, u as Pe } from "../options-DIp_lVAj.js";
|
|
12
|
+
import { g as Sr, m as Br } from "../options-DIp_lVAj.js";
|
|
13
|
+
import { u as Se, f as fe, b as pe, a as bt, _ as jt, e as Ot, g as Et } from "../FormRow.vue_vue_type_script_setup_true_lang-okuxbKyI.js";
|
|
14
|
+
import { c as Fr } from "../FormRow.vue_vue_type_script_setup_true_lang-okuxbKyI.js";
|
|
15
|
+
import { useI18n as te } from "vue-i18n";
|
|
16
16
|
import { b as Nt } from "../controlSurface-t7OEFESJ.js";
|
|
17
|
-
import { a as Ut, _ as
|
|
18
|
-
import { u as At, l as It } from "../suggestions-
|
|
19
|
-
import { r as
|
|
20
|
-
import { o as Ce, q as Pt, m as
|
|
21
|
-
import { u as ea, a as ta, s as aa, _ as oa } from "../DateField.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { a as Ut, _ as Qe } from "../TextField.vue_vue_type_script_setup_true_lang-DS6RPR-h.js";
|
|
18
|
+
import { u as At, l as It } from "../suggestions-D0-qmRFy.js";
|
|
19
|
+
import { r as Tr } from "../suggestions-D0-qmRFy.js";
|
|
20
|
+
import { o as Ce, q as Pt, m as Gt, s as Be, u as Xe, i as Ht, e as Le, k as Kt, _ as Wt, l as Yt, c as Jt, b as Zt, t as je, g as Qt, v as Xt } from "../useTypedEntry-r4AqWlV7.js";
|
|
21
|
+
import { u as ea, a as ta, s as aa, _ as oa } from "../DateField.vue_vue_type_script_setup_true_lang-J04KjxmR.js";
|
|
22
22
|
import { _ as yt } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
23
23
|
import { u as gt } from "../format-C_HXlOYQ.js";
|
|
24
|
-
import { u as
|
|
25
|
-
import { _ as
|
|
26
|
-
import { u as la } from "../TimeField.vue_vue_type_script_setup_true_lang-
|
|
27
|
-
import { _ as
|
|
28
|
-
import { _ as
|
|
29
|
-
import { _ as
|
|
24
|
+
import { u as Ge } from "../mediaQuery-CygcXmFW.js";
|
|
25
|
+
import { _ as He } from "../Popover.vue_vue_type_script_setup_true_lang-BK8HL_V0.js";
|
|
26
|
+
import { u as la } from "../TimeField.vue_vue_type_script_setup_true_lang-BeS1cfqL.js";
|
|
27
|
+
import { _ as zr } from "../TimeField.vue_vue_type_script_setup_true_lang-BeS1cfqL.js";
|
|
28
|
+
import { _ as le } from "../Button.vue_vue_type_script_setup_true_lang-DkRuLqQK.js";
|
|
29
|
+
import { _ as Rr } from "../FormView.vue_vue_type_script_setup_true_lang-CiYprNRr.js";
|
|
30
30
|
import { a as ht } from "../environment-Dva-SG8D.js";
|
|
31
|
-
import { _ as kt } from "../NumberField.vue_vue_type_script_setup_true_lang-
|
|
32
|
-
import { _ as
|
|
33
|
-
import { b as
|
|
34
|
-
import { u as
|
|
35
|
-
import { _ as
|
|
36
|
-
import { _ as tt } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-
|
|
37
|
-
import { _ as
|
|
38
|
-
import { _ as ia } from "../SwitchField.vue_vue_type_script_setup_true_lang-
|
|
39
|
-
import { _ as at } from "../TextareaField.vue_vue_type_script_setup_true_lang-
|
|
40
|
-
import { _ as ua } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-
|
|
41
|
-
import { _ as da, a as ca } from "../SectionList.vue_vue_type_script_setup_true_lang-
|
|
42
|
-
import { p as ma } from "../sectionIndex-
|
|
31
|
+
import { _ as kt } from "../NumberField.vue_vue_type_script_setup_true_lang-CxgVJrdv.js";
|
|
32
|
+
import { _ as na } from "../Sheet.vue_vue_type_script_setup_true_lang-C1jpmLYN.js";
|
|
33
|
+
import { b as ra, a as et, _ as sa } from "../SelectField.vue_vue_type_script_setup_true_lang-BA5YMCXA.js";
|
|
34
|
+
import { u as Or } from "../SelectField.vue_vue_type_script_setup_true_lang-BA5YMCXA.js";
|
|
35
|
+
import { _ as Nr, b as Ur, a as Ar, u as Ir } from "../useGroupSheet-Daxi2mzi.js";
|
|
36
|
+
import { _ as tt } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-D2-uQbSV.js";
|
|
37
|
+
import { _ as Gr } from "../SegmentedField.vue_vue_type_script_setup_true_lang-Du4YUcw9.js";
|
|
38
|
+
import { _ as ia } from "../SwitchField.vue_vue_type_script_setup_true_lang-Dw7BbBU4.js";
|
|
39
|
+
import { _ as at } from "../TextareaField.vue_vue_type_script_setup_true_lang-BqpZt1Hv.js";
|
|
40
|
+
import { _ as ua } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-DryXyklZ.js";
|
|
41
|
+
import { _ as da, a as ca } from "../SectionList.vue_vue_type_script_setup_true_lang-C6eOVjpa.js";
|
|
42
|
+
import { p as ma } from "../sectionIndex-CSr457Lb.js";
|
|
43
43
|
import { u as fa } from "../useSaveChrome-DB9OwIjT.js";
|
|
44
|
-
import { u as
|
|
44
|
+
import { u as Kr } from "../useRecordDialog-CfBp0kuP.js";
|
|
45
45
|
import { matchedRouteKey as pa, onBeforeRouteLeave as va } from "vue-router";
|
|
46
|
-
import { t as
|
|
46
|
+
import { t as Ke, c as _t, _ as xt } from "../resources-BAxfEEv1.js";
|
|
47
47
|
function ba(o) {
|
|
48
|
-
const a =
|
|
48
|
+
const a = W(null);
|
|
49
49
|
return {
|
|
50
|
-
isDirty:
|
|
50
|
+
isDirty: L(() => a.value !== null && JSON.stringify(o()) !== a.value),
|
|
51
51
|
markClean: () => a.value = JSON.stringify(o())
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const a =
|
|
54
|
+
function Rn(o) {
|
|
55
|
+
const a = W(!1), e = ba(o), { confirmDiscard: t } = vt(() => a.value && e.isDirty.value);
|
|
56
56
|
return {
|
|
57
57
|
/** The sheet was just filled: its current values are the baseline. */
|
|
58
58
|
opened: () => {
|
|
@@ -71,8 +71,8 @@ const ot = (o, a) => {
|
|
|
71
71
|
const t = Number.isInteger(e) ? 0 : 2;
|
|
72
72
|
return o.number(e, { minimumFractionDigits: t, maximumFractionDigits: t });
|
|
73
73
|
};
|
|
74
|
-
function
|
|
75
|
-
const { t: e, te: t } = o.global,
|
|
74
|
+
function jn({ i18n: o, format: a }) {
|
|
75
|
+
const { t: e, te: t } = o.global, l = (u) => `validation_errors.${u}`, i = (u) => `core.validation_errors.${u}`, p = (u, c) => ({ message: e(t(l(u)) ? l(u) : i(u), c) });
|
|
76
76
|
return (u) => {
|
|
77
77
|
switch (u.code) {
|
|
78
78
|
case "invalid_type":
|
|
@@ -84,11 +84,11 @@ function Fr({ i18n: o, format: a }) {
|
|
|
84
84
|
case "invalid_format":
|
|
85
85
|
return u.format !== void 0 && ["email", "url", "date", "datetime"].includes(u.format) ? p(u.format) : void 0;
|
|
86
86
|
case "custom": {
|
|
87
|
-
const
|
|
88
|
-
if (typeof
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
91
|
-
return
|
|
87
|
+
const c = u.params?.code;
|
|
88
|
+
if (typeof c != "string") return;
|
|
89
|
+
if (c === "required") return p("required");
|
|
90
|
+
const b = t(l(c)) ? l(c) : t(i(c)) ? i(c) : null;
|
|
91
|
+
return b === null ? void 0 : { message: e(b) };
|
|
92
92
|
}
|
|
93
93
|
default:
|
|
94
94
|
return;
|
|
@@ -102,9 +102,9 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
102
102
|
key: 1,
|
|
103
103
|
class: "flex size-5 shrink-0 items-center justify-center rounded-full bg-control-on text-white",
|
|
104
104
|
"aria-hidden": "true"
|
|
105
|
-
},
|
|
105
|
+
}, On = /* @__PURE__ */ J({
|
|
106
106
|
__name: "CardSelectField",
|
|
107
|
-
props: /* @__PURE__ */
|
|
107
|
+
props: /* @__PURE__ */ me({
|
|
108
108
|
label: {},
|
|
109
109
|
labelHidden: { type: Boolean },
|
|
110
110
|
hint: {},
|
|
@@ -118,52 +118,52 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
118
118
|
modelValue: {},
|
|
119
119
|
options: {},
|
|
120
120
|
columns: {}
|
|
121
|
-
}, { ...
|
|
121
|
+
}, { ...pe, modelValue: null, columns: 2 }),
|
|
122
122
|
emits: ["update:modelValue"],
|
|
123
123
|
setup(o, { emit: a }) {
|
|
124
|
-
const e = o, t = a, { editable:
|
|
125
|
-
return (u,
|
|
126
|
-
value: e.options.find((
|
|
124
|
+
const e = o, t = a, { editable: l } = Se(e), i = { 1: "grid-cols-1", 2: "grid-cols-2", 3: "grid-cols-3", 4: "grid-cols-4" }, p = L(() => i[e.columns]);
|
|
125
|
+
return (u, c) => (d(), R(be, P(s(fe)(e), {
|
|
126
|
+
value: e.options.find((b) => b.value === e.modelValue)?.label ?? null,
|
|
127
127
|
"row-layout": "stacked"
|
|
128
|
-
}),
|
|
129
|
-
default:
|
|
130
|
-
|
|
131
|
-
id:
|
|
128
|
+
}), de({
|
|
129
|
+
default: w(({ id: b, describedby: k, invalid: _ }) => [
|
|
130
|
+
$("div", {
|
|
131
|
+
id: b,
|
|
132
132
|
role: "radiogroup",
|
|
133
133
|
"aria-label": e.label,
|
|
134
|
-
"aria-describedby":
|
|
135
|
-
"aria-invalid":
|
|
136
|
-
class:
|
|
134
|
+
"aria-describedby": k,
|
|
135
|
+
"aria-invalid": _ || void 0,
|
|
136
|
+
class: G(["grid w-full gap-2.5", p.value]),
|
|
137
137
|
"data-test": "card-select"
|
|
138
138
|
}, [
|
|
139
|
-
(d(!0), g(
|
|
140
|
-
key:
|
|
141
|
-
class:
|
|
139
|
+
(d(!0), g(X, null, ce(e.options, (n) => (d(), g("label", {
|
|
140
|
+
key: n.value,
|
|
141
|
+
class: G(["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", [n.value === e.modelValue ? "bg-tint-soft ring-[1.5px] ring-inset ring-border-selected" : "hover:bg-fill-strong", e.disabled || !s(l) || n.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]])
|
|
142
142
|
}, [
|
|
143
|
-
|
|
143
|
+
$("input", {
|
|
144
144
|
type: "radio",
|
|
145
145
|
class: "sr-only",
|
|
146
|
-
name: e.name ??
|
|
147
|
-
value:
|
|
148
|
-
checked:
|
|
149
|
-
disabled: e.disabled || !s(
|
|
150
|
-
onChange: (m) => t("update:modelValue",
|
|
146
|
+
name: e.name ?? b,
|
|
147
|
+
value: n.value,
|
|
148
|
+
checked: n.value === e.modelValue,
|
|
149
|
+
disabled: e.disabled || !s(l) || n.disabled,
|
|
150
|
+
onChange: (m) => t("update:modelValue", n.value)
|
|
151
151
|
}, null, 40, ga),
|
|
152
|
-
|
|
152
|
+
n.icon ? (d(), g("span", {
|
|
153
153
|
key: 0,
|
|
154
|
-
class:
|
|
154
|
+
class: G(["flex size-9 shrink-0 items-center justify-center rounded-control", n.value === e.modelValue ? "bg-control-on text-white" : "bg-fill-strong text-content-muted"])
|
|
155
155
|
}, [
|
|
156
|
-
N(s(
|
|
157
|
-
name:
|
|
156
|
+
N(s(ie), {
|
|
157
|
+
name: n.icon,
|
|
158
158
|
size: 18
|
|
159
159
|
}, null, 8, ["name"])
|
|
160
160
|
], 2)) : z("", !0),
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
$("span", ha, [
|
|
162
|
+
$("span", ka, F(n.label), 1),
|
|
163
|
+
n.description ? (d(), g("span", _a, F(n.description), 1)) : z("", !0)
|
|
164
164
|
]),
|
|
165
|
-
|
|
166
|
-
N(s(
|
|
165
|
+
n.value === e.modelValue ? (d(), g("span", xa, [
|
|
166
|
+
N(s(ie), {
|
|
167
167
|
name: "checkCustom",
|
|
168
168
|
size: 12
|
|
169
169
|
})
|
|
@@ -175,22 +175,22 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
175
175
|
}, [
|
|
176
176
|
u.$slots.trailing ? {
|
|
177
177
|
name: "trailing",
|
|
178
|
-
fn:
|
|
179
|
-
|
|
178
|
+
fn: w(() => [
|
|
179
|
+
E(u.$slots, "trailing")
|
|
180
180
|
]),
|
|
181
181
|
key: "0"
|
|
182
182
|
} : void 0,
|
|
183
183
|
u.$slots.labelTrailing ? {
|
|
184
184
|
name: "labelTrailing",
|
|
185
|
-
fn:
|
|
186
|
-
|
|
185
|
+
fn: w(() => [
|
|
186
|
+
E(u.$slots, "labelTrailing")
|
|
187
187
|
]),
|
|
188
188
|
key: "1"
|
|
189
189
|
} : void 0,
|
|
190
190
|
u.$slots.readonly ? {
|
|
191
191
|
name: "readonly",
|
|
192
|
-
fn:
|
|
193
|
-
|
|
192
|
+
fn: w(() => [
|
|
193
|
+
E(u.$slots, "readonly")
|
|
194
194
|
]),
|
|
195
195
|
key: "2"
|
|
196
196
|
} : void 0
|
|
@@ -199,7 +199,7 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
199
199
|
}), wa = ["data-field-error"], $a = ["aria-checked", "aria-disabled", "aria-describedby", "aria-invalid", "tabindex", "onKeydown"], Va = { class: "flex min-w-0 flex-1 flex-col items-start" }, Ca = {
|
|
200
200
|
key: 0,
|
|
201
201
|
class: "flex shrink-0 items-center gap-2.5"
|
|
202
|
-
}, Sa = ["id"],
|
|
202
|
+
}, Sa = ["id"], En = /* @__PURE__ */ J({
|
|
203
203
|
__name: "CheckboxField",
|
|
204
204
|
props: /* @__PURE__ */ ye({
|
|
205
205
|
label: {},
|
|
@@ -213,77 +213,77 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
213
213
|
}),
|
|
214
214
|
emits: ["update:modelValue"],
|
|
215
215
|
setup(o) {
|
|
216
|
-
const a = o, e = ke(o, "modelValue"), t = !!bt(),
|
|
216
|
+
const a = o, e = ke(o, "modelValue"), t = !!bt(), l = Ae(), i = () => {
|
|
217
217
|
a.disabled || (e.value = !e.value);
|
|
218
218
|
};
|
|
219
219
|
return (p, u) => (d(), g("div", {
|
|
220
220
|
class: "group/check",
|
|
221
221
|
"data-field-error": a.error ? "true" : void 0
|
|
222
222
|
}, [
|
|
223
|
-
|
|
223
|
+
$("div", {
|
|
224
224
|
role: "checkbox",
|
|
225
225
|
"aria-checked": e.value,
|
|
226
226
|
"aria-disabled": a.disabled || void 0,
|
|
227
|
-
"aria-describedby": a.error ? `${s(
|
|
227
|
+
"aria-describedby": a.error ? `${s(l)}-error` : void 0,
|
|
228
228
|
"aria-invalid": a.error ? !0 : void 0,
|
|
229
229
|
tabindex: a.disabled ? -1 : 0,
|
|
230
230
|
"data-test": "checkbox",
|
|
231
|
-
class:
|
|
231
|
+
class: G(["flex items-center transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus", [a.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", t && a.variant === "row" ? "group-first/check:rounded-t-group group-last/check:rounded-b-group" : "", a.disabled ? "cursor-not-allowed" : a.variant === "row" ? "cursor-pointer hover:bg-fill/60 active:bg-fill" : "cursor-pointer hover:bg-fill"]]),
|
|
232
232
|
onClick: i,
|
|
233
233
|
onKeydown: [
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
qe(he(i, ["prevent"]), ["space"]),
|
|
235
|
+
qe(he(i, ["prevent"]), ["enter"])
|
|
236
236
|
]
|
|
237
237
|
}, [
|
|
238
|
-
|
|
239
|
-
class:
|
|
238
|
+
$("span", {
|
|
239
|
+
class: G(["flex shrink-0 items-center justify-center rounded-full border-2", [a.variant === "row" ? "size-5.5" : "size-5", e.value ? a.disabled ? "border-content-disabled bg-content-disabled text-white" : "border-control-on bg-control-on text-white" : "border-border-control"]]),
|
|
240
240
|
"aria-hidden": "true"
|
|
241
241
|
}, [
|
|
242
|
-
e.value ? (d(), R(s(
|
|
242
|
+
e.value ? (d(), R(s(ie), {
|
|
243
243
|
key: 0,
|
|
244
244
|
name: "checkCustom",
|
|
245
245
|
size: 12
|
|
246
246
|
})) : z("", !0)
|
|
247
247
|
], 2),
|
|
248
|
-
|
|
249
|
-
class:
|
|
248
|
+
$("div", {
|
|
249
|
+
class: G(["flex min-w-0 flex-1 items-center gap-3", a.variant === "row" ? "min-h-row border-t border-border-separator py-2 pr-row-inset group-first/check:border-t-0" : ""])
|
|
250
250
|
}, [
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
class:
|
|
254
|
-
},
|
|
251
|
+
$("div", Va, [
|
|
252
|
+
$("p", {
|
|
253
|
+
class: G(["w-full text-body", [a.variant === "row" ? "break-words" : "truncate", a.disabled ? "text-content-muted" : e.value ? "text-content-strong" : "text-content"]])
|
|
254
|
+
}, F(a.label), 3),
|
|
255
255
|
a.description ? (d(), g("p", {
|
|
256
256
|
key: 0,
|
|
257
|
-
class:
|
|
258
|
-
},
|
|
259
|
-
|
|
257
|
+
class: G(["tabular-nums text-content-muted", a.variant === "row" ? "text-footnote" : "text-xs"])
|
|
258
|
+
}, F(a.description), 3)) : z("", !0),
|
|
259
|
+
E(p.$slots, "default")
|
|
260
260
|
]),
|
|
261
261
|
p.$slots.trailing ? (d(), g("div", Ca, [
|
|
262
|
-
|
|
262
|
+
E(p.$slots, "trailing")
|
|
263
263
|
])) : z("", !0)
|
|
264
264
|
], 2)
|
|
265
265
|
], 42, $a),
|
|
266
266
|
a.error ? (d(), g("p", {
|
|
267
267
|
key: 0,
|
|
268
|
-
id: `${s(
|
|
268
|
+
id: `${s(l)}-error`,
|
|
269
269
|
role: "alert",
|
|
270
270
|
class: "flex items-start gap-1.5 px-2 pt-1 text-footnote text-content-destructive"
|
|
271
271
|
}, [
|
|
272
|
-
N(s(
|
|
272
|
+
N(s(ie), {
|
|
273
273
|
name: "alertTriangle",
|
|
274
274
|
size: 14,
|
|
275
275
|
class: "mt-px shrink-0"
|
|
276
276
|
}),
|
|
277
|
-
|
|
277
|
+
Q(" " + F(a.error), 1)
|
|
278
278
|
], 8, Sa)) : z("", !0)
|
|
279
279
|
], 8, wa));
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), Ba = {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "text-body text-content-muted"
|
|
284
|
-
},
|
|
284
|
+
}, qa = ["id", "aria-label", "aria-describedby", "aria-invalid"], Fa = ["aria-pressed", "disabled", "onClick"], Nn = /* @__PURE__ */ J({
|
|
285
285
|
__name: "ChoiceChips",
|
|
286
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
286
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
287
287
|
label: {},
|
|
288
288
|
labelHidden: { type: Boolean },
|
|
289
289
|
hint: {},
|
|
@@ -295,65 +295,65 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
295
295
|
presentation: {},
|
|
296
296
|
name: {},
|
|
297
297
|
options: {}
|
|
298
|
-
}, { ...
|
|
298
|
+
}, { ...pe }), {
|
|
299
299
|
modelValue: { default: () => [] },
|
|
300
300
|
modelModifiers: {}
|
|
301
301
|
}),
|
|
302
302
|
emits: ["update:modelValue"],
|
|
303
303
|
setup(o) {
|
|
304
|
-
const a = o, e = ke(o, "modelValue"), t = (
|
|
305
|
-
return (
|
|
304
|
+
const a = o, e = ke(o, "modelValue"), t = (l) => e.value = e.value.includes(l) ? e.value.filter((i) => i !== l) : [...e.value, l];
|
|
305
|
+
return (l, i) => (d(), R(be, P(s(fe)(a), {
|
|
306
306
|
value: a.options.filter((p) => e.value.includes(p.value)).map((p) => p.label).join(", ") || null,
|
|
307
307
|
"row-layout": "stacked"
|
|
308
|
-
}),
|
|
309
|
-
default:
|
|
310
|
-
a.options.length === 0 ? (d(), g("span",
|
|
308
|
+
}), de({
|
|
309
|
+
default: w(({ id: p, describedby: u, invalid: c }) => [
|
|
310
|
+
a.options.length === 0 ? (d(), g("span", Ba, "—")) : (d(), g("div", {
|
|
311
311
|
key: 1,
|
|
312
312
|
id: p,
|
|
313
313
|
role: "group",
|
|
314
314
|
"aria-label": a.label,
|
|
315
315
|
"aria-describedby": u,
|
|
316
|
-
"aria-invalid":
|
|
316
|
+
"aria-invalid": c || void 0,
|
|
317
317
|
class: "flex flex-wrap gap-1.5 py-1",
|
|
318
318
|
"data-test": "choice-chips"
|
|
319
319
|
}, [
|
|
320
|
-
(d(!0), g(
|
|
321
|
-
key:
|
|
320
|
+
(d(!0), g(X, null, ce(a.options, (b) => (d(), g("button", {
|
|
321
|
+
key: b.value,
|
|
322
322
|
type: "button",
|
|
323
|
-
"aria-pressed": e.value.includes(
|
|
324
|
-
disabled: a.disabled ||
|
|
325
|
-
class:
|
|
326
|
-
onClick: (
|
|
323
|
+
"aria-pressed": e.value.includes(b.value),
|
|
324
|
+
disabled: a.disabled || b.disabled,
|
|
325
|
+
class: G(["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(b.value) ? "bg-tint-soft font-semibold text-content-link" : "bg-fill font-medium text-content-strong hover:bg-fill-strong"]),
|
|
326
|
+
onClick: (k) => t(b.value)
|
|
327
327
|
}, [
|
|
328
|
-
e.value.includes(
|
|
328
|
+
e.value.includes(b.value) ? (d(), R(s(ie), {
|
|
329
329
|
key: 0,
|
|
330
330
|
name: "checkCustom",
|
|
331
331
|
size: 12
|
|
332
332
|
})) : z("", !0),
|
|
333
|
-
|
|
334
|
-
], 10,
|
|
335
|
-
], 8,
|
|
333
|
+
Q(" " + F(b.label), 1)
|
|
334
|
+
], 10, Fa))), 128))
|
|
335
|
+
], 8, qa))
|
|
336
336
|
]),
|
|
337
337
|
_: 2
|
|
338
338
|
}, [
|
|
339
|
-
|
|
339
|
+
l.$slots.trailing ? {
|
|
340
340
|
name: "trailing",
|
|
341
|
-
fn:
|
|
342
|
-
|
|
341
|
+
fn: w(() => [
|
|
342
|
+
E(l.$slots, "trailing")
|
|
343
343
|
]),
|
|
344
344
|
key: "0"
|
|
345
345
|
} : void 0,
|
|
346
|
-
|
|
346
|
+
l.$slots.labelTrailing ? {
|
|
347
347
|
name: "labelTrailing",
|
|
348
|
-
fn:
|
|
349
|
-
|
|
348
|
+
fn: w(() => [
|
|
349
|
+
E(l.$slots, "labelTrailing")
|
|
350
350
|
]),
|
|
351
351
|
key: "1"
|
|
352
352
|
} : void 0,
|
|
353
|
-
|
|
353
|
+
l.$slots.readonly ? {
|
|
354
354
|
name: "readonly",
|
|
355
|
-
fn:
|
|
356
|
-
|
|
355
|
+
fn: w(() => [
|
|
356
|
+
E(l.$slots, "readonly")
|
|
357
357
|
]),
|
|
358
358
|
key: "2"
|
|
359
359
|
} : void 0
|
|
@@ -363,9 +363,9 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
363
363
|
key: 0,
|
|
364
364
|
class: "flex shrink-0 items-center",
|
|
365
365
|
"data-test": "field-value"
|
|
366
|
-
}, Ta = ["id", "value", "name", "placeholder", "disabled", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-required", "aria-invalid", "aria-describedby"],
|
|
366
|
+
}, Ta = ["id", "value", "name", "placeholder", "disabled", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-required", "aria-invalid", "aria-describedby"], Ma = { class: "block break-words text-body text-content-strong" }, Un = /* @__PURE__ */ J({
|
|
367
367
|
__name: "ComboField",
|
|
368
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
368
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
369
369
|
label: {},
|
|
370
370
|
labelHidden: { type: Boolean },
|
|
371
371
|
hint: {},
|
|
@@ -386,104 +386,104 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
386
386
|
recents: {},
|
|
387
387
|
width: {},
|
|
388
388
|
rowLayout: {}
|
|
389
|
-
}, { ...
|
|
389
|
+
}, { ...pe, options: void 0, search: void 0, selected: null, placeholder: void 0, minLength: 1, debounce: 300, limit: 30, recents: void 0, width: "md", rowLayout: void 0 }), {
|
|
390
390
|
modelValue: { default: null },
|
|
391
391
|
modelModifiers: {}
|
|
392
392
|
}),
|
|
393
393
|
emits: /* @__PURE__ */ ye(["picked", "focus", "blur"], ["update:modelValue"]),
|
|
394
394
|
setup(o, { expose: a, emit: e }) {
|
|
395
|
-
const t = o,
|
|
395
|
+
const t = o, l = ke(o, "modelValue"), i = e, { t: p } = te(), u = !!bt(), c = Pe("text", () => t.error ? "error" : t.disabled ? "locked" : "rest"), b = L(() => t.rowLayout === "stacked"), k = L(() => u && !b.value ? Nt(t.width) : "w-full"), _ = oe("input"), n = oe("anchor"), m = Je(null), f = Je(""), x = At({
|
|
396
396
|
source: () => t.search ?? t.options,
|
|
397
397
|
minLength: () => t.minLength,
|
|
398
398
|
debounce: () => t.debounce,
|
|
399
399
|
limit: () => t.limit,
|
|
400
400
|
listAllWhenEmpty: !0,
|
|
401
401
|
recents: () => t.recents
|
|
402
|
-
}), { items:
|
|
403
|
-
const
|
|
404
|
-
return
|
|
402
|
+
}), { items: y, open: h, status: C, highlighted: q, showingRecent: B } = x, V = L(() => {
|
|
403
|
+
const D = l.value;
|
|
404
|
+
return D === null ? null : [m.value, t.selected, ...t.options ?? []].find((ee) => ee?.value === D) ?? null;
|
|
405
405
|
});
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
re(V, (D) => {
|
|
407
|
+
h.value || (f.value = D?.label ?? "");
|
|
408
408
|
}, { immediate: !0 });
|
|
409
|
-
function
|
|
410
|
-
|
|
409
|
+
function O(D) {
|
|
410
|
+
f.value = D.target.value, x.ask(f.value), f.value === "" && (l.value = null, m.value = null);
|
|
411
411
|
}
|
|
412
|
-
function H(
|
|
413
|
-
i("focus",
|
|
412
|
+
function H(D) {
|
|
413
|
+
i("focus", D), t.disabled || x.show("");
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
|
|
415
|
+
function j(D) {
|
|
416
|
+
x.close(), x.remember(D), m.value = D, l.value = D.value, f.value = D.label, i("picked", D);
|
|
417
417
|
}
|
|
418
|
-
function D
|
|
419
|
-
|
|
418
|
+
function T(D) {
|
|
419
|
+
x.close(), f.value = V.value?.label ?? "", i("blur", D);
|
|
420
420
|
}
|
|
421
|
-
const
|
|
422
|
-
return a({ focus: () =>
|
|
423
|
-
value:
|
|
421
|
+
const Z = L(() => It(h.value, y.value.length, C.value, !0));
|
|
422
|
+
return a({ focus: () => _.value?.focus() }), (D, ee) => (d(), R(be, P(s(fe)(t), {
|
|
423
|
+
value: V.value?.label ?? null,
|
|
424
424
|
"row-layout": t.rowLayout
|
|
425
|
-
}),
|
|
426
|
-
default:
|
|
427
|
-
|
|
425
|
+
}), de({
|
|
426
|
+
default: w(({ id: ae, describedby: se, invalid: ne }) => [
|
|
427
|
+
$("div", {
|
|
428
428
|
ref_key: "anchor",
|
|
429
|
-
ref:
|
|
430
|
-
class:
|
|
429
|
+
ref: n,
|
|
430
|
+
class: G(["flex items-center gap-1.5", [s(c), k.value]])
|
|
431
431
|
}, [
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
option:
|
|
432
|
+
D.$slots.value && V.value ? (d(), g("span", La, [
|
|
433
|
+
E(D.$slots, "value", {
|
|
434
|
+
option: V.value
|
|
435
435
|
})
|
|
436
436
|
])) : z("", !0),
|
|
437
|
-
|
|
438
|
-
id:
|
|
437
|
+
$("input", {
|
|
438
|
+
id: ae,
|
|
439
439
|
ref_key: "input",
|
|
440
|
-
ref:
|
|
440
|
+
ref: _,
|
|
441
441
|
role: "combobox",
|
|
442
442
|
type: "text",
|
|
443
443
|
autocomplete: "off",
|
|
444
|
-
value:
|
|
444
|
+
value: f.value,
|
|
445
445
|
name: t.name,
|
|
446
446
|
placeholder: t.placeholder,
|
|
447
447
|
disabled: t.disabled,
|
|
448
448
|
required: t.required,
|
|
449
449
|
"aria-autocomplete": "list",
|
|
450
|
-
"aria-expanded":
|
|
451
|
-
"aria-controls": `${
|
|
452
|
-
"aria-activedescendant":
|
|
450
|
+
"aria-expanded": Z.value,
|
|
451
|
+
"aria-controls": `${ae}-list`,
|
|
452
|
+
"aria-activedescendant": Z.value && s(y).length > 0 ? `${ae}-option-${s(q)}` : void 0,
|
|
453
453
|
"aria-required": t.required || void 0,
|
|
454
|
-
"aria-invalid":
|
|
454
|
+
"aria-invalid": ne || void 0,
|
|
455
455
|
"aria-describedby": se,
|
|
456
|
-
class:
|
|
457
|
-
onInput:
|
|
456
|
+
class: G(["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", u && !b.value ? "compact:text-right" : ""]),
|
|
457
|
+
onInput: O,
|
|
458
458
|
onFocus: H,
|
|
459
|
-
onBlur:
|
|
460
|
-
onKeydown:
|
|
459
|
+
onBlur: T,
|
|
460
|
+
onKeydown: ee[0] || (ee[0] = (ve) => s(x).keydown(ve, { pick: j, enterNeedsMove: !1 }))
|
|
461
461
|
}, null, 42, Ta),
|
|
462
|
-
N(s(
|
|
462
|
+
N(s(ie), {
|
|
463
463
|
name: "search",
|
|
464
464
|
size: 14,
|
|
465
465
|
class: "shrink-0 text-content-muted"
|
|
466
466
|
})
|
|
467
467
|
], 2),
|
|
468
468
|
N(Ut, {
|
|
469
|
-
id:
|
|
470
|
-
anchor:
|
|
471
|
-
open: s(
|
|
472
|
-
items: s(
|
|
473
|
-
highlighted: s(
|
|
474
|
-
query:
|
|
475
|
-
status: s(
|
|
476
|
-
recent: s(
|
|
469
|
+
id: ae,
|
|
470
|
+
anchor: n.value,
|
|
471
|
+
open: s(h),
|
|
472
|
+
items: s(y),
|
|
473
|
+
highlighted: s(q),
|
|
474
|
+
query: f.value,
|
|
475
|
+
status: s(C),
|
|
476
|
+
recent: s(B),
|
|
477
477
|
"empty-message": !0,
|
|
478
|
-
selected:
|
|
478
|
+
selected: l.value,
|
|
479
479
|
hint: s(p)("core.form.suggestions.keys_pick"),
|
|
480
|
-
onPick:
|
|
481
|
-
onHover:
|
|
482
|
-
},
|
|
483
|
-
|
|
480
|
+
onPick: j,
|
|
481
|
+
onHover: ee[1] || (ee[1] = (ve) => s(x).highlight(ve))
|
|
482
|
+
}, de({ _: 2 }, [
|
|
483
|
+
D.$slots.option ? {
|
|
484
484
|
name: "option",
|
|
485
|
-
fn:
|
|
486
|
-
|
|
485
|
+
fn: w((ve) => [
|
|
486
|
+
E(D.$slots, "option", Ee(Ne(ve)))
|
|
487
487
|
]),
|
|
488
488
|
key: "0"
|
|
489
489
|
} : void 0
|
|
@@ -491,32 +491,32 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
491
491
|
]),
|
|
492
492
|
_: 2
|
|
493
493
|
}, [
|
|
494
|
-
|
|
494
|
+
D.$slots.trailing ? {
|
|
495
495
|
name: "trailing",
|
|
496
|
-
fn:
|
|
497
|
-
|
|
496
|
+
fn: w(() => [
|
|
497
|
+
E(D.$slots, "trailing")
|
|
498
498
|
]),
|
|
499
499
|
key: "0"
|
|
500
500
|
} : void 0,
|
|
501
|
-
|
|
501
|
+
D.$slots.labelTrailing ? {
|
|
502
502
|
name: "labelTrailing",
|
|
503
|
-
fn:
|
|
504
|
-
|
|
503
|
+
fn: w(() => [
|
|
504
|
+
E(D.$slots, "labelTrailing")
|
|
505
505
|
]),
|
|
506
506
|
key: "1"
|
|
507
507
|
} : void 0,
|
|
508
|
-
|
|
508
|
+
D.$slots.readonly ? {
|
|
509
509
|
name: "readonly",
|
|
510
|
-
fn:
|
|
511
|
-
|
|
510
|
+
fn: w(() => [
|
|
511
|
+
E(D.$slots, "readonly")
|
|
512
512
|
]),
|
|
513
513
|
key: "2"
|
|
514
|
-
} :
|
|
514
|
+
} : D.$slots.value && V.value ? {
|
|
515
515
|
name: "readonly",
|
|
516
|
-
fn:
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
option:
|
|
516
|
+
fn: w(() => [
|
|
517
|
+
$("span", Ma, [
|
|
518
|
+
E(D.$slots, "value", {
|
|
519
|
+
option: V.value
|
|
520
520
|
})
|
|
521
521
|
])
|
|
522
522
|
]),
|
|
@@ -524,8 +524,8 @@ const ya = ["id", "aria-label", "aria-describedby", "aria-invalid"], ga = ["name
|
|
|
524
524
|
} : void 0
|
|
525
525
|
]), 1040, ["value", "row-layout"]));
|
|
526
526
|
}
|
|
527
|
-
}), wt = /^(0000-00-00|1970-01-01|0001-01-01)/, lt = (o) => String(o).padStart(2, "0"), $t = (o) =>
|
|
528
|
-
function
|
|
527
|
+
}), wt = /^(0000-00-00|1970-01-01|0001-01-01)/, lt = (o) => String(o).padStart(2, "0"), $t = (o) => Gt(o.getFullYear(), o.getMonth() + 1, o.getDate()), za = (o) => `${lt(o.getHours())}:${lt(o.getMinutes())}`;
|
|
528
|
+
function Da(o) {
|
|
529
529
|
if (o == null || o === "") return null;
|
|
530
530
|
if (o instanceof Date) return Number.isNaN(o.getTime()) ? null : $t(o);
|
|
531
531
|
if (wt.test(o)) return null;
|
|
@@ -543,21 +543,21 @@ function Ra(o) {
|
|
|
543
543
|
const a = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?$/.exec(o);
|
|
544
544
|
return a ? new Date(Number(a[1]), Number(a[2]) - 1, Number(a[3]), Number(a[4] ?? 0), Number(a[5] ?? 0), Number(a[6] ?? 0)) : new Date(o);
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function An(o = /* @__PURE__ */ new Date()) {
|
|
547
547
|
return Vt(o) ?? "";
|
|
548
548
|
}
|
|
549
|
-
const
|
|
549
|
+
const ja = {
|
|
550
550
|
key: 0,
|
|
551
551
|
class: "whitespace-normal"
|
|
552
|
-
},
|
|
552
|
+
}, Oa = { class: "whitespace-nowrap" }, Ea = { class: "whitespace-nowrap" }, Na = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], Ua = ["aria-label", "onClick"], Aa = {
|
|
553
553
|
class: "-m-3 flex",
|
|
554
554
|
"data-test": "date-time-popover"
|
|
555
555
|
}, Ia = { class: "flex w-75 flex-col gap-2.5 border-r border-border-separator p-3.5" }, Pa = {
|
|
556
556
|
key: 0,
|
|
557
557
|
class: "border-t border-border-separator pt-2.5"
|
|
558
|
-
},
|
|
558
|
+
}, Ga = { class: "flex w-48 flex-col gap-2.5 px-3 py-3.5" }, Ha = ["for"], Ka = ["id", "value", "placeholder", "aria-invalid"], Wa = ["onClick"], Ya = /* @__PURE__ */ J({
|
|
559
559
|
__name: "DateTimeField",
|
|
560
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
560
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
561
561
|
label: {},
|
|
562
562
|
labelHidden: { type: Boolean },
|
|
563
563
|
hint: {},
|
|
@@ -574,125 +574,125 @@ const Oa = {
|
|
|
574
574
|
openOn: {},
|
|
575
575
|
minuteStep: {},
|
|
576
576
|
quickPicks: {}
|
|
577
|
-
}, { ...
|
|
577
|
+
}, { ...pe, min: void 0, max: void 0, disabledDates: void 0, openOn: void 0, minuteStep: 1, quickPicks: void 0 }), {
|
|
578
578
|
modelValue: { default: null },
|
|
579
579
|
modelModifiers: {}
|
|
580
580
|
}),
|
|
581
581
|
emits: /* @__PURE__ */ ye(["focus", "blur"], ["update:modelValue"]),
|
|
582
582
|
setup(o, { expose: a, emit: e }) {
|
|
583
|
-
const t = o,
|
|
584
|
-
function
|
|
585
|
-
const { date:
|
|
586
|
-
if (!Y) return { error:
|
|
587
|
-
let
|
|
583
|
+
const t = o, l = ke(o, "modelValue"), i = e, { t: p } = te(), u = gt(), c = Ge(), b = oe("input"), k = oe("popover"), _ = oe("calendar"), n = oe("sheet"), m = L(() => ({ min: t.min?.slice(0, 10), max: t.max?.slice(0, 10), disabled: t.disabledDates })), f = L(() => t.min && t.min.length === 10 ? `${t.min}T00:00` : t.min), x = L(() => t.max && t.max.length === 10 ? `${t.max}T23:59` : t.max), y = (r, v) => !Qt(v, { disabled: t.disabledDates }) && (!f.value || r >= f.value) && (!x.value || r <= x.value), h = ea(() => m.value), C = la(() => t.minuteStep), q = L(() => Be(l.value));
|
|
584
|
+
function B(r) {
|
|
585
|
+
const { date: v, time: U } = aa(r), Y = v === null ? q.value.day ?? Le() : h.parse(v);
|
|
586
|
+
if (!Y) return { error: h.invalidMessage() };
|
|
587
|
+
let M = q.value.time ?? je(t.minuteStep);
|
|
588
588
|
if (U !== null) {
|
|
589
|
-
const A =
|
|
589
|
+
const A = C.parse(U);
|
|
590
590
|
if ("error" in A) return A;
|
|
591
|
-
|
|
591
|
+
M = A.value;
|
|
592
592
|
}
|
|
593
|
-
const K = Ce(Y,
|
|
594
|
-
return
|
|
593
|
+
const K = Ce(Y, M);
|
|
594
|
+
return y(K, Y) ? { value: K } : { error: h.unavailableMessage() };
|
|
595
595
|
}
|
|
596
|
-
const
|
|
597
|
-
get: () =>
|
|
598
|
-
set: (
|
|
599
|
-
|
|
596
|
+
const V = Xe({ model: l, display: (r) => `${u.date(Be(r).day)} ${Be(r).time ?? ""}`.trim(), parse: B }), O = L({
|
|
597
|
+
get: () => q.value.time,
|
|
598
|
+
set: (r) => {
|
|
599
|
+
r && Ht(r) && (l.value = Ce(q.value.day ?? Le(), r));
|
|
600
600
|
}
|
|
601
|
-
}), H =
|
|
602
|
-
const
|
|
603
|
-
return
|
|
604
|
-
}),
|
|
605
|
-
function
|
|
606
|
-
|
|
601
|
+
}), H = Xe({ model: O, display: (r) => r, parse: C.parse }), j = ta(() => t.quickPicks ?? (c.value ? void 0 : []), () => c.value, () => m.value), T = L(() => t.error || V.message.value || H.message.value), Z = L(() => l.value ? u.dateTime(l.value) : null), D = Pe("date", () => T.value ? "error" : t.disabled ? "locked" : "rest"), ee = L(() => {
|
|
602
|
+
const r = V.typed.value;
|
|
603
|
+
return r ? Be(r).day ?? null : null;
|
|
604
|
+
}), ae = L(() => ee.value ?? (Kt(q.value.day) ? q.value.day : null)), se = L(() => V.typed.value ? Be(V.typed.value).time : q.value.time);
|
|
605
|
+
function ne(r) {
|
|
606
|
+
r && V.set(Ce(r, q.value.time ?? je(t.minuteStep)));
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
|
|
608
|
+
function ve(r) {
|
|
609
|
+
r && V.set(Ce(q.value.day ?? Le(), r));
|
|
610
610
|
}
|
|
611
|
-
function _e(
|
|
612
|
-
|
|
611
|
+
function _e(r) {
|
|
612
|
+
V.set(Ce(Le(), je(t.minuteStep))), r();
|
|
613
613
|
}
|
|
614
614
|
const ge = Ae();
|
|
615
|
-
async function
|
|
616
|
-
t.disabled || (
|
|
615
|
+
async function S(r) {
|
|
616
|
+
t.disabled || (k.value?.present(), r && (await we(), await we(), _.value?.focus()));
|
|
617
617
|
}
|
|
618
|
-
function I(
|
|
619
|
-
|
|
618
|
+
function I(r) {
|
|
619
|
+
r.key === "Enter" ? (V.commit(), k.value?.dismiss()) : r.key === "ArrowDown" && (r.preventDefault(), S(!0));
|
|
620
620
|
}
|
|
621
|
-
return a({ focus: () =>
|
|
622
|
-
value:
|
|
621
|
+
return a({ focus: () => b.value?.focus() }), (r, v) => (d(), R(be, P({ ...s(fe)(t), error: T.value }, {
|
|
622
|
+
value: Z.value,
|
|
623
623
|
"value-style": "numeric"
|
|
624
|
-
}),
|
|
625
|
-
default:
|
|
626
|
-
s(
|
|
624
|
+
}), de({
|
|
625
|
+
default: w(({ id: U, describedby: Y, invalid: M }) => [
|
|
626
|
+
s(c) ? (d(), g(X, { key: 0 }, [
|
|
627
627
|
N(yt, P({ id: U, "aria-describedby": Y }, {
|
|
628
628
|
disabled: t.disabled,
|
|
629
|
-
invalid:
|
|
629
|
+
invalid: M,
|
|
630
630
|
placeholder: s(p)("core.form.select.choose"),
|
|
631
|
-
onClick:
|
|
631
|
+
onClick: v[0] || (v[0] = (K) => n.value?.present())
|
|
632
632
|
}), {
|
|
633
|
-
default:
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
633
|
+
default: w(() => [
|
|
634
|
+
l.value ? (d(), g("span", ja, [
|
|
635
|
+
$("span", Oa, F(s(u).date(q.value.day)), 1),
|
|
636
|
+
v[8] || (v[8] = Q(F(" "), -1)),
|
|
637
|
+
$("span", Ea, F(q.value.time), 1)
|
|
638
638
|
])) : z("", !0)
|
|
639
639
|
]),
|
|
640
640
|
_: 1
|
|
641
641
|
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
642
642
|
N(Wt, {
|
|
643
643
|
ref_key: "sheet",
|
|
644
|
-
ref:
|
|
644
|
+
ref: n,
|
|
645
645
|
title: t.label ?? s(p)("core.form.date.calendar"),
|
|
646
646
|
mode: "datetime",
|
|
647
|
-
"model-value":
|
|
647
|
+
"model-value": l.value,
|
|
648
648
|
min: m.value.min,
|
|
649
649
|
max: m.value.max,
|
|
650
650
|
"disabled-dates": t.disabledDates,
|
|
651
651
|
"open-on": t.openOn,
|
|
652
|
-
shortcuts: s(
|
|
652
|
+
shortcuts: s(j),
|
|
653
653
|
step: t.minuteStep,
|
|
654
654
|
clearable: !t.required,
|
|
655
|
-
"onUpdate:modelValue": s(
|
|
655
|
+
"onUpdate:modelValue": s(V).set
|
|
656
656
|
}, null, 8, ["title", "model-value", "min", "max", "disabled-dates", "open-on", "shortcuts", "step", "clearable", "onUpdate:modelValue"])
|
|
657
|
-
], 64)) : (d(), R(
|
|
657
|
+
], 64)) : (d(), R(He, {
|
|
658
658
|
key: 1,
|
|
659
659
|
ref_key: "popover",
|
|
660
|
-
ref:
|
|
660
|
+
ref: k,
|
|
661
661
|
label: t.label ?? s(p)("core.form.date.calendar"),
|
|
662
662
|
width: "auto",
|
|
663
663
|
placement: "bottom-start",
|
|
664
664
|
arrow: !1,
|
|
665
665
|
autofocus: !1
|
|
666
666
|
}, {
|
|
667
|
-
trigger:
|
|
668
|
-
|
|
669
|
-
class:
|
|
667
|
+
trigger: w(({ attrs: K, presented: A }) => [
|
|
668
|
+
$("div", {
|
|
669
|
+
class: G(["inline-flex max-w-full items-center gap-2", s(D)])
|
|
670
670
|
}, [
|
|
671
|
-
|
|
671
|
+
$("input", P({
|
|
672
672
|
id: U,
|
|
673
673
|
ref_key: "input",
|
|
674
|
-
ref:
|
|
674
|
+
ref: b
|
|
675
675
|
}, K, {
|
|
676
676
|
type: "text",
|
|
677
677
|
role: "combobox",
|
|
678
678
|
autocomplete: "off",
|
|
679
679
|
size: "20",
|
|
680
680
|
name: t.name,
|
|
681
|
-
value: s(
|
|
682
|
-
placeholder: s(
|
|
681
|
+
value: s(V).text.value,
|
|
682
|
+
placeholder: s(h).placeholder.value,
|
|
683
683
|
disabled: t.disabled,
|
|
684
684
|
required: t.required,
|
|
685
685
|
"aria-required": t.required || void 0,
|
|
686
|
-
"aria-invalid":
|
|
686
|
+
"aria-invalid": M || void 0,
|
|
687
687
|
"aria-describedby": Y,
|
|
688
688
|
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",
|
|
689
|
-
onInput:
|
|
690
|
-
onFocus:
|
|
691
|
-
onBlur:
|
|
692
|
-
s(
|
|
689
|
+
onInput: v[1] || (v[1] = (ue) => s(V).input(ue.target.value)),
|
|
690
|
+
onFocus: v[2] || (v[2] = (ue) => i("focus", ue)),
|
|
691
|
+
onBlur: v[3] || (v[3] = (ue) => {
|
|
692
|
+
s(V).commit(), i("blur", ue);
|
|
693
693
|
}),
|
|
694
694
|
onKeydown: I,
|
|
695
|
-
onClick:
|
|
695
|
+
onClick: v[4] || (v[4] = (ue) => S(!1))
|
|
696
696
|
}), null, 16, Na),
|
|
697
697
|
t.disabled ? z("", !0) : (d(), g("button", {
|
|
698
698
|
key: 0,
|
|
@@ -700,64 +700,64 @@ const Oa = {
|
|
|
700
700
|
tabindex: "-1",
|
|
701
701
|
"aria-label": s(p)("core.form.date.open"),
|
|
702
702
|
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
703
|
-
onClick: (
|
|
703
|
+
onClick: (ue) => A ? k.value?.dismiss() : S(!0)
|
|
704
704
|
}, [
|
|
705
|
-
N(s(
|
|
705
|
+
N(s(ie), {
|
|
706
706
|
name: "calendarLine",
|
|
707
707
|
size: 18
|
|
708
708
|
})
|
|
709
709
|
], 8, Ua))
|
|
710
710
|
], 2)
|
|
711
711
|
]),
|
|
712
|
-
default:
|
|
713
|
-
|
|
714
|
-
|
|
712
|
+
default: w(({ dismiss: K }) => [
|
|
713
|
+
$("div", Aa, [
|
|
714
|
+
$("div", Ia, [
|
|
715
715
|
N(Yt, {
|
|
716
716
|
ref_key: "calendar",
|
|
717
|
-
ref:
|
|
718
|
-
"model-value":
|
|
717
|
+
ref: _,
|
|
718
|
+
"model-value": ae.value,
|
|
719
719
|
min: m.value.min,
|
|
720
720
|
max: m.value.max,
|
|
721
721
|
"disabled-dates": t.disabledDates,
|
|
722
722
|
"open-on": t.openOn,
|
|
723
|
-
"onUpdate:modelValue":
|
|
723
|
+
"onUpdate:modelValue": ne
|
|
724
724
|
}, null, 8, ["model-value", "min", "max", "disabled-dates", "open-on"]),
|
|
725
|
-
s(
|
|
725
|
+
s(j).length > 0 ? (d(), g("div", Pa, [
|
|
726
726
|
N(Jt, {
|
|
727
|
-
items: s(
|
|
728
|
-
selected:
|
|
729
|
-
onPick:
|
|
727
|
+
items: s(j),
|
|
728
|
+
selected: ae.value,
|
|
729
|
+
onPick: ne
|
|
730
730
|
}, null, 8, ["items", "selected"])
|
|
731
731
|
])) : z("", !0)
|
|
732
732
|
]),
|
|
733
|
-
|
|
734
|
-
|
|
733
|
+
$("div", Ga, [
|
|
734
|
+
$("label", {
|
|
735
735
|
for: s(ge),
|
|
736
736
|
class: "text-footnote font-semibold text-content-muted"
|
|
737
|
-
},
|
|
738
|
-
|
|
737
|
+
}, F(s(p)("core.form.time.label")), 9, Ha),
|
|
738
|
+
$("input", {
|
|
739
739
|
id: s(ge),
|
|
740
740
|
type: "text",
|
|
741
741
|
autocomplete: "off",
|
|
742
742
|
inputmode: "numeric",
|
|
743
743
|
value: s(H).text.value,
|
|
744
|
-
placeholder: s(
|
|
744
|
+
placeholder: s(C).placeholder.value,
|
|
745
745
|
"aria-invalid": s(H).message.value ? !0 : void 0,
|
|
746
746
|
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",
|
|
747
|
-
onInput:
|
|
748
|
-
onBlur:
|
|
749
|
-
onKeydown:
|
|
750
|
-
}, null, 40,
|
|
747
|
+
onInput: v[5] || (v[5] = (A) => s(H).input(A.target.value)),
|
|
748
|
+
onBlur: v[6] || (v[6] = (A) => s(H).commit()),
|
|
749
|
+
onKeydown: v[7] || (v[7] = qe(he((A) => s(H).commit(), ["prevent"]), ["enter"]))
|
|
750
|
+
}, null, 40, Ka),
|
|
751
751
|
N(Zt, {
|
|
752
752
|
"model-value": se.value,
|
|
753
753
|
step: t.minuteStep,
|
|
754
|
-
"onUpdate:modelValue":
|
|
754
|
+
"onUpdate:modelValue": ve
|
|
755
755
|
}, null, 8, ["model-value", "step"]),
|
|
756
|
-
|
|
756
|
+
$("button", {
|
|
757
757
|
type: "button",
|
|
758
758
|
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",
|
|
759
759
|
onClick: (A) => _e(K)
|
|
760
|
-
},
|
|
760
|
+
}, F(s(p)("core.form.time.now")), 9, Wa)
|
|
761
761
|
])
|
|
762
762
|
])
|
|
763
763
|
]),
|
|
@@ -766,24 +766,24 @@ const Oa = {
|
|
|
766
766
|
]),
|
|
767
767
|
_: 2
|
|
768
768
|
}, [
|
|
769
|
-
|
|
769
|
+
r.$slots.trailing ? {
|
|
770
770
|
name: "trailing",
|
|
771
|
-
fn:
|
|
772
|
-
|
|
771
|
+
fn: w(() => [
|
|
772
|
+
E(r.$slots, "trailing")
|
|
773
773
|
]),
|
|
774
774
|
key: "0"
|
|
775
775
|
} : void 0,
|
|
776
|
-
|
|
776
|
+
r.$slots.labelTrailing ? {
|
|
777
777
|
name: "labelTrailing",
|
|
778
|
-
fn:
|
|
779
|
-
|
|
778
|
+
fn: w(() => [
|
|
779
|
+
E(r.$slots, "labelTrailing")
|
|
780
780
|
]),
|
|
781
781
|
key: "1"
|
|
782
782
|
} : void 0,
|
|
783
|
-
|
|
783
|
+
r.$slots.readonly ? {
|
|
784
784
|
name: "readonly",
|
|
785
|
-
fn:
|
|
786
|
-
|
|
785
|
+
fn: w(() => [
|
|
786
|
+
E(r.$slots, "readonly")
|
|
787
787
|
]),
|
|
788
788
|
key: "2"
|
|
789
789
|
} : void 0
|
|
@@ -793,10 +793,10 @@ const Oa = {
|
|
|
793
793
|
function Ct(o, a = {}) {
|
|
794
794
|
const e = a.accept ?? [];
|
|
795
795
|
if (e.length > 0) {
|
|
796
|
-
const t = o.name.lastIndexOf("."),
|
|
796
|
+
const t = o.name.lastIndexOf("."), l = t === -1 ? "" : o.name.slice(t).toLowerCase(), i = o.type.toLowerCase();
|
|
797
797
|
if (!e.some((u) => {
|
|
798
|
-
const
|
|
799
|
-
return
|
|
798
|
+
const c = u.trim().toLowerCase();
|
|
799
|
+
return c.startsWith(".") ? c === l : c.endsWith("/*") ? i.startsWith(c.slice(0, -1)) : c === i;
|
|
800
800
|
})) return "invalid_type";
|
|
801
801
|
}
|
|
802
802
|
return (a.maxSize ?? 0) > 0 && o.size > (a.maxSize ?? 0) ? "too_large" : null;
|
|
@@ -804,13 +804,13 @@ function Ct(o, a = {}) {
|
|
|
804
804
|
function Te(o) {
|
|
805
805
|
return o < 1024 ? `${o} B` : o < 1024 * 1024 ? `${Math.round(o / 1024)} KB` : `${(o / (1024 * 1024)).toFixed(o % (1024 * 1024) === 0 ? 0 : 1)} MB`;
|
|
806
806
|
}
|
|
807
|
-
const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"],
|
|
807
|
+
const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], Qa = {
|
|
808
808
|
key: 0,
|
|
809
809
|
class: "flex items-center gap-3 rounded-group bg-fill p-3",
|
|
810
810
|
"data-test": "file-selected"
|
|
811
|
-
},
|
|
811
|
+
}, Xa = { class: "min-w-0 flex-1" }, eo = { class: "truncate text-body font-medium text-content-strong" }, to = { class: "text-footnote text-content-muted" }, ao = ["disabled", "aria-label", "title"], oo = ["aria-disabled"], lo = { class: "font-semibold text-content-link" }, no = { class: "text-content-muted" }, In = /* @__PURE__ */ J({
|
|
812
812
|
__name: "FileField",
|
|
813
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
813
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
814
814
|
label: {},
|
|
815
815
|
labelHidden: { type: Boolean },
|
|
816
816
|
hint: {},
|
|
@@ -824,34 +824,34 @@ const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describe
|
|
|
824
824
|
variant: {},
|
|
825
825
|
accept: {},
|
|
826
826
|
maxSize: {}
|
|
827
|
-
}, { ...
|
|
827
|
+
}, { ...pe, variant: "button", accept: () => [], maxSize: 0 }), {
|
|
828
828
|
modelValue: { default: null },
|
|
829
829
|
modelModifiers: {}
|
|
830
830
|
}),
|
|
831
831
|
emits: ["update:modelValue"],
|
|
832
832
|
setup(o, { expose: a }) {
|
|
833
|
-
const e = o, t = ke(o, "modelValue"), { t:
|
|
833
|
+
const e = o, t = ke(o, "modelValue"), { t: l } = te(), i = oe("chooser"), p = W(!1), u = W(null), c = L(() => {
|
|
834
834
|
if (e.hint) return e.hint;
|
|
835
|
-
const
|
|
836
|
-
return e.accept.length &&
|
|
835
|
+
const _ = [];
|
|
836
|
+
return e.accept.length && _.push(l("core.form.file.allowed", { formats: e.accept.map((n) => n.replace(/^\./, "").toUpperCase()).join(", ") })), e.maxSize > 0 && _.push(l("core.form.file.max_size", { size: Te(e.maxSize) })), _.join(" · ") || void 0;
|
|
837
837
|
});
|
|
838
|
-
function
|
|
839
|
-
if (!
|
|
840
|
-
const
|
|
841
|
-
|
|
838
|
+
function b(_) {
|
|
839
|
+
if (!_) return;
|
|
840
|
+
const n = Ct(_, { accept: e.accept, maxSize: e.maxSize });
|
|
841
|
+
n ? (u.value = n === "invalid_type" ? l("core.form.file.invalid_type") : l("core.form.file.too_large", { size: Te(e.maxSize) }), t.value = null) : (u.value = null, t.value = _);
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function k() {
|
|
844
844
|
t.value = null, u.value = null;
|
|
845
845
|
}
|
|
846
|
-
return
|
|
847
|
-
!
|
|
848
|
-
}), a({ clear:
|
|
846
|
+
return re(t, (_) => {
|
|
847
|
+
!_ && i.value && (i.value.value = "");
|
|
848
|
+
}), a({ clear: k }), (_, n) => (d(), R(be, P({ ...s(fe)(e), hint: c.value, error: u.value ?? e.error }, {
|
|
849
849
|
value: t.value?.name ?? null,
|
|
850
850
|
"row-layout": "stacked"
|
|
851
|
-
}),
|
|
852
|
-
default:
|
|
853
|
-
|
|
854
|
-
|
|
851
|
+
}), de({
|
|
852
|
+
default: w(({ id: m, describedby: f, invalid: x }) => [
|
|
853
|
+
$("div", Ja, [
|
|
854
|
+
$("input", {
|
|
855
855
|
id: m,
|
|
856
856
|
ref_key: "chooser",
|
|
857
857
|
ref: i,
|
|
@@ -860,24 +860,24 @@ const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describe
|
|
|
860
860
|
tabindex: "-1",
|
|
861
861
|
accept: e.accept.join(",") || void 0,
|
|
862
862
|
disabled: e.disabled,
|
|
863
|
-
"aria-describedby":
|
|
864
|
-
"aria-invalid":
|
|
865
|
-
onChange:
|
|
863
|
+
"aria-describedby": f,
|
|
864
|
+
"aria-invalid": x || void 0,
|
|
865
|
+
onChange: n[0] || (n[0] = (y) => b(y.target.files?.[0]))
|
|
866
866
|
}, null, 40, Za),
|
|
867
|
-
t.value ? (d(), g("div",
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
867
|
+
t.value ? (d(), g("div", Qa, [
|
|
868
|
+
$("div", Xa, [
|
|
869
|
+
$("p", eo, F(t.value.name), 1),
|
|
870
|
+
$("p", to, F(s(Te)(t.value.size)), 1)
|
|
871
871
|
]),
|
|
872
|
-
|
|
872
|
+
$("button", {
|
|
873
873
|
type: "button",
|
|
874
874
|
disabled: e.disabled,
|
|
875
|
-
"aria-label": s(
|
|
876
|
-
title: s(
|
|
875
|
+
"aria-label": s(l)("core.form.file.remove"),
|
|
876
|
+
title: s(l)("core.form.file.remove"),
|
|
877
877
|
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",
|
|
878
|
-
onClick:
|
|
878
|
+
onClick: k
|
|
879
879
|
}, [
|
|
880
|
-
N(s(
|
|
880
|
+
N(s(ie), {
|
|
881
881
|
name: "close",
|
|
882
882
|
size: 14
|
|
883
883
|
})
|
|
@@ -888,27 +888,27 @@ const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describe
|
|
|
888
888
|
tabindex: "0",
|
|
889
889
|
"data-test": "file-dropzone",
|
|
890
890
|
"aria-disabled": e.disabled || void 0,
|
|
891
|
-
class:
|
|
892
|
-
onClick:
|
|
891
|
+
class: G(["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", p.value ? "border-border-focus bg-tint-soft" : "border-border-control hover:bg-fill"]),
|
|
892
|
+
onClick: n[1] || (n[1] = (y) => !e.disabled && i.value?.click()),
|
|
893
893
|
onKeydown: [
|
|
894
|
-
|
|
895
|
-
|
|
894
|
+
n[2] || (n[2] = qe(he((y) => !e.disabled && i.value?.click(), ["prevent"]), ["enter"])),
|
|
895
|
+
n[3] || (n[3] = qe(he((y) => !e.disabled && i.value?.click(), ["prevent"]), ["space"]))
|
|
896
896
|
],
|
|
897
|
-
onDragover:
|
|
898
|
-
onDragleave:
|
|
899
|
-
onDrop:
|
|
900
|
-
p.value = !1, e.disabled ||
|
|
897
|
+
onDragover: n[4] || (n[4] = he((y) => p.value = !0, ["prevent"])),
|
|
898
|
+
onDragleave: n[5] || (n[5] = he((y) => p.value = !1, ["prevent"])),
|
|
899
|
+
onDrop: n[6] || (n[6] = he((y) => {
|
|
900
|
+
p.value = !1, e.disabled || b(y.dataTransfer?.files?.[0]);
|
|
901
901
|
}, ["prevent"]))
|
|
902
902
|
}, [
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
], 42, oo)) : (d(), R(
|
|
903
|
+
$("span", lo, F(s(l)("core.form.file.choose")), 1),
|
|
904
|
+
$("span", no, F(" " + s(l)("core.form.file.drop")), 1)
|
|
905
|
+
], 42, oo)) : (d(), R(le, {
|
|
906
906
|
key: 2,
|
|
907
907
|
disabled: e.disabled,
|
|
908
|
-
onClick:
|
|
908
|
+
onClick: n[7] || (n[7] = (y) => i.value?.click())
|
|
909
909
|
}, {
|
|
910
|
-
default:
|
|
911
|
-
|
|
910
|
+
default: w(() => [
|
|
911
|
+
Q(F(s(l)("core.form.file.choose")), 1)
|
|
912
912
|
]),
|
|
913
913
|
_: 1
|
|
914
914
|
}, 8, ["disabled"]))
|
|
@@ -916,30 +916,30 @@ const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describe
|
|
|
916
916
|
]),
|
|
917
917
|
_: 2
|
|
918
918
|
}, [
|
|
919
|
-
|
|
919
|
+
_.$slots.trailing ? {
|
|
920
920
|
name: "trailing",
|
|
921
|
-
fn:
|
|
922
|
-
|
|
921
|
+
fn: w(() => [
|
|
922
|
+
E(_.$slots, "trailing")
|
|
923
923
|
]),
|
|
924
924
|
key: "0"
|
|
925
925
|
} : void 0,
|
|
926
|
-
|
|
926
|
+
_.$slots.labelTrailing ? {
|
|
927
927
|
name: "labelTrailing",
|
|
928
|
-
fn:
|
|
929
|
-
|
|
928
|
+
fn: w(() => [
|
|
929
|
+
E(_.$slots, "labelTrailing")
|
|
930
930
|
]),
|
|
931
931
|
key: "1"
|
|
932
932
|
} : void 0,
|
|
933
|
-
|
|
933
|
+
_.$slots.readonly ? {
|
|
934
934
|
name: "readonly",
|
|
935
|
-
fn:
|
|
936
|
-
|
|
935
|
+
fn: w(() => [
|
|
936
|
+
E(_.$slots, "readonly")
|
|
937
937
|
]),
|
|
938
938
|
key: "2"
|
|
939
939
|
} : void 0
|
|
940
940
|
]), 1040, ["value"]));
|
|
941
941
|
}
|
|
942
|
-
}),
|
|
942
|
+
}), ro = ["disabled"], Pn = /* @__PURE__ */ J({
|
|
943
943
|
__name: "FormGroupButton",
|
|
944
944
|
props: {
|
|
945
945
|
label: {},
|
|
@@ -949,16 +949,16 @@ const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describe
|
|
|
949
949
|
emits: ["click"],
|
|
950
950
|
setup(o, { emit: a }) {
|
|
951
951
|
const e = o, t = a;
|
|
952
|
-
return (
|
|
953
|
-
default:
|
|
954
|
-
N(
|
|
955
|
-
default:
|
|
956
|
-
|
|
952
|
+
return (l, i) => (d(), R(qt, null, {
|
|
953
|
+
default: w(() => [
|
|
954
|
+
N(jt, { layout: "stacked" }, {
|
|
955
|
+
default: w(() => [
|
|
956
|
+
$("button", {
|
|
957
957
|
type: "button",
|
|
958
958
|
disabled: e.disabled,
|
|
959
|
-
class:
|
|
959
|
+
class: G(["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"]),
|
|
960
960
|
onClick: i[0] || (i[0] = (p) => t("click"))
|
|
961
|
-
},
|
|
961
|
+
}, F(e.label), 11, ro)
|
|
962
962
|
]),
|
|
963
963
|
_: 1
|
|
964
964
|
})
|
|
@@ -966,10 +966,10 @@ const Ja = { class: "w-full" }, Za = ["id", "accept", "disabled", "aria-describe
|
|
|
966
966
|
_: 1
|
|
967
967
|
}));
|
|
968
968
|
}
|
|
969
|
-
}),
|
|
969
|
+
}), Gn = /* @__PURE__ */ J({
|
|
970
970
|
__name: "FormIndent",
|
|
971
971
|
setup(o) {
|
|
972
|
-
return mt(
|
|
972
|
+
return mt(Ot, Et() + 1), (a, e) => E(a.$slots, "default");
|
|
973
973
|
}
|
|
974
974
|
});
|
|
975
975
|
function so(o, a) {
|
|
@@ -988,9 +988,9 @@ const io = ["id", "aria-labelledby"], uo = ["id", "value", "lang", "name", "rows
|
|
|
988
988
|
}, vo = ["aria-label"], bo = ["id", "aria-selected", "tabindex", "aria-controls", "aria-label", "title", "onClick", "onKeydown"], yo = ["data-state"], go = { class: "w-full" }, ho = { class: "whitespace-pre-line break-words text-body text-content-strong" }, ko = ["aria-expanded"], _o = { class: "flex-1" }, xo = {
|
|
989
989
|
key: 0,
|
|
990
990
|
class: "mt-1 flex flex-col gap-1.5"
|
|
991
|
-
}, wo = ["title"], $o = /* @__PURE__ */
|
|
991
|
+
}, wo = ["title"], $o = /* @__PURE__ */ J({
|
|
992
992
|
__name: "I18nField",
|
|
993
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
993
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
994
994
|
label: {},
|
|
995
995
|
labelHidden: { type: Boolean },
|
|
996
996
|
hint: {},
|
|
@@ -1008,71 +1008,71 @@ const io = ["id", "aria-labelledby"], uo = ["id", "value", "lang", "name", "rows
|
|
|
1008
1008
|
rows: {},
|
|
1009
1009
|
placeholder: {},
|
|
1010
1010
|
maxLength: {}
|
|
1011
|
-
}, { ...
|
|
1011
|
+
}, { ...pe, locales: void 0, defaultLocale: void 0, requiredLocales: () => [], multiline: !1, rows: 3, placeholder: void 0, maxLength: void 0 }), {
|
|
1012
1012
|
modelValue: { default: () => ({}) },
|
|
1013
1013
|
modelModifiers: {}
|
|
1014
1014
|
}),
|
|
1015
1015
|
emits: ["update:modelValue"],
|
|
1016
1016
|
setup(o, { expose: a }) {
|
|
1017
|
-
const e = o, t = ke(o, "modelValue"), { t:
|
|
1018
|
-
function
|
|
1017
|
+
const e = o, t = ke(o, "modelValue"), { t: l, locale: i, availableLocales: p } = te(), u = gt(), c = ze(ht, null), b = Ae(), k = oe("field"), _ = oe("root"), { editable: n } = Se(e), m = Pe(e.multiline ? "area" : "text", () => e.error || ne.value ? "error" : e.disabled ? "locked" : "rest"), f = L(() => e.locales ?? c?.locales ?? p), x = L(() => e.defaultLocale ?? f.value[0] ?? ""), y = L(() => f.value.includes(x.value) ? [x.value, ...f.value.filter((M) => M !== x.value)] : f.value), h = W(null), C = L(() => h.value !== null && y.value.includes(h.value) ? h.value : y.value.includes(i.value) ? i.value : x.value), q = (M) => t.value[M] ?? "", B = (M) => q(M).trim() !== "", V = (M) => M.toUpperCase();
|
|
1018
|
+
function O(M) {
|
|
1019
1019
|
try {
|
|
1020
|
-
return new Intl.DisplayNames([u.intlLocale], { type: "language" }).of(
|
|
1020
|
+
return new Intl.DisplayNames([u.intlLocale], { type: "language" }).of(M) ?? V(M);
|
|
1021
1021
|
} catch {
|
|
1022
|
-
return
|
|
1022
|
+
return V(M);
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
|
-
const H = (
|
|
1026
|
-
function
|
|
1027
|
-
t.value = { ...t.value, [
|
|
1025
|
+
const H = (M) => M.map(O).join(", ");
|
|
1026
|
+
function j(M, K) {
|
|
1027
|
+
t.value = { ...t.value, [M]: K };
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1030
|
-
function
|
|
1031
|
-
|
|
1029
|
+
const T = (M) => `${b}-tab-${M}`;
|
|
1030
|
+
function Z(M, K) {
|
|
1031
|
+
h.value = M, K && we(() => k.value?.focus());
|
|
1032
1032
|
}
|
|
1033
|
-
function M
|
|
1034
|
-
const A =
|
|
1035
|
-
if (
|
|
1036
|
-
|
|
1037
|
-
const xe =
|
|
1038
|
-
xe !== void 0 && (
|
|
1033
|
+
function D(M, K) {
|
|
1034
|
+
const A = y.value.length - 1, ue = { ArrowRight: K + 1, ArrowLeft: K - 1, Home: 0, End: A }[M.key];
|
|
1035
|
+
if (ue === void 0) return;
|
|
1036
|
+
M.preventDefault();
|
|
1037
|
+
const xe = y.value[(ue + y.value.length) % y.value.length];
|
|
1038
|
+
xe !== void 0 && (Z(xe, !1), we(() => document.getElementById(T(xe))?.focus()));
|
|
1039
1039
|
}
|
|
1040
|
-
const
|
|
1041
|
-
function
|
|
1042
|
-
|
|
1040
|
+
const ee = W(!1);
|
|
1041
|
+
function ae(M) {
|
|
1042
|
+
_.value?.contains(M.relatedTarget) || (ee.value = !0);
|
|
1043
1043
|
}
|
|
1044
|
-
const se =
|
|
1045
|
-
function
|
|
1046
|
-
const
|
|
1047
|
-
t.value = { ...t.value, ...Object.fromEntries(
|
|
1044
|
+
const se = L(() => so(t.value, e.requiredLocales)), ne = L(() => ee.value && se.value.length > 0 ? l("core.form.i18n.required", { languages: H(se.value) }) : void 0), ve = L(() => e.requiredLocales.length > 0 ? se.value.length === 0 : y.value.some(B)), _e = L(() => y.value.filter((M) => !B(M) && !(ne.value && se.value.includes(M)))), ge = L(() => B(x.value) && y.value.some((M) => M !== x.value && !B(M)));
|
|
1045
|
+
function S() {
|
|
1046
|
+
const M = q(x.value);
|
|
1047
|
+
t.value = { ...t.value, ...Object.fromEntries(y.value.filter((K) => !B(K)).map((K) => [K, M])) };
|
|
1048
1048
|
}
|
|
1049
|
-
const I =
|
|
1050
|
-
return a({ focus: () =>
|
|
1051
|
-
value: s(
|
|
1049
|
+
const I = L(() => [i.value, x.value, ...y.value].find((M) => y.value.includes(M) && B(M))), r = L(() => y.value.filter((M) => M !== I.value)), v = L(() => r.value.filter(B).length), U = W(!1), Y = L(() => e.label && !n.value && I.value ? `${e.label} · ${V(I.value)}` : e.label);
|
|
1050
|
+
return a({ focus: () => k.value?.focus() }), (M, K) => (d(), R(be, P({ ...s(fe)(e), label: Y.value, error: e.error ?? ne.value, required: e.required || e.requiredLocales.length > 0 }, {
|
|
1051
|
+
value: s(n) ? ve.value ? "written" : null : I.value ? q(I.value) : null,
|
|
1052
1052
|
"row-layout": "stacked"
|
|
1053
|
-
}),
|
|
1054
|
-
default:
|
|
1055
|
-
|
|
1053
|
+
}), de({
|
|
1054
|
+
default: w(({ id: A, describedby: ue, invalid: xe }) => [
|
|
1055
|
+
$("div", {
|
|
1056
1056
|
ref_key: "root",
|
|
1057
|
-
ref:
|
|
1057
|
+
ref: _,
|
|
1058
1058
|
class: "w-full",
|
|
1059
|
-
onFocusout:
|
|
1059
|
+
onFocusout: ae
|
|
1060
1060
|
}, [
|
|
1061
|
-
|
|
1062
|
-
id: `${s(
|
|
1061
|
+
$("div", {
|
|
1062
|
+
id: `${s(b)}-panel`,
|
|
1063
1063
|
role: "tabpanel",
|
|
1064
|
-
"aria-labelledby":
|
|
1064
|
+
"aria-labelledby": T(C.value)
|
|
1065
1065
|
}, [
|
|
1066
|
-
|
|
1067
|
-
class:
|
|
1066
|
+
$("div", {
|
|
1067
|
+
class: G(["w-full", s(m)])
|
|
1068
1068
|
}, [
|
|
1069
1069
|
e.multiline ? (d(), g("textarea", {
|
|
1070
1070
|
key: 0,
|
|
1071
1071
|
id: A,
|
|
1072
1072
|
ref_key: "field",
|
|
1073
|
-
ref:
|
|
1074
|
-
value:
|
|
1075
|
-
lang:
|
|
1073
|
+
ref: k,
|
|
1074
|
+
value: q(C.value),
|
|
1075
|
+
lang: C.value,
|
|
1076
1076
|
name: e.name,
|
|
1077
1077
|
rows: e.rows,
|
|
1078
1078
|
placeholder: e.placeholder,
|
|
@@ -1080,17 +1080,17 @@ const io = ["id", "aria-labelledby"], uo = ["id", "value", "lang", "name", "rows
|
|
|
1080
1080
|
disabled: e.disabled,
|
|
1081
1081
|
"aria-required": e.required || void 0,
|
|
1082
1082
|
"aria-invalid": xe || void 0,
|
|
1083
|
-
"aria-describedby":
|
|
1083
|
+
"aria-describedby": ue,
|
|
1084
1084
|
"data-test": "i18n-input",
|
|
1085
1085
|
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",
|
|
1086
|
-
onInput: K[0] || (K[0] = (
|
|
1086
|
+
onInput: K[0] || (K[0] = (Re) => j(C.value, Re.target.value))
|
|
1087
1087
|
}, null, 40, uo)) : (d(), g("input", {
|
|
1088
1088
|
key: 1,
|
|
1089
1089
|
id: A,
|
|
1090
1090
|
ref_key: "field",
|
|
1091
|
-
ref:
|
|
1092
|
-
value:
|
|
1093
|
-
lang:
|
|
1091
|
+
ref: k,
|
|
1092
|
+
value: q(C.value),
|
|
1093
|
+
lang: C.value,
|
|
1094
1094
|
type: "text",
|
|
1095
1095
|
name: e.name,
|
|
1096
1096
|
placeholder: e.placeholder,
|
|
@@ -1098,52 +1098,52 @@ const io = ["id", "aria-labelledby"], uo = ["id", "value", "lang", "name", "rows
|
|
|
1098
1098
|
disabled: e.disabled,
|
|
1099
1099
|
"aria-required": e.required || void 0,
|
|
1100
1100
|
"aria-invalid": xe || void 0,
|
|
1101
|
-
"aria-describedby":
|
|
1101
|
+
"aria-describedby": ue,
|
|
1102
1102
|
"data-test": "i18n-input",
|
|
1103
1103
|
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",
|
|
1104
|
-
onInput: K[1] || (K[1] = (
|
|
1104
|
+
onInput: K[1] || (K[1] = (Re) => j(C.value, Re.target.value))
|
|
1105
1105
|
}, null, 40, co))
|
|
1106
1106
|
], 2)
|
|
1107
1107
|
], 8, io),
|
|
1108
1108
|
_e.value.length > 0 || ge.value ? (d(), g("div", mo, [
|
|
1109
|
-
_e.value.length > 0 ? (d(), g("p", fo,
|
|
1109
|
+
_e.value.length > 0 ? (d(), g("p", fo, F(s(l)("core.form.i18n.missing", { languages: H(_e.value) })), 1)) : (d(), g("span", po)),
|
|
1110
1110
|
ge.value && !e.disabled ? (d(), g("button", {
|
|
1111
1111
|
key: 2,
|
|
1112
1112
|
type: "button",
|
|
1113
1113
|
"data-test": "i18n-copy",
|
|
1114
1114
|
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",
|
|
1115
|
-
onClick:
|
|
1116
|
-
},
|
|
1115
|
+
onClick: S
|
|
1116
|
+
}, F(s(l)("core.form.i18n.copy", { language: V(x.value) })), 1)) : z("", !0)
|
|
1117
1117
|
])) : z("", !0)
|
|
1118
1118
|
], 544)
|
|
1119
1119
|
]),
|
|
1120
|
-
labelTrailing:
|
|
1121
|
-
|
|
1120
|
+
labelTrailing: w(() => [
|
|
1121
|
+
$("div", {
|
|
1122
1122
|
role: "tablist",
|
|
1123
|
-
"aria-label": s(
|
|
1123
|
+
"aria-label": s(l)("core.form.i18n.languages"),
|
|
1124
1124
|
class: "flex shrink-0 gap-0.5 rounded-control bg-fill p-0.5",
|
|
1125
1125
|
"data-test": "i18n-tabs"
|
|
1126
1126
|
}, [
|
|
1127
|
-
(d(!0), g(
|
|
1128
|
-
id:
|
|
1127
|
+
(d(!0), g(X, null, ce(y.value, (A, ue) => (d(), g("button", {
|
|
1128
|
+
id: T(A),
|
|
1129
1129
|
key: A,
|
|
1130
1130
|
type: "button",
|
|
1131
1131
|
role: "tab",
|
|
1132
|
-
"aria-selected": A ===
|
|
1133
|
-
tabindex: A ===
|
|
1134
|
-
"aria-controls": `${s(
|
|
1135
|
-
"aria-label": s(
|
|
1136
|
-
title:
|
|
1137
|
-
class:
|
|
1138
|
-
onClick: (xe) =>
|
|
1139
|
-
onKeydown: (xe) =>
|
|
1132
|
+
"aria-selected": A === C.value,
|
|
1133
|
+
tabindex: A === C.value ? 0 : -1,
|
|
1134
|
+
"aria-controls": `${s(b)}-panel`,
|
|
1135
|
+
"aria-label": s(l)(B(A) ? "core.form.i18n.tab_written" : "core.form.i18n.tab_empty", { language: O(A) }),
|
|
1136
|
+
title: O(A),
|
|
1137
|
+
class: G(["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", A === C.value ? "bg-segment-selected text-content-strong shadow-sm" : "text-content-muted hover:text-content-strong"]),
|
|
1138
|
+
onClick: (xe) => Z(A, !0),
|
|
1139
|
+
onKeydown: (xe) => D(xe, ue)
|
|
1140
1140
|
}, [
|
|
1141
|
-
|
|
1142
|
-
|
|
1141
|
+
Q(F(V(A)) + " ", 1),
|
|
1142
|
+
$("span", {
|
|
1143
1143
|
"aria-hidden": "true",
|
|
1144
|
-
class:
|
|
1144
|
+
class: G(["size-1.5 rounded-full", B(A) ? "bg-status-success-solid" : ne.value && se.value.includes(A) ? "bg-content-destructive" : "bg-content-disabled"]),
|
|
1145
1145
|
"data-test": "i18n-dot",
|
|
1146
|
-
"data-state":
|
|
1146
|
+
"data-state": B(A) ? "written" : ne.value && se.value.includes(A) ? "required" : "empty"
|
|
1147
1147
|
}, null, 10, yo)
|
|
1148
1148
|
], 42, bo))), 128))
|
|
1149
1149
|
], 8, vo)
|
|
@@ -1152,35 +1152,35 @@ const io = ["id", "aria-labelledby"], uo = ["id", "value", "lang", "name", "rows
|
|
|
1152
1152
|
}, [
|
|
1153
1153
|
I.value ? {
|
|
1154
1154
|
name: "readonly",
|
|
1155
|
-
fn:
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1155
|
+
fn: w(() => [
|
|
1156
|
+
$("div", go, [
|
|
1157
|
+
$("p", ho, F(q(I.value)), 1),
|
|
1158
|
+
r.value.length > 0 ? (d(), g(X, { key: 0 }, [
|
|
1159
|
+
$("button", {
|
|
1160
1160
|
type: "button",
|
|
1161
1161
|
"aria-expanded": U.value,
|
|
1162
1162
|
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",
|
|
1163
1163
|
onClick: K[2] || (K[2] = (A) => U.value = !U.value)
|
|
1164
1164
|
}, [
|
|
1165
|
-
|
|
1166
|
-
N(s(
|
|
1165
|
+
$("span", _o, F(s(l)("core.form.i18n.more", { count: r.value.length, filled: v.value })), 1),
|
|
1166
|
+
N(s(ie), {
|
|
1167
1167
|
name: "arrowRightSLine",
|
|
1168
1168
|
size: 16,
|
|
1169
|
-
class:
|
|
1169
|
+
class: G(["shrink-0 transition-transform duration-motion-fast", U.value ? "rotate-90" : ""])
|
|
1170
1170
|
}, null, 8, ["class"])
|
|
1171
1171
|
], 8, ko),
|
|
1172
1172
|
U.value ? (d(), g("dl", xo, [
|
|
1173
|
-
(d(!0), g(
|
|
1173
|
+
(d(!0), g(X, null, ce(r.value, (A) => (d(), g("div", {
|
|
1174
1174
|
key: A,
|
|
1175
1175
|
class: "flex gap-2 text-body"
|
|
1176
1176
|
}, [
|
|
1177
|
-
|
|
1177
|
+
$("dt", {
|
|
1178
1178
|
class: "w-8 shrink-0 text-footnote font-semibold leading-6 text-content-muted",
|
|
1179
|
-
title:
|
|
1180
|
-
},
|
|
1181
|
-
|
|
1182
|
-
class:
|
|
1183
|
-
},
|
|
1179
|
+
title: O(A)
|
|
1180
|
+
}, F(V(A)), 9, wo),
|
|
1181
|
+
$("dd", {
|
|
1182
|
+
class: G(["min-w-0 flex-1 whitespace-pre-line break-words", B(A) ? "text-content-strong" : "text-content-disabled"])
|
|
1183
|
+
}, F(B(A) ? q(A) : s(l)("core.state.no_value")), 3)
|
|
1184
1184
|
]))), 128))
|
|
1185
1185
|
])) : z("", !0)
|
|
1186
1186
|
], 64)) : z("", !0)
|
|
@@ -1188,10 +1188,10 @@ const io = ["id", "aria-labelledby"], uo = ["id", "value", "lang", "name", "rows
|
|
|
1188
1188
|
]),
|
|
1189
1189
|
key: "0"
|
|
1190
1190
|
} : void 0,
|
|
1191
|
-
|
|
1191
|
+
M.$slots.trailing ? {
|
|
1192
1192
|
name: "trailing",
|
|
1193
|
-
fn:
|
|
1194
|
-
|
|
1193
|
+
fn: w(() => [
|
|
1194
|
+
E(M.$slots, "trailing")
|
|
1195
1195
|
]),
|
|
1196
1196
|
key: "1"
|
|
1197
1197
|
} : void 0
|
|
@@ -1205,16 +1205,16 @@ function Ue(o, a, e) {
|
|
|
1205
1205
|
if (typeof o == "string")
|
|
1206
1206
|
So(o) && e.addIssue({ code: "custom", path: a, params: { code: Vo } });
|
|
1207
1207
|
else if (Array.isArray(o))
|
|
1208
|
-
o.forEach((t,
|
|
1208
|
+
o.forEach((t, l) => Ue(t, [...a, l], e));
|
|
1209
1209
|
else if (o && typeof o == "object")
|
|
1210
|
-
for (const [t,
|
|
1210
|
+
for (const [t, l] of Object.entries(o)) Ue(l, [...a, t], e);
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Hn(o, a) {
|
|
1213
1213
|
Ue(o, [], a);
|
|
1214
1214
|
}
|
|
1215
|
-
const
|
|
1215
|
+
const Kn = /* @__PURE__ */ J({
|
|
1216
1216
|
__name: "MoneyField",
|
|
1217
|
-
props: /* @__PURE__ */
|
|
1217
|
+
props: /* @__PURE__ */ me({
|
|
1218
1218
|
label: {},
|
|
1219
1219
|
labelHidden: { type: Boolean },
|
|
1220
1220
|
hint: {},
|
|
@@ -1231,50 +1231,50 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1231
1231
|
blankZero: { type: Boolean },
|
|
1232
1232
|
negative: { type: Boolean },
|
|
1233
1233
|
width: {}
|
|
1234
|
-
}, { ...
|
|
1234
|
+
}, { ...pe, modelValue: void 0, decimals: 2, blankZero: !1, negative: !1, width: "sm" }),
|
|
1235
1235
|
emits: ["update:modelValue", "focus", "blur"],
|
|
1236
1236
|
setup(o, { expose: a, emit: e }) {
|
|
1237
|
-
const t = o,
|
|
1237
|
+
const t = o, l = e, i = oe("field");
|
|
1238
1238
|
return a({ focus: () => i.value?.focus() }), (p, u) => (d(), R(kt, P({
|
|
1239
1239
|
ref_key: "field",
|
|
1240
1240
|
ref: i,
|
|
1241
1241
|
"model-value": t.modelValue,
|
|
1242
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1243
|
-
}, s(
|
|
1242
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => l("update:modelValue", c))
|
|
1243
|
+
}, s(fe)(t), {
|
|
1244
1244
|
decimals: t.decimals,
|
|
1245
1245
|
negative: t.negative,
|
|
1246
1246
|
"blank-zero": t.blankZero,
|
|
1247
1247
|
suffix: t.currency,
|
|
1248
1248
|
width: t.width,
|
|
1249
|
-
onFocus: u[1] || (u[1] = (
|
|
1250
|
-
onBlur: u[2] || (u[2] = (
|
|
1251
|
-
}),
|
|
1249
|
+
onFocus: u[1] || (u[1] = (c) => l("focus", c)),
|
|
1250
|
+
onBlur: u[2] || (u[2] = (c) => l("blur", c))
|
|
1251
|
+
}), de({ _: 2 }, [
|
|
1252
1252
|
p.$slots.trailing ? {
|
|
1253
1253
|
name: "trailing",
|
|
1254
|
-
fn:
|
|
1255
|
-
|
|
1254
|
+
fn: w(() => [
|
|
1255
|
+
E(p.$slots, "trailing")
|
|
1256
1256
|
]),
|
|
1257
1257
|
key: "0"
|
|
1258
1258
|
} : void 0,
|
|
1259
1259
|
p.$slots.labelTrailing ? {
|
|
1260
1260
|
name: "labelTrailing",
|
|
1261
|
-
fn:
|
|
1262
|
-
|
|
1261
|
+
fn: w(() => [
|
|
1262
|
+
E(p.$slots, "labelTrailing")
|
|
1263
1263
|
]),
|
|
1264
1264
|
key: "1"
|
|
1265
1265
|
} : void 0,
|
|
1266
1266
|
p.$slots.readonly ? {
|
|
1267
1267
|
name: "readonly",
|
|
1268
|
-
fn:
|
|
1269
|
-
|
|
1268
|
+
fn: w(() => [
|
|
1269
|
+
E(p.$slots, "readonly")
|
|
1270
1270
|
]),
|
|
1271
1271
|
key: "2"
|
|
1272
1272
|
} : void 0
|
|
1273
1273
|
]), 1040, ["model-value", "decimals", "negative", "blank-zero", "suffix", "width"]));
|
|
1274
1274
|
}
|
|
1275
|
-
}),
|
|
1275
|
+
}), Bo = { class: "flex flex-col gap-2" }, qo = ["onClick"], Wn = /* @__PURE__ */ J({
|
|
1276
1276
|
__name: "MonthYearField",
|
|
1277
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
1277
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
1278
1278
|
label: {},
|
|
1279
1279
|
labelHidden: { type: Boolean },
|
|
1280
1280
|
hint: {},
|
|
@@ -1288,7 +1288,7 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1288
1288
|
minYear: {},
|
|
1289
1289
|
maxYear: {},
|
|
1290
1290
|
placeholder: {}
|
|
1291
|
-
}, { ...
|
|
1291
|
+
}, { ...pe, placeholder: void 0, minYear: 1970, maxYear: () => (/* @__PURE__ */ new Date()).getFullYear() + 1 }), {
|
|
1292
1292
|
month: { default: null },
|
|
1293
1293
|
monthModifiers: {},
|
|
1294
1294
|
year: { default: null },
|
|
@@ -1296,35 +1296,35 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1296
1296
|
}),
|
|
1297
1297
|
emits: ["update:month", "update:year"],
|
|
1298
1298
|
setup(o) {
|
|
1299
|
-
const a = o, e = ke(o, "month"), t = ke(o, "year"), { t:
|
|
1300
|
-
function
|
|
1301
|
-
e.value =
|
|
1299
|
+
const a = o, e = ke(o, "month"), t = ke(o, "year"), { t: l } = te(), i = L(() => e.value !== null && e.value >= 1 && e.value <= 12), p = (k, _) => l(`core.form.months.${_}.${k}`), u = L(() => i.value && t.value !== null ? l("core.form.months.with_year", { month: p(e.value, "long"), year: t.value }) : t.value !== null ? String(t.value) : i.value ? p(e.value, "long") : "");
|
|
1300
|
+
function c(k, _) {
|
|
1301
|
+
e.value = k.month, t.value = k.year, _();
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1304
|
-
e.value = null, t.value = null,
|
|
1303
|
+
function b(k) {
|
|
1304
|
+
e.value = null, t.value = null, k();
|
|
1305
1305
|
}
|
|
1306
|
-
return (
|
|
1306
|
+
return (k, _) => (d(), R(be, P(s(fe)(a), {
|
|
1307
1307
|
value: u.value || null
|
|
1308
|
-
}),
|
|
1309
|
-
default:
|
|
1310
|
-
N(
|
|
1308
|
+
}), de({
|
|
1309
|
+
default: w(({ id: n, describedby: m, invalid: f }) => [
|
|
1310
|
+
N(He, {
|
|
1311
1311
|
label: a.label ?? u.value,
|
|
1312
1312
|
width: "sm",
|
|
1313
1313
|
placement: "bottom-start",
|
|
1314
1314
|
arrow: !1
|
|
1315
1315
|
}, {
|
|
1316
|
-
trigger:
|
|
1317
|
-
N(yt, P({ id:
|
|
1318
|
-
expanded:
|
|
1316
|
+
trigger: w(({ toggle: x, presented: y }) => [
|
|
1317
|
+
N(yt, P({ id: n, "aria-describedby": m }, {
|
|
1318
|
+
expanded: y,
|
|
1319
1319
|
disabled: a.disabled,
|
|
1320
|
-
invalid:
|
|
1321
|
-
placeholder: a.placeholder ?? s(
|
|
1322
|
-
onClick:
|
|
1320
|
+
invalid: f,
|
|
1321
|
+
placeholder: a.placeholder ?? s(l)("core.form.select.choose"),
|
|
1322
|
+
onClick: x
|
|
1323
1323
|
}), {
|
|
1324
|
-
default:
|
|
1325
|
-
u.value ? (d(), g(
|
|
1326
|
-
|
|
1327
|
-
N(s(
|
|
1324
|
+
default: w(() => [
|
|
1325
|
+
u.value ? (d(), g(X, { key: 0 }, [
|
|
1326
|
+
Q(F(u.value), 1),
|
|
1327
|
+
N(s(ie), {
|
|
1328
1328
|
name: "calendarLine",
|
|
1329
1329
|
size: 16,
|
|
1330
1330
|
class: "ml-2 shrink-0 text-content-muted"
|
|
@@ -1334,21 +1334,21 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1334
1334
|
_: 1
|
|
1335
1335
|
}, 16, ["expanded", "disabled", "invalid", "placeholder", "onClick"])
|
|
1336
1336
|
]),
|
|
1337
|
-
default:
|
|
1338
|
-
|
|
1339
|
-
N(
|
|
1337
|
+
default: w(({ dismiss: x }) => [
|
|
1338
|
+
$("div", Bo, [
|
|
1339
|
+
N(Xt, {
|
|
1340
1340
|
month: e.value,
|
|
1341
1341
|
year: t.value,
|
|
1342
1342
|
"min-year": a.minYear,
|
|
1343
1343
|
"max-year": a.maxYear,
|
|
1344
|
-
onPick: (
|
|
1344
|
+
onPick: (y) => c(y, x)
|
|
1345
1345
|
}, null, 8, ["month", "year", "min-year", "max-year", "onPick"]),
|
|
1346
1346
|
i.value || t.value !== null ? (d(), g("button", {
|
|
1347
1347
|
key: 0,
|
|
1348
1348
|
type: "button",
|
|
1349
1349
|
class: "cursor-pointer self-start rounded-control px-1 text-footnote text-content-link",
|
|
1350
|
-
onClick: (
|
|
1351
|
-
},
|
|
1350
|
+
onClick: (y) => b(x)
|
|
1351
|
+
}, F(s(l)("core.form.select.clear")), 9, qo)) : z("", !0)
|
|
1352
1352
|
])
|
|
1353
1353
|
]),
|
|
1354
1354
|
_: 2
|
|
@@ -1356,32 +1356,32 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1356
1356
|
]),
|
|
1357
1357
|
_: 2
|
|
1358
1358
|
}, [
|
|
1359
|
-
|
|
1359
|
+
k.$slots.trailing ? {
|
|
1360
1360
|
name: "trailing",
|
|
1361
|
-
fn:
|
|
1362
|
-
|
|
1361
|
+
fn: w(() => [
|
|
1362
|
+
E(k.$slots, "trailing")
|
|
1363
1363
|
]),
|
|
1364
1364
|
key: "0"
|
|
1365
1365
|
} : void 0,
|
|
1366
|
-
|
|
1366
|
+
k.$slots.labelTrailing ? {
|
|
1367
1367
|
name: "labelTrailing",
|
|
1368
|
-
fn:
|
|
1369
|
-
|
|
1368
|
+
fn: w(() => [
|
|
1369
|
+
E(k.$slots, "labelTrailing")
|
|
1370
1370
|
]),
|
|
1371
1371
|
key: "1"
|
|
1372
1372
|
} : void 0,
|
|
1373
|
-
|
|
1373
|
+
k.$slots.readonly ? {
|
|
1374
1374
|
name: "readonly",
|
|
1375
|
-
fn:
|
|
1376
|
-
|
|
1375
|
+
fn: w(() => [
|
|
1376
|
+
E(k.$slots, "readonly")
|
|
1377
1377
|
]),
|
|
1378
1378
|
key: "2"
|
|
1379
1379
|
} : void 0
|
|
1380
1380
|
]), 1040, ["value"]));
|
|
1381
1381
|
}
|
|
1382
|
-
}),
|
|
1382
|
+
}), Fo = { class: "flex min-w-0 flex-wrap items-center gap-1.5 py-0.5" }, Lo = { class: "truncate" }, To = ["disabled", "aria-label", "onClick"], Mo = ["id", "disabled", "aria-expanded", "aria-invalid", "aria-describedby", "aria-busy"], zo = ["id", "disabled", "aria-invalid", "aria-describedby", "aria-busy", "onClick"], Do = { class: "max-h-72 overflow-y-auto" }, Ro = { class: "flex items-center justify-between gap-2" }, nt = "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", jo = /* @__PURE__ */ J({
|
|
1383
1383
|
__name: "MultiSelectField",
|
|
1384
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
1384
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
1385
1385
|
label: {},
|
|
1386
1386
|
labelHidden: { type: Boolean },
|
|
1387
1387
|
hint: {},
|
|
@@ -1396,100 +1396,100 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1396
1396
|
selected: {},
|
|
1397
1397
|
placeholder: {},
|
|
1398
1398
|
searchFrom: {}
|
|
1399
|
-
}, { ...
|
|
1399
|
+
}, { ...pe, selected: () => [], placeholder: void 0, searchFrom: 9 }), {
|
|
1400
1400
|
modelValue: { default: () => [] },
|
|
1401
1401
|
modelModifiers: {}
|
|
1402
1402
|
}),
|
|
1403
1403
|
emits: ["update:modelValue"],
|
|
1404
1404
|
setup(o) {
|
|
1405
|
-
const a = o, e = ke(o, "modelValue"), { t } =
|
|
1406
|
-
const m = e.value.filter((
|
|
1405
|
+
const a = o, e = ke(o, "modelValue"), { t } = te(), l = Ge(), i = oe("sheet"), p = W(!1), u = ra(() => a.options, (n) => {
|
|
1406
|
+
const m = e.value.filter((f) => n.some((x) => x.value === f));
|
|
1407
1407
|
m.length !== e.value.length && (e.value = m);
|
|
1408
|
-
}),
|
|
1409
|
-
const m = u.known.value.find((
|
|
1408
|
+
}), c = L(() => e.value.flatMap((n) => {
|
|
1409
|
+
const m = u.known.value.find((f) => f.value === n) ?? a.selected.find((f) => f.value === n);
|
|
1410
1410
|
return m ? [m] : [];
|
|
1411
|
-
})),
|
|
1412
|
-
function
|
|
1413
|
-
|
|
1411
|
+
})), b = L(() => a.placeholder ?? t("core.form.select.choose"));
|
|
1412
|
+
function k(n) {
|
|
1413
|
+
n !== null && (e.value = e.value.includes(n) ? e.value.filter((m) => m !== n) : [...e.value, n]);
|
|
1414
1414
|
}
|
|
1415
|
-
const
|
|
1416
|
-
return (
|
|
1417
|
-
value:
|
|
1415
|
+
const _ = (n) => e.value = e.value.filter((m) => m !== n);
|
|
1416
|
+
return (n, m) => (d(), R(be, P(s(fe)(a), {
|
|
1417
|
+
value: c.value.length ? c.value.map((f) => f.label).join(", ") : null,
|
|
1418
1418
|
"row-layout": "stacked"
|
|
1419
|
-
}),
|
|
1420
|
-
default:
|
|
1421
|
-
|
|
1422
|
-
(d(!0), g(
|
|
1423
|
-
key: String(
|
|
1419
|
+
}), de({
|
|
1420
|
+
default: w(({ id: f, describedby: x, invalid: y }) => [
|
|
1421
|
+
$("div", Fo, [
|
|
1422
|
+
(d(!0), g(X, null, ce(c.value, (h) => (d(), g("span", {
|
|
1423
|
+
key: String(h.value),
|
|
1424
1424
|
"data-test": "chip",
|
|
1425
1425
|
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"
|
|
1426
1426
|
}, [
|
|
1427
|
-
|
|
1428
|
-
|
|
1427
|
+
$("span", Lo, F(h.label), 1),
|
|
1428
|
+
$("button", {
|
|
1429
1429
|
type: "button",
|
|
1430
1430
|
disabled: a.disabled,
|
|
1431
|
-
"aria-label": `${s(t)("core.form.select.clear")}: ${
|
|
1431
|
+
"aria-label": `${s(t)("core.form.select.clear")}: ${h.label}`,
|
|
1432
1432
|
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",
|
|
1433
|
-
onClick: (
|
|
1433
|
+
onClick: (C) => _(h.value)
|
|
1434
1434
|
}, [
|
|
1435
|
-
N(s(
|
|
1435
|
+
N(s(ie), {
|
|
1436
1436
|
name: "close",
|
|
1437
1437
|
size: 12
|
|
1438
1438
|
})
|
|
1439
1439
|
], 8, To)
|
|
1440
1440
|
]))), 128)),
|
|
1441
|
-
s(
|
|
1441
|
+
s(l) ? (d(), g("button", {
|
|
1442
1442
|
key: 0,
|
|
1443
|
-
id:
|
|
1443
|
+
id: f,
|
|
1444
1444
|
type: "button",
|
|
1445
1445
|
disabled: a.disabled,
|
|
1446
1446
|
"aria-haspopup": "dialog",
|
|
1447
1447
|
"aria-expanded": p.value,
|
|
1448
|
-
"aria-invalid":
|
|
1449
|
-
"aria-describedby":
|
|
1448
|
+
"aria-invalid": y || void 0,
|
|
1449
|
+
"aria-describedby": x,
|
|
1450
1450
|
"aria-busy": s(u).loading.value || void 0,
|
|
1451
|
-
class:
|
|
1452
|
-
onClick: m[0] || (m[0] = (
|
|
1451
|
+
class: G(nt),
|
|
1452
|
+
onClick: m[0] || (m[0] = (h) => i.value?.present())
|
|
1453
1453
|
}, [
|
|
1454
|
-
s(u).loading.value ? (d(), R(s(
|
|
1454
|
+
s(u).loading.value ? (d(), R(s(ie), {
|
|
1455
1455
|
key: 0,
|
|
1456
1456
|
name: "loader4Line",
|
|
1457
1457
|
size: 14,
|
|
1458
1458
|
class: "shrink-0 animate-spin"
|
|
1459
1459
|
})) : z("", !0),
|
|
1460
|
-
|
|
1461
|
-
], 8,
|
|
1460
|
+
Q(" " + F(c.value.length ? s(t)("core.actions.edit") : b.value), 1)
|
|
1461
|
+
], 8, Mo)) : (d(), R(He, {
|
|
1462
1462
|
key: 1,
|
|
1463
|
-
label: a.label ??
|
|
1463
|
+
label: a.label ?? b.value,
|
|
1464
1464
|
width: "lg",
|
|
1465
1465
|
"match-trigger-width": "",
|
|
1466
1466
|
placement: "bottom-start",
|
|
1467
1467
|
arrow: !1
|
|
1468
1468
|
}, {
|
|
1469
|
-
trigger:
|
|
1470
|
-
|
|
1471
|
-
id:
|
|
1469
|
+
trigger: w(({ toggle: h, attrs: C }) => [
|
|
1470
|
+
$("button", P({
|
|
1471
|
+
id: f,
|
|
1472
1472
|
type: "button"
|
|
1473
|
-
},
|
|
1473
|
+
}, C, {
|
|
1474
1474
|
"aria-haspopup": "listbox",
|
|
1475
1475
|
disabled: a.disabled,
|
|
1476
|
-
"aria-invalid":
|
|
1477
|
-
"aria-describedby":
|
|
1476
|
+
"aria-invalid": y || void 0,
|
|
1477
|
+
"aria-describedby": x,
|
|
1478
1478
|
"aria-busy": s(u).loading.value || void 0,
|
|
1479
|
-
class:
|
|
1480
|
-
onClick:
|
|
1479
|
+
class: nt,
|
|
1480
|
+
onClick: h
|
|
1481
1481
|
}), [
|
|
1482
|
-
s(u).loading.value ? (d(), R(s(
|
|
1482
|
+
s(u).loading.value ? (d(), R(s(ie), {
|
|
1483
1483
|
key: 0,
|
|
1484
1484
|
name: "loader4Line",
|
|
1485
1485
|
size: 14,
|
|
1486
1486
|
class: "shrink-0 animate-spin"
|
|
1487
1487
|
})) : z("", !0),
|
|
1488
|
-
|
|
1488
|
+
Q(" " + F(c.value.length ? s(t)("core.actions.edit") : b.value), 1)
|
|
1489
1489
|
], 16, zo)
|
|
1490
1490
|
]),
|
|
1491
|
-
default:
|
|
1492
|
-
|
|
1491
|
+
default: w(() => [
|
|
1492
|
+
$("div", Do, [
|
|
1493
1493
|
N(et, {
|
|
1494
1494
|
options: s(u).rows.value,
|
|
1495
1495
|
status: s(u).status.value,
|
|
@@ -1497,13 +1497,13 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1497
1497
|
multiple: "",
|
|
1498
1498
|
"search-from": a.searchFrom,
|
|
1499
1499
|
presentation: "plain",
|
|
1500
|
-
onSelect:
|
|
1501
|
-
onRetry: m[1] || (m[1] = (
|
|
1502
|
-
},
|
|
1503
|
-
|
|
1500
|
+
onSelect: k,
|
|
1501
|
+
onRetry: m[1] || (m[1] = (h) => s(u).reload())
|
|
1502
|
+
}, de({ _: 2 }, [
|
|
1503
|
+
n.$slots.option ? {
|
|
1504
1504
|
name: "option",
|
|
1505
|
-
fn:
|
|
1506
|
-
|
|
1505
|
+
fn: w((h) => [
|
|
1506
|
+
E(n.$slots, "option", Ee(Ne(h)))
|
|
1507
1507
|
]),
|
|
1508
1508
|
key: "0"
|
|
1509
1509
|
} : void 0
|
|
@@ -1513,52 +1513,52 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1513
1513
|
_: 2
|
|
1514
1514
|
}, 1032, ["label"]))
|
|
1515
1515
|
]),
|
|
1516
|
-
s(
|
|
1516
|
+
s(l) ? (d(), R(na, {
|
|
1517
1517
|
key: 0,
|
|
1518
1518
|
ref_key: "sheet",
|
|
1519
1519
|
ref: i,
|
|
1520
|
-
title: a.label ??
|
|
1520
|
+
title: a.label ?? b.value,
|
|
1521
1521
|
grouped: "",
|
|
1522
|
-
onPresented: m[5] || (m[5] = (
|
|
1523
|
-
onDismissed: m[6] || (m[6] = (
|
|
1522
|
+
onPresented: m[5] || (m[5] = (h) => p.value = !0),
|
|
1523
|
+
onDismissed: m[6] || (m[6] = (h) => p.value = !1)
|
|
1524
1524
|
}, {
|
|
1525
|
-
footer:
|
|
1526
|
-
|
|
1527
|
-
N(
|
|
1525
|
+
footer: w(() => [
|
|
1526
|
+
$("div", Ro, [
|
|
1527
|
+
N(le, {
|
|
1528
1528
|
prominence: "plain",
|
|
1529
1529
|
disabled: e.value.length === 0,
|
|
1530
|
-
onClick: m[3] || (m[3] = (
|
|
1530
|
+
onClick: m[3] || (m[3] = (h) => e.value = [])
|
|
1531
1531
|
}, {
|
|
1532
|
-
default:
|
|
1533
|
-
|
|
1532
|
+
default: w(() => [
|
|
1533
|
+
Q(F(s(t)("core.form.select.clear")), 1)
|
|
1534
1534
|
]),
|
|
1535
1535
|
_: 1
|
|
1536
1536
|
}, 8, ["disabled"]),
|
|
1537
|
-
N(
|
|
1537
|
+
N(le, {
|
|
1538
1538
|
prominence: "primary",
|
|
1539
|
-
onClick: m[4] || (m[4] = (
|
|
1539
|
+
onClick: m[4] || (m[4] = (h) => i.value?.dismiss())
|
|
1540
1540
|
}, {
|
|
1541
|
-
default:
|
|
1542
|
-
|
|
1541
|
+
default: w(() => [
|
|
1542
|
+
Q(F(s(t)("core.form.select.done")), 1)
|
|
1543
1543
|
]),
|
|
1544
1544
|
_: 1
|
|
1545
1545
|
})
|
|
1546
1546
|
])
|
|
1547
1547
|
]),
|
|
1548
|
-
default:
|
|
1548
|
+
default: w(() => [
|
|
1549
1549
|
N(et, {
|
|
1550
1550
|
options: s(u).rows.value,
|
|
1551
1551
|
status: s(u).status.value,
|
|
1552
1552
|
"model-value": e.value,
|
|
1553
1553
|
multiple: "",
|
|
1554
1554
|
"search-from": a.searchFrom,
|
|
1555
|
-
onSelect:
|
|
1556
|
-
onRetry: m[2] || (m[2] = (
|
|
1557
|
-
},
|
|
1558
|
-
|
|
1555
|
+
onSelect: k,
|
|
1556
|
+
onRetry: m[2] || (m[2] = (h) => s(u).reload())
|
|
1557
|
+
}, de({ _: 2 }, [
|
|
1558
|
+
n.$slots.option ? {
|
|
1559
1559
|
name: "option",
|
|
1560
|
-
fn:
|
|
1561
|
-
|
|
1560
|
+
fn: w((h) => [
|
|
1561
|
+
E(n.$slots, "option", Ee(Ne(h)))
|
|
1562
1562
|
]),
|
|
1563
1563
|
key: "0"
|
|
1564
1564
|
} : void 0
|
|
@@ -1569,32 +1569,32 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1569
1569
|
]),
|
|
1570
1570
|
_: 2
|
|
1571
1571
|
}, [
|
|
1572
|
-
|
|
1572
|
+
n.$slots.trailing ? {
|
|
1573
1573
|
name: "trailing",
|
|
1574
|
-
fn:
|
|
1575
|
-
|
|
1574
|
+
fn: w(() => [
|
|
1575
|
+
E(n.$slots, "trailing")
|
|
1576
1576
|
]),
|
|
1577
1577
|
key: "0"
|
|
1578
1578
|
} : void 0,
|
|
1579
|
-
|
|
1579
|
+
n.$slots.labelTrailing ? {
|
|
1580
1580
|
name: "labelTrailing",
|
|
1581
|
-
fn:
|
|
1582
|
-
|
|
1581
|
+
fn: w(() => [
|
|
1582
|
+
E(n.$slots, "labelTrailing")
|
|
1583
1583
|
]),
|
|
1584
1584
|
key: "1"
|
|
1585
1585
|
} : void 0,
|
|
1586
|
-
|
|
1586
|
+
n.$slots.readonly ? {
|
|
1587
1587
|
name: "readonly",
|
|
1588
|
-
fn:
|
|
1589
|
-
|
|
1588
|
+
fn: w(() => [
|
|
1589
|
+
E(n.$slots, "readonly")
|
|
1590
1590
|
]),
|
|
1591
1591
|
key: "2"
|
|
1592
1592
|
} : void 0
|
|
1593
1593
|
]), 1040, ["value"]));
|
|
1594
1594
|
}
|
|
1595
|
-
}),
|
|
1595
|
+
}), Oo = ["aria-label"], Eo = ["src"], No = { class: "flex flex-wrap items-center gap-3" }, Uo = ["id", "accept", "disabled", "aria-describedby", "aria-invalid"], Ao = ["aria-label"], Io = ["src"], Yn = /* @__PURE__ */ J({
|
|
1596
1596
|
__name: "PhotoField",
|
|
1597
|
-
props: /* @__PURE__ */ ye(/* @__PURE__ */
|
|
1597
|
+
props: /* @__PURE__ */ ye(/* @__PURE__ */ me({
|
|
1598
1598
|
label: {},
|
|
1599
1599
|
labelHidden: { type: Boolean },
|
|
1600
1600
|
hint: {},
|
|
@@ -1607,135 +1607,135 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1607
1607
|
name: {},
|
|
1608
1608
|
accept: {},
|
|
1609
1609
|
maxSize: {}
|
|
1610
|
-
}, { ...
|
|
1610
|
+
}, { ...pe, accept: () => ["image/jpeg", "image/png", "image/webp", "image/gif"], maxSize: 5 * 1024 * 1024 }), {
|
|
1611
1611
|
modelValue: { default: null },
|
|
1612
1612
|
modelModifiers: {}
|
|
1613
1613
|
}),
|
|
1614
1614
|
emits: ["update:modelValue"],
|
|
1615
1615
|
setup(o) {
|
|
1616
|
-
const a = o, e = ke(o, "modelValue"), { t } =
|
|
1616
|
+
const a = o, e = ke(o, "modelValue"), { t } = te(), l = oe("chooser"), i = W(null), p = W(null);
|
|
1617
1617
|
function u() {
|
|
1618
1618
|
p.value && URL.revokeObjectURL(p.value), p.value = null;
|
|
1619
1619
|
}
|
|
1620
|
-
|
|
1620
|
+
re(
|
|
1621
1621
|
e,
|
|
1622
|
-
(
|
|
1623
|
-
u(),
|
|
1622
|
+
(n) => {
|
|
1623
|
+
u(), n instanceof File && (p.value = URL.createObjectURL(n)), n === null && l.value && (l.value.value = "");
|
|
1624
1624
|
},
|
|
1625
1625
|
{ immediate: !0 }
|
|
1626
|
-
),
|
|
1627
|
-
const
|
|
1628
|
-
function
|
|
1629
|
-
if (!
|
|
1630
|
-
const m = Ct(
|
|
1631
|
-
m ? i.value = m === "invalid_type" ? t("core.form.file.invalid_type") : t("core.form.file.too_large", { size: Te(a.maxSize) }) : (i.value = null, e.value =
|
|
1626
|
+
), Fe(u);
|
|
1627
|
+
const c = L(() => e.value instanceof File ? p.value : e.value), b = oe("viewer"), k = L(() => c.value ? [{ src: c.value, alt: a.label ?? t("core.viewer.label"), downloadName: e.value instanceof File ? e.value.name : void 0 }] : []);
|
|
1628
|
+
function _(n) {
|
|
1629
|
+
if (!n) return;
|
|
1630
|
+
const m = Ct(n, { accept: a.accept, maxSize: a.maxSize });
|
|
1631
|
+
m ? i.value = m === "invalid_type" ? t("core.form.file.invalid_type") : t("core.form.file.too_large", { size: Te(a.maxSize) }) : (i.value = null, e.value = n);
|
|
1632
1632
|
}
|
|
1633
|
-
return (
|
|
1634
|
-
value:
|
|
1633
|
+
return (n, m) => (d(), R(be, P({ ...s(fe)(a), error: i.value ?? a.error }, {
|
|
1634
|
+
value: c.value ? s(t)("core.form.file.choose") : null,
|
|
1635
1635
|
"row-layout": "stacked"
|
|
1636
|
-
}),
|
|
1637
|
-
readonly:
|
|
1638
|
-
|
|
1636
|
+
}), de({
|
|
1637
|
+
readonly: w(() => [
|
|
1638
|
+
c.value ? (d(), g("button", {
|
|
1639
1639
|
key: 0,
|
|
1640
1640
|
type: "button",
|
|
1641
1641
|
"aria-label": s(t)("core.viewer.open"),
|
|
1642
1642
|
"data-test": "photo-open",
|
|
1643
1643
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1644
|
-
onClick: m[0] || (m[0] = (
|
|
1644
|
+
onClick: m[0] || (m[0] = (f) => b.value?.present(0))
|
|
1645
1645
|
}, [
|
|
1646
|
-
|
|
1647
|
-
src:
|
|
1646
|
+
$("img", {
|
|
1647
|
+
src: c.value,
|
|
1648
1648
|
alt: "",
|
|
1649
1649
|
class: "size-40 rounded-group object-cover"
|
|
1650
1650
|
}, null, 8, Eo)
|
|
1651
|
-
], 8,
|
|
1652
|
-
|
|
1651
|
+
], 8, Oo)) : z("", !0),
|
|
1652
|
+
c.value ? (d(), R(tt, {
|
|
1653
1653
|
key: 1,
|
|
1654
1654
|
ref_key: "viewer",
|
|
1655
|
-
ref:
|
|
1656
|
-
items:
|
|
1655
|
+
ref: b,
|
|
1656
|
+
items: k.value
|
|
1657
1657
|
}, null, 8, ["items"])) : z("", !0)
|
|
1658
1658
|
]),
|
|
1659
|
-
default:
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
id:
|
|
1659
|
+
default: w(({ id: f, describedby: x, invalid: y }) => [
|
|
1660
|
+
$("div", No, [
|
|
1661
|
+
$("input", {
|
|
1662
|
+
id: f,
|
|
1663
1663
|
ref_key: "chooser",
|
|
1664
|
-
ref:
|
|
1664
|
+
ref: l,
|
|
1665
1665
|
type: "file",
|
|
1666
1666
|
class: "sr-only",
|
|
1667
1667
|
tabindex: "-1",
|
|
1668
1668
|
accept: a.accept.join(","),
|
|
1669
1669
|
disabled: a.disabled,
|
|
1670
|
-
"aria-describedby":
|
|
1671
|
-
"aria-invalid":
|
|
1672
|
-
onChange: m[1] || (m[1] = (
|
|
1670
|
+
"aria-describedby": x,
|
|
1671
|
+
"aria-invalid": y || void 0,
|
|
1672
|
+
onChange: m[1] || (m[1] = (h) => _(h.target.files?.[0]))
|
|
1673
1673
|
}, null, 40, Uo),
|
|
1674
|
-
|
|
1674
|
+
c.value ? (d(), g("button", {
|
|
1675
1675
|
key: 0,
|
|
1676
1676
|
type: "button",
|
|
1677
1677
|
"aria-label": s(t)("core.viewer.open"),
|
|
1678
1678
|
"data-test": "photo-open",
|
|
1679
1679
|
class: "block cursor-zoom-in rounded-group focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
1680
|
-
onClick: m[2] || (m[2] = (
|
|
1680
|
+
onClick: m[2] || (m[2] = (h) => b.value?.present(0))
|
|
1681
1681
|
}, [
|
|
1682
|
-
|
|
1683
|
-
src:
|
|
1682
|
+
$("img", {
|
|
1683
|
+
src: c.value,
|
|
1684
1684
|
alt: "",
|
|
1685
1685
|
"data-test": "photo-preview",
|
|
1686
1686
|
class: "size-28 rounded-group object-cover"
|
|
1687
1687
|
}, null, 8, Io)
|
|
1688
1688
|
], 8, Ao)) : z("", !0),
|
|
1689
|
-
N(
|
|
1689
|
+
N(le, {
|
|
1690
1690
|
disabled: a.disabled,
|
|
1691
|
-
onClick: m[3] || (m[3] = (
|
|
1691
|
+
onClick: m[3] || (m[3] = (h) => l.value?.click())
|
|
1692
1692
|
}, {
|
|
1693
|
-
default:
|
|
1694
|
-
|
|
1693
|
+
default: w(() => [
|
|
1694
|
+
Q(F(s(t)("core.form.file.choose")), 1)
|
|
1695
1695
|
]),
|
|
1696
1696
|
_: 1
|
|
1697
1697
|
}, 8, ["disabled"]),
|
|
1698
|
-
|
|
1698
|
+
c.value ? (d(), R(le, {
|
|
1699
1699
|
key: 1,
|
|
1700
1700
|
prominence: "plain",
|
|
1701
1701
|
tone: "critical",
|
|
1702
1702
|
disabled: a.disabled,
|
|
1703
|
-
onClick: m[4] || (m[4] = (
|
|
1703
|
+
onClick: m[4] || (m[4] = (h) => {
|
|
1704
1704
|
e.value = null, i.value = null;
|
|
1705
1705
|
})
|
|
1706
1706
|
}, {
|
|
1707
|
-
default:
|
|
1708
|
-
|
|
1707
|
+
default: w(() => [
|
|
1708
|
+
Q(F(s(t)("core.form.file.remove")), 1)
|
|
1709
1709
|
]),
|
|
1710
1710
|
_: 1
|
|
1711
1711
|
}, 8, ["disabled"])) : z("", !0)
|
|
1712
1712
|
]),
|
|
1713
|
-
|
|
1713
|
+
c.value ? (d(), R(tt, {
|
|
1714
1714
|
key: 0,
|
|
1715
1715
|
ref_key: "viewer",
|
|
1716
|
-
ref:
|
|
1717
|
-
items:
|
|
1716
|
+
ref: b,
|
|
1717
|
+
items: k.value
|
|
1718
1718
|
}, null, 8, ["items"])) : z("", !0)
|
|
1719
1719
|
]),
|
|
1720
1720
|
_: 2
|
|
1721
1721
|
}, [
|
|
1722
|
-
|
|
1722
|
+
n.$slots.trailing ? {
|
|
1723
1723
|
name: "trailing",
|
|
1724
|
-
fn:
|
|
1725
|
-
|
|
1724
|
+
fn: w(() => [
|
|
1725
|
+
E(n.$slots, "trailing")
|
|
1726
1726
|
]),
|
|
1727
1727
|
key: "0"
|
|
1728
1728
|
} : void 0,
|
|
1729
|
-
|
|
1729
|
+
n.$slots.labelTrailing ? {
|
|
1730
1730
|
name: "labelTrailing",
|
|
1731
|
-
fn:
|
|
1732
|
-
|
|
1731
|
+
fn: w(() => [
|
|
1732
|
+
E(n.$slots, "labelTrailing")
|
|
1733
1733
|
]),
|
|
1734
1734
|
key: "1"
|
|
1735
1735
|
} : void 0
|
|
1736
1736
|
]), 1040, ["value"]));
|
|
1737
1737
|
}
|
|
1738
|
-
}), Po = { hidden: "" },
|
|
1738
|
+
}), Po = { hidden: "" }, Go = /* @__PURE__ */ J({
|
|
1739
1739
|
__name: "EditorChrome",
|
|
1740
1740
|
props: {
|
|
1741
1741
|
options: {}
|
|
@@ -1744,27 +1744,27 @@ const Er = /* @__PURE__ */ Z({
|
|
|
1744
1744
|
return fa(o.options), (e, t) => (d(), g("span", Po));
|
|
1745
1745
|
}
|
|
1746
1746
|
});
|
|
1747
|
-
function
|
|
1748
|
-
const a =
|
|
1747
|
+
function Ho(o) {
|
|
1748
|
+
const a = W(0);
|
|
1749
1749
|
let e = 0;
|
|
1750
1750
|
const t = () => {
|
|
1751
1751
|
e || (e = requestAnimationFrame(() => {
|
|
1752
1752
|
e = 0, a.value++;
|
|
1753
1753
|
}));
|
|
1754
|
-
},
|
|
1755
|
-
|
|
1754
|
+
}, l = typeof MutationObserver > "u" ? null : new MutationObserver(t);
|
|
1755
|
+
re(
|
|
1756
1756
|
() => o.sections.value,
|
|
1757
1757
|
(u) => {
|
|
1758
|
-
|
|
1759
|
-
for (const
|
|
1760
|
-
|
|
1758
|
+
l?.disconnect();
|
|
1759
|
+
for (const c of u)
|
|
1760
|
+
l?.observe(c.element, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["data-field-error", "data-field-required", "data-field-filled"] });
|
|
1761
1761
|
t();
|
|
1762
1762
|
},
|
|
1763
1763
|
{ immediate: !0 }
|
|
1764
|
-
),
|
|
1765
|
-
|
|
1764
|
+
), Mt() && zt(() => {
|
|
1765
|
+
l?.disconnect(), e && cancelAnimationFrame(e);
|
|
1766
1766
|
});
|
|
1767
|
-
const i =
|
|
1767
|
+
const i = L(() => (a.value, Object.fromEntries(
|
|
1768
1768
|
o.sections.value.map((u) => [
|
|
1769
1769
|
u.id,
|
|
1770
1770
|
{
|
|
@@ -1772,16 +1772,16 @@ function Ko(o) {
|
|
|
1772
1772
|
required: { total: u.element.querySelectorAll("[data-field-required]").length, filled: u.element.querySelectorAll("[data-field-required][data-field-filled]").length }
|
|
1773
1773
|
}
|
|
1774
1774
|
])
|
|
1775
|
-
))), p =
|
|
1775
|
+
))), p = L(() => Object.values(i.value).reduce((u, c) => ({ filled: u.filled + c.required.filled, total: u.total + c.required.total }), { filled: 0, total: 0 }));
|
|
1776
1776
|
return { states: i, totals: p };
|
|
1777
1777
|
}
|
|
1778
|
-
const
|
|
1778
|
+
const Ko = {
|
|
1779
1779
|
class: "grid min-w-0 grid-cols-1 items-start gap-8 lg:grid-cols-[12.5rem_minmax(0,1fr)]",
|
|
1780
1780
|
"data-test": "editor-page"
|
|
1781
1781
|
}, Wo = {
|
|
1782
1782
|
key: 0,
|
|
1783
1783
|
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"
|
|
1784
|
-
},
|
|
1784
|
+
}, Jn = /* @__PURE__ */ J({
|
|
1785
1785
|
__name: "EditorPage",
|
|
1786
1786
|
props: {
|
|
1787
1787
|
title: {},
|
|
@@ -1794,10 +1794,10 @@ const Go = {
|
|
|
1794
1794
|
},
|
|
1795
1795
|
emits: ["save", "cancel"],
|
|
1796
1796
|
setup(o, { emit: a }) {
|
|
1797
|
-
const e = o, t = a, { t:
|
|
1797
|
+
const e = o, t = a, { t: l } = te(), i = Ge(), p = ma(), { states: u, totals: c } = Ho(p), b = oe("content"), k = L(
|
|
1798
1798
|
() => e.form ? {
|
|
1799
1799
|
form: e.form,
|
|
1800
|
-
label: () => e.saveLabel ??
|
|
1800
|
+
label: () => e.saveLabel ?? l("core.actions.save"),
|
|
1801
1801
|
allowed: () => e.canSave,
|
|
1802
1802
|
disabledWhileClean: () => e.disabledWhileClean,
|
|
1803
1803
|
save: () => {
|
|
@@ -1808,48 +1808,48 @@ const Go = {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
} : null
|
|
1810
1810
|
);
|
|
1811
|
-
|
|
1811
|
+
re(
|
|
1812
1812
|
() => e.form?.failure.value,
|
|
1813
|
-
async (
|
|
1814
|
-
|
|
1813
|
+
async (n) => {
|
|
1814
|
+
n?.kind === "invalid" && (await we(), await Oe(b.value ?? document, p));
|
|
1815
1815
|
}
|
|
1816
1816
|
);
|
|
1817
|
-
function
|
|
1818
|
-
const m = p.sections.value.find((
|
|
1817
|
+
function _(n) {
|
|
1818
|
+
const m = p.sections.value.find((f) => f.id === n)?.element;
|
|
1819
1819
|
m && we(() => Oe(m));
|
|
1820
1820
|
}
|
|
1821
|
-
return (
|
|
1821
|
+
return (n, m) => (d(), R(ua, {
|
|
1822
1822
|
title: e.title,
|
|
1823
1823
|
back: e.back,
|
|
1824
1824
|
width: "content"
|
|
1825
|
-
},
|
|
1826
|
-
default:
|
|
1827
|
-
|
|
1825
|
+
}, de({
|
|
1826
|
+
default: w(() => [
|
|
1827
|
+
k.value ? (d(), R(Go, {
|
|
1828
1828
|
key: 0,
|
|
1829
|
-
options:
|
|
1829
|
+
options: k.value
|
|
1830
1830
|
}, null, 8, ["options"])) : z("", !0),
|
|
1831
|
-
|
|
1831
|
+
$("div", Ko, [
|
|
1832
1832
|
s(i) ? z("", !0) : (d(), g("aside", Wo, [
|
|
1833
1833
|
N(da, {
|
|
1834
1834
|
standalone: "",
|
|
1835
1835
|
states: s(u),
|
|
1836
|
-
progress: s(
|
|
1837
|
-
onSelect:
|
|
1836
|
+
progress: s(c),
|
|
1837
|
+
onSelect: _
|
|
1838
1838
|
}, null, 8, ["states", "progress"]),
|
|
1839
|
-
|
|
1839
|
+
E(n.$slots, "aside")
|
|
1840
1840
|
])),
|
|
1841
|
-
|
|
1841
|
+
$("div", {
|
|
1842
1842
|
ref_key: "content",
|
|
1843
|
-
ref:
|
|
1843
|
+
ref: b,
|
|
1844
1844
|
class: "flex min-w-0 flex-col gap-section-gap"
|
|
1845
1845
|
}, [
|
|
1846
1846
|
e.form ? (d(), R(ct, {
|
|
1847
1847
|
key: 0,
|
|
1848
1848
|
form: e.form,
|
|
1849
1849
|
label: e.fieldLabel,
|
|
1850
|
-
scope:
|
|
1850
|
+
scope: b.value
|
|
1851
1851
|
}, null, 8, ["form", "label", "scope"])) : z("", !0),
|
|
1852
|
-
|
|
1852
|
+
E(n.$slots, "default")
|
|
1853
1853
|
], 512)
|
|
1854
1854
|
]),
|
|
1855
1855
|
s(i) ? (d(), R(ca, {
|
|
@@ -1859,37 +1859,37 @@ const Go = {
|
|
|
1859
1859
|
]),
|
|
1860
1860
|
_: 2
|
|
1861
1861
|
}, [
|
|
1862
|
-
|
|
1862
|
+
n.$slots.header ? {
|
|
1863
1863
|
name: "header",
|
|
1864
|
-
fn:
|
|
1865
|
-
|
|
1864
|
+
fn: w(() => [
|
|
1865
|
+
E(n.$slots, "header")
|
|
1866
1866
|
]),
|
|
1867
1867
|
key: "0"
|
|
1868
1868
|
} : void 0,
|
|
1869
|
-
|
|
1869
|
+
n.$slots.pager ? {
|
|
1870
1870
|
name: "pager",
|
|
1871
|
-
fn:
|
|
1872
|
-
|
|
1871
|
+
fn: w(() => [
|
|
1872
|
+
E(n.$slots, "pager")
|
|
1873
1873
|
]),
|
|
1874
1874
|
key: "1"
|
|
1875
1875
|
} : void 0,
|
|
1876
|
-
|
|
1876
|
+
n.$slots.notices ? {
|
|
1877
1877
|
name: "notices",
|
|
1878
|
-
fn:
|
|
1879
|
-
|
|
1878
|
+
fn: w(() => [
|
|
1879
|
+
E(n.$slots, "notices")
|
|
1880
1880
|
]),
|
|
1881
1881
|
key: "2"
|
|
1882
1882
|
} : void 0,
|
|
1883
|
-
|
|
1883
|
+
n.$slots.bottom ? {
|
|
1884
1884
|
name: "bottom",
|
|
1885
|
-
fn:
|
|
1886
|
-
|
|
1885
|
+
fn: w(() => [
|
|
1886
|
+
E(n.$slots, "bottom")
|
|
1887
1887
|
]),
|
|
1888
1888
|
key: "3"
|
|
1889
1889
|
} : void 0
|
|
1890
1890
|
]), 1032, ["title", "back"]));
|
|
1891
1891
|
}
|
|
1892
|
-
}), Yo = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"],
|
|
1892
|
+
}), Yo = ["value", "aria-label", "disabled", "aria-invalid", "placeholder"], Zn = /* @__PURE__ */ J({
|
|
1893
1893
|
__name: "NumberCell",
|
|
1894
1894
|
props: /* @__PURE__ */ ye({
|
|
1895
1895
|
label: {},
|
|
@@ -1910,7 +1910,7 @@ const Go = {
|
|
|
1910
1910
|
const p = i.target.value.replace(/\D/g, "");
|
|
1911
1911
|
e.value = p === "" ? null : Math.min(a.max, Math.max(a.min, Number(p)));
|
|
1912
1912
|
}
|
|
1913
|
-
const
|
|
1913
|
+
const l = (i) => i.target.value = e.value === null ? "" : String(e.value);
|
|
1914
1914
|
return (i, p) => (d(), g("input", {
|
|
1915
1915
|
value: e.value ?? "",
|
|
1916
1916
|
type: "text",
|
|
@@ -1920,9 +1920,9 @@ const Go = {
|
|
|
1920
1920
|
disabled: a.disabled,
|
|
1921
1921
|
"aria-invalid": a.invalid || void 0,
|
|
1922
1922
|
placeholder: a.placeholder,
|
|
1923
|
-
class:
|
|
1923
|
+
class: G(["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", [a.wide ? "w-28" : "w-16", a.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" : ""]]),
|
|
1924
1924
|
onInput: t,
|
|
1925
|
-
onBlur:
|
|
1925
|
+
onBlur: l
|
|
1926
1926
|
}, null, 42, Yo));
|
|
1927
1927
|
}
|
|
1928
1928
|
}), We = "vue-core:step-draft:";
|
|
@@ -1947,218 +1947,218 @@ function Zo(o, a) {
|
|
|
1947
1947
|
try {
|
|
1948
1948
|
const e = Ye(o);
|
|
1949
1949
|
if (!e) return !1;
|
|
1950
|
-
const t = (
|
|
1950
|
+
const t = (l, i) => typeof Blob < "u" && i instanceof Blob ? null : i;
|
|
1951
1951
|
return e.setItem(We + o.key, JSON.stringify({ version: o.version ?? 1, ...a }, t)), !0;
|
|
1952
1952
|
} catch {
|
|
1953
1953
|
return !1;
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function rt(o) {
|
|
1957
1957
|
try {
|
|
1958
1958
|
Ye(o)?.removeItem(We + o.key);
|
|
1959
1959
|
} catch {
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function Qo(o, a) {
|
|
1963
1963
|
for (const [e, t] of Object.entries(o)) {
|
|
1964
1964
|
if (!(e in a)) continue;
|
|
1965
|
-
const
|
|
1966
|
-
(
|
|
1965
|
+
const l = a[e];
|
|
1966
|
+
(l === null || t === null || t === void 0 || typeof l == typeof t && Array.isArray(l) === Array.isArray(t)) && (o[e] = l);
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
|
-
function
|
|
1970
|
-
const { t: e } =
|
|
1969
|
+
function Qn(o, a) {
|
|
1970
|
+
const { t: e } = te(), t = L(() => Dt(a.steps));
|
|
1971
1971
|
if (t.value.length === 0) throw new Error("useStepForm: a flow needs at least one step.");
|
|
1972
|
-
const
|
|
1973
|
-
let
|
|
1974
|
-
const
|
|
1975
|
-
() => t.value.map((
|
|
1976
|
-
const Y =
|
|
1972
|
+
const l = W(t.value[0].name), i = Ze(/* @__PURE__ */ new Set()), p = Ze(/* @__PURE__ */ new Set([t.value[0].name])), u = W(null), c = W(!1), b = W(0), k = W(!1), _ = W(!1);
|
|
1973
|
+
let n = !1, m = 0;
|
|
1974
|
+
const f = L(() => Math.max(0, t.value.findIndex((v) => v.name === l.value))), x = (v) => v.fields?.filter((U) => o.errors.has(U)).length ?? 0, y = L(
|
|
1975
|
+
() => t.value.map((v, U) => {
|
|
1976
|
+
const Y = x(v), M = U === f.value;
|
|
1977
1977
|
return {
|
|
1978
|
-
name:
|
|
1979
|
-
label:
|
|
1978
|
+
name: v.name,
|
|
1979
|
+
label: v.label,
|
|
1980
1980
|
position: U + 1,
|
|
1981
|
-
state:
|
|
1981
|
+
state: M ? "current" : i.has(v.name) && Y === 0 ? "done" : "todo",
|
|
1982
1982
|
errors: Y,
|
|
1983
|
-
reachable: !
|
|
1983
|
+
reachable: !M && (p.has(v.name) || U < f.value)
|
|
1984
1984
|
};
|
|
1985
1985
|
})
|
|
1986
|
-
),
|
|
1987
|
-
function
|
|
1988
|
-
const U = t.value[
|
|
1989
|
-
U && (u.value =
|
|
1986
|
+
), h = L(() => y.value[f.value]), C = L(() => y.value.length), q = L(() => f.value === 0), B = L(() => f.value === C.value - 1), V = L(() => c.value || o.submitting.value);
|
|
1987
|
+
function O(v) {
|
|
1988
|
+
const U = t.value[v];
|
|
1989
|
+
U && (u.value = v > f.value ? "forward" : "back", l.value = U.name, p.add(U.name), m = v, k.value = !1);
|
|
1990
1990
|
}
|
|
1991
|
-
|
|
1992
|
-
() => t.value.map((
|
|
1991
|
+
re(
|
|
1992
|
+
() => t.value.map((v) => v.name).join("\0"),
|
|
1993
1993
|
() => {
|
|
1994
|
-
const
|
|
1995
|
-
|
|
1996
|
-
K > Y && (i.delete(
|
|
1997
|
-
}), p.add(
|
|
1998
|
-
for (const
|
|
1994
|
+
const v = t.value, U = v.findIndex((M) => M.name === l.value), Y = U === -1 ? Math.min(m, v.length - 1) : U;
|
|
1995
|
+
l.value = v[Y].name, m = Y, v.forEach((M, K) => {
|
|
1996
|
+
K > Y && (i.delete(M.name), p.delete(M.name));
|
|
1997
|
+
}), p.add(l.value);
|
|
1998
|
+
for (const M of [i, p]) for (const K of [...M]) v.some((A) => A.name === K) || M.delete(K);
|
|
1999
1999
|
}
|
|
2000
2000
|
);
|
|
2001
|
-
function H(
|
|
2002
|
-
const U =
|
|
2001
|
+
function H(v) {
|
|
2002
|
+
const U = v.fields;
|
|
2003
2003
|
if (!U?.length) return !0;
|
|
2004
|
-
const Y = Object.entries(o.errors.all()).filter(([K]) => !U.includes(Lt(K))),
|
|
2005
|
-
return Y.length > 0 && o.errors.set({ ...Object.fromEntries(Y), ...o.errors.all() }),
|
|
2004
|
+
const Y = Object.entries(o.errors.all()).filter(([K]) => !U.includes(Lt(K))), M = o.check(v.fields);
|
|
2005
|
+
return Y.length > 0 && o.errors.set({ ...Object.fromEntries(Y), ...o.errors.all() }), M;
|
|
2006
2006
|
}
|
|
2007
|
-
async function
|
|
2008
|
-
if (!H(
|
|
2009
|
-
return
|
|
2010
|
-
if (!
|
|
2011
|
-
|
|
2007
|
+
async function j(v) {
|
|
2008
|
+
if (!H(v))
|
|
2009
|
+
return b.value++, !1;
|
|
2010
|
+
if (!v.beforeNext) return !0;
|
|
2011
|
+
c.value = !0;
|
|
2012
2012
|
try {
|
|
2013
|
-
if (await
|
|
2013
|
+
if (await v.beforeNext()) return !0;
|
|
2014
2014
|
} finally {
|
|
2015
|
-
|
|
2015
|
+
c.value = !1;
|
|
2016
2016
|
}
|
|
2017
|
-
return
|
|
2017
|
+
return b.value++, !1;
|
|
2018
2018
|
}
|
|
2019
|
-
async function
|
|
2020
|
-
const
|
|
2021
|
-
if (
|
|
2022
|
-
return
|
|
2023
|
-
if (
|
|
2024
|
-
const U =
|
|
2025
|
-
U !== -1 &&
|
|
2019
|
+
async function T() {
|
|
2020
|
+
const v = await o.submit(a.submit, a.submitOptions);
|
|
2021
|
+
if (v.status === "saved" || v.status === "saved-refresh-failed")
|
|
2022
|
+
return n = !0, ne(), a.onSaved?.(v.value), !0;
|
|
2023
|
+
if (v.status === "failed" && (b.value++, h.value.errors === 0)) {
|
|
2024
|
+
const U = y.value.findIndex((Y) => Y.errors > 0);
|
|
2025
|
+
U !== -1 && O(U);
|
|
2026
2026
|
}
|
|
2027
2027
|
return !1;
|
|
2028
2028
|
}
|
|
2029
|
-
async function
|
|
2030
|
-
if (
|
|
2031
|
-
const
|
|
2032
|
-
return await
|
|
2029
|
+
async function Z() {
|
|
2030
|
+
if (V.value) return !1;
|
|
2031
|
+
const v = t.value[f.value];
|
|
2032
|
+
return await j(v) ? (i.add(v.name), f.value < C.value - 1 ? (O(f.value + 1), !0) : T()) : !1;
|
|
2033
2033
|
}
|
|
2034
|
-
async function
|
|
2035
|
-
if (
|
|
2036
|
-
const U = t.value.findIndex((Y) => Y.name ===
|
|
2034
|
+
async function D(v) {
|
|
2035
|
+
if (V.value) return !1;
|
|
2036
|
+
const U = t.value.findIndex((Y) => Y.name === v);
|
|
2037
2037
|
if (U === -1) return !1;
|
|
2038
|
-
if (U <=
|
|
2039
|
-
return U <
|
|
2040
|
-
if (!p.has(
|
|
2041
|
-
for (;
|
|
2042
|
-
return
|
|
2038
|
+
if (U <= f.value)
|
|
2039
|
+
return U < f.value && O(U), !0;
|
|
2040
|
+
if (!p.has(v)) return !1;
|
|
2041
|
+
for (; f.value < U; ) if (!await Z()) return !1;
|
|
2042
|
+
return f.value === U;
|
|
2043
2043
|
}
|
|
2044
|
-
const
|
|
2045
|
-
let
|
|
2044
|
+
const ee = a.draft;
|
|
2045
|
+
let ae;
|
|
2046
2046
|
function se() {
|
|
2047
|
-
if (
|
|
2047
|
+
if (ae = void 0, !(!ee || n)) {
|
|
2048
2048
|
if (!o.dirty.value) {
|
|
2049
|
-
|
|
2049
|
+
rt(ee), _.value = !1;
|
|
2050
2050
|
return;
|
|
2051
2051
|
}
|
|
2052
|
-
|
|
2052
|
+
_.value = Zo(ee, { values: Ft(o.values), step: l.value, passed: [...i] });
|
|
2053
2053
|
}
|
|
2054
2054
|
}
|
|
2055
|
-
function
|
|
2056
|
-
|
|
2055
|
+
function ne() {
|
|
2056
|
+
n = !0, clearTimeout(ae), ae = void 0, _.value = !1, ee && rt(ee);
|
|
2057
2057
|
}
|
|
2058
|
-
if (
|
|
2059
|
-
const
|
|
2060
|
-
if (
|
|
2061
|
-
|
|
2058
|
+
if (ee) {
|
|
2059
|
+
const v = Jo(ee);
|
|
2060
|
+
if (v) {
|
|
2061
|
+
Qo(o.values, v.values);
|
|
2062
2062
|
const U = t.value.map((Y) => Y.name);
|
|
2063
|
-
U.includes(
|
|
2064
|
-
for (const Y of
|
|
2065
|
-
for (const Y of [...i,
|
|
2066
|
-
m =
|
|
2063
|
+
U.includes(v.step) && (l.value = v.step);
|
|
2064
|
+
for (const Y of v.passed) U.includes(Y) && i.add(Y);
|
|
2065
|
+
for (const Y of [...i, l.value]) p.add(Y);
|
|
2066
|
+
m = f.value, k.value = o.dirty.value, _.value = k.value;
|
|
2067
2067
|
}
|
|
2068
|
-
|
|
2069
|
-
[() => o.values,
|
|
2068
|
+
re(
|
|
2069
|
+
[() => o.values, l, () => [...i].join("\0")],
|
|
2070
2070
|
() => {
|
|
2071
|
-
|
|
2071
|
+
n || (clearTimeout(ae), ae = setTimeout(se, 400));
|
|
2072
2072
|
},
|
|
2073
2073
|
{ deep: !0 }
|
|
2074
|
-
),
|
|
2075
|
-
|
|
2074
|
+
), Fe(() => {
|
|
2075
|
+
ae !== void 0 && (clearTimeout(ae), se());
|
|
2076
2076
|
});
|
|
2077
2077
|
}
|
|
2078
|
-
const { confirmDiscard:
|
|
2079
|
-
ze(pa, null) && va(() => (
|
|
2078
|
+
const { confirmDiscard: ve } = vt(() => !n && o.dirty.value);
|
|
2079
|
+
ze(pa, null) && va(() => (n || ne(), !0));
|
|
2080
2080
|
async function _e() {
|
|
2081
|
-
const
|
|
2082
|
-
return
|
|
2081
|
+
const v = await ve();
|
|
2082
|
+
return v && ne(), v;
|
|
2083
2083
|
}
|
|
2084
2084
|
function ge() {
|
|
2085
|
-
o.reset(), i.clear(), p.clear(), u.value = null,
|
|
2085
|
+
o.reset(), i.clear(), p.clear(), u.value = null, l.value = t.value[0].name, p.add(l.value), m = 0, k.value = !1, ne(), n = !1;
|
|
2086
2086
|
}
|
|
2087
|
-
const
|
|
2088
|
-
const
|
|
2089
|
-
return
|
|
2090
|
-
}), I =
|
|
2091
|
-
const
|
|
2092
|
-
return
|
|
2093
|
-
}),
|
|
2087
|
+
const S = L(() => {
|
|
2088
|
+
const v = [e("core.steps.position", { current: f.value + 1, total: C.value }), h.value.label];
|
|
2089
|
+
return _.value && v.push(e("core.steps.draft_saved")), v.join(" · ");
|
|
2090
|
+
}), I = L(() => {
|
|
2091
|
+
const v = t.value[f.value];
|
|
2092
|
+
return v.nextLabel ? v.nextLabel : B.value ? a.submitLabel ?? e("core.actions.save") : e("core.steps.next_named", { step: t.value[f.value + 1].label });
|
|
2093
|
+
}), r = L(() => q.value ? null : t.value[f.value - 1].label);
|
|
2094
2094
|
return {
|
|
2095
|
-
steps:
|
|
2096
|
-
current:
|
|
2097
|
-
index:
|
|
2098
|
-
count:
|
|
2099
|
-
isFirst:
|
|
2100
|
-
isLast:
|
|
2101
|
-
busy:
|
|
2095
|
+
steps: y,
|
|
2096
|
+
current: h,
|
|
2097
|
+
index: f,
|
|
2098
|
+
count: C,
|
|
2099
|
+
isFirst: q,
|
|
2100
|
+
isLast: B,
|
|
2101
|
+
busy: V,
|
|
2102
2102
|
direction: u,
|
|
2103
|
-
subtitle:
|
|
2103
|
+
subtitle: S,
|
|
2104
2104
|
nextLabel: I,
|
|
2105
|
-
backLabel:
|
|
2106
|
-
restored:
|
|
2107
|
-
refusals:
|
|
2105
|
+
backLabel: r,
|
|
2106
|
+
restored: k,
|
|
2107
|
+
refusals: b,
|
|
2108
2108
|
errors: o.errors,
|
|
2109
2109
|
failure: o.failure,
|
|
2110
|
-
next:
|
|
2111
|
-
back: () =>
|
|
2112
|
-
goTo:
|
|
2110
|
+
next: Z,
|
|
2111
|
+
back: () => O(f.value - 1),
|
|
2112
|
+
goTo: D,
|
|
2113
2113
|
restart: ge,
|
|
2114
2114
|
confirmDiscard: _e,
|
|
2115
|
-
bindDialog: () => ({ subtitle:
|
|
2115
|
+
bindDialog: () => ({ subtitle: S.value, primaryLabel: I.value, status: V.value ? "processing" : "idle", beforeDismiss: _e })
|
|
2116
2116
|
};
|
|
2117
2117
|
}
|
|
2118
|
-
const
|
|
2118
|
+
const Xo = {
|
|
2119
2119
|
class: "flex flex-wrap items-center gap-2.5 border-t border-border-separator pt-3.5",
|
|
2120
2120
|
"data-test": "step-navigation"
|
|
2121
|
-
}, el = /* @__PURE__ */
|
|
2121
|
+
}, el = /* @__PURE__ */ J({
|
|
2122
2122
|
__name: "StepNavigation",
|
|
2123
2123
|
props: {
|
|
2124
2124
|
flow: {}
|
|
2125
2125
|
},
|
|
2126
2126
|
emits: ["cancel"],
|
|
2127
2127
|
setup(o) {
|
|
2128
|
-
const a = o, { t: e } =
|
|
2129
|
-
return (t,
|
|
2130
|
-
a.flow.backLabel.value ? (d(), R(
|
|
2128
|
+
const a = o, { t: e } = te();
|
|
2129
|
+
return (t, l) => (d(), g("div", Xo, [
|
|
2130
|
+
a.flow.backLabel.value ? (d(), R(le, {
|
|
2131
2131
|
key: 0,
|
|
2132
2132
|
prominence: "plain",
|
|
2133
2133
|
icon: "arrowLeftSLine",
|
|
2134
2134
|
disabled: a.flow.busy.value,
|
|
2135
2135
|
"data-test": "step-back",
|
|
2136
|
-
onClick:
|
|
2136
|
+
onClick: l[0] || (l[0] = (i) => a.flow.back())
|
|
2137
2137
|
}, {
|
|
2138
|
-
default:
|
|
2139
|
-
|
|
2138
|
+
default: w(() => [
|
|
2139
|
+
Q(F(a.flow.backLabel.value), 1)
|
|
2140
2140
|
]),
|
|
2141
2141
|
_: 1
|
|
2142
2142
|
}, 8, ["disabled"])) : z("", !0),
|
|
2143
|
-
|
|
2144
|
-
N(
|
|
2143
|
+
l[3] || (l[3] = $("div", { class: "grow" }, null, -1)),
|
|
2144
|
+
N(le, {
|
|
2145
2145
|
prominence: "plain",
|
|
2146
2146
|
"data-test": "step-cancel",
|
|
2147
|
-
onClick:
|
|
2147
|
+
onClick: l[1] || (l[1] = (i) => t.$emit("cancel"))
|
|
2148
2148
|
}, {
|
|
2149
|
-
default:
|
|
2150
|
-
|
|
2149
|
+
default: w(() => [
|
|
2150
|
+
Q(F(s(e)("core.actions.cancel")), 1)
|
|
2151
2151
|
]),
|
|
2152
2152
|
_: 1
|
|
2153
2153
|
}),
|
|
2154
|
-
N(
|
|
2154
|
+
N(le, {
|
|
2155
2155
|
prominence: "primary",
|
|
2156
2156
|
processing: a.flow.busy.value,
|
|
2157
2157
|
"data-test": "step-next",
|
|
2158
|
-
onClick:
|
|
2158
|
+
onClick: l[2] || (l[2] = (i) => a.flow.next())
|
|
2159
2159
|
}, {
|
|
2160
|
-
default:
|
|
2161
|
-
|
|
2160
|
+
default: w(() => [
|
|
2161
|
+
Q(F(a.flow.nextLabel.value), 1)
|
|
2162
2162
|
]),
|
|
2163
2163
|
_: 1
|
|
2164
2164
|
}, 8, ["processing"])
|
|
@@ -2167,27 +2167,27 @@ const Qo = {
|
|
|
2167
2167
|
}), tl = ["aria-label"], al = ["aria-current"], ol = ["aria-label"], ll = {
|
|
2168
2168
|
key: 2,
|
|
2169
2169
|
class: "sr-only"
|
|
2170
|
-
},
|
|
2170
|
+
}, nl = {
|
|
2171
2171
|
key: 1,
|
|
2172
2172
|
"data-test": "step-dots",
|
|
2173
2173
|
class: "flex justify-center gap-1.5",
|
|
2174
2174
|
"aria-hidden": "true"
|
|
2175
|
-
},
|
|
2175
|
+
}, rl = ["data-state"], sl = /* @__PURE__ */ J({
|
|
2176
2176
|
__name: "StepProgress",
|
|
2177
2177
|
props: {
|
|
2178
2178
|
flow: {},
|
|
2179
2179
|
progress: { default: "bar" }
|
|
2180
2180
|
},
|
|
2181
2181
|
setup(o) {
|
|
2182
|
-
const a = o, { t: e } =
|
|
2183
|
-
return (t,
|
|
2182
|
+
const a = o, { t: e } = te();
|
|
2183
|
+
return (t, l) => a.progress === "bar" ? (d(), g("ol", {
|
|
2184
2184
|
key: 0,
|
|
2185
2185
|
"aria-label": s(e)("core.steps.label"),
|
|
2186
2186
|
"data-test": "step-bar",
|
|
2187
2187
|
class: "grid min-w-0 gap-2",
|
|
2188
|
-
style:
|
|
2188
|
+
style: De({ gridTemplateColumns: `repeat(${a.flow.count.value}, minmax(0, 1fr))` })
|
|
2189
2189
|
}, [
|
|
2190
|
-
(d(!0), g(
|
|
2190
|
+
(d(!0), g(X, null, ce(a.flow.steps.value, (i) => (d(), g("li", {
|
|
2191
2191
|
key: i.name,
|
|
2192
2192
|
class: "flex min-w-0",
|
|
2193
2193
|
"aria-current": i.state === "current" ? "step" : void 0
|
|
@@ -2197,44 +2197,44 @@ const Qo = {
|
|
|
2197
2197
|
disabled: i.reachable ? a.flow.busy.value : void 0,
|
|
2198
2198
|
"data-test": `step-${i.name}`,
|
|
2199
2199
|
"data-state": i.errors > 0 ? "error" : i.state,
|
|
2200
|
-
class:
|
|
2200
|
+
class: G(["group flex min-w-0 flex-1 flex-col gap-1.5 text-left", i.reachable ? "cursor-pointer rounded-control focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-default" : ""]),
|
|
2201
2201
|
onClick: (p) => i.reachable ? a.flow.goTo(i.name) : void 0
|
|
2202
2202
|
}, {
|
|
2203
|
-
default:
|
|
2204
|
-
|
|
2205
|
-
class:
|
|
2203
|
+
default: w(() => [
|
|
2204
|
+
$("span", {
|
|
2205
|
+
class: G(["h-1 rounded-full transition-colors duration-motion-normal", i.errors > 0 ? "bg-status-danger-solid" : i.state === "current" ? "bg-tint" : i.state === "done" ? "bg-control-on" : "bg-fill-strong"]),
|
|
2206
2206
|
"aria-hidden": "true"
|
|
2207
2207
|
}, null, 2),
|
|
2208
|
-
|
|
2209
|
-
class:
|
|
2208
|
+
$("span", {
|
|
2209
|
+
class: G(["flex min-w-0 items-center gap-1.5 text-footnote", i.state === "current" ? "font-bold text-content-strong" : i.state === "done" ? "font-medium text-content-link" : "font-medium text-content-muted"])
|
|
2210
2210
|
}, [
|
|
2211
|
-
i.state === "done" ? (d(), R(s(
|
|
2211
|
+
i.state === "done" ? (d(), R(s(ie), {
|
|
2212
2212
|
key: 0,
|
|
2213
2213
|
name: "checkCustom",
|
|
2214
2214
|
size: 12,
|
|
2215
2215
|
class: "shrink-0"
|
|
2216
2216
|
})) : z("", !0),
|
|
2217
|
-
|
|
2218
|
-
class:
|
|
2219
|
-
},
|
|
2217
|
+
$("span", {
|
|
2218
|
+
class: G(["truncate", i.reachable ? "group-hover:text-content-link" : ""])
|
|
2219
|
+
}, F(i.position) + ". " + F(i.label), 3),
|
|
2220
2220
|
i.errors > 0 ? (d(), g("span", {
|
|
2221
2221
|
key: 1,
|
|
2222
2222
|
"data-test": "step-errors",
|
|
2223
2223
|
"aria-label": s(e)("core.form.sections.errors", { count: i.errors }),
|
|
2224
2224
|
class: "min-w-4.5 shrink-0 rounded-full bg-status-danger-solid px-1.5 text-center text-caption font-semibold text-white"
|
|
2225
|
-
},
|
|
2226
|
-
i.state === "done" ? (d(), g("span", ll,
|
|
2225
|
+
}, F(i.errors), 9, ol)) : z("", !0),
|
|
2226
|
+
i.state === "done" ? (d(), g("span", ll, F(s(e)("core.steps.done")), 1)) : z("", !0)
|
|
2227
2227
|
], 2)
|
|
2228
2228
|
]),
|
|
2229
2229
|
_: 2
|
|
2230
2230
|
}, 1032, ["type", "disabled", "data-test", "data-state", "class", "onClick"]))
|
|
2231
2231
|
], 8, al))), 128))
|
|
2232
|
-
], 12, tl)) : (d(), g("div",
|
|
2233
|
-
(d(!0), g(
|
|
2232
|
+
], 12, tl)) : (d(), g("div", nl, [
|
|
2233
|
+
(d(!0), g(X, null, ce(a.flow.steps.value, (i) => (d(), g("span", {
|
|
2234
2234
|
key: i.name,
|
|
2235
|
-
class:
|
|
2235
|
+
class: G(["h-1.5 rounded-full transition-all duration-motion-fast", [i.state === "current" ? "w-4.5" : "w-1.5", i.errors > 0 ? "bg-status-danger-solid" : i.state === "todo" && i.position > a.flow.index.value ? "bg-fill-strong" : "bg-tint"]]),
|
|
2236
2236
|
"data-state": i.errors > 0 ? "error" : i.state
|
|
2237
|
-
}, null, 10,
|
|
2237
|
+
}, null, 10, rl))), 128))
|
|
2238
2238
|
]));
|
|
2239
2239
|
}
|
|
2240
2240
|
}), il = ["data-step"], ul = {
|
|
@@ -2244,7 +2244,7 @@ const Qo = {
|
|
|
2244
2244
|
key: 1,
|
|
2245
2245
|
"data-test": "step-restored",
|
|
2246
2246
|
class: "flex items-center gap-2 text-footnote text-content-muted"
|
|
2247
|
-
},
|
|
2247
|
+
}, Xn = /* @__PURE__ */ J({
|
|
2248
2248
|
__name: "StepForm",
|
|
2249
2249
|
props: {
|
|
2250
2250
|
flow: {},
|
|
@@ -2253,21 +2253,21 @@ const Qo = {
|
|
|
2253
2253
|
},
|
|
2254
2254
|
emits: ["cancel"],
|
|
2255
2255
|
setup(o) {
|
|
2256
|
-
const a = o, { t: e } =
|
|
2256
|
+
const a = o, { t: e } = te(), t = oe("body"), l = oe("root");
|
|
2257
2257
|
function i(p) {
|
|
2258
2258
|
for (let u = p.parentElement; u; u = u.parentElement) {
|
|
2259
|
-
const
|
|
2260
|
-
if ((
|
|
2259
|
+
const c = getComputedStyle(u).overflowY;
|
|
2260
|
+
if ((c === "auto" || c === "scroll") && u.scrollHeight > u.clientHeight) return p.getBoundingClientRect().top < u.getBoundingClientRect().top;
|
|
2261
2261
|
}
|
|
2262
2262
|
return p.getBoundingClientRect().top < 0;
|
|
2263
2263
|
}
|
|
2264
|
-
return
|
|
2265
|
-
await we(),
|
|
2266
|
-
}),
|
|
2264
|
+
return re(() => a.flow.current.value.name, async () => {
|
|
2265
|
+
await we(), l.value && i(l.value) && l.value.scrollIntoView?.({ block: "start" }), t.value?.focus({ preventScroll: !0 });
|
|
2266
|
+
}), re(() => a.flow.refusals.value, async () => {
|
|
2267
2267
|
await we(), t.value && await Oe(t.value);
|
|
2268
2268
|
}), (p, u) => (d(), g("div", {
|
|
2269
2269
|
ref_key: "root",
|
|
2270
|
-
ref:
|
|
2270
|
+
ref: l,
|
|
2271
2271
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
2272
2272
|
"data-test": "step-form",
|
|
2273
2273
|
"data-step": a.flow.current.value.name
|
|
@@ -2277,16 +2277,16 @@ const Qo = {
|
|
|
2277
2277
|
flow: a.flow,
|
|
2278
2278
|
progress: a.progress
|
|
2279
2279
|
}, null, 8, ["flow", "progress"])) : z("", !0),
|
|
2280
|
-
|
|
2280
|
+
$("p", ul, F(a.flow.subtitle.value), 1),
|
|
2281
2281
|
a.flow.restored.value ? (d(), g("div", dl, [
|
|
2282
|
-
|
|
2283
|
-
N(
|
|
2282
|
+
$("span", null, F(s(e)("core.steps.restored")), 1),
|
|
2283
|
+
N(le, {
|
|
2284
2284
|
prominence: "link",
|
|
2285
2285
|
size: "sm",
|
|
2286
|
-
onClick: u[0] || (u[0] = (
|
|
2286
|
+
onClick: u[0] || (u[0] = (c) => a.flow.restart())
|
|
2287
2287
|
}, {
|
|
2288
|
-
default:
|
|
2289
|
-
|
|
2288
|
+
default: w(() => [
|
|
2289
|
+
Q(F(s(e)("core.steps.start_over")), 1)
|
|
2290
2290
|
]),
|
|
2291
2291
|
_: 1
|
|
2292
2292
|
})
|
|
@@ -2302,11 +2302,11 @@ const Qo = {
|
|
|
2302
2302
|
tabindex: "-1",
|
|
2303
2303
|
novalidate: "",
|
|
2304
2304
|
"data-test": "step-body",
|
|
2305
|
-
class:
|
|
2306
|
-
onSubmit: u[1] || (u[1] = he((
|
|
2305
|
+
class: G(["flex min-w-0 flex-col gap-group-gap outline-none", a.flow.direction.value === "back" ? "animate-step-back" : a.flow.direction.value === "forward" ? "animate-step-in" : ""]),
|
|
2306
|
+
onSubmit: u[1] || (u[1] = he((c) => a.flow.next(), ["prevent"]))
|
|
2307
2307
|
}, [
|
|
2308
|
-
|
|
2309
|
-
u[3] || (u[3] =
|
|
2308
|
+
E(p.$slots, a.flow.current.value.name),
|
|
2309
|
+
u[3] || (u[3] = $("button", {
|
|
2310
2310
|
type: "submit",
|
|
2311
2311
|
class: "sr-only",
|
|
2312
2312
|
tabindex: "-1",
|
|
@@ -2316,16 +2316,16 @@ const Qo = {
|
|
|
2316
2316
|
a.navigation === "inline" ? (d(), R(el, {
|
|
2317
2317
|
key: 2,
|
|
2318
2318
|
flow: a.flow,
|
|
2319
|
-
onCancel: u[2] || (u[2] = (
|
|
2319
|
+
onCancel: u[2] || (u[2] = (c) => p.$emit("cancel"))
|
|
2320
2320
|
}, null, 8, ["flow"])) : z("", !0)
|
|
2321
2321
|
], 8, il));
|
|
2322
2322
|
}
|
|
2323
2323
|
}), st = Symbol("vue-core.dynamicForm.locale"), cl = { class: "flex w-full flex-col gap-3" }, ml = { class: "mb-2 flex items-center justify-between" }, fl = { class: "text-sm font-medium text-muted" }, pl = {
|
|
2324
2324
|
key: 0,
|
|
2325
2325
|
class: "flex gap-1"
|
|
2326
|
-
}, vl = { key: 0 }, bl = /* @__PURE__ */
|
|
2326
|
+
}, vl = { key: 0 }, bl = /* @__PURE__ */ J({
|
|
2327
2327
|
__name: "RepeatField",
|
|
2328
|
-
props: /* @__PURE__ */
|
|
2328
|
+
props: /* @__PURE__ */ me({
|
|
2329
2329
|
label: {},
|
|
2330
2330
|
labelHidden: { type: Boolean },
|
|
2331
2331
|
hint: {},
|
|
@@ -2344,96 +2344,96 @@ const Qo = {
|
|
|
2344
2344
|
resources: {},
|
|
2345
2345
|
addLabel: {},
|
|
2346
2346
|
localeMode: {}
|
|
2347
|
-
}, { ...
|
|
2347
|
+
}, { ...pe, modelValue: () => [], locales: void 0, defaultLocale: void 0, errors: () => ({}), resources: void 0, addLabel: void 0, localeMode: "perField" }),
|
|
2348
2348
|
emits: ["update:modelValue"],
|
|
2349
2349
|
setup(o, { emit: a }) {
|
|
2350
|
-
const e = o, t = a, { t:
|
|
2350
|
+
const e = o, t = a, { t: l } = te(), { editable: i } = Se(e);
|
|
2351
2351
|
let p = 0;
|
|
2352
|
-
const u =
|
|
2353
|
-
|
|
2354
|
-
for (; u.value.length <
|
|
2355
|
-
u.value.length =
|
|
2352
|
+
const u = W([]);
|
|
2353
|
+
re(() => e.modelValue.length, (f) => {
|
|
2354
|
+
for (; u.value.length < f; ) u.value.push(p++);
|
|
2355
|
+
u.value.length = f;
|
|
2356
2356
|
}, { immediate: !0 });
|
|
2357
|
-
const
|
|
2358
|
-
u.value.push(p++),
|
|
2359
|
-
},
|
|
2360
|
-
u.value.splice(
|
|
2357
|
+
const c = (f) => t("update:modelValue", f), b = () => {
|
|
2358
|
+
u.value.push(p++), c([...e.modelValue, {}]);
|
|
2359
|
+
}, k = (f) => {
|
|
2360
|
+
u.value.splice(f, 1), c(e.modelValue.filter((x, y) => y !== f));
|
|
2361
2361
|
};
|
|
2362
|
-
function
|
|
2363
|
-
const
|
|
2364
|
-
if (
|
|
2365
|
-
const
|
|
2366
|
-
[
|
|
2362
|
+
function _(f, x) {
|
|
2363
|
+
const y = f + x;
|
|
2364
|
+
if (y < 0 || y >= e.modelValue.length) return;
|
|
2365
|
+
const h = [...e.modelValue];
|
|
2366
|
+
[h[f], h[y]] = [h[y], h[f]], [u.value[f], u.value[y]] = [u.value[y], u.value[f]], c(h);
|
|
2367
2367
|
}
|
|
2368
|
-
const
|
|
2369
|
-
function m(
|
|
2370
|
-
const
|
|
2371
|
-
return Object.fromEntries(Object.entries(e.errors).filter(([
|
|
2368
|
+
const n = (f, x) => c(e.modelValue.map((y, h) => h === f ? x : { ...y }));
|
|
2369
|
+
function m(f) {
|
|
2370
|
+
const x = `${f}.`;
|
|
2371
|
+
return Object.fromEntries(Object.entries(e.errors).filter(([y]) => y.startsWith(x)).map(([y, h]) => [y.slice(x.length), h]));
|
|
2372
2372
|
}
|
|
2373
|
-
return (
|
|
2373
|
+
return (f, x) => (d(), R(be, P(s(fe)(e), {
|
|
2374
2374
|
"row-layout": "stacked",
|
|
2375
2375
|
value: null,
|
|
2376
2376
|
error: e.error ?? e.errors[""]?.[0]
|
|
2377
2377
|
}), {
|
|
2378
|
-
default:
|
|
2379
|
-
|
|
2380
|
-
(d(!0), g(
|
|
2381
|
-
key: u.value[
|
|
2378
|
+
default: w(() => [
|
|
2379
|
+
$("div", cl, [
|
|
2380
|
+
(d(!0), g(X, null, ce(e.modelValue, (y, h) => (d(), g("div", {
|
|
2381
|
+
key: u.value[h],
|
|
2382
2382
|
class: "rounded-md border border-border p-3",
|
|
2383
2383
|
"data-repeat-row": ""
|
|
2384
2384
|
}, [
|
|
2385
|
-
|
|
2386
|
-
|
|
2385
|
+
$("div", ml, [
|
|
2386
|
+
$("span", fl, F(s(l)("core.form.dynamic.repeat.row", { n: h + 1 })), 1),
|
|
2387
2387
|
s(i) && !e.disabled ? (d(), g("div", pl, [
|
|
2388
|
-
N(
|
|
2388
|
+
N(le, P({
|
|
2389
2389
|
size: "xs",
|
|
2390
2390
|
prominence: "plain",
|
|
2391
2391
|
icon: "arrowUpSLine",
|
|
2392
|
-
disabled:
|
|
2393
|
-
}, { ref_for: !0 }, { "aria-label": s(
|
|
2392
|
+
disabled: h === 0
|
|
2393
|
+
}, { ref_for: !0 }, { "aria-label": s(l)("core.form.dynamic.repeat.up", { n: h + 1 }) }, {
|
|
2394
2394
|
"data-move": "up",
|
|
2395
|
-
onClick: (
|
|
2395
|
+
onClick: (C) => _(h, -1)
|
|
2396
2396
|
}), null, 16, ["disabled", "onClick"]),
|
|
2397
|
-
N(
|
|
2397
|
+
N(le, P({
|
|
2398
2398
|
size: "xs",
|
|
2399
2399
|
prominence: "plain",
|
|
2400
2400
|
icon: "arrowDownSLine",
|
|
2401
|
-
disabled:
|
|
2402
|
-
}, { ref_for: !0 }, { "aria-label": s(
|
|
2401
|
+
disabled: h === e.modelValue.length - 1
|
|
2402
|
+
}, { ref_for: !0 }, { "aria-label": s(l)("core.form.dynamic.repeat.down", { n: h + 1 }) }, {
|
|
2403
2403
|
"data-move": "down",
|
|
2404
|
-
onClick: (
|
|
2404
|
+
onClick: (C) => _(h, 1)
|
|
2405
2405
|
}), null, 16, ["disabled", "onClick"]),
|
|
2406
|
-
N(
|
|
2406
|
+
N(le, P({
|
|
2407
2407
|
size: "xs",
|
|
2408
2408
|
prominence: "plain",
|
|
2409
2409
|
tone: "critical",
|
|
2410
2410
|
icon: "deleteBin2Line"
|
|
2411
|
-
}, { ref_for: !0 }, { "aria-label": s(
|
|
2411
|
+
}, { ref_for: !0 }, { "aria-label": s(l)("core.form.dynamic.repeat.remove", { n: h + 1 }) }, {
|
|
2412
2412
|
"data-remove": "",
|
|
2413
|
-
onClick: (
|
|
2413
|
+
onClick: (C) => k(h)
|
|
2414
2414
|
}), null, 16, ["onClick"])
|
|
2415
2415
|
])) : z("", !0)
|
|
2416
2416
|
]),
|
|
2417
2417
|
N(Al, {
|
|
2418
2418
|
schema: { fields: e.fields },
|
|
2419
|
-
"model-value":
|
|
2419
|
+
"model-value": y,
|
|
2420
2420
|
locales: e.locales,
|
|
2421
2421
|
"default-locale": e.defaultLocale,
|
|
2422
|
-
errors: m(
|
|
2422
|
+
errors: m(h),
|
|
2423
2423
|
resources: e.resources,
|
|
2424
2424
|
readonly: !s(i) || e.disabled,
|
|
2425
2425
|
"locale-mode": e.localeMode,
|
|
2426
|
-
"onUpdate:modelValue": (
|
|
2426
|
+
"onUpdate:modelValue": (C) => n(h, C)
|
|
2427
2427
|
}, null, 8, ["schema", "model-value", "locales", "default-locale", "errors", "resources", "readonly", "locale-mode", "onUpdate:modelValue"])
|
|
2428
2428
|
]))), 128)),
|
|
2429
2429
|
s(i) && !e.disabled ? (d(), g("div", vl, [
|
|
2430
|
-
N(
|
|
2430
|
+
N(le, {
|
|
2431
2431
|
icon: "addLine",
|
|
2432
2432
|
"data-add": "",
|
|
2433
|
-
onClick:
|
|
2433
|
+
onClick: b
|
|
2434
2434
|
}, {
|
|
2435
|
-
default:
|
|
2436
|
-
|
|
2435
|
+
default: w(() => [
|
|
2436
|
+
Q(F(e.addLabel ?? s(l)("core.form.dynamic.repeat.add")), 1)
|
|
2437
2437
|
]),
|
|
2438
2438
|
_: 1
|
|
2439
2439
|
})
|
|
@@ -2459,7 +2459,7 @@ const Qo = {
|
|
|
2459
2459
|
}, wl = ["onClick"], $l = ["src", "alt"], Vl = {
|
|
2460
2460
|
key: 0,
|
|
2461
2461
|
class: "truncate text-xs"
|
|
2462
|
-
}, Cl = { class: "flex justify-between" }, St = /* @__PURE__ */
|
|
2462
|
+
}, Cl = { class: "flex justify-between" }, St = /* @__PURE__ */ J({
|
|
2463
2463
|
__name: "ResourcePickerList",
|
|
2464
2464
|
props: {
|
|
2465
2465
|
source: {},
|
|
@@ -2467,93 +2467,93 @@ const Qo = {
|
|
|
2467
2467
|
},
|
|
2468
2468
|
emits: ["select"],
|
|
2469
2469
|
setup(o, { emit: a }) {
|
|
2470
|
-
const e = o, t = a, { t:
|
|
2471
|
-
let
|
|
2472
|
-
async function
|
|
2473
|
-
|
|
2474
|
-
const
|
|
2475
|
-
|
|
2470
|
+
const e = o, t = a, { t: l } = te(), i = W(""), p = W(1), u = W(1), c = W([]), b = W("loading");
|
|
2471
|
+
let k = null, _;
|
|
2472
|
+
async function n() {
|
|
2473
|
+
k?.abort();
|
|
2474
|
+
const x = k = new AbortController();
|
|
2475
|
+
b.value = "loading";
|
|
2476
2476
|
try {
|
|
2477
|
-
const
|
|
2478
|
-
if (
|
|
2479
|
-
|
|
2477
|
+
const y = await e.source.list({ search: i.value.trim(), page: p.value, pageSize: 24, ...e.accept !== void 0 ? { accept: e.accept } : {} }, { signal: x.signal });
|
|
2478
|
+
if (x.signal.aborted) return;
|
|
2479
|
+
c.value = y.rows, u.value = Math.max(1, y.lastPage), b.value = "loaded";
|
|
2480
2480
|
} catch {
|
|
2481
|
-
|
|
2481
|
+
x.signal.aborted || (b.value = "failed");
|
|
2482
2482
|
}
|
|
2483
2483
|
}
|
|
2484
2484
|
function m() {
|
|
2485
|
-
clearTimeout(
|
|
2486
|
-
p.value = 1,
|
|
2485
|
+
clearTimeout(_), _ = setTimeout(() => {
|
|
2486
|
+
p.value = 1, n();
|
|
2487
2487
|
}, 250);
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2490
|
-
p.value +=
|
|
2489
|
+
function f(x) {
|
|
2490
|
+
p.value += x, n();
|
|
2491
2491
|
}
|
|
2492
|
-
return Ie(() => void
|
|
2493
|
-
clearTimeout(
|
|
2494
|
-
}), (
|
|
2495
|
-
ft(
|
|
2496
|
-
"onUpdate:modelValue":
|
|
2492
|
+
return Ie(() => void n()), Fe(() => {
|
|
2493
|
+
clearTimeout(_), k?.abort();
|
|
2494
|
+
}), (x, y) => (d(), g("div", yl, [
|
|
2495
|
+
ft($("input", {
|
|
2496
|
+
"onUpdate:modelValue": y[0] || (y[0] = (h) => i.value = h),
|
|
2497
2497
|
type: "search",
|
|
2498
2498
|
class: "w-full rounded-md border border-border bg-surface px-3 py-2 text-sm",
|
|
2499
|
-
placeholder: s(
|
|
2500
|
-
"aria-label": s(
|
|
2499
|
+
placeholder: s(l)("core.form.dynamic.resource.search"),
|
|
2500
|
+
"aria-label": s(l)("core.form.dynamic.resource.search"),
|
|
2501
2501
|
onInput: m
|
|
2502
2502
|
}, null, 40, gl), [
|
|
2503
2503
|
[pt, i.value]
|
|
2504
2504
|
]),
|
|
2505
|
-
|
|
2506
|
-
(d(!0), g(
|
|
2507
|
-
key:
|
|
2505
|
+
b.value === "failed" ? (d(), g("p", hl, F(s(l)("core.form.dynamic.resource.failed")), 1)) : b.value === "loading" && c.value.length === 0 ? (d(), g("p", kl, F(s(l)("core.form.dynamic.resource.loading")), 1)) : c.value.length === 0 ? (d(), g("p", _l, F(s(l)("core.form.dynamic.resource.empty")), 1)) : (d(), g("ul", xl, [
|
|
2506
|
+
(d(!0), g(X, null, ce(c.value, (h) => (d(), g("li", {
|
|
2507
|
+
key: h.id
|
|
2508
2508
|
}, [
|
|
2509
|
-
|
|
2509
|
+
$("button", {
|
|
2510
2510
|
type: "button",
|
|
2511
2511
|
class: "flex w-full flex-col gap-1 rounded-md border border-border p-1 text-left hover:border-accent focus-visible:outline-2",
|
|
2512
|
-
onClick: (
|
|
2512
|
+
onClick: (C) => t("select", h)
|
|
2513
2513
|
}, [
|
|
2514
|
-
|
|
2515
|
-
src: s(
|
|
2516
|
-
alt:
|
|
2514
|
+
$("img", {
|
|
2515
|
+
src: s(Ke)(e.source, h.id),
|
|
2516
|
+
alt: h.name ?? "",
|
|
2517
2517
|
class: "aspect-square w-full rounded object-cover",
|
|
2518
2518
|
loading: "lazy"
|
|
2519
2519
|
}, null, 8, $l),
|
|
2520
|
-
|
|
2520
|
+
h.name ? (d(), g("span", Vl, F(h.name), 1)) : z("", !0)
|
|
2521
2521
|
], 8, wl)
|
|
2522
2522
|
]))), 128))
|
|
2523
2523
|
])),
|
|
2524
|
-
|
|
2525
|
-
N(
|
|
2524
|
+
$("div", Cl, [
|
|
2525
|
+
N(le, {
|
|
2526
2526
|
prominence: "plain",
|
|
2527
2527
|
disabled: p.value <= 1,
|
|
2528
|
-
onClick:
|
|
2528
|
+
onClick: y[1] || (y[1] = (h) => f(-1))
|
|
2529
2529
|
}, {
|
|
2530
|
-
default:
|
|
2531
|
-
|
|
2530
|
+
default: w(() => [
|
|
2531
|
+
Q(F(s(l)("core.form.dynamic.resource.previous")), 1)
|
|
2532
2532
|
]),
|
|
2533
2533
|
_: 1
|
|
2534
2534
|
}, 8, ["disabled"]),
|
|
2535
|
-
N(
|
|
2535
|
+
N(le, {
|
|
2536
2536
|
prominence: "plain",
|
|
2537
2537
|
disabled: p.value >= u.value,
|
|
2538
|
-
onClick:
|
|
2538
|
+
onClick: y[2] || (y[2] = (h) => f(1))
|
|
2539
2539
|
}, {
|
|
2540
|
-
default:
|
|
2541
|
-
|
|
2540
|
+
default: w(() => [
|
|
2541
|
+
Q(F(s(l)("core.form.dynamic.resource.next")), 1)
|
|
2542
2542
|
]),
|
|
2543
2543
|
_: 1
|
|
2544
2544
|
}, 8, ["disabled"])
|
|
2545
2545
|
])
|
|
2546
2546
|
]));
|
|
2547
2547
|
}
|
|
2548
|
-
}), Sl = ["id"],
|
|
2548
|
+
}), Sl = ["id"], Bl = ["src"], ql = {
|
|
2549
2549
|
key: 0,
|
|
2550
2550
|
class: "mt-1 flex justify-between"
|
|
2551
|
-
},
|
|
2551
|
+
}, Fl = {
|
|
2552
2552
|
key: 0,
|
|
2553
2553
|
class: "text-sm text-muted"
|
|
2554
|
-
}, Ll = /* @__PURE__ */
|
|
2554
|
+
}, Ll = /* @__PURE__ */ J({
|
|
2555
2555
|
__name: "ResourceField",
|
|
2556
|
-
props: /* @__PURE__ */
|
|
2556
|
+
props: /* @__PURE__ */ me({
|
|
2557
2557
|
label: {},
|
|
2558
2558
|
labelHidden: { type: Boolean },
|
|
2559
2559
|
hint: {},
|
|
@@ -2568,78 +2568,78 @@ const Qo = {
|
|
|
2568
2568
|
multiple: { type: Boolean },
|
|
2569
2569
|
accept: {},
|
|
2570
2570
|
modelValue: {}
|
|
2571
|
-
}, { ...
|
|
2571
|
+
}, { ...pe, multiple: !1, accept: void 0, modelValue: void 0 }),
|
|
2572
2572
|
emits: ["update:modelValue"],
|
|
2573
2573
|
setup(o, { emit: a }) {
|
|
2574
|
-
const e = o, t = a, { t:
|
|
2575
|
-
function
|
|
2576
|
-
t("update:modelValue", e.multiple ?
|
|
2574
|
+
const e = o, t = a, { t: l } = te(), { editable: i } = Se(e), p = _t(), u = L(() => Array.isArray(e.modelValue) ? [...e.modelValue] : e.modelValue === null || e.modelValue === void 0 || e.modelValue === "" ? [] : [e.modelValue]);
|
|
2575
|
+
function c(_) {
|
|
2576
|
+
t("update:modelValue", e.multiple ? _ : _[0] ?? null);
|
|
2577
2577
|
}
|
|
2578
|
-
async function
|
|
2579
|
-
const
|
|
2580
|
-
if (!
|
|
2578
|
+
async function b(_) {
|
|
2579
|
+
const n = await p.pick({ title: e.label ?? l("core.form.dynamic.resource.title") });
|
|
2580
|
+
if (!n) return;
|
|
2581
2581
|
const m = [...u.value];
|
|
2582
|
-
e.multiple &&
|
|
2582
|
+
e.multiple && _ === void 0 ? m.push(n.id) : m[_ ?? 0] = n.id, c(m);
|
|
2583
2583
|
}
|
|
2584
|
-
const
|
|
2585
|
-
return (
|
|
2584
|
+
const k = (_) => c(u.value.filter((n, m) => m !== _));
|
|
2585
|
+
return (_, n) => (d(), R(be, P(s(fe)(e), {
|
|
2586
2586
|
"row-layout": "stacked",
|
|
2587
2587
|
value: u.value.length > 0 ? u.value.join(", ") : null
|
|
2588
2588
|
}), {
|
|
2589
|
-
default:
|
|
2590
|
-
|
|
2589
|
+
default: w(({ id: m }) => [
|
|
2590
|
+
$("div", {
|
|
2591
2591
|
id: m,
|
|
2592
2592
|
class: "flex flex-wrap items-start gap-2"
|
|
2593
2593
|
}, [
|
|
2594
|
-
(d(!0), g(
|
|
2595
|
-
key: `${
|
|
2594
|
+
(d(!0), g(X, null, ce(u.value, (f, x) => (d(), g("div", {
|
|
2595
|
+
key: `${f}-${x}`,
|
|
2596
2596
|
class: "relative w-24",
|
|
2597
2597
|
"data-resource": ""
|
|
2598
2598
|
}, [
|
|
2599
|
-
|
|
2600
|
-
src: s(
|
|
2599
|
+
$("img", {
|
|
2600
|
+
src: s(Ke)(e.source, f),
|
|
2601
2601
|
alt: "",
|
|
2602
2602
|
class: "aspect-square w-full rounded-md border border-border object-cover"
|
|
2603
|
-
}, null, 8,
|
|
2604
|
-
s(i) && !e.disabled ? (d(), g("div",
|
|
2605
|
-
N(
|
|
2603
|
+
}, null, 8, Bl),
|
|
2604
|
+
s(i) && !e.disabled ? (d(), g("div", ql, [
|
|
2605
|
+
N(le, {
|
|
2606
2606
|
size: "xs",
|
|
2607
2607
|
prominence: "plain",
|
|
2608
|
-
onClick: (
|
|
2608
|
+
onClick: (y) => b(x)
|
|
2609
2609
|
}, {
|
|
2610
|
-
default:
|
|
2611
|
-
|
|
2610
|
+
default: w(() => [
|
|
2611
|
+
Q(F(s(l)("core.form.dynamic.resource.change")), 1)
|
|
2612
2612
|
]),
|
|
2613
2613
|
_: 1
|
|
2614
2614
|
}, 8, ["onClick"]),
|
|
2615
|
-
N(
|
|
2615
|
+
N(le, P({
|
|
2616
2616
|
size: "xs",
|
|
2617
2617
|
prominence: "plain",
|
|
2618
2618
|
tone: "critical",
|
|
2619
2619
|
icon: "close"
|
|
2620
|
-
}, { ref_for: !0 }, { "aria-label": s(
|
|
2621
|
-
onClick: (
|
|
2620
|
+
}, { ref_for: !0 }, { "aria-label": s(l)("core.form.dynamic.resource.remove") }, {
|
|
2621
|
+
onClick: (y) => k(x)
|
|
2622
2622
|
}), null, 16, ["onClick"])
|
|
2623
2623
|
])) : z("", !0)
|
|
2624
2624
|
]))), 128)),
|
|
2625
|
-
u.value.length === 0 && !s(i) ? (d(), g("p",
|
|
2626
|
-
s(i) && !e.disabled && (e.multiple || u.value.length === 0) ? (d(), R(
|
|
2625
|
+
u.value.length === 0 && !s(i) ? (d(), g("p", Fl, F(s(l)("core.form.dynamic.resource.none")), 1)) : z("", !0),
|
|
2626
|
+
s(i) && !e.disabled && (e.multiple || u.value.length === 0) ? (d(), R(le, {
|
|
2627
2627
|
key: 1,
|
|
2628
2628
|
icon: "addLine",
|
|
2629
|
-
onClick:
|
|
2629
|
+
onClick: n[0] || (n[0] = (f) => b())
|
|
2630
2630
|
}, {
|
|
2631
|
-
default:
|
|
2632
|
-
|
|
2631
|
+
default: w(() => [
|
|
2632
|
+
Q(F(s(l)("core.form.dynamic.resource.choose")), 1)
|
|
2633
2633
|
]),
|
|
2634
2634
|
_: 1
|
|
2635
2635
|
})) : z("", !0)
|
|
2636
2636
|
], 8, Sl),
|
|
2637
2637
|
N(xt, { picker: s(p) }, {
|
|
2638
|
-
default:
|
|
2638
|
+
default: w(({ select: f }) => [
|
|
2639
2639
|
N(St, {
|
|
2640
2640
|
source: e.source,
|
|
2641
2641
|
accept: e.accept,
|
|
2642
|
-
onSelect:
|
|
2642
|
+
onSelect: f
|
|
2643
2643
|
}, null, 8, ["source", "accept", "onSelect"])
|
|
2644
2644
|
]),
|
|
2645
2645
|
_: 1
|
|
@@ -2648,13 +2648,13 @@ const Qo = {
|
|
|
2648
2648
|
_: 1
|
|
2649
2649
|
}, 16, ["value"]));
|
|
2650
2650
|
}
|
|
2651
|
-
}), Tl = { class: "w-full rounded-md border border-border bg-surface" },
|
|
2651
|
+
}), Tl = { class: "w-full rounded-md border border-border bg-surface" }, Ml = ["aria-label"], zl = ["data-tool", "aria-label", "title", "aria-pressed", "disabled", "onClick"], Dl = ["aria-label", "placeholder"], Rl = {
|
|
2652
2652
|
key: 2,
|
|
2653
2653
|
role: "alert",
|
|
2654
2654
|
class: "p-3 text-sm text-critical"
|
|
2655
|
-
},
|
|
2655
|
+
}, jl = ["id"], it = /* @__PURE__ */ J({
|
|
2656
2656
|
__name: "RichTextField",
|
|
2657
|
-
props: /* @__PURE__ */
|
|
2657
|
+
props: /* @__PURE__ */ me({
|
|
2658
2658
|
label: {},
|
|
2659
2659
|
labelHidden: { type: Boolean },
|
|
2660
2660
|
hint: {},
|
|
@@ -2669,132 +2669,132 @@ const Qo = {
|
|
|
2669
2669
|
images: {},
|
|
2670
2670
|
video: { type: Boolean },
|
|
2671
2671
|
placeholder: {}
|
|
2672
|
-
}, { ...
|
|
2672
|
+
}, { ...pe, modelValue: "", images: void 0, video: !1, placeholder: void 0 }),
|
|
2673
2673
|
emits: ["update:modelValue"],
|
|
2674
2674
|
setup(o, { emit: a }) {
|
|
2675
|
-
const e = o, t = a, { t:
|
|
2676
|
-
let
|
|
2677
|
-
const
|
|
2678
|
-
function
|
|
2679
|
-
|
|
2675
|
+
const e = o, t = a, { t: l } = te(), { editable: i } = Se(e), p = oe("host"), u = W(!1), c = W(!1), b = _t(), k = W(null), _ = W("");
|
|
2676
|
+
let n = null, m = "", f = null;
|
|
2677
|
+
const x = W({}), y = () => n ? n.getText().trim() === "" && !n.root.querySelector("img, iframe") ? "" : n.getSemanticHTML() : "";
|
|
2678
|
+
function h(j) {
|
|
2679
|
+
n && (n.setContents(n.clipboard.convert({ html: j }), "silent"), m = y());
|
|
2680
2680
|
}
|
|
2681
2681
|
Ie(async () => {
|
|
2682
2682
|
try {
|
|
2683
|
-
const { default:
|
|
2683
|
+
const { default: j } = await import("quill");
|
|
2684
2684
|
if (!p.value) return;
|
|
2685
|
-
|
|
2685
|
+
n = new j(p.value, { modules: { toolbar: !1 }, placeholder: e.placeholder, readOnly: !i.value || e.disabled });
|
|
2686
2686
|
} catch {
|
|
2687
2687
|
u.value = !0;
|
|
2688
2688
|
return;
|
|
2689
2689
|
}
|
|
2690
|
-
|
|
2691
|
-
m =
|
|
2692
|
-
}),
|
|
2693
|
-
|
|
2694
|
-
}),
|
|
2695
|
-
}),
|
|
2696
|
-
|
|
2697
|
-
}),
|
|
2698
|
-
const
|
|
2699
|
-
if (!
|
|
2700
|
-
|
|
2701
|
-
const
|
|
2702
|
-
|
|
2703
|
-
},
|
|
2704
|
-
function
|
|
2705
|
-
|
|
2690
|
+
h(e.modelValue), n.on("text-change", (j, T, Z) => {
|
|
2691
|
+
m = y(), Z === "user" && t("update:modelValue", m);
|
|
2692
|
+
}), n.on("selection-change", (j) => {
|
|
2693
|
+
j && (f = j, x.value = n?.getFormat(j) ?? {});
|
|
2694
|
+
}), c.value = !0;
|
|
2695
|
+
}), Fe(() => n?.disable()), re(() => e.modelValue, (j) => {
|
|
2696
|
+
j !== m && h(j);
|
|
2697
|
+
}), re(() => !i.value || e.disabled, (j) => n?.enable(!j));
|
|
2698
|
+
const C = (j, T) => {
|
|
2699
|
+
if (!n) return;
|
|
2700
|
+
n.focus();
|
|
2701
|
+
const Z = n.getFormat();
|
|
2702
|
+
n.format(j, Z[j] === T ? !1 : T, "user"), x.value = n.getFormat();
|
|
2703
|
+
}, q = (j, T = !0) => x.value[j] === T;
|
|
2704
|
+
function B(j) {
|
|
2705
|
+
f = n?.getSelection() ?? f, _.value = "", k.value = j;
|
|
2706
2706
|
}
|
|
2707
|
-
async function
|
|
2708
|
-
const
|
|
2709
|
-
if (
|
|
2710
|
-
|
|
2711
|
-
const
|
|
2712
|
-
|
|
2707
|
+
async function V() {
|
|
2708
|
+
const j = _.value.trim(), T = k.value;
|
|
2709
|
+
if (k.value = null, !n || j === "" || !T) return;
|
|
2710
|
+
n.focus(), f && n.setSelection(f);
|
|
2711
|
+
const Z = f ?? { index: n.getLength() };
|
|
2712
|
+
T === "link" ? n.format("link", j, "user") : n.insertEmbed(Z.index, "video", j, "user");
|
|
2713
2713
|
}
|
|
2714
|
-
async function
|
|
2715
|
-
|
|
2716
|
-
const
|
|
2717
|
-
if (!
|
|
2718
|
-
const
|
|
2719
|
-
|
|
2714
|
+
async function O() {
|
|
2715
|
+
f = n?.getSelection() ?? f;
|
|
2716
|
+
const j = await b.pick({ title: l("core.form.dynamic.rich_text.image") });
|
|
2717
|
+
if (!j || !n || !e.images) return;
|
|
2718
|
+
const T = { thumbnail: e.images.image ?? e.images.thumbnail };
|
|
2719
|
+
n.insertEmbed(f?.index ?? n.getLength(), "image", Ke(T, j.id), "user");
|
|
2720
2720
|
}
|
|
2721
|
-
const H =
|
|
2722
|
-
{ key: "heading", label:
|
|
2723
|
-
{ key: "bold", label:
|
|
2724
|
-
{ key: "italic", label:
|
|
2725
|
-
{ key: "bullets", label:
|
|
2726
|
-
{ key: "numbers", label:
|
|
2727
|
-
{ key: "link", label:
|
|
2728
|
-
...e.images ? [{ key: "image", label:
|
|
2729
|
-
...e.video ? [{ key: "video", label:
|
|
2721
|
+
const H = L(() => [
|
|
2722
|
+
{ key: "heading", label: l("core.form.dynamic.rich_text.heading"), text: "H", on: q("header", 2), run: () => C("header", 2) },
|
|
2723
|
+
{ key: "bold", label: l("core.form.dynamic.rich_text.bold"), text: "B", on: q("bold"), run: () => C("bold", !0) },
|
|
2724
|
+
{ key: "italic", label: l("core.form.dynamic.rich_text.italic"), text: "I", on: q("italic"), run: () => C("italic", !0) },
|
|
2725
|
+
{ key: "bullets", label: l("core.form.dynamic.rich_text.bullets"), text: "•", on: q("list", "bullet"), run: () => C("list", "bullet") },
|
|
2726
|
+
{ key: "numbers", label: l("core.form.dynamic.rich_text.numbers"), text: "1.", on: q("list", "ordered"), run: () => C("list", "ordered") },
|
|
2727
|
+
{ key: "link", label: l("core.form.dynamic.rich_text.link"), text: "↗", on: typeof x.value.link == "string", run: () => B("link") },
|
|
2728
|
+
...e.images ? [{ key: "image", label: l("core.form.dynamic.rich_text.image"), text: "▣", on: !1, run: () => void O() }] : [],
|
|
2729
|
+
...e.video ? [{ key: "video", label: l("core.form.dynamic.rich_text.video"), text: "▶", on: !1, run: () => B("video") }] : []
|
|
2730
2730
|
]);
|
|
2731
|
-
return (
|
|
2731
|
+
return (j, T) => (d(), R(be, P(s(fe)(e), {
|
|
2732
2732
|
"row-layout": "stacked",
|
|
2733
2733
|
value: null
|
|
2734
2734
|
}), {
|
|
2735
|
-
default:
|
|
2736
|
-
|
|
2735
|
+
default: w(({ id: Z }) => [
|
|
2736
|
+
$("div", Tl, [
|
|
2737
2737
|
s(i) && !e.disabled ? (d(), g("div", {
|
|
2738
2738
|
key: 0,
|
|
2739
2739
|
class: "flex flex-wrap gap-1 border-b border-border p-1",
|
|
2740
2740
|
role: "toolbar",
|
|
2741
2741
|
"aria-label": e.label
|
|
2742
2742
|
}, [
|
|
2743
|
-
(d(!0), g(
|
|
2744
|
-
key:
|
|
2743
|
+
(d(!0), g(X, null, ce(H.value, (D) => (d(), g("button", {
|
|
2744
|
+
key: D.key,
|
|
2745
2745
|
type: "button",
|
|
2746
|
-
"data-tool":
|
|
2747
|
-
"aria-label":
|
|
2748
|
-
title:
|
|
2749
|
-
"aria-pressed":
|
|
2750
|
-
disabled: !
|
|
2746
|
+
"data-tool": D.key,
|
|
2747
|
+
"aria-label": D.label,
|
|
2748
|
+
title: D.label,
|
|
2749
|
+
"aria-pressed": D.on,
|
|
2750
|
+
disabled: !c.value,
|
|
2751
2751
|
class: "min-w-8 rounded px-2 py-1 text-sm font-medium hover:bg-surface-muted aria-pressed:bg-surface-muted",
|
|
2752
|
-
onMousedown:
|
|
2752
|
+
onMousedown: T[0] || (T[0] = he(() => {
|
|
2753
2753
|
}, ["prevent"])),
|
|
2754
|
-
onClick:
|
|
2755
|
-
},
|
|
2756
|
-
], 8,
|
|
2757
|
-
|
|
2754
|
+
onClick: D.run
|
|
2755
|
+
}, F(D.text), 41, zl))), 128))
|
|
2756
|
+
], 8, Ml)) : z("", !0),
|
|
2757
|
+
k.value ? (d(), g("form", {
|
|
2758
2758
|
key: 1,
|
|
2759
2759
|
class: "flex gap-2 border-b border-border p-2",
|
|
2760
|
-
onSubmit: he(
|
|
2760
|
+
onSubmit: he(V, ["prevent"])
|
|
2761
2761
|
}, [
|
|
2762
|
-
ft(
|
|
2763
|
-
"onUpdate:modelValue":
|
|
2762
|
+
ft($("input", {
|
|
2763
|
+
"onUpdate:modelValue": T[1] || (T[1] = (D) => _.value = D),
|
|
2764
2764
|
type: "url",
|
|
2765
2765
|
class: "w-full rounded-md border border-border bg-surface px-2 py-1 text-sm",
|
|
2766
|
-
"aria-label":
|
|
2767
|
-
placeholder:
|
|
2768
|
-
}, null, 8,
|
|
2769
|
-
[pt,
|
|
2766
|
+
"aria-label": k.value === "link" ? s(l)("core.form.dynamic.rich_text.link_prompt") : s(l)("core.form.dynamic.rich_text.video_prompt"),
|
|
2767
|
+
placeholder: k.value === "link" ? s(l)("core.form.dynamic.rich_text.link_prompt") : s(l)("core.form.dynamic.rich_text.video_prompt")
|
|
2768
|
+
}, null, 8, Dl), [
|
|
2769
|
+
[pt, _.value]
|
|
2770
2770
|
]),
|
|
2771
|
-
N(
|
|
2771
|
+
N(le, {
|
|
2772
2772
|
type: "submit",
|
|
2773
2773
|
size: "sm"
|
|
2774
2774
|
}, {
|
|
2775
|
-
default:
|
|
2776
|
-
|
|
2775
|
+
default: w(() => [...T[2] || (T[2] = [
|
|
2776
|
+
Q("OK", -1)
|
|
2777
2777
|
])]),
|
|
2778
2778
|
_: 1
|
|
2779
2779
|
})
|
|
2780
2780
|
], 32)) : z("", !0),
|
|
2781
|
-
u.value ? (d(), g("p", Rl,
|
|
2782
|
-
|
|
2783
|
-
id:
|
|
2781
|
+
u.value ? (d(), g("p", Rl, F(s(l)("core.form.dynamic.rich_text.failed")), 1)) : z("", !0),
|
|
2782
|
+
$("div", {
|
|
2783
|
+
id: Z,
|
|
2784
2784
|
ref_key: "host",
|
|
2785
2785
|
ref: p,
|
|
2786
|
-
class:
|
|
2787
|
-
}, null, 10,
|
|
2786
|
+
class: G(["min-h-32 px-3 py-2 text-sm [&_.ql-clipboard]:absolute [&_.ql-clipboard]:-left-[100000px] [&_.ql-editor]:min-h-28 [&_.ql-editor]:outline-none [&_.ql-editor_h2]:text-lg [&_.ql-editor_h2]:font-semibold [&_.ql-editor_img]:max-w-full [&_.ql-editor_ol]:pl-6 [&_.ql-editor_li[data-list=bullet]]:list-disc [&_.ql-editor_li[data-list=ordered]]:list-decimal [&_.ql-editor_a]:text-accent [&_.ql-editor_a]:underline [&_.ql-ui]:hidden [&_.ql-editor.ql-blank::before]:text-muted [&_.ql-editor.ql-blank::before]:content-[attr(data-placeholder)]", { hidden: u.value }])
|
|
2787
|
+
}, null, 10, jl)
|
|
2788
2788
|
]),
|
|
2789
2789
|
e.images ? (d(), R(xt, {
|
|
2790
2790
|
key: 0,
|
|
2791
|
-
picker: s(
|
|
2791
|
+
picker: s(b)
|
|
2792
2792
|
}, {
|
|
2793
|
-
default:
|
|
2793
|
+
default: w(({ select: D }) => [
|
|
2794
2794
|
N(St, {
|
|
2795
2795
|
source: e.images,
|
|
2796
2796
|
accept: "image/*",
|
|
2797
|
-
onSelect:
|
|
2797
|
+
onSelect: D
|
|
2798
2798
|
}, null, 8, ["source", "onSelect"])
|
|
2799
2799
|
]),
|
|
2800
2800
|
_: 1
|
|
@@ -2807,25 +2807,25 @@ const Qo = {
|
|
|
2807
2807
|
function $e(o) {
|
|
2808
2808
|
return o == null ? !0 : typeof o == "string" ? o.trim() === "" : Array.isArray(o) ? o.length === 0 : typeof o == "object" ? Object.values(o).every($e) : !1;
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2810
|
+
function Me(o, a) {
|
|
2811
2811
|
if (o === a) return !0;
|
|
2812
2812
|
if (typeof o != "object" || typeof a != "object" || o === null || a === null || Array.isArray(o) !== Array.isArray(a)) return !1;
|
|
2813
|
-
const e = o, t = a,
|
|
2814
|
-
return
|
|
2813
|
+
const e = o, t = a, l = Object.keys(e);
|
|
2814
|
+
return l.length === Object.keys(t).length && l.every((i) => i in t && Me(e[i], t[i]));
|
|
2815
2815
|
}
|
|
2816
|
-
function
|
|
2816
|
+
function Ol(o, a) {
|
|
2817
2817
|
const e = a[o.field];
|
|
2818
|
-
return "eq" in o ?
|
|
2818
|
+
return "eq" in o ? Me(e, o.eq) : "ne" in o ? !Me(e, o.ne) : "in" in o ? Array.isArray(o.in) ? o.in.some((t) => Me(e, t)) : null : "empty" in o ? $e(e) : "not_empty" in o ? !$e(e) : null;
|
|
2819
2819
|
}
|
|
2820
|
-
function
|
|
2820
|
+
function Bt(o, a) {
|
|
2821
2821
|
if (!o) return !0;
|
|
2822
|
-
const e = (o.all ?? o.any ?? []).map((t) =>
|
|
2822
|
+
const e = (o.all ?? o.any ?? []).map((t) => Ol(t, a)).filter((t) => t !== null);
|
|
2823
2823
|
return e.length === 0 ? !0 : o.all ? e.every(Boolean) : e.some(Boolean);
|
|
2824
2824
|
}
|
|
2825
2825
|
const El = {
|
|
2826
2826
|
class: "flex w-full flex-col gap-4",
|
|
2827
2827
|
"data-dynamic-form": ""
|
|
2828
|
-
}, Nl = ["aria-label"], Ul = ["id", "aria-selected", "data-locale", "data-error", "onClick"], Al = /* @__PURE__ */
|
|
2828
|
+
}, Nl = ["aria-label"], Ul = ["id", "aria-selected", "data-locale", "data-error", "onClick"], Al = /* @__PURE__ */ J({
|
|
2829
2829
|
__name: "DynamicForm",
|
|
2830
2830
|
props: {
|
|
2831
2831
|
schema: {},
|
|
@@ -2839,204 +2839,204 @@ const El = {
|
|
|
2839
2839
|
},
|
|
2840
2840
|
emits: ["update:modelValue"],
|
|
2841
2841
|
setup(o, { emit: a }) {
|
|
2842
|
-
const e = o, t = a, { t:
|
|
2843
|
-
function S
|
|
2844
|
-
const I =
|
|
2842
|
+
const e = o, t = a, { t: l, availableLocales: i } = te(), p = ze(ht, null), u = L(() => e.locales ?? p?.locales ?? i), c = L(() => e.defaultLocale ?? u.value[0] ?? ""), b = L(() => e.errors instanceof Tt ? e.errors.all() : e.errors);
|
|
2843
|
+
function k(S) {
|
|
2844
|
+
const I = b.value[S]?.[0];
|
|
2845
2845
|
if (I !== void 0) return I;
|
|
2846
|
-
const
|
|
2847
|
-
return
|
|
2846
|
+
const r = Object.keys(b.value).find((v) => v.startsWith(`${S}.`));
|
|
2847
|
+
return r === void 0 ? void 0 : b.value[r]?.[0];
|
|
2848
2848
|
}
|
|
2849
|
-
const
|
|
2850
|
-
function m(
|
|
2851
|
-
t("update:modelValue", { ...e.modelValue, [
|
|
2849
|
+
const _ = (S) => Object.fromEntries(Object.entries(b.value).filter(([I]) => I.startsWith(`${S}.`)).map(([I, r]) => [I.slice(S.length + 1), r])), n = L(() => e.schema.fields.filter((S) => Bt(S.visible_when, e.modelValue)));
|
|
2850
|
+
function m(S, I) {
|
|
2851
|
+
t("update:modelValue", { ...e.modelValue, [S]: I });
|
|
2852
2852
|
}
|
|
2853
|
-
const
|
|
2854
|
-
mt(st,
|
|
2855
|
-
const
|
|
2856
|
-
function
|
|
2857
|
-
m(
|
|
2853
|
+
const f = (S) => !!S.translatable && (S.kind === "text" || S.kind === "textarea" || S.kind === "rich_text"), x = (S) => f(S) && (e.localeMode === "form" || S.kind === "rich_text"), y = ze(st, null), h = L(() => e.localeMode === "form" && y !== null), C = W(null), q = L(() => h.value && y ? y.value : C.value !== null && u.value.includes(C.value) ? C.value : c.value), B = L(() => !h.value && n.value.some(x));
|
|
2854
|
+
mt(st, q);
|
|
2855
|
+
const V = (S) => typeof e.modelValue[S.key] == "object" && e.modelValue[S.key] !== null ? e.modelValue[S.key] : {}, O = (S) => b.value[`${S.key}.${q.value}`]?.[0] ?? b.value[S.key]?.[0], H = (S) => n.value.some((I) => f(I) && b.value[`${I.key}.${S}`] !== void 0);
|
|
2856
|
+
function j(S, I, r) {
|
|
2857
|
+
m(S.key, { ...V(S), [I]: r });
|
|
2858
2858
|
}
|
|
2859
|
-
const
|
|
2860
|
-
label:
|
|
2861
|
-
hint:
|
|
2862
|
-
required:
|
|
2863
|
-
error:
|
|
2859
|
+
const T = (S, I = S.key) => ({
|
|
2860
|
+
label: S.label,
|
|
2861
|
+
hint: S.props?.hint,
|
|
2862
|
+
required: S.required === !0,
|
|
2863
|
+
error: S.kind === "collection" ? b.value[S.key]?.[0] : k(S.key),
|
|
2864
2864
|
editable: !e.readonly,
|
|
2865
|
-
name:
|
|
2865
|
+
name: S.key,
|
|
2866
2866
|
"data-field-key": I
|
|
2867
|
-
}),
|
|
2868
|
-
const I =
|
|
2867
|
+
}), Z = (S, I) => S.validation?.some((r) => r.rule === I) === !0, D = (S) => {
|
|
2868
|
+
const I = S.validation?.find((r) => r.rule === "max")?.args?.[0];
|
|
2869
2869
|
return typeof I == "number" ? I : void 0;
|
|
2870
|
-
},
|
|
2871
|
-
const I = e.modelValue[
|
|
2870
|
+
}, ee = (S) => Array.isArray(e.modelValue[S.key]) ? e.modelValue[S.key] : [], ae = (S) => typeof e.modelValue[S.key] == "number" ? e.modelValue[S.key] : null, se = (S) => typeof e.modelValue[S.key] == "string" && e.modelValue[S.key] !== "" ? e.modelValue[S.key] : null, ne = (S) => {
|
|
2871
|
+
const I = e.modelValue[S.key];
|
|
2872
2872
|
return typeof I == "string" || typeof I == "number" ? I : null;
|
|
2873
|
-
},
|
|
2874
|
-
return (
|
|
2875
|
-
|
|
2873
|
+
}, ve = (S) => Array.isArray(e.modelValue[S.key]) ? e.modelValue[S.key] : [], _e = (S) => Array.isArray(e.modelValue[S.key]) ? e.modelValue[S.key] : [], ge = (S) => typeof e.modelValue[S.key] == "string" ? e.modelValue[S.key] : "";
|
|
2874
|
+
return (S, I) => (d(), g("div", El, [
|
|
2875
|
+
B.value ? (d(), g("div", {
|
|
2876
2876
|
key: 0,
|
|
2877
2877
|
role: "tablist",
|
|
2878
|
-
"aria-label": s(
|
|
2878
|
+
"aria-label": s(l)("core.form.dynamic.language"),
|
|
2879
2879
|
class: "flex gap-1"
|
|
2880
2880
|
}, [
|
|
2881
|
-
(d(!0), g(
|
|
2882
|
-
id: `dynamic-locale-${
|
|
2883
|
-
key:
|
|
2881
|
+
(d(!0), g(X, null, ce(u.value, (r) => (d(), g("button", {
|
|
2882
|
+
id: `dynamic-locale-${r}`,
|
|
2883
|
+
key: r,
|
|
2884
2884
|
type: "button",
|
|
2885
2885
|
role: "tab",
|
|
2886
|
-
"aria-selected":
|
|
2887
|
-
"data-locale":
|
|
2888
|
-
"data-error": H(
|
|
2886
|
+
"aria-selected": r === q.value,
|
|
2887
|
+
"data-locale": r,
|
|
2888
|
+
"data-error": H(r) || void 0,
|
|
2889
2889
|
class: "rounded-md px-3 py-1 text-sm font-medium uppercase aria-selected:bg-surface-muted data-[error]:text-critical",
|
|
2890
|
-
onClick: (
|
|
2891
|
-
},
|
|
2890
|
+
onClick: (v) => C.value = r
|
|
2891
|
+
}, F(r), 9, Ul))), 128))
|
|
2892
2892
|
], 8, Nl)) : z("", !0),
|
|
2893
|
-
(d(!0), g(
|
|
2894
|
-
key:
|
|
2893
|
+
(d(!0), g(X, null, ce(n.value, (r) => (d(), g(X, {
|
|
2894
|
+
key: r.key
|
|
2895
2895
|
}, [
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2896
|
+
f(r) ? (d(), g(X, { key: 0 }, [
|
|
2897
|
+
x(r) ? (d(), g(X, { key: 0 }, [
|
|
2898
|
+
r.kind === "rich_text" ? (d(), R(it, P({
|
|
2899
2899
|
key: 0,
|
|
2900
2900
|
ref_for: !0
|
|
2901
|
-
},
|
|
2902
|
-
error:
|
|
2903
|
-
"model-value":
|
|
2901
|
+
}, T(r), {
|
|
2902
|
+
error: O(r),
|
|
2903
|
+
"model-value": V(r)[q.value] ?? "",
|
|
2904
2904
|
images: e.resources,
|
|
2905
|
-
video:
|
|
2906
|
-
"onUpdate:modelValue": (
|
|
2907
|
-
}), null, 16, ["error", "model-value", "images", "video", "onUpdate:modelValue"])) :
|
|
2905
|
+
video: r.props?.video,
|
|
2906
|
+
"onUpdate:modelValue": (v) => j(r, q.value, v)
|
|
2907
|
+
}), null, 16, ["error", "model-value", "images", "video", "onUpdate:modelValue"])) : r.kind === "textarea" ? (d(), R(at, P({
|
|
2908
2908
|
key: 1,
|
|
2909
2909
|
ref_for: !0
|
|
2910
|
-
},
|
|
2911
|
-
error:
|
|
2912
|
-
"model-value":
|
|
2913
|
-
rows:
|
|
2914
|
-
placeholder:
|
|
2915
|
-
"max-length":
|
|
2916
|
-
"onUpdate:modelValue": (
|
|
2917
|
-
}), null, 16, ["error", "model-value", "rows", "placeholder", "max-length", "onUpdate:modelValue"])) : (d(), R(
|
|
2910
|
+
}, T(r), {
|
|
2911
|
+
error: O(r),
|
|
2912
|
+
"model-value": V(r)[q.value] ?? "",
|
|
2913
|
+
rows: r.props?.rows,
|
|
2914
|
+
placeholder: r.props?.placeholder,
|
|
2915
|
+
"max-length": D(r),
|
|
2916
|
+
"onUpdate:modelValue": (v) => j(r, q.value, v)
|
|
2917
|
+
}), null, 16, ["error", "model-value", "rows", "placeholder", "max-length", "onUpdate:modelValue"])) : (d(), R(Qe, P({
|
|
2918
2918
|
key: 2,
|
|
2919
2919
|
ref_for: !0
|
|
2920
|
-
},
|
|
2921
|
-
error:
|
|
2922
|
-
"model-value":
|
|
2923
|
-
placeholder:
|
|
2924
|
-
"max-length":
|
|
2925
|
-
"onUpdate:modelValue": (
|
|
2920
|
+
}, T(r), {
|
|
2921
|
+
error: O(r),
|
|
2922
|
+
"model-value": V(r)[q.value] ?? "",
|
|
2923
|
+
placeholder: r.props?.placeholder,
|
|
2924
|
+
"max-length": D(r),
|
|
2925
|
+
"onUpdate:modelValue": (v) => j(r, q.value, v)
|
|
2926
2926
|
}), null, 16, ["error", "model-value", "placeholder", "max-length", "onUpdate:modelValue"]))
|
|
2927
2927
|
], 64)) : (d(), R($o, P({
|
|
2928
2928
|
key: 1,
|
|
2929
2929
|
ref_for: !0
|
|
2930
|
-
},
|
|
2931
|
-
"model-value":
|
|
2930
|
+
}, T(r), {
|
|
2931
|
+
"model-value": V(r),
|
|
2932
2932
|
locales: u.value,
|
|
2933
|
-
"default-locale":
|
|
2934
|
-
"required-locales":
|
|
2935
|
-
multiline:
|
|
2936
|
-
rows:
|
|
2937
|
-
placeholder:
|
|
2938
|
-
"max-length":
|
|
2939
|
-
"onUpdate:modelValue": (
|
|
2933
|
+
"default-locale": c.value,
|
|
2934
|
+
"required-locales": r.required ? [c.value] : [],
|
|
2935
|
+
multiline: r.kind === "textarea",
|
|
2936
|
+
rows: r.props?.rows,
|
|
2937
|
+
placeholder: r.props?.placeholder,
|
|
2938
|
+
"max-length": D(r),
|
|
2939
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2940
2940
|
}), null, 16, ["model-value", "locales", "default-locale", "required-locales", "multiline", "rows", "placeholder", "max-length", "onUpdate:modelValue"]))
|
|
2941
|
-
], 64)) :
|
|
2941
|
+
], 64)) : r.kind === "text" ? (d(), R(Qe, P({
|
|
2942
2942
|
key: 1,
|
|
2943
2943
|
ref_for: !0
|
|
2944
|
-
},
|
|
2945
|
-
type:
|
|
2946
|
-
"model-value": ge(
|
|
2947
|
-
placeholder:
|
|
2948
|
-
"max-length":
|
|
2949
|
-
"onUpdate:modelValue": (
|
|
2950
|
-
}), null, 16, ["type", "model-value", "placeholder", "max-length", "onUpdate:modelValue"])) :
|
|
2944
|
+
}, T(r), {
|
|
2945
|
+
type: Z(r, "email") ? "email" : Z(r, "url") ? "url" : "text",
|
|
2946
|
+
"model-value": ge(r),
|
|
2947
|
+
placeholder: r.props?.placeholder,
|
|
2948
|
+
"max-length": D(r),
|
|
2949
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2950
|
+
}), null, 16, ["type", "model-value", "placeholder", "max-length", "onUpdate:modelValue"])) : r.kind === "textarea" ? (d(), R(at, P({
|
|
2951
2951
|
key: 2,
|
|
2952
2952
|
ref_for: !0
|
|
2953
|
-
},
|
|
2954
|
-
"model-value": ge(
|
|
2955
|
-
rows:
|
|
2956
|
-
placeholder:
|
|
2957
|
-
"max-length":
|
|
2958
|
-
"onUpdate:modelValue": (
|
|
2959
|
-
}), null, 16, ["model-value", "rows", "placeholder", "max-length", "onUpdate:modelValue"])) :
|
|
2953
|
+
}, T(r), {
|
|
2954
|
+
"model-value": ge(r),
|
|
2955
|
+
rows: r.props?.rows,
|
|
2956
|
+
placeholder: r.props?.placeholder,
|
|
2957
|
+
"max-length": D(r),
|
|
2958
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2959
|
+
}), null, 16, ["model-value", "rows", "placeholder", "max-length", "onUpdate:modelValue"])) : r.kind === "rich_text" ? (d(), R(it, P({
|
|
2960
2960
|
key: 3,
|
|
2961
2961
|
ref_for: !0
|
|
2962
|
-
},
|
|
2963
|
-
"model-value": ge(
|
|
2962
|
+
}, T(r), {
|
|
2963
|
+
"model-value": ge(r),
|
|
2964
2964
|
images: e.resources,
|
|
2965
|
-
video:
|
|
2966
|
-
"onUpdate:modelValue": (
|
|
2967
|
-
}), null, 16, ["model-value", "images", "video", "onUpdate:modelValue"])) :
|
|
2965
|
+
video: r.props?.video,
|
|
2966
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2967
|
+
}), null, 16, ["model-value", "images", "video", "onUpdate:modelValue"])) : r.kind === "number" ? (d(), R(kt, P({
|
|
2968
2968
|
key: 4,
|
|
2969
2969
|
ref_for: !0
|
|
2970
|
-
},
|
|
2971
|
-
"model-value":
|
|
2972
|
-
placeholder:
|
|
2973
|
-
"onUpdate:modelValue": (
|
|
2974
|
-
}), null, 16, ["model-value", "placeholder", "onUpdate:modelValue"])) :
|
|
2970
|
+
}, T(r), {
|
|
2971
|
+
"model-value": ae(r),
|
|
2972
|
+
placeholder: r.props?.placeholder,
|
|
2973
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2974
|
+
}), null, 16, ["model-value", "placeholder", "onUpdate:modelValue"])) : r.kind === "boolean" ? (d(), R(ia, P({
|
|
2975
2975
|
key: 5,
|
|
2976
2976
|
ref_for: !0
|
|
2977
|
-
},
|
|
2978
|
-
"model-value": e.modelValue[
|
|
2979
|
-
"onUpdate:modelValue": (
|
|
2980
|
-
}), null, 16, ["model-value", "onUpdate:modelValue"])) :
|
|
2977
|
+
}, T(r), {
|
|
2978
|
+
"model-value": e.modelValue[r.key] === !0,
|
|
2979
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2980
|
+
}), null, 16, ["model-value", "onUpdate:modelValue"])) : r.kind === "select" ? (d(), R(sa, P({
|
|
2981
2981
|
key: 6,
|
|
2982
2982
|
ref_for: !0
|
|
2983
|
-
},
|
|
2984
|
-
options:
|
|
2985
|
-
"model-value":
|
|
2986
|
-
clearable: !
|
|
2987
|
-
placeholder:
|
|
2988
|
-
"onUpdate:modelValue": (
|
|
2989
|
-
}), null, 16, ["options", "model-value", "clearable", "placeholder", "onUpdate:modelValue"])) :
|
|
2983
|
+
}, T(r), {
|
|
2984
|
+
options: r.options ?? [],
|
|
2985
|
+
"model-value": ne(r),
|
|
2986
|
+
clearable: !r.required,
|
|
2987
|
+
placeholder: r.props?.placeholder,
|
|
2988
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2989
|
+
}), null, 16, ["options", "model-value", "clearable", "placeholder", "onUpdate:modelValue"])) : r.kind === "multi_select" ? (d(), R(jo, P({
|
|
2990
2990
|
key: 7,
|
|
2991
2991
|
ref_for: !0
|
|
2992
|
-
},
|
|
2993
|
-
options:
|
|
2994
|
-
"model-value":
|
|
2995
|
-
placeholder:
|
|
2996
|
-
"onUpdate:modelValue": (
|
|
2997
|
-
}), null, 16, ["options", "model-value", "placeholder", "onUpdate:modelValue"])) :
|
|
2992
|
+
}, T(r), {
|
|
2993
|
+
options: r.options ?? [],
|
|
2994
|
+
"model-value": ve(r),
|
|
2995
|
+
placeholder: r.props?.placeholder,
|
|
2996
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
2997
|
+
}), null, 16, ["options", "model-value", "placeholder", "onUpdate:modelValue"])) : r.kind === "date" ? (d(), R(oa, P({
|
|
2998
2998
|
key: 8,
|
|
2999
2999
|
ref_for: !0
|
|
3000
|
-
},
|
|
3001
|
-
"model-value": se(
|
|
3002
|
-
"onUpdate:modelValue": (
|
|
3003
|
-
}), null, 16, ["model-value", "onUpdate:modelValue"])) :
|
|
3000
|
+
}, T(r), {
|
|
3001
|
+
"model-value": se(r),
|
|
3002
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
3003
|
+
}), null, 16, ["model-value", "onUpdate:modelValue"])) : r.kind === "datetime" ? (d(), R(Ya, P({
|
|
3004
3004
|
key: 9,
|
|
3005
3005
|
ref_for: !0
|
|
3006
|
-
},
|
|
3007
|
-
"model-value": se(
|
|
3008
|
-
"onUpdate:modelValue": (
|
|
3009
|
-
}), null, 16, ["model-value", "onUpdate:modelValue"])) :
|
|
3006
|
+
}, T(r), {
|
|
3007
|
+
"model-value": se(r),
|
|
3008
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
3009
|
+
}), null, 16, ["model-value", "onUpdate:modelValue"])) : r.kind === "image" || r.kind === "document" || r.kind === "gallery" ? (d(), g(X, { key: 10 }, [
|
|
3010
3010
|
e.resources ? (d(), R(Ll, P({
|
|
3011
3011
|
key: 0,
|
|
3012
3012
|
ref_for: !0
|
|
3013
|
-
},
|
|
3013
|
+
}, T(r), {
|
|
3014
3014
|
source: e.resources,
|
|
3015
|
-
multiple:
|
|
3016
|
-
accept:
|
|
3017
|
-
"model-value":
|
|
3018
|
-
"onUpdate:modelValue": (
|
|
3015
|
+
multiple: r.kind === "gallery",
|
|
3016
|
+
accept: r.props?.accept ?? (r.kind === "image" ? "image/*" : void 0),
|
|
3017
|
+
"model-value": r.kind === "gallery" ? ee(r) : e.modelValue[r.key],
|
|
3018
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
3019
3019
|
}), null, 16, ["source", "multiple", "accept", "model-value", "onUpdate:modelValue"])) : z("", !0)
|
|
3020
|
-
], 64)) :
|
|
3020
|
+
], 64)) : r.kind === "collection" ? (d(), R(bl, P({
|
|
3021
3021
|
key: 11,
|
|
3022
3022
|
ref_for: !0
|
|
3023
|
-
},
|
|
3024
|
-
fields:
|
|
3025
|
-
"model-value": _e(
|
|
3023
|
+
}, T(r), {
|
|
3024
|
+
fields: r.children ?? [],
|
|
3025
|
+
"model-value": _e(r),
|
|
3026
3026
|
locales: u.value,
|
|
3027
|
-
"default-locale":
|
|
3028
|
-
errors:
|
|
3027
|
+
"default-locale": c.value,
|
|
3028
|
+
errors: _(r.key),
|
|
3029
3029
|
resources: e.resources,
|
|
3030
|
-
"add-label":
|
|
3030
|
+
"add-label": r.props?.addLabel,
|
|
3031
3031
|
"locale-mode": e.localeMode,
|
|
3032
|
-
"onUpdate:modelValue": (
|
|
3032
|
+
"onUpdate:modelValue": (v) => m(r.key, v)
|
|
3033
3033
|
}), null, 16, ["fields", "model-value", "locales", "default-locale", "errors", "resources", "add-label", "locale-mode", "onUpdate:modelValue"])) : z("", !0)
|
|
3034
3034
|
], 64))), 128))
|
|
3035
3035
|
]));
|
|
3036
3036
|
}
|
|
3037
3037
|
});
|
|
3038
3038
|
async function Il() {
|
|
3039
|
-
const [o, a, e, t,
|
|
3039
|
+
const [o, a, e, t, l, i] = await Promise.all([
|
|
3040
3040
|
import("@codemirror/state"),
|
|
3041
3041
|
import("@codemirror/view"),
|
|
3042
3042
|
import("@codemirror/commands"),
|
|
@@ -3044,7 +3044,7 @@ async function Il() {
|
|
|
3044
3044
|
import("@codemirror/lint"),
|
|
3045
3045
|
import("@lezer/highlight")
|
|
3046
3046
|
]);
|
|
3047
|
-
return { state: o, view: a, commands: e, language: t, lint:
|
|
3047
|
+
return { state: o, view: a, commands: e, language: t, lint: l, highlight: i };
|
|
3048
3048
|
}
|
|
3049
3049
|
async function ut(o) {
|
|
3050
3050
|
switch (o) {
|
|
@@ -3058,16 +3058,133 @@ async function ut(o) {
|
|
|
3058
3058
|
return (await import("@codemirror/lang-javascript")).javascript();
|
|
3059
3059
|
}
|
|
3060
3060
|
}
|
|
3061
|
-
const Pl = {
|
|
3061
|
+
const Pl = {
|
|
3062
3062
|
key: 0,
|
|
3063
3063
|
role: "alert",
|
|
3064
|
-
class: "p-3 text-sm text-
|
|
3065
|
-
},
|
|
3066
|
-
|
|
3064
|
+
class: "p-3 text-sm text-status-danger-content"
|
|
3065
|
+
}, Gl = /* @__PURE__ */ J({
|
|
3066
|
+
__name: "CodeEditor",
|
|
3067
|
+
props: {
|
|
3068
|
+
modelValue: { default: "" },
|
|
3069
|
+
language: { default: "html" },
|
|
3070
|
+
readonly: { type: Boolean, default: !1 },
|
|
3071
|
+
lineNumbers: { type: Boolean, default: !0 },
|
|
3072
|
+
fill: { type: Boolean, default: !1 },
|
|
3073
|
+
height: { default: "24rem" },
|
|
3074
|
+
markers: { default: () => [] },
|
|
3075
|
+
label: { default: void 0 }
|
|
3076
|
+
},
|
|
3077
|
+
emits: ["update:modelValue", "save", "cursor", "failed"],
|
|
3078
|
+
setup(o, { expose: a, emit: e }) {
|
|
3079
|
+
const t = o, l = e, { t: i } = te(), p = oe("host"), u = W(!1);
|
|
3080
|
+
let c = null, b = null, k = !1, _ = null;
|
|
3081
|
+
const n = { language: void 0, locked: void 0, numbers: void 0 };
|
|
3082
|
+
function m() {
|
|
3083
|
+
return b ? [b.state.EditorState.readOnly.of(t.readonly), b.view.EditorView.editable.of(!t.readonly)] : [];
|
|
3084
|
+
}
|
|
3085
|
+
const f = () => b && t.lineNumbers ? [b.view.lineNumbers(), b.view.highlightActiveLineGutter()] : [];
|
|
3086
|
+
function x() {
|
|
3087
|
+
if (!c || !b) return;
|
|
3088
|
+
const C = c.state.doc, q = t.markers.map((B) => {
|
|
3089
|
+
const V = C.line(Math.min(Math.max(B.line, 1), C.lines)), O = B.column ? Math.min(V.from + B.column - 1, V.to) : V.from, H = B.column ? Math.max(c.state.wordAt(O)?.to ?? O + 1, Math.min(O + 1, V.to)) : V.to;
|
|
3090
|
+
return { from: O, to: Math.min(H, C.length), severity: B.severity, message: B.message };
|
|
3091
|
+
});
|
|
3092
|
+
c.dispatch(b.lint.setDiagnostics(c.state, q));
|
|
3093
|
+
}
|
|
3094
|
+
function y(C) {
|
|
3095
|
+
const q = C.state.selection.main.head, B = C.state.doc.lineAt(q);
|
|
3096
|
+
return { line: B.number, column: q - B.from + 1 };
|
|
3097
|
+
}
|
|
3098
|
+
function h(C, q) {
|
|
3099
|
+
if (!c || !b) {
|
|
3100
|
+
_ = [C, q];
|
|
3101
|
+
return;
|
|
3102
|
+
}
|
|
3103
|
+
const B = c.state.doc, V = B.line(Math.min(Math.max(Math.trunc(C), 1), B.lines)), O = Math.min(V.from + Math.max((q ?? 1) - 1, 0), V.to);
|
|
3104
|
+
c.dispatch({ selection: { anchor: O }, effects: b.view.EditorView.scrollIntoView(O, { y: "center" }) }), c.focus();
|
|
3105
|
+
}
|
|
3106
|
+
return Ie(async () => {
|
|
3107
|
+
try {
|
|
3108
|
+
b = await Il();
|
|
3109
|
+
const C = await ut(t.language);
|
|
3110
|
+
if (!p.value) return;
|
|
3111
|
+
const { EditorState: q, Compartment: B } = b.state, { EditorView: V, keymap: O } = b.view;
|
|
3112
|
+
n.language = new B(), n.locked = new B(), n.numbers = new B();
|
|
3113
|
+
let H = !1;
|
|
3114
|
+
const j = (T) => (Z) => !H && T(Z);
|
|
3115
|
+
c = new V({
|
|
3116
|
+
parent: p.value,
|
|
3117
|
+
state: q.create({
|
|
3118
|
+
doc: t.modelValue,
|
|
3119
|
+
extensions: [
|
|
3120
|
+
V.contentAttributes.of({ "aria-label": t.label ?? "", "aria-multiline": "true" }),
|
|
3121
|
+
V.domEventHandlers({
|
|
3122
|
+
keydown: (T) => (T.key === "Escape" ? H = !0 : T.key !== "Tab" && T.key !== "Shift" && (H = !1), !1),
|
|
3123
|
+
blur: () => (H = !1, !1)
|
|
3124
|
+
}),
|
|
3125
|
+
O.of([
|
|
3126
|
+
{ key: "Mod-s", preventDefault: !0, run: () => (l("save"), !0) },
|
|
3127
|
+
{ key: "Tab", run: j(b.commands.indentMore), shift: j(b.commands.indentLess) },
|
|
3128
|
+
...b.commands.defaultKeymap,
|
|
3129
|
+
...b.commands.historyKeymap
|
|
3130
|
+
]),
|
|
3131
|
+
b.commands.history(),
|
|
3132
|
+
b.language.indentOnInput(),
|
|
3133
|
+
b.language.bracketMatching(),
|
|
3134
|
+
b.language.syntaxHighlighting(b.highlight.classHighlighter),
|
|
3135
|
+
b.lint.lintGutter(),
|
|
3136
|
+
V.lineWrapping,
|
|
3137
|
+
V.theme({
|
|
3138
|
+
"&": { height: "100%", backgroundColor: "transparent" },
|
|
3139
|
+
"&.cm-focused": { outline: "none" },
|
|
3140
|
+
".cm-scroller": { fontFamily: "var(--font-mono, ui-monospace, monospace)", fontSize: "0.8125rem" },
|
|
3141
|
+
// The editor's own colours are light-only: these follow the theme tokens, so dark mode works.
|
|
3142
|
+
".cm-gutters": { backgroundColor: "transparent", color: "var(--app-content-muted)", borderRight: "1px solid var(--app-border-separator)" },
|
|
3143
|
+
".cm-activeLine": { backgroundColor: "var(--app-fill)" },
|
|
3144
|
+
".cm-activeLineGutter": { backgroundColor: "var(--app-fill)" },
|
|
3145
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: "var(--app-content-strong)" },
|
|
3146
|
+
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: "var(--app-tint-soft)" }
|
|
3147
|
+
}),
|
|
3148
|
+
n.language.of(C),
|
|
3149
|
+
n.locked.of(m()),
|
|
3150
|
+
n.numbers.of(f()),
|
|
3151
|
+
V.updateListener.of((T) => {
|
|
3152
|
+
if (T.docChanged && !k) {
|
|
3153
|
+
const Z = T.state.doc.toString();
|
|
3154
|
+
Z !== t.modelValue && l("update:modelValue", Z);
|
|
3155
|
+
}
|
|
3156
|
+
(T.selectionSet || T.docChanged) && l("cursor", y(T.view));
|
|
3157
|
+
})
|
|
3158
|
+
]
|
|
3159
|
+
})
|
|
3160
|
+
}), x(), l("cursor", y(c)), _ && h(..._), _ = null;
|
|
3161
|
+
} catch {
|
|
3162
|
+
u.value = !0, l("failed");
|
|
3163
|
+
}
|
|
3164
|
+
}), Fe(() => c?.destroy()), re(() => t.modelValue, (C) => {
|
|
3165
|
+
!c || C === c.state.doc.toString() || (k = !0, c.dispatch({ changes: { from: 0, to: c.state.doc.length, insert: C } }), k = !1);
|
|
3166
|
+
}), re(() => t.markers, x, { deep: !0 }), re(() => t.readonly, () => c?.dispatch({ effects: n.locked?.reconfigure(m()) })), re(() => t.lineNumbers, () => c?.dispatch({ effects: n.numbers?.reconfigure(f()) })), re(() => t.language, async (C) => {
|
|
3167
|
+
const q = await ut(C);
|
|
3168
|
+
c?.dispatch({ effects: n.language?.reconfigure(q) });
|
|
3169
|
+
}), a({ focus: () => c?.focus(), reveal: h }), (C, q) => (d(), g("div", {
|
|
3170
|
+
"data-code-editor": "",
|
|
3171
|
+
class: G(["min-h-0 min-w-0 overflow-hidden bg-surface-cell text-content-strong [&_.tok-keyword]:text-content-link [&_.tok-tagName]:text-content-link [&_.tok-string]:text-emerald-700 dark:[&_.tok-string]:text-emerald-400 [&_.tok-comment]:italic [&_.tok-comment]:text-content-muted [&_.tok-number]:text-amber-700 dark:[&_.tok-number]:text-amber-400 [&_.tok-bool]:text-amber-700 dark:[&_.tok-bool]:text-amber-400 [&_.tok-attributeName]:text-violet-700 dark:[&_.tok-attributeName]:text-violet-400 [&_.tok-propertyName]:text-violet-700 dark:[&_.tok-propertyName]:text-violet-400 [&_.tok-meta]:text-content-muted [&_.cm-lintRange-error]:underline [&_.cm-lintRange-error]:decoration-wavy [&_.cm-lintRange-error]:decoration-red-600 [&_.cm-lintRange-warning]:underline [&_.cm-lintRange-warning]:decoration-wavy [&_.cm-lintRange-warning]:decoration-amber-500", t.fill ? "h-full" : ""]),
|
|
3172
|
+
style: De(t.fill ? void 0 : { height: t.height })
|
|
3173
|
+
}, [
|
|
3174
|
+
$("div", {
|
|
3175
|
+
ref_key: "host",
|
|
3176
|
+
ref: p,
|
|
3177
|
+
class: G(["h-full", { hidden: u.value }])
|
|
3178
|
+
}, null, 2),
|
|
3179
|
+
u.value ? (d(), g("p", Pl, F(s(i)("core.form.code.failed")), 1)) : z("", !0)
|
|
3180
|
+
], 6));
|
|
3181
|
+
}
|
|
3182
|
+
}), Hl = { class: "w-full" }, Kl = ["aria-expanded", "aria-controls"], Wl = ["id", "aria-describedby"], Yl = {
|
|
3183
|
+
key: 0,
|
|
3067
3184
|
class: "mt-1 text-footnote text-content-muted"
|
|
3068
|
-
},
|
|
3185
|
+
}, Jl = ["id", "aria-label"], er = /* @__PURE__ */ J({
|
|
3069
3186
|
__name: "CodeField",
|
|
3070
|
-
props: /* @__PURE__ */
|
|
3187
|
+
props: /* @__PURE__ */ me({
|
|
3071
3188
|
label: {},
|
|
3072
3189
|
labelHidden: { type: Boolean },
|
|
3073
3190
|
hint: {},
|
|
@@ -3084,317 +3201,322 @@ const Pl = { class: "w-full" }, Hl = ["aria-expanded", "aria-controls"], Kl = ["
|
|
|
3084
3201
|
lineNumbers: { type: Boolean },
|
|
3085
3202
|
height: {},
|
|
3086
3203
|
markers: {}
|
|
3087
|
-
}, { ...
|
|
3204
|
+
}, { ...pe, modelValue: "", language: "html", readonly: !1, lineNumbers: !0, height: "24rem", markers: () => [] }),
|
|
3088
3205
|
emits: ["update:modelValue", "save"],
|
|
3089
3206
|
setup(o, { expose: a, emit: e }) {
|
|
3090
|
-
const t = o,
|
|
3091
|
-
|
|
3092
|
-
const c = { language: void 0, locked: void 0, numbers: void 0 };
|
|
3093
|
-
function k() {
|
|
3094
|
-
return l ? [l.state.EditorState.readOnly.of(S.value), l.view.EditorView.editable.of(!S.value)] : [];
|
|
3095
|
-
}
|
|
3096
|
-
const b = () => l && t.lineNumbers ? [l.view.lineNumbers(), l.view.highlightActiveLineGutter()] : [];
|
|
3097
|
-
function y() {
|
|
3098
|
-
if (!h || !l) return;
|
|
3099
|
-
const w = h.state.doc, F = t.markers.map((q) => {
|
|
3100
|
-
const $ = w.line(Math.min(Math.max(q.line, 1), w.lines)), E = q.column ? Math.min($.from + q.column - 1, $.to) : $.from, H = q.column ? Math.max(h.state.wordAt(E)?.to ?? E + 1, Math.min(E + 1, $.to)) : $.to;
|
|
3101
|
-
return { from: E, to: Math.min(H, w.length), severity: q.severity, message: q.message };
|
|
3102
|
-
});
|
|
3103
|
-
h.dispatch(l.lint.setDiagnostics(h.state, F));
|
|
3104
|
-
}
|
|
3105
|
-
return Ie(async () => {
|
|
3106
|
-
try {
|
|
3107
|
-
l = await Il();
|
|
3108
|
-
const w = await ut(t.language);
|
|
3109
|
-
if (!u.value) return;
|
|
3110
|
-
const { EditorState: F, Compartment: q } = l.state, { EditorView: $, keymap: E } = l.view;
|
|
3111
|
-
c.language = new q(), c.locked = new q(), c.numbers = new q();
|
|
3112
|
-
let H = !1;
|
|
3113
|
-
const O = (D) => (J) => !H && D(J);
|
|
3114
|
-
h = new $({
|
|
3115
|
-
parent: u.value,
|
|
3116
|
-
state: F.create({
|
|
3117
|
-
doc: t.modelValue,
|
|
3118
|
-
extensions: [
|
|
3119
|
-
$.contentAttributes.of({ "aria-label": t.label ?? "", "aria-multiline": "true" }),
|
|
3120
|
-
$.domEventHandlers({
|
|
3121
|
-
keydown: (D) => (D.key === "Escape" ? H = !0 : D.key !== "Tab" && D.key !== "Shift" && (H = !1), !1),
|
|
3122
|
-
blur: () => (H = !1, !1)
|
|
3123
|
-
}),
|
|
3124
|
-
E.of([
|
|
3125
|
-
{ key: "Mod-s", preventDefault: !0, run: () => (r("save"), !0) },
|
|
3126
|
-
{ key: "Tab", run: O(l.commands.indentMore), shift: O(l.commands.indentLess) },
|
|
3127
|
-
...l.commands.defaultKeymap,
|
|
3128
|
-
...l.commands.historyKeymap
|
|
3129
|
-
]),
|
|
3130
|
-
l.commands.history(),
|
|
3131
|
-
l.language.indentOnInput(),
|
|
3132
|
-
l.language.bracketMatching(),
|
|
3133
|
-
l.language.syntaxHighlighting(l.highlight.classHighlighter),
|
|
3134
|
-
l.lint.lintGutter(),
|
|
3135
|
-
$.lineWrapping,
|
|
3136
|
-
$.theme({ "&": { height: "100%", backgroundColor: "transparent" }, "&.cm-focused": { outline: "none" }, ".cm-scroller": { fontFamily: "var(--font-mono, ui-monospace, monospace)", fontSize: "0.8125rem" } }),
|
|
3137
|
-
c.language.of(w),
|
|
3138
|
-
c.locked.of(k()),
|
|
3139
|
-
c.numbers.of(b()),
|
|
3140
|
-
$.updateListener.of((D) => {
|
|
3141
|
-
if (!D.docChanged || m) return;
|
|
3142
|
-
const J = D.state.doc.toString();
|
|
3143
|
-
J !== t.modelValue && r("update:modelValue", J);
|
|
3144
|
-
})
|
|
3145
|
-
]
|
|
3146
|
-
})
|
|
3147
|
-
}), y();
|
|
3148
|
-
} catch {
|
|
3149
|
-
v.value = !0;
|
|
3150
|
-
}
|
|
3151
|
-
}), Be(() => h?.destroy()), ne(() => t.modelValue, (w) => {
|
|
3152
|
-
!h || w === h.state.doc.toString() || (m = !0, h.dispatch({ changes: { from: 0, to: h.state.doc.length, insert: w } }), m = !1);
|
|
3153
|
-
}), ne(() => t.markers, y, { deep: !0 }), ne(S, () => h?.dispatch({ effects: c.locked?.reconfigure(k()) })), ne(() => t.lineNumbers, () => h?.dispatch({ effects: c.numbers?.reconfigure(b()) })), ne(() => t.language, async (w) => {
|
|
3154
|
-
const F = await ut(w);
|
|
3155
|
-
h?.dispatch({ effects: c.language?.reconfigure(F) });
|
|
3156
|
-
}), a({ focus: () => h?.focus() }), (w, F) => (d(), R(be, P({ ...s(me)(t), editable: !0, required: t.required && s(p) }, {
|
|
3207
|
+
const t = o, l = e, { t: i } = te(), { editable: p } = Se(t), u = oe("editor"), c = W(!1), b = L(() => t.readonly || !p.value || t.disabled);
|
|
3208
|
+
return a({ focus: () => u.value?.focus() }), (k, _) => (d(), R(be, P({ ...s(fe)(t), editable: !0, required: t.required && s(p) }, {
|
|
3157
3209
|
"row-layout": "stacked",
|
|
3158
3210
|
value: null
|
|
3159
|
-
}),
|
|
3160
|
-
default:
|
|
3161
|
-
|
|
3162
|
-
|
|
3211
|
+
}), de({
|
|
3212
|
+
default: w(({ id: n, describedby: m }) => [
|
|
3213
|
+
$("div", Hl, [
|
|
3214
|
+
k.$slots.preview ? (d(), g("button", {
|
|
3163
3215
|
key: 0,
|
|
3164
3216
|
type: "button",
|
|
3165
|
-
class: "mb-2 rounded-md border border-border px-2 py-1 text-sm lg:hidden",
|
|
3166
|
-
"aria-expanded":
|
|
3167
|
-
"aria-controls": `${
|
|
3168
|
-
onClick:
|
|
3169
|
-
},
|
|
3170
|
-
|
|
3171
|
-
class:
|
|
3217
|
+
class: "mb-2 rounded-md border border-border-control px-2 py-1 text-sm lg:hidden",
|
|
3218
|
+
"aria-expanded": c.value,
|
|
3219
|
+
"aria-controls": `${n}-preview`,
|
|
3220
|
+
onClick: _[0] || (_[0] = (f) => c.value = !c.value)
|
|
3221
|
+
}, F(c.value ? s(i)("core.form.code.hide_preview") : s(i)("core.form.code.show_preview")), 9, Kl)) : z("", !0),
|
|
3222
|
+
$("div", {
|
|
3223
|
+
class: G(["grid w-full gap-3", { "lg:grid-cols-2": k.$slots.preview }])
|
|
3172
3224
|
}, [
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
id: q,
|
|
3178
|
-
"aria-describedby": $,
|
|
3225
|
+
$("div", null, [
|
|
3226
|
+
$("div", {
|
|
3227
|
+
id: n,
|
|
3228
|
+
"aria-describedby": m,
|
|
3179
3229
|
"data-code-field": "",
|
|
3180
|
-
class:
|
|
3181
|
-
style:
|
|
3182
|
-
},
|
|
3183
|
-
|
|
3184
|
-
|
|
3230
|
+
class: "resize-y overflow-hidden rounded-md border border-border-control bg-surface-cell focus-within:border-border-focus",
|
|
3231
|
+
style: De({ height: t.height })
|
|
3232
|
+
}, [
|
|
3233
|
+
N(Gl, {
|
|
3234
|
+
ref_key: "editor",
|
|
3235
|
+
ref: u,
|
|
3236
|
+
fill: "",
|
|
3237
|
+
"model-value": t.modelValue,
|
|
3238
|
+
language: t.language,
|
|
3239
|
+
readonly: b.value,
|
|
3240
|
+
"line-numbers": t.lineNumbers,
|
|
3241
|
+
markers: t.markers,
|
|
3242
|
+
label: t.label,
|
|
3243
|
+
"onUpdate:modelValue": _[1] || (_[1] = (f) => l("update:modelValue", f)),
|
|
3244
|
+
onSave: _[2] || (_[2] = (f) => l("save"))
|
|
3245
|
+
}, null, 8, ["model-value", "language", "readonly", "line-numbers", "markers", "label"])
|
|
3246
|
+
], 12, Wl),
|
|
3247
|
+
b.value ? z("", !0) : (d(), g("p", Yl, F(s(i)("core.form.code.tab_hint")), 1))
|
|
3185
3248
|
]),
|
|
3186
|
-
|
|
3249
|
+
k.$slots.preview ? (d(), g("div", {
|
|
3187
3250
|
key: 0,
|
|
3188
|
-
id: `${
|
|
3251
|
+
id: `${n}-preview`,
|
|
3189
3252
|
"aria-label": s(i)("core.form.code.preview"),
|
|
3190
3253
|
role: "region",
|
|
3191
|
-
class:
|
|
3192
|
-
style:
|
|
3254
|
+
class: G(["min-h-48 overflow-hidden rounded-md border border-border-control", c.value ? "block" : "hidden lg:block"]),
|
|
3255
|
+
style: De({ height: t.height })
|
|
3193
3256
|
}, [
|
|
3194
|
-
|
|
3195
|
-
], 14,
|
|
3257
|
+
E(k.$slots, "preview")
|
|
3258
|
+
], 14, Jl)) : z("", !0)
|
|
3196
3259
|
], 2)
|
|
3197
3260
|
])
|
|
3198
3261
|
]),
|
|
3199
3262
|
_: 2
|
|
3200
3263
|
}, [
|
|
3201
|
-
|
|
3264
|
+
k.$slots.trailing ? {
|
|
3202
3265
|
name: "trailing",
|
|
3203
|
-
fn:
|
|
3204
|
-
|
|
3266
|
+
fn: w(() => [
|
|
3267
|
+
E(k.$slots, "trailing")
|
|
3205
3268
|
]),
|
|
3206
3269
|
key: "0"
|
|
3207
3270
|
} : void 0,
|
|
3208
|
-
|
|
3271
|
+
k.$slots.labelTrailing ? {
|
|
3209
3272
|
name: "labelTrailing",
|
|
3210
|
-
fn:
|
|
3211
|
-
|
|
3273
|
+
fn: w(() => [
|
|
3274
|
+
E(k.$slots, "labelTrailing")
|
|
3212
3275
|
]),
|
|
3213
3276
|
key: "1"
|
|
3214
3277
|
} : void 0
|
|
3215
3278
|
]), 1040));
|
|
3216
3279
|
}
|
|
3280
|
+
}), Zl = ["aria-label"], Ql = {
|
|
3281
|
+
key: 0,
|
|
3282
|
+
role: "status",
|
|
3283
|
+
"data-marker-ok": "",
|
|
3284
|
+
class: "flex items-center gap-1.5 text-footnote text-status-success-content"
|
|
3285
|
+
}, Xl = ["data-severity"], en = ["onClick"], tn = { class: "shrink-0 font-mono text-content-muted" }, an = { class: "min-w-0 text-content-strong" }, tr = /* @__PURE__ */ J({
|
|
3286
|
+
__name: "MarkerList",
|
|
3287
|
+
props: {
|
|
3288
|
+
markers: {}
|
|
3289
|
+
},
|
|
3290
|
+
emits: ["select"],
|
|
3291
|
+
setup(o, { emit: a }) {
|
|
3292
|
+
const e = o, t = a, { t: l } = te(), i = (c, b) => c.line - b.line || (c.column ?? 0) - (b.column ?? 0), p = L(
|
|
3293
|
+
() => ["error", "warning"].map((c) => ({ severity: c, items: e.markers.filter((b) => b.severity === c).sort(i) })).filter((c) => c.items.length > 0)
|
|
3294
|
+
), u = (c) => c.column ? l("core.form.markers.line_column", { line: c.line, column: c.column }) : l("core.form.markers.line", { line: c.line });
|
|
3295
|
+
return (c, b) => (d(), g("div", {
|
|
3296
|
+
"data-marker-list": "",
|
|
3297
|
+
"aria-label": s(l)("core.form.markers.label"),
|
|
3298
|
+
role: "group"
|
|
3299
|
+
}, [
|
|
3300
|
+
p.value.length === 0 ? (d(), g("p", Ql, [
|
|
3301
|
+
N(s(ie), {
|
|
3302
|
+
name: "checkboxCircleFill",
|
|
3303
|
+
size: 14
|
|
3304
|
+
}),
|
|
3305
|
+
Q(F(s(l)("core.form.markers.ok")), 1)
|
|
3306
|
+
])) : z("", !0),
|
|
3307
|
+
(d(!0), g(X, null, ce(p.value, (k) => (d(), g("section", {
|
|
3308
|
+
key: k.severity,
|
|
3309
|
+
"data-severity": k.severity,
|
|
3310
|
+
class: "not-first:mt-2"
|
|
3311
|
+
}, [
|
|
3312
|
+
$("h3", {
|
|
3313
|
+
class: G(["flex items-center gap-1.5 text-footnote font-semibold", k.severity === "error" ? "text-status-danger-content" : "text-status-warning-content"])
|
|
3314
|
+
}, [
|
|
3315
|
+
N(s(ie), {
|
|
3316
|
+
name: k.severity === "error" ? "errorWarningLine" : "alertTriangle",
|
|
3317
|
+
size: 14
|
|
3318
|
+
}, null, 8, ["name"]),
|
|
3319
|
+
Q(" " + F(s(l)(k.severity === "error" ? "core.form.markers.errors" : "core.form.markers.warnings", { count: k.items.length }, k.items.length)), 1)
|
|
3320
|
+
], 2),
|
|
3321
|
+
$("ul", null, [
|
|
3322
|
+
(d(!0), g(X, null, ce(k.items, (_, n) => (d(), g("li", { key: n }, [
|
|
3323
|
+
$("button", {
|
|
3324
|
+
type: "button",
|
|
3325
|
+
"data-marker": "",
|
|
3326
|
+
class: "flex w-full cursor-pointer items-baseline gap-2 rounded-sm px-1 py-0.5 text-left text-footnote hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3327
|
+
onClick: (m) => t("select", _)
|
|
3328
|
+
}, [
|
|
3329
|
+
$("span", tn, F(u(_)), 1),
|
|
3330
|
+
$("span", an, F(_.message), 1)
|
|
3331
|
+
], 8, en)
|
|
3332
|
+
]))), 128))
|
|
3333
|
+
])
|
|
3334
|
+
], 8, Xl))), 128))
|
|
3335
|
+
], 8, Zl));
|
|
3336
|
+
}
|
|
3217
3337
|
}), Ve = (o) => {
|
|
3218
3338
|
const [a] = o.args ?? [];
|
|
3219
3339
|
if (typeof a != "number" || !Number.isFinite(a)) throw new Error(`buildValidator: the "${o.rule}" rule needs a number argument.`);
|
|
3220
3340
|
return a;
|
|
3221
3341
|
}, dt = (o) => typeof o == "string" || typeof o == "number";
|
|
3222
|
-
function
|
|
3223
|
-
const e = a.zod, { messages: t = {} } = a,
|
|
3342
|
+
function ar(o, a) {
|
|
3343
|
+
const e = a.zod, { messages: t = {} } = a, l = e.any().refine(() => !1, { params: { code: "required" }, ...t.required !== void 0 ? { error: t.required } : {} }), i = (m) => m !== void 0 ? { error: m } : {};
|
|
3224
3344
|
function p(m) {
|
|
3225
|
-
const
|
|
3226
|
-
let
|
|
3227
|
-
|
|
3228
|
-
const
|
|
3229
|
-
|
|
3230
|
-
const
|
|
3231
|
-
if (typeof
|
|
3232
|
-
else if (
|
|
3233
|
-
return
|
|
3234
|
-
},
|
|
3235
|
-
let
|
|
3236
|
-
return
|
|
3345
|
+
const f = m.validation ?? [], x = (B) => f.find((V) => V.rule === B), y = x("min"), h = x("max"), C = () => {
|
|
3346
|
+
let B = e.string(i(t.type));
|
|
3347
|
+
y && (B = B.min(Ve(y))), h && (B = B.max(Ve(h)));
|
|
3348
|
+
const V = [B];
|
|
3349
|
+
x("email") && V.push(e.email(i(t.email))), x("url") && V.push(e.url(i(t.url)));
|
|
3350
|
+
const O = x("regex")?.args?.[0];
|
|
3351
|
+
if (typeof O == "string") V.push(e.string().regex(new RegExp(O), i(t.regex)));
|
|
3352
|
+
else if (x("regex")) throw new Error(`buildValidator: the "regex" rule of "${m.key}" needs a pattern string.`);
|
|
3353
|
+
return V;
|
|
3354
|
+
}, q = (B) => {
|
|
3355
|
+
let V = e.array(B);
|
|
3356
|
+
return y && (V = V.min(Ve(y))), h && (V = V.max(Ve(h))), V;
|
|
3237
3357
|
};
|
|
3238
3358
|
switch (m.kind) {
|
|
3239
3359
|
case "text":
|
|
3240
3360
|
case "textarea":
|
|
3241
3361
|
case "rich_text":
|
|
3242
|
-
return m.translatable ? [e.record(e.string(), e.unknown()).superRefine((
|
|
3243
|
-
for (const [
|
|
3362
|
+
return m.translatable ? [e.record(e.string(), e.unknown()).superRefine((B, V) => {
|
|
3363
|
+
for (const [O, H] of Object.entries(B))
|
|
3244
3364
|
if (!$e(H))
|
|
3245
|
-
for (const
|
|
3246
|
-
})] :
|
|
3365
|
+
for (const j of C()) for (const T of j.safeParse(H).error?.issues ?? []) V.addIssue({ ...T, path: [O, ...T.path] });
|
|
3366
|
+
})] : C();
|
|
3247
3367
|
case "number": {
|
|
3248
|
-
let
|
|
3249
|
-
return
|
|
3368
|
+
let B = e.number(i(t.type));
|
|
3369
|
+
return y && (B = B.min(Ve(y))), h && (B = B.max(Ve(h))), [B];
|
|
3250
3370
|
}
|
|
3251
3371
|
case "boolean":
|
|
3252
3372
|
return [e.boolean(i(t.type))];
|
|
3253
3373
|
case "select": {
|
|
3254
|
-
const
|
|
3255
|
-
return [e.union([e.string(), e.number()], i(t.type)).refine((
|
|
3374
|
+
const B = (m.options ?? []).map((V) => V.value);
|
|
3375
|
+
return [e.union([e.string(), e.number()], i(t.type)).refine((V) => B.includes(V), { params: { code: "invalid_choice" } })];
|
|
3256
3376
|
}
|
|
3257
3377
|
case "multi_select": {
|
|
3258
|
-
const
|
|
3259
|
-
return [
|
|
3378
|
+
const B = (m.options ?? []).map((V) => V.value);
|
|
3379
|
+
return [q(e.union([e.string(), e.number()])), e.array(e.unknown()).refine((V) => V.every((O) => B.includes(O)), { params: { code: "invalid_choice" } })];
|
|
3260
3380
|
}
|
|
3261
3381
|
case "date":
|
|
3262
|
-
return [e.string(i(t.type)).refine((
|
|
3382
|
+
return [e.string(i(t.type)).refine((B) => Da(B) !== null, { params: { code: "date" } })];
|
|
3263
3383
|
case "datetime":
|
|
3264
|
-
return [e.string(i(t.type)).refine((
|
|
3384
|
+
return [e.string(i(t.type)).refine((B) => Vt(B) !== null, { params: { code: "datetime" } })];
|
|
3265
3385
|
case "image":
|
|
3266
3386
|
case "document":
|
|
3267
3387
|
return [e.custom(dt, i(t.type))];
|
|
3268
3388
|
case "gallery":
|
|
3269
|
-
return [
|
|
3389
|
+
return [q(e.custom(dt))];
|
|
3270
3390
|
case "collection":
|
|
3271
|
-
return [
|
|
3391
|
+
return [q(e.record(e.string(), e.unknown()))];
|
|
3272
3392
|
}
|
|
3273
3393
|
}
|
|
3274
|
-
const u = /* @__PURE__ */ new Map(),
|
|
3275
|
-
for (const
|
|
3276
|
-
u.set(
|
|
3394
|
+
const u = /* @__PURE__ */ new Map(), c = (m) => {
|
|
3395
|
+
for (const f of m)
|
|
3396
|
+
u.set(f, p(f)), f.children && c(f.children);
|
|
3277
3397
|
};
|
|
3278
|
-
|
|
3279
|
-
const
|
|
3280
|
-
if (!m.translatable || typeof
|
|
3281
|
-
const
|
|
3282
|
-
return a.defaultLocale !== void 0 ? $e(
|
|
3398
|
+
c(o.fields);
|
|
3399
|
+
const b = (m, f) => m.kind === "boolean" ? f == null : $e(f), k = (m) => m.required === !0 || m.validation?.some((f) => f.rule === "required") === !0, _ = (m, f) => {
|
|
3400
|
+
if (!m.translatable || typeof f != "object" || f === null) return b(m, f);
|
|
3401
|
+
const x = f;
|
|
3402
|
+
return a.defaultLocale !== void 0 ? $e(x[a.defaultLocale]) : $e(x);
|
|
3283
3403
|
};
|
|
3284
|
-
function
|
|
3285
|
-
const
|
|
3286
|
-
for (const
|
|
3287
|
-
if (!
|
|
3288
|
-
const
|
|
3289
|
-
if (
|
|
3290
|
-
if (
|
|
3404
|
+
function n(m, f, x, y) {
|
|
3405
|
+
const h = {};
|
|
3406
|
+
for (const C of m) {
|
|
3407
|
+
if (!Bt(C.visible_when, f)) continue;
|
|
3408
|
+
const q = f[C.key], B = [...x, C.key];
|
|
3409
|
+
if (h[C.key] = q, C.kind === "text" || C.kind === "textarea" || C.kind === "rich_text" ? _(C, q) : b(C, q)) {
|
|
3410
|
+
if (k(C)) for (const O of l.safeParse(q).error?.issues ?? []) y.push({ path: B, message: O.message });
|
|
3291
3411
|
continue;
|
|
3292
3412
|
}
|
|
3293
|
-
for (const
|
|
3294
|
-
for (const H of
|
|
3295
|
-
|
|
3296
|
-
|
|
3413
|
+
for (const O of u.get(C) ?? [])
|
|
3414
|
+
for (const H of O.safeParse(q).error?.issues ?? [])
|
|
3415
|
+
y.push({ path: [...B, ...H.path], message: H.message });
|
|
3416
|
+
C.kind === "collection" && C.children && Array.isArray(q) && q.every((O) => typeof O == "object" && O !== null) && (h[C.key] = q.map((O, H) => n(C.children, O, [...B, H], y)));
|
|
3297
3417
|
}
|
|
3298
|
-
return
|
|
3418
|
+
return h;
|
|
3299
3419
|
}
|
|
3300
3420
|
return {
|
|
3301
3421
|
safeParse(m) {
|
|
3302
|
-
const
|
|
3303
|
-
return
|
|
3422
|
+
const f = typeof m == "object" && m !== null ? m : {}, x = [], y = n(o.fields, f, [], x);
|
|
3423
|
+
return x.length > 0 ? { success: !1, error: { issues: x } } : { success: !0, data: y };
|
|
3304
3424
|
}
|
|
3305
3425
|
};
|
|
3306
3426
|
}
|
|
3307
3427
|
export {
|
|
3308
3428
|
Yt as Calendar,
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3429
|
+
On as CardSelectField,
|
|
3430
|
+
En as CheckboxField,
|
|
3431
|
+
Nn as ChoiceChips,
|
|
3432
|
+
Gl as CodeEditor,
|
|
3433
|
+
er as CodeField,
|
|
3434
|
+
Un as ComboField,
|
|
3435
|
+
fr as CommandDialog,
|
|
3315
3436
|
oa as DateField,
|
|
3316
3437
|
Ya as DateTimeField,
|
|
3317
3438
|
Al as DynamicForm,
|
|
3318
|
-
|
|
3439
|
+
Jn as EditorPage,
|
|
3319
3440
|
Tt as ErrorBag,
|
|
3320
3441
|
be as Field,
|
|
3321
|
-
|
|
3442
|
+
In as FileField,
|
|
3322
3443
|
ct as FormErrors,
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3444
|
+
qt as FormGroup,
|
|
3445
|
+
Pn as FormGroupButton,
|
|
3446
|
+
Gn as FormIndent,
|
|
3447
|
+
jt as FormRow,
|
|
3448
|
+
Rr as FormView,
|
|
3449
|
+
nr as GroupEditAction,
|
|
3450
|
+
Nr as GroupSheet,
|
|
3330
3451
|
$o as I18nField,
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3452
|
+
wr as LeaveGuardRoot,
|
|
3453
|
+
tr as MarkerList,
|
|
3454
|
+
yr as MissingLeaveGuardRootError,
|
|
3455
|
+
Kn as MoneyField,
|
|
3456
|
+
Wn as MonthYearField,
|
|
3457
|
+
jo as MultiSelectField,
|
|
3458
|
+
Zn as NumberCell,
|
|
3337
3459
|
kt as NumberField,
|
|
3338
3460
|
et as OptionList,
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3461
|
+
Ur as OtpInput,
|
|
3462
|
+
Yn as PhotoField,
|
|
3463
|
+
Ar as RecordGroupScope,
|
|
3342
3464
|
bl as RepeatField,
|
|
3343
3465
|
Ll as ResourceField,
|
|
3344
3466
|
it as RichTextField,
|
|
3345
|
-
|
|
3467
|
+
Gr as SegmentedField,
|
|
3346
3468
|
sa as SelectField,
|
|
3347
|
-
|
|
3469
|
+
Xn as StepForm,
|
|
3348
3470
|
el as StepNavigation,
|
|
3349
3471
|
sl as StepProgress,
|
|
3350
3472
|
ia as SwitchField,
|
|
3351
|
-
|
|
3473
|
+
Qe as TextField,
|
|
3352
3474
|
at as TextareaField,
|
|
3353
|
-
|
|
3354
|
-
|
|
3475
|
+
zr as TimeField,
|
|
3476
|
+
ar as buildValidator,
|
|
3355
3477
|
Ct as checkFile,
|
|
3356
|
-
|
|
3357
|
-
|
|
3478
|
+
rr as createFieldGroups,
|
|
3479
|
+
gr as createLeaveGuard,
|
|
3358
3480
|
Vt as dateTimeValue,
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3481
|
+
Da as dateValue,
|
|
3482
|
+
Bt as evaluateVisibility,
|
|
3483
|
+
pe as fieldDefaults,
|
|
3484
|
+
pr as fieldKey,
|
|
3485
|
+
fe as fieldProps,
|
|
3364
3486
|
Oe as focusFirstError,
|
|
3365
|
-
|
|
3487
|
+
Fr as formEditableKey,
|
|
3366
3488
|
Te as formatBytes,
|
|
3367
|
-
|
|
3489
|
+
Sr as groupOptions,
|
|
3368
3490
|
So as hasUnsupportedCharacters,
|
|
3369
|
-
|
|
3491
|
+
hr as installLeaveGuard,
|
|
3370
3492
|
$e as isEmptyValue,
|
|
3371
|
-
|
|
3372
|
-
|
|
3493
|
+
kr as leaveGuardKey,
|
|
3494
|
+
Br as matchOptions,
|
|
3373
3495
|
so as missingLocales,
|
|
3374
|
-
|
|
3496
|
+
An as now,
|
|
3375
3497
|
Ra as parseDateValue,
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3498
|
+
sr as provideRecordGroups,
|
|
3499
|
+
Tr as recentChoicesKey,
|
|
3500
|
+
ir as recordGroupsKey,
|
|
3501
|
+
Hn as refineStorableText,
|
|
3502
|
+
Ke as thumbnailUrl,
|
|
3381
3503
|
Le as today,
|
|
3382
3504
|
Vo as unsupportedCharactersCode,
|
|
3383
|
-
|
|
3505
|
+
vr as useCommand,
|
|
3384
3506
|
ba as useDirtySnapshot,
|
|
3385
3507
|
Se as useFieldMode,
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3508
|
+
ur as useForm,
|
|
3509
|
+
Ir as useGroupSheet,
|
|
3510
|
+
dr as useHiddenFieldErrors,
|
|
3389
3511
|
vt as useLeaveGuard,
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3512
|
+
_r as useLeaveGuardContext,
|
|
3513
|
+
Or as useOptions,
|
|
3514
|
+
Kr as useRecordDialog,
|
|
3515
|
+
cr as useRecordGroups,
|
|
3516
|
+
Vr as useResourceForm,
|
|
3395
3517
|
fa as useSaveChrome,
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3518
|
+
Ho as useSectionStates,
|
|
3519
|
+
Rn as useSheetDiscardGuard,
|
|
3520
|
+
Qn as useStepForm,
|
|
3521
|
+
jn as zodErrorMap
|
|
3400
3522
|
};
|