@strapi/content-manager 0.0.0-experimental.c3e9d4b26f9fd3d9eb530b5c11f9baa1d09b13ad → 0.0.0-experimental.d53e940834bf72ddc725f1d2fd36dac9abec30cb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js → ComponentConfigurationPage-C-49MccQ.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js.map → ComponentConfigurationPage-C-49MccQ.js.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs → ComponentConfigurationPage-DmwmiFQy.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs.map → ComponentConfigurationPage-DmwmiFQy.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js → EditConfigurationPage-DjFJw56M.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js.map → EditConfigurationPage-DjFJw56M.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs → EditConfigurationPage-JT3E7NZy.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs.map → EditConfigurationPage-JT3E7NZy.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-DWb0DE7R.mjs → EditViewPage-CPj61RMh.mjs} +46 -46
- package/dist/_chunks/EditViewPage-CPj61RMh.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-CTTDHKkQ.js → EditViewPage-zT3fBr4Y.js} +45 -45
- package/dist/_chunks/EditViewPage-zT3fBr4Y.js.map +1 -0
- package/dist/_chunks/{Field-C5Z1Ivdv.js → Field-Boxf9Ajp.js} +372 -117
- package/dist/_chunks/Field-Boxf9Ajp.js.map +1 -0
- package/dist/_chunks/{Field-DnStdvQw.mjs → Field-dha5VnIQ.mjs} +373 -118
- package/dist/_chunks/Field-dha5VnIQ.mjs.map +1 -0
- package/dist/_chunks/{Form-DqGgE55Q.mjs → Form-DHrru2AV.mjs} +27 -28
- package/dist/_chunks/Form-DHrru2AV.mjs.map +1 -0
- package/dist/_chunks/{Form-B81OtW-k.js → Form-y5g1SRsh.js} +25 -26
- package/dist/_chunks/Form-y5g1SRsh.js.map +1 -0
- package/dist/_chunks/{History-DS6-HCYX.mjs → History-Bru_KoeP.mjs} +12 -14
- package/dist/_chunks/History-Bru_KoeP.mjs.map +1 -0
- package/dist/_chunks/{History-4NbOq2dX.js → History-CqN6K7SX.js} +11 -13
- package/dist/_chunks/History-CqN6K7SX.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-DQJJltko.mjs → ListConfigurationPage-D8wGABj0.mjs} +43 -45
- package/dist/_chunks/ListConfigurationPage-D8wGABj0.mjs.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-CpfstlYY.js → ListConfigurationPage-R_p-SbHZ.js} +42 -43
- package/dist/_chunks/ListConfigurationPage-R_p-SbHZ.js.map +1 -0
- package/dist/_chunks/{ListViewPage-nQrOQuVo.mjs → ListViewPage-SID6TRb9.mjs} +48 -65
- package/dist/_chunks/ListViewPage-SID6TRb9.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-CA3I75m5.js → ListViewPage-pEw_zug9.js} +47 -64
- package/dist/_chunks/ListViewPage-pEw_zug9.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js → NoContentTypePage-C5dcQojD.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js.map → NoContentTypePage-C5dcQojD.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs → NoContentTypePage-CJ7UXwrQ.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs.map → NoContentTypePage-CJ7UXwrQ.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs → NoPermissionsPage-B7syEq5E.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs.map → NoPermissionsPage-B7syEq5E.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-CO2MK200.js → NoPermissionsPage-BtPrImPP.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-CO2MK200.js.map → NoPermissionsPage-BtPrImPP.js.map} +1 -1
- package/dist/_chunks/{Relations-BDRl99Ux.mjs → Relations-B9Crnhnn.mjs} +3 -3
- package/dist/_chunks/{Relations-BDRl99Ux.mjs.map → Relations-B9Crnhnn.mjs.map} +1 -1
- package/dist/_chunks/{Relations-DG2jnOcr.js → Relations-DjTQ5kGB.js} +3 -3
- package/dist/_chunks/{Relations-DG2jnOcr.js.map → Relations-DjTQ5kGB.js.map} +1 -1
- package/dist/_chunks/{index-Drt2DN7v.mjs → index-DJXJw9V5.mjs} +122 -279
- package/dist/_chunks/index-DJXJw9V5.mjs.map +1 -0
- package/dist/_chunks/{index-BZoNZMXL.js → index-DVPWZkbS.js} +109 -266
- package/dist/_chunks/index-DVPWZkbS.js.map +1 -0
- package/dist/_chunks/{layout-BzAbmoO6.mjs → layout-Bau7ZfLV.mjs} +5 -5
- package/dist/_chunks/{layout-BzAbmoO6.mjs.map → layout-Bau7ZfLV.mjs.map} +1 -1
- package/dist/_chunks/{layout-DEYBqgF1.js → layout-Dm6fbiQj.js} +4 -4
- package/dist/_chunks/{layout-DEYBqgF1.js.map → layout-Dm6fbiQj.js.map} +1 -1
- package/dist/_chunks/{relations-D26zVRdi.mjs → relations-BH_kBSJ0.mjs} +2 -2
- package/dist/_chunks/{relations-D26zVRdi.mjs.map → relations-BH_kBSJ0.mjs.map} +1 -1
- package/dist/_chunks/{relations-D0eZ4VWw.js → relations-CKnpRgrN.js} +2 -2
- package/dist/_chunks/{relations-D0eZ4VWw.js.map → relations-CKnpRgrN.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +4 -4
- package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +7 -3
- package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +2 -10
- package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
- package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
- package/dist/server/index.js +5 -4
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +5 -4
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/_chunks/EditViewPage-CTTDHKkQ.js.map +0 -1
- package/dist/_chunks/EditViewPage-DWb0DE7R.mjs.map +0 -1
- package/dist/_chunks/Field-C5Z1Ivdv.js.map +0 -1
- package/dist/_chunks/Field-DnStdvQw.mjs.map +0 -1
- package/dist/_chunks/Form-B81OtW-k.js.map +0 -1
- package/dist/_chunks/Form-DqGgE55Q.mjs.map +0 -1
- package/dist/_chunks/History-4NbOq2dX.js.map +0 -1
- package/dist/_chunks/History-DS6-HCYX.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-CpfstlYY.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-DQJJltko.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-CA3I75m5.js.map +0 -1
- package/dist/_chunks/ListViewPage-nQrOQuVo.mjs.map +0 -1
- package/dist/_chunks/index-BZoNZMXL.js.map +0 -1
- package/dist/_chunks/index-Drt2DN7v.mjs.map +0 -1
@@ -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 { Menu, VisuallyHidden, Flex, Typography, Dialog,
|
9
|
+
import { Button, Menu, VisuallyHidden, Flex, Box, Typography, Dialog, Modal, Radio, Status, SingleSelect, SingleSelectOption, 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";
|
@@ -198,6 +198,7 @@ const contentManagerApi = adminApi.enhanceEndpoints({
|
|
198
198
|
]
|
199
199
|
});
|
200
200
|
const documentApi = contentManagerApi.injectEndpoints({
|
201
|
+
overrideExisting: true,
|
201
202
|
endpoints: (builder) => ({
|
202
203
|
autoCloneDocument: builder.mutation({
|
203
204
|
query: ({ model, sourceId, query }) => ({
|
@@ -1265,7 +1266,7 @@ const useDocumentActions = () => {
|
|
1265
1266
|
};
|
1266
1267
|
};
|
1267
1268
|
const ProtectedHistoryPage = lazy(
|
1268
|
-
() => import("./History-
|
1269
|
+
() => import("./History-Bru_KoeP.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1269
1270
|
);
|
1270
1271
|
const routes$1 = [
|
1271
1272
|
{
|
@@ -1278,31 +1279,31 @@ const routes$1 = [
|
|
1278
1279
|
}
|
1279
1280
|
];
|
1280
1281
|
const ProtectedEditViewPage = lazy(
|
1281
|
-
() => import("./EditViewPage-
|
1282
|
+
() => import("./EditViewPage-CPj61RMh.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1282
1283
|
);
|
1283
1284
|
const ProtectedListViewPage = lazy(
|
1284
|
-
() => import("./ListViewPage-
|
1285
|
+
() => import("./ListViewPage-SID6TRb9.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1285
1286
|
);
|
1286
1287
|
const ProtectedListConfiguration = lazy(
|
1287
|
-
() => import("./ListConfigurationPage-
|
1288
|
+
() => import("./ListConfigurationPage-D8wGABj0.mjs").then((mod) => ({
|
1288
1289
|
default: mod.ProtectedListConfiguration
|
1289
1290
|
}))
|
1290
1291
|
);
|
1291
1292
|
const ProtectedEditConfigurationPage = lazy(
|
1292
|
-
() => import("./EditConfigurationPage-
|
1293
|
+
() => import("./EditConfigurationPage-JT3E7NZy.mjs").then((mod) => ({
|
1293
1294
|
default: mod.ProtectedEditConfigurationPage
|
1294
1295
|
}))
|
1295
1296
|
);
|
1296
1297
|
const ProtectedComponentConfigurationPage = lazy(
|
1297
|
-
() => import("./ComponentConfigurationPage-
|
1298
|
+
() => import("./ComponentConfigurationPage-DmwmiFQy.mjs").then((mod) => ({
|
1298
1299
|
default: mod.ProtectedComponentConfigurationPage
|
1299
1300
|
}))
|
1300
1301
|
);
|
1301
1302
|
const NoPermissions = lazy(
|
1302
|
-
() => import("./NoPermissionsPage-
|
1303
|
+
() => import("./NoPermissionsPage-B7syEq5E.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1303
1304
|
);
|
1304
1305
|
const NoContentType = lazy(
|
1305
|
-
() => import("./NoContentTypePage-
|
1306
|
+
() => import("./NoContentTypePage-CJ7UXwrQ.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1306
1307
|
);
|
1307
1308
|
const CollectionTypePages = () => {
|
1308
1309
|
const { collectionType } = useParams();
|
@@ -1509,7 +1510,7 @@ const DocumentActionsMenu = ({
|
|
1509
1510
|
display: "block",
|
1510
1511
|
children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", gap: 4, children: [
|
1511
1512
|
/* @__PURE__ */ jsxs(Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
|
1512
|
-
action.icon,
|
1513
|
+
/* @__PURE__ */ jsx(Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
|
1513
1514
|
action.label
|
1514
1515
|
] }),
|
1515
1516
|
action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsx(
|
@@ -1570,6 +1571,18 @@ const convertActionVariantToColor = (variant = "secondary") => {
|
|
1570
1571
|
return "primary600";
|
1571
1572
|
}
|
1572
1573
|
};
|
1574
|
+
const convertActionVariantToIconColor = (variant = "secondary") => {
|
1575
|
+
switch (variant) {
|
1576
|
+
case "danger":
|
1577
|
+
return "danger600";
|
1578
|
+
case "secondary":
|
1579
|
+
return "neutral500";
|
1580
|
+
case "success":
|
1581
|
+
return "success600";
|
1582
|
+
default:
|
1583
|
+
return "primary600";
|
1584
|
+
}
|
1585
|
+
};
|
1573
1586
|
const DocumentActionConfirmDialog = ({
|
1574
1587
|
onClose,
|
1575
1588
|
onCancel,
|
@@ -1592,22 +1605,20 @@ const DocumentActionConfirmDialog = ({
|
|
1592
1605
|
}
|
1593
1606
|
onClose();
|
1594
1607
|
};
|
1595
|
-
return /* @__PURE__ */
|
1596
|
-
/* @__PURE__ */ jsx(
|
1597
|
-
/* @__PURE__ */ jsx(
|
1598
|
-
|
1599
|
-
{
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
)
|
1610
|
-
] });
|
1608
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
|
1609
|
+
/* @__PURE__ */ jsx(Dialog.Header, { children: title }),
|
1610
|
+
/* @__PURE__ */ jsx(Dialog.Body, { children: content }),
|
1611
|
+
/* @__PURE__ */ jsxs(Dialog.Footer, { children: [
|
1612
|
+
/* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: formatMessage({
|
1613
|
+
id: "app.components.Button.cancel",
|
1614
|
+
defaultMessage: "Cancel"
|
1615
|
+
}) }) }),
|
1616
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, children: formatMessage({
|
1617
|
+
id: "app.components.Button.confirm",
|
1618
|
+
defaultMessage: "Confirm"
|
1619
|
+
}) })
|
1620
|
+
] })
|
1621
|
+
] }) });
|
1611
1622
|
};
|
1612
1623
|
const DocumentActionModal = ({
|
1613
1624
|
isOpen,
|
@@ -1617,34 +1628,17 @@ const DocumentActionModal = ({
|
|
1617
1628
|
content: Content,
|
1618
1629
|
onModalClose
|
1619
1630
|
}) => {
|
1620
|
-
const id = React.useId();
|
1621
|
-
if (!isOpen) {
|
1622
|
-
return null;
|
1623
|
-
}
|
1624
1631
|
const handleClose = () => {
|
1625
1632
|
if (onClose) {
|
1626
1633
|
onClose();
|
1627
1634
|
}
|
1628
1635
|
onModalClose();
|
1629
1636
|
};
|
1630
|
-
return /* @__PURE__ */
|
1631
|
-
/* @__PURE__ */ jsx(
|
1632
|
-
|
1633
|
-
/* @__PURE__ */ jsx(
|
1634
|
-
|
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
|
-
] });
|
1637
|
+
return /* @__PURE__ */ jsx(Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
|
1638
|
+
/* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsx(Modal.Title, { children: title }) }),
|
1639
|
+
typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : /* @__PURE__ */ jsx(Modal.Body, { children: Content }),
|
1640
|
+
typeof Footer === "function" ? /* @__PURE__ */ jsx(Footer, { onClose: handleClose }) : Footer
|
1641
|
+
] }) });
|
1648
1642
|
};
|
1649
1643
|
const PublishAction$1 = ({
|
1650
1644
|
activeTab,
|
@@ -1862,10 +1856,8 @@ const UnpublishAction$1 = ({
|
|
1862
1856
|
const { toggleNotification } = useNotification();
|
1863
1857
|
const [shouldKeepDraft, setShouldKeepDraft] = React.useState(true);
|
1864
1858
|
const isDocumentModified = document?.status === "modified";
|
1865
|
-
const handleChange = (
|
1866
|
-
|
1867
|
-
setShouldKeepDraft(e.target.value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
|
1868
|
-
}
|
1859
|
+
const handleChange = (value) => {
|
1860
|
+
setShouldKeepDraft(value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
|
1869
1861
|
};
|
1870
1862
|
if (!schema?.options?.draftAndPublish) {
|
1871
1863
|
return null;
|
@@ -1915,40 +1907,24 @@ const UnpublishAction$1 = ({
|
|
1915
1907
|
}) })
|
1916
1908
|
] }),
|
1917
1909
|
/* @__PURE__ */ jsxs(
|
1918
|
-
|
1910
|
+
Radio.Group,
|
1919
1911
|
{
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1912
|
+
defaultValue: UNPUBLISH_DRAFT_OPTIONS.KEEP,
|
1913
|
+
name: "discard-options",
|
1914
|
+
"aria-label": formatMessage({
|
1915
|
+
id: "content-manager.actions.unpublish.dialog.radio-label",
|
1916
|
+
defaultMessage: "Choose an option to unpublish the document."
|
1917
|
+
}),
|
1918
|
+
onValueChange: handleChange,
|
1926
1919
|
children: [
|
1927
|
-
/* @__PURE__ */ jsx(
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
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
|
-
)
|
1920
|
+
/* @__PURE__ */ jsx(Radio.Item, { checked: shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.KEEP, children: formatMessage({
|
1921
|
+
id: "content-manager.actions.unpublish.dialog.option.keep-draft",
|
1922
|
+
defaultMessage: "Keep draft"
|
1923
|
+
}) }),
|
1924
|
+
/* @__PURE__ */ jsx(Radio.Item, { checked: !shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.DISCARD, children: formatMessage({
|
1925
|
+
id: "content-manager.actions.unpublish.dialog.option.replace-draft",
|
1926
|
+
defaultMessage: "Replace draft"
|
1927
|
+
}) })
|
1952
1928
|
]
|
1953
1929
|
}
|
1954
1930
|
)
|
@@ -2801,30 +2777,23 @@ const ConfirmBulkActionDialog = ({
|
|
2801
2777
|
endAction
|
2802
2778
|
}) => {
|
2803
2779
|
const { formatMessage } = useIntl();
|
2804
|
-
return /* @__PURE__ */ jsxs(
|
2805
|
-
Dialog,
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2810
|
-
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
}) }),
|
2822
|
-
endAction
|
2823
|
-
}
|
2824
|
-
)
|
2825
|
-
]
|
2826
|
-
}
|
2827
|
-
);
|
2780
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
|
2781
|
+
/* @__PURE__ */ jsx(Dialog.Header, { children: formatMessage({
|
2782
|
+
id: "app.components.ConfirmDialog.title",
|
2783
|
+
defaultMessage: "Confirmation"
|
2784
|
+
}) }),
|
2785
|
+
/* @__PURE__ */ jsx(Dialog.Body, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
2786
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
|
2787
|
+
dialogBody
|
2788
|
+
] }) }),
|
2789
|
+
/* @__PURE__ */ jsxs(Dialog.Footer, { children: [
|
2790
|
+
/* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { fullWidth: true, onClick: onToggleDialog, variant: "tertiary", children: formatMessage({
|
2791
|
+
id: "app.components.Button.cancel",
|
2792
|
+
defaultMessage: "Cancel"
|
2793
|
+
}) }) }),
|
2794
|
+
endAction
|
2795
|
+
] })
|
2796
|
+
] }) });
|
2828
2797
|
};
|
2829
2798
|
const BoldChunk$1 = (chunks) => /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: chunks });
|
2830
2799
|
const ConfirmDialogPublishAll = ({
|
@@ -3166,7 +3135,7 @@ const SelectedEntriesModalContent = ({
|
|
3166
3135
|
);
|
3167
3136
|
};
|
3168
3137
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
3169
|
-
/* @__PURE__ */ jsxs(
|
3138
|
+
/* @__PURE__ */ jsxs(Modal.Body, { children: [
|
3170
3139
|
/* @__PURE__ */ jsx(Typography, { children: getFormattedCountMessage() }),
|
3171
3140
|
/* @__PURE__ */ jsx(Box, { marginTop: 5, children: /* @__PURE__ */ jsx(
|
3172
3141
|
SelectedEntriesTableContent,
|
@@ -3178,27 +3147,24 @@ const SelectedEntriesModalContent = ({
|
|
3178
3147
|
}
|
3179
3148
|
) })
|
3180
3149
|
] }),
|
3181
|
-
/* @__PURE__ */
|
3182
|
-
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
}) }),
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
] })
|
3200
|
-
}
|
3201
|
-
),
|
3150
|
+
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
3151
|
+
/* @__PURE__ */ jsx(Button, { onClick: toggleModal, variant: "tertiary", children: formatMessage({
|
3152
|
+
id: "app.components.Button.cancel",
|
3153
|
+
defaultMessage: "Cancel"
|
3154
|
+
}) }),
|
3155
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
|
3156
|
+
/* @__PURE__ */ jsx(Button, { onClick: refetch, variant: "tertiary", loading: isFetching, children: formatMessage({ id: "app.utils.refresh", defaultMessage: "Refresh" }) }),
|
3157
|
+
/* @__PURE__ */ jsx(
|
3158
|
+
Button,
|
3159
|
+
{
|
3160
|
+
onClick: toggleDialog,
|
3161
|
+
disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || selectedEntriesPublished === selectedEntries.length || isLoading,
|
3162
|
+
loading: isSubmittingForm,
|
3163
|
+
children: formatMessage({ id: "app.utils.publish", defaultMessage: "Publish" })
|
3164
|
+
}
|
3165
|
+
)
|
3166
|
+
] })
|
3167
|
+
] }),
|
3202
3168
|
/* @__PURE__ */ jsx(
|
3203
3169
|
ConfirmDialogPublishAll,
|
3204
3170
|
{
|
@@ -3263,143 +3229,10 @@ const BulkActionsRenderer = () => {
|
|
3263
3229
|
documents: selectedRows
|
3264
3230
|
},
|
3265
3231
|
descriptions: plugins["content-manager"].apis.getBulkActions(),
|
3266
|
-
children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsx(
|
3232
|
+
children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsx(DocumentActionButton, { ...action }, action.id))
|
3267
3233
|
}
|
3268
3234
|
) });
|
3269
3235
|
};
|
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
|
-
};
|
3403
3236
|
const DeleteAction = ({ documents, model }) => {
|
3404
3237
|
const { formatMessage } = useIntl();
|
3405
3238
|
const { schema: contentType } = useDoc();
|
@@ -3432,6 +3265,7 @@ const DeleteAction = ({ documents, model }) => {
|
|
3432
3265
|
defaultMessage: "Confirmation"
|
3433
3266
|
}),
|
3434
3267
|
content: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
3268
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
|
3435
3269
|
/* @__PURE__ */ jsx(Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
|
3436
3270
|
id: "popUpWarning.bodyMessage.contentType.delete.all",
|
3437
3271
|
defaultMessage: "Are you sure you want to delete these entries?"
|
@@ -3481,6 +3315,7 @@ const UnpublishAction = ({ documents, model }) => {
|
|
3481
3315
|
defaultMessage: "Confirmation"
|
3482
3316
|
}),
|
3483
3317
|
content: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
3318
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
|
3484
3319
|
/* @__PURE__ */ jsx(Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
|
3485
3320
|
id: "popUpWarning.bodyMessage.contentType.unpublish.all",
|
3486
3321
|
defaultMessage: "Are you sure you want to unpublish these entries?"
|
@@ -3866,9 +3701,18 @@ const index = {
|
|
3866
3701
|
defaultMessage: "Content Manager"
|
3867
3702
|
},
|
3868
3703
|
permissions: [],
|
3869
|
-
Component: () => import("./layout-BzAbmoO6.mjs").then((mod) => ({ default: mod.Layout })),
|
3870
3704
|
position: 1
|
3871
3705
|
});
|
3706
|
+
app.router.addRoute({
|
3707
|
+
path: "content-manager/*",
|
3708
|
+
lazy: async () => {
|
3709
|
+
const { Layout } = await import("./layout-Bau7ZfLV.mjs");
|
3710
|
+
return {
|
3711
|
+
Component: Layout
|
3712
|
+
};
|
3713
|
+
},
|
3714
|
+
children: routes
|
3715
|
+
});
|
3872
3716
|
app.registerPlugin(cm.config);
|
3873
3717
|
},
|
3874
3718
|
async registerTrads({ locales }) {
|
@@ -3895,14 +3739,13 @@ export {
|
|
3895
3739
|
BulkActionsRenderer as B,
|
3896
3740
|
COLLECTION_TYPES as C,
|
3897
3741
|
DocumentStatus as D,
|
3898
|
-
|
3899
|
-
|
3900
|
-
|
3742
|
+
DEFAULT_SETTINGS as E,
|
3743
|
+
convertEditLayoutToFieldLayouts as F,
|
3744
|
+
useDocument as G,
|
3901
3745
|
HOOKS as H,
|
3902
3746
|
InjectionZone as I,
|
3903
|
-
|
3904
|
-
|
3905
|
-
useDocumentActions as L,
|
3747
|
+
index as J,
|
3748
|
+
useDocumentActions as K,
|
3906
3749
|
Panels as P,
|
3907
3750
|
RelativeTime as R,
|
3908
3751
|
SINGLE_TYPES as S,
|
@@ -3924,14 +3767,14 @@ export {
|
|
3924
3767
|
useGetContentTypeConfigurationQuery as o,
|
3925
3768
|
CREATOR_FIELDS as p,
|
3926
3769
|
getMainField as q,
|
3927
|
-
|
3770
|
+
getDisplayName as r,
|
3928
3771
|
setInitialData as s,
|
3929
|
-
|
3772
|
+
checkIfAttributeIsDisplayable as t,
|
3930
3773
|
useContentTypeSchema as u,
|
3931
|
-
|
3932
|
-
|
3933
|
-
|
3934
|
-
|
3935
|
-
|
3774
|
+
useGetAllDocumentsQuery as v,
|
3775
|
+
convertListLayoutToFieldLayouts as w,
|
3776
|
+
capitalise as x,
|
3777
|
+
useUpdateContentTypeConfigurationMutation as y,
|
3778
|
+
extractContentTypeComponents as z
|
3936
3779
|
};
|
3937
|
-
//# sourceMappingURL=index-
|
3780
|
+
//# sourceMappingURL=index-DJXJw9V5.mjs.map
|