@mercurjs/vendor 2.1.2 → 2.2.0-canary.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 (230) hide show
  1. package/dist/{[id]-PDGHF5J2.js → [id]-2DQX3YWJ.js} +35 -31
  2. package/dist/{[id]-TO6KT3ZE.js → [id]-4OBGG7OH.js} +23 -21
  3. package/dist/{[id]-X4DDKOMQ.js → [id]-4PKMKNJH.js} +26 -22
  4. package/dist/[id]-4STHLE4N.js +1442 -0
  5. package/dist/{[id]-4VCL3MMM.js → [id]-5UFO4RKF.js} +26 -22
  6. package/dist/{[id]-H3C3ZSC6.js → [id]-6MXCVV5J.js} +25 -21
  7. package/dist/{[id]-6PXEWRG7.js → [id]-7BAKUHUO.js} +13 -13
  8. package/dist/{[id]-7RUAH3TI.js → [id]-K2CT7BXQ.js} +4 -4
  9. package/dist/{[id]-3G5G7ZFV.js → [id]-KJIQTFGE.js} +22 -20
  10. package/dist/{[id]-INOFZHL7.js → [id]-LTNOHLGE.js} +16 -16
  11. package/dist/{[id]-B3LHVQM5.js → [id]-PGIT5WJC.js} +25 -21
  12. package/dist/{[id]-T2ROPEGY.js → [id]-Y2ISCLUD.js} +7 -7
  13. package/dist/{[id]-Y7GAMNC5.js → [id]-ZCMSBEVM.js} +4 -4
  14. package/dist/{[id]-UTKO3VG4.js → [id]-ZWWMJAKI.js} +9 -9
  15. package/dist/{[location_id]-D55RQOXT.js → [location_id]-NUBXDDJC.js} +9 -9
  16. package/dist/{[province_id]-OFH2ZOFQ.js → [province_id]-H2QAPKVH.js} +20 -18
  17. package/dist/{add-C6OX5C54.js → add-GZJ7OMV3.js} +34 -30
  18. package/dist/add-KQAABWCR.js +392 -0
  19. package/dist/{add-customer-groups-PJRJUWS2.js → add-customer-groups-RAHCP67U.js} +16 -14
  20. package/dist/{add-products-INOLNPO6.js → add-products-TSVQHC67.js} +23 -19
  21. package/dist/{add-promotions-AHDOP52Q.js → add-promotions-CSCAJZHV.js} +7 -7
  22. package/dist/{add-to-campaign-HL6NGRR4.js → add-to-campaign-DLP7PSQB.js} +4 -4
  23. package/dist/{address-KRENKSLP.js → address-7F5SN7PV.js} +17 -15
  24. package/dist/{adjust-inventory-H4EUP7J3.js → adjust-inventory-SZF4W7LR.js} +2 -2
  25. package/dist/{allocate-items-SUCUZU4D.js → allocate-items-SDFS5GYN.js} +6 -6
  26. package/dist/{areas-UUMZDXLX.js → areas-7Y6BVS5A.js} +8 -8
  27. package/dist/{attributes-CALEHJJG.js → attributes-MBZ76HVZ.js} +3 -3
  28. package/dist/{breadcrumb-BS7Y5OKF.js → breadcrumb-65SAGUUL.js} +2 -2
  29. package/dist/{breadcrumb-6W2VP3OZ.js → breadcrumb-7PURSRTT.js} +13 -11
  30. package/dist/{breadcrumb-M5Z5WA6I.js → breadcrumb-EDPMEN2P.js} +2 -2
  31. package/dist/breadcrumb-FLDHJRVY.js +26 -0
  32. package/dist/{breadcrumb-VNNZ3TTW.js → breadcrumb-HND5FFWC.js} +2 -2
  33. package/dist/{breadcrumb-OIGGCB3L.js → breadcrumb-QV2IAX7N.js} +8 -2
  34. package/dist/{breadcrumb-KQSFIXQ4.js → breadcrumb-VWELWDB2.js} +1 -1
  35. package/dist/{breadcrumb-IG7VZGW2.js → breadcrumb-WRG4SITG.js} +13 -11
  36. package/dist/{breadcrumb-TW5JEOYS.js → breadcrumb-ZCG2RHIU.js} +12 -10
  37. package/dist/{campaigns-HS6MIO7X.js → campaigns-L6ULR6KR.js} +5 -5
  38. package/dist/{categories-PKWR3FM3.js → categories-FUZQKBXV.js} +6 -6
  39. package/dist/{chunk-PDQSPKG5.js → chunk-2DXNJURE.js} +1 -1
  40. package/dist/{chunk-ZZO3INVE.js → chunk-2MDGYHWN.js} +128 -25
  41. package/dist/{chunk-5UD4P6YL.js → chunk-2USXZSTK.js} +4 -4
  42. package/dist/{chunk-6SBMVLJ2.js → chunk-36L54SQQ.js} +1 -1
  43. package/dist/chunk-37G4Y5I7.js +101 -0
  44. package/dist/{chunk-5M3SL4UZ.js → chunk-3CVJA5UE.js} +9 -104
  45. package/dist/chunk-432S4FGR.js +0 -0
  46. package/dist/{chunk-KQGVSLUI.js → chunk-44RQ5PTN.js} +1803 -914
  47. package/dist/{chunk-Y2QI7KWS.js → chunk-4LVP635F.js} +408 -664
  48. package/dist/{chunk-UL4O5M4S.js → chunk-4S6XGIC6.js} +1 -18
  49. package/dist/chunk-5ZVWOCAC.js +426 -0
  50. package/dist/{chunk-WITQNQXN.js → chunk-6BS2AVGJ.js} +3 -3
  51. package/dist/{chunk-ZYOXKUKZ.js → chunk-7LBY5JLV.js} +1 -1
  52. package/dist/chunk-7SLWXX6L.js +811 -0
  53. package/dist/{chunk-LQYMBSRQ.js → chunk-AIZM66CG.js} +1 -1
  54. package/dist/{chunk-IZ5RG5XI.js → chunk-AJLGY3LQ.js} +1 -21
  55. package/dist/{chunk-WFE6CT6M.js → chunk-AVOIZO63.js} +21 -77
  56. package/dist/chunk-C2FG3SX2.js +68 -0
  57. package/dist/chunk-CFRWIQIZ.js +43 -0
  58. package/dist/{chunk-WNVEMFIK.js → chunk-CNMY5HVP.js} +2 -2
  59. package/dist/{chunk-BLVJAKBA.js → chunk-DDH7ULIQ.js} +1 -1
  60. package/dist/chunk-DIW4GRTI.js +503 -0
  61. package/dist/{chunk-JQP7MOFH.js → chunk-DVEKYLPV.js} +1 -1
  62. package/dist/{chunk-QX45GVAL.js → chunk-EIUYXS7E.js} +8 -8
  63. package/dist/{chunk-N7OVXN72.js → chunk-EROX26D4.js} +1 -1
  64. package/dist/{chunk-2RHAI7WK.js → chunk-EZ3JOAUS.js} +1 -1
  65. package/dist/{chunk-HFRHHT36.js → chunk-FDR22JMM.js} +63 -8
  66. package/dist/{chunk-PEKANQ3T.js → chunk-FJUUGFXL.js} +2 -2
  67. package/dist/{chunk-3CK6OINO.js → chunk-GDWBOQI5.js} +3 -5
  68. package/dist/{chunk-47SXTGLN.js → chunk-GXIAIITP.js} +63 -200
  69. package/dist/{chunk-4MFMCZEJ.js → chunk-H6LZ77GX.js} +2 -2
  70. package/dist/chunk-IWLDKGYQ.js +95 -0
  71. package/dist/chunk-K4X324QP.js +18 -0
  72. package/dist/{chunk-VQ5EKDA3.js → chunk-KD7RYE6R.js} +1 -1
  73. package/dist/chunk-LEWA4BPH.js +18 -0
  74. package/dist/{chunk-7Q5SDEK7.js → chunk-LNM2D2I4.js} +4 -4
  75. package/dist/{chunk-LPOAVK6Y.js → chunk-LQD232FW.js} +47 -12
  76. package/dist/{chunk-OXXL4WQU.js → chunk-M7KSRYRI.js} +5 -5
  77. package/dist/chunk-MBFHMJHN.js +2063 -0
  78. package/dist/{chunk-I2IKYOZX.js → chunk-N4MVIBFM.js} +19 -19
  79. package/dist/{chunk-PCMNEUMV.js → chunk-NHFEY3EI.js} +1 -1
  80. package/dist/{chunk-RTAWYMQP.js → chunk-NJMNYS7G.js} +1 -1
  81. package/dist/{chunk-HGQTL7NX.js → chunk-NSZQERLE.js} +2 -2
  82. package/dist/{chunk-RL7SFZOF.js → chunk-NXNJQZCP.js} +1 -1
  83. package/dist/{chunk-CNLP35S7.js → chunk-OD3U3TX4.js} +16 -31
  84. package/dist/{chunk-D2MA5TAP.js → chunk-PBD36EZJ.js} +2 -2
  85. package/dist/{chunk-4ZGFODSC.js → chunk-PZ44R4AS.js} +1 -1
  86. package/dist/{chunk-ZEVYT6IX.js → chunk-QNNJN4H6.js} +116 -286
  87. package/dist/{chunk-WBI7FEGI.js → chunk-QS6RWIBL.js} +1 -1
  88. package/dist/chunk-QT7YFHCA.js +198 -0
  89. package/dist/{chunk-GYV6SKY7.js → chunk-QXLRABYH.js} +4 -6
  90. package/dist/chunk-RXZFEFNV.js +73 -0
  91. package/dist/{chunk-RUE5BPC2.js → chunk-RZLN2Q6G.js} +1 -1
  92. package/dist/{chunk-NYDJTWRL.js → chunk-SGR4DMCW.js} +4 -4
  93. package/dist/chunk-T6LHVNWO.js +27 -0
  94. package/dist/{chunk-DKQ4XMSN.js → chunk-TNVYTMBL.js} +6 -6
  95. package/dist/{chunk-32RYSB2V.js → chunk-TODJFRLH.js} +2 -2
  96. package/dist/{chunk-P3ZTO6T2.js → chunk-UAF2S447.js} +1 -1
  97. package/dist/{chunk-J6BRLL3F.js → chunk-UCQKXXLD.js} +2 -2
  98. package/dist/chunk-UORPTGV2.js +114 -0
  99. package/dist/{chunk-CYTNBXWF.js → chunk-UX7J5NZG.js} +9 -9
  100. package/dist/{chunk-X4FLOQ45.js → chunk-WBHFU3MG.js} +2 -2
  101. package/dist/chunk-WLT7K7K7.js +63 -0
  102. package/dist/{chunk-4URLUCTD.js → chunk-WUPJADSO.js} +2 -2
  103. package/dist/{chunk-ITI54CII.js → chunk-X4INVIWL.js} +5 -5
  104. package/dist/{chunk-PTW7JNAP.js → chunk-XFQJU6FA.js} +4 -4
  105. package/dist/{collections-DJZI2RM2.js → collections-3OPR3DSD.js} +22 -19
  106. package/dist/{configuration-RHPIO2QT.js → configuration-C4IGBNXH.js} +1 -1
  107. package/dist/{configuration-GN3TO77H.js → configuration-UOSNP45I.js} +3 -3
  108. package/dist/{create-3EK5CNNX.js → create-2MQFQHTE.js} +33 -29
  109. package/dist/{create-YO55Z3YD.js → create-2PCLG7TV.js} +32 -38
  110. package/dist/{create-G4T2PAJH.js → create-35MYQPVM.js} +23 -21
  111. package/dist/{create-HKJVSFB7.js → create-BJ4OO6LS.js} +23 -21
  112. package/dist/create-DDPIXCXT.js +210 -0
  113. package/dist/{create-7S7CZWEN.js → create-GB3ZA4LH.js} +4 -4
  114. package/dist/create-JDGM5KXE.js +193 -0
  115. package/dist/{create-IDVCZHIX.js → create-ORXYT74H.js} +14 -12
  116. package/dist/{create-GHM7OTCR.js → create-R7K3ECN6.js} +1 -1
  117. package/dist/{create-D6EW3EWC.js → create-SFU3W3ZH.js} +1 -1
  118. package/dist/{create-3ZVXEPX5.js → create-SQ3FYMGI.js} +25 -21
  119. package/dist/{create-33TRLASX.js → create-UPYB65PD.js} +1 -1
  120. package/dist/{create-OCFPLNNY.js → create-UQNYMVBM.js} +6 -6
  121. package/dist/{create-OGLPDVOI.js → create-XAD5NMSJ.js} +37 -35
  122. package/dist/{create-KGYL7FBM.js → create-XVHOCZHJ.js} +1 -1
  123. package/dist/{create-4AE3VTWN.js → create-YBF4YGWG.js} +2 -2
  124. package/dist/{customers-6ZLE65UX.js → customers-ETXVNM3G.js} +5 -5
  125. package/dist/{edit-QBISX7D3.js → edit-2Q7TRUTL.js} +14 -12
  126. package/dist/{edit-B5B3XKDM.js → edit-522DG3BY.js} +1 -1
  127. package/dist/{edit-ATXE6CM5.js → edit-C4OCKQVU.js} +1 -1
  128. package/dist/{edit-IR6V2IDN.js → edit-FKXIQ6ZI.js} +19 -17
  129. package/dist/{edit-4HZHLYI3.js → edit-GQNIINRR.js} +1 -1
  130. package/dist/{edit-LRRJTHV2.js → edit-KAKVPHZZ.js} +1 -1
  131. package/dist/{edit-ZSOI56BQ.js → edit-L5ZZLMAY.js} +22 -22
  132. package/dist/{edit-FNDDSSMT.js → edit-NYD45J2Q.js} +37 -8
  133. package/dist/{edit-GIJXLMC3.js → edit-O4JLGKQR.js} +2 -2
  134. package/dist/{edit-5CJZRHAA.js → edit-ORXS3A2Y.js} +1 -1
  135. package/dist/{edit-FC64DWB2.js → edit-Q3UQIOLS.js} +1 -1
  136. package/dist/{edit-7HTH2UJF.js → edit-REDDBLTA.js} +3 -3
  137. package/dist/{edit-2KRJIPRK.js → edit-SGUY2CCK.js} +19 -17
  138. package/dist/{edit-B75KK5ZX.js → edit-SWRWWFW6.js} +35 -31
  139. package/dist/{edit-7GVP6SRA.js → edit-ZAHCMF5U.js} +1 -1
  140. package/dist/{edit-RNT555GP.js → edit-ZCXUG42Q.js} +13 -11
  141. package/dist/{edit-MYSWY6W4.js → edit-ZMERG3L7.js} +1 -1
  142. package/dist/{edit-budget-J27CSEZH.js → edit-budget-L3CCEWNF.js} +1 -1
  143. package/dist/{edit-inventory-item-US77M2FF.js → edit-inventory-item-6B7ITDGD.js} +2 -2
  144. package/dist/{edit-inventory-item-attributes-UGAE2NAZ.js → edit-inventory-item-attributes-Y7MQZLXI.js} +3 -3
  145. package/dist/{fulfillment-DCS67LTK.js → fulfillment-75Z4H23W.js} +16 -14
  146. package/dist/{fulfillment-providers-GM5PO6N3.js → fulfillment-providers-KCQWL62T.js} +20 -17
  147. package/dist/index.css +27 -62
  148. package/dist/index.d.ts +3 -10
  149. package/dist/index.js +522 -458
  150. package/dist/{inventory-OPZ2FSEE.js → inventory-KAUVPMPZ.js} +6 -6
  151. package/dist/{invite-764K3TJS.js → invite-6CPYVHDX.js} +24 -21
  152. package/dist/{invite-KEJLNXEZ.js → invite-CI2P4GF6.js} +15 -12
  153. package/dist/loader-FBB5OQRT.js +31 -0
  154. package/dist/{locations-ZVPTQCQY.js → locations-INS6FTMJ.js} +4 -4
  155. package/dist/{login-OUHRNNXA.js → login-KY342RMK.js} +12 -10
  156. package/dist/{manage-locations-YUKEFCBJ.js → manage-locations-WNHEBS3A.js} +2 -2
  157. package/dist/{media-4KYFHB5V.js → media-KOYAOXG6.js} +41 -9
  158. package/dist/{metadata-NYYL26MQ.js → metadata-2CMH4I6U.js} +16 -14
  159. package/dist/{metadata-AWUKZ25V.js → metadata-5BPOBBU2.js} +3 -3
  160. package/dist/{metadata-OCE6A3JE.js → metadata-GWI6R4ES.js} +15 -13
  161. package/dist/{metadata-G7KZXVNE.js → metadata-NUXUC2JA.js} +15 -13
  162. package/dist/{metadata-XP3ZYW2M.js → metadata-TLDUF5KV.js} +17 -15
  163. package/dist/{metadata-PYY4IB7K.js → metadata-WR4RFXO5.js} +16 -14
  164. package/dist/offer-create-page-YKMHHTU5.js +743 -0
  165. package/dist/offer-detail-page-6MAHNNIO.js +488 -0
  166. package/dist/offer-edit-page-DYQFU6JU.js +151 -0
  167. package/dist/offer-inventory-batch-page-WKCWNDNK.js +290 -0
  168. package/dist/offer-pricing-edit-page-4TYGGSOE.js +195 -0
  169. package/dist/offers-UGQJNGTD.js +32 -0
  170. package/dist/{onboarding-WXZHW62K.js → onboarding-43LQQQGQ.js} +22 -20
  171. package/dist/{orders-LWJ472VM.js → orders-R2LOJ6N5.js} +24 -21
  172. package/dist/organization-XGFU4YDG.js +375 -0
  173. package/dist/{organize-RFOMQCBG.js → organize-HNJUHEEG.js} +4 -4
  174. package/dist/{organize-OVKJ3HZO.js → organize-K6QMAMEN.js} +4 -4
  175. package/dist/pages/index.d.ts +415 -758
  176. package/dist/pages/index.js +81 -77
  177. package/dist/{payment-details-UVXYCTUK.js → payment-details-64US5XWD.js} +17 -15
  178. package/dist/{payouts-TR7K5I37.js → payouts-UXJDTXDL.js} +6 -6
  179. package/dist/{price-lists-S2WNELFZ.js → price-lists-KBPUVSZI.js} +8 -8
  180. package/dist/{pricing-UF27DAXA.js → pricing-DF6C5XK4.js} +35 -32
  181. package/dist/{product-tags-2CKH2M6D.js → product-tags-CL7HSEDI.js} +32 -28
  182. package/dist/{product-types-FX43JEO2.js → product-types-UUHBV4IZ.js} +5 -5
  183. package/dist/product-variant-detail-RVWEYVPC.js +220 -0
  184. package/dist/{product-variant-edit-P3DSIFE3.js → product-variant-edit-MNCS7ZYW.js} +126 -66
  185. package/dist/{products-H5EMRJYS.js → products-4KV5Y2JY.js} +23 -19
  186. package/dist/{products-2LHGS7X3.js → products-SXYTQFJ3.js} +40 -43
  187. package/dist/{professional-details-HYKTH44B.js → professional-details-5T2VS6MM.js} +16 -14
  188. package/dist/{profile-PB27WIRW.js → profile-6XGHAT7H.js} +20 -18
  189. package/dist/{promotions-5EYPGHJP.js → promotions-O7U4BTK6.js} +8 -8
  190. package/dist/{register-4O4F6YZK.js → register-GDKN3SKM.js} +16 -14
  191. package/dist/{reset-password-GTWLBOFK.js → reset-password-EICPAY2N.js} +1 -1
  192. package/dist/{return-reasons-LOKYRGMI.js → return-reasons-M6IR77XW.js} +16 -14
  193. package/dist/{sales-channels-7R2IY3KG.js → sales-channels-B6FULRWI.js} +8 -7
  194. package/dist/{sales-channels-Y4LRP7JC.js → sales-channels-JW3QUYR7.js} +8 -7
  195. package/dist/{settings-2XDLFYMS.js → settings-SAAHTUZZ.js} +39 -35
  196. package/dist/{shipment-4GW2JFWB.js → shipment-Q33QBMXX.js} +13 -11
  197. package/dist/{shipping-profile-R3NABPQF.js → shipping-profile-Y4SNEPZX.js} +2 -2
  198. package/dist/{shipping-profiles-QVKNFLCW.js → shipping-profiles-2NWKCEJK.js} +18 -16
  199. package/dist/{stock-5RXNUPUT.js → stock-7CSVEJJU.js} +19 -17
  200. package/dist/{store-DE2RGX7T.js → store-GHFWU7EV.js} +28 -25
  201. package/dist/{store-closure-DNMCHUXD.js → store-closure-P5PD2RSV.js} +16 -14
  202. package/dist/{store-select-GZEJHRZ7.js → store-select-KDT6USQA.js} +17 -15
  203. package/dist/{tax-regions-UD6P5FVC.js → tax-regions-YXZW7UVX.js} +5 -5
  204. package/dist/{team-JXKAVRPU.js → team-EDJ62747.js} +25 -23
  205. package/dist/types-CtCEtTE6.d.ts +16 -0
  206. package/package.json +3 -3
  207. package/dist/[id]-BYP37PU4.js +0 -1314
  208. package/dist/add-KRAGFFBJ.js +0 -158
  209. package/dist/bulk-edit-3SMBLIOA.js +0 -244
  210. package/dist/chunk-4KX6CBJ4.js +0 -178
  211. package/dist/chunk-DLNNTQRY.js +0 -217
  212. package/dist/chunk-FX4V5JCF.js +0 -37
  213. package/dist/chunk-GC33DBKG.js +0 -143
  214. package/dist/chunk-NK4NR6MN.js +0 -173
  215. package/dist/chunk-PFU6FSXY.js +0 -430
  216. package/dist/chunk-QJEOPT2P.js +0 -330
  217. package/dist/chunk-QSGR43JM.js +0 -30
  218. package/dist/chunk-STR3NGWE.js +0 -3736
  219. package/dist/create-3DOO3RNH.js +0 -716
  220. package/dist/create-I7HV3RM6.js +0 -150
  221. package/dist/edit-K2AD335I.js +0 -237
  222. package/dist/edit-VO5XLIEL.js +0 -362
  223. package/dist/edit-stocks-and-prices-MHHQFWFA.js +0 -408
  224. package/dist/organization-LPYQRTQC.js +0 -303
  225. package/dist/prices-3OXV5RGY.js +0 -270
  226. package/dist/product-variant-detail-WV4KXVXR.js +0 -590
  227. package/dist/stock-GPC3BCL6.js +0 -500
  228. package/dist/{chunk-SDSEW72R.js → chunk-E2HQPY32.js} +3 -3
  229. package/dist/{chunk-6WY5X4PE.js → chunk-L7QKFC5N.js} +7 -7
  230. /package/dist/{chunk-CAS74NLJ.js → chunk-YV6MK4PZ.js} +0 -0
@@ -1,590 +0,0 @@
1
- import {
2
- LinkButton
3
- } from "./chunk-7AV5EJJ5.js";
4
- import {
5
- getLocaleAmount
6
- } from "./chunk-PXYDR7WQ.js";
7
- import "./chunk-FQERBIVS.js";
8
- import {
9
- PlaceholderCell
10
- } from "./chunk-PHOCVOZ5.js";
11
- import {
12
- _DataTable,
13
- useDataTable
14
- } from "./chunk-AIF2KTEE.js";
15
- import "./chunk-YN3FGNJM.js";
16
- import "./chunk-KAZ5BYTQ.js";
17
- import {
18
- NoRecords
19
- } from "./chunk-3EF54XFY.js";
20
- import "./chunk-IQPN4PZJ.js";
21
- import {
22
- SectionRow
23
- } from "./chunk-4TLP3TAA.js";
24
- import {
25
- TwoColumnPage
26
- } from "./chunk-CAS74NLJ.js";
27
- import "./chunk-LRD242C7.js";
28
- import "./chunk-47SXTGLN.js";
29
- import "./chunk-F4OJN2F2.js";
30
- import "./chunk-LRARA622.js";
31
- import "./chunk-M6N4ISXL.js";
32
- import "./chunk-S7EKBD2C.js";
33
- import "./chunk-VXMOPVRH.js";
34
- import "./chunk-IQWK723D.js";
35
- import "./chunk-VV6IKGCN.js";
36
- import "./chunk-PCMNEUMV.js";
37
- import "./chunk-BOZJOOGW.js";
38
- import "./chunk-RL7SFZOF.js";
39
- import "./chunk-LWJF63JW.js";
40
- import "./chunk-NBPMNUKZ.js";
41
- import "./chunk-WBI7FEGI.js";
42
- import "./chunk-VXWN37PT.js";
43
- import "./chunk-UL4O5M4S.js";
44
- import "./chunk-FX4V5JCF.js";
45
- import {
46
- ActionMenu
47
- } from "./chunk-BDGZ4EQO.js";
48
- import "./chunk-QHQWEERJ.js";
49
- import "./chunk-3B34B2M2.js";
50
- import "./chunk-RUE5BPC2.js";
51
- import "./chunk-LAVHRER2.js";
52
- import "./chunk-Y7QKP6QU.js";
53
- import {
54
- TwoColumnPageSkeleton
55
- } from "./chunk-INNFZYX2.js";
56
- import {
57
- useDeleteVariant,
58
- useProduct,
59
- useProductVariant,
60
- useProductVariants,
61
- useUpdateProductVariant,
62
- useUpdateVariantMedia,
63
- variantsQueryKeys
64
- } from "./chunk-ZEVYT6IX.js";
65
- import "./chunk-A5DJIOHN.js";
66
- import {
67
- queryClient
68
- } from "./chunk-RHKRREUU.js";
69
- import "./chunk-ZA2KFUFR.js";
70
- import {
71
- fetchQuery
72
- } from "./chunk-RIN4CBRB.js";
73
- import "./chunk-NBMM2TZK.js";
74
-
75
- // src/pages/product-variants/product-variant-detail/constants.ts
76
- var VARIANT_DETAIL_FIELDS = "*inventory_items,*inventory_items.inventory,*inventory_items.inventory.location_levels,*options,*options.option,*prices,*prices.price_rules";
77
-
78
- // src/pages/product-variants/product-variant-detail/breadcrumb.tsx
79
- import { jsx } from "react/jsx-runtime";
80
- var ProductVariantDetailBreadcrumb = (props) => {
81
- const { product_id, variant_id } = props.params || {};
82
- const { variant } = useProductVariant(
83
- product_id,
84
- variant_id,
85
- {
86
- fields: VARIANT_DETAIL_FIELDS
87
- },
88
- {
89
- initialData: props.data,
90
- enabled: Boolean(product_id) && Boolean(variant_id)
91
- }
92
- );
93
- if (!variant) {
94
- return null;
95
- }
96
- return /* @__PURE__ */ jsx("span", { children: variant.title });
97
- };
98
-
99
- // src/pages/product-variants/product-variant-detail/loader.ts
100
- var variantDetailQuery = (productId, variantId) => ({
101
- queryKey: variantsQueryKeys.detail(variantId, {
102
- fields: VARIANT_DETAIL_FIELDS
103
- }),
104
- queryFn: async () => await fetchQuery(`/vendor/products/${productId}`, {
105
- method: "GET"
106
- // query: { fields: VARIANT_DETAIL_FIELDS },
107
- })
108
- });
109
- var variantLoader = async ({ params }) => {
110
- const productId = params.product_id;
111
- const variantId = params.variant_id;
112
- const query = variantDetailQuery(productId, variantId);
113
- return queryClient.ensureQueryData(query);
114
- };
115
-
116
- // src/pages/product-variants/product-variant-detail/product-variant-detail.tsx
117
- import { useMemo as useMemo2 } from "react";
118
- import { useParams } from "react-router-dom";
119
-
120
- // src/utils/get-explicit-variant-images.ts
121
- var getExplicitVariantImages = (images, variantId) => {
122
- return images.filter((img) => {
123
- if (!img.variants || img.variants.length === 0) {
124
- return false;
125
- }
126
- return img.variants.some(
127
- (v) => typeof v === "string" ? v === variantId : v.id === variantId
128
- );
129
- });
130
- };
131
-
132
- // src/pages/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx
133
- import { Component, PencilSquare, Trash } from "@medusajs/icons";
134
- import { Badge, Container, Heading, usePrompt } from "@medusajs/ui";
135
- import { useTranslation } from "react-i18next";
136
- import { useNavigate } from "react-router-dom";
137
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
138
- function VariantGeneralSection({ variant }) {
139
- const { t } = useTranslation();
140
- const prompt = usePrompt();
141
- const navigate = useNavigate();
142
- const hasInventoryKit = variant.inventory && variant.inventory.length > 1;
143
- const { mutateAsync } = useDeleteVariant(variant.product_id, variant.id);
144
- const handleDelete = async () => {
145
- const res = await prompt({
146
- title: t("general.areYouSure"),
147
- description: t("products.variant.deleteWarning", {
148
- title: variant.title
149
- }),
150
- confirmText: t("actions.delete"),
151
- cancelText: t("actions.cancel")
152
- });
153
- if (!res) {
154
- return;
155
- }
156
- await mutateAsync(void 0, {
157
- onSuccess: () => {
158
- navigate("..", { replace: true });
159
- }
160
- });
161
- };
162
- return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
163
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
164
- /* @__PURE__ */ jsxs("div", { children: [
165
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
166
- /* @__PURE__ */ jsx2(Heading, { children: variant.title }),
167
- hasInventoryKit && /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted font-normal", children: /* @__PURE__ */ jsx2(Component, {}) })
168
- ] }),
169
- /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-subtle txt-small mt-2", children: t("labels.productVariant") })
170
- ] }),
171
- /* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-4", children: /* @__PURE__ */ jsx2(
172
- ActionMenu,
173
- {
174
- groups: [
175
- {
176
- actions: [
177
- {
178
- label: t("actions.edit"),
179
- to: "edit",
180
- icon: /* @__PURE__ */ jsx2(PencilSquare, {})
181
- }
182
- ]
183
- },
184
- {
185
- actions: [
186
- {
187
- label: t("actions.delete"),
188
- onClick: handleDelete,
189
- icon: /* @__PURE__ */ jsx2(Trash, {})
190
- }
191
- ]
192
- }
193
- ]
194
- }
195
- ) })
196
- ] }),
197
- /* @__PURE__ */ jsx2(SectionRow, { title: t("fields.sku"), value: variant.sku }),
198
- variant.options?.map((o) => /* @__PURE__ */ jsx2(
199
- SectionRow,
200
- {
201
- title: o.option?.title,
202
- value: /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", children: o.value })
203
- },
204
- o.id
205
- ))
206
- ] });
207
- }
208
-
209
- // src/pages/product-variants/product-variant-detail/components/variant-inventory-section/variant-inventory-section.tsx
210
- import { useTranslation as useTranslation3 } from "react-i18next";
211
- import { Container as Container2, Heading as Heading2 } from "@medusajs/ui";
212
-
213
- // src/pages/product-variants/product-variant-detail/components/variant-inventory-section/use-inventory-table-columns.tsx
214
- import { createColumnHelper } from "@tanstack/react-table";
215
- import { useMemo } from "react";
216
- import { useTranslation as useTranslation2 } from "react-i18next";
217
- import { jsx as jsx3 } from "react/jsx-runtime";
218
- var columnHelper = createColumnHelper();
219
- var useInventoryTableColumns = () => {
220
- const { t } = useTranslation2();
221
- return useMemo(
222
- () => [
223
- columnHelper.accessor("variant.title", {
224
- header: t("fields.title"),
225
- cell: ({ getValue }) => {
226
- const title = getValue();
227
- if (!title) {
228
- return /* @__PURE__ */ jsx3(PlaceholderCell, {});
229
- }
230
- return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3("span", { className: "truncate", children: title }) });
231
- }
232
- }),
233
- columnHelper.accessor("variant.sku", {
234
- header: t("fields.sku"),
235
- cell: ({ getValue }) => {
236
- const sku = getValue();
237
- if (!sku) {
238
- return /* @__PURE__ */ jsx3(PlaceholderCell, {});
239
- }
240
- return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3("span", { className: "truncate", children: sku }) });
241
- }
242
- })
243
- ],
244
- [t]
245
- );
246
- };
247
-
248
- // src/pages/product-variants/product-variant-detail/components/variant-inventory-section/variant-inventory-section.tsx
249
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
250
- var PAGE_SIZE = 20;
251
- function VariantInventorySection({
252
- inventoryItems
253
- }) {
254
- const { t } = useTranslation3();
255
- const columns = useInventoryTableColumns();
256
- const { table } = useDataTable({
257
- data: inventoryItems ?? [],
258
- columns,
259
- count: inventoryItems.length,
260
- enablePagination: true,
261
- getRowId: (row) => row?.variant?.id,
262
- pageSize: PAGE_SIZE
263
- });
264
- return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
265
- /* @__PURE__ */ jsx4("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx4("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx4(Heading2, { level: "h2", children: t("fields.inventoryItems") }) }) }),
266
- /* @__PURE__ */ jsx4(
267
- _DataTable,
268
- {
269
- table,
270
- columns,
271
- pageSize: PAGE_SIZE,
272
- count: inventoryItems.length,
273
- navigateTo: (row) => `/inventory/${row.original.id}`
274
- }
275
- )
276
- ] });
277
- }
278
- function InventorySectionPlaceholder() {
279
- const { t } = useTranslation3();
280
- return /* @__PURE__ */ jsx4(Container2, { className: "divide-y p-0", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
281
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1", children: [
282
- /* @__PURE__ */ jsx4(Heading2, { level: "h2", children: t("fields.inventoryItems") }),
283
- /* @__PURE__ */ jsx4("span", { className: "txt-small text-ui-fg-subtle", children: t("products.variant.inventory.notManagedDesc") })
284
- ] }),
285
- /* @__PURE__ */ jsx4("div", { className: "flex items-center gap-x-4", children: /* @__PURE__ */ jsx4(LinkButton, { to: "edit", children: t("products.variant.edit.header") }) })
286
- ] }) });
287
- }
288
-
289
- // src/pages/product-variants/product-variant-detail/components/variant-media-section/variant-media-section.tsx
290
- import { useState } from "react";
291
- import { PencilSquare as PencilSquare2, ThumbnailBadge } from "@medusajs/icons";
292
- import {
293
- Button,
294
- Checkbox,
295
- clx,
296
- CommandBar,
297
- Container as Container3,
298
- Heading as Heading3,
299
- Text,
300
- Tooltip
301
- } from "@medusajs/ui";
302
- import { useTranslation as useTranslation4 } from "react-i18next";
303
- import { Link } from "react-router-dom";
304
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
305
- var getMedia = (images, thumbnail) => {
306
- const media = (images ?? []).map((image) => ({
307
- id: image.id,
308
- url: image.url,
309
- isThumbnail: image.url === thumbnail
310
- }));
311
- if (thumbnail && !media.some((m) => m.isThumbnail)) {
312
- media.unshift({
313
- id: "variant_thumbnail",
314
- url: thumbnail,
315
- isThumbnail: true
316
- });
317
- }
318
- return media;
319
- };
320
- var VariantMediaSection = ({
321
- variant,
322
- variantImages,
323
- productId
324
- }) => {
325
- const { t } = useTranslation4();
326
- const [selection, setSelection] = useState({});
327
- const media = getMedia(variantImages, variant.thumbnail);
328
- const handleCheckedChange = (id) => {
329
- setSelection((prev) => {
330
- if (prev[id]) {
331
- const { [id]: _, ...rest } = prev;
332
- return rest;
333
- }
334
- return { ...prev, [id]: true };
335
- });
336
- };
337
- const { mutateAsync: updateVariantMedia } = useUpdateVariantMedia(
338
- productId,
339
- variant.id
340
- );
341
- const { mutateAsync: updateVariant } = useUpdateProductVariant(
342
- productId,
343
- variant.id
344
- );
345
- const handleRemove = async () => {
346
- const ids = Object.keys(selection);
347
- const includingThumbnail = ids.some(
348
- (id) => media.find((m) => m.id === id)?.isThumbnail
349
- );
350
- const imageIdsToRemove = ids.filter((id) => id !== "variant_thumbnail");
351
- const ops = [];
352
- if (imageIdsToRemove.length) {
353
- ops.push(updateVariantMedia({ remove: imageIdsToRemove }));
354
- }
355
- if (includingThumbnail) {
356
- ops.push(updateVariant({ thumbnail: null }));
357
- }
358
- if (!ops.length) {
359
- setSelection({});
360
- return;
361
- }
362
- await Promise.all(ops);
363
- setSelection({});
364
- };
365
- return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
366
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
367
- /* @__PURE__ */ jsx5(Heading3, { level: "h2", children: t("products.media.label") }),
368
- /* @__PURE__ */ jsx5(
369
- ActionMenu,
370
- {
371
- groups: [
372
- {
373
- actions: [
374
- {
375
- label: t("actions.edit"),
376
- to: "media?view=edit",
377
- icon: /* @__PURE__ */ jsx5(PencilSquare2, {})
378
- }
379
- ]
380
- }
381
- ]
382
- }
383
- )
384
- ] }),
385
- media.length > 0 ? /* @__PURE__ */ jsx5("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-4 px-6 py-4", children: media.map((item, index) => {
386
- const isSelected = selection[item.id];
387
- return /* @__PURE__ */ jsxs3(
388
- "div",
389
- {
390
- className: "group relative aspect-square size-full cursor-pointer overflow-hidden rounded-[8px] shadow-elevation-card-rest transition-fg hover:shadow-elevation-card-hover",
391
- children: [
392
- /* @__PURE__ */ jsx5(
393
- "div",
394
- {
395
- className: clx(
396
- "invisible absolute right-2 top-2 opacity-0 transition-fg group-hover:visible group-hover:opacity-100",
397
- { "visible opacity-100": isSelected }
398
- ),
399
- children: /* @__PURE__ */ jsx5(
400
- Checkbox,
401
- {
402
- checked: selection[item.id] || false,
403
- onCheckedChange: () => handleCheckedChange(item.id),
404
- "aria-label": t("actions.select")
405
- }
406
- )
407
- }
408
- ),
409
- item.isThumbnail && /* @__PURE__ */ jsx5("div", { className: "absolute left-2 top-2", children: /* @__PURE__ */ jsx5(Tooltip, { content: t("fields.thumbnail"), children: /* @__PURE__ */ jsx5(ThumbnailBadge, {}) }) }),
410
- /* @__PURE__ */ jsx5(Link, { to: "media", state: { curr: index }, children: /* @__PURE__ */ jsx5(
411
- "img",
412
- {
413
- src: item.url,
414
- alt: `${variant.title ?? ""} ${index + 1}`,
415
- className: "size-full object-cover"
416
- }
417
- ) })
418
- ]
419
- },
420
- item.id
421
- );
422
- }) }) : /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center gap-y-4 pb-8 pt-6", children: [
423
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center", children: [
424
- /* @__PURE__ */ jsx5(
425
- Text,
426
- {
427
- size: "small",
428
- leading: "compact",
429
- weight: "plus",
430
- className: "text-ui-fg-subtle",
431
- children: t("products.media.emptyState.header")
432
- }
433
- ),
434
- /* @__PURE__ */ jsx5(Text, { size: "small", className: "text-ui-fg-muted", children: t("products.media.emptyState.variantDescription") })
435
- ] }),
436
- /* @__PURE__ */ jsx5(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx5(Link, { to: "media?view=edit", children: t("products.media.emptyState.action") }) })
437
- ] }),
438
- /* @__PURE__ */ jsx5(CommandBar, { open: !!Object.keys(selection).length, children: /* @__PURE__ */ jsxs3(CommandBar.Bar, { children: [
439
- /* @__PURE__ */ jsx5(CommandBar.Value, { children: t("general.countSelected", {
440
- count: Object.keys(selection).length
441
- }) }),
442
- /* @__PURE__ */ jsx5(CommandBar.Seperator, {}),
443
- /* @__PURE__ */ jsx5(
444
- CommandBar.Command,
445
- {
446
- action: handleRemove,
447
- label: t("actions.remove"),
448
- shortcut: "r"
449
- }
450
- )
451
- ] }) })
452
- ] });
453
- };
454
-
455
- // src/pages/product-variants/product-variant-detail/components/variant-prices-section/variant-prices-section.tsx
456
- import { useState as useState2 } from "react";
457
- import { useTranslation as useTranslation5 } from "react-i18next";
458
- import { CurrencyDollar } from "@medusajs/icons";
459
- import { Button as Button2, Container as Container4, Heading as Heading4 } from "@medusajs/ui";
460
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
461
- function VariantPricesSection({ variant }) {
462
- const { t } = useTranslation5();
463
- const prices = variant.prices?.filter((p) => p.currency_code && p.currency_code.length <= 3 && !Object.keys(p.rules || {}).length).sort((p1, p2) => (p1.currency_code ?? "").localeCompare(p2.currency_code ?? ""));
464
- const hasPrices = !!prices?.length;
465
- const [pageSize, setPageSize] = useState2(3);
466
- const displayPrices = prices?.slice(0, pageSize);
467
- const onShowMore = () => {
468
- setPageSize(pageSize + 3);
469
- };
470
- return /* @__PURE__ */ jsxs4(Container4, { className: "flex flex-col divide-y p-0", children: [
471
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", children: [
472
- /* @__PURE__ */ jsx6(Heading4, { level: "h2", children: t("labels.prices") }),
473
- /* @__PURE__ */ jsx6(
474
- ActionMenu,
475
- {
476
- groups: [
477
- {
478
- actions: [
479
- {
480
- label: t("actions.edit"),
481
- to: `/products/${variant.product_id}/variants/${variant.id}/prices`,
482
- icon: /* @__PURE__ */ jsx6(CurrencyDollar, {})
483
- }
484
- ]
485
- }
486
- ]
487
- }
488
- )
489
- ] }),
490
- !hasPrices && /* @__PURE__ */ jsx6(NoRecords, { className: "h-60" }),
491
- displayPrices?.map((price) => {
492
- return /* @__PURE__ */ jsxs4(
493
- "div",
494
- {
495
- className: "txt-small text-ui-fg-subtle flex justify-between px-6 py-4",
496
- children: [
497
- /* @__PURE__ */ jsx6("span", { className: "font-medium", children: price.currency_code.toUpperCase() }),
498
- /* @__PURE__ */ jsx6("span", { children: getLocaleAmount(price.amount, price.currency_code) })
499
- ]
500
- },
501
- price.id
502
- );
503
- }),
504
- hasPrices && /* @__PURE__ */ jsxs4("div", { className: "txt-small text-ui-fg-subtle flex items-center justify-between px-6 py-4", children: [
505
- /* @__PURE__ */ jsx6("span", { className: "font-medium", children: t("products.variant.pricesPagination", {
506
- total: prices.length,
507
- current: Math.min(pageSize, prices.length)
508
- }) }),
509
- /* @__PURE__ */ jsx6(
510
- Button2,
511
- {
512
- onClick: onShowMore,
513
- disabled: pageSize >= prices.length,
514
- className: "-mr-3 text-blue-500",
515
- variant: "transparent",
516
- children: t("actions.showMore")
517
- }
518
- )
519
- ] })
520
- ] });
521
- }
522
-
523
- // src/pages/product-variants/product-variant-detail/product-variant-detail.tsx
524
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
525
- var ProductVariantDetail = () => {
526
- const { product_id, variant_id } = useParams();
527
- const {
528
- product,
529
- isLoading: isProductLoading,
530
- isError,
531
- error
532
- } = useProduct(product_id, {
533
- fields: "*variants.inventory_items,*images"
534
- });
535
- const { variants, isLoading: isVariantsLoading } = useProductVariants(
536
- product_id,
537
- { fields: "*images" }
538
- );
539
- const productVariant = product?.variants?.find(
540
- (item) => item.id === variant_id
541
- );
542
- const variantsDataVariant = variants?.find((v) => v.id === variant_id);
543
- const variantImages = useMemo2(() => {
544
- if (!variantsDataVariant?.images) {
545
- return [];
546
- }
547
- return getExplicitVariantImages(
548
- variantsDataVariant.images,
549
- variant_id
550
- );
551
- }, [variantsDataVariant?.images, variant_id]);
552
- const isLoading = isProductLoading || isVariantsLoading;
553
- if (isLoading || !productVariant) {
554
- return /* @__PURE__ */ jsx7(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1 });
555
- }
556
- if (isError) {
557
- throw error;
558
- }
559
- return /* @__PURE__ */ jsxs5(TwoColumnPage, { data: productVariant, hasOutlet: true, children: [
560
- /* @__PURE__ */ jsxs5(TwoColumnPage.Main, { children: [
561
- /* @__PURE__ */ jsx7(VariantGeneralSection, { variant: productVariant }),
562
- /* @__PURE__ */ jsx7(
563
- VariantMediaSection,
564
- {
565
- variant: productVariant,
566
- variantImages,
567
- productId: product_id
568
- }
569
- ),
570
- !productVariant.manage_inventory ? /* @__PURE__ */ jsx7(InventorySectionPlaceholder, {}) : productVariant.inventory_items && /* @__PURE__ */ jsx7(
571
- VariantInventorySection,
572
- {
573
- inventoryItems: productVariant.inventory_items.map((i) => {
574
- return {
575
- id: i.inventory_item_id,
576
- required_quantity: i.required_quantity,
577
- variant: productVariant
578
- };
579
- })
580
- }
581
- )
582
- ] }),
583
- /* @__PURE__ */ jsx7(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx7(VariantPricesSection, { variant: productVariant }) })
584
- ] });
585
- };
586
- export {
587
- ProductVariantDetailBreadcrumb as Breadcrumb,
588
- ProductVariantDetail as Component,
589
- variantLoader as loader
590
- };