@mercurjs/admin 2.0.0-canary.33 → 2.0.0-canary.35
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/{add-campaign-promotions-UVEH25GZ.js → add-campaign-promotions-ZUXBF5G3.js} +10 -10
- package/dist/{adjust-inventory-6Q53EEFB.js → adjust-inventory-HZCWL6SC.js} +10 -10
- package/dist/api-key-management-detail-SKJNAZ5L.js +87 -0
- package/dist/api-key-management-list-2D4WKI6Y.js +33 -0
- package/dist/{campaign-create-2IIU3WTS.js → campaign-create-B7XM2FZM.js} +4 -4
- package/dist/campaign-detail-7U4CQHU5.js +105 -0
- package/dist/campaign-list-SC7FLTRM.js +31 -0
- package/dist/{categories-metadata-G7JDGW6O.js → categories-metadata-LPSJNCME.js} +12 -12
- package/dist/category-detail-HGHR3R2R.js +105 -0
- package/dist/category-list-QBBFGHQM.js +32 -0
- package/dist/{category-products-FH4RIZKA.js → category-products-XLCG2JR7.js} +14 -14
- package/dist/{chunk-36WVODFU.js → chunk-23663A2W.js} +1 -1
- package/dist/chunk-2IGCU3KP.js +170 -0
- package/dist/chunk-33FUPXJL.js +102 -0
- package/dist/{chunk-O5HZRJPB.js → chunk-3B6MTW5G.js} +9 -0
- package/dist/{shipping-profiles-list-FUW4FXLC.js → chunk-3H74EI2D.js} +11 -19
- package/dist/{shipping-profile-detail-WHKHB2OQ.js → chunk-3IYIS5UZ.js} +15 -61
- package/dist/{return-reason-list-MRYG7ZK7.js → chunk-3SAH3NUS.js} +12 -80
- package/dist/chunk-4GVHNYZR.js +294 -0
- package/dist/chunk-4WYBW3HK.js +209 -0
- package/dist/chunk-5GG65TKV.js +335 -0
- package/dist/{customer-group-detail-CPONLZRF.js → chunk-5VEYNZSW.js} +33 -119
- package/dist/{customer-group-list-V2CGT3FT.js → chunk-62ZRA6BZ.js} +2 -37
- package/dist/{category-list-YPRENMVF.js → chunk-66IHH2HG.js} +105 -89
- package/dist/chunk-6L2LSIPR.js +223 -0
- package/dist/{region-list-PGWUOULN.js → chunk-6PNMR6XP.js} +18 -32
- package/dist/{product-type-list-T5KO5J3W.js → chunk-7COSFMM7.js} +17 -30
- package/dist/{api-key-management-detail-RQW5RC5F.js → chunk-7TLEUIAL.js} +22 -80
- package/dist/{product-tag-list-I6M6TAYM.js → chunk-A2KURGQO.js} +16 -131
- package/dist/{chunk-GFZ7GOEU.js → chunk-A6Z2Q7D5.js} +2 -2
- package/dist/{customer-detail-YS265DZS.js → chunk-AOVEX4EM.js} +74 -158
- package/dist/{inventory-detail-42GK24BA.js → chunk-AOVJTW7M.js} +130 -196
- package/dist/{payout-list-GE7E637R.js → chunk-BHID7W3U.js} +12 -22
- package/dist/{price-list-list-VFHHTBLR.js → chunk-CR4E2DCR.js} +98 -78
- package/dist/{chunk-UZVYM65V.js → chunk-D44T5KAE.js} +6 -6
- package/dist/{chunk-BFCAJKRG.js → chunk-DBYUB2YI.js} +28 -56
- package/dist/{user-detail-Q7ST2YKP.js → chunk-DK3U2SRA.js} +17 -62
- package/dist/{refund-reason-list-ECQKWA2M.js → chunk-DP5U3GQU.js} +54 -105
- package/dist/chunk-E2AAYIHS.js +250 -0
- package/dist/{commission-rate-detail-ANI37QHI.js → chunk-EDQBUWY7.js} +46 -106
- package/dist/{region-detail-DIEFHHOM.js → chunk-ENMRRG4N.js} +48 -94
- package/dist/{chunk-UZJ2NQSN.js → chunk-FRRQW7BG.js} +4 -4
- package/dist/{order-detail-V2O5C4CX.js → chunk-FXU7SL6M.js} +413 -423
- package/dist/{product-type-detail-JI4DF7WR.js → chunk-FYB5MS4F.js} +29 -110
- package/dist/{chunk-QNGHZSK3.js → chunk-G644AXKV.js} +1 -1
- package/dist/chunk-GJTIHFXG.js +115 -0
- package/dist/{sales-channel-list-2ZUNUM2T.js → chunk-HHNJNKCB.js} +16 -54
- package/dist/{campaign-list-EAGDQZO3.js → chunk-HZKW7HRU.js} +14 -32
- package/dist/chunk-IXGP2EEN.js +425 -0
- package/dist/{profile-detail-AWZ4EZ6R.js → chunk-J7SR4GW5.js} +10 -15
- package/dist/{product-variant-detail-DXTUM4R7.js → chunk-JA2XIIIZ.js} +96 -178
- package/dist/{price-list-detail-324FZRK5.js → chunk-JRWB7VWP.js} +59 -130
- package/dist/{category-detail-2U65E3CX.js → chunk-KUDLPUWR.js} +70 -146
- package/dist/{collection-detail-Y4GGSHXX.js → chunk-KXPCEVFB.js} +44 -121
- package/dist/{location-list-KVFFPEIV.js → chunk-KYUXTS2L.js} +61 -86
- package/dist/{chunk-M3I52H3M.js → chunk-LU72QEQC.js} +4 -4
- package/dist/{location-detail-XO4RRCAU.js → chunk-LYT3RI4O.js} +90 -155
- package/dist/chunk-NOWUEJ74.js +44 -0
- package/dist/{product-detail-3UWUMNHC.js → chunk-NQPAEBSZ.js} +145 -195
- package/dist/{api-key-management-list-VYQ4AVSX.js → chunk-O6O22BN4.js} +9 -29
- package/dist/{tax-region-province-detail-PB7RFWJ4.js → chunk-OFRQZHVQ.js} +15 -99
- package/dist/{reservation-detail-J4M2EXRY.js → chunk-OSHCUDYY.js} +27 -93
- package/dist/{campaign-detail-4DO3S5UZ.js → chunk-Q6XCCONH.js} +118 -193
- package/dist/{payout-detail-PRYOQSGQ.js → chunk-QBOXELB5.js} +7 -41
- package/dist/chunk-QD6KYDYH.js +169 -0
- package/dist/{commission-rate-list-FCQ3HXC7.js → chunk-QP6XXG6A.js} +11 -20
- package/dist/{promotion-list-SJYMXQXT.js → chunk-RIMR3ULR.js} +14 -51
- package/dist/{shipping-option-type-list-4A7FT4P5.js → chunk-SFG7JTBH.js} +14 -51
- package/dist/{sales-channel-detail-RMU5QW3N.js → chunk-T25UE7SS.js} +39 -120
- package/dist/{tax-region-detail-L3EB6JSF.js → chunk-TE5VQBCL.js} +19 -60
- package/dist/{reservation-list-X33SIPG3.js → chunk-TKGZBTOS.js} +11 -20
- package/dist/{chunk-LQSLDDPT.js → chunk-TZSOL34K.js} +40 -1
- package/dist/{chunk-F5PEK3DA.js → chunk-U3SFHLUA.js} +1 -1
- package/dist/{chunk-IZ5RG5XI.js → chunk-UXD3VNBO.js} +1 -20
- package/dist/{chunk-XE6KSRKQ.js → chunk-V2DXJ75C.js} +1 -1
- package/dist/{marketplace-detail-OVWHCK5W.js → chunk-VBAAYYCS.js} +114 -172
- package/dist/{chunk-5POS4GBN.js → chunk-WZADCDDE.js} +4 -4
- package/dist/{chunk-HOZHWCST.js → chunk-XDVS4B7W.js} +1 -1
- package/dist/{promotion-detail-IO7V5CXR.js → chunk-XVKRTPVM.js} +147 -162
- package/dist/{inventory-list-UJNDJFJS.js → chunk-YH4VQBAA.js} +11 -19
- package/dist/{collection-add-products-RLTEE27D.js → collection-add-products-IQ7M63BA.js} +13 -13
- package/dist/collection-detail-YJ3FV2C6.js +96 -0
- package/dist/collection-list-WDQOBHQN.js +78 -0
- package/dist/{collection-metadata-CQWEZ4EQ.js → collection-metadata-UZ3VN625.js} +10 -10
- package/dist/{commission-rate-create-YK6GCP2R.js → commission-rate-create-VC72GTV4.js} +34 -34
- package/dist/commission-rate-detail-UQDIIMIK.js +82 -0
- package/dist/{commission-rate-edit-5MPI53CE.js → commission-rate-edit-AXJKJNFY.js} +34 -34
- package/dist/commission-rate-list-WTDZLKUR.js +27 -0
- package/dist/customer-detail-N7CS4IJU.js +106 -0
- package/dist/{customer-group-add-customers-FTRCJHE7.js → customer-group-add-customers-LCNDTLXR.js} +6 -6
- package/dist/customer-group-detail-UCTY4FF7.js +105 -0
- package/dist/customer-group-list-XOQ64CVR.js +48 -0
- package/dist/{customer-group-metadata-BITZXXFX.js → customer-group-metadata-FMAZBXIK.js} +11 -11
- package/dist/customer-list-BUUO6OF7.js +32 -0
- package/dist/{customer-metadata-6DDHIGDD.js → customer-metadata-7GW4JRZR.js} +11 -11
- package/dist/{customers-add-customer-group-SD3KK6JE.js → customers-add-customer-group-BKEV24N2.js} +15 -15
- package/dist/{edit-inventory-item-5PZZ3IAH.js → edit-inventory-item-RECBP7OX.js} +7 -7
- package/dist/{edit-inventory-item-attributes-7PJQCUXL.js → edit-inventory-item-attributes-2P3BMQJ5.js} +8 -8
- package/dist/{edit-rules-E2564ZQB.js → edit-rules-DPHJ7PQQ.js} +9 -9
- package/dist/index.d.ts +5 -0
- package/dist/index.js +564 -757
- package/dist/{inventory-create-LYXHQR7Y.js → inventory-create-QLEIHESO.js} +20 -20
- package/dist/inventory-detail-BJT5WEV5.js +106 -0
- package/dist/inventory-list-3LWBPWVK.js +29 -0
- package/dist/{inventory-metadata-OLR5ZMMN.js → inventory-metadata-ZNHZQEMX.js} +11 -11
- package/dist/{inventory-stock-ZOM2ANKJ.js → inventory-stock-G3GP4FZX.js} +17 -17
- package/dist/location-detail-N7J6PEAP.js +99 -0
- package/dist/{location-fulfillment-providers-6T27UNF7.js → location-fulfillment-providers-BHCY2MYC.js} +18 -18
- package/dist/location-list-UG6B47NP.js +52 -0
- package/dist/{location-service-zone-create-IYKQNCNO.js → location-service-zone-create-AIVG7HTM.js} +8 -8
- package/dist/{location-service-zone-manage-areas-L7BQTR7S.js → location-service-zone-manage-areas-EZSV25CP.js} +10 -10
- package/dist/{location-service-zone-shipping-option-create-PSPX634E.js → location-service-zone-shipping-option-create-GYPW6SSN.js} +18 -18
- package/dist/{location-service-zone-shipping-option-pricing-HC7Z4BVU.js → location-service-zone-shipping-option-pricing-7VMPXDWX.js} +8 -8
- package/dist/{login-U5WERLJC.js → login-2HSCF4ZB.js} +16 -10
- package/dist/{marketplace-add-currencies-XQPZT237.js → marketplace-add-currencies-CIGOPBO6.js} +7 -7
- package/dist/marketplace-detail-7KJMXXAJ.js +74 -0
- package/dist/{marketplace-metadata-GIYATM54.js → marketplace-metadata-PHZ4PUWM.js} +11 -11
- package/dist/{order-create-claim-UWNZUBL7.js → order-create-claim-7WW6MXTT.js} +34 -34
- package/dist/{order-create-edit-JD4UZ5GW.js → order-create-edit-KAH6ZPLX.js} +20 -20
- package/dist/{order-create-exchange-OTIDP47E.js → order-create-exchange-ELLWF3IY.js} +31 -31
- package/dist/{order-create-fulfillment-7OP64TNJ.js → order-create-fulfillment-E3J7ILOJ.js} +13 -13
- package/dist/{order-create-refund-U4UK5IZB.js → order-create-refund-5QZBOSCA.js} +13 -13
- package/dist/{order-create-return-LH4LW5BZ.js → order-create-return-L6DEDPJK.js} +17 -17
- package/dist/{order-create-shipment-URYCUNU6.js → order-create-shipment-NBQ226NM.js} +7 -7
- package/dist/order-detail-C25NQSZN.js +122 -0
- package/dist/{order-edit-billing-address-XRUEKX33.js → order-edit-billing-address-NVRMPZEU.js} +14 -14
- package/dist/{order-edit-email-CJ3MEZB6.js → order-edit-email-5FA7X52X.js} +7 -7
- package/dist/{order-edit-shipping-address-SV4UVNBQ.js → order-edit-shipping-address-BPU7OL2N.js} +11 -11
- package/dist/order-list-7NH7LROU.js +48 -0
- package/dist/{order-metadata-HIOSALZT.js → order-metadata-47FUKENZ.js} +10 -10
- package/dist/{order-receive-return-4SRRRBW6.js → order-receive-return-FW5QZJBM.js} +8 -8
- package/dist/{order-request-transfer-5AGKGFVY.js → order-request-transfer-WD327YGL.js} +7 -7
- package/dist/pages/index.d.ts +638 -0
- package/dist/pages/index.js +359 -0
- package/dist/payout-detail-MDD5SRK5.js +51 -0
- package/dist/payout-list-XY2A5KYS.js +28 -0
- package/dist/{price-list-configuration-GK4MA3BE.js → price-list-configuration-XK3IZLLX.js} +8 -8
- package/dist/{price-list-create-3NNWUS6L.js → price-list-create-OK7YYLAB.js} +22 -22
- package/dist/price-list-detail-IGFSM77P.js +102 -0
- package/dist/price-list-list-TBXQ5DOS.js +35 -0
- package/dist/{price-list-prices-add-IBSLTMNK.js → price-list-prices-add-7PGUONDK.js} +18 -18
- package/dist/{price-list-prices-edit-AAVPX34P.js → price-list-prices-edit-QVGBT6AI.js} +14 -14
- package/dist/{product-create-C4GHUEM5.js → product-create-NVBKO426.js} +218 -383
- package/dist/{product-create-variant-5MVBT5ST.js → product-create-variant-CJPECBV4.js} +68 -230
- package/dist/product-detail-ZC37BGPC.js +100 -0
- package/dist/{product-export-XTS7P5AD.js → product-export-ULTY2SNJ.js} +14 -14
- package/dist/{product-import-ZEZE2JE6.js → product-import-Q2CPHVNJ.js} +10 -10
- package/dist/product-list-635ZXM2D.js +85 -0
- package/dist/{product-media-Z2DCRZSU.js → product-media-ZMDAVPGI.js} +4 -4
- package/dist/{product-metadata-NBB5SRDN.js → product-metadata-36JNWKCJ.js} +10 -10
- package/dist/{product-stock-ZXNZZBJI.js → product-stock-HF42WRSC.js} +18 -18
- package/dist/{product-tag-create-LL35OFZM.js → product-tag-create-VCRDLR27.js} +7 -7
- package/dist/product-tag-detail-OJLYO3Q5.js +135 -0
- package/dist/{product-tag-edit-6XBZCCED.js → product-tag-edit-BYE7UP54.js} +7 -7
- package/dist/product-tag-list-XFHGJBRF.js +129 -0
- package/dist/{product-tag-metadata-UGO4RUFU.js → product-tag-metadata-ADHNZA2H.js} +10 -10
- package/dist/product-type-detail-J4UA4AEM.js +97 -0
- package/dist/product-type-list-H5EQHCXS.js +34 -0
- package/dist/{product-type-metadata-ZKOZNZE3.js → product-type-metadata-UY22KDAN.js} +10 -10
- package/dist/product-variant-detail-5WKYURFA.js +111 -0
- package/dist/{product-variant-edit-KGLW5GXD.js → product-variant-edit-66ZUIIMP.js} +10 -10
- package/dist/{product-variant-metadata-H7J7SZNU.js → product-variant-metadata-7N5F7DM5.js} +10 -10
- package/dist/profile-detail-EYNXOHGZ.js +17 -0
- package/dist/{promotion-add-campaign-OEMV62HF.js → promotion-add-campaign-B5SF72KC.js} +4 -4
- package/dist/{promotion-create-P2WR5RPH.js → promotion-create-D77SANLX.js} +17 -17
- package/dist/promotion-detail-MVFOMS4E.js +87 -0
- package/dist/promotion-list-IN4VWEQN.js +57 -0
- package/dist/{refund-reason-create-PTHFUT2D.js → refund-reason-create-BHI5XXZC.js} +7 -7
- package/dist/{refund-reason-edit-WEEQQGYO.js → refund-reason-edit-UWWYC4OB.js} +7 -7
- package/dist/refund-reason-list-DJZZC7KK.js +101 -0
- package/dist/{region-add-countries-GVOTB5YX.js → region-add-countries-YOGU74UR.js} +9 -9
- package/dist/{region-create-3BCYTIDB.js → region-create-UMJK3VGL.js} +14 -14
- package/dist/region-detail-OFZHX57G.js +73 -0
- package/dist/region-list-L4FKHVJJ.js +34 -0
- package/dist/{region-metadata-IYIHJCTK.js → region-metadata-JLHWQGTC.js} +11 -11
- package/dist/reservation-detail-LZYEM5NW.js +82 -0
- package/dist/reservation-list-OGPDB7WG.js +30 -0
- package/dist/{reservation-metadata-MMHE4TPO.js → reservation-metadata-WB42HSMD.js} +11 -11
- package/dist/{reset-password-WNANNJDX.js → reset-password-Q7Y4FWRE.js} +2 -2
- package/dist/return-reason-list-6ICMSVKF.js +80 -0
- package/dist/{sales-channel-add-products-GP7TMMKB.js → sales-channel-add-products-EOWFSO35.js} +14 -14
- package/dist/sales-channel-detail-RRJG7U7R.js +97 -0
- package/dist/sales-channel-list-LUZ4ZXCY.js +50 -0
- package/dist/{sales-channel-metadata-QF5KEN7C.js → sales-channel-metadata-5CLXRNQF.js} +12 -12
- package/dist/{seller-details-EUCYPH4Z.js → seller-details-KROISMQC.js} +48 -48
- package/dist/seller-list-664H4SI5.js +79 -0
- package/dist/{shipping-option-type-create-KBQMPNIW.js → shipping-option-type-create-42URKECR.js} +7 -7
- package/dist/shipping-option-type-detail-2RY3NHRO.js +81 -0
- package/dist/{shipping-option-type-edit-S3R6JBFV.js → shipping-option-type-edit-VLFV2AR4.js} +7 -7
- package/dist/shipping-option-type-list-IOSOE33S.js +59 -0
- package/dist/shipping-profile-detail-RIIAX7VE.js +56 -0
- package/dist/{shipping-profile-metadata-BJFUYS5L.js → shipping-profile-metadata-7WDHFEEH.js} +10 -10
- package/dist/shipping-profiles-list-AL4EJSJY.js +26 -0
- package/dist/{tax-region-create-KTFZNQCZ.js → tax-region-create-UOTLTCOP.js} +14 -14
- package/dist/tax-region-detail-CA2W5W6A.js +67 -0
- package/dist/{tax-region-edit-H2ORQVEW.js → tax-region-edit-7O2Z3EYC.js} +7 -7
- package/dist/tax-region-list-JTZ7KZCX.js +26 -0
- package/dist/{tax-region-metadata-2PYZ5ECB.js → tax-region-metadata-VQ57FSEM.js} +11 -11
- package/dist/tax-region-province-detail-ZHLX4FF4.js +98 -0
- package/dist/{tax-region-tax-override-create-IDGG732M.js → tax-region-tax-override-create-WIWUNXW6.js} +31 -31
- package/dist/{tax-region-tax-override-edit-NSBZBBZA.js → tax-region-tax-override-edit-SWROFQTP.js} +31 -31
- package/dist/user-detail-YNPBC5MN.js +54 -0
- package/dist/{user-invite-ATAF42EH.js → user-invite-OT73USBI.js} +10 -10
- package/dist/user-list-LNTZNT3D.js +27 -0
- package/dist/{user-metadata-QFVK2VJX.js → user-metadata-ZGTN4FRU.js} +11 -11
- package/package.json +1 -1
- package/dist/chunk-RW35OPIA.js +0 -45
- package/dist/collection-list-WUPG6AU2.js +0 -233
- package/dist/customer-list-DYQHKNJV.js +0 -153
- package/dist/order-list-ASHM44MM.js +0 -317
- package/dist/product-list-7WK2AWI2.js +0 -323
- package/dist/product-tag-detail-E7VYBISE.js +0 -288
- package/dist/seller-list-W76S2T27.js +0 -237
- package/dist/shipping-option-type-detail-CFGKF7NV.js +0 -173
- package/dist/tax-region-list-D7HWEZUR.js +0 -92
- package/dist/user-list-S6BMNMKL.js +0 -342
- package/dist/{api-key-management-sales-channels-RDE5YSYK.js → api-key-management-sales-channels-C7EWPHC2.js} +9 -9
- package/dist/{campaign-budget-edit-722ECPRI.js → campaign-budget-edit-AIXCDGG3.js} +3 -3
- package/dist/{category-create-VSH7BLNC.js → category-create-UWBJGIED.js} +7 -7
- package/dist/{category-edit-CCHWEQER.js → category-edit-ZDTTOXKZ.js} +3 -3
- package/dist/{chunk-JISYRXUS.js → chunk-B44E3LJT.js} +7 -7
- package/dist/{chunk-L22DLGNI.js → chunk-DEKJJ7NG.js} +3 -3
- package/dist/{chunk-2PZGY332.js → chunk-LQAAVRET.js} +3 -3
- package/dist/{chunk-GEVYE225.js → chunk-RA4UMZRP.js} +3 -3
- package/dist/{chunk-NIRWGTM3.js → chunk-RV6NZTNP.js} +3 -3
- package/dist/{chunk-SXC5ZMLI.js → chunk-TKEAOWBZ.js} +24 -24
- package/dist/{chunk-FLCYR7E5.js → chunk-ULJ3OMWU.js} +3 -3
- package/dist/{chunk-XDEVXAGC.js → chunk-VBBBIEVH.js} +3 -3
- package/dist/{chunk-FMOQNZFZ.js → chunk-YMKZS2HK.js} +12 -12
- package/dist/{customer-create-address-2LLOW6NZ.js → customer-create-address-GKWNPTZS.js} +1 -1
- package/dist/{customer-edit-F5UBFJIZ.js → customer-edit-WDRZ6YUO.js} +3 -3
- package/dist/{edit-reservation-SAKSTZTE.js → edit-reservation-7UOWKFMF.js} +3 -3
- package/dist/{invite-CSXH7VAO.js → invite-AXGDIENO.js} +1 -1
- package/dist/{location-create-HHOJPTDK.js → location-create-FQT3BJGV.js} +1 -1
- package/dist/{location-edit-2NAOR4DV.js → location-edit-RTPPP4KP.js} +1 -1
- package/dist/{location-sales-channels-BJUJNBQQ.js → location-sales-channels-3IGHCJEN.js} +9 -9
- package/dist/{location-service-zone-shipping-option-edit-SSMGORBF.js → location-service-zone-shipping-option-edit-E3GN4ZF5.js} +3 -3
- package/dist/{marketplace-edit-WPOSY2WN.js → marketplace-edit-GH2GQF3O.js} +3 -3
- package/dist/{order-allocate-items-DLVOSAC2.js → order-allocate-items-VEEANPH7.js} +3 -3
- package/dist/{price-list-edit-UU2XBKT3.js → price-list-edit-KK7SHR7O.js} +3 -3
- package/dist/{product-attributes-HNF4J53T.js → product-attributes-NG4OSBIV.js} +1 -1
- package/dist/{product-edit-6EL6US22.js → product-edit-LQJDUUVX.js} +4 -4
- package/dist/{product-organization-NWS3NMD6.js → product-organization-AFCELJ62.js} +1 -1
- package/dist/{product-prices-V63CFHI3.js → product-prices-WMRIC7WM.js} +7 -7
- package/dist/{product-sales-channels-WU3MSCV5.js → product-sales-channels-LSN5DVWZ.js} +5 -5
- package/dist/{product-variant-manage-inventory-items-C77QHYRT.js → product-variant-manage-inventory-items-CV2CC2PV.js} +3 -3
- package/dist/{profile-edit-3GIVUYUM.js → profile-edit-4HXBRWJ5.js} +6 -6
- package/dist/{promotion-edit-details-7Y2A5PPJ.js → promotion-edit-details-YKS24GBD.js} +6 -6
- package/dist/{region-edit-7XER3THY.js → region-edit-ODVSNJHM.js} +5 -5
- package/dist/{tax-region-province-create-7BMYABJ6.js → tax-region-province-create-RFYCUDER.js} +3 -3
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import {
|
|
2
|
+
KeyboundForm
|
|
3
|
+
} from "./chunk-U2ZFCAPX.js";
|
|
4
|
+
import {
|
|
5
|
+
RouteFocusModal
|
|
6
|
+
} from "./chunk-MWOKFNRO.js";
|
|
7
|
+
|
|
8
|
+
// src/components/tabbed-form/tabbed-form.tsx
|
|
9
|
+
import { Button, ProgressTabs } from "@medusajs/ui";
|
|
10
|
+
import {
|
|
11
|
+
Children,
|
|
12
|
+
createContext,
|
|
13
|
+
useContext,
|
|
14
|
+
useMemo as useMemo2
|
|
15
|
+
} from "react";
|
|
16
|
+
import { useTranslation } from "react-i18next";
|
|
17
|
+
|
|
18
|
+
// src/components/tabbed-form/use-tab-management.ts
|
|
19
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
20
|
+
var validateTab = async (form, tab) => {
|
|
21
|
+
if (tab.validationFields?.length) {
|
|
22
|
+
return form.trigger(tab.validationFields);
|
|
23
|
+
}
|
|
24
|
+
return form.trigger();
|
|
25
|
+
};
|
|
26
|
+
var validateTabRange = async (form, tabs, fromIndex, toIndex) => {
|
|
27
|
+
for (let i = fromIndex; i <= toIndex; i++) {
|
|
28
|
+
if (!await validateTab(form, tabs[i])) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
};
|
|
34
|
+
var useTabManagement = ({
|
|
35
|
+
tabs,
|
|
36
|
+
form
|
|
37
|
+
}) => {
|
|
38
|
+
const visibleTabs = useMemo(
|
|
39
|
+
() => tabs.filter((t) => !t.isVisible || t.isVisible(form)),
|
|
40
|
+
[tabs, form]
|
|
41
|
+
);
|
|
42
|
+
const [activeTabId, setActiveTabId] = useState(
|
|
43
|
+
visibleTabs[0]?.id ?? ""
|
|
44
|
+
);
|
|
45
|
+
const [tabState, setTabState] = useState(() => {
|
|
46
|
+
const state = {};
|
|
47
|
+
visibleTabs.forEach((t, i) => {
|
|
48
|
+
state[t.id] = i === 0 ? "in-progress" : "not-started";
|
|
49
|
+
});
|
|
50
|
+
return state;
|
|
51
|
+
});
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
let resolvedActiveId = activeTabId;
|
|
54
|
+
const activeExists = visibleTabs.some((t) => t.id === activeTabId);
|
|
55
|
+
if (!activeExists && visibleTabs.length > 0) {
|
|
56
|
+
resolvedActiveId = visibleTabs[0].id;
|
|
57
|
+
setActiveTabId(resolvedActiveId);
|
|
58
|
+
}
|
|
59
|
+
const newState = {};
|
|
60
|
+
const resolvedIndex = visibleTabs.findIndex(
|
|
61
|
+
(t) => t.id === resolvedActiveId
|
|
62
|
+
);
|
|
63
|
+
visibleTabs.forEach((t, i) => {
|
|
64
|
+
if (i < resolvedIndex) {
|
|
65
|
+
newState[t.id] = "completed";
|
|
66
|
+
} else if (i === resolvedIndex) {
|
|
67
|
+
newState[t.id] = "in-progress";
|
|
68
|
+
} else {
|
|
69
|
+
newState[t.id] = tabState[t.id] ?? "not-started";
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
setTabState(newState);
|
|
73
|
+
}, [activeTabId, visibleTabs]);
|
|
74
|
+
const activeIndex = visibleTabs.findIndex((t) => t.id === activeTabId);
|
|
75
|
+
const isLastTab = activeIndex === visibleTabs.length - 1;
|
|
76
|
+
const onNext = useCallback(async () => {
|
|
77
|
+
const currentTab = visibleTabs[activeIndex];
|
|
78
|
+
if (!currentTab) return;
|
|
79
|
+
const valid = await validateTab(form, currentTab);
|
|
80
|
+
if (!valid) return;
|
|
81
|
+
if (activeIndex < visibleTabs.length - 1) {
|
|
82
|
+
setActiveTabId(visibleTabs[activeIndex + 1].id);
|
|
83
|
+
}
|
|
84
|
+
}, [form, activeIndex, visibleTabs]);
|
|
85
|
+
const onTabChange = useCallback(
|
|
86
|
+
async (tabId) => {
|
|
87
|
+
const targetIndex = visibleTabs.findIndex((t) => t.id === tabId);
|
|
88
|
+
if (targetIndex === -1) return;
|
|
89
|
+
const currentIndex = visibleTabs.findIndex(
|
|
90
|
+
(t) => t.id === activeTabId
|
|
91
|
+
);
|
|
92
|
+
if (currentIndex === -1) {
|
|
93
|
+
setActiveTabId(tabId);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (targetIndex <= currentIndex) {
|
|
97
|
+
setActiveTabId(tabId);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const valid = await validateTabRange(
|
|
101
|
+
form,
|
|
102
|
+
visibleTabs,
|
|
103
|
+
currentIndex,
|
|
104
|
+
targetIndex - 1
|
|
105
|
+
);
|
|
106
|
+
if (!valid) return;
|
|
107
|
+
setActiveTabId(tabId);
|
|
108
|
+
},
|
|
109
|
+
[form, visibleTabs, activeTabId]
|
|
110
|
+
);
|
|
111
|
+
return {
|
|
112
|
+
activeTabId,
|
|
113
|
+
setActiveTabId,
|
|
114
|
+
tabState,
|
|
115
|
+
visibleTabs,
|
|
116
|
+
isLastTab,
|
|
117
|
+
onNext,
|
|
118
|
+
onTabChange
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// src/components/tabbed-form/tabbed-form.tsx
|
|
123
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
124
|
+
var TabbedFormContext = createContext(null);
|
|
125
|
+
var useTabbedForm = () => {
|
|
126
|
+
const form = useContext(TabbedFormContext);
|
|
127
|
+
if (!form) {
|
|
128
|
+
throw new Error("useTabbedForm must be used within a TabbedForm");
|
|
129
|
+
}
|
|
130
|
+
return form;
|
|
131
|
+
};
|
|
132
|
+
function resolveTabMeta(child) {
|
|
133
|
+
const type = child.type;
|
|
134
|
+
const meta = type?._tabMeta;
|
|
135
|
+
if (!meta && !child.props?.id) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
const id = child.props?.id ?? meta?.id ?? "";
|
|
139
|
+
const labelKey = meta?.labelKey ?? "";
|
|
140
|
+
const label = child.props?.label;
|
|
141
|
+
if (process.env.NODE_ENV !== "production") {
|
|
142
|
+
if (!id) {
|
|
143
|
+
console.warn(
|
|
144
|
+
"[TabbedForm] A child component is missing a tab id. Either set _tabMeta.id or pass an id prop."
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
if (!labelKey && !label) {
|
|
148
|
+
console.warn(
|
|
149
|
+
`[TabbedForm] Tab "${id}" has no label or labelKey \u2014 header will be empty.`
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
id,
|
|
155
|
+
labelKey,
|
|
156
|
+
label,
|
|
157
|
+
validationFields: child.props?.validationFields ?? meta?.validationFields,
|
|
158
|
+
isVisible: child.props?.isVisible ?? meta?.isVisible
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function collectTabs(children) {
|
|
162
|
+
const tabs = [];
|
|
163
|
+
const elements = [];
|
|
164
|
+
Children.forEach(children, (child) => {
|
|
165
|
+
if (!child || typeof child !== "object" || !("type" in child)) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const meta = resolveTabMeta(child);
|
|
169
|
+
if (meta) {
|
|
170
|
+
tabs.push(meta);
|
|
171
|
+
elements.push(child);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return { tabs, elements };
|
|
175
|
+
}
|
|
176
|
+
function Root({
|
|
177
|
+
form,
|
|
178
|
+
onSubmit,
|
|
179
|
+
children,
|
|
180
|
+
isLoading,
|
|
181
|
+
footer,
|
|
182
|
+
transformTabs
|
|
183
|
+
}) {
|
|
184
|
+
const { t } = useTranslation();
|
|
185
|
+
const { tabs: rawTabs, elements } = useMemo2(
|
|
186
|
+
() => collectTabs(children),
|
|
187
|
+
[children]
|
|
188
|
+
);
|
|
189
|
+
const tabs = useMemo2(
|
|
190
|
+
() => transformTabs ? transformTabs(rawTabs) : rawTabs,
|
|
191
|
+
[transformTabs, rawTabs]
|
|
192
|
+
);
|
|
193
|
+
const {
|
|
194
|
+
activeTabId,
|
|
195
|
+
tabState,
|
|
196
|
+
visibleTabs,
|
|
197
|
+
isLastTab,
|
|
198
|
+
onNext,
|
|
199
|
+
onTabChange
|
|
200
|
+
} = useTabManagement({
|
|
201
|
+
tabs,
|
|
202
|
+
form
|
|
203
|
+
});
|
|
204
|
+
const visibleElements = elements.filter((el) => {
|
|
205
|
+
const meta = resolveTabMeta(el);
|
|
206
|
+
return meta && visibleTabs.some((vt) => vt.id === meta.id);
|
|
207
|
+
});
|
|
208
|
+
return /* @__PURE__ */ jsx(TabbedFormContext.Provider, { value: form, children: /* @__PURE__ */ jsx(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
209
|
+
KeyboundForm,
|
|
210
|
+
{
|
|
211
|
+
onKeyDown: (e) => {
|
|
212
|
+
if (e.key === "Enter") {
|
|
213
|
+
if (e.target instanceof HTMLTextAreaElement && !(e.metaKey || e.ctrlKey)) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
e.preventDefault();
|
|
217
|
+
if (e.metaKey || e.ctrlKey) {
|
|
218
|
+
if (isLoading) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (!isLastTab) {
|
|
222
|
+
e.preventDefault();
|
|
223
|
+
e.stopPropagation();
|
|
224
|
+
onNext();
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
onSubmit();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
onSubmit,
|
|
232
|
+
className: "flex h-full flex-col",
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ jsxs(
|
|
235
|
+
ProgressTabs,
|
|
236
|
+
{
|
|
237
|
+
value: activeTabId,
|
|
238
|
+
onValueChange: onTabChange,
|
|
239
|
+
className: "flex h-full flex-col overflow-hidden",
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Header, { children: /* @__PURE__ */ jsx("div", { className: "-my-2 w-full border-l", children: /* @__PURE__ */ jsx(ProgressTabs.List, { className: "justify-start-start flex w-full items-center", children: visibleTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
242
|
+
ProgressTabs.Trigger,
|
|
243
|
+
{
|
|
244
|
+
status: tabState[tab.id] ?? "not-started",
|
|
245
|
+
value: tab.id,
|
|
246
|
+
className: "max-w-[200px] truncate",
|
|
247
|
+
children: tab.label ?? t(tab.labelKey)
|
|
248
|
+
},
|
|
249
|
+
tab.id
|
|
250
|
+
)) }) }) }),
|
|
251
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Body, { className: "size-full overflow-hidden", children: visibleElements.map((element) => {
|
|
252
|
+
const meta = resolveTabMeta(element);
|
|
253
|
+
return /* @__PURE__ */ jsx(
|
|
254
|
+
ProgressTabs.Content,
|
|
255
|
+
{
|
|
256
|
+
className: "size-full overflow-y-auto",
|
|
257
|
+
value: meta.id,
|
|
258
|
+
children: element
|
|
259
|
+
},
|
|
260
|
+
meta.id
|
|
261
|
+
);
|
|
262
|
+
}) })
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Footer, { children: footer ? footer({ isLastTab, onNext, isLoading }) : /* @__PURE__ */ jsx(
|
|
267
|
+
DefaultFooter,
|
|
268
|
+
{
|
|
269
|
+
isLastTab,
|
|
270
|
+
onNext,
|
|
271
|
+
isLoading
|
|
272
|
+
}
|
|
273
|
+
) })
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
) }) });
|
|
277
|
+
}
|
|
278
|
+
var DefaultFooter = ({
|
|
279
|
+
isLastTab,
|
|
280
|
+
onNext,
|
|
281
|
+
isLoading
|
|
282
|
+
}) => {
|
|
283
|
+
const { t } = useTranslation();
|
|
284
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
285
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
|
|
286
|
+
isLastTab ? /* @__PURE__ */ jsx(
|
|
287
|
+
Button,
|
|
288
|
+
{
|
|
289
|
+
type: "submit",
|
|
290
|
+
variant: "primary",
|
|
291
|
+
size: "small",
|
|
292
|
+
isLoading,
|
|
293
|
+
children: t("actions.save")
|
|
294
|
+
},
|
|
295
|
+
"submit-button"
|
|
296
|
+
) : /* @__PURE__ */ jsx(
|
|
297
|
+
Button,
|
|
298
|
+
{
|
|
299
|
+
type: "button",
|
|
300
|
+
variant: "primary",
|
|
301
|
+
size: "small",
|
|
302
|
+
onClick: () => onNext(),
|
|
303
|
+
children: t("actions.continue")
|
|
304
|
+
},
|
|
305
|
+
"next-button"
|
|
306
|
+
)
|
|
307
|
+
] });
|
|
308
|
+
};
|
|
309
|
+
var Tab = ({
|
|
310
|
+
children
|
|
311
|
+
}) => {
|
|
312
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsx("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children }) });
|
|
313
|
+
};
|
|
314
|
+
var TabbedForm = Object.assign(Root, { Tab, useForm: useTabbedForm });
|
|
315
|
+
|
|
316
|
+
// src/components/tabbed-form/types.ts
|
|
317
|
+
var defineTabMeta = (meta) => {
|
|
318
|
+
if (process.env.NODE_ENV !== "production") {
|
|
319
|
+
if (!meta.id) {
|
|
320
|
+
console.warn("[TabbedForm] Tab meta is missing required 'id' field");
|
|
321
|
+
}
|
|
322
|
+
if (!meta.labelKey && !meta.label) {
|
|
323
|
+
console.warn(
|
|
324
|
+
`[TabbedForm] Tab "${meta.id}" has neither 'labelKey' nor 'label' \u2014 the tab header will be empty`
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return meta;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
export {
|
|
332
|
+
useTabbedForm,
|
|
333
|
+
TabbedForm,
|
|
334
|
+
defineTabMeta
|
|
335
|
+
};
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCustomerTableColumns
|
|
3
3
|
} from "./chunk-QG6PLWNH.js";
|
|
4
|
-
import "./chunk-25LYVP3C.js";
|
|
5
|
-
import "./chunk-DB6ANJBO.js";
|
|
6
|
-
import "./chunk-FQERBIVS.js";
|
|
7
|
-
import "./chunk-PHOCVOZ5.js";
|
|
8
4
|
import {
|
|
9
5
|
_DataTable,
|
|
10
6
|
useDataTable
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-YBZWO4ZV.js";
|
|
13
|
-
import "./chunk-KAZ5BYTQ.js";
|
|
14
|
-
import "./chunk-3EF54XFY.js";
|
|
15
|
-
import {
|
|
16
|
-
useCustomerTableFilters
|
|
17
|
-
} from "./chunk-K3GJ266Z.js";
|
|
18
|
-
import {
|
|
19
|
-
useCustomerTableQuery
|
|
20
|
-
} from "./chunk-PVZBDWLK.js";
|
|
21
|
-
import "./chunk-KBYZLKI4.js";
|
|
22
|
-
import "./chunk-YWWUOGJA.js";
|
|
7
|
+
} from "./chunk-ULJ3OMWU.js";
|
|
23
8
|
import {
|
|
24
9
|
SingleColumnPage
|
|
25
10
|
} from "./chunk-U2UCL2VG.js";
|
|
@@ -29,78 +14,18 @@ import {
|
|
|
29
14
|
import {
|
|
30
15
|
ActionMenu
|
|
31
16
|
} from "./chunk-BDGZ4EQO.js";
|
|
32
|
-
import
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
import
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
import "./chunk-ODBDAABQ.js";
|
|
39
|
-
import "./chunk-CDQJKJMX.js";
|
|
40
|
-
import "./chunk-JLATVDLM.js";
|
|
41
|
-
import "./chunk-GPRBBA7S.js";
|
|
42
|
-
import "./chunk-E7ZBQO6E.js";
|
|
43
|
-
import "./chunk-XGHM75N2.js";
|
|
44
|
-
import "./chunk-U2GCSKW3.js";
|
|
45
|
-
import "./chunk-RTAIDSDS.js";
|
|
46
|
-
import "./chunk-LW3UWYZU.js";
|
|
47
|
-
import "./chunk-A4X5VP3G.js";
|
|
48
|
-
import "./chunk-NNZP4PYP.js";
|
|
49
|
-
import "./chunk-GF4QHVX3.js";
|
|
50
|
-
import "./chunk-JOQ3RTF5.js";
|
|
51
|
-
import "./chunk-V534K7G4.js";
|
|
17
|
+
import {
|
|
18
|
+
useCustomerTableFilters
|
|
19
|
+
} from "./chunk-K3GJ266Z.js";
|
|
20
|
+
import {
|
|
21
|
+
useCustomerTableQuery
|
|
22
|
+
} from "./chunk-PVZBDWLK.js";
|
|
52
23
|
import {
|
|
53
24
|
useCustomerGroup,
|
|
54
25
|
useCustomers,
|
|
55
26
|
useDeleteCustomerGroup,
|
|
56
27
|
useRemoveCustomersFromGroup
|
|
57
28
|
} from "./chunk-A5XOYSDC.js";
|
|
58
|
-
import "./chunk-TQI3DOQ5.js";
|
|
59
|
-
import "./chunk-5PB7KCTF.js";
|
|
60
|
-
import "./chunk-YOIARITB.js";
|
|
61
|
-
import "./chunk-W7G64ULL.js";
|
|
62
|
-
import "./chunk-6C7TCU42.js";
|
|
63
|
-
import "./chunk-4YF3GAKE.js";
|
|
64
|
-
import "./chunk-M3I52H3M.js";
|
|
65
|
-
import "./chunk-LORVU5II.js";
|
|
66
|
-
import "./chunk-36ORDF7W.js";
|
|
67
|
-
import "./chunk-QSM56ZOP.js";
|
|
68
|
-
import "./chunk-MIHEJ6Y6.js";
|
|
69
|
-
import "./chunk-3VZV6SJQ.js";
|
|
70
|
-
import {
|
|
71
|
-
productsQueryKeys
|
|
72
|
-
} from "./chunk-K357FGGP.js";
|
|
73
|
-
import {
|
|
74
|
-
queryClient
|
|
75
|
-
} from "./chunk-RHKRREUU.js";
|
|
76
|
-
import "./chunk-ZA2KFUFR.js";
|
|
77
|
-
import {
|
|
78
|
-
sdk
|
|
79
|
-
} from "./chunk-ZYNBKBY3.js";
|
|
80
|
-
import "./chunk-NBMM2TZK.js";
|
|
81
|
-
|
|
82
|
-
// src/pages/customer-groups/customer-group-detail/constants.ts
|
|
83
|
-
var CUSTOMER_GROUP_DETAIL_FIELDS = "+customers.id";
|
|
84
|
-
|
|
85
|
-
// src/pages/customer-groups/customer-group-detail/breadcrumb.tsx
|
|
86
|
-
import { jsx } from "react/jsx-runtime";
|
|
87
|
-
var CustomerGroupDetailBreadcrumb = (props) => {
|
|
88
|
-
const { id } = props.params || {};
|
|
89
|
-
const { customer_group } = useCustomerGroup(
|
|
90
|
-
id,
|
|
91
|
-
{
|
|
92
|
-
fields: CUSTOMER_GROUP_DETAIL_FIELDS
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
initialData: props.data,
|
|
96
|
-
enabled: Boolean(id)
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
if (!customer_group) {
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
return /* @__PURE__ */ jsx("span", { children: customer_group.name });
|
|
103
|
-
};
|
|
104
29
|
|
|
105
30
|
// src/pages/customer-groups/customer-group-detail/customer-group-detail.tsx
|
|
106
31
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
@@ -112,7 +37,7 @@ import { createColumnHelper } from "@tanstack/react-table";
|
|
|
112
37
|
import { useMemo, useState } from "react";
|
|
113
38
|
import { useTranslation } from "react-i18next";
|
|
114
39
|
import { Link } from "react-router-dom";
|
|
115
|
-
import { jsx
|
|
40
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
116
41
|
var PAGE_SIZE = 10;
|
|
117
42
|
var CustomerGroupCustomerSection = ({
|
|
118
43
|
group
|
|
@@ -170,10 +95,10 @@ var CustomerGroupCustomerSection = ({
|
|
|
170
95
|
};
|
|
171
96
|
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", "data-testid": "customer-group-customer-section", children: [
|
|
172
97
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "customer-group-customer-section-header", children: [
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ jsx(Heading, { level: "h2", "data-testid": "customer-group-customer-section-heading", children: t("customers.domain") }),
|
|
99
|
+
/* @__PURE__ */ jsx(Link, { to: `/customer-groups/${group.id}/add-customers`, "data-testid": "customer-group-customer-section-add-link", children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", "data-testid": "customer-group-customer-section-add-button", children: t("general.add") }) })
|
|
175
100
|
] }),
|
|
176
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
177
102
|
_DataTable,
|
|
178
103
|
{
|
|
179
104
|
table,
|
|
@@ -231,7 +156,7 @@ var CustomerActions = ({
|
|
|
231
156
|
}
|
|
232
157
|
await mutateAsync([customer.id]);
|
|
233
158
|
};
|
|
234
|
-
return /* @__PURE__ */
|
|
159
|
+
return /* @__PURE__ */ jsx(
|
|
235
160
|
ActionMenu,
|
|
236
161
|
{
|
|
237
162
|
"data-testid": `customer-group-customer-section-row-actions-${customer.id}`,
|
|
@@ -239,7 +164,7 @@ var CustomerActions = ({
|
|
|
239
164
|
{
|
|
240
165
|
actions: [
|
|
241
166
|
{
|
|
242
|
-
icon: /* @__PURE__ */
|
|
167
|
+
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
243
168
|
label: t("actions.edit"),
|
|
244
169
|
to: `/customers/${customer.id}/edit`
|
|
245
170
|
}
|
|
@@ -248,7 +173,7 @@ var CustomerActions = ({
|
|
|
248
173
|
{
|
|
249
174
|
actions: [
|
|
250
175
|
{
|
|
251
|
-
icon: /* @__PURE__ */
|
|
176
|
+
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
252
177
|
label: t("actions.remove"),
|
|
253
178
|
onClick: handleRemove
|
|
254
179
|
}
|
|
@@ -266,7 +191,7 @@ var useColumns = () => {
|
|
|
266
191
|
columnHelper.display({
|
|
267
192
|
id: "select",
|
|
268
193
|
header: ({ table }) => {
|
|
269
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ jsx(
|
|
270
195
|
Checkbox,
|
|
271
196
|
{
|
|
272
197
|
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
@@ -275,7 +200,7 @@ var useColumns = () => {
|
|
|
275
200
|
);
|
|
276
201
|
},
|
|
277
202
|
cell: ({ row }) => {
|
|
278
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ jsx(
|
|
279
204
|
Checkbox,
|
|
280
205
|
{
|
|
281
206
|
checked: row.getIsSelected(),
|
|
@@ -292,7 +217,7 @@ var useColumns = () => {
|
|
|
292
217
|
id: "actions",
|
|
293
218
|
cell: ({ row, table }) => {
|
|
294
219
|
const { customerGroupId } = table.options.meta;
|
|
295
|
-
return /* @__PURE__ */
|
|
220
|
+
return /* @__PURE__ */ jsx(
|
|
296
221
|
CustomerActions,
|
|
297
222
|
{
|
|
298
223
|
customer: row.original,
|
|
@@ -311,7 +236,7 @@ import { PencilSquare as PencilSquare2, Trash as Trash2 } from "@medusajs/icons"
|
|
|
311
236
|
import { Container as Container2, Heading as Heading2, Text, toast, usePrompt as usePrompt2 } from "@medusajs/ui";
|
|
312
237
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
313
238
|
import { useNavigate } from "react-router-dom";
|
|
314
|
-
import { jsx as
|
|
239
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
315
240
|
var CustomerGroupGeneralSection = ({
|
|
316
241
|
group
|
|
317
242
|
}) => {
|
|
@@ -347,8 +272,8 @@ var CustomerGroupGeneralSection = ({
|
|
|
347
272
|
};
|
|
348
273
|
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "customer-group-general-section", children: [
|
|
349
274
|
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "customer-group-general-section-header", children: [
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ jsx2(Heading2, { "data-testid": "customer-group-general-section-name", children: group.name }),
|
|
276
|
+
/* @__PURE__ */ jsx2(
|
|
352
277
|
ActionMenu,
|
|
353
278
|
{
|
|
354
279
|
"data-testid": "customer-group-general-section-action-menu",
|
|
@@ -356,7 +281,7 @@ var CustomerGroupGeneralSection = ({
|
|
|
356
281
|
{
|
|
357
282
|
actions: [
|
|
358
283
|
{
|
|
359
|
-
icon: /* @__PURE__ */
|
|
284
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
|
|
360
285
|
label: t("actions.edit"),
|
|
361
286
|
to: `/customer-groups/${group.id}/edit`
|
|
362
287
|
}
|
|
@@ -365,7 +290,7 @@ var CustomerGroupGeneralSection = ({
|
|
|
365
290
|
{
|
|
366
291
|
actions: [
|
|
367
292
|
{
|
|
368
|
-
icon: /* @__PURE__ */
|
|
293
|
+
icon: /* @__PURE__ */ jsx2(Trash2, {}),
|
|
369
294
|
label: t("actions.delete"),
|
|
370
295
|
onClick: handleDelete
|
|
371
296
|
}
|
|
@@ -376,14 +301,17 @@ var CustomerGroupGeneralSection = ({
|
|
|
376
301
|
)
|
|
377
302
|
] }),
|
|
378
303
|
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "customer-group-general-section-customers-row", children: [
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", "data-testid": "customer-group-general-section-customers-label", children: t("customers.domain") }),
|
|
305
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", "data-testid": "customer-group-general-section-customers-value", children: group.customers?.length || "-" })
|
|
381
306
|
] })
|
|
382
307
|
] });
|
|
383
308
|
};
|
|
384
309
|
|
|
310
|
+
// src/pages/customer-groups/customer-group-detail/constants.ts
|
|
311
|
+
var CUSTOMER_GROUP_DETAIL_FIELDS = "+customers.id";
|
|
312
|
+
|
|
385
313
|
// src/pages/customer-groups/customer-group-detail/customer-group-detail.tsx
|
|
386
|
-
import { jsx as
|
|
314
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
387
315
|
var CustomerGroupDetail = () => {
|
|
388
316
|
const initialData = useLoaderData();
|
|
389
317
|
const { id } = useParams();
|
|
@@ -395,32 +323,18 @@ var CustomerGroupDetail = () => {
|
|
|
395
323
|
{ initialData }
|
|
396
324
|
);
|
|
397
325
|
if (isLoading || !customer_group) {
|
|
398
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ jsx3(SingleColumnPageSkeleton, { sections: 2, showJSON: true, showMetadata: true });
|
|
399
327
|
}
|
|
400
328
|
if (isError) {
|
|
401
329
|
throw error;
|
|
402
330
|
}
|
|
403
331
|
return /* @__PURE__ */ jsxs3(SingleColumnPage, { showJSON: true, showMetadata: true, data: customer_group, children: [
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ jsx3(CustomerGroupGeneralSection, { group: customer_group }),
|
|
333
|
+
/* @__PURE__ */ jsx3(CustomerGroupCustomerSection, { group: customer_group })
|
|
406
334
|
] });
|
|
407
335
|
};
|
|
408
336
|
|
|
409
|
-
// src/pages/customer-groups/customer-group-detail/loader.ts
|
|
410
|
-
var customerGroupDetailQuery = (id) => ({
|
|
411
|
-
queryKey: productsQueryKeys.detail(id),
|
|
412
|
-
queryFn: async () => sdk.admin.customerGroups.$id.query({
|
|
413
|
-
$id: id,
|
|
414
|
-
fields: CUSTOMER_GROUP_DETAIL_FIELDS
|
|
415
|
-
})
|
|
416
|
-
});
|
|
417
|
-
var customerGroupLoader = async ({ params }) => {
|
|
418
|
-
const id = params.id;
|
|
419
|
-
const query = customerGroupDetailQuery(id);
|
|
420
|
-
return queryClient.ensureQueryData(query);
|
|
421
|
-
};
|
|
422
337
|
export {
|
|
423
|
-
|
|
424
|
-
CustomerGroupDetail
|
|
425
|
-
customerGroupLoader as loader
|
|
338
|
+
CUSTOMER_GROUP_DETAIL_FIELDS,
|
|
339
|
+
CustomerGroupDetail
|
|
426
340
|
};
|
|
@@ -7,52 +7,16 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
DataTable
|
|
9
9
|
} from "./chunk-UQITHKTH.js";
|
|
10
|
-
import "./chunk-BDGZ4EQO.js";
|
|
11
|
-
import "./chunk-LAVHRER2.js";
|
|
12
|
-
import "./chunk-Y7QKP6QU.js";
|
|
13
10
|
import {
|
|
14
11
|
useQueryParams
|
|
15
12
|
} from "./chunk-THHRRYRS.js";
|
|
16
13
|
import {
|
|
17
14
|
useDate
|
|
18
15
|
} from "./chunk-UZWFZMOX.js";
|
|
19
|
-
import "./chunk-XQNVC4Q7.js";
|
|
20
|
-
import "./chunk-XM6GCWNF.js";
|
|
21
|
-
import "./chunk-ODBDAABQ.js";
|
|
22
|
-
import "./chunk-CDQJKJMX.js";
|
|
23
|
-
import "./chunk-JLATVDLM.js";
|
|
24
|
-
import "./chunk-GPRBBA7S.js";
|
|
25
|
-
import "./chunk-E7ZBQO6E.js";
|
|
26
|
-
import "./chunk-XGHM75N2.js";
|
|
27
|
-
import "./chunk-U2GCSKW3.js";
|
|
28
|
-
import "./chunk-RTAIDSDS.js";
|
|
29
|
-
import "./chunk-LW3UWYZU.js";
|
|
30
|
-
import "./chunk-A4X5VP3G.js";
|
|
31
|
-
import "./chunk-NNZP4PYP.js";
|
|
32
|
-
import "./chunk-GF4QHVX3.js";
|
|
33
|
-
import "./chunk-JOQ3RTF5.js";
|
|
34
|
-
import "./chunk-V534K7G4.js";
|
|
35
16
|
import {
|
|
36
17
|
useCustomerGroups,
|
|
37
18
|
useDeleteCustomerGroupLazy
|
|
38
19
|
} from "./chunk-A5XOYSDC.js";
|
|
39
|
-
import "./chunk-TQI3DOQ5.js";
|
|
40
|
-
import "./chunk-5PB7KCTF.js";
|
|
41
|
-
import "./chunk-YOIARITB.js";
|
|
42
|
-
import "./chunk-W7G64ULL.js";
|
|
43
|
-
import "./chunk-6C7TCU42.js";
|
|
44
|
-
import "./chunk-4YF3GAKE.js";
|
|
45
|
-
import "./chunk-M3I52H3M.js";
|
|
46
|
-
import "./chunk-LORVU5II.js";
|
|
47
|
-
import "./chunk-36ORDF7W.js";
|
|
48
|
-
import "./chunk-QSM56ZOP.js";
|
|
49
|
-
import "./chunk-MIHEJ6Y6.js";
|
|
50
|
-
import "./chunk-3VZV6SJQ.js";
|
|
51
|
-
import "./chunk-K357FGGP.js";
|
|
52
|
-
import "./chunk-RHKRREUU.js";
|
|
53
|
-
import "./chunk-ZA2KFUFR.js";
|
|
54
|
-
import "./chunk-ZYNBKBY3.js";
|
|
55
|
-
import "./chunk-NBMM2TZK.js";
|
|
56
20
|
|
|
57
21
|
// src/pages/customer-groups/customer-group-list/components/customer-group-list-table/customer-group-list-table.tsx
|
|
58
22
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
@@ -246,6 +210,7 @@ import { jsx as jsx2 } from "react/jsx-runtime";
|
|
|
246
210
|
var CustomerGroupsList = () => {
|
|
247
211
|
return /* @__PURE__ */ jsx2(SingleColumnPage, { children: /* @__PURE__ */ jsx2(CustomerGroupListTable, {}) });
|
|
248
212
|
};
|
|
213
|
+
|
|
249
214
|
export {
|
|
250
|
-
CustomerGroupsList
|
|
215
|
+
CustomerGroupsList
|
|
251
216
|
};
|