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

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 (253) 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-BPvzFjM7.mjs → ComponentConfigurationPage-BaJMOQyq.mjs} +4 -4
  7. package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs.map → ComponentConfigurationPage-BaJMOQyq.mjs.map} +1 -1
  8. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js → ComponentConfigurationPage-N-CTtgQa.js} +4 -4
  9. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js.map → ComponentConfigurationPage-N-CTtgQa.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-Dmv83RlS.js → EditConfigurationPage-BHkjAbxH.js} +4 -4
  15. package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js.map → EditConfigurationPage-BHkjAbxH.js.map} +1 -1
  16. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs → EditConfigurationPage-CKK-5LfX.mjs} +4 -4
  17. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs.map → EditConfigurationPage-CKK-5LfX.mjs.map} +1 -1
  18. package/dist/_chunks/EditViewPage-B11aeMcf.mjs +254 -0
  19. package/dist/_chunks/EditViewPage-B11aeMcf.mjs.map +1 -0
  20. package/dist/_chunks/{EditViewPage-DvNpQkam.js → EditViewPage-QPUftxUd.js} +101 -52
  21. package/dist/_chunks/EditViewPage-QPUftxUd.js.map +1 -0
  22. package/dist/_chunks/{Field-6gvGdPBV.mjs → Field-Bj_RgtGo.mjs} +1077 -814
  23. package/dist/_chunks/Field-Bj_RgtGo.mjs.map +1 -0
  24. package/dist/_chunks/{Field-DmVKIAOo.js → Field-DUK83cfh.js} +1121 -859
  25. package/dist/_chunks/Field-DUK83cfh.js.map +1 -0
  26. package/dist/_chunks/{Form-CPZC9vWa.js → Form-DHmBRlHd.js} +66 -46
  27. package/dist/_chunks/Form-DHmBRlHd.js.map +1 -0
  28. package/dist/_chunks/{Form-DW6K1IH-.mjs → Form-DLMSoXV7.mjs} +66 -45
  29. package/dist/_chunks/Form-DLMSoXV7.mjs.map +1 -0
  30. package/dist/_chunks/{History-Dmr9fmUA.mjs → History-CfCSNlG9.mjs} +181 -144
  31. package/dist/_chunks/History-CfCSNlG9.mjs.map +1 -0
  32. package/dist/_chunks/{History-DeAPlvtv.js → History-Di3zm4HT.js} +181 -145
  33. package/dist/_chunks/History-Di3zm4HT.js.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-DhwvYcNv.mjs → ListConfigurationPage-0mtv_iqk.mjs} +67 -56
  35. package/dist/_chunks/ListConfigurationPage-0mtv_iqk.mjs.map +1 -0
  36. package/dist/_chunks/{ListConfigurationPage-DPCwW5Vr.js → ListConfigurationPage-Cq361KIt.js} +70 -60
  37. package/dist/_chunks/ListConfigurationPage-Cq361KIt.js.map +1 -0
  38. package/dist/_chunks/{ListViewPage-BtAwuYLE.mjs → ListViewPage-BxLVROX8.mjs} +175 -159
  39. package/dist/_chunks/ListViewPage-BxLVROX8.mjs.map +1 -0
  40. package/dist/_chunks/{ListViewPage-5ySZ-VUs.js → ListViewPage-DFDcG8gM.js} +178 -162
  41. package/dist/_chunks/ListViewPage-DFDcG8gM.js.map +1 -0
  42. package/dist/_chunks/{NoContentTypePage-DSPxnxxp.mjs → NoContentTypePage-BRfDd67_.mjs} +3 -3
  43. package/dist/_chunks/NoContentTypePage-BRfDd67_.mjs.map +1 -0
  44. package/dist/_chunks/{NoContentTypePage-DOC_yWOf.js → NoContentTypePage-BSyvnDZZ.js} +3 -3
  45. package/dist/_chunks/NoContentTypePage-BSyvnDZZ.js.map +1 -0
  46. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs → NoPermissionsPage-CV9V8KWa.mjs} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs.map → NoPermissionsPage-CV9V8KWa.mjs.map} +1 -1
  48. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js → NoPermissionsPage-DyLphsn_.js} +2 -2
  49. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js.map → NoPermissionsPage-DyLphsn_.js.map} +1 -1
  50. package/dist/_chunks/Preview-C_B1nx3g.mjs +272 -0
  51. package/dist/_chunks/Preview-C_B1nx3g.mjs.map +1 -0
  52. package/dist/_chunks/Preview-D_3aO6Ly.js +291 -0
  53. package/dist/_chunks/Preview-D_3aO6Ly.js.map +1 -0
  54. package/dist/_chunks/{Relations-J8cscLlR.mjs → Relations-C6pwmDXh.mjs} +135 -89
  55. package/dist/_chunks/Relations-C6pwmDXh.mjs.map +1 -0
  56. package/dist/_chunks/{Relations-CgWtgnPe.js → Relations-Cne2AlrL.js} +138 -93
  57. package/dist/_chunks/Relations-Cne2AlrL.js.map +1 -0
  58. package/dist/_chunks/{en-MBPul9Su.mjs → en-DhFUjrNW.mjs} +37 -18
  59. package/dist/_chunks/{en-MBPul9Su.mjs.map → en-DhFUjrNW.mjs.map} +1 -1
  60. package/dist/_chunks/{en-C-V1_90f.js → en-Ic0kXjxB.js} +37 -18
  61. package/dist/_chunks/{en-C-V1_90f.js.map → en-Ic0kXjxB.js.map} +1 -1
  62. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  63. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  64. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  65. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  66. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
  67. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
  68. package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
  69. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
  70. package/dist/_chunks/{index-CwRRo1V9.mjs → index-BpxR3En4.mjs} +1835 -824
  71. package/dist/_chunks/index-BpxR3En4.mjs.map +1 -0
  72. package/dist/_chunks/{index-C6AH2hEl.js → index-T-aWjbj2.js} +1788 -777
  73. package/dist/_chunks/index-T-aWjbj2.js.map +1 -0
  74. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  75. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  76. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  77. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  78. package/dist/_chunks/{layout-B_SXLhqf.js → layout-BEuNwv-F.js} +45 -29
  79. package/dist/_chunks/layout-BEuNwv-F.js.map +1 -0
  80. package/dist/_chunks/{layout-jIDzX0Fp.mjs → layout-DhMZ_lDx.mjs} +45 -27
  81. package/dist/_chunks/layout-DhMZ_lDx.mjs.map +1 -0
  82. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  83. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  84. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  85. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  86. package/dist/_chunks/{relations-CuvIgCqI.mjs → relations-BdnxoX6f.mjs} +6 -7
  87. package/dist/_chunks/relations-BdnxoX6f.mjs.map +1 -0
  88. package/dist/_chunks/{relations-iBMa_OFG.js → relations-kLcuobLk.js} +6 -7
  89. package/dist/_chunks/relations-kLcuobLk.js.map +1 -0
  90. package/dist/_chunks/useDebounce-CtcjDB3L.js +28 -0
  91. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  92. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  93. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  94. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +1 -1
  95. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +1 -1
  96. package/dist/admin/index.js +3 -1
  97. package/dist/admin/index.js.map +1 -1
  98. package/dist/admin/index.mjs +9 -7
  99. package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
  100. package/dist/admin/src/content-manager.d.ts +3 -3
  101. package/dist/admin/src/exports.d.ts +2 -1
  102. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  103. package/dist/admin/src/history/index.d.ts +3 -0
  104. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  105. package/dist/admin/src/hooks/useDocument.d.ts +37 -9
  106. package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
  107. package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
  108. package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
  109. package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  110. package/dist/admin/src/index.d.ts +1 -0
  111. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  112. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +11 -4
  113. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  114. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
  115. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  116. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
  117. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
  118. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +1 -1
  119. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
  120. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
  121. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
  122. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
  123. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  124. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +16 -53
  125. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  126. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
  127. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  128. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  129. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
  130. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  131. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  132. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  133. package/dist/admin/src/preview/constants.d.ts +1 -0
  134. package/dist/admin/src/preview/index.d.ts +4 -0
  135. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  136. package/dist/admin/src/preview/routes.d.ts +3 -0
  137. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  138. package/dist/admin/src/router.d.ts +1 -1
  139. package/dist/admin/src/services/api.d.ts +2 -3
  140. package/dist/admin/src/services/components.d.ts +2 -2
  141. package/dist/admin/src/services/contentTypes.d.ts +5 -5
  142. package/dist/admin/src/services/documents.d.ts +31 -20
  143. package/dist/admin/src/services/init.d.ts +2 -2
  144. package/dist/admin/src/services/relations.d.ts +3 -3
  145. package/dist/admin/src/services/uid.d.ts +3 -3
  146. package/dist/admin/src/utils/api.d.ts +4 -18
  147. package/dist/admin/src/utils/validation.d.ts +5 -7
  148. package/dist/server/index.js +852 -436
  149. package/dist/server/index.js.map +1 -1
  150. package/dist/server/index.mjs +859 -443
  151. package/dist/server/index.mjs.map +1 -1
  152. package/dist/server/src/bootstrap.d.ts.map +1 -1
  153. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  154. package/dist/server/src/controllers/index.d.ts.map +1 -1
  155. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  156. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  157. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  158. package/dist/server/src/controllers/utils/metadata.d.ts +22 -0
  159. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
  160. package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
  161. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
  162. package/dist/server/src/controllers/validation/index.d.ts +1 -1
  163. package/dist/server/src/history/services/history.d.ts.map +1 -1
  164. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  165. package/dist/server/src/history/services/utils.d.ts +4 -4
  166. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  167. package/dist/server/src/index.d.ts +21 -42
  168. package/dist/server/src/index.d.ts.map +1 -1
  169. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  170. package/dist/server/src/preview/constants.d.ts +2 -0
  171. package/dist/server/src/preview/constants.d.ts.map +1 -0
  172. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  173. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  174. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  175. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  176. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  177. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  178. package/dist/server/src/preview/index.d.ts +4 -0
  179. package/dist/server/src/preview/index.d.ts.map +1 -0
  180. package/dist/server/src/preview/routes/index.d.ts +8 -0
  181. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  182. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  183. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  184. package/dist/server/src/preview/services/index.d.ts +16 -0
  185. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  186. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  187. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  188. package/dist/server/src/preview/services/preview.d.ts +12 -0
  189. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  190. package/dist/server/src/preview/utils.d.ts +19 -0
  191. package/dist/server/src/preview/utils.d.ts.map +1 -0
  192. package/dist/server/src/register.d.ts.map +1 -1
  193. package/dist/server/src/routes/index.d.ts.map +1 -1
  194. package/dist/server/src/services/document-manager.d.ts +13 -12
  195. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  196. package/dist/server/src/services/document-metadata.d.ts +14 -35
  197. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  198. package/dist/server/src/services/index.d.ts +21 -42
  199. package/dist/server/src/services/index.d.ts.map +1 -1
  200. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  201. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  202. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  203. package/dist/server/src/services/utils/populate.d.ts +8 -1
  204. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  205. package/dist/server/src/utils/index.d.ts +2 -0
  206. package/dist/server/src/utils/index.d.ts.map +1 -1
  207. package/dist/shared/contracts/collection-types.d.ts +17 -7
  208. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  209. package/dist/shared/contracts/index.d.ts +1 -0
  210. package/dist/shared/contracts/index.d.ts.map +1 -1
  211. package/dist/shared/contracts/preview.d.ts +27 -0
  212. package/dist/shared/contracts/preview.d.ts.map +1 -0
  213. package/dist/shared/contracts/relations.d.ts +2 -2
  214. package/dist/shared/contracts/relations.d.ts.map +1 -1
  215. package/dist/shared/index.js +4 -0
  216. package/dist/shared/index.js.map +1 -1
  217. package/dist/shared/index.mjs +4 -0
  218. package/dist/shared/index.mjs.map +1 -1
  219. package/package.json +19 -20
  220. package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
  221. package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
  222. package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
  223. package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
  224. package/dist/_chunks/EditViewPage-DDS6H9HO.mjs +0 -203
  225. package/dist/_chunks/EditViewPage-DDS6H9HO.mjs.map +0 -1
  226. package/dist/_chunks/EditViewPage-DvNpQkam.js.map +0 -1
  227. package/dist/_chunks/Field-6gvGdPBV.mjs.map +0 -1
  228. package/dist/_chunks/Field-DmVKIAOo.js.map +0 -1
  229. package/dist/_chunks/Form-CPZC9vWa.js.map +0 -1
  230. package/dist/_chunks/Form-DW6K1IH-.mjs.map +0 -1
  231. package/dist/_chunks/History-DeAPlvtv.js.map +0 -1
  232. package/dist/_chunks/History-Dmr9fmUA.mjs.map +0 -1
  233. package/dist/_chunks/ListConfigurationPage-DPCwW5Vr.js.map +0 -1
  234. package/dist/_chunks/ListConfigurationPage-DhwvYcNv.mjs.map +0 -1
  235. package/dist/_chunks/ListViewPage-5ySZ-VUs.js.map +0 -1
  236. package/dist/_chunks/ListViewPage-BtAwuYLE.mjs.map +0 -1
  237. package/dist/_chunks/NoContentTypePage-DOC_yWOf.js.map +0 -1
  238. package/dist/_chunks/NoContentTypePage-DSPxnxxp.mjs.map +0 -1
  239. package/dist/_chunks/Relations-CgWtgnPe.js.map +0 -1
  240. package/dist/_chunks/Relations-J8cscLlR.mjs.map +0 -1
  241. package/dist/_chunks/index-C6AH2hEl.js.map +0 -1
  242. package/dist/_chunks/index-CwRRo1V9.mjs.map +0 -1
  243. package/dist/_chunks/layout-B_SXLhqf.js.map +0 -1
  244. package/dist/_chunks/layout-jIDzX0Fp.mjs.map +0 -1
  245. package/dist/_chunks/relations-CuvIgCqI.mjs.map +0 -1
  246. package/dist/_chunks/relations-iBMa_OFG.js.map +0 -1
  247. package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
  248. package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
  249. package/dist/_chunks/urls-DzZya_gm.js +0 -6
  250. package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
  251. package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
  252. package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
  253. 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-C6AH2hEl.js");
10
+ const index = require("./index-T-aWjbj2.js");
11
11
  const pipe = require("lodash/fp/pipe");
12
12
  const hooks = require("./hooks-BAaaKPS_.js");
13
- const Field = require("./Field-DmVKIAOo.js");
13
+ const Field = require("./Field-DUK83cfh.js");
14
14
  const Icons = require("@strapi/icons");
15
- const styled = require("styled-components");
16
- const relations = require("./relations-iBMa_OFG.js");
15
+ const styledComponents = require("styled-components");
16
+ const relations = require("./relations-kLcuobLk.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;
62
- if (!formattedFieldValue || formattedFieldValue.results.length === 0) {
57
+ let formattedFieldValue;
58
+ if (field) {
59
+ formattedFieldValue = Array.isArray(field.value) ? { results: field.value, meta: { missingCount: 0 } } : field.value;
60
+ }
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,
@@ -113,17 +115,13 @@ const CustomRelationInput = (props) => {
113
115
  { number: meta.missingCount }
114
116
  )
115
117
  }
116
- ),
117
- results.length === 0 && meta.missingCount === 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(StyledAlert, { variant: "default", children: formatMessage({
118
- id: "content-manager.history.content.no-relations",
119
- defaultMessage: "No relations."
120
- }) }) })
118
+ )
121
119
  ] });
122
120
  };
123
121
  const CustomMediaInput = (props) => {
124
- const {
125
- value: { results, meta }
126
- } = 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 };
127
125
  const { formatMessage } = reactIntl.useIntl();
128
126
  const fields = strapiAdmin.useStrapiApp("CustomMediaInput", (state) => state.fields);
129
127
  const MediaLibrary = fields.media;
@@ -154,12 +152,39 @@ const CustomMediaInput = (props) => {
154
152
  )
155
153
  ] });
156
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
+ };
157
180
  const VersionInputRenderer = ({
158
181
  visible,
159
182
  hint: providedHint,
160
183
  shouldIgnoreRBAC = false,
184
+ labelAction,
161
185
  ...props
162
186
  }) => {
187
+ const customLabelAction = getLabelAction(labelAction);
163
188
  const { formatMessage } = reactIntl.useIntl();
164
189
  const version = useHistoryContext("VersionContent", (state) => state.selectedVersion);
165
190
  const configuration = useHistoryContext("VersionContent", (state) => state.configuration);
@@ -193,7 +218,7 @@ const VersionInputRenderer = ({
193
218
  const addedAttributes = version.meta.unknownAttributes.added;
194
219
  if (Object.keys(addedAttributes).includes(props.name)) {
195
220
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
196
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { children: props.label }),
221
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: props.label }),
197
222
  /* @__PURE__ */ jsxRuntime.jsx(
198
223
  StyledAlert,
199
224
  {
@@ -217,29 +242,46 @@ const VersionInputRenderer = ({
217
242
  if (attributeHasCustomFieldProperty(props.attribute)) {
218
243
  const CustomInput = lazyComponentStore[props.attribute.customField];
219
244
  if (CustomInput) {
220
- 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
+ );
221
254
  }
222
255
  return /* @__PURE__ */ jsxRuntime.jsx(
223
256
  strapiAdmin.InputRenderer,
224
257
  {
225
258
  ...props,
226
259
  hint,
260
+ labelAction: customLabelAction,
227
261
  type: props.attribute.customField,
228
262
  disabled: fieldIsDisabled
229
263
  }
230
264
  );
231
265
  }
232
266
  if (props.type === "media") {
233
- return /* @__PURE__ */ jsxRuntime.jsx(CustomMediaInput, { ...props, disabled: fieldIsDisabled });
267
+ return /* @__PURE__ */ jsxRuntime.jsx(CustomMediaInput, { ...props, labelAction: customLabelAction, disabled: fieldIsDisabled });
234
268
  }
235
269
  const addedInputTypes = Object.keys(fields);
236
270
  if (!attributeHasCustomFieldProperty(props.attribute) && addedInputTypes.includes(props.type)) {
237
271
  const CustomInput = fields[props.type];
238
- 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
+ );
239
281
  }
240
282
  switch (props.type) {
241
283
  case "blocks":
242
- 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 });
243
285
  case "component":
244
286
  const { layout } = componentsLayout[props.attribute.component];
245
287
  const [remainingFieldsLayout] = getRemaingFieldsLayout({
@@ -249,29 +291,65 @@ const VersionInputRenderer = ({
249
291
  schemaAttributes: components[props.attribute.component].attributes
250
292
  });
251
293
  return /* @__PURE__ */ jsxRuntime.jsx(
252
- Field.ComponentInput,
294
+ Field.MemoizedComponentInput,
253
295
  {
254
296
  ...props,
255
297
  layout: [...layout, ...remainingFieldsLayout || []],
256
298
  hint,
299
+ labelAction: customLabelAction,
257
300
  disabled: fieldIsDisabled,
258
301
  children: (inputProps) => /* @__PURE__ */ jsxRuntime.jsx(VersionInputRenderer, { ...inputProps, shouldIgnoreRBAC: true })
259
302
  }
260
303
  );
261
304
  case "dynamiczone":
262
- 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
+ );
263
314
  case "relation":
264
- 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
+ );
265
324
  case "richtext":
266
- 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
+ );
267
335
  case "uid":
268
- 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
+ );
269
346
  case "enumeration":
270
347
  return /* @__PURE__ */ jsxRuntime.jsx(
271
348
  strapiAdmin.InputRenderer,
272
349
  {
273
350
  ...props,
274
351
  hint,
352
+ labelAction: customLabelAction,
275
353
  options: props.attribute.enum.map((value) => ({ value })),
276
354
  type: props.customField ? "custom-field" : props.type,
277
355
  disabled: fieldIsDisabled
@@ -284,6 +362,7 @@ const VersionInputRenderer = ({
284
362
  {
285
363
  ...restProps,
286
364
  hint,
365
+ labelAction: customLabelAction,
287
366
  type: props.customField ? "custom-field" : props.type,
288
367
  disabled: fieldIsDisabled
289
368
  }
@@ -337,7 +416,7 @@ const FormPanel = ({ panel }) => {
337
416
  if (panel.some((row) => row.some((field) => field.type === "dynamiczone"))) {
338
417
  const [row] = panel;
339
418
  const [field] = row;
340
- 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);
341
420
  }
342
421
  return /* @__PURE__ */ jsxRuntime.jsx(
343
422
  designSystem.Box,
@@ -350,8 +429,19 @@ const FormPanel = ({ panel }) => {
350
429
  paddingTop: 6,
351
430
  paddingBottom: 6,
352
431
  borderColor: "neutral150",
353
- 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 }) => {
354
- 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
+ );
355
445
  }) }, gridRowIndex)) })
356
446
  }
357
447
  );
@@ -466,6 +556,7 @@ const VersionHeader = ({ headerId }) => {
466
556
  const [isConfirmDialogOpen, setIsConfirmDialogOpen] = React__namespace.useState(false);
467
557
  const navigate = reactRouterDom.useNavigate();
468
558
  const { formatMessage, formatDate } = reactIntl.useIntl();
559
+ const { trackUsage } = strapiAdmin.useTracking();
469
560
  const { toggleNotification } = strapiAdmin.useNotification();
470
561
  const [{ query }] = strapiAdmin.useQueryParams();
471
562
  const { collectionType, slug } = reactRouterDom.useParams();
@@ -481,14 +572,8 @@ const VersionHeader = ({ headerId }) => {
481
572
  const mainFieldValue = version.data[mainField];
482
573
  const getNextNavigation = () => {
483
574
  const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
484
- if (collectionType === index.COLLECTION_TYPES) {
485
- return {
486
- pathname: `/content-manager/${collectionType}/${version.contentType}/${version.relatedDocumentId}`,
487
- search: pluginsQueryParams
488
- };
489
- }
490
575
  return {
491
- pathname: `/content-manager/${collectionType}/${version.contentType}`,
576
+ pathname: "..",
492
577
  search: pluginsQueryParams
493
578
  };
494
579
  };
@@ -504,7 +589,7 @@ const VersionHeader = ({ headerId }) => {
504
589
  body: { contentType: version.contentType }
505
590
  });
506
591
  if ("data" in response) {
507
- navigate(getNextNavigation());
592
+ navigate(getNextNavigation(), { relative: "path" });
508
593
  toggleNotification({
509
594
  type: "success",
510
595
  title: formatMessage({
@@ -513,9 +598,10 @@ const VersionHeader = ({ headerId }) => {
513
598
  }),
514
599
  message: formatMessage({
515
600
  id: "content-manager.restore.success.message",
516
- defaultMessage: "The content of the restored version is not published yet."
601
+ defaultMessage: "A past version of the content was restored."
517
602
  })
518
603
  });
604
+ trackUsage("didRestoreHistoryVersion");
519
605
  }
520
606
  if ("error" in response) {
521
607
  toggleNotification({
@@ -533,7 +619,7 @@ const VersionHeader = ({ headerId }) => {
533
619
  });
534
620
  }
535
621
  };
536
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
622
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Dialog.Root, { open: isConfirmDialogOpen, onOpenChange: setIsConfirmDialogOpen, children: [
537
623
  /* @__PURE__ */ jsxRuntime.jsx(
538
624
  strapiAdmin.Layouts.BaseHeader,
539
625
  {
@@ -545,7 +631,7 @@ const VersionHeader = ({ headerId }) => {
545
631
  hour: "numeric",
546
632
  minute: "numeric"
547
633
  }),
548
- subtitle: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", children: formatMessage(
634
+ subtitle: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "epsilon", textColor: "neutral600", children: formatMessage(
549
635
  {
550
636
  id: "content-manager.history.version.subtitle",
551
637
  defaultMessage: "{hasLocale, select, true {{subtitle}, in {locale}} other {{subtitle}}}"
@@ -560,8 +646,10 @@ const VersionHeader = ({ headerId }) => {
560
646
  designSystem.Link,
561
647
  {
562
648
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.ArrowLeft, {}),
563
- as: reactRouterDom.NavLink,
649
+ tag: reactRouterDom.NavLink,
564
650
  to: getNextNavigation(),
651
+ relative: "path",
652
+ isExternal: false,
565
653
  children: formatMessage({
566
654
  id: "global.back",
567
655
  defaultMessage: "Back"
@@ -569,7 +657,7 @@ const VersionHeader = ({ headerId }) => {
569
657
  }
570
658
  ),
571
659
  sticky: false,
572
- primaryAction: /* @__PURE__ */ jsxRuntime.jsx(
660
+ primaryAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
573
661
  designSystem.Button,
574
662
  {
575
663
  disabled: !allowedActions.canUpdate || isCurrentVersion,
@@ -581,16 +669,13 @@ const VersionHeader = ({ headerId }) => {
581
669
  defaultMessage: "Restore"
582
670
  })
583
671
  }
584
- )
672
+ ) })
585
673
  }
586
674
  ),
587
675
  /* @__PURE__ */ jsxRuntime.jsx(
588
676
  strapiAdmin.ConfirmDialog,
589
677
  {
590
- isOpen: isConfirmDialogOpen,
591
- onClose: () => setIsConfirmDialogOpen(false),
592
678
  onConfirm: handleRestore,
593
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, {}),
594
679
  endAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "secondary", onClick: handleRestore, loading: isLoading, children: formatMessage({
595
680
  id: "content-manager.history.restore.confirm.button",
596
681
  defaultMessage: "Restore"
@@ -604,6 +689,7 @@ const VersionHeader = ({ headerId }) => {
604
689
  gap: 2,
605
690
  textAlign: "center",
606
691
  children: [
692
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
607
693
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: formatMessage({
608
694
  id: "content-manager.history.restore.confirm.title",
609
695
  defaultMessage: "Are you sure you want to restore this version?"
@@ -624,46 +710,10 @@ const VersionHeader = ({ headerId }) => {
624
710
  )
625
711
  ] });
626
712
  };
627
- const BlueText = (children) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", children });
713
+ const BlueText = (children) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "primary600", variant: "pi", children });
628
714
  const VersionCard = ({ version, isCurrent }) => {
629
715
  const { formatDate, formatMessage } = reactIntl.useIntl();
630
716
  const [{ query }] = strapiAdmin.useQueryParams();
631
- const statusData = (() => {
632
- switch (version.status) {
633
- case "draft":
634
- return {
635
- background: "secondary100",
636
- border: "secondary200",
637
- text: "secondary700",
638
- message: {
639
- id: "content-manager.containers.List.draft",
640
- defaultMessage: "Draft"
641
- }
642
- };
643
- case "modified":
644
- return {
645
- background: "alternative100",
646
- border: "alternative200",
647
- text: "alternative700",
648
- message: {
649
- // TODO: check the translation key once D&P v5 is done
650
- id: "content-manager.containers.List.modified",
651
- defaultMessage: "Modified"
652
- }
653
- };
654
- case "published":
655
- default:
656
- return {
657
- background: "success100",
658
- border: "success200",
659
- text: "success700",
660
- message: {
661
- id: "content-manager.containers.List.published",
662
- defaultMessage: "Published"
663
- }
664
- };
665
- }
666
- })();
667
717
  const isActive = query.id === version.id.toString();
668
718
  const author = version.createdBy && index.getDisplayName(version.createdBy);
669
719
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -676,23 +726,21 @@ const VersionCard = ({ version, isCurrent }) => {
676
726
  borderWidth: "1px",
677
727
  borderStyle: "solid",
678
728
  borderColor: isActive ? "primary600" : "neutral200",
679
- paddingTop: 4,
680
- paddingBottom: 4,
681
- paddingLeft: 5,
682
- paddingRight: 5,
683
- as: reactRouterDom.Link,
729
+ color: "neutral800",
730
+ padding: 5,
731
+ tag: reactRouterDom.Link,
684
732
  to: `?${qs.stringify({ ...query, id: version.id })}`,
685
733
  style: { textDecoration: "none" },
686
734
  children: [
687
735
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 1, alignItems: "flex-start", children: [
688
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "h3", fontWeight: "semiBold", children: formatDate(version.createdAt, {
736
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h3", fontWeight: "semiBold", children: formatDate(version.createdAt, {
689
737
  day: "numeric",
690
738
  month: "numeric",
691
739
  year: "numeric",
692
740
  hour: "2-digit",
693
741
  minute: "2-digit"
694
742
  }) }),
695
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "p", variant: "pi", textColor: "neutral600", children: formatMessage(
743
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "p", variant: "pi", textColor: "neutral600", children: formatMessage(
696
744
  {
697
745
  id: "content-manager.history.sidebar.versionDescription",
698
746
  defaultMessage: "{distanceToNow}{isAnonymous, select, true {} other { by {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}"
@@ -706,21 +754,7 @@ const VersionCard = ({ version, isCurrent }) => {
706
754
  }
707
755
  ) })
708
756
  ] }),
709
- version.status && /* @__PURE__ */ jsxRuntime.jsx(
710
- designSystem.Box,
711
- {
712
- background: statusData.background,
713
- borderStyle: "solid",
714
- borderWidth: "1px",
715
- borderColor: statusData.border,
716
- hasRadius: true,
717
- paddingLeft: "6px",
718
- paddingRight: "6px",
719
- paddingTop: "2px",
720
- paddingBottom: "2px",
721
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", textColor: statusData.text, children: formatMessage(statusData.message) })
722
- }
723
- )
757
+ version.status && /* @__PURE__ */ jsxRuntime.jsx(index.DocumentStatus, { status: version.status, size: "XS" })
724
758
  ]
725
759
  }
726
760
  );
@@ -748,7 +782,7 @@ const VersionsList = () => {
748
782
  borderColor: "neutral200",
749
783
  borderWidth: "0 0 0 1px",
750
784
  borderStyle: "solid",
751
- as: "aside",
785
+ tag: "aside",
752
786
  children: [
753
787
  /* @__PURE__ */ jsxRuntime.jsxs(
754
788
  designSystem.Flex,
@@ -759,9 +793,9 @@ const VersionsList = () => {
759
793
  borderColor: "neutral200",
760
794
  borderWidth: "0 0 1px",
761
795
  borderStyle: "solid",
762
- as: "header",
796
+ tag: "header",
763
797
  children: [
764
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "h2", variant: "omega", fontWeight: "semiBold", children: formatMessage({
798
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "omega", fontWeight: "semiBold", children: formatMessage({
765
799
  id: "content-manager.history.sidebar.title",
766
800
  defaultMessage: "Versions"
767
801
  }) }),
@@ -774,31 +808,18 @@ const VersionsList = () => {
774
808
  id: "content-manager.history.sidebar.show-newer",
775
809
  defaultMessage: "Show newer versions"
776
810
  }) }) }),
777
- /* @__PURE__ */ jsxRuntime.jsx(
778
- designSystem.Flex,
811
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", gap: 3, padding: 4, tag: "ul", alignItems: "stretch", children: versions.data.map((version, index2) => /* @__PURE__ */ jsxRuntime.jsx(
812
+ "li",
779
813
  {
780
- direction: "column",
781
- gap: 3,
782
- paddingTop: 5,
783
- paddingBottom: 5,
784
- paddingLeft: 4,
785
- paddingRight: 4,
786
- as: "ul",
787
- alignItems: "stretch",
788
- children: versions.data.map((version, index2) => /* @__PURE__ */ jsxRuntime.jsx(
789
- "li",
790
- {
791
- "aria-label": formatMessage({
792
- id: "content-manager.history.sidebar.title.version-card.aria-label",
793
- defaultMessage: "Version card"
794
- }),
795
- children: /* @__PURE__ */ jsxRuntime.jsx(VersionCard, { version, isCurrent: page === 1 && index2 === 0 })
796
- },
797
- version.id
798
- ))
799
- }
800
- ),
801
- versions.meta.pagination.page < versions.meta.pagination.pageCount && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 5, textAlign: "center", children: /* @__PURE__ */ jsxRuntime.jsx(PaginationButton, { page: page + 1, children: formatMessage({
814
+ "aria-label": formatMessage({
815
+ id: "content-manager.history.sidebar.title.version-card.aria-label",
816
+ defaultMessage: "Version card"
817
+ }),
818
+ children: /* @__PURE__ */ jsxRuntime.jsx(VersionCard, { version, isCurrent: page === 1 && index2 === 0 })
819
+ },
820
+ version.id
821
+ )) }),
822
+ versions.meta.pagination.page < versions.meta.pagination.pageCount && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, textAlign: "center", children: /* @__PURE__ */ jsxRuntime.jsx(PaginationButton, { page: page + 1, children: formatMessage({
802
823
  id: "content-manager.history.sidebar.show-older",
803
824
  defaultMessage: "Show older versions"
804
825
  }) }) })
@@ -850,7 +871,22 @@ const HistoryPage = () => {
850
871
  return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
851
872
  }
852
873
  if (!versionsResponse.isError && !versionsResponse.data?.data?.length) {
853
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.NoData, {});
874
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
875
+ strapiAdmin.Page.NoData,
876
+ {
877
+ action: /* @__PURE__ */ jsxRuntime.jsx(
878
+ designSystem.Link,
879
+ {
880
+ tag: reactRouterDom.NavLink,
881
+ to: `/content-manager/${collectionType}/${slug}${documentId ? `/${documentId}` : ""}`,
882
+ children: formatMessage({
883
+ id: "global.back",
884
+ defaultMessage: "Back"
885
+ })
886
+ }
887
+ )
888
+ }
889
+ ) });
854
890
  }
855
891
  if (versionsResponse.data?.data?.length && !selectedVersionId) {
856
892
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -957,4 +993,4 @@ const ProtectedHistoryPage = () => {
957
993
  exports.HistoryProvider = HistoryProvider;
958
994
  exports.ProtectedHistoryPage = ProtectedHistoryPage;
959
995
  exports.useHistoryContext = useHistoryContext;
960
- //# sourceMappingURL=History-DeAPlvtv.js.map
996
+ //# sourceMappingURL=History-Di3zm4HT.js.map