@strapi/content-manager 0.0.0-experimental.e0df4d50334a17a1beb3d203bff414fbbff62f7b → 0.0.0-experimental.e100737b0ed96d0d80a5c6f4925c7374e63a342a
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/admin/components/ComponentIcon.js +176 -0
- package/dist/admin/components/ComponentIcon.js.map +1 -0
- package/dist/admin/components/ComponentIcon.mjs +153 -0
- package/dist/admin/components/ComponentIcon.mjs.map +1 -0
- package/dist/admin/components/ConfigurationForm/EditFieldForm.js +259 -0
- package/dist/admin/components/ConfigurationForm/EditFieldForm.js.map +1 -0
- package/dist/admin/components/ConfigurationForm/EditFieldForm.mjs +238 -0
- package/dist/admin/components/ConfigurationForm/EditFieldForm.mjs.map +1 -0
- package/dist/admin/components/ConfigurationForm/Fields.js +534 -0
- package/dist/admin/components/ConfigurationForm/Fields.js.map +1 -0
- package/dist/admin/components/ConfigurationForm/Fields.mjs +512 -0
- package/dist/admin/components/ConfigurationForm/Fields.mjs.map +1 -0
- package/dist/admin/components/ConfigurationForm/Form.js +253 -0
- package/dist/admin/components/ConfigurationForm/Form.js.map +1 -0
- package/dist/admin/components/ConfigurationForm/Form.mjs +232 -0
- package/dist/admin/components/ConfigurationForm/Form.mjs.map +1 -0
- package/dist/admin/components/DragLayer.js +50 -0
- package/dist/admin/components/DragLayer.js.map +1 -0
- package/dist/admin/components/DragLayer.mjs +48 -0
- package/dist/admin/components/DragLayer.mjs.map +1 -0
- package/dist/admin/components/DragPreviews/CardDragPreview.js +82 -0
- package/dist/admin/components/DragPreviews/CardDragPreview.js.map +1 -0
- package/dist/admin/components/DragPreviews/CardDragPreview.mjs +80 -0
- package/dist/admin/components/DragPreviews/CardDragPreview.mjs.map +1 -0
- package/dist/admin/components/DragPreviews/ComponentDragPreview.js +83 -0
- package/dist/admin/components/DragPreviews/ComponentDragPreview.js.map +1 -0
- package/dist/admin/components/DragPreviews/ComponentDragPreview.mjs +81 -0
- package/dist/admin/components/DragPreviews/ComponentDragPreview.mjs.map +1 -0
- package/dist/admin/components/DragPreviews/RelationDragPreview.js +73 -0
- package/dist/admin/components/DragPreviews/RelationDragPreview.js.map +1 -0
- package/dist/admin/components/DragPreviews/RelationDragPreview.mjs +71 -0
- package/dist/admin/components/DragPreviews/RelationDragPreview.mjs.map +1 -0
- package/dist/admin/components/FieldTypeIcon.js +58 -0
- package/dist/admin/components/FieldTypeIcon.js.map +1 -0
- package/dist/admin/components/FieldTypeIcon.mjs +56 -0
- package/dist/admin/components/FieldTypeIcon.mjs.map +1 -0
- package/dist/admin/components/InjectionZone.js +44 -0
- package/dist/admin/components/InjectionZone.js.map +1 -0
- package/dist/admin/components/InjectionZone.mjs +40 -0
- package/dist/admin/components/InjectionZone.mjs.map +1 -0
- package/dist/admin/components/LeftMenu.js +172 -0
- package/dist/admin/components/LeftMenu.js.map +1 -0
- package/dist/admin/components/LeftMenu.mjs +151 -0
- package/dist/admin/components/LeftMenu.mjs.map +1 -0
- package/dist/admin/components/RelativeTime.js +76 -0
- package/dist/admin/components/RelativeTime.js.map +1 -0
- package/dist/admin/components/RelativeTime.mjs +55 -0
- package/dist/admin/components/RelativeTime.mjs.map +1 -0
- package/dist/admin/constants/attributes.js +48 -0
- package/dist/admin/constants/attributes.js.map +1 -0
- package/dist/admin/constants/attributes.mjs +38 -0
- package/dist/admin/constants/attributes.mjs.map +1 -0
- package/dist/admin/constants/collections.js +8 -0
- package/dist/admin/constants/collections.js.map +1 -0
- package/dist/admin/constants/collections.mjs +5 -0
- package/dist/admin/constants/collections.mjs.map +1 -0
- package/dist/admin/constants/dragAndDrop.js +13 -0
- package/dist/admin/constants/dragAndDrop.js.map +1 -0
- package/dist/admin/constants/dragAndDrop.mjs +11 -0
- package/dist/admin/constants/dragAndDrop.mjs.map +1 -0
- package/dist/admin/constants/hooks.js +27 -0
- package/dist/admin/constants/hooks.js.map +1 -0
- package/dist/admin/constants/hooks.mjs +25 -0
- package/dist/admin/constants/hooks.mjs.map +1 -0
- package/dist/admin/constants/plugin.js +14 -0
- package/dist/admin/constants/plugin.js.map +1 -0
- package/dist/admin/constants/plugin.mjs +11 -0
- package/dist/admin/constants/plugin.mjs.map +1 -0
- package/dist/admin/content-manager.js +133 -0
- package/dist/admin/content-manager.js.map +1 -0
- package/dist/admin/content-manager.mjs +131 -0
- package/dist/admin/content-manager.mjs.map +1 -0
- package/dist/admin/features/DocumentContext.js +71 -0
- package/dist/admin/features/DocumentContext.js.map +1 -0
- package/dist/admin/features/DocumentContext.mjs +49 -0
- package/dist/admin/features/DocumentContext.mjs.map +1 -0
- package/dist/admin/features/DocumentRBAC.js +126 -0
- package/dist/admin/features/DocumentRBAC.js.map +1 -0
- package/dist/admin/features/DocumentRBAC.mjs +104 -0
- package/dist/admin/features/DocumentRBAC.mjs.map +1 -0
- package/dist/admin/history/components/HistoryAction.js +61 -0
- package/dist/admin/history/components/HistoryAction.js.map +1 -0
- package/dist/admin/history/components/HistoryAction.mjs +59 -0
- package/dist/admin/history/components/HistoryAction.mjs.map +1 -0
- package/dist/admin/history/components/VersionContent.js +264 -0
- package/dist/admin/history/components/VersionContent.js.map +1 -0
- package/dist/admin/history/components/VersionContent.mjs +242 -0
- package/dist/admin/history/components/VersionContent.mjs.map +1 -0
- package/dist/admin/history/components/VersionHeader.js +210 -0
- package/dist/admin/history/components/VersionHeader.js.map +1 -0
- package/dist/admin/history/components/VersionHeader.mjs +189 -0
- package/dist/admin/history/components/VersionHeader.mjs.map +1 -0
- package/dist/admin/history/components/VersionInputRenderer.js +490 -0
- package/dist/admin/history/components/VersionInputRenderer.js.map +1 -0
- package/dist/admin/history/components/VersionInputRenderer.mjs +469 -0
- package/dist/admin/history/components/VersionInputRenderer.mjs.map +1 -0
- package/dist/admin/history/components/VersionsList.js +210 -0
- package/dist/admin/history/components/VersionsList.js.map +1 -0
- package/dist/admin/history/components/VersionsList.mjs +208 -0
- package/dist/admin/history/components/VersionsList.mjs.map +1 -0
- package/dist/admin/history/index.js +21 -0
- package/dist/admin/history/index.js.map +1 -0
- package/dist/admin/history/index.mjs +19 -0
- package/dist/admin/history/index.mjs.map +1 -0
- package/dist/admin/history/pages/History.js +228 -0
- package/dist/admin/history/pages/History.js.map +1 -0
- package/dist/admin/history/pages/History.mjs +205 -0
- package/dist/admin/history/pages/History.mjs.map +1 -0
- package/dist/admin/history/routes.js +41 -0
- package/dist/admin/history/routes.js.map +1 -0
- package/dist/admin/history/routes.mjs +20 -0
- package/dist/admin/history/routes.mjs.map +1 -0
- package/dist/admin/history/services/historyVersion.js +46 -0
- package/dist/admin/history/services/historyVersion.js.map +1 -0
- package/dist/admin/history/services/historyVersion.mjs +43 -0
- package/dist/admin/history/services/historyVersion.mjs.map +1 -0
- package/dist/admin/hooks/useContentManagerInitData.js +166 -0
- package/dist/admin/hooks/useContentManagerInitData.js.map +1 -0
- package/dist/admin/hooks/useContentManagerInitData.mjs +164 -0
- package/dist/admin/hooks/useContentManagerInitData.mjs.map +1 -0
- package/dist/admin/hooks/useContentTypeSchema.js +115 -0
- package/dist/admin/hooks/useContentTypeSchema.js.map +1 -0
- package/dist/admin/hooks/useContentTypeSchema.mjs +93 -0
- package/dist/admin/hooks/useContentTypeSchema.mjs.map +1 -0
- package/dist/admin/hooks/useDebounce.js +22 -0
- package/dist/admin/hooks/useDebounce.js.map +1 -0
- package/dist/admin/hooks/useDebounce.mjs +20 -0
- package/dist/admin/hooks/useDebounce.mjs.map +1 -0
- package/dist/admin/hooks/useDocument.js +244 -0
- package/dist/admin/hooks/useDocument.js.map +1 -0
- package/dist/admin/hooks/useDocument.mjs +221 -0
- package/dist/admin/hooks/useDocument.mjs.map +1 -0
- package/dist/admin/hooks/useDocumentActions.js +596 -0
- package/dist/admin/hooks/useDocumentActions.js.map +1 -0
- package/dist/admin/hooks/useDocumentActions.mjs +575 -0
- package/dist/admin/hooks/useDocumentActions.mjs.map +1 -0
- package/dist/admin/hooks/useDocumentLayout.js +311 -0
- package/dist/admin/hooks/useDocumentLayout.js.map +1 -0
- package/dist/admin/hooks/useDocumentLayout.mjs +286 -0
- package/dist/admin/hooks/useDocumentLayout.mjs.map +1 -0
- package/dist/admin/hooks/useDragAndDrop.js +193 -0
- package/dist/admin/hooks/useDragAndDrop.js.map +1 -0
- package/dist/admin/hooks/useDragAndDrop.mjs +170 -0
- package/dist/admin/hooks/useDragAndDrop.mjs.map +1 -0
- package/dist/admin/hooks/useKeyboardDragAndDrop.js +94 -0
- package/dist/admin/hooks/useKeyboardDragAndDrop.js.map +1 -0
- package/dist/admin/hooks/useKeyboardDragAndDrop.mjs +73 -0
- package/dist/admin/hooks/useKeyboardDragAndDrop.mjs.map +1 -0
- package/dist/admin/hooks/useLazyComponents.js +61 -0
- package/dist/admin/hooks/useLazyComponents.js.map +1 -0
- package/dist/admin/hooks/useLazyComponents.mjs +59 -0
- package/dist/admin/hooks/useLazyComponents.mjs.map +1 -0
- package/dist/admin/hooks/useOnce.js +28 -0
- package/dist/admin/hooks/useOnce.js.map +1 -0
- package/dist/admin/hooks/useOnce.mjs +7 -0
- package/dist/admin/hooks/useOnce.mjs.map +1 -0
- package/dist/admin/hooks/usePrev.js +16 -0
- package/dist/admin/hooks/usePrev.js.map +1 -0
- package/dist/admin/hooks/usePrev.mjs +14 -0
- package/dist/admin/hooks/usePrev.mjs.map +1 -0
- package/dist/admin/index.js +118 -25
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +111 -16
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/layout.js +142 -0
- package/dist/admin/layout.js.map +1 -0
- package/dist/admin/layout.mjs +121 -0
- package/dist/admin/layout.mjs.map +1 -0
- package/dist/admin/modules/app.js +33 -0
- package/dist/admin/modules/app.js.map +1 -0
- package/dist/admin/modules/app.mjs +30 -0
- package/dist/admin/modules/app.mjs.map +1 -0
- package/dist/admin/modules/hooks.js +10 -0
- package/dist/admin/modules/hooks.js.map +1 -0
- package/dist/admin/modules/hooks.mjs +7 -0
- package/dist/admin/modules/hooks.mjs.map +1 -0
- package/dist/admin/modules/reducers.js +11 -0
- package/dist/admin/modules/reducers.js.map +1 -0
- package/dist/admin/modules/reducers.mjs +9 -0
- package/dist/admin/modules/reducers.mjs.map +1 -0
- package/dist/admin/pages/ComponentConfigurationPage.js +248 -0
- package/dist/admin/pages/ComponentConfigurationPage.js.map +1 -0
- package/dist/admin/pages/ComponentConfigurationPage.mjs +226 -0
- package/dist/admin/pages/ComponentConfigurationPage.mjs.map +1 -0
- package/dist/admin/pages/EditConfigurationPage.js +164 -0
- package/dist/admin/pages/EditConfigurationPage.js.map +1 -0
- package/dist/admin/pages/EditConfigurationPage.mjs +142 -0
- package/dist/admin/pages/EditConfigurationPage.mjs.map +1 -0
- package/dist/admin/pages/EditView/EditViewPage.js +243 -0
- package/dist/admin/pages/EditView/EditViewPage.js.map +1 -0
- package/dist/admin/pages/EditView/EditViewPage.mjs +239 -0
- package/dist/admin/pages/EditView/EditViewPage.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/DocumentActions.js +966 -0
- package/dist/admin/pages/EditView/components/DocumentActions.js.map +1 -0
- package/dist/admin/pages/EditView/components/DocumentActions.mjs +942 -0
- package/dist/admin/pages/EditView/components/DocumentActions.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/DocumentStatus.js +34 -0
- package/dist/admin/pages/EditView/components/DocumentStatus.js.map +1 -0
- package/dist/admin/pages/EditView/components/DocumentStatus.mjs +32 -0
- package/dist/admin/pages/EditView/components/DocumentStatus.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/EditorToolbarObserver.js +120 -0
- package/dist/admin/pages/EditView/components/EditorToolbarObserver.js.map +1 -0
- package/dist/admin/pages/EditView/components/EditorToolbarObserver.mjs +99 -0
- package/dist/admin/pages/EditView/components/EditorToolbarObserver.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.js +224 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.mjs +201 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Heading.js +165 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Heading.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Heading.mjs +163 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Heading.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Image.js +230 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Image.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Image.mjs +209 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Image.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Link.js +232 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Link.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Link.mjs +211 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Link.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.js +360 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.mjs +358 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/List.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Paragraph.js +95 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Paragraph.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Paragraph.mjs +93 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Paragraph.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Quote.js +49 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Quote.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Quote.mjs +47 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Blocks/Quote.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.js +532 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.mjs +511 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksContent.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksEditor.js +222 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksEditor.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksEditor.mjs +198 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksEditor.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.js +64 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.mjs +43 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksToolbar.js +635 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksToolbar.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksToolbar.mjs +612 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/BlocksToolbar.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.js +138 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.mjs +117 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/EditorLayout.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Modifiers.js +134 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Modifiers.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Modifiers.mjs +132 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/Modifiers.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withImages.js +17 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withImages.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withImages.mjs +15 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withImages.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withLinks.js +75 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withLinks.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withLinks.mjs +73 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withLinks.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withStrapiSchema.js +32 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withStrapiSchema.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withStrapiSchema.mjs +30 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/plugins/withStrapiSchema.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/constants.js +223 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/constants.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/constants.mjs +221 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/constants.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/conversions.js +48 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/conversions.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/conversions.mjs +45 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/conversions.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/enterKey.js +64 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/enterKey.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/enterKey.mjs +62 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/enterKey.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/links.js +84 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/links.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/links.mjs +80 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/links.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/types.js +18 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/types.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/types.mjs +13 -0
- package/dist/admin/pages/EditView/components/FormInputs/BlocksInput/utils/types.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Initializer.js +59 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Initializer.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Initializer.mjs +57 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Initializer.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Input.js +106 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Input.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Input.mjs +85 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Input.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.js +70 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.mjs +68 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js +414 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs +393 -0
- package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/ComponentContext.js +21 -0
- package/dist/admin/pages/EditView/components/FormInputs/ComponentContext.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/ComponentContext.mjs +18 -0
- package/dist/admin/pages/EditView/components/FormInputs/ComponentContext.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/AddComponentButton.js +58 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/AddComponentButton.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/AddComponentButton.mjs +56 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/AddComponentButton.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.js +103 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.mjs +101 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentPicker.js +56 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentPicker.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentPicker.mjs +54 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/ComponentPicker.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js +337 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs +316 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicZoneLabel.js +73 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicZoneLabel.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicZoneLabel.mjs +71 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicZoneLabel.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.js +253 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.mjs +231 -0
- package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/NotAllowed.js +38 -0
- package/dist/admin/pages/EditView/components/FormInputs/NotAllowed.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/NotAllowed.mjs +36 -0
- package/dist/admin/pages/EditView/components/FormInputs/NotAllowed.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/RelationModal.js +460 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/RelationModal.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/RelationModal.mjs +438 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/RelationModal.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js +868 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs +844 -0
- package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/UID.js +294 -0
- package/dist/admin/pages/EditView/components/FormInputs/UID.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/UID.mjs +273 -0
- package/dist/admin/pages/EditView/components/FormInputs/UID.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Editor.js +463 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Editor.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Editor.mjs +442 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Editor.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.js +161 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.mjs +139 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.js +119 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.mjs +98 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/Field.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/PreviewWysiwyg.js +209 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/PreviewWysiwyg.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/PreviewWysiwyg.mjs +188 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/PreviewWysiwyg.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.js +39 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.mjs +37 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.js +528 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.mjs +526 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.js +42 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.mjs +40 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/continueList.js +84 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/continueList.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/continueList.mjs +82 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/continueList.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/mdRenderer.js +45 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/mdRenderer.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/mdRenderer.mjs +43 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/mdRenderer.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/utils.js +364 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/utils.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/utils.mjs +355 -0
- package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/utils/utils.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/FormLayout.js +106 -0
- package/dist/admin/pages/EditView/components/FormLayout.js.map +1 -0
- package/dist/admin/pages/EditView/components/FormLayout.mjs +101 -0
- package/dist/admin/pages/EditView/components/FormLayout.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/Header.js +472 -0
- package/dist/admin/pages/EditView/components/Header.js.map +1 -0
- package/dist/admin/pages/EditView/components/Header.mjs +450 -0
- package/dist/admin/pages/EditView/components/Header.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/InputRenderer.js +256 -0
- package/dist/admin/pages/EditView/components/InputRenderer.js.map +1 -0
- package/dist/admin/pages/EditView/components/InputRenderer.mjs +234 -0
- package/dist/admin/pages/EditView/components/InputRenderer.mjs.map +1 -0
- package/dist/admin/pages/EditView/components/Panels.js +141 -0
- package/dist/admin/pages/EditView/components/Panels.js.map +1 -0
- package/dist/admin/pages/EditView/components/Panels.mjs +119 -0
- package/dist/admin/pages/EditView/components/Panels.mjs.map +1 -0
- package/dist/admin/pages/EditView/utils/data.js +135 -0
- package/dist/admin/pages/EditView/utils/data.js.map +1 -0
- package/dist/admin/pages/EditView/utils/data.mjs +129 -0
- package/dist/admin/pages/EditView/utils/data.mjs.map +1 -0
- package/dist/admin/pages/EditView/utils/forms.js +32 -0
- package/dist/admin/pages/EditView/utils/forms.js.map +1 -0
- package/dist/admin/pages/EditView/utils/forms.mjs +30 -0
- package/dist/admin/pages/EditView/utils/forms.mjs.map +1 -0
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.js +178 -0
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.js.map +1 -0
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.mjs +156 -0
- package/dist/admin/pages/ListConfiguration/ListConfigurationPage.mjs.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/DraggableCard.js +200 -0
- package/dist/admin/pages/ListConfiguration/components/DraggableCard.js.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/DraggableCard.mjs +179 -0
- package/dist/admin/pages/ListConfiguration/components/DraggableCard.mjs.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/EditFieldForm.js +158 -0
- package/dist/admin/pages/ListConfiguration/components/EditFieldForm.js.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/EditFieldForm.mjs +137 -0
- package/dist/admin/pages/ListConfiguration/components/EditFieldForm.mjs.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/Header.js +45 -0
- package/dist/admin/pages/ListConfiguration/components/Header.js.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/Header.mjs +43 -0
- package/dist/admin/pages/ListConfiguration/components/Header.mjs.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/Settings.js +201 -0
- package/dist/admin/pages/ListConfiguration/components/Settings.js.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/Settings.mjs +180 -0
- package/dist/admin/pages/ListConfiguration/components/Settings.mjs.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/SortDisplayedFields.js +171 -0
- package/dist/admin/pages/ListConfiguration/components/SortDisplayedFields.js.map +1 -0
- package/dist/admin/pages/ListConfiguration/components/SortDisplayedFields.mjs +150 -0
- package/dist/admin/pages/ListConfiguration/components/SortDisplayedFields.mjs.map +1 -0
- package/dist/admin/pages/ListView/ListViewPage.js +433 -0
- package/dist/admin/pages/ListView/ListViewPage.js.map +1 -0
- package/dist/admin/pages/ListView/ListViewPage.mjs +411 -0
- package/dist/admin/pages/ListView/ListViewPage.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/AutoCloneFailureModal.js +88 -0
- package/dist/admin/pages/ListView/components/AutoCloneFailureModal.js.map +1 -0
- package/dist/admin/pages/ListView/components/AutoCloneFailureModal.mjs +86 -0
- package/dist/admin/pages/ListView/components/AutoCloneFailureModal.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/BulkActions/Actions.js +233 -0
- package/dist/admin/pages/ListView/components/BulkActions/Actions.js.map +1 -0
- package/dist/admin/pages/ListView/components/BulkActions/Actions.mjs +210 -0
- package/dist/admin/pages/ListView/components/BulkActions/Actions.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.js +171 -0
- package/dist/admin/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.js.map +1 -0
- package/dist/admin/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.mjs +149 -0
- package/dist/admin/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/BulkActions/PublishAction.js +568 -0
- package/dist/admin/pages/ListView/components/BulkActions/PublishAction.js.map +1 -0
- package/dist/admin/pages/ListView/components/BulkActions/PublishAction.mjs +546 -0
- package/dist/admin/pages/ListView/components/BulkActions/PublishAction.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/Filters.js +243 -0
- package/dist/admin/pages/ListView/components/Filters.js.map +1 -0
- package/dist/admin/pages/ListView/components/Filters.mjs +222 -0
- package/dist/admin/pages/ListView/components/Filters.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/TableActions.js +217 -0
- package/dist/admin/pages/ListView/components/TableActions.js.map +1 -0
- package/dist/admin/pages/ListView/components/TableActions.mjs +195 -0
- package/dist/admin/pages/ListView/components/TableActions.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/CellContent.js +130 -0
- package/dist/admin/pages/ListView/components/TableCells/CellContent.js.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/CellContent.mjs +128 -0
- package/dist/admin/pages/ListView/components/TableCells/CellContent.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/CellValue.js +53 -0
- package/dist/admin/pages/ListView/components/TableCells/CellValue.js.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/CellValue.mjs +51 -0
- package/dist/admin/pages/ListView/components/TableCells/CellValue.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/Components.js +65 -0
- package/dist/admin/pages/ListView/components/TableCells/Components.js.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/Components.mjs +62 -0
- package/dist/admin/pages/ListView/components/TableCells/Components.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/Media.js +76 -0
- package/dist/admin/pages/ListView/components/TableCells/Media.js.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/Media.mjs +73 -0
- package/dist/admin/pages/ListView/components/TableCells/Media.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/Relations.js +128 -0
- package/dist/admin/pages/ListView/components/TableCells/Relations.js.map +1 -0
- package/dist/admin/pages/ListView/components/TableCells/Relations.mjs +106 -0
- package/dist/admin/pages/ListView/components/TableCells/Relations.mjs.map +1 -0
- package/dist/admin/pages/ListView/components/ViewSettingsMenu.js +154 -0
- package/dist/admin/pages/ListView/components/ViewSettingsMenu.js.map +1 -0
- package/dist/admin/pages/ListView/components/ViewSettingsMenu.mjs +152 -0
- package/dist/admin/pages/ListView/components/ViewSettingsMenu.mjs.map +1 -0
- package/dist/admin/pages/NoContentTypePage.js +50 -0
- package/dist/admin/pages/NoContentTypePage.js.map +1 -0
- package/dist/admin/pages/NoContentTypePage.mjs +48 -0
- package/dist/admin/pages/NoContentTypePage.mjs.map +1 -0
- package/dist/admin/pages/NoPermissionsPage.js +26 -0
- package/dist/admin/pages/NoPermissionsPage.js.map +1 -0
- package/dist/admin/pages/NoPermissionsPage.mjs +24 -0
- package/dist/admin/pages/NoPermissionsPage.mjs.map +1 -0
- package/dist/admin/preview/components/PreviewHeader.js +264 -0
- package/dist/admin/preview/components/PreviewHeader.js.map +1 -0
- package/dist/admin/preview/components/PreviewHeader.mjs +262 -0
- package/dist/admin/preview/components/PreviewHeader.mjs.map +1 -0
- package/dist/admin/preview/components/PreviewSidePanel.js +91 -0
- package/dist/admin/preview/components/PreviewSidePanel.js.map +1 -0
- package/dist/admin/preview/components/PreviewSidePanel.mjs +89 -0
- package/dist/admin/preview/components/PreviewSidePanel.mjs.map +1 -0
- package/dist/admin/preview/index.js +15 -0
- package/dist/admin/preview/index.js.map +1 -0
- package/dist/admin/preview/index.mjs +13 -0
- package/dist/admin/preview/index.mjs.map +1 -0
- package/dist/admin/preview/pages/Preview.js +294 -0
- package/dist/admin/preview/pages/Preview.js.map +1 -0
- package/dist/admin/preview/pages/Preview.mjs +272 -0
- package/dist/admin/preview/pages/Preview.mjs.map +1 -0
- package/dist/admin/preview/routes.js +39 -0
- package/dist/admin/preview/routes.js.map +1 -0
- package/dist/admin/preview/routes.mjs +18 -0
- package/dist/admin/preview/routes.mjs.map +1 -0
- package/dist/admin/preview/services/preview.js +23 -0
- package/dist/admin/preview/services/preview.js.map +1 -0
- package/dist/admin/preview/services/preview.mjs +21 -0
- package/dist/admin/preview/services/preview.mjs.map +1 -0
- package/dist/admin/router.js +86 -0
- package/dist/admin/router.js.map +1 -0
- package/dist/admin/router.mjs +82 -0
- package/dist/admin/router.mjs.map +1 -0
- package/dist/admin/services/api.js +20 -0
- package/dist/admin/services/api.js.map +1 -0
- package/dist/admin/services/api.mjs +18 -0
- package/dist/admin/services/api.mjs.map +1 -0
- package/dist/admin/services/components.js +42 -0
- package/dist/admin/services/components.js.map +1 -0
- package/dist/admin/services/components.mjs +39 -0
- package/dist/admin/services/components.mjs.map +1 -0
- package/dist/admin/services/contentTypes.js +63 -0
- package/dist/admin/services/contentTypes.js.map +1 -0
- package/dist/admin/services/contentTypes.mjs +59 -0
- package/dist/admin/services/contentTypes.mjs.map +1 -0
- package/dist/admin/services/documents.js +390 -0
- package/dist/admin/services/documents.js.map +1 -0
- package/dist/admin/services/documents.mjs +373 -0
- package/dist/admin/services/documents.mjs.map +1 -0
- package/dist/admin/services/init.js +19 -0
- package/dist/admin/services/init.js.map +1 -0
- package/dist/admin/services/init.mjs +17 -0
- package/dist/admin/services/init.mjs.map +1 -0
- package/dist/admin/services/relations.js +144 -0
- package/dist/admin/services/relations.js.map +1 -0
- package/dist/admin/services/relations.mjs +141 -0
- package/dist/admin/services/relations.mjs.map +1 -0
- package/dist/admin/services/uid.js +54 -0
- package/dist/admin/services/uid.js.map +1 -0
- package/dist/admin/services/uid.mjs +50 -0
- package/dist/admin/services/uid.mjs.map +1 -0
- package/dist/admin/src/components/InjectionZone.d.ts +7 -1
- package/dist/admin/src/content-manager.d.ts +6 -0
- package/dist/admin/src/features/DocumentContext.d.ts +53 -0
- package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
- package/dist/admin/src/hooks/useDocument.d.ts +2 -0
- package/dist/admin/src/hooks/useDocumentActions.d.ts +2 -1
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +8 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/Relations/Relations.d.ts +44 -0
- package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +8 -3
- package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +7 -4
- package/dist/admin/src/preview/components/PreviewHeader.d.ts +1 -2
- package/dist/admin/translations/ar.json.js +229 -0
- package/dist/admin/translations/ar.json.js.map +1 -0
- package/dist/admin/translations/ar.json.mjs +222 -0
- package/dist/admin/translations/ar.json.mjs.map +1 -0
- package/dist/admin/translations/ca.json.js +204 -0
- package/dist/admin/translations/ca.json.js.map +1 -0
- package/dist/admin/translations/ca.json.mjs +197 -0
- package/dist/admin/translations/ca.json.mjs.map +1 -0
- package/dist/admin/translations/cs.json.js +128 -0
- package/dist/admin/translations/cs.json.js.map +1 -0
- package/dist/admin/translations/cs.json.mjs +122 -0
- package/dist/admin/translations/cs.json.mjs.map +1 -0
- package/dist/admin/translations/de.json.js +202 -0
- package/dist/admin/translations/de.json.js.map +1 -0
- package/dist/admin/translations/de.json.mjs +195 -0
- package/dist/admin/translations/de.json.mjs.map +1 -0
- package/dist/admin/translations/en.json.js +320 -0
- package/dist/admin/translations/en.json.js.map +1 -0
- package/dist/admin/translations/en.json.mjs +313 -0
- package/dist/admin/translations/en.json.mjs.map +1 -0
- package/dist/admin/translations/es.json.js +199 -0
- package/dist/admin/translations/es.json.js.map +1 -0
- package/dist/admin/translations/es.json.mjs +192 -0
- package/dist/admin/translations/es.json.mjs.map +1 -0
- package/dist/admin/translations/eu.json.js +205 -0
- package/dist/admin/translations/eu.json.js.map +1 -0
- package/dist/admin/translations/eu.json.mjs +198 -0
- package/dist/admin/translations/eu.json.mjs.map +1 -0
- package/dist/admin/translations/fr.json.js +222 -0
- package/dist/admin/translations/fr.json.js.map +1 -0
- package/dist/admin/translations/fr.json.mjs +215 -0
- package/dist/admin/translations/fr.json.mjs.map +1 -0
- package/dist/admin/translations/gu.json.js +203 -0
- package/dist/admin/translations/gu.json.js.map +1 -0
- package/dist/admin/translations/gu.json.mjs +196 -0
- package/dist/admin/translations/gu.json.mjs.map +1 -0
- package/dist/admin/translations/hi.json.js +203 -0
- package/dist/admin/translations/hi.json.js.map +1 -0
- package/dist/admin/translations/hi.json.mjs +196 -0
- package/dist/admin/translations/hi.json.mjs.map +1 -0
- package/dist/admin/translations/hu.json.js +205 -0
- package/dist/admin/translations/hu.json.js.map +1 -0
- package/dist/admin/translations/hu.json.mjs +198 -0
- package/dist/admin/translations/hu.json.mjs.map +1 -0
- package/dist/admin/translations/id.json.js +163 -0
- package/dist/admin/translations/id.json.js.map +1 -0
- package/dist/admin/translations/id.json.mjs +156 -0
- package/dist/admin/translations/id.json.mjs.map +1 -0
- package/dist/admin/translations/it.json.js +165 -0
- package/dist/admin/translations/it.json.js.map +1 -0
- package/dist/admin/translations/it.json.mjs +158 -0
- package/dist/admin/translations/it.json.mjs.map +1 -0
- package/dist/admin/translations/ja.json.js +199 -0
- package/dist/admin/translations/ja.json.js.map +1 -0
- package/dist/admin/translations/ja.json.mjs +192 -0
- package/dist/admin/translations/ja.json.mjs.map +1 -0
- package/dist/admin/translations/ko.json.js +198 -0
- package/dist/admin/translations/ko.json.js.map +1 -0
- package/dist/admin/translations/ko.json.mjs +191 -0
- package/dist/admin/translations/ko.json.mjs.map +1 -0
- package/dist/admin/translations/ml.json.js +203 -0
- package/dist/admin/translations/ml.json.js.map +1 -0
- package/dist/admin/translations/ml.json.mjs +196 -0
- package/dist/admin/translations/ml.json.mjs.map +1 -0
- package/dist/admin/translations/ms.json.js +147 -0
- package/dist/admin/translations/ms.json.js.map +1 -0
- package/dist/admin/translations/ms.json.mjs +140 -0
- package/dist/admin/translations/ms.json.mjs.map +1 -0
- package/dist/admin/translations/nl.json.js +205 -0
- package/dist/admin/translations/nl.json.js.map +1 -0
- package/dist/admin/translations/nl.json.mjs +198 -0
- package/dist/admin/translations/nl.json.mjs.map +1 -0
- package/dist/admin/translations/pl.json.js +202 -0
- package/dist/admin/translations/pl.json.js.map +1 -0
- package/dist/admin/translations/pl.json.mjs +195 -0
- package/dist/admin/translations/pl.json.mjs.map +1 -0
- package/dist/admin/translations/pt-BR.json.js +204 -0
- package/dist/admin/translations/pt-BR.json.js.map +1 -0
- package/dist/admin/translations/pt-BR.json.mjs +197 -0
- package/dist/admin/translations/pt-BR.json.mjs.map +1 -0
- package/dist/admin/translations/pt.json.js +98 -0
- package/dist/admin/translations/pt.json.js.map +1 -0
- package/dist/admin/translations/pt.json.mjs +93 -0
- package/dist/admin/translations/pt.json.mjs.map +1 -0
- package/dist/admin/translations/ru.json.js +232 -0
- package/dist/admin/translations/ru.json.js.map +1 -0
- package/dist/admin/translations/ru.json.mjs +230 -0
- package/dist/admin/translations/ru.json.mjs.map +1 -0
- package/dist/admin/translations/sa.json.js +203 -0
- package/dist/admin/translations/sa.json.js.map +1 -0
- package/dist/admin/translations/sa.json.mjs +196 -0
- package/dist/admin/translations/sa.json.mjs.map +1 -0
- package/dist/admin/translations/sk.json.js +205 -0
- package/dist/admin/translations/sk.json.js.map +1 -0
- package/dist/admin/translations/sk.json.mjs +198 -0
- package/dist/admin/translations/sk.json.mjs.map +1 -0
- package/dist/admin/translations/sv.json.js +205 -0
- package/dist/admin/translations/sv.json.js.map +1 -0
- package/dist/admin/translations/sv.json.mjs +198 -0
- package/dist/admin/translations/sv.json.mjs.map +1 -0
- package/dist/admin/translations/th.json.js +151 -0
- package/dist/admin/translations/th.json.js.map +1 -0
- package/dist/admin/translations/th.json.mjs +144 -0
- package/dist/admin/translations/th.json.mjs.map +1 -0
- package/dist/admin/translations/tr.json.js +202 -0
- package/dist/admin/translations/tr.json.js.map +1 -0
- package/dist/admin/translations/tr.json.mjs +195 -0
- package/dist/admin/translations/tr.json.mjs.map +1 -0
- package/dist/admin/translations/uk.json.js +320 -0
- package/dist/admin/translations/uk.json.js.map +1 -0
- package/dist/admin/translations/uk.json.mjs +313 -0
- package/dist/admin/translations/uk.json.mjs.map +1 -0
- package/dist/admin/translations/vi.json.js +114 -0
- package/dist/admin/translations/vi.json.js.map +1 -0
- package/dist/admin/translations/vi.json.mjs +108 -0
- package/dist/admin/translations/vi.json.mjs.map +1 -0
- package/dist/admin/translations/zh-Hans.json.js +956 -0
- package/dist/admin/translations/zh-Hans.json.js.map +1 -0
- package/dist/admin/translations/zh-Hans.json.mjs +935 -0
- package/dist/admin/translations/zh-Hans.json.mjs.map +1 -0
- package/dist/admin/translations/zh.json.js +212 -0
- package/dist/admin/translations/zh.json.js.map +1 -0
- package/dist/admin/translations/zh.json.mjs +205 -0
- package/dist/admin/translations/zh.json.mjs.map +1 -0
- package/dist/admin/utils/api.js +22 -0
- package/dist/admin/utils/api.js.map +1 -0
- package/dist/admin/utils/api.mjs +19 -0
- package/dist/admin/utils/api.mjs.map +1 -0
- package/dist/admin/utils/attributes.js +34 -0
- package/dist/admin/utils/attributes.js.map +1 -0
- package/dist/admin/utils/attributes.mjs +31 -0
- package/dist/admin/utils/attributes.mjs.map +1 -0
- package/dist/admin/utils/objects.js +78 -0
- package/dist/admin/utils/objects.js.map +1 -0
- package/dist/admin/utils/objects.mjs +73 -0
- package/dist/admin/utils/objects.mjs.map +1 -0
- package/dist/admin/utils/relations.js +19 -0
- package/dist/admin/utils/relations.js.map +1 -0
- package/dist/admin/utils/relations.mjs +17 -0
- package/dist/admin/utils/relations.mjs.map +1 -0
- package/dist/admin/utils/strings.js +6 -0
- package/dist/admin/utils/strings.js.map +1 -0
- package/dist/admin/utils/strings.mjs +4 -0
- package/dist/admin/utils/strings.mjs.map +1 -0
- package/dist/admin/utils/translations.js +13 -0
- package/dist/admin/utils/translations.js.map +1 -0
- package/dist/admin/utils/translations.mjs +10 -0
- package/dist/admin/utils/translations.mjs.map +1 -0
- package/dist/admin/utils/urls.js +8 -0
- package/dist/admin/utils/urls.js.map +1 -0
- package/dist/admin/utils/urls.mjs +6 -0
- package/dist/admin/utils/urls.mjs.map +1 -0
- package/dist/admin/utils/users.js +17 -0
- package/dist/admin/utils/users.js.map +1 -0
- package/dist/admin/utils/users.mjs +15 -0
- package/dist/admin/utils/users.mjs.map +1 -0
- package/dist/admin/utils/validation.js +290 -0
- package/dist/admin/utils/validation.js.map +1 -0
- package/dist/admin/utils/validation.mjs +269 -0
- package/dist/admin/utils/validation.mjs.map +1 -0
- package/dist/server/bootstrap.js +25 -0
- package/dist/server/bootstrap.js.map +1 -0
- package/dist/server/bootstrap.mjs +23 -0
- package/dist/server/bootstrap.mjs.map +1 -0
- package/dist/server/constants/index.js +9 -0
- package/dist/server/constants/index.js.map +1 -0
- package/dist/server/constants/index.mjs +7 -0
- package/dist/server/constants/index.mjs.map +1 -0
- package/dist/server/controllers/collection-types.js +647 -0
- package/dist/server/controllers/collection-types.js.map +1 -0
- package/dist/server/controllers/collection-types.mjs +645 -0
- package/dist/server/controllers/collection-types.mjs.map +1 -0
- package/dist/server/controllers/components.js +60 -0
- package/dist/server/controllers/components.js.map +1 -0
- package/dist/server/controllers/components.mjs +58 -0
- package/dist/server/controllers/components.mjs.map +1 -0
- package/dist/server/controllers/content-types.js +108 -0
- package/dist/server/controllers/content-types.js.map +1 -0
- package/dist/server/controllers/content-types.mjs +106 -0
- package/dist/server/controllers/content-types.mjs.map +1 -0
- package/dist/server/controllers/index.js +26 -0
- package/dist/server/controllers/index.js.map +1 -0
- package/dist/server/controllers/index.mjs +24 -0
- package/dist/server/controllers/index.mjs.map +1 -0
- package/dist/server/controllers/init.js +22 -0
- package/dist/server/controllers/init.js.map +1 -0
- package/dist/server/controllers/init.mjs +20 -0
- package/dist/server/controllers/init.mjs.map +1 -0
- package/dist/server/controllers/relations.js +432 -0
- package/dist/server/controllers/relations.js.map +1 -0
- package/dist/server/controllers/relations.mjs +430 -0
- package/dist/server/controllers/relations.mjs.map +1 -0
- package/dist/server/controllers/single-types.js +302 -0
- package/dist/server/controllers/single-types.js.map +1 -0
- package/dist/server/controllers/single-types.mjs +300 -0
- package/dist/server/controllers/single-types.mjs.map +1 -0
- package/dist/server/controllers/uid.js +48 -0
- package/dist/server/controllers/uid.js.map +1 -0
- package/dist/server/controllers/uid.mjs +46 -0
- package/dist/server/controllers/uid.mjs.map +1 -0
- package/dist/server/controllers/utils/clone.js +138 -0
- package/dist/server/controllers/utils/clone.js.map +1 -0
- package/dist/server/controllers/utils/clone.mjs +135 -0
- package/dist/server/controllers/utils/clone.mjs.map +1 -0
- package/dist/server/controllers/utils/metadata.js +26 -0
- package/dist/server/controllers/utils/metadata.js.map +1 -0
- package/dist/server/controllers/utils/metadata.mjs +24 -0
- package/dist/server/controllers/utils/metadata.mjs.map +1 -0
- package/dist/server/controllers/validation/dimensions.js +41 -0
- package/dist/server/controllers/validation/dimensions.js.map +1 -0
- package/dist/server/controllers/validation/dimensions.mjs +39 -0
- package/dist/server/controllers/validation/dimensions.mjs.map +1 -0
- package/dist/server/controllers/validation/index.js +56 -0
- package/dist/server/controllers/validation/index.js.map +1 -0
- package/dist/server/controllers/validation/index.mjs +50 -0
- package/dist/server/controllers/validation/index.mjs.map +1 -0
- package/dist/server/controllers/validation/model-configuration.js +81 -0
- package/dist/server/controllers/validation/model-configuration.js.map +1 -0
- package/dist/server/controllers/validation/model-configuration.mjs +79 -0
- package/dist/server/controllers/validation/model-configuration.mjs.map +1 -0
- package/dist/server/controllers/validation/relations.js +37 -0
- package/dist/server/controllers/validation/relations.js.map +1 -0
- package/dist/server/controllers/validation/relations.mjs +34 -0
- package/dist/server/controllers/validation/relations.mjs.map +1 -0
- package/dist/server/destroy.js +12 -0
- package/dist/server/destroy.js.map +1 -0
- package/dist/server/destroy.mjs +10 -0
- package/dist/server/destroy.mjs.map +1 -0
- package/dist/server/history/constants.js +16 -0
- package/dist/server/history/constants.js.map +1 -0
- package/dist/server/history/constants.mjs +13 -0
- package/dist/server/history/constants.mjs.map +1 -0
- package/dist/server/history/controllers/history-version.js +107 -0
- package/dist/server/history/controllers/history-version.js.map +1 -0
- package/dist/server/history/controllers/history-version.mjs +105 -0
- package/dist/server/history/controllers/history-version.mjs.map +1 -0
- package/dist/server/history/controllers/index.js +10 -0
- package/dist/server/history/controllers/index.js.map +1 -0
- package/dist/server/history/controllers/index.mjs +8 -0
- package/dist/server/history/controllers/index.mjs.map +1 -0
- package/dist/server/history/controllers/validation/history-version.js +31 -0
- package/dist/server/history/controllers/validation/history-version.js.map +1 -0
- package/dist/server/history/controllers/validation/history-version.mjs +10 -0
- package/dist/server/history/controllers/validation/history-version.mjs.map +1 -0
- package/dist/server/history/index.js +42 -0
- package/dist/server/history/index.js.map +1 -0
- package/dist/server/history/index.mjs +40 -0
- package/dist/server/history/index.mjs.map +1 -0
- package/dist/server/history/models/history-version.js +59 -0
- package/dist/server/history/models/history-version.js.map +1 -0
- package/dist/server/history/models/history-version.mjs +57 -0
- package/dist/server/history/models/history-version.mjs.map +1 -0
- package/dist/server/history/routes/history-version.js +36 -0
- package/dist/server/history/routes/history-version.js.map +1 -0
- package/dist/server/history/routes/history-version.mjs +34 -0
- package/dist/server/history/routes/history-version.mjs.map +1 -0
- package/dist/server/history/routes/index.js +13 -0
- package/dist/server/history/routes/index.js.map +1 -0
- package/dist/server/history/routes/index.mjs +11 -0
- package/dist/server/history/routes/index.mjs.map +1 -0
- package/dist/server/history/services/history.js +203 -0
- package/dist/server/history/services/history.js.map +1 -0
- package/dist/server/history/services/history.mjs +201 -0
- package/dist/server/history/services/history.mjs.map +1 -0
- package/dist/server/history/services/index.js +12 -0
- package/dist/server/history/services/index.js.map +1 -0
- package/dist/server/history/services/index.mjs +10 -0
- package/dist/server/history/services/index.mjs.map +1 -0
- package/dist/server/history/services/lifecycles.js +153 -0
- package/dist/server/history/services/lifecycles.js.map +1 -0
- package/dist/server/history/services/lifecycles.mjs +151 -0
- package/dist/server/history/services/lifecycles.mjs.map +1 -0
- package/dist/server/history/services/utils.js +281 -0
- package/dist/server/history/services/utils.js.map +1 -0
- package/dist/server/history/services/utils.mjs +279 -0
- package/dist/server/history/services/utils.mjs.map +1 -0
- package/dist/server/history/utils.js +9 -0
- package/dist/server/history/utils.js.map +1 -0
- package/dist/server/history/utils.mjs +7 -0
- package/dist/server/history/utils.mjs.map +1 -0
- package/dist/server/index.js +11 -5754
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +7 -5731
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/middlewares/routing.js +40 -0
- package/dist/server/middlewares/routing.js.map +1 -0
- package/dist/server/middlewares/routing.mjs +38 -0
- package/dist/server/middlewares/routing.mjs.map +1 -0
- package/dist/server/policies/hasPermissions.js +24 -0
- package/dist/server/policies/hasPermissions.js.map +1 -0
- package/dist/server/policies/hasPermissions.mjs +22 -0
- package/dist/server/policies/hasPermissions.mjs.map +1 -0
- package/dist/server/policies/index.js +10 -0
- package/dist/server/policies/index.js.map +1 -0
- package/dist/server/policies/index.mjs +8 -0
- package/dist/server/policies/index.mjs.map +1 -0
- package/dist/server/preview/controllers/index.js +10 -0
- package/dist/server/preview/controllers/index.js.map +1 -0
- package/dist/server/preview/controllers/index.mjs +8 -0
- package/dist/server/preview/controllers/index.mjs.map +1 -0
- package/dist/server/preview/controllers/preview.js +34 -0
- package/dist/server/preview/controllers/preview.js.map +1 -0
- package/dist/server/preview/controllers/preview.mjs +32 -0
- package/dist/server/preview/controllers/preview.mjs.map +1 -0
- package/dist/server/preview/controllers/validation/preview.js +70 -0
- package/dist/server/preview/controllers/validation/preview.js.map +1 -0
- package/dist/server/preview/controllers/validation/preview.mjs +49 -0
- package/dist/server/preview/controllers/validation/preview.mjs.map +1 -0
- package/dist/server/preview/index.js +27 -0
- package/dist/server/preview/index.js.map +1 -0
- package/dist/server/preview/index.mjs +25 -0
- package/dist/server/preview/index.mjs.map +1 -0
- package/dist/server/preview/routes/index.js +13 -0
- package/dist/server/preview/routes/index.js.map +1 -0
- package/dist/server/preview/routes/index.mjs +11 -0
- package/dist/server/preview/routes/index.mjs.map +1 -0
- package/dist/server/preview/routes/preview.js +25 -0
- package/dist/server/preview/routes/preview.js.map +1 -0
- package/dist/server/preview/routes/preview.mjs +23 -0
- package/dist/server/preview/routes/preview.mjs.map +1 -0
- package/dist/server/preview/services/index.js +12 -0
- package/dist/server/preview/services/index.js.map +1 -0
- package/dist/server/preview/services/index.mjs +10 -0
- package/dist/server/preview/services/index.mjs.map +1 -0
- package/dist/server/preview/services/preview-config.js +91 -0
- package/dist/server/preview/services/preview-config.js.map +1 -0
- package/dist/server/preview/services/preview-config.mjs +89 -0
- package/dist/server/preview/services/preview-config.mjs.map +1 -0
- package/dist/server/preview/services/preview.js +27 -0
- package/dist/server/preview/services/preview.js.map +1 -0
- package/dist/server/preview/services/preview.mjs +25 -0
- package/dist/server/preview/services/preview.mjs.map +1 -0
- package/dist/server/preview/utils.js +9 -0
- package/dist/server/preview/utils.js.map +1 -0
- package/dist/server/preview/utils.mjs +7 -0
- package/dist/server/preview/utils.mjs.map +1 -0
- package/dist/server/register.js +16 -0
- package/dist/server/register.js.map +1 -0
- package/dist/server/register.mjs +14 -0
- package/dist/server/register.mjs.map +1 -0
- package/dist/server/routes/admin.js +599 -0
- package/dist/server/routes/admin.js.map +1 -0
- package/dist/server/routes/admin.mjs +597 -0
- package/dist/server/routes/admin.mjs.map +1 -0
- package/dist/server/routes/index.js +14 -0
- package/dist/server/routes/index.js.map +1 -0
- package/dist/server/routes/index.mjs +12 -0
- package/dist/server/routes/index.mjs.map +1 -0
- package/dist/server/services/components.js +73 -0
- package/dist/server/services/components.js.map +1 -0
- package/dist/server/services/components.mjs +71 -0
- package/dist/server/services/components.mjs.map +1 -0
- package/dist/server/services/configuration.js +58 -0
- package/dist/server/services/configuration.js.map +1 -0
- package/dist/server/services/configuration.mjs +56 -0
- package/dist/server/services/configuration.mjs.map +1 -0
- package/dist/server/services/content-types.js +60 -0
- package/dist/server/services/content-types.js.map +1 -0
- package/dist/server/services/content-types.mjs +58 -0
- package/dist/server/services/content-types.mjs.map +1 -0
- package/dist/server/services/data-mapper.js +66 -0
- package/dist/server/services/data-mapper.js.map +1 -0
- package/dist/server/services/data-mapper.mjs +64 -0
- package/dist/server/services/data-mapper.mjs.map +1 -0
- package/dist/server/services/document-manager.js +238 -0
- package/dist/server/services/document-manager.js.map +1 -0
- package/dist/server/services/document-manager.mjs +236 -0
- package/dist/server/services/document-manager.mjs.map +1 -0
- package/dist/server/services/document-metadata.js +237 -0
- package/dist/server/services/document-metadata.js.map +1 -0
- package/dist/server/services/document-metadata.mjs +235 -0
- package/dist/server/services/document-metadata.mjs.map +1 -0
- package/dist/server/services/field-sizes.js +90 -0
- package/dist/server/services/field-sizes.js.map +1 -0
- package/dist/server/services/field-sizes.mjs +88 -0
- package/dist/server/services/field-sizes.mjs.map +1 -0
- package/dist/server/services/index.js +34 -0
- package/dist/server/services/index.js.map +1 -0
- package/dist/server/services/index.mjs +32 -0
- package/dist/server/services/index.mjs.map +1 -0
- package/dist/server/services/metrics.js +35 -0
- package/dist/server/services/metrics.js.map +1 -0
- package/dist/server/services/metrics.mjs +33 -0
- package/dist/server/services/metrics.mjs.map +1 -0
- package/dist/server/services/permission-checker.js +112 -0
- package/dist/server/services/permission-checker.js.map +1 -0
- package/dist/server/services/permission-checker.mjs +110 -0
- package/dist/server/services/permission-checker.mjs.map +1 -0
- package/dist/server/services/permission.js +93 -0
- package/dist/server/services/permission.js.map +1 -0
- package/dist/server/services/permission.mjs +91 -0
- package/dist/server/services/permission.mjs.map +1 -0
- package/dist/server/services/populate-builder.js +75 -0
- package/dist/server/services/populate-builder.js.map +1 -0
- package/dist/server/services/populate-builder.mjs +73 -0
- package/dist/server/services/populate-builder.mjs.map +1 -0
- package/dist/server/services/uid.js +85 -0
- package/dist/server/services/uid.js.map +1 -0
- package/dist/server/services/uid.mjs +83 -0
- package/dist/server/services/uid.mjs.map +1 -0
- package/dist/server/services/utils/configuration/attributes.js +185 -0
- package/dist/server/services/utils/configuration/attributes.js.map +1 -0
- package/dist/server/services/utils/configuration/attributes.mjs +175 -0
- package/dist/server/services/utils/configuration/attributes.mjs.map +1 -0
- package/dist/server/services/utils/configuration/index.js +37 -0
- package/dist/server/services/utils/configuration/index.js.map +1 -0
- package/dist/server/services/utils/configuration/index.mjs +34 -0
- package/dist/server/services/utils/configuration/index.mjs.map +1 -0
- package/dist/server/services/utils/configuration/layouts.js +120 -0
- package/dist/server/services/utils/configuration/layouts.js.map +1 -0
- package/dist/server/services/utils/configuration/layouts.mjs +117 -0
- package/dist/server/services/utils/configuration/layouts.mjs.map +1 -0
- package/dist/server/services/utils/configuration/metadatas.js +147 -0
- package/dist/server/services/utils/configuration/metadatas.js.map +1 -0
- package/dist/server/services/utils/configuration/metadatas.mjs +144 -0
- package/dist/server/services/utils/configuration/metadatas.mjs.map +1 -0
- package/dist/server/services/utils/configuration/settings.js +66 -0
- package/dist/server/services/utils/configuration/settings.js.map +1 -0
- package/dist/server/services/utils/configuration/settings.mjs +62 -0
- package/dist/server/services/utils/configuration/settings.mjs.map +1 -0
- package/dist/server/services/utils/draft.js +51 -0
- package/dist/server/services/utils/draft.js.map +1 -0
- package/dist/server/services/utils/draft.mjs +49 -0
- package/dist/server/services/utils/draft.mjs.map +1 -0
- package/dist/server/services/utils/populate.js +289 -0
- package/dist/server/services/utils/populate.js.map +1 -0
- package/dist/server/services/utils/populate.mjs +283 -0
- package/dist/server/services/utils/populate.mjs.map +1 -0
- package/dist/server/services/utils/store.js +71 -0
- package/dist/server/services/utils/store.js.map +1 -0
- package/dist/server/services/utils/store.mjs +69 -0
- package/dist/server/services/utils/store.mjs.map +1 -0
- package/dist/server/utils/index.js +10 -0
- package/dist/server/utils/index.js.map +1 -0
- package/dist/server/utils/index.mjs +8 -0
- package/dist/server/utils/index.mjs.map +1 -0
- package/dist/server/validation/policies/hasPermissions.js +12 -0
- package/dist/server/validation/policies/hasPermissions.js.map +1 -0
- package/dist/server/validation/policies/hasPermissions.mjs +10 -0
- package/dist/server/validation/policies/hasPermissions.mjs.map +1 -0
- package/dist/shared/contracts/collection-types.js +3 -0
- package/dist/shared/contracts/collection-types.js.map +1 -0
- package/dist/shared/contracts/collection-types.mjs +2 -0
- package/dist/shared/contracts/collection-types.mjs.map +1 -0
- package/dist/shared/contracts/components.js +3 -0
- package/dist/shared/contracts/components.js.map +1 -0
- package/dist/shared/contracts/components.mjs +2 -0
- package/dist/shared/contracts/components.mjs.map +1 -0
- package/dist/shared/contracts/content-types.js +3 -0
- package/dist/shared/contracts/content-types.js.map +1 -0
- package/dist/shared/contracts/content-types.mjs +2 -0
- package/dist/shared/contracts/content-types.mjs.map +1 -0
- package/dist/shared/contracts/history-versions.js +3 -0
- package/dist/shared/contracts/history-versions.js.map +1 -0
- package/dist/shared/contracts/history-versions.mjs +2 -0
- package/dist/shared/contracts/history-versions.mjs.map +1 -0
- package/dist/shared/contracts/index.js +26 -0
- package/dist/shared/contracts/index.js.map +1 -0
- package/dist/shared/contracts/index.mjs +21 -0
- package/dist/shared/contracts/index.mjs.map +1 -0
- package/dist/shared/contracts/init.js +3 -0
- package/dist/shared/contracts/init.js.map +1 -0
- package/dist/shared/contracts/init.mjs +2 -0
- package/dist/shared/contracts/init.mjs.map +1 -0
- package/dist/shared/contracts/preview.js +3 -0
- package/dist/shared/contracts/preview.js.map +1 -0
- package/dist/shared/contracts/preview.mjs +2 -0
- package/dist/shared/contracts/preview.mjs.map +1 -0
- package/dist/shared/contracts/relations.js +3 -0
- package/dist/shared/contracts/relations.js.map +1 -0
- package/dist/shared/contracts/relations.mjs +2 -0
- package/dist/shared/contracts/relations.mjs.map +1 -0
- package/dist/shared/contracts/review-workflows.js +3 -0
- package/dist/shared/contracts/review-workflows.js.map +1 -0
- package/dist/shared/contracts/review-workflows.mjs +2 -0
- package/dist/shared/contracts/review-workflows.mjs.map +1 -0
- package/dist/shared/contracts/single-types.js +3 -0
- package/dist/shared/contracts/single-types.js.map +1 -0
- package/dist/shared/contracts/single-types.mjs +2 -0
- package/dist/shared/contracts/single-types.mjs.map +1 -0
- package/dist/shared/contracts/uid.js +3 -0
- package/dist/shared/contracts/uid.js.map +1 -0
- package/dist/shared/contracts/uid.mjs +2 -0
- package/dist/shared/contracts/uid.mjs.map +1 -0
- package/dist/shared/index.js +1 -51
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.mjs +1 -54
- package/dist/shared/index.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs +0 -80
- package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +0 -1
- package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +0 -82
- package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +0 -1
- package/dist/admin/chunks/ComponentConfigurationPage-BN2kOtDm.mjs +0 -277
- package/dist/admin/chunks/ComponentConfigurationPage-BN2kOtDm.mjs.map +0 -1
- package/dist/admin/chunks/ComponentConfigurationPage-C5H-5L1u.js +0 -299
- package/dist/admin/chunks/ComponentConfigurationPage-C5H-5L1u.js.map +0 -1
- package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs +0 -153
- package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +0 -1
- package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +0 -176
- package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +0 -1
- package/dist/admin/chunks/EditConfigurationPage-BExtZuB7.js +0 -181
- package/dist/admin/chunks/EditConfigurationPage-BExtZuB7.js.map +0 -1
- package/dist/admin/chunks/EditConfigurationPage-tMgOELQG.mjs +0 -159
- package/dist/admin/chunks/EditConfigurationPage-tMgOELQG.mjs.map +0 -1
- package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs +0 -314
- package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs.map +0 -1
- package/dist/admin/chunks/EditViewPage-DFkloeMZ.js +0 -337
- package/dist/admin/chunks/EditViewPage-DFkloeMZ.js.map +0 -1
- package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs +0 -56
- package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +0 -1
- package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +0 -58
- package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +0 -1
- package/dist/admin/chunks/Form-DGUP3zQO.js +0 -978
- package/dist/admin/chunks/Form-DGUP3zQO.js.map +0 -1
- package/dist/admin/chunks/Form-DTO0ZIaB.mjs +0 -955
- package/dist/admin/chunks/Form-DTO0ZIaB.mjs.map +0 -1
- package/dist/admin/chunks/History-C333pgXF.mjs +0 -1357
- package/dist/admin/chunks/History-C333pgXF.mjs.map +0 -1
- package/dist/admin/chunks/History-CQznK1pG.js +0 -1380
- package/dist/admin/chunks/History-CQznK1pG.js.map +0 -1
- package/dist/admin/chunks/Input-BexkC_pp.mjs +0 -7190
- package/dist/admin/chunks/Input-BexkC_pp.mjs.map +0 -1
- package/dist/admin/chunks/Input-DLJZHw9Y.js +0 -7221
- package/dist/admin/chunks/Input-DLJZHw9Y.js.map +0 -1
- package/dist/admin/chunks/ListConfigurationPage-71I_stAM.js +0 -819
- package/dist/admin/chunks/ListConfigurationPage-71I_stAM.js.map +0 -1
- package/dist/admin/chunks/ListConfigurationPage-BX2WR7MI.mjs +0 -796
- package/dist/admin/chunks/ListConfigurationPage-BX2WR7MI.mjs.map +0 -1
- package/dist/admin/chunks/ListViewPage-BDeT3Dkk.mjs +0 -1133
- package/dist/admin/chunks/ListViewPage-BDeT3Dkk.mjs.map +0 -1
- package/dist/admin/chunks/ListViewPage-DV3heO4F.js +0 -1155
- package/dist/admin/chunks/ListViewPage-DV3heO4F.js.map +0 -1
- package/dist/admin/chunks/NoContentTypePage-9JHYpYVX.mjs +0 -58
- package/dist/admin/chunks/NoContentTypePage-9JHYpYVX.mjs.map +0 -1
- package/dist/admin/chunks/NoContentTypePage-COih9y2J.js +0 -60
- package/dist/admin/chunks/NoContentTypePage-COih9y2J.js.map +0 -1
- package/dist/admin/chunks/NoPermissionsPage-DGAwRIlN.js +0 -39
- package/dist/admin/chunks/NoPermissionsPage-DGAwRIlN.js.map +0 -1
- package/dist/admin/chunks/NoPermissionsPage-DTe9I47q.mjs +0 -37
- package/dist/admin/chunks/NoPermissionsPage-DTe9I47q.mjs.map +0 -1
- package/dist/admin/chunks/Preview-BEq0FXda.mjs +0 -551
- package/dist/admin/chunks/Preview-BEq0FXda.mjs.map +0 -1
- package/dist/admin/chunks/Preview-CXtc9yEV.js +0 -573
- package/dist/admin/chunks/Preview-CXtc9yEV.js.map +0 -1
- package/dist/admin/chunks/Relations-o7_hVGyK.js +0 -1318
- package/dist/admin/chunks/Relations-o7_hVGyK.js.map +0 -1
- package/dist/admin/chunks/Relations-qeZyLDgQ.mjs +0 -1291
- package/dist/admin/chunks/Relations-qeZyLDgQ.mjs.map +0 -1
- package/dist/admin/chunks/ar-DckYq_WK.mjs +0 -222
- package/dist/admin/chunks/ar-DckYq_WK.mjs.map +0 -1
- package/dist/admin/chunks/ar-DeQBSsfl.js +0 -227
- package/dist/admin/chunks/ar-DeQBSsfl.js.map +0 -1
- package/dist/admin/chunks/ca-ClDTvatJ.js +0 -202
- package/dist/admin/chunks/ca-ClDTvatJ.js.map +0 -1
- package/dist/admin/chunks/ca-DviY7mRj.mjs +0 -197
- package/dist/admin/chunks/ca-DviY7mRj.mjs.map +0 -1
- package/dist/admin/chunks/cs-BJFxwIWj.js +0 -126
- package/dist/admin/chunks/cs-BJFxwIWj.js.map +0 -1
- package/dist/admin/chunks/cs-C7OSYFQ7.mjs +0 -122
- package/dist/admin/chunks/cs-C7OSYFQ7.mjs.map +0 -1
- package/dist/admin/chunks/de-5QRlDHyR.mjs +0 -195
- package/dist/admin/chunks/de-5QRlDHyR.mjs.map +0 -1
- package/dist/admin/chunks/de-CbImAUA5.js +0 -200
- package/dist/admin/chunks/de-CbImAUA5.js.map +0 -1
- package/dist/admin/chunks/en-C1CjdAtC.js +0 -313
- package/dist/admin/chunks/en-C1CjdAtC.js.map +0 -1
- package/dist/admin/chunks/en-LfhocNG2.mjs +0 -308
- package/dist/admin/chunks/en-LfhocNG2.mjs.map +0 -1
- package/dist/admin/chunks/es-C8vLuvZL.js +0 -197
- package/dist/admin/chunks/es-C8vLuvZL.js.map +0 -1
- package/dist/admin/chunks/es-DkoWSExG.mjs +0 -192
- package/dist/admin/chunks/es-DkoWSExG.mjs.map +0 -1
- package/dist/admin/chunks/eu-BG1xX7HK.mjs +0 -198
- package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +0 -1
- package/dist/admin/chunks/eu-BJW3AvXu.js +0 -203
- package/dist/admin/chunks/eu-BJW3AvXu.js.map +0 -1
- package/dist/admin/chunks/fr-CFdRaRVj.mjs +0 -215
- package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +0 -1
- package/dist/admin/chunks/fr-gQSilC7w.js +0 -220
- package/dist/admin/chunks/fr-gQSilC7w.js.map +0 -1
- package/dist/admin/chunks/gu-D5MMMXRs.mjs +0 -196
- package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +0 -1
- package/dist/admin/chunks/gu-DPU4wyx7.js +0 -201
- package/dist/admin/chunks/gu-DPU4wyx7.js.map +0 -1
- package/dist/admin/chunks/hi-Dp4omeBb.js +0 -201
- package/dist/admin/chunks/hi-Dp4omeBb.js.map +0 -1
- package/dist/admin/chunks/hi-lp17SCjr.mjs +0 -196
- package/dist/admin/chunks/hi-lp17SCjr.mjs.map +0 -1
- package/dist/admin/chunks/hooks-D-sOYd1s.js +0 -10
- package/dist/admin/chunks/hooks-D-sOYd1s.js.map +0 -1
- package/dist/admin/chunks/hooks-DMvik5y_.mjs +0 -7
- package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +0 -1
- package/dist/admin/chunks/hu-CLka1U2C.mjs +0 -198
- package/dist/admin/chunks/hu-CLka1U2C.mjs.map +0 -1
- package/dist/admin/chunks/hu-CtFJuhTd.js +0 -203
- package/dist/admin/chunks/hu-CtFJuhTd.js.map +0 -1
- package/dist/admin/chunks/id-D7V5S1rB.js +0 -161
- package/dist/admin/chunks/id-D7V5S1rB.js.map +0 -1
- package/dist/admin/chunks/id-USfY9m1g.mjs +0 -156
- package/dist/admin/chunks/id-USfY9m1g.mjs.map +0 -1
- package/dist/admin/chunks/index-BHimg6jW.js +0 -5417
- package/dist/admin/chunks/index-BHimg6jW.js.map +0 -1
- package/dist/admin/chunks/index-Cs6qwFQu.mjs +0 -5351
- package/dist/admin/chunks/index-Cs6qwFQu.mjs.map +0 -1
- package/dist/admin/chunks/it-BAHrwmYS.mjs +0 -158
- package/dist/admin/chunks/it-BAHrwmYS.mjs.map +0 -1
- package/dist/admin/chunks/it-CQFpa_Dc.js +0 -163
- package/dist/admin/chunks/it-CQFpa_Dc.js.map +0 -1
- package/dist/admin/chunks/ja-BWKmBJFT.mjs +0 -192
- package/dist/admin/chunks/ja-BWKmBJFT.mjs.map +0 -1
- package/dist/admin/chunks/ja-jdQM-B79.js +0 -197
- package/dist/admin/chunks/ja-jdQM-B79.js.map +0 -1
- package/dist/admin/chunks/ko-CgADGBNt.mjs +0 -191
- package/dist/admin/chunks/ko-CgADGBNt.mjs.map +0 -1
- package/dist/admin/chunks/ko-k46sEyzt.js +0 -196
- package/dist/admin/chunks/ko-k46sEyzt.js.map +0 -1
- package/dist/admin/chunks/layout-DStNia_P.mjs +0 -599
- package/dist/admin/chunks/layout-DStNia_P.mjs.map +0 -1
- package/dist/admin/chunks/layout-Dtahn4Ue.js +0 -619
- package/dist/admin/chunks/layout-Dtahn4Ue.js.map +0 -1
- package/dist/admin/chunks/ml-CnhCfOn_.mjs +0 -196
- package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +0 -1
- package/dist/admin/chunks/ml-DqxPwODx.js +0 -201
- package/dist/admin/chunks/ml-DqxPwODx.js.map +0 -1
- package/dist/admin/chunks/ms-Bh09NFff.mjs +0 -140
- package/dist/admin/chunks/ms-Bh09NFff.mjs.map +0 -1
- package/dist/admin/chunks/ms-CvSC0OdG.js +0 -145
- package/dist/admin/chunks/ms-CvSC0OdG.js.map +0 -1
- package/dist/admin/chunks/nl-BEubhS8C.js +0 -203
- package/dist/admin/chunks/nl-BEubhS8C.js.map +0 -1
- package/dist/admin/chunks/nl-C8HYflTc.mjs +0 -198
- package/dist/admin/chunks/nl-C8HYflTc.mjs.map +0 -1
- package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
- package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
- package/dist/admin/chunks/objects-wl73iEma.mjs +0 -73
- package/dist/admin/chunks/objects-wl73iEma.mjs.map +0 -1
- package/dist/admin/chunks/pl-DWhGDzmM.js +0 -200
- package/dist/admin/chunks/pl-DWhGDzmM.js.map +0 -1
- package/dist/admin/chunks/pl-MFCZJZuZ.mjs +0 -195
- package/dist/admin/chunks/pl-MFCZJZuZ.mjs.map +0 -1
- package/dist/admin/chunks/pt-BR-CPtAXD-4.js +0 -202
- package/dist/admin/chunks/pt-BR-CPtAXD-4.js.map +0 -1
- package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs +0 -197
- package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs.map +0 -1
- package/dist/admin/chunks/pt-BoPxN80n.js +0 -96
- package/dist/admin/chunks/pt-BoPxN80n.js.map +0 -1
- package/dist/admin/chunks/pt-HbmgeiYO.mjs +0 -93
- package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +0 -1
- package/dist/admin/chunks/relations-Cq8NRUto.mjs +0 -173
- package/dist/admin/chunks/relations-Cq8NRUto.mjs.map +0 -1
- package/dist/admin/chunks/relations-XOYEEqMz.js +0 -178
- package/dist/admin/chunks/relations-XOYEEqMz.js.map +0 -1
- package/dist/admin/chunks/ru-C0op0ALG.js +0 -232
- package/dist/admin/chunks/ru-C0op0ALG.js.map +0 -1
- package/dist/admin/chunks/ru-CB4BUyQp.mjs +0 -230
- package/dist/admin/chunks/ru-CB4BUyQp.mjs.map +0 -1
- package/dist/admin/chunks/sa-B_FuPyMw.js +0 -201
- package/dist/admin/chunks/sa-B_FuPyMw.js.map +0 -1
- package/dist/admin/chunks/sa-n_aPA-pU.mjs +0 -196
- package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +0 -1
- package/dist/admin/chunks/sk-D_iXML2C.js +0 -203
- package/dist/admin/chunks/sk-D_iXML2C.js.map +0 -1
- package/dist/admin/chunks/sk-tn_BDjE2.mjs +0 -198
- package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +0 -1
- package/dist/admin/chunks/sv-BstBC1Yp.js +0 -203
- package/dist/admin/chunks/sv-BstBC1Yp.js.map +0 -1
- package/dist/admin/chunks/sv-cq4ZrQRd.mjs +0 -198
- package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +0 -1
- package/dist/admin/chunks/th-lXoOCqPC.js +0 -149
- package/dist/admin/chunks/th-lXoOCqPC.js.map +0 -1
- package/dist/admin/chunks/th-mUH7hEtc.mjs +0 -144
- package/dist/admin/chunks/th-mUH7hEtc.mjs.map +0 -1
- package/dist/admin/chunks/tr-CkS6sLIE.js +0 -200
- package/dist/admin/chunks/tr-CkS6sLIE.js.map +0 -1
- package/dist/admin/chunks/tr-Yt38daxh.mjs +0 -195
- package/dist/admin/chunks/tr-Yt38daxh.mjs.map +0 -1
- package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
- package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
- package/dist/admin/chunks/uk-Cpgmm7gE.mjs +0 -140
- package/dist/admin/chunks/uk-Cpgmm7gE.mjs.map +0 -1
- package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs +0 -247
- package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs.map +0 -1
- package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js +0 -271
- package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
- package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs +0 -18
- package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs.map +0 -1
- package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
- package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +0 -1
- package/dist/admin/chunks/vi-BGr1X_HZ.js +0 -112
- package/dist/admin/chunks/vi-BGr1X_HZ.js.map +0 -1
- package/dist/admin/chunks/vi-CvBGlTjr.mjs +0 -108
- package/dist/admin/chunks/vi-CvBGlTjr.mjs.map +0 -1
- package/dist/admin/chunks/zh-BmF-sHaT.mjs +0 -205
- package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +0 -1
- package/dist/admin/chunks/zh-DwFu_Kfj.js +0 -210
- package/dist/admin/chunks/zh-DwFu_Kfj.js.map +0 -1
- package/dist/admin/chunks/zh-Hans-CI0HKio3.mjs +0 -934
- package/dist/admin/chunks/zh-Hans-CI0HKio3.mjs.map +0 -1
- package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +0 -953
- package/dist/admin/chunks/zh-Hans-JVK9x7xr.js.map +0 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +0 -39
- package/dist/admin/src/preview/components/PreviewContent.d.ts +0 -3
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index-Cs6qwFQu.mjs","sources":["../../../admin/src/constants/plugin.ts","../../../admin/src/components/InjectionZone.tsx","../../../admin/src/constants/attributes.ts","../../../admin/src/constants/collections.ts","../../../admin/src/features/DocumentRBAC.tsx","../../../admin/src/pages/EditView/utils/data.ts","../../../admin/src/pages/EditView/utils/forms.ts","../../../admin/src/services/api.ts","../../../admin/src/services/documents.ts","../../../admin/src/utils/api.ts","../../../admin/src/utils/validation.ts","../../../admin/src/services/init.ts","../../../admin/src/hooks/useContentTypeSchema.ts","../../../admin/src/constants/hooks.ts","../../../admin/src/services/contentTypes.ts","../../../admin/src/utils/attributes.ts","../../../admin/src/hooks/useDocumentLayout.ts","../../../admin/src/hooks/useDocument.ts","../../../admin/src/utils/translations.ts","../../../admin/src/hooks/useDocumentActions.ts","../../../admin/src/history/routes.tsx","../../../admin/src/preview/routes.tsx","../../../admin/src/router.tsx","../../../admin/src/pages/EditView/components/DocumentActions.tsx","../../../admin/src/components/RelativeTime.tsx","../../../admin/src/utils/users.ts","../../../admin/src/utils/strings.ts","../../../admin/src/pages/EditView/components/DocumentStatus.tsx","../../../admin/src/pages/EditView/components/Header.tsx","../../../admin/src/pages/EditView/components/Panels.tsx","../../../admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.tsx","../../../admin/src/pages/ListView/components/BulkActions/PublishAction.tsx","../../../admin/src/pages/ListView/components/BulkActions/Actions.tsx","../../../admin/src/pages/ListView/components/AutoCloneFailureModal.tsx","../../../admin/src/pages/ListView/components/TableActions.tsx","../../../admin/src/content-manager.ts","../../../admin/src/history/components/HistoryAction.tsx","../../../admin/src/history/index.ts","../../../admin/src/modules/app.ts","../../../admin/src/modules/reducers.ts","../../../admin/src/preview/services/preview.ts","../../../admin/src/preview/components/PreviewSidePanel.tsx","../../../admin/src/preview/index.ts","../../../admin/src/index.ts"],"sourcesContent":["const PLUGIN_ID = 'content-manager';\n\nconst PERMISSIONS = [\n 'plugin::content-manager.explorer.create',\n 'plugin::content-manager.explorer.read',\n 'plugin::content-manager.explorer.update',\n 'plugin::content-manager.explorer.delete',\n 'plugin::content-manager.explorer.publish',\n];\n\nexport { PLUGIN_ID, PERMISSIONS };\n","import { useStrapiApp, InjectionZoneComponent } from '@strapi/admin/strapi-admin';\n\nimport { PLUGIN_ID } from '../constants/plugin';\n\nconst INJECTION_ZONES = {\n editView: { informations: [], 'right-links': [] },\n listView: {\n actions: [],\n deleteModalAdditionalInfos: [],\n publishModalAdditionalInfos: [],\n unpublishModalAdditionalInfos: [],\n },\n} satisfies InjectionZones;\n\ninterface InjectionZones {\n editView: {\n informations: InjectionZoneComponent[];\n 'right-links': InjectionZoneComponent[];\n };\n listView: {\n actions: InjectionZoneComponent[];\n deleteModalAdditionalInfos: InjectionZoneComponent[];\n publishModalAdditionalInfos: InjectionZoneComponent[];\n unpublishModalAdditionalInfos: InjectionZoneComponent[];\n };\n}\n\ntype InjectionZoneArea =\n | 'editView.informations'\n | 'editView.right-links'\n | 'listView.actions'\n | 'listView.unpublishModalAdditionalInfos'\n | 'listView.deleteModalAdditionalInfos'\n | 'listView.publishModalAdditionalInfos'\n | 'listView.deleteModalAdditionalInfos';\n\ntype InjectionZoneModule = InjectionZoneArea extends `${infer Word}.${string}` ? Word : never;\ntype InjectionZoneContainer = InjectionZoneArea extends `${string}.${infer Word}.${string}`\n ? Word\n : never;\ntype InjectionZoneBlock = InjectionZoneArea extends `${string}.${string}.${infer Word}`\n ? Word\n : never;\n\n/**\n * You can't know what this component props will be because it's generic and used everywhere\n * e.g. content-manager edit view, we just send the slug but we might not in the listView,\n * therefore, people should type it themselves on the components they render.\n */\nconst InjectionZone = ({ area, ...props }: { area: InjectionZoneArea; [key: string]: unknown }) => {\n const components = useInjectionZone(area);\n\n return (\n <>\n {components.map((component) => (\n <component.Component key={component.name} {...props} />\n ))}\n </>\n );\n};\n\nexport const useInjectionZone = (area: InjectionZoneArea) => {\n const getPlugin = useStrapiApp('useInjectionZone', (state) => state.getPlugin);\n const contentManagerPlugin = getPlugin(PLUGIN_ID);\n const [page, position] = area.split('.') as [InjectionZoneContainer, InjectionZoneBlock];\n\n return contentManagerPlugin.getInjectedComponents(page, position);\n};\n\nexport { InjectionZone, INJECTION_ZONES };\n\nexport type {\n InjectionZoneArea,\n InjectionZoneComponent,\n InjectionZones,\n InjectionZoneModule,\n InjectionZoneContainer,\n InjectionZoneBlock,\n};\n","const ID = 'id';\n\nconst CREATED_BY_ATTRIBUTE_NAME = 'createdBy';\nconst UPDATED_BY_ATTRIBUTE_NAME = 'updatedBy';\n\nconst CREATOR_FIELDS = [CREATED_BY_ATTRIBUTE_NAME, UPDATED_BY_ATTRIBUTE_NAME];\n\nconst PUBLISHED_BY_ATTRIBUTE_NAME = 'publishedBy';\nconst CREATED_AT_ATTRIBUTE_NAME = 'createdAt';\nconst UPDATED_AT_ATTRIBUTE_NAME = 'updatedAt';\nconst PUBLISHED_AT_ATTRIBUTE_NAME = 'publishedAt';\n\nconst DOCUMENT_META_FIELDS = [\n ID,\n ...CREATOR_FIELDS,\n PUBLISHED_BY_ATTRIBUTE_NAME,\n CREATED_AT_ATTRIBUTE_NAME,\n UPDATED_AT_ATTRIBUTE_NAME,\n PUBLISHED_AT_ATTRIBUTE_NAME,\n];\n\n/**\n * List of attribute types that cannot be used as the main field.\n * Not sure the name could be any clearer.\n */\nconst ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD = [\n 'dynamiczone',\n 'json',\n 'text',\n 'relation',\n 'component',\n 'boolean',\n 'media',\n 'password',\n 'richtext',\n 'timestamp',\n 'blocks',\n];\n\nexport {\n ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD,\n CREATED_AT_ATTRIBUTE_NAME,\n UPDATED_AT_ATTRIBUTE_NAME,\n PUBLISHED_AT_ATTRIBUTE_NAME,\n CREATED_BY_ATTRIBUTE_NAME,\n UPDATED_BY_ATTRIBUTE_NAME,\n PUBLISHED_BY_ATTRIBUTE_NAME,\n CREATOR_FIELDS,\n DOCUMENT_META_FIELDS,\n};\n","const SINGLE_TYPES = 'single-types';\nconst COLLECTION_TYPES = 'collection-types';\n\nexport { SINGLE_TYPES, COLLECTION_TYPES };\n","import * as React from 'react';\n\nimport {\n useRBAC,\n useAuth,\n type Permission,\n createContext,\n Page,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport { useParams } from 'react-router-dom';\n\nimport type { Schema } from '@strapi/types';\n\n/**\n * The boolean values indicate the global actions a user can perform on the document.\n * The `string[]` values tell us specifically which fields the actions can be performed on,\n * for example, if the `canReadFields` array is empty, than no fields can be read by the user.\n * This can happen even if the user can read the document.\n */\ninterface DocumentRBACContextValue {\n canCreate?: boolean;\n canCreateFields: string[];\n canDelete?: boolean;\n canPublish?: boolean;\n canRead?: boolean;\n canReadFields: string[];\n canUpdate?: boolean;\n canUpdateFields: string[];\n canUserAction: (\n fieldName: string,\n fieldsUserCanAction: string[],\n fieldType: Schema.Attribute.Kind\n ) => boolean;\n isLoading: boolean;\n}\n\nconst [DocumentRBACProvider, useDocumentRBAC] = createContext<DocumentRBACContextValue>(\n 'DocumentRBAC',\n {\n canCreate: false,\n canCreateFields: [],\n canDelete: false,\n canPublish: false,\n canRead: false,\n canReadFields: [],\n canUpdate: false,\n canUpdateFields: [],\n canUserAction: () => false,\n isLoading: false,\n }\n);\n\ninterface DocumentRBACProps {\n children: React.ReactNode;\n permissions: Permission[] | null;\n}\n\n/**\n * @internal This component is not meant to be used outside of the Content Manager plugin.\n * It depends on knowing the slug/model of the content-type using the params of the URL.\n * If you do use the hook outside of the context, we default to `false` for all actions.\n *\n * It then creates an list of `can{Action}` that are passed to the context for consumption\n * within the app to enforce RBAC.\n */\nconst DocumentRBAC = ({ children, permissions }: DocumentRBACProps) => {\n const { slug } = useParams<{ slug: string }>();\n\n if (!slug) {\n throw new Error('Cannot find the slug param in the URL');\n }\n const [{ rawQuery }] = useQueryParams<{ plugins?: { i18n?: { locale?: string } } }>();\n\n const userPermissions = useAuth('DocumentRBAC', (state) => state.permissions);\n\n const contentTypePermissions = React.useMemo(() => {\n const contentTypePermissions = userPermissions.filter(\n (permission) => permission.subject === slug\n );\n return contentTypePermissions.reduce<Record<string, Permission[]>>((acc, permission) => {\n const [action] = permission.action.split('.').slice(-1);\n return { ...acc, [action]: [permission] };\n }, {});\n }, [slug, userPermissions]);\n\n const { isLoading, allowedActions } = useRBAC(\n contentTypePermissions,\n permissions ?? undefined,\n // TODO: useRBAC context should be typed and built differently\n // We are passing raw query as context to the hook so that it can\n // rely on the locale provided from DocumentRBAC for its permission calculations.\n rawQuery\n );\n\n const canCreateFields =\n !isLoading && allowedActions.canCreate\n ? extractAndDedupeFields(contentTypePermissions.create)\n : [];\n\n const canReadFields =\n !isLoading && allowedActions.canRead ? extractAndDedupeFields(contentTypePermissions.read) : [];\n\n const canUpdateFields =\n !isLoading && allowedActions.canUpdate\n ? extractAndDedupeFields(contentTypePermissions.update)\n : [];\n\n /**\n * @description Checks if the user can perform an action on a field based on the field names\n * provided as the second argument.\n */\n const canUserAction: DocumentRBACContextValue['canUserAction'] = React.useCallback(\n (fieldName, fieldsUserCanAction, fieldType) => {\n const name = removeNumericalStrings(fieldName.split('.'));\n\n const componentFieldNames = fieldsUserCanAction\n // filter out fields that aren't components (components are dot separated)\n .filter((field) => field.split('.').length > 1);\n\n if (fieldType === 'component') {\n // check if the field name is within any of those arrays\n return componentFieldNames.some((field) => {\n return field.includes(name.join('.'));\n });\n }\n\n /**\n * The field is within a component.\n */\n if (name.length > 1) {\n return componentFieldNames.includes(name.join('.'));\n }\n\n /**\n * just a regular field\n */\n return fieldsUserCanAction.includes(fieldName);\n },\n []\n );\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n return (\n <DocumentRBACProvider\n isLoading={isLoading}\n canCreateFields={canCreateFields}\n canReadFields={canReadFields}\n canUpdateFields={canUpdateFields}\n canUserAction={canUserAction}\n {...allowedActions}\n >\n {children}\n </DocumentRBACProvider>\n );\n};\n\n/**\n * @internal it's really small, but it's used three times in a row and DRY for something this straight forward.\n */\nconst extractAndDedupeFields = (permissions: Permission[] = []) =>\n permissions\n .flatMap((permission) => permission.properties?.fields)\n .filter(\n (field, index, arr): field is string =>\n arr.indexOf(field) === index && typeof field === 'string'\n );\n\n/**\n * @internal removes numerical strings from arrays.\n * @example\n * ```ts\n * const name = 'a.0.b';\n * const res = removeNumericalStrings(name.split('.'));\n * console.log(res); // ['a', 'b']\n * ```\n */\nconst removeNumericalStrings = (arr: string[]) => arr.filter((item) => isNaN(Number(item)));\n\nexport { DocumentRBAC, useDocumentRBAC, DocumentRBACContextValue, DocumentRBACProps };\n","import { generateNKeysBetween } from 'fractional-indexing';\nimport pipe from 'lodash/fp/pipe';\n\nimport { DOCUMENT_META_FIELDS } from '../../../constants/attributes';\n\nimport type { ComponentsDictionary, Document } from '../../../hooks/useDocument';\nimport type { Schema, UID } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * traverseData\n * -----------------------------------------------------------------------------------------------*/\n\n// Make only attributes required since it's the only one Content History has\ntype PartialSchema = Partial<Schema.Schema> & Pick<Schema.Schema, 'attributes'>;\n\ntype Predicate = <TAttribute extends Schema.Attribute.AnyAttribute>(\n attribute: TAttribute,\n value: Schema.Attribute.Value<TAttribute>\n) => boolean;\ntype Transform = <TAttribute extends Schema.Attribute.AnyAttribute>(\n value: any,\n attribute: TAttribute\n) => any;\ntype AnyData = Omit<Document, 'id'>;\n\nconst BLOCK_LIST_ATTRIBUTE_KEYS = ['__component', '__temp_key__'];\n\n/**\n * @internal This function is used to traverse the data and transform the values.\n * Given a predicate function, it will transform the value (using the given transform function)\n * if the predicate returns true. If it finds that the attribute is a component or dynamiczone,\n * it will recursively traverse those data structures as well.\n *\n * It is possible to break the ContentManager by using this function incorrectly, for example,\n * if you transform a number into a string but the attribute type is a number, the ContentManager\n * will not be able to save the data and the Form will likely crash because the component it's\n * passing the data too won't succesfully be able to handle the value.\n */\nconst traverseData =\n (predicate: Predicate, transform: Transform) =>\n (schema: PartialSchema, components: ComponentsDictionary = {}) =>\n (data: AnyData = {}) => {\n const traverse = (datum: AnyData, attributes: Schema.Schema['attributes']) => {\n return Object.entries(datum).reduce<AnyData>((acc, [key, value]) => {\n const attribute = attributes[key];\n\n /**\n * If the attribute is a block list attribute, we don't want to transform it.\n * We also don't want to transform null or undefined values.\n */\n if (BLOCK_LIST_ATTRIBUTE_KEYS.includes(key) || value === null || value === undefined) {\n acc[key] = value;\n return acc;\n }\n\n if (attribute.type === 'component') {\n if (attribute.repeatable) {\n const componentValue = (\n predicate(attribute, value) ? transform(value, attribute) : value\n ) as Schema.Attribute.Value<Schema.Attribute.Component<UID.Component, true>>;\n acc[key] = componentValue.map((componentData) =>\n traverse(componentData, components[attribute.component]?.attributes ?? {})\n );\n } else {\n const componentValue = (\n predicate(attribute, value) ? transform(value, attribute) : value\n ) as Schema.Attribute.Value<Schema.Attribute.Component<UID.Component, false>>;\n\n acc[key] = traverse(componentValue, components[attribute.component]?.attributes ?? {});\n }\n } else if (attribute.type === 'dynamiczone') {\n const dynamicZoneValue = (\n predicate(attribute, value) ? transform(value, attribute) : value\n ) as Schema.Attribute.Value<Schema.Attribute.DynamicZone>;\n\n acc[key] = dynamicZoneValue.map((componentData) =>\n traverse(componentData, components[componentData.__component]?.attributes ?? {})\n );\n } else if (predicate(attribute, value)) {\n acc[key] = transform(value, attribute);\n } else {\n acc[key] = value;\n }\n\n return acc;\n }, {});\n };\n\n return traverse(data, schema.attributes);\n };\n\n/* -------------------------------------------------------------------------------------------------\n * removeProhibitedFields\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal Removes all the fields that are not allowed.\n */\nconst removeProhibitedFields = (prohibitedFields: Schema.Attribute.Kind[]) =>\n traverseData(\n (attribute) => prohibitedFields.includes(attribute.type),\n () => ''\n );\n\n/* -------------------------------------------------------------------------------------------------\n * prepareRelations\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description Sets all relation values to an empty array.\n */\nconst prepareRelations = traverseData(\n (attribute) => attribute.type === 'relation',\n () => ({\n connect: [],\n disconnect: [],\n })\n);\n\n/* -------------------------------------------------------------------------------------------------\n * prepareTempKeys\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description Adds a `__temp_key__` to each component and dynamiczone item. This gives us\n * a stable identifier regardless of its ids etc. that we can then use for drag and drop.\n */\nconst prepareTempKeys = traverseData(\n (attribute) =>\n (attribute.type === 'component' && attribute.repeatable) || attribute.type === 'dynamiczone',\n (data) => {\n if (Array.isArray(data) && data.length > 0) {\n const keys = generateNKeysBetween(undefined, undefined, data.length);\n\n return data.map((datum, index) => ({\n ...datum,\n __temp_key__: keys[index],\n }));\n }\n\n return data;\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * removeFieldsThatDontExistOnSchema\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description Fields that don't exist in the schema like createdAt etc. are only on the first level (not nested),\n * as such we don't need to traverse the components to remove them.\n */\nconst removeFieldsThatDontExistOnSchema = (schema: PartialSchema) => (data: AnyData) => {\n const schemaKeys = Object.keys(schema.attributes);\n const dataKeys = Object.keys(data);\n\n const keysToRemove = dataKeys.filter((key) => !schemaKeys.includes(key));\n\n const revisedData = [...keysToRemove, ...DOCUMENT_META_FIELDS].reduce((acc, key) => {\n delete acc[key];\n\n return acc;\n }, structuredClone(data));\n\n return revisedData;\n};\n\n/**\n * @internal\n * @description We need to remove null fields from the data-structure because it will pass it\n * to the specific inputs breaking them as most would prefer empty strings or `undefined` if\n * they're controlled / uncontrolled.\n */\nconst removeNullValues = (data: AnyData) => {\n return Object.entries(data).reduce<AnyData>((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n\n acc[key] = value;\n\n return acc;\n }, {});\n};\n\n/* -------------------------------------------------------------------------------------------------\n * transformDocuments\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description Takes a document data structure (this could be from the API or a default form structure)\n * and applies consistent data transformations to it. This is also used when we add new components to the\n * form to ensure the data is correctly prepared from their default state e.g. relations are set to an empty array.\n */\nconst transformDocument =\n (schema: PartialSchema, components: ComponentsDictionary = {}) =>\n (document: AnyData) => {\n const transformations = pipe(\n removeFieldsThatDontExistOnSchema(schema),\n removeProhibitedFields(['password'])(schema, components),\n removeNullValues,\n prepareRelations(schema, components),\n prepareTempKeys(schema, components)\n );\n\n return transformations(document);\n };\n\nexport {\n removeProhibitedFields,\n prepareRelations,\n prepareTempKeys,\n removeFieldsThatDontExistOnSchema,\n transformDocument,\n};\nexport type { AnyData };\n","import type { ComponentsDictionary, Document } from '../../../hooks/useDocument';\nimport type { Schema } from '@strapi/types';\n\ntype AnyData = Omit<Document, 'id'>;\n\n/* -------------------------------------------------------------------------------------------------\n * createDefaultForm\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal Using the content-type schema & the components dictionary of the content-type,\n * creates a form with pre-filled default values. This is used when creating a new entry.\n */\nconst createDefaultForm = (\n contentType: Schema.Schema,\n components: ComponentsDictionary = {}\n): AnyData => {\n const traverseSchema = (attributes: Schema.Schema['attributes']): AnyData => {\n return Object.entries(attributes).reduce<AnyData>((acc, [key, attribute]) => {\n if ('default' in attribute) {\n acc[key] = attribute.default;\n } else if (attribute.type === 'component' && attribute.required) {\n const defaultComponentForm = traverseSchema(components[attribute.component].attributes);\n\n if (attribute.repeatable) {\n acc[key] = attribute.min ? [...Array(attribute.min).fill(defaultComponentForm)] : [];\n } else {\n acc[key] = defaultComponentForm;\n }\n } else if (attribute.type === 'dynamiczone' && attribute.required) {\n acc[key] = [];\n }\n\n return acc;\n }, {});\n };\n\n return traverseSchema(contentType.attributes);\n};\n\nexport { createDefaultForm };\n","import { adminApi } from '@strapi/admin/strapi-admin';\n\nconst contentManagerApi = adminApi.enhanceEndpoints({\n addTagTypes: [\n 'ComponentConfiguration',\n 'ContentTypesConfiguration',\n 'ContentTypeSettings',\n 'Document',\n 'InitialData',\n 'HistoryVersion',\n 'Relations',\n 'UidAvailability',\n 'RecentDocumentList',\n ],\n});\n\nexport { contentManagerApi };\n","/**\n * Related to fetching the actual content of a collection type or single type.\n */\nimport { stringify } from 'qs';\n\nimport { SINGLE_TYPES } from '../constants/collections';\n\nimport { contentManagerApi } from './api';\n\nimport type {\n Clone,\n Create,\n Delete,\n Find,\n FindOne,\n BulkDelete,\n BulkPublish,\n BulkUnpublish,\n Discard,\n CountDraftRelations,\n CountManyEntriesDraftRelations,\n Publish,\n Unpublish,\n Update,\n} from '../../../shared/contracts/collection-types';\n\nconst documentApi = contentManagerApi.injectEndpoints({\n overrideExisting: true,\n endpoints: (builder) => ({\n autoCloneDocument: builder.mutation<Clone.Response, Clone.Params & { query?: string }>({\n query: ({ model, sourceId, query }) => ({\n url: `/content-manager/collection-types/${model}/auto-clone/${sourceId}`,\n method: 'POST',\n config: {\n params: query,\n },\n }),\n invalidatesTags: (_result, error, { model }) => {\n if (error) {\n return [];\n }\n\n return [{ type: 'Document', id: `${model}_LIST` }, 'RecentDocumentList'];\n },\n }),\n cloneDocument: builder.mutation<\n Clone.Response,\n Clone.Params & {\n data: Clone.Request['body'];\n params?: Clone.Request['query'];\n }\n >({\n query: ({ model, sourceId, data, params }) => ({\n url: `/content-manager/collection-types/${model}/clone/${sourceId}`,\n method: 'POST',\n data,\n config: {\n params,\n },\n }),\n invalidatesTags: (_result, _error, { model }) => [\n { type: 'Document', id: `${model}_LIST` },\n { type: 'UidAvailability', id: model },\n 'RecentDocumentList',\n ],\n }),\n /**\n * Creates a new collection-type document. This should ONLY be used for collection-types.\n * single-types should always be using `updateDocument` since they always exist.\n */\n createDocument: builder.mutation<\n Create.Response,\n Create.Params & {\n data: Create.Request['body'];\n params?: Create.Request['query'];\n }\n >({\n query: ({ model, data, params }) => ({\n url: `/content-manager/collection-types/${model}`,\n method: 'POST',\n data,\n config: {\n params,\n },\n }),\n invalidatesTags: (result, _error, { model }) => [\n { type: 'Document', id: `${model}_LIST` },\n 'Relations',\n { type: 'UidAvailability', id: model },\n 'RecentDocumentList',\n ],\n transformResponse: (response: Create.Response, meta, arg): Create.Response => {\n /**\n * TODO v6\n * Adapt plugin:users-permissions.user to return the same response\n * shape as all other requests. The error is returned as expected.\n */\n if (!('data' in response) && arg.model === 'plugin::users-permissions.user') {\n return {\n data: response,\n meta: {\n availableStatus: [],\n availableLocales: [],\n },\n };\n }\n\n return response;\n },\n }),\n deleteDocument: builder.mutation<\n Delete.Response,\n Pick<Delete.Params, 'model'> &\n Pick<Partial<Delete.Params>, 'documentId'> & {\n collectionType: string;\n params?: Find.Request['query'];\n }\n >({\n query: ({ collectionType, model, documentId, params }) => ({\n url: `/content-manager/${collectionType}/${model}${\n collectionType !== SINGLE_TYPES && documentId ? `/${documentId}` : ''\n }`,\n method: 'DELETE',\n config: {\n params,\n },\n }),\n invalidatesTags: (_result, _error, { collectionType, model }) => [\n { type: 'Document', id: collectionType !== SINGLE_TYPES ? `${model}_LIST` : model },\n 'RecentDocumentList',\n ],\n }),\n deleteManyDocuments: builder.mutation<\n BulkDelete.Response,\n BulkDelete.Params & BulkDelete.Request['body'] & { params?: Find.Request['query'] }\n >({\n query: ({ model, params, ...body }) => ({\n url: `/content-manager/collection-types/${model}/actions/bulkDelete`,\n method: 'POST',\n data: body,\n config: {\n params,\n },\n }),\n invalidatesTags: (_res, _error, { model }) => [\n { type: 'Document', id: `${model}_LIST` },\n 'RecentDocumentList',\n ],\n }),\n discardDocument: builder.mutation<\n Discard.Response,\n Pick<Discard.Params, 'model'> &\n Partial<Pick<Discard.Params, 'documentId'>> & {\n collectionType: string;\n params?: Find.Request['query'] & {\n [key: string]: any;\n };\n }\n >({\n query: ({ collectionType, model, documentId, params }) => ({\n url: documentId\n ? `/content-manager/${collectionType}/${model}/${documentId}/actions/discard`\n : `/content-manager/${collectionType}/${model}/actions/discard`,\n method: 'POST',\n config: {\n params,\n },\n }),\n invalidatesTags: (_result, _error, { collectionType, model, documentId }) => {\n return [\n {\n type: 'Document',\n id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model,\n },\n { type: 'Document', id: `${model}_LIST` },\n 'Relations',\n { type: 'UidAvailability', id: model },\n 'RecentDocumentList',\n ];\n },\n }),\n /**\n * Gets all documents of a collection type or single type.\n * By passing different params you can get different results e.g. only published documents or 'es' documents.\n */\n getAllDocuments: builder.query<\n Find.Response,\n Find.Params & {\n params?: Find.Request['query'] & {\n [key: string]: any;\n };\n }\n >({\n query: ({ model, params }) => ({\n url: `/content-manager/collection-types/${model}`,\n method: 'GET',\n config: {\n params: stringify(params, { encode: true }),\n },\n }),\n providesTags: (result, _error, arg) => {\n return [\n { type: 'Document', id: `ALL_LIST` },\n { type: 'Document', id: `${arg.model}_LIST` },\n ...(result?.results.map(({ documentId }) => ({\n type: 'Document' as const,\n id: `${arg.model}_${documentId}`,\n })) ?? []),\n ];\n },\n }),\n getDraftRelationCount: builder.query<\n CountDraftRelations.Response,\n {\n collectionType: string;\n model: string;\n /**\n * You don't pass the documentId if the document is a single-type\n */\n documentId?: string;\n params?: CountDraftRelations.Request['query'];\n }\n >({\n query: ({ collectionType, model, documentId, params }) => ({\n url: documentId\n ? `/content-manager/${collectionType}/${model}/${documentId}/actions/countDraftRelations`\n : `/content-manager/${collectionType}/${model}/actions/countDraftRelations`,\n method: 'GET',\n config: {\n params,\n },\n }),\n }),\n getDocument: builder.query<\n FindOne.Response,\n Pick<FindOne.Params, 'model'> &\n Partial<Pick<FindOne.Params, 'documentId'>> & {\n collectionType: string;\n params?: FindOne.Request['query'];\n }\n >({\n // @ts-expect-error – TODO: fix ts error where data unknown doesn't work with response via an assertion?\n queryFn: async (\n { collectionType, model, documentId, params },\n _api,\n _extraOpts,\n baseQuery\n ) => {\n const res = await baseQuery({\n url: `/content-manager/${collectionType}/${model}${documentId ? `/${documentId}` : ''}`,\n method: 'GET',\n config: {\n params,\n },\n });\n\n /**\n * To stop the query from locking itself in multiple retries, we intercept the error here and manage correctly.\n * This is because single-types don't have a list view and fetching them with the route `/single-types/:model`\n * never returns a list, just a single document but this won't exist if you've not made one before.\n */\n if (res.error && res.error.name === 'NotFoundError' && collectionType === SINGLE_TYPES) {\n return { data: { document: undefined }, error: undefined };\n }\n\n return res;\n },\n providesTags: (result, _error, { collectionType, model, documentId }) => {\n return [\n // we prefer the result's id because we don't fetch single-types with an ID.\n {\n type: 'Document',\n id:\n collectionType !== SINGLE_TYPES\n ? `${model}_${result && 'documentId' in result ? result.documentId : documentId}`\n : model,\n },\n // Make it easy to invalidate all individual documents queries for a model\n {\n type: 'Document',\n id: `${model}_ALL_ITEMS`,\n },\n ];\n },\n }),\n getManyDraftRelationCount: builder.query<\n CountManyEntriesDraftRelations.Response['data'],\n CountManyEntriesDraftRelations.Request['query'] & {\n model: string;\n }\n >({\n query: ({ model, ...params }) => ({\n url: `/content-manager/collection-types/${model}/actions/countManyEntriesDraftRelations`,\n method: 'GET',\n config: {\n params,\n },\n }),\n transformResponse: (response: CountManyEntriesDraftRelations.Response) => response.data,\n }),\n /**\n * This endpoint will either create or update documents at the same time as publishing.\n */\n publishDocument: builder.mutation<\n Publish.Response,\n Pick<Publish.Params, 'model'> &\n Partial<Pick<Publish.Params, 'documentId'>> & {\n collectionType: string;\n data: Publish.Request['body'];\n params?: Publish.Request['query'];\n }\n >({\n query: ({ collectionType, model, documentId, params, data }) => ({\n url: documentId\n ? `/content-manager/${collectionType}/${model}/${documentId}/actions/publish`\n : `/content-manager/${collectionType}/${model}/actions/publish`,\n method: 'POST',\n data,\n config: {\n params,\n },\n }),\n invalidatesTags: (_result, _error, { collectionType, model, documentId }) => {\n return [\n {\n type: 'Document',\n id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model,\n },\n { type: 'Document', id: `${model}_LIST` },\n 'Relations',\n 'RecentDocumentList',\n ];\n },\n }),\n publishManyDocuments: builder.mutation<\n BulkPublish.Response,\n BulkPublish.Params & BulkPublish.Request['body'] & { params?: BulkPublish.Request['query'] }\n >({\n query: ({ model, params, ...body }) => ({\n url: `/content-manager/collection-types/${model}/actions/bulkPublish`,\n method: 'POST',\n data: body,\n config: {\n params,\n },\n }),\n invalidatesTags: (_res, _error, { model, documentIds }) =>\n documentIds.map((id) => ({ type: 'Document', id: `${model}_${id}` })),\n }),\n updateDocument: builder.mutation<\n Update.Response,\n Pick<Update.Params, 'model'> &\n Partial<Pick<Update.Params, 'documentId'>> & {\n collectionType: string;\n data: Update.Request['body'];\n params?: Update.Request['query'];\n }\n >({\n query: ({ collectionType, model, documentId, data, params }) => ({\n url: `/content-manager/${collectionType}/${model}${documentId ? `/${documentId}` : ''}`,\n method: 'PUT',\n data,\n config: {\n params,\n },\n }),\n invalidatesTags: (_result, _error, { collectionType, model, documentId }) => {\n return [\n {\n type: 'Document',\n id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model,\n },\n 'Relations',\n { type: 'UidAvailability', id: model },\n 'RecentDocumentList',\n 'RecentDocumentList',\n ];\n },\n async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {\n // Optimistically update the cache with the new data\n const patchResult = dispatch(\n documentApi.util.updateQueryData('getDocument', patch, (draft) => {\n Object.assign(draft.data, data);\n })\n );\n try {\n await queryFulfilled;\n } catch {\n // Rollback the optimistic update if there's an error\n patchResult.undo();\n }\n },\n }),\n unpublishDocument: builder.mutation<\n Unpublish.Response,\n Pick<Unpublish.Params, 'model'> &\n Partial<Pick<Unpublish.Params, 'documentId'>> & {\n collectionType: string;\n params?: Unpublish.Request['query'];\n data: Unpublish.Request['body'];\n }\n >({\n query: ({ collectionType, model, documentId, params, data }) => ({\n url: documentId\n ? `/content-manager/${collectionType}/${model}/${documentId}/actions/unpublish`\n : `/content-manager/${collectionType}/${model}/actions/unpublish`,\n method: 'POST',\n data,\n config: {\n params,\n },\n }),\n invalidatesTags: (_result, _error, { collectionType, model, documentId }) => {\n return [\n {\n type: 'Document',\n id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model,\n },\n 'RecentDocumentList',\n ];\n },\n }),\n unpublishManyDocuments: builder.mutation<\n BulkUnpublish.Response,\n Pick<BulkUnpublish.Params, 'model'> &\n BulkUnpublish.Request['body'] & {\n params?: BulkUnpublish.Request['query'];\n }\n >({\n query: ({ model, params, ...body }) => ({\n url: `/content-manager/collection-types/${model}/actions/bulkUnpublish`,\n method: 'POST',\n data: body,\n config: {\n params,\n },\n }),\n invalidatesTags: (_res, _error, { model, documentIds }) => [\n ...documentIds.map((id) => ({ type: 'Document' as const, id: `${model}_${id}` })),\n 'RecentDocumentList',\n ],\n }),\n }),\n});\n\nconst {\n useAutoCloneDocumentMutation,\n useCloneDocumentMutation,\n useCreateDocumentMutation,\n useDeleteDocumentMutation,\n useDeleteManyDocumentsMutation,\n useDiscardDocumentMutation,\n useGetAllDocumentsQuery,\n useLazyGetDocumentQuery,\n useGetDocumentQuery,\n useLazyGetDraftRelationCountQuery,\n useGetManyDraftRelationCountQuery,\n usePublishDocumentMutation,\n usePublishManyDocumentsMutation,\n useUpdateDocumentMutation,\n useUnpublishDocumentMutation,\n useUnpublishManyDocumentsMutation,\n} = documentApi;\n\nexport {\n useAutoCloneDocumentMutation,\n useCloneDocumentMutation,\n useCreateDocumentMutation,\n useDeleteDocumentMutation,\n useDeleteManyDocumentsMutation,\n useDiscardDocumentMutation,\n useGetAllDocumentsQuery,\n useLazyGetDocumentQuery,\n useGetDocumentQuery,\n useLazyGetDraftRelationCountQuery as useGetDraftRelationCountQuery,\n useGetManyDraftRelationCountQuery,\n usePublishDocumentMutation,\n usePublishManyDocumentsMutation,\n useUpdateDocumentMutation,\n useUnpublishDocumentMutation,\n useUnpublishManyDocumentsMutation,\n};\n","import { SerializedError } from '@reduxjs/toolkit';\nimport { ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';\n\ninterface Query {\n plugins?: Record<string, unknown>;\n _q?: string;\n [key: string]: any;\n}\n\n/**\n * This type extracts the plugin options from the query\n * and appends them to the root of the query\n */\ntype TransformedQuery<TQuery extends Query> = Omit<TQuery, 'plugins'> & {\n [key: string]: string;\n};\n\n/**\n * @description\n * Creates a valid query params object for get requests\n * ie. plugins[18n][locale]=en becomes locale=en\n */\nconst buildValidParams = <TQuery extends Query>(query: TQuery): TransformedQuery<TQuery> => {\n if (!query) return query;\n\n // Extract pluginOptions from the query, they shouldn't be part of the URL\n const { plugins: _, ...validQueryParams } = {\n ...query,\n ...Object.values(query?.plugins ?? {}).reduce<Record<string, string>>(\n (acc, current) => Object.assign(acc, current),\n {}\n ),\n };\n\n return validQueryParams;\n};\n\ntype BaseQueryError = ApiError | UnknownApiError;\n\nconst isBaseQueryError = (error: BaseQueryError | SerializedError): error is BaseQueryError => {\n return error.name !== undefined;\n};\n\nexport { isBaseQueryError, buildValidParams };\nexport type { BaseQueryError, UnknownApiError };\n","import { translatedErrors } from '@strapi/admin/strapi-admin';\nimport pipe from 'lodash/fp/pipe';\nimport * as yup from 'yup';\n\nimport { DOCUMENT_META_FIELDS } from '../constants/attributes';\n\nimport type { ComponentsDictionary, Schema } from '../hooks/useDocument';\nimport type { Schema as SchemaUtils } from '@strapi/types';\nimport type { ObjectShape } from 'yup/lib/object';\n\ntype AnySchema =\n | yup.StringSchema\n | yup.NumberSchema\n | yup.BooleanSchema\n | yup.DateSchema\n | yup.ArraySchema<any>\n | yup.ObjectSchema<any>;\n\n/* -------------------------------------------------------------------------------------------------\n * createYupSchema\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ValidationOptions {\n status: 'draft' | 'published' | null;\n}\n\nconst arrayValidator = (attribute: Schema['attributes'][string], options: ValidationOptions) => ({\n message: translatedErrors.required,\n test(value: unknown) {\n if (options.status === 'draft') {\n return true;\n }\n\n if (!attribute.required) {\n return true;\n }\n\n if (!value) {\n return false;\n }\n\n if (Array.isArray(value) && value.length === 0) {\n return false;\n }\n\n return true;\n },\n});\n\n/**\n * TODO: should we create a Map to store these based on the hash of the schema?\n */\nconst createYupSchema = (\n attributes: Schema['attributes'] = {},\n components: ComponentsDictionary = {},\n options: ValidationOptions = { status: null }\n): yup.ObjectSchema<any> => {\n const createModelSchema = (attributes: Schema['attributes']): yup.ObjectSchema<any> =>\n yup\n .object()\n .shape(\n Object.entries(attributes).reduce<ObjectShape>((acc, [name, attribute]) => {\n if (DOCUMENT_META_FIELDS.includes(name)) {\n return acc;\n }\n\n /**\n * These validations won't apply to every attribute\n * and that's okay, in that case we just return the\n * schema as it was passed.\n */\n const validations = [\n addNullableValidation,\n addRequiredValidation,\n addMinLengthValidation,\n addMaxLengthValidation,\n addMinValidation,\n addMaxValidation,\n addRegexValidation,\n ].map((fn) => fn(attribute, options));\n\n const transformSchema = pipe(...validations);\n\n switch (attribute.type) {\n case 'component': {\n const { attributes } = components[attribute.component];\n\n if (attribute.repeatable) {\n return {\n ...acc,\n [name]: transformSchema(\n yup.array().of(createModelSchema(attributes).nullable(false))\n ).test(arrayValidator(attribute, options)),\n };\n } else {\n return {\n ...acc,\n [name]: transformSchema(createModelSchema(attributes).nullable()),\n };\n }\n }\n case 'dynamiczone':\n return {\n ...acc,\n [name]: transformSchema(\n yup.array().of(\n yup.lazy(\n (\n data: SchemaUtils.Attribute.Value<SchemaUtils.Attribute.DynamicZone>[number]\n ) => {\n const attributes = components?.[data?.__component]?.attributes;\n\n const validation = yup\n .object()\n .shape({\n __component: yup.string().required().oneOf(Object.keys(components)),\n })\n .nullable(false);\n if (!attributes) {\n return validation;\n }\n\n return validation.concat(createModelSchema(attributes));\n }\n ) as unknown as yup.ObjectSchema<any>\n )\n ).test(arrayValidator(attribute, options)),\n };\n case 'relation':\n return {\n ...acc,\n [name]: transformSchema(\n yup.lazy((value) => {\n if (!value) {\n return yup.mixed().nullable(true);\n } else if (Array.isArray(value)) {\n // If a relation value is an array, we expect\n // an array of objects with {id} properties, representing the related entities.\n return yup.array().of(\n yup.object().shape({\n id: yup.number().required(),\n })\n );\n } else if (typeof value === 'object') {\n // A realtion value can also be an object. Some API\n // repsonses return the number of entities in the relation\n // as { count: x }\n return yup.object();\n } else {\n return yup\n .mixed()\n .test(\n 'type-error',\n 'Relation values must be either null, an array of objects with {id} or an object.',\n () => false\n );\n }\n })\n ),\n };\n default:\n return {\n ...acc,\n [name]: transformSchema(createAttributeSchema(attribute)),\n };\n }\n }, {})\n )\n /**\n * TODO: investigate why an undefined object fails a check of `nullable`.\n */\n .default(null);\n\n return createModelSchema(attributes);\n};\n\nconst createAttributeSchema = (\n attribute: Exclude<\n SchemaUtils.Attribute.AnyAttribute,\n { type: 'dynamiczone' } | { type: 'component' } | { type: 'relation' }\n >\n) => {\n switch (attribute.type) {\n case 'biginteger':\n return yup.string().matches(/^-?\\d*$/);\n case 'boolean':\n return yup.boolean();\n case 'blocks':\n return yup.mixed().test('isBlocks', translatedErrors.json, (value) => {\n if (!value || Array.isArray(value)) {\n return true;\n } else {\n return false;\n }\n });\n case 'decimal':\n case 'float':\n case 'integer':\n return yup.number();\n case 'email':\n return yup.string().email(translatedErrors.email);\n case 'enumeration':\n return yup.string().oneOf([...attribute.enum, null]);\n case 'json':\n return yup.mixed().test('isJSON', translatedErrors.json, (value) => {\n /**\n * We don't want to validate the JSON field if it's empty.\n */\n if (!value || (typeof value === 'string' && value.length === 0)) {\n return true;\n }\n\n // If the value was created via content API and wasn't changed, then it's still an object\n if (typeof value === 'object') {\n try {\n JSON.stringify(value);\n return true;\n } catch (err) {\n return false;\n }\n }\n\n try {\n JSON.parse(value);\n\n return true;\n } catch (err) {\n return false;\n }\n });\n case 'password':\n case 'richtext':\n case 'string':\n case 'text':\n return yup.string();\n case 'uid':\n return yup.string().matches(/^[A-Za-z0-9-_.~]*$/);\n default:\n /**\n * This allows any value.\n */\n return yup.mixed();\n }\n};\n\n// Helper function to return schema.nullable() if it exists, otherwise return schema\nconst nullableSchema = <TSchema extends AnySchema>(schema: TSchema) => {\n return schema?.nullable\n ? schema.nullable()\n : // In some cases '.nullable' will not be available on the schema.\n // e.g. when the schema has been built using yup.lazy (e.g. for relations).\n // In these cases we should just return the schema as it is.\n schema;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Validators\n * -----------------------------------------------------------------------------------------------*/\n/**\n * Our validator functions can be preped with the\n * attribute and then have the schema piped through them.\n */\ntype ValidationFn = (\n attribute: Schema['attributes'][string],\n options: ValidationOptions\n) => <TSchema extends AnySchema>(schema: TSchema) => TSchema;\n\nconst addNullableValidation: ValidationFn = () => (schema) => {\n return nullableSchema(schema);\n};\n\nconst addRequiredValidation: ValidationFn = (attribute, options) => (schema) => {\n if (options.status === 'draft' || !attribute.required) {\n return schema;\n }\n\n if (attribute.required && 'required' in schema) {\n return schema.required(translatedErrors.required);\n }\n\n return schema;\n};\n\nconst addMinLengthValidation: ValidationFn =\n (attribute, options) =>\n <TSchema extends AnySchema>(schema: TSchema): TSchema => {\n // Skip minLength validation for draft\n if (options.status === 'draft') {\n return schema;\n }\n\n if (\n 'minLength' in attribute &&\n attribute.minLength &&\n Number.isInteger(attribute.minLength) &&\n 'min' in schema\n ) {\n return schema.min(attribute.minLength, {\n ...translatedErrors.minLength,\n values: {\n min: attribute.minLength,\n },\n }) as TSchema;\n }\n\n return schema;\n };\n\nconst addMaxLengthValidation: ValidationFn =\n (attribute) =>\n <TSchema extends AnySchema>(schema: TSchema): TSchema => {\n if (\n 'maxLength' in attribute &&\n attribute.maxLength &&\n Number.isInteger(attribute.maxLength) &&\n 'max' in schema\n ) {\n return schema.max(attribute.maxLength, {\n ...translatedErrors.maxLength,\n values: {\n max: attribute.maxLength,\n },\n }) as TSchema;\n }\n\n return schema;\n };\n\nconst addMinValidation: ValidationFn =\n (attribute, options) =>\n <TSchema extends AnySchema>(schema: TSchema): TSchema => {\n // do not validate min for draft\n if (options.status === 'draft') {\n return schema;\n }\n\n if ('min' in attribute && 'min' in schema) {\n const min = toInteger(attribute.min);\n\n if (min) {\n return schema.min(min, {\n ...translatedErrors.min,\n values: {\n min,\n },\n }) as TSchema;\n }\n }\n\n return schema;\n };\n\nconst addMaxValidation: ValidationFn =\n (attribute) =>\n <TSchema extends AnySchema>(schema: TSchema): TSchema => {\n if ('max' in attribute) {\n const max = toInteger(attribute.max);\n\n if ('max' in schema && max) {\n return schema.max(max, {\n ...translatedErrors.max,\n values: {\n max,\n },\n }) as TSchema;\n }\n }\n\n return schema;\n };\n\nconst toInteger = (val?: string | number): number | undefined => {\n if (typeof val === 'number' || val === undefined) {\n return val;\n } else {\n const num = Number(val);\n return isNaN(num) ? undefined : num;\n }\n};\n\nconst addRegexValidation: ValidationFn =\n (attribute) =>\n <TSchema extends AnySchema>(schema: TSchema): TSchema => {\n if ('regex' in attribute && attribute.regex && 'matches' in schema) {\n return schema.matches(new RegExp(attribute.regex), {\n message: {\n id: translatedErrors.regex.id,\n defaultMessage: 'The value does not match the defined pattern.',\n },\n\n excludeEmptyString: !attribute.required,\n }) as TSchema;\n }\n\n return schema;\n };\n\nexport { createYupSchema };\n","import { contentManagerApi } from './api';\n\nimport type { GetInitData } from '../../../shared/contracts/init';\n\nconst initApi = contentManagerApi.injectEndpoints({\n endpoints: (builder) => ({\n getInitialData: builder.query<GetInitData.Response['data'], void>({\n query: () => '/content-manager/init',\n transformResponse: (response: GetInitData.Response) => response.data,\n providesTags: ['InitialData'],\n }),\n }),\n});\n\nconst { useGetInitialDataQuery } = initApi;\n\nexport { useGetInitialDataQuery };\n","import * as React from 'react';\n\nimport { useNotification, useAPIErrorHandler } from '@strapi/admin/strapi-admin';\n\nimport { useGetInitialDataQuery } from '../services/init';\n\nimport type { Component } from '../../../shared/contracts/components';\nimport type { ContentType } from '../../../shared/contracts/content-types';\nimport type { Schema } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * useContentTypeSchema\n * -----------------------------------------------------------------------------------------------*/\ntype ComponentsDictionary = Record<string, Component>;\n\n/**\n * @internal\n * @description Given a model UID, return the schema and the schemas\n * of the associated components within said model's schema. A wrapper\n * implementation around the `useGetInitialDataQuery` with a unique\n * `selectFromResult` function to memoize the calculation.\n *\n * If no model is provided, the hook will return all the schemas.\n */\nconst useContentTypeSchema = (model?: string) => {\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const { data, error, isLoading, isFetching } = useGetInitialDataQuery(undefined);\n\n const { components, contentType, contentTypes } = React.useMemo(() => {\n const contentType = data?.contentTypes.find((ct) => ct.uid === model);\n\n const componentsByKey = data?.components.reduce<ComponentsDictionary>((acc, component) => {\n acc[component.uid] = component;\n\n return acc;\n }, {});\n\n const components = extractContentTypeComponents(contentType?.attributes, componentsByKey);\n\n return {\n components: Object.keys(components).length === 0 ? undefined : components,\n contentType,\n contentTypes: data?.contentTypes ?? [],\n };\n }, [model, data]);\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [toggleNotification, error, formatAPIError]);\n\n return {\n // This must be memoized to avoid inifiinite re-renders where the empty object is different everytime.\n components: React.useMemo(() => components ?? {}, [components]),\n schema: contentType,\n schemas: contentTypes,\n isLoading: isLoading || isFetching,\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * extractContentTypeComponents\n * -----------------------------------------------------------------------------------------------*/\n/**\n * @internal\n * @description Extracts the components used in a content type's attributes recursively.\n */\nconst extractContentTypeComponents = (\n attributes: ContentType['attributes'] = {},\n allComponents: ComponentsDictionary = {}\n): ComponentsDictionary => {\n const getComponents = (attributes: Schema.Attribute.AnyAttribute[]) => {\n return attributes.reduce<string[]>((acc, attribute) => {\n /**\n * If the attribute is a component or dynamiczone, we need to recursively\n * extract the component UIDs from its attributes.\n */\n if (attribute.type === 'component') {\n const componentAttributes = Object.values(\n allComponents[attribute.component]?.attributes ?? {}\n );\n\n acc.push(attribute.component, ...getComponents(componentAttributes));\n } else if (attribute.type === 'dynamiczone') {\n acc.push(\n ...attribute.components,\n /**\n * Dynamic zones have an array of components, so we flatMap over them\n * performing the same search as above.\n */\n ...attribute.components.flatMap((componentUid) => {\n const componentAttributes = Object.values(\n allComponents[componentUid]?.attributes ?? {}\n );\n\n return getComponents(componentAttributes);\n })\n );\n }\n\n return acc;\n }, []);\n };\n\n const componentUids = getComponents(Object.values(attributes));\n\n const uniqueComponentUids = [...new Set(componentUids)];\n\n const componentsByKey = uniqueComponentUids.reduce<ComponentsDictionary>((acc, uid) => {\n acc[uid] = allComponents[uid];\n\n return acc;\n }, {});\n\n return componentsByKey;\n};\n\nexport { useContentTypeSchema, extractContentTypeComponents };\nexport type { ComponentsDictionary };\n","export const HOOKS = {\n /**\n * Hook that allows to mutate the displayed headers of the list view table\n * @constant\n * @type {string}\n */\n INJECT_COLUMN_IN_TABLE: 'Admin/CM/pages/ListView/inject-column-in-table',\n\n /**\n * Hook that allows to mutate the CM's collection types links pre-set filters\n * @constant\n * @type {string}\n */\n MUTATE_COLLECTION_TYPES_LINKS: 'Admin/CM/pages/App/mutate-collection-types-links',\n\n /**\n * Hook that allows to mutate the CM's edit view layout\n * @constant\n * @type {string}\n */\n MUTATE_EDIT_VIEW_LAYOUT: 'Admin/CM/pages/EditView/mutate-edit-view-layout',\n\n /**\n * Hook that allows to mutate the CM's single types links pre-set filters\n * @constant\n * @type {string}\n */\n MUTATE_SINGLE_TYPES_LINKS: 'Admin/CM/pages/App/mutate-single-types-links',\n};\n","import {\n FindContentTypeConfiguration,\n UpdateContentTypeConfiguration,\n FindContentTypesSettings,\n} from '../../../shared/contracts/content-types';\n\nimport { contentManagerApi } from './api';\n\nconst contentTypesApi = contentManagerApi.injectEndpoints({\n endpoints: (builder) => ({\n getContentTypeConfiguration: builder.query<\n FindContentTypeConfiguration.Response['data'],\n string\n >({\n query: (uid) => ({\n url: `/content-manager/content-types/${uid}/configuration`,\n method: 'GET',\n }),\n transformResponse: (response: FindContentTypeConfiguration.Response) => response.data,\n providesTags: (_result, _error, uid) => [\n { type: 'ContentTypesConfiguration', id: uid },\n { type: 'ContentTypeSettings', id: 'LIST' },\n ],\n }),\n getAllContentTypeSettings: builder.query<FindContentTypesSettings.Response['data'], void>({\n query: () => '/content-manager/content-types-settings',\n transformResponse: (response: FindContentTypesSettings.Response) => response.data,\n providesTags: [{ type: 'ContentTypeSettings', id: 'LIST' }],\n }),\n updateContentTypeConfiguration: builder.mutation<\n UpdateContentTypeConfiguration.Response['data'],\n UpdateContentTypeConfiguration.Request['body'] & {\n uid: string;\n }\n >({\n query: ({ uid, ...body }) => ({\n url: `/content-manager/content-types/${uid}/configuration`,\n method: 'PUT',\n data: body,\n }),\n transformResponse: (response: UpdateContentTypeConfiguration.Response) => response.data,\n invalidatesTags: (_result, _error, { uid }) => [\n { type: 'ContentTypesConfiguration', id: uid },\n { type: 'ContentTypeSettings', id: 'LIST' },\n // Is this necessary?\n { type: 'InitialData' },\n ],\n }),\n }),\n});\n\nconst {\n useGetContentTypeConfigurationQuery,\n useGetAllContentTypeSettingsQuery,\n useUpdateContentTypeConfigurationMutation,\n} = contentTypesApi;\n\nexport {\n useGetContentTypeConfigurationQuery,\n useGetAllContentTypeSettingsQuery,\n useUpdateContentTypeConfigurationMutation,\n};\n","import type { ComponentsDictionary, Schema } from '../hooks/useDocument';\nimport type { Schema as SchemaUtils } from '@strapi/types';\n\nconst checkIfAttributeIsDisplayable = (attribute: SchemaUtils.Attribute.AnyAttribute) => {\n const { type } = attribute;\n\n if (type === 'relation') {\n return !attribute.relation.toLowerCase().includes('morph');\n }\n\n return !['json', 'dynamiczone', 'richtext', 'password', 'blocks'].includes(type) && !!type;\n};\n\ninterface MainField {\n name: string;\n type: SchemaUtils.Attribute.Kind | 'custom';\n}\n\n/**\n * @internal\n * @description given an attribute, content-type schemas & component schemas, find the mainField name & type.\n * If the attribute does not need a `mainField` then we return undefined. If we do not find the type\n * of the field, we assume it's a string #sensible-defaults\n */\nconst getMainField = (\n attribute: SchemaUtils.Attribute.AnyAttribute,\n mainFieldName: string | undefined,\n { schemas, components }: { schemas: Schema[]; components: ComponentsDictionary }\n): MainField | undefined => {\n if (!mainFieldName) {\n return undefined;\n }\n\n const mainFieldType =\n attribute.type === 'component'\n ? components[attribute.component].attributes[mainFieldName].type\n : // @ts-expect-error – `targetModel` does exist on the attribute for a relation.\n schemas.find((schema) => schema.uid === attribute.targetModel)?.attributes[mainFieldName]\n .type;\n\n return {\n name: mainFieldName,\n type: mainFieldType ?? 'string',\n };\n};\n\nexport { checkIfAttributeIsDisplayable, getMainField };\nexport type { MainField };\n","import * as React from 'react';\n\nimport { SerializedError } from '@reduxjs/toolkit';\nimport {\n useNotification,\n useStrapiApp,\n useAPIErrorHandler,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\n\nimport { HOOKS } from '../constants/hooks';\nimport { useGetContentTypeConfigurationQuery } from '../services/contentTypes';\nimport { BaseQueryError } from '../utils/api';\nimport { getMainField } from '../utils/attributes';\n\nimport { useContentTypeSchema } from './useContentTypeSchema';\nimport {\n type ComponentsDictionary,\n type Document,\n type Schema,\n useDoc,\n useDocument,\n} from './useDocument';\n\nimport type { ComponentConfiguration } from '../../../shared/contracts/components';\nimport type {\n Metadatas,\n FindContentTypeConfiguration,\n Settings,\n} from '../../../shared/contracts/content-types';\nimport type { Filters, InputProps, Table } from '@strapi/admin/strapi-admin';\nimport type { Schema as SchemaUtils } from '@strapi/types';\n\ntype LayoutOptions = Schema['options'] & Schema['pluginOptions'] & object;\n\ninterface LayoutSettings extends Settings {\n displayName?: string;\n icon?: never;\n}\n\ninterface ListFieldLayout\n extends Table.Header<Document, ListFieldLayout>,\n Pick<Filters.Filter, 'mainField'> {\n attribute: SchemaUtils.Attribute.AnyAttribute | { type: 'custom' };\n}\n\ninterface ListLayout {\n layout: ListFieldLayout[];\n components?: never;\n metadatas: {\n [K in keyof Metadatas]: Metadatas[K]['list'];\n };\n options: LayoutOptions;\n settings: LayoutSettings;\n}\ninterface EditFieldSharedProps\n extends Omit<InputProps, 'hint' | 'label' | 'type'>,\n Pick<Filters.Filter, 'mainField'> {\n hint?: string;\n label: string;\n size: number;\n unique?: boolean;\n visible?: boolean;\n}\n\n/**\n * Map over all the types in Attribute Types and use that to create a union of new types where the attribute type\n * is under the property attribute and the type is under the property type.\n */\ntype EditFieldLayout = {\n [K in SchemaUtils.Attribute.Kind]: EditFieldSharedProps & {\n attribute: Extract<SchemaUtils.Attribute.AnyAttribute, { type: K }>;\n type: K;\n };\n}[SchemaUtils.Attribute.Kind];\n\ninterface EditLayout {\n layout: Array<Array<EditFieldLayout[]>>;\n components: {\n [uid: string]: {\n layout: Array<EditFieldLayout[]>;\n settings: ComponentConfiguration['settings'] & {\n displayName?: string;\n icon?: string;\n };\n };\n };\n metadatas: {\n [K in keyof Metadatas]: Metadatas[K]['edit'];\n };\n options: LayoutOptions;\n settings: LayoutSettings;\n}\n\ntype UseDocumentLayout = (model: string) => {\n error?: BaseQueryError | SerializedError;\n isLoading: boolean;\n /**\n * This is the layout for the edit view,\n */\n edit: EditLayout;\n list: ListLayout;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * useDocumentLayout\n * -----------------------------------------------------------------------------------------------*/\n\nconst DEFAULT_SETTINGS = {\n bulkable: false,\n filterable: false,\n searchable: false,\n pagination: false,\n defaultSortBy: '',\n defaultSortOrder: 'asc',\n mainField: 'id',\n pageSize: 10,\n};\n\n/**\n * @alpha\n * @description This hook is used to get the layouts for either the edit view or list view of a specific content-type\n * including the layouts for the components used in the content-type. It also runs the mutation hook waterfall so the data\n * is consistent wherever it is used. It's a light wrapper around the `useDocument` hook, but provides the `skip` option a document\n * is not fetched, however, it does fetch the schemas & components if they do not already exist in the cache.\n *\n * If the fetch fails, it will display a notification to the user.\n *\n * @example\n * ```tsx\n * const { model } = useParams<{ model: string }>();\n * const { edit: { schema: layout } } = useDocumentLayout(model);\n *\n * return layout.map(panel => panel.map(row => row.map(field => <Field.Root {...field} />)))\n * ```\n *\n */\nconst useDocumentLayout: UseDocumentLayout = (model) => {\n const { schema, components } = useDocument({ model, collectionType: '' }, { skip: true });\n const [{ query }] = useQueryParams();\n const runHookWaterfall = useStrapiApp('useDocumentLayout', (state) => state.runHookWaterfall);\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n const { isLoading: isLoadingSchemas, schemas } = useContentTypeSchema();\n\n const {\n data,\n isLoading: isLoadingConfigs,\n error,\n isFetching: isFetchingConfigs,\n } = useGetContentTypeConfigurationQuery(model);\n\n const isLoading = isLoadingSchemas || isFetchingConfigs || isLoadingConfigs;\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const editLayout = React.useMemo(\n () =>\n data && !isLoading\n ? formatEditLayout(data, { schemas, schema, components })\n : ({\n layout: [],\n components: {},\n metadatas: {},\n options: {},\n settings: DEFAULT_SETTINGS,\n } as EditLayout),\n [data, isLoading, schemas, schema, components]\n );\n\n const listLayout = React.useMemo(() => {\n return data && !isLoading\n ? formatListLayout(data, { schemas, schema, components })\n : ({\n layout: [],\n metadatas: {},\n options: {},\n settings: DEFAULT_SETTINGS,\n } as ListLayout);\n }, [data, isLoading, schemas, schema, components]);\n\n const { layout: edit } = React.useMemo(\n () =>\n runHookWaterfall(HOOKS.MUTATE_EDIT_VIEW_LAYOUT, {\n layout: editLayout,\n query,\n }),\n [editLayout, query, runHookWaterfall]\n );\n\n return {\n error,\n isLoading,\n edit,\n list: listLayout,\n } satisfies ReturnType<UseDocumentLayout>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * useDocLayout\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal this hook uses the internal useDoc hook, as such it shouldn't be used outside of the\n * content-manager because it won't work as intended.\n */\nconst useDocLayout = () => {\n const { model } = useDoc();\n return useDocumentLayout(model);\n};\n\n/* -------------------------------------------------------------------------------------------------\n * formatEditLayout\n * -----------------------------------------------------------------------------------------------*/\ntype LayoutData = FindContentTypeConfiguration.Response['data'];\n\n/**\n * @internal\n * @description takes the configuration data, the schema & the components used in the schema and formats the edit view\n * versions of the schema & components. This is then used to render the edit view of the content-type.\n */\nconst formatEditLayout = (\n data: LayoutData,\n {\n schemas,\n schema,\n components,\n }: { schemas: Schema[]; schema?: Schema; components: ComponentsDictionary }\n): EditLayout => {\n let currentPanelIndex = 0;\n /**\n * The fields arranged by the panels, new panels are made for dynamic zones only.\n */\n const panelledEditAttributes = convertEditLayoutToFieldLayouts(\n data.contentType.layouts.edit,\n schema?.attributes,\n data.contentType.metadatas,\n { configurations: data.components, schemas: components },\n schemas\n ).reduce<Array<EditFieldLayout[][]>>((panels, row) => {\n if (row.some((field) => field.type === 'dynamiczone')) {\n panels.push([row]);\n currentPanelIndex += 2;\n } else {\n if (!panels[currentPanelIndex]) {\n panels.push([row]);\n } else {\n panels[currentPanelIndex].push(row);\n }\n }\n\n return panels;\n }, []);\n\n const componentEditAttributes = Object.entries(data.components).reduce<EditLayout['components']>(\n (acc, [uid, configuration]) => {\n acc[uid] = {\n layout: convertEditLayoutToFieldLayouts(\n configuration.layouts.edit,\n components[uid].attributes,\n configuration.metadatas,\n { configurations: data.components, schemas: components }\n ),\n settings: {\n ...configuration.settings,\n icon: components[uid].info.icon,\n displayName: components[uid].info.displayName,\n },\n };\n return acc;\n },\n {}\n );\n\n const editMetadatas = Object.entries(data.contentType.metadatas).reduce<EditLayout['metadatas']>(\n (acc, [attribute, metadata]) => {\n return {\n ...acc,\n [attribute]: metadata.edit,\n };\n },\n {}\n );\n\n return {\n layout: panelledEditAttributes,\n components: componentEditAttributes,\n metadatas: editMetadatas,\n settings: {\n ...data.contentType.settings,\n displayName: schema?.info.displayName,\n },\n options: {\n ...schema?.options,\n ...schema?.pluginOptions,\n ...data.contentType.options,\n },\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * convertEditLayoutToFieldLayouts\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description takes the edit layout from either a content-type or a component\n * and formats it into a generic object that can be used to correctly render\n * the form fields.\n */\nconst convertEditLayoutToFieldLayouts = (\n rows: LayoutData['contentType']['layouts']['edit'],\n attributes: Schema['attributes'] = {},\n metadatas: Metadatas,\n components?: {\n configurations: Record<string, ComponentConfiguration>;\n schemas: ComponentsDictionary;\n },\n schemas: Schema[] = []\n) => {\n return rows.map((row) =>\n row\n .map((field) => {\n const attribute = attributes[field.name];\n\n if (!attribute) {\n return null;\n }\n\n const { edit: metadata } = metadatas[field.name];\n\n const settings: Partial<Settings> =\n attribute.type === 'component' && components\n ? components.configurations[attribute.component].settings\n : {};\n\n return {\n attribute,\n disabled: !metadata.editable,\n hint: metadata.description,\n label: metadata.label ?? '',\n name: field.name,\n // @ts-expect-error – mainField does exist on the metadata for a relation.\n mainField: getMainField(attribute, metadata.mainField || settings.mainField, {\n schemas,\n components: components?.schemas ?? {},\n }),\n placeholder: metadata.placeholder ?? '',\n required: attribute.required ?? false,\n size: field.size,\n unique: 'unique' in attribute ? attribute.unique : false,\n visible: metadata.visible ?? true,\n type: attribute.type,\n };\n })\n .filter((field) => field !== null)\n ) as EditFieldLayout[][];\n};\n\n/* -------------------------------------------------------------------------------------------------\n * formatListLayout\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description takes the complete configuration data, the schema & the components used in the schema and\n * formats a list view layout for the content-type. This is much simpler than the edit view layout as there\n * are less options to consider.\n */\nconst formatListLayout = (\n data: LayoutData,\n {\n schemas,\n schema,\n components,\n }: { schemas: Schema[]; schema?: Schema; components: ComponentsDictionary }\n): ListLayout => {\n const listMetadatas = Object.entries(data.contentType.metadatas).reduce<ListLayout['metadatas']>(\n (acc, [attribute, metadata]) => {\n return {\n ...acc,\n [attribute]: metadata.list,\n };\n },\n {}\n );\n /**\n * The fields arranged by the panels, new panels are made for dynamic zones only.\n */\n const listAttributes = convertListLayoutToFieldLayouts(\n data.contentType.layouts.list,\n schema?.attributes,\n listMetadatas,\n { configurations: data.components, schemas: components },\n schemas\n );\n\n return {\n layout: listAttributes,\n settings: { ...data.contentType.settings, displayName: schema?.info.displayName },\n metadatas: listMetadatas,\n options: {\n ...schema?.options,\n ...schema?.pluginOptions,\n ...data.contentType.options,\n },\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * convertListLayoutToFieldLayouts\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description takes the columns from the list view configuration and formats them into a generic object\n * combinining metadata and attribute data.\n *\n * @note We do use this to reformat the list of strings when updating the displayed headers for the list view.\n */\nconst convertListLayoutToFieldLayouts = (\n columns: LayoutData['contentType']['layouts']['list'],\n attributes: Schema['attributes'] = {},\n metadatas: ListLayout['metadatas'],\n components?: {\n configurations: Record<string, ComponentConfiguration>;\n schemas: ComponentsDictionary;\n },\n schemas: Schema[] = []\n) => {\n return columns\n .map((name) => {\n const attribute = attributes[name];\n\n if (!attribute) {\n return null;\n }\n\n const metadata = metadatas[name];\n\n const settings: Partial<Settings> =\n attribute.type === 'component' && components\n ? components.configurations[attribute.component].settings\n : {};\n\n return {\n attribute,\n label: metadata.label ?? '',\n mainField: getMainField(attribute, metadata.mainField || settings.mainField, {\n schemas,\n components: components?.schemas ?? {},\n }),\n name: name,\n searchable: metadata.searchable ?? true,\n sortable: metadata.sortable ?? true,\n } satisfies ListFieldLayout;\n })\n .filter((field) => field !== null) as ListFieldLayout[];\n};\n\nexport {\n useDocLayout,\n useDocumentLayout,\n convertListLayoutToFieldLayouts,\n convertEditLayoutToFieldLayouts,\n DEFAULT_SETTINGS,\n};\nexport type { EditLayout, EditFieldLayout, ListLayout, ListFieldLayout, UseDocumentLayout };\n","/**\n * This hook doesn't use a context provider because we fetch directly from the server,\n * this sounds expensive but actually, it's really not. Because we have redux-toolkit-query\n * being a cache layer so if nothing invalidates the cache, we don't fetch again.\n */\n\nimport * as React from 'react';\n\nimport {\n useNotification,\n useAPIErrorHandler,\n useQueryParams,\n FormErrors,\n getYupValidationErrors,\n useForm,\n} from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\nimport { useParams } from 'react-router-dom';\nimport { ValidationError } from 'yup';\n\nimport { SINGLE_TYPES } from '../constants/collections';\nimport { type AnyData, transformDocument } from '../pages/EditView/utils/data';\nimport { createDefaultForm } from '../pages/EditView/utils/forms';\nimport { useGetDocumentQuery } from '../services/documents';\nimport { buildValidParams } from '../utils/api';\nimport { createYupSchema } from '../utils/validation';\n\nimport { useContentTypeSchema, ComponentsDictionary } from './useContentTypeSchema';\nimport { useDocumentLayout } from './useDocumentLayout';\n\nimport type { FindOne } from '../../../shared/contracts/collection-types';\nimport type { ContentType } from '../../../shared/contracts/content-types';\nimport type { Modules } from '@strapi/types';\n\ninterface UseDocumentArgs {\n collectionType: string;\n model: string;\n documentId?: string;\n params?: object;\n}\n\ntype UseDocumentOpts = Parameters<typeof useGetDocumentQuery>[1];\n\ntype Document = FindOne.Response['data'];\n\ntype Schema = ContentType;\n\ntype UseDocument = (\n args: UseDocumentArgs,\n opts?: UseDocumentOpts\n) => {\n /**\n * These are the schemas of the components used in the content type, organised\n * by their uid.\n */\n components: ComponentsDictionary;\n document?: Document;\n meta?: FindOne.Response['meta'];\n isLoading: boolean;\n /**\n * This is the schema of the content type, it is not the same as the layout.\n */\n schema?: Schema;\n schemas?: Schema[];\n hasError?: boolean;\n validate: (document: Document) => null | FormErrors;\n /**\n * Get the document's title\n */\n getTitle: (mainField: string) => string;\n /**\n * Get the initial form values for the document\n */\n getInitialFormValues: (isCreatingDocument?: boolean) => AnyData | undefined;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * useDocument\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @alpha\n * @public\n * @description Returns a document based on the model, collection type & id passed as arguments.\n * Also extracts its schema from the redux cache to be used for creating a validation schema.\n * @example\n * ```tsx\n * const { id, model, collectionType } = useParams<{ id: string; model: string; collectionType: string }>();\n *\n * if(!model || !collectionType) return null;\n *\n * const { document, isLoading, validate } = useDocument({ documentId: id, model, collectionType, params: { locale: 'en-GB' } })\n * const { update } = useDocumentActions()\n *\n * const onSubmit = async (document: Document) => {\n * const errors = validate(document);\n *\n * if(errors) {\n * // handle errors\n * }\n *\n * await update({ collectionType, model, id }, document)\n * }\n * ```\n *\n * @see {@link https://contributor.strapi.io/docs/core/content-manager/hooks/use-document} for more information\n */\nconst useDocument: UseDocument = (args, opts) => {\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n const { formatMessage } = useIntl();\n\n const {\n currentData: data,\n isLoading: isLoadingDocument,\n isFetching: isFetchingDocument,\n error,\n } = useGetDocumentQuery(args, {\n ...opts,\n skip: (!args.documentId && args.collectionType !== SINGLE_TYPES) || opts?.skip,\n });\n const document = data?.data;\n const meta = data?.meta;\n\n const {\n components,\n schema,\n schemas,\n isLoading: isLoadingSchema,\n } = useContentTypeSchema(args.model);\n const isSingleType = schema?.kind === 'singleType';\n\n const getTitle = (mainField: string) => {\n // Always use mainField if it's not an id\n if (mainField !== 'id' && document?.[mainField]) {\n return document[mainField];\n }\n\n // When it's a singleType without a mainField, use the contentType displayName\n if (isSingleType && schema?.info.displayName) {\n return schema.info.displayName;\n }\n\n // Otherwise, use a fallback\n return formatMessage({\n id: 'content-manager.containers.untitled',\n defaultMessage: 'Untitled',\n });\n };\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [toggleNotification, error, formatAPIError, args.collectionType]);\n\n const validationSchema = React.useMemo(() => {\n if (!schema) {\n return null;\n }\n\n return createYupSchema(schema.attributes, components);\n }, [schema, components]);\n\n const validate = React.useCallback(\n (document: Modules.Documents.AnyDocument): FormErrors | null => {\n if (!validationSchema) {\n throw new Error(\n 'There is no validation schema generated, this is likely due to the schema not being loaded yet.'\n );\n }\n\n try {\n validationSchema.validateSync(document, { abortEarly: false, strict: true });\n return null;\n } catch (error) {\n if (error instanceof ValidationError) {\n return getYupValidationErrors(error);\n }\n\n throw error;\n }\n },\n [validationSchema]\n );\n\n /**\n * Here we prepare the form for editing, we need to:\n * - remove prohibited fields from the document (passwords | ADD YOURS WHEN THERES A NEW ONE)\n * - swap out count objects on relations for empty arrays\n * - set __temp_key__ on array objects for drag & drop\n *\n * We also prepare the form for new documents, so we need to:\n * - set default values on fields\n */\n const getInitialFormValues = React.useCallback(\n (isCreatingDocument: boolean = false) => {\n if ((!document && !isCreatingDocument && !isSingleType) || !schema) {\n return undefined;\n }\n\n /**\n * Check that we have an ID so we know the\n * document has been created in some way.\n */\n const form = document?.id ? document : createDefaultForm(schema, components);\n\n return transformDocument(schema, components)(form);\n },\n [document, isSingleType, schema, components]\n );\n\n const isLoading = isLoadingDocument || isFetchingDocument || isLoadingSchema;\n const hasError = !!error;\n\n return {\n components,\n document,\n meta,\n isLoading,\n hasError,\n schema,\n schemas,\n validate,\n getTitle,\n getInitialFormValues,\n } satisfies ReturnType<UseDocument>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * useDoc\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal this hook uses the router to extract the model, collection type & id from the url.\n * therefore, it shouldn't be used outside of the content-manager because it won't work as intended.\n */\nconst useDoc = () => {\n const { id, slug, collectionType, origin } = useParams<{\n id: string;\n origin: string;\n slug: string;\n collectionType: string;\n }>();\n const [{ query }] = useQueryParams();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n\n if (!collectionType) {\n throw new Error('Could not find collectionType in url params');\n }\n\n if (!slug) {\n throw new Error('Could not find model in url params');\n }\n\n const document = useDocument(\n { documentId: origin || id, model: slug, collectionType, params },\n {\n skip: id === 'create' || (!origin && !id && collectionType !== SINGLE_TYPES),\n }\n );\n\n const returnId = origin || id === 'create' ? undefined : id;\n\n return {\n collectionType,\n model: slug,\n id: returnId,\n ...document,\n };\n};\n\n/**\n * @public\n * @experimental\n * Content manager context hooks for plugin development.\n * Make sure to use this hook inside the content manager.\n */\nconst useContentManagerContext = () => {\n const {\n collectionType,\n model,\n id,\n components,\n isLoading: isLoadingDoc,\n schema,\n schemas,\n } = useDoc();\n\n const layout = useDocumentLayout(model);\n\n const form = useForm<unknown>('useContentManagerContext', (state) => state);\n\n const isSingleType = collectionType === SINGLE_TYPES;\n const slug = model;\n const isCreatingEntry = id === 'create';\n\n const {} = useContentTypeSchema();\n\n const isLoading = isLoadingDoc || layout.isLoading;\n const error = layout.error;\n\n return {\n error,\n isLoading,\n\n // Base metadata\n model,\n collectionType,\n id,\n slug,\n isCreatingEntry,\n isSingleType,\n hasDraftAndPublish: schema?.options?.draftAndPublish ?? false,\n\n // All schema infos\n components,\n contentType: schema,\n contentTypes: schemas,\n\n // Form state\n form,\n\n // layout infos\n layout,\n };\n};\n\nexport { useDocument, useDoc, useContentManagerContext };\nexport type { UseDocument, UseDocumentArgs, Document, Schema, ComponentsDictionary };\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nconst getTranslation = (id: string) => `content-manager.${id}`;\n\nexport { getTranslation, prefixPluginTranslations };\n","import * as React from 'react';\n\nimport { SerializedError } from '@reduxjs/toolkit';\nimport {\n useNotification,\n useTracking,\n type TrackingEvent,\n useAPIErrorHandler,\n useGuidedTour,\n} from '@strapi/admin/strapi-admin';\nimport { useIntl, type MessageDescriptor } from 'react-intl';\nimport { useNavigate } from 'react-router-dom';\n\nimport {\n useAutoCloneDocumentMutation,\n useCloneDocumentMutation,\n useCreateDocumentMutation,\n useDeleteDocumentMutation,\n useDeleteManyDocumentsMutation,\n useDiscardDocumentMutation,\n useLazyGetDocumentQuery,\n usePublishDocumentMutation,\n usePublishManyDocumentsMutation,\n useUnpublishDocumentMutation,\n useUnpublishManyDocumentsMutation,\n useUpdateDocumentMutation,\n} from '../services/documents';\nimport { BaseQueryError } from '../utils/api';\nimport { getTranslation } from '../utils/translations';\n\nimport type { Document } from './useDocument';\nimport type {\n AutoClone,\n Clone,\n Create,\n Delete,\n BulkDelete,\n Discard,\n FindOne,\n Publish,\n BulkPublish,\n Update,\n Unpublish,\n BulkUnpublish,\n} from '../../../shared/contracts/collection-types';\n\nconst DEFAULT_UNEXPECTED_ERROR_MSG = {\n id: 'notification.error',\n defaultMessage: 'An error occurred, please try again',\n} satisfies MessageDescriptor;\n\ntype OperationResponse<TResponse extends { data: any; meta?: any; error?: any }> =\n | Pick<TResponse, 'data'>\n | Pick<TResponse, 'data' | 'meta'>\n | { error: BaseQueryError | SerializedError };\n\ntype BulkOperationResponse<TResponse extends { data: any; error?: any }> =\n | Pick<TResponse, 'data'>\n | { error: BaseQueryError | SerializedError };\n\ntype UseDocumentActions = () => {\n /**\n * @description Attempts to clone a document based on the provided sourceId.\n * This will return a list of the fields as an error if it's unable to clone.\n * You most likely want to use the `clone` action instead.\n */\n autoClone: (args: {\n model: string;\n sourceId: string;\n }) => Promise<OperationResponse<AutoClone.Response>>;\n clone: (\n args: {\n model: string;\n documentId: string;\n params?: object;\n },\n document: Omit<Document, 'id'>,\n trackerProperty?: Extract<\n TrackingEvent,\n { name: 'willCreateEntry' | 'didCreateEntry' | 'didNotCreateEntry' }\n >['properties']\n ) => Promise<OperationResponse<Clone.Response>>;\n create: (\n args: {\n model: string;\n params?: object;\n },\n document: Omit<Document, 'id'>,\n trackerProperty?: Extract<\n TrackingEvent,\n { name: 'willCreateEntry' | 'didCreateEntry' | 'didNotCreateEntry' }\n >['properties']\n ) => Promise<OperationResponse<Create.Response>>;\n delete: (\n args: {\n collectionType: string;\n model: string;\n documentId?: string;\n params?: object;\n },\n trackerProperty?: Extract<\n TrackingEvent,\n { name: 'willDeleteEntry' | 'didDeleteEntry' | 'didNotDeleteEntry' }\n >['properties']\n ) => Promise<OperationResponse<Delete.Response>>;\n deleteMany: (args: {\n model: string;\n documentIds: string[];\n params?: object;\n }) => Promise<BulkOperationResponse<BulkDelete.Response>>;\n discard: (args: {\n collectionType: string;\n model: string;\n documentId?: string;\n params?: object;\n }) => Promise<OperationResponse<Discard.Response>>;\n getDocument: (args: {\n collectionType: string;\n model: string;\n documentId?: string;\n params?: object;\n }) => Promise<FindOne.Response | undefined>;\n publish: (\n args: {\n collectionType: string;\n model: string;\n documentId?: string;\n params?: object;\n },\n document: Partial<Document>\n ) => Promise<OperationResponse<Publish.Response>>;\n publishMany: (args: {\n model: string;\n documentIds: string[];\n params?: object;\n }) => Promise<BulkOperationResponse<BulkPublish.Response>>;\n update: (\n args: {\n collectionType: string;\n model: string;\n documentId?: string;\n params?: object;\n },\n document: Partial<Document>,\n trackerProperty?: Extract<\n TrackingEvent,\n { name: 'willEditEntry' | 'didEditEntry' | 'didNotEditEntry' }\n >['properties']\n ) => Promise<OperationResponse<Update.Response>>;\n unpublish: (\n args: {\n collectionType: string;\n model: string;\n documentId?: string;\n params?: object;\n },\n discardDraft?: boolean\n ) => Promise<OperationResponse<Unpublish.Response>>;\n unpublishMany: (args: {\n model: string;\n documentIds: string[];\n params?: object;\n }) => Promise<BulkOperationResponse<BulkUnpublish.Response>>;\n};\n\ntype IUseDocumentActs = ReturnType<UseDocumentActions>;\n\n/**\n * @alpha\n * @public\n * @description Contains all the operations that can be performed on a single document.\n * Designed to be able to be used anywhere within a Strapi app. The hooks will handle\n * notifications should the operation fail, however the response is always returned incase\n * the user needs to handle side-effects.\n * @example\n * ```tsx\n * import { Form } from '@strapi/admin/admin';\n *\n * const { id, model, collectionType } = useParams<{ id: string; model: string; collectionType: string }>();\n * const { update } = useDocumentActions();\n *\n * const handleSubmit = async (data) => {\n * await update({ collectionType, model, documentId: id }, data);\n * }\n *\n * return <Form method=\"PUT\" onSubmit={handleSubmit} />\n * ```\n *\n * @see {@link https://contributor.strapi.io/docs/core/content-manager/hooks/use-document-operations} for more information\n */\nconst useDocumentActions: UseDocumentActions = () => {\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { trackUsage } = useTracking();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n const navigate = useNavigate();\n const setCurrentStep = useGuidedTour('useDocumentActions', (state) => state.setCurrentStep);\n\n const [deleteDocument] = useDeleteDocumentMutation();\n const _delete: IUseDocumentActs['delete'] = React.useCallback(\n async ({ collectionType, model, documentId, params }, trackerProperty) => {\n try {\n trackUsage('willDeleteEntry', trackerProperty);\n\n const res = await deleteDocument({\n collectionType,\n model,\n documentId,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return { error: res.error };\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.delete'),\n defaultMessage: 'Deleted document',\n }),\n });\n\n trackUsage('didDeleteEntry', trackerProperty);\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n trackUsage('didNotDeleteEntry', { error: err, ...trackerProperty });\n\n throw err;\n }\n },\n [trackUsage, deleteDocument, toggleNotification, formatMessage, formatAPIError]\n );\n\n const [deleteManyDocuments] = useDeleteManyDocumentsMutation();\n\n const deleteMany: IUseDocumentActs['deleteMany'] = React.useCallback(\n async ({ model, documentIds, params }) => {\n try {\n trackUsage('willBulkDeleteEntries');\n\n const res = await deleteManyDocuments({\n model,\n documentIds,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return { error: res.error };\n }\n\n toggleNotification({\n type: 'success',\n title: formatMessage({\n id: getTranslation('success.records.delete'),\n defaultMessage: 'Successfully deleted.',\n }),\n message: '',\n });\n\n trackUsage('didBulkDeleteEntries');\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n trackUsage('didNotBulkDeleteEntries');\n\n throw err;\n }\n },\n [trackUsage, deleteManyDocuments, toggleNotification, formatMessage, formatAPIError]\n );\n\n const [discardDocument] = useDiscardDocumentMutation();\n const discard: IUseDocumentActs['discard'] = React.useCallback(\n async ({ collectionType, model, documentId, params }) => {\n try {\n const res = await discardDocument({\n collectionType,\n model,\n documentId,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return { error: res.error };\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: 'content-manager.success.record.discard',\n defaultMessage: 'Changes discarded',\n }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [discardDocument, formatAPIError, formatMessage, toggleNotification]\n );\n\n const [publishDocument] = usePublishDocumentMutation();\n const publish: IUseDocumentActs['publish'] = React.useCallback(\n async ({ collectionType, model, documentId, params }, data) => {\n try {\n trackUsage('willPublishEntry');\n\n const res = await publishDocument({\n collectionType,\n model,\n documentId,\n data,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n return { error: res.error };\n }\n\n trackUsage('didPublishEntry');\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.publish'),\n defaultMessage: 'Published document',\n }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [trackUsage, publishDocument, toggleNotification, formatMessage, formatAPIError]\n );\n\n const [publishManyDocuments] = usePublishManyDocumentsMutation();\n const publishMany: IUseDocumentActs['publishMany'] = React.useCallback(\n async ({ model, documentIds, params }) => {\n try {\n // TODO Confirm tracking events for bulk publish?\n\n const res = await publishManyDocuments({\n model,\n documentIds,\n params,\n });\n if ('error' in res) {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n return { error: res.error };\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.publish'),\n defaultMessage: 'Published document',\n }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n throw err;\n }\n },\n [\n // trackUsage,\n publishManyDocuments,\n toggleNotification,\n formatMessage,\n formatAPIError,\n ]\n );\n\n const [updateDocument] = useUpdateDocumentMutation();\n const update: IUseDocumentActs['update'] = React.useCallback(\n async ({ collectionType, model, documentId, params }, data, trackerProperty) => {\n try {\n trackUsage('willEditEntry', trackerProperty);\n\n const res = await updateDocument({\n collectionType,\n model,\n documentId,\n data,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n\n trackUsage('didNotEditEntry', { error: res.error, ...trackerProperty });\n\n return { error: res.error };\n }\n\n trackUsage('didEditEntry', trackerProperty);\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.save'),\n defaultMessage: 'Saved document',\n }),\n });\n\n return res.data;\n } catch (err) {\n trackUsage('didNotEditEntry', { error: err, ...trackerProperty });\n\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [trackUsage, updateDocument, toggleNotification, formatMessage, formatAPIError]\n );\n\n const [unpublishDocument] = useUnpublishDocumentMutation();\n const unpublish: IUseDocumentActs['unpublish'] = React.useCallback(\n async ({ collectionType, model, documentId, params }, discardDraft = false) => {\n try {\n trackUsage('willUnpublishEntry');\n\n const res = await unpublishDocument({\n collectionType,\n model,\n documentId,\n params,\n data: {\n discardDraft,\n },\n });\n\n if ('error' in res) {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n\n return { error: res.error };\n }\n\n trackUsage('didUnpublishEntry');\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.unpublish'),\n defaultMessage: 'Unpublished document',\n }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [trackUsage, unpublishDocument, toggleNotification, formatMessage, formatAPIError]\n );\n\n const [unpublishManyDocuments] = useUnpublishManyDocumentsMutation();\n const unpublishMany: IUseDocumentActs['unpublishMany'] = React.useCallback(\n async ({ model, documentIds, params }) => {\n try {\n trackUsage('willBulkUnpublishEntries');\n\n const res = await unpublishManyDocuments({\n model,\n documentIds,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n\n return { error: res.error };\n }\n\n trackUsage('didBulkUnpublishEntries');\n\n toggleNotification({\n type: 'success',\n title: formatMessage({\n id: getTranslation('success.records.unpublish'),\n defaultMessage: 'Successfully unpublished.',\n }),\n message: '',\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n trackUsage('didNotBulkUnpublishEntries');\n\n throw err;\n }\n },\n [trackUsage, unpublishManyDocuments, toggleNotification, formatMessage, formatAPIError]\n );\n\n const [createDocument] = useCreateDocumentMutation();\n const create: IUseDocumentActs['create'] = React.useCallback(\n async ({ model, params }, data, trackerProperty) => {\n try {\n const res = await createDocument({\n model,\n data,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n\n trackUsage('didNotCreateEntry', { error: res.error, ...trackerProperty });\n\n return { error: res.error };\n }\n\n trackUsage('didCreateEntry', trackerProperty);\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.save'),\n defaultMessage: 'Saved document',\n }),\n });\n\n setCurrentStep('contentManager.success');\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n trackUsage('didNotCreateEntry', { error: err, ...trackerProperty });\n\n throw err;\n }\n },\n [createDocument, formatAPIError, formatMessage, toggleNotification, trackUsage]\n );\n\n const [autoCloneDocument] = useAutoCloneDocumentMutation();\n const autoClone: IUseDocumentActs['autoClone'] = React.useCallback(\n async ({ model, sourceId }) => {\n try {\n const res = await autoCloneDocument({\n model,\n sourceId,\n });\n\n if ('error' in res) {\n return { error: res.error };\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.clone'),\n defaultMessage: 'Cloned document',\n }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [autoCloneDocument, formatMessage, toggleNotification]\n );\n\n const [cloneDocument] = useCloneDocumentMutation();\n const clone: IUseDocumentActs['clone'] = React.useCallback(\n async ({ model, documentId, params }, body, trackerProperty) => {\n try {\n const { id: _id, ...restBody } = body;\n\n /**\n * If we're cloning we want to post directly to this endpoint\n * so that the relations even if they're not listed in the EditView\n * are correctly attached to the entry.\n */\n const res = await cloneDocument({\n model,\n sourceId: documentId,\n data: restBody,\n params,\n });\n\n if ('error' in res) {\n toggleNotification({ type: 'danger', message: formatAPIError(res.error) });\n\n trackUsage('didNotCreateEntry', { error: res.error, ...trackerProperty });\n\n return { error: res.error };\n }\n\n trackUsage('didCreateEntry', trackerProperty);\n toggleNotification({\n type: 'success',\n message: formatMessage({\n id: getTranslation('success.record.clone'),\n defaultMessage: 'Cloned document',\n }),\n });\n\n // Redirect to normal edit view\n navigate(`../../${res.data.data.documentId}`, { relative: 'path' });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n trackUsage('didNotCreateEntry', { error: err, ...trackerProperty });\n\n throw err;\n }\n },\n [cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError, navigate]\n );\n\n const [getDoc] = useLazyGetDocumentQuery();\n const getDocument: IUseDocumentActs['getDocument'] = React.useCallback(\n async (args) => {\n const { data } = await getDoc(args);\n\n return data;\n },\n [getDoc]\n );\n\n return {\n autoClone,\n clone,\n create,\n delete: _delete,\n deleteMany,\n discard,\n getDocument,\n publish,\n publishMany,\n unpublish,\n unpublishMany,\n update,\n } satisfies IUseDocumentActs;\n};\n\nexport { useDocumentActions };\nexport type { UseDocumentActions, OperationResponse };\n","/* eslint-disable check-file/filename-naming-convention */\nimport * as React from 'react';\n\nimport { type PathRouteProps } from 'react-router-dom';\n\nconst ProtectedHistoryPage = React.lazy(() =>\n import('./pages/History').then((mod) => ({ default: mod.ProtectedHistoryPage }))\n);\n\n/**\n * These routes will be merged with the rest of the Content Manager routes\n */\nconst routes: PathRouteProps[] = [\n {\n path: ':collectionType/:slug/:id/history',\n Component: ProtectedHistoryPage,\n },\n {\n path: ':collectionType/:slug/history',\n Component: ProtectedHistoryPage,\n },\n];\n\nexport { routes };\n","/* eslint-disable check-file/filename-naming-convention */\nimport * as React from 'react';\n\nimport type { PathRouteProps } from 'react-router-dom';\n\nconst ProtectedPreviewPage = React.lazy(() =>\n import('./pages/Preview').then((mod) => ({ default: mod.ProtectedPreviewPage }))\n);\n\nconst routes: PathRouteProps[] = [\n {\n path: ':collectionType/:slug/:id/preview',\n Component: ProtectedPreviewPage,\n },\n {\n path: ':collectionType/:slug/preview',\n Component: ProtectedPreviewPage,\n },\n];\n\nexport { routes };\n","/* eslint-disable check-file/filename-naming-convention */\nimport { lazy } from 'react';\n\nimport { Navigate, PathRouteProps, useParams } from 'react-router-dom';\n\nimport { COLLECTION_TYPES, SINGLE_TYPES } from './constants/collections';\nimport { routes as historyRoutes } from './history/routes';\nimport { routes as previewRoutes } from './preview/routes';\n\nconst ProtectedEditViewPage = lazy(() =>\n import('./pages/EditView/EditViewPage').then((mod) => ({ default: mod.ProtectedEditViewPage }))\n);\nconst ProtectedListViewPage = lazy(() =>\n import('./pages/ListView/ListViewPage').then((mod) => ({ default: mod.ProtectedListViewPage }))\n);\nconst ProtectedListConfiguration = lazy(() =>\n import('./pages/ListConfiguration/ListConfigurationPage').then((mod) => ({\n default: mod.ProtectedListConfiguration,\n }))\n);\nconst ProtectedEditConfigurationPage = lazy(() =>\n import('./pages/EditConfigurationPage').then((mod) => ({\n default: mod.ProtectedEditConfigurationPage,\n }))\n);\nconst ProtectedComponentConfigurationPage = lazy(() =>\n import('./pages/ComponentConfigurationPage').then((mod) => ({\n default: mod.ProtectedComponentConfigurationPage,\n }))\n);\nconst NoPermissions = lazy(() =>\n import('./pages/NoPermissionsPage').then((mod) => ({ default: mod.NoPermissions }))\n);\nconst NoContentType = lazy(() =>\n import('./pages/NoContentTypePage').then((mod) => ({ default: mod.NoContentType }))\n);\n\nconst CollectionTypePages = () => {\n const { collectionType } = useParams<{ collectionType: string }>();\n\n /**\n * We only support two types of collections.\n */\n if (collectionType !== COLLECTION_TYPES && collectionType !== SINGLE_TYPES) {\n return <Navigate to=\"/404\" />;\n }\n\n return collectionType === COLLECTION_TYPES ? (\n <ProtectedListViewPage />\n ) : (\n <ProtectedEditViewPage />\n );\n};\n\nconst CLONE_RELATIVE_PATH = ':collectionType/:slug/clone/:origin';\nconst CLONE_PATH = `/content-manager/${CLONE_RELATIVE_PATH}`;\nconst LIST_RELATIVE_PATH = ':collectionType/:slug';\nconst LIST_PATH = `/content-manager/collection-types/:slug`;\n\nconst routes: PathRouteProps[] = [\n {\n path: LIST_RELATIVE_PATH,\n element: <CollectionTypePages />,\n },\n {\n path: ':collectionType/:slug/:id',\n Component: ProtectedEditViewPage,\n },\n {\n path: CLONE_RELATIVE_PATH,\n Component: ProtectedEditViewPage,\n },\n {\n path: ':collectionType/:slug/configurations/list',\n Component: ProtectedListConfiguration,\n },\n {\n path: 'components/:slug/configurations/edit',\n Component: ProtectedComponentConfigurationPage,\n },\n {\n path: ':collectionType/:slug/configurations/edit',\n Component: ProtectedEditConfigurationPage,\n },\n {\n path: '403',\n Component: NoPermissions,\n },\n {\n path: 'no-content-types',\n Component: NoContentType,\n },\n ...historyRoutes,\n ...previewRoutes,\n];\n\nexport { routes, CLONE_PATH, LIST_PATH };\n","import * as React from 'react';\n\nimport {\n useForm,\n useNotification,\n NotificationConfig,\n useAPIErrorHandler,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport {\n Button,\n Dialog,\n Flex,\n Modal,\n Radio,\n Typography,\n VisuallyHidden,\n Menu,\n ButtonProps,\n} from '@strapi/design-system';\nimport { Cross, More, WarningCircle } from '@strapi/icons';\nimport mapValues from 'lodash/fp/mapValues';\nimport { useIntl } from 'react-intl';\nimport { useMatch, useNavigate, useParams } from 'react-router-dom';\nimport { DefaultTheme, styled } from 'styled-components';\n\nimport { PUBLISHED_AT_ATTRIBUTE_NAME } from '../../../constants/attributes';\nimport { SINGLE_TYPES } from '../../../constants/collections';\nimport { useDocumentRBAC } from '../../../features/DocumentRBAC';\nimport { useDoc } from '../../../hooks/useDocument';\nimport { useDocumentActions } from '../../../hooks/useDocumentActions';\nimport { CLONE_PATH, LIST_PATH } from '../../../router';\nimport { useGetDraftRelationCountQuery } from '../../../services/documents';\nimport { isBaseQueryError, buildValidParams } from '../../../utils/api';\nimport { getTranslation } from '../../../utils/translations';\n\nimport type { RelationsFormValue } from './FormInputs/Relations';\nimport type { DocumentActionComponent } from '../../../content-manager';\n\n/* -------------------------------------------------------------------------------------------------\n * Types\n * -----------------------------------------------------------------------------------------------*/\ntype DocumentActionPosition = 'panel' | 'header' | 'table-row';\n\ninterface DocumentActionDescription {\n label: string;\n onClick?: (event: React.SyntheticEvent) => Promise<boolean | void> | boolean | void;\n icon?: React.ReactNode;\n /**\n * @default false\n */\n disabled?: boolean;\n /**\n * @default 'panel'\n * @description Where the action should be rendered.\n */\n position?: DocumentActionPosition | DocumentActionPosition[];\n dialog?: DialogOptions | NotificationOptions | ModalOptions;\n /**\n * @default 'secondary'\n */\n variant?: ButtonProps['variant'];\n}\n\ninterface DialogOptions {\n type: 'dialog';\n title: string;\n content?: React.ReactNode;\n variant?: ButtonProps['variant'];\n onConfirm?: () => void | Promise<void>;\n onCancel?: () => void | Promise<void>;\n}\n\ninterface NotificationOptions {\n type: 'notification';\n title: string;\n link?: {\n label: string;\n url: string;\n target?: string;\n };\n content?: string;\n onClose?: () => void;\n status?: NotificationConfig['type'];\n timeout?: number;\n}\n\ninterface ModalOptions {\n type: 'modal';\n title: string;\n content: React.ComponentType<{ onClose: () => void }> | React.ReactNode;\n footer?: React.ComponentType<{ onClose: () => void }> | React.ReactNode;\n onClose?: () => void;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * DocumentActions\n * -----------------------------------------------------------------------------------------------*/\n\ninterface Action extends DocumentActionDescription {\n id: string;\n}\n\ninterface DocumentActionsProps {\n actions: Action[];\n}\n\nconst DocumentActions = ({ actions }: DocumentActionsProps) => {\n const { formatMessage } = useIntl();\n const [primaryAction, secondaryAction, ...restActions] = actions.filter((action) => {\n if (action.position === undefined) {\n return true;\n }\n\n const positions = Array.isArray(action.position) ? action.position : [action.position];\n return positions.includes('panel');\n });\n\n if (!primaryAction) {\n return null;\n }\n\n return (\n <Flex direction=\"column\" gap={2} alignItems=\"stretch\" width=\"100%\">\n <Flex gap={2}>\n <DocumentActionButton {...primaryAction} variant={primaryAction.variant || 'default'} />\n {restActions.length > 0 ? (\n <DocumentActionsMenu\n actions={restActions}\n label={formatMessage({\n id: 'content-manager.containers.edit.panels.default.more-actions',\n defaultMessage: 'More document actions',\n })}\n />\n ) : null}\n </Flex>\n {secondaryAction ? (\n <DocumentActionButton\n {...secondaryAction}\n variant={secondaryAction.variant || 'secondary'}\n />\n ) : null}\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DocumentActionButton\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DocumentActionButtonProps extends Action {}\n\nconst DocumentActionButton = (action: DocumentActionButtonProps) => {\n const [dialogId, setDialogId] = React.useState<string | null>(null);\n const { toggleNotification } = useNotification();\n\n const handleClick = (action: Action) => async (e: React.MouseEvent) => {\n const { onClick = () => false, dialog, id } = action;\n\n const muteDialog = await onClick(e);\n\n if (dialog && !muteDialog) {\n switch (dialog.type) {\n case 'notification':\n toggleNotification({\n title: dialog.title,\n message: dialog.content,\n type: dialog.status,\n timeout: dialog.timeout,\n onClose: dialog.onClose,\n });\n break;\n case 'dialog':\n case 'modal':\n e.preventDefault();\n setDialogId(id);\n }\n }\n };\n\n const handleClose = () => {\n setDialogId(null);\n };\n\n return (\n <>\n <Button\n flex=\"auto\"\n startIcon={action.icon}\n disabled={action.disabled}\n onClick={handleClick(action)}\n justifyContent=\"center\"\n variant={action.variant || 'default'}\n paddingTop=\"7px\"\n paddingBottom=\"7px\"\n >\n {action.label}\n </Button>\n {action.dialog?.type === 'dialog' ? (\n <DocumentActionConfirmDialog\n {...action.dialog}\n variant={action.dialog?.variant ?? action.variant}\n isOpen={dialogId === action.id}\n onClose={handleClose}\n />\n ) : null}\n {action.dialog?.type === 'modal' ? (\n <DocumentActionModal\n {...action.dialog}\n onModalClose={handleClose}\n isOpen={dialogId === action.id}\n />\n ) : null}\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DocumentActionMenu\n * -----------------------------------------------------------------------------------------------*/\ninterface DocumentActionsMenuProps {\n actions: Action[];\n children?: React.ReactNode;\n label?: string;\n variant?: 'ghost' | 'tertiary';\n}\n\nconst MenuItem = styled(Menu.Item)<{ isVariantDanger?: boolean; isDisabled?: boolean }>`\n &:hover {\n background: ${({ theme, isVariantDanger, isDisabled }) =>\n isVariantDanger && !isDisabled ? theme.colors.danger100 : 'neutral'};\n }\n`;\n\nconst DocumentActionsMenu = ({\n actions,\n children,\n label,\n variant = 'tertiary',\n}: DocumentActionsMenuProps) => {\n const [isOpen, setIsOpen] = React.useState(false);\n const [dialogId, setDialogId] = React.useState<string | null>(null);\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const isDisabled = actions.every((action) => action.disabled) || actions.length === 0;\n\n const handleClick = (action: Action) => async (e: React.SyntheticEvent) => {\n const { onClick = () => false, dialog, id } = action;\n\n const muteDialog = await onClick(e);\n\n if (dialog && !muteDialog) {\n switch (dialog.type) {\n case 'notification':\n toggleNotification({\n title: dialog.title,\n message: dialog.content,\n type: dialog.status,\n timeout: dialog.timeout,\n onClose: dialog.onClose,\n });\n break;\n case 'dialog':\n case 'modal':\n setDialogId(id);\n }\n }\n };\n\n const handleClose = () => {\n setDialogId(null);\n setIsOpen(false);\n };\n\n return (\n <Menu.Root open={isOpen} onOpenChange={setIsOpen}>\n <Menu.Trigger\n disabled={isDisabled}\n size=\"S\"\n endIcon={null}\n paddingTop=\"4px\"\n paddingLeft=\"7px\"\n paddingRight=\"7px\"\n variant={variant}\n >\n <More aria-hidden focusable={false} />\n <VisuallyHidden tag=\"span\">\n {label ||\n formatMessage({\n id: 'content-manager.containers.edit.panels.default.more-actions',\n defaultMessage: 'More document actions',\n })}\n </VisuallyHidden>\n </Menu.Trigger>\n <Menu.Content maxHeight={undefined} popoverPlacement=\"bottom-end\">\n {actions.map((action) => {\n return (\n <MenuItem\n disabled={action.disabled}\n /* @ts-expect-error – TODO: this is an error in the DS where it is most likely a synthetic event, not regular. */\n onSelect={handleClick(action)}\n display=\"block\"\n key={action.id}\n isVariantDanger={action.variant === 'danger'}\n isDisabled={action.disabled}\n >\n <Flex justifyContent=\"space-between\" gap={4}>\n <Flex\n color={!action.disabled ? convertActionVariantToColor(action.variant) : 'inherit'}\n gap={2}\n tag=\"span\"\n >\n <Flex\n tag=\"span\"\n color={\n !action.disabled ? convertActionVariantToIconColor(action.variant) : 'inherit'\n }\n >\n {action.icon}\n </Flex>\n {action.label}\n </Flex>\n </Flex>\n </MenuItem>\n );\n })}\n {children}\n </Menu.Content>\n {actions.map((action) => {\n return (\n <React.Fragment key={action.id}>\n {action.dialog?.type === 'dialog' ? (\n <DocumentActionConfirmDialog\n {...action.dialog}\n variant={action.variant}\n isOpen={dialogId === action.id}\n onClose={handleClose}\n />\n ) : null}\n {action.dialog?.type === 'modal' ? (\n <DocumentActionModal\n {...action.dialog}\n onModalClose={handleClose}\n isOpen={dialogId === action.id}\n />\n ) : null}\n </React.Fragment>\n );\n })}\n </Menu.Root>\n );\n};\n\nconst convertActionVariantToColor = (\n variant: DocumentActionDescription['variant'] = 'secondary'\n): keyof DefaultTheme['colors'] | undefined => {\n switch (variant) {\n case 'danger':\n return 'danger600';\n case 'secondary':\n return undefined;\n case 'success':\n return 'success600';\n default:\n return 'primary600';\n }\n};\n\nconst convertActionVariantToIconColor = (\n variant: DocumentActionDescription['variant'] = 'secondary'\n): keyof DefaultTheme['colors'] | undefined => {\n switch (variant) {\n case 'danger':\n return 'danger600';\n case 'secondary':\n return 'neutral500';\n case 'success':\n return 'success600';\n default:\n return 'primary600';\n }\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DocumentActionConfirmDialog\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DocumentActionConfirmDialogProps extends DialogOptions, Pick<Action, 'variant'> {\n onClose: () => void;\n isOpen: Dialog.Props['open'];\n}\n\nconst DocumentActionConfirmDialog = ({\n onClose,\n onCancel,\n onConfirm,\n title,\n content,\n isOpen,\n variant = 'secondary',\n}: DocumentActionConfirmDialogProps) => {\n const { formatMessage } = useIntl();\n\n const handleClose = async () => {\n if (onCancel) {\n await onCancel();\n }\n\n onClose();\n };\n\n const handleConfirm = async () => {\n if (onConfirm) {\n await onConfirm();\n }\n\n onClose();\n };\n\n return (\n <Dialog.Root open={isOpen} onOpenChange={handleClose}>\n <Dialog.Content>\n <Dialog.Header>{title}</Dialog.Header>\n <Dialog.Body>{content}</Dialog.Body>\n <Dialog.Footer>\n <Dialog.Cancel>\n <Button variant=\"tertiary\" fullWidth>\n {formatMessage({\n id: 'app.components.Button.cancel',\n defaultMessage: 'Cancel',\n })}\n </Button>\n </Dialog.Cancel>\n <Button onClick={handleConfirm} variant={variant} fullWidth>\n {formatMessage({\n id: 'app.components.Button.confirm',\n defaultMessage: 'Confirm',\n })}\n </Button>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog.Root>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DocumentActionModal\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DocumentActionModalProps extends ModalOptions {\n onModalClose: () => void;\n isOpen?: boolean;\n}\n\nconst DocumentActionModal = ({\n isOpen,\n title,\n onClose,\n footer: Footer,\n content: Content,\n onModalClose,\n}: DocumentActionModalProps) => {\n const handleClose = () => {\n if (onClose) {\n onClose();\n }\n\n onModalClose();\n };\n\n return (\n <Modal.Root open={isOpen} onOpenChange={handleClose}>\n <Modal.Content>\n <Modal.Header>\n <Modal.Title>{title}</Modal.Title>\n </Modal.Header>\n {typeof Content === 'function' ? (\n <Content onClose={handleClose} />\n ) : (\n <Modal.Body>{Content}</Modal.Body>\n )}\n {typeof Footer === 'function' ? <Footer onClose={handleClose} /> : Footer}\n </Modal.Content>\n </Modal.Root>\n );\n};\n\nconst transformData = (data: Record<string, any>): any => {\n if (Array.isArray(data)) {\n return data.map(transformData);\n }\n\n if (typeof data === 'object' && data !== null) {\n if ('apiData' in data) {\n return data.apiData;\n }\n\n return mapValues(transformData)(data);\n }\n\n return data;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DocumentActionComponents\n * -----------------------------------------------------------------------------------------------*/\n\nconst PublishAction: DocumentActionComponent = ({\n activeTab,\n documentId,\n model,\n collectionType,\n meta,\n document,\n}) => {\n const { schema } = useDoc();\n const navigate = useNavigate();\n const { toggleNotification } = useNotification();\n const { _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();\n const isListView = useMatch(LIST_PATH) !== null;\n const isCloning = useMatch(CLONE_PATH) !== null;\n const { id } = useParams();\n const { formatMessage } = useIntl();\n const canPublish = useDocumentRBAC('PublishAction', ({ canPublish }) => canPublish);\n const { publish } = useDocumentActions();\n const [\n countDraftRelations,\n { isLoading: isLoadingDraftRelations, isError: isErrorDraftRelations },\n ] = useGetDraftRelationCountQuery();\n const [localCountOfDraftRelations, setLocalCountOfDraftRelations] = React.useState(0);\n const [serverCountOfDraftRelations, setServerCountOfDraftRelations] = React.useState(0);\n\n const [{ query, rawQuery }] = useQueryParams();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n\n const modified = useForm('PublishAction', ({ modified }) => modified);\n const setSubmitting = useForm('PublishAction', ({ setSubmitting }) => setSubmitting);\n const isSubmitting = useForm('PublishAction', ({ isSubmitting }) => isSubmitting);\n const validate = useForm('PublishAction', (state) => state.validate);\n const setErrors = useForm('PublishAction', (state) => state.setErrors);\n const formValues = useForm('PublishAction', ({ values }) => values);\n\n React.useEffect(() => {\n if (isErrorDraftRelations) {\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: getTranslation('error.records.fetch-draft-relatons'),\n defaultMessage: 'An error occurred while fetching draft relations on this document.',\n }),\n });\n }\n }, [isErrorDraftRelations, toggleNotification, formatMessage]);\n\n React.useEffect(() => {\n const localDraftRelations = new Set();\n\n /**\n * Extracts draft relations from the provided data object.\n * It checks for a connect array of relations.\n * If a relation has a status of 'draft', its id is added to the localDraftRelations set.\n */\n const extractDraftRelations = (data: Omit<RelationsFormValue, 'disconnect'>) => {\n const relations = data.connect || [];\n relations.forEach((relation) => {\n if (relation.status === 'draft') {\n localDraftRelations.add(relation.id);\n }\n });\n };\n\n /**\n * Recursively traverses the provided data object to extract draft relations from arrays within 'connect' keys.\n * If the data is an object, it looks for 'connect' keys to pass their array values to extractDraftRelations.\n * It recursively calls itself for any non-null objects it contains.\n */\n const traverseAndExtract = (data: { [field: string]: any }) => {\n Object.entries(data).forEach(([key, value]) => {\n if (key === 'connect' && Array.isArray(value)) {\n extractDraftRelations({ connect: value });\n } else if (typeof value === 'object' && value !== null) {\n traverseAndExtract(value);\n }\n });\n };\n\n if (!documentId || modified) {\n traverseAndExtract(formValues);\n setLocalCountOfDraftRelations(localDraftRelations.size);\n }\n }, [documentId, modified, formValues, setLocalCountOfDraftRelations]);\n\n React.useEffect(() => {\n if (!document || !document.documentId || isListView) {\n return;\n }\n\n const fetchDraftRelationsCount = async () => {\n const { data, error } = await countDraftRelations({\n collectionType,\n model,\n documentId,\n params,\n });\n\n if (error) {\n throw error;\n }\n\n if (data) {\n setServerCountOfDraftRelations(data.data);\n }\n };\n\n fetchDraftRelationsCount();\n }, [isListView, document, documentId, countDraftRelations, collectionType, model, params]);\n\n const isDocumentPublished =\n (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] ||\n meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) &&\n document?.status !== 'modified';\n\n if (!schema?.options?.draftAndPublish) {\n return null;\n }\n\n const performPublish = async () => {\n setSubmitting(true);\n\n try {\n const { errors } = await validate(true, {\n status: 'published',\n });\n\n if (errors) {\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: 'content-manager.validation.error',\n defaultMessage:\n 'There are validation errors in your document. Please fix them before saving.',\n }),\n });\n\n return;\n }\n\n const res = await publish(\n {\n collectionType,\n model,\n documentId,\n params,\n },\n transformData(formValues)\n );\n\n if ('data' in res && collectionType !== SINGLE_TYPES) {\n /**\n * TODO: refactor the router so we can just do `../${res.data.documentId}` instead of this.\n */\n if (id === 'create') {\n navigate({\n pathname: `../${collectionType}/${model}/${res.data.documentId}`,\n search: rawQuery,\n });\n }\n } else if (\n 'error' in res &&\n isBaseQueryError(res.error) &&\n res.error.name === 'ValidationError'\n ) {\n setErrors(formatValidationErrors(res.error));\n }\n } finally {\n setSubmitting(false);\n }\n };\n\n const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;\n // TODO skipping this for now as there is a bug with the draft relation count that will be worked on separately\n // see RFC \"Count draft relations\" in Notion\n const enableDraftRelationsCount = false;\n const hasDraftRelations = enableDraftRelationsCount && totalDraftRelations > 0;\n\n return {\n /**\n * Disabled when:\n * - currently if you're cloning a document we don't support publish & clone at the same time.\n * - the form is submitting\n * - the active tab is the published tab\n * - the document is already published & not modified\n * - the document is being created & not modified\n * - the user doesn't have the permission to publish\n */\n disabled:\n isCloning ||\n isSubmitting ||\n isLoadingDraftRelations ||\n activeTab === 'published' ||\n (!modified && isDocumentPublished) ||\n (!modified && !document?.documentId) ||\n !canPublish,\n label: formatMessage({\n id: 'app.utils.publish',\n defaultMessage: 'Publish',\n }),\n onClick: async () => {\n if (hasDraftRelations) {\n // In this case we need to show the user a confirmation dialog.\n // Return from the onClick and let the dialog handle the process.\n return;\n }\n\n await performPublish();\n },\n dialog: hasDraftRelations\n ? {\n type: 'dialog',\n variant: 'danger',\n footer: null,\n title: formatMessage({\n id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.title`),\n defaultMessage: 'Confirmation',\n }),\n content: formatMessage(\n {\n id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.message`),\n defaultMessage:\n 'This entry is related to {count, plural, one {# draft entry} other {# draft entries}}. Publishing it could leave broken links in your app.',\n },\n {\n count: totalDraftRelations,\n }\n ),\n onConfirm: async () => {\n await performPublish();\n },\n }\n : undefined,\n };\n};\n\nPublishAction.type = 'publish';\nPublishAction.position = 'panel';\n\nconst UpdateAction: DocumentActionComponent = ({\n activeTab,\n documentId,\n model,\n collectionType,\n}) => {\n const navigate = useNavigate();\n const { toggleNotification } = useNotification();\n const { _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();\n const cloneMatch = useMatch(CLONE_PATH);\n const isCloning = cloneMatch !== null;\n const { formatMessage } = useIntl();\n const { create, update, clone } = useDocumentActions();\n const [{ query, rawQuery }] = useQueryParams();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n\n const isSubmitting = useForm('UpdateAction', ({ isSubmitting }) => isSubmitting);\n const modified = useForm('UpdateAction', ({ modified }) => modified);\n const setSubmitting = useForm('UpdateAction', ({ setSubmitting }) => setSubmitting);\n const document = useForm('UpdateAction', ({ values }) => values);\n const validate = useForm('UpdateAction', (state) => state.validate);\n const setErrors = useForm('UpdateAction', (state) => state.setErrors);\n const resetForm = useForm('PublishAction', ({ resetForm }) => resetForm);\n\n const handleUpdate = React.useCallback(async () => {\n setSubmitting(true);\n\n try {\n if (!modified) {\n return;\n }\n\n const { errors } = await validate(true, {\n status: 'draft',\n });\n\n if (errors) {\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: 'content-manager.validation.error',\n defaultMessage:\n 'There are validation errors in your document. Please fix them before saving.',\n }),\n });\n\n return;\n }\n\n if (isCloning) {\n const res = await clone(\n {\n model,\n documentId: cloneMatch.params.origin!,\n params,\n },\n transformData(document)\n );\n\n if ('data' in res) {\n navigate(\n {\n pathname: `../${res.data.documentId}`,\n search: rawQuery,\n },\n { relative: 'path' }\n );\n } else if (\n 'error' in res &&\n isBaseQueryError(res.error) &&\n res.error.name === 'ValidationError'\n ) {\n setErrors(formatValidationErrors(res.error));\n }\n } else if (documentId || collectionType === SINGLE_TYPES) {\n const res = await update(\n {\n collectionType,\n model,\n documentId,\n params,\n },\n transformData(document)\n );\n\n if ('error' in res && isBaseQueryError(res.error) && res.error.name === 'ValidationError') {\n setErrors(formatValidationErrors(res.error));\n } else {\n resetForm();\n }\n } else {\n const res = await create(\n {\n model,\n params,\n },\n transformData(document)\n );\n\n if ('data' in res && collectionType !== SINGLE_TYPES) {\n navigate(\n {\n pathname: `../${res.data.documentId}`,\n search: rawQuery,\n },\n { replace: true, relative: 'path' }\n );\n } else if (\n 'error' in res &&\n isBaseQueryError(res.error) &&\n res.error.name === 'ValidationError'\n ) {\n setErrors(formatValidationErrors(res.error));\n }\n }\n } finally {\n setSubmitting(false);\n }\n }, [\n clone,\n cloneMatch?.params.origin,\n collectionType,\n create,\n document,\n documentId,\n formatMessage,\n formatValidationErrors,\n isCloning,\n model,\n modified,\n navigate,\n params,\n rawQuery,\n resetForm,\n setErrors,\n setSubmitting,\n toggleNotification,\n update,\n validate,\n ]);\n\n // Auto-save on CMD+S or CMD+Enter on macOS, and CTRL+S or CTRL+Enter on Windows/Linux\n React.useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n handleUpdate();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleUpdate]);\n\n return {\n /**\n * Disabled when:\n * - the form is submitting\n * - the document is not modified & we're not cloning (you can save a clone entity straight away)\n * - the active tab is the published tab\n */\n disabled: isSubmitting || (!modified && !isCloning) || activeTab === 'published',\n label: formatMessage({\n id: 'global.save',\n defaultMessage: 'Save',\n }),\n onClick: handleUpdate,\n };\n};\n\nUpdateAction.type = 'update';\nUpdateAction.position = 'panel';\n\nconst UNPUBLISH_DRAFT_OPTIONS = {\n KEEP: 'keep',\n DISCARD: 'discard',\n};\n\nconst UnpublishAction: DocumentActionComponent = ({\n activeTab,\n documentId,\n model,\n collectionType,\n document,\n}) => {\n const { formatMessage } = useIntl();\n const { schema } = useDoc();\n const canPublish = useDocumentRBAC('UnpublishAction', ({ canPublish }) => canPublish);\n const { unpublish } = useDocumentActions();\n const [{ query }] = useQueryParams();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n const { toggleNotification } = useNotification();\n const [shouldKeepDraft, setShouldKeepDraft] = React.useState(true);\n\n const isDocumentModified = document?.status === 'modified';\n\n const handleChange = (value: string) => {\n setShouldKeepDraft(value === UNPUBLISH_DRAFT_OPTIONS.KEEP);\n };\n\n if (!schema?.options?.draftAndPublish) {\n return null;\n }\n\n return {\n disabled:\n !canPublish ||\n activeTab === 'published' ||\n (document?.status !== 'published' && document?.status !== 'modified'),\n label: formatMessage({\n id: 'app.utils.unpublish',\n defaultMessage: 'Unpublish',\n }),\n icon: <Cross />,\n onClick: async () => {\n /**\n * return if there's no id & we're in a collection type, or the status modified\n * for either collection type because we use a dialog to handle the process in\n * the latter case.\n */\n if ((!documentId && collectionType !== SINGLE_TYPES) || isDocumentModified) {\n if (!documentId) {\n // This should never, ever, happen.\n console.error(\n \"You're trying to unpublish a document without an id, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.actions.unpublish.error',\n defaultMessage: 'An error occurred while trying to unpublish the document.',\n }),\n type: 'danger',\n });\n }\n\n return;\n }\n\n await unpublish({\n collectionType,\n model,\n documentId,\n params,\n });\n },\n dialog: isDocumentModified\n ? {\n type: 'dialog',\n title: formatMessage({\n id: 'app.components.ConfirmDialog.title',\n defaultMessage: 'Confirmation',\n }),\n content: (\n <Flex alignItems=\"flex-start\" direction=\"column\" gap={6}>\n <Flex width=\"100%\" direction=\"column\" gap={2}>\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n <Typography tag=\"p\" variant=\"omega\" textAlign=\"center\">\n {formatMessage({\n id: 'content-manager.actions.unpublish.dialog.body',\n defaultMessage: 'Are you sure?',\n })}\n </Typography>\n </Flex>\n <Radio.Group\n defaultValue={UNPUBLISH_DRAFT_OPTIONS.KEEP}\n name=\"discard-options\"\n aria-label={formatMessage({\n id: 'content-manager.actions.unpublish.dialog.radio-label',\n defaultMessage: 'Choose an option to unpublish the document.',\n })}\n onValueChange={handleChange}\n >\n <Radio.Item checked={shouldKeepDraft} value={UNPUBLISH_DRAFT_OPTIONS.KEEP}>\n {formatMessage({\n id: 'content-manager.actions.unpublish.dialog.option.keep-draft',\n defaultMessage: 'Keep draft',\n })}\n </Radio.Item>\n <Radio.Item checked={!shouldKeepDraft} value={UNPUBLISH_DRAFT_OPTIONS.DISCARD}>\n {formatMessage({\n id: 'content-manager.actions.unpublish.dialog.option.replace-draft',\n defaultMessage: 'Replace draft',\n })}\n </Radio.Item>\n </Radio.Group>\n </Flex>\n ),\n onConfirm: async () => {\n if (!documentId && collectionType !== SINGLE_TYPES) {\n // This should never, ever, happen.\n console.error(\n \"You're trying to unpublish a document without an id, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.actions.unpublish.error',\n defaultMessage: 'An error occurred while trying to unpublish the document.',\n }),\n type: 'danger',\n });\n }\n\n await unpublish(\n {\n collectionType,\n model,\n documentId,\n params,\n },\n !shouldKeepDraft\n );\n },\n }\n : undefined,\n variant: 'danger',\n position: ['panel', 'table-row'],\n };\n};\n\nUnpublishAction.type = 'unpublish';\nUnpublishAction.position = 'panel';\n\nconst DiscardAction: DocumentActionComponent = ({\n activeTab,\n documentId,\n model,\n collectionType,\n document,\n}) => {\n const { formatMessage } = useIntl();\n const { schema } = useDoc();\n const canUpdate = useDocumentRBAC('DiscardAction', ({ canUpdate }) => canUpdate);\n const { discard } = useDocumentActions();\n const [{ query }] = useQueryParams();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n\n if (!schema?.options?.draftAndPublish) {\n return null;\n }\n\n return {\n disabled: !canUpdate || activeTab === 'published' || document?.status !== 'modified',\n label: formatMessage({\n id: 'content-manager.actions.discard.label',\n defaultMessage: 'Discard changes',\n }),\n icon: <Cross />,\n position: ['panel', 'table-row'],\n variant: 'danger',\n dialog: {\n type: 'dialog',\n title: formatMessage({\n id: 'app.components.ConfirmDialog.title',\n defaultMessage: 'Confirmation',\n }),\n content: (\n <Flex direction=\"column\" gap={2}>\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n <Typography tag=\"p\" variant=\"omega\" textAlign=\"center\">\n {formatMessage({\n id: 'content-manager.actions.discard.dialog.body',\n defaultMessage: 'Are you sure?',\n })}\n </Typography>\n </Flex>\n ),\n onConfirm: async () => {\n await discard({\n collectionType,\n model,\n documentId,\n params,\n });\n },\n },\n };\n};\n\nDiscardAction.type = 'discard';\nDiscardAction.position = 'panel';\n\nconst DEFAULT_ACTIONS = [PublishAction, UpdateAction, UnpublishAction, DiscardAction];\n\nexport { DocumentActions, DocumentActionsMenu, DocumentActionButton, DEFAULT_ACTIONS };\nexport type {\n DocumentActionDescription,\n DocumentActionPosition,\n DialogOptions,\n NotificationOptions,\n ModalOptions,\n};\n","import * as React from 'react';\n\nimport { Duration, intervalToDuration, isPast } from 'date-fns';\nimport { useIntl } from 'react-intl';\n\nconst intervals: Array<keyof Duration> = ['years', 'months', 'days', 'hours', 'minutes', 'seconds'];\n\ninterface CustomInterval {\n unit: keyof Duration;\n text: string;\n threshold: number;\n}\n\ninterface RelativeTimeProps extends React.ComponentPropsWithoutRef<'time'> {\n timestamp: Date;\n customIntervals?: CustomInterval[];\n}\n\n/**\n * Displays the relative time between a given timestamp and the current time.\n * You can display a custom message for given time intervals by passing an array of custom intervals.\n *\n * @example\n * ```jsx\n * <caption>Display \"last hour\" if the timestamp is less than an hour ago</caption>\n * <RelativeTime\n * timestamp={new Date('2021-01-01')}\n * customIntervals={[\n * { unit: 'hours', threshold: 1, text: 'last hour' },\n * ]}\n * ```\n */\nconst RelativeTime = React.forwardRef<HTMLTimeElement, RelativeTimeProps>(\n ({ timestamp, customIntervals = [], ...restProps }, forwardedRef) => {\n const { formatRelativeTime, formatDate, formatTime } = useIntl();\n\n /**\n * TODO: make this auto-update, like a clock.\n */\n const interval = intervalToDuration({\n start: timestamp,\n end: Date.now(),\n // see https://github.com/date-fns/date-fns/issues/2891 – No idea why it's all partial it returns it every time.\n }) as Required<Duration>;\n\n const unit =\n intervals.find((intervalUnit) => {\n return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);\n }) ?? 'seconds';\n\n const relativeTime = isPast(timestamp) ? -interval[unit] : interval[unit];\n\n // Display custom text if interval is less than the threshold\n const customInterval = customIntervals.find(\n (custom) => interval[custom.unit] < custom.threshold\n );\n\n const displayText = customInterval\n ? customInterval.text\n : formatRelativeTime(relativeTime, unit, { numeric: 'auto' });\n\n return (\n <time\n ref={forwardedRef}\n dateTime={timestamp.toISOString()}\n role=\"time\"\n title={`${formatDate(timestamp)} ${formatTime(timestamp)}`}\n {...restProps}\n >\n {displayText}\n </time>\n );\n }\n);\n\nexport { RelativeTime };\nexport type { CustomInterval, RelativeTimeProps };\n","import type { SanitizedAdminUser } from '@strapi/admin/strapi-admin';\n\n/**\n * Retrieves the display name of an admin panel user\n */\nconst getDisplayName = ({\n firstname,\n lastname,\n username,\n email,\n}: Partial<\n Pick<SanitizedAdminUser, 'firstname' | 'lastname' | 'username' | 'email'>\n> = {}): string => {\n if (username) {\n return username;\n }\n\n // firstname is not required if the user is created with a username\n if (firstname) {\n return `${firstname} ${lastname ?? ''}`.trim();\n }\n\n return email ?? '';\n};\n\nexport { getDisplayName };\n","const capitalise = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1);\n\nexport { capitalise };\n","import { Status, StatusProps, Typography } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { capitalise } from '../../../utils/strings';\n\ninterface DocumentStatusProps extends Omit<StatusProps, 'children' | 'variant'> {\n /**\n * The status of the document (draft, published, etc.)\n * @default 'draft'\n */\n status?: string;\n}\n\n/**\n * @public\n * @description Displays the status of a document (draft, published, etc.)\n * and automatically calculates the appropriate variant for the status.\n */\nconst DocumentStatus = ({ status = 'draft', size = 'S', ...restProps }: DocumentStatusProps) => {\n const statusVariant =\n status === 'draft' ? 'secondary' : status === 'published' ? 'success' : 'alternative';\n\n const { formatMessage } = useIntl();\n\n return (\n <Status {...restProps} size={size} variant={statusVariant}>\n <Typography tag=\"span\" variant=\"omega\" fontWeight=\"bold\">\n {formatMessage({\n id: `content-manager.containers.List.${status}`,\n defaultMessage: capitalise(status),\n })}\n </Typography>\n </Status>\n );\n};\n\nexport { DocumentStatus };\nexport type { DocumentStatusProps };\n","import * as React from 'react';\n\nimport {\n DescriptionComponentRenderer,\n useForm,\n BackButton,\n useNotification,\n useStrapiApp,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Flex,\n SingleSelect,\n SingleSelectOption,\n Typography,\n IconButton,\n Dialog,\n} from '@strapi/design-system';\nimport { ListPlus, Pencil, Trash, WarningCircle } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { useMatch, useNavigate, useParams } from 'react-router-dom';\n\nimport { RelativeTime } from '../../../components/RelativeTime';\nimport {\n CREATED_AT_ATTRIBUTE_NAME,\n CREATED_BY_ATTRIBUTE_NAME,\n PUBLISHED_AT_ATTRIBUTE_NAME,\n PUBLISHED_BY_ATTRIBUTE_NAME,\n UPDATED_AT_ATTRIBUTE_NAME,\n UPDATED_BY_ATTRIBUTE_NAME,\n} from '../../../constants/attributes';\nimport { COLLECTION_TYPES, SINGLE_TYPES } from '../../../constants/collections';\nimport { useDocumentRBAC } from '../../../features/DocumentRBAC';\nimport { useDoc } from '../../../hooks/useDocument';\nimport { useDocumentActions } from '../../../hooks/useDocumentActions';\nimport { CLONE_PATH, LIST_PATH } from '../../../router';\nimport { getDisplayName } from '../../../utils/users';\n\nimport { DocumentActionsMenu } from './DocumentActions';\nimport { DocumentStatus } from './DocumentStatus';\n\nimport type { ContentManagerPlugin, DocumentActionComponent } from '../../../content-manager';\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\ninterface HeaderProps {\n isCreating?: boolean;\n status?: 'draft' | 'published' | 'modified';\n title?: string;\n}\n\nconst Header = ({ isCreating, status, title: documentTitle = 'Untitled' }: HeaderProps) => {\n const { formatMessage } = useIntl();\n const isCloning = useMatch(CLONE_PATH) !== null;\n const params = useParams<{ collectionType: string; slug: string }>();\n\n const title = isCreating\n ? formatMessage({\n id: 'content-manager.containers.edit.title.new',\n defaultMessage: 'Create an entry',\n })\n : documentTitle;\n\n return (\n <Flex direction=\"column\" alignItems=\"flex-start\" paddingTop={6} paddingBottom={4} gap={2}>\n <BackButton\n fallback={\n params.collectionType === SINGLE_TYPES\n ? undefined\n : `../${COLLECTION_TYPES}/${params.slug}`\n }\n />\n <Flex width=\"100%\" justifyContent=\"space-between\" gap=\"80px\" alignItems=\"flex-start\">\n <Typography variant=\"alpha\" tag=\"h1\">\n {title}\n </Typography>\n <HeaderToolbar />\n </Flex>\n {status ? (\n <Box marginTop={1}>\n <DocumentStatus status={isCloning ? 'draft' : status} />\n </Box>\n ) : null}\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * HeaderToolbar\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DialogOptions {\n type: 'dialog';\n title: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n}\n\ninterface HeaderActionDescription {\n disabled?: boolean;\n label: string;\n icon?: React.ReactNode;\n type?: 'icon' | 'default';\n onClick?: (event: React.SyntheticEvent) => Promise<boolean | void> | boolean | void;\n dialog?: DialogOptions;\n options?: Array<{\n disabled?: boolean;\n label: string;\n startIcon?: React.ReactNode;\n textValue?: string;\n value: string;\n }>;\n onSelect?: (value: string) => void;\n value?: string;\n customizeContent?: (value: string) => React.ReactNode;\n}\n\n/**\n * @description Contains the document actions that have `position: header`, if there are\n * none we still render the menu because we render the information about the document there.\n */\nconst HeaderToolbar = () => {\n const { formatMessage } = useIntl();\n const isCloning = useMatch(CLONE_PATH) !== null;\n const [\n {\n query: { status = 'draft' },\n },\n ] = useQueryParams<{ status: 'draft' | 'published' }>();\n const { model, id, document, meta, collectionType } = useDoc();\n const plugins = useStrapiApp('HeaderToolbar', (state) => state.plugins);\n\n return (\n <Flex gap={2}>\n <DescriptionComponentRenderer\n props={{\n activeTab: status,\n model,\n documentId: id,\n document: isCloning ? undefined : document,\n meta: isCloning ? undefined : meta,\n collectionType,\n }}\n descriptions={(\n plugins['content-manager'].apis as ContentManagerPlugin['config']['apis']\n ).getHeaderActions()}\n >\n {(actions) => {\n if (actions.length > 0) {\n return <HeaderActions actions={actions} />;\n } else {\n return null;\n }\n }}\n </DescriptionComponentRenderer>\n <DescriptionComponentRenderer\n props={{\n activeTab: status,\n model,\n documentId: id,\n document: isCloning ? undefined : document,\n meta: isCloning ? undefined : meta,\n collectionType,\n }}\n descriptions={(\n plugins['content-manager'].apis as ContentManagerPlugin['config']['apis']\n ).getDocumentActions('header')}\n >\n {(actions) => {\n const headerActions = actions.filter((action) => {\n const positions = Array.isArray(action.position) ? action.position : [action.position];\n return positions.includes('header');\n });\n\n return (\n <DocumentActionsMenu\n actions={headerActions}\n label={formatMessage({\n id: 'content-manager.containers.edit.header.more-actions',\n defaultMessage: 'More actions',\n })}\n >\n <Information activeTab={status} />\n </DocumentActionsMenu>\n );\n }}\n </DescriptionComponentRenderer>\n </Flex>\n );\n};\n\ninterface InformationProps {\n activeTab: 'draft' | 'published';\n}\n\nconst Information = ({ activeTab }: InformationProps) => {\n const { formatMessage } = useIntl();\n const { document, meta } = useDoc();\n\n if (!document || !document.id) {\n return null;\n }\n\n /**\n * Because in the backend separate entries are made for draft and published\n * documents, the creator fields are different for each of them. For example,\n * you could make your draft in January and then publish it for the first time\n * in Feb. This would make the createdAt value for the published entry in Feb\n * but really we want to show the document as a whole. The draft entry will also\n * never have the publishedAt values.\n *\n * So, we decipher which document to show the creator for based on the activeTab.\n */\n\n const createAndUpdateDocument =\n activeTab === 'draft'\n ? document\n : meta?.availableStatus.find((status) => status.publishedAt === null);\n\n const publishDocument =\n activeTab === 'published'\n ? document\n : meta?.availableStatus.find((status) => status.publishedAt !== null);\n\n const creator = createAndUpdateDocument?.[CREATED_BY_ATTRIBUTE_NAME]\n ? getDisplayName(createAndUpdateDocument[CREATED_BY_ATTRIBUTE_NAME])\n : null;\n\n const updator = createAndUpdateDocument?.[UPDATED_BY_ATTRIBUTE_NAME]\n ? getDisplayName(createAndUpdateDocument[UPDATED_BY_ATTRIBUTE_NAME])\n : null;\n\n const information: Array<{ isDisplayed?: boolean; label: string; value: React.ReactNode }> = [\n {\n isDisplayed: !!publishDocument?.[PUBLISHED_AT_ATTRIBUTE_NAME],\n label: formatMessage({\n id: 'content-manager.containers.edit.information.last-published.label',\n defaultMessage: 'Published',\n }),\n value: formatMessage(\n {\n id: 'content-manager.containers.edit.information.last-published.value',\n defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`,\n },\n {\n time: (\n <RelativeTime timestamp={new Date(publishDocument?.[PUBLISHED_AT_ATTRIBUTE_NAME])} />\n ),\n isAnonymous: !publishDocument?.[PUBLISHED_BY_ATTRIBUTE_NAME],\n author: publishDocument?.[PUBLISHED_BY_ATTRIBUTE_NAME]\n ? getDisplayName(publishDocument?.[PUBLISHED_BY_ATTRIBUTE_NAME])\n : null,\n }\n ),\n },\n {\n isDisplayed: !!createAndUpdateDocument?.[UPDATED_AT_ATTRIBUTE_NAME],\n label: formatMessage({\n id: 'content-manager.containers.edit.information.last-draft.label',\n defaultMessage: 'Updated',\n }),\n value: formatMessage(\n {\n id: 'content-manager.containers.edit.information.last-draft.value',\n defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`,\n },\n {\n time: (\n <RelativeTime\n timestamp={new Date(createAndUpdateDocument?.[UPDATED_AT_ATTRIBUTE_NAME])}\n />\n ),\n isAnonymous: !updator,\n author: updator,\n }\n ),\n },\n {\n isDisplayed: !!createAndUpdateDocument?.[CREATED_AT_ATTRIBUTE_NAME],\n label: formatMessage({\n id: 'content-manager.containers.edit.information.document.label',\n defaultMessage: 'Created',\n }),\n value: formatMessage(\n {\n id: 'content-manager.containers.edit.information.document.value',\n defaultMessage: `{time}{isAnonymous, select, true {} other { by {author}}}`,\n },\n {\n time: (\n <RelativeTime\n timestamp={new Date(createAndUpdateDocument?.[CREATED_AT_ATTRIBUTE_NAME])}\n />\n ),\n isAnonymous: !creator,\n author: creator,\n }\n ),\n },\n ].filter((info) => info.isDisplayed);\n\n return (\n <Flex\n borderWidth=\"1px 0 0 0\"\n borderStyle=\"solid\"\n borderColor=\"neutral150\"\n direction=\"column\"\n marginTop={2}\n tag=\"dl\"\n padding={5}\n gap={3}\n alignItems=\"flex-start\"\n /**\n * The menu content has a padding of 4px, but we want our divider (the border top applied) to\n * be flush with the menu content. So we need to adjust the margin & width to account for the padding.\n */\n marginLeft=\"-0.4rem\"\n marginRight=\"-0.4rem\"\n width=\"calc(100% + 8px)\"\n >\n {information.map((info) => (\n <Flex gap={1} direction=\"column\" alignItems=\"flex-start\" key={info.label}>\n <Typography tag=\"dt\" variant=\"pi\" fontWeight=\"bold\">\n {info.label}\n </Typography>\n <Typography tag=\"dd\" variant=\"pi\" textColor=\"neutral600\">\n {info.value}\n </Typography>\n </Flex>\n ))}\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * HeaderActions\n * -----------------------------------------------------------------------------------------------*/\n\ninterface HeaderActionsProps {\n actions: Array<HeaderActionDescription & { id: string }>;\n}\n\nconst HeaderActions = ({ actions }: HeaderActionsProps) => {\n const [dialogId, setDialogId] = React.useState<string | null>(null);\n\n const handleClick =\n (action: HeaderActionDescription & { id: string }) => async (e: React.MouseEvent) => {\n if (!('options' in action)) {\n const { onClick = () => false, dialog, id } = action;\n\n const muteDialog = await onClick(e);\n\n if (dialog && !muteDialog) {\n e.preventDefault();\n setDialogId(id);\n }\n }\n };\n\n const handleClose = () => {\n setDialogId(null);\n };\n\n return (\n <Flex gap={1}>\n {actions.map((action) => {\n if (action.options) {\n return (\n <SingleSelect\n key={action.id}\n size=\"S\"\n // @ts-expect-error – the DS will handle numbers, but we're not allowing the API.\n onChange={action.onSelect}\n aria-label={action.label}\n {...action}\n >\n {action.options.map(({ label, ...option }) => (\n <SingleSelectOption key={option.value} {...option}>\n {label}\n </SingleSelectOption>\n ))}\n </SingleSelect>\n );\n } else {\n if (action.type === 'icon') {\n return (\n <React.Fragment key={action.id}>\n <IconButton\n disabled={action.disabled}\n label={action.label}\n size=\"S\"\n onClick={handleClick(action)}\n >\n {action.icon}\n </IconButton>\n {action.dialog ? (\n <HeaderActionDialog\n {...action.dialog}\n isOpen={dialogId === action.id}\n onClose={handleClose}\n />\n ) : null}\n </React.Fragment>\n );\n }\n }\n })}\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * HeaderActionDialog\n * -----------------------------------------------------------------------------------------------*/\ninterface HeaderActionDialogProps {\n onClose: () => void;\n onCancel?: () => Promise<void>;\n title: string;\n content?: React.ReactNode | ((props: { onClose: () => void }) => React.ReactNode);\n isOpen: boolean;\n}\n\nconst HeaderActionDialog = ({\n onClose,\n onCancel,\n title,\n content: Content,\n isOpen,\n}: HeaderActionDialogProps) => {\n const handleClose = async () => {\n if (onCancel) {\n await onCancel();\n }\n\n onClose();\n };\n\n return (\n <Dialog.Root open={isOpen} onOpenChange={handleClose}>\n <Dialog.Content>\n <Dialog.Header>{title}</Dialog.Header>\n {typeof Content === 'function' ? <Content onClose={handleClose} /> : Content}\n </Dialog.Content>\n </Dialog.Root>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DocumentActionComponents\n * -----------------------------------------------------------------------------------------------*/\n\nconst ConfigureTheViewAction: DocumentActionComponent = ({ collectionType, model }) => {\n const navigate = useNavigate();\n const { formatMessage } = useIntl();\n\n return {\n label: formatMessage({\n id: 'app.links.configure-view',\n defaultMessage: 'Configure the view',\n }),\n icon: <ListPlus />,\n onClick: () => {\n navigate(`../${collectionType}/${model}/configurations/edit`);\n },\n position: 'header',\n };\n};\n\nConfigureTheViewAction.type = 'configure-the-view';\nConfigureTheViewAction.position = 'header';\n\nconst EditTheModelAction: DocumentActionComponent = ({ model }) => {\n const navigate = useNavigate();\n const { formatMessage } = useIntl();\n\n return {\n label: formatMessage({\n id: 'content-manager.link-to-ctb',\n defaultMessage: 'Edit the model',\n }),\n icon: <Pencil />,\n onClick: () => {\n navigate(`/plugins/content-type-builder/content-types/${model}`);\n },\n position: 'header',\n };\n};\n\nEditTheModelAction.type = 'edit-the-model';\nEditTheModelAction.position = 'header';\n\nconst DeleteAction: DocumentActionComponent = ({ documentId, model, collectionType, document }) => {\n const navigate = useNavigate();\n const { formatMessage } = useIntl();\n const listViewPathMatch = useMatch(LIST_PATH);\n const canDelete = useDocumentRBAC('DeleteAction', (state) => state.canDelete);\n const { delete: deleteAction } = useDocumentActions();\n const { toggleNotification } = useNotification();\n const setSubmitting = useForm('DeleteAction', (state) => state.setSubmitting);\n const isLocalized = document?.locale != null;\n\n return {\n disabled: !canDelete || !document,\n label: formatMessage(\n {\n id: 'content-manager.actions.delete.label',\n defaultMessage: 'Delete entry{isLocalized, select, true { (all locales)} other {}}',\n },\n { isLocalized }\n ),\n icon: <Trash />,\n dialog: {\n type: 'dialog',\n title: formatMessage({\n id: 'app.components.ConfirmDialog.title',\n defaultMessage: 'Confirmation',\n }),\n content: (\n <Flex direction=\"column\" gap={2}>\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n <Typography tag=\"p\" variant=\"omega\" textAlign=\"center\">\n {formatMessage({\n id: 'content-manager.actions.delete.dialog.body',\n defaultMessage: 'Are you sure?',\n })}\n </Typography>\n </Flex>\n ),\n onConfirm: async () => {\n /**\n * If we have a match, we're in the list view\n * and therefore not in a form and shouldn't be\n * trying to set the submitting value.\n */\n if (!listViewPathMatch) {\n setSubmitting(true);\n }\n try {\n if (!documentId && collectionType !== SINGLE_TYPES) {\n console.error(\n \"You're trying to delete a document without an id, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.actions.delete.error',\n defaultMessage: 'An error occurred while trying to delete the document.',\n }),\n type: 'danger',\n });\n\n return;\n }\n\n const res = await deleteAction({\n documentId,\n model,\n collectionType,\n params: {\n locale: '*',\n },\n });\n\n if (!('error' in res)) {\n navigate({ pathname: `../${collectionType}/${model}` }, { replace: true });\n }\n } finally {\n if (!listViewPathMatch) {\n setSubmitting(false);\n }\n }\n },\n },\n variant: 'danger',\n position: ['header', 'table-row'],\n };\n};\n\nDeleteAction.type = 'delete';\nDeleteAction.position = ['header', 'table-row'];\n\nconst DEFAULT_HEADER_ACTIONS = [EditTheModelAction, ConfigureTheViewAction, DeleteAction];\n\nexport { Header, DEFAULT_HEADER_ACTIONS };\nexport type { HeaderProps, HeaderActionDescription };\n","import * as React from 'react';\n\nimport {\n useQueryParams,\n useStrapiApp,\n DescriptionComponentRenderer,\n} from '@strapi/admin/strapi-admin';\nimport { Flex, Typography } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { useMatch } from 'react-router-dom';\n\nimport { InjectionZone } from '../../../components/InjectionZone';\nimport { useDoc } from '../../../hooks/useDocument';\nimport { CLONE_PATH } from '../../../router';\n\nimport { DocumentActions } from './DocumentActions';\n\nimport type {\n ContentManagerPlugin,\n DocumentActionProps,\n PanelComponent,\n PanelComponentProps,\n} from '../../../content-manager';\n\ninterface PanelDescription {\n title: string;\n content: React.ReactNode;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Panels\n * -----------------------------------------------------------------------------------------------*/\n\nconst Panels = () => {\n const isCloning = useMatch(CLONE_PATH) !== null;\n const [\n {\n query: { status },\n },\n ] = useQueryParams<{ status: 'draft' | 'published' }>({\n status: 'draft',\n });\n const { model, id, document, meta, collectionType } = useDoc();\n const plugins = useStrapiApp('Panels', (state) => state.plugins);\n\n const props = {\n activeTab: status,\n model,\n documentId: id,\n document: isCloning ? undefined : document,\n meta: isCloning ? undefined : meta,\n collectionType,\n } satisfies PanelComponentProps;\n\n return (\n <Flex direction=\"column\" alignItems=\"stretch\" gap={2}>\n <DescriptionComponentRenderer\n props={props}\n descriptions={(\n plugins['content-manager'].apis as ContentManagerPlugin['config']['apis']\n ).getEditViewSidePanels()}\n >\n {(panels) =>\n panels.map(({ content, id, ...description }) => (\n <Panel key={id} {...description}>\n {content}\n </Panel>\n ))\n }\n </DescriptionComponentRenderer>\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Default Action Panels (CE)\n * -----------------------------------------------------------------------------------------------*/\n\nconst ActionsPanel: PanelComponent = () => {\n const { formatMessage } = useIntl();\n\n return {\n title: formatMessage({\n id: 'content-manager.containers.edit.panels.default.title',\n defaultMessage: 'Entry',\n }),\n content: <ActionsPanelContent />,\n };\n};\n\nActionsPanel.type = 'actions';\n\nconst ActionsPanelContent = () => {\n const isCloning = useMatch(CLONE_PATH) !== null;\n const [\n {\n query: { status = 'draft' },\n },\n ] = useQueryParams<{ status: 'draft' | 'published' }>();\n const { model, id, document, meta, collectionType } = useDoc();\n const plugins = useStrapiApp('ActionsPanel', (state) => state.plugins);\n\n const props = {\n activeTab: status,\n model,\n documentId: id,\n document: isCloning ? undefined : document,\n meta: isCloning ? undefined : meta,\n collectionType,\n } satisfies DocumentActionProps;\n\n return (\n <Flex direction=\"column\" gap={2} width=\"100%\">\n <DescriptionComponentRenderer\n props={props}\n descriptions={(\n plugins['content-manager'].apis as ContentManagerPlugin['config']['apis']\n ).getDocumentActions('panel')}\n >\n {(actions) => <DocumentActions actions={actions} />}\n </DescriptionComponentRenderer>\n <InjectionZone area=\"editView.right-links\" slug={model} />\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Panel\n * -----------------------------------------------------------------------------------------------*/\n\ninterface PanelProps extends Pick<PanelDescription, 'title'> {\n children: React.ReactNode;\n}\n\nconst Panel = React.forwardRef<any, PanelProps>(({ children, title }, ref) => {\n return (\n <Flex\n ref={ref}\n tag=\"aside\"\n aria-labelledby=\"additional-information\"\n background=\"neutral0\"\n borderColor=\"neutral150\"\n hasRadius\n paddingBottom={4}\n paddingLeft={4}\n paddingRight={4}\n paddingTop={4}\n shadow=\"tableShadow\"\n gap={3}\n direction=\"column\"\n justifyContent=\"stretch\"\n alignItems=\"flex-start\"\n >\n <Typography tag=\"h2\" variant=\"sigma\" textTransform=\"uppercase\" textColor=\"neutral600\">\n {title}\n </Typography>\n {children}\n </Flex>\n );\n});\n\nexport { Panels, ActionsPanel };\nexport type { PanelDescription };\n","import * as React from 'react';\n\nimport {\n useTable,\n useNotification,\n useAPIErrorHandler,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport { Button, Flex, Dialog, Typography } from '@strapi/design-system';\nimport { Check, WarningCircle } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { useDoc } from '../../../../hooks/useDocument';\nimport { useGetManyDraftRelationCountQuery } from '../../../../services/documents';\nimport { getTranslation } from '../../../../utils/translations';\n\nimport { Emphasis } from './Actions';\n\ninterface ConfirmBulkActionDialogProps {\n endAction: React.ReactNode;\n onToggleDialog: () => void;\n isOpen?: boolean;\n dialogBody: React.ReactNode;\n}\n\nconst ConfirmBulkActionDialog = ({\n onToggleDialog,\n isOpen = false,\n dialogBody,\n endAction,\n}: ConfirmBulkActionDialogProps) => {\n const { formatMessage } = useIntl();\n\n return (\n <Dialog.Root open={isOpen}>\n <Dialog.Content>\n <Dialog.Header>\n {formatMessage({\n id: 'app.components.ConfirmDialog.title',\n defaultMessage: 'Confirmation',\n })}\n </Dialog.Header>\n <Dialog.Body>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={2}>\n <Flex justifyContent=\"center\">\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n </Flex>\n {dialogBody}\n </Flex>\n </Dialog.Body>\n <Dialog.Footer>\n <Dialog.Cancel>\n <Button fullWidth onClick={onToggleDialog} variant=\"tertiary\">\n {formatMessage({\n id: 'app.components.Button.cancel',\n defaultMessage: 'Cancel',\n })}\n </Button>\n </Dialog.Cancel>\n {endAction}\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog.Root>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * BoldChunk\n * -----------------------------------------------------------------------------------------------*/\n\nconst BoldChunk = (chunks: React.ReactNode) => <Typography fontWeight=\"bold\">{chunks}</Typography>;\n\n/* -------------------------------------------------------------------------------------------------\n * ConfirmDialogPublishAll\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ConfirmDialogPublishAllProps\n extends Pick<ConfirmBulkActionDialogProps, 'isOpen' | 'onToggleDialog'> {\n isConfirmButtonLoading?: boolean;\n onConfirm: () => void;\n}\n\nconst ConfirmDialogPublishAll = ({\n isOpen,\n onToggleDialog,\n isConfirmButtonLoading = false,\n onConfirm,\n}: ConfirmDialogPublishAllProps) => {\n const { formatMessage } = useIntl();\n const selectedEntries = useTable('ConfirmDialogPublishAll', (state) => state.selectedRows);\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler(getTranslation);\n const { model, schema } = useDoc();\n const [{ query }] = useQueryParams<{\n plugins?: {\n i18n?: {\n locale?: string;\n };\n };\n }>();\n\n // TODO skipping this for now as there is a bug with the draft relation count that will be worked on separately\n // see RFC \"Count draft relations\" in Notion\n const enableDraftRelationsCount = false;\n\n const {\n data: countDraftRelations = 0,\n isLoading,\n error,\n } = useGetManyDraftRelationCountQuery(\n {\n model,\n documentIds: selectedEntries.map((entry) => entry.documentId),\n locale: query?.plugins?.i18n?.locale,\n },\n {\n skip: !enableDraftRelationsCount || selectedEntries.length === 0,\n }\n );\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({ type: 'danger', message: formatAPIError(error) });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n if (error) {\n return null;\n }\n\n return (\n <ConfirmBulkActionDialog\n isOpen={isOpen && !isLoading}\n onToggleDialog={onToggleDialog}\n dialogBody={\n <>\n <Typography id=\"confirm-description\" textAlign=\"center\">\n {countDraftRelations > 0 &&\n formatMessage(\n {\n id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.message`),\n defaultMessage:\n '<b>{count} {count, plural, one { relation } other { relations } } out of {entities} { entities, plural, one { entry } other { entries } } {count, plural, one { is } other { are } }</b> not published yet and might lead to unexpected behavior. ',\n },\n {\n b: BoldChunk,\n count: countDraftRelations,\n entities: selectedEntries.length,\n }\n )}\n {formatMessage({\n id: getTranslation('popUpWarning.bodyMessage.contentType.publish.all'),\n defaultMessage: 'Are you sure you want to publish these entries?',\n })}\n </Typography>\n {schema?.pluginOptions &&\n 'i18n' in schema.pluginOptions &&\n schema?.pluginOptions.i18n && (\n <Typography textColor=\"danger500\" textAlign=\"center\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.publishAdditionalInfos'),\n defaultMessage:\n 'This will publish the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n )}\n </>\n }\n endAction={\n <Button\n onClick={onConfirm}\n variant=\"secondary\"\n startIcon={<Check />}\n loading={isConfirmButtonLoading}\n >\n {formatMessage({\n id: 'app.utils.publish',\n defaultMessage: 'Publish',\n })}\n </Button>\n }\n />\n );\n};\n\nexport { ConfirmDialogPublishAll, ConfirmBulkActionDialog };\nexport type { ConfirmDialogPublishAllProps, ConfirmBulkActionDialogProps };\n","import * as React from 'react';\n\nimport {\n FormErrors,\n getYupValidationErrors,\n Table,\n useQueryParams,\n useTable,\n} from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Button,\n Flex,\n IconButton,\n Loader,\n Modal,\n Tooltip,\n Typography,\n TypographyComponent,\n RawTable,\n Tr,\n Td,\n Tbody,\n} from '@strapi/design-system';\nimport { ArrowsCounterClockwise, CheckCircle, CrossCircle, Pencil } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { Link, useLocation } from 'react-router-dom';\nimport { styled } from 'styled-components';\nimport { ValidationError } from 'yup';\n\nimport { useDocumentRBAC } from '../../../../features/DocumentRBAC';\nimport { useContentTypeSchema } from '../../../../hooks/useContentTypeSchema';\nimport { useDocumentActions } from '../../../../hooks/useDocumentActions';\nimport { useDocLayout } from '../../../../hooks/useDocumentLayout';\nimport { contentManagerApi } from '../../../../services/api';\nimport {\n useGetAllDocumentsQuery,\n usePublishManyDocumentsMutation,\n} from '../../../../services/documents';\nimport { buildValidParams } from '../../../../utils/api';\nimport { getTranslation } from '../../../../utils/translations';\nimport { createYupSchema } from '../../../../utils/validation';\nimport { DocumentStatus } from '../../../EditView/components/DocumentStatus';\n\nimport { ConfirmDialogPublishAll, ConfirmDialogPublishAllProps } from './ConfirmBulkActionDialog';\n\nimport type { BulkActionComponent } from '../../../../content-manager';\nimport type { Document } from '../../../../hooks/useDocument';\n\nconst TypographyMaxWidth = styled<TypographyComponent>(Typography)`\n max-width: 300px;\n`;\n\nconst TableComponent = styled(RawTable)`\n width: 100%;\n table-layout: fixed;\n td:first-child {\n border-right: 1px solid ${({ theme }) => theme.colors.neutral150};\n }\n td:first-of-type {\n padding: ${({ theme }) => theme.spaces[4]};\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * EntryValidationText\n * -----------------------------------------------------------------------------------------------*/\n\nconst formatErrorMessages = (errors: FormErrors, parentKey: string, formatMessage: any) => {\n const messages: string[] = [];\n\n Object.entries(errors).forEach(([key, value]) => {\n const currentKey = parentKey ? `${parentKey}.${key}` : key;\n\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n if ('id' in value && 'defaultMessage' in value) {\n messages.push(\n formatMessage(\n {\n id: `${value.id}.withField`,\n defaultMessage: value.defaultMessage,\n },\n { field: currentKey }\n )\n );\n } else {\n messages.push(\n ...formatErrorMessages(\n // @ts-expect-error TODO: check why value is not compatible with FormErrors\n value,\n currentKey,\n formatMessage\n )\n );\n }\n } else {\n messages.push(\n formatMessage(\n {\n id: `${value}.withField`,\n defaultMessage: value,\n },\n { field: currentKey }\n )\n );\n }\n });\n\n return messages;\n};\n\ninterface EntryValidationTextProps {\n validationErrors?: FormErrors;\n status: string;\n}\n\nconst EntryValidationText = ({ validationErrors, status }: EntryValidationTextProps) => {\n const { formatMessage } = useIntl();\n\n if (validationErrors) {\n const validationErrorsMessages = formatErrorMessages(validationErrors, '', formatMessage).join(\n ' '\n );\n\n return (\n <Flex gap={2}>\n <CrossCircle fill=\"danger600\" />\n <Tooltip description={validationErrorsMessages}>\n <TypographyMaxWidth textColor=\"danger600\" variant=\"omega\" fontWeight=\"semiBold\" ellipsis>\n {validationErrorsMessages}\n </TypographyMaxWidth>\n </Tooltip>\n </Flex>\n );\n }\n\n if (status === 'published') {\n return (\n <Flex gap={2}>\n <CheckCircle fill=\"success600\" />\n <Typography textColor=\"success600\" fontWeight=\"bold\">\n {formatMessage({\n id: 'content-manager.bulk-publish.already-published',\n defaultMessage: 'Already Published',\n })}\n </Typography>\n </Flex>\n );\n }\n\n if (status === 'modified') {\n return (\n <Flex gap={2}>\n <ArrowsCounterClockwise fill=\"alternative600\" />\n <Typography>\n {formatMessage({\n id: 'content-manager.bulk-publish.modified',\n defaultMessage: 'Ready to publish changes',\n })}\n </Typography>\n </Flex>\n );\n }\n\n return (\n <Flex gap={2}>\n <CheckCircle fill=\"success600\" />\n <Typography>\n {formatMessage({\n id: 'app.utils.ready-to-publish',\n defaultMessage: 'Ready to publish',\n })}\n </Typography>\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * SelectedEntriesTableContent\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SelectedEntriesTableContentProps {\n isPublishing?: boolean;\n rowsToDisplay?: TableRow[];\n entriesToPublish?: TableRow['documentId'][];\n validationErrors: Record<string, EntryValidationTextProps['validationErrors']>;\n}\n\nconst TABLE_HEADERS = [\n { name: 'id', label: 'id' },\n { name: 'name', label: 'name' },\n { name: 'status', label: 'status' },\n { name: 'publicationStatus', label: 'Publication status' },\n];\n\nconst SelectedEntriesTableContent = ({\n isPublishing,\n rowsToDisplay = [],\n entriesToPublish = [],\n validationErrors = {},\n}: SelectedEntriesTableContentProps) => {\n const { pathname } = useLocation();\n const { formatMessage } = useIntl();\n\n const {\n list: {\n settings: { mainField },\n },\n } = useDocLayout();\n\n const shouldDisplayMainField = mainField != null && mainField !== 'id';\n\n return (\n <Table.Content>\n <Table.Head>\n <Table.HeaderCheckboxCell />\n {TABLE_HEADERS.filter((head) => head.name !== 'name' || shouldDisplayMainField).map(\n (head) => (\n <Table.HeaderCell key={head.name} {...head} />\n )\n )}\n </Table.Head>\n <Table.Loading />\n <Table.Body>\n {rowsToDisplay.map((row) => (\n <Table.Row key={row.id}>\n <Table.CheckboxCell id={row.id} />\n <Table.Cell>\n <Typography>{row.id}</Typography>\n </Table.Cell>\n {shouldDisplayMainField && (\n <Table.Cell>\n <Typography>{row[mainField as keyof TableRow]}</Typography>\n </Table.Cell>\n )}\n <Table.Cell>\n <DocumentStatus status={row.status} maxWidth={'min-content'} />\n </Table.Cell>\n <Table.Cell>\n {isPublishing && entriesToPublish.includes(row.documentId) ? (\n <Flex gap={2}>\n <Typography>\n {formatMessage({\n id: 'content-manager.success.record.publishing',\n defaultMessage: 'Publishing...',\n })}\n </Typography>\n <Loader small />\n </Flex>\n ) : (\n <EntryValidationText\n validationErrors={validationErrors[row.documentId]}\n status={row.status}\n />\n )}\n </Table.Cell>\n <Table.Cell>\n <Flex>\n <IconButton\n tag={Link}\n to={{\n pathname: `${pathname}/${row.documentId}`,\n search: row.locale && `?plugins[i18n][locale]=${row.locale}`,\n }}\n state={{ from: pathname }}\n label={formatMessage({\n id: 'content-manager.bulk-publish.edit',\n defaultMessage: 'Edit',\n })}\n target=\"_blank\"\n marginLeft=\"auto\"\n variant=\"ghost\"\n >\n <Pencil width={'1.6rem'} height={'1.6rem'} />\n </IconButton>\n </Flex>\n </Table.Cell>\n </Table.Row>\n ))}\n </Table.Body>\n </Table.Content>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * PublicationStatusSummary\n * -----------------------------------------------------------------------------------------------*/\n\ninterface PublicationStatusSummaryProps {\n count: number;\n icon: React.ReactNode;\n message: string;\n}\n\nconst PublicationStatusSummary = ({ count, icon, message }: PublicationStatusSummaryProps) => {\n return (\n <Flex justifyContent=\"space-between\" flex={1} gap={3}>\n <Flex gap={2}>\n {icon}\n <Typography>{message}</Typography>\n </Flex>\n <Typography fontWeight=\"bold\">{count}</Typography>\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * PublicationStatusGrid\n * -----------------------------------------------------------------------------------------------*/\n\ninterface PublicationStatusGridProps {\n entriesReadyToPublishCount: number;\n entriesModifiedCount: number;\n entriesPublishedCount: number;\n entriesWithErrorsCount: number;\n}\n\nconst PublicationStatusGrid = ({\n entriesReadyToPublishCount,\n entriesPublishedCount,\n entriesModifiedCount,\n entriesWithErrorsCount,\n}: PublicationStatusGridProps) => {\n const { formatMessage } = useIntl();\n\n return (\n <Box hasRadius borderColor=\"neutral150\">\n <TableComponent colCount={2} rowCount={2}>\n <Tbody>\n <Tr>\n <Td>\n <PublicationStatusSummary\n count={entriesReadyToPublishCount}\n icon={<CheckCircle fill=\"success600\" />}\n message={formatMessage({\n id: 'app.utils.ready-to-publish',\n defaultMessage: 'Ready to publish',\n })}\n />\n </Td>\n <Td>\n <PublicationStatusSummary\n count={entriesPublishedCount}\n icon={<CheckCircle fill=\"success600\" />}\n message={formatMessage({\n id: 'app.utils.already-published',\n defaultMessage: 'Already published',\n })}\n />\n </Td>\n </Tr>\n <Tr>\n <Td>\n <PublicationStatusSummary\n count={entriesModifiedCount}\n icon={<ArrowsCounterClockwise fill=\"alternative600\" />}\n message={formatMessage({\n id: 'content-manager.bulk-publish.modified',\n defaultMessage: 'Ready to publish changes',\n })}\n />\n </Td>\n <Td>\n <PublicationStatusSummary\n count={entriesWithErrorsCount}\n icon={<CrossCircle fill=\"danger600\" />}\n message={formatMessage({\n id: 'content-manager.bulk-publish.waiting-for-action',\n defaultMessage: 'Waiting for action',\n })}\n />\n </Td>\n </Tr>\n </Tbody>\n </TableComponent>\n </Box>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * SelectedEntriesModalContent\n * -----------------------------------------------------------------------------------------------*/\n\ninterface TableRow extends Document {}\n\ninterface SelectedEntriesModalContentProps {\n listViewSelectedEntries: TableRow[];\n toggleModal: ConfirmDialogPublishAllProps['onToggleDialog'];\n setListViewSelectedDocuments: (documents: TableRow[]) => void;\n model: string;\n}\n\nconst SelectedEntriesModalContent = ({\n listViewSelectedEntries,\n toggleModal,\n setListViewSelectedDocuments,\n model,\n}: SelectedEntriesModalContentProps) => {\n const { formatMessage } = useIntl();\n const { schema, components } = useContentTypeSchema(model);\n const documentIds = listViewSelectedEntries.map(({ documentId }) => documentId);\n\n // We want to keep the selected entries order same as the list view\n const [{ query }] = useQueryParams<{ sort?: string; plugins?: Record<string, any> }>();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n\n // Fetch the documents based on the selected entries and update the modal table\n const { data, isLoading, isFetching, refetch } = useGetAllDocumentsQuery(\n {\n model,\n params: {\n page: '1',\n pageSize: documentIds.length.toString(),\n sort: query.sort,\n filters: {\n documentId: {\n $in: documentIds,\n },\n },\n locale: query.plugins?.i18n?.locale,\n },\n },\n {\n selectFromResult: ({ data, ...restRes }) => ({ data: data?.results ?? [], ...restRes }),\n }\n );\n\n // Validate the entries based on the schema to show errors if any\n const { rows, validationErrors } = React.useMemo(() => {\n if (data.length > 0 && schema) {\n const validate = createYupSchema(\n schema.attributes,\n components,\n // Since this is the \"Publish\" action, the validation\n // schema must enforce the rules for published entities\n { status: 'published' }\n );\n const validationErrors: Record<TableRow['documentId'], FormErrors> = {};\n const rows = data.map((entry: Document) => {\n try {\n validate.validateSync(entry, { abortEarly: false });\n\n return entry;\n } catch (e) {\n if (e instanceof ValidationError) {\n validationErrors[entry.documentId] = getYupValidationErrors(e);\n }\n\n return entry;\n }\n });\n\n return { rows, validationErrors };\n }\n\n return {\n rows: [],\n validationErrors: {},\n };\n }, [components, data, schema]);\n\n const [isDialogOpen, setIsDialogOpen] = React.useState(false);\n\n const { publishMany: bulkPublishAction } = useDocumentActions();\n const [, { isLoading: isSubmittingForm }] = usePublishManyDocumentsMutation();\n\n const selectedRows = useTable('publishAction', (state) => state.selectedRows);\n\n // Filter selected entries from the updated modal table rows\n const selectedEntries = rows.filter((entry) =>\n selectedRows.some((selectedEntry) => selectedEntry.documentId === entry.documentId)\n );\n\n const entriesToPublish = selectedEntries\n .filter((entry) => !validationErrors[entry.documentId])\n .map((entry) => entry.documentId);\n\n const selectedEntriesWithErrorsCount = selectedEntries.filter(\n ({ documentId }) => validationErrors[documentId]\n ).length;\n const selectedEntriesPublishedCount = selectedEntries.filter(\n ({ status }) => status === 'published'\n ).length;\n const selectedEntriesModifiedCount = selectedEntries.filter(\n ({ status, documentId }) => status === 'modified' && !validationErrors[documentId]\n ).length;\n const selectedEntriesWithNoErrorsCount =\n selectedEntries.length - selectedEntriesWithErrorsCount - selectedEntriesPublishedCount;\n\n const toggleDialog = () => setIsDialogOpen((prev) => !prev);\n\n const handleConfirmBulkPublish = async () => {\n toggleDialog();\n\n const res = await bulkPublishAction({ model: model, documentIds: entriesToPublish, params });\n if (!('error' in res)) {\n const unpublishedEntries = rows.filter((row) => {\n return !entriesToPublish.includes(row.documentId);\n });\n // Keep selection of the entries in list view that were not published\n setListViewSelectedDocuments(unpublishedEntries);\n }\n };\n\n return (\n <>\n <Modal.Body>\n <PublicationStatusGrid\n entriesReadyToPublishCount={\n selectedEntriesWithNoErrorsCount - selectedEntriesModifiedCount\n }\n entriesPublishedCount={selectedEntriesPublishedCount}\n entriesModifiedCount={selectedEntriesModifiedCount}\n entriesWithErrorsCount={selectedEntriesWithErrorsCount}\n />\n <Box marginTop={7}>\n <SelectedEntriesTableContent\n isPublishing={isSubmittingForm}\n rowsToDisplay={rows}\n entriesToPublish={entriesToPublish}\n validationErrors={validationErrors}\n />\n </Box>\n </Modal.Body>\n <Modal.Footer>\n <Button onClick={toggleModal} variant=\"tertiary\">\n {formatMessage({\n id: 'app.components.Button.cancel',\n defaultMessage: 'Cancel',\n })}\n </Button>\n <Flex gap={2}>\n <Button onClick={refetch} variant=\"tertiary\" loading={isFetching}>\n {formatMessage({ id: 'app.utils.refresh', defaultMessage: 'Refresh' })}\n </Button>\n <Button\n onClick={toggleDialog}\n disabled={\n selectedEntries.length === 0 ||\n selectedEntries.length === selectedEntriesWithErrorsCount ||\n selectedEntriesPublishedCount === selectedEntries.length ||\n isLoading\n }\n loading={isSubmittingForm}\n >\n {formatMessage({ id: 'app.utils.publish', defaultMessage: 'Publish' })}\n </Button>\n </Flex>\n </Modal.Footer>\n <ConfirmDialogPublishAll\n isOpen={isDialogOpen}\n onToggleDialog={toggleDialog}\n isConfirmButtonLoading={isSubmittingForm}\n onConfirm={handleConfirmBulkPublish}\n />\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * PublishAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst PublishAction: BulkActionComponent = ({ documents, model }) => {\n const { formatMessage } = useIntl();\n // Publish button visibility\n const hasPublishPermission = useDocumentRBAC('unpublishAction', (state) => state.canPublish);\n const showPublishButton =\n hasPublishPermission && documents.some(({ status }) => status !== 'published');\n\n const setListViewSelectedDocuments = useTable('publishAction', (state) => state.selectRow);\n\n const refetchList = () => {\n contentManagerApi.util.invalidateTags([{ type: 'Document', id: `${model}_LIST` }]);\n };\n\n if (!showPublishButton) return null;\n\n return {\n actionType: 'publish',\n variant: 'tertiary',\n label: formatMessage({ id: 'app.utils.publish', defaultMessage: 'Publish' }),\n dialog: {\n type: 'modal',\n title: formatMessage({\n id: getTranslation('containers.ListPage.selectedEntriesModal.title'),\n defaultMessage: 'Publish entries',\n }),\n content: ({ onClose }) => {\n return (\n <Table.Root rows={documents} defaultSelectedRows={documents} headers={TABLE_HEADERS}>\n <SelectedEntriesModalContent\n listViewSelectedEntries={documents}\n toggleModal={() => {\n onClose();\n refetchList();\n }}\n setListViewSelectedDocuments={setListViewSelectedDocuments}\n model={model}\n />\n </Table.Root>\n );\n },\n onClose: () => {\n refetchList();\n },\n },\n };\n};\n\nexport { PublishAction, SelectedEntriesModalContent };\n","import * as React from 'react';\n\nimport {\n useStrapiApp,\n DescriptionComponentRenderer,\n useTable,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport { Box, ButtonProps, Flex, Typography } from '@strapi/design-system';\nimport { WarningCircle } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { useDocumentRBAC } from '../../../../features/DocumentRBAC';\nimport { useDoc } from '../../../../hooks/useDocument';\nimport { useDocumentActions } from '../../../../hooks/useDocumentActions';\nimport { buildValidParams } from '../../../../utils/api';\nimport { getTranslation } from '../../../../utils/translations';\nimport {\n DialogOptions,\n DocumentActionButton,\n ModalOptions,\n NotificationOptions,\n} from '../../../EditView/components/DocumentActions';\n\nimport { PublishAction } from './PublishAction';\n\nimport type { BulkActionComponent, ContentManagerPlugin } from '../../../../content-manager';\n\ninterface BulkActionDescription {\n dialog?: DialogOptions | NotificationOptions | ModalOptions;\n disabled?: boolean;\n icon?: React.ReactNode;\n label: string;\n onClick?: (event: React.SyntheticEvent) => void;\n /**\n * @default 'default'\n */\n type?: 'icon' | 'default';\n /**\n * @default 'secondary'\n */\n variant?: ButtonProps['variant'];\n}\n\n/* -------------------------------------------------------------------------------------------------\n * BulkActionsRenderer\n * -----------------------------------------------------------------------------------------------*/\n\nconst BulkActionsRenderer = () => {\n const plugins = useStrapiApp('BulkActionsRenderer', (state) => state.plugins);\n\n const { model, collectionType } = useDoc();\n const { selectedRows } = useTable('BulkActionsRenderer', (state) => state);\n\n return (\n <Flex gap={2}>\n <DescriptionComponentRenderer\n props={{\n model,\n collectionType,\n documents: selectedRows,\n }}\n descriptions={(\n plugins['content-manager'].apis as ContentManagerPlugin['config']['apis']\n ).getBulkActions()}\n >\n {(actions) => actions.map((action) => <DocumentActionButton key={action.id} {...action} />)}\n </DescriptionComponentRenderer>\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DefaultBulkActions\n * -----------------------------------------------------------------------------------------------*/\n\nconst DeleteAction: BulkActionComponent = ({ documents, model }) => {\n const { formatMessage } = useIntl();\n const { schema: contentType } = useDoc();\n const selectRow = useTable('DeleteAction', (state) => state.selectRow);\n const hasI18nEnabled = Boolean(contentType?.pluginOptions?.i18n);\n const [{ query }] = useQueryParams<{ plugins?: { i18n?: { locale?: string } } }>();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n const hasDeletePermission = useDocumentRBAC('deleteAction', (state) => state.canDelete);\n const { deleteMany: bulkDeleteAction } = useDocumentActions();\n const documentIds = documents.map(({ documentId }) => documentId);\n\n const handleConfirmBulkDelete = async () => {\n const res = await bulkDeleteAction({\n documentIds,\n model,\n params,\n });\n if (!('error' in res)) {\n selectRow([]);\n }\n };\n\n if (!hasDeletePermission) return null;\n\n return {\n variant: 'danger-light',\n label: formatMessage({ id: 'global.delete', defaultMessage: 'Delete' }),\n dialog: {\n type: 'dialog',\n title: formatMessage({\n id: 'app.components.ConfirmDialog.title',\n defaultMessage: 'Confirmation',\n }),\n content: (\n <Flex direction=\"column\" alignItems=\"stretch\" gap={2}>\n <Flex justifyContent=\"center\">\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n </Flex>\n <Typography id=\"confirm-description\" textAlign=\"center\">\n {formatMessage({\n id: 'popUpWarning.bodyMessage.contentType.delete.all',\n defaultMessage: 'Are you sure you want to delete these entries?',\n })}\n </Typography>\n {hasI18nEnabled && (\n <Box textAlign=\"center\" padding={3}>\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.deleteAdditionalInfos'),\n defaultMessage:\n 'This will delete the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n </Box>\n )}\n </Flex>\n ),\n onConfirm: handleConfirmBulkDelete,\n },\n };\n};\n\nDeleteAction.type = 'delete';\n\nconst UnpublishAction: BulkActionComponent = ({ documents, model }) => {\n const { formatMessage } = useIntl();\n const { schema } = useDoc();\n const selectRow = useTable('UnpublishAction', (state) => state.selectRow);\n const hasPublishPermission = useDocumentRBAC('unpublishAction', (state) => state.canPublish);\n const hasI18nEnabled = Boolean(schema?.pluginOptions?.i18n);\n const hasDraftAndPublishEnabled = Boolean(schema?.options?.draftAndPublish);\n const { unpublishMany: bulkUnpublishAction } = useDocumentActions();\n const documentIds = documents.map(({ documentId }) => documentId);\n const [{ query }] = useQueryParams();\n const params = React.useMemo(() => buildValidParams(query), [query]);\n\n const handleConfirmBulkUnpublish = async () => {\n const data = await bulkUnpublishAction({ documentIds, model, params });\n if (!('error' in data)) {\n selectRow([]);\n }\n };\n\n const showUnpublishButton =\n hasDraftAndPublishEnabled &&\n hasPublishPermission &&\n documents.some((entry) => entry.status === 'published' || entry.status === 'modified');\n\n if (!showUnpublishButton) return null;\n\n return {\n variant: 'tertiary',\n label: formatMessage({ id: 'app.utils.unpublish', defaultMessage: 'Unpublish' }),\n dialog: {\n type: 'dialog',\n title: formatMessage({\n id: 'app.components.ConfirmDialog.title',\n defaultMessage: 'Confirmation',\n }),\n content: (\n <Flex direction=\"column\" alignItems=\"stretch\" gap={2}>\n <Flex justifyContent=\"center\">\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n </Flex>\n <Typography id=\"confirm-description\" textAlign=\"center\">\n {formatMessage({\n id: 'popUpWarning.bodyMessage.contentType.unpublish.all',\n defaultMessage: 'Are you sure you want to unpublish these entries?',\n })}\n </Typography>\n {hasI18nEnabled && (\n <Box textAlign=\"center\" padding={3}>\n <Typography textColor=\"danger500\">\n {formatMessage(\n {\n id: getTranslation('Settings.list.actions.unpublishAdditionalInfos'),\n defaultMessage:\n 'This will unpublish the active locale versions <em>(from Internationalization)</em>',\n },\n {\n em: Emphasis,\n }\n )}\n </Typography>\n </Box>\n )}\n </Flex>\n ),\n confirmButton: formatMessage({\n id: 'app.utils.unpublish',\n defaultMessage: 'Unpublish',\n }),\n onConfirm: handleConfirmBulkUnpublish,\n },\n };\n};\n\nUnpublishAction.type = 'unpublish';\n\nconst Emphasis = (chunks: React.ReactNode) => (\n <Typography fontWeight=\"semiBold\" textColor=\"danger500\">\n {chunks}\n </Typography>\n);\n\nconst DEFAULT_BULK_ACTIONS: BulkActionComponent[] = [PublishAction, UnpublishAction, DeleteAction];\n\nexport { DEFAULT_BULK_ACTIONS, BulkActionsRenderer, Emphasis };\nexport type { BulkActionDescription };\n","import { Box, Flex, Typography } from '@strapi/design-system';\nimport { ChevronRight } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { getTranslation } from '../../../utils/translations';\n\nimport type { ProhibitedCloningField } from '../../../../../shared/contracts/collection-types';\n\ntype Reason = ProhibitedCloningField[1];\n\ninterface AutoCloneFailureModalBodyProps {\n prohibitedFields: ProhibitedCloningField[];\n}\n\nconst AutoCloneFailureModalBody = ({ prohibitedFields }: AutoCloneFailureModalBodyProps) => {\n const { formatMessage } = useIntl();\n\n const getDefaultErrorMessage = (reason: Reason) => {\n switch (reason) {\n case 'relation':\n return 'Duplicating the relation could remove it from the original entry.';\n case 'unique':\n return 'Identical values in a unique field are not allowed';\n default:\n return reason;\n }\n };\n\n return (\n <>\n <Typography variant=\"beta\">\n {formatMessage({\n id: getTranslation('containers.list.autoCloneModal.title'),\n defaultMessage: \"This entry can't be duplicated directly.\",\n })}\n </Typography>\n <Box marginTop={2}>\n <Typography textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation('containers.list.autoCloneModal.description'),\n defaultMessage:\n \"A new entry will be created with the same content, but you'll have to change the following fields to save it.\",\n })}\n </Typography>\n </Box>\n <Flex marginTop={6} gap={2} direction=\"column\" alignItems=\"stretch\">\n {prohibitedFields.map(([fieldPath, reason]) => (\n <Flex\n direction=\"column\"\n gap={2}\n alignItems=\"flex-start\"\n borderColor=\"neutral200\"\n hasRadius\n padding={6}\n key={fieldPath.join()}\n >\n <Flex direction=\"row\" tag=\"ol\">\n {fieldPath.map((pathSegment, index) => (\n <Typography fontWeight=\"semiBold\" tag=\"li\" key={index}>\n {pathSegment}\n {index !== fieldPath.length - 1 && (\n <ChevronRight\n fill=\"neutral500\"\n height=\"0.8rem\"\n width=\"0.8rem\"\n style={{ margin: '0 0.8rem' }}\n />\n )}\n </Typography>\n ))}\n </Flex>\n <Typography tag=\"p\" textColor=\"neutral600\">\n {formatMessage({\n id: getTranslation(`containers.list.autoCloneModal.error.${reason}`),\n defaultMessage: getDefaultErrorMessage(reason),\n })}\n </Typography>\n </Flex>\n ))}\n </Flex>\n </>\n );\n};\n\nexport { AutoCloneFailureModalBody };\nexport type { AutoCloneFailureModalBodyProps };\n","import * as React from 'react';\n\nimport {\n DescriptionComponentRenderer,\n useNotification,\n useStrapiApp,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport { Button, LinkButton, Modal } from '@strapi/design-system';\nimport { Duplicate, Pencil } from '@strapi/icons';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { NavLink, useNavigate } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nimport { useDocumentRBAC } from '../../../features/DocumentRBAC';\nimport { Document, useDoc } from '../../../hooks/useDocument';\nimport { useDocumentActions } from '../../../hooks/useDocumentActions';\nimport { isBaseQueryError } from '../../../utils/api';\nimport { DocumentActionsMenu } from '../../EditView/components/DocumentActions';\n\nimport { AutoCloneFailureModalBody } from './AutoCloneFailureModal';\n\nimport type { ProhibitedCloningField } from '../../../../../shared/contracts/collection-types';\nimport type {\n ContentManagerPlugin,\n DocumentActionComponent,\n DocumentActionProps,\n} from '../../../content-manager';\n\n/* -------------------------------------------------------------------------------------------------\n * TableActions\n * -----------------------------------------------------------------------------------------------*/\n\ninterface TableActionsProps {\n document: Document;\n}\n\nconst TableActions = ({ document }: TableActionsProps) => {\n const { formatMessage } = useIntl();\n const { model, collectionType } = useDoc();\n const plugins = useStrapiApp('TableActions', (state) => state.plugins);\n\n const props: DocumentActionProps = {\n activeTab: null,\n model,\n documentId: document.documentId,\n collectionType,\n document,\n };\n\n return (\n <DescriptionComponentRenderer\n props={props}\n descriptions={(plugins['content-manager'].apis as ContentManagerPlugin['config']['apis'])\n .getDocumentActions('table-row')\n // We explicitly remove the PublishAction from description so we never render it and we don't make unnecessary requests.\n .filter((action) => action.name !== 'PublishAction')}\n >\n {(actions) => {\n const tableRowActions = actions.filter((action) => {\n const positions = Array.isArray(action.position) ? action.position : [action.position];\n return positions.includes('table-row');\n });\n\n return (\n <DocumentActionsMenu\n actions={tableRowActions}\n label={formatMessage({\n id: 'content-manager.containers.list.table.row-actions',\n defaultMessage: 'Row actions',\n })}\n variant=\"ghost\"\n />\n );\n }}\n </DescriptionComponentRenderer>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * TableActionComponents\n * -----------------------------------------------------------------------------------------------*/\n\nconst EditAction: DocumentActionComponent = ({ documentId }) => {\n const navigate = useNavigate();\n const { formatMessage } = useIntl();\n const { canRead } = useDocumentRBAC('EditAction', ({ canRead }) => ({ canRead }));\n const { toggleNotification } = useNotification();\n const [{ query }] = useQueryParams<{ plugins?: object }>();\n\n return {\n disabled: !canRead,\n icon: <StyledPencil />,\n label: formatMessage({\n id: 'content-manager.actions.edit.label',\n defaultMessage: 'Edit',\n }),\n position: 'table-row',\n onClick: async () => {\n if (!documentId) {\n console.error(\n \"You're trying to edit a document without an id, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.actions.edit.error',\n defaultMessage: 'An error occurred while trying to edit the document.',\n }),\n type: 'danger',\n });\n\n return;\n }\n\n navigate({\n pathname: documentId,\n search: stringify({\n plugins: query.plugins,\n }),\n });\n },\n };\n};\n\nEditAction.type = 'edit';\nEditAction.position = 'table-row';\n\n/**\n * Because the icon system is completely broken, we have to do\n * this to remove the fill from the cog.\n */\nconst StyledPencil = styled(Pencil)`\n path {\n fill: currentColor;\n }\n`;\n\nconst CloneAction: DocumentActionComponent = ({ model, documentId }) => {\n const navigate = useNavigate();\n const { formatMessage } = useIntl();\n const { canCreate } = useDocumentRBAC('CloneAction', ({ canCreate }) => ({ canCreate }));\n const { toggleNotification } = useNotification();\n const { autoClone } = useDocumentActions();\n const [prohibitedFields, setProhibitedFields] = React.useState<ProhibitedCloningField[]>([]);\n\n return {\n disabled: !canCreate,\n icon: <StyledDuplicate />,\n label: formatMessage({\n id: 'content-manager.actions.clone.label',\n defaultMessage: 'Duplicate',\n }),\n position: 'table-row',\n onClick: async () => {\n if (!documentId) {\n console.error(\n \"You're trying to clone a document in the table without an id, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.actions.clone.error',\n defaultMessage: 'An error occurred while trying to clone the document.',\n }),\n type: 'danger',\n });\n\n return;\n }\n\n const res = await autoClone({ model, sourceId: documentId });\n\n if ('data' in res) {\n navigate(res.data.documentId);\n\n /**\n * We return true because we don't need to show a modal anymore.\n */\n return true;\n }\n\n if (\n isBaseQueryError(res.error) &&\n res.error.details &&\n typeof res.error.details === 'object' &&\n 'prohibitedFields' in res.error.details &&\n Array.isArray(res.error.details.prohibitedFields)\n ) {\n const prohibitedFields = res.error.details.prohibitedFields as ProhibitedCloningField[];\n\n setProhibitedFields(prohibitedFields);\n }\n },\n dialog: {\n type: 'modal',\n title: formatMessage({\n id: 'content-manager.containers.list.autoCloneModal.header',\n defaultMessage: 'Duplicate',\n }),\n content: <AutoCloneFailureModalBody prohibitedFields={prohibitedFields} />,\n footer: ({ onClose }) => {\n return (\n <Modal.Footer>\n <Button onClick={onClose} variant=\"tertiary\">\n {formatMessage({\n id: 'cancel',\n defaultMessage: 'Cancel',\n })}\n </Button>\n <LinkButton\n tag={NavLink}\n to={{\n pathname: `clone/${documentId}`,\n }}\n >\n {formatMessage({\n id: 'content-manager.containers.list.autoCloneModal.create',\n defaultMessage: 'Create',\n })}\n </LinkButton>\n </Modal.Footer>\n );\n },\n },\n };\n};\n\nCloneAction.type = 'clone';\nCloneAction.position = 'table-row';\n\n/**\n * Because the icon system is completely broken, we have to do\n * this to remove the fill from the cog.\n */\nconst StyledDuplicate = styled(Duplicate)`\n path {\n fill: currentColor;\n }\n`;\n\nconst DEFAULT_TABLE_ROW_ACTIONS = [EditAction, CloneAction];\n\nexport { TableActions, DEFAULT_TABLE_ROW_ACTIONS };\n","/* eslint-disable check-file/filename-naming-convention */\nimport { INJECTION_ZONES } from './components/InjectionZone';\nimport { PLUGIN_ID } from './constants/plugin';\nimport {\n DEFAULT_ACTIONS,\n type DocumentActionPosition,\n type DocumentActionDescription,\n} from './pages/EditView/components/DocumentActions';\nimport {\n DEFAULT_HEADER_ACTIONS,\n type HeaderActionDescription,\n} from './pages/EditView/components/Header';\nimport { ActionsPanel, type PanelDescription } from './pages/EditView/components/Panels';\nimport {\n DEFAULT_BULK_ACTIONS,\n type BulkActionDescription,\n} from './pages/ListView/components/BulkActions/Actions';\nimport { DEFAULT_TABLE_ROW_ACTIONS } from './pages/ListView/components/TableActions';\n\nimport type { Document } from './hooks/useDocument';\nimport type { DocumentMetadata } from '../../shared/contracts/collection-types';\nimport type { DescriptionComponent, PluginConfig } from '@strapi/admin/strapi-admin';\n\n/* -------------------------------------------------------------------------------------------------\n * Configuration Types\n * -----------------------------------------------------------------------------------------------*/\n\ntype DescriptionReducer<Config extends object> = (prev: Config[]) => Config[];\n\ninterface EditViewContext {\n /**\n * This will ONLY be null, if the content-type\n * does not have draft & published enabled.\n */\n activeTab: 'draft' | 'published' | null;\n /**\n * Will be either 'single-types' | 'collection-types'\n */\n collectionType: string;\n /**\n * this will be undefined if someone is creating an entry.\n */\n document?: Document;\n /**\n * this will be undefined if someone is creating an entry.\n */\n documentId?: string;\n /**\n * this will be undefined if someone is creating an entry.\n */\n meta?: DocumentMetadata;\n /**\n * The current content-type's model.\n */\n model: string;\n}\n\ninterface ListViewContext {\n /**\n * Will be either 'single-types' | 'collection-types'\n */\n collectionType: string;\n /**\n * The current selected documents in the table\n */\n documents: Document[];\n /**\n * The current content-type's model.\n */\n model: string;\n}\n\ninterface PanelComponentProps extends EditViewContext {}\n\ninterface PanelComponent extends DescriptionComponent<PanelComponentProps, PanelDescription> {\n /**\n * The defaults are added by Strapi only, if you're providing your own component,\n * you do not need to provide this.\n */\n type?: 'actions' | 'releases';\n}\n\ninterface DocumentActionProps extends EditViewContext {}\n\ninterface DocumentActionComponent\n extends DescriptionComponent<DocumentActionProps, DocumentActionDescription> {\n type?:\n | 'clone'\n | 'configure-the-view'\n | 'delete'\n | 'discard'\n | 'edit'\n | 'edit-the-model'\n | 'history'\n | 'publish'\n | 'unpublish'\n | 'update';\n position?: DocumentActionDescription['position'];\n}\n\ninterface HeaderActionProps extends EditViewContext {}\n\ninterface HeaderActionComponent\n extends DescriptionComponent<HeaderActionProps, HeaderActionDescription> {}\n\ninterface BulkActionComponentProps extends ListViewContext {}\n\ninterface BulkActionComponent\n extends DescriptionComponent<BulkActionComponentProps, BulkActionDescription> {\n type?: 'delete' | 'publish' | 'unpublish';\n}\n\n/* -------------------------------------------------------------------------------------------------\n * ContentManager plugin\n * -----------------------------------------------------------------------------------------------*/\n\nclass ContentManagerPlugin {\n /**\n * The following properties are the stored ones provided by any plugins registering with\n * the content-manager. The function calls however, need to be called at runtime in the\n * application, so instead we collate them and run them later with the complete list incl.\n * ones already registered & the context of the view.\n */\n bulkActions: BulkActionComponent[] = [...DEFAULT_BULK_ACTIONS];\n documentActions: DocumentActionComponent[] = [\n ...DEFAULT_ACTIONS,\n ...DEFAULT_TABLE_ROW_ACTIONS,\n ...DEFAULT_HEADER_ACTIONS,\n ];\n editViewSidePanels: PanelComponent[] = [ActionsPanel];\n headerActions: HeaderActionComponent[] = [];\n\n constructor() {}\n\n addEditViewSidePanel(panels: DescriptionReducer<PanelComponent>): void;\n addEditViewSidePanel(panels: PanelComponent[]): void;\n addEditViewSidePanel(panels: DescriptionReducer<PanelComponent> | PanelComponent[]) {\n if (Array.isArray(panels)) {\n this.editViewSidePanels = [...this.editViewSidePanels, ...panels];\n } else if (typeof panels === 'function') {\n this.editViewSidePanels = panels(this.editViewSidePanels);\n } else {\n throw new Error(\n `Expected the \\`panels\\` passed to \\`addEditViewSidePanel\\` to be an array or a function, but received ${getPrintableType(\n panels\n )}`\n );\n }\n }\n\n addDocumentAction(actions: DescriptionReducer<DocumentActionComponent>): void;\n addDocumentAction(actions: DocumentActionComponent[]): void;\n addDocumentAction(\n actions: DescriptionReducer<DocumentActionComponent> | DocumentActionComponent[]\n ) {\n if (Array.isArray(actions)) {\n this.documentActions = [...this.documentActions, ...actions];\n } else if (typeof actions === 'function') {\n this.documentActions = actions(this.documentActions);\n } else {\n throw new Error(\n `Expected the \\`actions\\` passed to \\`addDocumentAction\\` to be an array or a function, but received ${getPrintableType(\n actions\n )}`\n );\n }\n }\n\n addDocumentHeaderAction(actions: DescriptionReducer<HeaderActionComponent>): void;\n addDocumentHeaderAction(actions: HeaderActionComponent[]): void;\n addDocumentHeaderAction(\n actions: DescriptionReducer<HeaderActionComponent> | HeaderActionComponent[]\n ) {\n if (Array.isArray(actions)) {\n this.headerActions = [...this.headerActions, ...actions];\n } else if (typeof actions === 'function') {\n this.headerActions = actions(this.headerActions);\n } else {\n throw new Error(\n `Expected the \\`actions\\` passed to \\`addDocumentHeaderAction\\` to be an array or a function, but received ${getPrintableType(\n actions\n )}`\n );\n }\n }\n\n addBulkAction(actions: DescriptionReducer<BulkActionComponent>): void;\n addBulkAction(actions: BulkActionComponent[]): void;\n addBulkAction(actions: DescriptionReducer<BulkActionComponent> | BulkActionComponent[]) {\n if (Array.isArray(actions)) {\n this.bulkActions = [...this.bulkActions, ...actions];\n } else if (typeof actions === 'function') {\n this.bulkActions = actions(this.bulkActions);\n } else {\n throw new Error(\n `Expected the \\`actions\\` passed to \\`addBulkAction\\` to be an array or a function, but received ${getPrintableType(\n actions\n )}`\n );\n }\n }\n\n get config() {\n return {\n id: PLUGIN_ID,\n name: 'Content Manager',\n injectionZones: INJECTION_ZONES,\n apis: {\n addBulkAction: this.addBulkAction.bind(this),\n addDocumentAction: this.addDocumentAction.bind(this),\n addDocumentHeaderAction: this.addDocumentHeaderAction.bind(this),\n addEditViewSidePanel: this.addEditViewSidePanel.bind(this),\n getBulkActions: () => this.bulkActions,\n getDocumentActions: (position?: DocumentActionPosition) => {\n /**\n * When possible, pre-filter the actions by the components static position property.\n * This avoids rendering the actions in multiple places where they weren't displayed,\n * which wasn't visible but created issues with useEffect for instance.\n * The response should still be filtered by the position, as the static property is new\n * and not mandatory to avoid a breaking change.\n */\n if (position) {\n return this.documentActions.filter(\n (action) =>\n action.position == undefined || [action.position].flat().includes(position)\n );\n }\n\n return this.documentActions;\n },\n getEditViewSidePanels: () => this.editViewSidePanels,\n getHeaderActions: () => this.headerActions,\n },\n } satisfies PluginConfig;\n }\n}\n\n/* -------------------------------------------------------------------------------------------------\n * getPrintableType\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n * @description Gets the human-friendly printable type name for the given value, for instance it will yield\n * `array` instead of `object`, as the native `typeof` operator would do.\n */\nconst getPrintableType = (value: unknown): string => {\n const nativeType = typeof value;\n\n if (nativeType === 'object') {\n if (value === null) return 'null';\n if (Array.isArray(value)) return 'array';\n if (value instanceof Object && value.constructor.name !== 'Object') {\n return value.constructor.name;\n }\n }\n\n return nativeType;\n};\n\nexport { ContentManagerPlugin };\nexport type {\n EditViewContext,\n ListViewContext,\n BulkActionComponent,\n BulkActionComponentProps,\n BulkActionDescription,\n DescriptionComponent,\n DescriptionReducer,\n PanelComponentProps,\n PanelComponent,\n PanelDescription,\n DocumentActionComponent,\n DocumentActionDescription,\n DocumentActionProps,\n HeaderActionComponent,\n HeaderActionDescription,\n HeaderActionProps,\n};\n","import { useQueryParams, useTracking } from '@strapi/admin/strapi-admin';\nimport { ClockCounterClockwise } from '@strapi/icons';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { useNavigate, useLocation } from 'react-router-dom';\n\nimport type { DocumentActionComponent } from '../../content-manager';\n\nconst HistoryAction: DocumentActionComponent = ({ model, document }) => {\n const { formatMessage } = useIntl();\n const [{ query }] = useQueryParams<{ plugins?: Record<string, unknown> }>();\n const navigate = useNavigate();\n const { trackUsage } = useTracking();\n const { pathname } = useLocation();\n const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });\n\n if (!window.strapi.features.isEnabled('cms-content-history')) {\n return null;\n }\n\n const handleOnClick = () => {\n const destination = { pathname: 'history', search: pluginsQueryParams };\n trackUsage('willNavigate', {\n from: pathname,\n to: `${pathname}/${destination.pathname}`,\n });\n navigate(destination);\n };\n\n return {\n icon: <ClockCounterClockwise />,\n label: formatMessage({\n id: 'content-manager.history.document-action',\n defaultMessage: 'Content History',\n }),\n onClick: handleOnClick,\n disabled:\n /**\n * The user is creating a new document.\n * It hasn't been saved yet, so there's no history to go to\n */\n !document ||\n /**\n * The document has been created but the current dimension has never been saved.\n * For example, the user is creating a new locale in an existing document,\n * so there's no history for the document in that locale\n */\n !document.id ||\n /**\n * History is only available for content types created by the user.\n * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,\n * which start with `admin::` or `plugin::`\n */\n !model.startsWith('api::'),\n position: 'header',\n };\n};\n\nHistoryAction.type = 'history';\nHistoryAction.position = 'header';\n\nexport { HistoryAction };\n","/* eslint-disable check-file/no-index */\n\nimport { type ContentManagerPlugin } from '../content-manager';\n\nimport { HistoryAction } from './components/HistoryAction';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\nconst historyAdmin: Partial<Plugin.Config.AdminInput> = {\n bootstrap(app: StrapiApp) {\n const { addDocumentAction } = app.getPlugin('content-manager').apis as {\n addDocumentAction: ContentManagerPlugin['addDocumentAction'];\n };\n\n /**\n * Register the document action here using the public API, and not by setting the action in the\n * Content Manager directly, because this API lets us control the order of the actions array.\n * We want history to be the last non-delete action in the array.\n */\n addDocumentAction((actions) => {\n const indexOfDeleteAction = actions.findIndex((action) => action.type === 'delete');\n actions.splice(indexOfDeleteAction, 0, HistoryAction);\n return actions;\n });\n },\n};\n\nexport { historyAdmin };\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { GetInitData } from '../../../shared/contracts/init';\n\nimport type { ContentManagerLink } from '../hooks/useContentManagerInitData';\n\ninterface AppState {\n collectionTypeLinks: ContentManagerLink[];\n components: GetInitData.Response['data']['components'];\n fieldSizes: GetInitData.Response['data']['fieldSizes'];\n models: GetInitData.Response['data']['contentTypes'];\n singleTypeLinks: ContentManagerLink[];\n isLoading: boolean;\n}\n\nconst initialState: AppState = {\n collectionTypeLinks: [],\n components: [],\n fieldSizes: {},\n models: [],\n singleTypeLinks: [],\n isLoading: true,\n};\n\nconst appSlice = createSlice({\n name: 'app',\n initialState,\n reducers: {\n setInitialData(\n state,\n action: PayloadAction<{\n authorizedCollectionTypeLinks: AppState['collectionTypeLinks'];\n authorizedSingleTypeLinks: AppState['singleTypeLinks'];\n components: AppState['components'];\n contentTypeSchemas: AppState['models'];\n fieldSizes: AppState['fieldSizes'];\n }>\n ) {\n const {\n authorizedCollectionTypeLinks,\n authorizedSingleTypeLinks,\n components,\n contentTypeSchemas,\n fieldSizes,\n } = action.payload;\n state.collectionTypeLinks = authorizedCollectionTypeLinks.filter(\n ({ isDisplayed }) => isDisplayed\n );\n state.singleTypeLinks = authorizedSingleTypeLinks.filter(({ isDisplayed }) => isDisplayed);\n state.components = components;\n state.models = contentTypeSchemas;\n state.fieldSizes = fieldSizes;\n state.isLoading = false;\n },\n },\n});\n\nconst { actions, reducer } = appSlice;\nconst { setInitialData } = actions;\n\nexport { reducer, setInitialData };\nexport type { AppState };\n","import { combineReducers } from '@reduxjs/toolkit';\n\nimport { reducer as appReducer } from './app';\n\nconst reducer = combineReducers({\n app: appReducer,\n});\n\ntype State = ReturnType<typeof reducer>;\n\nexport { reducer };\nexport type { State };\n","import { GetPreviewUrl } from '../../../../shared/contracts/preview';\nimport { contentManagerApi } from '../../services/api';\n\nconst previewApi = contentManagerApi.injectEndpoints({\n endpoints: (builder) => ({\n getPreviewUrl: builder.query<GetPreviewUrl.Response, GetPreviewUrl.Request>({\n query({ query, params }) {\n return {\n url: `/content-manager/preview/url/${params.contentType}`,\n method: 'GET',\n config: {\n params: query,\n },\n };\n },\n }),\n }),\n});\n\nconst { useGetPreviewUrlQuery } = previewApi;\n\nexport { useGetPreviewUrlQuery };\n","import * as React from 'react';\n\nimport { useQueryParams, useTracking, useForm } from '@strapi/admin/strapi-admin';\nimport { Box, Button, Tooltip, type TooltipProps } from '@strapi/design-system';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { Link, useLocation } from 'react-router-dom';\n\nimport { useGetPreviewUrlQuery } from '../services/preview';\n\nimport type { PanelComponent } from '@strapi/content-manager/strapi-admin';\nimport type { UID } from '@strapi/types';\n\ninterface ConditionalTooltipProps {\n isShown: boolean;\n label: TooltipProps['label'];\n children: React.ReactNode;\n}\n\nconst ConditionalTooltip = ({ isShown, label, children }: ConditionalTooltipProps) => {\n if (isShown) {\n return <Tooltip label={label}>{children}</Tooltip>;\n }\n\n return children;\n};\n\nconst PreviewSidePanel: PanelComponent = ({ model, documentId, document }) => {\n const { formatMessage } = useIntl();\n const { trackUsage } = useTracking();\n const { pathname } = useLocation();\n const [{ query }] = useQueryParams();\n const isModified = useForm('PreviewSidePanel', (state) => state.modified);\n\n /**\n * The preview URL isn't used in this component, we just fetch it to know if preview is enabled\n * for the content type. If it's not, the panel is not displayed. If it is, we display a link to\n * /preview, and the URL will already be loaded in the RTK query cache.\n */\n const { data, error } = useGetPreviewUrlQuery({\n params: {\n contentType: model as UID.ContentType,\n },\n query: {\n documentId,\n locale: document?.locale,\n status: document?.status,\n },\n });\n\n if (!data?.data?.url || error) {\n return null;\n }\n\n const trackNavigation = () => {\n // Append /preview to the current URL\n const destinationPathname = pathname.replace(/\\/$/, '') + '/preview';\n trackUsage('willNavigate', { from: pathname, to: destinationPathname });\n };\n\n return {\n title: formatMessage({ id: 'content-manager.preview.panel.title', defaultMessage: 'Preview' }),\n content: (\n <ConditionalTooltip\n label={formatMessage({\n id: 'content-manager.preview.panel.button-disabled-tooltip',\n defaultMessage: 'Please save to open the preview',\n })}\n isShown={isModified}\n >\n <Box cursor=\"not-allowed\" width=\"100%\">\n <Button\n variant=\"tertiary\"\n tag={Link}\n to={{ pathname: 'preview', search: stringify(query, { encode: false }) }}\n onClick={trackNavigation}\n width=\"100%\"\n disabled={isModified}\n pointerEvents={isModified ? 'none' : undefined}\n tabIndex={isModified ? -1 : undefined}\n >\n {formatMessage({\n id: 'content-manager.preview.panel.button',\n defaultMessage: 'Open preview',\n })}\n </Button>\n </Box>\n </ConditionalTooltip>\n ),\n };\n};\n\nexport { PreviewSidePanel };\n","/* eslint-disable check-file/no-index */\n\nimport { PreviewSidePanel } from './components/PreviewSidePanel';\n\nimport type { ContentManagerPlugin } from '../content-manager';\nimport type { PluginDefinition } from '@strapi/admin/strapi-admin';\n\nconst previewAdmin: Partial<PluginDefinition> = {\n bootstrap(app) {\n const contentManagerPluginApis = app.getPlugin('content-manager')\n .apis as ContentManagerPlugin['config']['apis'];\n\n contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);\n },\n};\n\nexport { previewAdmin };\n","import { Feather } from '@strapi/icons';\n\nimport { PLUGIN_ID } from './constants/plugin';\nimport { ContentManagerPlugin } from './content-manager';\nimport { historyAdmin } from './history';\nimport { reducer } from './modules/reducers';\nimport { previewAdmin } from './preview';\nimport { routes } from './router';\nimport { prefixPluginTranslations } from './utils/translations';\n\n// NOTE: we have to preload it to ensure chunks will have it available as global\nimport 'prismjs';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n const cm = new ContentManagerPlugin();\n\n app.addReducers({\n [PLUGIN_ID]: reducer,\n });\n\n app.addMenuLink({\n to: PLUGIN_ID,\n icon: Feather,\n intlLabel: {\n id: `content-manager.plugin.name`,\n defaultMessage: 'Content Manager',\n },\n permissions: [],\n position: 1,\n });\n\n app.router.addRoute({\n path: 'content-manager/*',\n lazy: async () => {\n const { Layout } = await import('./layout');\n\n return {\n Component: Layout,\n };\n },\n children: routes,\n });\n\n app.registerPlugin(cm.config);\n },\n bootstrap(app: any) {\n if (typeof historyAdmin.bootstrap === 'function') {\n historyAdmin.bootstrap(app);\n }\n if (typeof previewAdmin.bootstrap === 'function') {\n previewAdmin.bootstrap(app);\n }\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, PLUGIN_ID),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n\nexport * from './exports';\n"],"names":["PLUGIN_ID","PERMISSIONS","INJECTION_ZONES","editView","informations","listView","actions","deleteModalAdditionalInfos","publishModalAdditionalInfos","unpublishModalAdditionalInfos","InjectionZone","area","props","components","useInjectionZone","_jsx","_Fragment","map","component","Component","name","getPlugin","useStrapiApp","state","contentManagerPlugin","page","position","split","getInjectedComponents","ID","CREATED_BY_ATTRIBUTE_NAME","UPDATED_BY_ATTRIBUTE_NAME","CREATOR_FIELDS","PUBLISHED_BY_ATTRIBUTE_NAME","CREATED_AT_ATTRIBUTE_NAME","UPDATED_AT_ATTRIBUTE_NAME","PUBLISHED_AT_ATTRIBUTE_NAME","DOCUMENT_META_FIELDS","ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD","SINGLE_TYPES","COLLECTION_TYPES","DocumentRBACProvider","useDocumentRBAC","createContext","canCreate","canCreateFields","canDelete","canPublish","canRead","canReadFields","canUpdate","canUpdateFields","canUserAction","isLoading","DocumentRBAC","children","permissions","slug","useParams","Error","rawQuery","useQueryParams","userPermissions","useAuth","contentTypePermissions","React","useMemo","filter","permission","subject","reduce","acc","action","slice","allowedActions","useRBAC","undefined","extractAndDedupeFields","create","read","update","useCallback","fieldName","fieldsUserCanAction","fieldType","removeNumericalStrings","componentFieldNames","field","length","some","includes","join","Page","Loading","flatMap","properties","fields","index","arr","indexOf","item","isNaN","Number","BLOCK_LIST_ATTRIBUTE_KEYS","traverseData","predicate","transform","schema","data","traverse","datum","attributes","Object","entries","key","value","attribute","type","repeatable","componentValue","componentData","dynamicZoneValue","__component","removeProhibitedFields","prohibitedFields","prepareRelations","connect","disconnect","prepareTempKeys","Array","isArray","keys","generateNKeysBetween","__temp_key__","removeFieldsThatDontExistOnSchema","schemaKeys","dataKeys","keysToRemove","revisedData","structuredClone","removeNullValues","transformDocument","document","transformations","pipe","createDefaultForm","contentType","traverseSchema","default","required","defaultComponentForm","min","fill","contentManagerApi","adminApi","enhanceEndpoints","addTagTypes","documentApi","injectEndpoints","overrideExisting","endpoints","builder","autoCloneDocument","mutation","query","model","sourceId","url","method","config","params","invalidatesTags","_result","error","id","cloneDocument","_error","createDocument","result","transformResponse","response","meta","arg","availableStatus","availableLocales","deleteDocument","collectionType","documentId","deleteManyDocuments","body","_res","discardDocument","getAllDocuments","stringify","encode","providesTags","results","getDraftRelationCount","getDocument","queryFn","_api","_extraOpts","baseQuery","res","getManyDraftRelationCount","publishDocument","publishManyDocuments","documentIds","updateDocument","onQueryStarted","patch","dispatch","queryFulfilled","patchResult","util","updateQueryData","draft","assign","undo","unpublishDocument","unpublishManyDocuments","useAutoCloneDocumentMutation","useCloneDocumentMutation","useCreateDocumentMutation","useDeleteDocumentMutation","useDeleteManyDocumentsMutation","useDiscardDocumentMutation","useGetAllDocumentsQuery","useLazyGetDocumentQuery","useGetDocumentQuery","useLazyGetDraftRelationCountQuery","useGetManyDraftRelationCountQuery","usePublishDocumentMutation","usePublishManyDocumentsMutation","useUpdateDocumentMutation","useUnpublishDocumentMutation","useUnpublishManyDocumentsMutation","buildValidParams","plugins","_","validQueryParams","values","current","isBaseQueryError","arrayValidator","options","message","translatedErrors","test","status","createYupSchema","createModelSchema","yup","object","shape","validations","addNullableValidation","addRequiredValidation","addMinLengthValidation","addMaxLengthValidation","addMinValidation","addMaxValidation","addRegexValidation","fn","transformSchema","array","of","nullable","lazy","validation","string","oneOf","concat","mixed","number","createAttributeSchema","matches","boolean","json","email","enum","JSON","err","parse","nullableSchema","minLength","isInteger","maxLength","max","toInteger","val","num","regex","RegExp","defaultMessage","excludeEmptyString","initApi","getInitialData","useGetInitialDataQuery","useContentTypeSchema","toggleNotification","useNotification","_unstableFormatAPIError","formatAPIError","useAPIErrorHandler","isFetching","contentTypes","find","ct","uid","componentsByKey","extractContentTypeComponents","useEffect","schemas","allComponents","getComponents","componentAttributes","push","componentUid","componentUids","uniqueComponentUids","Set","HOOKS","INJECT_COLUMN_IN_TABLE","MUTATE_COLLECTION_TYPES_LINKS","MUTATE_EDIT_VIEW_LAYOUT","MUTATE_SINGLE_TYPES_LINKS","contentTypesApi","getContentTypeConfiguration","getAllContentTypeSettings","updateContentTypeConfiguration","useGetContentTypeConfigurationQuery","useGetAllContentTypeSettingsQuery","useUpdateContentTypeConfigurationMutation","checkIfAttributeIsDisplayable","relation","toLowerCase","getMainField","mainFieldName","mainFieldType","targetModel","DEFAULT_SETTINGS","bulkable","filterable","searchable","pagination","defaultSortBy","defaultSortOrder","mainField","pageSize","useDocumentLayout","useDocument","skip","runHookWaterfall","isLoadingSchemas","isLoadingConfigs","isFetchingConfigs","editLayout","formatEditLayout","layout","metadatas","settings","listLayout","formatListLayout","edit","list","useDocLayout","useDoc","currentPanelIndex","panelledEditAttributes","convertEditLayoutToFieldLayouts","layouts","configurations","panels","row","componentEditAttributes","configuration","icon","info","displayName","editMetadatas","metadata","pluginOptions","rows","disabled","editable","hint","description","label","placeholder","size","unique","visible","listMetadatas","listAttributes","convertListLayoutToFieldLayouts","columns","sortable","args","opts","formatMessage","useIntl","currentData","isLoadingDocument","isFetchingDocument","isLoadingSchema","isSingleType","kind","getTitle","validationSchema","validate","validateSync","abortEarly","strict","ValidationError","getYupValidationErrors","getInitialFormValues","isCreatingDocument","form","hasError","origin","returnId","useContentManagerContext","isLoadingDoc","useForm","isCreatingEntry","hasDraftAndPublish","draftAndPublish","prefixPluginTranslations","trad","pluginId","getTranslation","DEFAULT_UNEXPECTED_ERROR_MSG","useDocumentActions","trackUsage","useTracking","navigate","useNavigate","setCurrentStep","useGuidedTour","_delete","trackerProperty","deleteMany","title","discard","publish","publishMany","unpublish","discardDraft","unpublishMany","autoClone","clone","_id","restBody","relative","getDoc","delete","ProtectedHistoryPage","then","mod","routes","path","ProtectedPreviewPage","ProtectedEditViewPage","ProtectedListViewPage","ProtectedListConfiguration","ProtectedEditConfigurationPage","ProtectedComponentConfigurationPage","NoPermissions","NoContentType","CollectionTypePages","Navigate","to","CLONE_RELATIVE_PATH","CLONE_PATH","LIST_RELATIVE_PATH","LIST_PATH","element","historyRoutes","previewRoutes","DocumentActions","primaryAction","secondaryAction","restActions","positions","_jsxs","Flex","direction","gap","alignItems","width","DocumentActionButton","variant","DocumentActionsMenu","dialogId","setDialogId","useState","handleClick","e","onClick","dialog","muteDialog","content","timeout","onClose","preventDefault","handleClose","Button","flex","startIcon","justifyContent","paddingTop","paddingBottom","DocumentActionConfirmDialog","isOpen","DocumentActionModal","onModalClose","MenuItem","styled","Menu","Item","theme","isVariantDanger","isDisabled","colors","danger100","setIsOpen","every","Root","open","onOpenChange","Trigger","endIcon","paddingLeft","paddingRight","More","aria-hidden","focusable","VisuallyHidden","tag","Content","maxHeight","popoverPlacement","onSelect","display","color","convertActionVariantToColor","convertActionVariantToIconColor","Fragment","onCancel","onConfirm","handleConfirm","Dialog","Header","Body","Footer","Cancel","fullWidth","footer","Modal","Title","transformData","apiData","mapValues","PublishAction","activeTab","_unstableFormatValidationErrors","formatValidationErrors","isListView","useMatch","isCloning","countDraftRelations","isLoadingDraftRelations","isError","isErrorDraftRelations","useGetDraftRelationCountQuery","localCountOfDraftRelations","setLocalCountOfDraftRelations","serverCountOfDraftRelations","setServerCountOfDraftRelations","modified","setSubmitting","isSubmitting","setErrors","formValues","localDraftRelations","extractDraftRelations","relations","forEach","add","traverseAndExtract","fetchDraftRelationsCount","isDocumentPublished","doc","performPublish","errors","pathname","search","totalDraftRelations","enableDraftRelationsCount","hasDraftRelations","count","UpdateAction","cloneMatch","resetForm","handleUpdate","replace","handleKeyDown","metaKey","ctrlKey","window","addEventListener","removeEventListener","UNPUBLISH_DRAFT_OPTIONS","KEEP","DISCARD","UnpublishAction","shouldKeepDraft","setShouldKeepDraft","isDocumentModified","handleChange","Cross","console","WarningCircle","height","Typography","textAlign","Radio","Group","defaultValue","aria-label","onValueChange","checked","DiscardAction","DEFAULT_ACTIONS","intervals","RelativeTime","forwardRef","timestamp","customIntervals","restProps","forwardedRef","formatRelativeTime","formatDate","formatTime","interval","intervalToDuration","start","end","Date","now","unit","intervalUnit","relativeTime","isPast","customInterval","custom","threshold","displayText","text","numeric","time","ref","dateTime","toISOString","role","getDisplayName","firstname","lastname","username","trim","capitalise","str","charAt","toUpperCase","DocumentStatus","statusVariant","Status","fontWeight","isCreating","documentTitle","BackButton","fallback","HeaderToolbar","Box","marginTop","DescriptionComponentRenderer","descriptions","apis","getHeaderActions","HeaderActions","getDocumentActions","headerActions","Information","createAndUpdateDocument","publishedAt","creator","updator","information","isDisplayed","isAnonymous","author","borderWidth","borderStyle","borderColor","padding","marginLeft","marginRight","textColor","SingleSelect","onChange","option","SingleSelectOption","IconButton","HeaderActionDialog","ConfigureTheViewAction","ListPlus","EditTheModelAction","Pencil","DeleteAction","listViewPathMatch","deleteAction","isLocalized","locale","Trash","DEFAULT_HEADER_ACTIONS","Panels","getEditViewSidePanels","Panel","ActionsPanel","ActionsPanelContent","aria-labelledby","background","hasRadius","shadow","textTransform","ConfirmBulkActionDialog","onToggleDialog","dialogBody","endAction","BoldChunk","chunks","ConfirmDialogPublishAll","isConfirmButtonLoading","selectedEntries","useTable","selectedRows","entry","i18n","b","entities","em","Emphasis","Check","loading","TypographyMaxWidth","TableComponent","RawTable","neutral150","spaces","formatErrorMessages","parentKey","messages","currentKey","EntryValidationText","validationErrors","validationErrorsMessages","CrossCircle","Tooltip","ellipsis","CheckCircle","ArrowsCounterClockwise","TABLE_HEADERS","SelectedEntriesTableContent","isPublishing","rowsToDisplay","entriesToPublish","useLocation","shouldDisplayMainField","Table","Head","HeaderCheckboxCell","head","HeaderCell","Row","CheckboxCell","Cell","maxWidth","Loader","small","Link","from","target","PublicationStatusSummary","PublicationStatusGrid","entriesReadyToPublishCount","entriesPublishedCount","entriesModifiedCount","entriesWithErrorsCount","colCount","rowCount","Tbody","Tr","Td","SelectedEntriesModalContent","listViewSelectedEntries","toggleModal","setListViewSelectedDocuments","refetch","toString","sort","filters","$in","selectFromResult","restRes","isDialogOpen","setIsDialogOpen","bulkPublishAction","isSubmittingForm","selectedEntry","selectedEntriesWithErrorsCount","selectedEntriesPublishedCount","selectedEntriesModifiedCount","selectedEntriesWithNoErrorsCount","toggleDialog","prev","handleConfirmBulkPublish","unpublishedEntries","documents","hasPublishPermission","showPublishButton","selectRow","refetchList","invalidateTags","actionType","defaultSelectedRows","headers","BulkActionsRenderer","getBulkActions","hasI18nEnabled","Boolean","hasDeletePermission","bulkDeleteAction","handleConfirmBulkDelete","hasDraftAndPublishEnabled","bulkUnpublishAction","handleConfirmBulkUnpublish","showUnpublishButton","confirmButton","DEFAULT_BULK_ACTIONS","AutoCloneFailureModalBody","getDefaultErrorMessage","reason","fieldPath","pathSegment","ChevronRight","style","margin","TableActions","tableRowActions","EditAction","StyledPencil","CloneAction","setProhibitedFields","StyledDuplicate","details","LinkButton","NavLink","Duplicate","DEFAULT_TABLE_ROW_ACTIONS","ContentManagerPlugin","addEditViewSidePanel","editViewSidePanels","getPrintableType","addDocumentAction","documentActions","addDocumentHeaderAction","addBulkAction","bulkActions","injectionZones","bind","flat","constructor","nativeType","HistoryAction","pluginsQueryParams","strapi","features","isEnabled","handleOnClick","destination","ClockCounterClockwise","startsWith","historyAdmin","bootstrap","app","indexOfDeleteAction","findIndex","splice","initialState","collectionTypeLinks","fieldSizes","models","singleTypeLinks","appSlice","createSlice","reducers","setInitialData","authorizedCollectionTypeLinks","authorizedSingleTypeLinks","contentTypeSchemas","payload","reducer","combineReducers","appReducer","previewApi","getPreviewUrl","useGetPreviewUrlQuery","ConditionalTooltip","isShown","PreviewSidePanel","isModified","trackNavigation","destinationPathname","cursor","pointerEvents","tabIndex","previewAdmin","contentManagerPluginApis","register","cm","addReducers","addMenuLink","Feather","intlLabel","router","addRoute","Layout","registerPlugin","registerTrads","locales","importedTrads","Promise","all","catch","resolve"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAMA,SAAY,GAAA,iBAAA;AAElB,MAAMC,WAAc,GAAA;AAClB,IAAA,yCAAA;AACA,IAAA,uCAAA;AACA,IAAA,yCAAA;AACA,IAAA,yCAAA;AACA,IAAA;AACD;;ACJD,MAAMC,eAAkB,GAAA;IACtBC,QAAU,EAAA;AAAEC,QAAAA,YAAAA,EAAc,EAAE;AAAE,QAAA,aAAA,EAAe;AAAG,KAAA;IAChDC,QAAU,EAAA;AACRC,QAAAA,OAAAA,EAAS,EAAE;AACXC,QAAAA,0BAAAA,EAA4B,EAAE;AAC9BC,QAAAA,2BAAAA,EAA6B,EAAE;AAC/BC,QAAAA,6BAAAA,EAA+B;AACjC;AACF,CAAA;AAgCA;;;;AAIC,UACKC,aAAgB,GAAA,CAAC,EAAEC,IAAI,EAAE,GAAGC,KAA4D,EAAA,GAAA;AAC5F,IAAA,MAAMC,aAAaC,gBAAiBH,CAAAA,IAAAA,CAAAA;IAEp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