@wssto2/vue-core 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -9
- package/dist/AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js +22 -0
- package/dist/AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js +76 -0
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js +45 -0
- package/dist/Activity-DviO0VQ8.js +156 -0
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CKghARkW.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js} +48 -47
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-BZb4qKXo.js → AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js} +2 -2
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-B82bl36A.js → AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js} +4 -4
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js +51 -0
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-n_wGPIIu.js → Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js} +1 -1
- package/dist/{BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js → BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js} +1 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js +182 -0
- package/dist/Changes-DlT5mN9G.js +129 -0
- package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js +1481 -0
- package/dist/CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js +299 -0
- package/dist/DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js +52 -0
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +1099 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Bx5O1RZJ.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js} +1 -1
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js +276 -0
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js +136 -0
- package/dist/FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js +38 -0
- package/dist/General-BD-Hcz0a.js +145 -0
- package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-VvcV2Bzo.js} +46 -33
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js} +1 -1
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +35 -0
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DH6EB8br.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js} +2 -2
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-D44EHXQZ.js → Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js} +61 -57
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-DYQgaUtj.js → Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js} +139 -129
- package/dist/NewRolePage-Dla4YnMs.js +42 -0
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js +31 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js +113 -0
- package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +95 -0
- package/dist/PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js +47 -0
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js} +1 -1
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DDVQXJRB.js → PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js} +2 -2
- package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
- package/dist/ProfilePage-OJMQ8cr8.js +691 -0
- package/dist/{ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js → ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js} +2 -2
- package/dist/RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js +64 -0
- package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js +173 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js +299 -0
- package/dist/RolePage-bZzv_E4l.js +315 -0
- package/dist/RolesPage-BniZv0nB.js +115 -0
- package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +23 -0
- package/dist/SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js +148 -0
- package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js +314 -0
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js +58 -0
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js +422 -0
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js +111 -0
- package/dist/Sessions-Co5-xdeb.js +96 -0
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js +142 -0
- package/dist/SignIn-BWwFbxki.js +140 -0
- package/dist/SignInPage-FnLtoi2q.js +60 -0
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js +79 -0
- package/dist/SignIns-3UcI64_h.js +66 -0
- package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js +93 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js +155 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js +269 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +127 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js → Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js} +1 -1
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-BJWPVyfT.js → Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js} +1 -1
- package/dist/UserRecord-Ci8HfwbX.js +267 -0
- package/dist/UsersList-vEJ-cgkT.js +155 -0
- package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js +28 -0
- package/dist/access/AddRoleDialog.vue.d.ts +19 -0
- package/dist/access/BindingRow.vue.d.ts +19 -0
- package/dist/access/EffectiveAccess.vue.d.ts +12 -0
- package/dist/access/NewRolePage.vue.d.ts +2 -0
- package/dist/access/PermissionTree.vue.d.ts +13 -0
- package/dist/access/PersonAccess.vue.d.ts +21 -0
- package/dist/access/ReplaceRoleDialog.vue.d.ts +17 -0
- package/dist/access/RoleCompareDialog.vue.d.ts +14 -0
- package/dist/access/RoleEditor.vue.d.ts +28 -0
- package/dist/access/RolePage.vue.d.ts +2 -0
- package/dist/access/RolesPage.vue.d.ts +2 -0
- package/dist/access/api.d.ts +26 -0
- package/dist/access/catalogue.d.ts +64 -0
- package/dist/access/context.d.ts +20 -0
- package/dist/access/effective.d.ts +42 -0
- package/dist/access/feature.d.ts +27 -0
- package/dist/access/index.d.ts +13 -0
- package/dist/access/index.js +15 -0
- package/dist/access/labels.d.ts +35 -0
- package/dist/access/refusals.d.ts +6 -0
- package/dist/access/routes.d.ts +45 -0
- package/dist/access/scopes.d.ts +20 -0
- package/dist/app/application.d.ts +5 -0
- package/dist/app/contributions.d.ts +1 -1
- package/dist/app/environment.d.ts +2 -0
- package/dist/app/feature.d.ts +8 -0
- package/dist/app/index.js +260 -294
- package/dist/bottomDock-BZEiOPYZ.js +12 -0
- package/dist/button/Button.vue.d.ts +3 -3
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +5 -3
- package/dist/button/shortcut.d.ts +28 -2
- package/dist/chrome-BS3xJcad.js +93 -0
- package/dist/client/client.d.ts +13 -0
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +19 -138
- package/dist/client/route.d.ts +59 -0
- package/dist/client-Bw0aM5Gu.js +147 -0
- package/dist/closeOverlays-CjVsIrpL.js +8 -0
- package/dist/collection/CollectionPage.vue.d.ts +1 -0
- package/dist/collection/CollectionRows.vue.d.ts +59 -0
- package/dist/collection/CollectionTable.vue.d.ts +1 -1
- package/dist/collection/DataTable.vue.d.ts +47 -0
- package/dist/collection/RowActions.vue.d.ts +19 -0
- package/dist/collection/columns.d.ts +2 -0
- package/dist/collection/http.d.ts +4 -2
- package/dist/collection/index.d.ts +4 -2
- package/dist/collection/index.js +87 -2299
- package/dist/collection/rowLayout.d.ts +10 -0
- package/dist/collection/slots.d.ts +6 -3
- package/dist/content/index.js +37 -66
- package/dist/contributions-CDDg3fKp.js +26 -0
- package/dist/controls/DateButton.vue.d.ts +1 -1
- package/dist/controls/PopupButton.vue.d.ts +1 -1
- package/dist/controls/index.js +11 -10
- package/dist/defineRoutes-BGAdiIrt.js +19 -0
- package/dist/describeError-Ctga6GcS.js +41 -0
- package/dist/dialogStack-DZZg55w0.js +31 -0
- package/dist/environment-Dva-SG8D.js +6 -0
- package/dist/{error-Bb_dr_Ay.js → error-CD7x0Jrz.js} +2 -2
- package/dist/feature-DdUAfyi4.js +25 -0
- package/dist/fieldMessages-C3Rpbktw.js +25 -0
- package/dist/form/CheckboxField.vue.d.ts +1 -1
- package/dist/form/CommandDialog.vue.d.ts +13 -2
- package/dist/form/DateField.vue.d.ts +1 -1
- package/dist/form/DateTimeField.vue.d.ts +1 -1
- package/dist/form/EditorPage.vue.d.ts +1 -1
- package/dist/form/Field.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +1 -1
- package/dist/form/FormGroup.vue.d.ts +1 -1
- package/dist/form/FormGroupButton.vue.d.ts +1 -1
- package/dist/form/FormRow.vue.d.ts +1 -1
- package/dist/form/I18nField.vue.d.ts +3 -3
- package/dist/form/MoneyField.vue.d.ts +1 -1
- package/dist/form/MonthYearField.vue.d.ts +1 -1
- package/dist/form/MultiSelectField.vue.d.ts +4 -1
- package/dist/form/NumberCell.vue.d.ts +1 -1
- package/dist/form/NumberField.vue.d.ts +8 -2
- package/dist/form/OptionList.vue.d.ts +6 -2
- package/dist/form/OtpInput.vue.d.ts +2 -2
- package/dist/form/PhotoField.vue.d.ts +1 -1
- package/dist/form/SelectField.vue.d.ts +4 -1
- package/dist/form/SwitchField.vue.d.ts +1 -1
- package/dist/form/TextField.vue.d.ts +3 -3
- package/dist/form/TextareaField.vue.d.ts +3 -3
- package/dist/form/TimeField.vue.d.ts +1 -1
- package/dist/form/date/DatePickerSheet.vue.d.ts +1 -1
- package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +1273 -3509
- package/dist/form/suggestions.d.ts +11 -0
- package/dist/form/useOptions.d.ts +60 -0
- package/dist/guards-Cd1V28oG.js +51 -0
- package/dist/http-DGGSKWvU.js +193 -0
- package/dist/i18n/describeError.d.ts +31 -0
- package/dist/i18n/index.d.ts +307 -0
- package/dist/i18n/index.js +54 -52
- package/dist/icon/core.d.ts +13 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/ImpersonationBanner.vue.d.ts +2 -0
- package/dist/identity/LocaleSync.vue.d.ts +2 -0
- package/dist/identity/SessionExpiry.vue.d.ts +2 -0
- package/dist/identity/SignInAsButton.vue.d.ts +15 -0
- package/dist/identity/SignInPage.vue.d.ts +2 -0
- package/dist/identity/context.d.ts +7 -0
- package/dist/identity/feature.d.ts +16 -0
- package/dist/identity/fieldMessages.d.ts +15 -0
- package/dist/identity/index.d.ts +16 -0
- package/dist/identity/index.js +18 -0
- package/dist/identity/profile/DetailsPanel.vue.d.ts +11 -0
- package/dist/identity/profile/EmailChangeDialog.vue.d.ts +14 -0
- package/dist/identity/profile/EmailPanel.vue.d.ts +11 -0
- package/dist/identity/profile/PanelActions.vue.d.ts +17 -0
- package/dist/identity/profile/PasswordPanel.vue.d.ts +2 -0
- package/dist/identity/profile/ProfileMenuItem.vue.d.ts +2 -0
- package/dist/identity/profile/ProfilePage.vue.d.ts +2 -0
- package/dist/identity/profile/SessionsPanel.vue.d.ts +2 -0
- package/dist/identity/profile/SignInsPanel.vue.d.ts +2 -0
- package/dist/identity/profile/VerifyCode.vue.d.ts +49 -0
- package/dist/identity/profile/routes.d.ts +13 -0
- package/dist/identity/session.d.ts +30 -0
- package/dist/identity/shared/ActionRow.vue.d.ts +20 -0
- package/dist/identity/shared/ChangeFeed.vue.d.ts +11 -0
- package/dist/identity/shared/PageBar.vue.d.ts +12 -0
- package/dist/identity/shared/SectionIntro.vue.d.ts +16 -0
- package/dist/identity/shared/SessionList.vue.d.ts +19 -0
- package/dist/{phone/CountryFlag.vue.d.ts → identity/shared/SignInTable.vue.d.ts} +5 -4
- package/dist/identity/shared/ViewTabs.vue.d.ts +23 -0
- package/dist/identity/shared/signInEvents.d.ts +9 -0
- package/dist/identity/signIn.d.ts +27 -0
- package/dist/identity/useSignInForm.d.ts +20 -0
- package/dist/identity/user.d.ts +6 -0
- package/dist/identity/users/DeactivateDialog.vue.d.ts +18 -0
- package/dist/identity/users/NewUserDialog.vue.d.ts +9 -0
- package/dist/identity/users/SetPasswordDialog.vue.d.ts +16 -0
- package/dist/identity/users/UserRecord.vue.d.ts +2 -0
- package/dist/identity/users/UsersList.vue.d.ts +2 -0
- package/dist/identity/users/access.d.ts +4 -0
- package/dist/identity/users/context.d.ts +9 -0
- package/dist/identity/users/feature.d.ts +34 -0
- package/dist/identity/users/languages.d.ts +4 -0
- package/dist/identity/users/list.d.ts +8 -0
- package/dist/identity/users/person.d.ts +26 -0
- package/dist/identity/users/personSections.d.ts +22 -0
- package/dist/identity/users/routes.d.ts +22 -0
- package/dist/identity/users/sections/Activity.vue.d.ts +2 -0
- package/dist/identity/users/sections/Changes.vue.d.ts +2 -0
- package/dist/identity/users/sections/General.vue.d.ts +2 -0
- package/dist/identity/users/sections/Sessions.vue.d.ts +2 -0
- package/dist/identity/users/sections/SignIn.vue.d.ts +2 -0
- package/dist/identity/users/sections/SignIns.vue.d.ts +2 -0
- package/dist/identity/users/status.d.ts +4 -0
- package/dist/index-B2dbYZR9.js +706 -0
- package/dist/index-BAcl44SC.js +459 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/CountryFlag.vue.d.ts +10 -0
- package/dist/internal/languageName.d.ts +2 -0
- package/dist/keepAlive-WYQGRhuz.js +48 -0
- package/dist/languageName-CItV_SOv.js +11 -0
- package/dist/languages-BShG9LpE.js +10 -0
- package/dist/leaveGuard-Cc8yeLxM.js +72 -0
- package/dist/modal/Modal.vue.d.ts +4 -0
- package/dist/modal/ShortcutHelp.vue.d.ts +2 -0
- package/dist/modal/index.d.ts +2 -0
- package/dist/modal/index.js +64 -6
- package/dist/modal/placement.d.ts +22 -0
- package/dist/modules/access/entities.d.ts +112 -0
- package/dist/modules/access/routes.d.ts +67 -0
- package/dist/modules/access/schemas.d.ts +73 -0
- package/dist/modules/identity/entities.d.ts +150 -0
- package/dist/modules/identity/routes.d.ts +118 -0
- package/dist/modules/identity/schemas.d.ts +145 -0
- package/dist/{navigation-B33ikiCS.js → navigation-BPWa63ge.js} +21 -20
- package/dist/neighbors-D0WRBxXI.js +86 -0
- package/dist/{options-CjSz2dQK.js → options-BXkMR63B.js} +48 -49
- package/dist/overlay/AlertDialog.vue.d.ts +3 -3
- package/dist/overlay/Popover.vue.d.ts +4 -1
- package/dist/overlay/closeOverlays.d.ts +7 -0
- package/dist/overlay/dialogStack.d.ts +9 -0
- package/dist/overlay/index.d.ts +1 -1
- package/dist/overlay/index.js +20 -18
- package/dist/page/AdaptivePageShell.vue.d.ts +2 -2
- package/dist/page/ResourceHeader.vue.d.ts +2 -2
- package/dist/page/index.js +99 -457
- package/dist/phone/PhoneField.vue.d.ts +2 -2
- package/dist/phone/index.js +247 -540
- package/dist/platform/AccessGate.vue.d.ts +50 -0
- package/dist/platform/index.d.ts +4 -2
- package/dist/platform/index.js +38 -35
- package/dist/platform/platform.d.ts +2 -2
- package/dist/platform/session.d.ts +22 -1
- package/dist/platform-hunMqFdB.js +255 -0
- package/dist/resource/index.js +8 -248
- package/dist/routeResource-DstM0hvf.js +82 -0
- package/dist/router/guards.d.ts +7 -1
- package/dist/router/index.js +23 -37
- package/dist/router/navigation.d.ts +1 -1
- package/dist/rowLayout-BI7a3Kom.js +603 -0
- package/dist/sectionIndex-BS0ic5W7.js +86 -0
- package/dist/{sections-LtxV5Mtk.js → sections-BEqW1dOc.js} +1 -1
- package/dist/shell/AccountMenuItem.vue.d.ts +4 -1
- package/dist/shell/BackofficeShell.vue.d.ts +2 -2
- package/dist/shell/ShellBrand.vue.d.ts +1 -1
- package/dist/shell/backofficeShell.d.ts +1 -1
- package/dist/shell/identity.d.ts +1 -1
- package/dist/shell/index.js +476 -532
- package/dist/state/Badge.vue.d.ts +17 -10
- package/dist/state/ProgressTrack.vue.d.ts +1 -1
- package/dist/state/hue.d.ts +8 -0
- package/dist/state/index.d.ts +2 -0
- package/dist/state/index.js +34 -31
- package/dist/state/useLoad.d.ts +41 -0
- package/dist/status-C9aXR-Jb.js +33 -0
- package/dist/styles.css +1 -1
- package/dist/suggestions-BJAqOj4c.js +138 -0
- package/dist/testing/app.d.ts +61 -0
- package/dist/testing/async.d.ts +12 -0
- package/dist/testing/collection.d.ts +18 -0
- package/dist/testing/format.d.ts +9 -0
- package/dist/testing/i18n.d.ts +16 -0
- package/dist/testing/index.d.ts +14 -0
- package/dist/testing/index.js +178 -0
- package/dist/testing/media.d.ts +23 -0
- package/dist/testing/platform.d.ts +40 -0
- package/dist/testing/transport.d.ts +40 -0
- package/dist/toast-D9Z5To38.js +13 -0
- package/dist/useCommand-BgRwnYlV.js +135 -0
- package/dist/{useDialog-wmyNx2j_.js → useDialog-CXR3hN0G.js} +1 -1
- package/dist/useLoad-CYRVx6HW.js +39 -0
- package/dist/useResourceForm-Bgc9jMcu.js +52 -0
- package/dist/useSaveChrome-chi6D3HY.js +25 -0
- package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
- package/package.json +26 -5
- package/src/styles/theme.css +60 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-DKc6ugmr.js +0 -31
- package/dist/Button.vue_vue_type_script_setup_true_lang-3f0emVNU.js +0 -141
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
- package/dist/SectionList.vue_vue_type_script_setup_true_lang-DGcKX_OJ.js +0 -230
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-SyFWE33A.js +0 -422
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-BLBD5ps8.js +0 -210
- package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +0 -243
- package/dist/chrome-D9pwD6iS.js +0 -101
- package/dist/dialogStack-DiTG1rZc.js +0 -26
- package/dist/environment-D3nozt9a.js +0 -75
- package/dist/feature-DyDtyMLU.js +0 -47
- package/dist/platform-jqlKVJ2e.js +0 -244
- package/dist/toast-BTeX0r66.js +0 -129
- /package/dist/{phone → internal}/flagLoaders.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as c, useTemplateRef as l, openBlock as m, createBlock as d, unref as s } from "vue";
|
|
2
2
|
import { useI18n as f } from "vue-i18n";
|
|
3
|
-
import { _ as p } from "./AlertDialog.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as p } from "./AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js";
|
|
4
4
|
const C = /* @__PURE__ */ c({
|
|
5
5
|
__name: "DiscardChangesModal",
|
|
6
6
|
emits: ["confirm", "cancel", "dismissed"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as r, openBlock as t, createElementBlock as n, toDisplayString as s, createVNode as a, unref as l, createElementVNode as m, createCommentVNode as c, renderSlot as p } from "vue";
|
|
2
|
-
import { _ as d } from "./Icon.vue_vue_type_script_lang-
|
|
2
|
+
import { _ as d } from "./Icon.vue_vue_type_script_lang-VvcV2Bzo.js";
|
|
3
3
|
const _ = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-sm text-content-muted"
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
var J = Object.defineProperty;
|
|
2
|
+
var Q = (a, e, s) => e in a ? J(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s;
|
|
3
|
+
var I = (a, e, s) => Q(a, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
+
import { shallowRef as M, computed as x, toRaw as X, reactive as Z, ref as Y, defineComponent as K, watch as ee, nextTick as te, openBlock as b, createBlock as re, withCtx as se, createElementBlock as O, toDisplayString as A, createCommentVNode as E, Fragment as U, createElementVNode as P, normalizeClass as ae, unref as R, renderList as ne, createTextVNode as V } from "vue";
|
|
5
|
+
import { useI18n as G } from "vue-i18n";
|
|
6
|
+
import { i as le, a as q } from "./error-CD7x0Jrz.js";
|
|
7
|
+
import { _ as ie } from "./Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js";
|
|
8
|
+
class ue {
|
|
9
|
+
constructor() {
|
|
10
|
+
I(this, "messages", M({}));
|
|
11
|
+
/** How many fields have a message. */
|
|
12
|
+
I(this, "count", x(() => Object.keys(this.messages.value).length));
|
|
13
|
+
}
|
|
14
|
+
/** Replaces everything. Empty lists are dropped. */
|
|
15
|
+
set(e) {
|
|
16
|
+
this.messages.value = Object.fromEntries(Object.entries(e).filter(([, s]) => s.length > 0).map(([s, t]) => [s, [...t]]));
|
|
17
|
+
}
|
|
18
|
+
add(e, s) {
|
|
19
|
+
this.messages.value = { ...this.messages.value, [e]: [...this.messages.value[e] ?? [], s] };
|
|
20
|
+
}
|
|
21
|
+
/** Clears one field (and its nested paths), or everything. */
|
|
22
|
+
clear(e) {
|
|
23
|
+
if (e === void 0) {
|
|
24
|
+
this.count.value > 0 && (this.messages.value = {});
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const s = Object.fromEntries(Object.entries(this.messages.value).filter(([t]) => t !== e && !t.startsWith(`${e}.`)));
|
|
28
|
+
Object.keys(s).length !== this.count.value && (this.messages.value = s);
|
|
29
|
+
}
|
|
30
|
+
/** Whether the field, or a value inside it (`items.0.quantity` for `items`), has a message. */
|
|
31
|
+
has(e) {
|
|
32
|
+
return this.first(e) !== void 0 || Object.keys(this.messages.value).some((s) => s.startsWith(`${e}.`));
|
|
33
|
+
}
|
|
34
|
+
first(e) {
|
|
35
|
+
return this.messages.value[e]?.[0];
|
|
36
|
+
}
|
|
37
|
+
all() {
|
|
38
|
+
return this.messages.value;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function f(a) {
|
|
42
|
+
const e = X(a);
|
|
43
|
+
return e === null || typeof e != "object" ? e : e instanceof Date ? new Date(e.getTime()) : typeof Blob < "u" && e instanceof Blob ? e : Array.isArray(e) ? e.map(f) : Object.fromEntries(Object.entries(e).map(([s, t]) => [s, f(t)]));
|
|
44
|
+
}
|
|
45
|
+
function S(a, e) {
|
|
46
|
+
const s = a, t = e;
|
|
47
|
+
if (Object.is(s, t)) return !0;
|
|
48
|
+
if (s === null || t === null || typeof s != "object" || typeof t != "object") return !1;
|
|
49
|
+
if (s instanceof Date || t instanceof Date) return s instanceof Date && t instanceof Date && s.getTime() === t.getTime();
|
|
50
|
+
if (Array.isArray(s) || Array.isArray(t))
|
|
51
|
+
return Array.isArray(s) && Array.isArray(t) && s.length === t.length && s.every((c, d) => S(c, t[d]));
|
|
52
|
+
if (typeof Blob < "u" && (s instanceof Blob || t instanceof Blob)) return !1;
|
|
53
|
+
const l = (c) => Object.keys(c).filter((d) => c[d] !== void 0), o = l(s);
|
|
54
|
+
return o.length === l(t).length && o.every((c) => S(s[c], t[c]));
|
|
55
|
+
}
|
|
56
|
+
function W(a) {
|
|
57
|
+
const e = {};
|
|
58
|
+
for (const s of a) {
|
|
59
|
+
const t = s.path.map(String).join(".");
|
|
60
|
+
(e[t] ?? (e[t] = [])).push(s.message);
|
|
61
|
+
}
|
|
62
|
+
return e;
|
|
63
|
+
}
|
|
64
|
+
const oe = (a) => a.split(".")[0] ?? a, L = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
65
|
+
function ye(a) {
|
|
66
|
+
const { t: e } = G(), t = Z(f(typeof a.defaults == "function" ? a.defaults() : a.defaults)), l = M(f(t)), o = new ue(), c = Y(!1), d = M(null), v = x(() => !S(t, l.value));
|
|
67
|
+
let j = null, h = L();
|
|
68
|
+
function y(r) {
|
|
69
|
+
const n = t;
|
|
70
|
+
for (const i of Object.keys(n)) i in r || delete n[i];
|
|
71
|
+
Object.assign(n, f(r));
|
|
72
|
+
}
|
|
73
|
+
function D() {
|
|
74
|
+
o.clear(), d.value = null;
|
|
75
|
+
}
|
|
76
|
+
function _(r, n) {
|
|
77
|
+
const i = q(n) ? n.requestId : null, u = a.failureMessage?.(r, n) ?? e(`core.form.failure.${r}`);
|
|
78
|
+
return d.value = { kind: r, message: u, requestId: i, error: n };
|
|
79
|
+
}
|
|
80
|
+
function B(r, n = !1) {
|
|
81
|
+
const { translate: i, serverField: u } = a, w = n && u ? Object.entries(r).map(([m, g]) => [u(m), g]) : Object.entries(r);
|
|
82
|
+
o.set(Object.fromEntries(i ? w.map(([m, g]) => [m, g.map((F) => i(F, m))]) : w));
|
|
83
|
+
}
|
|
84
|
+
function T() {
|
|
85
|
+
if (o.clear(), !a.validator) return f(t);
|
|
86
|
+
const r = a.validator.safeParse(f(t));
|
|
87
|
+
return r.success ? r.data : (B(W(r.error.issues)), null);
|
|
88
|
+
}
|
|
89
|
+
function C(r) {
|
|
90
|
+
if (o.clear(), !a.validator) return !0;
|
|
91
|
+
const n = a.validator.safeParse(f(t));
|
|
92
|
+
if (n.success) return !0;
|
|
93
|
+
const i = Object.fromEntries(Object.entries(W(n.error.issues)).filter(([u]) => r.includes(oe(u))));
|
|
94
|
+
return B(i), Object.keys(i).length === 0;
|
|
95
|
+
}
|
|
96
|
+
function H(r) {
|
|
97
|
+
if (!q(r)) return "failed";
|
|
98
|
+
switch (r.kind) {
|
|
99
|
+
case "validation":
|
|
100
|
+
return "invalid";
|
|
101
|
+
case "conflict":
|
|
102
|
+
return "conflict";
|
|
103
|
+
case "forbidden":
|
|
104
|
+
return "forbidden";
|
|
105
|
+
case "unauthorized":
|
|
106
|
+
return "unauthorized";
|
|
107
|
+
case "network":
|
|
108
|
+
return "offline";
|
|
109
|
+
default:
|
|
110
|
+
return "failed";
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async function z(r, n, i, u) {
|
|
114
|
+
if (j) return j;
|
|
115
|
+
const m = (async () => {
|
|
116
|
+
d.value = null;
|
|
117
|
+
const g = r();
|
|
118
|
+
if (g === null) return { status: "failed", failure: _("invalid", null) };
|
|
119
|
+
const F = f(t);
|
|
120
|
+
let k;
|
|
121
|
+
c.value = !0;
|
|
122
|
+
try {
|
|
123
|
+
k = await n(g, { idempotencyKey: h });
|
|
124
|
+
} catch (p) {
|
|
125
|
+
if (c.value = !1, le(p)) return { status: "aborted" };
|
|
126
|
+
const N = H(p);
|
|
127
|
+
return N === "invalid" && q(p) && B(p.fields, !0), { status: "failed", failure: _(N, p) };
|
|
128
|
+
}
|
|
129
|
+
const $ = u?.hydrateFrom?.(k) ?? null;
|
|
130
|
+
$ ? (y($), l.value = f($), o.clear()) : i(k, F);
|
|
131
|
+
try {
|
|
132
|
+
await u?.refresh?.(k);
|
|
133
|
+
} catch (p) {
|
|
134
|
+
return _("refresh", p), { status: "saved-refresh-failed", value: k, error: p };
|
|
135
|
+
} finally {
|
|
136
|
+
c.value = !1;
|
|
137
|
+
}
|
|
138
|
+
return { status: "saved", value: k };
|
|
139
|
+
})().finally(() => {
|
|
140
|
+
j = null, h = L();
|
|
141
|
+
});
|
|
142
|
+
return j = m, m;
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
values: t,
|
|
146
|
+
errors: o,
|
|
147
|
+
dirty: v,
|
|
148
|
+
submitting: c,
|
|
149
|
+
failure: d,
|
|
150
|
+
bind(r) {
|
|
151
|
+
return {
|
|
152
|
+
get modelValue() {
|
|
153
|
+
return t[r];
|
|
154
|
+
},
|
|
155
|
+
"onUpdate:modelValue"(n) {
|
|
156
|
+
t[r] = n, o.clear(r);
|
|
157
|
+
},
|
|
158
|
+
get error() {
|
|
159
|
+
return o.first(r);
|
|
160
|
+
},
|
|
161
|
+
"data-field-key": r
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
bindMonthYear(r, n) {
|
|
165
|
+
const i = t;
|
|
166
|
+
return {
|
|
167
|
+
get month() {
|
|
168
|
+
return i[r] ?? null;
|
|
169
|
+
},
|
|
170
|
+
get year() {
|
|
171
|
+
return i[n] ?? null;
|
|
172
|
+
},
|
|
173
|
+
"onUpdate:month"(u) {
|
|
174
|
+
i[r] = u, o.clear(r);
|
|
175
|
+
},
|
|
176
|
+
"onUpdate:year"(u) {
|
|
177
|
+
i[n] = u, o.clear(n);
|
|
178
|
+
},
|
|
179
|
+
get error() {
|
|
180
|
+
return o.first(r) ?? o.first(n);
|
|
181
|
+
},
|
|
182
|
+
"data-field-key": `${r} ${n}`
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
hydrate(r) {
|
|
186
|
+
y(r), l.value = f(r), D();
|
|
187
|
+
},
|
|
188
|
+
reset() {
|
|
189
|
+
y(l.value), D();
|
|
190
|
+
},
|
|
191
|
+
markClean() {
|
|
192
|
+
l.value = f(t);
|
|
193
|
+
},
|
|
194
|
+
validate: T,
|
|
195
|
+
check: C,
|
|
196
|
+
submit: (r, n) => z(T, r, (i, u) => l.value = u, n),
|
|
197
|
+
submitFields: (r, n, i) => z(
|
|
198
|
+
() => C(r) ? Object.fromEntries(r.map((u) => [u, f(t[u])])) : null,
|
|
199
|
+
n,
|
|
200
|
+
(u, w) => {
|
|
201
|
+
const m = f(l.value);
|
|
202
|
+
for (const g of r) m[g] = f(w[g]);
|
|
203
|
+
l.value = m;
|
|
204
|
+
},
|
|
205
|
+
i
|
|
206
|
+
),
|
|
207
|
+
dismissFailure() {
|
|
208
|
+
d.value = null;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
const ce = {
|
|
213
|
+
key: 0,
|
|
214
|
+
class: "text-footnote font-medium"
|
|
215
|
+
}, fe = {
|
|
216
|
+
class: "mt-1 list-inside list-disc text-footnote",
|
|
217
|
+
"data-test": "form-errors-hidden"
|
|
218
|
+
}, de = {
|
|
219
|
+
key: 2,
|
|
220
|
+
class: "mt-1 text-caption text-content-muted"
|
|
221
|
+
}, be = /* @__PURE__ */ K({
|
|
222
|
+
__name: "FormErrors",
|
|
223
|
+
props: {
|
|
224
|
+
form: {},
|
|
225
|
+
label: { type: Function, default: (a) => a },
|
|
226
|
+
scope: { default: null }
|
|
227
|
+
},
|
|
228
|
+
setup(a) {
|
|
229
|
+
const e = a, { t: s } = G(), t = Y([]);
|
|
230
|
+
ee(
|
|
231
|
+
() => e.form.errors.all(),
|
|
232
|
+
async (c) => {
|
|
233
|
+
await te();
|
|
234
|
+
const d = e.scope ?? document, v = new Set([...d.querySelectorAll("[data-field-key]")].flatMap((h) => (h.getAttribute("data-field-key") ?? "").split(/\s+/))), j = (h) => h.split(".").some((y, D, _) => v.has(_.slice(0, D + 1).join(".")));
|
|
235
|
+
t.value = Object.entries(c).flatMap(([h, y]) => y[0] && !j(h) ? [{ field: h, message: y[0] }] : []);
|
|
236
|
+
},
|
|
237
|
+
{ immediate: !0 }
|
|
238
|
+
);
|
|
239
|
+
const l = x(() => e.form.failure.value), o = x(() => l.value?.kind === "conflict" || l.value?.kind === "refresh" ? "warning" : "critical");
|
|
240
|
+
return (c, d) => l.value || t.value.length ? (b(), re(ie, {
|
|
241
|
+
key: 0,
|
|
242
|
+
tone: l.value ? o.value : "warning",
|
|
243
|
+
"data-test": "form-errors"
|
|
244
|
+
}, {
|
|
245
|
+
default: se(() => [
|
|
246
|
+
l.value ? (b(), O("p", ce, A(l.value.message), 1)) : E("", !0),
|
|
247
|
+
t.value.length ? (b(), O(U, { key: 1 }, [
|
|
248
|
+
P("p", {
|
|
249
|
+
class: ae(["text-footnote", l.value ? "mt-1" : "font-medium"])
|
|
250
|
+
}, A(R(s)("core.form.errors.hidden_title")), 3),
|
|
251
|
+
P("ul", fe, [
|
|
252
|
+
(b(!0), O(U, null, ne(t.value, (v) => (b(), O("li", {
|
|
253
|
+
key: v.field
|
|
254
|
+
}, [
|
|
255
|
+
V(A(v.field ? e.label(v.field) : ""), 1),
|
|
256
|
+
v.field ? (b(), O(U, { key: 0 }, [
|
|
257
|
+
V(": ")
|
|
258
|
+
], 64)) : E("", !0),
|
|
259
|
+
V(A(v.message), 1)
|
|
260
|
+
]))), 128))
|
|
261
|
+
])
|
|
262
|
+
], 64)) : E("", !0),
|
|
263
|
+
l.value?.requestId ? (b(), O("p", de, A(R(s)("core.form.errors.request", { id: l.value.requestId })), 1)) : E("", !0)
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["tone"])) : E("", !0);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
export {
|
|
270
|
+
ue as E,
|
|
271
|
+
be as _,
|
|
272
|
+
f as c,
|
|
273
|
+
oe as f,
|
|
274
|
+
S as s,
|
|
275
|
+
ye as u
|
|
276
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { defineComponent as B, openBlock as d, createBlock as L, withCtx as N, createTextVNode as g, toDisplayString as m, unref as h, createCommentVNode as i, inject as C, provide as y, ref as R, useSlots as O, computed as n, shallowReactive as E, useTemplateRef as V, useId as A, createElementBlock as p, normalizeStyle as M, normalizeClass as G, createElementVNode as S, renderSlot as f } from "vue";
|
|
2
|
+
import { s as T, u as W } from "./sectionIndex-BS0ic5W7.js";
|
|
3
|
+
import { d as $, i as j } from "./options-BXkMR63B.js";
|
|
4
|
+
import { useI18n as D } from "vue-i18n";
|
|
5
|
+
import { _ as q } from "./Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js";
|
|
6
|
+
const H = /* @__PURE__ */ B({
|
|
7
|
+
__name: "GroupEditAction",
|
|
8
|
+
props: {
|
|
9
|
+
allowed: { type: Boolean, default: !0 },
|
|
10
|
+
locked: { type: Boolean, default: !1 },
|
|
11
|
+
label: { default: void 0 }
|
|
12
|
+
},
|
|
13
|
+
emits: ["click"],
|
|
14
|
+
setup(s, { emit: e }) {
|
|
15
|
+
const t = s, o = e, { t: a } = D();
|
|
16
|
+
return (k, l) => t.allowed && !t.locked ? (d(), L(q, {
|
|
17
|
+
key: 0,
|
|
18
|
+
prominence: "plain",
|
|
19
|
+
size: "sm",
|
|
20
|
+
"data-test": "group-edit",
|
|
21
|
+
onClick: l[0] || (l[0] = (c) => o("click"))
|
|
22
|
+
}, {
|
|
23
|
+
default: N(() => [
|
|
24
|
+
g(m(t.label ?? h(a)("core.actions.edit")), 1)
|
|
25
|
+
]),
|
|
26
|
+
_: 1
|
|
27
|
+
})) : i("", !0);
|
|
28
|
+
}
|
|
29
|
+
}), F = Symbol("vue-core.recordGroups"), J = () => C(F, null);
|
|
30
|
+
function P() {
|
|
31
|
+
const s = /* @__PURE__ */ new Map();
|
|
32
|
+
return {
|
|
33
|
+
register(e, t) {
|
|
34
|
+
const o = s.get(t) ?? /* @__PURE__ */ new Map();
|
|
35
|
+
return o.set(e, (o.get(e) ?? 0) + 1), s.set(t, o), () => {
|
|
36
|
+
const a = (o.get(e) ?? 1) - 1;
|
|
37
|
+
a <= 0 ? o.delete(e) : o.set(e, a);
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
groupOf: (e) => s.get(e)?.keys().next().value,
|
|
41
|
+
fieldsOf: (e) => [...s.entries()].filter(([, t]) => t.has(e)).map(([t]) => t)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function le(s) {
|
|
45
|
+
const e = P();
|
|
46
|
+
return y(F, {
|
|
47
|
+
only: R(null),
|
|
48
|
+
edit: (t, o) => s.edit(t, o),
|
|
49
|
+
editLabel: s.editLabel ? (t) => s.editLabel?.(t) : void 0,
|
|
50
|
+
register: (t, o) => e.register(t, o)
|
|
51
|
+
}), e;
|
|
52
|
+
}
|
|
53
|
+
const Q = ["id"], U = {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: "flex min-w-0 items-end gap-2 px-row-inset pb-2"
|
|
56
|
+
}, X = { class: "min-w-0 flex-1 text-subheadline font-semibold text-content-strong compact:text-footnote compact:font-normal compact:uppercase compact:tracking-wide compact:text-content-muted" }, Y = { class: "form-group-cell rounded-group bg-surface-cell shadow-group" }, Z = {
|
|
57
|
+
key: 1,
|
|
58
|
+
class: "px-row-inset pt-2 text-footnote text-content-muted text-pretty"
|
|
59
|
+
}, ae = /* @__PURE__ */ B({
|
|
60
|
+
__name: "FormGroup",
|
|
61
|
+
props: {
|
|
62
|
+
header: { default: void 0 },
|
|
63
|
+
footer: { default: void 0 },
|
|
64
|
+
hideEmpty: { type: Boolean, default: !0 },
|
|
65
|
+
labelWidth: { default: "11rem" },
|
|
66
|
+
section: { type: Boolean, default: !1 },
|
|
67
|
+
anchor: { default: void 0 },
|
|
68
|
+
editable: { type: Boolean, default: void 0 },
|
|
69
|
+
lockedFooter: { default: void 0 },
|
|
70
|
+
group: { default: void 0 }
|
|
71
|
+
},
|
|
72
|
+
setup(s) {
|
|
73
|
+
const e = s, t = O(), o = C($, R(!0));
|
|
74
|
+
y($, n(() => o.value && e.editable !== !1));
|
|
75
|
+
const a = E(/* @__PURE__ */ new Set()), k = n(() => [...a].some((r) => r.value)), l = J(), c = E(/* @__PURE__ */ new Set()), z = n(() => c.size > 0 && [...c].every((r) => r.value)), I = n(() => !l?.only.value || l.only.value === e.group), v = n(() => e.group && l?.edit && !z.value ? l.edit(e.group, e.header ?? "") : null), K = n(() => !!e.group && l?.only.value === e.group);
|
|
76
|
+
y(j, {
|
|
77
|
+
hideEmpty: n(() => e.hideEmpty),
|
|
78
|
+
registerLocked(r) {
|
|
79
|
+
return a.add(r), () => a.delete(r);
|
|
80
|
+
},
|
|
81
|
+
registerField(r, u) {
|
|
82
|
+
c.add(u);
|
|
83
|
+
const x = e.group && r && l?.register ? l.register(e.group, r) : null;
|
|
84
|
+
return () => {
|
|
85
|
+
c.delete(u), x?.();
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const b = n(() => k.value ? e.lockedFooter : void 0), _ = V("root"), w = e.anchor ?? (T(e.header ?? "") || `group-${A()}`);
|
|
90
|
+
return e.section && W(w, () => e.header ?? "", _), (r, u) => I.value ? (d(), p("section", {
|
|
91
|
+
key: 0,
|
|
92
|
+
ref_key: "root",
|
|
93
|
+
ref: _,
|
|
94
|
+
id: e.section ? h(w) : void 0,
|
|
95
|
+
"data-test": "form-group",
|
|
96
|
+
class: G(["form-group flex min-w-0 flex-col has-[>.form-group-cell:empty]:hidden", { "scroll-mt-4": e.section }]),
|
|
97
|
+
style: M({ "--form-label-width": e.labelWidth })
|
|
98
|
+
}, [
|
|
99
|
+
!K.value && (e.header || t.header || t["header-trailing"] || v.value) ? (d(), p("header", U, [
|
|
100
|
+
S("h3", X, [
|
|
101
|
+
f(r.$slots, "header", {}, () => [
|
|
102
|
+
g(m(e.header), 1)
|
|
103
|
+
])
|
|
104
|
+
]),
|
|
105
|
+
f(r.$slots, "header-trailing", {}, () => [
|
|
106
|
+
v.value ? (d(), L(H, {
|
|
107
|
+
key: 0,
|
|
108
|
+
label: e.group ? h(l)?.editLabel?.(e.group) : void 0,
|
|
109
|
+
onClick: u[0] || (u[0] = (x) => v.value())
|
|
110
|
+
}, null, 8, ["label"])) : i("", !0)
|
|
111
|
+
])
|
|
112
|
+
])) : i("", !0),
|
|
113
|
+
S("div", Y, [
|
|
114
|
+
f(r.$slots, "default")
|
|
115
|
+
]),
|
|
116
|
+
e.footer || t.footer ? (d(), p("p", Z, [
|
|
117
|
+
f(r.$slots, "footer", {}, () => [
|
|
118
|
+
g(m(e.footer), 1)
|
|
119
|
+
])
|
|
120
|
+
])) : i("", !0),
|
|
121
|
+
b.value ? (d(), p("p", {
|
|
122
|
+
key: 2,
|
|
123
|
+
"data-test": "form-group-locked-footer",
|
|
124
|
+
class: G(["px-row-inset text-footnote text-content-muted text-pretty", e.footer || t.footer ? "pt-1" : "pt-2"])
|
|
125
|
+
}, m(b.value), 3)) : i("", !0)
|
|
126
|
+
], 14, Q)) : i("", !0);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
ae as _,
|
|
131
|
+
H as a,
|
|
132
|
+
P as c,
|
|
133
|
+
le as p,
|
|
134
|
+
F as r,
|
|
135
|
+
J as u
|
|
136
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as n, provide as f, computed as s, useTemplateRef as u, openBlock as t, createElementBlock as p, withModifiers as c, createBlock as d, createCommentVNode as b, renderSlot as _ } from "vue";
|
|
2
|
+
import { d as v } from "./options-BXkMR63B.js";
|
|
3
|
+
import { _ as k } from "./FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js";
|
|
4
|
+
const x = /* @__PURE__ */ n({
|
|
5
|
+
__name: "FormView",
|
|
6
|
+
props: {
|
|
7
|
+
form: { default: void 0 },
|
|
8
|
+
editable: { type: Boolean, default: !0 },
|
|
9
|
+
fieldLabel: { type: Function, default: void 0 }
|
|
10
|
+
},
|
|
11
|
+
emits: ["submit"],
|
|
12
|
+
setup(r, { emit: i }) {
|
|
13
|
+
const e = r, l = i;
|
|
14
|
+
f(v, s(() => e.editable));
|
|
15
|
+
const o = u("root");
|
|
16
|
+
function m() {
|
|
17
|
+
e.form?.submitting.value || !e.editable || l("submit");
|
|
18
|
+
}
|
|
19
|
+
return (a, y) => (t(), p("form", {
|
|
20
|
+
ref_key: "root",
|
|
21
|
+
ref: o,
|
|
22
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
23
|
+
novalidate: "",
|
|
24
|
+
onSubmit: c(m, ["prevent"])
|
|
25
|
+
}, [
|
|
26
|
+
e.form ? (t(), d(k, {
|
|
27
|
+
key: 0,
|
|
28
|
+
form: e.form,
|
|
29
|
+
label: e.fieldLabel,
|
|
30
|
+
scope: o.value
|
|
31
|
+
}, null, 8, ["form", "label", "scope"])) : b("", !0),
|
|
32
|
+
_(a.$slots, "default")
|
|
33
|
+
], 544));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
x as _
|
|
38
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { defineComponent as R, computed as N, openBlock as i, createElementBlock as k, createVNode as o, unref as e, withCtx as u, mergeProps as c, createBlock as b, createCommentVNode as d, createElementVNode as p, toDisplayString as v, createTextVNode as S } from "vue";
|
|
2
|
+
import { useI18n as V } from "vue-i18n";
|
|
3
|
+
import { RouterLink as B } from "vue-router";
|
|
4
|
+
import { u as E } from "./format-B8mJm946.js";
|
|
5
|
+
import { u as T } from "./useResourceForm-Bgc9jMcu.js";
|
|
6
|
+
import { _ as h } from "./FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js";
|
|
7
|
+
import { _ as F } from "./FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js";
|
|
8
|
+
import { _ as L } from "./SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js";
|
|
9
|
+
import { _ as f } from "./TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js";
|
|
10
|
+
import { u as A } from "./useSaveChrome-chi6D3HY.js";
|
|
11
|
+
import { P as D, b as G, i as I } from "./index-BAcl44SC.js";
|
|
12
|
+
import { t as M } from "./toast-D9Z5To38.js";
|
|
13
|
+
import { u as O } from "./platform-hunMqFdB.js";
|
|
14
|
+
import { b as U } from "./routeResource-DstM0hvf.js";
|
|
15
|
+
import { u as j } from "./fieldMessages-C3Rpbktw.js";
|
|
16
|
+
import { _ as $ } from "./ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js";
|
|
17
|
+
import { _ as z } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
|
|
18
|
+
import { u as H } from "./languages-BShG9LpE.js";
|
|
19
|
+
const J = {
|
|
20
|
+
class: "flex min-w-0 max-w-200 flex-col gap-group-gap",
|
|
21
|
+
"data-person-general": ""
|
|
22
|
+
}, K = {
|
|
23
|
+
key: 1,
|
|
24
|
+
class: "flex flex-wrap items-center gap-x-1.5 px-row-inset text-footnote text-content-muted",
|
|
25
|
+
"data-person-audit": ""
|
|
26
|
+
}, fe = /* @__PURE__ */ R({
|
|
27
|
+
__name: "General",
|
|
28
|
+
setup(Q) {
|
|
29
|
+
const { t: a } = V(), { http: q } = O(), w = E(), _ = U(D), n = G(), C = H(), x = (t) => t === null || t.trim() === "", P = {
|
|
30
|
+
safeParse(t) {
|
|
31
|
+
const s = t, m = ["login", "name", "email", "locale"].filter((g) => x(s[g])).map((g) => ({ path: [g], message: a("core.account.validation.required") }));
|
|
32
|
+
return m.length > 0 ? { success: !1, error: { issues: m } } : { success: !0, data: { ...s, locale: s.locale ?? "", phone: x(s.phone) ? void 0 : s.phone } };
|
|
33
|
+
}
|
|
34
|
+
}, r = T({
|
|
35
|
+
...j(),
|
|
36
|
+
source: _,
|
|
37
|
+
defaults: () => ({ login: "", name: "", email: "", phone: "", locale: null }),
|
|
38
|
+
validator: P,
|
|
39
|
+
toValues: (t) => ({ login: t.login, name: t.name, email: t.email, phone: t.phone, locale: t.locale }),
|
|
40
|
+
save: async (t, s) => (await q.request(I.usersUpdate, { id: s.id, ...t })).data
|
|
41
|
+
});
|
|
42
|
+
async function y() {
|
|
43
|
+
const t = await r.save();
|
|
44
|
+
(t.status === "saved" || t.status === "saved-refresh-failed") && M.success(a("core.users.general.saved"));
|
|
45
|
+
}
|
|
46
|
+
A({ form: r, allowed: () => n.can.manage, ready: () => _.data.value !== null, save: y, cancel: () => r.reset() });
|
|
47
|
+
const l = N(() => _.data.value);
|
|
48
|
+
return (t, s) => (i(), k("div", J, [
|
|
49
|
+
o(z, {
|
|
50
|
+
title: e(a)("core.users.sections.general"),
|
|
51
|
+
description: e(a)("core.users.intro.general")
|
|
52
|
+
}, null, 8, ["title", "description"]),
|
|
53
|
+
o(e(F), {
|
|
54
|
+
form: e(r),
|
|
55
|
+
editable: e(n).can.manage,
|
|
56
|
+
onSubmit: y
|
|
57
|
+
}, {
|
|
58
|
+
default: u(() => [
|
|
59
|
+
o(e(h), {
|
|
60
|
+
header: e(a)("core.users.groups.person"),
|
|
61
|
+
footer: e(a)("core.users.groups.person_footer"),
|
|
62
|
+
"label-width": "14rem"
|
|
63
|
+
}, {
|
|
64
|
+
default: u(() => [
|
|
65
|
+
o(e(f), c(e(r).bind("name"), {
|
|
66
|
+
label: e(a)("core.users.fields.name"),
|
|
67
|
+
required: ""
|
|
68
|
+
}), null, 16, ["label"]),
|
|
69
|
+
o(e(f), c(e(r).bind("login"), {
|
|
70
|
+
label: e(a)("core.users.fields.login"),
|
|
71
|
+
required: "",
|
|
72
|
+
mono: ""
|
|
73
|
+
}), null, 16, ["label"]),
|
|
74
|
+
o(e(L), c(e(r).bind("locale"), {
|
|
75
|
+
label: e(a)("core.users.fields.locale"),
|
|
76
|
+
options: e(C),
|
|
77
|
+
required: ""
|
|
78
|
+
}), null, 16, ["label", "options"])
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
}, 8, ["header", "footer"]),
|
|
82
|
+
o(e(h), {
|
|
83
|
+
header: e(a)("core.users.groups.contact"),
|
|
84
|
+
"label-width": "14rem"
|
|
85
|
+
}, {
|
|
86
|
+
default: u(() => [
|
|
87
|
+
o(e(f), c(e(r).bind("email"), {
|
|
88
|
+
label: e(a)("core.users.fields.email"),
|
|
89
|
+
type: "email",
|
|
90
|
+
required: ""
|
|
91
|
+
}), null, 16, ["label"]),
|
|
92
|
+
o(e(f), c(e(r).bind("phone"), {
|
|
93
|
+
label: e(a)("core.users.fields.phone"),
|
|
94
|
+
type: "tel"
|
|
95
|
+
}), null, 16, ["label"])
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 8, ["header"])
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["form", "editable"]),
|
|
102
|
+
e(n).can.deactivate || e(n).can.activate ? (i(), b(e(h), {
|
|
103
|
+
key: 0,
|
|
104
|
+
"data-person-actions": ""
|
|
105
|
+
}, {
|
|
106
|
+
default: u(() => [
|
|
107
|
+
e(n).can.deactivate ? (i(), b($, {
|
|
108
|
+
key: 0,
|
|
109
|
+
label: e(a)("core.users.actions.deactivate"),
|
|
110
|
+
sub: e(a)("core.users.deactivate.row_sub"),
|
|
111
|
+
tone: "critical",
|
|
112
|
+
"data-deactivate-row": "",
|
|
113
|
+
onClick: s[0] || (s[0] = (m) => e(n).deactivate())
|
|
114
|
+
}, null, 8, ["label", "sub"])) : d("", !0),
|
|
115
|
+
e(n).can.activate ? (i(), b($, {
|
|
116
|
+
key: 1,
|
|
117
|
+
label: e(a)("core.users.actions.activate"),
|
|
118
|
+
sub: e(a)("core.users.activate.row_sub"),
|
|
119
|
+
"data-activate-row": "",
|
|
120
|
+
onClick: s[1] || (s[1] = (m) => e(n).activate())
|
|
121
|
+
}, null, 8, ["label", "sub"])) : d("", !0)
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
})) : d("", !0),
|
|
125
|
+
l.value ? (i(), k("p", K, [
|
|
126
|
+
p("span", null, v(e(a)("core.users.general.created", { when: e(w).dateTime(l.value.created_at) })), 1),
|
|
127
|
+
s[2] || (s[2] = p("span", { "aria-hidden": "true" }, "·", -1)),
|
|
128
|
+
p("span", null, v(l.value.last_sign_in ? e(a)("core.users.general.last_sign_in", { when: e(w).dateTime(l.value.last_sign_in) }) : e(a)("core.users.general.never_signed_in")), 1),
|
|
129
|
+
s[3] || (s[3] = p("span", { "aria-hidden": "true" }, "·", -1)),
|
|
130
|
+
o(e(B), {
|
|
131
|
+
to: { name: "users.record.changes", params: { id: l.value.id }, query: t.$route.query },
|
|
132
|
+
class: "text-content-link"
|
|
133
|
+
}, {
|
|
134
|
+
default: u(() => [
|
|
135
|
+
S(v(e(a)("core.users.general.all_changes")), 1)
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["to"])
|
|
139
|
+
])) : d("", !0)
|
|
140
|
+
]));
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
export {
|
|
144
|
+
fe as default
|
|
145
|
+
};
|