@mercurjs/vendor 2.2.1 → 2.3.0-canary.0

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 (204) hide show
  1. package/dist/{[id]-47SUX5X3.js → [id]-3IFUEMOA.js} +12 -9
  2. package/dist/{[id]-PIB2DEVI.js → [id]-3NM7G2QP.js} +11 -8
  3. package/dist/[id]-3TCOLUQH.js +197 -0
  4. package/dist/{[id]-SKU5SFBG.js → [id]-4IWSF6TW.js} +137 -204
  5. package/dist/{[id]-BPQNQFVE.js → [id]-AMZFAAJ3.js} +75 -124
  6. package/dist/[id]-C3TB6V2O.js +286 -0
  7. package/dist/{[id]-NGRV5I2A.js → [id]-HEDNHQ5Z.js} +8 -6
  8. package/dist/[id]-KFACDZAI.js +949 -0
  9. package/dist/{[id]-BHU5BSQT.js → [id]-KFRGBNLH.js} +19 -16
  10. package/dist/{[id]-OE5TUWNF.js → [id]-OVWD6DNG.js} +8 -6
  11. package/dist/{[id]-RJRAZN3T.js → [id]-PJ2K4O3C.js} +7 -5
  12. package/dist/{[id]-ZD5HBP2R.js → [id]-ROMWNPJA.js} +13 -10
  13. package/dist/[id]-UPNI3OCU.js +697 -0
  14. package/dist/{[id]-YB3DBBXT.js → [id]-YFLQXZGC.js} +12 -9
  15. package/dist/{[province_id]-CUWKNPBW.js → [province_id]-IM22PLJP.js} +8 -6
  16. package/dist/{add-YEUSE5QA.js → add-AUSWWCA3.js} +9 -7
  17. package/dist/{add-MYV5IOGP.js → add-MBCWT6XT.js} +157 -227
  18. package/dist/{add-customer-groups-Q3F357F2.js → add-customer-groups-3FD754Z2.js} +7 -5
  19. package/dist/{add-products-WVNYODC6.js → add-products-IS22SHHN.js} +12 -9
  20. package/dist/{add-promotions-F62YE3BE.js → add-promotions-VDD5PKMN.js} +27 -9
  21. package/dist/{add-to-campaign-WBSCTSKW.js → add-to-campaign-B3PGGNFA.js} +3 -2
  22. package/dist/{address-ZMZ4ST5T.js → address-7HSQSXUS.js} +6 -4
  23. package/dist/{adjust-inventory-QUGKDXOC.js → adjust-inventory-2OKDFVLK.js} +2 -3
  24. package/dist/{allocate-items-7NSBGXSF.js → allocate-items-QAYROQMK.js} +4 -2
  25. package/dist/{areas-EJCZBY2E.js → areas-WQ44GWQO.js} +2 -2
  26. package/dist/{breadcrumb-M657ZCG6.js → breadcrumb-4I7MU2QY.js} +1 -1
  27. package/dist/{breadcrumb-KNBZ3JNR.js → breadcrumb-7ZFC43R4.js} +1 -1
  28. package/dist/{breadcrumb-C7M5PG2Q.js → breadcrumb-IDLCUHX3.js} +6 -4
  29. package/dist/{breadcrumb-MXYWEBK6.js → breadcrumb-OXRGEOVL.js} +6 -4
  30. package/dist/{breadcrumb-JWFTKHLE.js → breadcrumb-RQ52GELM.js} +2 -1
  31. package/dist/{breadcrumb-QPV566YX.js → breadcrumb-UDSK4EUS.js} +7 -5
  32. package/dist/breadcrumb-XCPUUZUO.js +26 -0
  33. package/dist/{campaigns-BPLAE6QQ.js → campaigns-LIPKZKI7.js} +5 -4
  34. package/dist/{categories-H2XAJCGC.js → categories-D2U6VLH5.js} +2 -2
  35. package/dist/{chunk-4RVWITM2.js → chunk-3JWHERV7.js} +76 -23
  36. package/dist/{chunk-BCXREBMV.js → chunk-4ATO577Q.js} +1 -1
  37. package/dist/{chunk-VHFKJLDH.js → chunk-4JVORTN4.js} +1 -1
  38. package/dist/{chunk-HHD2VUED.js → chunk-4UKAKFKL.js} +1 -1
  39. package/dist/{chunk-3L7WHWKB.js → chunk-5DRYAIOY.js} +3 -3
  40. package/dist/{chunk-7TIZP4YG.js → chunk-5RWK4U4V.js} +26 -0
  41. package/dist/{chunk-UEKRQS5Q.js → chunk-6ECHPZS3.js} +2 -2
  42. package/dist/{chunk-IWAL74YU.js → chunk-6GQLSWOO.js} +1 -1
  43. package/dist/{chunk-HCUIYIIY.js → chunk-6OZQTHCR.js} +1 -1
  44. package/dist/chunk-6XMUN2BZ.js +0 -0
  45. package/dist/{chunk-RLRWDHME.js → chunk-6YQR2AWM.js} +3 -20
  46. package/dist/{chunk-26OOAKQ6.js → chunk-7H6NMQ6U.js} +8 -1
  47. package/dist/{chunk-SVYBMLVN.js → chunk-7J2QRH4V.js} +1 -1
  48. package/dist/chunk-7LIENHWP.js +26 -0
  49. package/dist/{chunk-EPSRO7C5.js → chunk-7LIT4GXO.js} +2 -2
  50. package/dist/chunk-7POOMBIN.js +108 -0
  51. package/dist/{chunk-SDFZUBS3.js → chunk-CDZALZ5E.js} +1 -1
  52. package/dist/{chunk-72HQFLZI.js → chunk-CSEB2RNO.js} +1 -1
  53. package/dist/{chunk-X6ZQMFCT.js → chunk-DAOSTHVB.js} +44 -25
  54. package/dist/chunk-FKKI62AC.js +282 -0
  55. package/dist/{chunk-VBKW4GWP.js → chunk-FPBXQIFJ.js} +1 -1
  56. package/dist/{chunk-SI55QRZ4.js → chunk-G5NNOOHR.js} +59 -6
  57. package/dist/chunk-G6J5ZKM3.js +31 -0
  58. package/dist/{chunk-U5V6HNVW.js → chunk-GL3XVUAY.js} +1 -1
  59. package/dist/{chunk-RJE4MAYB.js → chunk-GYLRZXWS.js} +1 -1
  60. package/dist/{chunk-3XW55FZY.js → chunk-IYQHEISY.js} +6 -6
  61. package/dist/chunk-IZI2PKL7.js +27 -0
  62. package/dist/chunk-JN6MHI6V.js +334 -0
  63. package/dist/{chunk-YUQA6TUA.js → chunk-JOCO7JOB.js} +3 -3
  64. package/dist/{chunk-OGUTFP6B.js → chunk-JYUHDM23.js} +13 -51
  65. package/dist/{chunk-QB7BI4B7.js → chunk-K2DXXPNA.js} +153 -86
  66. package/dist/{chunk-XG76XXM2.js → chunk-KKMA6VPG.js} +1 -1
  67. package/dist/chunk-KVAD5JGS.js +11 -0
  68. package/dist/{chunk-YRZ53SAN.js → chunk-L26J5MO2.js} +2 -2
  69. package/dist/{chunk-FEVCBT24.js → chunk-LOSVZJXS.js} +2 -2
  70. package/dist/{chunk-63XYNXUL.js → chunk-LYP7XK5O.js} +1 -1
  71. package/dist/chunk-MVVFD2JT.js +51 -0
  72. package/dist/{chunk-RVFPWOR2.js → chunk-MY5H7C3A.js} +2 -2
  73. package/dist/{chunk-GTNCNKTC.js → chunk-NP5TISFX.js} +1 -1
  74. package/dist/{chunk-3GSR455R.js → chunk-NQMHP2LC.js} +1 -1
  75. package/dist/{chunk-2S2WK2OG.js → chunk-NV2RZAHW.js} +1 -10
  76. package/dist/{chunk-4IIATKG7.js → chunk-O7OWHKWA.js} +6 -6
  77. package/dist/{chunk-GIKVFOQL.js → chunk-OJCMHDZI.js} +2 -2
  78. package/dist/chunk-QLOJNFUE.js +53 -0
  79. package/dist/{chunk-OKJHUQBY.js → chunk-QSS7ATY3.js} +15 -27
  80. package/dist/{chunk-XVBONKRV.js → chunk-RCMKDW6O.js} +1 -1
  81. package/dist/{chunk-WJF24CGA.js → chunk-RDLVH6CM.js} +33 -5
  82. package/dist/chunk-SF5N2HX4.js +268 -0
  83. package/dist/{chunk-MQR26KYT.js → chunk-SYHA2RVL.js} +1 -1
  84. package/dist/{chunk-ZXDMPIXN.js → chunk-U3OEGBHH.js} +2 -2
  85. package/dist/{chunk-EJBOBB4B.js → chunk-V3N2Y4OL.js} +46 -46
  86. package/dist/{chunk-UUBGLS7U.js → chunk-V43BEBDT.js} +187 -35
  87. package/dist/{chunk-VBRTC2VU.js → chunk-VAFGNDAP.js} +4 -3
  88. package/dist/{chunk-4UQMRTSC.js → chunk-VH3TGSWE.js} +46 -2
  89. package/dist/{chunk-ZEKV7LGF.js → chunk-VV2K3EBF.js} +1 -1
  90. package/dist/{chunk-S2VYK3YC.js → chunk-WI2ZAFZF.js} +1 -1
  91. package/dist/chunk-WP3B4NEU.js +32 -0
  92. package/dist/{chunk-DY3XQPHC.js → chunk-WW2XYOHJ.js} +5 -3
  93. package/dist/{chunk-IVYIMGQC.js → chunk-X44P463Q.js} +45 -10
  94. package/dist/{chunk-R5KN6IFB.js → chunk-XHWBTV72.js} +2 -2
  95. package/dist/{chunk-OVHIUZ3K.js → chunk-XQ47NZJC.js} +1 -1
  96. package/dist/{chunk-LN7XHEPJ.js → chunk-YT4RAUWM.js} +2 -2
  97. package/dist/{chunk-6VKJM537.js → chunk-ZK4DIDXG.js} +1 -1
  98. package/dist/{collections-52DJLHWW.js → collections-3MEKABDT.js} +13 -12
  99. package/dist/{configuration-UMRBE5RQ.js → configuration-QK2FW2CV.js} +2 -2
  100. package/dist/{configuration-QEDVL2WF.js → configuration-RYH3VUBV.js} +15 -48
  101. package/dist/{create-ALUKAFJS.js → create-5M66YUYY.js} +2 -2
  102. package/dist/{create-ABRPUMHQ.js → create-75C65ZIS.js} +6 -5
  103. package/dist/{create-6IRD2CVC.js → create-A3CQXIRQ.js} +11 -9
  104. package/dist/{create-LYNWCP2N.js → create-GYNDVCY2.js} +5 -4
  105. package/dist/create-ICCAEOSA.js +343 -0
  106. package/dist/{create-5RQ32XPT.js → create-KBDT33O2.js} +287 -287
  107. package/dist/{create-GEYXN6SW.js → create-L5HMOVY5.js} +6 -4
  108. package/dist/{create-MFGMTZ5A.js → create-M2W5N6QV.js} +7 -5
  109. package/dist/{create-NTZH45DW.js → create-NSJGRO4L.js} +13 -11
  110. package/dist/{create-H77ZUZG5.js → create-O4K6TO4G.js} +9 -7
  111. package/dist/{create-S7VYYTUD.js → create-PW5L3MJI.js} +9 -7
  112. package/dist/{create-7SJ5DSQK.js → create-UQ26QTPQ.js} +19 -16
  113. package/dist/{create-2I3GAX4C.js → create-WIGBFSRH.js} +15 -6
  114. package/dist/{create-7FT7N2NH.js → create-WPN3OUJU.js} +3 -2
  115. package/dist/{create-G76MVCJU.js → create-ZVGYET6W.js} +5 -4
  116. package/dist/customer-availability-VAOKKCTK.js +164 -0
  117. package/dist/{customer-group-add-customers-T7OYWJCB.js → customer-group-add-customers-BSMUKWVO.js} +1 -1
  118. package/dist/{customer-group-detail-E7HRZ3LE.js → customer-group-detail-QCPC2YWK.js} +2 -2
  119. package/dist/{customer-groups-26HJ55MF.js → customer-groups-6WGUNFHG.js} +2 -2
  120. package/dist/{customers-EXFRZX5F.js → customers-7OGYQSGA.js} +2 -2
  121. package/dist/edit-2BKYNGYL.js +262 -0
  122. package/dist/{edit-M4AP65HO.js → edit-32ZGQUWZ.js} +7 -5
  123. package/dist/{edit-MPOTIGUY.js → edit-3OXHBHY4.js} +22 -38
  124. package/dist/{edit-2RN3OT27.js → edit-7T2JMZG3.js} +7 -56
  125. package/dist/{edit-6VJWRZHQ.js → edit-AFWQY3BZ.js} +6 -4
  126. package/dist/{edit-NB5VN2E4.js → edit-EDXF3T7F.js} +4 -3
  127. package/dist/edit-GJCXPD5A.js +81 -0
  128. package/dist/{edit-WHGYNDEB.js → edit-KOLDPZ4H.js} +19 -16
  129. package/dist/{edit-TIBQEQVV.js → edit-LZFD3RSY.js} +9 -7
  130. package/dist/{edit-QBUYHSE7.js → edit-QVK3BEPA.js} +7 -5
  131. package/dist/{edit-EGBVEWXS.js → edit-ZLZR7F33.js} +8 -6
  132. package/dist/{edit-H5FJ45ZT.js → edit-ZM7NJVRE.js} +1 -1
  133. package/dist/{edit-budget-PYPHUJPW.js → edit-budget-MOZETGZV.js} +1 -1
  134. package/dist/{edit-inventory-item-BCVECCLT.js → edit-inventory-item-HFGHS732.js} +17 -14
  135. package/dist/{edit-inventory-item-attributes-GWEMP67O.js → edit-inventory-item-attributes-5ORZJF4I.js} +18 -1
  136. package/dist/edit-reservation-LSYQUDYQ.js +294 -0
  137. package/dist/extension-targets.d.ts +6 -3
  138. package/dist/{fulfillment-HDU7GATG.js → fulfillment-TVRF5TID.js} +6 -4
  139. package/dist/{fulfillment-providers-6RZNNT7U.js → fulfillment-providers-TEV23LGB.js} +11 -10
  140. package/dist/index.css +14 -14
  141. package/dist/index.js +252 -146
  142. package/dist/{inventory-XJ2E6DPC.js → inventory-CMIRAJJY.js} +2 -2
  143. package/dist/{invite-755AJC3M.js → invite-K3R2GRYF.js} +6 -4
  144. package/dist/{invite-FD2TXZTW.js → invite-ZMIYLOWJ.js} +9 -7
  145. package/dist/{login-UGKYRKMD.js → login-LG3XH6B2.js} +8 -6
  146. package/dist/{manage-locations-PRQI5TI4.js → manage-locations-5B4HP6NQ.js} +24 -5
  147. package/dist/{media-TGFAHFBV.js → media-DY2XDZYT.js} +7 -5
  148. package/dist/{media-2KEHXPRU.js → media-OGO6M3CP.js} +10 -8
  149. package/dist/{metadata-BQQFHVKF.js → metadata-AW5Y72BI.js} +6 -4
  150. package/dist/metadata-HS6CLO4Z.js +69 -0
  151. package/dist/{metadata-5TVRCKWX.js → metadata-HXXVD3VP.js} +6 -4
  152. package/dist/{metadata-7JWZ4VFM.js → metadata-TXNUZBPX.js} +6 -4
  153. package/dist/{metadata-G73TILNE.js → metadata-UVOHT2VF.js} +6 -4
  154. package/dist/{metadata-4ZZ4ZIWJ.js → metadata-ZBSZL74N.js} +6 -4
  155. package/dist/{offer-create-page-PPXRYET4.js → offer-create-page-53P65U2V.js} +11 -8
  156. package/dist/{offer-detail-page-BFGKAS4L.js → offer-detail-page-BGFLDXO7.js} +1 -1
  157. package/dist/{offer-variant-detail-page-BLHRF4MK.js → offer-variant-detail-page-DCTRZUTM.js} +1 -1
  158. package/dist/{offers-7I67VSHI.js → offers-5776XUH5.js} +13 -9
  159. package/dist/{onboarding-7MURQYXX.js → onboarding-ROLIHG3L.js} +6 -4
  160. package/dist/{orders-D7NZNDUS.js → orders-VA3HNJAY.js} +12 -11
  161. package/dist/{organization-T6ZTYMMW.js → organization-UH4IUA62.js} +8 -6
  162. package/dist/pages/index.d.ts +9 -1
  163. package/dist/pages/index.js +53 -44
  164. package/dist/{payment-details-UQ65D5AY.js → payment-details-CD4GZEUL.js} +6 -4
  165. package/dist/{payouts-A336D2HG.js → payouts-26ZOYDRP.js} +2 -2
  166. package/dist/{price-lists-3WRT4TR2.js → price-lists-U5ASDHMI.js} +5 -8
  167. package/dist/{pricing-CPPIL627.js → pricing-SWUZSQL3.js} +8 -6
  168. package/dist/{product-tags-7DTA73YT.js → product-tags-4V65LOJJ.js} +19 -16
  169. package/dist/{product-types-OB26NF2D.js → product-types-CMI33S32.js} +3 -4
  170. package/dist/{product-variant-detail-4DDE6RJ5.js → product-variant-detail-NW3LQZE7.js} +6 -4
  171. package/dist/{product-variant-edit-SAZUI4E3.js → product-variant-edit-MNYFEZND.js} +9 -7
  172. package/dist/{products-RYXTZFGT.js → products-L2H6HOL2.js} +18 -15
  173. package/dist/{products-GJ2KTGBZ.js → products-YIF6FPBO.js} +12 -9
  174. package/dist/{professional-details-UN5B4YDJ.js → professional-details-QO5BWMRD.js} +6 -4
  175. package/dist/{profile-6MIDTK52.js → profile-2KKBVKAL.js} +6 -4
  176. package/dist/{promotions-SQ47TCZL.js → promotions-C5YWXVP5.js} +5 -5
  177. package/dist/{receive-ZG6FFN7H.js → receive-RRZK3FP2.js} +4 -3
  178. package/dist/{refund-KJX74N6T.js → refund-FLCZAMPR.js} +3 -2
  179. package/dist/{register-RDSK4E4D.js → register-SZ2T6QQA.js} +8 -6
  180. package/dist/reservations-C326XEVA.js +350 -0
  181. package/dist/{reset-password-C462PDN2.js → reset-password-H66R27K4.js} +1 -1
  182. package/dist/respond-IPRDCH57.js +132 -0
  183. package/dist/{return-reasons-MY63HNF6.js → return-reasons-2BUKIQBO.js} +9 -7
  184. package/dist/reviews-LBLCFBRQ.js +14 -0
  185. package/dist/{settings-TJ6HPHMK.js → settings-THSRJ5WS.js} +26 -23
  186. package/dist/{shipment-6CTA2GHU.js → shipment-X2WWJ3AE.js} +6 -4
  187. package/dist/{shipping-profile-CFISOMTE.js → shipping-profile-7P3RPEIJ.js} +1 -1
  188. package/dist/{shipping-profiles-5UAZNYKJ.js → shipping-profiles-JPBRRMPD.js} +8 -6
  189. package/dist/{stock-465GEUY3.js → stock-UMESDWV5.js} +21 -7
  190. package/dist/{store-2PQB2XWE.js → store-5YMOSKVT.js} +7 -5
  191. package/dist/{store-closure-DYW54VHB.js → store-closure-EPGDOV7U.js} +6 -4
  192. package/dist/{store-select-6A5YR7WH.js → store-select-JEEV4V57.js} +7 -5
  193. package/dist/{team-GXEBC57M.js → team-R6ARMF73.js} +9 -7
  194. package/package.json +12 -9
  195. package/dist/[id]-HEVGSOAV.js +0 -598
  196. package/dist/[id]-MU7A6SZO.js +0 -526
  197. package/dist/chunk-2ZFELO2L.js +0 -13
  198. package/dist/chunk-6IJMSVC6.js +0 -16
  199. package/dist/chunk-BNOKKKUU.js +0 -88
  200. package/dist/chunk-BX3JE7IE.js +0 -247
  201. package/dist/edit-4B364HGZ.js +0 -222
  202. package/dist/edit-SQU5UOGE.js +0 -105
  203. package/dist/{[location_id]-OXNC5E4F.js → [location_id]-IGPM7LDR.js} +1 -1
  204. package/dist/{chunk-CYE7HVAV.js → chunk-SCJBJQCL.js} +3 -3
@@ -1,5 +1,7 @@
1
1
  import {
2
- inventoryItemLevelsQueryKeys,
2
+ reservationItemsQueryKeys
3
+ } from "./chunk-7POOMBIN.js";
4
+ import {
3
5
  inventoryItemsQueryKeys
4
6
  } from "./chunk-EMUCGKHP.js";
5
7
  import {
@@ -13,48 +15,10 @@ import {
13
15
  } from "./chunk-DTGEFKK4.js";
14
16
 
15
17
  // src/hooks/api/orders.tsx
16
- import {
17
- useMutation as useMutation2,
18
- useQuery as useQuery2
19
- } from "@tanstack/react-query";
20
-
21
- // src/hooks/api/reservations.tsx
22
18
  import {
23
19
  useMutation,
24
20
  useQuery
25
21
  } from "@tanstack/react-query";
26
- var RESERVATION_ITEMS_QUERY_KEY = "reservation_items";
27
- var reservationItemsQueryKeys = queryKeysFactory(
28
- RESERVATION_ITEMS_QUERY_KEY
29
- );
30
- var useReservationItems = (query, options) => {
31
- const { data, ...rest } = useQuery({
32
- queryFn: () => sdk.vendor.reservations.query({ ...query }),
33
- queryKey: reservationItemsQueryKeys.list(query),
34
- ...options
35
- });
36
- return { ...data, ...rest };
37
- };
38
- var useCreateReservationItem = (options) => {
39
- return useMutation({
40
- mutationFn: (payload) => sdk.vendor.reservations.mutate(payload),
41
- onSuccess: (data, variables, context) => {
42
- queryClient.invalidateQueries({
43
- queryKey: reservationItemsQueryKeys.lists()
44
- });
45
- queryClient.invalidateQueries({
46
- queryKey: inventoryItemsQueryKeys.details()
47
- });
48
- queryClient.invalidateQueries({
49
- queryKey: inventoryItemLevelsQueryKeys.details()
50
- });
51
- options?.onSuccess?.(data, variables, context);
52
- },
53
- ...options
54
- });
55
- };
56
-
57
- // src/hooks/api/orders.tsx
58
22
  var ORDERS_QUERY_KEY = "orders";
59
23
  var _orderKeys = queryKeysFactory(ORDERS_QUERY_KEY);
60
24
  _orderKeys.preview = function(id) {
@@ -65,7 +29,7 @@ _orderKeys.changes = function(id) {
65
29
  };
66
30
  var ordersQueryKeys = _orderKeys;
67
31
  var useOrder = (id, query, options) => {
68
- const { data, ...rest } = useQuery2({
32
+ const { data, ...rest } = useQuery({
69
33
  queryFn: async () => sdk.vendor.orders.$id.query({ $id: id, ...query }),
70
34
  queryKey: ordersQueryKeys.detail(id, query),
71
35
  ...options
@@ -73,7 +37,7 @@ var useOrder = (id, query, options) => {
73
37
  return { ...data, ...rest };
74
38
  };
75
39
  var useOrderPreview = (id, query, options) => {
76
- const { data, ...rest } = useQuery2({
40
+ const { data, ...rest } = useQuery({
77
41
  queryFn: async () => sdk.vendor.orders.$id.preview.query({ $id: id, ...query }),
78
42
  queryKey: ordersQueryKeys.preview(id),
79
43
  ...options
@@ -81,7 +45,7 @@ var useOrderPreview = (id, query, options) => {
81
45
  return { ...data, ...rest };
82
46
  };
83
47
  var useOrders = (query, options) => {
84
- const { data, ...rest } = useQuery2({
48
+ const { data, ...rest } = useQuery({
85
49
  queryFn: async () => sdk.vendor.orders.query({ ...query }),
86
50
  queryKey: ordersQueryKeys.list(query),
87
51
  ...options
@@ -89,7 +53,7 @@ var useOrders = (query, options) => {
89
53
  return { ...data, ...rest };
90
54
  };
91
55
  var useOrderChanges = (id, query, options) => {
92
- const { data, ...rest } = useQuery2({
56
+ const { data, ...rest } = useQuery({
93
57
  queryFn: async () => sdk.vendor.orders.$id.changes.query({ $id: id, ...query }),
94
58
  queryKey: ordersQueryKeys.changes(id),
95
59
  ...options
@@ -97,7 +61,7 @@ var useOrderChanges = (id, query, options) => {
97
61
  return { ...data, ...rest };
98
62
  };
99
63
  var useCreateOrderFulfillment = (orderId, options) => {
100
- return useMutation2({
64
+ return useMutation({
101
65
  mutationFn: (payload) => sdk.vendor.orders.$id.fulfillments.mutate({ $id: orderId, ...payload }),
102
66
  onSuccess: (data, variables, context) => {
103
67
  queryClient.invalidateQueries({
@@ -118,7 +82,7 @@ var useCreateOrderFulfillment = (orderId, options) => {
118
82
  });
119
83
  };
120
84
  var useCancelOrderFulfillment = (orderId, fulfillmentId, options) => {
121
- return useMutation2({
85
+ return useMutation({
122
86
  mutationFn: (payload) => sdk.vendor.orders.$id.fulfillments.$fulfillmentId.cancel.mutate({
123
87
  $id: orderId,
124
88
  $fulfillmentId: fulfillmentId,
@@ -143,7 +107,7 @@ var useCancelOrderFulfillment = (orderId, fulfillmentId, options) => {
143
107
  });
144
108
  };
145
109
  var useCreateOrderShipment = (orderId, fulfillmentId, options) => {
146
- return useMutation2({
110
+ return useMutation({
147
111
  mutationFn: (payload) => sdk.vendor.orders.$id.fulfillments.$fulfillmentId.shipments.mutate({
148
112
  $id: orderId,
149
113
  $fulfillmentId: fulfillmentId,
@@ -162,7 +126,7 @@ var useCreateOrderShipment = (orderId, fulfillmentId, options) => {
162
126
  });
163
127
  };
164
128
  var useMarkOrderFulfillmentAsDelivered = (orderId, fulfillmentId, options) => {
165
- return useMutation2({
129
+ return useMutation({
166
130
  mutationFn: () => sdk.vendor.orders.$id.fulfillments.$fulfillmentId.markAsDelivered.mutate({
167
131
  $id: orderId,
168
132
  $fulfillmentId: fulfillmentId
@@ -180,7 +144,7 @@ var useMarkOrderFulfillmentAsDelivered = (orderId, fulfillmentId, options) => {
180
144
  });
181
145
  };
182
146
  var useCancelOrder = (orderId, options) => {
183
- return useMutation2({
147
+ return useMutation({
184
148
  mutationFn: () => sdk.vendor.orders.$id.cancel.mutate({ $id: orderId }),
185
149
  onSuccess: (data, variables, context) => {
186
150
  queryClient.invalidateQueries({
@@ -195,7 +159,7 @@ var useCancelOrder = (orderId, options) => {
195
159
  });
196
160
  };
197
161
  var useOrderCommissionLines = (id, options) => {
198
- const { data, ...rest } = useQuery2({
162
+ const { data, ...rest } = useQuery({
199
163
  queryFn: async () => sdk.vendor.orders.$id.commissionLines.query({ $id: id }),
200
164
  queryKey: ordersQueryKeys.detail(`${id}/commission-lines`),
201
165
  ...options
@@ -204,8 +168,6 @@ var useOrderCommissionLines = (id, options) => {
204
168
  };
205
169
 
206
170
  export {
207
- useReservationItems,
208
- useCreateReservationItem,
209
171
  ordersQueryKeys,
210
172
  useOrder,
211
173
  useOrderPreview,
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  _DataTable,
9
9
  useDataTable
10
- } from "./chunk-IWAL74YU.js";
10
+ } from "./chunk-6GQLSWOO.js";
11
11
  import {
12
12
  useQueryParams
13
13
  } from "./chunk-THHRRYRS.js";
@@ -52,6 +52,7 @@ var InventoryListCreateButton = () => {
52
52
  };
53
53
 
54
54
  // src/pages/inventory/_components/inventory-list-data-table.tsx
55
+ import { Buildings } from "@medusajs/icons";
55
56
  import { useExtendableTable, useLinkQuery } from "@mercurjs/dashboard-shared";
56
57
  import { useMemo as useMemo2, useState } from "react";
57
58
  import { useTranslation as useTranslation5 } from "react-i18next";
@@ -68,7 +69,7 @@ import { useTranslation as useTranslation3 } from "react-i18next";
68
69
 
69
70
  // src/pages/inventory/_components/inventory-actions.tsx
70
71
  import { PencilSquare, Trash } from "@medusajs/icons";
71
- import { usePrompt } from "@medusajs/ui";
72
+ import { toast, usePrompt } from "@medusajs/ui";
72
73
  import { useTranslation as useTranslation2 } from "react-i18next";
73
74
  import { jsx as jsx2 } from "react/jsx-runtime";
74
75
  var InventoryActions = ({ item }) => {
@@ -77,15 +78,18 @@ var InventoryActions = ({ item }) => {
77
78
  const { mutateAsync } = useDeleteInventoryItem(item.id);
78
79
  const handleDelete = async () => {
79
80
  const res = await prompt({
80
- title: t("general.areYouSure"),
81
- description: t("inventory.deleteWarning"),
81
+ title: t("inventory.item.deleteTitle"),
82
+ description: t("inventory.item.deleteDescription"),
82
83
  confirmText: t("actions.delete"),
83
84
  cancelText: t("actions.cancel")
84
85
  });
85
86
  if (!res) {
86
87
  return;
87
88
  }
88
- await mutateAsync();
89
+ await mutateAsync(void 0, {
90
+ onSuccess: () => toast.success(t("inventory.toast.deleteItem")),
91
+ onError: (e) => toast.error(e.message)
92
+ });
89
93
  };
90
94
  return /* @__PURE__ */ jsx2(
91
95
  ActionMenu,
@@ -109,7 +113,8 @@ var InventoryActions = ({ item }) => {
109
113
  }
110
114
  ]
111
115
  }
112
- ]
116
+ ],
117
+ "data-testid": `inventory-item-actions-${item.id}`
113
118
  }
114
119
  );
115
120
  };
@@ -128,7 +133,8 @@ var useInventoryTableColumns = () => {
128
133
  Checkbox,
129
134
  {
130
135
  checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
131
- onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
136
+ onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value),
137
+ "data-testid": "inventory-table-header-select-checkbox"
132
138
  }
133
139
  );
134
140
  },
@@ -140,61 +146,143 @@ var useInventoryTableColumns = () => {
140
146
  onCheckedChange: (value) => row.toggleSelected(!!value),
141
147
  onClick: (e) => {
142
148
  e.stopPropagation();
143
- }
149
+ },
150
+ "data-testid": `inventory-table-cell-${row.id}-select-checkbox`
144
151
  }
145
152
  );
146
153
  }
147
154
  }),
148
155
  columnHelper.accessor("title", {
149
- header: t("fields.title"),
150
- cell: ({ getValue }) => {
156
+ header: () => /* @__PURE__ */ jsx3(
157
+ "div",
158
+ {
159
+ className: "flex h-full w-full items-center",
160
+ "data-testid": "inventory-table-header-title",
161
+ children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-title-text", children: t("fields.title") })
162
+ }
163
+ ),
164
+ cell: ({ getValue, row }) => {
151
165
  const title = getValue();
152
166
  if (!title) {
153
167
  return /* @__PURE__ */ jsx3(PlaceholderCell, {});
154
168
  }
155
- return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3("span", { className: "truncate", children: title }) });
169
+ return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
170
+ "span",
171
+ {
172
+ className: "truncate",
173
+ "data-testid": `inventory-table-cell-${row.id}-title-value`,
174
+ children: title
175
+ }
176
+ ) });
156
177
  }
157
178
  }),
158
179
  columnHelper.accessor("sku", {
159
- header: t("fields.sku"),
160
- cell: ({ getValue }) => {
180
+ header: () => /* @__PURE__ */ jsx3(
181
+ "div",
182
+ {
183
+ className: "flex h-full w-full items-center",
184
+ "data-testid": "inventory-table-header-sku",
185
+ children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-sku-text", children: t("fields.sku") })
186
+ }
187
+ ),
188
+ cell: ({ getValue, row }) => {
161
189
  const sku = getValue();
162
190
  if (!sku) {
163
191
  return /* @__PURE__ */ jsx3(PlaceholderCell, {});
164
192
  }
165
- return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3("span", { className: "truncate", children: sku }) });
193
+ return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
194
+ "span",
195
+ {
196
+ className: "truncate",
197
+ "data-testid": `inventory-table-cell-${row.id}-sku-value`,
198
+ children: sku
199
+ }
200
+ ) });
166
201
  }
167
202
  }),
168
- columnHelper.accessor("location_levels", {
169
- header: t("inventory.reserved"),
170
- cell: ({ getValue }) => {
171
- const locations = getValue();
172
- const totalReserved = locations.reduce(
173
- (sum, level) => sum + level.reserved_quantity,
174
- 0
175
- );
176
- if (Number.isNaN(totalReserved)) {
203
+ columnHelper.display({
204
+ id: "product",
205
+ header: () => /* @__PURE__ */ jsx3(
206
+ "div",
207
+ {
208
+ className: "flex h-full w-full items-center",
209
+ "data-testid": "inventory-table-header-product",
210
+ children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-product-text", children: t("fields.product") })
211
+ }
212
+ ),
213
+ cell: ({ row }) => {
214
+ const productTitle = row.original.offers?.[0]?.product_variant?.product?.title;
215
+ if (!productTitle) {
177
216
  return /* @__PURE__ */ jsx3(PlaceholderCell, {});
178
217
  }
179
- return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3("span", { className: "truncate", children: totalReserved }) });
218
+ return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
219
+ "span",
220
+ {
221
+ className: "truncate",
222
+ "data-testid": `inventory-table-cell-${row.id}-product-value`,
223
+ children: productTitle
224
+ }
225
+ ) });
180
226
  }
181
227
  }),
182
- columnHelper.accessor("location_levels", {
183
- header: t("fields.inStock"),
184
- cell: ({ getValue }) => {
185
- const locations = getValue();
186
- const totalAvailable = locations.reduce(
187
- (sum, level) => sum + level.available_quantity,
188
- 0
189
- );
190
- if (Number.isNaN(totalAvailable)) {
228
+ columnHelper.accessor("stocked_quantity", {
229
+ header: () => /* @__PURE__ */ jsx3(
230
+ "div",
231
+ {
232
+ className: "flex h-full w-full items-center",
233
+ "data-testid": "inventory-table-header-stocked-quantity",
234
+ children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-stocked-quantity-text", children: t("fields.inStock") })
235
+ }
236
+ ),
237
+ cell: ({ getValue, row }) => {
238
+ const quantity = getValue();
239
+ if (Number.isNaN(quantity)) {
191
240
  return /* @__PURE__ */ jsx3(PlaceholderCell, {});
192
241
  }
193
- return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3("span", { className: "truncate", children: totalAvailable }) });
242
+ return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
243
+ "span",
244
+ {
245
+ className: "truncate",
246
+ "data-testid": `inventory-table-cell-${row.id}-stocked_quantity-value`,
247
+ children: quantity
248
+ }
249
+ ) });
250
+ }
251
+ }),
252
+ columnHelper.accessor("reserved_quantity", {
253
+ header: () => /* @__PURE__ */ jsx3(
254
+ "div",
255
+ {
256
+ className: "flex h-full w-full items-center",
257
+ "data-testid": "inventory-table-header-reserved-quantity",
258
+ children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-reserved-quantity-text", children: t("inventory.reserved") })
259
+ }
260
+ ),
261
+ cell: ({ getValue, row }) => {
262
+ const quantity = getValue();
263
+ if (Number.isNaN(quantity)) {
264
+ return /* @__PURE__ */ jsx3(PlaceholderCell, {});
265
+ }
266
+ return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
267
+ "span",
268
+ {
269
+ className: "truncate",
270
+ "data-testid": `inventory-table-cell-${row.id}-reserved_quantity-value`,
271
+ children: quantity
272
+ }
273
+ ) });
194
274
  }
195
275
  }),
196
276
  columnHelper.display({
197
277
  id: "actions",
278
+ header: () => /* @__PURE__ */ jsx3(
279
+ "div",
280
+ {
281
+ className: "flex h-full w-full items-center",
282
+ "data-testid": "inventory-table-header-actions",
283
+ children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-actions-text" })
284
+ }
285
+ ),
198
286
  cell: ({ row }) => /* @__PURE__ */ jsx3(InventoryActions, { item: row.original })
199
287
  })
200
288
  ],
@@ -210,6 +298,11 @@ var useInventoryTableFilters = () => {
210
298
  limit: 1e3
211
299
  });
212
300
  const filters = [];
301
+ filters.push({
302
+ type: "string",
303
+ key: "sku",
304
+ label: t("fields.sku")
305
+ });
213
306
  if (stock_locations) {
214
307
  const stockLocationFilter = {
215
308
  type: "select",
@@ -223,21 +316,6 @@ var useInventoryTableFilters = () => {
223
316
  };
224
317
  filters.push(stockLocationFilter);
225
318
  }
226
- filters.push({
227
- type: "string",
228
- key: "material",
229
- label: t("fields.material")
230
- });
231
- filters.push({
232
- type: "string",
233
- key: "sku",
234
- label: t("fields.sku")
235
- });
236
- filters.push({
237
- type: "string",
238
- key: "mid_code",
239
- label: t("fields.midCode")
240
- });
241
319
  filters.push({
242
320
  type: "number",
243
321
  key: "height",
@@ -249,24 +327,14 @@ var useInventoryTableFilters = () => {
249
327
  label: t("fields.width")
250
328
  });
251
329
  filters.push({
252
- type: "number",
253
- key: "length",
254
- label: t("fields.length")
255
- });
256
- filters.push({
257
- type: "number",
258
- key: "weight",
259
- label: t("fields.weight")
330
+ type: "string",
331
+ key: "mid_code",
332
+ label: t("fields.midCode")
260
333
  });
261
334
  filters.push({
262
- type: "select",
263
- options: [
264
- { label: t("fields.true"), value: "true" },
265
- { label: t("fields.false"), value: "false" }
266
- ],
267
- key: "requires_shipping",
268
- multiple: false,
269
- label: t("fields.requiresShipping")
335
+ type: "string",
336
+ key: "material",
337
+ label: t("fields.material")
270
338
  });
271
339
  return filters;
272
340
  };
@@ -282,41 +350,25 @@ var useInventoryTableQuery = ({
282
350
  "location_id",
283
351
  "q",
284
352
  "order",
285
- "requires_shipping",
286
353
  "offset",
287
354
  "sku",
288
- "origin_country",
289
355
  "material",
290
356
  "mid_code",
291
357
  "hs_code",
292
- "order",
293
- "weight",
294
358
  "width",
295
- "length",
296
359
  "height"
297
360
  ],
298
361
  prefix
299
362
  );
300
- const {
301
- offset,
302
- weight,
303
- width,
304
- length,
305
- height,
306
- requires_shipping,
307
- ...params
308
- } = raw;
363
+ const { offset, width, height, ...params } = raw;
309
364
  const searchParams = {
310
365
  limit: pageSize,
311
366
  offset: offset ? parseInt(offset) : void 0,
312
- weight: weight ? JSON.parse(weight) : void 0,
313
367
  width: width ? JSON.parse(width) : void 0,
314
- length: length ? JSON.parse(length) : void 0,
315
368
  height: height ? JSON.parse(height) : void 0,
316
- requires_shipping: requires_shipping ? JSON.parse(requires_shipping) : void 0,
317
369
  q: params.q,
318
370
  sku: params.sku,
319
- order: params.order,
371
+ order: params.order || "title",
320
372
  mid_code: params.mid_code,
321
373
  hs_code: params.hs_code,
322
374
  material: params.material,
@@ -351,7 +403,10 @@ var InventoryListDataTable = () => {
351
403
  } = useInventoryItems(
352
404
  {
353
405
  ...searchParams,
354
- ...useLinkQuery("inventory_item")
406
+ ...useLinkQuery(
407
+ "inventory_item",
408
+ "+offers.product_variant.product.title"
409
+ )
355
410
  },
356
411
  {
357
412
  placeholderData: keepPreviousData
@@ -359,10 +414,15 @@ var InventoryListDataTable = () => {
359
414
  );
360
415
  const baseFilters = useInventoryTableFilters();
361
416
  const baseColumns = useInventoryTableColumns();
362
- const { columns, filters: extFilters } = useExtendableTable({
417
+ const actionsColumn = baseColumns[baseColumns.length - 1];
418
+ const { columns: extended, filters: extFilters } = useExtendableTable({
363
419
  model: "inventory_item",
364
- columns: baseColumns
420
+ columns: baseColumns.slice(0, -1)
365
421
  });
422
+ const columns = useMemo2(
423
+ () => [...extended, actionsColumn],
424
+ [extended, actionsColumn]
425
+ );
366
426
  const filters = useMemo2(
367
427
  () => [...baseFilters, ...extFilters],
368
428
  [baseFilters, extFilters]
@@ -401,6 +461,13 @@ var InventoryListDataTable = () => {
401
461
  { key: "stocked_quantity", label: t("fields.inStock") },
402
462
  { key: "reserved_quantity", label: t("inventory.reserved") }
403
463
  ],
464
+ defaultOrder: "title",
465
+ noRecords: {
466
+ icon: /* @__PURE__ */ jsx4(Buildings, { className: "text-ui-fg-subtle" }),
467
+ title: t("inventory.list.noRecordsTitle"),
468
+ message: t("inventory.list.noRecordsMessage"),
469
+ action: { to: "create", label: t("actions.create") }
470
+ },
404
471
  navigateTo: (row) => `${row.id}`,
405
472
  commands: [
406
473
  {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useProductTag
3
- } from "./chunk-RLRWDHME.js";
3
+ } from "./chunk-6YQR2AWM.js";
4
4
 
5
5
  // src/pages/settings/product-tags/[id]/breadcrumb.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -0,0 +1,11 @@
1
+ // src/pages/price-lists/common/utils.ts
2
+ import {
3
+ extractPricesFromOffers,
4
+ getPriceListStatus,
5
+ isProductRow
6
+ } from "@mercurjs/dashboard-shared";
7
+
8
+ export {
9
+ extractPricesFromOffers,
10
+ getPriceListStatus
11
+ };
@@ -13,10 +13,10 @@ import {
13
13
  import {
14
14
  _DataTable,
15
15
  useDataTable
16
- } from "./chunk-IWAL74YU.js";
16
+ } from "./chunk-6GQLSWOO.js";
17
17
  import {
18
18
  useOrders
19
- } from "./chunk-OGUTFP6B.js";
19
+ } from "./chunk-JYUHDM23.js";
20
20
 
21
21
  // src/pages/orders/order-list-page.tsx
22
22
  import { Children as Children3 } from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-EJBOBB4B.js";
4
+ } from "./chunk-V3N2Y4OL.js";
5
5
  import {
6
6
  usePromotionTableFilters
7
7
  } from "./chunk-J75EFK5A.js";
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  _DataTable,
13
13
  useDataTable
14
- } from "./chunk-IWAL74YU.js";
14
+ } from "./chunk-6GQLSWOO.js";
15
15
  import {
16
16
  ActionMenu
17
17
  } from "./chunk-BDGZ4EQO.js";
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  _DataTable,
19
19
  useDataTable
20
- } from "./chunk-IWAL74YU.js";
20
+ } from "./chunk-6GQLSWOO.js";
21
21
  import {
22
22
  useQueryParams
23
23
  } from "./chunk-THHRRYRS.js";
@@ -0,0 +1,51 @@
1
+ import {
2
+ queryClient
3
+ } from "./chunk-RHKRREUU.js";
4
+ import {
5
+ queryKeysFactory
6
+ } from "./chunk-ZA2KFUFR.js";
7
+ import {
8
+ sdk
9
+ } from "./chunk-DTGEFKK4.js";
10
+
11
+ // src/hooks/api/reviews.tsx
12
+ import {
13
+ useMutation,
14
+ useQuery
15
+ } from "@tanstack/react-query";
16
+ var REVIEWS_QUERY_KEY = "reviews";
17
+ var reviewsQueryKeys = queryKeysFactory(REVIEWS_QUERY_KEY);
18
+ var useReviews = (query, options) => {
19
+ const { data, ...rest } = useQuery({
20
+ queryKey: reviewsQueryKeys.list(query),
21
+ queryFn: async () => sdk.vendor.reviews.query({ ...query }),
22
+ ...options
23
+ });
24
+ return { ...data, ...rest };
25
+ };
26
+ var useReview = (id, query, options) => {
27
+ const { data, ...rest } = useQuery({
28
+ queryKey: reviewsQueryKeys.detail(id, query),
29
+ queryFn: async () => sdk.vendor.reviews.$id.query({ $id: id, ...query }),
30
+ ...options
31
+ });
32
+ return { ...data, ...rest };
33
+ };
34
+ var useRespondReview = (id, options) => {
35
+ return useMutation({
36
+ mutationFn: (payload) => sdk.vendor.reviews.$id.mutate({ $id: id, ...payload }),
37
+ onSuccess: (data, variables, context) => {
38
+ queryClient.invalidateQueries({ queryKey: reviewsQueryKeys.lists() });
39
+ queryClient.invalidateQueries({ queryKey: reviewsQueryKeys.detail(id) });
40
+ options?.onSuccess?.(data, variables, context);
41
+ },
42
+ ...options
43
+ });
44
+ };
45
+
46
+ export {
47
+ reviewsQueryKeys,
48
+ useReviews,
49
+ useReview,
50
+ useRespondReview
51
+ };
@@ -12,10 +12,10 @@ import {
12
12
  } from "./chunk-3QSRE5LS.js";
13
13
  import {
14
14
  require_dist
15
- } from "./chunk-4UQMRTSC.js";
15
+ } from "./chunk-VH3TGSWE.js";
16
16
  import {
17
17
  useFeatureFlags
18
- } from "./chunk-RLRWDHME.js";
18
+ } from "./chunk-6YQR2AWM.js";
19
19
  import {
20
20
  useSignInWithEmailPass
21
21
  } from "./chunk-K5324KIX.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  i18n
3
- } from "./chunk-UUBGLS7U.js";
3
+ } from "./chunk-V43BEBDT.js";
4
4
 
5
5
  // src/lib/promotions.ts
6
6
  var promotionStatusMap = {