@strapi/content-manager 0.0.0-experimental.bd712ad3930045f4a5d2144c119e0b7856e97fc4 → 0.0.0-experimental.c5235059f5636c4549ea2118c75c43b92e2615c8

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 (91) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-BWQv6yRj.js → ComponentConfigurationPage-k6fnZytn.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-BWQv6yRj.js.map → ComponentConfigurationPage-k6fnZytn.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-C7ImeKGM.mjs → ComponentConfigurationPage-o2HOTHL4.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-C7ImeKGM.mjs.map → ComponentConfigurationPage-o2HOTHL4.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-CEGwxV-L.js → EditConfigurationPage-DKtok23W.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-CEGwxV-L.js.map → EditConfigurationPage-DKtok23W.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-MItFGzT9.mjs → EditConfigurationPage-HNi0pVX4.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-MItFGzT9.mjs.map → EditConfigurationPage-HNi0pVX4.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-CmMi2Xsn.js → EditViewPage-CrX5Iz3h.js} +3 -3
  10. package/dist/_chunks/{EditViewPage-CmMi2Xsn.js.map → EditViewPage-CrX5Iz3h.js.map} +1 -1
  11. package/dist/_chunks/{EditViewPage-DhmAg0NK.mjs → EditViewPage-DGnFsrTV.mjs} +3 -3
  12. package/dist/_chunks/{EditViewPage-DhmAg0NK.mjs.map → EditViewPage-DGnFsrTV.mjs.map} +1 -1
  13. package/dist/_chunks/{Field-Cs62u5pl.mjs → Field-DlWgNyun.mjs} +8 -8
  14. package/dist/_chunks/Field-DlWgNyun.mjs.map +1 -0
  15. package/dist/_chunks/{Field-1DLtcLAI.js → Field-DvDdA59J.js} +8 -8
  16. package/dist/_chunks/Field-DvDdA59J.js.map +1 -0
  17. package/dist/_chunks/{Form-zYHtzGUX.mjs → Form-B7VJjkXr.mjs} +2 -2
  18. package/dist/_chunks/{Form-zYHtzGUX.mjs.map → Form-B7VJjkXr.mjs.map} +1 -1
  19. package/dist/_chunks/{Form-CqFA7F_V.js → Form-D9w2wzOa.js} +2 -2
  20. package/dist/_chunks/{Form-CqFA7F_V.js.map → Form-D9w2wzOa.js.map} +1 -1
  21. package/dist/_chunks/{History-DalgFQ3D.mjs → History-84QY4Lau.mjs} +21 -11
  22. package/dist/_chunks/History-84QY4Lau.mjs.map +1 -0
  23. package/dist/_chunks/{History-BblwXv7-.js → History-GCscEVds.js} +21 -11
  24. package/dist/_chunks/History-GCscEVds.js.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-DWy-vRzs.mjs → ListConfigurationPage-C_S6OFYL.mjs} +2 -2
  26. package/dist/_chunks/{ListConfigurationPage-DWy-vRzs.mjs.map → ListConfigurationPage-C_S6OFYL.mjs.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-Cpy4QqNd.js → ListConfigurationPage-Ck-lKA_g.js} +2 -2
  28. package/dist/_chunks/{ListConfigurationPage-Cpy4QqNd.js.map → ListConfigurationPage-Ck-lKA_g.js.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-DFjn1DNW.js → ListViewPage-D1vAbQW4.js} +9 -4
  30. package/dist/_chunks/ListViewPage-D1vAbQW4.js.map +1 -0
  31. package/dist/_chunks/{ListViewPage-BkAwIW9s.mjs → ListViewPage-DkQT6AN6.mjs} +10 -5
  32. package/dist/_chunks/ListViewPage-DkQT6AN6.mjs.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-B9BCNNdL.mjs → NoContentTypePage-D5QYn9pN.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-B9BCNNdL.mjs.map → NoContentTypePage-D5QYn9pN.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-C-3ykoxs.js → NoContentTypePage-DnMToxdO.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-C-3ykoxs.js.map → NoContentTypePage-DnMToxdO.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DKLmDZnZ.js → NoPermissionsPage-COirbirm.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DKLmDZnZ.js.map → NoPermissionsPage-COirbirm.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-Bt_HWGat.mjs → NoPermissionsPage-eV9XOUs6.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-Bt_HWGat.mjs.map → NoPermissionsPage-eV9XOUs6.mjs.map} +1 -1
  41. package/dist/_chunks/{Relations-CJmTbZ8T.mjs → Relations-CMu33f0Q.mjs} +3 -3
  42. package/dist/_chunks/Relations-CMu33f0Q.mjs.map +1 -0
  43. package/dist/_chunks/{Relations-CrxfoH2n.js → Relations-CvSHeSTB.js} +3 -3
  44. package/dist/_chunks/Relations-CvSHeSTB.js.map +1 -0
  45. package/dist/_chunks/{en-Ux26r5pl.mjs → en-BrCTWlZv.mjs} +5 -4
  46. package/dist/_chunks/{en-Ux26r5pl.mjs.map → en-BrCTWlZv.mjs.map} +1 -1
  47. package/dist/_chunks/{en-fbKQxLGn.js → en-uOUIxfcQ.js} +5 -4
  48. package/dist/_chunks/{en-fbKQxLGn.js.map → en-uOUIxfcQ.js.map} +1 -1
  49. package/dist/_chunks/{index-Buwn78Rt.js → index-BU73akFF.js} +244 -139
  50. package/dist/_chunks/index-BU73akFF.js.map +1 -0
  51. package/dist/_chunks/{index-D1344xdw.mjs → index-DYjyBm-q.mjs} +247 -142
  52. package/dist/_chunks/index-DYjyBm-q.mjs.map +1 -0
  53. package/dist/_chunks/{layout-ChVuUpa1.mjs → layout-CK49ltFD.mjs} +17 -5
  54. package/dist/_chunks/{layout-ChVuUpa1.mjs.map → layout-CK49ltFD.mjs.map} +1 -1
  55. package/dist/_chunks/{layout-DRuJUpas.js → layout-IJUR2XBA.js} +16 -4
  56. package/dist/_chunks/{layout-DRuJUpas.js.map → layout-IJUR2XBA.js.map} +1 -1
  57. package/dist/_chunks/{relations-B-deMCy4.mjs → relations-Dl8Jk9_i.mjs} +2 -2
  58. package/dist/_chunks/{relations-B-deMCy4.mjs.map → relations-Dl8Jk9_i.mjs.map} +1 -1
  59. package/dist/_chunks/{relations-DuoUwyJr.js → relations-T1zuutNL.js} +2 -2
  60. package/dist/_chunks/{relations-DuoUwyJr.js.map → relations-T1zuutNL.js.map} +1 -1
  61. package/dist/admin/index.js +1 -1
  62. package/dist/admin/index.mjs +1 -1
  63. package/dist/admin/src/history/index.d.ts +3 -0
  64. package/dist/admin/src/index.d.ts +1 -0
  65. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -0
  66. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +20 -0
  67. package/dist/server/index.js +130 -85
  68. package/dist/server/index.js.map +1 -1
  69. package/dist/server/index.mjs +131 -86
  70. package/dist/server/index.mjs.map +1 -1
  71. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  72. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  73. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  74. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  75. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  76. package/dist/server/src/history/services/utils.d.ts +1 -1
  77. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  78. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  79. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  80. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  81. package/package.json +6 -6
  82. package/dist/_chunks/Field-1DLtcLAI.js.map +0 -1
  83. package/dist/_chunks/Field-Cs62u5pl.mjs.map +0 -1
  84. package/dist/_chunks/History-BblwXv7-.js.map +0 -1
  85. package/dist/_chunks/History-DalgFQ3D.mjs.map +0 -1
  86. package/dist/_chunks/ListViewPage-BkAwIW9s.mjs.map +0 -1
  87. package/dist/_chunks/ListViewPage-DFjn1DNW.js.map +0 -1
  88. package/dist/_chunks/Relations-CJmTbZ8T.mjs.map +0 -1
  89. package/dist/_chunks/Relations-CrxfoH2n.js.map +0 -1
  90. package/dist/_chunks/index-Buwn78Rt.js.map +0 -1
  91. package/dist/_chunks/index-D1344xdw.mjs.map +0 -1
@@ -2,15 +2,15 @@
2
2
  const Icons = require("@strapi/icons");
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const strapiAdmin = require("@strapi/admin/strapi-admin");
5
- const qs = require("qs");
6
- const reactIntl = require("react-intl");
7
- const reactRouterDom = require("react-router-dom");
8
5
  const React = require("react");
9
6
  const designSystem = require("@strapi/design-system");
7
+ const reactIntl = require("react-intl");
8
+ const reactRouterDom = require("react-router-dom");
10
9
  const styledComponents = require("styled-components");
11
10
  const yup = require("yup");
12
11
  const pipe = require("lodash/fp/pipe");
13
12
  const dateFns = require("date-fns");
13
+ const qs = require("qs");
14
14
  const toolkit = require("@reduxjs/toolkit");
15
15
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
16
16
  function _interopNamespace(e) {
@@ -70,42 +70,6 @@ const useInjectionZone = (area) => {
70
70
  const [page, position] = area.split(".");
71
71
  return contentManagerPlugin.getInjectedComponents(page, position);
72
72
  };
73
- const HistoryAction = ({ model, document }) => {
74
- const { formatMessage } = reactIntl.useIntl();
75
- const [{ query }] = strapiAdmin.useQueryParams();
76
- const navigate = reactRouterDom.useNavigate();
77
- const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
78
- if (!window.strapi.features.isEnabled("cms-content-history")) {
79
- return null;
80
- }
81
- return {
82
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
83
- label: formatMessage({
84
- id: "content-manager.history.document-action",
85
- defaultMessage: "Content History"
86
- }),
87
- onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
88
- disabled: (
89
- /**
90
- * The user is creating a new document.
91
- * It hasn't been saved yet, so there's no history to go to
92
- */
93
- !document || /**
94
- * The document has been created but the current dimension has never been saved.
95
- * For example, the user is creating a new locale in an existing document,
96
- * so there's no history for the document in that locale
97
- */
98
- !document.id || /**
99
- * History is only available for content types created by the user.
100
- * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,
101
- * which start with `admin::` or `plugin::`
102
- */
103
- !model.startsWith("api::")
104
- ),
105
- position: "header"
106
- };
107
- };
108
- HistoryAction.type = "history";
109
73
  const ID = "id";
110
74
  const CREATED_BY_ATTRIBUTE_NAME = "createdBy";
111
75
  const UPDATED_BY_ATTRIBUTE_NAME = "updatedBy";
@@ -229,7 +193,12 @@ const documentApi = contentManagerApi.injectEndpoints({
229
193
  params: query
230
194
  }
231
195
  }),
232
- invalidatesTags: (_result, _error, { model }) => [{ type: "Document", id: `${model}_LIST` }]
196
+ invalidatesTags: (_result, error, { model }) => {
197
+ if (error) {
198
+ return [];
199
+ }
200
+ return [{ type: "Document", id: `${model}_LIST` }];
201
+ }
233
202
  }),
234
203
  cloneDocument: builder.mutation({
235
204
  query: ({ model, sourceId, data, params }) => ({
@@ -316,6 +285,7 @@ const documentApi = contentManagerApi.injectEndpoints({
316
285
  }),
317
286
  providesTags: (result, _error, arg) => {
318
287
  return [
288
+ { type: "Document", id: `ALL_LIST` },
319
289
  { type: "Document", id: `${arg.model}_LIST` },
320
290
  ...result?.results.map(({ documentId }) => ({
321
291
  type: "Document",
@@ -419,6 +389,18 @@ const documentApi = contentManagerApi.injectEndpoints({
419
389
  },
420
390
  "Relations"
421
391
  ];
392
+ },
393
+ async onQueryStarted({ data, ...patch }, { dispatch, queryFulfilled }) {
394
+ const patchResult = dispatch(
395
+ documentApi.util.updateQueryData("getDocument", patch, (draft) => {
396
+ Object.assign(draft.data, data);
397
+ })
398
+ );
399
+ try {
400
+ await queryFulfilled;
401
+ } catch {
402
+ patchResult.undo();
403
+ }
422
404
  }
423
405
  }),
424
406
  unpublishDocument: builder.mutation({
@@ -1231,7 +1213,6 @@ const useDocumentActions = () => {
1231
1213
  sourceId
1232
1214
  });
1233
1215
  if ("error" in res) {
1234
- toggleNotification({ type: "danger", message: formatAPIError(res.error) });
1235
1216
  return { error: res.error };
1236
1217
  }
1237
1218
  toggleNotification({
@@ -1312,7 +1293,7 @@ const useDocumentActions = () => {
1312
1293
  };
1313
1294
  };
1314
1295
  const ProtectedHistoryPage = React.lazy(
1315
- () => Promise.resolve().then(() => require("./History-BblwXv7-.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1296
+ () => Promise.resolve().then(() => require("./History-GCscEVds.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1316
1297
  );
1317
1298
  const routes$1 = [
1318
1299
  {
@@ -1325,31 +1306,31 @@ const routes$1 = [
1325
1306
  }
1326
1307
  ];
1327
1308
  const ProtectedEditViewPage = React.lazy(
1328
- () => Promise.resolve().then(() => require("./EditViewPage-CmMi2Xsn.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1309
+ () => Promise.resolve().then(() => require("./EditViewPage-CrX5Iz3h.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1329
1310
  );
1330
1311
  const ProtectedListViewPage = React.lazy(
1331
- () => Promise.resolve().then(() => require("./ListViewPage-DFjn1DNW.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1312
+ () => Promise.resolve().then(() => require("./ListViewPage-D1vAbQW4.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1332
1313
  );
1333
1314
  const ProtectedListConfiguration = React.lazy(
1334
- () => Promise.resolve().then(() => require("./ListConfigurationPage-Cpy4QqNd.js")).then((mod) => ({
1315
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-Ck-lKA_g.js")).then((mod) => ({
1335
1316
  default: mod.ProtectedListConfiguration
1336
1317
  }))
1337
1318
  );
1338
1319
  const ProtectedEditConfigurationPage = React.lazy(
1339
- () => Promise.resolve().then(() => require("./EditConfigurationPage-CEGwxV-L.js")).then((mod) => ({
1320
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-DKtok23W.js")).then((mod) => ({
1340
1321
  default: mod.ProtectedEditConfigurationPage
1341
1322
  }))
1342
1323
  );
1343
1324
  const ProtectedComponentConfigurationPage = React.lazy(
1344
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-BWQv6yRj.js")).then((mod) => ({
1325
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-k6fnZytn.js")).then((mod) => ({
1345
1326
  default: mod.ProtectedComponentConfigurationPage
1346
1327
  }))
1347
1328
  );
1348
1329
  const NoPermissions = React.lazy(
1349
- () => Promise.resolve().then(() => require("./NoPermissionsPage-DKLmDZnZ.js")).then((mod) => ({ default: mod.NoPermissions }))
1330
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-COirbirm.js")).then((mod) => ({ default: mod.NoPermissions }))
1350
1331
  );
1351
1332
  const NoContentType = React.lazy(
1352
- () => Promise.resolve().then(() => require("./NoContentTypePage-C-3ykoxs.js")).then((mod) => ({ default: mod.NoContentType }))
1333
+ () => Promise.resolve().then(() => require("./NoContentTypePage-DnMToxdO.js")).then((mod) => ({ default: mod.NoContentType }))
1353
1334
  );
1354
1335
  const CollectionTypePages = () => {
1355
1336
  const { collectionType } = reactRouterDom.useParams();
@@ -1463,7 +1444,7 @@ const DocumentActionButton = (action) => {
1463
1444
  /* @__PURE__ */ jsxRuntime.jsx(
1464
1445
  designSystem.Button,
1465
1446
  {
1466
- flex: 1,
1447
+ flex: "auto",
1467
1448
  startIcon: action.icon,
1468
1449
  disabled: action.disabled,
1469
1450
  onClick: handleClick(action),
@@ -1476,7 +1457,7 @@ const DocumentActionButton = (action) => {
1476
1457
  DocumentActionConfirmDialog,
1477
1458
  {
1478
1459
  ...action.dialog,
1479
- variant: action.variant,
1460
+ variant: action.dialog?.variant ?? action.variant,
1480
1461
  isOpen: dialogId === action.id,
1481
1462
  onClose: handleClose
1482
1463
  }
@@ -1533,9 +1514,9 @@ const DocumentActionsMenu = ({
1533
1514
  disabled: isDisabled,
1534
1515
  size: "S",
1535
1516
  endIcon: null,
1536
- paddingTop: "7px",
1537
- paddingLeft: "9px",
1538
- paddingRight: "9px",
1517
+ paddingTop: "4px",
1518
+ paddingLeft: "7px",
1519
+ paddingRight: "7px",
1539
1520
  variant,
1540
1521
  children: [
1541
1522
  /* @__PURE__ */ jsxRuntime.jsx(Icons.More, { "aria-hidden": true, focusable: false }),
@@ -1555,10 +1536,18 @@ const DocumentActionsMenu = ({
1555
1536
  onSelect: handleClick(action),
1556
1537
  display: "block",
1557
1538
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: [
1558
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { color: convertActionVariantToColor(action.variant), gap: 2, tag: "span", children: [
1559
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { tag: "span", color: convertActionVariantToIconColor(action.variant), children: action.icon }),
1560
- action.label
1561
- ] }),
1539
+ /* @__PURE__ */ jsxRuntime.jsxs(
1540
+ designSystem.Flex,
1541
+ {
1542
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1543
+ gap: 2,
1544
+ tag: "span",
1545
+ children: [
1546
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: action.icon }),
1547
+ action.label
1548
+ ]
1549
+ }
1550
+ ),
1562
1551
  action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsxRuntime.jsx(
1563
1552
  designSystem.Flex,
1564
1553
  {
@@ -1617,18 +1606,6 @@ const convertActionVariantToColor = (variant = "secondary") => {
1617
1606
  return "primary600";
1618
1607
  }
1619
1608
  };
1620
- const convertActionVariantToIconColor = (variant = "secondary") => {
1621
- switch (variant) {
1622
- case "danger":
1623
- return "danger600";
1624
- case "secondary":
1625
- return "neutral500";
1626
- case "success":
1627
- return "success600";
1628
- default:
1629
- return "primary600";
1630
- }
1631
- };
1632
1609
  const DocumentActionConfirmDialog = ({
1633
1610
  onClose,
1634
1611
  onCancel,
@@ -1682,8 +1659,8 @@ const DocumentActionModal = ({
1682
1659
  };
1683
1660
  return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Root, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Content, { children: [
1684
1661
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Title, { children: title }) }),
1685
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : Content }),
1686
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Footer, { children: typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer })
1662
+ typeof Content === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Content, { onClose: handleClose }) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: Content }),
1663
+ typeof Footer === "function" ? /* @__PURE__ */ jsxRuntime.jsx(Footer, { onClose: handleClose }) : Footer
1687
1664
  ] }) });
1688
1665
  };
1689
1666
  const PublishAction$1 = ({
@@ -1705,6 +1682,12 @@ const PublishAction$1 = ({
1705
1682
  ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 }) => ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 })
1706
1683
  );
1707
1684
  const { publish } = useDocumentActions();
1685
+ const [
1686
+ countDraftRelations,
1687
+ { isLoading: isLoadingDraftRelations, isError: isErrorDraftRelations }
1688
+ ] = useLazyGetDraftRelationCountQuery();
1689
+ const [localCountOfDraftRelations, setLocalCountOfDraftRelations] = React__namespace.useState(0);
1690
+ const [serverCountOfDraftRelations, setServerCountOfDraftRelations] = React__namespace.useState(0);
1708
1691
  const [{ query, rawQuery }] = strapiAdmin.useQueryParams();
1709
1692
  const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
1710
1693
  const modified = strapiAdmin.useForm("PublishAction", ({ modified: modified2 }) => modified2);
@@ -1713,10 +1696,101 @@ const PublishAction$1 = ({
1713
1696
  const validate = strapiAdmin.useForm("PublishAction", (state) => state.validate);
1714
1697
  const setErrors = strapiAdmin.useForm("PublishAction", (state) => state.setErrors);
1715
1698
  const formValues = strapiAdmin.useForm("PublishAction", ({ values }) => values);
1699
+ React__namespace.useEffect(() => {
1700
+ if (isErrorDraftRelations) {
1701
+ toggleNotification({
1702
+ type: "danger",
1703
+ message: formatMessage({
1704
+ id: getTranslation("error.records.fetch-draft-relatons"),
1705
+ defaultMessage: "An error occurred while fetching draft relations on this document."
1706
+ })
1707
+ });
1708
+ }
1709
+ }, [isErrorDraftRelations, toggleNotification, formatMessage]);
1710
+ React__namespace.useEffect(() => {
1711
+ const localDraftRelations = /* @__PURE__ */ new Set();
1712
+ const extractDraftRelations = (data) => {
1713
+ const relations = data.connect || [];
1714
+ relations.forEach((relation) => {
1715
+ if (relation.status === "draft") {
1716
+ localDraftRelations.add(relation.id);
1717
+ }
1718
+ });
1719
+ };
1720
+ const traverseAndExtract = (data) => {
1721
+ Object.entries(data).forEach(([key, value]) => {
1722
+ if (key === "connect" && Array.isArray(value)) {
1723
+ extractDraftRelations({ connect: value });
1724
+ } else if (typeof value === "object" && value !== null) {
1725
+ traverseAndExtract(value);
1726
+ }
1727
+ });
1728
+ };
1729
+ if (!documentId || modified) {
1730
+ traverseAndExtract(formValues);
1731
+ setLocalCountOfDraftRelations(localDraftRelations.size);
1732
+ }
1733
+ }, [documentId, modified, formValues, setLocalCountOfDraftRelations]);
1734
+ React__namespace.useEffect(() => {
1735
+ if (documentId) {
1736
+ const fetchDraftRelationsCount = async () => {
1737
+ const { data, error } = await countDraftRelations({
1738
+ collectionType,
1739
+ model,
1740
+ documentId,
1741
+ params
1742
+ });
1743
+ if (error) {
1744
+ throw error;
1745
+ }
1746
+ if (data) {
1747
+ setServerCountOfDraftRelations(data.data);
1748
+ }
1749
+ };
1750
+ fetchDraftRelationsCount();
1751
+ }
1752
+ }, [documentId, countDraftRelations, collectionType, model, params]);
1716
1753
  const isDocumentPublished = (document?.[PUBLISHED_AT_ATTRIBUTE_NAME] || meta?.availableStatus.some((doc) => doc[PUBLISHED_AT_ATTRIBUTE_NAME] !== null)) && document?.status !== "modified";
1717
1754
  if (!schema?.options?.draftAndPublish) {
1718
1755
  return null;
1719
1756
  }
1757
+ const performPublish = async () => {
1758
+ setSubmitting(true);
1759
+ try {
1760
+ const { errors } = await validate();
1761
+ if (errors) {
1762
+ toggleNotification({
1763
+ type: "danger",
1764
+ message: formatMessage({
1765
+ id: "content-manager.validation.error",
1766
+ defaultMessage: "There are validation errors in your document. Please fix them before saving."
1767
+ })
1768
+ });
1769
+ return;
1770
+ }
1771
+ const res = await publish(
1772
+ {
1773
+ collectionType,
1774
+ model,
1775
+ documentId,
1776
+ params
1777
+ },
1778
+ formValues
1779
+ );
1780
+ if ("data" in res && collectionType !== SINGLE_TYPES) {
1781
+ navigate({
1782
+ pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1783
+ search: rawQuery
1784
+ });
1785
+ } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1786
+ setErrors(formatValidationErrors(res.error));
1787
+ }
1788
+ } finally {
1789
+ setSubmitting(false);
1790
+ }
1791
+ };
1792
+ const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
1793
+ const hasDraftRelations = totalDraftRelations > 0;
1720
1794
  return {
1721
1795
  /**
1722
1796
  * Disabled when:
@@ -1726,49 +1800,39 @@ const PublishAction$1 = ({
1726
1800
  * - the document is already published & not modified
1727
1801
  * - the document is being created & not modified
1728
1802
  * - the user doesn't have the permission to publish
1729
- * - the user doesn't have the permission to create a new document
1730
- * - the user doesn't have the permission to update the document
1731
1803
  */
1732
- disabled: isCloning || isSubmitting || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish || Boolean(!document?.documentId && !canCreate || document?.documentId && !canUpdate),
1804
+ disabled: isCloning || isSubmitting || isLoadingDraftRelations || activeTab === "published" || !modified && isDocumentPublished || !modified && !document?.documentId || !canPublish,
1733
1805
  label: formatMessage({
1734
1806
  id: "app.utils.publish",
1735
1807
  defaultMessage: "Publish"
1736
1808
  }),
1737
1809
  onClick: async () => {
1738
- setSubmitting(true);
1739
- try {
1740
- const { errors } = await validate();
1741
- if (errors) {
1742
- toggleNotification({
1743
- type: "danger",
1744
- message: formatMessage({
1745
- id: "content-manager.validation.error",
1746
- defaultMessage: "There are validation errors in your document. Please fix them before saving."
1747
- })
1748
- });
1749
- return;
1750
- }
1751
- const res = await publish(
1752
- {
1753
- collectionType,
1754
- model,
1755
- documentId,
1756
- params
1757
- },
1758
- formValues
1759
- );
1760
- if ("data" in res && collectionType !== SINGLE_TYPES) {
1761
- navigate({
1762
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1763
- search: rawQuery
1764
- });
1765
- } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1766
- setErrors(formatValidationErrors(res.error));
1810
+ if (hasDraftRelations) {
1811
+ return;
1812
+ }
1813
+ await performPublish();
1814
+ },
1815
+ dialog: hasDraftRelations ? {
1816
+ type: "dialog",
1817
+ variant: "danger",
1818
+ footer: null,
1819
+ title: formatMessage({
1820
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.title`),
1821
+ defaultMessage: "Confirmation"
1822
+ }),
1823
+ content: formatMessage(
1824
+ {
1825
+ id: getTranslation(`popUpwarning.warning.bulk-has-draft-relations.message`),
1826
+ defaultMessage: "This entry is related to {count, plural, one {# draft entry} other {# draft entries}}. Publishing it could leave broken links in your app."
1827
+ },
1828
+ {
1829
+ count: totalDraftRelations
1767
1830
  }
1768
- } finally {
1769
- setSubmitting(false);
1831
+ ),
1832
+ onConfirm: async () => {
1833
+ await performPublish();
1770
1834
  }
1771
- }
1835
+ } : void 0
1772
1836
  };
1773
1837
  };
1774
1838
  PublishAction$1.type = "publish";
@@ -1784,7 +1848,7 @@ const UpdateAction = ({
1784
1848
  const cloneMatch = reactRouterDom.useMatch(CLONE_PATH);
1785
1849
  const isCloning = cloneMatch !== null;
1786
1850
  const { formatMessage } = reactIntl.useIntl();
1787
- const { canCreate, canUpdate } = useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1851
+ useDocumentRBAC("UpdateAction", ({ canCreate: canCreate2, canUpdate: canUpdate2 }) => ({
1788
1852
  canCreate: canCreate2,
1789
1853
  canUpdate: canUpdate2
1790
1854
  }));
@@ -1804,10 +1868,8 @@ const UpdateAction = ({
1804
1868
  * - the form is submitting
1805
1869
  * - the document is not modified & we're not cloning (you can save a clone entity straight away)
1806
1870
  * - the active tab is the published tab
1807
- * - the user doesn't have the permission to create a new document
1808
- * - the user doesn't have the permission to update the document
1809
1871
  */
1810
- disabled: isSubmitting || !modified && !isCloning || activeTab === "published" || Boolean(!documentId && !canCreate || documentId && !canUpdate),
1872
+ disabled: isSubmitting || !modified && !isCloning || activeTab === "published",
1811
1873
  label: formatMessage({
1812
1874
  id: "content-manager.containers.Edit.save",
1813
1875
  defaultMessage: "Save"
@@ -1836,10 +1898,13 @@ const UpdateAction = ({
1836
1898
  document
1837
1899
  );
1838
1900
  if ("data" in res) {
1839
- navigate({
1840
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1841
- search: rawQuery
1842
- });
1901
+ navigate(
1902
+ {
1903
+ pathname: `../${res.data.documentId}`,
1904
+ search: rawQuery
1905
+ },
1906
+ { relative: "path" }
1907
+ );
1843
1908
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1844
1909
  setErrors(formatValidationErrors(res.error));
1845
1910
  }
@@ -1869,10 +1934,10 @@ const UpdateAction = ({
1869
1934
  if ("data" in res && collectionType !== SINGLE_TYPES) {
1870
1935
  navigate(
1871
1936
  {
1872
- pathname: `../${collectionType}/${model}/${res.data.documentId}`,
1937
+ pathname: `../${res.data.documentId}`,
1873
1938
  search: rawQuery
1874
1939
  },
1875
- { replace: true }
1940
+ { replace: true, relative: "path" }
1876
1941
  );
1877
1942
  } else if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
1878
1943
  setErrors(formatValidationErrors(res.error));
@@ -2119,23 +2184,13 @@ const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2119
2184
  id: "content-manager.containers.edit.title.new",
2120
2185
  defaultMessage: "Create an entry"
2121
2186
  }) : documentTitle;
2122
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 8, paddingBottom: 4, gap: 3, children: [
2187
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", paddingTop: 6, paddingBottom: 4, gap: 2, children: [
2123
2188
  /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.BackButton, {}),
2124
- /* @__PURE__ */ jsxRuntime.jsxs(
2125
- designSystem.Flex,
2126
- {
2127
- width: "100%",
2128
- justifyContent: "space-between",
2129
- paddingTop: 1,
2130
- gap: "80px",
2131
- alignItems: "flex-start",
2132
- children: [
2133
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
2134
- /* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
2135
- ]
2136
- }
2137
- ),
2138
- status ? /* @__PURE__ */ jsxRuntime.jsx(DocumentStatus, { status: isCloning ? "draft" : status }) : null
2189
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { width: "100%", justifyContent: "space-between", gap: "80px", alignItems: "flex-start", children: [
2190
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", children: title }),
2191
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderToolbar, {})
2192
+ ] }),
2193
+ status ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(DocumentStatus, { status: isCloning ? "draft" : status }) }) : null
2139
2194
  ] });
2140
2195
  };
2141
2196
  const HeaderToolbar = () => {
@@ -2826,7 +2881,7 @@ const ConfirmBulkActionDialog = ({
2826
2881
  endAction
2827
2882
  }) => {
2828
2883
  const { formatMessage } = reactIntl.useIntl();
2829
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { onOpenChange: onToggleDialog, open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
2884
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Root, { open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Content, { children: [
2830
2885
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Header, { children: formatMessage({
2831
2886
  id: "app.components.ConfirmDialog.title",
2832
2887
  defaultMessage: "Confirmation"
@@ -3617,8 +3672,7 @@ class ContentManagerPlugin {
3617
3672
  documentActions = [
3618
3673
  ...DEFAULT_ACTIONS,
3619
3674
  ...DEFAULT_TABLE_ROW_ACTIONS,
3620
- ...DEFAULT_HEADER_ACTIONS,
3621
- HistoryAction
3675
+ ...DEFAULT_HEADER_ACTIONS
3622
3676
  ];
3623
3677
  editViewSidePanels = [ActionsPanel];
3624
3678
  headerActions = [];
@@ -3707,6 +3761,52 @@ const getPrintableType = (value) => {
3707
3761
  }
3708
3762
  return nativeType;
3709
3763
  };
3764
+ const HistoryAction = ({ model, document }) => {
3765
+ const { formatMessage } = reactIntl.useIntl();
3766
+ const [{ query }] = strapiAdmin.useQueryParams();
3767
+ const navigate = reactRouterDom.useNavigate();
3768
+ const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
3769
+ if (!window.strapi.features.isEnabled("cms-content-history")) {
3770
+ return null;
3771
+ }
3772
+ return {
3773
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ClockCounterClockwise, {}),
3774
+ label: formatMessage({
3775
+ id: "content-manager.history.document-action",
3776
+ defaultMessage: "Content History"
3777
+ }),
3778
+ onClick: () => navigate({ pathname: "history", search: pluginsQueryParams }),
3779
+ disabled: (
3780
+ /**
3781
+ * The user is creating a new document.
3782
+ * It hasn't been saved yet, so there's no history to go to
3783
+ */
3784
+ !document || /**
3785
+ * The document has been created but the current dimension has never been saved.
3786
+ * For example, the user is creating a new locale in an existing document,
3787
+ * so there's no history for the document in that locale
3788
+ */
3789
+ !document.id || /**
3790
+ * History is only available for content types created by the user.
3791
+ * These have the `api::` prefix, as opposed to the ones created by Strapi or plugins,
3792
+ * which start with `admin::` or `plugin::`
3793
+ */
3794
+ !model.startsWith("api::")
3795
+ ),
3796
+ position: "header"
3797
+ };
3798
+ };
3799
+ HistoryAction.type = "history";
3800
+ const historyAdmin = {
3801
+ bootstrap(app) {
3802
+ const { addDocumentAction } = app.getPlugin("content-manager").apis;
3803
+ addDocumentAction((actions2) => {
3804
+ const indexOfDeleteAction = actions2.findIndex((action) => action.type === "delete");
3805
+ actions2.splice(indexOfDeleteAction, 0, HistoryAction);
3806
+ return actions2;
3807
+ });
3808
+ }
3809
+ };
3710
3810
  const initialState = {
3711
3811
  collectionTypeLinks: [],
3712
3812
  components: [],
@@ -3762,7 +3862,7 @@ const index = {
3762
3862
  app.router.addRoute({
3763
3863
  path: "content-manager/*",
3764
3864
  lazy: async () => {
3765
- const { Layout } = await Promise.resolve().then(() => require("./layout-DRuJUpas.js"));
3865
+ const { Layout } = await Promise.resolve().then(() => require("./layout-IJUR2XBA.js"));
3766
3866
  return {
3767
3867
  Component: Layout
3768
3868
  };
@@ -3771,10 +3871,15 @@ const index = {
3771
3871
  });
3772
3872
  app.registerPlugin(cm.config);
3773
3873
  },
3874
+ bootstrap(app) {
3875
+ if (typeof historyAdmin.bootstrap === "function") {
3876
+ historyAdmin.bootstrap(app);
3877
+ }
3878
+ },
3774
3879
  async registerTrads({ locales }) {
3775
3880
  const importedTrads = await Promise.all(
3776
3881
  locales.map((locale) => {
3777
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-fbKQxLGn.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
3882
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-uOUIxfcQ.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
3778
3883
  return {
3779
3884
  data: prefixPluginTranslations(data, PLUGIN_ID),
3780
3885
  locale
@@ -3831,4 +3936,4 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
3831
3936
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
3832
3937
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
3833
3938
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
3834
- //# sourceMappingURL=index-Buwn78Rt.js.map
3939
+ //# sourceMappingURL=index-BU73akFF.js.map