@strapi/content-manager 0.0.0-experimental.baa6cf22298e591b4d52d8e59c60406d7a9f137f → 0.0.0-experimental.bd712ad3930045f4a5d2144c119e0b7856e97fc4

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.
Files changed (95) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js → ComponentConfigurationPage-BWQv6yRj.js} +3 -3
  3. package/dist/_chunks/{ComponentConfigurationPage-DiigqkCf.js.map → ComponentConfigurationPage-BWQv6yRj.js.map} +1 -1
  4. package/dist/_chunks/{ComponentConfigurationPage-CYqQv0ne.mjs → ComponentConfigurationPage-C7ImeKGM.mjs} +3 -3
  5. package/dist/_chunks/{ComponentConfigurationPage-CYqQv0ne.mjs.map → ComponentConfigurationPage-C7ImeKGM.mjs.map} +1 -1
  6. package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js → EditConfigurationPage-CEGwxV-L.js} +3 -3
  7. package/dist/_chunks/{EditConfigurationPage-BeeGw2RI.js.map → EditConfigurationPage-CEGwxV-L.js.map} +1 -1
  8. package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs → EditConfigurationPage-MItFGzT9.mjs} +3 -3
  9. package/dist/_chunks/{EditConfigurationPage-BArY-b8_.mjs.map → EditConfigurationPage-MItFGzT9.mjs.map} +1 -1
  10. package/dist/_chunks/{EditViewPage-DZPDqo_G.js → EditViewPage-CmMi2Xsn.js} +45 -45
  11. package/dist/_chunks/EditViewPage-CmMi2Xsn.js.map +1 -0
  12. package/dist/_chunks/{EditViewPage-B8ETGsFo.mjs → EditViewPage-DhmAg0NK.mjs} +46 -46
  13. package/dist/_chunks/EditViewPage-DhmAg0NK.mjs.map +1 -0
  14. package/dist/_chunks/{Field-DnJMS8cB.js → Field-1DLtcLAI.js} +416 -136
  15. package/dist/_chunks/Field-1DLtcLAI.js.map +1 -0
  16. package/dist/_chunks/{Field-Dn4ThnFB.mjs → Field-Cs62u5pl.mjs} +417 -137
  17. package/dist/_chunks/Field-Cs62u5pl.mjs.map +1 -0
  18. package/dist/_chunks/{Form-DiTmWq2k.js → Form-CqFA7F_V.js} +25 -26
  19. package/dist/_chunks/Form-CqFA7F_V.js.map +1 -0
  20. package/dist/_chunks/{Form-DY721B6y.mjs → Form-zYHtzGUX.mjs} +27 -28
  21. package/dist/_chunks/Form-zYHtzGUX.mjs.map +1 -0
  22. package/dist/_chunks/{History-DShoVAh0.js → History-BblwXv7-.js} +123 -29
  23. package/dist/_chunks/History-BblwXv7-.js.map +1 -0
  24. package/dist/_chunks/{History-CwWN_uNp.mjs → History-DalgFQ3D.mjs} +124 -30
  25. package/dist/_chunks/History-DalgFQ3D.mjs.map +1 -0
  26. package/dist/_chunks/{ListConfigurationPage-COIRGF5b.js → ListConfigurationPage-Cpy4QqNd.js} +48 -47
  27. package/dist/_chunks/ListConfigurationPage-Cpy4QqNd.js.map +1 -0
  28. package/dist/_chunks/{ListConfigurationPage-D062TiTL.mjs → ListConfigurationPage-DWy-vRzs.mjs} +49 -49
  29. package/dist/_chunks/ListConfigurationPage-DWy-vRzs.mjs.map +1 -0
  30. package/dist/_chunks/{ListViewPage-BeHTsIr5.mjs → ListViewPage-BkAwIW9s.mjs} +74 -70
  31. package/dist/_chunks/ListViewPage-BkAwIW9s.mjs.map +1 -0
  32. package/dist/_chunks/{ListViewPage-CFuXPZ_r.js → ListViewPage-DFjn1DNW.js} +72 -68
  33. package/dist/_chunks/ListViewPage-DFjn1DNW.js.map +1 -0
  34. package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs → NoContentTypePage-B9BCNNdL.mjs} +2 -2
  35. package/dist/_chunks/{NoContentTypePage-B_KLijrG.mjs.map → NoContentTypePage-B9BCNNdL.mjs.map} +1 -1
  36. package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js → NoContentTypePage-C-3ykoxs.js} +2 -2
  37. package/dist/_chunks/{NoContentTypePage-rdH0Zp0A.js.map → NoContentTypePage-C-3ykoxs.js.map} +1 -1
  38. package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs → NoPermissionsPage-Bt_HWGat.mjs} +2 -2
  39. package/dist/_chunks/{NoPermissionsPage-BPU-v48V.mjs.map → NoPermissionsPage-Bt_HWGat.mjs.map} +1 -1
  40. package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js → NoPermissionsPage-DKLmDZnZ.js} +2 -2
  41. package/dist/_chunks/{NoPermissionsPage-D8gbX1Y_.js.map → NoPermissionsPage-DKLmDZnZ.js.map} +1 -1
  42. package/dist/_chunks/{Relations-Bbz90ZWv.mjs → Relations-CJmTbZ8T.mjs} +3 -3
  43. package/dist/_chunks/{Relations-Bbz90ZWv.mjs.map → Relations-CJmTbZ8T.mjs.map} +1 -1
  44. package/dist/_chunks/{Relations-wHyjWWT5.js → Relations-CrxfoH2n.js} +3 -3
  45. package/dist/_chunks/{Relations-wHyjWWT5.js.map → Relations-CrxfoH2n.js.map} +1 -1
  46. package/dist/_chunks/{en-Dzv55oQw.mjs → en-Ux26r5pl.mjs} +4 -1
  47. package/dist/_chunks/{en-Dzv55oQw.mjs.map → en-Ux26r5pl.mjs.map} +1 -1
  48. package/dist/_chunks/{en-BN1bvFK7.js → en-fbKQxLGn.js} +4 -1
  49. package/dist/_chunks/{en-BN1bvFK7.js.map → en-fbKQxLGn.js.map} +1 -1
  50. package/dist/_chunks/{index-BRHpg0az.js → index-Buwn78Rt.js} +189 -296
  51. package/dist/_chunks/index-Buwn78Rt.js.map +1 -0
  52. package/dist/_chunks/{index-Dv4oDn11.mjs → index-D1344xdw.mjs} +218 -325
  53. package/dist/_chunks/index-D1344xdw.mjs.map +1 -0
  54. package/dist/_chunks/{layout-hInnLBbA.mjs → layout-ChVuUpa1.mjs} +22 -17
  55. package/dist/_chunks/layout-ChVuUpa1.mjs.map +1 -0
  56. package/dist/_chunks/{layout-pZc2Q3bK.js → layout-DRuJUpas.js} +21 -16
  57. package/dist/_chunks/layout-DRuJUpas.js.map +1 -0
  58. package/dist/_chunks/{relations-BcPI8XhI.mjs → relations-B-deMCy4.mjs} +2 -2
  59. package/dist/_chunks/{relations-BcPI8XhI.mjs.map → relations-B-deMCy4.mjs.map} +1 -1
  60. package/dist/_chunks/{relations-CVE30dYt.js → relations-DuoUwyJr.js} +2 -2
  61. package/dist/_chunks/{relations-CVE30dYt.js.map → relations-DuoUwyJr.js.map} +1 -1
  62. package/dist/admin/index.js +1 -1
  63. package/dist/admin/index.mjs +8 -8
  64. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  65. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +7 -3
  66. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  67. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +2 -10
  68. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  69. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  70. package/dist/server/index.js +26 -17
  71. package/dist/server/index.js.map +1 -1
  72. package/dist/server/index.mjs +26 -17
  73. package/dist/server/index.mjs.map +1 -1
  74. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  75. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  76. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  77. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  78. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  79. package/package.json +8 -8
  80. package/dist/_chunks/EditViewPage-B8ETGsFo.mjs.map +0 -1
  81. package/dist/_chunks/EditViewPage-DZPDqo_G.js.map +0 -1
  82. package/dist/_chunks/Field-Dn4ThnFB.mjs.map +0 -1
  83. package/dist/_chunks/Field-DnJMS8cB.js.map +0 -1
  84. package/dist/_chunks/Form-DY721B6y.mjs.map +0 -1
  85. package/dist/_chunks/Form-DiTmWq2k.js.map +0 -1
  86. package/dist/_chunks/History-CwWN_uNp.mjs.map +0 -1
  87. package/dist/_chunks/History-DShoVAh0.js.map +0 -1
  88. package/dist/_chunks/ListConfigurationPage-COIRGF5b.js.map +0 -1
  89. package/dist/_chunks/ListConfigurationPage-D062TiTL.mjs.map +0 -1
  90. package/dist/_chunks/ListViewPage-BeHTsIr5.mjs.map +0 -1
  91. package/dist/_chunks/ListViewPage-CFuXPZ_r.js.map +0 -1
  92. package/dist/_chunks/index-BRHpg0az.js.map +0 -1
  93. package/dist/_chunks/index-Dv4oDn11.mjs.map +0 -1
  94. package/dist/_chunks/layout-hInnLBbA.mjs.map +0 -1
  95. package/dist/_chunks/layout-pZc2Q3bK.js.map +0 -1
@@ -219,6 +219,7 @@ const contentManagerApi = strapiAdmin.adminApi.enhanceEndpoints({
219
219
  ]
220
220
  });
221
221
  const documentApi = contentManagerApi.injectEndpoints({
222
+ overrideExisting: true,
222
223
  endpoints: (builder) => ({
223
224
  autoCloneDocument: builder.mutation({
224
225
  query: ({ model, sourceId, query }) => ({
@@ -620,11 +621,11 @@ const createAttributeSchema = (attribute) => {
620
621
  }
621
622
  };
622
623
  const addRequiredValidation = (attribute) => (schema) => {
623
- if (attribute.required) {
624
- return schema.required({
625
- id: strapiAdmin.translatedErrors.required.id,
626
- defaultMessage: "This field is required."
627
- });
624
+ if ((attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") && attribute.required && "min" in schema) {
625
+ return schema.min(1, strapiAdmin.translatedErrors.required);
626
+ }
627
+ if (attribute.required && attribute.type !== "relation") {
628
+ return schema.required(strapiAdmin.translatedErrors.required);
628
629
  }
629
630
  return schema?.nullable ? schema.nullable() : (
630
631
  // In some cases '.nullable' will not be available on the schema.
@@ -658,6 +659,28 @@ const addMaxLengthValidation = (attribute) => (schema) => {
658
659
  const addMinValidation = (attribute) => (schema) => {
659
660
  if ("min" in attribute) {
660
661
  const min = toInteger(attribute.min);
662
+ if (attribute.type === "component" && attribute.repeatable || attribute.type === "dynamiczone") {
663
+ if (!attribute.required && "test" in schema && min) {
664
+ return schema.test(
665
+ "custom-min",
666
+ {
667
+ ...strapiAdmin.translatedErrors.min,
668
+ values: {
669
+ min: attribute.min
670
+ }
671
+ },
672
+ (value) => {
673
+ if (!value) {
674
+ return true;
675
+ }
676
+ if (Array.isArray(value) && value.length === 0) {
677
+ return true;
678
+ }
679
+ return value.length >= min;
680
+ }
681
+ );
682
+ }
683
+ }
661
684
  if ("min" in schema && min) {
662
685
  return schema.min(min, {
663
686
  ...strapiAdmin.translatedErrors.min,
@@ -784,7 +807,10 @@ const useDocument = (args, opts) => {
784
807
  isLoading: isLoadingDocument,
785
808
  isFetching: isFetchingDocument,
786
809
  error
787
- } = useGetDocumentQuery(args, opts);
810
+ } = useGetDocumentQuery(args, {
811
+ ...opts,
812
+ skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
813
+ });
788
814
  const { components, schema, isLoading: isLoadingSchema } = useContentTypeSchema(args.model);
789
815
  React__namespace.useEffect(() => {
790
816
  if (error) {
@@ -948,12 +974,13 @@ const useDocumentActions = () => {
948
974
  );
949
975
  const [discardDocument] = useDiscardDocumentMutation();
950
976
  const discard = React__namespace.useCallback(
951
- async ({ collectionType, model, documentId }) => {
977
+ async ({ collectionType, model, documentId, params }) => {
952
978
  try {
953
979
  const res = await discardDocument({
954
980
  collectionType,
955
981
  model,
956
- documentId
982
+ documentId,
983
+ params
957
984
  });
958
985
  if ("error" in res) {
959
986
  toggleNotification({
@@ -1285,7 +1312,7 @@ const useDocumentActions = () => {
1285
1312
  };
1286
1313
  };
1287
1314
  const ProtectedHistoryPage = React.lazy(
1288
- () => Promise.resolve().then(() => require("./History-DShoVAh0.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1315
+ () => Promise.resolve().then(() => require("./History-BblwXv7-.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1289
1316
  );
1290
1317
  const routes$1 = [
1291
1318
  {
@@ -1298,31 +1325,31 @@ const routes$1 = [
1298
1325
  }
1299
1326
  ];
1300
1327
  const ProtectedEditViewPage = React.lazy(
1301
- () => Promise.resolve().then(() => require("./EditViewPage-DZPDqo_G.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1328
+ () => Promise.resolve().then(() => require("./EditViewPage-CmMi2Xsn.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1302
1329
  );
1303
1330
  const ProtectedListViewPage = React.lazy(
1304
- () => Promise.resolve().then(() => require("./ListViewPage-CFuXPZ_r.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1331
+ () => Promise.resolve().then(() => require("./ListViewPage-DFjn1DNW.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1305
1332
  );
1306
1333
  const ProtectedListConfiguration = React.lazy(
1307
- () => Promise.resolve().then(() => require("./ListConfigurationPage-COIRGF5b.js")).then((mod) => ({
1334
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-Cpy4QqNd.js")).then((mod) => ({
1308
1335
  default: mod.ProtectedListConfiguration
1309
1336
  }))
1310
1337
  );
1311
1338
  const ProtectedEditConfigurationPage = React.lazy(
1312
- () => Promise.resolve().then(() => require("./EditConfigurationPage-BeeGw2RI.js")).then((mod) => ({
1339
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-CEGwxV-L.js")).then((mod) => ({
1313
1340
  default: mod.ProtectedEditConfigurationPage
1314
1341
  }))
1315
1342
  );
1316
1343
  const ProtectedComponentConfigurationPage = React.lazy(
1317
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-DiigqkCf.js")).then((mod) => ({
1344
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-BWQv6yRj.js")).then((mod) => ({
1318
1345
  default: mod.ProtectedComponentConfigurationPage
1319
1346
  }))
1320
1347
  );
1321
1348
  const NoPermissions = React.lazy(
1322
- () => Promise.resolve().then(() => require("./NoPermissionsPage-D8gbX1Y_.js")).then((mod) => ({ default: mod.NoPermissions }))
1349
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-DKLmDZnZ.js")).then((mod) => ({ default: mod.NoPermissions }))
1323
1350
  );
1324
1351
  const NoContentType = React.lazy(
1325
- () => Promise.resolve().then(() => require("./NoContentTypePage-rdH0Zp0A.js")).then((mod) => ({ default: mod.NoContentType }))
1352
+ () => Promise.resolve().then(() => require("./NoContentTypePage-C-3ykoxs.js")).then((mod) => ({ default: mod.NoContentType }))
1326
1353
  );
1327
1354
  const CollectionTypePages = () => {
1328
1355
  const { collectionType } = reactRouterDom.useParams();
@@ -1529,7 +1556,7 @@ const DocumentActionsMenu = ({
1529
1556
  display: "block",
1530
1557
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: [
1531
1558
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
1532
- action.icon,
1559
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
1533
1560
  action.label
1534
1561
  ] }),
1535
1562
  action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1590,6 +1617,18 @@ const convertActionVariantToColor = (variant = "secondary") => {
1590
1617
  return "primary600";
1591
1618
  }
1592
1619
  };
1620
+ const convertActionVariantToIconColor = (variant = "secondary") => {
1621
+ switch (variant) {
1622
+ case "danger":
1623
+ return "danger600";
1624
+ case "secondary":
1625
+ return "neutral500";
1626
+ case "success":
1627
+ return "success600";
1628
+ default:
1629
+ return "primary600";
1630
+ }
1631
+ };
1593
1632
  const DocumentActionConfirmDialog = ({
1594
1633
  onClose,
1595
1634
  onCancel,
@@ -1612,22 +1651,20 @@ const DocumentActionConfirmDialog = ({
1612
1651
  }
1613
1652
  onClose();
1614
1653
  };
1615
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog, { isOpen, title, onClose: handleClose, children: [
1616
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.DialogBody, { children: content }),
1617
- /* @__PURE__ */ jsxRuntime.jsx(
1618
- designSystem.DialogFooter,
1619
- {
1620
- startAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleClose, variant: "tertiary", children: formatMessage({
1621
- id: "app.components.Button.cancel",
1622
- defaultMessage: "Cancel"
1623
- }) }),
1624
- endAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, children: formatMessage({
1625
- id: "app.components.Button.confirm",
1626
- defaultMessage: "Confirm"
1627
- }) })
1628
- }
1629
- )
1630
- ] });
1654
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
1655
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: title }),
1656
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: content }),
1657
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
1658
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", children: formatMessage({
1659
+ id: "app.components.Button.cancel",
1660
+ defaultMessage: "Cancel"
1661
+ }) }) }),
1662
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, children: formatMessage({
1663
+ id: "app.components.Button.confirm",
1664
+ defaultMessage: "Confirm"
1665
+ }) })
1666
+ ] })
1667
+ ] }) });
1631
1668
  };
1632
1669
  const DocumentActionModal = ({
1633
1670
  isOpen,
@@ -1637,34 +1674,17 @@ const DocumentActionModal = ({
1637
1674
  content: Content,
1638
1675
  onModalClose
1639
1676
  }) => {
1640
- const id = React__namespace.useId();
1641
- if (!isOpen) {
1642
- return null;
1643
- }
1644
1677
  const handleClose = () => {
1645
1678
  if (onClose) {
1646
1679
  onClose();
1647
1680
  }
1648
1681
  onModalClose();
1649
1682
  };
1650
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.ModalLayout, { borderRadius: "4px", overflow: "hidden", onClose: handleClose, labelledBy: id, children: [
1651
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id, children: title }) }),
1652
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalBody, { children: typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : Content }),
1653
- /* @__PURE__ */ jsxRuntime.jsx(
1654
- designSystem.Box,
1655
- {
1656
- paddingTop: 4,
1657
- paddingBottom: 4,
1658
- paddingLeft: 5,
1659
- paddingRight: 5,
1660
- borderWidth: "1px 0 0 0",
1661
- borderStyle: "solid",
1662
- borderColor: "neutral150",
1663
- background: "neutral100",
1664
- children: typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
1665
- }
1666
- )
1667
- ] });
1683
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Content, { children: [
1684
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Title, { children: title }) }),
1685
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : Content }),
1686
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Footer, { children: typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer })
1687
+ ] }) });
1668
1688
  };
1669
1689
  const PublishAction$1 = ({
1670
1690
  activeTab,
@@ -1847,10 +1867,13 @@ const UpdateAction = ({
1847
1867
  document
1848
1868
  );
1849
1869
  if ("data" in res && collectionType !== SINGLE_TYPES) {
1850
- navigate({
1851
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1852
- search: rawQuery
1853
- });
1870
+ navigate(
1871
+ {
1872
+ pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1873
+ search: rawQuery
1874
+ },
1875
+ { replace: true }
1876
+ );
1854
1877
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1855
1878
  setErrors(formatValidationErrors(res.error));
1856
1879
  }
@@ -1882,10 +1905,8 @@ const UnpublishAction$1 = ({
1882
1905
  const { toggleNotification } = strapiAdmin.useNotification();
1883
1906
  const [shouldKeepDraft, setShouldKeepDraft] = React__namespace.useState(true);
1884
1907
  const isDocumentModified = document?.status === "modified";
1885
- const handleChange = (e) => {
1886
- if ("value" in e.target) {
1887
- setShouldKeepDraft(e.target.value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
1888
- }
1908
+ const handleChange = (value) => {
1909
+ setShouldKeepDraft(value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
1889
1910
  };
1890
1911
  if (!schema?.options?.draftAndPublish) {
1891
1912
  return null;
@@ -1935,40 +1956,24 @@ const UnpublishAction$1 = ({
1935
1956
  }) })
1936
1957
  ] }),
1937
1958
  /* @__PURE__ */ jsxRuntime.jsxs(
1938
- designSystem.Flex,
1959
+ designSystem.Radio.Group,
1939
1960
  {
1940
- onChange: handleChange,
1941
- direction: "column",
1942
- alignItems: "flex-start",
1943
- tag: "fieldset",
1944
- borderWidth: 0,
1945
- gap: 3,
1961
+ defaultValue: UNPUBLISH_DRAFT_OPTIONS.KEEP,
1962
+ name: "discard-options",
1963
+ "aria-label": formatMessage({
1964
+ id: "content-manager.actions.unpublish.dialog.radio-label",
1965
+ defaultMessage: "Choose an option to unpublish the document."
1966
+ }),
1967
+ onValueChange: handleChange,
1946
1968
  children: [
1947
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { tag: "legend" }),
1948
- /* @__PURE__ */ jsxRuntime.jsx(
1949
- designSystem.Radio,
1950
- {
1951
- checked: shouldKeepDraft,
1952
- value: UNPUBLISH_DRAFT_OPTIONS.KEEP,
1953
- name: "discard-options",
1954
- children: formatMessage({
1955
- id: "content-manager.actions.unpublish.dialog.option.keep-draft",
1956
- defaultMessage: "Keep draft"
1957
- })
1958
- }
1959
- ),
1960
- /* @__PURE__ */ jsxRuntime.jsx(
1961
- designSystem.Radio,
1962
- {
1963
- checked: !shouldKeepDraft,
1964
- value: UNPUBLISH_DRAFT_OPTIONS.DISCARD,
1965
- name: "discard-options",
1966
- children: formatMessage({
1967
- id: "content-manager.actions.unpublish.dialog.option.replace-draft",
1968
- defaultMessage: "Replace draft"
1969
- })
1970
- }
1971
- )
1969
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Radio.Item, { checked: shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.KEEP, children: formatMessage({
1970
+ id: "content-manager.actions.unpublish.dialog.option.keep-draft",
1971
+ defaultMessage: "Keep draft"
1972
+ }) }),
1973
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Radio.Item, { checked: !shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.DISCARD, children: formatMessage({
1974
+ id: "content-manager.actions.unpublish.dialog.option.replace-draft",
1975
+ defaultMessage: "Replace draft"
1976
+ }) })
1972
1977
  ]
1973
1978
  }
1974
1979
  )
@@ -2821,30 +2826,23 @@ const ConfirmBulkActionDialog = ({
2821
2826
  endAction
2822
2827
  }) => {
2823
2828
  const { formatMessage } = reactIntl.useIntl();
2824
- return /* @__PURE__ */ jsxRuntime.jsxs(
2825
- designSystem.Dialog,
2826
- {
2827
- onClose: onToggleDialog,
2828
- title: formatMessage({
2829
- id: "app.components.ConfirmDialog.title",
2830
- defaultMessage: "Confirmation"
2831
- }),
2832
- isOpen,
2833
- children: [
2834
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.DialogBody, { icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}), children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: dialogBody }) }),
2835
- /* @__PURE__ */ jsxRuntime.jsx(
2836
- designSystem.DialogFooter,
2837
- {
2838
- startAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onToggleDialog, variant: "tertiary", children: formatMessage({
2839
- id: "app.components.Button.cancel",
2840
- defaultMessage: "Cancel"
2841
- }) }),
2842
- endAction
2843
- }
2844
- )
2845
- ]
2846
- }
2847
- );
2829
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
2830
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: formatMessage({
2831
+ id: "app.components.ConfirmDialog.title",
2832
+ defaultMessage: "Confirmation"
2833
+ }) }),
2834
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
2835
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
2836
+ dialogBody
2837
+ ] }) }),
2838
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
2839
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { fullWidth: true, onClick: onToggleDialog, variant: "tertiary", children: formatMessage({
2840
+ id: "app.components.Button.cancel",
2841
+ defaultMessage: "Cancel"
2842
+ }) }) }),
2843
+ endAction
2844
+ ] })
2845
+ ] }) });
2848
2846
  };
2849
2847
  const BoldChunk$1 = (chunks) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: chunks });
2850
2848
  const ConfirmDialogPublishAll = ({
@@ -2904,7 +2902,7 @@ const ConfirmDialogPublishAll = ({
2904
2902
  defaultMessage: "Are you sure you want to publish these entries?"
2905
2903
  })
2906
2904
  ] }),
2907
- schema?.pluginOptions && "i18n" in schema.pluginOptions && schema?.pluginOptions.i18n && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger500", children: formatMessage(
2905
+ schema?.pluginOptions && "i18n" in schema.pluginOptions && schema?.pluginOptions.i18n && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger500", textAlign: "center", children: formatMessage(
2908
2906
  {
2909
2907
  id: getTranslation("Settings.list.actions.publishAdditionalInfos"),
2910
2908
  defaultMessage: "This will publish the active locale versions <em>(from Internationalization)</em>"
@@ -2949,16 +2947,30 @@ const formatErrorMessages = (errors, parentKey, formatMessage) => {
2949
2947
  )
2950
2948
  );
2951
2949
  } else {
2952
- messages.push(...formatErrorMessages(value, currentKey, formatMessage));
2950
+ messages.push(
2951
+ ...formatErrorMessages(
2952
+ // @ts-expect-error TODO: check why value is not compatible with FormErrors
2953
+ value,
2954
+ currentKey,
2955
+ formatMessage
2956
+ )
2957
+ );
2953
2958
  }
2959
+ } else {
2960
+ messages.push(
2961
+ formatMessage(
2962
+ {
2963
+ id: `${value}.withField`,
2964
+ defaultMessage: value
2965
+ },
2966
+ { field: currentKey }
2967
+ )
2968
+ );
2954
2969
  }
2955
2970
  });
2956
2971
  return messages;
2957
2972
  };
2958
- const EntryValidationText = ({
2959
- validationErrors,
2960
- isPublished = false
2961
- }) => {
2973
+ const EntryValidationText = ({ validationErrors, status }) => {
2962
2974
  const { formatMessage } = reactIntl.useIntl();
2963
2975
  if (validationErrors) {
2964
2976
  const validationErrorsMessages = formatErrorMessages(validationErrors, "", formatMessage).join(
@@ -2969,7 +2981,7 @@ const EntryValidationText = ({
2969
2981
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { description: validationErrorsMessages, children: /* @__PURE__ */ jsxRuntime.jsx(TypographyMaxWidth, { textColor: "danger600", variant: "omega", fontWeight: "semiBold", ellipsis: true, children: validationErrorsMessages }) })
2970
2982
  ] });
2971
2983
  }
2972
- if (isPublished) {
2984
+ if (status === "published") {
2973
2985
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
2974
2986
  /* @__PURE__ */ jsxRuntime.jsx(Icons.CheckCircle, { fill: "success600" }),
2975
2987
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "success600", fontWeight: "bold", children: formatMessage({
@@ -2978,6 +2990,15 @@ const EntryValidationText = ({
2978
2990
  }) })
2979
2991
  ] });
2980
2992
  }
2993
+ if (status === "modified") {
2994
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
2995
+ /* @__PURE__ */ jsxRuntime.jsx(Icons.ArrowsCounterClockwise, { fill: "alternative600" }),
2996
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
2997
+ id: "content-manager.bulk-publish.modified",
2998
+ defaultMessage: "Ready to publish changes"
2999
+ }) })
3000
+ ] });
3001
+ }
2981
3002
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
2982
3003
  /* @__PURE__ */ jsxRuntime.jsx(Icons.CheckCircle, { fill: "success600" }),
2983
3004
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
@@ -3029,7 +3050,7 @@ const SelectedEntriesTableContent = ({
3029
3050
  EntryValidationText,
3030
3051
  {
3031
3052
  validationErrors: validationErrors[row.documentId],
3032
- isPublished: row.publishedAt !== null
3053
+ status: row.status
3033
3054
  }
3034
3055
  ) }),
3035
3056
  /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3118,18 +3139,16 @@ const SelectedEntriesModalContent = ({
3118
3139
  const [isDialogOpen, setIsDialogOpen] = React__namespace.useState(false);
3119
3140
  const { publishMany: bulkPublishAction } = useDocumentActions();
3120
3141
  const [, { isLoading: isSubmittingForm }] = usePublishManyDocumentsMutation();
3121
- const selectedEntries = strapiAdmin.useTable("publishAction", (state) => state.selectedRows);
3122
- const entriesToPublish = selectedEntries.reduce((acc, entry) => {
3123
- if (!validationErrors[entry.documentId]) {
3124
- acc.push(entry.documentId);
3125
- }
3126
- return acc;
3127
- }, []);
3142
+ const selectedRows = strapiAdmin.useTable("publishAction", (state) => state.selectedRows);
3143
+ const selectedEntries = rows.filter(
3144
+ (entry) => selectedRows.some((selectedEntry) => selectedEntry.documentId === entry.documentId)
3145
+ );
3146
+ const entriesToPublish = selectedEntries.filter((entry) => !validationErrors[entry.documentId]).map((entry) => entry.documentId);
3128
3147
  const selectedEntriesWithErrorsCount = selectedEntries.filter(
3129
3148
  ({ documentId }) => validationErrors[documentId]
3130
3149
  ).length;
3131
3150
  const selectedEntriesPublished = selectedEntries.filter(
3132
- ({ publishedAt }) => !!publishedAt
3151
+ ({ status }) => status === "published"
3133
3152
  ).length;
3134
3153
  const selectedEntriesWithNoErrorsCount = selectedEntries.length - selectedEntriesWithErrorsCount - selectedEntriesPublished;
3135
3154
  const toggleDialog = () => setIsDialogOpen((prev) => !prev);
@@ -3172,7 +3191,7 @@ const SelectedEntriesModalContent = ({
3172
3191
  );
3173
3192
  };
3174
3193
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3175
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.ModalBody, { children: [
3194
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Body, { children: [
3176
3195
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: getFormattedCountMessage() }),
3177
3196
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 5, children: /* @__PURE__ */ jsxRuntime.jsx(
3178
3197
  SelectedEntriesTableContent,
@@ -3184,27 +3203,24 @@ const SelectedEntriesModalContent = ({
3184
3203
  }
3185
3204
  ) })
3186
3205
  ] }),
3187
- /* @__PURE__ */ jsxRuntime.jsx(
3188
- designSystem.ModalFooter,
3189
- {
3190
- startActions: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: toggleModal, variant: "tertiary", children: formatMessage({
3191
- id: "app.components.Button.cancel",
3192
- defaultMessage: "Cancel"
3193
- }) }),
3194
- endActions: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
3195
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: refetch, variant: "tertiary", loading: isFetching, children: formatMessage({ id: "app.utils.refresh", defaultMessage: "Refresh" }) }),
3196
- /* @__PURE__ */ jsxRuntime.jsx(
3197
- designSystem.Button,
3198
- {
3199
- onClick: toggleDialog,
3200
- disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || isLoading,
3201
- loading: isSubmittingForm,
3202
- children: formatMessage({ id: "app.utils.publish", defaultMessage: "Publish" })
3203
- }
3204
- )
3205
- ] })
3206
- }
3207
- ),
3206
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Footer, { children: [
3207
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: toggleModal, variant: "tertiary", children: formatMessage({
3208
+ id: "app.components.Button.cancel",
3209
+ defaultMessage: "Cancel"
3210
+ }) }),
3211
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
3212
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: refetch, variant: "tertiary", loading: isFetching, children: formatMessage({ id: "app.utils.refresh", defaultMessage: "Refresh" }) }),
3213
+ /* @__PURE__ */ jsxRuntime.jsx(
3214
+ designSystem.Button,
3215
+ {
3216
+ onClick: toggleDialog,
3217
+ disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || selectedEntriesPublished === selectedEntries.length || isLoading,
3218
+ loading: isSubmittingForm,
3219
+ children: formatMessage({ id: "app.utils.publish", defaultMessage: "Publish" })
3220
+ }
3221
+ )
3222
+ ] })
3223
+ ] }),
3208
3224
  /* @__PURE__ */ jsxRuntime.jsx(
3209
3225
  ConfirmDialogPublishAll,
3210
3226
  {
@@ -3269,143 +3285,10 @@ const BulkActionsRenderer = () => {
3269
3285
  documents: selectedRows
3270
3286
  },
3271
3287
  descriptions: plugins["content-manager"].apis.getBulkActions(),
3272
- children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsxRuntime.jsx(BulkActionAction, { ...action }, action.id))
3288
+ children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsxRuntime.jsx(DocumentActionButton, { ...action }, action.id))
3273
3289
  }
3274
3290
  ) });
3275
3291
  };
3276
- const BulkActionAction = (action) => {
3277
- const [dialogId, setDialogId] = React__namespace.useState(null);
3278
- const { toggleNotification } = strapiAdmin.useNotification();
3279
- const handleClick = (action2) => (e) => {
3280
- const { onClick, dialog, id } = action2;
3281
- if (onClick) {
3282
- onClick(e);
3283
- }
3284
- if (dialog) {
3285
- switch (dialog.type) {
3286
- case "notification":
3287
- toggleNotification({
3288
- title: dialog.title,
3289
- message: dialog.content,
3290
- type: dialog.status,
3291
- timeout: dialog.timeout,
3292
- onClose: dialog.onClose
3293
- });
3294
- break;
3295
- case "dialog":
3296
- case "modal": {
3297
- e.preventDefault();
3298
- setDialogId(id);
3299
- }
3300
- }
3301
- }
3302
- };
3303
- const handleClose = () => {
3304
- setDialogId(null);
3305
- if (action.dialog?.type === "modal" && action.dialog?.onClose) {
3306
- action.dialog.onClose();
3307
- }
3308
- };
3309
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3310
- /* @__PURE__ */ jsxRuntime.jsx(
3311
- designSystem.Button,
3312
- {
3313
- disabled: action.disabled,
3314
- startIcon: action.icon,
3315
- variant: action.variant,
3316
- onClick: handleClick(action),
3317
- children: action.label
3318
- }
3319
- ),
3320
- action.dialog?.type === "dialog" ? /* @__PURE__ */ jsxRuntime.jsx(
3321
- BulkActionConfirmDialog,
3322
- {
3323
- ...action.dialog,
3324
- variant: action.variant,
3325
- isOpen: dialogId === action.id,
3326
- onClose: handleClose
3327
- }
3328
- ) : null,
3329
- action.dialog?.type === "modal" ? /* @__PURE__ */ jsxRuntime.jsx(
3330
- BulkActionModal,
3331
- {
3332
- ...action.dialog,
3333
- onModalClose: handleClose,
3334
- isOpen: dialogId === action.id
3335
- }
3336
- ) : null
3337
- ] });
3338
- };
3339
- const BulkActionConfirmDialog = ({
3340
- onClose,
3341
- onCancel,
3342
- onConfirm,
3343
- title,
3344
- content,
3345
- confirmButton,
3346
- isOpen,
3347
- variant = "secondary"
3348
- }) => {
3349
- const { formatMessage } = reactIntl.useIntl();
3350
- const handleClose = async () => {
3351
- if (onCancel) {
3352
- await onCancel();
3353
- }
3354
- onClose();
3355
- };
3356
- const handleConfirm = async () => {
3357
- if (onConfirm) {
3358
- await onConfirm();
3359
- }
3360
- onClose();
3361
- };
3362
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog, { isOpen, title, onClose: handleClose, children: [
3363
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.DialogBody, { icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}), children: content }),
3364
- /* @__PURE__ */ jsxRuntime.jsx(
3365
- designSystem.DialogFooter,
3366
- {
3367
- startAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleClose, variant: "tertiary", children: formatMessage({
3368
- id: "app.components.Button.cancel",
3369
- defaultMessage: "Cancel"
3370
- }) }),
3371
- endAction: /* @__PURE__ */ jsxRuntime.jsx(
3372
- designSystem.Button,
3373
- {
3374
- onClick: handleConfirm,
3375
- variant: variant === "danger-light" ? variant : "secondary",
3376
- startIcon: variant === "danger-light" ? /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {}) : /* @__PURE__ */ jsxRuntime.jsx(Icons.Check, {}),
3377
- children: confirmButton ? confirmButton : formatMessage({
3378
- id: "app.components.Button.confirm",
3379
- defaultMessage: "Confirm"
3380
- })
3381
- }
3382
- )
3383
- }
3384
- )
3385
- ] });
3386
- };
3387
- const BulkActionModal = ({
3388
- isOpen,
3389
- title,
3390
- onClose,
3391
- content: Content,
3392
- onModalClose
3393
- }) => {
3394
- const id = React__namespace.useId();
3395
- if (!isOpen) {
3396
- return null;
3397
- }
3398
- const handleClose = () => {
3399
- if (onClose) {
3400
- onClose();
3401
- }
3402
- onModalClose();
3403
- };
3404
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.ModalLayout, { borderRadius: "4px", overflow: "hidden", onClose: handleClose, labelledBy: id, children: [
3405
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id, children: title }) }),
3406
- /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose })
3407
- ] });
3408
- };
3409
3292
  const DeleteAction = ({ documents, model }) => {
3410
3293
  const { formatMessage } = reactIntl.useIntl();
3411
3294
  const { schema: contentType } = useDoc();
@@ -3438,6 +3321,7 @@ const DeleteAction = ({ documents, model }) => {
3438
3321
  defaultMessage: "Confirmation"
3439
3322
  }),
3440
3323
  content: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
3324
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
3441
3325
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
3442
3326
  id: "popUpWarning.bodyMessage.contentType.delete.all",
3443
3327
  defaultMessage: "Are you sure you want to delete these entries?"
@@ -3474,7 +3358,7 @@ const UnpublishAction = ({ documents, model }) => {
3474
3358
  selectRow([]);
3475
3359
  }
3476
3360
  };
3477
- const showUnpublishButton = hasDraftAndPublishEnabled && hasPublishPermission && documents.some((entry) => entry.status === "published");
3361
+ const showUnpublishButton = hasDraftAndPublishEnabled && hasPublishPermission && documents.some((entry) => entry.status === "published" || entry.status === "modified");
3478
3362
  if (!showUnpublishButton)
3479
3363
  return null;
3480
3364
  return {
@@ -3487,6 +3371,7 @@ const UnpublishAction = ({ documents, model }) => {
3487
3371
  defaultMessage: "Confirmation"
3488
3372
  }),
3489
3373
  content: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
3374
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
3490
3375
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
3491
3376
  id: "popUpWarning.bodyMessage.contentType.unpublish.all",
3492
3377
  defaultMessage: "Are you sure you want to unpublish these entries?"
@@ -3872,15 +3757,24 @@ const index = {
3872
3757
  defaultMessage: "Content Manager"
3873
3758
  },
3874
3759
  permissions: [],
3875
- Component: () => Promise.resolve().then(() => require("./layout-pZc2Q3bK.js")).then((mod) => ({ default: mod.Layout })),
3876
3760
  position: 1
3877
3761
  });
3762
+ app.router.addRoute({
3763
+ path: "content-manager/*",
3764
+ lazy: async () => {
3765
+ const { Layout } = await Promise.resolve().then(() => require("./layout-DRuJUpas.js"));
3766
+ return {
3767
+ Component: Layout
3768
+ };
3769
+ },
3770
+ children: routes
3771
+ });
3878
3772
  app.registerPlugin(cm.config);
3879
3773
  },
3880
3774
  async registerTrads({ locales }) {
3881
3775
  const importedTrads = await Promise.all(
3882
3776
  locales.map((locale) => {
3883
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-BN1bvFK7.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
3777
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-fbKQxLGn.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
3884
3778
  return {
3885
3779
  data: prefixPluginTranslations(data, PLUGIN_ID),
3886
3780
  locale
@@ -3924,7 +3818,6 @@ exports.getDisplayName = getDisplayName;
3924
3818
  exports.getMainField = getMainField;
3925
3819
  exports.getTranslation = getTranslation;
3926
3820
  exports.index = index;
3927
- exports.routes = routes;
3928
3821
  exports.setInitialData = setInitialData;
3929
3822
  exports.useContentTypeSchema = useContentTypeSchema;
3930
3823
  exports.useDoc = useDoc;
@@ -3938,4 +3831,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
3938
3831
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
3939
3832
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
3940
3833
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
3941
- //# sourceMappingURL=index-BRHpg0az.js.map
3834
+ //# sourceMappingURL=index-Buwn78Rt.js.map