@strapi/content-manager 0.0.0-experimental.c2680dea29af0c9e9a69c0474b40c8c2ab6f70ac → 0.0.0-experimental.c4796a8a857b6e4d1d5ce6bd2606f6438e63962f

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 (450) hide show
  1. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js +80 -0
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js.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-BqW-t7Lr.js +276 -0
  6. package/dist/admin/chunks/ComponentConfigurationPage-BqW-t7Lr.js.map +1 -0
  7. package/dist/admin/chunks/ComponentConfigurationPage-CM3vQxyp.js +298 -0
  8. package/dist/admin/chunks/ComponentConfigurationPage-CM3vQxyp.js.map +1 -0
  9. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js +153 -0
  10. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js.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-CIKO27N8.js +180 -0
  14. package/dist/admin/chunks/EditConfigurationPage-CIKO27N8.js.map +1 -0
  15. package/dist/admin/chunks/EditConfigurationPage-CYQ6mJWy.js +158 -0
  16. package/dist/admin/chunks/EditConfigurationPage-CYQ6mJWy.js.map +1 -0
  17. package/dist/admin/chunks/EditViewPage-CRu2G4OS.js +337 -0
  18. package/dist/admin/chunks/EditViewPage-CRu2G4OS.js.map +1 -0
  19. package/dist/admin/chunks/EditViewPage-DaY9aMeu.js +314 -0
  20. package/dist/admin/chunks/EditViewPage-DaY9aMeu.js.map +1 -0
  21. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js +56 -0
  22. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js.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--7s-Wsw1.js +978 -0
  26. package/dist/admin/chunks/Form--7s-Wsw1.js.map +1 -0
  27. package/dist/admin/chunks/Form-CX_f1AUZ.js +955 -0
  28. package/dist/admin/chunks/Form-CX_f1AUZ.js.map +1 -0
  29. package/dist/admin/chunks/History-SRih7tGq.js +1380 -0
  30. package/dist/admin/chunks/History-SRih7tGq.js.map +1 -0
  31. package/dist/admin/chunks/History-VVVFEAnd.js +1357 -0
  32. package/dist/admin/chunks/History-VVVFEAnd.js.map +1 -0
  33. package/dist/admin/chunks/Input-B3wbR0pJ.js +6754 -0
  34. package/dist/admin/chunks/Input-B3wbR0pJ.js.map +1 -0
  35. package/dist/admin/chunks/Input-BIRb1gP2.js +6785 -0
  36. package/dist/admin/chunks/Input-BIRb1gP2.js.map +1 -0
  37. package/dist/admin/chunks/ListConfigurationPage-BMBxgLtZ.js +795 -0
  38. package/dist/admin/chunks/ListConfigurationPage-BMBxgLtZ.js.map +1 -0
  39. package/dist/admin/chunks/ListConfigurationPage-DBWZlkHs.js +818 -0
  40. package/dist/admin/chunks/ListConfigurationPage-DBWZlkHs.js.map +1 -0
  41. package/dist/admin/chunks/ListViewPage-9jad22KO.js +1154 -0
  42. package/dist/admin/chunks/ListViewPage-9jad22KO.js.map +1 -0
  43. package/dist/admin/chunks/ListViewPage-Dq2zuPYL.js +1132 -0
  44. package/dist/admin/chunks/ListViewPage-Dq2zuPYL.js.map +1 -0
  45. package/dist/admin/chunks/NoContentTypePage-B5xX6Br5.js +59 -0
  46. package/dist/admin/chunks/NoContentTypePage-B5xX6Br5.js.map +1 -0
  47. package/dist/admin/chunks/NoContentTypePage-BtpSxTZs.js +57 -0
  48. package/dist/admin/chunks/NoContentTypePage-BtpSxTZs.js.map +1 -0
  49. package/dist/admin/chunks/NoPermissionsPage-CRS0hARz.js +38 -0
  50. package/dist/admin/chunks/NoPermissionsPage-CRS0hARz.js.map +1 -0
  51. package/dist/admin/chunks/NoPermissionsPage-HnOCsRtG.js +36 -0
  52. package/dist/admin/chunks/NoPermissionsPage-HnOCsRtG.js.map +1 -0
  53. package/dist/admin/chunks/Preview-BcggSPwn.js +435 -0
  54. package/dist/admin/chunks/Preview-BcggSPwn.js.map +1 -0
  55. package/dist/admin/chunks/Preview-DRtWRrYn.js +457 -0
  56. package/dist/admin/chunks/Preview-DRtWRrYn.js.map +1 -0
  57. package/dist/admin/chunks/Relations-B1i77Jba.js +826 -0
  58. package/dist/admin/chunks/Relations-B1i77Jba.js.map +1 -0
  59. package/dist/admin/chunks/Relations-BDe2e0a7.js +852 -0
  60. package/dist/admin/chunks/Relations-BDe2e0a7.js.map +1 -0
  61. package/dist/admin/chunks/ar-DckYq_WK.js +222 -0
  62. package/dist/admin/chunks/ar-DckYq_WK.js.map +1 -0
  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.js +197 -0
  68. package/dist/{_chunks/de-CCEmbAah.js.map → admin/chunks/ca-DviY7mRj.js.map} +1 -1
  69. package/dist/admin/chunks/cs-BJFxwIWj.js +126 -0
  70. package/dist/{_chunks/ms-BuFotyP_.js.map → admin/chunks/cs-BJFxwIWj.js.map} +1 -1
  71. package/dist/admin/chunks/cs-C7OSYFQ7.js +122 -0
  72. package/dist/{_chunks/cs-CkJy6B2v.js.map → admin/chunks/cs-C7OSYFQ7.js.map} +1 -1
  73. package/dist/admin/chunks/de-5QRlDHyR.js +195 -0
  74. package/dist/{_chunks/ja-7sfIbjxE.js.map → admin/chunks/de-5QRlDHyR.js.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-1xHet_GV.js +312 -0
  78. package/dist/{_chunks/en-CSxLmrh1.mjs.map → admin/chunks/en-1xHet_GV.js.map} +1 -1
  79. package/dist/admin/chunks/en-DB7sPJVj.js +307 -0
  80. package/dist/{_chunks/en-BzQmavmK.js.map → admin/chunks/en-DB7sPJVj.js.map} +1 -1
  81. package/dist/admin/chunks/es-C8vLuvZL.js +197 -0
  82. package/dist/admin/chunks/es-C8vLuvZL.js.map +1 -0
  83. package/dist/admin/chunks/es-DkoWSExG.js +192 -0
  84. package/dist/{_chunks/ko-woFZPmLk.js.map → admin/chunks/es-DkoWSExG.js.map} +1 -1
  85. package/dist/admin/chunks/eu-BG1xX7HK.js +198 -0
  86. package/dist/admin/chunks/eu-BG1xX7HK.js.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-CqAyDOmo.js +217 -0
  90. package/dist/admin/chunks/fr-CqAyDOmo.js.map +1 -0
  91. package/dist/admin/chunks/fr-Dm1xiZI5.js +212 -0
  92. package/dist/admin/chunks/fr-Dm1xiZI5.js.map +1 -0
  93. package/dist/admin/chunks/gu-D5MMMXRs.js +196 -0
  94. package/dist/admin/chunks/gu-D5MMMXRs.js.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.js +196 -0
  100. package/dist/admin/chunks/hi-lp17SCjr.js.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_.js +7 -0
  104. package/dist/admin/chunks/hooks-DMvik5y_.js.map +1 -0
  105. package/dist/admin/chunks/hu-CLka1U2C.js +198 -0
  106. package/dist/admin/chunks/hu-CLka1U2C.js.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.js +156 -0
  112. package/dist/admin/chunks/id-USfY9m1g.js.map +1 -0
  113. package/dist/admin/chunks/index-CKZHZ3ir.js +5339 -0
  114. package/dist/admin/chunks/index-CKZHZ3ir.js.map +1 -0
  115. package/dist/admin/chunks/index-DfEfFmQC.js +5273 -0
  116. package/dist/admin/chunks/index-DfEfFmQC.js.map +1 -0
  117. package/dist/admin/chunks/it-BAHrwmYS.js +158 -0
  118. package/dist/admin/chunks/it-BAHrwmYS.js.map +1 -0
  119. package/dist/admin/chunks/it-CQFpa_Dc.js +163 -0
  120. package/dist/{_chunks/es-9K52xZIr.js.map → admin/chunks/it-CQFpa_Dc.js.map} +1 -1
  121. package/dist/admin/chunks/ja-BWKmBJFT.js +192 -0
  122. package/dist/admin/chunks/ja-BWKmBJFT.js.map +1 -0
  123. package/dist/admin/chunks/ja-jdQM-B79.js +197 -0
  124. package/dist/admin/chunks/ja-jdQM-B79.js.map +1 -0
  125. package/dist/admin/chunks/ko-CgADGBNt.js +191 -0
  126. package/dist/admin/chunks/ko-CgADGBNt.js.map +1 -0
  127. package/dist/admin/chunks/ko-k46sEyzt.js +196 -0
  128. package/dist/admin/chunks/ko-k46sEyzt.js.map +1 -0
  129. package/dist/admin/chunks/layout-BN6DSZ4t.js +598 -0
  130. package/dist/admin/chunks/layout-BN6DSZ4t.js.map +1 -0
  131. package/dist/admin/chunks/layout-CX-A0s3P.js +618 -0
  132. package/dist/admin/chunks/layout-CX-A0s3P.js.map +1 -0
  133. package/dist/admin/chunks/ml-CnhCfOn_.js +196 -0
  134. package/dist/admin/chunks/ml-CnhCfOn_.js.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.js +140 -0
  138. package/dist/{_chunks/uk-C8EiqJY7.js.map → admin/chunks/ms-Bh09NFff.js.map} +1 -1
  139. package/dist/admin/chunks/ms-CvSC0OdG.js +145 -0
  140. package/dist/admin/chunks/ms-CvSC0OdG.js.map +1 -0
  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.js +198 -0
  144. package/dist/admin/chunks/nl-C8HYflTc.js.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.js +73 -0
  148. package/dist/admin/chunks/objects-wl73iEma.js.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.js +195 -0
  152. package/dist/admin/chunks/pl-MFCZJZuZ.js.map +1 -0
  153. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +202 -0
  154. package/dist/admin/chunks/pt-BR-CPtAXD-4.js.map +1 -0
  155. package/dist/admin/chunks/pt-BR-CcotyBGJ.js +197 -0
  156. package/dist/{_chunks/pt-BR-BiOz37D9.js.map → admin/chunks/pt-BR-CcotyBGJ.js.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.js +93 -0
  160. package/dist/admin/chunks/pt-HbmgeiYO.js.map +1 -0
  161. package/dist/admin/chunks/relations-CuPmv-zR.js +160 -0
  162. package/dist/admin/chunks/relations-CuPmv-zR.js.map +1 -0
  163. package/dist/admin/chunks/relations-xwSNlsdc.js +156 -0
  164. package/dist/admin/chunks/relations-xwSNlsdc.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.js +230 -0
  168. package/dist/admin/chunks/ru-CB4BUyQp.js.map +1 -0
  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.js +196 -0
  172. package/dist/admin/chunks/sa-n_aPA-pU.js.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.js +198 -0
  176. package/dist/admin/chunks/sk-tn_BDjE2.js.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.js +198 -0
  180. package/dist/admin/chunks/sv-cq4ZrQRd.js.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.js +144 -0
  184. package/dist/admin/chunks/th-mUH7hEtc.js.map +1 -0
  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.js +195 -0
  188. package/dist/admin/chunks/tr-Yt38daxh.js.map +1 -0
  189. package/dist/admin/chunks/uk-B24MoTVg.js +145 -0
  190. package/dist/admin/chunks/uk-B24MoTVg.js.map +1 -0
  191. package/dist/admin/chunks/uk-Cpgmm7gE.js +140 -0
  192. package/dist/admin/chunks/uk-Cpgmm7gE.js.map +1 -0
  193. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js +247 -0
  194. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js.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-CwGzb4ed.js +38 -0
  198. package/dist/admin/chunks/usePrev-CwGzb4ed.js.map +1 -0
  199. package/dist/admin/chunks/usePrev-tlgK0qPG.js +34 -0
  200. package/dist/admin/chunks/usePrev-tlgK0qPG.js.map +1 -0
  201. package/dist/admin/chunks/vi-BGr1X_HZ.js +112 -0
  202. package/dist/admin/chunks/vi-BGr1X_HZ.js.map +1 -0
  203. package/dist/admin/chunks/vi-CvBGlTjr.js +108 -0
  204. package/dist/{_chunks/vi-CJlYDheJ.js.map → admin/chunks/vi-CvBGlTjr.js.map} +1 -1
  205. package/dist/admin/chunks/zh-BmF-sHaT.js +205 -0
  206. package/dist/admin/chunks/zh-BmF-sHaT.js.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.js +934 -0
  210. package/dist/{_chunks/zh-Hans-9kOncHGw.js.map → admin/chunks/zh-Hans-CI0HKio3.js.map} +1 -1
  211. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +953 -0
  212. package/dist/{_chunks/zh-Hans-BPQcRIyH.mjs.map → admin/chunks/zh-Hans-JVK9x7xr.js.map} +1 -1
  213. package/dist/admin/index.js +23 -4
  214. package/dist/admin/index.js.map +1 -1
  215. package/dist/admin/index.mjs +16 -13
  216. package/dist/admin/index.mjs.map +1 -1
  217. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  218. package/dist/admin/src/hooks/useDocument.d.ts +21 -4
  219. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
  220. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
  221. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +27 -0
  222. package/dist/admin/src/pages/EditView/utils/data.d.ts +1 -0
  223. package/dist/admin/src/preview/index.d.ts +2 -3
  224. package/dist/admin/src/preview/pages/Preview.d.ts +1 -1
  225. package/dist/server/index.js +5453 -4377
  226. package/dist/server/index.js.map +1 -1
  227. package/dist/server/index.mjs +5433 -4355
  228. package/dist/server/index.mjs.map +1 -1
  229. package/dist/server/src/controllers/utils/metadata.d.ts +1 -1
  230. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  231. package/dist/server/src/history/controllers/history-version.d.ts +1 -1
  232. package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
  233. package/dist/server/src/history/services/history.d.ts +3 -3
  234. package/dist/server/src/history/services/history.d.ts.map +1 -1
  235. package/dist/server/src/history/services/utils.d.ts +6 -10
  236. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  237. package/dist/server/src/services/utils/count.d.ts +1 -1
  238. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  239. package/dist/server/src/services/utils/populate.d.ts +1 -1
  240. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  241. package/dist/shared/contracts/collection-types.d.ts +0 -1
  242. package/dist/shared/contracts/components.d.ts +0 -1
  243. package/dist/shared/contracts/content-types.d.ts +0 -1
  244. package/dist/shared/contracts/history-versions.d.ts +0 -1
  245. package/dist/shared/contracts/index.d.ts +0 -1
  246. package/dist/shared/contracts/init.d.ts +0 -1
  247. package/dist/shared/contracts/preview.d.ts +0 -1
  248. package/dist/shared/contracts/relations.d.ts +1 -2
  249. package/dist/shared/contracts/relations.d.ts.map +1 -1
  250. package/dist/shared/contracts/review-workflows.d.ts +0 -1
  251. package/dist/shared/contracts/single-types.d.ts +0 -1
  252. package/dist/shared/contracts/uid.d.ts +0 -1
  253. package/dist/shared/index.d.ts +0 -1
  254. package/dist/shared/index.js +35 -24
  255. package/dist/shared/index.js.map +1 -1
  256. package/dist/shared/index.mjs +34 -25
  257. package/dist/shared/index.mjs.map +1 -1
  258. package/package.json +14 -12
  259. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +0 -69
  260. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +0 -1
  261. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +0 -70
  262. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +0 -1
  263. package/dist/_chunks/ComponentConfigurationPage-CJPoOvy3.js +0 -254
  264. package/dist/_chunks/ComponentConfigurationPage-CJPoOvy3.js.map +0 -1
  265. package/dist/_chunks/ComponentConfigurationPage-CcRDqD0e.mjs +0 -236
  266. package/dist/_chunks/ComponentConfigurationPage-CcRDqD0e.mjs.map +0 -1
  267. package/dist/_chunks/ComponentIcon-CRbtQEUV.js +0 -175
  268. package/dist/_chunks/ComponentIcon-CRbtQEUV.js.map +0 -1
  269. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +0 -157
  270. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +0 -1
  271. package/dist/_chunks/EditConfigurationPage-C1ddZ_zf.mjs +0 -132
  272. package/dist/_chunks/EditConfigurationPage-C1ddZ_zf.mjs.map +0 -1
  273. package/dist/_chunks/EditConfigurationPage-CF3lxOy2.js +0 -150
  274. package/dist/_chunks/EditConfigurationPage-CF3lxOy2.js.map +0 -1
  275. package/dist/_chunks/EditViewPage-BPFcUbqi.mjs +0 -254
  276. package/dist/_chunks/EditViewPage-BPFcUbqi.mjs.map +0 -1
  277. package/dist/_chunks/EditViewPage-CDyTC6aU.js +0 -272
  278. package/dist/_chunks/EditViewPage-CDyTC6aU.js.map +0 -1
  279. package/dist/_chunks/Field-DuxAW9q2.js +0 -5647
  280. package/dist/_chunks/Field-DuxAW9q2.js.map +0 -1
  281. package/dist/_chunks/Field-fBnTwgU4.mjs +0 -5615
  282. package/dist/_chunks/Field-fBnTwgU4.mjs.map +0 -1
  283. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +0 -50
  284. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +0 -1
  285. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +0 -49
  286. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +0 -1
  287. package/dist/_chunks/Form-BGl7PhlZ.mjs +0 -758
  288. package/dist/_chunks/Form-BGl7PhlZ.mjs.map +0 -1
  289. package/dist/_chunks/Form-DSGh_zkz.js +0 -778
  290. package/dist/_chunks/Form-DSGh_zkz.js.map +0 -1
  291. package/dist/_chunks/History-DTYB9CSB.mjs +0 -975
  292. package/dist/_chunks/History-DTYB9CSB.mjs.map +0 -1
  293. package/dist/_chunks/History-DrDJv698.js +0 -995
  294. package/dist/_chunks/History-DrDJv698.js.map +0 -1
  295. package/dist/_chunks/ListConfigurationPage-qWx8r4D_.mjs +0 -633
  296. package/dist/_chunks/ListConfigurationPage-qWx8r4D_.mjs.map +0 -1
  297. package/dist/_chunks/ListConfigurationPage-zurIlUZ7.js +0 -652
  298. package/dist/_chunks/ListConfigurationPage-zurIlUZ7.js.map +0 -1
  299. package/dist/_chunks/ListViewPage-DTM2uO_S.js +0 -874
  300. package/dist/_chunks/ListViewPage-DTM2uO_S.js.map +0 -1
  301. package/dist/_chunks/ListViewPage-GKpL5p8A.mjs +0 -851
  302. package/dist/_chunks/ListViewPage-GKpL5p8A.mjs.map +0 -1
  303. package/dist/_chunks/NoContentTypePage-B5Vc5Cal.mjs +0 -51
  304. package/dist/_chunks/NoContentTypePage-B5Vc5Cal.mjs.map +0 -1
  305. package/dist/_chunks/NoContentTypePage-BuZlNroO.js +0 -51
  306. package/dist/_chunks/NoContentTypePage-BuZlNroO.js.map +0 -1
  307. package/dist/_chunks/NoPermissionsPage-BAZlWgJ4.mjs +0 -23
  308. package/dist/_chunks/NoPermissionsPage-BAZlWgJ4.mjs.map +0 -1
  309. package/dist/_chunks/NoPermissionsPage-DLzkS4Hy.js +0 -23
  310. package/dist/_chunks/NoPermissionsPage-DLzkS4Hy.js.map +0 -1
  311. package/dist/_chunks/Preview-VOJ8RuQp.js +0 -312
  312. package/dist/_chunks/Preview-VOJ8RuQp.js.map +0 -1
  313. package/dist/_chunks/Preview-Zzjg2_K_.mjs +0 -294
  314. package/dist/_chunks/Preview-Zzjg2_K_.mjs.map +0 -1
  315. package/dist/_chunks/Relations-BVdRfDkW.mjs +0 -728
  316. package/dist/_chunks/Relations-BVdRfDkW.mjs.map +0 -1
  317. package/dist/_chunks/Relations-Dsj0boFJ.js +0 -747
  318. package/dist/_chunks/Relations-Dsj0boFJ.js.map +0 -1
  319. package/dist/_chunks/ar-BUUWXIYu.js +0 -226
  320. package/dist/_chunks/ar-BUUWXIYu.js.map +0 -1
  321. package/dist/_chunks/ar-CCEVvqGG.mjs +0 -226
  322. package/dist/_chunks/ar-CCEVvqGG.mjs.map +0 -1
  323. package/dist/_chunks/ca-5U32ON2v.mjs +0 -201
  324. package/dist/_chunks/ca-5U32ON2v.mjs.map +0 -1
  325. package/dist/_chunks/ca-Cmk45QO6.js +0 -201
  326. package/dist/_chunks/cs-CM2aBUar.mjs +0 -125
  327. package/dist/_chunks/cs-CM2aBUar.mjs.map +0 -1
  328. package/dist/_chunks/cs-CkJy6B2v.js +0 -125
  329. package/dist/_chunks/de-C72KDNOl.mjs +0 -199
  330. package/dist/_chunks/de-C72KDNOl.mjs.map +0 -1
  331. package/dist/_chunks/de-CCEmbAah.js +0 -199
  332. package/dist/_chunks/en-BzQmavmK.js +0 -310
  333. package/dist/_chunks/en-CSxLmrh1.mjs +0 -310
  334. package/dist/_chunks/es-9K52xZIr.js +0 -196
  335. package/dist/_chunks/es-D34tqjMw.mjs +0 -196
  336. package/dist/_chunks/es-D34tqjMw.mjs.map +0 -1
  337. package/dist/_chunks/eu-CdALomew.mjs +0 -202
  338. package/dist/_chunks/eu-CdALomew.mjs.map +0 -1
  339. package/dist/_chunks/eu-VDH-3ovk.js +0 -202
  340. package/dist/_chunks/fr--pg5jUbt.mjs +0 -216
  341. package/dist/_chunks/fr--pg5jUbt.mjs.map +0 -1
  342. package/dist/_chunks/fr-B2Kyv8Z9.js +0 -216
  343. package/dist/_chunks/fr-B2Kyv8Z9.js.map +0 -1
  344. package/dist/_chunks/gu-BRmF601H.js +0 -200
  345. package/dist/_chunks/gu-CNpaMDpH.mjs +0 -200
  346. package/dist/_chunks/gu-CNpaMDpH.mjs.map +0 -1
  347. package/dist/_chunks/hi-CCJBptSq.js +0 -200
  348. package/dist/_chunks/hi-CCJBptSq.js.map +0 -1
  349. package/dist/_chunks/hi-Dwvd04m3.mjs +0 -200
  350. package/dist/_chunks/hi-Dwvd04m3.mjs.map +0 -1
  351. package/dist/_chunks/hooks-BAaaKPS_.js.map +0 -1
  352. package/dist/_chunks/hooks-E5u1mcgM.mjs +0 -8
  353. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +0 -1
  354. package/dist/_chunks/hu-CeYvaaO0.mjs +0 -202
  355. package/dist/_chunks/hu-CeYvaaO0.mjs.map +0 -1
  356. package/dist/_chunks/hu-sNV_yLYy.js +0 -202
  357. package/dist/_chunks/hu-sNV_yLYy.js.map +0 -1
  358. package/dist/_chunks/id-B5Ser98A.js +0 -160
  359. package/dist/_chunks/id-B5Ser98A.js.map +0 -1
  360. package/dist/_chunks/id-BtwA9WJT.mjs +0 -160
  361. package/dist/_chunks/id-BtwA9WJT.mjs.map +0 -1
  362. package/dist/_chunks/index-Bu_-B7ZA.mjs +0 -4284
  363. package/dist/_chunks/index-Bu_-B7ZA.mjs.map +0 -1
  364. package/dist/_chunks/index-Ct-GZ0iV.js +0 -4303
  365. package/dist/_chunks/index-Ct-GZ0iV.js.map +0 -1
  366. package/dist/_chunks/it-BrVPqaf1.mjs +0 -162
  367. package/dist/_chunks/it-BrVPqaf1.mjs.map +0 -1
  368. package/dist/_chunks/it-DkBIs7vD.js +0 -162
  369. package/dist/_chunks/ja-7sfIbjxE.js +0 -196
  370. package/dist/_chunks/ja-BHqhDq4V.mjs +0 -196
  371. package/dist/_chunks/ja-BHqhDq4V.mjs.map +0 -1
  372. package/dist/_chunks/ko-HVQRlfUI.mjs +0 -195
  373. package/dist/_chunks/ko-HVQRlfUI.mjs.map +0 -1
  374. package/dist/_chunks/ko-woFZPmLk.js +0 -195
  375. package/dist/_chunks/layout-CDBEgRsM.js +0 -488
  376. package/dist/_chunks/layout-CDBEgRsM.js.map +0 -1
  377. package/dist/_chunks/layout-COzAvgJh.mjs +0 -471
  378. package/dist/_chunks/layout-COzAvgJh.mjs.map +0 -1
  379. package/dist/_chunks/ml-BihZwQit.mjs +0 -200
  380. package/dist/_chunks/ml-BihZwQit.mjs.map +0 -1
  381. package/dist/_chunks/ml-C2W8N8k1.js +0 -200
  382. package/dist/_chunks/ml-C2W8N8k1.js.map +0 -1
  383. package/dist/_chunks/ms-BuFotyP_.js +0 -144
  384. package/dist/_chunks/ms-m_WjyWx7.mjs +0 -144
  385. package/dist/_chunks/ms-m_WjyWx7.mjs.map +0 -1
  386. package/dist/_chunks/nl-D4R9gHx5.mjs +0 -202
  387. package/dist/_chunks/nl-D4R9gHx5.mjs.map +0 -1
  388. package/dist/_chunks/nl-bbEOHChV.js +0 -202
  389. package/dist/_chunks/nl-bbEOHChV.js.map +0 -1
  390. package/dist/_chunks/objects-BcXOv6_9.js +0 -47
  391. package/dist/_chunks/objects-BcXOv6_9.js.map +0 -1
  392. package/dist/_chunks/objects-D6yBsdmx.mjs +0 -45
  393. package/dist/_chunks/objects-D6yBsdmx.mjs.map +0 -1
  394. package/dist/_chunks/pl-sbx9mSt_.mjs +0 -199
  395. package/dist/_chunks/pl-sbx9mSt_.mjs.map +0 -1
  396. package/dist/_chunks/pl-uzwG-hk7.js +0 -199
  397. package/dist/_chunks/pl-uzwG-hk7.js.map +0 -1
  398. package/dist/_chunks/pt-BR-BiOz37D9.js +0 -201
  399. package/dist/_chunks/pt-BR-C71iDxnh.mjs +0 -201
  400. package/dist/_chunks/pt-BR-C71iDxnh.mjs.map +0 -1
  401. package/dist/_chunks/pt-BsaFvS8-.mjs +0 -95
  402. package/dist/_chunks/pt-BsaFvS8-.mjs.map +0 -1
  403. package/dist/_chunks/pt-CeXQuq50.js +0 -95
  404. package/dist/_chunks/pt-CeXQuq50.js.map +0 -1
  405. package/dist/_chunks/relations-BjiF1Aad.js +0 -133
  406. package/dist/_chunks/relations-BjiF1Aad.js.map +0 -1
  407. package/dist/_chunks/relations-BtmMFBpM.mjs +0 -134
  408. package/dist/_chunks/relations-BtmMFBpM.mjs.map +0 -1
  409. package/dist/_chunks/ru-BE6A4Exp.mjs +0 -231
  410. package/dist/_chunks/ru-BE6A4Exp.mjs.map +0 -1
  411. package/dist/_chunks/ru-BT3ybNny.js +0 -231
  412. package/dist/_chunks/sa-CcvkYInH.js +0 -200
  413. package/dist/_chunks/sa-CcvkYInH.js.map +0 -1
  414. package/dist/_chunks/sa-Dag0k-Z8.mjs +0 -200
  415. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +0 -1
  416. package/dist/_chunks/sk-BFg-R8qJ.mjs +0 -202
  417. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +0 -1
  418. package/dist/_chunks/sk-CvY09Xjv.js +0 -202
  419. package/dist/_chunks/sk-CvY09Xjv.js.map +0 -1
  420. package/dist/_chunks/sv-CUnfWGsh.mjs +0 -202
  421. package/dist/_chunks/sv-CUnfWGsh.mjs.map +0 -1
  422. package/dist/_chunks/sv-MYDuzgvT.js +0 -202
  423. package/dist/_chunks/sv-MYDuzgvT.js.map +0 -1
  424. package/dist/_chunks/th-BqbI8lIT.mjs +0 -148
  425. package/dist/_chunks/th-BqbI8lIT.mjs.map +0 -1
  426. package/dist/_chunks/th-D9_GfAjc.js +0 -148
  427. package/dist/_chunks/tr-CgeK3wJM.mjs +0 -199
  428. package/dist/_chunks/tr-CgeK3wJM.mjs.map +0 -1
  429. package/dist/_chunks/tr-D9UH-O_R.js +0 -199
  430. package/dist/_chunks/tr-D9UH-O_R.js.map +0 -1
  431. package/dist/_chunks/uk-C8EiqJY7.js +0 -144
  432. package/dist/_chunks/uk-CR-zDhAY.mjs +0 -144
  433. package/dist/_chunks/uk-CR-zDhAY.mjs.map +0 -1
  434. package/dist/_chunks/useDebounce-CtcjDB3L.js +0 -28
  435. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +0 -1
  436. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +0 -29
  437. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +0 -1
  438. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js +0 -245
  439. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +0 -1
  440. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs +0 -228
  441. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +0 -1
  442. package/dist/_chunks/vi-CJlYDheJ.js +0 -111
  443. package/dist/_chunks/vi-DUXIk_fw.mjs +0 -111
  444. package/dist/_chunks/vi-DUXIk_fw.mjs.map +0 -1
  445. package/dist/_chunks/zh-BWZspA60.mjs +0 -209
  446. package/dist/_chunks/zh-BWZspA60.mjs.map +0 -1
  447. package/dist/_chunks/zh-CQQfszqR.js +0 -209
  448. package/dist/_chunks/zh-CQQfszqR.js.map +0 -1
  449. package/dist/_chunks/zh-Hans-9kOncHGw.js +0 -952
  450. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +0 -952
@@ -0,0 +1,826 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { createContext, useQueryParams, useForm, useField, useNotification, useFocusInputField } from '@strapi/admin/strapi-admin';
4
+ import { Flex, Box, Link, TextButton, Field, Combobox, ComboboxOption, Typography, VisuallyHidden, useComposedRefs, IconButton, Tooltip } from '@strapi/design-system';
5
+ import { ArrowClockwise, Drag, Cross } from '@strapi/icons';
6
+ import { generateNKeysBetween } from 'fractional-indexing';
7
+ import pipe from 'lodash/fp/pipe';
8
+ import { getEmptyImage } from 'react-dnd-html5-backend';
9
+ import { useIntl } from 'react-intl';
10
+ import { NavLink } from 'react-router-dom';
11
+ import { FixedSizeList } from 'react-window';
12
+ import { styled } from 'styled-components';
13
+ import { c as useDoc, d as buildValidParams, C as COLLECTION_TYPES, g as getTranslation, D as DocumentStatus } from './index-DfEfFmQC.js';
14
+ import { u as useDragAndDrop, I as ItemTypes, D as DROP_SENSITIVITY } from './useDragAndDrop-HYwNDExe.js';
15
+ import { u as useGetRelationsQuery, g as getRelationLabel, a as useLazySearchRelationsQuery } from './relations-xwSNlsdc.js';
16
+
17
+ /**
18
+ * We use this component to wrap any individual component field in the Edit View,
19
+ * this could be a component field in a dynamic zone, a component within a repeatable space,
20
+ * or even nested components.
21
+ *
22
+ * We primarily need this to provide the component id to the components so that they can
23
+ * correctly fetch their relations.
24
+ */ const [ComponentProvider, useComponent] = createContext('ComponentContext', {
25
+ id: undefined,
26
+ level: -1,
27
+ uid: undefined,
28
+ type: undefined
29
+ });
30
+
31
+ /**
32
+ * Remove a relation, whether it's been already saved or not.
33
+ * It's used both in RelationsList, where the "remove relation" button is, and in the input,
34
+ * because we sometimes need to remove a previous relation when selecting a new one.
35
+ */ function useHandleDisconnect(fieldName, consumerName) {
36
+ const field = useField(fieldName);
37
+ const removeFieldRow = useForm(consumerName, (state)=>state.removeFieldRow);
38
+ const addFieldRow = useForm(consumerName, (state)=>state.addFieldRow);
39
+ const handleDisconnect = (relation)=>{
40
+ if (field.value && field.value.connect) {
41
+ /**
42
+ * A relation will exist in the `connect` array _if_ it has
43
+ * been added without saving. In this case, we just remove it
44
+ * from the connect array
45
+ */ const indexOfRelationInConnectArray = field.value.connect.findIndex((rel)=>rel.id === relation.id);
46
+ if (indexOfRelationInConnectArray >= 0) {
47
+ removeFieldRow(`${fieldName}.connect`, indexOfRelationInConnectArray);
48
+ return;
49
+ }
50
+ }
51
+ addFieldRow(`${fieldName}.disconnect`, {
52
+ id: relation.id,
53
+ apiData: {
54
+ id: relation.id,
55
+ documentId: relation.documentId,
56
+ locale: relation.locale
57
+ }
58
+ });
59
+ };
60
+ return handleDisconnect;
61
+ }
62
+ /* -------------------------------------------------------------------------------------------------
63
+ * RelationsField
64
+ * -----------------------------------------------------------------------------------------------*/ const RELATIONS_TO_DISPLAY = 5;
65
+ const ONE_WAY_RELATIONS = [
66
+ 'oneWay',
67
+ 'oneToOne',
68
+ 'manyToOne',
69
+ 'oneToManyMorph',
70
+ 'oneToOneMorph'
71
+ ];
72
+ /**
73
+ * TODO: we get a rather ugly flash when we remove a single relation from the list leaving
74
+ * no other relations when we press save. The initial relation re-renders, probably because
75
+ * of the lag in the Form cleaning it's "disconnect" array, whilst our data has not been invalidated.
76
+ *
77
+ * Could we invalidate relation data on the document actions? Should we?
78
+ */ /**
79
+ * @internal
80
+ * @description The relations field holds a lot of domain logic for handling relations which is rather complicated
81
+ * At present we do not expose this to plugin developers, however, they are able to overwrite it themselves should
82
+ * they wish to do so.
83
+ */ const RelationsField = /*#__PURE__*/ React.forwardRef(({ disabled, label, ...props }, ref)=>{
84
+ const [currentPage, setCurrentPage] = React.useState(1);
85
+ const { document, model: documentModel } = useDoc();
86
+ const documentId = document?.documentId;
87
+ const { formatMessage } = useIntl();
88
+ const [{ query }] = useQueryParams();
89
+ const params = buildValidParams(query);
90
+ const isMorph = props.attribute.relation.toLowerCase().includes('morph');
91
+ const isDisabled = isMorph || disabled;
92
+ const { componentId, componentUID } = useComponent('RelationsField', ({ uid, id })=>({
93
+ componentId: id,
94
+ componentUID: uid
95
+ }));
96
+ const isSubmitting = useForm('RelationsList', (state)=>state.isSubmitting);
97
+ React.useEffect(()=>{
98
+ setCurrentPage(1);
99
+ }, [
100
+ isSubmitting
101
+ ]);
102
+ /**
103
+ * We'll always have a documentId in a created entry, so we look for a componentId first.
104
+ * Same with `uid` and `documentModel`.
105
+ */ const id = componentId ? componentId.toString() : documentId;
106
+ const model = componentUID ?? documentModel;
107
+ /**
108
+ * The `name` prop is a complete path to the field, e.g. `field1.field2.field3`.
109
+ * Where the above example would a nested field within two components, however
110
+ * we only require the field on the component not the complete path since we query
111
+ * individual components. Therefore we split the string and take the last item.
112
+ */ const [targetField] = props.name.split('.').slice(-1);
113
+ const { data, isLoading, isFetching } = useGetRelationsQuery({
114
+ model,
115
+ targetField,
116
+ // below we don't run the query if there is no id.
117
+ id: id,
118
+ params: {
119
+ ...params,
120
+ pageSize: RELATIONS_TO_DISPLAY,
121
+ page: currentPage
122
+ }
123
+ }, {
124
+ refetchOnMountOrArgChange: true,
125
+ skip: !id,
126
+ selectFromResult: (result)=>{
127
+ return {
128
+ ...result,
129
+ data: {
130
+ ...result.data,
131
+ results: result.data?.results ? result.data.results : []
132
+ }
133
+ };
134
+ }
135
+ });
136
+ const handleLoadMore = ()=>{
137
+ setCurrentPage((prev)=>prev + 1);
138
+ };
139
+ const field = useField(props.name);
140
+ const isFetchingMoreRelations = isLoading || isFetching;
141
+ const realServerRelationsCount = 'pagination' in data && data.pagination ? data.pagination.total : 0;
142
+ /**
143
+ * Items that are already connected, but reordered would be in
144
+ * this list, so to get an accurate figure, we remove them.
145
+ */ const relationsConnected = (field.value?.connect ?? []).filter((rel)=>data.results.findIndex((relation)=>relation.id === rel.id) === -1).length ?? 0;
146
+ const relationsDisconnected = field.value?.disconnect?.length ?? 0;
147
+ const relationsCount = realServerRelationsCount + relationsConnected - relationsDisconnected;
148
+ /**
149
+ * This is it, the source of truth for reordering in conjunction with partial loading & updating
150
+ * of relations. Relations on load are given __temp_key__ when fetched, because we don't want to
151
+ * create brand new keys everytime the data updates, just keep adding them onto the newly loaded ones.
152
+ */ const relations = React.useMemo(()=>{
153
+ const ctx = {
154
+ field: field.value,
155
+ // @ts-expect-error – targetModel does exist on the attribute. But it's not typed.
156
+ href: `../${COLLECTION_TYPES}/${props.attribute.targetModel}`,
157
+ mainField: props.mainField
158
+ };
159
+ /**
160
+ * Tidy up our data.
161
+ */ const transformations = pipe(removeConnected(ctx), removeDisconnected(ctx), addLabelAndHref(ctx));
162
+ const transformedRels = transformations([
163
+ ...data.results
164
+ ]);
165
+ /**
166
+ * THIS IS CRUCIAL. If you don't sort by the __temp_key__ which comes from fractional indexing
167
+ * then the list will be in the wrong order.
168
+ */ return [
169
+ ...transformedRels,
170
+ ...field.value?.connect ?? []
171
+ ].sort((a, b)=>{
172
+ if (a.__temp_key__ < b.__temp_key__) return -1;
173
+ if (a.__temp_key__ > b.__temp_key__) return 1;
174
+ return 0;
175
+ });
176
+ }, [
177
+ data.results,
178
+ field.value,
179
+ // @ts-expect-error – targetModel does exist on the attribute. But it's not typed.
180
+ props.attribute.targetModel,
181
+ props.mainField
182
+ ]);
183
+ const handleDisconnect = useHandleDisconnect(props.name, 'RelationsField');
184
+ const handleConnect = (relation)=>{
185
+ const [lastItemInList] = relations.slice(-1);
186
+ const item = {
187
+ id: relation.id,
188
+ apiData: {
189
+ id: relation.id,
190
+ documentId: relation.documentId,
191
+ locale: relation.locale
192
+ },
193
+ status: relation.status,
194
+ /**
195
+ * If there's a last item, that's the first key we use to generate out next one.
196
+ */ __temp_key__: generateNKeysBetween(lastItemInList?.__temp_key__ ?? null, null, 1)[0],
197
+ // Fallback to `id` if there is no `mainField` value, which will overwrite the above `id` property with the exact same data.
198
+ [props.mainField?.name ?? 'documentId']: relation[props.mainField?.name ?? 'documentId'],
199
+ label: getRelationLabel(relation, props.mainField),
200
+ // @ts-expect-error – targetModel does exist on the attribute, but it's not typed.
201
+ href: `../${COLLECTION_TYPES}/${props.attribute.targetModel}/${relation.documentId}?${relation.locale ? `plugins[i18n][locale]=${relation.locale}` : ''}`
202
+ };
203
+ if (ONE_WAY_RELATIONS.includes(props.attribute.relation)) {
204
+ // Remove any existing relation so they can be replaced with the new one
205
+ field.value?.connect?.forEach(handleDisconnect);
206
+ relations.forEach(handleDisconnect);
207
+ field.onChange(`${props.name}.connect`, [
208
+ item
209
+ ]);
210
+ } else {
211
+ field.onChange(`${props.name}.connect`, [
212
+ ...field.value?.connect ?? [],
213
+ item
214
+ ]);
215
+ }
216
+ };
217
+ return /*#__PURE__*/ jsxs(Flex, {
218
+ ref: ref,
219
+ direction: "column",
220
+ gap: 3,
221
+ justifyContent: "space-between",
222
+ alignItems: "stretch",
223
+ wrap: "wrap",
224
+ children: [
225
+ /*#__PURE__*/ jsxs(StyledFlex, {
226
+ direction: "column",
227
+ alignItems: "start",
228
+ gap: 2,
229
+ width: "100%",
230
+ children: [
231
+ /*#__PURE__*/ jsx(RelationsInput, {
232
+ disabled: isDisabled,
233
+ // NOTE: we should not default to using the documentId if the component is being created (componentUID is undefined)
234
+ id: componentUID ? componentId ? `${componentId}` : '' : documentId,
235
+ label: `${label} ${relationsCount > 0 ? `(${relationsCount})` : ''}`,
236
+ model: model,
237
+ onChange: handleConnect,
238
+ ...props
239
+ }),
240
+ 'pagination' in data && data.pagination && data.pagination.pageCount > data.pagination.page ? /*#__PURE__*/ jsx(TextButton, {
241
+ disabled: isFetchingMoreRelations,
242
+ onClick: handleLoadMore,
243
+ loading: isFetchingMoreRelations,
244
+ startIcon: /*#__PURE__*/ jsx(ArrowClockwise, {}),
245
+ // prevent the label from line-wrapping
246
+ shrink: 0,
247
+ children: formatMessage({
248
+ id: getTranslation('relation.loadMore'),
249
+ defaultMessage: 'Load More'
250
+ })
251
+ }) : null
252
+ ]
253
+ }),
254
+ /*#__PURE__*/ jsx(RelationsList, {
255
+ data: relations,
256
+ serverData: data.results,
257
+ disabled: isDisabled,
258
+ name: props.name,
259
+ isLoading: isFetchingMoreRelations,
260
+ relationType: props.attribute.relation
261
+ })
262
+ ]
263
+ });
264
+ });
265
+ /**
266
+ * TODO: this can be removed once we stop shipping Inputs with
267
+ * labels wrapped round in DS@2.
268
+ */ const StyledFlex = styled(Flex)`
269
+ & > div {
270
+ width: 100%;
271
+ }
272
+ `;
273
+ /**
274
+ * If it's in the connected array, it can get out of our data array,
275
+ * we'll be putting it back in later and sorting it anyway.
276
+ */ const removeConnected = ({ field })=>(relations)=>{
277
+ return relations.filter((relation)=>{
278
+ const connectedRelations = field?.connect ?? [];
279
+ return connectedRelations.findIndex((rel)=>rel.id === relation.id) === -1;
280
+ });
281
+ };
282
+ /**
283
+ * @description Removes relations that are in the `disconnect` array of the field
284
+ */ const removeDisconnected = ({ field })=>(relations)=>relations.filter((relation)=>{
285
+ const disconnectedRelations = field?.disconnect ?? [];
286
+ return disconnectedRelations.findIndex((rel)=>rel.id === relation.id) === -1;
287
+ });
288
+ /**
289
+ * @description Adds a label and href to the relation object we use this to render
290
+ * a better UI where we can link to the relation and display a human-readable label.
291
+ */ const addLabelAndHref = ({ mainField, href })=>(relations)=>relations.map((relation)=>{
292
+ return {
293
+ ...relation,
294
+ // Fallback to `id` if there is no `mainField` value, which will overwrite the above `documentId` property with the exact same data.
295
+ [mainField?.name ?? 'documentId']: relation[mainField?.name ?? 'documentId'],
296
+ label: getRelationLabel(relation, mainField),
297
+ href: `${href}/${relation.documentId}?${relation.locale ? `plugins[i18n][locale]=${relation.locale}` : ''}`
298
+ };
299
+ });
300
+ /**
301
+ * @description Contains all the logic for the combobox that can search
302
+ * for relations and then add them to the field's connect array.
303
+ */ const RelationsInput = ({ hint, id, model, label, labelAction, name, mainField, placeholder, required, unique: _unique, 'aria-label': _ariaLabel, onChange, ...props })=>{
304
+ const [textValue, setTextValue] = React.useState('');
305
+ const [searchParams, setSearchParams] = React.useState({
306
+ _q: '',
307
+ page: 1
308
+ });
309
+ const { toggleNotification } = useNotification();
310
+ const [{ query }] = useQueryParams();
311
+ const { formatMessage } = useIntl();
312
+ const fieldRef = useFocusInputField(name);
313
+ const field = useField(name);
314
+ const [searchForTrigger, { data, isLoading }] = useLazySearchRelationsQuery();
315
+ /**
316
+ * Because we're using a lazy query, we need to trigger the search
317
+ * when the component mounts and when the search params change.
318
+ * We also need to trigger the search when the field value changes
319
+ * so that we can filter out the relations that are already connected.
320
+ */ React.useEffect(()=>{
321
+ /**
322
+ * The `name` prop is a complete path to the field, e.g. `field1.field2.field3`.
323
+ * Where the above example would a nested field within two components, however
324
+ * we only require the field on the component not the complete path since we query
325
+ * individual components. Therefore we split the string and take the last item.
326
+ */ const [targetField] = name.split('.').slice(-1);
327
+ searchForTrigger({
328
+ model,
329
+ targetField,
330
+ params: {
331
+ ...buildValidParams(query),
332
+ id: id ?? '',
333
+ pageSize: 10,
334
+ idsToInclude: field.value?.disconnect?.map((rel)=>rel.id.toString()) ?? [],
335
+ idsToOmit: field.value?.connect?.map((rel)=>rel.id.toString()) ?? [],
336
+ ...searchParams
337
+ }
338
+ });
339
+ }, [
340
+ field.value?.connect,
341
+ field.value?.disconnect,
342
+ id,
343
+ model,
344
+ name,
345
+ query,
346
+ searchForTrigger,
347
+ searchParams
348
+ ]);
349
+ const handleSearch = async (search)=>{
350
+ setSearchParams((s)=>({
351
+ ...s,
352
+ _q: search,
353
+ page: 1
354
+ }));
355
+ };
356
+ const hasNextPage = data?.pagination ? data.pagination.page < data.pagination.pageCount : false;
357
+ const options = data?.results ?? [];
358
+ const handleChange = (relationId)=>{
359
+ if (!relationId) {
360
+ return;
361
+ }
362
+ const relation = options.find((opt)=>opt.id.toString() === relationId);
363
+ if (!relation) {
364
+ // This is very unlikely to happen, but it ensures we don't have any data for.
365
+ console.error("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.");
366
+ toggleNotification({
367
+ message: formatMessage({
368
+ id: getTranslation('relation.error-adding-relation'),
369
+ defaultMessage: 'An error occurred while trying to add the relation.'
370
+ }),
371
+ type: 'danger'
372
+ });
373
+ return;
374
+ }
375
+ /**
376
+ * You need to give this relation a correct _temp_key_ but
377
+ * this component doesn't know about those ones, you can't rely
378
+ * on the connect array because that doesn't hold items that haven't
379
+ * moved. So use a callback to fill in the gaps when connecting.
380
+ *
381
+ */ onChange(relation);
382
+ };
383
+ const handleLoadMore = ()=>{
384
+ if (!data || !data.pagination) {
385
+ return;
386
+ } else if (data.pagination.page < data.pagination.pageCount) {
387
+ setSearchParams((s)=>({
388
+ ...s,
389
+ page: s.page + 1
390
+ }));
391
+ }
392
+ };
393
+ React.useLayoutEffect(()=>{
394
+ setTextValue('');
395
+ }, [
396
+ field.value
397
+ ]);
398
+ return /*#__PURE__*/ jsxs(Field.Root, {
399
+ error: field.error,
400
+ hint: hint,
401
+ name: name,
402
+ required: required,
403
+ children: [
404
+ /*#__PURE__*/ jsx(Field.Label, {
405
+ action: labelAction,
406
+ children: label
407
+ }),
408
+ /*#__PURE__*/ jsx(Combobox, {
409
+ ref: fieldRef,
410
+ name: name,
411
+ autocomplete: "list",
412
+ placeholder: placeholder || formatMessage({
413
+ id: getTranslation('relation.add'),
414
+ defaultMessage: 'Add relation'
415
+ }),
416
+ hasMoreItems: hasNextPage,
417
+ loading: isLoading,
418
+ onOpenChange: ()=>{
419
+ handleSearch(textValue ?? '');
420
+ },
421
+ noOptionsMessage: ()=>formatMessage({
422
+ id: getTranslation('relation.notAvailable'),
423
+ defaultMessage: 'No relations available'
424
+ }),
425
+ loadingMessage: formatMessage({
426
+ id: getTranslation('relation.isLoading'),
427
+ defaultMessage: 'Relations are loading'
428
+ }),
429
+ onLoadMore: handleLoadMore,
430
+ textValue: textValue,
431
+ onChange: handleChange,
432
+ onTextValueChange: (text)=>{
433
+ setTextValue(text);
434
+ },
435
+ onInputChange: (event)=>{
436
+ handleSearch(event.currentTarget.value);
437
+ },
438
+ ...props,
439
+ children: options.map((opt)=>{
440
+ const textValue = getRelationLabel(opt, mainField);
441
+ return /*#__PURE__*/ jsx(ComboboxOption, {
442
+ value: opt.id.toString(),
443
+ textValue: textValue,
444
+ children: /*#__PURE__*/ jsxs(Flex, {
445
+ gap: 2,
446
+ justifyContent: "space-between",
447
+ children: [
448
+ /*#__PURE__*/ jsx(Typography, {
449
+ ellipsis: true,
450
+ children: textValue
451
+ }),
452
+ opt.status ? /*#__PURE__*/ jsx(DocumentStatus, {
453
+ status: opt.status
454
+ }) : null
455
+ ]
456
+ })
457
+ }, opt.id);
458
+ })
459
+ }),
460
+ /*#__PURE__*/ jsx(Field.Error, {}),
461
+ /*#__PURE__*/ jsx(Field.Hint, {})
462
+ ]
463
+ });
464
+ };
465
+ /* -------------------------------------------------------------------------------------------------
466
+ * RelationsList
467
+ * -----------------------------------------------------------------------------------------------*/ const RELATION_ITEM_HEIGHT = 50;
468
+ const RELATION_GUTTER = 4;
469
+ const RelationsList = ({ data, serverData, disabled, name, isLoading, relationType })=>{
470
+ const ariaDescriptionId = React.useId();
471
+ const { formatMessage } = useIntl();
472
+ const listRef = React.useRef(null);
473
+ const outerListRef = React.useRef(null);
474
+ const [overflow, setOverflow] = React.useState();
475
+ const [liveText, setLiveText] = React.useState('');
476
+ const field = useField(name);
477
+ React.useEffect(()=>{
478
+ if (data.length <= RELATIONS_TO_DISPLAY) {
479
+ return setOverflow(undefined);
480
+ }
481
+ const handleNativeScroll = (e)=>{
482
+ const el = e.target;
483
+ const parentScrollContainerHeight = el.parentNode.scrollHeight;
484
+ const maxScrollBottom = el.scrollHeight - el.scrollTop;
485
+ if (el.scrollTop === 0) {
486
+ return setOverflow('bottom');
487
+ }
488
+ if (maxScrollBottom === parentScrollContainerHeight) {
489
+ return setOverflow('top');
490
+ }
491
+ return setOverflow('top-bottom');
492
+ };
493
+ const outerListRefCurrent = outerListRef?.current;
494
+ if (!isLoading && data.length > 0 && outerListRefCurrent) {
495
+ outerListRef.current.addEventListener('scroll', handleNativeScroll);
496
+ }
497
+ return ()=>{
498
+ if (outerListRefCurrent) {
499
+ outerListRefCurrent.removeEventListener('scroll', handleNativeScroll);
500
+ }
501
+ };
502
+ }, [
503
+ isLoading,
504
+ data.length
505
+ ]);
506
+ const getItemPos = (index)=>`${index + 1} of ${data.length}`;
507
+ const handleMoveItem = (newIndex, oldIndex)=>{
508
+ const item = data[oldIndex];
509
+ setLiveText(formatMessage({
510
+ id: getTranslation('dnd.reorder'),
511
+ defaultMessage: '{item}, moved. New position in list: {position}.'
512
+ }, {
513
+ item: item.label ?? item.documentId,
514
+ position: getItemPos(newIndex)
515
+ }));
516
+ /**
517
+ * Splicing mutates the array, so we need to create a new array
518
+ */ const newData = [
519
+ ...data
520
+ ];
521
+ const currentRow = data[oldIndex];
522
+ const startKey = oldIndex > newIndex ? newData[newIndex - 1]?.__temp_key__ : newData[newIndex]?.__temp_key__;
523
+ const endKey = oldIndex > newIndex ? newData[newIndex]?.__temp_key__ : newData[newIndex + 1]?.__temp_key__;
524
+ /**
525
+ * We're moving the relation between two other relations, so
526
+ * we need to generate a new key that keeps the order
527
+ */ const [newKey] = generateNKeysBetween(startKey, endKey, 1);
528
+ newData.splice(oldIndex, 1);
529
+ newData.splice(newIndex, 0, {
530
+ ...currentRow,
531
+ __temp_key__: newKey
532
+ });
533
+ /**
534
+ * Now we diff against the server to understand what's different so we
535
+ * can keep the connect array nice and tidy. It also needs reversing because
536
+ * we reverse the relations from the server in the first place.
537
+ */ const connectedRelations = newData.reduce((acc, relation, currentIndex, array)=>{
538
+ const relationOnServer = serverData.find((oldRelation)=>oldRelation.id === relation.id);
539
+ const relationInFront = array[currentIndex + 1];
540
+ if (!relationOnServer || relationOnServer.__temp_key__ !== relation.__temp_key__) {
541
+ const position = relationInFront ? {
542
+ before: relationInFront.documentId,
543
+ locale: relationInFront.locale,
544
+ status: 'publishedAt' in relationInFront && relationInFront.publishedAt ? 'published' : 'draft'
545
+ } : {
546
+ end: true
547
+ };
548
+ const relationWithPosition = {
549
+ ...relation,
550
+ ...{
551
+ apiData: {
552
+ id: relation.id,
553
+ documentId: relation.documentId,
554
+ locale: relation.locale,
555
+ position
556
+ }
557
+ }
558
+ };
559
+ return [
560
+ ...acc,
561
+ relationWithPosition
562
+ ];
563
+ }
564
+ return acc;
565
+ }, []).toReversed();
566
+ field.onChange(`${name}.connect`, connectedRelations);
567
+ };
568
+ const handleGrabItem = (index)=>{
569
+ const item = data[index];
570
+ setLiveText(formatMessage({
571
+ id: getTranslation('dnd.grab-item'),
572
+ defaultMessage: `{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel.`
573
+ }, {
574
+ item: item.label ?? item.documentId,
575
+ position: getItemPos(index)
576
+ }));
577
+ };
578
+ const handleDropItem = (index)=>{
579
+ const { href: _href, label, ...item } = data[index];
580
+ setLiveText(formatMessage({
581
+ id: getTranslation('dnd.drop-item'),
582
+ defaultMessage: `{item}, dropped. Final position in list: {position}.`
583
+ }, {
584
+ item: label ?? item.documentId,
585
+ position: getItemPos(index)
586
+ }));
587
+ };
588
+ const handleCancel = (index)=>{
589
+ const item = data[index];
590
+ setLiveText(formatMessage({
591
+ id: getTranslation('dnd.cancel-item'),
592
+ defaultMessage: '{item}, dropped. Re-order cancelled.'
593
+ }, {
594
+ item: item.label ?? item.documentId
595
+ }));
596
+ };
597
+ const handleDisconnect = useHandleDisconnect(name, 'RelationsList');
598
+ /**
599
+ * These relation types will only ever have one item
600
+ * in their list, so you can't reorder a single item!
601
+ */ const canReorder = !ONE_WAY_RELATIONS.includes(relationType);
602
+ const dynamicListHeight = data.length > RELATIONS_TO_DISPLAY ? Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER) + RELATION_ITEM_HEIGHT / 2 : Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER);
603
+ return /*#__PURE__*/ jsxs(ShadowBox, {
604
+ $overflowDirection: overflow,
605
+ children: [
606
+ /*#__PURE__*/ jsx(VisuallyHidden, {
607
+ id: ariaDescriptionId,
608
+ children: formatMessage({
609
+ id: getTranslation('dnd.instructions'),
610
+ defaultMessage: `Press spacebar to grab and re-order`
611
+ })
612
+ }),
613
+ /*#__PURE__*/ jsx(VisuallyHidden, {
614
+ "aria-live": "assertive",
615
+ children: liveText
616
+ }),
617
+ /*#__PURE__*/ jsx(FixedSizeList, {
618
+ height: dynamicListHeight,
619
+ ref: listRef,
620
+ outerRef: outerListRef,
621
+ itemCount: data.length,
622
+ itemSize: RELATION_ITEM_HEIGHT + RELATION_GUTTER,
623
+ itemData: {
624
+ ariaDescribedBy: ariaDescriptionId,
625
+ canDrag: canReorder,
626
+ disabled,
627
+ handleCancel,
628
+ handleDropItem,
629
+ handleGrabItem,
630
+ handleMoveItem,
631
+ name,
632
+ handleDisconnect,
633
+ relations: data
634
+ },
635
+ itemKey: (index)=>data[index].id,
636
+ innerElementType: "ol",
637
+ children: ListItem
638
+ })
639
+ ]
640
+ });
641
+ };
642
+ const ShadowBox = styled(Box)`
643
+ position: relative;
644
+ overflow: hidden;
645
+ flex: 1;
646
+
647
+ &:before,
648
+ &:after {
649
+ position: absolute;
650
+ width: 100%;
651
+ height: 4px;
652
+ z-index: 1;
653
+ }
654
+
655
+ &:before {
656
+ /* TODO: as for DS Table component we would need this to be handled by the DS theme */
657
+ content: '';
658
+ background: linear-gradient(rgba(3, 3, 5, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
659
+ top: 0;
660
+ opacity: ${({ $overflowDirection })=>$overflowDirection === 'top-bottom' || $overflowDirection === 'top' ? 1 : 0};
661
+ transition: opacity 0.2s ease-in-out;
662
+ }
663
+
664
+ &:after {
665
+ /* TODO: as for DS Table component we would need this to be handled by the DS theme */
666
+ content: '';
667
+ background: linear-gradient(0deg, rgba(3, 3, 5, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
668
+ bottom: 0;
669
+ opacity: ${({ $overflowDirection })=>$overflowDirection === 'top-bottom' || $overflowDirection === 'bottom' ? 1 : 0};
670
+ transition: opacity 0.2s ease-in-out;
671
+ }
672
+ `;
673
+ const ListItem = ({ data, index, style })=>{
674
+ const { ariaDescribedBy, canDrag = false, disabled = false, handleCancel, handleDisconnect, handleDropItem, handleGrabItem, handleMoveItem, name, relations } = data;
675
+ const { formatMessage } = useIntl();
676
+ const { href, id, label, status } = relations[index];
677
+ const [{ handlerId, isDragging, handleKeyDown }, relationRef, dropRef, dragRef, dragPreviewRef] = useDragAndDrop(canDrag && !disabled, {
678
+ type: `${ItemTypes.RELATION}_${name}`,
679
+ index,
680
+ item: {
681
+ displayedValue: label,
682
+ status,
683
+ id: id,
684
+ index
685
+ },
686
+ onMoveItem: handleMoveItem,
687
+ onDropItem: handleDropItem,
688
+ onGrabItem: handleGrabItem,
689
+ onCancel: handleCancel,
690
+ dropSensitivity: DROP_SENSITIVITY.REGULAR
691
+ });
692
+ const composedRefs = useComposedRefs(relationRef, dragRef);
693
+ React.useEffect(()=>{
694
+ dragPreviewRef(getEmptyImage());
695
+ }, [
696
+ dragPreviewRef
697
+ ]);
698
+ return /*#__PURE__*/ jsx(Box, {
699
+ style: style,
700
+ tag: "li",
701
+ ref: dropRef,
702
+ "aria-describedby": ariaDescribedBy,
703
+ cursor: canDrag ? 'all-scroll' : 'default',
704
+ children: isDragging ? /*#__PURE__*/ jsx(RelationItemPlaceholder, {}) : /*#__PURE__*/ jsxs(Flex, {
705
+ paddingTop: 2,
706
+ paddingBottom: 2,
707
+ paddingLeft: canDrag ? 2 : 4,
708
+ paddingRight: 4,
709
+ hasRadius: true,
710
+ borderColor: "neutral200",
711
+ background: disabled ? 'neutral150' : 'neutral0',
712
+ justifyContent: "space-between",
713
+ ref: composedRefs,
714
+ "data-handler-id": handlerId,
715
+ children: [
716
+ /*#__PURE__*/ jsxs(FlexWrapper, {
717
+ gap: 1,
718
+ children: [
719
+ canDrag ? /*#__PURE__*/ jsx(IconButton, {
720
+ tag: "div",
721
+ role: "button",
722
+ tabIndex: 0,
723
+ withTooltip: false,
724
+ label: formatMessage({
725
+ id: getTranslation('components.RelationInput.icon-button-aria-label'),
726
+ defaultMessage: 'Drag'
727
+ }),
728
+ variant: "ghost",
729
+ onKeyDown: handleKeyDown,
730
+ disabled: disabled,
731
+ children: /*#__PURE__*/ jsx(Drag, {})
732
+ }) : null,
733
+ /*#__PURE__*/ jsxs(Flex, {
734
+ width: "100%",
735
+ minWidth: 0,
736
+ justifyContent: "space-between",
737
+ children: [
738
+ /*#__PURE__*/ jsx(Box, {
739
+ minWidth: 0,
740
+ paddingTop: 1,
741
+ paddingBottom: 1,
742
+ paddingRight: 4,
743
+ children: /*#__PURE__*/ jsx(Tooltip, {
744
+ description: label,
745
+ children: href ? /*#__PURE__*/ jsx(LinkEllipsis, {
746
+ tag: NavLink,
747
+ to: href,
748
+ isExternal: false,
749
+ children: label
750
+ }) : /*#__PURE__*/ jsx(Typography, {
751
+ textColor: disabled ? 'neutral600' : 'primary600',
752
+ ellipsis: true,
753
+ children: label
754
+ })
755
+ })
756
+ }),
757
+ status ? /*#__PURE__*/ jsx(DocumentStatus, {
758
+ status: status
759
+ }) : null
760
+ ]
761
+ })
762
+ ]
763
+ }),
764
+ /*#__PURE__*/ jsx(Box, {
765
+ paddingLeft: 4,
766
+ children: /*#__PURE__*/ jsx(IconButton, {
767
+ onClick: ()=>handleDisconnect(relations[index]),
768
+ disabled: disabled,
769
+ label: formatMessage({
770
+ id: getTranslation('relation.disconnect'),
771
+ defaultMessage: 'Remove'
772
+ }),
773
+ variant: "ghost",
774
+ size: "S",
775
+ children: /*#__PURE__*/ jsx(Cross, {})
776
+ })
777
+ })
778
+ ]
779
+ })
780
+ });
781
+ };
782
+ const FlexWrapper = styled(Flex)`
783
+ width: 100%;
784
+ /* Used to prevent endAction to be pushed out of container */
785
+ min-width: 0;
786
+
787
+ & > div[role='button'] {
788
+ cursor: all-scroll;
789
+ }
790
+ `;
791
+ const DisconnectButton = styled.button`
792
+ svg path {
793
+ fill: ${({ theme, disabled })=>disabled ? theme.colors.neutral600 : theme.colors.neutral500};
794
+ }
795
+
796
+ &:hover svg path,
797
+ &:focus svg path {
798
+ fill: ${({ theme, disabled })=>!disabled && theme.colors.neutral600};
799
+ }
800
+ `;
801
+ const LinkEllipsis = styled(Link)`
802
+ display: block;
803
+
804
+ & > span {
805
+ white-space: nowrap;
806
+ overflow: hidden;
807
+ text-overflow: ellipsis;
808
+ display: block;
809
+ }
810
+ `;
811
+ const RelationItemPlaceholder = ()=>/*#__PURE__*/ jsx(Box, {
812
+ paddingTop: 2,
813
+ paddingBottom: 2,
814
+ paddingLeft: 4,
815
+ paddingRight: 4,
816
+ hasRadius: true,
817
+ borderStyle: "dashed",
818
+ borderColor: "primary600",
819
+ borderWidth: "1px",
820
+ background: "primary100",
821
+ height: `calc(100% - ${RELATION_GUTTER}px)`
822
+ });
823
+ const MemoizedRelationsField = /*#__PURE__*/ React.memo(RelationsField);
824
+
825
+ export { ComponentProvider as C, DisconnectButton as D, FlexWrapper as F, LinkEllipsis as L, MemoizedRelationsField as M, useComponent as u };
826
+ //# sourceMappingURL=Relations-B1i77Jba.js.map