@medusajs/dashboard 3.0.0-snapshot-20251211181725 → 3.0.0-snapshot-20251212092246
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-PHAHMGXP.mjs → add-campaign-promotions-JQKPED4U.mjs} +2 -2
- package/dist/{adjust-inventory-I5VYMAI4.mjs → adjust-inventory-2MFA656V.mjs} +2 -2
- package/dist/{api-key-management-create-CVRFY4PL.mjs → api-key-management-create-ZUVF3SLR.mjs} +2 -2
- package/dist/{api-key-management-detail-G7O7TDPW.mjs → api-key-management-detail-I45X6X64.mjs} +6 -6
- package/dist/{api-key-management-edit-JMU3WEPX.mjs → api-key-management-edit-42HNUSXL.mjs} +2 -2
- package/dist/{api-key-management-sales-channels-4OU5VGIG.mjs → api-key-management-sales-channels-7FVABESO.mjs} +2 -2
- package/dist/app.css +0 -35
- package/dist/app.js +12062 -13079
- package/dist/app.mjs +4 -4
- package/dist/{campaign-budget-edit-B5MSE26J.mjs → campaign-budget-edit-6DMZGUCI.mjs} +2 -2
- package/dist/{campaign-configuration-QOE3D2BE.mjs → campaign-configuration-UNFRB5HR.mjs} +2 -2
- package/dist/{campaign-create-FJOECKGT.mjs → campaign-create-QXG7PD3S.mjs} +3 -3
- package/dist/{campaign-detail-I2N5WUEC.mjs → campaign-detail-P3CSDHZN.mjs} +3 -3
- package/dist/{campaign-edit-K2POQH7M.mjs → campaign-edit-HN4US7DV.mjs} +2 -2
- package/dist/{categories-metadata-DNVBNWAJ.mjs → categories-metadata-BCZ463KN.mjs} +6 -6
- package/dist/{category-create-L2KJCHPO.mjs → category-create-FFIBWXAH.mjs} +2 -2
- package/dist/{category-detail-XEFMQSZG.mjs → category-detail-VDUHW3QT.mjs} +8 -24
- package/dist/{category-edit-U6SLZSAX.mjs → category-edit-74MZ6TXN.mjs} +2 -2
- package/dist/{category-list-W7JW4PWA.mjs → category-list-AH2EGTI7.mjs} +1 -16
- package/dist/{category-organize-LLSVAO3U.mjs → category-organize-B6EFBFKB.mjs} +2 -2
- package/dist/{category-products-LF7P7MBF.mjs → category-products-VOD3XRPG.mjs} +8 -8
- package/dist/{chunk-RKUXD6IZ.mjs → chunk-25UWYEJX.mjs} +1 -1
- package/dist/chunk-35LSPN2U.mjs +66 -0
- package/dist/{chunk-BZKI5J2M.mjs → chunk-3YPRDSZ6.mjs} +1 -1
- package/dist/{chunk-D6UW7URG.mjs → chunk-42OOM4DJ.mjs} +6 -23
- package/dist/{chunk-FPBKWWSI.mjs → chunk-4YAPXPLM.mjs} +1 -1
- package/dist/{chunk-EQBVGH3N.mjs → chunk-B3AOQW2B.mjs} +1 -1
- package/dist/{chunk-N3SAXQVR.mjs → chunk-D4J3CEWH.mjs} +2 -2
- package/dist/{chunk-PS5T2R6J.mjs → chunk-EI27JC4V.mjs} +3 -3
- package/dist/{chunk-F5I264Q3.mjs → chunk-EQTBJSBZ.mjs} +0 -3
- package/dist/{chunk-4VNR7DND.mjs → chunk-F5NZDW7L.mjs} +2 -2
- package/dist/{chunk-JJGE3EV6.mjs → chunk-F63F3FIT.mjs} +2 -2
- package/dist/{chunk-DCYB22MH.mjs → chunk-HFT7Q5Y5.mjs} +1 -1
- package/dist/{chunk-I6C52ARQ.mjs → chunk-HWKLNKOY.mjs} +1 -1
- package/dist/{chunk-LCEKY54O.mjs → chunk-KF7ZWW4K.mjs} +2 -2
- package/dist/{chunk-YIOBBZUB.mjs → chunk-L4NOVTH5.mjs} +2 -2
- package/dist/{chunk-DS5IRNJY.mjs → chunk-LHNU4DYZ.mjs} +2 -2
- package/dist/{chunk-7GJ5T4R3.mjs → chunk-M4Z2YEYB.mjs} +9 -9
- package/dist/{chunk-R2EBIESZ.mjs → chunk-MY6I7UJG.mjs} +1 -1
- package/dist/{chunk-3BJLNORD.mjs → chunk-PNPT4W2F.mjs} +1 -1
- package/dist/{chunk-6GLZIACV.mjs → chunk-Q6MSICBU.mjs} +1 -1
- package/dist/{chunk-3ESSTIV2.mjs → chunk-QPKW37WR.mjs} +13 -188
- package/dist/{chunk-GN6OCHP4.mjs → chunk-RU4ZS47V.mjs} +11 -1
- package/dist/{chunk-UEJOY5PF.mjs → chunk-SKA4AJO4.mjs} +3 -3
- package/dist/{chunk-CFQNWTZV.mjs → chunk-UM4OIJZ3.mjs} +1 -1
- package/dist/{chunk-ZADXDNB3.mjs → chunk-UWBENEHD.mjs} +202 -234
- package/dist/{chunk-FEB3ZGTL.mjs → chunk-W7SLPIO2.mjs} +17 -214
- package/dist/{chunk-WVA4O7QS.mjs → chunk-XXBP2Z5M.mjs} +1 -1
- package/dist/{chunk-AFXODJBA.mjs → chunk-YAPTGHGP.mjs} +1 -1
- package/dist/{chunk-HPPR6PXK.mjs → chunk-YWLAUILP.mjs} +4 -4
- package/dist/{chunk-FIFVOKTK.mjs → chunk-Z6NHG5LQ.mjs} +1 -1
- package/dist/{collection-add-products-EM7SAFEH.mjs → collection-add-products-P5B564HQ.mjs} +8 -8
- package/dist/{collection-create-4JX4YE47.mjs → collection-create-DCRW344Z.mjs} +2 -2
- package/dist/{collection-detail-UQXMMKRW.mjs → collection-detail-PCL3HYPB.mjs} +7 -22
- package/dist/{collection-edit-MXL35GQQ.mjs → collection-edit-UNFEW6HT.mjs} +2 -2
- package/dist/{collection-list-EO56ZH4Q.mjs → collection-list-ANPFZOFP.mjs} +14 -29
- package/dist/{collection-metadata-UXEYXJY4.mjs → collection-metadata-P4A5DXBQ.mjs} +6 -6
- package/dist/{customer-create-IA56MXE6.mjs → customer-create-XCLZENJS.mjs} +2 -2
- package/dist/{customer-create-address-27M25HTO.mjs → customer-create-address-4HZUIAM7.mjs} +2 -2
- package/dist/{customer-detail-OD5I5YWW.mjs → customer-detail-ENPJO3DW.mjs} +6 -6
- package/dist/{customer-edit-XQ5NWIVX.mjs → customer-edit-BW5GVTQI.mjs} +2 -2
- package/dist/{customer-group-add-customers-FRJP6RCY.mjs → customer-group-add-customers-A7OGFFJ4.mjs} +5 -5
- package/dist/{customer-group-create-RY4FVEIW.mjs → customer-group-create-6YV7W6TI.mjs} +2 -2
- package/dist/{customer-group-detail-SOWUWFJ4.mjs → customer-group-detail-DVNRFZX5.mjs} +6 -6
- package/dist/{customer-group-edit-MQWARIQZ.mjs → customer-group-edit-7NXU34BQ.mjs} +2 -2
- package/dist/{customer-group-list-A5LER6CN.mjs → customer-group-list-P2QX5AO4.mjs} +3 -3
- package/dist/{customer-group-metadata-JQJRLLXG.mjs → customer-group-metadata-WK2BGEGO.mjs} +3 -3
- package/dist/{customer-metadata-HN2DYD5I.mjs → customer-metadata-ZUWCUTM7.mjs} +3 -3
- package/dist/{customers-add-customer-group-75EEIDW6.mjs → customers-add-customer-group-RVR476OP.mjs} +8 -8
- package/dist/{edit-inventory-item-RATTNP2Y.mjs → edit-inventory-item-Y5W6VTHJ.mjs} +2 -2
- package/dist/{edit-inventory-item-attributes-JHH5GSNL.mjs → edit-inventory-item-attributes-NAAZDFEJ.mjs} +2 -2
- package/dist/{edit-reservation-UZCSNLHY.mjs → edit-reservation-2UD4RZJX.mjs} +2 -2
- package/dist/{edit-rules-IKV4MGHV.mjs → edit-rules-2W3BXEXR.mjs} +5 -5
- package/dist/en.json +12 -12
- package/dist/{inventory-create-DBD7EA7N.mjs → inventory-create-VQEK7C5T.mjs} +6 -6
- package/dist/{inventory-detail-Q2HAUD2Y.mjs → inventory-detail-UYDDNO24.mjs} +3 -3
- package/dist/{inventory-metadata-NQXJBGAQ.mjs → inventory-metadata-X52VGHA7.mjs} +6 -6
- package/dist/{inventory-stock-WAZ7CXTY.mjs → inventory-stock-EKTOYN2F.mjs} +7 -7
- package/dist/{invite-WISVECE2.mjs → invite-VKHAAF4Z.mjs} +2 -3
- package/dist/{location-create-WZ43K3W7.mjs → location-create-RPLEXUZR.mjs} +2 -2
- package/dist/{location-detail-2LKEMZ3X.mjs → location-detail-UVWYE6Q2.mjs} +9 -11
- package/dist/{location-edit-VCS7GVWQ.mjs → location-edit-L4ISEQHX.mjs} +2 -2
- package/dist/{location-fulfillment-providers-6WNUCXQL.mjs → location-fulfillment-providers-3BGI2NNW.mjs} +6 -6
- package/dist/{location-list-UK3WRDL5.mjs → location-list-Z42ZYHUF.mjs} +2 -3
- package/dist/{location-sales-channels-NKNM5TQK.mjs → location-sales-channels-YMABMECM.mjs} +2 -2
- package/dist/{location-service-zone-create-3FWF3DG5.mjs → location-service-zone-create-NSMZCD5N.mjs} +3 -3
- package/dist/{location-service-zone-edit-KHHMSPXD.mjs → location-service-zone-edit-6OUAFEZD.mjs} +2 -2
- package/dist/{location-service-zone-manage-areas-YFEAZUUN.mjs → location-service-zone-manage-areas-SEC6LKCZ.mjs} +3 -3
- package/dist/{location-service-zone-shipping-option-create-DSLYSNY4.mjs → location-service-zone-shipping-option-create-M7G4SKNP.mjs} +7 -7
- package/dist/{location-service-zone-shipping-option-edit-QCURIIGL.mjs → location-service-zone-shipping-option-edit-M2HJAASG.mjs} +5 -5
- package/dist/{location-service-zone-shipping-option-pricing-Z5IFOLFJ.mjs → location-service-zone-shipping-option-pricing-23QLNSBT.mjs} +4 -4
- package/dist/{login-2DAZRDSC.mjs → login-NSCAMAU6.mjs} +5 -6
- package/dist/{manage-locations-MLNMPQ5I.mjs → manage-locations-JD6FSBOT.mjs} +2 -2
- package/dist/{order-allocate-items-I5KMPZY5.mjs → order-allocate-items-5T57NZOB.mjs} +3 -3
- package/dist/{order-create-claim-E543W2TJ.mjs → order-create-claim-JLCXZNHU.mjs} +7 -7
- package/dist/{order-create-edit-HDWLEUKF.mjs → order-create-edit-QB6LIWSF.mjs} +6 -6
- package/dist/{order-create-exchange-HBQWTMXR.mjs → order-create-exchange-GOU4AJXP.mjs} +13 -13
- package/dist/{order-create-fulfillment-PN3HLLB2.mjs → order-create-fulfillment-SRRP6X64.mjs} +5 -5
- package/dist/{order-create-refund-EC7XRI5O.mjs → order-create-refund-PTOM65QK.mjs} +5 -5
- package/dist/{order-create-return-LTGYASZZ.mjs → order-create-return-3EOY7TOC.mjs} +4 -4
- package/dist/{order-create-shipment-CPEAPIJU.mjs → order-create-shipment-HNILNFXB.mjs} +5 -5
- package/dist/{order-detail-MPNBAUUI.mjs → order-detail-BCBUUVU7.mjs} +11 -11
- package/dist/{order-edit-billing-address-KMV6RJ6F.mjs → order-edit-billing-address-3IO7GXIK.mjs} +5 -5
- package/dist/{order-edit-email-377D6O22.mjs → order-edit-email-QIAEOUBV.mjs} +5 -5
- package/dist/{order-edit-shipping-address-HEFMKAJP.mjs → order-edit-shipping-address-QGGMHGBC.mjs} +5 -5
- package/dist/order-export-LPAWHHSK.mjs +121 -0
- package/dist/{order-list-QOYJFYD5.mjs → order-list-Y4FET3XV.mjs} +38 -82
- package/dist/{order-metadata-QABOWLXK.mjs → order-metadata-ZBDTMBHZ.mjs} +6 -6
- package/dist/{order-receive-return-4WFBZ2T7.mjs → order-receive-return-V42FTCFY.mjs} +6 -6
- package/dist/{order-request-transfer-ISZSSGKO.mjs → order-request-transfer-A6NNIN2O.mjs} +5 -5
- package/dist/{price-list-configuration-WZFAJ7ZM.mjs → price-list-configuration-54D4JW6G.mjs} +4 -4
- package/dist/{price-list-create-DQFXQ247.mjs → price-list-create-5DI6QXFL.mjs} +15 -15
- package/dist/{price-list-detail-WWJPFIT2.mjs → price-list-detail-7XY3MDV5.mjs} +6 -6
- package/dist/{price-list-edit-I5QNCWJP.mjs → price-list-edit-SW7YIR3Z.mjs} +2 -2
- package/dist/{price-list-prices-add-6BCDF4DE.mjs → price-list-prices-add-UA2DT4AM.mjs} +10 -10
- package/dist/{price-list-prices-edit-Z4YJ4YBY.mjs → price-list-prices-edit-C6SX2TLJ.mjs} +4 -4
- package/dist/{product-attributes-RKEXUYKR.mjs → product-attributes-4AEBLFIM.mjs} +6 -6
- package/dist/{product-create-S7YVI2MR.mjs → product-create-TGR3I2H2.mjs} +7 -7
- package/dist/{product-create-option-UMZKRNTC.mjs → product-create-option-GEGQNSMQ.mjs} +2 -2
- package/dist/{product-create-variant-JRKDSU6D.mjs → product-create-variant-WI6D5CDG.mjs} +6 -6
- package/dist/{product-detail-G7ZVDV46.mjs → product-detail-YLYXIRRB.mjs} +10 -52
- package/dist/{product-edit-CMHKUDQP.mjs → product-edit-ALZUODMD.mjs} +6 -6
- package/dist/{product-edit-option-ZMTSLRG5.mjs → product-edit-option-HBIOBQTS.mjs} +2 -2
- package/dist/{product-export-H7KYYMGI.mjs → product-export-CPL66H6S.mjs} +15 -15
- package/dist/{product-image-variants-edit-HU6NVV6T.mjs → product-image-variants-edit-X3LUMPLJ.mjs} +5 -5
- package/dist/{product-import-5PKTI7YC.mjs → product-import-43UXKCL3.mjs} +5 -5
- package/dist/{product-list-ABFSFWKV.mjs → product-list-47T2IZ3F.mjs} +7 -19
- package/dist/{product-media-ULNJ7JJY.mjs → product-media-EGK66SRX.mjs} +2 -2
- package/dist/{product-metadata-GHL5HV37.mjs → product-metadata-55CAQTPS.mjs} +6 -6
- package/dist/{product-organization-Z7SXABDX.mjs → product-organization-KHZELN3F.mjs} +6 -6
- package/dist/{product-prices-5WCCQDS6.mjs → product-prices-WQDE4XYT.mjs} +3 -3
- package/dist/{product-sales-channels-2PN4L7II.mjs → product-sales-channels-ZICOOOKY.mjs} +2 -2
- package/dist/{product-shipping-profile-45XXB7FM.mjs → product-shipping-profile-KIDRTPWA.mjs} +2 -2
- package/dist/{product-stock-NHC7WD6Z.mjs → product-stock-22S2HGMM.mjs} +7 -7
- package/dist/{product-tag-create-MQ6AUCQM.mjs → product-tag-create-7GPE246H.mjs} +5 -5
- package/dist/{product-tag-detail-CGURSGJE.mjs → product-tag-detail-BQG2LJK6.mjs} +16 -31
- package/dist/{product-tag-edit-TOJYTW4H.mjs → product-tag-edit-WA6FGSIP.mjs} +5 -5
- package/dist/{product-tag-list-2U4CIGK5.mjs → product-tag-list-PW7WDCQH.mjs} +16 -31
- package/dist/{product-tag-metadata-JMFWGTR3.mjs → product-tag-metadata-EJ7FEXSE.mjs} +6 -6
- package/dist/{product-type-create-KHSNCQCV.mjs → product-type-create-HBDROTGB.mjs} +2 -2
- package/dist/{product-type-detail-UY6Y3T3G.mjs → product-type-detail-TJQS4BVU.mjs} +7 -22
- package/dist/{product-type-edit-3LRBWZ3S.mjs → product-type-edit-H3JCMVRV.mjs} +2 -2
- package/dist/{product-type-list-XU6DADMO.mjs → product-type-list-7WQ5D2KV.mjs} +4 -19
- package/dist/{product-type-metadata-EGMTZ622.mjs → product-type-metadata-Q6W5GL7Z.mjs} +6 -6
- package/dist/{product-variant-detail-5EKVJXUT.mjs → product-variant-detail-LYGQDASG.mjs} +5 -21
- package/dist/{product-variant-edit-KKLHPWXO.mjs → product-variant-edit-BW7QMHC5.mjs} +5 -5
- package/dist/{product-variant-manage-inventory-items-OGM64KYP.mjs → product-variant-manage-inventory-items-BLHCH6QD.mjs} +2 -2
- package/dist/{product-variant-media-C3KCFODU.mjs → product-variant-media-KLSUISGH.mjs} +2 -2
- package/dist/{product-variant-metadata-LBOIYBBF.mjs → product-variant-metadata-GDMVC4MZ.mjs} +6 -6
- package/dist/{profile-edit-YZCUGEXF.mjs → profile-edit-5EEKOEO5.mjs} +2 -2
- package/dist/{promotion-add-campaign-DO67QK6M.mjs → promotion-add-campaign-JRTM7WBR.mjs} +3 -3
- package/dist/{promotion-create-U6CJPBYU.mjs → promotion-create-HF6DTKCC.mjs} +12 -12
- package/dist/{promotion-detail-BYXN4YXZ.mjs → promotion-detail-MDVDMQUM.mjs} +3 -3
- package/dist/{promotion-edit-details-6BSOOWQN.mjs → promotion-edit-details-AREFQ6O5.mjs} +2 -2
- package/dist/{refund-reason-create-TFC4T4GK.mjs → refund-reason-create-RKIH46D6.mjs} +5 -5
- package/dist/{refund-reason-edit-WTM7WR5V.mjs → refund-reason-edit-V3KC6NMO.mjs} +5 -5
- package/dist/{refund-reason-list-7Q6WDYH6.mjs → refund-reason-list-FR7POQS5.mjs} +4 -4
- package/dist/{region-add-countries-7U4J5RW6.mjs → region-add-countries-AFWXMQ6W.mjs} +2 -2
- package/dist/{region-create-IUGX33M5.mjs → region-create-YC4VZ4AS.mjs} +2 -2
- package/dist/{region-edit-WAU347DP.mjs → region-edit-5GO25GDF.mjs} +2 -2
- package/dist/{region-metadata-EGOMWMMB.mjs → region-metadata-5NGUNAXZ.mjs} +6 -6
- package/dist/{reservation-create-C6HTEF3R.mjs → reservation-create-Z2SUMBGT.mjs} +2 -2
- package/dist/{reservation-detail-FYS6LFU6.mjs → reservation-detail-JH77TQHN.mjs} +3 -3
- package/dist/{reservation-metadata-LZJV35OW.mjs → reservation-metadata-ERCWXYVL.mjs} +6 -6
- package/dist/{reset-password-XKX43KUT.mjs → reset-password-5TAYQEUV.mjs} +2 -3
- package/dist/{return-reason-create-HM54WRJY.mjs → return-reason-create-NXWDC6AC.mjs} +2 -2
- package/dist/{return-reason-edit-VSIRHVQ6.mjs → return-reason-edit-M6IKNNKB.mjs} +2 -2
- package/dist/return-reason-list-IFFIDA5O.mjs +1 -1
- package/dist/{sales-channel-add-products-XPS4JTBL.mjs → sales-channel-add-products-SPGDWA44.mjs} +8 -8
- package/dist/{sales-channel-create-4XLJDVJO.mjs → sales-channel-create-E7BDTPWD.mjs} +2 -2
- package/dist/{sales-channel-detail-5YUELAQ5.mjs → sales-channel-detail-D7VNPSCN.mjs} +6 -6
- package/dist/{sales-channel-edit-UZGSXD5X.mjs → sales-channel-edit-HMPA3Y3L.mjs} +2 -2
- package/dist/{sales-channel-list-N3KDOVBS.mjs → sales-channel-list-QGWQVXVW.mjs} +3 -3
- package/dist/{sales-channel-metadata-MU4BVKOJ.mjs → sales-channel-metadata-CMZN74K7.mjs} +6 -6
- package/dist/{shipping-option-type-create-AS4AVWZV.mjs → shipping-option-type-create-4BN2GBHP.mjs} +5 -5
- package/dist/{shipping-option-type-detail-MCFL4BJE.mjs → shipping-option-type-detail-YB3TCED2.mjs} +4 -4
- package/dist/{shipping-option-type-edit-PJOD3TA4.mjs → shipping-option-type-edit-MDO7ALAU.mjs} +5 -5
- package/dist/{shipping-option-type-list-VD567MQD.mjs → shipping-option-type-list-6TPD3AMM.mjs} +4 -4
- package/dist/{shipping-profile-create-26R64I3Z.mjs → shipping-profile-create-752TMBBE.mjs} +2 -2
- package/dist/{shipping-profile-metadata-6MHI75CB.mjs → shipping-profile-metadata-HQI7PCPU.mjs} +6 -6
- package/dist/{store-add-currencies-ZFS3WZHG.mjs → store-add-currencies-3VMLZ6KB.mjs} +2 -2
- package/dist/{store-add-locales-ERJXWD4L.mjs → store-add-locales-XJJCEO6Q.mjs} +4 -4
- package/dist/{store-detail-EGDXIVWC.mjs → store-detail-DNK76PXP.mjs} +3 -3
- package/dist/{store-edit-AB5CDUTK.mjs → store-edit-EPAHLLKP.mjs} +2 -2
- package/dist/{store-metadata-ZBUQ62YT.mjs → store-metadata-ZJD23O4D.mjs} +6 -6
- package/dist/{tax-region-create-N4YVNQKV.mjs → tax-region-create-NCO2OQ3I.mjs} +5 -5
- package/dist/{tax-region-detail-UJASYH57.mjs → tax-region-detail-C42CLE64.mjs} +22 -23
- package/dist/{tax-region-edit-W3B5EUCJ.mjs → tax-region-edit-YZALLSZY.mjs} +5 -5
- package/dist/{tax-region-list-4MQMCMKY.mjs → tax-region-list-BXZBUXRJ.mjs} +3 -4
- package/dist/{tax-region-province-create-GKJ7WMRS.mjs → tax-region-province-create-5JP3PVID.mjs} +2 -2
- package/dist/{tax-region-province-detail-K4PDPHXP.mjs → tax-region-province-detail-G2DPC6XM.mjs} +21 -22
- package/dist/{tax-region-tax-override-create-NUI4Z76X.mjs → tax-region-tax-override-create-WIVKENVO.mjs} +16 -16
- package/dist/{tax-region-tax-override-edit-Q4GJHUMJ.mjs → tax-region-tax-override-edit-UDEO3UIY.mjs} +17 -17
- package/dist/{tax-region-tax-rate-create-MECFGVPL.mjs → tax-region-tax-rate-create-O2SDSXCH.mjs} +2 -2
- package/dist/{tax-region-tax-rate-edit-7DYSPYOD.mjs → tax-region-tax-rate-edit-W62VEVKT.mjs} +2 -2
- package/dist/{user-edit-ZBB4RMTP.mjs → user-edit-LXQCTDGA.mjs} +2 -2
- package/dist/{user-invite-XB635N26.mjs → user-invite-2OKB7SCF.mjs} +2 -2
- package/dist/{user-metadata-2FTA4EB3.mjs → user-metadata-4WOICEE7.mjs} +6 -6
- package/dist/{workflow-execution-detail-MGIZSKVA.mjs → workflow-execution-detail-OKM6P4SX.mjs} +3 -3
- package/package.json +9 -9
- package/src/components/common/icon-avatar/icon-avatar.tsx +0 -4
- package/src/components/data-grid/components/index.ts +0 -1
- package/src/components/data-grid/data-grid.tsx +0 -2
- package/src/components/layout/settings-layout/settings-layout.tsx +1 -11
- package/src/components/modals/route-focus-modal/route-focus-modal.tsx +3 -8
- package/src/components/modals/route-modal-form/route-modal-form.tsx +1 -6
- package/src/components/modals/route-modal-provider/route-provider.tsx +4 -16
- package/src/dashboard-app/routes/get-route.map.tsx +6 -20
- package/src/hooks/api/index.ts +0 -1
- package/src/hooks/api/orders.tsx +18 -1
- package/src/hooks/api/product-variants.tsx +1 -7
- package/src/i18n/translations/$schema.json +40 -36
- package/src/i18n/translations/en.json +12 -12
- package/src/i18n/translations/es.json +0 -12
- package/src/routes/categories/category-detail/components/category-general-section/category-general-section.tsx +1 -16
- package/src/routes/categories/category-list/components/category-list-table/category-list-table.tsx +1 -16
- package/src/routes/collections/collection-detail/components/collection-general-section/collection-general-section.tsx +1 -16
- package/src/routes/collections/collection-list/components/collection-list-table/collection-row-actions.tsx +1 -16
- package/src/routes/orders/order-export/components/export-filters.tsx +22 -0
- package/src/routes/orders/order-export/index.ts +1 -0
- package/src/routes/orders/order-export/order-export.tsx +66 -0
- package/src/routes/orders/order-list/components/order-list-table/configurable-order-list-table.tsx +14 -6
- package/src/routes/orders/order-list/components/order-list-table/order-list-table.tsx +8 -2
- package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/product-tag-general-section.tsx +1 -16
- package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/product-tag-list-table.tsx +1 -16
- package/src/routes/product-types/product-type-detail/components/product-type-general-section/product-type-general-section.tsx +1 -16
- package/src/routes/product-types/product-type-list/components/product-type-list-table/product-table-row-actions.tsx +1 -16
- package/src/routes/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx +1 -16
- package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +1 -16
- package/src/routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +1 -32
- package/src/routes/products/product-list/components/product-list-table/product-list-table.tsx +1 -15
- package/dist/chunk-4Y2NYEXF.mjs +0 -0
- package/dist/chunk-JQBWAJQZ.mjs +0 -0
- package/dist/translation-list-5ZOAGLCT.mjs +0 -146
- package/dist/translations-edit-QPJLE55N.mjs +0 -390
- package/src/components/data-grid/components/data-grid-textarea-modal-cell.tsx +0 -233
- package/src/hooks/api/translations.tsx +0 -254
- package/src/routes/translations/translation-list/index.tsx +0 -1
- package/src/routes/translations/translation-list/translation-list.tsx +0 -131
- package/src/routes/translations/translations-edit/components/translations-edit-form/index.ts +0 -1
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +0 -423
- package/src/routes/translations/translations-edit/index.ts +0 -1
- package/src/routes/translations/translations-edit/translations-edit.tsx +0 -67
- package/src/routes/translations/translations-edit/utils/index.ts +0 -1
- package/src/routes/translations/translations-edit/utils/reference-label-map.ts +0 -10
- package/dist/{chunk-CTUJXJYA.mjs → chunk-6WKBBTKM.mjs} +0 -0
- package/dist/{customer-list-ZXCGIXJC.mjs → customer-list-TG4D4QOT.mjs} +3 -3
- package/dist/{region-list-XQRIBDMF.mjs → region-list-JAQXIBYD.mjs} +3 -3
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { clx, Textarea } from "@medusajs/ui"
|
|
2
|
-
import { Popover as RadixPopover } from "radix-ui"
|
|
3
|
-
import { useCallback, useEffect, useRef, useState } from "react"
|
|
4
|
-
import { Controller, ControllerRenderProps } from "react-hook-form"
|
|
5
|
-
|
|
6
|
-
import { useCombinedRefs } from "../../../hooks/use-combined-refs"
|
|
7
|
-
import { useDataGridCell, useDataGridCellError } from "../hooks"
|
|
8
|
-
import { useDataGridContext } from "../context"
|
|
9
|
-
import { DataGridCellProps, InputProps, DataGridCellContext } from "../types"
|
|
10
|
-
import { DataGridCellContainer } from "./data-grid-cell-container"
|
|
11
|
-
|
|
12
|
-
type DataGridExpandableTextCellProps<TData, TValue = any> = DataGridCellProps<
|
|
13
|
-
TData,
|
|
14
|
-
TValue
|
|
15
|
-
> & {
|
|
16
|
-
fieldLabel?: string
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const DataGridExpandableTextCell = <TData, TValue = any>({
|
|
20
|
-
context,
|
|
21
|
-
fieldLabel,
|
|
22
|
-
}: DataGridExpandableTextCellProps<TData, TValue>) => {
|
|
23
|
-
const { field, control, renderProps } = useDataGridCell({
|
|
24
|
-
context,
|
|
25
|
-
})
|
|
26
|
-
const errorProps = useDataGridCellError({ context })
|
|
27
|
-
|
|
28
|
-
const { container, input } = renderProps
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Controller
|
|
32
|
-
control={control}
|
|
33
|
-
name={field}
|
|
34
|
-
render={({ field }) => {
|
|
35
|
-
return (
|
|
36
|
-
<Inner
|
|
37
|
-
field={field}
|
|
38
|
-
inputProps={input}
|
|
39
|
-
fieldLabel={fieldLabel}
|
|
40
|
-
container={container}
|
|
41
|
-
errorProps={errorProps}
|
|
42
|
-
/>
|
|
43
|
-
)
|
|
44
|
-
}}
|
|
45
|
-
/>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const Inner = ({
|
|
50
|
-
field,
|
|
51
|
-
inputProps,
|
|
52
|
-
fieldLabel: _fieldLabel,
|
|
53
|
-
container,
|
|
54
|
-
errorProps,
|
|
55
|
-
}: {
|
|
56
|
-
field: ControllerRenderProps<any, string>
|
|
57
|
-
inputProps: InputProps
|
|
58
|
-
fieldLabel?: string
|
|
59
|
-
container: any
|
|
60
|
-
errorProps: any
|
|
61
|
-
}) => {
|
|
62
|
-
const { onChange: _, onBlur, ref, value, ...rest } = field
|
|
63
|
-
const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps
|
|
64
|
-
const { setSingleRange, anchor } = useDataGridContext()
|
|
65
|
-
const { row, col } = anchor || { row: 0, col: 0 }
|
|
66
|
-
|
|
67
|
-
const [localValue, setLocalValue] = useState(value || "")
|
|
68
|
-
const [isPopoverOpen, setIsPopoverOpen] = useState(false)
|
|
69
|
-
const [popoverValue, setPopoverValue] = useState(value || "")
|
|
70
|
-
const popoverContentRef = useRef<HTMLDivElement>(null)
|
|
71
|
-
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
setLocalValue(value || "")
|
|
74
|
-
}, [value])
|
|
75
|
-
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
if (isPopoverOpen) {
|
|
78
|
-
setPopoverValue(value || "")
|
|
79
|
-
}
|
|
80
|
-
}, [isPopoverOpen, value])
|
|
81
|
-
|
|
82
|
-
// Prevent DataGrid keyboard handlers from intercepting keys when popover is open
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (!isPopoverOpen || !popoverContentRef.current) {
|
|
85
|
-
return
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const handleKeyDownCapture = (e: KeyboardEvent) => {
|
|
89
|
-
const target = e.target as HTMLElement
|
|
90
|
-
const isTextarea = target.tagName === "TEXTAREA"
|
|
91
|
-
const isInPopover =
|
|
92
|
-
popoverContentRef.current && popoverContentRef.current.contains(target)
|
|
93
|
-
|
|
94
|
-
if (isTextarea || isInPopover) {
|
|
95
|
-
const dataGridKeys = [
|
|
96
|
-
"Enter",
|
|
97
|
-
"Delete",
|
|
98
|
-
"Backspace",
|
|
99
|
-
"ArrowUp",
|
|
100
|
-
"ArrowDown",
|
|
101
|
-
"ArrowLeft",
|
|
102
|
-
"ArrowRight",
|
|
103
|
-
"Tab",
|
|
104
|
-
" ",
|
|
105
|
-
]
|
|
106
|
-
|
|
107
|
-
// Stop the keys from reaching DataGrid, so the textarea can handle them
|
|
108
|
-
if (dataGridKeys.includes(e.key) && e.key !== "Escape") {
|
|
109
|
-
e.stopImmediatePropagation()
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
window.addEventListener("keydown", handleKeyDownCapture, true)
|
|
115
|
-
|
|
116
|
-
return () => {
|
|
117
|
-
window.removeEventListener("keydown", handleKeyDownCapture, true)
|
|
118
|
-
}
|
|
119
|
-
}, [isPopoverOpen])
|
|
120
|
-
|
|
121
|
-
const combinedRefs = useCombinedRefs(inputRef, ref)
|
|
122
|
-
|
|
123
|
-
const handleOverlayMouseDown = useCallback(
|
|
124
|
-
(e: React.MouseEvent) => {
|
|
125
|
-
if (e.detail === 2) {
|
|
126
|
-
e.preventDefault()
|
|
127
|
-
e.stopPropagation()
|
|
128
|
-
setSingleRange({ row, col })
|
|
129
|
-
setIsPopoverOpen(true)
|
|
130
|
-
return
|
|
131
|
-
}
|
|
132
|
-
// For single clicks, use the normal handler which sets anchor and focuses container
|
|
133
|
-
container.overlayProps.onMouseDown?.(e)
|
|
134
|
-
},
|
|
135
|
-
[container.overlayProps, setSingleRange, row, col]
|
|
136
|
-
)
|
|
137
|
-
|
|
138
|
-
const customContainer = {
|
|
139
|
-
...container,
|
|
140
|
-
overlayProps: {
|
|
141
|
-
...container.overlayProps,
|
|
142
|
-
onMouseDown: handleOverlayMouseDown,
|
|
143
|
-
},
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
const handlePopoverSave = () => {
|
|
147
|
-
onChange(popoverValue, value)
|
|
148
|
-
setLocalValue(popoverValue)
|
|
149
|
-
setIsPopoverOpen(false)
|
|
150
|
-
onBlur()
|
|
151
|
-
onInputBlur()
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const handlePopoverKeyDown = useCallback((e: React.KeyboardEvent) => {
|
|
155
|
-
if (e.key !== "Escape") {
|
|
156
|
-
e.stopPropagation()
|
|
157
|
-
}
|
|
158
|
-
}, [])
|
|
159
|
-
|
|
160
|
-
const displayValue = localValue || ""
|
|
161
|
-
const truncatedValue =
|
|
162
|
-
displayValue.length > 50
|
|
163
|
-
? `${displayValue.substring(0, 50)}...`
|
|
164
|
-
: displayValue
|
|
165
|
-
|
|
166
|
-
return (
|
|
167
|
-
<RadixPopover.Root
|
|
168
|
-
open={isPopoverOpen}
|
|
169
|
-
onOpenChange={(open) => {
|
|
170
|
-
if (!open) {
|
|
171
|
-
handlePopoverSave()
|
|
172
|
-
} else {
|
|
173
|
-
setIsPopoverOpen(true)
|
|
174
|
-
}
|
|
175
|
-
}}
|
|
176
|
-
>
|
|
177
|
-
<DataGridCellContainer {...customContainer} {...errorProps}>
|
|
178
|
-
<RadixPopover.Anchor asChild>
|
|
179
|
-
<div
|
|
180
|
-
className={clx(
|
|
181
|
-
"txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer items-center justify-center bg-transparent outline-none",
|
|
182
|
-
"focus:cursor-text"
|
|
183
|
-
)}
|
|
184
|
-
>
|
|
185
|
-
<span className="w-full truncate text-center">
|
|
186
|
-
{truncatedValue}
|
|
187
|
-
</span>
|
|
188
|
-
</div>
|
|
189
|
-
</RadixPopover.Anchor>
|
|
190
|
-
<input
|
|
191
|
-
className="sr-only"
|
|
192
|
-
autoComplete="off"
|
|
193
|
-
tabIndex={-1}
|
|
194
|
-
value={localValue}
|
|
195
|
-
onChange={(e) => setLocalValue(e.target.value)}
|
|
196
|
-
ref={combinedRefs}
|
|
197
|
-
onBlur={() => {
|
|
198
|
-
onBlur()
|
|
199
|
-
onInputBlur()
|
|
200
|
-
onChange(localValue, value)
|
|
201
|
-
}}
|
|
202
|
-
{...input}
|
|
203
|
-
{...rest}
|
|
204
|
-
/>
|
|
205
|
-
</DataGridCellContainer>
|
|
206
|
-
<RadixPopover.Portal>
|
|
207
|
-
<RadixPopover.Content
|
|
208
|
-
className={clx(
|
|
209
|
-
"bg-ui-bg-base shadow-elevation-flyout flex max-h-[80vh] w-[600px] overflow-hidden p-0 outline-none"
|
|
210
|
-
)}
|
|
211
|
-
align="start"
|
|
212
|
-
side="bottom"
|
|
213
|
-
sideOffset={-29}
|
|
214
|
-
alignOffset={-16}
|
|
215
|
-
collisionPadding={24}
|
|
216
|
-
onEscapeKeyDown={handlePopoverSave}
|
|
217
|
-
onKeyDown={handlePopoverKeyDown}
|
|
218
|
-
>
|
|
219
|
-
<div ref={popoverContentRef} className="h-full w-full">
|
|
220
|
-
<Textarea
|
|
221
|
-
value={popoverValue}
|
|
222
|
-
onChange={(e) => setPopoverValue(e.target.value)}
|
|
223
|
-
onKeyDown={(e) => {
|
|
224
|
-
e.stopPropagation()
|
|
225
|
-
}}
|
|
226
|
-
className="!bg-ui-bg-base h-full min-h-[300px] w-full resize-none border-0 p-4 !shadow-none focus-visible:!shadow-none"
|
|
227
|
-
/>
|
|
228
|
-
</div>
|
|
229
|
-
</RadixPopover.Content>
|
|
230
|
-
</RadixPopover.Portal>
|
|
231
|
-
</RadixPopover.Root>
|
|
232
|
-
)
|
|
233
|
-
}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { FetchError } from "@medusajs/js-sdk"
|
|
2
|
-
import { HttpTypes } from "@medusajs/types"
|
|
3
|
-
import {
|
|
4
|
-
QueryKey,
|
|
5
|
-
useMutation,
|
|
6
|
-
UseMutationOptions,
|
|
7
|
-
useQuery,
|
|
8
|
-
UseQueryOptions,
|
|
9
|
-
UseQueryResult,
|
|
10
|
-
} from "@tanstack/react-query"
|
|
11
|
-
import { sdk } from "../../lib/client"
|
|
12
|
-
import { queryKeysFactory } from "../../lib/query-key-factory"
|
|
13
|
-
import { queryClient } from "../../lib/query-client"
|
|
14
|
-
import { productsQueryKeys, useProducts } from "./products"
|
|
15
|
-
import { productVariantQueryKeys, useVariants } from "./product-variants"
|
|
16
|
-
import { categoriesQueryKeys, useProductCategories } from "./categories"
|
|
17
|
-
import { collectionsQueryKeys, useCollections } from "./collections"
|
|
18
|
-
import { productTagsQueryKeys, useProductTags } from "./tags"
|
|
19
|
-
import { productTypesQueryKeys, useProductTypes } from "./product-types"
|
|
20
|
-
|
|
21
|
-
const TRANSLATIONS_QUERY_KEY = "translations" as const
|
|
22
|
-
export const translationsQueryKeys = queryKeysFactory(TRANSLATIONS_QUERY_KEY)
|
|
23
|
-
|
|
24
|
-
export const useReferenceTranslations = (
|
|
25
|
-
reference: string,
|
|
26
|
-
referenceId?: string | string[],
|
|
27
|
-
options?: Omit<
|
|
28
|
-
UseQueryOptions<any, FetchError, any, QueryKey>,
|
|
29
|
-
"queryFn" | "queryKey"
|
|
30
|
-
>
|
|
31
|
-
) => {
|
|
32
|
-
const referenceHookMap = new Map<
|
|
33
|
-
string,
|
|
34
|
-
() => UseQueryResult<{
|
|
35
|
-
translations: HttpTypes.AdminTranslation[]
|
|
36
|
-
references: { id: string; [key: string]: string }[]
|
|
37
|
-
translatableFields: string[]
|
|
38
|
-
}>
|
|
39
|
-
>([
|
|
40
|
-
[
|
|
41
|
-
"product",
|
|
42
|
-
() => {
|
|
43
|
-
const translatableFields = ["title", "description"]
|
|
44
|
-
const fields = translatableFields.concat(["translations.*"]).join(",")
|
|
45
|
-
|
|
46
|
-
const { products, ...rest } = useProducts(
|
|
47
|
-
{ id: referenceId ?? [], fields },
|
|
48
|
-
options
|
|
49
|
-
)
|
|
50
|
-
return {
|
|
51
|
-
...rest,
|
|
52
|
-
data: {
|
|
53
|
-
translations:
|
|
54
|
-
products?.flatMap((product) => product.translations ?? []) ?? [],
|
|
55
|
-
references: products ?? [],
|
|
56
|
-
translatableFields,
|
|
57
|
-
},
|
|
58
|
-
} as unknown as UseQueryResult<{
|
|
59
|
-
translations: HttpTypes.AdminTranslation[]
|
|
60
|
-
references: { id: string; [key: string]: string }[]
|
|
61
|
-
translatableFields: string[]
|
|
62
|
-
}>
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
[
|
|
66
|
-
"product_variant",
|
|
67
|
-
() => {
|
|
68
|
-
const translatableFields = ["title"]
|
|
69
|
-
const fields = translatableFields.concat(["translations.*"]).join(",")
|
|
70
|
-
|
|
71
|
-
const { variants, ...rest } = useVariants(
|
|
72
|
-
{ id: referenceId ?? [], fields },
|
|
73
|
-
options
|
|
74
|
-
)
|
|
75
|
-
return {
|
|
76
|
-
...rest,
|
|
77
|
-
data: {
|
|
78
|
-
translations:
|
|
79
|
-
variants?.flatMap((variant) => variant.translations ?? []) ?? [],
|
|
80
|
-
references: variants ?? [],
|
|
81
|
-
translatableFields,
|
|
82
|
-
},
|
|
83
|
-
} as unknown as UseQueryResult<{
|
|
84
|
-
translations: HttpTypes.AdminTranslation[]
|
|
85
|
-
references: { id: string; [key: string]: string }[]
|
|
86
|
-
translatableFields: string[]
|
|
87
|
-
}>
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
[
|
|
91
|
-
"product_category",
|
|
92
|
-
() => {
|
|
93
|
-
const translatableFields = ["name", "description"]
|
|
94
|
-
const fields = translatableFields.concat(["translations.*"]).join(",")
|
|
95
|
-
|
|
96
|
-
const { product_categories, ...rest } = useProductCategories(
|
|
97
|
-
{ id: referenceId ?? [], fields },
|
|
98
|
-
options
|
|
99
|
-
)
|
|
100
|
-
return {
|
|
101
|
-
...rest,
|
|
102
|
-
data: {
|
|
103
|
-
translations:
|
|
104
|
-
product_categories?.flatMap(
|
|
105
|
-
(category) => category.translations ?? []
|
|
106
|
-
) ?? [],
|
|
107
|
-
references: product_categories ?? [],
|
|
108
|
-
translatableFields,
|
|
109
|
-
},
|
|
110
|
-
} as unknown as UseQueryResult<{
|
|
111
|
-
translations: HttpTypes.AdminTranslation[]
|
|
112
|
-
references: { id: string; [key: string]: string }[]
|
|
113
|
-
translatableFields: string[]
|
|
114
|
-
}>
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
[
|
|
118
|
-
"product_collection",
|
|
119
|
-
() => {
|
|
120
|
-
const translatableFields = ["title"]
|
|
121
|
-
const fields = translatableFields.concat(["translations.*"]).join(",")
|
|
122
|
-
|
|
123
|
-
const { collections, ...rest } = useCollections(
|
|
124
|
-
{ id: referenceId ?? [], fields },
|
|
125
|
-
options
|
|
126
|
-
)
|
|
127
|
-
return {
|
|
128
|
-
...rest,
|
|
129
|
-
data: {
|
|
130
|
-
translations:
|
|
131
|
-
collections?.flatMap(
|
|
132
|
-
(collection) => collection.translations ?? []
|
|
133
|
-
) ?? [],
|
|
134
|
-
references: collections ?? [],
|
|
135
|
-
translatableFields,
|
|
136
|
-
},
|
|
137
|
-
} as unknown as UseQueryResult<{
|
|
138
|
-
translations: HttpTypes.AdminTranslation[]
|
|
139
|
-
references: { id: string; [key: string]: string }[]
|
|
140
|
-
translatableFields: string[]
|
|
141
|
-
}>
|
|
142
|
-
},
|
|
143
|
-
],
|
|
144
|
-
[
|
|
145
|
-
"product_type",
|
|
146
|
-
() => {
|
|
147
|
-
const translatableFields = ["value"]
|
|
148
|
-
const fields = translatableFields.concat(["translations.*"]).join(",")
|
|
149
|
-
|
|
150
|
-
const { product_types, ...rest } = useProductTypes(
|
|
151
|
-
{ id: referenceId ?? [], fields },
|
|
152
|
-
options
|
|
153
|
-
)
|
|
154
|
-
return {
|
|
155
|
-
...rest,
|
|
156
|
-
data: {
|
|
157
|
-
translations:
|
|
158
|
-
product_types?.flatMap((type) => type.translations ?? []) ?? [],
|
|
159
|
-
references: product_types ?? [],
|
|
160
|
-
translatableFields,
|
|
161
|
-
},
|
|
162
|
-
} as unknown as UseQueryResult<{
|
|
163
|
-
translations: HttpTypes.AdminTranslation[]
|
|
164
|
-
references: { id: string; [key: string]: string }[]
|
|
165
|
-
translatableFields: string[]
|
|
166
|
-
}>
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
[
|
|
170
|
-
"product_tag",
|
|
171
|
-
() => {
|
|
172
|
-
const translatableFields = ["value"]
|
|
173
|
-
const fields = translatableFields.concat(["translations.*"]).join(",")
|
|
174
|
-
|
|
175
|
-
const { product_tags, ...rest } = useProductTags(
|
|
176
|
-
{ id: referenceId ?? [], fields },
|
|
177
|
-
options
|
|
178
|
-
)
|
|
179
|
-
return {
|
|
180
|
-
...rest,
|
|
181
|
-
data: {
|
|
182
|
-
translations:
|
|
183
|
-
product_tags?.flatMap((tag) => tag.translations ?? []) ?? [],
|
|
184
|
-
references: product_tags ?? [],
|
|
185
|
-
translatableFields,
|
|
186
|
-
},
|
|
187
|
-
} as unknown as UseQueryResult<{
|
|
188
|
-
translations: HttpTypes.AdminTranslation[]
|
|
189
|
-
references: { id: string; [key: string]: string }[]
|
|
190
|
-
translatableFields: string[]
|
|
191
|
-
}>
|
|
192
|
-
},
|
|
193
|
-
],
|
|
194
|
-
// TODO: product option and option values
|
|
195
|
-
])
|
|
196
|
-
const referenceHook = referenceHookMap.get(reference)
|
|
197
|
-
if (!referenceHook) {
|
|
198
|
-
throw new Error(`No hook found for reference type: ${reference}`)
|
|
199
|
-
}
|
|
200
|
-
const { data, ...rest } = referenceHook()
|
|
201
|
-
return { ...data, ...rest }
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export const useTranslations = (
|
|
205
|
-
query?: HttpTypes.AdminTranslationsListParams,
|
|
206
|
-
options?: Omit<
|
|
207
|
-
UseQueryOptions<
|
|
208
|
-
HttpTypes.AdminTranslationsListResponse,
|
|
209
|
-
FetchError,
|
|
210
|
-
HttpTypes.AdminTranslationsListResponse,
|
|
211
|
-
QueryKey
|
|
212
|
-
>,
|
|
213
|
-
"queryFn" | "queryKey"
|
|
214
|
-
>
|
|
215
|
-
) => {
|
|
216
|
-
const { data, ...rest } = useQuery({
|
|
217
|
-
queryKey: translationsQueryKeys.list(query),
|
|
218
|
-
queryFn: () => sdk.admin.translation.list(query),
|
|
219
|
-
...options,
|
|
220
|
-
})
|
|
221
|
-
|
|
222
|
-
return { ...data, ...rest }
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export const useBatchTranslations = (
|
|
226
|
-
reference: string,
|
|
227
|
-
options?: UseMutationOptions<
|
|
228
|
-
HttpTypes.AdminTranslationsBatchResponse,
|
|
229
|
-
FetchError,
|
|
230
|
-
HttpTypes.AdminBatchTranslations
|
|
231
|
-
>
|
|
232
|
-
) => {
|
|
233
|
-
const referenceInvalidationKeysMap = new Map<string, QueryKey>([
|
|
234
|
-
["product", productsQueryKeys.lists()],
|
|
235
|
-
["product_variant", productVariantQueryKeys.lists()],
|
|
236
|
-
["product_category", categoriesQueryKeys.lists()],
|
|
237
|
-
["product_collection", collectionsQueryKeys.lists()],
|
|
238
|
-
["product_type", productTypesQueryKeys.lists()],
|
|
239
|
-
["product_tag", productTagsQueryKeys.lists()],
|
|
240
|
-
])
|
|
241
|
-
|
|
242
|
-
return useMutation({
|
|
243
|
-
mutationFn: (payload: HttpTypes.AdminBatchTranslations) =>
|
|
244
|
-
sdk.admin.translation.batch(payload),
|
|
245
|
-
onSuccess: (data, variables, context) => {
|
|
246
|
-
queryClient.invalidateQueries({
|
|
247
|
-
queryKey: referenceInvalidationKeysMap.get(reference),
|
|
248
|
-
})
|
|
249
|
-
|
|
250
|
-
options?.onSuccess?.(data, variables, context)
|
|
251
|
-
},
|
|
252
|
-
...options,
|
|
253
|
-
})
|
|
254
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TranslationList as Component } from "./translation-list"
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { Button, Container, Heading, Text } from "@medusajs/ui"
|
|
2
|
-
import { SingleColumnPage } from "../../../components/layout/pages"
|
|
3
|
-
import { useTranslation } from "react-i18next"
|
|
4
|
-
import { Link, useNavigate } from "react-router-dom"
|
|
5
|
-
import { Buildings, Pencil } from "@medusajs/icons"
|
|
6
|
-
import { IconAvatar } from "../../../components/common/icon-avatar/icon-avatar"
|
|
7
|
-
import { ActionMenu } from "../../../components/common/action-menu"
|
|
8
|
-
import { LinkButton } from "../../../components/common/link-button/link-button"
|
|
9
|
-
|
|
10
|
-
type TranslatableEntity = {
|
|
11
|
-
icon: React.ReactNode
|
|
12
|
-
label: string
|
|
13
|
-
reference: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const TRANSLATABLE_ENTITIES: TranslatableEntity[] = [
|
|
17
|
-
{
|
|
18
|
-
icon: <Buildings />,
|
|
19
|
-
label: "Product",
|
|
20
|
-
reference: "product",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
icon: <Buildings />,
|
|
24
|
-
label: "Product Variants",
|
|
25
|
-
reference: "product_variant",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
icon: <Buildings />,
|
|
29
|
-
label: "Product Categories",
|
|
30
|
-
reference: "product_category",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
icon: <Buildings />,
|
|
34
|
-
label: "Product Collections",
|
|
35
|
-
reference: "product_collection",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
icon: <Buildings />,
|
|
39
|
-
label: "Product Types",
|
|
40
|
-
reference: "product_type",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
icon: <Buildings />,
|
|
44
|
-
label: "Product Tags",
|
|
45
|
-
reference: "product_tag",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
icon: <Buildings />,
|
|
49
|
-
label: "Product Options",
|
|
50
|
-
reference: "product_option",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
icon: <Buildings />,
|
|
54
|
-
label: "Product Option Values",
|
|
55
|
-
reference: "product_option_value",
|
|
56
|
-
},
|
|
57
|
-
]
|
|
58
|
-
|
|
59
|
-
export const TranslationList = () => {
|
|
60
|
-
const { t } = useTranslation()
|
|
61
|
-
const navigate = useNavigate()
|
|
62
|
-
|
|
63
|
-
const handleManageLocales = () => {
|
|
64
|
-
navigate("/settings/store/locales")
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<SingleColumnPage
|
|
69
|
-
widgets={{
|
|
70
|
-
before: [],
|
|
71
|
-
after: [],
|
|
72
|
-
}}
|
|
73
|
-
>
|
|
74
|
-
<Container className="p-0">
|
|
75
|
-
<div className="flex items-center justify-between px-6 py-4">
|
|
76
|
-
<div>
|
|
77
|
-
<Heading>Manage {t("translations.domain")}</Heading>
|
|
78
|
-
<Text className="text-ui-fg-subtle" size="small">
|
|
79
|
-
{t("translations.subtitle")}
|
|
80
|
-
</Text>
|
|
81
|
-
</div>
|
|
82
|
-
<Button
|
|
83
|
-
variant="secondary"
|
|
84
|
-
size="small"
|
|
85
|
-
onClick={handleManageLocales}
|
|
86
|
-
>
|
|
87
|
-
{t("translations.actions.manageLocales")}
|
|
88
|
-
</Button>
|
|
89
|
-
</div>
|
|
90
|
-
</Container>
|
|
91
|
-
{TRANSLATABLE_ENTITIES.map((entity) => (
|
|
92
|
-
<Container key={entity.label} className="p-0">
|
|
93
|
-
<div className="flex items-center justify-between px-6 py-3">
|
|
94
|
-
<Link
|
|
95
|
-
to={`/settings/translations/edit?reference=${entity.reference}`}
|
|
96
|
-
className="transition-fg hover:bg-ui-bg-base-hover active:bg-ui-bg-base-pressed focus-visible:shadow-borders-interactive-with-active -mx-2 flex flex-1 items-center gap-x-2 rounded-md px-2 py-1.5 outline-none"
|
|
97
|
-
>
|
|
98
|
-
<IconAvatar variant="squared">{entity.icon}</IconAvatar>
|
|
99
|
-
<Text size="small">{entity.label}</Text>
|
|
100
|
-
</Link>
|
|
101
|
-
<div className="flex items-center gap-x-2">
|
|
102
|
-
<ActionMenu
|
|
103
|
-
groups={[
|
|
104
|
-
{
|
|
105
|
-
actions: [
|
|
106
|
-
{
|
|
107
|
-
icon: <Pencil />,
|
|
108
|
-
label: t("actions.edit"),
|
|
109
|
-
onClick: () => {
|
|
110
|
-
navigate(
|
|
111
|
-
`/settings/translations/edit?reference=${entity.label.toLowerCase()}`
|
|
112
|
-
)
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
},
|
|
117
|
-
]}
|
|
118
|
-
></ActionMenu>
|
|
119
|
-
<Text>|</Text>
|
|
120
|
-
<LinkButton
|
|
121
|
-
to={`/settings/translations/${entity.label.toLowerCase()}`}
|
|
122
|
-
>
|
|
123
|
-
{t("actions.viewDetails")}
|
|
124
|
-
</LinkButton>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</Container>
|
|
128
|
-
))}
|
|
129
|
-
</SingleColumnPage>
|
|
130
|
-
)
|
|
131
|
-
}
|
package/src/routes/translations/translations-edit/components/translations-edit-form/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./translations-edit-form"
|