@nuxt-atelier/admin 0.0.0-stage → 0.1.1
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/BlocksField.d.vue.ts +14 -0
- package/dist/runtime/components/BlocksField.vue +167 -0
- package/dist/runtime/components/BlocksField.vue.d.ts +14 -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 +457 -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 +356 -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 +247 -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 +281 -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 +543 -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 +133 -0
- package/dist/runtime/types.js +0 -0
- package/dist/types.d.mts +3 -0
- package/package.json +59 -4
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onBeforeUnmount, onMounted, provide, ref, watch } from "vue";
|
|
3
|
+
import { ai } from "#atelier-admin-ai";
|
|
4
|
+
import { useQuery } from "@tanstack/vue-query";
|
|
5
|
+
import { NuxtLink } from "#components";
|
|
6
|
+
import { navigateTo, onBeforeRouteLeave, onBeforeRouteUpdate, useRuntimeConfig } from "#imports";
|
|
7
|
+
import { atelierFetch, useAtelierAdmin } from "../composables/useAtelierAdmin";
|
|
8
|
+
import { useAtelierAdminSchema } from "../composables/useAtelierAdminSchema";
|
|
9
|
+
import { useAtelierEntryForm } from "../composables/useAtelierEntryForm";
|
|
10
|
+
import { useAtelierPresence } from "../composables/useAtelierPresence";
|
|
11
|
+
import { titleField } from "../composables/useAtelierCollection";
|
|
12
|
+
import { humanize } from "../composables/useAtelierNavigation";
|
|
13
|
+
import CnAlert from "../crystal-neuo/components/Alert.vue";
|
|
14
|
+
import CnAvatar from "../crystal-neuo/components/Avatar.vue";
|
|
15
|
+
import CnBadge from "../crystal-neuo/components/Badge.vue";
|
|
16
|
+
import CnButton from "../crystal-neuo/components/Button.vue";
|
|
17
|
+
import CnDialog from "../crystal-neuo/components/Dialog.vue";
|
|
18
|
+
import CnInput from "../crystal-neuo/components/Input.vue";
|
|
19
|
+
import CnSelect from "../crystal-neuo/components/Select.vue";
|
|
20
|
+
import { useAdminToast } from "../toast";
|
|
21
|
+
import CommentsPanel from "./CommentsPanel.vue";
|
|
22
|
+
import RevisionHistory from "./RevisionHistory.vue";
|
|
23
|
+
import ScheduleSection from "./ScheduleSection.vue";
|
|
24
|
+
import FieldInput from "./FieldInput.vue";
|
|
25
|
+
import NotFound from "./NotFound.vue";
|
|
26
|
+
import Page from "./Page.vue";
|
|
27
|
+
import SeoPanel from "./SeoPanel.vue";
|
|
28
|
+
import SharedBlockUsage from "./SharedBlockUsage.vue";
|
|
29
|
+
import FormSubmissions from "./FormSubmissions.vue";
|
|
30
|
+
import { useAtelierPermissions } from "../composables/useAtelierPermissions";
|
|
31
|
+
import { useAdminI18n } from "../i18n";
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
kind: { type: String, required: true },
|
|
34
|
+
name: { type: String, required: true },
|
|
35
|
+
id: { type: String, required: false },
|
|
36
|
+
locale: { type: String, required: false }
|
|
37
|
+
});
|
|
38
|
+
const { t } = useAdminI18n();
|
|
39
|
+
const { to } = useAtelierAdmin();
|
|
40
|
+
const toast = useAdminToast();
|
|
41
|
+
const edit = useAtelierEntryForm(() => ({ kind: props.kind, name: props.name, id: props.id, locale: props.locale }));
|
|
42
|
+
const { type, form } = edit;
|
|
43
|
+
const values = form.useStore((s) => s.values);
|
|
44
|
+
const dirty = edit.dirty;
|
|
45
|
+
const submitting = form.useStore((s) => s.isSubmitting);
|
|
46
|
+
const error = ref("");
|
|
47
|
+
const { schema } = useAtelierAdminSchema();
|
|
48
|
+
const { manages } = useAtelierPermissions();
|
|
49
|
+
const otherLocales = computed(() => (schema.value?.locales.codes ?? []).filter((code) => code !== edit.locale.value));
|
|
50
|
+
async function addTranslation(locale) {
|
|
51
|
+
try {
|
|
52
|
+
const created = await edit.translate.mutateAsync(locale);
|
|
53
|
+
toast.add({ color: "success", title: t("entry.translationAdded", { locale: locale.toUpperCase() }) });
|
|
54
|
+
await navigateTo(to("collections", props.name, created.id));
|
|
55
|
+
} catch (e) {
|
|
56
|
+
toast.add({ color: "error", title: e.message });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const leaving = ref(null);
|
|
60
|
+
const leaveOpen = computed({ get: () => !!leaving.value, set: (open) => !open && answer(false) });
|
|
61
|
+
function answer(leave) {
|
|
62
|
+
leaving.value?.(leave);
|
|
63
|
+
leaving.value = null;
|
|
64
|
+
}
|
|
65
|
+
const guard = () => !dirty.value || form.state.isSubmitting || new Promise((resolve) => leaving.value = resolve);
|
|
66
|
+
onBeforeRouteLeave(guard);
|
|
67
|
+
onBeforeRouteUpdate(guard);
|
|
68
|
+
const onUnload = (e) => {
|
|
69
|
+
if (dirty.value)
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
};
|
|
72
|
+
onMounted(() => addEventListener("beforeunload", onUnload));
|
|
73
|
+
onBeforeUnmount(() => removeEventListener("beforeunload", onUnload));
|
|
74
|
+
const savedAt = computed(() => edit.recovery.value ? new Date(edit.recovery.value.savedAt).toLocaleString() : "");
|
|
75
|
+
const confirmDelete = ref(false);
|
|
76
|
+
const typeLabel = computed(() => props.kind === "collection" ? type.value?.labels?.plural ?? humanize(props.name) : type.value?.label ?? humanize(props.name));
|
|
77
|
+
const entryTitle = computed(() => {
|
|
78
|
+
const key = props.kind === "collection" ? titleField(type.value) : void 0;
|
|
79
|
+
const value = key && edit.entry.value?.data?.[key];
|
|
80
|
+
return typeof value === "string" ? value.trim() : "";
|
|
81
|
+
});
|
|
82
|
+
const title = computed(() => props.kind === "singleton" ? typeLabel.value : edit.isNew.value ? t("entry.new") : entryTitle.value || t("entry.edit"));
|
|
83
|
+
const breadcrumb = computed(() => props.kind === "collection" ? [{ label: typeLabel.value, to: to("collections", props.name) }, { label: title.value }] : void 0);
|
|
84
|
+
const mayEdit = computed(() => !!type.value && (edit.isNew.value ? type.value.can.create : type.value.can.update));
|
|
85
|
+
const target = computed(() => !type.value || edit.isNew.value || type.value.adapter ? null : { type: props.name, id: props.kind === "singleton" ? props.name : props.id });
|
|
86
|
+
const presence = useAtelierPresence(target, mayEdit);
|
|
87
|
+
provide("atelier-entry", computed(() => type.value ? { type: props.name, locale: edit.locale.value, locales: type.value.localized ? schema.value?.locales.codes ?? [] : [] } : null));
|
|
88
|
+
const aiOn = ai ? ai.enabled() : ref(false);
|
|
89
|
+
const visualEditor = !!useRuntimeConfig().public.atelierEditor;
|
|
90
|
+
function applySeo(value) {
|
|
91
|
+
form.setFieldValue("seo.title", value.title);
|
|
92
|
+
form.setFieldValue("seo.description", value.description);
|
|
93
|
+
}
|
|
94
|
+
const hasSeoFields = computed(() => {
|
|
95
|
+
const seo = type.value?.fields.seo;
|
|
96
|
+
return seo?.type === "object" && !!seo.fields?.title && !!seo.fields?.description;
|
|
97
|
+
});
|
|
98
|
+
const takenBy = ref("");
|
|
99
|
+
watch(presence.lock, (lock, before) => {
|
|
100
|
+
if (before?.mine && lock && !lock.mine) {
|
|
101
|
+
takenBy.value = lock.name;
|
|
102
|
+
void edit.shelve();
|
|
103
|
+
} else if (lock?.mine) {
|
|
104
|
+
takenBy.value = "";
|
|
105
|
+
if (before && !before.mine)
|
|
106
|
+
void edit.reload();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
watch(target, () => takenBy.value = "");
|
|
110
|
+
const templates = useQuery({
|
|
111
|
+
queryKey: computed(() => ["atelier", "templates", props.name]),
|
|
112
|
+
queryFn: () => atelierFetch(`/templates/${encodeURIComponent(props.name)}`),
|
|
113
|
+
enabled: computed(() => props.kind === "collection" && edit.isNew.value && !!type.value?.can.create && !type.value.adapter)
|
|
114
|
+
});
|
|
115
|
+
const template = ref("");
|
|
116
|
+
const templateOptions = computed(() => [{ value: "", label: t("templates.blank") }, ...(templates.data.value ?? []).map((x) => ({ value: x.id, label: x.label }))]);
|
|
117
|
+
watch(template, (id) => edit.startFrom(templates.data.value?.find((x) => x.id === id)?.data ?? null));
|
|
118
|
+
const canSaveTemplate = computed(() => props.kind === "collection" && !edit.isNew.value && !!schema.value?.collections.find((c) => c.name === "atelier-templates")?.can.create);
|
|
119
|
+
const savingTemplate = ref(false);
|
|
120
|
+
const entryName = computed(() => typeof values.value.title === "string" && values.value.title || typeLabel.value);
|
|
121
|
+
const templateName = ref("");
|
|
122
|
+
async function saveTemplate() {
|
|
123
|
+
try {
|
|
124
|
+
await atelierFetch("/collections/atelier-templates", { method: "POST", body: { data: { title: templateName.value || entryName.value, type: props.name, data: values.value } } });
|
|
125
|
+
toast.add({ color: "success", title: t("templates.saved") });
|
|
126
|
+
templateName.value = "";
|
|
127
|
+
} catch (e) {
|
|
128
|
+
toast.add({ color: "error", title: e.message });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const canSave = computed(() => mayEdit.value && !presence.lockedByOther.value);
|
|
132
|
+
const readOnly = (key) => !canSave.value || (type.value?.readOnly.includes(key) ?? false);
|
|
133
|
+
async function save() {
|
|
134
|
+
error.value = "";
|
|
135
|
+
try {
|
|
136
|
+
await edit.submit();
|
|
137
|
+
} catch (e) {
|
|
138
|
+
const failure = e;
|
|
139
|
+
error.value = failure.status === 409 ? t("entry.conflict") : failure.message;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (!form.state.isSubmitSuccessful)
|
|
143
|
+
return;
|
|
144
|
+
toast.add({ color: "success", title: type.value?.versioned ? t("entry.draftSaved") : t("entry.saved") });
|
|
145
|
+
if (edit.isNew.value && edit.save.data.value)
|
|
146
|
+
await navigateTo(to("collections", props.name, edit.save.data.value.id), { replace: true });
|
|
147
|
+
}
|
|
148
|
+
async function run(action) {
|
|
149
|
+
try {
|
|
150
|
+
await edit[action].mutateAsync();
|
|
151
|
+
toast.add({ color: "success", title: action === "publish" ? t("entry.published") : t("entry.unpublished") });
|
|
152
|
+
} catch (e) {
|
|
153
|
+
toast.add({ color: "error", title: action === "publish" ? t("entry.notPublished") : t("entry.notUnpublished"), description: e.message });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
async function remove() {
|
|
157
|
+
try {
|
|
158
|
+
await edit.remove.mutateAsync();
|
|
159
|
+
toast.add({ color: "success", title: t("entry.deleted") });
|
|
160
|
+
await navigateTo(to("collections", props.name));
|
|
161
|
+
} catch (e) {
|
|
162
|
+
toast.add({ color: "error", title: t("common.notDeleted"), description: e.message });
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
</script>
|
|
166
|
+
|
|
167
|
+
<template>
|
|
168
|
+
<NotFound v-if="!type || edit.loadError.value?.status === 404" />
|
|
169
|
+
<NotFound
|
|
170
|
+
v-else-if="edit.loadError.value?.status === 403"
|
|
171
|
+
forbidden
|
|
172
|
+
/>
|
|
173
|
+
<Page
|
|
174
|
+
v-else
|
|
175
|
+
:title="title"
|
|
176
|
+
:breadcrumb="breadcrumb"
|
|
177
|
+
>
|
|
178
|
+
<template #actions>
|
|
179
|
+
<span
|
|
180
|
+
v-if="presence.others.value.length"
|
|
181
|
+
class="app-presence"
|
|
182
|
+
:title="t('collab.viewing', { names: presence.others.value.map((v) => v.name).join(', ') })"
|
|
183
|
+
data-presence
|
|
184
|
+
>
|
|
185
|
+
<CnAvatar
|
|
186
|
+
v-for="viewer in presence.others.value"
|
|
187
|
+
:key="viewer.userId"
|
|
188
|
+
:name="viewer.name"
|
|
189
|
+
size="sm"
|
|
190
|
+
/>
|
|
191
|
+
<span class="sr-only">{{ t("collab.viewing", { names: presence.others.value.map((v) => v.name).join(", ") }) }}</span>
|
|
192
|
+
</span>
|
|
193
|
+
<CnBadge
|
|
194
|
+
v-if="type.versioned && !edit.isNew.value"
|
|
195
|
+
:variant="edit.unpublished.value ? 'warning' : 'success'"
|
|
196
|
+
size="sm"
|
|
197
|
+
>
|
|
198
|
+
{{ edit.entry.value?.publishedVersion === null ? t("status.draft") : edit.unpublished.value ? t("status.unpublishedChanges") : t("status.published") }}
|
|
199
|
+
</CnBadge>
|
|
200
|
+
<CnButton
|
|
201
|
+
v-if="type.versioned && type.can.publish && !edit.isNew.value && edit.unpublished.value"
|
|
202
|
+
variant="secondary"
|
|
203
|
+
:disabled="dirty || presence.lockedByOther.value"
|
|
204
|
+
:loading="edit.publish.isPending.value"
|
|
205
|
+
@click="run('publish')"
|
|
206
|
+
>
|
|
207
|
+
{{ t("entry.publish") }}
|
|
208
|
+
</CnButton>
|
|
209
|
+
<CnButton
|
|
210
|
+
v-if="type.versioned && type.can.publish && edit.entry.value?.publishedVersion"
|
|
211
|
+
variant="ghost"
|
|
212
|
+
:disabled="presence.lockedByOther.value"
|
|
213
|
+
:loading="edit.unpublish.isPending.value"
|
|
214
|
+
@click="run('unpublish')"
|
|
215
|
+
>
|
|
216
|
+
{{ t("entry.unpublish") }}
|
|
217
|
+
</CnButton>
|
|
218
|
+
<NuxtLink
|
|
219
|
+
v-if="visualEditor && type.routable && !edit.isNew.value"
|
|
220
|
+
:to="{ path: to('edit'), query: { type: name, ...kind === 'collection' ? { id } : {} } }"
|
|
221
|
+
class="cn-button cn-button--secondary cn-button--size-md"
|
|
222
|
+
data-visual-editor
|
|
223
|
+
>
|
|
224
|
+
{{ t("editor.open") }}
|
|
225
|
+
</NuxtLink>
|
|
226
|
+
<CnButton
|
|
227
|
+
v-if="canSaveTemplate"
|
|
228
|
+
variant="ghost"
|
|
229
|
+
@click="savingTemplate = true"
|
|
230
|
+
>
|
|
231
|
+
{{ t("templates.save") }}
|
|
232
|
+
</CnButton>
|
|
233
|
+
<CnButton
|
|
234
|
+
v-if="kind === 'collection' && !edit.isNew.value && type.can.delete"
|
|
235
|
+
variant="danger"
|
|
236
|
+
:disabled="presence.lockedByOther.value"
|
|
237
|
+
@click="confirmDelete = true"
|
|
238
|
+
>
|
|
239
|
+
{{ t("common.delete") }}
|
|
240
|
+
</CnButton>
|
|
241
|
+
</template>
|
|
242
|
+
|
|
243
|
+
<nav
|
|
244
|
+
v-if="type.localized && otherLocales.length && !edit.isNew.value && edit.locale.value"
|
|
245
|
+
class="app-row app-translations"
|
|
246
|
+
:aria-label="t('entry.translations')"
|
|
247
|
+
>
|
|
248
|
+
<CnBadge
|
|
249
|
+
variant="primary"
|
|
250
|
+
size="sm"
|
|
251
|
+
>
|
|
252
|
+
{{ t("entry.inLocale", { locale: edit.locale.value.toUpperCase() }) }}
|
|
253
|
+
</CnBadge>
|
|
254
|
+
<template
|
|
255
|
+
v-for="code in otherLocales"
|
|
256
|
+
:key="code"
|
|
257
|
+
>
|
|
258
|
+
<NuxtLink
|
|
259
|
+
v-if="kind === 'singleton'"
|
|
260
|
+
:to="`${to('singletons', name)}?locale=${code}`"
|
|
261
|
+
class="cn-button cn-button--ghost cn-button--size-sm"
|
|
262
|
+
:hreflang="code"
|
|
263
|
+
>
|
|
264
|
+
{{ code.toUpperCase() }}
|
|
265
|
+
</NuxtLink>
|
|
266
|
+
<NuxtLink
|
|
267
|
+
v-else-if="edit.translations.value[code]"
|
|
268
|
+
:to="to('collections', name, edit.translations.value[code])"
|
|
269
|
+
class="cn-button cn-button--ghost cn-button--size-sm"
|
|
270
|
+
:hreflang="code"
|
|
271
|
+
>
|
|
272
|
+
{{ code.toUpperCase() }}
|
|
273
|
+
</NuxtLink>
|
|
274
|
+
<CnButton
|
|
275
|
+
v-else-if="type.can.create"
|
|
276
|
+
variant="ghost"
|
|
277
|
+
size="sm"
|
|
278
|
+
:loading="edit.translate.isPending.value"
|
|
279
|
+
@click="addTranslation(code)"
|
|
280
|
+
>
|
|
281
|
+
{{ t("entry.addTranslation", { locale: code.toUpperCase() }) }}
|
|
282
|
+
</CnButton>
|
|
283
|
+
</template>
|
|
284
|
+
</nav>
|
|
285
|
+
<div
|
|
286
|
+
v-if="edit.loading.value"
|
|
287
|
+
class="app-loading"
|
|
288
|
+
role="status"
|
|
289
|
+
>
|
|
290
|
+
<span class="sr-only">Loading</span>
|
|
291
|
+
</div>
|
|
292
|
+
<form
|
|
293
|
+
v-else
|
|
294
|
+
class="app-form"
|
|
295
|
+
novalidate
|
|
296
|
+
@submit.prevent="save"
|
|
297
|
+
>
|
|
298
|
+
<CnSelect
|
|
299
|
+
v-if="edit.isNew.value && (templates.data.value?.length ?? 0) > 0"
|
|
300
|
+
v-model="template"
|
|
301
|
+
:label="t('templates.startFrom')"
|
|
302
|
+
:options="templateOptions"
|
|
303
|
+
data-template-picker
|
|
304
|
+
/>
|
|
305
|
+
<CnAlert
|
|
306
|
+
v-if="takenBy"
|
|
307
|
+
variant="warning"
|
|
308
|
+
:title="t('collab.takenTitle', { name: takenBy })"
|
|
309
|
+
live
|
|
310
|
+
data-taken-over
|
|
311
|
+
>
|
|
312
|
+
{{ t("collab.taken") }}
|
|
313
|
+
</CnAlert>
|
|
314
|
+
<CnAlert
|
|
315
|
+
v-else-if="presence.lockedByOther.value"
|
|
316
|
+
variant="info"
|
|
317
|
+
:title="t('collab.lockedTitle', { name: presence.lock.value.name })"
|
|
318
|
+
live
|
|
319
|
+
data-locked
|
|
320
|
+
>
|
|
321
|
+
{{ t("collab.locked") }}
|
|
322
|
+
<span
|
|
323
|
+
v-if="type.can.publish"
|
|
324
|
+
class="app-row"
|
|
325
|
+
>
|
|
326
|
+
<CnButton
|
|
327
|
+
size="sm"
|
|
328
|
+
:loading="presence.takingOver.value"
|
|
329
|
+
@click="presence.takeover()"
|
|
330
|
+
>{{ t("collab.takeover") }}</CnButton>
|
|
331
|
+
</span>
|
|
332
|
+
</CnAlert>
|
|
333
|
+
<CnAlert
|
|
334
|
+
v-if="edit.recovery.value"
|
|
335
|
+
variant="warning"
|
|
336
|
+
:title="t('entry.recoveryTitle')"
|
|
337
|
+
data-recovery
|
|
338
|
+
>
|
|
339
|
+
{{ t("entry.recovery", { time: savedAt }) }}
|
|
340
|
+
<span class="app-row">
|
|
341
|
+
<CnButton
|
|
342
|
+
size="sm"
|
|
343
|
+
:disabled="!canSave"
|
|
344
|
+
@click="edit.restoreRecovery()"
|
|
345
|
+
>{{ t("entry.restore") }}</CnButton>
|
|
346
|
+
<CnButton
|
|
347
|
+
size="sm"
|
|
348
|
+
variant="ghost"
|
|
349
|
+
@click="edit.discardRecovery()"
|
|
350
|
+
>{{ t("entry.discard") }}</CnButton>
|
|
351
|
+
</span>
|
|
352
|
+
</CnAlert>
|
|
353
|
+
<FieldInput
|
|
354
|
+
v-for="(field, key) in type.fields"
|
|
355
|
+
:key="key"
|
|
356
|
+
:form="form"
|
|
357
|
+
:name="String(key)"
|
|
358
|
+
:field="field"
|
|
359
|
+
:root="values"
|
|
360
|
+
:sibling="values"
|
|
361
|
+
:read-only="readOnly(String(key))"
|
|
362
|
+
/>
|
|
363
|
+
<component
|
|
364
|
+
:is="ai.Seo"
|
|
365
|
+
v-if="ai && aiOn && hasSeoFields && !edit.isNew.value && canSave"
|
|
366
|
+
:id="kind === 'collection' ? id : void 0"
|
|
367
|
+
:type="name"
|
|
368
|
+
:locale="edit.locale.value"
|
|
369
|
+
@apply="applySeo"
|
|
370
|
+
/>
|
|
371
|
+
<SeoPanel
|
|
372
|
+
v-if="kind === 'collection' && type.routable && !type.adapter"
|
|
373
|
+
:input="{ collection: name, id, data: values, path: edit.entry.value?.path, media: edit.entry.value?.media, locale: edit.locale.value }"
|
|
374
|
+
/>
|
|
375
|
+
<CnAlert
|
|
376
|
+
v-if="error"
|
|
377
|
+
variant="danger"
|
|
378
|
+
live
|
|
379
|
+
>
|
|
380
|
+
{{ error }}
|
|
381
|
+
</CnAlert>
|
|
382
|
+
<div
|
|
383
|
+
v-if="canSave"
|
|
384
|
+
class="app-form__actions"
|
|
385
|
+
>
|
|
386
|
+
<CnButton
|
|
387
|
+
type="submit"
|
|
388
|
+
:loading="submitting"
|
|
389
|
+
>
|
|
390
|
+
{{ type.versioned ? t("entry.saveDraft") : t("common.save") }}
|
|
391
|
+
</CnButton>
|
|
392
|
+
</div>
|
|
393
|
+
</form>
|
|
394
|
+
<FormSubmissions
|
|
395
|
+
v-if="kind === 'collection' && name === 'atelier-forms' && id && !edit.isNew.value && manages('forms')"
|
|
396
|
+
:id="id"
|
|
397
|
+
/>
|
|
398
|
+
<SharedBlockUsage
|
|
399
|
+
v-if="kind === 'collection' && name === 'atelier-shared-blocks' && id && !edit.isNew.value"
|
|
400
|
+
:id="id"
|
|
401
|
+
:can-delete="!!type.can.delete"
|
|
402
|
+
/>
|
|
403
|
+
<ScheduleSection
|
|
404
|
+
v-if="type.versioned && type.can.publish && !edit.isNew.value && !edit.loading.value"
|
|
405
|
+
:url="edit.url.value"
|
|
406
|
+
:query="edit.localeQuery.value"
|
|
407
|
+
:version="edit.entry.value?.version ?? null"
|
|
408
|
+
:dirty="dirty"
|
|
409
|
+
/>
|
|
410
|
+
<RevisionHistory
|
|
411
|
+
v-if="!edit.isNew.value && !edit.loading.value && type.can.update && type.revisions !== false"
|
|
412
|
+
:url="edit.url.value"
|
|
413
|
+
:query="edit.localeQuery.value"
|
|
414
|
+
:version="edit.entry.value?.version ?? null"
|
|
415
|
+
:can-restore="canSave && !dirty && !type.adapter"
|
|
416
|
+
@restored="edit.reload()"
|
|
417
|
+
/>
|
|
418
|
+
<CommentsPanel
|
|
419
|
+
v-if="target && !edit.loading.value"
|
|
420
|
+
:id="target.id"
|
|
421
|
+
:type="target.type"
|
|
422
|
+
:data="values"
|
|
423
|
+
:can-comment="!!type.can.comment"
|
|
424
|
+
/>
|
|
425
|
+
|
|
426
|
+
<CnDialog
|
|
427
|
+
v-model:open="leaveOpen"
|
|
428
|
+
:title="t('entry.leaveTitle')"
|
|
429
|
+
:description="t('entry.leaveBody')"
|
|
430
|
+
:confirm-label="t('entry.leave')"
|
|
431
|
+
:cancel-label="t('entry.stay')"
|
|
432
|
+
variant="destructive"
|
|
433
|
+
@confirm="answer(true)"
|
|
434
|
+
/>
|
|
435
|
+
<CnDialog
|
|
436
|
+
v-model:open="savingTemplate"
|
|
437
|
+
:title="t('templates.saveTitle')"
|
|
438
|
+
:description="t('templates.saveBody')"
|
|
439
|
+
:confirm-label="t('templates.save')"
|
|
440
|
+
@confirm="saveTemplate"
|
|
441
|
+
>
|
|
442
|
+
<CnInput
|
|
443
|
+
v-model="templateName"
|
|
444
|
+
:label="t('templates.name')"
|
|
445
|
+
:placeholder="entryName"
|
|
446
|
+
/>
|
|
447
|
+
</CnDialog>
|
|
448
|
+
<CnDialog
|
|
449
|
+
v-model:open="confirmDelete"
|
|
450
|
+
:title="t('entry.deleteTitle')"
|
|
451
|
+
:confirm-label="t('common.delete')"
|
|
452
|
+
variant="destructive"
|
|
453
|
+
:description="t('entry.deleteBody')"
|
|
454
|
+
@confirm="remove"
|
|
455
|
+
/>
|
|
456
|
+
</Page>
|
|
457
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
kind: 'collection' | 'singleton';
|
|
3
|
+
name: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
locale?: string;
|
|
6
|
+
};
|
|
7
|
+
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>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Field } from '../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
form: any;
|
|
4
|
+
name: string;
|
|
5
|
+
field: Field;
|
|
6
|
+
/** The whole entry's values and this field's siblings, for `when` conditions. */
|
|
7
|
+
root: Record<string, unknown>;
|
|
8
|
+
sibling: Record<string, unknown>;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
};
|
|
11
|
+
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>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|