@medusajs/dashboard 3.0.0-preview-20251203032421 → 3.0.0-preview-20251211172647
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-I7HDYMBX.mjs → add-campaign-promotions-JQKPED4U.mjs} +2 -1
- package/dist/{adjust-inventory-WZOCLB5V.mjs → adjust-inventory-2MFA656V.mjs} +5 -3
- package/dist/{api-key-management-create-W7NL2IYN.mjs → api-key-management-create-ZUVF3SLR.mjs} +5 -4
- package/dist/{api-key-management-detail-LDBEO446.mjs → api-key-management-detail-F7ZRCFPA.mjs} +11 -11
- package/dist/{api-key-management-edit-TLVLXAVK.mjs → api-key-management-edit-42HNUSXL.mjs} +7 -5
- package/dist/{api-key-management-list-FTLC3ELT.mjs → api-key-management-list-RGLZMUCB.mjs} +3 -3
- package/dist/{api-key-management-sales-channels-NYY3NZOE.mjs → api-key-management-sales-channels-7FVABESO.mjs} +7 -6
- package/dist/app.css +3 -0
- package/dist/app.js +7073 -6336
- package/dist/app.mjs +11 -11
- package/dist/{campaign-budget-edit-H2KQKD7B.mjs → campaign-budget-edit-6DMZGUCI.mjs} +4 -2
- package/dist/{campaign-configuration-A452A22M.mjs → campaign-configuration-UNFRB5HR.mjs} +4 -2
- package/dist/{campaign-create-LHL7FKQK.mjs → campaign-create-QXG7PD3S.mjs} +3 -2
- package/dist/{campaign-detail-T3V6M3XE.mjs → campaign-detail-6VNSVZHQ.mjs} +9 -9
- package/dist/{campaign-edit-LZV56AYF.mjs → campaign-edit-HN4US7DV.mjs} +4 -2
- package/dist/{categories-metadata-V6FDXGSN.mjs → categories-metadata-ORPB2LIW.mjs} +12 -11
- package/dist/{category-create-ELMCLH4J.mjs → category-create-FFIBWXAH.mjs} +4 -3
- package/dist/{category-detail-DNWTF4FV.mjs → category-detail-RICXPIVS.mjs} +12 -12
- package/dist/{category-edit-TYKLEYGE.mjs → category-edit-74MZ6TXN.mjs} +6 -4
- package/dist/{category-list-IJ3DLPYQ.mjs → category-list-AH2EGTI7.mjs} +3 -3
- package/dist/{category-organize-PDLC54E2.mjs → category-organize-B6EFBFKB.mjs} +4 -3
- package/dist/{category-products-ATK63QHB.mjs → category-products-L4XIX3IQ.mjs} +13 -12
- package/dist/{chunk-AF7A24XI.mjs → chunk-34KFHPN6.mjs} +1 -1
- package/dist/{chunk-T2ANPJ36.mjs → chunk-3YPRDSZ6.mjs} +1 -1
- package/dist/{chunk-AERWK3TJ.mjs → chunk-42OOM4DJ.mjs} +44 -212
- package/dist/{chunk-UHIPGDJZ.mjs → chunk-4G2UHUXX.mjs} +8 -5
- package/dist/{chunk-MWBKAP7W.mjs → chunk-4VNR7DND.mjs} +2 -2
- package/dist/{chunk-56TDUOXV.mjs → chunk-7AX6R6G6.mjs} +1 -1
- package/dist/{chunk-YGLRZQ4C.mjs → chunk-7R743WZ6.mjs} +18 -7
- package/dist/{chunk-ETOJCN3Q.mjs → chunk-AH4DORIW.mjs} +1 -1
- package/dist/{chunk-IKTS7EHT.mjs → chunk-AMOGGDOW.mjs} +1 -1
- package/dist/{chunk-ACJ3PPQJ.mjs → chunk-CZFLKMYE.mjs} +1 -1
- package/dist/{chunk-6VRDTPH2.mjs → chunk-D4J3CEWH.mjs} +4 -2
- package/dist/{chunk-REUYEF7L.mjs → chunk-EQBVGH3N.mjs} +1 -1
- package/dist/{chunk-VGXF4DOW.mjs → chunk-EXDBX4YX.mjs} +15 -16
- package/dist/{chunk-QHRVYT5N.mjs → chunk-FIFVOKTK.mjs} +3 -3
- package/dist/{chunk-A6PWH2CK.mjs → chunk-FQDPOKEK.mjs} +1 -1
- package/dist/{chunk-M32MJOJN.mjs → chunk-G4BWCU5P.mjs} +6 -3
- package/dist/{chunk-DKIUGYWW.mjs → chunk-GN6OCHP4.mjs} +2 -2
- package/dist/{chunk-KWP436SM.mjs → chunk-JJGE3EV6.mjs} +2 -2
- package/dist/{chunk-RLDK4LY5.mjs → chunk-JUVGXLY5.mjs} +18 -4
- package/dist/{chunk-TBEGSDLQ.mjs → chunk-KCWP7RF5.mjs} +1 -1
- package/dist/{chunk-T57MRRCF.mjs → chunk-KF7ZWW4K.mjs} +4 -2
- package/dist/{chunk-7V2JZU2B.mjs → chunk-L4NOVTH5.mjs} +4 -2
- package/dist/{chunk-AENRV3N7.mjs → chunk-LEJUZW3P.mjs} +3 -1
- package/dist/{chunk-PMJJI6GO.mjs → chunk-LHNU4DYZ.mjs} +1 -1
- package/dist/{chunk-K5QWNI6V.mjs → chunk-N3FCYZV6.mjs} +1 -1
- package/dist/{chunk-KLNRCI3K.mjs → chunk-N4O5FAUC.mjs} +1 -1
- package/dist/{chunk-O4RZ3Y65.mjs → chunk-NHDFPGQ3.mjs} +1 -1
- package/dist/{chunk-ND5YSIPU.mjs → chunk-NT6C7CHT.mjs} +1 -1
- package/dist/{chunk-7DXVXBSA.mjs → chunk-NTEWUH4C.mjs} +1 -1
- package/dist/{chunk-5EGFR4EO.mjs → chunk-Q4E6LV6K.mjs} +207 -188
- package/dist/{chunk-PCFUZKDS.mjs → chunk-R65S6ZZV.mjs} +4 -1
- package/dist/{chunk-4MG5LND4.mjs → chunk-UKECZ5PA.mjs} +5 -3
- package/dist/{chunk-VSQK3AWP.mjs → chunk-VX2HE7O5.mjs} +20 -16
- package/dist/{chunk-3I6G3NRU.mjs → chunk-WG7UTTKY.mjs} +2 -2
- package/dist/{chunk-M3CKVBZC.mjs → chunk-XIVBRONM.mjs} +1 -1
- package/dist/chunk-XNIVMZHA.mjs +50 -0
- package/dist/{chunk-OAW7KLET.mjs → chunk-XTQ7UFA3.mjs} +2 -2
- package/dist/chunk-XXBP2Z5M.mjs +182 -0
- package/dist/{chunk-WPXYFJEP.mjs → chunk-Y5UO73CH.mjs} +18 -2
- package/dist/{chunk-XDLBQGST.mjs → chunk-YV4ANEZF.mjs} +1 -1
- package/dist/{collection-add-products-7WSD7YU4.mjs → collection-add-products-MO4FGYD5.mjs} +13 -12
- package/dist/{collection-create-I2A2X4VK.mjs → collection-create-DCRW344Z.mjs} +4 -3
- package/dist/{collection-detail-NVE55BPK.mjs → collection-detail-ZCHVPXW5.mjs} +11 -11
- package/dist/{collection-edit-RGH7NCUE.mjs → collection-edit-UNFEW6HT.mjs} +6 -4
- package/dist/{collection-list-SXHRKTIU.mjs → collection-list-3UUFO7AP.mjs} +12 -12
- package/dist/{collection-metadata-ZREV7BND.mjs → collection-metadata-ZOYQDOOT.mjs} +12 -11
- package/dist/{customer-create-VL6SIRZ2.mjs → customer-create-XCLZENJS.mjs} +2 -1
- package/dist/{customer-create-address-V5C6M52P.mjs → customer-create-address-4HZUIAM7.mjs} +2 -1
- package/dist/{customer-detail-O4L55RY6.mjs → customer-detail-RMZTHQIQ.mjs} +13 -13
- package/dist/{customer-edit-WTBPVWOF.mjs → customer-edit-BW5GVTQI.mjs} +4 -2
- package/dist/{customer-group-add-customers-QU4Q56SS.mjs → customer-group-add-customers-HUGHHMU6.mjs} +2 -1
- package/dist/{customer-group-create-A3CB3Z4K.mjs → customer-group-create-6YV7W6TI.mjs} +2 -1
- package/dist/{customer-group-detail-LSZA4ARM.mjs → customer-group-detail-4S7WB3WV.mjs} +9 -9
- package/dist/{customer-group-edit-7KV2PNLE.mjs → customer-group-edit-7NXU34BQ.mjs} +4 -2
- package/dist/{customer-group-list-6JTEUJAC.mjs → customer-group-list-JQX6PW6E.mjs} +11 -11
- package/dist/{customer-group-metadata-4F2SZF4M.mjs → customer-group-metadata-WK2BGEGO.mjs} +3 -2
- package/dist/{customer-metadata-LZ3TAXCV.mjs → customer-metadata-ZUWCUTM7.mjs} +3 -2
- package/dist/{customers-add-customer-group-MHJ34FDF.mjs → customers-add-customer-group-JKTM33OU.mjs} +11 -10
- package/dist/{edit-inventory-item-LMDNUI6M.mjs → edit-inventory-item-Y5W6VTHJ.mjs} +5 -3
- package/dist/{edit-inventory-item-attributes-DPJIHBP3.mjs → edit-inventory-item-attributes-NAAZDFEJ.mjs} +5 -3
- package/dist/{edit-reservation-IOOZBJ2T.mjs → edit-reservation-2UD4RZJX.mjs} +6 -4
- package/dist/{edit-rules-CEE2IKS6.mjs → edit-rules-AXG2NQNS.mjs} +13 -11
- package/dist/en.json +7 -0
- package/dist/{inventory-create-H62EOWR6.mjs → inventory-create-6SKU4TZL.mjs} +11 -10
- package/dist/{inventory-detail-ALOIH3H7.mjs → inventory-detail-LAYYI2QT.mjs} +11 -11
- package/dist/{inventory-list-RQBI7UJX.mjs → inventory-list-BQPHK3FV.mjs} +1 -1
- package/dist/{inventory-metadata-ICOCEY75.mjs → inventory-metadata-Q6E6SZF3.mjs} +12 -11
- package/dist/{inventory-stock-LDEZTKU4.mjs → inventory-stock-SNAWXRBE.mjs} +11 -10
- package/dist/{location-create-GDOHM4T3.mjs → location-create-RPLEXUZR.mjs} +2 -1
- package/dist/{location-detail-UNXAQQSZ.mjs → location-detail-XXH22FLG.mjs} +9 -9
- package/dist/{location-edit-4SEMGQXA.mjs → location-edit-L4ISEQHX.mjs} +4 -2
- package/dist/{location-fulfillment-providers-XVFFAB6I.mjs → location-fulfillment-providers-FSC27EK7.mjs} +13 -12
- package/dist/{location-list-OYBI7EGV.mjs → location-list-Z42ZYHUF.mjs} +2 -2
- package/dist/{location-sales-channels-UVYT52SH.mjs → location-sales-channels-YMABMECM.mjs} +6 -5
- package/dist/{location-service-zone-create-35TTX636.mjs → location-service-zone-create-NSMZCD5N.mjs} +5 -3
- package/dist/{location-service-zone-edit-RWZS2XYW.mjs → location-service-zone-edit-6OUAFEZD.mjs} +4 -2
- package/dist/{location-service-zone-manage-areas-RGMM5Y6C.mjs → location-service-zone-manage-areas-SEC6LKCZ.mjs} +5 -3
- package/dist/{location-service-zone-shipping-option-create-THNTZX5P.mjs → location-service-zone-shipping-option-create-GWNLLSM5.mjs} +14 -12
- package/dist/{location-service-zone-shipping-option-edit-TQNTCYII.mjs → location-service-zone-shipping-option-edit-QS6HTWST.mjs} +17 -5
- package/dist/{location-service-zone-shipping-option-pricing-NQRIEGTX.mjs → location-service-zone-shipping-option-pricing-23QLNSBT.mjs} +5 -3
- package/dist/{login-EMANCYJH.mjs → login-MFUCIAT6.mjs} +9 -9
- package/dist/{manage-locations-2VDQ3ILT.mjs → manage-locations-JD6FSBOT.mjs} +5 -3
- package/dist/{order-allocate-items-FCJTB2IB.mjs → order-allocate-items-3DDI4V3W.mjs} +5 -4
- package/dist/{order-create-claim-P5ADYS5P.mjs → order-create-claim-G7BDA7WR.mjs} +19 -17
- package/dist/{order-create-edit-CVPRRPOA.mjs → order-create-edit-BXYPZRZV.mjs} +14 -12
- package/dist/{order-create-exchange-IHV6VKO5.mjs → order-create-exchange-AGEXEKOF.mjs} +19 -17
- package/dist/{order-create-fulfillment-SY6UM3NJ.mjs → order-create-fulfillment-GMLSBCEK.mjs} +11 -10
- package/dist/{order-create-refund-AGKPMCF6.mjs → order-create-refund-BT33POIN.mjs} +13 -11
- package/dist/{order-create-return-5UH7FN3H.mjs → order-create-return-QGXWSPMP.mjs} +12 -10
- package/dist/{order-create-shipment-J34CYL32.mjs → order-create-shipment-ZVTOKNC4.mjs} +11 -10
- package/dist/{order-detail-EVDCA6UP.mjs → order-detail-MORQRSHL.mjs} +18 -18
- package/dist/{order-edit-billing-address-JH3XNOCQ.mjs → order-edit-billing-address-IUVC4GSZ.mjs} +13 -11
- package/dist/{order-edit-email-KV2IHQRT.mjs → order-edit-email-MKLJPREH.mjs} +13 -11
- package/dist/{order-edit-shipping-address-WMNNU53B.mjs → order-edit-shipping-address-GFSRTDFG.mjs} +13 -11
- package/dist/{order-list-26YQAIRH.mjs → order-list-QOYJFYD5.mjs} +11 -12
- package/dist/{order-metadata-F4LZ73LR.mjs → order-metadata-BRSYOGKE.mjs} +12 -11
- package/dist/{order-receive-return-LSMD7POH.mjs → order-receive-return-NI345L43.mjs} +14 -12
- package/dist/{order-request-transfer-A3EBBZ5N.mjs → order-request-transfer-ZGGIUFRV.mjs} +13 -11
- package/dist/{price-list-configuration-2G3WFC3J.mjs → price-list-configuration-CWTP3Y5X.mjs} +7 -5
- package/dist/{price-list-create-RLT7G7KF.mjs → price-list-create-HDYM5ZGW.mjs} +20 -16
- package/dist/{price-list-detail-TKRELOK2.mjs → price-list-detail-GVGNB5AY.mjs} +22 -15
- package/dist/{price-list-edit-6URYI6AK.mjs → price-list-edit-SW7YIR3Z.mjs} +6 -4
- package/dist/{price-list-list-FLINOQCK.mjs → price-list-list-AZOGEZAS.mjs} +34 -18
- package/dist/{price-list-prices-add-UPUY72HG.mjs → price-list-prices-add-P4XHE3F4.mjs} +18 -14
- package/dist/{price-list-prices-edit-ZHAQDPWX.mjs → price-list-prices-edit-C6SX2TLJ.mjs} +9 -5
- package/dist/{product-attributes-ZR63AQWA.mjs → product-attributes-AXSXHPI5.mjs} +17 -17
- package/dist/{product-create-EQ6SN5QT.mjs → product-create-CAGTWFTS.mjs} +17 -15
- package/dist/{product-create-option-GAEPSU6J.mjs → product-create-option-GEGQNSMQ.mjs} +9 -4
- package/dist/{product-create-variant-7C5PKKX7.mjs → product-create-variant-5DLZZQPL.mjs} +17 -12
- package/dist/{product-detail-ATPFDPI2.mjs → product-detail-FSORFVRL.mjs} +21 -15
- package/dist/{product-edit-XPUNYMD7.mjs → product-edit-EYQIREZ6.mjs} +17 -17
- package/dist/{product-edit-option-VIU3ZICO.mjs → product-edit-option-HBIOBQTS.mjs} +9 -4
- package/dist/{product-export-GFLEIKIM.mjs → product-export-4XRDDWZQ.mjs} +16 -14
- package/dist/{product-image-variants-edit-TC3M4PGX.mjs → product-image-variants-edit-KCFCTXE2.mjs} +17 -12
- package/dist/{product-import-2Z5I7RXI.mjs → product-import-JTEXWYY7.mjs} +13 -11
- package/dist/{product-list-33ANLONH.mjs → product-list-T4OZG4OC.mjs} +16 -16
- package/dist/{product-media-WCLPCVR3.mjs → product-media-EGK66SRX.mjs} +7 -3
- package/dist/{product-metadata-GQU7EVZ3.mjs → product-metadata-5BLG4EIR.mjs} +16 -12
- package/dist/{product-organization-T2TQ5EH6.mjs → product-organization-BEXN2KXC.mjs} +18 -18
- package/dist/{product-prices-MKMKBH6P.mjs → product-prices-WQDE4XYT.mjs} +7 -3
- package/dist/{product-sales-channels-5YIO22UW.mjs → product-sales-channels-ZICOOOKY.mjs} +10 -6
- package/dist/{product-shipping-profile-PL76UMVZ.mjs → product-shipping-profile-KIDRTPWA.mjs} +7 -51
- package/dist/{product-stock-6QHBTDUQ.mjs → product-stock-SSJVQPBZ.mjs} +11 -10
- package/dist/{product-tag-create-B6EOKDJT.mjs → product-tag-create-ZPYRJTC4.mjs} +11 -10
- package/dist/{product-tag-detail-TQP7ZWSR.mjs → product-tag-detail-VRGVJNDT.mjs} +16 -16
- package/dist/{product-tag-edit-RPLWDG5A.mjs → product-tag-edit-2KFYOID4.mjs} +13 -11
- package/dist/{product-tag-list-PZTGHM7M.mjs → product-tag-list-WTX6GV7O.mjs} +16 -16
- package/dist/{product-tag-metadata-FKKOT5CD.mjs → product-tag-metadata-Y7YHTUKM.mjs} +12 -11
- package/dist/{product-type-create-Y752WGBV.mjs → product-type-create-HBDROTGB.mjs} +2 -1
- package/dist/{product-type-detail-DDIBFR7O.mjs → product-type-detail-3ZLSMENL.mjs} +11 -11
- package/dist/{product-type-edit-SMPJ5ZEF.mjs → product-type-edit-H3JCMVRV.mjs} +4 -2
- package/dist/{product-type-metadata-EXCYTTQG.mjs → product-type-metadata-GJACA4N6.mjs} +12 -11
- package/dist/{product-variant-detail-GCESZH4H.mjs → product-variant-detail-L5G4CPVH.mjs} +9 -9
- package/dist/{product-variant-edit-JHOQJN6U.mjs → product-variant-edit-YXALQPQT.mjs} +15 -12
- package/dist/{product-variant-manage-inventory-items-B7TUBSD5.mjs → product-variant-manage-inventory-items-BLHCH6QD.mjs} +3 -2
- package/dist/{product-variant-media-6WWLRINP.mjs → product-variant-media-KLSUISGH.mjs} +3 -2
- package/dist/{product-variant-metadata-NEZIGTEP.mjs → product-variant-metadata-OQOE34VY.mjs} +12 -11
- package/dist/{profile-edit-NFVR5Y4I.mjs → profile-edit-5EEKOEO5.mjs} +4 -2
- package/dist/{promotion-add-campaign-MKDYE7MW.mjs → promotion-add-campaign-JRTM7WBR.mjs} +3 -2
- package/dist/{promotion-create-CUAQY2NH.mjs → promotion-create-OXNLKBL7.mjs} +13 -12
- package/dist/{promotion-detail-2S7FWTXF.mjs → promotion-detail-N6VHHN3X.mjs} +9 -9
- package/dist/{promotion-edit-details-AKKNOCLM.mjs → promotion-edit-details-AREFQ6O5.mjs} +4 -2
- package/dist/{refund-reason-create-4YAO4325.mjs → refund-reason-create-L36EUXXM.mjs} +11 -10
- package/dist/{refund-reason-edit-5J2VIRIL.mjs → refund-reason-edit-364ALB4G.mjs} +13 -11
- package/dist/{refund-reason-list-453DXONV.mjs → refund-reason-list-ICO2GYRP.mjs} +15 -15
- package/dist/{region-add-countries-6GB2QDJK.mjs → region-add-countries-AFWXMQ6W.mjs} +2 -1
- package/dist/{region-create-QLPSK6TX.mjs → region-create-YC4VZ4AS.mjs} +4 -2
- package/dist/{region-edit-JCJHA6TY.mjs → region-edit-5GO25GDF.mjs} +4 -2
- package/dist/{region-metadata-C7DIBM35.mjs → region-metadata-VNLW6NYZ.mjs} +12 -11
- package/dist/{reservation-create-BW4CDTWR.mjs → reservation-create-Z2SUMBGT.mjs} +4 -3
- package/dist/{reservation-detail-GFNWLSI2.mjs → reservation-detail-YXIUIN5I.mjs} +9 -9
- package/dist/{reservation-list-RGL67CIU.mjs → reservation-list-SOJRN5RI.mjs} +2 -2
- package/dist/{reservation-metadata-OI2G4BDW.mjs → reservation-metadata-7H7TYWZW.mjs} +12 -11
- package/dist/{return-reason-create-PLQNC4KW.mjs → return-reason-create-NXWDC6AC.mjs} +2 -1
- package/dist/{return-reason-edit-XJCPMZ6U.mjs → return-reason-edit-M6IKNNKB.mjs} +4 -2
- package/dist/{return-reason-list-VYLLXDG4.mjs → return-reason-list-IFFIDA5O.mjs} +4 -4
- package/dist/{sales-channel-add-products-63NGB37Z.mjs → sales-channel-add-products-N7EPWF2N.mjs} +13 -12
- package/dist/{sales-channel-create-TOBEDYFD.mjs → sales-channel-create-E7BDTPWD.mjs} +4 -3
- package/dist/{sales-channel-detail-LJPQAJDT.mjs → sales-channel-detail-DV6BKC5B.mjs} +11 -11
- package/dist/{sales-channel-edit-XUTE5GB5.mjs → sales-channel-edit-HMPA3Y3L.mjs} +6 -4
- package/dist/{sales-channel-list-TBAN7UT6.mjs → sales-channel-list-33QC2ZXP.mjs} +11 -11
- package/dist/{sales-channel-metadata-SE4TGSDB.mjs → sales-channel-metadata-HYYQEVRZ.mjs} +12 -11
- package/dist/{shipping-option-type-create-MB4ENYKV.mjs → shipping-option-type-create-IXYDKBKG.mjs} +11 -10
- package/dist/{shipping-option-type-detail-IX4JGSTK.mjs → shipping-option-type-detail-WMZ3DEY6.mjs} +10 -10
- package/dist/{shipping-option-type-edit-B5KU5LER.mjs → shipping-option-type-edit-YYO3Q2QV.mjs} +13 -11
- package/dist/{shipping-option-type-list-TVR5OE2C.mjs → shipping-option-type-list-YAL6IQF2.mjs} +10 -10
- package/dist/{shipping-profile-create-NKFUOBVZ.mjs → shipping-profile-create-752TMBBE.mjs} +2 -1
- package/dist/{shipping-profile-metadata-Z35SYLBS.mjs → shipping-profile-metadata-YBXPOVZF.mjs} +12 -11
- package/dist/{store-add-currencies-QVG2SI26.mjs → store-add-currencies-3VMLZ6KB.mjs} +2 -1
- package/dist/store-add-locales-AYY44DB3.mjs +264 -0
- package/dist/{store-detail-VUJSSOKZ.mjs → store-detail-4YVABC3P.mjs} +280 -14
- package/dist/store-edit-EPAHLLKP.mjs +288 -0
- package/dist/{store-metadata-TYFTDOEK.mjs → store-metadata-QQD2NP5U.mjs} +12 -11
- package/dist/{tax-region-create-ZTCTKE4C.mjs → tax-region-create-AFGAIC3C.mjs} +11 -10
- package/dist/{tax-region-detail-MHM4MAOS.mjs → tax-region-detail-LM7VIA2N.mjs} +20 -19
- package/dist/{tax-region-edit-SFJGFTAV.mjs → tax-region-edit-ZLSY22NQ.mjs} +13 -11
- package/dist/{tax-region-province-create-T2LKEDTK.mjs → tax-region-province-create-5JP3PVID.mjs} +2 -1
- package/dist/{tax-region-province-detail-VMOV4JPV.mjs → tax-region-province-detail-ZF75A3Z2.mjs} +20 -19
- package/dist/{tax-region-tax-override-create-GRXLTURD.mjs → tax-region-tax-override-create-JVMTMMWB.mjs} +20 -18
- package/dist/{tax-region-tax-override-edit-D2YBOBEI.mjs → tax-region-tax-override-edit-HS4BCVC7.mjs} +19 -18
- package/dist/{tax-region-tax-rate-create-UEOU5QRU.mjs → tax-region-tax-rate-create-O2SDSXCH.mjs} +2 -1
- package/dist/{tax-region-tax-rate-edit-ILCDNXHV.mjs → tax-region-tax-rate-edit-W62VEVKT.mjs} +4 -2
- package/dist/{user-detail-N6PT3KRP.mjs → user-detail-KEDJ7N3Q.mjs} +1 -1
- package/dist/{user-edit-25HD3BYT.mjs → user-edit-LXQCTDGA.mjs} +4 -2
- package/dist/{user-invite-CRQTVEYA.mjs → user-invite-2OKB7SCF.mjs} +2 -1
- package/dist/{user-list-6KATHOTJ.mjs → user-list-YYUOQKQY.mjs} +2 -2
- package/dist/{user-metadata-D5HNZWZY.mjs → user-metadata-U3WGLABX.mjs} +12 -11
- package/dist/{workflow-execution-detail-GSUDCTN3.mjs → workflow-execution-detail-L4IESFKA.mjs} +9 -9
- package/package.json +9 -9
- package/src/components/search/use-search-results.tsx +3 -1
- package/src/components/table/table-cells/order/total-cell/total-cell.tsx +3 -2
- package/src/dashboard-app/routes/get-route.map.tsx +4 -0
- package/src/hooks/api/feature-flags.tsx +9 -5
- package/src/hooks/api/index.ts +1 -0
- package/src/hooks/api/locales.tsx +52 -0
- package/src/hooks/api/price-lists.tsx +28 -1
- package/src/hooks/api/products.tsx +5 -1
- package/src/hooks/table/columns/use-order-table-columns.tsx +18 -4
- package/src/hooks/table/query/use-product-table-query.tsx +2 -1
- package/src/i18n/translations/$schema.json +28 -0
- package/src/i18n/translations/en.json +7 -0
- package/src/i18n/translations/es.json +7 -0
- package/src/lib/order-helpers.ts +1 -1
- package/src/lib/table/cell-renderers.tsx +102 -83
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-create-form.tsx +11 -4
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-create-form.tsx +11 -4
- package/src/routes/orders/order-create-return/components/return-create-form/return-create-form.tsx +11 -4
- package/src/routes/orders/order-list/const.ts +1 -1
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-prices-form.tsx +3 -1
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-products-form.tsx +1 -0
- package/src/routes/price-lists/price-list-detail/components/price-list-general-section/price-list-general-section.tsx +13 -5
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-count-cell.tsx +19 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-columns.tsx +5 -6
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-prices-form.tsx +3 -1
- package/src/routes/price-lists/price-list-prices-add/price-list-prices-add.tsx +4 -1
- package/src/routes/price-lists/price-list-prices-edit/price-list-prices-edit.tsx +6 -2
- package/src/routes/product-variants/product-variant-edit/product-variant-edit.tsx +2 -1
- package/src/routes/products/product-attributes/product-attributes.tsx +3 -2
- package/src/routes/products/product-create-option/product-create-option.tsx +5 -1
- package/src/routes/products/product-create-variant/product-create-variant.tsx +4 -1
- package/src/routes/products/product-detail/breadcrumb.tsx +3 -2
- package/src/routes/products/product-edit/product-edit.tsx +3 -2
- package/src/routes/products/product-edit-option/product-edit-option.tsx +4 -1
- package/src/routes/products/product-image-variants-edit/product-image-variants-edit.tsx +5 -1
- package/src/routes/products/product-media/product-media.tsx +4 -1
- package/src/routes/products/product-metadata/product-metadata.tsx +5 -1
- package/src/routes/products/product-organization/product-organization.tsx +2 -2
- package/src/routes/products/product-prices/product-prices.tsx +4 -1
- package/src/routes/products/product-sales-channels/product-sales-channels.tsx +4 -1
- package/src/routes/products/product-shipping-profile/product-shipping-profile.tsx +3 -2
- package/src/routes/store/common/hooks/use-locales-table-columns.tsx +29 -0
- package/src/routes/store/common/hooks/use-locales-table-query.tsx +21 -0
- package/src/routes/store/store-add-locales/components/add-locales-form/add-locales-form.tsx +240 -0
- package/src/routes/store/store-add-locales/index.ts +1 -0
- package/src/routes/store/store-add-locales/store-add-locales.tsx +29 -0
- package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +24 -0
- package/src/routes/store/store-detail/components/store-locale-section/index.ts +1 -0
- package/src/routes/store/store-detail/components/store-locale-section/store-locale-section.tsx +290 -0
- package/src/routes/store/store-detail/store-detail.tsx +4 -0
- package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +50 -3
- package/src/routes/tax-regions/common/components/target-item/target-item.tsx +5 -1
- package/src/routes/tax-regions/common/components/tax-override-card/tax-override-card.tsx +10 -10
- package/dist/chunk-6CPMXY5N.mjs +0 -18
- package/dist/chunk-E3AFVPLW.mjs +0 -13
- package/dist/store-edit-3XS6IC2Z.mjs +0 -238
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FetchError } from "@medusajs/js-sdk"
|
|
2
|
+
import { HttpTypes } from "@medusajs/types"
|
|
3
|
+
import { QueryKey, UseQueryOptions, useQuery } from "@tanstack/react-query"
|
|
4
|
+
|
|
5
|
+
import { sdk } from "../../lib/client"
|
|
6
|
+
import { queryKeysFactory } from "../../lib/query-key-factory"
|
|
7
|
+
|
|
8
|
+
const LOCALES_QUERY_KEY = "locales" as const
|
|
9
|
+
const localesQueryKeys = queryKeysFactory(LOCALES_QUERY_KEY)
|
|
10
|
+
|
|
11
|
+
export const useLocales = (
|
|
12
|
+
query?: HttpTypes.AdminLocaleListParams,
|
|
13
|
+
options?: Omit<
|
|
14
|
+
UseQueryOptions<
|
|
15
|
+
HttpTypes.AdminLocaleListResponse,
|
|
16
|
+
FetchError,
|
|
17
|
+
HttpTypes.AdminLocaleListResponse,
|
|
18
|
+
QueryKey
|
|
19
|
+
>,
|
|
20
|
+
"queryFn" | "queryKey"
|
|
21
|
+
>
|
|
22
|
+
) => {
|
|
23
|
+
const { data, ...rest } = useQuery({
|
|
24
|
+
queryFn: () => sdk.admin.locale.list(query),
|
|
25
|
+
queryKey: localesQueryKeys.list(query),
|
|
26
|
+
...options,
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
return { ...data, ...rest }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const useLocale = (
|
|
33
|
+
id: string,
|
|
34
|
+
query?: HttpTypes.AdminLocaleParams,
|
|
35
|
+
options?: Omit<
|
|
36
|
+
UseQueryOptions<
|
|
37
|
+
HttpTypes.AdminLocaleResponse,
|
|
38
|
+
FetchError,
|
|
39
|
+
HttpTypes.AdminLocaleResponse,
|
|
40
|
+
QueryKey
|
|
41
|
+
>,
|
|
42
|
+
"queryFn" | "queryKey"
|
|
43
|
+
>
|
|
44
|
+
) => {
|
|
45
|
+
const { data, ...rest } = useQuery({
|
|
46
|
+
queryKey: localesQueryKeys.detail(id),
|
|
47
|
+
queryFn: async () => sdk.admin.locale.retrieve(id, query),
|
|
48
|
+
...options,
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
return { ...data, ...rest }
|
|
52
|
+
}
|
|
@@ -14,7 +14,12 @@ import { customerGroupsQueryKeys } from "./customer-groups"
|
|
|
14
14
|
import { productsQueryKeys } from "./products"
|
|
15
15
|
|
|
16
16
|
const PRICE_LISTS_QUERY_KEY = "price-lists" as const
|
|
17
|
+
const PRICE_LIST_PRICES_QUERY_KEY = "price-list-prices" as const
|
|
18
|
+
|
|
17
19
|
export const priceListsQueryKeys = queryKeysFactory(PRICE_LISTS_QUERY_KEY)
|
|
20
|
+
export const priceListPricesQueryKeys = queryKeysFactory(
|
|
21
|
+
PRICE_LIST_PRICES_QUERY_KEY
|
|
22
|
+
)
|
|
18
23
|
|
|
19
24
|
export const usePriceList = (
|
|
20
25
|
id: string,
|
|
@@ -31,7 +36,7 @@ export const usePriceList = (
|
|
|
31
36
|
) => {
|
|
32
37
|
const { data, ...rest } = useQuery({
|
|
33
38
|
queryFn: () => sdk.admin.priceList.retrieve(id, query),
|
|
34
|
-
queryKey: priceListsQueryKeys.detail(id),
|
|
39
|
+
queryKey: priceListsQueryKeys.detail(id, query),
|
|
35
40
|
...options,
|
|
36
41
|
})
|
|
37
42
|
|
|
@@ -124,6 +129,25 @@ export const useDeletePriceList = (
|
|
|
124
129
|
})
|
|
125
130
|
}
|
|
126
131
|
|
|
132
|
+
export const usePriceListPrices = (
|
|
133
|
+
id: string,
|
|
134
|
+
query?: HttpTypes.AdminPriceListPriceListParams,
|
|
135
|
+
options?: UseQueryOptions<
|
|
136
|
+
HttpTypes.AdminPriceListPriceListResponse,
|
|
137
|
+
FetchError,
|
|
138
|
+
HttpTypes.AdminPriceListPriceListResponse,
|
|
139
|
+
QueryKey
|
|
140
|
+
>
|
|
141
|
+
) => {
|
|
142
|
+
const { data, ...rest } = useQuery({
|
|
143
|
+
queryFn: () => sdk.admin.priceList.prices(id, query),
|
|
144
|
+
queryKey: priceListPricesQueryKeys.detail(id, query),
|
|
145
|
+
...options,
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
return { ...data, ...rest }
|
|
149
|
+
}
|
|
150
|
+
|
|
127
151
|
export const useBatchPriceListPrices = (
|
|
128
152
|
id: string,
|
|
129
153
|
query?: HttpTypes.AdminPriceListParams,
|
|
@@ -141,6 +165,9 @@ export const useBatchPriceListPrices = (
|
|
|
141
165
|
queryKey: priceListsQueryKeys.detail(id),
|
|
142
166
|
})
|
|
143
167
|
queryClient.invalidateQueries({ queryKey: productsQueryKeys.lists() })
|
|
168
|
+
queryClient.invalidateQueries({
|
|
169
|
+
queryKey: priceListPricesQueryKeys.detail(id),
|
|
170
|
+
})
|
|
144
171
|
|
|
145
172
|
options?.onSuccess?.(data, variables, context)
|
|
146
173
|
},
|
|
@@ -340,7 +340,11 @@ export const useUpdateProduct = (
|
|
|
340
340
|
>
|
|
341
341
|
) => {
|
|
342
342
|
return useMutation({
|
|
343
|
-
mutationFn: (payload) =>
|
|
343
|
+
mutationFn: (payload) =>
|
|
344
|
+
sdk.admin.product.update(id, payload, {
|
|
345
|
+
fields:
|
|
346
|
+
"-type,-collection,-options,-tags,-images,-variants,-sales_channels",
|
|
347
|
+
}),
|
|
344
348
|
onSuccess: async (data, variables, context) => {
|
|
345
349
|
await queryClient.invalidateQueries({
|
|
346
350
|
queryKey: productsQueryKeys.lists(),
|
|
@@ -98,10 +98,24 @@ export const useOrderTableColumns = (props: UseOrderTableColumnsProps) => {
|
|
|
98
98
|
columnHelper.accessor("total", {
|
|
99
99
|
header: () => <TotalHeader />,
|
|
100
100
|
cell: ({ getValue, row }) => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
const isFullyRefunded = row.original.payment_status === "refunded"
|
|
102
|
+
const total = !isFullyRefunded
|
|
103
|
+
? getValue()
|
|
104
|
+
: row.original.payment_collections.reduce(
|
|
105
|
+
(acc, payCol) => acc + (payCol.refunded_amount ?? 0),
|
|
106
|
+
0
|
|
107
|
+
)
|
|
108
|
+
const currencyCode = row.original.currency_code
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<TotalCell
|
|
112
|
+
currencyCode={currencyCode}
|
|
113
|
+
total={total}
|
|
114
|
+
className={
|
|
115
|
+
isFullyRefunded ? "text-ui-fg-muted line-through" : ""
|
|
116
|
+
}
|
|
117
|
+
/>
|
|
118
|
+
)
|
|
105
119
|
},
|
|
106
120
|
}),
|
|
107
121
|
columnHelper.display({
|
|
@@ -7,7 +7,8 @@ type UseProductTableQueryProps = {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const DEFAULT_FIELDS =
|
|
10
|
-
|
|
10
|
+
// TODO: Remove exclusion once we avoid including unnecessary relations by default in the query config
|
|
11
|
+
"id,title,handle,status,*collection,*sales_channels,variants.id,thumbnail,-type,-options,-tags,-images,-variants"
|
|
11
12
|
|
|
12
13
|
export const useProductTableQuery = ({
|
|
13
14
|
prefix,
|
|
@@ -9303,6 +9303,9 @@
|
|
|
9303
9303
|
"defaultCurrency": {
|
|
9304
9304
|
"type": "string"
|
|
9305
9305
|
},
|
|
9306
|
+
"defaultLocale": {
|
|
9307
|
+
"type": "string"
|
|
9308
|
+
},
|
|
9306
9309
|
"defaultRegion": {
|
|
9307
9310
|
"type": "string"
|
|
9308
9311
|
},
|
|
@@ -9321,6 +9324,9 @@
|
|
|
9321
9324
|
"inviteLinkTemplate": {
|
|
9322
9325
|
"type": "string"
|
|
9323
9326
|
},
|
|
9327
|
+
"locales": {
|
|
9328
|
+
"type": "string"
|
|
9329
|
+
},
|
|
9324
9330
|
"currencies": {
|
|
9325
9331
|
"type": "string"
|
|
9326
9332
|
},
|
|
@@ -9339,6 +9345,15 @@
|
|
|
9339
9345
|
"removeCurrencyWarning_other": {
|
|
9340
9346
|
"type": "string"
|
|
9341
9347
|
},
|
|
9348
|
+
"removeLocaleWarning_one": {
|
|
9349
|
+
"type": "string"
|
|
9350
|
+
},
|
|
9351
|
+
"removeLocaleWarning_other": {
|
|
9352
|
+
"type": "string"
|
|
9353
|
+
},
|
|
9354
|
+
"localeAlreadyAdded": {
|
|
9355
|
+
"type": "string"
|
|
9356
|
+
},
|
|
9342
9357
|
"currencyAlreadyAdded": {
|
|
9343
9358
|
"type": "string"
|
|
9344
9359
|
},
|
|
@@ -9358,20 +9373,28 @@
|
|
|
9358
9373
|
"update": {
|
|
9359
9374
|
"type": "string"
|
|
9360
9375
|
},
|
|
9376
|
+
"localesUpdated": {
|
|
9377
|
+
"type": "string"
|
|
9378
|
+
},
|
|
9361
9379
|
"currenciesUpdated": {
|
|
9362
9380
|
"type": "string"
|
|
9363
9381
|
},
|
|
9364
9382
|
"currenciesRemoved": {
|
|
9365
9383
|
"type": "string"
|
|
9366
9384
|
},
|
|
9385
|
+
"localesRemoved": {
|
|
9386
|
+
"type": "string"
|
|
9387
|
+
},
|
|
9367
9388
|
"updatedTaxInclusivitySuccessfully": {
|
|
9368
9389
|
"type": "string"
|
|
9369
9390
|
}
|
|
9370
9391
|
},
|
|
9371
9392
|
"required": [
|
|
9372
9393
|
"update",
|
|
9394
|
+
"localesUpdated",
|
|
9373
9395
|
"currenciesUpdated",
|
|
9374
9396
|
"currenciesRemoved",
|
|
9397
|
+
"localesRemoved",
|
|
9375
9398
|
"updatedTaxInclusivitySuccessfully"
|
|
9376
9399
|
],
|
|
9377
9400
|
"additionalProperties": false
|
|
@@ -9382,19 +9405,24 @@
|
|
|
9382
9405
|
"manageYourStoresDetails",
|
|
9383
9406
|
"editStore",
|
|
9384
9407
|
"defaultCurrency",
|
|
9408
|
+
"defaultLocale",
|
|
9385
9409
|
"defaultRegion",
|
|
9386
9410
|
"defaultSalesChannel",
|
|
9387
9411
|
"defaultLocation",
|
|
9388
9412
|
"swapLinkTemplate",
|
|
9389
9413
|
"paymentLinkTemplate",
|
|
9390
9414
|
"inviteLinkTemplate",
|
|
9415
|
+
"locales",
|
|
9391
9416
|
"currencies",
|
|
9392
9417
|
"addCurrencies",
|
|
9393
9418
|
"enableTaxInclusivePricing",
|
|
9394
9419
|
"disableTaxInclusivePricing",
|
|
9395
9420
|
"removeCurrencyWarning_one",
|
|
9396
9421
|
"removeCurrencyWarning_other",
|
|
9422
|
+
"removeLocaleWarning_one",
|
|
9423
|
+
"removeLocaleWarning_other",
|
|
9397
9424
|
"currencyAlreadyAdded",
|
|
9425
|
+
"localeAlreadyAdded",
|
|
9398
9426
|
"edit",
|
|
9399
9427
|
"toast"
|
|
9400
9428
|
],
|
|
@@ -2497,26 +2497,33 @@
|
|
|
2497
2497
|
"manageYourStoresDetails": "Manage your store's details",
|
|
2498
2498
|
"editStore": "Edit store",
|
|
2499
2499
|
"defaultCurrency": "Default currency",
|
|
2500
|
+
"defaultLocale": "Default locale",
|
|
2500
2501
|
"defaultRegion": "Default region",
|
|
2501
2502
|
"defaultSalesChannel": "Default sales channel",
|
|
2502
2503
|
"defaultLocation": "Default location",
|
|
2503
2504
|
"swapLinkTemplate": "Swap link template",
|
|
2504
2505
|
"paymentLinkTemplate": "Payment link template",
|
|
2505
2506
|
"inviteLinkTemplate": "Invite link template",
|
|
2507
|
+
"locales": "Locales",
|
|
2506
2508
|
"currencies": "Currencies",
|
|
2507
2509
|
"addCurrencies": "Add currencies",
|
|
2508
2510
|
"enableTaxInclusivePricing": "Enable tax inclusive pricing",
|
|
2509
2511
|
"disableTaxInclusivePricing": "Disable tax inclusive pricing",
|
|
2510
2512
|
"removeCurrencyWarning_one": "You are about to remove {{count}} currency from your store. Ensure that you have removed all prices using the currency before proceeding.",
|
|
2511
2513
|
"removeCurrencyWarning_other": "You are about to remove {{count}} currencies from your store. Ensure that you have removed all prices using the currencies before proceeding.",
|
|
2514
|
+
"removeLocaleWarning_one": "You are about to remove {{count}} locale from your store. Any translation using this locale will be removed.",
|
|
2515
|
+
"removeLocaleWarning_other": "You are about to remove {{count}} locales from your store. Any translation using these locales will be removed.",
|
|
2512
2516
|
"currencyAlreadyAdded": "The currency has already been added to your store.",
|
|
2517
|
+
"localeAlreadyAdded": "The locale has already been added to your store.",
|
|
2513
2518
|
"edit": {
|
|
2514
2519
|
"header": "Edit Store"
|
|
2515
2520
|
},
|
|
2516
2521
|
"toast": {
|
|
2517
2522
|
"update": "Store successfully updated",
|
|
2518
2523
|
"currenciesUpdated": "Currencies updated successfully",
|
|
2524
|
+
"localesUpdated": "Locales updated successfully",
|
|
2519
2525
|
"currenciesRemoved": "Removed currencies from the store successfully",
|
|
2526
|
+
"localesRemoved": "Removed locales from the store successfully",
|
|
2520
2527
|
"updatedTaxInclusivitySuccessfully": "Tax inclusive pricing updated successfully"
|
|
2521
2528
|
}
|
|
2522
2529
|
},
|
|
@@ -2448,26 +2448,33 @@
|
|
|
2448
2448
|
"manageYourStoresDetails": "Gestiona los detalles de tu tienda",
|
|
2449
2449
|
"editStore": "Editar tienda",
|
|
2450
2450
|
"defaultCurrency": "Moneda por defecto",
|
|
2451
|
+
"defaultLocale": "Idioma por defecto",
|
|
2451
2452
|
"defaultRegion": "Región por defecto",
|
|
2452
2453
|
"defaultSalesChannel": "Canal de ventas predeterminado",
|
|
2453
2454
|
"defaultLocation": "Ubicación predeterminada",
|
|
2454
2455
|
"swapLinkTemplate": "Plantilla de enlace de cambio",
|
|
2455
2456
|
"paymentLinkTemplate": "Plantilla de enlace de pago",
|
|
2456
2457
|
"inviteLinkTemplate": "Plantilla de enlace de invitación",
|
|
2458
|
+
"locales": "Idiomas",
|
|
2457
2459
|
"currencies": "Monedas",
|
|
2458
2460
|
"addCurrencies": "Agregar monedas",
|
|
2459
2461
|
"enableTaxInclusivePricing": "Habilitar precios con impuestos incluidos",
|
|
2460
2462
|
"disableTaxInclusivePricing": "Deshabilitar precios con impuestos incluidos",
|
|
2461
2463
|
"removeCurrencyWarning_one": "Estás a punto de eliminar {{count}} moneda de tu tienda. Asegúrate de haber eliminado todos los precios que usen esta moneda antes de continuar.",
|
|
2462
2464
|
"removeCurrencyWarning_other": "Estás a punto de eliminar {{count}} monedas de tu tienda. Asegúrate de haber eliminado todos los precios que usen estas monedas antes de continuar.",
|
|
2465
|
+
"removeLocaleWarning_one": "Estás a punto de eliminar {{count}} idioma de tu tienda. Cualquier traducción que use este idioma será eliminada.",
|
|
2466
|
+
"removeLocaleWarning_other": "Estás a punto de eliminar {{count}} idiomas de tu tienda. Cualquier traducción que use estos idiomas será eliminada.",
|
|
2463
2467
|
"currencyAlreadyAdded": "La moneda ya ha sido agregada a tu tienda.",
|
|
2468
|
+
"localeAlreadyAdded": "El idioma ya ha sido agregado a tu tienda.",
|
|
2464
2469
|
"edit": {
|
|
2465
2470
|
"header": "Editar Tienda"
|
|
2466
2471
|
},
|
|
2467
2472
|
"toast": {
|
|
2468
2473
|
"update": "Tienda actualizada exitosamente",
|
|
2469
2474
|
"currenciesUpdated": "Monedas actualizadas exitosamente",
|
|
2475
|
+
"localesUpdated": "Idiomas actualizados exitosamente",
|
|
2470
2476
|
"currenciesRemoved": "Monedas eliminadas de la tienda exitosamente",
|
|
2477
|
+
"localesRemoved": "Idiomas eliminados de la tienda exitosamente",
|
|
2471
2478
|
"updatedTaxInclusivitySuccessfully": "Precios con impuestos incluidos actualizados exitosamente"
|
|
2472
2479
|
}
|
|
2473
2480
|
},
|
package/src/lib/order-helpers.ts
CHANGED
|
@@ -24,7 +24,7 @@ export const getOrderPaymentStatus = (
|
|
|
24
24
|
],
|
|
25
25
|
awaiting: [t("orders.payment.status.awaiting"), "orange"],
|
|
26
26
|
captured: [t("orders.payment.status.captured"), "green"],
|
|
27
|
-
refunded: [t("orders.payment.status.refunded"), "
|
|
27
|
+
refunded: [t("orders.payment.status.refunded"), "red"],
|
|
28
28
|
partially_refunded: [
|
|
29
29
|
t("orders.payment.status.partiallyRefunded"),
|
|
30
30
|
"orange",
|
|
@@ -13,7 +13,10 @@ import { DisplayIdCell } from "../../components/table/table-cells/order/display-
|
|
|
13
13
|
import { TotalCell } from "../../components/table/table-cells/order/total-cell"
|
|
14
14
|
import { MoneyAmountCell } from "../../components/table/table-cells/common/money-amount-cell"
|
|
15
15
|
import { TFunction } from "i18next"
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
getOrderPaymentStatus,
|
|
18
|
+
getOrderFulfillmentStatus,
|
|
19
|
+
} from "../order-helpers"
|
|
17
20
|
|
|
18
21
|
export type CellRenderer<TData = any> = (
|
|
19
22
|
value: any,
|
|
@@ -27,96 +30,104 @@ export type RendererRegistry = Map<string, CellRenderer>
|
|
|
27
30
|
const cellRenderers: RendererRegistry = new Map()
|
|
28
31
|
|
|
29
32
|
const getNestedValue = (obj: any, path: string) => {
|
|
30
|
-
return path.split(
|
|
33
|
+
return path.split(".").reduce((current, key) => current?.[key], obj)
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
const TextRenderer: CellRenderer = (value, _row, _column, _t) => {
|
|
34
|
-
if (value === null || value === undefined) return
|
|
37
|
+
if (value === null || value === undefined) return "-"
|
|
35
38
|
return String(value)
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
const CountRenderer: CellRenderer = (value, _row, _column, t) => {
|
|
39
42
|
const items = value || []
|
|
40
43
|
const count = Array.isArray(items) ? items.length : 0
|
|
41
|
-
return t(
|
|
44
|
+
return t("general.items", { count })
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
const StatusRenderer: CellRenderer = (value, row, column, t) => {
|
|
45
|
-
if (!value) return
|
|
48
|
+
if (!value) return "-"
|
|
46
49
|
|
|
47
|
-
if (
|
|
50
|
+
if (
|
|
51
|
+
column.field === "status" &&
|
|
52
|
+
row.status &&
|
|
53
|
+
(row.handle || row.is_giftcard !== undefined)
|
|
54
|
+
) {
|
|
48
55
|
return <ProductStatusCell status={row.status} />
|
|
49
56
|
}
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
if (column.context === "payment" && t) {
|
|
59
|
+
const { label, color } = getOrderPaymentStatus(t, value)
|
|
60
|
+
return <StatusBadge color={color}>{label}</StatusBadge>
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (column.context === "fulfillment" && t) {
|
|
64
|
+
const { label, color } = getOrderFulfillmentStatus(t, value)
|
|
65
|
+
return <StatusBadge color={color}>{label}</StatusBadge>
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Generic status badge for other status types
|
|
52
69
|
const getStatusColor = (status: string) => {
|
|
53
70
|
switch (status?.toLowerCase()) {
|
|
54
|
-
case
|
|
55
|
-
case
|
|
56
|
-
case
|
|
57
|
-
case
|
|
58
|
-
return
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
case
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
case
|
|
67
|
-
case
|
|
68
|
-
return
|
|
71
|
+
case "active":
|
|
72
|
+
case "published":
|
|
73
|
+
case "fulfilled":
|
|
74
|
+
case "paid":
|
|
75
|
+
return "green"
|
|
76
|
+
case "pending":
|
|
77
|
+
case "proposed":
|
|
78
|
+
case "processing":
|
|
79
|
+
return "orange"
|
|
80
|
+
case "draft":
|
|
81
|
+
return "grey"
|
|
82
|
+
case "rejected":
|
|
83
|
+
case "failed":
|
|
84
|
+
case "canceled":
|
|
85
|
+
return "red"
|
|
69
86
|
default:
|
|
70
|
-
return
|
|
87
|
+
return "grey"
|
|
71
88
|
}
|
|
72
89
|
}
|
|
73
90
|
|
|
74
91
|
// Use existing translation keys where available
|
|
75
|
-
const getTranslatedStatus = (status: string
|
|
92
|
+
const getTranslatedStatus = (status: string): string => {
|
|
76
93
|
if (!t) return status
|
|
77
94
|
|
|
78
95
|
const lowerStatus = status.toLowerCase()
|
|
79
|
-
const camelCaseStatus = toCamelCase(lowerStatus)
|
|
80
96
|
switch (lowerStatus) {
|
|
81
|
-
case
|
|
82
|
-
return t(
|
|
83
|
-
case
|
|
84
|
-
return t(
|
|
85
|
-
case
|
|
86
|
-
return t(
|
|
87
|
-
case
|
|
88
|
-
return t(
|
|
89
|
-
case
|
|
90
|
-
return t(
|
|
97
|
+
case "active":
|
|
98
|
+
return t("general.active", "Active") as string
|
|
99
|
+
case "published":
|
|
100
|
+
return t("products.productStatus.published", "Published") as string
|
|
101
|
+
case "draft":
|
|
102
|
+
return t("orders.status.draft", "Draft") as string
|
|
103
|
+
case "pending":
|
|
104
|
+
return t("orders.status.pending", "Pending") as string
|
|
105
|
+
case "canceled":
|
|
106
|
+
return t("orders.status.canceled", "Canceled") as string
|
|
91
107
|
default:
|
|
92
|
-
if (column.context === 'payment') {
|
|
93
|
-
return t(`orders.payment.status.${camelCaseStatus}`, status) as string
|
|
94
|
-
}
|
|
95
|
-
if (column.context === 'fulfillment') {
|
|
96
|
-
return t(`orders.fulfillment.status.${camelCaseStatus}`, status) as string
|
|
97
|
-
}
|
|
98
108
|
// Try generic status translation with fallback
|
|
99
109
|
return t(`status.${lowerStatus}`, status) as string
|
|
100
110
|
}
|
|
101
111
|
}
|
|
102
112
|
|
|
103
|
-
const translatedValue = getTranslatedStatus(value
|
|
113
|
+
const translatedValue = getTranslatedStatus(value)
|
|
104
114
|
|
|
105
115
|
return (
|
|
106
|
-
<StatusBadge color={getStatusColor(value)}>
|
|
107
|
-
{translatedValue}
|
|
108
|
-
</StatusBadge>
|
|
116
|
+
<StatusBadge color={getStatusColor(value)}>{translatedValue}</StatusBadge>
|
|
109
117
|
)
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
const BadgeListRenderer: CellRenderer = (value, row, column, t) => {
|
|
113
121
|
// For sales channels
|
|
114
|
-
if (
|
|
122
|
+
if (
|
|
123
|
+
column.field === "sales_channels_display" ||
|
|
124
|
+
column.field === "sales_channels"
|
|
125
|
+
) {
|
|
115
126
|
return <SalesChannelsCell salesChannels={row.sales_channels} />
|
|
116
127
|
}
|
|
117
128
|
|
|
118
129
|
// Generic badge list
|
|
119
|
-
if (!Array.isArray(value)) return
|
|
130
|
+
if (!Array.isArray(value)) return "-"
|
|
120
131
|
|
|
121
132
|
const items = value.slice(0, 2)
|
|
122
133
|
const remaining = value.length - 2
|
|
@@ -125,12 +136,16 @@ const BadgeListRenderer: CellRenderer = (value, row, column, t) => {
|
|
|
125
136
|
<div className="flex gap-1">
|
|
126
137
|
{items.map((item, index) => (
|
|
127
138
|
<Badge key={index} size="xsmall">
|
|
128
|
-
{typeof item ===
|
|
139
|
+
{typeof item === "string" ? item : item.name || item.title || "-"}
|
|
129
140
|
</Badge>
|
|
130
141
|
))}
|
|
131
142
|
{remaining > 0 && (
|
|
132
143
|
<Badge size="xsmall" color="grey">
|
|
133
|
-
{t
|
|
144
|
+
{t
|
|
145
|
+
? t("general.plusCountMore", "+ {{count}} more", {
|
|
146
|
+
count: remaining,
|
|
147
|
+
})
|
|
148
|
+
: `+${remaining}`}
|
|
134
149
|
</Badge>
|
|
135
150
|
)}
|
|
136
151
|
</div>
|
|
@@ -152,7 +167,9 @@ const VariantsRenderer: CellRenderer = (_, row, _column, _t) => {
|
|
|
152
167
|
// Order-specific renderers
|
|
153
168
|
const CustomerNameRenderer: CellRenderer = (_, row, _column, t) => {
|
|
154
169
|
if (row.customer?.first_name || row.customer?.last_name) {
|
|
155
|
-
const fullName = `${row.customer.first_name ||
|
|
170
|
+
const fullName = `${row.customer.first_name || ""} ${
|
|
171
|
+
row.customer.last_name || ""
|
|
172
|
+
}`.trim()
|
|
156
173
|
if (fullName) return fullName
|
|
157
174
|
}
|
|
158
175
|
|
|
@@ -166,20 +183,20 @@ const CustomerNameRenderer: CellRenderer = (_, row, _column, t) => {
|
|
|
166
183
|
return row.customer.phone
|
|
167
184
|
}
|
|
168
185
|
|
|
169
|
-
return t ? t(
|
|
186
|
+
return t ? t("customers.guest", "Guest") : "Guest"
|
|
170
187
|
}
|
|
171
188
|
|
|
172
189
|
const AddressSummaryRenderer: CellRenderer = (_, row, column, _t) => {
|
|
173
190
|
let address = null
|
|
174
|
-
if (column.field ===
|
|
191
|
+
if (column.field === "shipping_address_display") {
|
|
175
192
|
address = row.shipping_address
|
|
176
|
-
} else if (column.field ===
|
|
193
|
+
} else if (column.field === "billing_address_display") {
|
|
177
194
|
address = row.billing_address
|
|
178
195
|
} else {
|
|
179
196
|
address = row.shipping_address || row.billing_address
|
|
180
197
|
}
|
|
181
198
|
|
|
182
|
-
if (!address) return
|
|
199
|
+
if (!address) return "-"
|
|
183
200
|
|
|
184
201
|
const parts = []
|
|
185
202
|
|
|
@@ -193,14 +210,14 @@ const AddressSummaryRenderer: CellRenderer = (_, row, column, _t) => {
|
|
|
193
210
|
if (address.postal_code) locationParts.push(address.postal_code)
|
|
194
211
|
|
|
195
212
|
if (locationParts.length > 0) {
|
|
196
|
-
parts.push(locationParts.join(
|
|
213
|
+
parts.push(locationParts.join(", "))
|
|
197
214
|
}
|
|
198
215
|
|
|
199
216
|
if (address.country_code) {
|
|
200
217
|
parts.push(address.country_code.toUpperCase())
|
|
201
218
|
}
|
|
202
219
|
|
|
203
|
-
return parts.join(
|
|
220
|
+
return parts.join(" • ") || "-"
|
|
204
221
|
}
|
|
205
222
|
|
|
206
223
|
const CountryCodeRenderer: CellRenderer = (_, row, _column, _t) => {
|
|
@@ -239,36 +256,38 @@ const DisplayIdRenderer: CellRenderer = (value, _row, _column, _t) => {
|
|
|
239
256
|
}
|
|
240
257
|
|
|
241
258
|
const CurrencyRenderer: CellRenderer = (value, row, _column, _t) => {
|
|
242
|
-
const currencyCode = row.currency_code ||
|
|
243
|
-
return
|
|
259
|
+
const currencyCode = row.currency_code || "USD"
|
|
260
|
+
return (
|
|
261
|
+
<MoneyAmountCell currencyCode={currencyCode} amount={value} align="right" />
|
|
262
|
+
)
|
|
244
263
|
}
|
|
245
264
|
|
|
246
265
|
const TotalRenderer: CellRenderer = (value, row, _column, _t) => {
|
|
247
|
-
const currencyCode = row.currency_code ||
|
|
266
|
+
const currencyCode = row.currency_code || "USD"
|
|
248
267
|
return <TotalCell currencyCode={currencyCode} total={value} />
|
|
249
268
|
}
|
|
250
269
|
|
|
251
270
|
// Register built-in renderers
|
|
252
|
-
cellRenderers.set(
|
|
253
|
-
cellRenderers.set(
|
|
254
|
-
cellRenderers.set(
|
|
255
|
-
cellRenderers.set(
|
|
256
|
-
cellRenderers.set(
|
|
257
|
-
cellRenderers.set(
|
|
258
|
-
cellRenderers.set(
|
|
259
|
-
cellRenderers.set(
|
|
271
|
+
cellRenderers.set("text", TextRenderer)
|
|
272
|
+
cellRenderers.set("count", CountRenderer)
|
|
273
|
+
cellRenderers.set("status", StatusRenderer)
|
|
274
|
+
cellRenderers.set("badge_list", BadgeListRenderer)
|
|
275
|
+
cellRenderers.set("date", DateRenderer)
|
|
276
|
+
cellRenderers.set("timestamp", DateRenderer)
|
|
277
|
+
cellRenderers.set("currency", CurrencyRenderer)
|
|
278
|
+
cellRenderers.set("total", TotalRenderer)
|
|
260
279
|
|
|
261
280
|
// Register product-specific renderers
|
|
262
|
-
cellRenderers.set(
|
|
263
|
-
cellRenderers.set(
|
|
264
|
-
cellRenderers.set(
|
|
265
|
-
cellRenderers.set(
|
|
281
|
+
cellRenderers.set("product_info", ProductInfoRenderer)
|
|
282
|
+
cellRenderers.set("collection", CollectionRenderer)
|
|
283
|
+
cellRenderers.set("variants", VariantsRenderer)
|
|
284
|
+
cellRenderers.set("sales_channels_list", BadgeListRenderer)
|
|
266
285
|
|
|
267
286
|
// Register order-specific renderers
|
|
268
|
-
cellRenderers.set(
|
|
269
|
-
cellRenderers.set(
|
|
270
|
-
cellRenderers.set(
|
|
271
|
-
cellRenderers.set(
|
|
287
|
+
cellRenderers.set("customer_name", CustomerNameRenderer)
|
|
288
|
+
cellRenderers.set("address_summary", AddressSummaryRenderer)
|
|
289
|
+
cellRenderers.set("country_code", CountryCodeRenderer)
|
|
290
|
+
cellRenderers.set("display_id", DisplayIdRenderer)
|
|
272
291
|
|
|
273
292
|
export function getCellRenderer(
|
|
274
293
|
renderType?: string,
|
|
@@ -279,21 +298,21 @@ export function getCellRenderer(
|
|
|
279
298
|
}
|
|
280
299
|
|
|
281
300
|
switch (dataType) {
|
|
282
|
-
case
|
|
283
|
-
case
|
|
301
|
+
case "number":
|
|
302
|
+
case "string":
|
|
284
303
|
return TextRenderer
|
|
285
|
-
case
|
|
304
|
+
case "date":
|
|
286
305
|
return DateRenderer
|
|
287
|
-
case
|
|
306
|
+
case "boolean":
|
|
288
307
|
return (value, _row, _column, t) => {
|
|
289
308
|
if (t) {
|
|
290
|
-
return value ? t(
|
|
309
|
+
return value ? t("fields.yes", "Yes") : t("fields.no", "No")
|
|
291
310
|
}
|
|
292
|
-
return value ?
|
|
311
|
+
return value ? "Yes" : "No"
|
|
293
312
|
}
|
|
294
|
-
case
|
|
313
|
+
case "enum":
|
|
295
314
|
return StatusRenderer
|
|
296
|
-
case
|
|
315
|
+
case "currency":
|
|
297
316
|
return CurrencyRenderer
|
|
298
317
|
default:
|
|
299
318
|
return TextRenderer
|