@strapi/content-manager 0.0.0-experimental.25e22c6cc9bc6b35392bb55d09f641a0a65e7403 → 0.0.0-experimental.4ddd402c7194d1a969a797313bf007c93148d59a

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 (87) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-WRPUXGd6.js → ComponentConfigurationPage-BZIaEffq.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-WRPUXGd6.js.map → ComponentConfigurationPage-BZIaEffq.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-gdUj_t-O.mjs → ComponentConfigurationPage-Cxz51Sve.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-gdUj_t-O.mjs.map → ComponentConfigurationPage-Cxz51Sve.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-C1vjMBgy.js → EditConfigurationPage-CM62NN0L.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-C1vjMBgy.js.map → EditConfigurationPage-CM62NN0L.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-BwuIPOJG.mjs → EditConfigurationPage-CZLbgfIp.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-BwuIPOJG.mjs.map → EditConfigurationPage-CZLbgfIp.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-DbcGfyqK.js → EditViewPage-CU7724gt.js} +45 -45
  10. package/dist/_chunks/EditViewPage-CU7724gt.js.map +1 -0
  11. package/dist/_chunks/{EditViewPage-0MiFkXa8.mjs → EditViewPage-CzuJgWWp.mjs} +46 -46
  12. package/dist/_chunks/EditViewPage-CzuJgWWp.mjs.map +1 -0
  13. package/dist/_chunks/{Field-BG1xu38N.js → Field-Dh1yZyqy.js} +115 -103
  14. package/dist/_chunks/Field-Dh1yZyqy.js.map +1 -0
  15. package/dist/_chunks/{Field-BDMSCcy5.mjs → Field-QtUSh5mU.mjs} +116 -104
  16. package/dist/_chunks/Field-QtUSh5mU.mjs.map +1 -0
  17. package/dist/_chunks/{Form-9BnFyUjy.js → Form-BOR8NOe1.js} +25 -21
  18. package/dist/_chunks/Form-BOR8NOe1.js.map +1 -0
  19. package/dist/_chunks/{Form-CPVWavB8.mjs → Form-COLpvlnv.mjs} +27 -23
  20. package/dist/_chunks/Form-COLpvlnv.mjs.map +1 -0
  21. package/dist/_chunks/{History-BVpd8LP3.mjs → History-Bu53Yfw-.mjs} +22 -101
  22. package/dist/_chunks/History-Bu53Yfw-.mjs.map +1 -0
  23. package/dist/_chunks/{History-BWWxLt2Z.js → History-CW2akQ6h.js} +21 -100
  24. package/dist/_chunks/History-CW2akQ6h.js.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-DozVMKcR.mjs → ListConfigurationPage-TqrmwjPN.mjs} +45 -43
  26. package/dist/_chunks/ListConfigurationPage-TqrmwjPN.mjs.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-6swzjdAZ.js → ListConfigurationPage-jzdhEk_u.js} +43 -42
  28. package/dist/_chunks/ListConfigurationPage-jzdhEk_u.js.map +1 -0
  29. package/dist/_chunks/{ListViewPage-BlzfjS2Q.js → ListViewPage-B3bMOrMv.js} +64 -47
  30. package/dist/_chunks/ListViewPage-B3bMOrMv.js.map +1 -0
  31. package/dist/_chunks/{ListViewPage-Ds0ulgfG.mjs → ListViewPage-BO_mOXIl.mjs} +65 -48
  32. package/dist/_chunks/ListViewPage-BO_mOXIl.mjs.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-D2nCCWEl.js → NoContentTypePage-D77xsNHj.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-D2nCCWEl.js.map → NoContentTypePage-D77xsNHj.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-BH11kaKt.mjs → NoContentTypePage-DqB0QV0k.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-BH11kaKt.mjs.map → NoContentTypePage-DqB0QV0k.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DN_JlsU2.js → NoPermissionsPage-C6qTGogm.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DN_JlsU2.js.map → NoPermissionsPage-C6qTGogm.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-BT2Tn0D_.mjs → NoPermissionsPage-DTXi042N.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-BT2Tn0D_.mjs.map → NoPermissionsPage-DTXi042N.mjs.map} +1 -1
  41. package/dist/_chunks/{Relations-CcgFTcWo.js → Relations-B6fb2POW.js} +3 -3
  42. package/dist/_chunks/{Relations-CcgFTcWo.js.map → Relations-B6fb2POW.js.map} +1 -1
  43. package/dist/_chunks/{Relations-Dnag3fhV.mjs → Relations-CJ4qdkRo.mjs} +3 -3
  44. package/dist/_chunks/{Relations-Dnag3fhV.mjs.map → Relations-CJ4qdkRo.mjs.map} +1 -1
  45. package/dist/_chunks/{en-Ux26r5pl.mjs → en-9GwRW_ku.mjs} +1 -3
  46. package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-9GwRW_ku.mjs.map} +1 -1
  47. package/dist/_chunks/{en-fbKQxLGn.js → en-DZXjRiWA.js} +1 -3
  48. package/dist/_chunks/{en-fbKQxLGn.js.map → en-DZXjRiWA.js.map} +1 -1
  49. package/dist/_chunks/{index-JNNNKUHs.mjs → index-Dahjdw4h.mjs} +266 -88
  50. package/dist/_chunks/index-Dahjdw4h.mjs.map +1 -0
  51. package/dist/_chunks/{index-CWpLBSt0.js → index-DcUu-_72.js} +265 -87
  52. package/dist/_chunks/index-DcUu-_72.js.map +1 -0
  53. package/dist/_chunks/{layout--iHdZzRk.js → layout-jcY4dyUG.js} +3 -3
  54. package/dist/_chunks/{layout--iHdZzRk.js.map → layout-jcY4dyUG.js.map} +1 -1
  55. package/dist/_chunks/{layout-DC503LnF.mjs → layout-omucV6TV.mjs} +3 -3
  56. package/dist/_chunks/{layout-DC503LnF.mjs.map → layout-omucV6TV.mjs.map} +1 -1
  57. package/dist/_chunks/{relations-CTje5t-a.mjs → relations-CN0-aw6p.mjs} +2 -2
  58. package/dist/_chunks/{relations-CTje5t-a.mjs.map → relations-CN0-aw6p.mjs.map} +1 -1
  59. package/dist/_chunks/{relations-BbHizA5K.js → relations-DGzD7ORa.js} +2 -2
  60. package/dist/_chunks/{relations-BbHizA5K.js.map → relations-DGzD7ORa.js.map} +1 -1
  61. package/dist/admin/index.js +1 -1
  62. package/dist/admin/index.mjs +1 -1
  63. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  64. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +3 -7
  65. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +10 -2
  66. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +30 -3
  67. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  68. package/dist/server/index.js +0 -3
  69. package/dist/server/index.js.map +1 -1
  70. package/dist/server/index.mjs +0 -3
  71. package/dist/server/index.mjs.map +1 -1
  72. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  73. package/package.json +8 -8
  74. package/dist/_chunks/EditViewPage-0MiFkXa8.mjs.map +0 -1
  75. package/dist/_chunks/EditViewPage-DbcGfyqK.js.map +0 -1
  76. package/dist/_chunks/Field-BDMSCcy5.mjs.map +0 -1
  77. package/dist/_chunks/Field-BG1xu38N.js.map +0 -1
  78. package/dist/_chunks/Form-9BnFyUjy.js.map +0 -1
  79. package/dist/_chunks/Form-CPVWavB8.mjs.map +0 -1
  80. package/dist/_chunks/History-BVpd8LP3.mjs.map +0 -1
  81. package/dist/_chunks/History-BWWxLt2Z.js.map +0 -1
  82. package/dist/_chunks/ListConfigurationPage-6swzjdAZ.js.map +0 -1
  83. package/dist/_chunks/ListConfigurationPage-DozVMKcR.mjs.map +0 -1
  84. package/dist/_chunks/ListViewPage-BlzfjS2Q.js.map +0 -1
  85. package/dist/_chunks/ListViewPage-Ds0ulgfG.mjs.map +0 -1
  86. package/dist/_chunks/index-CWpLBSt0.js.map +0 -1
  87. package/dist/_chunks/index-JNNNKUHs.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"en-Ux26r5pl.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"en-9GwRW_ku.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -274,8 +274,6 @@ const en = {
274
274
  "history.content.missing-relations.title": "{number, plural, =1 {Missing relation} other {{number} missing relations}}",
275
275
  "history.content.missing-relations.message": "{number, plural, =1 {It has} other {They have}} been deleted and can't be restored.",
276
276
  "history.content.no-relations": "No relations.",
277
- "history.content.localized": "This value is specific to this locale. If you restore this version, the content will not be replaced for other locales.",
278
- "history.content.not-localized": "This value is common to all locales. If you restore this version, the content will be replaced for all locales.",
279
277
  "history.restore.confirm.button": "Restore",
280
278
  "history.restore.confirm.title": "Are you sure you want to restore this version?",
281
279
  "history.restore.confirm.message": "{isDraft, select, true {The restored content will override your draft.} other {The restored content won't be published, it will override the draft and be saved as pending changes. You'll be able to publish the changes at anytime.}}",
@@ -288,4 +286,4 @@ exports.default = en;
288
286
  exports.groups = groups;
289
287
  exports.models = models;
290
288
  exports.pageNotFound = pageNotFound;
291
- //# sourceMappingURL=en-fbKQxLGn.js.map
289
+ //# sourceMappingURL=en-DZXjRiWA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"en-fbKQxLGn.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"en-DZXjRiWA.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,7 +6,7 @@ import { useIntl } from "react-intl";
6
6
  import { useNavigate, useParams, Navigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
7
7
  import * as React from "react";
8
8
  import { lazy } from "react";
9
- import { Button, Menu, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, SingleSelect, SingleSelectOption, Box, Loader, IconButton, Tooltip, LinkButton } from "@strapi/design-system";
9
+ import { Menu, VisuallyHidden, Flex, Typography, Dialog, DialogBody, DialogFooter, Button, ModalLayout, ModalHeader, ModalBody, Box, Radio, Status, SingleSelect, SingleSelectOption, ModalFooter, Loader, IconButton, Tooltip, LinkButton } from "@strapi/design-system";
10
10
  import { styled } from "styled-components";
11
11
  import * as yup from "yup";
12
12
  import { ValidationError } from "yup";
@@ -1265,7 +1265,7 @@ const useDocumentActions = () => {
1265
1265
  };
1266
1266
  };
1267
1267
  const ProtectedHistoryPage = lazy(
1268
- () => import("./History-BVpd8LP3.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1268
+ () => import("./History-Bu53Yfw-.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1269
1269
  );
1270
1270
  const routes$1 = [
1271
1271
  {
@@ -1278,31 +1278,31 @@ const routes$1 = [
1278
1278
  }
1279
1279
  ];
1280
1280
  const ProtectedEditViewPage = lazy(
1281
- () => import("./EditViewPage-0MiFkXa8.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1281
+ () => import("./EditViewPage-CzuJgWWp.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1282
1282
  );
1283
1283
  const ProtectedListViewPage = lazy(
1284
- () => import("./ListViewPage-Ds0ulgfG.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1284
+ () => import("./ListViewPage-BO_mOXIl.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1285
1285
  );
1286
1286
  const ProtectedListConfiguration = lazy(
1287
- () => import("./ListConfigurationPage-DozVMKcR.mjs").then((mod) => ({
1287
+ () => import("./ListConfigurationPage-TqrmwjPN.mjs").then((mod) => ({
1288
1288
  default: mod.ProtectedListConfiguration
1289
1289
  }))
1290
1290
  );
1291
1291
  const ProtectedEditConfigurationPage = lazy(
1292
- () => import("./EditConfigurationPage-BwuIPOJG.mjs").then((mod) => ({
1292
+ () => import("./EditConfigurationPage-CZLbgfIp.mjs").then((mod) => ({
1293
1293
  default: mod.ProtectedEditConfigurationPage
1294
1294
  }))
1295
1295
  );
1296
1296
  const ProtectedComponentConfigurationPage = lazy(
1297
- () => import("./ComponentConfigurationPage-gdUj_t-O.mjs").then((mod) => ({
1297
+ () => import("./ComponentConfigurationPage-Cxz51Sve.mjs").then((mod) => ({
1298
1298
  default: mod.ProtectedComponentConfigurationPage
1299
1299
  }))
1300
1300
  );
1301
1301
  const NoPermissions = lazy(
1302
- () => import("./NoPermissionsPage-BT2Tn0D_.mjs").then((mod) => ({ default: mod.NoPermissions }))
1302
+ () => import("./NoPermissionsPage-DTXi042N.mjs").then((mod) => ({ default: mod.NoPermissions }))
1303
1303
  );
1304
1304
  const NoContentType = lazy(
1305
- () => import("./NoContentTypePage-BH11kaKt.mjs").then((mod) => ({ default: mod.NoContentType }))
1305
+ () => import("./NoContentTypePage-DqB0QV0k.mjs").then((mod) => ({ default: mod.NoContentType }))
1306
1306
  );
1307
1307
  const CollectionTypePages = () => {
1308
1308
  const { collectionType } = useParams();
@@ -1592,20 +1592,22 @@ const DocumentActionConfirmDialog = ({
1592
1592
  }
1593
1593
  onClose();
1594
1594
  };
1595
- return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
1596
- /* @__PURE__ */ jsx(Dialog.Header, { children: title }),
1597
- /* @__PURE__ */ jsx(Dialog.Body, { children: content }),
1598
- /* @__PURE__ */ jsxs(Dialog.Footer, { children: [
1599
- /* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: formatMessage({
1600
- id: "app.components.Button.cancel",
1601
- defaultMessage: "Cancel"
1602
- }) }) }),
1603
- /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, children: formatMessage({
1604
- id: "app.components.Button.confirm",
1605
- defaultMessage: "Confirm"
1606
- }) })
1607
- ] })
1608
- ] }) });
1595
+ return /* @__PURE__ */ jsxs(Dialog, { isOpen, title, onClose: handleClose, children: [
1596
+ /* @__PURE__ */ jsx(DialogBody, { children: content }),
1597
+ /* @__PURE__ */ jsx(
1598
+ DialogFooter,
1599
+ {
1600
+ startAction: /* @__PURE__ */ jsx(Button, { onClick: handleClose, variant: "tertiary", children: formatMessage({
1601
+ id: "app.components.Button.cancel",
1602
+ defaultMessage: "Cancel"
1603
+ }) }),
1604
+ endAction: /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, children: formatMessage({
1605
+ id: "app.components.Button.confirm",
1606
+ defaultMessage: "Confirm"
1607
+ }) })
1608
+ }
1609
+ )
1610
+ ] });
1609
1611
  };
1610
1612
  const DocumentActionModal = ({
1611
1613
  isOpen,
@@ -1615,17 +1617,34 @@ const DocumentActionModal = ({
1615
1617
  content: Content,
1616
1618
  onModalClose
1617
1619
  }) => {
1620
+ const id = React.useId();
1621
+ if (!isOpen) {
1622
+ return null;
1623
+ }
1618
1624
  const handleClose = () => {
1619
1625
  if (onClose) {
1620
1626
  onClose();
1621
1627
  }
1622
1628
  onModalClose();
1623
1629
  };
1624
- return /* @__PURE__ */ jsx(Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
1625
- /* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsx(Modal.Title, { children: title }) }),
1626
- typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : /* @__PURE__ */ jsx(Modal.Body, { children: Content }),
1627
- typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer
1628
- ] }) });
1630
+ return /* @__PURE__ */ jsxs(ModalLayout, { borderRadius: "4px", overflow: "hidden", onClose: handleClose, labelledBy: id, children: [
1631
+ /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id, children: title }) }),
1632
+ /* @__PURE__ */ jsx(ModalBody, { children: typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : Content }),
1633
+ /* @__PURE__ */ jsx(
1634
+ Box,
1635
+ {
1636
+ paddingTop: 4,
1637
+ paddingBottom: 4,
1638
+ paddingLeft: 5,
1639
+ paddingRight: 5,
1640
+ borderWidth: "1px 0 0 0",
1641
+ borderStyle: "solid",
1642
+ borderColor: "neutral150",
1643
+ background: "neutral100",
1644
+ children: typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer
1645
+ }
1646
+ )
1647
+ ] });
1629
1648
  };
1630
1649
  const PublishAction$1 = ({
1631
1650
  activeTab,
@@ -1843,8 +1862,10 @@ const UnpublishAction$1 = ({
1843
1862
  const { toggleNotification } = useNotification();
1844
1863
  const [shouldKeepDraft, setShouldKeepDraft] = React.useState(true);
1845
1864
  const isDocumentModified = document?.status === "modified";
1846
- const handleChange = (value) => {
1847
- setShouldKeepDraft(value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
1865
+ const handleChange = (e) => {
1866
+ if ("value" in e.target) {
1867
+ setShouldKeepDraft(e.target.value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
1868
+ }
1848
1869
  };
1849
1870
  if (!schema?.options?.draftAndPublish) {
1850
1871
  return null;
@@ -1894,24 +1915,40 @@ const UnpublishAction$1 = ({
1894
1915
  }) })
1895
1916
  ] }),
1896
1917
  /* @__PURE__ */ jsxs(
1897
- Radio.Group,
1918
+ Flex,
1898
1919
  {
1899
- defaultValue: UNPUBLISH_DRAFT_OPTIONS.KEEP,
1900
- name: "discard-options",
1901
- "aria-label": formatMessage({
1902
- id: "content-manager.actions.unpublish.dialog.radio-label",
1903
- defaultMessage: "Choose an option to unpublish the document."
1904
- }),
1905
- onValueChange: handleChange,
1920
+ onChange: handleChange,
1921
+ direction: "column",
1922
+ alignItems: "flex-start",
1923
+ tag: "fieldset",
1924
+ borderWidth: 0,
1925
+ gap: 3,
1906
1926
  children: [
1907
- /* @__PURE__ */ jsx(Radio.Item, { checked: shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.KEEP, children: formatMessage({
1908
- id: "content-manager.actions.unpublish.dialog.option.keep-draft",
1909
- defaultMessage: "Keep draft"
1910
- }) }),
1911
- /* @__PURE__ */ jsx(Radio.Item, { checked: !shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.DISCARD, children: formatMessage({
1912
- id: "content-manager.actions.unpublish.dialog.option.replace-draft",
1913
- defaultMessage: "Replace draft"
1914
- }) })
1927
+ /* @__PURE__ */ jsx(VisuallyHidden, { tag: "legend" }),
1928
+ /* @__PURE__ */ jsx(
1929
+ Radio,
1930
+ {
1931
+ checked: shouldKeepDraft,
1932
+ value: UNPUBLISH_DRAFT_OPTIONS.KEEP,
1933
+ name: "discard-options",
1934
+ children: formatMessage({
1935
+ id: "content-manager.actions.unpublish.dialog.option.keep-draft",
1936
+ defaultMessage: "Keep draft"
1937
+ })
1938
+ }
1939
+ ),
1940
+ /* @__PURE__ */ jsx(
1941
+ Radio,
1942
+ {
1943
+ checked: !shouldKeepDraft,
1944
+ value: UNPUBLISH_DRAFT_OPTIONS.DISCARD,
1945
+ name: "discard-options",
1946
+ children: formatMessage({
1947
+ id: "content-manager.actions.unpublish.dialog.option.replace-draft",
1948
+ defaultMessage: "Replace draft"
1949
+ })
1950
+ }
1951
+ )
1915
1952
  ]
1916
1953
  }
1917
1954
  )
@@ -2764,23 +2801,30 @@ const ConfirmBulkActionDialog = ({
2764
2801
  endAction
2765
2802
  }) => {
2766
2803
  const { formatMessage } = useIntl();
2767
- return /* @__PURE__ */ jsx(Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
2768
- /* @__PURE__ */ jsx(Dialog.Header, { children: formatMessage({
2769
- id: "app.components.ConfirmDialog.title",
2770
- defaultMessage: "Confirmation"
2771
- }) }),
2772
- /* @__PURE__ */ jsx(Dialog.Body, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
2773
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
2774
- dialogBody
2775
- ] }) }),
2776
- /* @__PURE__ */ jsxs(Dialog.Footer, { children: [
2777
- /* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { fullWidth: true, onClick: onToggleDialog, variant: "tertiary", children: formatMessage({
2778
- id: "app.components.Button.cancel",
2779
- defaultMessage: "Cancel"
2780
- }) }) }),
2781
- endAction
2782
- ] })
2783
- ] }) });
2804
+ return /* @__PURE__ */ jsxs(
2805
+ Dialog,
2806
+ {
2807
+ onClose: onToggleDialog,
2808
+ title: formatMessage({
2809
+ id: "app.components.ConfirmDialog.title",
2810
+ defaultMessage: "Confirmation"
2811
+ }),
2812
+ isOpen,
2813
+ children: [
2814
+ /* @__PURE__ */ jsx(DialogBody, { icon: /* @__PURE__ */ jsx(WarningCircle, {}), children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: dialogBody }) }),
2815
+ /* @__PURE__ */ jsx(
2816
+ DialogFooter,
2817
+ {
2818
+ startAction: /* @__PURE__ */ jsx(Button, { onClick: onToggleDialog, variant: "tertiary", children: formatMessage({
2819
+ id: "app.components.Button.cancel",
2820
+ defaultMessage: "Cancel"
2821
+ }) }),
2822
+ endAction
2823
+ }
2824
+ )
2825
+ ]
2826
+ }
2827
+ );
2784
2828
  };
2785
2829
  const BoldChunk$1 = (chunks) => /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: chunks });
2786
2830
  const ConfirmDialogPublishAll = ({
@@ -3122,7 +3166,7 @@ const SelectedEntriesModalContent = ({
3122
3166
  );
3123
3167
  };
3124
3168
  return /* @__PURE__ */ jsxs(Fragment, { children: [
3125
- /* @__PURE__ */ jsxs(Modal.Body, { children: [
3169
+ /* @__PURE__ */ jsxs(ModalBody, { children: [
3126
3170
  /* @__PURE__ */ jsx(Typography, { children: getFormattedCountMessage() }),
3127
3171
  /* @__PURE__ */ jsx(Box, { marginTop: 5, children: /* @__PURE__ */ jsx(
3128
3172
  SelectedEntriesTableContent,
@@ -3134,24 +3178,27 @@ const SelectedEntriesModalContent = ({
3134
3178
  }
3135
3179
  ) })
3136
3180
  ] }),
3137
- /* @__PURE__ */ jsxs(Modal.Footer, { children: [
3138
- /* @__PURE__ */ jsx(Button, { onClick: toggleModal, variant: "tertiary", children: formatMessage({
3139
- id: "app.components.Button.cancel",
3140
- defaultMessage: "Cancel"
3141
- }) }),
3142
- /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
3143
- /* @__PURE__ */ jsx(Button, { onClick: refetch, variant: "tertiary", loading: isFetching, children: formatMessage({ id: "app.utils.refresh", defaultMessage: "Refresh" }) }),
3144
- /* @__PURE__ */ jsx(
3145
- Button,
3146
- {
3147
- onClick: toggleDialog,
3148
- disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || selectedEntriesPublished === selectedEntries.length || isLoading,
3149
- loading: isSubmittingForm,
3150
- children: formatMessage({ id: "app.utils.publish", defaultMessage: "Publish" })
3151
- }
3152
- )
3153
- ] })
3154
- ] }),
3181
+ /* @__PURE__ */ jsx(
3182
+ ModalFooter,
3183
+ {
3184
+ startActions: /* @__PURE__ */ jsx(Button, { onClick: toggleModal, variant: "tertiary", children: formatMessage({
3185
+ id: "app.components.Button.cancel",
3186
+ defaultMessage: "Cancel"
3187
+ }) }),
3188
+ endActions: /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
3189
+ /* @__PURE__ */ jsx(Button, { onClick: refetch, variant: "tertiary", loading: isFetching, children: formatMessage({ id: "app.utils.refresh", defaultMessage: "Refresh" }) }),
3190
+ /* @__PURE__ */ jsx(
3191
+ Button,
3192
+ {
3193
+ onClick: toggleDialog,
3194
+ disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || selectedEntriesPublished === selectedEntries.length || isLoading,
3195
+ loading: isSubmittingForm,
3196
+ children: formatMessage({ id: "app.utils.publish", defaultMessage: "Publish" })
3197
+ }
3198
+ )
3199
+ ] })
3200
+ }
3201
+ ),
3155
3202
  /* @__PURE__ */ jsx(
3156
3203
  ConfirmDialogPublishAll,
3157
3204
  {
@@ -3216,10 +3263,143 @@ const BulkActionsRenderer = () => {
3216
3263
  documents: selectedRows
3217
3264
  },
3218
3265
  descriptions: plugins["content-manager"].apis.getBulkActions(),
3219
- children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsx(DocumentActionButton, { ...action }, action.id))
3266
+ children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsx(BulkActionAction, { ...action }, action.id))
3220
3267
  }
3221
3268
  ) });
3222
3269
  };
3270
+ const BulkActionAction = (action) => {
3271
+ const [dialogId, setDialogId] = React.useState(null);
3272
+ const { toggleNotification } = useNotification();
3273
+ const handleClick = (action2) => (e) => {
3274
+ const { onClick, dialog, id } = action2;
3275
+ if (onClick) {
3276
+ onClick(e);
3277
+ }
3278
+ if (dialog) {
3279
+ switch (dialog.type) {
3280
+ case "notification":
3281
+ toggleNotification({
3282
+ title: dialog.title,
3283
+ message: dialog.content,
3284
+ type: dialog.status,
3285
+ timeout: dialog.timeout,
3286
+ onClose: dialog.onClose
3287
+ });
3288
+ break;
3289
+ case "dialog":
3290
+ case "modal": {
3291
+ e.preventDefault();
3292
+ setDialogId(id);
3293
+ }
3294
+ }
3295
+ }
3296
+ };
3297
+ const handleClose = () => {
3298
+ setDialogId(null);
3299
+ if (action.dialog?.type === "modal" && action.dialog?.onClose) {
3300
+ action.dialog.onClose();
3301
+ }
3302
+ };
3303
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3304
+ /* @__PURE__ */ jsx(
3305
+ Button,
3306
+ {
3307
+ disabled: action.disabled,
3308
+ startIcon: action.icon,
3309
+ variant: action.variant,
3310
+ onClick: handleClick(action),
3311
+ children: action.label
3312
+ }
3313
+ ),
3314
+ action.dialog?.type === "dialog" ? /* @__PURE__ */ jsx(
3315
+ BulkActionConfirmDialog,
3316
+ {
3317
+ ...action.dialog,
3318
+ variant: action.variant,
3319
+ isOpen: dialogId === action.id,
3320
+ onClose: handleClose
3321
+ }
3322
+ ) : null,
3323
+ action.dialog?.type === "modal" ? /* @__PURE__ */ jsx(
3324
+ BulkActionModal,
3325
+ {
3326
+ ...action.dialog,
3327
+ onModalClose: handleClose,
3328
+ isOpen: dialogId === action.id
3329
+ }
3330
+ ) : null
3331
+ ] });
3332
+ };
3333
+ const BulkActionConfirmDialog = ({
3334
+ onClose,
3335
+ onCancel,
3336
+ onConfirm,
3337
+ title,
3338
+ content,
3339
+ confirmButton,
3340
+ isOpen,
3341
+ variant = "secondary"
3342
+ }) => {
3343
+ const { formatMessage } = useIntl();
3344
+ const handleClose = async () => {
3345
+ if (onCancel) {
3346
+ await onCancel();
3347
+ }
3348
+ onClose();
3349
+ };
3350
+ const handleConfirm = async () => {
3351
+ if (onConfirm) {
3352
+ await onConfirm();
3353
+ }
3354
+ onClose();
3355
+ };
3356
+ return /* @__PURE__ */ jsxs(Dialog, { isOpen, title, onClose: handleClose, children: [
3357
+ /* @__PURE__ */ jsx(DialogBody, { icon: /* @__PURE__ */ jsx(WarningCircle, {}), children: content }),
3358
+ /* @__PURE__ */ jsx(
3359
+ DialogFooter,
3360
+ {
3361
+ startAction: /* @__PURE__ */ jsx(Button, { onClick: handleClose, variant: "tertiary", children: formatMessage({
3362
+ id: "app.components.Button.cancel",
3363
+ defaultMessage: "Cancel"
3364
+ }) }),
3365
+ endAction: /* @__PURE__ */ jsx(
3366
+ Button,
3367
+ {
3368
+ onClick: handleConfirm,
3369
+ variant: variant === "danger-light" ? variant : "secondary",
3370
+ startIcon: variant === "danger-light" ? /* @__PURE__ */ jsx(Trash, {}) : /* @__PURE__ */ jsx(Check, {}),
3371
+ children: confirmButton ? confirmButton : formatMessage({
3372
+ id: "app.components.Button.confirm",
3373
+ defaultMessage: "Confirm"
3374
+ })
3375
+ }
3376
+ )
3377
+ }
3378
+ )
3379
+ ] });
3380
+ };
3381
+ const BulkActionModal = ({
3382
+ isOpen,
3383
+ title,
3384
+ onClose,
3385
+ content: Content,
3386
+ onModalClose
3387
+ }) => {
3388
+ const id = React.useId();
3389
+ if (!isOpen) {
3390
+ return null;
3391
+ }
3392
+ const handleClose = () => {
3393
+ if (onClose) {
3394
+ onClose();
3395
+ }
3396
+ onModalClose();
3397
+ };
3398
+ return /* @__PURE__ */ jsxs(ModalLayout, { borderRadius: "4px", overflow: "hidden", onClose: handleClose, labelledBy: id, children: [
3399
+ /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id, children: title }) }),
3400
+ /* @__PURE__ */ jsx(Content, { onClose: handleClose })
3401
+ ] });
3402
+ };
3223
3403
  const DeleteAction = ({ documents, model }) => {
3224
3404
  const { formatMessage } = useIntl();
3225
3405
  const { schema: contentType } = useDoc();
@@ -3252,7 +3432,6 @@ const DeleteAction = ({ documents, model }) => {
3252
3432
  defaultMessage: "Confirmation"
3253
3433
  }),
3254
3434
  content: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
3255
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
3256
3435
  /* @__PURE__ */ jsx(Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
3257
3436
  id: "popUpWarning.bodyMessage.contentType.delete.all",
3258
3437
  defaultMessage: "Are you sure you want to delete these entries?"
@@ -3302,7 +3481,6 @@ const UnpublishAction = ({ documents, model }) => {
3302
3481
  defaultMessage: "Confirmation"
3303
3482
  }),
3304
3483
  content: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
3305
- /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
3306
3484
  /* @__PURE__ */ jsx(Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
3307
3485
  id: "popUpWarning.bodyMessage.contentType.unpublish.all",
3308
3486
  defaultMessage: "Are you sure you want to unpublish these entries?"
@@ -3688,7 +3866,7 @@ const index = {
3688
3866
  defaultMessage: "Content Manager"
3689
3867
  },
3690
3868
  permissions: [],
3691
- Component: () => import("./layout-DC503LnF.mjs").then((mod) => ({ default: mod.Layout })),
3869
+ Component: () => import("./layout-omucV6TV.mjs").then((mod) => ({ default: mod.Layout })),
3692
3870
  position: 1
3693
3871
  });
3694
3872
  app.registerPlugin(cm.config);
@@ -3696,7 +3874,7 @@ const index = {
3696
3874
  async registerTrads({ locales }) {
3697
3875
  const importedTrads = await Promise.all(
3698
3876
  locales.map((locale) => {
3699
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-Ux26r5pl.mjs"), "./translations/es.json": () => import("./es-CeXiYflN.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr-CD9VFbPM.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-CtsUxOvk.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
3877
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => import("./ar-CCEVvqGG.mjs"), "./translations/ca.json": () => import("./ca-5U32ON2v.mjs"), "./translations/cs.json": () => import("./cs-CM2aBUar.mjs"), "./translations/de.json": () => import("./de-C72KDNOl.mjs"), "./translations/en.json": () => import("./en-9GwRW_ku.mjs"), "./translations/es.json": () => import("./es-CeXiYflN.mjs"), "./translations/eu.json": () => import("./eu-CdALomew.mjs"), "./translations/fr.json": () => import("./fr-CD9VFbPM.mjs"), "./translations/gu.json": () => import("./gu-CNpaMDpH.mjs"), "./translations/hi.json": () => import("./hi-Dwvd04m3.mjs"), "./translations/hu.json": () => import("./hu-CeYvaaO0.mjs"), "./translations/id.json": () => import("./id-BtwA9WJT.mjs"), "./translations/it.json": () => import("./it-BrVPqaf1.mjs"), "./translations/ja.json": () => import("./ja-CtsUxOvk.mjs"), "./translations/ko.json": () => import("./ko-HVQRlfUI.mjs"), "./translations/ml.json": () => import("./ml-BihZwQit.mjs"), "./translations/ms.json": () => import("./ms-m_WjyWx7.mjs"), "./translations/nl.json": () => import("./nl-D4R9gHx5.mjs"), "./translations/pl.json": () => import("./pl-sbx9mSt_.mjs"), "./translations/pt-BR.json": () => import("./pt-BR-C71iDxnh.mjs"), "./translations/pt.json": () => import("./pt-BsaFvS8-.mjs"), "./translations/ru.json": () => import("./ru-BE6A4Exp.mjs"), "./translations/sa.json": () => import("./sa-Dag0k-Z8.mjs"), "./translations/sk.json": () => import("./sk-BFg-R8qJ.mjs"), "./translations/sv.json": () => import("./sv-CUnfWGsh.mjs"), "./translations/th.json": () => import("./th-BqbI8lIT.mjs"), "./translations/tr.json": () => import("./tr-CgeK3wJM.mjs"), "./translations/uk.json": () => import("./uk-CR-zDhAY.mjs"), "./translations/vi.json": () => import("./vi-DUXIk_fw.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-BPQcRIyH.mjs"), "./translations/zh.json": () => import("./zh-BWZspA60.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
3700
3878
  return {
3701
3879
  data: prefixPluginTranslations(data, PLUGIN_ID),
3702
3880
  locale
@@ -3756,4 +3934,4 @@ export {
3756
3934
  capitalise as y,
3757
3935
  useUpdateContentTypeConfigurationMutation as z
3758
3936
  };
3759
- //# sourceMappingURL=index-JNNNKUHs.mjs.map
3937
+ //# sourceMappingURL=index-Dahjdw4h.mjs.map