@mercurjs/vendor 2.1.6 → 2.2.0-canary.11

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 (259) hide show
  1. package/dist/[id]-A55T2ORL.js +3066 -0
  2. package/dist/[id]-B4YZTANM.js +1571 -0
  3. package/dist/{[id]-UTKO3VG4.js → [id]-EKLRGVBA.js} +10 -10
  4. package/dist/{[id]-TO6KT3ZE.js → [id]-FE5GYYVZ.js} +28 -25
  5. package/dist/{[id]-4VCL3MMM.js → [id]-GBT6VB4S.js} +29 -23
  6. package/dist/{[id]-3G5G7ZFV.js → [id]-GC3ZYPK4.js} +25 -22
  7. package/dist/{[id]-6PXEWRG7.js → [id]-J6BZG5PU.js} +14 -14
  8. package/dist/{[id]-B3LHVQM5.js → [id]-QOEO3JOV.js} +29 -23
  9. package/dist/{[id]-H3C3ZSC6.js → [id]-QQU5HVFU.js} +29 -23
  10. package/dist/{[id]-PDGHF5J2.js → [id]-SHAJTJNZ.js} +43 -36
  11. package/dist/{[id]-X4DDKOMQ.js → [id]-T5ECVBPF.js} +30 -24
  12. package/dist/{[id]-T2ROPEGY.js → [id]-U5KZEQDR.js} +7 -7
  13. package/dist/{[id]-7RUAH3TI.js → [id]-YPCO3DJV.js} +5 -5
  14. package/dist/{[id]-Y7GAMNC5.js → [id]-ZCMSBEVM.js} +4 -4
  15. package/dist/{[location_id]-D55RQOXT.js → [location_id]-NUBXDDJC.js} +9 -9
  16. package/dist/{[province_id]-OFH2ZOFQ.js → [province_id]-6GUA4PV5.js} +23 -20
  17. package/dist/{add-C6OX5C54.js → add-NTRYWOJF.js} +42 -35
  18. package/dist/add-RU3WL4YB.js +428 -0
  19. package/dist/{add-customer-groups-PJRJUWS2.js → add-customer-groups-U5RZWW4B.js} +19 -16
  20. package/dist/{add-products-INOLNPO6.js → add-products-Q4MMDQKT.js} +26 -20
  21. package/dist/{add-promotions-AHDOP52Q.js → add-promotions-3AYXQXTP.js} +8 -8
  22. package/dist/{add-to-campaign-HL6NGRR4.js → add-to-campaign-QKYQCSR2.js} +4 -4
  23. package/dist/{address-KRENKSLP.js → address-77Y3AOQ3.js} +19 -16
  24. package/dist/{adjust-inventory-H4EUP7J3.js → adjust-inventory-AFJLWF5R.js} +2 -2
  25. package/dist/{allocate-items-SUCUZU4D.js → allocate-items-TCM5A55Y.js} +141 -126
  26. package/dist/{areas-UUMZDXLX.js → areas-XUC5V5UO.js} +8 -8
  27. package/dist/{attributes-CALEHJJG.js → attributes-SZP2MM5L.js} +3 -3
  28. package/dist/{breadcrumb-KQSFIXQ4.js → breadcrumb-2XA2WOK7.js} +1 -1
  29. package/dist/{breadcrumb-IG7VZGW2.js → breadcrumb-5NP23D6X.js} +15 -12
  30. package/dist/{breadcrumb-TW5JEOYS.js → breadcrumb-EVZIOB2G.js} +14 -11
  31. package/dist/{breadcrumb-OIGGCB3L.js → breadcrumb-FPWBT76A.js} +8 -2
  32. package/dist/{breadcrumb-BS7Y5OKF.js → breadcrumb-IK6XCQOQ.js} +2 -2
  33. package/dist/{breadcrumb-M5Z5WA6I.js → breadcrumb-KTARIL65.js} +2 -2
  34. package/dist/{breadcrumb-VNNZ3TTW.js → breadcrumb-PBR27GGX.js} +3 -3
  35. package/dist/breadcrumb-THJ2HPRB.js +26 -0
  36. package/dist/{breadcrumb-6W2VP3OZ.js → breadcrumb-TNJSGX4T.js} +15 -12
  37. package/dist/{campaigns-HS6MIO7X.js → campaigns-JAQTSA4Z.js} +6 -6
  38. package/dist/{categories-PKWR3FM3.js → categories-T4QJYX4R.js} +8 -8
  39. package/dist/{chunk-4URLUCTD.js → chunk-25E4KME5.js} +3 -3
  40. package/dist/chunk-27KRIXMQ.js +71 -0
  41. package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
  42. package/dist/{chunk-ZYOXKUKZ.js → chunk-2QTNCGKX.js} +1 -1
  43. package/dist/{chunk-5UD4P6YL.js → chunk-2USXZSTK.js} +4 -4
  44. package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
  45. package/dist/{chunk-VQ5EKDA3.js → chunk-3PMM6AMP.js} +3 -3
  46. package/dist/{chunk-J6BRLL3F.js → chunk-463CNCJC.js} +3 -3
  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-RUE5BPC2.js → chunk-5QI3NDJG.js} +1 -1
  50. package/dist/{chunk-PPLC4IKI.js → chunk-5T6UWTRU.js} +10 -5
  51. package/dist/{chunk-WITQNQXN.js → chunk-6FUIK3PX.js} +4 -4
  52. package/dist/{chunk-HGQTL7NX.js → chunk-6K6EQOJF.js} +3 -3
  53. package/dist/{chunk-KAZ5BYTQ.js → chunk-6OUPJNYO.js} +5 -3
  54. package/dist/{chunk-PEKANQ3T.js → chunk-6UZERVBI.js} +2 -2
  55. package/dist/{chunk-RTAWYMQP.js → chunk-7CMRFP5Q.js} +2 -2
  56. package/dist/{chunk-I2IKYOZX.js → chunk-7IPCLQ5V.js} +19 -19
  57. package/dist/chunk-ADGVQVHP.js +101 -0
  58. package/dist/{chunk-IZ5RG5XI.js → chunk-AJLGY3LQ.js} +1 -21
  59. package/dist/chunk-BER45EYD.js +82 -0
  60. package/dist/{chunk-PCMNEUMV.js → chunk-BXRNZS5K.js} +1 -1
  61. package/dist/chunk-CFRWIQIZ.js +43 -0
  62. package/dist/{chunk-RL7SFZOF.js → chunk-DDJQRV6E.js} +1 -1
  63. package/dist/{chunk-D2MA5TAP.js → chunk-DO4F5FIO.js} +2 -2
  64. package/dist/{chunk-X4FLOQ45.js → chunk-DQKK43PR.js} +3 -3
  65. package/dist/{chunk-6WY5X4PE.js → chunk-E6W57UP3.js} +35 -125
  66. package/dist/chunk-FP6U6BPH.js +61 -0
  67. package/dist/chunk-FWPGOIFA.js +22 -0
  68. package/dist/{chunk-BLVJAKBA.js → chunk-FWS4YJ4B.js} +1 -1
  69. package/dist/chunk-GAE6TKOR.js +811 -0
  70. package/dist/{chunk-3CK6OINO.js → chunk-GDWBOQI5.js} +3 -5
  71. package/dist/{chunk-PDQSPKG5.js → chunk-GN6KB75Z.js} +1 -1
  72. package/dist/chunk-HDEOZN2Q.js +60 -0
  73. package/dist/chunk-IBEUR3J7.js +173 -0
  74. package/dist/chunk-J6XCRFBW.js +30 -0
  75. package/dist/{chunk-ZEVYT6IX.js → chunk-JAUZ73XE.js} +151 -266
  76. package/dist/{chunk-CNLP35S7.js → chunk-K6LOZ4S3.js} +54 -18
  77. package/dist/{chunk-JQP7MOFH.js → chunk-KIFSQOM2.js} +2 -2
  78. package/dist/{chunk-DARJTN4I.js → chunk-L4KBTV57.js} +9 -2
  79. package/dist/chunk-L57USMYC.js +39 -0
  80. package/dist/chunk-LARLBYU6.js +127 -0
  81. package/dist/chunk-LDZCCWJB.js +518 -0
  82. package/dist/chunk-LEWA4BPH.js +18 -0
  83. package/dist/chunk-LFX6WU4A.js +36 -0
  84. package/dist/{chunk-ITI54CII.js → chunk-LKUW5SV4.js} +6 -6
  85. package/dist/{chunk-LPOAVK6Y.js → chunk-LQD232FW.js} +47 -12
  86. package/dist/{chunk-4MFMCZEJ.js → chunk-MJCL3WID.js} +2 -2
  87. package/dist/{chunk-32RYSB2V.js → chunk-NBKWY6XN.js} +2 -2
  88. package/dist/{chunk-GYV6SKY7.js → chunk-O7VOGTLX.js} +4 -6
  89. package/dist/{chunk-KQGVSLUI.js → chunk-OYKUQXJX.js} +1926 -957
  90. package/dist/{chunk-CYTNBXWF.js → chunk-OZ44ATGE.js} +8 -8
  91. package/dist/{chunk-7Q5SDEK7.js → chunk-PAVZ6FPK.js} +7 -7
  92. package/dist/{chunk-2RHAI7WK.js → chunk-QLBIBLOY.js} +2 -2
  93. package/dist/chunk-RXV7INUV.js +426 -0
  94. package/dist/chunk-S23FD6FA.js +210 -0
  95. package/dist/{chunk-NYDJTWRL.js → chunk-SGR4DMCW.js} +4 -4
  96. package/dist/{chunk-OXXL4WQU.js → chunk-SPOHNK4X.js} +6 -6
  97. package/dist/{chunk-AIF2KTEE.js → chunk-SSUUT5LK.js} +12 -2
  98. package/dist/{chunk-QX45GVAL.js → chunk-SZBERGA4.js} +8 -8
  99. package/dist/{chunk-6SBMVLJ2.js → chunk-T5MJWWDX.js} +2 -2
  100. package/dist/chunk-T6LHVNWO.js +27 -0
  101. package/dist/chunk-TBYCZRZ7.js +248 -0
  102. package/dist/chunk-TF6V3TFG.js +438 -0
  103. package/dist/chunk-TW324MAT.js +185 -0
  104. package/dist/{chunk-4ZGFODSC.js → chunk-TYESCFYW.js} +1 -1
  105. package/dist/chunk-U5G3AVED.js +64 -0
  106. package/dist/chunk-U6PBLMXD.js +14 -0
  107. package/dist/{chunk-GZMXTNDN.js → chunk-UCYSCKZV.js} +1432 -1380
  108. package/dist/{chunk-P3ZTO6T2.js → chunk-UFFVRF4V.js} +2 -2
  109. package/dist/chunk-UM7ZR3VU.js +14 -0
  110. package/dist/chunk-UORPTGV2.js +114 -0
  111. package/dist/{chunk-5M3SL4UZ.js → chunk-VCOQ7WQ2.js} +30 -106
  112. package/dist/chunk-VCUUITW6.js +35 -0
  113. package/dist/{chunk-PTW7JNAP.js → chunk-VDHW6H5F.js} +5 -5
  114. package/dist/chunk-VZUA5SRD.js +62 -0
  115. package/dist/{chunk-DKQ4XMSN.js → chunk-X4GWB6AT.js} +6 -6
  116. package/dist/{chunk-6YA3C4NB.js → chunk-XCIMOIX6.js} +3 -12
  117. package/dist/chunk-XP23ZVQT.js +2183 -0
  118. package/dist/{chunk-WBI7FEGI.js → chunk-Y2MQ5EMD.js} +29 -24
  119. package/dist/chunk-YBF45CX5.js +23 -0
  120. package/dist/{chunk-N7OVXN72.js → chunk-YGJCJBPM.js} +1 -1
  121. package/dist/{chunk-WNVEMFIK.js → chunk-YHIJCI4U.js} +3 -3
  122. package/dist/{chunk-WFE6CT6M.js → chunk-YQZBAP3S.js} +22 -76
  123. package/dist/chunk-ZHFFTT3I.js +17 -0
  124. package/dist/{collections-DJZI2RM2.js → collections-URH2TCWJ.js} +28 -24
  125. package/dist/{configuration-GN3TO77H.js → configuration-7IYZ6GNP.js} +3 -3
  126. package/dist/{configuration-RHPIO2QT.js → configuration-C4IGBNXH.js} +1 -1
  127. package/dist/{create-7S7CZWEN.js → create-5PSOIHIT.js} +4 -4
  128. package/dist/create-7R6CZU53.js +215 -0
  129. package/dist/{create-3EK5CNNX.js → create-A7B3MLJX.js} +41 -34
  130. package/dist/create-F5R76QML.js +1178 -0
  131. package/dist/create-FKRYB7ZS.js +1784 -0
  132. package/dist/create-GGACODDN.js +1914 -0
  133. package/dist/{create-YO55Z3YD.js → create-HVZYJ3YC.js} +35 -38
  134. package/dist/{create-IDVCZHIX.js → create-JF2OUZQA.js} +16 -13
  135. package/dist/{create-3ZVXEPX5.js → create-JGYG5SBM.js} +29 -23
  136. package/dist/{create-G4T2PAJH.js → create-MS6KKFSV.js} +21 -18
  137. package/dist/{create-OCFPLNNY.js → create-MZYXMGKP.js} +6 -6
  138. package/dist/{create-HKJVSFB7.js → create-O35JRZEF.js} +25 -22
  139. package/dist/{create-OGLPDVOI.js → create-ODOFJF5N.js} +40 -37
  140. package/dist/{create-GHM7OTCR.js → create-R7K3ECN6.js} +1 -1
  141. package/dist/{create-D6EW3EWC.js → create-SFU3W3ZH.js} +1 -1
  142. package/dist/create-TKXH5KQY.js +239 -0
  143. package/dist/{create-33TRLASX.js → create-UPYB65PD.js} +1 -1
  144. package/dist/{create-KGYL7FBM.js → create-XVHOCZHJ.js} +1 -1
  145. package/dist/{create-4AE3VTWN.js → create-YBF4YGWG.js} +2 -2
  146. package/dist/{customers-6ZLE65UX.js → customers-SOLJ2KQQ.js} +5 -5
  147. package/dist/{edit-QBISX7D3.js → edit-2R5QCPTB.js} +16 -13
  148. package/dist/{edit-IR6V2IDN.js → edit-3E4ZO7HT.js} +21 -18
  149. package/dist/{edit-ZSOI56BQ.js → edit-4G5D7TES.js} +52 -40
  150. package/dist/{edit-B5B3XKDM.js → edit-522DG3BY.js} +1 -1
  151. package/dist/{edit-B75KK5ZX.js → edit-5CROKEJE.js} +41 -34
  152. package/dist/{edit-ATXE6CM5.js → edit-C4OCKQVU.js} +1 -1
  153. package/dist/{edit-7HTH2UJF.js → edit-FXNXTVIW.js} +3 -3
  154. package/dist/{edit-RNT555GP.js → edit-G2E5SNGU.js} +15 -12
  155. package/dist/{edit-4HZHLYI3.js → edit-GQNIINRR.js} +1 -1
  156. package/dist/{edit-2KRJIPRK.js → edit-HTLLYECP.js} +21 -18
  157. package/dist/{edit-LRRJTHV2.js → edit-KAKVPHZZ.js} +1 -1
  158. package/dist/{edit-GIJXLMC3.js → edit-O4JLGKQR.js} +2 -2
  159. package/dist/{edit-FNDDSSMT.js → edit-OKU6FMHJ.js} +60 -9
  160. package/dist/{edit-5CJZRHAA.js → edit-ORXS3A2Y.js} +1 -1
  161. package/dist/{edit-FC64DWB2.js → edit-Q3UQIOLS.js} +1 -1
  162. package/dist/edit-VVLITC2E.js +910 -0
  163. package/dist/edit-XSICGAVO.js +176 -0
  164. package/dist/{edit-7GVP6SRA.js → edit-ZAHCMF5U.js} +1 -1
  165. package/dist/{edit-MYSWY6W4.js → edit-ZMERG3L7.js} +1 -1
  166. package/dist/{edit-budget-J27CSEZH.js → edit-budget-L3CCEWNF.js} +1 -1
  167. package/dist/{edit-inventory-item-US77M2FF.js → edit-inventory-item-ZKXXL3QK.js} +2 -2
  168. package/dist/{edit-inventory-item-attributes-UGAE2NAZ.js → edit-inventory-item-attributes-GSKUMORD.js} +3 -3
  169. package/dist/{fulfillment-DCS67LTK.js → fulfillment-76IVZ266.js} +32 -22
  170. package/dist/{fulfillment-providers-GM5PO6N3.js → fulfillment-providers-G2L6LEVO.js} +24 -20
  171. package/dist/index.css +104 -65
  172. package/dist/index.d.ts +3 -10
  173. package/dist/index.js +549 -456
  174. package/dist/{inventory-OPZ2FSEE.js → inventory-WSFLTA6Z.js} +7 -7
  175. package/dist/{invite-KEJLNXEZ.js → invite-2673PU4I.js} +17 -13
  176. package/dist/{invite-CQCKEQW2.js → invite-HRXZ5YBP.js} +28 -24
  177. package/dist/loader-VDYPD3RI.js +31 -0
  178. package/dist/{locations-ZVPTQCQY.js → locations-INS6FTMJ.js} +4 -4
  179. package/dist/{login-OUHRNNXA.js → login-TWUBU6I6.js} +14 -11
  180. package/dist/{manage-locations-YUKEFCBJ.js → manage-locations-XHH5DVIR.js} +2 -2
  181. package/dist/{media-4KYFHB5V.js → media-Z4N5MKFG.js} +42 -9
  182. package/dist/{metadata-AWUKZ25V.js → metadata-5BPOBBU2.js} +3 -3
  183. package/dist/{metadata-OCE6A3JE.js → metadata-D6M66NQK.js} +17 -14
  184. package/dist/{metadata-PYY4IB7K.js → metadata-NIDIBXJT.js} +17 -14
  185. package/dist/{metadata-XP3ZYW2M.js → metadata-Q74OJWUD.js} +18 -15
  186. package/dist/{metadata-NYYL26MQ.js → metadata-REQIFWWH.js} +18 -15
  187. package/dist/{metadata-G7KZXVNE.js → metadata-YVHJPDLD.js} +17 -14
  188. package/dist/offer-create-page-E4FLSDJQ.js +743 -0
  189. package/dist/offer-detail-page-6SIBQTLP.js +492 -0
  190. package/dist/offer-edit-page-3MO566RP.js +151 -0
  191. package/dist/offer-inventory-batch-page-BD6PMDLW.js +290 -0
  192. package/dist/offer-pricing-edit-page-4TINK42V.js +199 -0
  193. package/dist/offers-GVN5LCK6.js +32 -0
  194. package/dist/{onboarding-WXZHW62K.js → onboarding-MK2RIFD4.js} +24 -21
  195. package/dist/{orders-LWJ472VM.js → orders-TVQDR4OJ.js} +30 -26
  196. package/dist/organization-XO3T2K2X.js +340 -0
  197. package/dist/{organize-RFOMQCBG.js → organize-5XRZWD5C.js} +4 -4
  198. package/dist/{organize-OVKJ3HZO.js → organize-Z7JTTDH4.js} +4 -4
  199. package/dist/pages/index.d.ts +439 -758
  200. package/dist/pages/index.js +85 -78
  201. package/dist/{payment-details-UVXYCTUK.js → payment-details-CFTX3QDL.js} +19 -16
  202. package/dist/{payouts-TR7K5I37.js → payouts-7Q7D4FET.js} +8 -8
  203. package/dist/{price-lists-S2WNELFZ.js → price-lists-6TFLA53G.js} +9 -9
  204. package/dist/{pricing-UF27DAXA.js → pricing-ECXV6K7G.js} +41 -37
  205. package/dist/{product-tags-2CKH2M6D.js → product-tags-5O7ZG6SA.js} +40 -33
  206. package/dist/{product-types-FX43JEO2.js → product-types-PKUEL7X5.js} +6 -6
  207. package/dist/product-variant-detail-PUWOMVHQ.js +210 -0
  208. package/dist/{product-variant-edit-P3DSIFE3.js → product-variant-edit-WZNO4CQX.js} +134 -66
  209. package/dist/{products-H5EMRJYS.js → products-BM3IIH5P.js} +27 -21
  210. package/dist/{products-2LHGS7X3.js → products-CPTRYL2Z.js} +44 -45
  211. package/dist/{professional-details-HYKTH44B.js → professional-details-ED4HNYXY.js} +18 -15
  212. package/dist/{profile-PB27WIRW.js → profile-6TGCNNUU.js} +21 -18
  213. package/dist/{promotions-5EYPGHJP.js → promotions-4336KI7E.js} +9 -9
  214. package/dist/receive-224KLULH.js +578 -0
  215. package/dist/refund-IGMSXQNX.js +268 -0
  216. package/dist/{register-X45K325N.js → register-OZ5CRANZ.js} +18 -15
  217. package/dist/{reset-password-GTWLBOFK.js → reset-password-5UHZU4D3.js} +1 -1
  218. package/dist/{return-reasons-LOKYRGMI.js → return-reasons-QJRA2ZX6.js} +21 -17
  219. package/dist/{sales-channels-Y4LRP7JC.js → sales-channels-CZDU7VTE.js} +7 -6
  220. package/dist/{sales-channels-7R2IY3KG.js → sales-channels-U55MUDQP.js} +7 -6
  221. package/dist/{settings-2XDLFYMS.js → settings-2GCQQTO6.js} +47 -40
  222. package/dist/shipment-HWQHMX2L.js +242 -0
  223. package/dist/{shipping-profile-R3NABPQF.js → shipping-profile-ZP7M6VSS.js} +2 -2
  224. package/dist/{shipping-profiles-QVKNFLCW.js → shipping-profiles-C5WBXWZ2.js} +21 -18
  225. package/dist/{stock-5RXNUPUT.js → stock-MQA7PRO6.js} +21 -18
  226. package/dist/{store-MPYOWMZT.js → store-5ZHZR4JI.js} +84 -149
  227. package/dist/{store-closure-DNMCHUXD.js → store-closure-H5WHV3LA.js} +24 -16
  228. package/dist/{store-select-UTPJ7DM7.js → store-select-PZS556FB.js} +19 -16
  229. package/dist/{tax-regions-UD6P5FVC.js → tax-regions-HDLBFZVG.js} +6 -6
  230. package/dist/{team-IMS66MVP.js → team-CLKJCZNH.js} +29 -26
  231. package/dist/types-CtCEtTE6.d.ts +16 -0
  232. package/package.json +5 -5
  233. package/dist/[id]-BYP37PU4.js +0 -1314
  234. package/dist/[id]-INOFZHL7.js +0 -1219
  235. package/dist/add-KRAGFFBJ.js +0 -158
  236. package/dist/bulk-edit-3SMBLIOA.js +0 -244
  237. package/dist/chunk-47SXTGLN.js +0 -397
  238. package/dist/chunk-4KX6CBJ4.js +0 -178
  239. package/dist/chunk-DLNNTQRY.js +0 -217
  240. package/dist/chunk-FX4V5JCF.js +0 -37
  241. package/dist/chunk-GC33DBKG.js +0 -143
  242. package/dist/chunk-LQYMBSRQ.js +0 -66
  243. package/dist/chunk-NK4NR6MN.js +0 -173
  244. package/dist/chunk-PFU6FSXY.js +0 -430
  245. package/dist/chunk-QJEOPT2P.js +0 -330
  246. package/dist/chunk-QSGR43JM.js +0 -30
  247. package/dist/chunk-STR3NGWE.js +0 -3736
  248. package/dist/create-3DOO3RNH.js +0 -716
  249. package/dist/create-I7HV3RM6.js +0 -150
  250. package/dist/edit-K2AD335I.js +0 -237
  251. package/dist/edit-VO5XLIEL.js +0 -362
  252. package/dist/edit-stocks-and-prices-MHHQFWFA.js +0 -408
  253. package/dist/organization-LPYQRTQC.js +0 -303
  254. package/dist/prices-3OXV5RGY.js +0 -270
  255. package/dist/product-variant-detail-WV4KXVXR.js +0 -590
  256. package/dist/shipment-4GW2JFWB.js +0 -174
  257. package/dist/stock-GPC3BCL6.js +0 -500
  258. package/dist/{chunk-SDSEW72R.js → chunk-E2HQPY32.js} +3 -3
  259. /package/dist/{chunk-CAS74NLJ.js → chunk-YV6MK4PZ.js} +0 -0
@@ -0,0 +1,518 @@
1
+ import {
2
+ optionalInt
3
+ } from "./chunk-AJLGY3LQ.js";
4
+ import {
5
+ i18n
6
+ } from "./chunk-OYKUQXJX.js";
7
+
8
+ // src/pages/products/create/constants.ts
9
+ import { z } from "zod";
10
+
11
+ // src/pages/products/create/utils.ts
12
+ var normalizeProductFormValues = (values) => {
13
+ const thumbnail = values.media?.find((media) => media.isThumbnail)?.url;
14
+ const images = values.media?.filter((media) => !media.isThumbnail).map((media) => ({ url: media.url }));
15
+ const { variantAttributes, productAttributes, attributeValues } = normalizeFormAttributes(values.attributes ?? []);
16
+ return {
17
+ is_giftcard: false,
18
+ status: values.status,
19
+ tags: values?.tags?.length ? values.tags?.map((tag) => ({ id: tag })) : void 0,
20
+ images,
21
+ collection_id: values.collection_id || void 0,
22
+ categories: values.category_id ? [{ id: values.category_id }] : void 0,
23
+ type_id: values.type_id || void 0,
24
+ handle: values.handle?.trim(),
25
+ origin_country: values.origin_country || void 0,
26
+ material: values.material || void 0,
27
+ mid_code: values.mid_code || void 0,
28
+ hs_code: values.hs_code || void 0,
29
+ thumbnail,
30
+ title: values.title.trim(),
31
+ subtitle: values.subtitle?.trim(),
32
+ description: values.description?.trim(),
33
+ discountable: values.discountable,
34
+ width: values.width ? parseFloat(values.width) : void 0,
35
+ length: values.length ? parseFloat(values.length) : void 0,
36
+ height: values.height ? parseFloat(values.height) : void 0,
37
+ weight: values.weight ? parseFloat(values.weight) : void 0,
38
+ variant_attributes: variantAttributes.length ? variantAttributes : void 0,
39
+ product_attributes: productAttributes.length ? productAttributes : void 0,
40
+ attribute_values: Object.keys(attributeValues).length ? attributeValues : void 0,
41
+ variants: normalizeVariants(
42
+ values.variants.filter((variant) => variant.should_create)
43
+ )
44
+ };
45
+ };
46
+ var normalizeVariants = (variants) => {
47
+ return variants.map((variant) => {
48
+ const opts = variant.options;
49
+ const hasOpts = opts && Object.keys(opts).length > 0;
50
+ return {
51
+ title: variant.title || (hasOpts ? Object.values(opts).join(" / ") : "Default variant"),
52
+ options: hasOpts ? opts : void 0,
53
+ sku: variant.sku || void 0,
54
+ variant_rank: variant.variant_rank
55
+ };
56
+ });
57
+ };
58
+ var normalizeFormAttributes = (attributes) => {
59
+ const variantAttributes = [];
60
+ const productAttributes = [];
61
+ const attributeValues = {};
62
+ for (const attr of attributes) {
63
+ if (attr.use_for_variants) {
64
+ if (attr.attribute_id) {
65
+ const valueNames = Array.isArray(attr.values) ? attr.values : attr.values ? [attr.values] : [];
66
+ const nameToId = new Map(
67
+ (attr.available_values ?? []).map((v) => [v.name, v.id])
68
+ );
69
+ const valueIds = valueNames.map((name) => nameToId.get(name)).filter(Boolean);
70
+ if (!valueIds.length) continue;
71
+ variantAttributes.push({
72
+ attribute_id: attr.attribute_id,
73
+ value_ids: valueIds
74
+ });
75
+ } else if (attr.is_custom && attr.title) {
76
+ const vals = Array.isArray(attr.values) ? attr.values : attr.values ? [attr.values] : [];
77
+ if (!vals.length) continue;
78
+ variantAttributes.push({
79
+ name: attr.title,
80
+ type: attr.type ?? "multi_select",
81
+ values: vals,
82
+ is_variant_axis: true
83
+ });
84
+ }
85
+ } else {
86
+ const key = attr.title;
87
+ if (!key) continue;
88
+ if (attr.is_custom) {
89
+ const vals = Array.isArray(attr.values) ? attr.values : attr.values ? [attr.values] : [];
90
+ if (vals.length) {
91
+ productAttributes.push({
92
+ name: attr.title,
93
+ type: attr.type ?? "text",
94
+ values: vals,
95
+ is_variant_axis: false
96
+ });
97
+ }
98
+ } else if (attr.attribute_id) {
99
+ const vals = Array.isArray(attr.values) ? attr.values : attr.values ? [attr.values] : [];
100
+ if (!vals.length || vals.every((v) => !v)) continue;
101
+ const type = attr.type;
102
+ const hasPresetValues = type === "single_select" || type === "multi_select";
103
+ if (hasPresetValues) {
104
+ const nameToId = new Map(
105
+ (attr.available_values ?? []).map((v) => [v.name, v.id])
106
+ );
107
+ const valueIds = vals.map((name) => nameToId.get(name)).filter(Boolean);
108
+ if (valueIds.length) {
109
+ productAttributes.push({
110
+ attribute_id: attr.attribute_id,
111
+ value_ids: valueIds
112
+ });
113
+ }
114
+ } else {
115
+ productAttributes.push({
116
+ attribute_id: attr.attribute_id,
117
+ values: vals
118
+ });
119
+ }
120
+ }
121
+ }
122
+ }
123
+ return { variantAttributes, productAttributes, attributeValues };
124
+ };
125
+ var decorateVariantsWithDefaultValues = (variants) => {
126
+ return variants.map((variant) => ({
127
+ ...variant,
128
+ title: variant.title || "",
129
+ sku: variant.sku || ""
130
+ }));
131
+ };
132
+ var getPermutations = (data) => {
133
+ if (data.length === 0) return [];
134
+ if (data.length === 1) {
135
+ return data[0].values.map((value) => ({ [data[0].title]: value }));
136
+ }
137
+ const [first, ...rest] = data;
138
+ return first.values.flatMap(
139
+ (value) => getPermutations(rest).map((perm) => ({ [first.title]: value, ...perm }))
140
+ );
141
+ };
142
+ var generateVariantsFromAttributes = (attributes, currentVariants) => {
143
+ const variantAxes = attributes.filter((attr) => attr.use_for_variants).map((attr) => ({
144
+ title: attr.title,
145
+ values: Array.isArray(attr.values) ? attr.values : attr.values ? [attr.values] : []
146
+ })).filter((axis) => axis.title && axis.values.length > 0);
147
+ if (variantAxes.length === 0) {
148
+ const hasDefault = currentVariants.some((v) => v.is_default);
149
+ if (hasDefault && currentVariants.length > 0) {
150
+ return currentVariants;
151
+ }
152
+ return decorateVariantsWithDefaultValues([
153
+ {
154
+ title: "Default variant",
155
+ should_create: true,
156
+ variant_rank: 0,
157
+ options: {},
158
+ is_default: true
159
+ }
160
+ ]);
161
+ }
162
+ const permutations = getPermutations(variantAxes);
163
+ const newVariants = currentVariants.reduce((acc, variant) => {
164
+ const opts = variant.options;
165
+ if (!opts || Object.keys(opts).length === 0) return acc;
166
+ const match = permutations.find(
167
+ (perm) => Object.keys(opts).every((key) => opts[key] === perm[key])
168
+ );
169
+ if (match) {
170
+ acc.push({
171
+ ...variant,
172
+ title: Object.values(match).join(" / "),
173
+ options: match,
174
+ is_default: false
175
+ });
176
+ }
177
+ return acc;
178
+ }, []);
179
+ const usedSet = new Set(
180
+ newVariants.map((v) => JSON.stringify(v.options))
181
+ );
182
+ for (const perm of permutations) {
183
+ if (!usedSet.has(JSON.stringify(perm))) {
184
+ newVariants.push({
185
+ title: Object.values(perm).join(" / "),
186
+ options: perm,
187
+ should_create: true,
188
+ variant_rank: newVariants.length
189
+ });
190
+ }
191
+ }
192
+ return newVariants;
193
+ };
194
+
195
+ // src/pages/products/create/constants.ts
196
+ var MediaSchema = z.object({
197
+ id: z.string().optional(),
198
+ url: z.string(),
199
+ isThumbnail: z.boolean(),
200
+ file: z.any().nullable()
201
+ // File
202
+ });
203
+ var ProductCreateVariantSchema = z.object({
204
+ should_create: z.boolean(),
205
+ is_default: z.boolean().optional(),
206
+ title: z.string(),
207
+ upc: z.string().optional(),
208
+ ean: z.string().optional(),
209
+ barcode: z.string().optional(),
210
+ mid_code: z.string().optional(),
211
+ hs_code: z.string().optional(),
212
+ width: optionalInt,
213
+ height: optionalInt,
214
+ length: optionalInt,
215
+ weight: optionalInt,
216
+ material: z.string().optional(),
217
+ origin_country: z.string().optional(),
218
+ sku: z.string().optional(),
219
+ options: z.record(z.string(), z.string()).optional(),
220
+ variant_rank: z.number()
221
+ });
222
+ var ProductCreateSchema = z.object({
223
+ title: z.string().min(1, {
224
+ message: i18n.t("products.fields.title.required")
225
+ }),
226
+ subtitle: z.string().optional(),
227
+ handle: z.string().optional(),
228
+ description: z.string().optional(),
229
+ discountable: z.boolean(),
230
+ type_id: z.string().optional(),
231
+ collection_id: z.string().optional(),
232
+ category_id: z.string().min(1, {
233
+ message: i18n.t("products.create.errors.categoryRequired")
234
+ }),
235
+ tags: z.array(z.string()).optional(),
236
+ origin_country: z.string().optional(),
237
+ material: z.string().optional(),
238
+ width: z.string().optional(),
239
+ length: z.string().optional(),
240
+ height: z.string().optional(),
241
+ weight: z.string().optional(),
242
+ mid_code: z.string().optional(),
243
+ hs_code: z.string().optional(),
244
+ attributes: z.array(z.object({
245
+ attribute_id: z.string().optional(),
246
+ title: z.string().min(1),
247
+ values: z.union([z.string(), z.array(z.string())]).optional(),
248
+ is_custom: z.boolean(),
249
+ is_required: z.boolean().optional(),
250
+ use_for_variants: z.boolean(),
251
+ type: z.string().optional(),
252
+ available_values: z.array(z.object({
253
+ id: z.string(),
254
+ name: z.string()
255
+ })).optional()
256
+ })).optional().superRefine((attributes, ctx) => {
257
+ attributes?.forEach((attr, index) => {
258
+ if (!attr.is_required) return;
259
+ const isEmpty = attr.values === void 0 || attr.values === "" || Array.isArray(attr.values) && attr.values.length === 0;
260
+ if (!isEmpty) return;
261
+ let messageKey = "products.create.errors.requiredAttribute";
262
+ if (attr.type === "single_select" || attr.type === "toggle") {
263
+ messageKey = "products.create.errors.requiredAttributeSelect";
264
+ } else if (attr.type === "multi_select") {
265
+ messageKey = "products.create.errors.requiredAttributeMultiSelect";
266
+ } else if (attr.type === "text" || attr.type === "unit") {
267
+ messageKey = "products.create.errors.requiredAttributeEnter";
268
+ }
269
+ ctx.addIssue({
270
+ code: z.ZodIssueCode.custom,
271
+ path: [index, "values"],
272
+ message: i18n.t(messageKey)
273
+ });
274
+ });
275
+ }),
276
+ variants: z.array(ProductCreateVariantSchema).min(1),
277
+ media: z.array(MediaSchema).optional()
278
+ }).superRefine((data, ctx) => {
279
+ if (data.variants.every((v) => !v.should_create)) {
280
+ return ctx.addIssue({
281
+ code: z.ZodIssueCode.custom,
282
+ path: ["variants"],
283
+ message: "invalid_length"
284
+ });
285
+ }
286
+ const skus = /* @__PURE__ */ new Set();
287
+ data.variants.forEach((v, index) => {
288
+ if (v.sku) {
289
+ if (skus.has(v.sku)) {
290
+ ctx.addIssue({
291
+ code: z.ZodIssueCode.custom,
292
+ path: [`variants.${index}.sku`],
293
+ message: i18n.t("products.create.errors.uniqueSku")
294
+ });
295
+ }
296
+ skus.add(v.sku);
297
+ }
298
+ });
299
+ });
300
+ var EditProductMediaSchema = z.object({
301
+ media: z.array(MediaSchema)
302
+ });
303
+ var PRODUCT_CREATE_FORM_DEFAULTS = {
304
+ discountable: true,
305
+ tags: [],
306
+ variants: decorateVariantsWithDefaultValues([
307
+ {
308
+ title: i18n.t("products.create.defaults.variantTitle"),
309
+ should_create: true,
310
+ variant_rank: 0,
311
+ options: {},
312
+ is_default: true
313
+ }
314
+ ]),
315
+ attributes: [],
316
+ media: [],
317
+ category_id: "",
318
+ collection_id: "",
319
+ description: "",
320
+ handle: "",
321
+ height: "",
322
+ hs_code: "",
323
+ length: "",
324
+ material: "",
325
+ mid_code: "",
326
+ origin_country: "",
327
+ subtitle: "",
328
+ title: "",
329
+ type_id: "",
330
+ weight: "",
331
+ width: ""
332
+ };
333
+
334
+ // src/components/common/file-upload/file-upload.tsx
335
+ import { ArrowDownTray, XMark } from "@medusajs/icons";
336
+ import { IconButton, Text, clx } from "@medusajs/ui";
337
+ import { useRef, useState } from "react";
338
+
339
+ // src/lib/format-file-size.ts
340
+ var formatFileSize = (bytes) => {
341
+ if (bytes === 0) return "0 B";
342
+ const units = ["B", "KB", "MB", "GB"];
343
+ const i = Math.floor(Math.log(bytes) / Math.log(1024));
344
+ return `${(bytes / Math.pow(1024, i)).toFixed(2)} ${units[i]}`;
345
+ };
346
+
347
+ // src/components/common/file-upload/file-upload.tsx
348
+ import { jsx, jsxs } from "react/jsx-runtime";
349
+ var FileUpload = ({
350
+ label,
351
+ hint,
352
+ multiple = true,
353
+ hasError,
354
+ formats,
355
+ onUploaded,
356
+ onRemove,
357
+ uploadedImage = "",
358
+ fileName,
359
+ fileSize
360
+ }) => {
361
+ const [isDragOver, setIsDragOver] = useState(false);
362
+ const inputRef = useRef(null);
363
+ const dropZoneRef = useRef(null);
364
+ const handleOpenFileSelector = () => {
365
+ inputRef.current?.click();
366
+ };
367
+ const handleDragEnter = (event) => {
368
+ event.preventDefault();
369
+ event.stopPropagation();
370
+ const files = event.dataTransfer?.files;
371
+ if (!files) {
372
+ return;
373
+ }
374
+ setIsDragOver(true);
375
+ };
376
+ const handleDragLeave = (event) => {
377
+ event.preventDefault();
378
+ event.stopPropagation();
379
+ if (!dropZoneRef.current || dropZoneRef.current.contains(event.relatedTarget)) {
380
+ return;
381
+ }
382
+ setIsDragOver(false);
383
+ };
384
+ const handleUploaded = (files) => {
385
+ if (!files) {
386
+ return;
387
+ }
388
+ const fileList = Array.from(files);
389
+ const fileObj = fileList.map((file) => {
390
+ const id = Math.random().toString(36).substring(7);
391
+ const previewUrl = URL.createObjectURL(file);
392
+ return {
393
+ id,
394
+ url: previewUrl,
395
+ file
396
+ };
397
+ });
398
+ onUploaded(fileObj);
399
+ };
400
+ const handleDrop = (event) => {
401
+ event.preventDefault();
402
+ event.stopPropagation();
403
+ setIsDragOver(false);
404
+ handleUploaded(event.dataTransfer?.files);
405
+ };
406
+ const handleFileChange = async (event) => {
407
+ handleUploaded(event.target.files);
408
+ };
409
+ const showFileRow = !multiple && uploadedImage;
410
+ if (showFileRow) {
411
+ return /* @__PURE__ */ jsxs("div", { children: [
412
+ /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-component shadow-borders-base flex items-center gap-x-3 rounded-lg p-3", children: [
413
+ /* @__PURE__ */ jsx("div", { className: "flex h-10 w-[30px] shrink-0 items-center justify-center overflow-hidden rounded-md", children: /* @__PURE__ */ jsx(
414
+ "img",
415
+ {
416
+ src: uploadedImage,
417
+ alt: fileName,
418
+ className: "h-full w-full object-cover"
419
+ }
420
+ ) }),
421
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col", children: [
422
+ /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: fileName || "image" }),
423
+ fileSize != null && /* @__PURE__ */ jsx(
424
+ Text,
425
+ {
426
+ size: "small",
427
+ leading: "compact",
428
+ className: "text-ui-fg-subtle",
429
+ children: formatFileSize(fileSize)
430
+ }
431
+ )
432
+ ] }),
433
+ onRemove && /* @__PURE__ */ jsx(
434
+ IconButton,
435
+ {
436
+ type: "button",
437
+ variant: "transparent",
438
+ size: "small",
439
+ onClick: onRemove,
440
+ children: /* @__PURE__ */ jsx(XMark, {})
441
+ }
442
+ )
443
+ ] }),
444
+ /* @__PURE__ */ jsx(
445
+ "input",
446
+ {
447
+ hidden: true,
448
+ ref: inputRef,
449
+ onChange: handleFileChange,
450
+ type: "file",
451
+ accept: formats.join(","),
452
+ multiple: false
453
+ }
454
+ )
455
+ ] });
456
+ }
457
+ return /* @__PURE__ */ jsxs("div", { children: [
458
+ /* @__PURE__ */ jsxs(
459
+ "button",
460
+ {
461
+ ref: dropZoneRef,
462
+ type: "button",
463
+ onClick: handleOpenFileSelector,
464
+ onDrop: handleDrop,
465
+ onDragOver: (e) => e.preventDefault(),
466
+ onDragEnter: handleDragEnter,
467
+ onDragLeave: handleDragLeave,
468
+ className: clx(
469
+ "bg-ui-bg-component border-ui-border-strong transition-fg group flex w-full flex-col items-center gap-y-2 rounded-lg border border-dashed p-8",
470
+ "hover:border-ui-border-interactive focus:border-ui-border-interactive",
471
+ "focus:shadow-borders-focus outline-none focus:border-solid",
472
+ {
473
+ "!border-ui-border-error": hasError,
474
+ "!border-ui-border-interactive": isDragOver
475
+ }
476
+ ),
477
+ children: [
478
+ /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle group-disabled:text-ui-fg-disabled flex items-center gap-x-2", children: [
479
+ /* @__PURE__ */ jsx(ArrowDownTray, {}),
480
+ /* @__PURE__ */ jsx(Text, { children: label })
481
+ ] }),
482
+ !!hint && /* @__PURE__ */ jsx(
483
+ Text,
484
+ {
485
+ size: "small",
486
+ leading: "compact",
487
+ className: "text-ui-fg-muted group-disabled:text-ui-fg-disabled",
488
+ children: hint
489
+ }
490
+ )
491
+ ]
492
+ }
493
+ ),
494
+ /* @__PURE__ */ jsx(
495
+ "input",
496
+ {
497
+ hidden: true,
498
+ ref: inputRef,
499
+ onChange: handleFileChange,
500
+ type: "file",
501
+ accept: formats.join(","),
502
+ multiple
503
+ }
504
+ )
505
+ ] });
506
+ };
507
+
508
+ export {
509
+ normalizeProductFormValues,
510
+ decorateVariantsWithDefaultValues,
511
+ generateVariantsFromAttributes,
512
+ MediaSchema,
513
+ ProductCreateSchema,
514
+ EditProductMediaSchema,
515
+ PRODUCT_CREATE_FORM_DEFAULTS,
516
+ formatFileSize,
517
+ FileUpload
518
+ };
@@ -0,0 +1,18 @@
1
+ // src/components/tabbed-form/types.ts
2
+ var defineTabMeta = (meta) => {
3
+ if (process.env.NODE_ENV !== "production") {
4
+ if (!meta.id) {
5
+ console.warn("[TabbedForm] Tab meta is missing required 'id' field");
6
+ }
7
+ if (!meta.labelKey && !meta.label) {
8
+ console.warn(
9
+ `[TabbedForm] Tab "${meta.id}" has neither 'labelKey' nor 'label' \u2014 the tab header will be empty`
10
+ );
11
+ }
12
+ }
13
+ return meta;
14
+ };
15
+
16
+ export {
17
+ defineTabMeta
18
+ };
@@ -0,0 +1,36 @@
1
+ // src/hooks/table/filters/use-order-table-filters.tsx
2
+ import { useTranslation } from "react-i18next";
3
+ import { useMemo } from "react";
4
+ var useOrderTableFilters = () => {
5
+ const { t } = useTranslation();
6
+ return useMemo(() => {
7
+ const filters = [];
8
+ const requestFilter = {
9
+ key: "request",
10
+ label: t("orders.filters.request.label"),
11
+ type: "select",
12
+ multiple: true,
13
+ options: [
14
+ { label: t("orders.filters.request.edit"), value: "edit" },
15
+ { label: t("orders.filters.request.return"), value: "return" },
16
+ { label: t("orders.filters.request.exchange"), value: "exchange" },
17
+ { label: t("orders.filters.request.claim"), value: "claim" }
18
+ ]
19
+ };
20
+ filters.push(requestFilter);
21
+ const dateFilters = [
22
+ { label: t("fields.createdAt"), key: "created_at" },
23
+ { label: t("fields.updatedAt"), key: "updated_at" }
24
+ ].map((f) => ({
25
+ key: f.key,
26
+ label: f.label,
27
+ type: "date"
28
+ }));
29
+ filters.push(...dateFilters);
30
+ return filters;
31
+ }, [t]);
32
+ };
33
+
34
+ export {
35
+ useOrderTableFilters
36
+ };
@@ -1,9 +1,6 @@
1
1
  import {
2
2
  getLocaleAmount
3
- } from "./chunk-PXYDR7WQ.js";
4
- import {
5
- castNumber
6
- } from "./chunk-SMQT3ZNO.js";
3
+ } from "./chunk-3BXCPHN6.js";
7
4
  import {
8
5
  DataGrid,
9
6
  DataGridCellContainer,
@@ -12,16 +9,19 @@ import {
12
9
  useCombinedRefs,
13
10
  useDataGridCell,
14
11
  useDataGridCellError
15
- } from "./chunk-Y2QI7KWS.js";
12
+ } from "./chunk-4LVP635F.js";
16
13
  import {
17
14
  currencies
18
15
  } from "./chunk-IQPN4PZJ.js";
16
+ import {
17
+ castNumber
18
+ } from "./chunk-SMQT3ZNO.js";
19
19
  import {
20
20
  KeyboundForm
21
21
  } from "./chunk-U2ZFCAPX.js";
22
22
  import {
23
23
  StackedFocusModal
24
- } from "./chunk-3CK6OINO.js";
24
+ } from "./chunk-GDWBOQI5.js";
25
25
  import {
26
26
  Form
27
27
  } from "./chunk-3QSRE5LS.js";