@strapi/content-manager 0.0.0-experimental.17b4116f461a49b8ce5386f7c8d79c511d40fb3b → 0.0.0-experimental.1fc4b627b49f713b07ed9f7f2b37741dcf8cf736

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 (214) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{CardDragPreview-DSVYodBX.js → CardDragPreview-C0QyJgRA.js} +10 -14
  3. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -0
  4. package/dist/_chunks/{CardDragPreview-ikSG4M46.mjs → CardDragPreview-DOxamsuj.mjs} +7 -9
  5. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -0
  6. package/dist/_chunks/{ComponentConfigurationPage-DjQBdcKF.mjs → ComponentConfigurationPage-CIjXcRAB.mjs} +4 -4
  7. package/dist/_chunks/{ComponentConfigurationPage-DjQBdcKF.mjs.map → ComponentConfigurationPage-CIjXcRAB.mjs.map} +1 -1
  8. package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js → ComponentConfigurationPage-gsCd80MU.js} +4 -4
  9. package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js.map → ComponentConfigurationPage-gsCd80MU.js.map} +1 -1
  10. package/dist/_chunks/{ComponentIcon-BBQsYCVn.js → ComponentIcon-BXdiCGQp.js} +8 -2
  11. package/dist/_chunks/ComponentIcon-BXdiCGQp.js.map +1 -0
  12. package/dist/_chunks/{ComponentIcon-BOFnK76n.mjs → ComponentIcon-u4bIXTFY.mjs} +9 -3
  13. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -0
  14. package/dist/_chunks/{EditConfigurationPage-BoBb-DLH.mjs → EditConfigurationPage-BglmD_BF.mjs} +4 -4
  15. package/dist/_chunks/{EditConfigurationPage-BoBb-DLH.mjs.map → EditConfigurationPage-BglmD_BF.mjs.map} +1 -1
  16. package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js → EditConfigurationPage-DHDQKBzw.js} +4 -4
  17. package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js.map → EditConfigurationPage-DHDQKBzw.js.map} +1 -1
  18. package/dist/_chunks/{EditViewPage-KRG56aCq.js → EditViewPage-C4iTxUPU.js} +69 -50
  19. package/dist/_chunks/EditViewPage-C4iTxUPU.js.map +1 -0
  20. package/dist/_chunks/{EditViewPage-aUnqL-63.mjs → EditViewPage-CiwVPMaK.mjs} +70 -49
  21. package/dist/_chunks/EditViewPage-CiwVPMaK.mjs.map +1 -0
  22. package/dist/_chunks/{Field-kVFO4ZKB.mjs → Field-DIjL1b5d.mjs} +1046 -802
  23. package/dist/_chunks/Field-DIjL1b5d.mjs.map +1 -0
  24. package/dist/_chunks/{Field-kq1c2TF1.js → Field-DhXEK8y1.js} +1092 -849
  25. package/dist/_chunks/Field-DhXEK8y1.js.map +1 -0
  26. package/dist/_chunks/{Form-Jgh5hGTu.mjs → Form-CmNesrvR.mjs} +66 -45
  27. package/dist/_chunks/Form-CmNesrvR.mjs.map +1 -0
  28. package/dist/_chunks/{Form-CQ67ZifP.js → Form-CwmJ4sWe.js} +66 -46
  29. package/dist/_chunks/Form-CwmJ4sWe.js.map +1 -0
  30. package/dist/_chunks/{History-BLEnudTX.js → History-BLCCNgCt.js} +164 -54
  31. package/dist/_chunks/History-BLCCNgCt.js.map +1 -0
  32. package/dist/_chunks/{History-DKhZAPcK.mjs → History-D-99Wh30.mjs} +163 -52
  33. package/dist/_chunks/History-D-99Wh30.mjs.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-Zso_LUjn.js → ListConfigurationPage-DxWpeZrO.js} +68 -59
  35. package/dist/_chunks/ListConfigurationPage-DxWpeZrO.js.map +1 -0
  36. package/dist/_chunks/{ListConfigurationPage-nrXcxNYi.mjs → ListConfigurationPage-JPWZz7Kg.mjs} +64 -54
  37. package/dist/_chunks/ListConfigurationPage-JPWZz7Kg.mjs.map +1 -0
  38. package/dist/_chunks/{ListViewPage-DsaOakWQ.js → ListViewPage-CIQekSFz.js} +143 -139
  39. package/dist/_chunks/ListViewPage-CIQekSFz.js.map +1 -0
  40. package/dist/_chunks/{ListViewPage-ChhYmA-L.mjs → ListViewPage-DSK3f0ST.mjs} +140 -136
  41. package/dist/_chunks/ListViewPage-DSK3f0ST.mjs.map +1 -0
  42. package/dist/_chunks/{NoContentTypePage-DPCuS9Y1.js → NoContentTypePage-C5cxKvC2.js} +3 -3
  43. package/dist/_chunks/NoContentTypePage-C5cxKvC2.js.map +1 -0
  44. package/dist/_chunks/{NoContentTypePage-BrdFcN33.mjs → NoContentTypePage-D99LU1YP.mjs} +3 -3
  45. package/dist/_chunks/NoContentTypePage-D99LU1YP.mjs.map +1 -0
  46. package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs → NoPermissionsPage-DBrBw-0y.mjs} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs.map → NoPermissionsPage-DBrBw-0y.mjs.map} +1 -1
  48. package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js → NoPermissionsPage-Oy4tmUrW.js} +2 -2
  49. package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js.map → NoPermissionsPage-Oy4tmUrW.js.map} +1 -1
  50. package/dist/_chunks/{Relations-DjFiYd7-.mjs → Relations-BBmhcWFV.mjs} +132 -89
  51. package/dist/_chunks/Relations-BBmhcWFV.mjs.map +1 -0
  52. package/dist/_chunks/{Relations-CY8Isqdu.js → Relations-eG-9p_qS.js} +135 -93
  53. package/dist/_chunks/Relations-eG-9p_qS.js.map +1 -0
  54. package/dist/_chunks/{en-C-V1_90f.js → en-Bm0D0IWz.js} +23 -15
  55. package/dist/_chunks/{en-C-V1_90f.js.map → en-Bm0D0IWz.js.map} +1 -1
  56. package/dist/_chunks/{en-MBPul9Su.mjs → en-DKV44jRb.mjs} +23 -15
  57. package/dist/_chunks/{en-MBPul9Su.mjs.map → en-DKV44jRb.mjs.map} +1 -1
  58. package/dist/_chunks/{index-DNa1J4HE.js → index-BIWDoFLK.js} +1877 -939
  59. package/dist/_chunks/index-BIWDoFLK.js.map +1 -0
  60. package/dist/_chunks/{index-CAc9yTnx.mjs → index-BrUzbQ30.mjs} +1902 -964
  61. package/dist/_chunks/index-BrUzbQ30.mjs.map +1 -0
  62. package/dist/_chunks/{layout-CXsHbc3E.mjs → layout-_5-cXs34.mjs} +45 -27
  63. package/dist/_chunks/layout-_5-cXs34.mjs.map +1 -0
  64. package/dist/_chunks/{layout-BqtLA6Lb.js → layout-lMc9i1-Z.js} +45 -29
  65. package/dist/_chunks/layout-lMc9i1-Z.js.map +1 -0
  66. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  67. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  68. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  69. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  70. package/dist/_chunks/{relations-BHY_KDJ_.js → relations-BRHithi8.js} +3 -7
  71. package/dist/_chunks/relations-BRHithi8.js.map +1 -0
  72. package/dist/_chunks/{relations-mMFEcZRq.mjs → relations-B_VLk-DD.mjs} +3 -7
  73. package/dist/_chunks/relations-B_VLk-DD.mjs.map +1 -0
  74. package/dist/_chunks/useDebounce-CtcjDB3L.js +28 -0
  75. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  76. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  77. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  78. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +1 -1
  79. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +1 -1
  80. package/dist/admin/index.js +3 -1
  81. package/dist/admin/index.js.map +1 -1
  82. package/dist/admin/index.mjs +9 -7
  83. package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
  84. package/dist/admin/src/content-manager.d.ts +3 -3
  85. package/dist/admin/src/exports.d.ts +2 -1
  86. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  87. package/dist/admin/src/history/index.d.ts +3 -0
  88. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  89. package/dist/admin/src/hooks/useDocument.d.ts +37 -9
  90. package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
  91. package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
  92. package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
  93. package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  94. package/dist/admin/src/index.d.ts +1 -0
  95. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +11 -4
  96. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
  97. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  98. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
  99. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
  100. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +1 -1
  101. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
  102. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
  103. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
  104. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
  105. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  106. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +16 -53
  107. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  108. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
  109. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  110. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  111. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
  112. package/dist/admin/src/preview/constants.d.ts +1 -0
  113. package/dist/admin/src/preview/index.d.ts +4 -0
  114. package/dist/admin/src/services/api.d.ts +2 -3
  115. package/dist/admin/src/services/components.d.ts +2 -2
  116. package/dist/admin/src/services/contentTypes.d.ts +5 -5
  117. package/dist/admin/src/services/documents.d.ts +31 -17
  118. package/dist/admin/src/services/init.d.ts +2 -2
  119. package/dist/admin/src/services/relations.d.ts +3 -3
  120. package/dist/admin/src/services/uid.d.ts +3 -3
  121. package/dist/admin/src/utils/api.d.ts +4 -18
  122. package/dist/admin/src/utils/validation.d.ts +5 -7
  123. package/dist/server/index.js +571 -312
  124. package/dist/server/index.js.map +1 -1
  125. package/dist/server/index.mjs +573 -314
  126. package/dist/server/index.mjs.map +1 -1
  127. package/dist/server/src/bootstrap.d.ts.map +1 -1
  128. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  129. package/dist/server/src/controllers/index.d.ts.map +1 -1
  130. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  131. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  132. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  133. package/dist/server/src/controllers/utils/metadata.d.ts +22 -0
  134. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
  135. package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
  136. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
  137. package/dist/server/src/controllers/validation/index.d.ts +1 -1
  138. package/dist/server/src/history/services/history.d.ts.map +1 -1
  139. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  140. package/dist/server/src/history/services/utils.d.ts +2 -1
  141. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  142. package/dist/server/src/index.d.ts +20 -36
  143. package/dist/server/src/index.d.ts.map +1 -1
  144. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  145. package/dist/server/src/preview/constants.d.ts +2 -0
  146. package/dist/server/src/preview/constants.d.ts.map +1 -0
  147. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  148. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  149. package/dist/server/src/preview/controllers/preview.d.ts +9 -0
  150. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  151. package/dist/server/src/preview/index.d.ts +4 -0
  152. package/dist/server/src/preview/index.d.ts.map +1 -0
  153. package/dist/server/src/preview/routes/index.d.ts +8 -0
  154. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  155. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  156. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  157. package/dist/server/src/preview/services/index.d.ts +4 -0
  158. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  159. package/dist/server/src/preview/services/preview.d.ts +6 -0
  160. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  161. package/dist/server/src/preview/utils.d.ts +7 -0
  162. package/dist/server/src/preview/utils.d.ts.map +1 -0
  163. package/dist/server/src/routes/index.d.ts.map +1 -1
  164. package/dist/server/src/services/document-manager.d.ts +11 -6
  165. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  166. package/dist/server/src/services/document-metadata.d.ts +14 -35
  167. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  168. package/dist/server/src/services/index.d.ts +20 -36
  169. package/dist/server/src/services/index.d.ts.map +1 -1
  170. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  171. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  172. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  173. package/dist/server/src/services/utils/populate.d.ts +8 -1
  174. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  175. package/dist/server/src/utils/index.d.ts +2 -0
  176. package/dist/server/src/utils/index.d.ts.map +1 -1
  177. package/dist/shared/contracts/collection-types.d.ts +17 -7
  178. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  179. package/dist/shared/contracts/relations.d.ts +2 -2
  180. package/dist/shared/contracts/relations.d.ts.map +1 -1
  181. package/package.json +17 -18
  182. package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
  183. package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
  184. package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
  185. package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
  186. package/dist/_chunks/EditViewPage-KRG56aCq.js.map +0 -1
  187. package/dist/_chunks/EditViewPage-aUnqL-63.mjs.map +0 -1
  188. package/dist/_chunks/Field-kVFO4ZKB.mjs.map +0 -1
  189. package/dist/_chunks/Field-kq1c2TF1.js.map +0 -1
  190. package/dist/_chunks/Form-CQ67ZifP.js.map +0 -1
  191. package/dist/_chunks/Form-Jgh5hGTu.mjs.map +0 -1
  192. package/dist/_chunks/History-BLEnudTX.js.map +0 -1
  193. package/dist/_chunks/History-DKhZAPcK.mjs.map +0 -1
  194. package/dist/_chunks/ListConfigurationPage-Zso_LUjn.js.map +0 -1
  195. package/dist/_chunks/ListConfigurationPage-nrXcxNYi.mjs.map +0 -1
  196. package/dist/_chunks/ListViewPage-ChhYmA-L.mjs.map +0 -1
  197. package/dist/_chunks/ListViewPage-DsaOakWQ.js.map +0 -1
  198. package/dist/_chunks/NoContentTypePage-BrdFcN33.mjs.map +0 -1
  199. package/dist/_chunks/NoContentTypePage-DPCuS9Y1.js.map +0 -1
  200. package/dist/_chunks/Relations-CY8Isqdu.js.map +0 -1
  201. package/dist/_chunks/Relations-DjFiYd7-.mjs.map +0 -1
  202. package/dist/_chunks/index-CAc9yTnx.mjs.map +0 -1
  203. package/dist/_chunks/index-DNa1J4HE.js.map +0 -1
  204. package/dist/_chunks/layout-BqtLA6Lb.js.map +0 -1
  205. package/dist/_chunks/layout-CXsHbc3E.mjs.map +0 -1
  206. package/dist/_chunks/relations-BHY_KDJ_.js.map +0 -1
  207. package/dist/_chunks/relations-mMFEcZRq.mjs.map +0 -1
  208. package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
  209. package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
  210. package/dist/_chunks/urls-DzZya_gm.js +0 -6
  211. package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
  212. package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
  213. package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
  214. package/strapi-server.js +0 -3
@@ -7,13 +7,13 @@ const designSystem = require("@strapi/design-system");
7
7
  const qs = require("qs");
8
8
  const reactIntl = require("react-intl");
9
9
  const reactRouterDom = require("react-router-dom");
10
- const index = require("./index-DNa1J4HE.js");
10
+ const index = require("./index-BIWDoFLK.js");
11
11
  const pipe = require("lodash/fp/pipe");
12
12
  const hooks = require("./hooks-BAaaKPS_.js");
13
- const Field = require("./Field-kq1c2TF1.js");
13
+ const Field = require("./Field-DhXEK8y1.js");
14
14
  const Icons = require("@strapi/icons");
15
- const styled = require("styled-components");
16
- const relations = require("./relations-BHY_KDJ_.js");
15
+ const styledComponents = require("styled-components");
16
+ const relations = require("./relations-BRHithi8.js");
17
17
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
18
18
  function _interopNamespace(e) {
19
19
  if (e && e.__esModule)
@@ -35,14 +35,13 @@ function _interopNamespace(e) {
35
35
  }
36
36
  const React__namespace = /* @__PURE__ */ _interopNamespace(React);
37
37
  const pipe__default = /* @__PURE__ */ _interopDefault(pipe);
38
- const styled__default = /* @__PURE__ */ _interopDefault(styled);
39
- const StyledAlert = styled__default.default(designSystem.Alert).attrs({ closeLabel: "Close", onClose: () => {
40
- } })`
38
+ const StyledAlert = styledComponents.styled(designSystem.Alert).attrs({ closeLabel: "Close", onClose: () => {
39
+ }, shadow: "none" })`
41
40
  button {
42
41
  display: none;
43
42
  }
44
43
  `;
45
- const LinkEllipsis = styled__default.default(designSystem.Link)`
44
+ const LinkEllipsis = styledComponents.styled(designSystem.Link)`
46
45
  display: block;
47
46
 
48
47
  & > span {
@@ -55,13 +54,13 @@ const LinkEllipsis = styled__default.default(designSystem.Link)`
55
54
  const CustomRelationInput = (props) => {
56
55
  const { formatMessage } = reactIntl.useIntl();
57
56
  const field = strapiAdmin.useField(props.name);
58
- const formattedFieldValue = Array.isArray(field.value) ? {
59
- results: field.value,
60
- meta: { missingCount: 0 }
61
- } : field.value;
57
+ let formattedFieldValue;
58
+ if (field) {
59
+ formattedFieldValue = Array.isArray(field.value) ? { results: field.value, meta: { missingCount: 0 } } : field.value;
60
+ }
62
61
  if (!formattedFieldValue || formattedFieldValue.results.length === 0 && formattedFieldValue.meta.missingCount === 0) {
63
62
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
64
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: props.label }),
63
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: props.labelAction, children: props.label }),
65
64
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(StyledAlert, { variant: "default", children: formatMessage({
66
65
  id: "content-manager.history.content.no-relations",
67
66
  defaultMessage: "No relations."
@@ -70,10 +69,12 @@ const CustomRelationInput = (props) => {
70
69
  }
71
70
  const { results, meta } = formattedFieldValue;
72
71
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
73
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: props.label }),
72
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: props.label }),
74
73
  results.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", gap: 2, marginTop: 1, alignItems: "stretch", children: results.map((relationData) => {
75
- const href = `../${index.COLLECTION_TYPES}/${props.attribute.targetModel}/${relationData.documentId}`;
74
+ const { targetModel } = props.attribute;
75
+ const href = `../${index.COLLECTION_TYPES}/${targetModel}/${relationData.documentId}`;
76
76
  const label = relations.getRelationLabel(relationData, props.mainField);
77
+ const isAdminUserRelation = targetModel === "admin::user";
77
78
  return /* @__PURE__ */ jsxRuntime.jsxs(
78
79
  designSystem.Flex,
79
80
  {
@@ -86,14 +87,15 @@ const CustomRelationInput = (props) => {
86
87
  background: "neutral150",
87
88
  justifyContent: "space-between",
88
89
  children: [
89
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { minWidth: 0, paddingTop: 1, paddingBottom: 1, paddingRight: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { description: label, children: /* @__PURE__ */ jsxRuntime.jsx(LinkEllipsis, { forwardedAs: reactRouterDom.NavLink, to: href, children: label }) }) }),
90
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { minWidth: 0, paddingTop: 1, paddingBottom: 1, paddingRight: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tooltip, { label, children: isAdminUserRelation ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: label }) : /* @__PURE__ */ jsxRuntime.jsx(LinkEllipsis, { tag: reactRouterDom.NavLink, to: href, children: label }) }) }),
90
91
  /* @__PURE__ */ jsxRuntime.jsx(index.DocumentStatus, { status: relationData.status })
91
92
  ]
92
93
  },
93
- relationData.documentId
94
+ relationData.documentId ?? relationData.id
94
95
  );
95
96
  }) }),
96
- meta.missingCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
97
+ meta.missingCount > 0 && /* @ts-expect-error – we dont need closeLabel */
98
+ /* @__PURE__ */ jsxRuntime.jsx(
97
99
  StyledAlert,
98
100
  {
99
101
  marginTop: 1,
@@ -117,9 +119,9 @@ const CustomRelationInput = (props) => {
117
119
  ] });
118
120
  };
119
121
  const CustomMediaInput = (props) => {
120
- const {
121
- value: { results, meta }
122
- } = strapiAdmin.useField(props.name);
122
+ const { value } = strapiAdmin.useField(props.name);
123
+ const results = value ? value.results : [];
124
+ const meta = value ? value.meta : { missingCount: 0 };
123
125
  const { formatMessage } = reactIntl.useIntl();
124
126
  const fields = strapiAdmin.useStrapiApp("CustomMediaInput", (state) => state.fields);
125
127
  const MediaLibrary = fields.media;
@@ -150,12 +152,39 @@ const CustomMediaInput = (props) => {
150
152
  )
151
153
  ] });
152
154
  };
155
+ const getLabelAction = (labelAction) => {
156
+ if (!React__namespace.isValidElement(labelAction)) {
157
+ return labelAction;
158
+ }
159
+ const labelActionTitleId = labelAction.props.title.id;
160
+ if (labelActionTitleId === "i18n.Field.localized") {
161
+ return React__namespace.cloneElement(labelAction, {
162
+ ...labelAction.props,
163
+ title: {
164
+ id: "history.content.localized",
165
+ defaultMessage: "This value is specific to this locale. If you restore this version, the content will not be replaced for other locales."
166
+ }
167
+ });
168
+ }
169
+ if (labelActionTitleId === "i18n.Field.not-localized") {
170
+ return React__namespace.cloneElement(labelAction, {
171
+ ...labelAction.props,
172
+ title: {
173
+ id: "history.content.not-localized",
174
+ defaultMessage: "This value is common to all locales. If you restore this version and save the changes, the content will be replaced for all locales."
175
+ }
176
+ });
177
+ }
178
+ return labelAction;
179
+ };
153
180
  const VersionInputRenderer = ({
154
181
  visible,
155
182
  hint: providedHint,
156
183
  shouldIgnoreRBAC = false,
184
+ labelAction,
157
185
  ...props
158
186
  }) => {
187
+ const customLabelAction = getLabelAction(labelAction);
159
188
  const { formatMessage } = reactIntl.useIntl();
160
189
  const version = useHistoryContext("VersionContent", (state) => state.selectedVersion);
161
190
  const configuration = useHistoryContext("VersionContent", (state) => state.configuration);
@@ -189,7 +218,7 @@ const VersionInputRenderer = ({
189
218
  const addedAttributes = version.meta.unknownAttributes.added;
190
219
  if (Object.keys(addedAttributes).includes(props.name)) {
191
220
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
192
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: props.label }),
221
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: props.label }),
193
222
  /* @__PURE__ */ jsxRuntime.jsx(
194
223
  StyledAlert,
195
224
  {
@@ -213,29 +242,46 @@ const VersionInputRenderer = ({
213
242
  if (attributeHasCustomFieldProperty(props.attribute)) {
214
243
  const CustomInput = lazyComponentStore[props.attribute.customField];
215
244
  if (CustomInput) {
216
- return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
245
+ return /* @__PURE__ */ jsxRuntime.jsx(
246
+ CustomInput,
247
+ {
248
+ ...props,
249
+ hint,
250
+ labelAction: customLabelAction,
251
+ disabled: fieldIsDisabled
252
+ }
253
+ );
217
254
  }
218
255
  return /* @__PURE__ */ jsxRuntime.jsx(
219
256
  strapiAdmin.InputRenderer,
220
257
  {
221
258
  ...props,
222
259
  hint,
260
+ labelAction: customLabelAction,
223
261
  type: props.attribute.customField,
224
262
  disabled: fieldIsDisabled
225
263
  }
226
264
  );
227
265
  }
228
266
  if (props.type === "media") {
229
- return /* @__PURE__ */ jsxRuntime.jsx(CustomMediaInput, { ...props, disabled: fieldIsDisabled });
267
+ return /* @__PURE__ */ jsxRuntime.jsx(CustomMediaInput, { ...props, labelAction: customLabelAction, disabled: fieldIsDisabled });
230
268
  }
231
269
  const addedInputTypes = Object.keys(fields);
232
270
  if (!attributeHasCustomFieldProperty(props.attribute) && addedInputTypes.includes(props.type)) {
233
271
  const CustomInput = fields[props.type];
234
- return /* @__PURE__ */ jsxRuntime.jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
272
+ return /* @__PURE__ */ jsxRuntime.jsx(
273
+ CustomInput,
274
+ {
275
+ ...props,
276
+ hint,
277
+ labelAction: customLabelAction,
278
+ disabled: fieldIsDisabled
279
+ }
280
+ );
235
281
  }
236
282
  switch (props.type) {
237
283
  case "blocks":
238
- return /* @__PURE__ */ jsxRuntime.jsx(Field.BlocksInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
284
+ return /* @__PURE__ */ jsxRuntime.jsx(Field.MemoizedBlocksInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
239
285
  case "component":
240
286
  const { layout } = componentsLayout[props.attribute.component];
241
287
  const [remainingFieldsLayout] = getRemaingFieldsLayout({
@@ -245,29 +291,65 @@ const VersionInputRenderer = ({
245
291
  schemaAttributes: components[props.attribute.component].attributes
246
292
  });
247
293
  return /* @__PURE__ */ jsxRuntime.jsx(
248
- Field.ComponentInput,
294
+ Field.MemoizedComponentInput,
249
295
  {
250
296
  ...props,
251
297
  layout: [...layout, ...remainingFieldsLayout || []],
252
298
  hint,
299
+ labelAction: customLabelAction,
253
300
  disabled: fieldIsDisabled,
254
301
  children: (inputProps) => /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...inputProps, shouldIgnoreRBAC: true })
255
302
  }
256
303
  );
257
304
  case "dynamiczone":
258
- return /* @__PURE__ */ jsxRuntime.jsx(Field.DynamicZone, { ...props, hint, disabled: fieldIsDisabled });
305
+ return /* @__PURE__ */ jsxRuntime.jsx(
306
+ Field.DynamicZone,
307
+ {
308
+ ...props,
309
+ hint,
310
+ labelAction: customLabelAction,
311
+ disabled: fieldIsDisabled
312
+ }
313
+ );
259
314
  case "relation":
260
- return /* @__PURE__ */ jsxRuntime.jsx(CustomRelationInput, { ...props, hint, disabled: fieldIsDisabled });
315
+ return /* @__PURE__ */ jsxRuntime.jsx(
316
+ CustomRelationInput,
317
+ {
318
+ ...props,
319
+ hint,
320
+ labelAction: customLabelAction,
321
+ disabled: fieldIsDisabled
322
+ }
323
+ );
261
324
  case "richtext":
262
- return /* @__PURE__ */ jsxRuntime.jsx(Field.Wysiwyg, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
325
+ return /* @__PURE__ */ jsxRuntime.jsx(
326
+ Field.MemoizedWysiwyg,
327
+ {
328
+ ...props,
329
+ hint,
330
+ type: props.type,
331
+ labelAction: customLabelAction,
332
+ disabled: fieldIsDisabled
333
+ }
334
+ );
263
335
  case "uid":
264
- return /* @__PURE__ */ jsxRuntime.jsx(Field.UIDInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
336
+ return /* @__PURE__ */ jsxRuntime.jsx(
337
+ Field.MemoizedUIDInput,
338
+ {
339
+ ...props,
340
+ hint,
341
+ type: props.type,
342
+ labelAction: customLabelAction,
343
+ disabled: fieldIsDisabled
344
+ }
345
+ );
265
346
  case "enumeration":
266
347
  return /* @__PURE__ */ jsxRuntime.jsx(
267
348
  strapiAdmin.InputRenderer,
268
349
  {
269
350
  ...props,
270
351
  hint,
352
+ labelAction: customLabelAction,
271
353
  options: props.attribute.enum.map((value) => ({ value })),
272
354
  type: props.customField ? "custom-field" : props.type,
273
355
  disabled: fieldIsDisabled
@@ -280,6 +362,7 @@ const VersionInputRenderer = ({
280
362
  {
281
363
  ...restProps,
282
364
  hint,
365
+ labelAction: customLabelAction,
283
366
  type: props.customField ? "custom-field" : props.type,
284
367
  disabled: fieldIsDisabled
285
368
  }
@@ -333,7 +416,7 @@ const FormPanel = ({ panel }) => {
333
416
  if (panel.some((row) => row.some((field) => field.type === "dynamiczone"))) {
334
417
  const [row] = panel;
335
418
  const [field] = row;
336
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: 12, s: 12, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...field }) }) }, field.name);
419
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 12, s: 12, xs: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...field }) }) }, field.name);
337
420
  }
338
421
  return /* @__PURE__ */ jsxRuntime.jsx(
339
422
  designSystem.Box,
@@ -346,8 +429,19 @@ const FormPanel = ({ panel }) => {
346
429
  paddingTop: 6,
347
430
  paddingBottom: 6,
348
431
  borderColor: "neutral150",
349
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: panel.map((row, gridRowIndex) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: row.map(({ size, ...field }) => {
350
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...field }) }, field.name);
432
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 6, children: panel.map((row, gridRowIndex) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
433
+ return /* @__PURE__ */ jsxRuntime.jsx(
434
+ designSystem.Grid.Item,
435
+ {
436
+ col: size,
437
+ s: 12,
438
+ xs: 12,
439
+ direction: "column",
440
+ alignItems: "stretch",
441
+ children: /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...field })
442
+ },
443
+ field.name
444
+ );
351
445
  }) }, gridRowIndex)) })
352
446
  }
353
447
  );
@@ -479,12 +573,12 @@ const VersionHeader = ({ headerId }) => {
479
573
  const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
480
574
  if (collectionType === index.COLLECTION_TYPES) {
481
575
  return {
482
- pathname: `/content-manager/${collectionType}/${version.contentType}/${version.relatedDocumentId}`,
576
+ pathname: "..",
483
577
  search: pluginsQueryParams
484
578
  };
485
579
  }
486
580
  return {
487
- pathname: `/content-manager/${collectionType}/${version.contentType}`,
581
+ pathname: "..",
488
582
  search: pluginsQueryParams
489
583
  };
490
584
  };
@@ -500,7 +594,7 @@ const VersionHeader = ({ headerId }) => {
500
594
  body: { contentType: version.contentType }
501
595
  });
502
596
  if ("data" in response) {
503
- navigate(getNextNavigation());
597
+ navigate(getNextNavigation(), { relative: "path" });
504
598
  toggleNotification({
505
599
  type: "success",
506
600
  title: formatMessage({
@@ -529,7 +623,7 @@ const VersionHeader = ({ headerId }) => {
529
623
  });
530
624
  }
531
625
  };
532
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
626
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Root, { open: isConfirmDialogOpen, onOpenChange: setIsConfirmDialogOpen, children: [
533
627
  /* @__PURE__ */ jsxRuntime.jsx(
534
628
  strapiAdmin.Layouts.BaseHeader,
535
629
  {
@@ -541,7 +635,7 @@ const VersionHeader = ({ headerId }) => {
541
635
  hour: "numeric",
542
636
  minute: "numeric"
543
637
  }),
544
- subtitle: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", children: formatMessage(
638
+ subtitle: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", textColor: "neutral600", children: formatMessage(
545
639
  {
546
640
  id: "content-manager.history.version.subtitle",
547
641
  defaultMessage: "{hasLocale, select, true {{subtitle}, in {locale}} other {{subtitle}}}"
@@ -556,8 +650,10 @@ const VersionHeader = ({ headerId }) => {
556
650
  designSystem.Link,
557
651
  {
558
652
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ArrowLeft, {}),
559
- as: reactRouterDom.NavLink,
653
+ tag: reactRouterDom.NavLink,
560
654
  to: getNextNavigation(),
655
+ relative: "path",
656
+ isExternal: false,
561
657
  children: formatMessage({
562
658
  id: "global.back",
563
659
  defaultMessage: "Back"
@@ -565,7 +661,7 @@ const VersionHeader = ({ headerId }) => {
565
661
  }
566
662
  ),
567
663
  sticky: false,
568
- primaryAction: /* @__PURE__ */ jsxRuntime.jsx(
664
+ primaryAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
569
665
  designSystem.Button,
570
666
  {
571
667
  disabled: !allowedActions.canUpdate || isCurrentVersion,
@@ -577,16 +673,13 @@ const VersionHeader = ({ headerId }) => {
577
673
  defaultMessage: "Restore"
578
674
  })
579
675
  }
580
- )
676
+ ) })
581
677
  }
582
678
  ),
583
679
  /* @__PURE__ */ jsxRuntime.jsx(
584
680
  strapiAdmin.ConfirmDialog,
585
681
  {
586
- isOpen: isConfirmDialogOpen,
587
- onClose: () => setIsConfirmDialogOpen(false),
588
682
  onConfirm: handleRestore,
589
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}),
590
683
  endAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "secondary", onClick: handleRestore, loading: isLoading, children: formatMessage({
591
684
  id: "content-manager.history.restore.confirm.button",
592
685
  defaultMessage: "Restore"
@@ -600,6 +693,7 @@ const VersionHeader = ({ headerId }) => {
600
693
  gap: 2,
601
694
  textAlign: "center",
602
695
  children: [
696
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
603
697
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
604
698
  id: "content-manager.history.restore.confirm.title",
605
699
  defaultMessage: "Are you sure you want to restore this version?"
@@ -672,23 +766,24 @@ const VersionCard = ({ version, isCurrent }) => {
672
766
  borderWidth: "1px",
673
767
  borderStyle: "solid",
674
768
  borderColor: isActive ? "primary600" : "neutral200",
769
+ color: "neutral800",
675
770
  paddingTop: 4,
676
771
  paddingBottom: 4,
677
772
  paddingLeft: 5,
678
773
  paddingRight: 5,
679
- as: reactRouterDom.Link,
774
+ tag: reactRouterDom.Link,
680
775
  to: `?${qs.stringify({ ...query, id: version.id })}`,
681
776
  style: { textDecoration: "none" },
682
777
  children: [
683
778
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "flex-start", children: [
684
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "h3", fontWeight: "semiBold", children: formatDate(version.createdAt, {
779
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h3", fontWeight: "semiBold", children: formatDate(version.createdAt, {
685
780
  day: "numeric",
686
781
  month: "numeric",
687
782
  year: "numeric",
688
783
  hour: "2-digit",
689
784
  minute: "2-digit"
690
785
  }) }),
691
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "p", variant: "pi", textColor: "neutral600", children: formatMessage(
786
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "p", variant: "pi", textColor: "neutral600", children: formatMessage(
692
787
  {
693
788
  id: "content-manager.history.sidebar.versionDescription",
694
789
  defaultMessage: "{distanceToNow}{isAnonymous, select, true {} other { by {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}"
@@ -744,7 +839,7 @@ const VersionsList = () => {
744
839
  borderColor: "neutral200",
745
840
  borderWidth: "0 0 0 1px",
746
841
  borderStyle: "solid",
747
- as: "aside",
842
+ tag: "aside",
748
843
  children: [
749
844
  /* @__PURE__ */ jsxRuntime.jsxs(
750
845
  designSystem.Flex,
@@ -755,9 +850,9 @@ const VersionsList = () => {
755
850
  borderColor: "neutral200",
756
851
  borderWidth: "0 0 1px",
757
852
  borderStyle: "solid",
758
- as: "header",
853
+ tag: "header",
759
854
  children: [
760
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "h2", variant: "omega", fontWeight: "semiBold", children: formatMessage({
855
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "omega", fontWeight: "semiBold", children: formatMessage({
761
856
  id: "content-manager.history.sidebar.title",
762
857
  defaultMessage: "Versions"
763
858
  }) }),
@@ -779,7 +874,7 @@ const VersionsList = () => {
779
874
  paddingBottom: 5,
780
875
  paddingLeft: 4,
781
876
  paddingRight: 4,
782
- as: "ul",
877
+ tag: "ul",
783
878
  alignItems: "stretch",
784
879
  children: versions.data.map((version, index2) => /* @__PURE__ */ jsxRuntime.jsx(
785
880
  "li",
@@ -846,7 +941,22 @@ const HistoryPage = () => {
846
941
  return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
847
942
  }
848
943
  if (!versionsResponse.isError && !versionsResponse.data?.data?.length) {
849
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.NoData, {});
944
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
945
+ strapiAdmin.Page.NoData,
946
+ {
947
+ action: /* @__PURE__ */ jsxRuntime.jsx(
948
+ designSystem.Link,
949
+ {
950
+ tag: reactRouterDom.NavLink,
951
+ to: `/content-manager/${collectionType}/${slug}${documentId ? `/${documentId}` : ""}`,
952
+ children: formatMessage({
953
+ id: "global.back",
954
+ defaultMessage: "Back"
955
+ })
956
+ }
957
+ )
958
+ }
959
+ ) });
850
960
  }
851
961
  if (versionsResponse.data?.data?.length && !selectedVersionId) {
852
962
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -953,4 +1063,4 @@ const ProtectedHistoryPage = () => {
953
1063
  exports.HistoryProvider = HistoryProvider;
954
1064
  exports.ProtectedHistoryPage = ProtectedHistoryPage;
955
1065
  exports.useHistoryContext = useHistoryContext;
956
- //# sourceMappingURL=History-BLEnudTX.js.map
1066
+ //# sourceMappingURL=History-BLCCNgCt.js.map