@strapi/content-manager 0.0.0-experimental.e14656d3b8681880212c13260b9a2b340c182f2d → 0.0.0-experimental.e576af447d9f97e89e24c6daa32d8f714376cd5f

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 (500) 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-BRMxaaa0.mjs +277 -0
  6. package/dist/admin/chunks/ComponentConfigurationPage-BRMxaaa0.mjs.map +1 -0
  7. package/dist/admin/chunks/ComponentConfigurationPage-DwjhCutb.js +299 -0
  8. package/dist/admin/chunks/ComponentConfigurationPage-DwjhCutb.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-DPQ6e_ZU.js +181 -0
  14. package/dist/admin/chunks/EditConfigurationPage-DPQ6e_ZU.js.map +1 -0
  15. package/dist/admin/chunks/EditConfigurationPage-mHz7EIZ9.mjs +159 -0
  16. package/dist/admin/chunks/EditConfigurationPage-mHz7EIZ9.mjs.map +1 -0
  17. package/dist/admin/chunks/EditViewPage-CXmEDGW2.js +334 -0
  18. package/dist/admin/chunks/EditViewPage-CXmEDGW2.js.map +1 -0
  19. package/dist/admin/chunks/EditViewPage-DC_tEaOd.mjs +311 -0
  20. package/dist/admin/chunks/EditViewPage-DC_tEaOd.mjs.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-CmzyWdCy.js +978 -0
  26. package/dist/admin/chunks/Form-CmzyWdCy.js.map +1 -0
  27. package/dist/admin/chunks/Form-Sz84KGej.mjs +955 -0
  28. package/dist/admin/chunks/Form-Sz84KGej.mjs.map +1 -0
  29. package/dist/admin/chunks/History-B75NuF92.js +1380 -0
  30. package/dist/admin/chunks/History-B75NuF92.js.map +1 -0
  31. package/dist/admin/chunks/History-C5fFAagI.mjs +1357 -0
  32. package/dist/admin/chunks/History-C5fFAagI.mjs.map +1 -0
  33. package/dist/admin/chunks/Input-BIzj18xW.js +7221 -0
  34. package/dist/admin/chunks/Input-BIzj18xW.js.map +1 -0
  35. package/dist/admin/chunks/Input-DDV2blpv.mjs +7190 -0
  36. package/dist/admin/chunks/Input-DDV2blpv.mjs.map +1 -0
  37. package/dist/admin/chunks/ListConfigurationPage-DVFNbbLl.js +819 -0
  38. package/dist/admin/chunks/ListConfigurationPage-DVFNbbLl.js.map +1 -0
  39. package/dist/admin/chunks/ListConfigurationPage-Ddq1APAQ.mjs +796 -0
  40. package/dist/admin/chunks/ListConfigurationPage-Ddq1APAQ.mjs.map +1 -0
  41. package/dist/admin/chunks/ListViewPage-D3gpvdM2.js +1155 -0
  42. package/dist/admin/chunks/ListViewPage-D3gpvdM2.js.map +1 -0
  43. package/dist/admin/chunks/ListViewPage-IIou-WFn.mjs +1133 -0
  44. package/dist/admin/chunks/ListViewPage-IIou-WFn.mjs.map +1 -0
  45. package/dist/admin/chunks/NoContentTypePage-B7sfKVrj.js +60 -0
  46. package/dist/admin/chunks/NoContentTypePage-B7sfKVrj.js.map +1 -0
  47. package/dist/admin/chunks/NoContentTypePage-mZFnYA3z.mjs +58 -0
  48. package/dist/admin/chunks/NoContentTypePage-mZFnYA3z.mjs.map +1 -0
  49. package/dist/admin/chunks/NoPermissionsPage-C-XBYfpZ.js +39 -0
  50. package/dist/admin/chunks/NoPermissionsPage-C-XBYfpZ.js.map +1 -0
  51. package/dist/admin/chunks/NoPermissionsPage-CfUdeuGT.mjs +37 -0
  52. package/dist/admin/chunks/NoPermissionsPage-CfUdeuGT.mjs.map +1 -0
  53. package/dist/admin/chunks/Preview-DkU1bar6.js +696 -0
  54. package/dist/admin/chunks/Preview-DkU1bar6.js.map +1 -0
  55. package/dist/admin/chunks/Preview-xr-5BCHr.mjs +674 -0
  56. package/dist/admin/chunks/Preview-xr-5BCHr.mjs.map +1 -0
  57. package/dist/admin/chunks/Relations-Ddnb_jYb.mjs +1291 -0
  58. package/dist/admin/chunks/Relations-Ddnb_jYb.mjs.map +1 -0
  59. package/dist/admin/chunks/Relations-VSItCr8c.js +1318 -0
  60. package/dist/admin/chunks/Relations-VSItCr8c.js.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-CImiNxXE.mjs +310 -0
  78. package/dist/{_chunks/en-BrCTWlZv.mjs.map → admin/chunks/en-CImiNxXE.mjs.map} +1 -1
  79. package/dist/admin/chunks/en-CLf4SuMQ.js +315 -0
  80. package/dist/{_chunks/en-uOUIxfcQ.js.map → admin/chunks/en-CLf4SuMQ.js.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-BE23Vyc8.js +5456 -0
  114. package/dist/admin/chunks/index-BE23Vyc8.js.map +1 -0
  115. package/dist/admin/chunks/index-TXDGJBhY.mjs +5389 -0
  116. package/dist/admin/chunks/index-TXDGJBhY.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-B3zsQDhd.js +619 -0
  130. package/dist/admin/chunks/layout-B3zsQDhd.js.map +1 -0
  131. package/dist/admin/chunks/layout-DmbmZmt8.mjs +599 -0
  132. package/dist/admin/chunks/layout-DmbmZmt8.mjs.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-B93RmIIQ.js +178 -0
  162. package/dist/admin/chunks/relations-B93RmIIQ.js.map +1 -0
  163. package/dist/admin/chunks/relations-Ccbyl2K1.mjs +173 -0
  164. package/dist/admin/chunks/relations-Ccbyl2K1.mjs.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/uk-CR-zDhAY.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-BtM6WnaE.mjs +313 -0
  190. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  191. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  192. package/dist/admin/chunks/uk-DB6OgySY.js.map +1 -0
  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 +26 -4
  214. package/dist/admin/index.js.map +1 -1
  215. package/dist/admin/index.mjs +17 -11
  216. package/dist/admin/index.mjs.map +1 -1
  217. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  218. package/dist/admin/src/content-manager.d.ts +7 -2
  219. package/dist/admin/src/exports.d.ts +2 -1
  220. package/dist/admin/src/history/services/historyVersion.d.ts +2 -2
  221. package/dist/admin/src/hooks/useDocument.d.ts +52 -2
  222. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  223. package/dist/admin/src/index.d.ts +1 -0
  224. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  225. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +3 -2
  226. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
  227. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  228. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +55 -0
  229. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +1 -0
  230. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
  231. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
  232. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +2 -1
  233. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  234. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +0 -32
  235. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +29 -1
  236. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  237. package/dist/admin/src/pages/EditView/utils/data.d.ts +1 -0
  238. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  239. package/dist/admin/src/preview/components/PreviewHeader.d.ts +3 -0
  240. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  241. package/dist/admin/src/preview/index.d.ts +3 -0
  242. package/dist/admin/src/preview/pages/Preview.d.ts +15 -0
  243. package/dist/admin/src/preview/routes.d.ts +3 -0
  244. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  245. package/dist/admin/src/router.d.ts +1 -1
  246. package/dist/admin/src/services/api.d.ts +1 -1
  247. package/dist/admin/src/services/components.d.ts +2 -2
  248. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  249. package/dist/admin/src/services/documents.d.ts +19 -20
  250. package/dist/admin/src/services/init.d.ts +1 -1
  251. package/dist/admin/src/services/relations.d.ts +2 -2
  252. package/dist/admin/src/services/uid.d.ts +3 -3
  253. package/dist/server/index.js +5473 -4131
  254. package/dist/server/index.js.map +1 -1
  255. package/dist/server/index.mjs +5451 -4106
  256. package/dist/server/index.mjs.map +1 -1
  257. package/dist/server/src/bootstrap.d.ts.map +1 -1
  258. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  259. package/dist/server/src/controllers/index.d.ts.map +1 -1
  260. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  261. package/dist/server/src/controllers/utils/metadata.d.ts +17 -2
  262. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  263. package/dist/server/src/history/controllers/history-version.d.ts +1 -1
  264. package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
  265. package/dist/server/src/history/services/history.d.ts +3 -3
  266. package/dist/server/src/history/services/history.d.ts.map +1 -1
  267. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  268. package/dist/server/src/history/services/utils.d.ts +7 -11
  269. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  270. package/dist/server/src/index.d.ts +7 -6
  271. package/dist/server/src/index.d.ts.map +1 -1
  272. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  273. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  274. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  275. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  276. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  277. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  278. package/dist/server/src/preview/index.d.ts +4 -0
  279. package/dist/server/src/preview/index.d.ts.map +1 -0
  280. package/dist/server/src/preview/routes/index.d.ts +8 -0
  281. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  282. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  283. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  284. package/dist/server/src/preview/services/index.d.ts +16 -0
  285. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  286. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  287. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  288. package/dist/server/src/preview/services/preview.d.ts +12 -0
  289. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  290. package/dist/server/src/preview/utils.d.ts +19 -0
  291. package/dist/server/src/preview/utils.d.ts.map +1 -0
  292. package/dist/server/src/register.d.ts.map +1 -1
  293. package/dist/server/src/routes/index.d.ts.map +1 -1
  294. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  295. package/dist/server/src/services/document-metadata.d.ts +12 -10
  296. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  297. package/dist/server/src/services/index.d.ts +7 -6
  298. package/dist/server/src/services/index.d.ts.map +1 -1
  299. package/dist/server/src/services/utils/count.d.ts +1 -1
  300. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  301. package/dist/server/src/services/utils/populate.d.ts +3 -3
  302. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  303. package/dist/server/src/utils/index.d.ts +2 -0
  304. package/dist/server/src/utils/index.d.ts.map +1 -1
  305. package/dist/shared/contracts/collection-types.d.ts +3 -2
  306. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  307. package/dist/shared/contracts/components.d.ts +0 -1
  308. package/dist/shared/contracts/content-types.d.ts +0 -1
  309. package/dist/shared/contracts/history-versions.d.ts +0 -1
  310. package/dist/shared/contracts/index.d.ts +1 -1
  311. package/dist/shared/contracts/index.d.ts.map +1 -1
  312. package/dist/shared/contracts/init.d.ts +0 -1
  313. package/dist/shared/contracts/preview.d.ts +26 -0
  314. package/dist/shared/contracts/preview.d.ts.map +1 -0
  315. package/dist/shared/contracts/relations.d.ts +1 -2
  316. package/dist/shared/contracts/relations.d.ts.map +1 -1
  317. package/dist/shared/contracts/review-workflows.d.ts +0 -1
  318. package/dist/shared/contracts/single-types.d.ts +0 -1
  319. package/dist/shared/contracts/uid.d.ts +0 -1
  320. package/dist/shared/index.d.ts +0 -1
  321. package/dist/shared/index.js +37 -22
  322. package/dist/shared/index.js.map +1 -1
  323. package/dist/shared/index.mjs +36 -23
  324. package/dist/shared/index.mjs.map +1 -1
  325. package/package.json +25 -21
  326. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +0 -69
  327. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +0 -1
  328. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +0 -70
  329. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +0 -1
  330. package/dist/_chunks/ComponentConfigurationPage-D_M8iBw5.js +0 -255
  331. package/dist/_chunks/ComponentConfigurationPage-D_M8iBw5.js.map +0 -1
  332. package/dist/_chunks/ComponentConfigurationPage-qemkOlnj.mjs +0 -236
  333. package/dist/_chunks/ComponentConfigurationPage-qemkOlnj.mjs.map +0 -1
  334. package/dist/_chunks/ComponentIcon-BXdiCGQp.js +0 -176
  335. package/dist/_chunks/ComponentIcon-BXdiCGQp.js.map +0 -1
  336. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +0 -157
  337. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +0 -1
  338. package/dist/_chunks/EditConfigurationPage-BePwPuHy.js +0 -151
  339. package/dist/_chunks/EditConfigurationPage-BePwPuHy.js.map +0 -1
  340. package/dist/_chunks/EditConfigurationPage-CjUrEewK.mjs +0 -132
  341. package/dist/_chunks/EditConfigurationPage-CjUrEewK.mjs.map +0 -1
  342. package/dist/_chunks/EditViewPage-B-RJeiJD.js +0 -233
  343. package/dist/_chunks/EditViewPage-B-RJeiJD.js.map +0 -1
  344. package/dist/_chunks/EditViewPage-De8GyU8P.mjs +0 -214
  345. package/dist/_chunks/EditViewPage-De8GyU8P.mjs.map +0 -1
  346. package/dist/_chunks/Field-dq8Tg1M_.js +0 -5589
  347. package/dist/_chunks/Field-dq8Tg1M_.js.map +0 -1
  348. package/dist/_chunks/Field-pb2o8uBe.mjs +0 -5557
  349. package/dist/_chunks/Field-pb2o8uBe.mjs.map +0 -1
  350. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +0 -50
  351. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +0 -1
  352. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +0 -49
  353. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +0 -1
  354. package/dist/_chunks/Form-DGIf4jQU.js +0 -771
  355. package/dist/_chunks/Form-DGIf4jQU.js.map +0 -1
  356. package/dist/_chunks/Form-DJn0Dxha.mjs +0 -750
  357. package/dist/_chunks/Form-DJn0Dxha.mjs.map +0 -1
  358. package/dist/_chunks/History-BowL3JKP.mjs +0 -1032
  359. package/dist/_chunks/History-BowL3JKP.mjs.map +0 -1
  360. package/dist/_chunks/History-Dh2NEHnR.js +0 -1053
  361. package/dist/_chunks/History-Dh2NEHnR.js.map +0 -1
  362. package/dist/_chunks/ListConfigurationPage-BpVOB-hn.mjs +0 -632
  363. package/dist/_chunks/ListConfigurationPage-BpVOB-hn.mjs.map +0 -1
  364. package/dist/_chunks/ListConfigurationPage-BxYCWz9e.js +0 -652
  365. package/dist/_chunks/ListConfigurationPage-BxYCWz9e.js.map +0 -1
  366. package/dist/_chunks/ListViewPage-4XsciqHZ.js +0 -848
  367. package/dist/_chunks/ListViewPage-4XsciqHZ.js.map +0 -1
  368. package/dist/_chunks/ListViewPage-CXFUjZQC.mjs +0 -824
  369. package/dist/_chunks/ListViewPage-CXFUjZQC.mjs.map +0 -1
  370. package/dist/_chunks/NoContentTypePage-C8OpoHeU.js +0 -51
  371. package/dist/_chunks/NoContentTypePage-C8OpoHeU.js.map +0 -1
  372. package/dist/_chunks/NoContentTypePage-DuhOTp3x.mjs +0 -51
  373. package/dist/_chunks/NoContentTypePage-DuhOTp3x.mjs.map +0 -1
  374. package/dist/_chunks/NoPermissionsPage-DVz3mzDz.mjs +0 -23
  375. package/dist/_chunks/NoPermissionsPage-DVz3mzDz.mjs.map +0 -1
  376. package/dist/_chunks/NoPermissionsPage-y_r7DVA2.js +0 -23
  377. package/dist/_chunks/NoPermissionsPage-y_r7DVA2.js.map +0 -1
  378. package/dist/_chunks/Relations-CVNLrn1Y.mjs +0 -694
  379. package/dist/_chunks/Relations-CVNLrn1Y.mjs.map +0 -1
  380. package/dist/_chunks/Relations-DPFCAa7b.js +0 -714
  381. package/dist/_chunks/Relations-DPFCAa7b.js.map +0 -1
  382. package/dist/_chunks/ar-BUUWXIYu.js +0 -226
  383. package/dist/_chunks/ar-BUUWXIYu.js.map +0 -1
  384. package/dist/_chunks/ar-CCEVvqGG.mjs +0 -226
  385. package/dist/_chunks/ca-5U32ON2v.mjs +0 -201
  386. package/dist/_chunks/ca-Cmk45QO6.js +0 -201
  387. package/dist/_chunks/cs-CM2aBUar.mjs +0 -125
  388. package/dist/_chunks/cs-CkJy6B2v.js +0 -125
  389. package/dist/_chunks/de-C72KDNOl.mjs +0 -199
  390. package/dist/_chunks/de-CCEmbAah.js +0 -199
  391. package/dist/_chunks/en-BrCTWlZv.mjs +0 -292
  392. package/dist/_chunks/en-uOUIxfcQ.js +0 -292
  393. package/dist/_chunks/es-CeXiYflN.mjs +0 -196
  394. package/dist/_chunks/es-EUonQTon.js +0 -196
  395. package/dist/_chunks/eu-CdALomew.mjs +0 -202
  396. package/dist/_chunks/eu-VDH-3ovk.js +0 -202
  397. package/dist/_chunks/fr-B7kGGg3E.js +0 -206
  398. package/dist/_chunks/fr-B7kGGg3E.js.map +0 -1
  399. package/dist/_chunks/fr-CD9VFbPM.mjs +0 -206
  400. package/dist/_chunks/fr-CD9VFbPM.mjs.map +0 -1
  401. package/dist/_chunks/gu-BRmF601H.js +0 -200
  402. package/dist/_chunks/gu-CNpaMDpH.mjs +0 -200
  403. package/dist/_chunks/gu-CNpaMDpH.mjs.map +0 -1
  404. package/dist/_chunks/hi-CCJBptSq.js +0 -200
  405. package/dist/_chunks/hi-CCJBptSq.js.map +0 -1
  406. package/dist/_chunks/hi-Dwvd04m3.mjs +0 -200
  407. package/dist/_chunks/hi-Dwvd04m3.mjs.map +0 -1
  408. package/dist/_chunks/hooks-BAaaKPS_.js.map +0 -1
  409. package/dist/_chunks/hooks-E5u1mcgM.mjs +0 -8
  410. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +0 -1
  411. package/dist/_chunks/hu-CeYvaaO0.mjs +0 -202
  412. package/dist/_chunks/hu-CeYvaaO0.mjs.map +0 -1
  413. package/dist/_chunks/hu-sNV_yLYy.js +0 -202
  414. package/dist/_chunks/hu-sNV_yLYy.js.map +0 -1
  415. package/dist/_chunks/id-B5Ser98A.js +0 -160
  416. package/dist/_chunks/id-B5Ser98A.js.map +0 -1
  417. package/dist/_chunks/id-BtwA9WJT.mjs +0 -160
  418. package/dist/_chunks/index-C3fJE-1-.js +0 -3999
  419. package/dist/_chunks/index-C3fJE-1-.js.map +0 -1
  420. package/dist/_chunks/index-DiMrfcfy.mjs +0 -3980
  421. package/dist/_chunks/index-DiMrfcfy.mjs.map +0 -1
  422. package/dist/_chunks/it-BrVPqaf1.mjs +0 -162
  423. package/dist/_chunks/it-DkBIs7vD.js +0 -162
  424. package/dist/_chunks/ja-CcFe8diO.js +0 -196
  425. package/dist/_chunks/ja-CtsUxOvk.mjs +0 -196
  426. package/dist/_chunks/ko-HVQRlfUI.mjs +0 -195
  427. package/dist/_chunks/ko-woFZPmLk.js +0 -195
  428. package/dist/_chunks/layout-C788OmNr.js +0 -488
  429. package/dist/_chunks/layout-C788OmNr.js.map +0 -1
  430. package/dist/_chunks/layout-ls3gxfpH.mjs +0 -470
  431. package/dist/_chunks/layout-ls3gxfpH.mjs.map +0 -1
  432. package/dist/_chunks/ml-BihZwQit.mjs +0 -200
  433. package/dist/_chunks/ml-BihZwQit.mjs.map +0 -1
  434. package/dist/_chunks/ml-C2W8N8k1.js +0 -200
  435. package/dist/_chunks/ml-C2W8N8k1.js.map +0 -1
  436. package/dist/_chunks/ms-BuFotyP_.js +0 -144
  437. package/dist/_chunks/ms-m_WjyWx7.mjs +0 -144
  438. package/dist/_chunks/nl-D4R9gHx5.mjs +0 -202
  439. package/dist/_chunks/nl-D4R9gHx5.mjs.map +0 -1
  440. package/dist/_chunks/nl-bbEOHChV.js +0 -202
  441. package/dist/_chunks/nl-bbEOHChV.js.map +0 -1
  442. package/dist/_chunks/objects-gigeqt7s.js +0 -49
  443. package/dist/_chunks/objects-gigeqt7s.js.map +0 -1
  444. package/dist/_chunks/objects-mKMAmfec.mjs +0 -47
  445. package/dist/_chunks/objects-mKMAmfec.mjs.map +0 -1
  446. package/dist/_chunks/pl-sbx9mSt_.mjs +0 -199
  447. package/dist/_chunks/pl-sbx9mSt_.mjs.map +0 -1
  448. package/dist/_chunks/pl-uzwG-hk7.js +0 -199
  449. package/dist/_chunks/pl-uzwG-hk7.js.map +0 -1
  450. package/dist/_chunks/pt-BR-BiOz37D9.js +0 -201
  451. package/dist/_chunks/pt-BR-C71iDxnh.mjs +0 -201
  452. package/dist/_chunks/pt-BsaFvS8-.mjs +0 -95
  453. package/dist/_chunks/pt-BsaFvS8-.mjs.map +0 -1
  454. package/dist/_chunks/pt-CeXQuq50.js +0 -95
  455. package/dist/_chunks/pt-CeXQuq50.js.map +0 -1
  456. package/dist/_chunks/relations-CLcOmGO0.mjs +0 -135
  457. package/dist/_chunks/relations-CLcOmGO0.mjs.map +0 -1
  458. package/dist/_chunks/relations-DYeotliT.js +0 -134
  459. package/dist/_chunks/relations-DYeotliT.js.map +0 -1
  460. package/dist/_chunks/ru-BE6A4Exp.mjs +0 -231
  461. package/dist/_chunks/ru-BT3ybNny.js +0 -231
  462. package/dist/_chunks/sa-CcvkYInH.js +0 -200
  463. package/dist/_chunks/sa-CcvkYInH.js.map +0 -1
  464. package/dist/_chunks/sa-Dag0k-Z8.mjs +0 -200
  465. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +0 -1
  466. package/dist/_chunks/sk-BFg-R8qJ.mjs +0 -202
  467. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +0 -1
  468. package/dist/_chunks/sk-CvY09Xjv.js +0 -202
  469. package/dist/_chunks/sk-CvY09Xjv.js.map +0 -1
  470. package/dist/_chunks/sv-CUnfWGsh.mjs +0 -202
  471. package/dist/_chunks/sv-CUnfWGsh.mjs.map +0 -1
  472. package/dist/_chunks/sv-MYDuzgvT.js +0 -202
  473. package/dist/_chunks/sv-MYDuzgvT.js.map +0 -1
  474. package/dist/_chunks/th-BqbI8lIT.mjs +0 -148
  475. package/dist/_chunks/th-BqbI8lIT.mjs.map +0 -1
  476. package/dist/_chunks/th-D9_GfAjc.js +0 -148
  477. package/dist/_chunks/tr-CgeK3wJM.mjs +0 -199
  478. package/dist/_chunks/tr-CgeK3wJM.mjs.map +0 -1
  479. package/dist/_chunks/tr-D9UH-O_R.js +0 -199
  480. package/dist/_chunks/tr-D9UH-O_R.js.map +0 -1
  481. package/dist/_chunks/uk-C8EiqJY7.js +0 -144
  482. package/dist/_chunks/uk-C8EiqJY7.js.map +0 -1
  483. package/dist/_chunks/uk-CR-zDhAY.mjs +0 -144
  484. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs +0 -231
  485. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +0 -1
  486. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js +0 -249
  487. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +0 -1
  488. package/dist/_chunks/usePrev-B9w_-eYc.js +0 -15
  489. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  490. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  491. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
  492. package/dist/_chunks/vi-CJlYDheJ.js +0 -111
  493. package/dist/_chunks/vi-DUXIk_fw.mjs +0 -111
  494. package/dist/_chunks/zh-BWZspA60.mjs +0 -209
  495. package/dist/_chunks/zh-BWZspA60.mjs.map +0 -1
  496. package/dist/_chunks/zh-CQQfszqR.js +0 -209
  497. package/dist/_chunks/zh-CQQfszqR.js.map +0 -1
  498. package/dist/_chunks/zh-Hans-9kOncHGw.js +0 -952
  499. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +0 -952
  500. package/strapi-server.js +0 -3
@@ -1,771 +0,0 @@
1
- "use strict";
2
- const jsxRuntime = require("react/jsx-runtime");
3
- const React = require("react");
4
- const strapiAdmin = require("@strapi/admin/strapi-admin");
5
- const designSystem = require("@strapi/design-system");
6
- const fractionalIndexing = require("fractional-indexing");
7
- const pipe = require("lodash/fp/pipe");
8
- const reactIntl = require("react-intl");
9
- const index = require("./index-C3fJE-1-.js");
10
- const Icons = require("@strapi/icons");
11
- const reactDndHtml5Backend = require("react-dnd-html5-backend");
12
- const reactRouterDom = require("react-router-dom");
13
- const styledComponents = require("styled-components");
14
- const useDragAndDrop = require("./useDragAndDrop-J0TUUbR6.js");
15
- const ComponentIcon = require("./ComponentIcon-BXdiCGQp.js");
16
- const yup = require("yup");
17
- const FieldTypeIcon = require("./FieldTypeIcon-Dnwq_IRF.js");
18
- const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
19
- function _interopNamespace(e) {
20
- if (e && e.__esModule)
21
- return e;
22
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
23
- if (e) {
24
- for (const k in e) {
25
- if (k !== "default") {
26
- const d = Object.getOwnPropertyDescriptor(e, k);
27
- Object.defineProperty(n, k, d.get ? d : {
28
- enumerable: true,
29
- get: () => e[k]
30
- });
31
- }
32
- }
33
- }
34
- n.default = e;
35
- return Object.freeze(n);
36
- }
37
- const React__namespace = /* @__PURE__ */ _interopNamespace(React);
38
- const pipe__default = /* @__PURE__ */ _interopDefault(pipe);
39
- const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
40
- const FIELD_SCHEMA = yup__namespace.object().shape({
41
- label: yup__namespace.string().required(),
42
- description: yup__namespace.string(),
43
- editable: yup__namespace.boolean(),
44
- size: yup__namespace.number().required()
45
- });
46
- const EditFieldForm = ({ attribute, name, onClose }) => {
47
- const { formatMessage } = reactIntl.useIntl();
48
- const { toggleNotification } = strapiAdmin.useNotification();
49
- const { value, onChange } = strapiAdmin.useField(name);
50
- const { data: mainFieldOptions } = index.useGetInitialDataQuery(void 0, {
51
- selectFromResult: (res) => {
52
- if (attribute?.type !== "relation" || !res.data) {
53
- return { data: [] };
54
- }
55
- if ("targetModel" in attribute && typeof attribute.targetModel === "string") {
56
- const targetSchema = res.data.contentTypes.find(
57
- (schema) => schema.uid === attribute.targetModel
58
- );
59
- if (targetSchema) {
60
- return {
61
- data: Object.entries(targetSchema.attributes).reduce((acc, [key, attribute2]) => {
62
- if (!index.ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD.includes(attribute2.type)) {
63
- acc.push({
64
- label: key,
65
- value: key
66
- });
67
- }
68
- return acc;
69
- }, [])
70
- };
71
- }
72
- }
73
- return { data: [] };
74
- },
75
- skip: attribute?.type !== "relation"
76
- });
77
- if (!value || value.name === TEMP_FIELD_NAME || !attribute) {
78
- console.error(
79
- "You've opened a field to edit without it being part of the form, this is likely a bug with Strapi. Please open an issue."
80
- );
81
- toggleNotification({
82
- message: formatMessage({
83
- id: "content-manager.containers.edit-settings.modal-form.error",
84
- defaultMessage: "An error occurred while trying to open the form."
85
- }),
86
- type: "danger"
87
- });
88
- return null;
89
- }
90
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(
91
- strapiAdmin.Form,
92
- {
93
- method: "PUT",
94
- initialValues: value,
95
- validationSchema: FIELD_SCHEMA,
96
- onSubmit: (data) => {
97
- onChange(name, data);
98
- onClose();
99
- },
100
- children: [
101
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 3, children: [
102
- /* @__PURE__ */ jsxRuntime.jsx(FieldTypeIcon.FieldTypeIcon, { type: attribute.type }),
103
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Title, { children: formatMessage(
104
- {
105
- id: "content-manager.containers.edit-settings.modal-form.label",
106
- defaultMessage: "Edit {fieldName}"
107
- },
108
- { fieldName: index.capitalise(value.name) }
109
- ) })
110
- ] }) }),
111
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, children: [
112
- {
113
- name: "label",
114
- label: formatMessage({
115
- id: index.getTranslation("containers.edit-settings.modal-form.label"),
116
- defaultMessage: "Label"
117
- }),
118
- size: 6,
119
- type: "string"
120
- },
121
- {
122
- name: "description",
123
- label: formatMessage({
124
- id: index.getTranslation("containers.edit-settings.modal-form.description"),
125
- defaultMessage: "Description"
126
- }),
127
- size: 6,
128
- type: "string"
129
- },
130
- {
131
- name: "placeholder",
132
- label: formatMessage({
133
- id: index.getTranslation("containers.edit-settings.modal-form.placeholder"),
134
- defaultMessage: "Placeholder"
135
- }),
136
- size: 6,
137
- type: "string"
138
- },
139
- {
140
- name: "editable",
141
- label: formatMessage({
142
- id: index.getTranslation("containers.edit-settings.modal-form.editable"),
143
- defaultMessage: "Editable"
144
- }),
145
- size: 6,
146
- type: "boolean"
147
- },
148
- {
149
- name: "mainField",
150
- label: formatMessage({
151
- id: index.getTranslation("containers.edit-settings.modal-form.mainField"),
152
- defaultMessage: "Entry title"
153
- }),
154
- hint: formatMessage({
155
- id: index.getTranslation(
156
- "containers.SettingPage.edit-settings.modal-form.mainField.hint"
157
- ),
158
- defaultMessage: "Set the displayed field"
159
- }),
160
- size: 6,
161
- options: mainFieldOptions,
162
- type: "enumeration"
163
- },
164
- {
165
- name: "size",
166
- label: formatMessage({
167
- id: index.getTranslation("containers.ListSettingsView.modal-form.size"),
168
- defaultMessage: "Size"
169
- }),
170
- size: 6,
171
- options: [
172
- { value: "4", label: "33%" },
173
- { value: "6", label: "50%" },
174
- { value: "8", label: "66%" },
175
- { value: "12", label: "100%" }
176
- ],
177
- type: "enumeration"
178
- }
179
- ].filter(filterFieldsBasedOnAttributeType(attribute.type)).map(({ size, ...field }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.InputRenderer, { ...field }) }, field.name)) }) }),
180
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Footer, { children: [
181
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Close, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", children: formatMessage({ id: "app.components.Button.cancel", defaultMessage: "Cancel" }) }) }),
182
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { type: "submit", children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
183
- ] })
184
- ]
185
- }
186
- ) });
187
- };
188
- const filterFieldsBasedOnAttributeType = (type) => (field) => {
189
- switch (type) {
190
- case "blocks":
191
- case "richtext":
192
- return field.name !== "size" && field.name !== "mainField";
193
- case "boolean":
194
- case "media":
195
- return field.name !== "placeholder" && field.name !== "mainField";
196
- case "component":
197
- case "dynamiczone":
198
- return field.name === "label" || field.name === "editable";
199
- case "json":
200
- return field.name !== "placeholder" && field.name !== "mainField" && field.name !== "size";
201
- case "relation":
202
- return true;
203
- default:
204
- return field.name !== "mainField";
205
- }
206
- };
207
- const Fields = ({ attributes, fieldSizes, components, metadatas = {} }) => {
208
- const { formatMessage } = reactIntl.useIntl();
209
- const layout = strapiAdmin.useForm(
210
- "Fields",
211
- (state) => state.values.layout ?? []
212
- );
213
- const onChange = strapiAdmin.useForm("Fields", (state) => state.onChange);
214
- const addFieldRow = strapiAdmin.useForm("Fields", (state) => state.addFieldRow);
215
- const removeFieldRow = strapiAdmin.useForm("Fields", (state) => state.removeFieldRow);
216
- const existingFields = layout.map((row) => row.children.map((field) => field.name)).flat();
217
- const remainingFields = Object.entries(metadatas).reduce((acc, current) => {
218
- const [name, { visible, ...field }] = current;
219
- if (!existingFields.includes(name) && visible === true) {
220
- const type = attributes[name]?.type;
221
- const size = type ? fieldSizes[type] : 12;
222
- acc.push({
223
- ...field,
224
- label: field.label ?? name,
225
- name,
226
- size
227
- });
228
- }
229
- return acc;
230
- }, []);
231
- const handleMoveField = ([newRowIndex, newFieldIndex], [currentRowIndex, currentFieldIndex]) => {
232
- const newLayout = structuredClone(layout);
233
- const [field] = newLayout[currentRowIndex].children.splice(currentFieldIndex, 1);
234
- if (!field || field.name === TEMP_FIELD_NAME) {
235
- return;
236
- }
237
- const newRow = newLayout[newRowIndex].children;
238
- const [newFieldKey] = generateNKeysBetween(newRow, 1, currentFieldIndex, newFieldIndex);
239
- newRow.splice(newFieldIndex, 0, { ...field, __temp_key__: newFieldKey });
240
- if (newLayout[newRowIndex].children.reduce((acc, curr) => acc + curr.size, 0) > 12) {
241
- const recalculatedRows = chunkArray(
242
- newLayout[newRowIndex].children.filter((field2) => field2.name !== TEMP_FIELD_NAME)
243
- );
244
- const rowKeys = generateNKeysBetween(
245
- newLayout,
246
- recalculatedRows.length,
247
- currentRowIndex,
248
- newRowIndex
249
- );
250
- newLayout.splice(
251
- newRowIndex,
252
- 1,
253
- ...recalculatedRows.map((row, index2) => ({
254
- __temp_key__: rowKeys[index2],
255
- children: row
256
- }))
257
- );
258
- }
259
- const newLayoutWithSpacers = newLayout.map((row) => ({
260
- ...row,
261
- children: row.children.filter((field2) => field2.name !== TEMP_FIELD_NAME)
262
- })).filter((row) => row.children.length > 0).map((row) => {
263
- const totalSpaceTaken = row.children.reduce((acc, curr) => acc + curr.size, 0);
264
- if (totalSpaceTaken < 12) {
265
- const [spacerKey] = fractionalIndexing.generateNKeysBetween(
266
- row.children.at(-1)?.__temp_key__,
267
- void 0,
268
- 1
269
- );
270
- return {
271
- ...row,
272
- children: [
273
- ...row.children,
274
- {
275
- name: TEMP_FIELD_NAME,
276
- size: 12 - totalSpaceTaken,
277
- __temp_key__: spacerKey
278
- }
279
- ]
280
- };
281
- }
282
- return row;
283
- });
284
- onChange("layout", newLayoutWithSpacers);
285
- };
286
- const handleRemoveField = (rowIndex, fieldIndex) => () => {
287
- if (layout[rowIndex].children.length === 1) {
288
- removeFieldRow(`layout`, rowIndex);
289
- } else {
290
- onChange(`layout.${rowIndex}.children.${fieldIndex}`, void 0);
291
- }
292
- };
293
- const handleAddField = (field) => () => {
294
- addFieldRow("layout", { children: [field] });
295
- };
296
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { paddingTop: 6, direction: "column", alignItems: "stretch", gap: 4, children: [
297
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "flex-start", direction: "column", justifyContent: "space-between", children: [
298
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: formatMessage({
299
- id: index.getTranslation("containers.list.displayedFields"),
300
- defaultMessage: "Displayed fields"
301
- }) }),
302
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: formatMessage({
303
- id: "containers.SettingPage.editSettings.description",
304
- defaultMessage: "Drag & drop the fields to build the layout"
305
- }) })
306
- ] }),
307
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 4, hasRadius: true, borderStyle: "dashed", borderWidth: "1px", borderColor: "neutral300", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
308
- layout.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 2, children: row.children.map(({ size, ...field }, fieldIndex) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(
309
- Field,
310
- {
311
- attribute: attributes[field.name],
312
- components,
313
- index: [rowIndex, fieldIndex],
314
- name: `layout.${rowIndex}.children.${fieldIndex}`,
315
- onMoveField: handleMoveField,
316
- onRemoveField: handleRemoveField(rowIndex, fieldIndex)
317
- }
318
- ) }, field.name)) }, row.__temp_key__)),
319
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { children: [
320
- /* @__PURE__ */ jsxRuntime.jsx(
321
- designSystem.Menu.Trigger,
322
- {
323
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Plus, {}),
324
- endIcon: null,
325
- disabled: remainingFields.length === 0,
326
- fullWidth: true,
327
- variant: "secondary",
328
- children: formatMessage({
329
- id: index.getTranslation("containers.SettingPage.add.field"),
330
- defaultMessage: "Insert another field"
331
- })
332
- }
333
- ),
334
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Content, { children: remainingFields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { onSelect: handleAddField(field), children: field.label }, field.name)) })
335
- ] })
336
- ] }) })
337
- ] });
338
- };
339
- const generateNKeysBetween = (field, count, currInd, newInd) => {
340
- const startKey = currInd > newInd ? field[newInd - 1]?.__temp_key__ : field[newInd]?.__temp_key__;
341
- const endKey = currInd > newInd ? field[newInd]?.__temp_key__ : field[newInd + 1]?.__temp_key__;
342
- return fractionalIndexing.generateNKeysBetween(startKey, endKey, count);
343
- };
344
- const chunkArray = (array) => {
345
- const result = [];
346
- let temp = [];
347
- array.reduce((acc, field) => {
348
- if (acc + field.size > 12) {
349
- result.push(temp);
350
- temp = [field];
351
- return field.size;
352
- } else {
353
- temp.push(field);
354
- return acc + field.size;
355
- }
356
- }, 0);
357
- if (temp.length > 0) {
358
- result.push(temp);
359
- }
360
- return result;
361
- };
362
- const TEMP_FIELD_NAME = "_TEMP_";
363
- const Field = ({ attribute, components, name, index: index$1, onMoveField, onRemoveField }) => {
364
- const [isModalOpen, setIsModalOpen] = React__namespace.useState(false);
365
- const { formatMessage } = reactIntl.useIntl();
366
- const { value } = strapiAdmin.useField(name);
367
- const [{ isDragging }, objectRef, dropRef, dragRef, dragPreviewRef] = useDragAndDrop.useDragAndDrop(true, {
368
- dropSensitivity: "immediate",
369
- type: useDragAndDrop.ItemTypes.EDIT_FIELD,
370
- item: { index: index$1, label: value?.label, name },
371
- index: index$1,
372
- onMoveItem: onMoveField
373
- });
374
- React__namespace.useEffect(() => {
375
- dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
376
- }, [dragPreviewRef]);
377
- const composedRefs = designSystem.useComposedRefs(dragRef, objectRef);
378
- const handleRemoveField = (e) => {
379
- e.stopPropagation();
380
- onRemoveField(e);
381
- };
382
- const tempRefs = designSystem.useComposedRefs(dropRef, objectRef);
383
- if (!value) {
384
- return null;
385
- }
386
- if (value.name === TEMP_FIELD_NAME) {
387
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { tag: "span", height: "100%", style: { opacity: 0 }, ref: tempRefs });
388
- }
389
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Root, { open: isModalOpen, onOpenChange: setIsModalOpen, children: [
390
- /* @__PURE__ */ jsxRuntime.jsxs(
391
- designSystem.Flex,
392
- {
393
- borderColor: "neutral150",
394
- background: "neutral100",
395
- hasRadius: true,
396
- style: { opacity: isDragging ? 0.5 : 1 },
397
- ref: dropRef,
398
- gap: 3,
399
- cursor: "pointer",
400
- onClick: () => {
401
- setIsModalOpen(true);
402
- },
403
- children: [
404
- /* @__PURE__ */ jsxRuntime.jsx(
405
- DragButton,
406
- {
407
- tag: "span",
408
- withTooltip: false,
409
- label: formatMessage(
410
- {
411
- id: index.getTranslation("components.DraggableCard.move.field"),
412
- defaultMessage: "Move {item}"
413
- },
414
- { item: value.label }
415
- ),
416
- onClick: (e) => e.stopPropagation(),
417
- ref: composedRefs,
418
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, {})
419
- }
420
- ),
421
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", grow: 1, overflow: "hidden", children: [
422
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 3, justifyContent: "space-between", width: "100%", children: [
423
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { ellipsis: true, fontWeight: "bold", children: value.label }),
424
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
425
- /* @__PURE__ */ jsxRuntime.jsx(
426
- designSystem.IconButton,
427
- {
428
- variant: "ghost",
429
- background: "transparent",
430
- onClick: (e) => {
431
- e.stopPropagation();
432
- setIsModalOpen(true);
433
- },
434
- withTooltip: false,
435
- label: formatMessage(
436
- {
437
- id: index.getTranslation("components.DraggableCard.edit.field"),
438
- defaultMessage: "Edit {item}"
439
- },
440
- { item: value.label }
441
- ),
442
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Pencil, {})
443
- }
444
- ),
445
- /* @__PURE__ */ jsxRuntime.jsx(
446
- designSystem.IconButton,
447
- {
448
- variant: "ghost",
449
- onClick: handleRemoveField,
450
- background: "transparent",
451
- withTooltip: false,
452
- label: formatMessage(
453
- {
454
- id: index.getTranslation("components.DraggableCard.delete.field"),
455
- defaultMessage: "Delete {item}"
456
- },
457
- { item: value.label }
458
- ),
459
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cross, {})
460
- }
461
- )
462
- ] })
463
- ] }),
464
- attribute?.type === "component" ? /* @__PURE__ */ jsxRuntime.jsxs(
465
- designSystem.Flex,
466
- {
467
- paddingTop: 3,
468
- paddingRight: 3,
469
- paddingBottom: 3,
470
- paddingLeft: 0,
471
- alignItems: "flex-start",
472
- direction: "column",
473
- gap: 2,
474
- width: "100%",
475
- children: [
476
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Root, { gap: 4, width: "100%", children: components[attribute.component].layout.map(
477
- (row) => row.map(({ size, ...field }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: size, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(
478
- designSystem.Flex,
479
- {
480
- alignItems: "center",
481
- background: "neutral0",
482
- paddingTop: 2,
483
- paddingBottom: 2,
484
- paddingLeft: 3,
485
- paddingRight: 3,
486
- hasRadius: true,
487
- borderColor: "neutral200",
488
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: field.name })
489
- }
490
- ) }, field.name))
491
- ) }),
492
- /* @__PURE__ */ jsxRuntime.jsx(
493
- designSystem.Link,
494
- {
495
- onClick: (e) => e.stopPropagation(),
496
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cog, {}),
497
- tag: reactRouterDom.NavLink,
498
- to: `../components/${attribute.component}/configurations/edit`,
499
- children: formatMessage({
500
- id: index.getTranslation("components.FieldItem.linkToComponentLayout"),
501
- defaultMessage: "Set the component's layout"
502
- })
503
- }
504
- )
505
- ]
506
- }
507
- ) : null,
508
- attribute?.type === "dynamiczone" ? /* @__PURE__ */ jsxRuntime.jsx(
509
- designSystem.Flex,
510
- {
511
- paddingTop: 3,
512
- paddingRight: 3,
513
- paddingBottom: 3,
514
- paddingLeft: 0,
515
- alignItems: "flex-start",
516
- gap: 2,
517
- width: "100%",
518
- children: attribute?.components.map((uid) => /* @__PURE__ */ jsxRuntime.jsxs(
519
- ComponentLink,
520
- {
521
- onClick: (e) => e.stopPropagation(),
522
- to: `../components/${uid}/configurations/edit`,
523
- children: [
524
- /* @__PURE__ */ jsxRuntime.jsx(ComponentIcon.ComponentIcon, { icon: components[uid].settings.icon }),
525
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontSize: 1, textColor: "neutral600", fontWeight: "bold", children: components[uid].settings.displayName })
526
- ]
527
- },
528
- uid
529
- ))
530
- }
531
- ) : null
532
- ] })
533
- ]
534
- }
535
- ),
536
- value.name !== TEMP_FIELD_NAME && /* @__PURE__ */ jsxRuntime.jsx(EditFieldForm, { attribute, name, onClose: () => setIsModalOpen(false) })
537
- ] });
538
- };
539
- const DragButton = styledComponents.styled(designSystem.IconButton)`
540
- height: unset;
541
- align-self: stretch;
542
- display: flex;
543
- align-items: center;
544
- padding: 0;
545
- border: none;
546
- background-color: transparent;
547
- border-radius: 0px;
548
- border-right: 1px solid ${({ theme }) => theme.colors.neutral150};
549
- cursor: all-scroll;
550
-
551
- svg {
552
- width: 1.2rem;
553
- height: 1.2rem;
554
- }
555
- `;
556
- const ComponentLink = styledComponents.styled(reactRouterDom.NavLink)`
557
- display: flex;
558
- flex-direction: column;
559
- align-items: center;
560
- gap: ${({ theme }) => theme.spaces[1]};
561
- padding: ${(props) => props.theme.spaces[2]};
562
- border: 1px solid ${({ theme }) => theme.colors.neutral200};
563
- background: ${({ theme }) => theme.colors.neutral0};
564
- width: 14rem;
565
- border-radius: ${({ theme }) => theme.borderRadius};
566
- text-decoration: none;
567
-
568
- &:focus,
569
- &:hover {
570
- ${({ theme }) => `
571
- background-color: ${theme.colors.primary100};
572
- border-color: ${theme.colors.primary200};
573
-
574
- ${designSystem.Typography} {
575
- color: ${theme.colors.primary600};
576
- }
577
- `}
578
-
579
- /* > ComponentIcon */
580
- > div:first-child {
581
- background: ${({ theme }) => theme.colors.primary200};
582
- color: ${({ theme }) => theme.colors.primary600};
583
-
584
- svg {
585
- path {
586
- fill: ${({ theme }) => theme.colors.primary600};
587
- }
588
- }
589
- }
590
- }
591
- `;
592
- const ConfigurationForm = ({
593
- attributes,
594
- fieldSizes,
595
- layout: editLayout,
596
- onSubmit
597
- }) => {
598
- const { components, settings, layout, metadatas } = editLayout;
599
- const { formatMessage } = reactIntl.useIntl();
600
- const initialValues = React__namespace.useMemo(() => {
601
- const transformations = pipe__default.default(
602
- flattenPanels,
603
- replaceMainFieldWithNameOnly,
604
- extractMetadata,
605
- addTmpSpaceToLayout,
606
- addTmpKeysToLayout
607
- );
608
- return {
609
- layout: transformations(layout),
610
- settings
611
- };
612
- }, [layout, settings]);
613
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Main, { children: /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Form, { initialValues, onSubmit, method: "PUT", children: [
614
- /* @__PURE__ */ jsxRuntime.jsx(Header, { name: settings.displayName ?? "" }),
615
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(
616
- designSystem.Flex,
617
- {
618
- alignItems: "stretch",
619
- background: "neutral0",
620
- direction: "column",
621
- gap: 6,
622
- hasRadius: true,
623
- shadow: "tableShadow",
624
- paddingTop: 6,
625
- paddingBottom: 6,
626
- paddingLeft: 7,
627
- paddingRight: 7,
628
- children: [
629
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", tag: "h2", children: formatMessage({
630
- id: index.getTranslation("containers.SettingPage.settings"),
631
- defaultMessage: "Settings"
632
- }) }),
633
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Grid.Root, { children: [
634
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, s: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(
635
- strapiAdmin.InputRenderer,
636
- {
637
- type: "enumeration",
638
- label: formatMessage({
639
- id: index.getTranslation("containers.SettingPage.editSettings.entry.title"),
640
- defaultMessage: "Entry title"
641
- }),
642
- hint: formatMessage({
643
- id: index.getTranslation(
644
- "containers.SettingPage.editSettings.entry.title.description"
645
- ),
646
- defaultMessage: "Set the display field of your entry"
647
- }),
648
- name: "settings.mainField",
649
- options: Object.entries(attributes).reduce((acc, [key, attribute]) => {
650
- if (!attribute) {
651
- return acc;
652
- }
653
- if (!index.ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD.includes(attribute.type)) {
654
- acc.push({
655
- label: key,
656
- value: key
657
- });
658
- }
659
- return acc;
660
- }, [])
661
- }
662
- ) }),
663
- /* @__PURE__ */ jsxRuntime.jsx(
664
- designSystem.Grid.Item,
665
- {
666
- paddingTop: 6,
667
- paddingBottom: 6,
668
- col: 12,
669
- s: 12,
670
- direction: "column",
671
- alignItems: "stretch",
672
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {})
673
- }
674
- ),
675
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 12, s: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", tag: "h3", children: formatMessage({
676
- id: index.getTranslation("containers.SettingPage.view"),
677
- defaultMessage: "View"
678
- }) }) }),
679
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 12, s: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxRuntime.jsx(
680
- Fields,
681
- {
682
- attributes,
683
- components,
684
- fieldSizes,
685
- metadatas
686
- }
687
- ) })
688
- ] })
689
- ]
690
- }
691
- ) })
692
- ] }) }) });
693
- };
694
- const flattenPanels = (layout) => layout.flat(1);
695
- const replaceMainFieldWithNameOnly = (layout) => layout.map(
696
- (row) => row.map((field) => ({
697
- ...field,
698
- mainField: field.mainField?.name
699
- }))
700
- );
701
- const extractMetadata = (layout) => {
702
- return layout.map(
703
- (row) => row.map(({ label, disabled, hint, placeholder, size, name, mainField }) => ({
704
- label,
705
- editable: !disabled,
706
- description: hint,
707
- mainField,
708
- placeholder,
709
- size,
710
- name,
711
- __temp_key__: ""
712
- }))
713
- );
714
- };
715
- const addTmpSpaceToLayout = (layout) => [
716
- ...layout.map((row) => {
717
- const totalSpaceTaken = row.reduce((acc, field) => acc + field.size, 0);
718
- if (totalSpaceTaken < 12) {
719
- return [
720
- ...row,
721
- {
722
- name: TEMP_FIELD_NAME,
723
- size: 12 - totalSpaceTaken,
724
- __temp_key__: ""
725
- }
726
- ];
727
- }
728
- return row;
729
- })
730
- ];
731
- const addTmpKeysToLayout = (layout) => {
732
- const keys = fractionalIndexing.generateNKeysBetween(void 0, void 0, layout.length);
733
- return layout.map((row, rowIndex) => {
734
- const fieldKeys = fractionalIndexing.generateNKeysBetween(void 0, void 0, row.length);
735
- return {
736
- __temp_key__: keys[rowIndex],
737
- children: row.map((field, fieldIndex) => {
738
- return {
739
- ...field,
740
- __temp_key__: fieldKeys[fieldIndex]
741
- };
742
- })
743
- };
744
- });
745
- };
746
- const Header = ({ name }) => {
747
- const { formatMessage } = reactIntl.useIntl();
748
- const modified = strapiAdmin.useForm("Header", (state) => state.modified);
749
- const isSubmitting = strapiAdmin.useForm("Header", (state) => state.isSubmitting);
750
- return /* @__PURE__ */ jsxRuntime.jsx(
751
- strapiAdmin.Layouts.Header,
752
- {
753
- title: formatMessage(
754
- {
755
- id: index.getTranslation("components.SettingsViewWrapper.pluginHeader.title"),
756
- defaultMessage: `Configure the view - {name}`
757
- },
758
- { name: index.capitalise(name) }
759
- ),
760
- subtitle: formatMessage({
761
- id: index.getTranslation("components.SettingsViewWrapper.pluginHeader.description.edit-settings"),
762
- defaultMessage: "Customize how the edit view will look like."
763
- }),
764
- navigationAction: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.BackButton, {}),
765
- primaryAction: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { disabled: !modified, loading: isSubmitting, type: "submit", children: formatMessage({ id: "global.save", defaultMessage: "Save" }) })
766
- }
767
- );
768
- };
769
- exports.ConfigurationForm = ConfigurationForm;
770
- exports.TEMP_FIELD_NAME = TEMP_FIELD_NAME;
771
- //# sourceMappingURL=Form-DGIf4jQU.js.map