@strapi/content-manager 0.0.0-experimental.eba25ec571b091c6bde1104eb6c753debdf15462 → 0.0.0-experimental.f0a0bc26f5ef0693aaea2a616bc6b816cfee54b6

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 (67) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-BaJMOQyq.mjs → ComponentConfigurationPage-DhWA-JzT.mjs} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-BaJMOQyq.mjs.map → ComponentConfigurationPage-DhWA-JzT.mjs.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-N-CTtgQa.js → ComponentConfigurationPage-UduDBv3m.js} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-N-CTtgQa.js.map → ComponentConfigurationPage-UduDBv3m.js.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-CKK-5LfX.mjs → EditConfigurationPage-5tmx_7Hp.mjs} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-CKK-5LfX.mjs.map → EditConfigurationPage-5tmx_7Hp.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-BHkjAbxH.js → EditConfigurationPage-Cp9UzUfs.js} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-BHkjAbxH.js.map → EditConfigurationPage-Cp9UzUfs.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-B11aeMcf.mjs → EditViewPage-BKoISUOu.mjs} +3 -3
  10. package/dist/_chunks/{EditViewPage-B11aeMcf.mjs.map → EditViewPage-BKoISUOu.mjs.map} +1 -1
  11. package/dist/_chunks/{EditViewPage-QPUftxUd.js → EditViewPage-C7l2Emuj.js} +3 -3
  12. package/dist/_chunks/{EditViewPage-QPUftxUd.js.map → EditViewPage-C7l2Emuj.js.map} +1 -1
  13. package/dist/_chunks/{Field-DUK83cfh.js → Field-BPSJpDfE.js} +3 -3
  14. package/dist/_chunks/{Field-DUK83cfh.js.map → Field-BPSJpDfE.js.map} +1 -1
  15. package/dist/_chunks/{Field-Bj_RgtGo.mjs → Field-BZxzYf1x.mjs} +3 -3
  16. package/dist/_chunks/{Field-Bj_RgtGo.mjs.map → Field-BZxzYf1x.mjs.map} +1 -1
  17. package/dist/_chunks/{Form-DLMSoXV7.mjs → Form-8qyOU6YG.mjs} +2 -2
  18. package/dist/_chunks/{Form-DLMSoXV7.mjs.map → Form-8qyOU6YG.mjs.map} +1 -1
  19. package/dist/_chunks/{Form-DHmBRlHd.js → Form-DLkqDd2G.js} +2 -2
  20. package/dist/_chunks/{Form-DHmBRlHd.js.map → Form-DLkqDd2G.js.map} +1 -1
  21. package/dist/_chunks/{History-Di3zm4HT.js → History-DYMicybF.js} +4 -4
  22. package/dist/_chunks/{History-Di3zm4HT.js.map → History-DYMicybF.js.map} +1 -1
  23. package/dist/_chunks/{History-CfCSNlG9.mjs → History-N_kRb1Yr.mjs} +4 -4
  24. package/dist/_chunks/{History-CfCSNlG9.mjs.map → History-N_kRb1Yr.mjs.map} +1 -1
  25. package/dist/_chunks/{ListConfigurationPage-0mtv_iqk.mjs → ListConfigurationPage-BM3qVxug.mjs} +2 -2
  26. package/dist/_chunks/{ListConfigurationPage-0mtv_iqk.mjs.map → ListConfigurationPage-BM3qVxug.mjs.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-Cq361KIt.js → ListConfigurationPage-rUF9iGWq.js} +2 -2
  28. package/dist/_chunks/{ListConfigurationPage-Cq361KIt.js.map → ListConfigurationPage-rUF9iGWq.js.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-DFDcG8gM.js → ListViewPage-BSLzd7cZ.js} +3 -3
  30. package/dist/_chunks/{ListViewPage-DFDcG8gM.js.map → ListViewPage-BSLzd7cZ.js.map} +1 -1
  31. package/dist/_chunks/{ListViewPage-BxLVROX8.mjs → ListViewPage-CWilGbZb.mjs} +3 -3
  32. package/dist/_chunks/{ListViewPage-BxLVROX8.mjs.map → ListViewPage-CWilGbZb.mjs.map} +1 -1
  33. package/dist/_chunks/{NoContentTypePage-BSyvnDZZ.js → NoContentTypePage-CQccVhIX.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-BSyvnDZZ.js.map → NoContentTypePage-CQccVhIX.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-BRfDd67_.mjs → NoContentTypePage-VWYlePwI.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-BRfDd67_.mjs.map → NoContentTypePage-VWYlePwI.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DyLphsn_.js → NoPermissionsPage-Af32Gg2m.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DyLphsn_.js.map → NoPermissionsPage-Af32Gg2m.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-CV9V8KWa.mjs → NoPermissionsPage-CS2tCmfr.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-CV9V8KWa.mjs.map → NoPermissionsPage-CS2tCmfr.mjs.map} +1 -1
  41. package/dist/_chunks/{Preview-D_3aO6Ly.js → Preview-D4KzuJFL.js} +3 -3
  42. package/dist/_chunks/{Preview-D_3aO6Ly.js.map → Preview-D4KzuJFL.js.map} +1 -1
  43. package/dist/_chunks/{Preview-C_B1nx3g.mjs → Preview-kPkuZbBJ.mjs} +3 -3
  44. package/dist/_chunks/{Preview-C_B1nx3g.mjs.map → Preview-kPkuZbBJ.mjs.map} +1 -1
  45. package/dist/_chunks/{Relations-C6pwmDXh.mjs → Relations-5k27Rh54.mjs} +3 -3
  46. package/dist/_chunks/{Relations-C6pwmDXh.mjs.map → Relations-5k27Rh54.mjs.map} +1 -1
  47. package/dist/_chunks/{Relations-Cne2AlrL.js → Relations-D_Ki5aVM.js} +3 -3
  48. package/dist/_chunks/{Relations-Cne2AlrL.js.map → Relations-D_Ki5aVM.js.map} +1 -1
  49. package/dist/_chunks/{en-Ic0kXjxB.js → en-BK8Xyl5I.js} +2 -1
  50. package/dist/_chunks/{en-Ic0kXjxB.js.map → en-BK8Xyl5I.js.map} +1 -1
  51. package/dist/_chunks/{en-DhFUjrNW.mjs → en-Dtk_ot79.mjs} +2 -1
  52. package/dist/_chunks/{en-DhFUjrNW.mjs.map → en-Dtk_ot79.mjs.map} +1 -1
  53. package/dist/_chunks/{index-BpxR3En4.mjs → index-BLPa8Dq-.mjs} +40 -22
  54. package/dist/_chunks/{index-BpxR3En4.mjs.map → index-BLPa8Dq-.mjs.map} +1 -1
  55. package/dist/_chunks/{index-T-aWjbj2.js → index-DwOsF7wF.js} +40 -22
  56. package/dist/_chunks/{index-T-aWjbj2.js.map → index-DwOsF7wF.js.map} +1 -1
  57. package/dist/_chunks/{layout-DhMZ_lDx.mjs → layout-2Si0j0jO.mjs} +3 -3
  58. package/dist/_chunks/{layout-DhMZ_lDx.mjs.map → layout-2Si0j0jO.mjs.map} +1 -1
  59. package/dist/_chunks/{layout-BEuNwv-F.js → layout-CN2bFL9V.js} +3 -3
  60. package/dist/_chunks/{layout-BEuNwv-F.js.map → layout-CN2bFL9V.js.map} +1 -1
  61. package/dist/_chunks/{relations-kLcuobLk.js → relations-B0E0XUY7.js} +2 -2
  62. package/dist/_chunks/{relations-kLcuobLk.js.map → relations-B0E0XUY7.js.map} +1 -1
  63. package/dist/_chunks/{relations-BdnxoX6f.mjs → relations-CAxDjUJF.mjs} +2 -2
  64. package/dist/_chunks/{relations-BdnxoX6f.mjs.map → relations-CAxDjUJF.mjs.map} +1 -1
  65. package/dist/admin/index.js +1 -1
  66. package/dist/admin/index.mjs +1 -1
  67. package/package.json +8 -8
@@ -1683,7 +1683,7 @@ const useDocumentActions = () => {
1683
1683
  };
1684
1684
  };
1685
1685
  const ProtectedHistoryPage = React__namespace.lazy(
1686
- () => Promise.resolve().then(() => require("./History-Di3zm4HT.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1686
+ () => Promise.resolve().then(() => require("./History-DYMicybF.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1687
1687
  );
1688
1688
  const routes$2 = [
1689
1689
  {
@@ -1696,7 +1696,7 @@ const routes$2 = [
1696
1696
  }
1697
1697
  ];
1698
1698
  const ProtectedPreviewPage = React__namespace.lazy(
1699
- () => Promise.resolve().then(() => require("./Preview-D_3aO6Ly.js")).then((mod) => ({ default: mod.ProtectedPreviewPage }))
1699
+ () => Promise.resolve().then(() => require("./Preview-D4KzuJFL.js")).then((mod) => ({ default: mod.ProtectedPreviewPage }))
1700
1700
  );
1701
1701
  const routes$1 = [
1702
1702
  {
@@ -1709,31 +1709,31 @@ const routes$1 = [
1709
1709
  }
1710
1710
  ];
1711
1711
  const ProtectedEditViewPage = React.lazy(
1712
- () => Promise.resolve().then(() => require("./EditViewPage-QPUftxUd.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1712
+ () => Promise.resolve().then(() => require("./EditViewPage-C7l2Emuj.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1713
1713
  );
1714
1714
  const ProtectedListViewPage = React.lazy(
1715
- () => Promise.resolve().then(() => require("./ListViewPage-DFDcG8gM.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1715
+ () => Promise.resolve().then(() => require("./ListViewPage-BSLzd7cZ.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1716
1716
  );
1717
1717
  const ProtectedListConfiguration = React.lazy(
1718
- () => Promise.resolve().then(() => require("./ListConfigurationPage-Cq361KIt.js")).then((mod) => ({
1718
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-rUF9iGWq.js")).then((mod) => ({
1719
1719
  default: mod.ProtectedListConfiguration
1720
1720
  }))
1721
1721
  );
1722
1722
  const ProtectedEditConfigurationPage = React.lazy(
1723
- () => Promise.resolve().then(() => require("./EditConfigurationPage-BHkjAbxH.js")).then((mod) => ({
1723
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-Cp9UzUfs.js")).then((mod) => ({
1724
1724
  default: mod.ProtectedEditConfigurationPage
1725
1725
  }))
1726
1726
  );
1727
1727
  const ProtectedComponentConfigurationPage = React.lazy(
1728
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-N-CTtgQa.js")).then((mod) => ({
1728
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-UduDBv3m.js")).then((mod) => ({
1729
1729
  default: mod.ProtectedComponentConfigurationPage
1730
1730
  }))
1731
1731
  );
1732
1732
  const NoPermissions = React.lazy(
1733
- () => Promise.resolve().then(() => require("./NoPermissionsPage-DyLphsn_.js")).then((mod) => ({ default: mod.NoPermissions }))
1733
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-Af32Gg2m.js")).then((mod) => ({ default: mod.NoPermissions }))
1734
1734
  );
1735
1735
  const NoContentType = React.lazy(
1736
- () => Promise.resolve().then(() => require("./NoContentTypePage-BSyvnDZZ.js")).then((mod) => ({ default: mod.NoContentType }))
1736
+ () => Promise.resolve().then(() => require("./NoContentTypePage-CQccVhIX.js")).then((mod) => ({ default: mod.NoContentType }))
1737
1737
  );
1738
1738
  const CollectionTypePages = () => {
1739
1739
  const { collectionType } = reactRouterDom.useParams();
@@ -4054,11 +4054,18 @@ const previewApi = contentManagerApi.injectEndpoints({
4054
4054
  })
4055
4055
  });
4056
4056
  const { useGetPreviewUrlQuery } = previewApi;
4057
+ const ConditionalTooltip = ({ isShown, label, children }) => {
4058
+ if (isShown) {
4059
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label, children });
4060
+ }
4061
+ return children;
4062
+ };
4057
4063
  const PreviewSidePanel = ({ model, documentId, document }) => {
4058
4064
  const { formatMessage } = reactIntl.useIntl();
4059
4065
  const { trackUsage } = strapiAdmin.useTracking();
4060
4066
  const { pathname } = reactRouterDom.useLocation();
4061
4067
  const [{ query }] = strapiAdmin.useQueryParams();
4068
+ const isModified = strapiAdmin.useForm("PreviewSidePanel", (state) => state.modified);
4062
4069
  const { data, error } = useGetPreviewUrlQuery({
4063
4070
  params: {
4064
4071
  contentType: model
@@ -4079,17 +4086,28 @@ const PreviewSidePanel = ({ model, documentId, document }) => {
4079
4086
  return {
4080
4087
  title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
4081
4088
  content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
4082
- designSystem.Button,
4089
+ ConditionalTooltip,
4083
4090
  {
4084
- variant: "tertiary",
4085
- tag: reactRouterDom.Link,
4086
- to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
4087
- onClick: trackNavigation,
4088
- flex: "auto",
4089
- children: formatMessage({
4090
- id: "content-manager.preview.panel.button",
4091
- defaultMessage: "Open preview"
4092
- })
4091
+ label: formatMessage({
4092
+ id: "content-manager.preview.panel.button-disabled-tooltip",
4093
+ defaultMessage: "Please save to open the preview"
4094
+ }),
4095
+ isShown: isModified,
4096
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4097
+ designSystem.Button,
4098
+ {
4099
+ variant: "tertiary",
4100
+ tag: reactRouterDom.Link,
4101
+ to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
4102
+ onClick: trackNavigation,
4103
+ flex: "auto",
4104
+ disabled: isModified,
4105
+ children: formatMessage({
4106
+ id: "content-manager.preview.panel.button",
4107
+ defaultMessage: "Open preview"
4108
+ })
4109
+ }
4110
+ )
4093
4111
  }
4094
4112
  ) })
4095
4113
  };
@@ -4123,7 +4141,7 @@ const index = {
4123
4141
  app.router.addRoute({
4124
4142
  path: "content-manager/*",
4125
4143
  lazy: async () => {
4126
- const { Layout } = await Promise.resolve().then(() => require("./layout-BEuNwv-F.js"));
4144
+ const { Layout } = await Promise.resolve().then(() => require("./layout-CN2bFL9V.js"));
4127
4145
  return {
4128
4146
  Component: Layout
4129
4147
  };
@@ -4143,7 +4161,7 @@ const index = {
4143
4161
  async registerTrads({ locales }) {
4144
4162
  const importedTrads = await Promise.all(
4145
4163
  locales.map((locale) => {
4146
- 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-Ic0kXjxB.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-9K52xZIr.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B2Kyv8Z9.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-7sfIbjxE.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 }) => {
4164
+ 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-BK8Xyl5I.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-9K52xZIr.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B2Kyv8Z9.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-7sfIbjxE.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 }) => {
4147
4165
  return {
4148
4166
  data: prefixPluginTranslations(data, PLUGIN_ID),
4149
4167
  locale
@@ -4203,4 +4221,4 @@ exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuer
4203
4221
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
4204
4222
  exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
4205
4223
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
4206
- //# sourceMappingURL=index-T-aWjbj2.js.map
4224
+ //# sourceMappingURL=index-DwOsF7wF.js.map