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,164 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onBeforeUnmount, watch } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(defineProps<{
|
|
5
|
+
open?: boolean
|
|
6
|
+
title?: string
|
|
7
|
+
message?: string
|
|
8
|
+
saveLabel?: string
|
|
9
|
+
discardLabel?: string
|
|
10
|
+
cancelLabel?: string
|
|
11
|
+
busy?: boolean
|
|
12
|
+
}>(), {
|
|
13
|
+
open: false,
|
|
14
|
+
title: 'Unsaved changes',
|
|
15
|
+
message: 'Save your changes before leaving?',
|
|
16
|
+
saveLabel: 'Save',
|
|
17
|
+
discardLabel: 'Don\'t save',
|
|
18
|
+
cancelLabel: 'Cancel',
|
|
19
|
+
busy: false,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const emit = defineEmits<{
|
|
23
|
+
save: []
|
|
24
|
+
discard: []
|
|
25
|
+
cancel: []
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const rootClass = 'katecms-confirm-dialog'
|
|
29
|
+
|
|
30
|
+
function onKeydown(event: KeyboardEvent) {
|
|
31
|
+
if (event.key === 'Escape' && props.open && !props.busy) {
|
|
32
|
+
emit('cancel')
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
watch(() => props.open, (open) => {
|
|
37
|
+
if (typeof document === 'undefined') {
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
if (open) {
|
|
41
|
+
document.addEventListener('keydown', onKeydown)
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
document.removeEventListener('keydown', onKeydown)
|
|
45
|
+
}
|
|
46
|
+
}, { immediate: true })
|
|
47
|
+
|
|
48
|
+
onBeforeUnmount(() => {
|
|
49
|
+
if (typeof document !== 'undefined') {
|
|
50
|
+
document.removeEventListener('keydown', onKeydown)
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<Teleport to="body">
|
|
57
|
+
<div
|
|
58
|
+
v-if="open"
|
|
59
|
+
:class="`${rootClass}__overlay`"
|
|
60
|
+
@click.self="!busy && emit('cancel')"
|
|
61
|
+
>
|
|
62
|
+
<div
|
|
63
|
+
:class="rootClass"
|
|
64
|
+
role="dialog"
|
|
65
|
+
aria-modal="true"
|
|
66
|
+
:aria-labelledby="`${rootClass}-title`"
|
|
67
|
+
>
|
|
68
|
+
<div
|
|
69
|
+
:id="`${rootClass}-title`"
|
|
70
|
+
:class="`${rootClass}__title`"
|
|
71
|
+
>
|
|
72
|
+
{{ title }}
|
|
73
|
+
</div>
|
|
74
|
+
<div :class="`${rootClass}__message`">
|
|
75
|
+
{{ message }}
|
|
76
|
+
</div>
|
|
77
|
+
<div :class="`${rootClass}__actions`">
|
|
78
|
+
<KateCmsUiButton
|
|
79
|
+
tag="button"
|
|
80
|
+
:variant="['secondary']"
|
|
81
|
+
:disabled="busy"
|
|
82
|
+
@click="emit('discard')"
|
|
83
|
+
>
|
|
84
|
+
{{ discardLabel }}
|
|
85
|
+
</KateCmsUiButton>
|
|
86
|
+
<div :class="`${rootClass}__actions-end`">
|
|
87
|
+
<KateCmsUiButton
|
|
88
|
+
tag="button"
|
|
89
|
+
:variant="['secondary']"
|
|
90
|
+
:disabled="busy"
|
|
91
|
+
@click="emit('cancel')"
|
|
92
|
+
>
|
|
93
|
+
{{ cancelLabel }}
|
|
94
|
+
</KateCmsUiButton>
|
|
95
|
+
<KateCmsUiButton
|
|
96
|
+
tag="button"
|
|
97
|
+
:disabled="busy"
|
|
98
|
+
@click="emit('save')"
|
|
99
|
+
>
|
|
100
|
+
{{ busy ? 'Saving…' : saveLabel }}
|
|
101
|
+
</KateCmsUiButton>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</Teleport>
|
|
107
|
+
</template>
|
|
108
|
+
|
|
109
|
+
<style scoped lang="scss">
|
|
110
|
+
@use "../../assets/styles" as *;
|
|
111
|
+
|
|
112
|
+
$root: '.katecms-confirm-dialog';
|
|
113
|
+
|
|
114
|
+
#{$root} {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
gap: math-rem(12);
|
|
118
|
+
width: 100%;
|
|
119
|
+
max-width: math-rem(440);
|
|
120
|
+
padding: math-rem(18);
|
|
121
|
+
background-color: $color-surface;
|
|
122
|
+
border-radius: $border-radius;
|
|
123
|
+
box-shadow: $shadow-md;
|
|
124
|
+
|
|
125
|
+
&__overlay {
|
|
126
|
+
position: fixed;
|
|
127
|
+
inset: 0;
|
|
128
|
+
z-index: 1000;
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
padding: math-rem(16);
|
|
133
|
+
background-color: $color-overlay;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&__title {
|
|
137
|
+
font-size: math-rem(16);
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
color: $color-ink;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&__message {
|
|
143
|
+
font-size: math-rem(14);
|
|
144
|
+
line-height: 1.45;
|
|
145
|
+
color: $color-muted;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&__actions {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-wrap: wrap;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: space-between;
|
|
153
|
+
gap: math-rem(8);
|
|
154
|
+
margin-top: math-rem(4);
|
|
155
|
+
|
|
156
|
+
&-end {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-wrap: wrap;
|
|
159
|
+
gap: math-rem(8);
|
|
160
|
+
margin-left: auto;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
</style>
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, nextTick, reactive, ref, watch } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
buildFormValues,
|
|
5
|
+
collectPanelDefaults,
|
|
6
|
+
collectVisibleValueKeys,
|
|
7
|
+
isLayoutOnlyFieldType,
|
|
8
|
+
isVisible,
|
|
9
|
+
validateRequiredFields,
|
|
10
|
+
} from '@katecms/core'
|
|
11
|
+
import type { Field, SelectChoice } from '@katecms/core'
|
|
12
|
+
import { resolveField } from '../../utils/helpers'
|
|
13
|
+
import { provideKateCmsFieldValues } from '../../utils/field-values'
|
|
14
|
+
import { provideKateCmsFieldErrors } from '../../utils/field-errors'
|
|
15
|
+
import { slugify } from '../../utils/slugify'
|
|
16
|
+
import type {
|
|
17
|
+
AdminDictionaryMeta,
|
|
18
|
+
DictionaryTermFormModel,
|
|
19
|
+
ParentOption,
|
|
20
|
+
} from '../../utils/dictionaries'
|
|
21
|
+
|
|
22
|
+
const props = withDefaults(defineProps<{
|
|
23
|
+
dictionary: AdminDictionaryMeta
|
|
24
|
+
modelValue: DictionaryTermFormModel
|
|
25
|
+
entryKey?: string | number
|
|
26
|
+
parents?: ParentOption[]
|
|
27
|
+
saving?: boolean
|
|
28
|
+
error?: string | null
|
|
29
|
+
canUpdate?: boolean
|
|
30
|
+
formId?: string
|
|
31
|
+
submitLabel?: string
|
|
32
|
+
showSubmit?: boolean
|
|
33
|
+
}>(), {
|
|
34
|
+
parents: () => [],
|
|
35
|
+
saving: false,
|
|
36
|
+
error: null,
|
|
37
|
+
canUpdate: true,
|
|
38
|
+
formId: 'cms-dictionary-term-form',
|
|
39
|
+
submitLabel: 'Add',
|
|
40
|
+
showSubmit: true,
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
const emit = defineEmits<{
|
|
44
|
+
'update:modelValue': [value: DictionaryTermFormModel]
|
|
45
|
+
'submit': []
|
|
46
|
+
}>()
|
|
47
|
+
|
|
48
|
+
const rootClass = 'katecms-dictionary-form'
|
|
49
|
+
|
|
50
|
+
const fieldDefs = computed(() => props.dictionary.fields ?? {})
|
|
51
|
+
const values = reactive<Record<string, unknown>>({})
|
|
52
|
+
provideKateCmsFieldValues(values)
|
|
53
|
+
|
|
54
|
+
const fieldErrors = ref<Record<string, string>>({})
|
|
55
|
+
const attemptedSubmit = ref(false)
|
|
56
|
+
provideKateCmsFieldErrors(fieldErrors)
|
|
57
|
+
|
|
58
|
+
const readOnly = computed(() => !props.canUpdate)
|
|
59
|
+
|
|
60
|
+
const titleField = { type: 'text' as const, label: 'Title', required: true }
|
|
61
|
+
const slugField = { type: 'text' as const, label: 'Slug', required: true }
|
|
62
|
+
|
|
63
|
+
const parentChoices = computed<SelectChoice[]>(() =>
|
|
64
|
+
(props.parents ?? []).map((parent) => {
|
|
65
|
+
const depth = parent.depth ?? 0
|
|
66
|
+
const title = depth < 1 ? parent.title : `${'— '.repeat(depth)}${parent.title}`
|
|
67
|
+
return {
|
|
68
|
+
val: parent.id,
|
|
69
|
+
lbl: title,
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
const parentField = computed(() => ({
|
|
75
|
+
type: 'select' as const,
|
|
76
|
+
label: 'Parent',
|
|
77
|
+
allowNull: true,
|
|
78
|
+
placeholder: '— None —',
|
|
79
|
+
choices: parentChoices.value,
|
|
80
|
+
}))
|
|
81
|
+
|
|
82
|
+
let syncingFromParent = false
|
|
83
|
+
|
|
84
|
+
function replaceValues(next: Record<string, unknown>) {
|
|
85
|
+
syncingFromParent = true
|
|
86
|
+
for (const key of Object.keys(values)) {
|
|
87
|
+
Reflect.deleteProperty(values, key)
|
|
88
|
+
}
|
|
89
|
+
Object.assign(values, next)
|
|
90
|
+
queueMicrotask(() => {
|
|
91
|
+
syncingFromParent = false
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
watch(
|
|
96
|
+
() => `${props.dictionary.slug}:${props.entryKey ?? 'default'}`,
|
|
97
|
+
() => {
|
|
98
|
+
replaceValues({
|
|
99
|
+
...buildFormValues(fieldDefs.value),
|
|
100
|
+
...(props.modelValue.fields ?? {}),
|
|
101
|
+
})
|
|
102
|
+
attemptedSubmit.value = false
|
|
103
|
+
fieldErrors.value = {}
|
|
104
|
+
},
|
|
105
|
+
{ immediate: true },
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
watch(
|
|
109
|
+
values,
|
|
110
|
+
() => {
|
|
111
|
+
if (syncingFromParent) {
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
emit('update:modelValue', {
|
|
115
|
+
...props.modelValue,
|
|
116
|
+
fields: { ...values },
|
|
117
|
+
})
|
|
118
|
+
},
|
|
119
|
+
{ deep: true },
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
const visibleFields = computed(() =>
|
|
123
|
+
Object.entries(fieldDefs.value).filter(([, field]) =>
|
|
124
|
+
isVisible(field.conditionalLogic, values),
|
|
125
|
+
),
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
const hiddenCache: Record<string, unknown> = {}
|
|
129
|
+
|
|
130
|
+
function restoreFieldValue(key: string, field: Field) {
|
|
131
|
+
if (isLayoutOnlyFieldType(field.type)) {
|
|
132
|
+
if (field.type === 'tab' || field.type === 'accordion') {
|
|
133
|
+
for (const [panelKey, panelDefault] of Object.entries(collectPanelDefaults(field))) {
|
|
134
|
+
if (!(panelKey in values)) {
|
|
135
|
+
values[panelKey] = panelKey in hiddenCache
|
|
136
|
+
? hiddenCache[panelKey]
|
|
137
|
+
: panelDefault
|
|
138
|
+
Reflect.deleteProperty(hiddenCache, panelKey)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
Reflect.deleteProperty(values, key)
|
|
143
|
+
return
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (!(key in values)) {
|
|
147
|
+
values[key] = key in hiddenCache
|
|
148
|
+
? hiddenCache[key]
|
|
149
|
+
: 'defaultValue' in field
|
|
150
|
+
? field.defaultValue
|
|
151
|
+
: field.type === 'group'
|
|
152
|
+
? undefined
|
|
153
|
+
: field.type === 'repeater' || field.type === 'flexible_content' || field.type === 'gallery'
|
|
154
|
+
? []
|
|
155
|
+
: field.type === 'open_street_map' && field.multiple
|
|
156
|
+
? []
|
|
157
|
+
: undefined
|
|
158
|
+
Reflect.deleteProperty(hiddenCache, key)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
watch(visibleFields, (visible) => {
|
|
163
|
+
const visibleKeys = collectVisibleValueKeys(visible)
|
|
164
|
+
|
|
165
|
+
for (const key of Object.keys(values)) {
|
|
166
|
+
if (!visibleKeys.has(key)) {
|
|
167
|
+
hiddenCache[key] = values[key]
|
|
168
|
+
Reflect.deleteProperty(values, key)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
for (const [key, field] of visible) {
|
|
173
|
+
restoreFieldValue(key, field)
|
|
174
|
+
}
|
|
175
|
+
}, { immediate: true })
|
|
176
|
+
|
|
177
|
+
function updateCore<K extends keyof DictionaryTermFormModel>(
|
|
178
|
+
key: K,
|
|
179
|
+
value: DictionaryTermFormModel[K],
|
|
180
|
+
) {
|
|
181
|
+
emit('update:modelValue', {
|
|
182
|
+
...props.modelValue,
|
|
183
|
+
[key]: value,
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const parentModel = computed({
|
|
188
|
+
get() {
|
|
189
|
+
return props.modelValue.parentId
|
|
190
|
+
},
|
|
191
|
+
set(value: unknown) {
|
|
192
|
+
if (value === '' || value === null || value === undefined) {
|
|
193
|
+
updateCore('parentId', null)
|
|
194
|
+
return
|
|
195
|
+
}
|
|
196
|
+
const id = Number(value)
|
|
197
|
+
updateCore('parentId', Number.isInteger(id) && id > 0 ? id : null)
|
|
198
|
+
},
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
const canSubmit = computed(() => !readOnly.value && !props.saving)
|
|
202
|
+
|
|
203
|
+
function collectFieldErrors(slug = props.modelValue.slug): Record<string, string> {
|
|
204
|
+
const next: Record<string, string> = {}
|
|
205
|
+
if (!props.modelValue.title.trim()) {
|
|
206
|
+
next['cms-dictionary-title'] = 'Title is required.'
|
|
207
|
+
}
|
|
208
|
+
if (!slug.trim()) {
|
|
209
|
+
next['cms-dictionary-slug'] = 'Slug is required.'
|
|
210
|
+
}
|
|
211
|
+
for (const issue of validateRequiredFields(fieldDefs.value, values)) {
|
|
212
|
+
next[issue.key] = issue.message
|
|
213
|
+
}
|
|
214
|
+
return next
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function scrollToFirstError(errors: Record<string, string>) {
|
|
218
|
+
const key = Object.keys(errors)[0]
|
|
219
|
+
if (!key || typeof document === 'undefined') {
|
|
220
|
+
return
|
|
221
|
+
}
|
|
222
|
+
const target = document.querySelector(`[data-field-key="${CSS.escape(key)}"]`)
|
|
223
|
+
if (target instanceof HTMLElement) {
|
|
224
|
+
target.scrollIntoView({ block: 'center', behavior: 'smooth' })
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function validateForSubmit(): boolean {
|
|
229
|
+
if (!canSubmit.value) {
|
|
230
|
+
return false
|
|
231
|
+
}
|
|
232
|
+
let slug = props.modelValue.slug.trim()
|
|
233
|
+
if (!slug && props.modelValue.title.trim()) {
|
|
234
|
+
slug = slugify(props.modelValue.title) || 'term'
|
|
235
|
+
updateCore('slug', slug)
|
|
236
|
+
}
|
|
237
|
+
attemptedSubmit.value = true
|
|
238
|
+
const errors = collectFieldErrors(slug)
|
|
239
|
+
fieldErrors.value = errors
|
|
240
|
+
if (Object.keys(errors).length > 0) {
|
|
241
|
+
nextTick(() => scrollToFirstError(errors))
|
|
242
|
+
return false
|
|
243
|
+
}
|
|
244
|
+
return true
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function onSubmit() {
|
|
248
|
+
if (!validateForSubmit()) {
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
emit('submit')
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function ensureSlug() {
|
|
255
|
+
if (!props.modelValue.slug.trim() && props.modelValue.title.trim()) {
|
|
256
|
+
updateCore('slug', slugify(props.modelValue.title) || 'term')
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
defineExpose({ validateForSubmit })
|
|
261
|
+
|
|
262
|
+
watch(
|
|
263
|
+
[values, () => props.modelValue.title, () => props.modelValue.slug],
|
|
264
|
+
() => {
|
|
265
|
+
if (!attemptedSubmit.value) {
|
|
266
|
+
return
|
|
267
|
+
}
|
|
268
|
+
fieldErrors.value = collectFieldErrors()
|
|
269
|
+
},
|
|
270
|
+
{ deep: true },
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
const requiredNotice = computed(() => {
|
|
274
|
+
const messages = Object.values(fieldErrors.value)
|
|
275
|
+
if (messages.length === 0) {
|
|
276
|
+
return ''
|
|
277
|
+
}
|
|
278
|
+
if (messages.length === 1) {
|
|
279
|
+
return messages[0]
|
|
280
|
+
}
|
|
281
|
+
return 'Please fill in the required fields.'
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
const buttonLabel = computed(() => props.submitLabel)
|
|
285
|
+
</script>
|
|
286
|
+
|
|
287
|
+
<template>
|
|
288
|
+
<form
|
|
289
|
+
:id="formId"
|
|
290
|
+
:class="rootClass"
|
|
291
|
+
novalidate
|
|
292
|
+
@submit.prevent="onSubmit"
|
|
293
|
+
@focusout="ensureSlug"
|
|
294
|
+
>
|
|
295
|
+
<KateCmsUiNotice
|
|
296
|
+
v-if="requiredNotice"
|
|
297
|
+
placement="static"
|
|
298
|
+
variant="danger"
|
|
299
|
+
:message="requiredNotice"
|
|
300
|
+
:closable="false"
|
|
301
|
+
/>
|
|
302
|
+
<KateCmsUiNotice
|
|
303
|
+
v-if="error"
|
|
304
|
+
placement="static"
|
|
305
|
+
variant="danger"
|
|
306
|
+
:message="error"
|
|
307
|
+
/>
|
|
308
|
+
|
|
309
|
+
<KateCmsFieldWrapper
|
|
310
|
+
field-key="cms-dictionary-title"
|
|
311
|
+
:field="titleField"
|
|
312
|
+
>
|
|
313
|
+
<KateCmsInputControl
|
|
314
|
+
:model-value="modelValue.title"
|
|
315
|
+
field-key="cms-dictionary-title"
|
|
316
|
+
:field="titleField"
|
|
317
|
+
:disabled="readOnly"
|
|
318
|
+
@update:model-value="updateCore('title', String($event ?? ''))"
|
|
319
|
+
/>
|
|
320
|
+
</KateCmsFieldWrapper>
|
|
321
|
+
|
|
322
|
+
<KateCmsFieldWrapper
|
|
323
|
+
field-key="cms-dictionary-slug"
|
|
324
|
+
:field="slugField"
|
|
325
|
+
>
|
|
326
|
+
<KateCmsInputControl
|
|
327
|
+
:model-value="modelValue.slug"
|
|
328
|
+
field-key="cms-dictionary-slug"
|
|
329
|
+
:field="slugField"
|
|
330
|
+
:disabled="readOnly"
|
|
331
|
+
@update:model-value="updateCore('slug', String($event ?? ''))"
|
|
332
|
+
/>
|
|
333
|
+
</KateCmsFieldWrapper>
|
|
334
|
+
|
|
335
|
+
<KateCmsSelectField
|
|
336
|
+
v-if="dictionary.hierarchical"
|
|
337
|
+
v-model="parentModel"
|
|
338
|
+
field-key="cms-dictionary-parent"
|
|
339
|
+
:field="parentField"
|
|
340
|
+
/>
|
|
341
|
+
|
|
342
|
+
<div
|
|
343
|
+
v-if="visibleFields.length"
|
|
344
|
+
:class="`${rootClass}__fields`"
|
|
345
|
+
>
|
|
346
|
+
<div
|
|
347
|
+
v-for="[key, field] in visibleFields"
|
|
348
|
+
:key="key"
|
|
349
|
+
:class="`${rootClass}__field`"
|
|
350
|
+
:style="field.columnWidth ? { width: `${field.columnWidth}%` } : undefined"
|
|
351
|
+
>
|
|
352
|
+
<component
|
|
353
|
+
:is="resolveField(field.type)"
|
|
354
|
+
v-model="values[key]"
|
|
355
|
+
:field-key="key"
|
|
356
|
+
:field="field"
|
|
357
|
+
/>
|
|
358
|
+
</div>
|
|
359
|
+
</div>
|
|
360
|
+
|
|
361
|
+
<KateCmsUiButton
|
|
362
|
+
v-if="showSubmit && canUpdate"
|
|
363
|
+
tag="button"
|
|
364
|
+
type="submit"
|
|
365
|
+
:disabled="!canSubmit"
|
|
366
|
+
>
|
|
367
|
+
{{ buttonLabel }}
|
|
368
|
+
</KateCmsUiButton>
|
|
369
|
+
</form>
|
|
370
|
+
</template>
|
|
371
|
+
|
|
372
|
+
<style scoped lang="scss">
|
|
373
|
+
@use "../../assets/styles" as *;
|
|
374
|
+
|
|
375
|
+
$root: '.katecms-dictionary-form';
|
|
376
|
+
|
|
377
|
+
@include katecms-wrapper {
|
|
378
|
+
#{$root} {
|
|
379
|
+
display: flex;
|
|
380
|
+
flex-direction: column;
|
|
381
|
+
gap: math-rem(14);
|
|
382
|
+
min-width: 0;
|
|
383
|
+
|
|
384
|
+
&__fields {
|
|
385
|
+
display: flex;
|
|
386
|
+
flex-wrap: wrap;
|
|
387
|
+
row-gap: math-rem(16);
|
|
388
|
+
margin-left: math-rem(-8);
|
|
389
|
+
margin-right: math-rem(-8);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
&__field {
|
|
393
|
+
padding-left: math-rem(8);
|
|
394
|
+
padding-right: math-rem(8);
|
|
395
|
+
width: 100%;
|
|
396
|
+
box-sizing: border-box;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
</style>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { collectionStatusLabel } from '../../utils/collections'
|
|
3
|
+
import type { EntryRevisionItem } from '../../utils/collections'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
items: EntryRevisionItem[]
|
|
7
|
+
loading?: boolean
|
|
8
|
+
error?: string
|
|
9
|
+
canRestore?: boolean
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const emit = defineEmits<{
|
|
14
|
+
restore: [id: number]
|
|
15
|
+
}>()
|
|
16
|
+
|
|
17
|
+
const rootClass = 'katecms-entry-revisions'
|
|
18
|
+
|
|
19
|
+
function when(value: string): string {
|
|
20
|
+
const date = new Date(value)
|
|
21
|
+
if (Number.isNaN(date.getTime())) {
|
|
22
|
+
return value
|
|
23
|
+
}
|
|
24
|
+
return date.toLocaleString('en-GB', {
|
|
25
|
+
day: 'numeric',
|
|
26
|
+
month: 'short',
|
|
27
|
+
year: 'numeric',
|
|
28
|
+
hour: '2-digit',
|
|
29
|
+
minute: '2-digit',
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<div :class="rootClass">
|
|
36
|
+
<div :class="`${rootClass}__title`">
|
|
37
|
+
Revisions
|
|
38
|
+
</div>
|
|
39
|
+
<p :class="`${rootClass}__hint`">
|
|
40
|
+
A revision is saved each time this entry changes.
|
|
41
|
+
</p>
|
|
42
|
+
<p
|
|
43
|
+
v-if="loading"
|
|
44
|
+
:class="`${rootClass}__hint`"
|
|
45
|
+
>
|
|
46
|
+
Loading…
|
|
47
|
+
</p>
|
|
48
|
+
<p
|
|
49
|
+
v-else-if="error"
|
|
50
|
+
:class="`${rootClass}__hint`"
|
|
51
|
+
>
|
|
52
|
+
{{ error }}
|
|
53
|
+
</p>
|
|
54
|
+
<p
|
|
55
|
+
v-else-if="!items.length"
|
|
56
|
+
:class="`${rootClass}__hint`"
|
|
57
|
+
>
|
|
58
|
+
No revisions yet.
|
|
59
|
+
</p>
|
|
60
|
+
<ul
|
|
61
|
+
v-else
|
|
62
|
+
:class="`${rootClass}__list`"
|
|
63
|
+
>
|
|
64
|
+
<li
|
|
65
|
+
v-for="item in items"
|
|
66
|
+
:key="item.id"
|
|
67
|
+
:class="`${rootClass}__item`"
|
|
68
|
+
>
|
|
69
|
+
<div :class="`${rootClass}__when`">
|
|
70
|
+
{{ when(item.createdAt) }}
|
|
71
|
+
</div>
|
|
72
|
+
<div :class="`${rootClass}__meta`">
|
|
73
|
+
{{ item.authorName }}
|
|
74
|
+
</div>
|
|
75
|
+
<div :class="`${rootClass}__summary`">
|
|
76
|
+
{{ item.title }} · {{ collectionStatusLabel(item.status) }}
|
|
77
|
+
</div>
|
|
78
|
+
<KateCmsUiButton
|
|
79
|
+
v-if="canRestore"
|
|
80
|
+
tag="button"
|
|
81
|
+
type="button"
|
|
82
|
+
:variant="['secondary', 'small']"
|
|
83
|
+
:disabled="disabled"
|
|
84
|
+
:aria-label="`Restore revision from ${when(item.createdAt)}`"
|
|
85
|
+
@click="emit('restore', item.id)"
|
|
86
|
+
>
|
|
87
|
+
Restore
|
|
88
|
+
</KateCmsUiButton>
|
|
89
|
+
</li>
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<style scoped lang="scss">
|
|
95
|
+
@use "../../assets/styles" as *;
|
|
96
|
+
|
|
97
|
+
$root: '.katecms-entry-revisions';
|
|
98
|
+
|
|
99
|
+
@include katecms-wrapper {
|
|
100
|
+
#{$root} {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: math-rem(8);
|
|
104
|
+
|
|
105
|
+
&__title {
|
|
106
|
+
margin: 0;
|
|
107
|
+
font-size: math-rem(14);
|
|
108
|
+
font-weight: 600;
|
|
109
|
+
letter-spacing: 0.04em;
|
|
110
|
+
text-transform: uppercase;
|
|
111
|
+
color: $color-ink;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&__hint,
|
|
115
|
+
&__meta,
|
|
116
|
+
&__summary {
|
|
117
|
+
margin: 0;
|
|
118
|
+
color: $color-muted;
|
|
119
|
+
font-size: math-rem(13);
|
|
120
|
+
line-height: 1.4;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__list {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: math-rem(12);
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
list-style: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&__item {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
align-items: flex-start;
|
|
136
|
+
gap: math-rem(2);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__when {
|
|
140
|
+
font-size: math-rem(13);
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</style>
|