@xleddyl/nuxt-cms 0.9.3 → 0.10.0
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 +1 -1
- package/dist/module.d.mts +20 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1037 -148
- package/dist/runtime/app/blocks/CmsBlocks.d.vue.ts +1 -1
- package/dist/runtime/app/blocks/CmsBlocks.vue +57 -9
- package/dist/runtime/app/blocks/CmsBlocks.vue.d.ts +1 -1
- package/dist/runtime/app/blocks/CmsField.d.ts +24 -0
- package/dist/runtime/app/blocks/CmsField.js +16 -0
- package/dist/runtime/app/blocks/node.d.ts +37 -0
- package/dist/runtime/app/blocks/node.js +17 -0
- package/dist/runtime/app/blocks/resolve.d.ts +18 -0
- package/dist/runtime/app/blocks/resolve.js +34 -0
- package/dist/runtime/app/components/cms/BlockPicker.d.vue.ts +22 -0
- package/dist/runtime/app/components/cms/BlockPicker.vue +87 -0
- package/dist/runtime/app/components/cms/BlockPicker.vue.d.ts +22 -0
- package/dist/runtime/app/components/cms/BlockPickerPopover.d.vue.ts +38 -0
- package/dist/runtime/app/components/cms/BlockPickerPopover.vue +44 -0
- package/dist/runtime/app/components/cms/BlockPickerPopover.vue.d.ts +38 -0
- package/dist/runtime/app/components/cms/BlockTree.d.vue.ts +29 -0
- package/dist/runtime/app/components/cms/BlockTree.vue +322 -0
- package/dist/runtime/app/components/cms/BlockTree.vue.d.ts +29 -0
- package/dist/runtime/app/components/cms/BlocksField.vue +569 -218
- package/dist/runtime/app/components/cms/BrandMark.vue +7 -13
- package/dist/runtime/app/components/cms/ConfirmGroups.vue +15 -13
- package/dist/runtime/app/components/cms/{BlockPalette.vue.d.ts → EditorHistory.d.vue.ts} +6 -5
- package/dist/runtime/app/components/cms/EditorHistory.vue +34 -0
- package/dist/runtime/app/components/cms/{BlockPalette.d.vue.ts → EditorHistory.vue.d.ts} +6 -5
- package/dist/runtime/app/components/cms/EntryDrawer.d.vue.ts +11 -5
- package/dist/runtime/app/components/cms/EntryDrawer.vue +183 -152
- package/dist/runtime/app/components/cms/EntryDrawer.vue.d.ts +11 -5
- package/dist/runtime/app/components/cms/EntryForm.d.vue.ts +16 -4
- package/dist/runtime/app/components/cms/EntryForm.vue +106 -146
- package/dist/runtime/app/components/cms/EntryForm.vue.d.ts +16 -4
- package/dist/runtime/app/components/cms/FieldInput.vue +10 -2
- package/dist/runtime/app/components/cms/FormSections.d.vue.ts +22 -0
- package/dist/runtime/app/components/cms/FormSections.vue +71 -0
- package/dist/runtime/app/components/cms/FormSections.vue.d.ts +22 -0
- package/dist/runtime/app/components/cms/ImportModal.vue +46 -58
- package/dist/runtime/app/components/cms/LinkField.d.vue.ts +16 -0
- package/dist/runtime/app/components/cms/LinkField.vue +250 -0
- package/dist/runtime/app/components/cms/LinkField.vue.d.ts +16 -0
- package/dist/runtime/app/components/cms/ListFilters.vue +10 -12
- package/dist/runtime/app/components/cms/LocaleSwitch.d.vue.ts +2 -1
- package/dist/runtime/app/components/cms/LocaleSwitch.vue +29 -5
- package/dist/runtime/app/components/cms/LocaleSwitch.vue.d.ts +2 -1
- package/dist/runtime/app/components/cms/MediaDetail.d.vue.ts +2 -0
- package/dist/runtime/app/components/cms/MediaDetail.vue +112 -83
- package/dist/runtime/app/components/cms/MediaDetail.vue.d.ts +2 -0
- package/dist/runtime/app/components/cms/MediaField.vue +35 -25
- package/dist/runtime/app/components/cms/MediaFolderPicker.vue +26 -71
- package/dist/runtime/app/components/cms/MediaGallery.d.vue.ts +1 -0
- package/dist/runtime/app/components/cms/MediaGallery.vue +442 -419
- package/dist/runtime/app/components/cms/MediaGallery.vue.d.ts +1 -0
- package/dist/runtime/app/components/cms/MediaThumb.vue +9 -25
- package/dist/runtime/app/components/cms/MediaUpload.vue +1 -1
- package/dist/runtime/app/components/cms/{BlockOutline.d.vue.ts → NestedBlockList.d.vue.ts} +5 -5
- package/dist/runtime/app/components/cms/NestedBlockList.vue +87 -0
- package/dist/runtime/app/components/cms/{BlockOutline.vue.d.ts → NestedBlockList.vue.d.ts} +5 -5
- package/dist/runtime/app/components/cms/PoweredBy.vue +12 -5
- package/dist/runtime/app/components/cms/PresetModal.d.vue.ts +18 -0
- package/dist/runtime/app/components/cms/PresetModal.vue +70 -0
- package/dist/runtime/app/components/cms/PresetModal.vue.d.ts +18 -0
- package/dist/runtime/app/components/cms/RelationField.vue +2 -8
- package/dist/runtime/app/components/cms/SettingsAccount.vue +60 -71
- package/dist/runtime/app/components/cms/SettingsColumns.vue +47 -69
- package/dist/runtime/app/components/cms/SettingsEmptyAdd.d.vue.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsEmptyAdd.vue +21 -0
- package/dist/runtime/app/components/cms/SettingsEmptyAdd.vue.d.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsEntries.d.vue.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsEntries.vue +50 -0
- package/dist/runtime/app/components/cms/SettingsEntries.vue.d.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsEntry.d.vue.ts +1 -10
- package/dist/runtime/app/components/cms/SettingsEntry.vue +11 -95
- package/dist/runtime/app/components/cms/SettingsEntry.vue.d.ts +1 -10
- package/dist/runtime/app/components/cms/SettingsEntryActions.d.vue.ts +7 -0
- package/dist/runtime/app/components/cms/SettingsEntryActions.vue +42 -0
- package/dist/runtime/app/components/cms/SettingsEntryActions.vue.d.ts +7 -0
- package/dist/runtime/app/components/cms/SettingsEntryTabs.d.vue.ts +7 -0
- package/dist/runtime/app/components/cms/SettingsEntryTabs.vue +21 -0
- package/dist/runtime/app/components/cms/SettingsEntryTabs.vue.d.ts +7 -0
- package/dist/runtime/app/components/cms/SettingsFormAction.d.vue.ts +3 -0
- package/dist/runtime/app/components/cms/SettingsFormAction.vue +17 -0
- package/dist/runtime/app/components/cms/SettingsFormAction.vue.d.ts +3 -0
- package/dist/runtime/app/components/cms/SettingsLayout.vue +18 -14
- package/dist/runtime/app/components/cms/SettingsPresetForm.d.vue.ts +11 -0
- package/dist/runtime/app/components/cms/SettingsPresetForm.vue +60 -0
- package/dist/runtime/app/components/cms/SettingsPresetForm.vue.d.ts +11 -0
- package/dist/runtime/app/components/cms/SettingsPresets.d.vue.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsPresets.vue +65 -0
- package/dist/runtime/app/components/cms/SettingsPresets.vue.d.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsRecordActions.d.vue.ts +32 -0
- package/dist/runtime/app/components/cms/SettingsRecordActions.vue +45 -0
- package/dist/runtime/app/components/cms/SettingsRecordActions.vue.d.ts +32 -0
- package/dist/runtime/app/components/cms/SettingsRedirectActions.d.vue.ts +3 -0
- package/dist/runtime/app/components/cms/SettingsRedirectActions.vue +59 -0
- package/dist/runtime/app/components/cms/SettingsRedirectActions.vue.d.ts +3 -0
- package/dist/runtime/app/components/cms/SettingsRedirectForm.d.vue.ts +11 -0
- package/dist/runtime/app/components/cms/SettingsRedirectForm.vue +77 -0
- package/dist/runtime/app/components/cms/SettingsRedirectForm.vue.d.ts +11 -0
- package/dist/runtime/app/components/cms/SettingsRedirects.d.vue.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsRedirects.vue +117 -0
- package/dist/runtime/app/components/cms/SettingsRedirects.vue.d.ts +13 -0
- package/dist/runtime/app/components/cms/SettingsSecretCard.d.vue.ts +17 -0
- package/dist/runtime/app/components/cms/SettingsSecretCard.vue +43 -0
- package/dist/runtime/app/components/cms/SettingsSecretCard.vue.d.ts +17 -0
- package/dist/runtime/app/components/cms/SettingsSite.d.vue.ts +3 -0
- package/dist/runtime/app/components/cms/SettingsSite.vue +140 -0
- package/dist/runtime/app/components/cms/SettingsSite.vue.d.ts +3 -0
- package/dist/runtime/app/components/cms/SettingsUserCreate.d.vue.ts +8 -0
- package/dist/runtime/app/components/cms/SettingsUserCreate.vue +82 -0
- package/dist/runtime/app/components/cms/SettingsUserCreate.vue.d.ts +8 -0
- package/dist/runtime/app/components/cms/SettingsUserDetail.d.vue.ts +11 -0
- package/dist/runtime/app/components/cms/SettingsUserDetail.vue +179 -0
- package/dist/runtime/app/components/cms/SettingsUserDetail.vue.d.ts +11 -0
- package/dist/runtime/app/components/cms/SettingsUsers.d.vue.ts +9 -6
- package/dist/runtime/app/components/cms/SettingsUsers.vue +88 -234
- package/dist/runtime/app/components/cms/SettingsUsers.vue.d.ts +9 -6
- package/dist/runtime/app/components/cms/SharePreview.d.vue.ts +18 -0
- package/dist/runtime/app/components/cms/SharePreview.vue +219 -0
- package/dist/runtime/app/components/cms/SharePreview.vue.d.ts +18 -0
- package/dist/runtime/app/components/cms/SlugField.vue +5 -3
- package/dist/runtime/app/components/cms/StatusBadge.vue +9 -8
- package/dist/runtime/app/components/cms/TranslationBadges.d.vue.ts +7 -0
- package/dist/runtime/app/components/cms/TranslationBadges.vue +45 -0
- package/dist/runtime/app/components/cms/TranslationBadges.vue.d.ts +7 -0
- package/dist/runtime/app/components/cms/TranslationMenu.d.vue.ts +17 -0
- package/dist/runtime/app/components/cms/TranslationMenu.vue +28 -0
- package/dist/runtime/app/components/cms/TranslationMenu.vue.d.ts +17 -0
- package/dist/runtime/app/components/cms/VisualEditor.d.vue.ts +22 -4
- package/dist/runtime/app/components/cms/VisualEditor.vue +1152 -335
- package/dist/runtime/app/components/cms/VisualEditor.vue.d.ts +22 -4
- package/dist/runtime/app/components/cms/WelcomeModal.vue +32 -50
- package/dist/runtime/app/composables/cms-clipboard.d.ts +8 -0
- package/dist/runtime/app/composables/cms-clipboard.js +38 -0
- package/dist/runtime/app/composables/cms-confirm.d.ts +6 -8
- package/dist/runtime/app/composables/cms-confirm.js +5 -7
- package/dist/runtime/app/composables/cms-entry-disabled.d.ts +5 -1
- package/dist/runtime/app/composables/cms-entry-disabled.js +7 -0
- package/dist/runtime/app/composables/cms-entry-form.d.ts +15 -0
- package/dist/runtime/app/composables/cms-entry-form.js +40 -0
- package/dist/runtime/app/composables/cms-entry-settings.d.ts +30 -0
- package/dist/runtime/app/composables/cms-entry-settings.js +122 -0
- package/dist/runtime/app/composables/cms-entry.d.ts +5 -1
- package/dist/runtime/app/composables/cms-entry.js +36 -11
- package/dist/runtime/app/composables/cms-history.d.ts +10 -0
- package/dist/runtime/app/composables/cms-history.js +24 -0
- package/dist/runtime/app/composables/cms-link-targets.d.ts +10 -0
- package/dist/runtime/app/composables/cms-link-targets.js +40 -0
- package/dist/runtime/app/composables/cms-link-usage.d.ts +1 -0
- package/dist/runtime/app/composables/cms-link-usage.js +45 -0
- package/dist/runtime/app/composables/cms-media-library.d.ts +19 -9
- package/dist/runtime/app/composables/cms-media-library.js +31 -13
- package/dist/runtime/app/composables/cms-media-uploader.js +6 -20
- package/dist/runtime/app/composables/cms-permissions.d.ts +18 -0
- package/dist/runtime/app/composables/cms-permissions.js +54 -0
- package/dist/runtime/app/composables/cms-presets.d.ts +11 -0
- package/dist/runtime/app/composables/cms-presets.js +40 -0
- package/dist/runtime/app/composables/cms-preview-mode.d.ts +4 -0
- package/dist/runtime/app/composables/cms-preview-mode.js +8 -0
- package/dist/runtime/app/composables/cms-query.d.ts +3 -0
- package/dist/runtime/app/composables/cms-query.js +45 -20
- package/dist/runtime/app/composables/cms-record-list.d.ts +31 -0
- package/dist/runtime/app/composables/cms-record-list.js +75 -0
- package/dist/runtime/app/composables/cms-route.d.ts +6 -0
- package/dist/runtime/app/composables/cms-route.js +36 -0
- package/dist/runtime/app/composables/cms-runtime.d.ts +1 -0
- package/dist/runtime/app/composables/cms-save-handoff.d.ts +4 -0
- package/dist/runtime/app/composables/cms-save-handoff.js +19 -0
- package/dist/runtime/app/composables/cms-seo.d.ts +12 -0
- package/dist/runtime/app/composables/cms-seo.js +69 -0
- package/dist/runtime/app/composables/cms-settings-form.d.ts +13 -0
- package/dist/runtime/app/composables/cms-settings-form.js +29 -0
- package/dist/runtime/app/composables/cms-settings-sections.d.ts +26 -0
- package/dist/runtime/app/composables/cms-settings-sections.js +181 -0
- package/dist/runtime/app/composables/cms-settings-stores.d.ts +52 -0
- package/dist/runtime/app/composables/cms-settings-stores.js +156 -0
- package/dist/runtime/app/composables/cms-settings.d.ts +3 -3
- package/dist/runtime/app/composables/cms-settings.js +14 -8
- package/dist/runtime/app/composables/cms-site-disabled.d.ts +7 -0
- package/dist/runtime/app/composables/cms-site-disabled.js +8 -0
- package/dist/runtime/app/composables/cms-site.d.ts +7 -0
- package/dist/runtime/app/composables/cms-site.js +22 -0
- package/dist/runtime/app/composables/cms-toast.d.ts +2 -8
- package/dist/runtime/app/composables/cms-toast.js +3 -9
- package/dist/runtime/app/composables/cms-translation-actions.d.ts +15 -0
- package/dist/runtime/app/composables/cms-translation-actions.js +108 -0
- package/dist/runtime/app/css-url.d.ts +4 -0
- package/dist/runtime/app/image/CmsImage.d.vue.ts +89 -0
- package/dist/runtime/app/image/CmsImage.vue +91 -0
- package/dist/runtime/app/image/CmsImage.vue.d.ts +89 -0
- package/dist/runtime/app/layouts/cms-admin.d.vue.ts +2 -2
- package/dist/runtime/app/layouts/cms-admin.vue +98 -76
- package/dist/runtime/app/layouts/cms-admin.vue.d.ts +2 -2
- package/dist/runtime/app/layouts/cms-editor.vue +7 -2
- package/dist/runtime/app/links/CmsLink.d.vue.ts +18 -0
- package/dist/runtime/app/links/CmsLink.vue +18 -0
- package/dist/runtime/app/links/CmsLink.vue.d.ts +18 -0
- package/dist/runtime/app/middleware/cms-auth.js +13 -1
- package/dist/runtime/app/pages/admin-collection.vue +473 -297
- package/dist/runtime/app/pages/admin-content.vue +190 -53
- package/dist/runtime/app/pages/admin-entry.vue +79 -75
- package/dist/runtime/app/pages/admin-index.vue +18 -5
- package/dist/runtime/app/pages/admin-login.vue +1 -1
- package/dist/runtime/app/pages/admin-logout.vue +1 -1
- package/dist/runtime/app/pages/admin-media.vue +3 -3
- package/dist/runtime/app/pages/admin-preview.vue +112 -24
- package/dist/runtime/app/plugins/cms-field.d.ts +2 -0
- package/dist/runtime/app/plugins/cms-field.js +8 -0
- package/dist/runtime/app/plugins/cms-preview-banner.client.d.ts +2 -0
- package/dist/runtime/app/plugins/cms-preview-banner.client.js +19 -0
- package/dist/runtime/app/plugins/cms-preview.d.ts +2 -0
- package/dist/runtime/app/plugins/cms-preview.js +27 -0
- package/dist/runtime/app/preview/CmsPreviewBanner.d.vue.ts +7 -0
- package/dist/runtime/app/preview/CmsPreviewBanner.vue +63 -0
- package/dist/runtime/app/preview/CmsPreviewBanner.vue.d.ts +7 -0
- package/dist/runtime/app/preview/PreviewOverlay.d.vue.ts +17 -3
- package/dist/runtime/app/preview/PreviewOverlay.vue +629 -166
- package/dist/runtime/app/preview/PreviewOverlay.vue.d.ts +17 -3
- package/dist/runtime/app/preview/field-marker.d.ts +12 -0
- package/dist/runtime/app/preview/field-marker.js +20 -0
- package/dist/runtime/app/preview/inline-text.d.ts +15 -0
- package/dist/runtime/app/preview/inline-text.js +158 -0
- package/dist/runtime/app/utils/block-editor.d.ts +22 -0
- package/dist/runtime/app/utils/block-editor.js +12 -0
- package/dist/runtime/app/utils/keyboard.d.ts +6 -0
- package/dist/runtime/app/utils/keyboard.js +52 -0
- package/dist/runtime/app/utils/redirects.d.ts +6 -0
- package/dist/runtime/app/utils/redirects.js +7 -0
- package/dist/runtime/app/utils/ui.d.ts +8 -0
- package/dist/runtime/app/utils/ui.js +15 -1
- package/dist/runtime/app/utils/users.d.ts +15 -0
- package/dist/runtime/app/utils/users.js +14 -0
- package/dist/runtime/assets/cms.css +1 -1
- package/dist/runtime/generate.js +16 -2
- package/dist/runtime/server/api/collection-export.get.js +3 -2
- package/dist/runtime/server/api/collection-import.post.js +39 -11
- package/dist/runtime/server/api/collection.get.js +29 -10
- package/dist/runtime/server/api/collection.post.js +28 -11
- package/dist/runtime/server/api/collection.put.js +35 -13
- package/dist/runtime/server/api/item.delete.js +19 -7
- package/dist/runtime/server/api/item.get.js +3 -2
- package/dist/runtime/server/api/item.put.js +52 -18
- package/dist/runtime/server/api/link-usage.post.d.ts +5 -0
- package/dist/runtime/server/api/link-usage.post.js +21 -0
- package/dist/runtime/server/api/media-delete.post.js +4 -2
- package/dist/runtime/server/api/media-download.get.js +2 -2
- package/dist/runtime/server/api/media-folder.delete.js +8 -2
- package/dist/runtime/server/api/media-folder.patch.js +10 -2
- package/dist/runtime/server/api/media-folder.post.js +4 -2
- package/dist/runtime/server/api/media-move.post.js +7 -4
- package/dist/runtime/server/api/media-presign.post.js +2 -2
- package/dist/runtime/server/api/media-upload.put.js +2 -2
- package/dist/runtime/server/api/media-usage.post.d.ts +2 -4
- package/dist/runtime/server/api/media-usage.post.js +13 -9
- package/dist/runtime/server/api/media.delete.js +4 -2
- package/dist/runtime/server/api/media.get.js +22 -7
- package/dist/runtime/server/api/media.post.js +4 -2
- package/dist/runtime/server/api/media.put.js +33 -16
- package/dist/runtime/server/api/preset.delete.d.ts +4 -0
- package/dist/runtime/server/api/preset.delete.js +9 -0
- package/dist/runtime/server/api/preset.put.d.ts +3 -0
- package/dist/runtime/server/api/preset.put.js +23 -0
- package/dist/runtime/server/api/presets-field.get.d.ts +3 -0
- package/dist/runtime/server/api/presets-field.get.js +13 -0
- package/dist/runtime/server/api/presets-field.post.d.ts +3 -0
- package/dist/runtime/server/api/presets-field.post.js +36 -0
- package/dist/runtime/server/api/presets.get.d.ts +3 -0
- package/dist/runtime/server/api/presets.get.js +7 -0
- package/dist/runtime/server/api/preview-link.delete.d.ts +4 -0
- package/dist/runtime/server/api/preview-link.delete.js +15 -0
- package/dist/runtime/server/api/preview-links.get.d.ts +3 -0
- package/dist/runtime/server/api/preview-links.get.js +10 -0
- package/dist/runtime/server/api/preview-links.post.d.ts +3 -0
- package/dist/runtime/server/api/preview-links.post.js +17 -0
- package/dist/runtime/server/api/preview.get.d.ts +3 -0
- package/dist/runtime/server/api/preview.get.js +7 -0
- package/dist/runtime/server/api/redirect.delete.d.ts +4 -0
- package/dist/runtime/server/api/redirect.delete.js +10 -0
- package/dist/runtime/server/api/redirect.put.d.ts +3 -0
- package/dist/runtime/server/api/redirect.put.js +8 -0
- package/dist/runtime/server/api/redirects-import.post.d.ts +3 -0
- package/dist/runtime/server/api/redirects-import.post.js +13 -0
- package/dist/runtime/server/api/redirects.get.d.ts +3 -0
- package/dist/runtime/server/api/redirects.get.js +7 -0
- package/dist/runtime/server/api/redirects.post.d.ts +3 -0
- package/dist/runtime/server/api/redirects.post.js +7 -0
- package/dist/runtime/server/api/search.get.js +8 -3
- package/dist/runtime/server/api/settings.delete.js +2 -2
- package/dist/runtime/server/api/settings.get.js +4 -2
- package/dist/runtime/server/api/settings.put.js +2 -2
- package/dist/runtime/server/api/site.get.d.ts +3 -0
- package/dist/runtime/server/api/site.get.js +7 -0
- package/dist/runtime/server/api/site.put.d.ts +3 -0
- package/dist/runtime/server/api/site.put.js +16 -0
- package/dist/runtime/server/api/tags.get.js +3 -2
- package/dist/runtime/server/api/user.delete.js +8 -2
- package/dist/runtime/server/api/user.put.js +14 -4
- package/dist/runtime/server/api/users.get.js +2 -2
- package/dist/runtime/server/api/users.post.js +8 -4
- package/dist/runtime/server/middleware/hidden-site.d.ts +2 -0
- package/dist/runtime/server/middleware/hidden-site.js +8 -0
- package/dist/runtime/server/middleware/preview-links.d.ts +2 -0
- package/dist/runtime/server/middleware/preview-links.js +6 -0
- package/dist/runtime/server/middleware/redirects.d.ts +2 -0
- package/dist/runtime/server/middleware/redirects.js +18 -0
- package/dist/runtime/server/plugins/session-validate.js +4 -1
- package/dist/runtime/server/plugins/webhooks.d.ts +3 -0
- package/dist/runtime/server/plugins/webhooks.js +27 -0
- package/dist/runtime/server/routes/graphql.js +5 -3
- package/dist/runtime/server/routes/robots.d.ts +2 -0
- package/dist/runtime/server/routes/robots.js +16 -0
- package/dist/runtime/server/routes/sitemap.d.ts +2 -0
- package/dist/runtime/server/routes/sitemap.js +67 -0
- package/dist/runtime/server/utils/cached-value.d.ts +5 -0
- package/dist/runtime/server/utils/cached-value.js +24 -0
- package/dist/runtime/server/utils/content-routes.d.ts +5 -0
- package/dist/runtime/server/utils/content-routes.js +29 -0
- package/dist/runtime/server/utils/field-rules.d.ts +19 -0
- package/dist/runtime/server/utils/field-rules.js +72 -0
- package/dist/runtime/server/utils/graphql.d.ts +3 -1
- package/dist/runtime/server/utils/graphql.js +145 -29
- package/dist/runtime/server/utils/hooks.d.ts +14 -0
- package/dist/runtime/server/utils/hooks.js +71 -0
- package/dist/runtime/server/utils/import.d.ts +7 -2
- package/dist/runtime/server/utils/import.js +108 -14
- package/dist/runtime/server/utils/link-usage.d.ts +4 -0
- package/dist/runtime/server/utils/link-usage.js +28 -0
- package/dist/runtime/server/utils/media-references.d.ts +6 -1
- package/dist/runtime/server/utils/media-references.js +49 -20
- package/dist/runtime/server/utils/media-usage.d.ts +2 -0
- package/dist/runtime/server/utils/media-usage.js +5 -3
- package/dist/runtime/server/utils/page-rows.d.ts +2 -0
- package/dist/runtime/server/utils/page-rows.js +42 -29
- package/dist/runtime/server/utils/permissions.d.ts +14 -0
- package/dist/runtime/server/utils/permissions.js +43 -0
- package/dist/runtime/server/utils/presets.d.ts +18 -0
- package/dist/runtime/server/utils/presets.js +68 -0
- package/dist/runtime/server/utils/preview-links.d.ts +207 -0
- package/dist/runtime/server/utils/preview-links.js +161 -0
- package/dist/runtime/server/utils/redirects.d.ts +31 -0
- package/dist/runtime/server/utils/redirects.js +240 -0
- package/dist/runtime/server/utils/registry.js +4 -1
- package/dist/runtime/server/utils/relations.d.ts +8 -0
- package/dist/runtime/server/utils/relations.js +25 -6
- package/dist/runtime/server/utils/require-admin.d.ts +0 -1
- package/dist/runtime/server/utils/require-admin.js +4 -8
- package/dist/runtime/server/utils/search.d.ts +1 -0
- package/dist/runtime/server/utils/search.js +44 -19
- package/dist/runtime/server/utils/single-row.d.ts +3 -0
- package/dist/runtime/server/utils/single-row.js +4 -0
- package/dist/runtime/server/utils/site.d.ts +23 -0
- package/dist/runtime/server/utils/site.js +79 -0
- package/dist/runtime/server/utils/sitemap.d.ts +12 -0
- package/dist/runtime/server/utils/sitemap.js +109 -0
- package/dist/runtime/server/utils/user-management.d.ts +4 -0
- package/dist/runtime/server/utils/user-management.js +20 -0
- package/dist/runtime/server/utils/users.d.ts +1 -1
- package/dist/runtime/server/utils/users.js +1 -1
- package/dist/runtime/server/utils/visibility.d.ts +1 -0
- package/dist/runtime/server/utils/visibility.js +6 -1
- package/dist/runtime/server/utils/webhooks.d.ts +24 -0
- package/dist/runtime/server/utils/webhooks.js +90 -0
- package/dist/runtime/shared/block-paths.d.ts +66 -0
- package/dist/runtime/shared/block-paths.js +310 -0
- package/dist/runtime/shared/block-picker.d.ts +18 -0
- package/dist/runtime/shared/block-picker.js +31 -0
- package/dist/runtime/shared/block-signature.d.ts +4 -0
- package/dist/runtime/shared/block-signature.js +46 -0
- package/dist/runtime/shared/clipboard.d.ts +31 -0
- package/dist/runtime/shared/clipboard.js +206 -0
- package/dist/runtime/shared/conditions.d.ts +36 -0
- package/dist/runtime/shared/conditions.js +100 -0
- package/dist/runtime/shared/content-routes.d.ts +42 -0
- package/dist/runtime/shared/content-routes.js +237 -0
- package/dist/runtime/shared/duplicate.js +2 -1
- package/dist/runtime/shared/editor-layout.d.ts +18 -0
- package/dist/runtime/shared/editor-layout.js +9 -0
- package/dist/runtime/shared/field-options.d.ts +21 -0
- package/dist/runtime/shared/field-options.js +90 -0
- package/dist/runtime/shared/graphql-sdl.d.ts +1 -0
- package/dist/runtime/shared/graphql-sdl.js +50 -26
- package/dist/runtime/shared/history.d.ts +27 -0
- package/dist/runtime/shared/history.js +123 -0
- package/dist/runtime/shared/hooks.d.ts +45 -0
- package/dist/runtime/shared/hooks.js +28 -0
- package/dist/runtime/shared/index.d.ts +90 -21
- package/dist/runtime/shared/index.js +121 -37
- package/dist/runtime/shared/inline-text.d.ts +38 -0
- package/dist/runtime/shared/inline-text.js +85 -0
- package/dist/runtime/shared/layout.d.ts +2 -1
- package/dist/runtime/shared/layout.js +3 -0
- package/dist/runtime/shared/links.d.ts +48 -0
- package/dist/runtime/shared/links.js +155 -0
- package/dist/runtime/shared/list-filters.d.ts +2 -0
- package/dist/runtime/shared/list-filters.js +2 -0
- package/dist/runtime/shared/media-focal.d.ts +30 -0
- package/dist/runtime/shared/media-focal.js +52 -0
- package/dist/runtime/shared/migrations-dir.d.ts +14 -0
- package/dist/runtime/shared/migrations-dir.js +48 -2
- package/dist/runtime/shared/presets.d.ts +67 -0
- package/dist/runtime/shared/presets.js +127 -0
- package/dist/runtime/shared/preview-links.d.ts +64 -0
- package/dist/runtime/shared/preview-links.js +54 -0
- package/dist/runtime/shared/preview.d.ts +124 -21
- package/dist/runtime/shared/preview.js +419 -81
- package/dist/runtime/shared/redirects.d.ts +75 -0
- package/dist/runtime/shared/redirects.js +230 -0
- package/dist/runtime/shared/roles.d.ts +57 -0
- package/dist/runtime/shared/roles.js +293 -0
- package/dist/runtime/shared/save-state.d.ts +8 -0
- package/dist/runtime/shared/save-state.js +15 -0
- package/dist/runtime/shared/search.d.ts +16 -1
- package/dist/runtime/shared/search.js +41 -7
- package/dist/runtime/shared/seo.d.ts +167 -0
- package/dist/runtime/shared/seo.js +335 -0
- package/dist/runtime/shared/transfer.js +2 -1
- package/dist/runtime/shared/translations.d.ts +29 -0
- package/dist/runtime/shared/translations.js +123 -0
- package/dist/runtime/shared/users.d.ts +1 -1
- package/dist/runtime/shared/validation.d.ts +23 -1
- package/dist/runtime/shared/validation.js +214 -64
- package/dist/runtime/webhooks.d.ts +33 -0
- package/dist/runtime/webhooks.js +57 -0
- package/dist/types.d.mts +5 -1
- package/package.json +6 -2
- package/dist/runtime/app/components/cms/BlockOutline.vue +0 -88
- package/dist/runtime/app/components/cms/BlockPalette.vue +0 -31
- package/dist/runtime/app/components/cms/SettingsModal.d.vue.ts +0 -12
- package/dist/runtime/app/components/cms/SettingsModal.vue +0 -126
- package/dist/runtime/app/components/cms/SettingsModal.vue.d.ts +0 -12
- package/dist/runtime/app/composables/cms-field-focus.d.ts +0 -4
- package/dist/runtime/app/composables/cms-field-focus.js +0 -20
|
@@ -1,62 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class="cms-settings-item is-draggable"
|
|
11
|
-
:class="{
|
|
12
|
-
'is-dragging': dragging === key,
|
|
13
|
-
'is-drop-before': dropIndex === index && dragging !== key
|
|
14
|
-
}"
|
|
15
|
-
draggable="true"
|
|
16
|
-
@dragstart="onDragStart($event, key)"
|
|
17
|
-
@dragover.prevent="dropIndex = index"
|
|
18
|
-
@drop.prevent="onDrop(index)"
|
|
19
|
-
@dragend="onDragEnd"
|
|
20
|
-
>
|
|
21
|
-
<KIcon :name="cmsIcon('bars-2')" class="cms-settings-grip" />
|
|
22
|
-
<KIcon :name="cmsIcon(iconOf(key))" class="cms-settings-item-icon" />
|
|
23
|
-
<span class="cms-settings-item-label">{{ labelOf(key) }}</span>
|
|
2
|
+
<KStack gap="sm">
|
|
3
|
+
<KFieldMessage
|
|
4
|
+
tone="neutral"
|
|
5
|
+
:icon="false"
|
|
6
|
+
message="Choose the columns of the table. Drag the visible columns to change their order."
|
|
7
|
+
/>
|
|
8
|
+
<KSortableList v-model="visible" label="Visible columns" size="sm">
|
|
9
|
+
<template #trailing="{ item }">
|
|
24
10
|
<KSwitch
|
|
25
11
|
:model-value="true"
|
|
26
|
-
:aria-label="`Hide ${
|
|
12
|
+
:aria-label="`Hide ${item.label}`"
|
|
27
13
|
:disabled="model.length === 1"
|
|
28
|
-
@update:model-value="hide(
|
|
14
|
+
@update:model-value="hide(String(item.value))"
|
|
29
15
|
/>
|
|
30
|
-
</
|
|
31
|
-
|
|
32
|
-
v-if="dragging"
|
|
33
|
-
class="cms-settings-drop-end"
|
|
34
|
-
:class="{ 'is-over': dropIndex === model.length }"
|
|
35
|
-
@dragover.prevent="dropIndex = model.length"
|
|
36
|
-
@drop.prevent="onDrop(model.length)"
|
|
37
|
-
/>
|
|
38
|
-
</ul>
|
|
16
|
+
</template>
|
|
17
|
+
</KSortableList>
|
|
39
18
|
|
|
40
19
|
<template v-if="hidden.length">
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<KIcon :name="cmsIcon(iconOf(key))" class="cms-settings-item-icon" />
|
|
45
|
-
<span class="cms-settings-item-label">{{ labelOf(key) }}</span>
|
|
20
|
+
<KSeparator variant="heading" label="Hidden" :level="3" />
|
|
21
|
+
<KSortableList :model-value="hidden" label="Hidden columns" size="sm" disabled>
|
|
22
|
+
<template #trailing="{ item }">
|
|
46
23
|
<KSwitch
|
|
47
24
|
:model-value="false"
|
|
48
|
-
:aria-label="`Show ${
|
|
49
|
-
@update:model-value="show(
|
|
25
|
+
:aria-label="`Show ${item.label}`"
|
|
26
|
+
@update:model-value="show(String(item.value))"
|
|
50
27
|
/>
|
|
51
|
-
</
|
|
52
|
-
</
|
|
28
|
+
</template>
|
|
29
|
+
</KSortableList>
|
|
53
30
|
</template>
|
|
54
|
-
</
|
|
31
|
+
</KStack>
|
|
55
32
|
</template>
|
|
56
33
|
|
|
57
34
|
<script setup>
|
|
58
|
-
import {
|
|
59
|
-
|
|
35
|
+
import {
|
|
36
|
+
FieldMessage as KFieldMessage,
|
|
37
|
+
Separator as KSeparator,
|
|
38
|
+
SortableList as KSortableList,
|
|
39
|
+
Stack as KStack,
|
|
40
|
+
Switch as KSwitch
|
|
41
|
+
} from "@xleddyl/443-components-vue";
|
|
42
|
+
import { computed } from "#imports";
|
|
43
|
+
import { TRANSLATIONS_COLUMN } from "../../../shared/translations";
|
|
60
44
|
import { cmsIcon, fieldIcon } from "../../utils/ui";
|
|
61
45
|
const props = defineProps({
|
|
62
46
|
fields: { type: Object, required: true },
|
|
@@ -64,13 +48,28 @@ const props = defineProps({
|
|
|
64
48
|
});
|
|
65
49
|
const model = defineModel({ type: Array, ...{ required: true } });
|
|
66
50
|
const available = computed(() => [...Object.keys(props.fields), ...props.extra]);
|
|
67
|
-
|
|
51
|
+
function columnItem(key) {
|
|
52
|
+
return { value: key, label: labelOf(key), icon: cmsIcon(iconOf(key)) };
|
|
53
|
+
}
|
|
54
|
+
const hidden = computed(
|
|
55
|
+
() => available.value.filter((key) => !model.value.includes(key)).map(columnItem)
|
|
56
|
+
);
|
|
57
|
+
const visible = computed({
|
|
58
|
+
get: () => model.value.map(columnItem),
|
|
59
|
+
set: (items) => {
|
|
60
|
+
model.value = items.map((item) => String(item.value));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const EXTRA_COLUMNS = {
|
|
64
|
+
status: { label: "Status", icon: "check-circle" },
|
|
65
|
+
[TRANSLATIONS_COLUMN]: { label: "Translations", icon: "language" }
|
|
66
|
+
};
|
|
68
67
|
function labelOf(key) {
|
|
69
|
-
return props.fields[key]?.label ??
|
|
68
|
+
return props.fields[key]?.label ?? EXTRA_COLUMNS[key]?.label ?? key;
|
|
70
69
|
}
|
|
71
70
|
function iconOf(key) {
|
|
72
71
|
const field = props.fields[key];
|
|
73
|
-
return field ? fieldIcon(field) : "check-circle";
|
|
72
|
+
return field ? fieldIcon(field) : EXTRA_COLUMNS[key]?.icon ?? "check-circle";
|
|
74
73
|
}
|
|
75
74
|
function hide(key) {
|
|
76
75
|
if (model.value.length === 1) return;
|
|
@@ -79,25 +78,4 @@ function hide(key) {
|
|
|
79
78
|
function show(key) {
|
|
80
79
|
model.value = [...model.value, key];
|
|
81
80
|
}
|
|
82
|
-
const dragging = ref(null);
|
|
83
|
-
const dropIndex = ref(null);
|
|
84
|
-
function onDragStart(event, key) {
|
|
85
|
-
dragging.value = key;
|
|
86
|
-
event.dataTransfer?.setData("text/plain", key);
|
|
87
|
-
if (event.dataTransfer) event.dataTransfer.effectAllowed = "move";
|
|
88
|
-
}
|
|
89
|
-
function onDrop(index) {
|
|
90
|
-
const key = dragging.value;
|
|
91
|
-
if (key) {
|
|
92
|
-
const next = model.value.filter((k) => k !== key);
|
|
93
|
-
const from = model.value.indexOf(key);
|
|
94
|
-
next.splice(from < index ? index - 1 : index, 0, key);
|
|
95
|
-
model.value = next;
|
|
96
|
-
}
|
|
97
|
-
onDragEnd();
|
|
98
|
-
}
|
|
99
|
-
function onDragEnd() {
|
|
100
|
-
dragging.value = null;
|
|
101
|
-
dropIndex.value = null;
|
|
102
|
-
}
|
|
103
81
|
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
4
|
+
newLabel: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
open: (page: SettingsModalPage) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onOpen?: ((page: SettingsModalPage) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<KButton
|
|
3
|
+
:icon="cmsIcon(icon)"
|
|
4
|
+
size="sm"
|
|
5
|
+
@click="emit('open', { id: CMS_NEW_RECORD, label: newLabel })"
|
|
6
|
+
>
|
|
7
|
+
{{ label }}
|
|
8
|
+
</KButton>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { Button as KButton } from "@xleddyl/443-components-vue";
|
|
13
|
+
import { CMS_NEW_RECORD } from "../../composables/cms-route";
|
|
14
|
+
import { cmsIcon } from "../../utils/ui";
|
|
15
|
+
defineProps({
|
|
16
|
+
label: { type: String, required: false, default: "Add" },
|
|
17
|
+
newLabel: { type: String, required: true },
|
|
18
|
+
icon: { type: String, required: false, default: "plus" }
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits(["open"]);
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
4
|
+
newLabel: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
open: (page: SettingsModalPage) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onOpen?: ((page: SettingsModalPage) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
page?: SettingsModalPage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
open: (page: SettingsModalPage) => any;
|
|
7
|
+
back: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onOpen?: ((page: SettingsModalPage) => any) | undefined;
|
|
10
|
+
onBack?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CmsSettingsEntry v-if="page && entryNames.includes(page.id)" :key="page.id" :name="page.id" />
|
|
3
|
+
<KRecordList
|
|
4
|
+
v-else
|
|
5
|
+
:items="items"
|
|
6
|
+
label="Content types"
|
|
7
|
+
:empty-icon="cmsIcon('view-columns')"
|
|
8
|
+
empty-text="No content types"
|
|
9
|
+
empty-description="Your role cannot read any content type."
|
|
10
|
+
@row-click="(item2) => open(String(item2.id), item2.title)"
|
|
11
|
+
>
|
|
12
|
+
<template #action="{ item }">
|
|
13
|
+
<KButton
|
|
14
|
+
icon="chevron-right"
|
|
15
|
+
variant="ghost"
|
|
16
|
+
tone="neutral"
|
|
17
|
+
size="sm"
|
|
18
|
+
square
|
|
19
|
+
aria-label="Open"
|
|
20
|
+
@click="open(String(item.id), item.title)"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
</KRecordList>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
import { Button as KButton, RecordList as KRecordList } from "@xleddyl/443-components-vue";
|
|
28
|
+
import { computed, watch } from "#imports";
|
|
29
|
+
import { useCmsEntrySettings, useCmsSettingsEntries } from "../../composables/cms-entry-settings";
|
|
30
|
+
import { cmsIcon } from "../../utils/ui";
|
|
31
|
+
const props = defineProps({
|
|
32
|
+
page: { type: Object, required: false }
|
|
33
|
+
});
|
|
34
|
+
const emit = defineEmits(["open", "back"]);
|
|
35
|
+
const entries = useCmsSettingsEntries();
|
|
36
|
+
const { status } = useCmsEntrySettings(() => props.page?.id);
|
|
37
|
+
const entryNames = computed(() => entries.value.map((entry) => entry.name));
|
|
38
|
+
const items = computed(
|
|
39
|
+
() => entries.value.map((entry) => ({ id: entry.name, title: entry.label, description: entry.kind }))
|
|
40
|
+
);
|
|
41
|
+
watch(
|
|
42
|
+
() => props.page?.id,
|
|
43
|
+
() => {
|
|
44
|
+
status.value = "idle";
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
function open(id, label) {
|
|
48
|
+
emit("open", { id, label });
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
page?: SettingsModalPage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
open: (page: SettingsModalPage) => any;
|
|
7
|
+
back: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onOpen?: ((page: SettingsModalPage) => any) | undefined;
|
|
10
|
+
onBack?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
type Status = 'idle' | 'saving' | 'saved' | 'error';
|
|
2
1
|
type __VLS_Props = {
|
|
3
2
|
name: string;
|
|
4
3
|
};
|
|
5
|
-
|
|
6
|
-
'status'?: Status;
|
|
7
|
-
};
|
|
8
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
"update:status": (value: Status) => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
-
"onUpdate:status"?: ((value: Status) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
5
|
declare const _default: typeof __VLS_export;
|
|
15
6
|
export default _default;
|
|
@@ -1,110 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="cms-settings-entry">
|
|
3
|
-
<
|
|
4
|
-
v-if="
|
|
5
|
-
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:panel-focusable="false"
|
|
11
|
-
>
|
|
12
|
-
<template #panel-columns>
|
|
13
|
-
<CmsSettingsColumns
|
|
14
|
-
:model-value="columns"
|
|
15
|
-
:fields="entry.fields"
|
|
16
|
-
:extra="listExtraColumns(name)"
|
|
17
|
-
@update:model-value="saveColumns"
|
|
18
|
-
/>
|
|
19
|
-
</template>
|
|
20
|
-
<template #panel-layout>
|
|
21
|
-
<CmsSettingsLayout
|
|
22
|
-
:model-value="layout"
|
|
23
|
-
:fields="fields"
|
|
24
|
-
:tabs="entry.tabs"
|
|
25
|
-
@update:model-value="saveLayout"
|
|
26
|
-
/>
|
|
27
|
-
</template>
|
|
28
|
-
</KTabs>
|
|
2
|
+
<div :id="CMS_ENTRY_SETTINGS_PANEL" class="cms-settings-entry">
|
|
3
|
+
<CmsSettingsColumns
|
|
4
|
+
v-if="part === 'columns' && entry"
|
|
5
|
+
:model-value="columns"
|
|
6
|
+
:fields="entry.fields"
|
|
7
|
+
:extra="extraColumns"
|
|
8
|
+
@update:model-value="saveColumns"
|
|
9
|
+
/>
|
|
29
10
|
<CmsSettingsLayout
|
|
30
|
-
v-else
|
|
11
|
+
v-else-if="entry"
|
|
31
12
|
:model-value="layout"
|
|
32
13
|
:fields="fields"
|
|
33
14
|
:tabs="entry.tabs"
|
|
34
15
|
@update:model-value="saveLayout"
|
|
35
16
|
/>
|
|
36
|
-
|
|
37
|
-
<div class="cms-settings-footer">
|
|
38
|
-
<KButton
|
|
39
|
-
label="Reset to default"
|
|
40
|
-
:icon="cmsIcon('arrow-uturn-left')"
|
|
41
|
-
variant="ghost"
|
|
42
|
-
tone="neutral"
|
|
43
|
-
size="sm"
|
|
44
|
-
:disabled="!isCustom"
|
|
45
|
-
@click="resetPart"
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
17
|
</div>
|
|
49
18
|
</template>
|
|
50
19
|
|
|
51
20
|
<script setup>
|
|
52
|
-
import {
|
|
53
|
-
import { computed, ref } from "#imports";
|
|
54
|
-
import cmsConfig from "#cms-config";
|
|
55
|
-
import {
|
|
56
|
-
entryFields,
|
|
57
|
-
entryFormLayout,
|
|
58
|
-
entryListColumns,
|
|
59
|
-
listExtraColumns,
|
|
60
|
-
useCmsSettings
|
|
61
|
-
} from "../../composables/cms-settings";
|
|
62
|
-
import { useCmsToast } from "../../composables/cms-toast";
|
|
63
|
-
import { cmsIcon, errorMessage } from "../../utils/ui";
|
|
21
|
+
import { CMS_ENTRY_SETTINGS_PANEL, useCmsEntrySettings } from "../../composables/cms-entry-settings";
|
|
64
22
|
const props = defineProps({
|
|
65
23
|
name: { type: String, required: true }
|
|
66
24
|
});
|
|
67
|
-
const
|
|
68
|
-
const { settings, save, reset } = useCmsSettings();
|
|
69
|
-
const toast = useCmsToast();
|
|
70
|
-
const entry = computed(() => cmsConfig[props.name]);
|
|
71
|
-
const fields = computed(() => entryFields(props.name));
|
|
72
|
-
const parts = computed(() => [
|
|
73
|
-
...entry.value.kind === "collection" || entry.value.kind === "content" ? [{ value: "columns", label: "Table columns" }] : [],
|
|
74
|
-
{ value: "layout", label: "Form layout" }
|
|
75
|
-
]);
|
|
76
|
-
const activePart = ref(parts.value[0].value);
|
|
77
|
-
const columns = computed(() => entryListColumns(props.name, settings.value));
|
|
78
|
-
const layout = computed(() => entryFormLayout(props.name, settings.value, fields.value));
|
|
79
|
-
const isCustom = computed(() => {
|
|
80
|
-
const saved = settings.value[props.name];
|
|
81
|
-
return activePart.value === "columns" ? !!saved?.columns : !!saved?.layout;
|
|
82
|
-
});
|
|
83
|
-
async function persist(next) {
|
|
84
|
-
status.value = "saving";
|
|
85
|
-
try {
|
|
86
|
-
if (!next.columns && !next.layout) await reset(props.name);
|
|
87
|
-
else await save(props.name, next);
|
|
88
|
-
status.value = "saved";
|
|
89
|
-
} catch (error) {
|
|
90
|
-
status.value = "error";
|
|
91
|
-
toast.add({ title: "Settings not saved", description: errorMessage(error), color: "error" });
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function current() {
|
|
95
|
-
const saved = settings.value[props.name] ?? {};
|
|
96
|
-
return { columns: saved.columns, layout: saved.layout };
|
|
97
|
-
}
|
|
98
|
-
function saveColumns(value) {
|
|
99
|
-
void persist({ ...current(), columns: value });
|
|
100
|
-
}
|
|
101
|
-
function saveLayout(value) {
|
|
102
|
-
void persist({ ...current(), layout: value });
|
|
103
|
-
}
|
|
104
|
-
function resetPart() {
|
|
105
|
-
const next = current();
|
|
106
|
-
if (activePart.value === "columns") next.columns = void 0;
|
|
107
|
-
else next.layout = void 0;
|
|
108
|
-
void persist(next);
|
|
109
|
-
}
|
|
25
|
+
const { entry, part, fields, columns, layout, extraColumns, saveColumns, saveLayout } = useCmsEntrySettings(() => props.name);
|
|
110
26
|
</script>
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
type Status = 'idle' | 'saving' | 'saved' | 'error';
|
|
2
1
|
type __VLS_Props = {
|
|
3
2
|
name: string;
|
|
4
3
|
};
|
|
5
|
-
|
|
6
|
-
'status'?: Status;
|
|
7
|
-
};
|
|
8
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
"update:status": (value: Status) => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
-
"onUpdate:status"?: ((value: Status) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
5
|
declare const _default: typeof __VLS_export;
|
|
15
6
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
page?: SettingsModalPage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="page">
|
|
3
|
+
<KBadge
|
|
4
|
+
:label="ENTRY_SETTINGS_STATUS_LABELS[status]"
|
|
5
|
+
:tone="STATUS_TONES[status]"
|
|
6
|
+
:pulse="status === 'saving'"
|
|
7
|
+
variant="outline"
|
|
8
|
+
dot
|
|
9
|
+
aria-live="polite"
|
|
10
|
+
/>
|
|
11
|
+
<KButton
|
|
12
|
+
variant="soft"
|
|
13
|
+
tone="neutral"
|
|
14
|
+
size="sm"
|
|
15
|
+
:icon="cmsIcon('arrow-uturn-left')"
|
|
16
|
+
:disabled="!isCustom"
|
|
17
|
+
disabled-reason="This part already uses the default"
|
|
18
|
+
@click="resetPart"
|
|
19
|
+
>
|
|
20
|
+
Reset to default
|
|
21
|
+
</KButton>
|
|
22
|
+
</template>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup>
|
|
26
|
+
import { Badge as KBadge, Button as KButton } from "@xleddyl/443-components-vue";
|
|
27
|
+
import {
|
|
28
|
+
ENTRY_SETTINGS_STATUS_LABELS,
|
|
29
|
+
useCmsEntrySettings
|
|
30
|
+
} from "../../composables/cms-entry-settings";
|
|
31
|
+
import { cmsIcon } from "../../utils/ui";
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
page: { type: Object, required: false }
|
|
34
|
+
});
|
|
35
|
+
const STATUS_TONES = {
|
|
36
|
+
idle: "neutral",
|
|
37
|
+
saving: "neutral",
|
|
38
|
+
saved: "success",
|
|
39
|
+
error: "danger"
|
|
40
|
+
};
|
|
41
|
+
const { status, isCustom, resetPart } = useCmsEntrySettings(() => props.page?.id);
|
|
42
|
+
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
page?: SettingsModalPage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
page?: SettingsModalPage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<KTabs
|
|
3
|
+
v-if="page && parts.length > 1"
|
|
4
|
+
:model-value="part"
|
|
5
|
+
:items="parts"
|
|
6
|
+
variant="underline"
|
|
7
|
+
size="sm"
|
|
8
|
+
label="Layout parts"
|
|
9
|
+
:controls="CMS_ENTRY_SETTINGS_PANEL"
|
|
10
|
+
@update:model-value="(value) => part = value"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { Tabs as KTabs } from "@xleddyl/443-components-vue";
|
|
16
|
+
import { CMS_ENTRY_SETTINGS_PANEL, useCmsEntrySettings } from "../../composables/cms-entry-settings";
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
page: { type: Object, required: false }
|
|
19
|
+
});
|
|
20
|
+
const { parts, part } = useCmsEntrySettings(() => props.page?.id);
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SettingsModalPage } from '@xleddyl/443-components-vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
page?: SettingsModalPage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<KButton
|
|
3
|
+
v-if="formAction"
|
|
4
|
+
type="submit"
|
|
5
|
+
size="sm"
|
|
6
|
+
:form="formAction.id"
|
|
7
|
+
:loading="formAction.submitting"
|
|
8
|
+
>
|
|
9
|
+
{{ formAction.label }}
|
|
10
|
+
</KButton>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
import { Button as KButton } from "@xleddyl/443-components-vue";
|
|
15
|
+
import { useCmsSettingsFormAction } from "../../composables/cms-settings-form";
|
|
16
|
+
const formAction = useCmsSettingsFormAction();
|
|
17
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cms-layout-editor" :class="{ 'is-dragging': dragging }">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<KFieldMessage
|
|
4
|
+
tone="neutral"
|
|
5
|
+
:icon="false"
|
|
6
|
+
:message="`Drag a field up or down to move it. Drop it on the side of another field to put them in the same row (up to ${MAX_LAYOUT_ROW_FIELDS}).`"
|
|
7
|
+
/>
|
|
7
8
|
<div class="cms-layout-areas">
|
|
8
9
|
<div v-for="area in AREAS" :key="area.id" class="cms-layout-area" :class="`is-${area.id}`">
|
|
9
|
-
<
|
|
10
|
+
<KCard
|
|
10
11
|
v-if="!model[area.id].some((section2) => section2.rows.length || section2.title)"
|
|
11
|
-
|
|
12
|
-
:
|
|
12
|
+
variant="dashed"
|
|
13
|
+
:title="area.empty"
|
|
14
|
+
:selected="isOver({ type: 'area', area: area.id })"
|
|
15
|
+
:animated="false"
|
|
13
16
|
@dragover.prevent="setTarget({ type: 'area', area: area.id })"
|
|
14
17
|
@drop.prevent="drop"
|
|
15
|
-
|
|
16
|
-
{{ area.empty }}
|
|
17
|
-
</div>
|
|
18
|
+
/>
|
|
18
19
|
<div
|
|
19
20
|
v-for="(section, sectionIndex) in model[area.id]"
|
|
20
21
|
v-else
|
|
@@ -24,9 +25,7 @@
|
|
|
24
25
|
>
|
|
25
26
|
<p v-if="section.title" class="cms-layout-section-title">
|
|
26
27
|
{{ section.title }}
|
|
27
|
-
<KBadge v-if="section.collapsed" size="sm" class="cms-code
|
|
28
|
-
>Collapsed</KBadge
|
|
29
|
-
>
|
|
28
|
+
<KBadge v-if="section.collapsed" size="sm" class="cms-code">Collapsed</KBadge>
|
|
30
29
|
</p>
|
|
31
30
|
<template v-for="(row, rowIndex) in section.rows" :key="row.join('|')">
|
|
32
31
|
<div
|
|
@@ -82,7 +81,12 @@
|
|
|
82
81
|
|
|
83
82
|
<script setup>
|
|
84
83
|
import { MAX_LAYOUT_ROW_FIELDS, fieldTab } from "#nuxt-cms";
|
|
85
|
-
import {
|
|
84
|
+
import {
|
|
85
|
+
Badge as KBadge,
|
|
86
|
+
Card as KCard,
|
|
87
|
+
FieldMessage as KFieldMessage,
|
|
88
|
+
Icon as KIcon
|
|
89
|
+
} from "@xleddyl/443-components-vue";
|
|
86
90
|
import { ref } from "#imports";
|
|
87
91
|
import { cmsIcon, fieldIcon } from "../../utils/ui";
|
|
88
92
|
const AREAS = [{ id: "main", empty: "Drop fields here" }];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CmsBlockPreset } from '../../../shared/presets.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
preset: CmsBlockPreset;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
saved: (preset: CmsBlockPreset) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onSaved?: ((preset: CmsBlockPreset) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|