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

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 (253) 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-BPvzFjM7.mjs → ComponentConfigurationPage-BaJMOQyq.mjs} +4 -4
  7. package/dist/_chunks/{ComponentConfigurationPage-BPvzFjM7.mjs.map → ComponentConfigurationPage-BaJMOQyq.mjs.map} +1 -1
  8. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js → ComponentConfigurationPage-N-CTtgQa.js} +4 -4
  9. package/dist/_chunks/{ComponentConfigurationPage-DjWJdz6Y.js.map → ComponentConfigurationPage-N-CTtgQa.js.map} +1 -1
  10. package/dist/_chunks/{ComponentIcon-BBQsYCVn.js → ComponentIcon-BXdiCGQp.js} +8 -2
  11. package/dist/_chunks/ComponentIcon-BXdiCGQp.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-Dmv83RlS.js → EditConfigurationPage-BHkjAbxH.js} +4 -4
  15. package/dist/_chunks/{EditConfigurationPage-Dmv83RlS.js.map → EditConfigurationPage-BHkjAbxH.js.map} +1 -1
  16. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs → EditConfigurationPage-CKK-5LfX.mjs} +4 -4
  17. package/dist/_chunks/{EditConfigurationPage-DacbqQ_f.mjs.map → EditConfigurationPage-CKK-5LfX.mjs.map} +1 -1
  18. package/dist/_chunks/EditViewPage-B11aeMcf.mjs +254 -0
  19. package/dist/_chunks/EditViewPage-B11aeMcf.mjs.map +1 -0
  20. package/dist/_chunks/{EditViewPage-DvNpQkam.js → EditViewPage-QPUftxUd.js} +101 -52
  21. package/dist/_chunks/EditViewPage-QPUftxUd.js.map +1 -0
  22. package/dist/_chunks/{Field-6gvGdPBV.mjs → Field-Bj_RgtGo.mjs} +1077 -814
  23. package/dist/_chunks/Field-Bj_RgtGo.mjs.map +1 -0
  24. package/dist/_chunks/{Field-DmVKIAOo.js → Field-DUK83cfh.js} +1121 -859
  25. package/dist/_chunks/Field-DUK83cfh.js.map +1 -0
  26. package/dist/_chunks/{Form-CPZC9vWa.js → Form-DHmBRlHd.js} +66 -46
  27. package/dist/_chunks/Form-DHmBRlHd.js.map +1 -0
  28. package/dist/_chunks/{Form-DW6K1IH-.mjs → Form-DLMSoXV7.mjs} +66 -45
  29. package/dist/_chunks/Form-DLMSoXV7.mjs.map +1 -0
  30. package/dist/_chunks/{History-Dmr9fmUA.mjs → History-CfCSNlG9.mjs} +181 -144
  31. package/dist/_chunks/History-CfCSNlG9.mjs.map +1 -0
  32. package/dist/_chunks/{History-DeAPlvtv.js → History-Di3zm4HT.js} +181 -145
  33. package/dist/_chunks/History-Di3zm4HT.js.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-DhwvYcNv.mjs → ListConfigurationPage-0mtv_iqk.mjs} +67 -56
  35. package/dist/_chunks/ListConfigurationPage-0mtv_iqk.mjs.map +1 -0
  36. package/dist/_chunks/{ListConfigurationPage-DPCwW5Vr.js → ListConfigurationPage-Cq361KIt.js} +70 -60
  37. package/dist/_chunks/ListConfigurationPage-Cq361KIt.js.map +1 -0
  38. package/dist/_chunks/{ListViewPage-BtAwuYLE.mjs → ListViewPage-BxLVROX8.mjs} +175 -159
  39. package/dist/_chunks/ListViewPage-BxLVROX8.mjs.map +1 -0
  40. package/dist/_chunks/{ListViewPage-5ySZ-VUs.js → ListViewPage-DFDcG8gM.js} +178 -162
  41. package/dist/_chunks/ListViewPage-DFDcG8gM.js.map +1 -0
  42. package/dist/_chunks/{NoContentTypePage-DSPxnxxp.mjs → NoContentTypePage-BRfDd67_.mjs} +3 -3
  43. package/dist/_chunks/NoContentTypePage-BRfDd67_.mjs.map +1 -0
  44. package/dist/_chunks/{NoContentTypePage-DOC_yWOf.js → NoContentTypePage-BSyvnDZZ.js} +3 -3
  45. package/dist/_chunks/NoContentTypePage-BSyvnDZZ.js.map +1 -0
  46. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs → NoPermissionsPage-CV9V8KWa.mjs} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-UWDC-1Tw.mjs.map → NoPermissionsPage-CV9V8KWa.mjs.map} +1 -1
  48. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js → NoPermissionsPage-DyLphsn_.js} +2 -2
  49. package/dist/_chunks/{NoPermissionsPage-Dwu8rRJu.js.map → NoPermissionsPage-DyLphsn_.js.map} +1 -1
  50. package/dist/_chunks/Preview-C_B1nx3g.mjs +272 -0
  51. package/dist/_chunks/Preview-C_B1nx3g.mjs.map +1 -0
  52. package/dist/_chunks/Preview-D_3aO6Ly.js +291 -0
  53. package/dist/_chunks/Preview-D_3aO6Ly.js.map +1 -0
  54. package/dist/_chunks/{Relations-J8cscLlR.mjs → Relations-C6pwmDXh.mjs} +135 -89
  55. package/dist/_chunks/Relations-C6pwmDXh.mjs.map +1 -0
  56. package/dist/_chunks/{Relations-CgWtgnPe.js → Relations-Cne2AlrL.js} +138 -93
  57. package/dist/_chunks/Relations-Cne2AlrL.js.map +1 -0
  58. package/dist/_chunks/{en-MBPul9Su.mjs → en-DhFUjrNW.mjs} +37 -18
  59. package/dist/_chunks/{en-MBPul9Su.mjs.map → en-DhFUjrNW.mjs.map} +1 -1
  60. package/dist/_chunks/{en-C-V1_90f.js → en-Ic0kXjxB.js} +37 -18
  61. package/dist/_chunks/{en-C-V1_90f.js.map → en-Ic0kXjxB.js.map} +1 -1
  62. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  63. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  64. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  65. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  66. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
  67. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
  68. package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
  69. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
  70. package/dist/_chunks/{index-CwRRo1V9.mjs → index-BpxR3En4.mjs} +1835 -824
  71. package/dist/_chunks/index-BpxR3En4.mjs.map +1 -0
  72. package/dist/_chunks/{index-C6AH2hEl.js → index-T-aWjbj2.js} +1788 -777
  73. package/dist/_chunks/index-T-aWjbj2.js.map +1 -0
  74. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  75. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  76. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  77. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  78. package/dist/_chunks/{layout-B_SXLhqf.js → layout-BEuNwv-F.js} +45 -29
  79. package/dist/_chunks/layout-BEuNwv-F.js.map +1 -0
  80. package/dist/_chunks/{layout-jIDzX0Fp.mjs → layout-DhMZ_lDx.mjs} +45 -27
  81. package/dist/_chunks/layout-DhMZ_lDx.mjs.map +1 -0
  82. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  83. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  84. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  85. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  86. package/dist/_chunks/{relations-CuvIgCqI.mjs → relations-BdnxoX6f.mjs} +6 -7
  87. package/dist/_chunks/relations-BdnxoX6f.mjs.map +1 -0
  88. package/dist/_chunks/{relations-iBMa_OFG.js → relations-kLcuobLk.js} +6 -7
  89. package/dist/_chunks/relations-kLcuobLk.js.map +1 -0
  90. package/dist/_chunks/useDebounce-CtcjDB3L.js +28 -0
  91. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  92. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  93. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  94. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +1 -1
  95. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +1 -1
  96. package/dist/admin/index.js +3 -1
  97. package/dist/admin/index.js.map +1 -1
  98. package/dist/admin/index.mjs +9 -7
  99. package/dist/admin/src/components/ComponentIcon.d.ts +6 -3
  100. package/dist/admin/src/content-manager.d.ts +3 -3
  101. package/dist/admin/src/exports.d.ts +2 -1
  102. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +1 -1
  103. package/dist/admin/src/history/index.d.ts +3 -0
  104. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  105. package/dist/admin/src/hooks/useDocument.d.ts +37 -9
  106. package/dist/admin/src/hooks/useDocumentActions.d.ts +24 -3
  107. package/dist/admin/src/hooks/useDocumentLayout.d.ts +2 -2
  108. package/dist/admin/src/hooks/useDragAndDrop.d.ts +4 -4
  109. package/dist/admin/src/hooks/useKeyboardDragAndDrop.d.ts +1 -1
  110. package/dist/admin/src/index.d.ts +1 -0
  111. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  112. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +11 -4
  113. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +2 -2
  114. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/BlocksInput.d.ts +3 -3
  115. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  116. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Input.d.ts +2 -2
  117. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/ComponentCategory.d.ts +3 -5
  118. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +1 -1
  119. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +30 -18
  120. package/dist/admin/src/pages/EditView/components/FormInputs/UID.d.ts +2 -2
  121. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +3 -49
  122. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/Field.d.ts +2 -2
  123. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  124. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +16 -53
  125. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  126. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +2 -10
  127. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  128. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  129. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +9 -26
  130. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  131. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  132. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  133. package/dist/admin/src/preview/constants.d.ts +1 -0
  134. package/dist/admin/src/preview/index.d.ts +4 -0
  135. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  136. package/dist/admin/src/preview/routes.d.ts +3 -0
  137. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  138. package/dist/admin/src/router.d.ts +1 -1
  139. package/dist/admin/src/services/api.d.ts +2 -3
  140. package/dist/admin/src/services/components.d.ts +2 -2
  141. package/dist/admin/src/services/contentTypes.d.ts +5 -5
  142. package/dist/admin/src/services/documents.d.ts +31 -20
  143. package/dist/admin/src/services/init.d.ts +2 -2
  144. package/dist/admin/src/services/relations.d.ts +3 -3
  145. package/dist/admin/src/services/uid.d.ts +3 -3
  146. package/dist/admin/src/utils/api.d.ts +4 -18
  147. package/dist/admin/src/utils/validation.d.ts +5 -7
  148. package/dist/server/index.js +852 -436
  149. package/dist/server/index.js.map +1 -1
  150. package/dist/server/index.mjs +859 -443
  151. package/dist/server/index.mjs.map +1 -1
  152. package/dist/server/src/bootstrap.d.ts.map +1 -1
  153. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  154. package/dist/server/src/controllers/index.d.ts.map +1 -1
  155. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  156. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  157. package/dist/server/src/controllers/uid.d.ts.map +1 -1
  158. package/dist/server/src/controllers/utils/metadata.d.ts +22 -0
  159. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -0
  160. package/dist/server/src/controllers/validation/dimensions.d.ts +11 -0
  161. package/dist/server/src/controllers/validation/dimensions.d.ts.map +1 -0
  162. package/dist/server/src/controllers/validation/index.d.ts +1 -1
  163. package/dist/server/src/history/services/history.d.ts.map +1 -1
  164. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  165. package/dist/server/src/history/services/utils.d.ts +4 -4
  166. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  167. package/dist/server/src/index.d.ts +21 -42
  168. package/dist/server/src/index.d.ts.map +1 -1
  169. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  170. package/dist/server/src/preview/constants.d.ts +2 -0
  171. package/dist/server/src/preview/constants.d.ts.map +1 -0
  172. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  173. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  174. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  175. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  176. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  177. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  178. package/dist/server/src/preview/index.d.ts +4 -0
  179. package/dist/server/src/preview/index.d.ts.map +1 -0
  180. package/dist/server/src/preview/routes/index.d.ts +8 -0
  181. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  182. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  183. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  184. package/dist/server/src/preview/services/index.d.ts +16 -0
  185. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  186. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  187. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  188. package/dist/server/src/preview/services/preview.d.ts +12 -0
  189. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  190. package/dist/server/src/preview/utils.d.ts +19 -0
  191. package/dist/server/src/preview/utils.d.ts.map +1 -0
  192. package/dist/server/src/register.d.ts.map +1 -1
  193. package/dist/server/src/routes/index.d.ts.map +1 -1
  194. package/dist/server/src/services/document-manager.d.ts +13 -12
  195. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  196. package/dist/server/src/services/document-metadata.d.ts +14 -35
  197. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  198. package/dist/server/src/services/index.d.ts +21 -42
  199. package/dist/server/src/services/index.d.ts.map +1 -1
  200. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  201. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  202. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  203. package/dist/server/src/services/utils/populate.d.ts +8 -1
  204. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  205. package/dist/server/src/utils/index.d.ts +2 -0
  206. package/dist/server/src/utils/index.d.ts.map +1 -1
  207. package/dist/shared/contracts/collection-types.d.ts +17 -7
  208. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  209. package/dist/shared/contracts/index.d.ts +1 -0
  210. package/dist/shared/contracts/index.d.ts.map +1 -1
  211. package/dist/shared/contracts/preview.d.ts +27 -0
  212. package/dist/shared/contracts/preview.d.ts.map +1 -0
  213. package/dist/shared/contracts/relations.d.ts +2 -2
  214. package/dist/shared/contracts/relations.d.ts.map +1 -1
  215. package/dist/shared/index.js +4 -0
  216. package/dist/shared/index.js.map +1 -1
  217. package/dist/shared/index.mjs +4 -0
  218. package/dist/shared/index.mjs.map +1 -1
  219. package/package.json +19 -20
  220. package/dist/_chunks/CardDragPreview-DSVYodBX.js.map +0 -1
  221. package/dist/_chunks/CardDragPreview-ikSG4M46.mjs.map +0 -1
  222. package/dist/_chunks/ComponentIcon-BBQsYCVn.js.map +0 -1
  223. package/dist/_chunks/ComponentIcon-BOFnK76n.mjs.map +0 -1
  224. package/dist/_chunks/EditViewPage-DDS6H9HO.mjs +0 -203
  225. package/dist/_chunks/EditViewPage-DDS6H9HO.mjs.map +0 -1
  226. package/dist/_chunks/EditViewPage-DvNpQkam.js.map +0 -1
  227. package/dist/_chunks/Field-6gvGdPBV.mjs.map +0 -1
  228. package/dist/_chunks/Field-DmVKIAOo.js.map +0 -1
  229. package/dist/_chunks/Form-CPZC9vWa.js.map +0 -1
  230. package/dist/_chunks/Form-DW6K1IH-.mjs.map +0 -1
  231. package/dist/_chunks/History-DeAPlvtv.js.map +0 -1
  232. package/dist/_chunks/History-Dmr9fmUA.mjs.map +0 -1
  233. package/dist/_chunks/ListConfigurationPage-DPCwW5Vr.js.map +0 -1
  234. package/dist/_chunks/ListConfigurationPage-DhwvYcNv.mjs.map +0 -1
  235. package/dist/_chunks/ListViewPage-5ySZ-VUs.js.map +0 -1
  236. package/dist/_chunks/ListViewPage-BtAwuYLE.mjs.map +0 -1
  237. package/dist/_chunks/NoContentTypePage-DOC_yWOf.js.map +0 -1
  238. package/dist/_chunks/NoContentTypePage-DSPxnxxp.mjs.map +0 -1
  239. package/dist/_chunks/Relations-CgWtgnPe.js.map +0 -1
  240. package/dist/_chunks/Relations-J8cscLlR.mjs.map +0 -1
  241. package/dist/_chunks/index-C6AH2hEl.js.map +0 -1
  242. package/dist/_chunks/index-CwRRo1V9.mjs.map +0 -1
  243. package/dist/_chunks/layout-B_SXLhqf.js.map +0 -1
  244. package/dist/_chunks/layout-jIDzX0Fp.mjs.map +0 -1
  245. package/dist/_chunks/relations-CuvIgCqI.mjs.map +0 -1
  246. package/dist/_chunks/relations-iBMa_OFG.js.map +0 -1
  247. package/dist/_chunks/urls-CbOsUOoW.mjs +0 -7
  248. package/dist/_chunks/urls-CbOsUOoW.mjs.map +0 -1
  249. package/dist/_chunks/urls-DzZya_gm.js +0 -6
  250. package/dist/_chunks/urls-DzZya_gm.js.map +0 -1
  251. package/dist/server/src/controllers/utils/dimensions.d.ts +0 -5
  252. package/dist/server/src/controllers/utils/dimensions.d.ts.map +0 -1
  253. package/strapi-server.js +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"History-Di3zm4HT.js","sources":["../../admin/src/history/components/VersionInputRenderer.tsx","../../admin/src/history/components/VersionContent.tsx","../../admin/src/history/services/historyVersion.ts","../../admin/src/history/components/VersionHeader.tsx","../../admin/src/history/components/VersionsList.tsx","../../admin/src/history/pages/History.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n useStrapiApp,\n useForm,\n InputRenderer as FormInputRenderer,\n useField,\n Form,\n} from '@strapi/admin/strapi-admin';\nimport { Alert, Box, Field, Flex, Link, Tooltip, Typography } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { NavLink } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nimport { COLLECTION_TYPES } from '../../constants/collections';\nimport { useDocumentRBAC } from '../../features/DocumentRBAC';\nimport { useDoc } from '../../hooks/useDocument';\nimport { useDocLayout } from '../../hooks/useDocumentLayout';\nimport { useLazyComponents } from '../../hooks/useLazyComponents';\nimport { useTypedSelector } from '../../modules/hooks';\nimport { DocumentStatus } from '../../pages/EditView/components/DocumentStatus';\nimport { BlocksInput } from '../../pages/EditView/components/FormInputs/BlocksInput/BlocksInput';\nimport { ComponentInput } from '../../pages/EditView/components/FormInputs/Component/Input';\nimport {\n DynamicZone,\n useDynamicZone,\n} from '../../pages/EditView/components/FormInputs/DynamicZone/Field';\nimport { NotAllowedInput } from '../../pages/EditView/components/FormInputs/NotAllowed';\nimport { UIDInput } from '../../pages/EditView/components/FormInputs/UID';\nimport { Wysiwyg } from '../../pages/EditView/components/FormInputs/Wysiwyg/Field';\nimport { useFieldHint } from '../../pages/EditView/components/InputRenderer';\nimport { getRelationLabel } from '../../utils/relations';\nimport { useHistoryContext } from '../pages/History';\n\nimport { getRemaingFieldsLayout } from './VersionContent';\n\nimport type { EditFieldLayout } from '../../hooks/useDocumentLayout';\nimport type { RelationsFieldProps } from '../../pages/EditView/components/FormInputs/Relations';\nimport type { RelationResult } from '../../services/relations';\nimport type { Schema } from '@strapi/types';\nimport type { DistributiveOmit } from 'react-redux';\n\nconst StyledAlert = styled(Alert).attrs({ closeLabel: 'Close', onClose: () => {}, shadow: 'none' })`\n button {\n display: none;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * CustomRelationInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst LinkEllipsis = styled(Link)`\n display: block;\n\n & > span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n }\n`;\n\nconst CustomRelationInput = (props: RelationsFieldProps) => {\n const { formatMessage } = useIntl();\n const field = useField<\n { results: RelationResult[]; meta: { missingCount: number } } | RelationResult[]\n >(props.name);\n\n /**\n * Ideally the server would return the correct shape, however, for admin user relations\n * it sanitizes everything out when it finds an object for the relation value.\n */\n let formattedFieldValue;\n if (field) {\n formattedFieldValue = Array.isArray(field.value)\n ? { results: field.value, meta: { missingCount: 0 } }\n : field.value;\n }\n\n if (\n !formattedFieldValue ||\n (formattedFieldValue.results.length === 0 && formattedFieldValue.meta.missingCount === 0)\n ) {\n return (\n <>\n <Field.Label action={props.labelAction}>{props.label}</Field.Label>\n <Box marginTop={1}>\n {/* @ts-expect-error – we dont need closeLabel */}\n <StyledAlert variant=\"default\">\n {formatMessage({\n id: 'content-manager.history.content.no-relations',\n defaultMessage: 'No relations.',\n })}\n </StyledAlert>\n </Box>\n </>\n );\n }\n\n const { results, meta } = formattedFieldValue;\n\n return (\n <Box>\n <Field.Label>{props.label}</Field.Label>\n {results.length > 0 && (\n <Flex direction=\"column\" gap={2} marginTop={1} alignItems=\"stretch\">\n {results.map((relationData) => {\n // @ts-expect-error - targetModel does exist on the attribute. But it's not typed.\n const { targetModel } = props.attribute;\n const href = `../${COLLECTION_TYPES}/${targetModel}/${relationData.documentId}`;\n const label = getRelationLabel(relationData, props.mainField);\n const isAdminUserRelation = targetModel === 'admin::user';\n\n return (\n <Flex\n key={relationData.documentId ?? relationData.id}\n paddingTop={2}\n paddingBottom={2}\n paddingLeft={4}\n paddingRight={4}\n hasRadius\n borderColor=\"neutral200\"\n background=\"neutral150\"\n justifyContent=\"space-between\"\n >\n <Box minWidth={0} paddingTop={1} paddingBottom={1} paddingRight={4}>\n <Tooltip label={label}>\n {isAdminUserRelation ? (\n <Typography>{label}</Typography>\n ) : (\n <LinkEllipsis tag={NavLink} to={href}>\n {label}\n </LinkEllipsis>\n )}\n </Tooltip>\n </Box>\n <DocumentStatus status={relationData.status as string} />\n </Flex>\n );\n })}\n </Flex>\n )}\n {meta.missingCount > 0 && (\n /* @ts-expect-error – we dont need closeLabel */\n <StyledAlert\n marginTop={1}\n variant=\"warning\"\n title={formatMessage(\n {\n id: 'content-manager.history.content.missing-relations.title',\n defaultMessage:\n '{number, plural, =1 {Missing relation} other {{number} missing relations}}',\n },\n { number: meta.missingCount }\n )}\n >\n {formatMessage(\n {\n id: 'content-manager.history.content.missing-relations.message',\n defaultMessage:\n \"{number, plural, =1 {It has} other {They have}} been deleted and can't be restored.\",\n },\n { number: meta.missingCount }\n )}\n </StyledAlert>\n )}\n </Box>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * CustomMediaInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst CustomMediaInput = (props: VersionInputRendererProps) => {\n const { value } = useField(props.name);\n const results = value ? value.results : [];\n const meta = value ? value.meta : { missingCount: 0 };\n const { formatMessage } = useIntl();\n\n const fields = useStrapiApp('CustomMediaInput', (state) => state.fields);\n const MediaLibrary = fields.media as React.ComponentType<\n VersionInputRendererProps & { multiple: boolean }\n >;\n return (\n <Flex direction=\"column\" gap={2} alignItems=\"stretch\">\n <Form method=\"PUT\" disabled={true} initialValues={{ [props.name]: results }}>\n <MediaLibrary {...props} disabled={true} multiple={results.length > 1} />\n </Form>\n {meta.missingCount > 0 && (\n <StyledAlert\n variant=\"warning\"\n closeLabel=\"Close\"\n onClose={() => {}}\n title={formatMessage(\n {\n id: 'content-manager.history.content.missing-assets.title',\n defaultMessage:\n '{number, plural, =1 {Missing asset} other {{number} missing assets}}',\n },\n { number: meta.missingCount }\n )}\n >\n {formatMessage(\n {\n id: 'content-manager.history.content.missing-assets.message',\n defaultMessage:\n \"{number, plural, =1 {It has} other {They have}} been deleted in the Media Library and can't be restored.\",\n },\n { number: meta.missingCount }\n )}\n </StyledAlert>\n )}\n </Flex>\n );\n};\n\ntype VersionInputRendererProps = DistributiveOmit<EditFieldLayout, 'size'> & {\n /**\n * In the context of content history, deleted fields need to ignore RBAC\n * @default false\n */\n shouldIgnoreRBAC?: boolean;\n};\n\n/**\n * Checks if the i18n plugin added a label action to the field and modifies it\n * to adapt the wording for the history page.\n */\nconst getLabelAction = (labelAction: VersionInputRendererProps['labelAction']) => {\n if (!React.isValidElement(labelAction)) {\n return labelAction;\n }\n\n // TODO: find a better way to do this rather than access internals\n const labelActionTitleId = labelAction.props.title.id;\n\n if (labelActionTitleId === 'i18n.Field.localized') {\n return React.cloneElement(labelAction, {\n ...labelAction.props,\n title: {\n id: 'history.content.localized',\n defaultMessage:\n 'This value is specific to this locale. If you restore this version, the content will not be replaced for other locales.',\n },\n });\n }\n\n if (labelActionTitleId === 'i18n.Field.not-localized') {\n return React.cloneElement(labelAction, {\n ...labelAction.props,\n title: {\n id: 'history.content.not-localized',\n defaultMessage:\n 'This value is common to all locales. If you restore this version and save the changes, the content will be replaced for all locales.',\n },\n });\n }\n\n // Label action is unrelated to i18n, don't touch it.\n return labelAction;\n};\n\n/**\n * @internal\n *\n * @description An abstraction around the regular form input renderer designed specifically\n * to be used on the History page in the content-manager. It understands how to render specific\n * inputs within the context of a history version (i.e. relations, media, ignored RBAC, etc...)\n */\nconst VersionInputRenderer = ({\n visible,\n hint: providedHint,\n shouldIgnoreRBAC = false,\n labelAction,\n ...props\n}: VersionInputRendererProps) => {\n const customLabelAction = getLabelAction(labelAction);\n\n const { formatMessage } = useIntl();\n const version = useHistoryContext('VersionContent', (state) => state.selectedVersion);\n const configuration = useHistoryContext('VersionContent', (state) => state.configuration);\n const fieldSizes = useTypedSelector((state) => state['content-manager'].app.fieldSizes);\n\n const { id, components } = useDoc();\n const isFormDisabled = useForm('InputRenderer', (state) => state.disabled);\n\n const isInDynamicZone = useDynamicZone('isInDynamicZone', (state) => state.isInDynamicZone);\n\n const canCreateFields = useDocumentRBAC('InputRenderer', (rbac) => rbac.canCreateFields);\n const canReadFields = useDocumentRBAC('InputRenderer', (rbac) => rbac.canReadFields);\n const canUpdateFields = useDocumentRBAC('InputRenderer', (rbac) => rbac.canUpdateFields);\n const canUserAction = useDocumentRBAC('InputRenderer', (rbac) => rbac.canUserAction);\n\n const editableFields = id ? canUpdateFields : canCreateFields;\n const readableFields = id ? canReadFields : canCreateFields;\n /**\n * Component fields are always readable and editable,\n * however the fields within them may not be.\n */\n const canUserReadField = canUserAction(props.name, readableFields, props.type);\n const canUserEditField = canUserAction(props.name, editableFields, props.type);\n\n const fields = useStrapiApp('InputRenderer', (app) => app.fields);\n const { lazyComponentStore } = useLazyComponents(\n attributeHasCustomFieldProperty(props.attribute) ? [props.attribute.customField] : undefined\n );\n\n const hint = useFieldHint(providedHint, props.attribute);\n const {\n edit: { components: componentsLayout },\n } = useDocLayout();\n\n if (!visible) {\n return null;\n }\n\n /**\n * Don't render the field if the user can't read it.\n */\n if (!shouldIgnoreRBAC && !canUserReadField && !isInDynamicZone) {\n return <NotAllowedInput hint={hint} {...props} />;\n }\n\n const fieldIsDisabled =\n (!canUserEditField && !isInDynamicZone) || props.disabled || isFormDisabled;\n\n /**\n * Attributes found on the current content-type schema cannot be restored. We handle\n * this by displaying a warning alert to the user instead of the input for that field type.\n */\n const addedAttributes = version.meta.unknownAttributes.added;\n if (Object.keys(addedAttributes).includes(props.name)) {\n return (\n <Flex direction=\"column\" alignItems=\"flex-start\" gap={1}>\n <Field.Label>{props.label}</Field.Label>\n <StyledAlert\n width=\"100%\"\n closeLabel=\"Close\"\n onClose={() => {}}\n variant=\"warning\"\n title={formatMessage({\n id: 'content-manager.history.content.new-field.title',\n defaultMessage: 'New field',\n })}\n >\n {formatMessage({\n id: 'content-manager.history.content.new-field.message',\n defaultMessage:\n \"This field didn't exist when this version was saved. If you restore this version, it will be empty.\",\n })}\n </StyledAlert>\n </Flex>\n );\n }\n\n /**\n * Because a custom field has a unique prop but the type could be confused with either\n * the useField hook or the type of the field we need to handle it separately and first.\n */\n if (attributeHasCustomFieldProperty(props.attribute)) {\n const CustomInput = lazyComponentStore[props.attribute.customField];\n\n if (CustomInput) {\n return (\n <CustomInput\n {...props}\n // @ts-expect-error – TODO: fix this type error in the useLazyComponents hook.\n hint={hint}\n labelAction={customLabelAction}\n disabled={fieldIsDisabled}\n />\n );\n }\n\n return (\n <FormInputRenderer\n {...props}\n hint={hint}\n labelAction={customLabelAction}\n // @ts-expect-error – this workaround lets us display that the custom field is missing.\n type={props.attribute.customField}\n disabled={fieldIsDisabled}\n />\n );\n }\n\n /**\n * Since media fields use a custom input via the upload plugin provided by the useLibrary hook,\n * we need to handle the them before other custom inputs coming from the useLibrary hook.\n */\n if (props.type === 'media') {\n return (\n <CustomMediaInput {...props} labelAction={customLabelAction} disabled={fieldIsDisabled} />\n );\n }\n /**\n * This is where we handle ONLY the fields from the `useLibrary` hook.\n */\n const addedInputTypes = Object.keys(fields);\n if (!attributeHasCustomFieldProperty(props.attribute) && addedInputTypes.includes(props.type)) {\n const CustomInput = fields[props.type];\n return (\n <CustomInput\n {...props}\n // @ts-expect-error – TODO: fix this type error in the useLibrary hook.\n hint={hint}\n labelAction={customLabelAction}\n disabled={fieldIsDisabled}\n />\n );\n }\n\n /**\n * These include the content-manager specific fields, failing that we fall back\n * to the more generic form input renderer.\n */\n switch (props.type) {\n case 'blocks':\n return <BlocksInput {...props} hint={hint} type={props.type} disabled={fieldIsDisabled} />;\n case 'component':\n const { layout } = componentsLayout[props.attribute.component];\n // Components can only have one panel, so only save the first layout item\n const [remainingFieldsLayout] = getRemaingFieldsLayout({\n layout: [layout],\n metadatas: configuration.components[props.attribute.component].metadatas,\n fieldSizes,\n schemaAttributes: components[props.attribute.component].attributes,\n });\n\n return (\n <ComponentInput\n {...props}\n layout={[...layout, ...(remainingFieldsLayout || [])]}\n hint={hint}\n labelAction={customLabelAction}\n disabled={fieldIsDisabled}\n >\n {(inputProps) => <VersionInputRenderer {...inputProps} shouldIgnoreRBAC={true} />}\n </ComponentInput>\n );\n case 'dynamiczone':\n return (\n <DynamicZone\n {...props}\n hint={hint}\n labelAction={customLabelAction}\n disabled={fieldIsDisabled}\n />\n );\n case 'relation':\n return (\n <CustomRelationInput\n {...props}\n hint={hint}\n labelAction={customLabelAction}\n disabled={fieldIsDisabled}\n />\n );\n case 'richtext':\n return (\n <Wysiwyg\n {...props}\n hint={hint}\n type={props.type}\n labelAction={customLabelAction}\n disabled={fieldIsDisabled}\n />\n );\n case 'uid':\n return (\n <UIDInput\n {...props}\n hint={hint}\n type={props.type}\n labelAction={customLabelAction}\n disabled={fieldIsDisabled}\n />\n );\n /**\n * Enumerations are a special case because they require options.\n */\n case 'enumeration':\n return (\n <FormInputRenderer\n {...props}\n hint={hint}\n labelAction={customLabelAction}\n options={props.attribute.enum.map((value) => ({ value }))}\n // @ts-expect-error – Temp workaround so we don't forget custom-fields don't work!\n type={props.customField ? 'custom-field' : props.type}\n disabled={fieldIsDisabled}\n />\n );\n default:\n // These props are not needed for the generic form input renderer.\n const { unique: _unique, mainField: _mainField, ...restProps } = props;\n return (\n <FormInputRenderer\n {...restProps}\n hint={hint}\n labelAction={customLabelAction}\n // @ts-expect-error – Temp workaround so we don't forget custom-fields don't work!\n type={props.customField ? 'custom-field' : props.type}\n disabled={fieldIsDisabled}\n />\n );\n }\n};\n\nconst attributeHasCustomFieldProperty = (\n attribute: Schema.Attribute.AnyAttribute\n): attribute is Schema.Attribute.AnyAttribute & Schema.Attribute.CustomField<string> =>\n 'customField' in attribute && typeof attribute.customField === 'string';\n\nexport type { VersionInputRendererProps };\nexport { VersionInputRenderer };\n","import * as React from 'react';\n\nimport { Form, Layouts } from '@strapi/admin/strapi-admin';\nimport { Box, Divider, Flex, Grid, Typography } from '@strapi/design-system';\nimport { Schema } from '@strapi/types';\nimport pipe from 'lodash/fp/pipe';\nimport { useIntl } from 'react-intl';\n\nimport { useDoc } from '../../hooks/useDocument';\nimport { useTypedSelector } from '../../modules/hooks';\nimport {\n prepareTempKeys,\n removeFieldsThatDontExistOnSchema,\n} from '../../pages/EditView/utils/data';\nimport { HistoryContextValue, useHistoryContext } from '../pages/History';\n\nimport { VersionInputRenderer } from './VersionInputRenderer';\n\nimport type { Metadatas } from '../../../../shared/contracts/content-types';\nimport type { GetInitData } from '../../../../shared/contracts/init';\nimport type { ComponentsDictionary, Document } from '../../hooks/useDocument';\nimport type { EditFieldLayout } from '../../hooks/useDocumentLayout';\n\nconst createLayoutFromFields = <T extends EditFieldLayout | UnknownField>(fields: T[]) => {\n return (\n fields\n .reduce<Array<T[]>>((rows, field) => {\n if (field.type === 'dynamiczone') {\n // Dynamic zones take up all the columns in a row\n rows.push([field]);\n\n return rows;\n }\n\n if (!rows[rows.length - 1]) {\n // Create a new row if there isn't one available\n rows.push([]);\n }\n\n // Push fields to the current row, they wrap and handle their own column size\n rows[rows.length - 1].push(field);\n\n return rows;\n }, [])\n // Map the rows to panels\n .map((row) => [row])\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * getRemainingFieldsLayout\n * -----------------------------------------------------------------------------------------------*/\n\ninterface GetRemainingFieldsLayoutOptions\n extends Pick<HistoryContextValue, 'layout'>,\n Pick<GetInitData.Response['data'], 'fieldSizes'> {\n schemaAttributes: HistoryContextValue['schema']['attributes'];\n metadatas: Metadatas;\n}\n\n/**\n * Build a layout for the fields that are were deleted from the edit view layout\n * via the configure the view page. This layout will be merged with the main one.\n * Those fields would be restored if the user restores the history version, which is why it's\n * important to show them, even if they're not in the normal layout.\n */\nfunction getRemaingFieldsLayout({\n layout,\n metadatas,\n schemaAttributes,\n fieldSizes,\n}: GetRemainingFieldsLayoutOptions) {\n const fieldsInLayout = layout.flatMap((panel) =>\n panel.flatMap((row) => row.flatMap((field) => field.name))\n );\n const remainingFields = Object.entries(metadatas).reduce<EditFieldLayout[]>(\n (currentRemainingFields, [name, field]) => {\n // Make sure we do not fields that are not visible, e.g. \"id\"\n if (!fieldsInLayout.includes(name) && field.edit.visible === true) {\n const attribute = schemaAttributes[name];\n // @ts-expect-error not sure why attribute causes type error\n currentRemainingFields.push({\n attribute,\n type: attribute.type,\n visible: true,\n disabled: true,\n label: field.edit.label || name,\n name: name,\n size: fieldSizes[attribute.type].default ?? 12,\n });\n }\n\n return currentRemainingFields;\n },\n []\n );\n\n return createLayoutFromFields(remainingFields);\n}\n\n/* -------------------------------------------------------------------------------------------------\n * FormPanel\n * -----------------------------------------------------------------------------------------------*/\n\nconst FormPanel = ({ panel }: { panel: EditFieldLayout[][] }) => {\n if (panel.some((row) => row.some((field) => field.type === 'dynamiczone'))) {\n const [row] = panel;\n const [field] = row;\n\n return (\n <Grid.Root key={field.name} gap={4}>\n <Grid.Item col={12} s={12} xs={12} direction=\"column\" alignItems=\"stretch\">\n <VersionInputRenderer {...field} />\n </Grid.Item>\n </Grid.Root>\n );\n }\n\n return (\n <Box\n hasRadius\n background=\"neutral0\"\n shadow=\"tableShadow\"\n paddingLeft={6}\n paddingRight={6}\n paddingTop={6}\n paddingBottom={6}\n borderColor=\"neutral150\"\n >\n <Flex direction=\"column\" alignItems=\"stretch\" gap={6}>\n {panel.map((row, gridRowIndex) => (\n <Grid.Root key={gridRowIndex} gap={4}>\n {row.map(({ size, ...field }) => {\n return (\n <Grid.Item\n col={size}\n key={field.name}\n s={12}\n xs={12}\n direction=\"column\"\n alignItems=\"stretch\"\n >\n <VersionInputRenderer {...field} />\n </Grid.Item>\n );\n })}\n </Grid.Root>\n ))}\n </Flex>\n </Box>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * VersionContent\n * -----------------------------------------------------------------------------------------------*/\n\ntype UnknownField = EditFieldLayout & { shouldIgnoreRBAC: boolean };\n\nconst VersionContent = () => {\n const { formatMessage } = useIntl();\n const { fieldSizes } = useTypedSelector((state) => state['content-manager'].app);\n const version = useHistoryContext('VersionContent', (state) => state.selectedVersion);\n const layout = useHistoryContext('VersionContent', (state) => state.layout);\n const configuration = useHistoryContext('VersionContent', (state) => state.configuration);\n const schema = useHistoryContext('VersionContent', (state) => state.schema);\n\n // Build a layout for the unknown fields section\n const removedAttributes = version.meta.unknownAttributes.removed;\n const removedAttributesAsFields = Object.entries(removedAttributes).map(\n ([attributeName, attribute]) => {\n const field = {\n attribute,\n shouldIgnoreRBAC: true,\n type: attribute.type,\n visible: true,\n disabled: true,\n label: attributeName,\n name: attributeName,\n size: fieldSizes[attribute.type].default ?? 12,\n } as UnknownField;\n\n return field;\n }\n );\n const unknownFieldsLayout = createLayoutFromFields(removedAttributesAsFields);\n\n // Build a layout for the fields that are were deleted from the layout\n const remainingFieldsLayout = getRemaingFieldsLayout({\n metadatas: configuration.contentType.metadatas,\n layout,\n schemaAttributes: schema.attributes,\n fieldSizes,\n });\n\n const { components } = useDoc();\n\n /**\n * Transform the data before passing it to the form so that each field\n * has a uniquely generated key\n */\n const transformedData = React.useMemo(() => {\n const transform =\n (schemaAttributes: Schema.Attributes, components: ComponentsDictionary = {}) =>\n (document: Omit<Document, 'id'>) => {\n const schema = { attributes: schemaAttributes };\n const transformations = pipe(\n removeFieldsThatDontExistOnSchema(schema),\n prepareTempKeys(schema, components)\n );\n return transformations(document);\n };\n\n return transform(version.schema, components)(version.data);\n }, [components, version.data, version.schema]);\n\n return (\n <Layouts.Content>\n <Box paddingBottom={8}>\n <Form disabled={true} method=\"PUT\" initialValues={transformedData}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={6} position=\"relative\">\n {[...layout, ...remainingFieldsLayout].map((panel, index) => {\n return <FormPanel key={index} panel={panel} />;\n })}\n </Flex>\n </Form>\n </Box>\n {removedAttributesAsFields.length > 0 && (\n <>\n <Divider />\n <Box paddingTop={8}>\n <Flex direction=\"column\" alignItems=\"flex-start\" paddingBottom={6} gap={1}>\n <Typography variant=\"delta\">\n {formatMessage({\n id: 'content-manager.history.content.unknown-fields.title',\n defaultMessage: 'Unknown fields',\n })}\n </Typography>\n <Typography variant=\"pi\">\n {formatMessage(\n {\n id: 'content-manager.history.content.unknown-fields.message',\n defaultMessage:\n 'These fields have been deleted or renamed in the Content-Type Builder. <b>These fields will not be restored.</b>',\n },\n {\n b: (chunks: React.ReactNode) => (\n <Typography variant=\"pi\" fontWeight=\"bold\">\n {chunks}\n </Typography>\n ),\n }\n )}\n </Typography>\n </Flex>\n <Form disabled={true} method=\"PUT\" initialValues={version.data}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={6} position=\"relative\">\n {unknownFieldsLayout.map((panel, index) => {\n return <FormPanel key={index} panel={panel} />;\n })}\n </Flex>\n </Form>\n </Box>\n </>\n )}\n </Layouts.Content>\n );\n};\n\nexport { VersionContent, getRemaingFieldsLayout };\n","import { Data } from '@strapi/types';\n\nimport {\n GetHistoryVersions,\n RestoreHistoryVersion,\n} from '../../../../shared/contracts/history-versions';\nimport { COLLECTION_TYPES } from '../../constants/collections';\nimport { contentManagerApi } from '../../services/api';\n\ninterface RestoreVersion extends RestoreHistoryVersion.Request {\n documentId: Data.ID;\n collectionType?: string;\n}\n\nconst historyVersionsApi = contentManagerApi.injectEndpoints({\n endpoints: (builder) => ({\n getHistoryVersions: builder.query<\n GetHistoryVersions.Response,\n GetHistoryVersions.Request['query']\n >({\n query(params) {\n return {\n url: `/content-manager/history-versions`,\n method: 'GET',\n config: {\n params,\n },\n };\n },\n providesTags: ['HistoryVersion'],\n }),\n restoreVersion: builder.mutation<RestoreHistoryVersion.Response, RestoreVersion>({\n query({ params, body }) {\n return {\n url: `/content-manager/history-versions/${params.versionId}/restore`,\n method: 'PUT',\n data: body,\n };\n },\n invalidatesTags: (_res, _error, { documentId, collectionType, params }) => {\n return [\n 'HistoryVersion',\n {\n type: 'Document',\n id:\n collectionType === COLLECTION_TYPES\n ? `${params.contentType}_${documentId}`\n : params.contentType,\n },\n ];\n },\n }),\n }),\n});\n\nconst { useGetHistoryVersionsQuery, useRestoreVersionMutation } = historyVersionsApi;\n\nexport { useGetHistoryVersionsQuery, useRestoreVersionMutation };\n","import * as React from 'react';\n\nimport {\n ConfirmDialog,\n useNotification,\n useQueryParams,\n useTracking,\n useRBAC,\n Layouts,\n} from '@strapi/admin/strapi-admin';\nimport { Button, Typography, Flex, Link, Dialog } from '@strapi/design-system';\nimport { ArrowLeft, WarningCircle } from '@strapi/icons';\nimport { UID } from '@strapi/types';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { NavLink, useNavigate, useParams, type To } from 'react-router-dom';\n\nimport { PERMISSIONS } from '../../constants/plugin';\nimport { useHistoryContext } from '../pages/History';\nimport { useRestoreVersionMutation } from '../services/historyVersion';\n\ninterface VersionHeaderProps {\n headerId: string;\n}\n\nexport const VersionHeader = ({ headerId }: VersionHeaderProps) => {\n const [isConfirmDialogOpen, setIsConfirmDialogOpen] = React.useState(false);\n const navigate = useNavigate();\n const { formatMessage, formatDate } = useIntl();\n const { trackUsage } = useTracking();\n const { toggleNotification } = useNotification();\n const [{ query }] = useQueryParams<{\n plugins?: Record<string, unknown>;\n }>();\n const { collectionType, slug } = useParams<{ collectionType: string; slug: UID.ContentType }>();\n const [restoreVersion, { isLoading }] = useRestoreVersionMutation();\n const { allowedActions } = useRBAC(PERMISSIONS.map((action) => ({ action, subject: slug })));\n\n const version = useHistoryContext('VersionHeader', (state) => state.selectedVersion);\n const mainField = useHistoryContext('VersionHeader', (state) => state.mainField);\n const schema = useHistoryContext('VersionHeader', (state) => state.schema);\n const isCurrentVersion = useHistoryContext(\n 'VersionHeader',\n (state) => state.page === 1 && state.versions.data[0].id === state.selectedVersion.id\n );\n\n const mainFieldValue = version.data[mainField];\n\n const getNextNavigation = (): To => {\n const pluginsQueryParams = stringify({ plugins: query.plugins }, { encode: false });\n\n return {\n pathname: '..',\n search: pluginsQueryParams,\n };\n };\n\n const handleRestore = async () => {\n try {\n const response = await restoreVersion({\n documentId: version.relatedDocumentId,\n collectionType,\n params: {\n versionId: version.id,\n contentType: version.contentType,\n },\n body: { contentType: version.contentType },\n });\n\n if ('data' in response) {\n navigate(getNextNavigation(), { relative: 'path' });\n\n toggleNotification({\n type: 'success',\n title: formatMessage({\n id: 'content-manager.restore.success.title',\n defaultMessage: 'Version restored.',\n }),\n message: formatMessage({\n id: 'content-manager.restore.success.message',\n defaultMessage: 'A past version of the content was restored.',\n }),\n });\n\n trackUsage('didRestoreHistoryVersion');\n }\n\n if ('error' in response) {\n toggleNotification({\n type: 'danger',\n message: formatMessage({\n id: 'content-manager.history.restore.error.message',\n defaultMessage: 'Could not restore version.',\n }),\n });\n }\n } catch (error) {\n toggleNotification({\n type: 'danger',\n message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }),\n });\n }\n };\n\n return (\n <Dialog.Root open={isConfirmDialogOpen} onOpenChange={setIsConfirmDialogOpen}>\n <Layouts.BaseHeader\n id={headerId}\n title={formatDate(new Date(version.createdAt), {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n })}\n subtitle={\n <Typography variant=\"epsilon\" textColor=\"neutral600\">\n {formatMessage(\n {\n id: 'content-manager.history.version.subtitle',\n defaultMessage:\n '{hasLocale, select, true {{subtitle}, in {locale}} other {{subtitle}}}',\n },\n {\n hasLocale: Boolean(version.locale),\n subtitle: `${mainFieldValue || ''} (${schema.info.singularName})`.trim(),\n locale: version.locale?.name,\n }\n )}\n </Typography>\n }\n navigationAction={\n <Link\n startIcon={<ArrowLeft />}\n tag={NavLink}\n to={getNextNavigation()}\n relative=\"path\"\n isExternal={false}\n >\n {formatMessage({\n id: 'global.back',\n defaultMessage: 'Back',\n })}\n </Link>\n }\n sticky={false}\n primaryAction={\n <Dialog.Trigger>\n <Button\n disabled={!allowedActions.canUpdate || isCurrentVersion}\n onClick={() => {\n setIsConfirmDialogOpen(true);\n }}\n >\n {formatMessage({\n id: 'content-manager.history.restore.confirm.button',\n defaultMessage: 'Restore',\n })}\n </Button>\n </Dialog.Trigger>\n }\n />\n <ConfirmDialog\n onConfirm={handleRestore}\n endAction={\n <Button variant=\"secondary\" onClick={handleRestore} loading={isLoading}>\n {formatMessage({\n id: 'content-manager.history.restore.confirm.button',\n defaultMessage: 'Restore',\n })}\n </Button>\n }\n >\n <Flex\n direction=\"column\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={2}\n textAlign=\"center\"\n >\n <Flex justifyContent=\"center\">\n <WarningCircle width=\"24px\" height=\"24px\" fill=\"danger600\" />\n </Flex>\n <Typography>\n {formatMessage({\n id: 'content-manager.history.restore.confirm.title',\n defaultMessage: 'Are you sure you want to restore this version?',\n })}\n </Typography>\n <Typography>\n {formatMessage(\n {\n id: 'content-manager.history.restore.confirm.message',\n defaultMessage:\n \"{isDraft, select, true {The restored content will override your draft.} other {The restored content won't be published, it will override the draft and be saved as pending changes. You'll be able to publish the changes at anytime.}}\",\n },\n {\n isDraft: version.status === 'draft',\n }\n )}\n </Typography>\n </Flex>\n </ConfirmDialog>\n </Dialog.Root>\n );\n};\n","import * as React from 'react';\n\nimport { useQueryParams } from '@strapi/admin/strapi-admin';\nimport { Box, Flex, Typography } from '@strapi/design-system';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { Link } from 'react-router-dom';\n\nimport { RelativeTime } from '../../components/RelativeTime';\nimport { DocumentStatus } from '../../pages/EditView/components/DocumentStatus';\nimport { getDisplayName } from '../../utils/users';\nimport { useHistoryContext } from '../pages/History';\n\nimport type { HistoryVersions } from '../../../../shared/contracts';\n\n/* -------------------------------------------------------------------------------------------------\n * BlueText\n * -----------------------------------------------------------------------------------------------*/\n\nconst BlueText = (children: React.ReactNode) => (\n <Typography textColor=\"primary600\" variant=\"pi\">\n {children}\n </Typography>\n);\n\n/* -------------------------------------------------------------------------------------------------\n * VersionCard\n * -----------------------------------------------------------------------------------------------*/\n\ninterface VersionCardProps {\n version: HistoryVersions.HistoryVersionDataResponse;\n isCurrent: boolean;\n}\n\nconst VersionCard = ({ version, isCurrent }: VersionCardProps) => {\n const { formatDate, formatMessage } = useIntl();\n const [{ query }] = useQueryParams<{ id?: string }>();\n const isActive = query.id === version.id.toString();\n const author = version.createdBy && getDisplayName(version.createdBy);\n\n return (\n <Flex\n direction=\"column\"\n alignItems=\"flex-start\"\n gap={3}\n hasRadius\n borderWidth=\"1px\"\n borderStyle=\"solid\"\n borderColor={isActive ? 'primary600' : 'neutral200'}\n color=\"neutral800\"\n padding={5}\n tag={Link}\n to={`?${stringify({ ...query, id: version.id })}`}\n style={{ textDecoration: 'none' }}\n >\n <Flex direction=\"column\" gap={1} alignItems=\"flex-start\">\n <Typography tag=\"h3\" fontWeight=\"semiBold\">\n {formatDate(version.createdAt, {\n day: 'numeric',\n month: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n })}\n </Typography>\n <Typography tag=\"p\" variant=\"pi\" textColor=\"neutral600\">\n {formatMessage(\n {\n id: 'content-manager.history.sidebar.versionDescription',\n defaultMessage:\n '{distanceToNow}{isAnonymous, select, true {} other { by {author}}}{isCurrent, select, true { <b>(current)</b>} other {}}',\n },\n {\n distanceToNow: <RelativeTime timestamp={new Date(version.createdAt)} />,\n author,\n isAnonymous: !Boolean(version.createdBy),\n isCurrent,\n b: BlueText,\n }\n )}\n </Typography>\n </Flex>\n {version.status && <DocumentStatus status={version.status} size=\"XS\" />}\n </Flex>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * PaginationButton\n * -----------------------------------------------------------------------------------------------*/\n\ninterface PaginationButtonProps {\n page: number;\n children: React.ReactNode;\n}\n\nconst PaginationButton = ({ page, children }: PaginationButtonProps) => {\n const [{ query }] = useQueryParams<{ id?: string }>();\n\n // Remove the id from the pagination link, so that the history page can redirect\n // to the id of the first history version in the new page once it's loaded\n const { id: _id, ...queryRest } = query;\n\n return (\n <Link to={{ search: stringify({ ...queryRest, page }) }} style={{ textDecoration: 'none' }}>\n <Typography variant=\"omega\" textColor=\"primary600\">\n {children}\n </Typography>\n </Link>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * VersionsList\n * -----------------------------------------------------------------------------------------------*/\n\nconst VersionsList = () => {\n const { formatMessage } = useIntl();\n const { versions, page } = useHistoryContext('VersionsList', (state) => ({\n versions: state.versions,\n page: state.page,\n }));\n\n return (\n <Flex\n shrink={0}\n direction=\"column\"\n alignItems=\"stretch\"\n width=\"320px\"\n height=\"100vh\"\n background=\"neutral0\"\n borderColor=\"neutral200\"\n borderWidth=\"0 0 0 1px\"\n borderStyle=\"solid\"\n tag=\"aside\"\n >\n <Flex\n direction=\"row\"\n justifyContent=\"space-between\"\n padding={4}\n borderColor=\"neutral200\"\n borderWidth=\"0 0 1px\"\n borderStyle=\"solid\"\n tag=\"header\"\n >\n <Typography tag=\"h2\" variant=\"omega\" fontWeight=\"semiBold\">\n {formatMessage({\n id: 'content-manager.history.sidebar.title',\n defaultMessage: 'Versions',\n })}\n </Typography>\n <Box background=\"neutral150\" hasRadius padding={1}>\n <Typography variant=\"sigma\" textColor=\"neutral600\">\n {versions.meta.pagination.total}\n </Typography>\n </Box>\n </Flex>\n <Box flex={1} overflow=\"auto\">\n {versions.meta.pagination.page > 1 && (\n <Box paddingTop={4} textAlign=\"center\">\n <PaginationButton page={page - 1}>\n {formatMessage({\n id: 'content-manager.history.sidebar.show-newer',\n defaultMessage: 'Show newer versions',\n })}\n </PaginationButton>\n </Box>\n )}\n <Flex direction=\"column\" gap={3} padding={4} tag=\"ul\" alignItems=\"stretch\">\n {versions.data.map((version, index) => (\n <li\n key={version.id}\n aria-label={formatMessage({\n id: 'content-manager.history.sidebar.title.version-card.aria-label',\n defaultMessage: 'Version card',\n })}\n >\n <VersionCard version={version} isCurrent={page === 1 && index === 0} />\n </li>\n ))}\n </Flex>\n {versions.meta.pagination.page < versions.meta.pagination.pageCount && (\n <Box paddingBottom={4} textAlign=\"center\">\n <PaginationButton page={page + 1}>\n {formatMessage({\n id: 'content-manager.history.sidebar.show-older',\n defaultMessage: 'Show older versions',\n })}\n </PaginationButton>\n </Box>\n )}\n </Box>\n </Flex>\n );\n};\n\nexport { VersionsList };\n","import * as React from 'react';\n\nimport { useQueryParams, Page, createContext, useRBAC } from '@strapi/admin/strapi-admin';\nimport { Box, Flex, FocusTrap, Main, Portal, Link } from '@strapi/design-system';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { Navigate, useParams, NavLink } from 'react-router-dom';\n\nimport { COLLECTION_TYPES } from '../../constants/collections';\nimport { PERMISSIONS } from '../../constants/plugin';\nimport { DocumentRBAC } from '../../features/DocumentRBAC';\nimport { useDocument } from '../../hooks/useDocument';\nimport { type EditLayout, useDocumentLayout } from '../../hooks/useDocumentLayout';\nimport { useGetContentTypeConfigurationQuery } from '../../services/contentTypes';\nimport { buildValidParams } from '../../utils/api';\nimport { VersionContent } from '../components/VersionContent';\nimport { VersionHeader } from '../components/VersionHeader';\nimport { VersionsList } from '../components/VersionsList';\nimport { useGetHistoryVersionsQuery } from '../services/historyVersion';\n\nimport type {\n ContentType,\n FindContentTypeConfiguration,\n} from '../../../../shared/contracts/content-types';\nimport type {\n HistoryVersionDataResponse,\n GetHistoryVersions,\n} from '../../../../shared/contracts/history-versions';\nimport type { UID } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * HistoryProvider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface HistoryContextValue {\n contentType: UID.ContentType;\n id?: string; // null for single types\n layout: EditLayout['layout'];\n configuration: FindContentTypeConfiguration.Response['data'];\n selectedVersion: HistoryVersionDataResponse;\n // Errors are handled outside of the provider, so we exclude errors from the response type\n versions: Extract<GetHistoryVersions.Response, { data: Array<HistoryVersionDataResponse> }>;\n page: number;\n mainField: string;\n schema: ContentType;\n}\n\nconst [HistoryProvider, useHistoryContext] = createContext<HistoryContextValue>('HistoryPage');\n\n/* -------------------------------------------------------------------------------------------------\n * HistoryPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst HistoryPage = () => {\n const headerId = React.useId();\n const { formatMessage } = useIntl();\n const {\n slug,\n id: documentId,\n collectionType,\n } = useParams<{\n collectionType: string;\n slug: UID.ContentType;\n id: string;\n }>();\n\n const { isLoading: isLoadingDocument, schema } = useDocument({\n collectionType: collectionType!,\n model: slug!,\n });\n\n const {\n isLoading: isLoadingLayout,\n edit: {\n layout,\n settings: { displayName, mainField },\n },\n } = useDocumentLayout(slug!);\n const { data: configuration, isLoading: isLoadingConfiguration } =\n useGetContentTypeConfigurationQuery(slug!);\n\n // Parse state from query params\n const [{ query }] = useQueryParams<{\n page?: number;\n id?: string;\n plugins?: Record<string, unknown>;\n }>();\n const { id: selectedVersionId, ...queryWithoutId } = query;\n const validQueryParamsWithoutId = buildValidParams(queryWithoutId);\n const page = validQueryParamsWithoutId.page ? Number(validQueryParamsWithoutId.page) : 1;\n\n const versionsResponse = useGetHistoryVersionsQuery(\n {\n contentType: slug!,\n ...(documentId ? { documentId } : {}),\n // Omit id since it's not needed by the endpoint and caused extra refetches\n ...validQueryParamsWithoutId,\n },\n { refetchOnMountOrArgChange: true }\n );\n\n /**\n * When the page is first mounted, if there's already data in the cache, RTK has a fullfilled\n * status for the first render, right before it triggers a new request. This means the code\n * briefly reaches the part that redirects to the first history version (if none is set).\n * But since that data is stale, that means auto-selecting a version that may not be the most\n * recent. To avoid this, we identify through requestId if the query is stale despite the\n * fullfilled status, and show the loader in that case.\n * This means we essentially don't want cache. We always refetch when the page mounts, and\n * we always show the loader until we have the most recent data. That's fine for this page.\n */\n const initialRequestId = React.useRef(versionsResponse.requestId);\n const isStaleRequest = versionsResponse.requestId === initialRequestId.current;\n\n /**\n * Ensure that we have the necessary data to render the page:\n * - slug for single types\n * - slug _and_ documentId for collection types\n */\n if (!slug || (collectionType === COLLECTION_TYPES && !documentId)) {\n return <Navigate to=\"/content-manager\" />;\n }\n\n if (\n isLoadingDocument ||\n isLoadingLayout ||\n versionsResponse.isFetching ||\n isStaleRequest ||\n isLoadingConfiguration\n ) {\n return <Page.Loading />;\n }\n\n // It was a success, handle empty data\n if (!versionsResponse.isError && !versionsResponse.data?.data?.length) {\n return (\n <>\n <Page.NoData\n action={\n <Link\n tag={NavLink}\n to={`/content-manager/${collectionType}/${slug}${documentId ? `/${documentId}` : ''}`}\n >\n {formatMessage({\n id: 'global.back',\n defaultMessage: 'Back',\n })}\n </Link>\n }\n />\n </>\n );\n }\n\n // We have data, handle selected version\n if (versionsResponse.data?.data?.length && !selectedVersionId) {\n return (\n <Navigate\n to={{ search: stringify({ ...query, id: versionsResponse.data.data[0].id }) }}\n replace\n />\n );\n }\n\n const selectedVersion = versionsResponse.data?.data?.find(\n (version) => version.id.toString() === selectedVersionId\n );\n if (\n versionsResponse.isError ||\n !layout ||\n !schema ||\n !selectedVersion ||\n !configuration ||\n // This should not happen as it's covered by versionsResponse.isError, but we need it for TS\n versionsResponse.data.error\n ) {\n return <Page.Error />;\n }\n\n return (\n <>\n <Page.Title>\n {formatMessage(\n {\n id: 'content-manager.history.page-title',\n defaultMessage: '{contentType} history',\n },\n {\n contentType: displayName,\n }\n )}\n </Page.Title>\n <HistoryProvider\n contentType={slug}\n id={documentId}\n schema={schema}\n layout={layout}\n configuration={configuration}\n selectedVersion={selectedVersion}\n versions={versionsResponse.data}\n page={page}\n mainField={mainField}\n >\n <Flex direction=\"row\" alignItems=\"flex-start\">\n <Main\n grow={1}\n height=\"100vh\"\n background=\"neutral100\"\n paddingBottom={6}\n overflow=\"auto\"\n labelledBy={headerId}\n >\n <VersionHeader headerId={headerId} />\n <VersionContent />\n </Main>\n <VersionsList />\n </Flex>\n </HistoryProvider>\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProtectedHistoryPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ProtectedHistoryPageImpl = () => {\n const { slug } = useParams<{\n slug: string;\n }>();\n const {\n permissions = [],\n isLoading,\n error,\n } = useRBAC(PERMISSIONS.map((action) => ({ action, subject: slug })));\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !slug) {\n return (\n <Box\n height=\"100vh\"\n width=\"100vw\"\n position=\"fixed\"\n top={0}\n left={0}\n zIndex={2}\n background=\"neutral0\"\n >\n <Page.Error />\n </Box>\n );\n }\n\n return (\n <Box\n height=\"100vh\"\n width=\"100vw\"\n position=\"fixed\"\n top={0}\n left={0}\n zIndex={2}\n background=\"neutral0\"\n >\n <Page.Protect permissions={permissions}>\n {({ permissions }) => (\n <DocumentRBAC permissions={permissions}>\n <HistoryPage />\n </DocumentRBAC>\n )}\n </Page.Protect>\n </Box>\n );\n};\n\nconst ProtectedHistoryPage = () => {\n return (\n <Portal>\n <FocusTrap>\n <ProtectedHistoryPageImpl />\n </FocusTrap>\n </Portal>\n );\n};\n\nexport { ProtectedHistoryPage, HistoryProvider, useHistoryContext };\nexport type { HistoryContextValue };\n"],"names":["styled","Alert","Link","useIntl","useField","jsxs","Fragment","jsx","Field","Box","Flex","COLLECTION_TYPES","getRelationLabel","Tooltip","Typography","NavLink","DocumentStatus","useStrapiApp","Form","React","useTypedSelector","useDoc","useForm","useDynamicZone","useDocumentRBAC","useLazyComponents","useFieldHint","useDocLayout","NotAllowedInput","FormInputRenderer","BlocksInput","ComponentInput","DynamicZone","Wysiwyg","UIDInput","Grid","components","schema","pipe","removeFieldsThatDontExistOnSchema","prepareTempKeys","Layouts","index","Divider","contentManagerApi","useNavigate","useTracking","useNotification","useQueryParams","useParams","useRBAC","PERMISSIONS","stringify","Dialog","ArrowLeft","Button","ConfirmDialog","WarningCircle","getDisplayName","RelativeTime","createContext","useDocument","useDocumentLayout","useGetContentTypeConfigurationQuery","buildValidParams","Navigate","Page","Main","permissions","DocumentRBAC","Portal","FocusTrap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,cAAcA,iBAAAA,OAAOC,aAAAA,KAAK,EAAE,MAAM,EAAE,YAAY,SAAS,SAAS,MAAM;AAAC,GAAG,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA;AAUlG,MAAM,eAAeD,iBAAAA,OAAOE,aAAAA,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWhC,MAAM,sBAAsB,CAAC,UAA+B;AACpD,QAAA,EAAE,kBAAkBC,UAAAA;AACpB,QAAA,QAAQC,YAAAA,SAEZ,MAAM,IAAI;AAMR,MAAA;AACJ,MAAI,OAAO;AACT,0BAAsB,MAAM,QAAQ,MAAM,KAAK,IAC3C,EAAE,SAAS,MAAM,OAAO,MAAM,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AK,SAAL,CAAa,CAAA;AAAA,EACvB;AAEI,MAAA,SAAS,CAAC,MAAM;AAEhB,WAAA3D,2BAAA;AAAA,MAACE,aAAA;AAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,OAAM;AAAA,QACN,UAAS;AAAA,QACT,KAAK;AAAA,QACL,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,YAAW;AAAA,QAEX,UAAAF,2BAAA,IAAC2D,iBAAK,OAAL,CAAA,CAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAGlB;AAGE,SAAA3D,2BAAA;AAAA,IAACE,aAAA;AAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,OAAM;AAAA,MACN,UAAS;AAAA,MACT,KAAK;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,YAAW;AAAA,MAEX,yCAACyD,YAAK,KAAA,SAAL,EAAa,aACX,WAAC,EAAE,aAAAE,aAAY,qCACbC,oBAAa,EAAA,aAAaD,cACzB,UAAC7D,2BAAA,IAAA,aAAA,CAAA,CAAY,EACf,CAAA,GAEJ;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,MAAM,uBAAuB,MAAM;AACjC,wCACG+D,aACC,QAAA,EAAA,UAAA/D,2BAAA,IAACgE,0BACC,UAAChE,2BAAA,IAAA,0BAAA,CAAyB,CAAA,EAC5B,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1,28 +1,28 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { useId } from "react";
4
3
  import { useForm, Layouts, BackButton, InputRenderer, useNotification, useField, Form, useTracking, useAPIErrorHandler, Page } from "@strapi/admin/strapi-admin";
5
- import { Button, useCollator, Flex, Typography, Grid, GridItem, ModalLayout, ModalHeader, ModalBody, ModalFooter, Box, useComposedRefs, Menu, VisuallyHidden, Main, Divider } from "@strapi/design-system";
4
+ import { Button, useCollator, Flex, Typography, Grid, Modal, Box, useComposedRefs, Menu, VisuallyHidden, Main, Divider } from "@strapi/design-system";
6
5
  import { useIntl } from "react-intl";
7
- import { Navigate } from "react-router-dom";
8
- import { g as getTranslation, y as capitalise, b as useDoc, o as useGetContentTypeConfigurationQuery, v as checkIfAttributeIsDisplayable, m as useDocLayout, z as useUpdateContentTypeConfigurationMutation, S as SINGLE_TYPES } from "./index-CwRRo1V9.mjs";
6
+ import { useParams, Navigate } from "react-router-dom";
7
+ import { C as COLLECTION_TYPES, g as getTranslation, y as capitalise, c as useDoc, p as useGetContentTypeConfigurationQuery, v as checkIfAttributeIsDisplayable, o as useDocLayout, z as useUpdateContentTypeConfigurationMutation, S as SINGLE_TYPES } from "./index-BpxR3En4.mjs";
9
8
  import { u as useTypedSelector } from "./hooks-E5u1mcgM.mjs";
10
- import { s as setIn } from "./objects-mKMAmfec.mjs";
9
+ import { s as setIn } from "./objects-D6yBsdmx.mjs";
11
10
  import { Drag, Pencil, Cross, Plus } from "@strapi/icons";
12
11
  import { getEmptyImage } from "react-dnd-html5-backend";
13
- import styled from "styled-components";
14
- import { C as CardDragPreview } from "./CardDragPreview-ikSG4M46.mjs";
12
+ import { styled } from "styled-components";
13
+ import { C as CardDragPreview } from "./CardDragPreview-DOxamsuj.mjs";
15
14
  import { u as useDragAndDrop, I as ItemTypes } from "./useDragAndDrop-DdHgKsqq.mjs";
16
15
  import * as yup from "yup";
17
16
  import { F as FieldTypeIcon } from "./FieldTypeIcon-CMlNO8PE.mjs";
18
17
  const Header = ({ name }) => {
19
18
  const { formatMessage } = useIntl();
19
+ const params = useParams();
20
20
  const modified = useForm("Header", (state) => state.modified);
21
21
  const isSubmitting = useForm("Header", (state) => state.isSubmitting);
22
22
  return /* @__PURE__ */ jsx(
23
23
  Layouts.Header,
24
24
  {
25
- navigationAction: /* @__PURE__ */ jsx(BackButton, {}),
25
+ navigationAction: /* @__PURE__ */ jsx(BackButton, { fallback: `../${COLLECTION_TYPES}/${params.slug}` }),
26
26
  primaryAction: /* @__PURE__ */ jsx(Button, { size: "S", disabled: !modified, type: "submit", loading: isSubmitting, children: formatMessage({ id: "global.save", defaultMessage: "Save" }) }),
27
27
  subtitle: formatMessage({
28
28
  id: getTranslation("components.SettingsViewWrapper.pluginHeader.description.list-settings"),
@@ -99,12 +99,12 @@ const Settings = () => {
99
99
  [formatMessage, sortOptionsSorted]
100
100
  );
101
101
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
102
- /* @__PURE__ */ jsx(Typography, { variant: "delta", as: "h2", children: formatMessage({
102
+ /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "h2", children: formatMessage({
103
103
  id: getTranslation("containers.SettingPage.settings"),
104
104
  defaultMessage: "Settings"
105
105
  }) }),
106
- /* @__PURE__ */ jsx(Grid, { gap: 4, children: formLayout.map(
107
- (row) => row.map(({ size, ...field }) => /* @__PURE__ */ jsx(GridItem, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name))
106
+ /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: formLayout.map(
107
+ (row) => row.map(({ size, ...field }) => /* @__PURE__ */ jsx(Grid.Item, { s: 12, col: size, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name))
108
108
  ) }, "bottom")
109
109
  ] });
110
110
  };
@@ -182,7 +182,6 @@ const FIELD_SCHEMA = yup.object().shape({
182
182
  const EditFieldForm = ({ attribute, name, onClose }) => {
183
183
  const { formatMessage } = useIntl();
184
184
  const { toggleNotification } = useNotification();
185
- const id = useId();
186
185
  const { value, onChange } = useField(name);
187
186
  if (!value) {
188
187
  console.error(
@@ -201,7 +200,7 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
201
200
  if ("relation" in attribute && ["oneWay", "oneToOne", "manyToOne"].includes(attribute.relation)) {
202
201
  shouldDisplaySortToggle = true;
203
202
  }
204
- return /* @__PURE__ */ jsx(ModalLayout, { onClose, labelledBy: id, children: /* @__PURE__ */ jsxs(
203
+ return /* @__PURE__ */ jsx(Modal.Content, { children: /* @__PURE__ */ jsxs(
205
204
  Form,
206
205
  {
207
206
  method: "PUT",
@@ -212,9 +211,9 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
212
211
  onClose();
213
212
  },
214
213
  children: [
215
- /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs(HeaderContainer, { children: [
214
+ /* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsxs(HeaderContainer, { children: [
216
215
  /* @__PURE__ */ jsx(FieldTypeIcon, { type: attribute.type }),
217
- /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", textColor: "neutral800", as: "h2", id, children: formatMessage(
216
+ /* @__PURE__ */ jsx(Modal.Title, { children: formatMessage(
218
217
  {
219
218
  id: getTranslation("containers.list-settings.modal-form.label"),
220
219
  defaultMessage: "Edit {fieldName}"
@@ -222,7 +221,7 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
222
221
  { fieldName: capitalise(value.label) }
223
222
  ) })
224
223
  ] }) }),
225
- /* @__PURE__ */ jsx(ModalBody, { children: /* @__PURE__ */ jsx(Grid, { gap: 4, children: [
224
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: [
226
225
  {
227
226
  name: "label",
228
227
  label: formatMessage({
@@ -247,14 +246,21 @@ const EditFieldForm = ({ attribute, name, onClose }) => {
247
246
  }
248
247
  ].filter(
249
248
  (field) => field.name !== "sortable" || field.name === "sortable" && shouldDisplaySortToggle
250
- ).map(({ size, ...field }) => /* @__PURE__ */ jsx(GridItem, { s: 12, col: size, children: /* @__PURE__ */ jsx(InputRenderer, { ...field }) }, field.name)) }) }),
251
- /* @__PURE__ */ jsx(
252
- ModalFooter,
249
+ ).map(({ size, ...field }) => /* @__PURE__ */ jsx(
250
+ Grid.Item,
253
251
  {
254
- startActions: /* @__PURE__ */ jsx(Button, { onClick: onClose, variant: "tertiary", children: formatMessage({ id: "app.components.Button.cancel", defaultMessage: "Cancel" }) }),
255
- endActions: /* @__PURE__ */ jsx(Button, { type: "submit", children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
256
- }
257
- )
252
+ s: 12,
253
+ col: size,
254
+ direction: "column",
255
+ alignItems: "stretch",
256
+ children: /* @__PURE__ */ jsx(InputRenderer, { ...field })
257
+ },
258
+ field.name
259
+ )) }) }),
260
+ /* @__PURE__ */ jsxs(Modal.Footer, { children: [
261
+ /* @__PURE__ */ jsx(Button, { onClick: onClose, variant: "tertiary", children: formatMessage({ id: "app.components.Button.cancel", defaultMessage: "Cancel" }) }),
262
+ /* @__PURE__ */ jsx(Button, { type: "submit", children: formatMessage({ id: "global.finish", defaultMessage: "Finish" }) })
263
+ ] })
258
264
  ]
259
265
  }
260
266
  ) });
@@ -298,8 +304,11 @@ const DraggableCard = ({
298
304
  forceRerenderAfterDnd((prev) => !prev);
299
305
  }
300
306
  }, [isDraggingSibling]);
301
- const composedRefs = useComposedRefs(dragRef, objectRef);
302
- return /* @__PURE__ */ jsxs(FieldWrapper, { ref: dropRef, children: [
307
+ const composedRefs = useComposedRefs(
308
+ dropRef,
309
+ objectRef
310
+ );
311
+ return /* @__PURE__ */ jsxs(FieldWrapper, { ref: composedRefs, children: [
303
312
  isDragging && /* @__PURE__ */ jsx(CardDragPreview, { label }),
304
313
  !isDragging && isDraggingSibling && /* @__PURE__ */ jsx(CardDragPreview, { isSibling: true, label }),
305
314
  !isDragging && !isDraggingSibling && /* @__PURE__ */ jsxs(
@@ -315,7 +324,7 @@ const DraggableCard = ({
315
324
  /* @__PURE__ */ jsx(
316
325
  DragButton,
317
326
  {
318
- as: "span",
327
+ ref: dragRef,
319
328
  "aria-label": formatMessage(
320
329
  {
321
330
  id: getTranslation("components.DraggableCard.move.field"),
@@ -324,31 +333,41 @@ const DraggableCard = ({
324
333
  { item: label }
325
334
  ),
326
335
  onClick: (e) => e.stopPropagation(),
327
- ref: composedRefs,
328
336
  children: /* @__PURE__ */ jsx(Drag, {})
329
337
  }
330
338
  ),
331
339
  /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: label })
332
340
  ] }),
333
- /* @__PURE__ */ jsxs(Flex, { paddingLeft: 3, children: [
334
- /* @__PURE__ */ jsx(
335
- ActionButton,
336
- {
337
- onClick: (e) => {
338
- e.stopPropagation();
339
- setIsModalOpen(true);
340
- },
341
- "aria-label": formatMessage(
342
- {
343
- id: getTranslation("components.DraggableCard.edit.field"),
344
- defaultMessage: "Edit {item}"
341
+ /* @__PURE__ */ jsxs(Flex, { paddingLeft: 3, onClick: (e) => e.stopPropagation(), children: [
342
+ /* @__PURE__ */ jsxs(Modal.Root, { open: isModalOpen, onOpenChange: setIsModalOpen, children: [
343
+ /* @__PURE__ */ jsx(Modal.Trigger, { children: /* @__PURE__ */ jsx(
344
+ ActionButton,
345
+ {
346
+ onClick: (e) => {
347
+ e.stopPropagation();
345
348
  },
346
- { item: label }
347
- ),
348
- type: "button",
349
- children: /* @__PURE__ */ jsx(Pencil, { width: "1.2rem", height: "1.2rem" })
350
- }
351
- ),
349
+ "aria-label": formatMessage(
350
+ {
351
+ id: getTranslation("components.DraggableCard.edit.field"),
352
+ defaultMessage: "Edit {item}"
353
+ },
354
+ { item: label }
355
+ ),
356
+ type: "button",
357
+ children: /* @__PURE__ */ jsx(Pencil, { width: "1.2rem", height: "1.2rem" })
358
+ }
359
+ ) }),
360
+ /* @__PURE__ */ jsx(
361
+ EditFieldForm,
362
+ {
363
+ attribute,
364
+ name: `layout.${index}`,
365
+ onClose: () => {
366
+ setIsModalOpen(false);
367
+ }
368
+ }
369
+ )
370
+ ] }),
352
371
  /* @__PURE__ */ jsx(
353
372
  ActionButton,
354
373
  {
@@ -368,14 +387,6 @@ const DraggableCard = ({
368
387
  ] })
369
388
  ]
370
389
  }
371
- ),
372
- isModalOpen && /* @__PURE__ */ jsx(
373
- EditFieldForm,
374
- {
375
- attribute,
376
- name: `layout.${index}`,
377
- onClose: () => setIsModalOpen(false)
378
- }
379
390
  )
380
391
  ] });
381
392
  };
@@ -460,7 +471,7 @@ const SortDisplayedFields = () => {
460
471
  }
461
472
  }, [lastAction]);
462
473
  return /* @__PURE__ */ jsxs(Flex, { alignItems: "stretch", direction: "column", gap: 4, children: [
463
- /* @__PURE__ */ jsx(Typography, { variant: "delta", as: "h2", children: formatMessage({
474
+ /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "h2", children: formatMessage({
464
475
  id: getTranslation("containers.SettingPage.view"),
465
476
  defaultMessage: "View"
466
477
  }) }),
@@ -490,7 +501,7 @@ const SortDisplayedFields = () => {
490
501
  disabled: nonDisplayedFields.length === 0,
491
502
  variant: "tertiary",
492
503
  children: [
493
- /* @__PURE__ */ jsx(VisuallyHidden, { as: "span", children: formatMessage({
504
+ /* @__PURE__ */ jsx(VisuallyHidden, { tag: "span", children: formatMessage({
494
505
  id: getTranslation("components.FieldSelect.label"),
495
506
  defaultMessage: "Add a field"
496
507
  }) }),
@@ -619,4 +630,4 @@ export {
619
630
  ListConfiguration,
620
631
  ProtectedListConfiguration
621
632
  };
622
- //# sourceMappingURL=ListConfigurationPage-DhwvYcNv.mjs.map
633
+ //# sourceMappingURL=ListConfigurationPage-0mtv_iqk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListConfigurationPage-0mtv_iqk.mjs","sources":["../../admin/src/pages/ListConfiguration/components/Header.tsx","../../admin/src/pages/ListConfiguration/components/Settings.tsx","../../admin/src/pages/ListConfiguration/components/EditFieldForm.tsx","../../admin/src/pages/ListConfiguration/components/DraggableCard.tsx","../../admin/src/pages/ListConfiguration/components/SortDisplayedFields.tsx","../../admin/src/pages/ListConfiguration/ListConfigurationPage.tsx"],"sourcesContent":["import { useForm, BackButton, Layouts } from '@strapi/admin/strapi-admin';\nimport { Button } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { useParams } from 'react-router-dom';\n\nimport { COLLECTION_TYPES } from '../../../constants/collections';\nimport { capitalise } from '../../../utils/strings';\nimport { getTranslation } from '../../../utils/translations';\n\ninterface HeaderProps {\n collectionType: string;\n name: string;\n model: string;\n}\n\nconst Header = ({ name }: HeaderProps) => {\n const { formatMessage } = useIntl();\n const params = useParams<{ slug: string }>();\n\n const modified = useForm('Header', (state) => state.modified);\n const isSubmitting = useForm('Header', (state) => state.isSubmitting);\n\n return (\n <Layouts.Header\n navigationAction={<BackButton fallback={`../${COLLECTION_TYPES}/${params.slug}`} />}\n primaryAction={\n <Button size=\"S\" disabled={!modified} type=\"submit\" loading={isSubmitting}>\n {formatMessage({ id: 'global.save', defaultMessage: 'Save' })}\n </Button>\n }\n subtitle={formatMessage({\n id: getTranslation('components.SettingsViewWrapper.pluginHeader.description.list-settings'),\n defaultMessage: 'Define the settings of the list view.',\n })}\n title={formatMessage(\n {\n id: getTranslation('components.SettingsViewWrapper.pluginHeader.title'),\n defaultMessage: 'Configure the view - {name}',\n },\n { name: capitalise(name) }\n )}\n />\n );\n};\n\nexport { Header };\nexport type { HeaderProps };\n","import * as React from 'react';\n\nimport { useForm, InputRenderer, type InputProps } from '@strapi/admin/strapi-admin';\nimport { Flex, Grid, Typography, useCollator } from '@strapi/design-system';\nimport { type MessageDescriptor, useIntl } from 'react-intl';\n\nimport { useDoc } from '../../../hooks/useDocument';\nimport { type EditFieldLayout } from '../../../hooks/useDocumentLayout';\nimport { getTranslation } from '../../../utils/translations';\nimport { type FormData } from '../ListConfigurationPage';\n\nimport type { DistributiveOmit } from 'react-redux';\n\nexport type InputPropsWithMessageDescriptors = DistributiveOmit<\n InputProps,\n 'hint' | 'label' | 'placeholder'\n> & {\n hint?: MessageDescriptor;\n label: MessageDescriptor;\n placeholder?: MessageDescriptor;\n};\n\n/**\n * @internal\n * @description Form inputs are always displayed in a grid, so we need\n * to use the size property to determine how many columns the input should\n * take up.\n */\nexport type FormLayoutInputProps = InputPropsWithMessageDescriptors & { size: number };\n\nconst EXCLUDED_SORT_ATTRIBUTE_TYPES = [\n 'media',\n 'richtext',\n 'dynamiczone',\n 'relation',\n 'component',\n 'json',\n 'blocks',\n];\n\ninterface SortOption {\n value: string;\n label: string;\n}\n\nconst Settings = () => {\n const { formatMessage, locale } = useIntl();\n const formatter = useCollator(locale, {\n sensitivity: 'base',\n });\n const { schema } = useDoc();\n\n const layout = useForm<FormData['layout']>('Settings', (state) => state.values.layout ?? []);\n const currentSortBy = useForm<FormData['settings']['defaultSortBy']>(\n 'Settings',\n (state) => state.values.settings.defaultSortBy\n );\n const onChange = useForm('Settings', (state) => state.onChange);\n\n const sortOptions = React.useMemo(\n () =>\n Object.values(layout).reduce<SortOption[]>((acc, field) => {\n if (schema && !EXCLUDED_SORT_ATTRIBUTE_TYPES.includes(schema.attributes[field.name].type)) {\n acc.push({\n value: field.name,\n label: typeof field.label !== 'string' ? formatMessage(field.label) : field.label,\n });\n }\n\n return acc;\n }, []),\n [formatMessage, layout, schema]\n );\n\n const sortOptionsSorted = sortOptions.sort((a, b) => formatter.compare(a.label, b.label));\n\n React.useEffect(() => {\n if (sortOptionsSorted.findIndex((opt) => opt.value === currentSortBy) === -1) {\n onChange('settings.defaultSortBy', sortOptionsSorted[0]?.value);\n }\n }, [currentSortBy, onChange, sortOptionsSorted]);\n\n const formLayout = React.useMemo(\n () =>\n SETTINGS_FORM_LAYOUT.map((row) =>\n row.map((field) => {\n if (field.type === 'enumeration') {\n return {\n ...field,\n hint: field.hint ? formatMessage(field.hint) : undefined,\n label: formatMessage(field.label),\n options: field.name === 'settings.defaultSortBy' ? sortOptionsSorted : field.options,\n };\n } else {\n return {\n ...field,\n hint: field.hint ? formatMessage(field.hint) : undefined,\n label: formatMessage(field.label),\n };\n }\n })\n ) as [top: EditFieldLayout[], bottom: EditFieldLayout[]],\n [formatMessage, sortOptionsSorted]\n );\n\n return (\n <Flex direction=\"column\" alignItems=\"stretch\" gap={4}>\n <Typography variant=\"delta\" tag=\"h2\">\n {formatMessage({\n id: getTranslation('containers.SettingPage.settings'),\n defaultMessage: 'Settings',\n })}\n </Typography>\n <Grid.Root key=\"bottom\" gap={4}>\n {formLayout.map((row) =>\n row.map(({ size, ...field }) => (\n <Grid.Item key={field.name} s={12} col={size} direction=\"column\" alignItems=\"stretch\">\n {/* @ts-expect-error – issue with EnumerationProps conflicting with InputProps */}\n <InputRenderer {...field} />\n </Grid.Item>\n ))\n )}\n </Grid.Root>\n </Flex>\n );\n};\n\nconst SETTINGS_FORM_LAYOUT: FormLayoutInputProps[][] = [\n [\n {\n label: {\n id: getTranslation('form.Input.search'),\n defaultMessage: 'Enable search',\n },\n name: 'settings.searchable',\n size: 4,\n type: 'boolean' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.filters'),\n defaultMessage: 'Enable filters',\n },\n name: 'settings.filterable',\n size: 4,\n type: 'boolean' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.bulkActions'),\n defaultMessage: 'Enable bulk actions',\n },\n name: 'settings.bulkable',\n size: 4,\n type: 'boolean' as const,\n },\n ],\n [\n {\n hint: {\n id: getTranslation('form.Input.pageEntries.inputDescription'),\n defaultMessage: 'Note: You can override this value in the Collection Type settings page.',\n },\n label: {\n id: getTranslation('form.Input.pageEntries'),\n defaultMessage: 'Entries per page',\n },\n name: 'settings.pageSize',\n options: ['10', '20', '50', '100'].map((value) => ({ value, label: value })),\n size: 6,\n type: 'enumeration' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.defaultSort'),\n defaultMessage: 'Default sort attribute',\n },\n name: 'settings.defaultSortBy',\n options: [],\n size: 3,\n type: 'enumeration' as const,\n },\n {\n label: {\n id: getTranslation('form.Input.sort.order'),\n defaultMessage: 'Default sort order',\n },\n name: 'settings.defaultSortOrder',\n options: ['ASC', 'DESC'].map((value) => ({ value, label: value })),\n size: 3,\n type: 'enumeration' as const,\n },\n ],\n];\n\nexport { Settings };\n","import { Form, useField, InputRenderer, useNotification } from '@strapi/admin/strapi-admin';\nimport { Button, Flex, FlexComponent, Grid, Modal } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\nimport * as yup from 'yup';\n\nimport { FieldTypeIcon } from '../../../components/FieldTypeIcon';\nimport { capitalise } from '../../../utils/strings';\nimport { getTranslation } from '../../../utils/translations';\n\nimport type { ListFieldLayout } from '../../../hooks/useDocumentLayout';\nimport type { FormData } from '../ListConfigurationPage';\n\ninterface EditFieldFormProps extends Pick<ListFieldLayout, 'attribute'> {\n name: string;\n onClose: () => void;\n}\n\nconst FIELD_SCHEMA = yup.object().shape({\n label: yup.string().required(),\n sortable: yup.boolean(),\n});\n\nconst EditFieldForm = ({ attribute, name, onClose }: EditFieldFormProps) => {\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n\n const { value, onChange } = useField<FormData['layout'][number]>(name);\n\n if (!value) {\n // This is very unlikely to happen, but it ensures the form is not opened without a value.\n console.error(\n \"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.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.containers.list-settings.modal-form.error',\n defaultMessage: 'An error occurred while trying to open the form.',\n }),\n type: 'danger',\n });\n\n return null;\n }\n\n let shouldDisplaySortToggle = !['media', 'relation'].includes(attribute.type);\n\n if ('relation' in attribute && ['oneWay', 'oneToOne', 'manyToOne'].includes(attribute.relation)) {\n shouldDisplaySortToggle = true;\n }\n\n return (\n <Modal.Content>\n <Form\n method=\"PUT\"\n initialValues={value}\n validationSchema={FIELD_SCHEMA}\n onSubmit={(data) => {\n onChange(name, data);\n onClose();\n }}\n >\n <Modal.Header>\n <HeaderContainer>\n {/* @ts-expect-error attribute.type === custom does not work here */}\n <FieldTypeIcon type={attribute.type} />\n <Modal.Title>\n {formatMessage(\n {\n id: getTranslation('containers.list-settings.modal-form.label'),\n defaultMessage: 'Edit {fieldName}',\n },\n { fieldName: capitalise(value.label) }\n )}\n </Modal.Title>\n </HeaderContainer>\n </Modal.Header>\n <Modal.Body>\n <Grid.Root gap={4}>\n {[\n {\n name: 'label',\n label: formatMessage({\n id: getTranslation('form.Input.label'),\n defaultMessage: 'Label',\n }),\n hint: formatMessage({\n id: getTranslation('form.Input.label.inputDescription'),\n defaultMessage: \"This value overrides the label displayed in the table's head\",\n }),\n size: 6,\n type: 'string' as const,\n },\n {\n label: formatMessage({\n id: getTranslation('form.Input.sort.field'),\n defaultMessage: 'Enable sort on this field',\n }),\n name: 'sortable',\n size: 6,\n type: 'boolean' as const,\n },\n ]\n .filter(\n (field) =>\n field.name !== 'sortable' ||\n (field.name === 'sortable' && shouldDisplaySortToggle)\n )\n .map(({ size, ...field }) => (\n <Grid.Item\n key={field.name}\n s={12}\n col={size}\n direction=\"column\"\n alignItems=\"stretch\"\n >\n <InputRenderer {...field} />\n </Grid.Item>\n ))}\n </Grid.Root>\n </Modal.Body>\n <Modal.Footer>\n <Button onClick={onClose} variant=\"tertiary\">\n {formatMessage({ id: 'app.components.Button.cancel', defaultMessage: 'Cancel' })}\n </Button>\n <Button type=\"submit\">\n {formatMessage({ id: 'global.finish', defaultMessage: 'Finish' })}\n </Button>\n </Modal.Footer>\n </Form>\n </Modal.Content>\n );\n};\n\nconst HeaderContainer = styled<FlexComponent>(Flex)`\n svg {\n width: 3.2rem;\n margin-right: ${({ theme }) => theme.spaces[3]};\n }\n`;\n\nexport { EditFieldForm };\nexport type { EditFieldFormProps };\n","import * as React from 'react';\n\nimport {\n Box,\n BoxComponent,\n Flex,\n FlexComponent,\n Modal,\n Typography,\n useComposedRefs,\n} from '@strapi/design-system';\nimport { Cross, Drag, Pencil } from '@strapi/icons';\nimport { getEmptyImage } from 'react-dnd-html5-backend';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { CardDragPreview } from '../../../components/DragPreviews/CardDragPreview';\nimport { ItemTypes } from '../../../constants/dragAndDrop';\nimport { useDragAndDrop } from '../../../hooks/useDragAndDrop';\nimport { getTranslation } from '../../../utils/translations';\n\nimport { EditFieldForm } from './EditFieldForm';\n\nimport type { ListFieldLayout } from '../../../hooks/useDocumentLayout';\n\ntype DraggableCardProps = Omit<ListFieldLayout, 'label'> & {\n label: string;\n index: number;\n isDraggingSibling: boolean;\n onMoveField: (dragIndex: number, hoverIndex: number) => void;\n onRemoveField: () => void;\n setIsDraggingSibling: (isDragging: boolean) => void;\n};\n\nconst DraggableCard = ({\n attribute,\n index,\n isDraggingSibling,\n label,\n name,\n onMoveField,\n onRemoveField,\n setIsDraggingSibling,\n}: DraggableCardProps) => {\n const [isModalOpen, setIsModalOpen] = React.useState(false);\n const { formatMessage } = useIntl();\n const [, forceRerenderAfterDnd] = React.useState(false);\n\n const [{ isDragging }, objectRef, dropRef, dragRef, dragPreviewRef] = useDragAndDrop(true, {\n type: ItemTypes.FIELD,\n item: { index, label, name },\n index,\n onMoveItem: onMoveField,\n onEnd: () => setIsDraggingSibling(false),\n });\n\n React.useEffect(() => {\n dragPreviewRef(getEmptyImage(), { captureDraggingState: false });\n }, [dragPreviewRef]);\n\n React.useEffect(() => {\n if (isDragging) {\n setIsDraggingSibling(true);\n }\n }, [isDragging, setIsDraggingSibling]);\n\n // Effect in order to force a rerender after reordering the components\n // Since we are removing the Accordion when doing the DnD we are losing the dragRef, therefore the replaced element cannot be dragged\n // anymore, this hack forces a rerender in order to apply the dragRef\n React.useEffect(() => {\n if (!isDraggingSibling) {\n forceRerenderAfterDnd((prev) => !prev);\n }\n }, [isDraggingSibling]);\n\n const composedRefs = useComposedRefs<HTMLButtonElement>(\n dropRef,\n objectRef as React.RefObject<HTMLButtonElement>\n );\n\n return (\n <FieldWrapper ref={composedRefs}>\n {isDragging && <CardDragPreview label={label} />}\n {!isDragging && isDraggingSibling && <CardDragPreview isSibling label={label} />}\n\n {!isDragging && !isDraggingSibling && (\n <FieldContainer\n borderColor=\"neutral150\"\n background=\"neutral100\"\n hasRadius\n justifyContent=\"space-between\"\n onClick={() => setIsModalOpen(true)}\n >\n <Flex gap={3}>\n <DragButton\n ref={dragRef}\n aria-label={formatMessage(\n {\n id: getTranslation('components.DraggableCard.move.field'),\n defaultMessage: 'Move {item}',\n },\n { item: label }\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Drag />\n </DragButton>\n <Typography fontWeight=\"bold\">{label}</Typography>\n </Flex>\n <Flex paddingLeft={3} onClick={(e) => e.stopPropagation()}>\n <Modal.Root open={isModalOpen} onOpenChange={setIsModalOpen}>\n <Modal.Trigger>\n <ActionButton\n onClick={(e) => {\n e.stopPropagation();\n }}\n aria-label={formatMessage(\n {\n id: getTranslation('components.DraggableCard.edit.field'),\n defaultMessage: 'Edit {item}',\n },\n { item: label }\n )}\n type=\"button\"\n >\n <Pencil width=\"1.2rem\" height=\"1.2rem\" />\n </ActionButton>\n </Modal.Trigger>\n <EditFieldForm\n attribute={attribute}\n name={`layout.${index}`}\n onClose={() => {\n setIsModalOpen(false);\n }}\n />\n </Modal.Root>\n <ActionButton\n onClick={onRemoveField}\n data-testid={`delete-${name}`}\n aria-label={formatMessage(\n {\n id: getTranslation('components.DraggableCard.delete.field'),\n defaultMessage: 'Delete {item}',\n },\n { item: label }\n )}\n type=\"button\"\n >\n <Cross width=\"1.2rem\" height=\"1.2rem\" />\n </ActionButton>\n </Flex>\n </FieldContainer>\n )}\n </FieldWrapper>\n );\n};\n\nconst ActionButton = styled.button`\n display: flex;\n align-items: center;\n height: ${({ theme }) => theme.spaces[7]};\n color: ${({ theme }) => theme.colors.neutral600};\n\n &:hover {\n color: ${({ theme }) => theme.colors.neutral700};\n }\n\n &:last-child {\n padding: 0 ${({ theme }) => theme.spaces[3]};\n }\n`;\n\nconst DragButton = styled(ActionButton)`\n padding: 0 ${({ theme }) => theme.spaces[3]};\n border-right: 1px solid ${({ theme }) => theme.colors.neutral150};\n cursor: all-scroll;\n`;\n\nconst FieldContainer = styled<FlexComponent>(Flex)`\n max-height: 3.2rem;\n cursor: pointer;\n`;\n\nconst FieldWrapper = styled<BoxComponent>(Box)`\n &:last-child {\n padding-right: ${({ theme }) => theme.spaces[3]};\n }\n`;\n\nexport { DraggableCard };\nexport type { DraggableCardProps };\n","import * as React from 'react';\n\nimport { useForm } from '@strapi/admin/strapi-admin';\nimport { Box, Flex, VisuallyHidden, Typography, Menu } from '@strapi/design-system';\nimport { Plus } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { useDoc } from '../../../hooks/useDocument';\nimport { useGetContentTypeConfigurationQuery } from '../../../services/contentTypes';\nimport { checkIfAttributeIsDisplayable } from '../../../utils/attributes';\nimport { getTranslation } from '../../../utils/translations';\n\nimport { DraggableCard, DraggableCardProps } from './DraggableCard';\n\nimport type { ListLayout } from '../../../hooks/useDocumentLayout';\nimport type { FormData } from '../ListConfigurationPage';\n\ninterface SortDisplayedFieldsProps extends Pick<ListLayout, 'layout'> {}\n\nconst SortDisplayedFields = () => {\n const { formatMessage } = useIntl();\n const { model, schema } = useDoc();\n const [isDraggingSibling, setIsDraggingSibling] = React.useState(false);\n const [lastAction, setLastAction] = React.useState<string | null>(null);\n const scrollableContainerRef = React.useRef<HTMLDivElement>(null);\n\n const values = useForm<FormData['layout']>(\n 'SortDisplayedFields',\n (state) => state.values.layout ?? []\n );\n const addFieldRow = useForm('SortDisplayedFields', (state) => state.addFieldRow);\n const removeFieldRow = useForm('SortDisplayedFields', (state) => state.removeFieldRow);\n const moveFieldRow = useForm('SortDisplayedFields', (state) => state.moveFieldRow);\n\n const { metadata: allMetadata } = useGetContentTypeConfigurationQuery(model, {\n selectFromResult: ({ data }) => ({ metadata: data?.contentType.metadatas ?? {} }),\n });\n\n /**\n * This is our list of fields that are not displayed in the current layout\n * so we create their default state to be added to the layout.\n */\n const nonDisplayedFields = React.useMemo(() => {\n if (!schema) {\n return [];\n }\n\n const displayedFieldNames = values.map((field) => field.name);\n\n return Object.entries(schema.attributes).reduce<Array<FormData['layout'][number]>>(\n (acc, [name, attribute]) => {\n if (!displayedFieldNames.includes(name) && checkIfAttributeIsDisplayable(attribute)) {\n const { list: metadata } = allMetadata[name];\n\n acc.push({\n name,\n label: metadata.label || name,\n sortable: metadata.sortable,\n });\n }\n\n return acc;\n },\n []\n );\n }, [allMetadata, values, schema]);\n\n const handleAddField = (field: FormData['layout'][number]) => {\n setLastAction('add');\n addFieldRow('layout', field);\n };\n\n const handleRemoveField = (index: number) => {\n setLastAction('remove');\n removeFieldRow('layout', index);\n };\n\n const handleMoveField: DraggableCardProps['onMoveField'] = (dragIndex, hoverIndex) => {\n moveFieldRow('layout', dragIndex, hoverIndex);\n };\n\n React.useEffect(() => {\n if (lastAction === 'add' && scrollableContainerRef?.current) {\n scrollableContainerRef.current.scrollLeft = scrollableContainerRef.current.scrollWidth;\n }\n }, [lastAction]);\n\n return (\n <Flex alignItems=\"stretch\" direction=\"column\" gap={4}>\n <Typography variant=\"delta\" tag=\"h2\">\n {formatMessage({\n id: getTranslation('containers.SettingPage.view'),\n defaultMessage: 'View',\n })}\n </Typography>\n\n <Flex padding={4} borderColor=\"neutral300\" borderStyle=\"dashed\" borderWidth=\"1px\" hasRadius>\n <Box flex=\"1\" overflow=\"auto hidden\" ref={scrollableContainerRef}>\n <Flex gap={3}>\n {values.map((field, index) => (\n <DraggableCard\n key={field.name}\n index={index}\n isDraggingSibling={isDraggingSibling}\n onMoveField={handleMoveField}\n onRemoveField={() => handleRemoveField(index)}\n setIsDraggingSibling={setIsDraggingSibling}\n {...field}\n attribute={schema!.attributes[field.name]}\n label={typeof field.label === 'object' ? formatMessage(field.label) : field.label}\n />\n ))}\n </Flex>\n </Box>\n\n <Menu.Root>\n <Menu.Trigger\n paddingLeft={2}\n paddingRight={2}\n justifyContent=\"center\"\n endIcon={null}\n disabled={nonDisplayedFields.length === 0}\n variant=\"tertiary\"\n >\n <VisuallyHidden tag=\"span\">\n {formatMessage({\n id: getTranslation('components.FieldSelect.label'),\n defaultMessage: 'Add a field',\n })}\n </VisuallyHidden>\n <Plus aria-hidden focusable={false} style={{ position: 'relative', top: 2 }} />\n </Menu.Trigger>\n <Menu.Content>\n {nonDisplayedFields.map((field) => (\n <Menu.Item key={field.name} onSelect={() => handleAddField(field)}>\n {typeof field.label === 'object' ? formatMessage(field.label) : field.label}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Root>\n </Flex>\n </Flex>\n );\n};\n\nexport { SortDisplayedFields };\nexport type { SortDisplayedFieldsProps };\n","import * as React from 'react';\n\nimport {\n Form,\n type FormProps,\n useNotification,\n useTracking,\n useAPIErrorHandler,\n Page,\n Layouts,\n} from '@strapi/admin/strapi-admin';\nimport { Divider, Flex, Main } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { Navigate } from 'react-router-dom';\n\nimport { SINGLE_TYPES } from '../../constants/collections';\nimport { useDoc } from '../../hooks/useDocument';\nimport { ListFieldLayout, ListLayout, useDocLayout } from '../../hooks/useDocumentLayout';\nimport { useTypedSelector } from '../../modules/hooks';\nimport { useUpdateContentTypeConfigurationMutation } from '../../services/contentTypes';\nimport { setIn } from '../../utils/objects';\n\nimport { Header } from './components/Header';\nimport { Settings } from './components/Settings';\nimport { SortDisplayedFields } from './components/SortDisplayedFields';\n\nimport type { Metadatas } from '../../../../shared/contracts/content-types';\n\ninterface FormData extends Pick<ListLayout, 'settings'> {\n layout: Array<Pick<ListFieldLayout, 'sortable' | 'name'> & { label: string }>;\n}\n\nconst ListConfiguration = () => {\n const { formatMessage } = useIntl();\n const { trackUsage } = useTracking();\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const { model, collectionType } = useDoc();\n\n const { isLoading: isLoadingLayout, list, edit } = useDocLayout();\n\n const [updateContentTypeConfiguration] = useUpdateContentTypeConfigurationMutation();\n const handleSubmit: FormProps<FormData>['onSubmit'] = async (data) => {\n try {\n trackUsage('willSaveContentTypeLayout');\n const layoutData = data.layout ?? [];\n /**\n * We reconstruct the metadatas object by taking the existing edit metadatas\n * and re-merging that by attribute name with the current list metadatas, whilst overwriting\n * the data from the form we've built.\n */\n const meta = Object.entries(edit.metadatas).reduce<Metadatas>((acc, [name, editMeta]) => {\n const { mainField: _mainField, ...listMeta } = list.metadatas[name];\n\n const { label, sortable } = layoutData.find((field) => field.name === name) ?? {};\n\n acc[name] = {\n edit: editMeta,\n list: {\n ...listMeta,\n label: label || listMeta.label,\n sortable: sortable || listMeta.sortable,\n },\n };\n\n return acc;\n }, {});\n\n const res = await updateContentTypeConfiguration({\n layouts: {\n edit: edit.layout.flatMap((panel) =>\n panel.map((row) => row.map(({ name, size }) => ({ name, size })))\n ),\n list: layoutData.map((field) => field.name),\n },\n settings: setIn(data.settings, 'displayName', undefined),\n metadatas: meta,\n uid: model,\n });\n\n if ('data' in res) {\n trackUsage('didEditListSettings');\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'notification.success.saved', defaultMessage: 'Saved' }),\n });\n } else {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n }\n } catch (err) {\n console.error(err);\n toggleNotification({\n type: 'danger',\n message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }),\n });\n }\n };\n\n const initialValues = React.useMemo(() => {\n return {\n layout: list.layout.map(({ label, sortable, name }) => ({\n label: typeof label === 'string' ? label : formatMessage(label),\n sortable,\n name,\n })),\n settings: list.settings,\n } satisfies FormData;\n }, [formatMessage, list.layout, list.settings]);\n\n if (collectionType === SINGLE_TYPES) {\n return <Navigate to={`/single-types/${model}`} />;\n }\n\n if (isLoadingLayout) {\n return <Page.Loading />;\n }\n\n return (\n <Layouts.Root>\n <Page.Title>{`Configure ${list.settings.displayName} List View`}</Page.Title>\n <Main>\n <Form initialValues={initialValues} onSubmit={handleSubmit} method=\"PUT\">\n <Header\n collectionType={collectionType}\n model={model}\n name={list.settings.displayName ?? ''}\n />\n <Layouts.Content>\n <Flex\n alignItems=\"stretch\"\n background=\"neutral0\"\n direction=\"column\"\n gap={6}\n hasRadius\n shadow=\"tableShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingLeft={7}\n paddingRight={7}\n >\n <Settings />\n <Divider />\n <SortDisplayedFields />\n </Flex>\n </Layouts.Content>\n </Form>\n </Main>\n </Layouts.Root>\n );\n};\n\nconst ProtectedListConfiguration = () => {\n const permissions = useTypedSelector(\n (state) => state.admin_app.permissions.contentManager?.collectionTypesConfigurations\n );\n\n return (\n <Page.Protect permissions={permissions}>\n <ListConfiguration />\n </Page.Protect>\n );\n};\n\nexport { ProtectedListConfiguration, ListConfiguration };\nexport type { FormData };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAM,SAAS,CAAC,EAAE,WAAwB;AAClC,QAAA,EAAE,kBAAkB;AAC1B,QAAM,SAAS;AAEf,QAAM,WAAW,QAAQ,UAAU,CAAC,UAAU,MAAM,QAAQ;AAC5D,QAAM,eAAe,QAAQ,UAAU,CAAC,UAAU,MAAM,YAAY;AAGlE,SAAA;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACC,sCAAmB,YAAW,EAAA,UAAU,MAAM,gBAAgB,IAAI,OAAO,IAAI,GAAI,CAAA;AAAA,MACjF,eACG,oBAAA,QAAA,EAAO,MAAK,KAAI,UAAU,CAAC,UAAU,MAAK,UAAS,SAAS,cAC1D,wBAAc,EAAE,IAAI,eAAe,gBAAgB,OAAQ,CAAA,GAC9D;AAAA,MAEF,UAAU,cAAc;AAAA,QACtB,IAAI,eAAe,uEAAuE;AAAA,QAC1F,gBAAgB;AAAA,MAAA,CACjB;AAAA,MACD,OAAO;AAAA,QACL;AAAA,UACE,IAAI,eAAe,mDAAmD;AAAA,UACtE,gBAAgB;AAAA,QAClB;AAAA,QACA,EAAE,MAAM,WAAW,IAAI,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,EAAA;AAGN;ACbA,MAAM,gCAAgC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAOA,MAAM,WAAW,MAAM;AACrB,QAAM,EAAE,eAAe,OAAO,IAAI,QAAQ;AACpC,QAAA,YAAY,YAAY,QAAQ;AAAA,IACpC,aAAa;AAAA,EAAA,CACd;AACK,QAAA,EAAE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