@xleddyl/nuxt-cms 0.4.4 → 0.5.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/README.md +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +22 -7
- package/dist/runtime/app/components/cms/BlockOutline.vue +56 -67
- package/dist/runtime/app/components/cms/BlockPalette.vue +3 -1
- package/dist/runtime/app/components/cms/BlocksField.vue +155 -149
- package/dist/runtime/app/components/cms/BrandMark.d.vue.ts +3 -1
- package/dist/runtime/app/components/cms/BrandMark.vue +24 -25
- package/dist/runtime/app/components/cms/BrandMark.vue.d.ts +3 -1
- package/dist/runtime/app/components/cms/{Checkbox.d.vue.ts → ConfirmGroups.d.vue.ts} +4 -4
- package/dist/runtime/app/components/cms/ConfirmGroups.vue +22 -0
- package/dist/runtime/app/components/cms/{Checkbox.vue.d.ts → ConfirmGroups.vue.d.ts} +4 -4
- package/dist/runtime/app/components/cms/EntryDrawer.d.vue.ts +2 -2
- package/dist/runtime/app/components/cms/EntryDrawer.vue +62 -47
- package/dist/runtime/app/components/cms/EntryDrawer.vue.d.ts +2 -2
- package/dist/runtime/app/components/cms/EntryForm.vue +100 -95
- package/dist/runtime/app/components/cms/FieldInput.vue +56 -32
- package/dist/runtime/app/components/cms/ImportModal.d.vue.ts +2 -2
- package/dist/runtime/app/components/cms/ImportModal.vue +80 -79
- package/dist/runtime/app/components/cms/ImportModal.vue.d.ts +2 -2
- package/dist/runtime/app/components/cms/JsonField.vue +17 -8
- package/dist/runtime/app/components/cms/ListFilters.vue +54 -63
- package/dist/runtime/app/components/cms/LocaleSwitch.vue +21 -18
- package/dist/runtime/app/components/cms/MediaDetail.vue +110 -72
- package/dist/runtime/app/components/cms/MediaField.vue +37 -29
- package/dist/runtime/app/components/cms/MediaFolderPicker.d.vue.ts +1 -0
- package/dist/runtime/app/components/cms/MediaFolderPicker.vue +77 -49
- package/dist/runtime/app/components/cms/MediaFolderPicker.vue.d.ts +1 -0
- package/dist/runtime/app/components/cms/MediaGallery.vue +300 -323
- package/dist/runtime/app/components/cms/MediaThumb.vue +7 -2
- package/dist/runtime/app/components/cms/MediaUpload.vue +37 -70
- package/dist/runtime/app/components/cms/RelationField.vue +23 -71
- package/dist/runtime/app/components/cms/RichTextField.vue +23 -177
- package/dist/runtime/app/components/cms/SettingsAccount.vue +96 -104
- package/dist/runtime/app/components/cms/SettingsColumns.vue +7 -6
- package/dist/runtime/app/components/cms/SettingsEntry.d.vue.ts +10 -1
- package/dist/runtime/app/components/cms/SettingsEntry.vue +35 -52
- package/dist/runtime/app/components/cms/SettingsEntry.vue.d.ts +10 -1
- package/dist/runtime/app/components/cms/SettingsLayout.vue +7 -4
- package/dist/runtime/app/components/cms/SettingsModal.d.vue.ts +0 -4
- package/dist/runtime/app/components/cms/SettingsModal.vue +102 -151
- package/dist/runtime/app/components/cms/SettingsModal.vue.d.ts +0 -4
- package/dist/runtime/app/components/cms/SettingsUsers.d.vue.ts +8 -1
- package/dist/runtime/app/components/cms/SettingsUsers.vue +182 -189
- package/dist/runtime/app/components/cms/SettingsUsers.vue.d.ts +8 -1
- package/dist/runtime/app/components/cms/SlugField.vue +9 -6
- package/dist/runtime/app/components/cms/StatusBadge.vue +7 -6
- package/dist/runtime/app/components/cms/TranslatableField.vue +11 -6
- package/dist/runtime/app/components/cms/VisualEditor.vue +243 -282
- package/dist/runtime/app/components/cms/WelcomeModal.vue +49 -41
- package/dist/runtime/app/composables/cms-confirm.d.ts +0 -6
- package/dist/runtime/app/composables/cms-confirm.js +13 -13
- package/dist/runtime/app/composables/cms-media-uploader.d.ts +4 -0
- package/dist/runtime/app/composables/cms-media-uploader.js +12 -40
- package/dist/runtime/app/composables/cms-theme.d.ts +3 -9
- package/dist/runtime/app/composables/cms-theme.js +1 -19
- package/dist/runtime/app/composables/cms-toast.d.ts +3 -4
- package/dist/runtime/app/composables/cms-toast.js +6 -13
- package/dist/runtime/app/layouts/cms-admin.d.vue.ts +2 -2
- package/dist/runtime/app/layouts/cms-admin.vue +184 -113
- package/dist/runtime/app/layouts/cms-admin.vue.d.ts +2 -2
- package/dist/runtime/app/layouts/cms-editor.d.vue.ts +2 -2
- package/dist/runtime/app/layouts/cms-editor.vue +9 -4
- package/dist/runtime/app/layouts/cms-editor.vue.d.ts +2 -2
- package/dist/runtime/app/pages/admin-collection.vue +178 -143
- package/dist/runtime/app/pages/admin-content.vue +35 -30
- package/dist/runtime/app/pages/admin-entry.vue +14 -9
- package/dist/runtime/app/pages/admin-login.vue +57 -54
- package/dist/runtime/app/pages/admin-media.vue +6 -4
- package/dist/runtime/app/pages/admin-preview.vue +3 -2
- package/dist/runtime/app/preview/PreviewOverlay.vue +9 -7
- package/dist/runtime/app/utils/ui.d.ts +1 -3
- package/dist/runtime/app/utils/ui.js +4 -2
- package/dist/runtime/assets/editor.css +1 -0
- package/dist/runtime/assets/main.css +1 -1
- package/dist/runtime/assets/media.css +1 -0
- package/dist/runtime/assets/shell.css +1 -0
- package/package.json +9 -8
- package/dist/runtime/app/components/cms/Alert.d.vue.ts +0 -17
- package/dist/runtime/app/components/cms/Alert.vue +0 -13
- package/dist/runtime/app/components/cms/Alert.vue.d.ts +0 -17
- package/dist/runtime/app/components/cms/Button.d.vue.ts +0 -26
- package/dist/runtime/app/components/cms/Button.vue +0 -48
- package/dist/runtime/app/components/cms/Button.vue.d.ts +0 -26
- package/dist/runtime/app/components/cms/Checkbox.vue +0 -21
- package/dist/runtime/app/components/cms/ConfirmModal.d.vue.ts +0 -3
- package/dist/runtime/app/components/cms/ConfirmModal.vue +0 -46
- package/dist/runtime/app/components/cms/ConfirmModal.vue.d.ts +0 -3
- package/dist/runtime/app/components/cms/Drawer.d.vue.ts +0 -30
- package/dist/runtime/app/components/cms/Drawer.vue +0 -61
- package/dist/runtime/app/components/cms/Drawer.vue.d.ts +0 -30
- package/dist/runtime/app/components/cms/DropdownMenu.d.vue.ts +0 -26
- package/dist/runtime/app/components/cms/DropdownMenu.vue +0 -48
- package/dist/runtime/app/components/cms/DropdownMenu.vue.d.ts +0 -26
- package/dist/runtime/app/components/cms/EmptyState.d.vue.ts +0 -19
- package/dist/runtime/app/components/cms/EmptyState.vue +0 -21
- package/dist/runtime/app/components/cms/EmptyState.vue.d.ts +0 -19
- package/dist/runtime/app/components/cms/Form.d.vue.ts +0 -37
- package/dist/runtime/app/components/cms/Form.vue +0 -63
- package/dist/runtime/app/components/cms/Form.vue.d.ts +0 -37
- package/dist/runtime/app/components/cms/FormField.d.vue.ts +0 -22
- package/dist/runtime/app/components/cms/FormField.vue +0 -35
- package/dist/runtime/app/components/cms/FormField.vue.d.ts +0 -22
- package/dist/runtime/app/components/cms/Icon.d.vue.ts +0 -6
- package/dist/runtime/app/components/cms/Icon.vue +0 -23
- package/dist/runtime/app/components/cms/Icon.vue.d.ts +0 -6
- package/dist/runtime/app/components/cms/Input.d.vue.ts +0 -27
- package/dist/runtime/app/components/cms/Input.vue +0 -46
- package/dist/runtime/app/components/cms/Input.vue.d.ts +0 -27
- package/dist/runtime/app/components/cms/Modal.d.vue.ts +0 -31
- package/dist/runtime/app/components/cms/Modal.vue +0 -49
- package/dist/runtime/app/components/cms/Modal.vue.d.ts +0 -31
- package/dist/runtime/app/components/cms/PageHeader.d.vue.ts +0 -25
- package/dist/runtime/app/components/cms/PageHeader.vue +0 -36
- package/dist/runtime/app/components/cms/PageHeader.vue.d.ts +0 -25
- package/dist/runtime/app/components/cms/Pagination.d.vue.ts +0 -15
- package/dist/runtime/app/components/cms/Pagination.vue +0 -51
- package/dist/runtime/app/components/cms/Pagination.vue.d.ts +0 -15
- package/dist/runtime/app/components/cms/PasswordInput.d.vue.ts +0 -17
- package/dist/runtime/app/components/cms/PasswordInput.vue +0 -81
- package/dist/runtime/app/components/cms/PasswordInput.vue.d.ts +0 -17
- package/dist/runtime/app/components/cms/Popover.d.vue.ts +0 -22
- package/dist/runtime/app/components/cms/Popover.vue +0 -27
- package/dist/runtime/app/components/cms/Popover.vue.d.ts +0 -22
- package/dist/runtime/app/components/cms/Search.d.vue.ts +0 -7
- package/dist/runtime/app/components/cms/Search.vue +0 -347
- package/dist/runtime/app/components/cms/Search.vue.d.ts +0 -7
- package/dist/runtime/app/components/cms/SelectMenu.d.vue.ts +0 -25
- package/dist/runtime/app/components/cms/SelectMenu.vue +0 -152
- package/dist/runtime/app/components/cms/SelectMenu.vue.d.ts +0 -25
- package/dist/runtime/app/components/cms/Spinner.d.vue.ts +0 -3
- package/dist/runtime/app/components/cms/Spinner.vue +0 -5
- package/dist/runtime/app/components/cms/Spinner.vue.d.ts +0 -3
- package/dist/runtime/app/components/cms/Switch.d.vue.ts +0 -10
- package/dist/runtime/app/components/cms/Switch.vue +0 -14
- package/dist/runtime/app/components/cms/Switch.vue.d.ts +0 -10
- package/dist/runtime/app/components/cms/Table.d.vue.ts +0 -51
- package/dist/runtime/app/components/cms/Table.vue +0 -115
- package/dist/runtime/app/components/cms/Table.vue.d.ts +0 -51
- package/dist/runtime/app/components/cms/Textarea.d.vue.ts +0 -15
- package/dist/runtime/app/components/cms/Textarea.vue +0 -16
- package/dist/runtime/app/components/cms/Textarea.vue.d.ts +0 -15
- package/dist/runtime/app/components/cms/Toaster.d.vue.ts +0 -3
- package/dist/runtime/app/components/cms/Toaster.vue +0 -48
- package/dist/runtime/app/components/cms/Toaster.vue.d.ts +0 -3
- package/dist/runtime/app/composables/cms-overlay.d.ts +0 -4
- package/dist/runtime/app/composables/cms-overlay.js +0 -23
- package/dist/runtime/assets/svg/academic-cap.svg +0 -3
- package/dist/runtime/assets/svg/adjustments-horizontal.svg +0 -3
- package/dist/runtime/assets/svg/adjustments-vertical.svg +0 -3
- package/dist/runtime/assets/svg/archive-box-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/archive-box-x-mark.svg +0 -3
- package/dist/runtime/assets/svg/archive-box.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-on-square-stack.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-on-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down-tray.svg +0 -3
- package/dist/runtime/assets/svg/arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-end-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left-start-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-long-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-path-rounded-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-path.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-end-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right-start-on-rectangle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-small-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-top-right-on-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-trending-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-trending-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-down-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-down-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-left-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-left-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-right-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-right-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-up-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-turn-up-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-circle.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-on-square-stack.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-on-square.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up-tray.svg +0 -3
- package/dist/runtime/assets/svg/arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-down.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-left.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-right.svg +0 -3
- package/dist/runtime/assets/svg/arrow-uturn-up.svg +0 -3
- package/dist/runtime/assets/svg/arrows-pointing-in.svg +0 -3
- package/dist/runtime/assets/svg/arrows-pointing-out.svg +0 -3
- package/dist/runtime/assets/svg/arrows-right-left.svg +0 -3
- package/dist/runtime/assets/svg/arrows-up-down.svg +0 -3
- package/dist/runtime/assets/svg/at-symbol.svg +0 -3
- package/dist/runtime/assets/svg/backspace.svg +0 -3
- package/dist/runtime/assets/svg/backward.svg +0 -3
- package/dist/runtime/assets/svg/banknotes.svg +0 -3
- package/dist/runtime/assets/svg/bars-2.svg +0 -3
- package/dist/runtime/assets/svg/bars-3-bottom-left.svg +0 -3
- package/dist/runtime/assets/svg/bars-3-bottom-right.svg +0 -3
- package/dist/runtime/assets/svg/bars-3-center-left.svg +0 -3
- package/dist/runtime/assets/svg/bars-3.svg +0 -3
- package/dist/runtime/assets/svg/bars-4.svg +0 -3
- package/dist/runtime/assets/svg/bars-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/bars-arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/battery-0.svg +0 -3
- package/dist/runtime/assets/svg/battery-100.svg +0 -3
- package/dist/runtime/assets/svg/battery-50.svg +0 -3
- package/dist/runtime/assets/svg/beaker.svg +0 -3
- package/dist/runtime/assets/svg/bell-alert.svg +0 -3
- package/dist/runtime/assets/svg/bell-slash.svg +0 -3
- package/dist/runtime/assets/svg/bell-snooze.svg +0 -3
- package/dist/runtime/assets/svg/bell.svg +0 -3
- package/dist/runtime/assets/svg/bold.svg +0 -3
- package/dist/runtime/assets/svg/bolt-slash.svg +0 -3
- package/dist/runtime/assets/svg/bolt.svg +0 -3
- package/dist/runtime/assets/svg/book-open.svg +0 -3
- package/dist/runtime/assets/svg/bookmark-slash.svg +0 -3
- package/dist/runtime/assets/svg/bookmark-square.svg +0 -3
- package/dist/runtime/assets/svg/bookmark.svg +0 -3
- package/dist/runtime/assets/svg/briefcase.svg +0 -3
- package/dist/runtime/assets/svg/bug-ant.svg +0 -3
- package/dist/runtime/assets/svg/building-library.svg +0 -3
- package/dist/runtime/assets/svg/building-office-2.svg +0 -3
- package/dist/runtime/assets/svg/building-office.svg +0 -3
- package/dist/runtime/assets/svg/building-storefront.svg +0 -3
- package/dist/runtime/assets/svg/cake.svg +0 -3
- package/dist/runtime/assets/svg/calculator.svg +0 -3
- package/dist/runtime/assets/svg/calendar-date-range.svg +0 -3
- package/dist/runtime/assets/svg/calendar-days.svg +0 -3
- package/dist/runtime/assets/svg/calendar.svg +0 -3
- package/dist/runtime/assets/svg/camera.svg +0 -4
- package/dist/runtime/assets/svg/chart-bar-square.svg +0 -3
- package/dist/runtime/assets/svg/chart-bar.svg +0 -3
- package/dist/runtime/assets/svg/chart-pie.svg +0 -4
- package/dist/runtime/assets/svg/chat-bubble-bottom-center-text.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-bottom-center.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-left-ellipsis.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-left-right.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-left.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-oval-left-ellipsis.svg +0 -3
- package/dist/runtime/assets/svg/chat-bubble-oval-left.svg +0 -3
- package/dist/runtime/assets/svg/check-badge.svg +0 -3
- package/dist/runtime/assets/svg/check-circle.svg +0 -3
- package/dist/runtime/assets/svg/check.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-down.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-left.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-right.svg +0 -3
- package/dist/runtime/assets/svg/chevron-double-up.svg +0 -4
- package/dist/runtime/assets/svg/chevron-down.svg +0 -3
- package/dist/runtime/assets/svg/chevron-left.svg +0 -3
- package/dist/runtime/assets/svg/chevron-right.svg +0 -3
- package/dist/runtime/assets/svg/chevron-up-down.svg +0 -3
- package/dist/runtime/assets/svg/chevron-up.svg +0 -3
- package/dist/runtime/assets/svg/circle-stack.svg +0 -3
- package/dist/runtime/assets/svg/clipboard-document-check.svg +0 -3
- package/dist/runtime/assets/svg/clipboard-document-list.svg +0 -3
- package/dist/runtime/assets/svg/clipboard-document.svg +0 -3
- package/dist/runtime/assets/svg/clipboard.svg +0 -3
- package/dist/runtime/assets/svg/clock.svg +0 -3
- package/dist/runtime/assets/svg/cloud-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/cloud-arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/cloud.svg +0 -3
- package/dist/runtime/assets/svg/code-bracket-square.svg +0 -3
- package/dist/runtime/assets/svg/code-bracket.svg +0 -3
- package/dist/runtime/assets/svg/cog-6-tooth.svg +0 -4
- package/dist/runtime/assets/svg/cog-8-tooth.svg +0 -4
- package/dist/runtime/assets/svg/cog.svg +0 -3
- package/dist/runtime/assets/svg/command-line.svg +0 -3
- package/dist/runtime/assets/svg/computer-desktop.svg +0 -3
- package/dist/runtime/assets/svg/cpu-chip.svg +0 -3
- package/dist/runtime/assets/svg/credit-card.svg +0 -3
- package/dist/runtime/assets/svg/cube-transparent.svg +0 -3
- package/dist/runtime/assets/svg/cube.svg +0 -3
- package/dist/runtime/assets/svg/currency-bangladeshi.svg +0 -3
- package/dist/runtime/assets/svg/currency-dollar.svg +0 -3
- package/dist/runtime/assets/svg/currency-euro.svg +0 -3
- package/dist/runtime/assets/svg/currency-pound.svg +0 -3
- package/dist/runtime/assets/svg/currency-rupee.svg +0 -3
- package/dist/runtime/assets/svg/currency-yen.svg +0 -3
- package/dist/runtime/assets/svg/cursor-arrow-rays.svg +0 -3
- package/dist/runtime/assets/svg/cursor-arrow-ripple.svg +0 -3
- package/dist/runtime/assets/svg/device-phone-mobile.svg +0 -3
- package/dist/runtime/assets/svg/device-tablet.svg +0 -3
- package/dist/runtime/assets/svg/divide.svg +0 -3
- package/dist/runtime/assets/svg/document-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/document-arrow-up.svg +0 -3
- package/dist/runtime/assets/svg/document-chart-bar.svg +0 -3
- package/dist/runtime/assets/svg/document-check.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-bangladeshi.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-dollar.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-euro.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-pound.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-rupee.svg +0 -3
- package/dist/runtime/assets/svg/document-currency-yen.svg +0 -3
- package/dist/runtime/assets/svg/document-duplicate.svg +0 -3
- package/dist/runtime/assets/svg/document-magnifying-glass.svg +0 -3
- package/dist/runtime/assets/svg/document-minus.svg +0 -3
- package/dist/runtime/assets/svg/document-plus.svg +0 -3
- package/dist/runtime/assets/svg/document-text.svg +0 -3
- package/dist/runtime/assets/svg/document.svg +0 -3
- package/dist/runtime/assets/svg/ellipsis-horizontal-circle.svg +0 -3
- package/dist/runtime/assets/svg/ellipsis-horizontal.svg +0 -3
- package/dist/runtime/assets/svg/ellipsis-vertical.svg +0 -3
- package/dist/runtime/assets/svg/envelope-open.svg +0 -3
- package/dist/runtime/assets/svg/envelope.svg +0 -3
- package/dist/runtime/assets/svg/equals.svg +0 -3
- package/dist/runtime/assets/svg/exclamation-circle.svg +0 -3
- package/dist/runtime/assets/svg/exclamation-triangle.svg +0 -3
- package/dist/runtime/assets/svg/eye-dropper.svg +0 -3
- package/dist/runtime/assets/svg/eye-slash.svg +0 -3
- package/dist/runtime/assets/svg/eye.svg +0 -4
- package/dist/runtime/assets/svg/face-frown.svg +0 -3
- package/dist/runtime/assets/svg/face-smile.svg +0 -3
- package/dist/runtime/assets/svg/film.svg +0 -3
- package/dist/runtime/assets/svg/finger-print.svg +0 -3
- package/dist/runtime/assets/svg/fire.svg +0 -4
- package/dist/runtime/assets/svg/flag.svg +0 -3
- package/dist/runtime/assets/svg/folder-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/folder-minus.svg +0 -3
- package/dist/runtime/assets/svg/folder-open.svg +0 -3
- package/dist/runtime/assets/svg/folder-plus.svg +0 -3
- package/dist/runtime/assets/svg/folder.svg +0 -3
- package/dist/runtime/assets/svg/forward.svg +0 -3
- package/dist/runtime/assets/svg/funnel.svg +0 -3
- package/dist/runtime/assets/svg/gif.svg +0 -3
- package/dist/runtime/assets/svg/gift-top.svg +0 -3
- package/dist/runtime/assets/svg/gift.svg +0 -3
- package/dist/runtime/assets/svg/globe-alt.svg +0 -3
- package/dist/runtime/assets/svg/globe-americas.svg +0 -3
- package/dist/runtime/assets/svg/globe-asia-australia.svg +0 -3
- package/dist/runtime/assets/svg/globe-europe-africa.svg +0 -3
- package/dist/runtime/assets/svg/h1.svg +0 -3
- package/dist/runtime/assets/svg/h2.svg +0 -3
- package/dist/runtime/assets/svg/h3.svg +0 -3
- package/dist/runtime/assets/svg/hand-raised.svg +0 -3
- package/dist/runtime/assets/svg/hand-thumb-down.svg +0 -3
- package/dist/runtime/assets/svg/hand-thumb-up.svg +0 -3
- package/dist/runtime/assets/svg/hashtag.svg +0 -3
- package/dist/runtime/assets/svg/heart.svg +0 -3
- package/dist/runtime/assets/svg/home-modern.svg +0 -3
- package/dist/runtime/assets/svg/home.svg +0 -3
- package/dist/runtime/assets/svg/identification.svg +0 -3
- package/dist/runtime/assets/svg/inbox-arrow-down.svg +0 -3
- package/dist/runtime/assets/svg/inbox-stack.svg +0 -3
- package/dist/runtime/assets/svg/inbox.svg +0 -3
- package/dist/runtime/assets/svg/information-circle.svg +0 -3
- package/dist/runtime/assets/svg/italic.svg +0 -3
- package/dist/runtime/assets/svg/key.svg +0 -3
- package/dist/runtime/assets/svg/language.svg +0 -3
- package/dist/runtime/assets/svg/lifebuoy.svg +0 -3
- package/dist/runtime/assets/svg/light-bulb.svg +0 -3
- package/dist/runtime/assets/svg/link-slash.svg +0 -3
- package/dist/runtime/assets/svg/link.svg +0 -3
- package/dist/runtime/assets/svg/list-bullet.svg +0 -3
- package/dist/runtime/assets/svg/lock-closed.svg +0 -3
- package/dist/runtime/assets/svg/lock-open.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass-circle.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass-minus.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass-plus.svg +0 -3
- package/dist/runtime/assets/svg/magnifying-glass.svg +0 -3
- package/dist/runtime/assets/svg/map-pin.svg +0 -4
- package/dist/runtime/assets/svg/map.svg +0 -3
- package/dist/runtime/assets/svg/megaphone.svg +0 -3
- package/dist/runtime/assets/svg/microphone.svg +0 -3
- package/dist/runtime/assets/svg/minus-circle.svg +0 -3
- package/dist/runtime/assets/svg/minus-small.svg +0 -3
- package/dist/runtime/assets/svg/minus.svg +0 -3
- package/dist/runtime/assets/svg/moon.svg +0 -3
- package/dist/runtime/assets/svg/musical-note.svg +0 -3
- package/dist/runtime/assets/svg/newspaper.svg +0 -3
- package/dist/runtime/assets/svg/no-symbol.svg +0 -3
- package/dist/runtime/assets/svg/numbered-list.svg +0 -3
- package/dist/runtime/assets/svg/paint-brush.svg +0 -3
- package/dist/runtime/assets/svg/paper-airplane.svg +0 -3
- package/dist/runtime/assets/svg/paper-clip.svg +0 -3
- package/dist/runtime/assets/svg/pause-circle.svg +0 -3
- package/dist/runtime/assets/svg/pause.svg +0 -3
- package/dist/runtime/assets/svg/pencil-square.svg +0 -3
- package/dist/runtime/assets/svg/pencil.svg +0 -3
- package/dist/runtime/assets/svg/percent-badge.svg +0 -3
- package/dist/runtime/assets/svg/phone-arrow-down-left.svg +0 -3
- package/dist/runtime/assets/svg/phone-arrow-up-right.svg +0 -3
- package/dist/runtime/assets/svg/phone-x-mark.svg +0 -3
- package/dist/runtime/assets/svg/phone.svg +0 -3
- package/dist/runtime/assets/svg/photo.svg +0 -3
- package/dist/runtime/assets/svg/play-circle.svg +0 -4
- package/dist/runtime/assets/svg/play-pause.svg +0 -3
- package/dist/runtime/assets/svg/play.svg +0 -3
- package/dist/runtime/assets/svg/plus-circle.svg +0 -3
- package/dist/runtime/assets/svg/plus-small.svg +0 -3
- package/dist/runtime/assets/svg/plus.svg +0 -3
- package/dist/runtime/assets/svg/power.svg +0 -3
- package/dist/runtime/assets/svg/presentation-chart-bar.svg +0 -3
- package/dist/runtime/assets/svg/presentation-chart-line.svg +0 -3
- package/dist/runtime/assets/svg/printer.svg +0 -3
- package/dist/runtime/assets/svg/puzzle-piece.svg +0 -3
- package/dist/runtime/assets/svg/qr-code.svg +0 -4
- package/dist/runtime/assets/svg/question-mark-circle.svg +0 -3
- package/dist/runtime/assets/svg/queue-list.svg +0 -3
- package/dist/runtime/assets/svg/radio.svg +0 -3
- package/dist/runtime/assets/svg/receipt-percent.svg +0 -3
- package/dist/runtime/assets/svg/receipt-refund.svg +0 -3
- package/dist/runtime/assets/svg/rectangle-group.svg +0 -3
- package/dist/runtime/assets/svg/rectangle-stack.svg +0 -3
- package/dist/runtime/assets/svg/rocket-launch.svg +0 -3
- package/dist/runtime/assets/svg/rss.svg +0 -3
- package/dist/runtime/assets/svg/scale.svg +0 -3
- package/dist/runtime/assets/svg/scissors.svg +0 -3
- package/dist/runtime/assets/svg/server-stack.svg +0 -3
- package/dist/runtime/assets/svg/server.svg +0 -3
- package/dist/runtime/assets/svg/share.svg +0 -3
- package/dist/runtime/assets/svg/shield-check.svg +0 -3
- package/dist/runtime/assets/svg/shield-exclamation.svg +0 -3
- package/dist/runtime/assets/svg/shopping-bag.svg +0 -3
- package/dist/runtime/assets/svg/shopping-cart.svg +0 -3
- package/dist/runtime/assets/svg/signal-slash.svg +0 -3
- package/dist/runtime/assets/svg/signal.svg +0 -3
- package/dist/runtime/assets/svg/slash.svg +0 -3
- package/dist/runtime/assets/svg/sparkles.svg +0 -3
- package/dist/runtime/assets/svg/speaker-wave.svg +0 -3
- package/dist/runtime/assets/svg/speaker-x-mark.svg +0 -3
- package/dist/runtime/assets/svg/square-2-stack.svg +0 -3
- package/dist/runtime/assets/svg/square-3-stack-3d.svg +0 -3
- package/dist/runtime/assets/svg/squares-2x2.svg +0 -3
- package/dist/runtime/assets/svg/squares-plus.svg +0 -3
- package/dist/runtime/assets/svg/star.svg +0 -3
- package/dist/runtime/assets/svg/stop-circle.svg +0 -4
- package/dist/runtime/assets/svg/stop.svg +0 -3
- package/dist/runtime/assets/svg/strikethrough.svg +0 -3
- package/dist/runtime/assets/svg/sun.svg +0 -3
- package/dist/runtime/assets/svg/swatch.svg +0 -3
- package/dist/runtime/assets/svg/table-cells.svg +0 -3
- package/dist/runtime/assets/svg/tag.svg +0 -4
- package/dist/runtime/assets/svg/ticket.svg +0 -3
- package/dist/runtime/assets/svg/trash.svg +0 -3
- package/dist/runtime/assets/svg/trophy.svg +0 -3
- package/dist/runtime/assets/svg/truck.svg +0 -3
- package/dist/runtime/assets/svg/tv.svg +0 -3
- package/dist/runtime/assets/svg/underline.svg +0 -3
- package/dist/runtime/assets/svg/user-circle.svg +0 -3
- package/dist/runtime/assets/svg/user-group.svg +0 -3
- package/dist/runtime/assets/svg/user-minus.svg +0 -3
- package/dist/runtime/assets/svg/user-plus.svg +0 -3
- package/dist/runtime/assets/svg/user.svg +0 -3
- package/dist/runtime/assets/svg/users.svg +0 -3
- package/dist/runtime/assets/svg/variable.svg +0 -3
- package/dist/runtime/assets/svg/video-camera-slash.svg +0 -3
- package/dist/runtime/assets/svg/video-camera.svg +0 -3
- package/dist/runtime/assets/svg/view-columns.svg +0 -3
- package/dist/runtime/assets/svg/viewfinder-circle.svg +0 -3
- package/dist/runtime/assets/svg/wallet.svg +0 -3
- package/dist/runtime/assets/svg/wifi.svg +0 -3
- package/dist/runtime/assets/svg/window.svg +0 -3
- package/dist/runtime/assets/svg/wrench-screwdriver.svg +0 -3
- package/dist/runtime/assets/svg/wrench.svg +0 -4
- package/dist/runtime/assets/svg/x-circle.svg +0 -3
- package/dist/runtime/assets/svg/x-mark.svg +0 -3
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cms-page" :class="{ 'is-fill': isCollectionKind(config) && !error }">
|
|
3
|
-
<
|
|
3
|
+
<KPageHeader
|
|
4
4
|
:title="config.label"
|
|
5
|
-
:icon="kindMeta.icon"
|
|
5
|
+
:icon="cmsIcon(kindMeta.icon)"
|
|
6
6
|
:description="kindMeta.description"
|
|
7
7
|
>
|
|
8
8
|
<template v-if="config.kind !== 'single' && total" #badge>
|
|
9
9
|
<span :key="total" class="cms-count">{{ total }}</span>
|
|
10
10
|
</template>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
label="Save"
|
|
16
|
-
:loading="saving"
|
|
17
|
-
/>
|
|
18
|
-
</CmsPageHeader>
|
|
11
|
+
<template v-if="config.kind === 'single'" #actions>
|
|
12
|
+
<KButton type="submit" :form="FORM_ID" label="Save" :loading="saving" />
|
|
13
|
+
</template>
|
|
14
|
+
</KPageHeader>
|
|
19
15
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
<KEmptyState
|
|
17
|
+
v-if="error"
|
|
18
|
+
:icon="cmsIcon('exclamation-triangle')"
|
|
19
|
+
title="Could not load entries"
|
|
20
|
+
>
|
|
21
|
+
<template #actions>
|
|
22
|
+
<KButton
|
|
23
|
+
label="Retry"
|
|
24
|
+
:icon="cmsIcon('arrow-path')"
|
|
25
|
+
variant="soft"
|
|
26
|
+
:loading="status === 'pending'"
|
|
27
|
+
@click="reload"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</KEmptyState>
|
|
29
31
|
|
|
30
|
-
<
|
|
32
|
+
<KCard v-else-if="config.kind === 'single'" variant="outline" padding="lg">
|
|
31
33
|
<CmsEntryForm
|
|
32
34
|
v-model="formState"
|
|
33
35
|
:fields="config.fields"
|
|
@@ -38,20 +40,20 @@
|
|
|
38
40
|
:focus="focus"
|
|
39
41
|
@submit="saveSingle"
|
|
40
42
|
/>
|
|
41
|
-
</
|
|
43
|
+
</KCard>
|
|
42
44
|
|
|
43
45
|
<template v-else-if="config.kind === 'page'">
|
|
44
|
-
<div class="cms-toolbar">
|
|
45
|
-
<
|
|
46
|
-
v-if="total || searchTerm"
|
|
46
|
+
<div v-if="total || searchTerm" class="cms-toolbar">
|
|
47
|
+
<KInput
|
|
47
48
|
v-model="search"
|
|
48
|
-
icon="magnifying-glass"
|
|
49
|
+
:icon="cmsIcon('magnifying-glass')"
|
|
49
50
|
placeholder="Search…"
|
|
50
|
-
|
|
51
|
+
aria-label="Search pages"
|
|
52
|
+
class="cms-toolbar-search"
|
|
51
53
|
/>
|
|
52
54
|
</div>
|
|
53
55
|
|
|
54
|
-
<
|
|
56
|
+
<KCard v-if="pageTree.length" variant="outline" padding="none" class="cms-tree">
|
|
55
57
|
<NuxtLink
|
|
56
58
|
v-for="(node, index) in pageTree"
|
|
57
59
|
:key="String(node.row.id)"
|
|
@@ -62,103 +64,110 @@
|
|
|
62
64
|
'--cms-row-delay': `${Math.min(index, 14) * 24}ms`
|
|
63
65
|
}"
|
|
64
66
|
>
|
|
65
|
-
<
|
|
67
|
+
<KIcon
|
|
66
68
|
v-if="node.depth"
|
|
67
|
-
name="arrow-turn-left-up"
|
|
68
|
-
class="cms-tree-branch
|
|
69
|
+
:name="cmsIcon('arrow-turn-left-up')"
|
|
70
|
+
class="cms-tree-branch"
|
|
69
71
|
/>
|
|
70
72
|
<span class="cms-tree-doc">
|
|
71
|
-
<
|
|
73
|
+
<KIcon :name="cmsIcon('document-text')" />
|
|
74
|
+
</span>
|
|
75
|
+
<span class="cms-tree-text">
|
|
76
|
+
<span class="cms-tree-title">{{ node.row.label }}</span>
|
|
77
|
+
<span class="cms-tree-path">{{ node.row.path }}</span>
|
|
72
78
|
</span>
|
|
73
|
-
<div class="min-w-0 flex-1">
|
|
74
|
-
<div class="cms-tree-title">
|
|
75
|
-
{{ node.row.label }}
|
|
76
|
-
</div>
|
|
77
|
-
<div class="cms-tree-path">{{ node.row.path }}</div>
|
|
78
|
-
</div>
|
|
79
79
|
<span class="cms-tree-meta">{{ lastEdit(node.row.updatedAt) }}</span>
|
|
80
|
-
<
|
|
80
|
+
<KIcon name="chevron-right" class="cms-tree-chevron" />
|
|
81
81
|
</NuxtLink>
|
|
82
|
-
</
|
|
82
|
+
</KCard>
|
|
83
83
|
|
|
84
|
-
<
|
|
84
|
+
<KSpinner v-else-if="status === 'pending'" block />
|
|
85
85
|
|
|
86
|
-
<
|
|
86
|
+
<KEmptyState
|
|
87
|
+
v-else-if="searchTerm"
|
|
88
|
+
:icon="cmsIcon('magnifying-glass')"
|
|
89
|
+
title="No matching pages"
|
|
90
|
+
/>
|
|
87
91
|
|
|
88
|
-
<
|
|
92
|
+
<KEmptyState
|
|
89
93
|
v-else
|
|
90
|
-
icon="document-text"
|
|
94
|
+
:icon="cmsIcon('document-text')"
|
|
91
95
|
title="No pages yet"
|
|
92
|
-
|
|
96
|
+
description="Pages come from the routes of the app."
|
|
93
97
|
/>
|
|
94
98
|
|
|
95
|
-
<
|
|
99
|
+
<KPagination
|
|
100
|
+
v-model:page="page"
|
|
101
|
+
:total="total"
|
|
102
|
+
:page-size="PAGE_SIZE"
|
|
103
|
+
:show-summary="false"
|
|
104
|
+
/>
|
|
96
105
|
</template>
|
|
97
106
|
|
|
98
107
|
<template v-else>
|
|
99
108
|
<div class="cms-toolbar">
|
|
100
|
-
<
|
|
109
|
+
<KInput
|
|
101
110
|
v-if="total || narrowed"
|
|
102
111
|
v-model="search"
|
|
103
|
-
icon="magnifying-glass"
|
|
112
|
+
:icon="cmsIcon('magnifying-glass')"
|
|
104
113
|
placeholder="Search…"
|
|
105
|
-
|
|
114
|
+
aria-label="Search entries"
|
|
115
|
+
class="cms-toolbar-search"
|
|
106
116
|
/>
|
|
107
|
-
<div
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
117
|
+
<div class="cms-toolbar-actions">
|
|
118
|
+
<KSelectionBar
|
|
119
|
+
:count="selected.length"
|
|
120
|
+
:total="rows.length"
|
|
121
|
+
:on-select-all="selectAll"
|
|
122
|
+
:on-clear="clearSelection"
|
|
123
|
+
>
|
|
124
|
+
<template #actions>
|
|
125
|
+
<template v-if="drafts">
|
|
126
|
+
<KButton
|
|
127
|
+
label="Draft"
|
|
128
|
+
:icon="cmsIcon('pencil-square')"
|
|
129
|
+
variant="soft"
|
|
130
|
+
:disabled="saving"
|
|
131
|
+
@click="bulkStatus('draft')"
|
|
132
|
+
/>
|
|
133
|
+
<KButton
|
|
134
|
+
label="Publish"
|
|
135
|
+
:icon="cmsIcon('check-circle')"
|
|
136
|
+
variant="soft"
|
|
137
|
+
:disabled="saving"
|
|
138
|
+
@click="bulkStatus('published')"
|
|
139
|
+
/>
|
|
140
|
+
</template>
|
|
141
|
+
<KButton
|
|
142
|
+
v-if="selected.length === 1"
|
|
143
|
+
label="Duplicate"
|
|
144
|
+
:icon="cmsIcon('document-duplicate')"
|
|
145
|
+
variant="soft"
|
|
146
|
+
:disabled="saving"
|
|
147
|
+
@click="duplicateSelected"
|
|
148
|
+
/>
|
|
149
|
+
<KButton
|
|
150
|
+
label="Delete"
|
|
151
|
+
:icon="cmsIcon('trash')"
|
|
152
|
+
tone="danger"
|
|
153
|
+
:loading="saving"
|
|
154
|
+
@click="bulkDelete"
|
|
155
|
+
/>
|
|
156
|
+
</template>
|
|
157
|
+
</KSelectionBar>
|
|
158
|
+
<template v-if="!selected.length">
|
|
159
|
+
<KDropdownMenu :items="transferItems" placement="bottom-end">
|
|
160
|
+
<KButton
|
|
161
|
+
:icon="cmsIcon('arrows-up-down')"
|
|
162
|
+
variant="soft"
|
|
163
|
+
tone="neutral"
|
|
164
|
+
:loading="exporting"
|
|
165
|
+
aria-label="Import and export"
|
|
166
|
+
title="Import and export"
|
|
167
|
+
/>
|
|
168
|
+
</KDropdownMenu>
|
|
169
|
+
<KButton label="New entry" icon="plus" @click="openCreate" />
|
|
133
170
|
</template>
|
|
134
|
-
<CmsButton
|
|
135
|
-
v-if="selected.length === 1"
|
|
136
|
-
label="Duplicate"
|
|
137
|
-
icon="document-duplicate"
|
|
138
|
-
variant="soft"
|
|
139
|
-
:disabled="saving"
|
|
140
|
-
@click="duplicateSelected"
|
|
141
|
-
/>
|
|
142
|
-
<CmsButton
|
|
143
|
-
label="Delete"
|
|
144
|
-
icon="trash"
|
|
145
|
-
color="error"
|
|
146
|
-
:loading="saving"
|
|
147
|
-
@click="bulkDelete"
|
|
148
|
-
/>
|
|
149
|
-
</div>
|
|
150
|
-
<div v-else :key="'default'" class="cms-toolbar-actions">
|
|
151
|
-
<CmsDropdownMenu :items="transferItems" :content="{ align: 'end' }">
|
|
152
|
-
<CmsButton
|
|
153
|
-
icon="arrows-up-down"
|
|
154
|
-
variant="soft"
|
|
155
|
-
color="neutral"
|
|
156
|
-
:loading="exporting"
|
|
157
|
-
aria-label="Import and export"
|
|
158
|
-
title="Import and export"
|
|
159
|
-
/>
|
|
160
|
-
</CmsDropdownMenu>
|
|
161
|
-
<CmsButton label="New entry" icon="plus" @click="openCreate" />
|
|
162
171
|
</div>
|
|
163
172
|
</div>
|
|
164
173
|
|
|
@@ -170,55 +179,59 @@
|
|
|
170
179
|
:relations="relations"
|
|
171
180
|
/>
|
|
172
181
|
|
|
173
|
-
<
|
|
182
|
+
<KTable
|
|
174
183
|
v-if="rows.length"
|
|
175
184
|
v-model:selected="selected"
|
|
176
|
-
selectable
|
|
177
185
|
v-model:sort="sort"
|
|
178
|
-
|
|
186
|
+
selectable
|
|
187
|
+
:rows="rows"
|
|
179
188
|
:columns="columns"
|
|
180
|
-
|
|
189
|
+
:row-key="rowKey"
|
|
190
|
+
@row-click="onSelect"
|
|
181
191
|
>
|
|
182
|
-
<template v-for="key in mediaKeys" #[
|
|
183
|
-
<CmsMediaThumb :value="mediaThumbValue(key, row
|
|
192
|
+
<template v-for="key in mediaKeys" #[`cell-${key}`]="{ row }" :key="key">
|
|
193
|
+
<CmsMediaThumb :value="mediaThumbValue(key, row[key])" />
|
|
184
194
|
</template>
|
|
185
|
-
<template v-if="drafts" #status
|
|
195
|
+
<template v-if="drafts" #cell-status="{ row }">
|
|
186
196
|
<CmsStatusBadge
|
|
187
|
-
:published="row.
|
|
188
|
-
:scheduled="mounted && isContent && isScheduledContent(row
|
|
189
|
-
:at="formatDateTime(row.
|
|
197
|
+
:published="row.status === 'published'"
|
|
198
|
+
:scheduled="mounted && isContent && isScheduledContent(row)"
|
|
199
|
+
:at="formatDateTime(row.publishedAt)"
|
|
190
200
|
/>
|
|
191
201
|
</template>
|
|
192
|
-
</
|
|
202
|
+
</KTable>
|
|
193
203
|
|
|
194
|
-
<
|
|
204
|
+
<KSpinner v-else-if="status === 'pending'" block />
|
|
195
205
|
|
|
196
|
-
<
|
|
206
|
+
<KEmptyState
|
|
197
207
|
v-else-if="narrowed"
|
|
198
|
-
icon="magnifying-glass"
|
|
208
|
+
:icon="cmsIcon('magnifying-glass')"
|
|
199
209
|
title="No matching entries"
|
|
200
210
|
fill
|
|
201
211
|
>
|
|
202
|
-
<
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
variant="soft"
|
|
207
|
-
@click="filters = {}"
|
|
208
|
-
/>
|
|
209
|
-
</CmsEmptyState>
|
|
212
|
+
<template v-if="filterCount" #actions>
|
|
213
|
+
<KButton label="Clear filters" icon="x-mark" variant="soft" @click="filters = {}" />
|
|
214
|
+
</template>
|
|
215
|
+
</KEmptyState>
|
|
210
216
|
|
|
211
|
-
<
|
|
217
|
+
<KEmptyState
|
|
212
218
|
v-else
|
|
213
|
-
icon="sparkles"
|
|
219
|
+
:icon="cmsIcon('sparkles')"
|
|
214
220
|
title="Nothing here yet"
|
|
215
|
-
|
|
221
|
+
description="Entries you create will show up here."
|
|
216
222
|
fill
|
|
217
223
|
>
|
|
218
|
-
<
|
|
219
|
-
|
|
224
|
+
<template #actions>
|
|
225
|
+
<KButton label="New entry" icon="plus" variant="soft" @click="openCreate" />
|
|
226
|
+
</template>
|
|
227
|
+
</KEmptyState>
|
|
220
228
|
|
|
221
|
-
<
|
|
229
|
+
<KPagination
|
|
230
|
+
v-model:page="page"
|
|
231
|
+
:total="total"
|
|
232
|
+
:page-size="PAGE_SIZE"
|
|
233
|
+
:show-summary="false"
|
|
234
|
+
/>
|
|
222
235
|
|
|
223
236
|
<CmsEntryDrawer
|
|
224
237
|
v-if="!isContent"
|
|
@@ -263,6 +276,19 @@ import {
|
|
|
263
276
|
useRoute,
|
|
264
277
|
watch
|
|
265
278
|
} from "#imports";
|
|
279
|
+
import {
|
|
280
|
+
Button as KButton,
|
|
281
|
+
Card as KCard,
|
|
282
|
+
DropdownMenu as KDropdownMenu,
|
|
283
|
+
EmptyState as KEmptyState,
|
|
284
|
+
Icon as KIcon,
|
|
285
|
+
Input as KInput,
|
|
286
|
+
PageHeader as KPageHeader,
|
|
287
|
+
Pagination as KPagination,
|
|
288
|
+
SelectionBar as KSelectionBar,
|
|
289
|
+
Spinner as KSpinner,
|
|
290
|
+
Table as KTable
|
|
291
|
+
} from "@xleddyl/443-components-vue";
|
|
266
292
|
import cmsConfig from "#cms-config";
|
|
267
293
|
import { duplicateEntryValues } from "../../shared/duplicate";
|
|
268
294
|
import {
|
|
@@ -278,7 +304,7 @@ import { useCmsRuntime } from "../composables/cms-runtime";
|
|
|
278
304
|
import { entryListColumns, useCmsSettingsState } from "../composables/cms-settings";
|
|
279
305
|
import { useCmsToast } from "../composables/cms-toast";
|
|
280
306
|
import { cmsApi } from "../utils/api";
|
|
281
|
-
import { errorMessage } from "../utils/ui";
|
|
307
|
+
import { cmsIcon, errorMessage } from "../utils/ui";
|
|
282
308
|
definePageMeta({
|
|
283
309
|
layout: "cms-admin",
|
|
284
310
|
middleware: "cms-auth",
|
|
@@ -342,7 +368,7 @@ watch(
|
|
|
342
368
|
}
|
|
343
369
|
);
|
|
344
370
|
const sortQuery = computed(
|
|
345
|
-
() => sort.value ? { sort: sort.value.key, order: sort.value.
|
|
371
|
+
() => sort.value ? { sort: sort.value.key, order: sort.value.direction } : {}
|
|
346
372
|
);
|
|
347
373
|
const listQuery = computed(() => ({
|
|
348
374
|
limit: PAGE_SIZE,
|
|
@@ -496,14 +522,17 @@ function isSortable(field) {
|
|
|
496
522
|
const settings = useCmsSettingsState();
|
|
497
523
|
const columns = computed(
|
|
498
524
|
() => entryListColumns(name, settings.value).map(
|
|
499
|
-
(key) => key === "status" && !config.fields.status ? {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
525
|
+
(key) => key === "status" && !config.fields.status ? { key: "status", label: "Status", sortable: true } : {
|
|
526
|
+
key,
|
|
527
|
+
label: config.fields[key].label,
|
|
528
|
+
value: (row) => displayValue(config.fields[key], key, row[key]),
|
|
503
529
|
sortable: isSortable(config.fields[key])
|
|
504
530
|
}
|
|
505
531
|
)
|
|
506
532
|
);
|
|
533
|
+
function rowKey(row) {
|
|
534
|
+
return String(row.id);
|
|
535
|
+
}
|
|
507
536
|
const filterKeys = computed(() => {
|
|
508
537
|
if (!isCollectionKind(config)) return [];
|
|
509
538
|
const shown = entryListFilterKeys(config, entryListColumns(name, settings.value));
|
|
@@ -513,13 +542,13 @@ const filterKeys = computed(() => {
|
|
|
513
542
|
const drawerOpen = ref(false);
|
|
514
543
|
const drawerEntryId = ref(null);
|
|
515
544
|
const drawerInitial = ref(null);
|
|
516
|
-
function onSelect(
|
|
545
|
+
function onSelect(row) {
|
|
517
546
|
if (isContent) {
|
|
518
|
-
void navigateTo(`/cms/${name}/${row.
|
|
547
|
+
void navigateTo(`/cms/${name}/${row.id}`);
|
|
519
548
|
return;
|
|
520
549
|
}
|
|
521
550
|
drawerInitial.value = null;
|
|
522
|
-
drawerEntryId.value = String(row.
|
|
551
|
+
drawerEntryId.value = String(row.id);
|
|
523
552
|
drawerOpen.value = true;
|
|
524
553
|
}
|
|
525
554
|
function openCreate() {
|
|
@@ -537,7 +566,7 @@ function openDuplicate(values) {
|
|
|
537
566
|
drawerOpen.value = true;
|
|
538
567
|
}
|
|
539
568
|
async function duplicateSelected() {
|
|
540
|
-
const id = selected.value[0];
|
|
569
|
+
const id = selected.value.map(String)[0];
|
|
541
570
|
if (!id || saving.value) return;
|
|
542
571
|
if (isContent) {
|
|
543
572
|
void navigateTo({ path: `/cms/${name}/new`, query: { duplicate: id } });
|
|
@@ -605,8 +634,14 @@ const confirmAction = useCmsConfirm();
|
|
|
605
634
|
const selected = ref([]);
|
|
606
635
|
watch(rows, (current) => {
|
|
607
636
|
const ids = new Set(current.map((row) => String(row.id)));
|
|
608
|
-
selected.value = selected.value.filter((id) => ids.has(id));
|
|
637
|
+
selected.value = selected.value.filter((id) => ids.has(String(id)));
|
|
609
638
|
});
|
|
639
|
+
function selectAll() {
|
|
640
|
+
selected.value = rows.value.map(rowKey);
|
|
641
|
+
}
|
|
642
|
+
function clearSelection() {
|
|
643
|
+
selected.value = [];
|
|
644
|
+
}
|
|
610
645
|
function entriesLabel(count) {
|
|
611
646
|
return `${count} ${count === 1 ? "entry" : "entries"}`;
|
|
612
647
|
}
|
|
@@ -636,7 +671,7 @@ function reportBulk(done, total2, failed) {
|
|
|
636
671
|
}
|
|
637
672
|
}
|
|
638
673
|
async function bulkDelete() {
|
|
639
|
-
const ids =
|
|
674
|
+
const ids = selected.value.map(String);
|
|
640
675
|
if (!ids.length || saving.value) return;
|
|
641
676
|
if (!await confirmAction(`Delete ${entriesLabel(ids.length)}?`)) return;
|
|
642
677
|
const emptiesPage = ids.length >= rows.value.length && page.value > 1;
|
|
@@ -645,7 +680,7 @@ async function bulkDelete() {
|
|
|
645
680
|
if (!failed.length && emptiesPage) page.value -= 1;
|
|
646
681
|
}
|
|
647
682
|
async function bulkStatus(status2) {
|
|
648
|
-
const ids =
|
|
683
|
+
const ids = selected.value.map(String);
|
|
649
684
|
if (!ids.length || saving.value) return;
|
|
650
685
|
const failed = await runBulk(ids, async (id) => {
|
|
651
686
|
const entry = await cmsApi(`${endpoint}/${id}`);
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
content
|
|
11
11
|
>
|
|
12
12
|
<template #start>
|
|
13
|
-
<
|
|
14
|
-
icon="arrow-left"
|
|
13
|
+
<KButton
|
|
14
|
+
:icon="cmsIcon('arrow-left')"
|
|
15
15
|
size="sm"
|
|
16
16
|
variant="ghost"
|
|
17
|
-
|
|
17
|
+
tone="neutral"
|
|
18
18
|
:aria-label="`Back to ${config.label}`"
|
|
19
19
|
:title="`Back to ${config.label}`"
|
|
20
20
|
@click="goBack"
|
|
@@ -27,77 +27,75 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<template #actions>
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
icon="clock"
|
|
30
|
+
<KPopover v-model:open="scheduleOpen" placement="bottom-end" label="Schedule">
|
|
31
|
+
<KButton
|
|
32
|
+
:icon="cmsIcon('clock')"
|
|
33
33
|
size="sm"
|
|
34
34
|
variant="ghost"
|
|
35
|
-
|
|
35
|
+
tone="neutral"
|
|
36
36
|
:label="scheduled ? 'Reschedule' : 'Schedule'"
|
|
37
37
|
:disabled="saving"
|
|
38
|
-
aria-haspopup="dialog"
|
|
39
|
-
:aria-expanded="scheduleOpen"
|
|
40
38
|
/>
|
|
41
39
|
<template #content>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
40
|
+
<KStack gap="md" class="cms-editor-schedule-panel">
|
|
41
|
+
<KFormField
|
|
44
42
|
label="Publish at"
|
|
45
43
|
description="The item stays hidden from the site until this moment."
|
|
46
44
|
>
|
|
47
45
|
<CmsFieldInput v-model="scheduleDraft" :field="publishedAtField" />
|
|
48
|
-
</
|
|
49
|
-
<
|
|
50
|
-
<
|
|
46
|
+
</KFormField>
|
|
47
|
+
<KStack direction="row" justify="end" gap="sm">
|
|
48
|
+
<KButton
|
|
51
49
|
label="Cancel"
|
|
52
50
|
size="sm"
|
|
53
51
|
variant="ghost"
|
|
54
|
-
|
|
52
|
+
tone="neutral"
|
|
55
53
|
@click="scheduleOpen = false"
|
|
56
54
|
/>
|
|
57
|
-
<
|
|
55
|
+
<KButton
|
|
58
56
|
label="Schedule"
|
|
59
57
|
size="sm"
|
|
60
58
|
:disabled="!scheduleDraft"
|
|
61
59
|
:loading="saving"
|
|
62
60
|
@click="schedule"
|
|
63
61
|
/>
|
|
64
|
-
</
|
|
65
|
-
</
|
|
62
|
+
</KStack>
|
|
63
|
+
</KStack>
|
|
66
64
|
</template>
|
|
67
|
-
</
|
|
68
|
-
<
|
|
65
|
+
</KPopover>
|
|
66
|
+
<KButton
|
|
69
67
|
label="Save"
|
|
70
68
|
size="sm"
|
|
71
69
|
variant="soft"
|
|
72
|
-
|
|
70
|
+
tone="neutral"
|
|
73
71
|
:loading="saving"
|
|
74
72
|
@click="save()"
|
|
75
73
|
/>
|
|
76
|
-
<
|
|
74
|
+
<KButton
|
|
77
75
|
:label="published ? 'Unpublish' : 'Publish'"
|
|
78
76
|
size="sm"
|
|
79
77
|
:variant="published ? 'soft' : 'solid'"
|
|
80
|
-
:
|
|
78
|
+
:tone="published ? 'neutral' : 'accent'"
|
|
81
79
|
:loading="saving"
|
|
82
80
|
@click="save(published ? 'draft' : 'published')"
|
|
83
81
|
/>
|
|
84
|
-
<
|
|
82
|
+
<KDropdownMenu
|
|
85
83
|
v-if="!isNew"
|
|
86
84
|
:items="[
|
|
87
85
|
{ label: 'Duplicate', onSelect: duplicate },
|
|
88
86
|
{ label: 'Delete', onSelect: remove }
|
|
89
87
|
]"
|
|
90
|
-
|
|
88
|
+
placement="bottom-end"
|
|
91
89
|
>
|
|
92
|
-
<
|
|
93
|
-
icon="ellipsis-horizontal"
|
|
90
|
+
<KButton
|
|
91
|
+
:icon="cmsIcon('ellipsis-horizontal')"
|
|
94
92
|
size="sm"
|
|
95
93
|
variant="ghost"
|
|
96
|
-
|
|
94
|
+
tone="neutral"
|
|
97
95
|
aria-label="More actions"
|
|
98
96
|
title="More actions"
|
|
99
97
|
/>
|
|
100
|
-
</
|
|
98
|
+
</KDropdownMenu>
|
|
101
99
|
</template>
|
|
102
100
|
</CmsVisualEditor>
|
|
103
101
|
</template>
|
|
@@ -123,6 +121,13 @@ import {
|
|
|
123
121
|
useRoute,
|
|
124
122
|
watch
|
|
125
123
|
} from "#imports";
|
|
124
|
+
import {
|
|
125
|
+
Button as KButton,
|
|
126
|
+
DropdownMenu as KDropdownMenu,
|
|
127
|
+
FormField as KFormField,
|
|
128
|
+
Popover as KPopover,
|
|
129
|
+
Stack as KStack
|
|
130
|
+
} from "@xleddyl/443-components-vue";
|
|
126
131
|
import cmsConfig from "#cms-config";
|
|
127
132
|
import { duplicateEntryValues } from "../../shared/duplicate";
|
|
128
133
|
import { readSearchFocus } from "../../shared/search";
|
|
@@ -130,7 +135,7 @@ import { useCmsConfirm } from "../composables/cms-confirm";
|
|
|
130
135
|
import { useCmsRuntime } from "../composables/cms-runtime";
|
|
131
136
|
import { useCmsToast } from "../composables/cms-toast";
|
|
132
137
|
import { cmsApi } from "../utils/api";
|
|
133
|
-
import { errorMessage } from "../utils/ui";
|
|
138
|
+
import { cmsIcon, errorMessage } from "../utils/ui";
|
|
134
139
|
definePageMeta({
|
|
135
140
|
layout: "cms-editor",
|
|
136
141
|
middleware: "cms-auth",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cms-page">
|
|
3
|
-
<
|
|
3
|
+
<KPageHeader :title="headerTitle" :breadcrumbs="breadcrumb" breadcrumbs-ancestors>
|
|
4
4
|
<template v-if="drafts" #badge>
|
|
5
5
|
<CmsStatusBadge :published="published" />
|
|
6
6
|
</template>
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
<
|
|
7
|
+
<template #actions>
|
|
8
|
+
<KButton label="Back" icon="arrow-left" variant="soft" @click="goBack" />
|
|
9
|
+
<KButton type="submit" :form="FORM_ID" label="Save" :loading="saving" />
|
|
10
|
+
<KButton
|
|
11
11
|
v-if="drafts"
|
|
12
12
|
type="submit"
|
|
13
13
|
:form="FORM_ID"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
:loading="saving"
|
|
16
16
|
@click="togglePublished"
|
|
17
17
|
/>
|
|
18
|
-
</
|
|
19
|
-
</
|
|
18
|
+
</template>
|
|
19
|
+
</KPageHeader>
|
|
20
20
|
|
|
21
|
-
<
|
|
21
|
+
<KCard variant="outline" padding="lg">
|
|
22
22
|
<CmsEntryForm
|
|
23
23
|
v-model="formState"
|
|
24
24
|
:fields="fields"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
@submit="save"
|
|
33
33
|
@error="revertStatus"
|
|
34
34
|
/>
|
|
35
|
-
</
|
|
35
|
+
</KCard>
|
|
36
36
|
</div>
|
|
37
37
|
</template>
|
|
38
38
|
|
|
@@ -50,6 +50,11 @@ import {
|
|
|
50
50
|
useRoute,
|
|
51
51
|
watch
|
|
52
52
|
} from "#imports";
|
|
53
|
+
import {
|
|
54
|
+
Button as KButton,
|
|
55
|
+
Card as KCard,
|
|
56
|
+
PageHeader as KPageHeader
|
|
57
|
+
} from "@xleddyl/443-components-vue";
|
|
53
58
|
import cmsConfig from "#cms-config";
|
|
54
59
|
import { readSearchFocus } from "../../shared/search";
|
|
55
60
|
import { useCmsConfirm } from "../composables/cms-confirm";
|