@mercurjs/vendor 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/dist/{[id]-S6EPH4OO.js → [id]-6WYSWXWC.js} +30 -28
  2. package/dist/{[id]-SJXBJLAT.js → [id]-CLZ7BUYL.js} +9 -8
  3. package/dist/{[id]-47FGVJYM.js → [id]-DCCF7277.js} +35 -33
  4. package/dist/{[id]-ARXBXGNZ.js → [id]-EJAHMOOE.js} +33 -31
  5. package/dist/{[id]-HD76VJ2P.js → [id]-ENTJSLN2.js} +16 -15
  6. package/dist/{[id]-XY3A3EMF.js → [id]-LZPT5Y55.js} +32 -31
  7. package/dist/{[id]-Z4P7XA4G.js → [id]-OGHRZ2VY.js} +232 -103
  8. package/dist/{[id]-FLIHBDAS.js → [id]-PHS2WYFX.js} +33 -31
  9. package/dist/{[id]-JF6CCBRE.js → [id]-T64V4G6T.js} +19 -18
  10. package/dist/{[id]-IWPWKLOH.js → [id]-TLZZ53G7.js} +13 -12
  11. package/dist/{[id]-6HM66I3E.js → [id]-UAOAQVEM.js} +48 -45
  12. package/dist/{[id]-Q6HILUAG.js → [id]-VKG2WEIR.js} +39 -37
  13. package/dist/{[id]-VTFOP3BF.js → [id]-WRA56ZMU.js} +5 -5
  14. package/dist/{[id]-MIV4U5UW.js → [id]-XRGNT7CY.js} +7 -7
  15. package/dist/{[location_id]-AWDD2VHW.js → [location_id]-7ZUB2TTU.js} +14 -14
  16. package/dist/{[province_id]-36QJ2FKC.js → [province_id]-XGA44S7P.js} +30 -29
  17. package/dist/add-7ZTE42IE.js +158 -0
  18. package/dist/{add-YUANWTIL.js → add-AKC7LTK3.js} +49 -46
  19. package/dist/{add-customer-groups-7SLONTS2.js → add-customer-groups-BRC3DKQ2.js} +29 -27
  20. package/dist/{add-products-ISR3DRPQ.js → add-products-ZSULNZVI.js} +31 -29
  21. package/dist/{add-promotions-FZRDYHYX.js → add-promotions-TNFVT5ST.js} +12 -11
  22. package/dist/{add-to-campaign-V6D7JKRS.js → add-to-campaign-HL6NGRR4.js} +6 -6
  23. package/dist/address-3DSJESKM.js +249 -0
  24. package/dist/{adjust-inventory-P7AB7VIB.js → adjust-inventory-H4EUP7J3.js} +4 -4
  25. package/dist/{allocate-items-QAS5PZLR.js → allocate-items-6OAKG25R.js} +8 -8
  26. package/dist/{areas-Y7VDWH7G.js → areas-JO6L3M7Y.js} +11 -10
  27. package/dist/{attributes-UEM2VJKV.js → attributes-WRZYJEYN.js} +5 -4
  28. package/dist/{breadcrumb-6NAAOPIY.js → breadcrumb-3Z7KZG62.js} +4 -4
  29. package/dist/{breadcrumb-5OTOCYNL.js → breadcrumb-5BXDYVRO.js} +4 -4
  30. package/dist/{breadcrumb-3QTVWXZB.js → breadcrumb-BS7Y5OKF.js} +5 -5
  31. package/dist/{breadcrumb-CIGKLKKS.js → breadcrumb-D3UDTWGE.js} +3 -3
  32. package/dist/breadcrumb-D6QNYOAO.js +45 -0
  33. package/dist/{breadcrumb-OVMEC5OZ.js → breadcrumb-F3BN5753.js} +3 -3
  34. package/dist/{breadcrumb-MOQ7GI3Z.js → breadcrumb-KQSFIXQ4.js} +3 -3
  35. package/dist/{breadcrumb-NCBGPQML.js → breadcrumb-M5Z5WA6I.js} +4 -4
  36. package/dist/{breadcrumb-EOYLR3IQ.js → breadcrumb-OIGGCB3L.js} +3 -3
  37. package/dist/{breadcrumb-LENACUAA.js → breadcrumb-UAUX7XCV.js} +3 -3
  38. package/dist/breadcrumb-UH7FAYU2.js +46 -0
  39. package/dist/{breadcrumb-ASB2YCNV.js → breadcrumb-Y5UW3I4C.js} +3 -3
  40. package/dist/{breadcrumb-WP34OXGQ.js → breadcrumb-YBBYFQYG.js} +3 -3
  41. package/dist/breadcrumb-ZMVHXCOX.js +32 -0
  42. package/dist/bulk-edit-C6WJKURW.js +244 -0
  43. package/dist/{campaigns-PMVKUFEA.js → campaigns-SF2YDBID.js} +9 -8
  44. package/dist/{categories-JARCKR7M.js → categories-WRDJAJ2Q.js} +9 -8
  45. package/dist/{chunk-HUZG6A3X.js → chunk-2POPPFAP.js} +3 -3
  46. package/dist/{chunk-S5GQ2SES.js → chunk-2SLAVXFY.js} +5 -5
  47. package/dist/{chunk-JVBLYMY2.js → chunk-32RYSB2V.js} +2 -2
  48. package/dist/{chunk-VHMGJUYN.js → chunk-3B34B2M2.js} +1 -1
  49. package/dist/{chunk-BI2WWFPS.js → chunk-3BZBEC3Y.js} +1 -1
  50. package/dist/{chunk-LMHJRE4A.js → chunk-3DXMZA7M.js} +2 -2
  51. package/dist/{chunk-Z2WPXJ6J.js → chunk-4DYUQ3G5.js} +2 -2
  52. package/dist/{chunk-HBQC3YQZ.js → chunk-573EQEW2.js} +1 -1
  53. package/dist/{chunk-FBZHM2QZ.js → chunk-5BONGICL.js} +5 -5
  54. package/dist/{chunk-ZZ7VKT2S.js → chunk-5IWBNPZX.js} +766 -204
  55. package/dist/{chunk-KHHY7EEM.js → chunk-6WY5X4PE.js} +5 -5
  56. package/dist/{chunk-CUO22GTM.js → chunk-7TIZP4YG.js} +1 -1
  57. package/dist/{chunk-52I65K53.js → chunk-7XC7ZRG7.js} +17 -129
  58. package/dist/{chunk-AONKZGWL.js → chunk-ASEVHHCT.js} +3 -3
  59. package/dist/{chunk-TG3TCIL6.js → chunk-AW4WN2EK.js} +6 -6
  60. package/dist/{chunk-DDEIH66R.js → chunk-B5326BWT.js} +4 -4
  61. package/dist/{chunk-O6PRBSFL.js → chunk-BI2AYXZQ.js} +50 -35
  62. package/dist/{chunk-HUNGNEPY.js → chunk-BOZJOOGW.js} +1 -1
  63. package/dist/{chunk-AIFLEWO2.js → chunk-BWGPN6XV.js} +1 -1
  64. package/dist/{chunk-5XOCUDS2.js → chunk-CUMY2VZ5.js} +1 -1
  65. package/dist/chunk-DLNNTQRY.js +217 -0
  66. package/dist/{chunk-B2RVONU7.js → chunk-DRAZNW7J.js} +4 -4
  67. package/dist/{chunk-CVVYQI5F.js → chunk-EBZ5VZEO.js} +1 -1
  68. package/dist/{chunk-ZPGWTLF2.js → chunk-EFIF2GCZ.js} +4 -4
  69. package/dist/{chunk-DHADGZJ5.js → chunk-F4OJN2F2.js} +40 -5
  70. package/dist/{chunk-PYQJ5N25.js → chunk-FEUCCLKR.js} +6 -6
  71. package/dist/{chunk-JKSPDM7I.js → chunk-FNG7ZA7N.js} +1 -1
  72. package/dist/{chunk-UXKKD4AD.js → chunk-FQTYHU6G.js} +5 -5
  73. package/dist/chunk-FX4V5JCF.js +37 -0
  74. package/dist/{chunk-ZFFA36DB.js → chunk-GCSQEJMD.js} +2 -2
  75. package/dist/{chunk-NANYVBFI.js → chunk-GJM5XI3E.js} +1 -1
  76. package/dist/{chunk-W6ZVQJYB.js → chunk-GYV6SKY7.js} +1 -1
  77. package/dist/chunk-I5K5USJM.js +330 -0
  78. package/dist/{chunk-J2XP7VRG.js → chunk-IBTTL6EJ.js} +4 -4
  79. package/dist/{chunk-3LPVUPZZ.js → chunk-IDYGSAHT.js} +1 -1
  80. package/dist/{chunk-DC2K6CFQ.js → chunk-IQWK723D.js} +1 -1
  81. package/dist/{chunk-PWZKFTJS.js → chunk-ITQW6CK2.js} +5 -5
  82. package/dist/{chunk-NWFWI4IE.js → chunk-JKKRKFCS.js} +55 -62
  83. package/dist/chunk-JQV7CXEC.js +37 -0
  84. package/dist/{chunk-RH2NI4BC.js → chunk-JRT2U4UI.js} +448 -101
  85. package/dist/{chunk-4FCZDRAE.js → chunk-JTCUWZ7D.js} +5 -5
  86. package/dist/chunk-LA6XSPQG.js +3723 -0
  87. package/dist/{chunk-JXP5YZ77.js → chunk-LHKHQAAY.js} +1 -1
  88. package/dist/{chunk-TTFCO5HU.js → chunk-LKA7QM6R.js} +7 -7
  89. package/dist/{chunk-FGCKXH45.js → chunk-LPOAVK6Y.js} +1 -0
  90. package/dist/{chunk-VGJTARSA.js → chunk-LRARA622.js} +2 -2
  91. package/dist/chunk-LRD242C7.js +40 -0
  92. package/dist/{chunk-PADOWAXM.js → chunk-LWJF63JW.js} +1 -1
  93. package/dist/{chunk-DYUTYBAQ.js → chunk-M6N4ISXL.js} +1 -1
  94. package/dist/{chunk-2F3H6ORE.js → chunk-MWQQVKRU.js} +1 -1
  95. package/dist/{chunk-JK5CK6SW.js → chunk-N2WKLVUX.js} +20 -3
  96. package/dist/{chunk-R65A4P4H.js → chunk-N335VHD3.js} +1 -1
  97. package/dist/chunk-NBMM2TZK.js +33 -0
  98. package/dist/{chunk-SI4ALL7W.js → chunk-NBPMNUKZ.js} +1 -1
  99. package/dist/{chunk-GDMNHL7E.js → chunk-NCABGI3E.js} +6 -6
  100. package/dist/chunk-NYRRRCJS.js +339 -0
  101. package/dist/{chunk-QJ7QW3SZ.js → chunk-O7E4KQAK.js} +6 -6
  102. package/dist/{chunk-NKB6WTBH.js → chunk-OWPZ3CIR.js} +5 -5
  103. package/dist/{chunk-RE7YXVFG.js → chunk-PCMNEUMV.js} +3 -3
  104. package/dist/{chunk-CFETU5BI.js → chunk-QHQWEERJ.js} +1 -36
  105. package/dist/{chunk-WHTS4G5K.js → chunk-QXUKJDZB.js} +1 -1
  106. package/dist/{chunk-Y224F4UU.js → chunk-RIN4CBRB.js} +0 -1
  107. package/dist/{chunk-LWVBKUUL.js → chunk-RL7SFZOF.js} +2 -2
  108. package/dist/{chunk-UYJ65N46.js → chunk-RLETOWCM.js} +5 -5
  109. package/dist/{chunk-DVPTD7LZ.js → chunk-RMBCBXWD.js} +1 -1
  110. package/dist/{chunk-A2BNIZ7D.js → chunk-RTAWYMQP.js} +1 -1
  111. package/dist/{chunk-VJTYMQVA.js → chunk-RUE5BPC2.js} +2 -2
  112. package/dist/{chunk-EOOK6473.js → chunk-RV5UTYBG.js} +15 -13
  113. package/dist/chunk-S2Q7PO7I.js +177 -0
  114. package/dist/{chunk-Y4VBOHAP.js → chunk-S7EKBD2C.js} +3 -3
  115. package/dist/{chunk-CELHWX5P.js → chunk-SDSEW72R.js} +5 -5
  116. package/dist/{chunk-4TBDDMFP.js → chunk-SGT6QYWH.js} +1 -1
  117. package/dist/chunk-STBCWNZQ.js +57 -0
  118. package/dist/{chunk-LZ7QV42C.js → chunk-SYNUA6LQ.js} +1 -1
  119. package/dist/{chunk-CTWSWZ4R.js → chunk-T7LEJIIM.js} +4 -4
  120. package/dist/{chunk-7EM7WET3.js → chunk-TZTKHOEK.js} +4 -4
  121. package/dist/chunk-UL4O5M4S.js +45 -0
  122. package/dist/{chunk-AW77UWCZ.js → chunk-VBRTC2VU.js} +13 -4
  123. package/dist/{chunk-VDWGP2U6.js → chunk-VV6IKGCN.js} +1 -1
  124. package/dist/{chunk-JKXAL7WR.js → chunk-VXMOPVRH.js} +2 -2
  125. package/dist/{chunk-RIILGKYR.js → chunk-VXWN37PT.js} +1 -1
  126. package/dist/{chunk-CDIZEXFJ.js → chunk-WQX4ASK4.js} +6 -4
  127. package/dist/{chunk-SOZMJA7V.js → chunk-X22KTLZ7.js} +1 -1
  128. package/dist/{chunk-SDA5NDMT.js → chunk-XZG2HZYW.js} +2 -2
  129. package/dist/{chunk-SECZTXSU.js → chunk-YQYRAD5C.js} +1 -1
  130. package/dist/{chunk-WPFTRRWV.js → chunk-ZEVYT6IX.js} +202 -6
  131. package/dist/chunk-ZWTCVOHQ.js +14 -0
  132. package/dist/{chunk-NX26QE2O.js → chunk-ZYOXKUKZ.js} +1 -1
  133. package/dist/chunk-ZZO3INVE.js +9631 -0
  134. package/dist/collections-2M4RFH4P.js +66 -0
  135. package/dist/{configuration-RNWBTRAH.js → configuration-O5GDANA7.js} +5 -5
  136. package/dist/{configuration-KWAL2QZ5.js → configuration-RHPIO2QT.js} +3 -3
  137. package/dist/{create-BEVGWF6U.js → create-2TUWGQ2D.js} +33 -32
  138. package/dist/{create-YPCVTXAK.js → create-33TRLASX.js} +4 -4
  139. package/dist/{create-BBFTIFI2.js → create-3WUTLUJO.js} +36 -33
  140. package/dist/create-6IRE6AMF.js +78 -0
  141. package/dist/{create-F5K53QPH.js → create-D4F457BD.js} +38 -36
  142. package/dist/{create-7UEEO5TM.js → create-D6EW3EWC.js} +3 -3
  143. package/dist/{create-EJM5C2XP.js → create-FFKQAZ5D.js} +6 -6
  144. package/dist/{create-ZU362U3B.js → create-GHM7OTCR.js} +3 -3
  145. package/dist/{create-VUKGQU4L.js → create-IFMEEHN4.js} +34 -32
  146. package/dist/{create-IE6MYOIY.js → create-IOUKWPE4.js} +11 -10
  147. package/dist/{create-XGF6DB5F.js → create-KGOMJUXR.js} +5 -4
  148. package/dist/{create-TFDUNJSI.js → create-KGYL7FBM.js} +3 -3
  149. package/dist/{create-UCU73IXX.js → create-OF2OZ7EI.js} +25 -23
  150. package/dist/{create-MKBBF2V3.js → create-Q6ITSYJM.js} +3 -3
  151. package/dist/{create-VEWS4QDP.js → create-QK2SSLZK.js} +48 -45
  152. package/dist/{create-NPSYO6PE.js → create-YITFTHMA.js} +37 -35
  153. package/dist/{customers-4QWR5UOL.js → customers-OXAD52MC.js} +10 -9
  154. package/dist/{edit-J3LD76JS.js → edit-4HZHLYI3.js} +6 -6
  155. package/dist/{edit-47I7VVNB.js → edit-5CJZRHAA.js} +3 -3
  156. package/dist/{edit-BYXHU3IG.js → edit-7GVP6SRA.js} +3 -3
  157. package/dist/{edit-J6WCPHDS.js → edit-7HTH2UJF.js} +5 -5
  158. package/dist/{edit-XU33IVZH.js → edit-ATXE6CM5.js} +3 -3
  159. package/dist/{edit-ZMINDMGM.js → edit-B5B3XKDM.js} +3 -3
  160. package/dist/{edit-DG3MY3ZH.js → edit-FC64DWB2.js} +5 -5
  161. package/dist/{edit-LOKLQGM2.js → edit-FNDDSSMT.js} +3 -3
  162. package/dist/{edit-S7B7VPM4.js → edit-J5SC7GHQ.js} +29 -28
  163. package/dist/{edit-7LQATDUD.js → edit-LRRJTHV2.js} +4 -4
  164. package/dist/{edit-BQLSTFTQ.js → edit-MYSWY6W4.js} +5 -5
  165. package/dist/edit-ONSN756P.js +237 -0
  166. package/dist/{edit-JZVEAKJU.js → edit-PIE7Y73J.js} +49 -46
  167. package/dist/{edit-CZVL3IVY.js → edit-QRJIWTU2.js} +30 -29
  168. package/dist/{edit-JAKXFAVP.js → edit-SGEECDCR.js} +25 -24
  169. package/dist/{edit-5BUGSOTL.js → edit-UAXMJAEI.js} +5 -4
  170. package/dist/edit-UQAQVEUI.js +353 -0
  171. package/dist/edit-Z7EZRPUP.js +362 -0
  172. package/dist/{edit-NHU3LJIH.js → edit-ZEIL7EQW.js} +23 -22
  173. package/dist/{edit-budget-Z5USV462.js → edit-budget-J27CSEZH.js} +3 -3
  174. package/dist/{edit-inventory-item-YFW2AFRD.js → edit-inventory-item-US77M2FF.js} +3 -3
  175. package/dist/{edit-inventory-item-attributes-IYAMJDTB.js → edit-inventory-item-attributes-QYNDTUHT.js} +5 -4
  176. package/dist/edit-stocks-and-prices-543AYFDJ.js +409 -0
  177. package/dist/{fulfillment-V3D4XU3R.js → fulfillment-5LNFBSBS.js} +26 -25
  178. package/dist/{fulfillment-providers-YYN3GVV7.js → fulfillment-providers-U7Z7QMOQ.js} +33 -31
  179. package/dist/{home-PP7YYCSB.js → home-I3OILW5Z.js} +2 -2
  180. package/dist/index.css +5127 -3
  181. package/dist/index.js +453 -215
  182. package/dist/{inventory-AIRQ2KNS.js → inventory-W6S2NIBI.js} +8 -7
  183. package/dist/invite-P6HTOEIV.js +301 -0
  184. package/dist/invite-SI2KIPWI.js +370 -0
  185. package/dist/{locations-SQKM7JWN.js → locations-7SQJ3O2F.js} +4 -4
  186. package/dist/login-QDS5UXKV.js +36 -0
  187. package/dist/{manage-locations-4PQS4QY7.js → manage-locations-R4T72DTA.js} +4 -4
  188. package/dist/{media-UR73M6X2.js → media-RDXCLPKQ.js} +7 -6
  189. package/dist/{metadata-REBVXJJF.js → metadata-7JKDCVYY.js} +26 -25
  190. package/dist/{metadata-DIJTVDF7.js → metadata-AWUKZ25V.js} +6 -6
  191. package/dist/{metadata-ZKG2TRYU.js → metadata-UKBRUFH2.js} +23 -22
  192. package/dist/{metadata-UBZXDIFG.js → metadata-W5XIPFVU.js} +26 -25
  193. package/dist/{metadata-OOM44E2U.js → metadata-X4UIPNL6.js} +26 -25
  194. package/dist/{metadata-OGVHZEKS.js → metadata-ZV5RYLKR.js} +23 -22
  195. package/dist/{no-match-BO2NNLCM.js → no-match-JLVLPCRH.js} +1 -1
  196. package/dist/onboarding-DLIBZRKE.js +873 -0
  197. package/dist/orders-IAL3JNPU.js +61 -0
  198. package/dist/organization-QCSXE52A.js +303 -0
  199. package/dist/{organize-5AIJPYS2.js → organize-5W5KNBM2.js} +5 -5
  200. package/dist/{organize-YXJVI74L.js → organize-U2LVYSOD.js} +5 -5
  201. package/dist/pages/index.d.ts +222 -49
  202. package/dist/pages/index.js +96 -93
  203. package/dist/payment-details-ATUYMVJX.js +234 -0
  204. package/dist/{payouts-3BY73LZ3.js → payouts-ZLX3KFQT.js} +9 -8
  205. package/dist/{price-lists-G256JJN7.js → price-lists-JX22K5EO.js} +10 -9
  206. package/dist/{prices-EW7KBY6R.js → prices-6NY4DELP.js} +14 -13
  207. package/dist/{pricing-SQNF3KGG.js → pricing-RBESFX5P.js} +33 -31
  208. package/dist/{product-tags-FR32HXFW.js → product-tags-W4BL6RWV.js} +43 -40
  209. package/dist/{product-types-WJPLJI7H.js → product-types-MBLFYJOA.js} +10 -9
  210. package/dist/{product-variant-detail-G5MBDTFL.js → product-variant-detail-KU5OCL7E.js} +270 -56
  211. package/dist/{product-variant-edit-PW7W5J5E.js → product-variant-edit-5FMMMH2W.js} +8 -7
  212. package/dist/{products-C4BF2X7D.js → products-3VVYJUH7.js} +31 -29
  213. package/dist/products-YYLVCOOY.js +93 -0
  214. package/dist/professional-details-6Y5K6GBL.js +167 -0
  215. package/dist/profile-Y4AATQES.js +171 -0
  216. package/dist/{promotions-INYBMACT.js → promotions-NBJTFP6N.js} +10 -9
  217. package/dist/register-ZLE6MNPF.js +223 -0
  218. package/dist/{reset-password-CPTU3KHW.js → reset-password-PLCDLFL4.js} +4 -4
  219. package/dist/{chunk-5NF4OTVV.js → return-reasons-64WZ5Z3Z.js} +46 -5
  220. package/dist/{sales-channels-6I3U4W4Z.js → sales-channels-UIDLFCX6.js} +10 -9
  221. package/dist/{sales-channels-SOACADV2.js → sales-channels-UWPEFKAO.js} +12 -11
  222. package/dist/{settings-MAXHH7EC.js → settings-5MNWE5CR.js} +53 -56
  223. package/dist/{shipping-profile-7FTHSPY2.js → shipping-profile-JJBIVZPM.js} +4 -4
  224. package/dist/shipping-profiles-O7XB2DTE.js +45 -0
  225. package/dist/{stock-LOO5SU5Q.js → stock-2CGEFBXO.js} +30 -30
  226. package/dist/{stock-4G4PELBV.js → stock-VJAAYYW5.js} +30 -31
  227. package/dist/store-ZBSMNWFT.js +568 -0
  228. package/dist/store-closure-43FK32AQ.js +172 -0
  229. package/dist/store-select-Q2HE572R.js +166 -0
  230. package/dist/{tax-regions-45JVTUP3.js → tax-regions-FPMGLITT.js} +8 -8
  231. package/dist/team-ZLZJJWIY.js +269 -0
  232. package/package.json +9 -6
  233. package/dist/additional-attributes-XUFDADGP.js +0 -219
  234. package/dist/breadcrumb-3RAESPC7.js +0 -31
  235. package/dist/breadcrumb-54IEJEAX.js +0 -45
  236. package/dist/breadcrumb-CFDJOGTA.js +0 -44
  237. package/dist/chunk-6EYGH3TB.js +0 -26
  238. package/dist/chunk-FPJLYWOU.js +0 -190
  239. package/dist/chunk-GTUR4HSV.js +0 -53
  240. package/dist/chunk-LODQAVDC.js +0 -179
  241. package/dist/chunk-NYK5PQIF.js +0 -2078
  242. package/dist/chunk-PKBMQBKP.js +0 -7
  243. package/dist/chunk-RNC4NFVK.js +0 -170
  244. package/dist/collections-2222I5MO.js +0 -63
  245. package/dist/create-R3SFYWAH.js +0 -69
  246. package/dist/edit-HBNCGMQO.js +0 -413
  247. package/dist/login-RDIRFQ7U.js +0 -35
  248. package/dist/orders-Q347PBOH.js +0 -59
  249. package/dist/organization-TDDI3HOH.js +0 -233
  250. package/dist/products-4WTWZIVH.js +0 -85
  251. package/dist/register-6WOPLDJK.js +0 -366
  252. package/dist/return-reasons-4V2KVSRI.js +0 -52
  253. package/dist/seller-44DTDU26.js +0 -36
  254. package/dist/shipping-profiles-3PYQLYFE.js +0 -43
  255. /package/dist/{chunk-XG4PTPRM.js → chunk-NXDFDEKP.js} +0 -0
  256. /package/dist/{chunk-S3PQKKNV.js → chunk-V74Y5NIV.js} +0 -0
@@ -1,219 +0,0 @@
1
- import "./chunk-TKGWSUEI.js";
2
- import {
3
- KeyboundForm
4
- } from "./chunk-U2ZFCAPX.js";
5
- import {
6
- RouteDrawer,
7
- useRouteModal
8
- } from "./chunk-3CK6OINO.js";
9
- import {
10
- Form
11
- } from "./chunk-3QSRE5LS.js";
12
- import "./chunk-FPJLYWOU.js";
13
- import "./chunk-DHADGZJ5.js";
14
- import "./chunk-VGJTARSA.js";
15
- import "./chunk-DYUTYBAQ.js";
16
- import "./chunk-Y4VBOHAP.js";
17
- import "./chunk-JKXAL7WR.js";
18
- import "./chunk-DC2K6CFQ.js";
19
- import "./chunk-VDWGP2U6.js";
20
- import "./chunk-RE7YXVFG.js";
21
- import "./chunk-HUNGNEPY.js";
22
- import "./chunk-PADOWAXM.js";
23
- import "./chunk-LWVBKUUL.js";
24
- import "./chunk-RIILGKYR.js";
25
- import "./chunk-6EYGH3TB.js";
26
- import "./chunk-GTUR4HSV.js";
27
- import "./chunk-SI4ALL7W.js";
28
- import "./chunk-ZFFA36DB.js";
29
- import "./chunk-VHMGJUYN.js";
30
- import "./chunk-VJTYMQVA.js";
31
- import {
32
- useProduct,
33
- useProductAttributes,
34
- useUpdateProduct
35
- } from "./chunk-WPFTRRWV.js";
36
- import "./chunk-A5DJIOHN.js";
37
- import "./chunk-RHKRREUU.js";
38
- import "./chunk-ZA2KFUFR.js";
39
- import "./chunk-Y224F4UU.js";
40
- import "./chunk-PKBMQBKP.js";
41
-
42
- // src/pages/products/[id]/additional-attributes/index.tsx
43
- import { useParams } from "react-router-dom";
44
- import { Heading } from "@medusajs/ui";
45
- import { Spinner } from "@medusajs/icons";
46
-
47
- // src/pages/products/[id]/additional-attributes/product-additional-attributes-form.tsx
48
- import { InformationCircleSolid } from "@medusajs/icons";
49
- import { Button, toast, Tooltip } from "@medusajs/ui";
50
- import { useForm } from "react-hook-form";
51
- import { useTranslation } from "react-i18next";
52
-
53
- // src/pages/products/[id]/additional-attributes/Components.tsx
54
- import { Input, Switch, Textarea } from "@medusajs/ui";
55
-
56
- // src/pages/products/[id]/additional-attributes/AttributeSelect.tsx
57
- import { Select } from "@medusajs/ui";
58
- import { jsx, jsxs } from "react/jsx-runtime";
59
- var AttributeSelect = ({
60
- values,
61
- field
62
- }) => {
63
- const handleChange = (value) => {
64
- field.onChange(value);
65
- };
66
- return /* @__PURE__ */ jsxs(Select, { onValueChange: (value) => handleChange(value), value: field.value, children: [
67
- /* @__PURE__ */ jsx(Select.Trigger, { className: "bg-ui-bg-base", children: /* @__PURE__ */ jsx(Select.Value, { placeholder: "Select value" }) }),
68
- /* @__PURE__ */ jsx(Select.Content, { children: values.map(({ id, attribute_id, value }) => /* @__PURE__ */ jsx(
69
- Select.Item,
70
- {
71
- value,
72
- children: value
73
- },
74
- `select-option-${attribute_id}-${id}`
75
- )) })
76
- ] });
77
- };
78
-
79
- // src/pages/products/[id]/additional-attributes/Components.tsx
80
- import { jsx as jsx2 } from "react/jsx-runtime";
81
- var Components = ({
82
- attribute,
83
- field
84
- }) => {
85
- const { ui_component, possible_values } = attribute;
86
- if (ui_component === "select")
87
- return /* @__PURE__ */ jsx2(AttributeSelect, { values: possible_values, field });
88
- if (ui_component === "toggle")
89
- return /* @__PURE__ */ jsx2(
90
- Switch,
91
- {
92
- ...field,
93
- onCheckedChange: field.onChange,
94
- checked: field.value === "true" || field.value === true
95
- }
96
- );
97
- if (ui_component === "text_area") return /* @__PURE__ */ jsx2(Textarea, { ...field, rows: 4 });
98
- if (ui_component === "unit") return /* @__PURE__ */ jsx2(Input, { type: "number", ...field });
99
- if (ui_component === "text") return /* @__PURE__ */ jsx2(Input, { ...field });
100
- return /* @__PURE__ */ jsx2(Input, { ...field });
101
- };
102
-
103
- // src/pages/products/[id]/additional-attributes/product-additional-attributes-form.tsx
104
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
105
- var ProductAdditionalAttributesForm = ({ product, attributes, id }) => {
106
- const { t } = useTranslation();
107
- const { handleSuccess } = useRouteModal();
108
- const filteredAttributes = product?.attribute_values?.filter((a) => !!a?.attribute_id);
109
- const defaultValues = filteredAttributes?.reduce((acc, curr) => {
110
- acc[curr.attribute_id] = curr.value;
111
- return acc;
112
- }, {});
113
- const form = useForm({
114
- defaultValues
115
- });
116
- const { mutate: updateProduct, isPending: isMutating } = useUpdateProduct(id);
117
- const handleSubmit = form.handleSubmit(async (data) => {
118
- const values = Object.keys(data).reduce((acc, key) => {
119
- acc.push({ attribute_id: key, value: data[key] });
120
- return acc;
121
- }, []);
122
- await updateProduct(
123
- {
124
- additional_data: { values }
125
- },
126
- {
127
- onSuccess: () => {
128
- toast.success(
129
- t("products.edit.successToast", {
130
- title: product.title
131
- })
132
- );
133
- handleSuccess(`/products/${id}`);
134
- },
135
- onError: (error) => {
136
- toast.error(error.message);
137
- }
138
- }
139
- );
140
- });
141
- return /* @__PURE__ */ jsx3(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs2(
142
- KeyboundForm,
143
- {
144
- onSubmit: handleSubmit,
145
- className: "flex flex-1 flex-col",
146
- children: [
147
- /* @__PURE__ */ jsx3(RouteDrawer.Body, { className: "max-h-[calc(86vh)] overflow-y-auto py-2", children: attributes?.map((a) => /* @__PURE__ */ jsx3(
148
- Form.Field,
149
- {
150
- control: form.control,
151
- name: a.id,
152
- render: ({ field }) => {
153
- return /* @__PURE__ */ jsx3(
154
- Form.Item,
155
- {
156
- className: "mb-4 w-full",
157
- children: /* @__PURE__ */ jsxs2(Form.Label, { className: "flex w-full flex-col gap-y-2", children: [
158
- /* @__PURE__ */ jsxs2("span", { className: "flex items-center gap-x-2", children: [
159
- a.name,
160
- a.description && /* @__PURE__ */ jsx3(Tooltip, { content: a.description, children: /* @__PURE__ */ jsx3(InformationCircleSolid, {}) })
161
- ] }),
162
- /* @__PURE__ */ jsx3(Form.Control, { children: /* @__PURE__ */ jsx3(
163
- Components,
164
- {
165
- attribute: a,
166
- field
167
- }
168
- ) })
169
- ] })
170
- },
171
- a.id
172
- );
173
- }
174
- },
175
- `form-field-${a.handle}-${a.id}`
176
- )) }),
177
- /* @__PURE__ */ jsx3(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-x-2", children: [
178
- /* @__PURE__ */ jsx3(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx3(
179
- Button,
180
- {
181
- size: "small",
182
- variant: "secondary",
183
- type: "button",
184
- disabled: isMutating,
185
- children: t("actions.cancel")
186
- }
187
- ) }),
188
- /* @__PURE__ */ jsx3(
189
- Button,
190
- {
191
- size: "small",
192
- type: "submit",
193
- isLoading: isMutating,
194
- children: t("actions.save")
195
- }
196
- )
197
- ] }) })
198
- ]
199
- }
200
- ) });
201
- };
202
-
203
- // src/pages/products/[id]/additional-attributes/index.tsx
204
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
205
- var Component = () => {
206
- const { id } = useParams();
207
- const { product, isLoading: isProductLoading } = useProduct(id);
208
- const { attributes, isLoading: isAttributesLoading } = useProductAttributes(
209
- id
210
- );
211
- const isReady = !isAttributesLoading && attributes && !isProductLoading && product;
212
- return /* @__PURE__ */ jsxs3(RouteDrawer, { children: [
213
- /* @__PURE__ */ jsx4(RouteDrawer.Header, { children: /* @__PURE__ */ jsx4(Heading, { level: "h2", children: "Edit Additional Attributes" }) }),
214
- isReady ? /* @__PURE__ */ jsx4(ProductAdditionalAttributesForm, { product, attributes, id }) : /* @__PURE__ */ jsx4(Spinner, { className: "text-ui-fg-interactive animate-spin" })
215
- ] });
216
- };
217
- export {
218
- Component
219
- };
@@ -1,31 +0,0 @@
1
- import {
2
- ProductTagDetailBreadcrumb
3
- } from "./chunk-DVPTD7LZ.js";
4
- import "./chunk-FPJLYWOU.js";
5
- import "./chunk-DHADGZJ5.js";
6
- import "./chunk-VGJTARSA.js";
7
- import "./chunk-DYUTYBAQ.js";
8
- import "./chunk-Y4VBOHAP.js";
9
- import "./chunk-JKXAL7WR.js";
10
- import "./chunk-DC2K6CFQ.js";
11
- import "./chunk-VDWGP2U6.js";
12
- import "./chunk-RE7YXVFG.js";
13
- import "./chunk-HUNGNEPY.js";
14
- import "./chunk-PADOWAXM.js";
15
- import "./chunk-LWVBKUUL.js";
16
- import "./chunk-RIILGKYR.js";
17
- import "./chunk-6EYGH3TB.js";
18
- import "./chunk-GTUR4HSV.js";
19
- import "./chunk-SI4ALL7W.js";
20
- import "./chunk-ZFFA36DB.js";
21
- import "./chunk-VHMGJUYN.js";
22
- import "./chunk-VJTYMQVA.js";
23
- import "./chunk-WPFTRRWV.js";
24
- import "./chunk-A5DJIOHN.js";
25
- import "./chunk-RHKRREUU.js";
26
- import "./chunk-ZA2KFUFR.js";
27
- import "./chunk-Y224F4UU.js";
28
- import "./chunk-PKBMQBKP.js";
29
- export {
30
- ProductTagDetailBreadcrumb
31
- };
@@ -1,45 +0,0 @@
1
- import "./chunk-FPJLYWOU.js";
2
- import "./chunk-DHADGZJ5.js";
3
- import "./chunk-VGJTARSA.js";
4
- import "./chunk-DYUTYBAQ.js";
5
- import "./chunk-Y4VBOHAP.js";
6
- import "./chunk-JKXAL7WR.js";
7
- import "./chunk-DC2K6CFQ.js";
8
- import "./chunk-VDWGP2U6.js";
9
- import "./chunk-RE7YXVFG.js";
10
- import "./chunk-HUNGNEPY.js";
11
- import "./chunk-PADOWAXM.js";
12
- import "./chunk-LWVBKUUL.js";
13
- import "./chunk-RIILGKYR.js";
14
- import "./chunk-6EYGH3TB.js";
15
- import "./chunk-GTUR4HSV.js";
16
- import "./chunk-SI4ALL7W.js";
17
- import "./chunk-ZFFA36DB.js";
18
- import "./chunk-VHMGJUYN.js";
19
- import {
20
- useProductCategory
21
- } from "./chunk-VJTYMQVA.js";
22
- import "./chunk-WPFTRRWV.js";
23
- import "./chunk-A5DJIOHN.js";
24
- import "./chunk-RHKRREUU.js";
25
- import "./chunk-ZA2KFUFR.js";
26
- import "./chunk-Y224F4UU.js";
27
- import "./chunk-PKBMQBKP.js";
28
-
29
- // src/pages/categories/[id]/breadcrumb.tsx
30
- import { jsx } from "react/jsx-runtime";
31
- var Breadcrumb = (props) => {
32
- const { id } = props.params || {};
33
- const { product_category } = useProductCategory(
34
- id,
35
- { fields: "name" },
36
- { initialData: props.data, enabled: Boolean(id) }
37
- );
38
- if (!product_category) {
39
- return null;
40
- }
41
- return /* @__PURE__ */ jsx("span", { children: product_category.name });
42
- };
43
- export {
44
- Breadcrumb
45
- };
@@ -1,44 +0,0 @@
1
- import "./chunk-FPJLYWOU.js";
2
- import "./chunk-DHADGZJ5.js";
3
- import "./chunk-VGJTARSA.js";
4
- import "./chunk-DYUTYBAQ.js";
5
- import "./chunk-Y4VBOHAP.js";
6
- import "./chunk-JKXAL7WR.js";
7
- import "./chunk-DC2K6CFQ.js";
8
- import {
9
- useProductType
10
- } from "./chunk-VDWGP2U6.js";
11
- import "./chunk-RE7YXVFG.js";
12
- import "./chunk-HUNGNEPY.js";
13
- import "./chunk-PADOWAXM.js";
14
- import "./chunk-LWVBKUUL.js";
15
- import "./chunk-RIILGKYR.js";
16
- import "./chunk-6EYGH3TB.js";
17
- import "./chunk-GTUR4HSV.js";
18
- import "./chunk-SI4ALL7W.js";
19
- import "./chunk-ZFFA36DB.js";
20
- import "./chunk-VHMGJUYN.js";
21
- import "./chunk-VJTYMQVA.js";
22
- import "./chunk-WPFTRRWV.js";
23
- import "./chunk-A5DJIOHN.js";
24
- import "./chunk-RHKRREUU.js";
25
- import "./chunk-ZA2KFUFR.js";
26
- import "./chunk-Y224F4UU.js";
27
- import "./chunk-PKBMQBKP.js";
28
-
29
- // src/pages/settings/product-types/[id]/breadcrumb.tsx
30
- import { jsx } from "react/jsx-runtime";
31
- var ProductTypeDetailBreadcrumb = (props) => {
32
- const { id } = props.params || {};
33
- const { product_type } = useProductType(id, void 0, {
34
- initialData: props.data,
35
- enabled: Boolean(id)
36
- });
37
- if (!product_type) {
38
- return null;
39
- }
40
- return /* @__PURE__ */ jsx("span", { children: product_type.value });
41
- };
42
- export {
43
- ProductTypeDetailBreadcrumb
44
- };
@@ -1,26 +0,0 @@
1
- import {
2
- queryKeysFactory
3
- } from "./chunk-ZA2KFUFR.js";
4
- import {
5
- sdk
6
- } from "./chunk-Y224F4UU.js";
7
-
8
- // src/hooks/api/regions.tsx
9
- import {
10
- useMutation,
11
- useQuery
12
- } from "@tanstack/react-query";
13
- var REGIONS_QUERY_KEY = "regions";
14
- var regionsQueryKeys = queryKeysFactory(REGIONS_QUERY_KEY);
15
- var useRegions = (query, options) => {
16
- const { data, ...rest } = useQuery({
17
- queryFn: () => sdk.vendor.regions.query({ ...query }),
18
- queryKey: regionsQueryKeys.list(query),
19
- ...options
20
- });
21
- return { ...data, ...rest };
22
- };
23
-
24
- export {
25
- useRegions
26
- };
@@ -1,190 +0,0 @@
1
- import {
2
- queryClient
3
- } from "./chunk-RHKRREUU.js";
4
- import {
5
- queryKeysFactory
6
- } from "./chunk-ZA2KFUFR.js";
7
- import {
8
- fetchQuery,
9
- sdk
10
- } from "./chunk-Y224F4UU.js";
11
-
12
- // src/hooks/api/tags.tsx
13
- import {
14
- useMutation,
15
- useQuery
16
- } from "@tanstack/react-query";
17
- var TAGS_QUERY_KEY = "tags";
18
- var productTagsQueryKeys = queryKeysFactory(TAGS_QUERY_KEY);
19
- var useProductTag = (id, query, options) => {
20
- const { data, ...rest } = useQuery({
21
- queryKey: productTagsQueryKeys.detail(id, query),
22
- queryFn: async () => sdk.vendor.productTags.$id.query({ $id: id, ...query }),
23
- ...options
24
- });
25
- return { ...data, ...rest };
26
- };
27
- var useProductTags = (query, options) => {
28
- const { data, ...rest } = useQuery({
29
- queryKey: productTagsQueryKeys.list(query),
30
- queryFn: async () => sdk.vendor.productTags.query({ ...query }),
31
- ...options
32
- });
33
- return { ...data, ...rest };
34
- };
35
- var useUpdateProductTag = (id, options) => {
36
- return useMutation({
37
- mutationFn: (payload) => sdk.vendor.productTags.$id.mutate({ $id: id, ...payload }),
38
- onSuccess: (data, variables, context) => {
39
- queryClient.invalidateQueries({
40
- queryKey: productTagsQueryKeys.lists()
41
- });
42
- queryClient.invalidateQueries({
43
- queryKey: productTagsQueryKeys.detail(data.product_tag.id)
44
- });
45
- options?.onSuccess?.(data, variables, context);
46
- },
47
- ...options
48
- });
49
- };
50
- var useDeleteProductTag = (id, options) => {
51
- return useMutation({
52
- mutationFn: () => sdk.vendor.productTags.$id.delete({ $id: id }),
53
- onSuccess: (data, variables, context) => {
54
- queryClient.invalidateQueries({
55
- queryKey: productTagsQueryKeys.lists()
56
- });
57
- queryClient.invalidateQueries({
58
- queryKey: productTagsQueryKeys.detail(id)
59
- });
60
- options?.onSuccess?.(data, variables, context);
61
- },
62
- ...options
63
- });
64
- };
65
-
66
- // src/hooks/api/users.tsx
67
- import {
68
- useMutation as useMutation2,
69
- useQuery as useQuery2
70
- } from "@tanstack/react-query";
71
- var USERS_QUERY_KEY = "users";
72
- var usersQueryKeys = {
73
- ...queryKeysFactory(USERS_QUERY_KEY),
74
- me: () => [USERS_QUERY_KEY, "me"]
75
- };
76
- var useMe = (query, options) => {
77
- const { data, ...rest } = useQuery2({
78
- queryFn: () => sdk.vendor.sellers.me.query({ ...query }),
79
- queryKey: usersQueryKeys.me(),
80
- ...options
81
- });
82
- return {
83
- ...data,
84
- ...rest
85
- };
86
- };
87
- var useUpdateMe = (options) => {
88
- return useMutation2({
89
- mutationFn: (payload) => sdk.vendor.sellers.me.mutate(payload),
90
- onSuccess: (data, variables, context) => {
91
- queryClient.invalidateQueries({ queryKey: usersQueryKeys.me() });
92
- options?.onSuccess?.(data, variables, context);
93
- },
94
- ...options
95
- });
96
- };
97
-
98
- // src/hooks/api/currencies.tsx
99
- import { useQuery as useQuery3 } from "@tanstack/react-query";
100
- var CURRENCIES_QUERY_KEY = "currencies";
101
- var currenciesQueryKeys = queryKeysFactory(CURRENCIES_QUERY_KEY);
102
-
103
- // src/hooks/api/fulfillment.tsx
104
- import { useMutation as useMutation3 } from "@tanstack/react-query";
105
- var FULFILLMENTS_QUERY_KEY = "fulfillments";
106
- var fulfillmentsQueryKeys = queryKeysFactory(FULFILLMENTS_QUERY_KEY);
107
-
108
- // src/hooks/api/invites.tsx
109
- import {
110
- useMutation as useMutation4,
111
- useQuery as useQuery4
112
- } from "@tanstack/react-query";
113
- var INVITES_QUERY_KEY = "invites";
114
- var invitesQueryKeys = queryKeysFactory(INVITES_QUERY_KEY);
115
-
116
- // src/hooks/api/notification.tsx
117
- import { useQuery as useQuery5 } from "@tanstack/react-query";
118
- var NOTIFICATION_QUERY_KEY = "notification";
119
- var notificationQueryKeys = queryKeysFactory(NOTIFICATION_QUERY_KEY);
120
- var useNotifications = (query, options) => {
121
- const { data, ...rest } = useQuery5({
122
- queryFn: () => fetchQuery(`/vendor/notifications`, {
123
- method: "GET",
124
- query
125
- }),
126
- queryKey: notificationQueryKeys.list(query),
127
- ...options
128
- });
129
- return { ...data, ...rest };
130
- };
131
-
132
- // src/hooks/api/payment-collections.tsx
133
- import { useMutation as useMutation5 } from "@tanstack/react-query";
134
- var PAYMENT_COLLECTION_QUERY_KEY = "payment-collection";
135
- var paymentCollectionQueryKeys = queryKeysFactory(
136
- PAYMENT_COLLECTION_QUERY_KEY
137
- );
138
-
139
- // src/hooks/api/payments.tsx
140
- import {
141
- useMutation as useMutation6,
142
- useQuery as useQuery6
143
- } from "@tanstack/react-query";
144
- var PAYMENT_QUERY_KEY = "payment";
145
- var paymentQueryKeys = queryKeysFactory(PAYMENT_QUERY_KEY);
146
- var PAYMENT_PROVIDERS_QUERY_KEY = "payment_providers";
147
- var paymentProvidersQueryKeys = queryKeysFactory(
148
- PAYMENT_PROVIDERS_QUERY_KEY
149
- );
150
-
151
- // src/hooks/api/product-variants.tsx
152
- import {
153
- useQuery as useQuery7
154
- } from "@tanstack/react-query";
155
- var PRODUCT_VARIANT_QUERY_KEY = "product_variant";
156
- var productVariantQueryKeys = queryKeysFactory(
157
- PRODUCT_VARIANT_QUERY_KEY
158
- );
159
-
160
- // src/hooks/api/refund-reasons.tsx
161
- import {
162
- useMutation as useMutation7,
163
- useQuery as useQuery8
164
- } from "@tanstack/react-query";
165
- var REFUND_REASONS_QUERY_KEY = "refund_reasons";
166
- var refundReasonsQueryKeys = queryKeysFactory(
167
- REFUND_REASONS_QUERY_KEY
168
- );
169
-
170
- // src/hooks/api/shipping-option-types.tsx
171
- import {
172
- useMutation as useMutation8,
173
- useQuery as useQuery9
174
- } from "@tanstack/react-query";
175
- var SHIPPING_OPTION_TYPES_QUERY_KEY = "shipping_option_types";
176
- var shippingOptionTypesQueryKeys = queryKeysFactory(
177
- SHIPPING_OPTION_TYPES_QUERY_KEY
178
- );
179
-
180
- export {
181
- notificationQueryKeys,
182
- useNotifications,
183
- productTagsQueryKeys,
184
- useProductTag,
185
- useProductTags,
186
- useUpdateProductTag,
187
- useDeleteProductTag,
188
- useMe,
189
- useUpdateMe
190
- };
@@ -1,53 +0,0 @@
1
- import {
2
- queryKeysFactory
3
- } from "./chunk-ZA2KFUFR.js";
4
- import {
5
- sdk
6
- } from "./chunk-Y224F4UU.js";
7
-
8
- // src/hooks/api/price-preferences.tsx
9
- import {
10
- useMutation,
11
- useQuery
12
- } from "@tanstack/react-query";
13
- var PRICE_PREFERENCES_QUERY_KEY = "price-preferences";
14
- var pricePreferencesQueryKeys = queryKeysFactory(
15
- PRICE_PREFERENCES_QUERY_KEY
16
- );
17
- var usePricePreferences = (query, options) => {
18
- const { data, ...rest } = useQuery({
19
- queryFn: () => sdk.vendor.pricePreferences.query({ ...query }),
20
- queryKey: pricePreferencesQueryKeys.list(query),
21
- ...options
22
- });
23
- return { ...data, ...rest };
24
- };
25
-
26
- // src/hooks/api/store.tsx
27
- import { useMutation as useMutation2, useQuery as useQuery2 } from "@tanstack/react-query";
28
- import { ClientError } from "@mercurjs/client";
29
- var STORE_QUERY_KEY = "store";
30
- var storeQueryKeys = queryKeysFactory(STORE_QUERY_KEY);
31
- async function retrieveActiveStore(query) {
32
- const response = await sdk.vendor.stores.query({ ...query });
33
- const activeStore = response.stores?.[0];
34
- if (!activeStore) {
35
- throw new ClientError("No active store found", "Not Found", 404);
36
- }
37
- return { store: activeStore };
38
- }
39
- var useStore = (query) => {
40
- const { data, ...rest } = useQuery2({
41
- queryFn: () => retrieveActiveStore(query),
42
- queryKey: storeQueryKeys.details()
43
- });
44
- return {
45
- ...data,
46
- ...rest
47
- };
48
- };
49
-
50
- export {
51
- usePricePreferences,
52
- useStore
53
- };