@medusajs/dashboard 3.0.0-snapshot-20251106181920 → 3.0.0-snapshot-20251114155958
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-ZUJD7HBF.mjs → add-campaign-promotions-I7HDYMBX.mjs} +6 -6
- package/dist/{adjust-inventory-MEJEPP4Y.mjs → adjust-inventory-ZB3AVET7.mjs} +3 -3
- package/dist/{api-key-management-create-4OZWVOSF.mjs → api-key-management-create-U6VGZK7R.mjs} +4 -4
- package/dist/{api-key-management-detail-K3A3T6ET.mjs → api-key-management-detail-B5XNEGKF.mjs} +36 -36
- package/dist/{api-key-management-edit-FYLVVQOA.mjs → api-key-management-edit-TJM737A7.mjs} +4 -4
- package/dist/{api-key-management-list-6YG52LWY.mjs → api-key-management-list-ZRYMMTF5.mjs} +9 -9
- package/dist/{api-key-management-sales-channels-S5IFH7LP.mjs → api-key-management-sales-channels-D2RAHI7W.mjs} +12 -12
- package/dist/app.js +4574 -1022
- package/dist/app.mjs +33 -33
- package/dist/{campaign-budget-edit-V2VMINUO.mjs → campaign-budget-edit-H2KQKD7B.mjs} +2 -2
- package/dist/{campaign-configuration-PP4A5ADV.mjs → campaign-configuration-A452A22M.mjs} +2 -2
- package/dist/{campaign-create-NEKUWDGF.mjs → campaign-create-IXOWJQ4L.mjs} +7 -7
- package/dist/{campaign-detail-2H2W4W5B.mjs → campaign-detail-RCA3TBE4.mjs} +33 -33
- package/dist/{campaign-edit-O3LKMLXK.mjs → campaign-edit-LZV56AYF.mjs} +2 -2
- package/dist/{campaign-list-3452F4Y6.mjs → campaign-list-OH566KWW.mjs} +8 -8
- package/dist/{categories-metadata-ZEYU33GV.mjs → categories-metadata-5NBC7HX4.mjs} +28 -28
- package/dist/{category-create-N7PP3GWU.mjs → category-create-BTMZYQ5R.mjs} +3 -3
- package/dist/{category-detail-DKY37LPO.mjs → category-detail-RBUJVFPN.mjs} +34 -34
- package/dist/{category-edit-IFDQP7EZ.mjs → category-edit-Q3KEELHO.mjs} +3 -3
- package/dist/{category-list-2M4BCRAL.mjs → category-list-Z6HS6N75.mjs} +8 -8
- package/dist/{category-organize-76I7PO24.mjs → category-organize-45NPSRNG.mjs} +3 -3
- package/dist/{category-products-VVRGW25X.mjs → category-products-KREOO2KQ.mjs} +33 -33
- package/dist/{chunk-UKX2FFFV.mjs → chunk-25UWYEJX.mjs} +1 -1
- package/dist/{chunk-Q33G337Z.mjs → chunk-2GWGNMAA.mjs} +1 -1
- package/dist/{chunk-SMDWWXCD.mjs → chunk-2QH2TBJ2.mjs} +2 -2
- package/dist/{chunk-NQIC7ZFS.mjs → chunk-2SSUH2HJ.mjs} +2 -2
- package/dist/{chunk-P5RVJWPK.mjs → chunk-2WLOIS3L.mjs} +3 -3
- package/dist/{chunk-2D44OO7A.mjs → chunk-2X25XWOW.mjs} +1 -1
- package/dist/{chunk-KX4P5L3R.mjs → chunk-3BF5SC66.mjs} +1 -1
- package/dist/{chunk-OI4W5AEL.mjs → chunk-3RRA56WC.mjs} +26 -12
- package/dist/{chunk-7DWBXEH3.mjs → chunk-42TMWI76.mjs} +4 -4
- package/dist/{chunk-3EGEJ6Q2.mjs → chunk-4YAPXPLM.mjs} +1 -1
- package/dist/{chunk-F6PXCY3N.mjs → chunk-5AFMB7XQ.mjs} +1 -1
- package/dist/{chunk-OFN7DIZA.mjs → chunk-5AM254NB.mjs} +83 -3
- package/dist/{chunk-2ZKVRTBW.mjs → chunk-5BQQRHQS.mjs} +1 -1
- package/dist/{chunk-Y2XQE25L.mjs → chunk-5IFK2ZTA.mjs} +2 -2
- package/dist/{chunk-7PWZ5GMG.mjs → chunk-5N33TBBX.mjs} +2 -2
- package/dist/{chunk-S22NYSST.mjs → chunk-5X6SKB2P.mjs} +1 -1
- package/dist/{chunk-AHQI2S2Z.mjs → chunk-67RC6SEX.mjs} +2 -2
- package/dist/{chunk-I6E6CALJ.mjs → chunk-6CLQKVAU.mjs} +1 -1
- package/dist/{chunk-A2UMBW3V.mjs → chunk-6OU4CHZI.mjs} +1 -1
- package/dist/{chunk-GBKLLUUX.mjs → chunk-7H6DB666.mjs} +2 -2
- package/dist/{chunk-R2G2B47Y.mjs → chunk-A63RZVX6.mjs} +1 -1
- package/dist/{chunk-YSQG2JDM.mjs → chunk-BKJMQ6RP.mjs} +2 -2
- package/dist/{chunk-TYTNUPXB.mjs → chunk-BYOPZAGX.mjs} +13 -4
- package/dist/{chunk-HGFZAXHD.mjs → chunk-BYZSMXJ7.mjs} +2 -2
- package/dist/{chunk-32IQRUVY.mjs → chunk-CDORR33H.mjs} +1 -1
- package/dist/{chunk-RLY2SL5E.mjs → chunk-CN7JXSGW.mjs} +1 -1
- package/dist/{chunk-2WZUO66T.mjs → chunk-CV65NY6Y.mjs} +1 -1
- package/dist/{chunk-227DWSFF.mjs → chunk-CWIMWR6L.mjs} +9 -9
- package/dist/{chunk-PIR2H25N.mjs → chunk-DYDGGABK.mjs} +1 -1
- package/dist/{chunk-PFKKVLZX.mjs → chunk-DZWH2RV6.mjs} +1 -1
- package/dist/{chunk-LYTIMAIZ.mjs → chunk-FJHAGJ5G.mjs} +2 -2
- package/dist/{chunk-NGR5XU3K.mjs → chunk-FNQ227BC.mjs} +2 -2
- package/dist/{chunk-IVZ6BMDB.mjs → chunk-GA3UMQMZ.mjs} +1 -1
- package/dist/{chunk-TNMXAPPT.mjs → chunk-GHBURGZC.mjs} +1 -1
- package/dist/{chunk-FKIOYL3D.mjs → chunk-GU5PJRPM.mjs} +1 -1
- package/dist/{chunk-GRT22PE5.mjs → chunk-HBXV7ENS.mjs} +2 -2
- package/dist/{chunk-X6DSNTTX.mjs → chunk-HI6URQ7H.mjs} +2 -2
- package/dist/{chunk-B4GODIOW.mjs → chunk-HKIF5HVL.mjs} +1 -1
- package/dist/{chunk-QZ6PT4QV.mjs → chunk-HP2JH45P.mjs} +2 -2
- package/dist/{chunk-KOSCMAIC.mjs → chunk-I4OBEAOJ.mjs} +1 -1
- package/dist/{chunk-FA5QNPXE.mjs → chunk-K75OQ7QA.mjs} +3 -3
- package/dist/{chunk-3G33PZVQ.mjs → chunk-KF22R23X.mjs} +1 -1
- package/dist/{chunk-QTCZFYFH.mjs → chunk-KI7TOXBR.mjs} +1 -1
- package/dist/{chunk-GI6XX5VU.mjs → chunk-KJU3T6BK.mjs} +3 -3
- package/dist/{chunk-C5LYZZZ5.mjs → chunk-LGNTHZ5Y.mjs} +1 -1
- package/dist/{chunk-RM6NY572.mjs → chunk-M32MJOJN.mjs} +1 -1
- package/dist/{chunk-S34JJVBQ.mjs → chunk-M4Q5Q4I3.mjs} +2 -2
- package/dist/{chunk-GVVAVAXG.mjs → chunk-MOGV3UZD.mjs} +2 -2
- package/dist/{chunk-DEQUVHHE.mjs → chunk-NFEK63OE.mjs} +4 -1
- package/dist/{chunk-IBSMG7AF.mjs → chunk-NFEW5CVI.mjs} +6 -6
- package/dist/{chunk-VAIHVNV6.mjs → chunk-NL376WAO.mjs} +1 -1
- package/dist/{chunk-JC75WAC7.mjs → chunk-NZNJSGGE.mjs} +4 -4
- package/dist/{chunk-JAXWGF4M.mjs → chunk-O5DGX2NZ.mjs} +1 -1
- package/dist/{chunk-MK4E5XQX.mjs → chunk-OMRGW7JS.mjs} +2 -2
- package/dist/{chunk-WT5BXCPV.mjs → chunk-P23S5LDK.mjs} +4 -4
- package/dist/{chunk-GXXQ33F7.mjs → chunk-PCV2O6DU.mjs} +1 -1
- package/dist/{chunk-P777A4W3.mjs → chunk-PMJJI6GO.mjs} +1 -1
- package/dist/{chunk-CIY65KNH.mjs → chunk-PNPT4W2F.mjs} +4 -4
- package/dist/{chunk-GLVCH422.mjs → chunk-PVW6M64S.mjs} +1 -1
- package/dist/{chunk-JDA2MYND.mjs → chunk-QPJUVTKW.mjs} +1 -1
- package/dist/{chunk-GVPJPLE2.mjs → chunk-QW4SQVMT.mjs} +125 -33
- package/dist/{chunk-W77EPLUD.mjs → chunk-RAZ6EKFT.mjs} +4 -4
- package/dist/{chunk-SJ3E4T6B.mjs → chunk-ROKB75YP.mjs} +1 -1
- package/dist/{chunk-2VTICXJR.mjs → chunk-RYJ2UVJE.mjs} +1 -1
- package/dist/{chunk-JDEH6Z4M.mjs → chunk-SAZHCRHS.mjs} +1 -1
- package/dist/{chunk-QL4XKIVL.mjs → chunk-SQDIZZDW.mjs} +1 -1
- package/dist/{chunk-67ORSRVT.mjs → chunk-SUYYSKCB.mjs} +23 -16
- package/dist/{chunk-ORMX5RJQ.mjs → chunk-T57MRRCF.mjs} +1 -1
- package/dist/{chunk-GRNWRTT3.mjs → chunk-TBEGSDLQ.mjs} +2 -2
- package/dist/{chunk-SNDSWB6B.mjs → chunk-UM4OIJZ3.mjs} +2 -2
- package/dist/{chunk-V2LANK5S.mjs → chunk-VCSSQVPD.mjs} +2 -2
- package/dist/{chunk-SBFWPL42.mjs → chunk-VW34SZWE.mjs} +3 -3
- package/dist/{chunk-UTVAHVAY.mjs → chunk-W4TIFG3A.mjs} +7 -7
- package/dist/{chunk-WEMXXZMY.mjs → chunk-W7SLPIO2.mjs} +19 -7
- package/dist/{chunk-ENV6YVOM.mjs → chunk-WAXMT4IY.mjs} +3 -3
- package/dist/{chunk-Y6ZQFV7H.mjs → chunk-Y5TTJDGO.mjs} +1 -1
- package/dist/{chunk-WWQZD7WM.mjs → chunk-YGEJFHC3.mjs} +2 -2
- package/dist/{chunk-QXXHLVRQ.mjs → chunk-YGLRZQ4C.mjs} +1 -1
- package/dist/{chunk-PJ5EUKOB.mjs → chunk-YTN73JYH.mjs} +1 -1
- package/dist/{chunk-ET6EGRW3.mjs → chunk-YVQIO3JS.mjs} +3487 -227
- package/dist/{chunk-3MPO56OL.mjs → chunk-ZE34KAKV.mjs} +3 -3
- package/dist/{chunk-WOFUOGLO.mjs → chunk-ZOJRDXH3.mjs} +34 -124
- package/dist/{collection-add-products-QCSFXELK.mjs → collection-add-products-KM4VO5G5.mjs} +33 -33
- package/dist/{collection-create-45RYGDW7.mjs → collection-create-RIGJHEX5.mjs} +3 -3
- package/dist/{collection-detail-OLC6DMBZ.mjs → collection-detail-MLVNULUS.mjs} +33 -33
- package/dist/{collection-edit-YBPBHLLZ.mjs → collection-edit-WX5G3FHR.mjs} +3 -3
- package/dist/{collection-list-6UJNE2QB.mjs → collection-list-KWAHQGFE.mjs} +37 -37
- package/dist/{collection-metadata-QG55V5ZM.mjs → collection-metadata-OMFOP3LA.mjs} +28 -28
- package/dist/{customer-create-WCBUYT44.mjs → customer-create-VL6SIRZ2.mjs} +2 -2
- package/dist/{customer-create-address-VWVIJDMK.mjs → customer-create-address-V5C6M52P.mjs} +2 -2
- package/dist/{customer-detail-XOCZDUJL.mjs → customer-detail-SVDGB2QD.mjs} +35 -35
- package/dist/{customer-edit-FMK2AWZ5.mjs → customer-edit-WTBPVWOF.mjs} +2 -2
- package/dist/{customer-group-add-customers-TQAH4IPM.mjs → customer-group-add-customers-2Y2GVCDV.mjs} +9 -9
- package/dist/{customer-group-create-Y5O2CJOI.mjs → customer-group-create-A3CB3Z4K.mjs} +2 -2
- package/dist/{customer-group-detail-EWSDTVTQ.mjs → customer-group-detail-OCQTI4GG.mjs} +35 -35
- package/dist/{customer-group-edit-SMVW7PHM.mjs → customer-group-edit-7KV2PNLE.mjs} +2 -2
- package/dist/{customer-group-list-NFXAELFY.mjs → customer-group-list-K5MTMFLG.mjs} +33 -33
- package/dist/{customer-group-metadata-XJIMV7QU.mjs → customer-group-metadata-4F2SZF4M.mjs} +2 -2
- package/dist/{customer-list-TXAB4URJ.mjs → customer-list-TG4D4QOT.mjs} +9 -9
- package/dist/{customer-metadata-E32DPXXE.mjs → customer-metadata-LZ3TAXCV.mjs} +2 -2
- package/dist/{customers-add-customer-group-EYZMFVBS.mjs → customers-add-customer-group-2LLBHTX3.mjs} +32 -32
- package/dist/{edit-inventory-item-TFJL5H5X.mjs → edit-inventory-item-O6JLGZE4.mjs} +2 -2
- package/dist/{edit-inventory-item-attributes-O3K7OB56.mjs → edit-inventory-item-attributes-AUVR3GYY.mjs} +2 -2
- package/dist/{edit-reservation-Z5TFZERY.mjs → edit-reservation-GQ6R6GVA.mjs} +4 -4
- package/dist/{edit-rules-IE77WUXD.mjs → edit-rules-G7YMD5RC.mjs} +30 -30
- package/dist/en.json +3 -3
- package/dist/{inventory-create-HQ5XLKOJ.mjs → inventory-create-GMFEGLE4.mjs} +29 -29
- package/dist/{inventory-detail-DAINM7WP.mjs → inventory-detail-3BTAVXLJ.mjs} +34 -34
- package/dist/{inventory-list-5ROSUTXF.mjs → inventory-list-ADJQDNX5.mjs} +7 -7
- package/dist/{inventory-metadata-HUL56OD2.mjs → inventory-metadata-JJBXLQJG.mjs} +28 -28
- package/dist/{inventory-stock-5VIUWKTQ.mjs → inventory-stock-RHLN6ARK.mjs} +30 -30
- package/dist/{invite-U4I4IUOM.mjs → invite-VKHAAF4Z.mjs} +3 -3
- package/dist/{location-create-GZCUNYDT.mjs → location-create-GDOHM4T3.mjs} +2 -2
- package/dist/{location-detail-QMLCFID5.mjs → location-detail-F5QYFPUH.mjs} +28 -28
- package/dist/{location-edit-VNEMLWGR.mjs → location-edit-4SEMGQXA.mjs} +2 -2
- package/dist/{location-fulfillment-providers-NAFFMP3P.mjs → location-fulfillment-providers-7JXNE6YT.mjs} +37 -37
- package/dist/{location-list-MVIK73QC.mjs → location-list-ZJMZZ6T3.mjs} +5 -5
- package/dist/{location-sales-channels-D37LXTKQ.mjs → location-sales-channels-JPH5BTUY.mjs} +12 -12
- package/dist/{location-service-zone-create-27MNMKPQ.mjs → location-service-zone-create-35TTX636.mjs} +9 -9
- package/dist/{location-service-zone-edit-LCBBZ2OA.mjs → location-service-zone-edit-RWZS2XYW.mjs} +4 -4
- package/dist/{location-service-zone-manage-areas-U3EPNWSI.mjs → location-service-zone-manage-areas-RGMM5Y6C.mjs} +9 -9
- package/dist/{location-service-zone-shipping-option-create-VM4TEJHY.mjs → location-service-zone-shipping-option-create-7VTPJAPA.mjs} +31 -31
- package/dist/{location-service-zone-shipping-option-edit-WN4MTZSB.mjs → location-service-zone-shipping-option-edit-OYTEZGGC.mjs} +4 -4
- package/dist/{location-service-zone-shipping-option-pricing-GJIO4RRM.mjs → location-service-zone-shipping-option-pricing-NQRIEGTX.mjs} +8 -8
- package/dist/{login-MTGOV7KC.mjs → login-BGH5LSM4.mjs} +28 -28
- package/dist/{manage-locations-OHDFBORX.mjs → manage-locations-ATCDVTSR.mjs} +3 -3
- package/dist/{order-allocate-items-NU65ZXHE.mjs → order-allocate-items-PHIW64XK.mjs} +5 -5
- package/dist/{order-create-claim-LTE2E75R.mjs → order-create-claim-NPQ6E5DR.mjs} +36 -36
- package/dist/{order-create-edit-TPU3CKUU.mjs → order-create-edit-R4ZITC5I.mjs} +33 -33
- package/dist/{order-create-exchange-FVSBZI7P.mjs → order-create-exchange-6XPYKVYN.mjs} +36 -36
- package/dist/{order-create-fulfillment-NFGPDCBV.mjs → order-create-fulfillment-7DVPBUES.mjs} +29 -29
- package/dist/{order-create-refund-DC7C3R4Y.mjs → order-create-refund-7KEOYZTF.mjs} +28 -28
- package/dist/{order-create-return-RLXYVZLO.mjs → order-create-return-J23AFCKP.mjs} +13 -13
- package/dist/{order-create-shipment-RDYWCG3A.mjs → order-create-shipment-KNXCANID.mjs} +28 -28
- package/dist/{order-detail-VVOZ6E2R.mjs → order-detail-7ATBL7GN.mjs} +49 -41
- package/dist/{order-edit-billing-address-LV7453CS.mjs → order-edit-billing-address-VS75YMUY.mjs} +28 -28
- package/dist/{order-edit-email-4U5C6UKX.mjs → order-edit-email-GEE7SF2E.mjs} +28 -28
- package/dist/{order-edit-shipping-address-6IQC2CVP.mjs → order-edit-shipping-address-HSRXSRLU.mjs} +28 -28
- package/dist/{order-list-INSYF52F.mjs → order-list-GJTJHLZF.mjs} +52 -45
- package/dist/{order-metadata-EEV4IWOM.mjs → order-metadata-LUBKP5Y4.mjs} +28 -28
- package/dist/{order-receive-return-IWHR3EBF.mjs → order-receive-return-FLI44JN2.mjs} +29 -29
- package/dist/{order-request-transfer-65R4A7HS.mjs → order-request-transfer-NH2XCHMV.mjs} +29 -29
- package/dist/{price-list-configuration-L5XYCVP2.mjs → price-list-configuration-SS2VMD4N.mjs} +9 -9
- package/dist/{price-list-create-5GIMBRG2.mjs → price-list-create-DZR7JCDG.mjs} +36 -36
- package/dist/{price-list-detail-7AL2EBRL.mjs → price-list-detail-4INABJQQ.mjs} +35 -35
- package/dist/{price-list-edit-DHG5STG4.mjs → price-list-edit-VRI5T4W3.mjs} +4 -4
- package/dist/{price-list-list-QQKZEFSU.mjs → price-list-list-S2HWTXKV.mjs} +9 -9
- package/dist/{price-list-prices-add-2OO4QEZB.mjs → price-list-prices-add-DO43IEAD.mjs} +35 -35
- package/dist/{price-list-prices-edit-2FB25KWU.mjs → price-list-prices-edit-TRCLLGU4.mjs} +9 -9
- package/dist/{product-attributes-CCQ6WAOD.mjs → product-attributes-D6MNCAJB.mjs} +34 -34
- package/dist/{product-create-AIRCVZAE.mjs → product-create-JQQTUEQL.mjs} +82 -53
- package/dist/{product-create-variant-7BD5KQHQ.mjs → product-create-variant-6UQRMACE.mjs} +30 -30
- package/dist/{product-detail-IYMXYAPH.mjs → product-detail-JMOULY3O.mjs} +50 -38
- package/dist/{product-edit-PDGQHCQ2.mjs → product-edit-CC4OUBEC.mjs} +34 -34
- package/dist/{product-export-5EINLQDF.mjs → product-export-BVREOXJT.mjs} +36 -36
- package/dist/{product-image-variants-edit-DDSEBG5H.mjs → product-image-variants-edit-7BBTFZO7.mjs} +32 -32
- package/dist/{product-import-IQJWHNYN.mjs → product-import-UEXWOHOZ.mjs} +31 -30
- package/dist/{product-list-PUQEGU75.mjs → product-list-RHHY3NAS.mjs} +38 -38
- package/dist/{product-media-Q5XFYZRS.mjs → product-media-EKXMOSO4.mjs} +4 -4
- package/dist/{product-metadata-WCKNOZXX.mjs → product-metadata-DU2CNDKQ.mjs} +28 -28
- package/dist/{product-option-create-MWFWB2SU.mjs → product-option-create-ML66ZKF3.mjs} +28 -28
- package/dist/{product-option-detail-UKKEZPG7.mjs → product-option-detail-DT7HJF5Q.mjs} +39 -40
- package/dist/{product-option-edit-NHAF7B4P.mjs → product-option-edit-GUKWRQQH.mjs} +28 -28
- package/dist/{product-option-list-C6ZR2WIX.mjs → product-option-list-KF3JSQ6Y.mjs} +40 -44
- package/dist/{product-option-metadata-OWSGHNDC.mjs → product-option-metadata-BWWRRSAW.mjs} +28 -28
- package/dist/product-options-manage-QYWBIHJA.mjs +304 -0
- package/dist/{product-organization-HHME5F2C.mjs → product-organization-HU6YVPPV.mjs} +36 -36
- package/dist/{product-prices-GVEPABHQ.mjs → product-prices-UMEIS5AZ.mjs} +6 -6
- package/dist/{product-sales-channels-ZC5ONPG7.mjs → product-sales-channels-2SALTLTF.mjs} +11 -11
- package/dist/{product-shipping-profile-KXSBDGRD.mjs → product-shipping-profile-T4ZKHINJ.mjs} +35 -35
- package/dist/{product-stock-LXRLD7FA.mjs → product-stock-CKBS4YDA.mjs} +30 -30
- package/dist/{product-tag-create-RAJEWM5O.mjs → product-tag-create-GFGPI7ML.mjs} +28 -28
- package/dist/{product-tag-detail-EOW2GMOL.mjs → product-tag-detail-TTEWVF3I.mjs} +44 -44
- package/dist/{product-tag-edit-ZOO56XMF.mjs → product-tag-edit-3XNTLATZ.mjs} +28 -28
- package/dist/{product-tag-list-B2UX2OHB.mjs → product-tag-list-24IJRVFR.mjs} +44 -44
- package/dist/{product-tag-metadata-OZB7SVDN.mjs → product-tag-metadata-JANWHZ3K.mjs} +28 -28
- package/dist/{product-type-create-AHVZETDR.mjs → product-type-create-Y752WGBV.mjs} +2 -2
- package/dist/{product-type-detail-4YZUC6ZS.mjs → product-type-detail-MAUHCM3C.mjs} +34 -34
- package/dist/{product-type-edit-2RGFBZPK.mjs → product-type-edit-SMPJ5ZEF.mjs} +2 -2
- package/dist/{product-type-list-J2WDYTZK.mjs → product-type-list-7WQ5D2KV.mjs} +9 -9
- package/dist/{product-type-metadata-6QT47ZSR.mjs → product-type-metadata-FAKUWQQF.mjs} +28 -28
- package/dist/{product-variant-detail-HOOYZSS2.mjs → product-variant-detail-WHPECDUY.mjs} +32 -32
- package/dist/{product-variant-edit-J2MTJA75.mjs → product-variant-edit-GR4RNE5G.mjs} +29 -29
- package/dist/{product-variant-manage-inventory-items-P4QUORRH.mjs → product-variant-manage-inventory-items-IGDCLZQE.mjs} +3 -3
- package/dist/{product-variant-media-U5RG7AOW.mjs → product-variant-media-EKI4BTEV.mjs} +2 -2
- package/dist/{product-variant-metadata-ZRSZO2D4.mjs → product-variant-metadata-DA2HKXXB.mjs} +28 -28
- package/dist/{profile-detail-UTJBWZSA.mjs → profile-detail-BMC7IZBY.mjs} +3 -3
- package/dist/{profile-edit-OOYMTKX6.mjs → profile-edit-NFVR5Y4I.mjs} +3 -3
- package/dist/{promotion-add-campaign-XJB2ZKZ3.mjs → promotion-add-campaign-DOALJUKJ.mjs} +7 -7
- package/dist/{promotion-create-2E4EF4SP.mjs → promotion-create-GGZULF2B.mjs} +33 -33
- package/dist/{promotion-detail-P2BHIQDG.mjs → promotion-detail-XK7U73XH.mjs} +31 -31
- package/dist/{promotion-edit-details-JMZ77QJ4.mjs → promotion-edit-details-AKKNOCLM.mjs} +2 -2
- package/dist/{promotion-list-MN6YJCYA.mjs → promotion-list-TMWKPLMJ.mjs} +6 -6
- package/dist/{refund-reason-create-I3BIJFJH.mjs → refund-reason-create-H7MHJ5C5.mjs} +28 -28
- package/dist/{refund-reason-edit-2BEZASQH.mjs → refund-reason-edit-QY36CQVS.mjs} +28 -28
- package/dist/{refund-reason-list-NIJHHOXJ.mjs → refund-reason-list-KSQW33QC.mjs} +38 -38
- package/dist/{region-add-countries-KGFPZSRE.mjs → region-add-countries-6GB2QDJK.mjs} +7 -7
- package/dist/{region-create-YJJRTAYO.mjs → region-create-UVJICJRX.mjs} +9 -9
- package/dist/{region-detail-ERE4ZF2I.mjs → region-detail-D3JBW34A.mjs} +7 -7
- package/dist/{region-edit-QCN7SMR5.mjs → region-edit-3NVXQECN.mjs} +5 -5
- package/dist/{region-list-KE5HCKOR.mjs → region-list-JAQXIBYD.mjs} +7 -7
- package/dist/{region-metadata-RLZSQNGW.mjs → region-metadata-4KQG6UL6.mjs} +28 -28
- package/dist/{reservation-create-4R2XEEZU.mjs → reservation-create-Z7TWUE2L.mjs} +5 -5
- package/dist/{reservation-detail-7OYGNK4L.mjs → reservation-detail-W3FULMXT.mjs} +28 -28
- package/dist/{reservation-list-VY44QEH6.mjs → reservation-list-MN22JYAW.mjs} +9 -9
- package/dist/{reservation-metadata-VJIAGIMF.mjs → reservation-metadata-AKAN5XNE.mjs} +28 -28
- package/dist/{reset-password-CUEG23GU.mjs → reset-password-5TAYQEUV.mjs} +2 -2
- package/dist/{return-reason-create-45IARQ5L.mjs → return-reason-create-PLQNC4KW.mjs} +2 -2
- package/dist/{return-reason-edit-5FIOEJ5Y.mjs → return-reason-edit-XJCPMZ6U.mjs} +2 -2
- package/dist/{return-reason-list-6UKR2BLW.mjs → return-reason-list-ATE2XU4H.mjs} +12 -12
- package/dist/{sales-channel-add-products-KAUMNKMD.mjs → sales-channel-add-products-POHTQHMV.mjs} +33 -33
- package/dist/{sales-channel-create-I6ME6QBM.mjs → sales-channel-create-UFFXX5HK.mjs} +3 -3
- package/dist/{sales-channel-detail-5SXDKP6P.mjs → sales-channel-detail-AACIFU2E.mjs} +33 -33
- package/dist/{sales-channel-edit-O7GM2B6O.mjs → sales-channel-edit-SP2HF4E3.mjs} +3 -3
- package/dist/{sales-channel-list-JKZ6TIY7.mjs → sales-channel-list-BY3KTVV6.mjs} +35 -35
- package/dist/{sales-channel-metadata-33P5SKDI.mjs → sales-channel-metadata-KGOLI4BZ.mjs} +28 -28
- package/dist/{shipping-option-type-create-KVYNWD2Q.mjs → shipping-option-type-create-PSQZW3RN.mjs} +28 -28
- package/dist/{shipping-option-type-detail-YX3HMXNI.mjs → shipping-option-type-detail-WAW6TKJU.mjs} +29 -29
- package/dist/{shipping-option-type-edit-ODXQMHYJ.mjs → shipping-option-type-edit-2I44YHND.mjs} +28 -28
- package/dist/{shipping-option-type-list-XCQNWDDA.mjs → shipping-option-type-list-F4FRLW3P.mjs} +34 -34
- package/dist/{shipping-profile-create-372EMPUI.mjs → shipping-profile-create-NKFUOBVZ.mjs} +2 -2
- package/dist/{shipping-profile-detail-MRXUOUXK.mjs → shipping-profile-detail-WTKQSOIX.mjs} +2 -2
- package/dist/{shipping-profile-metadata-K34DAKGY.mjs → shipping-profile-metadata-AZXPMPHG.mjs} +28 -28
- package/dist/{shipping-profiles-list-KYYSHLSZ.mjs → shipping-profiles-list-H3CBZKRH.mjs} +6 -6
- package/dist/{store-add-currencies-SNSW7A6O.mjs → store-add-currencies-QVG2SI26.mjs} +8 -8
- package/dist/{store-detail-3Z3BK2BH.mjs → store-detail-AKRR64I6.mjs} +32 -32
- package/dist/{store-edit-FNKVB3UA.mjs → store-edit-Q25HCMCQ.mjs} +4 -4
- package/dist/{store-metadata-FESGAO7E.mjs → store-metadata-VLEDLAIJ.mjs} +28 -28
- package/dist/{tax-region-create-EVFVC6HN.mjs → tax-region-create-JTM53LCS.mjs} +29 -29
- package/dist/{tax-region-detail-ULHK52CD.mjs → tax-region-detail-XBFYCVSH.mjs} +49 -49
- package/dist/{tax-region-edit-CXEPD2F2.mjs → tax-region-edit-2RRF7C7P.mjs} +29 -29
- package/dist/{tax-region-list-HQMSVGDD.mjs → tax-region-list-BXZBUXRJ.mjs} +5 -5
- package/dist/{tax-region-province-create-6GZCPPGW.mjs → tax-region-province-create-T2LKEDTK.mjs} +2 -2
- package/dist/{tax-region-province-detail-VUY4PDGN.mjs → tax-region-province-detail-LGCYSFKE.mjs} +47 -47
- package/dist/{tax-region-tax-override-create-WWZZVAG5.mjs → tax-region-tax-override-create-2W25EZNZ.mjs} +44 -44
- package/dist/{tax-region-tax-override-edit-HVZRD44G.mjs → tax-region-tax-override-edit-ZSYNTYUG.mjs} +45 -45
- package/dist/{tax-region-tax-rate-create-TJLSRCEC.mjs → tax-region-tax-rate-create-UEOU5QRU.mjs} +3 -3
- package/dist/{tax-region-tax-rate-edit-DEKCUURK.mjs → tax-region-tax-rate-edit-ILCDNXHV.mjs} +3 -3
- package/dist/{user-detail-YTVBPRH5.mjs → user-detail-K5UMPO2L.mjs} +3 -3
- package/dist/{user-edit-NFRTYOKO.mjs → user-edit-25HD3BYT.mjs} +2 -2
- package/dist/{user-invite-FQNKJKMD.mjs → user-invite-CRQTVEYA.mjs} +6 -6
- package/dist/{user-list-73SJSKYT.mjs → user-list-KPI3BTOA.mjs} +9 -9
- package/dist/{user-metadata-33W3JSHN.mjs → user-metadata-KOGHOQTW.mjs} +28 -28
- package/dist/{workflow-execution-detail-SHEXD5OL.mjs → workflow-execution-detail-4QAQ44YB.mjs} +28 -28
- package/dist/{workflow-execution-list-JOVBPL45.mjs → workflow-execution-list-IZVF2XMJ.mjs} +6 -6
- package/package.json +10 -11
- package/src/components/common/file-upload/file-upload.tsx +23 -6
- package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +21 -9
- package/src/components/inputs/combobox/combobox.tsx +173 -92
- package/src/components/layout/main-layout/main-layout.tsx +1 -0
- package/src/components/layout/nav-item/nav-item.tsx +14 -4
- package/src/dashboard-app/__tests__/sort-menu-items-by-rank.spec.ts +169 -0
- package/src/dashboard-app/dashboard-app.tsx +10 -1
- package/src/dashboard-app/types.ts +2 -0
- package/src/dashboard-app/utils/sort-menu-items-by-rank.ts +43 -0
- package/src/hooks/api/products.tsx +4 -4
- package/src/hooks/table/columns/use-product-option-table-columns.tsx +5 -4
- package/src/hooks/table/filters/use-product-option-table-filters.tsx +5 -5
- package/src/i18n/languages.ts +23 -16
- package/src/i18n/translations/$schema.json +5 -5
- package/src/i18n/translations/en.json +3 -3
- package/src/i18n/translations/index.ts +4 -0
- package/src/i18n/translations/ptPT.json +3219 -0
- package/src/lib/client/client.ts +4 -1
- package/src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +19 -9
- package/src/routes/orders/order-list/components/order-list-table/use-order-table-filters.tsx +40 -30
- package/src/routes/products/common/components/upload-media-form-item/upload-media-form-item.tsx +26 -8
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +16 -4
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +7 -1
- package/src/routes/products/product-create/constants.ts +1 -0
- package/src/routes/products/product-create/utils.ts +2 -2
- package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +1 -0
- package/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx +24 -11
- package/src/routes/products/product-import/components/upload-import.tsx +1 -0
- package/src/routes/products/product-options-manage/components/product-options-manage-form/product-options-manage-form.tsx +145 -8
- package/src/vite-env.d.ts +2 -0
- package/dist/product-options-manage-N73G5IXY.mjs +0 -206
package/src/lib/client/client.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import Medusa from "@medusajs/js-sdk"
|
|
2
2
|
|
|
3
3
|
export const backendUrl = __BACKEND_URL__ ?? "/"
|
|
4
|
+
const authType = __AUTH_TYPE__ ?? "session"
|
|
5
|
+
const jwtTokenStorageKey = __JWT_TOKEN_STORAGE_KEY__ || undefined
|
|
4
6
|
|
|
5
7
|
export const sdk = new Medusa({
|
|
6
8
|
baseUrl: backendUrl,
|
|
7
9
|
auth: {
|
|
8
|
-
type:
|
|
10
|
+
type: authType,
|
|
11
|
+
jwtTokenStorageKey
|
|
9
12
|
},
|
|
10
13
|
})
|
|
11
14
|
|
|
@@ -18,6 +18,7 @@ import { By } from "../../../../../components/common/user-link"
|
|
|
18
18
|
import {
|
|
19
19
|
useCancelOrderTransfer,
|
|
20
20
|
useCustomer,
|
|
21
|
+
useOrder,
|
|
21
22
|
useOrderChanges,
|
|
22
23
|
useOrderLineItems,
|
|
23
24
|
} from "../../../../../hooks/api"
|
|
@@ -123,6 +124,11 @@ type Activity = {
|
|
|
123
124
|
const useActivityItems = (order: AdminOrder): Activity[] => {
|
|
124
125
|
const { t } = useTranslation()
|
|
125
126
|
|
|
127
|
+
const { order: initialOrder = order } = useOrder(order.id, {
|
|
128
|
+
version: 1,
|
|
129
|
+
fields: "created_at,total,currency_code",
|
|
130
|
+
}, { enabled: order.version !== 1})
|
|
131
|
+
|
|
126
132
|
const { order_changes: orderChanges = [] } = useOrderChanges(order.id, {
|
|
127
133
|
change_type: [
|
|
128
134
|
"edit",
|
|
@@ -520,19 +526,23 @@ const useActivityItems = (order: AdminOrder): Activity[] => {
|
|
|
520
526
|
return new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
|
|
521
527
|
})
|
|
522
528
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
529
|
+
if (initialOrder.created_at) {
|
|
530
|
+
const createdAt = {
|
|
531
|
+
title: t("orders.activity.events.placed.title"),
|
|
532
|
+
timestamp: initialOrder.created_at,
|
|
533
|
+
children: (
|
|
534
|
+
<Text size="small" className="text-ui-fg-subtle">
|
|
535
|
+
{getStylizedAmount(initialOrder.total, initialOrder.currency_code)}
|
|
536
|
+
</Text>
|
|
537
|
+
),
|
|
538
|
+
}
|
|
539
|
+
sortedActivities.push(createdAt)
|
|
531
540
|
}
|
|
532
541
|
|
|
533
|
-
return [...sortedActivities
|
|
542
|
+
return [...sortedActivities]
|
|
534
543
|
}, [
|
|
535
544
|
order,
|
|
545
|
+
initialOrder,
|
|
536
546
|
payments,
|
|
537
547
|
returns,
|
|
538
548
|
exchanges,
|
package/src/routes/orders/order-list/components/order-list-table/use-order-table-filters.tsx
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { useMemo } from "react"
|
|
2
2
|
import { useTranslation } from "react-i18next"
|
|
3
|
-
import {
|
|
4
|
-
import { HttpTypes } from "@medusajs/types"
|
|
5
|
-
import { useDataTableDateFilters } from "../../../../../components/data-table/helpers/general/use-data-table-date-filters"
|
|
3
|
+
import { Filter } from "../../../../../components/table/data-table"
|
|
6
4
|
import { useRegions } from "../../../../../hooks/api/regions"
|
|
7
5
|
import { useSalesChannels } from "../../../../../hooks/api/sales-channels"
|
|
8
6
|
|
|
9
|
-
const filterHelper = createDataTableFilterHelper<HttpTypes.AdminOrder>()
|
|
10
|
-
|
|
11
7
|
/**
|
|
12
|
-
* Hook to create filters in the format expected by
|
|
8
|
+
* Hook to create filters in the format expected by the deprecated DataTable component
|
|
13
9
|
*/
|
|
14
10
|
export const useOrderTableFilters = () => {
|
|
15
11
|
const { t } = useTranslation()
|
|
16
|
-
const dateFilters = useDataTableDateFilters()
|
|
17
12
|
|
|
18
13
|
const { regions } = useRegions({
|
|
19
14
|
limit: 1000,
|
|
@@ -25,38 +20,53 @@ export const useOrderTableFilters = () => {
|
|
|
25
20
|
fields: "id,name",
|
|
26
21
|
})
|
|
27
22
|
|
|
23
|
+
// Until we migrate to the new DataTable component, we can't use `createDataTableFilterHelper` filter structure, since th identifier there is `is`
|
|
24
|
+
// while deprecated component expexts `key`. Will be ready to migrate once SUP-2651 is done
|
|
28
25
|
return useMemo(() => {
|
|
29
|
-
const filters = [
|
|
26
|
+
const filters: Filter[] = [
|
|
27
|
+
{
|
|
28
|
+
key: "created_at",
|
|
29
|
+
label: t("fields.createdAt"),
|
|
30
|
+
type: "date",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: "updated_at",
|
|
34
|
+
label: t("fields.updatedAt"),
|
|
35
|
+
type: "date",
|
|
36
|
+
},
|
|
37
|
+
]
|
|
30
38
|
|
|
31
39
|
if (regions?.length) {
|
|
32
|
-
filters.push(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
filters.push({
|
|
41
|
+
key: "region_id",
|
|
42
|
+
label: t("fields.region"),
|
|
43
|
+
type: "select",
|
|
44
|
+
multiple: true,
|
|
45
|
+
searchable: true,
|
|
46
|
+
options: regions.map((r) => ({
|
|
47
|
+
label: r.name,
|
|
48
|
+
value: r.id,
|
|
49
|
+
})),
|
|
50
|
+
})
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
if (sales_channels?.length) {
|
|
45
|
-
filters.push(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
filters.push({
|
|
55
|
+
key: "sales_channel_id",
|
|
56
|
+
label: t("fields.salesChannel"),
|
|
57
|
+
type: "select",
|
|
58
|
+
multiple: true,
|
|
59
|
+
searchable: true,
|
|
60
|
+
options: sales_channels.map((s) => ({
|
|
61
|
+
label: s.name,
|
|
62
|
+
value: s.id,
|
|
63
|
+
})),
|
|
64
|
+
})
|
|
55
65
|
}
|
|
56
66
|
|
|
57
67
|
// TODO: Add payment and fulfillment status filters when they are properly linked to orders
|
|
58
68
|
// Note: These filters are commented out in the legacy implementation as well
|
|
59
69
|
|
|
60
70
|
return filters
|
|
61
|
-
}, [regions, sales_channels,
|
|
62
|
-
}
|
|
71
|
+
}, [regions, sales_channels, t])
|
|
72
|
+
}
|
package/src/routes/products/common/components/upload-media-form-item/upload-media-form-item.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { z } from "zod"
|
|
|
5
5
|
import {
|
|
6
6
|
FileType,
|
|
7
7
|
FileUpload,
|
|
8
|
+
RejectedFile,
|
|
8
9
|
} from "../../../../../components/common/file-upload"
|
|
9
10
|
import { Form } from "../../../../../components/common/form"
|
|
10
11
|
import { MediaSchema } from "../../../product-create/constants"
|
|
@@ -47,11 +48,13 @@ export const UploadMediaFormItem = ({
|
|
|
47
48
|
const { t } = useTranslation()
|
|
48
49
|
|
|
49
50
|
const hasInvalidFiles = useCallback(
|
|
50
|
-
(fileList: FileType[]) => {
|
|
51
|
+
(fileList: FileType[] = [], rejectedFiles: RejectedFile[] = []) => {
|
|
51
52
|
const invalidFile = fileList.find(
|
|
52
|
-
(f) => !SUPPORTED_FORMATS.includes(f
|
|
53
|
+
(f) => !SUPPORTED_FORMATS.includes(f?.file?.type)
|
|
53
54
|
)
|
|
54
55
|
|
|
56
|
+
let hasInvalidFile = false;
|
|
57
|
+
|
|
55
58
|
if (invalidFile) {
|
|
56
59
|
form.setError("media", {
|
|
57
60
|
type: "invalid_file",
|
|
@@ -61,22 +64,37 @@ export const UploadMediaFormItem = ({
|
|
|
61
64
|
}),
|
|
62
65
|
})
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
hasInvalidFile = true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const fileSizeRejections = rejectedFiles.filter((f) => f?.reason === "size")
|
|
71
|
+
|
|
72
|
+
if (fileSizeRejections.length) {
|
|
73
|
+
const fileNames = "\n" + fileSizeRejections.slice(0, 5).map((f) => f.file.name).join("\n")
|
|
74
|
+
form.setError("media", {
|
|
75
|
+
type: "file_too_large",
|
|
76
|
+
message: t("products.media.fileTooLarge", {
|
|
77
|
+
name: fileNames,
|
|
78
|
+
size: "1MB",
|
|
79
|
+
}),
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
hasInvalidFile = true;
|
|
65
83
|
}
|
|
66
84
|
|
|
67
|
-
return
|
|
85
|
+
return hasInvalidFile;
|
|
68
86
|
},
|
|
69
87
|
[form, t]
|
|
70
88
|
)
|
|
71
89
|
|
|
72
90
|
const onUploaded = useCallback(
|
|
73
|
-
(files: FileType[]) => {
|
|
91
|
+
(files: FileType[] = [], rejectedFiles: RejectedFile[] = []) => {
|
|
74
92
|
form.clearErrors("media")
|
|
75
|
-
if (hasInvalidFiles(files)) {
|
|
93
|
+
if (hasInvalidFiles(files, rejectedFiles)) {
|
|
76
94
|
return
|
|
77
95
|
}
|
|
78
96
|
|
|
79
|
-
files
|
|
97
|
+
files?.forEach((f) => append({ ...f, isThumbnail: false }))
|
|
80
98
|
},
|
|
81
99
|
[form, append, hasInvalidFiles]
|
|
82
100
|
)
|
|
@@ -106,7 +124,7 @@ export const UploadMediaFormItem = ({
|
|
|
106
124
|
onUploaded={onUploaded}
|
|
107
125
|
/>
|
|
108
126
|
</Form.Control>
|
|
109
|
-
<Form.ErrorMessage />
|
|
127
|
+
<Form.ErrorMessage className="whitespace-pre-line" />
|
|
110
128
|
</div>
|
|
111
129
|
</Form.Item>
|
|
112
130
|
)
|
|
@@ -27,7 +27,10 @@ export const ProductCreateGeneralSection = ({
|
|
|
27
27
|
<Form.Item>
|
|
28
28
|
<Form.Label>{t("products.fields.title.label")}</Form.Label>
|
|
29
29
|
<Form.Control>
|
|
30
|
-
<Input
|
|
30
|
+
<Input
|
|
31
|
+
{...field}
|
|
32
|
+
placeholder={t("products.fields.title.placeholder")}
|
|
33
|
+
/>
|
|
31
34
|
</Form.Control>
|
|
32
35
|
</Form.Item>
|
|
33
36
|
)
|
|
@@ -43,7 +46,10 @@ export const ProductCreateGeneralSection = ({
|
|
|
43
46
|
{t("products.fields.subtitle.label")}
|
|
44
47
|
</Form.Label>
|
|
45
48
|
<Form.Control>
|
|
46
|
-
<Input
|
|
49
|
+
<Input
|
|
50
|
+
{...field}
|
|
51
|
+
placeholder={t("products.fields.subtitle.placeholder")}
|
|
52
|
+
/>
|
|
47
53
|
</Form.Control>
|
|
48
54
|
</Form.Item>
|
|
49
55
|
)
|
|
@@ -62,7 +68,10 @@ export const ProductCreateGeneralSection = ({
|
|
|
62
68
|
{t("fields.handle")}
|
|
63
69
|
</Form.Label>
|
|
64
70
|
<Form.Control>
|
|
65
|
-
<HandleInput
|
|
71
|
+
<HandleInput
|
|
72
|
+
{...field}
|
|
73
|
+
placeholder={t("products.fields.handle.placeholder")}
|
|
74
|
+
/>
|
|
66
75
|
</Form.Control>
|
|
67
76
|
</Form.Item>
|
|
68
77
|
)
|
|
@@ -80,7 +89,10 @@ export const ProductCreateGeneralSection = ({
|
|
|
80
89
|
{t("products.fields.description.label")}
|
|
81
90
|
</Form.Label>
|
|
82
91
|
<Form.Control>
|
|
83
|
-
<Textarea
|
|
92
|
+
<Textarea
|
|
93
|
+
{...field}
|
|
94
|
+
placeholder={t("products.fields.description.placeholder")}
|
|
95
|
+
/>
|
|
84
96
|
</Form.Control>
|
|
85
97
|
</Form.Item>
|
|
86
98
|
)
|
|
@@ -240,6 +240,7 @@ export const ProductCreateVariantsSection = ({
|
|
|
240
240
|
id: option.id,
|
|
241
241
|
title: option.title,
|
|
242
242
|
values: selectedValues,
|
|
243
|
+
value_ids: selectedValueIds,
|
|
243
244
|
}
|
|
244
245
|
})
|
|
245
246
|
|
|
@@ -364,6 +365,9 @@ export const ProductCreateVariantsSection = ({
|
|
|
364
365
|
} else {
|
|
365
366
|
createDefaultOptionAndVariant()
|
|
366
367
|
}
|
|
368
|
+
setSelectedOptionIds([])
|
|
369
|
+
setSelectedOptionValues({})
|
|
370
|
+
setCustomValues({})
|
|
367
371
|
}}
|
|
368
372
|
/>
|
|
369
373
|
</div>
|
|
@@ -387,6 +391,7 @@ export const ProductCreateVariantsSection = ({
|
|
|
387
391
|
options={productOptionChoices}
|
|
388
392
|
placeholder={t("products.fields.options.optionTitlePlaceholder")}
|
|
389
393
|
disabled={isLoading}
|
|
394
|
+
displayMode="chips"
|
|
390
395
|
/>
|
|
391
396
|
</div>
|
|
392
397
|
{selectedOptionIds.length > 0 && (
|
|
@@ -424,12 +429,13 @@ export const ProductCreateVariantsSection = ({
|
|
|
424
429
|
handleValueChange(option.id, value as string[])
|
|
425
430
|
}
|
|
426
431
|
onCreateOption={(_) => {
|
|
427
|
-
//
|
|
432
|
+
// Todo
|
|
428
433
|
}}
|
|
429
434
|
options={valueOptions}
|
|
430
435
|
placeholder={t(
|
|
431
436
|
"products.fields.options.variantionsPlaceholder"
|
|
432
437
|
)}
|
|
438
|
+
displayMode="chips"
|
|
433
439
|
/>
|
|
434
440
|
</div>
|
|
435
441
|
)
|
|
@@ -44,8 +44,8 @@ export const normalizeProductFormValues = (
|
|
|
44
44
|
height: values.height ? parseFloat(values.height) : undefined,
|
|
45
45
|
weight: values.weight ? parseFloat(values.weight) : undefined,
|
|
46
46
|
options: options.map((option) => {
|
|
47
|
-
const { id, ...rest } = option
|
|
48
|
-
return id ? { id } : rest
|
|
47
|
+
const { id, value_ids, ...rest } = option
|
|
48
|
+
return id ? { id, value_ids } : { ...rest, is_exclusive: true }
|
|
49
49
|
}),
|
|
50
50
|
variants: normalizeVariants(
|
|
51
51
|
values.variants.filter((variant) => variant.should_create),
|
|
@@ -102,6 +102,7 @@ export const ProductGeneralSection = ({
|
|
|
102
102
|
<SectionRow title={t("fields.description")} value={product.description} />
|
|
103
103
|
<SectionRow title={t("fields.subtitle")} value={product.subtitle} />
|
|
104
104
|
<SectionRow title={t("fields.handle")} value={`/${product.handle}`} />
|
|
105
|
+
<SectionRow title={t("fields.material")} value={product.material} />
|
|
105
106
|
<SectionRow
|
|
106
107
|
title={t("fields.discountable")}
|
|
107
108
|
value={product.discountable ? t("fields.true") : t("fields.false")}
|
|
@@ -62,17 +62,30 @@ export const ProductOptionSection = ({
|
|
|
62
62
|
<SectionRow
|
|
63
63
|
title={option.title}
|
|
64
64
|
key={option.id}
|
|
65
|
-
value={option.values
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
value={option.values
|
|
66
|
+
?.sort((a, b) => {
|
|
67
|
+
if (a.rank == null && b.rank == null) {
|
|
68
|
+
return 0
|
|
69
|
+
}
|
|
70
|
+
if (a.rank == null) {
|
|
71
|
+
return 1
|
|
72
|
+
}
|
|
73
|
+
if (b.rank == null) {
|
|
74
|
+
return -1
|
|
75
|
+
}
|
|
76
|
+
return a.rank - b.rank
|
|
77
|
+
})
|
|
78
|
+
.map((val) => {
|
|
79
|
+
return (
|
|
80
|
+
<Badge
|
|
81
|
+
key={val.value}
|
|
82
|
+
size="2xsmall"
|
|
83
|
+
className="flex min-w-[20px] items-center justify-center"
|
|
84
|
+
>
|
|
85
|
+
{val.value}
|
|
86
|
+
</Badge>
|
|
87
|
+
)
|
|
88
|
+
})}
|
|
76
89
|
actions={<OptionActions option={option} />}
|
|
77
90
|
/>
|
|
78
91
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpTypes } from "@medusajs/types"
|
|
2
|
-
import { Button, toast } from "@medusajs/ui"
|
|
2
|
+
import { Button, Hint, Label, toast } from "@medusajs/ui"
|
|
3
3
|
import { useMemo, useState } from "react"
|
|
4
4
|
import { useTranslation } from "react-i18next"
|
|
5
5
|
import * as zod from "zod"
|
|
@@ -21,6 +21,7 @@ type ProductOptionsManageFormProps = {
|
|
|
21
21
|
|
|
22
22
|
const ProductOptionsManageSchema = zod.object({
|
|
23
23
|
option_ids: zod.array(zod.string()),
|
|
24
|
+
option_values: zod.record(zod.array(zod.string())).optional(),
|
|
24
25
|
})
|
|
25
26
|
|
|
26
27
|
export const ProductOptionsManageForm = ({
|
|
@@ -46,9 +47,27 @@ export const ProductOptionsManageForm = ({
|
|
|
46
47
|
product.options?.map((opt) => opt.id) || []
|
|
47
48
|
)
|
|
48
49
|
|
|
50
|
+
const [selectedOptionValues, setSelectedOptionValues] = useState<
|
|
51
|
+
Record<string, string[]>
|
|
52
|
+
>(() => {
|
|
53
|
+
// Initialize with existing product option values
|
|
54
|
+
const initialValues: Record<string, string[]> = {}
|
|
55
|
+
product.options?.forEach((opt) => {
|
|
56
|
+
initialValues[opt.id] = opt.values?.map((v) => v.id) || []
|
|
57
|
+
})
|
|
58
|
+
return initialValues
|
|
59
|
+
})
|
|
60
|
+
|
|
49
61
|
const form = useExtendableForm({
|
|
50
62
|
defaultValues: {
|
|
51
63
|
option_ids: product.options?.map((opt) => opt.id) || [],
|
|
64
|
+
option_values: (() => {
|
|
65
|
+
const initialValues: Record<string, string[]> = {}
|
|
66
|
+
product.options?.forEach((opt) => {
|
|
67
|
+
initialValues[opt.id] = opt.values?.map((v) => v.id) || []
|
|
68
|
+
})
|
|
69
|
+
return initialValues
|
|
70
|
+
})(),
|
|
52
71
|
},
|
|
53
72
|
schema: ProductOptionsManageSchema,
|
|
54
73
|
configs: configs,
|
|
@@ -60,19 +79,92 @@ export const ProductOptionsManageForm = ({
|
|
|
60
79
|
const handleProductOptionSelect = (optionIds: string[]) => {
|
|
61
80
|
setSelectedOptionIds(optionIds)
|
|
62
81
|
form.setValue("option_ids", optionIds)
|
|
82
|
+
|
|
83
|
+
// Initialize selected values for new options (select all by default)
|
|
84
|
+
const newSelectedValues: Record<string, string[]> = {}
|
|
85
|
+
const selectedProductOptions = product_options.filter((option) =>
|
|
86
|
+
optionIds.includes(option.id)
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
selectedProductOptions.forEach((option) => {
|
|
90
|
+
// If option was already selected, keep its current value selection
|
|
91
|
+
if (selectedOptionValues[option.id]) {
|
|
92
|
+
newSelectedValues[option.id] = selectedOptionValues[option.id]
|
|
93
|
+
} else {
|
|
94
|
+
// New option - select all values by default
|
|
95
|
+
newSelectedValues[option.id] = option.values?.map((v) => v.id) || []
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
setSelectedOptionValues(newSelectedValues)
|
|
100
|
+
form.setValue("option_values", newSelectedValues)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const handleValueChange = (optionId: string, valueIds: string[]) => {
|
|
104
|
+
// Ensure at least one value is selected
|
|
105
|
+
if (valueIds.length === 0) {
|
|
106
|
+
return
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const updatedSelectedValues = {
|
|
110
|
+
...selectedOptionValues,
|
|
111
|
+
[optionId]: valueIds,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
setSelectedOptionValues(updatedSelectedValues)
|
|
115
|
+
form.setValue("option_values", updatedSelectedValues)
|
|
63
116
|
}
|
|
64
117
|
|
|
65
118
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
66
119
|
const currentOptionIds = product.options?.map((opt) => opt.id) || []
|
|
67
120
|
const newOptionIds = data.option_ids
|
|
68
121
|
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
(
|
|
75
|
-
|
|
122
|
+
const optionsToAdd: (string | { id: string; value_ids: string[] })[] = []
|
|
123
|
+
const optionsToRemove: string[] = []
|
|
124
|
+
|
|
125
|
+
// Check for completely removed options
|
|
126
|
+
for (const currentId of currentOptionIds) {
|
|
127
|
+
if (!newOptionIds.includes(currentId)) {
|
|
128
|
+
optionsToRemove.push(currentId)
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Check for new options or options with changed values
|
|
133
|
+
for (const newId of newOptionIds) {
|
|
134
|
+
const isNewOption = !currentOptionIds.includes(newId)
|
|
135
|
+
|
|
136
|
+
if (isNewOption) {
|
|
137
|
+
optionsToAdd.push(
|
|
138
|
+
data.option_values
|
|
139
|
+
? {
|
|
140
|
+
id: newId,
|
|
141
|
+
value_ids: data.option_values[newId],
|
|
142
|
+
}
|
|
143
|
+
: newId
|
|
144
|
+
)
|
|
145
|
+
} else {
|
|
146
|
+
const currentOption = product.options?.find((opt) => opt.id === newId)
|
|
147
|
+
const currentValueIds =
|
|
148
|
+
currentOption?.values?.map((v) => v.id).sort() || []
|
|
149
|
+
const newValueIds = [...(data.option_values?.[newId] || [])].sort()
|
|
150
|
+
|
|
151
|
+
const valuesChanged =
|
|
152
|
+
currentValueIds.length !== newValueIds.length ||
|
|
153
|
+
currentValueIds.some((id, index) => id !== newValueIds[index])
|
|
154
|
+
|
|
155
|
+
if (valuesChanged) {
|
|
156
|
+
optionsToRemove.push(newId)
|
|
157
|
+
optionsToAdd.push(
|
|
158
|
+
data.option_values
|
|
159
|
+
? {
|
|
160
|
+
id: newId,
|
|
161
|
+
value_ids: data.option_values[newId],
|
|
162
|
+
}
|
|
163
|
+
: newId
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
76
168
|
|
|
77
169
|
await mutateAsync(
|
|
78
170
|
{
|
|
@@ -120,6 +212,7 @@ export const ProductOptionsManageForm = ({
|
|
|
120
212
|
options={productOptionChoices}
|
|
121
213
|
placeholder={t("products.options.manage.placeholder")}
|
|
122
214
|
disabled={isLoading}
|
|
215
|
+
displayMode="chips"
|
|
123
216
|
/>
|
|
124
217
|
</Form.Control>
|
|
125
218
|
<Form.ErrorMessage />
|
|
@@ -127,6 +220,50 @@ export const ProductOptionsManageForm = ({
|
|
|
127
220
|
)
|
|
128
221
|
}}
|
|
129
222
|
/>
|
|
223
|
+
{selectedOptionIds.length > 0 && (
|
|
224
|
+
<div className="flex flex-col gap-y-4">
|
|
225
|
+
<div className="flex flex-col">
|
|
226
|
+
<Label weight="plus">{t("fields.values")}</Label>
|
|
227
|
+
<Hint>{t("products.create.variants.selectValuesHint")}</Hint>
|
|
228
|
+
</div>
|
|
229
|
+
<div className="flex flex-col gap-y-3">
|
|
230
|
+
{product_options
|
|
231
|
+
.filter((option) => selectedOptionIds.includes(option.id))
|
|
232
|
+
.map((option) => {
|
|
233
|
+
const valueOptions =
|
|
234
|
+
option.values
|
|
235
|
+
?.sort((a, b) => {
|
|
236
|
+
const rankA = a.rank ?? Number.MAX_VALUE
|
|
237
|
+
const rankB = b.rank ?? Number.MAX_VALUE
|
|
238
|
+
return rankA - rankB
|
|
239
|
+
})
|
|
240
|
+
.map((v) => ({
|
|
241
|
+
value: v.id,
|
|
242
|
+
label: v.value,
|
|
243
|
+
})) || []
|
|
244
|
+
|
|
245
|
+
return (
|
|
246
|
+
<div key={option.id} className="flex flex-col gap-y-2">
|
|
247
|
+
<Label size="small" weight="plus">
|
|
248
|
+
{option.title}
|
|
249
|
+
</Label>
|
|
250
|
+
<Combobox
|
|
251
|
+
value={selectedOptionValues[option.id] || []}
|
|
252
|
+
onChange={(value) =>
|
|
253
|
+
handleValueChange(option.id, value as string[])
|
|
254
|
+
}
|
|
255
|
+
options={valueOptions}
|
|
256
|
+
placeholder={t(
|
|
257
|
+
"products.fields.options.variantionsPlaceholder"
|
|
258
|
+
)}
|
|
259
|
+
displayMode="chips"
|
|
260
|
+
/>
|
|
261
|
+
</div>
|
|
262
|
+
)
|
|
263
|
+
})}
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
)}
|
|
130
267
|
</div>
|
|
131
268
|
</RouteDrawer.Body>
|
|
132
269
|
<RouteDrawer.Footer>
|
package/src/vite-env.d.ts
CHANGED
|
@@ -16,3 +16,5 @@ interface ImportMeta {
|
|
|
16
16
|
declare const __BACKEND_URL__: string | undefined
|
|
17
17
|
declare const __STOREFRONT_URL__: string | undefined
|
|
18
18
|
declare const __BASE__: string
|
|
19
|
+
declare const __AUTH_TYPE__: "session" | "jwt" | undefined
|
|
20
|
+
declare const __JWT_TOKEN_STORAGE_KEY__: string | undefined
|