@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
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cms-richtext">
|
|
3
3
|
<div class="cms-richtext-toolbar">
|
|
4
|
-
<
|
|
4
|
+
<CmsButton
|
|
5
5
|
v-for="action in actions"
|
|
6
6
|
:key="action.icon"
|
|
7
7
|
:icon="action.icon"
|
|
8
8
|
size="xs"
|
|
9
9
|
:variant="editor?.isActive(action.mark, action.attrs) ? 'soft' : 'ghost'"
|
|
10
10
|
color="neutral"
|
|
11
|
-
:aria-label="
|
|
12
|
-
:title="
|
|
11
|
+
:aria-label="action.label"
|
|
12
|
+
:title="action.label"
|
|
13
13
|
@click="action.run"
|
|
14
14
|
/>
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
icon="
|
|
15
|
+
<CmsPopover v-model:open="linkOpen">
|
|
16
|
+
<CmsButton
|
|
17
|
+
icon="link"
|
|
18
18
|
size="xs"
|
|
19
19
|
:variant="editor?.isActive('link') ? 'soft' : 'ghost'"
|
|
20
20
|
color="neutral"
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
aria-label="Link"
|
|
22
|
+
title="Link"
|
|
23
23
|
/>
|
|
24
24
|
<template #content>
|
|
25
25
|
<div class="flex items-center gap-2 p-2">
|
|
26
|
-
<
|
|
26
|
+
<CmsInput
|
|
27
27
|
v-model="linkUrl"
|
|
28
28
|
size="sm"
|
|
29
29
|
placeholder="https://"
|
|
30
30
|
class="w-64"
|
|
31
31
|
@keydown.enter.prevent="applyLink"
|
|
32
32
|
/>
|
|
33
|
-
<
|
|
34
|
-
<
|
|
33
|
+
<CmsButton size="xs" label="Apply" @click="applyLink" />
|
|
34
|
+
<CmsButton
|
|
35
35
|
v-if="editor?.isActive('link')"
|
|
36
36
|
size="xs"
|
|
37
37
|
variant="subtle"
|
|
38
38
|
color="error"
|
|
39
|
-
|
|
39
|
+
label="Remove link"
|
|
40
40
|
@click="removeLink"
|
|
41
41
|
/>
|
|
42
42
|
</div>
|
|
43
43
|
</template>
|
|
44
|
-
</
|
|
44
|
+
</CmsPopover>
|
|
45
45
|
<span class="grow" />
|
|
46
|
-
<
|
|
47
|
-
icon="
|
|
46
|
+
<CmsButton
|
|
47
|
+
icon="arrow-uturn-left"
|
|
48
48
|
size="xs"
|
|
49
49
|
variant="ghost"
|
|
50
50
|
color="neutral"
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
aria-label="Undo"
|
|
52
|
+
title="Undo"
|
|
53
53
|
:disabled="!editor?.can().undo()"
|
|
54
54
|
@click="undo"
|
|
55
55
|
/>
|
|
56
|
-
<
|
|
57
|
-
icon="
|
|
56
|
+
<CmsButton
|
|
57
|
+
icon="arrow-uturn-right"
|
|
58
58
|
size="xs"
|
|
59
59
|
variant="ghost"
|
|
60
60
|
color="neutral"
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
aria-label="Redo"
|
|
62
|
+
title="Redo"
|
|
63
63
|
:disabled="!editor?.can().redo()"
|
|
64
64
|
@click="redo"
|
|
65
65
|
/>
|
|
@@ -71,9 +71,8 @@
|
|
|
71
71
|
<script setup>
|
|
72
72
|
import StarterKit from "@tiptap/starter-kit";
|
|
73
73
|
import { EditorContent, useEditor } from "@tiptap/vue-3";
|
|
74
|
-
import { ref,
|
|
74
|
+
import { ref, watch } from "#imports";
|
|
75
75
|
const model = defineModel({ type: [String, null], ...{ required: true } });
|
|
76
|
-
const { t } = useI18n();
|
|
77
76
|
const editor = useEditor({
|
|
78
77
|
content: model.value ?? "",
|
|
79
78
|
extensions: [StarterKit.configure({ link: { openOnClick: false } })],
|
|
@@ -93,67 +92,67 @@ watch(model, (value) => {
|
|
|
93
92
|
});
|
|
94
93
|
const actions = [
|
|
95
94
|
{
|
|
96
|
-
icon: "
|
|
95
|
+
icon: "bold",
|
|
97
96
|
mark: "bold",
|
|
98
|
-
label: "
|
|
97
|
+
label: "Bold",
|
|
99
98
|
run: () => {
|
|
100
99
|
editor.value?.chain().focus().toggleBold().run();
|
|
101
100
|
}
|
|
102
101
|
},
|
|
103
102
|
{
|
|
104
|
-
icon: "
|
|
103
|
+
icon: "italic",
|
|
105
104
|
mark: "italic",
|
|
106
|
-
label: "
|
|
105
|
+
label: "Italic",
|
|
107
106
|
run: () => {
|
|
108
107
|
editor.value?.chain().focus().toggleItalic().run();
|
|
109
108
|
}
|
|
110
109
|
},
|
|
111
110
|
{
|
|
112
|
-
icon: "
|
|
111
|
+
icon: "strikethrough",
|
|
113
112
|
mark: "strike",
|
|
114
|
-
label: "
|
|
113
|
+
label: "Strikethrough",
|
|
115
114
|
run: () => {
|
|
116
115
|
editor.value?.chain().focus().toggleStrike().run();
|
|
117
116
|
}
|
|
118
117
|
},
|
|
119
118
|
{
|
|
120
|
-
icon: "
|
|
119
|
+
icon: "h2",
|
|
121
120
|
mark: "heading",
|
|
122
121
|
attrs: { level: 2 },
|
|
123
|
-
label: "
|
|
122
|
+
label: "Heading 2",
|
|
124
123
|
run: () => {
|
|
125
124
|
editor.value?.chain().focus().toggleHeading({ level: 2 }).run();
|
|
126
125
|
}
|
|
127
126
|
},
|
|
128
127
|
{
|
|
129
|
-
icon: "
|
|
128
|
+
icon: "h3",
|
|
130
129
|
mark: "heading",
|
|
131
130
|
attrs: { level: 3 },
|
|
132
|
-
label: "
|
|
131
|
+
label: "Heading 3",
|
|
133
132
|
run: () => {
|
|
134
133
|
editor.value?.chain().focus().toggleHeading({ level: 3 }).run();
|
|
135
134
|
}
|
|
136
135
|
},
|
|
137
136
|
{
|
|
138
|
-
icon: "
|
|
137
|
+
icon: "list-bullet",
|
|
139
138
|
mark: "bulletList",
|
|
140
|
-
label: "
|
|
139
|
+
label: "Bullet list",
|
|
141
140
|
run: () => {
|
|
142
141
|
editor.value?.chain().focus().toggleBulletList().run();
|
|
143
142
|
}
|
|
144
143
|
},
|
|
145
144
|
{
|
|
146
|
-
icon: "
|
|
145
|
+
icon: "numbered-list",
|
|
147
146
|
mark: "orderedList",
|
|
148
|
-
label: "
|
|
147
|
+
label: "Numbered list",
|
|
149
148
|
run: () => {
|
|
150
149
|
editor.value?.chain().focus().toggleOrderedList().run();
|
|
151
150
|
}
|
|
152
151
|
},
|
|
153
152
|
{
|
|
154
|
-
icon: "
|
|
153
|
+
icon: "chat-bubble-bottom-center-text",
|
|
155
154
|
mark: "blockquote",
|
|
156
|
-
label: "
|
|
155
|
+
label: "Quote",
|
|
157
156
|
run: () => {
|
|
158
157
|
editor.value?.chain().focus().toggleBlockquote().run();
|
|
159
158
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
items?: string[];
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
required?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string | undefined;
|
|
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
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<select
|
|
3
|
+
:value="model ?? ''"
|
|
4
|
+
:class="['cms-field', `cms-field-${size ?? 'md'}`]"
|
|
5
|
+
@change="model = $event.target.value || void 0"
|
|
6
|
+
>
|
|
7
|
+
<option v-if="!required" value="">—</option>
|
|
8
|
+
<option v-for="option in items" :key="option" :value="option">{{ option }}</option>
|
|
9
|
+
</select>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
defineProps({
|
|
14
|
+
items: { type: Array, required: false },
|
|
15
|
+
size: { type: String, required: false },
|
|
16
|
+
required: { type: Boolean, required: false }
|
|
17
|
+
});
|
|
18
|
+
const model = defineModel({ type: null });
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
items?: string[];
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
required?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string | undefined;
|
|
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
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Item = Record<string, unknown> & {
|
|
2
|
+
label: string;
|
|
3
|
+
};
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
items: Item[];
|
|
6
|
+
valueKey?: string;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
ignoreFilter?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
size?: string;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
modelValue?: string | string[] | null;
|
|
14
|
+
'searchTerm'?: string;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: string | string[] | null | undefined) => any;
|
|
19
|
+
"update:searchTerm": (value: string) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string | string[] | null | undefined) => any) | undefined;
|
|
22
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="root" class="relative w-full">
|
|
3
|
+
<div class="cms-field cms-field-lg flex flex-wrap items-center gap-1" @click="focusInput">
|
|
4
|
+
<template v-if="multiple">
|
|
5
|
+
<span v-for="value in modelArray" :key="value" class="cms-tag">
|
|
6
|
+
{{ labelFor(value) }}
|
|
7
|
+
<button
|
|
8
|
+
type="button"
|
|
9
|
+
class="opacity-60 hover:opacity-100"
|
|
10
|
+
@click.stop="toggle(value)"
|
|
11
|
+
>
|
|
12
|
+
<CmsIcon name="x-mark" class="size-3" />
|
|
13
|
+
</button>
|
|
14
|
+
</span>
|
|
15
|
+
</template>
|
|
16
|
+
<input
|
|
17
|
+
ref="input"
|
|
18
|
+
class="min-w-16 flex-1 bg-transparent outline-none"
|
|
19
|
+
:value="search"
|
|
20
|
+
:placeholder="placeholder"
|
|
21
|
+
@input="search = $event.target.value"
|
|
22
|
+
@focus="open = true"
|
|
23
|
+
/>
|
|
24
|
+
<CmsIcon
|
|
25
|
+
v-if="loading"
|
|
26
|
+
name="arrow-path"
|
|
27
|
+
class="ml-auto size-4 shrink-0 animate-spin text-(--ui-text-dimmed)"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
<div v-if="open" class="cms-selectmenu-panel">
|
|
31
|
+
<button
|
|
32
|
+
v-for="item in items"
|
|
33
|
+
:key="String(item[valueKey])"
|
|
34
|
+
type="button"
|
|
35
|
+
class="cms-menu-item"
|
|
36
|
+
@click="pick(item)"
|
|
37
|
+
>
|
|
38
|
+
<span class="truncate">{{ item.label }}</span>
|
|
39
|
+
<CmsIcon
|
|
40
|
+
v-if="isSelected(item[valueKey])"
|
|
41
|
+
name="check"
|
|
42
|
+
class="cms-menu-check size-3.5"
|
|
43
|
+
/>
|
|
44
|
+
</button>
|
|
45
|
+
<div v-if="!items.length" class="cms-menu-item pointer-events-none opacity-60">
|
|
46
|
+
No results
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup>
|
|
53
|
+
import { computed, onBeforeUnmount, ref, watch } from "#imports";
|
|
54
|
+
const props = defineProps({
|
|
55
|
+
items: { type: Array, required: true },
|
|
56
|
+
valueKey: { type: String, required: false, default: "value" },
|
|
57
|
+
multiple: { type: Boolean, required: false },
|
|
58
|
+
ignoreFilter: { type: Boolean, required: false },
|
|
59
|
+
loading: { type: Boolean, required: false },
|
|
60
|
+
size: { type: String, required: false }
|
|
61
|
+
});
|
|
62
|
+
const model = defineModel({ type: [String, Array, null] });
|
|
63
|
+
const search = defineModel("searchTerm", { type: String, ...{ default: "" } });
|
|
64
|
+
const open = ref(false);
|
|
65
|
+
const root = ref(null);
|
|
66
|
+
const input = ref(null);
|
|
67
|
+
const modelArray = computed(
|
|
68
|
+
() => props.multiple && Array.isArray(model.value) ? model.value : []
|
|
69
|
+
);
|
|
70
|
+
const selectedLabel = computed(() => {
|
|
71
|
+
if (props.multiple) return "";
|
|
72
|
+
const current = model.value;
|
|
73
|
+
return current == null ? "" : labelFor(current);
|
|
74
|
+
});
|
|
75
|
+
const placeholder = computed(() => props.multiple ? "" : selectedLabel.value);
|
|
76
|
+
function labelFor(value) {
|
|
77
|
+
return props.items.find((item) => item[props.valueKey] === value)?.label ?? `#${value}`;
|
|
78
|
+
}
|
|
79
|
+
function isSelected(value) {
|
|
80
|
+
return props.multiple ? modelArray.value.includes(value) : model.value === value;
|
|
81
|
+
}
|
|
82
|
+
function focusInput() {
|
|
83
|
+
input.value?.focus();
|
|
84
|
+
}
|
|
85
|
+
function toggle(value) {
|
|
86
|
+
const next = modelArray.value.includes(value) ? modelArray.value.filter((entry) => entry !== value) : [...modelArray.value, value];
|
|
87
|
+
model.value = next;
|
|
88
|
+
}
|
|
89
|
+
function pick(item) {
|
|
90
|
+
const value = item[props.valueKey];
|
|
91
|
+
if (props.multiple) {
|
|
92
|
+
if (value != null) toggle(value);
|
|
93
|
+
} else {
|
|
94
|
+
model.value = value;
|
|
95
|
+
search.value = "";
|
|
96
|
+
open.value = false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function onOutside(event) {
|
|
100
|
+
if (root.value && !root.value.contains(event.target)) open.value = false;
|
|
101
|
+
}
|
|
102
|
+
watch(open, (value) => {
|
|
103
|
+
if (import.meta.server) return;
|
|
104
|
+
if (value) document.addEventListener("click", onOutside, true);
|
|
105
|
+
else document.removeEventListener("click", onOutside, true);
|
|
106
|
+
});
|
|
107
|
+
onBeforeUnmount(() => {
|
|
108
|
+
if (import.meta.client) document.removeEventListener("click", onOutside, true);
|
|
109
|
+
});
|
|
110
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Item = Record<string, unknown> & {
|
|
2
|
+
label: string;
|
|
3
|
+
};
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
items: Item[];
|
|
6
|
+
valueKey?: string;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
ignoreFilter?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
size?: string;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
modelValue?: string | string[] | null;
|
|
14
|
+
'searchTerm'?: string;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: string | string[] | null | undefined) => any;
|
|
19
|
+
"update:searchTerm": (value: string) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string | string[] | null | undefined) => any) | undefined;
|
|
22
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<CmsInput
|
|
3
3
|
:model-value="model ?? ''"
|
|
4
4
|
size="lg"
|
|
5
5
|
class="w-full font-mono"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"
|
|
12
12
|
>
|
|
13
13
|
<template v-if="source !== void 0" #trailing>
|
|
14
|
-
<
|
|
15
|
-
icon="
|
|
14
|
+
<CmsButton
|
|
15
|
+
icon="arrow-path"
|
|
16
16
|
size="xs"
|
|
17
17
|
variant="ghost"
|
|
18
18
|
color="neutral"
|
|
19
19
|
@click="regenerate"
|
|
20
20
|
/>
|
|
21
21
|
</template>
|
|
22
|
-
</
|
|
22
|
+
</CmsInput>
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script setup>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
type="button"
|
|
4
|
+
role="switch"
|
|
5
|
+
:aria-checked="model"
|
|
6
|
+
class="cms-switch"
|
|
7
|
+
:class="{ 'is-on': model }"
|
|
8
|
+
@click="model = !model"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
const model = defineModel({ type: Boolean });
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
interface Column {
|
|
3
|
+
id?: string;
|
|
4
|
+
accessorKey?: string;
|
|
5
|
+
accessorFn?: (row: Row) => unknown;
|
|
6
|
+
header?: string;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
data: Row[];
|
|
10
|
+
columns: Column[];
|
|
11
|
+
ui?: {
|
|
12
|
+
thead?: string;
|
|
13
|
+
th?: string;
|
|
14
|
+
td?: string;
|
|
15
|
+
tr?: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type __VLS_ModelProps = {
|
|
19
|
+
'columnVisibility'?: Record<string, boolean>;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
22
|
+
declare var __VLS_2: `${string}-cell`, __VLS_3: {
|
|
23
|
+
row: {
|
|
24
|
+
original: Row;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
select: (event: Event, row: {
|
|
32
|
+
original: Row;
|
|
33
|
+
}) => any;
|
|
34
|
+
"update:columnVisibility": (value: Record<string, boolean>) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
|
+
onSelect?: ((event: Event, row: {
|
|
37
|
+
original: Row;
|
|
38
|
+
}) => any) | undefined;
|
|
39
|
+
"onUpdate:columnVisibility"?: ((value: Record<string, boolean>) => any) | undefined;
|
|
40
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
|
+
declare const _default: typeof __VLS_export;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<table class="cms-table">
|
|
3
|
+
<thead :class="ui?.thead">
|
|
4
|
+
<tr>
|
|
5
|
+
<th v-for="column in visibleColumns" :key="columnId(column)" :class="ui?.th">
|
|
6
|
+
{{ column.header }}
|
|
7
|
+
</th>
|
|
8
|
+
</tr>
|
|
9
|
+
</thead>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr
|
|
12
|
+
v-for="(row, index) in data"
|
|
13
|
+
:key="index"
|
|
14
|
+
:class="ui?.tr"
|
|
15
|
+
@click="emit('select', $event, { original: row })"
|
|
16
|
+
>
|
|
17
|
+
<td v-for="column in visibleColumns" :key="columnId(column)" :class="ui?.td">
|
|
18
|
+
<slot :name="`${columnId(column)}-cell`" :row="{ original: row }">
|
|
19
|
+
{{ cellValue(column, row) }}
|
|
20
|
+
</slot>
|
|
21
|
+
</td>
|
|
22
|
+
</tr>
|
|
23
|
+
</tbody>
|
|
24
|
+
</table>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { computed } from "#imports";
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
data: { type: Array, required: true },
|
|
31
|
+
columns: { type: Array, required: true },
|
|
32
|
+
ui: { type: Object, required: false }
|
|
33
|
+
});
|
|
34
|
+
const visibility = defineModel("columnVisibility", { type: Object, ...{ default: () => ({}) } });
|
|
35
|
+
const emit = defineEmits(["select"]);
|
|
36
|
+
function columnId(column) {
|
|
37
|
+
return column.id ?? column.accessorKey ?? "";
|
|
38
|
+
}
|
|
39
|
+
const visibleColumns = computed(
|
|
40
|
+
() => props.columns.filter((column) => visibility.value[columnId(column)] !== false)
|
|
41
|
+
);
|
|
42
|
+
function cellValue(column, row) {
|
|
43
|
+
if (column.accessorFn) return column.accessorFn(row);
|
|
44
|
+
if (column.accessorKey) return row[column.accessorKey];
|
|
45
|
+
return "";
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
interface Column {
|
|
3
|
+
id?: string;
|
|
4
|
+
accessorKey?: string;
|
|
5
|
+
accessorFn?: (row: Row) => unknown;
|
|
6
|
+
header?: string;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
data: Row[];
|
|
10
|
+
columns: Column[];
|
|
11
|
+
ui?: {
|
|
12
|
+
thead?: string;
|
|
13
|
+
th?: string;
|
|
14
|
+
td?: string;
|
|
15
|
+
tr?: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type __VLS_ModelProps = {
|
|
19
|
+
'columnVisibility'?: Record<string, boolean>;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
22
|
+
declare var __VLS_2: `${string}-cell`, __VLS_3: {
|
|
23
|
+
row: {
|
|
24
|
+
original: Row;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
select: (event: Event, row: {
|
|
32
|
+
original: Row;
|
|
33
|
+
}) => any;
|
|
34
|
+
"update:columnVisibility": (value: Record<string, boolean>) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
|
+
onSelect?: ((event: Event, row: {
|
|
37
|
+
original: Row;
|
|
38
|
+
}) => any) | undefined;
|
|
39
|
+
"onUpdate:columnVisibility"?: ((value: Record<string, boolean>) => any) | undefined;
|
|
40
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
|
+
declare const _default: typeof __VLS_export;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
rows?: number;
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
color?: 'error';
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string | null;
|
|
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
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<textarea
|
|
3
|
+
:rows="rows ?? 3"
|
|
4
|
+
:value="model ?? ''"
|
|
5
|
+
:class="['cms-field', `cms-field-${size ?? 'md'}`, { 'is-error': color === 'error' }]"
|
|
6
|
+
@input="model = $event.target.value"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
defineProps({
|
|
12
|
+
rows: { type: Number, required: false },
|
|
13
|
+
size: { type: String, required: false },
|
|
14
|
+
color: { type: String, required: false }
|
|
15
|
+
});
|
|
16
|
+
const model = defineModel({ type: [String, null] });
|
|
17
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
rows?: number;
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
color?: 'error';
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string | null;
|
|
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
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|