@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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { CmsImageMedia } from '../../shared/media-focal.js';
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
media: {
|
|
5
|
+
type: PropType<CmsImageMedia | null>;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
alt: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: undefined;
|
|
11
|
+
};
|
|
12
|
+
width: {
|
|
13
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
height: {
|
|
17
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
loading: {
|
|
21
|
+
type: PropType<"lazy" | "eager">;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
decoding: {
|
|
25
|
+
type: PropType<"async" | "auto" | "sync">;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
picture: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
provider: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
modifiers: {
|
|
37
|
+
type: PropType<Record<string, unknown>>;
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
media: {
|
|
42
|
+
type: PropType<CmsImageMedia | null>;
|
|
43
|
+
default: null;
|
|
44
|
+
};
|
|
45
|
+
alt: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
width: {
|
|
50
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
height: {
|
|
54
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
loading: {
|
|
58
|
+
type: PropType<"lazy" | "eager">;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
decoding: {
|
|
62
|
+
type: PropType<"async" | "auto" | "sync">;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
picture: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: boolean;
|
|
68
|
+
};
|
|
69
|
+
provider: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: undefined;
|
|
72
|
+
};
|
|
73
|
+
modifiers: {
|
|
74
|
+
type: PropType<Record<string, unknown>>;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
}>> & Readonly<{}>, {
|
|
78
|
+
media: CmsImageMedia | null;
|
|
79
|
+
alt: string;
|
|
80
|
+
width: string | number;
|
|
81
|
+
height: string | number;
|
|
82
|
+
picture: boolean;
|
|
83
|
+
loading: "lazy" | "eager";
|
|
84
|
+
decoding: "auto" | "async" | "sync";
|
|
85
|
+
provider: string;
|
|
86
|
+
modifiers: Record<string, unknown>;
|
|
87
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
88
|
+
declare const _default: typeof __VLS_export;
|
|
89
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_28: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
3
|
+
default?: (props: typeof __VLS_28) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<KRoot class="
|
|
2
|
+
<KRoot class="is-canvas" document :theme="theme" preset="default">
|
|
3
3
|
<KDashboardLayout
|
|
4
4
|
v-model:open="navOpen"
|
|
5
5
|
class="cms-admin"
|
|
6
|
+
:content="content"
|
|
7
|
+
:loading="navigationPending"
|
|
6
8
|
:navigation="navigation"
|
|
9
|
+
:account="account"
|
|
10
|
+
:settings-sections="settingsSections.navigation.value"
|
|
11
|
+
:settings-presets="false"
|
|
12
|
+
settings-title="Settings"
|
|
13
|
+
:settings-route="true"
|
|
14
|
+
settings-route-location="hash"
|
|
15
|
+
settings-account-section="account"
|
|
16
|
+
settings-hide-session
|
|
17
|
+
:settings-resolve-page="settingsSections.resolvePage"
|
|
7
18
|
:theme-switch="false"
|
|
8
19
|
:collapsible="false"
|
|
9
20
|
:storage-key="false"
|
|
@@ -12,6 +23,7 @@
|
|
|
12
23
|
:search-navigation="false"
|
|
13
24
|
:search-props="searchProps"
|
|
14
25
|
search-label="Search"
|
|
26
|
+
@sign-out="logout"
|
|
15
27
|
>
|
|
16
28
|
<template #brand>
|
|
17
29
|
<CmsBrandMark :subtitle="cmsBrand.subtitle || void 0" />
|
|
@@ -21,55 +33,34 @@
|
|
|
21
33
|
<CmsBrandMark size="sm" />
|
|
22
34
|
</template>
|
|
23
35
|
|
|
24
|
-
<
|
|
25
|
-
<template v-if="hit">
|
|
26
|
-
<KIcon :name="cmsIcon(iconOf(hit))" class="cms-search-option-icon" />
|
|
27
|
-
<span class="cms-search-option-text">
|
|
28
|
-
<template v-if="isValueHit(hit)">
|
|
29
|
-
<span class="cms-search-option-head">
|
|
30
|
-
<span class="cms-search-option-title">{{
|
|
31
|
-
hit.title ?? hit.entryLabel
|
|
32
|
-
}}</span>
|
|
33
|
-
<span v-if="hit.fieldLabel" class="cms-search-option-meta">
|
|
34
|
-
{{ hit.fieldLabel }}
|
|
35
|
-
</span>
|
|
36
|
-
<KBadge v-if="hit.locale" size="sm" class="cms-code-badge">
|
|
37
|
-
{{ hit.locale }}
|
|
38
|
-
</KBadge>
|
|
39
|
-
</span>
|
|
40
|
-
<span class="cms-search-snippet">
|
|
41
|
-
{{ hit.snippet.before
|
|
42
|
-
}}<mark class="cms-search-mark">{{ hit.snippet.match }}</mark
|
|
43
|
-
>{{ hit.snippet.after }}
|
|
44
|
-
</span>
|
|
45
|
-
</template>
|
|
46
|
-
<template v-else>
|
|
47
|
-
<span class="cms-search-option-title">
|
|
48
|
-
{{ hit.snippet.before
|
|
49
|
-
}}<mark class="cms-search-mark">{{ hit.snippet.match }}</mark
|
|
50
|
-
>{{ hit.snippet.after }}
|
|
51
|
-
</span>
|
|
52
|
-
<span class="cms-search-option-meta">{{ labelMeta(hit) }}</span>
|
|
53
|
-
</template>
|
|
54
|
-
</span>
|
|
55
|
-
</template>
|
|
56
|
-
</template>
|
|
36
|
+
<slot />
|
|
57
37
|
|
|
58
|
-
<template #
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
38
|
+
<template #settings-nav-footer>
|
|
39
|
+
<CmsPoweredBy />
|
|
40
|
+
</template>
|
|
41
|
+
<template #settings-account-fields>
|
|
42
|
+
<CmsSettingsAccount />
|
|
43
|
+
</template>
|
|
44
|
+
<template
|
|
45
|
+
v-for="section in settingsSections.views.value"
|
|
46
|
+
#[`settings-section-${section.id}`]="slot"
|
|
47
|
+
>
|
|
48
|
+
<component :is="section.component" v-bind="section.bind?.(slot)" />
|
|
49
|
+
</template>
|
|
50
|
+
<template
|
|
51
|
+
v-for="section in settingsSections.actionViews.value"
|
|
52
|
+
#[`settings-actions-${section.id}`]="slot"
|
|
53
|
+
>
|
|
54
|
+
<component :is="section.actions" v-bind="section.bindActions?.(slot)" />
|
|
55
|
+
</template>
|
|
56
|
+
<template
|
|
57
|
+
v-for="section in settingsSections.tabViews.value"
|
|
58
|
+
#[`settings-tabs-${section.id}`]="slot"
|
|
59
|
+
>
|
|
60
|
+
<component :is="section.tabs" :page="slot.page" />
|
|
67
61
|
</template>
|
|
68
|
-
|
|
69
|
-
<slot />
|
|
70
62
|
</KDashboardLayout>
|
|
71
63
|
|
|
72
|
-
<CmsSettingsModal v-model:open="settingsOpen" @logout="logout" />
|
|
73
64
|
<CmsWelcomeModal />
|
|
74
65
|
<KOverlayHost />
|
|
75
66
|
</KRoot>
|
|
@@ -77,28 +68,40 @@
|
|
|
77
68
|
|
|
78
69
|
<script setup>
|
|
79
70
|
import {
|
|
80
|
-
AccountMenu as KAccountMenu,
|
|
81
|
-
Badge as KBadge,
|
|
82
71
|
DashboardLayout as KDashboardLayout,
|
|
83
|
-
Icon as KIcon,
|
|
84
72
|
OverlayHost as KOverlayHost,
|
|
85
73
|
Root as KRoot,
|
|
74
|
+
provideFormConfig,
|
|
86
75
|
provideTheme
|
|
87
76
|
} from "@xleddyl/443-components-vue";
|
|
77
|
+
import { useNavigationPending } from "@xleddyl/443-components-vue/nuxt/composables";
|
|
88
78
|
import { computed, navigateTo, ref, useRoute, watch } from "#imports";
|
|
89
79
|
import cmsConfig from "#cms-config";
|
|
90
80
|
import { cmsBrand } from "#cms-brand";
|
|
91
81
|
import { CMS_SEARCH_MIN_LENGTH, normalizeSearchQuery } from "../../shared/search";
|
|
92
82
|
import { useCmsTheme } from "../composables/cms-theme";
|
|
93
83
|
import { useCmsAccount } from "../composables/cms-account";
|
|
84
|
+
import { useCmsPermissions } from "../composables/cms-permissions";
|
|
85
|
+
import { provideCmsRouteLocation } from "../composables/cms-route";
|
|
94
86
|
import { loadCmsSettings } from "../composables/cms-settings";
|
|
95
|
-
import {
|
|
87
|
+
import { useCmsSettingsSections } from "../composables/cms-settings-sections";
|
|
88
|
+
import { cmsIcon, cmsSubmitError } from "../utils/ui";
|
|
96
89
|
const route = useRoute();
|
|
97
90
|
const { email, displayName } = useCmsAccount();
|
|
91
|
+
const { can, role, roleLabel } = useCmsPermissions();
|
|
98
92
|
const theme = useCmsTheme();
|
|
99
93
|
provideTheme(theme);
|
|
94
|
+
provideCmsRouteLocation();
|
|
95
|
+
provideFormConfig({ submitError: cmsSubmitError });
|
|
100
96
|
const navOpen = ref(false);
|
|
101
|
-
const
|
|
97
|
+
const navigationPending = useNavigationPending();
|
|
98
|
+
const settingsSections = useCmsSettingsSections();
|
|
99
|
+
const content = computed(() => route.meta.content ?? "fill");
|
|
100
|
+
const account = computed(() => ({
|
|
101
|
+
name: displayName.value,
|
|
102
|
+
email: email.value,
|
|
103
|
+
role: roleLabel(role.value)
|
|
104
|
+
}));
|
|
102
105
|
await loadCmsSettings();
|
|
103
106
|
const GROUPS = [
|
|
104
107
|
{ kind: "collection", title: "Collections", icon: "square-3-stack-3d" },
|
|
@@ -107,20 +110,22 @@ const GROUPS = [
|
|
|
107
110
|
{ kind: "page", title: "Pages", icon: "window" }
|
|
108
111
|
];
|
|
109
112
|
const entries = Object.entries(cmsConfig);
|
|
110
|
-
const navigation =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
113
|
+
const navigation = computed(
|
|
114
|
+
() => [
|
|
115
|
+
...GROUPS.map((group) => ({
|
|
116
|
+
label: group.title,
|
|
117
|
+
items: entries.filter(([name, entry]) => entry.kind === group.kind && can(`${name}.read`)).map(([name, entry]) => ({
|
|
118
|
+
label: entry.label,
|
|
119
|
+
to: `/cms/${name}`,
|
|
120
|
+
icon: cmsIcon(entry.icon ?? group.icon)
|
|
121
|
+
}))
|
|
122
|
+
})),
|
|
123
|
+
{
|
|
124
|
+
label: "Library",
|
|
125
|
+
items: can("media.read") ? [{ label: "Media", to: "/cms/media", icon: cmsIcon("photo") }] : []
|
|
126
|
+
}
|
|
127
|
+
].filter((section) => section.items.length)
|
|
128
|
+
);
|
|
124
129
|
const SEARCH_DEBOUNCE_MS = 180;
|
|
125
130
|
const KIND_LABELS = {
|
|
126
131
|
collection: "Collection",
|
|
@@ -172,6 +177,33 @@ const searchProps = computed(() => ({
|
|
|
172
177
|
function isValueHit(hit) {
|
|
173
178
|
return hit.type === "value" || hit.type === "media";
|
|
174
179
|
}
|
|
180
|
+
function snippetText(hit) {
|
|
181
|
+
const { before, match, after } = hit.snippet;
|
|
182
|
+
return {
|
|
183
|
+
text: `${before}${match}${after}`,
|
|
184
|
+
ranges: [[before.length, before.length + match.length]]
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function hitItem(hit, index) {
|
|
188
|
+
const snippet = snippetText(hit);
|
|
189
|
+
const base = { id: `hit-${index}`, icon: cmsIcon(iconOf(hit)), to: hit.to, data: hit };
|
|
190
|
+
if (!isValueHit(hit)) {
|
|
191
|
+
return {
|
|
192
|
+
...base,
|
|
193
|
+
label: snippet.text,
|
|
194
|
+
description: labelMeta(hit),
|
|
195
|
+
highlight: { label: snippet.ranges }
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
...base,
|
|
200
|
+
label: hit.title ?? hit.entryLabel,
|
|
201
|
+
meta: hit.fieldLabel ?? void 0,
|
|
202
|
+
description: snippet.text,
|
|
203
|
+
badge: hit.locale ? hit.locale.toUpperCase() : void 0,
|
|
204
|
+
highlight: { description: snippet.ranges }
|
|
205
|
+
};
|
|
206
|
+
}
|
|
175
207
|
function iconOf(hit) {
|
|
176
208
|
return hit.type === "entry" ? KIND_ICONS[hit.kind] : TYPE_ICONS[hit.type] ?? "tag";
|
|
177
209
|
}
|
|
@@ -195,12 +227,7 @@ async function search(term, signal) {
|
|
|
195
227
|
group = { id: key, label: hit.entryLabel, description: KIND_LABELS[hit.kind], items: [] };
|
|
196
228
|
groups.set(key, group);
|
|
197
229
|
}
|
|
198
|
-
group.items.push(
|
|
199
|
-
id: `hit-${index}`,
|
|
200
|
-
label: hit.title ?? hit.entryLabel,
|
|
201
|
-
to: hit.to,
|
|
202
|
-
data: hit
|
|
203
|
-
});
|
|
230
|
+
group.items.push(hitItem(hit, index));
|
|
204
231
|
});
|
|
205
232
|
truncated.value = response.truncated;
|
|
206
233
|
return [...groups.values()];
|
|
@@ -211,12 +238,7 @@ watch(
|
|
|
211
238
|
navOpen.value = false;
|
|
212
239
|
}
|
|
213
240
|
);
|
|
214
|
-
function openSettings() {
|
|
215
|
-
navOpen.value = false;
|
|
216
|
-
settingsOpen.value = true;
|
|
217
|
-
}
|
|
218
241
|
async function logout() {
|
|
219
|
-
settingsOpen.value = false;
|
|
220
242
|
await navigateTo("/cms/logout");
|
|
221
243
|
}
|
|
222
244
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_28: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
3
|
+
default?: (props: typeof __VLS_28) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<KRoot class="
|
|
2
|
+
<KRoot class="is-canvas" document :theme="theme" preset="default">
|
|
3
3
|
<slot />
|
|
4
4
|
<KOverlayHost />
|
|
5
5
|
</KRoot>
|
|
@@ -9,12 +9,17 @@
|
|
|
9
9
|
import {
|
|
10
10
|
OverlayHost as KOverlayHost,
|
|
11
11
|
Root as KRoot,
|
|
12
|
+
provideFormConfig,
|
|
12
13
|
provideTheme
|
|
13
14
|
} from "@xleddyl/443-components-vue";
|
|
14
|
-
import {
|
|
15
|
+
import { provideCmsRouteLocation } from "../composables/cms-route";
|
|
15
16
|
import { loadCmsSettings } from "../composables/cms-settings";
|
|
17
|
+
import { useCmsTheme } from "../composables/cms-theme";
|
|
18
|
+
import { cmsSubmitError } from "../utils/ui";
|
|
16
19
|
const theme = useCmsTheme();
|
|
17
20
|
provideTheme(theme);
|
|
21
|
+
provideCmsRouteLocation();
|
|
22
|
+
provideFormConfig({ submitError: cmsSubmitError });
|
|
18
23
|
await loadCmsSettings();
|
|
19
24
|
</script>
|
|
20
25
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CmsLink as CmsLinkData } from '../../shared/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
link?: CmsLinkData | null;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {
|
|
6
|
+
default?: (props: {
|
|
7
|
+
link: CmsLinkData;
|
|
8
|
+
}) => unknown;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: 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>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NuxtLink
|
|
3
|
+
v-if="link?.href"
|
|
4
|
+
:to="link.href"
|
|
5
|
+
:external="link.external || void 0"
|
|
6
|
+
:target="link.newTab ? '_blank' : void 0"
|
|
7
|
+
:rel="link.newTab ? 'noopener noreferrer' : void 0"
|
|
8
|
+
>
|
|
9
|
+
<slot :link="link">{{ link.label ?? link.href }}</slot>
|
|
10
|
+
</NuxtLink>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
defineProps({
|
|
15
|
+
link: { type: [Object, null], required: false }
|
|
16
|
+
});
|
|
17
|
+
defineSlots();
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CmsLink as CmsLinkData } from '../../shared/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
link?: CmsLinkData | null;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {
|
|
6
|
+
default?: (props: {
|
|
7
|
+
link: CmsLinkData;
|
|
8
|
+
}) => unknown;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: 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>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { defineNuxtRouteMiddleware, navigateTo, useUserSession } from "#imports";
|
|
2
|
-
|
|
2
|
+
import { useCmsPermissions } from "../composables/cms-permissions.js";
|
|
3
|
+
function requiredPermission(name, entry, id) {
|
|
4
|
+
if (name === "cms-admin-media") return "media.read";
|
|
5
|
+
if (!entry) return null;
|
|
6
|
+
return id === null && String(name ?? "").endsWith("-new") ? `${entry}.create` : `${entry}.read`;
|
|
7
|
+
}
|
|
8
|
+
export default defineNuxtRouteMiddleware((to) => {
|
|
3
9
|
const { loggedIn } = useUserSession();
|
|
4
10
|
if (!loggedIn.value) {
|
|
5
11
|
return navigateTo("/cms/login");
|
|
6
12
|
}
|
|
13
|
+
const entry = typeof to.meta.cmsEntry === "string" ? to.meta.cmsEntry : typeof to.params.collection === "string" ? to.params.collection : null;
|
|
14
|
+
const id = typeof to.params.id === "string" ? to.params.id : null;
|
|
15
|
+
const permission = requiredPermission(to.name, entry, id);
|
|
16
|
+
if (!permission || useCmsPermissions().can(permission)) return;
|
|
17
|
+
if (permission.endsWith(".create") && entry) return navigateTo(`/cms/${entry}`);
|
|
18
|
+
return navigateTo("/cms");
|
|
7
19
|
});
|