@mercurjs/vendor 2.2.0-canary.3 → 2.2.0-canary.30
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]-6JGGGDHU.js → [id]-6EZKMGS3.js} +28 -27
- package/dist/{[id]-4OBGG7OH.js → [id]-AJHD2JBG.js} +242 -120
- package/dist/{[id]-H5OKTZGS.js → [id]-BIK5Z2MZ.js} +164 -73
- package/dist/{[id]-GJDD24KP.js → [id]-C44MOOPP.js} +40 -37
- package/dist/{[id]-KJIQTFGE.js → [id]-CWOLDJQG.js} +21 -21
- package/dist/{[id]-Y2ISCLUD.js → [id]-DSZ6O5YB.js} +9 -9
- package/dist/[id]-LTT6SEVO.js +968 -0
- package/dist/{[id]-DIH7QXB7.js → [id]-QPTWNV6F.js} +139 -47
- package/dist/{[id]-ZWWMJAKI.js → [id]-R54HF5A6.js} +17 -17
- package/dist/{[id]-R6MGTQWC.js → [id]-U4PPFOKM.js} +30 -29
- package/dist/[id]-VCCSCI42.js +3102 -0
- package/dist/{[id]-7BAKUHUO.js → [id]-XT4CE777.js} +10 -10
- package/dist/{[id]-K2CT7BXQ.js → [id]-YPCO3DJV.js} +1 -1
- package/dist/{[location_id]-NUBXDDJC.js → [location_id]-JUD3NS5F.js} +9 -9
- package/dist/{[province_id]-H2QAPKVH.js → [province_id]-HDOYCVHQ.js} +20 -20
- package/dist/{add-6P53VSJG.js → add-CITN342S.js} +42 -39
- package/dist/{add-35Q7CNQI.js → add-K5GYB4WX.js} +111 -42
- package/dist/{add-customer-groups-RAHCP67U.js → add-customer-groups-HS64J2J2.js} +34 -32
- package/dist/{add-products-ODCQDMQO.js → add-products-ACEYMSUF.js} +28 -28
- package/dist/{add-promotions-CSCAJZHV.js → add-promotions-AFYHEDSW.js} +16 -16
- package/dist/{add-to-campaign-DLP7PSQB.js → add-to-campaign-C6JDNB6F.js} +4 -4
- package/dist/{address-7F5SN7PV.js → address-R4OFOSBX.js} +13 -13
- package/dist/{adjust-inventory-SZF4W7LR.js → adjust-inventory-YKRMPBTJ.js} +2 -2
- package/dist/allocate-items-DYLMHVRH.js +685 -0
- package/dist/{areas-7Y6BVS5A.js → areas-AQH5FZPA.js} +10 -10
- package/dist/attributes-LYVFLG6K.js +353 -0
- package/dist/{breadcrumb-FLDHJRVY.js → breadcrumb-2CGKSBMZ.js} +9 -8
- package/dist/{breadcrumb-65SAGUUL.js → breadcrumb-64UVXQTL.js} +3 -3
- package/dist/breadcrumb-6MTEQMN6.js +28 -0
- package/dist/{breadcrumb-WRG4SITG.js → breadcrumb-G6SS6MMV.js} +13 -13
- package/dist/{breadcrumb-7PURSRTT.js → breadcrumb-JUB72A67.js} +12 -12
- package/dist/{breadcrumb-YBBYFQYG.js → breadcrumb-LBO2I4OJ.js} +1 -1
- package/dist/{breadcrumb-QV2IAX7N.js → breadcrumb-MCMJF3OE.js} +2 -2
- package/dist/{breadcrumb-VWELWDB2.js → breadcrumb-NGIFM7CV.js} +1 -1
- package/dist/{breadcrumb-ZCG2RHIU.js → breadcrumb-NOSEZXVY.js} +12 -12
- package/dist/breadcrumb-PIDJ23EZ.js +13 -0
- package/dist/{breadcrumb-HND5FFWC.js → breadcrumb-VNMDKEI5.js} +3 -3
- package/dist/{breadcrumb-EDPMEN2P.js → breadcrumb-Z3KMYS4Y.js} +2 -2
- package/dist/{campaigns-L6ULR6KR.js → campaigns-5AQWQ7RC.js} +8 -8
- package/dist/{categories-FUZQKBXV.js → categories-R3AMBSP5.js} +12 -10
- package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
- package/dist/chunk-3AGREI6E.js +62 -0
- package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
- package/dist/{chunk-UCQKXXLD.js → chunk-3KQZGDQV.js} +32 -34
- package/dist/chunk-42R54Z2X.js +8 -0
- package/dist/{chunk-FJUUGFXL.js → chunk-4WKIR5XO.js} +1 -1
- package/dist/chunk-5GCZTGBS.js +315 -0
- package/dist/{chunk-36L54SQQ.js → chunk-5I56OLCT.js} +4 -4
- package/dist/{chunk-3EF54XFY.js → chunk-634XVU3D.js} +1 -1
- package/dist/{chunk-QS6RWIBL.js → chunk-6AWQZ6KH.js} +34 -20
- package/dist/{chunk-EROX26D4.js → chunk-6XZUW2O4.js} +1 -1
- package/dist/chunk-7VWHJCFE.js +353 -0
- package/dist/{chunk-DIW4GRTI.js → chunk-A3UXSCYX.js} +101 -87
- package/dist/chunk-AB3DXR3O.js +434 -0
- package/dist/{chunk-2DXNJURE.js → chunk-BANA2M67.js} +1 -1
- package/dist/{chunk-Y4CJ2PCS.js → chunk-BAVE4NRL.js} +1 -5
- package/dist/{chunk-XFQJU6FA.js → chunk-CAE5333U.js} +4 -4
- package/dist/{chunk-44RQ5PTN.js → chunk-D6PUKNCS.js} +256 -101
- package/dist/chunk-DDDATLMF.js +438 -0
- package/dist/{chunk-L7QKFC5N.js → chunk-E6W57UP3.js} +32 -122
- package/dist/chunk-EEBJYXWA.js +15 -0
- package/dist/{chunk-JYF3S4EQ.js → chunk-EWTGE6OH.js} +57 -6
- package/dist/chunk-EYU2CGDJ.js +33 -0
- package/dist/{chunk-RZLN2Q6G.js → chunk-EZKHLCNR.js} +1 -1
- package/dist/{chunk-KD7RYE6R.js → chunk-FGC5L7FS.js} +2 -2
- package/dist/{chunk-SGR4DMCW.js → chunk-FRYZRBLA.js} +1 -1
- package/dist/chunk-FWPGOIFA.js +22 -0
- package/dist/chunk-FXWYPOF7.js +127 -0
- package/dist/chunk-GL7F6NDU.js +30 -0
- package/dist/{chunk-PVZBDWLK.js → chunk-GRH7C3QN.js} +1 -1
- package/dist/{chunk-EZ3JOAUS.js → chunk-GSUPF3NE.js} +4 -4
- package/dist/{chunk-PBD36EZJ.js → chunk-H5HI76AD.js} +4 -4
- package/dist/{chunk-YPQYLAKH.js → chunk-HARMTEUK.js} +530 -769
- package/dist/{chunk-WLT7K7K7.js → chunk-HDEOZN2Q.js} +21 -24
- package/dist/{chunk-FDR22JMM.js → chunk-HFRHHT36.js} +8 -63
- package/dist/{chunk-LNM2D2I4.js → chunk-HJZ2CVDZ.js} +7 -6
- package/dist/{chunk-DARJTN4I.js → chunk-IMJ62GAP.js} +10 -5
- package/dist/{chunk-PPLC4IKI.js → chunk-IV57G2CB.js} +14 -1
- package/dist/chunk-J6XCRFBW.js +30 -0
- package/dist/{chunk-NJMNYS7G.js → chunk-JEY5TDM5.js} +3 -3
- package/dist/{chunk-KAZ5BYTQ.js → chunk-KCHYLLVG.js} +6 -4
- package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
- package/dist/{chunk-WUPJADSO.js → chunk-KOUK7YFT.js} +5 -5
- package/dist/{chunk-N4MVIBFM.js → chunk-KWCBN633.js} +3 -3
- package/dist/chunk-L57USMYC.js +39 -0
- package/dist/{chunk-UORPTGV2.js → chunk-L5SD4XBS.js} +10 -14
- package/dist/{chunk-NHFEY3EI.js → chunk-LANE4H7T.js} +2 -2
- package/dist/chunk-LFX6WU4A.js +36 -0
- package/dist/{chunk-LWJF63JW.js → chunk-LTQQRVZG.js} +89 -14
- package/dist/{chunk-GXIAIITP.js → chunk-LV5EZWOX.js} +53 -56
- package/dist/chunk-LYYM7H7H.js +59 -0
- package/dist/{chunk-7LBY5JLV.js → chunk-MGT6XFNP.js} +1 -1
- package/dist/{chunk-W2W672GW.js → chunk-MXWDKGAM.js} +11 -11
- package/dist/{chunk-X4INVIWL.js → chunk-MZRZVLWD.js} +3 -3
- package/dist/{chunk-NSZQERLE.js → chunk-NIJNK5CS.js} +2 -2
- package/dist/{chunk-6BS2AVGJ.js → chunk-NVF4BLUM.js} +5 -5
- package/dist/{chunk-QXLRABYH.js → chunk-O7VOGTLX.js} +1 -1
- package/dist/{chunk-PZ44R4AS.js → chunk-OZBAEUQA.js} +1 -1
- package/dist/{chunk-DDH7ULIQ.js → chunk-P2HMPY3N.js} +1 -1
- package/dist/{chunk-R7TNADRU.js → chunk-PBB74PW6.js} +26 -7
- package/dist/chunk-PPULXKCH.js +185 -0
- package/dist/{chunk-WZMXJUHA.js → chunk-PXS7WEG4.js} +1 -1
- package/dist/{chunk-C3GLT4IN.js → chunk-Q57UH7FE.js} +23 -36
- package/dist/{chunk-UAF2S447.js → chunk-Q63ISWHT.js} +6 -11
- package/dist/{chunk-TNVYTMBL.js → chunk-QDBTXCKA.js} +4 -4
- package/dist/{chunk-M7KSRYRI.js → chunk-QVTZYG3U.js} +7 -7
- package/dist/{chunk-NXNJQZCP.js → chunk-RFVLS6FJ.js} +1 -1
- package/dist/{chunk-DVEKYLPV.js → chunk-RWJYOAOE.js} +4 -4
- package/dist/{chunk-QT7YFHCA.js → chunk-S23FD6FA.js} +12 -0
- package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
- package/dist/chunk-SJDIT3AX.js +173 -0
- package/dist/{chunk-QNNJN4H6.js → chunk-SNVHY6HG.js} +29 -14
- package/dist/chunk-SPFLYPY6.js +6 -0
- package/dist/{chunk-EIUYXS7E.js → chunk-SZBERGA4.js} +1 -1
- package/dist/{chunk-WBHFU3MG.js → chunk-SZUOI24A.js} +5 -5
- package/dist/{chunk-CNMY5HVP.js → chunk-TEJWBVHN.js} +3 -3
- package/dist/{chunk-4LVP635F.js → chunk-TKSKCYM3.js} +128 -126
- 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-K4X324QP.js → chunk-VRYEJWFQ.js} +6 -8
- package/dist/{chunk-AVOIZO63.js → chunk-WFE6CT6M.js} +77 -21
- package/dist/{chunk-LQD232FW.js → chunk-WJ5EU3KW.js} +1 -1
- package/dist/{chunk-6YA3C4NB.js → chunk-XBKWFLJG.js} +4 -13
- package/dist/chunk-XQUF3WIS.js +159 -0
- package/dist/{chunk-AIF2KTEE.js → chunk-XRLRKSND.js} +13 -3
- package/dist/{chunk-7SLWXX6L.js → chunk-XVUBZVX5.js} +5 -6
- package/dist/chunk-YBF45CX5.js +23 -0
- package/dist/{chunk-JQV7CXEC.js → chunk-YNGA3GRX.js} +17 -2
- package/dist/{chunk-FMRP2CNF.js → chunk-YZBEJ3CY.js} +2101 -1867
- package/dist/chunk-ZHFFTT3I.js +17 -0
- package/dist/{chunk-TODJFRLH.js → chunk-ZHR77OQI.js} +2 -2
- package/dist/{collections-KFIMHAFH.js → collections-SOYQK7NO.js} +30 -28
- package/dist/{configuration-C4IGBNXH.js → configuration-TXRAYMI4.js} +1 -1
- package/dist/{configuration-UOSNP45I.js → configuration-VBXVVRTD.js} +4 -4
- package/dist/create-2WGQOPXM.js +244 -0
- package/dist/{create-R7K3ECN6.js → create-3MUVY3UY.js} +1 -1
- package/dist/create-4R46RCQN.js +1798 -0
- package/dist/{create-GB3ZA4LH.js → create-5SJ3IB76.js} +4 -4
- package/dist/{create-SFU3W3ZH.js → create-6DRXGPYA.js} +1 -1
- package/dist/{create-JDGM5KXE.js → create-7OVKCYSV.js} +120 -50
- package/dist/{create-YBF4YGWG.js → create-BHSMHOFN.js} +1 -1
- package/dist/{create-XVHOCZHJ.js → create-BVUZWMET.js} +1 -1
- package/dist/{create-EYUDFNAD.js → create-CRGECNDK.js} +32 -31
- package/dist/{create-35MYQPVM.js → create-DBKWAC2G.js} +21 -21
- package/dist/{create-ORXYT74H.js → create-IVSGIXSO.js} +13 -13
- package/dist/{create-UPYB65PD.js → create-MKFDE32U.js} +1 -1
- package/dist/{create-XAD5NMSJ.js → create-MVANUZCK.js} +22 -22
- package/dist/{create-NBJXLNBX.js → create-PUZJOGSO.js} +31 -29
- package/dist/{create-UQNYMVBM.js → create-RQ74NTJE.js} +10 -10
- package/dist/create-UHK7EJDV.js +1179 -0
- package/dist/create-Y7MIMKH4.js +1931 -0
- package/dist/{create-BJ4OO6LS.js → create-YHFOQSQX.js} +16 -16
- package/dist/{create-YB7WXDLC.js → create-ZVVMOLET.js} +40 -37
- package/dist/customer-group-add-customers-OJ3BHCDH.js +251 -0
- package/dist/customer-group-create-DQHTB3SK.js +147 -0
- package/dist/customer-group-detail-VVTMDJM6.js +58 -0
- package/dist/customer-group-edit-H255WS2E.js +138 -0
- package/dist/customer-groups-UQZEBPUE.js +284 -0
- package/dist/{customers-ETXVNM3G.js → customers-EQHS5O7S.js} +10 -10
- package/dist/{edit-2Q7TRUTL.js → edit-22I3DZHO.js} +14 -14
- package/dist/{edit-ZMERG3L7.js → edit-3VNT35DW.js} +1 -1
- package/dist/edit-5BIS4YBD.js +103 -0
- package/dist/{edit-FKXIQ6ZI.js → edit-66CDFSPF.js} +18 -18
- package/dist/{edit-ORXS3A2Y.js → edit-6DUTTLEV.js} +1 -1
- package/dist/{edit-ZCXUG42Q.js → edit-6QGQBLE3.js} +13 -13
- package/dist/{edit-5KHNBRCJ.js → edit-ETI33NDU.js} +39 -36
- package/dist/{edit-ZAHCMF5U.js → edit-FQDSESVI.js} +1 -1
- package/dist/{edit-REDDBLTA.js → edit-IA7ADAWN.js} +4 -4
- package/dist/edit-K7UIFYGR.js +408 -0
- package/dist/{edit-O4JLGKQR.js → edit-MKVDAUA5.js} +1 -1
- package/dist/edit-N2QBT753.js +871 -0
- package/dist/{edit-522DG3BY.js → edit-RBREBAQQ.js} +1 -1
- package/dist/{edit-Q3UQIOLS.js → edit-RQHOHZR6.js} +1 -1
- package/dist/{edit-C4OCKQVU.js → edit-SM2GHVKW.js} +1 -1
- package/dist/{edit-KAKVPHZZ.js → edit-UVY3TEHD.js} +1 -1
- package/dist/{edit-L5ZZLMAY.js → edit-XMM62UNR.js} +44 -32
- package/dist/{edit-WFXFPX6F.js → edit-YENRR4IB.js} +36 -15
- package/dist/{edit-SGUY2CCK.js → edit-YNZSP3DD.js} +18 -18
- package/dist/{edit-budget-L3CCEWNF.js → edit-budget-4JMGEPNF.js} +1 -1
- package/dist/{edit-inventory-item-6B7ITDGD.js → edit-inventory-item-XKXQWDSP.js} +2 -2
- package/dist/{edit-inventory-item-attributes-Y7MQZLXI.js → edit-inventory-item-attributes-NJMYTTPE.js} +2 -2
- package/dist/edit-price-IKYUHLYM.js +197 -0
- package/dist/edit-stock-36U6RC3O.js +230 -0
- package/dist/fulfillment-TIIJJM6L.js +641 -0
- package/dist/{fulfillment-providers-EOT3XR6S.js → fulfillment-providers-DGFLU3ZP.js} +29 -29
- package/dist/index.css +114 -15
- package/dist/index.js +339 -219
- package/dist/{offer-inventory-batch-page-WKCWNDNK.js → inventory-GZGHT2DJ.js} +18 -18
- package/dist/{inventory-KAUVPMPZ.js → inventory-KO75L6US.js} +9 -9
- package/dist/{invite-UCHGUC4I.js → invite-76KFN3G5.js} +27 -27
- package/dist/{invite-CI2P4GF6.js → invite-KPRDM7JL.js} +12 -12
- package/dist/loader-4DEOSFQ3.js +33 -0
- package/dist/loader-5K57OWAT.js +34 -0
- package/dist/{locations-INS6FTMJ.js → locations-TFPQ6HUP.js} +2 -2
- package/dist/{login-KY342RMK.js → login-HH467YIZ.js} +12 -12
- package/dist/{manage-locations-WNHEBS3A.js → manage-locations-WGK2YZVU.js} +1 -1
- package/dist/media-7CAOPVNJ.js +316 -0
- package/dist/{media-37SKUCSV.js → media-IMLS3BIL.js} +18 -17
- package/dist/{metadata-NUXUC2JA.js → metadata-H4RNN4ZP.js} +16 -16
- package/dist/{metadata-TLDUF5KV.js → metadata-IDG536NR.js} +16 -16
- package/dist/{metadata-WR4RFXO5.js → metadata-PLHSGBGC.js} +16 -16
- package/dist/{metadata-2CMH4I6U.js → metadata-VGJL573A.js} +16 -16
- package/dist/{metadata-GWI6R4ES.js → metadata-YD6RONIS.js} +16 -16
- package/dist/{offer-create-page-DUXOKWEF.js → offer-create-page-ZZ67L7F7.js} +232 -259
- package/dist/offer-detail-page-P4JDRUC4.js +584 -0
- package/dist/offer-variant-detail-page-4J3JDCUL.js +402 -0
- package/dist/offers-OTVKZCZ7.js +54 -0
- package/dist/{onboarding-43LQQQGQ.js → onboarding-SVSMV3MK.js} +12 -12
- package/dist/{orders-FI5HTA6D.js → orders-JTSKH3HO.js} +28 -28
- package/dist/{organization-R2SDOJWJ.js → organization-DOE4EWHZ.js} +53 -89
- package/dist/{organize-K6QMAMEN.js → organize-42GGFFB3.js} +3 -3
- package/dist/{organize-HNJUHEEG.js → organize-HJQWP7XR.js} +3 -3
- package/dist/pages/index.d.ts +237 -213
- package/dist/pages/index.js +78 -76
- package/dist/{payment-details-64US5XWD.js → payment-details-HXCBAFI4.js} +13 -13
- package/dist/{payouts-UXJDTXDL.js → payouts-XXT4FERR.js} +10 -10
- package/dist/{price-lists-KBPUVSZI.js → price-lists-GRMS4HR2.js} +12 -12
- package/dist/{pricing-DF6C5XK4.js → pricing-NZAXMDQR.js} +21 -21
- package/dist/{offer-pricing-edit-page-4TYGGSOE.js → pricing-UT6KJXJU.js} +26 -20
- package/dist/{product-tags-W3P6O5XB.js → product-tags-ZEO6G6SZ.js} +37 -34
- package/dist/{product-types-UUHBV4IZ.js → product-types-RGDECHBF.js} +8 -8
- package/dist/product-variant-detail-IURD6MNK.js +371 -0
- package/dist/{product-variant-edit-HS6NLGRL.js → product-variant-edit-TLM22E67.js} +71 -45
- package/dist/{products-HKHE53B4.js → products-IJ6C5RHM.js} +29 -28
- package/dist/{products-QYXS7K7N.js → products-SNO4HEJG.js} +41 -40
- package/dist/{professional-details-5T2VS6MM.js → professional-details-7OKTBZCI.js} +13 -13
- package/dist/{profile-6XGHAT7H.js → profile-TXCQ6GJX.js} +20 -20
- package/dist/{promotions-O7U4BTK6.js → promotions-W5YZGLHZ.js} +11 -11
- package/dist/receive-A53FK6BK.js +578 -0
- package/dist/refund-EYAFIV6F.js +268 -0
- package/dist/{register-UKFNYOWP.js → register-DTY4YME7.js} +14 -14
- package/dist/{reset-password-EICPAY2N.js → reset-password-CNS4X2AQ.js} +1 -1
- package/dist/{return-reasons-HOJC3HRP.js → return-reasons-BSJQOAGD.js} +19 -16
- package/dist/{sales-channels-JW3QUYR7.js → sales-channels-E3TC6PIF.js} +11 -12
- package/dist/{sales-channels-B6FULRWI.js → sales-channels-L4O3F7K2.js} +10 -11
- package/dist/{settings-M33QP4QQ.js → settings-E6BGHI72.js} +44 -41
- package/dist/shipment-34A6XVWR.js +241 -0
- package/dist/shipping-TE5S7ZOF.js +125 -0
- package/dist/{shipping-profile-Y4SNEPZX.js → shipping-profile-SFJDPTEW.js} +4 -8
- package/dist/{shipping-profiles-2NWKCEJK.js → shipping-profiles-AATNMPNF.js} +21 -21
- package/dist/{stock-7CSVEJJU.js → stock-6H3IC3W5.js} +16 -16
- package/dist/{store-AH77OIM4.js → store-RD4MKWOF.js} +82 -151
- package/dist/{store-closure-P5PD2RSV.js → store-closure-CA5SMWRX.js} +19 -14
- package/dist/{store-select-U27PPPAJ.js → store-select-73OITCHV.js} +13 -13
- package/dist/{tax-regions-YXZW7UVX.js → tax-regions-OZL4PMW6.js} +7 -7
- package/dist/{team-IU5XJ65K.js → team-WXL5IYMC.js} +26 -26
- package/package.json +8 -8
- package/dist/[id]-LTNOHLGE.js +0 -1219
- package/dist/[id]-OQQ7PFP2.js +0 -1442
- package/dist/allocate-items-SDFS5GYN.js +0 -533
- package/dist/attributes-MBZ76HVZ.js +0 -278
- package/dist/chunk-432S4FGR.js +0 -0
- package/dist/chunk-AIZM66CG.js +0 -66
- package/dist/chunk-BDZOSMAX.js +0 -23
- package/dist/chunk-C2Z4OOKP.js +0 -426
- package/dist/chunk-CFRWIQIZ.js +0 -43
- package/dist/chunk-RXZFEFNV.js +0 -73
- package/dist/chunk-T6LHVNWO.js +0 -27
- package/dist/create-YXDLUQ4A.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-OQ5PN7L5.js +0 -32
- package/dist/product-variant-detail-RVWEYVPC.js +0 -220
- package/dist/shipment-Q33QBMXX.js +0 -176
- package/dist/{[id]-ZCMSBEVM.js → [id]-SQ3DJOVV.js} +5 -5
- package/dist/{chunk-E2HQPY32.js → chunk-THNTAJ27.js} +3 -3
- package/dist/{chunk-2USXZSTK.js → chunk-Y6AJDLSN.js} +3 -3
|
@@ -7,77 +7,82 @@ import {
|
|
|
7
7
|
} from "./chunk-JHIMVLB2.js";
|
|
8
8
|
import {
|
|
9
9
|
useOrderTableColumns
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-E6W57UP3.js";
|
|
11
11
|
import {
|
|
12
12
|
useOrderTableQuery
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XBKWFLJG.js";
|
|
14
14
|
import {
|
|
15
15
|
useOrderTableFilters
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LFX6WU4A.js";
|
|
17
17
|
import {
|
|
18
18
|
useCustomerGroupTableFilters
|
|
19
19
|
} from "./chunk-CMHI2RPL.js";
|
|
20
20
|
import "./chunk-HB3BP55W.js";
|
|
21
21
|
import "./chunk-SYNUA6LQ.js";
|
|
22
|
+
import "./chunk-L57USMYC.js";
|
|
22
23
|
import "./chunk-LQSLDDPT.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import
|
|
25
|
-
|
|
24
|
+
import "./chunk-3BXCPHN6.js";
|
|
25
|
+
import {
|
|
26
|
+
getCountryByIso2
|
|
27
|
+
} from "./chunk-JRTZWK77.js";
|
|
26
28
|
import "./chunk-DB6ANJBO.js";
|
|
27
29
|
import "./chunk-PHOCVOZ5.js";
|
|
30
|
+
import "./chunk-IQPN4PZJ.js";
|
|
31
|
+
import "./chunk-FQERBIVS.js";
|
|
28
32
|
import {
|
|
29
33
|
_DataTable,
|
|
30
34
|
useDataTable
|
|
31
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XRLRKSND.js";
|
|
32
36
|
import "./chunk-YN3FGNJM.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import
|
|
35
|
-
|
|
37
|
+
import "./chunk-KCHYLLVG.js";
|
|
38
|
+
import {
|
|
39
|
+
NoRecords
|
|
40
|
+
} from "./chunk-634XVU3D.js";
|
|
36
41
|
import {
|
|
37
|
-
|
|
42
|
+
TwoColumnPage
|
|
38
43
|
} from "./chunk-YV6MK4PZ.js";
|
|
39
|
-
import "./chunk-LRD242C7.js";
|
|
40
|
-
import "./chunk-QHQWEERJ.js";
|
|
41
44
|
import "./chunk-THHRRYRS.js";
|
|
45
|
+
import "./chunk-LRD242C7.js";
|
|
42
46
|
import {
|
|
43
|
-
|
|
47
|
+
TwoColumnPageSkeleton
|
|
44
48
|
} from "./chunk-INNFZYX2.js";
|
|
45
|
-
import
|
|
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-LV5EZWOX.js";
|
|
46
56
|
import "./chunk-F4OJN2F2.js";
|
|
47
57
|
import "./chunk-LRARA622.js";
|
|
48
58
|
import "./chunk-M6N4ISXL.js";
|
|
49
59
|
import "./chunk-S7EKBD2C.js";
|
|
50
|
-
import "./chunk-VXMOPVRH.js";
|
|
51
60
|
import "./chunk-VV6IKGCN.js";
|
|
52
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-LANE4H7T.js";
|
|
53
62
|
import "./chunk-BOZJOOGW.js";
|
|
63
|
+
import "./chunk-IQWK723D.js";
|
|
64
|
+
import "./chunk-4S6XGIC6.js";
|
|
65
|
+
import "./chunk-S23FD6FA.js";
|
|
54
66
|
import {
|
|
55
67
|
useBatchCustomerCustomerGroups,
|
|
56
68
|
useCustomer,
|
|
57
69
|
useCustomerGroups,
|
|
58
70
|
useRemoveCustomersFromGroup
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-4S6XGIC6.js";
|
|
62
|
-
import "./chunk-QT7YFHCA.js";
|
|
63
|
-
import "./chunk-IQWK723D.js";
|
|
64
|
-
import "./chunk-UORPTGV2.js";
|
|
65
|
-
import "./chunk-NXNJQZCP.js";
|
|
71
|
+
} from "./chunk-LTQQRVZG.js";
|
|
72
|
+
import "./chunk-RFVLS6FJ.js";
|
|
66
73
|
import "./chunk-VXWN37PT.js";
|
|
67
|
-
import "./chunk-
|
|
74
|
+
import "./chunk-EZKHLCNR.js";
|
|
75
|
+
import "./chunk-VXMOPVRH.js";
|
|
68
76
|
import "./chunk-NBPMNUKZ.js";
|
|
77
|
+
import "./chunk-3AGREI6E.js";
|
|
78
|
+
import "./chunk-L5SD4XBS.js";
|
|
69
79
|
import {
|
|
70
80
|
useOrders
|
|
71
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-6AWQZ6KH.js";
|
|
72
82
|
import "./chunk-3B34B2M2.js";
|
|
73
|
-
import {
|
|
74
|
-
ActionMenu
|
|
75
|
-
} from "./chunk-BDGZ4EQO.js";
|
|
76
|
-
import "./chunk-LAVHRER2.js";
|
|
77
|
-
import "./chunk-Y7QKP6QU.js";
|
|
78
83
|
import {
|
|
79
84
|
productsQueryKeys
|
|
80
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-SNVHY6HG.js";
|
|
81
86
|
import "./chunk-A5DJIOHN.js";
|
|
82
87
|
import {
|
|
83
88
|
queryClient
|
|
@@ -106,33 +111,120 @@ var loader = async ({ params }) => {
|
|
|
106
111
|
import { Children } from "react";
|
|
107
112
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
108
113
|
|
|
109
|
-
// src/pages/customers/[id]/_components/customer-
|
|
110
|
-
import { Container, Heading,
|
|
114
|
+
// src/pages/customers/[id]/_components/customer-address-section/customer-address-section.tsx
|
|
115
|
+
import { Container, Heading, Text } from "@medusajs/ui";
|
|
111
116
|
import { useTranslation } from "react-i18next";
|
|
112
117
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
113
|
-
var
|
|
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 = ({
|
|
114
126
|
customer
|
|
115
127
|
}) => {
|
|
116
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();
|
|
117
209
|
const name = [customer.first_name, customer.last_name].filter(Boolean).join(" ");
|
|
118
210
|
const statusColor = customer.has_account ? "green" : "orange";
|
|
119
211
|
const statusText = customer.has_account ? t2("customers.fields.registered") : t2("customers.fields.guest");
|
|
120
|
-
return /* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
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 }) })
|
|
124
216
|
] }),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
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 || "-" })
|
|
128
220
|
] }),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
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 || "-" })
|
|
132
224
|
] }),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
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 || "-" })
|
|
136
228
|
] })
|
|
137
229
|
] });
|
|
138
230
|
};
|
|
@@ -141,59 +233,68 @@ var CustomerGeneralSection = ({
|
|
|
141
233
|
import {
|
|
142
234
|
Button,
|
|
143
235
|
Checkbox,
|
|
144
|
-
Container as
|
|
145
|
-
Heading as
|
|
236
|
+
Container as Container3,
|
|
237
|
+
Heading as Heading3,
|
|
146
238
|
toast,
|
|
147
239
|
usePrompt
|
|
148
240
|
} from "@medusajs/ui";
|
|
241
|
+
import { keepPreviousData } from "@tanstack/react-query";
|
|
149
242
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
150
243
|
import { t } from "i18next";
|
|
151
244
|
import { useMemo, useState } from "react";
|
|
152
245
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
153
|
-
import { useTranslation as
|
|
246
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
154
247
|
import { Link } from "react-router-dom";
|
|
155
|
-
import { jsx as
|
|
248
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
156
249
|
var PAGE_SIZE = 10;
|
|
157
250
|
var PREFIX = "cusgr";
|
|
251
|
+
var DEFAULT_ORDER = "-created_at";
|
|
158
252
|
var CustomerGroupSection = ({
|
|
159
253
|
customer
|
|
160
254
|
}) => {
|
|
161
255
|
const prompt = usePrompt();
|
|
162
256
|
const [rowSelection, setRowSelection] = useState({});
|
|
163
|
-
const {
|
|
257
|
+
const { searchParams, raw } = useCustomerGroupTableQuery({
|
|
164
258
|
pageSize: PAGE_SIZE,
|
|
165
259
|
prefix: PREFIX
|
|
166
260
|
});
|
|
261
|
+
const flatCustomerGroups = customer.groups ?? [];
|
|
262
|
+
const groupIds = useMemo(
|
|
263
|
+
() => (customer.groups ?? []).map((g) => g.id),
|
|
264
|
+
[customer.groups]
|
|
265
|
+
);
|
|
167
266
|
const {
|
|
168
|
-
customer_groups: customerGroups,
|
|
267
|
+
customer_groups: customerGroups = [],
|
|
268
|
+
count = 0,
|
|
169
269
|
isLoading,
|
|
170
270
|
isError,
|
|
171
271
|
error
|
|
172
272
|
} = useCustomerGroups(
|
|
173
273
|
{
|
|
174
274
|
...searchParams,
|
|
175
|
-
|
|
275
|
+
id: groupIds,
|
|
276
|
+
order: searchParams.order || DEFAULT_ORDER,
|
|
277
|
+
fields: "id,name,created_at,updated_at,customers.id"
|
|
176
278
|
},
|
|
177
|
-
void 0,
|
|
178
279
|
{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
sort: searchParams.order
|
|
280
|
+
enabled: groupIds.length > 0,
|
|
281
|
+
placeholderData: keepPreviousData
|
|
182
282
|
}
|
|
183
283
|
);
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
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
|
+
}
|
|
190
291
|
const { mutateAsync: batchCustomerCustomerGroups } = useBatchCustomerCustomerGroups(customer.id);
|
|
191
292
|
const filters = useCustomerGroupTableFilters();
|
|
192
|
-
const columns = useColumns(customer.id);
|
|
293
|
+
const columns = useColumns(customer.id, customerCountByGroup);
|
|
193
294
|
const { table } = useDataTable({
|
|
194
|
-
data:
|
|
295
|
+
data: customerGroups,
|
|
195
296
|
columns,
|
|
196
|
-
count
|
|
297
|
+
count,
|
|
197
298
|
getRowId: (row) => row.id,
|
|
198
299
|
enablePagination: true,
|
|
199
300
|
enableRowSelection: true,
|
|
@@ -206,50 +307,50 @@ var CustomerGroupSection = ({
|
|
|
206
307
|
});
|
|
207
308
|
const handleRemove = async () => {
|
|
208
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;
|
|
209
315
|
const res = await prompt({
|
|
210
|
-
title: t("
|
|
211
|
-
description: t("customers.groups.removeMany", {
|
|
212
|
-
groups: flatCustomerGroups?.filter((g) => selectedIds.includes(g.id)).map((g) => g.name).join(",")
|
|
213
|
-
}),
|
|
316
|
+
title: t("customers.groups.removeTitle"),
|
|
317
|
+
description: isSingle ? t("customers.groups.remove", { name: names[0] }) : t("customers.groups.removeMany", { groups: names.join(", ") }),
|
|
214
318
|
confirmText: t("actions.remove"),
|
|
215
319
|
cancelText: t("actions.cancel")
|
|
216
320
|
});
|
|
217
321
|
if (!res) {
|
|
218
322
|
return;
|
|
219
323
|
}
|
|
220
|
-
const customerGroupIds =
|
|
324
|
+
const customerGroupIds = selectedGroups.map((g) => g.id);
|
|
221
325
|
await batchCustomerCustomerGroups(
|
|
222
326
|
{ remove: customerGroupIds, add: [] },
|
|
223
327
|
{
|
|
224
328
|
onSuccess: () => {
|
|
225
329
|
toast.success(
|
|
226
|
-
t("customers.groups.removed.
|
|
227
|
-
groups:
|
|
330
|
+
isSingle ? t("customers.groups.removed.successOne", { groups: names[0] }) : t("customers.groups.removed.successMany", {
|
|
331
|
+
groups: names.join(", ")
|
|
228
332
|
})
|
|
229
333
|
);
|
|
230
334
|
},
|
|
231
|
-
onError: (
|
|
232
|
-
toast.error(
|
|
335
|
+
onError: (e) => {
|
|
336
|
+
toast.error(e.message);
|
|
233
337
|
}
|
|
234
338
|
}
|
|
235
339
|
);
|
|
236
340
|
};
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
242
|
-
/* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("customerGroups.domain") }),
|
|
243
|
-
/* @__PURE__ */ jsx2(Link, { to: `/customers/${customer.id}/add-customer-groups`, children: /* @__PURE__ */ jsx2(Button, { variant: "secondary", size: "small", children: t("general.add") }) })
|
|
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") }) })
|
|
244
345
|
] }),
|
|
245
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ jsx3(
|
|
246
347
|
_DataTable,
|
|
247
348
|
{
|
|
248
349
|
table,
|
|
249
350
|
columns,
|
|
250
351
|
pageSize: PAGE_SIZE,
|
|
251
352
|
isLoading,
|
|
252
|
-
count
|
|
353
|
+
count,
|
|
253
354
|
prefix: PREFIX,
|
|
254
355
|
navigateTo: (row) => `/customer-groups/${row.original.id}`,
|
|
255
356
|
filters,
|
|
@@ -260,6 +361,7 @@ var CustomerGroupSection = ({
|
|
|
260
361
|
{ key: "created_at", label: t("fields.createdAt") },
|
|
261
362
|
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
262
363
|
],
|
|
364
|
+
defaultOrderBy: DEFAULT_ORDER,
|
|
263
365
|
commands: [
|
|
264
366
|
{
|
|
265
367
|
action: handleRemove,
|
|
@@ -269,7 +371,9 @@ var CustomerGroupSection = ({
|
|
|
269
371
|
],
|
|
270
372
|
queryObject: raw,
|
|
271
373
|
noRecords: {
|
|
272
|
-
|
|
374
|
+
title: t("customers.groups.list.emptyTitle"),
|
|
375
|
+
message: t("customers.groups.list.noRecordsMessage"),
|
|
376
|
+
icon: null
|
|
273
377
|
}
|
|
274
378
|
}
|
|
275
379
|
)
|
|
@@ -280,11 +384,11 @@ var CustomerGroupRowActions = ({
|
|
|
280
384
|
customerId
|
|
281
385
|
}) => {
|
|
282
386
|
const prompt = usePrompt();
|
|
283
|
-
const { t: t2 } =
|
|
387
|
+
const { t: t2 } = useTranslation3();
|
|
284
388
|
const { mutateAsync } = useRemoveCustomersFromGroup(group.id);
|
|
285
389
|
const onRemove = async () => {
|
|
286
390
|
const res = await prompt({
|
|
287
|
-
title: t2("
|
|
391
|
+
title: t2("customers.groups.removeTitle"),
|
|
288
392
|
description: t2("customers.groups.remove", {
|
|
289
393
|
name: group.name
|
|
290
394
|
}),
|
|
@@ -295,12 +399,17 @@ var CustomerGroupRowActions = ({
|
|
|
295
399
|
return;
|
|
296
400
|
}
|
|
297
401
|
await mutateAsync([customerId], {
|
|
402
|
+
onSuccess: () => {
|
|
403
|
+
toast.success(
|
|
404
|
+
t2("customers.groups.removed.successOne", { groups: group.name })
|
|
405
|
+
);
|
|
406
|
+
},
|
|
298
407
|
onError: (error) => {
|
|
299
408
|
toast.error(error.message);
|
|
300
409
|
}
|
|
301
410
|
});
|
|
302
411
|
};
|
|
303
|
-
return /* @__PURE__ */
|
|
412
|
+
return /* @__PURE__ */ jsx3(
|
|
304
413
|
ActionMenu,
|
|
305
414
|
{
|
|
306
415
|
groups: [
|
|
@@ -308,13 +417,13 @@ var CustomerGroupRowActions = ({
|
|
|
308
417
|
actions: [
|
|
309
418
|
{
|
|
310
419
|
label: t2("actions.edit"),
|
|
311
|
-
icon: /* @__PURE__ */
|
|
420
|
+
icon: /* @__PURE__ */ jsx3(PencilSquare, {}),
|
|
312
421
|
to: `/customer-groups/${group.id}/edit`
|
|
313
422
|
},
|
|
314
423
|
{
|
|
315
424
|
label: t2("actions.remove"),
|
|
316
425
|
onClick: onRemove,
|
|
317
|
-
icon: /* @__PURE__ */
|
|
426
|
+
icon: /* @__PURE__ */ jsx3(Trash, {})
|
|
318
427
|
}
|
|
319
428
|
]
|
|
320
429
|
}
|
|
@@ -323,14 +432,14 @@ var CustomerGroupRowActions = ({
|
|
|
323
432
|
);
|
|
324
433
|
};
|
|
325
434
|
var columnHelper = createColumnHelper();
|
|
326
|
-
var useColumns = (customerId) => {
|
|
327
|
-
const { t: t2 } =
|
|
435
|
+
var useColumns = (customerId, customerCountByGroup = {}) => {
|
|
436
|
+
const { t: t2 } = useTranslation3();
|
|
328
437
|
return useMemo(
|
|
329
438
|
() => [
|
|
330
439
|
columnHelper.display({
|
|
331
440
|
id: "select",
|
|
332
441
|
header: ({ table }) => {
|
|
333
|
-
return /* @__PURE__ */
|
|
442
|
+
return /* @__PURE__ */ jsx3(
|
|
334
443
|
Checkbox,
|
|
335
444
|
{
|
|
336
445
|
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
@@ -339,7 +448,7 @@ var useColumns = (customerId) => {
|
|
|
339
448
|
);
|
|
340
449
|
},
|
|
341
450
|
cell: ({ row }) => {
|
|
342
|
-
return /* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ jsx3(
|
|
343
452
|
Checkbox,
|
|
344
453
|
{
|
|
345
454
|
checked: row.getIsSelected(),
|
|
@@ -352,14 +461,21 @@ var useColumns = (customerId) => {
|
|
|
352
461
|
}
|
|
353
462
|
}),
|
|
354
463
|
columnHelper.accessor("name", {
|
|
355
|
-
header: () => /* @__PURE__ */
|
|
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") }),
|
|
356
472
|
cell: ({ row }) => {
|
|
357
|
-
return /* @__PURE__ */
|
|
473
|
+
return /* @__PURE__ */ jsx3(TextCell, { text: `${customerCountByGroup[row.original.id] ?? 0}` });
|
|
358
474
|
}
|
|
359
475
|
}),
|
|
360
476
|
columnHelper.display({
|
|
361
477
|
id: "actions",
|
|
362
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
478
|
+
cell: ({ row }) => /* @__PURE__ */ jsx3(
|
|
363
479
|
CustomerGroupRowActions,
|
|
364
480
|
{
|
|
365
481
|
group: row.original,
|
|
@@ -368,15 +484,15 @@ var useColumns = (customerId) => {
|
|
|
368
484
|
)
|
|
369
485
|
})
|
|
370
486
|
],
|
|
371
|
-
[customerId, t2]
|
|
487
|
+
[customerId, t2, customerCountByGroup]
|
|
372
488
|
);
|
|
373
489
|
};
|
|
374
490
|
|
|
375
491
|
// src/pages/customers/[id]/_components/customer-order-section/customer-order-section.tsx
|
|
376
|
-
import { Container as
|
|
492
|
+
import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
|
|
377
493
|
import { useMemo as useMemo2 } from "react";
|
|
378
|
-
import { useTranslation as
|
|
379
|
-
import { jsx as
|
|
494
|
+
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
495
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
380
496
|
var PREFIX2 = "cusord";
|
|
381
497
|
var PAGE_SIZE2 = 10;
|
|
382
498
|
var DEFAULT_RELATIONS = "*customer,*items,*sales_channel";
|
|
@@ -384,23 +500,18 @@ var DEFAULT_FIELDS = "id,status,display_id,created_at,updated_at,email,fulfillme
|
|
|
384
500
|
var CustomerOrderSection = ({
|
|
385
501
|
customer
|
|
386
502
|
}) => {
|
|
387
|
-
const { t: t2 } =
|
|
503
|
+
const { t: t2 } = useTranslation4();
|
|
388
504
|
const { searchParams, raw } = useOrderTableQuery({
|
|
389
505
|
pageSize: PAGE_SIZE2,
|
|
390
506
|
prefix: PREFIX2
|
|
391
507
|
});
|
|
392
|
-
const { orders, isLoading, isError, error } = useOrders({
|
|
508
|
+
const { orders, count, isLoading, isError, error } = useOrders({
|
|
393
509
|
fields: DEFAULT_FIELDS + "," + DEFAULT_RELATIONS,
|
|
394
|
-
|
|
395
|
-
offset: searchParams.offset,
|
|
396
|
-
created_at: searchParams.created_at,
|
|
397
|
-
updated_at: searchParams.updated_at,
|
|
398
|
-
order: searchParams.order,
|
|
510
|
+
...searchParams,
|
|
399
511
|
customer_id: customer.id
|
|
400
512
|
});
|
|
401
513
|
const columns = useColumns2();
|
|
402
514
|
const filters = useOrderTableFilters();
|
|
403
|
-
const count = orders?.length || 0;
|
|
404
515
|
const { table } = useDataTable({
|
|
405
516
|
data: orders ?? [],
|
|
406
517
|
columns,
|
|
@@ -412,14 +523,15 @@ var CustomerOrderSection = ({
|
|
|
412
523
|
if (isError) {
|
|
413
524
|
throw error;
|
|
414
525
|
}
|
|
415
|
-
return /* @__PURE__ */
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
/* @__PURE__ */
|
|
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(
|
|
418
529
|
_DataTable,
|
|
419
530
|
{
|
|
420
531
|
columns,
|
|
421
532
|
table,
|
|
422
533
|
pagination: true,
|
|
534
|
+
search: true,
|
|
423
535
|
navigateTo: (row) => `/orders/${row.original.id}`,
|
|
424
536
|
filters,
|
|
425
537
|
count,
|
|
@@ -439,6 +551,7 @@ var CustomerOrderSection = ({
|
|
|
439
551
|
label: t2("fields.updatedAt")
|
|
440
552
|
}
|
|
441
553
|
],
|
|
554
|
+
defaultOrderBy: "-display_id",
|
|
442
555
|
queryObject: raw,
|
|
443
556
|
prefix: PREFIX2
|
|
444
557
|
}
|
|
@@ -453,7 +566,7 @@ var useColumns2 = () => {
|
|
|
453
566
|
};
|
|
454
567
|
|
|
455
568
|
// src/pages/customers/[id]/customer-detail-page.tsx
|
|
456
|
-
import { Fragment, jsx as
|
|
569
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
457
570
|
var Root = ({ children }) => {
|
|
458
571
|
const { id } = useParams();
|
|
459
572
|
const initialData = useLoaderData();
|
|
@@ -462,17 +575,26 @@ var Root = ({ children }) => {
|
|
|
462
575
|
{},
|
|
463
576
|
{ initialData }
|
|
464
577
|
);
|
|
465
|
-
if (isLoading || !customer)
|
|
578
|
+
if (isLoading || !customer) {
|
|
579
|
+
return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1 });
|
|
580
|
+
}
|
|
466
581
|
if (isError) throw error;
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
|
|
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 }) })
|
|
470
589
|
] }) });
|
|
471
590
|
};
|
|
472
591
|
var CustomerDetailPage = Object.assign(Root, {
|
|
592
|
+
Main: TwoColumnPage.Main,
|
|
593
|
+
Sidebar: TwoColumnPage.Sidebar,
|
|
473
594
|
GeneralSection: CustomerGeneralSection,
|
|
474
595
|
OrderSection: CustomerOrderSection,
|
|
475
|
-
GroupSection: CustomerGroupSection
|
|
596
|
+
GroupSection: CustomerGroupSection,
|
|
597
|
+
AddressSection: CustomerAddressSection
|
|
476
598
|
});
|
|
477
599
|
export {
|
|
478
600
|
CustomerDetailPage,
|