@strapi/content-manager 0.0.0-experimental.d954d57341a6623992a0d211daaec8e245c3517d → 0.0.0-experimental.da0467de7eccc163e893e9b332505a79a5d52ec7

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 (510) hide show
  1. package/LICENSE +18 -3
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs +80 -0
  3. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  4. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +82 -0
  5. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +1 -0
  6. package/dist/admin/chunks/ComponentConfigurationPage-BGBNQxFJ.js +299 -0
  7. package/dist/admin/chunks/ComponentConfigurationPage-BGBNQxFJ.js.map +1 -0
  8. package/dist/admin/chunks/ComponentConfigurationPage-DKtL-tec.mjs +277 -0
  9. package/dist/admin/chunks/ComponentConfigurationPage-DKtL-tec.mjs.map +1 -0
  10. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs +153 -0
  11. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  12. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +176 -0
  13. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +1 -0
  14. package/dist/admin/chunks/EditConfigurationPage-KDwSFRyn.mjs +159 -0
  15. package/dist/admin/chunks/EditConfigurationPage-KDwSFRyn.mjs.map +1 -0
  16. package/dist/admin/chunks/EditConfigurationPage-yliOxLUv.js +181 -0
  17. package/dist/admin/chunks/EditConfigurationPage-yliOxLUv.js.map +1 -0
  18. package/dist/admin/chunks/EditViewPage-BAI2r49P.mjs +311 -0
  19. package/dist/admin/chunks/EditViewPage-BAI2r49P.mjs.map +1 -0
  20. package/dist/admin/chunks/EditViewPage-DpvonssD.js +334 -0
  21. package/dist/admin/chunks/EditViewPage-DpvonssD.js.map +1 -0
  22. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs +56 -0
  23. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  24. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +58 -0
  25. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +1 -0
  26. package/dist/admin/chunks/Form-BrzQyDxU.mjs +955 -0
  27. package/dist/admin/chunks/Form-BrzQyDxU.mjs.map +1 -0
  28. package/dist/admin/chunks/Form-XD_sf25E.js +978 -0
  29. package/dist/admin/chunks/Form-XD_sf25E.js.map +1 -0
  30. package/dist/admin/chunks/History-C-_o7tz8.js +1380 -0
  31. package/dist/admin/chunks/History-C-_o7tz8.js.map +1 -0
  32. package/dist/admin/chunks/History-DClLuGIg.mjs +1357 -0
  33. package/dist/admin/chunks/History-DClLuGIg.mjs.map +1 -0
  34. package/dist/admin/chunks/Input-BMLRZBE3.mjs +7190 -0
  35. package/dist/admin/chunks/Input-BMLRZBE3.mjs.map +1 -0
  36. package/dist/admin/chunks/Input-Bv-rqfYH.js +7221 -0
  37. package/dist/admin/chunks/Input-Bv-rqfYH.js.map +1 -0
  38. package/dist/admin/chunks/ListConfigurationPage-D66hgG4-.js +819 -0
  39. package/dist/admin/chunks/ListConfigurationPage-D66hgG4-.js.map +1 -0
  40. package/dist/admin/chunks/ListConfigurationPage-Do3UDres.mjs +796 -0
  41. package/dist/admin/chunks/ListConfigurationPage-Do3UDres.mjs.map +1 -0
  42. package/dist/admin/chunks/ListViewPage-DNvysJaJ.js +1155 -0
  43. package/dist/admin/chunks/ListViewPage-DNvysJaJ.js.map +1 -0
  44. package/dist/admin/chunks/ListViewPage-Q0auz5lE.mjs +1133 -0
  45. package/dist/admin/chunks/ListViewPage-Q0auz5lE.mjs.map +1 -0
  46. package/dist/admin/chunks/NoContentTypePage-B_oOeOQb.mjs +58 -0
  47. package/dist/admin/chunks/NoContentTypePage-B_oOeOQb.mjs.map +1 -0
  48. package/dist/admin/chunks/NoContentTypePage-C5qFFfgn.js +60 -0
  49. package/dist/admin/chunks/NoContentTypePage-C5qFFfgn.js.map +1 -0
  50. package/dist/admin/chunks/NoPermissionsPage-BAW7WY-M.mjs +37 -0
  51. package/dist/admin/chunks/NoPermissionsPage-BAW7WY-M.mjs.map +1 -0
  52. package/dist/admin/chunks/NoPermissionsPage-C9sDJXRu.js +39 -0
  53. package/dist/admin/chunks/NoPermissionsPage-C9sDJXRu.js.map +1 -0
  54. package/dist/admin/chunks/Preview-05BZGpV2.mjs +675 -0
  55. package/dist/admin/chunks/Preview-05BZGpV2.mjs.map +1 -0
  56. package/dist/admin/chunks/Preview-B6ThL2SA.js +697 -0
  57. package/dist/admin/chunks/Preview-B6ThL2SA.js.map +1 -0
  58. package/dist/admin/chunks/Relations-CJ0GWuqq.js +1318 -0
  59. package/dist/admin/chunks/Relations-CJ0GWuqq.js.map +1 -0
  60. package/dist/admin/chunks/Relations-CiOfFNxW.mjs +1291 -0
  61. package/dist/admin/chunks/Relations-CiOfFNxW.mjs.map +1 -0
  62. package/dist/admin/chunks/ar-DckYq_WK.mjs +222 -0
  63. package/dist/{_chunks/ar-CCEVvqGG.mjs.map → admin/chunks/ar-DckYq_WK.mjs.map} +1 -1
  64. package/dist/admin/chunks/ar-DeQBSsfl.js +227 -0
  65. package/dist/{_chunks/ru-BT3ybNny.js.map → admin/chunks/ar-DeQBSsfl.js.map} +1 -1
  66. package/dist/admin/chunks/ca-ClDTvatJ.js +202 -0
  67. package/dist/admin/chunks/ca-ClDTvatJ.js.map +1 -0
  68. package/dist/admin/chunks/ca-DviY7mRj.mjs +197 -0
  69. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  70. package/dist/admin/chunks/cs-BJFxwIWj.js +126 -0
  71. package/dist/{_chunks/cs-CkJy6B2v.js.map → admin/chunks/cs-BJFxwIWj.js.map} +1 -1
  72. package/dist/admin/chunks/cs-C7OSYFQ7.mjs +122 -0
  73. package/dist/{_chunks/cs-CM2aBUar.mjs.map → admin/chunks/cs-C7OSYFQ7.mjs.map} +1 -1
  74. package/dist/admin/chunks/de-5QRlDHyR.mjs +195 -0
  75. package/dist/{_chunks/eu-CdALomew.mjs.map → admin/chunks/de-5QRlDHyR.mjs.map} +1 -1
  76. package/dist/admin/chunks/de-CbImAUA5.js +200 -0
  77. package/dist/{_chunks/gu-BRmF601H.js.map → admin/chunks/de-CbImAUA5.js.map} +1 -1
  78. package/dist/admin/chunks/en-CImiNxXE.mjs +310 -0
  79. package/dist/{_chunks/en-Ux26r5pl.mjs.map → admin/chunks/en-CImiNxXE.mjs.map} +1 -1
  80. package/dist/admin/chunks/en-CLf4SuMQ.js +315 -0
  81. package/dist/admin/chunks/en-CLf4SuMQ.js.map +1 -0
  82. package/dist/admin/chunks/es-C8vLuvZL.js +197 -0
  83. package/dist/{_chunks/es-EUonQTon.js.map → admin/chunks/es-C8vLuvZL.js.map} +1 -1
  84. package/dist/admin/chunks/es-DkoWSExG.mjs +192 -0
  85. package/dist/{_chunks/ja-CtsUxOvk.mjs.map → admin/chunks/es-DkoWSExG.mjs.map} +1 -1
  86. package/dist/admin/chunks/eu-BG1xX7HK.mjs +198 -0
  87. package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
  88. package/dist/admin/chunks/eu-BJW3AvXu.js +203 -0
  89. package/dist/admin/chunks/eu-BJW3AvXu.js.map +1 -0
  90. package/dist/admin/chunks/fr-CFdRaRVj.mjs +215 -0
  91. package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
  92. package/dist/admin/chunks/fr-gQSilC7w.js +220 -0
  93. package/dist/admin/chunks/fr-gQSilC7w.js.map +1 -0
  94. package/dist/admin/chunks/gu-D5MMMXRs.mjs +196 -0
  95. package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
  96. package/dist/admin/chunks/gu-DPU4wyx7.js +201 -0
  97. package/dist/{_chunks/eu-VDH-3ovk.js.map → admin/chunks/gu-DPU4wyx7.js.map} +1 -1
  98. package/dist/admin/chunks/hi-Dp4omeBb.js +201 -0
  99. package/dist/admin/chunks/hi-Dp4omeBb.js.map +1 -0
  100. package/dist/admin/chunks/hi-lp17SCjr.mjs +196 -0
  101. package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
  102. package/dist/{_chunks/hooks-BAaaKPS_.js → admin/chunks/hooks-D-sOYd1s.js} +6 -3
  103. package/dist/admin/chunks/hooks-D-sOYd1s.js.map +1 -0
  104. package/dist/admin/chunks/hooks-DMvik5y_.mjs +7 -0
  105. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  106. package/dist/admin/chunks/hu-CLka1U2C.mjs +198 -0
  107. package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
  108. package/dist/admin/chunks/hu-CtFJuhTd.js +203 -0
  109. package/dist/admin/chunks/hu-CtFJuhTd.js.map +1 -0
  110. package/dist/admin/chunks/id-D7V5S1rB.js +161 -0
  111. package/dist/{_chunks/it-DkBIs7vD.js.map → admin/chunks/id-D7V5S1rB.js.map} +1 -1
  112. package/dist/admin/chunks/id-USfY9m1g.mjs +156 -0
  113. package/dist/{_chunks/id-BtwA9WJT.mjs.map → admin/chunks/id-USfY9m1g.mjs.map} +1 -1
  114. package/dist/admin/chunks/index-CcJLBLNf.mjs +5399 -0
  115. package/dist/admin/chunks/index-CcJLBLNf.mjs.map +1 -0
  116. package/dist/admin/chunks/index-SQ88CePz.js +5466 -0
  117. package/dist/admin/chunks/index-SQ88CePz.js.map +1 -0
  118. package/dist/admin/chunks/it-BAHrwmYS.mjs +158 -0
  119. package/dist/{_chunks/it-BrVPqaf1.mjs.map → admin/chunks/it-BAHrwmYS.mjs.map} +1 -1
  120. package/dist/admin/chunks/it-CQFpa_Dc.js +163 -0
  121. package/dist/{_chunks/ko-woFZPmLk.js.map → admin/chunks/it-CQFpa_Dc.js.map} +1 -1
  122. package/dist/admin/chunks/ja-BWKmBJFT.mjs +192 -0
  123. package/dist/{_chunks/ko-HVQRlfUI.mjs.map → admin/chunks/ja-BWKmBJFT.mjs.map} +1 -1
  124. package/dist/admin/chunks/ja-jdQM-B79.js +197 -0
  125. package/dist/{_chunks/de-CCEmbAah.js.map → admin/chunks/ja-jdQM-B79.js.map} +1 -1
  126. package/dist/admin/chunks/ko-CgADGBNt.mjs +191 -0
  127. package/dist/{_chunks/es-CeXiYflN.mjs.map → admin/chunks/ko-CgADGBNt.mjs.map} +1 -1
  128. package/dist/admin/chunks/ko-k46sEyzt.js +196 -0
  129. package/dist/{_chunks/ja-CcFe8diO.js.map → admin/chunks/ko-k46sEyzt.js.map} +1 -1
  130. package/dist/admin/chunks/layout-4nCaNnTs.mjs +599 -0
  131. package/dist/admin/chunks/layout-4nCaNnTs.mjs.map +1 -0
  132. package/dist/admin/chunks/layout-xxDnIsHG.js +619 -0
  133. package/dist/admin/chunks/layout-xxDnIsHG.js.map +1 -0
  134. package/dist/admin/chunks/ml-CnhCfOn_.mjs +196 -0
  135. package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
  136. package/dist/admin/chunks/ml-DqxPwODx.js +201 -0
  137. package/dist/admin/chunks/ml-DqxPwODx.js.map +1 -0
  138. package/dist/admin/chunks/ms-Bh09NFff.mjs +140 -0
  139. package/dist/{_chunks/ms-m_WjyWx7.mjs.map → admin/chunks/ms-Bh09NFff.mjs.map} +1 -1
  140. package/dist/admin/chunks/ms-CvSC0OdG.js +145 -0
  141. package/dist/{_chunks/ms-BuFotyP_.js.map → admin/chunks/ms-CvSC0OdG.js.map} +1 -1
  142. package/dist/admin/chunks/nl-BEubhS8C.js +203 -0
  143. package/dist/admin/chunks/nl-BEubhS8C.js.map +1 -0
  144. package/dist/admin/chunks/nl-C8HYflTc.mjs +198 -0
  145. package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
  146. package/dist/admin/chunks/objects-C3EebVVe.js +76 -0
  147. package/dist/admin/chunks/objects-C3EebVVe.js.map +1 -0
  148. package/dist/admin/chunks/objects-wl73iEma.mjs +73 -0
  149. package/dist/admin/chunks/objects-wl73iEma.mjs.map +1 -0
  150. package/dist/admin/chunks/pl-DWhGDzmM.js +200 -0
  151. package/dist/{_chunks/ca-Cmk45QO6.js.map → admin/chunks/pl-DWhGDzmM.js.map} +1 -1
  152. package/dist/admin/chunks/pl-MFCZJZuZ.mjs +195 -0
  153. package/dist/{_chunks/ca-5U32ON2v.mjs.map → admin/chunks/pl-MFCZJZuZ.mjs.map} +1 -1
  154. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +202 -0
  155. package/dist/{_chunks/pt-BR-BiOz37D9.js.map → admin/chunks/pt-BR-CPtAXD-4.js.map} +1 -1
  156. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs +197 -0
  157. package/dist/{_chunks/pt-BR-C71iDxnh.mjs.map → admin/chunks/pt-BR-CcotyBGJ.mjs.map} +1 -1
  158. package/dist/admin/chunks/pt-BoPxN80n.js +96 -0
  159. package/dist/admin/chunks/pt-BoPxN80n.js.map +1 -0
  160. package/dist/admin/chunks/pt-HbmgeiYO.mjs +93 -0
  161. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  162. package/dist/admin/chunks/relations-D1R7vM_e.mjs +173 -0
  163. package/dist/admin/chunks/relations-D1R7vM_e.mjs.map +1 -0
  164. package/dist/admin/chunks/relations-VlsO9KQZ.js +178 -0
  165. package/dist/admin/chunks/relations-VlsO9KQZ.js.map +1 -0
  166. package/dist/admin/chunks/ru-C0op0ALG.js +232 -0
  167. package/dist/{_chunks/en-fbKQxLGn.js.map → admin/chunks/ru-C0op0ALG.js.map} +1 -1
  168. package/dist/admin/chunks/ru-CB4BUyQp.mjs +230 -0
  169. package/dist/{_chunks/ru-BE6A4Exp.mjs.map → admin/chunks/ru-CB4BUyQp.mjs.map} +1 -1
  170. package/dist/admin/chunks/sa-B_FuPyMw.js +201 -0
  171. package/dist/admin/chunks/sa-B_FuPyMw.js.map +1 -0
  172. package/dist/admin/chunks/sa-n_aPA-pU.mjs +196 -0
  173. package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
  174. package/dist/admin/chunks/sk-D_iXML2C.js +203 -0
  175. package/dist/admin/chunks/sk-D_iXML2C.js.map +1 -0
  176. package/dist/admin/chunks/sk-tn_BDjE2.mjs +198 -0
  177. package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
  178. package/dist/admin/chunks/sv-BstBC1Yp.js +203 -0
  179. package/dist/admin/chunks/sv-BstBC1Yp.js.map +1 -0
  180. package/dist/admin/chunks/sv-cq4ZrQRd.mjs +198 -0
  181. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
  182. package/dist/admin/chunks/th-lXoOCqPC.js +149 -0
  183. package/dist/{_chunks/th-D9_GfAjc.js.map → admin/chunks/th-lXoOCqPC.js.map} +1 -1
  184. package/dist/admin/chunks/th-mUH7hEtc.mjs +144 -0
  185. package/dist/{_chunks/uk-CR-zDhAY.mjs.map → admin/chunks/th-mUH7hEtc.mjs.map} +1 -1
  186. package/dist/admin/chunks/tr-CkS6sLIE.js +200 -0
  187. package/dist/admin/chunks/tr-CkS6sLIE.js.map +1 -0
  188. package/dist/admin/chunks/tr-Yt38daxh.mjs +195 -0
  189. package/dist/{_chunks/de-C72KDNOl.mjs.map → admin/chunks/tr-Yt38daxh.mjs.map} +1 -1
  190. package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
  191. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  192. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  193. package/dist/admin/chunks/uk-DB6OgySY.js.map +1 -0
  194. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs +247 -0
  195. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs.map +1 -0
  196. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js +271 -0
  197. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +1 -0
  198. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs +18 -0
  199. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs.map +1 -0
  200. package/dist/admin/chunks/usePrev-DIYl-IAL.js +21 -0
  201. package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +1 -0
  202. package/dist/admin/chunks/vi-BGr1X_HZ.js +112 -0
  203. package/dist/{_chunks/vi-CJlYDheJ.js.map → admin/chunks/vi-BGr1X_HZ.js.map} +1 -1
  204. package/dist/admin/chunks/vi-CvBGlTjr.mjs +108 -0
  205. package/dist/{_chunks/vi-DUXIk_fw.mjs.map → admin/chunks/vi-CvBGlTjr.mjs.map} +1 -1
  206. package/dist/admin/chunks/zh-BmF-sHaT.mjs +205 -0
  207. package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
  208. package/dist/admin/chunks/zh-DwFu_Kfj.js +210 -0
  209. package/dist/admin/chunks/zh-DwFu_Kfj.js.map +1 -0
  210. package/dist/admin/chunks/zh-Hans-CI0HKio3.mjs +934 -0
  211. package/dist/{_chunks/zh-Hans-BPQcRIyH.mjs.map → admin/chunks/zh-Hans-CI0HKio3.mjs.map} +1 -1
  212. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +953 -0
  213. package/dist/{_chunks/zh-Hans-9kOncHGw.js.map → admin/chunks/zh-Hans-JVK9x7xr.js.map} +1 -1
  214. package/dist/admin/index.js +26 -4
  215. package/dist/admin/index.js.map +1 -1
  216. package/dist/admin/index.mjs +17 -11
  217. package/dist/admin/index.mjs.map +1 -1
  218. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  219. package/dist/admin/src/content-manager.d.ts +7 -2
  220. package/dist/admin/src/exports.d.ts +2 -1
  221. package/dist/admin/src/history/index.d.ts +3 -0
  222. package/dist/admin/src/history/services/historyVersion.d.ts +2 -2
  223. package/dist/admin/src/hooks/useDocument.d.ts +52 -2
  224. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  225. package/dist/admin/src/index.d.ts +2 -0
  226. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  227. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +4 -2
  228. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
  229. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  230. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +55 -0
  231. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +5 -0
  232. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
  233. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
  234. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +22 -1
  235. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  236. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  237. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  238. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
  239. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +29 -1
  240. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  241. package/dist/admin/src/pages/EditView/utils/data.d.ts +1 -0
  242. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  243. package/dist/admin/src/preview/components/PreviewHeader.d.ts +3 -0
  244. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  245. package/dist/admin/src/preview/index.d.ts +3 -0
  246. package/dist/admin/src/preview/pages/Preview.d.ts +15 -0
  247. package/dist/admin/src/preview/routes.d.ts +3 -0
  248. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  249. package/dist/admin/src/router.d.ts +1 -1
  250. package/dist/admin/src/services/api.d.ts +1 -1
  251. package/dist/admin/src/services/components.d.ts +2 -2
  252. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  253. package/dist/admin/src/services/documents.d.ts +19 -20
  254. package/dist/admin/src/services/init.d.ts +1 -1
  255. package/dist/admin/src/services/relations.d.ts +2 -2
  256. package/dist/admin/src/services/uid.d.ts +3 -3
  257. package/dist/admin/src/utils/validation.d.ts +4 -1
  258. package/dist/server/index.js +5483 -4083
  259. package/dist/server/index.js.map +1 -1
  260. package/dist/server/index.mjs +5504 -4101
  261. package/dist/server/index.mjs.map +1 -1
  262. package/dist/server/src/bootstrap.d.ts.map +1 -1
  263. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  264. package/dist/server/src/controllers/index.d.ts.map +1 -1
  265. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  266. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  267. package/dist/server/src/controllers/utils/metadata.d.ts +17 -2
  268. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  269. package/dist/server/src/controllers/validation/dimensions.d.ts +4 -2
  270. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -1
  271. package/dist/server/src/history/controllers/history-version.d.ts +1 -1
  272. package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
  273. package/dist/server/src/history/services/history.d.ts +3 -3
  274. package/dist/server/src/history/services/history.d.ts.map +1 -1
  275. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  276. package/dist/server/src/history/services/utils.d.ts +8 -12
  277. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  278. package/dist/server/src/index.d.ts +7 -6
  279. package/dist/server/src/index.d.ts.map +1 -1
  280. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  281. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  282. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  283. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  284. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  285. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  286. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  287. package/dist/server/src/preview/index.d.ts +4 -0
  288. package/dist/server/src/preview/index.d.ts.map +1 -0
  289. package/dist/server/src/preview/routes/index.d.ts +8 -0
  290. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  291. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  292. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  293. package/dist/server/src/preview/services/index.d.ts +16 -0
  294. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  295. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  296. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  297. package/dist/server/src/preview/services/preview.d.ts +12 -0
  298. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  299. package/dist/server/src/preview/utils.d.ts +19 -0
  300. package/dist/server/src/preview/utils.d.ts.map +1 -0
  301. package/dist/server/src/register.d.ts.map +1 -1
  302. package/dist/server/src/routes/index.d.ts.map +1 -1
  303. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  304. package/dist/server/src/services/document-metadata.d.ts +12 -10
  305. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  306. package/dist/server/src/services/index.d.ts +7 -6
  307. package/dist/server/src/services/index.d.ts.map +1 -1
  308. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  309. package/dist/server/src/services/utils/count.d.ts +1 -1
  310. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  311. package/dist/server/src/services/utils/populate.d.ts +3 -3
  312. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  313. package/dist/server/src/utils/index.d.ts +2 -0
  314. package/dist/server/src/utils/index.d.ts.map +1 -1
  315. package/dist/shared/contracts/collection-types.d.ts +3 -2
  316. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  317. package/dist/shared/contracts/components.d.ts +0 -1
  318. package/dist/shared/contracts/content-types.d.ts +0 -1
  319. package/dist/shared/contracts/history-versions.d.ts +0 -1
  320. package/dist/shared/contracts/index.d.ts +1 -1
  321. package/dist/shared/contracts/index.d.ts.map +1 -1
  322. package/dist/shared/contracts/init.d.ts +0 -1
  323. package/dist/shared/contracts/preview.d.ts +26 -0
  324. package/dist/shared/contracts/preview.d.ts.map +1 -0
  325. package/dist/shared/contracts/relations.d.ts +1 -2
  326. package/dist/shared/contracts/relations.d.ts.map +1 -1
  327. package/dist/shared/contracts/review-workflows.d.ts +0 -1
  328. package/dist/shared/contracts/single-types.d.ts +0 -1
  329. package/dist/shared/contracts/uid.d.ts +0 -1
  330. package/dist/shared/index.d.ts +0 -1
  331. package/dist/shared/index.js +37 -22
  332. package/dist/shared/index.js.map +1 -1
  333. package/dist/shared/index.mjs +36 -23
  334. package/dist/shared/index.mjs.map +1 -1
  335. package/package.json +25 -21
  336. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +0 -69
  337. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +0 -1
  338. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +0 -70
  339. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +0 -1
  340. package/dist/_chunks/ComponentConfigurationPage-WRPUXGd6.js +0 -255
  341. package/dist/_chunks/ComponentConfigurationPage-WRPUXGd6.js.map +0 -1
  342. package/dist/_chunks/ComponentConfigurationPage-gdUj_t-O.mjs +0 -236
  343. package/dist/_chunks/ComponentConfigurationPage-gdUj_t-O.mjs.map +0 -1
  344. package/dist/_chunks/ComponentIcon-BXdiCGQp.js +0 -176
  345. package/dist/_chunks/ComponentIcon-BXdiCGQp.js.map +0 -1
  346. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +0 -157
  347. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +0 -1
  348. package/dist/_chunks/EditConfigurationPage-BwuIPOJG.mjs +0 -132
  349. package/dist/_chunks/EditConfigurationPage-BwuIPOJG.mjs.map +0 -1
  350. package/dist/_chunks/EditConfigurationPage-C1vjMBgy.js +0 -151
  351. package/dist/_chunks/EditConfigurationPage-C1vjMBgy.js.map +0 -1
  352. package/dist/_chunks/EditViewPage-0MiFkXa8.mjs +0 -203
  353. package/dist/_chunks/EditViewPage-0MiFkXa8.mjs.map +0 -1
  354. package/dist/_chunks/EditViewPage-DbcGfyqK.js +0 -222
  355. package/dist/_chunks/EditViewPage-DbcGfyqK.js.map +0 -1
  356. package/dist/_chunks/Field-BDMSCcy5.mjs +0 -5199
  357. package/dist/_chunks/Field-BDMSCcy5.mjs.map +0 -1
  358. package/dist/_chunks/Field-BG1xu38N.js +0 -5231
  359. package/dist/_chunks/Field-BG1xu38N.js.map +0 -1
  360. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +0 -50
  361. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +0 -1
  362. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +0 -49
  363. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +0 -1
  364. package/dist/_chunks/Form-9BnFyUjy.js +0 -757
  365. package/dist/_chunks/Form-9BnFyUjy.js.map +0 -1
  366. package/dist/_chunks/Form-CPVWavB8.mjs +0 -736
  367. package/dist/_chunks/Form-CPVWavB8.mjs.map +0 -1
  368. package/dist/_chunks/History-BVpd8LP3.mjs +0 -1007
  369. package/dist/_chunks/History-BVpd8LP3.mjs.map +0 -1
  370. package/dist/_chunks/History-BWWxLt2Z.js +0 -1028
  371. package/dist/_chunks/History-BWWxLt2Z.js.map +0 -1
  372. package/dist/_chunks/ListConfigurationPage-6swzjdAZ.js +0 -640
  373. package/dist/_chunks/ListConfigurationPage-6swzjdAZ.js.map +0 -1
  374. package/dist/_chunks/ListConfigurationPage-DozVMKcR.mjs +0 -620
  375. package/dist/_chunks/ListConfigurationPage-DozVMKcR.mjs.map +0 -1
  376. package/dist/_chunks/ListViewPage-BlzfjS2Q.js +0 -834
  377. package/dist/_chunks/ListViewPage-BlzfjS2Q.js.map +0 -1
  378. package/dist/_chunks/ListViewPage-Ds0ulgfG.mjs +0 -810
  379. package/dist/_chunks/ListViewPage-Ds0ulgfG.mjs.map +0 -1
  380. package/dist/_chunks/NoContentTypePage-BH11kaKt.mjs +0 -51
  381. package/dist/_chunks/NoContentTypePage-BH11kaKt.mjs.map +0 -1
  382. package/dist/_chunks/NoContentTypePage-D2nCCWEl.js +0 -51
  383. package/dist/_chunks/NoContentTypePage-D2nCCWEl.js.map +0 -1
  384. package/dist/_chunks/NoPermissionsPage-BT2Tn0D_.mjs +0 -23
  385. package/dist/_chunks/NoPermissionsPage-BT2Tn0D_.mjs.map +0 -1
  386. package/dist/_chunks/NoPermissionsPage-DN_JlsU2.js +0 -23
  387. package/dist/_chunks/NoPermissionsPage-DN_JlsU2.js.map +0 -1
  388. package/dist/_chunks/Relations-CcgFTcWo.js +0 -714
  389. package/dist/_chunks/Relations-CcgFTcWo.js.map +0 -1
  390. package/dist/_chunks/Relations-Dnag3fhV.mjs +0 -694
  391. package/dist/_chunks/Relations-Dnag3fhV.mjs.map +0 -1
  392. package/dist/_chunks/ar-BUUWXIYu.js +0 -226
  393. package/dist/_chunks/ar-BUUWXIYu.js.map +0 -1
  394. package/dist/_chunks/ar-CCEVvqGG.mjs +0 -226
  395. package/dist/_chunks/ca-5U32ON2v.mjs +0 -201
  396. package/dist/_chunks/ca-Cmk45QO6.js +0 -201
  397. package/dist/_chunks/cs-CM2aBUar.mjs +0 -125
  398. package/dist/_chunks/cs-CkJy6B2v.js +0 -125
  399. package/dist/_chunks/de-C72KDNOl.mjs +0 -199
  400. package/dist/_chunks/de-CCEmbAah.js +0 -199
  401. package/dist/_chunks/en-Ux26r5pl.mjs +0 -291
  402. package/dist/_chunks/en-fbKQxLGn.js +0 -291
  403. package/dist/_chunks/es-CeXiYflN.mjs +0 -196
  404. package/dist/_chunks/es-EUonQTon.js +0 -196
  405. package/dist/_chunks/eu-CdALomew.mjs +0 -202
  406. package/dist/_chunks/eu-VDH-3ovk.js +0 -202
  407. package/dist/_chunks/fr-B7kGGg3E.js +0 -206
  408. package/dist/_chunks/fr-B7kGGg3E.js.map +0 -1
  409. package/dist/_chunks/fr-CD9VFbPM.mjs +0 -206
  410. package/dist/_chunks/fr-CD9VFbPM.mjs.map +0 -1
  411. package/dist/_chunks/gu-BRmF601H.js +0 -200
  412. package/dist/_chunks/gu-CNpaMDpH.mjs +0 -200
  413. package/dist/_chunks/gu-CNpaMDpH.mjs.map +0 -1
  414. package/dist/_chunks/hi-CCJBptSq.js +0 -200
  415. package/dist/_chunks/hi-CCJBptSq.js.map +0 -1
  416. package/dist/_chunks/hi-Dwvd04m3.mjs +0 -200
  417. package/dist/_chunks/hi-Dwvd04m3.mjs.map +0 -1
  418. package/dist/_chunks/hooks-BAaaKPS_.js.map +0 -1
  419. package/dist/_chunks/hooks-E5u1mcgM.mjs +0 -8
  420. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +0 -1
  421. package/dist/_chunks/hu-CeYvaaO0.mjs +0 -202
  422. package/dist/_chunks/hu-CeYvaaO0.mjs.map +0 -1
  423. package/dist/_chunks/hu-sNV_yLYy.js +0 -202
  424. package/dist/_chunks/hu-sNV_yLYy.js.map +0 -1
  425. package/dist/_chunks/id-B5Ser98A.js +0 -160
  426. package/dist/_chunks/id-B5Ser98A.js.map +0 -1
  427. package/dist/_chunks/id-BtwA9WJT.mjs +0 -160
  428. package/dist/_chunks/index-CWpLBSt0.js +0 -3778
  429. package/dist/_chunks/index-CWpLBSt0.js.map +0 -1
  430. package/dist/_chunks/index-JNNNKUHs.mjs +0 -3759
  431. package/dist/_chunks/index-JNNNKUHs.mjs.map +0 -1
  432. package/dist/_chunks/it-BrVPqaf1.mjs +0 -162
  433. package/dist/_chunks/it-DkBIs7vD.js +0 -162
  434. package/dist/_chunks/ja-CcFe8diO.js +0 -196
  435. package/dist/_chunks/ja-CtsUxOvk.mjs +0 -196
  436. package/dist/_chunks/ko-HVQRlfUI.mjs +0 -195
  437. package/dist/_chunks/ko-woFZPmLk.js +0 -195
  438. package/dist/_chunks/layout--iHdZzRk.js +0 -476
  439. package/dist/_chunks/layout--iHdZzRk.js.map +0 -1
  440. package/dist/_chunks/layout-DC503LnF.mjs +0 -458
  441. package/dist/_chunks/layout-DC503LnF.mjs.map +0 -1
  442. package/dist/_chunks/ml-BihZwQit.mjs +0 -200
  443. package/dist/_chunks/ml-BihZwQit.mjs.map +0 -1
  444. package/dist/_chunks/ml-C2W8N8k1.js +0 -200
  445. package/dist/_chunks/ml-C2W8N8k1.js.map +0 -1
  446. package/dist/_chunks/ms-BuFotyP_.js +0 -144
  447. package/dist/_chunks/ms-m_WjyWx7.mjs +0 -144
  448. package/dist/_chunks/nl-D4R9gHx5.mjs +0 -202
  449. package/dist/_chunks/nl-D4R9gHx5.mjs.map +0 -1
  450. package/dist/_chunks/nl-bbEOHChV.js +0 -202
  451. package/dist/_chunks/nl-bbEOHChV.js.map +0 -1
  452. package/dist/_chunks/objects-gigeqt7s.js +0 -49
  453. package/dist/_chunks/objects-gigeqt7s.js.map +0 -1
  454. package/dist/_chunks/objects-mKMAmfec.mjs +0 -47
  455. package/dist/_chunks/objects-mKMAmfec.mjs.map +0 -1
  456. package/dist/_chunks/pl-sbx9mSt_.mjs +0 -199
  457. package/dist/_chunks/pl-sbx9mSt_.mjs.map +0 -1
  458. package/dist/_chunks/pl-uzwG-hk7.js +0 -199
  459. package/dist/_chunks/pl-uzwG-hk7.js.map +0 -1
  460. package/dist/_chunks/pt-BR-BiOz37D9.js +0 -201
  461. package/dist/_chunks/pt-BR-C71iDxnh.mjs +0 -201
  462. package/dist/_chunks/pt-BsaFvS8-.mjs +0 -95
  463. package/dist/_chunks/pt-BsaFvS8-.mjs.map +0 -1
  464. package/dist/_chunks/pt-CeXQuq50.js +0 -95
  465. package/dist/_chunks/pt-CeXQuq50.js.map +0 -1
  466. package/dist/_chunks/relations-BbHizA5K.js +0 -134
  467. package/dist/_chunks/relations-BbHizA5K.js.map +0 -1
  468. package/dist/_chunks/relations-CTje5t-a.mjs +0 -135
  469. package/dist/_chunks/relations-CTje5t-a.mjs.map +0 -1
  470. package/dist/_chunks/ru-BE6A4Exp.mjs +0 -231
  471. package/dist/_chunks/ru-BT3ybNny.js +0 -231
  472. package/dist/_chunks/sa-CcvkYInH.js +0 -200
  473. package/dist/_chunks/sa-CcvkYInH.js.map +0 -1
  474. package/dist/_chunks/sa-Dag0k-Z8.mjs +0 -200
  475. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +0 -1
  476. package/dist/_chunks/sk-BFg-R8qJ.mjs +0 -202
  477. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +0 -1
  478. package/dist/_chunks/sk-CvY09Xjv.js +0 -202
  479. package/dist/_chunks/sk-CvY09Xjv.js.map +0 -1
  480. package/dist/_chunks/sv-CUnfWGsh.mjs +0 -202
  481. package/dist/_chunks/sv-CUnfWGsh.mjs.map +0 -1
  482. package/dist/_chunks/sv-MYDuzgvT.js +0 -202
  483. package/dist/_chunks/sv-MYDuzgvT.js.map +0 -1
  484. package/dist/_chunks/th-BqbI8lIT.mjs +0 -148
  485. package/dist/_chunks/th-BqbI8lIT.mjs.map +0 -1
  486. package/dist/_chunks/th-D9_GfAjc.js +0 -148
  487. package/dist/_chunks/tr-CgeK3wJM.mjs +0 -199
  488. package/dist/_chunks/tr-CgeK3wJM.mjs.map +0 -1
  489. package/dist/_chunks/tr-D9UH-O_R.js +0 -199
  490. package/dist/_chunks/tr-D9UH-O_R.js.map +0 -1
  491. package/dist/_chunks/uk-C8EiqJY7.js +0 -144
  492. package/dist/_chunks/uk-C8EiqJY7.js.map +0 -1
  493. package/dist/_chunks/uk-CR-zDhAY.mjs +0 -144
  494. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs +0 -231
  495. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +0 -1
  496. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js +0 -249
  497. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +0 -1
  498. package/dist/_chunks/usePrev-B9w_-eYc.js +0 -15
  499. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  500. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  501. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
  502. package/dist/_chunks/vi-CJlYDheJ.js +0 -111
  503. package/dist/_chunks/vi-DUXIk_fw.mjs +0 -111
  504. package/dist/_chunks/zh-BWZspA60.mjs +0 -209
  505. package/dist/_chunks/zh-BWZspA60.mjs.map +0 -1
  506. package/dist/_chunks/zh-CQQfszqR.js +0 -209
  507. package/dist/_chunks/zh-CQQfszqR.js.map +0 -1
  508. package/dist/_chunks/zh-Hans-9kOncHGw.js +0 -952
  509. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +0 -952
  510. package/strapi-server.js +0 -3
@@ -1,620 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { useForm, Layouts, BackButton, InputRenderer, useNotification, useField, Form, useTracking, useAPIErrorHandler, Page } from "@strapi/admin/strapi-admin";
4
- import { Button, useCollator, Flex, Typography, Grid, Modal, Box, useComposedRefs, Menu, VisuallyHidden, Main, Divider } from "@strapi/design-system";
5
- import { useIntl } from "react-intl";
6
- import { Navigate } from "react-router-dom";
7
- import { g as getTranslation, y as capitalise, c as useDoc, o as useGetContentTypeConfigurationQuery, v as checkIfAttributeIsDisplayable, n as useDocLayout, z as useUpdateContentTypeConfigurationMutation, S as SINGLE_TYPES } from "./index-JNNNKUHs.mjs";
8
- import { u as useTypedSelector } from "./hooks-E5u1mcgM.mjs";
9
- import { s as setIn } from "./objects-mKMAmfec.mjs";
10
- import { Drag, Pencil, Cross, Plus } from "@strapi/icons";
11
- import { getEmptyImage } from "react-dnd-html5-backend";
12
- import { styled } from "styled-components";
13
- import { C as CardDragPreview } from "./CardDragPreview-DOxamsuj.mjs";
14
- import { u as useDragAndDrop, I as ItemTypes } from "./useDragAndDrop-DdHgKsqq.mjs";
15
- import * as yup from "yup";
16
- import { F as FieldTypeIcon } from "./FieldTypeIcon-CMlNO8PE.mjs";
17
- const Header = ({ name }) => {
18
- const { formatMessage } = useIntl();
19
- const modified = useForm("Header", (state) => state.modified);
20
- const isSubmitting = useForm("Header", (state) => state.isSubmitting);
21
- return /* @__PURE__ */ jsx(
22
- Layouts.Header,
23
- {
24
- navigationAction: /* @__PURE__ */ jsx(BackButton, {}),
25
- primaryAction: /* @__PURE__ */ jsx(Button, { size: "S", disabled: !modified, type: "submit", loading: isSubmitting, children: formatMessage({ id: "global.save", defaultMessage: "Save" }) }),
26
- subtitle: formatMessage({
27
- id: getTranslation("components.SettingsViewWrapper.pluginHeader.description.list-settings"),
28
- defaultMessage: "Define the settings of the list view."
29
- }),
30
- title: formatMessage(
31
- {
32
- id: getTranslation("components.SettingsViewWrapper.pluginHeader.title"),
33
- defaultMessage: "Configure the view - {name}"
34
- },
35
- { name: capitalise(name) }
36
- )
37
- }
38
- );
39
- };
40
- const EXCLUDED_SORT_ATTRIBUTE_TYPES = [
41
- "media",
42
- "richtext",
43
- "dynamiczone",
44
- "relation",
45
- "component",
46
- "json",
47
- "blocks"
48
- ];
49
- const Settings = () => {
50
- const { formatMessage, locale } = useIntl();
51
- const formatter = useCollator(locale, {
52
- sensitivity: "base"
53
- });
54
- const { schema } = useDoc();
55
- const layout = useForm("Settings", (state) => state.values.layout ?? []);
56
- const currentSortBy = useForm(
57
- "Settings",
58
- (state) => state.values.settings.defaultSortBy
59
- );
60
- const onChange = useForm("Settings", (state) => state.onChange);
61
- const sortOptions = React.useMemo(
62
- () => Object.values(layout).reduce((acc, field) => {
63
- if (schema && !EXCLUDED_SORT_ATTRIBUTE_TYPES.includes(schema.attributes[field.name].type)) {
64
- acc.push({
65
- value: field.name,
66
- label: typeof field.label !== "string" ? formatMessage(field.label) : field.label
67
- });
68
- }
69
- return acc;
70
- }, []),
71
- [formatMessage, layout, schema]
72
- );
73
- const sortOptionsSorted = sortOptions.sort((a, b) => formatter.compare(a.label, b.label));
74
- React.useEffect(() => {
75
- if (sortOptionsSorted.findIndex((opt) => opt.value === currentSortBy) === -1) {
76
- onChange("settings.defaultSortBy", sortOptionsSorted[0]?.value);
77
- }
78
- }, [currentSortBy, onChange, sortOptionsSorted]);
79
- const formLayout = React.useMemo(
80
- () => SETTINGS_FORM_LAYOUT.map(
81
- (row) => row.map((field) => {
82
- if (field.type === "enumeration") {
83
- return {
84
- ...field,
85
- hint: field.hint ? formatMessage(field.hint) : void 0,
86
- label: formatMessage(field.label),
87
- options: field.name === "settings.defaultSortBy" ? sortOptionsSorted : field.options
88
- };
89
- } else {
90
- return {
91
- ...field,
92
- hint: field.hint ? formatMessage(field.hint) : void 0,
93
- label: formatMessage(field.label)
94
- };
95
- }
96
- })
97
- ),
98
- [formatMessage, sortOptionsSorted]
99
- );
100
- return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
101
- /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "h2", children: formatMessage({
102
- id: getTranslation("containers.SettingPage.settings"),
103
- defaultMessage: "Settings"
104
- }) }),
105
- /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: formLayout.map(
106
- (row) => row.map(({ size, ...field }) => /* @__PURE__ */ jsx(Grid.Item, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name))
107
- ) }, "bottom")
108
- ] });
109
- };
110
- const SETTINGS_FORM_LAYOUT = [
111
- [
112
- {
113
- label: {
114
- id: getTranslation("form.Input.search"),
115
- defaultMessage: "Enable search"
116
- },
117
- name: "settings.searchable",
118
- size: 4,
119
- type: "boolean"
120
- },
121
- {
122
- label: {
123
- id: getTranslation("form.Input.filters"),
124
- defaultMessage: "Enable filters"
125
- },
126
- name: "settings.filterable",
127
- size: 4,
128
- type: "boolean"
129
- },
130
- {
131
- label: {
132
- id: getTranslation("form.Input.bulkActions"),
133
- defaultMessage: "Enable bulk actions"
134
- },
135
- name: "settings.bulkable",
136
- size: 4,
137
- type: "boolean"
138
- }
139
- ],
140
- [
141
- {
142
- hint: {
143
- id: getTranslation("form.Input.pageEntries.inputDescription"),
144
- defaultMessage: "Note: You can override this value in the Collection Type settings page."
145
- },
146
- label: {
147
- id: getTranslation("form.Input.pageEntries"),
148
- defaultMessage: "Entries per page"
149
- },
150
- name: "settings.pageSize",
151
- options: ["10", "20", "50", "100"].map((value) => ({ value, label: value })),
152
- size: 6,
153
- type: "enumeration"
154
- },
155
- {
156
- label: {
157
- id: getTranslation("form.Input.defaultSort"),
158
- defaultMessage: "Default sort attribute"
159
- },
160
- name: "settings.defaultSortBy",
161
- options: [],
162
- size: 3,
163
- type: "enumeration"
164
- },
165
- {
166
- label: {
167
- id: getTranslation("form.Input.sort.order"),
168
- defaultMessage: "Default sort order"
169
- },
170
- name: "settings.defaultSortOrder",
171
- options: ["ASC", "DESC"].map((value) => ({ value, label: value })),
172
- size: 3,
173
- type: "enumeration"
174
- }
175
- ]
176
- ];
177
- const FIELD_SCHEMA = yup.object().shape({
178
- label: yup.string().required(),
179
- sortable: yup.boolean()
180
- });
181
- const EditFieldForm = ({ attribute, name, onClose }) => {
182
- const { formatMessage } = useIntl();
183
- const { toggleNotification } = useNotification();
184
- const { value, onChange } = useField(name);
185
- if (!value) {
186
- console.error(
187
- "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."
188
- );
189
- toggleNotification({
190
- message: formatMessage({
191
- id: "content-manager.containers.list-settings.modal-form.error",
192
- defaultMessage: "An error occurred while trying to open the form."
193
- }),
194
- type: "danger"
195
- });
196
- return null;
197
- }
198
- let shouldDisplaySortToggle = !["media", "relation"].includes(attribute.type);
199
- if ("relation" in attribute && ["oneWay", "oneToOne", "manyToOne"].includes(attribute.relation)) {
200
- shouldDisplaySortToggle = true;
201
- }
202
- return /* @__PURE__ */ jsx(Modal.Content, { children: /* @__PURE__ */ jsxs(
203
- Form,
204
- {
205
- method: "PUT",
206
- initialValues: value,
207
- validationSchema: FIELD_SCHEMA,
208
- onSubmit: (data) => {
209
- onChange(name, data);
210
- onClose();
211
- },
212
- children: [
213
- /* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsxs(HeaderContainer, { children: [
214
- /* @__PURE__ */ jsx(FieldTypeIcon, { type: attribute.type }),
215
- /* @__PURE__ */ jsx(Modal.Title, { children: formatMessage(
216
- {
217
- id: getTranslation("containers.list-settings.modal-form.label"),
218
- defaultMessage: "Edit {fieldName}"
219
- },
220
- { fieldName: capitalise(value.label) }
221
- ) })
222
- ] }) }),
223
- /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: [
224
- {
225
- name: "label",
226
- label: formatMessage({
227
- id: getTranslation("form.Input.label"),
228
- defaultMessage: "Label"
229
- }),
230
- hint: formatMessage({
231
- id: getTranslation("form.Input.label.inputDescription"),
232
- defaultMessage: "This value overrides the label displayed in the table's head"
233
- }),
234
- size: 6,
235
- type: "string"
236
- },
237
- {
238
- label: formatMessage({
239
- id: getTranslation("form.Input.sort.field"),
240
- defaultMessage: "Enable sort on this field"
241
- }),
242
- name: "sortable",
243
- size: 6,
244
- type: "boolean"
245
- }
246
- ].filter(
247
- (field) => field.name !== "sortable" || field.name === "sortable" && shouldDisplaySortToggle
248
- ).map(({ size, ...field }) => /* @__PURE__ */ jsx(Grid.Item, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name)) }) }),
249
- /* @__PURE__ */ jsxs(Modal.Footer, { children: [
250
- /* @__PURE__ */ jsx(Button, { onClick: onClose, variant: "tertiary", children: formatMessage({ id: "app.components.Button.cancel", defaultMessage: "Cancel" }) }),
251
- /* @__PURE__ */ jsx(Button, { type: "submit", children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
252
- ] })
253
- ]
254
- }
255
- ) });
256
- };
257
- const HeaderContainer = styled(Flex)`
258
- svg {
259
- width: 3.2rem;
260
- margin-right: ${({ theme }) => theme.spaces[3]};
261
- }
262
- `;
263
- const DraggableCard = ({
264
- attribute,
265
- index,
266
- isDraggingSibling,
267
- label,
268
- name,
269
- onMoveField,
270
- onRemoveField,
271
- setIsDraggingSibling
272
- }) => {
273
- const [isModalOpen, setIsModalOpen] = React.useState(false);
274
- const { formatMessage } = useIntl();
275
- const [, forceRerenderAfterDnd] = React.useState(false);
276
- const [{ isDragging }, objectRef, dropRef, dragRef, dragPreviewRef] = useDragAndDrop(true, {
277
- type: ItemTypes.FIELD,
278
- item: { index, label, name },
279
- index,
280
- onMoveItem: onMoveField,
281
- onEnd: () => setIsDraggingSibling(false)
282
- });
283
- React.useEffect(() => {
284
- dragPreviewRef(getEmptyImage(), { captureDraggingState: false });
285
- }, [dragPreviewRef]);
286
- React.useEffect(() => {
287
- if (isDragging) {
288
- setIsDraggingSibling(true);
289
- }
290
- }, [isDragging, setIsDraggingSibling]);
291
- React.useEffect(() => {
292
- if (!isDraggingSibling) {
293
- forceRerenderAfterDnd((prev) => !prev);
294
- }
295
- }, [isDraggingSibling]);
296
- const composedRefs = useComposedRefs(dragRef, objectRef);
297
- return /* @__PURE__ */ jsxs(FieldWrapper, { ref: dropRef, children: [
298
- isDragging && /* @__PURE__ */ jsx(CardDragPreview, { label }),
299
- !isDragging && isDraggingSibling && /* @__PURE__ */ jsx(CardDragPreview, { isSibling: true, label }),
300
- !isDragging && !isDraggingSibling && /* @__PURE__ */ jsxs(
301
- FieldContainer,
302
- {
303
- borderColor: "neutral150",
304
- background: "neutral100",
305
- hasRadius: true,
306
- justifyContent: "space-between",
307
- onClick: () => setIsModalOpen(true),
308
- children: [
309
- /* @__PURE__ */ jsxs(Flex, { gap: 3, children: [
310
- /* @__PURE__ */ jsx(
311
- DragButton,
312
- {
313
- tag: "span",
314
- "aria-label": formatMessage(
315
- {
316
- id: getTranslation("components.DraggableCard.move.field"),
317
- defaultMessage: "Move {item}"
318
- },
319
- { item: label }
320
- ),
321
- onClick: (e) => e.stopPropagation(),
322
- ref: composedRefs,
323
- children: /* @__PURE__ */ jsx(Drag, {})
324
- }
325
- ),
326
- /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: label })
327
- ] }),
328
- /* @__PURE__ */ jsxs(Flex, { paddingLeft: 3, onClick: (e) => e.stopPropagation(), children: [
329
- /* @__PURE__ */ jsxs(Modal.Root, { open: isModalOpen, onOpenChange: setIsModalOpen, children: [
330
- /* @__PURE__ */ jsx(Modal.Trigger, { children: /* @__PURE__ */ jsx(
331
- ActionButton,
332
- {
333
- onClick: (e) => {
334
- e.stopPropagation();
335
- },
336
- "aria-label": formatMessage(
337
- {
338
- id: getTranslation("components.DraggableCard.edit.field"),
339
- defaultMessage: "Edit {item}"
340
- },
341
- { item: label }
342
- ),
343
- type: "button",
344
- children: /* @__PURE__ */ jsx(Pencil, { width: "1.2rem", height: "1.2rem" })
345
- }
346
- ) }),
347
- /* @__PURE__ */ jsx(
348
- EditFieldForm,
349
- {
350
- attribute,
351
- name: `layout.${index}`,
352
- onClose: () => {
353
- setIsModalOpen(false);
354
- }
355
- }
356
- )
357
- ] }),
358
- /* @__PURE__ */ jsx(
359
- ActionButton,
360
- {
361
- onClick: onRemoveField,
362
- "data-testid": `delete-${name}`,
363
- "aria-label": formatMessage(
364
- {
365
- id: getTranslation("components.DraggableCard.delete.field"),
366
- defaultMessage: "Delete {item}"
367
- },
368
- { item: label }
369
- ),
370
- type: "button",
371
- children: /* @__PURE__ */ jsx(Cross, { width: "1.2rem", height: "1.2rem" })
372
- }
373
- )
374
- ] })
375
- ]
376
- }
377
- )
378
- ] });
379
- };
380
- const ActionButton = styled.button`
381
- display: flex;
382
- align-items: center;
383
- height: ${({ theme }) => theme.spaces[7]};
384
- color: ${({ theme }) => theme.colors.neutral600};
385
-
386
- &:hover {
387
- color: ${({ theme }) => theme.colors.neutral700};
388
- }
389
-
390
- &:last-child {
391
- padding: 0 ${({ theme }) => theme.spaces[3]};
392
- }
393
- `;
394
- const DragButton = styled(ActionButton)`
395
- padding: 0 ${({ theme }) => theme.spaces[3]};
396
- border-right: 1px solid ${({ theme }) => theme.colors.neutral150};
397
- cursor: all-scroll;
398
- `;
399
- const FieldContainer = styled(Flex)`
400
- max-height: 3.2rem;
401
- cursor: pointer;
402
- `;
403
- const FieldWrapper = styled(Box)`
404
- &:last-child {
405
- padding-right: ${({ theme }) => theme.spaces[3]};
406
- }
407
- `;
408
- const SortDisplayedFields = () => {
409
- const { formatMessage } = useIntl();
410
- const { model, schema } = useDoc();
411
- const [isDraggingSibling, setIsDraggingSibling] = React.useState(false);
412
- const [lastAction, setLastAction] = React.useState(null);
413
- const scrollableContainerRef = React.useRef(null);
414
- const values = useForm(
415
- "SortDisplayedFields",
416
- (state) => state.values.layout ?? []
417
- );
418
- const addFieldRow = useForm("SortDisplayedFields", (state) => state.addFieldRow);
419
- const removeFieldRow = useForm("SortDisplayedFields", (state) => state.removeFieldRow);
420
- const moveFieldRow = useForm("SortDisplayedFields", (state) => state.moveFieldRow);
421
- const { metadata: allMetadata } = useGetContentTypeConfigurationQuery(model, {
422
- selectFromResult: ({ data }) => ({ metadata: data?.contentType.metadatas ?? {} })
423
- });
424
- const nonDisplayedFields = React.useMemo(() => {
425
- if (!schema) {
426
- return [];
427
- }
428
- const displayedFieldNames = values.map((field) => field.name);
429
- return Object.entries(schema.attributes).reduce(
430
- (acc, [name, attribute]) => {
431
- if (!displayedFieldNames.includes(name) && checkIfAttributeIsDisplayable(attribute)) {
432
- const { list: metadata } = allMetadata[name];
433
- acc.push({
434
- name,
435
- label: metadata.label || name,
436
- sortable: metadata.sortable
437
- });
438
- }
439
- return acc;
440
- },
441
- []
442
- );
443
- }, [allMetadata, values, schema]);
444
- const handleAddField = (field) => {
445
- setLastAction("add");
446
- addFieldRow("layout", field);
447
- };
448
- const handleRemoveField = (index) => {
449
- setLastAction("remove");
450
- removeFieldRow("layout", index);
451
- };
452
- const handleMoveField = (dragIndex, hoverIndex) => {
453
- moveFieldRow("layout", dragIndex, hoverIndex);
454
- };
455
- React.useEffect(() => {
456
- if (lastAction === "add" && scrollableContainerRef?.current) {
457
- scrollableContainerRef.current.scrollLeft = scrollableContainerRef.current.scrollWidth;
458
- }
459
- }, [lastAction]);
460
- return /* @__PURE__ */ jsxs(Flex, { alignItems: "stretch", direction: "column", gap: 4, children: [
461
- /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "h2", children: formatMessage({
462
- id: getTranslation("containers.SettingPage.view"),
463
- defaultMessage: "View"
464
- }) }),
465
- /* @__PURE__ */ jsxs(Flex, { padding: 4, borderColor: "neutral300", borderStyle: "dashed", borderWidth: "1px", hasRadius: true, children: [
466
- /* @__PURE__ */ jsx(Box, { flex: "1", overflow: "auto hidden", ref: scrollableContainerRef, children: /* @__PURE__ */ jsx(Flex, { gap: 3, children: values.map((field, index) => /* @__PURE__ */ jsx(
467
- DraggableCard,
468
- {
469
- index,
470
- isDraggingSibling,
471
- onMoveField: handleMoveField,
472
- onRemoveField: () => handleRemoveField(index),
473
- setIsDraggingSibling,
474
- ...field,
475
- attribute: schema.attributes[field.name],
476
- label: typeof field.label === "object" ? formatMessage(field.label) : field.label
477
- },
478
- field.name
479
- )) }) }),
480
- /* @__PURE__ */ jsxs(Menu.Root, { children: [
481
- /* @__PURE__ */ jsxs(
482
- Menu.Trigger,
483
- {
484
- paddingLeft: 2,
485
- paddingRight: 2,
486
- justifyContent: "center",
487
- endIcon: null,
488
- disabled: nonDisplayedFields.length === 0,
489
- variant: "tertiary",
490
- children: [
491
- /* @__PURE__ */ jsx(VisuallyHidden, { tag: "span", children: formatMessage({
492
- id: getTranslation("components.FieldSelect.label"),
493
- defaultMessage: "Add a field"
494
- }) }),
495
- /* @__PURE__ */ jsx(Plus, { "aria-hidden": true, focusable: false, style: { position: "relative", top: 2 } })
496
- ]
497
- }
498
- ),
499
- /* @__PURE__ */ jsx(Menu.Content, { children: nonDisplayedFields.map((field) => /* @__PURE__ */ jsx(Menu.Item, { onSelect: () => handleAddField(field), children: typeof field.label === "object" ? formatMessage(field.label) : field.label }, field.name)) })
500
- ] })
501
- ] })
502
- ] });
503
- };
504
- const ListConfiguration = () => {
505
- const { formatMessage } = useIntl();
506
- const { trackUsage } = useTracking();
507
- const { toggleNotification } = useNotification();
508
- const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
509
- const { model, collectionType } = useDoc();
510
- const { isLoading: isLoadingLayout, list, edit } = useDocLayout();
511
- const [updateContentTypeConfiguration] = useUpdateContentTypeConfigurationMutation();
512
- const handleSubmit = async (data) => {
513
- try {
514
- trackUsage("willSaveContentTypeLayout");
515
- const layoutData = data.layout ?? [];
516
- const meta = Object.entries(edit.metadatas).reduce((acc, [name, editMeta]) => {
517
- const { mainField: _mainField, ...listMeta } = list.metadatas[name];
518
- const { label, sortable } = layoutData.find((field) => field.name === name) ?? {};
519
- acc[name] = {
520
- edit: editMeta,
521
- list: {
522
- ...listMeta,
523
- label: label || listMeta.label,
524
- sortable: sortable || listMeta.sortable
525
- }
526
- };
527
- return acc;
528
- }, {});
529
- const res = await updateContentTypeConfiguration({
530
- layouts: {
531
- edit: edit.layout.flatMap(
532
- (panel) => panel.map((row) => row.map(({ name, size }) => ({ name, size })))
533
- ),
534
- list: layoutData.map((field) => field.name)
535
- },
536
- settings: setIn(data.settings, "displayName", void 0),
537
- metadatas: meta,
538
- uid: model
539
- });
540
- if ("data" in res) {
541
- trackUsage("didEditListSettings");
542
- toggleNotification({
543
- type: "success",
544
- message: formatMessage({ id: "notification.success.saved", defaultMessage: "Saved" })
545
- });
546
- } else {
547
- toggleNotification({
548
- type: "danger",
549
- message: formatAPIError(res.error)
550
- });
551
- }
552
- } catch (err) {
553
- console.error(err);
554
- toggleNotification({
555
- type: "danger",
556
- message: formatMessage({ id: "notification.error", defaultMessage: "An error occurred" })
557
- });
558
- }
559
- };
560
- const initialValues = React.useMemo(() => {
561
- return {
562
- layout: list.layout.map(({ label, sortable, name }) => ({
563
- label: typeof label === "string" ? label : formatMessage(label),
564
- sortable,
565
- name
566
- })),
567
- settings: list.settings
568
- };
569
- }, [formatMessage, list.layout, list.settings]);
570
- if (collectionType === SINGLE_TYPES) {
571
- return /* @__PURE__ */ jsx(Navigate, { to: `/single-types/${model}` });
572
- }
573
- if (isLoadingLayout) {
574
- return /* @__PURE__ */ jsx(Page.Loading, {});
575
- }
576
- return /* @__PURE__ */ jsxs(Layouts.Root, { children: [
577
- /* @__PURE__ */ jsx(Page.Title, { children: `Configure ${list.settings.displayName} List View` }),
578
- /* @__PURE__ */ jsx(Main, { children: /* @__PURE__ */ jsxs(Form, { initialValues, onSubmit: handleSubmit, method: "PUT", children: [
579
- /* @__PURE__ */ jsx(
580
- Header,
581
- {
582
- collectionType,
583
- model,
584
- name: list.settings.displayName ?? ""
585
- }
586
- ),
587
- /* @__PURE__ */ jsx(Layouts.Content, { children: /* @__PURE__ */ jsxs(
588
- Flex,
589
- {
590
- alignItems: "stretch",
591
- background: "neutral0",
592
- direction: "column",
593
- gap: 6,
594
- hasRadius: true,
595
- shadow: "tableShadow",
596
- paddingTop: 6,
597
- paddingBottom: 6,
598
- paddingLeft: 7,
599
- paddingRight: 7,
600
- children: [
601
- /* @__PURE__ */ jsx(Settings, {}),
602
- /* @__PURE__ */ jsx(Divider, {}),
603
- /* @__PURE__ */ jsx(SortDisplayedFields, {})
604
- ]
605
- }
606
- ) })
607
- ] }) })
608
- ] });
609
- };
610
- const ProtectedListConfiguration = () => {
611
- const permissions = useTypedSelector(
612
- (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations
613
- );
614
- return /* @__PURE__ */ jsx(Page.Protect, { permissions, children: /* @__PURE__ */ jsx(ListConfiguration, {}) });
615
- };
616
- export {
617
- ListConfiguration,
618
- ProtectedListConfiguration
619
- };
620
- //# sourceMappingURL=ListConfigurationPage-DozVMKcR.mjs.map