@strapi/content-manager 0.0.0-experimental.cb311d9fcfbd8e441f790aea232f0a39bdd90e16 → 0.0.0-experimental.ce3ce68ff05de341bbdb48e7164d5367cffa839c

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