@strapi/content-manager 0.0.0-experimental.e02b4637b3906c6d31048d00600d09a23a0edc3d → 0.0.0-experimental.e0df4d50334a17a1beb3d203bff414fbbff62f7b

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 (491) hide show
  1. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs +80 -0
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  3. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +82 -0
  4. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +1 -0
  5. package/dist/admin/chunks/ComponentConfigurationPage-BN2kOtDm.mjs +277 -0
  6. package/dist/admin/chunks/ComponentConfigurationPage-BN2kOtDm.mjs.map +1 -0
  7. package/dist/admin/chunks/ComponentConfigurationPage-C5H-5L1u.js +299 -0
  8. package/dist/admin/chunks/ComponentConfigurationPage-C5H-5L1u.js.map +1 -0
  9. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs +153 -0
  10. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  11. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +176 -0
  12. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +1 -0
  13. package/dist/admin/chunks/EditConfigurationPage-BExtZuB7.js +181 -0
  14. package/dist/admin/chunks/EditConfigurationPage-BExtZuB7.js.map +1 -0
  15. package/dist/admin/chunks/EditConfigurationPage-tMgOELQG.mjs +159 -0
  16. package/dist/admin/chunks/EditConfigurationPage-tMgOELQG.mjs.map +1 -0
  17. package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs +314 -0
  18. package/dist/admin/chunks/EditViewPage-CYe7wAXF.mjs.map +1 -0
  19. package/dist/admin/chunks/EditViewPage-DFkloeMZ.js +337 -0
  20. package/dist/admin/chunks/EditViewPage-DFkloeMZ.js.map +1 -0
  21. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs +56 -0
  22. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  23. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +58 -0
  24. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +1 -0
  25. package/dist/admin/chunks/Form-DGUP3zQO.js +978 -0
  26. package/dist/admin/chunks/Form-DGUP3zQO.js.map +1 -0
  27. package/dist/admin/chunks/Form-DTO0ZIaB.mjs +955 -0
  28. package/dist/admin/chunks/Form-DTO0ZIaB.mjs.map +1 -0
  29. package/dist/admin/chunks/History-C333pgXF.mjs +1357 -0
  30. package/dist/admin/chunks/History-C333pgXF.mjs.map +1 -0
  31. package/dist/admin/chunks/History-CQznK1pG.js +1380 -0
  32. package/dist/admin/chunks/History-CQznK1pG.js.map +1 -0
  33. package/dist/admin/chunks/Input-BexkC_pp.mjs +7190 -0
  34. package/dist/admin/chunks/Input-BexkC_pp.mjs.map +1 -0
  35. package/dist/admin/chunks/Input-DLJZHw9Y.js +7221 -0
  36. package/dist/admin/chunks/Input-DLJZHw9Y.js.map +1 -0
  37. package/dist/admin/chunks/ListConfigurationPage-71I_stAM.js +819 -0
  38. package/dist/admin/chunks/ListConfigurationPage-71I_stAM.js.map +1 -0
  39. package/dist/admin/chunks/ListConfigurationPage-BX2WR7MI.mjs +796 -0
  40. package/dist/admin/chunks/ListConfigurationPage-BX2WR7MI.mjs.map +1 -0
  41. package/dist/admin/chunks/ListViewPage-BDeT3Dkk.mjs +1133 -0
  42. package/dist/admin/chunks/ListViewPage-BDeT3Dkk.mjs.map +1 -0
  43. package/dist/admin/chunks/ListViewPage-DV3heO4F.js +1155 -0
  44. package/dist/admin/chunks/ListViewPage-DV3heO4F.js.map +1 -0
  45. package/dist/admin/chunks/NoContentTypePage-9JHYpYVX.mjs +58 -0
  46. package/dist/admin/chunks/NoContentTypePage-9JHYpYVX.mjs.map +1 -0
  47. package/dist/admin/chunks/NoContentTypePage-COih9y2J.js +60 -0
  48. package/dist/admin/chunks/NoContentTypePage-COih9y2J.js.map +1 -0
  49. package/dist/admin/chunks/NoPermissionsPage-DGAwRIlN.js +39 -0
  50. package/dist/admin/chunks/NoPermissionsPage-DGAwRIlN.js.map +1 -0
  51. package/dist/admin/chunks/NoPermissionsPage-DTe9I47q.mjs +37 -0
  52. package/dist/admin/chunks/NoPermissionsPage-DTe9I47q.mjs.map +1 -0
  53. package/dist/admin/chunks/Preview-BEq0FXda.mjs +551 -0
  54. package/dist/admin/chunks/Preview-BEq0FXda.mjs.map +1 -0
  55. package/dist/admin/chunks/Preview-CXtc9yEV.js +573 -0
  56. package/dist/admin/chunks/Preview-CXtc9yEV.js.map +1 -0
  57. package/dist/admin/chunks/Relations-o7_hVGyK.js +1318 -0
  58. package/dist/admin/chunks/Relations-o7_hVGyK.js.map +1 -0
  59. package/dist/admin/chunks/Relations-qeZyLDgQ.mjs +1291 -0
  60. package/dist/admin/chunks/Relations-qeZyLDgQ.mjs.map +1 -0
  61. package/dist/admin/chunks/ar-DckYq_WK.mjs +222 -0
  62. package/dist/{_chunks/ar-CCEVvqGG.mjs.map → admin/chunks/ar-DckYq_WK.mjs.map} +1 -1
  63. package/dist/admin/chunks/ar-DeQBSsfl.js +227 -0
  64. package/dist/{_chunks/ru-BT3ybNny.js.map → admin/chunks/ar-DeQBSsfl.js.map} +1 -1
  65. package/dist/admin/chunks/ca-ClDTvatJ.js +202 -0
  66. package/dist/admin/chunks/ca-ClDTvatJ.js.map +1 -0
  67. package/dist/admin/chunks/ca-DviY7mRj.mjs +197 -0
  68. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  69. package/dist/admin/chunks/cs-BJFxwIWj.js +126 -0
  70. package/dist/{_chunks/cs-CkJy6B2v.js.map → admin/chunks/cs-BJFxwIWj.js.map} +1 -1
  71. package/dist/admin/chunks/cs-C7OSYFQ7.mjs +122 -0
  72. package/dist/{_chunks/cs-CM2aBUar.mjs.map → admin/chunks/cs-C7OSYFQ7.mjs.map} +1 -1
  73. package/dist/admin/chunks/de-5QRlDHyR.mjs +195 -0
  74. package/dist/{_chunks/eu-CdALomew.mjs.map → admin/chunks/de-5QRlDHyR.mjs.map} +1 -1
  75. package/dist/admin/chunks/de-CbImAUA5.js +200 -0
  76. package/dist/{_chunks/gu-BRmF601H.js.map → admin/chunks/de-CbImAUA5.js.map} +1 -1
  77. package/dist/admin/chunks/en-C1CjdAtC.js +313 -0
  78. package/dist/{_chunks/en-Bm0D0IWz.js.map → admin/chunks/en-C1CjdAtC.js.map} +1 -1
  79. package/dist/admin/chunks/en-LfhocNG2.mjs +308 -0
  80. package/dist/{_chunks/en-DKV44jRb.mjs.map → admin/chunks/en-LfhocNG2.mjs.map} +1 -1
  81. package/dist/admin/chunks/es-C8vLuvZL.js +197 -0
  82. package/dist/{_chunks/es-EUonQTon.js.map → admin/chunks/es-C8vLuvZL.js.map} +1 -1
  83. package/dist/admin/chunks/es-DkoWSExG.mjs +192 -0
  84. package/dist/{_chunks/ja-CtsUxOvk.mjs.map → admin/chunks/es-DkoWSExG.mjs.map} +1 -1
  85. package/dist/admin/chunks/eu-BG1xX7HK.mjs +198 -0
  86. package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
  87. package/dist/admin/chunks/eu-BJW3AvXu.js +203 -0
  88. package/dist/admin/chunks/eu-BJW3AvXu.js.map +1 -0
  89. package/dist/admin/chunks/fr-CFdRaRVj.mjs +215 -0
  90. package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
  91. package/dist/admin/chunks/fr-gQSilC7w.js +220 -0
  92. package/dist/admin/chunks/fr-gQSilC7w.js.map +1 -0
  93. package/dist/admin/chunks/gu-D5MMMXRs.mjs +196 -0
  94. package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
  95. package/dist/admin/chunks/gu-DPU4wyx7.js +201 -0
  96. package/dist/{_chunks/eu-VDH-3ovk.js.map → admin/chunks/gu-DPU4wyx7.js.map} +1 -1
  97. package/dist/admin/chunks/hi-Dp4omeBb.js +201 -0
  98. package/dist/admin/chunks/hi-Dp4omeBb.js.map +1 -0
  99. package/dist/admin/chunks/hi-lp17SCjr.mjs +196 -0
  100. package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
  101. package/dist/{_chunks/hooks-BAaaKPS_.js → admin/chunks/hooks-D-sOYd1s.js} +6 -3
  102. package/dist/admin/chunks/hooks-D-sOYd1s.js.map +1 -0
  103. package/dist/admin/chunks/hooks-DMvik5y_.mjs +7 -0
  104. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  105. package/dist/admin/chunks/hu-CLka1U2C.mjs +198 -0
  106. package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
  107. package/dist/admin/chunks/hu-CtFJuhTd.js +203 -0
  108. package/dist/admin/chunks/hu-CtFJuhTd.js.map +1 -0
  109. package/dist/admin/chunks/id-D7V5S1rB.js +161 -0
  110. package/dist/{_chunks/it-DkBIs7vD.js.map → admin/chunks/id-D7V5S1rB.js.map} +1 -1
  111. package/dist/admin/chunks/id-USfY9m1g.mjs +156 -0
  112. package/dist/{_chunks/id-BtwA9WJT.mjs.map → admin/chunks/id-USfY9m1g.mjs.map} +1 -1
  113. package/dist/admin/chunks/index-BHimg6jW.js +5417 -0
  114. package/dist/admin/chunks/index-BHimg6jW.js.map +1 -0
  115. package/dist/admin/chunks/index-Cs6qwFQu.mjs +5351 -0
  116. package/dist/admin/chunks/index-Cs6qwFQu.mjs.map +1 -0
  117. package/dist/admin/chunks/it-BAHrwmYS.mjs +158 -0
  118. package/dist/{_chunks/it-BrVPqaf1.mjs.map → admin/chunks/it-BAHrwmYS.mjs.map} +1 -1
  119. package/dist/admin/chunks/it-CQFpa_Dc.js +163 -0
  120. package/dist/{_chunks/ko-woFZPmLk.js.map → admin/chunks/it-CQFpa_Dc.js.map} +1 -1
  121. package/dist/admin/chunks/ja-BWKmBJFT.mjs +192 -0
  122. package/dist/{_chunks/ko-HVQRlfUI.mjs.map → admin/chunks/ja-BWKmBJFT.mjs.map} +1 -1
  123. package/dist/admin/chunks/ja-jdQM-B79.js +197 -0
  124. package/dist/{_chunks/de-CCEmbAah.js.map → admin/chunks/ja-jdQM-B79.js.map} +1 -1
  125. package/dist/admin/chunks/ko-CgADGBNt.mjs +191 -0
  126. package/dist/{_chunks/es-CeXiYflN.mjs.map → admin/chunks/ko-CgADGBNt.mjs.map} +1 -1
  127. package/dist/admin/chunks/ko-k46sEyzt.js +196 -0
  128. package/dist/{_chunks/ja-CcFe8diO.js.map → admin/chunks/ko-k46sEyzt.js.map} +1 -1
  129. package/dist/admin/chunks/layout-DStNia_P.mjs +599 -0
  130. package/dist/admin/chunks/layout-DStNia_P.mjs.map +1 -0
  131. package/dist/admin/chunks/layout-Dtahn4Ue.js +619 -0
  132. package/dist/admin/chunks/layout-Dtahn4Ue.js.map +1 -0
  133. package/dist/admin/chunks/ml-CnhCfOn_.mjs +196 -0
  134. package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
  135. package/dist/admin/chunks/ml-DqxPwODx.js +201 -0
  136. package/dist/admin/chunks/ml-DqxPwODx.js.map +1 -0
  137. package/dist/admin/chunks/ms-Bh09NFff.mjs +140 -0
  138. package/dist/{_chunks/ms-m_WjyWx7.mjs.map → admin/chunks/ms-Bh09NFff.mjs.map} +1 -1
  139. package/dist/admin/chunks/ms-CvSC0OdG.js +145 -0
  140. package/dist/{_chunks/ms-BuFotyP_.js.map → admin/chunks/ms-CvSC0OdG.js.map} +1 -1
  141. package/dist/admin/chunks/nl-BEubhS8C.js +203 -0
  142. package/dist/admin/chunks/nl-BEubhS8C.js.map +1 -0
  143. package/dist/admin/chunks/nl-C8HYflTc.mjs +198 -0
  144. package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
  145. package/dist/admin/chunks/objects-C3EebVVe.js +76 -0
  146. package/dist/admin/chunks/objects-C3EebVVe.js.map +1 -0
  147. package/dist/admin/chunks/objects-wl73iEma.mjs +73 -0
  148. package/dist/admin/chunks/objects-wl73iEma.mjs.map +1 -0
  149. package/dist/admin/chunks/pl-DWhGDzmM.js +200 -0
  150. package/dist/{_chunks/ca-Cmk45QO6.js.map → admin/chunks/pl-DWhGDzmM.js.map} +1 -1
  151. package/dist/admin/chunks/pl-MFCZJZuZ.mjs +195 -0
  152. package/dist/{_chunks/ca-5U32ON2v.mjs.map → admin/chunks/pl-MFCZJZuZ.mjs.map} +1 -1
  153. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +202 -0
  154. package/dist/{_chunks/pt-BR-BiOz37D9.js.map → admin/chunks/pt-BR-CPtAXD-4.js.map} +1 -1
  155. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs +197 -0
  156. package/dist/{_chunks/pt-BR-C71iDxnh.mjs.map → admin/chunks/pt-BR-CcotyBGJ.mjs.map} +1 -1
  157. package/dist/admin/chunks/pt-BoPxN80n.js +96 -0
  158. package/dist/admin/chunks/pt-BoPxN80n.js.map +1 -0
  159. package/dist/admin/chunks/pt-HbmgeiYO.mjs +93 -0
  160. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  161. package/dist/admin/chunks/relations-Cq8NRUto.mjs +173 -0
  162. package/dist/admin/chunks/relations-Cq8NRUto.mjs.map +1 -0
  163. package/dist/admin/chunks/relations-XOYEEqMz.js +178 -0
  164. package/dist/admin/chunks/relations-XOYEEqMz.js.map +1 -0
  165. package/dist/admin/chunks/ru-C0op0ALG.js +232 -0
  166. package/dist/admin/chunks/ru-C0op0ALG.js.map +1 -0
  167. package/dist/admin/chunks/ru-CB4BUyQp.mjs +230 -0
  168. package/dist/{_chunks/ru-BE6A4Exp.mjs.map → admin/chunks/ru-CB4BUyQp.mjs.map} +1 -1
  169. package/dist/admin/chunks/sa-B_FuPyMw.js +201 -0
  170. package/dist/admin/chunks/sa-B_FuPyMw.js.map +1 -0
  171. package/dist/admin/chunks/sa-n_aPA-pU.mjs +196 -0
  172. package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
  173. package/dist/admin/chunks/sk-D_iXML2C.js +203 -0
  174. package/dist/admin/chunks/sk-D_iXML2C.js.map +1 -0
  175. package/dist/admin/chunks/sk-tn_BDjE2.mjs +198 -0
  176. package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
  177. package/dist/admin/chunks/sv-BstBC1Yp.js +203 -0
  178. package/dist/admin/chunks/sv-BstBC1Yp.js.map +1 -0
  179. package/dist/admin/chunks/sv-cq4ZrQRd.mjs +198 -0
  180. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
  181. package/dist/admin/chunks/th-lXoOCqPC.js +149 -0
  182. package/dist/{_chunks/th-D9_GfAjc.js.map → admin/chunks/th-lXoOCqPC.js.map} +1 -1
  183. package/dist/admin/chunks/th-mUH7hEtc.mjs +144 -0
  184. package/dist/{_chunks/th-BqbI8lIT.mjs.map → admin/chunks/th-mUH7hEtc.mjs.map} +1 -1
  185. package/dist/admin/chunks/tr-CkS6sLIE.js +200 -0
  186. package/dist/admin/chunks/tr-CkS6sLIE.js.map +1 -0
  187. package/dist/admin/chunks/tr-Yt38daxh.mjs +195 -0
  188. package/dist/{_chunks/de-C72KDNOl.mjs.map → admin/chunks/tr-Yt38daxh.mjs.map} +1 -1
  189. package/dist/admin/chunks/uk-B24MoTVg.js +145 -0
  190. package/dist/{_chunks/uk-C8EiqJY7.js.map → admin/chunks/uk-B24MoTVg.js.map} +1 -1
  191. package/dist/admin/chunks/uk-Cpgmm7gE.mjs +140 -0
  192. package/dist/{_chunks/uk-CR-zDhAY.mjs.map → admin/chunks/uk-Cpgmm7gE.mjs.map} +1 -1
  193. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs +247 -0
  194. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.mjs.map +1 -0
  195. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js +271 -0
  196. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +1 -0
  197. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs +18 -0
  198. package/dist/admin/chunks/usePrev-Bjw2dhmq.mjs.map +1 -0
  199. package/dist/admin/chunks/usePrev-DIYl-IAL.js +21 -0
  200. package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +1 -0
  201. package/dist/admin/chunks/vi-BGr1X_HZ.js +112 -0
  202. package/dist/{_chunks/vi-CJlYDheJ.js.map → admin/chunks/vi-BGr1X_HZ.js.map} +1 -1
  203. package/dist/admin/chunks/vi-CvBGlTjr.mjs +108 -0
  204. package/dist/{_chunks/vi-DUXIk_fw.mjs.map → admin/chunks/vi-CvBGlTjr.mjs.map} +1 -1
  205. package/dist/admin/chunks/zh-BmF-sHaT.mjs +205 -0
  206. package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
  207. package/dist/admin/chunks/zh-DwFu_Kfj.js +210 -0
  208. package/dist/admin/chunks/zh-DwFu_Kfj.js.map +1 -0
  209. package/dist/admin/chunks/zh-Hans-CI0HKio3.mjs +934 -0
  210. package/dist/{_chunks/zh-Hans-BPQcRIyH.mjs.map → admin/chunks/zh-Hans-CI0HKio3.mjs.map} +1 -1
  211. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +953 -0
  212. package/dist/{_chunks/zh-Hans-9kOncHGw.js.map → admin/chunks/zh-Hans-JVK9x7xr.js.map} +1 -1
  213. package/dist/admin/index.js +25 -4
  214. package/dist/admin/index.js.map +1 -1
  215. package/dist/admin/index.mjs +17 -12
  216. package/dist/admin/index.mjs.map +1 -1
  217. package/dist/admin/src/content-manager.d.ts +3 -2
  218. package/dist/admin/src/exports.d.ts +1 -0
  219. package/dist/admin/src/history/services/historyVersion.d.ts +2 -2
  220. package/dist/admin/src/hooks/useDocument.d.ts +21 -4
  221. package/dist/admin/src/index.d.ts +1 -0
  222. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  223. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
  224. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
  225. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  226. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +55 -0
  227. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +1 -0
  228. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
  229. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
  230. package/dist/admin/src/pages/EditView/components/FormInputs/Relations.d.ts +2 -1
  231. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  232. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +29 -1
  233. package/dist/admin/src/pages/EditView/utils/data.d.ts +1 -0
  234. package/dist/admin/src/preview/components/PreviewContent.d.ts +3 -0
  235. package/dist/admin/src/preview/components/PreviewHeader.d.ts +3 -0
  236. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  237. package/dist/admin/src/preview/index.d.ts +3 -0
  238. package/dist/admin/src/preview/pages/Preview.d.ts +13 -0
  239. package/dist/admin/src/preview/routes.d.ts +3 -0
  240. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  241. package/dist/admin/src/router.d.ts +1 -1
  242. package/dist/admin/src/services/api.d.ts +1 -1
  243. package/dist/admin/src/services/components.d.ts +2 -2
  244. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  245. package/dist/admin/src/services/documents.d.ts +16 -19
  246. package/dist/admin/src/services/init.d.ts +1 -1
  247. package/dist/admin/src/services/relations.d.ts +2 -2
  248. package/dist/admin/src/services/uid.d.ts +3 -3
  249. package/dist/server/index.js +5472 -4157
  250. package/dist/server/index.js.map +1 -1
  251. package/dist/server/index.mjs +5457 -4139
  252. package/dist/server/index.mjs.map +1 -1
  253. package/dist/server/src/bootstrap.d.ts.map +1 -1
  254. package/dist/server/src/controllers/index.d.ts.map +1 -1
  255. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  256. package/dist/server/src/controllers/utils/metadata.d.ts +17 -2
  257. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  258. package/dist/server/src/history/controllers/history-version.d.ts +1 -1
  259. package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
  260. package/dist/server/src/history/services/history.d.ts +3 -3
  261. package/dist/server/src/history/services/history.d.ts.map +1 -1
  262. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  263. package/dist/server/src/history/services/utils.d.ts +6 -11
  264. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  265. package/dist/server/src/index.d.ts +7 -6
  266. package/dist/server/src/index.d.ts.map +1 -1
  267. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  268. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  269. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  270. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  271. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  272. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  273. package/dist/server/src/preview/index.d.ts +4 -0
  274. package/dist/server/src/preview/index.d.ts.map +1 -0
  275. package/dist/server/src/preview/routes/index.d.ts +8 -0
  276. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  277. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  278. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  279. package/dist/server/src/preview/services/index.d.ts +16 -0
  280. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  281. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  282. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  283. package/dist/server/src/preview/services/preview.d.ts +12 -0
  284. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  285. package/dist/server/src/preview/utils.d.ts +19 -0
  286. package/dist/server/src/preview/utils.d.ts.map +1 -0
  287. package/dist/server/src/register.d.ts.map +1 -1
  288. package/dist/server/src/routes/index.d.ts.map +1 -1
  289. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  290. package/dist/server/src/services/document-metadata.d.ts +12 -10
  291. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  292. package/dist/server/src/services/index.d.ts +7 -6
  293. package/dist/server/src/services/index.d.ts.map +1 -1
  294. package/dist/server/src/services/utils/count.d.ts +1 -1
  295. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  296. package/dist/server/src/services/utils/populate.d.ts +3 -3
  297. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  298. package/dist/server/src/utils/index.d.ts +2 -0
  299. package/dist/server/src/utils/index.d.ts.map +1 -1
  300. package/dist/shared/contracts/collection-types.d.ts +0 -1
  301. package/dist/shared/contracts/components.d.ts +0 -1
  302. package/dist/shared/contracts/content-types.d.ts +0 -1
  303. package/dist/shared/contracts/history-versions.d.ts +0 -1
  304. package/dist/shared/contracts/index.d.ts +1 -1
  305. package/dist/shared/contracts/index.d.ts.map +1 -1
  306. package/dist/shared/contracts/init.d.ts +0 -1
  307. package/dist/shared/contracts/preview.d.ts +26 -0
  308. package/dist/shared/contracts/preview.d.ts.map +1 -0
  309. package/dist/shared/contracts/relations.d.ts +1 -2
  310. package/dist/shared/contracts/relations.d.ts.map +1 -1
  311. package/dist/shared/contracts/review-workflows.d.ts +0 -1
  312. package/dist/shared/contracts/single-types.d.ts +0 -1
  313. package/dist/shared/contracts/uid.d.ts +0 -1
  314. package/dist/shared/index.d.ts +0 -1
  315. package/dist/shared/index.js +37 -22
  316. package/dist/shared/index.js.map +1 -1
  317. package/dist/shared/index.mjs +36 -23
  318. package/dist/shared/index.mjs.map +1 -1
  319. package/package.json +20 -16
  320. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +0 -69
  321. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +0 -1
  322. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +0 -70
  323. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +0 -1
  324. package/dist/_chunks/ComponentConfigurationPage-DfFSZQxe.mjs +0 -236
  325. package/dist/_chunks/ComponentConfigurationPage-DfFSZQxe.mjs.map +0 -1
  326. package/dist/_chunks/ComponentConfigurationPage-FqfsxQ1j.js +0 -255
  327. package/dist/_chunks/ComponentConfigurationPage-FqfsxQ1j.js.map +0 -1
  328. package/dist/_chunks/ComponentIcon-BXdiCGQp.js +0 -176
  329. package/dist/_chunks/ComponentIcon-BXdiCGQp.js.map +0 -1
  330. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +0 -157
  331. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +0 -1
  332. package/dist/_chunks/EditConfigurationPage-Cn0e8t3I.js +0 -151
  333. package/dist/_chunks/EditConfigurationPage-Cn0e8t3I.js.map +0 -1
  334. package/dist/_chunks/EditConfigurationPage-DdPNAbl3.mjs +0 -132
  335. package/dist/_chunks/EditConfigurationPage-DdPNAbl3.mjs.map +0 -1
  336. package/dist/_chunks/EditViewPage-B82x_x1b.mjs +0 -224
  337. package/dist/_chunks/EditViewPage-B82x_x1b.mjs.map +0 -1
  338. package/dist/_chunks/EditViewPage-DlxEHhUt.js +0 -243
  339. package/dist/_chunks/EditViewPage-DlxEHhUt.js.map +0 -1
  340. package/dist/_chunks/Field-COL25JiC.js +0 -5595
  341. package/dist/_chunks/Field-COL25JiC.js.map +0 -1
  342. package/dist/_chunks/Field-DufHXW17.mjs +0 -5563
  343. package/dist/_chunks/Field-DufHXW17.mjs.map +0 -1
  344. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +0 -50
  345. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +0 -1
  346. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +0 -49
  347. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +0 -1
  348. package/dist/_chunks/Form-BssUwrTO.js +0 -779
  349. package/dist/_chunks/Form-BssUwrTO.js.map +0 -1
  350. package/dist/_chunks/Form-u_kAOhwB.mjs +0 -758
  351. package/dist/_chunks/Form-u_kAOhwB.mjs.map +0 -1
  352. package/dist/_chunks/History-C9t9UqpO.js +0 -1066
  353. package/dist/_chunks/History-C9t9UqpO.js.map +0 -1
  354. package/dist/_chunks/History-DRwA3oMM.mjs +0 -1045
  355. package/dist/_chunks/History-DRwA3oMM.mjs.map +0 -1
  356. package/dist/_chunks/ListConfigurationPage-BXYPohh-.js +0 -652
  357. package/dist/_chunks/ListConfigurationPage-BXYPohh-.js.map +0 -1
  358. package/dist/_chunks/ListConfigurationPage-BxfQJzPk.mjs +0 -632
  359. package/dist/_chunks/ListConfigurationPage-BxfQJzPk.mjs.map +0 -1
  360. package/dist/_chunks/ListViewPage-CELx2ysp.mjs +0 -828
  361. package/dist/_chunks/ListViewPage-CELx2ysp.mjs.map +0 -1
  362. package/dist/_chunks/ListViewPage-D2VD8Szg.js +0 -852
  363. package/dist/_chunks/ListViewPage-D2VD8Szg.js.map +0 -1
  364. package/dist/_chunks/NoContentTypePage-BV9IjJSM.js +0 -51
  365. package/dist/_chunks/NoContentTypePage-BV9IjJSM.js.map +0 -1
  366. package/dist/_chunks/NoContentTypePage-DtJ9jcfk.mjs +0 -51
  367. package/dist/_chunks/NoContentTypePage-DtJ9jcfk.mjs.map +0 -1
  368. package/dist/_chunks/NoPermissionsPage-DWleVYK7.mjs +0 -23
  369. package/dist/_chunks/NoPermissionsPage-DWleVYK7.mjs.map +0 -1
  370. package/dist/_chunks/NoPermissionsPage-Dp8NpF9I.js +0 -23
  371. package/dist/_chunks/NoPermissionsPage-Dp8NpF9I.js.map +0 -1
  372. package/dist/_chunks/Relations-BTcf5xaw.mjs +0 -703
  373. package/dist/_chunks/Relations-BTcf5xaw.mjs.map +0 -1
  374. package/dist/_chunks/Relations-DR7EUgyC.js +0 -723
  375. package/dist/_chunks/Relations-DR7EUgyC.js.map +0 -1
  376. package/dist/_chunks/ar-BUUWXIYu.js +0 -226
  377. package/dist/_chunks/ar-BUUWXIYu.js.map +0 -1
  378. package/dist/_chunks/ar-CCEVvqGG.mjs +0 -226
  379. package/dist/_chunks/ca-5U32ON2v.mjs +0 -201
  380. package/dist/_chunks/ca-Cmk45QO6.js +0 -201
  381. package/dist/_chunks/cs-CM2aBUar.mjs +0 -125
  382. package/dist/_chunks/cs-CkJy6B2v.js +0 -125
  383. package/dist/_chunks/de-C72KDNOl.mjs +0 -199
  384. package/dist/_chunks/de-CCEmbAah.js +0 -199
  385. package/dist/_chunks/en-Bm0D0IWz.js +0 -293
  386. package/dist/_chunks/en-DKV44jRb.mjs +0 -293
  387. package/dist/_chunks/es-CeXiYflN.mjs +0 -196
  388. package/dist/_chunks/es-EUonQTon.js +0 -196
  389. package/dist/_chunks/eu-CdALomew.mjs +0 -202
  390. package/dist/_chunks/eu-VDH-3ovk.js +0 -202
  391. package/dist/_chunks/fr-B7kGGg3E.js +0 -206
  392. package/dist/_chunks/fr-B7kGGg3E.js.map +0 -1
  393. package/dist/_chunks/fr-CD9VFbPM.mjs +0 -206
  394. package/dist/_chunks/fr-CD9VFbPM.mjs.map +0 -1
  395. package/dist/_chunks/gu-BRmF601H.js +0 -200
  396. package/dist/_chunks/gu-CNpaMDpH.mjs +0 -200
  397. package/dist/_chunks/gu-CNpaMDpH.mjs.map +0 -1
  398. package/dist/_chunks/hi-CCJBptSq.js +0 -200
  399. package/dist/_chunks/hi-CCJBptSq.js.map +0 -1
  400. package/dist/_chunks/hi-Dwvd04m3.mjs +0 -200
  401. package/dist/_chunks/hi-Dwvd04m3.mjs.map +0 -1
  402. package/dist/_chunks/hooks-BAaaKPS_.js.map +0 -1
  403. package/dist/_chunks/hooks-E5u1mcgM.mjs +0 -8
  404. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +0 -1
  405. package/dist/_chunks/hu-CeYvaaO0.mjs +0 -202
  406. package/dist/_chunks/hu-CeYvaaO0.mjs.map +0 -1
  407. package/dist/_chunks/hu-sNV_yLYy.js +0 -202
  408. package/dist/_chunks/hu-sNV_yLYy.js.map +0 -1
  409. package/dist/_chunks/id-B5Ser98A.js +0 -160
  410. package/dist/_chunks/id-B5Ser98A.js.map +0 -1
  411. package/dist/_chunks/id-BtwA9WJT.mjs +0 -160
  412. package/dist/_chunks/index-BdMf2lfT.js +0 -4109
  413. package/dist/_chunks/index-BdMf2lfT.js.map +0 -1
  414. package/dist/_chunks/index-wnqzm4Q8.mjs +0 -4090
  415. package/dist/_chunks/index-wnqzm4Q8.mjs.map +0 -1
  416. package/dist/_chunks/it-BrVPqaf1.mjs +0 -162
  417. package/dist/_chunks/it-DkBIs7vD.js +0 -162
  418. package/dist/_chunks/ja-CcFe8diO.js +0 -196
  419. package/dist/_chunks/ja-CtsUxOvk.mjs +0 -196
  420. package/dist/_chunks/ko-HVQRlfUI.mjs +0 -195
  421. package/dist/_chunks/ko-woFZPmLk.js +0 -195
  422. package/dist/_chunks/layout-2CfjL0T9.mjs +0 -471
  423. package/dist/_chunks/layout-2CfjL0T9.mjs.map +0 -1
  424. package/dist/_chunks/layout-B2MyZU-_.js +0 -489
  425. package/dist/_chunks/layout-B2MyZU-_.js.map +0 -1
  426. package/dist/_chunks/ml-BihZwQit.mjs +0 -200
  427. package/dist/_chunks/ml-BihZwQit.mjs.map +0 -1
  428. package/dist/_chunks/ml-C2W8N8k1.js +0 -200
  429. package/dist/_chunks/ml-C2W8N8k1.js.map +0 -1
  430. package/dist/_chunks/ms-BuFotyP_.js +0 -144
  431. package/dist/_chunks/ms-m_WjyWx7.mjs +0 -144
  432. package/dist/_chunks/nl-D4R9gHx5.mjs +0 -202
  433. package/dist/_chunks/nl-D4R9gHx5.mjs.map +0 -1
  434. package/dist/_chunks/nl-bbEOHChV.js +0 -202
  435. package/dist/_chunks/nl-bbEOHChV.js.map +0 -1
  436. package/dist/_chunks/objects-gigeqt7s.js +0 -49
  437. package/dist/_chunks/objects-gigeqt7s.js.map +0 -1
  438. package/dist/_chunks/objects-mKMAmfec.mjs +0 -47
  439. package/dist/_chunks/objects-mKMAmfec.mjs.map +0 -1
  440. package/dist/_chunks/pl-sbx9mSt_.mjs +0 -199
  441. package/dist/_chunks/pl-sbx9mSt_.mjs.map +0 -1
  442. package/dist/_chunks/pl-uzwG-hk7.js +0 -199
  443. package/dist/_chunks/pl-uzwG-hk7.js.map +0 -1
  444. package/dist/_chunks/pt-BR-BiOz37D9.js +0 -201
  445. package/dist/_chunks/pt-BR-C71iDxnh.mjs +0 -201
  446. package/dist/_chunks/pt-BsaFvS8-.mjs +0 -95
  447. package/dist/_chunks/pt-BsaFvS8-.mjs.map +0 -1
  448. package/dist/_chunks/pt-CeXQuq50.js +0 -95
  449. package/dist/_chunks/pt-CeXQuq50.js.map +0 -1
  450. package/dist/_chunks/relations-BH7JJGGe.js +0 -134
  451. package/dist/_chunks/relations-BH7JJGGe.js.map +0 -1
  452. package/dist/_chunks/relations-C0w0GcXi.mjs +0 -135
  453. package/dist/_chunks/relations-C0w0GcXi.mjs.map +0 -1
  454. package/dist/_chunks/ru-BE6A4Exp.mjs +0 -231
  455. package/dist/_chunks/ru-BT3ybNny.js +0 -231
  456. package/dist/_chunks/sa-CcvkYInH.js +0 -200
  457. package/dist/_chunks/sa-CcvkYInH.js.map +0 -1
  458. package/dist/_chunks/sa-Dag0k-Z8.mjs +0 -200
  459. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +0 -1
  460. package/dist/_chunks/sk-BFg-R8qJ.mjs +0 -202
  461. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +0 -1
  462. package/dist/_chunks/sk-CvY09Xjv.js +0 -202
  463. package/dist/_chunks/sk-CvY09Xjv.js.map +0 -1
  464. package/dist/_chunks/sv-CUnfWGsh.mjs +0 -202
  465. package/dist/_chunks/sv-CUnfWGsh.mjs.map +0 -1
  466. package/dist/_chunks/sv-MYDuzgvT.js +0 -202
  467. package/dist/_chunks/sv-MYDuzgvT.js.map +0 -1
  468. package/dist/_chunks/th-BqbI8lIT.mjs +0 -148
  469. package/dist/_chunks/th-D9_GfAjc.js +0 -148
  470. package/dist/_chunks/tr-CgeK3wJM.mjs +0 -199
  471. package/dist/_chunks/tr-CgeK3wJM.mjs.map +0 -1
  472. package/dist/_chunks/tr-D9UH-O_R.js +0 -199
  473. package/dist/_chunks/tr-D9UH-O_R.js.map +0 -1
  474. package/dist/_chunks/uk-C8EiqJY7.js +0 -144
  475. package/dist/_chunks/uk-CR-zDhAY.mjs +0 -144
  476. package/dist/_chunks/useDebounce-CtcjDB3L.js +0 -28
  477. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +0 -1
  478. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +0 -29
  479. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +0 -1
  480. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs +0 -231
  481. package/dist/_chunks/useDragAndDrop-DdHgKsqq.mjs.map +0 -1
  482. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js +0 -249
  483. package/dist/_chunks/useDragAndDrop-J0TUUbR6.js.map +0 -1
  484. package/dist/_chunks/vi-CJlYDheJ.js +0 -111
  485. package/dist/_chunks/vi-DUXIk_fw.mjs +0 -111
  486. package/dist/_chunks/zh-BWZspA60.mjs +0 -209
  487. package/dist/_chunks/zh-BWZspA60.mjs.map +0 -1
  488. package/dist/_chunks/zh-CQQfszqR.js +0 -209
  489. package/dist/_chunks/zh-CQQfszqR.js.map +0 -1
  490. package/dist/_chunks/zh-Hans-9kOncHGw.js +0 -952
  491. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +0 -952
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Relations-o7_hVGyK.js","sources":["../../../admin/src/pages/EditView/components/FormInputs/ComponentContext.tsx","../../../admin/src/pages/EditView/components/FormInputs/Relations.tsx"],"sourcesContent":["import { createContext } from '@strapi/admin/strapi-admin';\n\ninterface ComponentContextValue {\n /**\n * The id of the component. It will be undefined if the component\n * has not been created in the database yet. This could be on a new\n * or existing entry.\n */\n id?: number;\n /**\n * The level of the component. This is used to determine the nesting\n * of the component. The default is set to -1 so that the base level is 0\n * for the top level component, and increases by 1 for each level of nesting.\n */\n level: number;\n /**\n * The uid of the component. This is used to determine the type of the\n * component. Within an attribute, it is normally the `component` value.\n * It will be undefined if the hook is not called within the confines\n * of a provider.\n */\n uid?: string;\n /**\n * The type of component parent. It will be undefined if the hook\n * is not called within the confines of a provider.\n */\n type?: 'dynamiczone' | 'repeatable' | 'component';\n}\n\n/**\n * We use this component to wrap any individual component field in the Edit View,\n * this could be a component field in a dynamic zone, a component within a repeatable space,\n * or even nested components.\n *\n * We primarily need this to provide the component id to the components so that they can\n * correctly fetch their relations.\n */\nconst [ComponentProvider, useComponent] = createContext<ComponentContextValue>('ComponentContext', {\n id: undefined,\n level: -1,\n uid: undefined,\n type: undefined,\n});\n\nexport { ComponentProvider, useComponent };\n","import * as React from 'react';\n\nimport {\n type InputProps,\n useField,\n useForm,\n useNotification,\n useFocusInputField,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport {\n Box,\n Combobox,\n ComboboxOption,\n Flex,\n IconButton,\n TextButton,\n Tooltip,\n Typography,\n VisuallyHidden,\n useComposedRefs,\n Link,\n Field,\n FlexComponent,\n BoxComponent,\n} from '@strapi/design-system';\nimport { Cross, Drag, ArrowClockwise } from '@strapi/icons';\nimport { generateNKeysBetween } from 'fractional-indexing';\nimport pipe from 'lodash/fp/pipe';\nimport { getEmptyImage } from 'react-dnd-html5-backend';\nimport { useIntl } from 'react-intl';\nimport { NavLink } from 'react-router-dom';\nimport { FixedSizeList, ListChildComponentProps } from 'react-window';\nimport { styled } from 'styled-components';\n\nimport { RelationDragPreviewProps } from '../../../../components/DragPreviews/RelationDragPreview';\nimport { COLLECTION_TYPES } from '../../../../constants/collections';\nimport { ItemTypes } from '../../../../constants/dragAndDrop';\nimport { useDebounce } from '../../../../hooks/useDebounce';\nimport { useDoc } from '../../../../hooks/useDocument';\nimport { type EditFieldLayout } from '../../../../hooks/useDocumentLayout';\nimport {\n DROP_SENSITIVITY,\n UseDragAndDropOptions,\n useDragAndDrop,\n} from '../../../../hooks/useDragAndDrop';\nimport {\n useGetRelationsQuery,\n useLazySearchRelationsQuery,\n RelationResult,\n} from '../../../../services/relations';\nimport { buildValidParams } from '../../../../utils/api';\nimport { getRelationLabel } from '../../../../utils/relations';\nimport { getTranslation } from '../../../../utils/translations';\nimport { DocumentStatus } from '../DocumentStatus';\n\nimport { useComponent } from './ComponentContext';\n\nimport type { Schema } from '@strapi/types';\n\n/**\n * Remove a relation, whether it's been already saved or not.\n * It's used both in RelationsList, where the \"remove relation\" button is, and in the input,\n * because we sometimes need to remove a previous relation when selecting a new one.\n */\nfunction useHandleDisconnect(fieldName: string, consumerName: string) {\n const field = useField(fieldName);\n const removeFieldRow = useForm(consumerName, (state) => state.removeFieldRow);\n const addFieldRow = useForm(consumerName, (state) => state.addFieldRow);\n\n const handleDisconnect: ListItemProps['data']['handleDisconnect'] = (relation) => {\n if (field.value && field.value.connect) {\n /**\n * A relation will exist in the `connect` array _if_ it has\n * been added without saving. In this case, we just remove it\n * from the connect array\n */\n const indexOfRelationInConnectArray = field.value.connect.findIndex(\n (rel: NonNullable<RelationsFormValue['connect']>[number]) => rel.id === relation.id\n );\n\n if (indexOfRelationInConnectArray >= 0) {\n removeFieldRow(`${fieldName}.connect`, indexOfRelationInConnectArray);\n return;\n }\n }\n\n addFieldRow(`${fieldName}.disconnect`, {\n id: relation.id,\n apiData: {\n id: relation.id,\n documentId: relation.documentId,\n locale: relation.locale,\n },\n });\n };\n\n return handleDisconnect;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * RelationsField\n * -----------------------------------------------------------------------------------------------*/\nconst RELATIONS_TO_DISPLAY = 5;\nconst ONE_WAY_RELATIONS = ['oneWay', 'oneToOne', 'manyToOne', 'oneToManyMorph', 'oneToOneMorph'];\n\ntype RelationPosition =\n | (Pick<RelationResult, 'status' | 'locale'> & {\n before: string;\n end?: never;\n })\n | { end: boolean; before?: never; status?: never; locale?: never };\n\ninterface Relation extends Pick<RelationResult, 'documentId' | 'id' | 'locale' | 'status'> {\n href: string;\n label: string;\n position?: RelationPosition;\n __temp_key__: string;\n}\n\ninterface RelationsFieldProps\n extends Omit<Extract<EditFieldLayout, { type: 'relation' }>, 'size' | 'hint'>,\n Pick<InputProps, 'hint'> {}\n\nexport interface RelationsFormValue {\n connect?: Relation[];\n disconnect?: Pick<Relation, 'id'>[];\n}\n\n/**\n * TODO: we get a rather ugly flash when we remove a single relation from the list leaving\n * no other relations when we press save. The initial relation re-renders, probably because\n * of the lag in the Form cleaning it's \"disconnect\" array, whilst our data has not been invalidated.\n *\n * Could we invalidate relation data on the document actions? Should we?\n */\n\n/**\n * @internal\n * @description The relations field holds a lot of domain logic for handling relations which is rather complicated\n * At present we do not expose this to plugin developers, however, they are able to overwrite it themselves should\n * they wish to do so.\n */\nconst UnstableRelationsField = React.forwardRef<HTMLDivElement, RelationsFieldProps>(\n ({ disabled, label, ...props }, ref) => {\n const [currentPage, setCurrentPage] = React.useState(1);\n const { document, model: documentModel } = useDoc();\n const documentId = document?.documentId;\n const { formatMessage } = useIntl();\n const [{ query }] = useQueryParams();\n const params = buildValidParams(query);\n\n const isMorph = props.attribute.relation.toLowerCase().includes('morph');\n const isDisabled = isMorph || disabled;\n\n const { componentId, componentUID } = useComponent('RelationsField', ({ uid, id }) => ({\n componentId: id,\n componentUID: uid,\n }));\n\n const isSubmitting = useForm('RelationsList', (state) => state.isSubmitting);\n\n React.useEffect(() => {\n setCurrentPage(1);\n }, [isSubmitting]);\n\n /**\n * We'll always have a documentId in a created entry, so we look for a componentId first.\n * Same with `uid` and `documentModel`.\n */\n const id = componentId ? componentId.toString() : documentId;\n const model = componentUID ?? documentModel;\n\n /**\n * The `name` prop is a complete path to the field, e.g. `field1.field2.field3`.\n * Where the above example would a nested field within two components, however\n * we only require the field on the component not the complete path since we query\n * individual components. Therefore we split the string and take the last item.\n */\n const [targetField] = props.name.split('.').slice(-1);\n\n const { data, isLoading, isFetching } = useGetRelationsQuery(\n {\n model,\n targetField,\n // below we don't run the query if there is no id.\n id: id!,\n params: {\n ...params,\n pageSize: RELATIONS_TO_DISPLAY,\n page: currentPage,\n },\n },\n {\n refetchOnMountOrArgChange: true,\n skip: !id,\n selectFromResult: (result) => {\n return {\n ...result,\n data: {\n ...result.data,\n results: result.data?.results ? result.data.results : [],\n },\n };\n },\n }\n );\n\n const handleLoadMore = () => {\n setCurrentPage((prev) => prev + 1);\n };\n\n const field = useField(props.name);\n\n const isFetchingMoreRelations = isLoading || isFetching;\n\n const realServerRelationsCount =\n 'pagination' in data && data.pagination ? data.pagination.total : 0;\n\n /**\n * Items that are already connected, but reordered would be in\n * this list, so to get an accurate figure, we remove them.\n */\n const relationsConnected =\n (field.value?.connect ?? []).filter(\n (rel: Relation) => data.results.findIndex((relation) => relation.id === rel.id) === -1\n ).length ?? 0;\n const relationsDisconnected = field.value?.disconnect?.length ?? 0;\n\n const relationsCount = realServerRelationsCount + relationsConnected - relationsDisconnected;\n\n /**\n * This is it, the source of truth for reordering in conjunction with partial loading & updating\n * of relations. Relations on load are given __temp_key__ when fetched, because we don't want to\n * create brand new keys everytime the data updates, just keep adding them onto the newly loaded ones.\n */\n const relations = React.useMemo(() => {\n const ctx = {\n field: field.value,\n // @ts-expect-error – targetModel does exist on the attribute. But it's not typed.\n href: `../${COLLECTION_TYPES}/${props.attribute.targetModel}`,\n mainField: props.mainField,\n };\n\n /**\n * Tidy up our data.\n */\n const transformations = pipe(\n removeConnected(ctx),\n removeDisconnected(ctx),\n addLabelAndHref(ctx)\n );\n\n const transformedRels = transformations([...data.results]);\n\n /**\n * THIS IS CRUCIAL. If you don't sort by the __temp_key__ which comes from fractional indexing\n * then the list will be in the wrong order.\n */\n return [...transformedRels, ...(field.value?.connect ?? [])].sort((a, b) => {\n if (a.__temp_key__ < b.__temp_key__) return -1;\n if (a.__temp_key__ > b.__temp_key__) return 1;\n return 0;\n });\n }, [\n data.results,\n field.value,\n // @ts-expect-error – targetModel does exist on the attribute. But it's not typed.\n props.attribute.targetModel,\n props.mainField,\n ]);\n\n const handleDisconnect = useHandleDisconnect(props.name, 'RelationsField');\n\n const handleConnect: RelationsInputProps['onChange'] = (relation) => {\n const [lastItemInList] = relations.slice(-1);\n\n const item = {\n id: relation.id,\n apiData: {\n id: relation.id,\n documentId: relation.documentId,\n locale: relation.locale,\n },\n status: relation.status,\n /**\n * If there's a last item, that's the first key we use to generate out next one.\n */\n __temp_key__: generateNKeysBetween(lastItemInList?.__temp_key__ ?? null, null, 1)[0],\n // Fallback to `id` if there is no `mainField` value, which will overwrite the above `id` property with the exact same data.\n [props.mainField?.name ?? 'documentId']: relation[props.mainField?.name ?? 'documentId'],\n label: getRelationLabel(relation, props.mainField),\n // @ts-expect-error – targetModel does exist on the attribute, but it's not typed.\n href: `../${COLLECTION_TYPES}/${props.attribute.targetModel}/${relation.documentId}?${relation.locale ? `plugins[i18n][locale]=${relation.locale}` : ''}`,\n };\n\n if (ONE_WAY_RELATIONS.includes(props.attribute.relation)) {\n // Remove any existing relation so they can be replaced with the new one\n field.value?.connect?.forEach(handleDisconnect);\n relations.forEach(handleDisconnect);\n\n field.onChange(`${props.name}.connect`, [item]);\n } else {\n field.onChange(`${props.name}.connect`, [...(field.value?.connect ?? []), item]);\n }\n };\n\n return (\n <Flex\n ref={ref}\n direction=\"column\"\n gap={3}\n justifyContent=\"space-between\"\n alignItems=\"stretch\"\n wrap=\"wrap\"\n >\n <StyledFlex direction=\"column\" alignItems=\"start\" gap={2} width=\"100%\">\n <RelationsInput\n disabled={isDisabled}\n // NOTE: we should not default to using the documentId if the component is being created (componentUID is undefined)\n id={componentUID ? (componentId ? `${componentId}` : '') : documentId}\n label={`${label} ${relationsCount > 0 ? `(${relationsCount})` : ''}`}\n model={model}\n onChange={handleConnect}\n {...props}\n />\n {'pagination' in data &&\n data.pagination &&\n data.pagination.pageCount > data.pagination.page ? (\n <TextButton\n disabled={isFetchingMoreRelations}\n onClick={handleLoadMore}\n loading={isFetchingMoreRelations}\n startIcon={<ArrowClockwise />}\n // prevent the label from line-wrapping\n shrink={0}\n >\n {formatMessage({\n id: getTranslation('relation.loadMore'),\n defaultMessage: 'Load More',\n })}\n </TextButton>\n ) : null}\n </StyledFlex>\n <UnstableRelationsList\n data={relations}\n serverData={data.results}\n disabled={isDisabled}\n name={props.name}\n isLoading={isFetchingMoreRelations}\n relationType={props.attribute.relation}\n />\n </Flex>\n );\n }\n);\n\nconst RelationsField = React.forwardRef<HTMLDivElement, RelationsFieldProps>(\n ({ disabled, label, ...props }, ref) => {\n const [currentPage, setCurrentPage] = React.useState(1);\n const { document, model: documentModel } = useDoc();\n const documentId = document?.documentId;\n const { formatMessage } = useIntl();\n const [{ query }] = useQueryParams();\n const params = buildValidParams(query);\n\n const isMorph = props.attribute.relation.toLowerCase().includes('morph');\n const isDisabled = isMorph || disabled;\n\n const { componentId, componentUID } = useComponent('RelationsField', ({ uid, id }) => ({\n componentId: id,\n componentUID: uid,\n }));\n\n const isSubmitting = useForm('RelationsList', (state) => state.isSubmitting);\n\n React.useEffect(() => {\n setCurrentPage(1);\n }, [isSubmitting]);\n\n /**\n * We'll always have a documentId in a created entry, so we look for a componentId first.\n * Same with `uid` and `documentModel`.\n */\n const id = componentId ? componentId.toString() : documentId;\n const model = componentUID ?? documentModel;\n\n /**\n * The `name` prop is a complete path to the field, e.g. `field1.field2.field3`.\n * Where the above example would a nested field within two components, however\n * we only require the field on the component not the complete path since we query\n * individual components. Therefore we split the string and take the last item.\n */\n const [targetField] = props.name.split('.').slice(-1);\n\n const { data, isLoading, isFetching } = useGetRelationsQuery(\n {\n model,\n targetField,\n // below we don't run the query if there is no id.\n id: id!,\n params: {\n ...params,\n pageSize: RELATIONS_TO_DISPLAY,\n page: currentPage,\n },\n },\n {\n refetchOnMountOrArgChange: true,\n skip: !id,\n selectFromResult: (result) => {\n return {\n ...result,\n data: {\n ...result.data,\n results: result.data?.results ? result.data.results : [],\n },\n };\n },\n }\n );\n\n const handleLoadMore = () => {\n setCurrentPage((prev) => prev + 1);\n };\n\n const field = useField(props.name);\n\n const isFetchingMoreRelations = isLoading || isFetching;\n\n const realServerRelationsCount =\n 'pagination' in data && data.pagination ? data.pagination.total : 0;\n\n /**\n * Items that are already connected, but reordered would be in\n * this list, so to get an accurate figure, we remove them.\n */\n const relationsConnected =\n (field.value?.connect ?? []).filter(\n (rel: Relation) => data.results.findIndex((relation) => relation.id === rel.id) === -1\n ).length ?? 0;\n const relationsDisconnected = field.value?.disconnect?.length ?? 0;\n\n const relationsCount = realServerRelationsCount + relationsConnected - relationsDisconnected;\n\n /**\n * This is it, the source of truth for reordering in conjunction with partial loading & updating\n * of relations. Relations on load are given __temp_key__ when fetched, because we don't want to\n * create brand new keys everytime the data updates, just keep adding them onto the newly loaded ones.\n */\n const relations = React.useMemo(() => {\n const ctx = {\n field: field.value,\n // @ts-expect-error – targetModel does exist on the attribute. But it's not typed.\n href: `../${COLLECTION_TYPES}/${props.attribute.targetModel}`,\n mainField: props.mainField,\n };\n\n /**\n * Tidy up our data.\n */\n const transformations = pipe(\n removeConnected(ctx),\n removeDisconnected(ctx),\n addLabelAndHref(ctx)\n );\n\n const transformedRels = transformations([...data.results]);\n\n /**\n * THIS IS CRUCIAL. If you don't sort by the __temp_key__ which comes from fractional indexing\n * then the list will be in the wrong order.\n */\n return [...transformedRels, ...(field.value?.connect ?? [])].sort((a, b) => {\n if (a.__temp_key__ < b.__temp_key__) return -1;\n if (a.__temp_key__ > b.__temp_key__) return 1;\n return 0;\n });\n }, [\n data.results,\n field.value,\n // @ts-expect-error – targetModel does exist on the attribute. But it's not typed.\n props.attribute.targetModel,\n props.mainField,\n ]);\n\n const handleDisconnect = useHandleDisconnect(props.name, 'RelationsField');\n\n const handleConnect: RelationsInputProps['onChange'] = (relation) => {\n const [lastItemInList] = relations.slice(-1);\n\n const item = {\n id: relation.id,\n apiData: {\n id: relation.id,\n documentId: relation.documentId,\n locale: relation.locale,\n },\n status: relation.status,\n /**\n * If there's a last item, that's the first key we use to generate out next one.\n */\n __temp_key__: generateNKeysBetween(lastItemInList?.__temp_key__ ?? null, null, 1)[0],\n // Fallback to `id` if there is no `mainField` value, which will overwrite the above `id` property with the exact same data.\n [props.mainField?.name ?? 'documentId']: relation[props.mainField?.name ?? 'documentId'],\n label: getRelationLabel(relation, props.mainField),\n // @ts-expect-error – targetModel does exist on the attribute, but it's not typed.\n href: `../${COLLECTION_TYPES}/${props.attribute.targetModel}/${relation.documentId}?${relation.locale ? `plugins[i18n][locale]=${relation.locale}` : ''}`,\n };\n\n if (ONE_WAY_RELATIONS.includes(props.attribute.relation)) {\n // Remove any existing relation so they can be replaced with the new one\n field.value?.connect?.forEach(handleDisconnect);\n relations.forEach(handleDisconnect);\n\n field.onChange(`${props.name}.connect`, [item]);\n } else {\n field.onChange(`${props.name}.connect`, [...(field.value?.connect ?? []), item]);\n }\n };\n\n return (\n <Flex\n ref={ref}\n direction=\"column\"\n gap={3}\n justifyContent=\"space-between\"\n alignItems=\"stretch\"\n wrap=\"wrap\"\n >\n <StyledFlex direction=\"column\" alignItems=\"start\" gap={2} width=\"100%\">\n <RelationsInput\n disabled={isDisabled}\n // NOTE: we should not default to using the documentId if the component is being created (componentUID is undefined)\n id={componentUID ? (componentId ? `${componentId}` : '') : documentId}\n label={`${label} ${relationsCount > 0 ? `(${relationsCount})` : ''}`}\n model={model}\n onChange={handleConnect}\n {...props}\n />\n {'pagination' in data &&\n data.pagination &&\n data.pagination.pageCount > data.pagination.page ? (\n <TextButton\n disabled={isFetchingMoreRelations}\n onClick={handleLoadMore}\n loading={isFetchingMoreRelations}\n startIcon={<ArrowClockwise />}\n // prevent the label from line-wrapping\n shrink={0}\n >\n {formatMessage({\n id: getTranslation('relation.loadMore'),\n defaultMessage: 'Load More',\n })}\n </TextButton>\n ) : null}\n </StyledFlex>\n <RelationsList\n data={relations}\n serverData={data.results}\n disabled={isDisabled}\n name={props.name}\n isLoading={isFetchingMoreRelations}\n relationType={props.attribute.relation}\n />\n </Flex>\n );\n }\n);\n\n/**\n * TODO: this can be removed once we stop shipping Inputs with\n * labels wrapped round in DS@2.\n */\nconst StyledFlex = styled<FlexComponent>(Flex)`\n & > div {\n width: 100%;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Relation Transformations\n * -----------------------------------------------------------------------------------------------*/\n\ninterface TransformationContext extends Pick<RelationsFieldProps, 'mainField'> {\n field?: RelationsFormValue;\n href: string;\n}\n\n/**\n * If it's in the connected array, it can get out of our data array,\n * we'll be putting it back in later and sorting it anyway.\n */\nconst removeConnected =\n ({ field }: TransformationContext) =>\n (relations: RelationResult[]) => {\n return relations.filter((relation) => {\n const connectedRelations = field?.connect ?? [];\n\n return connectedRelations.findIndex((rel) => rel.id === relation.id) === -1;\n });\n };\n\n/**\n * @description Removes relations that are in the `disconnect` array of the field\n */\nconst removeDisconnected =\n ({ field }: TransformationContext) =>\n (relations: RelationResult[]): RelationResult[] =>\n relations.filter((relation) => {\n const disconnectedRelations = field?.disconnect ?? [];\n\n return disconnectedRelations.findIndex((rel) => rel.id === relation.id) === -1;\n });\n\n/**\n * @description Adds a label and href to the relation object we use this to render\n * a better UI where we can link to the relation and display a human-readable label.\n */\nconst addLabelAndHref =\n ({ mainField, href }: TransformationContext) =>\n (relations: RelationResult[]): Relation[] =>\n relations.map((relation) => {\n return {\n ...relation,\n // Fallback to `id` if there is no `mainField` value, which will overwrite the above `documentId` property with the exact same data.\n [mainField?.name ?? 'documentId']: relation[mainField?.name ?? 'documentId'],\n label: getRelationLabel(relation, mainField),\n href: `${href}/${relation.documentId}?${relation.locale ? `plugins[i18n][locale]=${relation.locale}` : ''}`,\n };\n });\n\n/* -------------------------------------------------------------------------------------------------\n * RelationsInput\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RelationsInputProps extends Omit<RelationsFieldProps, 'type'> {\n id?: string;\n model: string;\n onChange: (\n relation: Pick<RelationResult, 'documentId' | 'id' | 'locale' | 'status'> & {\n [key: string]: any;\n }\n ) => void;\n}\n\n/**\n * @description Contains all the logic for the combobox that can search\n * for relations and then add them to the field's connect array.\n */\nconst RelationsInput = ({\n hint,\n id,\n model,\n label,\n labelAction,\n name,\n mainField,\n placeholder,\n required,\n unique: _unique,\n 'aria-label': _ariaLabel,\n onChange,\n ...props\n}: RelationsInputProps) => {\n const [textValue, setTextValue] = React.useState<string | undefined>('');\n const [searchParams, setSearchParams] = React.useState({\n _q: '',\n page: 1,\n });\n const { toggleNotification } = useNotification();\n const [{ query }] = useQueryParams();\n\n const { formatMessage } = useIntl();\n const fieldRef = useFocusInputField<HTMLInputElement>(name);\n const field = useField<RelationsFormValue>(name);\n\n const searchParamsDebounced = useDebounce(searchParams, 300);\n const [searchForTrigger, { data, isLoading }] = useLazySearchRelationsQuery();\n\n /**\n * Because we're using a lazy query, we need to trigger the search\n * when the component mounts and when the search params change.\n * We also need to trigger the search when the field value changes\n * so that we can filter out the relations that are already connected.\n */\n React.useEffect(() => {\n /**\n * The `name` prop is a complete path to the field, e.g. `field1.field2.field3`.\n * Where the above example would a nested field within two components, however\n * we only require the field on the component not the complete path since we query\n * individual components. Therefore we split the string and take the last item.\n */\n const [targetField] = name.split('.').slice(-1);\n\n searchForTrigger({\n model,\n targetField,\n params: {\n ...buildValidParams(query),\n id: id ?? '',\n pageSize: 10,\n idsToInclude: field.value?.disconnect?.map((rel) => rel.id.toString()) ?? [],\n idsToOmit: field.value?.connect?.map((rel) => rel.id.toString()) ?? [],\n ...searchParamsDebounced,\n },\n });\n }, [\n field.value?.connect,\n field.value?.disconnect,\n id,\n model,\n name,\n query,\n searchForTrigger,\n searchParamsDebounced,\n ]);\n\n const handleSearch = async (search: string) => {\n setSearchParams((s) => ({ ...s, _q: search, page: 1 }));\n };\n\n const hasNextPage = data?.pagination ? data.pagination.page < data.pagination.pageCount : false;\n\n const options = data?.results ?? [];\n\n const handleChange = (relationId?: string) => {\n if (!relationId) {\n return;\n }\n\n const relation = options.find((opt) => opt.id.toString() === relationId);\n\n if (!relation) {\n // This is very unlikely to happen, but it ensures we don't have any data for.\n console.error(\n \"You've tried to add a relation with an id that does not exist in the options you can see, this is likely a bug with Strapi. Please open an issue.\"\n );\n\n toggleNotification({\n message: formatMessage({\n id: getTranslation('relation.error-adding-relation'),\n defaultMessage: 'An error occurred while trying to add the relation.',\n }),\n type: 'danger',\n });\n\n return;\n }\n\n /**\n * You need to give this relation a correct _temp_key_ but\n * this component doesn't know about those ones, you can't rely\n * on the connect array because that doesn't hold items that haven't\n * moved. So use a callback to fill in the gaps when connecting.\n *\n */\n onChange(relation);\n };\n\n const handleLoadMore = () => {\n if (!data || !data.pagination) {\n return;\n } else if (data.pagination.page < data.pagination.pageCount) {\n setSearchParams((s) => ({ ...s, page: s.page + 1 }));\n }\n };\n\n React.useLayoutEffect(() => {\n setTextValue('');\n }, [field.value]);\n\n return (\n <Field.Root error={field.error} hint={hint} name={name} required={required}>\n <Field.Label action={labelAction}>{label}</Field.Label>\n <Combobox\n ref={fieldRef}\n name={name}\n autocomplete=\"list\"\n placeholder={\n placeholder ||\n formatMessage({\n id: getTranslation('relation.add'),\n defaultMessage: 'Add relation',\n })\n }\n hasMoreItems={hasNextPage}\n loading={isLoading}\n onOpenChange={() => {\n handleSearch(textValue ?? '');\n }}\n noOptionsMessage={() =>\n formatMessage({\n id: getTranslation('relation.notAvailable'),\n defaultMessage: 'No relations available',\n })\n }\n loadingMessage={formatMessage({\n id: getTranslation('relation.isLoading'),\n defaultMessage: 'Relations are loading',\n })}\n onLoadMore={handleLoadMore}\n textValue={textValue}\n onChange={handleChange}\n onTextValueChange={(text) => {\n setTextValue(text);\n }}\n onInputChange={(event) => {\n handleSearch(event.currentTarget.value);\n }}\n {...props}\n >\n {options.map((opt) => {\n const textValue = getRelationLabel(opt, mainField);\n\n return (\n <ComboboxOption key={opt.id} value={opt.id.toString()} textValue={textValue}>\n <Flex gap={2} justifyContent=\"space-between\">\n <Typography ellipsis>{textValue}</Typography>\n {opt.status ? <DocumentStatus status={opt.status} /> : null}\n </Flex>\n </ComboboxOption>\n );\n })}\n </Combobox>\n <Field.Error />\n <Field.Hint />\n </Field.Root>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * RelationsList\n * -----------------------------------------------------------------------------------------------*/\nconst RELATION_ITEM_HEIGHT = 50;\nconst RELATION_GUTTER = 4;\n\ninterface RelationsListProps extends Pick<RelationsFieldProps, 'disabled' | 'name'> {\n data: Relation[];\n isLoading?: boolean;\n relationType: Schema.Attribute.RelationKind.Any;\n /**\n * The existing relations connected on the server. We need these to diff against.\n */\n serverData: RelationResult[];\n}\n\nconst UnstableRelationsList = ({\n data,\n serverData,\n disabled,\n name,\n isLoading,\n relationType,\n}: RelationsListProps) => {\n const ariaDescriptionId = React.useId();\n const { formatMessage } = useIntl();\n const listRef = React.useRef<FixedSizeList>(null);\n const outerListRef = React.useRef<HTMLUListElement>(null);\n const [overflow, setOverflow] = React.useState<'top' | 'bottom' | 'top-bottom'>();\n const [liveText, setLiveText] = React.useState('');\n const field = useField(name);\n\n React.useEffect(() => {\n if (data.length <= RELATIONS_TO_DISPLAY) {\n return setOverflow(undefined);\n }\n\n const handleNativeScroll = (e: Event) => {\n const el = e.target as HTMLUListElement;\n const parentScrollContainerHeight = (el.parentNode as HTMLDivElement).scrollHeight;\n const maxScrollBottom = el.scrollHeight - el.scrollTop;\n\n if (el.scrollTop === 0) {\n return setOverflow('bottom');\n }\n\n if (maxScrollBottom === parentScrollContainerHeight) {\n return setOverflow('top');\n }\n\n return setOverflow('top-bottom');\n };\n\n const outerListRefCurrent = outerListRef?.current;\n\n if (!isLoading && data.length > 0 && outerListRefCurrent) {\n outerListRef.current.addEventListener('scroll', handleNativeScroll);\n }\n\n return () => {\n if (outerListRefCurrent) {\n outerListRefCurrent.removeEventListener('scroll', handleNativeScroll);\n }\n };\n }, [isLoading, data.length]);\n\n const getItemPos = (index: number) => `${index + 1} of ${data.length}`;\n\n const handleMoveItem: UseDragAndDropOptions['onMoveItem'] = (newIndex, oldIndex) => {\n const item = data[oldIndex];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.reorder'),\n defaultMessage: '{item}, moved. New position in list: {position}.',\n },\n {\n item: item.label ?? item.documentId,\n position: getItemPos(newIndex),\n }\n )\n );\n\n /**\n * Splicing mutates the array, so we need to create a new array\n */\n const newData = [...data];\n const currentRow = data[oldIndex];\n\n const startKey =\n oldIndex > newIndex ? newData[newIndex - 1]?.__temp_key__ : newData[newIndex]?.__temp_key__;\n const endKey =\n oldIndex > newIndex ? newData[newIndex]?.__temp_key__ : newData[newIndex + 1]?.__temp_key__;\n\n /**\n * We're moving the relation between two other relations, so\n * we need to generate a new key that keeps the order\n */\n const [newKey] = generateNKeysBetween(startKey, endKey, 1);\n\n newData.splice(oldIndex, 1);\n newData.splice(newIndex, 0, { ...currentRow, __temp_key__: newKey });\n\n /**\n * Now we diff against the server to understand what's different so we\n * can keep the connect array nice and tidy. It also needs reversing because\n * we reverse the relations from the server in the first place.\n */\n const connectedRelations = newData\n .reduce<Relation[]>((acc, relation, currentIndex, array) => {\n const relationOnServer = serverData.find((oldRelation) => oldRelation.id === relation.id);\n\n const relationInFront = array[currentIndex + 1];\n\n if (!relationOnServer || relationOnServer.__temp_key__ !== relation.__temp_key__) {\n const position = relationInFront\n ? {\n before: relationInFront.documentId,\n locale: relationInFront.locale,\n status:\n 'publishedAt' in relationInFront && relationInFront.publishedAt\n ? 'published'\n : 'draft',\n }\n : { end: true };\n\n const relationWithPosition: Relation = {\n ...relation,\n ...{\n apiData: {\n id: relation.id,\n documentId: relation.documentId,\n locale: relation.locale,\n position,\n },\n },\n };\n\n return [...acc, relationWithPosition];\n }\n\n return acc;\n }, [])\n .toReversed();\n\n field.onChange(`${name}.connect`, connectedRelations);\n };\n\n const handleGrabItem: UseDragAndDropOptions['onGrabItem'] = (index) => {\n const item = data[index];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.grab-item'),\n defaultMessage: `{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel.`,\n },\n {\n item: item.label ?? item.documentId,\n position: getItemPos(index),\n }\n )\n );\n };\n\n const handleDropItem: UseDragAndDropOptions['onDropItem'] = (index) => {\n const { href: _href, label, ...item } = data[index];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.drop-item'),\n defaultMessage: `{item}, dropped. Final position in list: {position}.`,\n },\n {\n item: label ?? item.documentId,\n position: getItemPos(index),\n }\n )\n );\n };\n\n const handleCancel: UseDragAndDropOptions['onCancel'] = (index) => {\n const item = data[index];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.cancel-item'),\n defaultMessage: '{item}, dropped. Re-order cancelled.',\n },\n {\n item: item.label ?? item.documentId,\n }\n )\n );\n };\n\n const handleDisconnect = useHandleDisconnect(name, 'RelationsList');\n\n /**\n * These relation types will only ever have one item\n * in their list, so you can't reorder a single item!\n */\n const canReorder = !ONE_WAY_RELATIONS.includes(relationType);\n\n const dynamicListHeight =\n data.length > RELATIONS_TO_DISPLAY\n ? Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER) +\n RELATION_ITEM_HEIGHT / 2\n : Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER);\n\n return (\n <ShadowBox $overflowDirection={overflow}>\n <VisuallyHidden id={ariaDescriptionId}>\n {formatMessage({\n id: getTranslation('dnd.instructions'),\n defaultMessage: `Press spacebar to grab and re-order`,\n })}\n </VisuallyHidden>\n <VisuallyHidden aria-live=\"assertive\">{liveText}</VisuallyHidden>\n {/* @ts-expect-error – width is expected, but we've not needed to pass it before. */}\n <FixedSizeList\n height={dynamicListHeight}\n ref={listRef}\n outerRef={outerListRef}\n itemCount={data.length}\n itemSize={RELATION_ITEM_HEIGHT + RELATION_GUTTER}\n itemData={{\n ariaDescribedBy: ariaDescriptionId,\n canDrag: canReorder,\n disabled,\n handleCancel,\n handleDropItem,\n handleGrabItem,\n handleMoveItem,\n name,\n handleDisconnect,\n relations: data,\n }}\n itemKey={(index) => data[index].id}\n innerElementType=\"ol\"\n >\n {UnstableListItem}\n </FixedSizeList>\n </ShadowBox>\n );\n};\n\nconst RelationsList = ({\n data,\n serverData,\n disabled,\n name,\n isLoading,\n relationType,\n}: RelationsListProps) => {\n const ariaDescriptionId = React.useId();\n const { formatMessage } = useIntl();\n const listRef = React.useRef<FixedSizeList>(null);\n const outerListRef = React.useRef<HTMLUListElement>(null);\n const [overflow, setOverflow] = React.useState<'top' | 'bottom' | 'top-bottom'>();\n const [liveText, setLiveText] = React.useState('');\n const field = useField(name);\n\n React.useEffect(() => {\n if (data.length <= RELATIONS_TO_DISPLAY) {\n return setOverflow(undefined);\n }\n\n const handleNativeScroll = (e: Event) => {\n const el = e.target as HTMLUListElement;\n const parentScrollContainerHeight = (el.parentNode as HTMLDivElement).scrollHeight;\n const maxScrollBottom = el.scrollHeight - el.scrollTop;\n\n if (el.scrollTop === 0) {\n return setOverflow('bottom');\n }\n\n if (maxScrollBottom === parentScrollContainerHeight) {\n return setOverflow('top');\n }\n\n return setOverflow('top-bottom');\n };\n\n const outerListRefCurrent = outerListRef?.current;\n\n if (!isLoading && data.length > 0 && outerListRefCurrent) {\n outerListRef.current.addEventListener('scroll', handleNativeScroll);\n }\n\n return () => {\n if (outerListRefCurrent) {\n outerListRefCurrent.removeEventListener('scroll', handleNativeScroll);\n }\n };\n }, [isLoading, data.length]);\n\n const getItemPos = (index: number) => `${index + 1} of ${data.length}`;\n\n const handleMoveItem: UseDragAndDropOptions['onMoveItem'] = (newIndex, oldIndex) => {\n const item = data[oldIndex];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.reorder'),\n defaultMessage: '{item}, moved. New position in list: {position}.',\n },\n {\n item: item.label ?? item.documentId,\n position: getItemPos(newIndex),\n }\n )\n );\n\n /**\n * Splicing mutates the array, so we need to create a new array\n */\n const newData = [...data];\n const currentRow = data[oldIndex];\n\n const startKey =\n oldIndex > newIndex ? newData[newIndex - 1]?.__temp_key__ : newData[newIndex]?.__temp_key__;\n const endKey =\n oldIndex > newIndex ? newData[newIndex]?.__temp_key__ : newData[newIndex + 1]?.__temp_key__;\n\n /**\n * We're moving the relation between two other relations, so\n * we need to generate a new key that keeps the order\n */\n const [newKey] = generateNKeysBetween(startKey, endKey, 1);\n\n newData.splice(oldIndex, 1);\n newData.splice(newIndex, 0, { ...currentRow, __temp_key__: newKey });\n\n /**\n * Now we diff against the server to understand what's different so we\n * can keep the connect array nice and tidy. It also needs reversing because\n * we reverse the relations from the server in the first place.\n */\n const connectedRelations = newData\n .reduce<Relation[]>((acc, relation, currentIndex, array) => {\n const relationOnServer = serverData.find((oldRelation) => oldRelation.id === relation.id);\n\n const relationInFront = array[currentIndex + 1];\n\n if (!relationOnServer || relationOnServer.__temp_key__ !== relation.__temp_key__) {\n const position = relationInFront\n ? {\n before: relationInFront.documentId,\n locale: relationInFront.locale,\n status:\n 'publishedAt' in relationInFront && relationInFront.publishedAt\n ? 'published'\n : 'draft',\n }\n : { end: true };\n\n const relationWithPosition: Relation = {\n ...relation,\n ...{\n apiData: {\n id: relation.id,\n documentId: relation.documentId,\n locale: relation.locale,\n position,\n },\n },\n };\n\n return [...acc, relationWithPosition];\n }\n\n return acc;\n }, [])\n .toReversed();\n\n field.onChange(`${name}.connect`, connectedRelations);\n };\n\n const handleGrabItem: UseDragAndDropOptions['onGrabItem'] = (index) => {\n const item = data[index];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.grab-item'),\n defaultMessage: `{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel.`,\n },\n {\n item: item.label ?? item.documentId,\n position: getItemPos(index),\n }\n )\n );\n };\n\n const handleDropItem: UseDragAndDropOptions['onDropItem'] = (index) => {\n const { href: _href, label, ...item } = data[index];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.drop-item'),\n defaultMessage: `{item}, dropped. Final position in list: {position}.`,\n },\n {\n item: label ?? item.documentId,\n position: getItemPos(index),\n }\n )\n );\n };\n\n const handleCancel: UseDragAndDropOptions['onCancel'] = (index) => {\n const item = data[index];\n\n setLiveText(\n formatMessage(\n {\n id: getTranslation('dnd.cancel-item'),\n defaultMessage: '{item}, dropped. Re-order cancelled.',\n },\n {\n item: item.label ?? item.documentId,\n }\n )\n );\n };\n\n const handleDisconnect = useHandleDisconnect(name, 'RelationsList');\n\n /**\n * These relation types will only ever have one item\n * in their list, so you can't reorder a single item!\n */\n const canReorder = !ONE_WAY_RELATIONS.includes(relationType);\n\n const dynamicListHeight =\n data.length > RELATIONS_TO_DISPLAY\n ? Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER) +\n RELATION_ITEM_HEIGHT / 2\n : Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER);\n\n return (\n <ShadowBox $overflowDirection={overflow}>\n <VisuallyHidden id={ariaDescriptionId}>\n {formatMessage({\n id: getTranslation('dnd.instructions'),\n defaultMessage: `Press spacebar to grab and re-order`,\n })}\n </VisuallyHidden>\n <VisuallyHidden aria-live=\"assertive\">{liveText}</VisuallyHidden>\n {/* @ts-expect-error – width is expected, but we've not needed to pass it before. */}\n <FixedSizeList\n height={dynamicListHeight}\n ref={listRef}\n outerRef={outerListRef}\n itemCount={data.length}\n itemSize={RELATION_ITEM_HEIGHT + RELATION_GUTTER}\n itemData={{\n ariaDescribedBy: ariaDescriptionId,\n canDrag: canReorder,\n disabled,\n handleCancel,\n handleDropItem,\n handleGrabItem,\n handleMoveItem,\n name,\n handleDisconnect,\n relations: data,\n }}\n itemKey={(index) => data[index].id}\n innerElementType=\"ol\"\n >\n {ListItem}\n </FixedSizeList>\n </ShadowBox>\n );\n};\n\nconst ShadowBox = styled<BoxComponent>(Box)<{\n $overflowDirection?: 'top-bottom' | 'top' | 'bottom';\n}>`\n position: relative;\n overflow: hidden;\n flex: 1;\n\n &:before,\n &:after {\n position: absolute;\n width: 100%;\n height: 4px;\n z-index: 1;\n }\n\n &:before {\n /* TODO: as for DS Table component we would need this to be handled by the DS theme */\n content: '';\n background: linear-gradient(rgba(3, 3, 5, 0.2) 0%, rgba(0, 0, 0, 0) 100%);\n top: 0;\n opacity: ${({ $overflowDirection }) =>\n $overflowDirection === 'top-bottom' || $overflowDirection === 'top' ? 1 : 0};\n transition: opacity 0.2s ease-in-out;\n }\n\n &:after {\n /* TODO: as for DS Table component we would need this to be handled by the DS theme */\n content: '';\n background: linear-gradient(0deg, rgba(3, 3, 5, 0.2) 0%, rgba(0, 0, 0, 0) 100%);\n bottom: 0;\n opacity: ${({ $overflowDirection }) =>\n $overflowDirection === 'top-bottom' || $overflowDirection === 'bottom' ? 1 : 0};\n transition: opacity 0.2s ease-in-out;\n }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * ListItem\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ListItemProps extends Pick<ListChildComponentProps, 'style' | 'index'> {\n data: {\n ariaDescribedBy: string;\n canDrag?: boolean;\n disabled?: boolean;\n handleCancel: UseDragAndDropOptions['onCancel'];\n handleDropItem: UseDragAndDropOptions['onDropItem'];\n handleGrabItem: UseDragAndDropOptions['onGrabItem'];\n handleMoveItem: UseDragAndDropOptions['onMoveItem'];\n handleDisconnect: (relation: Relation) => void;\n name: string;\n relations: Relation[];\n };\n}\n\nconst CustomTextButton = styled(TextButton)`\n & > span {\n font-size: ${({ theme }) => theme.fontSizes[2]};\n }\n`;\n\nconst UnstableListItem = ({ data, index, style }: ListItemProps) => {\n const {\n ariaDescribedBy,\n canDrag = false,\n disabled = false,\n handleCancel,\n handleDisconnect,\n handleDropItem,\n handleGrabItem,\n handleMoveItem,\n name,\n relations,\n } = data;\n const { formatMessage } = useIntl();\n\n const { id, label, status } = relations[index];\n\n const [{ handlerId, isDragging, handleKeyDown }, relationRef, dropRef, dragRef, dragPreviewRef] =\n useDragAndDrop<number, Omit<RelationDragPreviewProps, 'width'>, HTMLDivElement>(\n canDrag && !disabled,\n {\n type: `${ItemTypes.RELATION}_${name}`,\n index,\n item: {\n displayedValue: label,\n status,\n id: id,\n index,\n },\n onMoveItem: handleMoveItem,\n onDropItem: handleDropItem,\n onGrabItem: handleGrabItem,\n onCancel: handleCancel,\n dropSensitivity: DROP_SENSITIVITY.REGULAR,\n }\n );\n\n const composedRefs = useComposedRefs<HTMLDivElement>(relationRef, dragRef);\n\n React.useEffect(() => {\n dragPreviewRef(getEmptyImage());\n }, [dragPreviewRef]);\n\n return (\n <Box\n style={style}\n tag=\"li\"\n ref={dropRef}\n aria-describedby={ariaDescribedBy}\n cursor={canDrag ? 'all-scroll' : 'default'}\n >\n {isDragging ? (\n <RelationItemPlaceholder />\n ) : (\n <Flex\n paddingTop={2}\n paddingBottom={2}\n paddingLeft={canDrag ? 2 : 4}\n paddingRight={4}\n hasRadius\n borderColor=\"neutral200\"\n background={disabled ? 'neutral150' : 'neutral0'}\n justifyContent=\"space-between\"\n ref={composedRefs}\n data-handler-id={handlerId}\n >\n <FlexWrapper gap={1}>\n {canDrag ? (\n <IconButton\n tag=\"div\"\n role=\"button\"\n tabIndex={0}\n withTooltip={false}\n label={formatMessage({\n id: getTranslation('components.RelationInput.icon-button-aria-label'),\n defaultMessage: 'Drag',\n })}\n variant=\"ghost\"\n onKeyDown={handleKeyDown}\n disabled={disabled}\n >\n <Drag />\n </IconButton>\n ) : null}\n <Flex width=\"100%\" minWidth={0} justifyContent=\"space-between\">\n <Box minWidth={0} paddingTop={1} paddingBottom={1} paddingRight={4}>\n <Tooltip description={label}>\n {/* eslint-disable-next-line no-console */}\n <CustomTextButton onClick={() => console.log('OPEN MODAL')}>\n {label}\n </CustomTextButton>\n </Tooltip>\n </Box>\n {status ? <DocumentStatus status={status} /> : null}\n </Flex>\n </FlexWrapper>\n <Box paddingLeft={4}>\n <IconButton\n onClick={() => handleDisconnect(relations[index])}\n disabled={disabled}\n label={formatMessage({\n id: getTranslation('relation.disconnect'),\n defaultMessage: 'Remove',\n })}\n variant=\"ghost\"\n size=\"S\"\n >\n <Cross />\n </IconButton>\n </Box>\n </Flex>\n )}\n </Box>\n );\n};\n\nconst ListItem = ({ data, index, style }: ListItemProps) => {\n const {\n ariaDescribedBy,\n canDrag = false,\n disabled = false,\n handleCancel,\n handleDisconnect,\n handleDropItem,\n handleGrabItem,\n handleMoveItem,\n name,\n relations,\n } = data;\n const { formatMessage } = useIntl();\n\n const { href, id, label, status } = relations[index];\n\n const [{ handlerId, isDragging, handleKeyDown }, relationRef, dropRef, dragRef, dragPreviewRef] =\n useDragAndDrop<number, Omit<RelationDragPreviewProps, 'width'>, HTMLDivElement>(\n canDrag && !disabled,\n {\n type: `${ItemTypes.RELATION}_${name}`,\n index,\n item: {\n displayedValue: label,\n status,\n id: id,\n index,\n },\n onMoveItem: handleMoveItem,\n onDropItem: handleDropItem,\n onGrabItem: handleGrabItem,\n onCancel: handleCancel,\n dropSensitivity: DROP_SENSITIVITY.REGULAR,\n }\n );\n\n const composedRefs = useComposedRefs<HTMLDivElement>(relationRef, dragRef);\n\n React.useEffect(() => {\n dragPreviewRef(getEmptyImage());\n }, [dragPreviewRef]);\n\n return (\n <Box\n style={style}\n tag=\"li\"\n ref={dropRef}\n aria-describedby={ariaDescribedBy}\n cursor={canDrag ? 'all-scroll' : 'default'}\n >\n {isDragging ? (\n <RelationItemPlaceholder />\n ) : (\n <Flex\n paddingTop={2}\n paddingBottom={2}\n paddingLeft={canDrag ? 2 : 4}\n paddingRight={4}\n hasRadius\n borderColor=\"neutral200\"\n background={disabled ? 'neutral150' : 'neutral0'}\n justifyContent=\"space-between\"\n ref={composedRefs}\n data-handler-id={handlerId}\n >\n <FlexWrapper gap={1}>\n {canDrag ? (\n <IconButton\n tag=\"div\"\n role=\"button\"\n tabIndex={0}\n withTooltip={false}\n label={formatMessage({\n id: getTranslation('components.RelationInput.icon-button-aria-label'),\n defaultMessage: 'Drag',\n })}\n variant=\"ghost\"\n onKeyDown={handleKeyDown}\n disabled={disabled}\n >\n <Drag />\n </IconButton>\n ) : null}\n <Flex width=\"100%\" minWidth={0} justifyContent=\"space-between\">\n <Box minWidth={0} paddingTop={1} paddingBottom={1} paddingRight={4}>\n <Tooltip description={label}>\n {href ? (\n <LinkEllipsis tag={NavLink} to={href} isExternal={false}>\n {label}\n </LinkEllipsis>\n ) : (\n <Typography textColor={disabled ? 'neutral600' : 'primary600'} ellipsis>\n {label}\n </Typography>\n )}\n </Tooltip>\n </Box>\n {status ? <DocumentStatus status={status} /> : null}\n </Flex>\n </FlexWrapper>\n <Box paddingLeft={4}>\n <IconButton\n onClick={() => handleDisconnect(relations[index])}\n disabled={disabled}\n label={formatMessage({\n id: getTranslation('relation.disconnect'),\n defaultMessage: 'Remove',\n })}\n variant=\"ghost\"\n size=\"S\"\n >\n <Cross />\n </IconButton>\n </Box>\n </Flex>\n )}\n </Box>\n );\n};\n\nconst FlexWrapper = styled<FlexComponent>(Flex)`\n width: 100%;\n /* Used to prevent endAction to be pushed out of container */\n min-width: 0;\n\n & > div[role='button'] {\n cursor: all-scroll;\n }\n`;\n\nconst DisconnectButton = styled.button`\n svg path {\n fill: ${({ theme, disabled }) =>\n disabled ? theme.colors.neutral600 : theme.colors.neutral500};\n }\n\n &:hover svg path,\n &:focus svg path {\n fill: ${({ theme, disabled }) => !disabled && theme.colors.neutral600};\n }\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 RelationItemPlaceholder = () => (\n <Box\n paddingTop={2}\n paddingBottom={2}\n paddingLeft={4}\n paddingRight={4}\n hasRadius\n borderStyle=\"dashed\"\n borderColor=\"primary600\"\n borderWidth=\"1px\"\n background=\"primary100\"\n height={`calc(100% - ${RELATION_GUTTER}px)`}\n />\n);\n\nconst MemoizedRelationsField = React.memo(RelationsField);\nconst MemoizedUnstableRelationsField = React.memo(UnstableRelationsField);\n\nexport {\n MemoizedRelationsField as RelationsInput,\n MemoizedUnstableRelationsField as UnstableRelationsInput,\n FlexWrapper,\n DisconnectButton,\n LinkEllipsis,\n};\nexport type { RelationsFieldProps };\n"],"names":["ComponentProvider","useComponent","createContext","id","undefined","level","uid","type","useHandleDisconnect","fieldName","consumerName","field","useField","removeFieldRow","useForm","state","addFieldRow","handleDisconnect","relation","value","connect","indexOfRelationInConnectArray","findIndex","rel","apiData","documentId","locale","RELATIONS_TO_DISPLAY","ONE_WAY_RELATIONS","UnstableRelationsField","React","forwardRef","disabled","label","props","ref","currentPage","setCurrentPage","useState","document","model","documentModel","useDoc","formatMessage","useIntl","query","useQueryParams","params","buildValidParams","isMorph","attribute","toLowerCase","includes","isDisabled","componentId","componentUID","isSubmitting","useEffect","toString","targetField","name","split","slice","data","isLoading","isFetching","useGetRelationsQuery","pageSize","page","refetchOnMountOrArgChange","skip","selectFromResult","result","results","handleLoadMore","prev","isFetchingMoreRelations","realServerRelationsCount","pagination","total","relationsConnected","filter","length","relationsDisconnected","disconnect","relationsCount","relations","useMemo","ctx","href","COLLECTION_TYPES","targetModel","mainField","transformations","pipe","removeConnected","removeDisconnected","addLabelAndHref","transformedRels","sort","a","b","__temp_key__","handleConnect","lastItemInList","item","status","generateNKeysBetween","getRelationLabel","forEach","onChange","_jsxs","Flex","direction","gap","justifyContent","alignItems","wrap","StyledFlex","width","_jsx","RelationsInput","pageCount","TextButton","onClick","loading","startIcon","ArrowClockwise","shrink","getTranslation","defaultMessage","UnstableRelationsList","serverData","relationType","RelationsField","RelationsList","styled","connectedRelations","disconnectedRelations","map","hint","labelAction","placeholder","required","unique","_unique","_ariaLabel","textValue","setTextValue","searchParams","setSearchParams","_q","toggleNotification","useNotification","fieldRef","useFocusInputField","searchParamsDebounced","useDebounce","searchForTrigger","useLazySearchRelationsQuery","idsToInclude","idsToOmit","handleSearch","search","s","hasNextPage","options","handleChange","relationId","find","opt","console","error","message","useLayoutEffect","Field","Root","Label","action","Combobox","autocomplete","hasMoreItems","onOpenChange","noOptionsMessage","loadingMessage","onLoadMore","onTextValueChange","text","onInputChange","event","currentTarget","ComboboxOption","Typography","ellipsis","DocumentStatus","Error","Hint","RELATION_ITEM_HEIGHT","RELATION_GUTTER","ariaDescriptionId","useId","listRef","useRef","outerListRef","overflow","setOverflow","liveText","setLiveText","handleNativeScroll","e","el","target","parentScrollContainerHeight","parentNode","scrollHeight","maxScrollBottom","scrollTop","outerListRefCurrent","current","addEventListener","removeEventListener","getItemPos","index","handleMoveItem","newIndex","oldIndex","position","newData","currentRow","startKey","endKey","newKey","splice","reduce","acc","currentIndex","array","relationOnServer","oldRelation","relationInFront","before","publishedAt","end","relationWithPosition","toReversed","handleGrabItem","handleDropItem","_href","handleCancel","canReorder","dynamicListHeight","Math","min","ShadowBox","$overflowDirection","VisuallyHidden","aria-live","FixedSizeList","height","outerRef","itemCount","itemSize","itemData","ariaDescribedBy","canDrag","itemKey","innerElementType","UnstableListItem","ListItem","Box","CustomTextButton","theme","fontSizes","style","handlerId","isDragging","handleKeyDown","relationRef","dropRef","dragRef","dragPreviewRef","useDragAndDrop","ItemTypes","RELATION","displayedValue","onMoveItem","onDropItem","onGrabItem","onCancel","dropSensitivity","DROP_SENSITIVITY","REGULAR","composedRefs","useComposedRefs","getEmptyImage","tag","aria-describedby","cursor","RelationItemPlaceholder","paddingTop","paddingBottom","paddingLeft","paddingRight","hasRadius","borderColor","background","data-handler-id","FlexWrapper","IconButton","role","tabIndex","withTooltip","variant","onKeyDown","Drag","minWidth","Tooltip","description","log","size","Cross","LinkEllipsis","NavLink","to","isExternal","textColor","DisconnectButton","button","colors","neutral600","neutral500","Link","borderStyle","borderWidth","MemoizedRelationsField","memo","MemoizedUnstableRelationsField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;;;;;;;AAOC,UACK,CAACA,iBAAAA,EAAmBC,YAAa,CAAA,GAAGC,0BAAqC,kBAAoB,EAAA;IACjGC,E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