@strapi/content-manager 0.0.0-experimental.d042f6a350fa3a48d61e7c56875e2a0a7ba3c8f5 → 0.0.0-experimental.d2a56e52af31fcf0f0c582a5a2e58e310966e96b

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 (431) hide show
  1. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs +80 -0
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  3. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +82 -0
  4. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +1 -0
  5. package/dist/admin/chunks/ComponentConfigurationPage-CGn9IYeg.js +298 -0
  6. package/dist/admin/chunks/ComponentConfigurationPage-CGn9IYeg.js.map +1 -0
  7. package/dist/admin/chunks/ComponentConfigurationPage-DgYK4xW6.mjs +276 -0
  8. package/dist/admin/chunks/ComponentConfigurationPage-DgYK4xW6.mjs.map +1 -0
  9. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs +153 -0
  10. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  11. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +176 -0
  12. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +1 -0
  13. package/dist/admin/chunks/EditConfigurationPage-7w_-4jF4.js +180 -0
  14. package/dist/admin/chunks/EditConfigurationPage-7w_-4jF4.js.map +1 -0
  15. package/dist/admin/chunks/EditConfigurationPage-C05SwwH-.mjs +158 -0
  16. package/dist/admin/chunks/EditConfigurationPage-C05SwwH-.mjs.map +1 -0
  17. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs +318 -0
  18. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs.map +1 -0
  19. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js +341 -0
  20. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js.map +1 -0
  21. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs +56 -0
  22. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  23. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +58 -0
  24. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +1 -0
  25. package/dist/admin/chunks/Form-BqNYRsCb.js +978 -0
  26. package/dist/admin/chunks/Form-BqNYRsCb.js.map +1 -0
  27. package/dist/admin/chunks/Form-DaEnqAeV.mjs +955 -0
  28. package/dist/admin/chunks/Form-DaEnqAeV.mjs.map +1 -0
  29. package/dist/admin/chunks/History-B7dGNfmx.mjs +1361 -0
  30. package/dist/admin/chunks/History-B7dGNfmx.mjs.map +1 -0
  31. package/dist/admin/chunks/History-CEoOna4w.js +1384 -0
  32. package/dist/admin/chunks/History-CEoOna4w.js.map +1 -0
  33. package/dist/admin/chunks/Input-B3QUS9rv.mjs +8473 -0
  34. package/dist/admin/chunks/Input-B3QUS9rv.mjs.map +1 -0
  35. package/dist/admin/chunks/Input-B8I0b9aD.js +8507 -0
  36. package/dist/admin/chunks/Input-B8I0b9aD.js.map +1 -0
  37. package/dist/admin/chunks/ListConfigurationPage-BbjJweN-.js +818 -0
  38. package/dist/admin/chunks/ListConfigurationPage-BbjJweN-.js.map +1 -0
  39. package/dist/admin/chunks/ListConfigurationPage-VtFQ5mOK.mjs +795 -0
  40. package/dist/admin/chunks/ListConfigurationPage-VtFQ5mOK.mjs.map +1 -0
  41. package/dist/admin/chunks/ListViewPage-Cg3zbT7Y.mjs +1132 -0
  42. package/dist/admin/chunks/ListViewPage-Cg3zbT7Y.mjs.map +1 -0
  43. package/dist/admin/chunks/ListViewPage-CzUm2VJN.js +1154 -0
  44. package/dist/admin/chunks/ListViewPage-CzUm2VJN.js.map +1 -0
  45. package/dist/admin/chunks/NoContentTypePage-FcLLn2Wt.js +60 -0
  46. package/dist/admin/chunks/NoContentTypePage-FcLLn2Wt.js.map +1 -0
  47. package/dist/admin/chunks/NoContentTypePage-NOf7Aq_E.mjs +58 -0
  48. package/dist/admin/chunks/NoContentTypePage-NOf7Aq_E.mjs.map +1 -0
  49. package/dist/admin/chunks/NoPermissionsPage-DmeyXtCk.js +39 -0
  50. package/dist/admin/chunks/NoPermissionsPage-DmeyXtCk.js.map +1 -0
  51. package/dist/admin/chunks/NoPermissionsPage-OVr9KG6L.mjs +37 -0
  52. package/dist/admin/chunks/NoPermissionsPage-OVr9KG6L.mjs.map +1 -0
  53. package/dist/admin/chunks/Preview-BH9l1QXk.mjs +593 -0
  54. package/dist/admin/chunks/Preview-BH9l1QXk.mjs.map +1 -0
  55. package/dist/admin/chunks/Preview-BYKkpc11.js +615 -0
  56. package/dist/admin/chunks/Preview-BYKkpc11.js.map +1 -0
  57. package/dist/admin/chunks/ar-DckYq_WK.mjs +222 -0
  58. package/dist/{_chunks/ar-CCEVvqGG.mjs.map → admin/chunks/ar-DckYq_WK.mjs.map} +1 -1
  59. package/dist/admin/chunks/ar-DeQBSsfl.js +227 -0
  60. package/dist/{_chunks/ru-BT3ybNny.js.map → admin/chunks/ar-DeQBSsfl.js.map} +1 -1
  61. package/dist/admin/chunks/ca-ClDTvatJ.js +202 -0
  62. package/dist/admin/chunks/ca-ClDTvatJ.js.map +1 -0
  63. package/dist/admin/chunks/ca-DviY7mRj.mjs +197 -0
  64. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  65. package/dist/admin/chunks/cs-BJFxwIWj.js +126 -0
  66. package/dist/{_chunks/cs-CkJy6B2v.js.map → admin/chunks/cs-BJFxwIWj.js.map} +1 -1
  67. package/dist/admin/chunks/cs-C7OSYFQ7.mjs +122 -0
  68. package/dist/{_chunks/cs-CM2aBUar.mjs.map → admin/chunks/cs-C7OSYFQ7.mjs.map} +1 -1
  69. package/dist/admin/chunks/de-5QRlDHyR.mjs +195 -0
  70. package/dist/{_chunks/eu-CdALomew.mjs.map → admin/chunks/de-5QRlDHyR.mjs.map} +1 -1
  71. package/dist/admin/chunks/de-CbImAUA5.js +200 -0
  72. package/dist/{_chunks/gu-BRmF601H.js.map → admin/chunks/de-CbImAUA5.js.map} +1 -1
  73. package/dist/admin/chunks/en-C2zEwS3-.mjs +313 -0
  74. package/dist/{_chunks/en-D65uIF6Y.mjs.map → admin/chunks/en-C2zEwS3-.mjs.map} +1 -1
  75. package/dist/admin/chunks/en-G976DLsg.js +318 -0
  76. package/dist/{_chunks/en-BR48D_RH.js.map → admin/chunks/en-G976DLsg.js.map} +1 -1
  77. package/dist/admin/chunks/es-C8vLuvZL.js +197 -0
  78. package/dist/{_chunks/es-9K52xZIr.js.map → admin/chunks/es-C8vLuvZL.js.map} +1 -1
  79. package/dist/admin/chunks/es-DkoWSExG.mjs +192 -0
  80. package/dist/{_chunks/ja-BHqhDq4V.mjs.map → admin/chunks/es-DkoWSExG.mjs.map} +1 -1
  81. package/dist/admin/chunks/eu-BG1xX7HK.mjs +198 -0
  82. package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
  83. package/dist/admin/chunks/eu-BJW3AvXu.js +203 -0
  84. package/dist/admin/chunks/eu-BJW3AvXu.js.map +1 -0
  85. package/dist/admin/chunks/fr-CFdRaRVj.mjs +215 -0
  86. package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
  87. package/dist/admin/chunks/fr-gQSilC7w.js +220 -0
  88. package/dist/admin/chunks/fr-gQSilC7w.js.map +1 -0
  89. package/dist/admin/chunks/gu-D5MMMXRs.mjs +196 -0
  90. package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
  91. package/dist/admin/chunks/gu-DPU4wyx7.js +201 -0
  92. package/dist/{_chunks/eu-VDH-3ovk.js.map → admin/chunks/gu-DPU4wyx7.js.map} +1 -1
  93. package/dist/admin/chunks/hi-Dp4omeBb.js +201 -0
  94. package/dist/admin/chunks/hi-Dp4omeBb.js.map +1 -0
  95. package/dist/admin/chunks/hi-lp17SCjr.mjs +196 -0
  96. package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
  97. package/dist/{_chunks/hooks-BAaaKPS_.js → admin/chunks/hooks-D-sOYd1s.js} +6 -3
  98. package/dist/admin/chunks/hooks-D-sOYd1s.js.map +1 -0
  99. package/dist/admin/chunks/hooks-DMvik5y_.mjs +7 -0
  100. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  101. package/dist/admin/chunks/hu-CLka1U2C.mjs +198 -0
  102. package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
  103. package/dist/admin/chunks/hu-CtFJuhTd.js +203 -0
  104. package/dist/admin/chunks/hu-CtFJuhTd.js.map +1 -0
  105. package/dist/admin/chunks/id-D7V5S1rB.js +161 -0
  106. package/dist/{_chunks/it-DkBIs7vD.js.map → admin/chunks/id-D7V5S1rB.js.map} +1 -1
  107. package/dist/admin/chunks/id-USfY9m1g.mjs +156 -0
  108. package/dist/{_chunks/id-BtwA9WJT.mjs.map → admin/chunks/id-USfY9m1g.mjs.map} +1 -1
  109. package/dist/admin/chunks/index-BE7PI9Wp.mjs +5450 -0
  110. package/dist/admin/chunks/index-BE7PI9Wp.mjs.map +1 -0
  111. package/dist/admin/chunks/index-BwIhYBsG.js +5520 -0
  112. package/dist/admin/chunks/index-BwIhYBsG.js.map +1 -0
  113. package/dist/admin/chunks/it-BAHrwmYS.mjs +158 -0
  114. package/dist/{_chunks/it-BrVPqaf1.mjs.map → admin/chunks/it-BAHrwmYS.mjs.map} +1 -1
  115. package/dist/admin/chunks/it-CQFpa_Dc.js +163 -0
  116. package/dist/{_chunks/ko-woFZPmLk.js.map → admin/chunks/it-CQFpa_Dc.js.map} +1 -1
  117. package/dist/admin/chunks/ja-BWKmBJFT.mjs +192 -0
  118. package/dist/{_chunks/ko-HVQRlfUI.mjs.map → admin/chunks/ja-BWKmBJFT.mjs.map} +1 -1
  119. package/dist/admin/chunks/ja-jdQM-B79.js +197 -0
  120. package/dist/{_chunks/de-CCEmbAah.js.map → admin/chunks/ja-jdQM-B79.js.map} +1 -1
  121. package/dist/admin/chunks/ko-CgADGBNt.mjs +191 -0
  122. package/dist/{_chunks/es-D34tqjMw.mjs.map → admin/chunks/ko-CgADGBNt.mjs.map} +1 -1
  123. package/dist/admin/chunks/ko-k46sEyzt.js +196 -0
  124. package/dist/{_chunks/ja-7sfIbjxE.js.map → admin/chunks/ko-k46sEyzt.js.map} +1 -1
  125. package/dist/admin/chunks/layout-9zlUM9V3.mjs +672 -0
  126. package/dist/admin/chunks/layout-9zlUM9V3.mjs.map +1 -0
  127. package/dist/admin/chunks/layout-Cr0HaJVS.js +692 -0
  128. package/dist/admin/chunks/layout-Cr0HaJVS.js.map +1 -0
  129. package/dist/admin/chunks/ml-CnhCfOn_.mjs +196 -0
  130. package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
  131. package/dist/admin/chunks/ml-DqxPwODx.js +201 -0
  132. package/dist/admin/chunks/ml-DqxPwODx.js.map +1 -0
  133. package/dist/admin/chunks/ms-Bh09NFff.mjs +140 -0
  134. package/dist/{_chunks/ms-m_WjyWx7.mjs.map → admin/chunks/ms-Bh09NFff.mjs.map} +1 -1
  135. package/dist/admin/chunks/ms-CvSC0OdG.js +145 -0
  136. package/dist/{_chunks/ms-BuFotyP_.js.map → admin/chunks/ms-CvSC0OdG.js.map} +1 -1
  137. package/dist/admin/chunks/nl-BEubhS8C.js +203 -0
  138. package/dist/admin/chunks/nl-BEubhS8C.js.map +1 -0
  139. package/dist/admin/chunks/nl-C8HYflTc.mjs +198 -0
  140. package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
  141. package/dist/admin/chunks/objects-BJTP843m.js +343 -0
  142. package/dist/admin/chunks/objects-BJTP843m.js.map +1 -0
  143. package/dist/admin/chunks/objects-D2z-IJgu.mjs +317 -0
  144. package/dist/admin/chunks/objects-D2z-IJgu.mjs.map +1 -0
  145. package/dist/admin/chunks/pl-DWhGDzmM.js +200 -0
  146. package/dist/{_chunks/ca-Cmk45QO6.js.map → admin/chunks/pl-DWhGDzmM.js.map} +1 -1
  147. package/dist/admin/chunks/pl-MFCZJZuZ.mjs +195 -0
  148. package/dist/{_chunks/ca-5U32ON2v.mjs.map → admin/chunks/pl-MFCZJZuZ.mjs.map} +1 -1
  149. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +202 -0
  150. package/dist/{_chunks/pt-BR-BiOz37D9.js.map → admin/chunks/pt-BR-CPtAXD-4.js.map} +1 -1
  151. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs +197 -0
  152. package/dist/{_chunks/pt-BR-C71iDxnh.mjs.map → admin/chunks/pt-BR-CcotyBGJ.mjs.map} +1 -1
  153. package/dist/admin/chunks/pt-BoPxN80n.js +96 -0
  154. package/dist/admin/chunks/pt-BoPxN80n.js.map +1 -0
  155. package/dist/admin/chunks/pt-HbmgeiYO.mjs +93 -0
  156. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  157. package/dist/admin/chunks/ru-C0op0ALG.js +232 -0
  158. package/dist/admin/chunks/ru-C0op0ALG.js.map +1 -0
  159. package/dist/admin/chunks/ru-CB4BUyQp.mjs +230 -0
  160. package/dist/{_chunks/ru-BE6A4Exp.mjs.map → admin/chunks/ru-CB4BUyQp.mjs.map} +1 -1
  161. package/dist/admin/chunks/sa-B_FuPyMw.js +201 -0
  162. package/dist/admin/chunks/sa-B_FuPyMw.js.map +1 -0
  163. package/dist/admin/chunks/sa-n_aPA-pU.mjs +196 -0
  164. package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
  165. package/dist/admin/chunks/sk-D_iXML2C.js +203 -0
  166. package/dist/admin/chunks/sk-D_iXML2C.js.map +1 -0
  167. package/dist/admin/chunks/sk-tn_BDjE2.mjs +198 -0
  168. package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
  169. package/dist/admin/chunks/sv-BstBC1Yp.js +203 -0
  170. package/dist/admin/chunks/sv-BstBC1Yp.js.map +1 -0
  171. package/dist/admin/chunks/sv-cq4ZrQRd.mjs +198 -0
  172. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
  173. package/dist/admin/chunks/th-lXoOCqPC.js +149 -0
  174. package/dist/{_chunks/th-D9_GfAjc.js.map → admin/chunks/th-lXoOCqPC.js.map} +1 -1
  175. package/dist/admin/chunks/th-mUH7hEtc.mjs +144 -0
  176. package/dist/{_chunks/uk-CR-zDhAY.mjs.map → admin/chunks/th-mUH7hEtc.mjs.map} +1 -1
  177. package/dist/admin/chunks/tr-CkS6sLIE.js +200 -0
  178. package/dist/admin/chunks/tr-CkS6sLIE.js.map +1 -0
  179. package/dist/admin/chunks/tr-Yt38daxh.mjs +195 -0
  180. package/dist/{_chunks/de-C72KDNOl.mjs.map → admin/chunks/tr-Yt38daxh.mjs.map} +1 -1
  181. package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
  182. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  183. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  184. package/dist/admin/chunks/uk-DB6OgySY.js.map +1 -0
  185. package/dist/admin/chunks/usePrev-DgZBp9Oo.js +194 -0
  186. package/dist/admin/chunks/usePrev-DgZBp9Oo.js.map +1 -0
  187. package/dist/admin/chunks/usePrev-PisKKvhT.mjs +187 -0
  188. package/dist/admin/chunks/usePrev-PisKKvhT.mjs.map +1 -0
  189. package/dist/admin/chunks/vi-BGr1X_HZ.js +112 -0
  190. package/dist/{_chunks/vi-CJlYDheJ.js.map → admin/chunks/vi-BGr1X_HZ.js.map} +1 -1
  191. package/dist/admin/chunks/vi-CvBGlTjr.mjs +108 -0
  192. package/dist/{_chunks/vi-DUXIk_fw.mjs.map → admin/chunks/vi-CvBGlTjr.mjs.map} +1 -1
  193. package/dist/admin/chunks/zh-BmF-sHaT.mjs +205 -0
  194. package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
  195. package/dist/admin/chunks/zh-DwFu_Kfj.js +210 -0
  196. package/dist/admin/chunks/zh-DwFu_Kfj.js.map +1 -0
  197. package/dist/admin/chunks/zh-Hans-CI0HKio3.mjs +934 -0
  198. package/dist/{_chunks/zh-Hans-BPQcRIyH.mjs.map → admin/chunks/zh-Hans-CI0HKio3.mjs.map} +1 -1
  199. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +953 -0
  200. package/dist/{_chunks/zh-Hans-9kOncHGw.js.map → admin/chunks/zh-Hans-JVK9x7xr.js.map} +1 -1
  201. package/dist/admin/index.js +24 -4
  202. package/dist/admin/index.js.map +1 -1
  203. package/dist/admin/index.mjs +17 -13
  204. package/dist/admin/index.mjs.map +1 -1
  205. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  206. package/dist/admin/src/content-manager.d.ts +4 -0
  207. package/dist/admin/src/features/DocumentContext.d.ts +53 -0
  208. package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
  209. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  210. package/dist/admin/src/hooks/useDocument.d.ts +4 -2
  211. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  212. package/dist/admin/src/index.d.ts +1 -0
  213. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
  214. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  215. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +49 -1
  216. package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +8 -0
  217. package/dist/admin/src/pages/EditView/components/FormInputs/{Relations.d.ts → Relations/Relations.d.ts} +8 -2
  218. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  219. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +9 -3
  220. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +7 -4
  221. package/dist/admin/src/preview/index.d.ts +2 -3
  222. package/dist/admin/src/preview/pages/Preview.d.ts +2 -0
  223. package/dist/server/index.js +5459 -4387
  224. package/dist/server/index.js.map +1 -1
  225. package/dist/server/index.mjs +5446 -4372
  226. package/dist/server/index.mjs.map +1 -1
  227. package/dist/server/src/controllers/utils/metadata.d.ts +1 -1
  228. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  229. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  230. package/dist/server/src/services/utils/count.d.ts +1 -1
  231. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  232. package/dist/server/src/services/utils/populate.d.ts +1 -1
  233. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  234. package/dist/shared/contracts/collection-types.d.ts +0 -1
  235. package/dist/shared/contracts/components.d.ts +0 -1
  236. package/dist/shared/contracts/content-types.d.ts +0 -1
  237. package/dist/shared/contracts/history-versions.d.ts +0 -1
  238. package/dist/shared/contracts/index.d.ts +0 -1
  239. package/dist/shared/contracts/init.d.ts +0 -1
  240. package/dist/shared/contracts/preview.d.ts +0 -1
  241. package/dist/shared/contracts/relations.d.ts +1 -2
  242. package/dist/shared/contracts/relations.d.ts.map +1 -1
  243. package/dist/shared/contracts/review-workflows.d.ts +0 -1
  244. package/dist/shared/contracts/single-types.d.ts +0 -1
  245. package/dist/shared/contracts/uid.d.ts +0 -1
  246. package/dist/shared/index.d.ts +0 -1
  247. package/dist/shared/index.js +35 -24
  248. package/dist/shared/index.js.map +1 -1
  249. package/dist/shared/index.mjs +34 -25
  250. package/dist/shared/index.mjs.map +1 -1
  251. package/package.json +16 -13
  252. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +0 -69
  253. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +0 -1
  254. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +0 -70
  255. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +0 -1
  256. package/dist/_chunks/ComponentConfigurationPage-9_4yUE9L.mjs +0 -236
  257. package/dist/_chunks/ComponentConfigurationPage-9_4yUE9L.mjs.map +0 -1
  258. package/dist/_chunks/ComponentConfigurationPage-DBSh-kET.js +0 -254
  259. package/dist/_chunks/ComponentConfigurationPage-DBSh-kET.js.map +0 -1
  260. package/dist/_chunks/ComponentIcon-CRbtQEUV.js +0 -175
  261. package/dist/_chunks/ComponentIcon-CRbtQEUV.js.map +0 -1
  262. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +0 -157
  263. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +0 -1
  264. package/dist/_chunks/EditConfigurationPage-Bl_U2JgH.js +0 -150
  265. package/dist/_chunks/EditConfigurationPage-Bl_U2JgH.js.map +0 -1
  266. package/dist/_chunks/EditConfigurationPage-COe6hjPC.mjs +0 -132
  267. package/dist/_chunks/EditConfigurationPage-COe6hjPC.mjs.map +0 -1
  268. package/dist/_chunks/EditViewPage-D4yFJET6.js +0 -209
  269. package/dist/_chunks/EditViewPage-D4yFJET6.js.map +0 -1
  270. package/dist/_chunks/EditViewPage-DrmVmYN0.mjs +0 -191
  271. package/dist/_chunks/EditViewPage-DrmVmYN0.mjs.map +0 -1
  272. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +0 -50
  273. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +0 -1
  274. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +0 -49
  275. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +0 -1
  276. package/dist/_chunks/Form-C4rSaGsz.js +0 -778
  277. package/dist/_chunks/Form-C4rSaGsz.js.map +0 -1
  278. package/dist/_chunks/Form-DamaxNpG.mjs +0 -758
  279. package/dist/_chunks/Form-DamaxNpG.mjs.map +0 -1
  280. package/dist/_chunks/History-D1PreDSY.mjs +0 -999
  281. package/dist/_chunks/History-D1PreDSY.mjs.map +0 -1
  282. package/dist/_chunks/History-DTm8UCCQ.js +0 -1019
  283. package/dist/_chunks/History-DTm8UCCQ.js.map +0 -1
  284. package/dist/_chunks/Input-B7sapvBG.js +0 -5617
  285. package/dist/_chunks/Input-B7sapvBG.js.map +0 -1
  286. package/dist/_chunks/Input-CZ1YvjHR.mjs +0 -5585
  287. package/dist/_chunks/Input-CZ1YvjHR.mjs.map +0 -1
  288. package/dist/_chunks/ListConfigurationPage-Bbi32isk.mjs +0 -633
  289. package/dist/_chunks/ListConfigurationPage-Bbi32isk.mjs.map +0 -1
  290. package/dist/_chunks/ListConfigurationPage-ysFMjKI3.js +0 -652
  291. package/dist/_chunks/ListConfigurationPage-ysFMjKI3.js.map +0 -1
  292. package/dist/_chunks/ListViewPage-Bud_jBDQ.mjs +0 -854
  293. package/dist/_chunks/ListViewPage-Bud_jBDQ.mjs.map +0 -1
  294. package/dist/_chunks/ListViewPage-DTuuxU3n.js +0 -877
  295. package/dist/_chunks/ListViewPage-DTuuxU3n.js.map +0 -1
  296. package/dist/_chunks/NoContentTypePage-CL7VVeYs.js +0 -51
  297. package/dist/_chunks/NoContentTypePage-CL7VVeYs.js.map +0 -1
  298. package/dist/_chunks/NoContentTypePage-DVhkugsf.mjs +0 -51
  299. package/dist/_chunks/NoContentTypePage-DVhkugsf.mjs.map +0 -1
  300. package/dist/_chunks/NoPermissionsPage-CMdM-dCo.mjs +0 -23
  301. package/dist/_chunks/NoPermissionsPage-CMdM-dCo.mjs.map +0 -1
  302. package/dist/_chunks/NoPermissionsPage-v7I599vC.js +0 -23
  303. package/dist/_chunks/NoPermissionsPage-v7I599vC.js.map +0 -1
  304. package/dist/_chunks/Preview-BNuU0SuQ.mjs +0 -287
  305. package/dist/_chunks/Preview-BNuU0SuQ.mjs.map +0 -1
  306. package/dist/_chunks/Preview-Cxq-uI6D.js +0 -305
  307. package/dist/_chunks/Preview-Cxq-uI6D.js.map +0 -1
  308. package/dist/_chunks/Relations-C2Ahkrdg.mjs +0 -728
  309. package/dist/_chunks/Relations-C2Ahkrdg.mjs.map +0 -1
  310. package/dist/_chunks/Relations-CWS79QQn.js +0 -747
  311. package/dist/_chunks/Relations-CWS79QQn.js.map +0 -1
  312. package/dist/_chunks/ar-BUUWXIYu.js +0 -226
  313. package/dist/_chunks/ar-BUUWXIYu.js.map +0 -1
  314. package/dist/_chunks/ar-CCEVvqGG.mjs +0 -226
  315. package/dist/_chunks/ca-5U32ON2v.mjs +0 -201
  316. package/dist/_chunks/ca-Cmk45QO6.js +0 -201
  317. package/dist/_chunks/cs-CM2aBUar.mjs +0 -125
  318. package/dist/_chunks/cs-CkJy6B2v.js +0 -125
  319. package/dist/_chunks/de-C72KDNOl.mjs +0 -199
  320. package/dist/_chunks/de-CCEmbAah.js +0 -199
  321. package/dist/_chunks/en-BR48D_RH.js +0 -312
  322. package/dist/_chunks/en-D65uIF6Y.mjs +0 -312
  323. package/dist/_chunks/es-9K52xZIr.js +0 -196
  324. package/dist/_chunks/es-D34tqjMw.mjs +0 -196
  325. package/dist/_chunks/eu-CdALomew.mjs +0 -202
  326. package/dist/_chunks/eu-VDH-3ovk.js +0 -202
  327. package/dist/_chunks/fr-C43IbhA_.js +0 -219
  328. package/dist/_chunks/fr-C43IbhA_.js.map +0 -1
  329. package/dist/_chunks/fr-DBseuRuB.mjs +0 -219
  330. package/dist/_chunks/fr-DBseuRuB.mjs.map +0 -1
  331. package/dist/_chunks/gu-BRmF601H.js +0 -200
  332. package/dist/_chunks/gu-CNpaMDpH.mjs +0 -200
  333. package/dist/_chunks/gu-CNpaMDpH.mjs.map +0 -1
  334. package/dist/_chunks/hi-CCJBptSq.js +0 -200
  335. package/dist/_chunks/hi-CCJBptSq.js.map +0 -1
  336. package/dist/_chunks/hi-Dwvd04m3.mjs +0 -200
  337. package/dist/_chunks/hi-Dwvd04m3.mjs.map +0 -1
  338. package/dist/_chunks/hooks-BAaaKPS_.js.map +0 -1
  339. package/dist/_chunks/hooks-E5u1mcgM.mjs +0 -8
  340. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +0 -1
  341. package/dist/_chunks/hu-CeYvaaO0.mjs +0 -202
  342. package/dist/_chunks/hu-CeYvaaO0.mjs.map +0 -1
  343. package/dist/_chunks/hu-sNV_yLYy.js +0 -202
  344. package/dist/_chunks/hu-sNV_yLYy.js.map +0 -1
  345. package/dist/_chunks/id-B5Ser98A.js +0 -160
  346. package/dist/_chunks/id-B5Ser98A.js.map +0 -1
  347. package/dist/_chunks/id-BtwA9WJT.mjs +0 -160
  348. package/dist/_chunks/index-DQsvBb_N.js +0 -4500
  349. package/dist/_chunks/index-DQsvBb_N.js.map +0 -1
  350. package/dist/_chunks/index-ZKrsjv-2.mjs +0 -4481
  351. package/dist/_chunks/index-ZKrsjv-2.mjs.map +0 -1
  352. package/dist/_chunks/it-BrVPqaf1.mjs +0 -162
  353. package/dist/_chunks/it-DkBIs7vD.js +0 -162
  354. package/dist/_chunks/ja-7sfIbjxE.js +0 -196
  355. package/dist/_chunks/ja-BHqhDq4V.mjs +0 -196
  356. package/dist/_chunks/ko-HVQRlfUI.mjs +0 -195
  357. package/dist/_chunks/ko-woFZPmLk.js +0 -195
  358. package/dist/_chunks/layout-Cl0NhlQB.js +0 -488
  359. package/dist/_chunks/layout-Cl0NhlQB.js.map +0 -1
  360. package/dist/_chunks/layout-fQk1rMk9.mjs +0 -471
  361. package/dist/_chunks/layout-fQk1rMk9.mjs.map +0 -1
  362. package/dist/_chunks/ml-BihZwQit.mjs +0 -200
  363. package/dist/_chunks/ml-BihZwQit.mjs.map +0 -1
  364. package/dist/_chunks/ml-C2W8N8k1.js +0 -200
  365. package/dist/_chunks/ml-C2W8N8k1.js.map +0 -1
  366. package/dist/_chunks/ms-BuFotyP_.js +0 -144
  367. package/dist/_chunks/ms-m_WjyWx7.mjs +0 -144
  368. package/dist/_chunks/nl-D4R9gHx5.mjs +0 -202
  369. package/dist/_chunks/nl-D4R9gHx5.mjs.map +0 -1
  370. package/dist/_chunks/nl-bbEOHChV.js +0 -202
  371. package/dist/_chunks/nl-bbEOHChV.js.map +0 -1
  372. package/dist/_chunks/objects-BcXOv6_9.js +0 -47
  373. package/dist/_chunks/objects-BcXOv6_9.js.map +0 -1
  374. package/dist/_chunks/objects-D6yBsdmx.mjs +0 -45
  375. package/dist/_chunks/objects-D6yBsdmx.mjs.map +0 -1
  376. package/dist/_chunks/pl-sbx9mSt_.mjs +0 -199
  377. package/dist/_chunks/pl-sbx9mSt_.mjs.map +0 -1
  378. package/dist/_chunks/pl-uzwG-hk7.js +0 -199
  379. package/dist/_chunks/pl-uzwG-hk7.js.map +0 -1
  380. package/dist/_chunks/pt-BR-BiOz37D9.js +0 -201
  381. package/dist/_chunks/pt-BR-C71iDxnh.mjs +0 -201
  382. package/dist/_chunks/pt-BsaFvS8-.mjs +0 -95
  383. package/dist/_chunks/pt-BsaFvS8-.mjs.map +0 -1
  384. package/dist/_chunks/pt-CeXQuq50.js +0 -95
  385. package/dist/_chunks/pt-CeXQuq50.js.map +0 -1
  386. package/dist/_chunks/relations-BRfBxVbX.js +0 -133
  387. package/dist/_chunks/relations-BRfBxVbX.js.map +0 -1
  388. package/dist/_chunks/relations-BakOFl_1.mjs +0 -134
  389. package/dist/_chunks/relations-BakOFl_1.mjs.map +0 -1
  390. package/dist/_chunks/ru-BE6A4Exp.mjs +0 -231
  391. package/dist/_chunks/ru-BT3ybNny.js +0 -231
  392. package/dist/_chunks/sa-CcvkYInH.js +0 -200
  393. package/dist/_chunks/sa-CcvkYInH.js.map +0 -1
  394. package/dist/_chunks/sa-Dag0k-Z8.mjs +0 -200
  395. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +0 -1
  396. package/dist/_chunks/sk-BFg-R8qJ.mjs +0 -202
  397. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +0 -1
  398. package/dist/_chunks/sk-CvY09Xjv.js +0 -202
  399. package/dist/_chunks/sk-CvY09Xjv.js.map +0 -1
  400. package/dist/_chunks/sv-CUnfWGsh.mjs +0 -202
  401. package/dist/_chunks/sv-CUnfWGsh.mjs.map +0 -1
  402. package/dist/_chunks/sv-MYDuzgvT.js +0 -202
  403. package/dist/_chunks/sv-MYDuzgvT.js.map +0 -1
  404. package/dist/_chunks/th-BqbI8lIT.mjs +0 -148
  405. package/dist/_chunks/th-BqbI8lIT.mjs.map +0 -1
  406. package/dist/_chunks/th-D9_GfAjc.js +0 -148
  407. package/dist/_chunks/tr-CgeK3wJM.mjs +0 -199
  408. package/dist/_chunks/tr-CgeK3wJM.mjs.map +0 -1
  409. package/dist/_chunks/tr-D9UH-O_R.js +0 -199
  410. package/dist/_chunks/tr-D9UH-O_R.js.map +0 -1
  411. package/dist/_chunks/uk-C8EiqJY7.js +0 -144
  412. package/dist/_chunks/uk-C8EiqJY7.js.map +0 -1
  413. package/dist/_chunks/uk-CR-zDhAY.mjs +0 -144
  414. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js +0 -245
  415. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +0 -1
  416. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs +0 -228
  417. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +0 -1
  418. package/dist/_chunks/usePrev-CZGy2Vjf.mjs +0 -29
  419. package/dist/_chunks/usePrev-CZGy2Vjf.mjs.map +0 -1
  420. package/dist/_chunks/usePrev-D5J_2fEu.js +0 -28
  421. package/dist/_chunks/usePrev-D5J_2fEu.js.map +0 -1
  422. package/dist/_chunks/vi-CJlYDheJ.js +0 -111
  423. package/dist/_chunks/vi-DUXIk_fw.mjs +0 -111
  424. package/dist/_chunks/zh-BWZspA60.mjs +0 -209
  425. package/dist/_chunks/zh-BWZspA60.mjs.map +0 -1
  426. package/dist/_chunks/zh-CQQfszqR.js +0 -209
  427. package/dist/_chunks/zh-CQQfszqR.js.map +0 -1
  428. package/dist/_chunks/zh-Hans-9kOncHGw.js +0 -952
  429. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +0 -952
  430. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +0 -49
  431. package/dist/admin/src/preview/components/PreviewContent.d.ts +0 -2
@@ -0,0 +1,1384 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+ var strapiAdmin = require('@strapi/admin/strapi-admin');
6
+ var designSystem = require('@strapi/design-system');
7
+ var qs = require('qs');
8
+ var reactIntl = require('react-intl');
9
+ var reactRouterDom = require('react-router-dom');
10
+ var index = require('./index-BwIhYBsG.js');
11
+ var pipe = require('lodash/fp/pipe');
12
+ var hooks = require('./hooks-D-sOYd1s.js');
13
+ var Icons = require('@strapi/icons');
14
+ var styledComponents = require('styled-components');
15
+ var Input = require('./Input-B8I0b9aD.js');
16
+ var usePrev = require('./usePrev-DgZBp9Oo.js');
17
+ require('lodash/fp/mapValues');
18
+ require('yup');
19
+ require('fractional-indexing');
20
+ require('date-fns');
21
+ require('@reduxjs/toolkit');
22
+ require('prismjs');
23
+ require('react-redux');
24
+ require('slate');
25
+ require('slate-history');
26
+ require('slate-react');
27
+ require('prismjs/themes/prism-solarizedlight.css');
28
+ require('prismjs/components/prism-asmatmel');
29
+ require('prismjs/components/prism-bash');
30
+ require('prismjs/components/prism-basic');
31
+ require('prismjs/components/prism-c');
32
+ require('prismjs/components/prism-clojure');
33
+ require('prismjs/components/prism-cobol');
34
+ require('prismjs/components/prism-cpp');
35
+ require('prismjs/components/prism-csharp');
36
+ require('prismjs/components/prism-dart');
37
+ require('prismjs/components/prism-docker');
38
+ require('prismjs/components/prism-elixir');
39
+ require('prismjs/components/prism-erlang');
40
+ require('prismjs/components/prism-fortran');
41
+ require('prismjs/components/prism-fsharp');
42
+ require('prismjs/components/prism-go');
43
+ require('prismjs/components/prism-graphql');
44
+ require('prismjs/components/prism-groovy');
45
+ require('prismjs/components/prism-haskell');
46
+ require('prismjs/components/prism-haxe');
47
+ require('prismjs/components/prism-ini');
48
+ require('prismjs/components/prism-java');
49
+ require('prismjs/components/prism-javascript');
50
+ require('prismjs/components/prism-jsx');
51
+ require('prismjs/components/prism-json');
52
+ require('prismjs/components/prism-julia');
53
+ require('prismjs/components/prism-kotlin');
54
+ require('prismjs/components/prism-latex');
55
+ require('prismjs/components/prism-lua');
56
+ require('prismjs/components/prism-markdown');
57
+ require('prismjs/components/prism-matlab');
58
+ require('prismjs/components/prism-makefile');
59
+ require('prismjs/components/prism-objectivec');
60
+ require('prismjs/components/prism-perl');
61
+ require('prismjs/components/prism-php');
62
+ require('prismjs/components/prism-powershell');
63
+ require('prismjs/components/prism-python');
64
+ require('prismjs/components/prism-r');
65
+ require('prismjs/components/prism-ruby');
66
+ require('prismjs/components/prism-rust');
67
+ require('prismjs/components/prism-sas');
68
+ require('prismjs/components/prism-scala');
69
+ require('prismjs/components/prism-scheme');
70
+ require('prismjs/components/prism-sql');
71
+ require('prismjs/components/prism-stata');
72
+ require('prismjs/components/prism-swift');
73
+ require('prismjs/components/prism-typescript');
74
+ require('prismjs/components/prism-tsx');
75
+ require('prismjs/components/prism-vbnet');
76
+ require('prismjs/components/prism-yaml');
77
+ require('./objects-BJTP843m.js');
78
+ require('react-dnd');
79
+ require('lodash/clone');
80
+ require('lodash/toPath');
81
+ require('@radix-ui/react-toolbar');
82
+ require('react-dnd-html5-backend');
83
+ require('./ComponentIcon-C-EjOUPA.js');
84
+ require('@strapi/icons/symbols');
85
+ require('react-window');
86
+ require('codemirror5');
87
+ require('sanitize-html');
88
+ require('highlight.js');
89
+ require('markdown-it');
90
+ require('markdown-it-abbr');
91
+ require('markdown-it-container');
92
+ require('markdown-it-deflist');
93
+ require('markdown-it-emoji');
94
+ require('markdown-it-footnote');
95
+ require('markdown-it-ins');
96
+ require('markdown-it-mark');
97
+ require('markdown-it-sub');
98
+ require('markdown-it-sup');
99
+ require('highlight.js/styles/solarized-dark.css');
100
+ require('codemirror5/addon/display/placeholder');
101
+
102
+ function _interopNamespaceDefault(e) {
103
+ var n = Object.create(null);
104
+ if (e) {
105
+ Object.keys(e).forEach(function (k) {
106
+ if (k !== 'default') {
107
+ var d = Object.getOwnPropertyDescriptor(e, k);
108
+ Object.defineProperty(n, k, d.get ? d : {
109
+ enumerable: true,
110
+ get: function () { return e[k]; }
111
+ });
112
+ }
113
+ });
114
+ }
115
+ n.default = e;
116
+ return Object.freeze(n);
117
+ }
118
+
119
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
120
+
121
+ const StyledAlert = styledComponents.styled(designSystem.Alert).attrs({
122
+ closeLabel: 'Close',
123
+ onClose: ()=>{},
124
+ shadow: 'none'
125
+ })`
126
+ button {
127
+ display: none;
128
+ }
129
+ `;
130
+ /* -------------------------------------------------------------------------------------------------
131
+ * CustomRelationInput
132
+ * -----------------------------------------------------------------------------------------------*/ const LinkEllipsis = styledComponents.styled(designSystem.Link)`
133
+ display: block;
134
+
135
+ & > span {
136
+ white-space: nowrap;
137
+ overflow: hidden;
138
+ text-overflow: ellipsis;
139
+ display: block;
140
+ }
141
+ `;
142
+ const CustomRelationInput = (props)=>{
143
+ const { formatMessage } = reactIntl.useIntl();
144
+ const field = strapiAdmin.useField(props.name);
145
+ /**
146
+ * Ideally the server would return the correct shape, however, for admin user relations
147
+ * it sanitizes everything out when it finds an object for the relation value.
148
+ */ let formattedFieldValue;
149
+ if (field) {
150
+ formattedFieldValue = Array.isArray(field.value) ? {
151
+ results: field.value,
152
+ meta: {
153
+ missingCount: 0
154
+ }
155
+ } : field.value;
156
+ }
157
+ if (!formattedFieldValue || formattedFieldValue.results.length === 0 && formattedFieldValue.meta.missingCount === 0) {
158
+ return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
159
+ children: [
160
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Label, {
161
+ action: props.labelAction,
162
+ children: props.label
163
+ }),
164
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
165
+ marginTop: 1,
166
+ children: /*#__PURE__*/ jsxRuntime.jsx(StyledAlert, {
167
+ variant: "default",
168
+ children: formatMessage({
169
+ id: 'content-manager.history.content.no-relations',
170
+ defaultMessage: 'No relations.'
171
+ })
172
+ })
173
+ })
174
+ ]
175
+ });
176
+ }
177
+ const { results, meta } = formattedFieldValue;
178
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Box, {
179
+ children: [
180
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Label, {
181
+ children: props.label
182
+ }),
183
+ results.length > 0 && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
184
+ direction: "column",
185
+ gap: 2,
186
+ marginTop: 1,
187
+ alignItems: "stretch",
188
+ children: results.map((relationData)=>{
189
+ // @ts-expect-error - targetModel does exist on the attribute. But it's not typed.
190
+ const { targetModel } = props.attribute;
191
+ const href = `../${index.COLLECTION_TYPES}/${targetModel}/${relationData.documentId}`;
192
+ const label = usePrev.getRelationLabel(relationData, props.mainField);
193
+ const isAdminUserRelation = targetModel === 'admin::user';
194
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
195
+ paddingTop: 2,
196
+ paddingBottom: 2,
197
+ paddingLeft: 4,
198
+ paddingRight: 4,
199
+ hasRadius: true,
200
+ borderColor: "neutral200",
201
+ background: "neutral150",
202
+ justifyContent: "space-between",
203
+ children: [
204
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
205
+ minWidth: 0,
206
+ paddingTop: 1,
207
+ paddingBottom: 1,
208
+ paddingRight: 4,
209
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tooltip, {
210
+ label: label,
211
+ children: isAdminUserRelation ? /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
212
+ children: label
213
+ }) : /*#__PURE__*/ jsxRuntime.jsx(LinkEllipsis, {
214
+ tag: reactRouterDom.NavLink,
215
+ to: href,
216
+ children: label
217
+ })
218
+ })
219
+ }),
220
+ /*#__PURE__*/ jsxRuntime.jsx(index.DocumentStatus, {
221
+ status: relationData.status
222
+ })
223
+ ]
224
+ }, relationData.documentId ?? relationData.id);
225
+ })
226
+ }),
227
+ meta.missingCount > 0 && /* @ts-expect-error – we dont need closeLabel */ /*#__PURE__*/ jsxRuntime.jsx(StyledAlert, {
228
+ marginTop: 1,
229
+ variant: "warning",
230
+ title: formatMessage({
231
+ id: 'content-manager.history.content.missing-relations.title',
232
+ defaultMessage: '{number, plural, =1 {Missing relation} other {{number} missing relations}}'
233
+ }, {
234
+ number: meta.missingCount
235
+ }),
236
+ children: formatMessage({
237
+ id: 'content-manager.history.content.missing-relations.message',
238
+ defaultMessage: "{number, plural, =1 {It has} other {They have}} been deleted and can't be restored."
239
+ }, {
240
+ number: meta.missingCount
241
+ })
242
+ })
243
+ ]
244
+ });
245
+ };
246
+ /* -------------------------------------------------------------------------------------------------
247
+ * CustomMediaInput
248
+ * -----------------------------------------------------------------------------------------------*/ // Create an object with value at key path (i.e. 'a.b.c')
249
+ const createInitialValuesForPath = (keyPath, value)=>{
250
+ const keys = keyPath.split('.');
251
+ // The root level object
252
+ const root = {};
253
+ // Make the first node the root
254
+ let node = root;
255
+ keys.forEach((key, index)=>{
256
+ // Skip prototype pollution keys
257
+ if (key === '__proto__' || key === 'constructor') return;
258
+ // If it's the last key, set the node value
259
+ if (index === keys.length - 1) {
260
+ node[key] = value;
261
+ } else {
262
+ // Ensure the key exists and is an object
263
+ node[key] = node[key] || {};
264
+ }
265
+ // Traverse down the tree
266
+ node = node[key];
267
+ });
268
+ return root;
269
+ };
270
+ const CustomMediaInput = (props)=>{
271
+ const { value } = strapiAdmin.useField(props.name);
272
+ const results = value?.results ?? [];
273
+ const meta = value?.meta ?? {
274
+ missingCount: 0
275
+ };
276
+ const { formatMessage } = reactIntl.useIntl();
277
+ const fields = strapiAdmin.useStrapiApp('CustomMediaInput', (state)=>state.fields);
278
+ const MediaLibrary = fields.media;
279
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
280
+ direction: "column",
281
+ gap: 2,
282
+ alignItems: "stretch",
283
+ children: [
284
+ /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Form, {
285
+ method: "PUT",
286
+ disabled: true,
287
+ initialValues: createInitialValuesForPath(props.name, results),
288
+ children: /*#__PURE__*/ jsxRuntime.jsx(MediaLibrary, {
289
+ ...props,
290
+ disabled: true,
291
+ multiple: results.length > 1
292
+ })
293
+ }),
294
+ meta.missingCount > 0 && /*#__PURE__*/ jsxRuntime.jsx(StyledAlert, {
295
+ variant: "warning",
296
+ closeLabel: "Close",
297
+ onClose: ()=>{},
298
+ title: formatMessage({
299
+ id: 'content-manager.history.content.missing-assets.title',
300
+ defaultMessage: '{number, plural, =1 {Missing asset} other {{number} missing assets}}'
301
+ }, {
302
+ number: meta.missingCount
303
+ }),
304
+ children: formatMessage({
305
+ id: 'content-manager.history.content.missing-assets.message',
306
+ defaultMessage: "{number, plural, =1 {It has} other {They have}} been deleted in the Media Library and can't be restored."
307
+ }, {
308
+ number: meta.missingCount
309
+ })
310
+ })
311
+ ]
312
+ });
313
+ };
314
+ /**
315
+ * Checks if the i18n plugin added a label action to the field and modifies it
316
+ * to adapt the wording for the history page.
317
+ */ const getLabelAction = (labelAction)=>{
318
+ if (!/*#__PURE__*/ React__namespace.isValidElement(labelAction)) {
319
+ return labelAction;
320
+ }
321
+ // TODO: find a better way to do this rather than access internals
322
+ const labelActionTitleId = labelAction.props.title.id;
323
+ if (labelActionTitleId === 'i18n.Field.localized') {
324
+ return /*#__PURE__*/ React__namespace.cloneElement(labelAction, {
325
+ ...labelAction.props,
326
+ title: {
327
+ id: 'history.content.localized',
328
+ defaultMessage: 'This value is specific to this locale. If you restore this version, the content will not be replaced for other locales.'
329
+ }
330
+ });
331
+ }
332
+ if (labelActionTitleId === 'i18n.Field.not-localized') {
333
+ return /*#__PURE__*/ React__namespace.cloneElement(labelAction, {
334
+ ...labelAction.props,
335
+ title: {
336
+ id: 'history.content.not-localized',
337
+ 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.'
338
+ }
339
+ });
340
+ }
341
+ // Label action is unrelated to i18n, don't touch it.
342
+ return labelAction;
343
+ };
344
+ /**
345
+ * @internal
346
+ *
347
+ * @description An abstraction around the regular form input renderer designed specifically
348
+ * to be used on the History page in the content-manager. It understands how to render specific
349
+ * inputs within the context of a history version (i.e. relations, media, ignored RBAC, etc...)
350
+ */ const VersionInputRenderer = ({ visible, hint: providedHint, shouldIgnoreRBAC = false, labelAction, ...props })=>{
351
+ const customLabelAction = getLabelAction(labelAction);
352
+ const { formatMessage } = reactIntl.useIntl();
353
+ const version = useHistoryContext('VersionContent', (state)=>state.selectedVersion);
354
+ const configuration = useHistoryContext('VersionContent', (state)=>state.configuration);
355
+ const fieldSizes = hooks.useTypedSelector((state)=>state['content-manager'].app.fieldSizes);
356
+ const { id, components } = index.useDoc();
357
+ const isFormDisabled = strapiAdmin.useForm('InputRenderer', (state)=>state.disabled);
358
+ const isInDynamicZone = Input.useDynamicZone('isInDynamicZone', (state)=>state.isInDynamicZone);
359
+ const canCreateFields = index.useDocumentRBAC('InputRenderer', (rbac)=>rbac.canCreateFields);
360
+ const canReadFields = index.useDocumentRBAC('InputRenderer', (rbac)=>rbac.canReadFields);
361
+ const canUpdateFields = index.useDocumentRBAC('InputRenderer', (rbac)=>rbac.canUpdateFields);
362
+ const canUserAction = index.useDocumentRBAC('InputRenderer', (rbac)=>rbac.canUserAction);
363
+ const editableFields = id ? canUpdateFields : canCreateFields;
364
+ const readableFields = id ? canReadFields : canCreateFields;
365
+ /**
366
+ * Component fields are always readable and editable,
367
+ * however the fields within them may not be.
368
+ */ const canUserReadField = canUserAction(props.name, readableFields, props.type);
369
+ const canUserEditField = canUserAction(props.name, editableFields, props.type);
370
+ const fields = strapiAdmin.useStrapiApp('InputRenderer', (app)=>app.fields);
371
+ const { lazyComponentStore } = Input.useLazyComponents(attributeHasCustomFieldProperty(props.attribute) ? [
372
+ props.attribute.customField
373
+ ] : undefined);
374
+ const hint = Input.useFieldHint(providedHint, props.attribute);
375
+ const { edit: { components: componentsLayout } } = index.useDocLayout();
376
+ if (!visible) {
377
+ return null;
378
+ }
379
+ /**
380
+ * Don't render the field if the user can't read it.
381
+ */ if (!shouldIgnoreRBAC && !canUserReadField && !isInDynamicZone) {
382
+ return /*#__PURE__*/ jsxRuntime.jsx(Input.NotAllowedInput, {
383
+ hint: hint,
384
+ ...props
385
+ });
386
+ }
387
+ const fieldIsDisabled = !canUserEditField && !isInDynamicZone || props.disabled || isFormDisabled;
388
+ /**
389
+ * Attributes found on the current content-type schema cannot be restored. We handle
390
+ * this by displaying a warning alert to the user instead of the input for that field type.
391
+ */ const addedAttributes = version.meta.unknownAttributes.added;
392
+ if (Object.keys(addedAttributes).includes(props.name)) {
393
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
394
+ direction: "column",
395
+ alignItems: "flex-start",
396
+ gap: 1,
397
+ children: [
398
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Label, {
399
+ children: props.label
400
+ }),
401
+ /*#__PURE__*/ jsxRuntime.jsx(StyledAlert, {
402
+ width: "100%",
403
+ closeLabel: "Close",
404
+ onClose: ()=>{},
405
+ variant: "warning",
406
+ title: formatMessage({
407
+ id: 'content-manager.history.content.new-field.title',
408
+ defaultMessage: 'New field'
409
+ }),
410
+ children: formatMessage({
411
+ id: 'content-manager.history.content.new-field.message',
412
+ defaultMessage: "This field didn't exist when this version was saved. If you restore this version, it will be empty."
413
+ })
414
+ })
415
+ ]
416
+ });
417
+ }
418
+ /**
419
+ * Because a custom field has a unique prop but the type could be confused with either
420
+ * the useField hook or the type of the field we need to handle it separately and first.
421
+ */ if (attributeHasCustomFieldProperty(props.attribute)) {
422
+ const CustomInput = lazyComponentStore[props.attribute.customField];
423
+ if (CustomInput) {
424
+ return /*#__PURE__*/ jsxRuntime.jsx(CustomInput, {
425
+ ...props,
426
+ // @ts-expect-error – TODO: fix this type error in the useLazyComponents hook.
427
+ hint: hint,
428
+ labelAction: customLabelAction,
429
+ disabled: fieldIsDisabled
430
+ });
431
+ }
432
+ return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.InputRenderer, {
433
+ ...props,
434
+ hint: hint,
435
+ labelAction: customLabelAction,
436
+ // @ts-expect-error – this workaround lets us display that the custom field is missing.
437
+ type: props.attribute.customField,
438
+ disabled: fieldIsDisabled
439
+ });
440
+ }
441
+ /**
442
+ * Since media fields use a custom input via the upload plugin provided by the useLibrary hook,
443
+ * we need to handle the them before other custom inputs coming from the useLibrary hook.
444
+ */ if (props.type === 'media') {
445
+ return /*#__PURE__*/ jsxRuntime.jsx(CustomMediaInput, {
446
+ ...props,
447
+ labelAction: customLabelAction,
448
+ disabled: fieldIsDisabled
449
+ });
450
+ }
451
+ /**
452
+ * This is where we handle ONLY the fields from the `useLibrary` hook.
453
+ */ const addedInputTypes = Object.keys(fields);
454
+ if (!attributeHasCustomFieldProperty(props.attribute) && addedInputTypes.includes(props.type)) {
455
+ const CustomInput = fields[props.type];
456
+ return /*#__PURE__*/ jsxRuntime.jsx(CustomInput, {
457
+ ...props,
458
+ // @ts-expect-error – TODO: fix this type error in the useLibrary hook.
459
+ hint: hint,
460
+ labelAction: customLabelAction,
461
+ disabled: fieldIsDisabled
462
+ });
463
+ }
464
+ /**
465
+ * These include the content-manager specific fields, failing that we fall back
466
+ * to the more generic form input renderer.
467
+ */ switch(props.type){
468
+ case 'blocks':
469
+ return /*#__PURE__*/ jsxRuntime.jsx(Input.MemoizedBlocksInput, {
470
+ ...props,
471
+ hint: hint,
472
+ type: props.type,
473
+ disabled: fieldIsDisabled
474
+ });
475
+ case 'component':
476
+ const { layout } = componentsLayout[props.attribute.component];
477
+ // Components can only have one panel, so only save the first layout item
478
+ const [remainingFieldsLayout] = getRemaingFieldsLayout({
479
+ layout: [
480
+ layout
481
+ ],
482
+ metadatas: configuration.components[props.attribute.component].metadatas,
483
+ fieldSizes,
484
+ schemaAttributes: components[props.attribute.component].attributes
485
+ });
486
+ return /*#__PURE__*/ jsxRuntime.jsx(Input.MemoizedComponentInput, {
487
+ ...props,
488
+ layout: [
489
+ ...layout,
490
+ ...remainingFieldsLayout || []
491
+ ],
492
+ hint: hint,
493
+ labelAction: customLabelAction,
494
+ disabled: fieldIsDisabled,
495
+ children: (inputProps)=>/*#__PURE__*/ jsxRuntime.jsx(VersionInputRenderer, {
496
+ ...inputProps,
497
+ shouldIgnoreRBAC: true
498
+ })
499
+ });
500
+ case 'dynamiczone':
501
+ return /*#__PURE__*/ jsxRuntime.jsx(Input.DynamicZone, {
502
+ ...props,
503
+ hint: hint,
504
+ labelAction: customLabelAction,
505
+ disabled: fieldIsDisabled,
506
+ children: (inputProps)=>/*#__PURE__*/ jsxRuntime.jsx(VersionInputRenderer, {
507
+ ...inputProps,
508
+ shouldIgnoreRBAC: true
509
+ })
510
+ });
511
+ case 'relation':
512
+ return /*#__PURE__*/ jsxRuntime.jsx(CustomRelationInput, {
513
+ ...props,
514
+ hint: hint,
515
+ labelAction: customLabelAction,
516
+ disabled: fieldIsDisabled
517
+ });
518
+ case 'richtext':
519
+ return /*#__PURE__*/ jsxRuntime.jsx(Input.MemoizedWysiwyg, {
520
+ ...props,
521
+ hint: hint,
522
+ type: props.type,
523
+ labelAction: customLabelAction,
524
+ disabled: fieldIsDisabled
525
+ });
526
+ case 'uid':
527
+ return /*#__PURE__*/ jsxRuntime.jsx(Input.MemoizedUIDInput, {
528
+ ...props,
529
+ hint: hint,
530
+ type: props.type,
531
+ labelAction: customLabelAction,
532
+ disabled: fieldIsDisabled
533
+ });
534
+ /**
535
+ * Enumerations are a special case because they require options.
536
+ */ case 'enumeration':
537
+ return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.InputRenderer, {
538
+ ...props,
539
+ hint: hint,
540
+ labelAction: customLabelAction,
541
+ options: props.attribute.enum.map((value)=>({
542
+ value
543
+ })),
544
+ // @ts-expect-error – Temp workaround so we don't forget custom-fields don't work!
545
+ type: props.customField ? 'custom-field' : props.type,
546
+ disabled: fieldIsDisabled
547
+ });
548
+ default:
549
+ // These props are not needed for the generic form input renderer.
550
+ const { unique: _unique, mainField: _mainField, ...restProps } = props;
551
+ return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.InputRenderer, {
552
+ ...restProps,
553
+ hint: hint,
554
+ labelAction: customLabelAction,
555
+ // @ts-expect-error – Temp workaround so we don't forget custom-fields don't work!
556
+ type: props.customField ? 'custom-field' : props.type,
557
+ disabled: fieldIsDisabled
558
+ });
559
+ }
560
+ };
561
+ const attributeHasCustomFieldProperty = (attribute)=>'customField' in attribute && typeof attribute.customField === 'string';
562
+
563
+ const createLayoutFromFields = (fields)=>{
564
+ return fields.reduce((rows, field)=>{
565
+ if (field.type === 'dynamiczone') {
566
+ // Dynamic zones take up all the columns in a row
567
+ rows.push([
568
+ field
569
+ ]);
570
+ return rows;
571
+ }
572
+ if (!rows[rows.length - 1]) {
573
+ // Create a new row if there isn't one available
574
+ rows.push([]);
575
+ }
576
+ // Push fields to the current row, they wrap and handle their own column size
577
+ rows[rows.length - 1].push(field);
578
+ return rows;
579
+ }, [])// Map the rows to panels
580
+ .map((row)=>[
581
+ row
582
+ ]);
583
+ };
584
+ /**
585
+ * Build a layout for the fields that are were deleted from the edit view layout
586
+ * via the configure the view page. This layout will be merged with the main one.
587
+ * Those fields would be restored if the user restores the history version, which is why it's
588
+ * important to show them, even if they're not in the normal layout.
589
+ */ function getRemaingFieldsLayout({ layout, metadatas, schemaAttributes, fieldSizes }) {
590
+ const fieldsInLayout = layout.flatMap((panel)=>panel.flatMap((row)=>row.flatMap((field)=>field.name)));
591
+ const remainingFields = Object.entries(metadatas).reduce((currentRemainingFields, [name, field])=>{
592
+ // Make sure we do not fields that are not visible, e.g. "id"
593
+ if (!fieldsInLayout.includes(name) && field.edit.visible === true) {
594
+ const attribute = schemaAttributes[name];
595
+ // @ts-expect-error not sure why attribute causes type error
596
+ currentRemainingFields.push({
597
+ attribute,
598
+ type: attribute.type,
599
+ visible: true,
600
+ disabled: true,
601
+ label: field.edit.label || name,
602
+ name: name,
603
+ size: fieldSizes[attribute.type].default ?? 12
604
+ });
605
+ }
606
+ return currentRemainingFields;
607
+ }, []);
608
+ return createLayoutFromFields(remainingFields);
609
+ }
610
+ /* -------------------------------------------------------------------------------------------------
611
+ * FormPanel
612
+ * -----------------------------------------------------------------------------------------------*/ const FormPanel = ({ panel })=>{
613
+ if (panel.some((row)=>row.some((field)=>field.type === 'dynamiczone'))) {
614
+ const [row] = panel;
615
+ const [field] = row;
616
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Root, {
617
+ gap: 4,
618
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Item, {
619
+ col: 12,
620
+ s: 12,
621
+ xs: 12,
622
+ direction: "column",
623
+ alignItems: "stretch",
624
+ children: /*#__PURE__*/ jsxRuntime.jsx(VersionInputRenderer, {
625
+ ...field
626
+ })
627
+ })
628
+ }, field.name);
629
+ }
630
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
631
+ hasRadius: true,
632
+ background: "neutral0",
633
+ shadow: "tableShadow",
634
+ paddingLeft: 6,
635
+ paddingRight: 6,
636
+ paddingTop: 6,
637
+ paddingBottom: 6,
638
+ borderColor: "neutral150",
639
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
640
+ direction: "column",
641
+ alignItems: "stretch",
642
+ gap: 6,
643
+ children: panel.map((row, gridRowIndex)=>/*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Root, {
644
+ gap: 4,
645
+ children: row.map(({ size, ...field })=>{
646
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Item, {
647
+ col: size,
648
+ s: 12,
649
+ xs: 12,
650
+ direction: "column",
651
+ alignItems: "stretch",
652
+ children: /*#__PURE__*/ jsxRuntime.jsx(VersionInputRenderer, {
653
+ ...field
654
+ })
655
+ }, field.name);
656
+ })
657
+ }, gridRowIndex))
658
+ })
659
+ });
660
+ };
661
+ const VersionContent = ()=>{
662
+ const { formatMessage } = reactIntl.useIntl();
663
+ const { fieldSizes } = hooks.useTypedSelector((state)=>state['content-manager'].app);
664
+ const version = useHistoryContext('VersionContent', (state)=>state.selectedVersion);
665
+ const layout = useHistoryContext('VersionContent', (state)=>state.layout);
666
+ const configuration = useHistoryContext('VersionContent', (state)=>state.configuration);
667
+ const schema = useHistoryContext('VersionContent', (state)=>state.schema);
668
+ // Build a layout for the unknown fields section
669
+ const removedAttributes = version.meta.unknownAttributes.removed;
670
+ const removedAttributesAsFields = Object.entries(removedAttributes).map(([attributeName, attribute])=>{
671
+ const field = {
672
+ attribute,
673
+ shouldIgnoreRBAC: true,
674
+ type: attribute.type,
675
+ visible: true,
676
+ disabled: true,
677
+ label: attributeName,
678
+ name: attributeName,
679
+ size: fieldSizes[attribute.type].default ?? 12
680
+ };
681
+ return field;
682
+ });
683
+ const unknownFieldsLayout = createLayoutFromFields(removedAttributesAsFields);
684
+ // Build a layout for the fields that are were deleted from the layout
685
+ const remainingFieldsLayout = getRemaingFieldsLayout({
686
+ metadatas: configuration.contentType.metadatas,
687
+ layout,
688
+ schemaAttributes: schema.attributes,
689
+ fieldSizes
690
+ });
691
+ const { components } = index.useDoc();
692
+ /**
693
+ * Transform the data before passing it to the form so that each field
694
+ * has a uniquely generated key
695
+ */ const transformedData = React__namespace.useMemo(()=>{
696
+ const transform = (schemaAttributes, components = {})=>(document)=>{
697
+ const schema = {
698
+ attributes: schemaAttributes
699
+ };
700
+ const transformations = pipe(index.removeFieldsThatDontExistOnSchema(schema), index.prepareTempKeys(schema, components));
701
+ return transformations(document);
702
+ };
703
+ return transform(version.schema, components)(version.data);
704
+ }, [
705
+ components,
706
+ version.data,
707
+ version.schema
708
+ ]);
709
+ return /*#__PURE__*/ jsxRuntime.jsxs(strapiAdmin.Layouts.Content, {
710
+ children: [
711
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
712
+ paddingBottom: 8,
713
+ children: /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Form, {
714
+ disabled: true,
715
+ method: "PUT",
716
+ initialValues: transformedData,
717
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
718
+ direction: "column",
719
+ alignItems: "stretch",
720
+ gap: 6,
721
+ position: "relative",
722
+ children: [
723
+ ...layout,
724
+ ...remainingFieldsLayout
725
+ ].map((panel, index)=>{
726
+ return /*#__PURE__*/ jsxRuntime.jsx(FormPanel, {
727
+ panel: panel
728
+ }, index);
729
+ })
730
+ })
731
+ })
732
+ }),
733
+ removedAttributesAsFields.length > 0 && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
734
+ children: [
735
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Divider, {}),
736
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Box, {
737
+ paddingTop: 8,
738
+ children: [
739
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
740
+ direction: "column",
741
+ alignItems: "flex-start",
742
+ paddingBottom: 6,
743
+ gap: 1,
744
+ children: [
745
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
746
+ variant: "delta",
747
+ children: formatMessage({
748
+ id: 'content-manager.history.content.unknown-fields.title',
749
+ defaultMessage: 'Unknown fields'
750
+ })
751
+ }),
752
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
753
+ variant: "pi",
754
+ children: formatMessage({
755
+ id: 'content-manager.history.content.unknown-fields.message',
756
+ defaultMessage: 'These fields have been deleted or renamed in the Content-Type Builder. <b>These fields will not be restored.</b>'
757
+ }, {
758
+ b: (chunks)=>/*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
759
+ variant: "pi",
760
+ fontWeight: "bold",
761
+ children: chunks
762
+ })
763
+ })
764
+ })
765
+ ]
766
+ }),
767
+ /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Form, {
768
+ disabled: true,
769
+ method: "PUT",
770
+ initialValues: version.data,
771
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
772
+ direction: "column",
773
+ alignItems: "stretch",
774
+ gap: 6,
775
+ position: "relative",
776
+ children: unknownFieldsLayout.map((panel, index)=>{
777
+ return /*#__PURE__*/ jsxRuntime.jsx(FormPanel, {
778
+ panel: panel
779
+ }, index);
780
+ })
781
+ })
782
+ })
783
+ ]
784
+ })
785
+ ]
786
+ })
787
+ ]
788
+ });
789
+ };
790
+
791
+ const historyVersionsApi = index.contentManagerApi.injectEndpoints({
792
+ endpoints: (builder)=>({
793
+ getHistoryVersions: builder.query({
794
+ query (params) {
795
+ return {
796
+ url: `/content-manager/history-versions`,
797
+ method: 'GET',
798
+ config: {
799
+ params
800
+ }
801
+ };
802
+ },
803
+ providesTags: [
804
+ 'HistoryVersion'
805
+ ]
806
+ }),
807
+ restoreVersion: builder.mutation({
808
+ query ({ params, body }) {
809
+ return {
810
+ url: `/content-manager/history-versions/${params.versionId}/restore`,
811
+ method: 'PUT',
812
+ data: body
813
+ };
814
+ },
815
+ invalidatesTags: (_res, _error, { documentId, collectionType, params })=>{
816
+ return [
817
+ 'HistoryVersion',
818
+ {
819
+ type: 'Document',
820
+ id: collectionType === index.COLLECTION_TYPES ? `${params.contentType}_${documentId}` : params.contentType
821
+ }
822
+ ];
823
+ }
824
+ })
825
+ })
826
+ });
827
+ const { useGetHistoryVersionsQuery, useRestoreVersionMutation } = historyVersionsApi;
828
+
829
+ const VersionHeader = ({ headerId })=>{
830
+ const [isConfirmDialogOpen, setIsConfirmDialogOpen] = React__namespace.useState(false);
831
+ const navigate = reactRouterDom.useNavigate();
832
+ const { formatMessage, formatDate } = reactIntl.useIntl();
833
+ const { trackUsage } = strapiAdmin.useTracking();
834
+ const { toggleNotification } = strapiAdmin.useNotification();
835
+ const [{ query }] = strapiAdmin.useQueryParams();
836
+ const { collectionType, slug } = reactRouterDom.useParams();
837
+ const [restoreVersion, { isLoading }] = useRestoreVersionMutation();
838
+ const { allowedActions } = strapiAdmin.useRBAC(index.PERMISSIONS.map((action)=>({
839
+ action,
840
+ subject: slug
841
+ })));
842
+ const version = useHistoryContext('VersionHeader', (state)=>state.selectedVersion);
843
+ const mainField = useHistoryContext('VersionHeader', (state)=>state.mainField);
844
+ const schema = useHistoryContext('VersionHeader', (state)=>state.schema);
845
+ const isCurrentVersion = useHistoryContext('VersionHeader', (state)=>state.page === 1 && state.versions.data[0].id === state.selectedVersion.id);
846
+ const mainFieldValue = version.data[mainField];
847
+ const getNextNavigation = ()=>{
848
+ const pluginsQueryParams = qs.stringify({
849
+ plugins: query.plugins
850
+ }, {
851
+ encode: false
852
+ });
853
+ return {
854
+ pathname: '..',
855
+ search: pluginsQueryParams
856
+ };
857
+ };
858
+ const handleRestore = async ()=>{
859
+ try {
860
+ const response = await restoreVersion({
861
+ documentId: version.relatedDocumentId,
862
+ collectionType,
863
+ params: {
864
+ versionId: version.id,
865
+ contentType: version.contentType
866
+ },
867
+ body: {
868
+ contentType: version.contentType
869
+ }
870
+ });
871
+ if ('data' in response) {
872
+ navigate(getNextNavigation(), {
873
+ relative: 'path'
874
+ });
875
+ toggleNotification({
876
+ type: 'success',
877
+ title: formatMessage({
878
+ id: 'content-manager.restore.success.title',
879
+ defaultMessage: 'Version restored.'
880
+ }),
881
+ message: formatMessage({
882
+ id: 'content-manager.restore.success.message',
883
+ defaultMessage: 'A past version of the content was restored.'
884
+ })
885
+ });
886
+ trackUsage('didRestoreHistoryVersion');
887
+ }
888
+ if ('error' in response) {
889
+ toggleNotification({
890
+ type: 'danger',
891
+ message: formatMessage({
892
+ id: 'content-manager.history.restore.error.message',
893
+ defaultMessage: 'Could not restore version.'
894
+ })
895
+ });
896
+ }
897
+ } catch (error) {
898
+ toggleNotification({
899
+ type: 'danger',
900
+ message: formatMessage({
901
+ id: 'notification.error',
902
+ defaultMessage: 'An error occurred'
903
+ })
904
+ });
905
+ }
906
+ };
907
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Dialog.Root, {
908
+ open: isConfirmDialogOpen,
909
+ onOpenChange: setIsConfirmDialogOpen,
910
+ children: [
911
+ /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Layouts.BaseHeader, {
912
+ id: headerId,
913
+ title: formatDate(new Date(version.createdAt), {
914
+ year: 'numeric',
915
+ month: 'numeric',
916
+ day: 'numeric',
917
+ hour: 'numeric',
918
+ minute: 'numeric'
919
+ }),
920
+ subtitle: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
921
+ variant: "epsilon",
922
+ textColor: "neutral600",
923
+ children: formatMessage({
924
+ id: 'content-manager.history.version.subtitle',
925
+ defaultMessage: '{hasLocale, select, true {{subtitle}, in {locale}} other {{subtitle}}}'
926
+ }, {
927
+ hasLocale: Boolean(version.locale),
928
+ subtitle: `${mainFieldValue || ''} (${schema.info.singularName})`.trim(),
929
+ locale: version.locale?.name
930
+ })
931
+ }),
932
+ navigationAction: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Link, {
933
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(Icons.ArrowLeft, {}),
934
+ tag: reactRouterDom.NavLink,
935
+ to: getNextNavigation(),
936
+ relative: "path",
937
+ isExternal: false,
938
+ children: formatMessage({
939
+ id: 'global.back',
940
+ defaultMessage: 'Back'
941
+ })
942
+ }),
943
+ sticky: false,
944
+ primaryAction: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Dialog.Trigger, {
945
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
946
+ disabled: !allowedActions.canUpdate || isCurrentVersion,
947
+ onClick: ()=>{
948
+ setIsConfirmDialogOpen(true);
949
+ },
950
+ children: formatMessage({
951
+ id: 'content-manager.history.restore.confirm.button',
952
+ defaultMessage: 'Restore'
953
+ })
954
+ })
955
+ })
956
+ }),
957
+ /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.ConfirmDialog, {
958
+ onConfirm: handleRestore,
959
+ endAction: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
960
+ variant: "secondary",
961
+ onClick: handleRestore,
962
+ loading: isLoading,
963
+ children: formatMessage({
964
+ id: 'content-manager.history.restore.confirm.button',
965
+ defaultMessage: 'Restore'
966
+ })
967
+ }),
968
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
969
+ direction: "column",
970
+ alignItems: "center",
971
+ justifyContent: "center",
972
+ gap: 2,
973
+ textAlign: "center",
974
+ children: [
975
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
976
+ justifyContent: "center",
977
+ children: /*#__PURE__*/ jsxRuntime.jsx(Icons.WarningCircle, {
978
+ width: "24px",
979
+ height: "24px",
980
+ fill: "danger600"
981
+ })
982
+ }),
983
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
984
+ children: formatMessage({
985
+ id: 'content-manager.history.restore.confirm.title',
986
+ defaultMessage: 'Are you sure you want to restore this version?'
987
+ })
988
+ }),
989
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
990
+ children: formatMessage({
991
+ id: 'content-manager.history.restore.confirm.message',
992
+ defaultMessage: "{isDraft, select, true {The restored content will override your draft.} other {The restored content won't be published, it will override the draft and be saved as pending changes. You'll be able to publish the changes at anytime.}}"
993
+ }, {
994
+ isDraft: version.status === 'draft'
995
+ })
996
+ })
997
+ ]
998
+ })
999
+ })
1000
+ ]
1001
+ });
1002
+ };
1003
+
1004
+ /* -------------------------------------------------------------------------------------------------
1005
+ * BlueText
1006
+ * -----------------------------------------------------------------------------------------------*/ const BlueText = (children)=>/*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
1007
+ textColor: "primary600",
1008
+ variant: "pi",
1009
+ children: children
1010
+ });
1011
+ const VersionCard = ({ version, isCurrent })=>{
1012
+ const { formatDate, formatMessage } = reactIntl.useIntl();
1013
+ const [{ query }] = strapiAdmin.useQueryParams();
1014
+ const isActive = query.id === version.id.toString();
1015
+ const author = version.createdBy && index.getDisplayName(version.createdBy);
1016
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
1017
+ direction: "column",
1018
+ alignItems: "flex-start",
1019
+ gap: 3,
1020
+ hasRadius: true,
1021
+ borderWidth: "1px",
1022
+ borderStyle: "solid",
1023
+ borderColor: isActive ? 'primary600' : 'neutral200',
1024
+ color: "neutral800",
1025
+ padding: 5,
1026
+ tag: reactRouterDom.Link,
1027
+ to: `?${qs.stringify({
1028
+ ...query,
1029
+ id: version.id
1030
+ })}`,
1031
+ style: {
1032
+ textDecoration: 'none'
1033
+ },
1034
+ children: [
1035
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
1036
+ direction: "column",
1037
+ gap: 1,
1038
+ alignItems: "flex-start",
1039
+ children: [
1040
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
1041
+ tag: "h3",
1042
+ fontWeight: "semiBold",
1043
+ children: formatDate(version.createdAt, {
1044
+ day: 'numeric',
1045
+ month: 'numeric',
1046
+ year: 'numeric',
1047
+ hour: '2-digit',
1048
+ minute: '2-digit'
1049
+ })
1050
+ }),
1051
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
1052
+ tag: "p",
1053
+ variant: "pi",
1054
+ textColor: "neutral600",
1055
+ children: formatMessage({
1056
+ id: 'content-manager.history.sidebar.versionDescription',
1057
+ defaultMessage: '{distanceToNow}{isAnonymous, select, true {} other { by {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}'
1058
+ }, {
1059
+ distanceToNow: /*#__PURE__*/ jsxRuntime.jsx(index.RelativeTime, {
1060
+ timestamp: new Date(version.createdAt)
1061
+ }),
1062
+ author,
1063
+ isAnonymous: !Boolean(version.createdBy),
1064
+ isCurrent,
1065
+ b: BlueText
1066
+ })
1067
+ })
1068
+ ]
1069
+ }),
1070
+ version.status && /*#__PURE__*/ jsxRuntime.jsx(index.DocumentStatus, {
1071
+ status: version.status,
1072
+ size: "XS"
1073
+ })
1074
+ ]
1075
+ });
1076
+ };
1077
+ const PaginationButton = ({ page, children })=>{
1078
+ const [{ query }] = strapiAdmin.useQueryParams();
1079
+ // Remove the id from the pagination link, so that the history page can redirect
1080
+ // to the id of the first history version in the new page once it's loaded
1081
+ const { id: _id, ...queryRest } = query;
1082
+ return /*#__PURE__*/ jsxRuntime.jsx(reactRouterDom.Link, {
1083
+ to: {
1084
+ search: qs.stringify({
1085
+ ...queryRest,
1086
+ page
1087
+ })
1088
+ },
1089
+ style: {
1090
+ textDecoration: 'none'
1091
+ },
1092
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
1093
+ variant: "omega",
1094
+ textColor: "primary600",
1095
+ children: children
1096
+ })
1097
+ });
1098
+ };
1099
+ /* -------------------------------------------------------------------------------------------------
1100
+ * VersionsList
1101
+ * -----------------------------------------------------------------------------------------------*/ const VersionsList = ()=>{
1102
+ const { formatMessage } = reactIntl.useIntl();
1103
+ const { versions, page } = useHistoryContext('VersionsList', (state)=>({
1104
+ versions: state.versions,
1105
+ page: state.page
1106
+ }));
1107
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
1108
+ shrink: 0,
1109
+ direction: "column",
1110
+ alignItems: "stretch",
1111
+ width: "320px",
1112
+ height: "100vh",
1113
+ background: "neutral0",
1114
+ borderColor: "neutral200",
1115
+ borderWidth: "0 0 0 1px",
1116
+ borderStyle: "solid",
1117
+ tag: "aside",
1118
+ children: [
1119
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
1120
+ direction: "row",
1121
+ justifyContent: "space-between",
1122
+ padding: 4,
1123
+ borderColor: "neutral200",
1124
+ borderWidth: "0 0 1px",
1125
+ borderStyle: "solid",
1126
+ tag: "header",
1127
+ children: [
1128
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
1129
+ tag: "h2",
1130
+ variant: "omega",
1131
+ fontWeight: "semiBold",
1132
+ children: formatMessage({
1133
+ id: 'content-manager.history.sidebar.title',
1134
+ defaultMessage: 'Versions'
1135
+ })
1136
+ }),
1137
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
1138
+ background: "neutral150",
1139
+ hasRadius: true,
1140
+ padding: 1,
1141
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
1142
+ variant: "sigma",
1143
+ textColor: "neutral600",
1144
+ children: versions.meta.pagination.total
1145
+ })
1146
+ })
1147
+ ]
1148
+ }),
1149
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Box, {
1150
+ flex: 1,
1151
+ overflow: "auto",
1152
+ children: [
1153
+ versions.meta.pagination.page > 1 && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
1154
+ paddingTop: 4,
1155
+ textAlign: "center",
1156
+ children: /*#__PURE__*/ jsxRuntime.jsx(PaginationButton, {
1157
+ page: page - 1,
1158
+ children: formatMessage({
1159
+ id: 'content-manager.history.sidebar.show-newer',
1160
+ defaultMessage: 'Show newer versions'
1161
+ })
1162
+ })
1163
+ }),
1164
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
1165
+ direction: "column",
1166
+ gap: 3,
1167
+ padding: 4,
1168
+ tag: "ul",
1169
+ alignItems: "stretch",
1170
+ children: versions.data.map((version, index)=>/*#__PURE__*/ jsxRuntime.jsx("li", {
1171
+ "aria-label": formatMessage({
1172
+ id: 'content-manager.history.sidebar.title.version-card.aria-label',
1173
+ defaultMessage: 'Version card'
1174
+ }),
1175
+ children: /*#__PURE__*/ jsxRuntime.jsx(VersionCard, {
1176
+ version: version,
1177
+ isCurrent: page === 1 && index === 0
1178
+ })
1179
+ }, version.id))
1180
+ }),
1181
+ versions.meta.pagination.page < versions.meta.pagination.pageCount && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
1182
+ paddingBottom: 4,
1183
+ textAlign: "center",
1184
+ children: /*#__PURE__*/ jsxRuntime.jsx(PaginationButton, {
1185
+ page: page + 1,
1186
+ children: formatMessage({
1187
+ id: 'content-manager.history.sidebar.show-older',
1188
+ defaultMessage: 'Show older versions'
1189
+ })
1190
+ })
1191
+ })
1192
+ ]
1193
+ })
1194
+ ]
1195
+ });
1196
+ };
1197
+
1198
+ const [HistoryProvider, useHistoryContext] = strapiAdmin.createContext('HistoryPage');
1199
+ /* -------------------------------------------------------------------------------------------------
1200
+ * HistoryPage
1201
+ * -----------------------------------------------------------------------------------------------*/ const HistoryPage = ()=>{
1202
+ const headerId = React__namespace.useId();
1203
+ const { formatMessage } = reactIntl.useIntl();
1204
+ const { slug, id: documentId, collectionType } = reactRouterDom.useParams();
1205
+ const { isLoading: isLoadingDocument, schema } = index.useDocument({
1206
+ collectionType: collectionType,
1207
+ model: slug
1208
+ });
1209
+ const { isLoading: isLoadingLayout, edit: { layout, settings: { displayName, mainField } } } = index.useDocumentLayout(slug);
1210
+ const { data: configuration, isLoading: isLoadingConfiguration } = index.useGetContentTypeConfigurationQuery(slug);
1211
+ // Parse state from query params
1212
+ const [{ query }] = strapiAdmin.useQueryParams();
1213
+ const { id: selectedVersionId, ...queryWithoutId } = query;
1214
+ const validQueryParamsWithoutId = index.buildValidParams(queryWithoutId);
1215
+ const page = validQueryParamsWithoutId.page ? Number(validQueryParamsWithoutId.page) : 1;
1216
+ const versionsResponse = useGetHistoryVersionsQuery({
1217
+ contentType: slug,
1218
+ ...documentId ? {
1219
+ documentId
1220
+ } : {},
1221
+ // Omit id since it's not needed by the endpoint and caused extra refetches
1222
+ ...validQueryParamsWithoutId
1223
+ }, {
1224
+ refetchOnMountOrArgChange: true
1225
+ });
1226
+ /**
1227
+ * When the page is first mounted, if there's already data in the cache, RTK has a fullfilled
1228
+ * status for the first render, right before it triggers a new request. This means the code
1229
+ * briefly reaches the part that redirects to the first history version (if none is set).
1230
+ * But since that data is stale, that means auto-selecting a version that may not be the most
1231
+ * recent. To avoid this, we identify through requestId if the query is stale despite the
1232
+ * fullfilled status, and show the loader in that case.
1233
+ * This means we essentially don't want cache. We always refetch when the page mounts, and
1234
+ * we always show the loader until we have the most recent data. That's fine for this page.
1235
+ */ const initialRequestId = React__namespace.useRef(versionsResponse.requestId);
1236
+ const isStaleRequest = versionsResponse.requestId === initialRequestId.current;
1237
+ /**
1238
+ * Ensure that we have the necessary data to render the page:
1239
+ * - slug for single types
1240
+ * - slug _and_ documentId for collection types
1241
+ */ if (!slug || collectionType === index.COLLECTION_TYPES && !documentId) {
1242
+ return /*#__PURE__*/ jsxRuntime.jsx(reactRouterDom.Navigate, {
1243
+ to: "/content-manager"
1244
+ });
1245
+ }
1246
+ if (isLoadingDocument || isLoadingLayout || versionsResponse.isFetching || isStaleRequest || isLoadingConfiguration) {
1247
+ return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
1248
+ }
1249
+ // It was a success, handle empty data
1250
+ if (!versionsResponse.isError && !versionsResponse.data?.data?.length) {
1251
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
1252
+ children: /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.NoData, {
1253
+ action: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Link, {
1254
+ tag: reactRouterDom.NavLink,
1255
+ to: `/content-manager/${collectionType}/${slug}${documentId ? `/${documentId}` : ''}`,
1256
+ children: formatMessage({
1257
+ id: 'global.back',
1258
+ defaultMessage: 'Back'
1259
+ })
1260
+ })
1261
+ })
1262
+ });
1263
+ }
1264
+ // We have data, handle selected version
1265
+ if (versionsResponse.data?.data?.length && !selectedVersionId) {
1266
+ return /*#__PURE__*/ jsxRuntime.jsx(reactRouterDom.Navigate, {
1267
+ to: {
1268
+ search: qs.stringify({
1269
+ ...query,
1270
+ id: versionsResponse.data.data[0].id
1271
+ })
1272
+ },
1273
+ replace: true
1274
+ });
1275
+ }
1276
+ const selectedVersion = versionsResponse.data?.data?.find((version)=>version.id.toString() === selectedVersionId);
1277
+ if (versionsResponse.isError || !layout || !schema || !selectedVersion || !configuration || // This should not happen as it's covered by versionsResponse.isError, but we need it for TS
1278
+ versionsResponse.data.error) {
1279
+ return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
1280
+ }
1281
+ return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1282
+ children: [
1283
+ /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Title, {
1284
+ children: formatMessage({
1285
+ id: 'content-manager.history.page-title',
1286
+ defaultMessage: '{contentType} history'
1287
+ }, {
1288
+ contentType: displayName
1289
+ })
1290
+ }),
1291
+ /*#__PURE__*/ jsxRuntime.jsx(HistoryProvider, {
1292
+ contentType: slug,
1293
+ id: documentId,
1294
+ schema: schema,
1295
+ layout: layout,
1296
+ configuration: configuration,
1297
+ selectedVersion: selectedVersion,
1298
+ versions: versionsResponse.data,
1299
+ page: page,
1300
+ mainField: mainField,
1301
+ children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
1302
+ direction: "row",
1303
+ alignItems: "flex-start",
1304
+ children: [
1305
+ /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Main, {
1306
+ grow: 1,
1307
+ height: "100vh",
1308
+ background: "neutral100",
1309
+ paddingBottom: 6,
1310
+ overflow: "auto",
1311
+ labelledBy: headerId,
1312
+ children: [
1313
+ /*#__PURE__*/ jsxRuntime.jsx(VersionHeader, {
1314
+ headerId: headerId
1315
+ }),
1316
+ /*#__PURE__*/ jsxRuntime.jsx(index.DocumentContextProvider, {
1317
+ initialDocument: {
1318
+ documentId: documentId || '',
1319
+ model: slug,
1320
+ collectionType: collectionType || ''
1321
+ },
1322
+ children: /*#__PURE__*/ jsxRuntime.jsx(VersionContent, {})
1323
+ })
1324
+ ]
1325
+ }),
1326
+ /*#__PURE__*/ jsxRuntime.jsx(VersionsList, {})
1327
+ ]
1328
+ })
1329
+ })
1330
+ ]
1331
+ });
1332
+ };
1333
+ /* -------------------------------------------------------------------------------------------------
1334
+ * ProtectedHistoryPage
1335
+ * -----------------------------------------------------------------------------------------------*/ const ProtectedHistoryPageImpl = ()=>{
1336
+ const { slug } = reactRouterDom.useParams();
1337
+ const { permissions = [], isLoading, error } = strapiAdmin.useRBAC(index.PERMISSIONS.map((action)=>({
1338
+ action,
1339
+ subject: slug
1340
+ })));
1341
+ if (isLoading) {
1342
+ return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
1343
+ }
1344
+ if (error || !slug) {
1345
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
1346
+ height: "100vh",
1347
+ width: "100vw",
1348
+ position: "fixed",
1349
+ top: 0,
1350
+ left: 0,
1351
+ zIndex: 2,
1352
+ background: "neutral0",
1353
+ children: /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {})
1354
+ });
1355
+ }
1356
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
1357
+ height: "100vh",
1358
+ width: "100vw",
1359
+ position: "fixed",
1360
+ top: 0,
1361
+ left: 0,
1362
+ zIndex: 2,
1363
+ background: "neutral0",
1364
+ children: /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Protect, {
1365
+ permissions: permissions,
1366
+ children: ({ permissions })=>/*#__PURE__*/ jsxRuntime.jsx(index.DocumentRBAC, {
1367
+ permissions: permissions,
1368
+ children: /*#__PURE__*/ jsxRuntime.jsx(HistoryPage, {})
1369
+ })
1370
+ })
1371
+ });
1372
+ };
1373
+ const ProtectedHistoryPage = ()=>{
1374
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Portal, {
1375
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.FocusTrap, {
1376
+ children: /*#__PURE__*/ jsxRuntime.jsx(ProtectedHistoryPageImpl, {})
1377
+ })
1378
+ });
1379
+ };
1380
+
1381
+ exports.HistoryProvider = HistoryProvider;
1382
+ exports.ProtectedHistoryPage = ProtectedHistoryPage;
1383
+ exports.useHistoryContext = useHistoryContext;
1384
+ //# sourceMappingURL=History-CEoOna4w.js.map