@strapi/content-manager 0.0.0-experimental.17b4116f461a49b8ce5386f7c8d79c511d40fb3b → 0.0.0-experimental.19d775295eb622de3e659110caf22fcd2cd5d10d

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 (264) 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-B_99pmC0.mjs} +4 -4
  7. package/dist/_chunks/{ComponentConfigurationPage-DjQBdcKF.mjs.map → ComponentConfigurationPage-B_99pmC0.mjs.map} +1 -1
  8. package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js → ComponentConfigurationPage-NeMPjY5M.js} +5 -6
  9. package/dist/_chunks/{ComponentConfigurationPage-2iOVVhqV.js.map → ComponentConfigurationPage-NeMPjY5M.js.map} +1 -1
  10. package/dist/_chunks/{ComponentIcon-BBQsYCVn.js → ComponentIcon-CRbtQEUV.js} +9 -4
  11. package/dist/_chunks/ComponentIcon-CRbtQEUV.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-B0kNlNoj.mjs} +4 -4
  15. package/dist/_chunks/{EditConfigurationPage-BoBb-DLH.mjs.map → EditConfigurationPage-B0kNlNoj.mjs.map} +1 -1
  16. package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js → EditConfigurationPage-n7_xHayb.js} +5 -6
  17. package/dist/_chunks/{EditConfigurationPage-B7dw5_cS.js.map → EditConfigurationPage-n7_xHayb.js.map} +1 -1
  18. package/dist/_chunks/EditViewPage-BT7Achc-.js +209 -0
  19. package/dist/_chunks/EditViewPage-BT7Achc-.js.map +1 -0
  20. package/dist/_chunks/EditViewPage-DYXZs4_2.mjs +191 -0
  21. package/dist/_chunks/EditViewPage-DYXZs4_2.mjs.map +1 -0
  22. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
  23. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
  24. package/dist/_chunks/{Form-CQ67ZifP.js → Form-BRmk2Dp3.js} +68 -49
  25. package/dist/_chunks/Form-BRmk2Dp3.js.map +1 -0
  26. package/dist/_chunks/{Form-Jgh5hGTu.mjs → Form-D3paRF1F.mjs} +67 -46
  27. package/dist/_chunks/Form-D3paRF1F.mjs.map +1 -0
  28. package/dist/_chunks/{History-BLEnudTX.js → History-BQpDoOu8.js} +211 -148
  29. package/dist/_chunks/History-BQpDoOu8.js.map +1 -0
  30. package/dist/_chunks/{History-DKhZAPcK.mjs → History-CzQbTOwa.mjs} +204 -139
  31. package/dist/_chunks/History-CzQbTOwa.mjs.map +1 -0
  32. package/dist/_chunks/{Field-kVFO4ZKB.mjs → Input-ww3KFYZr.mjs} +1996 -1730
  33. package/dist/_chunks/Input-ww3KFYZr.mjs.map +1 -0
  34. package/dist/_chunks/{Field-kq1c2TF1.js → Input-yM6HnyQa.js} +2035 -1770
  35. package/dist/_chunks/Input-yM6HnyQa.js.map +1 -0
  36. package/dist/_chunks/{ListConfigurationPage-Zso_LUjn.js → ListConfigurationPage-B6NsS-0m.js} +72 -63
  37. package/dist/_chunks/ListConfigurationPage-B6NsS-0m.js.map +1 -0
  38. package/dist/_chunks/{ListConfigurationPage-nrXcxNYi.mjs → ListConfigurationPage-Bbw8w5cS.mjs} +68 -57
  39. package/dist/_chunks/ListConfigurationPage-Bbw8w5cS.mjs.map +1 -0
  40. package/dist/_chunks/{ListViewPage-ChhYmA-L.mjs → ListViewPage-DnOP55pM.mjs} +179 -160
  41. package/dist/_chunks/ListViewPage-DnOP55pM.mjs.map +1 -0
  42. package/dist/_chunks/{ListViewPage-DsaOakWQ.js → ListViewPage-Dt8OUTwO.js} +183 -165
  43. package/dist/_chunks/ListViewPage-Dt8OUTwO.js.map +1 -0
  44. package/dist/_chunks/{NoContentTypePage-BrdFcN33.mjs → NoContentTypePage-CXKXHNMa.mjs} +3 -3
  45. package/dist/_chunks/NoContentTypePage-CXKXHNMa.mjs.map +1 -0
  46. package/dist/_chunks/{NoContentTypePage-DPCuS9Y1.js → NoContentTypePage-Dgm-uj-6.js} +3 -3
  47. package/dist/_chunks/NoContentTypePage-Dgm-uj-6.js.map +1 -0
  48. package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js → NoPermissionsPage-CLbU5SOt.js} +2 -2
  49. package/dist/_chunks/{NoPermissionsPage-DdyOfdKb.js.map → NoPermissionsPage-CLbU5SOt.js.map} +1 -1
  50. package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs → NoPermissionsPage-kaj1rPiW.mjs} +2 -2
  51. package/dist/_chunks/{NoPermissionsPage-B9dqrtTy.mjs.map → NoPermissionsPage-kaj1rPiW.mjs.map} +1 -1
  52. package/dist/_chunks/Preview-Bieh13Ro.mjs +287 -0
  53. package/dist/_chunks/Preview-Bieh13Ro.mjs.map +1 -0
  54. package/dist/_chunks/Preview-CbXHXqBg.js +305 -0
  55. package/dist/_chunks/Preview-CbXHXqBg.js.map +1 -0
  56. package/dist/_chunks/{Relations-DjFiYd7-.mjs → Relations-7rWJcZ3_.mjs} +138 -94
  57. package/dist/_chunks/Relations-7rWJcZ3_.mjs.map +1 -0
  58. package/dist/_chunks/{Relations-CY8Isqdu.js → Relations-CvifV6Y6.js} +142 -100
  59. package/dist/_chunks/Relations-CvifV6Y6.js.map +1 -0
  60. package/dist/_chunks/{en-C-V1_90f.js → en-BR48D_RH.js} +45 -18
  61. package/dist/_chunks/{en-C-V1_90f.js.map → en-BR48D_RH.js.map} +1 -1
  62. package/dist/_chunks/{en-MBPul9Su.mjs → en-D65uIF6Y.mjs} +45 -18
  63. package/dist/_chunks/{en-MBPul9Su.mjs.map → en-D65uIF6Y.mjs.map} +1 -1
  64. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  65. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  66. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  67. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  68. package/dist/_chunks/{fr-B7kGGg3E.js → fr-C43IbhA_.js} +16 -3
  69. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-C43IbhA_.js.map} +1 -1
  70. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr-DBseuRuB.mjs} +16 -3
  71. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr-DBseuRuB.mjs.map} +1 -1
  72. package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
  73. package/dist/_chunks/{index-CAc9yTnx.mjs → index-BH2JnYpF.mjs} +2302 -995
  74. package/dist/_chunks/index-BH2JnYpF.mjs.map +1 -0
  75. package/dist/_chunks/{index-DNa1J4HE.js → index-DkJQjlak.js} +2273 -967
  76. package/dist/_chunks/index-DkJQjlak.js.map +1 -0
  77. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  78. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  79. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  80. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  81. package/dist/_chunks/{layout-BqtLA6Lb.js → layout-4BqLFW_b.js} +47 -32
  82. package/dist/_chunks/layout-4BqLFW_b.js.map +1 -0
  83. package/dist/_chunks/{layout-CXsHbc3E.mjs → layout-bbOlPwLA.mjs} +46 -28
  84. package/dist/_chunks/layout-bbOlPwLA.mjs.map +1 -0
  85. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  86. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  87. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  88. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  89. package/dist/_chunks/{relations-mMFEcZRq.mjs → relations-HsflnFpO.mjs} +6 -7
  90. package/dist/_chunks/relations-HsflnFpO.mjs.map +1 -0
  91. package/dist/_chunks/{relations-BHY_KDJ_.js → relations-Yc0Z6A20.js} +6 -7
  92. package/dist/_chunks/relations-Yc0Z6A20.js.map +1 -0
  93. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
  94. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +1 -0
  95. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
  96. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +1 -0
  97. package/dist/_chunks/usePrev-CZGy2Vjf.mjs +29 -0
  98. package/dist/_chunks/usePrev-CZGy2Vjf.mjs.map +1 -0
  99. package/dist/_chunks/usePrev-D5J_2fEu.js +28 -0
  100. package/dist/_chunks/usePrev-D5J_2fEu.js.map +1 -0
  101. package/dist/admin/index.js +4 -1
  102. package/dist/admin/index.js.map +1 -1
  103. package/dist/admin/index.mjs +10 -7
  104. package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
  105. package/dist/admin/src/content-manager.d.ts +7 -5
  106. package/dist/admin/src/exports.d.ts +3 -1
  107. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  108. package/dist/admin/src/history/index.d.ts +3 -0
  109. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  110. package/dist/admin/src/hooks/useDocument.d.ts +54 -9
  111. package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
  112. package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
  113. package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
  114. package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  115. package/dist/admin/src/index.d.ts +1 -0
  116. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  117. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +12 -5
  118. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
  119. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +7 -0
  120. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
  121. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
  122. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +5 -0
  123. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
  124. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
  125. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
  126. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
  127. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
  128. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
  129. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
  130. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
  131. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  132. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +16 -53
  133. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +27 -0
  134. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  135. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
  136. package/dist/admin/src/pages/EditView/utils/data.d.ts +1 -0
  137. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  138. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  139. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
  140. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  141. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  142. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  143. package/dist/admin/src/preview/index.d.ts +4 -0
  144. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  145. package/dist/admin/src/preview/routes.d.ts +3 -0
  146. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  147. package/dist/admin/src/router.d.ts +1 -1
  148. package/dist/admin/src/services/api.d.ts +2 -3
  149. package/dist/admin/src/services/components.d.ts +2 -2
  150. package/dist/admin/src/services/contentTypes.d.ts +5 -5
  151. package/dist/admin/src/services/documents.d.ts +31 -20
  152. package/dist/admin/src/services/init.d.ts +2 -2
  153. package/dist/admin/src/services/relations.d.ts +3 -3
  154. package/dist/admin/src/services/uid.d.ts +3 -3
  155. package/dist/admin/src/utils/api.d.ts +4 -18
  156. package/dist/admin/src/utils/validation.d.ts +5 -7
  157. package/dist/server/index.js +959 -543
  158. package/dist/server/index.js.map +1 -1
  159. package/dist/server/index.mjs +960 -543
  160. package/dist/server/index.mjs.map +1 -1
  161. package/dist/server/src/bootstrap.d.ts.map +1 -1
  162. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  163. package/dist/server/src/controllers/index.d.ts.map +1 -1
  164. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  165. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  166. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  167. package/dist/server/src/controllers/utils/metadata.d.ts +23 -0
  168. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
  169. package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
  170. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
  171. package/dist/server/src/controllers/validation/index.d.ts +1 -1
  172. package/dist/server/src/history/controllers/history-version.d.ts +1 -1
  173. package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
  174. package/dist/server/src/history/services/history.d.ts +3 -3
  175. package/dist/server/src/history/services/history.d.ts.map +1 -1
  176. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  177. package/dist/server/src/history/services/utils.d.ts +8 -12
  178. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  179. package/dist/server/src/index.d.ts +21 -36
  180. package/dist/server/src/index.d.ts.map +1 -1
  181. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  182. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  183. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  184. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  185. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  186. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  187. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  188. package/dist/server/src/preview/index.d.ts +4 -0
  189. package/dist/server/src/preview/index.d.ts.map +1 -0
  190. package/dist/server/src/preview/routes/index.d.ts +8 -0
  191. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  192. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  193. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  194. package/dist/server/src/preview/services/index.d.ts +16 -0
  195. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  196. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  197. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  198. package/dist/server/src/preview/services/preview.d.ts +12 -0
  199. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  200. package/dist/server/src/preview/utils.d.ts +19 -0
  201. package/dist/server/src/preview/utils.d.ts.map +1 -0
  202. package/dist/server/src/register.d.ts.map +1 -1
  203. package/dist/server/src/routes/index.d.ts.map +1 -1
  204. package/dist/server/src/services/document-manager.d.ts +11 -6
  205. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  206. package/dist/server/src/services/document-metadata.d.ts +16 -35
  207. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  208. package/dist/server/src/services/index.d.ts +21 -36
  209. package/dist/server/src/services/index.d.ts.map +1 -1
  210. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  211. package/dist/server/src/services/utils/populate.d.ts +8 -1
  212. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  213. package/dist/server/src/utils/index.d.ts +2 -0
  214. package/dist/server/src/utils/index.d.ts.map +1 -1
  215. package/dist/shared/contracts/collection-types.d.ts +17 -7
  216. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  217. package/dist/shared/contracts/index.d.ts +1 -0
  218. package/dist/shared/contracts/index.d.ts.map +1 -1
  219. package/dist/shared/contracts/preview.d.ts +27 -0
  220. package/dist/shared/contracts/preview.d.ts.map +1 -0
  221. package/dist/shared/contracts/relations.d.ts +2 -2
  222. package/dist/shared/contracts/relations.d.ts.map +1 -1
  223. package/dist/shared/index.js +4 -0
  224. package/dist/shared/index.js.map +1 -1
  225. package/dist/shared/index.mjs +4 -0
  226. package/dist/shared/index.mjs.map +1 -1
  227. package/package.json +22 -22
  228. package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
  229. package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
  230. package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
  231. package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
  232. package/dist/_chunks/EditViewPage-KRG56aCq.js +0 -224
  233. package/dist/_chunks/EditViewPage-KRG56aCq.js.map +0 -1
  234. package/dist/_chunks/EditViewPage-aUnqL-63.mjs +0 -203
  235. package/dist/_chunks/EditViewPage-aUnqL-63.mjs.map +0 -1
  236. package/dist/_chunks/Field-kVFO4ZKB.mjs.map +0 -1
  237. package/dist/_chunks/Field-kq1c2TF1.js.map +0 -1
  238. package/dist/_chunks/Form-CQ67ZifP.js.map +0 -1
  239. package/dist/_chunks/Form-Jgh5hGTu.mjs.map +0 -1
  240. package/dist/_chunks/History-BLEnudTX.js.map +0 -1
  241. package/dist/_chunks/History-DKhZAPcK.mjs.map +0 -1
  242. package/dist/_chunks/ListConfigurationPage-Zso_LUjn.js.map +0 -1
  243. package/dist/_chunks/ListConfigurationPage-nrXcxNYi.mjs.map +0 -1
  244. package/dist/_chunks/ListViewPage-ChhYmA-L.mjs.map +0 -1
  245. package/dist/_chunks/ListViewPage-DsaOakWQ.js.map +0 -1
  246. package/dist/_chunks/NoContentTypePage-BrdFcN33.mjs.map +0 -1
  247. package/dist/_chunks/NoContentTypePage-DPCuS9Y1.js.map +0 -1
  248. package/dist/_chunks/Relations-CY8Isqdu.js.map +0 -1
  249. package/dist/_chunks/Relations-DjFiYd7-.mjs.map +0 -1
  250. package/dist/_chunks/index-CAc9yTnx.mjs.map +0 -1
  251. package/dist/_chunks/index-DNa1J4HE.js.map +0 -1
  252. package/dist/_chunks/layout-BqtLA6Lb.js.map +0 -1
  253. package/dist/_chunks/layout-CXsHbc3E.mjs.map +0 -1
  254. package/dist/_chunks/relations-BHY_KDJ_.js.map +0 -1
  255. package/dist/_chunks/relations-mMFEcZRq.mjs.map +0 -1
  256. package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
  257. package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
  258. package/dist/_chunks/urls-DzZya_gm.js +0 -6
  259. package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
  260. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +0 -1
  261. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +0 -1
  262. package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
  263. package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
  264. package/strapi-server.js +0 -3
@@ -1,19 +1,19 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { useForm, useStrapiApp, InputRenderer, useField, Form, Layouts, useNotification, useQueryParams, useRBAC, ConfirmDialog, createContext, Page } from "@strapi/admin/strapi-admin";
4
- import { Alert, Link, Flex, FieldLabel, Box, Tooltip, Divider, Typography, Grid, GridItem, Button, Portal, FocusTrap, Main } from "@strapi/design-system";
3
+ import { useForm, useStrapiApp, InputRenderer, useField, Form, Layouts, useTracking, useNotification, useQueryParams, useRBAC, ConfirmDialog, createContext, Page } from "@strapi/admin/strapi-admin";
4
+ import { Alert, Link, Flex, Field, Box, Tooltip, Typography, Divider, Grid, Dialog, Button, Portal, FocusTrap, Main } from "@strapi/design-system";
5
5
  import { stringify } from "qs";
6
6
  import { useIntl } from "react-intl";
7
7
  import { NavLink, useNavigate, useParams, Link as Link$1, Navigate } from "react-router-dom";
8
- import { b as useDoc, e as useDocumentRBAC, m as useDocLayout, C as COLLECTION_TYPES, D as DocumentStatus, d as contentManagerApi, j as PERMISSIONS, t as getDisplayName, R as RelativeTime, k as DocumentRBAC, G as useDocument, f as useDocumentLayout, o as useGetContentTypeConfigurationQuery, c as buildValidParams } from "./index-CAc9yTnx.mjs";
8
+ import { c as useDoc, f as useDocumentRBAC, m as useDocLayout, C as COLLECTION_TYPES, D as DocumentStatus, K as removeFieldsThatDontExistOnSchema, L as prepareTempKeys, e as contentManagerApi, k as PERMISSIONS, v as getDisplayName, R as RelativeTime, l as DocumentRBAC, M as useDocument, h as useDocumentLayout, p as useGetContentTypeConfigurationQuery, d as buildValidParams } from "./index-BH2JnYpF.mjs";
9
9
  import pipe from "lodash/fp/pipe";
10
10
  import { u as useTypedSelector } from "./hooks-E5u1mcgM.mjs";
11
- import { a as useDynamicZone, u as useLazyComponents, b as useFieldHint, N as NotAllowedInput, U as UIDInput, W as Wysiwyg, D as DynamicZone, C as ComponentInput, B as BlocksInput, r as removeFieldsThatDontExistOnSchema, p as prepareTempKeys } from "./Field-kVFO4ZKB.mjs";
12
11
  import { ArrowLeft, WarningCircle } from "@strapi/icons";
13
- import styled from "styled-components";
14
- import { g as getRelationLabel } from "./relations-mMFEcZRq.mjs";
12
+ import { styled } from "styled-components";
13
+ import { a as useDynamicZone, u as useLazyComponents, b as useFieldHint, N as NotAllowedInput, M as MemoizedUIDInput, c as MemoizedWysiwyg, D as DynamicZone, d as MemoizedComponentInput, e as MemoizedBlocksInput } from "./Input-ww3KFYZr.mjs";
14
+ import { g as getRelationLabel } from "./relations-HsflnFpO.mjs";
15
15
  const StyledAlert = styled(Alert).attrs({ closeLabel: "Close", onClose: () => {
16
- } })`
16
+ }, shadow: "none" })`
17
17
  button {
18
18
  display: none;
19
19
  }
@@ -31,13 +31,13 @@ const LinkEllipsis = styled(Link)`
31
31
  const CustomRelationInput = (props) => {
32
32
  const { formatMessage } = useIntl();
33
33
  const field = useField(props.name);
34
- const formattedFieldValue = Array.isArray(field.value) ? {
35
- results: field.value,
36
- meta: { missingCount: 0 }
37
- } : field.value;
34
+ let formattedFieldValue;
35
+ if (field) {
36
+ formattedFieldValue = Array.isArray(field.value) ? { results: field.value, meta: { missingCount: 0 } } : field.value;
37
+ }
38
38
  if (!formattedFieldValue || formattedFieldValue.results.length === 0 && formattedFieldValue.meta.missingCount === 0) {
39
39
  return /* @__PURE__ */ jsxs(Fragment, { children: [
40
- /* @__PURE__ */ jsx(FieldLabel, { children: props.label }),
40
+ /* @__PURE__ */ jsx(Field.Label, { action: props.labelAction, children: props.label }),
41
41
  /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(StyledAlert, { variant: "default", children: formatMessage({
42
42
  id: "content-manager.history.content.no-relations",
43
43
  defaultMessage: "No relations."
@@ -46,10 +46,12 @@ const CustomRelationInput = (props) => {
46
46
  }
47
47
  const { results, meta } = formattedFieldValue;
48
48
  return /* @__PURE__ */ jsxs(Box, { children: [
49
- /* @__PURE__ */ jsx(FieldLabel, { children: props.label }),
49
+ /* @__PURE__ */ jsx(Field.Label, { children: props.label }),
50
50
  results.length > 0 && /* @__PURE__ */ jsx(Flex, { direction: "column", gap: 2, marginTop: 1, alignItems: "stretch", children: results.map((relationData) => {
51
- const href = `../${COLLECTION_TYPES}/${props.attribute.targetModel}/${relationData.documentId}`;
51
+ const { targetModel } = props.attribute;
52
+ const href = `../${COLLECTION_TYPES}/${targetModel}/${relationData.documentId}`;
52
53
  const label = getRelationLabel(relationData, props.mainField);
54
+ const isAdminUserRelation = targetModel === "admin::user";
53
55
  return /* @__PURE__ */ jsxs(
54
56
  Flex,
55
57
  {
@@ -62,14 +64,15 @@ const CustomRelationInput = (props) => {
62
64
  background: "neutral150",
63
65
  justifyContent: "space-between",
64
66
  children: [
65
- /* @__PURE__ */ jsx(Box, { minWidth: 0, paddingTop: 1, paddingBottom: 1, paddingRight: 4, children: /* @__PURE__ */ jsx(Tooltip, { description: label, children: /* @__PURE__ */ jsx(LinkEllipsis, { forwardedAs: NavLink, to: href, children: label }) }) }),
67
+ /* @__PURE__ */ jsx(Box, { minWidth: 0, paddingTop: 1, paddingBottom: 1, paddingRight: 4, children: /* @__PURE__ */ jsx(Tooltip, { label, children: isAdminUserRelation ? /* @__PURE__ */ jsx(Typography, { children: label }) : /* @__PURE__ */ jsx(LinkEllipsis, { tag: NavLink, to: href, children: label }) }) }),
66
68
  /* @__PURE__ */ jsx(DocumentStatus, { status: relationData.status })
67
69
  ]
68
70
  },
69
- relationData.documentId
71
+ relationData.documentId ?? relationData.id
70
72
  );
71
73
  }) }),
72
- meta.missingCount > 0 && /* @__PURE__ */ jsx(
74
+ meta.missingCount > 0 && /* @ts-expect-error – we dont need closeLabel */
75
+ /* @__PURE__ */ jsx(
73
76
  StyledAlert,
74
77
  {
75
78
  marginTop: 1,
@@ -92,15 +95,38 @@ const CustomRelationInput = (props) => {
92
95
  )
93
96
  ] });
94
97
  };
98
+ const createInitialValuesForPath = (keyPath, value) => {
99
+ const keys = keyPath.split(".");
100
+ const root = {};
101
+ let node = root;
102
+ keys.forEach((key, index) => {
103
+ if (key === "__proto__" || key === "constructor") return;
104
+ if (index === keys.length - 1) {
105
+ node[key] = value;
106
+ } else {
107
+ node[key] = node[key] || {};
108
+ }
109
+ node = node[key];
110
+ });
111
+ return root;
112
+ };
95
113
  const CustomMediaInput = (props) => {
96
- const {
97
- value: { results, meta }
98
- } = useField(props.name);
114
+ const { value } = useField(props.name);
115
+ const results = value?.results ?? [];
116
+ const meta = value?.meta ?? { missingCount: 0 };
99
117
  const { formatMessage } = useIntl();
100
118
  const fields = useStrapiApp("CustomMediaInput", (state) => state.fields);
101
119
  const MediaLibrary = fields.media;
102
120
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, alignItems: "stretch", children: [
103
- /* @__PURE__ */ jsx(Form, { method: "PUT", disabled: true, initialValues: { [props.name]: results }, children: /* @__PURE__ */ jsx(MediaLibrary, { ...props, disabled: true, multiple: results.length > 1 }) }),
121
+ /* @__PURE__ */ jsx(
122
+ Form,
123
+ {
124
+ method: "PUT",
125
+ disabled: true,
126
+ initialValues: createInitialValuesForPath(props.name, results),
127
+ children: /* @__PURE__ */ jsx(MediaLibrary, { ...props, disabled: true, multiple: results.length > 1 })
128
+ }
129
+ ),
104
130
  meta.missingCount > 0 && /* @__PURE__ */ jsx(
105
131
  StyledAlert,
106
132
  {
@@ -126,12 +152,39 @@ const CustomMediaInput = (props) => {
126
152
  )
127
153
  ] });
128
154
  };
155
+ const getLabelAction = (labelAction) => {
156
+ if (!React.isValidElement(labelAction)) {
157
+ return labelAction;
158
+ }
159
+ const labelActionTitleId = labelAction.props.title.id;
160
+ if (labelActionTitleId === "i18n.Field.localized") {
161
+ return React.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.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
+ };
129
180
  const VersionInputRenderer = ({
130
181
  visible,
131
182
  hint: providedHint,
132
183
  shouldIgnoreRBAC = false,
184
+ labelAction,
133
185
  ...props
134
186
  }) => {
187
+ const customLabelAction = getLabelAction(labelAction);
135
188
  const { formatMessage } = useIntl();
136
189
  const version = useHistoryContext("VersionContent", (state) => state.selectedVersion);
137
190
  const configuration = useHistoryContext("VersionContent", (state) => state.configuration);
@@ -165,7 +218,7 @@ const VersionInputRenderer = ({
165
218
  const addedAttributes = version.meta.unknownAttributes.added;
166
219
  if (Object.keys(addedAttributes).includes(props.name)) {
167
220
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", gap: 1, children: [
168
- /* @__PURE__ */ jsx(FieldLabel, { children: props.label }),
221
+ /* @__PURE__ */ jsx(Field.Label, { children: props.label }),
169
222
  /* @__PURE__ */ jsx(
170
223
  StyledAlert,
171
224
  {
@@ -189,29 +242,46 @@ const VersionInputRenderer = ({
189
242
  if (attributeHasCustomFieldProperty(props.attribute)) {
190
243
  const CustomInput = lazyComponentStore[props.attribute.customField];
191
244
  if (CustomInput) {
192
- return /* @__PURE__ */ jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
245
+ return /* @__PURE__ */ jsx(
246
+ CustomInput,
247
+ {
248
+ ...props,
249
+ hint,
250
+ labelAction: customLabelAction,
251
+ disabled: fieldIsDisabled
252
+ }
253
+ );
193
254
  }
194
255
  return /* @__PURE__ */ jsx(
195
256
  InputRenderer,
196
257
  {
197
258
  ...props,
198
259
  hint,
260
+ labelAction: customLabelAction,
199
261
  type: props.attribute.customField,
200
262
  disabled: fieldIsDisabled
201
263
  }
202
264
  );
203
265
  }
204
266
  if (props.type === "media") {
205
- return /* @__PURE__ */ jsx(CustomMediaInput, { ...props, disabled: fieldIsDisabled });
267
+ return /* @__PURE__ */ jsx(CustomMediaInput, { ...props, labelAction: customLabelAction, disabled: fieldIsDisabled });
206
268
  }
207
269
  const addedInputTypes = Object.keys(fields);
208
270
  if (!attributeHasCustomFieldProperty(props.attribute) && addedInputTypes.includes(props.type)) {
209
271
  const CustomInput = fields[props.type];
210
- return /* @__PURE__ */ jsx(CustomInput, { ...props, hint, disabled: fieldIsDisabled });
272
+ return /* @__PURE__ */ jsx(
273
+ CustomInput,
274
+ {
275
+ ...props,
276
+ hint,
277
+ labelAction: customLabelAction,
278
+ disabled: fieldIsDisabled
279
+ }
280
+ );
211
281
  }
212
282
  switch (props.type) {
213
283
  case "blocks":
214
- return /* @__PURE__ */ jsx(BlocksInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
284
+ return /* @__PURE__ */ jsx(MemoizedBlocksInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
215
285
  case "component":
216
286
  const { layout } = componentsLayout[props.attribute.component];
217
287
  const [remainingFieldsLayout] = getRemaingFieldsLayout({
@@ -221,29 +291,66 @@ const VersionInputRenderer = ({
221
291
  schemaAttributes: components[props.attribute.component].attributes
222
292
  });
223
293
  return /* @__PURE__ */ jsx(
224
- ComponentInput,
294
+ MemoizedComponentInput,
225
295
  {
226
296
  ...props,
227
297
  layout: [...layout, ...remainingFieldsLayout || []],
228
298
  hint,
299
+ labelAction: customLabelAction,
229
300
  disabled: fieldIsDisabled,
230
301
  children: (inputProps) => /* @__PURE__ */ jsx(VersionInputRenderer, { ...inputProps, shouldIgnoreRBAC: true })
231
302
  }
232
303
  );
233
304
  case "dynamiczone":
234
- return /* @__PURE__ */ jsx(DynamicZone, { ...props, hint, disabled: fieldIsDisabled });
305
+ return /* @__PURE__ */ jsx(
306
+ DynamicZone,
307
+ {
308
+ ...props,
309
+ hint,
310
+ labelAction: customLabelAction,
311
+ disabled: fieldIsDisabled,
312
+ children: (inputProps) => /* @__PURE__ */ jsx(VersionInputRenderer, { ...inputProps, shouldIgnoreRBAC: true })
313
+ }
314
+ );
235
315
  case "relation":
236
- return /* @__PURE__ */ jsx(CustomRelationInput, { ...props, hint, disabled: fieldIsDisabled });
316
+ return /* @__PURE__ */ jsx(
317
+ CustomRelationInput,
318
+ {
319
+ ...props,
320
+ hint,
321
+ labelAction: customLabelAction,
322
+ disabled: fieldIsDisabled
323
+ }
324
+ );
237
325
  case "richtext":
238
- return /* @__PURE__ */ jsx(Wysiwyg, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
326
+ return /* @__PURE__ */ jsx(
327
+ MemoizedWysiwyg,
328
+ {
329
+ ...props,
330
+ hint,
331
+ type: props.type,
332
+ labelAction: customLabelAction,
333
+ disabled: fieldIsDisabled
334
+ }
335
+ );
239
336
  case "uid":
240
- return /* @__PURE__ */ jsx(UIDInput, { ...props, hint, type: props.type, disabled: fieldIsDisabled });
337
+ return /* @__PURE__ */ jsx(
338
+ MemoizedUIDInput,
339
+ {
340
+ ...props,
341
+ hint,
342
+ type: props.type,
343
+ labelAction: customLabelAction,
344
+ disabled: fieldIsDisabled
345
+ }
346
+ );
241
347
  case "enumeration":
242
348
  return /* @__PURE__ */ jsx(
243
349
  InputRenderer,
244
350
  {
245
351
  ...props,
246
352
  hint,
353
+ labelAction: customLabelAction,
247
354
  options: props.attribute.enum.map((value) => ({ value })),
248
355
  type: props.customField ? "custom-field" : props.type,
249
356
  disabled: fieldIsDisabled
@@ -256,6 +363,7 @@ const VersionInputRenderer = ({
256
363
  {
257
364
  ...restProps,
258
365
  hint,
366
+ labelAction: customLabelAction,
259
367
  type: props.customField ? "custom-field" : props.type,
260
368
  disabled: fieldIsDisabled
261
369
  }
@@ -309,7 +417,7 @@ const FormPanel = ({ panel }) => {
309
417
  if (panel.some((row) => row.some((field) => field.type === "dynamiczone"))) {
310
418
  const [row] = panel;
311
419
  const [field] = row;
312
- return /* @__PURE__ */ jsx(Grid, { gap: 4, children: /* @__PURE__ */ jsx(GridItem, { col: 12, s: 12, xs: 12, children: /* @__PURE__ */ jsx(VersionInputRenderer, { ...field }) }) }, field.name);
420
+ return /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: /* @__PURE__ */ jsx(Grid.Item, { col: 12, s: 12, xs: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsx(VersionInputRenderer, { ...field }) }) }, field.name);
313
421
  }
314
422
  return /* @__PURE__ */ jsx(
315
423
  Box,
@@ -322,8 +430,19 @@ const FormPanel = ({ panel }) => {
322
430
  paddingTop: 6,
323
431
  paddingBottom: 6,
324
432
  borderColor: "neutral150",
325
- children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: panel.map((row, gridRowIndex) => /* @__PURE__ */ jsx(Grid, { gap: 4, children: row.map(({ size, ...field }) => {
326
- return /* @__PURE__ */ jsx(GridItem, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsx(VersionInputRenderer, { ...field }) }, field.name);
433
+ children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: panel.map((row, gridRowIndex) => /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: row.map(({ size, ...field }) => {
434
+ return /* @__PURE__ */ jsx(
435
+ Grid.Item,
436
+ {
437
+ col: size,
438
+ s: 12,
439
+ xs: 12,
440
+ direction: "column",
441
+ alignItems: "stretch",
442
+ children: /* @__PURE__ */ jsx(VersionInputRenderer, { ...field })
443
+ },
444
+ field.name
445
+ );
327
446
  }) }, gridRowIndex)) })
328
447
  }
329
448
  );
@@ -438,6 +557,7 @@ const VersionHeader = ({ headerId }) => {
438
557
  const [isConfirmDialogOpen, setIsConfirmDialogOpen] = React.useState(false);
439
558
  const navigate = useNavigate();
440
559
  const { formatMessage, formatDate } = useIntl();
560
+ const { trackUsage } = useTracking();
441
561
  const { toggleNotification } = useNotification();
442
562
  const [{ query }] = useQueryParams();
443
563
  const { collectionType, slug } = useParams();
@@ -453,14 +573,8 @@ const VersionHeader = ({ headerId }) => {
453
573
  const mainFieldValue = version.data[mainField];
454
574
  const getNextNavigation = () => {
455
575
  const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });
456
- if (collectionType === COLLECTION_TYPES) {
457
- return {
458
- pathname: `/content-manager/${collectionType}/${version.contentType}/${version.relatedDocumentId}`,
459
- search: pluginsQueryParams
460
- };
461
- }
462
576
  return {
463
- pathname: `/content-manager/${collectionType}/${version.contentType}`,
577
+ pathname: "..",
464
578
  search: pluginsQueryParams
465
579
  };
466
580
  };
@@ -476,7 +590,7 @@ const VersionHeader = ({ headerId }) => {
476
590
  body: { contentType: version.contentType }
477
591
  });
478
592
  if ("data" in response) {
479
- navigate(getNextNavigation());
593
+ navigate(getNextNavigation(), { relative: "path" });
480
594
  toggleNotification({
481
595
  type: "success",
482
596
  title: formatMessage({
@@ -485,9 +599,10 @@ const VersionHeader = ({ headerId }) => {
485
599
  }),
486
600
  message: formatMessage({
487
601
  id: "content-manager.restore.success.message",
488
- defaultMessage: "The content of the restored version is not published yet."
602
+ defaultMessage: "A past version of the content was restored."
489
603
  })
490
604
  });
605
+ trackUsage("didRestoreHistoryVersion");
491
606
  }
492
607
  if ("error" in response) {
493
608
  toggleNotification({
@@ -505,7 +620,7 @@ const VersionHeader = ({ headerId }) => {
505
620
  });
506
621
  }
507
622
  };
508
- return /* @__PURE__ */ jsxs(Fragment, { children: [
623
+ return /* @__PURE__ */ jsxs(Dialog.Root, { open: isConfirmDialogOpen, onOpenChange: setIsConfirmDialogOpen, children: [
509
624
  /* @__PURE__ */ jsx(
510
625
  Layouts.BaseHeader,
511
626
  {
@@ -517,7 +632,7 @@ const VersionHeader = ({ headerId }) => {
517
632
  hour: "numeric",
518
633
  minute: "numeric"
519
634
  }),
520
- subtitle: /* @__PURE__ */ jsx(Typography, { variant: "epsilon", children: formatMessage(
635
+ subtitle: /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", children: formatMessage(
521
636
  {
522
637
  id: "content-manager.history.version.subtitle",
523
638
  defaultMessage: "{hasLocale, select, true {{subtitle}, in {locale}} other {{subtitle}}}"
@@ -532,8 +647,10 @@ const VersionHeader = ({ headerId }) => {
532
647
  Link,
533
648
  {
534
649
  startIcon: /* @__PURE__ */ jsx(ArrowLeft, {}),
535
- as: NavLink,
650
+ tag: NavLink,
536
651
  to: getNextNavigation(),
652
+ relative: "path",
653
+ isExternal: false,
537
654
  children: formatMessage({
538
655
  id: "global.back",
539
656
  defaultMessage: "Back"
@@ -541,7 +658,7 @@ const VersionHeader = ({ headerId }) => {
541
658
  }
542
659
  ),
543
660
  sticky: false,
544
- primaryAction: /* @__PURE__ */ jsx(
661
+ primaryAction: /* @__PURE__ */ jsx(Dialog.Trigger, { children: /* @__PURE__ */ jsx(
545
662
  Button,
546
663
  {
547
664
  disabled: !allowedActions.canUpdate || isCurrentVersion,
@@ -553,16 +670,13 @@ const VersionHeader = ({ headerId }) => {
553
670
  defaultMessage: "Restore"
554
671
  })
555
672
  }
556
- )
673
+ ) })
557
674
  }
558
675
  ),
559
676
  /* @__PURE__ */ jsx(
560
677
  ConfirmDialog,
561
678
  {
562
- isOpen: isConfirmDialogOpen,
563
- onClose: () => setIsConfirmDialogOpen(false),
564
679
  onConfirm: handleRestore,
565
- icon: /* @__PURE__ */ jsx(WarningCircle, {}),
566
680
  endAction: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleRestore, loading: isLoading, children: formatMessage({
567
681
  id: "content-manager.history.restore.confirm.button",
568
682
  defaultMessage: "Restore"
@@ -576,6 +690,7 @@ const VersionHeader = ({ headerId }) => {
576
690
  gap: 2,
577
691
  textAlign: "center",
578
692
  children: [
693
+ /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(WarningCircle, { width: "24px", height: "24px", fill: "danger600" }) }),
579
694
  /* @__PURE__ */ jsx(Typography, { children: formatMessage({
580
695
  id: "content-manager.history.restore.confirm.title",
581
696
  defaultMessage: "Are you sure you want to restore this version?"
@@ -596,46 +711,10 @@ const VersionHeader = ({ headerId }) => {
596
711
  )
597
712
  ] });
598
713
  };
599
- const BlueText = (children) => /* @__PURE__ */ jsx(Typography, { textColor: "primary600", children });
714
+ const BlueText = (children) => /* @__PURE__ */ jsx(Typography, { textColor: "primary600", variant: "pi", children });
600
715
  const VersionCard = ({ version, isCurrent }) => {
601
716
  const { formatDate, formatMessage } = useIntl();
602
717
  const [{ query }] = useQueryParams();
603
- const statusData = (() => {
604
- switch (version.status) {
605
- case "draft":
606
- return {
607
- background: "secondary100",
608
- border: "secondary200",
609
- text: "secondary700",
610
- message: {
611
- id: "content-manager.containers.List.draft",
612
- defaultMessage: "Draft"
613
- }
614
- };
615
- case "modified":
616
- return {
617
- background: "alternative100",
618
- border: "alternative200",
619
- text: "alternative700",
620
- message: {
621
- // TODO: check the translation key once D&P v5 is done
622
- id: "content-manager.containers.List.modified",
623
- defaultMessage: "Modified"
624
- }
625
- };
626
- case "published":
627
- default:
628
- return {
629
- background: "success100",
630
- border: "success200",
631
- text: "success700",
632
- message: {
633
- id: "content-manager.containers.List.published",
634
- defaultMessage: "Published"
635
- }
636
- };
637
- }
638
- })();
639
718
  const isActive = query.id === version.id.toString();
640
719
  const author = version.createdBy && getDisplayName(version.createdBy);
641
720
  return /* @__PURE__ */ jsxs(
@@ -648,23 +727,21 @@ const VersionCard = ({ version, isCurrent }) => {
648
727
  borderWidth: "1px",
649
728
  borderStyle: "solid",
650
729
  borderColor: isActive ? "primary600" : "neutral200",
651
- paddingTop: 4,
652
- paddingBottom: 4,
653
- paddingLeft: 5,
654
- paddingRight: 5,
655
- as: Link$1,
730
+ color: "neutral800",
731
+ padding: 5,
732
+ tag: Link$1,
656
733
  to: `?${stringify({ ...query, id: version.id })}`,
657
734
  style: { textDecoration: "none" },
658
735
  children: [
659
736
  /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 1, alignItems: "flex-start", children: [
660
- /* @__PURE__ */ jsx(Typography, { as: "h3", fontWeight: "semiBold", children: formatDate(version.createdAt, {
737
+ /* @__PURE__ */ jsx(Typography, { tag: "h3", fontWeight: "semiBold", children: formatDate(version.createdAt, {
661
738
  day: "numeric",
662
739
  month: "numeric",
663
740
  year: "numeric",
664
741
  hour: "2-digit",
665
742
  minute: "2-digit"
666
743
  }) }),
667
- /* @__PURE__ */ jsx(Typography, { as: "p", variant: "pi", textColor: "neutral600", children: formatMessage(
744
+ /* @__PURE__ */ jsx(Typography, { tag: "p", variant: "pi", textColor: "neutral600", children: formatMessage(
668
745
  {
669
746
  id: "content-manager.history.sidebar.versionDescription",
670
747
  defaultMessage: "{distanceToNow}{isAnonymous, select, true {} other { by {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}"
@@ -678,21 +755,7 @@ const VersionCard = ({ version, isCurrent }) => {
678
755
  }
679
756
  ) })
680
757
  ] }),
681
- version.status && /* @__PURE__ */ jsx(
682
- Box,
683
- {
684
- background: statusData.background,
685
- borderStyle: "solid",
686
- borderWidth: "1px",
687
- borderColor: statusData.border,
688
- hasRadius: true,
689
- paddingLeft: "6px",
690
- paddingRight: "6px",
691
- paddingTop: "2px",
692
- paddingBottom: "2px",
693
- children: /* @__PURE__ */ jsx(Typography, { variant: "pi", fontWeight: "bold", textColor: statusData.text, children: formatMessage(statusData.message) })
694
- }
695
- )
758
+ version.status && /* @__PURE__ */ jsx(DocumentStatus, { status: version.status, size: "XS" })
696
759
  ]
697
760
  }
698
761
  );
@@ -720,7 +783,7 @@ const VersionsList = () => {
720
783
  borderColor: "neutral200",
721
784
  borderWidth: "0 0 0 1px",
722
785
  borderStyle: "solid",
723
- as: "aside",
786
+ tag: "aside",
724
787
  children: [
725
788
  /* @__PURE__ */ jsxs(
726
789
  Flex,
@@ -731,9 +794,9 @@ const VersionsList = () => {
731
794
  borderColor: "neutral200",
732
795
  borderWidth: "0 0 1px",
733
796
  borderStyle: "solid",
734
- as: "header",
797
+ tag: "header",
735
798
  children: [
736
- /* @__PURE__ */ jsx(Typography, { as: "h2", variant: "omega", fontWeight: "semiBold", children: formatMessage({
799
+ /* @__PURE__ */ jsx(Typography, { tag: "h2", variant: "omega", fontWeight: "semiBold", children: formatMessage({
737
800
  id: "content-manager.history.sidebar.title",
738
801
  defaultMessage: "Versions"
739
802
  }) }),
@@ -746,31 +809,18 @@ const VersionsList = () => {
746
809
  id: "content-manager.history.sidebar.show-newer",
747
810
  defaultMessage: "Show newer versions"
748
811
  }) }) }),
749
- /* @__PURE__ */ jsx(
750
- Flex,
812
+ /* @__PURE__ */ jsx(Flex, { direction: "column", gap: 3, padding: 4, tag: "ul", alignItems: "stretch", children: versions.data.map((version, index) => /* @__PURE__ */ jsx(
813
+ "li",
751
814
  {
752
- direction: "column",
753
- gap: 3,
754
- paddingTop: 5,
755
- paddingBottom: 5,
756
- paddingLeft: 4,
757
- paddingRight: 4,
758
- as: "ul",
759
- alignItems: "stretch",
760
- children: versions.data.map((version, index) => /* @__PURE__ */ jsx(
761
- "li",
762
- {
763
- "aria-label": formatMessage({
764
- id: "content-manager.history.sidebar.title.version-card.aria-label",
765
- defaultMessage: "Version card"
766
- }),
767
- children: /* @__PURE__ */ jsx(VersionCard, { version, isCurrent: page === 1 && index === 0 })
768
- },
769
- version.id
770
- ))
771
- }
772
- ),
773
- versions.meta.pagination.page < versions.meta.pagination.pageCount && /* @__PURE__ */ jsx(Box, { paddingBottom: 5, textAlign: "center", children: /* @__PURE__ */ jsx(PaginationButton, { page: page + 1, children: formatMessage({
815
+ "aria-label": formatMessage({
816
+ id: "content-manager.history.sidebar.title.version-card.aria-label",
817
+ defaultMessage: "Version card"
818
+ }),
819
+ children: /* @__PURE__ */ jsx(VersionCard, { version, isCurrent: page === 1 && index === 0 })
820
+ },
821
+ version.id
822
+ )) }),
823
+ versions.meta.pagination.page < versions.meta.pagination.pageCount && /* @__PURE__ */ jsx(Box, { paddingBottom: 4, textAlign: "center", children: /* @__PURE__ */ jsx(PaginationButton, { page: page + 1, children: formatMessage({
774
824
  id: "content-manager.history.sidebar.show-older",
775
825
  defaultMessage: "Show older versions"
776
826
  }) }) })
@@ -822,7 +872,22 @@ const HistoryPage = () => {
822
872
  return /* @__PURE__ */ jsx(Page.Loading, {});
823
873
  }
824
874
  if (!versionsResponse.isError && !versionsResponse.data?.data?.length) {
825
- return /* @__PURE__ */ jsx(Page.NoData, {});
875
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
876
+ Page.NoData,
877
+ {
878
+ action: /* @__PURE__ */ jsx(
879
+ Link,
880
+ {
881
+ tag: NavLink,
882
+ to: `/content-manager/${collectionType}/${slug}${documentId ? `/${documentId}` : ""}`,
883
+ children: formatMessage({
884
+ id: "global.back",
885
+ defaultMessage: "Back"
886
+ })
887
+ }
888
+ )
889
+ }
890
+ ) });
826
891
  }
827
892
  if (versionsResponse.data?.data?.length && !selectedVersionId) {
828
893
  return /* @__PURE__ */ jsx(
@@ -931,4 +996,4 @@ export {
931
996
  ProtectedHistoryPage,
932
997
  useHistoryContext
933
998
  };
934
- //# sourceMappingURL=History-DKhZAPcK.mjs.map
999
+ //# sourceMappingURL=History-CzQbTOwa.mjs.map