@strapi/content-manager 5.0.0-rc.11 → 5.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs → ComponentConfigurationPage-CnL10QYC.mjs} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-qemkOlnj.mjs.map → ComponentConfigurationPage-CnL10QYC.mjs.map} +1 -1
- package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js → ComponentConfigurationPage-G4EIirP8.js} +3 -3
- package/dist/_chunks/{ComponentConfigurationPage-D_M8iBw5.js.map → ComponentConfigurationPage-G4EIirP8.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js → EditConfigurationPage-B2AA1kVF.js} +3 -3
- package/dist/_chunks/{EditConfigurationPage-BePwPuHy.js.map → EditConfigurationPage-B2AA1kVF.js.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs → EditConfigurationPage-I2kKh9dx.mjs} +3 -3
- package/dist/_chunks/{EditConfigurationPage-CjUrEewK.mjs.map → EditConfigurationPage-I2kKh9dx.mjs.map} +1 -1
- package/dist/_chunks/{EditViewPage-B-RJeiJD.js → EditViewPage-CHgoNwlc.js} +3 -3
- package/dist/_chunks/{EditViewPage-B-RJeiJD.js.map → EditViewPage-CHgoNwlc.js.map} +1 -1
- package/dist/_chunks/{EditViewPage-De8GyU8P.mjs → EditViewPage-zFjJK0s8.mjs} +3 -3
- package/dist/_chunks/{EditViewPage-De8GyU8P.mjs.map → EditViewPage-zFjJK0s8.mjs.map} +1 -1
- package/dist/_chunks/{Field-dq8Tg1M_.js → Field-9DePZh-0.js} +24 -62
- package/dist/_chunks/Field-9DePZh-0.js.map +1 -0
- package/dist/_chunks/{Field-pb2o8uBe.mjs → Field-DPAzUS1M.mjs} +20 -58
- package/dist/_chunks/Field-DPAzUS1M.mjs.map +1 -0
- package/dist/_chunks/{Form-DJn0Dxha.mjs → Form-CEkENbkF.mjs} +15 -7
- package/dist/_chunks/Form-CEkENbkF.mjs.map +1 -0
- package/dist/_chunks/{Form-DGIf4jQU.js → Form-DPm-KZ1A.js} +15 -7
- package/dist/_chunks/Form-DPm-KZ1A.js.map +1 -0
- package/dist/_chunks/{History-Dh2NEHnR.js → History-DXSbTWez.js} +4 -4
- package/dist/_chunks/{History-Dh2NEHnR.js.map → History-DXSbTWez.js.map} +1 -1
- package/dist/_chunks/{History-BowL3JKP.mjs → History-utls71em.mjs} +4 -4
- package/dist/_chunks/{History-BowL3JKP.mjs.map → History-utls71em.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs → ListConfigurationPage-CuMXWWqb.mjs} +2 -2
- package/dist/_chunks/{ListConfigurationPage-BpVOB-hn.mjs.map → ListConfigurationPage-CuMXWWqb.mjs.map} +1 -1
- package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js → ListConfigurationPage-D5C7ACZ_.js} +2 -2
- package/dist/_chunks/{ListConfigurationPage-BxYCWz9e.js.map → ListConfigurationPage-D5C7ACZ_.js.map} +1 -1
- package/dist/_chunks/{ListViewPage-CXFUjZQC.mjs → ListViewPage-CdKd-PS_.mjs} +39 -35
- package/dist/_chunks/ListViewPage-CdKd-PS_.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-4XsciqHZ.js → ListViewPage-DfuwH1tt.js} +42 -38
- package/dist/_chunks/ListViewPage-DfuwH1tt.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js → NoContentTypePage-BIxlkWWi.js} +2 -2
- package/dist/_chunks/{NoContentTypePage-C8OpoHeU.js.map → NoContentTypePage-BIxlkWWi.js.map} +1 -1
- package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs → NoContentTypePage-DkToTT7u.mjs} +2 -2
- package/dist/_chunks/{NoContentTypePage-DuhOTp3x.mjs.map → NoContentTypePage-DkToTT7u.mjs.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js → NoPermissionsPage-Bu4GWYb-.js} +2 -2
- package/dist/_chunks/{NoPermissionsPage-y_r7DVA2.js.map → NoPermissionsPage-Bu4GWYb-.js.map} +1 -1
- package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs → NoPermissionsPage-DlWi4BAH.mjs} +2 -2
- package/dist/_chunks/{NoPermissionsPage-DVz3mzDz.mjs.map → NoPermissionsPage-DlWi4BAH.mjs.map} +1 -1
- package/dist/_chunks/{Relations-DPFCAa7b.js → Relations-CFjTESWQ.js} +3 -3
- package/dist/_chunks/{Relations-DPFCAa7b.js.map → Relations-CFjTESWQ.js.map} +1 -1
- package/dist/_chunks/{Relations-CVNLrn1Y.mjs → Relations-QP5yn9_z.mjs} +3 -3
- package/dist/_chunks/{Relations-CVNLrn1Y.mjs.map → Relations-QP5yn9_z.mjs.map} +1 -1
- package/dist/_chunks/{en-uOUIxfcQ.js → en-BVzUkPxZ.js} +6 -5
- package/dist/_chunks/{en-uOUIxfcQ.js.map → en-BVzUkPxZ.js.map} +1 -1
- package/dist/_chunks/{en-BrCTWlZv.mjs → en-CPTj6CjC.mjs} +6 -5
- package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-CPTj6CjC.mjs.map} +1 -1
- package/dist/_chunks/{index-DiMrfcfy.mjs → index-BHfS6_D5.mjs} +106 -61
- package/dist/_chunks/{index-DiMrfcfy.mjs.map → index-BHfS6_D5.mjs.map} +1 -1
- package/dist/_chunks/{index-C3fJE-1-.js → index-DXiHxy70.js} +104 -59
- package/dist/_chunks/index-DXiHxy70.js.map +1 -0
- package/dist/_chunks/{layout-ls3gxfpH.mjs → layout-DX_52HSH.mjs} +5 -4
- package/dist/_chunks/{layout-ls3gxfpH.mjs.map → layout-DX_52HSH.mjs.map} +1 -1
- package/dist/_chunks/{layout-C788OmNr.js → layout-bE-WUnQ0.js} +5 -4
- package/dist/_chunks/{layout-C788OmNr.js.map → layout-bE-WUnQ0.js.map} +1 -1
- package/dist/_chunks/{relations-DYeotliT.js → relations-D706vblp.js} +2 -2
- package/dist/_chunks/{relations-DYeotliT.js.map → relations-D706vblp.js.map} +1 -1
- package/dist/_chunks/{relations-CLcOmGO0.mjs → relations-SCVAL_aJ.mjs} +2 -2
- package/dist/_chunks/{relations-CLcOmGO0.mjs.map → relations-SCVAL_aJ.mjs.map} +1 -1
- package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
- package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
- package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +0 -32
- package/dist/admin/src/pages/EditView/components/Header.d.ts +10 -11
- package/dist/admin/src/services/documents.d.ts +3 -1
- package/dist/server/index.js +18 -5
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +18 -5
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
- package/dist/server/src/history/services/history.d.ts.map +1 -1
- package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
- package/dist/server/src/history/services/utils.d.ts +1 -0
- package/dist/server/src/history/services/utils.d.ts.map +1 -1
- package/dist/shared/contracts/collection-types.d.ts +3 -1
- package/dist/shared/contracts/collection-types.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/_chunks/Field-dq8Tg1M_.js.map +0 -1
- package/dist/_chunks/Field-pb2o8uBe.mjs.map +0 -1
- package/dist/_chunks/Form-DGIf4jQU.js.map +0 -1
- package/dist/_chunks/Form-DJn0Dxha.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-4XsciqHZ.js.map +0 -1
- package/dist/_chunks/ListViewPage-CXFUjZQC.mjs.map +0 -1
- package/dist/_chunks/index-C3fJE-1-.js.map +0 -1
- package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
- package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
- package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
@@ -1,16 +1,16 @@
|
|
1
|
-
import {
|
1
|
+
import { More, Cross, WarningCircle, ListPlus, Pencil, Trash, Check, CrossCircle, CheckCircle, ArrowsCounterClockwise, ChevronRight, Duplicate, ClockCounterClockwise, Feather } from "@strapi/icons";
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
3
3
|
import { useStrapiApp, createContext, useAuth, useRBAC, Page, adminApi, translatedErrors, useNotification, useAPIErrorHandler, getYupValidationErrors, useQueryParams, useTracking, useForm, BackButton, DescriptionComponentRenderer, useTable, Table } from "@strapi/admin/strapi-admin";
|
4
4
|
import * as React from "react";
|
5
5
|
import { lazy } from "react";
|
6
|
-
import {
|
6
|
+
import { Button, Menu, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, Box, SingleSelect, SingleSelectOption, IconButton, Loader, Tooltip, LinkButton } from "@strapi/design-system";
|
7
7
|
import { useIntl } from "react-intl";
|
8
8
|
import { useParams, useNavigate, Navigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
|
9
|
-
import { styled } from "styled-components";
|
10
9
|
import * as yup from "yup";
|
11
10
|
import { ValidationError } from "yup";
|
12
11
|
import pipe from "lodash/fp/pipe";
|
13
12
|
import { intervalToDuration, isPast } from "date-fns";
|
13
|
+
import { styled } from "styled-components";
|
14
14
|
import { stringify } from "qs";
|
15
15
|
import { createSlice, combineReducers } from "@reduxjs/toolkit";
|
16
16
|
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
@@ -1303,7 +1303,7 @@ const useDocumentActions = () => {
|
|
1303
1303
|
};
|
1304
1304
|
};
|
1305
1305
|
const ProtectedHistoryPage = lazy(
|
1306
|
-
() => import("./History-
|
1306
|
+
() => import("./History-utls71em.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
|
1307
1307
|
);
|
1308
1308
|
const routes$1 = [
|
1309
1309
|
{
|
@@ -1316,31 +1316,31 @@ const routes$1 = [
|
|
1316
1316
|
}
|
1317
1317
|
];
|
1318
1318
|
const ProtectedEditViewPage = lazy(
|
1319
|
-
() => import("./EditViewPage-
|
1319
|
+
() => import("./EditViewPage-zFjJK0s8.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
1320
1320
|
);
|
1321
1321
|
const ProtectedListViewPage = lazy(
|
1322
|
-
() => import("./ListViewPage-
|
1322
|
+
() => import("./ListViewPage-CdKd-PS_.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
|
1323
1323
|
);
|
1324
1324
|
const ProtectedListConfiguration = lazy(
|
1325
|
-
() => import("./ListConfigurationPage-
|
1325
|
+
() => import("./ListConfigurationPage-CuMXWWqb.mjs").then((mod) => ({
|
1326
1326
|
default: mod.ProtectedListConfiguration
|
1327
1327
|
}))
|
1328
1328
|
);
|
1329
1329
|
const ProtectedEditConfigurationPage = lazy(
|
1330
|
-
() => import("./EditConfigurationPage-
|
1330
|
+
() => import("./EditConfigurationPage-I2kKh9dx.mjs").then((mod) => ({
|
1331
1331
|
default: mod.ProtectedEditConfigurationPage
|
1332
1332
|
}))
|
1333
1333
|
);
|
1334
1334
|
const ProtectedComponentConfigurationPage = lazy(
|
1335
|
-
() => import("./ComponentConfigurationPage-
|
1335
|
+
() => import("./ComponentConfigurationPage-CnL10QYC.mjs").then((mod) => ({
|
1336
1336
|
default: mod.ProtectedComponentConfigurationPage
|
1337
1337
|
}))
|
1338
1338
|
);
|
1339
1339
|
const NoPermissions = lazy(
|
1340
|
-
() => import("./NoPermissionsPage-
|
1340
|
+
() => import("./NoPermissionsPage-DlWi4BAH.mjs").then((mod) => ({ default: mod.NoPermissions }))
|
1341
1341
|
);
|
1342
1342
|
const NoContentType = lazy(
|
1343
|
-
() => import("./NoContentTypePage-
|
1343
|
+
() => import("./NoContentTypePage-DkToTT7u.mjs").then((mod) => ({ default: mod.NoContentType }))
|
1344
1344
|
);
|
1345
1345
|
const CollectionTypePages = () => {
|
1346
1346
|
const { collectionType } = useParams();
|
@@ -1521,7 +1521,7 @@ const DocumentActionsMenu = ({
|
|
1521
1521
|
};
|
1522
1522
|
return /* @__PURE__ */ jsxs(Menu.Root, { open: isOpen, onOpenChange: setIsOpen, children: [
|
1523
1523
|
/* @__PURE__ */ jsxs(
|
1524
|
-
|
1524
|
+
Menu.Trigger,
|
1525
1525
|
{
|
1526
1526
|
disabled: isDisabled,
|
1527
1527
|
size: "S",
|
@@ -1539,7 +1539,7 @@ const DocumentActionsMenu = ({
|
|
1539
1539
|
]
|
1540
1540
|
}
|
1541
1541
|
),
|
1542
|
-
/* @__PURE__ */ jsxs(Menu.Content, {
|
1542
|
+
/* @__PURE__ */ jsxs(Menu.Content, { maxHeight: void 0, popoverPlacement: "bottom-end", children: [
|
1543
1543
|
actions2.map((action) => {
|
1544
1544
|
return /* @__PURE__ */ jsx(
|
1545
1545
|
Menu.Item,
|
@@ -1637,11 +1637,6 @@ const convertActionVariantToIconColor = (variant = "secondary") => {
|
|
1637
1637
|
return "primary600";
|
1638
1638
|
}
|
1639
1639
|
};
|
1640
|
-
const StyledMoreButton = styled(Menu.Trigger)`
|
1641
|
-
& > span {
|
1642
|
-
display: flex;
|
1643
|
-
}
|
1644
|
-
`;
|
1645
1640
|
const DocumentActionConfirmDialog = ({
|
1646
1641
|
onClose,
|
1647
1642
|
onCancel,
|
@@ -1668,11 +1663,11 @@ const DocumentActionConfirmDialog = ({
|
|
1668
1663
|
/* @__PURE__ */ jsx(Dialog.Header, { children: title }),
|
1669
1664
|
/* @__PURE__ */ jsx(Dialog.Body, { children: content }),
|
1670
1665
|
/* @__PURE__ */ jsxs(Dialog.Footer, { children: [
|
1671
|
-
/* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: formatMessage({
|
1666
|
+
/* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", fullWidth: true, children: formatMessage({
|
1672
1667
|
id: "app.components.Button.cancel",
|
1673
1668
|
defaultMessage: "Cancel"
|
1674
1669
|
}) }) }),
|
1675
|
-
/* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, children: formatMessage({
|
1670
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant, fullWidth: true, children: formatMessage({
|
1676
1671
|
id: "app.components.Button.confirm",
|
1677
1672
|
defaultMessage: "Confirm"
|
1678
1673
|
}) })
|
@@ -1766,24 +1761,25 @@ const PublishAction$1 = ({
|
|
1766
1761
|
}
|
1767
1762
|
}, [documentId, modified, formValues, setLocalCountOfDraftRelations]);
|
1768
1763
|
React.useEffect(() => {
|
1769
|
-
if (documentId
|
1770
|
-
|
1771
|
-
const { data, error } = await countDraftRelations({
|
1772
|
-
collectionType,
|
1773
|
-
model,
|
1774
|
-
documentId,
|
1775
|
-
params
|
1776
|
-
});
|
1777
|
-
if (error) {
|
1778
|
-
throw error;
|
1779
|
-
}
|
1780
|
-
if (data) {
|
1781
|
-
setServerCountOfDraftRelations(data.data);
|
1782
|
-
}
|
1783
|
-
};
|
1784
|
-
fetchDraftRelationsCount();
|
1764
|
+
if (!document || !document.documentId || isListView) {
|
1765
|
+
return;
|
1785
1766
|
}
|
1786
|
-
|
1767
|
+
const fetchDraftRelationsCount = async () => {
|
1768
|
+
const { data, error } = await countDraftRelations({
|
1769
|
+
collectionType,
|
1770
|
+
model,
|
1771
|
+
documentId,
|
1772
|
+
params
|
1773
|
+
});
|
1774
|
+
if (error) {
|
1775
|
+
throw error;
|
1776
|
+
}
|
1777
|
+
if (data) {
|
1778
|
+
setServerCountOfDraftRelations(data.data);
|
1779
|
+
}
|
1780
|
+
};
|
1781
|
+
fetchDraftRelationsCount();
|
1782
|
+
}, [isListView, document, documentId, countDraftRelations, collectionType, model, params]);
|
1787
1783
|
const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
|
1788
1784
|
if (!schema?.options?.draftAndPublish) {
|
1789
1785
|
return null;
|
@@ -1824,7 +1820,8 @@ const PublishAction$1 = ({
|
|
1824
1820
|
}
|
1825
1821
|
};
|
1826
1822
|
const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
|
1827
|
-
const
|
1823
|
+
const enableDraftRelationsCount = false;
|
1824
|
+
const hasDraftRelations = enableDraftRelationsCount;
|
1828
1825
|
return {
|
1829
1826
|
/**
|
1830
1827
|
* Disabled when:
|
@@ -1841,9 +1838,6 @@ const PublishAction$1 = ({
|
|
1841
1838
|
defaultMessage: "Publish"
|
1842
1839
|
}),
|
1843
1840
|
onClick: async () => {
|
1844
|
-
if (hasDraftRelations) {
|
1845
|
-
return;
|
1846
|
-
}
|
1847
1841
|
await performPublish();
|
1848
1842
|
},
|
1849
1843
|
dialog: hasDraftRelations ? {
|
@@ -2014,7 +2008,7 @@ const UnpublishAction$1 = ({
|
|
2014
2008
|
id: "app.utils.unpublish",
|
2015
2009
|
defaultMessage: "Unpublish"
|
2016
2010
|
}),
|
2017
|
-
icon: /* @__PURE__ */ jsx(
|
2011
|
+
icon: /* @__PURE__ */ jsx(Cross, {}),
|
2018
2012
|
onClick: async () => {
|
2019
2013
|
if (!documentId && collectionType !== SINGLE_TYPES || isDocumentModified) {
|
2020
2014
|
if (!documentId) {
|
@@ -2126,7 +2120,7 @@ const DiscardAction = ({
|
|
2126
2120
|
id: "content-manager.actions.discard.label",
|
2127
2121
|
defaultMessage: "Discard changes"
|
2128
2122
|
}),
|
2129
|
-
icon: /* @__PURE__ */ jsx(
|
2123
|
+
icon: /* @__PURE__ */ jsx(Cross, {}),
|
2130
2124
|
position: ["panel", "table-row"],
|
2131
2125
|
variant: "danger",
|
2132
2126
|
dialog: {
|
@@ -2154,11 +2148,6 @@ const DiscardAction = ({
|
|
2154
2148
|
};
|
2155
2149
|
};
|
2156
2150
|
DiscardAction.type = "discard";
|
2157
|
-
const StyledCrossCircle = styled(CrossCircle)`
|
2158
|
-
path {
|
2159
|
-
fill: currentColor;
|
2160
|
-
}
|
2161
|
-
`;
|
2162
2151
|
const DEFAULT_ACTIONS = [PublishAction$1, UpdateAction, UnpublishAction$1, DiscardAction];
|
2163
2152
|
const intervals = ["years", "months", "days", "hours", "minutes", "seconds"];
|
2164
2153
|
const RelativeTime = React.forwardRef(
|
@@ -2206,7 +2195,7 @@ const getDisplayName = ({
|
|
2206
2195
|
};
|
2207
2196
|
const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
2208
2197
|
const DocumentStatus = ({ status = "draft", ...restProps }) => {
|
2209
|
-
const statusVariant = status === "draft" ? "
|
2198
|
+
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
2210
2199
|
return /* @__PURE__ */ jsx(Status, { ...restProps, showBullet: false, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsx(Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: capitalise(status) }) });
|
2211
2200
|
};
|
2212
2201
|
const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
|
@@ -2389,8 +2378,22 @@ const Information = ({ activeTab }) => {
|
|
2389
2378
|
);
|
2390
2379
|
};
|
2391
2380
|
const HeaderActions = ({ actions: actions2 }) => {
|
2392
|
-
|
2393
|
-
|
2381
|
+
const [dialogId, setDialogId] = React.useState(null);
|
2382
|
+
const handleClick = (action) => async (e) => {
|
2383
|
+
if (!("options" in action)) {
|
2384
|
+
const { onClick = () => false, dialog, id } = action;
|
2385
|
+
const muteDialog = await onClick(e);
|
2386
|
+
if (dialog && !muteDialog) {
|
2387
|
+
e.preventDefault();
|
2388
|
+
setDialogId(id);
|
2389
|
+
}
|
2390
|
+
}
|
2391
|
+
};
|
2392
|
+
const handleClose = () => {
|
2393
|
+
setDialogId(null);
|
2394
|
+
};
|
2395
|
+
return /* @__PURE__ */ jsx(Flex, { gap: 1, children: actions2.map((action) => {
|
2396
|
+
if (action.options) {
|
2394
2397
|
return /* @__PURE__ */ jsx(
|
2395
2398
|
SingleSelect,
|
2396
2399
|
{
|
@@ -2404,10 +2407,49 @@ const HeaderActions = ({ actions: actions2 }) => {
|
|
2404
2407
|
action.id
|
2405
2408
|
);
|
2406
2409
|
} else {
|
2407
|
-
|
2410
|
+
if (action.type === "icon") {
|
2411
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
2412
|
+
/* @__PURE__ */ jsx(
|
2413
|
+
IconButton,
|
2414
|
+
{
|
2415
|
+
disabled: action.disabled,
|
2416
|
+
label: action.label,
|
2417
|
+
size: "S",
|
2418
|
+
onClick: handleClick(action),
|
2419
|
+
children: action.icon
|
2420
|
+
}
|
2421
|
+
),
|
2422
|
+
action.dialog ? /* @__PURE__ */ jsx(
|
2423
|
+
HeaderActionDialog,
|
2424
|
+
{
|
2425
|
+
...action.dialog,
|
2426
|
+
isOpen: dialogId === action.id,
|
2427
|
+
onClose: handleClose
|
2428
|
+
}
|
2429
|
+
) : null
|
2430
|
+
] }, action.id);
|
2431
|
+
}
|
2408
2432
|
}
|
2409
2433
|
}) });
|
2410
2434
|
};
|
2435
|
+
const HeaderActionDialog = ({
|
2436
|
+
onClose,
|
2437
|
+
onCancel,
|
2438
|
+
title,
|
2439
|
+
content: Content,
|
2440
|
+
isOpen
|
2441
|
+
}) => {
|
2442
|
+
const handleClose = async () => {
|
2443
|
+
if (onCancel) {
|
2444
|
+
await onCancel();
|
2445
|
+
}
|
2446
|
+
onClose();
|
2447
|
+
};
|
2448
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
|
2449
|
+
/* @__PURE__ */ jsx(Dialog.Header, { children: title }),
|
2450
|
+
typeof Content === "function" ? /* @__PURE__ */ jsx(Content, { onClose: handleClose }) : Content
|
2451
|
+
] }) });
|
2452
|
+
};
|
2411
2453
|
const ConfigureTheViewAction = ({ collectionType, model }) => {
|
2412
2454
|
const navigate = useNavigate();
|
2413
2455
|
const { formatMessage } = useIntl();
|
@@ -2543,7 +2585,7 @@ const ActionsPanel = () => {
|
|
2543
2585
|
return {
|
2544
2586
|
title: formatMessage({
|
2545
2587
|
id: "content-manager.containers.edit.panels.default.title",
|
2546
|
-
defaultMessage: "
|
2588
|
+
defaultMessage: "Entry"
|
2547
2589
|
}),
|
2548
2590
|
content: /* @__PURE__ */ jsx(ActionsPanelContent, {})
|
2549
2591
|
};
|
@@ -2787,7 +2829,8 @@ const formatEditLayout = (data, {
|
|
2787
2829
|
layout: convertEditLayoutToFieldLayouts(
|
2788
2830
|
configuration.layouts.edit,
|
2789
2831
|
components[uid].attributes,
|
2790
|
-
configuration.metadatas
|
2832
|
+
configuration.metadatas,
|
2833
|
+
{ configurations: data.components, schemas: components }
|
2791
2834
|
),
|
2792
2835
|
settings: {
|
2793
2836
|
...configuration.settings,
|
@@ -2944,6 +2987,7 @@ const ConfirmDialogPublishAll = ({
|
|
2944
2987
|
const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler(getTranslation);
|
2945
2988
|
const { model, schema } = useDoc();
|
2946
2989
|
const [{ query }] = useQueryParams();
|
2990
|
+
const enableDraftRelationsCount = false;
|
2947
2991
|
const {
|
2948
2992
|
data: countDraftRelations = 0,
|
2949
2993
|
isLoading,
|
@@ -2955,7 +2999,7 @@ const ConfirmDialogPublishAll = ({
|
|
2955
2999
|
locale: query?.plugins?.i18n?.locale
|
2956
3000
|
},
|
2957
3001
|
{
|
2958
|
-
skip:
|
3002
|
+
skip: !enableDraftRelationsCount
|
2959
3003
|
}
|
2960
3004
|
);
|
2961
3005
|
React.useEffect(() => {
|
@@ -3140,7 +3184,7 @@ const SelectedEntriesTableContent = ({
|
|
3140
3184
|
status: row.status
|
3141
3185
|
}
|
3142
3186
|
) }),
|
3143
|
-
/* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(
|
3187
|
+
/* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(
|
3144
3188
|
IconButton,
|
3145
3189
|
{
|
3146
3190
|
tag: Link,
|
@@ -3163,9 +3207,10 @@ const SelectedEntriesTableContent = ({
|
|
3163
3207
|
),
|
3164
3208
|
target: "_blank",
|
3165
3209
|
marginLeft: "auto",
|
3166
|
-
|
3210
|
+
variant: "ghost",
|
3211
|
+
children: /* @__PURE__ */ jsx(Pencil, { width: "1.6rem", height: "1.6rem" })
|
3167
3212
|
}
|
3168
|
-
) })
|
3213
|
+
) }) })
|
3169
3214
|
] }, row.id)) })
|
3170
3215
|
] });
|
3171
3216
|
};
|
@@ -3900,7 +3945,7 @@ const index = {
|
|
3900
3945
|
app.router.addRoute({
|
3901
3946
|
path: "content-manager/*",
|
3902
3947
|
lazy: async () => {
|
3903
|
-
const { Layout } = await import("./layout-
|
3948
|
+
const { Layout } = await import("./layout-DX_52HSH.mjs");
|
3904
3949
|
return {
|
3905
3950
|
Component: Layout
|
3906
3951
|
};
|
@@ -3917,7 +3962,7 @@ const index = {
|
|
3917
3962
|
async registerTrads({ locales }) {
|
3918
3963
|
const importedTrads = await Promise.all(
|
3919
3964
|
locales.map((locale) => {
|
3920
|
-
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-
|
3965
|
+
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-CPTj6CjC.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 }) => {
|
3921
3966
|
return {
|
3922
3967
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
3923
3968
|
locale
|
@@ -3977,4 +4022,4 @@ export {
|
|
3977
4022
|
capitalise as y,
|
3978
4023
|
useUpdateContentTypeConfigurationMutation as z
|
3979
4024
|
};
|
3980
|
-
//# sourceMappingURL=index-
|
4025
|
+
//# sourceMappingURL=index-BHfS6_D5.mjs.map
|