@strapi/content-manager 0.0.0-experimental.edc24aaa3bb5a90fa5fd4fee208167dd4e2e38d4 → 0.0.0-experimental.f31889311d753b5f7d95198ae84d8fce1d156cd6

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 (74) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-5ukroXAh.js → ComponentConfigurationPage-BNxtMIfV.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-5ukroXAh.js.map → ComponentConfigurationPage-BNxtMIfV.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-BAgyHiMm.mjs → ComponentConfigurationPage-BWOQWCv2.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-BAgyHiMm.mjs.map → ComponentConfigurationPage-BWOQWCv2.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-Xp7lun0f.js → EditConfigurationPage-D340bYlT.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-Xp7lun0f.js.map → EditConfigurationPage-D340bYlT.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-DmoXawIh.mjs → EditConfigurationPage-GTp-Ucnw.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-DmoXawIh.mjs.map → EditConfigurationPage-GTp-Ucnw.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-BLsjc5F-.mjs → EditViewPage-BVMS5hT-.mjs} +3 -3
  10. package/dist/_chunks/{EditViewPage-BLsjc5F-.mjs.map → EditViewPage-BVMS5hT-.mjs.map} +1 -1
  11. package/dist/_chunks/{EditViewPage-C-ukDOB7.js → EditViewPage-CXkmnAvI.js} +3 -3
  12. package/dist/_chunks/{EditViewPage-C-ukDOB7.js.map → EditViewPage-CXkmnAvI.js.map} +1 -1
  13. package/dist/_chunks/{Field-Bfph5SOd.js → Field-Ibi32diw.js} +3 -3
  14. package/dist/_chunks/Field-Ibi32diw.js.map +1 -0
  15. package/dist/_chunks/{Field-Cs7duwWd.mjs → Field-nNgv5bpd.mjs} +3 -3
  16. package/dist/_chunks/Field-nNgv5bpd.mjs.map +1 -0
  17. package/dist/_chunks/{Form-CPYqIWDG.js → Form-Dhnh34ym.js} +2 -2
  18. package/dist/_chunks/{Form-CPYqIWDG.js.map → Form-Dhnh34ym.js.map} +1 -1
  19. package/dist/_chunks/{Form-Dg_GS5TQ.mjs → Form-DodJsI2A.mjs} +2 -2
  20. package/dist/_chunks/{Form-Dg_GS5TQ.mjs.map → Form-DodJsI2A.mjs.map} +1 -1
  21. package/dist/_chunks/{History-DNQkXANT.js → History-C9auUkDi.js} +4 -4
  22. package/dist/_chunks/{History-DNQkXANT.js.map → History-C9auUkDi.js.map} +1 -1
  23. package/dist/_chunks/{History-wrnHqf09.mjs → History-CKCSQXz_.mjs} +4 -4
  24. package/dist/_chunks/{History-wrnHqf09.mjs.map → History-CKCSQXz_.mjs.map} +1 -1
  25. package/dist/_chunks/{ListConfigurationPage-CUQxfpjT.js → ListConfigurationPage-Bg4rWUjX.js} +2 -2
  26. package/dist/_chunks/{ListConfigurationPage-CUQxfpjT.js.map → ListConfigurationPage-Bg4rWUjX.js.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-DScmJVkW.mjs → ListConfigurationPage-CKEC4ttG.mjs} +2 -2
  28. package/dist/_chunks/{ListConfigurationPage-DScmJVkW.mjs.map → ListConfigurationPage-CKEC4ttG.mjs.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-C4IvrMgY.mjs → ListViewPage-B7_WJUjG.mjs} +10 -5
  30. package/dist/_chunks/ListViewPage-B7_WJUjG.mjs.map +1 -0
  31. package/dist/_chunks/{ListViewPage-BsLiH2-2.js → ListViewPage-C2gIeYHG.js} +9 -4
  32. package/dist/_chunks/ListViewPage-C2gIeYHG.js.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-Djg8nPlj.mjs → NoContentTypePage-Ckem6Ll6.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-Djg8nPlj.mjs.map → NoContentTypePage-Ckem6Ll6.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-BZ-PnGAf.js → NoContentTypePage-DqgdUfyn.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-BZ-PnGAf.js.map → NoContentTypePage-DqgdUfyn.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DSP7R-hv.mjs → NoPermissionsPage-BO-GEjA4.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DSP7R-hv.mjs.map → NoPermissionsPage-BO-GEjA4.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-_lUqjGW3.js → NoPermissionsPage-CF29Q-sW.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-_lUqjGW3.js.map → NoPermissionsPage-CF29Q-sW.js.map} +1 -1
  41. package/dist/_chunks/{Relations-CtELXYIK.js → Relations-C0uC9J4f.js} +3 -3
  42. package/dist/_chunks/{Relations-CtELXYIK.js.map → Relations-C0uC9J4f.js.map} +1 -1
  43. package/dist/_chunks/{Relations-BZr8tL0R.mjs → Relations-DItV5eow.mjs} +3 -3
  44. package/dist/_chunks/{Relations-BZr8tL0R.mjs.map → Relations-DItV5eow.mjs.map} +1 -1
  45. package/dist/_chunks/{index-OerGjbAN.js → index-Dd0nXyJF.js} +29 -36
  46. package/dist/_chunks/index-Dd0nXyJF.js.map +1 -0
  47. package/dist/_chunks/{index-c_5DdJi-.mjs → index-DrNe6ctw.mjs} +30 -37
  48. package/dist/_chunks/index-DrNe6ctw.mjs.map +1 -0
  49. package/dist/_chunks/{layout-oPBiO7RY.mjs → layout-B3ez7kvr.mjs} +17 -5
  50. package/dist/_chunks/{layout-oPBiO7RY.mjs.map → layout-B3ez7kvr.mjs.map} +1 -1
  51. package/dist/_chunks/{layout-Ci7qHlFb.js → layout-CLLtt_5O.js} +16 -4
  52. package/dist/_chunks/{layout-Ci7qHlFb.js.map → layout-CLLtt_5O.js.map} +1 -1
  53. package/dist/_chunks/{relations-BIdWFjdq.mjs → relations-B0hlsUU_.mjs} +2 -2
  54. package/dist/_chunks/{relations-BIdWFjdq.mjs.map → relations-B0hlsUU_.mjs.map} +1 -1
  55. package/dist/_chunks/{relations-COBpStiF.js → relations-bRxcNv1q.js} +2 -2
  56. package/dist/_chunks/{relations-COBpStiF.js.map → relations-bRxcNv1q.js.map} +1 -1
  57. package/dist/admin/index.js +1 -1
  58. package/dist/admin/index.mjs +1 -1
  59. package/dist/server/index.js +98 -58
  60. package/dist/server/index.js.map +1 -1
  61. package/dist/server/index.mjs +99 -59
  62. package/dist/server/index.mjs.map +1 -1
  63. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  64. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  65. package/dist/server/src/history/services/utils.d.ts +1 -1
  66. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  67. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  68. package/package.json +6 -6
  69. package/dist/_chunks/Field-Bfph5SOd.js.map +0 -1
  70. package/dist/_chunks/Field-Cs7duwWd.mjs.map +0 -1
  71. package/dist/_chunks/ListViewPage-BsLiH2-2.js.map +0 -1
  72. package/dist/_chunks/ListViewPage-C4IvrMgY.mjs.map +0 -1
  73. package/dist/_chunks/index-OerGjbAN.js.map +0 -1
  74. package/dist/_chunks/index-c_5DdJi-.mjs.map +0 -1
@@ -3,7 +3,7 @@ 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 { Button, Menu, VisuallyHidden, Flex, Box, Typography, Dialog, Modal, Radio, Status, SingleSelect, SingleSelectOption, Loader, IconButton, Tooltip, LinkButton } from "@strapi/design-system";
6
+ import { Button, Menu, VisuallyHidden, Flex, Typography, Dialog, Modal, Radio, Status, Box, SingleSelect, SingleSelectOption, Loader, IconButton, Tooltip, LinkButton } from "@strapi/design-system";
7
7
  import { useIntl } from "react-intl";
8
8
  import { useParams, Navigate, useNavigate, useMatch, useLocation, Link, NavLink } from "react-router-dom";
9
9
  import { styled } from "styled-components";
@@ -264,6 +264,7 @@ const documentApi = contentManagerApi.injectEndpoints({
264
264
  }),
265
265
  providesTags: (result, _error, arg) => {
266
266
  return [
267
+ { type: "Document", id: `ALL_LIST` },
267
268
  { type: "Document", id: `${arg.model}_LIST` },
268
269
  ...result?.results.map(({ documentId }) => ({
269
270
  type: "Document",
@@ -1271,7 +1272,7 @@ const useDocumentActions = () => {
1271
1272
  };
1272
1273
  };
1273
1274
  const ProtectedHistoryPage = lazy(
1274
- () => import("./History-wrnHqf09.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1275
+ () => import("./History-CKCSQXz_.mjs").then((mod) => ({ default: mod.ProtectedHistoryPage }))
1275
1276
  );
1276
1277
  const routes$1 = [
1277
1278
  {
@@ -1284,31 +1285,31 @@ const routes$1 = [
1284
1285
  }
1285
1286
  ];
1286
1287
  const ProtectedEditViewPage = lazy(
1287
- () => import("./EditViewPage-BLsjc5F-.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1288
+ () => import("./EditViewPage-BVMS5hT-.mjs").then((mod) => ({ default: mod.ProtectedEditViewPage }))
1288
1289
  );
1289
1290
  const ProtectedListViewPage = lazy(
1290
- () => import("./ListViewPage-C4IvrMgY.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1291
+ () => import("./ListViewPage-B7_WJUjG.mjs").then((mod) => ({ default: mod.ProtectedListViewPage }))
1291
1292
  );
1292
1293
  const ProtectedListConfiguration = lazy(
1293
- () => import("./ListConfigurationPage-DScmJVkW.mjs").then((mod) => ({
1294
+ () => import("./ListConfigurationPage-CKEC4ttG.mjs").then((mod) => ({
1294
1295
  default: mod.ProtectedListConfiguration
1295
1296
  }))
1296
1297
  );
1297
1298
  const ProtectedEditConfigurationPage = lazy(
1298
- () => import("./EditConfigurationPage-DmoXawIh.mjs").then((mod) => ({
1299
+ () => import("./EditConfigurationPage-GTp-Ucnw.mjs").then((mod) => ({
1299
1300
  default: mod.ProtectedEditConfigurationPage
1300
1301
  }))
1301
1302
  );
1302
1303
  const ProtectedComponentConfigurationPage = lazy(
1303
- () => import("./ComponentConfigurationPage-BAgyHiMm.mjs").then((mod) => ({
1304
+ () => import("./ComponentConfigurationPage-BWOQWCv2.mjs").then((mod) => ({
1304
1305
  default: mod.ProtectedComponentConfigurationPage
1305
1306
  }))
1306
1307
  );
1307
1308
  const NoPermissions = lazy(
1308
- () => import("./NoPermissionsPage-DSP7R-hv.mjs").then((mod) => ({ default: mod.NoPermissions }))
1309
+ () => import("./NoPermissionsPage-BO-GEjA4.mjs").then((mod) => ({ default: mod.NoPermissions }))
1309
1310
  );
1310
1311
  const NoContentType = lazy(
1311
- () => import("./NoContentTypePage-Djg8nPlj.mjs").then((mod) => ({ default: mod.NoContentType }))
1312
+ () => import("./NoContentTypePage-Ckem6Ll6.mjs").then((mod) => ({ default: mod.NoContentType }))
1312
1313
  );
1313
1314
  const CollectionTypePages = () => {
1314
1315
  const { collectionType } = useParams();
@@ -1492,9 +1493,9 @@ const DocumentActionsMenu = ({
1492
1493
  disabled: isDisabled,
1493
1494
  size: "S",
1494
1495
  endIcon: null,
1495
- paddingTop: "7px",
1496
- paddingLeft: "9px",
1497
- paddingRight: "9px",
1496
+ paddingTop: "4px",
1497
+ paddingLeft: "7px",
1498
+ paddingRight: "7px",
1498
1499
  variant,
1499
1500
  children: [
1500
1501
  /* @__PURE__ */ jsx(More, { "aria-hidden": true, focusable: false }),
@@ -1514,10 +1515,18 @@ const DocumentActionsMenu = ({
1514
1515
  onSelect: handleClick(action),
1515
1516
  display: "block",
1516
1517
  children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", gap: 4, children: [
1517
- /* @__PURE__ */ jsxs(Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
1518
- /* @__PURE__ */ jsx(Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
1519
- action.label
1520
- ] }),
1518
+ /* @__PURE__ */ jsxs(
1519
+ Flex,
1520
+ {
1521
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1522
+ gap: 2,
1523
+ tag: "span",
1524
+ children: [
1525
+ /* @__PURE__ */ jsx("span", { children: action.icon }),
1526
+ action.label
1527
+ ]
1528
+ }
1529
+ ),
1521
1530
  action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsx(
1522
1531
  Flex,
1523
1532
  {
@@ -1576,18 +1585,6 @@ const convertActionVariantToColor = (variant = "secondary") => {
1576
1585
  return "primary600";
1577
1586
  }
1578
1587
  };
1579
- const convertActionVariantToIconColor = (variant = "secondary") => {
1580
- switch (variant) {
1581
- case "danger":
1582
- return "danger600";
1583
- case "secondary":
1584
- return "neutral500";
1585
- case "success":
1586
- return "success600";
1587
- default:
1588
- return "primary600";
1589
- }
1590
- };
1591
1588
  const DocumentActionConfirmDialog = ({
1592
1589
  onClose,
1593
1590
  onCancel,
@@ -1782,10 +1779,8 @@ const PublishAction$1 = ({
1782
1779
  * - the document is already published & not modified
1783
1780
  * - the document is being created & not modified
1784
1781
  * - the user doesn't have the permission to publish
1785
- * - the user doesn't have the permission to create a new document
1786
- * - the user doesn't have the permission to update the document
1787
1782
  */
1788
- disabled: isCloning || isSubmitting || isLoadingDraftRelations || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish || Boolean(!document?.documentId && !canCreate || document?.documentId && !canUpdate),
1783
+ disabled: isCloning || isSubmitting || isLoadingDraftRelations || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish,
1789
1784
  label: formatMessage({
1790
1785
  id: "app.utils.publish",
1791
1786
  defaultMessage: "Publish"
@@ -1832,7 +1827,7 @@ const UpdateAction = ({
1832
1827
  const cloneMatch = useMatch(CLONE_PATH);
1833
1828
  const isCloning = cloneMatch !== null;
1834
1829
  const { formatMessage } = useIntl();
1835
- const { canCreate, canUpdate } = useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1830
+ useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1836
1831
  canCreate: canCreate2,
1837
1832
  canUpdate: canUpdate2
1838
1833
  }));
@@ -1852,10 +1847,8 @@ const UpdateAction = ({
1852
1847
  * - the form is submitting
1853
1848
  * - the document is not modified & we're not cloning (you can save a clone entity straight away)
1854
1849
  * - the active tab is the published tab
1855
- * - the user doesn't have the permission to create a new document
1856
- * - the user doesn't have the permission to update the document
1857
1850
  */
1858
- disabled: isSubmitting || !modified && !isCloning || activeTab === "published" || Boolean(!documentId && !canCreate || documentId && !canUpdate),
1851
+ disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
1859
1852
  label: formatMessage({
1860
1853
  id: "content-manager.containers.Edit.save",
1861
1854
  defaultMessage: "Save"
@@ -3848,7 +3841,7 @@ const index = {
3848
3841
  app.router.addRoute({
3849
3842
  path: "content-manager/*",
3850
3843
  lazy: async () => {
3851
- const { Layout } = await import("./layout-oPBiO7RY.mjs");
3844
+ const { Layout } = await import("./layout-B3ez7kvr.mjs");
3852
3845
  return {
3853
3846
  Component: Layout
3854
3847
  };
@@ -3924,4 +3917,4 @@ export {
3924
3917
  useUpdateContentTypeConfigurationMutation as y,
3925
3918
  extractContentTypeComponents as z
3926
3919
  };
3927
- //# sourceMappingURL=index-c_5DdJi-.mjs.map
3920
+ //# sourceMappingURL=index-DrNe6ctw.mjs.map