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,186 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from 'vue'
|
|
3
|
+
import { pageLinkUrl } from '@katecms/core'
|
|
4
|
+
import type { Field, SelectChoice, SelectModelValue } from '@katecms/core'
|
|
5
|
+
import { relationEntriesApi } from '../../utils/relation'
|
|
6
|
+
import type { RelationArchiveOption, RelationEntriesResponse, RelationPickerEntry } from '../../utils/relation'
|
|
7
|
+
|
|
8
|
+
type PageLinkFieldConfig = Extract<Field, { type: 'page_link' }>
|
|
9
|
+
|
|
10
|
+
type LinkOption = {
|
|
11
|
+
url: string
|
|
12
|
+
title: string
|
|
13
|
+
type: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<{
|
|
17
|
+
fieldKey: string
|
|
18
|
+
field?: PageLinkFieldConfig
|
|
19
|
+
}>(), {
|
|
20
|
+
field: () => ({ type: 'page_link', label: '' }),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const model = defineModel<unknown>()
|
|
24
|
+
|
|
25
|
+
const rootClass = 'katecms-page-link-field'
|
|
26
|
+
const options = ref<LinkOption[]>([])
|
|
27
|
+
const loading = ref(false)
|
|
28
|
+
const loadError = ref<string | null>(null)
|
|
29
|
+
|
|
30
|
+
function optionLabel(option: LinkOption): string {
|
|
31
|
+
return option.title || option.url
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const selectChoices = computed<SelectChoice[]>(() => options.value.map(option => ({
|
|
35
|
+
val: option.url,
|
|
36
|
+
lbl: optionLabel(option),
|
|
37
|
+
})))
|
|
38
|
+
|
|
39
|
+
function findOption(url: string): LinkOption | undefined {
|
|
40
|
+
if (!url) {
|
|
41
|
+
return undefined
|
|
42
|
+
}
|
|
43
|
+
return options.value.find(option => option.url === url)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function emptyValue(): unknown {
|
|
47
|
+
if (props.field?.multiple) {
|
|
48
|
+
return []
|
|
49
|
+
}
|
|
50
|
+
return props.field?.allowNull ? null : ''
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const selected = computed<SelectModelValue>({
|
|
54
|
+
get() {
|
|
55
|
+
if (props.field?.multiple) {
|
|
56
|
+
const items = Array.isArray(model.value) ? model.value : []
|
|
57
|
+
return items.map(pageLinkUrl).filter(Boolean)
|
|
58
|
+
}
|
|
59
|
+
return pageLinkUrl(model.value)
|
|
60
|
+
},
|
|
61
|
+
set(raw) {
|
|
62
|
+
if (props.field?.multiple) {
|
|
63
|
+
const urls = Array.isArray(raw) ? raw.map(item => String(item)) : []
|
|
64
|
+
model.value = urls.filter(url => !!findOption(url))
|
|
65
|
+
return
|
|
66
|
+
}
|
|
67
|
+
if (raw === '' || raw == null) {
|
|
68
|
+
model.value = emptyValue()
|
|
69
|
+
return
|
|
70
|
+
}
|
|
71
|
+
const option = findOption(String(raw))
|
|
72
|
+
model.value = option ? option.url : emptyValue()
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
const placeholder = computed(() => {
|
|
77
|
+
if (props.field?.multiple) {
|
|
78
|
+
return 'Select links'
|
|
79
|
+
}
|
|
80
|
+
if (props.field?.allowNull || !props.field?.required) {
|
|
81
|
+
return 'Select link'
|
|
82
|
+
}
|
|
83
|
+
return ''
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
function mergeOptions(fetched: RelationPickerEntry[], archives: RelationArchiveOption[] = []) {
|
|
87
|
+
const next: LinkOption[] = [
|
|
88
|
+
...archives,
|
|
89
|
+
...fetched.map(entry => ({
|
|
90
|
+
url: entry.url,
|
|
91
|
+
title: entry.title || entry.slug,
|
|
92
|
+
type: entry.type,
|
|
93
|
+
})),
|
|
94
|
+
]
|
|
95
|
+
const byUrl = new Map(next.map(option => [option.url, option]))
|
|
96
|
+
for (const url of (Array.isArray(model.value) ? model.value : [model.value]).map(pageLinkUrl)) {
|
|
97
|
+
if (url && !byUrl.has(url)) {
|
|
98
|
+
byUrl.set(url, { url, title: url, type: '' })
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
options.value = [...byUrl.values()]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function syncModel() {
|
|
105
|
+
if (props.field?.multiple) {
|
|
106
|
+
const urls = Array.isArray(model.value) ? model.value.map(pageLinkUrl).filter(Boolean) : []
|
|
107
|
+
const next = urls.filter(url => !!findOption(url))
|
|
108
|
+
if (next.length !== urls.length) {
|
|
109
|
+
model.value = next
|
|
110
|
+
}
|
|
111
|
+
return
|
|
112
|
+
}
|
|
113
|
+
const url = pageLinkUrl(model.value)
|
|
114
|
+
if (!url && props.field?.allowNull && (model.value === undefined || model.value === '')) {
|
|
115
|
+
model.value = null
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async function loadEntries() {
|
|
120
|
+
loading.value = true
|
|
121
|
+
loadError.value = null
|
|
122
|
+
try {
|
|
123
|
+
const res = await $fetch<RelationEntriesResponse>(relationEntriesApi({
|
|
124
|
+
postType: props.field?.postType,
|
|
125
|
+
dictionary: props.field?.dictionary,
|
|
126
|
+
archives: !!props.field?.allowArchives,
|
|
127
|
+
}))
|
|
128
|
+
mergeOptions(res.entries, res.archives)
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
loadError.value = 'Could not load links.'
|
|
132
|
+
}
|
|
133
|
+
finally {
|
|
134
|
+
loading.value = false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
onMounted(async () => {
|
|
139
|
+
await loadEntries()
|
|
140
|
+
syncModel()
|
|
141
|
+
})
|
|
142
|
+
</script>
|
|
143
|
+
|
|
144
|
+
<template>
|
|
145
|
+
<KateCmsFieldWrapper
|
|
146
|
+
:field-key="fieldKey"
|
|
147
|
+
:field="field"
|
|
148
|
+
>
|
|
149
|
+
<div
|
|
150
|
+
v-if="loadError"
|
|
151
|
+
:class="`${rootClass}__error`"
|
|
152
|
+
>
|
|
153
|
+
{{ loadError }}
|
|
154
|
+
</div>
|
|
155
|
+
<KateCmsUiSelect
|
|
156
|
+
:id="fieldKey"
|
|
157
|
+
v-model="selected"
|
|
158
|
+
:name="fieldKey"
|
|
159
|
+
:choices="selectChoices"
|
|
160
|
+
:placeholder="placeholder"
|
|
161
|
+
:multiple="field?.multiple || false"
|
|
162
|
+
:required="field?.required || false"
|
|
163
|
+
:disabled="loading"
|
|
164
|
+
search
|
|
165
|
+
search-clearable
|
|
166
|
+
search-placeholder="Search links"
|
|
167
|
+
:selected-opt-clearable="!!field?.allowNull"
|
|
168
|
+
no-results-text="No links found"
|
|
169
|
+
:aria-label="field?.label || fieldKey"
|
|
170
|
+
/>
|
|
171
|
+
</KateCmsFieldWrapper>
|
|
172
|
+
</template>
|
|
173
|
+
|
|
174
|
+
<style scoped lang="scss">
|
|
175
|
+
@use "../../assets/styles" as *;
|
|
176
|
+
|
|
177
|
+
$root: '.katecms-page-link-field';
|
|
178
|
+
|
|
179
|
+
#{$root} {
|
|
180
|
+
&__error {
|
|
181
|
+
margin: 0 0 math-rem(8);
|
|
182
|
+
color: $color-danger;
|
|
183
|
+
font-size: math-rem(13);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</style>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import type { Field } from '@katecms/core'
|
|
4
|
+
|
|
5
|
+
type PasswordFieldConfig = Extract<Field, { type: 'password' }>
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<{
|
|
8
|
+
fieldKey: string
|
|
9
|
+
field?: PasswordFieldConfig
|
|
10
|
+
autocomplete?: string
|
|
11
|
+
}>(), {
|
|
12
|
+
field: () => ({ type: 'password', label: '' }),
|
|
13
|
+
autocomplete: 'new-password',
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
defineOptions({ inheritAttrs: false })
|
|
17
|
+
|
|
18
|
+
const model = defineModel<string>()
|
|
19
|
+
|
|
20
|
+
const visible = ref(false)
|
|
21
|
+
|
|
22
|
+
const rootClass = 'katecms-password-field'
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<KateCmsFieldWrapper
|
|
27
|
+
:field-key="fieldKey"
|
|
28
|
+
:field="field"
|
|
29
|
+
>
|
|
30
|
+
<KateCmsInputControl
|
|
31
|
+
v-model="model"
|
|
32
|
+
v-bind="$attrs"
|
|
33
|
+
:type="visible ? 'text' : 'password'"
|
|
34
|
+
:field-key="fieldKey"
|
|
35
|
+
:field="field"
|
|
36
|
+
:autocomplete="autocomplete"
|
|
37
|
+
>
|
|
38
|
+
<template #append>
|
|
39
|
+
<button
|
|
40
|
+
type="button"
|
|
41
|
+
:class="[
|
|
42
|
+
`${rootClass}__toggle`,
|
|
43
|
+
{ [`${rootClass}__toggle--before-addon`]: props.field?.append },
|
|
44
|
+
]"
|
|
45
|
+
:aria-label="visible ? 'Hide password' : 'Show password'"
|
|
46
|
+
:aria-pressed="visible"
|
|
47
|
+
@click="visible = !visible"
|
|
48
|
+
>
|
|
49
|
+
<svg
|
|
50
|
+
v-if="visible"
|
|
51
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
+
viewBox="0 0 24 24"
|
|
53
|
+
fill="none"
|
|
54
|
+
stroke="currentColor"
|
|
55
|
+
stroke-width="2"
|
|
56
|
+
stroke-linecap="round"
|
|
57
|
+
stroke-linejoin="round"
|
|
58
|
+
aria-hidden="true"
|
|
59
|
+
>
|
|
60
|
+
<path d="M3 3l18 18" />
|
|
61
|
+
<path d="M10.6 10.6a2 2 0 1 0 2.8 2.8" />
|
|
62
|
+
<path d="M9.4 5.5A9 9 0 0 1 12 5c6.5 0 10 7 10 7a18 18 0 0 1-2.2 3.1" />
|
|
63
|
+
<path d="M6.6 6.6C3.8 8.5 2 12 2 12s3.5 7 10 7a9.7 9.7 0 0 0 4.4-1" />
|
|
64
|
+
</svg>
|
|
65
|
+
<svg
|
|
66
|
+
v-else
|
|
67
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
68
|
+
viewBox="0 0 24 24"
|
|
69
|
+
fill="none"
|
|
70
|
+
stroke="currentColor"
|
|
71
|
+
stroke-width="2"
|
|
72
|
+
stroke-linecap="round"
|
|
73
|
+
stroke-linejoin="round"
|
|
74
|
+
aria-hidden="true"
|
|
75
|
+
>
|
|
76
|
+
<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z" />
|
|
77
|
+
<circle
|
|
78
|
+
cx="12"
|
|
79
|
+
cy="12"
|
|
80
|
+
r="3"
|
|
81
|
+
/>
|
|
82
|
+
</svg>
|
|
83
|
+
</button>
|
|
84
|
+
</template>
|
|
85
|
+
</KateCmsInputControl>
|
|
86
|
+
</KateCmsFieldWrapper>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<style scoped lang="scss">
|
|
90
|
+
@use "../../assets/styles" as *;
|
|
91
|
+
|
|
92
|
+
$root: '.katecms-password-field';
|
|
93
|
+
|
|
94
|
+
#{$root}__toggle {
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
flex: 0 0 auto;
|
|
99
|
+
width: math-rem(38);
|
|
100
|
+
padding: 0;
|
|
101
|
+
background-color: $color-bg;
|
|
102
|
+
border: 1px solid $color-border;
|
|
103
|
+
border-left: 0;
|
|
104
|
+
border-radius: 0 $border-radius-inter $border-radius-inter 0;
|
|
105
|
+
color: $color-ink;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
|
|
108
|
+
svg {
|
|
109
|
+
display: block;
|
|
110
|
+
width: 18px;
|
|
111
|
+
height: 18px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--before-addon {
|
|
115
|
+
border-radius: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:focus {
|
|
119
|
+
outline: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:focus-visible {
|
|
123
|
+
border-color: $color-accent;
|
|
124
|
+
color: $color-accent;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
</style>
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
encodeRelationEntryValue,
|
|
5
|
+
isRelationEntryValue,
|
|
6
|
+
relationFieldId,
|
|
7
|
+
} from '@katecms/core'
|
|
8
|
+
import type { Field, RelationEntryValue, SelectChoice, SelectModelValue } from '@katecms/core'
|
|
9
|
+
import { relationEntriesApi } from '../../utils/relation'
|
|
10
|
+
import type { RelationEntriesResponse, RelationPickerEntry } from '../../utils/relation'
|
|
11
|
+
|
|
12
|
+
type PostObjectFieldConfig = Extract<Field, { type: 'post_object' }>
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<{
|
|
15
|
+
fieldKey: string
|
|
16
|
+
field?: PostObjectFieldConfig
|
|
17
|
+
}>(), {
|
|
18
|
+
field: () => ({ type: 'post_object', label: '' }),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const model = defineModel<unknown>()
|
|
22
|
+
|
|
23
|
+
const rootClass = 'katecms-post-object-field'
|
|
24
|
+
|
|
25
|
+
function entriesFromModel(value: unknown): RelationEntryValue[] {
|
|
26
|
+
const items = Array.isArray(value) ? value : value != null && value !== '' ? [value] : []
|
|
27
|
+
return items.filter(isRelationEntryValue)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const entries = ref<RelationPickerEntry[]>(entriesFromModel(model.value))
|
|
31
|
+
const loading = ref(false)
|
|
32
|
+
const loadError = ref<string | null>(null)
|
|
33
|
+
|
|
34
|
+
function entryLabel(entry: RelationPickerEntry): string {
|
|
35
|
+
return entry.title || entry.slug
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const selectChoices = computed<SelectChoice[]>(() => entries.value.map(entry => ({
|
|
39
|
+
val: entry.id,
|
|
40
|
+
lbl: entryLabel(entry),
|
|
41
|
+
})))
|
|
42
|
+
|
|
43
|
+
function findEntry(id: string): RelationPickerEntry | undefined {
|
|
44
|
+
if (!id) {
|
|
45
|
+
return undefined
|
|
46
|
+
}
|
|
47
|
+
return entries.value.find(entry => String(entry.id) === id)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function emptyValue(): unknown {
|
|
51
|
+
if (props.field?.multiple) {
|
|
52
|
+
return []
|
|
53
|
+
}
|
|
54
|
+
return props.field?.allowNull ? null : ''
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const selected = computed<SelectModelValue>({
|
|
58
|
+
get() {
|
|
59
|
+
if (props.field?.multiple) {
|
|
60
|
+
return Array.isArray(model.value) ? model.value.map(relationFieldId).filter(Boolean) : []
|
|
61
|
+
}
|
|
62
|
+
return relationFieldId(model.value)
|
|
63
|
+
},
|
|
64
|
+
set(raw) {
|
|
65
|
+
if (props.field?.multiple) {
|
|
66
|
+
const ids = Array.isArray(raw) ? raw.map(id => String(id)) : []
|
|
67
|
+
model.value = ids
|
|
68
|
+
.map(id => findEntry(id))
|
|
69
|
+
.filter((entry): entry is RelationPickerEntry => !!entry)
|
|
70
|
+
.map(entry => encodeRelationEntryValue(entry, props.field?.returnFormat))
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
if (raw === '' || raw == null) {
|
|
74
|
+
model.value = emptyValue()
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
const entry = findEntry(String(raw))
|
|
78
|
+
model.value = entry
|
|
79
|
+
? encodeRelationEntryValue(entry, props.field?.returnFormat)
|
|
80
|
+
: emptyValue()
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
const placeholder = computed(() => {
|
|
85
|
+
if (props.field?.multiple) {
|
|
86
|
+
return 'Select entries'
|
|
87
|
+
}
|
|
88
|
+
if (props.field?.allowNull || !props.field?.required) {
|
|
89
|
+
return 'Select entry'
|
|
90
|
+
}
|
|
91
|
+
return ''
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
function mergeEntries(fetched: RelationPickerEntry[]) {
|
|
95
|
+
const byId = new Map(fetched.map(entry => [entry.id, entry]))
|
|
96
|
+
for (const existing of entries.value) {
|
|
97
|
+
if (!byId.has(existing.id)) {
|
|
98
|
+
byId.set(existing.id, existing)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
entries.value = [...byId.values()]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function syncModel() {
|
|
105
|
+
if (props.field?.multiple) {
|
|
106
|
+
const ids = Array.isArray(model.value) ? model.value.map(relationFieldId).filter(Boolean) : []
|
|
107
|
+
const next = ids
|
|
108
|
+
.map(id => findEntry(id))
|
|
109
|
+
.filter((entry): entry is RelationPickerEntry => !!entry)
|
|
110
|
+
if (next.length !== ids.length) {
|
|
111
|
+
model.value = next.map(entry => encodeRelationEntryValue(entry, props.field?.returnFormat))
|
|
112
|
+
}
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
const id = relationFieldId(model.value)
|
|
116
|
+
if (!id && props.field?.allowNull && (model.value === undefined || model.value === '')) {
|
|
117
|
+
model.value = null
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async function loadEntries() {
|
|
122
|
+
loading.value = true
|
|
123
|
+
loadError.value = null
|
|
124
|
+
try {
|
|
125
|
+
const res = await $fetch<RelationEntriesResponse>(relationEntriesApi({
|
|
126
|
+
postType: props.field?.postType,
|
|
127
|
+
dictionary: props.field?.dictionary,
|
|
128
|
+
}))
|
|
129
|
+
mergeEntries(res.entries)
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
loadError.value = 'Could not load entries.'
|
|
133
|
+
}
|
|
134
|
+
finally {
|
|
135
|
+
loading.value = false
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
onMounted(async () => {
|
|
140
|
+
await loadEntries()
|
|
141
|
+
syncModel()
|
|
142
|
+
})
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<template>
|
|
146
|
+
<KateCmsFieldWrapper
|
|
147
|
+
:field-key="fieldKey"
|
|
148
|
+
:field="field"
|
|
149
|
+
>
|
|
150
|
+
<div
|
|
151
|
+
v-if="loadError"
|
|
152
|
+
:class="`${rootClass}__error`"
|
|
153
|
+
>
|
|
154
|
+
{{ loadError }}
|
|
155
|
+
</div>
|
|
156
|
+
<KateCmsUiSelect
|
|
157
|
+
:id="fieldKey"
|
|
158
|
+
v-model="selected"
|
|
159
|
+
:name="fieldKey"
|
|
160
|
+
:choices="selectChoices"
|
|
161
|
+
:placeholder="placeholder"
|
|
162
|
+
:multiple="field?.multiple || false"
|
|
163
|
+
:required="field?.required || false"
|
|
164
|
+
:disabled="loading"
|
|
165
|
+
search
|
|
166
|
+
search-clearable
|
|
167
|
+
search-placeholder="Search entries"
|
|
168
|
+
:selected-opt-clearable="!!field?.allowNull"
|
|
169
|
+
no-results-text="No entries found"
|
|
170
|
+
:aria-label="field?.label || fieldKey"
|
|
171
|
+
/>
|
|
172
|
+
</KateCmsFieldWrapper>
|
|
173
|
+
</template>
|
|
174
|
+
|
|
175
|
+
<style scoped lang="scss">
|
|
176
|
+
@use "../../assets/styles" as *;
|
|
177
|
+
|
|
178
|
+
$root: '.katecms-post-object-field';
|
|
179
|
+
|
|
180
|
+
#{$root} {
|
|
181
|
+
&__error {
|
|
182
|
+
margin: 0 0 math-rem(8);
|
|
183
|
+
color: $color-danger;
|
|
184
|
+
font-size: math-rem(13);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
</style>
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref, watch } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
choiceMapLookup,
|
|
5
|
+
decodeChoiceValue,
|
|
6
|
+
encodeChoiceValue,
|
|
7
|
+
} from '@katecms/core'
|
|
8
|
+
import type { ChoiceMap, Field } from '@katecms/core'
|
|
9
|
+
|
|
10
|
+
type RadioFieldConfig = Extract<Field, { type: 'radio' }>
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<{
|
|
13
|
+
fieldKey: string
|
|
14
|
+
field?: RadioFieldConfig
|
|
15
|
+
}>(), {
|
|
16
|
+
field: () => ({ type: 'radio', label: '', choices: {} }),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const model = defineModel<unknown>()
|
|
20
|
+
|
|
21
|
+
const rootClass = 'katecms-radio-field'
|
|
22
|
+
const customKeys = ref<string[]>([])
|
|
23
|
+
const customDraft = ref('')
|
|
24
|
+
|
|
25
|
+
const configuredChoices = computed<ChoiceMap>(() => props.field?.choices ?? {})
|
|
26
|
+
|
|
27
|
+
function rememberCustom(keys: string[]) {
|
|
28
|
+
const configured = configuredChoices.value
|
|
29
|
+
for (const key of keys) {
|
|
30
|
+
if (!key || key in configured || customKeys.value.includes(key)) {
|
|
31
|
+
continue
|
|
32
|
+
}
|
|
33
|
+
customKeys.value = [...customKeys.value, key]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const displayChoices = computed<ChoiceMap>(() => {
|
|
38
|
+
const map: ChoiceMap = { ...configuredChoices.value }
|
|
39
|
+
for (const key of customKeys.value) {
|
|
40
|
+
if (!(key in map)) {
|
|
41
|
+
map[key] = key
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return map
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const lookup = computed(() => choiceMapLookup(displayChoices.value))
|
|
48
|
+
|
|
49
|
+
function format(raw: string): unknown {
|
|
50
|
+
return encodeChoiceValue(raw, lookup.value, props.field?.returnFormat)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function unformat(value: unknown): string {
|
|
54
|
+
return decodeChoiceValue(value, lookup.value, props.field?.returnFormat)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const selected = computed<string>({
|
|
58
|
+
get: () => unformat(model.value),
|
|
59
|
+
set: (raw) => {
|
|
60
|
+
model.value = raw === '' ? '' : format(raw)
|
|
61
|
+
},
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
watch(selected, (raw) => {
|
|
65
|
+
rememberCustom(raw ? [raw] : [])
|
|
66
|
+
}, { immediate: true })
|
|
67
|
+
|
|
68
|
+
const canAddCustom = computed(() =>
|
|
69
|
+
!!props.field?.allowCustomChoices && customDraft.value.trim().length > 0,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
const addLabel = computed(() => props.field?.customChoiceButtonText || 'Add')
|
|
73
|
+
|
|
74
|
+
function addCustom() {
|
|
75
|
+
const term = customDraft.value.trim()
|
|
76
|
+
if (!term || !props.field?.allowCustomChoices) {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
rememberCustom([term])
|
|
80
|
+
selected.value = term
|
|
81
|
+
customDraft.value = ''
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
onMounted(() => {
|
|
85
|
+
const raw = selected.value
|
|
86
|
+
model.value = raw === '' ? '' : format(raw)
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
function onRadioClick(value: string) {
|
|
90
|
+
if (props.field?.allowNull && selected.value === value) {
|
|
91
|
+
selected.value = ''
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<template>
|
|
97
|
+
<KateCmsFieldWrapper
|
|
98
|
+
:field-key="fieldKey"
|
|
99
|
+
:field="field"
|
|
100
|
+
label-tag="div"
|
|
101
|
+
>
|
|
102
|
+
<div :class="rootClass">
|
|
103
|
+
<div
|
|
104
|
+
:class="[
|
|
105
|
+
`${rootClass}__choices`,
|
|
106
|
+
`${rootClass}__choices--${field?.layout || 'vertical'}`,
|
|
107
|
+
]"
|
|
108
|
+
>
|
|
109
|
+
<label
|
|
110
|
+
v-for="(label, value) in displayChoices"
|
|
111
|
+
:key="value"
|
|
112
|
+
:class="`${rootClass}__item`"
|
|
113
|
+
>
|
|
114
|
+
<input
|
|
115
|
+
v-model="selected"
|
|
116
|
+
type="radio"
|
|
117
|
+
:name="fieldKey"
|
|
118
|
+
:value="value"
|
|
119
|
+
@click="onRadioClick(value)"
|
|
120
|
+
>
|
|
121
|
+
<span>{{ label }}</span>
|
|
122
|
+
</label>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<form
|
|
126
|
+
v-if="field?.allowCustomChoices"
|
|
127
|
+
:class="`${rootClass}__add`"
|
|
128
|
+
@submit.prevent="addCustom"
|
|
129
|
+
>
|
|
130
|
+
<KateCmsInputControl
|
|
131
|
+
v-model="customDraft"
|
|
132
|
+
:field-key="`${fieldKey}_custom`"
|
|
133
|
+
:field="{ placeholder: 'Other' }"
|
|
134
|
+
/>
|
|
135
|
+
<KateCmsUiButton
|
|
136
|
+
tag="button"
|
|
137
|
+
type="submit"
|
|
138
|
+
variant="secondary"
|
|
139
|
+
:disabled="!canAddCustom"
|
|
140
|
+
>
|
|
141
|
+
{{ addLabel }}
|
|
142
|
+
</KateCmsUiButton>
|
|
143
|
+
</form>
|
|
144
|
+
</div>
|
|
145
|
+
</KateCmsFieldWrapper>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<style scoped lang="scss">
|
|
149
|
+
@use "../../assets/styles" as *;
|
|
150
|
+
|
|
151
|
+
$root: '.katecms-radio-field';
|
|
152
|
+
|
|
153
|
+
#{$root} {
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
gap: math-rem(10);
|
|
157
|
+
|
|
158
|
+
&__choices {
|
|
159
|
+
display: flex;
|
|
160
|
+
gap: math-rem(8) math-rem(16);
|
|
161
|
+
|
|
162
|
+
&--vertical {
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&--horizontal {
|
|
167
|
+
flex-direction: row;
|
|
168
|
+
flex-wrap: wrap;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&__item {
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
gap: math-rem(6);
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
color: $color-ink;
|
|
178
|
+
|
|
179
|
+
input {
|
|
180
|
+
accent-color: $color-accent;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&__add {
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: math-rem(8);
|
|
188
|
+
|
|
189
|
+
:deep(.katecms-input-control) {
|
|
190
|
+
flex: 1 1 auto;
|
|
191
|
+
min-width: 0;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
</style>
|