katecms 0.0.0-stage → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/module.d.mts +93 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +579 -0
- package/dist/runtime/assets/img/katecms-logo.svg +17 -0
- package/dist/runtime/composables/getCollection.d.ts +62 -0
- package/dist/runtime/composables/getCollection.js +167 -0
- package/dist/runtime/composables/getOptions.d.ts +22 -0
- package/dist/runtime/composables/getOptions.js +22 -0
- package/dist/runtime/composables/getQueryCollection.d.ts +95 -0
- package/dist/runtime/composables/getQueryCollection.js +199 -0
- package/dist/runtime/composables/getTerms.d.ts +79 -0
- package/dist/runtime/composables/getTerms.js +148 -0
- package/dist/runtime/composables/useAuth.d.ts +14 -0
- package/dist/runtime/composables/useAuth.js +33 -0
- package/dist/runtime/composables/useAuthCooldown.d.ts +6 -0
- package/dist/runtime/composables/useAuthCooldown.js +44 -0
- package/dist/runtime/composables/useCmsPaths.d.ts +15 -0
- package/dist/runtime/composables/useCmsPaths.js +21 -0
- package/dist/runtime/composables/useKateCmsExtensions.d.ts +49 -0
- package/dist/runtime/composables/useKateCmsExtensions.js +29 -0
- package/dist/runtime/composables/useMediaLibrary.d.ts +84 -0
- package/dist/runtime/composables/useMediaLibrary.js +140 -0
- package/dist/runtime/composables/useMenuAccess.d.ts +8 -0
- package/dist/runtime/composables/useMenuAccess.js +16 -0
- package/dist/runtime/internal/admin/AdminHeader.d.vue.ts +24 -0
- package/dist/runtime/internal/admin/AdminHeader.vue +91 -0
- package/dist/runtime/internal/admin/AdminHeader.vue.d.ts +24 -0
- package/dist/runtime/internal/admin/AppMenu.d.vue.ts +3 -0
- package/dist/runtime/internal/admin/AppMenu.vue +244 -0
- package/dist/runtime/internal/admin/AppMenu.vue.d.ts +3 -0
- package/dist/runtime/internal/admin/AppUser.d.vue.ts +3 -0
- package/dist/runtime/internal/admin/AppUser.vue +227 -0
- package/dist/runtime/internal/admin/AppUser.vue.d.ts +3 -0
- package/dist/runtime/internal/admin/CollectionEntryForm.d.vue.ts +41 -0
- package/dist/runtime/internal/admin/CollectionEntryForm.vue +916 -0
- package/dist/runtime/internal/admin/CollectionEntryForm.vue.d.ts +41 -0
- package/dist/runtime/internal/admin/ConfirmDialog.d.vue.ts +28 -0
- package/dist/runtime/internal/admin/ConfirmDialog.vue +136 -0
- package/dist/runtime/internal/admin/ConfirmDialog.vue.d.ts +28 -0
- package/dist/runtime/internal/admin/DictionaryTermForm.d.vue.ts +33 -0
- package/dist/runtime/internal/admin/DictionaryTermForm.vue +328 -0
- package/dist/runtime/internal/admin/DictionaryTermForm.vue.d.ts +33 -0
- package/dist/runtime/internal/admin/EntryRevisions.d.vue.ts +15 -0
- package/dist/runtime/internal/admin/EntryRevisions.vue +125 -0
- package/dist/runtime/internal/admin/EntryRevisions.vue.d.ts +15 -0
- package/dist/runtime/internal/admin/MediaLibraryFilters.d.vue.ts +16 -0
- package/dist/runtime/internal/admin/MediaLibraryFilters.vue +153 -0
- package/dist/runtime/internal/admin/MediaLibraryFilters.vue.d.ts +16 -0
- package/dist/runtime/internal/admin/MediaLibraryModal.d.vue.ts +65 -0
- package/dist/runtime/internal/admin/MediaLibraryModal.vue +451 -0
- package/dist/runtime/internal/admin/MediaLibraryModal.vue.d.ts +65 -0
- package/dist/runtime/internal/admin/OptionPageForm.d.vue.ts +26 -0
- package/dist/runtime/internal/admin/OptionPageForm.vue +222 -0
- package/dist/runtime/internal/admin/OptionPageForm.vue.d.ts +26 -0
- package/dist/runtime/internal/admin/UserAvatarField.d.vue.ts +12 -0
- package/dist/runtime/internal/admin/UserAvatarField.vue +305 -0
- package/dist/runtime/internal/admin/UserAvatarField.vue.d.ts +12 -0
- package/dist/runtime/internal/fields/AccordionField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/AccordionField.vue +220 -0
- package/dist/runtime/internal/fields/AccordionField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/ButtonGroupField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/ButtonGroupField.vue +109 -0
- package/dist/runtime/internal/fields/ButtonGroupField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/CheckboxField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/CheckboxField.vue +190 -0
- package/dist/runtime/internal/fields/CheckboxField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/ColorPickerField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/ColorPickerField.vue +791 -0
- package/dist/runtime/internal/fields/ColorPickerField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/DatePickerField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/DatePickerField.vue +26 -0
- package/dist/runtime/internal/fields/DatePickerField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/DateTimePickerField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/DateTimePickerField.vue +26 -0
- package/dist/runtime/internal/fields/DateTimePickerField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/DictionaryField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/DictionaryField.vue +345 -0
- package/dist/runtime/internal/fields/DictionaryField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/EmailField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/EmailField.vue +21 -0
- package/dist/runtime/internal/fields/EmailField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/FileField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/FileField.vue +408 -0
- package/dist/runtime/internal/fields/FileField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/FlexibleContentField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/FlexibleContentField.vue +1114 -0
- package/dist/runtime/internal/fields/FlexibleContentField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/GalleryField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/GalleryField.vue +584 -0
- package/dist/runtime/internal/fields/GalleryField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/GroupField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/GroupField.vue +111 -0
- package/dist/runtime/internal/fields/GroupField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/ImageField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/ImageField.vue +638 -0
- package/dist/runtime/internal/fields/ImageField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/ImageSelectField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/ImageSelectField.vue +179 -0
- package/dist/runtime/internal/fields/ImageSelectField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/LinkField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/LinkField.vue +303 -0
- package/dist/runtime/internal/fields/LinkField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/NumberField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/NumberField.vue +25 -0
- package/dist/runtime/internal/fields/NumberField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/OembedField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/OembedField.vue +161 -0
- package/dist/runtime/internal/fields/OembedField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/OpenStreetMapField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/OpenStreetMapField.vue +1502 -0
- package/dist/runtime/internal/fields/OpenStreetMapField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/PageLinkField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/PageLinkField.vue +153 -0
- package/dist/runtime/internal/fields/PageLinkField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/PasswordField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/PasswordField.vue +108 -0
- package/dist/runtime/internal/fields/PasswordField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/PostObjectField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/PostObjectField.vue +151 -0
- package/dist/runtime/internal/fields/PostObjectField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/RadioField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/RadioField.vue +163 -0
- package/dist/runtime/internal/fields/RadioField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/RangeField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/RangeField.vue +48 -0
- package/dist/runtime/internal/fields/RangeField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/RelationshipField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/RelationshipField.vue +525 -0
- package/dist/runtime/internal/fields/RelationshipField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/RepeaterField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/RepeaterField.vue +856 -0
- package/dist/runtime/internal/fields/RepeaterField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/SelectField.d.vue.ts +21 -0
- package/dist/runtime/internal/fields/SelectField.vue +101 -0
- package/dist/runtime/internal/fields/SelectField.vue.d.ts +21 -0
- package/dist/runtime/internal/fields/SeparatorField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/SeparatorField.vue +63 -0
- package/dist/runtime/internal/fields/SeparatorField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/TabField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/TabField.vue +210 -0
- package/dist/runtime/internal/fields/TabField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/TextField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/TextField.vue +22 -0
- package/dist/runtime/internal/fields/TextField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/TextareaField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/TextareaField.vue +62 -0
- package/dist/runtime/internal/fields/TextareaField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/TimePickerField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/TimePickerField.vue +24 -0
- package/dist/runtime/internal/fields/TimePickerField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/TrueFalseField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/TrueFalseField.vue +151 -0
- package/dist/runtime/internal/fields/TrueFalseField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/UrlField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/UrlField.vue +21 -0
- package/dist/runtime/internal/fields/UrlField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/UserField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/UserField.vue +164 -0
- package/dist/runtime/internal/fields/UserField.vue.d.ts +0 -0
- package/dist/runtime/internal/fields/WysiwygField.d.vue.ts +0 -0
- package/dist/runtime/internal/fields/WysiwygField.vue +971 -0
- package/dist/runtime/internal/fields/WysiwygField.vue.d.ts +0 -0
- package/dist/runtime/internal/parts/DateTimeControl.d.vue.ts +90 -0
- package/dist/runtime/internal/parts/DateTimeControl.vue +568 -0
- package/dist/runtime/internal/parts/DateTimeControl.vue.d.ts +90 -0
- package/dist/runtime/internal/parts/FieldAddon.d.vue.ts +0 -0
- package/dist/runtime/internal/parts/FieldAddon.vue +43 -0
- package/dist/runtime/internal/parts/FieldAddon.vue.d.ts +0 -0
- package/dist/runtime/internal/parts/FieldInstructions.d.vue.ts +0 -0
- package/dist/runtime/internal/parts/FieldInstructions.vue +24 -0
- package/dist/runtime/internal/parts/FieldInstructions.vue.d.ts +0 -0
- package/dist/runtime/internal/parts/FieldLabel.d.vue.ts +0 -0
- package/dist/runtime/internal/parts/FieldLabel.vue +40 -0
- package/dist/runtime/internal/parts/FieldLabel.vue.d.ts +0 -0
- package/dist/runtime/internal/parts/FieldWrapper.d.vue.ts +0 -0
- package/dist/runtime/internal/parts/FieldWrapper.vue +47 -0
- package/dist/runtime/internal/parts/FieldWrapper.vue.d.ts +0 -0
- package/dist/runtime/internal/parts/ImageCropper.d.vue.ts +17 -0
- package/dist/runtime/internal/parts/ImageCropper.vue +363 -0
- package/dist/runtime/internal/parts/ImageCropper.vue.d.ts +17 -0
- package/dist/runtime/internal/parts/InputControl.d.vue.ts +0 -0
- package/dist/runtime/internal/parts/InputControl.vue +163 -0
- package/dist/runtime/internal/parts/InputControl.vue.d.ts +0 -0
- package/dist/runtime/internal/ui/UiButton.d.vue.ts +35 -0
- package/dist/runtime/internal/ui/UiButton.vue +204 -0
- package/dist/runtime/internal/ui/UiButton.vue.d.ts +35 -0
- package/dist/runtime/internal/ui/UiNotice.d.vue.ts +40 -0
- package/dist/runtime/internal/ui/UiNotice.vue +253 -0
- package/dist/runtime/internal/ui/UiNotice.vue.d.ts +40 -0
- package/dist/runtime/internal/ui/UiSelect.d.vue.ts +61 -0
- package/dist/runtime/internal/ui/UiSelect.vue +1212 -0
- package/dist/runtime/internal/ui/UiSelect.vue.d.ts +61 -0
- package/dist/runtime/middleware/auth-guard.d.ts +9 -0
- package/dist/runtime/middleware/auth-guard.js +37 -0
- package/dist/runtime/pages/admin/collections/[id].d.vue.ts +3 -0
- package/dist/runtime/pages/admin/collections/[id].vue +423 -0
- package/dist/runtime/pages/admin/collections/[id].vue.d.ts +3 -0
- package/dist/runtime/pages/admin/collections/create.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/collections/create.vue +179 -0
- package/dist/runtime/pages/admin/collections/create.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/collections/index.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/collections/index.vue +828 -0
- package/dist/runtime/pages/admin/collections/index.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/demo-fields.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/demo-fields.vue +1327 -0
- package/dist/runtime/pages/admin/demo-fields.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/dictionaries/[id].d.vue.ts +3 -0
- package/dist/runtime/pages/admin/dictionaries/[id].vue +213 -0
- package/dist/runtime/pages/admin/dictionaries/[id].vue.d.ts +3 -0
- package/dist/runtime/pages/admin/dictionaries/index.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/dictionaries/index.vue +387 -0
- package/dist/runtime/pages/admin/dictionaries/index.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/index.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/index.vue +138 -0
- package/dist/runtime/pages/admin/index.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/login.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/login.vue +373 -0
- package/dist/runtime/pages/admin/login.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/media.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/media.vue +1054 -0
- package/dist/runtime/pages/admin/media.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/options/[page].d.vue.ts +3 -0
- package/dist/runtime/pages/admin/options/[page].vue +151 -0
- package/dist/runtime/pages/admin/options/[page].vue.d.ts +3 -0
- package/dist/runtime/pages/admin/register.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/register.vue +391 -0
- package/dist/runtime/pages/admin/register.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/users/[id].d.vue.ts +3 -0
- package/dist/runtime/pages/admin/users/[id].vue +337 -0
- package/dist/runtime/pages/admin/users/[id].vue.d.ts +3 -0
- package/dist/runtime/pages/admin/users/create.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/users/create.vue +201 -0
- package/dist/runtime/pages/admin/users/create.vue.d.ts +3 -0
- package/dist/runtime/pages/admin/users/index.d.vue.ts +3 -0
- package/dist/runtime/pages/admin/users/index.vue +329 -0
- package/dist/runtime/pages/admin/users/index.vue.d.ts +3 -0
- package/dist/runtime/pages/index.d.vue.ts +3 -0
- package/dist/runtime/pages/index.vue +399 -0
- package/dist/runtime/pages/index.vue.d.ts +3 -0
- package/dist/runtime/server/api/_katecms/auth/login.post.d.ts +5 -0
- package/dist/runtime/server/api/_katecms/auth/login.post.js +44 -0
- package/dist/runtime/server/api/_katecms/auth/logout.post.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/auth/logout.post.js +6 -0
- package/dist/runtime/server/api/_katecms/auth/register.post.d.ts +19 -0
- package/dist/runtime/server/api/_katecms/auth/register.post.js +83 -0
- package/dist/runtime/server/api/_katecms/auth/state.get.d.ts +9 -0
- package/dist/runtime/server/api/_katecms/auth/state.get.js +12 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/[id].delete.d.ts +15 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/[id].delete.js +59 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/[id].get.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/[id].get.js +50 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/[id].patch.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/[id].patch.js +130 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/revisions/[revisionId].post.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/revisions/[revisionId].post.js +123 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/revisions.get.d.ts +6 -0
- package/dist/runtime/server/api/_katecms/collections/[collection]/revisions.get.js +31 -0
- package/dist/runtime/server/api/_katecms/collections/[collection].get.d.ts +8 -0
- package/dist/runtime/server/api/_katecms/collections/[collection].get.js +135 -0
- package/dist/runtime/server/api/_katecms/collections/[collection].post.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/collections/[collection].post.js +91 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].delete.d.ts +7 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].delete.js +31 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].get.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].get.js +45 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].patch.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].patch.js +83 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary].get.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary].get.js +38 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary].post.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/dictionaries/[dictionary].post.js +64 -0
- package/dist/runtime/server/api/_katecms/media/[id]/regenerate.post.d.ts +8 -0
- package/dist/runtime/server/api/_katecms/media/[id]/regenerate.post.js +30 -0
- package/dist/runtime/server/api/_katecms/media/[id].delete.d.ts +7 -0
- package/dist/runtime/server/api/_katecms/media/[id].delete.js +22 -0
- package/dist/runtime/server/api/_katecms/media/[id].get.d.ts +9 -0
- package/dist/runtime/server/api/_katecms/media/[id].get.js +17 -0
- package/dist/runtime/server/api/_katecms/media/[id].patch.d.ts +6 -0
- package/dist/runtime/server/api/_katecms/media/[id].patch.js +48 -0
- package/dist/runtime/server/api/_katecms/media/index.get.d.ts +5 -0
- package/dist/runtime/server/api/_katecms/media/index.get.js +75 -0
- package/dist/runtime/server/api/_katecms/media/index.post.d.ts +9 -0
- package/dist/runtime/server/api/_katecms/media/index.post.js +84 -0
- package/dist/runtime/server/api/_katecms/media/regenerate.post.d.ts +7 -0
- package/dist/runtime/server/api/_katecms/media/regenerate.post.js +30 -0
- package/dist/runtime/server/api/_katecms/menu.get.d.ts +8 -0
- package/dist/runtime/server/api/_katecms/menu.get.js +14 -0
- package/dist/runtime/server/api/_katecms/oembed.get.d.ts +2 -0
- package/dist/runtime/server/api/_katecms/oembed.get.js +53 -0
- package/dist/runtime/server/api/_katecms/options/[page].get.d.ts +7 -0
- package/dist/runtime/server/api/_katecms/options/[page].get.js +28 -0
- package/dist/runtime/server/api/_katecms/options/[page].patch.d.ts +4 -0
- package/dist/runtime/server/api/_katecms/options/[page].patch.js +36 -0
- package/dist/runtime/server/api/_katecms/query.get.d.ts +24 -0
- package/dist/runtime/server/api/_katecms/query.get.js +270 -0
- package/dist/runtime/server/api/_katecms/relation/entries.get.d.ts +17 -0
- package/dist/runtime/server/api/_katecms/relation/entries.get.js +74 -0
- package/dist/runtime/server/api/_katecms/relation/terms.get.d.ts +17 -0
- package/dist/runtime/server/api/_katecms/relation/terms.get.js +51 -0
- package/dist/runtime/server/api/_katecms/resolve.get.d.ts +17 -0
- package/dist/runtime/server/api/_katecms/resolve.get.js +116 -0
- package/dist/runtime/server/api/_katecms/terms.get.d.ts +20 -0
- package/dist/runtime/server/api/_katecms/terms.get.js +201 -0
- package/dist/runtime/server/api/_katecms/users/[id].delete.d.ts +11 -0
- package/dist/runtime/server/api/_katecms/users/[id].delete.js +45 -0
- package/dist/runtime/server/api/_katecms/users/[id].patch.d.ts +19 -0
- package/dist/runtime/server/api/_katecms/users/[id].patch.js +129 -0
- package/dist/runtime/server/api/_katecms/users.get.d.ts +10 -0
- package/dist/runtime/server/api/_katecms/users.get.js +34 -0
- package/dist/runtime/server/api/_katecms/users.post.d.ts +10 -0
- package/dist/runtime/server/api/_katecms/users.post.js +62 -0
- package/dist/runtime/server/api/uploads/[...key].get.d.ts +3 -0
- package/dist/runtime/server/api/uploads/[...key].get.js +28 -0
- package/dist/runtime/server/kit.d.ts +5 -0
- package/dist/runtime/server/kit.js +5 -0
- package/dist/runtime/server/middleware/admin-headers.d.ts +3 -0
- package/dist/runtime/server/middleware/admin-headers.js +12 -0
- package/dist/runtime/server/plugins/auto-migrate.d.ts +2 -0
- package/dist/runtime/server/plugins/auto-migrate.js +45 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/utils/auth-attempts.d.ts +22 -0
- package/dist/runtime/server/utils/auth-attempts.js +42 -0
- package/dist/runtime/server/utils/auth-rate-limit.d.ts +11 -0
- package/dist/runtime/server/utils/auth-rate-limit.js +36 -0
- package/dist/runtime/server/utils/client-address.d.ts +16 -0
- package/dist/runtime/server/utils/client-address.js +23 -0
- package/dist/runtime/server/utils/collections.d.ts +42 -0
- package/dist/runtime/server/utils/collections.js +300 -0
- package/dist/runtime/server/utils/db.d.ts +3 -0
- package/dist/runtime/server/utils/db.js +25 -0
- package/dist/runtime/server/utils/dictionaries.d.ts +53 -0
- package/dist/runtime/server/utils/dictionaries.js +301 -0
- package/dist/runtime/server/utils/media-list.d.ts +18 -0
- package/dist/runtime/server/utils/media-list.js +84 -0
- package/dist/runtime/server/utils/media.d.ts +12 -0
- package/dist/runtime/server/utils/media.js +77 -0
- package/dist/runtime/server/utils/oembed-fetch.d.ts +4 -0
- package/dist/runtime/server/utils/oembed-fetch.js +142 -0
- package/dist/runtime/server/utils/options.d.ts +17 -0
- package/dist/runtime/server/utils/options.js +66 -0
- package/dist/runtime/server/utils/permissions.d.ts +13 -0
- package/dist/runtime/server/utils/permissions.js +20 -0
- package/dist/runtime/server/utils/public-fields-query.d.ts +6 -0
- package/dist/runtime/server/utils/public-fields-query.js +8 -0
- package/dist/runtime/server/utils/public-term.d.ts +8 -0
- package/dist/runtime/server/utils/public-term.js +80 -0
- package/dist/runtime/server/utils/regenerate.d.ts +12 -0
- package/dist/runtime/server/utils/regenerate.js +40 -0
- package/dist/runtime/server/utils/relation.d.ts +18 -0
- package/dist/runtime/server/utils/relation.js +77 -0
- package/dist/runtime/server/utils/request-address.d.ts +6 -0
- package/dist/runtime/server/utils/request-address.js +10 -0
- package/dist/runtime/server/utils/revisions.d.ts +20 -0
- package/dist/runtime/server/utils/revisions.js +172 -0
- package/dist/runtime/server/utils/session.d.ts +18 -0
- package/dist/runtime/server/utils/session.js +71 -0
- package/dist/runtime/server/utils/upload-headers.d.ts +2 -0
- package/dist/runtime/server/utils/upload-headers.js +30 -0
- package/dist/runtime/server/utils/users.d.ts +13 -0
- package/dist/runtime/server/utils/users.js +47 -0
- package/dist/runtime/utils/admin-users.d.ts +20 -0
- package/dist/runtime/utils/admin-users.js +19 -0
- package/dist/runtime/utils/auth-error.d.ts +6 -0
- package/dist/runtime/utils/auth-error.js +11 -0
- package/dist/runtime/utils/cms-paths.d.ts +5 -0
- package/dist/runtime/utils/cms-paths.js +13 -0
- package/dist/runtime/utils/collections.d.ts +176 -0
- package/dist/runtime/utils/collections.js +30 -0
- package/dist/runtime/utils/dictionaries.d.ts +65 -0
- package/dist/runtime/utils/dictionaries.js +14 -0
- package/dist/runtime/utils/field-errors.d.ts +4 -0
- package/dist/runtime/utils/field-errors.js +9 -0
- package/dist/runtime/utils/field-values.d.ts +19 -0
- package/dist/runtime/utils/field-values.js +82 -0
- package/dist/runtime/utils/helpers.d.ts +4 -0
- package/dist/runtime/utils/helpers.js +20 -0
- package/dist/runtime/utils/media-library-query.d.ts +54 -0
- package/dist/runtime/utils/media-library-query.js +190 -0
- package/dist/runtime/utils/options.d.ts +19 -0
- package/dist/runtime/utils/options.js +3 -0
- package/dist/runtime/utils/preview.d.ts +22 -0
- package/dist/runtime/utils/preview.js +33 -0
- package/dist/runtime/utils/relation.d.ts +33 -0
- package/dist/runtime/utils/relation.js +23 -0
- package/dist/runtime/utils/slugify.d.ts +2 -0
- package/dist/runtime/utils/slugify.js +4 -0
- package/dist/types.d.mts +7 -0
- package/package.json +84 -3
- package/src/admin-components.ts +124 -0
- package/src/module.ts +592 -0
- package/src/runtime/assets/img/katecms-logo.svg +17 -0
- package/src/runtime/assets/styles/_functions.scss +70 -0
- package/src/runtime/assets/styles/_index.scss +3 -0
- package/src/runtime/assets/styles/_mixins.scss +256 -0
- package/src/runtime/assets/styles/_variables.scss +35 -0
- package/src/runtime/composables/getCollection.ts +253 -0
- package/src/runtime/composables/getOptions.ts +42 -0
- package/src/runtime/composables/getQueryCollection.ts +325 -0
- package/src/runtime/composables/getTerms.ts +231 -0
- package/src/runtime/composables/useAuth.ts +43 -0
- package/src/runtime/composables/useAuthCooldown.ts +52 -0
- package/src/runtime/composables/useCmsPaths.ts +24 -0
- package/src/runtime/composables/useKateCmsExtensions.ts +81 -0
- package/src/runtime/composables/useMediaLibrary.ts +168 -0
- package/src/runtime/composables/useMenuAccess.ts +25 -0
- package/src/runtime/internal/admin/AdminHeader.vue +106 -0
- package/src/runtime/internal/admin/AppMenu.vue +290 -0
- package/src/runtime/internal/admin/AppUser.vue +260 -0
- package/src/runtime/internal/admin/CollectionEntryForm.vue +1044 -0
- package/src/runtime/internal/admin/ConfirmDialog.vue +164 -0
- package/src/runtime/internal/admin/DictionaryTermForm.vue +400 -0
- package/src/runtime/internal/admin/EntryRevisions.vue +145 -0
- package/src/runtime/internal/admin/MediaLibraryFilters.vue +186 -0
- package/src/runtime/internal/admin/MediaLibraryModal.vue +526 -0
- package/src/runtime/internal/admin/OptionPageForm.vue +277 -0
- package/src/runtime/internal/admin/UserAvatarField.vue +337 -0
- package/src/runtime/internal/fields/AccordionField.vue +258 -0
- package/src/runtime/internal/fields/ButtonGroupField.vue +144 -0
- package/src/runtime/internal/fields/CheckboxField.vue +228 -0
- package/src/runtime/internal/fields/ColorPickerField.vue +926 -0
- package/src/runtime/internal/fields/DatePickerField.vue +33 -0
- package/src/runtime/internal/fields/DateTimePickerField.vue +33 -0
- package/src/runtime/internal/fields/DictionaryField.vue +403 -0
- package/src/runtime/internal/fields/EmailField.vue +28 -0
- package/src/runtime/internal/fields/FileField.vue +480 -0
- package/src/runtime/internal/fields/FlexibleContentField.vue +1296 -0
- package/src/runtime/internal/fields/GalleryField.vue +677 -0
- package/src/runtime/internal/fields/GroupField.vue +136 -0
- package/src/runtime/internal/fields/ImageField.vue +730 -0
- package/src/runtime/internal/fields/ImageSelectField.vue +213 -0
- package/src/runtime/internal/fields/LinkField.vue +338 -0
- package/src/runtime/internal/fields/NumberField.vue +32 -0
- package/src/runtime/internal/fields/OembedField.vue +187 -0
- package/src/runtime/internal/fields/OpenStreetMapField.vue +1716 -0
- package/src/runtime/internal/fields/PageLinkField.vue +186 -0
- package/src/runtime/internal/fields/PasswordField.vue +127 -0
- package/src/runtime/internal/fields/PostObjectField.vue +187 -0
- package/src/runtime/internal/fields/RadioField.vue +195 -0
- package/src/runtime/internal/fields/RangeField.vue +62 -0
- package/src/runtime/internal/fields/RelationshipField.vue +604 -0
- package/src/runtime/internal/fields/RepeaterField.vue +999 -0
- package/src/runtime/internal/fields/SelectField.vue +118 -0
- package/src/runtime/internal/fields/SeparatorField.vue +77 -0
- package/src/runtime/internal/fields/TabField.vue +249 -0
- package/src/runtime/internal/fields/TextField.vue +29 -0
- package/src/runtime/internal/fields/TextareaField.vue +61 -0
- package/src/runtime/internal/fields/TimePickerField.vue +31 -0
- package/src/runtime/internal/fields/TrueFalseField.vue +181 -0
- package/src/runtime/internal/fields/UrlField.vue +28 -0
- package/src/runtime/internal/fields/UserField.vue +203 -0
- package/src/runtime/internal/fields/WysiwygField.vue +1061 -0
- package/src/runtime/internal/parts/DateTimeControl.vue +657 -0
- package/src/runtime/internal/parts/FieldAddon.vue +60 -0
- package/src/runtime/internal/parts/FieldInstructions.vue +38 -0
- package/src/runtime/internal/parts/FieldLabel.vue +56 -0
- package/src/runtime/internal/parts/FieldWrapper.vue +63 -0
- package/src/runtime/internal/parts/ImageCropper.vue +415 -0
- package/src/runtime/internal/parts/InputControl.vue +189 -0
- package/src/runtime/internal/ui/UiButton.vue +274 -0
- package/src/runtime/internal/ui/UiNotice.vue +302 -0
- package/src/runtime/internal/ui/UiSelect.vue +1420 -0
- package/src/runtime/middleware/auth-guard.ts +52 -0
- package/src/runtime/pages/admin/collections/[id].vue +486 -0
- package/src/runtime/pages/admin/collections/create.vue +208 -0
- package/src/runtime/pages/admin/collections/index.vue +955 -0
- package/src/runtime/pages/admin/demo-fields.vue +1354 -0
- package/src/runtime/pages/admin/dictionaries/[id].vue +246 -0
- package/src/runtime/pages/admin/dictionaries/index.vue +438 -0
- package/src/runtime/pages/admin/index.vue +155 -0
- package/src/runtime/pages/admin/login.vue +159 -0
- package/src/runtime/pages/admin/media.vue +1176 -0
- package/src/runtime/pages/admin/options/[page].vue +174 -0
- package/src/runtime/pages/admin/register.vue +179 -0
- package/src/runtime/pages/admin/users/[id].vue +382 -0
- package/src/runtime/pages/admin/users/create.vue +232 -0
- package/src/runtime/pages/admin/users/index.vue +374 -0
- package/src/runtime/pages/index.vue +265 -0
- package/src/runtime/server/api/_katecms/auth/login.post.ts +62 -0
- package/src/runtime/server/api/_katecms/auth/logout.post.ts +7 -0
- package/src/runtime/server/api/_katecms/auth/register.post.ts +112 -0
- package/src/runtime/server/api/_katecms/auth/state.get.ts +19 -0
- package/src/runtime/server/api/_katecms/collections/[collection]/[id].delete.ts +77 -0
- package/src/runtime/server/api/_katecms/collections/[collection]/[id].get.ts +57 -0
- package/src/runtime/server/api/_katecms/collections/[collection]/[id].patch.ts +157 -0
- package/src/runtime/server/api/_katecms/collections/[collection]/revisions/[revisionId].post.ts +133 -0
- package/src/runtime/server/api/_katecms/collections/[collection]/revisions.get.ts +35 -0
- package/src/runtime/server/api/_katecms/collections/[collection].get.ts +177 -0
- package/src/runtime/server/api/_katecms/collections/[collection].post.ts +111 -0
- package/src/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].delete.ts +37 -0
- package/src/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].get.ts +51 -0
- package/src/runtime/server/api/_katecms/dictionaries/[dictionary]/[id].patch.ts +101 -0
- package/src/runtime/server/api/_katecms/dictionaries/[dictionary].get.ts +43 -0
- package/src/runtime/server/api/_katecms/dictionaries/[dictionary].post.ts +78 -0
- package/src/runtime/server/api/_katecms/media/[id]/regenerate.post.ts +39 -0
- package/src/runtime/server/api/_katecms/media/[id].delete.ts +28 -0
- package/src/runtime/server/api/_katecms/media/[id].get.ts +25 -0
- package/src/runtime/server/api/_katecms/media/[id].patch.ts +60 -0
- package/src/runtime/server/api/_katecms/media/index.get.ts +96 -0
- package/src/runtime/server/api/_katecms/media/index.post.ts +104 -0
- package/src/runtime/server/api/_katecms/media/regenerate.post.ts +38 -0
- package/src/runtime/server/api/_katecms/menu.get.ts +19 -0
- package/src/runtime/server/api/_katecms/oembed.get.ts +62 -0
- package/src/runtime/server/api/_katecms/options/[page].get.ts +35 -0
- package/src/runtime/server/api/_katecms/options/[page].patch.ts +46 -0
- package/src/runtime/server/api/_katecms/query.get.ts +332 -0
- package/src/runtime/server/api/_katecms/relation/entries.get.ts +98 -0
- package/src/runtime/server/api/_katecms/relation/terms.get.ts +61 -0
- package/src/runtime/server/api/_katecms/resolve.get.ts +148 -0
- package/src/runtime/server/api/_katecms/terms.get.ts +258 -0
- package/src/runtime/server/api/_katecms/users/[id].delete.ts +57 -0
- package/src/runtime/server/api/_katecms/users/[id].patch.ts +177 -0
- package/src/runtime/server/api/_katecms/users.get.ts +48 -0
- package/src/runtime/server/api/_katecms/users.post.ts +85 -0
- package/src/runtime/server/api/uploads/[...key].get.ts +33 -0
- package/src/runtime/server/kit.ts +5 -0
- package/src/runtime/server/middleware/admin-headers.ts +14 -0
- package/src/runtime/server/plugins/auto-migrate.ts +53 -0
- package/src/runtime/server/tsconfig.json +3 -0
- package/src/runtime/server/utils/auth-attempts.ts +71 -0
- package/src/runtime/server/utils/auth-rate-limit.ts +48 -0
- package/src/runtime/server/utils/client-address.ts +41 -0
- package/src/runtime/server/utils/collections.ts +381 -0
- package/src/runtime/server/utils/db.ts +36 -0
- package/src/runtime/server/utils/dictionaries.ts +397 -0
- package/src/runtime/server/utils/media-list.ts +131 -0
- package/src/runtime/server/utils/media.ts +94 -0
- package/src/runtime/server/utils/oembed-fetch.ts +157 -0
- package/src/runtime/server/utils/options.ts +86 -0
- package/src/runtime/server/utils/permissions.ts +44 -0
- package/src/runtime/server/utils/public-fields-query.ts +14 -0
- package/src/runtime/server/utils/public-term.ts +98 -0
- package/src/runtime/server/utils/regenerate.ts +56 -0
- package/src/runtime/server/utils/relation.ts +96 -0
- package/src/runtime/server/utils/request-address.ts +16 -0
- package/src/runtime/server/utils/revisions.ts +256 -0
- package/src/runtime/server/utils/session.ts +112 -0
- package/src/runtime/server/utils/upload-headers.ts +35 -0
- package/src/runtime/server/utils/users.ts +67 -0
- package/src/runtime/utils/admin-users.ts +43 -0
- package/src/runtime/utils/auth-error.ts +22 -0
- package/src/runtime/utils/cms-paths.ts +17 -0
- package/src/runtime/utils/collections.ts +228 -0
- package/src/runtime/utils/dictionaries.ts +89 -0
- package/src/runtime/utils/field-errors.ts +12 -0
- package/src/runtime/utils/field-values.ts +101 -0
- package/src/runtime/utils/helpers.ts +33 -0
- package/src/runtime/utils/media-library-query.ts +263 -0
- package/src/runtime/utils/options.ts +25 -0
- package/src/runtime/utils/preview.ts +56 -0
- package/src/runtime/utils/relation.ts +60 -0
- package/src/runtime/utils/slugify.ts +10 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
title: { type: String, required: true },
|
|
4
|
+
backTo: { type: String, required: false },
|
|
5
|
+
meta: { type: String, required: false },
|
|
6
|
+
count: { type: [String, Number], required: false }
|
|
7
|
+
});
|
|
8
|
+
const rootClass = "katecms-admin-header";
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div :class="rootClass">
|
|
13
|
+
<KateCmsUiButton
|
|
14
|
+
v-if="backTo"
|
|
15
|
+
tag="a"
|
|
16
|
+
:variant="['secondary', 'icon']"
|
|
17
|
+
:link="{ url: backTo, title: 'Back' }"
|
|
18
|
+
>
|
|
19
|
+
<svg
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
viewBox="0 0 640 640"
|
|
22
|
+
><path
|
|
23
|
+
d="M73 297a32 32 0 0 0 0 46l160 160a32 32 0 0 0 46-46L173 352h371a32 32 0 1 0 0-64H173l106-105a32 32 0 0 0-46-46z"
|
|
24
|
+
fill="currentColor"
|
|
25
|
+
/></svg>
|
|
26
|
+
</KateCmsUiButton>
|
|
27
|
+
|
|
28
|
+
<div :class="`${rootClass}__main`">
|
|
29
|
+
<div :class="`${rootClass}__title`">
|
|
30
|
+
{{ title }}
|
|
31
|
+
<span
|
|
32
|
+
v-if="count != null && count !== ''"
|
|
33
|
+
:class="`${rootClass}__count`"
|
|
34
|
+
>{{ count }}</span>
|
|
35
|
+
</div>
|
|
36
|
+
<div
|
|
37
|
+
v-if="meta"
|
|
38
|
+
:class="`${rootClass}__meta`"
|
|
39
|
+
>
|
|
40
|
+
{{ meta }}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div
|
|
45
|
+
v-if="$slots.default"
|
|
46
|
+
:class="`${rootClass}__actions`"
|
|
47
|
+
>
|
|
48
|
+
<slot />
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<style scoped>
|
|
54
|
+
body#katecms-body .katecms-admin-header {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 1rem;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
padding: 0.5rem 0;
|
|
61
|
+
background: var(--katecms-color-surface);
|
|
62
|
+
}
|
|
63
|
+
body#katecms-body .katecms-admin-header__main {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 0.25rem;
|
|
67
|
+
min-width: 0;
|
|
68
|
+
}
|
|
69
|
+
body#katecms-body .katecms-admin-header__title {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: baseline;
|
|
72
|
+
gap: 0.5rem;
|
|
73
|
+
font-size: 1.125rem;
|
|
74
|
+
font-weight: 600;
|
|
75
|
+
}
|
|
76
|
+
body#katecms-body .katecms-admin-header__count {
|
|
77
|
+
color: var(--katecms-color-muted);
|
|
78
|
+
font-size: 1rem;
|
|
79
|
+
font-weight: 400;
|
|
80
|
+
}
|
|
81
|
+
body#katecms-body .katecms-admin-header__meta {
|
|
82
|
+
font-size: 0.8125rem;
|
|
83
|
+
color: var(--katecms-color-muted);
|
|
84
|
+
}
|
|
85
|
+
body#katecms-body .katecms-admin-header__actions {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: 0.5rem;
|
|
89
|
+
margin-left: auto;
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
/** When set, a back button is shown before the title. */
|
|
4
|
+
backTo?: string;
|
|
5
|
+
/** Secondary line under the title. */
|
|
6
|
+
meta?: string;
|
|
7
|
+
/** Shown after the title, for example a result count. */
|
|
8
|
+
count?: string | number;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_template: () => {
|
|
11
|
+
__VLS_Slots: {
|
|
12
|
+
default?: (props: {}) => any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
16
|
+
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>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useRoute, useRuntimeConfig } from "#imports";
|
|
4
|
+
import { useCmsPaths } from "../../composables/useCmsPaths";
|
|
5
|
+
import { useKateCmsMenuItems } from "../../composables/useKateCmsExtensions";
|
|
6
|
+
import { useMenuAccess } from "../../composables/useMenuAccess";
|
|
7
|
+
const rootClass = "katecms-menu";
|
|
8
|
+
const route = useRoute();
|
|
9
|
+
const paths = useCmsPaths();
|
|
10
|
+
const runtimeConfig = useRuntimeConfig();
|
|
11
|
+
const extraMenu = useKateCmsMenuItems();
|
|
12
|
+
const menuAccess = useMenuAccess();
|
|
13
|
+
const visibleAccess = computed(() => new Set(menuAccess.data.value?.visible ?? []));
|
|
14
|
+
const DASHBOARD_ICON = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M4 4h7v7H4V4Zm9 0h7v5h-7V4ZM4 13h7v7H4v-7Zm9 7v-9h7v9h-7Z" stroke="currentColor" stroke-width="1.6"/></svg>';
|
|
15
|
+
const COLLECTION_ICON = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M7 3h7l5 5v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z" stroke="currentColor" stroke-width="1.6"/><path d="M14 3v5h5" stroke="currentColor" stroke-width="1.6"/></svg>';
|
|
16
|
+
const DICTIONARY_ICON = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M7 4h10a2 2 0 0 1 2 2v14l-7-3-7 3V6a2 2 0 0 1 2-2Z" stroke="currentColor" stroke-width="1.6"/><path d="M9 8h6M9 12h6" stroke="currentColor" stroke-width="1.6"/></svg>';
|
|
17
|
+
const MEDIA_ICON = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor" stroke-width="1.6"/><path d="m3 16 5-5 4 4 3-3 6 6" stroke="currentColor" stroke-width="1.6"/><circle cx="9" cy="9" r="1.4" fill="currentColor"/></svg>';
|
|
18
|
+
const USERS_ICON = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><circle cx="9" cy="8" r="3" stroke="currentColor" stroke-width="1.6"/><path d="M4 19c0-2.8 2.2-5 5-5h0c2.8 0 5 2.2 5 5" stroke="currentColor" stroke-width="1.6"/><circle cx="17" cy="9" r="2.2" stroke="currentColor" stroke-width="1.6"/><path d="M16.2 14.2c2.2.4 3.8 2.3 3.8 4.8" stroke="currentColor" stroke-width="1.6"/></svg>';
|
|
19
|
+
const OPTIONS_ICON = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="3" stroke="currentColor" stroke-width="1.6"/><path d="M12 3.5v2.2M12 18.3v2.2M4.9 6.5l1.6 1.6M17.5 16.9l1.6 1.6M3.5 12h2.2M18.3 12h2.2M4.9 17.5l1.6-1.6M17.5 7.1l1.6-1.6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>';
|
|
20
|
+
function isSvgIcon(value) {
|
|
21
|
+
return typeof value === "string" && /^\s*<svg[\s>]/i.test(value);
|
|
22
|
+
}
|
|
23
|
+
function isActive(to, exact = false) {
|
|
24
|
+
const path = route.path.replace(/\/$/, "") || "/";
|
|
25
|
+
const target = to.replace(/\/$/, "") || "/";
|
|
26
|
+
if (path === target) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return !exact && path.startsWith(`${target}/`);
|
|
30
|
+
}
|
|
31
|
+
const groups = computed(() => {
|
|
32
|
+
const collections = runtimeConfig.public.katecms?.collections ?? {};
|
|
33
|
+
const collectionItems = Object.entries(collections).map(([slug, def]) => {
|
|
34
|
+
const to = paths.collection(slug);
|
|
35
|
+
return {
|
|
36
|
+
key: `collection:${slug}`,
|
|
37
|
+
label: def.labels?.name || slug,
|
|
38
|
+
to,
|
|
39
|
+
icon: isSvgIcon(def.icon) ? def.icon : COLLECTION_ICON,
|
|
40
|
+
active: isActive(to)
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
const dictionaries = runtimeConfig.public.katecms?.dictionaries ?? {};
|
|
44
|
+
const dictionaryItems = Object.entries(dictionaries).map(([slug, def]) => {
|
|
45
|
+
const to = paths.dictionary(slug);
|
|
46
|
+
return {
|
|
47
|
+
key: `dictionary:${slug}`,
|
|
48
|
+
label: def.labels?.name || slug,
|
|
49
|
+
to,
|
|
50
|
+
icon: isSvgIcon(def.icon) ? def.icon : DICTIONARY_ICON,
|
|
51
|
+
active: isActive(to)
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
const optionPages = runtimeConfig.public.katecms?.options ?? {};
|
|
55
|
+
const optionItems = Object.entries(optionPages).map(([slug, def]) => {
|
|
56
|
+
const to = paths.option(slug);
|
|
57
|
+
return {
|
|
58
|
+
key: `option:${slug}`,
|
|
59
|
+
label: def.label || slug,
|
|
60
|
+
to,
|
|
61
|
+
icon: isSvgIcon(def.icon) ? def.icon : OPTIONS_ICON,
|
|
62
|
+
active: isActive(to)
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
const result = [
|
|
66
|
+
{
|
|
67
|
+
key: "overview",
|
|
68
|
+
items: [
|
|
69
|
+
{
|
|
70
|
+
key: "dashboard",
|
|
71
|
+
label: "Dashboard",
|
|
72
|
+
to: paths.admin,
|
|
73
|
+
icon: DASHBOARD_ICON,
|
|
74
|
+
active: isActive(paths.admin, true)
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
if (collectionItems.length) {
|
|
80
|
+
result.push({
|
|
81
|
+
key: "collections",
|
|
82
|
+
label: "Collections",
|
|
83
|
+
items: collectionItems
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if (dictionaryItems.length) {
|
|
87
|
+
result.push({
|
|
88
|
+
key: "dictionaries",
|
|
89
|
+
label: "Dictionaries",
|
|
90
|
+
items: dictionaryItems
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
if (optionItems.length) {
|
|
94
|
+
result.push({
|
|
95
|
+
key: "options",
|
|
96
|
+
label: "Options",
|
|
97
|
+
items: optionItems
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
result.push({
|
|
101
|
+
key: "manage",
|
|
102
|
+
label: "Manage",
|
|
103
|
+
items: [
|
|
104
|
+
{
|
|
105
|
+
key: "media",
|
|
106
|
+
label: "Media",
|
|
107
|
+
to: paths.media,
|
|
108
|
+
icon: MEDIA_ICON,
|
|
109
|
+
active: isActive(paths.media)
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
key: "users",
|
|
113
|
+
label: "Users",
|
|
114
|
+
to: paths.users,
|
|
115
|
+
icon: USERS_ICON,
|
|
116
|
+
active: isActive(paths.users)
|
|
117
|
+
},
|
|
118
|
+
...extraMenu.value.flatMap((item) => {
|
|
119
|
+
if (item.access && !visibleAccess.value.has(item.access)) {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
return [{
|
|
123
|
+
key: item.key,
|
|
124
|
+
label: item.label,
|
|
125
|
+
to: item.to,
|
|
126
|
+
icon: item.icon || OPTIONS_ICON,
|
|
127
|
+
active: isActive(item.to)
|
|
128
|
+
}];
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
return result;
|
|
133
|
+
});
|
|
134
|
+
</script>
|
|
135
|
+
|
|
136
|
+
<template>
|
|
137
|
+
<div :class="rootClass">
|
|
138
|
+
<!-- <NuxtLink
|
|
139
|
+
:class="`${rootClass}__logo`"
|
|
140
|
+
:to="paths.admin"
|
|
141
|
+
>
|
|
142
|
+
<img
|
|
143
|
+
src="../../assets/img/katecms-logo.svg"
|
|
144
|
+
alt="KateCMS"
|
|
145
|
+
>
|
|
146
|
+
</NuxtLink> -->
|
|
147
|
+
|
|
148
|
+
<div :class="`${rootClass}__wrap`">
|
|
149
|
+
<div
|
|
150
|
+
v-for="group in groups"
|
|
151
|
+
:key="group.key"
|
|
152
|
+
:class="`${rootClass}__group`"
|
|
153
|
+
>
|
|
154
|
+
<div
|
|
155
|
+
v-if="group.label"
|
|
156
|
+
:class="`${rootClass}__heading`"
|
|
157
|
+
>
|
|
158
|
+
{{ group.label }}
|
|
159
|
+
</div>
|
|
160
|
+
<NuxtLink
|
|
161
|
+
v-for="item in group.items"
|
|
162
|
+
:key="item.key"
|
|
163
|
+
:to="item.to"
|
|
164
|
+
:class="[`${rootClass}__link`, { 'is-active': item.active }]"
|
|
165
|
+
>
|
|
166
|
+
<span
|
|
167
|
+
:class="`${rootClass}__icon`"
|
|
168
|
+
aria-hidden="true"
|
|
169
|
+
v-html="item.icon"
|
|
170
|
+
/>
|
|
171
|
+
<span :class="`${rootClass}__label`">{{ item.label }}</span>
|
|
172
|
+
</NuxtLink>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
|
|
178
|
+
<style scoped>
|
|
179
|
+
body#katecms-body .katecms-menu {
|
|
180
|
+
display: flex;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
background: var(--katecms-color-bg);
|
|
183
|
+
}
|
|
184
|
+
body#katecms-body .katecms-menu__wrap {
|
|
185
|
+
flex-grow: 1;
|
|
186
|
+
overflow: auto;
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
padding: 0.5rem;
|
|
190
|
+
gap: 0.75rem;
|
|
191
|
+
}
|
|
192
|
+
body#katecms-body .katecms-menu__group {
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
gap: 0.125rem;
|
|
196
|
+
}
|
|
197
|
+
body#katecms-body .katecms-menu__heading {
|
|
198
|
+
padding: 0.25rem 0.625rem;
|
|
199
|
+
font-size: 0.6875rem;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
letter-spacing: 0.04em;
|
|
202
|
+
text-transform: uppercase;
|
|
203
|
+
color: var(--katecms-color-muted);
|
|
204
|
+
}
|
|
205
|
+
body#katecms-body .katecms-menu__link {
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
gap: 0.5rem;
|
|
209
|
+
padding: 0.5rem 0.625rem;
|
|
210
|
+
border-radius: var(--katecms-border-radius-inter);
|
|
211
|
+
color: var(--katecms-color-ink);
|
|
212
|
+
text-decoration: none;
|
|
213
|
+
font-size: 0.875rem;
|
|
214
|
+
}
|
|
215
|
+
body#katecms-body .katecms-menu__link:hover {
|
|
216
|
+
background: var(--katecms-color-accent-wash);
|
|
217
|
+
}
|
|
218
|
+
body#katecms-body .katecms-menu__link.is-active {
|
|
219
|
+
background: var(--katecms-color-accent-wash);
|
|
220
|
+
color: var(--katecms-color-accent);
|
|
221
|
+
font-weight: 600;
|
|
222
|
+
}
|
|
223
|
+
body#katecms-body .katecms-menu__icon {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
flex-shrink: 0;
|
|
228
|
+
width: 1.125rem;
|
|
229
|
+
height: 1.125rem;
|
|
230
|
+
color: inherit;
|
|
231
|
+
}
|
|
232
|
+
body#katecms-body .katecms-menu__icon :deep(svg) {
|
|
233
|
+
display: block;
|
|
234
|
+
width: 100%;
|
|
235
|
+
height: 100%;
|
|
236
|
+
max-width: none;
|
|
237
|
+
}
|
|
238
|
+
body#katecms-body .katecms-menu__label {
|
|
239
|
+
min-width: 0;
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
text-overflow: ellipsis;
|
|
242
|
+
white-space: nowrap;
|
|
243
|
+
}
|
|
244
|
+
</style>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
|
3
|
+
import { useAuth } from "../../composables/useAuth";
|
|
4
|
+
import { useCmsPaths } from "../../composables/useCmsPaths";
|
|
5
|
+
import { avatarSrc, userInitials } from "../../utils/admin-users";
|
|
6
|
+
const rootClass = "katecms-user";
|
|
7
|
+
const paths = useCmsPaths();
|
|
8
|
+
const { user, logout, loggingOut } = useAuth();
|
|
9
|
+
const menuOpen = ref(false);
|
|
10
|
+
const rootEl = ref(null);
|
|
11
|
+
const avatarUrl = computed(() => avatarSrc(user.value?.avatar));
|
|
12
|
+
const displayName = computed(() => {
|
|
13
|
+
const current = user.value;
|
|
14
|
+
if (!current) {
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
const name = current.name?.trim();
|
|
18
|
+
if (name) {
|
|
19
|
+
return name;
|
|
20
|
+
}
|
|
21
|
+
return current.email.split("@")[0] || current.email;
|
|
22
|
+
});
|
|
23
|
+
const initials = computed(() => {
|
|
24
|
+
const current = user.value;
|
|
25
|
+
if (!current) {
|
|
26
|
+
return "?";
|
|
27
|
+
}
|
|
28
|
+
return userInitials(current);
|
|
29
|
+
});
|
|
30
|
+
const profileTo = computed(() => {
|
|
31
|
+
const id = user.value?.id;
|
|
32
|
+
return id ? paths.user(id) : paths.users;
|
|
33
|
+
});
|
|
34
|
+
function closeMenu() {
|
|
35
|
+
menuOpen.value = false;
|
|
36
|
+
}
|
|
37
|
+
function toggleMenu() {
|
|
38
|
+
menuOpen.value = !menuOpen.value;
|
|
39
|
+
}
|
|
40
|
+
function onDocumentClick(event) {
|
|
41
|
+
if (!menuOpen.value) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const target = event.target;
|
|
45
|
+
if (target && rootEl.value?.contains(target)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
closeMenu();
|
|
49
|
+
}
|
|
50
|
+
async function onLogout() {
|
|
51
|
+
closeMenu();
|
|
52
|
+
await logout();
|
|
53
|
+
}
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
document.addEventListener("click", onDocumentClick);
|
|
56
|
+
});
|
|
57
|
+
onBeforeUnmount(() => {
|
|
58
|
+
document.removeEventListener("click", onDocumentClick);
|
|
59
|
+
});
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<div
|
|
64
|
+
v-if="user"
|
|
65
|
+
ref="rootEl"
|
|
66
|
+
:class="rootClass"
|
|
67
|
+
>
|
|
68
|
+
<button
|
|
69
|
+
type="button"
|
|
70
|
+
:class="[`${rootClass}__btn`, { 'is-open': menuOpen }]"
|
|
71
|
+
:aria-expanded="menuOpen"
|
|
72
|
+
aria-haspopup="menu"
|
|
73
|
+
@click.stop="toggleMenu"
|
|
74
|
+
>
|
|
75
|
+
<span :class="`${rootClass}__avatar`">
|
|
76
|
+
<img
|
|
77
|
+
v-if="avatarUrl"
|
|
78
|
+
:src="avatarUrl"
|
|
79
|
+
alt=""
|
|
80
|
+
>
|
|
81
|
+
<span
|
|
82
|
+
v-else
|
|
83
|
+
:class="`${rootClass}__initials`"
|
|
84
|
+
>{{ initials }}</span>
|
|
85
|
+
</span>
|
|
86
|
+
<span :class="`${rootClass}__meta`">
|
|
87
|
+
<span
|
|
88
|
+
v-if="displayName"
|
|
89
|
+
:class="`${rootClass}__name`"
|
|
90
|
+
>{{ displayName }}</span>
|
|
91
|
+
<span :class="`${rootClass}__email`">{{ user.email }}</span>
|
|
92
|
+
</span>
|
|
93
|
+
</button>
|
|
94
|
+
|
|
95
|
+
<div
|
|
96
|
+
v-if="menuOpen"
|
|
97
|
+
:class="`${rootClass}__menu`"
|
|
98
|
+
role="menu"
|
|
99
|
+
@click.stop
|
|
100
|
+
>
|
|
101
|
+
<NuxtLink
|
|
102
|
+
:to="profileTo"
|
|
103
|
+
role="menuitem"
|
|
104
|
+
:class="`${rootClass}__menu-item`"
|
|
105
|
+
@click="closeMenu"
|
|
106
|
+
>
|
|
107
|
+
Profile
|
|
108
|
+
</NuxtLink>
|
|
109
|
+
<button
|
|
110
|
+
type="button"
|
|
111
|
+
role="menuitem"
|
|
112
|
+
:class="[`${rootClass}__menu-item`, `${rootClass}__menu-item--danger`]"
|
|
113
|
+
:disabled="loggingOut"
|
|
114
|
+
@click="onLogout"
|
|
115
|
+
>
|
|
116
|
+
{{ loggingOut ? "Signing out\u2026" : "Sign out" }}
|
|
117
|
+
</button>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
|
|
122
|
+
<style scoped>
|
|
123
|
+
body#katecms-body .katecms-user {
|
|
124
|
+
position: relative;
|
|
125
|
+
max-width: 15rem;
|
|
126
|
+
}
|
|
127
|
+
body#katecms-body .katecms-user__btn {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 0.625rem;
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: 0.25rem 0.5rem;
|
|
133
|
+
border: none;
|
|
134
|
+
border-radius: var(--katecms-border-radius);
|
|
135
|
+
background: transparent;
|
|
136
|
+
color: inherit;
|
|
137
|
+
text-align: left;
|
|
138
|
+
font: inherit;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
body#katecms-body .katecms-user__btn:hover, body#katecms-body .katecms-user__btn.is-open {
|
|
142
|
+
background: var(--katecms-color-accent-wash);
|
|
143
|
+
}
|
|
144
|
+
body#katecms-body .katecms-user__avatar {
|
|
145
|
+
flex-shrink: 0;
|
|
146
|
+
width: 2rem;
|
|
147
|
+
height: 2rem;
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
background: var(--katecms-color-accent-wash);
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
}
|
|
155
|
+
body#katecms-body .katecms-user__avatar img {
|
|
156
|
+
display: block;
|
|
157
|
+
width: 100%;
|
|
158
|
+
height: 100%;
|
|
159
|
+
max-width: none;
|
|
160
|
+
object-fit: cover;
|
|
161
|
+
}
|
|
162
|
+
body#katecms-body .katecms-user__initials {
|
|
163
|
+
font-size: 0.6875rem;
|
|
164
|
+
font-weight: 700;
|
|
165
|
+
color: var(--katecms-color-accent);
|
|
166
|
+
line-height: 1;
|
|
167
|
+
}
|
|
168
|
+
body#katecms-body .katecms-user__meta {
|
|
169
|
+
min-width: 0;
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
gap: 0.125rem;
|
|
173
|
+
}
|
|
174
|
+
body#katecms-body .katecms-user__name {
|
|
175
|
+
font-size: 0.8125rem;
|
|
176
|
+
font-weight: 600;
|
|
177
|
+
color: var(--katecms-color-ink);
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
text-overflow: ellipsis;
|
|
181
|
+
}
|
|
182
|
+
body#katecms-body .katecms-user__email {
|
|
183
|
+
font-size: 0.75rem;
|
|
184
|
+
color: var(--katecms-color-muted);
|
|
185
|
+
white-space: nowrap;
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
text-overflow: ellipsis;
|
|
188
|
+
}
|
|
189
|
+
body#katecms-body .katecms-user__menu {
|
|
190
|
+
position: absolute;
|
|
191
|
+
top: calc(100% + 0.25rem);
|
|
192
|
+
right: 0;
|
|
193
|
+
left: 0;
|
|
194
|
+
z-index: 20;
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
padding: 0.25rem;
|
|
198
|
+
background: var(--katecms-color-surface);
|
|
199
|
+
border: 1px solid var(--katecms-color-border);
|
|
200
|
+
border-radius: var(--katecms-border-radius);
|
|
201
|
+
box-shadow: var(--katecms-shadow-md);
|
|
202
|
+
}
|
|
203
|
+
body#katecms-body .katecms-user__menu-item {
|
|
204
|
+
display: block;
|
|
205
|
+
width: 100%;
|
|
206
|
+
padding: 0.5rem 0.625rem;
|
|
207
|
+
border: none;
|
|
208
|
+
border-radius: var(--katecms-border-radius-inter);
|
|
209
|
+
background: transparent;
|
|
210
|
+
color: var(--katecms-color-ink);
|
|
211
|
+
text-align: left;
|
|
212
|
+
text-decoration: none;
|
|
213
|
+
font: inherit;
|
|
214
|
+
font-size: 0.875rem;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
}
|
|
217
|
+
body#katecms-body .katecms-user__menu-item:hover {
|
|
218
|
+
background: var(--katecms-color-accent-wash);
|
|
219
|
+
}
|
|
220
|
+
body#katecms-body .katecms-user__menu-item:disabled {
|
|
221
|
+
opacity: 0.6;
|
|
222
|
+
cursor: not-allowed;
|
|
223
|
+
}
|
|
224
|
+
body#katecms-body .katecms-user__menu-item--danger {
|
|
225
|
+
color: var(--katecms-color-danger);
|
|
226
|
+
}
|
|
227
|
+
</style>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CollectionStatus } from '@katecms/core';
|
|
2
|
+
import type { AdminCollectionMeta, CollectionDictionaryPicker, CollectionEntryFormModel, EntryRevisionItem, ParentOption } from '../../utils/collections.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
collection: AdminCollectionMeta;
|
|
5
|
+
modelValue: CollectionEntryFormModel;
|
|
6
|
+
entryKey?: string | number;
|
|
7
|
+
parents?: ParentOption[];
|
|
8
|
+
saving?: boolean;
|
|
9
|
+
error?: string | null;
|
|
10
|
+
viewUrl?: string | null;
|
|
11
|
+
canUpdate?: boolean;
|
|
12
|
+
canDelete?: boolean;
|
|
13
|
+
/** Saved status from the server (trash vs live form status). */
|
|
14
|
+
savedStatus?: CollectionStatus;
|
|
15
|
+
dictionaryPickers?: CollectionDictionaryPicker[];
|
|
16
|
+
revisions?: EntryRevisionItem[];
|
|
17
|
+
revisionsLoading?: boolean;
|
|
18
|
+
revisionsError?: string;
|
|
19
|
+
};
|
|
20
|
+
declare function validateForSubmit(): boolean;
|
|
21
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
22
|
+
validateForSubmit: typeof validateForSubmit;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
delete: () => any;
|
|
25
|
+
trash: () => any;
|
|
26
|
+
ready: () => any;
|
|
27
|
+
submit: () => any;
|
|
28
|
+
restore: () => any;
|
|
29
|
+
"update:modelValue": (value: CollectionEntryFormModel) => any;
|
|
30
|
+
restoreRevision: (id: number) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
onDelete?: (() => any) | undefined;
|
|
33
|
+
onTrash?: (() => any) | undefined;
|
|
34
|
+
onReady?: (() => any) | undefined;
|
|
35
|
+
onSubmit?: (() => any) | undefined;
|
|
36
|
+
onRestore?: (() => any) | undefined;
|
|
37
|
+
"onUpdate:modelValue"?: ((value: CollectionEntryFormModel) => any) | undefined;
|
|
38
|
+
onRestoreRevision?: ((id: number) => any) | undefined;
|
|
39
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|