@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,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
stroke-width="1.5"
|
|
22
|
-
stroke-linecap="round"
|
|
23
|
-
/>
|
|
24
|
-
</svg>
|
|
25
|
-
</span>
|
|
2
|
+
<KBrand
|
|
3
|
+
:name="cmsBrand.title"
|
|
4
|
+
:subtitle="subtitle"
|
|
5
|
+
:size="size"
|
|
6
|
+
:logo="logo"
|
|
7
|
+
:hide-text="hideText"
|
|
8
|
+
show-name
|
|
9
|
+
>
|
|
10
|
+
<template #mark>
|
|
11
|
+
<svg class="cms-brand-glyph" viewBox="0 0 16 16" fill="none">
|
|
12
|
+
<path
|
|
13
|
+
d="M4.5 5.5h7M4.5 8h7M4.5 10.5h4"
|
|
14
|
+
stroke="currentColor"
|
|
15
|
+
stroke-width="1.5"
|
|
16
|
+
stroke-linecap="round"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
</template>
|
|
20
|
+
</KBrand>
|
|
26
21
|
</template>
|
|
27
22
|
|
|
28
23
|
<script setup>
|
|
24
|
+
import { Brand as KBrand } from "@xleddyl/443-components-vue";
|
|
29
25
|
import { cmsBrand } from "#cms-brand";
|
|
30
26
|
defineProps({
|
|
31
|
-
size: { type: String, required: false }
|
|
27
|
+
size: { type: String, required: false, default: "md" },
|
|
28
|
+
subtitle: { type: String, required: false },
|
|
29
|
+
hideText: { type: Boolean, required: false }
|
|
32
30
|
});
|
|
31
|
+
const logo = cmsBrand.logo.kind === "svg" ? cmsBrand.logo.markup : cmsBrand.logo.kind === "image" ? cmsBrand.logo.src : void 0;
|
|
33
32
|
</script>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
size?: 'md' | 'lg';
|
|
2
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3
|
+
subtitle?: string;
|
|
4
|
+
hideText?: boolean;
|
|
3
5
|
};
|
|
4
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
7
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { CmsConfirmGroup } from '../../composables/cms-confirm.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
|
-
|
|
3
|
-
indeterminate?: boolean;
|
|
3
|
+
groups: CmsConfirmGroup[];
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
|
|
6
|
+
close: () => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
|
|
8
|
+
onClose?: (() => any) | undefined;
|
|
9
9
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cms-confirm-groups">
|
|
3
|
+
<section v-for="group in groups" :key="group.title" class="cms-confirm-group">
|
|
4
|
+
<h3 class="cms-confirm-group-title" :title="group.title">{{ group.title }}</h3>
|
|
5
|
+
<ul class="cms-confirm-list">
|
|
6
|
+
<li v-for="link in group.links" :key="link.to + link.meta">
|
|
7
|
+
<NuxtLink :to="link.to" class="cms-confirm-link" @click="emit('close')">
|
|
8
|
+
<span class="cms-confirm-link-title">{{ link.title }}</span>
|
|
9
|
+
<span class="cms-confirm-link-meta">{{ link.meta }}</span>
|
|
10
|
+
</NuxtLink>
|
|
11
|
+
</li>
|
|
12
|
+
</ul>
|
|
13
|
+
</section>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
defineProps({
|
|
19
|
+
groups: { type: Array, required: true }
|
|
20
|
+
});
|
|
21
|
+
const emit = defineEmits(["close"]);
|
|
22
|
+
</script>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { CmsConfirmGroup } from '../../composables/cms-confirm.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
|
-
|
|
3
|
-
indeterminate?: boolean;
|
|
3
|
+
groups: CmsConfirmGroup[];
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
|
|
6
|
+
close: () => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
|
|
8
|
+
onClose?: (() => any) | undefined;
|
|
9
9
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -10,15 +10,15 @@ type __VLS_ModelProps = {
|
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:open": (value: boolean) => any;
|
|
13
14
|
saved: () => any;
|
|
14
15
|
deleted: () => any;
|
|
15
16
|
duplicate: (values: Record<string, unknown>) => any;
|
|
16
|
-
"update:open": (value: boolean) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
19
|
onSaved?: (() => any) | undefined;
|
|
19
20
|
onDeleted?: (() => any) | undefined;
|
|
20
21
|
onDuplicate?: ((values: Record<string, unknown>) => any) | undefined;
|
|
21
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
22
22
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
24
24
|
export default _default;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<template v-if="drafts && !loading" #
|
|
4
|
-
<
|
|
2
|
+
<KDrawer v-model:open="open" :title="title" size="lg" :before-close="confirmClose">
|
|
3
|
+
<template v-if="drafts && !loading" #title-trailing>
|
|
4
|
+
<KBadge
|
|
5
|
+
dot
|
|
6
|
+
:tone="published ? 'success' : 'neutral'"
|
|
7
|
+
:variant="published ? 'soft' : 'outline'"
|
|
8
|
+
:label="published ? 'Published' : 'Draft'"
|
|
9
|
+
/>
|
|
5
10
|
</template>
|
|
6
11
|
|
|
7
|
-
<
|
|
12
|
+
<KStack v-if="loading" align="center" justify="center" class="cms-drawer-loading">
|
|
13
|
+
<KSpinner size="lg" label="Loading" />
|
|
14
|
+
</KStack>
|
|
8
15
|
|
|
9
16
|
<CmsEntryForm
|
|
10
17
|
v-else
|
|
@@ -21,57 +28,66 @@
|
|
|
21
28
|
/>
|
|
22
29
|
|
|
23
30
|
<template #footer>
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
31
|
+
<KStack direction="row" justify="between" gap="sm" wrap class="cms-drawer-actions">
|
|
32
|
+
<KStack v-if="!isNew" direction="row" gap="sm">
|
|
33
|
+
<KButton
|
|
34
|
+
label="Delete"
|
|
35
|
+
icon="trash"
|
|
36
|
+
variant="ghost"
|
|
37
|
+
tone="danger"
|
|
38
|
+
:disabled="saving || loading"
|
|
39
|
+
@click="remove"
|
|
40
|
+
/>
|
|
41
|
+
<KButton
|
|
42
|
+
label="Duplicate"
|
|
43
|
+
:icon="cmsIcon('document-duplicate')"
|
|
44
|
+
variant="ghost"
|
|
45
|
+
tone="neutral"
|
|
46
|
+
:disabled="saving || loading"
|
|
47
|
+
@click="duplicate"
|
|
48
|
+
/>
|
|
49
|
+
</KStack>
|
|
50
|
+
<span v-else />
|
|
51
|
+
<KStack direction="row" gap="sm">
|
|
52
|
+
<KButton
|
|
53
|
+
v-if="drafts"
|
|
54
|
+
type="submit"
|
|
55
|
+
:form="FORM_ID"
|
|
56
|
+
:label="published ? 'Make draft' : 'Publish'"
|
|
57
|
+
variant="soft"
|
|
58
|
+
:loading="saving"
|
|
59
|
+
:disabled="loading"
|
|
60
|
+
@click="togglePublished"
|
|
61
|
+
/>
|
|
62
|
+
<KButton
|
|
63
|
+
type="submit"
|
|
64
|
+
:form="FORM_ID"
|
|
65
|
+
label="Save"
|
|
66
|
+
:loading="saving"
|
|
67
|
+
:disabled="loading"
|
|
68
|
+
/>
|
|
69
|
+
</KStack>
|
|
70
|
+
</KStack>
|
|
62
71
|
</template>
|
|
63
|
-
</
|
|
72
|
+
</KDrawer>
|
|
64
73
|
</template>
|
|
65
74
|
|
|
66
75
|
<script setup>
|
|
67
76
|
import { isTranslatableField, selectDisplayValue } from "#nuxt-cms";
|
|
77
|
+
import {
|
|
78
|
+
Badge as KBadge,
|
|
79
|
+
Button as KButton,
|
|
80
|
+
Drawer as KDrawer,
|
|
81
|
+
Spinner as KSpinner,
|
|
82
|
+
Stack as KStack
|
|
83
|
+
} from "@xleddyl/443-components-vue";
|
|
68
84
|
import { computed, ref, watch } from "#imports";
|
|
69
85
|
import { duplicateEntryValues } from "../../../shared/duplicate";
|
|
70
86
|
import { useCmsConfirm } from "../../composables/cms-confirm";
|
|
71
87
|
import { useCmsRuntime } from "../../composables/cms-runtime";
|
|
72
88
|
import { useCmsToast } from "../../composables/cms-toast";
|
|
73
89
|
import { cmsApi } from "../../utils/api";
|
|
74
|
-
import { errorMessage } from "../../utils/ui";
|
|
90
|
+
import { cmsIcon, errorMessage } from "../../utils/ui";
|
|
75
91
|
const FORM_ID = "cms-entry-drawer-form";
|
|
76
92
|
const props = defineProps({
|
|
77
93
|
collection: { type: String, required: true },
|
|
@@ -169,9 +185,8 @@ watch(
|
|
|
169
185
|
},
|
|
170
186
|
{ immediate: true }
|
|
171
187
|
);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
open.value = false;
|
|
188
|
+
function confirmClose() {
|
|
189
|
+
return !dirty.value || confirmAction("You have unsaved changes. Close anyway?");
|
|
175
190
|
}
|
|
176
191
|
async function save() {
|
|
177
192
|
if (saving.value) return;
|
|
@@ -10,15 +10,15 @@ type __VLS_ModelProps = {
|
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:open": (value: boolean) => any;
|
|
13
14
|
saved: () => any;
|
|
14
15
|
deleted: () => any;
|
|
15
16
|
duplicate: (values: Record<string, unknown>) => any;
|
|
16
|
-
"update:open": (value: boolean) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
19
|
onSaved?: (() => any) | undefined;
|
|
19
20
|
onDeleted?: (() => any) | undefined;
|
|
20
21
|
onDuplicate?: ((values: Record<string, unknown>) => any) | undefined;
|
|
21
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
22
22
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
24
24
|
export default _default;
|
|
@@ -1,106 +1,71 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<button
|
|
13
|
-
v-for="tab in tabList"
|
|
14
|
-
:key="tab.id"
|
|
15
|
-
type="button"
|
|
16
|
-
role="tab"
|
|
17
|
-
class="cms-tab"
|
|
18
|
-
:class="{ 'is-active': tab.id === activeTab }"
|
|
19
|
-
:aria-selected="tab.id === activeTab"
|
|
20
|
-
@click="activeTab = tab.id"
|
|
21
|
-
>
|
|
22
|
-
{{ tab.label }}
|
|
23
|
-
</button>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="cms-form-layout">
|
|
26
|
-
<div class="cms-form-main">
|
|
27
|
-
<component
|
|
28
|
-
:is="section.title ? 'section' : 'div'"
|
|
29
|
-
v-for="section in sections"
|
|
30
|
-
:key="section.id"
|
|
31
|
-
class="cms-form-section"
|
|
32
|
-
:class="{ 'is-titled': !!section.title, 'is-collapsed': isCollapsed(section) }"
|
|
33
|
-
>
|
|
34
|
-
<button
|
|
35
|
-
v-if="section.title"
|
|
36
|
-
type="button"
|
|
37
|
-
class="cms-form-section-header"
|
|
38
|
-
:aria-expanded="!isCollapsed(section)"
|
|
39
|
-
@click="toggleSection(section.id)"
|
|
2
|
+
<KForm :id="formId" ref="formRef" :form="form" :focus-on-error="false" class="cms-form">
|
|
3
|
+
<component :is="tabbed ? KTabs : 'div'" v-bind="tabsBinding" class="cms-form-body">
|
|
4
|
+
<template #[panelSlot]>
|
|
5
|
+
<div class="cms-form-main">
|
|
6
|
+
<component
|
|
7
|
+
:is="section.title ? KAccordion : 'div'"
|
|
8
|
+
v-for="section in sections"
|
|
9
|
+
:key="section.id"
|
|
10
|
+
v-bind="sectionBinding(section)"
|
|
11
|
+
class="cms-form-section"
|
|
40
12
|
>
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<CmsIcon name="chevron-down" class="cms-form-section-chevron size-4" />
|
|
48
|
-
</button>
|
|
49
|
-
<div v-show="!isCollapsed(section)" class="cms-form-rows">
|
|
50
|
-
<div
|
|
51
|
-
v-for="row in section.rows"
|
|
52
|
-
:key="row.join('|')"
|
|
53
|
-
class="cms-form-row"
|
|
54
|
-
:style="{ '--cms-row-cols': row.length }"
|
|
55
|
-
>
|
|
56
|
-
<CmsFormField
|
|
57
|
-
v-for="key in row"
|
|
58
|
-
:key="key"
|
|
59
|
-
:label="fields[key].label"
|
|
60
|
-
:description="fields[key].description"
|
|
61
|
-
:icon="fieldIcon(fields[key])"
|
|
62
|
-
:name="key"
|
|
63
|
-
:required="fields[key].required"
|
|
64
|
-
:data-cms-field="key"
|
|
65
|
-
:class="{ 'is-search-focus': highlighted === key }"
|
|
13
|
+
<div class="cms-form-rows" :class="{ 'cms-form-section-body': section.title }">
|
|
14
|
+
<div
|
|
15
|
+
v-for="row in section.rows"
|
|
16
|
+
:key="row.join('|')"
|
|
17
|
+
class="cms-form-row"
|
|
18
|
+
:style="{ '--cms-row-cols': row.length }"
|
|
66
19
|
>
|
|
67
|
-
<
|
|
68
|
-
v-
|
|
69
|
-
|
|
20
|
+
<KFormField
|
|
21
|
+
v-for="key in row"
|
|
22
|
+
:key="key"
|
|
23
|
+
:name="key"
|
|
24
|
+
:label="fields[key].label"
|
|
25
|
+
:description="fields[key].description"
|
|
26
|
+
:icon="cmsIcon(fieldIcon(fields[key]))"
|
|
27
|
+
:required="fields[key].required"
|
|
28
|
+
:data-cms-field="key"
|
|
29
|
+
:class="{ 'cms-search-focus': highlighted === key }"
|
|
70
30
|
>
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
31
|
+
<template
|
|
32
|
+
v-if="hasLocaleSwitch(fields[key]) && i18n.locales.length > 1"
|
|
33
|
+
#label-actions
|
|
34
|
+
>
|
|
35
|
+
<CmsLocaleSwitch
|
|
36
|
+
:model-value="localeFor(key)"
|
|
37
|
+
:value="
|
|
74
38
|
isTranslatableField(fields[key]) ? state[key] : null
|
|
75
39
|
"
|
|
76
|
-
|
|
40
|
+
@update:model-value="(locale) => setLocale(key, locale)"
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
<CmsFieldInput
|
|
44
|
+
v-model="state[key]"
|
|
45
|
+
:field="fields[key]"
|
|
46
|
+
:locale="localeFor(key)"
|
|
47
|
+
:slug-source="slugSource(fields[key])"
|
|
48
|
+
:entry-name="entryName"
|
|
49
|
+
:field-key="key"
|
|
77
50
|
/>
|
|
78
|
-
</
|
|
79
|
-
|
|
80
|
-
v-model="state[key]"
|
|
81
|
-
:field="fields[key]"
|
|
82
|
-
:locale="localeFor(key)"
|
|
83
|
-
:slug-source="slugSource(fields[key])"
|
|
84
|
-
:entry-name="entryName"
|
|
85
|
-
:field-key="key"
|
|
86
|
-
/>
|
|
87
|
-
</CmsFormField>
|
|
51
|
+
</KFormField>
|
|
52
|
+
</div>
|
|
88
53
|
</div>
|
|
89
|
-
</
|
|
90
|
-
</
|
|
91
|
-
</
|
|
92
|
-
</
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
<
|
|
54
|
+
</component>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
</component>
|
|
58
|
+
<KStack v-if="footer" direction="row" justify="end" gap="sm">
|
|
59
|
+
<KButton type="submit" label="Save" :loading="loading" />
|
|
60
|
+
<KButton
|
|
96
61
|
v-if="drafts"
|
|
97
62
|
type="submit"
|
|
98
63
|
:label="published ? 'Make draft' : 'Publish'"
|
|
99
64
|
:loading="loading"
|
|
100
65
|
@click="togglePublished"
|
|
101
66
|
/>
|
|
102
|
-
</
|
|
103
|
-
</
|
|
67
|
+
</KStack>
|
|
68
|
+
</KForm>
|
|
104
69
|
</template>
|
|
105
70
|
|
|
106
71
|
<script setup>
|
|
@@ -112,13 +77,22 @@ import {
|
|
|
112
77
|
resolveFormLayout,
|
|
113
78
|
slugSourceValue
|
|
114
79
|
} from "#nuxt-cms";
|
|
80
|
+
import {
|
|
81
|
+
Accordion as KAccordion,
|
|
82
|
+
Button as KButton,
|
|
83
|
+
Form as KForm,
|
|
84
|
+
FormField as KFormField,
|
|
85
|
+
Stack as KStack,
|
|
86
|
+
Tabs as KTabs,
|
|
87
|
+
useForm
|
|
88
|
+
} from "@xleddyl/443-components-vue";
|
|
115
89
|
import { computed, nextTick, onMounted, ref, watch } from "#imports";
|
|
116
90
|
import cmsConfig from "#cms-config";
|
|
117
91
|
import { buildEntrySchema, entryValidationWarnings } from "../../../shared/validation";
|
|
118
92
|
import { useCmsFieldFocus } from "../../composables/cms-field-focus";
|
|
119
93
|
import { useCmsRuntime } from "../../composables/cms-runtime";
|
|
120
94
|
import { entryFormLayout, useCmsSettingsState } from "../../composables/cms-settings";
|
|
121
|
-
import { fieldIcon } from "../../utils/ui";
|
|
95
|
+
import { cmsIcon, fieldIcon } from "../../utils/ui";
|
|
122
96
|
const props = defineProps({
|
|
123
97
|
fields: { type: Object, required: true },
|
|
124
98
|
tabs: { type: Array, required: false },
|
|
@@ -139,6 +113,18 @@ const activeTab = ref(tabList.value[0]?.id ?? "");
|
|
|
139
113
|
watch(tabList, (tabs) => {
|
|
140
114
|
if (!tabs.some((tab) => tab.id === activeTab.value)) activeTab.value = tabs[0]?.id ?? "";
|
|
141
115
|
});
|
|
116
|
+
const tabbed = computed(() => tabList.value.length > 1);
|
|
117
|
+
const panelSlot = computed(() => tabbed.value ? "panel" : "default");
|
|
118
|
+
const tabsBinding = computed(
|
|
119
|
+
() => tabbed.value ? {
|
|
120
|
+
items: tabList.value.map((tab) => ({ value: tab.id, label: tab.label })),
|
|
121
|
+
modelValue: activeTab.value,
|
|
122
|
+
panelFocusable: false,
|
|
123
|
+
"onUpdate:modelValue": (value) => {
|
|
124
|
+
activeTab.value = String(value ?? "");
|
|
125
|
+
}
|
|
126
|
+
} : {}
|
|
127
|
+
);
|
|
142
128
|
const settings = useCmsSettingsState();
|
|
143
129
|
const layout = computed(
|
|
144
130
|
() => props.entryName ? entryFormLayout(props.entryName, settings.value, props.fields) : resolveFormLayout(props.fields, void 0)
|
|
@@ -165,6 +151,16 @@ function toggleSection(id) {
|
|
|
165
151
|
const section = sections.value.find((s) => s.id === id);
|
|
166
152
|
if (section) toggled.value = { ...toggled.value, [id]: !isCollapsed(section) };
|
|
167
153
|
}
|
|
154
|
+
function sectionBinding(section) {
|
|
155
|
+
if (!section.title) return {};
|
|
156
|
+
return {
|
|
157
|
+
items: [{ value: section.id, title: section.title, description: section.description }],
|
|
158
|
+
variant: "outline",
|
|
159
|
+
contentVariant: "neutral",
|
|
160
|
+
modelValue: isCollapsed(section) ? null : section.id,
|
|
161
|
+
"onUpdate:modelValue": () => toggleSection(section.id)
|
|
162
|
+
};
|
|
163
|
+
}
|
|
168
164
|
function revealField(key) {
|
|
169
165
|
for (const section of sections.value) {
|
|
170
166
|
if (section.rows.some((row) => row.includes(key)) && isCollapsed(section)) {
|
|
@@ -172,9 +168,11 @@ function revealField(key) {
|
|
|
172
168
|
}
|
|
173
169
|
}
|
|
174
170
|
}
|
|
175
|
-
function
|
|
176
|
-
const
|
|
177
|
-
|
|
171
|
+
function firstErrorKey(errors) {
|
|
172
|
+
const keys = Object.keys(errors).filter((key) => errors[key]);
|
|
173
|
+
return Object.keys(props.fields).find((key) => keys.includes(key)) ?? keys[0]?.split(".")[0] ?? "";
|
|
174
|
+
}
|
|
175
|
+
function onError(key) {
|
|
178
176
|
const field = key ? props.fields[key] : void 0;
|
|
179
177
|
if (field && tabList.value.length) {
|
|
180
178
|
const tab = fieldTab(field, tabList.value);
|
|
@@ -213,6 +211,13 @@ function warnings(values) {
|
|
|
213
211
|
props.path
|
|
214
212
|
);
|
|
215
213
|
}
|
|
214
|
+
const form = useForm({
|
|
215
|
+
values: state,
|
|
216
|
+
validator: schema,
|
|
217
|
+
warnings,
|
|
218
|
+
onSubmit: () => emit("submit"),
|
|
219
|
+
onInvalid: (errors) => onError(firstErrorKey(errors))
|
|
220
|
+
});
|
|
216
221
|
const published = computed({
|
|
217
222
|
get: () => state.value.status === "published",
|
|
218
223
|
set: (value) => {
|
|
@@ -222,7 +227,7 @@ const published = computed({
|
|
|
222
227
|
function togglePublished() {
|
|
223
228
|
published.value = !published.value;
|
|
224
229
|
}
|
|
225
|
-
const
|
|
230
|
+
const formRef = ref(null);
|
|
226
231
|
const { highlighted, reveal } = useCmsFieldFocus();
|
|
227
232
|
function applyFocus(focus) {
|
|
228
233
|
if (focus.tab && tabList.value.some((tab2) => tab2.id === focus.tab)) activeTab.value = focus.tab;
|
|
@@ -236,7 +241,7 @@ function applyFocus(focus) {
|
|
|
236
241
|
}
|
|
237
242
|
void nextTick(() => {
|
|
238
243
|
revealField(key);
|
|
239
|
-
reveal(() =>
|
|
244
|
+
reveal(() => formRef.value?.$el, key);
|
|
240
245
|
});
|
|
241
246
|
}
|
|
242
247
|
onMounted(() => {
|