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,1354 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, reactive } from 'vue'
|
|
3
|
+
import { useHead } from '#imports'
|
|
4
|
+
import {
|
|
5
|
+
buildFormValues,
|
|
6
|
+
isVisible,
|
|
7
|
+
} from '@katecms/core'
|
|
8
|
+
import type { Fields } from '@katecms/core'
|
|
9
|
+
import { resolveField } from '../../utils/helpers'
|
|
10
|
+
import { provideKateCmsFieldValues } from '../../utils/field-values'
|
|
11
|
+
|
|
12
|
+
const rootClass = 'katecms-admin-demo'
|
|
13
|
+
|
|
14
|
+
useHead({ title: 'Field demo' })
|
|
15
|
+
|
|
16
|
+
const fields: Fields = {
|
|
17
|
+
text_test: {
|
|
18
|
+
type: 'text',
|
|
19
|
+
label: 'Text',
|
|
20
|
+
instructions: 'Text instructions',
|
|
21
|
+
required: true,
|
|
22
|
+
position: 'main',
|
|
23
|
+
placeholder: 'Text Placeholder',
|
|
24
|
+
defaultValue: 'Text Test Default',
|
|
25
|
+
maxLength: 120,
|
|
26
|
+
prepend: 'Prepend',
|
|
27
|
+
append: 'Append',
|
|
28
|
+
columnWidth: 50,
|
|
29
|
+
},
|
|
30
|
+
textarea_test: {
|
|
31
|
+
type: 'textarea',
|
|
32
|
+
label: 'Textarea',
|
|
33
|
+
instructions: 'Textarea instructions',
|
|
34
|
+
required: true,
|
|
35
|
+
position: 'main',
|
|
36
|
+
placeholder: 'Textarea',
|
|
37
|
+
defaultValue: 'Textarea Test Default\n\nTextarea Test Default\nTextarea Test Default\n\nTextarea Test Default',
|
|
38
|
+
maxLength: 500,
|
|
39
|
+
rows: 6,
|
|
40
|
+
newLines: 'autop',
|
|
41
|
+
columnWidth: 50,
|
|
42
|
+
},
|
|
43
|
+
email_test: {
|
|
44
|
+
type: 'email',
|
|
45
|
+
label: 'Email',
|
|
46
|
+
instructions: 'Email instructions',
|
|
47
|
+
required: true,
|
|
48
|
+
position: 'main',
|
|
49
|
+
placeholder: 'name@example.com',
|
|
50
|
+
defaultValue: 'test@example.com',
|
|
51
|
+
prepend: '@',
|
|
52
|
+
append: '.com',
|
|
53
|
+
columnWidth: 50,
|
|
54
|
+
},
|
|
55
|
+
url_test: {
|
|
56
|
+
type: 'url',
|
|
57
|
+
label: 'Url',
|
|
58
|
+
instructions: 'Url instructions',
|
|
59
|
+
required: true,
|
|
60
|
+
position: 'main',
|
|
61
|
+
placeholder: 'https://example.com',
|
|
62
|
+
defaultValue: 'https://example.com',
|
|
63
|
+
columnWidth: 50,
|
|
64
|
+
},
|
|
65
|
+
oembed_test: {
|
|
66
|
+
type: 'oembed',
|
|
67
|
+
label: 'Oembed',
|
|
68
|
+
instructions: 'Oembed instructions',
|
|
69
|
+
required: true,
|
|
70
|
+
defaultValue: 'https://youtu.be/AA4EADkgk4Q?si=iihiGODQHIS-tgR_',
|
|
71
|
+
position: 'main',
|
|
72
|
+
width: 560,
|
|
73
|
+
height: 315,
|
|
74
|
+
columnWidth: 50,
|
|
75
|
+
},
|
|
76
|
+
wysiwyg_test: {
|
|
77
|
+
type: 'wysiwyg',
|
|
78
|
+
label: 'Wysiwyg',
|
|
79
|
+
instructions: 'Wysiwyg instructions',
|
|
80
|
+
required: true,
|
|
81
|
+
position: 'main',
|
|
82
|
+
defaultValue: '<p>Wysiwyg <strong>default</strong> value</p>',
|
|
83
|
+
tabs: 'all',
|
|
84
|
+
toolbar: 'full',
|
|
85
|
+
columnWidth: 50,
|
|
86
|
+
},
|
|
87
|
+
password_test: {
|
|
88
|
+
type: 'password',
|
|
89
|
+
label: 'Password',
|
|
90
|
+
instructions: 'Password instructions',
|
|
91
|
+
required: true,
|
|
92
|
+
position: 'main',
|
|
93
|
+
placeholder: 'Password',
|
|
94
|
+
prepend: 'Prepend',
|
|
95
|
+
append: 'Append',
|
|
96
|
+
columnWidth: 50,
|
|
97
|
+
},
|
|
98
|
+
button_group_test: {
|
|
99
|
+
type: 'button_group',
|
|
100
|
+
label: 'Button Group',
|
|
101
|
+
instructions: 'Button group instructions',
|
|
102
|
+
required: true,
|
|
103
|
+
position: 'main',
|
|
104
|
+
layout: 'horizontal',
|
|
105
|
+
choices: {
|
|
106
|
+
red: 'Red',
|
|
107
|
+
green: 'Green',
|
|
108
|
+
blue: 'Blue',
|
|
109
|
+
},
|
|
110
|
+
defaultValue: 'green',
|
|
111
|
+
returnFormat: 'label',
|
|
112
|
+
columnWidth: 50,
|
|
113
|
+
},
|
|
114
|
+
checkbox_test: {
|
|
115
|
+
type: 'checkbox',
|
|
116
|
+
label: 'Checkbox',
|
|
117
|
+
instructions: 'Checkbox instructions',
|
|
118
|
+
required: true,
|
|
119
|
+
position: 'main',
|
|
120
|
+
layout: 'vertical',
|
|
121
|
+
toggle: true,
|
|
122
|
+
allowCustomChoices: true,
|
|
123
|
+
choices: {
|
|
124
|
+
red: 'Red',
|
|
125
|
+
green: 'Green',
|
|
126
|
+
blue: 'Blue',
|
|
127
|
+
},
|
|
128
|
+
defaultValue: ['green', 'blue'],
|
|
129
|
+
returnFormat: 'array',
|
|
130
|
+
columnWidth: 50,
|
|
131
|
+
},
|
|
132
|
+
color_picker_test: {
|
|
133
|
+
type: 'color_picker',
|
|
134
|
+
label: 'Color Picker',
|
|
135
|
+
instructions: 'Color picker instructions',
|
|
136
|
+
required: true,
|
|
137
|
+
position: 'main',
|
|
138
|
+
defaultValue: '#2F6FED',
|
|
139
|
+
enableOpacity: true,
|
|
140
|
+
returnFormat: 'array',
|
|
141
|
+
showColorWheel: true,
|
|
142
|
+
paletteColors: [
|
|
143
|
+
'rgba(244, 67, 54, 1)',
|
|
144
|
+
'rgba(233, 30, 99, 0.95)',
|
|
145
|
+
'rgba(156, 39, 176, 0.9)',
|
|
146
|
+
'rgba(103, 58, 183, 0.85)',
|
|
147
|
+
'rgba(63, 81, 181, 0.8)',
|
|
148
|
+
'rgba(47, 111, 237, 0.9)',
|
|
149
|
+
'rgba(3, 169, 244, 0.7)',
|
|
150
|
+
'rgba(0, 188, 212, 0.7)',
|
|
151
|
+
'rgba(42, 154, 102, 0.85)',
|
|
152
|
+
'rgba(76, 175, 80, 0.8)',
|
|
153
|
+
'rgba(196, 133, 26, 0.9)',
|
|
154
|
+
'rgba(214, 69, 69, 1)',
|
|
155
|
+
],
|
|
156
|
+
rgba: true,
|
|
157
|
+
hsla: true,
|
|
158
|
+
columnWidth: 50,
|
|
159
|
+
},
|
|
160
|
+
date_picker_test: {
|
|
161
|
+
type: 'date_picker',
|
|
162
|
+
label: 'Date Picker',
|
|
163
|
+
instructions: 'Date picker instructions',
|
|
164
|
+
required: true,
|
|
165
|
+
position: 'main',
|
|
166
|
+
displayFormat: 'DD.MM.YYYY',
|
|
167
|
+
returnFormat: 'YYYY-MM-DD',
|
|
168
|
+
firstDay: 1,
|
|
169
|
+
defaultToCurrentDate: true,
|
|
170
|
+
columnWidth: 50,
|
|
171
|
+
},
|
|
172
|
+
date_time_picker_test: {
|
|
173
|
+
type: 'date_time_picker',
|
|
174
|
+
label: 'Date Time Picker',
|
|
175
|
+
instructions: 'Date time picker instructions',
|
|
176
|
+
required: true,
|
|
177
|
+
position: 'main',
|
|
178
|
+
displayFormat: 'DD.MM.YYYY HH:mm',
|
|
179
|
+
returnFormat: 'YYYY-MM-DD HH:mm',
|
|
180
|
+
firstDay: 1,
|
|
181
|
+
defaultToCurrentDate: true,
|
|
182
|
+
columnWidth: 50,
|
|
183
|
+
},
|
|
184
|
+
time_picker_test: {
|
|
185
|
+
type: 'time_picker',
|
|
186
|
+
label: 'Time Picker',
|
|
187
|
+
instructions: 'Time picker instructions',
|
|
188
|
+
required: true,
|
|
189
|
+
position: 'main',
|
|
190
|
+
displayFormat: 'HH:mm',
|
|
191
|
+
returnFormat: 'HH:mm',
|
|
192
|
+
columnWidth: 50,
|
|
193
|
+
},
|
|
194
|
+
number_test: {
|
|
195
|
+
type: 'number',
|
|
196
|
+
label: 'Number',
|
|
197
|
+
instructions: 'Number instructions',
|
|
198
|
+
required: true,
|
|
199
|
+
position: 'main',
|
|
200
|
+
placeholder: 'Number',
|
|
201
|
+
defaultValue: 10,
|
|
202
|
+
min: 0,
|
|
203
|
+
max: 100,
|
|
204
|
+
step: 5,
|
|
205
|
+
prepend: '$',
|
|
206
|
+
append: 'USD',
|
|
207
|
+
columnWidth: 50,
|
|
208
|
+
},
|
|
209
|
+
range_test: {
|
|
210
|
+
type: 'range',
|
|
211
|
+
label: 'Range',
|
|
212
|
+
instructions: 'Range instructions',
|
|
213
|
+
required: true,
|
|
214
|
+
position: 'main',
|
|
215
|
+
defaultValue: 25,
|
|
216
|
+
min: 0,
|
|
217
|
+
max: 200,
|
|
218
|
+
step: 5,
|
|
219
|
+
prepend: 'min',
|
|
220
|
+
append: 'max',
|
|
221
|
+
columnWidth: 50,
|
|
222
|
+
},
|
|
223
|
+
radio_test: {
|
|
224
|
+
type: 'radio',
|
|
225
|
+
label: 'Radio',
|
|
226
|
+
instructions: 'Radio instructions',
|
|
227
|
+
required: true,
|
|
228
|
+
position: 'main',
|
|
229
|
+
layout: 'vertical',
|
|
230
|
+
allowNull: true,
|
|
231
|
+
allowCustomChoices: true,
|
|
232
|
+
choices: {
|
|
233
|
+
red: 'Red',
|
|
234
|
+
green: 'Green',
|
|
235
|
+
blue: 'Blue',
|
|
236
|
+
},
|
|
237
|
+
defaultValue: 'green',
|
|
238
|
+
returnFormat: 'label',
|
|
239
|
+
columnWidth: 50,
|
|
240
|
+
},
|
|
241
|
+
true_false_test: {
|
|
242
|
+
type: 'true_false',
|
|
243
|
+
label: 'True / False',
|
|
244
|
+
instructions: 'True/False instructions',
|
|
245
|
+
required: true,
|
|
246
|
+
position: 'main',
|
|
247
|
+
message: 'Enable option',
|
|
248
|
+
ui: true,
|
|
249
|
+
uiOnText: 'On',
|
|
250
|
+
uiOffText: 'Off',
|
|
251
|
+
defaultValue: true,
|
|
252
|
+
columnWidth: 50,
|
|
253
|
+
},
|
|
254
|
+
true_false_test_no_ui: {
|
|
255
|
+
type: 'true_false',
|
|
256
|
+
label: 'True / False',
|
|
257
|
+
instructions: 'True/False instructions',
|
|
258
|
+
required: true,
|
|
259
|
+
position: 'main',
|
|
260
|
+
message: 'Enable option',
|
|
261
|
+
defaultValue: true,
|
|
262
|
+
columnWidth: 50,
|
|
263
|
+
},
|
|
264
|
+
select_test: {
|
|
265
|
+
type: 'select',
|
|
266
|
+
label: 'Select',
|
|
267
|
+
instructions: 'Select instructions',
|
|
268
|
+
required: true,
|
|
269
|
+
position: 'main',
|
|
270
|
+
placeholder: 'тАФ Select тАФ',
|
|
271
|
+
allowNull: true,
|
|
272
|
+
clearable: true,
|
|
273
|
+
search: true,
|
|
274
|
+
searchPlaceholder: 'FilterтАж',
|
|
275
|
+
choices: [
|
|
276
|
+
{ val: 'red', lbl: 'Red' },
|
|
277
|
+
{ val: 'green', lbl: 'Green', check: true },
|
|
278
|
+
{ val: 'blue', lbl: 'Blue' },
|
|
279
|
+
{
|
|
280
|
+
type: 'group',
|
|
281
|
+
title: 'Other',
|
|
282
|
+
childs: [
|
|
283
|
+
{ val: 'amber', lbl: 'Amber' },
|
|
284
|
+
{ val: 'gray', lbl: 'Gray', disabled: true },
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
defaultValue: 'green',
|
|
289
|
+
returnFormat: 'array',
|
|
290
|
+
columnWidth: 50,
|
|
291
|
+
},
|
|
292
|
+
image_select_test: {
|
|
293
|
+
type: 'image_select',
|
|
294
|
+
label: 'Image Select',
|
|
295
|
+
instructions: 'Single select (radio) with images',
|
|
296
|
+
required: true,
|
|
297
|
+
position: 'main',
|
|
298
|
+
layout: 'horizontal',
|
|
299
|
+
allowNull: true,
|
|
300
|
+
choices: {
|
|
301
|
+
red: { label: 'Red', image: 'https://picsum.photos/800/600' },
|
|
302
|
+
green: { label: 'Green', image: 'https://picsum.photos/600/600' },
|
|
303
|
+
blue: { label: 'Blue', image: 'https://picsum.photos/800/400' },
|
|
304
|
+
},
|
|
305
|
+
defaultValue: 'green',
|
|
306
|
+
returnFormat: 'value',
|
|
307
|
+
columnWidth: 50,
|
|
308
|
+
},
|
|
309
|
+
image_select_multiple_test: {
|
|
310
|
+
type: 'image_select',
|
|
311
|
+
label: 'Image Select Multiple',
|
|
312
|
+
instructions: 'Multiple select (checkbox) with images',
|
|
313
|
+
required: true,
|
|
314
|
+
position: 'main',
|
|
315
|
+
layout: 'horizontal',
|
|
316
|
+
multiple: true,
|
|
317
|
+
choices: {
|
|
318
|
+
left: { label: 'Left', image: 'https://picsum.photos/700/600' },
|
|
319
|
+
center: { label: 'Center', image: 'https://picsum.photos/500/600' },
|
|
320
|
+
right: { label: 'Right', image: 'https://picsum.photos/800/420' },
|
|
321
|
+
},
|
|
322
|
+
defaultValue: ['left', 'center'],
|
|
323
|
+
returnFormat: 'array',
|
|
324
|
+
width: 140,
|
|
325
|
+
height: 110,
|
|
326
|
+
columnWidth: 50,
|
|
327
|
+
},
|
|
328
|
+
separator_test: {
|
|
329
|
+
type: 'separator',
|
|
330
|
+
label: 'Separator',
|
|
331
|
+
position: 'main',
|
|
332
|
+
columnWidth: 100,
|
|
333
|
+
},
|
|
334
|
+
group_test: {
|
|
335
|
+
type: 'group',
|
|
336
|
+
label: 'Group',
|
|
337
|
+
instructions: 'Group instructions',
|
|
338
|
+
position: 'main',
|
|
339
|
+
columnWidth: 100,
|
|
340
|
+
subFields: {
|
|
341
|
+
title: {
|
|
342
|
+
type: 'text',
|
|
343
|
+
label: 'Title',
|
|
344
|
+
required: true,
|
|
345
|
+
placeholder: 'Title',
|
|
346
|
+
defaultValue: '',
|
|
347
|
+
columnWidth: 50,
|
|
348
|
+
},
|
|
349
|
+
description: {
|
|
350
|
+
type: 'textarea',
|
|
351
|
+
label: 'Description',
|
|
352
|
+
placeholder: 'Description',
|
|
353
|
+
defaultValue: '',
|
|
354
|
+
columnWidth: 50,
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
tab_test: {
|
|
359
|
+
type: 'tab',
|
|
360
|
+
placement: 'top',
|
|
361
|
+
position: 'main',
|
|
362
|
+
columnWidth: 100,
|
|
363
|
+
panels: [
|
|
364
|
+
{
|
|
365
|
+
label: 'Tab 1',
|
|
366
|
+
subFields: {
|
|
367
|
+
tab_title: {
|
|
368
|
+
type: 'text',
|
|
369
|
+
label: 'Title',
|
|
370
|
+
required: true,
|
|
371
|
+
placeholder: 'Title',
|
|
372
|
+
defaultValue: '',
|
|
373
|
+
columnWidth: 50,
|
|
374
|
+
},
|
|
375
|
+
tab_description: {
|
|
376
|
+
type: 'textarea',
|
|
377
|
+
label: 'Description',
|
|
378
|
+
placeholder: 'Description',
|
|
379
|
+
defaultValue: '',
|
|
380
|
+
columnWidth: 50,
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
label: 'Tab 2',
|
|
386
|
+
subFields: {
|
|
387
|
+
tab_title_2: {
|
|
388
|
+
type: 'text',
|
|
389
|
+
label: 'Title 2',
|
|
390
|
+
required: true,
|
|
391
|
+
placeholder: 'Title',
|
|
392
|
+
defaultValue: '',
|
|
393
|
+
columnWidth: 50,
|
|
394
|
+
},
|
|
395
|
+
tab_description_2: {
|
|
396
|
+
type: 'textarea',
|
|
397
|
+
label: 'Description 2',
|
|
398
|
+
placeholder: 'Description',
|
|
399
|
+
defaultValue: '',
|
|
400
|
+
columnWidth: 50,
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
},
|
|
406
|
+
accordion_test: {
|
|
407
|
+
type: 'accordion',
|
|
408
|
+
position: 'main',
|
|
409
|
+
columnWidth: 100,
|
|
410
|
+
open: 0,
|
|
411
|
+
multiExpand: false,
|
|
412
|
+
panels: [
|
|
413
|
+
{
|
|
414
|
+
label: 'Panel 1',
|
|
415
|
+
subFields: {
|
|
416
|
+
accordion_title: {
|
|
417
|
+
type: 'text',
|
|
418
|
+
label: 'Title',
|
|
419
|
+
required: true,
|
|
420
|
+
placeholder: 'Title',
|
|
421
|
+
defaultValue: '',
|
|
422
|
+
columnWidth: 50,
|
|
423
|
+
},
|
|
424
|
+
accordion_description: {
|
|
425
|
+
type: 'textarea',
|
|
426
|
+
label: 'Description',
|
|
427
|
+
placeholder: 'Description',
|
|
428
|
+
defaultValue: '',
|
|
429
|
+
columnWidth: 50,
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
label: 'Panel 2',
|
|
435
|
+
subFields: {
|
|
436
|
+
accordion_title_2: {
|
|
437
|
+
type: 'text',
|
|
438
|
+
label: 'Title 2',
|
|
439
|
+
required: true,
|
|
440
|
+
placeholder: 'Title',
|
|
441
|
+
defaultValue: '',
|
|
442
|
+
columnWidth: 50,
|
|
443
|
+
},
|
|
444
|
+
accordion_description_2: {
|
|
445
|
+
type: 'textarea',
|
|
446
|
+
label: 'Description 2',
|
|
447
|
+
placeholder: 'Description',
|
|
448
|
+
defaultValue: '',
|
|
449
|
+
columnWidth: 50,
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
},
|
|
455
|
+
repeater_test: {
|
|
456
|
+
type: 'repeater',
|
|
457
|
+
label: 'Repeater',
|
|
458
|
+
instructions: 'Repeater instructions',
|
|
459
|
+
position: 'main',
|
|
460
|
+
collapsed: 'title',
|
|
461
|
+
min: 2,
|
|
462
|
+
max: 5,
|
|
463
|
+
buttonLabel: 'Add item',
|
|
464
|
+
columnWidth: 100,
|
|
465
|
+
subFields: {
|
|
466
|
+
title: {
|
|
467
|
+
type: 'text',
|
|
468
|
+
label: 'Title',
|
|
469
|
+
required: true,
|
|
470
|
+
placeholder: 'Title',
|
|
471
|
+
defaultValue: '',
|
|
472
|
+
columnWidth: 50,
|
|
473
|
+
},
|
|
474
|
+
description: {
|
|
475
|
+
type: 'textarea',
|
|
476
|
+
label: 'Description',
|
|
477
|
+
placeholder: 'Description',
|
|
478
|
+
defaultValue: '',
|
|
479
|
+
columnWidth: 50,
|
|
480
|
+
},
|
|
481
|
+
nested: {
|
|
482
|
+
type: 'repeater',
|
|
483
|
+
label: 'Sub Repeater',
|
|
484
|
+
instructions: 'Nested repeater',
|
|
485
|
+
collapsed: 'title',
|
|
486
|
+
buttonLabel: 'Add nested item',
|
|
487
|
+
columnWidth: 100,
|
|
488
|
+
subFields: {
|
|
489
|
+
title: {
|
|
490
|
+
type: 'text',
|
|
491
|
+
label: 'Title',
|
|
492
|
+
required: true,
|
|
493
|
+
placeholder: 'Title',
|
|
494
|
+
defaultValue: '',
|
|
495
|
+
},
|
|
496
|
+
description: {
|
|
497
|
+
type: 'textarea',
|
|
498
|
+
label: 'Description',
|
|
499
|
+
placeholder: 'Description',
|
|
500
|
+
defaultValue: '',
|
|
501
|
+
columnWidth: 100,
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
file_test: {
|
|
508
|
+
type: 'file',
|
|
509
|
+
label: 'File',
|
|
510
|
+
instructions: 'File instructions',
|
|
511
|
+
required: true,
|
|
512
|
+
position: 'main',
|
|
513
|
+
returnFormat: 'array',
|
|
514
|
+
library: 'all',
|
|
515
|
+
maxSize: 10,
|
|
516
|
+
columnWidth: 50,
|
|
517
|
+
},
|
|
518
|
+
image_test: {
|
|
519
|
+
type: 'image',
|
|
520
|
+
label: 'Image',
|
|
521
|
+
instructions: 'Image instructions',
|
|
522
|
+
required: true,
|
|
523
|
+
position: 'main',
|
|
524
|
+
returnFormat: 'array',
|
|
525
|
+
library: 'all',
|
|
526
|
+
cropType: true,
|
|
527
|
+
columnWidth: 50,
|
|
528
|
+
},
|
|
529
|
+
image_icon_test: {
|
|
530
|
+
type: 'image',
|
|
531
|
+
label: 'Image (icon)',
|
|
532
|
+
instructions: 'Add Image is an icon button when iconMode is true.',
|
|
533
|
+
position: 'main',
|
|
534
|
+
returnFormat: 'array',
|
|
535
|
+
library: 'all',
|
|
536
|
+
iconMode: true,
|
|
537
|
+
columnWidth: 50,
|
|
538
|
+
},
|
|
539
|
+
gallery_test: {
|
|
540
|
+
type: 'gallery',
|
|
541
|
+
label: 'Gallery',
|
|
542
|
+
instructions: 'Gallery instructions тАФ drag to reorder, multi-select in media library',
|
|
543
|
+
required: true,
|
|
544
|
+
position: 'main',
|
|
545
|
+
returnFormat: 'array',
|
|
546
|
+
library: 'all',
|
|
547
|
+
insert: 'append',
|
|
548
|
+
previewSize: 'thumbnail',
|
|
549
|
+
min: 1,
|
|
550
|
+
max: 8,
|
|
551
|
+
columnWidth: 100,
|
|
552
|
+
},
|
|
553
|
+
open_street_map_test: {
|
|
554
|
+
type: 'open_street_map',
|
|
555
|
+
label: 'OpenStreetMap',
|
|
556
|
+
instructions: 'Double-click or search an address to place a marker. Zoom with ┬▒ only. Locate and Fit Bounds are on the map.',
|
|
557
|
+
position: 'main',
|
|
558
|
+
height: 360,
|
|
559
|
+
centerLat: '55.751244',
|
|
560
|
+
centerLng: '37.618423',
|
|
561
|
+
zoom: 10,
|
|
562
|
+
columnWidth: 100,
|
|
563
|
+
},
|
|
564
|
+
open_street_map_multiple_test: {
|
|
565
|
+
type: 'open_street_map',
|
|
566
|
+
label: 'OpenStreetMap (multiple)',
|
|
567
|
+
instructions: 'Multiple markers: each has its own Label. Fit Bounds shows all points.',
|
|
568
|
+
position: 'main',
|
|
569
|
+
height: 500,
|
|
570
|
+
multiple: true,
|
|
571
|
+
columnWidth: 100,
|
|
572
|
+
},
|
|
573
|
+
link_test: {
|
|
574
|
+
type: 'link',
|
|
575
|
+
label: 'Link',
|
|
576
|
+
instructions: 'Link instructions',
|
|
577
|
+
required: true,
|
|
578
|
+
position: 'main',
|
|
579
|
+
returnFormat: 'array',
|
|
580
|
+
columnWidth: 50,
|
|
581
|
+
},
|
|
582
|
+
user_test: {
|
|
583
|
+
type: 'user',
|
|
584
|
+
label: 'User',
|
|
585
|
+
instructions: 'Pick one or more accounts. Stored as user objects (no password).',
|
|
586
|
+
required: true,
|
|
587
|
+
position: 'main',
|
|
588
|
+
role: 'all',
|
|
589
|
+
allowNull: true,
|
|
590
|
+
returnFormat: 'array',
|
|
591
|
+
columnWidth: 50,
|
|
592
|
+
multiple: true,
|
|
593
|
+
},
|
|
594
|
+
user_id_test: {
|
|
595
|
+
type: 'user',
|
|
596
|
+
label: 'User (id)',
|
|
597
|
+
instructions: 'Single user, stored as a numeric id.',
|
|
598
|
+
position: 'main',
|
|
599
|
+
role: 'all',
|
|
600
|
+
allowNull: true,
|
|
601
|
+
returnFormat: 'id',
|
|
602
|
+
columnWidth: 50,
|
|
603
|
+
},
|
|
604
|
+
separator_test_2: {
|
|
605
|
+
type: 'separator',
|
|
606
|
+
label: 'Test Fields',
|
|
607
|
+
position: 'main',
|
|
608
|
+
columnWidth: 100,
|
|
609
|
+
},
|
|
610
|
+
post_object_test: {
|
|
611
|
+
type: 'post_object',
|
|
612
|
+
label: 'Post Object',
|
|
613
|
+
instructions: 'Pages and products, stored as objects.',
|
|
614
|
+
position: 'main',
|
|
615
|
+
postType: ['pages', 'products'],
|
|
616
|
+
multiple: true,
|
|
617
|
+
allowNull: true,
|
|
618
|
+
returnFormat: 'object',
|
|
619
|
+
},
|
|
620
|
+
post_object_id_test: {
|
|
621
|
+
type: 'post_object',
|
|
622
|
+
label: 'Post Object (id)',
|
|
623
|
+
instructions: 'Single page, stored as a numeric id.',
|
|
624
|
+
position: 'main',
|
|
625
|
+
postType: ['pages'],
|
|
626
|
+
allowNull: true,
|
|
627
|
+
returnFormat: 'id',
|
|
628
|
+
},
|
|
629
|
+
page_link_test: {
|
|
630
|
+
type: 'page_link',
|
|
631
|
+
label: 'Page Link',
|
|
632
|
+
instructions: 'Public URLs, including collection archives.',
|
|
633
|
+
position: 'main',
|
|
634
|
+
postType: ['pages', 'products'],
|
|
635
|
+
multiple: true,
|
|
636
|
+
allowArchives: true,
|
|
637
|
+
allowNull: true,
|
|
638
|
+
},
|
|
639
|
+
relationship_test: {
|
|
640
|
+
type: 'relationship',
|
|
641
|
+
label: 'Relationship',
|
|
642
|
+
instructions: 'Pick and reorder entries. Thumbnails come from the page `thumbnail` field.',
|
|
643
|
+
position: 'main',
|
|
644
|
+
postType: ['pages', 'products'],
|
|
645
|
+
dictionary: ['categories', 'services'],
|
|
646
|
+
filters: ['search', 'post_type', 'dictionary'],
|
|
647
|
+
elements: ['thumbnail'],
|
|
648
|
+
max: 4,
|
|
649
|
+
returnFormat: 'object',
|
|
650
|
+
},
|
|
651
|
+
dictionary_test: {
|
|
652
|
+
type: 'dictionary',
|
|
653
|
+
label: 'Dictionary',
|
|
654
|
+
instructions: 'Categories as checkboxes, stored as term objects.',
|
|
655
|
+
position: 'main',
|
|
656
|
+
dictionary: 'categories',
|
|
657
|
+
fieldType: 'checkbox',
|
|
658
|
+
returnFormat: 'object',
|
|
659
|
+
},
|
|
660
|
+
dictionary_select_test: {
|
|
661
|
+
type: 'dictionary',
|
|
662
|
+
label: 'Dictionary (select)',
|
|
663
|
+
instructions: 'Services as a select. New terms can be added when you have create access.',
|
|
664
|
+
position: 'main',
|
|
665
|
+
dictionary: 'services',
|
|
666
|
+
fieldType: 'select',
|
|
667
|
+
allowNull: true,
|
|
668
|
+
addTerm: true,
|
|
669
|
+
returnFormat: 'object',
|
|
670
|
+
},
|
|
671
|
+
flexible_content_test: {
|
|
672
|
+
type: 'flexible_content',
|
|
673
|
+
label: 'Flexible Content',
|
|
674
|
+
instructions: 'Flexible Content instructions',
|
|
675
|
+
position: 'main',
|
|
676
|
+
max: 5,
|
|
677
|
+
buttonLabel: 'Add layout',
|
|
678
|
+
columnWidth: 100,
|
|
679
|
+
layouts: {
|
|
680
|
+
hero: {
|
|
681
|
+
label: 'Hero',
|
|
682
|
+
max: 2,
|
|
683
|
+
preview: 'https://picsum.photos/800/600',
|
|
684
|
+
subFields: {
|
|
685
|
+
title: {
|
|
686
|
+
type: 'text',
|
|
687
|
+
label: 'Title',
|
|
688
|
+
required: true,
|
|
689
|
+
placeholder: 'Welcome',
|
|
690
|
+
defaultValue: 'Welcome',
|
|
691
|
+
columnWidth: 50,
|
|
692
|
+
},
|
|
693
|
+
description: {
|
|
694
|
+
type: 'textarea',
|
|
695
|
+
label: 'Description',
|
|
696
|
+
placeholder: 'Lorem ipsumтАж',
|
|
697
|
+
defaultValue: 'Lorem ipsumтАж',
|
|
698
|
+
columnWidth: 50,
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
faq: {
|
|
703
|
+
label: 'FAQ',
|
|
704
|
+
subFields: {
|
|
705
|
+
heading: {
|
|
706
|
+
type: 'text',
|
|
707
|
+
label: 'Heading',
|
|
708
|
+
required: true,
|
|
709
|
+
placeholder: 'About us',
|
|
710
|
+
defaultValue: 'About us',
|
|
711
|
+
columnWidth: 100,
|
|
712
|
+
},
|
|
713
|
+
},
|
|
714
|
+
},
|
|
715
|
+
card: {
|
|
716
|
+
label: 'Card',
|
|
717
|
+
subFields: {
|
|
718
|
+
heading: {
|
|
719
|
+
type: 'text',
|
|
720
|
+
label: 'Heading',
|
|
721
|
+
required: true,
|
|
722
|
+
placeholder: 'About us',
|
|
723
|
+
defaultValue: 'About us',
|
|
724
|
+
columnWidth: 100,
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
},
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
text_sidebar: {
|
|
731
|
+
type: 'text',
|
|
732
|
+
label: 'Sidebar text',
|
|
733
|
+
instructions: 'Rendered in the sidebar',
|
|
734
|
+
position: 'sidebar',
|
|
735
|
+
placeholder: 'Sidebar',
|
|
736
|
+
defaultValue: 'Aside',
|
|
737
|
+
},
|
|
738
|
+
separator_form: {
|
|
739
|
+
type: 'separator',
|
|
740
|
+
label: 'Form',
|
|
741
|
+
position: 'main',
|
|
742
|
+
columnWidth: 100,
|
|
743
|
+
},
|
|
744
|
+
form_test: {
|
|
745
|
+
type: 'form',
|
|
746
|
+
label: 'Form',
|
|
747
|
+
instructions: 'Single form, stored as an id. Empty value is null.',
|
|
748
|
+
position: 'main',
|
|
749
|
+
multiple: false,
|
|
750
|
+
allowNull: true,
|
|
751
|
+
columnWidth: 50,
|
|
752
|
+
},
|
|
753
|
+
form_multiple_test: {
|
|
754
|
+
type: 'form',
|
|
755
|
+
label: 'Forms',
|
|
756
|
+
instructions: 'Multiple forms, stored as ids. Empty value is an array.',
|
|
757
|
+
position: 'main',
|
|
758
|
+
multiple: true,
|
|
759
|
+
allowNull: true,
|
|
760
|
+
columnWidth: 50,
|
|
761
|
+
},
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
const values = reactive<Record<string, unknown>>(buildFormValues(fields))
|
|
765
|
+
provideKateCmsFieldValues(values)
|
|
766
|
+
|
|
767
|
+
const visibleFields = computed(() =>
|
|
768
|
+
Object.entries(fields).filter(([, field]) =>
|
|
769
|
+
isVisible(field.conditionalLogic, values),
|
|
770
|
+
),
|
|
771
|
+
)
|
|
772
|
+
|
|
773
|
+
const mainFields = computed(() =>
|
|
774
|
+
visibleFields.value.filter(([, field]) => (field.position ?? 'main') === 'main'),
|
|
775
|
+
)
|
|
776
|
+
|
|
777
|
+
const sidebarFields = computed(() =>
|
|
778
|
+
visibleFields.value.filter(([, field]) => field.position === 'sidebar'),
|
|
779
|
+
)
|
|
780
|
+
</script>
|
|
781
|
+
|
|
782
|
+
<template>
|
|
783
|
+
<div :class="rootClass">
|
|
784
|
+
<div :class="[`${rootClass}__buttons`]">
|
|
785
|
+
<div :class="[`${rootClass}__buttons-title`]">
|
|
786
|
+
UiButton
|
|
787
|
+
</div>
|
|
788
|
+
|
|
789
|
+
<div :class="[`${rootClass}__buttons-grid`]">
|
|
790
|
+
<span :class="[`${rootClass}__buttons-label`]">Default</span>
|
|
791
|
+
<KateCmsUiButton
|
|
792
|
+
tag="button"
|
|
793
|
+
variant="small"
|
|
794
|
+
>
|
|
795
|
+
Save
|
|
796
|
+
</KateCmsUiButton>
|
|
797
|
+
<KateCmsUiButton tag="button">
|
|
798
|
+
Save
|
|
799
|
+
</KateCmsUiButton>
|
|
800
|
+
|
|
801
|
+
<span :class="[`${rootClass}__buttons-label`]">Secondary</span>
|
|
802
|
+
<KateCmsUiButton
|
|
803
|
+
tag="button"
|
|
804
|
+
:variant="['secondary', 'small']"
|
|
805
|
+
>
|
|
806
|
+
Preview
|
|
807
|
+
</KateCmsUiButton>
|
|
808
|
+
<KateCmsUiButton
|
|
809
|
+
tag="button"
|
|
810
|
+
variant="secondary"
|
|
811
|
+
>
|
|
812
|
+
Preview
|
|
813
|
+
</KateCmsUiButton>
|
|
814
|
+
|
|
815
|
+
<span :class="[`${rootClass}__buttons-label`]">Tertiary</span>
|
|
816
|
+
<KateCmsUiButton
|
|
817
|
+
tag="button"
|
|
818
|
+
:variant="['tertiary', 'small']"
|
|
819
|
+
>
|
|
820
|
+
Cancel
|
|
821
|
+
</KateCmsUiButton>
|
|
822
|
+
<KateCmsUiButton
|
|
823
|
+
tag="button"
|
|
824
|
+
variant="tertiary"
|
|
825
|
+
>
|
|
826
|
+
Cancel
|
|
827
|
+
</KateCmsUiButton>
|
|
828
|
+
|
|
829
|
+
<span :class="[`${rootClass}__buttons-label`]">Red</span>
|
|
830
|
+
<KateCmsUiButton
|
|
831
|
+
tag="button"
|
|
832
|
+
:variant="['red', 'small']"
|
|
833
|
+
>
|
|
834
|
+
Remove
|
|
835
|
+
</KateCmsUiButton>
|
|
836
|
+
<KateCmsUiButton
|
|
837
|
+
tag="button"
|
|
838
|
+
variant="red"
|
|
839
|
+
>
|
|
840
|
+
Remove
|
|
841
|
+
</KateCmsUiButton>
|
|
842
|
+
|
|
843
|
+
<span :class="[`${rootClass}__buttons-label`]">Active</span>
|
|
844
|
+
<KateCmsUiButton
|
|
845
|
+
tag="button"
|
|
846
|
+
variant="small"
|
|
847
|
+
active
|
|
848
|
+
>
|
|
849
|
+
Save
|
|
850
|
+
</KateCmsUiButton>
|
|
851
|
+
<KateCmsUiButton
|
|
852
|
+
tag="button"
|
|
853
|
+
active
|
|
854
|
+
>
|
|
855
|
+
Save
|
|
856
|
+
</KateCmsUiButton>
|
|
857
|
+
|
|
858
|
+
<span :class="[`${rootClass}__buttons-label`]">Active secondary</span>
|
|
859
|
+
<KateCmsUiButton
|
|
860
|
+
tag="button"
|
|
861
|
+
:variant="['secondary', 'small']"
|
|
862
|
+
active
|
|
863
|
+
>
|
|
864
|
+
Preview
|
|
865
|
+
</KateCmsUiButton>
|
|
866
|
+
<KateCmsUiButton
|
|
867
|
+
tag="button"
|
|
868
|
+
variant="secondary"
|
|
869
|
+
active
|
|
870
|
+
>
|
|
871
|
+
Preview
|
|
872
|
+
</KateCmsUiButton>
|
|
873
|
+
|
|
874
|
+
<span :class="[`${rootClass}__buttons-label`]">Active tertiary</span>
|
|
875
|
+
<KateCmsUiButton
|
|
876
|
+
tag="button"
|
|
877
|
+
:variant="['tertiary', 'small']"
|
|
878
|
+
active
|
|
879
|
+
>
|
|
880
|
+
Cancel
|
|
881
|
+
</KateCmsUiButton>
|
|
882
|
+
<KateCmsUiButton
|
|
883
|
+
tag="button"
|
|
884
|
+
variant="tertiary"
|
|
885
|
+
active
|
|
886
|
+
>
|
|
887
|
+
Cancel
|
|
888
|
+
</KateCmsUiButton>
|
|
889
|
+
|
|
890
|
+
<span :class="[`${rootClass}__buttons-label`]">Active red</span>
|
|
891
|
+
<KateCmsUiButton
|
|
892
|
+
tag="button"
|
|
893
|
+
:variant="['red', 'small']"
|
|
894
|
+
active
|
|
895
|
+
>
|
|
896
|
+
Remove
|
|
897
|
+
</KateCmsUiButton>
|
|
898
|
+
<KateCmsUiButton
|
|
899
|
+
tag="button"
|
|
900
|
+
variant="red"
|
|
901
|
+
active
|
|
902
|
+
>
|
|
903
|
+
Remove
|
|
904
|
+
</KateCmsUiButton>
|
|
905
|
+
|
|
906
|
+
<span :class="[`${rootClass}__buttons-label`]">With icon</span>
|
|
907
|
+
<KateCmsUiButton
|
|
908
|
+
tag="button"
|
|
909
|
+
variant="small"
|
|
910
|
+
>
|
|
911
|
+
<svg
|
|
912
|
+
viewBox="0 0 24 24"
|
|
913
|
+
fill="none"
|
|
914
|
+
stroke="currentColor"
|
|
915
|
+
stroke-width="2.5"
|
|
916
|
+
stroke-linecap="round"
|
|
917
|
+
stroke-linejoin="round"
|
|
918
|
+
>
|
|
919
|
+
<path d="M12 5v14" />
|
|
920
|
+
<path d="M5 12h14" />
|
|
921
|
+
</svg>
|
|
922
|
+
Add
|
|
923
|
+
</KateCmsUiButton>
|
|
924
|
+
<KateCmsUiButton tag="button">
|
|
925
|
+
<svg
|
|
926
|
+
viewBox="0 0 24 24"
|
|
927
|
+
fill="none"
|
|
928
|
+
stroke="currentColor"
|
|
929
|
+
stroke-width="2.5"
|
|
930
|
+
stroke-linecap="round"
|
|
931
|
+
stroke-linejoin="round"
|
|
932
|
+
>
|
|
933
|
+
<path d="M12 5v14" />
|
|
934
|
+
<path d="M5 12h14" />
|
|
935
|
+
</svg>
|
|
936
|
+
Add
|
|
937
|
+
</KateCmsUiButton>
|
|
938
|
+
|
|
939
|
+
<span :class="[`${rootClass}__buttons-label`]">Secondary icon</span>
|
|
940
|
+
<KateCmsUiButton
|
|
941
|
+
tag="button"
|
|
942
|
+
:variant="['secondary', 'small']"
|
|
943
|
+
>
|
|
944
|
+
<svg
|
|
945
|
+
viewBox="0 0 24 24"
|
|
946
|
+
fill="none"
|
|
947
|
+
stroke="currentColor"
|
|
948
|
+
stroke-width="2"
|
|
949
|
+
stroke-linecap="round"
|
|
950
|
+
stroke-linejoin="round"
|
|
951
|
+
>
|
|
952
|
+
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8Z" />
|
|
953
|
+
<circle
|
|
954
|
+
cx="12"
|
|
955
|
+
cy="12"
|
|
956
|
+
r="3"
|
|
957
|
+
/>
|
|
958
|
+
</svg>
|
|
959
|
+
Preview
|
|
960
|
+
</KateCmsUiButton>
|
|
961
|
+
<KateCmsUiButton
|
|
962
|
+
tag="button"
|
|
963
|
+
variant="secondary"
|
|
964
|
+
>
|
|
965
|
+
<svg
|
|
966
|
+
viewBox="0 0 24 24"
|
|
967
|
+
fill="none"
|
|
968
|
+
stroke="currentColor"
|
|
969
|
+
stroke-width="2"
|
|
970
|
+
stroke-linecap="round"
|
|
971
|
+
stroke-linejoin="round"
|
|
972
|
+
>
|
|
973
|
+
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8Z" />
|
|
974
|
+
<circle
|
|
975
|
+
cx="12"
|
|
976
|
+
cy="12"
|
|
977
|
+
r="3"
|
|
978
|
+
/>
|
|
979
|
+
</svg>
|
|
980
|
+
Preview
|
|
981
|
+
</KateCmsUiButton>
|
|
982
|
+
|
|
983
|
+
<span :class="[`${rootClass}__buttons-label`]">Red icon</span>
|
|
984
|
+
<KateCmsUiButton
|
|
985
|
+
tag="button"
|
|
986
|
+
:variant="['red', 'small']"
|
|
987
|
+
>
|
|
988
|
+
<svg
|
|
989
|
+
viewBox="0 0 24 24"
|
|
990
|
+
fill="none"
|
|
991
|
+
stroke="currentColor"
|
|
992
|
+
stroke-width="2"
|
|
993
|
+
stroke-linecap="round"
|
|
994
|
+
stroke-linejoin="round"
|
|
995
|
+
>
|
|
996
|
+
<path d="M3 6h18" />
|
|
997
|
+
<path d="M8 6V4h8v2" />
|
|
998
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />
|
|
999
|
+
</svg>
|
|
1000
|
+
Remove
|
|
1001
|
+
</KateCmsUiButton>
|
|
1002
|
+
<KateCmsUiButton
|
|
1003
|
+
tag="button"
|
|
1004
|
+
variant="red"
|
|
1005
|
+
>
|
|
1006
|
+
<svg
|
|
1007
|
+
viewBox="0 0 24 24"
|
|
1008
|
+
fill="none"
|
|
1009
|
+
stroke="currentColor"
|
|
1010
|
+
stroke-width="2"
|
|
1011
|
+
stroke-linecap="round"
|
|
1012
|
+
stroke-linejoin="round"
|
|
1013
|
+
>
|
|
1014
|
+
<path d="M3 6h18" />
|
|
1015
|
+
<path d="M8 6V4h8v2" />
|
|
1016
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />
|
|
1017
|
+
</svg>
|
|
1018
|
+
Remove
|
|
1019
|
+
</KateCmsUiButton>
|
|
1020
|
+
|
|
1021
|
+
<span :class="[`${rootClass}__buttons-label`]">Icon only</span>
|
|
1022
|
+
<KateCmsUiButton
|
|
1023
|
+
tag="button"
|
|
1024
|
+
:variant="['tertiary', 'small', 'icon']"
|
|
1025
|
+
aria-label="Edit"
|
|
1026
|
+
>
|
|
1027
|
+
<svg
|
|
1028
|
+
viewBox="0 0 24 24"
|
|
1029
|
+
fill="none"
|
|
1030
|
+
stroke="currentColor"
|
|
1031
|
+
stroke-width="2"
|
|
1032
|
+
stroke-linecap="round"
|
|
1033
|
+
stroke-linejoin="round"
|
|
1034
|
+
>
|
|
1035
|
+
<path d="M12 20h9" />
|
|
1036
|
+
<path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" />
|
|
1037
|
+
</svg>
|
|
1038
|
+
</KateCmsUiButton>
|
|
1039
|
+
<KateCmsUiButton
|
|
1040
|
+
tag="button"
|
|
1041
|
+
:variant="['tertiary', 'icon']"
|
|
1042
|
+
aria-label="Edit"
|
|
1043
|
+
>
|
|
1044
|
+
<svg
|
|
1045
|
+
viewBox="0 0 24 24"
|
|
1046
|
+
fill="none"
|
|
1047
|
+
stroke="currentColor"
|
|
1048
|
+
stroke-width="2"
|
|
1049
|
+
stroke-linecap="round"
|
|
1050
|
+
stroke-linejoin="round"
|
|
1051
|
+
>
|
|
1052
|
+
<path d="M12 20h9" />
|
|
1053
|
+
<path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" />
|
|
1054
|
+
</svg>
|
|
1055
|
+
</KateCmsUiButton>
|
|
1056
|
+
|
|
1057
|
+
<span :class="[`${rootClass}__buttons-label`]">Active icon</span>
|
|
1058
|
+
<KateCmsUiButton
|
|
1059
|
+
tag="button"
|
|
1060
|
+
:variant="['tertiary', 'small', 'icon']"
|
|
1061
|
+
aria-label="Edit"
|
|
1062
|
+
active
|
|
1063
|
+
>
|
|
1064
|
+
<svg
|
|
1065
|
+
viewBox="0 0 24 24"
|
|
1066
|
+
fill="none"
|
|
1067
|
+
stroke="currentColor"
|
|
1068
|
+
stroke-width="2"
|
|
1069
|
+
stroke-linecap="round"
|
|
1070
|
+
stroke-linejoin="round"
|
|
1071
|
+
>
|
|
1072
|
+
<path d="M12 20h9" />
|
|
1073
|
+
<path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" />
|
|
1074
|
+
</svg>
|
|
1075
|
+
</KateCmsUiButton>
|
|
1076
|
+
<KateCmsUiButton
|
|
1077
|
+
tag="button"
|
|
1078
|
+
:variant="['tertiary', 'icon']"
|
|
1079
|
+
aria-label="Edit"
|
|
1080
|
+
active
|
|
1081
|
+
>
|
|
1082
|
+
<svg
|
|
1083
|
+
viewBox="0 0 24 24"
|
|
1084
|
+
fill="none"
|
|
1085
|
+
stroke="currentColor"
|
|
1086
|
+
stroke-width="2"
|
|
1087
|
+
stroke-linecap="round"
|
|
1088
|
+
stroke-linejoin="round"
|
|
1089
|
+
>
|
|
1090
|
+
<path d="M12 20h9" />
|
|
1091
|
+
<path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" />
|
|
1092
|
+
</svg>
|
|
1093
|
+
</KateCmsUiButton>
|
|
1094
|
+
|
|
1095
|
+
<span :class="[`${rootClass}__buttons-label`]">Disabled</span>
|
|
1096
|
+
<KateCmsUiButton
|
|
1097
|
+
tag="button"
|
|
1098
|
+
variant="small"
|
|
1099
|
+
disabled
|
|
1100
|
+
>
|
|
1101
|
+
Save
|
|
1102
|
+
</KateCmsUiButton>
|
|
1103
|
+
<KateCmsUiButton
|
|
1104
|
+
tag="button"
|
|
1105
|
+
disabled
|
|
1106
|
+
>
|
|
1107
|
+
Save
|
|
1108
|
+
</KateCmsUiButton>
|
|
1109
|
+
|
|
1110
|
+
<span :class="[`${rootClass}__buttons-label`]">Link</span>
|
|
1111
|
+
<KateCmsUiButton
|
|
1112
|
+
variant="small"
|
|
1113
|
+
:link="{ url: 'https://example.com', title: 'Example', target: '_blank' }"
|
|
1114
|
+
>
|
|
1115
|
+
Example
|
|
1116
|
+
</KateCmsUiButton>
|
|
1117
|
+
<KateCmsUiButton
|
|
1118
|
+
:link="{ url: 'https://example.com', title: 'Example', target: '_blank' }"
|
|
1119
|
+
>
|
|
1120
|
+
Example
|
|
1121
|
+
</KateCmsUiButton>
|
|
1122
|
+
</div>
|
|
1123
|
+
</div>
|
|
1124
|
+
|
|
1125
|
+
<div :class="[`${rootClass}__notices`]">
|
|
1126
|
+
<div :class="[`${rootClass}__notices-title`]">
|
|
1127
|
+
UiNotice
|
|
1128
|
+
</div>
|
|
1129
|
+
|
|
1130
|
+
<div :class="[`${rootClass}__notices-label`]">
|
|
1131
|
+
Static, one line
|
|
1132
|
+
</div>
|
|
1133
|
+
<div :class="[`${rootClass}__notices-stack`]">
|
|
1134
|
+
<KateCmsUiNotice
|
|
1135
|
+
placement="static"
|
|
1136
|
+
variant="success"
|
|
1137
|
+
message="Changes saved."
|
|
1138
|
+
/>
|
|
1139
|
+
<KateCmsUiNotice
|
|
1140
|
+
placement="static"
|
|
1141
|
+
variant="info"
|
|
1142
|
+
message="A new version of the CMS is available."
|
|
1143
|
+
/>
|
|
1144
|
+
<KateCmsUiNotice
|
|
1145
|
+
placement="static"
|
|
1146
|
+
variant="warning"
|
|
1147
|
+
message="This account has no password set."
|
|
1148
|
+
/>
|
|
1149
|
+
<KateCmsUiNotice
|
|
1150
|
+
placement="static"
|
|
1151
|
+
variant="danger"
|
|
1152
|
+
message="Could not save changes."
|
|
1153
|
+
/>
|
|
1154
|
+
</div>
|
|
1155
|
+
|
|
1156
|
+
<div :class="[`${rootClass}__notices-label`]">
|
|
1157
|
+
Static, two–three lines
|
|
1158
|
+
</div>
|
|
1159
|
+
<div :class="[`${rootClass}__notices-stack`]">
|
|
1160
|
+
<KateCmsUiNotice
|
|
1161
|
+
placement="static"
|
|
1162
|
+
variant="success"
|
|
1163
|
+
>
|
|
1164
|
+
<div>The user was updated.</div>
|
|
1165
|
+
<div>Email, display name and role are stored. You can keep editing this account without leaving the page.</div>
|
|
1166
|
+
</KateCmsUiNotice>
|
|
1167
|
+
<KateCmsUiNotice
|
|
1168
|
+
placement="static"
|
|
1169
|
+
variant="info"
|
|
1170
|
+
>
|
|
1171
|
+
<div>Media variants are generated in the background.</div>
|
|
1172
|
+
<div>Large uploads may take a minute. Refresh the library if a thumbnail is still missing.</div>
|
|
1173
|
+
</KateCmsUiNotice>
|
|
1174
|
+
<KateCmsUiNotice
|
|
1175
|
+
placement="static"
|
|
1176
|
+
variant="warning"
|
|
1177
|
+
>
|
|
1178
|
+
<div>You are editing your own account.</div>
|
|
1179
|
+
<div>Role and status cannot be changed here. Ask another administrator if those fields need an update.</div>
|
|
1180
|
+
</KateCmsUiNotice>
|
|
1181
|
+
<KateCmsUiNotice
|
|
1182
|
+
placement="static"
|
|
1183
|
+
variant="danger"
|
|
1184
|
+
>
|
|
1185
|
+
<div>The form could not be saved.</div>
|
|
1186
|
+
<div>A user with this email already exists. Change the address and try again, or open the existing account instead.</div>
|
|
1187
|
+
</KateCmsUiNotice>
|
|
1188
|
+
</div>
|
|
1189
|
+
</div>
|
|
1190
|
+
|
|
1191
|
+
<div :class="[`${rootClass}__layout`]">
|
|
1192
|
+
<div :class="[`${rootClass}__main`]">
|
|
1193
|
+
<div
|
|
1194
|
+
v-for="[key, field] in mainFields"
|
|
1195
|
+
:key="key"
|
|
1196
|
+
:class="[`${rootClass}__field`]"
|
|
1197
|
+
:style="field.columnWidth ? { width: `${field.columnWidth}%` } : undefined"
|
|
1198
|
+
>
|
|
1199
|
+
<component
|
|
1200
|
+
:is="resolveField(field.type)"
|
|
1201
|
+
v-model="values[key]"
|
|
1202
|
+
:field-key="key"
|
|
1203
|
+
:field="field"
|
|
1204
|
+
/>
|
|
1205
|
+
</div>
|
|
1206
|
+
</div>
|
|
1207
|
+
|
|
1208
|
+
<div
|
|
1209
|
+
v-if="sidebarFields.length"
|
|
1210
|
+
:class="[`${rootClass}__sidebar`]"
|
|
1211
|
+
>
|
|
1212
|
+
<component
|
|
1213
|
+
:is="resolveField(field.type)"
|
|
1214
|
+
v-for="[key, field] in sidebarFields"
|
|
1215
|
+
:key="key"
|
|
1216
|
+
v-model="values[key]"
|
|
1217
|
+
:field-key="key"
|
|
1218
|
+
:field="field"
|
|
1219
|
+
/>
|
|
1220
|
+
</div>
|
|
1221
|
+
</div>
|
|
1222
|
+
|
|
1223
|
+
<div :class="[`${rootClass}__values`]">
|
|
1224
|
+
{{ values }}
|
|
1225
|
+
</div>
|
|
1226
|
+
</div>
|
|
1227
|
+
</template>
|
|
1228
|
+
|
|
1229
|
+
<style scoped lang="scss">
|
|
1230
|
+
@use "../../assets/styles" as *;
|
|
1231
|
+
|
|
1232
|
+
$root: '.katecms-admin-demo';
|
|
1233
|
+
|
|
1234
|
+
@include katecms-wrapper {
|
|
1235
|
+
#{$root} {
|
|
1236
|
+
display: flex;
|
|
1237
|
+
flex-direction: column;
|
|
1238
|
+
gap: math-rem(16);
|
|
1239
|
+
height: 100%;
|
|
1240
|
+
overflow: auto;
|
|
1241
|
+
padding: math-rem(8);
|
|
1242
|
+
|
|
1243
|
+
&__buttons {
|
|
1244
|
+
display: flex;
|
|
1245
|
+
flex-direction: column;
|
|
1246
|
+
gap: math-rem(12);
|
|
1247
|
+
padding: math-rem(16);
|
|
1248
|
+
background-color: $color-surface;
|
|
1249
|
+
border: 1px solid $color-border;
|
|
1250
|
+
border-radius: $border-radius;
|
|
1251
|
+
|
|
1252
|
+
&-title {
|
|
1253
|
+
margin: 0;
|
|
1254
|
+
font-size: math-rem(16);
|
|
1255
|
+
font-weight: 600;
|
|
1256
|
+
color: $color-ink;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
&-grid {
|
|
1260
|
+
display: grid;
|
|
1261
|
+
grid-template-columns: math-rem(140) auto auto;
|
|
1262
|
+
align-items: center;
|
|
1263
|
+
justify-content: start;
|
|
1264
|
+
column-gap: math-rem(12);
|
|
1265
|
+
row-gap: math-rem(10);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
&-label {
|
|
1269
|
+
font-size: math-rem(13);
|
|
1270
|
+
color: $color-muted;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
&__notices {
|
|
1275
|
+
&-title {
|
|
1276
|
+
margin: 0;
|
|
1277
|
+
font-size: math-rem(16);
|
|
1278
|
+
font-weight: 600;
|
|
1279
|
+
color: $color-ink;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
&-label {
|
|
1283
|
+
font-size: math-rem(13);
|
|
1284
|
+
color: $color-muted;
|
|
1285
|
+
|
|
1286
|
+
margin: math-rem(4) 0 0;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
display: flex;
|
|
1290
|
+
flex-direction: column;
|
|
1291
|
+
gap: math-rem(12);
|
|
1292
|
+
padding: math-rem(16);
|
|
1293
|
+
background-color: $color-surface;
|
|
1294
|
+
border: 1px solid $color-border;
|
|
1295
|
+
border-radius: $border-radius;
|
|
1296
|
+
|
|
1297
|
+
&-stack {
|
|
1298
|
+
display: flex;
|
|
1299
|
+
flex-direction: column;
|
|
1300
|
+
gap: math-rem(8);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
&__layout {
|
|
1305
|
+
display: grid;
|
|
1306
|
+
grid-template-columns: minmax(0, 1fr) math-rem(280);
|
|
1307
|
+
gap: math-rem(16);
|
|
1308
|
+
align-items: start;
|
|
1309
|
+
|
|
1310
|
+
@media (max-width: 1100px) {
|
|
1311
|
+
grid-template-columns: 1fr;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
&__main {
|
|
1316
|
+
display: flex;
|
|
1317
|
+
flex-wrap: wrap;
|
|
1318
|
+
row-gap: math-rem(16);
|
|
1319
|
+
margin-left: math-rem(-8);
|
|
1320
|
+
margin-right: math-rem(-8);
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
&__field {
|
|
1324
|
+
padding-left: math-rem(8);
|
|
1325
|
+
padding-right: math-rem(8);
|
|
1326
|
+
width: 100%;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
&__sidebar {
|
|
1330
|
+
display: flex;
|
|
1331
|
+
flex-direction: column;
|
|
1332
|
+
gap: math-rem(16);
|
|
1333
|
+
padding: math-rem(16);
|
|
1334
|
+
background-color: $color-bg;
|
|
1335
|
+
border: 1px solid $color-border;
|
|
1336
|
+
border-radius: $border-radius;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
&__values {
|
|
1340
|
+
flex-shrink: 0;
|
|
1341
|
+
margin: 0;
|
|
1342
|
+
padding: math-rem(12);
|
|
1343
|
+
overflow: auto;
|
|
1344
|
+
background-color: $color-bg;
|
|
1345
|
+
border: 1px solid $color-border;
|
|
1346
|
+
border-radius: $border-radius;
|
|
1347
|
+
color: $color-ink;
|
|
1348
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
1349
|
+
font-size: math-rem(13);
|
|
1350
|
+
white-space: pre-wrap;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
</style>
|