@xleddyl/nuxt-cms 0.9.4 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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 -219
- 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 -147
- 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 +19 -11
- 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 +40 -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 +8 -8
- package/dist/runtime/app/components/cms/TranslationBadges.d.vue.ts +7 -0
- package/dist/runtime/app/components/cms/TranslationBadges.vue +44 -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 +1153 -338
- 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 +191 -54
- 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 +27 -9
- 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 +143 -28
- 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/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,310 @@
|
|
|
1
|
+
export const MAX_BLOCKS_DEPTH = 3;
|
|
2
|
+
const FIELD_SEGMENT = /^[a-z_]\w*$/i;
|
|
3
|
+
const INDEX_SEGMENT = /^\d+$/;
|
|
4
|
+
function isRecord(value) {
|
|
5
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function isFieldSegment(segment) {
|
|
8
|
+
return typeof segment === "string" && FIELD_SEGMENT.test(segment);
|
|
9
|
+
}
|
|
10
|
+
function isIndexSegment(segment) {
|
|
11
|
+
return typeof segment === "number" && Number.isInteger(segment) && segment >= 0;
|
|
12
|
+
}
|
|
13
|
+
function isAlternating(path) {
|
|
14
|
+
return path.every(
|
|
15
|
+
(segment, position) => position % 2 === 0 ? isFieldSegment(segment) : isIndexSegment(segment)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export function isBlockItemPath(path) {
|
|
19
|
+
return path.length >= 2 && path.length % 2 === 0 && isAlternating(path);
|
|
20
|
+
}
|
|
21
|
+
export function isBlockListPath(path) {
|
|
22
|
+
return path.length >= 1 && path.length % 2 === 1 && isAlternating(path);
|
|
23
|
+
}
|
|
24
|
+
export function formatBlockPath(path) {
|
|
25
|
+
return path.join(".");
|
|
26
|
+
}
|
|
27
|
+
export function blockReferenceLabel(path, fieldKey) {
|
|
28
|
+
const base = path.map((segment) => typeof segment === "number" ? `[${segment}]` : `.${segment}`).join("").replace(/^\./, "");
|
|
29
|
+
return fieldKey ? `${base}.${fieldKey}` : base;
|
|
30
|
+
}
|
|
31
|
+
export function parseBlockPath(text) {
|
|
32
|
+
if (typeof text !== "string" || !text) return null;
|
|
33
|
+
const path = text.split(".").map((segment) => INDEX_SEGMENT.test(segment) ? Number(segment) : segment);
|
|
34
|
+
return isAlternating(path) ? path : null;
|
|
35
|
+
}
|
|
36
|
+
export function blockPathDepth(path) {
|
|
37
|
+
return Math.ceil(path.length / 2);
|
|
38
|
+
}
|
|
39
|
+
export function blockListPath(itemPath) {
|
|
40
|
+
return itemPath.slice(0, -1);
|
|
41
|
+
}
|
|
42
|
+
export function blockPathIndex(itemPath) {
|
|
43
|
+
const last = itemPath.at(-1);
|
|
44
|
+
return isIndexSegment(last) ? last : -1;
|
|
45
|
+
}
|
|
46
|
+
export function parentBlockPath(path) {
|
|
47
|
+
const list = path.length % 2 === 0 ? path.slice(0, -1) : path;
|
|
48
|
+
return list.length >= 3 ? list.slice(0, -1) : null;
|
|
49
|
+
}
|
|
50
|
+
export function childBlockPath(itemPath, fieldKey, index) {
|
|
51
|
+
return index === void 0 ? [...itemPath, fieldKey] : [...itemPath, fieldKey, index];
|
|
52
|
+
}
|
|
53
|
+
export function blockPathStartsWith(path, prefix) {
|
|
54
|
+
return prefix.length <= path.length && prefix.every((segment, i) => path[i] === segment);
|
|
55
|
+
}
|
|
56
|
+
export function sameBlockPath(a, b) {
|
|
57
|
+
if (!a || !b) return a === b;
|
|
58
|
+
return a.length === b.length && blockPathStartsWith(a, b);
|
|
59
|
+
}
|
|
60
|
+
function locateList(fields, values, listPath) {
|
|
61
|
+
if (!isBlockListPath(listPath)) return null;
|
|
62
|
+
const schemaPath = [];
|
|
63
|
+
let scope = fields;
|
|
64
|
+
let current = values;
|
|
65
|
+
for (let position = 0; position < listPath.length; position += 2) {
|
|
66
|
+
const key = listPath[position];
|
|
67
|
+
const field = Object.hasOwn(scope, key) ? scope[key] : void 0;
|
|
68
|
+
if (field?.type !== "blocks") return null;
|
|
69
|
+
schemaPath.push(key);
|
|
70
|
+
if (position === listPath.length - 1) return { field, schemaPath };
|
|
71
|
+
const list = isRecord(current) ? current[key] : void 0;
|
|
72
|
+
const item = Array.isArray(list) ? list[listPath[position + 1]] : void 0;
|
|
73
|
+
const block = isRecord(item) ? field.blocks?.[String(item.type)] : void 0;
|
|
74
|
+
if (!block || !isRecord(item)) return null;
|
|
75
|
+
schemaPath.push(String(item.type));
|
|
76
|
+
scope = block.fields;
|
|
77
|
+
current = item;
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
export function blocksFieldAt(fields, values, listPath) {
|
|
82
|
+
return locateList(fields, values, listPath)?.field ?? null;
|
|
83
|
+
}
|
|
84
|
+
export function blockSchemaPath(fields, values, path) {
|
|
85
|
+
return locateList(fields, values, path.length % 2 === 0 ? path.slice(0, -1) : path)?.schemaPath ?? null;
|
|
86
|
+
}
|
|
87
|
+
export function blockListAt(values, listPath) {
|
|
88
|
+
if (!isBlockListPath(listPath)) return null;
|
|
89
|
+
let current = values;
|
|
90
|
+
for (let position = 0; position < listPath.length; position++) {
|
|
91
|
+
const segment = listPath[position];
|
|
92
|
+
if (position % 2 === 0) {
|
|
93
|
+
if (!isRecord(current)) return null;
|
|
94
|
+
current = current[segment];
|
|
95
|
+
} else {
|
|
96
|
+
current = Array.isArray(current) ? current[segment] : void 0;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return Array.isArray(current) ? current : null;
|
|
100
|
+
}
|
|
101
|
+
export function blockAt(values, itemPath) {
|
|
102
|
+
if (!isBlockItemPath(itemPath)) return null;
|
|
103
|
+
const item = blockListAt(values, blockListPath(itemPath))?.[blockPathIndex(itemPath)];
|
|
104
|
+
return isRecord(item) ? item : null;
|
|
105
|
+
}
|
|
106
|
+
export function resolveBlockPath(fields, values, itemPath) {
|
|
107
|
+
const item = blockAt(values, itemPath);
|
|
108
|
+
const field = item ? blocksFieldAt(fields, values, blockListPath(itemPath)) : null;
|
|
109
|
+
if (!item || !field) return null;
|
|
110
|
+
return {
|
|
111
|
+
path: itemPath,
|
|
112
|
+
index: blockPathIndex(itemPath),
|
|
113
|
+
depth: blockPathDepth(itemPath),
|
|
114
|
+
item,
|
|
115
|
+
field,
|
|
116
|
+
block: field.blocks?.[String(item.type)]
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function updateIn(current, path, update) {
|
|
120
|
+
if (!path.length) {
|
|
121
|
+
const next2 = update(Array.isArray(current) ? current : []);
|
|
122
|
+
return next2 && next2.length ? next2 : null;
|
|
123
|
+
}
|
|
124
|
+
const [segment, ...rest] = path;
|
|
125
|
+
if (typeof segment === "string") {
|
|
126
|
+
if (!isRecord(current)) return current;
|
|
127
|
+
const next2 = updateIn(current[segment], rest, update);
|
|
128
|
+
return next2 === current[segment] ? current : { ...current, [segment]: next2 };
|
|
129
|
+
}
|
|
130
|
+
if (!Array.isArray(current) || !isRecord(current[segment])) return current;
|
|
131
|
+
const next = updateIn(current[segment], rest, update);
|
|
132
|
+
if (next === current[segment]) return current;
|
|
133
|
+
const copy = [...current];
|
|
134
|
+
copy[segment] = next;
|
|
135
|
+
return copy;
|
|
136
|
+
}
|
|
137
|
+
export function updateBlockList(values, listPath, update) {
|
|
138
|
+
if (!isBlockListPath(listPath)) return values;
|
|
139
|
+
return updateIn(values, listPath, update);
|
|
140
|
+
}
|
|
141
|
+
export function updateBlockAt(values, itemPath, update) {
|
|
142
|
+
if (!blockAt(values, itemPath)) return values;
|
|
143
|
+
const index = blockPathIndex(itemPath);
|
|
144
|
+
return updateBlockList(values, blockListPath(itemPath), (list) => {
|
|
145
|
+
const next = [...list];
|
|
146
|
+
next[index] = update(list[index]);
|
|
147
|
+
return next;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
export function insertBlocks(values, listPath, index, items) {
|
|
151
|
+
if (!items.length) return values;
|
|
152
|
+
if (listPath.length > 1 && !blockAt(values, listPath.slice(0, -1))) return values;
|
|
153
|
+
return updateBlockList(values, listPath, (list) => {
|
|
154
|
+
const next = [...list];
|
|
155
|
+
next.splice(Math.min(Math.max(index, 0), list.length), 0, ...items);
|
|
156
|
+
return next;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
export function removeBlock(values, itemPath) {
|
|
160
|
+
if (!blockAt(values, itemPath)) return values;
|
|
161
|
+
const index = blockPathIndex(itemPath);
|
|
162
|
+
return updateBlockList(
|
|
163
|
+
values,
|
|
164
|
+
blockListPath(itemPath),
|
|
165
|
+
(list) => list.filter((_, position) => position !== index)
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
export function pathAfterRemove(path, removed) {
|
|
169
|
+
const list = blockListPath(removed);
|
|
170
|
+
const index = blockPathIndex(removed);
|
|
171
|
+
if (path.length <= list.length || !blockPathStartsWith(path, list)) return path;
|
|
172
|
+
const position = path[list.length];
|
|
173
|
+
if (position === index) return null;
|
|
174
|
+
if (position < index) return path;
|
|
175
|
+
const next = [...path];
|
|
176
|
+
next[list.length] = position - 1;
|
|
177
|
+
return next;
|
|
178
|
+
}
|
|
179
|
+
export function pathAfterInsert(path, listPath, index, count = 1) {
|
|
180
|
+
if (path.length <= listPath.length || !blockPathStartsWith(path, listPath)) return path;
|
|
181
|
+
const position = path[listPath.length];
|
|
182
|
+
if (position < index) return path;
|
|
183
|
+
const next = [...path];
|
|
184
|
+
next[listPath.length] = position + count;
|
|
185
|
+
return next;
|
|
186
|
+
}
|
|
187
|
+
export function movedBlockPath(from, toList, toIndex) {
|
|
188
|
+
if (!isBlockItemPath(from) || !isBlockListPath(toList)) return null;
|
|
189
|
+
if (blockPathStartsWith(toList, from)) return null;
|
|
190
|
+
const fromList = blockListPath(from);
|
|
191
|
+
const fromIndex = blockPathIndex(from);
|
|
192
|
+
const target = pathAfterRemove(toList, from);
|
|
193
|
+
if (!target) return null;
|
|
194
|
+
const sameList = sameBlockPath(fromList, toList);
|
|
195
|
+
const index = Math.max(sameList && toIndex > fromIndex ? toIndex - 1 : toIndex, 0);
|
|
196
|
+
if (sameList && index === fromIndex) return null;
|
|
197
|
+
return [...target, index];
|
|
198
|
+
}
|
|
199
|
+
export function pathAfterMove(path, from, toList, toIndex) {
|
|
200
|
+
const moved = movedBlockPath(from, toList, toIndex);
|
|
201
|
+
if (!moved) return path;
|
|
202
|
+
if (blockPathStartsWith(path, from)) return [...moved, ...path.slice(from.length)];
|
|
203
|
+
const removed = pathAfterRemove(path, from) ?? path;
|
|
204
|
+
return pathAfterInsert(removed, blockListPath(moved), blockPathIndex(moved));
|
|
205
|
+
}
|
|
206
|
+
export function remapInsertionPoint(point, remap) {
|
|
207
|
+
const slot = remap([...point.list, point.index]);
|
|
208
|
+
if (slot) return { list: blockListPath(slot), index: blockPathIndex(slot) };
|
|
209
|
+
if (point.list.length <= 1) return point;
|
|
210
|
+
const owner = remap(point.list.slice(0, -1));
|
|
211
|
+
return owner ? { list: [...owner, point.list.at(-1)], index: point.index } : null;
|
|
212
|
+
}
|
|
213
|
+
export function moveBlock(values, from, toList, toIndex) {
|
|
214
|
+
const item = blockAt(values, from);
|
|
215
|
+
const moved = item ? movedBlockPath(from, toList, toIndex) : null;
|
|
216
|
+
if (!item || !moved) return values;
|
|
217
|
+
const target = blockListPath(moved);
|
|
218
|
+
const removed = removeBlock(values, from);
|
|
219
|
+
if (target.length > 1 && !blockAt(removed, target.slice(0, -1))) return values;
|
|
220
|
+
return insertBlocks(removed, target, blockPathIndex(moved), [item]);
|
|
221
|
+
}
|
|
222
|
+
export function walkBlocks(fields, values, visit, prefix = [], schemaPrefix = []) {
|
|
223
|
+
if (!isRecord(values)) return;
|
|
224
|
+
for (const [key, field] of Object.entries(fields)) {
|
|
225
|
+
if (field?.type !== "blocks") continue;
|
|
226
|
+
const list = values[key];
|
|
227
|
+
if (!Array.isArray(list)) continue;
|
|
228
|
+
const schemaPath = [...schemaPrefix, key];
|
|
229
|
+
list.forEach((item, index) => {
|
|
230
|
+
if (!isRecord(item)) return;
|
|
231
|
+
const block = field.blocks?.[String(item.type)];
|
|
232
|
+
if (!block) return;
|
|
233
|
+
const path = [...prefix, key, index];
|
|
234
|
+
const descend = visit({
|
|
235
|
+
item,
|
|
236
|
+
block,
|
|
237
|
+
field,
|
|
238
|
+
path,
|
|
239
|
+
schemaPath,
|
|
240
|
+
index,
|
|
241
|
+
depth: blockPathDepth(path)
|
|
242
|
+
});
|
|
243
|
+
if (descend === false) return;
|
|
244
|
+
walkBlocks(block.fields, item, visit, path, [...schemaPath, String(item.type)]);
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
export function blocksFieldAtSchemaPath(fields, schemaPath) {
|
|
249
|
+
const segments = typeof schemaPath === "string" ? schemaPath.split(".") : schemaPath;
|
|
250
|
+
if (!segments.length || segments.length % 2 === 0) return null;
|
|
251
|
+
let scope = fields;
|
|
252
|
+
for (let position = 0; position < segments.length; position += 2) {
|
|
253
|
+
const key = segments[position];
|
|
254
|
+
const field = Object.hasOwn(scope, key) ? scope[key] : void 0;
|
|
255
|
+
if (field?.type !== "blocks") return null;
|
|
256
|
+
if (position === segments.length - 1) return field;
|
|
257
|
+
const type = segments[position + 1];
|
|
258
|
+
const block = field.blocks && Object.hasOwn(field.blocks, type) ? field.blocks[type] : void 0;
|
|
259
|
+
if (!block) return null;
|
|
260
|
+
scope = block.fields;
|
|
261
|
+
}
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
export function blocksFieldPaths(fields, prefix = []) {
|
|
265
|
+
const found = [];
|
|
266
|
+
for (const [key, field] of Object.entries(fields)) {
|
|
267
|
+
if (field?.type !== "blocks" || field.private) continue;
|
|
268
|
+
const schemaPath = [...prefix, key];
|
|
269
|
+
found.push({ field, schemaPath, depth: Math.ceil(schemaPath.length / 2) });
|
|
270
|
+
for (const [blockName, block] of Object.entries(field.blocks ?? {})) {
|
|
271
|
+
found.push(...blocksFieldPaths(block?.fields ?? {}, [...schemaPath, blockName]));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return found;
|
|
275
|
+
}
|
|
276
|
+
export function mapBlocks(field, value, map) {
|
|
277
|
+
if (!Array.isArray(value)) return value;
|
|
278
|
+
const result = [];
|
|
279
|
+
for (const item of value) {
|
|
280
|
+
if (!isRecord(item)) {
|
|
281
|
+
result.push(item);
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
const block = field.blocks?.[String(item.type)];
|
|
285
|
+
const mapped = map(item, block, field);
|
|
286
|
+
if (!mapped) continue;
|
|
287
|
+
let next = mapped;
|
|
288
|
+
for (const [key, subfield] of Object.entries(block?.fields ?? {})) {
|
|
289
|
+
if (subfield.type !== "blocks" || !Array.isArray(next[key])) continue;
|
|
290
|
+
const nested = mapBlocks(subfield, next[key], map);
|
|
291
|
+
if (nested === next[key]) continue;
|
|
292
|
+
if (next === item) next = { ...item };
|
|
293
|
+
next[key] = nested;
|
|
294
|
+
}
|
|
295
|
+
result.push(next);
|
|
296
|
+
}
|
|
297
|
+
return result;
|
|
298
|
+
}
|
|
299
|
+
export function hasNestedBlocks(field) {
|
|
300
|
+
return Object.values(field.blocks ?? {}).some(
|
|
301
|
+
(block) => Object.values(block?.fields ?? {}).some((subfield) => subfield?.type === "blocks")
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
export function blockFieldsDeep(field) {
|
|
305
|
+
return Object.values(field.blocks ?? {}).flatMap(
|
|
306
|
+
(block) => Object.values(block?.fields ?? {}).flatMap(
|
|
307
|
+
(subfield) => subfield?.type === "blocks" ? [subfield, ...blockFieldsDeep(subfield)] : [subfield]
|
|
308
|
+
)
|
|
309
|
+
);
|
|
310
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BlockConfig } from './index.js';
|
|
2
|
+
export declare const CMS_BLOCK_PICKER_OTHER_GROUP = "Other";
|
|
3
|
+
export declare const CMS_BLOCK_ICON = "rectangle-stack";
|
|
4
|
+
export interface CmsBlockPickerItem {
|
|
5
|
+
type: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
keywords: string[];
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
disabledReason?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CmsBlockPickerGroup {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string | null;
|
|
16
|
+
items: CmsBlockPickerItem[];
|
|
17
|
+
}
|
|
18
|
+
export declare function blockPickerGroups(blocks: Record<string, BlockConfig>, disabledReason?: (type: string) => string | undefined): CmsBlockPickerGroup[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const CMS_BLOCK_PICKER_OTHER_GROUP = "Other";
|
|
2
|
+
export const CMS_BLOCK_ICON = "rectangle-stack";
|
|
3
|
+
export function blockPickerGroups(blocks, disabledReason = () => void 0) {
|
|
4
|
+
const entries = Object.entries(blocks);
|
|
5
|
+
const grouped = entries.some(([, block]) => !!block.group?.trim());
|
|
6
|
+
const groups = /* @__PURE__ */ new Map();
|
|
7
|
+
const other = {
|
|
8
|
+
id: "",
|
|
9
|
+
label: grouped ? CMS_BLOCK_PICKER_OTHER_GROUP : null,
|
|
10
|
+
items: []
|
|
11
|
+
};
|
|
12
|
+
for (const [type, block] of entries) {
|
|
13
|
+
const name = block.group?.trim();
|
|
14
|
+
let group = other;
|
|
15
|
+
if (name) {
|
|
16
|
+
group = groups.get(name) ?? { id: name, label: name, items: [] };
|
|
17
|
+
groups.set(name, group);
|
|
18
|
+
}
|
|
19
|
+
const reason = disabledReason(type) || void 0;
|
|
20
|
+
group.items.push({
|
|
21
|
+
type,
|
|
22
|
+
label: block.label,
|
|
23
|
+
description: block.description || void 0,
|
|
24
|
+
icon: block.icon ?? CMS_BLOCK_ICON,
|
|
25
|
+
keywords: [type, ...name ? [name] : [], ...block.tags ?? []],
|
|
26
|
+
disabled: !!reason,
|
|
27
|
+
...reason ? { disabledReason: reason } : {}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return [...groups.values(), other].filter((group) => group.items.length);
|
|
31
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BlockConfig } from './index.js';
|
|
2
|
+
export declare function blockShape(block: Pick<BlockConfig, 'fields'>): string;
|
|
3
|
+
export declare function blockSignature(block: Pick<BlockConfig, 'fields'>): string;
|
|
4
|
+
export declare function blockSignatures(blocks: Record<string, Pick<BlockConfig, 'fields'>> | undefined, types: readonly string[]): Record<string, string>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { isTranslatableField, mediaTypeFilter, selectOptionValues } from "./index.js";
|
|
2
|
+
function fieldShape(key, field) {
|
|
3
|
+
const shape = [key, field.type];
|
|
4
|
+
if (isTranslatableField(field)) shape.push("translatable");
|
|
5
|
+
if (field.type === "number" && field.integer) shape.push("integer");
|
|
6
|
+
if (field.type === "select") {
|
|
7
|
+
if (field.multiple) shape.push("multiple");
|
|
8
|
+
shape.push({ options: [...new Set(selectOptionValues(field))].sort() });
|
|
9
|
+
}
|
|
10
|
+
if (field.type === "media")
|
|
11
|
+
shape.push({ mediaType: mediaTypeFilter(field.mediaType)?.sort() ?? null });
|
|
12
|
+
if (field.type === "blocks") {
|
|
13
|
+
const blocks = field.blocks ?? {};
|
|
14
|
+
shape.push({
|
|
15
|
+
blocks: Object.keys(blocks).sort().map((name) => [name, blockFieldShapes(blocks[name])])
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return shape;
|
|
19
|
+
}
|
|
20
|
+
function blockFieldShapes(block) {
|
|
21
|
+
return Object.keys(block.fields).sort().map((key) => fieldShape(key, block.fields[key]));
|
|
22
|
+
}
|
|
23
|
+
export function blockShape(block) {
|
|
24
|
+
return JSON.stringify(blockFieldShapes(block));
|
|
25
|
+
}
|
|
26
|
+
function hashText(text) {
|
|
27
|
+
let first = 2166136261;
|
|
28
|
+
let second = 2538058380;
|
|
29
|
+
for (let index = 0; index < text.length; index++) {
|
|
30
|
+
const code = text.charCodeAt(index);
|
|
31
|
+
first = Math.imul(first ^ code, 16777619);
|
|
32
|
+
second = Math.imul(second ^ code, 1540483477);
|
|
33
|
+
second ^= second >>> 15;
|
|
34
|
+
}
|
|
35
|
+
const hex = (value) => (value >>> 0).toString(16).padStart(8, "0");
|
|
36
|
+
return `${hex(first)}${hex(second)}`;
|
|
37
|
+
}
|
|
38
|
+
export function blockSignature(block) {
|
|
39
|
+
return hashText(blockShape(block));
|
|
40
|
+
}
|
|
41
|
+
export function blockSignatures(blocks, types) {
|
|
42
|
+
const available = blocks ?? {};
|
|
43
|
+
return Object.fromEntries(
|
|
44
|
+
types.filter((type) => Object.hasOwn(available, type)).map((type) => [type, blockSignature(available[type])])
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BlockConfig, CmsI18n, FieldConfig } from './index.js';
|
|
2
|
+
import type { CmsBlockValue } from './preview.js';
|
|
3
|
+
export declare const CMS_CLIPBOARD_KIND = "blocks";
|
|
4
|
+
export declare const CMS_CLIPBOARD_VERSION = 1;
|
|
5
|
+
export declare const CMS_CLIPBOARD_MAX_ITEMS = 200;
|
|
6
|
+
export interface CmsClipboardPayload {
|
|
7
|
+
nuxtCms: typeof CMS_CLIPBOARD_KIND;
|
|
8
|
+
version: typeof CMS_CLIPBOARD_VERSION;
|
|
9
|
+
items: CmsBlockValue[];
|
|
10
|
+
}
|
|
11
|
+
export interface CmsPasteResult {
|
|
12
|
+
list: CmsBlockValue[];
|
|
13
|
+
at: number;
|
|
14
|
+
pasted: number;
|
|
15
|
+
unknown: string[];
|
|
16
|
+
overflow: number;
|
|
17
|
+
}
|
|
18
|
+
export interface CmsClipboardNotice {
|
|
19
|
+
title: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
color?: 'success' | 'error';
|
|
22
|
+
}
|
|
23
|
+
export declare function clipboardText(items: readonly CmsBlockValue[]): string;
|
|
24
|
+
export declare function parseClipboardText(text: unknown): CmsBlockValue[] | null;
|
|
25
|
+
export declare function pastedFieldValue(field: FieldConfig, raw: unknown, i18n: CmsI18n): unknown;
|
|
26
|
+
export declare function pastedBlock(type: string, block: BlockConfig, item: Record<string, unknown>, i18n: CmsI18n): CmsBlockValue;
|
|
27
|
+
export declare function pasteBlocks(list: readonly CmsBlockValue[], at: number, items: readonly CmsBlockValue[], field: Pick<FieldConfig, 'blocks' | 'max'>, i18n: CmsI18n): CmsPasteResult;
|
|
28
|
+
export declare function pasteableCount(items: readonly CmsBlockValue[] | null | undefined, field: Pick<FieldConfig, 'blocks'>): number;
|
|
29
|
+
export declare function skippedText(result: CmsPasteResult, field: Pick<FieldConfig, 'max'>): string | undefined;
|
|
30
|
+
export declare function copyNotice(count: number, cut?: boolean): CmsClipboardNotice;
|
|
31
|
+
export declare function pasteNotice(result: CmsPasteResult | null, field: Pick<FieldConfig, 'max'>): CmsClipboardNotice;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BLOCK_HIDDEN_KEY,
|
|
3
|
+
allowsExternalLinks,
|
|
4
|
+
declaredLinkTargets,
|
|
5
|
+
declaresHiddenField,
|
|
6
|
+
isTranslatableField,
|
|
7
|
+
linkUrlError,
|
|
8
|
+
selectOptionValues
|
|
9
|
+
} from "./index.js";
|
|
10
|
+
import { CMS_CLIPBOARD_MAX_LENGTH } from "./preview.js";
|
|
11
|
+
import { objectKeySchema } from "./validation.js";
|
|
12
|
+
export const CMS_CLIPBOARD_KIND = "blocks";
|
|
13
|
+
export const CMS_CLIPBOARD_VERSION = 1;
|
|
14
|
+
export const CMS_CLIPBOARD_MAX_ITEMS = 200;
|
|
15
|
+
function isRecord(value) {
|
|
16
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
function isBlockItem(value) {
|
|
19
|
+
return isRecord(value) && typeof value.type === "string" && value.type !== "";
|
|
20
|
+
}
|
|
21
|
+
export function clipboardText(items) {
|
|
22
|
+
const payload = {
|
|
23
|
+
nuxtCms: CMS_CLIPBOARD_KIND,
|
|
24
|
+
version: CMS_CLIPBOARD_VERSION,
|
|
25
|
+
items: items.map((item) => ({ ...item }))
|
|
26
|
+
};
|
|
27
|
+
return JSON.stringify(payload);
|
|
28
|
+
}
|
|
29
|
+
export function parseClipboardText(text) {
|
|
30
|
+
if (typeof text !== "string" || text.length > CMS_CLIPBOARD_MAX_LENGTH) return null;
|
|
31
|
+
if (!text.trimStart().startsWith("{")) return null;
|
|
32
|
+
let data;
|
|
33
|
+
try {
|
|
34
|
+
data = JSON.parse(text);
|
|
35
|
+
} catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
if (!isRecord(data) || data.nuxtCms !== CMS_CLIPBOARD_KIND) return null;
|
|
39
|
+
if (data.version !== CMS_CLIPBOARD_VERSION || !Array.isArray(data.items)) return null;
|
|
40
|
+
const items = data.items.filter(isBlockItem).slice(0, CMS_CLIPBOARD_MAX_ITEMS);
|
|
41
|
+
return items.length ? items : null;
|
|
42
|
+
}
|
|
43
|
+
function isMediaKey(value) {
|
|
44
|
+
return objectKeySchema.safeParse(value).success;
|
|
45
|
+
}
|
|
46
|
+
function localizedShape(raw, i18n, accepts) {
|
|
47
|
+
if (typeof raw === "string") return raw && accepts(raw) ? { [i18n.defaultLocale]: raw } : null;
|
|
48
|
+
if (!isRecord(raw)) return null;
|
|
49
|
+
const entries = Object.entries(raw).filter(
|
|
50
|
+
(pair) => i18n.locales.includes(pair[0]) && accepts(pair[1])
|
|
51
|
+
);
|
|
52
|
+
return entries.length ? Object.fromEntries(entries) : null;
|
|
53
|
+
}
|
|
54
|
+
function isString(value) {
|
|
55
|
+
return typeof value === "string";
|
|
56
|
+
}
|
|
57
|
+
function plainShape(field, raw, i18n) {
|
|
58
|
+
if (field.type === "json" || field.type === "link" || !isRecord(raw)) return raw;
|
|
59
|
+
const value = raw[i18n.defaultLocale];
|
|
60
|
+
if (typeof value === "string") return value;
|
|
61
|
+
return Object.values(raw).find((entry) => typeof entry === "string") ?? null;
|
|
62
|
+
}
|
|
63
|
+
function trimmedText(value) {
|
|
64
|
+
return typeof value === "string" ? value.trim() : "";
|
|
65
|
+
}
|
|
66
|
+
function linkLabelShape(field, raw, i18n) {
|
|
67
|
+
if (!field.withLabel || raw == null) return void 0;
|
|
68
|
+
if (field.translatable && i18n.locales.length) {
|
|
69
|
+
const label = localizedShape(raw, i18n, isString);
|
|
70
|
+
if (!label) return void 0;
|
|
71
|
+
const kept = Object.entries(label).map(([locale, text2]) => [locale, text2.trim()]).filter(([, text2]) => !!text2);
|
|
72
|
+
return kept.length ? Object.fromEntries(kept) : void 0;
|
|
73
|
+
}
|
|
74
|
+
const text = trimmedText(plainShape({ ...field, type: "text" }, raw, i18n));
|
|
75
|
+
return text || void 0;
|
|
76
|
+
}
|
|
77
|
+
function linkShape(field, raw, i18n) {
|
|
78
|
+
if (!isRecord(raw)) return null;
|
|
79
|
+
const url = trimmedText(raw.url);
|
|
80
|
+
const entry = trimmedText(raw.entry);
|
|
81
|
+
const id = trimmedText(raw.id);
|
|
82
|
+
const label = linkLabelShape(field, raw.label, i18n);
|
|
83
|
+
const extra = {
|
|
84
|
+
...label !== void 0 ? { label } : {},
|
|
85
|
+
...raw.newTab === true ? { newTab: true } : {}
|
|
86
|
+
};
|
|
87
|
+
if (url && !entry && !id) {
|
|
88
|
+
if (!allowsExternalLinks(field) || linkUrlError(url)) return null;
|
|
89
|
+
return { url, ...extra };
|
|
90
|
+
}
|
|
91
|
+
if (url || !entry || !id) return null;
|
|
92
|
+
const targets = declaredLinkTargets(field);
|
|
93
|
+
if (targets && !targets.includes(entry)) return null;
|
|
94
|
+
return { entry, id, ...extra };
|
|
95
|
+
}
|
|
96
|
+
function scalarShape(field, raw) {
|
|
97
|
+
if (raw === void 0 || raw === null) return null;
|
|
98
|
+
switch (field.type) {
|
|
99
|
+
case "json":
|
|
100
|
+
return raw;
|
|
101
|
+
case "number":
|
|
102
|
+
return typeof raw === "number" && Number.isFinite(raw) ? raw : null;
|
|
103
|
+
case "boolean":
|
|
104
|
+
return typeof raw === "boolean" ? raw : null;
|
|
105
|
+
case "media":
|
|
106
|
+
return isMediaKey(raw) ? raw : null;
|
|
107
|
+
case "select": {
|
|
108
|
+
const options = selectOptionValues(field);
|
|
109
|
+
if (field.multiple) {
|
|
110
|
+
if (!Array.isArray(raw)) return null;
|
|
111
|
+
const values = [...new Set(raw.filter((value) => options.includes(value)))];
|
|
112
|
+
return values.length ? values : null;
|
|
113
|
+
}
|
|
114
|
+
return typeof raw === "string" && options.includes(raw) ? raw : null;
|
|
115
|
+
}
|
|
116
|
+
case "tags": {
|
|
117
|
+
if (!Array.isArray(raw)) return null;
|
|
118
|
+
const values = raw.filter(isString);
|
|
119
|
+
return values.length ? values : null;
|
|
120
|
+
}
|
|
121
|
+
default:
|
|
122
|
+
return typeof raw === "string" ? raw : null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export function pastedFieldValue(field, raw, i18n) {
|
|
126
|
+
if (field.type === "blocks") {
|
|
127
|
+
if (!Array.isArray(raw)) return null;
|
|
128
|
+
const { list } = pasteBlocks([], 0, raw.filter(isBlockItem), field, i18n);
|
|
129
|
+
return list.length ? list : null;
|
|
130
|
+
}
|
|
131
|
+
if (field.type === "link") return linkShape(field, raw, i18n);
|
|
132
|
+
if (isTranslatableField(field) && i18n.locales.length > 0)
|
|
133
|
+
return localizedShape(raw, i18n, field.type === "media" ? isMediaKey : isString);
|
|
134
|
+
return scalarShape(field, plainShape(field, raw, i18n));
|
|
135
|
+
}
|
|
136
|
+
export function pastedBlock(type, block, item, i18n) {
|
|
137
|
+
const value = { type };
|
|
138
|
+
for (const [key, field] of Object.entries(block.fields))
|
|
139
|
+
value[key] = pastedFieldValue(field, item[key], i18n);
|
|
140
|
+
if (!declaresHiddenField(block) && item[BLOCK_HIDDEN_KEY] === true)
|
|
141
|
+
value[BLOCK_HIDDEN_KEY] = true;
|
|
142
|
+
return value;
|
|
143
|
+
}
|
|
144
|
+
export function pasteBlocks(list, at, items, field, i18n) {
|
|
145
|
+
const blocks = field.blocks ?? {};
|
|
146
|
+
const unknown = [];
|
|
147
|
+
const allowed = [];
|
|
148
|
+
for (const item of items) {
|
|
149
|
+
const type = String(item.type);
|
|
150
|
+
if (Object.hasOwn(blocks, type)) allowed.push(item);
|
|
151
|
+
else unknown.push(type);
|
|
152
|
+
}
|
|
153
|
+
const room = field.max === void 0 ? allowed.length : Math.max(field.max - list.length, 0);
|
|
154
|
+
const kept = allowed.slice(0, room);
|
|
155
|
+
const index = Math.min(Math.max(at, 0), list.length);
|
|
156
|
+
const next = [...list];
|
|
157
|
+
next.splice(
|
|
158
|
+
index,
|
|
159
|
+
0,
|
|
160
|
+
...kept.map((item) => pastedBlock(String(item.type), blocks[String(item.type)], item, i18n))
|
|
161
|
+
);
|
|
162
|
+
return {
|
|
163
|
+
list: next,
|
|
164
|
+
at: index,
|
|
165
|
+
pasted: kept.length,
|
|
166
|
+
unknown,
|
|
167
|
+
overflow: allowed.length - kept.length
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export function pasteableCount(items, field) {
|
|
171
|
+
const blocks = field.blocks ?? {};
|
|
172
|
+
return (items ?? []).filter((item) => Object.hasOwn(blocks, String(item.type))).length;
|
|
173
|
+
}
|
|
174
|
+
function blockCount(count) {
|
|
175
|
+
return `${count} ${count === 1 ? "block" : "blocks"}`;
|
|
176
|
+
}
|
|
177
|
+
export function skippedText(result, field) {
|
|
178
|
+
const parts = [];
|
|
179
|
+
if (result.unknown.length) {
|
|
180
|
+
const types = [...new Set(result.unknown)].join(", ");
|
|
181
|
+
parts.push(
|
|
182
|
+
`${blockCount(result.unknown.length)} skipped, not available in this field: ${types}.`
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
if (result.overflow) {
|
|
186
|
+
const max = field.max ?? 0;
|
|
187
|
+
parts.push(
|
|
188
|
+
`${blockCount(result.overflow)} skipped, this field holds at most ${blockCount(max)}.`
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
return parts.length ? parts.join(" ") : void 0;
|
|
192
|
+
}
|
|
193
|
+
export function copyNotice(count, cut = false) {
|
|
194
|
+
const what = count === 1 ? "Block" : blockCount(count);
|
|
195
|
+
return { title: `${what} ${cut ? "cut" : "copied"}` };
|
|
196
|
+
}
|
|
197
|
+
export function pasteNotice(result, field) {
|
|
198
|
+
if (!result) return { title: "Nothing to paste", description: "Copy or cut a block first." };
|
|
199
|
+
const description = skippedText(result, field);
|
|
200
|
+
if (!result.pasted) return { title: "Nothing pasted", description, color: "error" };
|
|
201
|
+
return {
|
|
202
|
+
title: `${result.pasted === 1 ? "Block" : blockCount(result.pasted)} pasted`,
|
|
203
|
+
description,
|
|
204
|
+
color: description ? void 0 : "success"
|
|
205
|
+
};
|
|
206
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { FieldConfig, FieldType } from './index.js';
|
|
2
|
+
export type ConditionValue = string | number | boolean;
|
|
3
|
+
export interface FieldCondition {
|
|
4
|
+
field: string;
|
|
5
|
+
eq?: ConditionValue;
|
|
6
|
+
neq?: ConditionValue;
|
|
7
|
+
in?: readonly ConditionValue[];
|
|
8
|
+
notIn?: readonly ConditionValue[];
|
|
9
|
+
gt?: number | string;
|
|
10
|
+
gte?: number | string;
|
|
11
|
+
lt?: number | string;
|
|
12
|
+
lte?: number | string;
|
|
13
|
+
empty?: boolean;
|
|
14
|
+
has?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AllCondition {
|
|
17
|
+
all: readonly ShowIfCondition[];
|
|
18
|
+
}
|
|
19
|
+
export interface AnyCondition {
|
|
20
|
+
any: readonly ShowIfCondition[];
|
|
21
|
+
}
|
|
22
|
+
export interface NotCondition {
|
|
23
|
+
not: ShowIfCondition;
|
|
24
|
+
}
|
|
25
|
+
export type ShowIfCondition = FieldCondition | AllCondition | AnyCondition | NotCondition;
|
|
26
|
+
export type CmsShowIf = ShowIfCondition | readonly ShowIfCondition[];
|
|
27
|
+
export declare const CONDITION_OPERATORS: readonly ["eq", "neq", "in", "notIn", "gt", "gte", "lt", "lte", "empty", "has"];
|
|
28
|
+
export type ConditionOperator = (typeof CONDITION_OPERATORS)[number];
|
|
29
|
+
export declare const CONDITION_GROUPS: readonly ["all", "any", "not"];
|
|
30
|
+
export type ConditionScope = Record<string, Pick<FieldConfig, 'type'>> | null | undefined;
|
|
31
|
+
type Values = Record<string, unknown> | null | undefined;
|
|
32
|
+
export declare function fieldConditions(field: FieldConfig): ShowIfCondition[];
|
|
33
|
+
export declare function isEmptyConditionValue(value: unknown, type?: FieldType): boolean;
|
|
34
|
+
export declare function matchesShowIf(condition: ShowIfCondition, values: Values, scope?: ConditionScope): boolean;
|
|
35
|
+
export declare function isFieldVisible(field: FieldConfig, values: Values, scope?: ConditionScope): boolean;
|
|
36
|
+
export {};
|