@nuxt-atelier/admin 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/module.d.mts +52 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +188 -0
- package/dist/runtime/admin.css +1 -0
- package/dist/runtime/ai-off.d.ts +1 -0
- package/dist/runtime/ai-off.js +1 -0
- package/dist/runtime/appearance.d.ts +59 -0
- package/dist/runtime/appearance.js +111 -0
- package/dist/runtime/branding.d.ts +11 -0
- package/dist/runtime/branding.js +14 -0
- package/dist/runtime/components/App.d.vue.ts +6 -0
- package/dist/runtime/components/App.vue +170 -0
- package/dist/runtime/components/App.vue.d.ts +6 -0
- package/dist/runtime/components/AppearanceModal.d.vue.ts +3 -0
- package/dist/runtime/components/AppearanceModal.vue +267 -0
- package/dist/runtime/components/AppearanceModal.vue.d.ts +3 -0
- package/dist/runtime/components/AuthFrame.d.vue.ts +15 -0
- package/dist/runtime/components/AuthFrame.vue +56 -0
- package/dist/runtime/components/AuthFrame.vue.d.ts +15 -0
- package/dist/runtime/components/Brand.d.vue.ts +6 -0
- package/dist/runtime/components/Brand.vue +22 -0
- package/dist/runtime/components/Brand.vue.d.ts +6 -0
- package/dist/runtime/components/CollectionList.d.vue.ts +6 -0
- package/dist/runtime/components/CollectionList.vue +312 -0
- package/dist/runtime/components/CollectionList.vue.d.ts +6 -0
- package/dist/runtime/components/CommentsPanel.d.vue.ts +9 -0
- package/dist/runtime/components/CommentsPanel.vue +228 -0
- package/dist/runtime/components/CommentsPanel.vue.d.ts +9 -0
- package/dist/runtime/components/EntryEdit.d.vue.ts +9 -0
- package/dist/runtime/components/EntryEdit.vue +451 -0
- package/dist/runtime/components/EntryEdit.vue.d.ts +9 -0
- package/dist/runtime/components/FieldInput.d.vue.ts +13 -0
- package/dist/runtime/components/FieldInput.vue +325 -0
- package/dist/runtime/components/FieldInput.vue.d.ts +13 -0
- package/dist/runtime/components/FormSubmissions.d.vue.ts +6 -0
- package/dist/runtime/components/FormSubmissions.vue +197 -0
- package/dist/runtime/components/FormSubmissions.vue.d.ts +6 -0
- package/dist/runtime/components/GlobalSearch.d.vue.ts +10 -0
- package/dist/runtime/components/GlobalSearch.vue +145 -0
- package/dist/runtime/components/GlobalSearch.vue.d.ts +10 -0
- package/dist/runtime/components/Home.d.vue.ts +3 -0
- package/dist/runtime/components/Home.vue +226 -0
- package/dist/runtime/components/Home.vue.d.ts +3 -0
- package/dist/runtime/components/Icon.d.ts +14 -0
- package/dist/runtime/components/Icon.js +12 -0
- package/dist/runtime/components/MediaDetails.d.vue.ts +11 -0
- package/dist/runtime/components/MediaDetails.vue +222 -0
- package/dist/runtime/components/MediaDetails.vue.d.ts +11 -0
- package/dist/runtime/components/MediaField.d.vue.ts +14 -0
- package/dist/runtime/components/MediaField.vue +86 -0
- package/dist/runtime/components/MediaField.vue.d.ts +14 -0
- package/dist/runtime/components/MediaGrid.d.vue.ts +13 -0
- package/dist/runtime/components/MediaGrid.vue +49 -0
- package/dist/runtime/components/MediaGrid.vue.d.ts +13 -0
- package/dist/runtime/components/MediaLibrary.d.vue.ts +12 -0
- package/dist/runtime/components/MediaLibrary.vue +151 -0
- package/dist/runtime/components/MediaLibrary.vue.d.ts +12 -0
- package/dist/runtime/components/NotFound.d.vue.ts +6 -0
- package/dist/runtime/components/NotFound.vue +29 -0
- package/dist/runtime/components/NotFound.vue.d.ts +6 -0
- package/dist/runtime/components/NotificationBell.d.vue.ts +3 -0
- package/dist/runtime/components/NotificationBell.vue +53 -0
- package/dist/runtime/components/NotificationBell.vue.d.ts +3 -0
- package/dist/runtime/components/Page.d.vue.ts +28 -0
- package/dist/runtime/components/Page.vue +84 -0
- package/dist/runtime/components/Page.vue.d.ts +28 -0
- package/dist/runtime/components/RelatedCreate.d.vue.ts +16 -0
- package/dist/runtime/components/RelatedCreate.vue +86 -0
- package/dist/runtime/components/RelatedCreate.vue.d.ts +16 -0
- package/dist/runtime/components/RevisionHistory.d.vue.ts +16 -0
- package/dist/runtime/components/RevisionHistory.vue +145 -0
- package/dist/runtime/components/RevisionHistory.vue.d.ts +16 -0
- package/dist/runtime/components/RichTextEditor.d.vue.ts +15 -0
- package/dist/runtime/components/RichTextEditor.vue +190 -0
- package/dist/runtime/components/RichTextEditor.vue.d.ts +15 -0
- package/dist/runtime/components/RobotsSettings.d.vue.ts +3 -0
- package/dist/runtime/components/RobotsSettings.vue +173 -0
- package/dist/runtime/components/RobotsSettings.vue.d.ts +3 -0
- package/dist/runtime/components/RoleEdit.d.vue.ts +6 -0
- package/dist/runtime/components/RoleEdit.vue +234 -0
- package/dist/runtime/components/RoleEdit.vue.d.ts +6 -0
- package/dist/runtime/components/Roles.d.vue.ts +3 -0
- package/dist/runtime/components/Roles.vue +129 -0
- package/dist/runtime/components/Roles.vue.d.ts +3 -0
- package/dist/runtime/components/ScheduleSection.d.vue.ts +12 -0
- package/dist/runtime/components/ScheduleSection.vue +120 -0
- package/dist/runtime/components/ScheduleSection.vue.d.ts +12 -0
- package/dist/runtime/components/SeoPanel.d.vue.ts +7 -0
- package/dist/runtime/components/SeoPanel.vue +81 -0
- package/dist/runtime/components/SeoPanel.vue.d.ts +7 -0
- package/dist/runtime/components/Setup.d.vue.ts +3 -0
- package/dist/runtime/components/Setup.vue +79 -0
- package/dist/runtime/components/Setup.vue.d.ts +3 -0
- package/dist/runtime/components/SharedBlockUsage.d.vue.ts +7 -0
- package/dist/runtime/components/SharedBlockUsage.vue +91 -0
- package/dist/runtime/components/SharedBlockUsage.vue.d.ts +7 -0
- package/dist/runtime/components/Shell.d.vue.ts +15 -0
- package/dist/runtime/components/Shell.vue +277 -0
- package/dist/runtime/components/Shell.vue.d.ts +15 -0
- package/dist/runtime/components/SignIn.d.vue.ts +3 -0
- package/dist/runtime/components/SignIn.vue +106 -0
- package/dist/runtime/components/SignIn.vue.d.ts +3 -0
- package/dist/runtime/components/Toaster.d.vue.ts +3 -0
- package/dist/runtime/components/Toaster.vue +24 -0
- package/dist/runtime/components/Toaster.vue.d.ts +3 -0
- package/dist/runtime/components/Users.d.vue.ts +3 -0
- package/dist/runtime/components/Users.vue +226 -0
- package/dist/runtime/components/Users.vue.d.ts +3 -0
- package/dist/runtime/composables/debounced.d.ts +3 -0
- package/dist/runtime/composables/debounced.js +11 -0
- package/dist/runtime/composables/useAtelierAdmin.d.ts +17 -0
- package/dist/runtime/composables/useAtelierAdmin.js +53 -0
- package/dist/runtime/composables/useAtelierAdminPortal.d.ts +3 -0
- package/dist/runtime/composables/useAtelierAdminPortal.js +5 -0
- package/dist/runtime/composables/useAtelierAdminSchema.d.ts +182 -0
- package/dist/runtime/composables/useAtelierAdminSchema.js +26 -0
- package/dist/runtime/composables/useAtelierCollection.d.ts +49 -0
- package/dist/runtime/composables/useAtelierCollection.js +77 -0
- package/dist/runtime/composables/useAtelierComments.d.ts +50 -0
- package/dist/runtime/composables/useAtelierComments.js +46 -0
- package/dist/runtime/composables/useAtelierDashboard.d.ts +42 -0
- package/dist/runtime/composables/useAtelierDashboard.js +16 -0
- package/dist/runtime/composables/useAtelierEntryForm.d.ts +77 -0
- package/dist/runtime/composables/useAtelierEntryForm.js +184 -0
- package/dist/runtime/composables/useAtelierGlobalSearch.d.ts +12 -0
- package/dist/runtime/composables/useAtelierGlobalSearch.js +17 -0
- package/dist/runtime/composables/useAtelierMediaLibrary.d.ts +75 -0
- package/dist/runtime/composables/useAtelierMediaLibrary.js +85 -0
- package/dist/runtime/composables/useAtelierNavigation.d.ts +20 -0
- package/dist/runtime/composables/useAtelierNavigation.js +37 -0
- package/dist/runtime/composables/useAtelierNotifications.d.ts +21 -0
- package/dist/runtime/composables/useAtelierNotifications.js +34 -0
- package/dist/runtime/composables/useAtelierPermissions.d.ts +11 -0
- package/dist/runtime/composables/useAtelierPermissions.js +15 -0
- package/dist/runtime/composables/useAtelierPresence.d.ts +32 -0
- package/dist/runtime/composables/useAtelierPresence.js +95 -0
- package/dist/runtime/composables/useAtelierRealtime.d.ts +10 -0
- package/dist/runtime/composables/useAtelierRealtime.js +74 -0
- package/dist/runtime/composables/useAtelierRoles.d.ts +13 -0
- package/dist/runtime/composables/useAtelierRoles.js +15 -0
- package/dist/runtime/composables/useAtelierSeo.d.ts +34 -0
- package/dist/runtime/composables/useAtelierSeo.js +57 -0
- package/dist/runtime/composables/useAtelierSession.d.ts +35 -0
- package/dist/runtime/composables/useAtelierSession.js +36 -0
- package/dist/runtime/composables/useAtelierSetting.d.ts +11 -0
- package/dist/runtime/composables/useAtelierSetting.js +16 -0
- package/dist/runtime/composables/useAtelierUsers.d.ts +18 -0
- package/dist/runtime/composables/useAtelierUsers.js +16 -0
- package/dist/runtime/crystal-neuo/VERSION +3 -0
- package/dist/runtime/crystal-neuo/components/Alert.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Alert.vue +25 -0
- package/dist/runtime/crystal-neuo/components/Alert.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Avatar.d.vue.ts +15 -0
- package/dist/runtime/crystal-neuo/components/Avatar.vue +25 -0
- package/dist/runtime/crystal-neuo/components/Avatar.vue.d.ts +15 -0
- package/dist/runtime/crystal-neuo/components/Badge.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Badge.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Badge.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.d.vue.ts +16 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.vue +26 -0
- package/dist/runtime/crystal-neuo/components/Breadcrumb.vue.d.ts +16 -0
- package/dist/runtime/crystal-neuo/components/Button.d.vue.ts +35 -0
- package/dist/runtime/crystal-neuo/components/Button.vue +31 -0
- package/dist/runtime/crystal-neuo/components/Button.vue.d.ts +35 -0
- package/dist/runtime/crystal-neuo/components/Card.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Card.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Card.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.vue +45 -0
- package/dist/runtime/crystal-neuo/components/Checkbox.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.d.vue.ts +24 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.vue +43 -0
- package/dist/runtime/crystal-neuo/components/DatePicker.vue.d.ts +24 -0
- package/dist/runtime/crystal-neuo/components/Dialog.d.vue.ts +41 -0
- package/dist/runtime/crystal-neuo/components/Dialog.vue +63 -0
- package/dist/runtime/crystal-neuo/components/Dialog.vue.d.ts +41 -0
- package/dist/runtime/crystal-neuo/components/Drawer.d.vue.ts +34 -0
- package/dist/runtime/crystal-neuo/components/Drawer.vue +45 -0
- package/dist/runtime/crystal-neuo/components/Drawer.vue.d.ts +34 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.vue +94 -0
- package/dist/runtime/crystal-neuo/components/FileUpload.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Input.d.vue.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Input.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Input.vue.d.ts +26 -0
- package/dist/runtime/crystal-neuo/components/List.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/List.vue +19 -0
- package/dist/runtime/crystal-neuo/components/List.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/ListItem.d.vue.ts +20 -0
- package/dist/runtime/crystal-neuo/components/ListItem.vue +13 -0
- package/dist/runtime/crystal-neuo/components/ListItem.vue.d.ts +20 -0
- package/dist/runtime/crystal-neuo/components/Menu.d.vue.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Menu.vue +120 -0
- package/dist/runtime/crystal-neuo/components/Menu.vue.d.ts +26 -0
- package/dist/runtime/crystal-neuo/components/Modal.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Modal.vue +37 -0
- package/dist/runtime/crystal-neuo/components/Modal.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Nav.d.vue.ts +24 -0
- package/dist/runtime/crystal-neuo/components/Nav.vue +15 -0
- package/dist/runtime/crystal-neuo/components/Nav.vue.d.ts +24 -0
- package/dist/runtime/crystal-neuo/components/NavLink.d.vue.ts +22 -0
- package/dist/runtime/crystal-neuo/components/NavLink.vue +23 -0
- package/dist/runtime/crystal-neuo/components/NavLink.vue.d.ts +22 -0
- package/dist/runtime/crystal-neuo/components/Pagination.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Pagination.vue +58 -0
- package/dist/runtime/crystal-neuo/components/Pagination.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Progress.d.vue.ts +18 -0
- package/dist/runtime/crystal-neuo/components/Progress.vue +35 -0
- package/dist/runtime/crystal-neuo/components/Progress.vue.d.ts +18 -0
- package/dist/runtime/crystal-neuo/components/Radio.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Radio.vue +40 -0
- package/dist/runtime/crystal-neuo/components/Radio.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.d.vue.ts +31 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.vue +39 -0
- package/dist/runtime/crystal-neuo/components/SegmentedControl.vue.d.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Select.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Select.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Select.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Sheet.d.vue.ts +29 -0
- package/dist/runtime/crystal-neuo/components/Sheet.vue +37 -0
- package/dist/runtime/crystal-neuo/components/Sheet.vue.d.ts +29 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.vue +17 -0
- package/dist/runtime/crystal-neuo/components/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/crystal-neuo/components/Slider.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Slider.vue +41 -0
- package/dist/runtime/crystal-neuo/components/Slider.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/TabBar.d.vue.ts +28 -0
- package/dist/runtime/crystal-neuo/components/TabBar.vue +29 -0
- package/dist/runtime/crystal-neuo/components/TabBar.vue.d.ts +28 -0
- package/dist/runtime/crystal-neuo/components/Table.d.vue.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Table.vue +36 -0
- package/dist/runtime/crystal-neuo/components/Table.vue.d.ts +31 -0
- package/dist/runtime/crystal-neuo/components/Tabs.d.vue.ts +40 -0
- package/dist/runtime/crystal-neuo/components/Tabs.vue +79 -0
- package/dist/runtime/crystal-neuo/components/Tabs.vue.d.ts +40 -0
- package/dist/runtime/crystal-neuo/components/Textarea.d.vue.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Textarea.vue +48 -0
- package/dist/runtime/crystal-neuo/components/Textarea.vue.d.ts +25 -0
- package/dist/runtime/crystal-neuo/components/Toast.d.vue.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Toast.vue +67 -0
- package/dist/runtime/crystal-neuo/components/Toast.vue.d.ts +32 -0
- package/dist/runtime/crystal-neuo/components/Toggle.d.vue.ts +21 -0
- package/dist/runtime/crystal-neuo/components/Toggle.vue +43 -0
- package/dist/runtime/crystal-neuo/components/Toggle.vue.d.ts +21 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.d.vue.ts +23 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.vue +38 -0
- package/dist/runtime/crystal-neuo/components/Tooltip.vue.d.ts +23 -0
- package/dist/runtime/crystal-neuo/components/cn.d.ts +1 -0
- package/dist/runtime/crystal-neuo/components/cn.js +3 -0
- package/dist/runtime/crystal-neuo/components/useControlAttrs.d.ts +15 -0
- package/dist/runtime/crystal-neuo/components/useControlAttrs.js +11 -0
- package/dist/runtime/crystal-neuo/components/useFocusTrap.d.ts +9 -0
- package/dist/runtime/crystal-neuo/components/useFocusTrap.js +55 -0
- package/dist/runtime/crystal-neuo/components/useModalDialog.d.ts +11 -0
- package/dist/runtime/crystal-neuo/components/useModalDialog.js +42 -0
- package/dist/runtime/crystal-neuo/contract/alert.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/alert.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/avatar.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/avatar.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/badge.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/badge.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/button.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/button.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/card.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/card.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/checkbox.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/checkbox.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/date-picker.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/date-picker.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/dialog.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/dialog.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/drawer.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/drawer.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/file-upload.contract.d.ts +17 -0
- package/dist/runtime/crystal-neuo/contract/file-upload.contract.js +36 -0
- package/dist/runtime/crystal-neuo/contract/index.d.ts +67 -0
- package/dist/runtime/crystal-neuo/contract/index.js +96 -0
- package/dist/runtime/crystal-neuo/contract/input.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/input.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/list.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/list.contract.js +21 -0
- package/dist/runtime/crystal-neuo/contract/menu.contract.d.ts +21 -0
- package/dist/runtime/crystal-neuo/contract/menu.contract.js +51 -0
- package/dist/runtime/crystal-neuo/contract/modal.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/modal.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/nav.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/nav.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/pagination.contract.d.ts +11 -0
- package/dist/runtime/crystal-neuo/contract/pagination.contract.js +32 -0
- package/dist/runtime/crystal-neuo/contract/progress.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/progress.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/radio.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/radio.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/segmented-control.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/segmented-control.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/select.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/select.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/sheet.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/sheet.contract.js +23 -0
- package/dist/runtime/crystal-neuo/contract/skeleton.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/skeleton.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/slider.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/slider.contract.js +24 -0
- package/dist/runtime/crystal-neuo/contract/tab-bar.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tab-bar.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/table.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/table.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/tabs.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tabs.contract.js +26 -0
- package/dist/runtime/crystal-neuo/contract/textarea.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/textarea.contract.js +19 -0
- package/dist/runtime/crystal-neuo/contract/toast.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/toast.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/toggle.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/toggle.contract.js +22 -0
- package/dist/runtime/crystal-neuo/contract/tooltip.contract.d.ts +3 -0
- package/dist/runtime/crystal-neuo/contract/tooltip.contract.js +18 -0
- package/dist/runtime/crystal-neuo/contract/types.d.ts +76 -0
- package/dist/runtime/crystal-neuo/contract/types.js +12 -0
- package/dist/runtime/crystal-neuo/css/crystal-neuo.css +1 -0
- package/dist/runtime/crystal-neuo/runtime/axes.d.ts +16 -0
- package/dist/runtime/crystal-neuo/runtime/axes.js +9 -0
- package/dist/runtime/crystal-neuo/runtime/index.d.ts +62 -0
- package/dist/runtime/crystal-neuo/runtime/index.js +115 -0
- package/dist/runtime/crystal-neuo/runtime/platform.d.ts +11 -0
- package/dist/runtime/crystal-neuo/runtime/platform.js +18 -0
- package/dist/runtime/crystal-neuo/runtime/refraction.d.ts +42 -0
- package/dist/runtime/crystal-neuo/runtime/refraction.js +183 -0
- package/dist/runtime/css/shell.css +1 -0
- package/dist/runtime/i18n/en.d.ts +2 -0
- package/dist/runtime/i18n/en.js +511 -0
- package/dist/runtime/i18n/index.d.ts +15 -0
- package/dist/runtime/i18n/index.js +52 -0
- package/dist/runtime/overrides.d.ts +5 -0
- package/dist/runtime/overrides.js +6 -0
- package/dist/runtime/pages/AdminPage.d.vue.ts +3 -0
- package/dist/runtime/pages/AdminPage.vue +49 -0
- package/dist/runtime/pages/AdminPage.vue.d.ts +3 -0
- package/dist/runtime/passkeys-off.d.ts +1 -0
- package/dist/runtime/passkeys-off.js +3 -0
- package/dist/runtime/passkeys.d.ts +1 -0
- package/dist/runtime/passkeys.js +6 -0
- package/dist/runtime/toast.d.ts +15 -0
- package/dist/runtime/toast.js +19 -0
- package/dist/runtime/types.d.ts +137 -0
- package/dist/runtime/types.js +0 -0
- package/dist/types.d.mts +3 -0
- package/package.json +59 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string | null;
|
|
3
|
+
label: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
hint?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string | null) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { useAtelierMediaItem } from "../composables/useAtelierMediaLibrary";
|
|
4
|
+
import CnButton from "../crystal-neuo/components/Button.vue";
|
|
5
|
+
import CnModal from "../crystal-neuo/components/Modal.vue";
|
|
6
|
+
import { useAdminI18n } from "../i18n";
|
|
7
|
+
import Icon from "./Icon";
|
|
8
|
+
import MediaLibrary from "./MediaLibrary.vue";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
modelValue: { type: [String, null], required: false },
|
|
11
|
+
label: { type: String, required: true },
|
|
12
|
+
error: { type: String, required: false },
|
|
13
|
+
disabled: { type: Boolean, required: false },
|
|
14
|
+
hint: { type: String, required: false }
|
|
15
|
+
});
|
|
16
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
17
|
+
const { t } = useAdminI18n();
|
|
18
|
+
const item = useAtelierMediaItem(() => props.modelValue);
|
|
19
|
+
const picking = ref(false);
|
|
20
|
+
function choose(chosen) {
|
|
21
|
+
emit("update:modelValue", chosen.id);
|
|
22
|
+
picking.value = false;
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<fieldset
|
|
28
|
+
class="app-fieldset"
|
|
29
|
+
data-media-field
|
|
30
|
+
>
|
|
31
|
+
<legend class="cn-label">
|
|
32
|
+
{{ label }}
|
|
33
|
+
</legend>
|
|
34
|
+
<div class="app-media-field">
|
|
35
|
+
<img
|
|
36
|
+
v-if="item.data.value?.mime.startsWith('image/')"
|
|
37
|
+
:src="`${item.data.value.url}?w=160`"
|
|
38
|
+
:alt="item.data.value.alt?.[''] ?? ''"
|
|
39
|
+
class="app-media-field__thumb"
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
v-else-if="item.data.value"
|
|
43
|
+
class="app-media-field__thumb"
|
|
44
|
+
><Icon name="file" /></span>
|
|
45
|
+
<span class="app-muted">{{ item.data.value ? item.data.value.title || item.data.value.filename : t("media.noFile") }}</span>
|
|
46
|
+
<template v-if="!disabled">
|
|
47
|
+
<CnButton
|
|
48
|
+
variant="secondary"
|
|
49
|
+
size="sm"
|
|
50
|
+
@click="picking = true"
|
|
51
|
+
>
|
|
52
|
+
{{ modelValue ? t("media.change") : t("media.choose") }}
|
|
53
|
+
</CnButton>
|
|
54
|
+
<CnButton
|
|
55
|
+
v-if="modelValue"
|
|
56
|
+
variant="ghost"
|
|
57
|
+
size="sm"
|
|
58
|
+
@click="emit('update:modelValue', null)"
|
|
59
|
+
>
|
|
60
|
+
{{ t("media.remove") }}
|
|
61
|
+
</CnButton>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<span
|
|
65
|
+
v-if="error"
|
|
66
|
+
class="cn-field__message"
|
|
67
|
+
role="alert"
|
|
68
|
+
>{{ error }}</span>
|
|
69
|
+
<span
|
|
70
|
+
v-else-if="hint"
|
|
71
|
+
class="cn-field__hint"
|
|
72
|
+
>{{ hint }}</span>
|
|
73
|
+
<CnModal
|
|
74
|
+
v-model:open="picking"
|
|
75
|
+
:title="t('media.pick')"
|
|
76
|
+
size="lg"
|
|
77
|
+
>
|
|
78
|
+
<MediaLibrary
|
|
79
|
+
v-if="picking"
|
|
80
|
+
picking
|
|
81
|
+
:selected="modelValue"
|
|
82
|
+
@choose="choose"
|
|
83
|
+
/>
|
|
84
|
+
</CnModal>
|
|
85
|
+
</fieldset>
|
|
86
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string | null;
|
|
3
|
+
label: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
hint?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string | null) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MediaItem } from '../composables/useAtelierMediaLibrary.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: MediaItem[];
|
|
4
|
+
selected?: string | null;
|
|
5
|
+
pickLabel?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
choose: (item: MediaItem) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onChoose?: ((item: MediaItem) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useAdminI18n } from "../i18n";
|
|
3
|
+
import Icon from "./Icon";
|
|
4
|
+
defineProps({
|
|
5
|
+
items: { type: Array, required: true },
|
|
6
|
+
selected: { type: [String, null], required: false },
|
|
7
|
+
pickLabel: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
defineEmits(["choose"]);
|
|
10
|
+
const { t } = useAdminI18n();
|
|
11
|
+
const icon = (mime) => mime.startsWith("video/") ? "film" : mime.startsWith("audio/") ? "music" : "file";
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<ul class="app-media-grid">
|
|
16
|
+
<li
|
|
17
|
+
v-for="item in items"
|
|
18
|
+
:key="item.id"
|
|
19
|
+
>
|
|
20
|
+
<button
|
|
21
|
+
type="button"
|
|
22
|
+
class="app-media-tile"
|
|
23
|
+
:aria-pressed="selected === void 0 ? void 0 : selected === item.id"
|
|
24
|
+
:aria-label="pickLabel ? t('media.select', { name: item.title || item.filename }) : void 0"
|
|
25
|
+
@click="$emit('choose', item)"
|
|
26
|
+
>
|
|
27
|
+
<span class="app-media-tile__thumb">
|
|
28
|
+
<img
|
|
29
|
+
v-if="item.mime.startsWith('image/')"
|
|
30
|
+
:src="`${item.url}?w=320`"
|
|
31
|
+
alt=""
|
|
32
|
+
loading="lazy"
|
|
33
|
+
>
|
|
34
|
+
<Icon
|
|
35
|
+
v-else
|
|
36
|
+
:name="icon(item.mime)"
|
|
37
|
+
/>
|
|
38
|
+
</span>
|
|
39
|
+
<span class="app-media-tile__name">
|
|
40
|
+
<Icon
|
|
41
|
+
v-if="item.private"
|
|
42
|
+
name="lock"
|
|
43
|
+
/>
|
|
44
|
+
{{ item.title || item.filename }}
|
|
45
|
+
</span>
|
|
46
|
+
</button>
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MediaItem } from '../composables/useAtelierMediaLibrary.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: MediaItem[];
|
|
4
|
+
selected?: string | null;
|
|
5
|
+
pickLabel?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
choose: (item: MediaItem) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onChoose?: ((item: MediaItem) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MediaItem } from '../composables/useAtelierMediaLibrary.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
picking?: boolean;
|
|
4
|
+
selected?: string | null;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
choose: (item: MediaItem) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChoose?: ((item: MediaItem) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import { useRoute } from "#imports";
|
|
4
|
+
import { useAtelierMediaLibrary } from "../composables/useAtelierMediaLibrary";
|
|
5
|
+
import { useAtelierPermissions } from "../composables/useAtelierPermissions";
|
|
6
|
+
import CnButton from "../crystal-neuo/components/Button.vue";
|
|
7
|
+
import CnInput from "../crystal-neuo/components/Input.vue";
|
|
8
|
+
import CnPagination from "../crystal-neuo/components/Pagination.vue";
|
|
9
|
+
import CnProgress from "../crystal-neuo/components/Progress.vue";
|
|
10
|
+
import CnSelect from "../crystal-neuo/components/Select.vue";
|
|
11
|
+
import { useAdminI18n } from "../i18n";
|
|
12
|
+
import { useAdminToast } from "../toast";
|
|
13
|
+
import Icon from "./Icon";
|
|
14
|
+
import MediaDetails from "./MediaDetails.vue";
|
|
15
|
+
import MediaGrid from "./MediaGrid.vue";
|
|
16
|
+
import Page from "./Page.vue";
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
picking: { type: Boolean, required: false },
|
|
19
|
+
selected: { type: [String, null], required: false }
|
|
20
|
+
});
|
|
21
|
+
const emit = defineEmits(["choose"]);
|
|
22
|
+
const { t } = useAdminI18n();
|
|
23
|
+
const { manages } = useAtelierPermissions();
|
|
24
|
+
const route = useRoute();
|
|
25
|
+
const library = useAtelierMediaLibrary(!props.picking && typeof route.query.search === "string" ? { search: route.query.search } : {});
|
|
26
|
+
const { state } = library;
|
|
27
|
+
const toast = useAdminToast();
|
|
28
|
+
const open = ref(null);
|
|
29
|
+
const fileInput = ref(null);
|
|
30
|
+
const dragging = ref(false);
|
|
31
|
+
const kinds = computed(() => [
|
|
32
|
+
{ value: "", label: t("media.kind.all") },
|
|
33
|
+
{ value: "image/", label: t("media.kind.image") },
|
|
34
|
+
{ value: "video/", label: t("media.kind.video") },
|
|
35
|
+
{ value: "audio/", label: t("media.kind.audio") },
|
|
36
|
+
{ value: "application/pdf", label: t("media.kind.pdf") }
|
|
37
|
+
]);
|
|
38
|
+
async function upload(files) {
|
|
39
|
+
if (!files?.length || !manages("media"))
|
|
40
|
+
return;
|
|
41
|
+
let done = 0;
|
|
42
|
+
for (const file of files) {
|
|
43
|
+
try {
|
|
44
|
+
const item = await library.upload(file, state.folder ? { folder: state.folder } : {});
|
|
45
|
+
done++;
|
|
46
|
+
if (props.picking && files.length === 1)
|
|
47
|
+
emit("choose", item);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
toast.add({ color: "error", title: t("media.notUploaded", { name: file.name }), description: e.message });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (done)
|
|
53
|
+
toast.add({ color: "success", title: t("media.uploaded", { count: done }) });
|
|
54
|
+
}
|
|
55
|
+
function onDrop(e) {
|
|
56
|
+
dragging.value = false;
|
|
57
|
+
void upload(e.dataTransfer?.files);
|
|
58
|
+
}
|
|
59
|
+
const choose = (item) => props.picking ? emit("choose", item) : open.value = item;
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<component
|
|
64
|
+
:is="picking ? 'div' : Page"
|
|
65
|
+
v-bind="picking ? {} : { title: t('media.title'), icon: 'image', description: t('media.description') }"
|
|
66
|
+
>
|
|
67
|
+
<div
|
|
68
|
+
class="app-stack app-media-drop"
|
|
69
|
+
:data-dragging="dragging || void 0"
|
|
70
|
+
@dragover.prevent="dragging = manages('media')"
|
|
71
|
+
@dragleave="dragging = false"
|
|
72
|
+
@drop.prevent="onDrop"
|
|
73
|
+
>
|
|
74
|
+
<div class="app-page__toolbar">
|
|
75
|
+
<CnInput
|
|
76
|
+
v-model="state.search"
|
|
77
|
+
:label="t('media.search')"
|
|
78
|
+
type="search"
|
|
79
|
+
/>
|
|
80
|
+
<CnSelect
|
|
81
|
+
v-model="state.kind"
|
|
82
|
+
:label="t('media.kind')"
|
|
83
|
+
:options="kinds"
|
|
84
|
+
/>
|
|
85
|
+
<CnInput
|
|
86
|
+
v-model="state.folder"
|
|
87
|
+
:label="t('media.folder')"
|
|
88
|
+
/>
|
|
89
|
+
<CnInput
|
|
90
|
+
v-model="state.tag"
|
|
91
|
+
:label="t('media.tag')"
|
|
92
|
+
/>
|
|
93
|
+
<template v-if="manages('media')">
|
|
94
|
+
<CnButton @click="fileInput?.click()">
|
|
95
|
+
<Icon name="upload" />
|
|
96
|
+
{{ t("media.upload") }}
|
|
97
|
+
</CnButton>
|
|
98
|
+
<input
|
|
99
|
+
ref="fileInput"
|
|
100
|
+
type="file"
|
|
101
|
+
multiple
|
|
102
|
+
hidden
|
|
103
|
+
data-media-upload
|
|
104
|
+
@change="upload($event.target.files)"
|
|
105
|
+
>
|
|
106
|
+
</template>
|
|
107
|
+
</div>
|
|
108
|
+
<p
|
|
109
|
+
v-if="manages('media')"
|
|
110
|
+
class="app-muted"
|
|
111
|
+
>
|
|
112
|
+
{{ t("media.drop") }}
|
|
113
|
+
</p>
|
|
114
|
+
<CnProgress
|
|
115
|
+
v-for="(share, name) in library.progress.value"
|
|
116
|
+
:key="name"
|
|
117
|
+
:value="Math.round(share * 100)"
|
|
118
|
+
:max="100"
|
|
119
|
+
:label="t('media.uploading', { name, percent: Math.round(share * 100) })"
|
|
120
|
+
/>
|
|
121
|
+
<MediaGrid
|
|
122
|
+
:items="library.items.value"
|
|
123
|
+
:selected="picking ? selected ?? null : void 0"
|
|
124
|
+
:pick-label="picking"
|
|
125
|
+
@choose="choose"
|
|
126
|
+
/>
|
|
127
|
+
<div
|
|
128
|
+
v-if="!library.loading.value && !library.items.value.length"
|
|
129
|
+
class="app-empty"
|
|
130
|
+
>
|
|
131
|
+
<Icon name="image" />
|
|
132
|
+
<p class="app-empty__title">
|
|
133
|
+
{{ state.search || state.folder || state.tag || state.kind ? t("media.noMatches") : t("media.empty") }}
|
|
134
|
+
</p>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="app-row app-row--between">
|
|
137
|
+
<span class="app-muted">{{ library.total.value === 1 ? t("media.countOne") : t("media.count", { count: library.total.value }) }}</span>
|
|
138
|
+
<CnPagination
|
|
139
|
+
v-if="library.pages.value > 1"
|
|
140
|
+
v-model:page="state.page"
|
|
141
|
+
:page-count="library.pages.value"
|
|
142
|
+
/>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
<MediaDetails
|
|
146
|
+
v-if="!picking"
|
|
147
|
+
:item="open"
|
|
148
|
+
@close="open = null"
|
|
149
|
+
/>
|
|
150
|
+
</component>
|
|
151
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MediaItem } from '../composables/useAtelierMediaLibrary.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
picking?: boolean;
|
|
4
|
+
selected?: string | null;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
choose: (item: MediaItem) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChoose?: ((item: MediaItem) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
forbidden?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NuxtLink } from "#components";
|
|
3
|
+
import { useAtelierAdmin } from "../composables/useAtelierAdmin";
|
|
4
|
+
import Icon from "./Icon";
|
|
5
|
+
import Page from "./Page.vue";
|
|
6
|
+
import { useAdminI18n } from "../i18n";
|
|
7
|
+
defineProps({
|
|
8
|
+
forbidden: { type: Boolean, required: false }
|
|
9
|
+
});
|
|
10
|
+
const { t } = useAdminI18n();
|
|
11
|
+
const { to } = useAtelierAdmin();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<Page :title="forbidden ? t('forbidden.title') : t('notFound.title')">
|
|
16
|
+
<div class="app-empty">
|
|
17
|
+
<Icon :name="forbidden ? 'shield' : 'search'" />
|
|
18
|
+
<p class="app-empty__body">
|
|
19
|
+
{{ forbidden ? t("forbidden.body") : t("notFound.body") }}
|
|
20
|
+
</p>
|
|
21
|
+
<NuxtLink
|
|
22
|
+
:to="to()"
|
|
23
|
+
class="cn-button cn-button--secondary cn-button--size-sm"
|
|
24
|
+
>
|
|
25
|
+
{{ t("notFound.home") }}
|
|
26
|
+
</NuxtLink>
|
|
27
|
+
</div>
|
|
28
|
+
</Page>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
forbidden?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { navigateTo } from "#imports";
|
|
4
|
+
import { useAtelierAdmin } from "../composables/useAtelierAdmin";
|
|
5
|
+
import { useAtelierAdminSchema } from "../composables/useAtelierAdminSchema";
|
|
6
|
+
import { humanize } from "../composables/useAtelierNavigation";
|
|
7
|
+
import { useAtelierNotifications } from "../composables/useAtelierNotifications";
|
|
8
|
+
import CnMenu from "../crystal-neuo/components/Menu.vue";
|
|
9
|
+
import Icon from "./Icon";
|
|
10
|
+
import { useAdminI18n } from "../i18n";
|
|
11
|
+
const { t } = useAdminI18n();
|
|
12
|
+
const { to } = useAtelierAdmin();
|
|
13
|
+
const { schema } = useAtelierAdminSchema();
|
|
14
|
+
const { items, unread, markRead } = useAtelierNotifications();
|
|
15
|
+
const typeLabel = (type) => {
|
|
16
|
+
const collection = schema.value?.collections.find((c) => c.name === type);
|
|
17
|
+
const singleton = schema.value?.singletons.find((s) => s.name === type);
|
|
18
|
+
return collection?.labels?.plural ?? singleton?.label ?? humanize(type);
|
|
19
|
+
};
|
|
20
|
+
const isSingleton = (type) => !!schema.value?.singletons.some((s) => s.name === type);
|
|
21
|
+
async function open(n) {
|
|
22
|
+
if (!n.readAt)
|
|
23
|
+
markRead.mutate([n.id]);
|
|
24
|
+
await navigateTo(isSingleton(n.data.type) ? to("singletons", n.data.type) : to("collections", n.data.type, n.data.entry));
|
|
25
|
+
}
|
|
26
|
+
const entries = computed(() => [
|
|
27
|
+
...items.value.length ? items.value.map((n) => ({ label: `${n.readAt ? "" : "\u25CF "}${t(`notifications.${n.kind}`, { name: n.data.byName, type: typeLabel(n.data.type) })}`, onSelect: () => void open(n) })) : [{ label: t("notifications.empty"), disabled: true }],
|
|
28
|
+
...unread.value ? [{ separator: true }, { label: t("notifications.markAllRead"), onSelect: () => markRead.mutate(void 0) }] : []
|
|
29
|
+
]);
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<CnMenu
|
|
34
|
+
:items="entries"
|
|
35
|
+
trigger-variant="ghost"
|
|
36
|
+
class="app-notifications"
|
|
37
|
+
>
|
|
38
|
+
<template #trigger>
|
|
39
|
+
<span
|
|
40
|
+
class="app-notifications__trigger"
|
|
41
|
+
data-notifications
|
|
42
|
+
>
|
|
43
|
+
<Icon name="bell" />
|
|
44
|
+
<span class="sr-only">{{ unread ? `${t("notifications.title")}, ${t("notifications.unread", { count: unread })}` : t("notifications.title") }}</span>
|
|
45
|
+
<span
|
|
46
|
+
v-if="unread"
|
|
47
|
+
class="app-notifications__count"
|
|
48
|
+
aria-hidden="true"
|
|
49
|
+
>{{ unread > 99 ? "99+" : unread }}</span>
|
|
50
|
+
</span>
|
|
51
|
+
</template>
|
|
52
|
+
</CnMenu>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
breadcrumb?: {
|
|
6
|
+
label: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_template: () => {
|
|
11
|
+
__VLS_Slots: {
|
|
12
|
+
actions?: (props: {}) => any;
|
|
13
|
+
} & {
|
|
14
|
+
toolbar?: (props: {}) => any;
|
|
15
|
+
} & {
|
|
16
|
+
default?: (props: {}) => any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NuxtLink } from "#components";
|
|
3
|
+
import Icon from "./Icon";
|
|
4
|
+
import { useAdminI18n } from "../i18n";
|
|
5
|
+
defineProps({
|
|
6
|
+
title: { type: String, required: true },
|
|
7
|
+
icon: { type: String, required: false },
|
|
8
|
+
description: { type: String, required: false },
|
|
9
|
+
breadcrumb: { type: Array, required: false }
|
|
10
|
+
});
|
|
11
|
+
const { t } = useAdminI18n();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<section
|
|
16
|
+
class="app-page"
|
|
17
|
+
aria-labelledby="atelier-page-title"
|
|
18
|
+
>
|
|
19
|
+
<nav
|
|
20
|
+
v-if="breadcrumb?.length"
|
|
21
|
+
class="cn-breadcrumb cn-breadcrumb--size-sm"
|
|
22
|
+
:aria-label="t('common.breadcrumb')"
|
|
23
|
+
>
|
|
24
|
+
<ol class="cn-breadcrumb__list">
|
|
25
|
+
<li
|
|
26
|
+
v-for="(c, i) in breadcrumb"
|
|
27
|
+
:key="i"
|
|
28
|
+
class="cn-breadcrumb__item"
|
|
29
|
+
>
|
|
30
|
+
<NuxtLink
|
|
31
|
+
v-if="c.to"
|
|
32
|
+
:to="c.to"
|
|
33
|
+
class="cn-breadcrumb__link"
|
|
34
|
+
>
|
|
35
|
+
{{ c.label }}
|
|
36
|
+
</NuxtLink>
|
|
37
|
+
<span
|
|
38
|
+
v-else
|
|
39
|
+
class="cn-breadcrumb__current"
|
|
40
|
+
aria-current="page"
|
|
41
|
+
>{{ c.label }}</span>
|
|
42
|
+
<span
|
|
43
|
+
v-if="i !== breadcrumb.length - 1"
|
|
44
|
+
class="cn-breadcrumb__sep"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
>/</span>
|
|
47
|
+
</li>
|
|
48
|
+
</ol>
|
|
49
|
+
</nav>
|
|
50
|
+
<div class="app-page__head">
|
|
51
|
+
<div>
|
|
52
|
+
<h1
|
|
53
|
+
id="atelier-page-title"
|
|
54
|
+
class="app-page__title"
|
|
55
|
+
>
|
|
56
|
+
<Icon
|
|
57
|
+
v-if="icon"
|
|
58
|
+
:name="icon"
|
|
59
|
+
/>
|
|
60
|
+
{{ title }}
|
|
61
|
+
</h1>
|
|
62
|
+
<p
|
|
63
|
+
v-if="description"
|
|
64
|
+
class="app-page__description"
|
|
65
|
+
>
|
|
66
|
+
{{ description }}
|
|
67
|
+
</p>
|
|
68
|
+
</div>
|
|
69
|
+
<div
|
|
70
|
+
v-if="$slots.actions"
|
|
71
|
+
class="app-page__actions"
|
|
72
|
+
>
|
|
73
|
+
<slot name="actions" />
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<div
|
|
77
|
+
v-if="$slots.toolbar"
|
|
78
|
+
class="app-page__toolbar"
|
|
79
|
+
>
|
|
80
|
+
<slot name="toolbar" />
|
|
81
|
+
</div>
|
|
82
|
+
<slot />
|
|
83
|
+
</section>
|
|
84
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
breadcrumb?: {
|
|
6
|
+
label: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_template: () => {
|
|
11
|
+
__VLS_Slots: {
|
|
12
|
+
actions?: (props: {}) => any;
|
|
13
|
+
} & {
|
|
14
|
+
toolbar?: (props: {}) => any;
|
|
15
|
+
} & {
|
|
16
|
+
default?: (props: {}) => any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
collection: string;
|
|
3
|
+
};
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
'open'?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
created: (id: string) => any;
|
|
10
|
+
"update:open": (value: boolean) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
onCreated?: ((id: string) => any) | undefined;
|
|
13
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|