@mercurjs/vendor 2.2.0-canary.9 → 2.2.0-rc.0
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]-T5ECVBPF.js → [id]-3LNKC5OJ.js} +38 -39
- package/dist/{[id]-A55T2ORL.js → [id]-4HO4S2PX.js} +481 -473
- package/dist/{[id]-FWCX5PTI.js → [id]-4LIIFGET.js} +13 -13
- package/dist/{[id]-GBT6VB4S.js → [id]-5EECCIRP.js} +148 -57
- package/dist/{[id]-YPCO3DJV.js → [id]-5P5LTATX.js} +2 -2
- package/dist/{[id]-J6BZG5PU.js → [id]-AQUUZFRX.js} +9 -9
- package/dist/{[id]-QOEO3JOV.js → [id]-CUBGVODE.js} +175 -85
- package/dist/{[id]-QQU5HVFU.js → [id]-DCGPICT3.js} +36 -37
- package/dist/{[id]-GC3ZYPK4.js → [id]-DT5YJVKG.js} +32 -33
- package/dist/{[id]-SHAJTJNZ.js → [id]-IEBZ6V3W.js} +46 -46
- package/dist/{[id]-ZCMSBEVM.js → [id]-N7JEZFXQ.js} +6 -6
- package/dist/[id]-U6FKX5UQ.js +975 -0
- package/dist/{[id]-BC7IKQTQ.js → [id]-XB45DY2D.js} +18 -18
- package/dist/[id]-XP5KEMNX.js +602 -0
- package/dist/{[location_id]-NUBXDDJC.js → [location_id]-I4HHUHWY.js} +14 -14
- package/dist/{[province_id]-6GUA4PV5.js → [province_id]-OYX4MOCF.js} +31 -32
- package/dist/{add-NTRYWOJF.js → add-3T4GBFMM.js} +59 -56
- package/dist/{add-RU3WL4YB.js → add-RPRJWCYU.js} +63 -30
- package/dist/{add-customer-groups-U5RZWW4B.js → add-customer-groups-FB5T6PQN.js} +43 -42
- package/dist/{add-products-Q4MMDQKT.js → add-products-F243SWGD.js} +38 -40
- package/dist/{add-promotions-KD2CWQPF.js → add-promotions-TJDK7HLW.js} +17 -17
- package/dist/{add-to-campaign-QKYQCSR2.js → add-to-campaign-Q6OAJMUJ.js} +6 -6
- package/dist/{address-77Y3AOQ3.js → address-XVBSNMFU.js} +24 -25
- package/dist/{adjust-inventory-AFJLWF5R.js → adjust-inventory-IZLRMQXV.js} +4 -4
- package/dist/allocate-items-Q3VALDYT.js +685 -0
- package/dist/{areas-XUC5V5UO.js → areas-IYGBRCRH.js} +13 -13
- package/dist/attributes-LGEM2JJW.js +353 -0
- package/dist/breadcrumb-BC6XN2SE.js +13 -0
- package/dist/{breadcrumb-THJ2HPRB.js → breadcrumb-BFNJWOJ4.js} +10 -9
- package/dist/{breadcrumb-FPWBT76A.js → breadcrumb-BXD3SRM7.js} +3 -3
- package/dist/{breadcrumb-PBR27GGX.js → breadcrumb-FEYGZFJU.js} +4 -4
- package/dist/{breadcrumb-KTARIL65.js → breadcrumb-H45Z2WNG.js} +3 -3
- package/dist/breadcrumb-ILEAQRW7.js +33 -0
- package/dist/breadcrumb-K4HBKZUE.js +28 -0
- package/dist/{breadcrumb-YBBYFQYG.js → breadcrumb-KZPOPXGG.js} +2 -2
- package/dist/{breadcrumb-F3BN5753.js → breadcrumb-L262VPBO.js} +2 -2
- package/dist/{breadcrumb-3Z7KZG62.js → breadcrumb-LEFHXFLT.js} +3 -3
- package/dist/{breadcrumb-D3UDTWGE.js → breadcrumb-MOA2DBOE.js} +2 -2
- package/dist/breadcrumb-NZYOCEEM.js +47 -0
- package/dist/breadcrumb-VY5DNTTJ.js +46 -0
- package/dist/{breadcrumb-UAUX7XCV.js → breadcrumb-WG6TIF4C.js} +2 -2
- package/dist/{breadcrumb-2XA2WOK7.js → breadcrumb-XEZCMI55.js} +2 -2
- package/dist/{breadcrumb-IK6XCQOQ.js → breadcrumb-XGXKCDYS.js} +4 -4
- package/dist/{breadcrumb-Y5UW3I4C.js → breadcrumb-YOY6Z36F.js} +2 -2
- package/dist/{campaigns-JAQTSA4Z.js → campaigns-DZKRNCA4.js} +7 -7
- package/dist/{categories-T4QJYX4R.js → categories-JZJA2IBQ.js} +11 -9
- package/dist/{chunk-3PMM6AMP.js → chunk-2KA4TGBQ.js} +2 -2
- package/dist/{chunk-X4GWB6AT.js → chunk-2NPD4S55.js} +4 -4
- package/dist/{chunk-M6GKMFTC.js → chunk-3ALBZK4M.js} +1 -1
- package/dist/{chunk-LKUW5SV4.js → chunk-3C2T27YW.js} +2 -2
- package/dist/{chunk-O7VOGTLX.js → chunk-3I6ZAMGN.js} +1 -1
- package/dist/{chunk-5QI3NDJG.js → chunk-3SH24DGG.js} +2 -2
- package/dist/{chunk-TF6V3TFG.js → chunk-3TST3EWQ.js} +2 -2
- package/dist/chunk-42R54Z2X.js +8 -0
- package/dist/{chunk-GAE6TKOR.js → chunk-4IRQSBA7.js} +5 -6
- package/dist/{chunk-LFX6WU4A.js → chunk-5ALC4Z2H.js} +0 -13
- package/dist/{chunk-VZUA5SRD.js → chunk-5BQO3YQP.js} +2 -2
- package/dist/{chunk-SPOHNK4X.js → chunk-5BYYDBLS.js} +7 -7
- package/dist/{chunk-4LVP635F.js → chunk-5FBQOAXU.js} +135 -126
- package/dist/{chunk-BXRNZS5K.js → chunk-5PAUN3PM.js} +3 -3
- package/dist/{chunk-E2HQPY32.js → chunk-5RMLLTR7.js} +5 -5
- package/dist/{chunk-3EF54XFY.js → chunk-634XVU3D.js} +1 -1
- package/dist/{chunk-Y2MQ5EMD.js → chunk-6FDPVW7Y.js} +12 -3
- package/dist/{chunk-6FUIK3PX.js → chunk-6Q3J6ZMM.js} +5 -5
- package/dist/{chunk-LARLBYU6.js → chunk-7BFQKYCJ.js} +2 -2
- package/dist/chunk-7EXKHL5L.js +30 -0
- package/dist/{chunk-M6N4ISXL.js → chunk-7MARNXFG.js} +1 -1
- package/dist/{chunk-TYESCFYW.js → chunk-AOLE7MBM.js} +1 -1
- package/dist/{chunk-TBYCZRZ7.js → chunk-BQHVM46E.js} +32 -55
- package/dist/{chunk-TW324MAT.js → chunk-CRYZK4NU.js} +2 -2
- package/dist/{chunk-463CNCJC.js → chunk-CUAGC54B.js} +33 -35
- package/dist/{chunk-KIFSQOM2.js → chunk-D76WZZSB.js} +5 -5
- package/dist/{chunk-QLBIBLOY.js → chunk-DQ7LZZJX.js} +5 -5
- package/dist/{chunk-UCYSCKZV.js → chunk-DSTHXHJ5.js} +2114 -1699
- package/dist/{chunk-UFFVRF4V.js → chunk-EAAZV3B7.js} +6 -11
- package/dist/chunk-EDV4MTTT.js +434 -0
- package/dist/chunk-EEBJYXWA.js +15 -0
- package/dist/{chunk-UORPTGV2.js → chunk-EPRYM3FA.js} +11 -15
- package/dist/{chunk-YQYRAD5C.js → chunk-FCZJAYMM.js} +1 -1
- package/dist/{chunk-BER45EYD.js → chunk-FDKFUIYV.js} +1 -1
- package/dist/{chunk-JAUZ73XE.js → chunk-G6YNCIVF.js} +21 -61
- package/dist/{chunk-PVZBDWLK.js → chunk-GRH7C3QN.js} +1 -1
- package/dist/chunk-GSH6ZGI6.js +353 -0
- package/dist/{chunk-IQWK723D.js → chunk-GZ4KTAWS.js} +1 -1
- package/dist/{chunk-MJCL3WID.js → chunk-H6LZ77GX.js} +1 -1
- package/dist/{chunk-2QTNCGKX.js → chunk-IEVN722X.js} +1 -1
- package/dist/{chunk-L4KBTV57.js → chunk-IMJ62GAP.js} +1 -3
- package/dist/{chunk-SGR4DMCW.js → chunk-INYLPVCG.js} +3 -3
- package/dist/{chunk-5T6UWTRU.js → chunk-IV57G2CB.js} +19 -11
- package/dist/{chunk-MZTDRBCR.js → chunk-JDNXS37G.js} +61 -62
- package/dist/{chunk-3B34B2M2.js → chunk-JJP6AKMV.js} +1 -1
- package/dist/{chunk-K6LOZ4S3.js → chunk-JK4M3ZKY.js} +5 -5
- package/dist/{chunk-VXMOPVRH.js → chunk-JR7AABT5.js} +2 -2
- package/dist/{chunk-DO4F5FIO.js → chunk-JTHDMXZV.js} +5 -5
- package/dist/{chunk-6K6EQOJF.js → chunk-JY2XON7H.js} +2 -2
- package/dist/{chunk-6OUPJNYO.js → chunk-KCHYLLVG.js} +2 -2
- package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
- package/dist/{chunk-VCOQ7WQ2.js → chunk-KG2NUK4J.js} +6 -6
- package/dist/{chunk-VXWN37PT.js → chunk-KIURBTC4.js} +1 -1
- package/dist/{chunk-BENED3NB.js → chunk-KTJLJTFO.js} +545 -891
- package/dist/{chunk-PZEPOPMV.js → chunk-KZQFIPY2.js} +178 -81
- package/dist/{chunk-DQKK43PR.js → chunk-LWFBBTJ3.js} +5 -5
- package/dist/{chunk-RIN4CBRB.js → chunk-LXZXXOJ3.js} +1 -17
- package/dist/chunk-LYYM7H7H.js +59 -0
- package/dist/{chunk-MWQQVKRU.js → chunk-MAVQ636Y.js} +1 -1
- package/dist/{chunk-VDHW6H5F.js → chunk-MAW6ZT3D.js} +4 -4
- package/dist/{chunk-7CMRFP5Q.js → chunk-MJP5V3JN.js} +3 -3
- package/dist/{chunk-S7EKBD2C.js → chunk-MNHP6YRC.js} +3 -3
- package/dist/{chunk-7IPCLQ5V.js → chunk-MT6WOKIW.js} +4 -4
- package/dist/chunk-MUGQQY6P.js +315 -0
- package/dist/{chunk-S23FD6FA.js → chunk-MVEHWM7K.js} +1 -1
- package/dist/{chunk-VV6IKGCN.js → chunk-NTJ3BMOE.js} +1 -1
- package/dist/{chunk-DDJQRV6E.js → chunk-O7BGGWW6.js} +2 -2
- package/dist/{chunk-LWJF63JW.js → chunk-OYUJYPDF.js} +90 -15
- package/dist/{chunk-4S6XGIC6.js → chunk-PUAWN7SS.js} +1 -1
- package/dist/{chunk-U6PBLMXD.js → chunk-Q6SPIHFR.js} +8 -3
- package/dist/{chunk-F4OJN2F2.js → chunk-QIF4QE7T.js} +1 -1
- package/dist/{chunk-X22KTLZ7.js → chunk-QWJTJSIT.js} +1 -1
- package/dist/{chunk-2USXZSTK.js → chunk-QWW6RHZC.js} +5 -5
- package/dist/{chunk-NBKWY6XN.js → chunk-RILHLBKW.js} +3 -3
- package/dist/{chunk-EIZP3XL5.js → chunk-RPU4UOQK.js} +1 -1
- package/dist/{chunk-53SII3U2.js → chunk-RTMMO6IU.js} +6 -6
- package/dist/{chunk-IBEUR3J7.js → chunk-S7NGDLZ3.js} +3 -3
- package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
- package/dist/chunk-SPFLYPY6.js +6 -0
- package/dist/{chunk-SZBERGA4.js → chunk-TJKZ5QCJ.js} +4 -4
- package/dist/{chunk-YUKD5RCX.js → chunk-TPGIMZLI.js} +1 -1
- package/dist/{chunk-YHIJCI4U.js → chunk-UNE4VD5U.js} +3 -3
- package/dist/chunk-UX5UYDCY.js +33 -0
- package/dist/{chunk-6UZERVBI.js → chunk-V5K6HISS.js} +2 -2
- package/dist/{chunk-T5MJWWDX.js → chunk-VD27SL7H.js} +5 -5
- package/dist/{chunk-LRARA622.js → chunk-VE6GRIIN.js} +2 -2
- package/dist/{chunk-SSUUT5LK.js → chunk-W3UHAQCV.js} +5 -4
- package/dist/{chunk-U5G3AVED.js → chunk-WBCWER26.js} +1 -1
- package/dist/{chunk-OZ44ATGE.js → chunk-WCXFUBEF.js} +15 -15
- package/dist/{chunk-YQZBAP3S.js → chunk-WFE6CT6M.js} +76 -22
- package/dist/{chunk-PAVZ6FPK.js → chunk-WFHGJGCW.js} +5 -4
- package/dist/{chunk-LQD232FW.js → chunk-WJ5EU3KW.js} +1 -1
- package/dist/{chunk-XCIMOIX6.js → chunk-XBKWFLJG.js} +1 -1
- package/dist/chunk-XQUF3WIS.js +159 -0
- package/dist/{chunk-6SJTAE66.js → chunk-Y4PM3IDZ.js} +1 -1
- package/dist/{chunk-JQV7CXEC.js → chunk-YNGA3GRX.js} +17 -2
- package/dist/{chunk-BOZJOOGW.js → chunk-ZLHCZ5F2.js} +1 -1
- package/dist/{chunk-LHKHQAAY.js → chunk-ZLYGEART.js} +1 -1
- package/dist/{chunk-NBPMNUKZ.js → chunk-ZQCCVCHB.js} +1 -1
- package/dist/{chunk-ADGVQVHP.js → chunk-ZTOYVPGA.js} +3 -3
- package/dist/collections-XIHCTMSJ.js +70 -0
- package/dist/{configuration-C4IGBNXH.js → configuration-3GCBMM27.js} +3 -3
- package/dist/{configuration-7IYZ6GNP.js → configuration-FWZTMYXY.js} +5 -5
- package/dist/{create-MS6KKFSV.js → create-2RGNAVVY.js} +31 -32
- package/dist/{create-JF2OUZQA.js → create-32MXB6FD.js} +24 -25
- package/dist/create-3AMFYYI6.js +245 -0
- package/dist/create-AMNH3WXL.js +75 -0
- package/dist/{create-UPYB65PD.js → create-BV3QDTK2.js} +4 -4
- package/dist/{create-A7B3MLJX.js → create-FHIFVCSG.js} +47 -47
- package/dist/{create-ODOFJF5N.js → create-GO7APBBU.js} +30 -31
- package/dist/{create-F5R76QML.js → create-HEZYB7RF.js} +24 -23
- package/dist/{create-R7K3ECN6.js → create-K26SM34L.js} +3 -3
- package/dist/{create-MZYXMGKP.js → create-N534JQPH.js} +13 -13
- package/dist/{create-FKRYB7ZS.js → create-NEK6JCKR.js} +65 -51
- package/dist/{create-YBF4YGWG.js → create-NF2LPVXA.js} +3 -3
- package/dist/{create-JGYG5SBM.js → create-PJVLJ7T6.js} +47 -44
- package/dist/{create-O35JRZEF.js → create-RPBHXU32.js} +28 -29
- package/dist/{create-SFU3W3ZH.js → create-U64NEOEL.js} +3 -3
- package/dist/{create-GGACODDN.js → create-VL7LDTVE.js} +53 -36
- package/dist/{create-XVHOCZHJ.js → create-X5SOAPD3.js} +3 -3
- package/dist/{create-TKXH5KQY.js → create-XLYGW5PN.js} +61 -37
- package/dist/{create-5PSOIHIT.js → create-YKYLCEAK.js} +6 -6
- package/dist/customer-group-add-customers-2C53NFBJ.js +251 -0
- package/dist/customer-group-create-75QQEQZF.js +147 -0
- package/dist/customer-group-detail-AOQYYAOG.js +58 -0
- package/dist/customer-group-edit-N77RCW6I.js +138 -0
- package/dist/customer-groups-GNFV7VMT.js +284 -0
- package/dist/{customers-SOLJ2KQQ.js → customers-HNINO6YL.js} +9 -9
- package/dist/{edit-Y2U3KAVB.js → edit-3DUCWSLA.js} +34 -30
- package/dist/{edit-ORXS3A2Y.js → edit-3V34KJS2.js} +3 -3
- package/dist/{edit-2R5QCPTB.js → edit-4PWAJ7A3.js} +25 -26
- package/dist/{edit-5CROKEJE.js → edit-7CLOJ3UZ.js} +48 -48
- package/dist/{edit-ZAHCMF5U.js → edit-7SBPHN6P.js} +3 -3
- package/dist/edit-BSD6667Q.js +367 -0
- package/dist/{edit-Q3UQIOLS.js → edit-I2RJUPWV.js} +4 -4
- package/dist/{edit-FXNXTVIW.js → edit-IJ6DCBUU.js} +5 -5
- package/dist/{edit-ZMERG3L7.js → edit-JB7KVBOL.js} +5 -5
- package/dist/{edit-O4JLGKQR.js → edit-NHQJLCAK.js} +4 -4
- package/dist/edit-O65JD54W.js +103 -0
- package/dist/{edit-G2E5SNGU.js → edit-SIKOSSHF.js} +24 -25
- package/dist/{edit-VVLITC2E.js → edit-TD7QFM4Z.js} +36 -75
- package/dist/{edit-C4OCKQVU.js → edit-UNN3QTEJ.js} +3 -3
- package/dist/{edit-HTLLYECP.js → edit-WEUFBORT.js} +33 -35
- package/dist/{edit-KAKVPHZZ.js → edit-WN2Q3TOX.js} +4 -4
- package/dist/{edit-3E4ZO7HT.js → edit-ZGAOUZYP.js} +33 -35
- package/dist/{edit-522DG3BY.js → edit-ZOLSAIKF.js} +3 -3
- package/dist/{edit-OKU6FMHJ.js → edit-ZORE6RUD.js} +25 -26
- package/dist/{edit-budget-L3CCEWNF.js → edit-budget-D22WMVYR.js} +3 -3
- package/dist/{edit-inventory-item-ZKXXL3QK.js → edit-inventory-item-QMYWEBZ3.js} +3 -3
- package/dist/{edit-inventory-item-attributes-GSKUMORD.js → edit-inventory-item-attributes-HLG6JR6S.js} +3 -3
- package/dist/edit-price-F7ZWM3FN.js +197 -0
- package/dist/edit-stock-ITAZNHPU.js +230 -0
- package/dist/fulfillment-U2GRQ6DD.js +641 -0
- package/dist/{fulfillment-providers-G2L6LEVO.js → fulfillment-providers-CMU2JB5X.js} +39 -40
- package/dist/index.css +64 -33
- package/dist/index.js +334 -243
- package/dist/{offer-inventory-batch-page-BD6PMDLW.js → inventory-4JKLAZ2Q.js} +18 -18
- package/dist/{inventory-WSFLTA6Z.js → inventory-FKEXULLT.js} +8 -8
- package/dist/{invite-2673PU4I.js → invite-3R2CEWLN.js} +23 -24
- package/dist/{invite-HRXZ5YBP.js → invite-MNAX6EUC.js} +38 -39
- package/dist/loader-HTPUNIOS.js +34 -0
- package/dist/loader-MAAMUP2Z.js +33 -0
- package/dist/{locations-INS6FTMJ.js → locations-2VWSMWHL.js} +3 -3
- package/dist/login-YUWOWICV.js +39 -0
- package/dist/{manage-locations-XHH5DVIR.js → manage-locations-RWGDXXJQ.js} +3 -3
- package/dist/{media-J22P2DK4.js → media-P6WSFHY4.js} +31 -31
- package/dist/media-YB4G5CMV.js +316 -0
- package/dist/{metadata-Q74OJWUD.js → metadata-5Q6FLVX4.js} +27 -28
- package/dist/{metadata-D6M66NQK.js → metadata-6OYHLPLA.js} +25 -26
- package/dist/{metadata-YVHJPDLD.js → metadata-ADXGD4Y6.js} +25 -26
- package/dist/{metadata-REQIFWWH.js → metadata-J447GEBP.js} +27 -28
- package/dist/{metadata-NIDIBXJT.js → metadata-VTQ2CGZX.js} +27 -28
- package/dist/{offer-create-page-E4FLSDJQ.js → offer-create-page-ACPKTNHA.js} +244 -265
- package/dist/offer-detail-page-S4R4N5GL.js +584 -0
- package/dist/offer-variant-detail-page-XUMDXZUD.js +402 -0
- package/dist/offers-OTZJBW43.js +54 -0
- package/dist/{onboarding-MK2RIFD4.js → onboarding-TUGXFOA6.js} +23 -24
- package/dist/orders-PJSJNGZS.js +63 -0
- package/dist/{organization-XO3T2K2X.js → organization-YIOAVFHN.js} +26 -27
- package/dist/{organize-Z7JTTDH4.js → organize-BTA7NJD2.js} +4 -4
- package/dist/{organize-5XRZWD5C.js → organize-OWT5QSJR.js} +4 -4
- package/dist/pages/index.d.ts +232 -232
- package/dist/pages/index.js +81 -82
- package/dist/{payment-details-CFTX3QDL.js → payment-details-K2XFATEL.js} +24 -25
- package/dist/{payouts-7Q7D4FET.js → payouts-K5IDTJV3.js} +8 -8
- package/dist/{price-lists-6TFLA53G.js → price-lists-DNPIPDAW.js} +11 -11
- package/dist/{offer-pricing-edit-page-4TINK42V.js → pricing-5VUPPNKS.js} +21 -19
- package/dist/{pricing-ECXV6K7G.js → pricing-J5FIDZIY.js} +28 -29
- package/dist/{product-tags-5O7ZG6SA.js → product-tags-SJYIGXEV.js} +42 -42
- package/dist/{product-types-PKUEL7X5.js → product-types-4PTJW5DE.js} +8 -8
- package/dist/product-variant-detail-FO6J3RFA.js +371 -0
- package/dist/{product-variant-edit-WZNO4CQX.js → product-variant-edit-55TAIBZO.js} +45 -27
- package/dist/{products-BM3IIH5P.js → products-EQMANSO6.js} +39 -40
- package/dist/products-XM57LXJK.js +92 -0
- package/dist/{professional-details-ED4HNYXY.js → professional-details-WWZPTXSX.js} +24 -25
- package/dist/{profile-6TGCNNUU.js → profile-5IADQ727.js} +27 -28
- package/dist/{promotions-AZM7JQAJ.js → promotions-BYW6TZ5B.js} +10 -10
- package/dist/{receive-2GFZTVNC.js → receive-MTXKKPKZ.js} +62 -20
- package/dist/{refund-IGMSXQNX.js → refund-3IXGYA7W.js} +8 -8
- package/dist/{register-ADZCPWEV.js → register-U5PQZATC.js} +25 -26
- package/dist/{reset-password-RGWK33Q7.js → reset-password-SKUJJLSV.js} +3 -3
- package/dist/{return-reasons-QJRA2ZX6.js → return-reasons-QDPSIJG3.js} +16 -15
- package/dist/{sales-channels-U55MUDQP.js → sales-channels-GBSTCWVP.js} +10 -11
- package/dist/{sales-channels-CZDU7VTE.js → sales-channels-N4NE3FXP.js} +14 -15
- package/dist/{settings-2GCQQTO6.js → settings-ZUBBFS67.js} +49 -49
- package/dist/{shipment-HWQHMX2L.js → shipment-TKSCPC3M.js} +24 -25
- package/dist/shipping-DODEUYOQ.js +125 -0
- package/dist/{shipping-profile-ZP7M6VSS.js → shipping-profile-O4JMJLN7.js} +5 -9
- package/dist/shipping-profiles-4TJ4IH6U.js +46 -0
- package/dist/{stock-MQA7PRO6.js → stock-GYK2GHJN.js} +27 -28
- package/dist/{store-5ZHZR4JI.js → store-XWOALZ5Q.js} +34 -35
- package/dist/{store-closure-H5WHV3LA.js → store-closure-46B3XZ2I.js} +24 -25
- package/dist/{store-select-PZS556FB.js → store-select-E77E3ZY7.js} +24 -25
- package/dist/{tax-regions-HDLBFZVG.js → tax-regions-S2LFRTMP.js} +9 -9
- package/dist/{team-CLKJCZNH.js → team-N2C5JPSU.js} +35 -36
- package/package.json +12 -12
- package/dist/[id]-B4YZTANM.js +0 -1571
- package/dist/[id]-FE5GYYVZ.js +0 -481
- package/dist/allocate-items-TCM5A55Y.js +0 -548
- package/dist/attributes-SZP2MM5L.js +0 -278
- package/dist/breadcrumb-5NP23D6X.js +0 -34
- package/dist/breadcrumb-EVZIOB2G.js +0 -47
- package/dist/breadcrumb-TNJSGX4T.js +0 -48
- package/dist/chunk-27KRIXMQ.js +0 -71
- package/dist/chunk-BDZOSMAX.js +0 -23
- package/dist/chunk-CFRWIQIZ.js +0 -43
- package/dist/chunk-FP6U6BPH.js +0 -61
- package/dist/chunk-RXV7INUV.js +0 -426
- package/dist/chunk-T6LHVNWO.js +0 -27
- package/dist/collections-URH2TCWJ.js +0 -69
- package/dist/create-7R6CZU53.js +0 -215
- package/dist/create-Z5VPBELS.js +0 -76
- package/dist/edit-GQNIINRR.js +0 -192
- package/dist/edit-XSICGAVO.js +0 -176
- package/dist/fulfillment-76IVZ266.js +0 -567
- package/dist/loader-VDYPD3RI.js +0 -31
- package/dist/login-TWUBU6I6.js +0 -40
- package/dist/metadata-5BPOBBU2.js +0 -45
- package/dist/offer-detail-page-6SIBQTLP.js +0 -492
- package/dist/offer-edit-page-3MO566RP.js +0 -151
- package/dist/offers-GVN5LCK6.js +0 -32
- package/dist/orders-TVQDR4OJ.js +0 -64
- package/dist/product-variant-detail-PUWOMVHQ.js +0 -210
- package/dist/products-XE5YPQ66.js +0 -93
- package/dist/shipping-profiles-C5WBXWZ2.js +0 -47
|
@@ -7,27 +7,27 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
usePromotionTableColumns,
|
|
9
9
|
usePromotionTableQuery
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-TPGIMZLI.js";
|
|
11
|
+
import "./chunk-Y4PM3IDZ.js";
|
|
12
12
|
import "./chunk-JHIMVLB2.js";
|
|
13
13
|
import {
|
|
14
14
|
usePromotionTableFilters
|
|
15
15
|
} from "./chunk-S2WEYEQR.js";
|
|
16
16
|
import "./chunk-FMFVTERD.js";
|
|
17
|
-
import "./chunk-FQERBIVS.js";
|
|
18
17
|
import "./chunk-DB6ANJBO.js";
|
|
19
18
|
import "./chunk-PHOCVOZ5.js";
|
|
19
|
+
import {
|
|
20
|
+
currencies
|
|
21
|
+
} from "./chunk-IQPN4PZJ.js";
|
|
22
|
+
import "./chunk-KZQFIPY2.js";
|
|
23
|
+
import "./chunk-FQERBIVS.js";
|
|
20
24
|
import {
|
|
21
25
|
_DataTable,
|
|
22
26
|
useDataTable
|
|
23
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-W3UHAQCV.js";
|
|
24
28
|
import "./chunk-YN3FGNJM.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import {
|
|
28
|
-
currencies
|
|
29
|
-
} from "./chunk-IQPN4PZJ.js";
|
|
30
|
-
import "./chunk-PZEPOPMV.js";
|
|
29
|
+
import "./chunk-KCHYLLVG.js";
|
|
30
|
+
import "./chunk-634XVU3D.js";
|
|
31
31
|
import {
|
|
32
32
|
TwoColumnPage
|
|
33
33
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -36,26 +36,26 @@ import "./chunk-LRD242C7.js";
|
|
|
36
36
|
import {
|
|
37
37
|
TwoColumnPageSkeleton
|
|
38
38
|
} from "./chunk-INNFZYX2.js";
|
|
39
|
-
import {
|
|
40
|
-
campaignsQueryKeys,
|
|
41
|
-
promotionsQueryKeys,
|
|
42
|
-
useCampaign,
|
|
43
|
-
useDeleteCampaign,
|
|
44
|
-
useRemovePromotionFromCampaign
|
|
45
|
-
} from "./chunk-BOZJOOGW.js";
|
|
46
39
|
import {
|
|
47
40
|
ActionMenu
|
|
48
41
|
} from "./chunk-BDGZ4EQO.js";
|
|
49
42
|
import "./chunk-LAVHRER2.js";
|
|
50
43
|
import "./chunk-QHQWEERJ.js";
|
|
51
44
|
import "./chunk-Y7QKP6QU.js";
|
|
45
|
+
import {
|
|
46
|
+
campaignsQueryKeys,
|
|
47
|
+
promotionsQueryKeys,
|
|
48
|
+
useCampaign,
|
|
49
|
+
useDeleteCampaign,
|
|
50
|
+
useRemovePromotionFromCampaign
|
|
51
|
+
} from "./chunk-ZLHCZ5F2.js";
|
|
52
52
|
import {
|
|
53
53
|
queryClient
|
|
54
54
|
} from "./chunk-RHKRREUU.js";
|
|
55
55
|
import "./chunk-ZA2KFUFR.js";
|
|
56
56
|
import {
|
|
57
57
|
fetchQuery
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-LXZXXOJ3.js";
|
|
59
59
|
import "./chunk-NBMM2TZK.js";
|
|
60
60
|
|
|
61
61
|
// src/pages/campaigns/[id]/loader.tsx
|
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCustomerGroupTableQuery
|
|
3
|
+
} from "./chunk-VKOE5J66.js";
|
|
4
|
+
import {
|
|
5
|
+
TextCell,
|
|
6
|
+
TextHeader
|
|
7
|
+
} from "./chunk-JHIMVLB2.js";
|
|
8
|
+
import {
|
|
9
|
+
useOrderTableColumns
|
|
10
|
+
} from "./chunk-E6W57UP3.js";
|
|
11
|
+
import {
|
|
12
|
+
useOrderTableQuery
|
|
13
|
+
} from "./chunk-XBKWFLJG.js";
|
|
14
|
+
import {
|
|
15
|
+
useOrderTableFilters
|
|
16
|
+
} from "./chunk-5ALC4Z2H.js";
|
|
17
|
+
import {
|
|
18
|
+
useCustomerGroupTableFilters
|
|
19
|
+
} from "./chunk-CMHI2RPL.js";
|
|
20
|
+
import "./chunk-HB3BP55W.js";
|
|
21
|
+
import "./chunk-SYNUA6LQ.js";
|
|
22
|
+
import "./chunk-L57USMYC.js";
|
|
23
|
+
import "./chunk-LQSLDDPT.js";
|
|
24
|
+
import "./chunk-3BXCPHN6.js";
|
|
25
|
+
import {
|
|
26
|
+
getCountryByIso2
|
|
27
|
+
} from "./chunk-JRTZWK77.js";
|
|
28
|
+
import "./chunk-DB6ANJBO.js";
|
|
29
|
+
import "./chunk-PHOCVOZ5.js";
|
|
30
|
+
import "./chunk-IQPN4PZJ.js";
|
|
31
|
+
import "./chunk-FQERBIVS.js";
|
|
32
|
+
import {
|
|
33
|
+
_DataTable,
|
|
34
|
+
useDataTable
|
|
35
|
+
} from "./chunk-W3UHAQCV.js";
|
|
36
|
+
import "./chunk-YN3FGNJM.js";
|
|
37
|
+
import "./chunk-KCHYLLVG.js";
|
|
38
|
+
import {
|
|
39
|
+
NoRecords
|
|
40
|
+
} from "./chunk-634XVU3D.js";
|
|
41
|
+
import {
|
|
42
|
+
TwoColumnPage
|
|
43
|
+
} from "./chunk-YV6MK4PZ.js";
|
|
44
|
+
import "./chunk-THHRRYRS.js";
|
|
45
|
+
import "./chunk-LRD242C7.js";
|
|
46
|
+
import {
|
|
47
|
+
TwoColumnPageSkeleton
|
|
48
|
+
} from "./chunk-INNFZYX2.js";
|
|
49
|
+
import {
|
|
50
|
+
ActionMenu
|
|
51
|
+
} from "./chunk-BDGZ4EQO.js";
|
|
52
|
+
import "./chunk-LAVHRER2.js";
|
|
53
|
+
import "./chunk-QHQWEERJ.js";
|
|
54
|
+
import "./chunk-Y7QKP6QU.js";
|
|
55
|
+
import "./chunk-BQHVM46E.js";
|
|
56
|
+
import "./chunk-QIF4QE7T.js";
|
|
57
|
+
import "./chunk-VE6GRIIN.js";
|
|
58
|
+
import "./chunk-7MARNXFG.js";
|
|
59
|
+
import "./chunk-MNHP6YRC.js";
|
|
60
|
+
import "./chunk-NTJ3BMOE.js";
|
|
61
|
+
import "./chunk-5PAUN3PM.js";
|
|
62
|
+
import "./chunk-ZLHCZ5F2.js";
|
|
63
|
+
import "./chunk-GZ4KTAWS.js";
|
|
64
|
+
import "./chunk-PUAWN7SS.js";
|
|
65
|
+
import "./chunk-MVEHWM7K.js";
|
|
66
|
+
import {
|
|
67
|
+
useBatchCustomerCustomerGroups,
|
|
68
|
+
useCustomer,
|
|
69
|
+
useCustomerGroups,
|
|
70
|
+
useRemoveCustomersFromGroup
|
|
71
|
+
} from "./chunk-OYUJYPDF.js";
|
|
72
|
+
import "./chunk-O7BGGWW6.js";
|
|
73
|
+
import "./chunk-KIURBTC4.js";
|
|
74
|
+
import "./chunk-3SH24DGG.js";
|
|
75
|
+
import "./chunk-JR7AABT5.js";
|
|
76
|
+
import "./chunk-ZQCCVCHB.js";
|
|
77
|
+
import "./chunk-5BQO3YQP.js";
|
|
78
|
+
import "./chunk-EPRYM3FA.js";
|
|
79
|
+
import {
|
|
80
|
+
useOrders
|
|
81
|
+
} from "./chunk-6FDPVW7Y.js";
|
|
82
|
+
import "./chunk-JJP6AKMV.js";
|
|
83
|
+
import {
|
|
84
|
+
productsQueryKeys
|
|
85
|
+
} from "./chunk-G6YNCIVF.js";
|
|
86
|
+
import "./chunk-A5DJIOHN.js";
|
|
87
|
+
import {
|
|
88
|
+
queryClient
|
|
89
|
+
} from "./chunk-RHKRREUU.js";
|
|
90
|
+
import "./chunk-ZA2KFUFR.js";
|
|
91
|
+
import {
|
|
92
|
+
fetchQuery
|
|
93
|
+
} from "./chunk-LXZXXOJ3.js";
|
|
94
|
+
import "./chunk-NBMM2TZK.js";
|
|
95
|
+
|
|
96
|
+
// src/pages/customers/[id]/loader.tsx
|
|
97
|
+
var customerDetailQuery = (id) => ({
|
|
98
|
+
queryKey: productsQueryKeys.detail(id),
|
|
99
|
+
queryFn: async () => fetchQuery(`/vendor/customers/${id}`, {
|
|
100
|
+
method: "GET",
|
|
101
|
+
query: { fields: "*groups, *groups.customers" }
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
var loader = async ({ params }) => {
|
|
105
|
+
const id = params.id;
|
|
106
|
+
const query = customerDetailQuery(id);
|
|
107
|
+
return queryClient.ensureQueryData(query);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// src/pages/customers/[id]/customer-detail-page.tsx
|
|
111
|
+
import { Children } from "react";
|
|
112
|
+
import { useLoaderData, useParams } from "react-router-dom";
|
|
113
|
+
|
|
114
|
+
// src/pages/customers/[id]/_components/customer-address-section/customer-address-section.tsx
|
|
115
|
+
import { Container, Heading, Text } from "@medusajs/ui";
|
|
116
|
+
import { useTranslation } from "react-i18next";
|
|
117
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
118
|
+
var getAddressLabel = (address) => {
|
|
119
|
+
if (address.address_name) {
|
|
120
|
+
return address.address_name;
|
|
121
|
+
}
|
|
122
|
+
const name = [address.first_name, address.last_name].filter(Boolean).join(" ");
|
|
123
|
+
return name || "Address";
|
|
124
|
+
};
|
|
125
|
+
var CustomerAddressSection = ({
|
|
126
|
+
customer
|
|
127
|
+
}) => {
|
|
128
|
+
const { t: t2 } = useTranslation();
|
|
129
|
+
const addresses = customer.addresses ?? [];
|
|
130
|
+
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", "data-testid": "customer-address-section", children: [
|
|
131
|
+
/* @__PURE__ */ jsx(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: "flex items-center justify-between px-6 py-4",
|
|
135
|
+
"data-testid": "customer-address-section-header",
|
|
136
|
+
children: /* @__PURE__ */ jsx(Heading, { level: "h2", "data-testid": "customer-address-section-heading", children: t2("customers.addresses.title") })
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
addresses.length === 0 ? /* @__PURE__ */ jsx("div", { "data-testid": "customer-address-section-empty", children: /* @__PURE__ */ jsx(
|
|
140
|
+
NoRecords,
|
|
141
|
+
{
|
|
142
|
+
className: "flex h-full flex-col overflow-hidden p-6",
|
|
143
|
+
icon: null,
|
|
144
|
+
title: t2("customers.addresses.emptyTitle"),
|
|
145
|
+
message: t2("customers.addresses.emptyMessage")
|
|
146
|
+
}
|
|
147
|
+
) }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-y-2 p-3", children: addresses.map((address) => {
|
|
148
|
+
const country = getCountryByIso2(address.country_code)?.display_name ?? address.country_code?.toUpperCase();
|
|
149
|
+
const cityLine = [address.city, address.postal_code].filter(Boolean).join(", ");
|
|
150
|
+
return /* @__PURE__ */ jsxs(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
className: "bg-ui-bg-subtle border-ui-border-base flex flex-col gap-y-1 rounded-lg border px-3 py-2",
|
|
154
|
+
"data-testid": `customer-address-section-address-${address.id}`,
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ jsx(Text, { size: "small", weight: "plus", leading: "compact", children: getAddressLabel(address) }),
|
|
157
|
+
address.address_1 && /* @__PURE__ */ jsx(
|
|
158
|
+
Text,
|
|
159
|
+
{
|
|
160
|
+
size: "small",
|
|
161
|
+
leading: "compact",
|
|
162
|
+
className: "text-ui-fg-subtle",
|
|
163
|
+
children: address.address_1
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
address.address_2 && /* @__PURE__ */ jsx(
|
|
167
|
+
Text,
|
|
168
|
+
{
|
|
169
|
+
size: "small",
|
|
170
|
+
leading: "compact",
|
|
171
|
+
className: "text-ui-fg-subtle",
|
|
172
|
+
children: address.address_2
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
cityLine && /* @__PURE__ */ jsx(
|
|
176
|
+
Text,
|
|
177
|
+
{
|
|
178
|
+
size: "small",
|
|
179
|
+
leading: "compact",
|
|
180
|
+
className: "text-ui-fg-subtle",
|
|
181
|
+
children: cityLine
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
country && /* @__PURE__ */ jsx(
|
|
185
|
+
Text,
|
|
186
|
+
{
|
|
187
|
+
size: "small",
|
|
188
|
+
leading: "compact",
|
|
189
|
+
className: "text-ui-fg-subtle",
|
|
190
|
+
children: country
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
address.id
|
|
196
|
+
);
|
|
197
|
+
}) })
|
|
198
|
+
] });
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// src/pages/customers/[id]/_components/customer-general-section/customer-general-section.tsx
|
|
202
|
+
import { Container as Container2, Heading as Heading2, StatusBadge, Text as Text2 } from "@medusajs/ui";
|
|
203
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
204
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
205
|
+
var CustomerGeneralSection = ({
|
|
206
|
+
customer
|
|
207
|
+
}) => {
|
|
208
|
+
const { t: t2 } = useTranslation2();
|
|
209
|
+
const name = [customer.first_name, customer.last_name].filter(Boolean).join(" ");
|
|
210
|
+
const statusColor = customer.has_account ? "green" : "orange";
|
|
211
|
+
const statusText = customer.has_account ? t2("customers.fields.registered") : t2("customers.fields.guest");
|
|
212
|
+
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
|
|
213
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
214
|
+
/* @__PURE__ */ jsx2(Heading2, { children: customer.email }),
|
|
215
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ jsx2(StatusBadge, { color: statusColor, children: statusText }) })
|
|
216
|
+
] }),
|
|
217
|
+
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
218
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", weight: "plus", children: t2("fields.name") }),
|
|
219
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", children: name || "-" })
|
|
220
|
+
] }),
|
|
221
|
+
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
222
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", weight: "plus", children: t2("fields.company") }),
|
|
223
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", children: customer.company_name || "-" })
|
|
224
|
+
] }),
|
|
225
|
+
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
226
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", weight: "plus", children: t2("fields.phone") }),
|
|
227
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", children: customer.phone || "-" })
|
|
228
|
+
] })
|
|
229
|
+
] });
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// src/pages/customers/[id]/_components/customer-group-section/customer-group-section.tsx
|
|
233
|
+
import {
|
|
234
|
+
Button,
|
|
235
|
+
Checkbox,
|
|
236
|
+
Container as Container3,
|
|
237
|
+
Heading as Heading3,
|
|
238
|
+
toast,
|
|
239
|
+
usePrompt
|
|
240
|
+
} from "@medusajs/ui";
|
|
241
|
+
import { keepPreviousData } from "@tanstack/react-query";
|
|
242
|
+
import { createColumnHelper } from "@tanstack/react-table";
|
|
243
|
+
import { t } from "i18next";
|
|
244
|
+
import { useMemo, useState } from "react";
|
|
245
|
+
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
246
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
247
|
+
import { Link } from "react-router-dom";
|
|
248
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
249
|
+
var PAGE_SIZE = 10;
|
|
250
|
+
var PREFIX = "cusgr";
|
|
251
|
+
var DEFAULT_ORDER = "-created_at";
|
|
252
|
+
var CustomerGroupSection = ({
|
|
253
|
+
customer
|
|
254
|
+
}) => {
|
|
255
|
+
const prompt = usePrompt();
|
|
256
|
+
const [rowSelection, setRowSelection] = useState({});
|
|
257
|
+
const { searchParams, raw } = useCustomerGroupTableQuery({
|
|
258
|
+
pageSize: PAGE_SIZE,
|
|
259
|
+
prefix: PREFIX
|
|
260
|
+
});
|
|
261
|
+
const flatCustomerGroups = customer.groups ?? [];
|
|
262
|
+
const groupIds = useMemo(
|
|
263
|
+
() => (customer.groups ?? []).map((g) => g.id),
|
|
264
|
+
[customer.groups]
|
|
265
|
+
);
|
|
266
|
+
const {
|
|
267
|
+
customer_groups: customerGroups = [],
|
|
268
|
+
count = 0,
|
|
269
|
+
isLoading,
|
|
270
|
+
isError,
|
|
271
|
+
error
|
|
272
|
+
} = useCustomerGroups(
|
|
273
|
+
{
|
|
274
|
+
...searchParams,
|
|
275
|
+
id: groupIds,
|
|
276
|
+
order: searchParams.order || DEFAULT_ORDER,
|
|
277
|
+
fields: "id,name,created_at,updated_at,customers.id"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
enabled: groupIds.length > 0,
|
|
281
|
+
placeholderData: keepPreviousData
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
if (isError) {
|
|
285
|
+
throw error;
|
|
286
|
+
}
|
|
287
|
+
const customerCountByGroup = {};
|
|
288
|
+
for (const g of customerGroups) {
|
|
289
|
+
customerCountByGroup[g.id] = g.customers?.length ?? 0;
|
|
290
|
+
}
|
|
291
|
+
const { mutateAsync: batchCustomerCustomerGroups } = useBatchCustomerCustomerGroups(customer.id);
|
|
292
|
+
const filters = useCustomerGroupTableFilters();
|
|
293
|
+
const columns = useColumns(customer.id, customerCountByGroup);
|
|
294
|
+
const { table } = useDataTable({
|
|
295
|
+
data: customerGroups,
|
|
296
|
+
columns,
|
|
297
|
+
count,
|
|
298
|
+
getRowId: (row) => row.id,
|
|
299
|
+
enablePagination: true,
|
|
300
|
+
enableRowSelection: true,
|
|
301
|
+
pageSize: PAGE_SIZE,
|
|
302
|
+
prefix: PREFIX,
|
|
303
|
+
rowSelection: {
|
|
304
|
+
state: rowSelection,
|
|
305
|
+
updater: setRowSelection
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
const handleRemove = async () => {
|
|
309
|
+
const selectedIds = Object.keys(rowSelection);
|
|
310
|
+
const selectedGroups = flatCustomerGroups.filter(
|
|
311
|
+
(g) => selectedIds.includes(g.id)
|
|
312
|
+
);
|
|
313
|
+
const names = selectedGroups.map((g) => g.name);
|
|
314
|
+
const isSingle = selectedGroups.length === 1;
|
|
315
|
+
const res = await prompt({
|
|
316
|
+
title: t("customers.groups.removeTitle"),
|
|
317
|
+
description: isSingle ? t("customers.groups.remove", { name: names[0] }) : t("customers.groups.removeMany", { groups: names.join(", ") }),
|
|
318
|
+
confirmText: t("actions.remove"),
|
|
319
|
+
cancelText: t("actions.cancel")
|
|
320
|
+
});
|
|
321
|
+
if (!res) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const customerGroupIds = selectedGroups.map((g) => g.id);
|
|
325
|
+
await batchCustomerCustomerGroups(
|
|
326
|
+
{ remove: customerGroupIds, add: [] },
|
|
327
|
+
{
|
|
328
|
+
onSuccess: () => {
|
|
329
|
+
toast.success(
|
|
330
|
+
isSingle ? t("customers.groups.removed.successOne", { groups: names[0] }) : t("customers.groups.removed.successMany", {
|
|
331
|
+
groups: names.join(", ")
|
|
332
|
+
})
|
|
333
|
+
);
|
|
334
|
+
},
|
|
335
|
+
onError: (e) => {
|
|
336
|
+
toast.error(e.message);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
);
|
|
340
|
+
};
|
|
341
|
+
return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
|
|
342
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
343
|
+
/* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("customerGroups.domain") }),
|
|
344
|
+
/* @__PURE__ */ jsx3(Link, { to: `/customers/${customer.id}/add-customer-groups`, children: /* @__PURE__ */ jsx3(Button, { variant: "secondary", size: "small", children: t("general.add") }) })
|
|
345
|
+
] }),
|
|
346
|
+
/* @__PURE__ */ jsx3(
|
|
347
|
+
_DataTable,
|
|
348
|
+
{
|
|
349
|
+
table,
|
|
350
|
+
columns,
|
|
351
|
+
pageSize: PAGE_SIZE,
|
|
352
|
+
isLoading,
|
|
353
|
+
count,
|
|
354
|
+
prefix: PREFIX,
|
|
355
|
+
navigateTo: (row) => `/customer-groups/${row.original.id}`,
|
|
356
|
+
filters,
|
|
357
|
+
search: true,
|
|
358
|
+
pagination: true,
|
|
359
|
+
orderBy: [
|
|
360
|
+
{ key: "name", label: t("fields.name") },
|
|
361
|
+
{ key: "created_at", label: t("fields.createdAt") },
|
|
362
|
+
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
363
|
+
],
|
|
364
|
+
defaultOrderBy: DEFAULT_ORDER,
|
|
365
|
+
commands: [
|
|
366
|
+
{
|
|
367
|
+
action: handleRemove,
|
|
368
|
+
label: t("actions.remove"),
|
|
369
|
+
shortcut: "r"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
queryObject: raw,
|
|
373
|
+
noRecords: {
|
|
374
|
+
title: t("customers.groups.list.emptyTitle"),
|
|
375
|
+
message: t("customers.groups.list.noRecordsMessage"),
|
|
376
|
+
icon: null
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
)
|
|
380
|
+
] });
|
|
381
|
+
};
|
|
382
|
+
var CustomerGroupRowActions = ({
|
|
383
|
+
group,
|
|
384
|
+
customerId
|
|
385
|
+
}) => {
|
|
386
|
+
const prompt = usePrompt();
|
|
387
|
+
const { t: t2 } = useTranslation3();
|
|
388
|
+
const { mutateAsync } = useRemoveCustomersFromGroup(group.id);
|
|
389
|
+
const onRemove = async () => {
|
|
390
|
+
const res = await prompt({
|
|
391
|
+
title: t2("customers.groups.removeTitle"),
|
|
392
|
+
description: t2("customers.groups.remove", {
|
|
393
|
+
name: group.name
|
|
394
|
+
}),
|
|
395
|
+
confirmText: t2("actions.remove"),
|
|
396
|
+
cancelText: t2("actions.cancel")
|
|
397
|
+
});
|
|
398
|
+
if (!res) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
await mutateAsync([customerId], {
|
|
402
|
+
onSuccess: () => {
|
|
403
|
+
toast.success(
|
|
404
|
+
t2("customers.groups.removed.successOne", { groups: group.name })
|
|
405
|
+
);
|
|
406
|
+
},
|
|
407
|
+
onError: (error) => {
|
|
408
|
+
toast.error(error.message);
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
return /* @__PURE__ */ jsx3(
|
|
413
|
+
ActionMenu,
|
|
414
|
+
{
|
|
415
|
+
groups: [
|
|
416
|
+
{
|
|
417
|
+
actions: [
|
|
418
|
+
{
|
|
419
|
+
label: t2("actions.edit"),
|
|
420
|
+
icon: /* @__PURE__ */ jsx3(PencilSquare, {}),
|
|
421
|
+
to: `/customer-groups/${group.id}/edit`
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
label: t2("actions.remove"),
|
|
425
|
+
onClick: onRemove,
|
|
426
|
+
icon: /* @__PURE__ */ jsx3(Trash, {})
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
};
|
|
434
|
+
var columnHelper = createColumnHelper();
|
|
435
|
+
var useColumns = (customerId, customerCountByGroup = {}) => {
|
|
436
|
+
const { t: t2 } = useTranslation3();
|
|
437
|
+
return useMemo(
|
|
438
|
+
() => [
|
|
439
|
+
columnHelper.display({
|
|
440
|
+
id: "select",
|
|
441
|
+
header: ({ table }) => {
|
|
442
|
+
return /* @__PURE__ */ jsx3(
|
|
443
|
+
Checkbox,
|
|
444
|
+
{
|
|
445
|
+
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
446
|
+
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
},
|
|
450
|
+
cell: ({ row }) => {
|
|
451
|
+
return /* @__PURE__ */ jsx3(
|
|
452
|
+
Checkbox,
|
|
453
|
+
{
|
|
454
|
+
checked: row.getIsSelected(),
|
|
455
|
+
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
456
|
+
onClick: (e) => {
|
|
457
|
+
e.stopPropagation();
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
}),
|
|
463
|
+
columnHelper.accessor("name", {
|
|
464
|
+
header: () => /* @__PURE__ */ jsx3(TextHeader, { text: t2("fields.name") }),
|
|
465
|
+
cell: ({ row }) => {
|
|
466
|
+
return /* @__PURE__ */ jsx3(TextCell, { text: row.original?.name || "-" });
|
|
467
|
+
}
|
|
468
|
+
}),
|
|
469
|
+
columnHelper.display({
|
|
470
|
+
id: "customers",
|
|
471
|
+
header: () => /* @__PURE__ */ jsx3(TextHeader, { text: t2("customers.domain") }),
|
|
472
|
+
cell: ({ row }) => {
|
|
473
|
+
return /* @__PURE__ */ jsx3(TextCell, { text: `${customerCountByGroup[row.original.id] ?? 0}` });
|
|
474
|
+
}
|
|
475
|
+
}),
|
|
476
|
+
columnHelper.display({
|
|
477
|
+
id: "actions",
|
|
478
|
+
cell: ({ row }) => /* @__PURE__ */ jsx3(
|
|
479
|
+
CustomerGroupRowActions,
|
|
480
|
+
{
|
|
481
|
+
group: row.original,
|
|
482
|
+
customerId
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
})
|
|
486
|
+
],
|
|
487
|
+
[customerId, t2, customerCountByGroup]
|
|
488
|
+
);
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
// src/pages/customers/[id]/_components/customer-order-section/customer-order-section.tsx
|
|
492
|
+
import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
|
|
493
|
+
import { useMemo as useMemo2 } from "react";
|
|
494
|
+
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
495
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
496
|
+
var PREFIX2 = "cusord";
|
|
497
|
+
var PAGE_SIZE2 = 10;
|
|
498
|
+
var DEFAULT_RELATIONS = "*customer,*items,*sales_channel";
|
|
499
|
+
var DEFAULT_FIELDS = "id,status,display_id,created_at,updated_at,email,fulfillment_status,payment_status,total,currency_code";
|
|
500
|
+
var CustomerOrderSection = ({
|
|
501
|
+
customer
|
|
502
|
+
}) => {
|
|
503
|
+
const { t: t2 } = useTranslation4();
|
|
504
|
+
const { searchParams, raw } = useOrderTableQuery({
|
|
505
|
+
pageSize: PAGE_SIZE2,
|
|
506
|
+
prefix: PREFIX2
|
|
507
|
+
});
|
|
508
|
+
const { orders, count, isLoading, isError, error } = useOrders({
|
|
509
|
+
fields: DEFAULT_FIELDS + "," + DEFAULT_RELATIONS,
|
|
510
|
+
...searchParams,
|
|
511
|
+
customer_id: customer.id
|
|
512
|
+
});
|
|
513
|
+
const columns = useColumns2();
|
|
514
|
+
const filters = useOrderTableFilters();
|
|
515
|
+
const { table } = useDataTable({
|
|
516
|
+
data: orders ?? [],
|
|
517
|
+
columns,
|
|
518
|
+
enablePagination: true,
|
|
519
|
+
count,
|
|
520
|
+
pageSize: PAGE_SIZE2,
|
|
521
|
+
prefix: PREFIX2
|
|
522
|
+
});
|
|
523
|
+
if (isError) {
|
|
524
|
+
throw error;
|
|
525
|
+
}
|
|
526
|
+
return /* @__PURE__ */ jsxs4(Container4, { className: "divide-y p-0", children: [
|
|
527
|
+
/* @__PURE__ */ jsx4("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t2("orders.domain") }) }),
|
|
528
|
+
/* @__PURE__ */ jsx4(
|
|
529
|
+
_DataTable,
|
|
530
|
+
{
|
|
531
|
+
columns,
|
|
532
|
+
table,
|
|
533
|
+
pagination: true,
|
|
534
|
+
search: true,
|
|
535
|
+
navigateTo: (row) => `/orders/${row.original.id}`,
|
|
536
|
+
filters,
|
|
537
|
+
count,
|
|
538
|
+
isLoading,
|
|
539
|
+
pageSize: PAGE_SIZE2,
|
|
540
|
+
orderBy: [
|
|
541
|
+
{
|
|
542
|
+
key: "display_id",
|
|
543
|
+
label: t2("orders.fields.displayId")
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
key: "created_at",
|
|
547
|
+
label: t2("fields.createdAt")
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
key: "updated_at",
|
|
551
|
+
label: t2("fields.updatedAt")
|
|
552
|
+
}
|
|
553
|
+
],
|
|
554
|
+
defaultOrderBy: "-display_id",
|
|
555
|
+
queryObject: raw,
|
|
556
|
+
prefix: PREFIX2
|
|
557
|
+
}
|
|
558
|
+
)
|
|
559
|
+
] });
|
|
560
|
+
};
|
|
561
|
+
var useColumns2 = () => {
|
|
562
|
+
const base = useOrderTableColumns({
|
|
563
|
+
exclude: ["customer"]
|
|
564
|
+
});
|
|
565
|
+
return useMemo2(() => [...base], [base]);
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
// src/pages/customers/[id]/customer-detail-page.tsx
|
|
569
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
570
|
+
var Root = ({ children }) => {
|
|
571
|
+
const { id } = useParams();
|
|
572
|
+
const initialData = useLoaderData();
|
|
573
|
+
const { customer, isLoading, isError, error } = useCustomer(
|
|
574
|
+
id,
|
|
575
|
+
{},
|
|
576
|
+
{ initialData }
|
|
577
|
+
);
|
|
578
|
+
if (isLoading || !customer) {
|
|
579
|
+
return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1 });
|
|
580
|
+
}
|
|
581
|
+
if (isError) throw error;
|
|
582
|
+
return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: customer, showJSON: true, hasOutlet: true, children: [
|
|
583
|
+
/* @__PURE__ */ jsxs5(TwoColumnPage.Main, { children: [
|
|
584
|
+
/* @__PURE__ */ jsx5(CustomerGeneralSection, { customer }),
|
|
585
|
+
/* @__PURE__ */ jsx5(CustomerOrderSection, { customer }),
|
|
586
|
+
/* @__PURE__ */ jsx5(CustomerGroupSection, { customer })
|
|
587
|
+
] }),
|
|
588
|
+
/* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx5(CustomerAddressSection, { customer }) })
|
|
589
|
+
] }) });
|
|
590
|
+
};
|
|
591
|
+
var CustomerDetailPage = Object.assign(Root, {
|
|
592
|
+
Main: TwoColumnPage.Main,
|
|
593
|
+
Sidebar: TwoColumnPage.Sidebar,
|
|
594
|
+
GeneralSection: CustomerGeneralSection,
|
|
595
|
+
OrderSection: CustomerOrderSection,
|
|
596
|
+
GroupSection: CustomerGroupSection,
|
|
597
|
+
AddressSection: CustomerAddressSection
|
|
598
|
+
});
|
|
599
|
+
export {
|
|
600
|
+
CustomerDetailPage,
|
|
601
|
+
loader
|
|
602
|
+
};
|