@medusajs/dashboard 2.12.3-preview-20251217120154 → 2.12.3-preview-20251217123836

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 (276) hide show
  1. package/dist/{add-campaign-promotions-4QLXO46G.mjs → add-campaign-promotions-OYPGISTF.mjs} +2 -2
  2. package/dist/add-locales-GGNZCABB.mjs +81 -0
  3. package/dist/{adjust-inventory-2MFA656V.mjs → adjust-inventory-26YXAXQL.mjs} +4 -3
  4. package/dist/{api-key-management-create-ZUVF3SLR.mjs → api-key-management-create-EMP32G2D.mjs} +6 -5
  5. package/dist/{api-key-management-detail-THD74G7I.mjs → api-key-management-detail-FRUN2KFK.mjs} +11 -10
  6. package/dist/{api-key-management-edit-42HNUSXL.mjs → api-key-management-edit-IBM3ZXHK.mjs} +6 -5
  7. package/dist/{api-key-management-list-66CFOILY.mjs → api-key-management-list-KC5GOWAU.mjs} +4 -3
  8. package/dist/{api-key-management-sales-channels-HN3THM5J.mjs → api-key-management-sales-channels-LUB5G6RC.mjs} +6 -5
  9. package/dist/app.css +72 -0
  10. package/dist/app.js +13657 -11324
  11. package/dist/app.mjs +12 -11
  12. package/dist/{campaign-budget-edit-6DMZGUCI.mjs → campaign-budget-edit-B5MSE26J.mjs} +2 -2
  13. package/dist/{campaign-configuration-UNFRB5HR.mjs → campaign-configuration-QOE3D2BE.mjs} +2 -2
  14. package/dist/{campaign-create-QXG7PD3S.mjs → campaign-create-FJOECKGT.mjs} +3 -3
  15. package/dist/{campaign-detail-WR3XHHV2.mjs → campaign-detail-HM3GQJLQ.mjs} +11 -10
  16. package/dist/{campaign-edit-HN4US7DV.mjs → campaign-edit-K2POQH7M.mjs} +2 -2
  17. package/dist/{categories-metadata-BCZ463KN.mjs → categories-metadata-WKL3MGD7.mjs} +14 -13
  18. package/dist/{category-create-FFIBWXAH.mjs → category-create-KHJZSC7G.mjs} +5 -4
  19. package/dist/{category-detail-4HXJ5Z7N.mjs → category-detail-UTWWDKFP.mjs} +29 -13
  20. package/dist/{category-edit-74MZ6TXN.mjs → category-edit-CTA2EPDG.mjs} +5 -4
  21. package/dist/{category-list-OCJY2UJV.mjs → category-list-QBYJ4T3R.mjs} +20 -4
  22. package/dist/{category-organize-B6EFBFKB.mjs → category-organize-SXP33XET.mjs} +5 -4
  23. package/dist/{category-products-2HXLZDHL.mjs → category-products-XXBTCXFF.mjs} +14 -13
  24. package/dist/{chunk-XIVBRONM.mjs → chunk-23GTCEOV.mjs} +1 -1
  25. package/dist/{chunk-2NZDHAOE.mjs → chunk-27MGH3HR.mjs} +2 -2
  26. package/dist/{chunk-N3FCYZV6.mjs → chunk-2XTBDCGE.mjs} +1 -1
  27. package/dist/{chunk-RU4ZS47V.mjs → chunk-4JQR6QNW.mjs} +2 -2
  28. package/dist/{chunk-F65T2X7G.mjs → chunk-5F427YCP.mjs} +5 -5
  29. package/dist/{chunk-PNPT4W2F.mjs → chunk-5ISRTMYH.mjs} +1 -1
  30. package/dist/{chunk-Z6NHG5LQ.mjs → chunk-6P4Q4AAP.mjs} +3 -3
  31. package/dist/{chunk-F5NZDW7L.mjs → chunk-A2WBKOXJ.mjs} +2 -2
  32. package/dist/{chunk-F63F3FIT.mjs → chunk-A4XYK3MY.mjs} +2 -2
  33. package/dist/{chunk-NT6C7CHT.mjs → chunk-AWRCV3ME.mjs} +1 -1
  34. package/dist/{chunk-5X6SKB2P.mjs → chunk-BMS2QLJY.mjs} +1 -1
  35. package/dist/{chunk-3YPRDSZ6.mjs → chunk-BZKI5J2M.mjs} +1 -1
  36. package/dist/{chunk-25UWYEJX.mjs → chunk-CQOOXWPZ.mjs} +1 -1
  37. package/dist/{chunk-42OOM4DJ.mjs → chunk-D6UW7URG.mjs} +23 -6
  38. package/dist/{chunk-4YAPXPLM.mjs → chunk-DQUXK4WW.mjs} +1 -1
  39. package/dist/{chunk-MY6I7UJG.mjs → chunk-DTCIBQO2.mjs} +3 -3
  40. package/dist/{chunk-W7SLPIO2.mjs → chunk-FKNW5MLZ.mjs} +676 -151
  41. package/dist/{chunk-N4O5FAUC.mjs → chunk-FYWHE3W5.mjs} +1 -1
  42. package/dist/{chunk-QPKW37WR.mjs → chunk-GLBHPDR4.mjs} +249 -14
  43. package/dist/chunk-HGRIOEAR.mjs +32 -0
  44. package/dist/{chunk-PXJFCRIV.mjs → chunk-HNJ65IND.mjs} +4 -4
  45. package/dist/{chunk-Y5UO73CH.mjs → chunk-HTCYX4VD.mjs} +1 -1
  46. package/dist/{chunk-34KFHPN6.mjs → chunk-IAV7IKJ6.mjs} +1 -1
  47. package/dist/{store-add-locales-JLRTXG3Q.mjs → chunk-IKTGFXWR.mjs} +3 -67
  48. package/dist/{chunk-6W3BKVOC.mjs → chunk-KFYQTOGB.mjs} +1 -1
  49. package/dist/{chunk-EQTBJSBZ.mjs → chunk-KIIT4BNH.mjs} +3 -0
  50. package/dist/{chunk-LHNU4DYZ.mjs → chunk-KSDXSKJ7.mjs} +2 -2
  51. package/dist/{chunk-D4J3CEWH.mjs → chunk-N3SAXQVR.mjs} +2 -2
  52. package/dist/{chunk-Q6MSICBU.mjs → chunk-O333RR6K.mjs} +1 -1
  53. package/dist/{chunk-YAPTGHGP.mjs → chunk-OK6NZN2A.mjs} +1 -1
  54. package/dist/{chunk-7AX6R6G6.mjs → chunk-OSHH5GAS.mjs} +13 -1
  55. package/dist/{chunk-35LSPN2U.mjs → chunk-QKALAT7P.mjs} +1 -1
  56. package/dist/{chunk-UM4OIJZ3.mjs → chunk-S22SJRPO.mjs} +1 -1
  57. package/dist/{chunk-HFT7Q5Y5.mjs → chunk-SG2JZPTG.mjs} +1 -1
  58. package/dist/{chunk-B3AOQW2B.mjs → chunk-U6G4M5LP.mjs} +1 -1
  59. package/dist/{chunk-HWKLNKOY.mjs → chunk-U726TGCM.mjs} +1 -1
  60. package/dist/{chunk-HKIF5HVL.mjs → chunk-UJ2TMPV4.mjs} +12 -0
  61. package/dist/{chunk-5DUMSVP6.mjs → chunk-UMCJYHAD.mjs} +3 -3
  62. package/dist/{chunk-NHDFPGQ3.mjs → chunk-UWY5ZV66.mjs} +13 -1
  63. package/dist/{chunk-7ZYDO3XO.mjs → chunk-VFF5WB7C.mjs} +299 -194
  64. package/dist/{chunk-XXBP2Z5M.mjs → chunk-WVA4O7QS.mjs} +1 -1
  65. package/dist/{chunk-AH4DORIW.mjs → chunk-XY7A7GZJ.mjs} +1 -1
  66. package/dist/{chunk-FQDPOKEK.mjs → chunk-Y2YVTIJI.mjs} +1 -1
  67. package/dist/{chunk-L4NOVTH5.mjs → chunk-YIOBBZUB.mjs} +2 -2
  68. package/dist/{chunk-LEJUZW3P.mjs → chunk-Z6BFNHEO.mjs} +12 -0
  69. package/dist/{collection-add-products-JWAQ277T.mjs → collection-add-products-42F7H77E.mjs} +14 -13
  70. package/dist/{collection-create-DCRW344Z.mjs → collection-create-GWKWVT7B.mjs} +5 -4
  71. package/dist/{collection-detail-F4ON763T.mjs → collection-detail-PXIS3G64.mjs} +28 -12
  72. package/dist/{collection-edit-UNFEW6HT.mjs → collection-edit-EZIO2BR5.mjs} +5 -4
  73. package/dist/{collection-list-4C5HVO6Y.mjs → collection-list-O74CGY24.mjs} +29 -13
  74. package/dist/{collection-metadata-P4A5DXBQ.mjs → collection-metadata-U6FMA4IC.mjs} +14 -13
  75. package/dist/{customer-create-XCLZENJS.mjs → customer-create-IA56MXE6.mjs} +2 -2
  76. package/dist/{customer-create-address-4HZUIAM7.mjs → customer-create-address-27M25HTO.mjs} +2 -2
  77. package/dist/{customer-detail-X3RQJPXP.mjs → customer-detail-OMTFJ6CE.mjs} +12 -11
  78. package/dist/{customer-edit-BW5GVTQI.mjs → customer-edit-XQ5NWIVX.mjs} +2 -2
  79. package/dist/{customer-group-add-customers-SOXMSWQH.mjs → customer-group-add-customers-XMR2WBXX.mjs} +2 -2
  80. package/dist/{customer-group-create-6YV7W6TI.mjs → customer-group-create-RY4FVEIW.mjs} +2 -2
  81. package/dist/{customer-group-detail-NG32WKJT.mjs → customer-group-detail-ADK3M5LG.mjs} +11 -10
  82. package/dist/{customer-group-edit-7NXU34BQ.mjs → customer-group-edit-MQWARIQZ.mjs} +2 -2
  83. package/dist/{customer-group-list-EBETHKKO.mjs → customer-group-list-7ZRQ2HWU.mjs} +11 -10
  84. package/dist/{customer-group-metadata-WK2BGEGO.mjs → customer-group-metadata-JQJRLLXG.mjs} +3 -3
  85. package/dist/{customer-metadata-ZUWCUTM7.mjs → customer-metadata-HN2DYD5I.mjs} +3 -3
  86. package/dist/{customers-add-customer-group-7FYD54MZ.mjs → customers-add-customer-group-5U27WHJB.mjs} +13 -12
  87. package/dist/{edit-inventory-item-Y5W6VTHJ.mjs → edit-inventory-item-H7DAZWIT.mjs} +4 -3
  88. package/dist/{edit-inventory-item-attributes-NAAZDFEJ.mjs → edit-inventory-item-attributes-7HTXXPGZ.mjs} +4 -3
  89. package/dist/{edit-reservation-2UD4RZJX.mjs → edit-reservation-OVTRZHJR.mjs} +5 -4
  90. package/dist/{edit-rules-2W3BXEXR.mjs → edit-rules-BM2ERGVJ.mjs} +13 -12
  91. package/dist/en.json +38 -0
  92. package/dist/{inventory-create-VQEK7C5T.mjs → inventory-create-7MA7B5N2.mjs} +14 -13
  93. package/dist/{inventory-detail-HUHQ6ZNE.mjs → inventory-detail-B4PRHZK3.mjs} +11 -10
  94. package/dist/{inventory-list-RUSSPKHE.mjs → inventory-list-RXJPSVZE.mjs} +2 -1
  95. package/dist/{inventory-metadata-X52VGHA7.mjs → inventory-metadata-C7MJ3GY5.mjs} +14 -13
  96. package/dist/{inventory-stock-EKTOYN2F.mjs → inventory-stock-WVTYPJTX.mjs} +15 -14
  97. package/dist/{invite-VKHAAF4Z.mjs → invite-FVE4ZBKB.mjs} +2 -2
  98. package/dist/{location-create-RPLEXUZR.mjs → location-create-WZ43K3W7.mjs} +2 -2
  99. package/dist/{location-detail-UVWYE6Q2.mjs → location-detail-KO6EBDK5.mjs} +12 -11
  100. package/dist/{location-edit-L4ISEQHX.mjs → location-edit-VCS7GVWQ.mjs} +2 -2
  101. package/dist/{location-fulfillment-providers-HZZUHPVL.mjs → location-fulfillment-providers-IORBE3E3.mjs} +15 -14
  102. package/dist/{location-list-Z42ZYHUF.mjs → location-list-KVBA6J47.mjs} +2 -2
  103. package/dist/{location-sales-channels-XIMOK66B.mjs → location-sales-channels-P3QJTFDT.mjs} +5 -4
  104. package/dist/{location-service-zone-create-7ZNVLEE3.mjs → location-service-zone-create-J43WN6G4.mjs} +3 -3
  105. package/dist/{location-service-zone-edit-6OUAFEZD.mjs → location-service-zone-edit-KHHMSPXD.mjs} +2 -2
  106. package/dist/{location-service-zone-manage-areas-EOULKRYD.mjs → location-service-zone-manage-areas-6ZPMKMSX.mjs} +3 -3
  107. package/dist/{location-service-zone-shipping-option-create-M7G4SKNP.mjs → location-service-zone-shipping-option-create-2R3ZFLVK.mjs} +15 -14
  108. package/dist/{location-service-zone-shipping-option-edit-M2HJAASG.mjs → location-service-zone-shipping-option-edit-4CGPQ3VT.mjs} +2 -2
  109. package/dist/{location-service-zone-shipping-option-pricing-23QLNSBT.mjs → location-service-zone-shipping-option-pricing-5HN2Z5RB.mjs} +4 -4
  110. package/dist/{login-NSCAMAU6.mjs → login-XKB6OR7I.mjs} +13 -12
  111. package/dist/{manage-locations-JD6FSBOT.mjs → manage-locations-7HH6R4UP.mjs} +4 -3
  112. package/dist/{order-allocate-items-5T57NZOB.mjs → order-allocate-items-HZGGYJ42.mjs} +6 -5
  113. package/dist/{order-create-claim-TE56IE7P.mjs → order-create-claim-NKCOGF4A.mjs} +15 -14
  114. package/dist/{order-create-edit-RDFYBVFY.mjs → order-create-edit-UNQYXGLL.mjs} +14 -13
  115. package/dist/{order-create-exchange-B5ZOEQCJ.mjs → order-create-exchange-WI7OA2WO.mjs} +15 -14
  116. package/dist/{order-create-fulfillment-SRRP6X64.mjs → order-create-fulfillment-2LJTEWDY.mjs} +13 -12
  117. package/dist/{order-create-refund-PTOM65QK.mjs → order-create-refund-7K6UJXGP.mjs} +13 -12
  118. package/dist/{order-create-return-3C2QVNYN.mjs → order-create-return-52GHGW5Z.mjs} +7 -6
  119. package/dist/{order-create-shipment-HNILNFXB.mjs → order-create-shipment-ZTDLLUBY.mjs} +13 -12
  120. package/dist/{order-detail-3OUZOQ7G.mjs → order-detail-JTRUMRLO.mjs} +15 -14
  121. package/dist/{order-edit-billing-address-3IO7GXIK.mjs → order-edit-billing-address-YHYNVLOE.mjs} +13 -12
  122. package/dist/{order-edit-email-QIAEOUBV.mjs → order-edit-email-TCQPEVZY.mjs} +13 -12
  123. package/dist/{order-edit-shipping-address-QGGMHGBC.mjs → order-edit-shipping-address-CFSYQLKD.mjs} +13 -12
  124. package/dist/{order-export-JYYFTOWR.mjs → order-export-G4SBNEJ7.mjs} +14 -13
  125. package/dist/{order-list-RFR3HNDQ.mjs → order-list-GRLQWN4L.mjs} +6 -5
  126. package/dist/{order-metadata-ZBDTMBHZ.mjs → order-metadata-KGPB37VL.mjs} +14 -13
  127. package/dist/{order-receive-return-V42FTCFY.mjs → order-receive-return-JER24SEV.mjs} +14 -13
  128. package/dist/{order-request-transfer-A6NNIN2O.mjs → order-request-transfer-3FBUYZNT.mjs} +13 -12
  129. package/dist/{price-list-configuration-RTUEJENE.mjs → price-list-configuration-6S3MLNXQ.mjs} +6 -5
  130. package/dist/{price-list-create-GRT27KOM.mjs → price-list-create-CXZCFFTP.mjs} +17 -16
  131. package/dist/{price-list-detail-VKIWM7HP.mjs → price-list-detail-XOMU6U5J.mjs} +13 -12
  132. package/dist/{price-list-edit-SW7YIR3Z.mjs → price-list-edit-53UW35L3.mjs} +5 -4
  133. package/dist/{price-list-list-LF2PL4B5.mjs → price-list-list-DG5YEZ44.mjs} +4 -3
  134. package/dist/{price-list-prices-add-ISLZDQNI.mjs → price-list-prices-add-SDX5CQME.mjs} +16 -15
  135. package/dist/{price-list-prices-edit-C6SX2TLJ.mjs → price-list-prices-edit-EKB6NI5D.mjs} +7 -6
  136. package/dist/{product-attributes-REJ5NF2D.mjs → product-attributes-MXDPSOWM.mjs} +14 -13
  137. package/dist/{product-create-4TFE3JHQ.mjs → product-create-3O34JJLS.mjs} +16 -15
  138. package/dist/{product-create-option-GEGQNSMQ.mjs → product-create-option-7AOXAA4S.mjs} +4 -3
  139. package/dist/{product-create-variant-WI6D5CDG.mjs → product-create-variant-OTJKT6WI.mjs} +14 -13
  140. package/dist/{product-detail-BEIDGPKY.mjs → product-detail-SYTLG5D3.mjs} +59 -17
  141. package/dist/{product-edit-ZRQUK5OQ.mjs → product-edit-W72S22NM.mjs} +14 -13
  142. package/dist/{product-edit-option-HBIOBQTS.mjs → product-edit-option-LWJT3CYJ.mjs} +4 -3
  143. package/dist/{product-export-GIEFG4MA.mjs → product-export-57UUAGXF.mjs} +15 -14
  144. package/dist/{product-image-variants-edit-AAMRK4KQ.mjs → product-image-variants-edit-2BW5BJON.mjs} +13 -12
  145. package/dist/{product-import-43UXKCL3.mjs → product-import-6EM4VUXP.mjs} +13 -12
  146. package/dist/{product-list-D4CVUBQQ.mjs → product-list-5V5GEH5K.mjs} +25 -12
  147. package/dist/{product-media-EGK66SRX.mjs → product-media-3VJ7KENL.mjs} +4 -3
  148. package/dist/{product-metadata-55CAQTPS.mjs → product-metadata-JZLHBLZQ.mjs} +14 -13
  149. package/dist/{product-organization-7J7MUM6F.mjs → product-organization-SVXTCWIF.mjs} +15 -14
  150. package/dist/{product-prices-WQDE4XYT.mjs → product-prices-5ZL2RP7A.mjs} +5 -4
  151. package/dist/{product-sales-channels-GIJ7Q57M.mjs → product-sales-channels-PPXUG4KT.mjs} +5 -4
  152. package/dist/{product-shipping-profile-KIDRTPWA.mjs → product-shipping-profile-ETQFZ7DC.mjs} +4 -3
  153. package/dist/{product-stock-22S2HGMM.mjs → product-stock-SJJABF6I.mjs} +15 -14
  154. package/dist/{product-tag-create-7GPE246H.mjs → product-tag-create-XXO4AQEC.mjs} +13 -12
  155. package/dist/{product-tag-detail-R6C2TTA4.mjs → product-tag-detail-BSK64HXL.mjs} +30 -14
  156. package/dist/{product-tag-edit-WA6FGSIP.mjs → product-tag-edit-ENCGDT7E.mjs} +13 -12
  157. package/dist/{product-tag-list-U7PLHMLF.mjs → product-tag-list-SLQGCNDZ.mjs} +30 -14
  158. package/dist/{product-tag-metadata-EJ7FEXSE.mjs → product-tag-metadata-EPXHMU2K.mjs} +14 -13
  159. package/dist/{product-type-create-HBDROTGB.mjs → product-type-create-DRFXTL5O.mjs} +4 -3
  160. package/dist/{product-type-detail-TYQ7MJFE.mjs → product-type-detail-4CRRU7YK.mjs} +29 -13
  161. package/dist/{product-type-edit-H3JCMVRV.mjs → product-type-edit-SRHCZDK7.mjs} +4 -3
  162. package/dist/{product-type-list-KIKWBPD7.mjs → product-type-list-QQKAHBJ3.mjs} +19 -3
  163. package/dist/{product-type-metadata-Q6W5GL7Z.mjs → product-type-metadata-73OKOGPP.mjs} +14 -13
  164. package/dist/{product-variant-detail-SPJ7MZTK.mjs → product-variant-detail-RPHLG4HU.mjs} +27 -11
  165. package/dist/{product-variant-edit-BW7QMHC5.mjs → product-variant-edit-JF7NN64Y.mjs} +13 -12
  166. package/dist/{product-variant-manage-inventory-items-BLHCH6QD.mjs → product-variant-manage-inventory-items-Y2VEOHP7.mjs} +4 -3
  167. package/dist/{product-variant-media-KLSUISGH.mjs → product-variant-media-2WLVNGI4.mjs} +4 -3
  168. package/dist/{product-variant-metadata-GDMVC4MZ.mjs → product-variant-metadata-HU2CXGPO.mjs} +14 -13
  169. package/dist/{profile-edit-YBBXXCCK.mjs → profile-edit-ZNXO6WME.mjs} +2 -2
  170. package/dist/{promotion-add-campaign-JRTM7WBR.mjs → promotion-add-campaign-DO67QK6M.mjs} +3 -3
  171. package/dist/{promotion-create-HF6DTKCC.mjs → promotion-create-BHA3FQG2.mjs} +15 -14
  172. package/dist/{promotion-detail-HTM3F2VO.mjs → promotion-detail-F3QSR52W.mjs} +11 -10
  173. package/dist/{promotion-edit-details-AREFQ6O5.mjs → promotion-edit-details-6BSOOWQN.mjs} +2 -2
  174. package/dist/{refund-reason-create-RKIH46D6.mjs → refund-reason-create-ZA5TKW2Z.mjs} +13 -12
  175. package/dist/{refund-reason-edit-V3KC6NMO.mjs → refund-reason-edit-N2CRCLKZ.mjs} +13 -12
  176. package/dist/{refund-reason-list-M5BOHFWU.mjs → refund-reason-list-SE4TMGMT.mjs} +11 -10
  177. package/dist/{region-add-countries-OF5RUSYU.mjs → region-add-countries-2VAVXMJQ.mjs} +2 -2
  178. package/dist/{region-create-BGOWVCTR.mjs → region-create-NA7Y2LN4.mjs} +2 -2
  179. package/dist/{region-edit-5GO25GDF.mjs → region-edit-WAU347DP.mjs} +2 -2
  180. package/dist/{region-metadata-5NGUNAXZ.mjs → region-metadata-O5NZBWXP.mjs} +14 -13
  181. package/dist/{reservation-create-Z2SUMBGT.mjs → reservation-create-ZCIYM6JI.mjs} +5 -4
  182. package/dist/{reservation-detail-JH77TQHN.mjs → reservation-detail-UFK6XIXE.mjs} +11 -10
  183. package/dist/{reservation-list-WHBGZSVH.mjs → reservation-list-B47DXTA7.mjs} +3 -2
  184. package/dist/{reservation-metadata-ERCWXYVL.mjs → reservation-metadata-AEJEKGLV.mjs} +14 -13
  185. package/dist/{reset-password-5TAYQEUV.mjs → reset-password-Y5WVXV4Q.mjs} +2 -2
  186. package/dist/{return-reason-create-NXWDC6AC.mjs → return-reason-create-HM54WRJY.mjs} +2 -2
  187. package/dist/{return-reason-edit-M6IKNNKB.mjs → return-reason-edit-VSIRHVQ6.mjs} +2 -2
  188. package/dist/{sales-channel-add-products-DTAXWL6H.mjs → sales-channel-add-products-2LMB7EF5.mjs} +14 -13
  189. package/dist/{sales-channel-create-E7BDTPWD.mjs → sales-channel-create-MI7HHZYE.mjs} +5 -4
  190. package/dist/{sales-channel-detail-XWHV7J7X.mjs → sales-channel-detail-EUQ4STQI.mjs} +12 -11
  191. package/dist/{sales-channel-edit-HMPA3Y3L.mjs → sales-channel-edit-VSHOIR37.mjs} +5 -4
  192. package/dist/{sales-channel-list-7NSEFCXQ.mjs → sales-channel-list-JXKGHX4G.mjs} +11 -10
  193. package/dist/{sales-channel-metadata-CMZN74K7.mjs → sales-channel-metadata-AJMQ5SQ2.mjs} +14 -13
  194. package/dist/{shipping-option-type-create-4BN2GBHP.mjs → shipping-option-type-create-YVVIA2XC.mjs} +13 -12
  195. package/dist/{shipping-option-type-detail-YB3TCED2.mjs → shipping-option-type-detail-ZZW36XLK.mjs} +12 -11
  196. package/dist/{shipping-option-type-edit-MDO7ALAU.mjs → shipping-option-type-edit-O6F74T3A.mjs} +13 -12
  197. package/dist/{shipping-option-type-list-DJAT4RKX.mjs → shipping-option-type-list-SPTE7MT6.mjs} +12 -11
  198. package/dist/{shipping-profile-create-752TMBBE.mjs → shipping-profile-create-26R64I3Z.mjs} +2 -2
  199. package/dist/{shipping-profile-metadata-HQI7PCPU.mjs → shipping-profile-metadata-7WFE55VG.mjs} +14 -13
  200. package/dist/{store-add-currencies-PEWNEWCH.mjs → store-add-currencies-OX2WXFMS.mjs} +2 -2
  201. package/dist/store-add-locales-GWCGIXHU.mjs +81 -0
  202. package/dist/{store-detail-MOLAYNQZ.mjs → store-detail-YLJLBBZE.mjs} +11 -10
  203. package/dist/{store-edit-FTLPT55E.mjs → store-edit-5ZS562ZO.mjs} +2 -2
  204. package/dist/{store-metadata-ZJD23O4D.mjs → store-metadata-BZ57I2E6.mjs} +14 -13
  205. package/dist/{tax-region-create-NCO2OQ3I.mjs → tax-region-create-FGTV7VJL.mjs} +13 -12
  206. package/dist/{tax-region-detail-RIABXU7D.mjs → tax-region-detail-PPIMD7OX.mjs} +21 -20
  207. package/dist/{tax-region-edit-YZALLSZY.mjs → tax-region-edit-ELZKA7YH.mjs} +13 -12
  208. package/dist/{tax-region-list-BXZBUXRJ.mjs → tax-region-list-P4LDOPZD.mjs} +3 -3
  209. package/dist/{tax-region-province-create-5JP3PVID.mjs → tax-region-province-create-GKJ7WMRS.mjs} +2 -2
  210. package/dist/{tax-region-province-detail-UKLRVJS2.mjs → tax-region-province-detail-FV2NDT3E.mjs} +20 -19
  211. package/dist/{tax-region-tax-override-create-33XGHH7A.mjs → tax-region-tax-override-create-N572MQPZ.mjs} +16 -15
  212. package/dist/{tax-region-tax-override-edit-WOKZSPTY.mjs → tax-region-tax-override-edit-5DCSJW6D.mjs} +17 -16
  213. package/dist/{tax-region-tax-rate-create-O2SDSXCH.mjs → tax-region-tax-rate-create-MECFGVPL.mjs} +2 -2
  214. package/dist/{tax-region-tax-rate-edit-W62VEVKT.mjs → tax-region-tax-rate-edit-7DYSPYOD.mjs} +2 -2
  215. package/dist/translation-list-FK7XYLHX.mjs +527 -0
  216. package/dist/translations-edit-VRXZI5KW.mjs +678 -0
  217. package/dist/{user-detail-KEDJ7N3Q.mjs → user-detail-BJUXLZZQ.mjs} +2 -1
  218. package/dist/{user-edit-LXQCTDGA.mjs → user-edit-ZBB4RMTP.mjs} +2 -2
  219. package/dist/{user-invite-YH33WUC2.mjs → user-invite-GAGIM5DO.mjs} +2 -2
  220. package/dist/{user-metadata-4WOICEE7.mjs → user-metadata-GRJZZ524.mjs} +14 -13
  221. package/dist/{workflow-execution-detail-OKM6P4SX.mjs → workflow-execution-detail-HXTFWGKG.mjs} +11 -10
  222. package/package.json +9 -9
  223. package/src/components/common/icon-avatar/icon-avatar.tsx +4 -0
  224. package/src/components/data-grid/components/data-grid-cell-container.tsx +13 -4
  225. package/src/components/data-grid/components/data-grid-multiline-cell.tsx +103 -0
  226. package/src/components/data-grid/components/data-grid-readonly-cell.tsx +13 -3
  227. package/src/components/data-grid/components/data-grid-root.tsx +271 -60
  228. package/src/components/data-grid/components/data-grid-text-cell.tsx +7 -7
  229. package/src/components/data-grid/components/data-grid-textarea-modal-cell.tsx +233 -0
  230. package/src/components/data-grid/components/index.ts +2 -0
  231. package/src/components/data-grid/data-grid.tsx +16 -1
  232. package/src/components/data-grid/helpers/create-data-grid-column-helper.ts +18 -0
  233. package/src/components/data-grid/hooks/use-data-grid-cell.tsx +13 -1
  234. package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +1 -0
  235. package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +65 -7
  236. package/src/components/data-grid/types.ts +1 -0
  237. package/src/components/layout/settings-layout/settings-layout.tsx +11 -1
  238. package/src/components/modals/route-focus-modal/route-focus-modal.tsx +8 -3
  239. package/src/components/modals/route-modal-form/route-modal-form.tsx +6 -1
  240. package/src/components/modals/route-modal-provider/route-provider.tsx +16 -4
  241. package/src/dashboard-app/routes/get-route.map.tsx +23 -0
  242. package/src/hooks/api/categories.tsx +32 -0
  243. package/src/hooks/api/collections.tsx +31 -0
  244. package/src/hooks/api/index.ts +1 -0
  245. package/src/hooks/api/product-types.tsx +32 -0
  246. package/src/hooks/api/product-variants.tsx +47 -3
  247. package/src/hooks/api/products.tsx +29 -0
  248. package/src/hooks/api/tags.tsx +32 -0
  249. package/src/hooks/api/translations.tsx +315 -0
  250. package/src/hooks/use-infinite-list.tsx +92 -0
  251. package/src/i18n/translations/$schema.json +122 -0
  252. package/src/i18n/translations/en.json +38 -0
  253. package/src/i18n/translations/es.json +38 -0
  254. package/src/routes/categories/category-detail/components/category-general-section/category-general-section.tsx +16 -1
  255. package/src/routes/categories/category-list/components/category-list-table/category-list-table.tsx +16 -1
  256. package/src/routes/collections/collection-detail/components/collection-general-section/collection-general-section.tsx +16 -1
  257. package/src/routes/collections/collection-list/components/collection-list-table/collection-row-actions.tsx +16 -1
  258. package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/product-tag-general-section.tsx +16 -1
  259. package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/product-tag-list-table.tsx +16 -1
  260. package/src/routes/product-types/product-type-detail/components/product-type-general-section/product-type-general-section.tsx +16 -1
  261. package/src/routes/product-types/product-type-list/components/product-type-list-table/product-table-row-actions.tsx +16 -1
  262. package/src/routes/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx +16 -1
  263. package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +16 -1
  264. package/src/routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +32 -1
  265. package/src/routes/products/product-list/components/product-list-table/product-list-table.tsx +15 -1
  266. package/src/routes/translations/add-locales/add-locales.tsx +29 -0
  267. package/src/routes/translations/add-locales/index.tsx +1 -0
  268. package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +93 -0
  269. package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +48 -0
  270. package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +285 -0
  271. package/src/routes/translations/translation-list/index.tsx +1 -0
  272. package/src/routes/translations/translation-list/translation-list.tsx +138 -0
  273. package/src/routes/translations/translations-edit/components/translations-edit-form/index.ts +1 -0
  274. package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +747 -0
  275. package/src/routes/translations/translations-edit/index.ts +1 -0
  276. package/src/routes/translations/translations-edit/translations-edit.tsx +90 -0
@@ -213,6 +213,7 @@ var useDataGridCell = ({
213
213
  case "number":
214
214
  return numberCharacterRegex.test(key);
215
215
  case "text":
216
+ case "multiline-text":
216
217
  return textCharacterRegex.test(key);
217
218
  default:
218
219
  return false;
@@ -251,6 +252,15 @@ var useDataGridCell = ({
251
252
  nativeInputValueSetter?.call(inputRef.current, e.key);
252
253
  const event = new Event("input", { bubbles: true });
253
254
  inputRef.current.dispatchEvent(event);
255
+ } else if (inputRef.current instanceof HTMLTextAreaElement) {
256
+ inputRef.current.value = "";
257
+ const nativeTextAreaValueSetter = Object.getOwnPropertyDescriptor(
258
+ window.HTMLTextAreaElement.prototype,
259
+ "value"
260
+ )?.set;
261
+ nativeTextAreaValueSetter?.call(inputRef.current, e.key);
262
+ const event = new Event("input", { bubbles: true });
263
+ inputRef.current.dispatchEvent(event);
254
264
  }
255
265
  e.stopPropagation();
256
266
  e.preventDefault();
@@ -265,7 +275,7 @@ var useDataGridCell = ({
265
275
  }, [type]);
266
276
  useEffect(() => {
267
277
  if (isAnchor && !containerRef.current?.contains(document.activeElement)) {
268
- containerRef.current?.focus();
278
+ containerRef.current?.focus({ preventScroll: true });
269
279
  }
270
280
  }, [isAnchor]);
271
281
  const renderProps = {
@@ -1316,6 +1326,7 @@ function convertArrayToPrimitive(values, type) {
1316
1326
  case "boolean":
1317
1327
  return values.map(convertToBoolean);
1318
1328
  case "text":
1329
+ case "multiline-text":
1319
1330
  return values.map(covertToString);
1320
1331
  default:
1321
1332
  throw new Error(`Unsupported target type "${type}".`);
@@ -1437,7 +1448,19 @@ var useDataGridKeydownEvent = ({
1437
1448
  },
1438
1449
  [rangeEnd, matrix, getSelectionValues, setSelectionValues, execute]
1439
1450
  );
1440
- const handleSpaceKeyTextOrNumber = useCallback9(
1451
+ const handleSpaceKeyText = useCallback9(
1452
+ (anchor2) => {
1453
+ const field = matrix.getCellField(anchor2);
1454
+ const input = queryTool?.getInput(anchor2);
1455
+ if (!field || !input) {
1456
+ return;
1457
+ }
1458
+ createSnapshot(anchor2);
1459
+ input.focus();
1460
+ },
1461
+ [matrix, queryTool, createSnapshot]
1462
+ );
1463
+ const handleSpaceKeyNumber = useCallback9(
1441
1464
  (anchor2) => {
1442
1465
  const field = matrix.getCellField(anchor2);
1443
1466
  const input = queryTool?.getInput(anchor2);
@@ -1508,9 +1531,12 @@ var useDataGridKeydownEvent = ({
1508
1531
  case "togglable-number":
1509
1532
  handleSpaceKeyTogglableNumber(anchor);
1510
1533
  break;
1511
- case "number":
1512
1534
  case "text":
1513
- handleSpaceKeyTextOrNumber(anchor);
1535
+ case "multiline-text":
1536
+ handleSpaceKeyText(anchor);
1537
+ break;
1538
+ case "number":
1539
+ handleSpaceKeyNumber(anchor);
1514
1540
  break;
1515
1541
  }
1516
1542
  },
@@ -1519,7 +1545,8 @@ var useDataGridKeydownEvent = ({
1519
1545
  isEditing,
1520
1546
  matrix,
1521
1547
  handleSpaceKeyBoolean,
1522
- handleSpaceKeyTextOrNumber,
1548
+ handleSpaceKeyText,
1549
+ handleSpaceKeyNumber,
1523
1550
  handleSpaceKeyTogglableNumber
1524
1551
  ]
1525
1552
  );
@@ -1570,6 +1597,19 @@ var useDataGridKeydownEvent = ({
1570
1597
  },
1571
1598
  [handleMoveOnEnter, handleEditOnEnter, isEditing]
1572
1599
  );
1600
+ const handleEnterKeyMultilineText = useCallback9(
1601
+ (e, anchor2) => {
1602
+ if (isEditing) {
1603
+ if (e.shiftKey) {
1604
+ return;
1605
+ }
1606
+ handleMoveOnEnter(e, anchor2);
1607
+ return;
1608
+ }
1609
+ handleEditOnEnter(anchor2);
1610
+ },
1611
+ [handleMoveOnEnter, handleEditOnEnter, isEditing]
1612
+ );
1573
1613
  const handleEnterKeyBoolean = useCallback9(
1574
1614
  (e, anchor2) => {
1575
1615
  const field = matrix.getCellField(anchor2);
@@ -1603,9 +1643,15 @@ var useDataGridKeydownEvent = ({
1603
1643
  if (!anchor) {
1604
1644
  return;
1605
1645
  }
1606
- e.preventDefault();
1607
1646
  const type = matrix.getCellType(anchor);
1647
+ if (type === "multiline-text" && isEditing && e.shiftKey) {
1648
+ return;
1649
+ }
1650
+ e.preventDefault();
1608
1651
  switch (type) {
1652
+ case "multiline-text":
1653
+ handleEnterKeyMultilineText(e, anchor);
1654
+ break;
1609
1655
  case "togglable-number":
1610
1656
  case "text":
1611
1657
  case "number":
@@ -1617,7 +1663,14 @@ var useDataGridKeydownEvent = ({
1617
1663
  }
1618
1664
  }
1619
1665
  },
1620
- [anchor, matrix, handleEnterKeyTextOrNumber, handleEnterKeyBoolean]
1666
+ [
1667
+ anchor,
1668
+ matrix,
1669
+ isEditing,
1670
+ handleEnterKeyTextOrNumber,
1671
+ handleEnterKeyBoolean,
1672
+ handleEnterKeyMultilineText
1673
+ ]
1621
1674
  );
1622
1675
  const handleDeleteKeyTogglableNumber = useCallback9(
1623
1676
  (anchor2, rangeEnd2) => {
@@ -1680,6 +1733,7 @@ var useDataGridKeydownEvent = ({
1680
1733
  }
1681
1734
  switch (type) {
1682
1735
  case "text":
1736
+ case "multiline-text":
1683
1737
  case "number":
1684
1738
  handleDeleteKeyTextOrNumber(anchor, rangeEnd);
1685
1739
  break;
@@ -2015,17 +2069,20 @@ var DataGridCellContainer = ({
2015
2069
  children,
2016
2070
  errors,
2017
2071
  rowErrors,
2018
- outerComponent
2072
+ outerComponent,
2073
+ isMultiLine
2019
2074
  }) => {
2020
2075
  const error = get2(errors, field);
2021
2076
  const hasError = !!error;
2022
- return /* @__PURE__ */ jsxs3("div", { className: "group/container relative size-full", children: [
2077
+ return /* @__PURE__ */ jsxs3("div", { className: clx("group/container relative h-full w-full"), children: [
2023
2078
  /* @__PURE__ */ jsxs3(
2024
2079
  "div",
2025
2080
  {
2026
2081
  className: clx(
2027
- "bg-ui-bg-base group/cell relative flex size-full items-center gap-x-2 px-4 py-2.5 outline-none",
2082
+ "bg-ui-bg-base group/cell relative flex h-full w-full gap-x-2 px-4 py-2.5 outline-none",
2028
2083
  {
2084
+ "items-center": !isMultiLine,
2085
+ "items-start": isMultiLine,
2029
2086
  "bg-ui-tag-red-bg text-ui-tag-red-text": hasError && !isAnchor && !isSelected && !isDragSelected,
2030
2087
  "ring-ui-bg-interactive ring-2 ring-inset": isAnchor,
2031
2088
  "bg-ui-bg-highlight [&:has([data-field]:focus)]:bg-ui-bg-base": isSelected || isAnchor,
@@ -2045,7 +2102,16 @@ var DataGridCellContainer = ({
2045
2102
  }
2046
2103
  }
2047
2104
  ),
2048
- /* @__PURE__ */ jsx3("div", { className: "relative z-[1] flex size-full items-center justify-center", children: /* @__PURE__ */ jsx3(RenderChildren, { isAnchor, placeholder, children }) }),
2105
+ /* @__PURE__ */ jsx3(
2106
+ "div",
2107
+ {
2108
+ className: clx("relative z-[1] flex h-full w-full", {
2109
+ "items-center justify-center": !isMultiLine,
2110
+ "items-start": isMultiLine
2111
+ }),
2112
+ children: /* @__PURE__ */ jsx3(RenderChildren, { isAnchor, placeholder, children })
2113
+ }
2114
+ ),
2049
2115
  /* @__PURE__ */ jsx3(DataGridRowErrorIndicator, { rowErrors }),
2050
2116
  showOverlay && /* @__PURE__ */ jsx3(
2051
2117
  "div",
@@ -2230,14 +2296,13 @@ var Inner2 = ({
2230
2296
  ] });
2231
2297
  };
2232
2298
 
2233
- // src/components/data-grid/components/data-grid-number-cell.tsx
2299
+ // src/components/data-grid/components/data-grid-multiline-cell.tsx
2234
2300
  import { clx as clx2 } from "@medusajs/ui";
2235
- import { useEffect as useEffect4, useState as useState5 } from "react";
2301
+ import { useCallback as useCallback13, useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
2236
2302
  import { Controller as Controller3 } from "react-hook-form";
2237
2303
  import { jsx as jsx6 } from "react/jsx-runtime";
2238
- var DataGridNumberCell = ({
2239
- context,
2240
- ...rest
2304
+ var DataGridMultilineCell = ({
2305
+ context
2241
2306
  }) => {
2242
2307
  const { field, control, renderProps } = useDataGridCell({
2243
2308
  context
@@ -2250,12 +2315,92 @@ var DataGridNumberCell = ({
2250
2315
  control,
2251
2316
  name: field,
2252
2317
  render: ({ field: field2 }) => {
2253
- return /* @__PURE__ */ jsx6(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx6(Inner3, { field: field2, inputProps: input, ...rest }) });
2318
+ return /* @__PURE__ */ jsx6(DataGridCellContainer, { ...container, ...errorProps, isMultiLine: true, children: /* @__PURE__ */ jsx6(Inner3, { field: field2, inputProps: input }) });
2254
2319
  }
2255
2320
  }
2256
2321
  );
2257
2322
  };
2258
2323
  var Inner3 = ({
2324
+ field,
2325
+ inputProps
2326
+ }) => {
2327
+ const { onChange: _, onBlur, ref, value, ...rest } = field;
2328
+ const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
2329
+ const [localValue, setLocalValue] = useState5(value);
2330
+ const textareaRef = useRef3(null);
2331
+ useEffect4(() => {
2332
+ setLocalValue(value);
2333
+ }, [value]);
2334
+ const combinedRefs = useCombinedRefs(inputRef, ref, textareaRef);
2335
+ const adjustTextareaHeight = useCallback13(() => {
2336
+ const textarea = textareaRef.current;
2337
+ if (textarea) {
2338
+ textarea.style.height = "0px";
2339
+ const newHeight = Math.max(textarea.scrollHeight, 24);
2340
+ textarea.style.height = `${newHeight}px`;
2341
+ }
2342
+ }, []);
2343
+ useEffect4(() => {
2344
+ adjustTextareaHeight();
2345
+ }, [localValue, adjustTextareaHeight]);
2346
+ useEffect4(() => {
2347
+ adjustTextareaHeight();
2348
+ const timeoutId = setTimeout(adjustTextareaHeight, 50);
2349
+ return () => clearTimeout(timeoutId);
2350
+ }, [adjustTextareaHeight]);
2351
+ return /* @__PURE__ */ jsx6(
2352
+ "textarea",
2353
+ {
2354
+ className: clx2(
2355
+ "txt-compact-small text-ui-fg-subtle flex w-full cursor-pointer bg-transparent outline-none",
2356
+ "focus:cursor-text",
2357
+ "resize-none overflow-hidden py-2"
2358
+ ),
2359
+ autoComplete: "off",
2360
+ tabIndex: -1,
2361
+ value: localValue ?? "",
2362
+ onChange: (e) => {
2363
+ setLocalValue(e.target.value);
2364
+ adjustTextareaHeight();
2365
+ },
2366
+ ref: combinedRefs,
2367
+ onBlur: () => {
2368
+ onBlur();
2369
+ onInputBlur();
2370
+ onChange(localValue, value);
2371
+ },
2372
+ ...input,
2373
+ ...rest
2374
+ }
2375
+ );
2376
+ };
2377
+
2378
+ // src/components/data-grid/components/data-grid-number-cell.tsx
2379
+ import { clx as clx3 } from "@medusajs/ui";
2380
+ import { useEffect as useEffect5, useState as useState6 } from "react";
2381
+ import { Controller as Controller4 } from "react-hook-form";
2382
+ import { jsx as jsx7 } from "react/jsx-runtime";
2383
+ var DataGridNumberCell = ({
2384
+ context,
2385
+ ...rest
2386
+ }) => {
2387
+ const { field, control, renderProps } = useDataGridCell({
2388
+ context
2389
+ });
2390
+ const errorProps = useDataGridCellError({ context });
2391
+ const { container, input } = renderProps;
2392
+ return /* @__PURE__ */ jsx7(
2393
+ Controller4,
2394
+ {
2395
+ control,
2396
+ name: field,
2397
+ render: ({ field: field2 }) => {
2398
+ return /* @__PURE__ */ jsx7(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx7(Inner4, { field: field2, inputProps: input, ...rest }) });
2399
+ }
2400
+ }
2401
+ );
2402
+ };
2403
+ var Inner4 = ({
2259
2404
  field,
2260
2405
  inputProps,
2261
2406
  ...props
@@ -2268,12 +2413,12 @@ var Inner3 = ({
2268
2413
  onFocus,
2269
2414
  ...attributes
2270
2415
  } = inputProps;
2271
- const [localValue, setLocalValue] = useState5(value);
2272
- useEffect4(() => {
2416
+ const [localValue, setLocalValue] = useState6(value);
2417
+ useEffect5(() => {
2273
2418
  setLocalValue(value);
2274
2419
  }, [value]);
2275
2420
  const combinedRefs = useCombinedRefs(inputRef, ref);
2276
- return /* @__PURE__ */ jsx6("div", { className: "size-full", children: /* @__PURE__ */ jsx6(
2421
+ return /* @__PURE__ */ jsx7("div", { className: "size-full", children: /* @__PURE__ */ jsx7(
2277
2422
  "input",
2278
2423
  {
2279
2424
  ref: combinedRefs,
@@ -2287,7 +2432,7 @@ var Inner3 = ({
2287
2432
  onFocus,
2288
2433
  type: "number",
2289
2434
  inputMode: "decimal",
2290
- className: clx2(
2435
+ className: clx3(
2291
2436
  "txt-compact-small size-full bg-transparent outline-none",
2292
2437
  "placeholder:text-ui-fg-muted"
2293
2438
  ),
@@ -2300,25 +2445,36 @@ var Inner3 = ({
2300
2445
  };
2301
2446
 
2302
2447
  // src/components/data-grid/components/data-grid-readonly-cell.tsx
2303
- import { clx as clx3 } from "@medusajs/ui";
2304
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
2448
+ import { clx as clx4 } from "@medusajs/ui";
2449
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
2305
2450
  var DataGridReadonlyCell = ({
2306
2451
  context,
2307
2452
  color = "muted",
2308
- children
2453
+ children,
2454
+ isMultiLine = false
2309
2455
  }) => {
2310
2456
  const { rowErrors } = useDataGridCellError({ context });
2311
2457
  return /* @__PURE__ */ jsxs5(
2312
2458
  "div",
2313
2459
  {
2314
- className: clx3(
2315
- "txt-compact-small text-ui-fg-subtle flex size-full cursor-not-allowed items-center justify-between overflow-hidden px-4 py-2.5 outline-none",
2460
+ className: clx4(
2461
+ "txt-compact-small text-ui-fg-subtle flex w-full cursor-not-allowed justify-between overflow-hidden px-4 py-2.5 outline-none",
2316
2462
  color === "muted" && "bg-ui-bg-subtle",
2317
- color === "normal" && "bg-ui-bg-base"
2463
+ color === "normal" && "bg-ui-bg-base",
2464
+ "h-full items-center"
2318
2465
  ),
2319
2466
  children: [
2320
- /* @__PURE__ */ jsx7("div", { className: "flex-1 truncate", children }),
2321
- /* @__PURE__ */ jsx7(DataGridRowErrorIndicator, { rowErrors })
2467
+ /* @__PURE__ */ jsx8(
2468
+ "div",
2469
+ {
2470
+ className: clx4("flex-1", {
2471
+ truncate: !isMultiLine,
2472
+ "whitespace-pre-wrap break-words": isMultiLine
2473
+ }),
2474
+ children
2475
+ }
2476
+ ),
2477
+ /* @__PURE__ */ jsx8(DataGridRowErrorIndicator, { rowErrors })
2322
2478
  ]
2323
2479
  }
2324
2480
  );
@@ -2330,30 +2486,32 @@ import {
2330
2486
  AdjustmentsDone,
2331
2487
  ExclamationCircle as ExclamationCircle2
2332
2488
  } from "@medusajs/icons";
2333
- import { Button as Button2, DropdownMenu, clx as clx5 } from "@medusajs/ui";
2489
+ import { Button as Button2, DropdownMenu, clx as clx6 } from "@medusajs/ui";
2334
2490
  import {
2335
2491
  flexRender,
2336
2492
  getCoreRowModel,
2337
2493
  useReactTable
2338
2494
  } from "@tanstack/react-table";
2339
- import { useVirtualizer } from "@tanstack/react-virtual";
2340
2495
  import {
2341
- useCallback as useCallback14,
2342
- useEffect as useEffect5,
2496
+ useVirtualizer
2497
+ } from "@tanstack/react-virtual";
2498
+ import {
2499
+ useCallback as useCallback15,
2500
+ useEffect as useEffect6,
2343
2501
  useMemo as useMemo5,
2344
- useRef as useRef3,
2345
- useState as useState8
2502
+ useRef as useRef4,
2503
+ useState as useState9
2346
2504
  } from "react";
2347
2505
  import { useTranslation as useTranslation3 } from "react-i18next";
2348
2506
 
2349
2507
  // src/hooks/use-command-history.tsx
2350
- import { useCallback as useCallback13, useState as useState6 } from "react";
2508
+ import { useCallback as useCallback14, useState as useState7 } from "react";
2351
2509
  var useCommandHistory = (maxHistory = 20) => {
2352
- const [past, setPast] = useState6([]);
2353
- const [future, setFuture] = useState6([]);
2510
+ const [past, setPast] = useState7([]);
2511
+ const [future, setFuture] = useState7([]);
2354
2512
  const canUndo = past.length > 0;
2355
2513
  const canRedo = future.length > 0;
2356
- const undo = useCallback13(() => {
2514
+ const undo = useCallback14(() => {
2357
2515
  if (!canUndo) {
2358
2516
  return;
2359
2517
  }
@@ -2363,7 +2521,7 @@ var useCommandHistory = (maxHistory = 20) => {
2363
2521
  setPast(newPast);
2364
2522
  setFuture([previous, ...future.slice(0, maxHistory - 1)]);
2365
2523
  }, [canUndo, future, past, maxHistory]);
2366
- const redo = useCallback13(() => {
2524
+ const redo = useCallback14(() => {
2367
2525
  if (!canRedo) {
2368
2526
  return;
2369
2527
  }
@@ -2373,7 +2531,7 @@ var useCommandHistory = (maxHistory = 20) => {
2373
2531
  setPast([...past, next].slice(0, maxHistory - 1));
2374
2532
  setFuture(newFuture);
2375
2533
  }, [canRedo, future, past, maxHistory]);
2376
- const execute = useCallback13(
2534
+ const execute = useCallback14(
2377
2535
  (command) => {
2378
2536
  command.execute();
2379
2537
  setPast((past2) => [...past2, command].slice(0, maxHistory - 1));
@@ -2394,7 +2552,7 @@ var useCommandHistory = (maxHistory = 20) => {
2394
2552
  import { XMark } from "@medusajs/icons";
2395
2553
  import {
2396
2554
  Button,
2397
- clx as clx4,
2555
+ clx as clx5,
2398
2556
  Heading,
2399
2557
  IconButton,
2400
2558
  Input,
@@ -2402,9 +2560,9 @@ import {
2402
2560
  Text
2403
2561
  } from "@medusajs/ui";
2404
2562
  import { Dialog as RadixDialog } from "radix-ui";
2405
- import { useMemo as useMemo4, useState as useState7 } from "react";
2563
+ import { useMemo as useMemo4, useState as useState8 } from "react";
2406
2564
  import { useTranslation as useTranslation2 } from "react-i18next";
2407
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
2565
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
2408
2566
  var useDataGridShortcuts = () => {
2409
2567
  const { t } = useTranslation2();
2410
2568
  const shortcuts = useMemo4(
@@ -2552,7 +2710,7 @@ var DataGridKeyboardShortcutModal = ({
2552
2710
  onOpenChange
2553
2711
  }) => {
2554
2712
  const { t } = useTranslation2();
2555
- const [searchValue, onSearchValueChange] = useState7("");
2713
+ const [searchValue, onSearchValueChange] = useState8("");
2556
2714
  const shortcuts = useDataGridShortcuts();
2557
2715
  const searchResults = useMemo4(() => {
2558
2716
  return shortcuts.filter(
@@ -2560,12 +2718,12 @@ var DataGridKeyboardShortcutModal = ({
2560
2718
  );
2561
2719
  }, [searchValue, shortcuts]);
2562
2720
  return /* @__PURE__ */ jsxs6(RadixDialog.Root, { open, onOpenChange, children: [
2563
- /* @__PURE__ */ jsx8(RadixDialog.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8(Button, { size: "small", variant: "secondary", children: t("dataGrid.shortcuts.label") }) }),
2721
+ /* @__PURE__ */ jsx9(RadixDialog.Trigger, { asChild: true, children: /* @__PURE__ */ jsx9(Button, { size: "small", variant: "secondary", children: t("dataGrid.shortcuts.label") }) }),
2564
2722
  /* @__PURE__ */ jsxs6(RadixDialog.Portal, { children: [
2565
- /* @__PURE__ */ jsx8(
2723
+ /* @__PURE__ */ jsx9(
2566
2724
  RadixDialog.Overlay,
2567
2725
  {
2568
- className: clx4(
2726
+ className: clx5(
2569
2727
  "bg-ui-bg-overlay fixed inset-0",
2570
2728
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
2571
2729
  )
@@ -2575,15 +2733,15 @@ var DataGridKeyboardShortcutModal = ({
2575
2733
  /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-y-3 px-6 py-4", children: [
2576
2734
  /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between", children: [
2577
2735
  /* @__PURE__ */ jsxs6("div", { children: [
2578
- /* @__PURE__ */ jsx8(RadixDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx8(Heading, { children: t("app.menus.user.shortcuts") }) }),
2579
- /* @__PURE__ */ jsx8(RadixDialog.Description, { className: "sr-only" })
2736
+ /* @__PURE__ */ jsx9(RadixDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx9(Heading, { children: t("app.menus.user.shortcuts") }) }),
2737
+ /* @__PURE__ */ jsx9(RadixDialog.Description, { className: "sr-only" })
2580
2738
  ] }),
2581
2739
  /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-x-2", children: [
2582
- /* @__PURE__ */ jsx8(Kbd, { children: "esc" }),
2583
- /* @__PURE__ */ jsx8(RadixDialog.Close, { asChild: true, children: /* @__PURE__ */ jsx8(IconButton, { variant: "transparent", size: "small", children: /* @__PURE__ */ jsx8(XMark, {}) }) })
2740
+ /* @__PURE__ */ jsx9(Kbd, { children: "esc" }),
2741
+ /* @__PURE__ */ jsx9(RadixDialog.Close, { asChild: true, children: /* @__PURE__ */ jsx9(IconButton, { variant: "transparent", size: "small", children: /* @__PURE__ */ jsx9(XMark, {}) }) })
2584
2742
  ] })
2585
2743
  ] }),
2586
- /* @__PURE__ */ jsx8("div", { children: /* @__PURE__ */ jsx8(
2744
+ /* @__PURE__ */ jsx9("div", { children: /* @__PURE__ */ jsx9(
2587
2745
  Input,
2588
2746
  {
2589
2747
  type: "search",
@@ -2593,15 +2751,15 @@ var DataGridKeyboardShortcutModal = ({
2593
2751
  }
2594
2752
  ) })
2595
2753
  ] }),
2596
- /* @__PURE__ */ jsx8("div", { className: "flex flex-col divide-y overflow-y-auto", children: searchResults.map((shortcut, index) => {
2754
+ /* @__PURE__ */ jsx9("div", { className: "flex flex-col divide-y overflow-y-auto", children: searchResults.map((shortcut, index) => {
2597
2755
  return /* @__PURE__ */ jsxs6(
2598
2756
  "div",
2599
2757
  {
2600
2758
  className: "text-ui-fg-subtle flex items-center justify-between px-6 py-3",
2601
2759
  children: [
2602
- /* @__PURE__ */ jsx8(Text, { size: "small", children: shortcut.label }),
2603
- /* @__PURE__ */ jsx8("div", { className: "flex items-center gap-x-1", children: shortcut.keys.Mac?.map((key, index2) => {
2604
- return /* @__PURE__ */ jsx8("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ jsx8(Kbd, { children: key }) }, index2);
2760
+ /* @__PURE__ */ jsx9(Text, { size: "small", children: shortcut.label }),
2761
+ /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-x-1", children: shortcut.keys.Mac?.map((key, index2) => {
2762
+ return /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ jsx9(Kbd, { children: key }) }, index2);
2605
2763
  }) })
2606
2764
  ]
2607
2765
  },
@@ -2614,7 +2772,7 @@ var DataGridKeyboardShortcutModal = ({
2614
2772
  };
2615
2773
 
2616
2774
  // src/components/data-grid/components/data-grid-root.tsx
2617
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
2775
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
2618
2776
  var ROW_HEIGHT = 40;
2619
2777
  var getCommonPinningStyles = (column) => {
2620
2778
  const isPinned = column.getIsPinned();
@@ -2637,9 +2795,16 @@ var DataGridRoot = ({
2637
2795
  getSubRows,
2638
2796
  onEditingChange,
2639
2797
  disableInteractions,
2640
- multiColumnSelection = false
2798
+ multiColumnSelection = false,
2799
+ showColumnsDropdown = true,
2800
+ totalRowCount,
2801
+ onFetchMore,
2802
+ isFetchingMore,
2803
+ hasNextPage,
2804
+ headerContent
2641
2805
  }) => {
2642
- const containerRef = useRef3(null);
2806
+ const isLazyMode = totalRowCount !== void 0;
2807
+ const containerRef = useRef4(null);
2643
2808
  const { redo, undo, execute } = useCommandHistory();
2644
2809
  const {
2645
2810
  register,
@@ -2648,16 +2813,16 @@ var DataGridRoot = ({
2648
2813
  setValue: setValue2,
2649
2814
  formState: { errors }
2650
2815
  } = state;
2651
- const [internalTrapActive, setTrapActive] = useState8(true);
2816
+ const [internalTrapActive, setTrapActive] = useState9(true);
2652
2817
  const trapActive = !disableInteractions && internalTrapActive;
2653
- const [anchor, setAnchor] = useState8(null);
2654
- const [rangeEnd, setRangeEnd] = useState8(null);
2655
- const [dragEnd, setDragEnd] = useState8(null);
2656
- const [isSelecting, setIsSelecting] = useState8(false);
2657
- const [isDragging, setIsDragging] = useState8(false);
2658
- const [isEditing, setIsEditing] = useState8(false);
2659
- const [columnVisibility, setColumnVisibility] = useState8({});
2660
- const [rowVisibility, setRowVisibility] = useState8({});
2818
+ const [anchor, setAnchor] = useState9(null);
2819
+ const [rangeEnd, setRangeEnd] = useState9(null);
2820
+ const [dragEnd, setDragEnd] = useState9(null);
2821
+ const [isSelecting, setIsSelecting] = useState9(false);
2822
+ const [isDragging, setIsDragging] = useState9(false);
2823
+ const [isEditing, setIsEditing] = useState9(false);
2824
+ const [columnVisibility, setColumnVisibility] = useState9({});
2825
+ const [rowVisibility, setRowVisibility] = useState9({});
2661
2826
  const grid = useReactTable({
2662
2827
  data,
2663
2828
  columns,
@@ -2684,10 +2849,13 @@ var DataGridRoot = ({
2684
2849
  [flatRows, rowVisibility]
2685
2850
  );
2686
2851
  const visibleColumns = grid.getVisibleLeafColumns();
2852
+ const effectiveRowCount = isLazyMode ? totalRowCount : visibleRows.length;
2687
2853
  const rowVirtualizer = useVirtualizer({
2688
- count: visibleRows.length,
2854
+ count: effectiveRowCount,
2689
2855
  estimateSize: () => ROW_HEIGHT,
2690
2856
  getScrollElement: () => containerRef.current,
2857
+ // Measure actual row heights for dynamic sizing (disabled in Firefox due to measurement issues). Taken from Tanstack
2858
+ measureElement: typeof window !== "undefined" && navigator.userAgent.indexOf("Firefox") === -1 ? (element) => element?.getBoundingClientRect().height : void 0,
2691
2859
  overscan: 5,
2692
2860
  rangeExtractor: (range) => {
2693
2861
  const toRender = new Set(
@@ -2706,6 +2874,56 @@ var DataGridRoot = ({
2706
2874
  }
2707
2875
  });
2708
2876
  const virtualRows = rowVirtualizer.getVirtualItems();
2877
+ const lazyLoadingRefs = useRef4({
2878
+ onFetchMore,
2879
+ hasNextPage,
2880
+ isFetchingMore,
2881
+ loadedRowCount: visibleRows.length
2882
+ });
2883
+ useEffect6(() => {
2884
+ lazyLoadingRefs.current = {
2885
+ onFetchMore,
2886
+ hasNextPage,
2887
+ isFetchingMore,
2888
+ loadedRowCount: visibleRows.length
2889
+ };
2890
+ }, [onFetchMore, hasNextPage, isFetchingMore, visibleRows.length]);
2891
+ const hasData = visibleRows.length > 0;
2892
+ const handleScroll = useCallback15(() => {
2893
+ const { onFetchMore: onFetchMore2, hasNextPage: hasNextPage2, isFetchingMore: isFetchingMore2, loadedRowCount } = lazyLoadingRefs.current;
2894
+ if (!onFetchMore2 || !hasNextPage2 || isFetchingMore2) {
2895
+ return;
2896
+ }
2897
+ const scrollElement = containerRef.current;
2898
+ const { scrollTop, clientHeight } = scrollElement;
2899
+ const loadedHeight = loadedRowCount * ROW_HEIGHT;
2900
+ const viewportBottom = scrollTop + clientHeight;
2901
+ const fetchThreshold = loadedHeight - ROW_HEIGHT * 10;
2902
+ if (viewportBottom >= fetchThreshold) {
2903
+ onFetchMore2();
2904
+ }
2905
+ }, [lazyLoadingRefs, containerRef]);
2906
+ useEffect6(() => {
2907
+ if (!isLazyMode || !hasData) {
2908
+ return;
2909
+ }
2910
+ const container = containerRef.current;
2911
+ if (!container) {
2912
+ return;
2913
+ }
2914
+ const timeoutId = setTimeout(() => {
2915
+ const scrollElement = containerRef.current;
2916
+ if (!scrollElement) {
2917
+ return;
2918
+ }
2919
+ scrollElement.addEventListener("scroll", handleScroll);
2920
+ }, 100);
2921
+ return () => {
2922
+ clearTimeout(timeoutId);
2923
+ const scrollElement = containerRef.current;
2924
+ scrollElement?.removeEventListener("scroll", handleScroll);
2925
+ };
2926
+ }, [isLazyMode, hasData]);
2709
2927
  const columnVirtualizer = useVirtualizer({
2710
2928
  count: visibleColumns.length,
2711
2929
  estimateSize: (index) => visibleColumns[index].getSize(),
@@ -2747,7 +2965,7 @@ var DataGridRoot = ({
2747
2965
  [flatRows, columns, multiColumnSelection]
2748
2966
  );
2749
2967
  const queryTool = useDataGridQueryTool(containerRef);
2750
- const setSingleRange = useCallback14(
2968
+ const setSingleRange = useCallback15(
2751
2969
  (coordinates) => {
2752
2970
  setAnchor(coordinates);
2753
2971
  setRangeEnd(coordinates);
@@ -2755,7 +2973,7 @@ var DataGridRoot = ({
2755
2973
  []
2756
2974
  );
2757
2975
  const { errorCount, isHighlighted, toggleErrorHighlighting } = useDataGridErrorHighlighting(matrix, grid, errors);
2758
- const handleToggleErrorHighlighting = useCallback14(() => {
2976
+ const handleToggleErrorHighlighting = useCallback15(() => {
2759
2977
  toggleErrorHighlighting(
2760
2978
  rowVisibility,
2761
2979
  columnVisibility,
@@ -2769,7 +2987,7 @@ var DataGridRoot = ({
2769
2987
  handleResetColumns,
2770
2988
  isDisabled: isColumsDisabled
2771
2989
  } = useDataGridColumnVisibility(grid, matrix);
2772
- const handleToggleColumnVisibility = useCallback14(
2990
+ const handleToggleColumnVisibility = useCallback15(
2773
2991
  (index) => {
2774
2992
  return handleToggleColumn(index);
2775
2993
  },
@@ -2791,7 +3009,7 @@ var DataGridRoot = ({
2791
3009
  matrix,
2792
3010
  form: state
2793
3011
  });
2794
- const onEditingChangeHandler = useCallback14(
3012
+ const onEditingChangeHandler = useCallback15(
2795
3013
  (value) => {
2796
3014
  if (onEditingChange) {
2797
3015
  onEditingChange(value);
@@ -2879,7 +3097,7 @@ var DataGridRoot = ({
2879
3097
  const { getCellErrorMetadata, getCellMetadata } = useDataGridCellMetadata({
2880
3098
  matrix
2881
3099
  });
2882
- useEffect5(() => {
3100
+ useEffect6(() => {
2883
3101
  if (!trapActive) {
2884
3102
  return;
2885
3103
  }
@@ -2900,7 +3118,7 @@ var DataGridRoot = ({
2900
3118
  handleCopyEvent,
2901
3119
  handlePasteEvent
2902
3120
  ]);
2903
- useEffect5(() => {
3121
+ useEffect6(() => {
2904
3122
  const specialFocusHandler = (e) => {
2905
3123
  if (isSpecialFocusKey(e)) {
2906
3124
  handleSpecialFocusKeys(e);
@@ -2912,12 +3130,12 @@ var DataGridRoot = ({
2912
3130
  window.removeEventListener("keydown", specialFocusHandler);
2913
3131
  };
2914
3132
  }, [handleSpecialFocusKeys]);
2915
- const handleHeaderInteractionChange = useCallback14((isActive) => {
3133
+ const handleHeaderInteractionChange = useCallback15((isActive) => {
2916
3134
  if (isActive) {
2917
3135
  setTrapActive(false);
2918
3136
  }
2919
3137
  }, []);
2920
- useEffect5(() => {
3138
+ useEffect6(() => {
2921
3139
  if (!anchor) {
2922
3140
  return;
2923
3141
  }
@@ -2926,7 +3144,7 @@ var DataGridRoot = ({
2926
3144
  }
2927
3145
  setRangeEnd(anchor);
2928
3146
  }, [anchor, rangeEnd]);
2929
- useEffect5(() => {
3147
+ useEffect6(() => {
2930
3148
  if (!anchor && matrix) {
2931
3149
  const coords = matrix.getFirstNavigableCell();
2932
3150
  if (coords) {
@@ -2978,7 +3196,7 @@ var DataGridRoot = ({
2978
3196
  navigateToField
2979
3197
  ]
2980
3198
  );
2981
- const handleRestoreGridFocus = useCallback14(() => {
3199
+ const handleRestoreGridFocus = useCallback15(() => {
2982
3200
  if (anchor && !trapActive) {
2983
3201
  setTrapActive(true);
2984
3202
  setSingleRange(anchor);
@@ -2988,10 +3206,11 @@ var DataGridRoot = ({
2988
3206
  });
2989
3207
  }
2990
3208
  }, [anchor, trapActive, setSingleRange, scrollToCoordinates, queryTool]);
2991
- return /* @__PURE__ */ jsx9(DataGridContext.Provider, { value: values, children: /* @__PURE__ */ jsxs7("div", { className: "bg-ui-bg-subtle flex size-full flex-col", children: [
2992
- /* @__PURE__ */ jsx9(
3209
+ return /* @__PURE__ */ jsx10(DataGridContext.Provider, { value: values, children: /* @__PURE__ */ jsxs7("div", { className: "bg-ui-bg-subtle flex size-full flex-col", children: [
3210
+ /* @__PURE__ */ jsx10(
2993
3211
  DataGridHeader,
2994
3212
  {
3213
+ showColumnsDropdown,
2995
3214
  columnOptions,
2996
3215
  isDisabled: isColumsDisabled,
2997
3216
  onToggleColumn: handleToggleColumnVisibility,
@@ -2999,10 +3218,11 @@ var DataGridRoot = ({
2999
3218
  onToggleErrorHighlighting: handleToggleErrorHighlighting,
3000
3219
  onResetColumns: handleResetColumns,
3001
3220
  isHighlighted,
3002
- onHeaderInteractionChange: handleHeaderInteractionChange
3221
+ onHeaderInteractionChange: handleHeaderInteractionChange,
3222
+ headerContent
3003
3223
  }
3004
3224
  ),
3005
- /* @__PURE__ */ jsx9("div", { className: "size-full overflow-hidden", children: /* @__PURE__ */ jsx9(
3225
+ /* @__PURE__ */ jsx10("div", { className: "size-full overflow-hidden", children: /* @__PURE__ */ jsx10(
3006
3226
  "div",
3007
3227
  {
3008
3228
  ref: containerRef,
@@ -3014,7 +3234,7 @@ var DataGridRoot = ({
3014
3234
  "data-container": true,
3015
3235
  role: "application",
3016
3236
  children: /* @__PURE__ */ jsxs7("div", { role: "grid", className: "text-ui-fg-subtle grid", children: [
3017
- /* @__PURE__ */ jsx9(
3237
+ /* @__PURE__ */ jsx10(
3018
3238
  "div",
3019
3239
  {
3020
3240
  role: "rowgroup",
@@ -3025,7 +3245,7 @@ var DataGridRoot = ({
3025
3245
  role: "row",
3026
3246
  className: "flex h-10 w-full",
3027
3247
  children: [
3028
- virtualPaddingLeft ? /* @__PURE__ */ jsx9(
3248
+ virtualPaddingLeft ? /* @__PURE__ */ jsx10(
3029
3249
  "div",
3030
3250
  {
3031
3251
  role: "presentation",
@@ -3037,7 +3257,7 @@ var DataGridRoot = ({
3037
3257
  const previousVC = array[index - 1];
3038
3258
  if (previousVC && vc.index !== previousVC.index + 1) {
3039
3259
  acc.push(
3040
- /* @__PURE__ */ jsx9(
3260
+ /* @__PURE__ */ jsx10(
3041
3261
  "div",
3042
3262
  {
3043
3263
  role: "presentation",
@@ -3051,7 +3271,7 @@ var DataGridRoot = ({
3051
3271
  );
3052
3272
  }
3053
3273
  acc.push(
3054
- /* @__PURE__ */ jsx9(
3274
+ /* @__PURE__ */ jsx10(
3055
3275
  "div",
3056
3276
  {
3057
3277
  role: "columnheader",
@@ -3071,7 +3291,7 @@ var DataGridRoot = ({
3071
3291
  );
3072
3292
  return acc;
3073
3293
  }, []),
3074
- virtualPaddingRight ? /* @__PURE__ */ jsx9(
3294
+ virtualPaddingRight ? /* @__PURE__ */ jsx10(
3075
3295
  "div",
3076
3296
  {
3077
3297
  role: "presentation",
@@ -3087,7 +3307,7 @@ var DataGridRoot = ({
3087
3307
  ))
3088
3308
  }
3089
3309
  ),
3090
- /* @__PURE__ */ jsx9(
3310
+ /* @__PURE__ */ jsx10(
3091
3311
  "div",
3092
3312
  {
3093
3313
  role: "rowgroup",
@@ -3097,13 +3317,26 @@ var DataGridRoot = ({
3097
3317
  },
3098
3318
  children: virtualRows.map((virtualRow) => {
3099
3319
  const row = visibleRows[virtualRow.index];
3320
+ if (!row) {
3321
+ return /* @__PURE__ */ jsx10(
3322
+ DataGridRowSkeleton,
3323
+ {
3324
+ virtualRow,
3325
+ virtualColumns,
3326
+ virtualPaddingLeft,
3327
+ virtualPaddingRight
3328
+ },
3329
+ `skeleton-${virtualRow.index}`
3330
+ );
3331
+ }
3100
3332
  const rowIndex = flatRows.findIndex((r) => r.id === row.id);
3101
- return /* @__PURE__ */ jsx9(
3333
+ return /* @__PURE__ */ jsx10(
3102
3334
  DataGridRow,
3103
3335
  {
3104
3336
  row,
3105
3337
  rowIndex,
3106
3338
  virtualRow,
3339
+ rowVirtualizer,
3107
3340
  flatColumns,
3108
3341
  virtualColumns,
3109
3342
  anchor,
@@ -3130,10 +3363,12 @@ var DataGridHeader = ({
3130
3363
  isHighlighted,
3131
3364
  errorCount,
3132
3365
  onToggleErrorHighlighting,
3133
- onHeaderInteractionChange
3366
+ onHeaderInteractionChange,
3367
+ showColumnsDropdown,
3368
+ headerContent
3134
3369
  }) => {
3135
- const [shortcutsOpen, setShortcutsOpen] = useState8(false);
3136
- const [columnsOpen, setColumnsOpen] = useState8(false);
3370
+ const [shortcutsOpen, setShortcutsOpen] = useState9(false);
3371
+ const [columnsOpen, setColumnsOpen] = useState9(false);
3137
3372
  const { t } = useTranslation3();
3138
3373
  const direction = useDocumentDirection();
3139
3374
  const hasChanged = columnOptions.some((column) => !column.checked);
@@ -3146,7 +3381,7 @@ var DataGridHeader = ({
3146
3381
  setColumnsOpen(value);
3147
3382
  };
3148
3383
  return /* @__PURE__ */ jsxs7("div", { className: "bg-ui-bg-base flex items-center justify-between border-b p-4", children: [
3149
- /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-x-2", children: [
3384
+ showColumnsDropdown && /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-x-2", children: [
3150
3385
  /* @__PURE__ */ jsxs7(
3151
3386
  DropdownMenu,
3152
3387
  {
@@ -3154,23 +3389,23 @@ var DataGridHeader = ({
3154
3389
  open: columnsOpen,
3155
3390
  onOpenChange: handleColumnsOpenChange,
3156
3391
  children: [
3157
- /* @__PURE__ */ jsx9(
3392
+ /* @__PURE__ */ jsx10(
3158
3393
  ConditionalTooltip,
3159
3394
  {
3160
3395
  showTooltip: isDisabled,
3161
3396
  content: t("dataGrid.columns.disabled"),
3162
- children: /* @__PURE__ */ jsx9(DropdownMenu.Trigger, { asChild: true, disabled: isDisabled, children: /* @__PURE__ */ jsxs7(Button2, { size: "small", variant: "secondary", children: [
3163
- hasChanged ? /* @__PURE__ */ jsx9(AdjustmentsDone, {}) : /* @__PURE__ */ jsx9(Adjustments, {}),
3397
+ children: /* @__PURE__ */ jsx10(DropdownMenu.Trigger, { asChild: true, disabled: isDisabled, children: /* @__PURE__ */ jsxs7(Button2, { size: "small", variant: "secondary", children: [
3398
+ hasChanged ? /* @__PURE__ */ jsx10(AdjustmentsDone, {}) : /* @__PURE__ */ jsx10(Adjustments, {}),
3164
3399
  t("dataGrid.columns.view")
3165
3400
  ] }) })
3166
3401
  }
3167
3402
  ),
3168
- /* @__PURE__ */ jsx9(DropdownMenu.Content, { children: columnOptions.map((column, index) => {
3403
+ /* @__PURE__ */ jsx10(DropdownMenu.Content, { children: columnOptions.map((column, index) => {
3169
3404
  const { checked, disabled, id, name } = column;
3170
3405
  if (disabled) {
3171
3406
  return null;
3172
3407
  }
3173
- return /* @__PURE__ */ jsx9(
3408
+ return /* @__PURE__ */ jsx10(
3174
3409
  DropdownMenu.CheckboxItem,
3175
3410
  {
3176
3411
  checked,
@@ -3184,7 +3419,7 @@ var DataGridHeader = ({
3184
3419
  ]
3185
3420
  }
3186
3421
  ),
3187
- hasChanged && /* @__PURE__ */ jsx9(
3422
+ hasChanged && /* @__PURE__ */ jsx10(
3188
3423
  Button2,
3189
3424
  {
3190
3425
  size: "small",
@@ -3197,7 +3432,8 @@ var DataGridHeader = ({
3197
3432
  }
3198
3433
  )
3199
3434
  ] }),
3200
- /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-x-2", children: [
3435
+ headerContent,
3436
+ /* @__PURE__ */ jsxs7("div", { className: "ml-auto flex items-center gap-x-2", children: [
3201
3437
  errorCount > 0 && /* @__PURE__ */ jsxs7(
3202
3438
  Button2,
3203
3439
  {
@@ -3205,18 +3441,18 @@ var DataGridHeader = ({
3205
3441
  variant: "secondary",
3206
3442
  type: "button",
3207
3443
  onClick: onToggleErrorHighlighting,
3208
- className: clx5({
3444
+ className: clx6({
3209
3445
  "bg-ui-button-neutral-pressed": isHighlighted
3210
3446
  }),
3211
3447
  children: [
3212
- /* @__PURE__ */ jsx9(ExclamationCircle2, { className: "text-ui-fg-subtle" }),
3213
- /* @__PURE__ */ jsx9("span", { children: t("dataGrid.errors.count", {
3448
+ /* @__PURE__ */ jsx10(ExclamationCircle2, { className: "text-ui-fg-subtle" }),
3449
+ /* @__PURE__ */ jsx10("span", { children: t("dataGrid.errors.count", {
3214
3450
  count: errorCount
3215
3451
  }) })
3216
3452
  ]
3217
3453
  }
3218
3454
  ),
3219
- /* @__PURE__ */ jsx9(
3455
+ /* @__PURE__ */ jsx10(
3220
3456
  DataGridKeyboardShortcutModal,
3221
3457
  {
3222
3458
  open: shortcutsOpen,
@@ -3239,7 +3475,7 @@ var DataGridCell = ({
3239
3475
  col: columnIndex
3240
3476
  };
3241
3477
  const isAnchor = isCellMatch(coords, anchor);
3242
- return /* @__PURE__ */ jsx9(
3478
+ return /* @__PURE__ */ jsx10(
3243
3479
  "div",
3244
3480
  {
3245
3481
  role: "gridcell",
@@ -3251,21 +3487,21 @@ var DataGridCell = ({
3251
3487
  },
3252
3488
  "data-row-index": rowIndex,
3253
3489
  "data-column-index": columnIndex,
3254
- className: clx5(
3255
- "relative flex items-center border-b border-r p-0 outline-none"
3490
+ className: clx6(
3491
+ "relative flex items-stretch border-b border-r p-0 outline-none"
3256
3492
  ),
3257
3493
  tabIndex: -1,
3258
- children: /* @__PURE__ */ jsxs7("div", { className: "relative h-full w-full", children: [
3494
+ children: /* @__PURE__ */ jsxs7("div", { className: "relative w-full", children: [
3259
3495
  flexRender(cell.column.columnDef.cell, {
3260
3496
  ...cell.getContext(),
3261
3497
  columnIndex,
3262
3498
  rowIndex
3263
3499
  }),
3264
- isAnchor && /* @__PURE__ */ jsx9(
3500
+ isAnchor && /* @__PURE__ */ jsx10(
3265
3501
  "div",
3266
3502
  {
3267
3503
  onMouseDown: onDragToFillStart,
3268
- className: clx5(
3504
+ className: clx6(
3269
3505
  "bg-ui-fg-interactive absolute bottom-0 right-0 z-[3] size-1.5 cursor-ns-resize",
3270
3506
  {
3271
3507
  "cursor-nwse-resize": multiColumnSelection
@@ -3281,6 +3517,7 @@ var DataGridRow = ({
3281
3517
  row,
3282
3518
  rowIndex,
3283
3519
  virtualRow,
3520
+ rowVirtualizer,
3284
3521
  virtualPaddingLeft,
3285
3522
  virtualPaddingRight,
3286
3523
  virtualColumns,
@@ -3295,12 +3532,14 @@ var DataGridRow = ({
3295
3532
  {
3296
3533
  role: "row",
3297
3534
  "aria-rowindex": virtualRow.index,
3535
+ "data-index": virtualRow.index,
3536
+ ref: (node) => rowVirtualizer.measureElement(node),
3298
3537
  style: {
3299
3538
  transform: `translateY(${virtualRow.start}px)`
3300
3539
  },
3301
- className: "bg-ui-bg-subtle txt-compact-small absolute flex h-10 w-full",
3540
+ className: "bg-ui-bg-subtle txt-compact-small absolute flex min-h-10 w-full",
3302
3541
  children: [
3303
- virtualPaddingLeft ? /* @__PURE__ */ jsx9(
3542
+ virtualPaddingLeft ? /* @__PURE__ */ jsx10(
3304
3543
  "div",
3305
3544
  {
3306
3545
  role: "presentation",
@@ -3314,7 +3553,7 @@ var DataGridRow = ({
3314
3553
  const previousVC = array[index - 1];
3315
3554
  if (previousVC && vc.index !== previousVC.index + 1) {
3316
3555
  acc.push(
3317
- /* @__PURE__ */ jsx9(
3556
+ /* @__PURE__ */ jsx10(
3318
3557
  "div",
3319
3558
  {
3320
3559
  role: "presentation",
@@ -3328,7 +3567,7 @@ var DataGridRow = ({
3328
3567
  );
3329
3568
  }
3330
3569
  acc.push(
3331
- /* @__PURE__ */ jsx9(
3570
+ /* @__PURE__ */ jsx10(
3332
3571
  DataGridCell,
3333
3572
  {
3334
3573
  cell,
@@ -3343,7 +3582,73 @@ var DataGridRow = ({
3343
3582
  );
3344
3583
  return acc;
3345
3584
  }, []),
3346
- virtualPaddingRight ? /* @__PURE__ */ jsx9(
3585
+ virtualPaddingRight ? /* @__PURE__ */ jsx10(
3586
+ "div",
3587
+ {
3588
+ role: "presentation",
3589
+ style: { display: "flex", width: virtualPaddingRight }
3590
+ }
3591
+ ) : null
3592
+ ]
3593
+ }
3594
+ );
3595
+ };
3596
+ var DataGridRowSkeleton = ({
3597
+ virtualRow,
3598
+ virtualPaddingLeft,
3599
+ virtualPaddingRight,
3600
+ virtualColumns
3601
+ }) => {
3602
+ return /* @__PURE__ */ jsxs7(
3603
+ "div",
3604
+ {
3605
+ role: "row",
3606
+ "aria-rowindex": virtualRow.index,
3607
+ style: {
3608
+ transform: `translateY(${virtualRow.start}px)`
3609
+ },
3610
+ className: "bg-ui-bg-subtle txt-compact-small absolute flex h-10 w-full",
3611
+ children: [
3612
+ virtualPaddingLeft ? /* @__PURE__ */ jsx10(
3613
+ "div",
3614
+ {
3615
+ role: "presentation",
3616
+ style: { display: "flex", width: virtualPaddingLeft }
3617
+ }
3618
+ ) : null,
3619
+ virtualColumns.map((vc, index, array) => {
3620
+ const previousVC = array[index - 1];
3621
+ const elements = [];
3622
+ if (previousVC && vc.index !== previousVC.index + 1) {
3623
+ elements.push(
3624
+ /* @__PURE__ */ jsx10(
3625
+ "div",
3626
+ {
3627
+ role: "presentation",
3628
+ style: {
3629
+ display: "flex",
3630
+ width: `${vc.start - previousVC.end}px`
3631
+ }
3632
+ },
3633
+ `padding-${previousVC.index}-${vc.index}`
3634
+ )
3635
+ );
3636
+ }
3637
+ elements.push(
3638
+ /* @__PURE__ */ jsx10(
3639
+ "div",
3640
+ {
3641
+ role: "gridcell",
3642
+ style: { width: vc.size },
3643
+ className: "relative flex items-center border-b border-r p-0 outline-none",
3644
+ children: /* @__PURE__ */ jsx10("div", { className: "flex h-full w-full items-center px-4", children: /* @__PURE__ */ jsx10("div", { className: "bg-ui-bg-component h-4 w-3/4 animate-pulse rounded" }) })
3645
+ },
3646
+ `skeleton-cell-${vc.index}`
3647
+ )
3648
+ );
3649
+ return elements;
3650
+ }),
3651
+ virtualPaddingRight ? /* @__PURE__ */ jsx10(
3347
3652
  "div",
3348
3653
  {
3349
3654
  role: "presentation",
@@ -3356,10 +3661,10 @@ var DataGridRow = ({
3356
3661
  };
3357
3662
 
3358
3663
  // src/components/data-grid/components/data-grid-text-cell.tsx
3359
- import { clx as clx6 } from "@medusajs/ui";
3360
- import { useEffect as useEffect6, useState as useState9 } from "react";
3361
- import { Controller as Controller4 } from "react-hook-form";
3362
- import { jsx as jsx10 } from "react/jsx-runtime";
3664
+ import { clx as clx7 } from "@medusajs/ui";
3665
+ import { useEffect as useEffect7, useRef as useRef5, useState as useState10 } from "react";
3666
+ import { Controller as Controller5 } from "react-hook-form";
3667
+ import { jsx as jsx11 } from "react/jsx-runtime";
3363
3668
  var DataGridTextCell = ({
3364
3669
  context
3365
3670
  }) => {
@@ -3368,38 +3673,40 @@ var DataGridTextCell = ({
3368
3673
  });
3369
3674
  const errorProps = useDataGridCellError({ context });
3370
3675
  const { container, input } = renderProps;
3371
- return /* @__PURE__ */ jsx10(
3372
- Controller4,
3676
+ return /* @__PURE__ */ jsx11(
3677
+ Controller5,
3373
3678
  {
3374
3679
  control,
3375
3680
  name: field,
3376
3681
  render: ({ field: field2 }) => {
3377
- return /* @__PURE__ */ jsx10(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx10(Inner4, { field: field2, inputProps: input }) });
3682
+ return /* @__PURE__ */ jsx11(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx11(Inner5, { field: field2, inputProps: input }) });
3378
3683
  }
3379
3684
  }
3380
3685
  );
3381
3686
  };
3382
- var Inner4 = ({
3687
+ var Inner5 = ({
3383
3688
  field,
3384
3689
  inputProps
3385
3690
  }) => {
3386
3691
  const { onChange: _, onBlur, ref, value, ...rest } = field;
3387
3692
  const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
3388
- const [localValue, setLocalValue] = useState9(value);
3389
- useEffect6(() => {
3693
+ const [localValue, setLocalValue] = useState10(value);
3694
+ const inputElRef = useRef5(null);
3695
+ useEffect7(() => {
3390
3696
  setLocalValue(value);
3391
3697
  }, [value]);
3392
- const combinedRefs = useCombinedRefs(inputRef, ref);
3393
- return /* @__PURE__ */ jsx10(
3698
+ const combinedRefs = useCombinedRefs(inputRef, ref, inputElRef);
3699
+ return /* @__PURE__ */ jsx11(
3394
3700
  "input",
3395
3701
  {
3396
- className: clx6(
3397
- "txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer items-center justify-center bg-transparent outline-none",
3398
- "focus:cursor-text"
3702
+ className: clx7(
3703
+ "txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer bg-transparent outline-none",
3704
+ "focus:cursor-text",
3705
+ "items-center justify-center"
3399
3706
  ),
3400
3707
  autoComplete: "off",
3401
3708
  tabIndex: -1,
3402
- value: localValue,
3709
+ value: localValue ?? "",
3403
3710
  onChange: (e) => setLocalValue(e.target.value),
3404
3711
  ref: combinedRefs,
3405
3712
  onBlur: () => {
@@ -3413,23 +3720,235 @@ var Inner4 = ({
3413
3720
  );
3414
3721
  };
3415
3722
 
3723
+ // src/components/data-grid/components/data-grid-textarea-modal-cell.tsx
3724
+ import { clx as clx8, Textarea } from "@medusajs/ui";
3725
+ import { Popover as RadixPopover } from "radix-ui";
3726
+ import { useCallback as useCallback16, useEffect as useEffect8, useRef as useRef6, useState as useState11 } from "react";
3727
+ import { Controller as Controller6 } from "react-hook-form";
3728
+ import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
3729
+ var DataGridExpandableTextCell = ({
3730
+ context,
3731
+ fieldLabel
3732
+ }) => {
3733
+ const { field, control, renderProps } = useDataGridCell({
3734
+ context
3735
+ });
3736
+ const errorProps = useDataGridCellError({ context });
3737
+ const { container, input } = renderProps;
3738
+ return /* @__PURE__ */ jsx12(
3739
+ Controller6,
3740
+ {
3741
+ control,
3742
+ name: field,
3743
+ render: ({ field: field2 }) => {
3744
+ return /* @__PURE__ */ jsx12(
3745
+ Inner6,
3746
+ {
3747
+ field: field2,
3748
+ inputProps: input,
3749
+ fieldLabel,
3750
+ container,
3751
+ errorProps
3752
+ }
3753
+ );
3754
+ }
3755
+ }
3756
+ );
3757
+ };
3758
+ var Inner6 = ({
3759
+ field,
3760
+ inputProps,
3761
+ fieldLabel: _fieldLabel,
3762
+ container,
3763
+ errorProps
3764
+ }) => {
3765
+ const { onChange: _, onBlur, ref, value, ...rest } = field;
3766
+ const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
3767
+ const { setSingleRange, anchor } = useDataGridContext();
3768
+ const { row, col } = anchor || { row: 0, col: 0 };
3769
+ const [localValue, setLocalValue] = useState11(value || "");
3770
+ const [isPopoverOpen, setIsPopoverOpen] = useState11(false);
3771
+ const [popoverValue, setPopoverValue] = useState11(value || "");
3772
+ const popoverContentRef = useRef6(null);
3773
+ useEffect8(() => {
3774
+ setLocalValue(value || "");
3775
+ }, [value]);
3776
+ useEffect8(() => {
3777
+ if (isPopoverOpen) {
3778
+ setPopoverValue(value || "");
3779
+ }
3780
+ }, [isPopoverOpen, value]);
3781
+ useEffect8(() => {
3782
+ if (!isPopoverOpen || !popoverContentRef.current) {
3783
+ return;
3784
+ }
3785
+ const handleKeyDownCapture = (e) => {
3786
+ const target = e.target;
3787
+ const isTextarea = target.tagName === "TEXTAREA";
3788
+ const isInPopover = popoverContentRef.current && popoverContentRef.current.contains(target);
3789
+ if (isTextarea || isInPopover) {
3790
+ const dataGridKeys = [
3791
+ "Enter",
3792
+ "Delete",
3793
+ "Backspace",
3794
+ "ArrowUp",
3795
+ "ArrowDown",
3796
+ "ArrowLeft",
3797
+ "ArrowRight",
3798
+ "Tab",
3799
+ " "
3800
+ ];
3801
+ if (dataGridKeys.includes(e.key) && e.key !== "Escape") {
3802
+ e.stopImmediatePropagation();
3803
+ }
3804
+ }
3805
+ };
3806
+ window.addEventListener("keydown", handleKeyDownCapture, true);
3807
+ return () => {
3808
+ window.removeEventListener("keydown", handleKeyDownCapture, true);
3809
+ };
3810
+ }, [isPopoverOpen]);
3811
+ const combinedRefs = useCombinedRefs(inputRef, ref);
3812
+ const handleOverlayMouseDown = useCallback16(
3813
+ (e) => {
3814
+ if (e.detail === 2) {
3815
+ e.preventDefault();
3816
+ e.stopPropagation();
3817
+ setSingleRange({ row, col });
3818
+ setIsPopoverOpen(true);
3819
+ return;
3820
+ }
3821
+ container.overlayProps.onMouseDown?.(e);
3822
+ },
3823
+ [container.overlayProps, setSingleRange, row, col]
3824
+ );
3825
+ const customContainer = {
3826
+ ...container,
3827
+ overlayProps: {
3828
+ ...container.overlayProps,
3829
+ onMouseDown: handleOverlayMouseDown
3830
+ }
3831
+ };
3832
+ const handlePopoverSave = () => {
3833
+ onChange(popoverValue, value);
3834
+ setLocalValue(popoverValue);
3835
+ setIsPopoverOpen(false);
3836
+ onBlur();
3837
+ onInputBlur();
3838
+ };
3839
+ const handlePopoverKeyDown = useCallback16((e) => {
3840
+ if (e.key !== "Escape") {
3841
+ e.stopPropagation();
3842
+ }
3843
+ }, []);
3844
+ const displayValue = localValue || "";
3845
+ const truncatedValue = displayValue.length > 50 ? `${displayValue.substring(0, 50)}...` : displayValue;
3846
+ return /* @__PURE__ */ jsxs8(
3847
+ RadixPopover.Root,
3848
+ {
3849
+ open: isPopoverOpen,
3850
+ onOpenChange: (open) => {
3851
+ if (!open) {
3852
+ handlePopoverSave();
3853
+ } else {
3854
+ setIsPopoverOpen(true);
3855
+ }
3856
+ },
3857
+ children: [
3858
+ /* @__PURE__ */ jsxs8(DataGridCellContainer, { ...customContainer, ...errorProps, children: [
3859
+ /* @__PURE__ */ jsx12(RadixPopover.Anchor, { asChild: true, children: /* @__PURE__ */ jsx12(
3860
+ "div",
3861
+ {
3862
+ className: clx8(
3863
+ "txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer items-center justify-center bg-transparent outline-none",
3864
+ "focus:cursor-text"
3865
+ ),
3866
+ children: /* @__PURE__ */ jsx12("span", { className: "w-full truncate text-center", children: truncatedValue })
3867
+ }
3868
+ ) }),
3869
+ /* @__PURE__ */ jsx12(
3870
+ "input",
3871
+ {
3872
+ className: "sr-only",
3873
+ autoComplete: "off",
3874
+ tabIndex: -1,
3875
+ value: localValue,
3876
+ onChange: (e) => setLocalValue(e.target.value),
3877
+ ref: combinedRefs,
3878
+ onBlur: () => {
3879
+ onBlur();
3880
+ onInputBlur();
3881
+ onChange(localValue, value);
3882
+ },
3883
+ ...input,
3884
+ ...rest
3885
+ }
3886
+ )
3887
+ ] }),
3888
+ /* @__PURE__ */ jsx12(RadixPopover.Portal, { children: /* @__PURE__ */ jsx12(
3889
+ RadixPopover.Content,
3890
+ {
3891
+ className: clx8(
3892
+ "bg-ui-bg-base shadow-elevation-flyout flex max-h-[80vh] w-[600px] overflow-hidden p-0 outline-none"
3893
+ ),
3894
+ align: "start",
3895
+ side: "bottom",
3896
+ sideOffset: -29,
3897
+ alignOffset: -16,
3898
+ collisionPadding: 24,
3899
+ onEscapeKeyDown: handlePopoverSave,
3900
+ onKeyDown: handlePopoverKeyDown,
3901
+ children: /* @__PURE__ */ jsx12("div", { ref: popoverContentRef, className: "h-full w-full", children: /* @__PURE__ */ jsx12(
3902
+ Textarea,
3903
+ {
3904
+ value: popoverValue,
3905
+ onChange: (e) => setPopoverValue(e.target.value),
3906
+ onKeyDown: (e) => {
3907
+ e.stopPropagation();
3908
+ },
3909
+ className: "!bg-ui-bg-base h-full min-h-[300px] w-full resize-none border-0 p-4 !shadow-none focus-visible:!shadow-none"
3910
+ }
3911
+ ) })
3912
+ }
3913
+ ) })
3914
+ ]
3915
+ }
3916
+ );
3917
+ };
3918
+
3416
3919
  // src/components/data-grid/data-grid.tsx
3417
- import { jsx as jsx11 } from "react/jsx-runtime";
3920
+ import { jsx as jsx13 } from "react/jsx-runtime";
3418
3921
  var _DataGrid = ({
3419
3922
  isLoading,
3923
+ // Lazy loading props - passed through to DataGridRoot
3924
+ totalRowCount,
3925
+ onFetchMore,
3926
+ isFetchingMore,
3927
+ hasNextPage,
3420
3928
  ...props
3421
3929
  }) => {
3422
- return isLoading ? /* @__PURE__ */ jsx11(
3930
+ return isLoading ? /* @__PURE__ */ jsx13(
3423
3931
  DataGridSkeleton,
3424
3932
  {
3425
3933
  columns: props.columns,
3426
3934
  rows: props.data?.length && props.data.length > 0 ? props.data.length : 10
3427
3935
  }
3428
- ) : /* @__PURE__ */ jsx11(DataGridRoot, { ...props });
3936
+ ) : /* @__PURE__ */ jsx13(
3937
+ DataGridRoot,
3938
+ {
3939
+ ...props,
3940
+ totalRowCount,
3941
+ onFetchMore,
3942
+ isFetchingMore,
3943
+ hasNextPage
3944
+ }
3945
+ );
3429
3946
  };
3430
3947
  var DataGrid = Object.assign(_DataGrid, {
3431
3948
  BooleanCell: DataGridBooleanCell,
3432
3949
  TextCell: DataGridTextCell,
3950
+ MultilineCell: DataGridMultilineCell,
3951
+ ExpandableTextCell: DataGridExpandableTextCell,
3433
3952
  NumberCell: DataGridNumberCell,
3434
3953
  CurrencyCell: DataGridCurrencyCell,
3435
3954
  ReadonlyCell: DataGridReadonlyCell
@@ -3449,12 +3968,18 @@ function createDataGridHelper() {
3449
3968
  cell,
3450
3969
  disableHiding = false,
3451
3970
  field,
3452
- type
3971
+ type,
3972
+ size,
3973
+ minSize,
3974
+ maxSize
3453
3975
  }) => columnHelper.display({
3454
3976
  id,
3455
3977
  header,
3456
3978
  cell,
3457
3979
  enableHiding: !disableHiding,
3980
+ size,
3981
+ minSize,
3982
+ maxSize,
3458
3983
  meta: {
3459
3984
  name,
3460
3985
  field,
@@ -3468,23 +3993,23 @@ function createDataGridHelper() {
3468
3993
  import { TaxExclusive, TaxInclusive } from "@medusajs/icons";
3469
3994
  import { Tooltip as Tooltip3 } from "@medusajs/ui";
3470
3995
  import { useTranslation as useTranslation4 } from "react-i18next";
3471
- import { jsx as jsx12 } from "react/jsx-runtime";
3996
+ import { jsx as jsx14 } from "react/jsx-runtime";
3472
3997
  var IncludesTaxTooltip = ({
3473
3998
  includesTax
3474
3999
  }) => {
3475
4000
  const { t } = useTranslation4();
3476
- return /* @__PURE__ */ jsx12(
4001
+ return /* @__PURE__ */ jsx14(
3477
4002
  Tooltip3,
3478
4003
  {
3479
4004
  maxWidth: 999,
3480
4005
  content: includesTax ? t("general.includesTaxTooltip") : t("general.excludesTaxTooltip"),
3481
- children: includesTax ? /* @__PURE__ */ jsx12(TaxInclusive, { className: "text-ui-fg-muted shrink-0" }) : /* @__PURE__ */ jsx12(TaxExclusive, { className: "text-ui-fg-muted shrink-0" })
4006
+ children: includesTax ? /* @__PURE__ */ jsx14(TaxInclusive, { className: "text-ui-fg-muted shrink-0" }) : /* @__PURE__ */ jsx14(TaxExclusive, { className: "text-ui-fg-muted shrink-0" })
3482
4007
  }
3483
4008
  );
3484
4009
  };
3485
4010
 
3486
4011
  // src/components/data-grid/helpers/create-data-grid-price-columns.tsx
3487
- import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
4012
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
3488
4013
  var createDataGridPriceColumns = ({
3489
4014
  currencies: currencies2,
3490
4015
  regions,
@@ -3515,15 +4040,15 @@ var createDataGridPriceColumns = ({
3515
4040
  return getFieldName(context, currency);
3516
4041
  },
3517
4042
  type: "number",
3518
- header: () => /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between gap-3", children: [
3519
- /* @__PURE__ */ jsx13("span", { className: "truncate", title: translatedCurrencyName, children: translatedCurrencyName }),
3520
- /* @__PURE__ */ jsx13(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4043
+ header: () => /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between gap-3", children: [
4044
+ /* @__PURE__ */ jsx15("span", { className: "truncate", title: translatedCurrencyName, children: translatedCurrencyName }),
4045
+ /* @__PURE__ */ jsx15(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
3521
4046
  ] }),
3522
4047
  cell: (context) => {
3523
4048
  if (isReadyOnly?.(context)) {
3524
- return /* @__PURE__ */ jsx13(DataGridReadonlyCell, { context });
4049
+ return /* @__PURE__ */ jsx15(DataGridReadonlyCell, { context });
3525
4050
  }
3526
- return /* @__PURE__ */ jsx13(DataGridCurrencyCell, { code: currency, context });
4051
+ return /* @__PURE__ */ jsx15(DataGridCurrencyCell, { code: currency, context });
3527
4052
  }
3528
4053
  });
3529
4054
  }) ?? [],
@@ -3547,19 +4072,19 @@ var createDataGridPriceColumns = ({
3547
4072
  return getFieldName(context, region.id);
3548
4073
  },
3549
4074
  type: "number",
3550
- header: () => /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between gap-3", children: [
3551
- /* @__PURE__ */ jsx13("span", { className: "truncate", title: translatedRegionName, children: translatedRegionName }),
3552
- /* @__PURE__ */ jsx13(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4075
+ header: () => /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between gap-3", children: [
4076
+ /* @__PURE__ */ jsx15("span", { className: "truncate", title: translatedRegionName, children: translatedRegionName }),
4077
+ /* @__PURE__ */ jsx15(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
3553
4078
  ] }),
3554
4079
  cell: (context) => {
3555
4080
  if (isReadyOnly?.(context)) {
3556
- return /* @__PURE__ */ jsx13(DataGridReadonlyCell, { context });
4081
+ return /* @__PURE__ */ jsx15(DataGridReadonlyCell, { context });
3557
4082
  }
3558
4083
  const currency = currencies2?.find((c) => c === region.currency_code);
3559
4084
  if (!currency) {
3560
4085
  return null;
3561
4086
  }
3562
- return /* @__PURE__ */ jsx13(
4087
+ return /* @__PURE__ */ jsx15(
3563
4088
  DataGridCurrencyCell,
3564
4089
  {
3565
4090
  code: region.currency_code,