@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
|
@@ -2,41 +2,48 @@
|
|
|
2
2
|
<CmsTranslatableField v-if="isTranslatableField(field)" v-model="translatable" :field="field" />
|
|
3
3
|
<CmsBlocksField v-else-if="field.type === 'blocks'" v-model="blocksValue" :field="field" />
|
|
4
4
|
<CmsRichTextField v-else-if="field.type === 'richtext'" v-model="strOrNull" />
|
|
5
|
-
<
|
|
5
|
+
<CmsTextarea
|
|
6
6
|
v-else-if="field.type === 'text' && field.textarea"
|
|
7
7
|
v-model="str"
|
|
8
8
|
:rows="4"
|
|
9
9
|
size="lg"
|
|
10
10
|
class="w-full"
|
|
11
11
|
/>
|
|
12
|
-
<
|
|
13
|
-
<
|
|
12
|
+
<CmsInput v-else-if="field.type === 'text'" v-model="str" size="lg" class="w-full" />
|
|
13
|
+
<CmsInput
|
|
14
|
+
v-else-if="field.type === 'email'"
|
|
15
|
+
v-model="str"
|
|
16
|
+
type="email"
|
|
17
|
+
size="lg"
|
|
18
|
+
class="w-full"
|
|
19
|
+
/>
|
|
14
20
|
<CmsSlugField v-else-if="field.type === 'slug'" v-model="strOrNull" :source="slugSource" />
|
|
15
|
-
<
|
|
21
|
+
<CmsSelect
|
|
16
22
|
v-else-if="field.type === 'select'"
|
|
17
23
|
v-model="sel"
|
|
18
24
|
:items="field.options"
|
|
25
|
+
:required="field.required"
|
|
19
26
|
size="lg"
|
|
20
27
|
class="w-full"
|
|
21
28
|
/>
|
|
22
|
-
<
|
|
29
|
+
<CmsSwitch
|
|
23
30
|
v-else-if="field.type === 'boolean'"
|
|
24
31
|
:model-value="!!model"
|
|
25
32
|
@update:model-value="
|
|
26
33
|
(v) => {
|
|
27
|
-
model = v;
|
|
34
|
+
model = !!v;
|
|
28
35
|
}
|
|
29
36
|
"
|
|
30
37
|
/>
|
|
31
38
|
<CmsJsonField v-else-if="field.type === 'json'" v-model="jsonValue" />
|
|
32
|
-
<
|
|
39
|
+
<CmsInput
|
|
33
40
|
v-else-if="field.type === 'number'"
|
|
34
41
|
v-model.number="num"
|
|
35
42
|
type="number"
|
|
36
43
|
size="lg"
|
|
37
44
|
class="w-full"
|
|
38
45
|
/>
|
|
39
|
-
<
|
|
46
|
+
<CmsInput v-else-if="field.type === 'date'" v-model="str" type="date" size="lg" class="w-full" />
|
|
40
47
|
<CmsRelationField
|
|
41
48
|
v-else-if="field.type === 'relation'"
|
|
42
49
|
v-model="relationValue"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface ParseResult {
|
|
2
|
+
success: boolean;
|
|
3
|
+
error?: {
|
|
4
|
+
issues: readonly {
|
|
5
|
+
path: readonly PropertyKey[];
|
|
6
|
+
message: string;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
id?: string;
|
|
12
|
+
state: Record<string, unknown>;
|
|
13
|
+
schema?: {
|
|
14
|
+
safeParse: (value: unknown) => ParseResult;
|
|
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, {
|
|
22
|
+
error: () => any;
|
|
23
|
+
submit: () => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onError?: (() => any) | undefined;
|
|
26
|
+
onSubmit?: (() => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form :id="id" @submit.prevent="onSubmit">
|
|
3
|
+
<slot />
|
|
4
|
+
</form>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { provide, reactive, watch } from "#imports";
|
|
9
|
+
import { CMS_FORM_ERRORS } from "../../utils/ui";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
id: { type: String, required: false },
|
|
12
|
+
state: { type: Object, required: true },
|
|
13
|
+
schema: { type: Object, required: false }
|
|
14
|
+
});
|
|
15
|
+
const emit = defineEmits(["submit", "error"]);
|
|
16
|
+
const errors = reactive({});
|
|
17
|
+
provide(CMS_FORM_ERRORS, errors);
|
|
18
|
+
let submitted = false;
|
|
19
|
+
function validate() {
|
|
20
|
+
for (const key of Object.keys(errors)) delete errors[key];
|
|
21
|
+
if (!props.schema) return true;
|
|
22
|
+
const result = props.schema.safeParse(props.state);
|
|
23
|
+
if (result.success) return true;
|
|
24
|
+
for (const issue of result.error?.issues ?? []) {
|
|
25
|
+
const key = String(issue.path[0] ?? "");
|
|
26
|
+
if (key && !errors[key]) errors[key] = issue.message;
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
function onSubmit() {
|
|
31
|
+
submitted = true;
|
|
32
|
+
if (validate()) emit("submit");
|
|
33
|
+
else emit("error");
|
|
34
|
+
}
|
|
35
|
+
watch(
|
|
36
|
+
() => props.state,
|
|
37
|
+
() => {
|
|
38
|
+
if (submitted) validate();
|
|
39
|
+
},
|
|
40
|
+
{ deep: true }
|
|
41
|
+
);
|
|
42
|
+
</script>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface ParseResult {
|
|
2
|
+
success: boolean;
|
|
3
|
+
error?: {
|
|
4
|
+
issues: readonly {
|
|
5
|
+
path: readonly PropertyKey[];
|
|
6
|
+
message: string;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
id?: string;
|
|
12
|
+
state: Record<string, unknown>;
|
|
13
|
+
schema?: {
|
|
14
|
+
safeParse: (value: unknown) => ParseResult;
|
|
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, {
|
|
22
|
+
error: () => any;
|
|
23
|
+
submit: () => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onError?: (() => any) | undefined;
|
|
26
|
+
onSubmit?: (() => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
ui?: {
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
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>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-1.5">
|
|
3
|
+
<label v-if="label" :class="ui?.label ?? 'text-[13px] font-medium text-(--ui-text-toned)'">
|
|
4
|
+
{{ label }}<span v-if="required" class="text-(--ui-error)"> *</span>
|
|
5
|
+
</label>
|
|
6
|
+
<slot />
|
|
7
|
+
<p v-if="error" class="text-xs text-(--ui-error)">{{ error }}</p>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { computed, inject } from "#imports";
|
|
13
|
+
import { CMS_FORM_ERRORS } from "../../utils/ui";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
label: { type: String, required: false },
|
|
16
|
+
name: { type: String, required: false },
|
|
17
|
+
required: { type: Boolean, required: false },
|
|
18
|
+
ui: { type: Object, required: false }
|
|
19
|
+
});
|
|
20
|
+
const errors = inject(CMS_FORM_ERRORS, null);
|
|
21
|
+
const error = computed(() => props.name && errors ? errors[props.name] : void 0);
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
ui?: {
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
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>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="icon" v-if="icon" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { defineAsyncComponent, shallowRef, watch } from "#imports";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
name: { type: String, required: true }
|
|
9
|
+
});
|
|
10
|
+
const icon = shallowRef();
|
|
11
|
+
watch(
|
|
12
|
+
() => props.name,
|
|
13
|
+
(name) => {
|
|
14
|
+
icon.value = name ? defineAsyncComponent(() => import(`../../../assets/svg/${name}.svg?component`)) : void 0;
|
|
15
|
+
},
|
|
16
|
+
{ immediate: true }
|
|
17
|
+
);
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
type?: string;
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
icon?: string;
|
|
5
|
+
color?: 'error';
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: string | number | null;
|
|
9
|
+
'modelModifiers'?: Partial<Record<'number', true>>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare var __VLS_6: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
trailing?: (props: typeof __VLS_6) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: string | number | null | undefined) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cms-input-wrap" :class="[$attrs.class, { 'has-lead': icon }]">
|
|
3
|
+
<span v-if="icon" class="cms-input-lead">
|
|
4
|
+
<CmsIcon :name="icon" class="size-4" />
|
|
5
|
+
</span>
|
|
6
|
+
<input
|
|
7
|
+
v-bind="inputAttrs"
|
|
8
|
+
:type="type ?? 'text'"
|
|
9
|
+
:value="model ?? ''"
|
|
10
|
+
:class="['cms-field', `cms-field-${size ?? 'md'}`, { 'is-error': color === 'error' }]"
|
|
11
|
+
@input="onInput"
|
|
12
|
+
/>
|
|
13
|
+
<span v-if="$slots.trailing" class="cms-input-trail">
|
|
14
|
+
<slot name="trailing" />
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { computed, useAttrs } from "#imports";
|
|
21
|
+
defineOptions({ inheritAttrs: false });
|
|
22
|
+
defineProps({
|
|
23
|
+
type: { type: String, required: false },
|
|
24
|
+
size: { type: String, required: false },
|
|
25
|
+
icon: { type: String, required: false },
|
|
26
|
+
color: { type: String, required: false }
|
|
27
|
+
});
|
|
28
|
+
const [model, modifiers] = defineModel({ type: [String, Number, null] });
|
|
29
|
+
const attrs = useAttrs();
|
|
30
|
+
const inputAttrs = computed(() => {
|
|
31
|
+
const { class: _class, style: _style, ...rest } = attrs;
|
|
32
|
+
return rest;
|
|
33
|
+
});
|
|
34
|
+
function onInput(event) {
|
|
35
|
+
const value = event.target.value;
|
|
36
|
+
if (modifiers.number) {
|
|
37
|
+
const parsed = Number.parseFloat(value);
|
|
38
|
+
model.value = value === "" ? null : Number.isNaN(parsed) ? value : parsed;
|
|
39
|
+
} else {
|
|
40
|
+
model.value = value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
type?: string;
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
icon?: string;
|
|
5
|
+
color?: 'error';
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: string | number | null;
|
|
9
|
+
'modelModifiers'?: Partial<Record<'number', true>>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare var __VLS_6: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
trailing?: (props: typeof __VLS_6) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: string | number | null | undefined) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex flex-col gap-1">
|
|
3
|
-
<
|
|
3
|
+
<CmsTextarea
|
|
4
4
|
v-model="text"
|
|
5
5
|
:rows="6"
|
|
6
6
|
size="lg"
|
|
@@ -9,16 +9,13 @@
|
|
|
9
9
|
@blur="commit"
|
|
10
10
|
@update:model-value="invalid = false"
|
|
11
11
|
/>
|
|
12
|
-
<p v-if="invalid" class="text-(--ui-error)
|
|
13
|
-
{{ t("cms.form.invalidJson") }}
|
|
14
|
-
</p>
|
|
12
|
+
<p v-if="invalid" class="text-xs text-(--ui-error)">Invalid JSON</p>
|
|
15
13
|
</div>
|
|
16
14
|
</template>
|
|
17
15
|
|
|
18
16
|
<script setup>
|
|
19
|
-
import { ref,
|
|
17
|
+
import { ref, watch } from "#imports";
|
|
20
18
|
const model = defineModel({ type: null, ...{ required: true } });
|
|
21
|
-
const { t } = useI18n();
|
|
22
19
|
function serialize(value) {
|
|
23
20
|
return value == null ? "" : JSON.stringify(value, null, 2);
|
|
24
21
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
v-if="kind === 'image' && url"
|
|
5
5
|
:src="url"
|
|
6
6
|
alt=""
|
|
7
|
-
class="
|
|
7
|
+
class="max-h-56 w-full bg-(--cms-field) object-cover"
|
|
8
8
|
/>
|
|
9
9
|
<video
|
|
10
10
|
v-else-if="kind === 'video' && url"
|
|
@@ -12,48 +12,48 @@
|
|
|
12
12
|
controls
|
|
13
13
|
preload="metadata"
|
|
14
14
|
playsinline
|
|
15
|
-
class="
|
|
15
|
+
class="max-h-56 w-full bg-(--cms-field)"
|
|
16
16
|
/>
|
|
17
17
|
<div class="flex items-center gap-2.5 px-4 py-3">
|
|
18
|
-
<
|
|
18
|
+
<CmsIcon :name="icon" class="size-4 shrink-0 text-(--ui-text-dimmed)" />
|
|
19
19
|
<span class="min-w-0 flex-1 truncate text-[13px] font-medium" :title="model">{{
|
|
20
20
|
mediaFilename(model)
|
|
21
21
|
}}</span>
|
|
22
|
-
<
|
|
23
|
-
icon="
|
|
22
|
+
<CmsButton
|
|
23
|
+
icon="photo"
|
|
24
24
|
variant="ghost"
|
|
25
25
|
color="neutral"
|
|
26
26
|
size="xs"
|
|
27
27
|
class="rounded-full"
|
|
28
|
-
|
|
28
|
+
aria-label="Change"
|
|
29
29
|
@click="openGallery"
|
|
30
30
|
/>
|
|
31
|
-
<
|
|
32
|
-
icon="
|
|
31
|
+
<CmsButton
|
|
32
|
+
icon="x-mark"
|
|
33
33
|
variant="ghost"
|
|
34
34
|
color="neutral"
|
|
35
35
|
size="xs"
|
|
36
36
|
class="rounded-full"
|
|
37
|
-
|
|
37
|
+
aria-label="Remove"
|
|
38
38
|
@click="clear"
|
|
39
39
|
/>
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
43
|
<button v-else type="button" class="cms-dropzone is-dense" @click="openGallery">
|
|
44
|
-
<
|
|
45
|
-
<span class="text-[13px] font-medium">
|
|
44
|
+
<CmsIcon name="photo" class="size-5 shrink-0" />
|
|
45
|
+
<span class="text-[13px] font-medium">Choose from the gallery</span>
|
|
46
46
|
</button>
|
|
47
47
|
|
|
48
|
-
<
|
|
48
|
+
<CmsModal v-model:open="galleryOpen" title="Media" :ui="CMS_MODAL_UI">
|
|
49
49
|
<template #body>
|
|
50
50
|
<CmsMediaGallery selectable :media-type="mediaType" :accept="accept" @select="onSelect" />
|
|
51
51
|
</template>
|
|
52
|
-
</
|
|
52
|
+
</CmsModal>
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script setup>
|
|
56
|
-
import { computed, ref
|
|
56
|
+
import { computed, ref } from "#imports";
|
|
57
57
|
import { mediaFilename, mediaIconFor, mediaPublicUrl, mediaTypeForKey } from "#nuxt-cms";
|
|
58
58
|
import { useCmsRuntime } from "../../composables/cms-runtime";
|
|
59
59
|
import { CMS_MODAL_UI } from "../../utils/ui";
|
|
@@ -62,7 +62,6 @@ defineProps({
|
|
|
62
62
|
accept: { type: Array, required: false }
|
|
63
63
|
});
|
|
64
64
|
const model = defineModel({ type: [String, null], ...{ required: true } });
|
|
65
|
-
const { t } = useI18n();
|
|
66
65
|
const { mediaBaseUrl } = useCmsRuntime();
|
|
67
66
|
const galleryOpen = ref(false);
|
|
68
67
|
function onSelect(item) {
|