@medusajs/dashboard 3.0.0-snapshot-20250410112222 → 3.0.0-snapshot-20251104011621

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 (663) hide show
  1. package/dist/{add-campaign-promotions-ZVOK5XD2.mjs → add-campaign-promotions-ZUJD7HBF.mjs} +14 -14
  2. package/dist/{adjust-inventory-WYNH75F7.mjs → adjust-inventory-7EWRE2HD.mjs} +3 -3
  3. package/dist/{api-key-management-create-HWBQGG6O.mjs → api-key-management-create-SPLD3JMO.mjs} +5 -5
  4. package/dist/{api-key-management-detail-QVWVJ5X6.mjs → api-key-management-detail-MFQTHUN6.mjs} +26 -22
  5. package/dist/{api-key-management-edit-UX47FHWV.mjs → api-key-management-edit-2VPL7PHB.mjs} +5 -5
  6. package/dist/{api-key-management-list-XQ5M7CMJ.mjs → api-key-management-list-22GXXJUC.mjs} +17 -18
  7. package/dist/{api-key-management-sales-channels-PILAZSU6.mjs → api-key-management-sales-channels-MV6FMA4C.mjs} +15 -11
  8. package/dist/app.css +347 -334
  9. package/dist/app.js +79816 -56782
  10. package/dist/app.mjs +28 -23
  11. package/dist/{campaign-budget-edit-57NSOYJ3.mjs → campaign-budget-edit-V2VMINUO.mjs} +4 -4
  12. package/dist/{campaign-configuration-QV3OHWBZ.mjs → campaign-configuration-PP4A5ADV.mjs} +3 -3
  13. package/dist/{campaign-create-NYJ4HILG.mjs → campaign-create-GD2D45NX.mjs} +8 -6
  14. package/dist/{campaign-detail-ITINMJJH.mjs → campaign-detail-IKHUALTL.mjs} +50 -44
  15. package/dist/{campaign-edit-3D5WFWCT.mjs → campaign-edit-O3LKMLXK.mjs} +3 -3
  16. package/dist/{campaign-list-SXMDW6B6.mjs → campaign-list-3452F4Y6.mjs} +17 -18
  17. package/dist/{categories-metadata-TE7B2OJY.mjs → categories-metadata-2HM7G27P.mjs} +18 -17
  18. package/dist/{category-create-NVRG7B6E.mjs → category-create-BC2VUVKO.mjs} +41 -20
  19. package/dist/{category-detail-WTSUKIXM.mjs → category-detail-D4PYJJGJ.mjs} +35 -35
  20. package/dist/{category-edit-JBZQKNL7.mjs → category-edit-U5Y5KJ2Y.mjs} +38 -18
  21. package/dist/{category-list-OWRWVUVN.mjs → category-list-MLLB5U6K.mjs} +13 -14
  22. package/dist/{category-organize-HUXXVJAB.mjs → category-organize-4NXFDN2I.mjs} +5 -6
  23. package/dist/{category-products-CRKFES6N.mjs → category-products-K5INZSSV.mjs} +35 -35
  24. package/dist/{chunk-JDZPSIIG.mjs → chunk-2D44OO7A.mjs} +1 -1
  25. package/dist/{chunk-FVK4ZYYM.mjs → chunk-2O43G3RH.mjs} +1 -1
  26. package/dist/{chunk-KERJR2T2.mjs → chunk-2WZUO66T.mjs} +1 -1
  27. package/dist/{chunk-GW6TVOAA.mjs → chunk-3C6WQ7NH.mjs} +21 -1
  28. package/dist/{chunk-ICR3D7SB.mjs → chunk-3DO2JGVG.mjs} +1 -1
  29. package/dist/{chunk-NOZD6HRU.mjs → chunk-3EGEJ6Q2.mjs} +3 -2
  30. package/dist/chunk-3I6G3NRU.mjs +44 -0
  31. package/dist/{chunk-LQFD6I7N.mjs → chunk-3JJBLFYN.mjs} +1 -1
  32. package/dist/{chunk-YIZSVS2R.mjs → chunk-3TZOFKX2.mjs} +23 -3
  33. package/dist/{chunk-6I62UDJA.mjs → chunk-4BGVSXZZ.mjs} +43 -22
  34. package/dist/{chunk-3WXBLS2P.mjs → chunk-4FM6S5CX.mjs} +2 -1
  35. package/dist/chunk-4XSXVVYD.mjs +18 -0
  36. package/dist/{chunk-6UX3SSRT.mjs → chunk-67ORSRVT.mjs} +36 -1
  37. package/dist/chunk-6CPMXY5N.mjs +18 -0
  38. package/dist/{chunk-2WQFRVK5.mjs → chunk-6IXLTZ2H.mjs} +5 -2
  39. package/dist/{chunk-AL4WDQTN.mjs → chunk-6VRDTPH2.mjs} +60 -50
  40. package/dist/{chunk-FVC7M755.mjs → chunk-6XWHQ6ON.mjs} +1 -1
  41. package/dist/{chunk-NGEWNLV7.mjs → chunk-7DWBXEH3.mjs} +72 -20
  42. package/dist/{chunk-ZCO6EK4W.mjs → chunk-AERWK3TJ.mjs} +13 -10
  43. package/dist/{chunk-TDDYKNA2.mjs → chunk-AHQI2S2Z.mjs} +66 -5
  44. package/dist/{chunk-HUGE7T5V.mjs → chunk-ALKTJGWS.mjs} +2 -2
  45. package/dist/chunk-AMRS4CSX.mjs +9 -0
  46. package/dist/{chunk-OIAPXGI2.mjs → chunk-B6ZOPCPA.mjs} +1 -1
  47. package/dist/chunk-BW322BVH.mjs +52 -0
  48. package/dist/chunk-BW4QA6B6.mjs +49 -0
  49. package/dist/{chunk-AQS3BSDG.mjs → chunk-CBYAN3G4.mjs} +4 -3
  50. package/dist/{chunk-CF64SRBE.mjs → chunk-CIY65KNH.mjs} +1 -1
  51. package/dist/{chunk-VDBOSWVE.mjs → chunk-DG7J63J2.mjs} +7 -7
  52. package/dist/{chunk-MWVM4TYO.mjs → chunk-DK4WIVY6.mjs} +18 -0
  53. package/dist/{chunk-THZJC662.mjs → chunk-EHAU7SOS.mjs} +10 -1
  54. package/dist/{chunk-DXOEDXLQ.mjs → chunk-ELPHCFRW.mjs} +13 -8
  55. package/dist/{chunk-TP7N4YBP.mjs → chunk-EQKJ5FSL.mjs} +1 -1
  56. package/dist/{chunk-7I5DQGWY.mjs → chunk-F7LJJHQT.mjs} +11 -1
  57. package/dist/{chunk-EUTK2A3J.mjs → chunk-FA2DYBNX.mjs} +1 -1
  58. package/dist/{chunk-CIE5NZAY.mjs → chunk-FKIOYL3D.mjs} +81 -13
  59. package/dist/{chunk-2RQLKDBF.mjs → chunk-GIZFNLKK.mjs} +103 -96
  60. package/dist/{chunk-ETF2DN4M.mjs → chunk-GLVCH422.mjs} +3 -3
  61. package/dist/chunk-GRNWRTT3.mjs +822 -0
  62. package/dist/{chunk-AOFGTNG6.mjs → chunk-HQKGZADC.mjs} +6 -1
  63. package/dist/{chunk-LBIOZZPA.mjs → chunk-HWKLNKOY.mjs} +1 -1
  64. package/dist/{chunk-LDJKJLBJ.mjs → chunk-I6E6CALJ.mjs} +14 -0
  65. package/dist/{chunk-7MM5L2ZM.mjs → chunk-IKXQEHLS.mjs} +1 -1
  66. package/dist/{chunk-NNBHHXXN.mjs → chunk-INE2QCSC.mjs} +1 -1
  67. package/dist/{chunk-7ITM2TNQ.mjs → chunk-IVZ6BMDB.mjs} +4 -3
  68. package/dist/{chunk-XMAWMECC.mjs → chunk-IW4TACOD.mjs} +1 -1
  69. package/dist/{chunk-3OHH43G6.mjs → chunk-IXZVR3HG.mjs} +1 -1
  70. package/dist/chunk-KEQOAJC2.mjs +108 -0
  71. package/dist/chunk-KX4P5L3R.mjs +127 -0
  72. package/dist/chunk-KXRW6JRE.mjs +354 -0
  73. package/dist/{chunk-W7KW2VOI.mjs → chunk-LEKWKUIS.mjs} +3 -3
  74. package/dist/{chunk-LTC6LGS4.mjs → chunk-LOAL44PP.mjs} +1 -1
  75. package/dist/chunk-MFALVTRQ.mjs +181 -0
  76. package/dist/{chunk-Q5DI5VYN.mjs → chunk-MLNUGLGT.mjs} +1 -1
  77. package/dist/{chunk-ZJ3OFMHB.mjs → chunk-MQALAB34.mjs} +1 -1
  78. package/dist/{chunk-F6IJV2I2.mjs → chunk-N4N4KGET.mjs} +1 -1
  79. package/dist/{chunk-RZD5DU5K.mjs → chunk-NDXL7ZT5.mjs} +13 -13
  80. package/dist/{chunk-BC3M3N6P.mjs → chunk-NQIC7ZFS.mjs} +2 -2
  81. package/dist/{chunk-GZBFGV7Y.mjs → chunk-OFN7DIZA.mjs} +18 -14
  82. package/dist/{chunk-PNU5HPGY.mjs → chunk-OGAZYXOV.mjs} +1 -1
  83. package/dist/{chunk-XNVMTSI7.mjs → chunk-ORMX5RJQ.mjs} +3 -3
  84. package/dist/{chunk-3NJTXRIY.mjs → chunk-OZPB6JBL.mjs} +5 -1
  85. package/dist/{chunk-FP5F2XCU.mjs → chunk-P777A4W3.mjs} +5 -5
  86. package/dist/{chunk-PWBTCXBJ.mjs → chunk-PFKKVLZX.mjs} +1 -1
  87. package/dist/{chunk-O6K7WXYN.mjs → chunk-PJ5EUKOB.mjs} +92 -43
  88. package/dist/chunk-PMA2D6IL.mjs +49 -0
  89. package/dist/{chunk-D7H6ZNK4.mjs → chunk-PRLQLEEQ.mjs} +2 -0
  90. package/dist/{chunk-5ZEHQCGN.mjs → chunk-PYIPIUAY.mjs} +55526 -34216
  91. package/dist/chunk-Q33G337Z.mjs +98 -0
  92. package/dist/{chunk-DGRTPKQC.mjs → chunk-QMRGIWOP.mjs} +1 -1
  93. package/dist/{chunk-RSYDZHZN.mjs → chunk-QXXHLVRQ.mjs} +44 -72
  94. package/dist/chunk-QZ7TP4HQ.mjs +7 -0
  95. package/dist/{chunk-G2H6MAK7.mjs → chunk-R2G2B47Y.mjs} +15 -5
  96. package/dist/chunk-R2QF6AQX.mjs +41 -0
  97. package/dist/chunk-RM6NY572.mjs +48 -0
  98. package/dist/{chunk-CVCFQMSO.mjs → chunk-S34JJVBQ.mjs} +58 -17
  99. package/dist/chunk-S4DMV3ZT.mjs +35 -0
  100. package/dist/{chunk-43EZDQEG.mjs → chunk-SC6BSTC7.mjs} +2 -2
  101. package/dist/{chunk-LU7VJVTE.mjs → chunk-SJ3E4T6B.mjs} +1 -1
  102. package/dist/{chunk-X2Y4KNQI.mjs → chunk-SNDSWB6B.mjs} +21 -9
  103. package/dist/{chunk-2MPQMCLO.mjs → chunk-TUCPFNIY.mjs} +57 -13
  104. package/dist/chunk-UC26CCHZ.mjs +45 -0
  105. package/dist/{chunk-SKR2YX52.mjs → chunk-UKX2FFFV.mjs} +2 -2
  106. package/dist/{chunk-6LA2RGO4.mjs → chunk-ULQ3V4CC.mjs} +2 -2
  107. package/dist/{chunk-UCMPRD5U.mjs → chunk-VAIHVNV6.mjs} +1 -1
  108. package/dist/chunk-VLOA5XAC.mjs +113 -0
  109. package/dist/{chunk-E46GSGZ5.mjs → chunk-VWXNC2B5.mjs} +5 -5
  110. package/dist/chunk-W77EPLUD.mjs +1141 -0
  111. package/dist/{chunk-OV5NMSY6.mjs → chunk-WATKBUHQ.mjs} +1 -1
  112. package/dist/{chunk-GE4APTT2.mjs → chunk-WEMXXZMY.mjs} +47 -36
  113. package/dist/chunk-WMOGMKQN.mjs +0 -0
  114. package/dist/{chunk-DRAV7IQC.mjs → chunk-WT5BXCPV.mjs} +76 -44
  115. package/dist/{chunk-RWU2ZKWZ.mjs → chunk-WTK7SR6S.mjs} +37 -3
  116. package/dist/{chunk-PDWBYQOW.mjs → chunk-X6BAAGCL.mjs} +1 -1
  117. package/dist/{chunk-UAZEQNCO.mjs → chunk-X6DSNTTX.mjs} +1 -1
  118. package/dist/{chunk-4UY4U2B5.mjs → chunk-XDCNT5GQ.mjs} +4 -6
  119. package/dist/{chunk-G3QXMPRB.mjs → chunk-XLDQPLK4.mjs} +8 -41
  120. package/dist/chunk-XWO5BP42.mjs +37 -0
  121. package/dist/{chunk-C2ZUHW3Z.mjs → chunk-XXROCJ7D.mjs} +191 -309
  122. package/dist/{chunk-YS65UGPC.mjs → chunk-XYHXWLTJ.mjs} +1 -1
  123. package/dist/{chunk-3XEXC5WH.mjs → chunk-Y2XQE25L.mjs} +2 -2
  124. package/dist/{tax-region-tax-override-edit-2T7PD6N3.mjs → chunk-YL4UEHO3.mjs} +52 -236
  125. package/dist/{chunk-XKXNQ2KV.mjs → chunk-ZCARHA6C.mjs} +1 -1
  126. package/dist/{chunk-PBEBKGPJ.mjs → chunk-ZUUKLYH4.mjs} +1 -1
  127. package/dist/{collection-add-products-XERJQKAX.mjs → collection-add-products-TWIDVZMU.mjs} +34 -34
  128. package/dist/collection-create-CUZFWEOB.mjs +132 -0
  129. package/dist/{collection-detail-XRN3Y3YT.mjs → collection-detail-B33WPVIW.mjs} +30 -30
  130. package/dist/{collection-edit-D7OGD4MC.mjs → collection-edit-22I7EEJG.mjs} +4 -4
  131. package/dist/{collection-list-G5PTIE4I.mjs → collection-list-DAW7WOX5.mjs} +41 -41
  132. package/dist/{collection-metadata-244B7424.mjs → collection-metadata-ZUFYY4OU.mjs} +18 -17
  133. package/dist/{customer-create-TKKVS4LF.mjs → customer-create-WCBUYT44.mjs} +2 -2
  134. package/dist/{customer-create-address-P4YQFUI5.mjs → customer-create-address-VWVIJDMK.mjs} +5 -4
  135. package/dist/{customer-detail-EW4Y5ZHT.mjs → customer-detail-ATJGSJTH.mjs} +38 -38
  136. package/dist/{customer-edit-I4K3LK66.mjs → customer-edit-FMK2AWZ5.mjs} +2 -2
  137. package/dist/{customer-group-add-customers-UJJ77G7K.mjs → customer-group-add-customers-57THRZ6D.mjs} +30 -31
  138. package/dist/{customer-group-create-5EILGGLH.mjs → customer-group-create-Y5O2CJOI.mjs} +2 -2
  139. package/dist/{customer-group-detail-WZFJPKZE.mjs → customer-group-detail-OVZIWNPP.mjs} +29 -30
  140. package/dist/{customer-group-edit-NBVNSBMX.mjs → customer-group-edit-SMVW7PHM.mjs} +2 -2
  141. package/dist/{customer-group-list-ZYLGQKOU.mjs → customer-group-list-SADXXHAE.mjs} +25 -21
  142. package/dist/{customer-group-metadata-IRTI56TA.mjs → customer-group-metadata-XJIMV7QU.mjs} +4 -3
  143. package/dist/{customer-list-3LZRV3ZM.mjs → customer-list-TE7VNBX6.mjs} +15 -16
  144. package/dist/{customer-metadata-TPIFKFIQ.mjs → customer-metadata-E32DPXXE.mjs} +4 -3
  145. package/dist/{customers-add-customer-group-F473JGOA.mjs → customers-add-customer-group-XNPZ47LK.mjs} +26 -27
  146. package/dist/{edit-inventory-item-KQUKSOGO.mjs → edit-inventory-item-5RPZHCM7.mjs} +3 -3
  147. package/dist/{edit-inventory-item-attributes-I55BRBWC.mjs → edit-inventory-item-attributes-R73ZTBYG.mjs} +6 -5
  148. package/dist/{edit-reservation-GEJHV6OI.mjs → edit-reservation-WMLAFMYU.mjs} +9 -4
  149. package/dist/{edit-rules-7MMNZKEQ.mjs → edit-rules-KV43O773.mjs} +44 -9
  150. package/dist/en.json +3219 -0
  151. package/dist/{home-KSB2J7CS.mjs → home-KFQGXKRT.mjs} +1 -1
  152. package/dist/index.d.ts +8 -3
  153. package/dist/{inventory-create-NZ67QMNB.mjs → inventory-create-NW5WSPBV.mjs} +27 -21
  154. package/dist/{inventory-detail-UBCCADB3.mjs → inventory-detail-I2CNJC6Y.mjs} +188 -191
  155. package/dist/{inventory-list-XIL665KR.mjs → inventory-list-I7IXI4KC.mjs} +11 -12
  156. package/dist/{inventory-metadata-AG5IVFBR.mjs → inventory-metadata-7XR4ON7G.mjs} +18 -17
  157. package/dist/{inventory-stock-XZWLARFE.mjs → inventory-stock-VTIDGTOY.mjs} +20 -19
  158. package/dist/{invite-3KXZ7ZZI.mjs → invite-U4I4IUOM.mjs} +1 -1
  159. package/dist/{location-create-G3CYBYOF.mjs → location-create-GZCUNYDT.mjs} +5 -4
  160. package/dist/{location-detail-GHY3DXRP.mjs → location-detail-WZM4EXFM.mjs} +24 -23
  161. package/dist/{location-edit-IMBG32Z4.mjs → location-edit-VNEMLWGR.mjs} +5 -5
  162. package/dist/{location-fulfillment-providers-ELVN5G5W.mjs → location-fulfillment-providers-F7MMM5KC.mjs} +26 -27
  163. package/dist/location-list-W6EHBBE5.mjs +323 -0
  164. package/dist/{location-sales-channels-JODORWDG.mjs → location-sales-channels-J3V26P3Q.mjs} +15 -11
  165. package/dist/{location-service-zone-create-6DZFP7Y7.mjs → location-service-zone-create-27MNMKPQ.mjs} +10 -11
  166. package/dist/{location-service-zone-edit-W3G7XOC7.mjs → location-service-zone-edit-LCBBZ2OA.mjs} +2 -2
  167. package/dist/{location-service-zone-manage-areas-EJIOVS3U.mjs → location-service-zone-manage-areas-U3EPNWSI.mjs} +10 -11
  168. package/dist/{location-service-zone-shipping-option-create-7KOH5VVW.mjs → location-service-zone-shipping-option-create-F3EQW67U.mjs} +65 -30
  169. package/dist/location-service-zone-shipping-option-edit-27MYKN7R.mjs +356 -0
  170. package/dist/{location-service-zone-shipping-option-pricing-SKUSE5YE.mjs → location-service-zone-shipping-option-pricing-GJIO4RRM.mjs} +7 -6
  171. package/dist/{login-OYY6LIPR.mjs → login-VZALGB6R.mjs} +15 -15
  172. package/dist/manage-locations-ZRCDYW5V.mjs +247 -0
  173. package/dist/{no-match-YRNHGOT3.mjs → no-match-7QRDCDCD.mjs} +1 -1
  174. package/dist/{order-allocate-items-TMQ5M7TG.mjs → order-allocate-items-MZ7Y4FU4.mjs} +53 -25
  175. package/dist/{order-create-claim-JRJNBW7N.mjs → order-create-claim-VFFKHCI6.mjs} +93 -62
  176. package/dist/{order-create-edit-IYZYZOJU.mjs → order-create-edit-7TFUOMST.mjs} +35 -35
  177. package/dist/{order-create-exchange-SWV6T3C2.mjs → order-create-exchange-CXQ5ZM3Q.mjs} +81 -64
  178. package/dist/{order-create-fulfillment-62OZHL3L.mjs → order-create-fulfillment-VTICR6OE.mjs} +111 -56
  179. package/dist/order-create-refund-RWDVIXPV.mjs +686 -0
  180. package/dist/{order-create-return-CDCLNOCB.mjs → order-create-return-AYWH3WMR.mjs} +36 -30
  181. package/dist/{order-create-shipment-REC24C7Y.mjs → order-create-shipment-2KNYEHSU.mjs} +118 -41
  182. package/dist/{order-detail-RP63TRG6.mjs → order-detail-IFXJNVTV.mjs} +895 -391
  183. package/dist/{order-edit-billing-address-XDNORAHG.mjs → order-edit-billing-address-T6BIIRAX.mjs} +20 -19
  184. package/dist/{order-edit-email-V4DC4GJV.mjs → order-edit-email-SLUOGWRO.mjs} +17 -17
  185. package/dist/{order-edit-shipping-address-NWT5LDKC.mjs → order-edit-shipping-address-YUES5K5Q.mjs} +20 -19
  186. package/dist/order-list-4N3OV2PU.mjs +283 -0
  187. package/dist/{order-metadata-4YNV2NWH.mjs → order-metadata-HS33MC6S.mjs} +18 -17
  188. package/dist/{order-receive-return-AXAZNUIB.mjs → order-receive-return-E6BGSZVL.mjs} +21 -20
  189. package/dist/{order-request-transfer-OZNQQL3N.mjs → order-request-transfer-7IIDQ37I.mjs} +19 -19
  190. package/dist/{price-list-configuration-QDADAJXD.mjs → price-list-configuration-4XY4JW4I.mjs} +13 -14
  191. package/dist/{price-list-create-7HYQ5R7R.mjs → price-list-create-VFQVCUWV.mjs} +58 -44
  192. package/dist/{price-list-detail-DWUY4NRM.mjs → price-list-detail-32UKOWNW.mjs} +33 -33
  193. package/dist/{price-list-edit-TMZCXEFR.mjs → price-list-edit-GXDLVOU4.mjs} +53 -33
  194. package/dist/{price-list-list-C53HAXU7.mjs → price-list-list-TKXSU27S.mjs} +13 -14
  195. package/dist/{price-list-prices-add-PGOF7G5W.mjs → price-list-prices-add-AY75YZ7D.mjs} +44 -36
  196. package/dist/{price-list-prices-edit-JUS5FBBN.mjs → price-list-prices-edit-J7HCNDTO.mjs} +8 -7
  197. package/dist/{product-attributes-GKM272E2.mjs → product-attributes-3GCAY7KW.mjs} +37 -29
  198. package/dist/{product-create-6IIIZWTB.mjs → product-create-4TD7FQC7.mjs} +205 -179
  199. package/dist/{product-create-option-E2GRTBWP.mjs → product-create-option-D2636LJL.mjs} +3 -3
  200. package/dist/{product-create-variant-3B32EC76.mjs → product-create-variant-ZWY57BX7.mjs} +38 -25
  201. package/dist/{product-detail-KCPBP53S.mjs → product-detail-J7T7MNUY.mjs} +74 -64
  202. package/dist/{product-edit-PBISK6ZJ.mjs → product-edit-MJ7VAIVY.mjs} +50 -36
  203. package/dist/{product-edit-option-RHMF3YKT.mjs → product-edit-option-DYAFZIT2.mjs} +3 -3
  204. package/dist/{product-export-KJXAVIZ3.mjs → product-export-X64NQWTS.mjs} +47 -37
  205. package/dist/product-image-variants-edit-J6A5G4AC.mjs +327 -0
  206. package/dist/{product-import-JCEJKM3F.mjs → product-import-HDNC36SM.mjs} +25 -25
  207. package/dist/product-list-E7HS4SBG.mjs +445 -0
  208. package/dist/{product-media-34NDO6DC.mjs → product-media-Z3NNTB7H.mjs} +10 -11
  209. package/dist/{product-metadata-PQQ7XV63.mjs → product-metadata-LMDEXR3V.mjs} +18 -17
  210. package/dist/{product-organization-QZ5AXVG5.mjs → product-organization-263TICCI.mjs} +30 -27
  211. package/dist/{product-prices-BBTCM3XR.mjs → product-prices-MCZYVPQW.mjs} +6 -5
  212. package/dist/{product-sales-channels-5L64AKRQ.mjs → product-sales-channels-RHZQXWAY.mjs} +14 -10
  213. package/dist/{product-shipping-profile-Z2MVNVBT.mjs → product-shipping-profile-GVTR3MHD.mjs} +29 -26
  214. package/dist/{product-stock-TZS75EG7.mjs → product-stock-O2BH5R45.mjs} +22 -20
  215. package/dist/{product-tag-create-LE4MZ5BW.mjs → product-tag-create-GOJTE5XA.mjs} +16 -16
  216. package/dist/{product-tag-detail-LQFUS6IU.mjs → product-tag-detail-CK5F4DU3.mjs} +56 -54
  217. package/dist/{product-tag-edit-E6WEFNFQ.mjs → product-tag-edit-IT4GHLSO.mjs} +16 -16
  218. package/dist/{product-tag-list-DASW6YQO.mjs → product-tag-list-VNROS2W3.mjs} +55 -54
  219. package/dist/product-tag-metadata-QV2BOGP2.mjs +70 -0
  220. package/dist/{product-type-create-GU5IYXQB.mjs → product-type-create-AHVZETDR.mjs} +2 -2
  221. package/dist/{product-type-detail-VLOGXH6T.mjs → product-type-detail-7K5RLART.mjs} +30 -30
  222. package/dist/{product-type-edit-S53VUBU3.mjs → product-type-edit-2RGFBZPK.mjs} +2 -2
  223. package/dist/{product-type-list-A36X6L73.mjs → product-type-list-2ZQ2NE3R.mjs} +15 -16
  224. package/dist/product-type-metadata-5TDBJGNQ.mjs +70 -0
  225. package/dist/{product-variant-detail-HKNUYNS5.mjs → product-variant-detail-3SO2MX22.mjs} +111 -53
  226. package/dist/{product-variant-edit-G6AM27AT.mjs → product-variant-edit-DW27AYBX.mjs} +24 -19
  227. package/dist/product-variant-manage-inventory-items-T5OB3YX3.mjs +341 -0
  228. package/dist/product-variant-media-PHRCKUDK.mjs +374 -0
  229. package/dist/{product-variant-metadata-2V27ZMDS.mjs → product-variant-metadata-4KJE6B2R.mjs} +18 -17
  230. package/dist/{profile-detail-4HQ3RK2U.mjs → profile-detail-UTJBWZSA.mjs} +5 -4
  231. package/dist/{profile-edit-VZPQ4NSH.mjs → profile-edit-OOYMTKX6.mjs} +34 -22
  232. package/dist/{promotion-add-campaign-4VNRQF52.mjs → promotion-add-campaign-XJB2ZKZ3.mjs} +12 -24
  233. package/dist/{promotion-create-PLDWDZMZ.mjs → promotion-create-F27AOTVZ.mjs} +258 -93
  234. package/dist/{promotion-detail-DKYNPGDK.mjs → promotion-detail-ZDINJASC.mjs} +146 -87
  235. package/dist/promotion-edit-details-JMZ77QJ4.mjs +496 -0
  236. package/dist/{promotion-list-AGVOXS5Q.mjs → promotion-list-MN6YJCYA.mjs} +15 -16
  237. package/dist/refund-reason-create-5ATQ2IPU.mjs +192 -0
  238. package/dist/refund-reason-edit-F7AMOTG3.mjs +192 -0
  239. package/dist/refund-reason-list-SFTHVSPC.mjs +244 -0
  240. package/dist/{region-add-countries-DGMSV27N.mjs → region-add-countries-KGFPZSRE.mjs} +15 -15
  241. package/dist/{region-create-NQLVPGUT.mjs → region-create-YJJRTAYO.mjs} +62 -53
  242. package/dist/{region-detail-BBK4KAZ5.mjs → region-detail-ERE4ZF2I.mjs} +10 -11
  243. package/dist/region-edit-QCN7SMR5.mjs +308 -0
  244. package/dist/{region-list-F7I4UPZS.mjs → region-list-W55C3CTH.mjs} +15 -16
  245. package/dist/{region-metadata-4S6FEUXA.mjs → region-metadata-CRAHVHOC.mjs} +18 -17
  246. package/dist/{reservation-create-INUIVD55.mjs → reservation-create-YZMZ6HSS.mjs} +5 -5
  247. package/dist/{reservation-detail-QKUCAH7D.mjs → reservation-detail-6MCBQZAE.mjs} +19 -18
  248. package/dist/{reservation-list-NAYFTRNY.mjs → reservation-list-IEUC3KXK.mjs} +15 -15
  249. package/dist/{reservation-metadata-5ZABNMJP.mjs → reservation-metadata-IQNJPNAX.mjs} +18 -17
  250. package/dist/{reset-password-HHFO6CDI.mjs → reset-password-CUEG23GU.mjs} +3 -2
  251. package/dist/{return-reason-create-YANSYS43.mjs → return-reason-create-45IARQ5L.mjs} +2 -2
  252. package/dist/{return-reason-edit-4FSM4H3M.mjs → return-reason-edit-5FIOEJ5Y.mjs} +2 -2
  253. package/dist/{return-reason-list-YQP7NEIY.mjs → return-reason-list-CBOVMQZF.mjs} +37 -36
  254. package/dist/{sales-channel-add-products-ACYP5CUR.mjs → sales-channel-add-products-7RKUDBXN.mjs} +29 -29
  255. package/dist/{sales-channel-create-HVZPII6E.mjs → sales-channel-create-7ISLGNGC.mjs} +6 -4
  256. package/dist/{sales-channel-detail-UFL3EW5W.mjs → sales-channel-detail-TKVVIAS5.mjs} +30 -30
  257. package/dist/{sales-channel-edit-BK7O3ZFI.mjs → sales-channel-edit-2PEHGAWF.mjs} +6 -4
  258. package/dist/{sales-channel-list-2EDYVY5Y.mjs → sales-channel-list-SI7JVBOI.mjs} +25 -22
  259. package/dist/{sales-channel-metadata-UH4QYASI.mjs → sales-channel-metadata-ZOCPAIGM.mjs} +18 -17
  260. package/dist/{settings-FQUPXMWF.mjs → settings-FKUZ6EYT.mjs} +1 -1
  261. package/dist/shipping-option-type-create-YR2QV2OG.mjs +195 -0
  262. package/dist/shipping-option-type-detail-TYHGCV2X.mjs +178 -0
  263. package/dist/shipping-option-type-edit-6KL3MHVT.mjs +193 -0
  264. package/dist/shipping-option-type-list-YPCCUVFZ.mjs +277 -0
  265. package/dist/{shipping-profile-create-PBDONCGJ.mjs → shipping-profile-create-372EMPUI.mjs} +2 -2
  266. package/dist/{shipping-profile-detail-EORJZ7NX.mjs → shipping-profile-detail-MRXUOUXK.mjs} +4 -3
  267. package/dist/{shipping-profile-metadata-UB73OBPJ.mjs → shipping-profile-metadata-A33XKBQN.mjs} +18 -17
  268. package/dist/{shipping-profiles-list-EFGYH4OS.mjs → shipping-profiles-list-KYYSHLSZ.mjs} +9 -10
  269. package/dist/{store-add-currencies-2OBWTWKT.mjs → store-add-currencies-SNSW7A6O.mjs} +11 -10
  270. package/dist/{store-detail-U5HON77R.mjs → store-detail-3ZV7FCPV.mjs} +24 -25
  271. package/dist/{store-edit-JNSWFWIG.mjs → store-edit-FNKVB3UA.mjs} +29 -17
  272. package/dist/{store-metadata-GLAZZPP6.mjs → store-metadata-LMRFCZ3J.mjs} +18 -17
  273. package/dist/{tax-region-create-EW5USMNY.mjs → tax-region-create-5Y6EA7XE.mjs} +103 -36
  274. package/dist/{tax-region-detail-MVSV7BWW.mjs → tax-region-detail-TTYUBJ3V.mjs} +107 -40
  275. package/dist/tax-region-edit-IKEWHRUK.mjs +163 -0
  276. package/dist/{tax-region-list-FNVPRMTQ.mjs → tax-region-list-HQMSVGDD.mjs} +12 -11
  277. package/dist/{tax-region-province-create-LQ5SPSXW.mjs → tax-region-province-create-6GZCPPGW.mjs} +35 -53
  278. package/dist/{tax-region-province-detail-4G2WUUBB.mjs → tax-region-province-detail-YCY56CRL.mjs} +81 -28
  279. package/dist/{tax-region-tax-override-create-EXGXVKBR.mjs → tax-region-tax-override-create-R3PNDP43.mjs} +90 -61
  280. package/dist/tax-region-tax-override-edit-QLD7MIQY.mjs +270 -0
  281. package/dist/{tax-region-tax-rate-create-7GNLSDJ2.mjs → tax-region-tax-rate-create-TJLSRCEC.mjs} +7 -6
  282. package/dist/{tax-region-tax-rate-edit-6U2BQMIE.mjs → tax-region-tax-rate-edit-DEKCUURK.mjs} +7 -6
  283. package/dist/{user-detail-X2Z2IYNI.mjs → user-detail-DFZPKHG2.mjs} +5 -4
  284. package/dist/{user-edit-HFSJM4QT.mjs → user-edit-NFRTYOKO.mjs} +2 -2
  285. package/dist/{user-invite-3V3ZTOJS.mjs → user-invite-FQNKJKMD.mjs} +14 -20
  286. package/dist/{user-list-35TJ53CP.mjs → user-list-6EVTLPJE.mjs} +15 -10
  287. package/dist/{user-metadata-GJ6PIXLU.mjs → user-metadata-BQKW4WAU.mjs} +18 -17
  288. package/dist/{workflow-execution-detail-D26MDYFC.mjs → workflow-execution-detail-D5QUZFTV.mjs} +21 -17
  289. package/dist/{workflow-execution-list-FKIKX7HK.mjs → workflow-execution-list-JOVBPL45.mjs} +8 -9
  290. package/package.json +25 -32
  291. package/src/app.tsx +2 -0
  292. package/src/components/common/action-menu/action-menu.tsx +3 -1
  293. package/src/components/common/customer-info/customer-info.tsx +1 -1
  294. package/src/components/common/infinite-list/infinite-list.tsx +8 -2
  295. package/src/components/common/json-view-section/json-view-section.tsx +4 -1
  296. package/src/components/common/sidebar-link/sidebar-link.tsx +1 -1
  297. package/src/components/common/switch-box/switch-box.tsx +2 -0
  298. package/src/components/data-grid/components/data-grid-root.tsx +9 -3
  299. package/src/components/data-grid/components/data-grid-toggleable-number-cell.tsx +2 -1
  300. package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +6 -5
  301. package/src/components/data-table/data-table.tsx +171 -56
  302. package/src/components/filtering/filter-group/filter-group.tsx +5 -1
  303. package/src/components/filtering/order-by/order-by.tsx +4 -1
  304. package/src/components/filtering/query/query.tsx +1 -1
  305. package/src/components/forms/address-form/address-form.tsx +7 -2
  306. package/src/components/forms/metadata-form/metadata-form.tsx +6 -3
  307. package/src/components/inputs/combobox/combobox.tsx +21 -14
  308. package/src/components/inputs/country-select/country-select.tsx +37 -62
  309. package/src/components/inputs/percentage-input/percentage-input.tsx +67 -37
  310. package/src/components/inputs/province-select/province-select.tsx +42 -62
  311. package/src/components/layout/main-layout/main-layout.tsx +7 -5
  312. package/src/components/layout/settings-layout/settings-layout.tsx +4 -0
  313. package/src/components/layout/shell/shell.tsx +6 -6
  314. package/src/components/layout/user-menu/user-menu.tsx +12 -10
  315. package/src/components/modals/hooks/use-state-aware-to.tsx +10 -4
  316. package/src/components/modals/route-modal-form/route-modal-form.tsx +6 -6
  317. package/src/components/search/search.tsx +5 -3
  318. package/src/components/search/use-search-results.tsx +1 -1
  319. package/src/components/table/configurable-data-table/configurable-data-table.tsx +240 -0
  320. package/src/components/table/configurable-data-table/index.ts +3 -0
  321. package/src/components/table/configurable-data-table/save-view-dropdown.tsx +87 -0
  322. package/src/components/table/data-table/data-table-filter/date-filter.tsx +22 -4
  323. package/src/components/table/data-table/data-table-filter/number-filter.tsx +1 -1
  324. package/src/components/table/data-table/data-table-filter/string-filter.tsx +1 -1
  325. package/src/components/table/data-table/data-table-order-by/data-table-order-by.tsx +4 -1
  326. package/src/components/table/data-table/data-table-root/data-table-root.tsx +3 -3
  327. package/src/components/table/data-table/data-table-search/data-table-search.tsx +1 -1
  328. package/src/components/table/save-view-dialog/index.ts +1 -0
  329. package/src/components/table/save-view-dialog/save-view-dialog.tsx +163 -0
  330. package/src/components/table/save-view-dropdown/index.ts +1 -0
  331. package/src/components/table/save-view-dropdown/save-view-dropdown.tsx +88 -0
  332. package/src/components/table/view-selector/index.ts +2 -0
  333. package/src/components/table/view-selector/view-pills.tsx +265 -0
  334. package/src/components/table/view-selector/view-selector.tsx +253 -0
  335. package/src/components/utilities/i18n/i18n.tsx +9 -1
  336. package/src/dashboard-app/dashboard-app.tsx +22 -0
  337. package/src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx +1 -1
  338. package/src/dashboard-app/routes/get-route.map.tsx +124 -1
  339. package/src/dashboard-app/types.ts +7 -0
  340. package/src/hooks/api/campaigns.tsx +1 -0
  341. package/src/hooks/api/feature-flags.tsx +22 -0
  342. package/src/hooks/api/index.ts +3 -0
  343. package/src/hooks/api/inventory.tsx +7 -1
  344. package/src/hooks/api/orders.tsx +61 -1
  345. package/src/hooks/api/payments.tsx +6 -1
  346. package/src/hooks/api/plugins.tsx +28 -0
  347. package/src/hooks/api/products.tsx +55 -1
  348. package/src/hooks/api/promotions.tsx +17 -3
  349. package/src/hooks/api/refund-reasons.tsx +105 -10
  350. package/src/hooks/api/shipping-option-types.tsx +128 -0
  351. package/src/hooks/api/tax-regions.tsx +24 -0
  352. package/src/hooks/api/views.tsx +244 -0
  353. package/src/hooks/table/columns/index.ts +1 -0
  354. package/src/hooks/table/columns/use-column-state.ts +209 -0
  355. package/src/hooks/table/columns/use-configurable-table-columns.tsx +109 -0
  356. package/src/hooks/table/columns/use-order-data-table-columns.tsx +234 -0
  357. package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +39 -0
  358. package/src/hooks/table/columns/use-shipping-option-table-columns.tsx +89 -0
  359. package/src/hooks/table/columns/use-shipping-option-type-table-columns.tsx +44 -0
  360. package/src/hooks/table/filters/use-product-table-filters.tsx +3 -0
  361. package/src/hooks/table/filters/use-shipping-option-table-filters.tsx +10 -19
  362. package/src/hooks/table/filters/use-shipping-option-type-table-filters.tsx +5 -0
  363. package/src/hooks/table/query/index.ts +1 -0
  364. package/src/hooks/table/query/use-order-table-query.tsx +1 -1
  365. package/src/hooks/table/query/use-product-variant-table-query.tsx +32 -0
  366. package/src/hooks/table/query/use-promotion-table-query.tsx +3 -2
  367. package/src/hooks/table/query/use-refund-reason-table-query.tsx +32 -0
  368. package/src/hooks/table/query/use-shipping-option-table-query.tsx +16 -4
  369. package/src/hooks/table/query/use-shipping-option-type-table-query.tsx +32 -0
  370. package/src/hooks/table/use-table-configuration.tsx +287 -0
  371. package/src/hooks/use-combobox-data.tsx +27 -3
  372. package/src/hooks/use-debounced-search.tsx +1 -1
  373. package/src/hooks/use-document-direction.tsx +54 -0
  374. package/src/hooks/use-view-configurations.tsx +102 -0
  375. package/src/i18n/config.ts +2 -5
  376. package/src/i18n/languages.ts +35 -0
  377. package/src/i18n/translations/$schema.json +818 -33
  378. package/src/i18n/translations/ar.json +8 -4
  379. package/src/i18n/translations/bg.json +8 -4
  380. package/src/i18n/translations/bs.json +3016 -0
  381. package/src/i18n/translations/cs.json +136 -14
  382. package/src/i18n/translations/de.json +42 -38
  383. package/src/i18n/translations/el.json +8 -4
  384. package/src/i18n/translations/en.json +239 -25
  385. package/src/i18n/translations/es.json +344 -28
  386. package/src/i18n/translations/fa.json +8 -4
  387. package/src/i18n/translations/fr.json +8 -4
  388. package/src/i18n/translations/he.json +3017 -0
  389. package/src/i18n/translations/hu.json +3005 -0
  390. package/src/i18n/translations/id.json +3020 -0
  391. package/src/i18n/translations/index.ts +20 -1
  392. package/src/i18n/translations/it.json +8 -4
  393. package/src/i18n/translations/ja.json +8 -4
  394. package/src/i18n/translations/ko.json +234 -212
  395. package/src/i18n/translations/lt.json +8 -4
  396. package/src/i18n/translations/mk.json +8 -4
  397. package/src/i18n/translations/mn.json +8 -4
  398. package/src/i18n/translations/nl.json +3005 -0
  399. package/src/i18n/translations/pl.json +149 -30
  400. package/src/i18n/translations/ptBR.json +8 -4
  401. package/src/i18n/translations/ro.json +8 -4
  402. package/src/i18n/translations/ru.json +8 -4
  403. package/src/i18n/translations/th.json +8 -4
  404. package/src/i18n/translations/tr.json +8 -4
  405. package/src/i18n/translations/uk.json +8 -4
  406. package/src/i18n/translations/vi.json +56 -8
  407. package/src/i18n/translations/zhCN.json +106 -17
  408. package/src/lib/common.ts +13 -0
  409. package/src/lib/credit-line.ts +8 -0
  410. package/src/lib/data/countries.ts +7 -7
  411. package/src/lib/data/country-states.ts +9 -0
  412. package/src/lib/data/currencies.ts +18 -0
  413. package/src/lib/format-currency.ts +1 -1
  414. package/src/lib/number-helper.ts +19 -0
  415. package/src/lib/orders.ts +23 -0
  416. package/src/lib/percentage-helpers.ts +1 -0
  417. package/src/lib/plugins.ts +7 -0
  418. package/src/lib/promotions.ts +3 -1
  419. package/src/lib/shipping-options.ts +43 -0
  420. package/src/lib/table/cell-renderers.tsx +313 -0
  421. package/src/lib/table/entity-adapters.tsx +138 -0
  422. package/src/lib/table/entity-defaults.ts +73 -0
  423. package/src/lib/table/field-utils.ts +75 -0
  424. package/src/lib/table/table-adapters.ts +94 -0
  425. package/src/lib/table-display-utils.tsx +372 -0
  426. package/src/module.d.ts +6 -0
  427. package/src/providers/feature-flag-provider/index.tsx +46 -0
  428. package/src/providers/i18n-provider/i18n-provider.tsx +9 -4
  429. package/src/providers/keybind-provider/hooks.tsx +1 -1
  430. package/src/providers/providers.tsx +6 -4
  431. package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +1 -0
  432. package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/api-key-management-list-table.tsx +1 -1
  433. package/src/routes/campaigns/campaign-create/components/create-campaign-form/create-campaign-form.tsx +8 -2
  434. package/src/routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +20 -9
  435. package/src/routes/campaigns/campaign-detail/components/campaign-spend/campaign-spend.tsx +6 -4
  436. package/src/routes/campaigns/campaign-list/components/campaign-list-table.tsx +1 -1
  437. package/src/routes/campaigns/common/components/create-campaign-form-fields/create-campaign-form-fields.tsx +61 -6
  438. package/src/routes/campaigns/common/constants.ts +1 -0
  439. package/src/routes/categories/category-create/components/create-category-form/create-category-details.tsx +12 -3
  440. package/src/routes/categories/category-create/components/create-category-form/create-category-form.tsx +4 -3
  441. package/src/routes/categories/category-detail/components/category-organize-section/category-organize-section.tsx +1 -1
  442. package/src/routes/categories/category-edit/components/edit-category-form/edit-category-form.tsx +12 -3
  443. package/src/routes/categories/category-products/components/edit-category-products-form/edit-category-products-form.tsx +10 -8
  444. package/src/routes/collections/collection-add-products/components/add-products-to-collection-form/add-products-to-collection-form.tsx +10 -8
  445. package/src/routes/collections/collection-create/components/create-collection-form/create-collection-form.tsx +22 -19
  446. package/src/routes/customer-groups/customer-group-add-customers/components/add-customers-form/add-customers-form.tsx +16 -14
  447. package/src/routes/inventory/inventory-create/components/inventory-create-form/inventory-create-form.tsx +3 -1
  448. package/src/routes/inventory/inventory-detail/components/inventory-item-location-levels.tsx +1 -1
  449. package/src/routes/inventory/inventory-detail/components/inventory-item-reservations.tsx +1 -1
  450. package/src/routes/inventory/inventory-detail/components/inventory-item-variants/variants-section.tsx +1 -1
  451. package/src/routes/inventory/inventory-detail/components/location-levels-table/location-list-table.tsx +12 -18
  452. package/src/routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-columns.tsx +79 -6
  453. package/src/routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-query.tsx +9 -21
  454. package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-item.tsx +2 -2
  455. package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-search-input.tsx +34 -0
  456. package/src/routes/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx +127 -140
  457. package/src/routes/locations/common/components/conditional-price-form/conditional-price-form.tsx +1 -1
  458. package/src/routes/locations/location-edit/components/edit-location-form/edit-location-form.tsx +2 -3
  459. package/src/routes/locations/location-list/index.ts +0 -1
  460. package/src/routes/locations/location-list/location-list.tsx +61 -15
  461. package/src/routes/locations/location-list/use-location-list-table-columns.tsx +185 -0
  462. package/src/routes/locations/location-list/use-location-list-table-query.tsx +22 -0
  463. package/src/routes/locations/location-sales-channels/components/edit-sales-channels-form/edit-sales-channels-form.tsx +1 -1
  464. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-option-details-form.tsx +40 -5
  465. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-form.tsx +4 -7
  466. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/schema.ts +1 -0
  467. package/src/routes/locations/location-service-zone-shipping-option-edit/components/edit-region-form/edit-shipping-option-form.tsx +84 -4
  468. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-form.tsx +28 -11
  469. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-item.tsx +2 -2
  470. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/utils.ts +28 -0
  471. package/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/index.ts +1 -0
  472. package/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx +396 -0
  473. package/src/routes/orders/order-balance-settlement/index.ts +1 -0
  474. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-create-form.tsx +49 -18
  475. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-outbound-item.tsx +1 -1
  476. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-outbound-section.tsx +7 -10
  477. package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-create-form.tsx +2 -1
  478. package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx +1 -1
  479. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-create-form.tsx +38 -16
  480. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-item.tsx +1 -1
  481. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-section.tsx +7 -10
  482. package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-form.tsx +32 -30
  483. package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-item.tsx +71 -16
  484. package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +122 -79
  485. package/src/routes/orders/order-create-refund/order-create-refund.tsx +7 -14
  486. package/src/routes/orders/order-create-return/components/return-create-form/return-create-form.tsx +16 -9
  487. package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/order-create-shipment-form.tsx +108 -44
  488. package/src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +20 -12
  489. package/src/routes/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx +30 -13
  490. package/src/routes/orders/order-detail/components/order-payment-section/order-payment-section.tsx +104 -16
  491. package/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +270 -116
  492. package/src/routes/orders/order-detail/constants.ts +11 -1
  493. package/src/routes/orders/order-detail/order-detail.tsx +4 -2
  494. package/src/routes/orders/order-list/components/order-list-table/components/save-view-dropdown.tsx +81 -0
  495. package/src/routes/orders/order-list/components/order-list-table/configurable-order-list-table.tsx +16 -0
  496. package/src/routes/orders/order-list/components/order-list-table/constants.ts +14 -0
  497. package/src/routes/orders/order-list/components/order-list-table/hooks/use-order-data-table-columns.tsx +153 -0
  498. package/src/routes/orders/order-list/components/order-list-table/order-list-table.tsx +10 -1
  499. package/src/routes/orders/order-list/components/order-list-table/order-table-adapter.tsx +68 -0
  500. package/src/routes/orders/order-list/components/order-list-table/use-order-table-filters.tsx +62 -0
  501. package/src/routes/orders/order-list/const.ts +2 -2
  502. package/src/routes/orders/order-receive-return/components/order-receive-return-form/order-receive-return-form.tsx +2 -1
  503. package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-create-form.tsx +3 -1
  504. package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-details-form.tsx +8 -2
  505. package/src/routes/price-lists/price-list-detail/components/price-list-product-section/price-list-product-section.tsx +1 -1
  506. package/src/routes/price-lists/price-list-edit/components/price-list-edit-form/edit-price-list-form.tsx +12 -3
  507. package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-form.tsx +10 -5
  508. package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-product-ids-form.tsx +1 -0
  509. package/src/routes/product-tags/product-tag-detail/product-tag-detail.tsx +1 -0
  510. package/src/routes/product-tags/product-tag-metadata/index.ts +1 -0
  511. package/src/routes/product-tags/product-tag-metadata/product-tag-metadata.tsx +26 -0
  512. package/src/routes/product-types/product-type-metadata/index.ts +1 -0
  513. package/src/routes/product-types/product-type-metadata/product-type-metadata.tsx +26 -0
  514. package/src/routes/product-variants/product-variant-detail/components/variant-media-section/index.ts +1 -0
  515. package/src/routes/product-variants/product-variant-detail/components/variant-media-section/variant-media-section.tsx +77 -0
  516. package/src/routes/product-variants/product-variant-detail/constants.ts +1 -1
  517. package/src/routes/product-variants/product-variant-detail/product-variant-detail.tsx +2 -0
  518. package/src/routes/product-variants/product-variant-edit/components/product-edit-variant-form/product-edit-variant-form.tsx +4 -0
  519. package/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/manage-variant-inventory-items-form.tsx +183 -115
  520. package/src/routes/product-variants/product-variant-media/components/edit-product-variant-media-form/edit-product-variant-media-form.tsx +434 -0
  521. package/src/routes/product-variants/product-variant-media/components/edit-product-variant-media-form/index.ts +1 -0
  522. package/src/routes/product-variants/product-variant-media/index.ts +1 -0
  523. package/src/routes/product-variants/product-variant-media/product-variant-media.tsx +38 -0
  524. package/src/routes/products/common/components/category-combobox/category-combobox.tsx +11 -11
  525. package/src/routes/products/product-attributes/components/product-attributes-form/product-attributes-form.tsx +8 -4
  526. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +4 -4
  527. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +23 -30
  528. package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +3 -1
  529. package/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx +148 -109
  530. package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx +1 -1
  531. package/src/routes/products/product-create-variant/components/create-product-variant-form/create-product-variant-form.tsx +10 -5
  532. package/src/routes/products/product-create-variant/components/create-product-variant-form/details-tab.tsx +6 -1
  533. package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +6 -1
  534. package/src/routes/products/product-detail/components/product-media-section/product-media-section.tsx +15 -3
  535. package/src/routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +21 -28
  536. package/src/routes/products/product-edit/components/edit-product-form/edit-product-form.tsx +7 -2
  537. package/src/routes/products/product-export/product-export.tsx +15 -15
  538. package/src/routes/products/product-image-variants-edit/components/variants-table-form/index.ts +1 -0
  539. package/src/routes/products/product-image-variants-edit/components/variants-table-form/variants-table-form.tsx +264 -0
  540. package/src/routes/products/product-image-variants-edit/index.ts +1 -0
  541. package/src/routes/products/product-image-variants-edit/product-image-variants-edit.tsx +61 -0
  542. package/src/routes/products/product-import/helpers/import-template.ts +6 -7
  543. package/src/routes/products/product-list/components/product-list-table/configurable-product-list-table.tsx +26 -0
  544. package/src/routes/products/product-list/components/product-list-table/product-list-table.tsx +10 -2
  545. package/src/routes/products/product-list/components/product-list-table/product-table-adapter.tsx +51 -0
  546. package/src/routes/products/product-list/components/product-list-table/use-product-table-filters.tsx +104 -0
  547. package/src/routes/products/product-media/components/edit-product-media-form/edit-product-media-form.tsx +1 -0
  548. package/src/routes/products/product-media/components/product-media-gallery/product-media-gallery.tsx +3 -3
  549. package/src/routes/products/product-stock/hooks/use-product-stock-columns.tsx +2 -1
  550. package/src/routes/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx +9 -3
  551. package/src/routes/promotions/common/edit-rules/components/edit-rules-form/edit-rules-form.tsx +8 -1
  552. package/src/routes/promotions/common/edit-rules/components/edit-rules-form/form-schema.ts +3 -0
  553. package/src/routes/promotions/common/edit-rules/components/rule-value-form-field/rule-value-form-field.tsx +36 -5
  554. package/src/routes/promotions/common/edit-rules/components/rules-form-field/rules-form-field.tsx +59 -8
  555. package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/add-campaign-promotion-form.tsx +48 -49
  556. package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/campaign-details.tsx +29 -2
  557. package/src/routes/promotions/promotion-add-campaign/promotion-add-campaign.tsx +4 -21
  558. package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +195 -80
  559. package/src/routes/promotions/promotion-create/components/create-promotion-form/form-schema.ts +5 -3
  560. package/src/routes/promotions/promotion-create/components/create-promotion-form/templates.ts +56 -5
  561. package/src/routes/promotions/promotion-detail/components/promotion-conditions-section/promotion-conditions-section.tsx +9 -3
  562. package/src/routes/promotions/promotion-detail/components/promotion-general-section/promotion-general-section.tsx +16 -0
  563. package/src/routes/promotions/promotion-detail/promotion-detail.tsx +4 -0
  564. package/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/edit-promotion-details-form.tsx +242 -122
  565. package/src/routes/promotions/promotion-list/components/promotion-list-table/promotion-list-table.tsx +1 -1
  566. package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/index.ts +1 -0
  567. package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/refund-reason-create-form.tsx +177 -0
  568. package/src/routes/refund-reasons/refund-reason-create/index.ts +1 -0
  569. package/src/routes/refund-reasons/refund-reason-create/refund-reason-create.tsx +10 -0
  570. package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/index.ts +1 -0
  571. package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/refund-reason-edit-form.tsx +141 -0
  572. package/src/routes/refund-reasons/refund-reason-edit/index.ts +1 -0
  573. package/src/routes/refund-reasons/refund-reason-edit/refund-reason-edit.tsx +33 -0
  574. package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/index.ts +1 -0
  575. package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +138 -0
  576. package/src/routes/refund-reasons/refund-reason-list/index.ts +2 -0
  577. package/src/routes/refund-reasons/refund-reason-list/loader.ts +16 -0
  578. package/src/routes/refund-reasons/refund-reason-list/refund-reason-list.tsx +21 -0
  579. package/src/routes/regions/region-add-countries/components/add-countries-form/add-countries-form.tsx +12 -12
  580. package/src/routes/regions/region-create/components/create-region-form/create-region-form.tsx +40 -24
  581. package/src/routes/regions/region-create/region-create.tsx +1 -10
  582. package/src/routes/regions/region-edit/components/edit-region-form/edit-region-form.tsx +33 -11
  583. package/src/routes/regions/region-edit/region-edit.tsx +0 -5
  584. package/src/routes/reservations/reservation-detail/components/edit-reservation/components/edit-reservation-form.tsx +3 -1
  585. package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-query.tsx +2 -1
  586. package/src/routes/sales-channels/sales-channel-create/components/create-sales-channel-form/create-sales-channel-form.tsx +2 -0
  587. package/src/routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/edit-sales-channel-form.tsx +2 -0
  588. package/src/routes/shipping-option-types/common/hooks/use-delete-shipping-option-type-action.tsx +43 -0
  589. package/src/routes/shipping-option-types/shipping-option-type-create/components/create-shipping-option-type-form/create-shipping-option-type-form.tsx +168 -0
  590. package/src/routes/shipping-option-types/shipping-option-type-create/components/create-shipping-option-type-form/index.ts +1 -0
  591. package/src/routes/shipping-option-types/shipping-option-type-create/index.ts +1 -0
  592. package/src/routes/shipping-option-types/shipping-option-type-create/shipping-option-type-create.tsx +10 -0
  593. package/src/routes/shipping-option-types/shipping-option-type-detail/breadcrumb.tsx +24 -0
  594. package/src/routes/shipping-option-types/shipping-option-type-detail/components/shipping-option-type-general-section/index.ts +1 -0
  595. package/src/routes/shipping-option-types/shipping-option-type-detail/components/shipping-option-type-general-section/shipping-option-type-general-section.tsx +66 -0
  596. package/src/routes/shipping-option-types/shipping-option-type-detail/index.ts +3 -0
  597. package/src/routes/shipping-option-types/shipping-option-type-detail/loader.ts +19 -0
  598. package/src/routes/shipping-option-types/shipping-option-type-detail/shipping-option-type-detail.tsx +46 -0
  599. package/src/routes/shipping-option-types/shipping-option-type-edit/components/edit-shipping-option-type-form/edit-shipping-option-type-form.tsx +145 -0
  600. package/src/routes/shipping-option-types/shipping-option-type-edit/components/edit-shipping-option-type-form/index.ts +1 -0
  601. package/src/routes/shipping-option-types/shipping-option-type-edit/index.ts +1 -0
  602. package/src/routes/shipping-option-types/shipping-option-type-edit/shipping-option-type-edit.tsx +31 -0
  603. package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/index.ts +1 -0
  604. package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/shipping-option-type-list-table.tsx +99 -0
  605. package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/shipping-option-type-table-row-actions.tsx +44 -0
  606. package/src/routes/shipping-option-types/shipping-option-type-list/index.ts +1 -0
  607. package/src/routes/shipping-option-types/shipping-option-type-list/shipping-option-type-list.tsx +18 -0
  608. package/src/routes/store/store-add-currencies/components/add-currencies-form/add-currencies-form.tsx +2 -0
  609. package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +9 -4
  610. package/src/routes/tax-regions/common/components/target-form/target-form.tsx +157 -6
  611. package/src/routes/tax-regions/common/components/target-item/target-item.tsx +15 -2
  612. package/src/routes/tax-regions/common/components/tax-override-card/tax-override-card.tsx +33 -13
  613. package/src/routes/tax-regions/common/components/tax-region-card/tax-region-card.tsx +23 -5
  614. package/src/routes/tax-regions/common/constants.ts +1 -0
  615. package/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/tax-region-create-form.tsx +70 -10
  616. package/src/routes/tax-regions/tax-region-detail/tax-region-detail.tsx +4 -2
  617. package/src/routes/tax-regions/tax-region-detail/tax-region-provider-section/index.ts +1 -0
  618. package/src/routes/tax-regions/tax-region-detail/tax-region-provider-section/tax-region-provider-section.tsx +28 -0
  619. package/src/routes/tax-regions/tax-region-edit/components/tax-region-edit/index.ts +1 -0
  620. package/src/routes/tax-regions/tax-region-edit/components/tax-region-edit/tax-region-edit-form.tsx +109 -0
  621. package/src/routes/tax-regions/tax-region-edit/index.ts +1 -0
  622. package/src/routes/tax-regions/tax-region-edit/tax-region-edit.tsx +33 -0
  623. package/src/routes/tax-regions/tax-region-province-create/components/tax-region-province-create-form/tax-region-province-create-form.tsx +2 -1
  624. package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-detail-section/tax-region-detail-section.tsx +1 -0
  625. package/src/routes/tax-regions/tax-region-tax-override-create/components/tax-region-override-create-form/tax-region-tax-override-create.tsx +29 -2
  626. package/src/routes/tax-regions/tax-region-tax-override-edit/components/tax-region-tax-override-edit-form/tax-region-tax-override-edit-form.tsx +59 -14
  627. package/src/routes/tax-regions/tax-region-tax-override-edit/tax-region-tax-override-edit.tsx +95 -51
  628. package/src/routes/tax-regions/tax-region-tax-override-edit/types.ts +4 -3
  629. package/src/routes/tax-regions/tax-region-tax-rate-create/components/tax-region-tax-rate-create-form/tax-region-tax-rate-create-form.tsx +1 -0
  630. package/src/routes/tax-regions/tax-region-tax-rate-edit/components/tax-region-tax-rate-edit-form/tax-region-tax-rate-edit-form.tsx +1 -0
  631. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +3 -2
  632. package/src/utils/column-utils.ts +71 -0
  633. package/dist/chunk-4GJJIXM6.mjs +0 -64
  634. package/dist/chunk-ACBS6KFT.mjs +0 -51
  635. package/dist/chunk-BKJC5BGQ.mjs +0 -53
  636. package/dist/chunk-CLRTJ6DI.mjs +0 -164
  637. package/dist/chunk-DDV2HJEV.mjs +0 -318
  638. package/dist/chunk-DFA6WGYO.mjs +0 -115
  639. package/dist/chunk-GH77ZQI2.mjs +0 -36
  640. package/dist/chunk-I5HYE2RW.mjs +0 -31
  641. package/dist/chunk-K7S5TX6I.mjs +0 -142
  642. package/dist/chunk-M3VFKDXJ.mjs +0 -62
  643. package/dist/chunk-MW4K5NNY.mjs +0 -69
  644. package/dist/chunk-OPZDUI6B.mjs +0 -5241
  645. package/dist/chunk-R2O6QX4D.mjs +0 -16
  646. package/dist/chunk-TD3LLNM6.mjs +0 -383
  647. package/dist/chunk-V3MOBCDF.mjs +0 -10
  648. package/dist/chunk-YEDAFXMB.mjs +0 -57
  649. package/dist/chunk-YRY2CZ6I.mjs +0 -73
  650. package/dist/collection-create-PXO6DJS3.mjs +0 -124
  651. package/dist/location-list-5UJ6CSA7.mjs +0 -286
  652. package/dist/location-service-zone-shipping-option-edit-ODUEKZON.mjs +0 -277
  653. package/dist/manage-locations-E7YAZVH2.mjs +0 -236
  654. package/dist/order-create-refund-FXUURAS7.mjs +0 -298
  655. package/dist/order-list-D4WMVRA2.mjs +0 -146
  656. package/dist/product-list-BGBZJ5WX.mjs +0 -262
  657. package/dist/product-variant-manage-inventory-items-BKFYUODS.mjs +0 -306
  658. package/dist/promotion-edit-details-D6M646E6.mjs +0 -377
  659. package/dist/region-edit-PXIMLBFB.mjs +0 -285
  660. package/src/routes/inventory/inventory-detail/components/location-levels-table/location-actions.tsx +0 -62
  661. package/src/routes/locations/location-list/components/location-list-header/index.ts +0 -1
  662. package/src/routes/locations/location-list/components/location-list-header/location-list-header.tsx +0 -21
  663. package/src/routes/locations/location-list/loader.ts +0 -36
@@ -2,70 +2,72 @@ import {
2
2
  By
3
3
  } from "./chunk-GXXQ33F7.mjs";
4
4
  import "./chunk-PYIO3TDQ.mjs";
5
+ import {
6
+ formatPercentage
7
+ } from "./chunk-4FM6S5CX.mjs";
8
+ import {
9
+ useCancelExchange,
10
+ useCancelExchangeRequest,
11
+ useExchanges
12
+ } from "./chunk-ULQ3V4CC.mjs";
13
+ import {
14
+ useCancelOrderEdit,
15
+ useConfirmOrderEdit
16
+ } from "./chunk-LEKWKUIS.mjs";
17
+ import {
18
+ getLoyaltyPlugin
19
+ } from "./chunk-AMRS4CSX.mjs";
5
20
  import {
6
21
  formatProvider
7
22
  } from "./chunk-IR5DHEKS.mjs";
8
23
  import {
9
- OrderPaymentSection,
10
- getPaymentsFromOrder,
11
- getTotalCaptured
12
- } from "./chunk-DDV2HJEV.mjs";
24
+ formatCurrency
25
+ } from "./chunk-WATKBUHQ.mjs";
13
26
  import {
14
- require_copy_to_clipboard
15
- } from "./chunk-K7S5TX6I.mjs";
27
+ getCanceledOrderStatus,
28
+ getOrderFulfillmentStatus,
29
+ getOrderPaymentStatus
30
+ } from "./chunk-7DXVXBSA.mjs";
16
31
  import {
17
- formatCurrency
18
- } from "./chunk-OV5NMSY6.mjs";
32
+ getPaymentsFromOrder,
33
+ getReservationsLimitCount
34
+ } from "./chunk-4XSXVVYD.mjs";
19
35
  import {
20
36
  useCancelClaim,
21
37
  useCancelClaimRequest,
22
38
  useClaims
23
- } from "./chunk-HUGE7T5V.mjs";
24
- import {
25
- useCancelExchange,
26
- useCancelExchangeRequest,
27
- useExchanges
28
- } from "./chunk-6LA2RGO4.mjs";
39
+ } from "./chunk-ALKTJGWS.mjs";
29
40
  import {
30
41
  getReturnableQuantity
31
42
  } from "./chunk-PXZ7QYKX.mjs";
43
+ import {
44
+ DEFAULT_FIELDS
45
+ } from "./chunk-F7LJJHQT.mjs";
32
46
  import {
33
47
  useCancelReturn,
34
48
  useCancelReturnRequest,
35
49
  useReturns
36
- } from "./chunk-ICR3D7SB.mjs";
37
- import {
38
- useCancelOrderEdit,
39
- useConfirmOrderEdit
40
- } from "./chunk-W7KW2VOI.mjs";
41
- import {
42
- DEFAULT_FIELDS
43
- } from "./chunk-7I5DQGWY.mjs";
44
- import {
45
- getCanceledOrderStatus,
46
- getOrderFulfillmentStatus,
47
- getOrderPaymentStatus
48
- } from "./chunk-7DXVXBSA.mjs";
50
+ } from "./chunk-3DO2JGVG.mjs";
49
51
  import {
50
52
  getLocaleAmount,
51
53
  getStylizedAmount,
52
54
  isAmountLessThenRoundingError
53
- } from "./chunk-PDWBYQOW.mjs";
54
- import "./chunk-MWVM4TYO.mjs";
55
+ } from "./chunk-X6BAAGCL.mjs";
56
+ import "./chunk-DK4WIVY6.mjs";
55
57
  import {
56
58
  getFormattedAddress,
57
59
  isSameAddress
58
- } from "./chunk-OIAPXGI2.mjs";
60
+ } from "./chunk-B6ZOPCPA.mjs";
59
61
  import {
60
62
  TwoColumnPage
61
- } from "./chunk-2RQLKDBF.mjs";
63
+ } from "./chunk-GIZFNLKK.mjs";
62
64
  import {
63
65
  useDate
64
- } from "./chunk-PWBTCXBJ.mjs";
65
- import "./chunk-VDBOSWVE.mjs";
66
+ } from "./chunk-PFKKVLZX.mjs";
66
67
  import {
67
68
  Thumbnail
68
69
  } from "./chunk-MNXC6Q4F.mjs";
70
+ import "./chunk-DG7J63J2.mjs";
69
71
  import {
70
72
  useExtension
71
73
  } from "./chunk-C5P5PL3E.mjs";
@@ -75,30 +77,32 @@ import {
75
77
  } from "./chunk-LPEUYMRK.mjs";
76
78
  import {
77
79
  ActionMenu
78
- } from "./chunk-3NJTXRIY.mjs";
80
+ } from "./chunk-OZPB6JBL.mjs";
79
81
  import "./chunk-OC7BQLYI.mjs";
80
- import "./chunk-6UX3SSRT.mjs";
82
+ import "./chunk-S4DMV3ZT.mjs";
83
+ import "./chunk-67ORSRVT.mjs";
81
84
  import {
82
- useMarkPaymentCollectionAsPaid
83
- } from "./chunk-CLRTJ6DI.mjs";
85
+ useCapturePayment,
86
+ useMarkPaymentCollectionAsPaid,
87
+ usePlugins
88
+ } from "./chunk-KXRW6JRE.mjs";
84
89
  import "./chunk-KOSCMAIC.mjs";
85
- import "./chunk-UAZEQNCO.mjs";
86
- import "./chunk-LDJKJLBJ.mjs";
90
+ import "./chunk-X6DSNTTX.mjs";
91
+ import "./chunk-I6E6CALJ.mjs";
87
92
  import "./chunk-B4GODIOW.mjs";
88
- import "./chunk-F6IJV2I2.mjs";
93
+ import "./chunk-N4N4KGET.mjs";
89
94
  import "./chunk-QTCZFYFH.mjs";
90
95
  import "./chunk-ENV6YVOM.mjs";
91
96
  import "./chunk-PIR2H25N.mjs";
92
- import "./chunk-RLY2SL5E.mjs";
93
97
  import "./chunk-C5LYZZZ5.mjs";
98
+ import "./chunk-RLY2SL5E.mjs";
94
99
  import "./chunk-2ZKVRTBW.mjs";
95
- import "./chunk-4GJJIXM6.mjs";
96
- import "./chunk-YS65UGPC.mjs";
100
+ import "./chunk-XYHXWLTJ.mjs";
97
101
  import {
98
102
  useCustomer
99
103
  } from "./chunk-F6PXCY3N.mjs";
100
- import "./chunk-3OHH43G6.mjs";
101
- import "./chunk-G2H6MAK7.mjs";
104
+ import "./chunk-IXZVR3HG.mjs";
105
+ import "./chunk-R2G2B47Y.mjs";
102
106
  import "./chunk-GRT22PE5.mjs";
103
107
  import {
104
108
  useStockLocation
@@ -113,16 +117,17 @@ import {
113
117
  useOrderChanges,
114
118
  useOrderLineItems,
115
119
  useOrderPreview
116
- } from "./chunk-RWU2ZKWZ.mjs";
120
+ } from "./chunk-WTK7SR6S.mjs";
117
121
  import {
118
122
  useReservationItems
119
- } from "./chunk-FVC7M755.mjs";
120
- import "./chunk-ZJ3OFMHB.mjs";
121
- import "./chunk-PNU5HPGY.mjs";
123
+ } from "./chunk-6XWHQ6ON.mjs";
124
+ import "./chunk-MQALAB34.mjs";
125
+ import "./chunk-OGAZYXOV.mjs";
126
+ import "./chunk-KX4P5L3R.mjs";
122
127
  import "./chunk-V2LANK5S.mjs";
123
128
  import "./chunk-QZ6PT4QV.mjs";
124
129
  import "./chunk-QL4XKIVL.mjs";
125
- import "./chunk-6I62UDJA.mjs";
130
+ import "./chunk-4BGVSXZZ.mjs";
126
131
  import {
127
132
  queryClient
128
133
  } from "./chunk-FXYH54JP.mjs";
@@ -130,9 +135,7 @@ import "./chunk-774WSTCC.mjs";
130
135
  import {
131
136
  sdk
132
137
  } from "./chunk-DEQUVHHE.mjs";
133
- import {
134
- __toESM
135
- } from "./chunk-GH77ZQI2.mjs";
138
+ import "./chunk-QZ7TP4HQ.mjs";
136
139
 
137
140
  // src/routes/orders/order-detail/breadcrumb.tsx
138
141
  import { jsxs } from "react/jsx-runtime";
@@ -489,7 +492,7 @@ import { Container as Container5, Heading as Heading5 } from "@medusajs/ui";
489
492
  import { useTranslation as useTranslation8 } from "react-i18next";
490
493
 
491
494
  // src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx
492
- import { Button as Button5, Text as Text6, Tooltip, clx, usePrompt } from "@medusajs/ui";
495
+ import { Button as Button5, Text as Text6, Tooltip, clx, toast as toast5, usePrompt } from "@medusajs/ui";
493
496
  import { Collapsible as RadixCollapsible } from "radix-ui";
494
497
  import { useMemo as useMemo2, useState as useState3 } from "react";
495
498
  import { useTranslation as useTranslation7 } from "react-i18next";
@@ -1127,7 +1130,9 @@ var ReturnBody = ({
1127
1130
  if (!res) {
1128
1131
  return;
1129
1132
  }
1130
- await cancelReturnRequest();
1133
+ await cancelReturnRequest().catch((error) => {
1134
+ toast5.error(error.message);
1135
+ });
1131
1136
  };
1132
1137
  const numberOfItems = orderReturn.items.reduce((acc, item) => {
1133
1138
  return acc + (isReceived ? item.received_quantity : item.quantity);
@@ -1169,7 +1174,9 @@ var ClaimBody = ({
1169
1174
  if (!res) {
1170
1175
  return;
1171
1176
  }
1172
- await cancelClaim();
1177
+ await cancelClaim().catch((error) => {
1178
+ toast5.error(error.message);
1179
+ });
1173
1180
  };
1174
1181
  const outboundItems = (claim.additional_items || []).reduce(
1175
1182
  (acc, item) => acc + item.quantity,
@@ -1219,7 +1226,9 @@ var ExchangeBody = ({
1219
1226
  if (!res) {
1220
1227
  return;
1221
1228
  }
1222
- await cancelExchange();
1229
+ await cancelExchange().catch((error) => {
1230
+ toast5.error(error.message);
1231
+ });
1223
1232
  };
1224
1233
  const outboundItems = (exchange.additional_items || []).reduce(
1225
1234
  (acc, item) => acc + item.quantity,
@@ -1288,7 +1297,9 @@ var TransferOrderRequestBody = ({
1288
1297
  if (!res) {
1289
1298
  return;
1290
1299
  }
1291
- await cancelTransfer();
1300
+ await cancelTransfer().catch((error) => {
1301
+ toast5.error(error.message);
1302
+ });
1292
1303
  };
1293
1304
  return /* @__PURE__ */ jsxs8("div", { children: [
1294
1305
  /* @__PURE__ */ jsxs8(Text6, { size: "small", className: "text-ui-fg-subtle", children: [
@@ -1440,7 +1451,7 @@ var Contact = ({ data }) => {
1440
1451
  children: phone
1441
1452
  }
1442
1453
  ),
1443
- /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(Copy2, { content: email, className: "text-ui-fg-muted" }) })
1454
+ /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(Copy2, { content: phone, className: "text-ui-fg-muted" }) })
1444
1455
  ] })
1445
1456
  ] })
1446
1457
  ] });
@@ -1575,7 +1586,7 @@ import {
1575
1586
  StatusBadge,
1576
1587
  Text as Text8,
1577
1588
  Tooltip as Tooltip2,
1578
- toast as toast5,
1589
+ toast as toast6,
1579
1590
  usePrompt as usePrompt2
1580
1591
  } from "@medusajs/ui";
1581
1592
  import { format } from "date-fns";
@@ -1753,21 +1764,21 @@ var Fulfillment = ({
1753
1764
  if (res) {
1754
1765
  await markAsDelivered(void 0, {
1755
1766
  onSuccess: () => {
1756
- toast5.success(
1767
+ toast6.success(
1757
1768
  t(
1758
1769
  isPickUpFulfillment ? "orders.fulfillment.toast.fulfillmentPickedUp" : "orders.fulfillment.toast.fulfillmentDelivered"
1759
1770
  )
1760
1771
  );
1761
1772
  },
1762
1773
  onError: (e) => {
1763
- toast5.error(e.message);
1774
+ toast6.error(e.message);
1764
1775
  }
1765
1776
  });
1766
1777
  }
1767
1778
  };
1768
1779
  const handleCancel = async () => {
1769
1780
  if (fulfillment.shipped_at) {
1770
- toast5.warning(t("orders.fulfillment.toast.fulfillmentShipped"));
1781
+ toast6.warning(t("orders.fulfillment.toast.fulfillmentShipped"));
1771
1782
  return;
1772
1783
  }
1773
1784
  const res = await prompt({
@@ -1779,10 +1790,10 @@ var Fulfillment = ({
1779
1790
  if (res) {
1780
1791
  await mutateAsync(void 0, {
1781
1792
  onSuccess: () => {
1782
- toast5.success(t("orders.fulfillment.toast.canceled"));
1793
+ toast6.success(t("orders.fulfillment.toast.canceled"));
1783
1794
  },
1784
1795
  onError: (e) => {
1785
- toast5.error(e.message);
1796
+ toast6.error(e.message);
1786
1797
  }
1787
1798
  });
1788
1799
  }
@@ -1790,6 +1801,7 @@ var Fulfillment = ({
1790
1801
  if (isError) {
1791
1802
  throw error;
1792
1803
  }
1804
+ const isValidUrl = (url) => url && url.length > 0 && url !== "#";
1793
1805
  return /* @__PURE__ */ jsxs12(Container7, { className: "divide-y p-0", children: [
1794
1806
  /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-6 py-4", children: [
1795
1807
  /* @__PURE__ */ jsx11(Heading7, { level: "h2", children: t("orders.fulfillment.number", {
@@ -1851,18 +1863,32 @@ var Fulfillment = ({
1851
1863
  /* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1852
1864
  /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
1853
1865
  /* @__PURE__ */ jsx11("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx11("ul", { children: fulfillment.labels.map((tlink) => {
1854
- const hasUrl = tlink.url && tlink.url.length > 0 && tlink.url !== "#";
1855
- if (hasUrl) {
1856
- return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(
1857
- "a",
1858
- {
1859
- href: tlink.url,
1860
- target: "_blank",
1861
- rel: "noopener noreferrer",
1862
- className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1863
- children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: tlink.tracking_number })
1864
- }
1865
- ) }, tlink.tracking_number);
1866
+ const hasTrackingUrl = isValidUrl(tlink.tracking_url);
1867
+ const hasLabelUrl = isValidUrl(tlink.label_url);
1868
+ if (hasTrackingUrl || hasLabelUrl) {
1869
+ return /* @__PURE__ */ jsxs12("li", { children: [
1870
+ hasTrackingUrl && /* @__PURE__ */ jsx11(
1871
+ "a",
1872
+ {
1873
+ href: tlink.tracking_url,
1874
+ target: "_blank",
1875
+ rel: "noopener noreferrer",
1876
+ className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1877
+ children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: tlink.tracking_number })
1878
+ }
1879
+ ),
1880
+ hasTrackingUrl && hasLabelUrl && " - ",
1881
+ hasLabelUrl && /* @__PURE__ */ jsx11(
1882
+ "a",
1883
+ {
1884
+ href: tlink.label_url,
1885
+ target: "_blank",
1886
+ rel: "noopener noreferrer",
1887
+ className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1888
+ children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: "Label" })
1889
+ }
1890
+ )
1891
+ ] }, tlink.tracking_number);
1866
1892
  }
1867
1893
  return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
1868
1894
  }) }) : /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: "-" }) })
@@ -1891,7 +1917,7 @@ import {
1891
1917
  Heading as Heading8,
1892
1918
  StatusBadge as StatusBadge2,
1893
1919
  Text as Text9,
1894
- toast as toast6,
1920
+ toast as toast7,
1895
1921
  usePrompt as usePrompt3
1896
1922
  } from "@medusajs/ui";
1897
1923
  import { useTranslation as useTranslation12 } from "react-i18next";
@@ -1915,10 +1941,10 @@ var OrderGeneralSection = ({ order }) => {
1915
1941
  }
1916
1942
  await cancelOrder(void 0, {
1917
1943
  onSuccess: () => {
1918
- toast6.success(t("orders.orderCanceled"));
1944
+ toast7.success(t("orders.orderCanceled"));
1919
1945
  },
1920
1946
  onError: (e) => {
1921
- toast6.error(e.message);
1947
+ toast7.error(e.message);
1922
1948
  }
1923
1949
  });
1924
1950
  };
@@ -1984,56 +2010,406 @@ var OrderBadge = ({ order }) => {
1984
2010
  return /* @__PURE__ */ jsx12(StatusBadge2, { color: orderStatus.color, className: "text-nowrap", children: orderStatus.label });
1985
2011
  };
1986
2012
 
2013
+ // src/routes/orders/order-detail/components/order-payment-section/order-payment-section.tsx
2014
+ import { ArrowDownRightMini, DocumentText, XCircle as XCircle3 } from "@medusajs/icons";
2015
+ import {
2016
+ Badge,
2017
+ Button as Button7,
2018
+ Container as Container9,
2019
+ Heading as Heading9,
2020
+ StatusBadge as StatusBadge3,
2021
+ Text as Text10,
2022
+ toast as toast9,
2023
+ Tooltip as Tooltip4,
2024
+ usePrompt as usePrompt4
2025
+ } from "@medusajs/ui";
2026
+ import { format as format2 } from "date-fns";
2027
+ import { Trans, useTranslation as useTranslation14 } from "react-i18next";
2028
+
2029
+ // src/components/common/display-id/display-id.tsx
2030
+ import { useTranslation as useTranslation13 } from "react-i18next";
2031
+ import { useState as useState4 } from "react";
2032
+ import copy from "copy-to-clipboard";
2033
+ import { clx as clx2, toast as toast8, Tooltip as Tooltip3 } from "@medusajs/ui";
2034
+ import { jsx as jsx13, jsxs as jsxs14 } from "react/jsx-runtime";
2035
+ function DisplayId({ id, className }) {
2036
+ const { t } = useTranslation13();
2037
+ const [open, setOpen] = useState4(false);
2038
+ const onClick = () => {
2039
+ copy(id);
2040
+ toast8.success(t("actions.idCopiedToClipboard"));
2041
+ };
2042
+ return /* @__PURE__ */ jsx13(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs14("span", { onClick, className: clx2("cursor-pointer", className), children: [
2043
+ "#",
2044
+ id.slice(-7)
2045
+ ] }) });
2046
+ }
2047
+ var display_id_default = DisplayId;
2048
+
2049
+ // src/lib/payment.ts
2050
+ var getTotalCaptured = (paymentCollections) => paymentCollections.reduce((acc, paymentCollection) => {
2051
+ acc = acc + (paymentCollection.captured_amount - paymentCollection.refunded_amount);
2052
+ return acc;
2053
+ }, 0);
2054
+ var getTotalPending = (paymentCollections) => paymentCollections.filter((pc) => pc.status !== "canceled").reduce((acc, paymentCollection) => {
2055
+ acc += paymentCollection.amount - paymentCollection.captured_amount;
2056
+ return acc;
2057
+ }, 0);
2058
+
2059
+ // src/routes/orders/order-detail/components/order-payment-section/order-payment-section.tsx
2060
+ import { jsx as jsx14, jsxs as jsxs15 } from "react/jsx-runtime";
2061
+ var OrderPaymentSection = ({
2062
+ order,
2063
+ plugins
2064
+ }) => {
2065
+ const payments = getPaymentsFromOrder(order);
2066
+ const refunds = payments.map((payment) => payment?.refunds).flat(1).filter(Boolean);
2067
+ return /* @__PURE__ */ jsxs15(Container9, { className: "divide-y divide-dashed p-0", children: [
2068
+ /* @__PURE__ */ jsx14(Header2, { order }),
2069
+ /* @__PURE__ */ jsx14(
2070
+ PaymentBreakdown,
2071
+ {
2072
+ order,
2073
+ plugins,
2074
+ payments,
2075
+ refunds,
2076
+ currencyCode: order.currency_code
2077
+ }
2078
+ ),
2079
+ /* @__PURE__ */ jsx14(Total, { order })
2080
+ ] });
2081
+ };
2082
+ var Header2 = ({ order }) => {
2083
+ const { t } = useTranslation14();
2084
+ const { label, color } = getOrderPaymentStatus(t, order.payment_status);
2085
+ return /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between px-6 py-4", children: [
2086
+ /* @__PURE__ */ jsx14(Heading9, { level: "h2", children: t("orders.payment.title") }),
2087
+ /* @__PURE__ */ jsx14(StatusBadge3, { color, className: "text-nowrap", children: label })
2088
+ ] });
2089
+ };
2090
+ var Refund = ({
2091
+ refund,
2092
+ currencyCode
2093
+ }) => {
2094
+ const { t } = useTranslation14();
2095
+ const RefundReasonBadge = refund?.refund_reason && /* @__PURE__ */ jsx14(
2096
+ Badge,
2097
+ {
2098
+ size: "2xsmall",
2099
+ className: "cursor-default select-none capitalize",
2100
+ rounded: "full",
2101
+ children: refund.refund_reason.label
2102
+ }
2103
+ );
2104
+ const RefundNoteIndicator = refund.note && /* @__PURE__ */ jsx14(Tooltip4, { content: refund.note, children: /* @__PURE__ */ jsx14(DocumentText, { className: "text-ui-tag-neutral-icon ml-1 inline" }) });
2105
+ return /* @__PURE__ */ jsxs15("div", { className: "bg-ui-bg-subtle text-ui-fg-subtle grid grid-cols-[1fr_1fr_1fr_20px] items-center gap-x-4 px-6 py-4", children: [
2106
+ /* @__PURE__ */ jsxs15("div", { className: "flex flex-row", children: [
2107
+ /* @__PURE__ */ jsx14("div", { className: "self-center pr-3", children: /* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "text-ui-fg-muted" }) }),
2108
+ /* @__PURE__ */ jsxs15("div", { children: [
2109
+ /* @__PURE__ */ jsxs15(Text10, { size: "small", leading: "compact", weight: "plus", children: [
2110
+ t("orders.payment.refund"),
2111
+ " ",
2112
+ RefundNoteIndicator
2113
+ ] }),
2114
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: format2(new Date(refund.created_at), "dd MMM, yyyy, HH:mm:ss") })
2115
+ ] })
2116
+ ] }),
2117
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: RefundReasonBadge }),
2118
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs15(Text10, { size: "small", leading: "compact", children: [
2119
+ "- ",
2120
+ getLocaleAmount(refund.amount, currencyCode)
2121
+ ] }) })
2122
+ ] });
2123
+ };
2124
+ var Payment = ({
2125
+ order,
2126
+ payment,
2127
+ refunds,
2128
+ currencyCode
2129
+ }) => {
2130
+ const { t } = useTranslation14();
2131
+ const prompt = usePrompt4();
2132
+ const { mutateAsync } = useCapturePayment(order.id, payment.id);
2133
+ const handleCapture = async () => {
2134
+ const res = await prompt({
2135
+ title: t("orders.payment.capture"),
2136
+ description: t("orders.payment.capturePayment", {
2137
+ amount: formatCurrency(payment.amount, currencyCode)
2138
+ }),
2139
+ confirmText: t("actions.confirm"),
2140
+ cancelText: t("actions.cancel"),
2141
+ variant: "confirmation"
2142
+ });
2143
+ if (!res) {
2144
+ return;
2145
+ }
2146
+ await mutateAsync(
2147
+ { amount: payment.amount },
2148
+ {
2149
+ onSuccess: () => {
2150
+ toast9.success(
2151
+ t("orders.payment.capturePaymentSuccess", {
2152
+ amount: formatCurrency(payment.amount, currencyCode)
2153
+ })
2154
+ );
2155
+ },
2156
+ onError: (error) => {
2157
+ toast9.error(error.message);
2158
+ }
2159
+ }
2160
+ );
2161
+ };
2162
+ const getPaymentStatusAttributes = (payment2) => {
2163
+ if (payment2.canceled_at) {
2164
+ return ["Canceled", "red"];
2165
+ } else if (payment2.captured_at) {
2166
+ return ["Captured", "green"];
2167
+ } else {
2168
+ return ["Pending", "orange"];
2169
+ }
2170
+ };
2171
+ const [status, color] = getPaymentStatusAttributes(payment);
2172
+ const showCapture = payment.captured_at === null && payment.canceled_at === null;
2173
+ const totalRefunded = payment.refunds.reduce(
2174
+ (acc, next) => next.amount + acc,
2175
+ 0
2176
+ );
2177
+ return /* @__PURE__ */ jsxs15("div", { className: "divide-y divide-dashed", children: [
2178
+ /* @__PURE__ */ jsxs15("div", { className: "text-ui-fg-subtle grid grid-cols-[1fr_1fr_1fr_20px] items-center gap-x-4 px-6 py-4 sm:grid-cols-[1fr_1fr_1fr_1fr_20px]", children: [
2179
+ /* @__PURE__ */ jsxs15("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
2180
+ /* @__PURE__ */ jsx14(
2181
+ Text10,
2182
+ {
2183
+ size: "small",
2184
+ leading: "compact",
2185
+ weight: "plus",
2186
+ className: "truncate",
2187
+ children: /* @__PURE__ */ jsx14(display_id_default, { id: payment.id })
2188
+ }
2189
+ ),
2190
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: format2(
2191
+ new Date(payment.created_at),
2192
+ "dd MMM, yyyy, HH:mm:ss"
2193
+ ) })
2194
+ ] }),
2195
+ /* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", className: "capitalize", children: payment.provider_id }) }),
2196
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(StatusBadge3, { color, className: "text-nowrap", children: status }) }),
2197
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: getLocaleAmount(payment.amount, payment.currency_code) }) }),
2198
+ /* @__PURE__ */ jsx14(
2199
+ ActionMenu,
2200
+ {
2201
+ groups: [
2202
+ {
2203
+ actions: [
2204
+ {
2205
+ label: t("orders.payment.refund"),
2206
+ icon: /* @__PURE__ */ jsx14(XCircle3, {}),
2207
+ to: `/orders/${order.id}/refund?paymentId=${payment.id}`,
2208
+ disabled: !payment.captured_at || !!payment.canceled_at || totalRefunded >= payment.amount
2209
+ }
2210
+ ]
2211
+ }
2212
+ ]
2213
+ }
2214
+ )
2215
+ ] }),
2216
+ showCapture && /* @__PURE__ */ jsxs15("div", { className: "bg-ui-bg-subtle flex items-center justify-between px-6 py-4", children: [
2217
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-x-2", children: [
2218
+ /* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "text-ui-fg-muted shrink-0" }),
2219
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: /* @__PURE__ */ jsx14(
2220
+ Trans,
2221
+ {
2222
+ i18nKey: "orders.payment.isReadyToBeCaptured",
2223
+ components: [/* @__PURE__ */ jsx14(display_id_default, { id: payment.id })]
2224
+ }
2225
+ ) })
2226
+ ] }),
2227
+ /* @__PURE__ */ jsxs15(
2228
+ Button7,
2229
+ {
2230
+ className: "shrink-0",
2231
+ size: "small",
2232
+ variant: "secondary",
2233
+ onClick: handleCapture,
2234
+ children: [
2235
+ /* @__PURE__ */ jsx14("span", { className: "hidden sm:block", children: t("orders.payment.capture") }),
2236
+ /* @__PURE__ */ jsx14("span", { className: "sm:hidden", children: t("orders.payment.capture_short") })
2237
+ ]
2238
+ }
2239
+ )
2240
+ ] }),
2241
+ refunds.map((refund) => /* @__PURE__ */ jsx14(Refund, { refund, currencyCode }, refund.id))
2242
+ ] });
2243
+ };
2244
+ var CreditLine = ({
2245
+ creditLine,
2246
+ currencyCode,
2247
+ plugins
2248
+ }) => {
2249
+ const loyaltyPlugin = getLoyaltyPlugin(plugins);
2250
+ if (!loyaltyPlugin) {
2251
+ return null;
2252
+ }
2253
+ const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
2254
+ const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */ jsx14(display_id_default, { id: creditLine.reference_id }) : null;
2255
+ return /* @__PURE__ */ jsx14("div", { className: "divide-y divide-dashed", children: /* @__PURE__ */ jsxs15("div", { className: "text-ui-fg-subtle grid grid-cols-[1fr_1fr_20px] items-center gap-x-4 px-6 py-4 sm:grid-cols-[1fr_1fr_1fr_20px]", children: [
2256
+ /* @__PURE__ */ jsxs15("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
2257
+ /* @__PURE__ */ jsx14(
2258
+ Text10,
2259
+ {
2260
+ size: "small",
2261
+ leading: "compact",
2262
+ weight: "plus",
2263
+ className: "truncate",
2264
+ children: loyaltyPlugin ? /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", weight: "plus", children: "Store credit refund" }) : /* @__PURE__ */ jsx14(display_id_default, { id: creditLine.id })
2265
+ }
2266
+ ),
2267
+ /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: format2(
2268
+ new Date(creditLine.created_at),
2269
+ "dd MMM, yyyy, HH:mm:ss"
2270
+ ) })
2271
+ ] }),
2272
+ /* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsxs15(Text10, { size: "small", leading: "compact", className: "capitalize", children: [
2273
+ prettyReference,
2274
+ " (",
2275
+ prettyReferenceId,
2276
+ ")"
2277
+ ] }) }),
2278
+ /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: getLocaleAmount(creditLine.amount, currencyCode) }) })
2279
+ ] }) });
2280
+ };
2281
+ var PaymentBreakdown = ({
2282
+ order,
2283
+ payments,
2284
+ refunds,
2285
+ currencyCode,
2286
+ plugins
2287
+ }) => {
2288
+ const orderRefunds = refunds.filter((refund) => refund.payment_id === null);
2289
+ const creditLines = order.credit_lines ?? [];
2290
+ const creditLineRefunds = creditLines.filter(
2291
+ (creditLine) => creditLine.amount < 0
2292
+ );
2293
+ const entries = [...orderRefunds, ...payments, ...creditLineRefunds].sort((a, b) => {
2294
+ return new Date(a.created_at).getTime() - new Date(b.created_at).getTime();
2295
+ }).map((entry) => {
2296
+ let type = entry.id.startsWith("pay_") ? "payment" : "refund";
2297
+ if (entry.id.startsWith("ordcl_")) {
2298
+ type = "credit_line_refund";
2299
+ }
2300
+ return { event: entry, type };
2301
+ });
2302
+ return /* @__PURE__ */ jsx14("div", { className: "flex flex-col divide-y divide-dashed", children: entries.map(({ type, event }) => {
2303
+ switch (type) {
2304
+ case "payment":
2305
+ return /* @__PURE__ */ jsx14(
2306
+ Payment,
2307
+ {
2308
+ order,
2309
+ payment: event,
2310
+ refunds: refunds.filter(
2311
+ (refund) => refund.payment_id === event.id
2312
+ ),
2313
+ currencyCode
2314
+ },
2315
+ event.id
2316
+ );
2317
+ case "refund":
2318
+ return /* @__PURE__ */ jsx14(
2319
+ Refund,
2320
+ {
2321
+ refund: event,
2322
+ currencyCode
2323
+ },
2324
+ event.id
2325
+ );
2326
+ case "credit_line_refund":
2327
+ return /* @__PURE__ */ jsx14(
2328
+ CreditLine,
2329
+ {
2330
+ creditLine: event,
2331
+ currencyCode,
2332
+ plugins
2333
+ },
2334
+ event.id
2335
+ );
2336
+ }
2337
+ }) });
2338
+ };
2339
+ var Total = ({ order }) => {
2340
+ const { t } = useTranslation14();
2341
+ const totalPending = getTotalPending(order.payment_collections);
2342
+ return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-y-4 px-6 py-4", children: [
2343
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between", children: [
2344
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPaidByCustomer") }),
2345
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(
2346
+ getTotalCaptured(order.payment_collections),
2347
+ order.currency_code
2348
+ ) })
2349
+ ] }),
2350
+ order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between", children: [
2351
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: "Total pending" }),
2352
+ /* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalPending, order.currency_code) })
2353
+ ] })
2354
+ ] });
2355
+ };
2356
+
1987
2357
  // src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx
1988
- import { useMemo as useMemo3, useState as useState6 } from "react";
1989
- import { useTranslation as useTranslation16 } from "react-i18next";
1990
- import { Link as Link3, useNavigate as useNavigate6 } from "react-router-dom";
2358
+ import { useMemo as useMemo3, useState as useState7 } from "react";
2359
+ import { useTranslation as useTranslation18 } from "react-i18next";
2360
+ import { Link as Link3 } from "react-router-dom";
1991
2361
  import {
1992
- ArrowDownRightMini,
2362
+ ArrowDownRightMini as ArrowDownRightMini2,
1993
2363
  ArrowLongRight,
1994
2364
  ArrowPath as ArrowPath3,
1995
2365
  ArrowUturnLeft as ArrowUturnLeft2,
1996
- DocumentText,
2366
+ DocumentText as DocumentText2,
1997
2367
  ExclamationCircle as ExclamationCircle2,
1998
2368
  PencilSquare,
1999
2369
  TriangleDownMini
2000
2370
  } from "@medusajs/icons";
2001
2371
  import {
2002
- Badge as Badge3,
2003
- Button as Button8,
2004
- clx as clx2,
2005
- Container as Container9,
2372
+ Badge as Badge4,
2373
+ Button as Button9,
2374
+ clx as clx3,
2375
+ Container as Container10,
2006
2376
  Copy as Copy5,
2007
- Heading as Heading9,
2008
- StatusBadge as StatusBadge3,
2009
- Text as Text11,
2010
- toast as toast7,
2011
- Tooltip as Tooltip5,
2012
- usePrompt as usePrompt4
2377
+ Heading as Heading10,
2378
+ StatusBadge as StatusBadge4,
2379
+ Text as Text12,
2380
+ toast as toast10,
2381
+ Tooltip as Tooltip7,
2382
+ usePrompt as usePrompt5
2013
2383
  } from "@medusajs/ui";
2014
2384
 
2385
+ // src/lib/credit-line.ts
2386
+ var getTotalCreditLines = (creditLines) => creditLines.reduce((acc, creditLine) => {
2387
+ acc = acc + creditLine.amount;
2388
+ return acc;
2389
+ }, 0);
2390
+
2015
2391
  // src/routes/orders/order-detail/components/copy-payment-link/copy-payment-link.tsx
2016
- var import_copy_to_clipboard = __toESM(require_copy_to_clipboard());
2017
2392
  import { CheckCircleSolid, SquareTwoStack } from "@medusajs/icons";
2018
- import { Button as Button7, Tooltip as Tooltip3 } from "@medusajs/ui";
2019
- import React, { useState as useState4 } from "react";
2020
- import { useTranslation as useTranslation13 } from "react-i18next";
2393
+ import { Button as Button8, Tooltip as Tooltip5 } from "@medusajs/ui";
2394
+ import copy2 from "copy-to-clipboard";
2395
+ import React, { useState as useState5 } from "react";
2396
+ import { useTranslation as useTranslation15 } from "react-i18next";
2021
2397
 
2022
2398
  // src/lib/storefront.ts
2023
2399
  var MEDUSA_STOREFRONT_URL = __STOREFRONT_URL__ ?? "http://localhost:8000";
2024
2400
 
2025
2401
  // src/routes/orders/order-detail/components/copy-payment-link/copy-payment-link.tsx
2026
- import { jsx as jsx13, jsxs as jsxs14 } from "react/jsx-runtime";
2402
+ import { jsx as jsx15, jsxs as jsxs16 } from "react/jsx-runtime";
2027
2403
  var CopyPaymentLink = React.forwardRef(
2028
2404
  ({ paymentCollection, order }, ref) => {
2029
- const [done, setDone] = useState4(false);
2030
- const [open, setOpen] = useState4(false);
2031
- const [text, setText] = useState4("CopyPaymentLink");
2032
- const { t } = useTranslation13();
2405
+ const [done, setDone] = useState5(false);
2406
+ const [open, setOpen] = useState5(false);
2407
+ const [text, setText] = useState5("CopyPaymentLink");
2408
+ const { t } = useTranslation15();
2033
2409
  const copyToClipboard = async (e) => {
2034
2410
  e.stopPropagation();
2035
2411
  setDone(true);
2036
- (0, import_copy_to_clipboard.default)(
2412
+ copy2(
2037
2413
  `${MEDUSA_STOREFRONT_URL}/payment-collection/${paymentCollection.id}`
2038
2414
  );
2039
2415
  setTimeout(() => {
@@ -2049,8 +2425,8 @@ var CopyPaymentLink = React.forwardRef(
2049
2425
  setText(t("actions.copy"));
2050
2426
  }, 500);
2051
2427
  }, [done]);
2052
- return /* @__PURE__ */ jsx13(Tooltip3, { content: text, open: done || open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs14(
2053
- Button7,
2428
+ return /* @__PURE__ */ jsx15(Tooltip5, { content: text, open: done || open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs16(
2429
+ Button8,
2054
2430
  {
2055
2431
  ref,
2056
2432
  variant: "secondary",
@@ -2058,7 +2434,7 @@ var CopyPaymentLink = React.forwardRef(
2058
2434
  "aria-label": "CopyPaymentLink code snippet",
2059
2435
  onClick: copyToClipboard,
2060
2436
  children: [
2061
- done ? /* @__PURE__ */ jsx13(CheckCircleSolid, { className: "inline" }) : /* @__PURE__ */ jsx13(SquareTwoStack, { className: "inline" }),
2437
+ done ? /* @__PURE__ */ jsx15(CheckCircleSolid, { className: "inline" }) : /* @__PURE__ */ jsx15(SquareTwoStack, { className: "inline" }),
2062
2438
  t("orders.payment.paymentLink", {
2063
2439
  amount: getStylizedAmount(
2064
2440
  paymentCollection.amount,
@@ -2074,13 +2450,13 @@ CopyPaymentLink.displayName = "CopyPaymentLink";
2074
2450
 
2075
2451
  // src/routes/orders/order-detail/components/order-summary-section/return-info-popover.tsx
2076
2452
  import { InformationCircleSolid } from "@medusajs/icons";
2077
- import { Badge, Popover as Popover3, Text as Text10 } from "@medusajs/ui";
2078
- import { useState as useState5 } from "react";
2079
- import { useTranslation as useTranslation14 } from "react-i18next";
2080
- import { jsx as jsx14, jsxs as jsxs15 } from "react/jsx-runtime";
2453
+ import { Badge as Badge2, Popover as Popover3, Text as Text11 } from "@medusajs/ui";
2454
+ import { useState as useState6 } from "react";
2455
+ import { useTranslation as useTranslation16 } from "react-i18next";
2456
+ import { jsx as jsx16, jsxs as jsxs17 } from "react/jsx-runtime";
2081
2457
  function ReturnInfoPopover({ orderReturn }) {
2082
- const { t } = useTranslation14();
2083
- const [open, setOpen] = useState5(false);
2458
+ const { t } = useTranslation16();
2459
+ const [open, setOpen] = useState6(false);
2084
2460
  const { getFullDate } = useDate();
2085
2461
  const handleMouseEnter = () => {
2086
2462
  setOpen(true);
@@ -2101,36 +2477,36 @@ function ReturnInfoPopover({ orderReturn }) {
2101
2477
  if (typeof orderReturn !== "object") {
2102
2478
  return;
2103
2479
  }
2104
- return /* @__PURE__ */ jsxs15(Popover3, { open, children: [
2105
- /* @__PURE__ */ jsx14(
2480
+ return /* @__PURE__ */ jsxs17(Popover3, { open, children: [
2481
+ /* @__PURE__ */ jsx16(
2106
2482
  Popover3.Trigger,
2107
2483
  {
2108
2484
  onMouseEnter: handleMouseEnter,
2109
2485
  onMouseLeave: handleMouseLeave,
2110
2486
  autoFocus: false,
2111
2487
  className: "align-sub focus-visible:outline-none",
2112
- children: /* @__PURE__ */ jsx14(InformationCircleSolid, {})
2488
+ children: /* @__PURE__ */ jsx16(InformationCircleSolid, {})
2113
2489
  }
2114
2490
  ),
2115
- /* @__PURE__ */ jsx14(
2491
+ /* @__PURE__ */ jsx16(
2116
2492
  Popover3.Content,
2117
2493
  {
2118
2494
  align: "center",
2119
2495
  side: "top",
2120
2496
  className: "bg-ui-bg-component p-2 focus-visible:outline-none",
2121
- children: /* @__PURE__ */ jsxs15("div", { className: "", children: [
2122
- /* @__PURE__ */ jsxs15(Badge, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
2497
+ children: /* @__PURE__ */ jsxs17("div", { className: "", children: [
2498
+ /* @__PURE__ */ jsxs17(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
2123
2499
  returnType,
2124
2500
  ": #",
2125
2501
  returnTypeId.slice(-7)
2126
2502
  ] }),
2127
- /* @__PURE__ */ jsxs15(Text10, { size: "xsmall", children: [
2128
- /* @__PURE__ */ jsx14("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.returnRequested`) }),
2503
+ /* @__PURE__ */ jsxs17(Text11, { size: "xsmall", children: [
2504
+ /* @__PURE__ */ jsx16("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.returnRequested`) }),
2129
2505
  " \xB7 ",
2130
2506
  getFullDate({ date: orderReturn.requested_at, includeTime: true })
2131
2507
  ] }),
2132
- /* @__PURE__ */ jsxs15(Text10, { size: "xsmall", children: [
2133
- /* @__PURE__ */ jsx14("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.itemReceived`) }),
2508
+ /* @__PURE__ */ jsxs17(Text11, { size: "xsmall", children: [
2509
+ /* @__PURE__ */ jsx16("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.itemReceived`) }),
2134
2510
  " \xB7 ",
2135
2511
  orderReturn.received_at ? getFullDate({
2136
2512
  date: orderReturn.received_at,
@@ -2146,11 +2522,11 @@ var return_info_popover_default = ReturnInfoPopover;
2146
2522
 
2147
2523
  // src/routes/orders/order-detail/components/order-summary-section/shipping-info-popover.tsx
2148
2524
  import { InformationCircleSolid as InformationCircleSolid2 } from "@medusajs/icons";
2149
- import { Badge as Badge2, Tooltip as Tooltip4 } from "@medusajs/ui";
2150
- import { useTranslation as useTranslation15 } from "react-i18next";
2151
- import { jsx as jsx15, jsxs as jsxs16 } from "react/jsx-runtime";
2525
+ import { Badge as Badge3, Tooltip as Tooltip6 } from "@medusajs/ui";
2526
+ import { useTranslation as useTranslation17 } from "react-i18next";
2527
+ import { jsx as jsx17, jsxs as jsxs18 } from "react/jsx-runtime";
2152
2528
  function ShippingInfoPopover({ shippingMethod }) {
2153
- const { t } = useTranslation15();
2529
+ const { t } = useTranslation17();
2154
2530
  const shippingDetail = shippingMethod?.detail;
2155
2531
  if (!shippingDetail) {
2156
2532
  return;
@@ -2168,29 +2544,32 @@ function ShippingInfoPopover({ shippingMethod }) {
2168
2544
  if (!rmaId) {
2169
2545
  return;
2170
2546
  }
2171
- return /* @__PURE__ */ jsx15(
2172
- Tooltip4,
2547
+ return /* @__PURE__ */ jsx17(
2548
+ Tooltip6,
2173
2549
  {
2174
- content: /* @__PURE__ */ jsxs16(Badge2, { size: "2xsmall", rounded: "full", children: [
2550
+ content: /* @__PURE__ */ jsxs18(Badge3, { size: "2xsmall", rounded: "full", children: [
2175
2551
  rmaType,
2176
2552
  ": #",
2177
2553
  rmaId.slice(-7)
2178
2554
  ] }),
2179
- children: /* @__PURE__ */ jsx15(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
2555
+ children: /* @__PURE__ */ jsx17(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
2180
2556
  }
2181
2557
  );
2182
2558
  }
2183
2559
  var shipping_info_popover_default = ShippingInfoPopover;
2184
2560
 
2185
2561
  // src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx
2186
- import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs17 } from "react/jsx-runtime";
2187
- var OrderSummarySection = ({ order }) => {
2188
- const { t } = useTranslation16();
2189
- const navigate = useNavigate6();
2190
- const prompt = usePrompt4();
2562
+ import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs19 } from "react/jsx-runtime";
2563
+ var OrderSummarySection = ({
2564
+ order,
2565
+ plugins
2566
+ }) => {
2567
+ const { t } = useTranslation18();
2568
+ const prompt = usePrompt5();
2191
2569
  const { reservations } = useReservationItems(
2192
2570
  {
2193
- line_item_id: order?.items?.map((i) => i.id)
2571
+ line_item_id: order?.items?.map((i) => i.id),
2572
+ limit: getReservationsLimitCount(order)
2194
2573
  },
2195
2574
  { enabled: Array.isArray(order?.items) }
2196
2575
  );
@@ -2222,7 +2601,7 @@ var OrderSummarySection = ({ order }) => {
2222
2601
  }
2223
2602
  }
2224
2603
  return false;
2225
- }, [reservations]);
2604
+ }, [order.items, reservations]);
2226
2605
  const unpaidPaymentCollection = order.payment_collections.find(
2227
2606
  (pc) => pc.status === "not_paid"
2228
2607
  );
@@ -2236,7 +2615,7 @@ var OrderSummarySection = ({ order }) => {
2236
2615
  order.currency_code
2237
2616
  );
2238
2617
  const showPayment = unpaidPaymentCollection && pendingDifference > 0 && isAmountSignificant;
2239
- const showRefund = unpaidPaymentCollection && pendingDifference < 0 && isAmountSignificant;
2618
+ const showRefund = pendingDifference < 0 && isAmountSignificant;
2240
2619
  const handleMarkAsPaid = async (paymentCollection) => {
2241
2620
  const res = await prompt({
2242
2621
  title: t("orders.payment.markAsPaid"),
@@ -2257,7 +2636,7 @@ var OrderSummarySection = ({ order }) => {
2257
2636
  { order_id: order.id },
2258
2637
  {
2259
2638
  onSuccess: () => {
2260
- toast7.success(
2639
+ toast10.success(
2261
2640
  t("orders.payment.markAsPaidPaymentSuccess", {
2262
2641
  amount: formatCurrency(
2263
2642
  paymentCollection.amount,
@@ -2267,24 +2646,25 @@ var OrderSummarySection = ({ order }) => {
2267
2646
  );
2268
2647
  },
2269
2648
  onError: (error) => {
2270
- toast7.error(error.message);
2649
+ toast10.error(error.message);
2271
2650
  }
2272
2651
  }
2273
2652
  );
2274
2653
  };
2275
- return /* @__PURE__ */ jsxs17(Container9, { className: "divide-y divide-dashed p-0", children: [
2276
- /* @__PURE__ */ jsx16(Header2, { order, orderPreview }),
2277
- /* @__PURE__ */ jsx16(ItemBreakdown, { order, reservations }),
2278
- /* @__PURE__ */ jsx16(CostBreakdown, { order }),
2279
- /* @__PURE__ */ jsx16(Total, { order }),
2280
- (showAllocateButton || showReturns || showPayment || showRefund) && /* @__PURE__ */ jsxs17("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
2281
- showReturns && (receivableReturns.length === 1 ? /* @__PURE__ */ jsx16(Button8, { asChild: true, variant: "secondary", size: "small", children: /* @__PURE__ */ jsx16(
2654
+ return /* @__PURE__ */ jsxs19(Container10, { className: "divide-y divide-dashed p-0", children: [
2655
+ /* @__PURE__ */ jsx18(Header3, { order, orderPreview }),
2656
+ /* @__PURE__ */ jsx18(ItemBreakdown, { order, reservations }),
2657
+ /* @__PURE__ */ jsx18(CostBreakdown, { order }),
2658
+ /* @__PURE__ */ jsx18(DiscountAndTotalBreakdown, { order, plugins }),
2659
+ /* @__PURE__ */ jsx18(Total2, { order }),
2660
+ (showAllocateButton || showReturns || showPayment || showRefund) && /* @__PURE__ */ jsxs19("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
2661
+ showReturns && (receivableReturns.length === 1 ? /* @__PURE__ */ jsx18(Button9, { asChild: true, variant: "secondary", size: "small", children: /* @__PURE__ */ jsx18(
2282
2662
  Link3,
2283
2663
  {
2284
2664
  to: `/orders/${order.id}/returns/${receivableReturns[0].id}/receive`,
2285
2665
  children: t("orders.returns.receive.action")
2286
2666
  }
2287
- ) }) : /* @__PURE__ */ jsx16(
2667
+ ) }) : /* @__PURE__ */ jsx18(
2288
2668
  ActionMenu,
2289
2669
  {
2290
2670
  groups: [
@@ -2305,25 +2685,25 @@ var OrderSummarySection = ({ order }) => {
2305
2685
  id: `#${id.slice(-7)}`,
2306
2686
  returnType
2307
2687
  }),
2308
- icon: /* @__PURE__ */ jsx16(ArrowLongRight, {}),
2688
+ icon: /* @__PURE__ */ jsx18(ArrowLongRight, {}),
2309
2689
  to: `/orders/${order.id}/returns/${r.id}/receive`
2310
2690
  };
2311
2691
  })
2312
2692
  }
2313
2693
  ],
2314
- children: /* @__PURE__ */ jsx16(Button8, { variant: "secondary", size: "small", children: t("orders.returns.receive.action") })
2694
+ children: /* @__PURE__ */ jsx18(Button9, { variant: "secondary", size: "small", children: t("orders.returns.receive.action") })
2315
2695
  }
2316
2696
  )),
2317
- showAllocateButton && /* @__PURE__ */ jsx16(Button8, { asChild: true, variant: "secondary", size: "small", children: /* @__PURE__ */ jsx16(Link3, { to: "allocate-items", children: t("orders.allocateItems.action") }) }),
2318
- showPayment && /* @__PURE__ */ jsx16(
2697
+ showAllocateButton && /* @__PURE__ */ jsx18(Button9, { asChild: true, variant: "secondary", size: "small", children: /* @__PURE__ */ jsx18(Link3, { to: "allocate-items", children: t("orders.allocateItems.action") }) }),
2698
+ showPayment && /* @__PURE__ */ jsx18(
2319
2699
  CopyPaymentLink,
2320
2700
  {
2321
2701
  paymentCollection: unpaidPaymentCollection,
2322
2702
  order
2323
2703
  }
2324
2704
  ),
2325
- showPayment && /* @__PURE__ */ jsx16(
2326
- Button8,
2705
+ showPayment && /* @__PURE__ */ jsx18(
2706
+ Button9,
2327
2707
  {
2328
2708
  size: "small",
2329
2709
  variant: "secondary",
@@ -2331,7 +2711,7 @@ var OrderSummarySection = ({ order }) => {
2331
2711
  children: t("orders.payment.markAsPaid")
2332
2712
  }
2333
2713
  ),
2334
- showRefund && /* @__PURE__ */ jsx16(Button8, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx16(Link3, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
2714
+ showRefund && /* @__PURE__ */ jsx18(Button9, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx18(Link3, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
2335
2715
  amount: getStylizedAmount(
2336
2716
  pendingDifference * -1,
2337
2717
  order?.currency_code
@@ -2340,19 +2720,19 @@ var OrderSummarySection = ({ order }) => {
2340
2720
  ] })
2341
2721
  ] });
2342
2722
  };
2343
- var Header2 = ({
2723
+ var Header3 = ({
2344
2724
  order,
2345
2725
  orderPreview
2346
2726
  }) => {
2347
- const { t } = useTranslation16();
2727
+ const { t } = useTranslation18();
2348
2728
  const shouldDisableReturn = order.items.every(
2349
2729
  (i) => !(getReturnableQuantity(i) > 0)
2350
2730
  );
2351
2731
  const isOrderEditActive = orderPreview?.order_change?.change_type === "edit";
2352
2732
  const isOrderEditPending = orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "pending";
2353
- return /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between px-6 py-4", children: [
2354
- /* @__PURE__ */ jsx16(Heading9, { level: "h2", children: t("fields.summary") }),
2355
- /* @__PURE__ */ jsx16(
2733
+ return /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between px-6 py-4", children: [
2734
+ /* @__PURE__ */ jsx18(Heading10, { level: "h2", children: t("fields.summary") }),
2735
+ /* @__PURE__ */ jsx18(
2356
2736
  ActionMenu,
2357
2737
  {
2358
2738
  groups: [
@@ -2363,7 +2743,7 @@ var Header2 = ({
2363
2743
  isOrderEditPending ? "orders.summary.editOrderContinue" : "orders.summary.editOrder"
2364
2744
  ),
2365
2745
  to: `/orders/${order.id}/edits`,
2366
- icon: /* @__PURE__ */ jsx16(PencilSquare, {}),
2746
+ icon: /* @__PURE__ */ jsx18(PencilSquare, {}),
2367
2747
  disabled: order.status === "canceled" || orderPreview?.order_change && orderPreview?.order_change?.change_type !== "edit" || orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "requested"
2368
2748
  }
2369
2749
  ]
@@ -2373,19 +2753,19 @@ var Header2 = ({
2373
2753
  {
2374
2754
  label: t("orders.returns.create"),
2375
2755
  to: `/orders/${order.id}/returns`,
2376
- icon: /* @__PURE__ */ jsx16(ArrowUturnLeft2, {}),
2756
+ icon: /* @__PURE__ */ jsx18(ArrowUturnLeft2, {}),
2377
2757
  disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
2378
2758
  },
2379
2759
  {
2380
2760
  label: orderPreview?.order_change?.id && orderPreview?.order_change?.exchange_id ? t("orders.exchanges.manage") : t("orders.exchanges.create"),
2381
2761
  to: `/orders/${order.id}/exchanges`,
2382
- icon: /* @__PURE__ */ jsx16(ArrowPath3, {}),
2762
+ icon: /* @__PURE__ */ jsx18(ArrowPath3, {}),
2383
2763
  disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
2384
2764
  },
2385
2765
  {
2386
2766
  label: orderPreview?.order_change?.id && orderPreview?.order_change?.claim_id ? t("orders.claims.manage") : t("orders.claims.create"),
2387
2767
  to: `/orders/${order.id}/claims`,
2388
- icon: /* @__PURE__ */ jsx16(ExclamationCircle2, {}),
2768
+ icon: /* @__PURE__ */ jsx18(ExclamationCircle2, {}),
2389
2769
  disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.claim_id || !!orderPreview?.order_change?.exchange_id
2390
2770
  }
2391
2771
  ]
@@ -2403,45 +2783,36 @@ var Item = ({
2403
2783
  claims,
2404
2784
  exchanges
2405
2785
  }) => {
2406
- const { t } = useTranslation16();
2786
+ const { t } = useTranslation18();
2407
2787
  const isInventoryManaged = item.variant?.manage_inventory;
2408
- const hasInventoryKit = isInventoryManaged && (item.variant?.inventory_items?.length || 0) > 1;
2788
+ const hasInventoryKit = isInventoryManaged && ((item.variant?.inventory_items?.length || 0) > 1 || item.variant?.inventory_items?.some((i) => i.required_quantity > 1));
2409
2789
  const hasUnfulfilledItems = item.quantity - item.detail.fulfilled_quantity > 0;
2410
- return /* @__PURE__ */ jsxs17(Fragment3, { children: [
2411
- /* @__PURE__ */ jsxs17(
2790
+ return /* @__PURE__ */ jsxs19(Fragment3, { children: [
2791
+ /* @__PURE__ */ jsxs19(
2412
2792
  "div",
2413
2793
  {
2414
2794
  className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-x-4 px-6 py-4",
2415
2795
  children: [
2416
- /* @__PURE__ */ jsxs17("div", { className: "flex items-start gap-x-4", children: [
2417
- /* @__PURE__ */ jsx16(Thumbnail, { src: item.thumbnail }),
2418
- /* @__PURE__ */ jsxs17("div", { children: [
2419
- /* @__PURE__ */ jsx16(
2420
- Text11,
2421
- {
2422
- size: "small",
2423
- leading: "compact",
2424
- weight: "plus",
2425
- className: "text-ui-fg-base",
2426
- children: item.title
2427
- }
2428
- ),
2429
- item.variant_sku && /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-x-1", children: [
2430
- /* @__PURE__ */ jsx16(Text11, { size: "small", children: item.variant_sku }),
2431
- /* @__PURE__ */ jsx16(Copy5, { content: item.variant_sku, className: "text-ui-fg-muted" })
2796
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-start gap-x-4", children: [
2797
+ /* @__PURE__ */ jsx18(Thumbnail, { src: item.thumbnail }),
2798
+ /* @__PURE__ */ jsxs19("div", { children: [
2799
+ /* @__PURE__ */ jsx18(Text12, { size: "small", leading: "compact", className: "text-ui-fg-base", children: item.title }),
2800
+ item.variant_sku && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-x-1", children: [
2801
+ /* @__PURE__ */ jsx18(Text12, { size: "small", children: item.variant_sku }),
2802
+ /* @__PURE__ */ jsx18(Copy5, { content: item.variant_sku, className: "text-ui-fg-muted" })
2432
2803
  ] }),
2433
- /* @__PURE__ */ jsx16(Text11, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
2804
+ /* @__PURE__ */ jsx18(Text12, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
2434
2805
  ] })
2435
2806
  ] }),
2436
- /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
2437
- /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsx16(Text11, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
2438
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-x-2", children: [
2439
- /* @__PURE__ */ jsx16("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs17(Text11, { size: "small", children: [
2440
- /* @__PURE__ */ jsx16("span", { className: "tabular-nums", children: item.quantity }),
2807
+ /* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
2808
+ /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsx18(Text12, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
2809
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-x-2", children: [
2810
+ /* @__PURE__ */ jsx18("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs19(Text12, { size: "small", children: [
2811
+ /* @__PURE__ */ jsx18("span", { className: "tabular-nums", children: item.quantity }),
2441
2812
  "x"
2442
2813
  ] }) }),
2443
- /* @__PURE__ */ jsx16("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx16(
2444
- StatusBadge3,
2814
+ /* @__PURE__ */ jsx18("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx18(
2815
+ StatusBadge4,
2445
2816
  {
2446
2817
  color: reservation ? "green" : "orange",
2447
2818
  className: "text-nowrap",
@@ -2449,16 +2820,16 @@ var Item = ({
2449
2820
  }
2450
2821
  ) })
2451
2822
  ] }),
2452
- /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx16(Text11, { size: "small", className: "pt-[1px]", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
2823
+ /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx18(Text12, { size: "small", className: "pt-[1px]", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
2453
2824
  ] })
2454
2825
  ]
2455
2826
  },
2456
2827
  item.id
2457
2828
  ),
2458
- hasInventoryKit && /* @__PURE__ */ jsx16(InventoryKitBreakdown, { item }),
2459
- returns.map((r) => /* @__PURE__ */ jsx16(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id)),
2460
- claims.map((claim) => /* @__PURE__ */ jsx16(ClaimBreakdown, { claim, itemId: item.id }, claim.id)),
2461
- exchanges.map((exchange) => /* @__PURE__ */ jsx16(
2829
+ hasInventoryKit && /* @__PURE__ */ jsx18(InventoryKitBreakdown, { item }),
2830
+ returns.map((r) => /* @__PURE__ */ jsx18(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id)),
2831
+ claims.map((claim) => /* @__PURE__ */ jsx18(ClaimBreakdown, { claim, itemId: item.id }, claim.id)),
2832
+ exchanges.map((exchange) => /* @__PURE__ */ jsx18(
2462
2833
  ExchangeBreakdown,
2463
2834
  {
2464
2835
  exchange,
@@ -2488,9 +2859,9 @@ var ItemBreakdown = ({
2488
2859
  () => new Map((reservations || []).map((r) => [r.line_item_id, r])),
2489
2860
  [reservations]
2490
2861
  );
2491
- return /* @__PURE__ */ jsx16("div", { children: order.items?.map((item) => {
2862
+ return /* @__PURE__ */ jsx18("div", { children: order.items?.map((item) => {
2492
2863
  const reservation = reservationsMap.get(item.id);
2493
- return /* @__PURE__ */ jsx16(
2864
+ return /* @__PURE__ */ jsx18(
2494
2865
  Item,
2495
2866
  {
2496
2867
  item,
@@ -2509,70 +2880,65 @@ var Cost = ({
2509
2880
  value,
2510
2881
  secondaryValue,
2511
2882
  tooltip
2512
- }) => /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-3 items-center", children: [
2513
- /* @__PURE__ */ jsxs17(Text11, { size: "small", leading: "compact", children: [
2883
+ }) => /* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-3 items-center", children: [
2884
+ /* @__PURE__ */ jsxs19(Text12, { size: "small", leading: "compact", children: [
2514
2885
  label,
2515
2886
  " ",
2516
2887
  tooltip
2517
2888
  ] }),
2518
- /* @__PURE__ */ jsx16("div", { className: "text-right", children: /* @__PURE__ */ jsx16(Text11, { size: "small", leading: "compact", children: secondaryValue }) }),
2519
- /* @__PURE__ */ jsx16("div", { className: "text-right", children: /* @__PURE__ */ jsx16(Text11, { size: "small", leading: "compact", children: value }) })
2889
+ /* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text12, { size: "small", leading: "compact", children: secondaryValue }) }),
2890
+ /* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text12, { size: "small", leading: "compact", children: value }) })
2520
2891
  ] });
2521
2892
  var CostBreakdown = ({
2522
2893
  order
2523
2894
  }) => {
2524
- const { t } = useTranslation16();
2525
- const [isTaxOpen, setIsTaxOpen] = useState6(false);
2526
- const [isShippingOpen, setIsShippingOpen] = useState6(false);
2527
- const discountCodes = useMemo3(() => {
2528
- const codes = /* @__PURE__ */ new Set();
2529
- order.items.forEach(
2530
- (item) => item.adjustments?.forEach((adj) => {
2531
- codes.add(adj.code);
2532
- })
2533
- );
2534
- return Array.from(codes).sort();
2535
- }, [order]);
2895
+ const { t } = useTranslation18();
2896
+ const [isTaxOpen, setIsTaxOpen] = useState7(false);
2897
+ const [isShippingOpen, setIsShippingOpen] = useState7(false);
2536
2898
  const taxCodes = useMemo3(() => {
2537
2899
  const taxCodeMap = {};
2538
2900
  order.items.forEach((item) => {
2539
2901
  item.tax_lines?.forEach((line) => {
2540
- taxCodeMap[line.code] = (taxCodeMap[line.code] || 0) + line.total;
2902
+ const currTotal = line.subtotal || 0;
2903
+ const prevTotal = taxCodeMap[line.code]?.total || 0;
2904
+ taxCodeMap[line.code] = {
2905
+ total: prevTotal + currTotal,
2906
+ rate: line.rate
2907
+ };
2541
2908
  });
2542
2909
  });
2543
2910
  order.shipping_methods.forEach((sm) => {
2544
2911
  sm.tax_lines?.forEach((line) => {
2545
- taxCodeMap[line.code] = (taxCodeMap[line.code] || 0) + line.total;
2912
+ const currTotal = line.subtotal || 0;
2913
+ const prevTotal = taxCodeMap[line.code]?.total || 0;
2914
+ taxCodeMap[line.code] = {
2915
+ total: prevTotal + currTotal,
2916
+ rate: line.rate
2917
+ };
2546
2918
  });
2547
2919
  });
2548
2920
  return taxCodeMap;
2549
2921
  }, [order]);
2550
- const automaticTaxesOn = !!order.region?.automatic_taxes;
2551
- const hasTaxLines = !!Object.keys(taxCodes).length;
2552
- const discountTotal = automaticTaxesOn ? order.discount_total : order.discount_subtotal;
2553
- return /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4", children: [
2554
- /* @__PURE__ */ jsx16(
2922
+ const hasTaxes = !!Object.keys(taxCodes).length;
2923
+ return /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4", children: [
2924
+ /* @__PURE__ */ jsx18(
2555
2925
  Cost,
2556
2926
  {
2557
- label: t(
2558
- automaticTaxesOn ? "orders.summary.itemTotal" : "orders.summary.itemSubtotal"
2559
- ),
2560
- value: getLocaleAmount(order.item_total, order.currency_code)
2927
+ label: t("orders.summary.itemSubtotal"),
2928
+ value: getLocaleAmount(order.item_subtotal, order.currency_code)
2561
2929
  }
2562
2930
  ),
2563
- /* @__PURE__ */ jsx16(
2931
+ /* @__PURE__ */ jsx18(
2564
2932
  Cost,
2565
2933
  {
2566
- label: /* @__PURE__ */ jsxs17(
2934
+ label: /* @__PURE__ */ jsxs19(
2567
2935
  "div",
2568
2936
  {
2569
2937
  onClick: () => setIsShippingOpen((o) => !o),
2570
2938
  className: "flex cursor-pointer items-center gap-1",
2571
2939
  children: [
2572
- /* @__PURE__ */ jsx16("span", { children: t(
2573
- automaticTaxesOn ? "orders.summary.shippingTotal" : "orders.summary.shippingSubtotal"
2574
- ) }),
2575
- /* @__PURE__ */ jsx16(
2940
+ /* @__PURE__ */ jsx18("span", { children: t("orders.summary.shippingSubtotal") }),
2941
+ /* @__PURE__ */ jsx18(
2576
2942
  TriangleDownMini,
2577
2943
  {
2578
2944
  style: {
@@ -2583,60 +2949,42 @@ var CostBreakdown = ({
2583
2949
  ]
2584
2950
  }
2585
2951
  ),
2586
- value: getLocaleAmount(
2587
- automaticTaxesOn ? order.shipping_total : order.shipping_subtotal,
2588
- order.currency_code
2589
- )
2952
+ value: getLocaleAmount(order.shipping_subtotal, order.currency_code)
2590
2953
  }
2591
2954
  ),
2592
- isShippingOpen && /* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
2955
+ isShippingOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
2593
2956
  (m1, m2) => m1.created_at.localeCompare(m2.created_at)
2594
2957
  ).map((sm, i) => {
2595
- return /* @__PURE__ */ jsxs17(
2958
+ return /* @__PURE__ */ jsxs19(
2596
2959
  "div",
2597
2960
  {
2598
2961
  className: "flex items-center justify-between gap-x-2",
2599
2962
  children: [
2600
- /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
2963
+ /* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs19("span", { className: "txt-small", children: [
2601
2964
  sm.name,
2602
2965
  sm.detail.return_id && ` (${t("fields.returnShipping")})`,
2603
2966
  " ",
2604
- /* @__PURE__ */ jsx16(shipping_info_popover_default, { shippingMethod: sm }, i)
2967
+ /* @__PURE__ */ jsx18(shipping_info_popover_default, { shippingMethod: sm }, i)
2605
2968
  ] }) }),
2606
- /* @__PURE__ */ jsx16("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx16("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2607
- /* @__PURE__ */ jsx16("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
2608
- automaticTaxesOn ? sm.total : sm.subtotal,
2609
- order.currency_code
2610
- ) })
2969
+ /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2970
+ /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(sm.subtotal, order.currency_code) })
2611
2971
  ]
2612
2972
  },
2613
2973
  sm.id
2614
2974
  );
2615
2975
  }) }),
2616
- /* @__PURE__ */ jsx16(
2617
- Cost,
2618
- {
2619
- label: t(
2620
- automaticTaxesOn ? "orders.summary.discountTotal" : "orders.summary.discountSubtotal"
2621
- ),
2622
- secondaryValue: discountCodes.join(", "),
2623
- value: discountTotal > 0 ? `- ${getLocaleAmount(discountTotal, order.currency_code)}` : "-"
2624
- }
2625
- ),
2626
- /* @__PURE__ */ jsxs17(Fragment3, { children: [
2627
- /* @__PURE__ */ jsxs17("div", { className: "flex justify-between", children: [
2628
- /* @__PURE__ */ jsxs17(
2976
+ /* @__PURE__ */ jsxs19(Fragment3, { children: [
2977
+ /* @__PURE__ */ jsxs19("div", { className: "flex justify-between", children: [
2978
+ /* @__PURE__ */ jsxs19(
2629
2979
  "div",
2630
2980
  {
2631
- onClick: () => hasTaxLines && setIsTaxOpen((o) => !o),
2632
- className: clx2("flex items-center gap-1", {
2633
- "cursor-pointer": hasTaxLines
2981
+ onClick: () => hasTaxes && setIsTaxOpen((o) => !o),
2982
+ className: clx3("flex items-center gap-1", {
2983
+ "cursor-pointer": hasTaxes
2634
2984
  }),
2635
2985
  children: [
2636
- /* @__PURE__ */ jsx16("span", { className: "txt-small select-none", children: t(
2637
- automaticTaxesOn ? "orders.summary.taxTotalIncl" : "orders.summary.taxTotal"
2638
- ) }),
2639
- hasTaxLines && /* @__PURE__ */ jsx16(
2986
+ /* @__PURE__ */ jsx18("span", { className: "txt-small select-none", children: t("orders.summary.taxTotal") }),
2987
+ hasTaxes && /* @__PURE__ */ jsx18(
2640
2988
  TriangleDownMini,
2641
2989
  {
2642
2990
  style: {
@@ -2647,37 +2995,227 @@ var CostBreakdown = ({
2647
2995
  ]
2648
2996
  }
2649
2997
  ),
2650
- /* @__PURE__ */ jsx16("div", { className: "text-right", children: /* @__PURE__ */ jsx16(Text11, { size: "small", leading: "compact", children: getLocaleAmount(order.tax_total, order.currency_code) }) })
2998
+ /* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text12, { size: "small", leading: "compact", children: getLocaleAmount(order.original_tax_total, order.currency_code) }) })
2651
2999
  ] }),
2652
- isTaxOpen && /* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, total]) => {
2653
- return /* @__PURE__ */ jsxs17(
3000
+ isTaxOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, { total, rate }]) => {
3001
+ return /* @__PURE__ */ jsxs19(
2654
3002
  "div",
2655
3003
  {
2656
3004
  className: "flex items-center justify-between gap-x-2",
2657
3005
  children: [
2658
- /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16("span", { className: "txt-small text-ui-fg-subtle font-medium", children: code }) }),
2659
- /* @__PURE__ */ jsx16("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx16("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2660
- /* @__PURE__ */ jsx16("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
3006
+ /* @__PURE__ */ jsxs19("div", { className: "flex gap-1", children: [
3007
+ /* @__PURE__ */ jsx18("span", { className: "txt-small", children: code }),
3008
+ /* @__PURE__ */ jsxs19("span", { className: "txt-small", children: [
3009
+ "(",
3010
+ formatPercentage(rate),
3011
+ ")"
3012
+ ] })
3013
+ ] }),
3014
+ /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3015
+ /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
2661
3016
  ]
2662
3017
  },
2663
3018
  code
2664
3019
  );
2665
3020
  }) })
3021
+ ] }),
3022
+ /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3023
+ /* @__PURE__ */ jsx18(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.total") }),
3024
+ /* @__PURE__ */ jsx18(
3025
+ Text12,
3026
+ {
3027
+ className: "text-ui-fg-subtle text-bold",
3028
+ size: "small",
3029
+ leading: "compact",
3030
+ children: getLocaleAmount(order.original_total, order.currency_code)
3031
+ }
3032
+ )
3033
+ ] })
3034
+ ] });
3035
+ };
3036
+ var DiscountAndTotalBreakdown = ({
3037
+ order,
3038
+ plugins
3039
+ }) => {
3040
+ const { t } = useTranslation18();
3041
+ const [isDiscountOpen, setIsDiscountOpen] = useState7(false);
3042
+ const [isCreditLinesOpen, setIsCreditLinesOpen] = useState7(false);
3043
+ const creditLines = order.credit_lines ?? [];
3044
+ const loyaltyPlugin = getLoyaltyPlugin(plugins);
3045
+ const discounts = useMemo3(() => {
3046
+ const discounts2 = [];
3047
+ if (order.item_discount_total) {
3048
+ discounts2.push({
3049
+ type: "item",
3050
+ total: order.item_discount_total,
3051
+ codes: Array.from(
3052
+ new Set(
3053
+ order.items.flatMap((item) => item.adjustments || []).map((adjustment) => adjustment.code)
3054
+ )
3055
+ ).sort()
3056
+ });
3057
+ }
3058
+ if (order.shipping_discount_total) {
3059
+ discounts2.push({
3060
+ type: "shipping",
3061
+ total: order.shipping_discount_total,
3062
+ codes: Array.from(
3063
+ new Set(
3064
+ order.shipping_methods.flatMap((shippingMethod) => shippingMethod.adjustments || []).map((adjustment) => adjustment.code)
3065
+ )
3066
+ ).sort()
3067
+ });
3068
+ }
3069
+ return discounts2;
3070
+ }, [order]);
3071
+ const hasDiscount = discounts.length > 0;
3072
+ const hasCreditLines = creditLines.length > 0;
3073
+ return /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4", children: [
3074
+ /* @__PURE__ */ jsx18(
3075
+ Cost,
3076
+ {
3077
+ label: /* @__PURE__ */ jsxs19(
3078
+ "div",
3079
+ {
3080
+ onClick: () => hasDiscount && setIsDiscountOpen((o) => !o),
3081
+ className: clx3("flex items-center gap-1", {
3082
+ "cursor-pointer": hasDiscount
3083
+ }),
3084
+ children: [
3085
+ /* @__PURE__ */ jsx18("span", { children: t("orders.summary.discountTotal") }),
3086
+ hasDiscount && /* @__PURE__ */ jsx18(
3087
+ TriangleDownMini,
3088
+ {
3089
+ style: {
3090
+ transform: `rotate(${isDiscountOpen ? 0 : -90}deg)`
3091
+ }
3092
+ }
3093
+ )
3094
+ ]
3095
+ }
3096
+ ),
3097
+ value: getLocaleAmount(order.discount_total, order.currency_code)
3098
+ }
3099
+ ),
3100
+ isDiscountOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: discounts.map(({ type, total, codes }) => {
3101
+ return /* @__PURE__ */ jsxs19(
3102
+ "div",
3103
+ {
3104
+ className: "flex items-center justify-between gap-x-2",
3105
+ children: [
3106
+ /* @__PURE__ */ jsxs19("div", { className: "flex gap-1", children: [
3107
+ /* @__PURE__ */ jsx18("span", { className: "txt-small", children: t(`fields.${type}`) }),
3108
+ /* @__PURE__ */ jsxs19("span", { className: "txt-small", children: [
3109
+ "(",
3110
+ codes.join(", "),
3111
+ ")"
3112
+ ] })
3113
+ ] }),
3114
+ /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3115
+ /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
3116
+ ]
3117
+ },
3118
+ type
3119
+ );
3120
+ }) }),
3121
+ hasCreditLines && /* @__PURE__ */ jsxs19(Fragment3, { children: [
3122
+ /* @__PURE__ */ jsx18(
3123
+ Cost,
3124
+ {
3125
+ label: /* @__PURE__ */ jsxs19(
3126
+ "div",
3127
+ {
3128
+ onClick: () => setIsCreditLinesOpen((o) => !o),
3129
+ className: "flex cursor-pointer items-center gap-1",
3130
+ children: [
3131
+ /* @__PURE__ */ jsx18("span", { children: loyaltyPlugin ? t("orders.giftCardsStoreCreditLines") : t("orders.creditLines.title") }),
3132
+ /* @__PURE__ */ jsx18(
3133
+ TriangleDownMini,
3134
+ {
3135
+ style: {
3136
+ transform: `rotate(${isCreditLinesOpen ? 0 : -90}deg)`
3137
+ }
3138
+ }
3139
+ )
3140
+ ]
3141
+ }
3142
+ ),
3143
+ value: getLocaleAmount(
3144
+ order.credit_line_total,
3145
+ order.currency_code
3146
+ )
3147
+ }
3148
+ ),
3149
+ isCreditLinesOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: creditLines.map((creditLine) => {
3150
+ const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
3151
+ return /* @__PURE__ */ jsxs19(
3152
+ "div",
3153
+ {
3154
+ className: "flex items-center justify-between gap-x-2",
3155
+ children: [
3156
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center", children: [
3157
+ /* @__PURE__ */ jsx18(
3158
+ Text12,
3159
+ {
3160
+ size: "small",
3161
+ leading: "compact",
3162
+ weight: "plus",
3163
+ className: "txt-small text-ui-fg-subtle font-medium",
3164
+ children: /* @__PURE__ */ jsx18(display_id_default, { id: creditLine.id })
3165
+ }
3166
+ ),
3167
+ /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
3168
+ /* @__PURE__ */ jsxs19(
3169
+ Text12,
3170
+ {
3171
+ size: "small",
3172
+ leading: "compact",
3173
+ className: "txt-small text-ui-fg-subtle capitalize",
3174
+ children: [
3175
+ "(",
3176
+ prettyReference,
3177
+ ")"
3178
+ ]
3179
+ }
3180
+ )
3181
+ ] }),
3182
+ /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3183
+ /* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
3184
+ creditLine.amount,
3185
+ order.currency_code
3186
+ ) })
3187
+ ]
3188
+ },
3189
+ creditLine.id
3190
+ );
3191
+ }) })
3192
+ ] }),
3193
+ /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3194
+ /* @__PURE__ */ jsx18(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("orders.summary.totalAfterDiscount") }),
3195
+ /* @__PURE__ */ jsx18(
3196
+ Text12,
3197
+ {
3198
+ className: "text-ui-fg-subtle text-bold",
3199
+ size: "small",
3200
+ leading: "compact",
3201
+ children: getLocaleAmount(order.total, order.currency_code)
3202
+ }
3203
+ )
2666
3204
  ] })
2667
3205
  ] });
2668
3206
  };
2669
3207
  var InventoryKitBreakdown = ({ item }) => {
2670
- const { t } = useTranslation16();
2671
- const [isOpen, setIsOpen] = useState6(false);
3208
+ const { t } = useTranslation18();
3209
+ const [isOpen, setIsOpen] = useState7(false);
2672
3210
  const inventory = item.variant?.inventory_items || [];
2673
- return /* @__PURE__ */ jsxs17(Fragment3, { children: [
2674
- /* @__PURE__ */ jsxs17(
3211
+ return /* @__PURE__ */ jsxs19(Fragment3, { children: [
3212
+ /* @__PURE__ */ jsxs19(
2675
3213
  "div",
2676
3214
  {
2677
3215
  onClick: () => setIsOpen((o) => !o),
2678
3216
  className: "flex cursor-pointer items-center gap-2 border-t border-dashed px-6 py-4",
2679
3217
  children: [
2680
- /* @__PURE__ */ jsx16(
3218
+ /* @__PURE__ */ jsx18(
2681
3219
  TriangleDownMini,
2682
3220
  {
2683
3221
  style: {
@@ -2685,26 +3223,26 @@ var InventoryKitBreakdown = ({ item }) => {
2685
3223
  }
2686
3224
  }
2687
3225
  ),
2688
- /* @__PURE__ */ jsx16("span", { className: "text-ui-fg-muted txt-small select-none", children: t("orders.summary.inventoryKit", { count: inventory.length }) })
3226
+ /* @__PURE__ */ jsx18("span", { className: "text-ui-fg-muted txt-small select-none", children: t("orders.summary.inventoryKit", { count: inventory.length }) })
2689
3227
  ]
2690
3228
  }
2691
3229
  ),
2692
- isOpen && /* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-1 px-6 pb-4", children: inventory.map((i) => {
2693
- return /* @__PURE__ */ jsxs17(
3230
+ isOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 px-6 pb-4", children: inventory.map((i) => {
3231
+ return /* @__PURE__ */ jsxs19(
2694
3232
  "div",
2695
3233
  {
2696
3234
  className: "flex items-center justify-between gap-x-2",
2697
3235
  children: [
2698
- /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
3236
+ /* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs19("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
2699
3237
  i.inventory.title,
2700
- i.inventory.sku && /* @__PURE__ */ jsxs17("span", { className: "text-ui-fg-subtle font-normal", children: [
3238
+ i.inventory.sku && /* @__PURE__ */ jsxs19("span", { className: "text-ui-fg-subtle font-normal", children: [
2701
3239
  " ",
2702
3240
  "\u22C5 ",
2703
3241
  i.inventory.sku
2704
3242
  ] })
2705
3243
  ] }) }),
2706
- /* @__PURE__ */ jsx16("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx16("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2707
- /* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-muted", children: [
3244
+ /* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
3245
+ /* @__PURE__ */ jsxs19("span", { className: "txt-small text-ui-fg-muted", children: [
2708
3246
  i.required_quantity,
2709
3247
  "x"
2710
3248
  ] })
@@ -2719,22 +3257,22 @@ var ReturnBreakdownWithDamages = ({
2719
3257
  orderReturn,
2720
3258
  itemId
2721
3259
  }) => {
2722
- const { t } = useTranslation16();
3260
+ const { t } = useTranslation18();
2723
3261
  const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
2724
3262
  const damagedQuantity = item?.damaged_quantity || 0;
2725
- return item && /* @__PURE__ */ jsxs17(
3263
+ return item && /* @__PURE__ */ jsxs19(
2726
3264
  "div",
2727
3265
  {
2728
3266
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
2729
3267
  children: [
2730
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
2731
- /* @__PURE__ */ jsx16(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2732
- /* @__PURE__ */ jsx16(Text11, { size: "small", children: t(`orders.returns.damagedItemsReturned`, {
3268
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
3269
+ /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3270
+ /* @__PURE__ */ jsx18(Text12, { size: "small", children: t(`orders.returns.damagedItemsReturned`, {
2733
3271
  quantity: damagedQuantity
2734
3272
  }) }),
2735
- item?.note && /* @__PURE__ */ jsx16(Tooltip5, { content: item.note, children: /* @__PURE__ */ jsx16(DocumentText, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
2736
- item?.reason && /* @__PURE__ */ jsx16(
2737
- Badge3,
3273
+ item?.note && /* @__PURE__ */ jsx18(Tooltip7, { content: item.note, children: /* @__PURE__ */ jsx18(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
3274
+ item?.reason && /* @__PURE__ */ jsx18(
3275
+ Badge4,
2738
3276
  {
2739
3277
  size: "2xsmall",
2740
3278
  className: "cursor-default select-none capitalize",
@@ -2743,9 +3281,9 @@ var ReturnBreakdownWithDamages = ({
2743
3281
  }
2744
3282
  )
2745
3283
  ] }),
2746
- /* @__PURE__ */ jsxs17(Text11, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3284
+ /* @__PURE__ */ jsxs19(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2747
3285
  t(`orders.returns.damagedItemReceived`),
2748
- /* @__PURE__ */ jsx16("span", { className: "ml-2", children: /* @__PURE__ */ jsx16(return_info_popover_default, { orderReturn }) })
3286
+ /* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
2749
3287
  ] })
2750
3288
  ]
2751
3289
  },
@@ -2756,7 +3294,7 @@ var ReturnBreakdown = ({
2756
3294
  orderReturn,
2757
3295
  itemId
2758
3296
  }) => {
2759
- const { t } = useTranslation16();
3297
+ const { t } = useTranslation18();
2760
3298
  const { getRelativeDate } = useDate();
2761
3299
  if (!["requested", "received", "partially_received"].includes(
2762
3300
  orderReturn.status || ""
@@ -2766,30 +3304,30 @@ var ReturnBreakdown = ({
2766
3304
  const isRequested = orderReturn.status === "requested";
2767
3305
  const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
2768
3306
  const damagedQuantity = item?.damaged_quantity || 0;
2769
- return item && /* @__PURE__ */ jsxs17(Fragment3, { children: [
2770
- damagedQuantity > 0 && /* @__PURE__ */ jsx16(
3307
+ return item && /* @__PURE__ */ jsxs19(Fragment3, { children: [
3308
+ damagedQuantity > 0 && /* @__PURE__ */ jsx18(
2771
3309
  ReturnBreakdownWithDamages,
2772
3310
  {
2773
3311
  orderReturn,
2774
3312
  itemId
2775
3313
  }
2776
3314
  ),
2777
- /* @__PURE__ */ jsxs17(
3315
+ /* @__PURE__ */ jsxs19(
2778
3316
  "div",
2779
3317
  {
2780
3318
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
2781
3319
  children: [
2782
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
2783
- /* @__PURE__ */ jsx16(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2784
- /* @__PURE__ */ jsx16(Text11, { size: "small", children: t(
3320
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
3321
+ /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3322
+ /* @__PURE__ */ jsx18(Text12, { size: "small", children: t(
2785
3323
  `orders.returns.${isRequested ? "returnRequestedInfo" : "returnReceivedInfo"}`,
2786
3324
  {
2787
3325
  requestedItemsCount: item?.[isRequested ? "quantity" : "received_quantity"]
2788
3326
  }
2789
3327
  ) }),
2790
- item?.note && /* @__PURE__ */ jsx16(Tooltip5, { content: item.note, children: /* @__PURE__ */ jsx16(DocumentText, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
2791
- item?.reason && /* @__PURE__ */ jsx16(
2792
- Badge3,
3328
+ item?.note && /* @__PURE__ */ jsx18(Tooltip7, { content: item.note, children: /* @__PURE__ */ jsx18(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
3329
+ item?.reason && /* @__PURE__ */ jsx18(
3330
+ Badge4,
2793
3331
  {
2794
3332
  size: "2xsmall",
2795
3333
  className: "cursor-default select-none capitalize",
@@ -2798,13 +3336,13 @@ var ReturnBreakdown = ({
2798
3336
  }
2799
3337
  )
2800
3338
  ] }),
2801
- orderReturn && isRequested && /* @__PURE__ */ jsxs17(Text11, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3339
+ orderReturn && isRequested && /* @__PURE__ */ jsxs19(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2802
3340
  getRelativeDate(orderReturn.created_at),
2803
- /* @__PURE__ */ jsx16("span", { className: "ml-2", children: /* @__PURE__ */ jsx16(return_info_popover_default, { orderReturn }) })
3341
+ /* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
2804
3342
  ] }),
2805
- orderReturn && !isRequested && /* @__PURE__ */ jsxs17(Text11, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
3343
+ orderReturn && !isRequested && /* @__PURE__ */ jsxs19(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2806
3344
  t(`orders.returns.itemReceived`),
2807
- /* @__PURE__ */ jsx16("span", { className: "ml-2", children: /* @__PURE__ */ jsx16(return_info_popover_default, { orderReturn }) })
3345
+ /* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
2808
3346
  ] })
2809
3347
  ]
2810
3348
  },
@@ -2816,26 +3354,26 @@ var ClaimBreakdown = ({
2816
3354
  claim,
2817
3355
  itemId
2818
3356
  }) => {
2819
- const { t } = useTranslation16();
3357
+ const { t } = useTranslation18();
2820
3358
  const { getRelativeDate } = useDate();
2821
3359
  const items = claim.additional_items.filter(
2822
3360
  (item) => item.item?.id === itemId
2823
3361
  );
2824
- return !!items.length && /* @__PURE__ */ jsxs17(
3362
+ return !!items.length && /* @__PURE__ */ jsxs19(
2825
3363
  "div",
2826
3364
  {
2827
3365
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-b-2 border-t-2 border-dotted px-6 py-4",
2828
3366
  children: [
2829
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
2830
- /* @__PURE__ */ jsx16(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2831
- /* @__PURE__ */ jsx16(Text11, { size: "small", children: t(`orders.claims.outboundItemAdded`, {
3367
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
3368
+ /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3369
+ /* @__PURE__ */ jsx18(Text12, { size: "small", children: t(`orders.claims.outboundItemAdded`, {
2832
3370
  itemsCount: items.reduce(
2833
3371
  (acc, item) => acc = acc + item.quantity,
2834
3372
  0
2835
3373
  )
2836
3374
  }) })
2837
3375
  ] }),
2838
- /* @__PURE__ */ jsx16(Text11, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(claim.created_at) })
3376
+ /* @__PURE__ */ jsx18(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(claim.created_at) })
2839
3377
  ]
2840
3378
  },
2841
3379
  claim.id
@@ -2845,99 +3383,64 @@ var ExchangeBreakdown = ({
2845
3383
  exchange,
2846
3384
  itemId
2847
3385
  }) => {
2848
- const { t } = useTranslation16();
3386
+ const { t } = useTranslation18();
2849
3387
  const { getRelativeDate } = useDate();
2850
3388
  const items = exchange.additional_items.filter(
2851
3389
  (item) => item?.item?.id === itemId
2852
3390
  );
2853
- return !!items.length && /* @__PURE__ */ jsxs17(
3391
+ return !!items.length && /* @__PURE__ */ jsxs19(
2854
3392
  "div",
2855
3393
  {
2856
3394
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-b-2 border-t-2 border-dotted px-6 py-4",
2857
3395
  children: [
2858
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
2859
- /* @__PURE__ */ jsx16(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2860
- /* @__PURE__ */ jsx16(Text11, { size: "small", children: t(`orders.exchanges.outboundItemAdded`, {
3396
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
3397
+ /* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
3398
+ /* @__PURE__ */ jsx18(Text12, { size: "small", children: t(`orders.exchanges.outboundItemAdded`, {
2861
3399
  itemsCount: items.reduce(
2862
3400
  (acc, item) => acc = acc + item.quantity,
2863
3401
  0
2864
3402
  )
2865
3403
  }) })
2866
3404
  ] }),
2867
- /* @__PURE__ */ jsx16(Text11, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(exchange.created_at) })
3405
+ /* @__PURE__ */ jsx18(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(exchange.created_at) })
2868
3406
  ]
2869
3407
  },
2870
3408
  exchange.id
2871
3409
  );
2872
3410
  };
2873
- var Total = ({ order }) => {
2874
- const { t } = useTranslation16();
2875
- return /* @__PURE__ */ jsxs17("div", { className: " flex flex-col gap-y-2 px-6 py-4", children: [
2876
- /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
2877
- /* @__PURE__ */ jsx16(
2878
- Text11,
2879
- {
2880
- weight: "plus",
2881
- className: "text-ui-fg-subtle",
2882
- size: "small",
2883
- leading: "compact",
2884
- children: t("fields.total")
2885
- }
2886
- ),
2887
- /* @__PURE__ */ jsx16(
2888
- Text11,
2889
- {
2890
- weight: "plus",
2891
- className: "text-ui-fg-subtle",
2892
- size: "small",
2893
- leading: "compact",
2894
- children: getStylizedAmount(order.total, order.currency_code)
2895
- }
2896
- )
3411
+ var Total2 = ({ order }) => {
3412
+ const { t } = useTranslation18();
3413
+ return /* @__PURE__ */ jsxs19("div", { className: " flex flex-col gap-y-2 px-6 py-4", children: [
3414
+ /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3415
+ /* @__PURE__ */ jsx18(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.paidTotal") }),
3416
+ /* @__PURE__ */ jsx18(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
3417
+ getTotalCaptured(order.payment_collections || []),
3418
+ order.currency_code
3419
+ ) })
2897
3420
  ] }),
2898
- /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
2899
- /* @__PURE__ */ jsx16(
2900
- Text11,
2901
- {
2902
- weight: "plus",
2903
- className: "text-ui-fg-subtle",
2904
- size: "small",
2905
- leading: "compact",
2906
- children: t("fields.paidTotal")
2907
- }
2908
- ),
2909
- /* @__PURE__ */ jsx16(
2910
- Text11,
2911
- {
2912
- weight: "plus",
2913
- className: "text-ui-fg-subtle",
2914
- size: "small",
2915
- leading: "compact",
2916
- children: getStylizedAmount(
2917
- getTotalCaptured(order.payment_collections || []),
2918
- order.currency_code
2919
- )
2920
- }
2921
- )
3421
+ getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3422
+ /* @__PURE__ */ jsx18(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.creditTotal") }),
3423
+ /* @__PURE__ */ jsx18(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
3424
+ getTotalCreditLines(order.credit_lines ?? []),
3425
+ order.currency_code
3426
+ ) })
2922
3427
  ] }),
2923
- /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
2924
- /* @__PURE__ */ jsx16(
2925
- Text11,
3428
+ /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3429
+ /* @__PURE__ */ jsx18(
3430
+ Text12,
2926
3431
  {
2927
3432
  className: "text-ui-fg-subtle text-semibold",
2928
3433
  size: "small",
2929
3434
  leading: "compact",
2930
- weight: "plus",
2931
3435
  children: t("orders.returns.outstandingAmount")
2932
3436
  }
2933
3437
  ),
2934
- /* @__PURE__ */ jsx16(
2935
- Text11,
3438
+ /* @__PURE__ */ jsx18(
3439
+ Text12,
2936
3440
  {
2937
3441
  className: "text-ui-fg-subtle text-bold",
2938
3442
  size: "small",
2939
3443
  leading: "compact",
2940
- weight: "plus",
2941
3444
  children: getStylizedAmount(
2942
3445
  order.summary.pending_difference || 0,
2943
3446
  order.currency_code
@@ -2949,11 +3452,12 @@ var Total = ({ order }) => {
2949
3452
  };
2950
3453
 
2951
3454
  // src/routes/orders/order-detail/order-detail.tsx
2952
- import { jsx as jsx17, jsxs as jsxs18 } from "react/jsx-runtime";
3455
+ import { jsx as jsx19, jsxs as jsxs20 } from "react/jsx-runtime";
2953
3456
  var OrderDetail = () => {
2954
3457
  const initialData = useLoaderData();
2955
3458
  const { id } = useParams();
2956
3459
  const { getWidgets } = useExtension();
3460
+ const { plugins = [] } = usePlugins();
2957
3461
  const { order, isLoading, isError, error } = useOrder(
2958
3462
  id,
2959
3463
  {
@@ -2978,12 +3482,12 @@ var OrderDetail = () => {
2978
3482
  id
2979
3483
  );
2980
3484
  if (isLoading || !order || isPreviewLoading) {
2981
- return /* @__PURE__ */ jsx17(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
3485
+ return /* @__PURE__ */ jsx19(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
2982
3486
  }
2983
3487
  if (isError) {
2984
3488
  throw error;
2985
3489
  }
2986
- return /* @__PURE__ */ jsxs18(
3490
+ return /* @__PURE__ */ jsxs20(
2987
3491
  TwoColumnPage,
2988
3492
  {
2989
3493
  widgets: {
@@ -2997,19 +3501,19 @@ var OrderDetail = () => {
2997
3501
  showMetadata: true,
2998
3502
  hasOutlet: true,
2999
3503
  children: [
3000
- /* @__PURE__ */ jsxs18(TwoColumnPage.Main, { children: [
3001
- /* @__PURE__ */ jsx17(OrderActiveEditSection, { order }),
3002
- /* @__PURE__ */ jsx17(ActiveOrderClaimSection, { orderPreview }),
3003
- /* @__PURE__ */ jsx17(ActiveOrderExchangeSection, { orderPreview }),
3004
- /* @__PURE__ */ jsx17(ActiveOrderReturnSection, { orderPreview }),
3005
- /* @__PURE__ */ jsx17(OrderGeneralSection, { order }),
3006
- /* @__PURE__ */ jsx17(OrderSummarySection, { order }),
3007
- /* @__PURE__ */ jsx17(OrderPaymentSection, { order }),
3008
- /* @__PURE__ */ jsx17(OrderFulfillmentSection, { order })
3504
+ /* @__PURE__ */ jsxs20(TwoColumnPage.Main, { children: [
3505
+ /* @__PURE__ */ jsx19(OrderActiveEditSection, { order }),
3506
+ /* @__PURE__ */ jsx19(ActiveOrderClaimSection, { orderPreview }),
3507
+ /* @__PURE__ */ jsx19(ActiveOrderExchangeSection, { orderPreview }),
3508
+ /* @__PURE__ */ jsx19(ActiveOrderReturnSection, { orderPreview }),
3509
+ /* @__PURE__ */ jsx19(OrderGeneralSection, { order }),
3510
+ /* @__PURE__ */ jsx19(OrderSummarySection, { order, plugins }),
3511
+ /* @__PURE__ */ jsx19(OrderPaymentSection, { order, plugins }),
3512
+ /* @__PURE__ */ jsx19(OrderFulfillmentSection, { order })
3009
3513
  ] }),
3010
- /* @__PURE__ */ jsxs18(TwoColumnPage.Sidebar, { children: [
3011
- /* @__PURE__ */ jsx17(OrderCustomerSection, { order }),
3012
- /* @__PURE__ */ jsx17(OrderActivitySection, { order })
3514
+ /* @__PURE__ */ jsxs20(TwoColumnPage.Sidebar, { children: [
3515
+ /* @__PURE__ */ jsx19(OrderCustomerSection, { order }),
3516
+ /* @__PURE__ */ jsx19(OrderActivitySection, { order })
3013
3517
  ] })
3014
3518
  ]
3015
3519
  }