@mercurjs/vendor 2.2.0-canary.2 → 2.2.0-canary.21

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 (266) hide show
  1. package/dist/{[id]-KRLGIVLR.js → [id]-3JICOSAI.js} +133 -41
  2. package/dist/[id]-CR76L5TG.js +3102 -0
  3. package/dist/{[id]-7BAKUHUO.js → [id]-DDGHFRSB.js} +5 -5
  4. package/dist/{[id]-KVWYLDN3.js → [id]-E7DYRMMO.js} +162 -71
  5. package/dist/{[id]-4OBGG7OH.js → [id]-FIP4UMQ4.js} +197 -105
  6. package/dist/{[id]-3EC6HYXL.js → [id]-FZRXOJWL.js} +22 -21
  7. package/dist/{[id]-ZWWMJAKI.js → [id]-PD3ISUL5.js} +7 -7
  8. package/dist/{[id]-UUUQK22M.js → [id]-Q5AXQ5XO.js} +460 -581
  9. package/dist/{[id]-KJIQTFGE.js → [id]-VSNA6SV5.js} +15 -15
  10. package/dist/{[id]-Y2ISCLUD.js → [id]-XUKQKCDN.js} +3 -3
  11. package/dist/{[id]-K2CT7BXQ.js → [id]-YPCO3DJV.js} +1 -1
  12. package/dist/{[id]-LUFRJLAU.js → [id]-ZEFQ7FQQ.js} +36 -33
  13. package/dist/{[id]-COLO4TQJ.js → [id]-ZW7TBWDU.js} +24 -23
  14. package/dist/{[province_id]-H2QAPKVH.js → [province_id]-CHOO7ERP.js} +14 -14
  15. package/dist/{add-FIWTANZX.js → add-GYXNRUAE.js} +40 -37
  16. package/dist/{add-PBZQCIZQ.js → add-IC5R27X3.js} +95 -32
  17. package/dist/{add-customer-groups-RAHCP67U.js → add-customer-groups-KIGBZT5G.js} +20 -23
  18. package/dist/{add-products-N3V2MVLD.js → add-products-ALJVIFXU.js} +23 -22
  19. package/dist/{add-promotions-CSCAJZHV.js → add-promotions-EQ5MMQKG.js} +8 -8
  20. package/dist/{add-to-campaign-DLP7PSQB.js → add-to-campaign-C6JDNB6F.js} +4 -4
  21. package/dist/{address-7F5SN7PV.js → address-UKLDTSTP.js} +13 -13
  22. package/dist/{adjust-inventory-SZF4W7LR.js → adjust-inventory-5XPGE44Y.js} +2 -2
  23. package/dist/allocate-items-URVRAFPS.js +685 -0
  24. package/dist/{areas-7Y6BVS5A.js → areas-64VXOFYS.js} +6 -6
  25. package/dist/{attributes-MBZ76HVZ.js → attributes-YQNW5JBY.js} +2 -2
  26. package/dist/{breadcrumb-HND5FFWC.js → breadcrumb-26G7BS3Q.js} +3 -3
  27. package/dist/{breadcrumb-7PURSRTT.js → breadcrumb-2AYN2SV7.js} +12 -12
  28. package/dist/{breadcrumb-ZCG2RHIU.js → breadcrumb-4KKLMVC3.js} +12 -12
  29. package/dist/{breadcrumb-WRG4SITG.js → breadcrumb-4XSHX5RV.js} +13 -13
  30. package/dist/{breadcrumb-QV2IAX7N.js → breadcrumb-E5OF4L2J.js} +2 -2
  31. package/dist/breadcrumb-JC5FUQYF.js +28 -0
  32. package/dist/{breadcrumb-YBBYFQYG.js → breadcrumb-LBO2I4OJ.js} +1 -1
  33. package/dist/breadcrumb-PIDJ23EZ.js +13 -0
  34. package/dist/{breadcrumb-65SAGUUL.js → breadcrumb-RWYEU5JK.js} +3 -3
  35. package/dist/{breadcrumb-VWELWDB2.js → breadcrumb-VXKAO6GP.js} +1 -1
  36. package/dist/{breadcrumb-FLDHJRVY.js → breadcrumb-WMNG4P6C.js} +9 -8
  37. package/dist/{breadcrumb-EDPMEN2P.js → breadcrumb-XPQETVMM.js} +2 -2
  38. package/dist/{campaigns-L6ULR6KR.js → campaigns-4I2T6EDZ.js} +5 -5
  39. package/dist/{categories-FUZQKBXV.js → categories-3P2DRH5V.js} +10 -8
  40. package/dist/{chunk-EZ3JOAUS.js → chunk-22CIYLKO.js} +1 -1
  41. package/dist/{chunk-RZLN2Q6G.js → chunk-247L47JD.js} +1 -1
  42. package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
  43. package/dist/{chunk-M7KSRYRI.js → chunk-2ECD67FO.js} +2 -2
  44. package/dist/{chunk-36L54SQQ.js → chunk-2H4FGZ4U.js} +1 -1
  45. package/dist/{chunk-X2FVFUET.js → chunk-2NUZTTBU.js} +27 -8
  46. package/dist/chunk-2OY4NW7L.js +185 -0
  47. package/dist/{chunk-K4X324QP.js → chunk-36WXPGD2.js} +6 -5
  48. package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
  49. package/dist/chunk-3EDZQSKG.js +33 -0
  50. package/dist/{chunk-2DXNJURE.js → chunk-3L2DVCOC.js} +1 -1
  51. package/dist/chunk-42R54Z2X.js +8 -0
  52. package/dist/{chunk-CNMY5HVP.js → chunk-4EQIJMQT.js} +3 -3
  53. package/dist/{chunk-UAF2S447.js → chunk-4OIOYUQE.js} +3 -3
  54. package/dist/{chunk-UORPTGV2.js → chunk-4R5GESED.js} +10 -14
  55. package/dist/{chunk-WUPJADSO.js → chunk-4RFPRO2W.js} +2 -2
  56. package/dist/chunk-4YWKKCTT.js +32 -0
  57. package/dist/{chunk-XFQJU6FA.js → chunk-5QG6P6EU.js} +1 -1
  58. package/dist/{chunk-N4MVIBFM.js → chunk-5Y6RDTW2.js} +3 -3
  59. package/dist/{chunk-DZIXC7OE.js → chunk-6FLSBL4Q.js} +30 -85
  60. package/dist/{chunk-DVEKYLPV.js → chunk-6QS6IZC6.js} +1 -1
  61. package/dist/chunk-6ZGQ3SOR.js +127 -0
  62. package/dist/{chunk-NXNJQZCP.js → chunk-7FIPNQM2.js} +1 -1
  63. package/dist/{chunk-NSZQERLE.js → chunk-7GGWRJJF.js} +2 -2
  64. package/dist/{chunk-QS6RWIBL.js → chunk-7RGUD6PI.js} +34 -20
  65. package/dist/{chunk-5L2DCA4W.js → chunk-7ZPJGL4C.js} +57 -6
  66. package/dist/{chunk-KD7RYE6R.js → chunk-AG6KIAUD.js} +2 -2
  67. package/dist/{chunk-UCQKXXLD.js → chunk-AKKIZD2P.js} +32 -34
  68. package/dist/chunk-CHBURL76.js +438 -0
  69. package/dist/{chunk-PBD36EZJ.js → chunk-CI4YXVQF.js} +2 -2
  70. package/dist/{chunk-7LBY5JLV.js → chunk-DAV7WS53.js} +1 -1
  71. package/dist/{chunk-6BS2AVGJ.js → chunk-DNXMONCL.js} +6 -6
  72. package/dist/{chunk-TNVYTMBL.js → chunk-E4O5PARZ.js} +4 -4
  73. package/dist/{chunk-L7QKFC5N.js → chunk-E6W57UP3.js} +32 -122
  74. package/dist/chunk-EEBJYXWA.js +15 -0
  75. package/dist/chunk-FP6U6BPH.js +61 -0
  76. package/dist/{chunk-SGR4DMCW.js → chunk-FRYZRBLA.js} +1 -1
  77. package/dist/chunk-FWPGOIFA.js +22 -0
  78. package/dist/chunk-GL7F6NDU.js +30 -0
  79. package/dist/chunk-H7BVANDX.js +407 -0
  80. package/dist/{chunk-FDR22JMM.js → chunk-HFRHHT36.js} +8 -63
  81. package/dist/{chunk-FJUUGFXL.js → chunk-HOUDNM5M.js} +1 -1
  82. package/dist/{chunk-6Y53VZ3C.js → chunk-HZCSJLGH.js} +11 -11
  83. package/dist/chunk-I75SROQZ.js +315 -0
  84. package/dist/{chunk-JQV7CXEC.js → chunk-II3ACSV2.js} +17 -2
  85. package/dist/{chunk-DARJTN4I.js → chunk-IMJ62GAP.js} +10 -5
  86. package/dist/{chunk-PPLC4IKI.js → chunk-IV57G2CB.js} +14 -1
  87. package/dist/{chunk-7SLWXX6L.js → chunk-J434WDD3.js} +5 -6
  88. package/dist/chunk-J6XCRFBW.js +30 -0
  89. package/dist/{chunk-KAZ5BYTQ.js → chunk-KCHYLLVG.js} +6 -4
  90. package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
  91. package/dist/{chunk-GXIAIITP.js → chunk-KZYRC3WR.js} +36 -39
  92. package/dist/chunk-L57USMYC.js +39 -0
  93. package/dist/chunk-LFX6WU4A.js +36 -0
  94. package/dist/{chunk-EROX26D4.js → chunk-LRMWYKSF.js} +1 -1
  95. package/dist/{chunk-LWJF63JW.js → chunk-LTQQRVZG.js} +89 -14
  96. package/dist/chunk-LYYM7H7H.js +59 -0
  97. package/dist/{chunk-NHFEY3EI.js → chunk-M3YUT5AY.js} +2 -2
  98. package/dist/{chunk-H6LZ77GX.js → chunk-MJCL3WID.js} +1 -1
  99. package/dist/{chunk-X4INVIWL.js → chunk-MZRZVLWD.js} +3 -3
  100. package/dist/{chunk-DDH7ULIQ.js → chunk-N6MGVXXQ.js} +1 -1
  101. package/dist/{chunk-QXLRABYH.js → chunk-O7VOGTLX.js} +1 -1
  102. package/dist/{chunk-35G3SZRN.js → chunk-P3SOE76R.js} +1 -1
  103. package/dist/{chunk-PZ44R4AS.js → chunk-P7Q5ZSZD.js} +1 -1
  104. package/dist/{chunk-5ATEALH7.js → chunk-PFJFS3F4.js} +1 -5
  105. package/dist/chunk-POOTMH3K.js +62 -0
  106. package/dist/{chunk-GGWUWT55.js → chunk-QJI4OET7.js} +23 -36
  107. package/dist/{chunk-NJMNYS7G.js → chunk-QS35HWC5.js} +1 -1
  108. package/dist/{chunk-RTBNJQOV.js → chunk-R4JLYNUA.js} +419 -538
  109. package/dist/{chunk-DIW4GRTI.js → chunk-RT3G3GEK.js} +47 -31
  110. package/dist/{chunk-QT7YFHCA.js → chunk-S23FD6FA.js} +12 -0
  111. package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
  112. package/dist/chunk-SPFLYPY6.js +6 -0
  113. package/dist/{chunk-EIUYXS7E.js → chunk-SZBERGA4.js} +1 -1
  114. package/dist/chunk-T6DSYOY5.js +173 -0
  115. package/dist/{chunk-4LVP635F.js → chunk-TKSKCYM3.js} +128 -126
  116. package/dist/{chunk-QNNJN4H6.js → chunk-TSTUAL6N.js} +59 -0
  117. package/dist/{chunk-LNM2D2I4.js → chunk-TZMNEN7A.js} +7 -6
  118. package/dist/chunk-UM7ZR3VU.js +14 -0
  119. package/dist/{chunk-X22KTLZ7.js → chunk-UO6IX5Y7.js} +1 -1
  120. package/dist/chunk-VCUUITW6.js +35 -0
  121. package/dist/{chunk-LQD232FW.js → chunk-WJ5EU3KW.js} +1 -1
  122. package/dist/{chunk-AIF2KTEE.js → chunk-WKRW5OPL.js} +12 -2
  123. package/dist/{chunk-6YA3C4NB.js → chunk-XBKWFLJG.js} +4 -13
  124. package/dist/{chunk-WBHFU3MG.js → chunk-XJYQ4SW5.js} +2 -2
  125. package/dist/chunk-XQUF3WIS.js +159 -0
  126. package/dist/chunk-YBF45CX5.js +23 -0
  127. package/dist/{chunk-AVOIZO63.js → chunk-YQZBAP3S.js} +4 -2
  128. package/dist/chunk-ZHFFTT3I.js +17 -0
  129. package/dist/{chunk-TODJFRLH.js → chunk-ZHR77OQI.js} +2 -2
  130. package/dist/chunk-ZUHIKMQL.js +353 -0
  131. package/dist/{chunk-44RQ5PTN.js → chunk-ZZIJSTXN.js} +225 -90
  132. package/dist/{collections-YCAAFGSW.js → collections-7M7O23NO.js} +28 -26
  133. package/dist/{configuration-UOSNP45I.js → configuration-5IDQRYJQ.js} +4 -4
  134. package/dist/{configuration-C4IGBNXH.js → configuration-TXRAYMI4.js} +1 -1
  135. package/dist/{create-BJ4OO6LS.js → create-2N73Y6FO.js} +14 -14
  136. package/dist/{create-R7K3ECN6.js → create-3MUVY3UY.js} +1 -1
  137. package/dist/{create-SFU3W3ZH.js → create-6DRXGPYA.js} +1 -1
  138. package/dist/{create-XAD5NMSJ.js → create-6KM5AZCG.js} +20 -20
  139. package/dist/{create-YDDBH4VQ.js → create-A6CPQMMH.js} +27 -26
  140. package/dist/create-B4EWCX7X.js +1798 -0
  141. package/dist/{create-YBF4YGWG.js → create-BHSMHOFN.js} +1 -1
  142. package/dist/{create-XVHOCZHJ.js → create-BVUZWMET.js} +1 -1
  143. package/dist/create-CJEZCYN6.js +1179 -0
  144. package/dist/create-DAVMJNC2.js +1931 -0
  145. package/dist/{create-35MYQPVM.js → create-E4HTVPP7.js} +17 -17
  146. package/dist/{create-JDGM5KXE.js → create-G4TF2M7G.js} +88 -42
  147. package/dist/{create-UQNYMVBM.js → create-LOP7AF5N.js} +6 -6
  148. package/dist/{create-UPYB65PD.js → create-MKFDE32U.js} +1 -1
  149. package/dist/{create-B5ZXTK3K.js → create-NR7ULWQS.js} +37 -34
  150. package/dist/{create-HI5UI2EZ.js → create-SJSLOXOW.js} +31 -26
  151. package/dist/{create-GB3ZA4LH.js → create-SYI6DVKM.js} +4 -4
  152. package/dist/{create-ORXYT74H.js → create-ZAGMLDR4.js} +13 -13
  153. package/dist/create-ZP4LSJYQ.js +216 -0
  154. package/dist/customer-group-add-customers-GTM556QA.js +251 -0
  155. package/dist/customer-group-create-OYHAXX2T.js +140 -0
  156. package/dist/customer-group-detail-KW62TLWA.js +58 -0
  157. package/dist/customer-group-edit-WH7O4N4L.js +137 -0
  158. package/dist/customer-groups-UJFZBZ2B.js +276 -0
  159. package/dist/{customers-ETXVNM3G.js → customers-4WKIFPUU.js} +7 -7
  160. package/dist/{edit-UGEC27HP.js → edit-3EN2H52W.js} +39 -36
  161. package/dist/{edit-ZMERG3L7.js → edit-3VNT35DW.js} +1 -1
  162. package/dist/{edit-ORXS3A2Y.js → edit-6DUTTLEV.js} +1 -1
  163. package/dist/edit-6K3NSVI7.js +103 -0
  164. package/dist/{edit-REDDBLTA.js → edit-6Z6RIJRZ.js} +4 -4
  165. package/dist/{edit-2Q7TRUTL.js → edit-CVSO5CX7.js} +14 -14
  166. package/dist/{edit-ZAHCMF5U.js → edit-FQDSESVI.js} +1 -1
  167. package/dist/edit-GZXLWSTL.js +176 -0
  168. package/dist/edit-LLNKSZR4.js +871 -0
  169. package/dist/{edit-O4JLGKQR.js → edit-MKVDAUA5.js} +1 -1
  170. package/dist/{edit-ZCXUG42Q.js → edit-NDUSRTWY.js} +13 -13
  171. package/dist/{edit-522DG3BY.js → edit-RBREBAQQ.js} +1 -1
  172. package/dist/{edit-Q3UQIOLS.js → edit-RQHOHZR6.js} +1 -1
  173. package/dist/{edit-VKT62KHG.js → edit-SAB6F3ZG.js} +36 -15
  174. package/dist/{edit-C4OCKQVU.js → edit-SM2GHVKW.js} +1 -1
  175. package/dist/{edit-KAKVPHZZ.js → edit-UVY3TEHD.js} +1 -1
  176. package/dist/{edit-SGUY2CCK.js → edit-V7WLYLOQ.js} +16 -16
  177. package/dist/{edit-FKXIQ6ZI.js → edit-XMZSLH4O.js} +16 -16
  178. package/dist/{edit-L5ZZLMAY.js → edit-YTS77SJS.js} +43 -32
  179. package/dist/{edit-budget-L3CCEWNF.js → edit-budget-4JMGEPNF.js} +1 -1
  180. package/dist/{edit-inventory-item-6B7ITDGD.js → edit-inventory-item-G22KFCYY.js} +2 -2
  181. package/dist/{edit-inventory-item-attributes-Y7MQZLXI.js → edit-inventory-item-attributes-RJSM4MEI.js} +2 -2
  182. package/dist/edit-price-K6K2FTMF.js +196 -0
  183. package/dist/edit-stock-6TUSJD5R.js +229 -0
  184. package/dist/fulfillment-VEF6HG6D.js +641 -0
  185. package/dist/{fulfillment-providers-DQAU43JZ.js → fulfillment-providers-VKBWFH45.js} +24 -24
  186. package/dist/index.css +107 -10
  187. package/dist/index.js +302 -183
  188. package/dist/{inventory-KAUVPMPZ.js → inventory-OCIGVZ4V.js} +6 -6
  189. package/dist/{offer-inventory-batch-page-WKCWNDNK.js → inventory-T7BRSFKY.js} +16 -16
  190. package/dist/{invite-CI2P4GF6.js → invite-J6L3Q7MQ.js} +12 -12
  191. package/dist/{invite-Q6EYDZVQ.js → invite-VWNUFOFI.js} +21 -21
  192. package/dist/loader-2EQ4ROTD.js +34 -0
  193. package/dist/loader-HYUC2XZX.js +33 -0
  194. package/dist/{login-KY342RMK.js → login-WOZMCEFY.js} +12 -12
  195. package/dist/{manage-locations-WNHEBS3A.js → manage-locations-R3ASMF5B.js} +1 -1
  196. package/dist/{media-B6ME2WXY.js → media-KIIJ6WSZ.js} +18 -17
  197. package/dist/media-RJHUSBXL.js +315 -0
  198. package/dist/{metadata-WR4RFXO5.js → metadata-45S6CFKY.js} +14 -14
  199. package/dist/{metadata-2CMH4I6U.js → metadata-FCATUWIZ.js} +14 -14
  200. package/dist/{metadata-GWI6R4ES.js → metadata-L5GBBXC4.js} +14 -14
  201. package/dist/{metadata-TLDUF5KV.js → metadata-R4ZRMAO6.js} +14 -14
  202. package/dist/{metadata-NUXUC2JA.js → metadata-RM5VVAOS.js} +14 -14
  203. package/dist/{offer-create-page-4Z6L63BU.js → offer-create-page-DV4JCIL2.js} +190 -195
  204. package/dist/offer-detail-page-TIBYGQBS.js +590 -0
  205. package/dist/offer-variant-detail-page-ORH56HZI.js +421 -0
  206. package/dist/offers-VA63KV3C.js +54 -0
  207. package/dist/{onboarding-43LQQQGQ.js → onboarding-L5RRKT65.js} +12 -12
  208. package/dist/{orders-ZV4D6L2V.js → orders-KKJD6EWZ.js} +27 -27
  209. package/dist/{organization-ZTQGRJWS.js → organization-6YPU2RQP.js} +53 -89
  210. package/dist/{organize-K6QMAMEN.js → organize-LR7FWK2J.js} +3 -3
  211. package/dist/{organize-HNJUHEEG.js → organize-SUG4SGVR.js} +3 -3
  212. package/dist/pages/index.d.ts +40 -16
  213. package/dist/pages/index.js +73 -73
  214. package/dist/{payment-details-64US5XWD.js → payment-details-UVEIHQA5.js} +13 -13
  215. package/dist/{payouts-UXJDTXDL.js → payouts-D4A4CILI.js} +8 -8
  216. package/dist/{price-lists-KBPUVSZI.js → price-lists-WJFXFGEV.js} +10 -10
  217. package/dist/{pricing-DF6C5XK4.js → pricing-QEVR2Z4K.js} +19 -19
  218. package/dist/{offer-pricing-edit-page-4TYGGSOE.js → pricing-XJUUCYL5.js} +24 -18
  219. package/dist/{product-tags-6MZB4W5R.js → product-tags-MW2JMRFY.js} +36 -33
  220. package/dist/{product-types-UUHBV4IZ.js → product-types-XXU7X42K.js} +6 -6
  221. package/dist/product-variant-detail-XZWTSH3H.js +369 -0
  222. package/dist/{product-variant-edit-YYNPHE4L.js → product-variant-edit-A2KO3E7B.js} +41 -44
  223. package/dist/{products-MZBU5MEV.js → products-TZS2OPK3.js} +37 -37
  224. package/dist/{products-IWKTGZS6.js → products-XSXEUKIB.js} +23 -22
  225. package/dist/{professional-details-5T2VS6MM.js → professional-details-ELUEJPOH.js} +13 -13
  226. package/dist/{profile-6XGHAT7H.js → profile-EDVGIBW6.js} +16 -16
  227. package/dist/{promotions-O7U4BTK6.js → promotions-JYO23G6N.js} +8 -8
  228. package/dist/receive-47SMYKIJ.js +578 -0
  229. package/dist/refund-IU7B77FV.js +268 -0
  230. package/dist/{register-N6WOSMLA.js → register-SR2SYX4Q.js} +14 -14
  231. package/dist/{reset-password-EICPAY2N.js → reset-password-N22YRMR3.js} +1 -1
  232. package/dist/{return-reasons-IX3LIOCU.js → return-reasons-POR5YPTF.js} +18 -15
  233. package/dist/{sales-channels-JW3QUYR7.js → sales-channels-ETB6QRRY.js} +8 -8
  234. package/dist/{sales-channels-B6FULRWI.js → sales-channels-YXRRARDL.js} +7 -7
  235. package/dist/{settings-MV53ZZ53.js → settings-MHBYIZ2I.js} +38 -35
  236. package/dist/shipment-ZX6PQ32L.js +241 -0
  237. package/dist/shipping-W4SPR3JO.js +122 -0
  238. package/dist/{shipping-profile-Y4SNEPZX.js → shipping-profile-L5CFXVEE.js} +4 -8
  239. package/dist/{shipping-profiles-2NWKCEJK.js → shipping-profiles-QBJUWXVQ.js} +17 -17
  240. package/dist/{stock-7CSVEJJU.js → stock-FW4DOVFV.js} +14 -14
  241. package/dist/{store-X23G3JCJ.js → store-NWWBV2UO.js} +75 -144
  242. package/dist/{store-closure-P5PD2RSV.js → store-closure-O3CBSOJD.js} +19 -14
  243. package/dist/{store-select-TREPDS3G.js → store-select-C7GI5MKK.js} +13 -13
  244. package/dist/{tax-regions-YXZW7UVX.js → tax-regions-2JCIB4T7.js} +2 -2
  245. package/dist/{team-SPP5OY5W.js → team-MY24J5WO.js} +20 -20
  246. package/package.json +2 -2
  247. package/dist/[id]-LTNOHLGE.js +0 -1219
  248. package/dist/allocate-items-SDFS5GYN.js +0 -533
  249. package/dist/chunk-432S4FGR.js +0 -0
  250. package/dist/chunk-AIZM66CG.js +0 -66
  251. package/dist/chunk-BDZOSMAX.js +0 -23
  252. package/dist/chunk-CFRWIQIZ.js +0 -43
  253. package/dist/chunk-GKZHBXZK.js +0 -426
  254. package/dist/chunk-RXZFEFNV.js +0 -73
  255. package/dist/chunk-T6LHVNWO.js +0 -27
  256. package/dist/chunk-WLT7K7K7.js +0 -63
  257. package/dist/create-FCKGCZSM.js +0 -210
  258. package/dist/edit-GQNIINRR.js +0 -192
  259. package/dist/fulfillment-75Z4H23W.js +0 -559
  260. package/dist/loader-FBB5OQRT.js +0 -31
  261. package/dist/metadata-5BPOBBU2.js +0 -45
  262. package/dist/offer-detail-page-6MAHNNIO.js +0 -488
  263. package/dist/offer-edit-page-DYQFU6JU.js +0 -151
  264. package/dist/offers-ZG6OTDZ2.js +0 -32
  265. package/dist/product-variant-detail-RVWEYVPC.js +0 -220
  266. package/dist/shipment-Q33QBMXX.js +0 -176
@@ -1,488 +0,0 @@
1
- import {
2
- useDeleteOfferAction
3
- } from "./chunk-CFRWIQIZ.js";
4
- import {
5
- OFFER_DETAIL_FIELDS
6
- } from "./chunk-RXZFEFNV.js";
7
- import {
8
- getLocaleAmount
9
- } from "./chunk-PXYDR7WQ.js";
10
- import "./chunk-FQERBIVS.js";
11
- import {
12
- PlaceholderCell
13
- } from "./chunk-PHOCVOZ5.js";
14
- import {
15
- _DataTable,
16
- useDataTable
17
- } from "./chunk-AIF2KTEE.js";
18
- import "./chunk-YN3FGNJM.js";
19
- import "./chunk-KAZ5BYTQ.js";
20
- import {
21
- NoRecords
22
- } from "./chunk-3EF54XFY.js";
23
- import "./chunk-IQPN4PZJ.js";
24
- import {
25
- SectionRow
26
- } from "./chunk-4TLP3TAA.js";
27
- import {
28
- TwoColumnPage
29
- } from "./chunk-YV6MK4PZ.js";
30
- import "./chunk-LRD242C7.js";
31
- import "./chunk-QHQWEERJ.js";
32
- import {
33
- Thumbnail
34
- } from "./chunk-WIYFXWRI.js";
35
- import {
36
- TwoColumnPageSkeleton
37
- } from "./chunk-INNFZYX2.js";
38
- import {
39
- useOffer
40
- } from "./chunk-UORPTGV2.js";
41
- import {
42
- ActionMenu
43
- } from "./chunk-BDGZ4EQO.js";
44
- import "./chunk-LAVHRER2.js";
45
- import "./chunk-Y7QKP6QU.js";
46
- import "./chunk-RHKRREUU.js";
47
- import "./chunk-ZA2KFUFR.js";
48
- import "./chunk-RIN4CBRB.js";
49
- import "./chunk-NBMM2TZK.js";
50
-
51
- // src/pages/offers/[id]/offer-detail-page.tsx
52
- import { Children } from "react";
53
- import { useLoaderData, useParams } from "react-router-dom";
54
-
55
- // src/pages/offers/[id]/_components/offer-general-section.tsx
56
- import { Component, PencilSquare, Trash } from "@medusajs/icons";
57
- import { Container, Heading } from "@medusajs/ui";
58
- import { useTranslation } from "react-i18next";
59
- import { jsx, jsxs } from "react/jsx-runtime";
60
- var formatDate = (value) => {
61
- if (!value) return "-";
62
- try {
63
- return new Intl.DateTimeFormat(void 0, {
64
- dateStyle: "medium",
65
- timeStyle: "short"
66
- }).format(new Date(value));
67
- } catch {
68
- return "-";
69
- }
70
- };
71
- var OfferGeneralSection = ({ offer }) => {
72
- const { t } = useTranslation();
73
- const handleDelete = useDeleteOfferAction({
74
- id: offer.id,
75
- sku: offer.sku ?? "",
76
- redirectOnSuccess: true
77
- });
78
- const hasKit = (offer.inventory_item_link?.length ?? 0) > 1;
79
- const variantTitle = offer.product_variant?.title ?? "";
80
- return /* @__PURE__ */ jsxs(
81
- Container,
82
- {
83
- className: "divide-y p-0",
84
- "data-testid": "offer-detail-general-section",
85
- children: [
86
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
87
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
88
- /* @__PURE__ */ jsx(Heading, { title: variantTitle, children: variantTitle }),
89
- hasKit && /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted font-normal", children: /* @__PURE__ */ jsx(Component, {}) })
90
- ] }),
91
- /* @__PURE__ */ jsx(
92
- ActionMenu,
93
- {
94
- groups: [
95
- {
96
- actions: [
97
- {
98
- icon: /* @__PURE__ */ jsx(PencilSquare, {}),
99
- label: t("actions.edit"),
100
- to: "edit"
101
- }
102
- ]
103
- },
104
- {
105
- actions: [
106
- {
107
- icon: /* @__PURE__ */ jsx(Trash, {}),
108
- label: t("actions.delete"),
109
- onClick: handleDelete
110
- }
111
- ]
112
- }
113
- ]
114
- }
115
- )
116
- ] }),
117
- /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.sku"), value: offer.sku ?? "-" }),
118
- /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.ean"), value: offer.ean ?? "-" }),
119
- /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.upc"), value: offer.upc ?? "-" }),
120
- /* @__PURE__ */ jsx(
121
- SectionRow,
122
- {
123
- title: t("shippingProfile.domain"),
124
- value: offer.shipping_profile?.name ?? "-"
125
- }
126
- ),
127
- /* @__PURE__ */ jsx(
128
- SectionRow,
129
- {
130
- title: t("fields.createdAt"),
131
- value: formatDate(offer.created_at)
132
- }
133
- ),
134
- /* @__PURE__ */ jsx(
135
- SectionRow,
136
- {
137
- title: t("fields.updatedAt"),
138
- value: formatDate(offer.updated_at)
139
- }
140
- )
141
- ]
142
- }
143
- );
144
- };
145
-
146
- // src/pages/offers/[id]/_components/offer-inventory-section.tsx
147
- import { Buildings, Component as Component2 } from "@medusajs/icons";
148
- import { Container as Container2, Heading as Heading2, Text } from "@medusajs/ui";
149
- import { createColumnHelper } from "@tanstack/react-table";
150
- import { useMemo } from "react";
151
- import { useTranslation as useTranslation2 } from "react-i18next";
152
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
153
- var columnHelper = createColumnHelper();
154
- var PAGE_SIZE = 20;
155
- var computeAvailable = (row) => {
156
- const levels = row.location_levels ?? [];
157
- let quantity = 0;
158
- let locations = 0;
159
- for (const level of levels) {
160
- if (level.available_quantity != null) {
161
- quantity += level.available_quantity;
162
- } else {
163
- const stocked = level.stocked_quantity ?? 0;
164
- const reserved = level.reserved_quantity ?? 0;
165
- quantity += Math.max(0, stocked - reserved);
166
- }
167
- locations += 1;
168
- }
169
- return { quantity, locations };
170
- };
171
- var InventoryActions = ({ item }) => {
172
- const { t } = useTranslation2();
173
- return /* @__PURE__ */ jsx2(
174
- ActionMenu,
175
- {
176
- groups: [
177
- {
178
- actions: [
179
- {
180
- icon: /* @__PURE__ */ jsx2(Buildings, {}),
181
- label: t("offers.detail.goToInventoryItem"),
182
- to: `/inventory/${item.id}`
183
- }
184
- ]
185
- }
186
- ]
187
- }
188
- );
189
- };
190
- var OfferInventorySection = ({ offer }) => {
191
- const { t } = useTranslation2();
192
- const inventoryItems = useMemo(() => {
193
- const links = offer.inventory_item_link ?? [];
194
- return links.map((link) => {
195
- const item = link.inventory_item;
196
- if (!item?.id) return null;
197
- return {
198
- id: item.id,
199
- title: item.title,
200
- sku: item.sku,
201
- required_quantity: link.required_quantity,
202
- location_levels: item.location_levels
203
- };
204
- }).filter((x) => x !== null);
205
- }, [offer.inventory_item_link]);
206
- const columns = useMemo(
207
- () => [
208
- columnHelper.accessor("title", {
209
- header: t("fields.title"),
210
- cell: ({ getValue }) => {
211
- const title = getValue();
212
- if (!title) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
213
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: title }) });
214
- }
215
- }),
216
- columnHelper.accessor("sku", {
217
- header: t("offers.fields.sku"),
218
- cell: ({ getValue }) => {
219
- const sku = getValue();
220
- if (!sku) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
221
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: sku }) });
222
- }
223
- }),
224
- columnHelper.accessor("required_quantity", {
225
- header: t("offers.fields.requiredQuantity"),
226
- cell: ({ getValue }) => {
227
- const value = getValue();
228
- if (value == null) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
229
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: value }) });
230
- }
231
- }),
232
- columnHelper.display({
233
- id: "inventory",
234
- header: t("fields.inventory"),
235
- cell: ({ row }) => {
236
- const { quantity, locations } = computeAvailable(row.original);
237
- if (locations === 0) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
238
- const text = `${quantity} available at ${locations} ${locations === 1 ? "location" : "locations"}`;
239
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2(
240
- Text,
241
- {
242
- size: "small",
243
- className: quantity === 0 ? "text-ui-fg-error truncate" : "truncate",
244
- children: text
245
- }
246
- ) });
247
- }
248
- }),
249
- columnHelper.display({
250
- id: "actions",
251
- cell: ({ row }) => /* @__PURE__ */ jsx2(InventoryActions, { item: row.original })
252
- })
253
- ],
254
- [t]
255
- );
256
- const { table } = useDataTable({
257
- data: inventoryItems,
258
- columns,
259
- count: inventoryItems.length,
260
- enablePagination: true,
261
- getRowId: (row) => row.id,
262
- pageSize: PAGE_SIZE
263
- });
264
- const hasKit = inventoryItems.length > 1;
265
- return /* @__PURE__ */ jsxs2(
266
- Container2,
267
- {
268
- className: "divide-y p-0",
269
- "data-testid": "offer-detail-inventory-section",
270
- children: [
271
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
272
- /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("offers.detail.inventoryItems") }),
273
- /* @__PURE__ */ jsx2(
274
- ActionMenu,
275
- {
276
- groups: [
277
- {
278
- actions: [
279
- {
280
- icon: hasKit ? /* @__PURE__ */ jsx2(Component2, {}) : /* @__PURE__ */ jsx2(Buildings, {}),
281
- label: hasKit ? t("offers.detail.manageKit") : t("offers.actions.manage_inventory"),
282
- to: "inventory"
283
- }
284
- ]
285
- }
286
- ]
287
- }
288
- )
289
- ] }),
290
- inventoryItems.length === 0 ? /* @__PURE__ */ jsx2("div", { className: "px-6 py-8", children: /* @__PURE__ */ jsx2(Text, { size: "small", className: "text-ui-fg-subtle", children: t("offers.detail.noInventoryItems") }) }) : /* @__PURE__ */ jsx2(
291
- _DataTable,
292
- {
293
- table,
294
- columns,
295
- pageSize: PAGE_SIZE,
296
- count: inventoryItems.length,
297
- navigateTo: (row) => `/inventory/${row.id}`
298
- }
299
- )
300
- ]
301
- }
302
- );
303
- };
304
-
305
- // src/pages/offers/[id]/_components/offer-pricing-section.tsx
306
- import { CurrencyDollar } from "@medusajs/icons";
307
- import { Button, Container as Container3, Heading as Heading3 } from "@medusajs/ui";
308
- import { useState } from "react";
309
- import { useTranslation as useTranslation3 } from "react-i18next";
310
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
311
- var PAGE_STEP = 3;
312
- var hasRules = (price) => (price.rules_count ?? 0) > 0;
313
- var OfferPricingSection = ({ offer }) => {
314
- const { t } = useTranslation3();
315
- const prices = (offer.price_set?.prices ?? []).filter((p) => !hasRules(p)).sort((a, b) => (a.currency_code ?? "").localeCompare(b.currency_code ?? ""));
316
- const hasPrices = prices.length > 0;
317
- const [pageSize, setPageSize] = useState(PAGE_STEP);
318
- const displayPrices = prices.slice(0, pageSize);
319
- return /* @__PURE__ */ jsxs3(
320
- Container3,
321
- {
322
- className: "flex flex-col divide-y p-0",
323
- "data-testid": "offer-detail-prices-section",
324
- children: [
325
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
326
- /* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("labels.prices") }),
327
- /* @__PURE__ */ jsx3(
328
- ActionMenu,
329
- {
330
- groups: [
331
- {
332
- actions: [
333
- {
334
- label: t("actions.edit"),
335
- icon: /* @__PURE__ */ jsx3(CurrencyDollar, {}),
336
- to: "pricing"
337
- }
338
- ]
339
- }
340
- ]
341
- }
342
- )
343
- ] }),
344
- !hasPrices && /* @__PURE__ */ jsx3(NoRecords, { className: "h-60" }),
345
- displayPrices.map((price) => /* @__PURE__ */ jsxs3(
346
- "div",
347
- {
348
- className: "txt-small text-ui-fg-subtle flex justify-between px-6 py-4",
349
- children: [
350
- /* @__PURE__ */ jsx3("span", { className: "font-medium", children: price.currency_code.toUpperCase() }),
351
- /* @__PURE__ */ jsx3("span", { children: getLocaleAmount(price.amount, price.currency_code) })
352
- ]
353
- },
354
- price.id ?? `${price.currency_code}-${price.amount}`
355
- )),
356
- hasPrices && prices.length > PAGE_STEP && /* @__PURE__ */ jsx3("div", { className: "txt-small text-ui-fg-subtle flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx3(
357
- Button,
358
- {
359
- onClick: () => setPageSize((p) => p + PAGE_STEP),
360
- disabled: pageSize >= prices.length,
361
- className: "-mr-3 text-blue-500",
362
- variant: "transparent",
363
- children: t("actions.showMore")
364
- }
365
- ) })
366
- ]
367
- }
368
- );
369
- };
370
-
371
- // src/pages/offers/[id]/_components/offer-variant-section.tsx
372
- import { TriangleRightMini } from "@medusajs/icons";
373
- import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
374
- import { useTranslation as useTranslation4 } from "react-i18next";
375
- import { Link } from "react-router-dom";
376
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
377
- var OfferVariantSection = ({ offer }) => {
378
- const { t } = useTranslation4();
379
- const variant = offer.product_variant;
380
- if (!variant?.id) {
381
- return null;
382
- }
383
- const productId = variant.product_id ?? variant.product?.id;
384
- const link = productId ? `/products/${productId}/variants/${variant.id}` : null;
385
- const title = variant.product?.title ?? variant.title ?? variant.id;
386
- const subtitle = variant.title ?? "";
387
- const Inner = /* @__PURE__ */ jsx4(
388
- "div",
389
- {
390
- className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors",
391
- "data-testid": "offer-detail-variant",
392
- children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
393
- /* @__PURE__ */ jsx4(
394
- "div",
395
- {
396
- className: "shadow-elevation-card-rest rounded-md",
397
- "data-testid": "offer-detail-variant-thumbnail",
398
- children: /* @__PURE__ */ jsx4(Thumbnail, { src: variant.product?.thumbnail ?? null })
399
- }
400
- ),
401
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col", children: [
402
- /* @__PURE__ */ jsx4(
403
- "span",
404
- {
405
- className: "text-ui-fg-base font-medium",
406
- "data-testid": "offer-detail-variant-title",
407
- children: title
408
- }
409
- ),
410
- /* @__PURE__ */ jsx4(
411
- "span",
412
- {
413
- className: "text-ui-fg-subtle",
414
- "data-testid": "offer-detail-variant-subtitle",
415
- children: subtitle
416
- }
417
- )
418
- ] }),
419
- /* @__PURE__ */ jsx4("div", { className: "size-7 flex items-center justify-center", children: /* @__PURE__ */ jsx4(TriangleRightMini, { className: "text-ui-fg-muted rtl:rotate-180" }) })
420
- ] })
421
- }
422
- );
423
- return /* @__PURE__ */ jsxs4(Container4, { className: "p-0", "data-testid": "offer-detail-variant-section", children: [
424
- /* @__PURE__ */ jsx4("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t("offers.detail.productVariant") }) }),
425
- /* @__PURE__ */ jsx4("div", { className: "txt-small flex flex-col gap-2 px-2 pb-2", children: link ? /* @__PURE__ */ jsx4(
426
- Link,
427
- {
428
- to: link,
429
- className: "outline-none focus-within:shadow-borders-interactive-with-focus rounded-md [&:hover>div]:bg-ui-bg-component-hover",
430
- "data-testid": "offer-detail-variant-link",
431
- children: Inner
432
- }
433
- ) : /* @__PURE__ */ jsx4("div", { children: Inner }) })
434
- ] });
435
- };
436
-
437
- // src/pages/offers/[id]/offer-detail-page.tsx
438
- import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
439
- var Root = ({ children }) => {
440
- const { id } = useParams();
441
- const initialData = useLoaderData();
442
- const {
443
- offer,
444
- isPending: isLoading,
445
- isError,
446
- error
447
- } = useOffer(
448
- id,
449
- { fields: OFFER_DETAIL_FIELDS },
450
- { initialData }
451
- );
452
- if (isError) {
453
- throw error;
454
- }
455
- if (isLoading || !offer) {
456
- return /* @__PURE__ */ jsx5(
457
- TwoColumnPageSkeleton,
458
- {
459
- mainSections: 2,
460
- sidebarSections: 2
461
- }
462
- );
463
- }
464
- const typedOffer = offer;
465
- return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: typedOffer, hasOutlet: true, children: [
466
- /* @__PURE__ */ jsxs5(TwoColumnPage.Main, { children: [
467
- /* @__PURE__ */ jsx5(OfferGeneralSection, { offer: typedOffer }),
468
- /* @__PURE__ */ jsx5(OfferInventorySection, { offer: typedOffer })
469
- ] }),
470
- /* @__PURE__ */ jsxs5(TwoColumnPage.Sidebar, { children: [
471
- /* @__PURE__ */ jsx5(OfferVariantSection, { offer: typedOffer }),
472
- /* @__PURE__ */ jsx5(OfferPricingSection, { offer: typedOffer })
473
- ] })
474
- ] }) });
475
- };
476
- var OfferDetailPage = Object.assign(Root, {
477
- Main: TwoColumnPage.Main,
478
- Sidebar: TwoColumnPage.Sidebar,
479
- General: OfferGeneralSection,
480
- Inventory: OfferInventorySection,
481
- Variant: OfferVariantSection,
482
- Pricing: OfferPricingSection
483
- });
484
- var Component3 = Root;
485
- export {
486
- Component3 as Component,
487
- OfferDetailPage
488
- };
@@ -1,151 +0,0 @@
1
- import {
2
- OFFER_DETAIL_FIELDS
3
- } from "./chunk-RXZFEFNV.js";
4
- import "./chunk-TKGWSUEI.js";
5
- import {
6
- KeyboundForm
7
- } from "./chunk-U2ZFCAPX.js";
8
- import {
9
- RouteDrawer,
10
- useRouteModal
11
- } from "./chunk-GDWBOQI5.js";
12
- import {
13
- Form
14
- } from "./chunk-3QSRE5LS.js";
15
- import {
16
- useShippingProfiles
17
- } from "./chunk-IQWK723D.js";
18
- import {
19
- useOffer,
20
- useUpdateOffer
21
- } from "./chunk-UORPTGV2.js";
22
- import {
23
- useDocumentDirection
24
- } from "./chunk-Y7QKP6QU.js";
25
- import "./chunk-RHKRREUU.js";
26
- import "./chunk-ZA2KFUFR.js";
27
- import "./chunk-RIN4CBRB.js";
28
- import "./chunk-NBMM2TZK.js";
29
-
30
- // src/pages/offers/[id]/edit/offer-edit-page.tsx
31
- import { Heading } from "@medusajs/ui";
32
- import { useTranslation as useTranslation2 } from "react-i18next";
33
- import { useParams } from "react-router-dom";
34
-
35
- // src/pages/offers/[id]/edit/edit-offer-form/edit-offer-form.tsx
36
- import { zodResolver } from "@hookform/resolvers/zod";
37
- import { Button, Input, Select, toast } from "@medusajs/ui";
38
- import { useForm } from "react-hook-form";
39
- import { useTranslation } from "react-i18next";
40
-
41
- // src/pages/offers/[id]/edit/edit-offer-form/schema.ts
42
- import { z } from "zod";
43
- var EditOfferSchema = z.object({
44
- sku: z.string().min(1).max(64),
45
- shipping_profile_id: z.string().min(1),
46
- metadata: z.record(z.string(), z.unknown()).nullish()
47
- });
48
-
49
- // src/pages/offers/[id]/edit/edit-offer-form/edit-offer-form.tsx
50
- import { jsx, jsxs } from "react/jsx-runtime";
51
- var EditOfferForm = ({ offer }) => {
52
- const { t } = useTranslation();
53
- const dir = useDocumentDirection();
54
- const { handleSuccess } = useRouteModal();
55
- const { shipping_profiles } = useShippingProfiles({ limit: 1e3 });
56
- const form = useForm({
57
- defaultValues: {
58
- sku: offer.sku ?? "",
59
- shipping_profile_id: offer.shipping_profile_id ?? "",
60
- metadata: offer.metadata ?? null
61
- },
62
- resolver: zodResolver(EditOfferSchema)
63
- });
64
- const { mutateAsync, isPending } = useUpdateOffer(offer.id);
65
- const handleSubmit = form.handleSubmit(async (values) => {
66
- await mutateAsync(
67
- {
68
- sku: values.sku,
69
- shipping_profile_id: values.shipping_profile_id,
70
- metadata: values.metadata ?? void 0
71
- },
72
- {
73
- onSuccess: () => {
74
- toast.success(t("offers.edit.successToast"));
75
- handleSuccess();
76
- },
77
- onError: (error) => toast.error(error.message)
78
- }
79
- );
80
- });
81
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
82
- KeyboundForm,
83
- {
84
- onSubmit: handleSubmit,
85
- className: "flex flex-1 flex-col overflow-hidden",
86
- "data-testid": "offer-edit-form",
87
- children: [
88
- /* @__PURE__ */ jsxs(RouteDrawer.Body, { className: "flex flex-1 flex-col gap-y-4 overflow-auto", children: [
89
- /* @__PURE__ */ jsx(
90
- Form.Field,
91
- {
92
- control: form.control,
93
- name: "sku",
94
- render: ({ field }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
95
- /* @__PURE__ */ jsx(Form.Label, { children: t("offers.fields.sku") }),
96
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { maxLength: 64, autoComplete: "off", ...field }) }),
97
- /* @__PURE__ */ jsx(Form.ErrorMessage, {})
98
- ] })
99
- }
100
- ),
101
- /* @__PURE__ */ jsx(
102
- Form.Field,
103
- {
104
- control: form.control,
105
- name: "shipping_profile_id",
106
- render: ({ field: { ref: _r, onChange, ...f } }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
107
- /* @__PURE__ */ jsx(Form.Label, { children: t("offers.fields.shippingProfile") }),
108
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsxs(Select, { ...f, onValueChange: onChange, dir, children: [
109
- /* @__PURE__ */ jsx(Select.Trigger, { ref: _r, children: /* @__PURE__ */ jsx(Select.Value, {}) }),
110
- /* @__PURE__ */ jsx(Select.Content, { children: (shipping_profiles ?? []).map((p) => /* @__PURE__ */ jsx(Select.Item, { value: p.id, children: p.name }, p.id)) })
111
- ] }) }),
112
- /* @__PURE__ */ jsx(Form.ErrorMessage, {})
113
- ] })
114
- }
115
- )
116
- ] }),
117
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
118
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
119
- /* @__PURE__ */ jsx(Button, { type: "submit", size: "small", isLoading: isPending, children: t("actions.save") })
120
- ] }) })
121
- ]
122
- }
123
- ) });
124
- };
125
-
126
- // src/pages/offers/[id]/edit/offer-edit-page.tsx
127
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
128
- var OfferEditPage = () => {
129
- const { id } = useParams();
130
- const { t } = useTranslation2();
131
- const {
132
- offer,
133
- isPending,
134
- isError,
135
- error
136
- } = useOffer(id, { fields: OFFER_DETAIL_FIELDS });
137
- if (isError) throw error;
138
- const ready = !isPending && !!offer;
139
- return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
140
- /* @__PURE__ */ jsxs2(RouteDrawer.Header, { children: [
141
- /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("offers.edit.header") }) }),
142
- /* @__PURE__ */ jsx2(RouteDrawer.Description, { className: "sr-only", children: t("offers.edit.description") })
143
- ] }),
144
- ready && /* @__PURE__ */ jsx2(EditOfferForm, { offer })
145
- ] });
146
- };
147
- var Component = OfferEditPage;
148
- export {
149
- Component,
150
- OfferEditPage
151
- };
@@ -1,32 +0,0 @@
1
- import {
2
- OfferListPage
3
- } from "./chunk-GKZHBXZK.js";
4
- import "./chunk-CFRWIQIZ.js";
5
- import "./chunk-RXZFEFNV.js";
6
- import "./chunk-5ATEALH7.js";
7
- import "./chunk-FQERBIVS.js";
8
- import "./chunk-DB6ANJBO.js";
9
- import "./chunk-PHOCVOZ5.js";
10
- import "./chunk-AIF2KTEE.js";
11
- import "./chunk-YN3FGNJM.js";
12
- import "./chunk-KAZ5BYTQ.js";
13
- import "./chunk-3EF54XFY.js";
14
- import "./chunk-YV6MK4PZ.js";
15
- import "./chunk-LRD242C7.js";
16
- import "./chunk-QHQWEERJ.js";
17
- import "./chunk-THHRRYRS.js";
18
- import "./chunk-DZIXC7OE.js";
19
- import "./chunk-WIYFXWRI.js";
20
- import "./chunk-INNFZYX2.js";
21
- import "./chunk-IQWK723D.js";
22
- import "./chunk-UORPTGV2.js";
23
- import "./chunk-BDGZ4EQO.js";
24
- import "./chunk-LAVHRER2.js";
25
- import "./chunk-Y7QKP6QU.js";
26
- import "./chunk-RHKRREUU.js";
27
- import "./chunk-ZA2KFUFR.js";
28
- import "./chunk-RIN4CBRB.js";
29
- import "./chunk-NBMM2TZK.js";
30
- export {
31
- OfferListPage
32
- };