@xleddyl/nuxt-cms 0.1.11 → 0.1.13
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/dist/module.json +1 -1
- package/dist/module.mjs +6 -27
- package/dist/runtime/app/components/cms/Alert.d.vue.ts +18 -0
- package/dist/runtime/app/components/cms/Alert.vue +14 -0
- package/dist/runtime/app/components/cms/Alert.vue.d.ts +18 -0
- package/dist/runtime/app/components/cms/BlocksField.vue +23 -26
- package/dist/runtime/app/components/cms/Button.d.vue.ts +25 -0
- package/dist/runtime/app/components/cms/Button.vue +33 -0
- package/dist/runtime/app/components/cms/Button.vue.d.ts +25 -0
- package/dist/runtime/app/components/cms/ConfirmModal.d.vue.ts +1 -18
- package/dist/runtime/app/components/cms/ConfirmModal.vue +20 -21
- package/dist/runtime/app/components/cms/ConfirmModal.vue.d.ts +1 -18
- package/dist/runtime/app/components/cms/DropdownMenu.d.vue.ts +29 -0
- package/dist/runtime/app/components/cms/DropdownMenu.vue +57 -0
- package/dist/runtime/app/components/cms/DropdownMenu.vue.d.ts +29 -0
- package/dist/runtime/app/components/cms/EmptyState.vue +3 -3
- package/dist/runtime/app/components/cms/EntryForm.vue +9 -22
- package/dist/runtime/app/components/cms/FieldInput.vue +15 -8
- package/dist/runtime/app/components/cms/Form.d.vue.ts +35 -0
- package/dist/runtime/app/components/cms/Form.vue +42 -0
- package/dist/runtime/app/components/cms/Form.vue.d.ts +35 -0
- package/dist/runtime/app/components/cms/FormField.d.vue.ts +21 -0
- package/dist/runtime/app/components/cms/FormField.vue +22 -0
- package/dist/runtime/app/components/cms/FormField.vue.d.ts +21 -0
- package/dist/runtime/app/components/cms/Icon.d.vue.ts +6 -0
- package/dist/runtime/app/components/cms/Icon.vue +18 -0
- package/dist/runtime/app/components/cms/Icon.vue.d.ts +6 -0
- package/dist/runtime/app/components/cms/Input.d.vue.ts +28 -0
- package/dist/runtime/app/components/cms/Input.vue +43 -0
- package/dist/runtime/app/components/cms/Input.vue.d.ts +28 -0
- package/dist/runtime/app/components/cms/JsonField.vue +3 -6
- package/dist/runtime/app/components/cms/MediaField.vue +14 -15
- package/dist/runtime/app/components/cms/MediaGallery.vue +52 -49
- package/dist/runtime/app/components/cms/MediaUpload.vue +9 -8
- package/dist/runtime/app/components/cms/Modal.d.vue.ts +34 -0
- package/dist/runtime/app/components/cms/Modal.vue +54 -0
- package/dist/runtime/app/components/cms/Modal.vue.d.ts +34 -0
- package/dist/runtime/app/components/cms/PageHeader.vue +1 -1
- package/dist/runtime/app/components/cms/Pagination.d.vue.ts +15 -0
- package/dist/runtime/app/components/cms/Pagination.vue +51 -0
- package/dist/runtime/app/components/cms/Pagination.vue.d.ts +15 -0
- package/dist/runtime/app/components/cms/Popover.d.vue.ts +22 -0
- package/dist/runtime/app/components/cms/Popover.vue +27 -0
- package/dist/runtime/app/components/cms/Popover.vue.d.ts +22 -0
- package/dist/runtime/app/components/cms/RelationField.vue +6 -6
- package/dist/runtime/app/components/cms/RichTextField.vue +38 -39
- package/dist/runtime/app/components/cms/Select.d.vue.ts +16 -0
- package/dist/runtime/app/components/cms/Select.vue +19 -0
- package/dist/runtime/app/components/cms/Select.vue.d.ts +16 -0
- package/dist/runtime/app/components/cms/SelectMenu.d.vue.ts +25 -0
- package/dist/runtime/app/components/cms/SelectMenu.vue +110 -0
- package/dist/runtime/app/components/cms/SelectMenu.vue.d.ts +25 -0
- package/dist/runtime/app/components/cms/SlugField.vue +4 -4
- package/dist/runtime/app/components/cms/Switch.d.vue.ts +10 -0
- package/dist/runtime/app/components/cms/Switch.vue +14 -0
- package/dist/runtime/app/components/cms/Switch.vue.d.ts +10 -0
- package/dist/runtime/app/components/cms/Table.d.vue.ts +48 -0
- package/dist/runtime/app/components/cms/Table.vue +47 -0
- package/dist/runtime/app/components/cms/Table.vue.d.ts +48 -0
- package/dist/runtime/app/components/cms/Textarea.d.vue.ts +16 -0
- package/dist/runtime/app/components/cms/Textarea.vue +17 -0
- package/dist/runtime/app/components/cms/Textarea.vue.d.ts +16 -0
- package/dist/runtime/app/components/cms/Toaster.d.vue.ts +3 -0
- package/dist/runtime/app/components/cms/Toaster.vue +42 -0
- package/dist/runtime/app/components/cms/Toaster.vue.d.ts +3 -0
- package/dist/runtime/app/components/cms/TranslatableField.vue +5 -5
- package/dist/runtime/app/composables/cms-confirm.d.ts +8 -0
- package/dist/runtime/app/composables/cms-confirm.js +14 -5
- package/dist/runtime/app/composables/cms-toast.d.ts +13 -0
- package/dist/runtime/app/composables/cms-toast.js +18 -0
- package/dist/runtime/app/layouts/cms-admin.vue +21 -21
- package/dist/runtime/app/middleware/cms-auth.d.ts +1 -1
- package/dist/runtime/app/pages/admin-collection.vue +40 -53
- package/dist/runtime/app/pages/admin-entry.vue +15 -19
- package/dist/runtime/app/pages/admin-login.vue +16 -24
- package/dist/runtime/app/pages/admin-media.vue +2 -3
- package/dist/runtime/app/utils/ui.d.ts +4 -0
- package/dist/runtime/app/utils/ui.js +1 -0
- package/dist/runtime/assets/main.css +1 -1
- package/dist/runtime/assets/svg/academic-cap.svg +3 -0
- package/dist/runtime/assets/svg/adjustments-horizontal.svg +3 -0
- package/dist/runtime/assets/svg/adjustments-vertical.svg +3 -0
- package/dist/runtime/assets/svg/archive-box-arrow-down.svg +3 -0
- package/dist/runtime/assets/svg/archive-box-x-mark.svg +3 -0
- package/dist/runtime/assets/svg/archive-box.svg +3 -0
- package/dist/runtime/assets/svg/arrow-down-circle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-down-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-down-on-square-stack.svg +3 -0
- package/dist/runtime/assets/svg/arrow-down-on-square.svg +3 -0
- package/dist/runtime/assets/svg/arrow-down-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-down-tray.svg +3 -0
- package/dist/runtime/assets/svg/arrow-down.svg +3 -0
- package/dist/runtime/assets/svg/arrow-left-circle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-left-end-on-rectangle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-left-on-rectangle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-left-start-on-rectangle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-long-down.svg +3 -0
- package/dist/runtime/assets/svg/arrow-long-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-long-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-long-up.svg +3 -0
- package/dist/runtime/assets/svg/arrow-path-rounded-square.svg +3 -0
- package/dist/runtime/assets/svg/arrow-path.svg +3 -0
- package/dist/runtime/assets/svg/arrow-right-circle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-right-end-on-rectangle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-right-on-rectangle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-right-start-on-rectangle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-small-down.svg +3 -0
- package/dist/runtime/assets/svg/arrow-small-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-small-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-small-up.svg +3 -0
- package/dist/runtime/assets/svg/arrow-top-right-on-square.svg +3 -0
- package/dist/runtime/assets/svg/arrow-trending-down.svg +3 -0
- package/dist/runtime/assets/svg/arrow-trending-up.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-down-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-down-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-left-down.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-left-up.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-right-down.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-right-up.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-up-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-turn-up-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-up-circle.svg +3 -0
- package/dist/runtime/assets/svg/arrow-up-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-up-on-square-stack.svg +3 -0
- package/dist/runtime/assets/svg/arrow-up-on-square.svg +3 -0
- package/dist/runtime/assets/svg/arrow-up-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-up-tray.svg +3 -0
- package/dist/runtime/assets/svg/arrow-up.svg +3 -0
- package/dist/runtime/assets/svg/arrow-uturn-down.svg +3 -0
- package/dist/runtime/assets/svg/arrow-uturn-left.svg +3 -0
- package/dist/runtime/assets/svg/arrow-uturn-right.svg +3 -0
- package/dist/runtime/assets/svg/arrow-uturn-up.svg +3 -0
- package/dist/runtime/assets/svg/arrows-pointing-in.svg +3 -0
- package/dist/runtime/assets/svg/arrows-pointing-out.svg +3 -0
- package/dist/runtime/assets/svg/arrows-right-left.svg +3 -0
- package/dist/runtime/assets/svg/arrows-up-down.svg +3 -0
- package/dist/runtime/assets/svg/at-symbol.svg +3 -0
- package/dist/runtime/assets/svg/backspace.svg +3 -0
- package/dist/runtime/assets/svg/backward.svg +3 -0
- package/dist/runtime/assets/svg/banknotes.svg +3 -0
- package/dist/runtime/assets/svg/bars-2.svg +3 -0
- package/dist/runtime/assets/svg/bars-3-bottom-left.svg +3 -0
- package/dist/runtime/assets/svg/bars-3-bottom-right.svg +3 -0
- package/dist/runtime/assets/svg/bars-3-center-left.svg +3 -0
- package/dist/runtime/assets/svg/bars-3.svg +3 -0
- package/dist/runtime/assets/svg/bars-4.svg +3 -0
- package/dist/runtime/assets/svg/bars-arrow-down.svg +3 -0
- package/dist/runtime/assets/svg/bars-arrow-up.svg +3 -0
- package/dist/runtime/assets/svg/battery-0.svg +3 -0
- package/dist/runtime/assets/svg/battery-100.svg +3 -0
- package/dist/runtime/assets/svg/battery-50.svg +3 -0
- package/dist/runtime/assets/svg/beaker.svg +3 -0
- package/dist/runtime/assets/svg/bell-alert.svg +3 -0
- package/dist/runtime/assets/svg/bell-slash.svg +3 -0
- package/dist/runtime/assets/svg/bell-snooze.svg +3 -0
- package/dist/runtime/assets/svg/bell.svg +3 -0
- package/dist/runtime/assets/svg/bold.svg +3 -0
- package/dist/runtime/assets/svg/bolt-slash.svg +3 -0
- package/dist/runtime/assets/svg/bolt.svg +3 -0
- package/dist/runtime/assets/svg/book-open.svg +3 -0
- package/dist/runtime/assets/svg/bookmark-slash.svg +3 -0
- package/dist/runtime/assets/svg/bookmark-square.svg +3 -0
- package/dist/runtime/assets/svg/bookmark.svg +3 -0
- package/dist/runtime/assets/svg/briefcase.svg +3 -0
- package/dist/runtime/assets/svg/bug-ant.svg +3 -0
- package/dist/runtime/assets/svg/building-library.svg +3 -0
- package/dist/runtime/assets/svg/building-office-2.svg +3 -0
- package/dist/runtime/assets/svg/building-office.svg +3 -0
- package/dist/runtime/assets/svg/building-storefront.svg +3 -0
- package/dist/runtime/assets/svg/cake.svg +3 -0
- package/dist/runtime/assets/svg/calculator.svg +3 -0
- package/dist/runtime/assets/svg/calendar-date-range.svg +3 -0
- package/dist/runtime/assets/svg/calendar-days.svg +3 -0
- package/dist/runtime/assets/svg/calendar.svg +3 -0
- package/dist/runtime/assets/svg/camera.svg +4 -0
- package/dist/runtime/assets/svg/chart-bar-square.svg +3 -0
- package/dist/runtime/assets/svg/chart-bar.svg +3 -0
- package/dist/runtime/assets/svg/chart-pie.svg +4 -0
- package/dist/runtime/assets/svg/chat-bubble-bottom-center-text.svg +3 -0
- package/dist/runtime/assets/svg/chat-bubble-bottom-center.svg +3 -0
- package/dist/runtime/assets/svg/chat-bubble-left-ellipsis.svg +3 -0
- package/dist/runtime/assets/svg/chat-bubble-left-right.svg +3 -0
- package/dist/runtime/assets/svg/chat-bubble-left.svg +3 -0
- package/dist/runtime/assets/svg/chat-bubble-oval-left-ellipsis.svg +3 -0
- package/dist/runtime/assets/svg/chat-bubble-oval-left.svg +3 -0
- package/dist/runtime/assets/svg/check-badge.svg +3 -0
- package/dist/runtime/assets/svg/check-circle.svg +3 -0
- package/dist/runtime/assets/svg/check.svg +3 -0
- package/dist/runtime/assets/svg/chevron-double-down.svg +3 -0
- package/dist/runtime/assets/svg/chevron-double-left.svg +3 -0
- package/dist/runtime/assets/svg/chevron-double-right.svg +3 -0
- package/dist/runtime/assets/svg/chevron-double-up.svg +4 -0
- package/dist/runtime/assets/svg/chevron-down.svg +3 -0
- package/dist/runtime/assets/svg/chevron-left.svg +3 -0
- package/dist/runtime/assets/svg/chevron-right.svg +3 -0
- package/dist/runtime/assets/svg/chevron-up-down.svg +3 -0
- package/dist/runtime/assets/svg/chevron-up.svg +3 -0
- package/dist/runtime/assets/svg/circle-stack.svg +3 -0
- package/dist/runtime/assets/svg/clipboard-document-check.svg +3 -0
- package/dist/runtime/assets/svg/clipboard-document-list.svg +3 -0
- package/dist/runtime/assets/svg/clipboard-document.svg +3 -0
- package/dist/runtime/assets/svg/clipboard.svg +3 -0
- package/dist/runtime/assets/svg/clock.svg +3 -0
- package/dist/runtime/assets/svg/cloud-arrow-down.svg +3 -0
- package/dist/runtime/assets/svg/cloud-arrow-up.svg +3 -0
- package/dist/runtime/assets/svg/cloud.svg +3 -0
- package/dist/runtime/assets/svg/code-bracket-square.svg +3 -0
- package/dist/runtime/assets/svg/code-bracket.svg +3 -0
- package/dist/runtime/assets/svg/cog-6-tooth.svg +4 -0
- package/dist/runtime/assets/svg/cog-8-tooth.svg +4 -0
- package/dist/runtime/assets/svg/cog.svg +3 -0
- package/dist/runtime/assets/svg/command-line.svg +3 -0
- package/dist/runtime/assets/svg/computer-desktop.svg +3 -0
- package/dist/runtime/assets/svg/cpu-chip.svg +3 -0
- package/dist/runtime/assets/svg/credit-card.svg +3 -0
- package/dist/runtime/assets/svg/cube-transparent.svg +3 -0
- package/dist/runtime/assets/svg/cube.svg +3 -0
- package/dist/runtime/assets/svg/currency-bangladeshi.svg +3 -0
- package/dist/runtime/assets/svg/currency-dollar.svg +3 -0
- package/dist/runtime/assets/svg/currency-euro.svg +3 -0
- package/dist/runtime/assets/svg/currency-pound.svg +3 -0
- package/dist/runtime/assets/svg/currency-rupee.svg +3 -0
- package/dist/runtime/assets/svg/currency-yen.svg +3 -0
- package/dist/runtime/assets/svg/cursor-arrow-rays.svg +3 -0
- package/dist/runtime/assets/svg/cursor-arrow-ripple.svg +3 -0
- package/dist/runtime/assets/svg/device-phone-mobile.svg +3 -0
- package/dist/runtime/assets/svg/device-tablet.svg +3 -0
- package/dist/runtime/assets/svg/divide.svg +3 -0
- package/dist/runtime/assets/svg/document-arrow-down.svg +3 -0
- package/dist/runtime/assets/svg/document-arrow-up.svg +3 -0
- package/dist/runtime/assets/svg/document-chart-bar.svg +3 -0
- package/dist/runtime/assets/svg/document-check.svg +3 -0
- package/dist/runtime/assets/svg/document-currency-bangladeshi.svg +3 -0
- package/dist/runtime/assets/svg/document-currency-dollar.svg +3 -0
- package/dist/runtime/assets/svg/document-currency-euro.svg +3 -0
- package/dist/runtime/assets/svg/document-currency-pound.svg +3 -0
- package/dist/runtime/assets/svg/document-currency-rupee.svg +3 -0
- package/dist/runtime/assets/svg/document-currency-yen.svg +3 -0
- package/dist/runtime/assets/svg/document-duplicate.svg +3 -0
- package/dist/runtime/assets/svg/document-magnifying-glass.svg +3 -0
- package/dist/runtime/assets/svg/document-minus.svg +3 -0
- package/dist/runtime/assets/svg/document-plus.svg +3 -0
- package/dist/runtime/assets/svg/document-text.svg +3 -0
- package/dist/runtime/assets/svg/document.svg +3 -0
- package/dist/runtime/assets/svg/ellipsis-horizontal-circle.svg +3 -0
- package/dist/runtime/assets/svg/ellipsis-horizontal.svg +3 -0
- package/dist/runtime/assets/svg/ellipsis-vertical.svg +3 -0
- package/dist/runtime/assets/svg/envelope-open.svg +3 -0
- package/dist/runtime/assets/svg/envelope.svg +3 -0
- package/dist/runtime/assets/svg/equals.svg +3 -0
- package/dist/runtime/assets/svg/exclamation-circle.svg +3 -0
- package/dist/runtime/assets/svg/exclamation-triangle.svg +3 -0
- package/dist/runtime/assets/svg/eye-dropper.svg +3 -0
- package/dist/runtime/assets/svg/eye-slash.svg +3 -0
- package/dist/runtime/assets/svg/eye.svg +4 -0
- package/dist/runtime/assets/svg/face-frown.svg +3 -0
- package/dist/runtime/assets/svg/face-smile.svg +3 -0
- package/dist/runtime/assets/svg/film.svg +3 -0
- package/dist/runtime/assets/svg/finger-print.svg +3 -0
- package/dist/runtime/assets/svg/fire.svg +4 -0
- package/dist/runtime/assets/svg/flag.svg +3 -0
- package/dist/runtime/assets/svg/folder-arrow-down.svg +3 -0
- package/dist/runtime/assets/svg/folder-minus.svg +3 -0
- package/dist/runtime/assets/svg/folder-open.svg +3 -0
- package/dist/runtime/assets/svg/folder-plus.svg +3 -0
- package/dist/runtime/assets/svg/folder.svg +3 -0
- package/dist/runtime/assets/svg/forward.svg +3 -0
- package/dist/runtime/assets/svg/funnel.svg +3 -0
- package/dist/runtime/assets/svg/gif.svg +3 -0
- package/dist/runtime/assets/svg/gift-top.svg +3 -0
- package/dist/runtime/assets/svg/gift.svg +3 -0
- package/dist/runtime/assets/svg/globe-alt.svg +3 -0
- package/dist/runtime/assets/svg/globe-americas.svg +3 -0
- package/dist/runtime/assets/svg/globe-asia-australia.svg +3 -0
- package/dist/runtime/assets/svg/globe-europe-africa.svg +3 -0
- package/dist/runtime/assets/svg/h1.svg +3 -0
- package/dist/runtime/assets/svg/h2.svg +3 -0
- package/dist/runtime/assets/svg/h3.svg +3 -0
- package/dist/runtime/assets/svg/hand-raised.svg +3 -0
- package/dist/runtime/assets/svg/hand-thumb-down.svg +3 -0
- package/dist/runtime/assets/svg/hand-thumb-up.svg +3 -0
- package/dist/runtime/assets/svg/hashtag.svg +3 -0
- package/dist/runtime/assets/svg/heart.svg +3 -0
- package/dist/runtime/assets/svg/home-modern.svg +3 -0
- package/dist/runtime/assets/svg/home.svg +3 -0
- package/dist/runtime/assets/svg/identification.svg +3 -0
- package/dist/runtime/assets/svg/inbox-arrow-down.svg +3 -0
- package/dist/runtime/assets/svg/inbox-stack.svg +3 -0
- package/dist/runtime/assets/svg/inbox.svg +3 -0
- package/dist/runtime/assets/svg/information-circle.svg +3 -0
- package/dist/runtime/assets/svg/italic.svg +3 -0
- package/dist/runtime/assets/svg/key.svg +3 -0
- package/dist/runtime/assets/svg/language.svg +3 -0
- package/dist/runtime/assets/svg/lifebuoy.svg +3 -0
- package/dist/runtime/assets/svg/light-bulb.svg +3 -0
- package/dist/runtime/assets/svg/link-slash.svg +3 -0
- package/dist/runtime/assets/svg/link.svg +3 -0
- package/dist/runtime/assets/svg/list-bullet.svg +3 -0
- package/dist/runtime/assets/svg/lock-closed.svg +3 -0
- package/dist/runtime/assets/svg/lock-open.svg +3 -0
- package/dist/runtime/assets/svg/magnifying-glass-circle.svg +3 -0
- package/dist/runtime/assets/svg/magnifying-glass-minus.svg +3 -0
- package/dist/runtime/assets/svg/magnifying-glass-plus.svg +3 -0
- package/dist/runtime/assets/svg/magnifying-glass.svg +3 -0
- package/dist/runtime/assets/svg/map-pin.svg +4 -0
- package/dist/runtime/assets/svg/map.svg +3 -0
- package/dist/runtime/assets/svg/megaphone.svg +3 -0
- package/dist/runtime/assets/svg/microphone.svg +3 -0
- package/dist/runtime/assets/svg/minus-circle.svg +3 -0
- package/dist/runtime/assets/svg/minus-small.svg +3 -0
- package/dist/runtime/assets/svg/minus.svg +3 -0
- package/dist/runtime/assets/svg/moon.svg +3 -0
- package/dist/runtime/assets/svg/musical-note.svg +3 -0
- package/dist/runtime/assets/svg/newspaper.svg +3 -0
- package/dist/runtime/assets/svg/no-symbol.svg +3 -0
- package/dist/runtime/assets/svg/numbered-list.svg +3 -0
- package/dist/runtime/assets/svg/paint-brush.svg +3 -0
- package/dist/runtime/assets/svg/paper-airplane.svg +3 -0
- package/dist/runtime/assets/svg/paper-clip.svg +3 -0
- package/dist/runtime/assets/svg/pause-circle.svg +3 -0
- package/dist/runtime/assets/svg/pause.svg +3 -0
- package/dist/runtime/assets/svg/pencil-square.svg +3 -0
- package/dist/runtime/assets/svg/pencil.svg +3 -0
- package/dist/runtime/assets/svg/percent-badge.svg +3 -0
- package/dist/runtime/assets/svg/phone-arrow-down-left.svg +3 -0
- package/dist/runtime/assets/svg/phone-arrow-up-right.svg +3 -0
- package/dist/runtime/assets/svg/phone-x-mark.svg +3 -0
- package/dist/runtime/assets/svg/phone.svg +3 -0
- package/dist/runtime/assets/svg/photo.svg +3 -0
- package/dist/runtime/assets/svg/play-circle.svg +4 -0
- package/dist/runtime/assets/svg/play-pause.svg +3 -0
- package/dist/runtime/assets/svg/play.svg +3 -0
- package/dist/runtime/assets/svg/plus-circle.svg +3 -0
- package/dist/runtime/assets/svg/plus-small.svg +3 -0
- package/dist/runtime/assets/svg/plus.svg +3 -0
- package/dist/runtime/assets/svg/power.svg +3 -0
- package/dist/runtime/assets/svg/presentation-chart-bar.svg +3 -0
- package/dist/runtime/assets/svg/presentation-chart-line.svg +3 -0
- package/dist/runtime/assets/svg/printer.svg +3 -0
- package/dist/runtime/assets/svg/puzzle-piece.svg +3 -0
- package/dist/runtime/assets/svg/qr-code.svg +4 -0
- package/dist/runtime/assets/svg/question-mark-circle.svg +3 -0
- package/dist/runtime/assets/svg/queue-list.svg +3 -0
- package/dist/runtime/assets/svg/radio.svg +3 -0
- package/dist/runtime/assets/svg/receipt-percent.svg +3 -0
- package/dist/runtime/assets/svg/receipt-refund.svg +3 -0
- package/dist/runtime/assets/svg/rectangle-group.svg +3 -0
- package/dist/runtime/assets/svg/rectangle-stack.svg +3 -0
- package/dist/runtime/assets/svg/rocket-launch.svg +3 -0
- package/dist/runtime/assets/svg/rss.svg +3 -0
- package/dist/runtime/assets/svg/scale.svg +3 -0
- package/dist/runtime/assets/svg/scissors.svg +3 -0
- package/dist/runtime/assets/svg/server-stack.svg +3 -0
- package/dist/runtime/assets/svg/server.svg +3 -0
- package/dist/runtime/assets/svg/share.svg +3 -0
- package/dist/runtime/assets/svg/shield-check.svg +3 -0
- package/dist/runtime/assets/svg/shield-exclamation.svg +3 -0
- package/dist/runtime/assets/svg/shopping-bag.svg +3 -0
- package/dist/runtime/assets/svg/shopping-cart.svg +3 -0
- package/dist/runtime/assets/svg/signal-slash.svg +3 -0
- package/dist/runtime/assets/svg/signal.svg +3 -0
- package/dist/runtime/assets/svg/slash.svg +3 -0
- package/dist/runtime/assets/svg/sparkles.svg +3 -0
- package/dist/runtime/assets/svg/speaker-wave.svg +3 -0
- package/dist/runtime/assets/svg/speaker-x-mark.svg +3 -0
- package/dist/runtime/assets/svg/square-2-stack.svg +3 -0
- package/dist/runtime/assets/svg/square-3-stack-3d.svg +3 -0
- package/dist/runtime/assets/svg/squares-2x2.svg +3 -0
- package/dist/runtime/assets/svg/squares-plus.svg +3 -0
- package/dist/runtime/assets/svg/star.svg +3 -0
- package/dist/runtime/assets/svg/stop-circle.svg +4 -0
- package/dist/runtime/assets/svg/stop.svg +3 -0
- package/dist/runtime/assets/svg/strikethrough.svg +3 -0
- package/dist/runtime/assets/svg/sun.svg +3 -0
- package/dist/runtime/assets/svg/swatch.svg +3 -0
- package/dist/runtime/assets/svg/table-cells.svg +3 -0
- package/dist/runtime/assets/svg/tag.svg +4 -0
- package/dist/runtime/assets/svg/ticket.svg +3 -0
- package/dist/runtime/assets/svg/trash.svg +3 -0
- package/dist/runtime/assets/svg/trophy.svg +3 -0
- package/dist/runtime/assets/svg/truck.svg +3 -0
- package/dist/runtime/assets/svg/tv.svg +3 -0
- package/dist/runtime/assets/svg/underline.svg +3 -0
- package/dist/runtime/assets/svg/user-circle.svg +3 -0
- package/dist/runtime/assets/svg/user-group.svg +3 -0
- package/dist/runtime/assets/svg/user-minus.svg +3 -0
- package/dist/runtime/assets/svg/user-plus.svg +3 -0
- package/dist/runtime/assets/svg/user.svg +3 -0
- package/dist/runtime/assets/svg/users.svg +3 -0
- package/dist/runtime/assets/svg/variable.svg +3 -0
- package/dist/runtime/assets/svg/video-camera-slash.svg +3 -0
- package/dist/runtime/assets/svg/video-camera.svg +3 -0
- package/dist/runtime/assets/svg/view-columns.svg +3 -0
- package/dist/runtime/assets/svg/viewfinder-circle.svg +3 -0
- package/dist/runtime/assets/svg/wallet.svg +3 -0
- package/dist/runtime/assets/svg/wifi.svg +3 -0
- package/dist/runtime/assets/svg/window.svg +3 -0
- package/dist/runtime/assets/svg/wrench-screwdriver.svg +3 -0
- package/dist/runtime/assets/svg/wrench.svg +4 -0
- package/dist/runtime/assets/svg/x-circle.svg +3 -0
- package/dist/runtime/assets/svg/x-mark.svg +3 -0
- package/dist/runtime/shared/index.js +1 -1
- package/package.json +4 -3
- package/dist/runtime/app/i18n/en.json +0 -123
- package/dist/runtime/app/i18n/it.json +0 -123
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,7 +3,9 @@ import { existsSync } from 'node:fs';
|
|
|
3
3
|
import { createRequire } from 'node:module';
|
|
4
4
|
import { isAbsolute, resolve, relative, join, dirname } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { defineNuxtModule, createResolver, useLogger, resolvePath, addTemplate, addImports, addServerPlugin, addTypeTemplate, addLayout, addComponentsDir, addRouteMiddleware, extendPages, addServerHandler } from '@nuxt/kit';
|
|
6
|
+
import { defineNuxtModule, createResolver, useLogger, resolvePath, addTemplate, addImports, addServerPlugin, addTypeTemplate, addVitePlugin, addLayout, addComponentsDir, addRouteMiddleware, extendPages, addServerHandler } from '@nuxt/kit';
|
|
7
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
8
|
+
import svgLoader from 'vite-svg-loader';
|
|
7
9
|
import { introspectionFromSchema, buildSchema } from 'graphql';
|
|
8
10
|
import { minifyIntrospection, outputIntrospectionFile } from 'gql.tada/internal';
|
|
9
11
|
import { createJiti } from 'jiti';
|
|
@@ -397,23 +399,7 @@ const module$1 = defineNuxtModule({
|
|
|
397
399
|
configKey: "cms"
|
|
398
400
|
},
|
|
399
401
|
moduleDependencies: {
|
|
400
|
-
"
|
|
401
|
-
"nuxt-auth-utils": {},
|
|
402
|
-
"@nuxtjs/i18n": {
|
|
403
|
-
defaults: {
|
|
404
|
-
locales: [
|
|
405
|
-
{ code: "en", name: "English" },
|
|
406
|
-
{ code: "it", name: "Italiano" }
|
|
407
|
-
],
|
|
408
|
-
defaultLocale: "en",
|
|
409
|
-
strategy: "no_prefix",
|
|
410
|
-
detectBrowserLanguage: {
|
|
411
|
-
useCookie: true,
|
|
412
|
-
cookieKey: "cms-locale",
|
|
413
|
-
fallbackLocale: "en"
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
402
|
+
"nuxt-auth-utils": {}
|
|
417
403
|
},
|
|
418
404
|
defaults: {
|
|
419
405
|
configPath: "cms.config",
|
|
@@ -548,15 +534,6 @@ const module$1 = defineNuxtModule({
|
|
|
548
534
|
{ name: "useCms", from: resolver.resolve("./runtime/app/composables/cms-query") },
|
|
549
535
|
{ name: "$cmsQuery", from: resolver.resolve("./runtime/app/composables/cms-query") }
|
|
550
536
|
]);
|
|
551
|
-
nuxt.hook("i18n:registerModule", (register) => {
|
|
552
|
-
register({
|
|
553
|
-
langDir: resolver.resolve("./runtime/app/i18n"),
|
|
554
|
-
locales: [
|
|
555
|
-
{ code: "en", file: "en.json" },
|
|
556
|
-
{ code: "it", file: "it.json" }
|
|
557
|
-
]
|
|
558
|
-
});
|
|
559
|
-
});
|
|
560
537
|
const {
|
|
561
538
|
driver = "sqlite",
|
|
562
539
|
path: dbPath = "data/cms.db",
|
|
@@ -664,6 +641,8 @@ const module$1 = defineNuxtModule({
|
|
|
664
641
|
},
|
|
665
642
|
{ nuxt: true, nitro: true }
|
|
666
643
|
);
|
|
644
|
+
addVitePlugin(tailwindcss());
|
|
645
|
+
addVitePlugin(svgLoader({ defaultImport: "url", svgoConfig: { plugins: ["prefixIds"] } }));
|
|
667
646
|
nuxt.options.css.push(resolver.resolve("./runtime/assets/main.css"));
|
|
668
647
|
addLayout({ src: resolver.resolve("./runtime/app/layouts/cms-admin.vue") }, "cms-admin");
|
|
669
648
|
addComponentsDir({ path: resolver.resolve("./runtime/app/components") });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
color?: 'error';
|
|
3
|
+
variant?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cms-alert" :class="`cms-alert-${color ?? 'error'}`">
|
|
3
|
+
<p v-if="title" class="font-medium">{{ title }}</p>
|
|
4
|
+
<slot />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
defineProps({
|
|
10
|
+
color: { type: String, required: false },
|
|
11
|
+
variant: { type: String, required: false },
|
|
12
|
+
title: { type: String, required: false }
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
color?: 'error';
|
|
3
|
+
variant?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -9,54 +9,52 @@
|
|
|
9
9
|
<button
|
|
10
10
|
type="button"
|
|
11
11
|
class="cms-kicker flex grow items-center gap-1.5 text-left"
|
|
12
|
-
:aria-label="
|
|
13
|
-
isCollapsed(item) ? t('cms.form.expandBlock') : t('cms.form.collapseBlock')
|
|
14
|
-
"
|
|
12
|
+
:aria-label="isCollapsed(item) ? 'Expand block' : 'Collapse block'"
|
|
15
13
|
@click="toggleCollapsed(item)"
|
|
16
14
|
>
|
|
17
|
-
<
|
|
18
|
-
:name="isCollapsed(item) ? '
|
|
15
|
+
<CmsIcon
|
|
16
|
+
:name="isCollapsed(item) ? 'chevron-right' : 'chevron-down'"
|
|
19
17
|
class="size-3.5"
|
|
20
18
|
/>
|
|
21
19
|
{{ blocks[item.type]?.label ?? item.type }}
|
|
22
20
|
</button>
|
|
23
|
-
<
|
|
24
|
-
icon="
|
|
21
|
+
<CmsButton
|
|
22
|
+
icon="chevron-up"
|
|
25
23
|
size="xs"
|
|
26
24
|
variant="ghost"
|
|
27
25
|
color="neutral"
|
|
28
|
-
|
|
26
|
+
aria-label="Move up"
|
|
29
27
|
:disabled="index === 0"
|
|
30
28
|
@click="move(index, -1)"
|
|
31
29
|
/>
|
|
32
|
-
<
|
|
33
|
-
icon="
|
|
30
|
+
<CmsButton
|
|
31
|
+
icon="chevron-down"
|
|
34
32
|
size="xs"
|
|
35
33
|
variant="ghost"
|
|
36
34
|
color="neutral"
|
|
37
|
-
|
|
35
|
+
aria-label="Move down"
|
|
38
36
|
:disabled="index === items.length - 1"
|
|
39
37
|
@click="move(index, 1)"
|
|
40
38
|
/>
|
|
41
|
-
<
|
|
42
|
-
icon="
|
|
39
|
+
<CmsButton
|
|
40
|
+
icon="document-duplicate"
|
|
43
41
|
size="xs"
|
|
44
42
|
variant="ghost"
|
|
45
43
|
color="neutral"
|
|
46
|
-
|
|
44
|
+
aria-label="Duplicate block"
|
|
47
45
|
@click="duplicate(index)"
|
|
48
46
|
/>
|
|
49
|
-
<
|
|
50
|
-
icon="
|
|
47
|
+
<CmsButton
|
|
48
|
+
icon="trash"
|
|
51
49
|
size="xs"
|
|
52
50
|
variant="ghost"
|
|
53
51
|
color="error"
|
|
54
|
-
|
|
52
|
+
aria-label="Remove block"
|
|
55
53
|
@click="remove(index)"
|
|
56
54
|
/>
|
|
57
55
|
</div>
|
|
58
56
|
<template v-if="!isCollapsed(item)">
|
|
59
|
-
<
|
|
57
|
+
<CmsFormField
|
|
60
58
|
v-for="(blockField, blockKey) in blocks[item.type]?.fields"
|
|
61
59
|
:key="blockKey"
|
|
62
60
|
:label="blockField.label"
|
|
@@ -68,28 +66,27 @@
|
|
|
68
66
|
:field="blockField"
|
|
69
67
|
@update:model-value="(value) => updateField(index, blockKey, value)"
|
|
70
68
|
/>
|
|
71
|
-
</
|
|
69
|
+
</CmsFormField>
|
|
72
70
|
</template>
|
|
73
71
|
</div>
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
icon="
|
|
72
|
+
<CmsDropdownMenu :items="addItems">
|
|
73
|
+
<CmsButton
|
|
74
|
+
label="Add block"
|
|
75
|
+
icon="plus"
|
|
78
76
|
variant="subtle"
|
|
79
77
|
class="self-start rounded-full px-4"
|
|
80
78
|
/>
|
|
81
|
-
</
|
|
79
|
+
</CmsDropdownMenu>
|
|
82
80
|
</div>
|
|
83
81
|
</template>
|
|
84
82
|
|
|
85
83
|
<script setup>
|
|
86
|
-
import { computed, ref
|
|
84
|
+
import { computed, ref } from "#imports";
|
|
87
85
|
import { CMS_FIELD_UI } from "../../utils/ui";
|
|
88
86
|
const props = defineProps({
|
|
89
87
|
field: { type: Object, required: true }
|
|
90
88
|
});
|
|
91
89
|
const model = defineModel({ type: [Array, null], ...{ required: true } });
|
|
92
|
-
const { t } = useI18n();
|
|
93
90
|
const blocks = computed(() => props.field.blocks ?? {});
|
|
94
91
|
const items = computed(() => Array.isArray(model.value) ? model.value : []);
|
|
95
92
|
let uidCounter = 0;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
type?: 'button' | 'submit' | 'reset';
|
|
4
|
+
form?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
7
|
+
color?: 'primary' | 'neutral' | 'error' | 'success';
|
|
8
|
+
variant?: 'solid' | 'subtle' | 'soft' | 'ghost';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
block?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_11: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_11) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
:type="type ?? 'button'"
|
|
4
|
+
:form="form"
|
|
5
|
+
:disabled="disabled || loading"
|
|
6
|
+
:class="[
|
|
7
|
+
'cms-btn',
|
|
8
|
+
`cms-btn-${size ?? 'md'}`,
|
|
9
|
+
`cms-btn-${color ?? 'primary'}`,
|
|
10
|
+
`cms-btn-${variant ?? 'solid'}`,
|
|
11
|
+
{ 'is-block': block }
|
|
12
|
+
]"
|
|
13
|
+
>
|
|
14
|
+
<CmsIcon v-if="loading" name="arrow-path" class="size-4 shrink-0 animate-spin" />
|
|
15
|
+
<CmsIcon v-else-if="icon" :name="icon" class="size-4 shrink-0" />
|
|
16
|
+
<slot>{{ label }}</slot>
|
|
17
|
+
</button>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
defineProps({
|
|
22
|
+
label: { type: String, required: false },
|
|
23
|
+
type: { type: String, required: false },
|
|
24
|
+
form: { type: String, required: false },
|
|
25
|
+
icon: { type: String, required: false },
|
|
26
|
+
size: { type: String, required: false },
|
|
27
|
+
color: { type: String, required: false },
|
|
28
|
+
variant: { type: String, required: false },
|
|
29
|
+
disabled: { type: Boolean, required: false },
|
|
30
|
+
loading: { type: Boolean, required: false },
|
|
31
|
+
block: { type: Boolean, required: false }
|
|
32
|
+
});
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
type?: 'button' | 'submit' | 'reset';
|
|
4
|
+
form?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
7
|
+
color?: 'primary' | 'neutral' | 'error' | 'success';
|
|
8
|
+
variant?: 'solid' | 'subtle' | 'soft' | 'ghost';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
block?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_11: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_11) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
message: string;
|
|
3
|
-
title?: string;
|
|
4
|
-
confirmLabel?: string;
|
|
5
|
-
};
|
|
6
|
-
type __VLS_ModelProps = {
|
|
7
|
-
'open'?: boolean;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
close: (value: boolean) => any;
|
|
12
|
-
"after:leave": () => any;
|
|
13
|
-
"update:open": (value: boolean) => any;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
onClose?: ((value: boolean) => any) | undefined;
|
|
16
|
-
"onAfter:leave"?: (() => any) | undefined;
|
|
17
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
2
|
declare const _default: typeof __VLS_export;
|
|
20
3
|
export default _default;
|
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
v-model:open="open"
|
|
4
|
-
:title="title ??
|
|
2
|
+
<CmsModal
|
|
3
|
+
v-model:open="state.open"
|
|
4
|
+
:title="state.title ?? 'Are you sure?'"
|
|
5
5
|
:ui="ui"
|
|
6
|
-
@after:leave="
|
|
6
|
+
@after:leave="finish(false)"
|
|
7
7
|
>
|
|
8
8
|
<template #body>
|
|
9
9
|
<div class="flex flex-col gap-5">
|
|
10
|
-
<p class="text-(--ui-text)
|
|
10
|
+
<p class="text-sm text-(--ui-text)">{{ state.message }}</p>
|
|
11
11
|
<div class="flex justify-end gap-2">
|
|
12
|
-
<
|
|
13
|
-
|
|
12
|
+
<CmsButton
|
|
13
|
+
label="Cancel"
|
|
14
14
|
variant="subtle"
|
|
15
15
|
color="neutral"
|
|
16
16
|
class="rounded-full px-4"
|
|
17
|
-
@click="
|
|
17
|
+
@click="finish(false)"
|
|
18
18
|
/>
|
|
19
|
-
<
|
|
20
|
-
:label="confirmLabel ??
|
|
19
|
+
<CmsButton
|
|
20
|
+
:label="state.confirmLabel ?? 'Confirm'"
|
|
21
21
|
color="error"
|
|
22
22
|
class="rounded-full px-4"
|
|
23
|
-
@click="
|
|
23
|
+
@click="finish(true)"
|
|
24
24
|
/>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
28
|
-
</
|
|
28
|
+
</CmsModal>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup>
|
|
32
|
-
import {
|
|
32
|
+
import { useCmsConfirmState } from "../../composables/cms-confirm";
|
|
33
33
|
import { CMS_MODAL_UI } from "../../utils/ui";
|
|
34
|
-
|
|
35
|
-
message: { type: String, required: true },
|
|
36
|
-
title: { type: String, required: false },
|
|
37
|
-
confirmLabel: { type: String, required: false }
|
|
38
|
-
});
|
|
39
|
-
const open = defineModel("open", { type: Boolean, ...{ default: true } });
|
|
40
|
-
const emit = defineEmits(["close", "after:leave"]);
|
|
41
|
-
const { t } = useI18n();
|
|
34
|
+
const state = useCmsConfirmState();
|
|
42
35
|
const ui = { ...CMS_MODAL_UI, content: "rounded-2xl shadow-xl sm:max-w-md" };
|
|
36
|
+
function finish(value) {
|
|
37
|
+
const resolve = state.value.resolve;
|
|
38
|
+
if (!resolve) return;
|
|
39
|
+
state.value = { open: false, message: "" };
|
|
40
|
+
resolve(value);
|
|
41
|
+
}
|
|
43
42
|
</script>
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
message: string;
|
|
3
|
-
title?: string;
|
|
4
|
-
confirmLabel?: string;
|
|
5
|
-
};
|
|
6
|
-
type __VLS_ModelProps = {
|
|
7
|
-
'open'?: boolean;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
close: (value: boolean) => any;
|
|
12
|
-
"after:leave": () => any;
|
|
13
|
-
"update:open": (value: boolean) => any;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
onClose?: ((value: boolean) => any) | undefined;
|
|
16
|
-
"onAfter:leave"?: (() => any) | undefined;
|
|
17
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
2
|
declare const _default: typeof __VLS_export;
|
|
20
3
|
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface MenuItem {
|
|
2
|
+
label: string;
|
|
3
|
+
type?: 'checkbox';
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onSelect?: (event: Event) => void;
|
|
6
|
+
onUpdateChecked?: (checked: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
items: MenuItem[];
|
|
10
|
+
content?: {
|
|
11
|
+
align?: 'start' | 'end';
|
|
12
|
+
};
|
|
13
|
+
ui?: {
|
|
14
|
+
content?: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare var __VLS_1: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_1) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="root" class="relative inline-flex">
|
|
3
|
+
<div class="contents" @click="open = !open">
|
|
4
|
+
<slot />
|
|
5
|
+
</div>
|
|
6
|
+
<div
|
|
7
|
+
v-if="open"
|
|
8
|
+
class="cms-menu"
|
|
9
|
+
:class="[content?.align === 'end' && 'align-end', ui?.content]"
|
|
10
|
+
>
|
|
11
|
+
<button
|
|
12
|
+
v-for="(item, index) in items"
|
|
13
|
+
:key="index"
|
|
14
|
+
type="button"
|
|
15
|
+
class="cms-menu-item"
|
|
16
|
+
@click="onClick(item, $event)"
|
|
17
|
+
>
|
|
18
|
+
<span>{{ item.label }}</span>
|
|
19
|
+
<CmsIcon
|
|
20
|
+
v-if="item.type === 'checkbox' && item.checked"
|
|
21
|
+
name="check"
|
|
22
|
+
class="cms-menu-check size-3.5"
|
|
23
|
+
/>
|
|
24
|
+
</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { onBeforeUnmount, ref, watch } from "#imports";
|
|
31
|
+
defineProps({
|
|
32
|
+
items: { type: Array, required: true },
|
|
33
|
+
content: { type: Object, required: false },
|
|
34
|
+
ui: { type: Object, required: false }
|
|
35
|
+
});
|
|
36
|
+
const open = ref(false);
|
|
37
|
+
const root = ref(null);
|
|
38
|
+
function onClick(item, event) {
|
|
39
|
+
if (item.type === "checkbox") {
|
|
40
|
+
item.onUpdateChecked?.(!item.checked);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
item.onSelect?.(event);
|
|
44
|
+
if (!event.defaultPrevented) open.value = false;
|
|
45
|
+
}
|
|
46
|
+
function onOutside(event) {
|
|
47
|
+
if (root.value && !root.value.contains(event.target)) open.value = false;
|
|
48
|
+
}
|
|
49
|
+
watch(open, (value) => {
|
|
50
|
+
if (import.meta.server) return;
|
|
51
|
+
if (value) document.addEventListener("click", onOutside, true);
|
|
52
|
+
else document.removeEventListener("click", onOutside, true);
|
|
53
|
+
});
|
|
54
|
+
onBeforeUnmount(() => {
|
|
55
|
+
if (import.meta.client) document.removeEventListener("click", onOutside, true);
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface MenuItem {
|
|
2
|
+
label: string;
|
|
3
|
+
type?: 'checkbox';
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onSelect?: (event: Event) => void;
|
|
6
|
+
onUpdateChecked?: (checked: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
items: MenuItem[];
|
|
10
|
+
content?: {
|
|
11
|
+
align?: 'start' | 'end';
|
|
12
|
+
};
|
|
13
|
+
ui?: {
|
|
14
|
+
content?: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare var __VLS_1: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_1) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cms-empty flex flex-col items-center gap-2 p-14 text-center">
|
|
3
|
-
<
|
|
4
|
-
<p class="cms-display text-(--ui-text-highlighted)
|
|
3
|
+
<CmsIcon :name="icon" class="mb-1 size-6 text-(--cms-fern)" />
|
|
4
|
+
<p class="cms-display text-xl text-(--ui-text-highlighted)">
|
|
5
5
|
{{ title }}<span class="text-(--cms-fern)">.</span>
|
|
6
6
|
</p>
|
|
7
|
-
<p v-if="body" class="text-(--ui-text-muted)
|
|
7
|
+
<p v-if="body" class="max-w-md text-sm text-(--ui-text-muted)">
|
|
8
8
|
{{ body }}
|
|
9
9
|
</p>
|
|
10
10
|
<slot />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<CmsForm
|
|
3
3
|
:id="formId"
|
|
4
4
|
:state="state"
|
|
5
5
|
:schema="schema"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@submit="emit('submit')"
|
|
8
8
|
@error="emit('error')"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
10
|
+
<CmsFormField
|
|
11
11
|
v-for="(field, key) in fields"
|
|
12
12
|
:key="key"
|
|
13
13
|
:label="field.label"
|
|
@@ -20,28 +20,23 @@
|
|
|
20
20
|
:field="field"
|
|
21
21
|
:slug-source="field.from ? state[field.from] : void 0"
|
|
22
22
|
/>
|
|
23
|
-
</
|
|
23
|
+
</CmsFormField>
|
|
24
24
|
<div v-if="footer" class="flex items-center justify-end gap-3 pt-1">
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
:label="t('cms.form.save')"
|
|
28
|
-
:loading="loading"
|
|
29
|
-
class="rounded-full px-6"
|
|
30
|
-
/>
|
|
31
|
-
<UButton
|
|
25
|
+
<CmsButton type="submit" label="Save" :loading="loading" class="rounded-full px-6" />
|
|
26
|
+
<CmsButton
|
|
32
27
|
v-if="drafts"
|
|
33
28
|
type="submit"
|
|
34
|
-
:label="published ?
|
|
29
|
+
:label="published ? 'Make draft' : 'Publish'"
|
|
35
30
|
:loading="loading"
|
|
36
31
|
class="rounded-full px-6"
|
|
37
32
|
@click="togglePublished"
|
|
38
33
|
/>
|
|
39
34
|
</div>
|
|
40
|
-
</
|
|
35
|
+
</CmsForm>
|
|
41
36
|
</template>
|
|
42
37
|
|
|
43
38
|
<script setup>
|
|
44
|
-
import { computed
|
|
39
|
+
import { computed } from "#imports";
|
|
45
40
|
import { buildEntrySchema } from "../../../shared/validation";
|
|
46
41
|
import { useCmsRuntime } from "../../composables/cms-runtime";
|
|
47
42
|
import { CMS_FIELD_UI } from "../../utils/ui";
|
|
@@ -54,17 +49,9 @@ const props = defineProps({
|
|
|
54
49
|
});
|
|
55
50
|
const state = defineModel({ type: Object, ...{ required: true } });
|
|
56
51
|
const emit = defineEmits(["submit", "error"]);
|
|
57
|
-
const { t } = useI18n();
|
|
58
52
|
const { i18n } = useCmsRuntime();
|
|
59
53
|
const schema = computed(
|
|
60
|
-
() => buildEntrySchema({ fields: props.fields, drafts: props.drafts }, i18n
|
|
61
|
-
required: t("cms.validation.required"),
|
|
62
|
-
invalidDate: t("cms.validation.invalidDate"),
|
|
63
|
-
invalidEmail: t("cms.validation.invalidEmail"),
|
|
64
|
-
invalidSlug: t("cms.validation.invalidSlug"),
|
|
65
|
-
unknownLocale: t("cms.validation.unknownLocale"),
|
|
66
|
-
requiredLocale: (locale) => t("cms.validation.requiredLocale", { locale })
|
|
67
|
-
})
|
|
54
|
+
() => buildEntrySchema({ fields: props.fields, drafts: props.drafts }, i18n)
|
|
68
55
|
);
|
|
69
56
|
const published = computed({
|
|
70
57
|
get: () => state.value.status === "published",
|