@mercurjs/admin 2.2.0-canary.2 → 2.2.0-canary.5
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]-YI7UXOO2.js → [id]-272FUOXG.js} +7 -3
- package/dist/{add-campaign-promotions-OLNTDP26.js → add-campaign-promotions-FAG3FAOF.js} +3 -3
- package/dist/{adjust-inventory-CVWSBMHU.js → adjust-inventory-EAAPNIBZ.js} +17 -17
- package/dist/{api-key-management-create-7RWOCVAO.js → api-key-management-create-MRLR4WFZ.js} +3 -3
- package/dist/{api-key-management-detail-ZIIDMHFI.js → api-key-management-detail-PIN6NFQF.js} +18 -18
- package/dist/{api-key-management-edit-ACH6TJAX.js → api-key-management-edit-EZHFP3RR.js} +3 -3
- package/dist/{api-key-management-list-JHBBXGHH.js → api-key-management-list-OPANEDHB.js} +4 -4
- package/dist/{api-key-management-sales-channels-XEBTUB5V.js → api-key-management-sales-channels-PBL3V4IS.js} +3 -3
- package/dist/{attribute-create-2PNEX4PM.js → attribute-create-F55LOXRA.js} +19 -19
- package/dist/{attribute-detail-3QBRIF6Q.js → attribute-detail-NRDJUPTJ.js} +17 -17
- package/dist/{attribute-edit-5G7P3LP2.js → attribute-edit-SB6GN67M.js} +2 -2
- package/dist/{attribute-edit-possible-value-VQ7MEFZA.js → attribute-edit-possible-value-5CLQOLVR.js} +2 -2
- package/dist/{attribute-list-OHU2QMUG.js → attribute-list-URWKNTSJ.js} +16 -16
- package/dist/{campaign-create-VFFIIRE4.js → campaign-create-7BELREFT.js} +3 -3
- package/dist/{campaign-detail-AZKBPDLC.js → campaign-detail-QMLFWZ6K.js} +20 -20
- package/dist/{categories-metadata-YZUP43OH.js → categories-metadata-5GXBBHEH.js} +16 -16
- package/dist/{category-create-2MRYTSYM.js → category-create-QPQQGIEN.js} +4 -4
- package/dist/{category-detail-PBGZSZRK.js → category-detail-RIKOZMPK.js} +24 -24
- package/dist/{category-edit-QLOS2LBA.js → category-edit-DJP7TK4X.js} +2 -2
- package/dist/{category-list-U7ZQBSZN.js → category-list-T5SE63HU.js} +4 -4
- package/dist/{category-organize-TIKTYJFZ.js → category-organize-DQQGAAJY.js} +2 -2
- package/dist/{category-products-4V2CKLVW.js → category-products-255EJFTV.js} +21 -21
- package/dist/{chunk-DKMBAZ5P.js → chunk-2MVNFKL6.js} +6 -6
- package/dist/{chunk-U7AZOXPV.js → chunk-2XVH2IJL.js} +8 -8
- package/dist/{chunk-UPNMDPFX.js → chunk-2YN2OI3W.js} +4 -4
- package/dist/{chunk-XZZTC7E5.js → chunk-2ZRWLCYP.js} +1 -1
- package/dist/{chunk-XQBPW3A4.js → chunk-34OFJ74B.js} +2 -2
- package/dist/{chunk-GKW445WA.js → chunk-3L7M4E7W.js} +1 -1
- package/dist/{chunk-HRGC5JHU.js → chunk-3OUWXGMT.js} +101 -405
- package/dist/{chunk-AXTQMIIK.js → chunk-46A3QXAL.js} +8 -27
- package/dist/{chunk-FTAR3BDS.js → chunk-4RT7P5ZQ.js} +1 -1
- package/dist/{chunk-IRTI3AS3.js → chunk-4XFFF2L5.js} +2 -2
- package/dist/{chunk-ZSFJVRRS.js → chunk-5AZCIOS4.js} +1 -1
- package/dist/{chunk-ZF3WBVOB.js → chunk-5J2HQOKK.js} +3 -3
- package/dist/{chunk-Q2QFNTNX.js → chunk-6NDM5WGE.js} +1 -1
- package/dist/{chunk-K4TGNN4P.js → chunk-6RHAGO5O.js} +2 -2
- package/dist/{chunk-HDRFPI6V.js → chunk-6WBQDJIH.js} +217 -155
- package/dist/{chunk-6LZAVEHW.js → chunk-6XTHMAA2.js} +2 -2
- package/dist/{chunk-GNLPUGYK.js → chunk-7BD24KNM.js} +2 -2
- package/dist/{chunk-WV4SQ57G.js → chunk-7O6WJTBI.js} +8 -10
- package/dist/{chunk-2LQ5SCPB.js → chunk-ACDG3RAL.js} +4 -4
- package/dist/{chunk-UXD3VNBO.js → chunk-AJLGY3LQ.js} +1 -2
- package/dist/{chunk-EREXPX6I.js → chunk-AKC67AN5.js} +18 -35
- package/dist/{chunk-3EDQIZV6.js → chunk-B66CMFMH.js} +2 -2
- package/dist/{chunk-TP7L6M7V.js → chunk-BKNAX6QQ.js} +1 -1
- package/dist/{chunk-6MJ6ZSJF.js → chunk-CKUIM5ZD.js} +5 -5
- package/dist/{chunk-NXLOYMWF.js → chunk-D2NBZVQC.js} +6 -6
- package/dist/{chunk-TIMU6K63.js → chunk-DDANJIE7.js} +3 -3
- package/dist/{chunk-3P4VTL4S.js → chunk-DV7QV3X2.js} +7 -7
- package/dist/{chunk-UXQAHUGZ.js → chunk-DWCBB4QM.js} +1 -1
- package/dist/{chunk-OSEIN4Y2.js → chunk-E5WBU7ZR.js} +1 -1
- package/dist/{chunk-H5PYBIOZ.js → chunk-EB5QHYKL.js} +1 -1
- package/dist/{chunk-TITPJHIL.js → chunk-EBQUMS7H.js} +1 -1
- package/dist/{chunk-QIU6DJY6.js → chunk-EFZBEG7O.js} +1 -1
- package/dist/{chunk-SRDK3XX7.js → chunk-EZGIPTIF.js} +2 -2
- package/dist/{chunk-DZIXC7OE.js → chunk-F5H5JZQZ.js} +28 -70
- package/dist/{chunk-EJTB2SLE.js → chunk-F7O6IXPA.js} +1 -1
- package/dist/{chunk-S5BJ5CMF.js → chunk-FEC24V7X.js} +1 -1
- package/dist/{chunk-G4PROEJI.js → chunk-FPV32HVT.js} +3 -3
- package/dist/{chunk-BAYORQYD.js → chunk-G3GSRFTB.js} +4 -4
- package/dist/{chunk-PQI4UJ6F.js → chunk-GPJ6KVY2.js} +2 -2
- package/dist/{chunk-CKACZXMP.js → chunk-GQLVERZW.js} +1 -1
- package/dist/chunk-GVEF6UDT.js +8 -0
- package/dist/{chunk-BHOZKBYY.js → chunk-HZQGZQTV.js} +1 -1
- package/dist/{chunk-WKCYMDTV.js → chunk-IWI34SYT.js} +1 -1
- package/dist/{chunk-JQBSPUH2.js → chunk-J4MAIN7L.js} +1 -1
- package/dist/{chunk-AB2LHP3M.js → chunk-K43FFKGD.js} +1 -1
- package/dist/{chunk-2S6VXFBZ.js → chunk-K6L5PHHQ.js} +4 -4
- package/dist/{chunk-BCVUMATY.js → chunk-KJSCFEXT.js} +4 -4
- package/dist/{chunk-CBGXKU7Z.js → chunk-KMZOBR5Q.js} +4 -4
- package/dist/{chunk-V6OGMYAI.js → chunk-KT7X72J4.js} +158 -169
- package/dist/{chunk-P25PIADJ.js → chunk-KTBL35I2.js} +1 -1
- package/dist/{chunk-WS63IRBI.js → chunk-L3E6LES5.js} +3 -3
- package/dist/chunk-LD7NVG2X.js +213 -0
- package/dist/{chunk-YGAX72XV.js → chunk-LO2ZWQGL.js} +0 -2
- package/dist/{chunk-BLYJZMNE.js → chunk-LO7NJYHZ.js} +2 -2
- package/dist/{chunk-6GWCDARX.js → chunk-LXMGYWPO.js} +3 -3
- package/dist/{chunk-N7KTSXS5.js → chunk-M5AJSIRN.js} +1 -1
- package/dist/{chunk-QABGBGAE.js → chunk-MFI5TG54.js} +6 -6
- package/dist/{chunk-YLKG7W4P.js → chunk-MKBCBAS2.js} +4 -4
- package/dist/{chunk-ALATTLBM.js → chunk-MSESXKMA.js} +1 -1
- package/dist/{chunk-BGGUVHDG.js → chunk-N3334MXP.js} +23 -23
- package/dist/{chunk-B3EEDC47.js → chunk-N3BYBEDV.js} +2 -2
- package/dist/{chunk-5POK3PM3.js → chunk-NMFVQDVF.js} +4 -8
- package/dist/chunk-P42E3L6Z.js +142 -0
- package/dist/{chunk-6FIU2V6Y.js → chunk-PR7Y27BW.js} +1 -1
- package/dist/{chunk-NQBSSM5V.js → chunk-Q23KHB6V.js} +2 -2
- package/dist/{chunk-637OFDFC.js → chunk-QFE4AEQJ.js} +8 -16
- package/dist/{chunk-XODRTI2W.js → chunk-R5F52U3C.js} +1 -1
- package/dist/{chunk-3IVTUFBM.js → chunk-SA3MMYXT.js} +1 -1
- package/dist/{chunk-Q6I2IKJB.js → chunk-SONUZNDT.js} +2 -2
- package/dist/{chunk-HLPCO2OQ.js → chunk-SS7LB52P.js} +5 -5
- package/dist/{chunk-S72BD7TM.js → chunk-SXGSYSW7.js} +1 -1
- package/dist/{chunk-GJ6WPZQG.js → chunk-TE245WV3.js} +4 -4
- package/dist/{chunk-PXTJJQKJ.js → chunk-TNNQPNXY.js} +1 -1
- package/dist/{chunk-WDH5C2NS.js → chunk-TXNRS2JR.js} +1 -1
- package/dist/{chunk-BE6JLTMI.js → chunk-UFGVU7RF.js} +1 -1
- package/dist/{chunk-H5EOOXPA.js → chunk-UKDC2AQR.js} +1 -2
- package/dist/{chunk-YZW5JD5A.js → chunk-UNOG2S56.js} +115 -180
- package/dist/{chunk-ZHOI4QMK.js → chunk-UXGLM3B4.js} +1 -1
- package/dist/{chunk-XFQH5HPP.js → chunk-VERWLDVW.js} +3 -3
- package/dist/{chunk-BVZAGCTV.js → chunk-WRVGLMRW.js} +1 -1
- package/dist/{chunk-ED7XNGZD.js → chunk-X3PXBMI3.js} +1 -1
- package/dist/{chunk-N2LH7A4X.js → chunk-X7H7TIOT.js} +9 -9
- package/dist/{chunk-BECQJZQ4.js → chunk-XAIID3PU.js} +4 -4
- package/dist/{chunk-A772RAKB.js → chunk-ZB4SO44T.js} +1 -1
- package/dist/{chunk-2YYXP6XI.js → chunk-ZRFWXNT3.js} +1 -37
- package/dist/{collection-add-products-33MYCTBF.js → collection-add-products-4ZTBHENL.js} +21 -21
- package/dist/{collection-create-HUNYHKUJ.js → collection-create-GPBN7KO6.js} +2 -2
- package/dist/{collection-detail-ACN5GFHC.js → collection-detail-W7OC2ALM.js} +22 -22
- package/dist/{collection-edit-OQGYTQDO.js → collection-edit-NVRFKO46.js} +2 -2
- package/dist/{collection-list-M4MFNMXL.js → collection-list-B7LALPSA.js} +23 -23
- package/dist/{collection-metadata-47N7TUOH.js → collection-metadata-E4C54MTU.js} +16 -16
- package/dist/{commission-rate-create-DCMGZS3D.js → commission-rate-create-7MEIKAXK.js} +33 -33
- package/dist/{commission-rate-detail-LAZZLZVX.js → commission-rate-detail-XBMB3Y7S.js} +17 -17
- package/dist/{commission-rate-edit-VL4TUE3M.js → commission-rate-edit-XXUAGK5Q.js} +33 -33
- package/dist/{constants-26tEckuq.d.ts → constants-Bahlh59D.d.ts} +8 -4
- package/dist/{customer-detail-D5SSLNFT.js → customer-detail-ONZGPCHW.js} +20 -20
- package/dist/{customer-group-detail-KRT7E2JA.js → customer-group-detail-XTCDJX7O.js} +16 -16
- package/dist/{customer-group-list-KKDIESQ6.js → customer-group-list-63ER7WQH.js} +16 -16
- package/dist/{customer-group-metadata-J6JY7DZ3.js → customer-group-metadata-N7HGHXNC.js} +16 -16
- package/dist/{customer-metadata-AH2LBK4T.js → customer-metadata-63OWV4KB.js} +16 -16
- package/dist/{customers-add-customer-group-AHGAPEIS.js → customers-add-customer-group-NUXPXNUC.js} +16 -16
- package/dist/{edit-inventory-item-ADNLKLCN.js → edit-inventory-item-YOJTYA7H.js} +16 -16
- package/dist/{edit-inventory-item-attributes-XVR2WLDU.js → edit-inventory-item-attributes-JGY633F2.js} +16 -16
- package/dist/{edit-reservation-HQQL42QX.js → edit-reservation-ACDUXG33.js} +2 -2
- package/dist/{edit-rules-YMKM5JPI.js → edit-rules-4VAD5Q3L.js} +17 -17
- package/dist/index.d.ts +2 -2
- package/dist/index.js +517 -517
- package/dist/{inventory-create-IVESXFSV.js → inventory-create-3NJZLSFO.js} +19 -19
- package/dist/{inventory-detail-TINIAFVB.js → inventory-detail-B3HU2OVR.js} +17 -17
- package/dist/{inventory-list-YLIAKQXI.js → inventory-list-AE44PEW7.js} +2 -2
- package/dist/{inventory-metadata-6INRH2JC.js → inventory-metadata-WCFTI7AH.js} +16 -16
- package/dist/{inventory-stock-6YGTATID.js → inventory-stock-M65W4GRN.js} +201 -39
- package/dist/{loader-6KDBTRVR.js → loader-O4EABIXE.js} +1 -1
- package/dist/{location-detail-EK2S7WOK.js → location-detail-2NCZD5MO.js} +19 -19
- package/dist/{location-fulfillment-providers-V26OWDAI.js → location-fulfillment-providers-3XKOFATD.js} +21 -21
- package/dist/{location-list-IV323QW2.js → location-list-VS6V2FXE.js} +16 -16
- package/dist/{location-sales-channels-EYUXMTW7.js → location-sales-channels-TEUZYDTT.js} +2 -2
- package/dist/{location-service-zone-shipping-option-create-36JZFRGY.js → location-service-zone-shipping-option-create-LAM3OHBC.js} +19 -19
- package/dist/{location-service-zone-shipping-option-pricing-JLGCOZGS.js → location-service-zone-shipping-option-pricing-POBJOF3Z.js} +7 -7
- package/dist/{login-6L3RMREO.js → login-DJWU5X5L.js} +16 -16
- package/dist/{manage-locations-CFTM6DNH.js → manage-locations-E2XQPKKE.js} +1 -1
- package/dist/{marketplace-detail-BAU2MEJT.js → marketplace-detail-IQLU7R3J.js} +19 -19
- package/dist/{marketplace-metadata-KRCGKOCA.js → marketplace-metadata-7DNBHUDD.js} +18 -18
- package/dist/{offers-J2SFSNF3.js → offers-UJCSO3RD.js} +3 -3
- package/dist/{order-allocate-items-DJ2V4B7A.js → order-allocate-items-TMVWJUV3.js} +3 -3
- package/dist/{order-create-claim-RMDDCUZ6.js → order-create-claim-MPSXY24H.js} +8 -8
- package/dist/{order-create-edit-PQ54JFZZ.js → order-create-edit-6JLXERBY.js} +4 -4
- package/dist/{order-create-exchange-T6DBVS75.js → order-create-exchange-O6COEAGJ.js} +22 -22
- package/dist/{order-create-fulfillment-SMSUJSBN.js → order-create-fulfillment-Y4HQ5YRS.js} +17 -17
- package/dist/{order-create-refund-OW3MIXBY.js → order-create-refund-TCNCSOMX.js} +20 -20
- package/dist/{order-create-return-YCX6C3VP.js → order-create-return-EVSD6GKE.js} +4 -4
- package/dist/{order-create-shipment-5ZAWH5CZ.js → order-create-shipment-EWOJJXEM.js} +17 -17
- package/dist/{order-detail-2OAEGBQG.js → order-detail-BOW62X75.js} +28 -28
- package/dist/{order-edit-billing-address-VGZBQHF5.js → order-edit-billing-address-5ZBOWDWQ.js} +18 -18
- package/dist/{order-edit-email-OOCXVRET.js → order-edit-email-DQJW2SAM.js} +17 -17
- package/dist/{order-edit-shipping-address-B4F3E5RE.js → order-edit-shipping-address-RIML4XFQ.js} +17 -17
- package/dist/{order-list-ERQWQ6UI.js → order-list-U5DZYLJK.js} +7 -7
- package/dist/{order-metadata-AN6MPHHT.js → order-metadata-WGZUETFN.js} +17 -17
- package/dist/{order-receive-return-DZ4IUOHY.js → order-receive-return-MDUU4L4X.js} +18 -18
- package/dist/{order-request-transfer-A2NJSQ4H.js → order-request-transfer-QFUMEZPD.js} +17 -17
- package/dist/pages/index.d.ts +35 -288
- package/dist/pages/index.js +162 -162
- package/dist/{price-list-configuration-XAHXLCXR.js → price-list-configuration-O3MR5IUA.js} +2 -2
- package/dist/{price-list-create-XCP32SJZ.js → price-list-create-J4AJG42T.js} +25 -25
- package/dist/{price-list-detail-26RLU4G3.js → price-list-detail-D2ETNZ5N.js} +23 -23
- package/dist/{price-list-edit-ZVLD4M5T.js → price-list-edit-OJAYEUYO.js} +2 -2
- package/dist/{price-list-list-ER4TOZTY.js → price-list-list-ARICU2NA.js} +4 -4
- package/dist/{price-list-prices-add-H4E2IVBC.js → price-list-prices-add-FQLQ5DPX.js} +24 -24
- package/dist/{price-list-prices-edit-WHCIGSB2.js → price-list-prices-edit-4HBSUC5W.js} +18 -18
- package/dist/{product-add-existing-attributes-MSJD3GOP.js → product-add-existing-attributes-IHCIKDIH.js} +18 -18
- package/dist/{product-attributes-MHRXZK5S.js → product-attributes-ZURXNZ3J.js} +2 -2
- package/dist/{product-brand-detail-QBWHNBYM.js → product-brand-detail-O7UKYV4H.js} +22 -22
- package/dist/{product-brand-metadata-EAMW6PQJ.js → product-brand-metadata-N2CJ5K3Z.js} +16 -16
- package/dist/{product-bulk-edit-J6ZP7GGM.js → product-bulk-edit-LHCPVFUX.js} +5 -7
- package/dist/{product-create-WOCQFTMZ.js → product-create-BQXFDMEP.js} +24 -24
- package/dist/{product-create-attribute-ZT3VZDNZ.js → product-create-attribute-UBWABT2Q.js} +2 -2
- package/dist/product-create-variant-MVYZPDO7.js +20 -0
- package/dist/{product-detail-AOMYROBE.js → product-detail-I57XSYLB.js} +19 -20
- package/dist/{product-edit-EKAZRIJ6.js → product-edit-EDW3D2KW.js} +2 -4
- package/dist/{product-list-J7RDCTOW.js → product-list-PR532XII.js} +23 -23
- package/dist/{product-media-KREKRDOC.js → product-media-J3VTWOU4.js} +5 -5
- package/dist/{product-metadata-O3BAEUYB.js → product-metadata-T2D4GEIP.js} +17 -17
- package/dist/{product-organization-SBQY44IF.js → product-organization-D6UMZAUE.js} +4 -4
- package/dist/{product-sales-channels-TFOGXCMI.js → product-sales-channels-NTT6KMSD.js} +3 -3
- package/dist/{product-shipping-profile-E4HJ4EYW.js → product-shipping-profile-WM7LORFB.js} +2 -2
- package/dist/{product-tag-create-7JBM6I3V.js → product-tag-create-47G425O2.js} +16 -16
- package/dist/{product-tag-detail-FCVZLJ7N.js → product-tag-detail-VNGOBWYE.js} +32 -32
- package/dist/{product-tag-edit-O2ADFDD6.js → product-tag-edit-DN7IVL75.js} +16 -16
- package/dist/{product-tag-list-N44OW4BR.js → product-tag-list-ZGRJZT2U.js} +32 -32
- package/dist/{product-tag-metadata-SBOUTUXY.js → product-tag-metadata-YLDBRJMI.js} +16 -16
- package/dist/{product-type-detail-II4RYMUP.js → product-type-detail-MPONGCVO.js} +23 -23
- package/dist/{product-type-metadata-KN5OXR6J.js → product-type-metadata-TDAER7JD.js} +17 -17
- package/dist/{product-variant-detail-H2YRFDAU.js → product-variant-detail-5BF6JTHV.js} +21 -30
- package/dist/{product-variant-edit-3HKWOCHQ.js → product-variant-edit-2RHFG2CZ.js} +167 -257
- package/dist/{product-variant-metadata-QESZ7VS2.js → product-variant-metadata-G2LLH7YK.js} +16 -16
- package/dist/{promotion-create-TGC6BVWF.js → promotion-create-G3M4UJX2.js} +21 -21
- package/dist/{promotion-detail-VYIXZMMD.js → promotion-detail-4EHU6FKF.js} +19 -19
- package/dist/{promotion-list-C3SKV5BJ.js → promotion-list-AFBLWKTJ.js} +4 -4
- package/dist/{refund-reason-create-2KEQFOID.js → refund-reason-create-6RPQHIJI.js} +16 -16
- package/dist/{refund-reason-edit-E7CB7SM3.js → refund-reason-edit-W2TVZB3N.js} +16 -16
- package/dist/{refund-reason-list-CB2FZPDK.js → refund-reason-list-TS6JWYS4.js} +27 -27
- package/dist/{region-metadata-723RQGHS.js → region-metadata-TNSJDCBM.js} +19 -19
- package/dist/{reservation-create-Y3HG4AZA.js → reservation-create-2TDZAX5A.js} +2 -2
- package/dist/{reservation-detail-HQMADZ56.js → reservation-detail-KFOVTTFH.js} +18 -18
- package/dist/{reservation-list-YKC3JJ6K.js → reservation-list-K4RPXJTO.js} +3 -3
- package/dist/{reservation-metadata-UG4YTEMY.js → reservation-metadata-HBFAVVPW.js} +17 -17
- package/dist/{reset-password-2VNU52CE.js → reset-password-3NYZNQPK.js} +1 -1
- package/dist/{return-reason-list-47DFQ3NX.js → return-reason-list-WBLPUYD4.js} +14 -14
- package/dist/{sales-channel-add-products-KKU2AR5R.js → sales-channel-add-products-IHGDKRKH.js} +21 -21
- package/dist/{sales-channel-create-BSNCLZWR.js → sales-channel-create-MPZCRQBT.js} +2 -2
- package/dist/{sales-channel-detail-5WPD5VKT.js → sales-channel-detail-QCFO7VUA.js} +22 -22
- package/dist/{sales-channel-edit-FUDXMZYV.js → sales-channel-edit-GILK4QK3.js} +2 -2
- package/dist/{sales-channel-list-GYLGH4U7.js → sales-channel-list-YNHR5EHL.js} +17 -17
- package/dist/{sales-channel-metadata-H6RSHKVP.js → sales-channel-metadata-OEQVWJRQ.js} +16 -16
- package/dist/{shipping-option-type-create-QAOW7753.js → shipping-option-type-create-SMXDCF6I.js} +16 -16
- package/dist/{shipping-option-type-detail-QGWVDTDU.js → shipping-option-type-detail-MO3YRUVR.js} +18 -18
- package/dist/{shipping-option-type-edit-WXYBDRNY.js → shipping-option-type-edit-KO64TZS6.js} +16 -16
- package/dist/{shipping-option-type-list-YSWP6DSC.js → shipping-option-type-list-6C26GWDM.js} +18 -18
- package/dist/{shipping-profile-metadata-UE53IA3J.js → shipping-profile-metadata-FLTMLAZN.js} +16 -16
- package/dist/{store-bulk-edit-6SQX7OV2.js → store-bulk-edit-LW6ABDJK.js} +2 -2
- package/dist/{store-create-WNFRHXWR.js → store-create-STR6YNFJ.js} +19 -19
- package/dist/{store-details-RS3SPTXC.js → store-details-3U4OEFWC.js} +27 -41
- package/dist/{store-edit-34CPYPM3.js → store-edit-KRBR5MGV.js} +6 -6
- package/dist/{store-list-Q5X3JB3R.js → store-list-PJ3U254I.js} +23 -23
- package/dist/{store-member-invite-7PAPHDOK.js → store-member-invite-AKH3KHMF.js} +1 -1
- package/dist/{tax-region-create-3KVECMFN.js → tax-region-create-NEKIT7TT.js} +17 -17
- package/dist/{tax-region-detail-AOT4X4DZ.js → tax-region-detail-LVN5XSN5.js} +18 -18
- package/dist/{tax-region-edit-5T7VHKIA.js → tax-region-edit-4PJV5F5X.js} +16 -16
- package/dist/{tax-region-metadata-RSZCJGJT.js → tax-region-metadata-EYRFMJLL.js} +16 -16
- package/dist/{tax-region-province-detail-XEMIX5SQ.js → tax-region-province-detail-MTHKW7LW.js} +18 -18
- package/dist/{tax-region-tax-override-create-KPFXMSPH.js → tax-region-tax-override-create-OGW3MPBD.js} +31 -31
- package/dist/{tax-region-tax-override-edit-RMMHCFXN.js → tax-region-tax-override-edit-LTZCYN4Y.js} +33 -33
- package/dist/{user-detail-W7DGVXDZ.js → user-detail-2OTVNTCL.js} +1 -1
- package/dist/{user-metadata-3AFZX3DM.js → user-metadata-GIR3A7WO.js} +16 -16
- package/package.json +2 -2
- package/dist/chunk-IEPNHH7Z.js +0 -170
- package/dist/chunk-QSGR43JM.js +0 -30
- package/dist/chunk-RQ4NMLSS.js +0 -8
- package/dist/chunk-TTERSO37.js +0 -652
- package/dist/chunk-U7XILJH6.js +0 -423
- package/dist/product-create-option-NIAP75EE.js +0 -130
- package/dist/product-create-variant-QODC7MZ7.js +0 -60
- package/dist/product-edit-option-OZUZGMIM.js +0 -166
- package/dist/product-prices-R5JOHVGS.js +0 -267
- package/dist/product-stock-EIP2XJUR.js +0 -545
- package/dist/product-variant-manage-inventory-items-Q5MJG3EJ.js +0 -337
- package/dist/{chunk-WVKVPGJW.js → chunk-FNKBJCNF.js} +3 -3
- package/dist/{chunk-RQPDD3RI.js → chunk-NUC27ELX.js} +3 -3
- package/dist/{promotion-add-campaign-O3RTMS3W.js → promotion-add-campaign-S3JJSFHT.js} +2 -2
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-54RTJBYO.js";
|
|
8
8
|
import {
|
|
9
9
|
PRODUCT_DETAIL_QUERY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GVEF6UDT.js";
|
|
11
11
|
import {
|
|
12
12
|
TwoColumnPage
|
|
13
13
|
} from "./chunk-E74OUNA3.js";
|
|
@@ -19,19 +19,23 @@ import {
|
|
|
19
19
|
} from "./chunk-LYZT5REU.js";
|
|
20
20
|
import {
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-F5H5JZQZ.js";
|
|
23
23
|
import {
|
|
24
24
|
useQueryParams
|
|
25
25
|
} from "./chunk-THHRRYRS.js";
|
|
26
26
|
import {
|
|
27
27
|
useProductTag
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-46A3QXAL.js";
|
|
29
|
+
import {
|
|
30
|
+
productAttributesQueryKeys,
|
|
31
|
+
useProductAttribute
|
|
32
|
+
} from "./chunk-533GMKEG.js";
|
|
29
33
|
import {
|
|
30
34
|
useProductType
|
|
31
35
|
} from "./chunk-46M463BR.js";
|
|
32
36
|
import {
|
|
33
37
|
useCollection
|
|
34
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-2ZRWLCYP.js";
|
|
35
39
|
import {
|
|
36
40
|
useSeller
|
|
37
41
|
} from "./chunk-LEG67A2R.js";
|
|
@@ -40,10 +44,7 @@ import {
|
|
|
40
44
|
} from "./chunk-BDGZ4EQO.js";
|
|
41
45
|
import {
|
|
42
46
|
useProductCategory
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
PRODUCT_VARIANT_IDS_KEY
|
|
46
|
-
} from "./chunk-YGAX72XV.js";
|
|
47
|
+
} from "./chunk-EB5QHYKL.js";
|
|
47
48
|
import {
|
|
48
49
|
TwoColumnPageSkeleton
|
|
49
50
|
} from "./chunk-INNFZYX2.js";
|
|
@@ -59,8 +60,9 @@ import {
|
|
|
59
60
|
useRejectProduct,
|
|
60
61
|
useRemoveAttributeFromProduct,
|
|
61
62
|
useRequestProductChanges,
|
|
62
|
-
useUpdateProduct
|
|
63
|
-
|
|
63
|
+
useUpdateProduct,
|
|
64
|
+
variantsQueryKeys
|
|
65
|
+
} from "./chunk-ZRFWXNT3.js";
|
|
64
66
|
import {
|
|
65
67
|
sdk
|
|
66
68
|
} from "./chunk-ZBWL72TB.js";
|
|
@@ -86,7 +88,7 @@ import {
|
|
|
86
88
|
isReferenceField,
|
|
87
89
|
partitionProductChangeActions
|
|
88
90
|
} from "@mercurjs/dashboard-shared";
|
|
89
|
-
import { useQuery } from "@tanstack/react-query";
|
|
91
|
+
import { useQueries, useQuery } from "@tanstack/react-query";
|
|
90
92
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
91
93
|
|
|
92
94
|
// src/components/common/confirm-prompt/confirm-prompt.tsx
|
|
@@ -170,6 +172,7 @@ var ConfirmPrompt = ({
|
|
|
170
172
|
|
|
171
173
|
// src/pages/products/product-detail/components/product-active-edit-section/product-active-edit-section.tsx
|
|
172
174
|
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
175
|
+
var VARIANT_LOOKUP_FIELDS = "id,title,sku,*images";
|
|
173
176
|
var ImageStrip = ({
|
|
174
177
|
images,
|
|
175
178
|
faded
|
|
@@ -313,13 +316,92 @@ var FieldRow = ({ diff }) => {
|
|
|
313
316
|
)
|
|
314
317
|
] });
|
|
315
318
|
};
|
|
316
|
-
var
|
|
319
|
+
var AttributeActionLine = ({
|
|
320
|
+
attributeId,
|
|
321
|
+
valueIds
|
|
322
|
+
}) => {
|
|
323
|
+
const { product_attribute } = useProductAttribute(attributeId);
|
|
324
|
+
const name = product_attribute?.name ?? attributeId;
|
|
325
|
+
const values = product_attribute?.values ?? [];
|
|
326
|
+
const selectedNames = valueIds && valueIds.length ? valueIds.map((id) => {
|
|
327
|
+
const match = values.find((v) => v.id === id);
|
|
328
|
+
return match?.name ?? id;
|
|
329
|
+
}) : [];
|
|
330
|
+
return /* @__PURE__ */ jsxs2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: [
|
|
331
|
+
/* @__PURE__ */ jsx2("span", { className: "font-medium text-ui-fg-base", children: name }),
|
|
332
|
+
selectedNames.length > 0 && `: ${selectedNames.join(", ")}`
|
|
333
|
+
] });
|
|
334
|
+
};
|
|
335
|
+
var VariantActionLine = ({
|
|
336
|
+
title,
|
|
337
|
+
images
|
|
338
|
+
}) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
|
|
339
|
+
images && images.length > 0 && /* @__PURE__ */ jsx2(ImageStrip, { images }),
|
|
340
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: /* @__PURE__ */ jsx2("span", { className: "font-medium text-ui-fg-base", children: title }) })
|
|
341
|
+
] });
|
|
342
|
+
var ActionLine = ({
|
|
343
|
+
action,
|
|
344
|
+
variantsById
|
|
345
|
+
}) => {
|
|
317
346
|
const { t } = useTranslation2();
|
|
347
|
+
const details = action.details ?? {};
|
|
348
|
+
if (action.action === import_types.ProductChangeActionType.ATTRIBUTE_ADD || action.action === import_types.ProductChangeActionType.ATTRIBUTE_REMOVE) {
|
|
349
|
+
if (!details.attribute_id) return null;
|
|
350
|
+
return /* @__PURE__ */ jsx2(
|
|
351
|
+
AttributeActionLine,
|
|
352
|
+
{
|
|
353
|
+
attributeId: details.attribute_id,
|
|
354
|
+
valueIds: action.action === import_types.ProductChangeActionType.ATTRIBUTE_ADD ? details.attribute_value_ids : void 0
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
const variantFallback = t("fields.variant", { defaultValue: "Variant" });
|
|
359
|
+
if (action.action === import_types.ProductChangeActionType.VARIANT_ADD) {
|
|
360
|
+
const title = details.variant?.title || details.variant?.sku || variantFallback;
|
|
361
|
+
return /* @__PURE__ */ jsx2(VariantActionLine, { title });
|
|
362
|
+
}
|
|
363
|
+
if (action.action === import_types.ProductChangeActionType.VARIANT_REMOVE) {
|
|
364
|
+
const variantId = details.variant_id ?? "";
|
|
365
|
+
const found = variantId ? variantsById.get(variantId) : void 0;
|
|
366
|
+
const title = found?.title || found?.sku || variantId || variantFallback;
|
|
367
|
+
const images = isImageList(found?.images) ? found?.images : void 0;
|
|
368
|
+
return /* @__PURE__ */ jsx2(VariantActionLine, { title, images });
|
|
369
|
+
}
|
|
318
370
|
const label = describeProductChangeAction(action, {
|
|
319
|
-
variant:
|
|
371
|
+
variant: variantFallback
|
|
320
372
|
});
|
|
321
373
|
return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: label });
|
|
322
374
|
};
|
|
375
|
+
var VariantUpdateBlock = ({
|
|
376
|
+
variantId,
|
|
377
|
+
diffs,
|
|
378
|
+
variantsById
|
|
379
|
+
}) => {
|
|
380
|
+
const { t } = useTranslation2();
|
|
381
|
+
const found = variantsById.get(variantId);
|
|
382
|
+
const title = found?.title || found?.sku || variantId || t("fields.variant", { defaultValue: "Variant" });
|
|
383
|
+
const images = isImageList(found?.images) ? found?.images : void 0;
|
|
384
|
+
return /* @__PURE__ */ jsxs2(
|
|
385
|
+
"div",
|
|
386
|
+
{
|
|
387
|
+
className: "flex flex-col gap-y-3",
|
|
388
|
+
"data-testid": `product-active-edit-variant-${variantId}`,
|
|
389
|
+
children: [
|
|
390
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
|
|
391
|
+
images && images.length > 0 && /* @__PURE__ */ jsx2(ImageStrip, { images }),
|
|
392
|
+
/* @__PURE__ */ jsxs2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: [
|
|
393
|
+
/* @__PURE__ */ jsx2("span", { className: "font-medium text-ui-fg-base", children: t("products.edits.panel.variantUpdated", {
|
|
394
|
+
defaultValue: "Variant updated"
|
|
395
|
+
}) }),
|
|
396
|
+
": ",
|
|
397
|
+
title
|
|
398
|
+
] })
|
|
399
|
+
] }),
|
|
400
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-col gap-y-4 pl-1", children: diffs.map((diff, idx) => /* @__PURE__ */ jsx2(FieldRow, { diff }, `${variantId}-${diff.field}-${idx}`)) })
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
};
|
|
323
405
|
var ProductActiveEditSection = ({
|
|
324
406
|
product
|
|
325
407
|
}) => {
|
|
@@ -339,13 +421,80 @@ var ProductActiveEditSection = ({
|
|
|
339
421
|
() => partitionProductChangeActions(product_change?.actions ?? []),
|
|
340
422
|
[product_change]
|
|
341
423
|
);
|
|
424
|
+
const productUpdated = useMemo(
|
|
425
|
+
() => updated.filter((d) => !d.variant_id),
|
|
426
|
+
[updated]
|
|
427
|
+
);
|
|
428
|
+
const variantsUpdated = useMemo(() => {
|
|
429
|
+
const groups = /* @__PURE__ */ new Map();
|
|
430
|
+
for (const diff of updated) {
|
|
431
|
+
if (!diff.variant_id) continue;
|
|
432
|
+
const bucket = groups.get(diff.variant_id) ?? [];
|
|
433
|
+
bucket.push(diff);
|
|
434
|
+
groups.set(diff.variant_id, bucket);
|
|
435
|
+
}
|
|
436
|
+
return groups;
|
|
437
|
+
}, [updated]);
|
|
438
|
+
const attributeIds = useMemo(() => {
|
|
439
|
+
const ids = /* @__PURE__ */ new Set();
|
|
440
|
+
for (const action of [...added, ...removed]) {
|
|
441
|
+
if (action.action === import_types.ProductChangeActionType.ATTRIBUTE_ADD || action.action === import_types.ProductChangeActionType.ATTRIBUTE_REMOVE) {
|
|
442
|
+
const details = action.details ?? {};
|
|
443
|
+
if (details.attribute_id) ids.add(details.attribute_id);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return Array.from(ids);
|
|
447
|
+
}, [added, removed]);
|
|
448
|
+
const attributeQueries = useQueries({
|
|
449
|
+
queries: attributeIds.map((id) => ({
|
|
450
|
+
queryKey: productAttributesQueryKeys.detail(id),
|
|
451
|
+
queryFn: () => sdk.admin.productAttributes.$id.query({ $id: id })
|
|
452
|
+
}))
|
|
453
|
+
});
|
|
454
|
+
const isLoadingAttributes = attributeQueries.some((q) => q.isPending);
|
|
455
|
+
const variantIds = useMemo(() => {
|
|
456
|
+
const ids = /* @__PURE__ */ new Set();
|
|
457
|
+
for (const action of removed) {
|
|
458
|
+
if (action.action === import_types.ProductChangeActionType.VARIANT_REMOVE) {
|
|
459
|
+
const details = action.details ?? {};
|
|
460
|
+
if (details.variant_id) ids.add(details.variant_id);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
for (const diff of updated) {
|
|
464
|
+
if (diff.variant_id) ids.add(diff.variant_id);
|
|
465
|
+
}
|
|
466
|
+
return Array.from(ids);
|
|
467
|
+
}, [removed, updated]);
|
|
468
|
+
const variantQueryInput = { fields: VARIANT_LOOKUP_FIELDS };
|
|
469
|
+
const variantQueries = useQueries({
|
|
470
|
+
queries: variantIds.map((variantId) => ({
|
|
471
|
+
queryKey: variantsQueryKeys.detail(variantId, variantQueryInput),
|
|
472
|
+
queryFn: () => sdk.admin.products.$id.variants.$variantId.query({
|
|
473
|
+
$id: product.id,
|
|
474
|
+
$variantId: variantId,
|
|
475
|
+
...variantQueryInput
|
|
476
|
+
})
|
|
477
|
+
}))
|
|
478
|
+
});
|
|
479
|
+
const isLoadingVariants = variantQueries.some((q) => q.isPending);
|
|
480
|
+
const variantsById = useMemo(() => {
|
|
481
|
+
const map = /* @__PURE__ */ new Map();
|
|
482
|
+
for (const query of variantQueries) {
|
|
483
|
+
const variant = query.data?.variant;
|
|
484
|
+
if (variant?.id) map.set(variant.id, variant);
|
|
485
|
+
}
|
|
486
|
+
return map;
|
|
487
|
+
}, [variantQueries]);
|
|
342
488
|
if (isError || !product_change) {
|
|
343
489
|
return null;
|
|
344
490
|
}
|
|
345
491
|
if (product_change.status !== import_types.ProductChangeStatus.PENDING) {
|
|
346
492
|
return null;
|
|
347
493
|
}
|
|
348
|
-
|
|
494
|
+
if (isLoadingAttributes || isLoadingVariants) {
|
|
495
|
+
return null;
|
|
496
|
+
}
|
|
497
|
+
const hasContent = productUpdated.length > 0 || variantsUpdated.size > 0 || added.length > 0 || removed.length > 0 || deleteRequested;
|
|
349
498
|
const handleConfirm = async (note) => {
|
|
350
499
|
try {
|
|
351
500
|
await confirmChange({ internal_note: note });
|
|
@@ -378,7 +527,20 @@ var ProductActiveEditSection = ({
|
|
|
378
527
|
store: requesterSeller?.name ?? t("products.request.fallbackStore")
|
|
379
528
|
}) }) }),
|
|
380
529
|
hasContent && /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
381
|
-
|
|
530
|
+
productUpdated.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-4 px-6 py-4", children: [
|
|
531
|
+
/* @__PURE__ */ jsx2(
|
|
532
|
+
Text,
|
|
533
|
+
{
|
|
534
|
+
size: "small",
|
|
535
|
+
weight: "plus",
|
|
536
|
+
leading: "compact",
|
|
537
|
+
className: "text-ui-fg-subtle w-[160px] shrink-0",
|
|
538
|
+
children: t("labels.updated")
|
|
539
|
+
}
|
|
540
|
+
),
|
|
541
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-col gap-y-4", children: productUpdated.map((diff, idx) => /* @__PURE__ */ jsx2(FieldRow, { diff }, `${diff.field}-${idx}`)) })
|
|
542
|
+
] }),
|
|
543
|
+
variantsUpdated.size > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-4 px-6 py-4", children: [
|
|
382
544
|
/* @__PURE__ */ jsx2(
|
|
383
545
|
Text,
|
|
384
546
|
{
|
|
@@ -389,7 +551,17 @@ var ProductActiveEditSection = ({
|
|
|
389
551
|
children: t("labels.updated")
|
|
390
552
|
}
|
|
391
553
|
),
|
|
392
|
-
/* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-col gap-y-
|
|
554
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-col gap-y-6", children: Array.from(variantsUpdated.entries()).map(
|
|
555
|
+
([variantId, diffs]) => /* @__PURE__ */ jsx2(
|
|
556
|
+
VariantUpdateBlock,
|
|
557
|
+
{
|
|
558
|
+
variantId,
|
|
559
|
+
diffs,
|
|
560
|
+
variantsById
|
|
561
|
+
},
|
|
562
|
+
variantId
|
|
563
|
+
)
|
|
564
|
+
) })
|
|
393
565
|
] }),
|
|
394
566
|
added.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-4 px-6 py-4", children: [
|
|
395
567
|
/* @__PURE__ */ jsx2(
|
|
@@ -402,7 +574,14 @@ var ProductActiveEditSection = ({
|
|
|
402
574
|
children: t("labels.added")
|
|
403
575
|
}
|
|
404
576
|
),
|
|
405
|
-
/* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-col gap-y-2", children: added.map((action) => /* @__PURE__ */ jsx2(
|
|
577
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-col gap-y-2", children: added.map((action) => /* @__PURE__ */ jsx2(
|
|
578
|
+
ActionLine,
|
|
579
|
+
{
|
|
580
|
+
action,
|
|
581
|
+
variantsById
|
|
582
|
+
},
|
|
583
|
+
action.id
|
|
584
|
+
)) })
|
|
406
585
|
] }),
|
|
407
586
|
removed.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-4 px-6 py-4", children: [
|
|
408
587
|
/* @__PURE__ */ jsx2(
|
|
@@ -415,7 +594,14 @@ var ProductActiveEditSection = ({
|
|
|
415
594
|
children: t("labels.removed")
|
|
416
595
|
}
|
|
417
596
|
),
|
|
418
|
-
/* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-col gap-y-2", children: removed.map((action) => /* @__PURE__ */ jsx2(
|
|
597
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-1 flex-col gap-y-2", children: removed.map((action) => /* @__PURE__ */ jsx2(
|
|
598
|
+
ActionLine,
|
|
599
|
+
{
|
|
600
|
+
action,
|
|
601
|
+
variantsById
|
|
602
|
+
},
|
|
603
|
+
action.id
|
|
604
|
+
)) })
|
|
419
605
|
] }),
|
|
420
606
|
deleteRequested && /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-4 px-6 py-4", children: [
|
|
421
607
|
/* @__PURE__ */ jsx2(
|
|
@@ -854,8 +1040,6 @@ var productStatusColor = (status) => {
|
|
|
854
1040
|
return "orange";
|
|
855
1041
|
case "published":
|
|
856
1042
|
return "green";
|
|
857
|
-
case "requires_action":
|
|
858
|
-
return "blue";
|
|
859
1043
|
case "rejected":
|
|
860
1044
|
return "red";
|
|
861
1045
|
default:
|
|
@@ -1228,20 +1412,6 @@ var ProductOrganizationSection = ({
|
|
|
1228
1412
|
"data-testid": "product-type-row"
|
|
1229
1413
|
}
|
|
1230
1414
|
),
|
|
1231
|
-
/* @__PURE__ */ jsx7(
|
|
1232
|
-
SectionRow,
|
|
1233
|
-
{
|
|
1234
|
-
title: t("fields.brand"),
|
|
1235
|
-
value: product.brand ? /* @__PURE__ */ jsx7(
|
|
1236
|
-
OrganizationTag,
|
|
1237
|
-
{
|
|
1238
|
-
label: product.brand.name,
|
|
1239
|
-
to: `/settings/product-brands/${product.brand.id}`
|
|
1240
|
-
}
|
|
1241
|
-
) : void 0,
|
|
1242
|
-
"data-testid": "product-brand-row"
|
|
1243
|
-
}
|
|
1244
|
-
),
|
|
1245
1415
|
/* @__PURE__ */ jsx7(
|
|
1246
1416
|
SectionRow,
|
|
1247
1417
|
{
|
|
@@ -1288,12 +1458,11 @@ var OrganizationTag = ({ label, to }) => {
|
|
|
1288
1458
|
|
|
1289
1459
|
// src/pages/products/product-detail/components/product-variant-section/product-variant-section.tsx
|
|
1290
1460
|
import { useCallback, useMemo as useMemo2 } from "react";
|
|
1291
|
-
import {
|
|
1461
|
+
import { PencilSquare as PencilSquare4, Trash as Trash3 } from "@medusajs/icons";
|
|
1292
1462
|
import {
|
|
1293
1463
|
Badge as Badge3,
|
|
1294
1464
|
Container as Container7,
|
|
1295
1465
|
createDataTableColumnHelper,
|
|
1296
|
-
createDataTableCommandHelper,
|
|
1297
1466
|
Tooltip as Tooltip4,
|
|
1298
1467
|
usePrompt as usePrompt4
|
|
1299
1468
|
} from "@medusajs/ui";
|
|
@@ -1313,7 +1482,6 @@ var ProductVariantSection = ({
|
|
|
1313
1482
|
);
|
|
1314
1483
|
const columns = useColumns(product);
|
|
1315
1484
|
const filters = useFilters();
|
|
1316
|
-
const commands = useCommands();
|
|
1317
1485
|
const { variants, count, isPending, isError, error } = useProductVariants(
|
|
1318
1486
|
product.id,
|
|
1319
1487
|
{
|
|
@@ -1323,7 +1491,7 @@ var ProductVariantSection = ({
|
|
|
1323
1491
|
limit: PAGE_SIZE,
|
|
1324
1492
|
created_at: created_at ? JSON.parse(created_at) : void 0,
|
|
1325
1493
|
updated_at: updated_at ? JSON.parse(updated_at) : void 0,
|
|
1326
|
-
fields: "title,created_at,updated_at,*
|
|
1494
|
+
fields: "title,created_at,updated_at,*options,*options.option"
|
|
1327
1495
|
},
|
|
1328
1496
|
{
|
|
1329
1497
|
placeholderData: keepPreviousData
|
|
@@ -1358,26 +1526,6 @@ var ProductVariantSection = ({
|
|
|
1358
1526
|
label: t("actions.create"),
|
|
1359
1527
|
to: `variants/create`
|
|
1360
1528
|
},
|
|
1361
|
-
actionMenu: {
|
|
1362
|
-
groups: [
|
|
1363
|
-
{
|
|
1364
|
-
actions: [
|
|
1365
|
-
{
|
|
1366
|
-
label: t("products.editPrices"),
|
|
1367
|
-
to: `prices`,
|
|
1368
|
-
icon: /* @__PURE__ */ jsx8(PencilSquare4, {})
|
|
1369
|
-
},
|
|
1370
|
-
{
|
|
1371
|
-
label: t("inventory.stock.action"),
|
|
1372
|
-
to: `stock`,
|
|
1373
|
-
icon: /* @__PURE__ */ jsx8(Buildings, {})
|
|
1374
|
-
}
|
|
1375
|
-
]
|
|
1376
|
-
}
|
|
1377
|
-
],
|
|
1378
|
-
"data-testid": "product-variant-section-action-menu"
|
|
1379
|
-
},
|
|
1380
|
-
commands,
|
|
1381
1529
|
prefix: PREFIX
|
|
1382
1530
|
}
|
|
1383
1531
|
) }) });
|
|
@@ -1416,44 +1564,8 @@ var useColumns = (product) => {
|
|
|
1416
1564
|
},
|
|
1417
1565
|
[mutateAsync, prompt, t]
|
|
1418
1566
|
);
|
|
1419
|
-
const optionColumns = useMemo2(() => {
|
|
1420
|
-
if (!product?.options) {
|
|
1421
|
-
return [];
|
|
1422
|
-
}
|
|
1423
|
-
return product.options.map((option) => {
|
|
1424
|
-
return columnHelper.display({
|
|
1425
|
-
id: option.id,
|
|
1426
|
-
header: option.title,
|
|
1427
|
-
cell: ({ row }) => {
|
|
1428
|
-
const variantOpt = row.original.options?.find(
|
|
1429
|
-
(opt) => opt.option_id === option.id
|
|
1430
|
-
);
|
|
1431
|
-
if (!variantOpt) {
|
|
1432
|
-
return /* @__PURE__ */ jsx8("span", { className: "text-ui-fg-muted", children: "-" });
|
|
1433
|
-
}
|
|
1434
|
-
return /* @__PURE__ */ jsx8(
|
|
1435
|
-
"div",
|
|
1436
|
-
{
|
|
1437
|
-
className: "flex items-center",
|
|
1438
|
-
"data-testid": `product-variant-option-${option.id}-${row.original.id}`,
|
|
1439
|
-
children: /* @__PURE__ */ jsx8(Tooltip4, { content: variantOpt.value, children: /* @__PURE__ */ jsx8(
|
|
1440
|
-
Badge3,
|
|
1441
|
-
{
|
|
1442
|
-
size: "2xsmall",
|
|
1443
|
-
title: variantOpt.value,
|
|
1444
|
-
className: "inline-flex min-w-[20px] max-w-[140px] items-center justify-center overflow-hidden truncate",
|
|
1445
|
-
"data-testid": `product-variant-option-badge-${option.id}-${row.original.id}-${variantOpt.value}`,
|
|
1446
|
-
children: variantOpt.value
|
|
1447
|
-
}
|
|
1448
|
-
) })
|
|
1449
|
-
}
|
|
1450
|
-
);
|
|
1451
|
-
}
|
|
1452
|
-
});
|
|
1453
|
-
});
|
|
1454
|
-
}, [product]);
|
|
1455
1567
|
const attributeColumns = useMemo2(() => {
|
|
1456
|
-
const variantAttributes = product?.
|
|
1568
|
+
const variantAttributes = product?.attributes?.filter((attr) => attr.is_variant_axis);
|
|
1457
1569
|
if (!variantAttributes?.length) {
|
|
1458
1570
|
return [];
|
|
1459
1571
|
}
|
|
@@ -1462,11 +1574,10 @@ var useColumns = (product) => {
|
|
|
1462
1574
|
id: `attribute-${attribute.id}`,
|
|
1463
1575
|
header: attribute.name,
|
|
1464
1576
|
cell: ({ row }) => {
|
|
1465
|
-
const
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
)
|
|
1469
|
-
if (!matches.length) {
|
|
1577
|
+
const variantOpt = row.original.options?.find(
|
|
1578
|
+
(opt) => opt.option?.title === attribute.name
|
|
1579
|
+
);
|
|
1580
|
+
if (!variantOpt?.value) {
|
|
1470
1581
|
return /* @__PURE__ */ jsx8("span", { className: "text-ui-fg-muted", children: "-" });
|
|
1471
1582
|
}
|
|
1472
1583
|
return /* @__PURE__ */ jsx8(
|
|
@@ -1474,16 +1585,16 @@ var useColumns = (product) => {
|
|
|
1474
1585
|
{
|
|
1475
1586
|
className: "flex flex-wrap items-center gap-1",
|
|
1476
1587
|
"data-testid": `product-variant-attribute-${attribute.id}-${row.original.id}`,
|
|
1477
|
-
children:
|
|
1588
|
+
children: /* @__PURE__ */ jsx8(Tooltip4, { content: variantOpt.value, children: /* @__PURE__ */ jsx8(
|
|
1478
1589
|
Badge3,
|
|
1479
1590
|
{
|
|
1480
1591
|
size: "2xsmall",
|
|
1481
|
-
title: value
|
|
1592
|
+
title: variantOpt.value,
|
|
1482
1593
|
className: "inline-flex min-w-[20px] max-w-[140px] items-center justify-center overflow-hidden truncate",
|
|
1483
|
-
"data-testid": `product-variant-attribute-badge-${attribute.id}-${row.original.id}-${value
|
|
1484
|
-
children: value
|
|
1594
|
+
"data-testid": `product-variant-attribute-badge-${attribute.id}-${row.original.id}-${variantOpt.value}`,
|
|
1595
|
+
children: variantOpt.value
|
|
1485
1596
|
}
|
|
1486
|
-
) }
|
|
1597
|
+
) })
|
|
1487
1598
|
}
|
|
1488
1599
|
);
|
|
1489
1600
|
}
|
|
@@ -1516,38 +1627,6 @@ var useColumns = (product) => {
|
|
|
1516
1627
|
onClick: () => handleDelete(variant.id, variant.title)
|
|
1517
1628
|
}
|
|
1518
1629
|
];
|
|
1519
|
-
const inventoryItemsCount = variant.inventory_items?.length || 0;
|
|
1520
|
-
switch (inventoryItemsCount) {
|
|
1521
|
-
case 0:
|
|
1522
|
-
break;
|
|
1523
|
-
case 1: {
|
|
1524
|
-
const inventoryItemLink = `/inventory/${variant.inventory_items[0].inventory.id}`;
|
|
1525
|
-
mainActions.push({
|
|
1526
|
-
label: t("products.variant.inventory.actions.inventoryItems"),
|
|
1527
|
-
onClick: () => {
|
|
1528
|
-
navigate(inventoryItemLink);
|
|
1529
|
-
},
|
|
1530
|
-
icon: /* @__PURE__ */ jsx8(Buildings, {})
|
|
1531
|
-
});
|
|
1532
|
-
break;
|
|
1533
|
-
}
|
|
1534
|
-
default: {
|
|
1535
|
-
const ids = variant.inventory_items?.map((i) => i.inventory?.id);
|
|
1536
|
-
if (!ids || ids.length === 0) {
|
|
1537
|
-
break;
|
|
1538
|
-
}
|
|
1539
|
-
const inventoryKitLink = `/inventory?${new URLSearchParams({
|
|
1540
|
-
id: ids.join(",")
|
|
1541
|
-
}).toString()}`;
|
|
1542
|
-
mainActions.push({
|
|
1543
|
-
label: t("products.variant.inventory.actions.inventoryKit"),
|
|
1544
|
-
onClick: () => {
|
|
1545
|
-
navigate(inventoryKitLink);
|
|
1546
|
-
},
|
|
1547
|
-
icon: /* @__PURE__ */ jsx8(Component, {})
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
1630
|
return [mainActions, secondaryActions];
|
|
1552
1631
|
},
|
|
1553
1632
|
[handleDelete, navigate, t, tableSearchParams]
|
|
@@ -1560,14 +1639,13 @@ var useColumns = (product) => {
|
|
|
1560
1639
|
sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
|
|
1561
1640
|
sortDescLabel: t("filters.sorting.alphabeticallyDesc")
|
|
1562
1641
|
}),
|
|
1563
|
-
...optionColumns,
|
|
1564
1642
|
...attributeColumns,
|
|
1565
1643
|
...dateColumns,
|
|
1566
1644
|
columnHelper.action({
|
|
1567
1645
|
actions: getActions
|
|
1568
1646
|
})
|
|
1569
1647
|
];
|
|
1570
|
-
}, [t,
|
|
1648
|
+
}, [t, attributeColumns, dateColumns, getActions]);
|
|
1571
1649
|
};
|
|
1572
1650
|
var useFilters = () => {
|
|
1573
1651
|
const dateFilters = useDataTableDateFilters();
|
|
@@ -1577,22 +1655,6 @@ var useFilters = () => {
|
|
|
1577
1655
|
];
|
|
1578
1656
|
}, [dateFilters]);
|
|
1579
1657
|
};
|
|
1580
|
-
var commandHelper = createDataTableCommandHelper();
|
|
1581
|
-
var useCommands = () => {
|
|
1582
|
-
const { t } = useTranslation8();
|
|
1583
|
-
const navigate = useNavigate2();
|
|
1584
|
-
return [
|
|
1585
|
-
commandHelper.command({
|
|
1586
|
-
label: t("inventory.stock.action"),
|
|
1587
|
-
shortcut: "i",
|
|
1588
|
-
action: async (selection) => {
|
|
1589
|
-
navigate(
|
|
1590
|
-
`stock?${PRODUCT_VARIANT_IDS_KEY}=${Object.keys(selection).join(",")}`
|
|
1591
|
-
);
|
|
1592
|
-
}
|
|
1593
|
-
})
|
|
1594
|
-
];
|
|
1595
|
-
};
|
|
1596
1658
|
|
|
1597
1659
|
// src/pages/products/product-detail/product-detail.tsx
|
|
1598
1660
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-KOURHC2N.js";
|
|
7
7
|
import {
|
|
8
8
|
useCollectionTableQuery
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WRVGLMRW.js";
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
useCollections,
|
|
19
19
|
useDeleteCollection
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2ZRWLCYP.js";
|
|
21
21
|
import {
|
|
22
22
|
ActionMenu
|
|
23
23
|
} from "./chunk-BDGZ4EQO.js";
|
|
@@ -65,7 +65,6 @@ var OFFER_DETAIL_FIELDS = [
|
|
|
65
65
|
"variant_id",
|
|
66
66
|
"seller_id",
|
|
67
67
|
"shipping_profile_id",
|
|
68
|
-
"price_set_id",
|
|
69
68
|
"metadata",
|
|
70
69
|
"created_at",
|
|
71
70
|
"updated_at",
|
|
@@ -80,15 +79,14 @@ var OFFER_DETAIL_FIELDS = [
|
|
|
80
79
|
"shipping_profile.id",
|
|
81
80
|
"shipping_profile.name",
|
|
82
81
|
"shipping_profile.type",
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"price_set.prices.price_rules.value",
|
|
82
|
+
"prices.id",
|
|
83
|
+
"prices.amount",
|
|
84
|
+
"prices.currency_code",
|
|
85
|
+
"prices.min_quantity",
|
|
86
|
+
"prices.max_quantity",
|
|
87
|
+
"prices.rules_count",
|
|
88
|
+
"prices.price_rules.attribute",
|
|
89
|
+
"prices.price_rules.value",
|
|
92
90
|
"inventory_item_link.id",
|
|
93
91
|
"inventory_item_link.required_quantity",
|
|
94
92
|
"inventory_item_link.inventory_item_id",
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
DateCell,
|
|
12
12
|
DateHeader
|
|
13
13
|
} from "./chunk-25LYVP3C.js";
|
|
14
|
+
import {
|
|
15
|
+
getStylizedAmount
|
|
16
|
+
} from "./chunk-PXYDR7WQ.js";
|
|
14
17
|
import {
|
|
15
18
|
TextCell,
|
|
16
19
|
TextHeader
|
|
17
20
|
} from "./chunk-JHIMVLB2.js";
|
|
18
|
-
import {
|
|
19
|
-
getStylizedAmount
|
|
20
|
-
} from "./chunk-PXYDR7WQ.js";
|
|
21
21
|
import {
|
|
22
22
|
_DataTable,
|
|
23
23
|
useDataTable
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./chunk-PRBE5CM3.js";
|
|
37
37
|
import {
|
|
38
38
|
useSalesChannels
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-FEC24V7X.js";
|
|
40
40
|
|
|
41
41
|
// src/pages/orders/order-list/order-list.tsx
|
|
42
42
|
import { Children as Children3 } from "react";
|