@strapi/content-manager 5.0.0-rc.11 → 5.0.0-rc.13

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 (91) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs → ComponentConfigurationPage-CnL10QYC.mjs} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs.map → ComponentConfigurationPage-CnL10QYC.mjs.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js → ComponentConfigurationPage-G4EIirP8.js} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js.map → ComponentConfigurationPage-G4EIirP8.js.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js → EditConfigurationPage-B2AA1kVF.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js.map → EditConfigurationPage-B2AA1kVF.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs → EditConfigurationPage-I2kKh9dx.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs.map → EditConfigurationPage-I2kKh9dx.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-B-RJeiJD.js → EditViewPage-CHgoNwlc.js} +3 -3
  10. package/dist/_chunks/{EditViewPage-B-RJeiJD.js.map → EditViewPage-CHgoNwlc.js.map} +1 -1
  11. package/dist/_chunks/{EditViewPage-De8GyU8P.mjs → EditViewPage-zFjJK0s8.mjs} +3 -3
  12. package/dist/_chunks/{EditViewPage-De8GyU8P.mjs.map → EditViewPage-zFjJK0s8.mjs.map} +1 -1
  13. package/dist/_chunks/{Field-dq8Tg1M_.js → Field-9DePZh-0.js} +24 -62
  14. package/dist/_chunks/Field-9DePZh-0.js.map +1 -0
  15. package/dist/_chunks/{Field-pb2o8uBe.mjs → Field-DPAzUS1M.mjs} +20 -58
  16. package/dist/_chunks/Field-DPAzUS1M.mjs.map +1 -0
  17. package/dist/_chunks/{Form-DJn0Dxha.mjs → Form-CEkENbkF.mjs} +15 -7
  18. package/dist/_chunks/Form-CEkENbkF.mjs.map +1 -0
  19. package/dist/_chunks/{Form-DGIf4jQU.js → Form-DPm-KZ1A.js} +15 -7
  20. package/dist/_chunks/Form-DPm-KZ1A.js.map +1 -0
  21. package/dist/_chunks/{History-Dh2NEHnR.js → History-DXSbTWez.js} +4 -4
  22. package/dist/_chunks/{History-Dh2NEHnR.js.map → History-DXSbTWez.js.map} +1 -1
  23. package/dist/_chunks/{History-BowL3JKP.mjs → History-utls71em.mjs} +4 -4
  24. package/dist/_chunks/{History-BowL3JKP.mjs.map → History-utls71em.mjs.map} +1 -1
  25. package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs → ListConfigurationPage-CuMXWWqb.mjs} +2 -2
  26. package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs.map → ListConfigurationPage-CuMXWWqb.mjs.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js → ListConfigurationPage-D5C7ACZ_.js} +2 -2
  28. package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js.map → ListConfigurationPage-D5C7ACZ_.js.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-CXFUjZQC.mjs → ListViewPage-CdKd-PS_.mjs} +39 -35
  30. package/dist/_chunks/ListViewPage-CdKd-PS_.mjs.map +1 -0
  31. package/dist/_chunks/{ListViewPage-4XsciqHZ.js → ListViewPage-DfuwH1tt.js} +42 -38
  32. package/dist/_chunks/ListViewPage-DfuwH1tt.js.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js → NoContentTypePage-BIxlkWWi.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js.map → NoContentTypePage-BIxlkWWi.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs → NoContentTypePage-DkToTT7u.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs.map → NoContentTypePage-DkToTT7u.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js → NoPermissionsPage-Bu4GWYb-.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js.map → NoPermissionsPage-Bu4GWYb-.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs → NoPermissionsPage-DlWi4BAH.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs.map → NoPermissionsPage-DlWi4BAH.mjs.map} +1 -1
  41. package/dist/_chunks/{Relations-DPFCAa7b.js → Relations-CFjTESWQ.js} +3 -3
  42. package/dist/_chunks/{Relations-DPFCAa7b.js.map → Relations-CFjTESWQ.js.map} +1 -1
  43. package/dist/_chunks/{Relations-CVNLrn1Y.mjs → Relations-QP5yn9_z.mjs} +3 -3
  44. package/dist/_chunks/{Relations-CVNLrn1Y.mjs.map → Relations-QP5yn9_z.mjs.map} +1 -1
  45. package/dist/_chunks/{en-uOUIxfcQ.js → en-BVzUkPxZ.js} +6 -5
  46. package/dist/_chunks/{en-uOUIxfcQ.js.map → en-BVzUkPxZ.js.map} +1 -1
  47. package/dist/_chunks/{en-BrCTWlZv.mjs → en-CPTj6CjC.mjs} +6 -5
  48. package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-CPTj6CjC.mjs.map} +1 -1
  49. package/dist/_chunks/{index-DiMrfcfy.mjs → index-BHfS6_D5.mjs} +106 -61
  50. package/dist/_chunks/{index-DiMrfcfy.mjs.map → index-BHfS6_D5.mjs.map} +1 -1
  51. package/dist/_chunks/{index-C3fJE-1-.js → index-DXiHxy70.js} +104 -59
  52. package/dist/_chunks/index-DXiHxy70.js.map +1 -0
  53. package/dist/_chunks/{layout-ls3gxfpH.mjs → layout-DX_52HSH.mjs} +5 -4
  54. package/dist/_chunks/{layout-ls3gxfpH.mjs.map → layout-DX_52HSH.mjs.map} +1 -1
  55. package/dist/_chunks/{layout-C788OmNr.js → layout-bE-WUnQ0.js} +5 -4
  56. package/dist/_chunks/{layout-C788OmNr.js.map → layout-bE-WUnQ0.js.map} +1 -1
  57. package/dist/_chunks/{relations-DYeotliT.js → relations-D706vblp.js} +2 -2
  58. package/dist/_chunks/{relations-DYeotliT.js.map → relations-D706vblp.js.map} +1 -1
  59. package/dist/_chunks/{relations-CLcOmGO0.mjs → relations-SCVAL_aJ.mjs} +2 -2
  60. package/dist/_chunks/{relations-CLcOmGO0.mjs.map → relations-SCVAL_aJ.mjs.map} +1 -1
  61. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  62. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  63. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  64. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  65. package/dist/admin/index.js +1 -1
  66. package/dist/admin/index.mjs +1 -1
  67. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +0 -32
  68. package/dist/admin/src/pages/EditView/components/Header.d.ts +10 -11
  69. package/dist/admin/src/services/documents.d.ts +3 -1
  70. package/dist/server/index.js +18 -5
  71. package/dist/server/index.js.map +1 -1
  72. package/dist/server/index.mjs +18 -5
  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/history/services/history.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 +1 -0
  78. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  79. package/dist/shared/contracts/collection-types.d.ts +3 -1
  80. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  81. package/package.json +9 -9
  82. package/dist/_chunks/Field-dq8Tg1M_.js.map +0 -1
  83. package/dist/_chunks/Field-pb2o8uBe.mjs.map +0 -1
  84. package/dist/_chunks/Form-DGIf4jQU.js.map +0 -1
  85. package/dist/_chunks/Form-DJn0Dxha.mjs.map +0 -1
  86. package/dist/_chunks/ListViewPage-4XsciqHZ.js.map +0 -1
  87. package/dist/_chunks/ListViewPage-CXFUjZQC.mjs.map +0 -1
  88. package/dist/_chunks/index-C3fJE-1-.js.map +0 -1
  89. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  90. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  91. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
@@ -6,10 +6,10 @@ const React = require("react");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const reactIntl = require("react-intl");
8
8
  const reactRouterDom = require("react-router-dom");
9
- const styledComponents = require("styled-components");
10
9
  const yup = require("yup");
11
10
  const pipe = require("lodash/fp/pipe");
12
11
  const dateFns = require("date-fns");
12
+ const styledComponents = require("styled-components");
13
13
  const qs = require("qs");
14
14
  const toolkit = require("@reduxjs/toolkit");
15
15
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -1324,7 +1324,7 @@ const useDocumentActions = () => {
1324
1324
  };
1325
1325
  };
1326
1326
  const ProtectedHistoryPage = React.lazy(
1327
- () => Promise.resolve().then(() => require("./History-Dh2NEHnR.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1327
+ () => Promise.resolve().then(() => require("./History-DXSbTWez.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1328
1328
  );
1329
1329
  const routes$1 = [
1330
1330
  {
@@ -1337,31 +1337,31 @@ const routes$1 = [
1337
1337
  }
1338
1338
  ];
1339
1339
  const ProtectedEditViewPage = React.lazy(
1340
- () => Promise.resolve().then(() => require("./EditViewPage-B-RJeiJD.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1340
+ () => Promise.resolve().then(() => require("./EditViewPage-CHgoNwlc.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1341
1341
  );
1342
1342
  const ProtectedListViewPage = React.lazy(
1343
- () => Promise.resolve().then(() => require("./ListViewPage-4XsciqHZ.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1343
+ () => Promise.resolve().then(() => require("./ListViewPage-DfuwH1tt.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1344
1344
  );
1345
1345
  const ProtectedListConfiguration = React.lazy(
1346
- () => Promise.resolve().then(() => require("./ListConfigurationPage-BxYCWz9e.js")).then((mod) => ({
1346
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-D5C7ACZ_.js")).then((mod) => ({
1347
1347
  default: mod.ProtectedListConfiguration
1348
1348
  }))
1349
1349
  );
1350
1350
  const ProtectedEditConfigurationPage = React.lazy(
1351
- () => Promise.resolve().then(() => require("./EditConfigurationPage-BePwPuHy.js")).then((mod) => ({
1351
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-B2AA1kVF.js")).then((mod) => ({
1352
1352
  default: mod.ProtectedEditConfigurationPage
1353
1353
  }))
1354
1354
  );
1355
1355
  const ProtectedComponentConfigurationPage = React.lazy(
1356
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-D_M8iBw5.js")).then((mod) => ({
1356
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-G4EIirP8.js")).then((mod) => ({
1357
1357
  default: mod.ProtectedComponentConfigurationPage
1358
1358
  }))
1359
1359
  );
1360
1360
  const NoPermissions = React.lazy(
1361
- () => Promise.resolve().then(() => require("./NoPermissionsPage-y_r7DVA2.js")).then((mod) => ({ default: mod.NoPermissions }))
1361
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-Bu4GWYb-.js")).then((mod) => ({ default: mod.NoPermissions }))
1362
1362
  );
1363
1363
  const NoContentType = React.lazy(
1364
- () => Promise.resolve().then(() => require("./NoContentTypePage-C8OpoHeU.js")).then((mod) => ({ default: mod.NoContentType }))
1364
+ () => Promise.resolve().then(() => require("./NoContentTypePage-BIxlkWWi.js")).then((mod) => ({ default: mod.NoContentType }))
1365
1365
  );
1366
1366
  const CollectionTypePages = () => {
1367
1367
  const { collectionType } = reactRouterDom.useParams();
@@ -1542,7 +1542,7 @@ const DocumentActionsMenu = ({
1542
1542
  };
1543
1543
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { open: isOpen, onOpenChange: setIsOpen, children: [
1544
1544
  /* @__PURE__ */ jsxRuntime.jsxs(
1545
- StyledMoreButton,
1545
+ designSystem.Menu.Trigger,
1546
1546
  {
1547
1547
  disabled: isDisabled,
1548
1548
  size: "S",
@@ -1560,7 +1560,7 @@ const DocumentActionsMenu = ({
1560
1560
  ]
1561
1561
  }
1562
1562
  ),
1563
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { top: "4px", maxHeight: void 0, popoverPlacement: "bottom-end", children: [
1563
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
1564
1564
  actions2.map((action) => {
1565
1565
  return /* @__PURE__ */ jsxRuntime.jsx(
1566
1566
  designSystem.Menu.Item,
@@ -1658,11 +1658,6 @@ const convertActionVariantToIconColor = (variant = "secondary") => {
1658
1658
  return "primary600";
1659
1659
  }
1660
1660
  };
1661
- const StyledMoreButton = styledComponents.styled(designSystem.Menu.Trigger)`
1662
- & > span {
1663
- display: flex;
1664
- }
1665
- `;
1666
1661
  const DocumentActionConfirmDialog = ({
1667
1662
  onClose,
1668
1663
  onCancel,
@@ -1689,11 +1684,11 @@ const DocumentActionConfirmDialog = ({
1689
1684
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: title }),
1690
1685
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: content }),
1691
1686
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
1692
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", children: formatMessage({
1687
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", fullWidth: true, children: formatMessage({
1693
1688
  id: "app.components.Button.cancel",
1694
1689
  defaultMessage: "Cancel"
1695
1690
  }) }) }),
1696
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, children: formatMessage({
1691
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, fullWidth: true, children: formatMessage({
1697
1692
  id: "app.components.Button.confirm",
1698
1693
  defaultMessage: "Confirm"
1699
1694
  }) })
@@ -1787,24 +1782,25 @@ const PublishAction$1 = ({
1787
1782
  }
1788
1783
  }, [documentId, modified, formValues, setLocalCountOfDraftRelations]);
1789
1784
  React__namespace.useEffect(() => {
1790
- if (documentId && !isListView) {
1791
- const fetchDraftRelationsCount = async () => {
1792
- const { data, error } = await countDraftRelations({
1793
- collectionType,
1794
- model,
1795
- documentId,
1796
- params
1797
- });
1798
- if (error) {
1799
- throw error;
1800
- }
1801
- if (data) {
1802
- setServerCountOfDraftRelations(data.data);
1803
- }
1804
- };
1805
- fetchDraftRelationsCount();
1785
+ if (!document || !document.documentId || isListView) {
1786
+ return;
1806
1787
  }
1807
- }, [isListView, documentId, countDraftRelations, collectionType, model, params]);
1788
+ const fetchDraftRelationsCount = async () => {
1789
+ const { data, error } = await countDraftRelations({
1790
+ collectionType,
1791
+ model,
1792
+ documentId,
1793
+ params
1794
+ });
1795
+ if (error) {
1796
+ throw error;
1797
+ }
1798
+ if (data) {
1799
+ setServerCountOfDraftRelations(data.data);
1800
+ }
1801
+ };
1802
+ fetchDraftRelationsCount();
1803
+ }, [isListView, document, documentId, countDraftRelations, collectionType, model, params]);
1808
1804
  const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
1809
1805
  if (!schema?.options?.draftAndPublish) {
1810
1806
  return null;
@@ -1845,7 +1841,8 @@ const PublishAction$1 = ({
1845
1841
  }
1846
1842
  };
1847
1843
  const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
1848
- const hasDraftRelations = totalDraftRelations > 0;
1844
+ const enableDraftRelationsCount = false;
1845
+ const hasDraftRelations = enableDraftRelationsCount;
1849
1846
  return {
1850
1847
  /**
1851
1848
  * Disabled when:
@@ -1862,9 +1859,6 @@ const PublishAction$1 = ({
1862
1859
  defaultMessage: "Publish"
1863
1860
  }),
1864
1861
  onClick: async () => {
1865
- if (hasDraftRelations) {
1866
- return;
1867
- }
1868
1862
  await performPublish();
1869
1863
  },
1870
1864
  dialog: hasDraftRelations ? {
@@ -2035,7 +2029,7 @@ const UnpublishAction$1 = ({
2035
2029
  id: "app.utils.unpublish",
2036
2030
  defaultMessage: "Unpublish"
2037
2031
  }),
2038
- icon: /* @__PURE__ */ jsxRuntime.jsx(StyledCrossCircle, {}),
2032
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cross, {}),
2039
2033
  onClick: async () => {
2040
2034
  if (!documentId && collectionType !== SINGLE_TYPES || isDocumentModified) {
2041
2035
  if (!documentId) {
@@ -2147,7 +2141,7 @@ const DiscardAction = ({
2147
2141
  id: "content-manager.actions.discard.label",
2148
2142
  defaultMessage: "Discard changes"
2149
2143
  }),
2150
- icon: /* @__PURE__ */ jsxRuntime.jsx(StyledCrossCircle, {}),
2144
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cross, {}),
2151
2145
  position: ["panel", "table-row"],
2152
2146
  variant: "danger",
2153
2147
  dialog: {
@@ -2175,11 +2169,6 @@ const DiscardAction = ({
2175
2169
  };
2176
2170
  };
2177
2171
  DiscardAction.type = "discard";
2178
- const StyledCrossCircle = styledComponents.styled(Icons.CrossCircle)`
2179
- path {
2180
- fill: currentColor;
2181
- }
2182
- `;
2183
2172
  const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
2184
2173
  const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
2185
2174
  const RelativeTime = React__namespace.forwardRef(
@@ -2227,7 +2216,7 @@ const getDisplayName = ({
2227
2216
  };
2228
2217
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2229
2218
  const DocumentStatus = ({ status = "draft", ...restProps }) => {
2230
- const statusVariant = status === "draft" ? "primary" : status === "published" ? "success" : "alternative";
2219
+ const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
2231
2220
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, showBullet: false, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: capitalise(status) }) });
2232
2221
  };
2233
2222
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
@@ -2410,8 +2399,22 @@ const Information = ({ activeTab }) => {
2410
2399
  );
2411
2400
  };
2412
2401
  const HeaderActions = ({ actions: actions2 }) => {
2413
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: actions2.map((action) => {
2414
- if ("options" in action) {
2402
+ const [dialogId, setDialogId] = React__namespace.useState(null);
2403
+ const handleClick = (action) => async (e) => {
2404
+ if (!("options" in action)) {
2405
+ const { onClick = () => false, dialog, id } = action;
2406
+ const muteDialog = await onClick(e);
2407
+ if (dialog && !muteDialog) {
2408
+ e.preventDefault();
2409
+ setDialogId(id);
2410
+ }
2411
+ }
2412
+ };
2413
+ const handleClose = () => {
2414
+ setDialogId(null);
2415
+ };
2416
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 1, children: actions2.map((action) => {
2417
+ if (action.options) {
2415
2418
  return /* @__PURE__ */ jsxRuntime.jsx(
2416
2419
  designSystem.SingleSelect,
2417
2420
  {
@@ -2425,10 +2428,49 @@ const HeaderActions = ({ actions: actions2 }) => {
2425
2428
  action.id
2426
2429
  );
2427
2430
  } else {
2428
- return null;
2431
+ if (action.type === "icon") {
2432
+ return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
2433
+ /* @__PURE__ */ jsxRuntime.jsx(
2434
+ designSystem.IconButton,
2435
+ {
2436
+ disabled: action.disabled,
2437
+ label: action.label,
2438
+ size: "S",
2439
+ onClick: handleClick(action),
2440
+ children: action.icon
2441
+ }
2442
+ ),
2443
+ action.dialog ? /* @__PURE__ */ jsxRuntime.jsx(
2444
+ HeaderActionDialog,
2445
+ {
2446
+ ...action.dialog,
2447
+ isOpen: dialogId === action.id,
2448
+ onClose: handleClose
2449
+ }
2450
+ ) : null
2451
+ ] }, action.id);
2452
+ }
2429
2453
  }
2430
2454
  }) });
2431
2455
  };
2456
+ const HeaderActionDialog = ({
2457
+ onClose,
2458
+ onCancel,
2459
+ title,
2460
+ content: Content,
2461
+ isOpen
2462
+ }) => {
2463
+ const handleClose = async () => {
2464
+ if (onCancel) {
2465
+ await onCancel();
2466
+ }
2467
+ onClose();
2468
+ };
2469
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
2470
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: title }),
2471
+ typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : Content
2472
+ ] }) });
2473
+ };
2432
2474
  const ConfigureTheViewAction = ({ collectionType, model }) => {
2433
2475
  const navigate = reactRouterDom.useNavigate();
2434
2476
  const { formatMessage } = reactIntl.useIntl();
@@ -2564,7 +2606,7 @@ const ActionsPanel = () => {
2564
2606
  return {
2565
2607
  title: formatMessage({
2566
2608
  id: "content-manager.containers.edit.panels.default.title",
2567
- defaultMessage: "Document"
2609
+ defaultMessage: "Entry"
2568
2610
  }),
2569
2611
  content: /* @__PURE__ */ jsxRuntime.jsx(ActionsPanelContent, {})
2570
2612
  };
@@ -2808,7 +2850,8 @@ const formatEditLayout = (data, {
2808
2850
  layout: convertEditLayoutToFieldLayouts(
2809
2851
  configuration.layouts.edit,
2810
2852
  components[uid].attributes,
2811
- configuration.metadatas
2853
+ configuration.metadatas,
2854
+ { configurations: data.components, schemas: components }
2812
2855
  ),
2813
2856
  settings: {
2814
2857
  ...configuration.settings,
@@ -2965,6 +3008,7 @@ const ConfirmDialogPublishAll = ({
2965
3008
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler(getTranslation);
2966
3009
  const { model, schema } = useDoc();
2967
3010
  const [{ query }] = strapiAdmin.useQueryParams();
3011
+ const enableDraftRelationsCount = false;
2968
3012
  const {
2969
3013
  data: countDraftRelations = 0,
2970
3014
  isLoading,
@@ -2976,7 +3020,7 @@ const ConfirmDialogPublishAll = ({
2976
3020
  locale: query?.plugins?.i18n?.locale
2977
3021
  },
2978
3022
  {
2979
- skip: selectedEntries.length === 0
3023
+ skip: !enableDraftRelationsCount
2980
3024
  }
2981
3025
  );
2982
3026
  React__namespace.useEffect(() => {
@@ -3161,7 +3205,7 @@ const SelectedEntriesTableContent = ({
3161
3205
  status: row.status
3162
3206
  }
3163
3207
  ) }),
3164
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(
3208
+ /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(
3165
3209
  designSystem.IconButton,
3166
3210
  {
3167
3211
  tag: reactRouterDom.Link,
@@ -3184,9 +3228,10 @@ const SelectedEntriesTableContent = ({
3184
3228
  ),
3185
3229
  target: "_blank",
3186
3230
  marginLeft: "auto",
3187
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Pencil, {})
3231
+ variant: "ghost",
3232
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Pencil, { width: "1.6rem", height: "1.6rem" })
3188
3233
  }
3189
- ) })
3234
+ ) }) })
3190
3235
  ] }, row.id)) })
3191
3236
  ] });
3192
3237
  };
@@ -3921,7 +3966,7 @@ const index = {
3921
3966
  app.router.addRoute({
3922
3967
  path: "content-manager/*",
3923
3968
  lazy: async () => {
3924
- const { Layout } = await Promise.resolve().then(() => require("./layout-C788OmNr.js"));
3969
+ const { Layout } = await Promise.resolve().then(() => require("./layout-bE-WUnQ0.js"));
3925
3970
  return {
3926
3971
  Component: Layout
3927
3972
  };
@@ -3938,7 +3983,7 @@ const index = {
3938
3983
  async registerTrads({ locales }) {
3939
3984
  const importedTrads = await Promise.all(
3940
3985
  locales.map((locale) => {
3941
- 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-uOUIxfcQ.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 }) => {
3986
+ 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-BVzUkPxZ.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 }) => {
3942
3987
  return {
3943
3988
  data: prefixPluginTranslations(data, PLUGIN_ID),
3944
3989
  locale
@@ -3996,4 +4041,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
3996
4041
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
3997
4042
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
3998
4043
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
3999
- //# sourceMappingURL=index-C3fJE-1-.js.map
4044
+ //# sourceMappingURL=index-DXiHxy70.js.map