@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,641 +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-BZoNZMXL.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, { gap: 4, children: formLayout.map(
128
- (row) => row.map(({ size, ...field }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { 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 id = React.useId();
207
- const { value, onChange } = strapiAdmin.useField(name);
208
- if (!value) {
209
- console.error(
210
- "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."
211
- );
212
- toggleNotification({
213
- message: formatMessage({
214
- id: "content-manager.containers.list-settings.modal-form.error",
215
- defaultMessage: "An error occurred while trying to open the form."
216
- }),
217
- type: "danger"
218
- });
219
- return null;
220
- }
221
- let shouldDisplaySortToggle = !["media", "relation"].includes(attribute.type);
222
- if ("relation" in attribute && ["oneWay", "oneToOne", "manyToOne"].includes(attribute.relation)) {
223
- shouldDisplaySortToggle = true;
224
- }
225
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalLayout, { onClose, labelledBy: id, children: /* @__PURE__ */ jsxRuntime.jsxs(
226
- strapiAdmin.Form,
227
- {
228
- method: "PUT",
229
- initialValues: value,
230
- validationSchema: FIELD_SCHEMA,
231
- onSubmit: (data) => {
232
- onChange(name, data);
233
- onClose();
234
- },
235
- children: [
236
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { children: [
237
- /* @__PURE__ */ jsxRuntime.jsx(FieldTypeIcon.FieldTypeIcon, { type: attribute.type }),
238
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id, children: formatMessage(
239
- {
240
- id: index.getTranslation("containers.list-settings.modal-form.label"),
241
- defaultMessage: "Edit {fieldName}"
242
- },
243
- { fieldName: index.capitalise(value.label) }
244
- ) })
245
- ] }) }),
246
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: [
247
- {
248
- name: "label",
249
- label: formatMessage({
250
- id: index.getTranslation("form.Input.label"),
251
- defaultMessage: "Label"
252
- }),
253
- hint: formatMessage({
254
- id: index.getTranslation("form.Input.label.inputDescription"),
255
- defaultMessage: "This value overrides the label displayed in the table's head"
256
- }),
257
- size: 6,
258
- type: "string"
259
- },
260
- {
261
- label: formatMessage({
262
- id: index.getTranslation("form.Input.sort.field"),
263
- defaultMessage: "Enable sort on this field"
264
- }),
265
- name: "sortable",
266
- size: 6,
267
- type: "boolean"
268
- }
269
- ].filter(
270
- (field) => field.name !== "sortable" || field.name === "sortable" && shouldDisplaySortToggle
271
- ).map(({ size, ...field }) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { s: 12, col: size, children: /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.InputRenderer, { ...field }) }, field.name)) }) }),
272
- /* @__PURE__ */ jsxRuntime.jsx(
273
- designSystem.ModalFooter,
274
- {
275
- startActions: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onClose, variant: "tertiary", children: formatMessage({ id: "app.components.Button.cancel", defaultMessage: "Cancel" }) }),
276
- endActions: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { type: "submit", children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
277
- }
278
- )
279
- ]
280
- }
281
- ) });
282
- };
283
- const HeaderContainer = styledComponents.styled(designSystem.Flex)`
284
- svg {
285
- width: 3.2rem;
286
- margin-right: ${({ theme }) => theme.spaces[3]};
287
- }
288
- `;
289
- const DraggableCard = ({
290
- attribute,
291
- index: index$1,
292
- isDraggingSibling,
293
- label,
294
- name,
295
- onMoveField,
296
- onRemoveField,
297
- setIsDraggingSibling
298
- }) => {
299
- const [isModalOpen, setIsModalOpen] = React__namespace.useState(false);
300
- const { formatMessage } = reactIntl.useIntl();
301
- const [, forceRerenderAfterDnd] = React__namespace.useState(false);
302
- const [{ isDragging }, objectRef, dropRef, dragRef, dragPreviewRef] = useDragAndDrop.useDragAndDrop(true, {
303
- type: useDragAndDrop.ItemTypes.FIELD,
304
- item: { index: index$1, label, name },
305
- index: index$1,
306
- onMoveItem: onMoveField,
307
- onEnd: () => setIsDraggingSibling(false)
308
- });
309
- React__namespace.useEffect(() => {
310
- dragPreviewRef(reactDndHtml5Backend.getEmptyImage(), { captureDraggingState: false });
311
- }, [dragPreviewRef]);
312
- React__namespace.useEffect(() => {
313
- if (isDragging) {
314
- setIsDraggingSibling(true);
315
- }
316
- }, [isDragging, setIsDraggingSibling]);
317
- React__namespace.useEffect(() => {
318
- if (!isDraggingSibling) {
319
- forceRerenderAfterDnd((prev) => !prev);
320
- }
321
- }, [isDraggingSibling]);
322
- const composedRefs = designSystem.useComposedRefs(dragRef, objectRef);
323
- return /* @__PURE__ */ jsxRuntime.jsxs(FieldWrapper, { ref: dropRef, children: [
324
- isDragging && /* @__PURE__ */ jsxRuntime.jsx(CardDragPreview.CardDragPreview, { label }),
325
- !isDragging && isDraggingSibling && /* @__PURE__ */ jsxRuntime.jsx(CardDragPreview.CardDragPreview, { isSibling: true, label }),
326
- !isDragging && !isDraggingSibling && /* @__PURE__ */ jsxRuntime.jsxs(
327
- FieldContainer,
328
- {
329
- borderColor: "neutral150",
330
- background: "neutral100",
331
- hasRadius: true,
332
- justifyContent: "space-between",
333
- onClick: () => setIsModalOpen(true),
334
- children: [
335
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 3, children: [
336
- /* @__PURE__ */ jsxRuntime.jsx(
337
- DragButton,
338
- {
339
- tag: "span",
340
- "aria-label": formatMessage(
341
- {
342
- id: index.getTranslation("components.DraggableCard.move.field"),
343
- defaultMessage: "Move {item}"
344
- },
345
- { item: label }
346
- ),
347
- onClick: (e) => e.stopPropagation(),
348
- ref: composedRefs,
349
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Drag, {})
350
- }
351
- ),
352
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: label })
353
- ] }),
354
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { paddingLeft: 3, children: [
355
- /* @__PURE__ */ jsxRuntime.jsx(
356
- ActionButton,
357
- {
358
- onClick: (e) => {
359
- e.stopPropagation();
360
- setIsModalOpen(true);
361
- },
362
- "aria-label": formatMessage(
363
- {
364
- id: index.getTranslation("components.DraggableCard.edit.field"),
365
- defaultMessage: "Edit {item}"
366
- },
367
- { item: label }
368
- ),
369
- type: "button",
370
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Pencil, { width: "1.2rem", height: "1.2rem" })
371
- }
372
- ),
373
- /* @__PURE__ */ jsxRuntime.jsx(
374
- ActionButton,
375
- {
376
- onClick: onRemoveField,
377
- "data-testid": `delete-${name}`,
378
- "aria-label": formatMessage(
379
- {
380
- id: index.getTranslation("components.DraggableCard.delete.field"),
381
- defaultMessage: "Delete {item}"
382
- },
383
- { item: label }
384
- ),
385
- type: "button",
386
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.Cross, { width: "1.2rem", height: "1.2rem" })
387
- }
388
- )
389
- ] })
390
- ]
391
- }
392
- ),
393
- isModalOpen && /* @__PURE__ */ jsxRuntime.jsx(
394
- EditFieldForm,
395
- {
396
- attribute,
397
- name: `layout.${index$1}`,
398
- onClose: () => setIsModalOpen(false)
399
- }
400
- )
401
- ] });
402
- };
403
- const ActionButton = styledComponents.styled.button`
404
- display: flex;
405
- align-items: center;
406
- height: ${({ theme }) => theme.spaces[7]};
407
- color: ${({ theme }) => theme.colors.neutral600};
408
-
409
- &:hover {
410
- color: ${({ theme }) => theme.colors.neutral700};
411
- }
412
-
413
- &:last-child {
414
- padding: 0 ${({ theme }) => theme.spaces[3]};
415
- }
416
- `;
417
- const DragButton = styledComponents.styled(ActionButton)`
418
- padding: 0 ${({ theme }) => theme.spaces[3]};
419
- border-right: 1px solid ${({ theme }) => theme.colors.neutral150};
420
- cursor: all-scroll;
421
- `;
422
- const FieldContainer = styledComponents.styled(designSystem.Flex)`
423
- max-height: 3.2rem;
424
- cursor: pointer;
425
- `;
426
- const FieldWrapper = styledComponents.styled(designSystem.Box)`
427
- &:last-child {
428
- padding-right: ${({ theme }) => theme.spaces[3]};
429
- }
430
- `;
431
- const SortDisplayedFields = () => {
432
- const { formatMessage } = reactIntl.useIntl();
433
- const { model, schema } = index.useDoc();
434
- const [isDraggingSibling, setIsDraggingSibling] = React__namespace.useState(false);
435
- const [lastAction, setLastAction] = React__namespace.useState(null);
436
- const scrollableContainerRef = React__namespace.useRef(null);
437
- const values = strapiAdmin.useForm(
438
- "SortDisplayedFields",
439
- (state) => state.values.layout ?? []
440
- );
441
- const addFieldRow = strapiAdmin.useForm("SortDisplayedFields", (state) => state.addFieldRow);
442
- const removeFieldRow = strapiAdmin.useForm("SortDisplayedFields", (state) => state.removeFieldRow);
443
- const moveFieldRow = strapiAdmin.useForm("SortDisplayedFields", (state) => state.moveFieldRow);
444
- const { metadata: allMetadata } = index.useGetContentTypeConfigurationQuery(model, {
445
- selectFromResult: ({ data }) => ({ metadata: data?.contentType.metadatas ?? {} })
446
- });
447
- const nonDisplayedFields = React__namespace.useMemo(() => {
448
- if (!schema) {
449
- return [];
450
- }
451
- const displayedFieldNames = values.map((field) => field.name);
452
- return Object.entries(schema.attributes).reduce(
453
- (acc, [name, attribute]) => {
454
- if (!displayedFieldNames.includes(name) && index.checkIfAttributeIsDisplayable(attribute)) {
455
- const { list: metadata } = allMetadata[name];
456
- acc.push({
457
- name,
458
- label: metadata.label || name,
459
- sortable: metadata.sortable
460
- });
461
- }
462
- return acc;
463
- },
464
- []
465
- );
466
- }, [allMetadata, values, schema]);
467
- const handleAddField = (field) => {
468
- setLastAction("add");
469
- addFieldRow("layout", field);
470
- };
471
- const handleRemoveField = (index2) => {
472
- setLastAction("remove");
473
- removeFieldRow("layout", index2);
474
- };
475
- const handleMoveField = (dragIndex, hoverIndex) => {
476
- moveFieldRow("layout", dragIndex, hoverIndex);
477
- };
478
- React__namespace.useEffect(() => {
479
- if (lastAction === "add" && scrollableContainerRef?.current) {
480
- scrollableContainerRef.current.scrollLeft = scrollableContainerRef.current.scrollWidth;
481
- }
482
- }, [lastAction]);
483
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "stretch", direction: "column", gap: 4, children: [
484
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", tag: "h2", children: formatMessage({
485
- id: index.getTranslation("containers.SettingPage.view"),
486
- defaultMessage: "View"
487
- }) }),
488
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { padding: 4, borderColor: "neutral300", borderStyle: "dashed", borderWidth: "1px", hasRadius: true, children: [
489
- /* @__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(
490
- DraggableCard,
491
- {
492
- index: index2,
493
- isDraggingSibling,
494
- onMoveField: handleMoveField,
495
- onRemoveField: () => handleRemoveField(index2),
496
- setIsDraggingSibling,
497
- ...field,
498
- attribute: schema.attributes[field.name],
499
- label: typeof field.label === "object" ? formatMessage(field.label) : field.label
500
- },
501
- field.name
502
- )) }) }),
503
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { children: [
504
- /* @__PURE__ */ jsxRuntime.jsxs(
505
- designSystem.Menu.Trigger,
506
- {
507
- paddingLeft: 2,
508
- paddingRight: 2,
509
- justifyContent: "center",
510
- endIcon: null,
511
- disabled: nonDisplayedFields.length === 0,
512
- variant: "tertiary",
513
- children: [
514
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { tag: "span", children: formatMessage({
515
- id: index.getTranslation("components.FieldSelect.label"),
516
- defaultMessage: "Add a field"
517
- }) }),
518
- /* @__PURE__ */ jsxRuntime.jsx(Icons.Plus, { "aria-hidden": true, focusable: false, style: { position: "relative", top: 2 } })
519
- ]
520
- }
521
- ),
522
- /* @__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)) })
523
- ] })
524
- ] })
525
- ] });
526
- };
527
- const ListConfiguration = () => {
528
- const { formatMessage } = reactIntl.useIntl();
529
- const { trackUsage } = strapiAdmin.useTracking();
530
- const { toggleNotification } = strapiAdmin.useNotification();
531
- const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
532
- const { model, collectionType } = index.useDoc();
533
- const { isLoading: isLoadingLayout, list, edit } = index.useDocLayout();
534
- const [updateContentTypeConfiguration] = index.useUpdateContentTypeConfigurationMutation();
535
- const handleSubmit = async (data) => {
536
- try {
537
- trackUsage("willSaveContentTypeLayout");
538
- const layoutData = data.layout ?? [];
539
- const meta = Object.entries(edit.metadatas).reduce((acc, [name, editMeta]) => {
540
- const { mainField: _mainField, ...listMeta } = list.metadatas[name];
541
- const { label, sortable } = layoutData.find((field) => field.name === name) ?? {};
542
- acc[name] = {
543
- edit: editMeta,
544
- list: {
545
- ...listMeta,
546
- label: label || listMeta.label,
547
- sortable: sortable || listMeta.sortable
548
- }
549
- };
550
- return acc;
551
- }, {});
552
- const res = await updateContentTypeConfiguration({
553
- layouts: {
554
- edit: edit.layout.flatMap(
555
- (panel) => panel.map((row) => row.map(({ name, size }) => ({ name, size })))
556
- ),
557
- list: layoutData.map((field) => field.name)
558
- },
559
- settings: objects.setIn(data.settings, "displayName", void 0),
560
- metadatas: meta,
561
- uid: model
562
- });
563
- if ("data" in res) {
564
- trackUsage("didEditListSettings");
565
- toggleNotification({
566
- type: "success",
567
- message: formatMessage({ id: "notification.success.saved", defaultMessage: "Saved" })
568
- });
569
- } else {
570
- toggleNotification({
571
- type: "danger",
572
- message: formatAPIError(res.error)
573
- });
574
- }
575
- } catch (err) {
576
- console.error(err);
577
- toggleNotification({
578
- type: "danger",
579
- message: formatMessage({ id: "notification.error", defaultMessage: "An error occurred" })
580
- });
581
- }
582
- };
583
- const initialValues = React__namespace.useMemo(() => {
584
- return {
585
- layout: list.layout.map(({ label, sortable, name }) => ({
586
- label: typeof label === "string" ? label : formatMessage(label),
587
- sortable,
588
- name
589
- })),
590
- settings: list.settings
591
- };
592
- }, [formatMessage, list.layout, list.settings]);
593
- if (collectionType === index.SINGLE_TYPES) {
594
- return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: `/single-types/${model}` });
595
- }
596
- if (isLoadingLayout) {
597
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
598
- }
599
- return /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Layouts.Root, { children: [
600
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Title, { children: `Configure ${list.settings.displayName} List View` }),
601
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Main, { children: /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Form, { initialValues, onSubmit: handleSubmit, method: "PUT", children: [
602
- /* @__PURE__ */ jsxRuntime.jsx(
603
- Header,
604
- {
605
- collectionType,
606
- model,
607
- name: list.settings.displayName ?? ""
608
- }
609
- ),
610
- /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(
611
- designSystem.Flex,
612
- {
613
- alignItems: "stretch",
614
- background: "neutral0",
615
- direction: "column",
616
- gap: 6,
617
- hasRadius: true,
618
- shadow: "tableShadow",
619
- paddingTop: 6,
620
- paddingBottom: 6,
621
- paddingLeft: 7,
622
- paddingRight: 7,
623
- children: [
624
- /* @__PURE__ */ jsxRuntime.jsx(Settings, {}),
625
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
626
- /* @__PURE__ */ jsxRuntime.jsx(SortDisplayedFields, {})
627
- ]
628
- }
629
- ) })
630
- ] }) })
631
- ] });
632
- };
633
- const ProtectedListConfiguration = () => {
634
- const permissions = hooks.useTypedSelector(
635
- (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations
636
- );
637
- return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Page.Protect, { permissions, children: /* @__PURE__ */ jsxRuntime.jsx(ListConfiguration, {}) });
638
- };
639
- exports.ListConfiguration = ListConfiguration;
640
- exports.ProtectedListConfiguration = ProtectedListConfiguration;
641
- //# sourceMappingURL=ListConfigurationPage-CpfstlYY.js.map