@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
@@ -219,6 +219,7 @@ const contentManagerApi = strapiAdmin.adminApi.enhanceEndpoints({
|
|
219
219
|
]
|
220
220
|
});
|
221
221
|
const documentApi = contentManagerApi.injectEndpoints({
|
222
|
+
overrideExisting: true,
|
222
223
|
endpoints: (builder) => ({
|
223
224
|
autoCloneDocument: builder.mutation({
|
224
225
|
query: ({ model, sourceId, query }) => ({
|
@@ -1286,7 +1287,7 @@ const useDocumentActions = () => {
|
|
1286
1287
|
};
|
1287
1288
|
};
|
1288
1289
|
const ProtectedHistoryPage = React.lazy(
|
1289
|
-
() => Promise.resolve().then(() => require("./History-
|
1290
|
+
() => Promise.resolve().then(() => require("./History-CqN6K7SX.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1290
1291
|
);
|
1291
1292
|
const routes$1 = [
|
1292
1293
|
{
|
@@ -1299,31 +1300,31 @@ const routes$1 = [
|
|
1299
1300
|
}
|
1300
1301
|
];
|
1301
1302
|
const ProtectedEditViewPage = React.lazy(
|
1302
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
1303
|
+
() => Promise.resolve().then(() => require("./EditViewPage-zT3fBr4Y.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1303
1304
|
);
|
1304
1305
|
const ProtectedListViewPage = React.lazy(
|
1305
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
1306
|
+
() => Promise.resolve().then(() => require("./ListViewPage-pEw_zug9.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1306
1307
|
);
|
1307
1308
|
const ProtectedListConfiguration = React.lazy(
|
1308
|
-
() => Promise.resolve().then(() => require("./ListConfigurationPage-
|
1309
|
+
() => Promise.resolve().then(() => require("./ListConfigurationPage-R_p-SbHZ.js")).then((mod) => ({
|
1309
1310
|
default: mod.ProtectedListConfiguration
|
1310
1311
|
}))
|
1311
1312
|
);
|
1312
1313
|
const ProtectedEditConfigurationPage = React.lazy(
|
1313
|
-
() => Promise.resolve().then(() => require("./EditConfigurationPage-
|
1314
|
+
() => Promise.resolve().then(() => require("./EditConfigurationPage-DjFJw56M.js")).then((mod) => ({
|
1314
1315
|
default: mod.ProtectedEditConfigurationPage
|
1315
1316
|
}))
|
1316
1317
|
);
|
1317
1318
|
const ProtectedComponentConfigurationPage = React.lazy(
|
1318
|
-
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
1319
|
+
() => Promise.resolve().then(() => require("./ComponentConfigurationPage-C-49MccQ.js")).then((mod) => ({
|
1319
1320
|
default: mod.ProtectedComponentConfigurationPage
|
1320
1321
|
}))
|
1321
1322
|
);
|
1322
1323
|
const NoPermissions = React.lazy(
|
1323
|
-
() => Promise.resolve().then(() => require("./NoPermissionsPage-
|
1324
|
+
() => Promise.resolve().then(() => require("./NoPermissionsPage-BtPrImPP.js")).then((mod) => ({ default: mod.NoPermissions }))
|
1324
1325
|
);
|
1325
1326
|
const NoContentType = React.lazy(
|
1326
|
-
() => Promise.resolve().then(() => require("./NoContentTypePage-
|
1327
|
+
() => Promise.resolve().then(() => require("./NoContentTypePage-C5dcQojD.js")).then((mod) => ({ default: mod.NoContentType }))
|
1327
1328
|
);
|
1328
1329
|
const CollectionTypePages = () => {
|
1329
1330
|
const { collectionType } = reactRouterDom.useParams();
|
@@ -1530,7 +1531,7 @@ const DocumentActionsMenu = ({
|
|
1530
1531
|
display: "block",
|
1531
1532
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: [
|
1532
1533
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
|
1533
|
-
action.icon,
|
1534
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
|
1534
1535
|
action.label
|
1535
1536
|
] }),
|
1536
1537
|
action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -1591,6 +1592,18 @@ const convertActionVariantToColor = (variant = "secondary") => {
|
|
1591
1592
|
return "primary600";
|
1592
1593
|
}
|
1593
1594
|
};
|
1595
|
+
const convertActionVariantToIconColor = (variant = "secondary") => {
|
1596
|
+
switch (variant) {
|
1597
|
+
case "danger":
|
1598
|
+
return "danger600";
|
1599
|
+
case "secondary":
|
1600
|
+
return "neutral500";
|
1601
|
+
case "success":
|
1602
|
+
return "success600";
|
1603
|
+
default:
|
1604
|
+
return "primary600";
|
1605
|
+
}
|
1606
|
+
};
|
1594
1607
|
const DocumentActionConfirmDialog = ({
|
1595
1608
|
onClose,
|
1596
1609
|
onCancel,
|
@@ -1613,22 +1626,20 @@ const DocumentActionConfirmDialog = ({
|
|
1613
1626
|
}
|
1614
1627
|
onClose();
|
1615
1628
|
};
|
1616
|
-
return /* @__PURE__ */ jsxRuntime.
|
1617
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
1618
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
1619
|
-
|
1620
|
-
{
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
)
|
1631
|
-
] });
|
1629
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
|
1630
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: title }),
|
1631
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: content }),
|
1632
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
|
1633
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", children: formatMessage({
|
1634
|
+
id: "app.components.Button.cancel",
|
1635
|
+
defaultMessage: "Cancel"
|
1636
|
+
}) }) }),
|
1637
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleConfirm, variant, children: formatMessage({
|
1638
|
+
id: "app.components.Button.confirm",
|
1639
|
+
defaultMessage: "Confirm"
|
1640
|
+
}) })
|
1641
|
+
] })
|
1642
|
+
] }) });
|
1632
1643
|
};
|
1633
1644
|
const DocumentActionModal = ({
|
1634
1645
|
isOpen,
|
@@ -1638,34 +1649,17 @@ const DocumentActionModal = ({
|
|
1638
1649
|
content: Content,
|
1639
1650
|
onModalClose
|
1640
1651
|
}) => {
|
1641
|
-
const id = React__namespace.useId();
|
1642
|
-
if (!isOpen) {
|
1643
|
-
return null;
|
1644
|
-
}
|
1645
1652
|
const handleClose = () => {
|
1646
1653
|
if (onClose) {
|
1647
1654
|
onClose();
|
1648
1655
|
}
|
1649
1656
|
onModalClose();
|
1650
1657
|
};
|
1651
|
-
return /* @__PURE__ */ jsxRuntime.
|
1652
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
1653
|
-
|
1654
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
1655
|
-
|
1656
|
-
{
|
1657
|
-
paddingTop: 4,
|
1658
|
-
paddingBottom: 4,
|
1659
|
-
paddingLeft: 5,
|
1660
|
-
paddingRight: 5,
|
1661
|
-
borderWidth: "1px 0 0 0",
|
1662
|
-
borderStyle: "solid",
|
1663
|
-
borderColor: "neutral150",
|
1664
|
-
background: "neutral100",
|
1665
|
-
children: typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
|
1666
|
-
}
|
1667
|
-
)
|
1668
|
-
] });
|
1658
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Content, { children: [
|
1659
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Title, { children: title }) }),
|
1660
|
+
typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: Content }),
|
1661
|
+
typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
|
1662
|
+
] }) });
|
1669
1663
|
};
|
1670
1664
|
const PublishAction$1 = ({
|
1671
1665
|
activeTab,
|
@@ -1883,10 +1877,8 @@ const UnpublishAction$1 = ({
|
|
1883
1877
|
const { toggleNotification } = strapiAdmin.useNotification();
|
1884
1878
|
const [shouldKeepDraft, setShouldKeepDraft] = React__namespace.useState(true);
|
1885
1879
|
const isDocumentModified = document?.status === "modified";
|
1886
|
-
const handleChange = (
|
1887
|
-
|
1888
|
-
setShouldKeepDraft(e.target.value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
|
1889
|
-
}
|
1880
|
+
const handleChange = (value) => {
|
1881
|
+
setShouldKeepDraft(value === UNPUBLISH_DRAFT_OPTIONS.KEEP);
|
1890
1882
|
};
|
1891
1883
|
if (!schema?.options?.draftAndPublish) {
|
1892
1884
|
return null;
|
@@ -1936,40 +1928,24 @@ const UnpublishAction$1 = ({
|
|
1936
1928
|
}) })
|
1937
1929
|
] }),
|
1938
1930
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
1939
|
-
designSystem.
|
1931
|
+
designSystem.Radio.Group,
|
1940
1932
|
{
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1933
|
+
defaultValue: UNPUBLISH_DRAFT_OPTIONS.KEEP,
|
1934
|
+
name: "discard-options",
|
1935
|
+
"aria-label": formatMessage({
|
1936
|
+
id: "content-manager.actions.unpublish.dialog.radio-label",
|
1937
|
+
defaultMessage: "Choose an option to unpublish the document."
|
1938
|
+
}),
|
1939
|
+
onValueChange: handleChange,
|
1947
1940
|
children: [
|
1948
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
id: "content-manager.actions.unpublish.dialog.option.keep-draft",
|
1957
|
-
defaultMessage: "Keep draft"
|
1958
|
-
})
|
1959
|
-
}
|
1960
|
-
),
|
1961
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
1962
|
-
designSystem.Radio,
|
1963
|
-
{
|
1964
|
-
checked: !shouldKeepDraft,
|
1965
|
-
value: UNPUBLISH_DRAFT_OPTIONS.DISCARD,
|
1966
|
-
name: "discard-options",
|
1967
|
-
children: formatMessage({
|
1968
|
-
id: "content-manager.actions.unpublish.dialog.option.replace-draft",
|
1969
|
-
defaultMessage: "Replace draft"
|
1970
|
-
})
|
1971
|
-
}
|
1972
|
-
)
|
1941
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Radio.Item, { checked: shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.KEEP, children: formatMessage({
|
1942
|
+
id: "content-manager.actions.unpublish.dialog.option.keep-draft",
|
1943
|
+
defaultMessage: "Keep draft"
|
1944
|
+
}) }),
|
1945
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Radio.Item, { checked: !shouldKeepDraft, value: UNPUBLISH_DRAFT_OPTIONS.DISCARD, children: formatMessage({
|
1946
|
+
id: "content-manager.actions.unpublish.dialog.option.replace-draft",
|
1947
|
+
defaultMessage: "Replace draft"
|
1948
|
+
}) })
|
1973
1949
|
]
|
1974
1950
|
}
|
1975
1951
|
)
|
@@ -2822,30 +2798,23 @@ const ConfirmBulkActionDialog = ({
|
|
2822
2798
|
endAction
|
2823
2799
|
}) => {
|
2824
2800
|
const { formatMessage } = reactIntl.useIntl();
|
2825
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
2826
|
-
designSystem.Dialog,
|
2827
|
-
|
2828
|
-
|
2829
|
-
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2834
|
-
|
2835
|
-
|
2836
|
-
|
2837
|
-
|
2838
|
-
|
2839
|
-
|
2840
|
-
|
2841
|
-
|
2842
|
-
}) }),
|
2843
|
-
endAction
|
2844
|
-
}
|
2845
|
-
)
|
2846
|
-
]
|
2847
|
-
}
|
2848
|
-
);
|
2801
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
|
2802
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: formatMessage({
|
2803
|
+
id: "app.components.ConfirmDialog.title",
|
2804
|
+
defaultMessage: "Confirmation"
|
2805
|
+
}) }),
|
2806
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
2807
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
|
2808
|
+
dialogBody
|
2809
|
+
] }) }),
|
2810
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Footer, { children: [
|
2811
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { fullWidth: true, onClick: onToggleDialog, variant: "tertiary", children: formatMessage({
|
2812
|
+
id: "app.components.Button.cancel",
|
2813
|
+
defaultMessage: "Cancel"
|
2814
|
+
}) }) }),
|
2815
|
+
endAction
|
2816
|
+
] })
|
2817
|
+
] }) });
|
2849
2818
|
};
|
2850
2819
|
const BoldChunk$1 = (chunks) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: chunks });
|
2851
2820
|
const ConfirmDialogPublishAll = ({
|
@@ -3187,7 +3156,7 @@ const SelectedEntriesModalContent = ({
|
|
3187
3156
|
);
|
3188
3157
|
};
|
3189
3158
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
3190
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.
|
3159
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Body, { children: [
|
3191
3160
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: getFormattedCountMessage() }),
|
3192
3161
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 5, children: /* @__PURE__ */ jsxRuntime.jsx(
|
3193
3162
|
SelectedEntriesTableContent,
|
@@ -3199,27 +3168,24 @@ const SelectedEntriesModalContent = ({
|
|
3199
3168
|
}
|
3200
3169
|
) })
|
3201
3170
|
] }),
|
3202
|
-
/* @__PURE__ */ jsxRuntime.
|
3203
|
-
designSystem.
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
}) }),
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
] })
|
3221
|
-
}
|
3222
|
-
),
|
3171
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Footer, { children: [
|
3172
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: toggleModal, variant: "tertiary", children: formatMessage({
|
3173
|
+
id: "app.components.Button.cancel",
|
3174
|
+
defaultMessage: "Cancel"
|
3175
|
+
}) }),
|
3176
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
3177
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: refetch, variant: "tertiary", loading: isFetching, children: formatMessage({ id: "app.utils.refresh", defaultMessage: "Refresh" }) }),
|
3178
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
3179
|
+
designSystem.Button,
|
3180
|
+
{
|
3181
|
+
onClick: toggleDialog,
|
3182
|
+
disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || selectedEntriesPublished === selectedEntries.length || isLoading,
|
3183
|
+
loading: isSubmittingForm,
|
3184
|
+
children: formatMessage({ id: "app.utils.publish", defaultMessage: "Publish" })
|
3185
|
+
}
|
3186
|
+
)
|
3187
|
+
] })
|
3188
|
+
] }),
|
3223
3189
|
/* @__PURE__ */ jsxRuntime.jsx(
|
3224
3190
|
ConfirmDialogPublishAll,
|
3225
3191
|
{
|
@@ -3284,143 +3250,10 @@ const BulkActionsRenderer = () => {
|
|
3284
3250
|
documents: selectedRows
|
3285
3251
|
},
|
3286
3252
|
descriptions: plugins["content-manager"].apis.getBulkActions(),
|
3287
|
-
children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
3253
|
+
children: (actions2) => actions2.map((action) => /* @__PURE__ */ jsxRuntime.jsx(DocumentActionButton, { ...action }, action.id))
|
3288
3254
|
}
|
3289
3255
|
) });
|
3290
3256
|
};
|
3291
|
-
const BulkActionAction = (action) => {
|
3292
|
-
const [dialogId, setDialogId] = React__namespace.useState(null);
|
3293
|
-
const { toggleNotification } = strapiAdmin.useNotification();
|
3294
|
-
const handleClick = (action2) => (e) => {
|
3295
|
-
const { onClick, dialog, id } = action2;
|
3296
|
-
if (onClick) {
|
3297
|
-
onClick(e);
|
3298
|
-
}
|
3299
|
-
if (dialog) {
|
3300
|
-
switch (dialog.type) {
|
3301
|
-
case "notification":
|
3302
|
-
toggleNotification({
|
3303
|
-
title: dialog.title,
|
3304
|
-
message: dialog.content,
|
3305
|
-
type: dialog.status,
|
3306
|
-
timeout: dialog.timeout,
|
3307
|
-
onClose: dialog.onClose
|
3308
|
-
});
|
3309
|
-
break;
|
3310
|
-
case "dialog":
|
3311
|
-
case "modal": {
|
3312
|
-
e.preventDefault();
|
3313
|
-
setDialogId(id);
|
3314
|
-
}
|
3315
|
-
}
|
3316
|
-
}
|
3317
|
-
};
|
3318
|
-
const handleClose = () => {
|
3319
|
-
setDialogId(null);
|
3320
|
-
if (action.dialog?.type === "modal" && action.dialog?.onClose) {
|
3321
|
-
action.dialog.onClose();
|
3322
|
-
}
|
3323
|
-
};
|
3324
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
3325
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
3326
|
-
designSystem.Button,
|
3327
|
-
{
|
3328
|
-
disabled: action.disabled,
|
3329
|
-
startIcon: action.icon,
|
3330
|
-
variant: action.variant,
|
3331
|
-
onClick: handleClick(action),
|
3332
|
-
children: action.label
|
3333
|
-
}
|
3334
|
-
),
|
3335
|
-
action.dialog?.type === "dialog" ? /* @__PURE__ */ jsxRuntime.jsx(
|
3336
|
-
BulkActionConfirmDialog,
|
3337
|
-
{
|
3338
|
-
...action.dialog,
|
3339
|
-
variant: action.variant,
|
3340
|
-
isOpen: dialogId === action.id,
|
3341
|
-
onClose: handleClose
|
3342
|
-
}
|
3343
|
-
) : null,
|
3344
|
-
action.dialog?.type === "modal" ? /* @__PURE__ */ jsxRuntime.jsx(
|
3345
|
-
BulkActionModal,
|
3346
|
-
{
|
3347
|
-
...action.dialog,
|
3348
|
-
onModalClose: handleClose,
|
3349
|
-
isOpen: dialogId === action.id
|
3350
|
-
}
|
3351
|
-
) : null
|
3352
|
-
] });
|
3353
|
-
};
|
3354
|
-
const BulkActionConfirmDialog = ({
|
3355
|
-
onClose,
|
3356
|
-
onCancel,
|
3357
|
-
onConfirm,
|
3358
|
-
title,
|
3359
|
-
content,
|
3360
|
-
confirmButton,
|
3361
|
-
isOpen,
|
3362
|
-
variant = "secondary"
|
3363
|
-
}) => {
|
3364
|
-
const { formatMessage } = reactIntl.useIntl();
|
3365
|
-
const handleClose = async () => {
|
3366
|
-
if (onCancel) {
|
3367
|
-
await onCancel();
|
3368
|
-
}
|
3369
|
-
onClose();
|
3370
|
-
};
|
3371
|
-
const handleConfirm = async () => {
|
3372
|
-
if (onConfirm) {
|
3373
|
-
await onConfirm();
|
3374
|
-
}
|
3375
|
-
onClose();
|
3376
|
-
};
|
3377
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog, { isOpen, title, onClose: handleClose, children: [
|
3378
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.DialogBody, { icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}), children: content }),
|
3379
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
3380
|
-
designSystem.DialogFooter,
|
3381
|
-
{
|
3382
|
-
startAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: handleClose, variant: "tertiary", children: formatMessage({
|
3383
|
-
id: "app.components.Button.cancel",
|
3384
|
-
defaultMessage: "Cancel"
|
3385
|
-
}) }),
|
3386
|
-
endAction: /* @__PURE__ */ jsxRuntime.jsx(
|
3387
|
-
designSystem.Button,
|
3388
|
-
{
|
3389
|
-
onClick: handleConfirm,
|
3390
|
-
variant: variant === "danger-light" ? variant : "secondary",
|
3391
|
-
startIcon: variant === "danger-light" ? /* @__PURE__ */ jsxRuntime.jsx(Icons.Trash, {}) : /* @__PURE__ */ jsxRuntime.jsx(Icons.Check, {}),
|
3392
|
-
children: confirmButton ? confirmButton : formatMessage({
|
3393
|
-
id: "app.components.Button.confirm",
|
3394
|
-
defaultMessage: "Confirm"
|
3395
|
-
})
|
3396
|
-
}
|
3397
|
-
)
|
3398
|
-
}
|
3399
|
-
)
|
3400
|
-
] });
|
3401
|
-
};
|
3402
|
-
const BulkActionModal = ({
|
3403
|
-
isOpen,
|
3404
|
-
title,
|
3405
|
-
onClose,
|
3406
|
-
content: Content,
|
3407
|
-
onModalClose
|
3408
|
-
}) => {
|
3409
|
-
const id = React__namespace.useId();
|
3410
|
-
if (!isOpen) {
|
3411
|
-
return null;
|
3412
|
-
}
|
3413
|
-
const handleClose = () => {
|
3414
|
-
if (onClose) {
|
3415
|
-
onClose();
|
3416
|
-
}
|
3417
|
-
onModalClose();
|
3418
|
-
};
|
3419
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.ModalLayout, { borderRadius: "4px", overflow: "hidden", onClose: handleClose, labelledBy: id, children: [
|
3420
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id, children: title }) }),
|
3421
|
-
/* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose })
|
3422
|
-
] });
|
3423
|
-
};
|
3424
3257
|
const DeleteAction = ({ documents, model }) => {
|
3425
3258
|
const { formatMessage } = reactIntl.useIntl();
|
3426
3259
|
const { schema: contentType } = useDoc();
|
@@ -3453,6 +3286,7 @@ const DeleteAction = ({ documents, model }) => {
|
|
3453
3286
|
defaultMessage: "Confirmation"
|
3454
3287
|
}),
|
3455
3288
|
content: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
3289
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
|
3456
3290
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
|
3457
3291
|
id: "popUpWarning.bodyMessage.contentType.delete.all",
|
3458
3292
|
defaultMessage: "Are you sure you want to delete these entries?"
|
@@ -3502,6 +3336,7 @@ const UnpublishAction = ({ documents, model }) => {
|
|
3502
3336
|
defaultMessage: "Confirmation"
|
3503
3337
|
}),
|
3504
3338
|
content: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
3339
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
|
3505
3340
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { id: "confirm-description", textAlign: "center", children: formatMessage({
|
3506
3341
|
id: "popUpWarning.bodyMessage.contentType.unpublish.all",
|
3507
3342
|
defaultMessage: "Are you sure you want to unpublish these entries?"
|
@@ -3887,9 +3722,18 @@ const index = {
|
|
3887
3722
|
defaultMessage: "Content Manager"
|
3888
3723
|
},
|
3889
3724
|
permissions: [],
|
3890
|
-
Component: () => Promise.resolve().then(() => require("./layout-DEYBqgF1.js")).then((mod) => ({ default: mod.Layout })),
|
3891
3725
|
position: 1
|
3892
3726
|
});
|
3727
|
+
app.router.addRoute({
|
3728
|
+
path: "content-manager/*",
|
3729
|
+
lazy: async () => {
|
3730
|
+
const { Layout } = await Promise.resolve().then(() => require("./layout-Dm6fbiQj.js"));
|
3731
|
+
return {
|
3732
|
+
Component: Layout
|
3733
|
+
};
|
3734
|
+
},
|
3735
|
+
children: routes
|
3736
|
+
});
|
3893
3737
|
app.registerPlugin(cm.config);
|
3894
3738
|
},
|
3895
3739
|
async registerTrads({ locales }) {
|
@@ -3939,7 +3783,6 @@ exports.getDisplayName = getDisplayName;
|
|
3939
3783
|
exports.getMainField = getMainField;
|
3940
3784
|
exports.getTranslation = getTranslation;
|
3941
3785
|
exports.index = index;
|
3942
|
-
exports.routes = routes;
|
3943
3786
|
exports.setInitialData = setInitialData;
|
3944
3787
|
exports.useContentTypeSchema = useContentTypeSchema;
|
3945
3788
|
exports.useDoc = useDoc;
|
@@ -3953,4 +3796,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
|
3953
3796
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
3954
3797
|
exports.useGetInitialDataQuery = useGetInitialDataQuery;
|
3955
3798
|
exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
|
3956
|
-
//# sourceMappingURL=index-
|
3799
|
+
//# sourceMappingURL=index-DVPWZkbS.js.map
|