@wssto2/vue-core 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js +22 -0
- package/dist/AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js +76 -0
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js +45 -0
- package/dist/Activity-2gGxQn7v.js +156 -0
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CeKK8_g5.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-BoinCY93.js} +48 -47
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-e4hzkzg3.js → AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CWLB3xsR.js → AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-n_wGPIIu.js → Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.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-B1eZgLae.js → Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js} +1 -1
- package/dist/Changes-Bm8xvagD.js +129 -0
- package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-DCBVw2Qd.js +1485 -0
- package/dist/DataTable.vue_vue_type_script_setup_true_lang-UH6f9puS.js +52 -0
- package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +255 -0
- package/dist/DeadLetters-CMRtXn_N.js +104 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-DyhYHRyz.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js} +1 -1
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js +276 -0
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js +136 -0
- package/dist/FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js +38 -0
- package/dist/General-CTqd0SLK.js +145 -0
- package/dist/HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js +45 -0
- package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-D7oC-d-S.js} +54 -37
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.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-CvwoT1JF.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js} +2 -2
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-CrMj6KPD.js → Menu.vue_vue_type_script_setup_true_lang-DTbAcDzL.js} +66 -58
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-BQZM49gC.js → Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js} +4 -4
- package/dist/NewRolePage-DTOWIxxC.js +42 -0
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js +31 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.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-B7qdEeej.js +47 -0
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js} +1 -1
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +46 -0
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-ElDizaW2.js → PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js} +1 -1
- package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
- package/dist/ProfilePage-BlpiWH_W.js +654 -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-C_ymvhHU.js +64 -0
- package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CwI_sROp.js +173 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-CmwvSytD.js +300 -0
- package/dist/RolePage-DZk7BZOc.js +315 -0
- package/dist/RolesPage-DzGGCMnm.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-BFYls8fR.js +148 -0
- package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-DSMXEaCs.js +314 -0
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js +58 -0
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js +423 -0
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-D5KRitar.js +111 -0
- package/dist/Sessions-CWqjjTr1.js +96 -0
- package/dist/SettingsPage-C4s0IdkW.js +255 -0
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js +145 -0
- package/dist/SignIn-zzKY__df.js +140 -0
- package/dist/SignInPage-Rqnus_s-.js +60 -0
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-CEbAvZ_C.js +79 -0
- package/dist/SignIns-Cnf9BVR0.js +66 -0
- package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js +93 -0
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +64 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js +155 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js +269 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +68 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +164 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js → Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js} +1 -1
- package/dist/UserRecord-DqigxVxH.js +267 -0
- package/dist/UsersList-DNlZsI9J.js +155 -0
- package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.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/contributions.d.ts +1 -1
- package/dist/app/feature.d.ts +8 -0
- package/dist/app/index.js +259 -296
- package/dist/bottomDock-BZEiOPYZ.js +12 -0
- package/dist/button/Button.vue.d.ts +3 -3
- package/dist/button/index.js +1 -1
- 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 +11 -138
- package/dist/client/route.d.ts +59 -0
- package/dist/client-k9euDWF4.js +147 -0
- package/dist/closeOverlays-CjVsIrpL.js +8 -0
- package/dist/collection/definition.d.ts +3 -0
- package/dist/collection/http.d.ts +4 -2
- package/dist/collection/index.js +74 -2428
- package/dist/collection/useCollection.d.ts +2 -0
- package/dist/content/index.js +37 -66
- package/dist/contributions-DsfmDoRD.js +26 -0
- package/dist/control-7EP4tjYy.js +313 -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-l5T9b8Uv.js → describeError-Ctga6GcS.js} +1 -1
- 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 +1 -1
- 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/NumberCell.vue.d.ts +1 -1
- package/dist/form/NumberField.vue.d.ts +2 -2
- package/dist/form/OtpInput.vue.d.ts +2 -2
- package/dist/form/PhotoField.vue.d.ts +1 -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.js +1159 -3474
- package/dist/guards-Dve61KjR.js +51 -0
- package/dist/http-CNcDHSOj.js +194 -0
- package/dist/i18n/index.d.ts +281 -0
- package/dist/i18n/index.js +52 -52
- package/dist/icon/core.d.ts +17 -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/identity/shared/SignInTable.vue.d.ts +11 -0
- 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-BsJ92eub.js +504 -0
- package/dist/index-CGv-u1Ws.js +459 -0
- package/dist/index-GcLnFF-z.js +706 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- 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 +1 -1
- package/dist/modal/Sheet.vue.d.ts +2 -0
- package/dist/modal/index.js +5 -5
- 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/events/entities.d.ts +16 -0
- package/dist/modules/events/routes.d.ts +17 -0
- package/dist/modules/events/schemas.d.ts +16 -0
- package/dist/modules/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/modules/notification/entities.d.ts +46 -0
- package/dist/modules/notification/routes.d.ts +26 -0
- package/dist/modules/notification/schemas.d.ts +25 -0
- package/dist/{navigation-B33ikiCS.js → navigation-Cm3iChlR.js} +21 -20
- package/dist/neighbors-DpaIMQAL.js +86 -0
- package/dist/notifications/InboxPanel.vue.d.ts +16 -0
- package/dist/notifications/MarkAllRead.vue.d.ts +7 -0
- package/dist/notifications/NotificationBell.vue.d.ts +2 -0
- package/dist/notifications/SettingsLink.vue.d.ts +6 -0
- package/dist/notifications/context.d.ts +20 -0
- package/dist/notifications/deadletters/DeadLetters.vue.d.ts +2 -0
- package/dist/notifications/deadletters/access.d.ts +3 -0
- package/dist/notifications/deadletters/list.d.ts +3 -0
- package/dist/notifications/deadletters/routes.d.ts +13 -0
- package/dist/notifications/feature.d.ts +31 -0
- package/dist/notifications/inbox.d.ts +62 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.js +8 -0
- package/dist/notifications/settings/EmailPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/QuietHoursPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/SettingsMenuItem.vue.d.ts +2 -0
- package/dist/notifications/settings/SettingsPage.vue.d.ts +2 -0
- package/dist/notifications/settings/categoryText.d.ts +9 -0
- package/dist/notifications/settings/routes.d.ts +13 -0
- package/dist/notifications/settings/settings.d.ts +18 -0
- package/dist/notifications/settings/state.d.ts +16 -0
- package/dist/notifications/state.d.ts +27 -0
- package/dist/notifications/stream.d.ts +21 -0
- package/dist/options-Ba_0uLWN.js +18 -0
- package/dist/overlay/AlertDialog.vue.d.ts +3 -3
- package/dist/overlay/Popover.vue.d.ts +1 -1
- package/dist/overlay/closeOverlays.d.ts +7 -0
- package/dist/overlay/index.js +21 -20
- 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 +68 -67
- package/dist/platform/index.d.ts +2 -2
- package/dist/platform/index.js +73 -90
- package/dist/platform/platform.d.ts +2 -2
- package/dist/platform/session.d.ts +22 -1
- package/dist/platform-q3cjODLx.js +255 -0
- package/dist/resource/index.js +8 -248
- package/dist/route-goWMxDUN.js +13 -0
- 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-BqTEhEuy.js +603 -0
- package/dist/sectionIndex-BS0ic5W7.js +86 -0
- package/dist/{sections-LtxV5Mtk.js → sections-CntvUTxn.js} +1 -1
- package/dist/shell/AccountMenuItem.vue.d.ts +1 -1
- package/dist/shell/BackofficeShell.vue.d.ts +2 -2
- package/dist/shell/NavigationList.vue.d.ts +1 -1
- 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 +491 -595
- package/dist/state/ProgressTrack.vue.d.ts +1 -1
- package/dist/state/index.js +59 -92
- package/dist/status-BuP3ULjH.js +33 -0
- package/dist/styles.css +1 -1
- package/dist/suggestions-BxMm6MQA.js +138 -0
- package/dist/testing/index.js +1 -1
- package/dist/toast-D9Z5To38.js +13 -0
- package/dist/transport-BnP7WC0Y.js +4 -0
- package/dist/useCommand-BkONMn3X.js +135 -0
- package/dist/useLoad-CYRVx6HW.js +39 -0
- package/dist/useResourceForm-D1hIpwW5.js +52 -0
- package/dist/useSaveChrome-chi6D3HY.js +25 -0
- package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
- package/dist/useTypedEntry-aTfPBAhw.js +857 -0
- package/package.json +26 -5
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
- package/dist/SectionList.vue_vue_type_script_setup_true_lang-L9ita_Kx.js +0 -230
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-DZTrU8NJ.js +0 -661
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-CtkJ-4e3.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/environment-D3nozt9a.js +0 -75
- package/dist/feature-DyDtyMLU.js +0 -47
- package/dist/options-DAkBtYkI.js +0 -330
- package/dist/platform-jqlKVJ2e.js +0 -244
- package/dist/toast-DvrHQ6Ag.js +0 -131
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
import { r as q } from "./route-goWMxDUN.js";
|
|
2
|
+
import { d as Le, p as Ce } from "./feature-DdUAfyi4.js";
|
|
3
|
+
import { d as Re } from "./context-Ch1r4fdN.js";
|
|
4
|
+
import { d as Ee } from "./defineRoutes-BGAdiIrt.js";
|
|
5
|
+
import { useI18n as Q } from "vue-i18n";
|
|
6
|
+
import { a as Ne } from "./error-CD7x0Jrz.js";
|
|
7
|
+
import { u as ve } from "./describeError-Ctga6GcS.js";
|
|
8
|
+
import { defineComponent as Y, ref as D, computed as j, watch as le, openBlock as f, createBlock as S, unref as t, withCtx as h, createElementVNode as N, createElementBlock as g, toDisplayString as k, createCommentVNode as O, createVNode as $, Fragment as K, renderList as P, createSlots as be, renderSlot as Se, createTextVNode as M, useTemplateRef as ne } from "vue";
|
|
9
|
+
import { _ as I } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
10
|
+
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js";
|
|
11
|
+
import { e as U } from "./control-7EP4tjYy.js";
|
|
12
|
+
import { _ as Te } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
13
|
+
import { t as ee } from "./toast-D9Z5To38.js";
|
|
14
|
+
import { _ as ce } from "./AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js";
|
|
15
|
+
import { _ as Oe } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
|
|
16
|
+
import { u as Ae } from "./useLoad-CYRVx6HW.js";
|
|
17
|
+
import { _ as De, a as Ke } from "./SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js";
|
|
18
|
+
import { _ as Be } from "./SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js";
|
|
19
|
+
import { u as Pe, _ as Ue } from "./useCommand-BkONMn3X.js";
|
|
20
|
+
import { u as Fe } from "./platform-q3cjODLx.js";
|
|
21
|
+
import { _ as Ge } from "./IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js";
|
|
22
|
+
import { u as Me } from "./mediaQuery-CygcXmFW.js";
|
|
23
|
+
import { _ as Ve } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
24
|
+
const C = {
|
|
25
|
+
rolesList: q("GET", "/v1/iam/roles", { permission: "iam.role:view" }),
|
|
26
|
+
rolesShow: q("GET", "/v1/iam/roles/:ref", { permission: "iam.role:view" }),
|
|
27
|
+
rolesHolders: q("GET", "/v1/iam/roles/:ref/holders", { permission: "iam.role:view" }),
|
|
28
|
+
rolesCompare: q("GET", "/v1/iam/roles/:ref/compare", { permission: "iam.role:view" }),
|
|
29
|
+
rolesCreate: q("POST", "/v1/iam/roles", { permission: "iam.role:manage" }),
|
|
30
|
+
rolesUpdate: q("PUT", "/v1/iam/roles/:ref", { permission: "iam.role:manage" }),
|
|
31
|
+
rolesDelete: q("DELETE", "/v1/iam/roles/:ref", { permission: "iam.role:delete" }),
|
|
32
|
+
rolesReplace: q("POST", "/v1/iam/roles/:ref/replace", { permission: "iam.role:manage" }),
|
|
33
|
+
bindable: q("GET", "/v1/iam/bindable-roles"),
|
|
34
|
+
subjectsAccess: q("GET", "/v1/iam/users/:id/access", { permission: "iam.user:view" }),
|
|
35
|
+
subjectsScopes: q("GET", "/v1/iam/users/:id/scopes", { permission: "iam.user:manage" }),
|
|
36
|
+
subjectsBind: q("POST", "/v1/iam/users/:id/bindings", { permission: "iam.user:manage" }),
|
|
37
|
+
subjectsUnbind: q("DELETE", "/v1/iam/users/:id/bindings/:binding_id", { permission: "iam.user:manage" }),
|
|
38
|
+
me: q.raw("GET", "/v1/me/access")
|
|
39
|
+
}, [ze, ae] = Re("vue-core.access"), F = {
|
|
40
|
+
viewRoles: "iam.role:view",
|
|
41
|
+
manageRoles: "iam.role:manage",
|
|
42
|
+
deleteRoles: "iam.role:delete",
|
|
43
|
+
viewAccess: "iam.user:view",
|
|
44
|
+
manageBindings: "iam.user:manage"
|
|
45
|
+
}, re = Ee({
|
|
46
|
+
roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-DzGGCMnm.js"), meta: { access: F.viewRoles, titleKey: "core.access.title" } },
|
|
47
|
+
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-DTOWIxxC.js"), meta: { access: F.manageRoles, titleKey: "core.access.new_title" } },
|
|
48
|
+
role: {
|
|
49
|
+
name: "access.role",
|
|
50
|
+
path: "/iam/roles/:ref",
|
|
51
|
+
component: () => import("./RolePage-DZk7BZOc.js"),
|
|
52
|
+
// A role's ref (its key, or the id of a custom one) swaps in place when a link leads to another role.
|
|
53
|
+
meta: { access: F.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
|
|
54
|
+
}
|
|
55
|
+
}), Xs = {
|
|
56
|
+
access: F.viewAccess,
|
|
57
|
+
section: { labelKey: "core.access.person_roles", icon: "shieldStarFill" }
|
|
58
|
+
};
|
|
59
|
+
function Zs(a) {
|
|
60
|
+
return Le({
|
|
61
|
+
id: "access",
|
|
62
|
+
routes: re.records,
|
|
63
|
+
context: Ce(ze, {
|
|
64
|
+
catalogue: a.catalogue,
|
|
65
|
+
subjectRoute: a.subjectRoute ?? (() => null),
|
|
66
|
+
scopes: a.scopes ?? null
|
|
67
|
+
}),
|
|
68
|
+
navigation: a.destination ? [{ destination: a.destination, to: re.roles, within: ["access.role", "access.roles.new"] }] : []
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const G = "system", ie = ["view", "create", "update", "manage", "delete"], ue = (a) => {
|
|
72
|
+
const s = ie.indexOf(a);
|
|
73
|
+
return s === -1 ? ie.length : s;
|
|
74
|
+
}, se = (a) => a.system ? G : a.module, _e = (a) => a.resource === "" ? a.module : `${a.module}_${a.resource.replace(/\./g, "_")}`;
|
|
75
|
+
function ea(a) {
|
|
76
|
+
const s = /* @__PURE__ */ new Map();
|
|
77
|
+
for (const [n, l] of Object.entries(a)) {
|
|
78
|
+
const e = s.get(se(l)) ?? /* @__PURE__ */ new Map(), c = _e(l);
|
|
79
|
+
e.set(c, [...e.get(c) ?? [], { ...l, id: n }]), s.set(se(l), e);
|
|
80
|
+
}
|
|
81
|
+
return [...s.keys()].sort((n, l) => +(n === G) - +(l === G) || n.localeCompare(l)).map((n) => ({
|
|
82
|
+
key: n,
|
|
83
|
+
screens: [...s.get(n) ?? []].map(([l, e]) => ({ key: l, permissions: e.sort((c, m) => ue(c.verb) - ue(m.verb) || c.verb.localeCompare(m.verb)) })).sort((l, e) => l.key.localeCompare(e.key))
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
function He(a, s) {
|
|
87
|
+
const o = /* @__PURE__ */ new Set(), n = (l) => {
|
|
88
|
+
for (const e of a[l]?.requires ?? [])
|
|
89
|
+
o.has(e) || (o.add(e), n(e));
|
|
90
|
+
};
|
|
91
|
+
return n(s), [...o];
|
|
92
|
+
}
|
|
93
|
+
function We(a, s) {
|
|
94
|
+
const o = /* @__PURE__ */ new Set(), n = (l) => {
|
|
95
|
+
for (const [e, c] of Object.entries(a))
|
|
96
|
+
o.has(e) || !c.requires.includes(l) || (o.add(e), n(e));
|
|
97
|
+
};
|
|
98
|
+
return n(s), [...o];
|
|
99
|
+
}
|
|
100
|
+
function Ie(a, s, o) {
|
|
101
|
+
const n = Object.entries(a).filter(([e, c]) => c.ownable === o && e in s), l = n.find(([, e]) => e.verb === "view") ?? n[0];
|
|
102
|
+
return l ? s[l[0]] ?? null : null;
|
|
103
|
+
}
|
|
104
|
+
function Qe(a, s, o) {
|
|
105
|
+
for (const n of [o, ...He(a, o)]) {
|
|
106
|
+
if (n in s || !(n in a)) continue;
|
|
107
|
+
const l = a[n]?.ownable;
|
|
108
|
+
s[n] = l ? Ie(a, s, l) ?? "own" : "all";
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function sa(a, s, o) {
|
|
112
|
+
for (const n of [o, ...We(a, o)]) delete s[n];
|
|
113
|
+
}
|
|
114
|
+
function aa(a, s, o, n) {
|
|
115
|
+
for (const [l, e] of Object.entries(a)) e.ownable === o && l in s && (s[l] = n);
|
|
116
|
+
}
|
|
117
|
+
function oa(a, s) {
|
|
118
|
+
const o = new Set(Object.keys(s));
|
|
119
|
+
for (const n of o) Qe(a, s, n);
|
|
120
|
+
return Object.keys(s).filter((n) => !o.has(n));
|
|
121
|
+
}
|
|
122
|
+
function J() {
|
|
123
|
+
const { t: a, te: s } = Q(), { catalogue: o } = ae(), n = (e, c) => {
|
|
124
|
+
const m = e.find((L) => s(L));
|
|
125
|
+
return m ? a(m) : c;
|
|
126
|
+
}, l = (e) => n([`access.levels.${e}`, `core.access.levels.${e}`], e);
|
|
127
|
+
return {
|
|
128
|
+
roleName: (e) => e.key ? n([`access.roles.${e.key}`], e.name) : e.name,
|
|
129
|
+
permissionLabel: (e) => n(o[e]?.labelKey ? [o[e].labelKey] : [], e),
|
|
130
|
+
permissionDescription: (e) => n(o[e]?.descriptionKey ? [o[e].descriptionKey] : [], ""),
|
|
131
|
+
groupLabel: (e) => n([`access.modules.${e}`, ...e === G ? ["core.access.system_group"] : []], e),
|
|
132
|
+
screenLabel: (e) => n([`access.resources.${e}`], e),
|
|
133
|
+
ownableLabel: (e) => n([`access.ownable.${e.replace(/\./g, "_")}`], e),
|
|
134
|
+
qualifierLabel: (e) => a(`core.access.qualifier.${e}`),
|
|
135
|
+
qualifierHint: (e) => a(`core.access.qualifier_hint.${e}`),
|
|
136
|
+
qualifierNoun: (e) => a(`core.access.qualifier_noun.${e}`),
|
|
137
|
+
levelLabel: l,
|
|
138
|
+
/** A place: the level and its name (`Dealer · Auto Zagreb`); the root, which has no name, by its level. */
|
|
139
|
+
scopeLabel: (e) => e.name ? `${l(e.level)} · ${e.name}` : l(e.level),
|
|
140
|
+
roleKind: (e) => a(`core.access.role_kind.${e.computed ? "computed" : e.predefined ? "predefined" : "custom"}`)
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function Ye() {
|
|
144
|
+
const a = ve();
|
|
145
|
+
return (s, o) => Ne(o) && o.code?.startsWith("authz.") ? a(o) : void 0;
|
|
146
|
+
}
|
|
147
|
+
function Je(a) {
|
|
148
|
+
return {
|
|
149
|
+
roles: async (s) => (await a.request(C.rolesList, void 0, s)).data.roles,
|
|
150
|
+
role: async (s, o) => (await a.request(C.rolesShow, { ref: s }, o)).data,
|
|
151
|
+
holders: async (s, o) => (await a.request(C.rolesHolders, { ref: s }, o)).data.holders,
|
|
152
|
+
compare: async (s, o, n) => (await a.request(C.rolesCompare, { ref: s, with: o }, n)).data,
|
|
153
|
+
create: async (s) => (await a.request(C.rolesCreate, s)).data,
|
|
154
|
+
update: async (s) => (await a.request(C.rolesUpdate, s)).data,
|
|
155
|
+
remove: async (s) => void await a.request(C.rolesDelete, { ref: s }),
|
|
156
|
+
replace: async (s, o) => (await a.request(C.rolesReplace, { ref: s, with: o })).data.rebound,
|
|
157
|
+
access: async (s, o) => (await a.request(C.subjectsAccess, { id: s.id }, o)).data,
|
|
158
|
+
scopes: async (s, o) => (await a.request(C.subjectsScopes, { id: s.id }, o)).data,
|
|
159
|
+
bindable: async (s, o, n) => (await a.request(C.bindable, { level: s, scope_id: o ?? 0 }, n)).data.roles,
|
|
160
|
+
bind: async (s, o) => (await a.request(C.subjectsBind, { id: s.id, ...o })).data,
|
|
161
|
+
unbind: async (s, o) => void await a.request(C.subjectsUnbind, { id: s.id, binding_id: o })
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const ge = () => Je(Fe().http);
|
|
165
|
+
function Xe(a) {
|
|
166
|
+
const s = /* @__PURE__ */ new Map();
|
|
167
|
+
for (const l of a.places) s.set(l.level, l.parent_level);
|
|
168
|
+
const o = (l) => {
|
|
169
|
+
const e = [l], c = new Set(e);
|
|
170
|
+
for (let m = s.get(l); m !== void 0 && m !== a.root_level && s.has(m) && !c.has(m); m = s.get(m))
|
|
171
|
+
e.unshift(m), c.add(m);
|
|
172
|
+
return e;
|
|
173
|
+
}, n = [...s.keys()].map((l) => ({ level: l, chain: o(l) })).sort((l, e) => e.chain.length - l.chain.length || l.level.localeCompare(e.level));
|
|
174
|
+
return a.root ? [...n, { level: a.root_level, chain: [] }] : n;
|
|
175
|
+
}
|
|
176
|
+
const Ze = (a) => a.filter((s) => s.chain.length > 0).sort((s, o) => s.chain.length - o.chain.length)[0] ?? a[0] ?? null;
|
|
177
|
+
function de(a, s, o, n) {
|
|
178
|
+
const l = s.chain[o], e = s.chain[o + 1];
|
|
179
|
+
return a.places.filter(
|
|
180
|
+
(c) => c.level === l && (o === 0 || c.parent_level === s.chain[o - 1] && c.parent_id === n[o - 1]) && (e === void 0 || a.places.some((m) => m.level === e && m.parent_id === c.id))
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
const es = {
|
|
184
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
185
|
+
"data-test": "add-role-sheet"
|
|
186
|
+
}, ss = {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: "px-row-inset text-body text-content-destructive",
|
|
189
|
+
role: "alert",
|
|
190
|
+
"data-test": "scopes-failed"
|
|
191
|
+
}, as = {
|
|
192
|
+
key: 1,
|
|
193
|
+
class: "px-row-inset text-body text-content-muted",
|
|
194
|
+
"data-test": "no-places"
|
|
195
|
+
}, os = {
|
|
196
|
+
key: 0,
|
|
197
|
+
class: "px-row-inset text-body text-content-muted",
|
|
198
|
+
"data-test": "roles-loading"
|
|
199
|
+
}, ts = {
|
|
200
|
+
key: 1,
|
|
201
|
+
class: "px-row-inset text-body text-content-destructive",
|
|
202
|
+
role: "alert",
|
|
203
|
+
"data-test": "roles-failed"
|
|
204
|
+
}, ls = {
|
|
205
|
+
key: 2,
|
|
206
|
+
class: "px-row-inset text-body text-content-muted",
|
|
207
|
+
"data-test": "roles-none"
|
|
208
|
+
}, ns = {
|
|
209
|
+
key: 3,
|
|
210
|
+
"data-test": "bindable-roles"
|
|
211
|
+
}, cs = { class: "px-row-inset pb-1.5 text-footnote uppercase tracking-wide text-content-muted" }, rs = {
|
|
212
|
+
key: 4,
|
|
213
|
+
"data-test": "chosen-role"
|
|
214
|
+
}, is = /* @__PURE__ */ Y({
|
|
215
|
+
__name: "AddRoleDialog",
|
|
216
|
+
props: {
|
|
217
|
+
subject: {},
|
|
218
|
+
subjectLabel: {}
|
|
219
|
+
},
|
|
220
|
+
emits: ["added"],
|
|
221
|
+
setup(a, { expose: s, emit: o }) {
|
|
222
|
+
const n = a, l = o, { t: e } = Q(), c = J(), m = ge(), { catalogue: L, scopes: x } = ae(), R = Pe({
|
|
223
|
+
defaults: () => ({ level: null, place: null, role: null }),
|
|
224
|
+
validator: {
|
|
225
|
+
safeParse(i) {
|
|
226
|
+
const d = i, u = [
|
|
227
|
+
...d.level === null || d.level !== p.value?.root_level && d.place === null ? [{ path: ["level"], message: e("core.access.add.choose_place") }] : [],
|
|
228
|
+
...d.role === null ? [{ path: ["role"], message: e("core.access.add.choose_role") }] : []
|
|
229
|
+
];
|
|
230
|
+
return u.length === 0 ? { success: !0, data: { level: d.level, place: d.place, role: d.role } } : { success: !1, error: { issues: u } };
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
failureMessage: Ye(),
|
|
234
|
+
run: (i) => m.bind(n.subject, { role_ref: i.role, level: i.level, scope_id: i.place }),
|
|
235
|
+
done: (i) => {
|
|
236
|
+
ee.success(e("core.access.added")), l("added", i);
|
|
237
|
+
}
|
|
238
|
+
}), r = R.form.values, p = D(null), _ = D(!1), b = D([]), v = D([]), y = D(!1), w = D(!1), E = j(() => p.value ? Xe(p.value) : []), A = j(() => E.value.find((i) => i.level === r.level) ?? null), he = j(() => E.value.length > 1), ye = j(() => {
|
|
239
|
+
const i = p.value, d = A.value;
|
|
240
|
+
return i && d ? d.chain.map((u, B) => ({ name: u, places: de(i, d, B, b.value) })) : [];
|
|
241
|
+
}), we = j(() => {
|
|
242
|
+
const i = A.value?.chain.length ?? 0, d = i ? b.value[i - 1] : null;
|
|
243
|
+
return p.value?.places.find((u) => u.level === A.value?.level && u.id === d)?.name ?? null;
|
|
244
|
+
}), X = j(() => A.value !== null && A.value.chain.every((i, d) => b.value[d] != null));
|
|
245
|
+
function oe(i) {
|
|
246
|
+
r.level = i, b.value = [], r.place = null;
|
|
247
|
+
}
|
|
248
|
+
function te(i, d) {
|
|
249
|
+
const u = b.value.slice(0, i);
|
|
250
|
+
u[i] = d, b.value = u;
|
|
251
|
+
}
|
|
252
|
+
le([() => r.level, b, p], () => {
|
|
253
|
+
const i = p.value, d = A.value;
|
|
254
|
+
if (!(!i || !d)) {
|
|
255
|
+
for (let u = 0; u < d.chain.length; u++) {
|
|
256
|
+
if (b.value[u] != null) continue;
|
|
257
|
+
const B = de(i, d, u, b.value);
|
|
258
|
+
B.length === 1 && B[0] && te(u, B[0].id);
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
r.place = d.chain.length === 0 ? null : b.value[d.chain.length - 1] ?? null;
|
|
262
|
+
}
|
|
263
|
+
}, { deep: !0 });
|
|
264
|
+
async function ke() {
|
|
265
|
+
if (r.role = null, v.value = [], w.value = !1, !A.value || !X.value) return;
|
|
266
|
+
y.value = !0;
|
|
267
|
+
const i = `${r.level}:${r.place}`;
|
|
268
|
+
try {
|
|
269
|
+
const d = await m.bindable(A.value.level, r.place);
|
|
270
|
+
i === `${r.level}:${r.place}` && (v.value = d);
|
|
271
|
+
} catch {
|
|
272
|
+
i === `${r.level}:${r.place}` && (w.value = !0);
|
|
273
|
+
} finally {
|
|
274
|
+
y.value = !1;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
le([() => r.level, () => r.place, X], () => void ke());
|
|
278
|
+
const $e = j(() => v.value.map((i) => ({ value: i.ref, label: c.roleName(i), description: c.roleKind(i) }))), z = j(() => v.value.find((i) => i.ref === r.role) ?? null), xe = j(() => {
|
|
279
|
+
const i = /* @__PURE__ */ new Map();
|
|
280
|
+
for (const d of z.value?.grants ?? []) {
|
|
281
|
+
const u = L[d.permission]?.ownable;
|
|
282
|
+
u && (!i.has(u) || d.permission.endsWith(":view")) && i.set(u, d.qualifier);
|
|
283
|
+
}
|
|
284
|
+
return [...i].map(([d, u]) => ({ ownable: d, qualifier: u }));
|
|
285
|
+
}), qe = j(() => c.scopeLabel({ level: r.level ?? p.value?.root_level ?? "", name: we.value }));
|
|
286
|
+
async function je() {
|
|
287
|
+
p.value = null, _.value = !1, b.value = [], v.value = [], R.present();
|
|
288
|
+
try {
|
|
289
|
+
p.value = x ? await x(n.subject, new AbortController().signal) : await m.scopes(n.subject);
|
|
290
|
+
} catch {
|
|
291
|
+
_.value = !0;
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const i = Ze(E.value);
|
|
295
|
+
i && oe(i.level);
|
|
296
|
+
}
|
|
297
|
+
return s({ present: je }), (i, d) => (f(), S(t(Ue), {
|
|
298
|
+
command: t(R),
|
|
299
|
+
title: t(e)("core.access.add_role"),
|
|
300
|
+
subtitle: n.subjectLabel,
|
|
301
|
+
size: "lg",
|
|
302
|
+
"confirm-label": t(e)("core.access.add.confirm")
|
|
303
|
+
}, {
|
|
304
|
+
default: h(() => [
|
|
305
|
+
N("div", es, [
|
|
306
|
+
_.value ? (f(), g("p", ss, k(t(e)("core.access.add.scopes_failed")), 1)) : p.value && E.value.length === 0 ? (f(), g("p", as, k(t(e)("core.access.add.no_places")), 1)) : O("", !0),
|
|
307
|
+
he.value ? (f(), S(t(V), {
|
|
308
|
+
key: 2,
|
|
309
|
+
header: t(e)("core.access.add.scope_header")
|
|
310
|
+
}, {
|
|
311
|
+
default: h(() => [
|
|
312
|
+
$(t(Be), {
|
|
313
|
+
"model-value": t(r).level,
|
|
314
|
+
label: t(e)("core.access.add.scope_level"),
|
|
315
|
+
options: E.value.map((u) => ({ value: u.level, label: t(c).levelLabel(u.level) })),
|
|
316
|
+
"onUpdate:modelValue": d[0] || (d[0] = (u) => oe(u))
|
|
317
|
+
}, null, 8, ["model-value", "label", "options"]),
|
|
318
|
+
(f(!0), g(K, null, P(ye.value, (u, B) => (f(), S(t(De), {
|
|
319
|
+
key: u.name,
|
|
320
|
+
"model-value": b.value[B] ?? null,
|
|
321
|
+
label: t(c).levelLabel(u.name),
|
|
322
|
+
options: u.places.map((H) => ({ value: H.id, label: H.name })),
|
|
323
|
+
"onUpdate:modelValue": (H) => te(B, H)
|
|
324
|
+
}, null, 8, ["model-value", "label", "options", "onUpdate:modelValue"]))), 128))
|
|
325
|
+
]),
|
|
326
|
+
_: 1
|
|
327
|
+
}, 8, ["header"])) : O("", !0),
|
|
328
|
+
X.value ? (f(), g(K, { key: 3 }, [
|
|
329
|
+
y.value ? (f(), g("p", os, k(t(e)("core.access.add.roles_loading")), 1)) : w.value ? (f(), g("p", ts, k(t(e)("core.access.add.roles_failed")), 1)) : v.value.length === 0 ? (f(), g("p", ls, k(t(e)("core.access.add.no_roles")), 1)) : (f(), g("div", ns, [
|
|
330
|
+
N("p", cs, k(t(e)("core.access.add.role")), 1),
|
|
331
|
+
$(t(Ke), {
|
|
332
|
+
options: $e.value,
|
|
333
|
+
"model-value": t(r).role,
|
|
334
|
+
onSelect: d[1] || (d[1] = (u) => t(r).role = u)
|
|
335
|
+
}, null, 8, ["options", "model-value"])
|
|
336
|
+
]))
|
|
337
|
+
], 64)) : O("", !0),
|
|
338
|
+
z.value ? (f(), g("div", rs, [
|
|
339
|
+
$(t(V), {
|
|
340
|
+
header: t(e)("core.access.add.role_gives"),
|
|
341
|
+
footer: t(e)("core.access.add.role_gives_footer")
|
|
342
|
+
}, {
|
|
343
|
+
default: h(() => [
|
|
344
|
+
$(t(U), {
|
|
345
|
+
layout: "setting",
|
|
346
|
+
label: t(c).roleName(z.value),
|
|
347
|
+
sub: z.value.description
|
|
348
|
+
}, null, 8, ["label", "sub"]),
|
|
349
|
+
(f(!0), g(K, null, P(xe.value, (u) => (f(), S(t(U), {
|
|
350
|
+
key: u.ownable,
|
|
351
|
+
layout: "setting",
|
|
352
|
+
label: t(c).ownableLabel(u.ownable),
|
|
353
|
+
value: `${t(c).qualifierNoun(u.qualifier)} · ${qe.value}`
|
|
354
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
355
|
+
]),
|
|
356
|
+
_: 1
|
|
357
|
+
}, 8, ["header", "footer"])
|
|
358
|
+
])) : O("", !0)
|
|
359
|
+
])
|
|
360
|
+
]),
|
|
361
|
+
_: 1
|
|
362
|
+
}, 8, ["command", "title", "subtitle", "confirm-label"]));
|
|
363
|
+
}
|
|
364
|
+
}), us = {
|
|
365
|
+
class: "text-right text-footnote text-content-muted",
|
|
366
|
+
"data-test": "binding-scope"
|
|
367
|
+
}, ds = /* @__PURE__ */ Y({
|
|
368
|
+
__name: "BindingRow",
|
|
369
|
+
props: {
|
|
370
|
+
binding: {}
|
|
371
|
+
},
|
|
372
|
+
setup(a) {
|
|
373
|
+
const s = a, o = J(), n = j(() => [o.roleKind(s.binding.role), ...s.binding.role.attrs.map((l) => `${l.attribute}: ${l.values.join(", ")}`)].join(" · "));
|
|
374
|
+
return (l, e) => (f(), S(t(U), {
|
|
375
|
+
layout: "setting",
|
|
376
|
+
label: t(o).roleName(s.binding.role),
|
|
377
|
+
sub: n.value
|
|
378
|
+
}, be({
|
|
379
|
+
leading: h(() => [
|
|
380
|
+
$(t(Ge), {
|
|
381
|
+
tone: s.binding.role.predefined ? "anchor" : "brand",
|
|
382
|
+
icon: "shieldStarFill"
|
|
383
|
+
}, null, 8, ["tone"])
|
|
384
|
+
]),
|
|
385
|
+
default: h(() => [
|
|
386
|
+
N("span", us, k(t(o).scopeLabel(s.binding.scope)), 1)
|
|
387
|
+
]),
|
|
388
|
+
_: 2
|
|
389
|
+
}, [
|
|
390
|
+
l.$slots.trailing ? {
|
|
391
|
+
name: "trailing",
|
|
392
|
+
fn: h(() => [
|
|
393
|
+
Se(l.$slots, "trailing")
|
|
394
|
+
]),
|
|
395
|
+
key: "0"
|
|
396
|
+
} : void 0
|
|
397
|
+
]), 1032, ["label", "sub"]));
|
|
398
|
+
}
|
|
399
|
+
}), me = { own: 0, own_location: 1, all: 2 }, fe = (a, s) => me[s] > me[a] ? s : a, W = (a) => `${a.level}:${a.id ?? ""}`, Z = ["view", "create", "update", "manage", "delete"], pe = (a) => Z.includes(a) ? Z.indexOf(a) : Z.length;
|
|
400
|
+
function ms(a, s) {
|
|
401
|
+
const o = /* @__PURE__ */ new Map();
|
|
402
|
+
for (const l of s) {
|
|
403
|
+
if (l.grants.length === 0) continue;
|
|
404
|
+
const e = a[l.permission], [c = l.permission, m = ""] = l.permission.split(":"), L = e ? se(e) : c.split(".")[0] ?? c, x = e ? _e(e) : c.replace(/\./g, "_"), T = e?.ownable != null, R = o.get(L) ?? /* @__PURE__ */ new Map(), r = R.get(x) ?? { key: x, actions: [], sources: [], qualifier: null, scopes: [], ownable: !1, allUnavailable: !0 };
|
|
405
|
+
r.actions.push({ permission: l.permission, verb: e?.verb ?? m, unavailable: l.unavailable, grants: l.grants }), r.ownable || (r.ownable = T), r.allUnavailable && (r.allUnavailable = l.unavailable);
|
|
406
|
+
for (const p of l.grants) {
|
|
407
|
+
const _ = T ? p.qualifier : "all";
|
|
408
|
+
r.scopes.some((v) => W(v) === W(p.scope)) || r.scopes.push(p.scope), T && (r.qualifier = r.qualifier ? fe(r.qualifier, _) : _);
|
|
409
|
+
const b = r.sources.find((v) => v.roleName === p.role_name && W(v.scope) === W(p.scope));
|
|
410
|
+
b ? T && (r.sources[r.sources.indexOf(b)] = { ...b, qualifier: fe(b.qualifier, _) }) : r.sources.push({ roleKey: p.role_key, roleName: p.role_name, qualifier: _, scope: p.scope });
|
|
411
|
+
}
|
|
412
|
+
R.set(x, r), o.set(L, R);
|
|
413
|
+
}
|
|
414
|
+
return [...o.keys()].sort((l, e) => +(l === G) - +(e === G) || l.localeCompare(e)).map((l) => ({
|
|
415
|
+
key: l,
|
|
416
|
+
screens: [...o.get(l)?.values() ?? []].map((e) => ({
|
|
417
|
+
...e,
|
|
418
|
+
actions: [...e.actions].sort((c, m) => pe(c.verb) - pe(m.verb) || c.verb.localeCompare(m.verb)),
|
|
419
|
+
// the root (the place without an id) first: what applies everywhere is what a reader looks for
|
|
420
|
+
scopes: [...e.scopes].sort((c, m) => +(m.id === null) - +(c.id === null))
|
|
421
|
+
})).sort((e, c) => e.key.localeCompare(c.key))
|
|
422
|
+
}));
|
|
423
|
+
}
|
|
424
|
+
const fs = {
|
|
425
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
426
|
+
"data-test": "effective-access"
|
|
427
|
+
}, ps = { class: "px-row-inset text-title3 font-semibold text-content-strong" }, vs = {
|
|
428
|
+
class: "block",
|
|
429
|
+
"data-test": "effective-actions"
|
|
430
|
+
}, bs = {
|
|
431
|
+
class: "block",
|
|
432
|
+
"data-test": "effective-sources"
|
|
433
|
+
}, _s = {
|
|
434
|
+
key: 0,
|
|
435
|
+
class: "mt-2 flex flex-col gap-1.5 border-l border-border-separator pl-3",
|
|
436
|
+
"data-test": "effective-why"
|
|
437
|
+
}, gs = ["data-permission"], hs = { class: "text-content" }, ys = {
|
|
438
|
+
key: 0,
|
|
439
|
+
class: "ml-2 text-content-muted"
|
|
440
|
+
}, ws = {
|
|
441
|
+
key: 0,
|
|
442
|
+
class: "contents",
|
|
443
|
+
"data-test": "effective-unavailable"
|
|
444
|
+
}, ks = {
|
|
445
|
+
class: "text-right text-footnote text-content-muted",
|
|
446
|
+
"data-test": "effective-reach"
|
|
447
|
+
}, $s = ["data-test"], xs = {
|
|
448
|
+
key: 0,
|
|
449
|
+
class: "contents",
|
|
450
|
+
"data-test": "effective-show-all"
|
|
451
|
+
}, qs = /* @__PURE__ */ Y({
|
|
452
|
+
__name: "EffectiveAccess",
|
|
453
|
+
props: {
|
|
454
|
+
effective: {},
|
|
455
|
+
name: {}
|
|
456
|
+
},
|
|
457
|
+
setup(a) {
|
|
458
|
+
const s = a, { t: o } = Q(), { catalogue: n } = ae(), l = J(), e = Me(), c = j(() => ms(n, s.effective)), m = D(!1), L = j(() => e.value && !m.value ? c.value.slice(0, 3) : c.value), x = D({}), T = (p) => p.actions.map((_) => l.permissionLabel(_.permission)).join(" · "), R = (p) => p.sources.map((_) => {
|
|
459
|
+
const b = l.roleName({ key: _.roleKey, name: _.roleName });
|
|
460
|
+
return p.ownable ? `${b} (${l.qualifierNoun(_.qualifier).toLowerCase()})` : b;
|
|
461
|
+
}).join(", "), r = (p) => [p.qualifier ? l.qualifierNoun(p.qualifier) : "", p.scopes.map((_) => l.scopeLabel(_)).join(", ")].filter(Boolean).join(" · ");
|
|
462
|
+
return (p, _) => (f(), g("section", fs, [
|
|
463
|
+
N("h2", ps, k(t(o)("core.access.effective.title", { name: s.name })), 1),
|
|
464
|
+
c.value.length === 0 ? (f(), S(t(V), {
|
|
465
|
+
key: 0,
|
|
466
|
+
footer: t(o)("core.access.effective.footer")
|
|
467
|
+
}, {
|
|
468
|
+
default: h(() => [
|
|
469
|
+
$(t(U), {
|
|
470
|
+
layout: "setting",
|
|
471
|
+
label: t(o)("core.access.effective.empty")
|
|
472
|
+
}, null, 8, ["label"])
|
|
473
|
+
]),
|
|
474
|
+
_: 1
|
|
475
|
+
}, 8, ["footer"])) : (f(), g(K, { key: 1 }, [
|
|
476
|
+
(f(!0), g(K, null, P(L.value, (b) => (f(), S(t(V), {
|
|
477
|
+
key: b.key,
|
|
478
|
+
header: t(l).groupLabel(b.key),
|
|
479
|
+
footer: b === L.value[L.value.length - 1] ? t(o)("core.access.effective.footer") : void 0
|
|
480
|
+
}, {
|
|
481
|
+
default: h(() => [
|
|
482
|
+
(f(!0), g(K, null, P(b.screens, (v) => (f(), S(t(U), {
|
|
483
|
+
key: v.key,
|
|
484
|
+
layout: "setting",
|
|
485
|
+
label: t(l).screenLabel(v.key)
|
|
486
|
+
}, {
|
|
487
|
+
sub: h(() => [
|
|
488
|
+
N("span", vs, k(T(v)), 1),
|
|
489
|
+
N("span", bs, k(t(o)("core.access.effective.from_roles", { roles: R(v) })), 1),
|
|
490
|
+
x.value[v.key] ? (f(), g("ul", _s, [
|
|
491
|
+
(f(!0), g(K, null, P(v.actions, (y) => (f(), g("li", {
|
|
492
|
+
key: y.permission,
|
|
493
|
+
"data-permission": y.permission
|
|
494
|
+
}, [
|
|
495
|
+
N("span", hs, k(t(l).permissionLabel(y.permission)), 1),
|
|
496
|
+
y.unavailable ? (f(), g("span", ys, k(t(o)("core.access.effective.unavailable")), 1)) : O("", !0),
|
|
497
|
+
(f(!0), g(K, null, P(y.grants, (w) => (f(), g("span", {
|
|
498
|
+
key: `${w.binding_id}-${w.scope.level}-${w.scope.id ?? 0}`,
|
|
499
|
+
class: "block text-content-muted"
|
|
500
|
+
}, k(t(o)("core.access.effective.why_row", {
|
|
501
|
+
role: t(l).roleName({ key: w.role_key, name: w.role_name }),
|
|
502
|
+
whose: t(l).qualifierNoun(v.ownable ? w.qualifier : "all"),
|
|
503
|
+
scope: t(l).scopeLabel(w.scope)
|
|
504
|
+
})), 1))), 128))
|
|
505
|
+
], 8, gs))), 128))
|
|
506
|
+
])) : O("", !0)
|
|
507
|
+
]),
|
|
508
|
+
default: h(() => [
|
|
509
|
+
v.allUnavailable ? (f(), g("span", ws, [
|
|
510
|
+
$(t(Ve), { tone: "warning" }, {
|
|
511
|
+
default: h(() => [
|
|
512
|
+
M(k(t(o)("core.access.effective.unavailable")), 1)
|
|
513
|
+
]),
|
|
514
|
+
_: 1
|
|
515
|
+
})
|
|
516
|
+
])) : O("", !0),
|
|
517
|
+
N("span", ks, k(r(v)), 1),
|
|
518
|
+
N("span", {
|
|
519
|
+
class: "contents",
|
|
520
|
+
"data-test": `why-${v.key}`
|
|
521
|
+
}, [
|
|
522
|
+
$(t(I), {
|
|
523
|
+
prominence: "secondary",
|
|
524
|
+
size: "sm",
|
|
525
|
+
onClick: (y) => x.value[v.key] = !x.value[v.key]
|
|
526
|
+
}, {
|
|
527
|
+
default: h(() => [
|
|
528
|
+
M(k(x.value[v.key] ? t(o)("core.access.effective.hide_why") : t(o)("core.access.effective.show_why")), 1)
|
|
529
|
+
]),
|
|
530
|
+
_: 2
|
|
531
|
+
}, 1032, ["onClick"])
|
|
532
|
+
], 8, $s)
|
|
533
|
+
]),
|
|
534
|
+
_: 2
|
|
535
|
+
}, 1032, ["label"]))), 128))
|
|
536
|
+
]),
|
|
537
|
+
_: 2
|
|
538
|
+
}, 1032, ["header", "footer"]))), 128)),
|
|
539
|
+
t(e) && c.value.length > 3 ? (f(), g("span", xs, [
|
|
540
|
+
$(t(I), {
|
|
541
|
+
prominence: "secondary",
|
|
542
|
+
class: "self-center",
|
|
543
|
+
onClick: _[0] || (_[0] = (b) => m.value = !m.value)
|
|
544
|
+
}, {
|
|
545
|
+
default: h(() => [
|
|
546
|
+
M(k(m.value ? t(o)("core.access.effective.fewer_modules") : t(o)("core.access.effective.all_modules", { count: c.value.length })), 1)
|
|
547
|
+
]),
|
|
548
|
+
_: 1
|
|
549
|
+
})
|
|
550
|
+
])) : O("", !0)
|
|
551
|
+
], 64))
|
|
552
|
+
]));
|
|
553
|
+
}
|
|
554
|
+
}), js = {
|
|
555
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
556
|
+
"data-test": "access-panel"
|
|
557
|
+
}, Ls = ["data-test"], Cs = {
|
|
558
|
+
class: "contents",
|
|
559
|
+
"data-test": "add-role"
|
|
560
|
+
}, ta = /* @__PURE__ */ Y({
|
|
561
|
+
__name: "PersonAccess",
|
|
562
|
+
props: {
|
|
563
|
+
subject: {},
|
|
564
|
+
name: {},
|
|
565
|
+
subjectLabel: {}
|
|
566
|
+
},
|
|
567
|
+
emits: ["loaded"],
|
|
568
|
+
setup(a, { expose: s, emit: o }) {
|
|
569
|
+
const n = a, l = o, { t: e } = Q(), c = J(), m = ve(), L = ge(), x = Ae(async ({ signal: v }) => {
|
|
570
|
+
const y = await L.access(n.subject, { signal: v });
|
|
571
|
+
return l("loaded", y.bindings.length), y;
|
|
572
|
+
}, { watch: () => n.subject.id }), T = ne("addDialog"), R = ne("removeDialog");
|
|
573
|
+
async function r(v) {
|
|
574
|
+
await L.unbind(n.subject, v.id), ee.success(e("core.access.removed")), await x.reload();
|
|
575
|
+
}
|
|
576
|
+
const p = (v) => ee.error(m(v, { fallback: e("core.access.remove_failed") })), _ = D(null), b = j(() => _.value ? e("core.access.remove_body", { name: n.name, role: c.roleName(_.value.role), scope: c.scopeLabel(_.value.scope) }) : "");
|
|
577
|
+
return s({ reload: x.reload }), (v, y) => (f(), g("div", js, [
|
|
578
|
+
$(t(Oe), {
|
|
579
|
+
state: t(x).state.value,
|
|
580
|
+
"skeleton-rows": 6,
|
|
581
|
+
"is-empty": () => !1,
|
|
582
|
+
onRetry: y[1] || (y[1] = (w) => t(x).reload())
|
|
583
|
+
}, {
|
|
584
|
+
default: h(({ value: w }) => [
|
|
585
|
+
$(t(V), {
|
|
586
|
+
header: t(e)("core.access.person_roles"),
|
|
587
|
+
footer: t(e)("core.access.roles_footer")
|
|
588
|
+
}, {
|
|
589
|
+
default: h(() => [
|
|
590
|
+
w.bindings.length === 0 ? (f(), S(t(U), {
|
|
591
|
+
key: 0,
|
|
592
|
+
layout: "setting",
|
|
593
|
+
label: t(e)("core.access.no_roles_title"),
|
|
594
|
+
sub: t(e)("core.access.no_roles_description")
|
|
595
|
+
}, null, 8, ["label", "sub"])) : O("", !0),
|
|
596
|
+
(f(!0), g(K, null, P(w.bindings, (E) => (f(), S(ds, {
|
|
597
|
+
key: E.id,
|
|
598
|
+
binding: E
|
|
599
|
+
}, be({ _: 2 }, [
|
|
600
|
+
w.can_manage ? {
|
|
601
|
+
name: "trailing",
|
|
602
|
+
fn: h(() => [
|
|
603
|
+
$(t(ce), {
|
|
604
|
+
permission: t(F).manageBindings
|
|
605
|
+
}, {
|
|
606
|
+
default: h(() => [
|
|
607
|
+
N("span", {
|
|
608
|
+
class: "contents",
|
|
609
|
+
"data-test": `remove-binding-${E.id}`
|
|
610
|
+
}, [
|
|
611
|
+
$(t(I), {
|
|
612
|
+
tone: "critical",
|
|
613
|
+
prominence: "secondary",
|
|
614
|
+
size: "sm",
|
|
615
|
+
onClick: (A) => (_.value = E, R.value?.present(E))
|
|
616
|
+
}, {
|
|
617
|
+
default: h(() => [
|
|
618
|
+
M(k(t(e)("core.access.remove")), 1)
|
|
619
|
+
]),
|
|
620
|
+
_: 1
|
|
621
|
+
}, 8, ["onClick"])
|
|
622
|
+
], 8, Ls)
|
|
623
|
+
]),
|
|
624
|
+
_: 2
|
|
625
|
+
}, 1032, ["permission"])
|
|
626
|
+
]),
|
|
627
|
+
key: "0"
|
|
628
|
+
} : void 0
|
|
629
|
+
]), 1032, ["binding"]))), 128)),
|
|
630
|
+
w.can_manage ? (f(), S(t(ce), {
|
|
631
|
+
key: 1,
|
|
632
|
+
permission: t(F).manageBindings
|
|
633
|
+
}, {
|
|
634
|
+
default: h(() => [
|
|
635
|
+
$(t(U), { layout: "stacked" }, {
|
|
636
|
+
default: h(() => [
|
|
637
|
+
N("span", Cs, [
|
|
638
|
+
$(t(I), {
|
|
639
|
+
prominence: "secondary",
|
|
640
|
+
icon: "addLine",
|
|
641
|
+
onClick: y[0] || (y[0] = (E) => T.value?.present())
|
|
642
|
+
}, {
|
|
643
|
+
default: h(() => [
|
|
644
|
+
M(k(t(e)("core.access.add_role")), 1)
|
|
645
|
+
]),
|
|
646
|
+
_: 1
|
|
647
|
+
})
|
|
648
|
+
])
|
|
649
|
+
]),
|
|
650
|
+
_: 1
|
|
651
|
+
})
|
|
652
|
+
]),
|
|
653
|
+
_: 1
|
|
654
|
+
}, 8, ["permission"])) : O("", !0)
|
|
655
|
+
]),
|
|
656
|
+
_: 2
|
|
657
|
+
}, 1032, ["header", "footer"]),
|
|
658
|
+
$(qs, {
|
|
659
|
+
effective: w.effective,
|
|
660
|
+
name: n.name
|
|
661
|
+
}, null, 8, ["effective", "name"])
|
|
662
|
+
]),
|
|
663
|
+
_: 1
|
|
664
|
+
}, 8, ["state"]),
|
|
665
|
+
$(is, {
|
|
666
|
+
ref_key: "addDialog",
|
|
667
|
+
ref: T,
|
|
668
|
+
subject: n.subject,
|
|
669
|
+
"subject-label": n.subjectLabel ?? n.name,
|
|
670
|
+
onAdded: y[2] || (y[2] = (w) => t(x).reload())
|
|
671
|
+
}, null, 8, ["subject", "subject-label"]),
|
|
672
|
+
$(t(Te), {
|
|
673
|
+
ref_key: "removeDialog",
|
|
674
|
+
ref: R,
|
|
675
|
+
tone: "critical",
|
|
676
|
+
title: t(e)("core.access.remove_title"),
|
|
677
|
+
message: b.value,
|
|
678
|
+
"confirm-label": t(e)("core.access.remove"),
|
|
679
|
+
action: r,
|
|
680
|
+
onFailed: p
|
|
681
|
+
}, null, 8, ["title", "message", "confirm-label"])
|
|
682
|
+
]));
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
export {
|
|
686
|
+
ds as _,
|
|
687
|
+
ge as a,
|
|
688
|
+
F as b,
|
|
689
|
+
re as c,
|
|
690
|
+
ae as d,
|
|
691
|
+
se as e,
|
|
692
|
+
Ye as f,
|
|
693
|
+
Qe as g,
|
|
694
|
+
oa as h,
|
|
695
|
+
ta as i,
|
|
696
|
+
Zs as j,
|
|
697
|
+
C as k,
|
|
698
|
+
We as l,
|
|
699
|
+
Xs as m,
|
|
700
|
+
He as n,
|
|
701
|
+
Ie as o,
|
|
702
|
+
ea as p,
|
|
703
|
+
sa as r,
|
|
704
|
+
aa as s,
|
|
705
|
+
J as u
|
|
706
|
+
};
|