@strapi/content-manager 0.0.0-experimental.d1602f22dc638a4c3c5084965fd6126fff5e9d4f → 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 (236) hide show
  1. package/dist/admin/chunks/{CardDragPreview-DwuraT0K.js → CardDragPreview-DwuraT0K.mjs} +1 -1
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  3. package/dist/admin/chunks/{ComponentConfigurationPage-DXwOtpq1.js → ComponentConfigurationPage-CGn9IYeg.js} +6 -6
  4. package/dist/admin/chunks/{ComponentConfigurationPage-DXwOtpq1.js.map → ComponentConfigurationPage-CGn9IYeg.js.map} +1 -1
  5. package/dist/admin/chunks/{ComponentConfigurationPage-DhYZp4nN.js → ComponentConfigurationPage-DgYK4xW6.mjs} +9 -9
  6. package/dist/admin/chunks/ComponentConfigurationPage-DgYK4xW6.mjs.map +1 -0
  7. package/dist/admin/chunks/{ComponentIcon-BZcTc4rj.js → ComponentIcon-BZcTc4rj.mjs} +1 -1
  8. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  9. package/dist/admin/chunks/{EditConfigurationPage-D0Ng758X.js → EditConfigurationPage-7w_-4jF4.js} +6 -6
  10. package/dist/admin/chunks/{EditConfigurationPage-D0Ng758X.js.map → EditConfigurationPage-7w_-4jF4.js.map} +1 -1
  11. package/dist/admin/chunks/{EditConfigurationPage-DDuPch5d.js → EditConfigurationPage-C05SwwH-.mjs} +9 -9
  12. package/dist/admin/chunks/EditConfigurationPage-C05SwwH-.mjs.map +1 -0
  13. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs +318 -0
  14. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs.map +1 -0
  15. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js +341 -0
  16. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js.map +1 -0
  17. package/dist/admin/chunks/{FieldTypeIcon-BY6MrVF4.js → FieldTypeIcon-BY6MrVF4.mjs} +1 -1
  18. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  19. package/dist/admin/chunks/{Form-BEqiuSvQ.js → Form-BqNYRsCb.js} +5 -5
  20. package/dist/admin/chunks/{Form-BEqiuSvQ.js.map → Form-BqNYRsCb.js.map} +1 -1
  21. package/dist/admin/chunks/{Form-CZmB6JIg.js → Form-DaEnqAeV.mjs} +5 -5
  22. package/dist/admin/chunks/Form-DaEnqAeV.mjs.map +1 -0
  23. package/dist/admin/chunks/{History-CPYXgxkS.js → History-B7dGNfmx.mjs} +68 -15
  24. package/dist/admin/chunks/History-B7dGNfmx.mjs.map +1 -0
  25. package/dist/admin/chunks/{History-BlLKDZSw.js → History-CEoOna4w.js} +67 -14
  26. package/dist/admin/chunks/History-CEoOna4w.js.map +1 -0
  27. package/dist/admin/chunks/{Input-CLX3C5DI.js → Input-B3QUS9rv.mjs} +2273 -511
  28. package/dist/admin/chunks/Input-B3QUS9rv.mjs.map +1 -0
  29. package/dist/admin/chunks/{Input-DiR2Xfa7.js → Input-B8I0b9aD.js} +2284 -519
  30. package/dist/admin/chunks/Input-B8I0b9aD.js.map +1 -0
  31. package/dist/admin/chunks/{ListConfigurationPage-DdTp-HxB.js → ListConfigurationPage-BbjJweN-.js} +7 -7
  32. package/dist/admin/chunks/{ListConfigurationPage-DdTp-HxB.js.map → ListConfigurationPage-BbjJweN-.js.map} +1 -1
  33. package/dist/admin/chunks/{ListConfigurationPage-CNvotSqe.js → ListConfigurationPage-VtFQ5mOK.mjs} +8 -8
  34. package/dist/admin/chunks/ListConfigurationPage-VtFQ5mOK.mjs.map +1 -0
  35. package/dist/admin/chunks/{ListViewPage-MJNfQTp-.js → ListViewPage-Cg3zbT7Y.mjs} +5 -5
  36. package/dist/admin/chunks/ListViewPage-Cg3zbT7Y.mjs.map +1 -0
  37. package/dist/admin/chunks/{ListViewPage-BtXYjEYz.js → ListViewPage-CzUm2VJN.js} +8 -8
  38. package/dist/admin/chunks/{ListViewPage-BtXYjEYz.js.map → ListViewPage-CzUm2VJN.js.map} +1 -1
  39. package/dist/admin/chunks/{NoContentTypePage-CVvVpwj4.js → NoContentTypePage-FcLLn2Wt.js} +3 -2
  40. package/dist/admin/chunks/{NoContentTypePage-BJrZvYPY.js.map → NoContentTypePage-FcLLn2Wt.js.map} +1 -1
  41. package/dist/admin/chunks/{NoContentTypePage-BJrZvYPY.js → NoContentTypePage-NOf7Aq_E.mjs} +3 -2
  42. package/dist/admin/chunks/NoContentTypePage-NOf7Aq_E.mjs.map +1 -0
  43. package/dist/admin/chunks/{NoPermissionsPage-C5yWg70d.js → NoPermissionsPage-DmeyXtCk.js} +3 -2
  44. package/dist/admin/chunks/{NoPermissionsPage-BulvG4hB.js.map → NoPermissionsPage-DmeyXtCk.js.map} +1 -1
  45. package/dist/admin/chunks/{NoPermissionsPage-BulvG4hB.js → NoPermissionsPage-OVr9KG6L.mjs} +3 -2
  46. package/dist/admin/chunks/NoPermissionsPage-OVr9KG6L.mjs.map +1 -0
  47. package/dist/admin/chunks/Preview-BH9l1QXk.mjs +593 -0
  48. package/dist/admin/chunks/Preview-BH9l1QXk.mjs.map +1 -0
  49. package/dist/admin/chunks/Preview-BYKkpc11.js +615 -0
  50. package/dist/admin/chunks/Preview-BYKkpc11.js.map +1 -0
  51. package/dist/admin/chunks/{ar-DckYq_WK.js → ar-DckYq_WK.mjs} +1 -1
  52. package/dist/admin/chunks/ar-DckYq_WK.mjs.map +1 -0
  53. package/dist/admin/chunks/{ca-DviY7mRj.js → ca-DviY7mRj.mjs} +1 -1
  54. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  55. package/dist/admin/chunks/{cs-C7OSYFQ7.js → cs-C7OSYFQ7.mjs} +1 -1
  56. package/dist/admin/chunks/cs-C7OSYFQ7.mjs.map +1 -0
  57. package/dist/admin/chunks/{de-5QRlDHyR.js → de-5QRlDHyR.mjs} +1 -1
  58. package/dist/admin/chunks/de-5QRlDHyR.mjs.map +1 -0
  59. package/dist/admin/chunks/{en-LfhocNG2.js → en-C2zEwS3-.mjs} +6 -1
  60. package/dist/admin/chunks/en-C2zEwS3-.mjs.map +1 -0
  61. package/dist/admin/chunks/{en-C1CjdAtC.js → en-G976DLsg.js} +6 -1
  62. package/dist/admin/chunks/{en-LfhocNG2.js.map → en-G976DLsg.js.map} +1 -1
  63. package/dist/admin/chunks/{es-DkoWSExG.js → es-DkoWSExG.mjs} +1 -1
  64. package/dist/admin/chunks/es-DkoWSExG.mjs.map +1 -0
  65. package/dist/admin/chunks/{eu-BG1xX7HK.js → eu-BG1xX7HK.mjs} +1 -1
  66. package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
  67. package/dist/admin/chunks/{fr-CFdRaRVj.js → fr-CFdRaRVj.mjs} +1 -1
  68. package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
  69. package/dist/admin/chunks/{gu-D5MMMXRs.js → gu-D5MMMXRs.mjs} +1 -1
  70. package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
  71. package/dist/admin/chunks/{hi-lp17SCjr.js → hi-lp17SCjr.mjs} +1 -1
  72. package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
  73. package/dist/admin/chunks/{hooks-DMvik5y_.js → hooks-DMvik5y_.mjs} +1 -1
  74. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  75. package/dist/admin/chunks/{hu-CLka1U2C.js → hu-CLka1U2C.mjs} +1 -1
  76. package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
  77. package/dist/admin/chunks/{id-USfY9m1g.js → id-USfY9m1g.mjs} +1 -1
  78. package/dist/admin/chunks/id-USfY9m1g.mjs.map +1 -0
  79. package/dist/admin/chunks/{index-BRlRBRLb.js → index-BE7PI9Wp.mjs} +273 -173
  80. package/dist/admin/chunks/index-BE7PI9Wp.mjs.map +1 -0
  81. package/dist/admin/chunks/{index-ZIwOPk6p.js → index-BwIhYBsG.js} +246 -142
  82. package/dist/admin/chunks/index-BwIhYBsG.js.map +1 -0
  83. package/dist/admin/chunks/{it-BAHrwmYS.js → it-BAHrwmYS.mjs} +1 -1
  84. package/dist/admin/chunks/it-BAHrwmYS.mjs.map +1 -0
  85. package/dist/admin/chunks/{ja-BWKmBJFT.js → ja-BWKmBJFT.mjs} +1 -1
  86. package/dist/admin/chunks/ja-BWKmBJFT.mjs.map +1 -0
  87. package/dist/admin/chunks/{ko-CgADGBNt.js → ko-CgADGBNt.mjs} +1 -1
  88. package/dist/admin/chunks/ko-CgADGBNt.mjs.map +1 -0
  89. package/dist/admin/chunks/{layout-B3-guCPG.js → layout-9zlUM9V3.mjs} +81 -7
  90. package/dist/admin/chunks/layout-9zlUM9V3.mjs.map +1 -0
  91. package/dist/admin/chunks/{layout-ameRNiAM.js → layout-Cr0HaJVS.js} +87 -13
  92. package/dist/admin/chunks/layout-Cr0HaJVS.js.map +1 -0
  93. package/dist/admin/chunks/{ml-CnhCfOn_.js → ml-CnhCfOn_.mjs} +1 -1
  94. package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
  95. package/dist/admin/chunks/{ms-Bh09NFff.js → ms-Bh09NFff.mjs} +1 -1
  96. package/dist/admin/chunks/ms-Bh09NFff.mjs.map +1 -0
  97. package/dist/admin/chunks/{nl-C8HYflTc.js → nl-C8HYflTc.mjs} +1 -1
  98. package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
  99. package/dist/admin/chunks/{useDragAndDrop-gcqEJMnO.js → objects-BJTP843m.js} +73 -1
  100. package/dist/admin/chunks/objects-BJTP843m.js.map +1 -0
  101. package/dist/admin/chunks/{useDragAndDrop-HYwNDExe.js → objects-D2z-IJgu.mjs} +72 -2
  102. package/dist/admin/chunks/objects-D2z-IJgu.mjs.map +1 -0
  103. package/dist/admin/chunks/{pl-MFCZJZuZ.js → pl-MFCZJZuZ.mjs} +1 -1
  104. package/dist/admin/chunks/pl-MFCZJZuZ.mjs.map +1 -0
  105. package/dist/admin/chunks/{pt-BR-CcotyBGJ.js → pt-BR-CcotyBGJ.mjs} +1 -1
  106. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs.map +1 -0
  107. package/dist/admin/chunks/{pt-HbmgeiYO.js → pt-HbmgeiYO.mjs} +1 -1
  108. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  109. package/dist/admin/chunks/{ru-CB4BUyQp.js → ru-CB4BUyQp.mjs} +1 -1
  110. package/dist/admin/chunks/{ru-CB4BUyQp.js.map → ru-CB4BUyQp.mjs.map} +1 -1
  111. package/dist/admin/chunks/{sa-n_aPA-pU.js → sa-n_aPA-pU.mjs} +1 -1
  112. package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
  113. package/dist/admin/chunks/{sk-tn_BDjE2.js → sk-tn_BDjE2.mjs} +1 -1
  114. package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
  115. package/dist/admin/chunks/{sv-cq4ZrQRd.js → sv-cq4ZrQRd.mjs} +1 -1
  116. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
  117. package/dist/admin/chunks/{th-mUH7hEtc.js → th-mUH7hEtc.mjs} +1 -1
  118. package/dist/admin/chunks/th-mUH7hEtc.mjs.map +1 -0
  119. package/dist/admin/chunks/{tr-Yt38daxh.js → tr-Yt38daxh.mjs} +1 -1
  120. package/dist/admin/chunks/tr-Yt38daxh.mjs.map +1 -0
  121. package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
  122. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  123. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  124. package/dist/admin/chunks/{en-C1CjdAtC.js.map → uk-DB6OgySY.js.map} +1 -1
  125. package/dist/admin/chunks/{relations-CmoFVrKj.js → usePrev-DgZBp9Oo.js} +18 -2
  126. package/dist/admin/chunks/usePrev-DgZBp9Oo.js.map +1 -0
  127. package/dist/admin/chunks/{relations-DYQAaXwZ.js → usePrev-PisKKvhT.mjs} +18 -4
  128. package/dist/admin/chunks/usePrev-PisKKvhT.mjs.map +1 -0
  129. package/dist/admin/chunks/{vi-CvBGlTjr.js → vi-CvBGlTjr.mjs} +1 -1
  130. package/dist/admin/chunks/vi-CvBGlTjr.mjs.map +1 -0
  131. package/dist/admin/chunks/{zh-BmF-sHaT.js → zh-BmF-sHaT.mjs} +1 -1
  132. package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
  133. package/dist/admin/chunks/{zh-Hans-CI0HKio3.js → zh-Hans-CI0HKio3.mjs} +1 -1
  134. package/dist/admin/chunks/{zh-Hans-CI0HKio3.js.map → zh-Hans-CI0HKio3.mjs.map} +1 -1
  135. package/dist/admin/index.js +2 -1
  136. package/dist/admin/index.js.map +1 -1
  137. package/dist/admin/index.mjs +2 -1
  138. package/dist/admin/index.mjs.map +1 -1
  139. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  140. package/dist/admin/src/content-manager.d.ts +4 -0
  141. package/dist/admin/src/features/DocumentContext.d.ts +53 -0
  142. package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
  143. package/dist/admin/src/hooks/useDocument.d.ts +2 -0
  144. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  145. package/dist/admin/src/index.d.ts +1 -0
  146. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
  147. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  148. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +49 -0
  149. package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +8 -0
  150. package/dist/admin/src/pages/EditView/components/FormInputs/{Relations.d.ts → Relations/Relations.d.ts} +8 -2
  151. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  152. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +9 -3
  153. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +7 -4
  154. package/dist/admin/src/preview/components/PreviewHeader.d.ts +1 -2
  155. package/dist/admin/src/preview/pages/Preview.d.ts +2 -0
  156. package/dist/server/index.js +1 -1
  157. package/dist/server/index.js.map +1 -1
  158. package/dist/server/index.mjs +1 -1
  159. package/dist/server/index.mjs.map +1 -1
  160. package/package.json +8 -8
  161. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js.map +0 -1
  162. package/dist/admin/chunks/ComponentConfigurationPage-DhYZp4nN.js.map +0 -1
  163. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js.map +0 -1
  164. package/dist/admin/chunks/EditConfigurationPage-DDuPch5d.js.map +0 -1
  165. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js +0 -265
  166. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js.map +0 -1
  167. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js +0 -288
  168. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js.map +0 -1
  169. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js.map +0 -1
  170. package/dist/admin/chunks/Form-CZmB6JIg.js.map +0 -1
  171. package/dist/admin/chunks/History-BlLKDZSw.js.map +0 -1
  172. package/dist/admin/chunks/History-CPYXgxkS.js.map +0 -1
  173. package/dist/admin/chunks/Input-CLX3C5DI.js.map +0 -1
  174. package/dist/admin/chunks/Input-DiR2Xfa7.js.map +0 -1
  175. package/dist/admin/chunks/ListConfigurationPage-CNvotSqe.js.map +0 -1
  176. package/dist/admin/chunks/ListViewPage-MJNfQTp-.js.map +0 -1
  177. package/dist/admin/chunks/NoContentTypePage-CVvVpwj4.js.map +0 -1
  178. package/dist/admin/chunks/NoPermissionsPage-C5yWg70d.js.map +0 -1
  179. package/dist/admin/chunks/Preview-DEuQgQg2.js +0 -482
  180. package/dist/admin/chunks/Preview-DEuQgQg2.js.map +0 -1
  181. package/dist/admin/chunks/Preview-H74FQ9Cq.js +0 -504
  182. package/dist/admin/chunks/Preview-H74FQ9Cq.js.map +0 -1
  183. package/dist/admin/chunks/Relations-C8jbZPVK.js +0 -827
  184. package/dist/admin/chunks/Relations-C8jbZPVK.js.map +0 -1
  185. package/dist/admin/chunks/Relations-mxOUS7TJ.js +0 -853
  186. package/dist/admin/chunks/Relations-mxOUS7TJ.js.map +0 -1
  187. package/dist/admin/chunks/ar-DckYq_WK.js.map +0 -1
  188. package/dist/admin/chunks/ca-DviY7mRj.js.map +0 -1
  189. package/dist/admin/chunks/cs-C7OSYFQ7.js.map +0 -1
  190. package/dist/admin/chunks/de-5QRlDHyR.js.map +0 -1
  191. package/dist/admin/chunks/es-DkoWSExG.js.map +0 -1
  192. package/dist/admin/chunks/eu-BG1xX7HK.js.map +0 -1
  193. package/dist/admin/chunks/fr-CFdRaRVj.js.map +0 -1
  194. package/dist/admin/chunks/gu-D5MMMXRs.js.map +0 -1
  195. package/dist/admin/chunks/hi-lp17SCjr.js.map +0 -1
  196. package/dist/admin/chunks/hooks-DMvik5y_.js.map +0 -1
  197. package/dist/admin/chunks/hu-CLka1U2C.js.map +0 -1
  198. package/dist/admin/chunks/id-USfY9m1g.js.map +0 -1
  199. package/dist/admin/chunks/index-BRlRBRLb.js.map +0 -1
  200. package/dist/admin/chunks/index-ZIwOPk6p.js.map +0 -1
  201. package/dist/admin/chunks/it-BAHrwmYS.js.map +0 -1
  202. package/dist/admin/chunks/ja-BWKmBJFT.js.map +0 -1
  203. package/dist/admin/chunks/ko-CgADGBNt.js.map +0 -1
  204. package/dist/admin/chunks/layout-B3-guCPG.js.map +0 -1
  205. package/dist/admin/chunks/layout-ameRNiAM.js.map +0 -1
  206. package/dist/admin/chunks/ml-CnhCfOn_.js.map +0 -1
  207. package/dist/admin/chunks/ms-Bh09NFff.js.map +0 -1
  208. package/dist/admin/chunks/nl-C8HYflTc.js.map +0 -1
  209. package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
  210. package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
  211. package/dist/admin/chunks/objects-wl73iEma.js +0 -73
  212. package/dist/admin/chunks/objects-wl73iEma.js.map +0 -1
  213. package/dist/admin/chunks/pl-MFCZJZuZ.js.map +0 -1
  214. package/dist/admin/chunks/pt-BR-CcotyBGJ.js.map +0 -1
  215. package/dist/admin/chunks/pt-HbmgeiYO.js.map +0 -1
  216. package/dist/admin/chunks/relations-CmoFVrKj.js.map +0 -1
  217. package/dist/admin/chunks/relations-DYQAaXwZ.js.map +0 -1
  218. package/dist/admin/chunks/sa-n_aPA-pU.js.map +0 -1
  219. package/dist/admin/chunks/sk-tn_BDjE2.js.map +0 -1
  220. package/dist/admin/chunks/sv-cq4ZrQRd.js.map +0 -1
  221. package/dist/admin/chunks/th-mUH7hEtc.js.map +0 -1
  222. package/dist/admin/chunks/tr-Yt38daxh.js.map +0 -1
  223. package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
  224. package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
  225. package/dist/admin/chunks/uk-Cpgmm7gE.js +0 -140
  226. package/dist/admin/chunks/uk-Cpgmm7gE.js.map +0 -1
  227. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js.map +0 -1
  228. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
  229. package/dist/admin/chunks/usePrev-Bjw2dhmq.js +0 -18
  230. package/dist/admin/chunks/usePrev-Bjw2dhmq.js.map +0 -1
  231. package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
  232. package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +0 -1
  233. package/dist/admin/chunks/vi-CvBGlTjr.js.map +0 -1
  234. package/dist/admin/chunks/zh-BmF-sHaT.js.map +0 -1
  235. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +0 -0
  236. package/dist/admin/src/preview/components/PreviewContent.d.ts +0 -3
@@ -15,6 +15,7 @@ var pipe = require('lodash/fp/pipe');
15
15
  var qs = require('qs');
16
16
  var dateFns = require('date-fns');
17
17
  var toolkit = require('@reduxjs/toolkit');
18
+ require('prismjs');
18
19
 
19
20
  function _interopNamespaceDefault(e) {
20
21
  var n = Object.create(null);
@@ -55,6 +56,9 @@ const INJECTION_ZONES = {
55
56
  deleteModalAdditionalInfos: [],
56
57
  publishModalAdditionalInfos: [],
57
58
  unpublishModalAdditionalInfos: []
59
+ },
60
+ preview: {
61
+ actions: []
58
62
  }
59
63
  };
60
64
  /**
@@ -115,102 +119,6 @@ const DOCUMENT_META_FIELDS = [
115
119
  const SINGLE_TYPES = 'single-types';
116
120
  const COLLECTION_TYPES = 'collection-types';
117
121
 
118
- const [DocumentRBACProvider, useDocumentRBAC] = strapiAdmin.createContext('DocumentRBAC', {
119
- canCreate: false,
120
- canCreateFields: [],
121
- canDelete: false,
122
- canPublish: false,
123
- canRead: false,
124
- canReadFields: [],
125
- canUpdate: false,
126
- canUpdateFields: [],
127
- canUserAction: ()=>false,
128
- isLoading: false
129
- });
130
- /**
131
- * @internal This component is not meant to be used outside of the Content Manager plugin.
132
- * It depends on knowing the slug/model of the content-type using the params of the URL.
133
- * If you do use the hook outside of the context, we default to `false` for all actions.
134
- *
135
- * It then creates an list of `can{Action}` that are passed to the context for consumption
136
- * within the app to enforce RBAC.
137
- */ const DocumentRBAC = ({ children, permissions })=>{
138
- const { slug } = reactRouterDom.useParams();
139
- if (!slug) {
140
- throw new Error('Cannot find the slug param in the URL');
141
- }
142
- const [{ rawQuery }] = strapiAdmin.useQueryParams();
143
- const userPermissions = strapiAdmin.useAuth('DocumentRBAC', (state)=>state.permissions);
144
- const contentTypePermissions = React__namespace.useMemo(()=>{
145
- const contentTypePermissions = userPermissions.filter((permission)=>permission.subject === slug);
146
- return contentTypePermissions.reduce((acc, permission)=>{
147
- const [action] = permission.action.split('.').slice(-1);
148
- return {
149
- ...acc,
150
- [action]: [
151
- permission
152
- ]
153
- };
154
- }, {});
155
- }, [
156
- slug,
157
- userPermissions
158
- ]);
159
- const { isLoading, allowedActions } = strapiAdmin.useRBAC(contentTypePermissions, permissions ?? undefined, // TODO: useRBAC context should be typed and built differently
160
- // We are passing raw query as context to the hook so that it can
161
- // rely on the locale provided from DocumentRBAC for its permission calculations.
162
- rawQuery);
163
- const canCreateFields = !isLoading && allowedActions.canCreate ? extractAndDedupeFields(contentTypePermissions.create) : [];
164
- const canReadFields = !isLoading && allowedActions.canRead ? extractAndDedupeFields(contentTypePermissions.read) : [];
165
- const canUpdateFields = !isLoading && allowedActions.canUpdate ? extractAndDedupeFields(contentTypePermissions.update) : [];
166
- /**
167
- * @description Checks if the user can perform an action on a field based on the field names
168
- * provided as the second argument.
169
- */ const canUserAction = React__namespace.useCallback((fieldName, fieldsUserCanAction, fieldType)=>{
170
- const name = removeNumericalStrings(fieldName.split('.'));
171
- const componentFieldNames = fieldsUserCanAction// filter out fields that aren't components (components are dot separated)
172
- .filter((field)=>field.split('.').length > 1);
173
- if (fieldType === 'component') {
174
- // check if the field name is within any of those arrays
175
- return componentFieldNames.some((field)=>{
176
- return field.includes(name.join('.'));
177
- });
178
- }
179
- /**
180
- * The field is within a component.
181
- */ if (name.length > 1) {
182
- return componentFieldNames.includes(name.join('.'));
183
- }
184
- /**
185
- * just a regular field
186
- */ return fieldsUserCanAction.includes(fieldName);
187
- }, []);
188
- if (isLoading) {
189
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
190
- }
191
- return /*#__PURE__*/ jsxRuntime.jsx(DocumentRBACProvider, {
192
- isLoading: isLoading,
193
- canCreateFields: canCreateFields,
194
- canReadFields: canReadFields,
195
- canUpdateFields: canUpdateFields,
196
- canUserAction: canUserAction,
197
- ...allowedActions,
198
- children: children
199
- });
200
- };
201
- /**
202
- * @internal it's really small, but it's used three times in a row and DRY for something this straight forward.
203
- */ const extractAndDedupeFields = (permissions = [])=>permissions.flatMap((permission)=>permission.properties?.fields).filter((field, index, arr)=>arr.indexOf(field) === index && typeof field === 'string');
204
- /**
205
- * @internal removes numerical strings from arrays.
206
- * @example
207
- * ```ts
208
- * const name = 'a.0.b';
209
- * const res = removeNumericalStrings(name.split('.'));
210
- * console.log(res); // ['a', 'b']
211
- * ```
212
- */ const removeNumericalStrings = (arr)=>arr.filter((item)=>isNaN(Number(item)));
213
-
214
122
  const BLOCK_LIST_ATTRIBUTE_KEYS = [
215
123
  '__component',
216
124
  '__temp_key__'
@@ -1521,7 +1429,7 @@ const checkIfAttributeIsDisplayable = (attribute)=>{
1521
1429
  const { toggleNotification } = strapiAdmin.useNotification();
1522
1430
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
1523
1431
  const { formatMessage } = reactIntl.useIntl();
1524
- const { currentData: data, isLoading: isLoadingDocument, isFetching: isFetchingDocument, error } = useGetDocumentQuery(args, {
1432
+ const { currentData: data, isLoading: isLoadingDocument, isFetching: isFetchingDocument, error, refetch } = useGetDocumentQuery(args, {
1525
1433
  ...opts,
1526
1434
  skip: !args.documentId && args.collectionType !== SINGLE_TYPES || opts?.skip
1527
1435
  });
@@ -1620,7 +1528,8 @@ const checkIfAttributeIsDisplayable = (attribute)=>{
1620
1528
  schemas,
1621
1529
  validate,
1622
1530
  getTitle,
1623
- getInitialFormValues
1531
+ getInitialFormValues,
1532
+ refetch
1624
1533
  };
1625
1534
  };
1626
1535
  /* -------------------------------------------------------------------------------------------------
@@ -1693,6 +1602,144 @@ const checkIfAttributeIsDisplayable = (attribute)=>{
1693
1602
  };
1694
1603
  };
1695
1604
 
1605
+ const [DocumentProvider, useDocumentContext] = strapiAdmin.createContext('DocumentContext');
1606
+ /**
1607
+ * TODO: Document in contributor docs, Add unit test
1608
+ *
1609
+ * This context provider and its associated hook are used to access a document at its root level
1610
+ * and expose a function to change the current document being viewed to one of the root level docuemnt's relations.
1611
+ *
1612
+ * The useDocumentContext hook exposes:
1613
+ * - meta: information about the currentDocument,
1614
+ * - document: the actual document,
1615
+ * - changeDocument: a function to change the current document to one of its relations.
1616
+ * - rootDocumentMeta: information about the root level document (current page)
1617
+ */ const DocumentContextProvider = ({ children, initialDocument, onPreview })=>{
1618
+ /**
1619
+ * Initialize with the "root" document and expose a setter method to change to
1620
+ * one of the root level document's relations.
1621
+ */ const [currentDocumentMeta, changeDocument] = React__namespace.useState(initialDocument);
1622
+ const params = React__namespace.useMemo(()=>buildValidParams(currentDocumentMeta.params ?? {}), [
1623
+ currentDocumentMeta.params
1624
+ ]);
1625
+ const document = useDocument({
1626
+ ...currentDocumentMeta,
1627
+ params
1628
+ });
1629
+ const [documentHistory, setDocumentHistory] = React__namespace.useState([]);
1630
+ return /*#__PURE__*/ jsxRuntime.jsx(DocumentProvider, {
1631
+ changeDocument: changeDocument,
1632
+ document: document,
1633
+ rootDocumentMeta: {
1634
+ documentId: initialDocument.documentId,
1635
+ model: initialDocument.model,
1636
+ collectionType: initialDocument.collectionType
1637
+ },
1638
+ meta: currentDocumentMeta,
1639
+ documentHistory: documentHistory,
1640
+ setDocumentHistory: setDocumentHistory,
1641
+ onPreview: onPreview,
1642
+ children: children
1643
+ });
1644
+ };
1645
+
1646
+ const [DocumentRBACProvider, useDocumentRBAC] = strapiAdmin.createContext('DocumentRBAC', {
1647
+ canCreate: false,
1648
+ canCreateFields: [],
1649
+ canDelete: false,
1650
+ canPublish: false,
1651
+ canRead: false,
1652
+ canReadFields: [],
1653
+ canUpdate: false,
1654
+ canUpdateFields: [],
1655
+ canUserAction: ()=>false,
1656
+ isLoading: false
1657
+ });
1658
+ /**
1659
+ * @internal This component is not meant to be used outside of the Content Manager plugin.
1660
+ * It depends on knowing the slug/model of the content-type using the params of the URL or the model if it is passed as arg.
1661
+ * If you do use the hook outside of the context, we default to `false` for all actions.
1662
+ *
1663
+ * It then creates an list of `can{Action}` that are passed to the context for consumption
1664
+ * within the app to enforce RBAC.
1665
+ */ const DocumentRBAC = ({ children, permissions, model })=>{
1666
+ const { slug } = reactRouterDom.useParams();
1667
+ if (!slug && !model) {
1668
+ throw new Error('Cannot find the slug param in the URL or the model prop is not provided.');
1669
+ }
1670
+ const contentTypeUid = model ?? slug;
1671
+ const [{ rawQuery }] = strapiAdmin.useQueryParams();
1672
+ const userPermissions = strapiAdmin.useAuth('DocumentRBAC', (state)=>state.permissions);
1673
+ const contentTypePermissions = React__namespace.useMemo(()=>{
1674
+ const contentTypePermissions = userPermissions.filter((permission)=>permission.subject === contentTypeUid);
1675
+ return contentTypePermissions.reduce((acc, permission)=>{
1676
+ const [action] = permission.action.split('.').slice(-1);
1677
+ return {
1678
+ ...acc,
1679
+ [action]: [
1680
+ permission
1681
+ ]
1682
+ };
1683
+ }, {});
1684
+ }, [
1685
+ contentTypeUid,
1686
+ userPermissions
1687
+ ]);
1688
+ const { isLoading, allowedActions } = strapiAdmin.useRBAC(contentTypePermissions, permissions ?? undefined, // TODO: useRBAC context should be typed and built differently
1689
+ // We are passing raw query as context to the hook so that it can
1690
+ // rely on the locale provided from DocumentRBAC for its permission calculations.
1691
+ rawQuery);
1692
+ const canCreateFields = !isLoading && allowedActions.canCreate ? extractAndDedupeFields(contentTypePermissions.create) : [];
1693
+ const canReadFields = !isLoading && allowedActions.canRead ? extractAndDedupeFields(contentTypePermissions.read) : [];
1694
+ const canUpdateFields = !isLoading && allowedActions.canUpdate ? extractAndDedupeFields(contentTypePermissions.update) : [];
1695
+ /**
1696
+ * @description Checks if the user can perform an action on a field based on the field names
1697
+ * provided as the second argument.
1698
+ */ const canUserAction = React__namespace.useCallback((fieldName, fieldsUserCanAction, fieldType)=>{
1699
+ const name = removeNumericalStrings(fieldName.split('.'));
1700
+ const componentFieldNames = fieldsUserCanAction// filter out fields that aren't components (components are dot separated)
1701
+ .filter((field)=>field.split('.').length > 1);
1702
+ if (fieldType === 'component') {
1703
+ // check if the field name is within any of those arrays
1704
+ return componentFieldNames.some((field)=>{
1705
+ return field.includes(name.join('.'));
1706
+ });
1707
+ }
1708
+ /**
1709
+ * The field is within a component.
1710
+ */ if (name.length > 1) {
1711
+ return componentFieldNames.includes(name.join('.'));
1712
+ }
1713
+ /**
1714
+ * just a regular field
1715
+ */ return fieldsUserCanAction.includes(fieldName);
1716
+ }, []);
1717
+ if (isLoading) {
1718
+ return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
1719
+ }
1720
+ return /*#__PURE__*/ jsxRuntime.jsx(DocumentRBACProvider, {
1721
+ isLoading: isLoading,
1722
+ canCreateFields: canCreateFields,
1723
+ canReadFields: canReadFields,
1724
+ canUpdateFields: canUpdateFields,
1725
+ canUserAction: canUserAction,
1726
+ ...allowedActions,
1727
+ children: children
1728
+ });
1729
+ };
1730
+ /**
1731
+ * @internal it's really small, but it's used three times in a row and DRY for something this straight forward.
1732
+ */ const extractAndDedupeFields = (permissions = [])=>permissions.flatMap((permission)=>permission.properties?.fields).filter((field, index, arr)=>arr.indexOf(field) === index && typeof field === 'string');
1733
+ /**
1734
+ * @internal removes numerical strings from arrays.
1735
+ * @example
1736
+ * ```ts
1737
+ * const name = 'a.0.b';
1738
+ * const res = removeNumericalStrings(name.split('.'));
1739
+ * console.log(res); // ['a', 'b']
1740
+ * ```
1741
+ */ const removeNumericalStrings = (arr)=>arr.filter((item)=>isNaN(Number(item)));
1742
+
1696
1743
  const prefixPluginTranslations = (trad, pluginId)=>{
1697
1744
  return Object.keys(trad).reduce((acc, current)=>{
1698
1745
  acc[`${pluginId}.${current}`] = trad[current];
@@ -1734,7 +1781,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1734
1781
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
1735
1782
  const navigate = reactRouterDom.useNavigate();
1736
1783
  const setCurrentStep = strapiAdmin.useGuidedTour('useDocumentActions', (state)=>state.setCurrentStep);
1737
- const [deleteDocument] = useDeleteDocumentMutation();
1784
+ const [deleteDocument, { isLoading: isDeleting }] = useDeleteDocumentMutation();
1738
1785
  const _delete = React__namespace.useCallback(async ({ collectionType, model, documentId, params }, trackerProperty)=>{
1739
1786
  try {
1740
1787
  trackUsage('willDeleteEntry', trackerProperty);
@@ -1780,7 +1827,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1780
1827
  formatMessage,
1781
1828
  formatAPIError
1782
1829
  ]);
1783
- const [deleteManyDocuments] = useDeleteManyDocumentsMutation();
1830
+ const [deleteManyDocuments, { isLoading: isDeletingMany }] = useDeleteManyDocumentsMutation();
1784
1831
  const deleteMany = React__namespace.useCallback(async ({ model, documentIds, params })=>{
1785
1832
  try {
1786
1833
  trackUsage('willBulkDeleteEntries');
@@ -1823,7 +1870,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1823
1870
  formatMessage,
1824
1871
  formatAPIError
1825
1872
  ]);
1826
- const [discardDocument] = useDiscardDocumentMutation();
1873
+ const [discardDocument, { isLoading: isDiscardingDocument }] = useDiscardDocumentMutation();
1827
1874
  const discard = React__namespace.useCallback(async ({ collectionType, model, documentId, params })=>{
1828
1875
  try {
1829
1876
  const res = await discardDocument({
@@ -1862,10 +1909,12 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1862
1909
  formatMessage,
1863
1910
  toggleNotification
1864
1911
  ]);
1865
- const [publishDocument] = usePublishDocumentMutation();
1912
+ const [publishDocument, { isLoading: isPublishing }] = usePublishDocumentMutation();
1866
1913
  const publish = React__namespace.useCallback(async ({ collectionType, model, documentId, params }, data)=>{
1867
1914
  try {
1868
- trackUsage('willPublishEntry');
1915
+ trackUsage('willPublishEntry', {
1916
+ documentId
1917
+ });
1869
1918
  const res = await publishDocument({
1870
1919
  collectionType,
1871
1920
  model,
@@ -1882,7 +1931,9 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1882
1931
  error: res.error
1883
1932
  };
1884
1933
  }
1885
- trackUsage('didPublishEntry');
1934
+ trackUsage('didPublishEntry', {
1935
+ documentId
1936
+ });
1886
1937
  toggleNotification({
1887
1938
  type: 'success',
1888
1939
  message: formatMessage({
@@ -1905,7 +1956,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1905
1956
  formatMessage,
1906
1957
  formatAPIError
1907
1958
  ]);
1908
- const [publishManyDocuments] = usePublishManyDocumentsMutation();
1959
+ const [publishManyDocuments, { isLoading: isPublishingMany }] = usePublishManyDocumentsMutation();
1909
1960
  const publishMany = React__namespace.useCallback(async ({ model, documentIds, params })=>{
1910
1961
  try {
1911
1962
  // TODO Confirm tracking events for bulk publish?
@@ -1945,7 +1996,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1945
1996
  formatMessage,
1946
1997
  formatAPIError
1947
1998
  ]);
1948
- const [updateDocument] = useUpdateDocumentMutation();
1999
+ const [updateDocument, { isLoading: isUpdating }] = useUpdateDocumentMutation();
1949
2000
  const update = React__namespace.useCallback(async ({ collectionType, model, documentId, params }, data, trackerProperty)=>{
1950
2001
  try {
1951
2002
  trackUsage('willEditEntry', trackerProperty);
@@ -1969,7 +2020,10 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
1969
2020
  error: res.error
1970
2021
  };
1971
2022
  }
1972
- trackUsage('didEditEntry', trackerProperty);
2023
+ trackUsage('didEditEntry', {
2024
+ ...trackerProperty,
2025
+ documentId: res.data.data.documentId
2026
+ });
1973
2027
  toggleNotification({
1974
2028
  type: 'success',
1975
2029
  message: formatMessage({
@@ -2041,7 +2095,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
2041
2095
  formatMessage,
2042
2096
  formatAPIError
2043
2097
  ]);
2044
- const [unpublishManyDocuments] = useUnpublishManyDocumentsMutation();
2098
+ const [unpublishManyDocuments, { isLoading: isUnpublishingMany }] = useUnpublishManyDocumentsMutation();
2045
2099
  const unpublishMany = React__namespace.useCallback(async ({ model, documentIds, params })=>{
2046
2100
  try {
2047
2101
  trackUsage('willBulkUnpublishEntries');
@@ -2105,7 +2159,10 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
2105
2159
  error: res.error
2106
2160
  };
2107
2161
  }
2108
- trackUsage('didCreateEntry', trackerProperty);
2162
+ trackUsage('didCreateEntry', {
2163
+ ...trackerProperty,
2164
+ documentId: res.data.data.documentId
2165
+ });
2109
2166
  toggleNotification({
2110
2167
  type: 'success',
2111
2168
  message: formatMessage({
@@ -2232,6 +2289,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
2232
2289
  getDoc
2233
2290
  ]);
2234
2291
  return {
2292
+ isLoading: isPublishing || isUpdating || isDiscardingDocument || isDeleting || isDeletingMany || isUnpublishingMany || isPublishingMany,
2235
2293
  autoClone,
2236
2294
  clone,
2237
2295
  create,
@@ -2247,7 +2305,7 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
2247
2305
  };
2248
2306
  };
2249
2307
 
2250
- const ProtectedHistoryPage = /*#__PURE__*/ React__namespace.lazy(()=>Promise.resolve().then(function () { return require('./History-BlLKDZSw.js'); }).then((mod)=>({
2308
+ const ProtectedHistoryPage = /*#__PURE__*/ React__namespace.lazy(()=>Promise.resolve().then(function () { return require('./History-CEoOna4w.js'); }).then((mod)=>({
2251
2309
  default: mod.ProtectedHistoryPage
2252
2310
  })));
2253
2311
  /**
@@ -2263,7 +2321,7 @@ const ProtectedHistoryPage = /*#__PURE__*/ React__namespace.lazy(()=>Promise.res
2263
2321
  }
2264
2322
  ];
2265
2323
 
2266
- const ProtectedPreviewPage = /*#__PURE__*/ React__namespace.lazy(()=>Promise.resolve().then(function () { return require('./Preview-H74FQ9Cq.js'); }).then((mod)=>({
2324
+ const ProtectedPreviewPage = /*#__PURE__*/ React__namespace.lazy(()=>Promise.resolve().then(function () { return require('./Preview-BYKkpc11.js'); }).then((mod)=>({
2267
2325
  default: mod.ProtectedPreviewPage
2268
2326
  })));
2269
2327
  const routes$1 = [
@@ -2277,25 +2335,25 @@ const routes$1 = [
2277
2335
  }
2278
2336
  ];
2279
2337
 
2280
- const ProtectedEditViewPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./EditViewPage-zSnDwLz3.js'); }).then((mod)=>({
2338
+ const ProtectedEditViewPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./EditViewPage-CuQfZJDf.js'); }).then((mod)=>({
2281
2339
  default: mod.ProtectedEditViewPage
2282
2340
  })));
2283
- const ProtectedListViewPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./ListViewPage-BtXYjEYz.js'); }).then((mod)=>({
2341
+ const ProtectedListViewPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./ListViewPage-CzUm2VJN.js'); }).then((mod)=>({
2284
2342
  default: mod.ProtectedListViewPage
2285
2343
  })));
2286
- const ProtectedListConfiguration = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./ListConfigurationPage-DdTp-HxB.js'); }).then((mod)=>({
2344
+ const ProtectedListConfiguration = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./ListConfigurationPage-BbjJweN-.js'); }).then((mod)=>({
2287
2345
  default: mod.ProtectedListConfiguration
2288
2346
  })));
2289
- const ProtectedEditConfigurationPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./EditConfigurationPage-D0Ng758X.js'); }).then((mod)=>({
2347
+ const ProtectedEditConfigurationPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./EditConfigurationPage-7w_-4jF4.js'); }).then((mod)=>({
2290
2348
  default: mod.ProtectedEditConfigurationPage
2291
2349
  })));
2292
- const ProtectedComponentConfigurationPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./ComponentConfigurationPage-DXwOtpq1.js'); }).then((mod)=>({
2350
+ const ProtectedComponentConfigurationPage = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./ComponentConfigurationPage-CGn9IYeg.js'); }).then((mod)=>({
2293
2351
  default: mod.ProtectedComponentConfigurationPage
2294
2352
  })));
2295
- const NoPermissions = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./NoPermissionsPage-C5yWg70d.js'); }).then((mod)=>({
2353
+ const NoPermissions = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./NoPermissionsPage-DmeyXtCk.js'); }).then((mod)=>({
2296
2354
  default: mod.NoPermissions
2297
2355
  })));
2298
- const NoContentType = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./NoContentTypePage-CVvVpwj4.js'); }).then((mod)=>({
2356
+ const NoContentType = /*#__PURE__*/ React.lazy(()=>Promise.resolve().then(function () { return require('./NoContentTypePage-FcLLn2Wt.js'); }).then((mod)=>({
2299
2357
  default: mod.NoContentType
2300
2358
  })));
2301
2359
  const CollectionTypePages = ()=>{
@@ -2431,6 +2489,7 @@ const DocumentActionButton = (action)=>{
2431
2489
  variant: action.variant || 'default',
2432
2490
  paddingTop: "7px",
2433
2491
  paddingBottom: "7px",
2492
+ loading: action.loading,
2434
2493
  children: action.label
2435
2494
  }),
2436
2495
  action.dialog?.type === 'dialog' ? /*#__PURE__*/ jsxRuntime.jsx(DocumentActionConfirmDialog, {
@@ -2585,7 +2644,7 @@ const convertActionVariantToIconColor = (variant = 'secondary')=>{
2585
2644
  return 'primary600';
2586
2645
  }
2587
2646
  };
2588
- const DocumentActionConfirmDialog = ({ onClose, onCancel, onConfirm, title, content, isOpen, variant = 'secondary' })=>{
2647
+ const DocumentActionConfirmDialog = ({ onClose, onCancel, onConfirm, title, content, isOpen, variant = 'secondary', loading })=>{
2589
2648
  const { formatMessage } = reactIntl.useIntl();
2590
2649
  const handleClose = async ()=>{
2591
2650
  if (onCancel) {
@@ -2626,6 +2685,7 @@ const DocumentActionConfirmDialog = ({ onClose, onCancel, onConfirm, title, cont
2626
2685
  onClick: handleConfirm,
2627
2686
  variant: variant,
2628
2687
  fullWidth: true,
2688
+ loading: loading,
2629
2689
  children: formatMessage({
2630
2690
  id: 'app.components.Button.confirm',
2631
2691
  defaultMessage: 'Confirm'
@@ -2680,8 +2740,8 @@ const transformData = (data)=>{
2680
2740
  };
2681
2741
  /* -------------------------------------------------------------------------------------------------
2682
2742
  * DocumentActionComponents
2683
- * -----------------------------------------------------------------------------------------------*/ const PublishAction$1 = ({ activeTab, documentId, model, collectionType, meta, document })=>{
2684
- const { schema } = useDoc();
2743
+ * -----------------------------------------------------------------------------------------------*/ const PublishAction$1 = ({ activeTab, documentId, model, collectionType, meta, document, onPreview })=>{
2744
+ const schema = useDocumentContext('PublishAction', (state)=>state.document.schema);
2685
2745
  const navigate = reactRouterDom.useNavigate();
2686
2746
  const { toggleNotification } = strapiAdmin.useNotification();
2687
2747
  const { _unstableFormatValidationErrors: formatValidationErrors } = strapiAdmin.useAPIErrorHandler();
@@ -2690,7 +2750,7 @@ const transformData = (data)=>{
2690
2750
  const { id } = reactRouterDom.useParams();
2691
2751
  const { formatMessage } = reactIntl.useIntl();
2692
2752
  const canPublish = useDocumentRBAC('PublishAction', ({ canPublish })=>canPublish);
2693
- const { publish } = useDocumentActions();
2753
+ const { publish, isLoading } = useDocumentActions();
2694
2754
  const [countDraftRelations, { isLoading: isLoadingDraftRelations, isError: isErrorDraftRelations }] = useLazyGetDraftRelationCountQuery();
2695
2755
  const [localCountOfDraftRelations, setLocalCountOfDraftRelations] = React__namespace.useState(0);
2696
2756
  const [serverCountOfDraftRelations, setServerCountOfDraftRelations] = React__namespace.useState(0);
@@ -2704,6 +2764,8 @@ const transformData = (data)=>{
2704
2764
  const validate = strapiAdmin.useForm('PublishAction', (state)=>state.validate);
2705
2765
  const setErrors = strapiAdmin.useForm('PublishAction', (state)=>state.setErrors);
2706
2766
  const formValues = strapiAdmin.useForm('PublishAction', ({ values })=>values);
2767
+ const rootDocumentMeta = useDocumentContext('PublishAction', (state)=>state.rootDocumentMeta);
2768
+ const currentDocumentMeta = useDocumentContext('PublishAction', (state)=>state.meta);
2707
2769
  React__namespace.useEffect(()=>{
2708
2770
  if (isErrorDraftRelations) {
2709
2771
  toggleNotification({
@@ -2806,11 +2868,12 @@ const transformData = (data)=>{
2806
2868
  });
2807
2869
  return;
2808
2870
  }
2871
+ const isPublishingRelation = rootDocumentMeta.documentId !== currentDocumentMeta.documentId;
2809
2872
  const res = await publish({
2810
2873
  collectionType,
2811
2874
  model,
2812
2875
  documentId,
2813
- params
2876
+ params: isPublishingRelation ? currentDocumentMeta.params : params
2814
2877
  }, transformData(formValues));
2815
2878
  if ('data' in res && collectionType !== SINGLE_TYPES) {
2816
2879
  /**
@@ -2826,6 +2889,9 @@ const transformData = (data)=>{
2826
2889
  }
2827
2890
  } finally{
2828
2891
  setSubmitting(false);
2892
+ if (onPreview) {
2893
+ onPreview();
2894
+ }
2829
2895
  }
2830
2896
  };
2831
2897
  const totalDraftRelations = localCountOfDraftRelations + serverCountOfDraftRelations;
@@ -2834,6 +2900,12 @@ const transformData = (data)=>{
2834
2900
  const enableDraftRelationsCount = false;
2835
2901
  const hasDraftRelations = enableDraftRelationsCount;
2836
2902
  return {
2903
+ loading: isLoading,
2904
+ position: [
2905
+ 'panel',
2906
+ 'preview',
2907
+ 'relation-modal'
2908
+ ],
2837
2909
  /**
2838
2910
  * Disabled when:
2839
2911
  * - currently if you're cloning a document we don't support publish & clone at the same time.
@@ -2871,15 +2943,19 @@ const transformData = (data)=>{
2871
2943
  };
2872
2944
  };
2873
2945
  PublishAction$1.type = 'publish';
2874
- PublishAction$1.position = 'panel';
2875
- const UpdateAction = ({ activeTab, documentId, model, collectionType })=>{
2946
+ PublishAction$1.position = [
2947
+ 'panel',
2948
+ 'preview',
2949
+ 'relation-modal'
2950
+ ];
2951
+ const UpdateAction = ({ activeTab, documentId, model, collectionType, onPreview })=>{
2876
2952
  const navigate = reactRouterDom.useNavigate();
2877
2953
  const { toggleNotification } = strapiAdmin.useNotification();
2878
2954
  const { _unstableFormatValidationErrors: formatValidationErrors } = strapiAdmin.useAPIErrorHandler();
2879
2955
  const cloneMatch = reactRouterDom.useMatch(CLONE_PATH);
2880
2956
  const isCloning = cloneMatch !== null;
2881
2957
  const { formatMessage } = reactIntl.useIntl();
2882
- const { create, update, clone } = useDocumentActions();
2958
+ const { create, update, clone, isLoading } = useDocumentActions();
2883
2959
  const [{ query, rawQuery }] = strapiAdmin.useQueryParams();
2884
2960
  const params = React__namespace.useMemo(()=>buildValidParams(query), [
2885
2961
  query
@@ -2891,6 +2967,8 @@ const UpdateAction = ({ activeTab, documentId, model, collectionType })=>{
2891
2967
  const validate = strapiAdmin.useForm('UpdateAction', (state)=>state.validate);
2892
2968
  const setErrors = strapiAdmin.useForm('UpdateAction', (state)=>state.setErrors);
2893
2969
  const resetForm = strapiAdmin.useForm('PublishAction', ({ resetForm })=>resetForm);
2970
+ const rootDocumentMeta = useDocumentContext('UpdateAction', (state)=>state.rootDocumentMeta);
2971
+ const currentDocumentMeta = useDocumentContext('UpdateAction', (state)=>state.meta);
2894
2972
  const handleUpdate = React__namespace.useCallback(async ()=>{
2895
2973
  setSubmitting(true);
2896
2974
  try {
@@ -2927,11 +3005,12 @@ const UpdateAction = ({ activeTab, documentId, model, collectionType })=>{
2927
3005
  setErrors(formatValidationErrors(res.error));
2928
3006
  }
2929
3007
  } else if (documentId || collectionType === SINGLE_TYPES) {
3008
+ const isEditingRelation = rootDocumentMeta.documentId !== currentDocumentMeta.documentId;
2930
3009
  const res = await update({
2931
3010
  collectionType,
2932
3011
  model,
2933
3012
  documentId,
2934
- params
3013
+ params: isEditingRelation ? currentDocumentMeta.params : params
2935
3014
  }, transformData(document));
2936
3015
  if ('error' in res && isBaseQueryError(res.error) && res.error.name === 'ValidationError') {
2937
3016
  setErrors(formatValidationErrors(res.error));
@@ -2957,6 +3036,9 @@ const UpdateAction = ({ activeTab, documentId, model, collectionType })=>{
2957
3036
  }
2958
3037
  } finally{
2959
3038
  setSubmitting(false);
3039
+ if (onPreview) {
3040
+ onPreview();
3041
+ }
2960
3042
  }
2961
3043
  }, [
2962
3044
  clone,
@@ -2996,6 +3078,7 @@ const UpdateAction = ({ activeTab, documentId, model, collectionType })=>{
2996
3078
  handleUpdate
2997
3079
  ]);
2998
3080
  return {
3081
+ loading: isLoading,
2999
3082
  /**
3000
3083
  * Disabled when:
3001
3084
  * - the form is submitting
@@ -3006,11 +3089,20 @@ const UpdateAction = ({ activeTab, documentId, model, collectionType })=>{
3006
3089
  id: 'global.save',
3007
3090
  defaultMessage: 'Save'
3008
3091
  }),
3009
- onClick: handleUpdate
3092
+ onClick: handleUpdate,
3093
+ position: [
3094
+ 'panel',
3095
+ 'preview',
3096
+ 'relation-modal'
3097
+ ]
3010
3098
  };
3011
3099
  };
3012
3100
  UpdateAction.type = 'update';
3013
- UpdateAction.position = 'panel';
3101
+ UpdateAction.position = [
3102
+ 'panel',
3103
+ 'preview',
3104
+ 'relation-modal'
3105
+ ];
3014
3106
  const UNPUBLISH_DRAFT_OPTIONS = {
3015
3107
  KEEP: 'keep',
3016
3108
  DISCARD: 'discard'
@@ -3160,7 +3252,7 @@ const DiscardAction = ({ activeTab, documentId, model, collectionType, document
3160
3252
  const { formatMessage } = reactIntl.useIntl();
3161
3253
  const { schema } = useDoc();
3162
3254
  const canUpdate = useDocumentRBAC('DiscardAction', ({ canUpdate })=>canUpdate);
3163
- const { discard } = useDocumentActions();
3255
+ const { discard, isLoading } = useDocumentActions();
3164
3256
  const [{ query }] = strapiAdmin.useQueryParams();
3165
3257
  const params = React__namespace.useMemo(()=>buildValidParams(query), [
3166
3258
  query
@@ -3206,6 +3298,7 @@ const DiscardAction = ({ activeTab, documentId, model, collectionType, document
3206
3298
  })
3207
3299
  ]
3208
3300
  }),
3301
+ loading: isLoading,
3209
3302
  onConfirm: async ()=>{
3210
3303
  await discard({
3211
3304
  collectionType,
@@ -3300,6 +3393,8 @@ const capitalise = (str)=>str.charAt(0).toUpperCase() + str.slice(1);
3300
3393
  ...restProps,
3301
3394
  size: size,
3302
3395
  variant: statusVariant,
3396
+ role: "status",
3397
+ "aria-label": status,
3303
3398
  children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
3304
3399
  tag: "span",
3305
3400
  variant: "omega",
@@ -3642,7 +3737,7 @@ const DeleteAction$1 = ({ documentId, model, collectionType, document })=>{
3642
3737
  const { formatMessage } = reactIntl.useIntl();
3643
3738
  const listViewPathMatch = reactRouterDom.useMatch(LIST_PATH);
3644
3739
  const canDelete = useDocumentRBAC('DeleteAction', (state)=>state.canDelete);
3645
- const { delete: deleteAction } = useDocumentActions();
3740
+ const { delete: deleteAction, isLoading } = useDocumentActions();
3646
3741
  const { toggleNotification } = strapiAdmin.useNotification();
3647
3742
  const setSubmitting = strapiAdmin.useForm('DeleteAction', (state)=>state.setSubmitting);
3648
3743
  const isLocalized = document?.locale != null;
@@ -3681,6 +3776,7 @@ const DeleteAction$1 = ({ documentId, model, collectionType, document })=>{
3681
3776
  })
3682
3777
  ]
3683
3778
  }),
3779
+ loading: isLoading,
3684
3780
  onConfirm: async ()=>{
3685
3781
  /**
3686
3782
  * If we have a match, we're in the list view
@@ -4362,7 +4458,7 @@ const SelectedEntriesModalContent = ({ listViewSelectedEntries, toggleModal, set
4362
4458
  schema
4363
4459
  ]);
4364
4460
  const [isDialogOpen, setIsDialogOpen] = React__namespace.useState(false);
4365
- const { publishMany: bulkPublishAction } = useDocumentActions();
4461
+ const { publishMany: bulkPublishAction, isLoading: isPublishing } = useDocumentActions();
4366
4462
  const [, { isLoading: isSubmittingForm }] = usePublishManyDocumentsMutation();
4367
4463
  const selectedRows = strapiAdmin.useTable('publishAction', (state)=>state.selectedRows);
4368
4464
  // Filter selected entries from the updated modal table rows
@@ -4434,7 +4530,7 @@ const SelectedEntriesModalContent = ({ listViewSelectedEntries, toggleModal, set
4434
4530
  /*#__PURE__*/ jsxRuntime.jsx(designSystem.Button, {
4435
4531
  onClick: toggleDialog,
4436
4532
  disabled: selectedEntries.length === 0 || selectedEntries.length === selectedEntriesWithErrorsCount || selectedEntriesPublishedCount === selectedEntries.length || isLoading,
4437
- loading: isSubmittingForm,
4533
+ loading: isPublishing || isSubmittingForm,
4438
4534
  children: formatMessage({
4439
4535
  id: 'app.utils.publish',
4440
4536
  defaultMessage: 'Publish'
@@ -4447,7 +4543,7 @@ const SelectedEntriesModalContent = ({ listViewSelectedEntries, toggleModal, set
4447
4543
  /*#__PURE__*/ jsxRuntime.jsx(ConfirmDialogPublishAll, {
4448
4544
  isOpen: isDialogOpen,
4449
4545
  onToggleDialog: toggleDialog,
4450
- isConfirmButtonLoading: isSubmittingForm,
4546
+ isConfirmButtonLoading: isPublishing || isSubmittingForm,
4451
4547
  onConfirm: handleConfirmBulkPublish
4452
4548
  })
4453
4549
  ]
@@ -4539,7 +4635,7 @@ const SelectedEntriesModalContent = ({ listViewSelectedEntries, toggleModal, set
4539
4635
  query
4540
4636
  ]);
4541
4637
  const hasDeletePermission = useDocumentRBAC('deleteAction', (state)=>state.canDelete);
4542
- const { deleteMany: bulkDeleteAction } = useDocumentActions();
4638
+ const { deleteMany: bulkDeleteAction, isLoading } = useDocumentActions();
4543
4639
  const documentIds = documents.map(({ documentId })=>documentId);
4544
4640
  const handleConfirmBulkDelete = async ()=>{
4545
4641
  const res = await bulkDeleteAction({
@@ -4564,6 +4660,7 @@ const SelectedEntriesModalContent = ({ listViewSelectedEntries, toggleModal, set
4564
4660
  id: 'app.components.ConfirmDialog.title',
4565
4661
  defaultMessage: 'Confirmation'
4566
4662
  }),
4663
+ loading: isLoading,
4567
4664
  content: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
4568
4665
  direction: "column",
4569
4666
  alignItems: "stretch",
@@ -4612,7 +4709,7 @@ const UnpublishAction = ({ documents, model })=>{
4612
4709
  const hasPublishPermission = useDocumentRBAC('unpublishAction', (state)=>state.canPublish);
4613
4710
  const hasI18nEnabled = Boolean(schema?.pluginOptions?.i18n);
4614
4711
  const hasDraftAndPublishEnabled = Boolean(schema?.options?.draftAndPublish);
4615
- const { unpublishMany: bulkUnpublishAction } = useDocumentActions();
4712
+ const { unpublishMany: bulkUnpublishAction, isLoading } = useDocumentActions();
4616
4713
  const documentIds = documents.map(({ documentId })=>documentId);
4617
4714
  const [{ query }] = strapiAdmin.useQueryParams();
4618
4715
  const params = React__namespace.useMemo(()=>buildValidParams(query), [
@@ -4642,6 +4739,7 @@ const UnpublishAction = ({ documents, model })=>{
4642
4739
  id: 'app.components.ConfirmDialog.title',
4643
4740
  defaultMessage: 'Confirmation'
4644
4741
  }),
4742
+ loading: isLoading,
4645
4743
  content: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
4646
4744
  direction: "column",
4647
4745
  alignItems: "stretch",
@@ -5023,9 +5121,11 @@ const DEFAULT_TABLE_ROW_ACTIONS = [
5023
5121
  * The response should still be filtered by the position, as the static property is new
5024
5122
  * and not mandatory to avoid a breaking change.
5025
5123
  */ if (position) {
5026
- return this.documentActions.filter((action)=>action.position == undefined || [
5124
+ return this.documentActions.filter((action)=>{
5125
+ return action.position == undefined || [
5027
5126
  action.position
5028
- ].flat().includes(position));
5127
+ ].flat().includes(position);
5128
+ });
5029
5129
  }
5030
5130
  return this.documentActions;
5031
5131
  },
@@ -5277,7 +5377,7 @@ function __variableDynamicImportRuntime1__(path) {
5277
5377
  case './translations/ca.json': return Promise.resolve().then(function () { return require('./ca-ClDTvatJ.js'); });
5278
5378
  case './translations/cs.json': return Promise.resolve().then(function () { return require('./cs-BJFxwIWj.js'); });
5279
5379
  case './translations/de.json': return Promise.resolve().then(function () { return require('./de-CbImAUA5.js'); });
5280
- case './translations/en.json': return Promise.resolve().then(function () { return require('./en-C1CjdAtC.js'); });
5380
+ case './translations/en.json': return Promise.resolve().then(function () { return require('./en-G976DLsg.js'); });
5281
5381
  case './translations/es.json': return Promise.resolve().then(function () { return require('./es-C8vLuvZL.js'); });
5282
5382
  case './translations/eu.json': return Promise.resolve().then(function () { return require('./eu-BJW3AvXu.js'); });
5283
5383
  case './translations/fr.json': return Promise.resolve().then(function () { return require('./fr-gQSilC7w.js'); });
@@ -5300,7 +5400,7 @@ function __variableDynamicImportRuntime1__(path) {
5300
5400
  case './translations/sv.json': return Promise.resolve().then(function () { return require('./sv-BstBC1Yp.js'); });
5301
5401
  case './translations/th.json': return Promise.resolve().then(function () { return require('./th-lXoOCqPC.js'); });
5302
5402
  case './translations/tr.json': return Promise.resolve().then(function () { return require('./tr-CkS6sLIE.js'); });
5303
- case './translations/uk.json': return Promise.resolve().then(function () { return require('./uk-B24MoTVg.js'); });
5403
+ case './translations/uk.json': return Promise.resolve().then(function () { return require('./uk-DB6OgySY.js'); });
5304
5404
  case './translations/vi.json': return Promise.resolve().then(function () { return require('./vi-BGr1X_HZ.js'); });
5305
5405
  case './translations/zh-Hans.json': return Promise.resolve().then(function () { return require('./zh-Hans-JVK9x7xr.js'); });
5306
5406
  case './translations/zh.json': return Promise.resolve().then(function () { return require('./zh-DwFu_Kfj.js'); });
@@ -5331,7 +5431,7 @@ var index = {
5331
5431
  app.router.addRoute({
5332
5432
  path: 'content-manager/*',
5333
5433
  lazy: async ()=>{
5334
- const { Layout } = await Promise.resolve().then(function () { return require('./layout-ameRNiAM.js'); });
5434
+ const { Layout } = await Promise.resolve().then(function () { return require('./layout-Cr0HaJVS.js'); });
5335
5435
  return {
5336
5436
  Component: Layout
5337
5437
  };
@@ -5372,6 +5472,8 @@ exports.CLONE_PATH = CLONE_PATH;
5372
5472
  exports.COLLECTION_TYPES = COLLECTION_TYPES;
5373
5473
  exports.CREATOR_FIELDS = CREATOR_FIELDS;
5374
5474
  exports.DEFAULT_SETTINGS = DEFAULT_SETTINGS;
5475
+ exports.DocumentActionButton = DocumentActionButton;
5476
+ exports.DocumentContextProvider = DocumentContextProvider;
5375
5477
  exports.DocumentRBAC = DocumentRBAC;
5376
5478
  exports.DocumentStatus = DocumentStatus;
5377
5479
  exports.HOOKS = HOOKS;
@@ -5405,6 +5507,7 @@ exports.useDoc = useDoc;
5405
5507
  exports.useDocLayout = useDocLayout;
5406
5508
  exports.useDocument = useDocument;
5407
5509
  exports.useDocumentActions = useDocumentActions;
5510
+ exports.useDocumentContext = useDocumentContext;
5408
5511
  exports.useDocumentLayout = useDocumentLayout;
5409
5512
  exports.useDocumentRBAC = useDocumentRBAC;
5410
5513
  exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
@@ -5412,5 +5515,6 @@ exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
5412
5515
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
5413
5516
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
5414
5517
  exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
5518
+ exports.useLazyGetDocumentQuery = useLazyGetDocumentQuery;
5415
5519
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
5416
- //# sourceMappingURL=index-ZIwOPk6p.js.map
5520
+ //# sourceMappingURL=index-BwIhYBsG.js.map