@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.
- package/dist/{[id]-KRLGIVLR.js → [id]-3JICOSAI.js} +133 -41
- package/dist/[id]-CR76L5TG.js +3102 -0
- package/dist/{[id]-7BAKUHUO.js → [id]-DDGHFRSB.js} +5 -5
- package/dist/{[id]-KVWYLDN3.js → [id]-E7DYRMMO.js} +162 -71
- package/dist/{[id]-4OBGG7OH.js → [id]-FIP4UMQ4.js} +197 -105
- package/dist/{[id]-3EC6HYXL.js → [id]-FZRXOJWL.js} +22 -21
- package/dist/{[id]-ZWWMJAKI.js → [id]-PD3ISUL5.js} +7 -7
- package/dist/{[id]-UUUQK22M.js → [id]-Q5AXQ5XO.js} +460 -581
- package/dist/{[id]-KJIQTFGE.js → [id]-VSNA6SV5.js} +15 -15
- package/dist/{[id]-Y2ISCLUD.js → [id]-XUKQKCDN.js} +3 -3
- package/dist/{[id]-K2CT7BXQ.js → [id]-YPCO3DJV.js} +1 -1
- package/dist/{[id]-LUFRJLAU.js → [id]-ZEFQ7FQQ.js} +36 -33
- package/dist/{[id]-COLO4TQJ.js → [id]-ZW7TBWDU.js} +24 -23
- package/dist/{[province_id]-H2QAPKVH.js → [province_id]-CHOO7ERP.js} +14 -14
- package/dist/{add-FIWTANZX.js → add-GYXNRUAE.js} +40 -37
- package/dist/{add-PBZQCIZQ.js → add-IC5R27X3.js} +95 -32
- package/dist/{add-customer-groups-RAHCP67U.js → add-customer-groups-KIGBZT5G.js} +20 -23
- package/dist/{add-products-N3V2MVLD.js → add-products-ALJVIFXU.js} +23 -22
- package/dist/{add-promotions-CSCAJZHV.js → add-promotions-EQ5MMQKG.js} +8 -8
- package/dist/{add-to-campaign-DLP7PSQB.js → add-to-campaign-C6JDNB6F.js} +4 -4
- package/dist/{address-7F5SN7PV.js → address-UKLDTSTP.js} +13 -13
- package/dist/{adjust-inventory-SZF4W7LR.js → adjust-inventory-5XPGE44Y.js} +2 -2
- package/dist/allocate-items-URVRAFPS.js +685 -0
- package/dist/{areas-7Y6BVS5A.js → areas-64VXOFYS.js} +6 -6
- package/dist/{attributes-MBZ76HVZ.js → attributes-YQNW5JBY.js} +2 -2
- package/dist/{breadcrumb-HND5FFWC.js → breadcrumb-26G7BS3Q.js} +3 -3
- package/dist/{breadcrumb-7PURSRTT.js → breadcrumb-2AYN2SV7.js} +12 -12
- package/dist/{breadcrumb-ZCG2RHIU.js → breadcrumb-4KKLMVC3.js} +12 -12
- package/dist/{breadcrumb-WRG4SITG.js → breadcrumb-4XSHX5RV.js} +13 -13
- package/dist/{breadcrumb-QV2IAX7N.js → breadcrumb-E5OF4L2J.js} +2 -2
- package/dist/breadcrumb-JC5FUQYF.js +28 -0
- package/dist/{breadcrumb-YBBYFQYG.js → breadcrumb-LBO2I4OJ.js} +1 -1
- package/dist/breadcrumb-PIDJ23EZ.js +13 -0
- package/dist/{breadcrumb-65SAGUUL.js → breadcrumb-RWYEU5JK.js} +3 -3
- package/dist/{breadcrumb-VWELWDB2.js → breadcrumb-VXKAO6GP.js} +1 -1
- package/dist/{breadcrumb-FLDHJRVY.js → breadcrumb-WMNG4P6C.js} +9 -8
- package/dist/{breadcrumb-EDPMEN2P.js → breadcrumb-XPQETVMM.js} +2 -2
- package/dist/{campaigns-L6ULR6KR.js → campaigns-4I2T6EDZ.js} +5 -5
- package/dist/{categories-FUZQKBXV.js → categories-3P2DRH5V.js} +10 -8
- package/dist/{chunk-EZ3JOAUS.js → chunk-22CIYLKO.js} +1 -1
- package/dist/{chunk-RZLN2Q6G.js → chunk-247L47JD.js} +1 -1
- package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
- package/dist/{chunk-M7KSRYRI.js → chunk-2ECD67FO.js} +2 -2
- package/dist/{chunk-36L54SQQ.js → chunk-2H4FGZ4U.js} +1 -1
- package/dist/{chunk-X2FVFUET.js → chunk-2NUZTTBU.js} +27 -8
- package/dist/chunk-2OY4NW7L.js +185 -0
- package/dist/{chunk-K4X324QP.js → chunk-36WXPGD2.js} +6 -5
- package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
- package/dist/chunk-3EDZQSKG.js +33 -0
- package/dist/{chunk-2DXNJURE.js → chunk-3L2DVCOC.js} +1 -1
- package/dist/chunk-42R54Z2X.js +8 -0
- package/dist/{chunk-CNMY5HVP.js → chunk-4EQIJMQT.js} +3 -3
- package/dist/{chunk-UAF2S447.js → chunk-4OIOYUQE.js} +3 -3
- package/dist/{chunk-UORPTGV2.js → chunk-4R5GESED.js} +10 -14
- package/dist/{chunk-WUPJADSO.js → chunk-4RFPRO2W.js} +2 -2
- package/dist/chunk-4YWKKCTT.js +32 -0
- package/dist/{chunk-XFQJU6FA.js → chunk-5QG6P6EU.js} +1 -1
- package/dist/{chunk-N4MVIBFM.js → chunk-5Y6RDTW2.js} +3 -3
- package/dist/{chunk-DZIXC7OE.js → chunk-6FLSBL4Q.js} +30 -85
- package/dist/{chunk-DVEKYLPV.js → chunk-6QS6IZC6.js} +1 -1
- package/dist/chunk-6ZGQ3SOR.js +127 -0
- package/dist/{chunk-NXNJQZCP.js → chunk-7FIPNQM2.js} +1 -1
- package/dist/{chunk-NSZQERLE.js → chunk-7GGWRJJF.js} +2 -2
- package/dist/{chunk-QS6RWIBL.js → chunk-7RGUD6PI.js} +34 -20
- package/dist/{chunk-5L2DCA4W.js → chunk-7ZPJGL4C.js} +57 -6
- package/dist/{chunk-KD7RYE6R.js → chunk-AG6KIAUD.js} +2 -2
- package/dist/{chunk-UCQKXXLD.js → chunk-AKKIZD2P.js} +32 -34
- package/dist/chunk-CHBURL76.js +438 -0
- package/dist/{chunk-PBD36EZJ.js → chunk-CI4YXVQF.js} +2 -2
- package/dist/{chunk-7LBY5JLV.js → chunk-DAV7WS53.js} +1 -1
- package/dist/{chunk-6BS2AVGJ.js → chunk-DNXMONCL.js} +6 -6
- package/dist/{chunk-TNVYTMBL.js → chunk-E4O5PARZ.js} +4 -4
- package/dist/{chunk-L7QKFC5N.js → chunk-E6W57UP3.js} +32 -122
- package/dist/chunk-EEBJYXWA.js +15 -0
- package/dist/chunk-FP6U6BPH.js +61 -0
- package/dist/{chunk-SGR4DMCW.js → chunk-FRYZRBLA.js} +1 -1
- package/dist/chunk-FWPGOIFA.js +22 -0
- package/dist/chunk-GL7F6NDU.js +30 -0
- package/dist/chunk-H7BVANDX.js +407 -0
- package/dist/{chunk-FDR22JMM.js → chunk-HFRHHT36.js} +8 -63
- package/dist/{chunk-FJUUGFXL.js → chunk-HOUDNM5M.js} +1 -1
- package/dist/{chunk-6Y53VZ3C.js → chunk-HZCSJLGH.js} +11 -11
- package/dist/chunk-I75SROQZ.js +315 -0
- package/dist/{chunk-JQV7CXEC.js → chunk-II3ACSV2.js} +17 -2
- package/dist/{chunk-DARJTN4I.js → chunk-IMJ62GAP.js} +10 -5
- package/dist/{chunk-PPLC4IKI.js → chunk-IV57G2CB.js} +14 -1
- package/dist/{chunk-7SLWXX6L.js → chunk-J434WDD3.js} +5 -6
- package/dist/chunk-J6XCRFBW.js +30 -0
- package/dist/{chunk-KAZ5BYTQ.js → chunk-KCHYLLVG.js} +6 -4
- package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
- package/dist/{chunk-GXIAIITP.js → chunk-KZYRC3WR.js} +36 -39
- package/dist/chunk-L57USMYC.js +39 -0
- package/dist/chunk-LFX6WU4A.js +36 -0
- package/dist/{chunk-EROX26D4.js → chunk-LRMWYKSF.js} +1 -1
- package/dist/{chunk-LWJF63JW.js → chunk-LTQQRVZG.js} +89 -14
- package/dist/chunk-LYYM7H7H.js +59 -0
- package/dist/{chunk-NHFEY3EI.js → chunk-M3YUT5AY.js} +2 -2
- package/dist/{chunk-H6LZ77GX.js → chunk-MJCL3WID.js} +1 -1
- package/dist/{chunk-X4INVIWL.js → chunk-MZRZVLWD.js} +3 -3
- package/dist/{chunk-DDH7ULIQ.js → chunk-N6MGVXXQ.js} +1 -1
- package/dist/{chunk-QXLRABYH.js → chunk-O7VOGTLX.js} +1 -1
- package/dist/{chunk-35G3SZRN.js → chunk-P3SOE76R.js} +1 -1
- package/dist/{chunk-PZ44R4AS.js → chunk-P7Q5ZSZD.js} +1 -1
- package/dist/{chunk-5ATEALH7.js → chunk-PFJFS3F4.js} +1 -5
- package/dist/chunk-POOTMH3K.js +62 -0
- package/dist/{chunk-GGWUWT55.js → chunk-QJI4OET7.js} +23 -36
- package/dist/{chunk-NJMNYS7G.js → chunk-QS35HWC5.js} +1 -1
- package/dist/{chunk-RTBNJQOV.js → chunk-R4JLYNUA.js} +419 -538
- package/dist/{chunk-DIW4GRTI.js → chunk-RT3G3GEK.js} +47 -31
- package/dist/{chunk-QT7YFHCA.js → chunk-S23FD6FA.js} +12 -0
- package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
- package/dist/chunk-SPFLYPY6.js +6 -0
- package/dist/{chunk-EIUYXS7E.js → chunk-SZBERGA4.js} +1 -1
- package/dist/chunk-T6DSYOY5.js +173 -0
- package/dist/{chunk-4LVP635F.js → chunk-TKSKCYM3.js} +128 -126
- package/dist/{chunk-QNNJN4H6.js → chunk-TSTUAL6N.js} +59 -0
- package/dist/{chunk-LNM2D2I4.js → chunk-TZMNEN7A.js} +7 -6
- package/dist/chunk-UM7ZR3VU.js +14 -0
- package/dist/{chunk-X22KTLZ7.js → chunk-UO6IX5Y7.js} +1 -1
- package/dist/chunk-VCUUITW6.js +35 -0
- package/dist/{chunk-LQD232FW.js → chunk-WJ5EU3KW.js} +1 -1
- package/dist/{chunk-AIF2KTEE.js → chunk-WKRW5OPL.js} +12 -2
- package/dist/{chunk-6YA3C4NB.js → chunk-XBKWFLJG.js} +4 -13
- package/dist/{chunk-WBHFU3MG.js → chunk-XJYQ4SW5.js} +2 -2
- package/dist/chunk-XQUF3WIS.js +159 -0
- package/dist/chunk-YBF45CX5.js +23 -0
- package/dist/{chunk-AVOIZO63.js → chunk-YQZBAP3S.js} +4 -2
- package/dist/chunk-ZHFFTT3I.js +17 -0
- package/dist/{chunk-TODJFRLH.js → chunk-ZHR77OQI.js} +2 -2
- package/dist/chunk-ZUHIKMQL.js +353 -0
- package/dist/{chunk-44RQ5PTN.js → chunk-ZZIJSTXN.js} +225 -90
- package/dist/{collections-YCAAFGSW.js → collections-7M7O23NO.js} +28 -26
- package/dist/{configuration-UOSNP45I.js → configuration-5IDQRYJQ.js} +4 -4
- package/dist/{configuration-C4IGBNXH.js → configuration-TXRAYMI4.js} +1 -1
- package/dist/{create-BJ4OO6LS.js → create-2N73Y6FO.js} +14 -14
- package/dist/{create-R7K3ECN6.js → create-3MUVY3UY.js} +1 -1
- package/dist/{create-SFU3W3ZH.js → create-6DRXGPYA.js} +1 -1
- package/dist/{create-XAD5NMSJ.js → create-6KM5AZCG.js} +20 -20
- package/dist/{create-YDDBH4VQ.js → create-A6CPQMMH.js} +27 -26
- package/dist/create-B4EWCX7X.js +1798 -0
- package/dist/{create-YBF4YGWG.js → create-BHSMHOFN.js} +1 -1
- package/dist/{create-XVHOCZHJ.js → create-BVUZWMET.js} +1 -1
- package/dist/create-CJEZCYN6.js +1179 -0
- package/dist/create-DAVMJNC2.js +1931 -0
- package/dist/{create-35MYQPVM.js → create-E4HTVPP7.js} +17 -17
- package/dist/{create-JDGM5KXE.js → create-G4TF2M7G.js} +88 -42
- package/dist/{create-UQNYMVBM.js → create-LOP7AF5N.js} +6 -6
- package/dist/{create-UPYB65PD.js → create-MKFDE32U.js} +1 -1
- package/dist/{create-B5ZXTK3K.js → create-NR7ULWQS.js} +37 -34
- package/dist/{create-HI5UI2EZ.js → create-SJSLOXOW.js} +31 -26
- package/dist/{create-GB3ZA4LH.js → create-SYI6DVKM.js} +4 -4
- package/dist/{create-ORXYT74H.js → create-ZAGMLDR4.js} +13 -13
- package/dist/create-ZP4LSJYQ.js +216 -0
- package/dist/customer-group-add-customers-GTM556QA.js +251 -0
- package/dist/customer-group-create-OYHAXX2T.js +140 -0
- package/dist/customer-group-detail-KW62TLWA.js +58 -0
- package/dist/customer-group-edit-WH7O4N4L.js +137 -0
- package/dist/customer-groups-UJFZBZ2B.js +276 -0
- package/dist/{customers-ETXVNM3G.js → customers-4WKIFPUU.js} +7 -7
- package/dist/{edit-UGEC27HP.js → edit-3EN2H52W.js} +39 -36
- package/dist/{edit-ZMERG3L7.js → edit-3VNT35DW.js} +1 -1
- package/dist/{edit-ORXS3A2Y.js → edit-6DUTTLEV.js} +1 -1
- package/dist/edit-6K3NSVI7.js +103 -0
- package/dist/{edit-REDDBLTA.js → edit-6Z6RIJRZ.js} +4 -4
- package/dist/{edit-2Q7TRUTL.js → edit-CVSO5CX7.js} +14 -14
- package/dist/{edit-ZAHCMF5U.js → edit-FQDSESVI.js} +1 -1
- package/dist/edit-GZXLWSTL.js +176 -0
- package/dist/edit-LLNKSZR4.js +871 -0
- package/dist/{edit-O4JLGKQR.js → edit-MKVDAUA5.js} +1 -1
- package/dist/{edit-ZCXUG42Q.js → edit-NDUSRTWY.js} +13 -13
- package/dist/{edit-522DG3BY.js → edit-RBREBAQQ.js} +1 -1
- package/dist/{edit-Q3UQIOLS.js → edit-RQHOHZR6.js} +1 -1
- package/dist/{edit-VKT62KHG.js → edit-SAB6F3ZG.js} +36 -15
- package/dist/{edit-C4OCKQVU.js → edit-SM2GHVKW.js} +1 -1
- package/dist/{edit-KAKVPHZZ.js → edit-UVY3TEHD.js} +1 -1
- package/dist/{edit-SGUY2CCK.js → edit-V7WLYLOQ.js} +16 -16
- package/dist/{edit-FKXIQ6ZI.js → edit-XMZSLH4O.js} +16 -16
- package/dist/{edit-L5ZZLMAY.js → edit-YTS77SJS.js} +43 -32
- package/dist/{edit-budget-L3CCEWNF.js → edit-budget-4JMGEPNF.js} +1 -1
- package/dist/{edit-inventory-item-6B7ITDGD.js → edit-inventory-item-G22KFCYY.js} +2 -2
- package/dist/{edit-inventory-item-attributes-Y7MQZLXI.js → edit-inventory-item-attributes-RJSM4MEI.js} +2 -2
- package/dist/edit-price-K6K2FTMF.js +196 -0
- package/dist/edit-stock-6TUSJD5R.js +229 -0
- package/dist/fulfillment-VEF6HG6D.js +641 -0
- package/dist/{fulfillment-providers-DQAU43JZ.js → fulfillment-providers-VKBWFH45.js} +24 -24
- package/dist/index.css +107 -10
- package/dist/index.js +302 -183
- package/dist/{inventory-KAUVPMPZ.js → inventory-OCIGVZ4V.js} +6 -6
- package/dist/{offer-inventory-batch-page-WKCWNDNK.js → inventory-T7BRSFKY.js} +16 -16
- package/dist/{invite-CI2P4GF6.js → invite-J6L3Q7MQ.js} +12 -12
- package/dist/{invite-Q6EYDZVQ.js → invite-VWNUFOFI.js} +21 -21
- package/dist/loader-2EQ4ROTD.js +34 -0
- package/dist/loader-HYUC2XZX.js +33 -0
- package/dist/{login-KY342RMK.js → login-WOZMCEFY.js} +12 -12
- package/dist/{manage-locations-WNHEBS3A.js → manage-locations-R3ASMF5B.js} +1 -1
- package/dist/{media-B6ME2WXY.js → media-KIIJ6WSZ.js} +18 -17
- package/dist/media-RJHUSBXL.js +315 -0
- package/dist/{metadata-WR4RFXO5.js → metadata-45S6CFKY.js} +14 -14
- package/dist/{metadata-2CMH4I6U.js → metadata-FCATUWIZ.js} +14 -14
- package/dist/{metadata-GWI6R4ES.js → metadata-L5GBBXC4.js} +14 -14
- package/dist/{metadata-TLDUF5KV.js → metadata-R4ZRMAO6.js} +14 -14
- package/dist/{metadata-NUXUC2JA.js → metadata-RM5VVAOS.js} +14 -14
- package/dist/{offer-create-page-4Z6L63BU.js → offer-create-page-DV4JCIL2.js} +190 -195
- package/dist/offer-detail-page-TIBYGQBS.js +590 -0
- package/dist/offer-variant-detail-page-ORH56HZI.js +421 -0
- package/dist/offers-VA63KV3C.js +54 -0
- package/dist/{onboarding-43LQQQGQ.js → onboarding-L5RRKT65.js} +12 -12
- package/dist/{orders-ZV4D6L2V.js → orders-KKJD6EWZ.js} +27 -27
- package/dist/{organization-ZTQGRJWS.js → organization-6YPU2RQP.js} +53 -89
- package/dist/{organize-K6QMAMEN.js → organize-LR7FWK2J.js} +3 -3
- package/dist/{organize-HNJUHEEG.js → organize-SUG4SGVR.js} +3 -3
- package/dist/pages/index.d.ts +40 -16
- package/dist/pages/index.js +73 -73
- package/dist/{payment-details-64US5XWD.js → payment-details-UVEIHQA5.js} +13 -13
- package/dist/{payouts-UXJDTXDL.js → payouts-D4A4CILI.js} +8 -8
- package/dist/{price-lists-KBPUVSZI.js → price-lists-WJFXFGEV.js} +10 -10
- package/dist/{pricing-DF6C5XK4.js → pricing-QEVR2Z4K.js} +19 -19
- package/dist/{offer-pricing-edit-page-4TYGGSOE.js → pricing-XJUUCYL5.js} +24 -18
- package/dist/{product-tags-6MZB4W5R.js → product-tags-MW2JMRFY.js} +36 -33
- package/dist/{product-types-UUHBV4IZ.js → product-types-XXU7X42K.js} +6 -6
- package/dist/product-variant-detail-XZWTSH3H.js +369 -0
- package/dist/{product-variant-edit-YYNPHE4L.js → product-variant-edit-A2KO3E7B.js} +41 -44
- package/dist/{products-MZBU5MEV.js → products-TZS2OPK3.js} +37 -37
- package/dist/{products-IWKTGZS6.js → products-XSXEUKIB.js} +23 -22
- package/dist/{professional-details-5T2VS6MM.js → professional-details-ELUEJPOH.js} +13 -13
- package/dist/{profile-6XGHAT7H.js → profile-EDVGIBW6.js} +16 -16
- package/dist/{promotions-O7U4BTK6.js → promotions-JYO23G6N.js} +8 -8
- package/dist/receive-47SMYKIJ.js +578 -0
- package/dist/refund-IU7B77FV.js +268 -0
- package/dist/{register-N6WOSMLA.js → register-SR2SYX4Q.js} +14 -14
- package/dist/{reset-password-EICPAY2N.js → reset-password-N22YRMR3.js} +1 -1
- package/dist/{return-reasons-IX3LIOCU.js → return-reasons-POR5YPTF.js} +18 -15
- package/dist/{sales-channels-JW3QUYR7.js → sales-channels-ETB6QRRY.js} +8 -8
- package/dist/{sales-channels-B6FULRWI.js → sales-channels-YXRRARDL.js} +7 -7
- package/dist/{settings-MV53ZZ53.js → settings-MHBYIZ2I.js} +38 -35
- package/dist/shipment-ZX6PQ32L.js +241 -0
- package/dist/shipping-W4SPR3JO.js +122 -0
- package/dist/{shipping-profile-Y4SNEPZX.js → shipping-profile-L5CFXVEE.js} +4 -8
- package/dist/{shipping-profiles-2NWKCEJK.js → shipping-profiles-QBJUWXVQ.js} +17 -17
- package/dist/{stock-7CSVEJJU.js → stock-FW4DOVFV.js} +14 -14
- package/dist/{store-X23G3JCJ.js → store-NWWBV2UO.js} +75 -144
- package/dist/{store-closure-P5PD2RSV.js → store-closure-O3CBSOJD.js} +19 -14
- package/dist/{store-select-TREPDS3G.js → store-select-C7GI5MKK.js} +13 -13
- package/dist/{tax-regions-YXZW7UVX.js → tax-regions-2JCIB4T7.js} +2 -2
- package/dist/{team-SPP5OY5W.js → team-MY24J5WO.js} +20 -20
- package/package.json +2 -2
- package/dist/[id]-LTNOHLGE.js +0 -1219
- package/dist/allocate-items-SDFS5GYN.js +0 -533
- package/dist/chunk-432S4FGR.js +0 -0
- package/dist/chunk-AIZM66CG.js +0 -66
- package/dist/chunk-BDZOSMAX.js +0 -23
- package/dist/chunk-CFRWIQIZ.js +0 -43
- package/dist/chunk-GKZHBXZK.js +0 -426
- package/dist/chunk-RXZFEFNV.js +0 -73
- package/dist/chunk-T6LHVNWO.js +0 -27
- package/dist/chunk-WLT7K7K7.js +0 -63
- package/dist/create-FCKGCZSM.js +0 -210
- package/dist/edit-GQNIINRR.js +0 -192
- package/dist/fulfillment-75Z4H23W.js +0 -559
- package/dist/loader-FBB5OQRT.js +0 -31
- package/dist/metadata-5BPOBBU2.js +0 -45
- package/dist/offer-detail-page-6MAHNNIO.js +0 -488
- package/dist/offer-edit-page-DYQFU6JU.js +0 -151
- package/dist/offers-ZG6OTDZ2.js +0 -32
- package/dist/product-variant-detail-RVWEYVPC.js +0 -220
- package/dist/shipment-Q33QBMXX.js +0 -176
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SectionRow
|
|
3
|
+
} from "./chunk-4TLP3TAA.js";
|
|
4
|
+
import {
|
|
5
|
+
ActionMenu
|
|
6
|
+
} from "./chunk-BDGZ4EQO.js";
|
|
7
|
+
import {
|
|
8
|
+
useDeleteProduct,
|
|
9
|
+
useUpdateProduct
|
|
10
|
+
} from "./chunk-TSTUAL6N.js";
|
|
11
|
+
|
|
12
|
+
// src/pages/products/[id]/_components/product-media-section/product-media-section.tsx
|
|
13
|
+
import { useState } from "react";
|
|
14
|
+
import { PencilSquare, ThumbnailBadge } from "@medusajs/icons";
|
|
15
|
+
import {
|
|
16
|
+
Button,
|
|
17
|
+
Checkbox,
|
|
18
|
+
clx,
|
|
19
|
+
CommandBar,
|
|
20
|
+
Container,
|
|
21
|
+
Heading,
|
|
22
|
+
Text,
|
|
23
|
+
Tooltip,
|
|
24
|
+
usePrompt
|
|
25
|
+
} from "@medusajs/ui";
|
|
26
|
+
import { useTranslation } from "react-i18next";
|
|
27
|
+
import { Link } from "react-router-dom";
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
var ProductMediaSection = ({
|
|
30
|
+
product,
|
|
31
|
+
readOnly = false
|
|
32
|
+
}) => {
|
|
33
|
+
const { t } = useTranslation();
|
|
34
|
+
const prompt = usePrompt();
|
|
35
|
+
const [selection, setSelection] = useState({});
|
|
36
|
+
const media = getMedia(product);
|
|
37
|
+
const handleCheckedChange = (id) => {
|
|
38
|
+
setSelection((prev) => {
|
|
39
|
+
if (prev[id]) {
|
|
40
|
+
const { [id]: _, ...rest } = prev;
|
|
41
|
+
return rest;
|
|
42
|
+
} else {
|
|
43
|
+
return { ...prev, [id]: true };
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const { mutateAsync } = useUpdateProduct(product.id);
|
|
48
|
+
const handleDelete = async () => {
|
|
49
|
+
const ids = Object.keys(selection);
|
|
50
|
+
const includingThumbnail = ids.some((id) => media.find((m) => m.id === id)?.isThumbnail);
|
|
51
|
+
const res = await prompt({
|
|
52
|
+
title: t("general.areYouSure"),
|
|
53
|
+
description: includingThumbnail ? t("products.media.deleteWarningWithThumbnail", {
|
|
54
|
+
count: ids.length
|
|
55
|
+
}) : t("products.media.deleteWarning", {
|
|
56
|
+
count: ids.length
|
|
57
|
+
}),
|
|
58
|
+
confirmText: t("actions.delete"),
|
|
59
|
+
cancelText: t("actions.cancel")
|
|
60
|
+
});
|
|
61
|
+
if (!res) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const mediaToKeep = product.images?.filter((i) => !ids.includes(i.id)).map((i) => ({ url: i.url }));
|
|
65
|
+
await mutateAsync(
|
|
66
|
+
{
|
|
67
|
+
images: mediaToKeep,
|
|
68
|
+
thumbnail: includingThumbnail ? "" : void 0
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
onSuccess: () => {
|
|
72
|
+
setSelection({});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Heading, { level: "h2", children: t("products.media.label") }),
|
|
80
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
81
|
+
ActionMenu,
|
|
82
|
+
{
|
|
83
|
+
groups: [
|
|
84
|
+
{
|
|
85
|
+
actions: [
|
|
86
|
+
{
|
|
87
|
+
label: t("actions.edit"),
|
|
88
|
+
to: "media?view=edit",
|
|
89
|
+
icon: /* @__PURE__ */ jsx(PencilSquare, {})
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] }),
|
|
97
|
+
media.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-4 px-6 py-4", children: media.map((i, index) => {
|
|
98
|
+
const isSelected = selection[i.id];
|
|
99
|
+
return /* @__PURE__ */ jsxs(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: clx(
|
|
103
|
+
"group relative aspect-square size-full overflow-hidden rounded-[8px] shadow-elevation-card-rest transition-fg",
|
|
104
|
+
{ "cursor-pointer hover:shadow-elevation-card-hover": !readOnly }
|
|
105
|
+
),
|
|
106
|
+
children: [
|
|
107
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: clx(
|
|
111
|
+
"invisible absolute right-2 top-2 opacity-0 transition-fg group-hover:visible group-hover:opacity-100",
|
|
112
|
+
{
|
|
113
|
+
"visible opacity-100": isSelected
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
children: /* @__PURE__ */ jsx(
|
|
117
|
+
Checkbox,
|
|
118
|
+
{
|
|
119
|
+
checked: selection[i.id] || false,
|
|
120
|
+
onCheckedChange: () => handleCheckedChange(i.id)
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
i.isThumbnail && /* @__PURE__ */ jsx("div", { className: "absolute left-2 top-2", children: /* @__PURE__ */ jsx(Tooltip, { content: t("fields.thumbnail"), children: /* @__PURE__ */ jsx(ThumbnailBadge, {}) }) }),
|
|
126
|
+
readOnly ? /* @__PURE__ */ jsx(
|
|
127
|
+
"img",
|
|
128
|
+
{
|
|
129
|
+
src: i.url,
|
|
130
|
+
alt: product.title,
|
|
131
|
+
className: "size-full object-cover"
|
|
132
|
+
}
|
|
133
|
+
) : /* @__PURE__ */ jsx(Link, { to: `media`, state: { curr: index }, children: /* @__PURE__ */ jsx(
|
|
134
|
+
"img",
|
|
135
|
+
{
|
|
136
|
+
src: i.url,
|
|
137
|
+
alt: product.title,
|
|
138
|
+
className: "size-full object-cover"
|
|
139
|
+
}
|
|
140
|
+
) })
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
i.id
|
|
144
|
+
);
|
|
145
|
+
}) }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-y-4 pb-8 pt-6", children: [
|
|
146
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
Text,
|
|
149
|
+
{
|
|
150
|
+
size: "small",
|
|
151
|
+
leading: "compact",
|
|
152
|
+
weight: "plus",
|
|
153
|
+
className: "text-ui-fg-subtle",
|
|
154
|
+
children: t("products.media.emptyState.header")
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ jsx(
|
|
158
|
+
Text,
|
|
159
|
+
{
|
|
160
|
+
size: "small",
|
|
161
|
+
className: "text-ui-fg-muted",
|
|
162
|
+
children: t("products.media.emptyState.description")
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] }),
|
|
166
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
167
|
+
Button,
|
|
168
|
+
{
|
|
169
|
+
size: "small",
|
|
170
|
+
variant: "secondary",
|
|
171
|
+
asChild: true,
|
|
172
|
+
children: /* @__PURE__ */ jsx(Link, { to: "media?view=edit", children: t("products.media.emptyState.action") })
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] }),
|
|
176
|
+
!readOnly && /* @__PURE__ */ jsx(CommandBar, { open: !!Object.keys(selection).length, children: /* @__PURE__ */ jsxs(CommandBar.Bar, { children: [
|
|
177
|
+
/* @__PURE__ */ jsx(CommandBar.Value, { children: t("general.countSelected", {
|
|
178
|
+
count: Object.keys(selection).length
|
|
179
|
+
}) }),
|
|
180
|
+
/* @__PURE__ */ jsx(CommandBar.Seperator, {}),
|
|
181
|
+
/* @__PURE__ */ jsx(
|
|
182
|
+
CommandBar.Command,
|
|
183
|
+
{
|
|
184
|
+
action: handleDelete,
|
|
185
|
+
label: t("actions.delete"),
|
|
186
|
+
shortcut: "d"
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
] }) })
|
|
190
|
+
] });
|
|
191
|
+
};
|
|
192
|
+
var getMedia = (product) => {
|
|
193
|
+
const { images = [], thumbnail } = product;
|
|
194
|
+
const media = (images || []).map((image) => ({
|
|
195
|
+
id: image.id,
|
|
196
|
+
url: image.url,
|
|
197
|
+
isThumbnail: image.url === thumbnail
|
|
198
|
+
}));
|
|
199
|
+
if (thumbnail && !media.some((mediaItem) => mediaItem.url === thumbnail)) {
|
|
200
|
+
media.unshift({
|
|
201
|
+
id: "img_thumbnail",
|
|
202
|
+
url: thumbnail,
|
|
203
|
+
isThumbnail: true
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return media;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
// src/pages/products/[id]/_components/product-general-section/product-general-section.tsx
|
|
210
|
+
import { PencilSquare as PencilSquare2, Trash } from "@medusajs/icons";
|
|
211
|
+
import { Container as Container2, Heading as Heading2, StatusBadge, usePrompt as usePrompt2 } from "@medusajs/ui";
|
|
212
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
213
|
+
import { useNavigate } from "react-router-dom";
|
|
214
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
215
|
+
var productStatusColor = (status) => {
|
|
216
|
+
switch (status) {
|
|
217
|
+
case "draft":
|
|
218
|
+
return "grey";
|
|
219
|
+
case "proposed":
|
|
220
|
+
return "orange";
|
|
221
|
+
case "published":
|
|
222
|
+
return "green";
|
|
223
|
+
case "rejected":
|
|
224
|
+
return "red";
|
|
225
|
+
default:
|
|
226
|
+
return "grey";
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
var ProductGeneralSection = ({
|
|
230
|
+
product
|
|
231
|
+
}) => {
|
|
232
|
+
const { t } = useTranslation2();
|
|
233
|
+
const prompt = usePrompt2();
|
|
234
|
+
const navigate = useNavigate();
|
|
235
|
+
const { mutateAsync } = useDeleteProduct(product.id);
|
|
236
|
+
const handleDelete = async () => {
|
|
237
|
+
const res = await prompt({
|
|
238
|
+
title: t("general.areYouSure"),
|
|
239
|
+
description: t("products.deleteWarning", {
|
|
240
|
+
title: product.title
|
|
241
|
+
}),
|
|
242
|
+
confirmText: t("actions.delete"),
|
|
243
|
+
cancelText: t("actions.cancel")
|
|
244
|
+
});
|
|
245
|
+
if (!res) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
await mutateAsync(void 0, {
|
|
249
|
+
onSuccess: () => {
|
|
250
|
+
navigate("..");
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
|
|
255
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
256
|
+
/* @__PURE__ */ jsx2(Heading2, { children: product.title }),
|
|
257
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-4", children: [
|
|
258
|
+
/* @__PURE__ */ jsx2(StatusBadge, { color: productStatusColor(product.status), children: t(`products.productStatus.${product.status}`) }),
|
|
259
|
+
/* @__PURE__ */ jsx2(
|
|
260
|
+
ActionMenu,
|
|
261
|
+
{
|
|
262
|
+
groups: [
|
|
263
|
+
{
|
|
264
|
+
actions: [
|
|
265
|
+
{
|
|
266
|
+
label: t("actions.edit"),
|
|
267
|
+
to: "edit",
|
|
268
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare2, {})
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
actions: [
|
|
274
|
+
{
|
|
275
|
+
label: t("actions.delete"),
|
|
276
|
+
onClick: handleDelete,
|
|
277
|
+
icon: /* @__PURE__ */ jsx2(Trash, {})
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
)
|
|
284
|
+
] })
|
|
285
|
+
] }),
|
|
286
|
+
/* @__PURE__ */ jsx2(
|
|
287
|
+
SectionRow,
|
|
288
|
+
{
|
|
289
|
+
title: t("fields.description"),
|
|
290
|
+
value: product.description || "-"
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
/* @__PURE__ */ jsx2(
|
|
294
|
+
SectionRow,
|
|
295
|
+
{
|
|
296
|
+
title: t("fields.subtitle"),
|
|
297
|
+
value: product.subtitle || "-"
|
|
298
|
+
}
|
|
299
|
+
),
|
|
300
|
+
/* @__PURE__ */ jsx2(SectionRow, { title: t("fields.handle"), value: `/${product.handle}` }),
|
|
301
|
+
/* @__PURE__ */ jsx2(
|
|
302
|
+
SectionRow,
|
|
303
|
+
{
|
|
304
|
+
title: t("fields.discountable"),
|
|
305
|
+
value: product.discountable ? t("general.true") : t("general.false")
|
|
306
|
+
}
|
|
307
|
+
)
|
|
308
|
+
] });
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export {
|
|
312
|
+
productStatusColor,
|
|
313
|
+
ProductGeneralSection,
|
|
314
|
+
ProductMediaSection
|
|
315
|
+
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCollectionGallery
|
|
3
|
+
} from "./chunk-42R54Z2X.js";
|
|
1
4
|
import {
|
|
2
5
|
TextCell
|
|
3
6
|
} from "./chunk-JHIMVLB2.js";
|
|
7
|
+
import {
|
|
8
|
+
Thumbnail
|
|
9
|
+
} from "./chunk-WIYFXWRI.js";
|
|
4
10
|
|
|
5
11
|
// src/hooks/table/columns/use-collection-table-columns.tsx
|
|
6
12
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
7
13
|
import { useMemo } from "react";
|
|
8
14
|
import { useTranslation } from "react-i18next";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
16
|
var columnHelper = createColumnHelper();
|
|
11
17
|
var useCollectionTableColumns = () => {
|
|
12
18
|
const { t } = useTranslation();
|
|
@@ -14,7 +20,16 @@ var useCollectionTableColumns = () => {
|
|
|
14
20
|
() => [
|
|
15
21
|
columnHelper.accessor("title", {
|
|
16
22
|
header: t("fields.title"),
|
|
17
|
-
cell: ({ getValue }) =>
|
|
23
|
+
cell: ({ getValue, row }) => {
|
|
24
|
+
const gallery = getCollectionGallery(
|
|
25
|
+
row.original.images
|
|
26
|
+
);
|
|
27
|
+
const thumbnailSrc = gallery.find((image) => image.is_thumbnail)?.url ?? gallery[0]?.url ?? null;
|
|
28
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex size-full items-center gap-x-3 overflow-hidden", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(Thumbnail, { src: thumbnailSrc }),
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: getValue() })
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
18
33
|
}),
|
|
19
34
|
columnHelper.accessor("handle", {
|
|
20
35
|
header: t("fields.handle"),
|
|
@@ -19,8 +19,7 @@ var DEFAULT_PROPERTIES = [
|
|
|
19
19
|
"shipping_tax_total",
|
|
20
20
|
"tax_total",
|
|
21
21
|
"refundable_total",
|
|
22
|
-
"order_change"
|
|
23
|
-
"commission_value"
|
|
22
|
+
"order_change"
|
|
24
23
|
];
|
|
25
24
|
var DEFAULT_RELATIONS = [
|
|
26
25
|
"*customer",
|
|
@@ -33,7 +32,12 @@ var DEFAULT_RELATIONS = [
|
|
|
33
32
|
"*items.variant.inventory_items.inventory",
|
|
34
33
|
"+items.variant.inventory_items.required_quantity",
|
|
35
34
|
"*items.variant.prices",
|
|
36
|
-
"*items.
|
|
35
|
+
"*items.offer",
|
|
36
|
+
"*items.offer.prices",
|
|
37
|
+
"*items.offer.shipping_profile",
|
|
38
|
+
"*items.offer.inventory_item_link",
|
|
39
|
+
"*items.offer.inventory_item_link.inventory_item",
|
|
40
|
+
"*items.offer.inventory_item_link.inventory_item.location_levels",
|
|
37
41
|
"+summary",
|
|
38
42
|
"*shipping_address",
|
|
39
43
|
"*billing_address",
|
|
@@ -48,8 +52,9 @@ var DEFAULT_RELATIONS = [
|
|
|
48
52
|
"region.automatic_taxes",
|
|
49
53
|
"*payment_collections",
|
|
50
54
|
"*payment_collections.payments",
|
|
51
|
-
"
|
|
52
|
-
"*
|
|
55
|
+
"*payment_collections.payments.refunds",
|
|
56
|
+
"*payment_collections.payments.refunds.refund_reason",
|
|
57
|
+
"payment_status"
|
|
53
58
|
];
|
|
54
59
|
var DEFAULT_FIELDS = `${DEFAULT_PROPERTIES.join(
|
|
55
60
|
","
|
|
@@ -212,13 +212,14 @@ var DataTable = ({
|
|
|
212
212
|
} : void 0
|
|
213
213
|
});
|
|
214
214
|
const shouldRenderHeading = heading || subHeading;
|
|
215
|
+
const hasToolbarHeader = Boolean(shouldRenderHeading) || Boolean(actionMenu) || Boolean(actions && actions.length > 0) || Boolean(action);
|
|
215
216
|
return /* @__PURE__ */ jsxs(
|
|
216
217
|
UiDataTable,
|
|
217
218
|
{
|
|
218
219
|
instance,
|
|
219
220
|
className: layout === "fill" ? "h-full [&_tr]:last-of-type:!border-b" : void 0,
|
|
220
221
|
children: [
|
|
221
|
-
/* @__PURE__ */ jsx(
|
|
222
|
+
hasToolbarHeader ? /* @__PURE__ */ jsx(
|
|
222
223
|
UiDataTable.Toolbar,
|
|
223
224
|
{
|
|
224
225
|
className: "flex flex-col items-start justify-between gap-2 md:flex-row md:items-center",
|
|
@@ -244,6 +245,18 @@ var DataTable = ({
|
|
|
244
245
|
] })
|
|
245
246
|
] })
|
|
246
247
|
}
|
|
248
|
+
) : /* @__PURE__ */ jsxs(
|
|
249
|
+
UiDataTable.FilterBar,
|
|
250
|
+
{
|
|
251
|
+
alwaysShow: true,
|
|
252
|
+
clearAllFiltersLabel: toolbarTranslations.clearAll,
|
|
253
|
+
sortingTooltip: toolbarTranslations.sort,
|
|
254
|
+
columnsTooltip: toolbarTranslations.columns,
|
|
255
|
+
children: [
|
|
256
|
+
enableSearch && /* @__PURE__ */ jsx(UiDataTable.Search, { placeholder: t("filters.searchLabel") }),
|
|
257
|
+
filterBarContent
|
|
258
|
+
]
|
|
259
|
+
}
|
|
247
260
|
),
|
|
248
261
|
/* @__PURE__ */ jsx(UiDataTable.Table, { emptyState }),
|
|
249
262
|
enablePagination && /* @__PURE__ */ jsx(UiDataTable.Pagination, { translations: paginationTranslations }),
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-INNFZYX2.js";
|
|
7
7
|
import {
|
|
8
8
|
useProductCategories
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-247L47JD.js";
|
|
10
10
|
|
|
11
11
|
// src/pages/products/common/components/category-combobox/single-category-combobox.tsx
|
|
12
12
|
import {
|
|
@@ -92,16 +92,15 @@ var SingleCategoryCombobox = forwardRef(({ value, onChange, className, ...props
|
|
|
92
92
|
return (e) => {
|
|
93
93
|
e.preventDefault();
|
|
94
94
|
e.stopPropagation();
|
|
95
|
-
if (value
|
|
96
|
-
onChange(null);
|
|
97
|
-
} else {
|
|
95
|
+
if (value !== option.value) {
|
|
98
96
|
onChange(option.value);
|
|
99
97
|
handleOpenChange(false);
|
|
100
98
|
}
|
|
101
99
|
innerRef.current?.focus();
|
|
102
100
|
};
|
|
103
101
|
},
|
|
104
|
-
|
|
102
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
103
|
+
[value, onChange, handleOpenChange]
|
|
105
104
|
);
|
|
106
105
|
function handleOpenChange(open2) {
|
|
107
106
|
if (!open2) {
|
|
@@ -262,7 +261,6 @@ var SingleCategoryCombobox = forwardRef(({ value, onChange, className, ...props
|
|
|
262
261
|
"button",
|
|
263
262
|
{
|
|
264
263
|
"data-active": focusedIndex === 0,
|
|
265
|
-
role: "button",
|
|
266
264
|
className: clx(
|
|
267
265
|
"transition-fg grid w-full appearance-none grid-cols-[20px_1fr] items-center justify-center gap-2 rounded-md px-2 py-1.5 text-start outline-none",
|
|
268
266
|
"data-[active=true]:bg-ui-bg-field-hover"
|
|
@@ -297,6 +295,7 @@ var SingleCategoryCombobox = forwardRef(({ value, onChange, className, ...props
|
|
|
297
295
|
"data-active": showLevelUp ? focusedIndex === index + 1 : focusedIndex === index,
|
|
298
296
|
type: "button",
|
|
299
297
|
role: "option",
|
|
298
|
+
"aria-selected": value === option.value,
|
|
300
299
|
className: clx(
|
|
301
300
|
"grid h-full w-full appearance-none grid-cols-[20px_1fr] items-center gap-2 overflow-hidden rounded-md px-2 py-1.5 text-start outline-none",
|
|
302
301
|
"data-[active=true]:bg-ui-bg-field-hover"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/lib/inventory-preview.ts
|
|
2
|
+
var getOfferRestockPreview = (item, quantity) => {
|
|
3
|
+
if (!item || quantity <= 0) {
|
|
4
|
+
return [];
|
|
5
|
+
}
|
|
6
|
+
const links = item.offer?.inventory_item_link ?? [];
|
|
7
|
+
if (!links.length) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
return links.map((link) => {
|
|
11
|
+
const inventoryItemId = link.inventory_item?.id ?? link.inventory_item_id ?? null;
|
|
12
|
+
if (!inventoryItemId) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const required = link.required_quantity ?? 1;
|
|
16
|
+
if (required <= 0) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const label = link.inventory_item?.title || link.inventory_item?.sku || inventoryItemId;
|
|
20
|
+
return {
|
|
21
|
+
inventoryItemId,
|
|
22
|
+
inventoryItemLabel: label,
|
|
23
|
+
delta: quantity * required
|
|
24
|
+
};
|
|
25
|
+
}).filter((row) => row !== null);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
getOfferRestockPreview
|
|
30
|
+
};
|
|
@@ -9,11 +9,12 @@ import { useState } from "react";
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { useSearchParams } from "react-router-dom";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
var initState = (params, prefix) => {
|
|
12
|
+
var initState = (params, prefix, defaultKey) => {
|
|
13
13
|
const param = prefix ? `${prefix}_order` : "order";
|
|
14
|
-
const sortParam = params.get(param);
|
|
14
|
+
const sortParam = params.get(param) ?? defaultKey;
|
|
15
15
|
if (!sortParam) {
|
|
16
16
|
return {
|
|
17
|
+
key: void 0,
|
|
17
18
|
dir: "asc" /* ASC */
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -26,10 +27,11 @@ var initState = (params, prefix) => {
|
|
|
26
27
|
};
|
|
27
28
|
var DataTableOrderBy = ({
|
|
28
29
|
keys,
|
|
29
|
-
prefix
|
|
30
|
+
prefix,
|
|
31
|
+
defaultKey
|
|
30
32
|
}) => {
|
|
31
33
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
32
|
-
const [state, setState] = useState(initState(searchParams, prefix));
|
|
34
|
+
const [state, setState] = useState(initState(searchParams, prefix, defaultKey));
|
|
33
35
|
const param = prefix ? `${prefix}_order` : "order";
|
|
34
36
|
const { t } = useTranslation();
|
|
35
37
|
const direction = useDocumentDirection();
|
|
@@ -135,6 +135,7 @@ var ChipInput = forwardRef(
|
|
|
135
135
|
/* @__PURE__ */ jsx(
|
|
136
136
|
"input",
|
|
137
137
|
{
|
|
138
|
+
"aria-label": "Chip input",
|
|
138
139
|
className: clx(
|
|
139
140
|
"caret-ui-fg-base text-ui-fg-base txt-compact-small flex-1 appearance-none bg-transparent",
|
|
140
141
|
"disabled:text-ui-fg-disabled disabled:cursor-not-allowed",
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ordersQueryKeys
|
|
3
|
+
} from "./chunk-7RGUD6PI.js";
|
|
1
4
|
import {
|
|
2
5
|
queryClient
|
|
3
6
|
} from "./chunk-RHKRREUU.js";
|
|
@@ -152,38 +155,46 @@ var PAYMENT_COLLECTION_QUERY_KEY = "payment-collection";
|
|
|
152
155
|
var paymentCollectionQueryKeys = queryKeysFactory(
|
|
153
156
|
PAYMENT_COLLECTION_QUERY_KEY
|
|
154
157
|
);
|
|
158
|
+
var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) => {
|
|
159
|
+
return useMutation4({
|
|
160
|
+
mutationFn: (payload) => sdk.vendor.paymentCollections.$id.markAsPaid.mutate({
|
|
161
|
+
$id: paymentCollectionId,
|
|
162
|
+
...payload
|
|
163
|
+
}),
|
|
164
|
+
onSuccess: (data, variables, context) => {
|
|
165
|
+
queryClient.invalidateQueries({
|
|
166
|
+
queryKey: ordersQueryKeys.details()
|
|
167
|
+
});
|
|
168
|
+
queryClient.invalidateQueries({
|
|
169
|
+
queryKey: ordersQueryKeys.preview(orderId)
|
|
170
|
+
});
|
|
171
|
+
queryClient.invalidateQueries({
|
|
172
|
+
queryKey: paymentCollectionQueryKeys.all
|
|
173
|
+
});
|
|
174
|
+
options?.onSuccess?.(data, variables, context);
|
|
175
|
+
},
|
|
176
|
+
...options
|
|
177
|
+
});
|
|
178
|
+
};
|
|
155
179
|
|
|
156
|
-
// src/hooks/api/
|
|
180
|
+
// src/hooks/api/product-variants.tsx
|
|
157
181
|
import {
|
|
158
|
-
useMutation as useMutation5,
|
|
159
182
|
useQuery as useQuery6
|
|
160
183
|
} from "@tanstack/react-query";
|
|
161
|
-
var
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
var paymentProvidersQueryKeys = queryKeysFactory(
|
|
165
|
-
PAYMENT_PROVIDERS_QUERY_KEY
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
// src/hooks/api/refund-reasons.tsx
|
|
169
|
-
import {
|
|
170
|
-
useMutation as useMutation6,
|
|
171
|
-
useQuery as useQuery7
|
|
172
|
-
} from "@tanstack/react-query";
|
|
173
|
-
var REFUND_REASONS_QUERY_KEY = "refund_reasons";
|
|
174
|
-
var refundReasonsQueryKeys = queryKeysFactory(
|
|
175
|
-
REFUND_REASONS_QUERY_KEY
|
|
184
|
+
var PRODUCT_VARIANT_QUERY_KEY = "product_variant";
|
|
185
|
+
var productVariantQueryKeys = queryKeysFactory(
|
|
186
|
+
PRODUCT_VARIANT_QUERY_KEY
|
|
176
187
|
);
|
|
177
188
|
|
|
178
189
|
// src/hooks/api/regions.tsx
|
|
179
190
|
import {
|
|
180
|
-
useMutation as
|
|
181
|
-
useQuery as
|
|
191
|
+
useMutation as useMutation5,
|
|
192
|
+
useQuery as useQuery7
|
|
182
193
|
} from "@tanstack/react-query";
|
|
183
194
|
var REGIONS_QUERY_KEY = "regions";
|
|
184
195
|
var regionsQueryKeys = queryKeysFactory(REGIONS_QUERY_KEY);
|
|
185
196
|
var useRegions = (query, options) => {
|
|
186
|
-
const { data, ...rest } =
|
|
197
|
+
const { data, ...rest } = useQuery7({
|
|
187
198
|
queryFn: () => sdk.vendor.regions.query({ ...query }),
|
|
188
199
|
queryKey: regionsQueryKeys.list(query),
|
|
189
200
|
...options
|
|
@@ -193,8 +204,8 @@ var useRegions = (query, options) => {
|
|
|
193
204
|
|
|
194
205
|
// src/hooks/api/shipping-option-types.tsx
|
|
195
206
|
import {
|
|
196
|
-
useMutation as
|
|
197
|
-
useQuery as
|
|
207
|
+
useMutation as useMutation6,
|
|
208
|
+
useQuery as useQuery8
|
|
198
209
|
} from "@tanstack/react-query";
|
|
199
210
|
var SHIPPING_OPTION_TYPES_QUERY_KEY = "shipping_option_types";
|
|
200
211
|
var shippingOptionTypesQueryKeys = queryKeysFactory(
|
|
@@ -202,7 +213,7 @@ var shippingOptionTypesQueryKeys = queryKeysFactory(
|
|
|
202
213
|
);
|
|
203
214
|
|
|
204
215
|
// src/hooks/api/store.tsx
|
|
205
|
-
import { useQuery as
|
|
216
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
206
217
|
import { ClientError } from "@mercurjs/client";
|
|
207
218
|
var STORE_QUERY_KEY = "store";
|
|
208
219
|
var storeQueryKeys = queryKeysFactory(STORE_QUERY_KEY);
|
|
@@ -215,7 +226,7 @@ async function retrieveActiveStore(query) {
|
|
|
215
226
|
return { store: activeStore };
|
|
216
227
|
}
|
|
217
228
|
var useStore = (query, options) => {
|
|
218
|
-
const { data, ...rest } =
|
|
229
|
+
const { data, ...rest } = useQuery9({
|
|
219
230
|
queryFn: () => retrieveActiveStore(query),
|
|
220
231
|
queryKey: storeQueryKeys.details(),
|
|
221
232
|
...options
|
|
@@ -226,19 +237,6 @@ var useStore = (query, options) => {
|
|
|
226
237
|
};
|
|
227
238
|
};
|
|
228
239
|
|
|
229
|
-
// src/hooks/api/subscription.tsx
|
|
230
|
-
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
231
|
-
var SUBSCRIPTION_QUERY_KEY = "subscription";
|
|
232
|
-
var subscriptionQueryKeys = queryKeysFactory(SUBSCRIPTION_QUERY_KEY);
|
|
233
|
-
var useSubscription = (query, options) => {
|
|
234
|
-
const { data, ...rest } = useQuery11({
|
|
235
|
-
queryKey: subscriptionQueryKeys.details(),
|
|
236
|
-
queryFn: () => sdk.vendor.subscription.query({ ...query }),
|
|
237
|
-
...options
|
|
238
|
-
});
|
|
239
|
-
return { ...data, ...rest };
|
|
240
|
-
};
|
|
241
|
-
|
|
242
240
|
export {
|
|
243
241
|
useFeatureFlags,
|
|
244
242
|
useInvites,
|
|
@@ -246,12 +244,11 @@ export {
|
|
|
246
244
|
useCreateInvite,
|
|
247
245
|
notificationQueryKeys,
|
|
248
246
|
useNotifications,
|
|
247
|
+
useMarkPaymentCollectionAsPaid,
|
|
249
248
|
useRegions,
|
|
250
249
|
storeQueryKeys,
|
|
251
250
|
retrieveActiveStore,
|
|
252
251
|
useStore,
|
|
253
|
-
subscriptionQueryKeys,
|
|
254
|
-
useSubscription,
|
|
255
252
|
productTagsQueryKeys,
|
|
256
253
|
useProductTag,
|
|
257
254
|
useProductTags,
|