sitero 0.6.0 → 0.8.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/dist/export/cms/client/components/index.js +6 -2
- package/dist/export/cms/client/index.js +2 -0
- package/dist/export/cms/client/pages/index.js +1 -4
- package/dist/export/cms/server/index.js +1 -0
- package/dist/export/core/server/index.js +2 -0
- package/dist/export/index.js +1 -0
- package/dist/export/web/server/index.js +1 -0
- package/dist/prisma/generated/internal/class.js +4 -4
- package/dist/src/cms/client/applications/create-applications.js +5 -0
- package/dist/src/cms/client/applications/resources/page/form-data.js +56 -0
- package/dist/src/cms/client/applications/resources/page/use-page-update-form-data.js +30 -0
- package/dist/src/cms/client/applications/resources/post/use-create-form-data.js +5 -5
- package/dist/src/cms/client/applications/resources/post/use-update-form-data.js +1 -1
- package/dist/src/cms/client/applications/resources/seo-metadata/build-seo-metadata-translations.js +35 -0
- package/dist/src/cms/client/applications/resources/seo-metadata/use-upsert-form-data.js +15 -31
- package/dist/src/cms/client/applications/ui/use-nav-items.js +28 -39
- package/dist/src/cms/client/infrastructure/i18n/messages/en-US/resources/file.js +5 -4
- package/dist/src/cms/client/infrastructure/i18n/messages/en-US/resources/index.js +7 -0
- package/dist/src/cms/client/infrastructure/i18n/messages/en-US/resources/post.js +32 -1
- package/dist/src/cms/client/infrastructure/i18n/messages/en-US/ui/index.js +8 -1
- package/dist/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/file.js +6 -5
- package/dist/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/index.js +7 -0
- package/dist/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/post.js +18 -1
- package/dist/src/cms/client/infrastructure/i18n/messages/zh-TW/ui/index.js +12 -7
- package/dist/src/cms/client/infrastructure/operation-result/presentation/message.js +15 -0
- package/dist/src/cms/client/interfaces/components/create-components.js +7 -8
- package/dist/src/cms/client/interfaces/components/create-page-contents.js +28 -0
- package/dist/src/cms/client/interfaces/components/resources/page/content/field-groups.js +16 -0
- package/dist/src/cms/client/interfaces/components/resources/page/content/page-edit-content.js +216 -0
- package/dist/src/cms/client/interfaces/components/resources/page/content/page-show-content.js +114 -0
- package/dist/src/cms/client/interfaces/components/resources/page/content/types.js +12 -0
- package/dist/src/cms/client/interfaces/components/resources/post/category/category-card.js +17 -5
- package/dist/src/cms/client/interfaces/components/resources/post/category/category-table.js +16 -5
- package/dist/src/cms/client/interfaces/components/resources/post/content/post-create-content.js +13 -8
- package/dist/src/cms/client/interfaces/components/resources/post/content/post-edit-content.js +11 -7
- package/dist/src/cms/client/interfaces/components/resources/post/content/post-show-content.js +7 -2
- package/dist/src/cms/client/interfaces/components/resources/post/post-card.js +17 -5
- package/dist/src/cms/client/interfaces/components/resources/post/post-list.js +49 -10
- package/dist/src/cms/client/interfaces/components/resources/post/post-state-icons.js +37 -6
- package/dist/src/cms/client/interfaces/components/resources/post/post-table.js +18 -5
- package/dist/src/cms/client/interfaces/components/resources/post/search/control-fields-filters.js +5 -1
- package/dist/src/cms/client/interfaces/components/resources/post/tag/tag-card.js +12 -2
- package/dist/src/cms/client/interfaces/components/resources/post/tag/tag-table.js +10 -1
- package/dist/src/cms/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.js +90 -67
- package/dist/src/cms/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.js +11 -1
- package/dist/src/cms/client/interfaces/components/ui/blocks/list-container/list-container.js +1 -1
- package/dist/src/cms/client/interfaces/components/ui/blocks/list-container/pagination.js +9 -9
- package/dist/src/cms/client/interfaces/components/ui/features/accordion/accordion-header.js +15 -3
- package/dist/src/cms/client/interfaces/components/ui/features/accordion/accordion.js +5 -7
- package/dist/src/cms/client/interfaces/components/ui/form/control-fields/control-fields-display.js +1 -1
- package/dist/src/cms/client/interfaces/components/ui/form/control-fields/control-fields-input.js +1 -1
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/category/_id_/edit/page.js +11 -11
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/category/_id_/page.js +12 -16
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/category/_id_/relations/page.js +6 -2
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/category/create/page.js +15 -16
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/page.js +18 -41
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/post/_id_/edit/page.js +10 -11
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/post/_id_/page.js +11 -16
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/post/_id_/relations/page.js +1 -0
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/post/create/page.js +14 -16
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/subcategory/_id_/edit/page.js +11 -11
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/subcategory/_id_/page.js +12 -16
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/subcategory/_id_/relations/page.js +1 -0
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/_topicSlug_/subcategory/create/page.js +15 -16
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/page.js +18 -32
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/tag/_id_/edit/page.js +2 -2
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/tag/_id_/page.js +9 -9
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/tag/_id_/relations/page.js +6 -2
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/tag/create/page.js +2 -2
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/trash/page.js +204 -0
- package/dist/src/cms/client/interfaces/pages/dashboard/system/access/admin/_id_/admin-refresh-token/page.js +1 -0
- package/dist/src/cms/client/interfaces/pages/dashboard/system/access/admin/_id_/page.js +1 -0
- package/dist/src/cms/client/interfaces/pages/dashboard/system/access/admin/_id_/relations/page.js +8 -3
- package/dist/src/cms/client/interfaces/pages/dashboard/system/storage/file/_id_/page.js +3 -2
- package/dist/src/cms/client/interfaces/pages/dashboard/system/storage/file/_id_/relations/page.js +41 -30
- package/dist/src/cms/client/interfaces/pages/dashboard/system/storage/file/delete-many/page.js +3 -3
- package/dist/src/cms/client/interfaces/pages/dashboard/system/storage/file/page.js +1 -1
- package/dist/src/cms/client/interfaces/pages/dashboard/system/storage/trash/page.js +3 -2
- package/dist/src/cms/client/interfaces/pages/dashboard/website/website-page/_slug_/edit/page.js +19 -11
- package/dist/src/cms/client/interfaces/pages/dashboard/website/website-page/_slug_/page.js +23 -10
- package/dist/src/cms/client/interfaces/pages/dashboard/website/website-page/page.js +7 -7
- package/dist/src/cms/server/create-cms-server.js +2 -0
- package/dist/src/cms/server/resources/page/actions.js +31 -0
- package/dist/src/cms/server/resources/post/actions.js +27 -6
- package/dist/src/cms/server/resources/seo-metadata/actions.js +7 -16
- package/dist/src/config/content-ui.js +24 -0
- package/dist/src/config/topics.js +1 -1
- package/dist/src/constants/paths/cms-paths.js +2 -2
- package/dist/src/core/infrastructure/prisma/file/include.js +44 -0
- package/dist/src/core/infrastructure/prisma/file/mappers.js +51 -3
- package/dist/src/core/infrastructure/prisma/helpers/active-file-references.js +2 -1
- package/dist/src/core/infrastructure/prisma/page/include.js +20 -0
- package/dist/src/core/infrastructure/prisma/page/mappers.js +44 -0
- package/dist/src/core/infrastructure/prisma/page/page-prisma-ports.js +91 -0
- package/dist/src/core/infrastructure/prisma/post/include.js +2 -5
- package/dist/src/core/infrastructure/prisma/post/lifecycle.js +108 -0
- package/dist/src/core/infrastructure/prisma/post/mappers.js +0 -2
- package/dist/src/core/infrastructure/prisma/post/post-prisma-ports.js +76 -24
- package/dist/src/core/infrastructure/prisma/post/read-scope.js +45 -0
- package/dist/src/core/infrastructure/prisma/seo-metadata/mappers.js +6 -1
- package/dist/src/core/infrastructure/prisma/seo-metadata/seo-metadata-prisma-ports.js +32 -11
- package/dist/src/core/seeders/page/seeder.js +9 -29
- package/dist/src/core/seeders/seed.js +0 -3
- package/dist/src/core/sitero-server/create-sitero-server.js +10 -0
- package/dist/src/web/server/create-web-server.js +5 -1
- package/dist/src/web/server/resources/page/actions.js +20 -0
- package/dist/src/web/server/resources/post/actions.js +3 -13
- package/dist/src/web/server/seo/sitemap/get-page-items.js +7 -6
- package/dist/src/web/server/seo/sitemap/get-post-items.js +2 -2
- package/dist/src/web/server/seo/sitemap/get-subcategory-items.js +1 -1
- package/dist/types/export/cms/client/components/index.d.ts +3 -0
- package/dist/types/export/cms/client/components/index.d.ts.map +1 -1
- package/dist/types/export/cms/client/index.d.ts +2 -0
- package/dist/types/export/cms/client/index.d.ts.map +1 -1
- package/dist/types/export/cms/client/pages/index.d.ts +3 -2
- package/dist/types/export/cms/client/pages/index.d.ts.map +1 -1
- package/dist/types/export/cms/server/index.d.ts +2 -1
- package/dist/types/export/cms/server/index.d.ts.map +1 -1
- package/dist/types/export/index.d.ts +1 -1
- package/dist/types/export/index.d.ts.map +1 -1
- package/dist/types/export/web/server/index.d.ts +2 -1
- package/dist/types/export/web/server/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/create-applications.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/index.d.ts +1 -0
- package/dist/types/src/cms/client/applications/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/resources/index.d.ts +1 -0
- package/dist/types/src/cms/client/applications/resources/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/resources/page/form-data.d.ts +21 -0
- package/dist/types/src/cms/client/applications/resources/page/form-data.d.ts.map +1 -0
- package/dist/types/src/cms/client/applications/resources/page/index.d.ts +3 -0
- package/dist/types/src/cms/client/applications/resources/page/index.d.ts.map +1 -0
- package/dist/types/src/cms/client/applications/resources/page/use-page-update-form-data.d.ts +12 -0
- package/dist/types/src/cms/client/applications/resources/page/use-page-update-form-data.d.ts.map +1 -0
- package/dist/types/src/cms/client/applications/resources/post/use-create-form-data.d.ts +3 -5
- package/dist/types/src/cms/client/applications/resources/post/use-create-form-data.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/resources/post/use-update-form-data.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/resources/seo-metadata/build-seo-metadata-translations.d.ts +6 -0
- package/dist/types/src/cms/client/applications/resources/seo-metadata/build-seo-metadata-translations.d.ts.map +1 -0
- package/dist/types/src/cms/client/applications/resources/seo-metadata/use-upsert-form-data.d.ts +5 -4
- package/dist/types/src/cms/client/applications/resources/seo-metadata/use-upsert-form-data.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/types.d.ts +2 -1
- package/dist/types/src/cms/client/applications/types.d.ts.map +1 -1
- package/dist/types/src/cms/client/applications/ui/use-nav-items.d.ts +3 -4
- package/dist/types/src/cms/client/applications/ui/use-nav-items.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/index.d.ts +86 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/resources/file.d.ts +3 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/resources/file.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/resources/index.d.ts +71 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/resources/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/resources/post.d.ts +51 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/resources/post.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/ui/index.d.ts +15 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/en-US/ui/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/index.d.ts +172 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/index.d.ts +86 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/file.d.ts +3 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/file.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/index.d.ts +71 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/post.d.ts +51 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/resources/post.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/ui/index.d.ts +15 -0
- package/dist/types/src/cms/client/infrastructure/i18n/messages/zh-TW/ui/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/infrastructure/operation-result/presentation/message.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/create-components.d.ts +6 -3
- package/dist/types/src/cms/client/interfaces/components/create-components.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/create-page-contents.d.ts +30 -0
- package/dist/types/src/cms/client/interfaces/components/create-page-contents.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/components/resources/index.d.ts +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/index.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/field-groups.d.ts +3 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/field-groups.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/page-edit-content.d.ts +14 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/page-edit-content.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/page-show-content.d.ts +7 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/page-show-content.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/types.d.ts +27 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/content/types.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/index.d.ts +4 -0
- package/dist/types/src/cms/client/interfaces/components/resources/page/index.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/components/resources/post/category/category-card.d.ts +5 -2
- package/dist/types/src/cms/client/interfaces/components/resources/post/category/category-card.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/category/category-table.d.ts +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/category/category-table.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/content/post-create-content.d.ts +3 -5
- package/dist/types/src/cms/client/interfaces/components/resources/post/content/post-create-content.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/content/post-edit-content.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/content/post-show-content.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-card.d.ts +6 -3
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-card.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-list.d.ts +6 -3
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-list.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-state-icons.d.ts +7 -2
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-state-icons.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-table.d.ts +5 -2
- package/dist/types/src/cms/client/interfaces/components/resources/post/post-table.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/search/control-fields-filters.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/tag/tag-card.d.ts +3 -2
- package/dist/types/src/cms/client/interfaces/components/resources/post/tag/tag-card.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/tag/tag-table.d.ts +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/tag/tag-table.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.d.ts +5 -2
- package/dist/types/src/cms/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.d.ts +2 -1
- package/dist/types/src/cms/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/ui/blocks/list-container/list-container.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/ui/features/accordion/accordion-header.d.ts +3 -1
- package/dist/types/src/cms/client/interfaces/components/ui/features/accordion/accordion-header.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/ui/features/accordion/accordion.d.ts +2 -1
- package/dist/types/src/cms/client/interfaces/components/ui/features/accordion/accordion.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/ui/form/control-fields/control-fields-display.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/components/ui/form/control-fields/control-fields-input.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/[id]/edit/page.d.ts +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/[id]/edit/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/[id]/page.d.ts +3 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/[id]/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/[id]/relations/page.d.ts +3 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/[id]/relations/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/create/page.d.ts +4 -7
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/category/create/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/page.d.ts +1 -4
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/post/[id]/edit/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/post/[id]/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/post/[id]/relations/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/post/create/page.d.ts +4 -7
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/post/create/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/subcategory/[id]/edit/page.d.ts +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/subcategory/[id]/edit/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/subcategory/[id]/page.d.ts +3 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/subcategory/[id]/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/subcategory/[id]/relations/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/subcategory/create/page.d.ts +4 -7
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/[topicSlug]/subcategory/create/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/page.d.ts +1 -3
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/tag/[id]/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/tag/[id]/relations/page.d.ts +3 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/tag/[id]/relations/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/trash/index.d.ts +2 -0
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/trash/index.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/trash/page.d.ts +18 -0
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/trash/page.d.ts.map +1 -0
- package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/relations/page.d.ts +3 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/relations/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/system/storage/file/[id]/relations/page.d.ts +5 -6
- package/dist/types/src/cms/client/interfaces/pages/dashboard/system/storage/file/[id]/relations/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/system/storage/trash/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/website/website-page/[slug]/edit/page.d.ts +7 -9
- package/dist/types/src/cms/client/interfaces/pages/dashboard/website/website-page/[slug]/edit/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/website/website-page/[slug]/page.d.ts +7 -9
- package/dist/types/src/cms/client/interfaces/pages/dashboard/website/website-page/[slug]/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/website/website-page/page.d.ts +3 -3
- package/dist/types/src/cms/client/interfaces/pages/dashboard/website/website-page/page.d.ts.map +1 -1
- package/dist/types/src/cms/client/interfaces/pages/index.d.ts +1 -2
- package/dist/types/src/cms/client/interfaces/pages/index.d.ts.map +1 -1
- package/dist/types/src/cms/contracts/resources/page/actions.d.ts +7 -0
- package/dist/types/src/cms/contracts/resources/page/actions.d.ts.map +1 -0
- package/dist/types/src/cms/contracts/resources/post/actions.d.ts +2 -0
- package/dist/types/src/cms/contracts/resources/post/actions.d.ts.map +1 -1
- package/dist/types/src/cms/contracts/resources/post/form-data.d.ts +1 -1
- package/dist/types/src/cms/contracts/resources/post/form-data.d.ts.map +1 -1
- package/dist/types/src/cms/contracts/resources/seo-metadata/form-data.d.ts +2 -2
- package/dist/types/src/cms/contracts/resources/seo-metadata/form-data.d.ts.map +1 -1
- package/dist/types/src/cms/server/create-cms-server.d.ts +7 -0
- package/dist/types/src/cms/server/create-cms-server.d.ts.map +1 -1
- package/dist/types/src/cms/server/index.d.ts +1 -1
- package/dist/types/src/cms/server/index.d.ts.map +1 -1
- package/dist/types/src/cms/server/resources/index.d.ts +1 -0
- package/dist/types/src/cms/server/resources/index.d.ts.map +1 -1
- package/dist/types/src/cms/server/resources/page/actions.d.ts +8 -0
- package/dist/types/src/cms/server/resources/page/actions.d.ts.map +1 -0
- package/dist/types/src/cms/server/resources/post/actions.d.ts +2 -0
- package/dist/types/src/cms/server/resources/post/actions.d.ts.map +1 -1
- package/dist/types/src/cms/server/resources/seo-metadata/actions.d.ts.map +1 -1
- package/dist/types/src/config/content-ui.d.ts +14 -0
- package/dist/types/src/config/content-ui.d.ts.map +1 -0
- package/dist/types/src/config/index.d.ts +2 -0
- package/dist/types/src/config/index.d.ts.map +1 -1
- package/dist/types/src/config/page.d.ts +4 -0
- package/dist/types/src/config/page.d.ts.map +1 -0
- package/dist/types/src/config/topics.d.ts +2 -2
- package/dist/types/src/config/topics.d.ts.map +1 -1
- package/dist/types/src/constants/paths/cms-paths.d.ts +3 -3
- package/dist/types/src/core/infrastructure/index.d.ts +1 -0
- package/dist/types/src/core/infrastructure/index.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/file/include.d.ts +121 -0
- package/dist/types/src/core/infrastructure/prisma/file/include.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/file/mappers.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/helpers/active-file-references.d.ts +1 -1
- package/dist/types/src/core/infrastructure/prisma/helpers/active-file-references.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/index.d.ts +1 -0
- package/dist/types/src/core/infrastructure/prisma/index.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/page/include.d.ts +63 -0
- package/dist/types/src/core/infrastructure/prisma/page/include.d.ts.map +1 -0
- package/dist/types/src/core/infrastructure/prisma/page/index.d.ts +4 -0
- package/dist/types/src/core/infrastructure/prisma/page/index.d.ts.map +1 -0
- package/dist/types/src/core/infrastructure/prisma/page/mappers.d.ts +9 -0
- package/dist/types/src/core/infrastructure/prisma/page/mappers.d.ts.map +1 -0
- package/dist/types/src/core/infrastructure/prisma/page/page-prisma-ports.d.ts +7 -0
- package/dist/types/src/core/infrastructure/prisma/page/page-prisma-ports.d.ts.map +1 -0
- package/dist/types/src/core/infrastructure/prisma/page/types.d.ts +10 -0
- package/dist/types/src/core/infrastructure/prisma/page/types.d.ts.map +1 -0
- package/dist/types/src/core/infrastructure/prisma/post/include.d.ts +0 -29
- package/dist/types/src/core/infrastructure/prisma/post/include.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/post/lifecycle.d.ts +66 -0
- package/dist/types/src/core/infrastructure/prisma/post/lifecycle.d.ts.map +1 -0
- package/dist/types/src/core/infrastructure/prisma/post/mappers.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/post/post-prisma-ports.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/post/read-scope.d.ts +271 -0
- package/dist/types/src/core/infrastructure/prisma/post/read-scope.d.ts.map +1 -0
- package/dist/types/src/core/infrastructure/prisma/seo-metadata/mappers.d.ts +1 -1
- package/dist/types/src/core/infrastructure/prisma/seo-metadata/mappers.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/seo-metadata/seo-metadata-prisma-ports.d.ts +2 -2
- package/dist/types/src/core/infrastructure/prisma/seo-metadata/seo-metadata-prisma-ports.d.ts.map +1 -1
- package/dist/types/src/core/seeders/page/seeder.d.ts +3 -3
- package/dist/types/src/core/seeders/page/seeder.d.ts.map +1 -1
- package/dist/types/src/core/seeders/seed.d.ts +2 -3
- package/dist/types/src/core/seeders/seed.d.ts.map +1 -1
- package/dist/types/src/core/sitero-server/create-sitero-server.d.ts.map +1 -1
- package/dist/types/src/core/sitero-server/types.d.ts +2 -0
- package/dist/types/src/core/sitero-server/types.d.ts.map +1 -1
- package/dist/types/src/shared/list-item.d.ts +1 -0
- package/dist/types/src/shared/list-item.d.ts.map +1 -1
- package/dist/types/src/web/contracts/index.d.ts +1 -0
- package/dist/types/src/web/contracts/index.d.ts.map +1 -1
- package/dist/types/src/web/contracts/resources/page/actions.d.ts +5 -0
- package/dist/types/src/web/contracts/resources/page/actions.d.ts.map +1 -0
- package/dist/types/src/web/contracts/resources/post/actions.d.ts +1 -1
- package/dist/types/src/web/contracts/resources/post/actions.d.ts.map +1 -1
- package/dist/types/src/web/server/create-web-server.d.ts.map +1 -1
- package/dist/types/src/web/server/index.d.ts +1 -1
- package/dist/types/src/web/server/index.d.ts.map +1 -1
- package/dist/types/src/web/server/resources/index.d.ts +1 -0
- package/dist/types/src/web/server/resources/index.d.ts.map +1 -1
- package/dist/types/src/web/server/resources/page/actions.d.ts +17 -0
- package/dist/types/src/web/server/resources/page/actions.d.ts.map +1 -0
- package/dist/types/src/web/server/resources/post/actions.d.ts +1 -6
- package/dist/types/src/web/server/resources/post/actions.d.ts.map +1 -1
- package/dist/types/src/web/server/seo/metadata/build-metadata.d.ts +5 -2
- package/dist/types/src/web/server/seo/metadata/build-metadata.d.ts.map +1 -1
- package/dist/types/src/web/server/seo/sitemap/build-entries.d.ts +2 -2
- package/dist/types/src/web/server/seo/sitemap/build-entries.d.ts.map +1 -1
- package/dist/types/src/web/server/seo/sitemap/get-page-items.d.ts +6 -2
- package/dist/types/src/web/server/seo/sitemap/get-page-items.d.ts.map +1 -1
- package/dist/types/src/web/server/seo/sitemap/get-post-items.d.ts.map +1 -1
- package/dist/types/src/web/server/seo/sitemap/get-subcategory-items.d.ts.map +1 -1
- package/dist/types/src/web/server/types.d.ts +6 -2
- package/dist/types/src/web/server/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/src/cms/client/interfaces/components/resources/post/topic/topic-card.js +0 -81
- package/dist/src/cms/client/interfaces/components/resources/post/topic/topic-table.js +0 -120
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/_id_/edit/page.js +0 -110
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/_id_/page.js +0 -161
- package/dist/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/page.js +0 -103
- package/dist/src/cms/client/interfaces/pages/page.js +0 -17
- package/dist/src/core/seeders/topic/seeder.js +0 -47
- package/dist/types/src/cms/client/interfaces/components/resources/post/topic/index.d.ts +0 -3
- package/dist/types/src/cms/client/interfaces/components/resources/post/topic/index.d.ts.map +0 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/topic/topic-card.d.ts +0 -5
- package/dist/types/src/cms/client/interfaces/components/resources/post/topic/topic-card.d.ts.map +0 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/topic/topic-table.d.ts +0 -3
- package/dist/types/src/cms/client/interfaces/components/resources/post/topic/topic-table.d.ts.map +0 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/[id]/edit/page.d.ts +0 -20
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/[id]/edit/page.d.ts.map +0 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/[id]/page.d.ts +0 -20
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/[id]/page.d.ts.map +0 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/index.d.ts +0 -4
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/index.d.ts.map +0 -1
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/page.d.ts +0 -14
- package/dist/types/src/cms/client/interfaces/pages/dashboard/content/content-management/topic/page.d.ts.map +0 -1
- package/dist/types/src/cms/client/interfaces/pages/page.d.ts +0 -2
- package/dist/types/src/cms/client/interfaces/pages/page.d.ts.map +0 -1
- package/dist/types/src/core/seeders/topic/seeder.d.ts +0 -10
- package/dist/types/src/core/seeders/topic/seeder.d.ts.map +0 -1
|
@@ -59,8 +59,6 @@ import { CategoryTable } from './resources/post/category/category-table.js';
|
|
|
59
59
|
import { TagTable } from './resources/post/tag/tag-table.js';
|
|
60
60
|
import { createCategoryCard } from './resources/post/category/category-card.js';
|
|
61
61
|
import { createTagCard } from './resources/post/tag/tag-card.js';
|
|
62
|
-
import { createTopicCard } from './resources/post/topic/topic-card.js';
|
|
63
|
-
import { createTopicTable } from './resources/post/topic/topic-table.js';
|
|
64
62
|
import { createSeoMetadataDialog } from './resources/seo-metadata/seo-metadata-dialog.js';
|
|
65
63
|
import { createSeoForm } from './resources/seo-metadata/seo-form/seo-form.js';
|
|
66
64
|
import { createBasicTags } from './resources/seo-metadata/seo-form/fields/basic-tags.js';
|
|
@@ -75,12 +73,15 @@ function createComponents(input) {
|
|
|
75
73
|
locales: constants.webLocales
|
|
76
74
|
});
|
|
77
75
|
const PostCard = createPostCard({
|
|
76
|
+
customControlFields: constants.post.customControlFields,
|
|
77
|
+
topics: constants.topics ?? {},
|
|
78
78
|
storageUrl: constants.storageUrl,
|
|
79
79
|
defaultWebLocale: constants.defaultWebLocale,
|
|
80
80
|
SmartImage,
|
|
81
81
|
strategies: constants.post.strategies
|
|
82
82
|
});
|
|
83
83
|
const PostList = createPostList({
|
|
84
|
+
topics: constants.topics ?? {},
|
|
84
85
|
customControlFields: constants.post.customControlFields,
|
|
85
86
|
defaultWebLocale: constants.defaultWebLocale,
|
|
86
87
|
postFindListCardsAction: actions.resources.post.findListCards,
|
|
@@ -88,13 +89,12 @@ function createComponents(input) {
|
|
|
88
89
|
strategies: constants.post.strategies
|
|
89
90
|
});
|
|
90
91
|
const CategoryCard = createCategoryCard({
|
|
92
|
+
customControlFields: constants.post.customControlFields,
|
|
93
|
+
topics: constants.topics ?? {},
|
|
91
94
|
defaultWebLocale: constants.defaultWebLocale
|
|
92
95
|
});
|
|
93
|
-
const TopicCard = createTopicCard({
|
|
94
|
-
defaultWebLocale: constants.defaultWebLocale
|
|
95
|
-
});
|
|
96
|
-
const TopicTable = createTopicTable();
|
|
97
96
|
const TagCard = createTagCard({
|
|
97
|
+
customControlFields: constants.post.customControlFields,
|
|
98
98
|
defaultWebLocale: constants.defaultWebLocale
|
|
99
99
|
});
|
|
100
100
|
const AdminCard = createAdminCard({
|
|
@@ -151,6 +151,7 @@ function createComponents(input) {
|
|
|
151
151
|
const JsonLdTags = createJsonLdTags(seoFieldsInput);
|
|
152
152
|
const SeoForm = createSeoForm({
|
|
153
153
|
postFindDetailAction: actions.resources.post.findDetail,
|
|
154
|
+
...actions.resources.page ? { pageFindDetailAction: actions.resources.page.findDetail } : {},
|
|
154
155
|
seoMetadataUpsertAction: actions.resources.seoMetadata.upsert,
|
|
155
156
|
useSeoMetadataUpsertFormData: applications.resources.seoMatadata.upsert,
|
|
156
157
|
BasicTags,
|
|
@@ -184,8 +185,6 @@ function createComponents(input) {
|
|
|
184
185
|
CategoryCard,
|
|
185
186
|
CategoryTable,
|
|
186
187
|
// topic
|
|
187
|
-
TopicCard,
|
|
188
|
-
TopicTable,
|
|
189
188
|
// tag
|
|
190
189
|
TagCard,
|
|
191
190
|
TagTable,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createPageEditContent } from './resources/page/content/page-edit-content.js';
|
|
2
|
+
import { createPageShowContent } from './resources/page/content/page-show-content.js';
|
|
3
|
+
|
|
4
|
+
function createPageContents({
|
|
5
|
+
actions,
|
|
6
|
+
applications,
|
|
7
|
+
components,
|
|
8
|
+
constants
|
|
9
|
+
}) {
|
|
10
|
+
return {
|
|
11
|
+
resources: {
|
|
12
|
+
PageShowContent: createPageShowContent({
|
|
13
|
+
FileCard: components.resources.FileCard,
|
|
14
|
+
webLocales: constants.webLocales
|
|
15
|
+
}),
|
|
16
|
+
PageEditContent: createPageEditContent({
|
|
17
|
+
pageUpdateAction: actions.resources.page.update,
|
|
18
|
+
usePageUpdateFormData: applications.resources.usePageUpdateFormData,
|
|
19
|
+
FileCard: components.resources.FileCard,
|
|
20
|
+
FileList: components.resources.FileList,
|
|
21
|
+
Uploader: components.blobFile.Uploader,
|
|
22
|
+
webLocales: constants.webLocales
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { createPageContents };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PAGE_MEDIA_FIELDS, PAGE_TEXT_FIELDS } from 'sitero-domain';
|
|
2
|
+
|
|
3
|
+
const PAGE_FIELD_GROUPS = PAGE_MEDIA_FIELDS.map((mediaField, index) => {
|
|
4
|
+
const prefix = index === 0 ? "" : `section${index}`;
|
|
5
|
+
const textFields = PAGE_TEXT_FIELDS.filter(
|
|
6
|
+
(field) => (field.match(/^section\d+/)?.[0] ?? "") === prefix
|
|
7
|
+
);
|
|
8
|
+
return [...textFields.slice(0, 3), mediaField, ...textFields.slice(3)];
|
|
9
|
+
});
|
|
10
|
+
function getVisiblePageFieldGroups(fields) {
|
|
11
|
+
return PAGE_FIELD_GROUPS.map(
|
|
12
|
+
(group) => group.filter((field) => fields[field] !== void 0)
|
|
13
|
+
).filter((group) => group.length > 0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { getVisiblePageFieldGroups };
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslator } from 'intor/react';
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { Fragment } from 'react';
|
|
6
|
+
import { PAGE_MEDIA_FIELDS, PAGE_TEXT_FIELDS } from 'sitero-domain';
|
|
7
|
+
import 'mime-types';
|
|
8
|
+
import 'ua-parser-js';
|
|
9
|
+
import '../../../../../../../shared/client/react-query/client.js';
|
|
10
|
+
import '@tanstack/react-query';
|
|
11
|
+
import 'clsx';
|
|
12
|
+
import 'tailwind-merge';
|
|
13
|
+
import { createTranslationTextBinder } from '../../../../../applications/form/binders/create-translation-text-binder.js';
|
|
14
|
+
import '../../../../../../../constants/paths/redirect.js';
|
|
15
|
+
import '../../../../../../../constants/cms-locale.js';
|
|
16
|
+
import { toPageUpdateInput } from '../../../../../applications/resources/page/form-data.js';
|
|
17
|
+
import { useParentPathname } from '../../../../../applications/ui/use-parent-pathname.js';
|
|
18
|
+
import 'lucide-react';
|
|
19
|
+
import { getCmsLocalizedFieldErrors, getCmsFieldErrorMessageMap } from '../../../../../infrastructure/operation-result/presentation/message.js';
|
|
20
|
+
import { useCmsCommand } from '../../../../../infrastructure/operation-result/use-cms-command.js';
|
|
21
|
+
import '@radix-ui/react-avatar';
|
|
22
|
+
import '../../../shadcn/badge.js';
|
|
23
|
+
import '../../../shadcn/button.js';
|
|
24
|
+
import '@radix-ui/react-collapsible';
|
|
25
|
+
import '@radix-ui/react-dialog';
|
|
26
|
+
import '@radix-ui/react-dropdown-menu';
|
|
27
|
+
import '../../../shadcn/input-group.js';
|
|
28
|
+
import '@radix-ui/react-label';
|
|
29
|
+
import '@radix-ui/react-radio-group';
|
|
30
|
+
import '@radix-ui/react-select';
|
|
31
|
+
import { Separator } from '../../../shadcn/separator.js';
|
|
32
|
+
import '../../../shadcn/sidebar/sidebar.js';
|
|
33
|
+
import 'next-themes';
|
|
34
|
+
import 'sonner';
|
|
35
|
+
import '@radix-ui/react-tabs';
|
|
36
|
+
import '@radix-ui/react-tooltip';
|
|
37
|
+
import 'next/link';
|
|
38
|
+
import { ActionButtonsCard } from '../../../ui/cards/action-buttons-card.js';
|
|
39
|
+
import { Form } from '../../../ui/form/form.js';
|
|
40
|
+
import { FormField } from '../../../ui/form/form-field.js';
|
|
41
|
+
import { FieldsContainer } from '../../../ui/form/containers/fields-container.js';
|
|
42
|
+
import { MainFields } from '../../../ui/form/containers/main-fields.js';
|
|
43
|
+
import { SideFields } from '../../../ui/form/containers/side-fields.js';
|
|
44
|
+
import '../../../ui/inputs/input.js';
|
|
45
|
+
import { Textarea } from '../../../ui/inputs/textarea.js';
|
|
46
|
+
import { PickerInput } from '../../../ui/features/pick-modal/picker-input.js';
|
|
47
|
+
import 'next/image';
|
|
48
|
+
import { I18nFormField } from '../../../ui/i18n/i18n-form-field.js';
|
|
49
|
+
import '../../../ui/inputs/switch-input.js';
|
|
50
|
+
import '../../../ui/inputs/password-input.js';
|
|
51
|
+
import '../../../../../infrastructure/admin-session/admin-context.js';
|
|
52
|
+
import 'intor/next';
|
|
53
|
+
import { ContentContainer } from '../../../ui/layouts/content-container.js';
|
|
54
|
+
import { getVisiblePageFieldGroups } from './field-groups.js';
|
|
55
|
+
|
|
56
|
+
function createPageEditContent({
|
|
57
|
+
usePageUpdateFormData,
|
|
58
|
+
pageUpdateAction,
|
|
59
|
+
FileCard,
|
|
60
|
+
FileList,
|
|
61
|
+
Uploader,
|
|
62
|
+
webLocales
|
|
63
|
+
}) {
|
|
64
|
+
return function PageEditContent({
|
|
65
|
+
page,
|
|
66
|
+
pageKey,
|
|
67
|
+
isFetching,
|
|
68
|
+
isNotFound,
|
|
69
|
+
allowField,
|
|
70
|
+
fields
|
|
71
|
+
}) {
|
|
72
|
+
const { t, locale } = useTranslator();
|
|
73
|
+
const router = useRouter();
|
|
74
|
+
const parentPathname = useParentPathname();
|
|
75
|
+
const { formData, setFormData, isInitializing } = usePageUpdateFormData({
|
|
76
|
+
page
|
|
77
|
+
});
|
|
78
|
+
const bindText = createTranslationTextBinder(formData, setFormData);
|
|
79
|
+
const { execute, isPending, isRedirecting, fieldErrors } = useCmsCommand(
|
|
80
|
+
() => pageUpdateAction(
|
|
81
|
+
toPageUpdateInput({ id: page.id, pageKey, formData, allowField })
|
|
82
|
+
),
|
|
83
|
+
{ onSuccess: () => router.replace(parentPathname) }
|
|
84
|
+
);
|
|
85
|
+
const blocked = isFetching || isInitializing || isPending || isRedirecting || isNotFound;
|
|
86
|
+
const localizedErrors = getCmsLocalizedFieldErrors(
|
|
87
|
+
t,
|
|
88
|
+
locale,
|
|
89
|
+
fieldErrors
|
|
90
|
+
).map((error) => ({ ...error, path: error.path.replace(/^page\./, "") }));
|
|
91
|
+
const mediaErrors = getCmsFieldErrorMessageMap(localizedErrors);
|
|
92
|
+
const labels = {
|
|
93
|
+
title: t("resources.post.title.text"),
|
|
94
|
+
subtitle: t("resources.post.subtitle.text"),
|
|
95
|
+
description: t("resources.post.description.text"),
|
|
96
|
+
text1: `${t("resources.page.custom-text.text")} 1`,
|
|
97
|
+
text2: `${t("resources.page.custom-text.text")} 2`,
|
|
98
|
+
text3: `${t("resources.page.custom-text.text")} 3`,
|
|
99
|
+
text4: `${t("resources.page.custom-text.text")} 4`
|
|
100
|
+
};
|
|
101
|
+
const visibleGroups = getVisiblePageFieldGroups(fields);
|
|
102
|
+
return /* @__PURE__ */ jsx(ContentContainer, { isNotFound, children: /* @__PURE__ */ jsxs(
|
|
103
|
+
Form,
|
|
104
|
+
{
|
|
105
|
+
onSubmit: () => {
|
|
106
|
+
if (!blocked) void execute();
|
|
107
|
+
},
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ jsxs(FieldsContainer, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(MainFields, { children: visibleGroups.map((group, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
111
|
+
index > 0 && /* @__PURE__ */ jsx(Separator, { className: "my-4" }),
|
|
112
|
+
group.map((field) => {
|
|
113
|
+
const config = fields[field];
|
|
114
|
+
if (!config) return null;
|
|
115
|
+
const base = field.replace(/^section\d+/, "");
|
|
116
|
+
const labelKey = base.charAt(0).toLowerCase() + base.slice(1);
|
|
117
|
+
const section = field.match(/^section(\d+)/)?.[1];
|
|
118
|
+
const mediaField = field;
|
|
119
|
+
const isMedia = PAGE_MEDIA_FIELDS.includes(field);
|
|
120
|
+
const defaultLabel = isMedia ? t("resources.page.cover-media.text") : labels[labelKey];
|
|
121
|
+
const label = config.label?.[locale] ?? (section ? `${t("resources.page.section.text")} ${section} \xB7 ${defaultLabel}` : defaultLabel);
|
|
122
|
+
if (isMedia)
|
|
123
|
+
return /* @__PURE__ */ jsx(
|
|
124
|
+
FormField,
|
|
125
|
+
{
|
|
126
|
+
controlId: mediaField,
|
|
127
|
+
label,
|
|
128
|
+
error: mediaErrors[`${mediaField}Id`],
|
|
129
|
+
children: (controlProps) => /* @__PURE__ */ jsx(
|
|
130
|
+
PickerInput,
|
|
131
|
+
{
|
|
132
|
+
title: label,
|
|
133
|
+
controlProps,
|
|
134
|
+
value: formData[mediaField],
|
|
135
|
+
onChange: (value) => setFormData((previous) => ({
|
|
136
|
+
...previous,
|
|
137
|
+
[mediaField]: value
|
|
138
|
+
})),
|
|
139
|
+
loading: isFetching,
|
|
140
|
+
disabled: blocked,
|
|
141
|
+
renderList: (props) => /* @__PURE__ */ jsx(
|
|
142
|
+
FileList,
|
|
143
|
+
{
|
|
144
|
+
...props,
|
|
145
|
+
allowedTypes: ["IMAGE", "VIDEO"]
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
renderValue: () => /* @__PURE__ */ jsx(
|
|
149
|
+
FileCard,
|
|
150
|
+
{
|
|
151
|
+
openNewTab: true,
|
|
152
|
+
file: formData[mediaField]
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
renderManagement: ({ onItemsCreated }) => /* @__PURE__ */ jsx(
|
|
156
|
+
Uploader,
|
|
157
|
+
{
|
|
158
|
+
onItemsCreated,
|
|
159
|
+
accept: "image/*,video/*"
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
},
|
|
165
|
+
field
|
|
166
|
+
);
|
|
167
|
+
if (!PAGE_TEXT_FIELDS.includes(field))
|
|
168
|
+
return null;
|
|
169
|
+
return /* @__PURE__ */ jsx(
|
|
170
|
+
I18nFormField,
|
|
171
|
+
{
|
|
172
|
+
fieldName: field,
|
|
173
|
+
label,
|
|
174
|
+
locales: webLocales,
|
|
175
|
+
translations: formData.translations,
|
|
176
|
+
errors: localizedErrors,
|
|
177
|
+
children: ({ locale: contentLocale, controlProps }) => /* @__PURE__ */ jsx(
|
|
178
|
+
Textarea,
|
|
179
|
+
{
|
|
180
|
+
placeholder: t(
|
|
181
|
+
"resources.page.text-placeholder.text"
|
|
182
|
+
),
|
|
183
|
+
...bindText(field, contentLocale),
|
|
184
|
+
...controlProps,
|
|
185
|
+
disabled: blocked
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
},
|
|
189
|
+
field
|
|
190
|
+
);
|
|
191
|
+
})
|
|
192
|
+
] }, group[0])) }),
|
|
193
|
+
/* @__PURE__ */ jsx(SideFields, { children: /* @__PURE__ */ jsx("div", { className: "max-lg:hidden", children: /* @__PURE__ */ jsx(
|
|
194
|
+
ActionButtonsCard,
|
|
195
|
+
{
|
|
196
|
+
action: "update",
|
|
197
|
+
isInitializing,
|
|
198
|
+
isProcessing: blocked
|
|
199
|
+
}
|
|
200
|
+
) }) })
|
|
201
|
+
] }),
|
|
202
|
+
/* @__PURE__ */ jsx("div", { className: "fixed bottom-3 left-1/2 z-10 -translate-x-1/2 lg:hidden", children: /* @__PURE__ */ jsx(
|
|
203
|
+
ActionButtonsCard,
|
|
204
|
+
{
|
|
205
|
+
action: "update",
|
|
206
|
+
isInitializing,
|
|
207
|
+
isProcessing: blocked
|
|
208
|
+
}
|
|
209
|
+
) })
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
) });
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export { createPageEditContent };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslator } from 'intor/react';
|
|
4
|
+
import { Fragment } from 'react';
|
|
5
|
+
import { PAGE_MEDIA_FIELDS } from 'sitero-domain';
|
|
6
|
+
import '@radix-ui/react-avatar';
|
|
7
|
+
import 'mime-types';
|
|
8
|
+
import 'ua-parser-js';
|
|
9
|
+
import '../../../../../../../shared/client/react-query/client.js';
|
|
10
|
+
import '@tanstack/react-query';
|
|
11
|
+
import 'clsx';
|
|
12
|
+
import 'tailwind-merge';
|
|
13
|
+
import '../../../shadcn/badge.js';
|
|
14
|
+
import '../../../shadcn/button.js';
|
|
15
|
+
import '@radix-ui/react-collapsible';
|
|
16
|
+
import '@radix-ui/react-dialog';
|
|
17
|
+
import 'lucide-react';
|
|
18
|
+
import '@radix-ui/react-dropdown-menu';
|
|
19
|
+
import '../../../shadcn/input-group.js';
|
|
20
|
+
import '@radix-ui/react-label';
|
|
21
|
+
import '@radix-ui/react-radio-group';
|
|
22
|
+
import '@radix-ui/react-select';
|
|
23
|
+
import { Separator } from '../../../shadcn/separator.js';
|
|
24
|
+
import '../../../shadcn/sidebar/sidebar.js';
|
|
25
|
+
import 'next-themes';
|
|
26
|
+
import 'sonner';
|
|
27
|
+
import '@radix-ui/react-tabs';
|
|
28
|
+
import '@radix-ui/react-tooltip';
|
|
29
|
+
import { Field } from '../../../ui/form/field.js';
|
|
30
|
+
import { FieldBody } from '../../../ui/form/field-body.js';
|
|
31
|
+
import { FieldsContainer } from '../../../ui/form/containers/fields-container.js';
|
|
32
|
+
import { MainFields } from '../../../ui/form/containers/main-fields.js';
|
|
33
|
+
import '../../../ui/inputs/input.js';
|
|
34
|
+
import '../../../ui/inputs/textarea.js';
|
|
35
|
+
import { I18nDisplayField } from '../../../ui/i18n/i18n-display-field.js';
|
|
36
|
+
import '../../../../../infrastructure/admin-session/admin-context.js';
|
|
37
|
+
import 'next/link';
|
|
38
|
+
import 'next/navigation';
|
|
39
|
+
import '../../../../../../../constants/paths/redirect.js';
|
|
40
|
+
import '../../../../../../../constants/cms-locale.js';
|
|
41
|
+
import 'intor/next';
|
|
42
|
+
import 'zod';
|
|
43
|
+
import { ContentContainer } from '../../../ui/layouts/content-container.js';
|
|
44
|
+
import { getVisiblePageFieldGroups } from './field-groups.js';
|
|
45
|
+
|
|
46
|
+
function createPageShowContent({
|
|
47
|
+
FileCard,
|
|
48
|
+
webLocales
|
|
49
|
+
}) {
|
|
50
|
+
return function PageShowContent({
|
|
51
|
+
page,
|
|
52
|
+
fields,
|
|
53
|
+
isFetching,
|
|
54
|
+
isNotFound
|
|
55
|
+
}) {
|
|
56
|
+
const { t, locale } = useTranslator();
|
|
57
|
+
const labels = {
|
|
58
|
+
title: t("resources.post.title.text"),
|
|
59
|
+
subtitle: t("resources.post.subtitle.text"),
|
|
60
|
+
description: t("resources.post.description.text"),
|
|
61
|
+
text1: `${t("resources.page.custom-text.text")} 1`,
|
|
62
|
+
text2: `${t("resources.page.custom-text.text")} 2`,
|
|
63
|
+
text3: `${t("resources.page.custom-text.text")} 3`,
|
|
64
|
+
text4: `${t("resources.page.custom-text.text")} 4`
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsx(ContentContainer, { isNotFound, children: /* @__PURE__ */ jsx(FieldsContainer, { children: /* @__PURE__ */ jsx(MainFields, { children: getVisiblePageFieldGroups(fields).map((group, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
|
+
index > 0 && /* @__PURE__ */ jsx(Separator, { className: "my-4" }),
|
|
68
|
+
group.map((field) => {
|
|
69
|
+
const isMedia = PAGE_MEDIA_FIELDS.includes(field);
|
|
70
|
+
const section = field.match(/^section(\d+)/)?.[1];
|
|
71
|
+
const base = field.replace(/^section\d+/, "");
|
|
72
|
+
const labelKey = base.charAt(0).toLowerCase() + base.slice(1);
|
|
73
|
+
const defaultLabel = isMedia ? t("resources.page.cover-media.text") : labels[labelKey];
|
|
74
|
+
const label = fields[field]?.label?.[locale] ?? (section ? `${t("resources.page.section.text")} ${section} \xB7 ${defaultLabel}` : defaultLabel);
|
|
75
|
+
if (isMedia)
|
|
76
|
+
return /* @__PURE__ */ jsx(Field, { label, children: /* @__PURE__ */ jsx(
|
|
77
|
+
FieldBody,
|
|
78
|
+
{
|
|
79
|
+
isLoading: isFetching,
|
|
80
|
+
isEmpty: !page?.[field],
|
|
81
|
+
children: /* @__PURE__ */ jsx(
|
|
82
|
+
FileCard,
|
|
83
|
+
{
|
|
84
|
+
file: page?.[field] ?? null,
|
|
85
|
+
openNewTab: true
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
) }, field);
|
|
90
|
+
return /* @__PURE__ */ jsx(
|
|
91
|
+
I18nDisplayField,
|
|
92
|
+
{
|
|
93
|
+
fieldName: field,
|
|
94
|
+
label,
|
|
95
|
+
locales: webLocales,
|
|
96
|
+
translations: page?.translations,
|
|
97
|
+
children: ({ value }) => /* @__PURE__ */ jsx(
|
|
98
|
+
FieldBody,
|
|
99
|
+
{
|
|
100
|
+
isLoading: isFetching,
|
|
101
|
+
isEmpty: !value,
|
|
102
|
+
className: "whitespace-pre-line",
|
|
103
|
+
children: value
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
},
|
|
107
|
+
field
|
|
108
|
+
);
|
|
109
|
+
})
|
|
110
|
+
] }, group[0])) }) }) });
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export { createPageShowContent };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function resolvePageFields(rules, pageKey) {
|
|
2
|
+
return (pageKey && Object.hasOwn(rules, pageKey) ? rules[pageKey] : void 0) ?? rules.default;
|
|
3
|
+
}
|
|
4
|
+
function createAllowPageField(rules) {
|
|
5
|
+
return ({ pageKey, field }) => {
|
|
6
|
+
if (!field) return false;
|
|
7
|
+
const fields = resolvePageFields(rules, pageKey);
|
|
8
|
+
return Object.hasOwn(fields, field) && fields[field] !== void 0;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { createAllowPageField, resolvePageFields };
|
|
@@ -41,12 +41,16 @@ import { PostStateIcons } from '../post-state-icons.js';
|
|
|
41
41
|
|
|
42
42
|
const WIDTH = "200px";
|
|
43
43
|
function createCategoryCard({
|
|
44
|
-
|
|
44
|
+
topics = {},
|
|
45
|
+
defaultWebLocale,
|
|
46
|
+
customControlFields: defaultCustomControlFields = []
|
|
45
47
|
}) {
|
|
46
48
|
return function CategoryCard({
|
|
47
49
|
post: category,
|
|
48
50
|
topicSlug,
|
|
49
51
|
isSubcategory,
|
|
52
|
+
customControlFields = defaultCustomControlFields,
|
|
53
|
+
usableFields,
|
|
50
54
|
// link
|
|
51
55
|
openNewTab,
|
|
52
56
|
// pick
|
|
@@ -55,9 +59,10 @@ function createCategoryCard({
|
|
|
55
59
|
// base
|
|
56
60
|
className = ""
|
|
57
61
|
}) {
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
|
|
62
|
+
const resolvedTopicSlug = category.topicKey ?? topicSlug;
|
|
63
|
+
const topicT = {
|
|
64
|
+
title: topics[category.topicKey ?? ""]?.title[defaultWebLocale] ?? category.topicKey ?? ""
|
|
65
|
+
};
|
|
61
66
|
const categoryT = findTranslation(category?.translations, defaultWebLocale);
|
|
62
67
|
const href = isSubcategory ? joinUrl(
|
|
63
68
|
CMS_PATHS.content["content-management"].subcategory.pathname(
|
|
@@ -75,7 +80,14 @@ function createCategoryCard({
|
|
|
75
80
|
{
|
|
76
81
|
interaction: onSelect ? { type: "select", isSelected: !!isPicked, onSelect } : { type: "navigate", href, openNewTab },
|
|
77
82
|
identity: { icon: /* @__PURE__ */ jsx(Notebook, {}), badge: topicT.title },
|
|
78
|
-
state: /* @__PURE__ */ jsx(
|
|
83
|
+
state: /* @__PURE__ */ jsx(
|
|
84
|
+
PostStateIcons,
|
|
85
|
+
{
|
|
86
|
+
post: category,
|
|
87
|
+
customControlFields,
|
|
88
|
+
usableFields
|
|
89
|
+
}
|
|
90
|
+
),
|
|
79
91
|
title: categoryT.title || /* @__PURE__ */ jsx(NoData, {}),
|
|
80
92
|
className,
|
|
81
93
|
style: { width: WIDTH }
|
|
@@ -42,8 +42,11 @@ import 'next/image';
|
|
|
42
42
|
import { PostStateIcons } from '../post-state-icons.js';
|
|
43
43
|
|
|
44
44
|
function CategoryTable({
|
|
45
|
+
topics = {},
|
|
45
46
|
posts: categories,
|
|
46
47
|
contentLocale,
|
|
48
|
+
customControlFields,
|
|
49
|
+
usableFields,
|
|
47
50
|
pickedItems,
|
|
48
51
|
onSelect,
|
|
49
52
|
openNewTab,
|
|
@@ -60,8 +63,9 @@ function CategoryTable({
|
|
|
60
63
|
/* @__PURE__ */ jsx(TableHead, { children: t("resources.post.title.text") })
|
|
61
64
|
] }) }),
|
|
62
65
|
/* @__PURE__ */ jsx(TableBody, { children: categories.map((category) => {
|
|
63
|
-
const
|
|
64
|
-
|
|
66
|
+
const topicT = {
|
|
67
|
+
title: topics[category.topicKey ?? ""]?.title[contentLocale] ?? category.topicKey ?? ""
|
|
68
|
+
};
|
|
65
69
|
const isPicked = !!pickedItems?.some(
|
|
66
70
|
(item) => item.id === category.id
|
|
67
71
|
);
|
|
@@ -71,12 +75,12 @@ function CategoryTable({
|
|
|
71
75
|
);
|
|
72
76
|
const href = isSubcategory ? joinUrl(
|
|
73
77
|
CMS_PATHS.content["content-management"].subcategory.pathname(
|
|
74
|
-
|
|
78
|
+
category.topicKey ?? void 0
|
|
75
79
|
),
|
|
76
80
|
category?.id
|
|
77
81
|
) : joinUrl(
|
|
78
82
|
CMS_PATHS.content["content-management"].category.pathname(
|
|
79
|
-
|
|
83
|
+
category.topicKey ?? void 0
|
|
80
84
|
),
|
|
81
85
|
category?.id
|
|
82
86
|
);
|
|
@@ -116,7 +120,14 @@ function CategoryTable({
|
|
|
116
120
|
isSelecting && /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("div", { className: "flex-center text-muted-foreground/60", children: isPicked ? /* @__PURE__ */ jsx(Tick, { isPicked: true }) : /* @__PURE__ */ jsx(Circle, { "aria-hidden": true, className: "size-5!" }) }) }),
|
|
117
121
|
/* @__PURE__ */ jsx(TableCell, { className: "border-r", children: /* @__PURE__ */ jsx("div", { className: "flex-center", children: /* @__PURE__ */ jsx(Notebook, { className: "text-muted-foreground" }) }) }),
|
|
118
122
|
/* @__PURE__ */ jsx(TableCell, { className: "w-40", children: /* @__PURE__ */ jsx(Badge, { className: "h-5.5 w-fit max-w-32 min-w-0 px-3", children: topicT.title }) }),
|
|
119
|
-
/* @__PURE__ */ jsx(TableCell, { className: "w-40", children: /* @__PURE__ */ jsx(
|
|
123
|
+
/* @__PURE__ */ jsx(TableCell, { className: "w-40", children: /* @__PURE__ */ jsx(
|
|
124
|
+
PostStateIcons,
|
|
125
|
+
{
|
|
126
|
+
post: category,
|
|
127
|
+
customControlFields,
|
|
128
|
+
usableFields
|
|
129
|
+
}
|
|
130
|
+
) }),
|
|
120
131
|
/* @__PURE__ */ jsx(TableCell, { className: "max-w-[200px]", children: title ? /* @__PURE__ */ jsx("p", { className: "truncate", children: title }) : /* @__PURE__ */ jsx(NoData, {}) })
|
|
121
132
|
]
|
|
122
133
|
},
|
package/dist/src/cms/client/interfaces/components/resources/post/content/post-create-content.js
CHANGED
|
@@ -89,7 +89,7 @@ function createPostCreateContent({
|
|
|
89
89
|
CategoryCard = DefaultCategoryCard,
|
|
90
90
|
CategoryTable: CategoryTable$1 = CategoryTable,
|
|
91
91
|
tagType = POST_TYPES.TAG,
|
|
92
|
-
|
|
92
|
+
topicKey,
|
|
93
93
|
// Use in post, category
|
|
94
94
|
controlMeta,
|
|
95
95
|
isFetching,
|
|
@@ -102,12 +102,12 @@ function createPostCreateContent({
|
|
|
102
102
|
const parentPathname = useParentPathname();
|
|
103
103
|
const { admin } = useAdmin();
|
|
104
104
|
const editorLocale = cmsLocale.startsWith("zh") ? "zh" : "en";
|
|
105
|
-
const topicSlug =
|
|
105
|
+
const topicSlug = topicKey;
|
|
106
106
|
const isFieldAllowed = (type, field, fieldRuleKey) => allowField({ topicSlug, type, field, fieldRuleKey });
|
|
107
107
|
const { formData, setFormData } = usePostCreateFormData({
|
|
108
108
|
type: postType,
|
|
109
109
|
admin,
|
|
110
|
-
|
|
110
|
+
topicKey
|
|
111
111
|
});
|
|
112
112
|
const bindTranslationText = createTranslationTextBinder(
|
|
113
113
|
formData,
|
|
@@ -207,7 +207,7 @@ function createPostCreateContent({
|
|
|
207
207
|
)
|
|
208
208
|
],
|
|
209
209
|
type: parentType,
|
|
210
|
-
|
|
210
|
+
topicKey,
|
|
211
211
|
Card: (props) => /* @__PURE__ */ jsx(
|
|
212
212
|
CategoryCard,
|
|
213
213
|
{
|
|
@@ -230,7 +230,7 @@ function createPostCreateContent({
|
|
|
230
230
|
{
|
|
231
231
|
openNewTab: true,
|
|
232
232
|
post: parent,
|
|
233
|
-
topicSlug:
|
|
233
|
+
topicSlug: topicKey,
|
|
234
234
|
isSubcategory: isSubcategoryParent
|
|
235
235
|
},
|
|
236
236
|
parent.id
|
|
@@ -571,7 +571,7 @@ function createPostCreateContent({
|
|
|
571
571
|
)
|
|
572
572
|
],
|
|
573
573
|
type: postType,
|
|
574
|
-
|
|
574
|
+
topicKey
|
|
575
575
|
}
|
|
576
576
|
),
|
|
577
577
|
renderValue: () => formData.relatedPosts.map((relatedPost) => /* @__PURE__ */ jsx(
|
|
@@ -579,7 +579,7 @@ function createPostCreateContent({
|
|
|
579
579
|
{
|
|
580
580
|
openNewTab: true,
|
|
581
581
|
post: relatedPost,
|
|
582
|
-
topicSlug:
|
|
582
|
+
topicSlug: topicKey
|
|
583
583
|
},
|
|
584
584
|
relatedPost.id
|
|
585
585
|
))
|
|
@@ -603,7 +603,12 @@ function createPostCreateContent({
|
|
|
603
603
|
ControlFields,
|
|
604
604
|
{
|
|
605
605
|
fields: [
|
|
606
|
-
...isFieldAllowed(postType, "isActive") ? [
|
|
606
|
+
...isFieldAllowed(postType, "isActive") ? [
|
|
607
|
+
{
|
|
608
|
+
key: "isActive",
|
|
609
|
+
label: t("resources.post.is-public.text")
|
|
610
|
+
}
|
|
611
|
+
] : [],
|
|
607
612
|
...isFieldAllowed(postType, "isIndexActive") ? [{ key: "isIndexActive" }] : [],
|
|
608
613
|
...isFieldAllowed(postType, "isSlugActive") ? [{ key: "isSlugActive" }] : [],
|
|
609
614
|
...isFieldAllowed(postType, "isFeatured") ? [{ key: "isFeatured" }] : [],
|