@strapi/content-manager 0.0.0-experimental.e02b4637b3906c6d31048d00600d09a23a0edc3d → 0.0.0-experimental.e0df4d50334a17a1beb3d203bff414fbbff62f7b

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 (491) hide show
  1. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs +80 -0
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  3. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +82 -0
  4. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +1 -0
  5. package/dist/admin/chunks/ComponentConfigurationPage-BN2kOtDm.mjs +277 -0
  6. package/dist/admin/chunks/ComponentConfigurationPage-BN2kOtDm.mjs.map +1 -0
  7. package/dist/admin/chunks/ComponentConfigurationPage-C5H-5L1u.js +299 -0
  8. package/dist/admin/chunks/ComponentConfigurationPage-C5H-5L1u.js.map +1 -0
  9. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs +153 -0
  10. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  11. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +176 -0
  12. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +1 -0
  13. package/dist/admin/chunks/EditConfigurationPage-BExtZuB7.js +181 -0
  14. package/dist/admin/chunks/EditConfigurationPage-BExtZuB7.js.map +1 -0
  15. package/dist/admin/chunks/EditConfigurationPage-tMgOELQG.mjs +159 -0
  16. package/dist/admin/chunks/EditConfigurationPage-tMgOELQG.mjs.map +1 -0
  17. package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs +314 -0
  18. package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs.map +1 -0
  19. package/dist/admin/chunks/EditViewPage-DFkloeMZ.js +337 -0
  20. package/dist/admin/chunks/EditViewPage-DFkloeMZ.js.map +1 -0
  21. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs +56 -0
  22. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  23. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +58 -0
  24. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +1 -0
  25. package/dist/admin/chunks/Form-DGUP3zQO.js +978 -0
  26. package/dist/admin/chunks/Form-DGUP3zQO.js.map +1 -0
  27. package/dist/admin/chunks/Form-DTO0ZIaB.mjs +955 -0
  28. package/dist/admin/chunks/Form-DTO0ZIaB.mjs.map +1 -0
  29. package/dist/admin/chunks/History-C333pgXF.mjs +1357 -0
  30. package/dist/admin/chunks/History-C333pgXF.mjs.map +1 -0
  31. package/dist/admin/chunks/History-CQznK1pG.js +1380 -0
  32. package/dist/admin/chunks/History-CQznK1pG.js.map +1 -0
  33. package/dist/admin/chunks/Input-BexkC_pp.mjs +7190 -0
  34. package/dist/admin/chunks/Input-BexkC_pp.mjs.map +1 -0
  35. package/dist/admin/chunks/Input-DLJZHw9Y.js +7221 -0
  36. package/dist/admin/chunks/Input-DLJZHw9Y.js.map +1 -0
  37. package/dist/admin/chunks/ListConfigurationPage-71I_stAM.js +819 -0
  38. package/dist/admin/chunks/ListConfigurationPage-71I_stAM.js.map +1 -0
  39. package/dist/admin/chunks/ListConfigurationPage-BX2WR7MI.mjs +796 -0
  40. package/dist/admin/chunks/ListConfigurationPage-BX2WR7MI.mjs.map +1 -0
  41. package/dist/admin/chunks/ListViewPage-BDeT3Dkk.mjs +1133 -0
  42. package/dist/admin/chunks/ListViewPage-BDeT3Dkk.mjs.map +1 -0
  43. package/dist/admin/chunks/ListViewPage-DV3heO4F.js +1155 -0
  44. package/dist/admin/chunks/ListViewPage-DV3heO4F.js.map +1 -0
  45. package/dist/admin/chunks/NoContentTypePage-9JHYpYVX.mjs +58 -0
  46. package/dist/admin/chunks/NoContentTypePage-9JHYpYVX.mjs.map +1 -0
  47. package/dist/admin/chunks/NoContentTypePage-COih9y2J.js +60 -0
  48. package/dist/admin/chunks/NoContentTypePage-COih9y2J.js.map +1 -0
  49. package/dist/admin/chunks/NoPermissionsPage-DGAwRIlN.js +39 -0
  50. package/dist/admin/chunks/NoPermissionsPage-DGAwRIlN.js.map +1 -0
  51. package/dist/admin/chunks/NoPermissionsPage-DTe9I47q.mjs +37 -0
  52. package/dist/admin/chunks/NoPermissionsPage-DTe9I47q.mjs.map +1 -0
  53. package/dist/admin/chunks/Preview-BEq0FXda.mjs +551 -0
  54. package/dist/admin/chunks/Preview-BEq0FXda.mjs.map +1 -0
  55. package/dist/admin/chunks/Preview-CXtc9yEV.js +573 -0
  56. package/dist/admin/chunks/Preview-CXtc9yEV.js.map +1 -0
  57. package/dist/admin/chunks/Relations-o7_hVGyK.js +1318 -0
  58. package/dist/admin/chunks/Relations-o7_hVGyK.js.map +1 -0
  59. package/dist/admin/chunks/Relations-qeZyLDgQ.mjs +1291 -0
  60. package/dist/admin/chunks/Relations-qeZyLDgQ.mjs.map +1 -0
  61. package/dist/admin/chunks/ar-DckYq_WK.mjs +222 -0
  62. package/dist/{_chunks/ar-CCEVvqGG.mjs.map → admin/chunks/ar-DckYq_WK.mjs.map} +1 -1
  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.mjs +197 -0
  68. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  69. package/dist/admin/chunks/cs-BJFxwIWj.js +126 -0
  70. package/dist/{_chunks/cs-CkJy6B2v.js.map → admin/chunks/cs-BJFxwIWj.js.map} +1 -1
  71. package/dist/admin/chunks/cs-C7OSYFQ7.mjs +122 -0
  72. package/dist/{_chunks/cs-CM2aBUar.mjs.map → admin/chunks/cs-C7OSYFQ7.mjs.map} +1 -1
  73. package/dist/admin/chunks/de-5QRlDHyR.mjs +195 -0
  74. package/dist/{_chunks/eu-CdALomew.mjs.map → admin/chunks/de-5QRlDHyR.mjs.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-Bm0D0IWz.js.map → admin/chunks/en-C1CjdAtC.js.map} +1 -1
  79. package/dist/admin/chunks/en-LfhocNG2.mjs +308 -0
  80. package/dist/{_chunks/en-DKV44jRb.mjs.map → admin/chunks/en-LfhocNG2.mjs.map} +1 -1
  81. package/dist/admin/chunks/es-C8vLuvZL.js +197 -0
  82. package/dist/{_chunks/es-EUonQTon.js.map → admin/chunks/es-C8vLuvZL.js.map} +1 -1
  83. package/dist/admin/chunks/es-DkoWSExG.mjs +192 -0
  84. package/dist/{_chunks/ja-CtsUxOvk.mjs.map → admin/chunks/es-DkoWSExG.mjs.map} +1 -1
  85. package/dist/admin/chunks/eu-BG1xX7HK.mjs +198 -0
  86. package/dist/admin/chunks/eu-BG1xX7HK.mjs.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.mjs +215 -0
  90. package/dist/admin/chunks/fr-CFdRaRVj.mjs.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.mjs +196 -0
  94. package/dist/admin/chunks/gu-D5MMMXRs.mjs.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.mjs +196 -0
  100. package/dist/admin/chunks/hi-lp17SCjr.mjs.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_.mjs +7 -0
  104. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  105. package/dist/admin/chunks/hu-CLka1U2C.mjs +198 -0
  106. package/dist/admin/chunks/hu-CLka1U2C.mjs.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.mjs +156 -0
  112. package/dist/{_chunks/id-BtwA9WJT.mjs.map → admin/chunks/id-USfY9m1g.mjs.map} +1 -1
  113. package/dist/admin/chunks/index-BHimg6jW.js +5417 -0
  114. package/dist/admin/chunks/index-BHimg6jW.js.map +1 -0
  115. package/dist/admin/chunks/index-Cs6qwFQu.mjs +5351 -0
  116. package/dist/admin/chunks/index-Cs6qwFQu.mjs.map +1 -0
  117. package/dist/admin/chunks/it-BAHrwmYS.mjs +158 -0
  118. package/dist/{_chunks/it-BrVPqaf1.mjs.map → admin/chunks/it-BAHrwmYS.mjs.map} +1 -1
  119. package/dist/admin/chunks/it-CQFpa_Dc.js +163 -0
  120. package/dist/{_chunks/ko-woFZPmLk.js.map → admin/chunks/it-CQFpa_Dc.js.map} +1 -1
  121. package/dist/admin/chunks/ja-BWKmBJFT.mjs +192 -0
  122. package/dist/{_chunks/ko-HVQRlfUI.mjs.map → admin/chunks/ja-BWKmBJFT.mjs.map} +1 -1
  123. package/dist/admin/chunks/ja-jdQM-B79.js +197 -0
  124. package/dist/{_chunks/de-CCEmbAah.js.map → admin/chunks/ja-jdQM-B79.js.map} +1 -1
  125. package/dist/admin/chunks/ko-CgADGBNt.mjs +191 -0
  126. package/dist/{_chunks/es-CeXiYflN.mjs.map → admin/chunks/ko-CgADGBNt.mjs.map} +1 -1
  127. package/dist/admin/chunks/ko-k46sEyzt.js +196 -0
  128. package/dist/{_chunks/ja-CcFe8diO.js.map → admin/chunks/ko-k46sEyzt.js.map} +1 -1
  129. package/dist/admin/chunks/layout-DStNia_P.mjs +599 -0
  130. package/dist/admin/chunks/layout-DStNia_P.mjs.map +1 -0
  131. package/dist/admin/chunks/layout-Dtahn4Ue.js +619 -0
  132. package/dist/admin/chunks/layout-Dtahn4Ue.js.map +1 -0
  133. package/dist/admin/chunks/ml-CnhCfOn_.mjs +196 -0
  134. package/dist/admin/chunks/ml-CnhCfOn_.mjs.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.mjs +140 -0
  138. package/dist/{_chunks/ms-m_WjyWx7.mjs.map → admin/chunks/ms-Bh09NFff.mjs.map} +1 -1
  139. package/dist/admin/chunks/ms-CvSC0OdG.js +145 -0
  140. package/dist/{_chunks/ms-BuFotyP_.js.map → admin/chunks/ms-CvSC0OdG.js.map} +1 -1
  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.mjs +198 -0
  144. package/dist/admin/chunks/nl-C8HYflTc.mjs.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.mjs +73 -0
  148. package/dist/admin/chunks/objects-wl73iEma.mjs.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.mjs +195 -0
  152. package/dist/{_chunks/ca-5U32ON2v.mjs.map → admin/chunks/pl-MFCZJZuZ.mjs.map} +1 -1
  153. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +202 -0
  154. package/dist/{_chunks/pt-BR-BiOz37D9.js.map → admin/chunks/pt-BR-CPtAXD-4.js.map} +1 -1
  155. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs +197 -0
  156. package/dist/{_chunks/pt-BR-C71iDxnh.mjs.map → admin/chunks/pt-BR-CcotyBGJ.mjs.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.mjs +93 -0
  160. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  161. package/dist/admin/chunks/relations-Cq8NRUto.mjs +173 -0
  162. package/dist/admin/chunks/relations-Cq8NRUto.mjs.map +1 -0
  163. package/dist/admin/chunks/relations-XOYEEqMz.js +178 -0
  164. package/dist/admin/chunks/relations-XOYEEqMz.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.mjs +230 -0
  168. package/dist/{_chunks/ru-BE6A4Exp.mjs.map → admin/chunks/ru-CB4BUyQp.mjs.map} +1 -1
  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.mjs +196 -0
  172. package/dist/admin/chunks/sa-n_aPA-pU.mjs.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.mjs +198 -0
  176. package/dist/admin/chunks/sk-tn_BDjE2.mjs.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.mjs +198 -0
  180. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.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.mjs +144 -0
  184. package/dist/{_chunks/th-BqbI8lIT.mjs.map → admin/chunks/th-mUH7hEtc.mjs.map} +1 -1
  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.mjs +195 -0
  188. package/dist/{_chunks/de-C72KDNOl.mjs.map → admin/chunks/tr-Yt38daxh.mjs.map} +1 -1
  189. package/dist/admin/chunks/uk-B24MoTVg.js +145 -0
  190. package/dist/{_chunks/uk-C8EiqJY7.js.map → admin/chunks/uk-B24MoTVg.js.map} +1 -1
  191. package/dist/admin/chunks/uk-Cpgmm7gE.mjs +140 -0
  192. package/dist/{_chunks/uk-CR-zDhAY.mjs.map → admin/chunks/uk-Cpgmm7gE.mjs.map} +1 -1
  193. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs +247 -0
  194. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs.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.mjs +18 -0
  198. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs.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/{_chunks/vi-CJlYDheJ.js.map → admin/chunks/vi-BGr1X_HZ.js.map} +1 -1
  203. package/dist/admin/chunks/vi-CvBGlTjr.mjs +108 -0
  204. package/dist/{_chunks/vi-DUXIk_fw.mjs.map → admin/chunks/vi-CvBGlTjr.mjs.map} +1 -1
  205. package/dist/admin/chunks/zh-BmF-sHaT.mjs +205 -0
  206. package/dist/admin/chunks/zh-BmF-sHaT.mjs.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.mjs +934 -0
  210. package/dist/{_chunks/zh-Hans-BPQcRIyH.mjs.map → admin/chunks/zh-Hans-CI0HKio3.mjs.map} +1 -1
  211. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +953 -0
  212. package/dist/{_chunks/zh-Hans-9kOncHGw.js.map → admin/chunks/zh-Hans-JVK9x7xr.js.map} +1 -1
  213. package/dist/admin/index.js +25 -4
  214. package/dist/admin/index.js.map +1 -1
  215. package/dist/admin/index.mjs +17 -12
  216. package/dist/admin/index.mjs.map +1 -1
  217. package/dist/admin/src/content-manager.d.ts +3 -2
  218. package/dist/admin/src/exports.d.ts +1 -0
  219. package/dist/admin/src/history/services/historyVersion.d.ts +2 -2
  220. package/dist/admin/src/hooks/useDocument.d.ts +21 -4
  221. package/dist/admin/src/index.d.ts +1 -0
  222. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  223. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
  224. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
  225. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  226. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +55 -0
  227. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +1 -0
  228. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
  229. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
  230. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +2 -1
  231. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  232. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +29 -1
  233. package/dist/admin/src/pages/EditView/utils/data.d.ts +1 -0
  234. package/dist/admin/src/preview/components/PreviewContent.d.ts +3 -0
  235. package/dist/admin/src/preview/components/PreviewHeader.d.ts +3 -0
  236. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  237. package/dist/admin/src/preview/index.d.ts +3 -0
  238. package/dist/admin/src/preview/pages/Preview.d.ts +13 -0
  239. package/dist/admin/src/preview/routes.d.ts +3 -0
  240. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  241. package/dist/admin/src/router.d.ts +1 -1
  242. package/dist/admin/src/services/api.d.ts +1 -1
  243. package/dist/admin/src/services/components.d.ts +2 -2
  244. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  245. package/dist/admin/src/services/documents.d.ts +16 -19
  246. package/dist/admin/src/services/init.d.ts +1 -1
  247. package/dist/admin/src/services/relations.d.ts +2 -2
  248. package/dist/admin/src/services/uid.d.ts +3 -3
  249. package/dist/server/index.js +5472 -4157
  250. package/dist/server/index.js.map +1 -1
  251. package/dist/server/index.mjs +5457 -4139
  252. package/dist/server/index.mjs.map +1 -1
  253. package/dist/server/src/bootstrap.d.ts.map +1 -1
  254. package/dist/server/src/controllers/index.d.ts.map +1 -1
  255. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  256. package/dist/server/src/controllers/utils/metadata.d.ts +17 -2
  257. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  258. package/dist/server/src/history/controllers/history-version.d.ts +1 -1
  259. package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
  260. package/dist/server/src/history/services/history.d.ts +3 -3
  261. package/dist/server/src/history/services/history.d.ts.map +1 -1
  262. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  263. package/dist/server/src/history/services/utils.d.ts +6 -11
  264. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  265. package/dist/server/src/index.d.ts +7 -6
  266. package/dist/server/src/index.d.ts.map +1 -1
  267. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  268. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  269. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  270. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  271. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  272. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  273. package/dist/server/src/preview/index.d.ts +4 -0
  274. package/dist/server/src/preview/index.d.ts.map +1 -0
  275. package/dist/server/src/preview/routes/index.d.ts +8 -0
  276. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  277. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  278. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  279. package/dist/server/src/preview/services/index.d.ts +16 -0
  280. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  281. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  282. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  283. package/dist/server/src/preview/services/preview.d.ts +12 -0
  284. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  285. package/dist/server/src/preview/utils.d.ts +19 -0
  286. package/dist/server/src/preview/utils.d.ts.map +1 -0
  287. package/dist/server/src/register.d.ts.map +1 -1
  288. package/dist/server/src/routes/index.d.ts.map +1 -1
  289. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  290. package/dist/server/src/services/document-metadata.d.ts +12 -10
  291. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  292. package/dist/server/src/services/index.d.ts +7 -6
  293. package/dist/server/src/services/index.d.ts.map +1 -1
  294. package/dist/server/src/services/utils/count.d.ts +1 -1
  295. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  296. package/dist/server/src/services/utils/populate.d.ts +3 -3
  297. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  298. package/dist/server/src/utils/index.d.ts +2 -0
  299. package/dist/server/src/utils/index.d.ts.map +1 -1
  300. package/dist/shared/contracts/collection-types.d.ts +0 -1
  301. package/dist/shared/contracts/components.d.ts +0 -1
  302. package/dist/shared/contracts/content-types.d.ts +0 -1
  303. package/dist/shared/contracts/history-versions.d.ts +0 -1
  304. package/dist/shared/contracts/index.d.ts +1 -1
  305. package/dist/shared/contracts/index.d.ts.map +1 -1
  306. package/dist/shared/contracts/init.d.ts +0 -1
  307. package/dist/shared/contracts/preview.d.ts +26 -0
  308. package/dist/shared/contracts/preview.d.ts.map +1 -0
  309. package/dist/shared/contracts/relations.d.ts +1 -2
  310. package/dist/shared/contracts/relations.d.ts.map +1 -1
  311. package/dist/shared/contracts/review-workflows.d.ts +0 -1
  312. package/dist/shared/contracts/single-types.d.ts +0 -1
  313. package/dist/shared/contracts/uid.d.ts +0 -1
  314. package/dist/shared/index.d.ts +0 -1
  315. package/dist/shared/index.js +37 -22
  316. package/dist/shared/index.js.map +1 -1
  317. package/dist/shared/index.mjs +36 -23
  318. package/dist/shared/index.mjs.map +1 -1
  319. package/package.json +20 -16
  320. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +0 -69
  321. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +0 -1
  322. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +0 -70
  323. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +0 -1
  324. package/dist/_chunks/ComponentConfigurationPage-DfFSZQxe.mjs +0 -236
  325. package/dist/_chunks/ComponentConfigurationPage-DfFSZQxe.mjs.map +0 -1
  326. package/dist/_chunks/ComponentConfigurationPage-FqfsxQ1j.js +0 -255
  327. package/dist/_chunks/ComponentConfigurationPage-FqfsxQ1j.js.map +0 -1
  328. package/dist/_chunks/ComponentIcon-BXdiCGQp.js +0 -176
  329. package/dist/_chunks/ComponentIcon-BXdiCGQp.js.map +0 -1
  330. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +0 -157
  331. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +0 -1
  332. package/dist/_chunks/EditConfigurationPage-Cn0e8t3I.js +0 -151
  333. package/dist/_chunks/EditConfigurationPage-Cn0e8t3I.js.map +0 -1
  334. package/dist/_chunks/EditConfigurationPage-DdPNAbl3.mjs +0 -132
  335. package/dist/_chunks/EditConfigurationPage-DdPNAbl3.mjs.map +0 -1
  336. package/dist/_chunks/EditViewPage-B82x_x1b.mjs +0 -224
  337. package/dist/_chunks/EditViewPage-B82x_x1b.mjs.map +0 -1
  338. package/dist/_chunks/EditViewPage-DlxEHhUt.js +0 -243
  339. package/dist/_chunks/EditViewPage-DlxEHhUt.js.map +0 -1
  340. package/dist/_chunks/Field-COL25JiC.js +0 -5595
  341. package/dist/_chunks/Field-COL25JiC.js.map +0 -1
  342. package/dist/_chunks/Field-DufHXW17.mjs +0 -5563
  343. package/dist/_chunks/Field-DufHXW17.mjs.map +0 -1
  344. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +0 -50
  345. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +0 -1
  346. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +0 -49
  347. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +0 -1
  348. package/dist/_chunks/Form-BssUwrTO.js +0 -779
  349. package/dist/_chunks/Form-BssUwrTO.js.map +0 -1
  350. package/dist/_chunks/Form-u_kAOhwB.mjs +0 -758
  351. package/dist/_chunks/Form-u_kAOhwB.mjs.map +0 -1
  352. package/dist/_chunks/History-C9t9UqpO.js +0 -1066
  353. package/dist/_chunks/History-C9t9UqpO.js.map +0 -1
  354. package/dist/_chunks/History-DRwA3oMM.mjs +0 -1045
  355. package/dist/_chunks/History-DRwA3oMM.mjs.map +0 -1
  356. package/dist/_chunks/ListConfigurationPage-BXYPohh-.js +0 -652
  357. package/dist/_chunks/ListConfigurationPage-BXYPohh-.js.map +0 -1
  358. package/dist/_chunks/ListConfigurationPage-BxfQJzPk.mjs +0 -632
  359. package/dist/_chunks/ListConfigurationPage-BxfQJzPk.mjs.map +0 -1
  360. package/dist/_chunks/ListViewPage-CELx2ysp.mjs +0 -828
  361. package/dist/_chunks/ListViewPage-CELx2ysp.mjs.map +0 -1
  362. package/dist/_chunks/ListViewPage-D2VD8Szg.js +0 -852
  363. package/dist/_chunks/ListViewPage-D2VD8Szg.js.map +0 -1
  364. package/dist/_chunks/NoContentTypePage-BV9IjJSM.js +0 -51
  365. package/dist/_chunks/NoContentTypePage-BV9IjJSM.js.map +0 -1
  366. package/dist/_chunks/NoContentTypePage-DtJ9jcfk.mjs +0 -51
  367. package/dist/_chunks/NoContentTypePage-DtJ9jcfk.mjs.map +0 -1
  368. package/dist/_chunks/NoPermissionsPage-DWleVYK7.mjs +0 -23
  369. package/dist/_chunks/NoPermissionsPage-DWleVYK7.mjs.map +0 -1
  370. package/dist/_chunks/NoPermissionsPage-Dp8NpF9I.js +0 -23
  371. package/dist/_chunks/NoPermissionsPage-Dp8NpF9I.js.map +0 -1
  372. package/dist/_chunks/Relations-BTcf5xaw.mjs +0 -703
  373. package/dist/_chunks/Relations-BTcf5xaw.mjs.map +0 -1
  374. package/dist/_chunks/Relations-DR7EUgyC.js +0 -723
  375. package/dist/_chunks/Relations-DR7EUgyC.js.map +0 -1
  376. package/dist/_chunks/ar-BUUWXIYu.js +0 -226
  377. package/dist/_chunks/ar-BUUWXIYu.js.map +0 -1
  378. package/dist/_chunks/ar-CCEVvqGG.mjs +0 -226
  379. package/dist/_chunks/ca-5U32ON2v.mjs +0 -201
  380. package/dist/_chunks/ca-Cmk45QO6.js +0 -201
  381. package/dist/_chunks/cs-CM2aBUar.mjs +0 -125
  382. package/dist/_chunks/cs-CkJy6B2v.js +0 -125
  383. package/dist/_chunks/de-C72KDNOl.mjs +0 -199
  384. package/dist/_chunks/de-CCEmbAah.js +0 -199
  385. package/dist/_chunks/en-Bm0D0IWz.js +0 -293
  386. package/dist/_chunks/en-DKV44jRb.mjs +0 -293
  387. package/dist/_chunks/es-CeXiYflN.mjs +0 -196
  388. package/dist/_chunks/es-EUonQTon.js +0 -196
  389. package/dist/_chunks/eu-CdALomew.mjs +0 -202
  390. package/dist/_chunks/eu-VDH-3ovk.js +0 -202
  391. package/dist/_chunks/fr-B7kGGg3E.js +0 -206
  392. package/dist/_chunks/fr-B7kGGg3E.js.map +0 -1
  393. package/dist/_chunks/fr-CD9VFbPM.mjs +0 -206
  394. package/dist/_chunks/fr-CD9VFbPM.mjs.map +0 -1
  395. package/dist/_chunks/gu-BRmF601H.js +0 -200
  396. package/dist/_chunks/gu-CNpaMDpH.mjs +0 -200
  397. package/dist/_chunks/gu-CNpaMDpH.mjs.map +0 -1
  398. package/dist/_chunks/hi-CCJBptSq.js +0 -200
  399. package/dist/_chunks/hi-CCJBptSq.js.map +0 -1
  400. package/dist/_chunks/hi-Dwvd04m3.mjs +0 -200
  401. package/dist/_chunks/hi-Dwvd04m3.mjs.map +0 -1
  402. package/dist/_chunks/hooks-BAaaKPS_.js.map +0 -1
  403. package/dist/_chunks/hooks-E5u1mcgM.mjs +0 -8
  404. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +0 -1
  405. package/dist/_chunks/hu-CeYvaaO0.mjs +0 -202
  406. package/dist/_chunks/hu-CeYvaaO0.mjs.map +0 -1
  407. package/dist/_chunks/hu-sNV_yLYy.js +0 -202
  408. package/dist/_chunks/hu-sNV_yLYy.js.map +0 -1
  409. package/dist/_chunks/id-B5Ser98A.js +0 -160
  410. package/dist/_chunks/id-B5Ser98A.js.map +0 -1
  411. package/dist/_chunks/id-BtwA9WJT.mjs +0 -160
  412. package/dist/_chunks/index-BdMf2lfT.js +0 -4109
  413. package/dist/_chunks/index-BdMf2lfT.js.map +0 -1
  414. package/dist/_chunks/index-wnqzm4Q8.mjs +0 -4090
  415. package/dist/_chunks/index-wnqzm4Q8.mjs.map +0 -1
  416. package/dist/_chunks/it-BrVPqaf1.mjs +0 -162
  417. package/dist/_chunks/it-DkBIs7vD.js +0 -162
  418. package/dist/_chunks/ja-CcFe8diO.js +0 -196
  419. package/dist/_chunks/ja-CtsUxOvk.mjs +0 -196
  420. package/dist/_chunks/ko-HVQRlfUI.mjs +0 -195
  421. package/dist/_chunks/ko-woFZPmLk.js +0 -195
  422. package/dist/_chunks/layout-2CfjL0T9.mjs +0 -471
  423. package/dist/_chunks/layout-2CfjL0T9.mjs.map +0 -1
  424. package/dist/_chunks/layout-B2MyZU-_.js +0 -489
  425. package/dist/_chunks/layout-B2MyZU-_.js.map +0 -1
  426. package/dist/_chunks/ml-BihZwQit.mjs +0 -200
  427. package/dist/_chunks/ml-BihZwQit.mjs.map +0 -1
  428. package/dist/_chunks/ml-C2W8N8k1.js +0 -200
  429. package/dist/_chunks/ml-C2W8N8k1.js.map +0 -1
  430. package/dist/_chunks/ms-BuFotyP_.js +0 -144
  431. package/dist/_chunks/ms-m_WjyWx7.mjs +0 -144
  432. package/dist/_chunks/nl-D4R9gHx5.mjs +0 -202
  433. package/dist/_chunks/nl-D4R9gHx5.mjs.map +0 -1
  434. package/dist/_chunks/nl-bbEOHChV.js +0 -202
  435. package/dist/_chunks/nl-bbEOHChV.js.map +0 -1
  436. package/dist/_chunks/objects-gigeqt7s.js +0 -49
  437. package/dist/_chunks/objects-gigeqt7s.js.map +0 -1
  438. package/dist/_chunks/objects-mKMAmfec.mjs +0 -47
  439. package/dist/_chunks/objects-mKMAmfec.mjs.map +0 -1
  440. package/dist/_chunks/pl-sbx9mSt_.mjs +0 -199
  441. package/dist/_chunks/pl-sbx9mSt_.mjs.map +0 -1
  442. package/dist/_chunks/pl-uzwG-hk7.js +0 -199
  443. package/dist/_chunks/pl-uzwG-hk7.js.map +0 -1
  444. package/dist/_chunks/pt-BR-BiOz37D9.js +0 -201
  445. package/dist/_chunks/pt-BR-C71iDxnh.mjs +0 -201
  446. package/dist/_chunks/pt-BsaFvS8-.mjs +0 -95
  447. package/dist/_chunks/pt-BsaFvS8-.mjs.map +0 -1
  448. package/dist/_chunks/pt-CeXQuq50.js +0 -95
  449. package/dist/_chunks/pt-CeXQuq50.js.map +0 -1
  450. package/dist/_chunks/relations-BH7JJGGe.js +0 -134
  451. package/dist/_chunks/relations-BH7JJGGe.js.map +0 -1
  452. package/dist/_chunks/relations-C0w0GcXi.mjs +0 -135
  453. package/dist/_chunks/relations-C0w0GcXi.mjs.map +0 -1
  454. package/dist/_chunks/ru-BE6A4Exp.mjs +0 -231
  455. package/dist/_chunks/ru-BT3ybNny.js +0 -231
  456. package/dist/_chunks/sa-CcvkYInH.js +0 -200
  457. package/dist/_chunks/sa-CcvkYInH.js.map +0 -1
  458. package/dist/_chunks/sa-Dag0k-Z8.mjs +0 -200
  459. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +0 -1
  460. package/dist/_chunks/sk-BFg-R8qJ.mjs +0 -202
  461. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +0 -1
  462. package/dist/_chunks/sk-CvY09Xjv.js +0 -202
  463. package/dist/_chunks/sk-CvY09Xjv.js.map +0 -1
  464. package/dist/_chunks/sv-CUnfWGsh.mjs +0 -202
  465. package/dist/_chunks/sv-CUnfWGsh.mjs.map +0 -1
  466. package/dist/_chunks/sv-MYDuzgvT.js +0 -202
  467. package/dist/_chunks/sv-MYDuzgvT.js.map +0 -1
  468. package/dist/_chunks/th-BqbI8lIT.mjs +0 -148
  469. package/dist/_chunks/th-D9_GfAjc.js +0 -148
  470. package/dist/_chunks/tr-CgeK3wJM.mjs +0 -199
  471. package/dist/_chunks/tr-CgeK3wJM.mjs.map +0 -1
  472. package/dist/_chunks/tr-D9UH-O_R.js +0 -199
  473. package/dist/_chunks/tr-D9UH-O_R.js.map +0 -1
  474. package/dist/_chunks/uk-C8EiqJY7.js +0 -144
  475. package/dist/_chunks/uk-CR-zDhAY.mjs +0 -144
  476. package/dist/_chunks/useDebounce-CtcjDB3L.js +0 -28
  477. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +0 -1
  478. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +0 -29
  479. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +0 -1
  480. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs +0 -231
  481. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +0 -1
  482. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js +0 -249
  483. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +0 -1
  484. package/dist/_chunks/vi-CJlYDheJ.js +0 -111
  485. package/dist/_chunks/vi-DUXIk_fw.mjs +0 -111
  486. package/dist/_chunks/zh-BWZspA60.mjs +0 -209
  487. package/dist/_chunks/zh-BWZspA60.mjs.map +0 -1
  488. package/dist/_chunks/zh-CQQfszqR.js +0 -209
  489. package/dist/_chunks/zh-CQQfszqR.js.map +0 -1
  490. package/dist/_chunks/zh-Hans-9kOncHGw.js +0 -952
  491. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +0 -952
@@ -1,236 +0,0 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { useNotification, useAPIErrorHandler, Page } from "@strapi/admin/strapi-admin";
4
- import { useIntl } from "react-intl";
5
- import { useParams } from "react-router-dom";
6
- import { C as ConfigurationForm, T as TEMP_FIELD_NAME } from "./Form-u_kAOhwB.mjs";
7
- import { e as contentManagerApi, a as useGetInitialDataQuery, E as extractContentTypeComponents, F as DEFAULT_SETTINGS, G as convertEditLayoutToFieldLayouts } from "./index-wnqzm4Q8.mjs";
8
- import { u as useTypedSelector } from "./hooks-E5u1mcgM.mjs";
9
- import { s as setIn } from "./objects-mKMAmfec.mjs";
10
- const componentsApi = contentManagerApi.injectEndpoints({
11
- endpoints: (builder) => ({
12
- getComponentConfiguration: builder.query({
13
- query: (uid) => `/content-manager/components/${uid}/configuration`,
14
- transformResponse: (response) => response.data,
15
- providesTags: (_result, _error, uid) => [{ type: "ComponentConfiguration", id: uid }]
16
- }),
17
- updateComponentConfiguration: builder.mutation({
18
- query: ({ uid, ...body }) => ({
19
- url: `/content-manager/components/${uid}/configuration`,
20
- method: "PUT",
21
- data: body
22
- }),
23
- transformResponse: (response) => response.data,
24
- invalidatesTags: (_result, _error, { uid }) => [
25
- { type: "ComponentConfiguration", id: uid },
26
- // otherwise layouts already fetched will have stale component configuration data.
27
- { type: "ContentTypeSettings", id: "LIST" }
28
- ]
29
- })
30
- })
31
- });
32
- const { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation } = componentsApi;
33
- const ComponentConfigurationPage = () => {
34
- const { slug: model } = useParams();
35
- const { toggleNotification } = useNotification();
36
- const { formatMessage } = useIntl();
37
- const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
38
- const {
39
- components,
40
- fieldSizes,
41
- schema,
42
- error: errorSchema,
43
- isLoading: isLoadingSchema,
44
- isFetching: isFetchingSchema
45
- } = useGetInitialDataQuery(void 0, {
46
- selectFromResult: (res) => {
47
- const schema2 = res.data?.components.find((ct) => ct.uid === model);
48
- const componentsByKey = res.data?.components.reduce(
49
- (acc, component) => {
50
- acc[component.uid] = component;
51
- return acc;
52
- },
53
- {}
54
- );
55
- const components2 = extractContentTypeComponents(schema2?.attributes, componentsByKey);
56
- const fieldSizes2 = Object.entries(res.data?.fieldSizes ?? {}).reduce((acc, [attributeName, { default: size }]) => {
57
- acc[attributeName] = size;
58
- return acc;
59
- }, {});
60
- return {
61
- isFetching: res.isFetching,
62
- isLoading: res.isLoading,
63
- error: res.error,
64
- components: components2,
65
- schema: schema2,
66
- fieldSizes: fieldSizes2
67
- };
68
- }
69
- });
70
- React.useEffect(() => {
71
- if (errorSchema) {
72
- toggleNotification({
73
- type: "danger",
74
- message: formatAPIError(errorSchema)
75
- });
76
- }
77
- }, [errorSchema, formatAPIError, toggleNotification]);
78
- const {
79
- data,
80
- isLoading: isLoadingConfig,
81
- isFetching: isFetchingConfig,
82
- error
83
- } = useGetComponentConfigurationQuery(model ?? "");
84
- React.useEffect(() => {
85
- if (error) {
86
- toggleNotification({
87
- type: "danger",
88
- message: formatAPIError(error)
89
- });
90
- }
91
- }, [error, formatAPIError, toggleNotification]);
92
- const isLoading = isLoadingConfig || isLoadingSchema || isFetchingConfig || isFetchingSchema;
93
- const editLayout = React.useMemo(
94
- () => data && !isLoading ? formatEditLayout(data, { schema, components }) : {
95
- layout: [],
96
- components: {},
97
- metadatas: {},
98
- options: {},
99
- settings: DEFAULT_SETTINGS
100
- },
101
- [data, isLoading, schema, components]
102
- );
103
- const [updateConfiguration] = useUpdateComponentConfigurationMutation();
104
- const handleSubmit = async (formData) => {
105
- try {
106
- const meta = Object.entries(data?.component.metadatas ?? {}).reduce(
107
- (acc, [name, { edit, list }]) => {
108
- const {
109
- __temp_key__,
110
- size: _size,
111
- name: _name,
112
- ...editedMetadata
113
- } = formData.layout.flatMap((row) => row.children).find((field) => field.name === name) ?? {};
114
- acc[name] = {
115
- edit: {
116
- ...edit,
117
- ...editedMetadata
118
- },
119
- list
120
- };
121
- return acc;
122
- },
123
- {}
124
- );
125
- const res = await updateConfiguration({
126
- layouts: {
127
- edit: formData.layout.map(
128
- (row) => row.children.reduce((acc, { name, size }) => {
129
- if (name !== TEMP_FIELD_NAME) {
130
- return [...acc, { name, size }];
131
- }
132
- return acc;
133
- }, [])
134
- ),
135
- list: data?.component.layouts.list
136
- },
137
- settings: setIn(formData.settings, "displayName", void 0),
138
- metadatas: meta,
139
- uid: model
140
- });
141
- if ("data" in res) {
142
- toggleNotification({
143
- type: "success",
144
- message: formatMessage({ id: "notification.success.saved", defaultMessage: "Saved" })
145
- });
146
- } else {
147
- toggleNotification({
148
- type: "danger",
149
- message: formatAPIError(res.error)
150
- });
151
- }
152
- } catch {
153
- toggleNotification({
154
- type: "danger",
155
- message: formatMessage({ id: "notification.error", defaultMessage: "An error occurred" })
156
- });
157
- }
158
- };
159
- if (isLoading) {
160
- return /* @__PURE__ */ jsx(Page.Loading, {});
161
- }
162
- if (error || errorSchema || !schema) {
163
- return /* @__PURE__ */ jsx(Page.Error, {});
164
- }
165
- return /* @__PURE__ */ jsxs(Fragment, { children: [
166
- /* @__PURE__ */ jsx(Page.Title, { children: `Configure ${editLayout.settings.displayName} Edit View` }),
167
- /* @__PURE__ */ jsx(
168
- ConfigurationForm,
169
- {
170
- onSubmit: handleSubmit,
171
- attributes: schema.attributes,
172
- fieldSizes,
173
- layout: editLayout
174
- }
175
- )
176
- ] });
177
- };
178
- const formatEditLayout = (data, { schema, components }) => {
179
- const editAttributes = convertEditLayoutToFieldLayouts(
180
- data.component.layouts.edit,
181
- schema?.attributes,
182
- data.component.metadatas,
183
- { configurations: data.components, schemas: components }
184
- );
185
- const componentEditAttributes = Object.entries(data.components).reduce(
186
- (acc, [uid, configuration]) => {
187
- acc[uid] = {
188
- layout: convertEditLayoutToFieldLayouts(
189
- configuration.layouts.edit,
190
- components[uid].attributes,
191
- configuration.metadatas
192
- ),
193
- settings: {
194
- ...configuration.settings,
195
- icon: components[uid].info.icon,
196
- displayName: components[uid].info.displayName
197
- }
198
- };
199
- return acc;
200
- },
201
- {}
202
- );
203
- const editMetadatas = Object.entries(data.component.metadatas).reduce(
204
- (acc, [attribute, metadata]) => {
205
- return {
206
- ...acc,
207
- [attribute]: metadata.edit
208
- };
209
- },
210
- {}
211
- );
212
- return {
213
- layout: [editAttributes],
214
- components: componentEditAttributes,
215
- metadatas: editMetadatas,
216
- options: {
217
- ...schema?.options,
218
- ...schema?.pluginOptions
219
- },
220
- settings: {
221
- ...data.component.settings,
222
- displayName: schema?.info.displayName
223
- }
224
- };
225
- };
226
- const ProtectedComponentConfigurationPage = () => {
227
- const permissions = useTypedSelector(
228
- (state) => state.admin_app.permissions.contentManager?.componentsConfigurations
229
- );
230
- return /* @__PURE__ */ jsx(Page.Protect, { permissions, children: /* @__PURE__ */ jsx(ComponentConfigurationPage, {}) });
231
- };
232
- export {
233
- ComponentConfigurationPage,
234
- ProtectedComponentConfigurationPage
235
- };
236
- //# sourceMappingURL=ComponentConfigurationPage-DfFSZQxe.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComponentConfigurationPage-DfFSZQxe.mjs","sources":["../../admin/src/services/components.ts","../../admin/src/pages/ComponentConfigurationPage.tsx"],"sourcesContent":["import { contentManagerApi } from './api';\n\nimport type {\n FindComponentConfiguration,\n UpdateComponentConfiguration,\n} from '../../../shared/contracts/components';\n\nconst componentsApi = contentManagerApi.injectEndpoints({\n endpoints: (builder) => ({\n getComponentConfiguration: builder.query<\n FindComponentConfiguration.Response['data'],\n FindComponentConfiguration.Params['uid']\n >({\n query: (uid) => `/content-manager/components/${uid}/configuration`,\n transformResponse: (response: FindComponentConfiguration.Response) => response.data,\n providesTags: (_result, _error, uid) => [{ type: 'ComponentConfiguration', id: uid }],\n }),\n updateComponentConfiguration: builder.mutation({\n query: ({ uid, ...body }) => ({\n url: `/content-manager/components/${uid}/configuration`,\n method: 'PUT',\n data: body,\n }),\n transformResponse: (response: UpdateComponentConfiguration.Response) => response.data,\n invalidatesTags: (_result, _error, { uid }) => [\n { type: 'ComponentConfiguration', id: uid },\n // otherwise layouts already fetched will have stale component configuration data.\n { type: 'ContentTypeSettings', id: 'LIST' },\n ],\n }),\n }),\n});\n\nconst { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation } =\n componentsApi;\n\nexport { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation };\n","import * as React from 'react';\n\nimport { Page, useNotification, useAPIErrorHandler } from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\nimport { useParams } from 'react-router-dom';\n\nimport { TEMP_FIELD_NAME } from '../components/ConfigurationForm/Fields';\nimport { ConfigurationForm, ConfigurationFormProps } from '../components/ConfigurationForm/Form';\nimport { ComponentsDictionary, extractContentTypeComponents } from '../hooks/useContentTypeSchema';\nimport {\n DEFAULT_SETTINGS,\n EditLayout,\n convertEditLayoutToFieldLayouts,\n} from '../hooks/useDocumentLayout';\nimport { useTypedSelector } from '../modules/hooks';\nimport {\n useGetComponentConfigurationQuery,\n useUpdateComponentConfigurationMutation,\n} from '../services/components';\nimport { useGetInitialDataQuery } from '../services/init';\nimport { setIn } from '../utils/objects';\n\nimport type { Component, FindComponentConfiguration } from '../../../shared/contracts/components';\nimport type { Metadatas } from '../../../shared/contracts/content-types';\n\n/* -------------------------------------------------------------------------------------------------\n * ComponentConfigurationPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ComponentConfigurationPage = () => {\n /**\n * useDocumentLayout only works for documents, not components,\n * it feels weird to make that hook work for both when this is SUCH\n * a unique use case and we only do it here, so in short, we essentially\n * just extracted the logic to make an edit view layout and reproduced it here.\n */\n const { slug: model } = useParams<{ slug: string }>();\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const {\n components,\n fieldSizes,\n schema,\n error: errorSchema,\n isLoading: isLoadingSchema,\n isFetching: isFetchingSchema,\n } = useGetInitialDataQuery(undefined, {\n selectFromResult: (res) => {\n const schema = res.data?.components.find((ct) => ct.uid === model);\n\n const componentsByKey = res.data?.components.reduce<ComponentsDictionary>(\n (acc, component) => {\n acc[component.uid] = component;\n\n return acc;\n },\n {}\n );\n\n const components = extractContentTypeComponents(schema?.attributes, componentsByKey);\n\n const fieldSizes = Object.entries(res.data?.fieldSizes ?? {}).reduce<\n ConfigurationFormProps['fieldSizes']\n >((acc, [attributeName, { default: size }]) => {\n acc[attributeName] = size;\n\n return acc;\n }, {});\n\n return {\n isFetching: res.isFetching,\n isLoading: res.isLoading,\n error: res.error,\n components,\n schema,\n fieldSizes,\n };\n },\n });\n\n React.useEffect(() => {\n if (errorSchema) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(errorSchema),\n });\n }\n }, [errorSchema, formatAPIError, toggleNotification]);\n\n const {\n data,\n isLoading: isLoadingConfig,\n isFetching: isFetchingConfig,\n error,\n } = useGetComponentConfigurationQuery(model ?? '');\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n /**\n * you **must** check if we're loading or fetching in case the component gets new props\n * but nothing was unmounted, it then becomes a fetch, not a load.\n */\n const isLoading = isLoadingConfig || isLoadingSchema || isFetchingConfig || isFetchingSchema;\n\n const editLayout = React.useMemo(\n () =>\n data && !isLoading\n ? formatEditLayout(data, { schema, components })\n : ({\n layout: [],\n components: {},\n metadatas: {},\n options: {},\n settings: DEFAULT_SETTINGS,\n } as EditLayout),\n [data, isLoading, schema, components]\n );\n\n const [updateConfiguration] = useUpdateComponentConfigurationMutation();\n const handleSubmit: ConfigurationFormProps['onSubmit'] = async (formData) => {\n try {\n /**\n * We reconstruct the metadatas object by taking the existing list metadatas\n * and re-merging that by attribute name with the current list metadatas, whilst overwriting\n * the data from the form we've built.\n */\n const meta = Object.entries(data?.component.metadatas ?? {}).reduce<Metadatas>(\n (acc, [name, { edit, list }]) => {\n const {\n __temp_key__,\n size: _size,\n name: _name,\n ...editedMetadata\n } = formData.layout.flatMap((row) => row.children).find((field) => field.name === name) ??\n {};\n\n acc[name] = {\n edit: {\n ...edit,\n ...editedMetadata,\n },\n list,\n };\n\n return acc;\n },\n {}\n );\n\n const res = await updateConfiguration({\n layouts: {\n edit: formData.layout.map((row) =>\n row.children.reduce<Array<{ name: string; size: number }>>((acc, { name, size }) => {\n if (name !== TEMP_FIELD_NAME) {\n return [...acc, { name, size }];\n }\n\n return acc;\n }, [])\n ),\n list: data?.component.layouts.list,\n },\n settings: setIn(formData.settings, 'displayName', undefined),\n metadatas: meta,\n uid: model,\n });\n\n if ('data' in res) {\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'notification.success.saved', defaultMessage: 'Saved' }),\n });\n } else {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n }\n } catch {\n toggleNotification({\n type: 'danger',\n message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }),\n });\n }\n };\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || errorSchema || !schema) {\n return <Page.Error />;\n }\n\n return (\n <>\n <Page.Title>{`Configure ${editLayout.settings.displayName} Edit View`}</Page.Title>\n <ConfigurationForm\n onSubmit={handleSubmit}\n attributes={schema.attributes}\n fieldSizes={fieldSizes}\n layout={editLayout}\n />\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\nconst formatEditLayout = (\n data: FindComponentConfiguration.Response['data'],\n { schema, components }: { schema?: Component; components: ComponentsDictionary }\n) => {\n const editAttributes = convertEditLayoutToFieldLayouts(\n data.component.layouts.edit,\n schema?.attributes,\n data.component.metadatas,\n { configurations: data.components, schemas: components }\n );\n\n const componentEditAttributes = Object.entries(data.components).reduce<EditLayout['components']>(\n (acc, [uid, configuration]) => {\n acc[uid] = {\n layout: convertEditLayoutToFieldLayouts(\n configuration.layouts.edit,\n components[uid].attributes,\n configuration.metadatas\n ),\n settings: {\n ...configuration.settings,\n icon: components[uid].info.icon,\n displayName: components[uid].info.displayName,\n },\n };\n return acc;\n },\n {}\n );\n\n const editMetadatas = Object.entries(data.component.metadatas).reduce<EditLayout['metadatas']>(\n (acc, [attribute, metadata]) => {\n return {\n ...acc,\n [attribute]: metadata.edit,\n };\n },\n {}\n );\n\n return {\n layout: [editAttributes],\n components: componentEditAttributes,\n metadatas: editMetadatas,\n options: {\n ...schema?.options,\n ...schema?.pluginOptions,\n },\n settings: {\n ...data.component.settings,\n displayName: schema?.info.displayName,\n },\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\nconst ProtectedComponentConfigurationPage = () => {\n const permissions = useTypedSelector(\n (state) => state.admin_app.permissions.contentManager?.componentsConfigurations\n );\n\n return (\n <Page.Protect permissions={permissions}>\n <ComponentConfigurationPage />\n </Page.Protect>\n );\n};\n\nexport { ComponentConfigurationPage, ProtectedComponentConfigurationPage };\n"],"names":["schema","components","fieldSizes"],"mappings":";;;;;;;;;AAOA,MAAM,gBAAgB,kBAAkB,gBAAgB;AAAA,EACtD,WAAW,CAAC,aAAa;AAAA,IACvB,2BAA2B,QAAQ,MAGjC;AAAA,MACA,OAAO,CAAC,QAAQ,+BAA+B,GAAG;AAAA,MAClD,mBAAmB,CAAC,aAAkD,SAAS;AAAA,MAC/E,cAAc,CAAC,SAAS,QAAQ,QAAQ,CAAC,EAAE,MAAM,0BAA0B,IAAI,KAAK;AAAA,IAAA,CACrF;AAAA,IACD,8BAA8B,QAAQ,SAAS;AAAA,MAC7C,OAAO,CAAC,EAAE,KAAK,GAAG,YAAY;AAAA,QAC5B,KAAK,+BAA+B,GAAG;AAAA,QACvC,QAAQ;AAAA,QACR,MAAM;AAAA,MAAA;AAAA,MAER,mBAAmB,CAAC,aAAoD,SAAS;AAAA,MACjF,iBAAiB,CAAC,SAAS,QAAQ,EAAE,UAAU;AAAA,QAC7C,EAAE,MAAM,0BAA0B,IAAI,IAAI;AAAA;AAAA,QAE1C,EAAE,MAAM,uBAAuB,IAAI,OAAO;AAAA,MAC5C;AAAA,IAAA,CACD;AAAA,EAAA;AAEL,CAAC;AAED,MAAM,EAAE,mCAAmC,wCAAA,IACzC;ACLF,MAAM,6BAA6B,MAAM;AAOvC,QAAM,EAAE,MAAM,MAAM,IAAI,UAA4B;AAC9C,QAAA,EAAE,uBAAuB;AACzB,QAAA,EAAE,kBAAkB;AAC1B,Q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;AAGzD,QAAM,0BAA0B,OAAO,QAAQ,KAAK,UAAU,EAAE;AAAA,IAC9D,CAAC,KAAK,CAAC,KAAK,aAAa,MAAM;AAC7B,UAAI,GAAG,IAAI;AAAA,QACT,QAAQ;AAAA,UACN,cAAc,QAAQ;AAAA,UACtB,WAAW,GAAG,EAAE;AAAA,UAChB,cAAc;AAAA,QAChB;AAAA,QACA,UAAU;AAAA,UACR,GAAG,cAAc;AAAA,UACjB,MAAM,WAAW,GAAG,EAAE,KAAK;AAAA,UAC3B,aAAa,WAAW,GAAG,EAAE,KAAK;AAAA,QACpC;AAAA,MAAA;AAEK,aAAA;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EAAA;AAGH,QAAM,gBAAgB,OAAO,QAAQ,KAAK,UAAU,SAAS,EAAE;AAAA,IAC7D,CAAC,KAAK,CAAC,WAAW,QAAQ,MAAM;AACvB,aAAA;AAAA,QACL,GAAG;AAAA,QACH,CAAC,SAAS,GAAG,SAAS;AAAA,MAAA;AAAA,IAE1B;AAAA,IACA,CAAC;AAAA,EAAA;AAGI,SAAA;AAAA,IACL,QAAQ,CAAC,cAAc;AAAA,IACvB,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,MACP,GAAG,QAAQ;AAAA,MACX,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,UAAU;AAAA,MACR,GAAG,KAAK,UAAU;AAAA,MAClB,aAAa,QAAQ,KAAK;AAAA,IAC5B;AAAA,EAAA;AAEJ;AAMA,MAAM,sCAAsC,MAAM;AAChD,QAAM,cAAc;AAAA,IAClB,CAAC,UAAU,MAAM,UAAU,YAAY,gBAAgB;AAAA,EAAA;AAGzD,6BACG,KAAK,SAAL,EAAa,aACZ,UAAA,oBAAC,8BAA2B,EAC9B,CAAA;AAEJ;"}
@@ -1,255 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const React = require("react");
5
- const strapiAdmin = require("@strapi/admin/strapi-admin");
6
- const reactIntl = require("react-intl");
7
- const reactRouterDom = require("react-router-dom");
8
- const Form = require("./Form-BssUwrTO.js");
9
- const index = require("./index-BdMf2lfT.js");
10
- const hooks = require("./hooks-BAaaKPS_.js");
11
- const objects = require("./objects-gigeqt7s.js");
12
- function _interopNamespace(e) {
13
- if (e && e.__esModule)
14
- return e;
15
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
16
- if (e) {
17
- for (const k in e) {
18
- if (k !== "default") {
19
- const d = Object.getOwnPropertyDescriptor(e, k);
20
- Object.defineProperty(n, k, d.get ? d : {
21
- enumerable: true,
22
- get: () => e[k]
23
- });
24
- }
25
- }
26
- }
27
- n.default = e;
28
- return Object.freeze(n);
29
- }
30
- const React__namespace = /* @__PURE__ */ _interopNamespace(React);
31
- const componentsApi = index.contentManagerApi.injectEndpoints({
32
- endpoints: (builder) => ({
33
- getComponentConfiguration: builder.query({
34
- query: (uid) => `/content-manager/components/${uid}/configuration`,
35
- transformResponse: (response) => response.data,
36
- providesTags: (_result, _error, uid) => [{ type: "ComponentConfiguration", id: uid }]
37
- }),
38
- updateComponentConfiguration: builder.mutation({
39
- query: ({ uid, ...body }) => ({
40
- url: `/content-manager/components/${uid}/configuration`,
41
- method: "PUT",
42
- data: body
43
- }),
44
- transformResponse: (response) => response.data,
45
- invalidatesTags: (_result, _error, { uid }) => [
46
- { type: "ComponentConfiguration", id: uid },
47
- // otherwise layouts already fetched will have stale component configuration data.
48
- { type: "ContentTypeSettings", id: "LIST" }
49
- ]
50
- })
51
- })
52
- });
53
- const { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation } = componentsApi;
54
- const ComponentConfigurationPage = () => {
55
- const { slug: model } = reactRouterDom.useParams();
56
- const { toggleNotification } = strapiAdmin.useNotification();
57
- const { formatMessage } = reactIntl.useIntl();
58
- const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
59
- const {
60
- components,
61
- fieldSizes,
62
- schema,
63
- error: errorSchema,
64
- isLoading: isLoadingSchema,
65
- isFetching: isFetchingSchema
66
- } = index.useGetInitialDataQuery(void 0, {
67
- selectFromResult: (res) => {
68
- const schema2 = res.data?.components.find((ct) => ct.uid === model);
69
- const componentsByKey = res.data?.components.reduce(
70
- (acc, component) => {
71
- acc[component.uid] = component;
72
- return acc;
73
- },
74
- {}
75
- );
76
- const components2 = index.extractContentTypeComponents(schema2?.attributes, componentsByKey);
77
- const fieldSizes2 = Object.entries(res.data?.fieldSizes ?? {}).reduce((acc, [attributeName, { default: size }]) => {
78
- acc[attributeName] = size;
79
- return acc;
80
- }, {});
81
- return {
82
- isFetching: res.isFetching,
83
- isLoading: res.isLoading,
84
- error: res.error,
85
- components: components2,
86
- schema: schema2,
87
- fieldSizes: fieldSizes2
88
- };
89
- }
90
- });
91
- React__namespace.useEffect(() => {
92
- if (errorSchema) {
93
- toggleNotification({
94
- type: "danger",
95
- message: formatAPIError(errorSchema)
96
- });
97
- }
98
- }, [errorSchema, formatAPIError, toggleNotification]);
99
- const {
100
- data,
101
- isLoading: isLoadingConfig,
102
- isFetching: isFetchingConfig,
103
- error
104
- } = useGetComponentConfigurationQuery(model ?? "");
105
- React__namespace.useEffect(() => {
106
- if (error) {
107
- toggleNotification({
108
- type: "danger",
109
- message: formatAPIError(error)
110
- });
111
- }
112
- }, [error, formatAPIError, toggleNotification]);
113
- const isLoading = isLoadingConfig || isLoadingSchema || isFetchingConfig || isFetchingSchema;
114
- const editLayout = React__namespace.useMemo(
115
- () => data && !isLoading ? formatEditLayout(data, { schema, components }) : {
116
- layout: [],
117
- components: {},
118
- metadatas: {},
119
- options: {},
120
- settings: index.DEFAULT_SETTINGS
121
- },
122
- [data, isLoading, schema, components]
123
- );
124
- const [updateConfiguration] = useUpdateComponentConfigurationMutation();
125
- const handleSubmit = async (formData) => {
126
- try {
127
- const meta = Object.entries(data?.component.metadatas ?? {}).reduce(
128
- (acc, [name, { edit, list }]) => {
129
- const {
130
- __temp_key__,
131
- size: _size,
132
- name: _name,
133
- ...editedMetadata
134
- } = formData.layout.flatMap((row) => row.children).find((field) => field.name === name) ?? {};
135
- acc[name] = {
136
- edit: {
137
- ...edit,
138
- ...editedMetadata
139
- },
140
- list
141
- };
142
- return acc;
143
- },
144
- {}
145
- );
146
- const res = await updateConfiguration({
147
- layouts: {
148
- edit: formData.layout.map(
149
- (row) => row.children.reduce((acc, { name, size }) => {
150
- if (name !== Form.TEMP_FIELD_NAME) {
151
- return [...acc, { name, size }];
152
- }
153
- return acc;
154
- }, [])
155
- ),
156
- list: data?.component.layouts.list
157
- },
158
- settings: objects.setIn(formData.settings, "displayName", void 0),
159
- metadatas: meta,
160
- uid: model
161
- });
162
- if ("data" in res) {
163
- toggleNotification({
164
- type: "success",
165
- message: formatMessage({ id: "notification.success.saved", defaultMessage: "Saved" })
166
- });
167
- } else {
168
- toggleNotification({
169
- type: "danger",
170
- message: formatAPIError(res.error)
171
- });
172
- }
173
- } catch {
174
- toggleNotification({
175
- type: "danger",
176
- message: formatMessage({ id: "notification.error", defaultMessage: "An error occurred" })
177
- });
178
- }
179
- };
180
- if (isLoading) {
181
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
182
- }
183
- if (error || errorSchema || !schema) {
184
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
185
- }
186
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
187
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Title, { children: `Configure ${editLayout.settings.displayName} Edit View` }),
188
- /* @__PURE__ */ jsxRuntime.jsx(
189
- Form.ConfigurationForm,
190
- {
191
- onSubmit: handleSubmit,
192
- attributes: schema.attributes,
193
- fieldSizes,
194
- layout: editLayout
195
- }
196
- )
197
- ] });
198
- };
199
- const formatEditLayout = (data, { schema, components }) => {
200
- const editAttributes = index.convertEditLayoutToFieldLayouts(
201
- data.component.layouts.edit,
202
- schema?.attributes,
203
- data.component.metadatas,
204
- { configurations: data.components, schemas: components }
205
- );
206
- const componentEditAttributes = Object.entries(data.components).reduce(
207
- (acc, [uid, configuration]) => {
208
- acc[uid] = {
209
- layout: index.convertEditLayoutToFieldLayouts(
210
- configuration.layouts.edit,
211
- components[uid].attributes,
212
- configuration.metadatas
213
- ),
214
- settings: {
215
- ...configuration.settings,
216
- icon: components[uid].info.icon,
217
- displayName: components[uid].info.displayName
218
- }
219
- };
220
- return acc;
221
- },
222
- {}
223
- );
224
- const editMetadatas = Object.entries(data.component.metadatas).reduce(
225
- (acc, [attribute, metadata]) => {
226
- return {
227
- ...acc,
228
- [attribute]: metadata.edit
229
- };
230
- },
231
- {}
232
- );
233
- return {
234
- layout: [editAttributes],
235
- components: componentEditAttributes,
236
- metadatas: editMetadatas,
237
- options: {
238
- ...schema?.options,
239
- ...schema?.pluginOptions
240
- },
241
- settings: {
242
- ...data.component.settings,
243
- displayName: schema?.info.displayName
244
- }
245
- };
246
- };
247
- const ProtectedComponentConfigurationPage = () => {
248
- const permissions = hooks.useTypedSelector(
249
- (state) => state.admin_app.permissions.contentManager?.componentsConfigurations
250
- );
251
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Protect, { permissions, children: /* @__PURE__ */ jsxRuntime.jsx(ComponentConfigurationPage, {}) });
252
- };
253
- exports.ComponentConfigurationPage = ComponentConfigurationPage;
254
- exports.ProtectedComponentConfigurationPage = ProtectedComponentConfigurationPage;
255
- //# sourceMappingURL=ComponentConfigurationPage-FqfsxQ1j.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ComponentConfigurationPage-FqfsxQ1j.js","sources":["../../admin/src/services/components.ts","../../admin/src/pages/ComponentConfigurationPage.tsx"],"sourcesContent":["import { contentManagerApi } from './api';\n\nimport type {\n FindComponentConfiguration,\n UpdateComponentConfiguration,\n} from '../../../shared/contracts/components';\n\nconst componentsApi = contentManagerApi.injectEndpoints({\n endpoints: (builder) => ({\n getComponentConfiguration: builder.query<\n FindComponentConfiguration.Response['data'],\n FindComponentConfiguration.Params['uid']\n >({\n query: (uid) => `/content-manager/components/${uid}/configuration`,\n transformResponse: (response: FindComponentConfiguration.Response) => response.data,\n providesTags: (_result, _error, uid) => [{ type: 'ComponentConfiguration', id: uid }],\n }),\n updateComponentConfiguration: builder.mutation({\n query: ({ uid, ...body }) => ({\n url: `/content-manager/components/${uid}/configuration`,\n method: 'PUT',\n data: body,\n }),\n transformResponse: (response: UpdateComponentConfiguration.Response) => response.data,\n invalidatesTags: (_result, _error, { uid }) => [\n { type: 'ComponentConfiguration', id: uid },\n // otherwise layouts already fetched will have stale component configuration data.\n { type: 'ContentTypeSettings', id: 'LIST' },\n ],\n }),\n }),\n});\n\nconst { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation } =\n componentsApi;\n\nexport { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation };\n","import * as React from 'react';\n\nimport { Page, useNotification, useAPIErrorHandler } from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\nimport { useParams } from 'react-router-dom';\n\nimport { TEMP_FIELD_NAME } from '../components/ConfigurationForm/Fields';\nimport { ConfigurationForm, ConfigurationFormProps } from '../components/ConfigurationForm/Form';\nimport { ComponentsDictionary, extractContentTypeComponents } from '../hooks/useContentTypeSchema';\nimport {\n DEFAULT_SETTINGS,\n EditLayout,\n convertEditLayoutToFieldLayouts,\n} from '../hooks/useDocumentLayout';\nimport { useTypedSelector } from '../modules/hooks';\nimport {\n useGetComponentConfigurationQuery,\n useUpdateComponentConfigurationMutation,\n} from '../services/components';\nimport { useGetInitialDataQuery } from '../services/init';\nimport { setIn } from '../utils/objects';\n\nimport type { Component, FindComponentConfiguration } from '../../../shared/contracts/components';\nimport type { Metadatas } from '../../../shared/contracts/content-types';\n\n/* -------------------------------------------------------------------------------------------------\n * ComponentConfigurationPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ComponentConfigurationPage = () => {\n /**\n * useDocumentLayout only works for documents, not components,\n * it feels weird to make that hook work for both when this is SUCH\n * a unique use case and we only do it here, so in short, we essentially\n * just extracted the logic to make an edit view layout and reproduced it here.\n */\n const { slug: model } = useParams<{ slug: string }>();\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const {\n components,\n fieldSizes,\n schema,\n error: errorSchema,\n isLoading: isLoadingSchema,\n isFetching: isFetchingSchema,\n } = useGetInitialDataQuery(undefined, {\n selectFromResult: (res) => {\n const schema = res.data?.components.find((ct) => ct.uid === model);\n\n const componentsByKey = res.data?.components.reduce<ComponentsDictionary>(\n (acc, component) => {\n acc[component.uid] = component;\n\n return acc;\n },\n {}\n );\n\n const components = extractContentTypeComponents(schema?.attributes, componentsByKey);\n\n const fieldSizes = Object.entries(res.data?.fieldSizes ?? {}).reduce<\n ConfigurationFormProps['fieldSizes']\n >((acc, [attributeName, { default: size }]) => {\n acc[attributeName] = size;\n\n return acc;\n }, {});\n\n return {\n isFetching: res.isFetching,\n isLoading: res.isLoading,\n error: res.error,\n components,\n schema,\n fieldSizes,\n };\n },\n });\n\n React.useEffect(() => {\n if (errorSchema) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(errorSchema),\n });\n }\n }, [errorSchema, formatAPIError, toggleNotification]);\n\n const {\n data,\n isLoading: isLoadingConfig,\n isFetching: isFetchingConfig,\n error,\n } = useGetComponentConfigurationQuery(model ?? '');\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n /**\n * you **must** check if we're loading or fetching in case the component gets new props\n * but nothing was unmounted, it then becomes a fetch, not a load.\n */\n const isLoading = isLoadingConfig || isLoadingSchema || isFetchingConfig || isFetchingSchema;\n\n const editLayout = React.useMemo(\n () =>\n data && !isLoading\n ? formatEditLayout(data, { schema, components })\n : ({\n layout: [],\n components: {},\n metadatas: {},\n options: {},\n settings: DEFAULT_SETTINGS,\n } as EditLayout),\n [data, isLoading, schema, components]\n );\n\n const [updateConfiguration] = useUpdateComponentConfigurationMutation();\n const handleSubmit: ConfigurationFormProps['onSubmit'] = async (formData) => {\n try {\n /**\n * We reconstruct the metadatas object by taking the existing list metadatas\n * and re-merging that by attribute name with the current list metadatas, whilst overwriting\n * the data from the form we've built.\n */\n const meta = Object.entries(data?.component.metadatas ?? {}).reduce<Metadatas>(\n (acc, [name, { edit, list }]) => {\n const {\n __temp_key__,\n size: _size,\n name: _name,\n ...editedMetadata\n } = formData.layout.flatMap((row) => row.children).find((field) => field.name === name) ??\n {};\n\n acc[name] = {\n edit: {\n ...edit,\n ...editedMetadata,\n },\n list,\n };\n\n return acc;\n },\n {}\n );\n\n const res = await updateConfiguration({\n layouts: {\n edit: formData.layout.map((row) =>\n row.children.reduce<Array<{ name: string; size: number }>>((acc, { name, size }) => {\n if (name !== TEMP_FIELD_NAME) {\n return [...acc, { name, size }];\n }\n\n return acc;\n }, [])\n ),\n list: data?.component.layouts.list,\n },\n settings: setIn(formData.settings, 'displayName', undefined),\n metadatas: meta,\n uid: model,\n });\n\n if ('data' in res) {\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'notification.success.saved', defaultMessage: 'Saved' }),\n });\n } else {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n }\n } catch {\n toggleNotification({\n type: 'danger',\n message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }),\n });\n }\n };\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || errorSchema || !schema) {\n return <Page.Error />;\n }\n\n return (\n <>\n <Page.Title>{`Configure ${editLayout.settings.displayName} Edit View`}</Page.Title>\n <ConfigurationForm\n onSubmit={handleSubmit}\n attributes={schema.attributes}\n fieldSizes={fieldSizes}\n layout={editLayout}\n />\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\nconst formatEditLayout = (\n data: FindComponentConfiguration.Response['data'],\n { schema, components }: { schema?: Component; components: ComponentsDictionary }\n) => {\n const editAttributes = convertEditLayoutToFieldLayouts(\n data.component.layouts.edit,\n schema?.attributes,\n data.component.metadatas,\n { configurations: data.components, schemas: components }\n );\n\n const componentEditAttributes = Object.entries(data.components).reduce<EditLayout['components']>(\n (acc, [uid, configuration]) => {\n acc[uid] = {\n layout: convertEditLayoutToFieldLayouts(\n configuration.layouts.edit,\n components[uid].attributes,\n configuration.metadatas\n ),\n settings: {\n ...configuration.settings,\n icon: components[uid].info.icon,\n displayName: components[uid].info.displayName,\n },\n };\n return acc;\n },\n {}\n );\n\n const editMetadatas = Object.entries(data.component.metadatas).reduce<EditLayout['metadatas']>(\n (acc, [attribute, metadata]) => {\n return {\n ...acc,\n [attribute]: metadata.edit,\n };\n },\n {}\n );\n\n return {\n layout: [editAttributes],\n components: componentEditAttributes,\n metadatas: editMetadatas,\n options: {\n ...schema?.options,\n ...schema?.pluginOptions,\n },\n settings: {\n ...data.component.settings,\n displayName: schema?.info.displayName,\n },\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Header\n * -----------------------------------------------------------------------------------------------*/\n\nconst ProtectedComponentConfigurationPage = () => {\n const permissions = useTypedSelector(\n (state) => state.admin_app.permissions.contentManager?.componentsConfigurations\n );\n\n return (\n <Page.Protect permissions={permissions}>\n <ComponentConfigurationPage />\n </Page.Protect>\n );\n};\n\nexport { ComponentConfigurationPage, ProtectedComponentConfigurationPage };\n"],"names":["contentManagerApi","useParams","useNotification","useIntl","useAPIErrorHandler","useGetInitialDataQuery","schema","components","extractContentTypeComponents","fieldSizes","React","DEFAULT_SETTINGS","TEMP_FIELD_NAME","setIn","jsx","Page","jsxs","Fragment","ConfigurationForm","convertEditLayoutToFieldLayouts","useTypedSelector"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,gBAAgBA,wBAAkB,gBAAgB;AAAA,EACtD,WAAW,CAAC,aAAa;AAAA,IACvB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