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,81 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue'
|
|
2
|
+
import { useState } from '#imports'
|
|
3
|
+
import type { AdminCollectionMeta, AdminEntry, PublicDictionaryTerm } from '../utils/collections'
|
|
4
|
+
|
|
5
|
+
/** Nuxt hook fired by `getCollection()` for the current route. */
|
|
6
|
+
export const MIRAICMS_COLLECTION_HOOK = 'katecms:collection' as const
|
|
7
|
+
|
|
8
|
+
/** Page resolved by `getCollection()` for the current route. */
|
|
9
|
+
export interface KateCmsPublicPage {
|
|
10
|
+
isArchive: ComputedRef<boolean>
|
|
11
|
+
isTerm: ComputedRef<boolean>
|
|
12
|
+
entry: ComputedRef<AdminEntry | null>
|
|
13
|
+
term: ComputedRef<PublicDictionaryTerm | null>
|
|
14
|
+
collection: ComputedRef<AdminCollectionMeta | null>
|
|
15
|
+
link: ComputedRef<string | null>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module '#app' {
|
|
19
|
+
interface RuntimeNuxtHooks {
|
|
20
|
+
'katecms:collection': (page: KateCmsPublicPage) => void
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Extra admin menu items, registered by addons. */
|
|
25
|
+
export interface KateCmsMenuExtra {
|
|
26
|
+
key: string
|
|
27
|
+
label: string
|
|
28
|
+
to: string
|
|
29
|
+
/** Inline SVG markup, same shape as the built-in menu icons. */
|
|
30
|
+
icon?: string
|
|
31
|
+
/**
|
|
32
|
+
* Resource the user must be allowed to read (`GET /api/_katecms/menu`).
|
|
33
|
+
* Omit to show the item to everyone who can open the admin.
|
|
34
|
+
*/
|
|
35
|
+
access?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Addon tab in the collection entry sidebar.
|
|
40
|
+
* The form supplies the "Page" tab. `key: "page"` is reserved for that tab.
|
|
41
|
+
*/
|
|
42
|
+
export interface KateCmsEntrySidebarTab {
|
|
43
|
+
key: string
|
|
44
|
+
label: string
|
|
45
|
+
/** Component name already registered on the Vue app. */
|
|
46
|
+
component: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function useKateCmsEntrySidebar() {
|
|
50
|
+
return useState<KateCmsEntrySidebarTab[]>('katecms:entry-sidebar', () => [])
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Register or replace one collection-entry sidebar tab. Addons call this from a plugin. */
|
|
54
|
+
export function registerKateCmsEntrySidebarTab(tab: KateCmsEntrySidebarTab) {
|
|
55
|
+
const key = tab.key.trim()
|
|
56
|
+
const label = tab.label.trim()
|
|
57
|
+
const component = tab.component.trim()
|
|
58
|
+
if (!key || key === 'page' || !label || !component) {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
const tabs = useKateCmsEntrySidebar()
|
|
62
|
+
const next = { key, label, component }
|
|
63
|
+
const index = tabs.value.findIndex(item => item.key === key)
|
|
64
|
+
if (index === -1) {
|
|
65
|
+
tabs.value.push(next)
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
tabs.value[index] = next
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Extra panels under a dictionary term form, registered by addons as component names. */
|
|
72
|
+
export function useKateCmsTermPanels() {
|
|
73
|
+
return useState<string[]>('katecms:term-panels', () => [])
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function useKateCmsMenuItems() {
|
|
77
|
+
return useState<KateCmsMenuExtra[]>('katecms:menu-items', () => [])
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { registerKateCmsField } from '../utils/helpers'
|
|
81
|
+
export { provideKateCmsFieldErrors } from '../utils/field-errors'
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { computed, ref } from 'vue'
|
|
2
|
+
import { $fetch } from '#imports'
|
|
3
|
+
import type { MediaItem } from '@katecms/core'
|
|
4
|
+
import {
|
|
5
|
+
defaultMediaLibraryFilters,
|
|
6
|
+
localUtcOffsetMinutes,
|
|
7
|
+
mediaLibraryQuery,
|
|
8
|
+
mediaMatchesFilters,
|
|
9
|
+
monthKey,
|
|
10
|
+
normalizeMediaLibraryFilters,
|
|
11
|
+
} from '../utils/media-library-query'
|
|
12
|
+
import type { MediaLibraryFilterState, MediaLibraryPage } from '../utils/media-library-query'
|
|
13
|
+
|
|
14
|
+
/** Page size for media pickers. The library page uses the same size. */
|
|
15
|
+
export const MEDIA_LIBRARY_PAGE_SIZE = 40
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Paged media library for pickers.
|
|
19
|
+
* `matches` runs on each loaded page so a field can hide files it cannot use.
|
|
20
|
+
* `fetched` counts raw API rows, so scrolling continues past pages that were filtered out.
|
|
21
|
+
*/
|
|
22
|
+
export function useMediaLibrary(
|
|
23
|
+
matches: () => (item: MediaItem) => boolean,
|
|
24
|
+
options?: { baseType?: 'image' },
|
|
25
|
+
) {
|
|
26
|
+
const items = ref<MediaItem[]>([])
|
|
27
|
+
const total = ref(0)
|
|
28
|
+
const fetched = ref(0)
|
|
29
|
+
const months = ref<string[]>([])
|
|
30
|
+
const filters = ref<MediaLibraryFilterState>(defaultMediaLibraryFilters())
|
|
31
|
+
const loading = ref(false)
|
|
32
|
+
const loadingMore = ref(false)
|
|
33
|
+
const hasMore = computed(() => fetched.value < total.value)
|
|
34
|
+
let requestId = 0
|
|
35
|
+
|
|
36
|
+
function fetchPage(offset: number) {
|
|
37
|
+
return $fetch<MediaLibraryPage<MediaItem>>('/api/_katecms/media', {
|
|
38
|
+
query: mediaLibraryQuery(filters.value, {
|
|
39
|
+
limit: MEDIA_LIBRARY_PAGE_SIZE,
|
|
40
|
+
offset,
|
|
41
|
+
}, options?.baseType),
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function accept(list: MediaItem[]) {
|
|
46
|
+
return list.filter(matches())
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Image fields cannot use these types, so don't page through every rejected file. */
|
|
50
|
+
function fieldHidesType(): boolean {
|
|
51
|
+
return options?.baseType === 'image'
|
|
52
|
+
&& filters.value.type !== 'all'
|
|
53
|
+
&& filters.value.type !== 'image'
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function rememberMonth(iso: string) {
|
|
57
|
+
const key = monthKey(iso, localUtcOffsetMinutes())
|
|
58
|
+
if (!key || months.value.includes(key)) {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
months.value = [...months.value, key].sort((a, b) => b.localeCompare(a))
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function load(loadOptions?: { resetFilters?: boolean, silent?: boolean }) {
|
|
65
|
+
const id = ++requestId
|
|
66
|
+
if (loadOptions?.resetFilters) {
|
|
67
|
+
filters.value = defaultMediaLibraryFilters()
|
|
68
|
+
}
|
|
69
|
+
if (!loadOptions?.silent) {
|
|
70
|
+
loading.value = true
|
|
71
|
+
items.value = []
|
|
72
|
+
fetched.value = 0
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const res = await fetchPage(0)
|
|
76
|
+
if (id !== requestId) {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
total.value = res.total
|
|
80
|
+
months.value = res.months
|
|
81
|
+
if (fieldHidesType()) {
|
|
82
|
+
fetched.value = res.total
|
|
83
|
+
items.value = []
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
fetched.value = res.media.length
|
|
87
|
+
items.value = accept(res.media)
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
if (id === requestId && !loadOptions?.silent) {
|
|
91
|
+
loading.value = false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async function loadMore() {
|
|
97
|
+
if (loading.value || loadingMore.value || !hasMore.value) {
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
const id = requestId
|
|
101
|
+
loadingMore.value = true
|
|
102
|
+
try {
|
|
103
|
+
const res = await fetchPage(fetched.value)
|
|
104
|
+
if (id !== requestId) {
|
|
105
|
+
return
|
|
106
|
+
}
|
|
107
|
+
total.value = res.total
|
|
108
|
+
if (!res.media.length) {
|
|
109
|
+
fetched.value = total.value
|
|
110
|
+
return
|
|
111
|
+
}
|
|
112
|
+
fetched.value += res.media.length
|
|
113
|
+
const seen = new Set(items.value.map(item => item.id))
|
|
114
|
+
const next = accept(res.media).filter(item => !seen.has(item.id))
|
|
115
|
+
items.value = [...items.value, ...next]
|
|
116
|
+
}
|
|
117
|
+
finally {
|
|
118
|
+
loadingMore.value = false
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
async function applyFilters(next: MediaLibraryFilterState) {
|
|
123
|
+
filters.value = normalizeMediaLibraryFilters(next)
|
|
124
|
+
await load()
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function prepend(item: MediaItem) {
|
|
128
|
+
if (mediaMatchesFilters(item, { ...filters.value, month: 'all' })) {
|
|
129
|
+
rememberMonth(item.created_at)
|
|
130
|
+
}
|
|
131
|
+
if (!matches()(item) || !mediaMatchesFilters(item, filters.value)) {
|
|
132
|
+
return
|
|
133
|
+
}
|
|
134
|
+
if (filters.value.sort !== 'date-desc') {
|
|
135
|
+
void load({ silent: true })
|
|
136
|
+
return
|
|
137
|
+
}
|
|
138
|
+
const index = items.value.findIndex(entry => entry.id === item.id)
|
|
139
|
+
if (index >= 0) {
|
|
140
|
+
items.value[index] = item
|
|
141
|
+
return
|
|
142
|
+
}
|
|
143
|
+
items.value = [item, ...items.value]
|
|
144
|
+
total.value += 1
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function replace(item: MediaItem) {
|
|
148
|
+
const index = items.value.findIndex(entry => entry.id === item.id)
|
|
149
|
+
if (index >= 0) {
|
|
150
|
+
items.value[index] = item
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
items,
|
|
156
|
+
total,
|
|
157
|
+
months,
|
|
158
|
+
filters,
|
|
159
|
+
loading,
|
|
160
|
+
loadingMore,
|
|
161
|
+
hasMore,
|
|
162
|
+
load,
|
|
163
|
+
loadMore,
|
|
164
|
+
applyFilters,
|
|
165
|
+
prepend,
|
|
166
|
+
replace,
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useAsyncData, useRequestFetch } from '#imports'
|
|
2
|
+
|
|
3
|
+
export interface MenuAccess {
|
|
4
|
+
visible: string[]
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Resources the current user may read, for addon menu items.
|
|
9
|
+
* Fetched once per admin shell. A later sign-in loads it again.
|
|
10
|
+
*/
|
|
11
|
+
export function useMenuAccess() {
|
|
12
|
+
const request = useRequestFetch()
|
|
13
|
+
return useAsyncData(
|
|
14
|
+
'katecms-menu',
|
|
15
|
+
() => request<MenuAccess>('/api/_katecms/menu'),
|
|
16
|
+
{
|
|
17
|
+
getCachedData: (key, nuxtApp, ctx) => {
|
|
18
|
+
if (nuxtApp.isHydrating && ctx.cause === 'initial') {
|
|
19
|
+
return nuxtApp.payload.data[key] as MenuAccess | undefined
|
|
20
|
+
}
|
|
21
|
+
return undefined
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{
|
|
3
|
+
title: string
|
|
4
|
+
/** When set, a back button is shown before the title. */
|
|
5
|
+
backTo?: string
|
|
6
|
+
/** Secondary line under the title. */
|
|
7
|
+
meta?: string
|
|
8
|
+
/** Shown after the title, for example a result count. */
|
|
9
|
+
count?: string | number
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const rootClass = 'katecms-admin-header'
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div :class="rootClass">
|
|
17
|
+
<KateCmsUiButton
|
|
18
|
+
v-if="backTo"
|
|
19
|
+
tag="a"
|
|
20
|
+
:variant="['secondary', 'icon']"
|
|
21
|
+
:link="{ url: backTo, title: 'Back' }"
|
|
22
|
+
>
|
|
23
|
+
<svg
|
|
24
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
+
viewBox="0 0 640 640"
|
|
26
|
+
><path
|
|
27
|
+
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"
|
|
28
|
+
fill="currentColor"
|
|
29
|
+
/></svg>
|
|
30
|
+
</KateCmsUiButton>
|
|
31
|
+
|
|
32
|
+
<div :class="`${rootClass}__main`">
|
|
33
|
+
<div :class="`${rootClass}__title`">
|
|
34
|
+
{{ title }}
|
|
35
|
+
<span
|
|
36
|
+
v-if="count != null && count !== ''"
|
|
37
|
+
:class="`${rootClass}__count`"
|
|
38
|
+
>{{ count }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div
|
|
41
|
+
v-if="meta"
|
|
42
|
+
:class="`${rootClass}__meta`"
|
|
43
|
+
>
|
|
44
|
+
{{ meta }}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div
|
|
49
|
+
v-if="$slots.default"
|
|
50
|
+
:class="`${rootClass}__actions`"
|
|
51
|
+
>
|
|
52
|
+
<slot />
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<style scoped lang="scss">
|
|
58
|
+
@use "../../assets/styles" as *;
|
|
59
|
+
|
|
60
|
+
$root: '.katecms-admin-header';
|
|
61
|
+
|
|
62
|
+
@include katecms-wrapper {
|
|
63
|
+
#{$root} {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: math-rem(16);
|
|
68
|
+
min-width: 0;
|
|
69
|
+
padding: math-rem(8) 0;
|
|
70
|
+
background: $color-surface;
|
|
71
|
+
|
|
72
|
+
&__main {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: math-rem(4);
|
|
76
|
+
min-width: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__title {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: baseline;
|
|
82
|
+
gap: math-rem(8);
|
|
83
|
+
font-size: math-rem(18);
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__count {
|
|
88
|
+
color: $color-muted;
|
|
89
|
+
font-size: math-rem(16);
|
|
90
|
+
font-weight: 400;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__meta {
|
|
94
|
+
font-size: math-rem(13);
|
|
95
|
+
color: $color-muted;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&__actions {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: math-rem(8);
|
|
102
|
+
margin-left: auto;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { useRoute, useRuntimeConfig } from '#imports'
|
|
4
|
+
import { useCmsPaths } from '../../composables/useCmsPaths'
|
|
5
|
+
import type { PublicCollectionNav } from '../../utils/collections'
|
|
6
|
+
import type { PublicDictionaryNav } from '../../utils/dictionaries'
|
|
7
|
+
import type { PublicOptionNav } from '../../utils/options'
|
|
8
|
+
import { useKateCmsMenuItems } from '../../composables/useKateCmsExtensions'
|
|
9
|
+
import { useMenuAccess } from '../../composables/useMenuAccess'
|
|
10
|
+
|
|
11
|
+
const rootClass = 'katecms-menu'
|
|
12
|
+
const route = useRoute()
|
|
13
|
+
const paths = useCmsPaths()
|
|
14
|
+
const runtimeConfig = useRuntimeConfig()
|
|
15
|
+
const extraMenu = useKateCmsMenuItems()
|
|
16
|
+
const menuAccess = useMenuAccess()
|
|
17
|
+
const visibleAccess = computed(() => new Set(menuAccess.data.value?.visible ?? []))
|
|
18
|
+
|
|
19
|
+
type MenuItem = {
|
|
20
|
+
key: string
|
|
21
|
+
label: string
|
|
22
|
+
to: string
|
|
23
|
+
icon: string
|
|
24
|
+
active: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type MenuGroup = {
|
|
28
|
+
key: string
|
|
29
|
+
label?: string
|
|
30
|
+
items: MenuItem[]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
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>'
|
|
34
|
+
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>'
|
|
35
|
+
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>'
|
|
36
|
+
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>'
|
|
37
|
+
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>'
|
|
38
|
+
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>'
|
|
39
|
+
|
|
40
|
+
function isSvgIcon(value?: string): boolean {
|
|
41
|
+
return typeof value === 'string' && /^\s*<svg[\s>]/i.test(value)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Dashboard is exact (`/admin`); everything else matches nested routes too. */
|
|
45
|
+
function isActive(to: string, exact = false) {
|
|
46
|
+
const path = route.path.replace(/\/$/, '') || '/'
|
|
47
|
+
const target = to.replace(/\/$/, '') || '/'
|
|
48
|
+
if (path === target) {
|
|
49
|
+
return true
|
|
50
|
+
}
|
|
51
|
+
return !exact && path.startsWith(`${target}/`)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const groups = computed<MenuGroup[]>(() => {
|
|
55
|
+
const collections = (runtimeConfig.public.katecms?.collections ?? {}) as Record<string, PublicCollectionNav>
|
|
56
|
+
const collectionItems = Object.entries(collections).map(([slug, def]) => {
|
|
57
|
+
const to = paths.collection(slug)
|
|
58
|
+
return {
|
|
59
|
+
key: `collection:${slug}`,
|
|
60
|
+
label: def.labels?.name || slug,
|
|
61
|
+
to,
|
|
62
|
+
icon: isSvgIcon(def.icon) ? def.icon! : COLLECTION_ICON,
|
|
63
|
+
active: isActive(to),
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const dictionaries = (runtimeConfig.public.katecms?.dictionaries ?? {}) as Record<string, PublicDictionaryNav>
|
|
68
|
+
const dictionaryItems = Object.entries(dictionaries).map(([slug, def]) => {
|
|
69
|
+
const to = paths.dictionary(slug)
|
|
70
|
+
return {
|
|
71
|
+
key: `dictionary:${slug}`,
|
|
72
|
+
label: def.labels?.name || slug,
|
|
73
|
+
to,
|
|
74
|
+
icon: isSvgIcon(def.icon) ? def.icon! : DICTIONARY_ICON,
|
|
75
|
+
active: isActive(to),
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const optionPages = (runtimeConfig.public.katecms?.options ?? {}) as Record<string, PublicOptionNav>
|
|
80
|
+
const optionItems = Object.entries(optionPages).map(([slug, def]) => {
|
|
81
|
+
const to = paths.option(slug)
|
|
82
|
+
return {
|
|
83
|
+
key: `option:${slug}`,
|
|
84
|
+
label: def.label || slug,
|
|
85
|
+
to,
|
|
86
|
+
icon: isSvgIcon(def.icon) ? def.icon! : OPTIONS_ICON,
|
|
87
|
+
active: isActive(to),
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
const result: MenuGroup[] = [
|
|
92
|
+
{
|
|
93
|
+
key: 'overview',
|
|
94
|
+
items: [
|
|
95
|
+
{
|
|
96
|
+
key: 'dashboard',
|
|
97
|
+
label: 'Dashboard',
|
|
98
|
+
to: paths.admin,
|
|
99
|
+
icon: DASHBOARD_ICON,
|
|
100
|
+
active: isActive(paths.admin, true),
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
if (collectionItems.length) {
|
|
107
|
+
result.push({
|
|
108
|
+
key: 'collections',
|
|
109
|
+
label: 'Collections',
|
|
110
|
+
items: collectionItems,
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (dictionaryItems.length) {
|
|
115
|
+
result.push({
|
|
116
|
+
key: 'dictionaries',
|
|
117
|
+
label: 'Dictionaries',
|
|
118
|
+
items: dictionaryItems,
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (optionItems.length) {
|
|
123
|
+
result.push({
|
|
124
|
+
key: 'options',
|
|
125
|
+
label: 'Options',
|
|
126
|
+
items: optionItems,
|
|
127
|
+
})
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
result.push({
|
|
131
|
+
key: 'manage',
|
|
132
|
+
label: 'Manage',
|
|
133
|
+
items: [
|
|
134
|
+
{
|
|
135
|
+
key: 'media',
|
|
136
|
+
label: 'Media',
|
|
137
|
+
to: paths.media,
|
|
138
|
+
icon: MEDIA_ICON,
|
|
139
|
+
active: isActive(paths.media),
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
key: 'users',
|
|
143
|
+
label: 'Users',
|
|
144
|
+
to: paths.users,
|
|
145
|
+
icon: USERS_ICON,
|
|
146
|
+
active: isActive(paths.users),
|
|
147
|
+
},
|
|
148
|
+
...extraMenu.value.flatMap((item) => {
|
|
149
|
+
if (item.access && !visibleAccess.value.has(item.access)) {
|
|
150
|
+
return []
|
|
151
|
+
}
|
|
152
|
+
return [{
|
|
153
|
+
key: item.key,
|
|
154
|
+
label: item.label,
|
|
155
|
+
to: item.to,
|
|
156
|
+
icon: item.icon || OPTIONS_ICON,
|
|
157
|
+
active: isActive(item.to),
|
|
158
|
+
}]
|
|
159
|
+
}),
|
|
160
|
+
],
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
return result
|
|
164
|
+
})
|
|
165
|
+
</script>
|
|
166
|
+
|
|
167
|
+
<template>
|
|
168
|
+
<div :class="rootClass">
|
|
169
|
+
<!-- <NuxtLink
|
|
170
|
+
:class="`${rootClass}__logo`"
|
|
171
|
+
:to="paths.admin"
|
|
172
|
+
>
|
|
173
|
+
<img
|
|
174
|
+
src="../../assets/img/katecms-logo.svg"
|
|
175
|
+
alt="KateCMS"
|
|
176
|
+
>
|
|
177
|
+
</NuxtLink> -->
|
|
178
|
+
|
|
179
|
+
<div :class="`${rootClass}__wrap`">
|
|
180
|
+
<div
|
|
181
|
+
v-for="group in groups"
|
|
182
|
+
:key="group.key"
|
|
183
|
+
:class="`${rootClass}__group`"
|
|
184
|
+
>
|
|
185
|
+
<div
|
|
186
|
+
v-if="group.label"
|
|
187
|
+
:class="`${rootClass}__heading`"
|
|
188
|
+
>
|
|
189
|
+
{{ group.label }}
|
|
190
|
+
</div>
|
|
191
|
+
<NuxtLink
|
|
192
|
+
v-for="item in group.items"
|
|
193
|
+
:key="item.key"
|
|
194
|
+
:to="item.to"
|
|
195
|
+
:class="[`${rootClass}__link`, { 'is-active': item.active }]"
|
|
196
|
+
>
|
|
197
|
+
<span
|
|
198
|
+
:class="`${rootClass}__icon`"
|
|
199
|
+
aria-hidden="true"
|
|
200
|
+
v-html="item.icon"
|
|
201
|
+
/>
|
|
202
|
+
<span :class="`${rootClass}__label`">{{ item.label }}</span>
|
|
203
|
+
</NuxtLink>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</template>
|
|
208
|
+
|
|
209
|
+
<style scoped lang="scss">
|
|
210
|
+
@use "../../assets/styles" as *;
|
|
211
|
+
|
|
212
|
+
$root: '.katecms-menu';
|
|
213
|
+
|
|
214
|
+
@include katecms-wrapper {
|
|
215
|
+
#{$root} {
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
background: $color-bg;
|
|
219
|
+
|
|
220
|
+
&__wrap {
|
|
221
|
+
flex-grow: 1;
|
|
222
|
+
overflow: auto;
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
padding: math-rem(8);
|
|
226
|
+
gap: math-rem(12);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&__group {
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: math-rem(2);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&__heading {
|
|
236
|
+
padding: math-rem(4) math-rem(10);
|
|
237
|
+
font-size: math-rem(11);
|
|
238
|
+
font-weight: 600;
|
|
239
|
+
letter-spacing: 0.04em;
|
|
240
|
+
text-transform: uppercase;
|
|
241
|
+
color: $color-muted;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
&__link {
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
gap: math-rem(8);
|
|
248
|
+
padding: math-rem(8) math-rem(10);
|
|
249
|
+
border-radius: $border-radius-inter;
|
|
250
|
+
color: $color-ink;
|
|
251
|
+
text-decoration: none;
|
|
252
|
+
font-size: math-rem(14);
|
|
253
|
+
|
|
254
|
+
&:hover {
|
|
255
|
+
background: $color-accent-wash;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&.is-active {
|
|
259
|
+
background: $color-accent-wash;
|
|
260
|
+
color: $color-accent;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&__icon {
|
|
266
|
+
display: flex;
|
|
267
|
+
align-items: center;
|
|
268
|
+
justify-content: center;
|
|
269
|
+
flex-shrink: 0;
|
|
270
|
+
width: math-rem(18);
|
|
271
|
+
height: math-rem(18);
|
|
272
|
+
color: inherit;
|
|
273
|
+
|
|
274
|
+
:deep(svg) {
|
|
275
|
+
display: block;
|
|
276
|
+
width: 100%;
|
|
277
|
+
height: 100%;
|
|
278
|
+
max-width: none;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&__label {
|
|
283
|
+
min-width: 0;
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
text-overflow: ellipsis;
|
|
286
|
+
white-space: nowrap;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
</style>
|