@strapi/content-manager 0.0.0-experimental.dd3311938ac827f1fa8560c8840a9a394f5896c0 → 0.0.0-experimental.ddb35414098c2a2816cae28a6abd5be1c4d8a58a

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