@strapi/content-manager 0.0.0-experimental.e60ec1829240dae21c1e1d29076681c322288813 → 0.0.0-experimental.e8d8fc824d0f6a695b2a9ebaa4680ed21c3645ca

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 (257) hide show
  1. package/LICENSE +18 -3
  2. package/dist/_chunks/{CardDragPreview-DSVYodBX.js → CardDragPreview-C0QyJgRA.js} +10 -14
  3. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -0
  4. package/dist/_chunks/{CardDragPreview-ikSG4M46.mjs → CardDragPreview-DOxamsuj.mjs} +7 -9
  5. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -0
  6. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js → ComponentConfigurationPage-BlzvDpbX.js} +5 -6
  7. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js.map → ComponentConfigurationPage-BlzvDpbX.js.map} +1 -1
  8. package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs → ComponentConfigurationPage-DaPOlQaD.mjs} +4 -4
  9. package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs.map → ComponentConfigurationPage-DaPOlQaD.mjs.map} +1 -1
  10. package/dist/_chunks/{ComponentIcon-BBQsYCVn.js → ComponentIcon-CRbtQEUV.js} +9 -4
  11. package/dist/_chunks/ComponentIcon-CRbtQEUV.js.map +1 -0
  12. package/dist/_chunks/{ComponentIcon-BOFnK76n.mjs → ComponentIcon-u4bIXTFY.mjs} +9 -3
  13. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -0
  14. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs → EditConfigurationPage-BZPXItXo.mjs} +4 -4
  15. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs.map → EditConfigurationPage-BZPXItXo.mjs.map} +1 -1
  16. package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js → EditConfigurationPage-uy-v43AR.js} +5 -6
  17. package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js.map → EditConfigurationPage-uy-v43AR.js.map} +1 -1
  18. package/dist/_chunks/{EditViewPage-DvNpQkam.js → EditViewPage-DT6A4ayX.js} +102 -54
  19. package/dist/_chunks/EditViewPage-DT6A4ayX.js.map +1 -0
  20. package/dist/_chunks/EditViewPage-oOLeTySr.mjs +254 -0
  21. package/dist/_chunks/EditViewPage-oOLeTySr.mjs.map +1 -0
  22. package/dist/_chunks/{Field-6gvGdPBV.mjs → Field-D7dv2aUX.mjs} +1192 -896
  23. package/dist/_chunks/Field-D7dv2aUX.mjs.map +1 -0
  24. package/dist/_chunks/{Field-DmVKIAOo.js → Field-kYFVIGiP.js} +1238 -943
  25. package/dist/_chunks/Field-kYFVIGiP.js.map +1 -0
  26. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
  27. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
  28. package/dist/_chunks/{Form-DW6K1IH-.mjs → Form-BxR6sc29.mjs} +67 -46
  29. package/dist/_chunks/Form-BxR6sc29.mjs.map +1 -0
  30. package/dist/_chunks/{Form-CPZC9vWa.js → Form-CCijSg3V.js} +68 -49
  31. package/dist/_chunks/Form-CCijSg3V.js.map +1 -0
  32. package/dist/_chunks/{History-DeAPlvtv.js → History-BMndx49M.js} +182 -147
  33. package/dist/_chunks/History-BMndx49M.js.map +1 -0
  34. package/dist/_chunks/{History-Dmr9fmUA.mjs → History-D8F7aYQU.mjs} +181 -144
  35. package/dist/_chunks/History-D8F7aYQU.mjs.map +1 -0
  36. package/dist/_chunks/{ListConfigurationPage-DPCwW5Vr.js → ListConfigurationPage-DouY1EWM.js} +72 -63
  37. package/dist/_chunks/ListConfigurationPage-DouY1EWM.js.map +1 -0
  38. package/dist/_chunks/{ListConfigurationPage-DhwvYcNv.mjs → ListConfigurationPage-DqAdSPwC.mjs} +68 -57
  39. package/dist/_chunks/ListConfigurationPage-DqAdSPwC.mjs.map +1 -0
  40. package/dist/_chunks/{ListViewPage-5ySZ-VUs.js → ListViewPage-BPVmh9pq.js} +179 -164
  41. package/dist/_chunks/ListViewPage-BPVmh9pq.js.map +1 -0
  42. package/dist/_chunks/{ListViewPage-BtAwuYLE.mjs → ListViewPage-C73F0jPh.mjs} +175 -159
  43. package/dist/_chunks/ListViewPage-C73F0jPh.mjs.map +1 -0
  44. package/dist/_chunks/{NoContentTypePage-DSPxnxxp.mjs → NoContentTypePage-B5w7iJOF.mjs} +3 -3
  45. package/dist/_chunks/NoContentTypePage-B5w7iJOF.mjs.map +1 -0
  46. package/dist/_chunks/{NoContentTypePage-DOC_yWOf.js → NoContentTypePage-BwcL--4H.js} +3 -3
  47. package/dist/_chunks/NoContentTypePage-BwcL--4H.js.map +1 -0
  48. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js → NoPermissionsPage-BMFKVcwJ.js} +2 -2
  49. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js.map → NoPermissionsPage-BMFKVcwJ.js.map} +1 -1
  50. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs → NoPermissionsPage-UnEgMGK4.mjs} +2 -2
  51. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs.map → NoPermissionsPage-UnEgMGK4.mjs.map} +1 -1
  52. package/dist/_chunks/Preview-B7PR3Ok_.js +312 -0
  53. package/dist/_chunks/Preview-B7PR3Ok_.js.map +1 -0
  54. package/dist/_chunks/Preview-DECOhK0D.mjs +294 -0
  55. package/dist/_chunks/Preview-DECOhK0D.mjs.map +1 -0
  56. package/dist/_chunks/{Relations-J8cscLlR.mjs → Relations-DinMQJ4B.mjs} +138 -94
  57. package/dist/_chunks/Relations-DinMQJ4B.mjs.map +1 -0
  58. package/dist/_chunks/{Relations-CgWtgnPe.js → Relations-lndx3aQk.js} +142 -100
  59. package/dist/_chunks/Relations-lndx3aQk.js.map +1 -0
  60. package/dist/_chunks/{en-C-V1_90f.js → en-BK8Xyl5I.js} +38 -18
  61. package/dist/_chunks/{en-C-V1_90f.js.map → en-BK8Xyl5I.js.map} +1 -1
  62. package/dist/_chunks/{en-MBPul9Su.mjs → en-Dtk_ot79.mjs} +38 -18
  63. package/dist/_chunks/{en-MBPul9Su.mjs.map → en-Dtk_ot79.mjs.map} +1 -1
  64. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  65. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  66. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  67. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  68. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
  69. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
  70. package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
  71. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
  72. package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
  73. package/dist/_chunks/{index-CwRRo1V9.mjs → index-C2SagWVW.mjs} +2070 -988
  74. package/dist/_chunks/index-C2SagWVW.mjs.map +1 -0
  75. package/dist/_chunks/{index-C6AH2hEl.js → index-Cnw4gqee.js} +2047 -966
  76. package/dist/_chunks/index-Cnw4gqee.js.map +1 -0
  77. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  78. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  79. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  80. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  81. package/dist/_chunks/{layout-jIDzX0Fp.mjs → layout-DY_D9MGA.mjs} +46 -28
  82. package/dist/_chunks/layout-DY_D9MGA.mjs.map +1 -0
  83. package/dist/_chunks/{layout-B_SXLhqf.js → layout-ivwIVPnV.js} +47 -32
  84. package/dist/_chunks/layout-ivwIVPnV.js.map +1 -0
  85. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  86. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  87. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  88. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  89. package/dist/_chunks/{relations-iBMa_OFG.js → relations-B7C7O_Pv.js} +6 -7
  90. package/dist/_chunks/relations-B7C7O_Pv.js.map +1 -0
  91. package/dist/_chunks/{relations-CuvIgCqI.mjs → relations-Boc5Y9kX.mjs} +6 -7
  92. package/dist/_chunks/relations-Boc5Y9kX.mjs.map +1 -0
  93. package/dist/_chunks/useDebounce-CtcjDB3L.js +28 -0
  94. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  95. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  96. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  97. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
  98. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +1 -0
  99. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
  100. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +1 -0
  101. package/dist/admin/index.js +3 -1
  102. package/dist/admin/index.js.map +1 -1
  103. package/dist/admin/index.mjs +9 -7
  104. package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
  105. package/dist/admin/src/content-manager.d.ts +6 -5
  106. package/dist/admin/src/exports.d.ts +2 -1
  107. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  108. package/dist/admin/src/history/index.d.ts +3 -0
  109. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  110. package/dist/admin/src/hooks/useDocument.d.ts +37 -9
  111. package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
  112. package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
  113. package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
  114. package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  115. package/dist/admin/src/index.d.ts +1 -0
  116. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  117. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +12 -5
  118. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  119. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +7 -0
  120. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
  121. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
  122. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +5 -0
  123. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
  124. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
  125. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +1 -1
  126. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
  127. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
  128. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
  129. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
  130. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  131. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +16 -53
  132. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  133. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
  134. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  135. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  136. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
  137. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  138. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  139. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  140. package/dist/admin/src/preview/index.d.ts +4 -0
  141. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  142. package/dist/admin/src/preview/routes.d.ts +3 -0
  143. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  144. package/dist/admin/src/router.d.ts +1 -1
  145. package/dist/admin/src/services/api.d.ts +2 -3
  146. package/dist/admin/src/services/components.d.ts +2 -2
  147. package/dist/admin/src/services/contentTypes.d.ts +5 -5
  148. package/dist/admin/src/services/documents.d.ts +31 -20
  149. package/dist/admin/src/services/init.d.ts +2 -2
  150. package/dist/admin/src/services/relations.d.ts +3 -3
  151. package/dist/admin/src/services/uid.d.ts +3 -3
  152. package/dist/admin/src/utils/api.d.ts +4 -18
  153. package/dist/admin/src/utils/validation.d.ts +5 -7
  154. package/dist/server/index.js +886 -480
  155. package/dist/server/index.js.map +1 -1
  156. package/dist/server/index.mjs +892 -485
  157. package/dist/server/index.mjs.map +1 -1
  158. package/dist/server/src/bootstrap.d.ts.map +1 -1
  159. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  160. package/dist/server/src/controllers/index.d.ts.map +1 -1
  161. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  162. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  163. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  164. package/dist/server/src/controllers/utils/metadata.d.ts +23 -0
  165. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
  166. package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
  167. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
  168. package/dist/server/src/controllers/validation/index.d.ts +1 -1
  169. package/dist/server/src/history/services/history.d.ts.map +1 -1
  170. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  171. package/dist/server/src/history/services/utils.d.ts +4 -4
  172. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  173. package/dist/server/src/index.d.ts +22 -42
  174. package/dist/server/src/index.d.ts.map +1 -1
  175. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  176. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  177. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  178. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  179. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  180. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  181. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  182. package/dist/server/src/preview/index.d.ts +4 -0
  183. package/dist/server/src/preview/index.d.ts.map +1 -0
  184. package/dist/server/src/preview/routes/index.d.ts +8 -0
  185. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  186. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  187. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  188. package/dist/server/src/preview/services/index.d.ts +16 -0
  189. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  190. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  191. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  192. package/dist/server/src/preview/services/preview.d.ts +12 -0
  193. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  194. package/dist/server/src/preview/utils.d.ts +19 -0
  195. package/dist/server/src/preview/utils.d.ts.map +1 -0
  196. package/dist/server/src/register.d.ts.map +1 -1
  197. package/dist/server/src/routes/index.d.ts.map +1 -1
  198. package/dist/server/src/services/document-manager.d.ts +13 -12
  199. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  200. package/dist/server/src/services/document-metadata.d.ts +16 -35
  201. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  202. package/dist/server/src/services/index.d.ts +22 -42
  203. package/dist/server/src/services/index.d.ts.map +1 -1
  204. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  205. package/dist/server/src/services/utils/populate.d.ts +8 -1
  206. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  207. package/dist/server/src/utils/index.d.ts +2 -0
  208. package/dist/server/src/utils/index.d.ts.map +1 -1
  209. package/dist/shared/contracts/collection-types.d.ts +17 -7
  210. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  211. package/dist/shared/contracts/index.d.ts +1 -0
  212. package/dist/shared/contracts/index.d.ts.map +1 -1
  213. package/dist/shared/contracts/preview.d.ts +27 -0
  214. package/dist/shared/contracts/preview.d.ts.map +1 -0
  215. package/dist/shared/contracts/relations.d.ts +2 -2
  216. package/dist/shared/contracts/relations.d.ts.map +1 -1
  217. package/dist/shared/index.js +4 -0
  218. package/dist/shared/index.js.map +1 -1
  219. package/dist/shared/index.mjs +4 -0
  220. package/dist/shared/index.mjs.map +1 -1
  221. package/package.json +22 -21
  222. package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
  223. package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
  224. package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
  225. package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
  226. package/dist/_chunks/EditViewPage-DDS6H9HO.mjs +0 -203
  227. package/dist/_chunks/EditViewPage-DDS6H9HO.mjs.map +0 -1
  228. package/dist/_chunks/EditViewPage-DvNpQkam.js.map +0 -1
  229. package/dist/_chunks/Field-6gvGdPBV.mjs.map +0 -1
  230. package/dist/_chunks/Field-DmVKIAOo.js.map +0 -1
  231. package/dist/_chunks/Form-CPZC9vWa.js.map +0 -1
  232. package/dist/_chunks/Form-DW6K1IH-.mjs.map +0 -1
  233. package/dist/_chunks/History-DeAPlvtv.js.map +0 -1
  234. package/dist/_chunks/History-Dmr9fmUA.mjs.map +0 -1
  235. package/dist/_chunks/ListConfigurationPage-DPCwW5Vr.js.map +0 -1
  236. package/dist/_chunks/ListConfigurationPage-DhwvYcNv.mjs.map +0 -1
  237. package/dist/_chunks/ListViewPage-5ySZ-VUs.js.map +0 -1
  238. package/dist/_chunks/ListViewPage-BtAwuYLE.mjs.map +0 -1
  239. package/dist/_chunks/NoContentTypePage-DOC_yWOf.js.map +0 -1
  240. package/dist/_chunks/NoContentTypePage-DSPxnxxp.mjs.map +0 -1
  241. package/dist/_chunks/Relations-CgWtgnPe.js.map +0 -1
  242. package/dist/_chunks/Relations-J8cscLlR.mjs.map +0 -1
  243. package/dist/_chunks/index-C6AH2hEl.js.map +0 -1
  244. package/dist/_chunks/index-CwRRo1V9.mjs.map +0 -1
  245. package/dist/_chunks/layout-B_SXLhqf.js.map +0 -1
  246. package/dist/_chunks/layout-jIDzX0Fp.mjs.map +0 -1
  247. package/dist/_chunks/relations-CuvIgCqI.mjs.map +0 -1
  248. package/dist/_chunks/relations-iBMa_OFG.js.map +0 -1
  249. package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
  250. package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
  251. package/dist/_chunks/urls-DzZya_gm.js +0 -6
  252. package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
  253. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +0 -1
  254. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +0 -1
  255. package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
  256. package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
  257. package/strapi-server.js +0 -3
@@ -1,28 +1,20 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { useRef, useEffect } from "react";
4
- import { useTracking, useAuth, useQueryParams, useAdminUsers, Filters, useField, useRBAC, useNotification, useAPIErrorHandler, useStrapiApp, Page, Layouts, BackButton, SearchInput, Table, Pagination } from "@strapi/admin/strapi-admin";
5
- import { useCollator, Combobox, ComboboxOption, Typography, Menu, Tooltip, Badge, Avatar, Flex, AvatarGroup, useNotifyAT, Loader, IconButton, Popover, LinkButton, TextButton, BaseCheckbox, Button } from "@strapi/design-system";
3
+ import { useTracking, useAuth, useQueryParams, useAdminUsers, Filters, useField, useRBAC, Layouts, useNotification, useAPIErrorHandler, useStrapiApp, Page, BackButton, SearchInput, Table, Pagination, useTable } from "@strapi/admin/strapi-admin";
4
+ import { useCollator, Combobox, ComboboxOption, Tooltip, Typography, Menu, Badge, Avatar, Flex, useNotifyAT, Loader, Popover, IconButton, LinkButton, TextButton, Checkbox, Button } from "@strapi/design-system";
6
5
  import { Cog, ListPlus, Plus } from "@strapi/icons";
7
6
  import isEqual from "lodash/isEqual";
8
7
  import { stringify } from "qs";
9
8
  import { useIntl } from "react-intl";
10
9
  import { NavLink, useNavigate, Link, useParams } from "react-router-dom";
11
- import styled from "styled-components";
12
- import { n as useContentTypeSchema, o as useGetContentTypeConfigurationQuery, p as CREATOR_FIELDS, q as getMainField, t as getDisplayName, b as useDoc, g as getTranslation, f as useDocumentLayout, v as checkIfAttributeIsDisplayable, c as buildValidParams, w as useGetAllDocumentsQuery, e as useDocumentRBAC, I as InjectionZone, D as DocumentStatus, T as TableActions, j as PERMISSIONS, k as DocumentRBAC, H as HOOKS, x as convertListLayoutToFieldLayouts } from "./index-CwRRo1V9.mjs";
10
+ import { styled } from "styled-components";
11
+ import { u as useContentTypeSchema, p as useGetContentTypeConfigurationQuery, q as CREATOR_FIELDS, r as getMainField, t as getDisplayName, c as useDoc, g as getTranslation, h as useDocumentLayout, v as checkIfAttributeIsDisplayable, d as buildValidParams, w as useGetAllDocumentsQuery, f as useDocumentRBAC, I as InjectionZone, D as DocumentStatus, T as TableActions, B as BulkActionsRenderer, k as PERMISSIONS, l as DocumentRBAC, H as HOOKS, x as convertListLayoutToFieldLayouts } from "./index-C2SagWVW.mjs";
12
+ import { a as useDebounce, p as prefixFileUrlWithBackendUrl, u as usePrev } from "./useDebounce-DmuSJIF3.mjs";
13
13
  import isEmpty from "lodash/isEmpty";
14
14
  import parseISO from "date-fns/parseISO";
15
15
  import toString from "lodash/toString";
16
- import { p as prefixFileUrlWithBackendUrl } from "./urls-CbOsUOoW.mjs";
17
- import { g as getRelationLabel, u as useGetRelationsQuery } from "./relations-CuvIgCqI.mjs";
16
+ import { g as getRelationLabel, u as useGetRelationsQuery } from "./relations-Boc5Y9kX.mjs";
18
17
  import { u as useTypedSelector } from "./hooks-E5u1mcgM.mjs";
19
- const usePrev = (value) => {
20
- const ref = useRef();
21
- useEffect(() => {
22
- ref.current = value;
23
- }, [value]);
24
- return ref.current;
25
- };
26
18
  const NOT_ALLOWED_FILTERS = [
27
19
  "json",
28
20
  "component",
@@ -129,6 +121,15 @@ const FiltersImpl = ({ disabled, schema }) => {
129
121
  }
130
122
  };
131
123
  }
124
+ if (attribute.type === "enumeration") {
125
+ filter = {
126
+ ...filter,
127
+ options: attribute.enum.map((value) => ({
128
+ label: value,
129
+ value
130
+ }))
131
+ };
132
+ }
132
133
  return filter;
133
134
  }).filter(Boolean).toSorted((a, b) => formatter.compare(a.label, b.label));
134
135
  }, [
@@ -171,18 +172,22 @@ const FiltersImpl = ({ disabled, schema }) => {
171
172
  );
172
173
  };
173
174
  const AdminUsersFilter = ({ name }) => {
174
- const [page, setPage] = React.useState(1);
175
+ const [pageSize, setPageSize] = React.useState(10);
176
+ const [search, setSearch] = React.useState("");
175
177
  const { formatMessage } = useIntl();
178
+ const debouncedSearch = useDebounce(search, 300);
176
179
  const { data, isLoading } = useAdminUsers({
177
- page
180
+ pageSize,
181
+ _q: debouncedSearch
178
182
  });
179
183
  const field = useField(name);
180
184
  const handleOpenChange = (isOpen) => {
181
185
  if (!isOpen) {
182
- setPage(1);
186
+ setPageSize(10);
183
187
  }
184
188
  };
185
- const users = data?.users || [];
189
+ const { users = [], pagination } = data ?? {};
190
+ const { pageCount = 1, page = 1 } = pagination ?? {};
186
191
  return /* @__PURE__ */ jsx(
187
192
  Combobox,
188
193
  {
@@ -194,7 +199,11 @@ const AdminUsersFilter = ({ name }) => {
194
199
  onOpenChange: handleOpenChange,
195
200
  onChange: (value) => field.onChange(name, value),
196
201
  loading: isLoading,
197
- onLoadMore: () => setPage((prev) => prev + 1),
202
+ onLoadMore: () => setPageSize(pageSize + 10),
203
+ hasMoreItems: page < pageCount,
204
+ onInputChange: (e) => {
205
+ setSearch(e.currentTarget.value);
206
+ },
198
207
  children: users.map((user) => {
199
208
  return /* @__PURE__ */ jsx(ComboboxOption, { value: user.id.toString(), children: getDisplayName(user) }, user.id);
200
209
  })
@@ -236,20 +245,16 @@ const SingleComponent = ({ content, mainField }) => {
236
245
  if (!mainField) {
237
246
  return null;
238
247
  }
239
- return /* @__PURE__ */ jsx(Tooltip, { label: content[mainField.name], children: /* @__PURE__ */ jsx(SingleComponentTypography, { textColor: "neutral800", ellipsis: true, children: /* @__PURE__ */ jsx(CellValue, { type: mainField.type, value: content[mainField.name] }) }) });
248
+ return /* @__PURE__ */ jsx(Tooltip, { label: content[mainField.name], children: /* @__PURE__ */ jsx(Typography, { maxWidth: "25rem", textColor: "neutral800", ellipsis: true, children: /* @__PURE__ */ jsx(CellValue, { type: mainField.type, value: content[mainField.name] }) }) });
240
249
  };
241
- const SingleComponentTypography = styled(Typography)`
242
- max-width: 250px;
243
- `;
244
250
  const RepeatableComponent = ({ content, mainField }) => {
245
251
  const { formatMessage } = useIntl();
246
252
  if (!mainField) {
247
253
  return null;
248
254
  }
249
255
  return /* @__PURE__ */ jsxs(Menu.Root, { children: [
250
- /* @__PURE__ */ jsxs(MenuTrigger$1, { onClick: (e) => e.stopPropagation(), children: [
256
+ /* @__PURE__ */ jsxs(Menu.Trigger, { onClick: (e) => e.stopPropagation(), children: [
251
257
  /* @__PURE__ */ jsx(Badge, { children: content.length }),
252
- " ",
253
258
  formatMessage(
254
259
  {
255
260
  id: "content-manager.containers.list.items",
@@ -258,25 +263,24 @@ const RepeatableComponent = ({ content, mainField }) => {
258
263
  { number: content.length }
259
264
  )
260
265
  ] }),
261
- /* @__PURE__ */ jsx(Menu.Content, { children: content.map((item) => /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: /* @__PURE__ */ jsx(RepeatableComponentTypography, { ellipsis: true, children: /* @__PURE__ */ jsx(CellValue, { type: mainField.type, value: item[mainField.name] }) }) }, item.id)) })
266
+ /* @__PURE__ */ jsx(Menu.Content, { children: content.map((item) => /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: /* @__PURE__ */ jsx(Typography, { maxWidth: "50rem", ellipsis: true, children: /* @__PURE__ */ jsx(CellValue, { type: mainField.type, value: item[mainField.name] }) }) }, item.id)) })
262
267
  ] });
263
268
  };
264
- const RepeatableComponentTypography = styled(Typography)`
265
- max-width: 500px;
266
- `;
267
- const MenuTrigger$1 = styled(Menu.Trigger)`
268
- svg {
269
- width: 0.6rem;
270
- height: 0.4rem;
271
- }
272
- `;
273
269
  const getFileExtension = (ext) => ext && ext[0] === "." ? ext.substring(1) : ext;
274
270
  const MediaSingle = ({ url, mime, alternativeText, name, ext, formats }) => {
275
271
  const fileURL = prefixFileUrlWithBackendUrl(url);
276
272
  if (mime.includes("image")) {
277
273
  const thumbnail = formats?.thumbnail?.url;
278
274
  const mediaURL = prefixFileUrlWithBackendUrl(thumbnail) || fileURL;
279
- return /* @__PURE__ */ jsx(Avatar, { src: mediaURL, alt: alternativeText || name, preview: true });
275
+ return /* @__PURE__ */ jsx(
276
+ Avatar.Item,
277
+ {
278
+ src: mediaURL,
279
+ alt: alternativeText || name,
280
+ fallback: alternativeText || name,
281
+ preview: true
282
+ }
283
+ );
280
284
  }
281
285
  const fileExtension = getFileExtension(ext);
282
286
  const fileName = name.length > 100 ? `${name.substring(0, 100)}...` : name;
@@ -286,7 +290,7 @@ const FileWrapper = ({ children }) => {
286
290
  return /* @__PURE__ */ jsx(
287
291
  Flex,
288
292
  {
289
- as: "span",
293
+ tag: "span",
290
294
  position: "relative",
291
295
  borderRadius: "50%",
292
296
  width: "26px",
@@ -305,7 +309,7 @@ const FileTypography = styled(Typography)`
305
309
  line-height: 0.9rem;
306
310
  `;
307
311
  const MediaMultiple = ({ content }) => {
308
- return /* @__PURE__ */ jsx(AvatarGroup, { children: content.map((file, index) => {
312
+ return /* @__PURE__ */ jsx(Avatar.Group, { children: content.map((file, index) => {
309
313
  const key = `${file.id}${index}`;
310
314
  if (index === 3) {
311
315
  const remainingFiles = `+${content.length - 3}`;
@@ -318,11 +322,8 @@ const MediaMultiple = ({ content }) => {
318
322
  }) });
319
323
  };
320
324
  const RelationSingle = ({ mainField, content }) => {
321
- return /* @__PURE__ */ jsx(TypographyMaxWidth$1, { textColor: "neutral800", ellipsis: true, children: getRelationLabel(content, mainField) });
325
+ return /* @__PURE__ */ jsx(Typography, { maxWidth: "50rem", textColor: "neutral800", ellipsis: true, children: getRelationLabel(content, mainField) });
322
326
  };
323
- const TypographyMaxWidth$1 = styled(Typography)`
324
- max-width: 500px;
325
- `;
326
327
  const RelationMultiple = ({ mainField, content, rowId, name }) => {
327
328
  const { model } = useDoc();
328
329
  const { formatMessage } = useIntl();
@@ -340,6 +341,7 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
340
341
  refetchOnMountOrArgChange: true
341
342
  }
342
343
  );
344
+ const contentCount = Array.isArray(content) ? content.length : content.count;
343
345
  React.useEffect(() => {
344
346
  if (data) {
345
347
  notifyStatus(
@@ -351,23 +353,20 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
351
353
  }
352
354
  }, [data, formatMessage, notifyStatus]);
353
355
  return /* @__PURE__ */ jsxs(Menu.Root, { onOpenChange: (isOpen2) => setIsOpen(isOpen2), children: [
354
- /* @__PURE__ */ jsx(MenuTrigger, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs(Flex, { gap: 1, wrap: "nowrap", children: [
355
- /* @__PURE__ */ jsx(Badge, { children: content.count }),
356
- formatMessage(
357
- {
358
- id: "content-manager.containers.list.items",
359
- defaultMessage: "{number, plural, =0 {items} one {item} other {items}}"
360
- },
361
- { number: content.count }
362
- )
363
- ] }) }),
356
+ /* @__PURE__ */ jsx(Menu.Trigger, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(Typography, { style: { cursor: "pointer" }, textColor: "neutral800", fontWeight: "regular", children: contentCount > 0 ? formatMessage(
357
+ {
358
+ id: "content-manager.containers.list.items",
359
+ defaultMessage: "{number} {number, plural, =0 {items} one {item} other {items}}"
360
+ },
361
+ { number: contentCount }
362
+ ) : "-" }) }),
364
363
  /* @__PURE__ */ jsxs(Menu.Content, { children: [
365
364
  isLoading && /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: /* @__PURE__ */ jsx(Loader, { small: true, children: formatMessage({
366
365
  id: getTranslation("ListViewTable.relation-loading"),
367
366
  defaultMessage: "Relations are loading"
368
367
  }) }) }),
369
368
  data?.results && /* @__PURE__ */ jsxs(Fragment, { children: [
370
- data.results.map((entry) => /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: /* @__PURE__ */ jsx(TypographyMaxWidth$1, { ellipsis: true, children: getRelationLabel(entry, mainField) }) }, entry.documentId)),
369
+ data.results.map((entry) => /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: /* @__PURE__ */ jsx(Typography, { maxWidth: "50rem", ellipsis: true, children: getRelationLabel(entry, mainField) }) }, entry.documentId)),
371
370
  data?.pagination && data?.pagination.total > 10 && /* @__PURE__ */ jsx(
372
371
  Menu.Item,
373
372
  {
@@ -383,15 +382,17 @@ const RelationMultiple = ({ mainField, content, rowId, name }) => {
383
382
  ] })
384
383
  ] });
385
384
  };
386
- const MenuTrigger = styled(Menu.Trigger)`
387
- svg {
388
- width: 0.6rem;
389
- height: 0.4rem;
390
- }
391
- `;
392
385
  const CellContent = ({ content, mainField, attribute, rowId, name }) => {
393
386
  if (!hasContent(content, mainField, attribute)) {
394
- return /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: "-" });
387
+ return /* @__PURE__ */ jsx(
388
+ Typography,
389
+ {
390
+ textColor: "neutral800",
391
+ paddingLeft: attribute.type === "relation" ? "1.6rem" : 0,
392
+ paddingRight: attribute.type === "relation" ? "1.6rem" : 0,
393
+ children: "-"
394
+ }
395
+ );
395
396
  }
396
397
  switch (attribute.type) {
397
398
  case "media":
@@ -411,14 +412,11 @@ const CellContent = ({ content, mainField, attribute, rowId, name }) => {
411
412
  }
412
413
  return /* @__PURE__ */ jsx(SingleComponent, { mainField, content });
413
414
  case "string":
414
- return /* @__PURE__ */ jsx(Tooltip, { description: content, children: /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsx(CellValue, { type: attribute.type, value: content }) }) });
415
+ return /* @__PURE__ */ jsx(Tooltip, { description: content, children: /* @__PURE__ */ jsx(Typography, { maxWidth: "30rem", ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsx(CellValue, { type: attribute.type, value: content }) }) });
415
416
  default:
416
- return /* @__PURE__ */ jsx(TypographyMaxWidth, { ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsx(CellValue, { type: attribute.type, value: content }) });
417
+ return /* @__PURE__ */ jsx(Typography, { maxWidth: "30rem", ellipsis: true, textColor: "neutral800", children: /* @__PURE__ */ jsx(CellValue, { type: attribute.type, value: content }) });
417
418
  }
418
419
  };
419
- const TypographyMaxWidth = styled(Typography)`
420
- max-width: 300px;
421
- `;
422
420
  const hasContent = (content, mainField, attribute) => {
423
421
  if (attribute.type === "component") {
424
422
  if (attribute.repeatable || !mainField) {
@@ -434,6 +432,9 @@ const hasContent = (content, mainField, attribute) => {
434
432
  if (isSingleRelation(attribute.relation)) {
435
433
  return !isEmpty(content);
436
434
  }
435
+ if (Array.isArray(content)) {
436
+ return content.length > 0;
437
+ }
437
438
  return content?.count > 0;
438
439
  }
439
440
  if (["integer", "decimal", "float", "number"].includes(attribute.type)) {
@@ -446,8 +447,6 @@ const hasContent = (content, mainField, attribute) => {
446
447
  };
447
448
  const isSingleRelation = (type) => ["oneToOne", "manyToOne", "oneToOneMorph"].includes(type);
448
449
  const ViewSettingsMenu = (props) => {
449
- const [isVisible, setIsVisible] = React.useState(false);
450
- const cogButtonRef = React.useRef(null);
451
450
  const permissions = useTypedSelector(
452
451
  (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations ?? []
453
452
  );
@@ -456,52 +455,37 @@ const ViewSettingsMenu = (props) => {
456
455
  const {
457
456
  allowedActions: { canConfigureView }
458
457
  } = useRBAC(permissions);
459
- const handleToggle = () => {
460
- setIsVisible((prev) => !prev);
461
- };
462
- return /* @__PURE__ */ jsxs(Fragment, { children: [
463
- /* @__PURE__ */ jsx(
458
+ return /* @__PURE__ */ jsxs(Popover.Root, { children: [
459
+ /* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(
464
460
  IconButton,
465
461
  {
466
- icon: /* @__PURE__ */ jsx(Cog, {}),
467
462
  label: formatMessage({
468
463
  id: "components.ViewSettings.tooltip",
469
464
  defaultMessage: "View Settings"
470
465
  }),
471
- ref: cogButtonRef,
472
- onClick: handleToggle
466
+ children: /* @__PURE__ */ jsx(Cog, {})
473
467
  }
474
- ),
475
- isVisible && /* @__PURE__ */ jsx(
476
- Popover,
477
- {
478
- placement: "bottom-end",
479
- source: cogButtonRef,
480
- onDismiss: handleToggle,
481
- spacing: 4,
482
- padding: 3,
483
- children: /* @__PURE__ */ jsxs(Flex, { alignItems: "stretch", direction: "column", gap: 3, children: [
484
- canConfigureView ? /* @__PURE__ */ jsx(
485
- LinkButton,
486
- {
487
- size: "S",
488
- startIcon: /* @__PURE__ */ jsx(ListPlus, {}),
489
- variant: "secondary",
490
- as: NavLink,
491
- to: {
492
- pathname: "configurations/list",
493
- search: query.plugins ? stringify({ plugins: query.plugins }, { encode: false }) : ""
494
- },
495
- children: formatMessage({
496
- id: "app.links.configure-view",
497
- defaultMessage: "Configure the view"
498
- })
499
- }
500
- ) : null,
501
- /* @__PURE__ */ jsx(FieldPicker, { ...props })
502
- ] })
503
- }
504
- )
468
+ ) }),
469
+ /* @__PURE__ */ jsx(Popover.Content, { side: "bottom", align: "end", sideOffset: 4, children: /* @__PURE__ */ jsxs(Flex, { alignItems: "stretch", direction: "column", padding: 3, gap: 3, children: [
470
+ canConfigureView ? /* @__PURE__ */ jsx(
471
+ LinkButton,
472
+ {
473
+ size: "S",
474
+ startIcon: /* @__PURE__ */ jsx(ListPlus, {}),
475
+ variant: "secondary",
476
+ tag: NavLink,
477
+ to: {
478
+ pathname: "configurations/list",
479
+ search: query.plugins ? stringify({ plugins: query.plugins }, { encode: false }) : ""
480
+ },
481
+ children: formatMessage({
482
+ id: "app.links.configure-view",
483
+ defaultMessage: "Configure the view"
484
+ })
485
+ }
486
+ ) : null,
487
+ /* @__PURE__ */ jsx(FieldPicker, { ...props })
488
+ ] }) })
505
489
  ] });
506
490
  };
507
491
  const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
@@ -525,51 +509,58 @@ const FieldPicker = ({ headers = [], resetHeaders, setHeaders }) => {
525
509
  const handleReset = () => {
526
510
  resetHeaders();
527
511
  };
528
- return /* @__PURE__ */ jsxs(Flex, { as: "fieldset", direction: "column", alignItems: "stretch", gap: 3, children: [
529
- /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
530
- /* @__PURE__ */ jsx(Typography, { as: "legend", variant: "pi", fontWeight: "bold", children: formatMessage({
531
- id: "containers.list.displayedFields",
532
- defaultMessage: "Displayed fields"
533
- }) }),
534
- /* @__PURE__ */ jsx(TextButton, { onClick: handleReset, children: formatMessage({
535
- id: "app.components.Button.reset",
536
- defaultMessage: "Reset"
537
- }) })
538
- ] }),
539
- /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", children: columns.map((header) => {
540
- const isActive = headers.includes(header.name);
541
- return /* @__PURE__ */ jsxs(
542
- ChackboxWrapper,
543
- {
544
- wrap: "wrap",
545
- gap: 2,
546
- as: "label",
547
- background: isActive ? "primary100" : "transparent",
548
- hasRadius: true,
549
- padding: 2,
550
- children: [
551
- /* @__PURE__ */ jsx(
552
- BaseCheckbox,
553
- {
554
- onChange: () => handleChange(header.name),
555
- value: isActive,
556
- name: header.name
557
- }
558
- ),
559
- /* @__PURE__ */ jsx(Typography, { fontSize: 1, children: header.label })
560
- ]
561
- },
562
- header.name
563
- );
564
- }) })
565
- ] });
512
+ return /* @__PURE__ */ jsxs(
513
+ Flex,
514
+ {
515
+ tag: "fieldset",
516
+ direction: "column",
517
+ alignItems: "stretch",
518
+ gap: 3,
519
+ borderWidth: 0,
520
+ maxHeight: "240px",
521
+ overflow: "scroll",
522
+ children: [
523
+ /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
524
+ /* @__PURE__ */ jsx(Typography, { tag: "legend", variant: "pi", fontWeight: "bold", children: formatMessage({
525
+ id: "containers.list.displayedFields",
526
+ defaultMessage: "Displayed fields"
527
+ }) }),
528
+ /* @__PURE__ */ jsx(TextButton, { onClick: handleReset, children: formatMessage({
529
+ id: "app.components.Button.reset",
530
+ defaultMessage: "Reset"
531
+ }) })
532
+ ] }),
533
+ /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", children: columns.map((header) => {
534
+ const isActive = headers.includes(header.name);
535
+ return /* @__PURE__ */ jsx(
536
+ Flex,
537
+ {
538
+ wrap: "wrap",
539
+ gap: 2,
540
+ background: isActive ? "primary100" : "transparent",
541
+ hasRadius: true,
542
+ padding: 2,
543
+ children: /* @__PURE__ */ jsx(
544
+ Checkbox,
545
+ {
546
+ onCheckedChange: () => handleChange(header.name),
547
+ checked: isActive,
548
+ name: header.name,
549
+ children: /* @__PURE__ */ jsx(Typography, { fontSize: 1, children: header.label })
550
+ }
551
+ )
552
+ },
553
+ header.name
554
+ );
555
+ }) })
556
+ ]
557
+ }
558
+ );
566
559
  };
567
- const ChackboxWrapper = styled(Flex)`
568
- :hover {
569
- background-color: ${(props) => props.theme.colors.primary100};
570
- }
571
- `;
572
560
  const { INJECT_COLUMN_IN_TABLE } = HOOKS;
561
+ const LayoutsHeaderCustom = styled(Layouts.Header)`
562
+ overflow-wrap: anywhere;
563
+ `;
573
564
  const ListViewPage = () => {
574
565
  const { trackUsage } = useTracking();
575
566
  const navigate = useNavigate();
@@ -596,7 +587,7 @@ const ListViewPage = () => {
596
587
  sort: list.settings.defaultSortBy ? `${list.settings.defaultSortBy}:${list.settings.defaultSortOrder}` : ""
597
588
  });
598
589
  const params = React.useMemo(() => buildValidParams(query), [query]);
599
- const { data, error, isLoading } = useGetAllDocumentsQuery({
590
+ const { data, error, isFetching } = useGetAllDocumentsQuery({
600
591
  model,
601
592
  params
602
593
  });
@@ -632,10 +623,14 @@ const ListViewPage = () => {
632
623
  layout: list
633
624
  });
634
625
  const formattedHeaders = headers.displayedHeaders.map((header) => {
626
+ const translation = typeof header.label === "string" ? {
627
+ id: `content-manager.content-types.${model}.${header.name}`,
628
+ defaultMessage: header.label
629
+ } : header.label;
635
630
  return {
636
631
  ...header,
637
- label: typeof header.label === "string" ? header.label : formatMessage(header.label),
638
- name: `${header.name}${header.mainField ? `.${header.mainField}` : ""}`
632
+ label: formatMessage(translation),
633
+ name: `${header.name}${header.mainField?.name ? `.${header.mainField.name}` : ""}`
639
634
  };
640
635
  });
641
636
  if (schema?.options?.draftAndPublish) {
@@ -653,8 +648,15 @@ const ListViewPage = () => {
653
648
  });
654
649
  }
655
650
  return formattedHeaders;
656
- }, [displayedHeaders, formatMessage, list, runHookWaterfall, schema?.options?.draftAndPublish]);
657
- if (isLoading) {
651
+ }, [
652
+ displayedHeaders,
653
+ formatMessage,
654
+ list,
655
+ runHookWaterfall,
656
+ schema?.options?.draftAndPublish,
657
+ model
658
+ ]);
659
+ if (isFetching) {
658
660
  return /* @__PURE__ */ jsx(Page.Loading, {});
659
661
  }
660
662
  if (error) {
@@ -671,7 +673,7 @@ const ListViewPage = () => {
671
673
  return /* @__PURE__ */ jsxs(Page.Main, { children: [
672
674
  /* @__PURE__ */ jsx(Page.Title, { children: `${contentTypeTitle}` }),
673
675
  /* @__PURE__ */ jsx(
674
- Layouts.Header,
676
+ LayoutsHeaderCustom,
675
677
  {
676
678
  primaryAction: canCreate ? /* @__PURE__ */ jsx(CreateButton, {}) : null,
677
679
  subtitle: formatMessage(
@@ -720,8 +722,8 @@ const ListViewPage = () => {
720
722
  }
721
723
  ),
722
724
  /* @__PURE__ */ jsx(Layouts.Content, { children: /* @__PURE__ */ jsxs(Flex, { gap: 4, direction: "column", alignItems: "stretch", children: [
723
- /* @__PURE__ */ jsxs(Table.Root, { rows: results, headers: tableHeaders, isLoading, children: [
724
- /* @__PURE__ */ jsx(Table.ActionBar, {}),
725
+ /* @__PURE__ */ jsxs(Table.Root, { rows: results, headers: tableHeaders, isLoading: isFetching, children: [
726
+ /* @__PURE__ */ jsx(TableActionsBar, {}),
725
727
  /* @__PURE__ */ jsxs(Table.Content, { children: [
726
728
  /* @__PURE__ */ jsxs(Table.Head, { children: [
727
729
  /* @__PURE__ */ jsx(Table.HeaderCheckboxCell, {}),
@@ -783,6 +785,18 @@ const ActionsCell = styled(Table.Cell)`
783
785
  display: flex;
784
786
  justify-content: flex-end;
785
787
  `;
788
+ const TableActionsBar = () => {
789
+ const selectRow = useTable("TableActionsBar", (state) => state.selectRow);
790
+ const [{ query }] = useQueryParams();
791
+ const locale = query?.plugins?.i18n?.locale;
792
+ const prevLocale = usePrev(locale);
793
+ React.useEffect(() => {
794
+ if (prevLocale !== locale) {
795
+ selectRow([]);
796
+ }
797
+ }, [selectRow, prevLocale, locale]);
798
+ return /* @__PURE__ */ jsx(Table.ActionBar, { children: /* @__PURE__ */ jsx(BulkActionsRenderer, {}) });
799
+ };
786
800
  const CreateButton = ({ variant }) => {
787
801
  const { formatMessage } = useIntl();
788
802
  const { trackUsage } = useTracking();
@@ -791,7 +805,7 @@ const CreateButton = ({ variant }) => {
791
805
  Button,
792
806
  {
793
807
  variant,
794
- forwardedAs: Link,
808
+ tag: Link,
795
809
  onClick: () => {
796
810
  trackUsage("willCreateEntry", { status: "draft" });
797
811
  },
@@ -801,6 +815,8 @@ const CreateButton = ({ variant }) => {
801
815
  pathname: "create",
802
816
  search: stringify({ plugins: query.plugins })
803
817
  },
818
+ minWidth: "max-content",
819
+ marginLeft: 2,
804
820
  children: formatMessage({
805
821
  id: getTranslation("HeaderLayout.button.label-add-entry"),
806
822
  defaultMessage: "Create new entry"
@@ -832,4 +848,4 @@ export {
832
848
  ListViewPage,
833
849
  ProtectedListViewPage
834
850
  };
835
- //# sourceMappingURL=ListViewPage-BtAwuYLE.mjs.map
851
+ //# sourceMappingURL=ListViewPage-C73F0jPh.mjs.map