@medusajs/dashboard 2.22.0 → 2.22.1

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 (234) hide show
  1. package/dist/{add-campaign-promotions-VGH4LCDR.mjs → add-campaign-promotions-IUQHZ5QA.mjs} +1 -1
  2. package/dist/{add-locales-3OTB5FQM.mjs → add-locales-FQQ5W3MB.mjs} +2 -2
  3. package/dist/{adjust-inventory-UPEEXXFU.mjs → adjust-inventory-DJFQZTLA.mjs} +1 -1
  4. package/dist/{api-key-management-create-ROQ6LKUO.mjs → api-key-management-create-7T2MCQ3T.mjs} +1 -1
  5. package/dist/{api-key-management-detail-PPQ6XGZ4.mjs → api-key-management-detail-X3AUNHCO.mjs} +9 -8
  6. package/dist/{api-key-management-edit-QGKZADJX.mjs → api-key-management-edit-S3GYYNWM.mjs} +1 -1
  7. package/dist/{api-key-management-list-OCQN2VOQ.mjs → api-key-management-list-WHT7LED5.mjs} +8 -7
  8. package/dist/{api-key-management-sales-channels-4NTNDHYS.mjs → api-key-management-sales-channels-3WYYKLST.mjs} +1 -1
  9. package/dist/app.js +13056 -12895
  10. package/dist/app.mjs +6 -6
  11. package/dist/{campaign-budget-edit-U6ZGFZCN.mjs → campaign-budget-edit-MVPC66RJ.mjs} +2 -2
  12. package/dist/{campaign-configuration-SESM5XWE.mjs → campaign-configuration-LTA6NKGQ.mjs} +1 -1
  13. package/dist/{campaign-create-KUN2YHP2.mjs → campaign-create-XZ3ZCDTE.mjs} +4 -4
  14. package/dist/{campaign-detail-EW4RJY64.mjs → campaign-detail-ILZA4DJG.mjs} +9 -8
  15. package/dist/{campaign-edit-TPU6ACYT.mjs → campaign-edit-V7KUN7M5.mjs} +1 -1
  16. package/dist/{campaign-list-ZGAMG2HJ.mjs → campaign-list-TPH4BBDI.mjs} +8 -7
  17. package/dist/{categories-metadata-3IX3Y7NM.mjs → categories-metadata-H3TZ7ZC7.mjs} +2 -2
  18. package/dist/{category-create-NMOUVBVL.mjs → category-create-AKYJLVJ2.mjs} +1 -1
  19. package/dist/{category-detail-ZIEUC7DM.mjs → category-detail-I6RNSMTN.mjs} +8 -7
  20. package/dist/{category-edit-HXRXUXIX.mjs → category-edit-PS34TOQX.mjs} +1 -1
  21. package/dist/{category-products-5GM6K37K.mjs → category-products-6DCNKT6C.mjs} +1 -1
  22. package/dist/{chunk-QQOHHUDU.mjs → chunk-23BHNQ2L.mjs} +2 -2
  23. package/dist/chunk-25A53KSK.mjs +156 -0
  24. package/dist/{chunk-SWN424AE.mjs → chunk-2XG5UPAM.mjs} +3 -3
  25. package/dist/{chunk-ZCERNCOX.mjs → chunk-34AF5R5P.mjs} +193 -193
  26. package/dist/{chunk-SOUK6BUQ.mjs → chunk-3M5AAW4J.mjs} +4 -4
  27. package/dist/{chunk-NANNVVYP.mjs → chunk-4KQBZRB4.mjs} +1 -1
  28. package/dist/{chunk-JLY6YSEE.mjs → chunk-7FR6ZF6H.mjs} +18 -181
  29. package/dist/{chunk-JNIMWJV2.mjs → chunk-AFAE54E2.mjs} +2 -2
  30. package/dist/{chunk-6HTZNHPT.mjs → chunk-B3R53QK3.mjs} +1 -1
  31. package/dist/{chunk-7ZGGLSE2.mjs → chunk-BXF2VPJX.mjs} +1 -1
  32. package/dist/{chunk-C36TGGI7.mjs → chunk-DBSNE3L2.mjs} +2 -2
  33. package/dist/{chunk-DJF6GPIA.mjs → chunk-DOJWUV5E.mjs} +1 -1
  34. package/dist/{chunk-L6OMZR2J.mjs → chunk-EBK5S7WC.mjs} +1 -1
  35. package/dist/chunk-HGXZ5BJO.mjs +153 -0
  36. package/dist/{chunk-WCLL7RVP.mjs → chunk-JPXF73N2.mjs} +1 -1
  37. package/dist/{chunk-G6CQOB4G.mjs → chunk-JZXJXG3V.mjs} +1 -1
  38. package/dist/{chunk-AKDC6BWT.mjs → chunk-M7FQTSDS.mjs} +2 -2
  39. package/dist/{chunk-3UMI3ISU.mjs → chunk-PRJK2BND.mjs} +41 -0
  40. package/dist/{chunk-LT7MP5JO.mjs → chunk-QFE4OVWT.mjs} +1 -1
  41. package/dist/{chunk-HZXJDVPI.mjs → chunk-QIK2SODO.mjs} +1 -1
  42. package/dist/{chunk-6MTTMX7E.mjs → chunk-QW3P2QHZ.mjs} +1 -1
  43. package/dist/{chunk-UHB4DWUF.mjs → chunk-R2A5UDCT.mjs} +1 -1
  44. package/dist/{chunk-ZH57KBU7.mjs → chunk-RDBROTJE.mjs} +6 -0
  45. package/dist/{chunk-Y5ZQ26VN.mjs → chunk-V3TXAU2Y.mjs} +1 -1
  46. package/dist/{chunk-3NS4FYII.mjs → chunk-VJIURRDA.mjs} +3 -3
  47. package/dist/{chunk-7QQQEODJ.mjs → chunk-WHWDHRC2.mjs} +1 -1
  48. package/dist/{chunk-O6JNJQ4K.mjs → chunk-Y2CXBS7S.mjs} +1 -1
  49. package/dist/{chunk-ZNSPQGIO.mjs → chunk-Z4CMG3I4.mjs} +1 -1
  50. package/dist/{collection-add-products-JZIEEVAD.mjs → collection-add-products-VHX3EDMB.mjs} +1 -1
  51. package/dist/{collection-create-ZGCQ3UZ4.mjs → collection-create-BIMST735.mjs} +1 -1
  52. package/dist/{collection-detail-STCDEYFR.mjs → collection-detail-7SG445Z7.mjs} +8 -7
  53. package/dist/{collection-edit-Q6UBZJBA.mjs → collection-edit-7E6KSC2T.mjs} +1 -1
  54. package/dist/{collection-list-7Q74YH4K.mjs → collection-list-4DQ3KSL6.mjs} +8 -7
  55. package/dist/{collection-metadata-G7HJW3YY.mjs → collection-metadata-CE5JGMBU.mjs} +2 -2
  56. package/dist/components.js +303 -294
  57. package/dist/components.mjs +10 -9
  58. package/dist/{customer-create-5OKTED3S.mjs → customer-create-DUJEC4OL.mjs} +1 -1
  59. package/dist/{customer-create-address-DXGXL3AR.mjs → customer-create-address-WB6EQTF7.mjs} +1 -1
  60. package/dist/{customer-detail-VDUTRECH.mjs → customer-detail-OCGWUEAC.mjs} +9 -8
  61. package/dist/{customer-edit-FCJB2CR3.mjs → customer-edit-45JRYR7C.mjs} +1 -1
  62. package/dist/{customer-export-CBHVVHT7.mjs → customer-export-SJ7TPUYZ.mjs} +1 -1
  63. package/dist/{customer-group-add-customers-2MXCI4AU.mjs → customer-group-add-customers-2LO4JWCL.mjs} +1 -1
  64. package/dist/{customer-group-create-UWEI2IIX.mjs → customer-group-create-46IX5XKC.mjs} +1 -1
  65. package/dist/{customer-group-detail-537L3QCV.mjs → customer-group-detail-YF4N3ZJQ.mjs} +8 -7
  66. package/dist/{customer-group-edit-OVOHPO3H.mjs → customer-group-edit-AE5DT44M.mjs} +1 -1
  67. package/dist/{customer-group-list-KTNZYQTD.mjs → customer-group-list-3ESALQFX.mjs} +8 -7
  68. package/dist/{customer-group-metadata-5FBOQTIC.mjs → customer-group-metadata-6VTJ63KW.mjs} +2 -2
  69. package/dist/{customer-list-F7FBYGDK.mjs → customer-list-6QEB7GKU.mjs} +8 -7
  70. package/dist/{customer-metadata-4AX44PFG.mjs → customer-metadata-MWH222DL.mjs} +2 -2
  71. package/dist/{customers-add-customer-group-V6FHGHBA.mjs → customers-add-customer-group-K4URSJBC.mjs} +1 -1
  72. package/dist/{edit-inventory-item-FIAC6T5S.mjs → edit-inventory-item-SIBKLOQ5.mjs} +1 -1
  73. package/dist/{edit-inventory-item-attributes-32SIJNVQ.mjs → edit-inventory-item-attributes-FX3YWI36.mjs} +1 -1
  74. package/dist/{edit-reservation-LKXCTILV.mjs → edit-reservation-E6WLT7GE.mjs} +1 -1
  75. package/dist/{edit-rules-P2W5U34C.mjs → edit-rules-VDWS7LUQ.mjs} +1 -1
  76. package/dist/{inventory-create-GZQWBRNZ.mjs → inventory-create-XQ6JNL34.mjs} +3 -3
  77. package/dist/{inventory-list-TNCHH5AH.mjs → inventory-list-XDAGS3IC.mjs} +8 -7
  78. package/dist/{inventory-metadata-WFC6F5S4.mjs → inventory-metadata-J5VYM2KL.mjs} +2 -2
  79. package/dist/{inventory-stock-ALPB5DHU.mjs → inventory-stock-OTM7XOOH.mjs} +4 -4
  80. package/dist/lib.js +6 -0
  81. package/dist/lib.mjs +5 -5
  82. package/dist/{location-create-W3N4OIRN.mjs → location-create-65BKVUH7.mjs} +1 -1
  83. package/dist/{location-edit-WR3GUO2A.mjs → location-edit-XWALWBUW.mjs} +1 -1
  84. package/dist/{location-fulfillment-providers-IPV42XHK.mjs → location-fulfillment-providers-KSYCKAE3.mjs} +1 -1
  85. package/dist/{location-list-WX3A2AFK.mjs → location-list-3YQAKOXL.mjs} +8 -7
  86. package/dist/{location-metadata-H6KEPDM6.mjs → location-metadata-AL6Y2C5Z.mjs} +2 -2
  87. package/dist/{location-sales-channels-Z4KJ6TA7.mjs → location-sales-channels-P2EKHRGZ.mjs} +1 -1
  88. package/dist/{location-service-zone-create-LPN2I2A6.mjs → location-service-zone-create-L7MUFXZ7.mjs} +1 -1
  89. package/dist/{location-service-zone-edit-J5ZQRLT6.mjs → location-service-zone-edit-EH6B7A24.mjs} +1 -1
  90. package/dist/{location-service-zone-manage-areas-S3D2NRGT.mjs → location-service-zone-manage-areas-SDLDMJO7.mjs} +1 -1
  91. package/dist/{location-service-zone-shipping-option-create-ZNL5ZAEF.mjs → location-service-zone-shipping-option-create-LOYMYV5B.mjs} +6 -6
  92. package/dist/{location-service-zone-shipping-option-edit-DUIVARUT.mjs → location-service-zone-shipping-option-edit-BARLZ7H6.mjs} +1 -1
  93. package/dist/{location-service-zone-shipping-option-pricing-ESOFTO36.mjs → location-service-zone-shipping-option-pricing-6DR7Z2W5.mjs} +6 -6
  94. package/dist/{order-allocate-items-WM3SQ6YO.mjs → order-allocate-items-CTQLV42Q.mjs} +1 -1
  95. package/dist/{order-create-claim-W2PFYFZZ.mjs → order-create-claim-P5WL2XWX.mjs} +5 -5
  96. package/dist/{order-create-edit-V52ZDF54.mjs → order-create-edit-7NCWX6UB.mjs} +4 -4
  97. package/dist/{order-create-exchange-5U3ULMBH.mjs → order-create-exchange-MU566SDR.mjs} +5 -5
  98. package/dist/{order-create-fulfillment-CT5XV576.mjs → order-create-fulfillment-57GSNWKY.mjs} +1 -1
  99. package/dist/{order-create-refund-VUOUFSMS.mjs → order-create-refund-SZT2AGMZ.mjs} +3 -3
  100. package/dist/{order-create-return-NWPAQFIJ.mjs → order-create-return-NNDQSKD3.mjs} +5 -5
  101. package/dist/{order-create-shipment-FVFRAISJ.mjs → order-create-shipment-RQK7EC47.mjs} +1 -1
  102. package/dist/{order-detail-DMWYRRGT.mjs → order-detail-ERHRK6W3.mjs} +2 -2
  103. package/dist/{order-edit-billing-address-NDCMYXJ6.mjs → order-edit-billing-address-XCGDGT6L.mjs} +1 -1
  104. package/dist/{order-edit-email-COPXQGIB.mjs → order-edit-email-7DJEDL7L.mjs} +1 -1
  105. package/dist/{order-edit-shipping-address-VZKXPB2N.mjs → order-edit-shipping-address-G6UVC32Y.mjs} +1 -1
  106. package/dist/{order-export-KZ7DK7W7.mjs → order-export-X4GFB4OT.mjs} +1 -1
  107. package/dist/{order-list-NQT2DVHU.mjs → order-list-Y4KAYHDB.mjs} +9 -8
  108. package/dist/{order-metadata-STLSWSXP.mjs → order-metadata-LX5ZWHQF.mjs} +2 -2
  109. package/dist/{order-receive-return-JA3JNAHR.mjs → order-receive-return-QXVVZFHF.mjs} +3 -3
  110. package/dist/{order-request-transfer-ZD5KDNCB.mjs → order-request-transfer-ZEQOYAL6.mjs} +1 -1
  111. package/dist/{policy-list-45PG7GBA.mjs → policy-list-ENDXAWFU.mjs} +1 -1
  112. package/dist/{price-list-configuration-TPUOHUER.mjs → price-list-configuration-BQZRBNXQ.mjs} +1 -1
  113. package/dist/{price-list-create-QPBMO7LD.mjs → price-list-create-XN53E6RE.mjs} +6 -6
  114. package/dist/{price-list-detail-SM4DA6L7.mjs → price-list-detail-2R24L2L3.mjs} +8 -7
  115. package/dist/{price-list-edit-5E2FLEHN.mjs → price-list-edit-7EIZ3FVK.mjs} +1 -1
  116. package/dist/{price-list-list-V4XVXOAV.mjs → price-list-list-B3PGM3ND.mjs} +8 -7
  117. package/dist/{price-list-metadata-DCSZAO2C.mjs → price-list-metadata-NTJKQEOE.mjs} +2 -2
  118. package/dist/{price-list-prices-add-QB2QORIN.mjs → price-list-prices-add-E3O2OI7K.mjs} +6 -6
  119. package/dist/{price-list-prices-edit-3EWBS4PO.mjs → price-list-prices-edit-L45MXHZR.mjs} +6 -6
  120. package/dist/{product-attributes-VDTTOEN6.mjs → product-attributes-FXOAXOQ5.mjs} +2 -2
  121. package/dist/{product-create-WUZ22WMJ.mjs → product-create-3XQUET7Y.mjs} +4 -4
  122. package/dist/{product-create-variant-ZMBY5CDO.mjs → product-create-variant-KZAUREQY.mjs} +3 -3
  123. package/dist/{product-detail-Q7R6CEZD.mjs → product-detail-EFCAHRXH.mjs} +2 -2
  124. package/dist/{product-edit-FIAXOVZP.mjs → product-edit-YKIGN4M3.mjs} +2 -2
  125. package/dist/product-export-VTUEQCYE.mjs +260 -0
  126. package/dist/{product-image-variants-edit-6MOKSV2U.mjs → product-image-variants-edit-Y3M56B2U.mjs} +1 -1
  127. package/dist/{product-list-UKJVYCMV.mjs → product-list-XAW4AQNH.mjs} +32 -174
  128. package/dist/{product-media-72TTTVV5.mjs → product-media-HGLANNNT.mjs} +10 -6
  129. package/dist/{product-metadata-4KPGJ36Y.mjs → product-metadata-LTW4M2N3.mjs} +2 -2
  130. package/dist/{product-option-create-4C2BHWTH.mjs → product-option-create-EIKW4V3P.mjs} +1 -1
  131. package/dist/{product-option-detail-WQCRUROA.mjs → product-option-detail-LE44YFQQ.mjs} +9 -8
  132. package/dist/{product-option-edit-O354X7DK.mjs → product-option-edit-5ZP4YBAR.mjs} +1 -1
  133. package/dist/{product-option-list-52TQV6GJ.mjs → product-option-list-JQGZMNPD.mjs} +8 -7
  134. package/dist/{product-option-metadata-K5E6CV4U.mjs → product-option-metadata-2G47V6ZL.mjs} +2 -2
  135. package/dist/{product-option-value-metadata-QJ6D5GPI.mjs → product-option-value-metadata-PDG22GD2.mjs} +2 -2
  136. package/dist/{product-options-manage-H3RCESKS.mjs → product-options-manage-NXZ6CDGE.mjs} +3 -3
  137. package/dist/{product-organization-PAEWTW56.mjs → product-organization-K6EGAZZC.mjs} +2 -2
  138. package/dist/{product-prices-DK6LKOIN.mjs → product-prices-B3DJOMTS.mjs} +3 -3
  139. package/dist/{product-shipping-profile-CGQN7EL4.mjs → product-shipping-profile-NDMCCENZ.mjs} +1 -1
  140. package/dist/{product-stock-G3QGRX2B.mjs → product-stock-FNMVF2RH.mjs} +4 -4
  141. package/dist/{product-tag-create-QRJM6LX5.mjs → product-tag-create-HBIXYJDZ.mjs} +1 -1
  142. package/dist/{product-tag-detail-27XONTR7.mjs → product-tag-detail-ZSPQRFDC.mjs} +9 -8
  143. package/dist/{product-tag-edit-XE5MJ7M2.mjs → product-tag-edit-TO2ACUK3.mjs} +1 -1
  144. package/dist/{product-tag-list-FB25LCY5.mjs → product-tag-list-D5HZNBL3.mjs} +9 -8
  145. package/dist/{product-tag-metadata-K563ZKCO.mjs → product-tag-metadata-7P3JGVYS.mjs} +2 -2
  146. package/dist/{product-type-create-T36A3NSA.mjs → product-type-create-2AZKVK35.mjs} +1 -1
  147. package/dist/{product-type-detail-HCA2AKIV.mjs → product-type-detail-JNFFSUC2.mjs} +8 -7
  148. package/dist/{product-type-edit-TGVPP66B.mjs → product-type-edit-SOLNOW3Y.mjs} +1 -1
  149. package/dist/{product-type-list-G3ROKD3W.mjs → product-type-list-2FWI6OVE.mjs} +8 -7
  150. package/dist/{product-type-metadata-Q4TNWB2C.mjs → product-type-metadata-HTEP2YTQ.mjs} +2 -2
  151. package/dist/{product-variant-detail-IEV2JJM7.mjs → product-variant-detail-FDCRPWMV.mjs} +2 -2
  152. package/dist/{product-variant-edit-CVG5DWFB.mjs → product-variant-edit-Z4ELZB47.mjs} +1 -1
  153. package/dist/{product-variant-manage-inventory-items-GJNQW7JC.mjs → product-variant-manage-inventory-items-W3ZQDUML.mjs} +1 -1
  154. package/dist/{product-variant-media-XT2EQ5M2.mjs → product-variant-media-JARM7GQW.mjs} +1 -1
  155. package/dist/{product-variant-metadata-YXMJ3XTG.mjs → product-variant-metadata-LP3RK7D3.mjs} +2 -2
  156. package/dist/{profile-edit-L3F567PF.mjs → profile-edit-S4F52I66.mjs} +1 -1
  157. package/dist/{promotion-add-campaign-5Q7YXHM3.mjs → promotion-add-campaign-MFC6I5JW.mjs} +4 -4
  158. package/dist/{promotion-create-G5A3CLSU.mjs → promotion-create-USUUTWHS.mjs} +5 -5
  159. package/dist/{promotion-edit-details-7BKQR36L.mjs → promotion-edit-details-3INVCAPZ.mjs} +2 -2
  160. package/dist/{promotion-list-F4UKF55J.mjs → promotion-list-SRJ6MO3U.mjs} +9 -8
  161. package/dist/{promotion-metadata-CFGQFARL.mjs → promotion-metadata-QNNWNI6S.mjs} +2 -2
  162. package/dist/{property-labels-WALH2AGU.mjs → property-labels-4PJQJXTH.mjs} +5 -5
  163. package/dist/{property-labels-edit-WOGYPDDG.mjs → property-labels-edit-5QFRPGAO.mjs} +3 -3
  164. package/dist/{refund-reason-create-PY3Z64HW.mjs → refund-reason-create-QXHOKWDZ.mjs} +1 -1
  165. package/dist/{refund-reason-edit-UYQP4C6W.mjs → refund-reason-edit-RQFGSNGN.mjs} +1 -1
  166. package/dist/{refund-reason-list-SM5XTUD5.mjs → refund-reason-list-RKULHAWA.mjs} +9 -8
  167. package/dist/{region-add-countries-ICNGZMFP.mjs → region-add-countries-L3LBC5SS.mjs} +1 -1
  168. package/dist/{region-create-VWAGH4BK.mjs → region-create-IISVSM64.mjs} +2 -2
  169. package/dist/{region-detail-IXDWO6A6.mjs → region-detail-L3YT7CAJ.mjs} +1 -1
  170. package/dist/{region-edit-LDKU5GRF.mjs → region-edit-6TJFOZ6L.mjs} +2 -2
  171. package/dist/{region-list-P5BUNYLG.mjs → region-list-UOWKWKH3.mjs} +8 -7
  172. package/dist/{region-metadata-QNHAH2KJ.mjs → region-metadata-2GTR2Q4K.mjs} +2 -2
  173. package/dist/{reservation-create-OFCQFQAO.mjs → reservation-create-TJPEHJO4.mjs} +1 -1
  174. package/dist/{reservation-list-7R3KIRZM.mjs → reservation-list-3IBGFDFV.mjs} +8 -7
  175. package/dist/{reservation-metadata-W4CVXJXT.mjs → reservation-metadata-H6XWWZ7O.mjs} +2 -2
  176. package/dist/{return-reason-create-NNPGF6E6.mjs → return-reason-create-GLORKWFC.mjs} +1 -1
  177. package/dist/{return-reason-edit-BMSZB2JK.mjs → return-reason-edit-G2KHDOVU.mjs} +1 -1
  178. package/dist/{return-reason-list-IIKH6WL6.mjs → return-reason-list-2NBTNAH3.mjs} +9 -8
  179. package/dist/{role-add-users-UIEDW5HE.mjs → role-add-users-O7CTRYF2.mjs} +1 -1
  180. package/dist/{role-create-M3Y7KHT5.mjs → role-create-J5TXRN2A.mjs} +1 -1
  181. package/dist/{role-edit-76JHBTDL.mjs → role-edit-6CTPHWGH.mjs} +1 -1
  182. package/dist/{role-permissions-7D7D37MZ.mjs → role-permissions-F6WANR5D.mjs} +1 -1
  183. package/dist/{sales-channel-add-products-OUWMFPUM.mjs → sales-channel-add-products-S7NJUD3G.mjs} +1 -1
  184. package/dist/{sales-channel-create-YMFBTQTV.mjs → sales-channel-create-YDM7SRWK.mjs} +1 -1
  185. package/dist/{sales-channel-edit-CQOUQ4HC.mjs → sales-channel-edit-BPTKLMWV.mjs} +1 -1
  186. package/dist/{sales-channel-list-26DGOXPN.mjs → sales-channel-list-P7JPONDZ.mjs} +9 -8
  187. package/dist/{sales-channel-metadata-DYXIDARU.mjs → sales-channel-metadata-R36JO2U7.mjs} +2 -2
  188. package/dist/{search-index-list-UMBYJEE2.mjs → search-index-list-UUJXL4UL.mjs} +1 -1
  189. package/dist/{settings-NUX5MO5M.mjs → settings-L3FQOPX3.mjs} +1 -1
  190. package/dist/{shipping-option-type-create-E3U6A5AP.mjs → shipping-option-type-create-O62NAECA.mjs} +1 -1
  191. package/dist/{shipping-option-type-edit-AWLY6VGH.mjs → shipping-option-type-edit-NZQQSODS.mjs} +1 -1
  192. package/dist/{shipping-option-type-list-IS33BXIS.mjs → shipping-option-type-list-MZGGUXYT.mjs} +8 -7
  193. package/dist/{shipping-profile-create-Q4MANTUB.mjs → shipping-profile-create-WPLVLDXG.mjs} +1 -1
  194. package/dist/{shipping-profile-metadata-3E3MFK6S.mjs → shipping-profile-metadata-IEQP6IVY.mjs} +2 -2
  195. package/dist/{shipping-profiles-list-R2OKGF64.mjs → shipping-profiles-list-3TNRV7U4.mjs} +8 -7
  196. package/dist/{store-add-currencies-PM37F2M6.mjs → store-add-currencies-HBAN3GWA.mjs} +1 -1
  197. package/dist/{store-add-locales-TF4A4LOI.mjs → store-add-locales-VJWN65EE.mjs} +2 -2
  198. package/dist/{store-edit-BUNHDYE2.mjs → store-edit-SKGGBBFN.mjs} +1 -1
  199. package/dist/{store-metadata-XQI3KTO6.mjs → store-metadata-4P3U6G7J.mjs} +2 -2
  200. package/dist/{tax-region-create-HESVWGCI.mjs → tax-region-create-AI2IQGAX.mjs} +1 -1
  201. package/dist/{tax-region-detail-4N5VVAA3.mjs → tax-region-detail-OOB7SOFT.mjs} +10 -10
  202. package/dist/{tax-region-edit-T534TZN6.mjs → tax-region-edit-AAVTEU6A.mjs} +1 -1
  203. package/dist/{tax-region-province-create-PM3ZTK5Q.mjs → tax-region-province-create-UDBHBE66.mjs} +1 -1
  204. package/dist/{tax-region-province-detail-LP6LQFU3.mjs → tax-region-province-detail-RW6ORJ3I.mjs} +10 -10
  205. package/dist/{tax-region-tax-override-create-EOSGUTGM.mjs → tax-region-tax-override-create-7BXNHR5F.mjs} +8 -8
  206. package/dist/{tax-region-tax-override-edit-RFHZPX7T.mjs → tax-region-tax-override-edit-VTP7B3W3.mjs} +9 -9
  207. package/dist/{tax-region-tax-rate-create-23WNEWRS.mjs → tax-region-tax-rate-create-4MNRDQMB.mjs} +1 -1
  208. package/dist/{tax-region-tax-rate-edit-II6LQJU7.mjs → tax-region-tax-rate-edit-EQEPSONV.mjs} +1 -1
  209. package/dist/{translations-edit-IGHIRXSY.mjs → translations-edit-3264U52X.mjs} +3 -3
  210. package/dist/{user-edit-QAGGKUD5.mjs → user-edit-UYE4NST2.mjs} +1 -1
  211. package/dist/{user-invite-DDESHVJK.mjs → user-invite-RLAG4P4K.mjs} +1 -1
  212. package/dist/{user-list-KIRMDCPZ.mjs → user-list-GN3FM5YA.mjs} +8 -7
  213. package/dist/{user-metadata-FIHOQQBD.mjs → user-metadata-BVIBE7ID.mjs} +2 -2
  214. package/package.json +9 -9
  215. package/src/__tests__/vite-config.spec.ts +46 -0
  216. package/src/components/table/configurable-data-table/configurable-data-table.tsx +1 -27
  217. package/src/components/utilities/keybound-form/__tests__/keybound-form.spec.ts +65 -0
  218. package/src/components/utilities/keybound-form/keybound-form.tsx +3 -1
  219. package/src/hooks/table/query/index.ts +1 -0
  220. package/src/hooks/table/query/parse-prefixed-query-params.ts +64 -0
  221. package/src/hooks/table/use-column-filters.tsx +44 -0
  222. package/src/hooks/table/use-table-configuration.tsx +3 -34
  223. package/src/lib/data/currencies.ts +6 -0
  224. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-inbound-item.tsx +2 -1
  225. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-inbound-item.tsx +2 -1
  226. package/src/routes/orders/order-create-return/components/return-create-form/return-item.tsx +2 -1
  227. package/src/routes/products/product-export/components/configurable-export-filters.spec.tsx +69 -0
  228. package/src/routes/products/product-export/components/configurable-export-filters.tsx +104 -0
  229. package/src/routes/products/product-export/components/export-filters.tsx +14 -2
  230. package/src/routes/products/product-export/product-export.spec.tsx +131 -0
  231. package/src/routes/products/product-export/product-export.tsx +24 -4
  232. package/src/routes/products/product-media/components/edit-product-media-form/edit-product-media-form.spec.tsx +164 -0
  233. package/src/routes/products/product-media/components/edit-product-media-form/edit-product-media-form.tsx +13 -9
  234. package/dist/product-export-FVEBRZUJ.mjs +0 -138
@@ -1329,7 +1329,7 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
1329
1329
  var import_jsx_runtime13 = require("react/jsx-runtime");
1330
1330
 
1331
1331
  // src/components/table/configurable-data-table/configurable-data-table.tsx
1332
- var import_react33 = require("react");
1332
+ var import_react34 = require("react");
1333
1333
  var import_ui25 = require("@medusajs/ui");
1334
1334
  var import_react_i18next20 = require("react-i18next");
1335
1335
 
@@ -2429,7 +2429,7 @@ var SaveViewDropdown = ({
2429
2429
  };
2430
2430
 
2431
2431
  // src/hooks/table/use-table-configuration.tsx
2432
- var import_react29 = require("react");
2432
+ var import_react30 = require("react");
2433
2433
  var import_react_router_dom7 = require("react-router-dom");
2434
2434
 
2435
2435
  // src/hooks/table/columns/use-column-state.ts
@@ -2604,6 +2604,9 @@ function calculateRequiredFields(apiColumns, visibleColumns) {
2604
2604
  return Array.from(requiredFieldsSet).join(",");
2605
2605
  }
2606
2606
 
2607
+ // src/hooks/table/use-column-filters.tsx
2608
+ var import_react29 = require("react");
2609
+
2607
2610
  // src/lib/table/filter-utils.ts
2608
2611
  var import_ui17 = require("@medusajs/ui");
2609
2612
  var filterHelper = (0, import_ui17.createDataTableFilterHelper)();
@@ -2729,6 +2732,24 @@ function useRelationshipFilterOptions(configs) {
2729
2732
  };
2730
2733
  }
2731
2734
 
2735
+ // src/hooks/table/use-column-filters.tsx
2736
+ function useColumnFilters(apiColumns) {
2737
+ const filterableColumns = (0, import_react29.useMemo)(
2738
+ () => apiColumns?.filter((column) => column.filter?.enabled),
2739
+ [apiColumns]
2740
+ );
2741
+ const relationshipFilterConfigs = (0, import_react29.useMemo)(() => {
2742
+ return filterableColumns ? getRelationshipFilterConfigs(filterableColumns) : [];
2743
+ }, [filterableColumns]);
2744
+ const { options: relationshipOptions, isLoading } = useRelationshipFilterOptions(
2745
+ relationshipFilterConfigs
2746
+ );
2747
+ const filters = (0, import_react29.useMemo)(() => {
2748
+ return filterableColumns ? generateFiltersFromColumns(filterableColumns, relationshipOptions) : [];
2749
+ }, [filterableColumns, relationshipOptions]);
2750
+ return { filters, isLoading };
2751
+ }
2752
+
2732
2753
  // src/hooks/table/use-table-configuration.tsx
2733
2754
  function parseSortingState2(value) {
2734
2755
  return value.startsWith("-") ? { id: value.slice(1), desc: true } : { id: value, desc: false };
@@ -2744,7 +2765,7 @@ function useTableConfiguration({
2744
2765
  const isViewConfigEnabled = useFeatureFlag("view_configurations");
2745
2766
  const [_, setSearchParams] = (0, import_react_router_dom7.useSearchParams)();
2746
2767
  const viewConfigKey = viewConfigurationKey ?? entity;
2747
- const applyDefaultFilters = (0, import_react29.useCallback)(
2768
+ const applyDefaultFilters = (0, import_react30.useCallback)(
2748
2769
  (params) => {
2749
2770
  if (!defaultFilters) {
2750
2771
  return;
@@ -2764,39 +2785,19 @@ function useTableConfiguration({
2764
2785
  const { columns: rawApiColumns, isLoading: isLoadingColumns } = useEntityColumns(entity, {
2765
2786
  enabled: isViewConfigEnabled
2766
2787
  });
2767
- const apiColumns = (0, import_react29.useMemo)(() => {
2788
+ const apiColumns = (0, import_react30.useMemo)(() => {
2768
2789
  if (!rawApiColumns) {
2769
2790
  return void 0;
2770
2791
  }
2771
2792
  const transformed = transformColumns ? transformColumns(rawApiColumns) : rawApiColumns;
2772
2793
  return extraColumns?.length ? [...transformed, ...extraColumns] : transformed;
2773
2794
  }, [rawApiColumns, transformColumns, extraColumns]);
2774
- const relationshipFilterConfigs = (0, import_react29.useMemo)(() => {
2775
- if (!apiColumns) {
2776
- return [];
2777
- }
2778
- const filterableColumns = apiColumns.filter(
2779
- (column) => column.filter?.enabled
2780
- );
2781
- return getRelationshipFilterConfigs(filterableColumns);
2782
- }, [apiColumns]);
2783
- const { options: relationshipOptions, isLoading: isLoadingFilterOptions } = useRelationshipFilterOptions(
2784
- relationshipFilterConfigs
2785
- );
2786
- const resolvedFilters = (0, import_react29.useMemo)(() => {
2787
- if (!apiColumns) {
2788
- return [];
2789
- }
2790
- const filterableColumns = apiColumns.filter(
2791
- (column) => column.filter?.enabled
2792
- );
2793
- return generateFiltersFromColumns(filterableColumns, relationshipOptions);
2794
- }, [apiColumns, relationshipOptions]);
2795
+ const { filters: resolvedFilters, isLoading: isLoadingFilterOptions } = useColumnFilters(apiColumns);
2795
2796
  const queryParams = useQueryParams(
2796
2797
  ["q", "order", "offset", "limit", ...resolvedFilters.map((f) => f.id)],
2797
2798
  queryPrefix
2798
2799
  );
2799
- const columnsToRender = (0, import_react29.useMemo)(() => {
2800
+ const columnsToRender = (0, import_react30.useMemo)(() => {
2800
2801
  return apiColumns?.filter((column) => column.context !== "filter");
2801
2802
  }, [apiColumns]);
2802
2803
  const {
@@ -2811,7 +2812,7 @@ function useTableConfiguration({
2811
2812
  currentActiveView.configuration
2812
2813
  )}` : "";
2813
2814
  const columnsSignature = columnsToRender ? columnsToRender.map((column) => column.field).sort().join(",") : "";
2814
- (0, import_react29.useEffect)(() => {
2815
+ (0, import_react30.useEffect)(() => {
2815
2816
  if (!columnsToRender) {
2816
2817
  return;
2817
2818
  }
@@ -2841,7 +2842,7 @@ function useTableConfiguration({
2841
2842
  return prev;
2842
2843
  });
2843
2844
  }, [activeViewSignature, columnsSignature]);
2844
- const currentConfiguration = (0, import_react29.useMemo)(() => {
2845
+ const currentConfiguration = (0, import_react30.useMemo)(() => {
2845
2846
  const currentFilters = {};
2846
2847
  resolvedFilters.forEach((filter) => {
2847
2848
  if (queryParams[filter.id] !== void 0) {
@@ -2854,8 +2855,8 @@ function useTableConfiguration({
2854
2855
  search: queryParams.q || ""
2855
2856
  };
2856
2857
  }, [resolvedFilters, queryParams]);
2857
- const [debouncedHasConfigChanged, setDebouncedHasConfigChanged] = (0, import_react29.useState)(false);
2858
- const hasConfigurationChanged = (0, import_react29.useMemo)(() => {
2858
+ const [debouncedHasConfigChanged, setDebouncedHasConfigChanged] = (0, import_react30.useState)(false);
2859
+ const hasConfigurationChanged = (0, import_react30.useMemo)(() => {
2859
2860
  const currentFilters = currentConfiguration.filters;
2860
2861
  const currentSorting = currentConfiguration.sorting;
2861
2862
  const currentSearch = currentConfiguration.search;
@@ -2931,13 +2932,13 @@ function useTableConfiguration({
2931
2932
  columnsToRender,
2932
2933
  defaultFilters
2933
2934
  ]);
2934
- (0, import_react29.useEffect)(() => {
2935
+ (0, import_react30.useEffect)(() => {
2935
2936
  const timer = setTimeout(() => {
2936
2937
  setDebouncedHasConfigChanged(hasConfigurationChanged);
2937
2938
  }, 50);
2938
2939
  return () => clearTimeout(timer);
2939
2940
  }, [hasConfigurationChanged]);
2940
- const handleClearConfiguration = (0, import_react29.useCallback)(() => {
2941
+ const handleClearConfiguration = (0, import_react30.useCallback)(() => {
2941
2942
  if (columnsToRender) {
2942
2943
  originalHandleViewChange(currentActiveView, columnsToRender);
2943
2944
  }
@@ -2966,7 +2967,7 @@ function useTableConfiguration({
2966
2967
  return prev;
2967
2968
  });
2968
2969
  }, [currentActiveView, columnsToRender, queryPrefix]);
2969
- const requiredFields = (0, import_react29.useMemo)(() => {
2970
+ const requiredFields = (0, import_react30.useMemo)(() => {
2970
2971
  return calculateRequiredFields(columnsToRender || [], visibleColumns);
2971
2972
  }, [columnsToRender, visibleColumns]);
2972
2973
  return {
@@ -2992,12 +2993,12 @@ function useTableConfiguration({
2992
2993
  }
2993
2994
 
2994
2995
  // src/hooks/table/columns/use-configurable-table-columns.tsx
2995
- var import_react32 = require("react");
2996
+ var import_react33 = require("react");
2996
2997
  var import_ui24 = require("@medusajs/ui");
2997
2998
  var import_react_i18next19 = require("react-i18next");
2998
2999
 
2999
3000
  // src/lib/table/cell-renderers.tsx
3000
- var import_react31 = __toESM(require("react"));
3001
+ var import_react32 = __toESM(require("react"));
3001
3002
  var import_ui23 = require("@medusajs/ui");
3002
3003
  var import_react_country_flag = __toESM(require("react-country-flag"));
3003
3004
  var import_icons10 = require("@medusajs/icons");
@@ -4819,11 +4820,11 @@ var Thumbnail = ({ src, alt, size = "base" }) => {
4819
4820
 
4820
4821
  // src/components/common/truncated-text/truncated-text.tsx
4821
4822
  var import_ui19 = require("@medusajs/ui");
4822
- var import_react30 = require("react");
4823
+ var import_react31 = require("react");
4823
4824
  var import_jsx_runtime22 = require("react/jsx-runtime");
4824
4825
  var TruncatedText = ({ text, className }) => {
4825
- const ref = (0, import_react30.useRef)(null);
4826
- const [overflow, setOverflow] = (0, import_react30.useState)(false);
4826
+ const ref = (0, import_react31.useRef)(null);
4827
+ const [overflow, setOverflow] = (0, import_react31.useState)(false);
4827
4828
  const check = () => {
4828
4829
  const el2 = ref.current;
4829
4830
  if (el2) {
@@ -5545,6 +5546,12 @@ var currencies = {
5545
5546
  symbol_native: "kn",
5546
5547
  decimal_digits: 2
5547
5548
  },
5549
+ HTG: {
5550
+ code: "HTG",
5551
+ name: "Haitian Gourde",
5552
+ symbol_native: "G",
5553
+ decimal_digits: 2
5554
+ },
5548
5555
  HUF: {
5549
5556
  code: "HUF",
5550
5557
  name: "Hungarian Forint",
@@ -6209,7 +6216,7 @@ var StatusRenderer = (value, row, column, t) => {
6209
6216
  if (isEmpty(resolved)) {
6210
6217
  return "-";
6211
6218
  }
6212
- if (import_react31.default.isValidElement(resolved)) {
6219
+ if (import_react32.default.isValidElement(resolved)) {
6213
6220
  return resolved;
6214
6221
  }
6215
6222
  return renderStatusPill(
@@ -6541,9 +6548,9 @@ function getColumnValue(row, column) {
6541
6548
  // src/hooks/table/columns/use-configurable-table-columns.tsx
6542
6549
  var import_jsx_runtime34 = require("react/jsx-runtime");
6543
6550
  function useConfigurableTableColumns(apiColumns, adapter) {
6544
- const columnHelper = (0, import_react32.useMemo)(() => (0, import_ui24.createDataTableColumnHelper)(), []);
6551
+ const columnHelper = (0, import_react33.useMemo)(() => (0, import_ui24.createDataTableColumnHelper)(), []);
6545
6552
  const { t } = (0, import_react_i18next19.useTranslation)();
6546
- return (0, import_react32.useMemo)(() => {
6553
+ return (0, import_react33.useMemo)(() => {
6547
6554
  if (!apiColumns?.length) {
6548
6555
  return [];
6549
6556
  }
@@ -6630,6 +6637,27 @@ function parseFilterParam(raw) {
6630
6637
  return value;
6631
6638
  }
6632
6639
 
6640
+ // src/hooks/table/query/parse-prefixed-query-params.ts
6641
+ function expandDottedKeys(params) {
6642
+ const result = {};
6643
+ for (const [key, value] of Object.entries(params)) {
6644
+ if (!key.includes(".")) {
6645
+ result[key] = value;
6646
+ continue;
6647
+ }
6648
+ const parts = key.split(".");
6649
+ let node = result;
6650
+ for (let i = 0; i < parts.length - 1; i++) {
6651
+ if (typeof node[parts[i]] !== "object" || node[parts[i]] === null) {
6652
+ node[parts[i]] = {};
6653
+ }
6654
+ node = node[parts[i]];
6655
+ }
6656
+ node[parts[parts.length - 1]] = value;
6657
+ }
6658
+ return result;
6659
+ }
6660
+
6633
6661
  // src/lib/table/table-adapters.ts
6634
6662
  var SELECT_COLUMN_FIELD = "select";
6635
6663
  function createSelectColumn() {
@@ -6672,25 +6700,6 @@ function createActionsColumn(name) {
6672
6700
 
6673
6701
  // src/components/table/configurable-data-table/configurable-data-table.tsx
6674
6702
  var import_jsx_runtime35 = require("react/jsx-runtime");
6675
- function expandDottedKeys(params) {
6676
- const result = {};
6677
- for (const [key, value] of Object.entries(params)) {
6678
- if (!key.includes(".")) {
6679
- result[key] = value;
6680
- continue;
6681
- }
6682
- const parts = key.split(".");
6683
- let node = result;
6684
- for (let i = 0; i < parts.length - 1; i++) {
6685
- if (typeof node[parts[i]] !== "object" || node[parts[i]] === null) {
6686
- node[parts[i]] = {};
6687
- }
6688
- node = node[parts[i]];
6689
- }
6690
- node[parts[parts.length - 1]] = value;
6691
- }
6692
- return result;
6693
- }
6694
6703
  function ConfigurableDataTable({
6695
6704
  adapter,
6696
6705
  heading,
@@ -6701,9 +6710,9 @@ function ConfigurableDataTable({
6701
6710
  actions
6702
6711
  }) {
6703
6712
  const { t } = (0, import_react_i18next20.useTranslation)();
6704
- const [saveDialogOpen, setSaveDialogOpen] = (0, import_react33.useState)(false);
6705
- const [editingView, setEditingView] = (0, import_react33.useState)(null);
6706
- const [rowSelection, setRowSelection] = (0, import_react33.useState)(
6713
+ const [saveDialogOpen, setSaveDialogOpen] = (0, import_react34.useState)(false);
6714
+ const [editingView, setEditingView] = (0, import_react34.useState)(null);
6715
+ const [rowSelection, setRowSelection] = (0, import_react34.useState)(
6707
6716
  {}
6708
6717
  );
6709
6718
  const entity = adapter.entity;
@@ -6711,7 +6720,7 @@ function ConfigurableDataTable({
6711
6720
  const entityName = adapter.entityName;
6712
6721
  const pageSize = pageSizeProp || adapter.pageSize || 20;
6713
6722
  const queryPrefix = queryPrefixProp || adapter.queryPrefix || "";
6714
- const extraColumns = (0, import_react33.useMemo)(() => {
6723
+ const extraColumns = (0, import_react34.useMemo)(() => {
6715
6724
  const cols = [
6716
6725
  adapter.enableRowSelection ? createSelectColumn() : null,
6717
6726
  adapter.renderRowActions ? createActionsColumn(t("fields.actions")) : null
@@ -6919,13 +6928,13 @@ function ConfigurableDataTable({
6919
6928
 
6920
6929
  // src/components/common/display-id/display-id.tsx
6921
6930
  var import_react_i18next21 = require("react-i18next");
6922
- var import_react34 = require("react");
6931
+ var import_react35 = require("react");
6923
6932
  var import_copy_to_clipboard = __toESM(require("copy-to-clipboard"));
6924
6933
  var import_ui26 = require("@medusajs/ui");
6925
6934
  var import_jsx_runtime36 = require("react/jsx-runtime");
6926
6935
  function DisplayId({ id: id2, className }) {
6927
6936
  const { t } = (0, import_react_i18next21.useTranslation)();
6928
- const [open, setOpen] = (0, import_react34.useState)(false);
6937
+ const [open, setOpen] = (0, import_react35.useState)(false);
6929
6938
  const onClick = () => {
6930
6939
  (0, import_copy_to_clipboard.default)(id2);
6931
6940
  import_ui26.toast.success(t("actions.idCopiedToClipboard"));
@@ -6941,12 +6950,12 @@ var display_id_default = DisplayId;
6941
6950
  var import_icons11 = require("@medusajs/icons");
6942
6951
  var import_ui27 = require("@medusajs/ui");
6943
6952
  var import_radix_ui = require("radix-ui");
6944
- var import_react35 = require("react");
6953
+ var import_react36 = require("react");
6945
6954
  var import_react_hook_form2 = require("react-hook-form");
6946
6955
  var import_react_i18next22 = require("react-i18next");
6947
6956
  var import_jsx_runtime37 = require("react/jsx-runtime");
6948
6957
  var Provider = import_react_hook_form2.FormProvider;
6949
- var FormFieldContext = (0, import_react35.createContext)(
6958
+ var FormFieldContext = (0, import_react36.createContext)(
6950
6959
  {}
6951
6960
  );
6952
6961
  var Field = ({
@@ -6954,12 +6963,12 @@ var Field = ({
6954
6963
  }) => {
6955
6964
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_hook_form2.Controller, { ...props }) });
6956
6965
  };
6957
- var FormItemContext = (0, import_react35.createContext)(
6966
+ var FormItemContext = (0, import_react36.createContext)(
6958
6967
  {}
6959
6968
  );
6960
6969
  var useFormField = () => {
6961
- const fieldContext = (0, import_react35.useContext)(FormFieldContext);
6962
- const itemContext = (0, import_react35.useContext)(FormItemContext);
6970
+ const fieldContext = (0, import_react36.useContext)(FormFieldContext);
6971
+ const itemContext = (0, import_react36.useContext)(FormItemContext);
6963
6972
  const { getFieldState } = (0, import_react_hook_form2.useFormContext)();
6964
6973
  const formState = (0, import_react_hook_form2.useFormState)({ name: fieldContext.name });
6965
6974
  const fieldState = getFieldState(fieldContext.name, formState);
@@ -6977,9 +6986,9 @@ var useFormField = () => {
6977
6986
  ...fieldState
6978
6987
  };
6979
6988
  };
6980
- var Item = (0, import_react35.forwardRef)(
6989
+ var Item = (0, import_react36.forwardRef)(
6981
6990
  ({ className, ...props }, ref) => {
6982
- const id2 = (0, import_react35.useId)();
6991
+ const id2 = (0, import_react36.useId)();
6983
6992
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FormItemContext.Provider, { value: { id: id2 }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6984
6993
  "div",
6985
6994
  {
@@ -6991,7 +7000,7 @@ var Item = (0, import_react35.forwardRef)(
6991
7000
  }
6992
7001
  );
6993
7002
  Item.displayName = "Form.Item";
6994
- var Label2 = (0, import_react35.forwardRef)(({ className, optional = false, tooltip, icon, ...props }, ref) => {
7003
+ var Label2 = (0, import_react36.forwardRef)(({ className, optional = false, tooltip, icon, ...props }, ref) => {
6995
7004
  const { formLabelId, formItemId } = useFormField();
6996
7005
  const { t } = (0, import_react_i18next22.useTranslation)();
6997
7006
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-x-1", children: [
@@ -7017,7 +7026,7 @@ var Label2 = (0, import_react35.forwardRef)(({ className, optional = false, tool
7017
7026
  ] });
7018
7027
  });
7019
7028
  Label2.displayName = "Form.Label";
7020
- var Control = (0, import_react35.forwardRef)(({ ...props }, ref) => {
7029
+ var Control = (0, import_react36.forwardRef)(({ ...props }, ref) => {
7021
7030
  const {
7022
7031
  error,
7023
7032
  formItemId,
@@ -7038,7 +7047,7 @@ var Control = (0, import_react35.forwardRef)(({ ...props }, ref) => {
7038
7047
  );
7039
7048
  });
7040
7049
  Control.displayName = "Form.Control";
7041
- var Hint = (0, import_react35.forwardRef)(({ className, ...props }, ref) => {
7050
+ var Hint = (0, import_react36.forwardRef)(({ className, ...props }, ref) => {
7042
7051
  const { formDescriptionId } = useFormField();
7043
7052
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7044
7053
  import_ui27.Hint,
@@ -7051,7 +7060,7 @@ var Hint = (0, import_react35.forwardRef)(({ className, ...props }, ref) => {
7051
7060
  );
7052
7061
  });
7053
7062
  Hint.displayName = "Form.Hint";
7054
- var ErrorMessage = (0, import_react35.forwardRef)(({ className, children, ...props }, ref) => {
7063
+ var ErrorMessage = (0, import_react36.forwardRef)(({ className, children, ...props }, ref) => {
7055
7064
  const { error, formErrorMessageId } = useFormField();
7056
7065
  const msg = error ? String(error?.message) : children;
7057
7066
  if (!msg || msg === "undefined") {
@@ -7246,16 +7255,16 @@ var SidebarLink = ({
7246
7255
  };
7247
7256
 
7248
7257
  // src/components/utilities/keybound-form/keybound-form.tsx
7249
- var import_react36 = __toESM(require("react"));
7258
+ var import_react37 = __toESM(require("react"));
7250
7259
  var import_jsx_runtime43 = require("react/jsx-runtime");
7251
- var KeyboundForm = import_react36.default.forwardRef(({ onSubmit, onKeyDown, ...rest }, ref) => {
7260
+ var KeyboundForm = import_react37.default.forwardRef(({ onSubmit, onKeyDown, ...rest }, ref) => {
7252
7261
  const handleSubmit = (event) => {
7253
7262
  event.preventDefault();
7254
7263
  onSubmit?.(event);
7255
7264
  };
7256
7265
  const handleKeyDown = (event) => {
7257
7266
  if (event.key === "Enter") {
7258
- if (event.target instanceof HTMLTextAreaElement && !(event.metaKey || event.ctrlKey)) {
7267
+ if ((event.target instanceof HTMLTextAreaElement || event.target instanceof HTMLButtonElement || event.target instanceof HTMLAnchorElement) && !(event.metaKey || event.ctrlKey)) {
7259
7268
  return;
7260
7269
  }
7261
7270
  event.preventDefault();
@@ -7277,17 +7286,17 @@ var KeyboundForm = import_react36.default.forwardRef(({ onSubmit, onKeyDown, ...
7277
7286
  KeyboundForm.displayName = "KeyboundForm";
7278
7287
 
7279
7288
  // src/components/inputs/combobox/combobox.tsx
7280
- var import_react38 = require("@ariakit/react");
7289
+ var import_react39 = require("@ariakit/react");
7281
7290
  var import_icons14 = require("@medusajs/icons");
7282
7291
  var import_ui33 = require("@medusajs/ui");
7283
7292
  var import_match_sorter = require("match-sorter");
7284
- var import_react39 = require("react");
7293
+ var import_react40 = require("react");
7285
7294
  var import_react_i18next24 = require("react-i18next");
7286
7295
 
7287
7296
  // src/components/utilities/generic-forward-ref/generic-forward-ref.tsx
7288
- var import_react37 = require("react");
7297
+ var import_react38 = require("react");
7289
7298
  function genericForwardRef(render) {
7290
- return (0, import_react37.forwardRef)(render);
7299
+ return (0, import_react38.forwardRef)(render);
7291
7300
  }
7292
7301
 
7293
7302
  // src/components/inputs/combobox/combobox.tsx
@@ -7312,20 +7321,20 @@ var ComboboxImpl = ({
7312
7321
  displayMode = "count",
7313
7322
  ...inputProps
7314
7323
  }, ref) => {
7315
- const [open, setOpen] = (0, import_react39.useState)(false);
7324
+ const [open, setOpen] = (0, import_react40.useState)(false);
7316
7325
  const { t } = (0, import_react_i18next24.useTranslation)();
7317
- const comboboxRef = (0, import_react39.useRef)(null);
7318
- const listboxRef = (0, import_react39.useRef)(null);
7319
- (0, import_react39.useImperativeHandle)(ref, () => comboboxRef.current);
7326
+ const comboboxRef = (0, import_react40.useRef)(null);
7327
+ const listboxRef = (0, import_react40.useRef)(null);
7328
+ (0, import_react40.useImperativeHandle)(ref, () => comboboxRef.current);
7320
7329
  const isValueControlled = controlledValue !== void 0;
7321
7330
  const isSearchControlled = controlledSearchValue !== void 0;
7322
7331
  const isArrayValue = Array.isArray(controlledValue);
7323
7332
  const emptyState = isArrayValue ? [] : "";
7324
- const [uncontrolledSearchValue, setUncontrolledSearchValue] = (0, import_react39.useState)(
7333
+ const [uncontrolledSearchValue, setUncontrolledSearchValue] = (0, import_react40.useState)(
7325
7334
  controlledSearchValue || ""
7326
7335
  );
7327
- const defferedSearchValue = (0, import_react39.useDeferredValue)(uncontrolledSearchValue);
7328
- const [uncontrolledValue, setUncontrolledValue] = (0, import_react39.useState)(emptyState);
7336
+ const defferedSearchValue = (0, import_react40.useDeferredValue)(uncontrolledSearchValue);
7337
+ const [uncontrolledValue, setUncontrolledValue] = (0, import_react40.useState)(emptyState);
7329
7338
  const searchValue = isSearchControlled ? controlledSearchValue : uncontrolledSearchValue;
7330
7339
  const selectedValues = isValueControlled ? controlledValue : uncontrolledValue;
7331
7340
  const handleValueChange = (newValues) => {
@@ -7362,7 +7371,7 @@ var ComboboxImpl = ({
7362
7371
  const newValues = selectedValues.filter((v) => v !== valueToRemove);
7363
7372
  handleValueChange(newValues);
7364
7373
  };
7365
- const matches = (0, import_react39.useMemo)(() => {
7374
+ const matches = (0, import_react40.useMemo)(() => {
7366
7375
  if (isSearchControlled) {
7367
7376
  return [];
7368
7377
  }
@@ -7373,7 +7382,7 @@ var ComboboxImpl = ({
7373
7382
  keys: ["label"]
7374
7383
  });
7375
7384
  }, [options, defferedSearchValue, isSearchControlled, forceHideInput]);
7376
- const observer = (0, import_react39.useRef)(
7385
+ const observer = (0, import_react40.useRef)(
7377
7386
  new IntersectionObserver(
7378
7387
  (entries) => {
7379
7388
  const first = entries[0];
@@ -7384,7 +7393,7 @@ var ComboboxImpl = ({
7384
7393
  { threshold: 1 }
7385
7394
  )
7386
7395
  );
7387
- const lastOptionRef = (0, import_react39.useCallback)(
7396
+ const lastOptionRef = (0, import_react40.useCallback)(
7388
7397
  (node) => {
7389
7398
  if (isFetchingNextPage) {
7390
7399
  return;
@@ -7413,7 +7422,7 @@ var ComboboxImpl = ({
7413
7422
  const hideInput = forceHideInput || !isArrayValue && hasValue && !open;
7414
7423
  const selectedLabel = options.find((o) => o.value === selectedValues)?.label;
7415
7424
  const hidePlaceholder = showSelected || open;
7416
- const tagWidth = (0, import_react39.useMemo)(() => {
7425
+ const tagWidth = (0, import_react40.useMemo)(() => {
7417
7426
  if (!Array.isArray(selectedValues)) {
7418
7427
  return TAG_BASE_WIDTH + TABLUAR_NUM_WIDTH;
7419
7428
  }
@@ -7421,7 +7430,7 @@ var ComboboxImpl = ({
7421
7430
  const digits = count.toString().length;
7422
7431
  return TAG_BASE_WIDTH + digits * TABLUAR_NUM_WIDTH;
7423
7432
  }, [selectedValues]);
7424
- const results = (0, import_react39.useMemo)(() => {
7433
+ const results = (0, import_react40.useMemo)(() => {
7425
7434
  return isSearchControlled ? options : matches;
7426
7435
  }, [matches, options, isSearchControlled]);
7427
7436
  const normalizedSearchValue = searchValue?.trim() ?? "";
@@ -7429,7 +7438,7 @@ var ComboboxImpl = ({
7429
7438
  (option) => option.label.trim().toLowerCase() === normalizedSearchValue.toLowerCase()
7430
7439
  );
7431
7440
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7432
- import_react38.ComboboxProvider,
7441
+ import_react39.ComboboxProvider,
7433
7442
  {
7434
7443
  open,
7435
7444
  setOpen: handleOpenChange,
@@ -7488,7 +7497,7 @@ var ComboboxImpl = ({
7488
7497
  );
7489
7498
  }),
7490
7499
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "relative flex min-w-[120px] flex-1 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7491
- import_react38.Combobox,
7500
+ import_react39.Combobox,
7492
7501
  {
7493
7502
  autoSelect: true,
7494
7503
  ref: comboboxRef,
@@ -7501,7 +7510,7 @@ var ComboboxImpl = ({
7501
7510
  }
7502
7511
  ) }),
7503
7512
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7504
- import_react38.ComboboxDisclosure,
7513
+ import_react39.ComboboxDisclosure,
7505
7514
  {
7506
7515
  render: (props) => {
7507
7516
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
@@ -7579,7 +7588,7 @@ var ComboboxImpl = ({
7579
7588
  }
7580
7589
  ),
7581
7590
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7582
- import_react38.Combobox,
7591
+ import_react39.Combobox,
7583
7592
  {
7584
7593
  autoSelect: true,
7585
7594
  ref: comboboxRef,
@@ -7610,7 +7619,7 @@ var ComboboxImpl = ({
7610
7619
  }
7611
7620
  ),
7612
7621
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7613
- import_react38.ComboboxDisclosure,
7622
+ import_react39.ComboboxDisclosure,
7614
7623
  {
7615
7624
  render: (props) => {
7616
7625
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
@@ -7629,7 +7638,7 @@ var ComboboxImpl = ({
7629
7638
  }
7630
7639
  ),
7631
7640
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7632
- import_react38.ComboboxPopover,
7641
+ import_react39.ComboboxPopover,
7633
7642
  {
7634
7643
  gutter: 4,
7635
7644
  sameWidth: true,
@@ -7647,7 +7656,7 @@ var ComboboxImpl = ({
7647
7656
  },
7648
7657
  children: [
7649
7658
  results.map(({ value, label, disabled }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7650
- import_react38.ComboboxItem,
7659
+ import_react39.ComboboxItem,
7651
7660
  {
7652
7661
  value,
7653
7662
  focusOnHover: true,
@@ -7661,8 +7670,8 @@ var ComboboxImpl = ({
7661
7670
  }
7662
7671
  ),
7663
7672
  children: [
7664
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react38.ComboboxItemCheck, { className: "flex !size-5 items-center justify-center", children: isArrayValue ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons14.CheckMini, {}) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons14.EllipseMiniSolid, {}) }),
7665
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react38.ComboboxItemValue, { className: "txt-compact-small", children: label })
7673
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react39.ComboboxItemCheck, { className: "flex !size-5 items-center justify-center", children: isArrayValue ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons14.CheckMini, {}) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_icons14.EllipseMiniSolid, {}) }),
7674
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react39.ComboboxItemValue, { className: "txt-compact-small", children: label })
7666
7675
  ]
7667
7676
  },
7668
7677
  value
@@ -7678,10 +7687,10 @@ var ComboboxImpl = ({
7678
7687
  children: t("general.noResultsTitle")
7679
7688
  }
7680
7689
  ) })),
7681
- (!results.length || shouldAlwaysShowCreateOption && normalizedSearchValue.length > 0) && onCreateOption && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react39.Fragment, { children: [
7682
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react38.Separator, { className: "bg-ui-border-base -mx-1" }),
7690
+ (!results.length || shouldAlwaysShowCreateOption && normalizedSearchValue.length > 0) && onCreateOption && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react40.Fragment, { children: [
7691
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react39.Separator, { className: "bg-ui-border-base -mx-1" }),
7683
7692
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7684
- import_react38.ComboboxItem,
7693
+ import_react39.ComboboxItem,
7685
7694
  {
7686
7695
  value: searchValue,
7687
7696
  focusOnHover: true,
@@ -7715,14 +7724,14 @@ var ComboboxImpl = ({
7715
7724
  var Combobox = genericForwardRef(ComboboxImpl);
7716
7725
 
7717
7726
  // src/components/inputs/country-select/country-select.tsx
7718
- var import_react40 = require("react");
7727
+ var import_react41 = require("react");
7719
7728
  var import_react_i18next25 = require("react-i18next");
7720
7729
  var import_jsx_runtime45 = require("react/jsx-runtime");
7721
- var CountrySelect = (0, import_react40.forwardRef)(
7730
+ var CountrySelect = (0, import_react41.forwardRef)(
7722
7731
  ({ placeholder, defaultValue, allowClear, onChange, value, ...props }, ref) => {
7723
7732
  const { t } = (0, import_react_i18next25.useTranslation)();
7724
- const innerRef = (0, import_react40.useRef)(null);
7725
- (0, import_react40.useImperativeHandle)(ref, () => innerRef.current);
7733
+ const innerRef = (0, import_react41.useRef)(null);
7734
+ (0, import_react41.useImperativeHandle)(ref, () => innerRef.current);
7726
7735
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7727
7736
  Combobox,
7728
7737
  {
@@ -7744,9 +7753,9 @@ CountrySelect.displayName = "CountrySelect";
7744
7753
 
7745
7754
  // src/components/inputs/handle-input/handle-input.tsx
7746
7755
  var import_ui34 = require("@medusajs/ui");
7747
- var import_react41 = require("react");
7756
+ var import_react42 = require("react");
7748
7757
  var import_jsx_runtime46 = require("react/jsx-runtime");
7749
- var HandleInput = (0, import_react41.forwardRef)((props, ref) => {
7758
+ var HandleInput = (0, import_react42.forwardRef)((props, ref) => {
7750
7759
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "relative", children: [
7751
7760
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "absolute inset-y-0 left-0 z-10 flex w-8 items-center justify-center border-r", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7752
7761
  import_ui34.Text,
@@ -7783,18 +7792,18 @@ var useCombinedRefs = (...refs) => {
7783
7792
  };
7784
7793
 
7785
7794
  // src/components/data-grid/hooks/use-data-grid-cell.tsx
7786
- var import_react44 = require("react");
7795
+ var import_react45 = require("react");
7787
7796
 
7788
7797
  // src/components/data-grid/context/data-grid-context.tsx
7789
- var import_react42 = require("react");
7790
- var DataGridContext = (0, import_react42.createContext)(
7798
+ var import_react43 = require("react");
7799
+ var DataGridContext = (0, import_react43.createContext)(
7791
7800
  null
7792
7801
  );
7793
7802
 
7794
7803
  // src/components/data-grid/context/use-data-grid-context.tsx
7795
- var import_react43 = require("react");
7804
+ var import_react44 = require("react");
7796
7805
  var useDataGridContext = () => {
7797
- const context = (0, import_react43.useContext)(DataGridContext);
7806
+ const context = (0, import_react44.useContext)(DataGridContext);
7798
7807
  if (!context) {
7799
7808
  throw new Error(
7800
7809
  "useDataGridContext must be used within a DataGridContextProvider"
@@ -7840,17 +7849,17 @@ var useDataGridCell = ({
7840
7849
  getCellMetadata
7841
7850
  } = useDataGridContext();
7842
7851
  const { rowIndex, columnIndex } = context;
7843
- const coords = (0, import_react44.useMemo)(
7852
+ const coords = (0, import_react45.useMemo)(
7844
7853
  () => ({ row: rowIndex, col: columnIndex }),
7845
7854
  [rowIndex, columnIndex]
7846
7855
  );
7847
- const { id: id2, field, type, innerAttributes, inputAttributes } = (0, import_react44.useMemo)(() => {
7856
+ const { id: id2, field, type, innerAttributes, inputAttributes } = (0, import_react45.useMemo)(() => {
7848
7857
  return getCellMetadata(coords);
7849
7858
  }, [coords, getCellMetadata]);
7850
- const [showOverlay, setShowOverlay] = (0, import_react44.useState)(true);
7851
- const containerRef = (0, import_react44.useRef)(null);
7852
- const inputRef = (0, import_react44.useRef)(null);
7853
- const handleOverlayMouseDown = (0, import_react44.useCallback)(
7859
+ const [showOverlay, setShowOverlay] = (0, import_react45.useState)(true);
7860
+ const containerRef = (0, import_react45.useRef)(null);
7861
+ const inputRef = (0, import_react45.useRef)(null);
7862
+ const handleOverlayMouseDown = (0, import_react45.useCallback)(
7854
7863
  (e) => {
7855
7864
  e.preventDefault();
7856
7865
  e.stopPropagation();
@@ -7875,7 +7884,7 @@ var useDataGridCell = ({
7875
7884
  },
7876
7885
  [coords, anchor, setRangeEnd, setSingleRange, setIsSelecting]
7877
7886
  );
7878
- const handleBooleanInnerMouseDown = (0, import_react44.useCallback)(
7887
+ const handleBooleanInnerMouseDown = (0, import_react45.useCallback)(
7879
7888
  (e) => {
7880
7889
  e.preventDefault();
7881
7890
  e.stopPropagation();
@@ -7895,15 +7904,15 @@ var useDataGridCell = ({
7895
7904
  },
7896
7905
  [setIsSelecting, setSingleRange, setRangeEnd, coords]
7897
7906
  );
7898
- const handleInputBlur = (0, import_react44.useCallback)(() => {
7907
+ const handleInputBlur = (0, import_react45.useCallback)(() => {
7899
7908
  setShowOverlay(true);
7900
7909
  setIsEditing(false);
7901
7910
  }, [setIsEditing]);
7902
- const handleInputFocus = (0, import_react44.useCallback)(() => {
7911
+ const handleInputFocus = (0, import_react45.useCallback)(() => {
7903
7912
  setShowOverlay(false);
7904
7913
  setIsEditing(true);
7905
7914
  }, [setIsEditing]);
7906
- const validateKeyStroke = (0, import_react44.useCallback)(
7915
+ const validateKeyStroke = (0, import_react45.useCallback)(
7907
7916
  (key) => {
7908
7917
  switch (type) {
7909
7918
  case "togglable-number":
@@ -7918,7 +7927,7 @@ var useDataGridCell = ({
7918
7927
  },
7919
7928
  [type]
7920
7929
  );
7921
- const handleContainerKeyDown = (0, import_react44.useCallback)(
7930
+ const handleContainerKeyDown = (0, import_react45.useCallback)(
7922
7931
  (e) => {
7923
7932
  if (!inputRef.current || !validateKeyStroke(e.key) || !showOverlay) {
7924
7933
  return;
@@ -7964,13 +7973,13 @@ var useDataGridCell = ({
7964
7973
  },
7965
7974
  [showOverlay, validateKeyStroke]
7966
7975
  );
7967
- const isAnchor = (0, import_react44.useMemo)(() => {
7976
+ const isAnchor = (0, import_react45.useMemo)(() => {
7968
7977
  return anchor ? isCellMatch(coords, anchor) : false;
7969
7978
  }, [anchor, coords]);
7970
- const fieldWithoutOverlay = (0, import_react44.useMemo)(() => {
7979
+ const fieldWithoutOverlay = (0, import_react45.useMemo)(() => {
7971
7980
  return type === "boolean";
7972
7981
  }, [type]);
7973
- (0, import_react44.useEffect)(() => {
7982
+ (0, import_react45.useEffect)(() => {
7974
7983
  if (isAnchor && !containerRef.current?.contains(document.activeElement)) {
7975
7984
  containerRef.current?.focus({ preventScroll: true });
7976
7985
  }
@@ -8012,14 +8021,14 @@ var useDataGridCell = ({
8012
8021
  };
8013
8022
 
8014
8023
  // src/components/data-grid/hooks/use-data-grid-cell-error.tsx
8015
- var import_react45 = require("react");
8024
+ var import_react46 = require("react");
8016
8025
  var import_react_hook_form3 = require("react-hook-form");
8017
8026
  var useDataGridCellError = ({
8018
8027
  context
8019
8028
  }) => {
8020
8029
  const { errors, getCellErrorMetadata, navigateToField } = useDataGridContext();
8021
8030
  const { rowIndex, columnIndex } = context;
8022
- const { accessor, field } = (0, import_react45.useMemo)(() => {
8031
+ const { accessor, field } = (0, import_react46.useMemo)(() => {
8023
8032
  return getCellErrorMetadata({ row: rowIndex, col: columnIndex });
8024
8033
  }, [rowIndex, columnIndex, getCellErrorMetadata]);
8025
8034
  const rowErrorsObject = accessor && columnIndex === 0 ? (0, import_react_hook_form3.get)(errors, accessor) : void 0;
@@ -8059,7 +8068,7 @@ function isFieldError(errors) {
8059
8068
  }
8060
8069
 
8061
8070
  // src/components/data-grid/hooks/use-data-grid-cell-handlers.tsx
8062
- var import_react46 = require("react");
8071
+ var import_react47 = require("react");
8063
8072
 
8064
8073
  // src/components/data-grid/models/data-grid-bulk-update-command.ts
8065
8074
  var DataGridBulkUpdateCommand = class {
@@ -8463,7 +8472,7 @@ var useDataGridCellHandlers = ({
8463
8472
  execute,
8464
8473
  multiColumnSelection
8465
8474
  }) => {
8466
- const getWrapperFocusHandler = (0, import_react46.useCallback)(
8475
+ const getWrapperFocusHandler = (0, import_react47.useCallback)(
8467
8476
  (coords) => {
8468
8477
  return (_e) => {
8469
8478
  setSingleRange(coords);
@@ -8471,7 +8480,7 @@ var useDataGridCellHandlers = ({
8471
8480
  },
8472
8481
  [setSingleRange]
8473
8482
  );
8474
- const getOverlayMouseDownHandler = (0, import_react46.useCallback)(
8483
+ const getOverlayMouseDownHandler = (0, import_react47.useCallback)(
8475
8484
  (coords) => {
8476
8485
  return (e) => {
8477
8486
  e.stopPropagation();
@@ -8486,7 +8495,7 @@ var useDataGridCellHandlers = ({
8486
8495
  },
8487
8496
  [setIsSelecting, setRangeEnd, setSingleRange]
8488
8497
  );
8489
- const getWrapperMouseOverHandler = (0, import_react46.useCallback)(
8498
+ const getWrapperMouseOverHandler = (0, import_react47.useCallback)(
8490
8499
  (coords) => {
8491
8500
  if (!isDragging && !isSelecting) {
8492
8501
  return;
@@ -8511,7 +8520,7 @@ var useDataGridCellHandlers = ({
8511
8520
  multiColumnSelection
8512
8521
  ]
8513
8522
  );
8514
- const getInputChangeHandler = (0, import_react46.useCallback)(
8523
+ const getInputChangeHandler = (0, import_react47.useCallback)(
8515
8524
  // Using `any` here as the generic type of Path<TFieldValues> will
8516
8525
  // not be inferred correctly.
8517
8526
  (field) => {
@@ -8531,13 +8540,13 @@ var useDataGridCellHandlers = ({
8531
8540
  },
8532
8541
  [setValue2, execute]
8533
8542
  );
8534
- const onDragToFillStart = (0, import_react46.useCallback)(
8543
+ const onDragToFillStart = (0, import_react47.useCallback)(
8535
8544
  (_e) => {
8536
8545
  setIsDragging(true);
8537
8546
  },
8538
8547
  [setIsDragging]
8539
8548
  );
8540
- const getIsCellSelected = (0, import_react46.useCallback)(
8549
+ const getIsCellSelected = (0, import_react47.useCallback)(
8541
8550
  (cell) => {
8542
8551
  if (!cell || !anchor || !rangeEnd) {
8543
8552
  return false;
@@ -8546,7 +8555,7 @@ var useDataGridCellHandlers = ({
8546
8555
  },
8547
8556
  [anchor, rangeEnd, matrix]
8548
8557
  );
8549
- const getIsCellDragSelected = (0, import_react46.useCallback)(
8558
+ const getIsCellDragSelected = (0, import_react47.useCallback)(
8550
8559
  (cell) => {
8551
8560
  if (!cell || !anchor || !dragEnd) {
8552
8561
  return false;
@@ -8567,11 +8576,11 @@ var useDataGridCellHandlers = ({
8567
8576
  };
8568
8577
 
8569
8578
  // src/components/data-grid/hooks/use-data-grid-cell-metadata.tsx
8570
- var import_react47 = require("react");
8579
+ var import_react48 = require("react");
8571
8580
  var useDataGridCellMetadata = ({
8572
8581
  matrix
8573
8582
  }) => {
8574
- const getCellMetadata = (0, import_react47.useCallback)(
8583
+ const getCellMetadata = (0, import_react48.useCallback)(
8575
8584
  (coords) => {
8576
8585
  const { row, col } = coords;
8577
8586
  const id2 = generateCellId(coords);
@@ -8599,7 +8608,7 @@ var useDataGridCellMetadata = ({
8599
8608
  },
8600
8609
  [matrix]
8601
8610
  );
8602
- const getCellErrorMetadata = (0, import_react47.useCallback)(
8611
+ const getCellErrorMetadata = (0, import_react48.useCallback)(
8603
8612
  (coords) => {
8604
8613
  const accessor = matrix.getRowAccessor(coords.row);
8605
8614
  const field = matrix.getCellField(coords);
@@ -8617,14 +8626,14 @@ var useDataGridCellMetadata = ({
8617
8626
  };
8618
8627
 
8619
8628
  // src/components/data-grid/hooks/use-data-grid-cell-snapshot.tsx
8620
- var import_react48 = require("react");
8629
+ var import_react49 = require("react");
8621
8630
  var useDataGridCellSnapshot = ({
8622
8631
  matrix,
8623
8632
  form
8624
8633
  }) => {
8625
- const [snapshot, setSnapshot] = (0, import_react48.useState)(null);
8634
+ const [snapshot, setSnapshot] = (0, import_react49.useState)(null);
8626
8635
  const { getValues, setValue: setValue2 } = form;
8627
- const createSnapshot = (0, import_react48.useCallback)(
8636
+ const createSnapshot = (0, import_react49.useCallback)(
8628
8637
  (cell) => {
8629
8638
  if (!cell) {
8630
8639
  return null;
@@ -8643,7 +8652,7 @@ var useDataGridCellSnapshot = ({
8643
8652
  },
8644
8653
  [getValues, matrix]
8645
8654
  );
8646
- const restoreSnapshot = (0, import_react48.useCallback)(() => {
8655
+ const restoreSnapshot = (0, import_react49.useCallback)(() => {
8647
8656
  if (!snapshot) {
8648
8657
  return;
8649
8658
  }
@@ -8659,7 +8668,7 @@ var useDataGridCellSnapshot = ({
8659
8668
  };
8660
8669
 
8661
8670
  // src/components/data-grid/hooks/use-data-grid-clipboard-events.tsx
8662
- var import_react49 = require("react");
8671
+ var import_react50 = require("react");
8663
8672
  var useDataGridClipboardEvents = ({
8664
8673
  containerRef,
8665
8674
  matrix,
@@ -8670,7 +8679,7 @@ var useDataGridClipboardEvents = ({
8670
8679
  setSelectionValues,
8671
8680
  execute
8672
8681
  }) => {
8673
- const handleCopyEvent = (0, import_react49.useCallback)(
8682
+ const handleCopyEvent = (0, import_react50.useCallback)(
8674
8683
  (e) => {
8675
8684
  if (isEditing || !anchor || !rangeEnd) {
8676
8685
  return;
@@ -8703,7 +8712,7 @@ var useDataGridClipboardEvents = ({
8703
8712
  },
8704
8713
  [isEditing, anchor, rangeEnd, containerRef, matrix, getSelectionValues]
8705
8714
  );
8706
- const handlePasteEvent = (0, import_react49.useCallback)(
8715
+ const handlePasteEvent = (0, import_react50.useCallback)(
8707
8716
  (e) => {
8708
8717
  if (isEditing || !anchor || !rangeEnd) {
8709
8718
  return;
@@ -8741,7 +8750,7 @@ var useDataGridClipboardEvents = ({
8741
8750
  };
8742
8751
 
8743
8752
  // src/components/data-grid/hooks/use-data-grid-column-visibility.tsx
8744
- var import_react50 = require("react");
8753
+ var import_react51 = require("react");
8745
8754
  function useDataGridColumnVisibility(grid, matrix) {
8746
8755
  const columns = grid.getAllLeafColumns();
8747
8756
  const columnOptions = columns.map((column) => ({
@@ -8750,7 +8759,7 @@ function useDataGridColumnVisibility(grid, matrix) {
8750
8759
  checked: column.getIsVisible(),
8751
8760
  disabled: !column.getCanHide()
8752
8761
  }));
8753
- const handleToggleColumn = (0, import_react50.useCallback)(
8762
+ const handleToggleColumn = (0, import_react51.useCallback)(
8754
8763
  (index) => (value) => {
8755
8764
  const column = columns[index];
8756
8765
  if (!column.getCanHide()) {
@@ -8761,7 +8770,7 @@ function useDataGridColumnVisibility(grid, matrix) {
8761
8770
  },
8762
8771
  [columns, matrix]
8763
8772
  );
8764
- const handleResetColumns = (0, import_react50.useCallback)(() => {
8773
+ const handleResetColumns = (0, import_react51.useCallback)(() => {
8765
8774
  grid.setColumnVisibility({});
8766
8775
  }, [grid]);
8767
8776
  const optionCount = columnOptions.filter((c) => !c.disabled).length;
@@ -8794,15 +8803,15 @@ function getColumnName(column) {
8794
8803
  var import_react_hook_form4 = require("react-hook-form");
8795
8804
 
8796
8805
  // src/components/data-grid/hooks/use-data-grid-error-highlighting.tsx
8797
- var import_react51 = require("react");
8806
+ var import_react52 = require("react");
8798
8807
  var useDataGridErrorHighlighting = (matrix, grid, errors) => {
8799
- const [isHighlighted, setIsHighlighted] = (0, import_react51.useState)(false);
8800
- const [visibilitySnapshot, setVisibilitySnapshot] = (0, import_react51.useState)(null);
8808
+ const [isHighlighted, setIsHighlighted] = (0, import_react52.useState)(false);
8809
+ const [visibilitySnapshot, setVisibilitySnapshot] = (0, import_react52.useState)(null);
8801
8810
  const { flatRows } = grid.getRowModel();
8802
8811
  const flatColumns = grid.getAllFlatColumns();
8803
8812
  const errorPaths = findErrorPaths(errors);
8804
8813
  const errorCount = errorPaths.length;
8805
- const { rowsWithErrors, columnsWithErrors } = (0, import_react51.useMemo)(() => {
8814
+ const { rowsWithErrors, columnsWithErrors } = (0, import_react52.useMemo)(() => {
8806
8815
  const rowsWithErrors2 = /* @__PURE__ */ new Set();
8807
8816
  const columnsWithErrors2 = /* @__PURE__ */ new Set();
8808
8817
  errorPaths.forEach((errorPath) => {
@@ -8821,7 +8830,7 @@ var useDataGridErrorHighlighting = (matrix, grid, errors) => {
8821
8830
  });
8822
8831
  return { rowsWithErrors: rowsWithErrors2, columnsWithErrors: columnsWithErrors2 };
8823
8832
  }, [errorPaths, matrix.rowAccessors, matrix.columnAccessors]);
8824
- const toggleErrorHighlighting = (0, import_react51.useCallback)(
8833
+ const toggleErrorHighlighting = (0, import_react52.useCallback)(
8825
8834
  (currentRowVisibility, currentColumnVisibility, setRowVisibility, setColumnVisibility) => {
8826
8835
  if (isHighlighted) {
8827
8836
  if (visibilitySnapshot) {
@@ -8879,14 +8888,14 @@ function findErrorPaths(obj, path = []) {
8879
8888
  }
8880
8889
 
8881
8890
  // src/components/data-grid/hooks/use-data-grid-form-handlers.tsx
8882
- var import_react52 = require("react");
8891
+ var import_react53 = require("react");
8883
8892
  var useDataGridFormHandlers = ({
8884
8893
  matrix,
8885
8894
  form,
8886
8895
  anchor
8887
8896
  }) => {
8888
8897
  const { getValues, reset } = form;
8889
- const getSelectionValues = (0, import_react52.useCallback)(
8898
+ const getSelectionValues = (0, import_react53.useCallback)(
8890
8899
  (fields) => {
8891
8900
  if (!fields.length) {
8892
8901
  return [];
@@ -8898,7 +8907,7 @@ var useDataGridFormHandlers = ({
8898
8907
  },
8899
8908
  [getValues]
8900
8909
  );
8901
- const setSelectionValues = (0, import_react52.useCallback)(
8910
+ const setSelectionValues = (0, import_react53.useCallback)(
8902
8911
  async (fields, values, isHistory) => {
8903
8912
  if (!fields.length || !anchor) {
8904
8913
  return;
@@ -9039,7 +9048,7 @@ function convertArrayToPrimitive(values, type) {
9039
9048
  }
9040
9049
 
9041
9050
  // src/components/data-grid/hooks/use-data-grid-keydown-event.tsx
9042
- var import_react53 = require("react");
9051
+ var import_react54 = require("react");
9043
9052
  var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
9044
9053
  var VERTICAL_KEYS = ["ArrowUp", "ArrowDown"];
9045
9054
  var useDataGridKeydownEvent = ({
@@ -9064,7 +9073,7 @@ var useDataGridKeydownEvent = ({
9064
9073
  restoreSnapshot,
9065
9074
  createSnapshot
9066
9075
  }) => {
9067
- const handleKeyboardNavigation = (0, import_react53.useCallback)(
9076
+ const handleKeyboardNavigation = (0, import_react54.useCallback)(
9068
9077
  (e) => {
9069
9078
  if (!anchor) {
9070
9079
  return;
@@ -9104,7 +9113,7 @@ var useDataGridKeydownEvent = ({
9104
9113
  matrix
9105
9114
  ]
9106
9115
  );
9107
- const handleTabKey = (0, import_react53.useCallback)(
9116
+ const handleTabKey = (0, import_react54.useCallback)(
9108
9117
  (e) => {
9109
9118
  if (!anchor) {
9110
9119
  return;
@@ -9125,7 +9134,7 @@ var useDataGridKeydownEvent = ({
9125
9134
  },
9126
9135
  [anchor, scrollToCoordinates, setSingleRange, matrix]
9127
9136
  );
9128
- const handleUndo = (0, import_react53.useCallback)(
9137
+ const handleUndo = (0, import_react54.useCallback)(
9129
9138
  (e) => {
9130
9139
  e.preventDefault();
9131
9140
  if (e.shiftKey) {
@@ -9136,7 +9145,7 @@ var useDataGridKeydownEvent = ({
9136
9145
  },
9137
9146
  [redo, undo]
9138
9147
  );
9139
- const handleSpaceKeyBoolean = (0, import_react53.useCallback)(
9148
+ const handleSpaceKeyBoolean = (0, import_react54.useCallback)(
9140
9149
  (anchor2) => {
9141
9150
  const end = rangeEnd ?? anchor2;
9142
9151
  const fields = matrix.getFieldsInSelection(anchor2, end);
@@ -9153,7 +9162,7 @@ var useDataGridKeydownEvent = ({
9153
9162
  },
9154
9163
  [rangeEnd, matrix, getSelectionValues, setSelectionValues, execute]
9155
9164
  );
9156
- const handleSpaceKeyText = (0, import_react53.useCallback)(
9165
+ const handleSpaceKeyText = (0, import_react54.useCallback)(
9157
9166
  (anchor2) => {
9158
9167
  const field = matrix.getCellField(anchor2);
9159
9168
  const input = queryTool?.getInput(anchor2);
@@ -9165,7 +9174,7 @@ var useDataGridKeydownEvent = ({
9165
9174
  },
9166
9175
  [matrix, queryTool, createSnapshot]
9167
9176
  );
9168
- const handleSpaceKeyNumber = (0, import_react53.useCallback)(
9177
+ const handleSpaceKeyNumber = (0, import_react54.useCallback)(
9169
9178
  (anchor2) => {
9170
9179
  const field = matrix.getCellField(anchor2);
9171
9180
  const input = queryTool?.getInput(anchor2);
@@ -9190,7 +9199,7 @@ var useDataGridKeydownEvent = ({
9190
9199
  },
9191
9200
  [matrix, queryTool, getValues, execute, setValue2, createSnapshot]
9192
9201
  );
9193
- const handleSpaceKeyTogglableNumber = (0, import_react53.useCallback)(
9202
+ const handleSpaceKeyTogglableNumber = (0, import_react54.useCallback)(
9194
9203
  (anchor2) => {
9195
9204
  const field = matrix.getCellField(anchor2);
9196
9205
  const input = queryTool?.getInput(anchor2);
@@ -9219,7 +9228,7 @@ var useDataGridKeydownEvent = ({
9219
9228
  },
9220
9229
  [matrix, queryTool, getValues, execute, setValue2, createSnapshot]
9221
9230
  );
9222
- const handleSpaceKey = (0, import_react53.useCallback)(
9231
+ const handleSpaceKey = (0, import_react54.useCallback)(
9223
9232
  (e) => {
9224
9233
  if (!anchor || isEditing) {
9225
9234
  return;
@@ -9255,7 +9264,7 @@ var useDataGridKeydownEvent = ({
9255
9264
  handleSpaceKeyTogglableNumber
9256
9265
  ]
9257
9266
  );
9258
- const handleMoveOnEnter = (0, import_react53.useCallback)(
9267
+ const handleMoveOnEnter = (0, import_react54.useCallback)(
9259
9268
  (e, anchor2) => {
9260
9269
  const direction = e.shiftKey ? "ArrowUp" : "ArrowDown";
9261
9270
  const pos = matrix.getValidMovement(
@@ -9281,7 +9290,7 @@ var useDataGridKeydownEvent = ({
9281
9290
  onEditingChangeHandler
9282
9291
  ]
9283
9292
  );
9284
- const handleEditOnEnter = (0, import_react53.useCallback)(
9293
+ const handleEditOnEnter = (0, import_react54.useCallback)(
9285
9294
  (anchor2) => {
9286
9295
  const input = queryTool?.getInput(anchor2);
9287
9296
  if (!input) {
@@ -9292,7 +9301,7 @@ var useDataGridKeydownEvent = ({
9292
9301
  },
9293
9302
  [queryTool, onEditingChangeHandler]
9294
9303
  );
9295
- const handleEnterKeyTextOrNumber = (0, import_react53.useCallback)(
9304
+ const handleEnterKeyTextOrNumber = (0, import_react54.useCallback)(
9296
9305
  (e, anchor2) => {
9297
9306
  if (isEditing) {
9298
9307
  handleMoveOnEnter(e, anchor2);
@@ -9302,7 +9311,7 @@ var useDataGridKeydownEvent = ({
9302
9311
  },
9303
9312
  [handleMoveOnEnter, handleEditOnEnter, isEditing]
9304
9313
  );
9305
- const handleEnterKeyMultilineText = (0, import_react53.useCallback)(
9314
+ const handleEnterKeyMultilineText = (0, import_react54.useCallback)(
9306
9315
  (e, anchor2) => {
9307
9316
  if (isEditing) {
9308
9317
  if (e.shiftKey) {
@@ -9315,7 +9324,7 @@ var useDataGridKeydownEvent = ({
9315
9324
  },
9316
9325
  [handleMoveOnEnter, handleEditOnEnter, isEditing]
9317
9326
  );
9318
- const handleEnterKeyBoolean = (0, import_react53.useCallback)(
9327
+ const handleEnterKeyBoolean = (0, import_react54.useCallback)(
9319
9328
  (e, anchor2) => {
9320
9329
  const field = matrix.getCellField(anchor2);
9321
9330
  if (!field) {
@@ -9343,7 +9352,7 @@ var useDataGridKeydownEvent = ({
9343
9352
  },
9344
9353
  [execute, getValues, handleMoveOnEnter, matrix, setValue2]
9345
9354
  );
9346
- const handleEnterKey = (0, import_react53.useCallback)(
9355
+ const handleEnterKey = (0, import_react54.useCallback)(
9347
9356
  (e) => {
9348
9357
  if (!anchor) {
9349
9358
  return;
@@ -9377,7 +9386,7 @@ var useDataGridKeydownEvent = ({
9377
9386
  handleEnterKeyMultilineText
9378
9387
  ]
9379
9388
  );
9380
- const handleDeleteKeyTogglableNumber = (0, import_react53.useCallback)(
9389
+ const handleDeleteKeyTogglableNumber = (0, import_react54.useCallback)(
9381
9390
  (anchor2, rangeEnd2) => {
9382
9391
  const fields = matrix.getFieldsInSelection(anchor2, rangeEnd2);
9383
9392
  const prev = getSelectionValues(fields);
@@ -9396,7 +9405,7 @@ var useDataGridKeydownEvent = ({
9396
9405
  },
9397
9406
  [matrix, getSelectionValues, setSelectionValues, execute]
9398
9407
  );
9399
- const handleDeleteKeyTextOrNumber = (0, import_react53.useCallback)(
9408
+ const handleDeleteKeyTextOrNumber = (0, import_react54.useCallback)(
9400
9409
  (anchor2, rangeEnd2) => {
9401
9410
  const fields = matrix.getFieldsInSelection(anchor2, rangeEnd2);
9402
9411
  const prev = getSelectionValues(fields);
@@ -9411,7 +9420,7 @@ var useDataGridKeydownEvent = ({
9411
9420
  },
9412
9421
  [matrix, getSelectionValues, setSelectionValues, execute]
9413
9422
  );
9414
- const handleDeleteKeyBoolean = (0, import_react53.useCallback)(
9423
+ const handleDeleteKeyBoolean = (0, import_react54.useCallback)(
9415
9424
  (anchor2, rangeEnd2) => {
9416
9425
  const fields = matrix.getFieldsInSelection(anchor2, rangeEnd2);
9417
9426
  const prev = getSelectionValues(fields);
@@ -9426,7 +9435,7 @@ var useDataGridKeydownEvent = ({
9426
9435
  },
9427
9436
  [execute, getSelectionValues, matrix, setSelectionValues]
9428
9437
  );
9429
- const handleDeleteKey = (0, import_react53.useCallback)(
9438
+ const handleDeleteKey = (0, import_react54.useCallback)(
9430
9439
  (e) => {
9431
9440
  if (!anchor || !rangeEnd || isEditing) {
9432
9441
  return;
@@ -9460,7 +9469,7 @@ var useDataGridKeydownEvent = ({
9460
9469
  handleDeleteKeyTogglableNumber
9461
9470
  ]
9462
9471
  );
9463
- const handleEscapeKey = (0, import_react53.useCallback)(
9472
+ const handleEscapeKey = (0, import_react54.useCallback)(
9464
9473
  (e) => {
9465
9474
  if (!anchor || !isEditing) {
9466
9475
  return;
@@ -9473,7 +9482,7 @@ var useDataGridKeydownEvent = ({
9473
9482
  },
9474
9483
  [queryTool, isEditing, anchor, restoreSnapshot]
9475
9484
  );
9476
- const handleSpecialFocusKeys = (0, import_react53.useCallback)(
9485
+ const handleSpecialFocusKeys = (0, import_react54.useCallback)(
9477
9486
  (e) => {
9478
9487
  if (!containerRef || isEditing) {
9479
9488
  return;
@@ -9498,7 +9507,7 @@ var useDataGridKeydownEvent = ({
9498
9507
  },
9499
9508
  [isEditing, setTrapActive, containerRef]
9500
9509
  );
9501
- const handleKeyDownEvent = (0, import_react53.useCallback)(
9510
+ const handleKeyDownEvent = (0, import_react54.useCallback)(
9502
9511
  (e) => {
9503
9512
  if (ARROW_KEYS.includes(e.key)) {
9504
9513
  handleKeyboardNavigation(e);
@@ -9563,7 +9572,7 @@ function getFocusableElements(ref) {
9563
9572
  }
9564
9573
 
9565
9574
  // src/components/data-grid/hooks/use-data-grid-mouse-up-event.tsx
9566
- var import_react54 = require("react");
9575
+ var import_react55 = require("react");
9567
9576
  var useDataGridMouseUpEvent = ({
9568
9577
  matrix,
9569
9578
  anchor,
@@ -9577,7 +9586,7 @@ var useDataGridMouseUpEvent = ({
9577
9586
  setSelectionValues,
9578
9587
  execute
9579
9588
  }) => {
9580
- const handleDragEnd = (0, import_react54.useCallback)(() => {
9589
+ const handleDragEnd = (0, import_react55.useCallback)(() => {
9581
9590
  if (!isDragging) {
9582
9591
  return;
9583
9592
  }
@@ -9615,7 +9624,7 @@ var useDataGridMouseUpEvent = ({
9615
9624
  setDragEnd,
9616
9625
  setRangeEnd
9617
9626
  ]);
9618
- const handleMouseUpEvent = (0, import_react54.useCallback)(() => {
9627
+ const handleMouseUpEvent = (0, import_react55.useCallback)(() => {
9619
9628
  handleDragEnd();
9620
9629
  setIsSelecting(false);
9621
9630
  }, [handleDragEnd, setIsSelecting]);
@@ -9625,7 +9634,7 @@ var useDataGridMouseUpEvent = ({
9625
9634
  };
9626
9635
 
9627
9636
  // src/components/data-grid/hooks/use-data-grid-navigation.tsx
9628
- var import_react55 = require("react");
9637
+ var import_react56 = require("react");
9629
9638
  var useDataGridNavigation = ({
9630
9639
  matrix,
9631
9640
  anchor,
@@ -9638,7 +9647,7 @@ var useDataGridNavigation = ({
9638
9647
  queryTool,
9639
9648
  setSingleRange
9640
9649
  }) => {
9641
- const scrollToCoordinates = (0, import_react55.useCallback)(
9650
+ const scrollToCoordinates = (0, import_react56.useCallback)(
9642
9651
  (coords, direction) => {
9643
9652
  if (!anchor) {
9644
9653
  return;
@@ -9665,7 +9674,7 @@ var useDataGridNavigation = ({
9665
9674
  },
9666
9675
  [anchor, columnVirtualizer, visibleRows, rowVirtualizer, visibleColumns]
9667
9676
  );
9668
- const navigateToField = (0, import_react55.useCallback)(
9677
+ const navigateToField = (0, import_react56.useCallback)(
9669
9678
  (field) => {
9670
9679
  const coords = matrix.getCoordinatesByField(field);
9671
9680
  if (!coords) {
@@ -9705,10 +9714,10 @@ var useDataGridNavigation = ({
9705
9714
  };
9706
9715
 
9707
9716
  // src/components/data-grid/hooks/use-data-grid-query-tool.tsx
9708
- var import_react56 = require("react");
9717
+ var import_react57 = require("react");
9709
9718
  var useDataGridQueryTool = (containerRef) => {
9710
- const queryToolRef = (0, import_react56.useRef)(null);
9711
- (0, import_react56.useEffect)(() => {
9719
+ const queryToolRef = (0, import_react57.useRef)(null);
9720
+ (0, import_react57.useEffect)(() => {
9712
9721
  if (containerRef.current) {
9713
9722
  queryToolRef.current = new DataGridQueryTool(containerRef.current);
9714
9723
  }
@@ -9901,7 +9910,7 @@ var Inner = ({
9901
9910
  // src/components/data-grid/components/data-grid-currency-cell.tsx
9902
9911
  var import_react_currency_input_field = __toESM(require("react-currency-input-field"));
9903
9912
  var import_react_hook_form7 = require("react-hook-form");
9904
- var import_react57 = require("react");
9913
+ var import_react58 = require("react");
9905
9914
  var import_jsx_runtime50 = require("react/jsx-runtime");
9906
9915
  var DataGridCurrencyCell = ({
9907
9916
  context,
@@ -9937,7 +9946,7 @@ var Inner2 = ({
9937
9946
  onChange,
9938
9947
  ...attributes
9939
9948
  } = inputProps;
9940
- const formatter = (0, import_react57.useCallback)(
9949
+ const formatter = (0, import_react58.useCallback)(
9941
9950
  (value2) => {
9942
9951
  const ensuredValue = typeof value2 === "number" ? value2.toString() : value2 || "";
9943
9952
  return (0, import_react_currency_input_field.formatValue)({
@@ -9949,7 +9958,7 @@ var Inner2 = ({
9949
9958
  },
9950
9959
  [currencyInfo]
9951
9960
  );
9952
- const [localValue, setLocalValue] = (0, import_react57.useState)(value || "");
9961
+ const [localValue, setLocalValue] = (0, import_react58.useState)(value || "");
9953
9962
  const handleValueChange = (value2, _name, _values) => {
9954
9963
  if (!value2) {
9955
9964
  setLocalValue("");
@@ -9957,7 +9966,7 @@ var Inner2 = ({
9957
9966
  }
9958
9967
  setLocalValue(value2);
9959
9968
  };
9960
- (0, import_react57.useEffect)(() => {
9969
+ (0, import_react58.useEffect)(() => {
9961
9970
  let update = value;
9962
9971
  if (!isNaN(Number(value))) {
9963
9972
  update = formatter(update);
@@ -10001,7 +10010,7 @@ var Inner2 = ({
10001
10010
 
10002
10011
  // src/components/data-grid/components/data-grid-multiline-cell.tsx
10003
10012
  var import_ui38 = require("@medusajs/ui");
10004
- var import_react58 = require("react");
10013
+ var import_react59 = require("react");
10005
10014
  var import_react_hook_form8 = require("react-hook-form");
10006
10015
  var import_jsx_runtime51 = require("react/jsx-runtime");
10007
10016
  var DataGridMultilineCell = ({
@@ -10029,13 +10038,13 @@ var Inner3 = ({
10029
10038
  }) => {
10030
10039
  const { onChange: _, onBlur, ref, value, ...rest } = field;
10031
10040
  const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
10032
- const [localValue, setLocalValue] = (0, import_react58.useState)(value);
10033
- const textareaRef = (0, import_react58.useRef)(null);
10034
- (0, import_react58.useEffect)(() => {
10041
+ const [localValue, setLocalValue] = (0, import_react59.useState)(value);
10042
+ const textareaRef = (0, import_react59.useRef)(null);
10043
+ (0, import_react59.useEffect)(() => {
10035
10044
  setLocalValue(value);
10036
10045
  }, [value]);
10037
10046
  const combinedRefs = useCombinedRefs(inputRef, ref, textareaRef);
10038
- const adjustTextareaHeight = (0, import_react58.useCallback)(() => {
10047
+ const adjustTextareaHeight = (0, import_react59.useCallback)(() => {
10039
10048
  const textarea = textareaRef.current;
10040
10049
  if (textarea) {
10041
10050
  textarea.style.height = "0px";
@@ -10043,10 +10052,10 @@ var Inner3 = ({
10043
10052
  textarea.style.height = `${newHeight}px`;
10044
10053
  }
10045
10054
  }, []);
10046
- (0, import_react58.useEffect)(() => {
10055
+ (0, import_react59.useEffect)(() => {
10047
10056
  adjustTextareaHeight();
10048
10057
  }, [localValue, adjustTextareaHeight]);
10049
- (0, import_react58.useEffect)(() => {
10058
+ (0, import_react59.useEffect)(() => {
10050
10059
  adjustTextareaHeight();
10051
10060
  const timeoutId = setTimeout(adjustTextareaHeight, 50);
10052
10061
  return () => clearTimeout(timeoutId);
@@ -10080,7 +10089,7 @@ var Inner3 = ({
10080
10089
 
10081
10090
  // src/components/data-grid/components/data-grid-number-cell.tsx
10082
10091
  var import_ui39 = require("@medusajs/ui");
10083
- var import_react59 = require("react");
10092
+ var import_react60 = require("react");
10084
10093
  var import_react_hook_form9 = require("react-hook-form");
10085
10094
  var import_jsx_runtime52 = require("react/jsx-runtime");
10086
10095
  var DataGridNumberCell = ({
@@ -10116,8 +10125,8 @@ var Inner4 = ({
10116
10125
  onFocus,
10117
10126
  ...attributes
10118
10127
  } = inputProps;
10119
- const [localValue, setLocalValue] = (0, import_react59.useState)(value);
10120
- (0, import_react59.useEffect)(() => {
10128
+ const [localValue, setLocalValue] = (0, import_react60.useState)(value);
10129
+ (0, import_react60.useEffect)(() => {
10121
10130
  setLocalValue(value);
10122
10131
  }, [value]);
10123
10132
  const combinedRefs = useCombinedRefs(inputRef, ref);
@@ -10189,17 +10198,17 @@ var import_icons17 = require("@medusajs/icons");
10189
10198
  var import_ui42 = require("@medusajs/ui");
10190
10199
  var import_react_table = require("@tanstack/react-table");
10191
10200
  var import_react_virtual = require("@tanstack/react-virtual");
10192
- var import_react62 = require("react");
10201
+ var import_react63 = require("react");
10193
10202
  var import_react_i18next28 = require("react-i18next");
10194
10203
 
10195
10204
  // src/hooks/use-command-history.tsx
10196
- var import_react60 = require("react");
10205
+ var import_react61 = require("react");
10197
10206
  var useCommandHistory = (maxHistory = 20) => {
10198
- const [past, setPast] = (0, import_react60.useState)([]);
10199
- const [future, setFuture] = (0, import_react60.useState)([]);
10207
+ const [past, setPast] = (0, import_react61.useState)([]);
10208
+ const [future, setFuture] = (0, import_react61.useState)([]);
10200
10209
  const canUndo = past.length > 0;
10201
10210
  const canRedo = future.length > 0;
10202
- const undo = (0, import_react60.useCallback)(() => {
10211
+ const undo = (0, import_react61.useCallback)(() => {
10203
10212
  if (!canUndo) {
10204
10213
  return;
10205
10214
  }
@@ -10209,7 +10218,7 @@ var useCommandHistory = (maxHistory = 20) => {
10209
10218
  setPast(newPast);
10210
10219
  setFuture([previous, ...future.slice(0, maxHistory - 1)]);
10211
10220
  }, [canUndo, future, past, maxHistory]);
10212
- const redo = (0, import_react60.useCallback)(() => {
10221
+ const redo = (0, import_react61.useCallback)(() => {
10213
10222
  if (!canRedo) {
10214
10223
  return;
10215
10224
  }
@@ -10219,7 +10228,7 @@ var useCommandHistory = (maxHistory = 20) => {
10219
10228
  setPast([...past, next].slice(0, maxHistory - 1));
10220
10229
  setFuture(newFuture);
10221
10230
  }, [canRedo, future, past, maxHistory]);
10222
- const execute = (0, import_react60.useCallback)(
10231
+ const execute = (0, import_react61.useCallback)(
10223
10232
  (command) => {
10224
10233
  command.execute();
10225
10234
  setPast((past2) => [...past2, command].slice(0, maxHistory - 1));
@@ -10240,12 +10249,12 @@ var useCommandHistory = (maxHistory = 20) => {
10240
10249
  var import_icons16 = require("@medusajs/icons");
10241
10250
  var import_ui41 = require("@medusajs/ui");
10242
10251
  var import_radix_ui2 = require("radix-ui");
10243
- var import_react61 = require("react");
10252
+ var import_react62 = require("react");
10244
10253
  var import_react_i18next27 = require("react-i18next");
10245
10254
  var import_jsx_runtime54 = require("react/jsx-runtime");
10246
10255
  var useDataGridShortcuts = () => {
10247
10256
  const { t } = (0, import_react_i18next27.useTranslation)();
10248
- const shortcuts = (0, import_react61.useMemo)(
10257
+ const shortcuts = (0, import_react62.useMemo)(
10249
10258
  () => [
10250
10259
  {
10251
10260
  label: t("dataGrid.shortcuts.commands.undo"),
@@ -10390,9 +10399,9 @@ var DataGridKeyboardShortcutModal = ({
10390
10399
  onOpenChange
10391
10400
  }) => {
10392
10401
  const { t } = (0, import_react_i18next27.useTranslation)();
10393
- const [searchValue, onSearchValueChange] = (0, import_react61.useState)("");
10402
+ const [searchValue, onSearchValueChange] = (0, import_react62.useState)("");
10394
10403
  const shortcuts = useDataGridShortcuts();
10395
- const searchResults = (0, import_react61.useMemo)(() => {
10404
+ const searchResults = (0, import_react62.useMemo)(() => {
10396
10405
  return shortcuts.filter(
10397
10406
  (shortcut) => shortcut.label.toLowerCase().includes(searchValue.toLowerCase())
10398
10407
  );
@@ -10484,7 +10493,7 @@ var DataGridRoot = ({
10484
10493
  headerContent
10485
10494
  }) => {
10486
10495
  const isLazyMode = totalRowCount !== void 0;
10487
- const containerRef = (0, import_react62.useRef)(null);
10496
+ const containerRef = (0, import_react63.useRef)(null);
10488
10497
  const { redo, undo, execute } = useCommandHistory();
10489
10498
  const {
10490
10499
  register,
@@ -10493,16 +10502,16 @@ var DataGridRoot = ({
10493
10502
  setValue: setValue2,
10494
10503
  formState: { errors }
10495
10504
  } = state;
10496
- const [internalTrapActive, setTrapActive] = (0, import_react62.useState)(true);
10505
+ const [internalTrapActive, setTrapActive] = (0, import_react63.useState)(true);
10497
10506
  const trapActive = !disableInteractions && internalTrapActive;
10498
- const [anchor, setAnchor] = (0, import_react62.useState)(null);
10499
- const [rangeEnd, setRangeEnd] = (0, import_react62.useState)(null);
10500
- const [dragEnd, setDragEnd] = (0, import_react62.useState)(null);
10501
- const [isSelecting, setIsSelecting] = (0, import_react62.useState)(false);
10502
- const [isDragging, setIsDragging] = (0, import_react62.useState)(false);
10503
- const [isEditing, setIsEditing] = (0, import_react62.useState)(false);
10504
- const [columnVisibility, setColumnVisibility] = (0, import_react62.useState)({});
10505
- const [rowVisibility, setRowVisibility] = (0, import_react62.useState)({});
10507
+ const [anchor, setAnchor] = (0, import_react63.useState)(null);
10508
+ const [rangeEnd, setRangeEnd] = (0, import_react63.useState)(null);
10509
+ const [dragEnd, setDragEnd] = (0, import_react63.useState)(null);
10510
+ const [isSelecting, setIsSelecting] = (0, import_react63.useState)(false);
10511
+ const [isDragging, setIsDragging] = (0, import_react63.useState)(false);
10512
+ const [isEditing, setIsEditing] = (0, import_react63.useState)(false);
10513
+ const [columnVisibility, setColumnVisibility] = (0, import_react63.useState)({});
10514
+ const [rowVisibility, setRowVisibility] = (0, import_react63.useState)({});
10506
10515
  const grid = (0, import_react_table.useReactTable)({
10507
10516
  data,
10508
10517
  columns,
@@ -10525,7 +10534,7 @@ var DataGridRoot = ({
10525
10534
  });
10526
10535
  const { flatRows } = grid.getRowModel();
10527
10536
  const flatColumns = grid.getAllFlatColumns();
10528
- const visibleRows = (0, import_react62.useMemo)(
10537
+ const visibleRows = (0, import_react63.useMemo)(
10529
10538
  () => flatRows.filter((_, index) => rowVisibility?.[index] !== false),
10530
10539
  [flatRows, rowVisibility]
10531
10540
  );
@@ -10555,13 +10564,13 @@ var DataGridRoot = ({
10555
10564
  }
10556
10565
  });
10557
10566
  const virtualRows = rowVirtualizer.getVirtualItems();
10558
- const lazyLoadingRefs = (0, import_react62.useRef)({
10567
+ const lazyLoadingRefs = (0, import_react63.useRef)({
10559
10568
  onFetchMore,
10560
10569
  hasNextPage,
10561
10570
  isFetchingMore,
10562
10571
  loadedRowCount: visibleRows.length
10563
10572
  });
10564
- (0, import_react62.useEffect)(() => {
10573
+ (0, import_react63.useEffect)(() => {
10565
10574
  lazyLoadingRefs.current = {
10566
10575
  onFetchMore,
10567
10576
  hasNextPage,
@@ -10570,7 +10579,7 @@ var DataGridRoot = ({
10570
10579
  };
10571
10580
  }, [onFetchMore, hasNextPage, isFetchingMore, visibleRows.length]);
10572
10581
  const hasData = visibleRows.length > 0;
10573
- const handleScroll = (0, import_react62.useCallback)(() => {
10582
+ const handleScroll = (0, import_react63.useCallback)(() => {
10574
10583
  const { onFetchMore: onFetchMore2, hasNextPage: hasNextPage2, isFetchingMore: isFetchingMore2, loadedRowCount } = lazyLoadingRefs.current;
10575
10584
  if (!onFetchMore2 || !hasNextPage2 || isFetchingMore2) {
10576
10585
  return;
@@ -10584,7 +10593,7 @@ var DataGridRoot = ({
10584
10593
  onFetchMore2();
10585
10594
  }
10586
10595
  }, [lazyLoadingRefs, containerRef]);
10587
- (0, import_react62.useEffect)(() => {
10596
+ (0, import_react63.useEffect)(() => {
10588
10597
  if (!isLazyMode || !hasData) {
10589
10598
  return;
10590
10599
  }
@@ -10632,7 +10641,7 @@ var DataGridRoot = ({
10632
10641
  });
10633
10642
  const virtualColumns = columnVirtualizer.getVirtualItems();
10634
10643
  const columnSizing = grid.getState().columnSizing;
10635
- (0, import_react62.useEffect)(() => {
10644
+ (0, import_react63.useEffect)(() => {
10636
10645
  columnVirtualizer.measure();
10637
10646
  }, [columnSizing, columnVirtualizer]);
10638
10647
  let virtualPaddingLeft;
@@ -10641,7 +10650,7 @@ var DataGridRoot = ({
10641
10650
  virtualPaddingLeft = virtualColumns[0]?.start ?? 0;
10642
10651
  virtualPaddingRight = columnVirtualizer.getTotalSize() - (virtualColumns[virtualColumns.length - 1]?.end ?? 0);
10643
10652
  }
10644
- const matrix = (0, import_react62.useMemo)(
10653
+ const matrix = (0, import_react63.useMemo)(
10645
10654
  () => new DataGridMatrix(
10646
10655
  flatRows,
10647
10656
  columns,
@@ -10650,7 +10659,7 @@ var DataGridRoot = ({
10650
10659
  [flatRows, columns, multiColumnSelection]
10651
10660
  );
10652
10661
  const queryTool = useDataGridQueryTool(containerRef);
10653
- const setSingleRange = (0, import_react62.useCallback)(
10662
+ const setSingleRange = (0, import_react63.useCallback)(
10654
10663
  (coordinates) => {
10655
10664
  setAnchor(coordinates);
10656
10665
  setRangeEnd(coordinates);
@@ -10658,7 +10667,7 @@ var DataGridRoot = ({
10658
10667
  []
10659
10668
  );
10660
10669
  const { errorCount, isHighlighted, toggleErrorHighlighting } = useDataGridErrorHighlighting(matrix, grid, errors);
10661
- const handleToggleErrorHighlighting = (0, import_react62.useCallback)(() => {
10670
+ const handleToggleErrorHighlighting = (0, import_react63.useCallback)(() => {
10662
10671
  toggleErrorHighlighting(
10663
10672
  rowVisibility,
10664
10673
  columnVisibility,
@@ -10672,7 +10681,7 @@ var DataGridRoot = ({
10672
10681
  handleResetColumns,
10673
10682
  isDisabled: isColumsDisabled
10674
10683
  } = useDataGridColumnVisibility(grid, matrix);
10675
- const handleToggleColumnVisibility = (0, import_react62.useCallback)(
10684
+ const handleToggleColumnVisibility = (0, import_react63.useCallback)(
10676
10685
  (index) => {
10677
10686
  return handleToggleColumn(index);
10678
10687
  },
@@ -10694,7 +10703,7 @@ var DataGridRoot = ({
10694
10703
  matrix,
10695
10704
  form: state
10696
10705
  });
10697
- const onEditingChangeHandler = (0, import_react62.useCallback)(
10706
+ const onEditingChangeHandler = (0, import_react63.useCallback)(
10698
10707
  (value) => {
10699
10708
  if (onEditingChange) {
10700
10709
  onEditingChange(value);
@@ -10783,7 +10792,7 @@ var DataGridRoot = ({
10783
10792
  const { getCellErrorMetadata, getCellMetadata } = useDataGridCellMetadata({
10784
10793
  matrix
10785
10794
  });
10786
- (0, import_react62.useEffect)(() => {
10795
+ (0, import_react63.useEffect)(() => {
10787
10796
  if (!trapActive) {
10788
10797
  return;
10789
10798
  }
@@ -10804,7 +10813,7 @@ var DataGridRoot = ({
10804
10813
  handleCopyEvent,
10805
10814
  handlePasteEvent
10806
10815
  ]);
10807
- (0, import_react62.useEffect)(() => {
10816
+ (0, import_react63.useEffect)(() => {
10808
10817
  const specialFocusHandler = (e) => {
10809
10818
  if (isSpecialFocusKey(e)) {
10810
10819
  handleSpecialFocusKeys(e);
@@ -10816,12 +10825,12 @@ var DataGridRoot = ({
10816
10825
  window.removeEventListener("keydown", specialFocusHandler);
10817
10826
  };
10818
10827
  }, [handleSpecialFocusKeys]);
10819
- const handleHeaderInteractionChange = (0, import_react62.useCallback)((isActive) => {
10828
+ const handleHeaderInteractionChange = (0, import_react63.useCallback)((isActive) => {
10820
10829
  if (isActive) {
10821
10830
  setTrapActive(false);
10822
10831
  }
10823
10832
  }, []);
10824
- (0, import_react62.useEffect)(() => {
10833
+ (0, import_react63.useEffect)(() => {
10825
10834
  if (!anchor) {
10826
10835
  return;
10827
10836
  }
@@ -10830,7 +10839,7 @@ var DataGridRoot = ({
10830
10839
  }
10831
10840
  setRangeEnd(anchor);
10832
10841
  }, [anchor, rangeEnd]);
10833
- (0, import_react62.useEffect)(() => {
10842
+ (0, import_react63.useEffect)(() => {
10834
10843
  if (!anchor && matrix) {
10835
10844
  const coords = matrix.getFirstNavigableCell();
10836
10845
  if (coords) {
@@ -10838,7 +10847,7 @@ var DataGridRoot = ({
10838
10847
  }
10839
10848
  }
10840
10849
  }, [anchor, matrix, setSingleRange]);
10841
- const values = (0, import_react62.useMemo)(
10850
+ const values = (0, import_react63.useMemo)(
10842
10851
  () => ({
10843
10852
  anchor,
10844
10853
  control,
@@ -10882,7 +10891,7 @@ var DataGridRoot = ({
10882
10891
  navigateToField
10883
10892
  ]
10884
10893
  );
10885
- const handleRestoreGridFocus = (0, import_react62.useCallback)(() => {
10894
+ const handleRestoreGridFocus = (0, import_react63.useCallback)(() => {
10886
10895
  if (anchor && !trapActive) {
10887
10896
  setTrapActive(true);
10888
10897
  setSingleRange(anchor);
@@ -11069,8 +11078,8 @@ var DataGridHeader = ({
11069
11078
  showColumnsDropdown,
11070
11079
  headerContent
11071
11080
  }) => {
11072
- const [shortcutsOpen, setShortcutsOpen] = (0, import_react62.useState)(false);
11073
- const [columnsOpen, setColumnsOpen] = (0, import_react62.useState)(false);
11081
+ const [shortcutsOpen, setShortcutsOpen] = (0, import_react63.useState)(false);
11082
+ const [columnsOpen, setColumnsOpen] = (0, import_react63.useState)(false);
11074
11083
  const { t } = (0, import_react_i18next28.useTranslation)();
11075
11084
  const direction = useDocumentDirection();
11076
11085
  const hasChanged = columnOptions.some((column) => !column.checked);
@@ -11433,7 +11442,7 @@ var DataGridSkeleton = ({
11433
11442
 
11434
11443
  // src/components/data-grid/components/data-grid-text-cell.tsx
11435
11444
  var import_ui44 = require("@medusajs/ui");
11436
- var import_react63 = require("react");
11445
+ var import_react64 = require("react");
11437
11446
  var import_react_hook_form10 = require("react-hook-form");
11438
11447
  var import_jsx_runtime58 = require("react/jsx-runtime");
11439
11448
  var DataGridTextCell = ({
@@ -11461,9 +11470,9 @@ var Inner5 = ({
11461
11470
  }) => {
11462
11471
  const { onChange: _, onBlur, ref, value, ...rest } = field;
11463
11472
  const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
11464
- const [localValue, setLocalValue] = (0, import_react63.useState)(value);
11465
- const inputElRef = (0, import_react63.useRef)(null);
11466
- (0, import_react63.useEffect)(() => {
11473
+ const [localValue, setLocalValue] = (0, import_react64.useState)(value);
11474
+ const inputElRef = (0, import_react64.useRef)(null);
11475
+ (0, import_react64.useEffect)(() => {
11467
11476
  setLocalValue(value);
11468
11477
  }, [value]);
11469
11478
  const combinedRefs = useCombinedRefs(inputRef, ref, inputElRef);
@@ -11494,7 +11503,7 @@ var Inner5 = ({
11494
11503
  // src/components/data-grid/components/data-grid-textarea-modal-cell.tsx
11495
11504
  var import_ui45 = require("@medusajs/ui");
11496
11505
  var import_radix_ui3 = require("radix-ui");
11497
- var import_react64 = require("react");
11506
+ var import_react65 = require("react");
11498
11507
  var import_react_hook_form11 = require("react-hook-form");
11499
11508
  var import_jsx_runtime59 = require("react/jsx-runtime");
11500
11509
  var DataGridExpandableTextCell = ({
@@ -11537,19 +11546,19 @@ var Inner6 = ({
11537
11546
  const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
11538
11547
  const { setSingleRange, anchor } = useDataGridContext();
11539
11548
  const { row, col } = anchor || { row: 0, col: 0 };
11540
- const [localValue, setLocalValue] = (0, import_react64.useState)(value || "");
11541
- const [isPopoverOpen, setIsPopoverOpen] = (0, import_react64.useState)(false);
11542
- const [popoverValue, setPopoverValue] = (0, import_react64.useState)(value || "");
11543
- const popoverContentRef = (0, import_react64.useRef)(null);
11544
- (0, import_react64.useEffect)(() => {
11549
+ const [localValue, setLocalValue] = (0, import_react65.useState)(value || "");
11550
+ const [isPopoverOpen, setIsPopoverOpen] = (0, import_react65.useState)(false);
11551
+ const [popoverValue, setPopoverValue] = (0, import_react65.useState)(value || "");
11552
+ const popoverContentRef = (0, import_react65.useRef)(null);
11553
+ (0, import_react65.useEffect)(() => {
11545
11554
  setLocalValue(value || "");
11546
11555
  }, [value]);
11547
- (0, import_react64.useEffect)(() => {
11556
+ (0, import_react65.useEffect)(() => {
11548
11557
  if (isPopoverOpen) {
11549
11558
  setPopoverValue(value || "");
11550
11559
  }
11551
11560
  }, [isPopoverOpen, value]);
11552
- (0, import_react64.useEffect)(() => {
11561
+ (0, import_react65.useEffect)(() => {
11553
11562
  if (!isPopoverOpen || !popoverContentRef.current) {
11554
11563
  return;
11555
11564
  }
@@ -11580,7 +11589,7 @@ var Inner6 = ({
11580
11589
  };
11581
11590
  }, [isPopoverOpen]);
11582
11591
  const combinedRefs = useCombinedRefs(inputRef, ref);
11583
- const handleOverlayMouseDown = (0, import_react64.useCallback)(
11592
+ const handleOverlayMouseDown = (0, import_react65.useCallback)(
11584
11593
  (e) => {
11585
11594
  if (e.detail === 2) {
11586
11595
  e.preventDefault();
@@ -11607,7 +11616,7 @@ var Inner6 = ({
11607
11616
  onBlur();
11608
11617
  onInputBlur();
11609
11618
  };
11610
- const handlePopoverKeyDown = (0, import_react64.useCallback)((e) => {
11619
+ const handlePopoverKeyDown = (0, import_react65.useCallback)((e) => {
11611
11620
  if (e.key !== "Escape") {
11612
11621
  e.stopPropagation();
11613
11622
  }
@@ -11905,15 +11914,15 @@ var SalesChannelHeader = () => {
11905
11914
 
11906
11915
  // src/components/modals/route-drawer/route-drawer.tsx
11907
11916
  var import_ui49 = require("@medusajs/ui");
11908
- var import_react71 = require("react");
11917
+ var import_react72 = require("react");
11909
11918
  var import_react_router_dom13 = require("react-router-dom");
11910
11919
 
11911
11920
  // src/components/modals/hooks/use-state-aware-to.tsx
11912
- var import_react65 = require("react");
11921
+ var import_react66 = require("react");
11913
11922
  var import_react_router_dom10 = require("react-router-dom");
11914
11923
  var useStateAwareTo = (prev) => {
11915
11924
  const location = (0, import_react_router_dom10.useLocation)();
11916
- const to = (0, import_react65.useMemo)(() => {
11925
+ const to = (0, import_react66.useMemo)(() => {
11917
11926
  if (typeof prev === "number") {
11918
11927
  return prev;
11919
11928
  }
@@ -11990,12 +11999,12 @@ var RouteModalForm = ({
11990
11999
  };
11991
12000
 
11992
12001
  // src/components/modals/route-modal-provider/route-provider.tsx
11993
- var import_react67 = require("react");
12002
+ var import_react68 = require("react");
11994
12003
  var import_react_router_dom12 = require("react-router-dom");
11995
12004
 
11996
12005
  // src/components/modals/route-modal-provider/route-modal-context.tsx
11997
- var import_react66 = require("react");
11998
- var RouteModalProviderContext = (0, import_react66.createContext)(null);
12006
+ var import_react67 = require("react");
12007
+ var RouteModalProviderContext = (0, import_react67.createContext)(null);
11999
12008
 
12000
12009
  // src/components/modals/route-modal-provider/route-provider.tsx
12001
12010
  var import_jsx_runtime65 = require("react/jsx-runtime");
@@ -12005,8 +12014,8 @@ var RouteModalProvider = ({
12005
12014
  }) => {
12006
12015
  const navigate = (0, import_react_router_dom12.useNavigate)();
12007
12016
  const location = (0, import_react_router_dom12.useLocation)();
12008
- const [closeOnEscape, setCloseOnEscape] = (0, import_react67.useState)(true);
12009
- const handleSuccess = (0, import_react67.useCallback)(
12017
+ const [closeOnEscape, setCloseOnEscape] = (0, import_react68.useState)(true);
12018
+ const handleSuccess = (0, import_react68.useCallback)(
12010
12019
  (path) => {
12011
12020
  const to = path || prev;
12012
12021
  if (typeof to === "number") {
@@ -12023,7 +12032,7 @@ var RouteModalProvider = ({
12023
12032
  },
12024
12033
  [navigate, prev, location]
12025
12034
  );
12026
- const value = (0, import_react67.useMemo)(
12035
+ const value = (0, import_react68.useMemo)(
12027
12036
  () => ({
12028
12037
  handleSuccess,
12029
12038
  setCloseOnEscape,
@@ -12035,11 +12044,11 @@ var RouteModalProvider = ({
12035
12044
  };
12036
12045
 
12037
12046
  // src/components/modals/stacked-modal-provider/stacked-modal-provider.tsx
12038
- var import_react69 = require("react");
12047
+ var import_react70 = require("react");
12039
12048
 
12040
12049
  // src/components/modals/stacked-modal-provider/stacked-modal-context.tsx
12041
- var import_react68 = require("react");
12042
- var StackedModalContext = (0, import_react68.createContext)(null);
12050
+ var import_react69 = require("react");
12051
+ var StackedModalContext = (0, import_react69.createContext)(null);
12043
12052
 
12044
12053
  // src/components/modals/stacked-modal-provider/stacked-modal-provider.tsx
12045
12054
  var import_jsx_runtime66 = require("react/jsx-runtime");
@@ -12047,7 +12056,7 @@ var StackedModalProvider = ({
12047
12056
  children,
12048
12057
  onOpenChange
12049
12058
  }) => {
12050
- const [state, setState] = (0, import_react69.useState)({});
12059
+ const [state, setState] = (0, import_react70.useState)({});
12051
12060
  const getIsOpen = (id2) => {
12052
12061
  return state[id2] || false;
12053
12062
  };
@@ -12086,9 +12095,9 @@ var StackedModalProvider = ({
12086
12095
  };
12087
12096
 
12088
12097
  // src/components/modals/stacked-modal-provider/use-stacked-modal.ts
12089
- var import_react70 = require("react");
12098
+ var import_react71 = require("react");
12090
12099
  var useStackedModal = () => {
12091
- const context = (0, import_react70.useContext)(StackedModalContext);
12100
+ const context = (0, import_react71.useContext)(StackedModalContext);
12092
12101
  if (!context) {
12093
12102
  throw new Error(
12094
12103
  "useStackedModal must be used within a StackedModalProvider"
@@ -12101,10 +12110,10 @@ var useStackedModal = () => {
12101
12110
  var import_jsx_runtime67 = require("react/jsx-runtime");
12102
12111
  var Root = ({ prev = "..", children }) => {
12103
12112
  const navigate = (0, import_react_router_dom13.useNavigate)();
12104
- const [open, setOpen] = (0, import_react71.useState)(false);
12105
- const [stackedModalOpen, onStackedModalOpen] = (0, import_react71.useState)(false);
12113
+ const [open, setOpen] = (0, import_react72.useState)(false);
12114
+ const [stackedModalOpen, onStackedModalOpen] = (0, import_react72.useState)(false);
12106
12115
  const to = useStateAwareTo(prev);
12107
- (0, import_react71.useEffect)(() => {
12116
+ (0, import_react72.useEffect)(() => {
12108
12117
  setOpen(true);
12109
12118
  return () => {
12110
12119
  setOpen(false);
@@ -12153,13 +12162,13 @@ var RouteDrawer = Object.assign(Root, {
12153
12162
 
12154
12163
  // src/components/modals/route-focus-modal/route-focus-modal.tsx
12155
12164
  var import_ui50 = require("@medusajs/ui");
12156
- var import_react73 = require("react");
12165
+ var import_react74 = require("react");
12157
12166
  var import_react_router_dom14 = require("react-router-dom");
12158
12167
 
12159
12168
  // src/components/modals/route-modal-provider/use-route-modal.tsx
12160
- var import_react72 = require("react");
12169
+ var import_react73 = require("react");
12161
12170
  var useRouteModal = () => {
12162
- const context = (0, import_react72.useContext)(RouteModalProviderContext);
12171
+ const context = (0, import_react73.useContext)(RouteModalProviderContext);
12163
12172
  if (!context) {
12164
12173
  throw new Error("useRouteModal must be used within a RouteModalProvider");
12165
12174
  }
@@ -12170,10 +12179,10 @@ var useRouteModal = () => {
12170
12179
  var import_jsx_runtime68 = require("react/jsx-runtime");
12171
12180
  var Root2 = ({ prev = "..", children }) => {
12172
12181
  const navigate = (0, import_react_router_dom14.useNavigate)();
12173
- const [open, setOpen] = (0, import_react73.useState)(false);
12174
- const [stackedModalOpen, onStackedModalOpen] = (0, import_react73.useState)(false);
12182
+ const [open, setOpen] = (0, import_react74.useState)(false);
12183
+ const [stackedModalOpen, onStackedModalOpen] = (0, import_react74.useState)(false);
12175
12184
  const to = useStateAwareTo(prev);
12176
- (0, import_react73.useEffect)(() => {
12185
+ (0, import_react74.useEffect)(() => {
12177
12186
  setOpen(true);
12178
12187
  return () => {
12179
12188
  setOpen(false);
@@ -12229,11 +12238,11 @@ var RouteFocusModal = Object.assign(Root2, {
12229
12238
 
12230
12239
  // src/components/modals/stacked-drawer/stacked-drawer.tsx
12231
12240
  var import_ui51 = require("@medusajs/ui");
12232
- var import_react74 = require("react");
12241
+ var import_react75 = require("react");
12233
12242
  var import_jsx_runtime69 = require("react/jsx-runtime");
12234
12243
  var Root3 = ({ id: id2, children }) => {
12235
12244
  const { register, unregister, getIsOpen, setIsOpen } = useStackedModal();
12236
- (0, import_react74.useEffect)(() => {
12245
+ (0, import_react75.useEffect)(() => {
12237
12246
  register(id2);
12238
12247
  return () => unregister(id2);
12239
12248
  }, []);
@@ -12253,7 +12262,7 @@ var Title3 = import_ui51.Drawer.Title;
12253
12262
  Title3.displayName = "StackedDrawer.Title";
12254
12263
  var Description3 = import_ui51.Drawer.Description;
12255
12264
  Description3.displayName = "StackedDrawer.Description";
12256
- var Content2 = (0, import_react74.forwardRef)(
12265
+ var Content2 = (0, import_react75.forwardRef)(
12257
12266
  ({ className, ...props }, ref) => {
12258
12267
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
12259
12268
  import_ui51.Drawer.Content,
@@ -12282,7 +12291,7 @@ var StackedDrawer = Object.assign(Root3, {
12282
12291
 
12283
12292
  // src/components/modals/stacked-focus-modal/stacked-focus-modal.tsx
12284
12293
  var import_ui52 = require("@medusajs/ui");
12285
- var import_react75 = require("react");
12294
+ var import_react76 = require("react");
12286
12295
  var import_jsx_runtime70 = require("react/jsx-runtime");
12287
12296
  var Root4 = ({
12288
12297
  id: id2,
@@ -12290,7 +12299,7 @@ var Root4 = ({
12290
12299
  children
12291
12300
  }) => {
12292
12301
  const { register, unregister, getIsOpen, setIsOpen } = useStackedModal();
12293
- (0, import_react75.useEffect)(() => {
12302
+ (0, import_react76.useEffect)(() => {
12294
12303
  register(id2);
12295
12304
  return () => unregister(id2);
12296
12305
  }, []);
@@ -12314,7 +12323,7 @@ var Title4 = import_ui52.FocusModal.Title;
12314
12323
  Title4.displayName = "StackedFocusModal.Title";
12315
12324
  var Description4 = import_ui52.FocusModal.Description;
12316
12325
  Description4.displayName = "StackedFocusModal.Description";
12317
- var Content3 = (0, import_react75.forwardRef)(
12326
+ var Content3 = (0, import_react76.forwardRef)(
12318
12327
  ({ className, ...props }, ref) => {
12319
12328
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
12320
12329
  import_ui52.FocusModal.Content,