@strapi/content-manager 0.0.0-experimental.3218535c8b12e654be4191f9c36c07b43861b437 → 0.0.0-experimental.321ce9aec15b73c35cde3a2802d0ff2aed17e1a1

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