@medusajs/dashboard 2.10.4-preview-20250923120202 → 2.10.4-preview-20250923180156
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-FE4BXGVN.mjs → add-campaign-promotions-BWIP24MA.mjs} +6 -5
- package/dist/{api-key-management-detail-SAVBCKX7.mjs → api-key-management-detail-WGWZQCFC.mjs} +6 -4
- package/dist/{api-key-management-list-5DI3L4DV.mjs → api-key-management-list-QAMBWB7T.mjs} +5 -4
- package/dist/{api-key-management-sales-channels-WL5L5XWM.mjs → api-key-management-sales-channels-H5TVIHTV.mjs} +3 -2
- package/dist/app.css +89 -31
- package/dist/app.js +4681 -3651
- package/dist/app.mjs +7 -5
- package/dist/{campaign-create-AVBNHFC2.mjs → campaign-create-GRKYQY5D.mjs} +3 -2
- package/dist/{campaign-detail-KTOLZNTA.mjs → campaign-detail-EJD7LQCW.mjs} +13 -11
- package/dist/{campaign-list-G4MD3RPU.mjs → campaign-list-IDPRC2MD.mjs} +6 -5
- package/dist/{categories-metadata-GXWJ3HOG.mjs → categories-metadata-JFNWZA5D.mjs} +4 -2
- package/dist/{category-create-FOVB5MJ4.mjs → category-create-DJHTY4QX.mjs} +36 -14
- package/dist/{category-detail-ENUI5EFL.mjs → category-detail-CL3XCV7E.mjs} +9 -7
- package/dist/{category-edit-O4ZSANE5.mjs → category-edit-JQQX7IZZ.mjs} +34 -14
- package/dist/{category-list-UI6W5KF5.mjs → category-list-FOCNQKPH.mjs} +5 -4
- package/dist/{category-products-ZG5QDWSW.mjs → category-products-UZEG63WY.mjs} +6 -4
- package/dist/{chunk-KMUDF36P.mjs → chunk-2252SSK6.mjs} +1 -1
- package/dist/{chunk-SMHXCFRS.mjs → chunk-4CGHNQP2.mjs} +28 -15
- package/dist/chunk-5U3FFMC7.mjs +84 -0
- package/dist/{chunk-JO6QASTJ.mjs → chunk-6RWF7BPW.mjs} +1 -1
- package/dist/{chunk-JHXKKOHO.mjs → chunk-7JJTWGHU.mjs} +49 -15
- package/dist/{chunk-5WKYR6PY.mjs → chunk-BM5ZIV5V.mjs} +1 -1
- package/dist/{chunk-OGHQ6VJI.mjs → chunk-BSBCIU6C.mjs} +0 -5
- package/dist/{chunk-IINWRJA6.mjs → chunk-CAZKNJTG.mjs} +316 -266
- package/dist/{chunk-2PMSBTXI.mjs → chunk-CD7VQIPA.mjs} +11 -11
- package/dist/{chunk-NRBOPOMS.mjs → chunk-CU5EFQSB.mjs} +1 -1
- package/dist/{chunk-J5E7MQSS.mjs → chunk-CY33DS7K.mjs} +6 -0
- package/dist/{chunk-7VJK6HNE.mjs → chunk-EYL2JACT.mjs} +4 -4
- package/dist/{chunk-R2NWOCML.mjs → chunk-FUQ27NT5.mjs} +7 -1
- package/dist/{chunk-74K7HGNI.mjs → chunk-FXG2Z3QT.mjs} +3 -2
- package/dist/{chunk-2RQLKDBF.mjs → chunk-GIZFNLKK.mjs} +103 -96
- package/dist/{chunk-AOFGTNG6.mjs → chunk-HQKGZADC.mjs} +6 -1
- package/dist/{chunk-LBIOZZPA.mjs → chunk-HWKLNKOY.mjs} +1 -1
- package/dist/{chunk-S2UEWRDA.mjs → chunk-IL5IMREK.mjs} +59 -49
- package/dist/{chunk-SCBXRJPV.mjs → chunk-IRO6DO7J.mjs} +1 -1
- package/dist/{chunk-T7G2CURS.mjs → chunk-IVZ6BMDB.mjs} +1 -0
- package/dist/{chunk-XGJ5DXXG.mjs → chunk-IYDBZI47.mjs} +11 -11
- package/dist/{chunk-OKMF4YI7.mjs → chunk-K3OMOMRB.mjs} +25 -0
- package/dist/{chunk-2LPGQWPV.mjs → chunk-KTL6E2WT.mjs} +1 -1
- package/dist/{chunk-YWNHMIEQ.mjs → chunk-LJDVFJK7.mjs} +1 -1
- package/dist/{chunk-Q5DI5VYN.mjs → chunk-MLNUGLGT.mjs} +1 -1
- package/dist/{chunk-UWJBDOQD.mjs → chunk-NKVMOKZA.mjs} +41 -29
- package/dist/{chunk-UNM3LPTG.mjs → chunk-OQPVQGSH.mjs} +1 -1
- package/dist/{chunk-3NJTXRIY.mjs → chunk-OZPB6JBL.mjs} +5 -1
- package/dist/{chunk-FPJBF7VS.mjs → chunk-P2O6XTD4.mjs} +1 -1
- package/dist/{chunk-EFA7S5L3.mjs → chunk-PGTXMCSV.mjs} +1 -1
- package/dist/{chunk-D7H6ZNK4.mjs → chunk-PRLQLEEQ.mjs} +2 -0
- package/dist/{chunk-6AGMMT5H.mjs → chunk-RFP4O5GO.mjs} +3 -3
- package/dist/chunk-S4DMV3ZT.mjs +35 -0
- package/dist/{chunk-5NQ3X2JI.mjs → chunk-SNDSWB6B.mjs} +1 -1
- package/dist/{chunk-O74UDEWT.mjs → chunk-TKZK3YPU.mjs} +1 -1
- package/dist/{chunk-EE7SOCEQ.mjs → chunk-TOS3CYMH.mjs} +3 -3
- package/dist/{chunk-CGK6IVLN.mjs → chunk-U2FXUMKA.mjs} +1 -1
- package/dist/{chunk-CK3VFTZM.mjs → chunk-UKX2FFFV.mjs} +2 -2
- package/dist/{chunk-7YZF3THS.mjs → chunk-V53HAFWH.mjs} +1 -1
- package/dist/{chunk-S45XMWVD.mjs → chunk-WP5CXGGO.mjs} +1 -1
- package/dist/{chunk-Y4YXZY7R.mjs → chunk-YPDTZXV6.mjs} +1 -1
- package/dist/{chunk-JELVERJM.mjs → chunk-YPSSUJUZ.mjs} +32 -0
- package/dist/{chunk-XKXNQ2KV.mjs → chunk-ZCARHA6C.mjs} +1 -1
- package/dist/{collection-add-products-2ISNNIHD.mjs → collection-add-products-QTFBLLND.mjs} +6 -4
- package/dist/{collection-detail-OSX6NHNQ.mjs → collection-detail-ZEAUSZBJ.mjs} +8 -6
- package/dist/{collection-list-MPIYSHQJ.mjs → collection-list-V27JHDAD.mjs} +9 -7
- package/dist/{collection-metadata-EOFYXEQI.mjs → collection-metadata-JAEMZMU6.mjs} +4 -2
- package/dist/{customer-create-address-TPSDYZBN.mjs → customer-create-address-JOYBIPPN.mjs} +1 -1
- package/dist/{customer-detail-FCNRRZSW.mjs → customer-detail-YBOM6KGC.mjs} +7 -5
- package/dist/{customer-group-add-customers-ULPWTALS.mjs → customer-group-add-customers-YF2T323Z.mjs} +3 -2
- package/dist/{customer-group-detail-QI3QLJJL.mjs → customer-group-detail-72VFORGF.mjs} +7 -5
- package/dist/{customer-group-list-GPIKR66X.mjs → customer-group-list-UTC5ZCJZ.mjs} +6 -4
- package/dist/{customer-group-metadata-UPAPULMF.mjs → customer-group-metadata-YQCOIVQG.mjs} +2 -1
- package/dist/{customer-list-SINCBCOZ.mjs → customer-list-5IWEXYSW.mjs} +5 -4
- package/dist/{customer-metadata-5NPUMPZ2.mjs → customer-metadata-JZEJBH4V.mjs} +2 -1
- package/dist/{customers-add-customer-group-5TFTVDB6.mjs → customers-add-customer-group-ZUCFXW2U.mjs} +5 -3
- package/dist/{edit-inventory-item-attributes-KT7BSPZ7.mjs → edit-inventory-item-attributes-BMPRVCPN.mjs} +1 -1
- package/dist/{edit-reservation-EKH4RIAX.mjs → edit-reservation-QQTYP22N.mjs} +5 -0
- package/dist/{edit-rules-63NG4QVR.mjs → edit-rules-RY7JMYLR.mjs} +5 -3
- package/dist/{inventory-create-RIVJFJJQ.mjs → inventory-create-F5PSTEN2.mjs} +10 -4
- package/dist/{inventory-detail-5433AAQ2.mjs → inventory-detail-BO5E7KXO.mjs} +10 -8
- package/dist/{inventory-list-YMYF7QVP.mjs → inventory-list-HUYCKI2I.mjs} +5 -4
- package/dist/{inventory-metadata-FH4CHJBA.mjs → inventory-metadata-QGPVSAUI.mjs} +4 -2
- package/dist/{inventory-stock-D6E4LQRK.mjs → inventory-stock-VQNXCIOA.mjs} +5 -3
- package/dist/{location-create-LUP363ZB.mjs → location-create-22H74MFP.mjs} +1 -1
- package/dist/{location-detail-Z6ZDX6RY.mjs → location-detail-M4CYDTSY.mjs} +5 -3
- package/dist/{location-edit-26K26G23.mjs → location-edit-RNGPJ26L.mjs} +1 -1
- package/dist/{location-fulfillment-providers-45VXZMZI.mjs → location-fulfillment-providers-XVEQZCUD.mjs} +6 -4
- package/dist/{location-list-BKK2PAKF.mjs → location-list-NKIOBHG4.mjs} +4 -3
- package/dist/{location-sales-channels-2BOIPBBG.mjs → location-sales-channels-NSXV65ZM.mjs} +3 -2
- package/dist/{location-service-zone-create-RPFLBVV4.mjs → location-service-zone-create-D5QSFS3M.mjs} +4 -3
- package/dist/{location-service-zone-manage-areas-VEUUGPKF.mjs → location-service-zone-manage-areas-HKCALG4Q.mjs} +4 -3
- package/dist/{location-service-zone-shipping-option-create-NO3665DC.mjs → location-service-zone-shipping-option-create-I3HAEEFA.mjs} +14 -5
- package/dist/{location-service-zone-shipping-option-edit-TMXNX4VX.mjs → location-service-zone-shipping-option-edit-JYM6GHTA.mjs} +40 -28
- package/dist/{location-service-zone-shipping-option-pricing-U2SDK5DE.mjs → location-service-zone-shipping-option-pricing-FLB63UKY.mjs} +3 -2
- package/dist/{login-DSPNELTI.mjs → login-QOENXTB7.mjs} +2 -1
- package/dist/{order-allocate-items-J3ZHGC22.mjs → order-allocate-items-NO5SVLS6.mjs} +23 -11
- package/dist/{order-create-claim-V63BWLB5.mjs → order-create-claim-MOBLO4YM.mjs} +9 -6
- package/dist/{order-create-edit-NPF4UZ4D.mjs → order-create-edit-C75GUZJE.mjs} +8 -5
- package/dist/{order-create-exchange-RHIPPSKU.mjs → order-create-exchange-RCUALEXO.mjs} +9 -6
- package/dist/{order-create-fulfillment-4SSUHQ75.mjs → order-create-fulfillment-EZTEZ4CF.mjs} +10 -2
- package/dist/{order-create-refund-QVQC5ZP5.mjs → order-create-refund-4FAIESAN.mjs} +7 -1
- package/dist/{order-create-return-GVA6M2RY.mjs → order-create-return-AV4BEJDN.mjs} +7 -5
- package/dist/{order-create-shipment-TJAARKWA.mjs → order-create-shipment-PTUJKVWK.mjs} +4 -1
- package/dist/{order-detail-2MIN6B2I.mjs → order-detail-6XQLJ5TU.mjs} +5 -3
- package/dist/{order-edit-billing-address-QP2I5F3E.mjs → order-edit-billing-address-46CFUZGL.mjs} +3 -2
- package/dist/{order-edit-email-7WT7XTHB.mjs → order-edit-email-FOK5GQW2.mjs} +2 -1
- package/dist/{order-edit-shipping-address-3QFMQP4I.mjs → order-edit-shipping-address-WFN2SVKM.mjs} +3 -2
- package/dist/{order-list-ZCMNSZYB.mjs → order-list-OTPVQKU6.mjs} +7 -6
- package/dist/{order-metadata-YJS26DHK.mjs → order-metadata-COJNFRPZ.mjs} +4 -2
- package/dist/{order-receive-return-PZMMMUB2.mjs → order-receive-return-P4OPVOPM.mjs} +4 -2
- package/dist/{order-request-transfer-QBIZD36E.mjs → order-request-transfer-HRPCEL5L.mjs} +3 -2
- package/dist/{price-list-configuration-435QDWB2.mjs → price-list-configuration-HF3DARKG.mjs} +4 -3
- package/dist/{price-list-create-RXDH5CXF.mjs → price-list-create-FJ2FM6GL.mjs} +30 -14
- package/dist/{price-list-detail-PKIKOJ4H.mjs → price-list-detail-VNZ3Q426.mjs} +8 -6
- package/dist/{price-list-edit-ZGBOZYSC.mjs → price-list-edit-COHKW6UK.mjs} +49 -29
- package/dist/{price-list-list-C6NEB2R4.mjs → price-list-list-55WD2WAY.mjs} +5 -4
- package/dist/{price-list-prices-add-2CDPUSYA.mjs → price-list-prices-add-FMZKGOHD.mjs} +19 -10
- package/dist/{price-list-prices-edit-ENB4GJZT.mjs → price-list-prices-edit-SUZNOKK2.mjs} +3 -2
- package/dist/{product-attributes-ZZPEBDCK.mjs → product-attributes-5PLACMXK.mjs} +9 -7
- package/dist/{product-create-FCDCIDCH.mjs → product-create-6FMLIS5X.mjs} +17 -11
- package/dist/{product-create-variant-KJKQ6ROY.mjs → product-create-variant-KGBSFIKQ.mjs} +22 -8
- package/dist/{product-detail-2ZUONC23.mjs → product-detail-2BJJMCCO.mjs} +11 -9
- package/dist/{product-edit-G3Z6FCN6.mjs → product-edit-N5P7RVNS.mjs} +31 -18
- package/dist/{product-export-XERWEI5H.mjs → product-export-XA5POQKT.mjs} +3 -2
- package/dist/{product-import-AGFJMSVK.mjs → product-import-DYTT4YDA.mjs} +5 -3
- package/dist/{product-list-WGX66SGI.mjs → product-list-EUQX3NBE.mjs} +10 -8
- package/dist/{product-media-APQKPFTT.mjs → product-media-XJGAON6B.mjs} +4 -4
- package/dist/{product-metadata-NZ3HKO67.mjs → product-metadata-44VYAXZD.mjs} +4 -2
- package/dist/{product-organization-BYT4TKMZ.mjs → product-organization-FB6BVKKL.mjs} +10 -8
- package/dist/{product-prices-PCBMYYGV.mjs → product-prices-4ZV5EXX5.mjs} +2 -1
- package/dist/{product-sales-channels-UGPAXFAV.mjs → product-sales-channels-QBQDLU7Z.mjs} +3 -2
- package/dist/{product-shipping-profile-YDN4X6S2.mjs → product-shipping-profile-UZQSV54B.mjs} +9 -7
- package/dist/{product-stock-SUVEQZML.mjs → product-stock-PX5NAHH6.mjs} +7 -4
- package/dist/{product-tag-create-T6HVAQKN.mjs → product-tag-create-R4YSSXD6.mjs} +2 -1
- package/dist/{product-tag-detail-HOWUZC3P.mjs → product-tag-detail-XJEGQD7U.mjs} +12 -10
- package/dist/{product-tag-edit-WWQDNDRC.mjs → product-tag-edit-7JXF42HY.mjs} +2 -1
- package/dist/{product-tag-list-FAKSLONF.mjs → product-tag-list-GTUMQQ6V.mjs} +12 -10
- package/dist/{product-tag-metadata-6B56VEZU.mjs → product-tag-metadata-5QV3HMXJ.mjs} +4 -2
- package/dist/{product-type-detail-KN64HYUV.mjs → product-type-detail-CN74BB3Y.mjs} +8 -6
- package/dist/{product-type-list-6ZIWPIUH.mjs → product-type-list-MJLAGQYC.mjs} +5 -4
- package/dist/{product-type-metadata-F3FTI6OG.mjs → product-type-metadata-JPFREADV.mjs} +4 -2
- package/dist/{product-variant-detail-OUHBUY4J.mjs → product-variant-detail-BSLEUW5J.mjs} +7 -5
- package/dist/{product-variant-edit-NBYHDUJ5.mjs → product-variant-edit-VOW5633S.mjs} +8 -3
- package/dist/{product-variant-manage-inventory-items-TM3VAHBJ.mjs → product-variant-manage-inventory-items-LGRRKHT2.mjs} +1 -1
- package/dist/{product-variant-metadata-XDVLJYGQ.mjs → product-variant-metadata-KDSV47PE.mjs} +4 -2
- package/dist/{profile-detail-ROG22HHL.mjs → profile-detail-XYAQ2G36.mjs} +3 -2
- package/dist/{profile-edit-HSUQIQQH.mjs → profile-edit-7WD4FTRH.mjs} +31 -19
- package/dist/{promotion-add-campaign-7R26KU2U.mjs → promotion-add-campaign-JXBRCUXL.mjs} +3 -2
- package/dist/{promotion-create-UUOG52D5.mjs → promotion-create-YPX2R3ZB.mjs} +20 -7
- package/dist/{promotion-detail-6ZD7Z6BF.mjs → promotion-detail-VB5GZDCC.mjs} +7 -5
- package/dist/{promotion-edit-details-HQLYX4X4.mjs → promotion-edit-details-I5DYHQUM.mjs} +9 -1
- package/dist/{promotion-list-GI64LDWI.mjs → promotion-list-NAUTWXNU.mjs} +8 -7
- package/dist/refund-reason-create-CYHPXX2O.mjs +158 -0
- package/dist/refund-reason-edit-E2HDAQZI.mjs +144 -0
- package/dist/refund-reason-list-VBHGRLJJ.mjs +241 -0
- package/dist/{region-add-countries-Y4YAHDUZ.mjs → region-add-countries-6GSF4CKJ.mjs} +3 -2
- package/dist/{region-create-5Y3GIQBV.mjs → region-create-4C42KVB4.mjs} +30 -14
- package/dist/{region-detail-CWRFM6P3.mjs → region-detail-PB7EUSTD.mjs} +5 -4
- package/dist/{region-edit-JWQWCLM3.mjs → region-edit-CLE5VVRP.mjs} +21 -5
- package/dist/{region-list-FQNI7F37.mjs → region-list-52LF5S4S.mjs} +5 -4
- package/dist/{region-metadata-IQVB4ERU.mjs → region-metadata-NXD563F4.mjs} +4 -2
- package/dist/{reservation-create-7RFXWDXB.mjs → reservation-create-CBWJLYHP.mjs} +1 -1
- package/dist/{reservation-detail-RTGHD35L.mjs → reservation-detail-64MMXK7D.mjs} +6 -4
- package/dist/{reservation-list-UOC7RNRZ.mjs → reservation-list-YNG7YKG2.mjs} +5 -4
- package/dist/{reservation-metadata-WKJXBRLQ.mjs → reservation-metadata-4GZCEGM7.mjs} +4 -2
- package/dist/{reset-password-SXA6YKTJ.mjs → reset-password-ZCKXQZNQ.mjs} +1 -1
- package/dist/{return-reason-list-MOP7YWMZ.mjs → return-reason-list-FW7OYUOW.mjs} +8 -7
- package/dist/{sales-channel-add-products-OKVZJ6FI.mjs → sales-channel-add-products-EAWW7ADY.mjs} +6 -4
- package/dist/{sales-channel-create-3MPOMVPD.mjs → sales-channel-create-VW2UPYSI.mjs} +2 -0
- package/dist/{sales-channel-detail-WESBK6Q7.mjs → sales-channel-detail-3F3HFTD2.mjs} +8 -6
- package/dist/{sales-channel-edit-LSLAM7A4.mjs → sales-channel-edit-OA6QPIHW.mjs} +2 -0
- package/dist/{sales-channel-list-ADIJMXNV.mjs → sales-channel-list-R4HT6A7P.mjs} +6 -4
- package/dist/{sales-channel-metadata-2OQAHYB4.mjs → sales-channel-metadata-LAHTTRLQ.mjs} +4 -2
- package/dist/{shipping-option-type-create-3CGPGDYJ.mjs → shipping-option-type-create-IPKK5MRS.mjs} +2 -1
- package/dist/{shipping-option-type-detail-S23H2OGW.mjs → shipping-option-type-detail-NEQ4RA5F.mjs} +6 -4
- package/dist/{shipping-option-type-edit-IHE7XM6M.mjs → shipping-option-type-edit-CC64TWSB.mjs} +2 -1
- package/dist/{shipping-option-type-list-47GRJ6EC.mjs → shipping-option-type-list-3GTGTBK7.mjs} +8 -6
- package/dist/{shipping-profile-detail-FDUPDSH4.mjs → shipping-profile-detail-FS46IJZP.mjs} +3 -2
- package/dist/{shipping-profile-metadata-OXWOXAAR.mjs → shipping-profile-metadata-EPVLPEEM.mjs} +4 -2
- package/dist/{shipping-profiles-list-ZHJEUIKJ.mjs → shipping-profiles-list-QFOG5IDH.mjs} +5 -4
- package/dist/{store-add-currencies-R26SVHT5.mjs → store-add-currencies-W4MWOALR.mjs} +5 -2
- package/dist/{store-detail-4K7TW2TP.mjs → store-detail-PUOKMK4K.mjs} +7 -5
- package/dist/{store-edit-EU55TNFU.mjs → store-edit-3DU5MC25.mjs} +24 -12
- package/dist/{store-metadata-JP2CI7EF.mjs → store-metadata-JYIVRRLW.mjs} +4 -2
- package/dist/{tax-region-create-W3K5IFD3.mjs → tax-region-create-2GDG36NQ.mjs} +5 -4
- package/dist/{tax-region-detail-V2F2DONN.mjs → tax-region-detail-MQKBEBOZ.mjs} +9 -7
- package/dist/{tax-region-edit-CJPMYTBF.mjs → tax-region-edit-2H5ACSFG.mjs} +3 -2
- package/dist/{tax-region-list-NMM3LBPN.mjs → tax-region-list-SQQE2GUU.mjs} +6 -5
- package/dist/{tax-region-province-create-GIIU2G7K.mjs → tax-region-province-create-SBRFGWN3.mjs} +2 -2
- package/dist/{tax-region-province-detail-4PUQ5ADW.mjs → tax-region-province-detail-HNK2ZJWL.mjs} +8 -6
- package/dist/{tax-region-tax-override-create-3SCIOK4P.mjs → tax-region-tax-override-create-XZJ3EIFJ.mjs} +15 -9
- package/dist/{tax-region-tax-override-edit-P3QJKET3.mjs → tax-region-tax-override-edit-QHQHFI2Y.mjs} +15 -9
- package/dist/{tax-region-tax-rate-create-Z43M3JTQ.mjs → tax-region-tax-rate-create-JIV5FXUD.mjs} +1 -1
- package/dist/{tax-region-tax-rate-edit-RBF5D2MK.mjs → tax-region-tax-rate-edit-WU2ZQLZQ.mjs} +1 -1
- package/dist/{user-detail-VIVFFLOW.mjs → user-detail-ZIWKV6QD.mjs} +3 -2
- package/dist/{user-invite-W26LOOW7.mjs → user-invite-KUH4AI2L.mjs} +4 -3
- package/dist/{user-list-3YFYZFSK.mjs → user-list-TPBPZ7KJ.mjs} +4 -3
- package/dist/{user-metadata-ZURLDLGC.mjs → user-metadata-F6KRFYDW.mjs} +4 -2
- package/dist/{workflow-execution-detail-4R6AFFHV.mjs → workflow-execution-detail-JRJZATNU.mjs} +8 -3
- package/dist/{workflow-execution-list-5J3DQQRD.mjs → workflow-execution-list-5WL4L464.mjs} +4 -3
- package/package.json +9 -9
- package/src/components/common/action-menu/action-menu.tsx +3 -1
- package/src/components/common/json-view-section/json-view-section.tsx +4 -1
- package/src/components/common/sidebar-link/sidebar-link.tsx +1 -1
- package/src/components/common/switch-box/switch-box.tsx +2 -0
- package/src/components/data-grid/components/data-grid-root.tsx +9 -3
- package/src/components/data-grid/components/data-grid-toggleable-number-cell.tsx +2 -1
- package/src/components/filtering/filter-group/filter-group.tsx +5 -1
- package/src/components/filtering/order-by/order-by.tsx +4 -1
- package/src/components/forms/address-form/address-form.tsx +7 -2
- package/src/components/forms/metadata-form/metadata-form.tsx +6 -3
- package/src/components/inputs/combobox/combobox.tsx +11 -11
- package/src/components/inputs/country-select/country-select.tsx +1 -1
- package/src/components/inputs/province-select/province-select.tsx +1 -1
- package/src/components/layout/main-layout/main-layout.tsx +7 -5
- package/src/components/layout/settings-layout/settings-layout.tsx +4 -0
- package/src/components/layout/shell/shell.tsx +6 -6
- package/src/components/layout/user-menu/user-menu.tsx +12 -10
- package/src/components/search/search.tsx +5 -3
- package/src/components/table/data-table/data-table-order-by/data-table-order-by.tsx +4 -1
- package/src/components/table/data-table/data-table-root/data-table-root.tsx +3 -3
- package/src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx +1 -1
- package/src/dashboard-app/routes/get-route.map.tsx +36 -0
- package/src/hooks/api/refund-reasons.tsx +105 -10
- package/src/hooks/table/columns/index.ts +1 -0
- package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +32 -0
- package/src/hooks/table/query/index.ts +1 -0
- package/src/hooks/table/query/use-refund-reason-table-query.tsx +32 -0
- package/src/hooks/use-document-direction.tsx +54 -0
- package/src/i18n/translations/$schema.json +185 -65
- package/src/i18n/translations/en.json +32 -0
- package/src/providers/i18n-provider/i18n-provider.tsx +9 -4
- package/src/routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +3 -3
- package/src/routes/campaigns/common/components/create-campaign-form-fields/create-campaign-form-fields.tsx +4 -1
- package/src/routes/categories/category-create/components/create-category-form/create-category-details.tsx +12 -3
- package/src/routes/categories/category-create/components/create-category-form/create-category-form.tsx +4 -3
- package/src/routes/categories/category-detail/components/category-organize-section/category-organize-section.tsx +1 -1
- package/src/routes/categories/category-edit/components/edit-category-form/edit-category-form.tsx +12 -3
- package/src/routes/inventory/inventory-create/components/inventory-create-form/inventory-create-form.tsx +3 -1
- package/src/routes/inventory/inventory-detail/components/inventory-item-variants/variants-section.tsx +1 -1
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-option-details-form.tsx +4 -1
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-form.tsx +3 -1
- package/src/routes/locations/location-service-zone-shipping-option-edit/components/edit-region-form/edit-shipping-option-form.tsx +7 -2
- package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-form.tsx +7 -2
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-create-form.tsx +2 -1
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-create-form.tsx +2 -1
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-create-form.tsx +2 -1
- package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-form.tsx +5 -1
- package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +3 -0
- package/src/routes/orders/order-create-return/components/return-create-form/return-create-form.tsx +2 -1
- package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/order-create-shipment-form.tsx +2 -0
- package/src/routes/orders/order-receive-return/components/order-receive-return-form/order-receive-return-form.tsx +2 -1
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-create-form.tsx +3 -1
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-details-form.tsx +8 -2
- package/src/routes/price-lists/price-list-edit/components/price-list-edit-form/edit-price-list-form.tsx +12 -3
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-form.tsx +10 -5
- package/src/routes/product-variants/product-variant-edit/components/product-edit-variant-form/product-edit-variant-form.tsx +4 -0
- package/src/routes/products/common/components/category-combobox/category-combobox.tsx +11 -11
- package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +3 -1
- package/src/routes/products/product-create-variant/components/create-product-variant-form/create-product-variant-form.tsx +10 -5
- package/src/routes/products/product-create-variant/components/create-product-variant-form/details-tab.tsx +6 -1
- package/src/routes/products/product-edit/components/edit-product-form/edit-product-form.tsx +7 -2
- package/src/routes/products/product-media/components/product-media-gallery/product-media-gallery.tsx +2 -2
- package/src/routes/products/product-stock/hooks/use-product-stock-columns.tsx +2 -1
- package/src/routes/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx +9 -3
- package/src/routes/promotions/common/edit-rules/components/rules-form-field/rules-form-field.tsx +4 -0
- package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/add-campaign-promotion-form.tsx +8 -2
- package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +12 -3
- package/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/edit-promotion-details-form.tsx +6 -1
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/refund-reason-create-form.tsx +131 -0
- package/src/routes/refund-reasons/refund-reason-create/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-create/refund-reason-create.tsx +10 -0
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/refund-reason-edit-form.tsx +119 -0
- package/src/routes/refund-reasons/refund-reason-edit/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-edit/refund-reason-edit.tsx +33 -0
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +130 -0
- package/src/routes/refund-reasons/refund-reason-list/index.ts +2 -0
- package/src/routes/refund-reasons/refund-reason-list/loader.ts +16 -0
- package/src/routes/refund-reasons/refund-reason-list/refund-reason-list.tsx +21 -0
- package/src/routes/regions/region-create/components/create-region-form/create-region-form.tsx +11 -2
- package/src/routes/regions/region-edit/components/edit-region-form/edit-region-form.tsx +11 -2
- package/src/routes/reservations/reservation-detail/components/edit-reservation/components/edit-reservation-form.tsx +3 -1
- package/src/routes/sales-channels/sales-channel-create/components/create-sales-channel-form/create-sales-channel-form.tsx +2 -0
- package/src/routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/edit-sales-channel-form.tsx +2 -0
- package/src/routes/store/store-add-currencies/components/add-currencies-form/add-currencies-form.tsx +2 -0
- package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +7 -2
- package/src/routes/tax-regions/tax-region-tax-override-create/components/tax-region-override-create-form/tax-region-tax-override-create.tsx +3 -1
- package/src/routes/tax-regions/tax-region-tax-override-edit/components/tax-region-tax-override-edit-form/tax-region-tax-override-edit-form.tsx +3 -1
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +3 -2
@@ -29,10 +29,12 @@ import { useLogout, useMe } from "../../../hooks/api"
|
|
29
29
|
import { queryClient } from "../../../lib/query-client"
|
30
30
|
import { useGlobalShortcuts } from "../../../providers/keybind-provider/hooks"
|
31
31
|
import { useTheme } from "../../../providers/theme-provider"
|
32
|
+
import { useDocumentDirection } from "../../../hooks/use-document-direction"
|
32
33
|
|
33
34
|
export const UserMenu = () => {
|
34
35
|
const { t } = useTranslation()
|
35
36
|
const location = useLocation()
|
37
|
+
const direction = useDocumentDirection()
|
36
38
|
|
37
39
|
const [openMenu, setOpenMenu] = useState(false)
|
38
40
|
const [openModal, setOpenModal] = useState(false)
|
@@ -44,33 +46,33 @@ export const UserMenu = () => {
|
|
44
46
|
|
45
47
|
return (
|
46
48
|
<div>
|
47
|
-
<DropdownMenu open={openMenu} onOpenChange={setOpenMenu}>
|
49
|
+
<DropdownMenu dir={direction} open={openMenu} onOpenChange={setOpenMenu}>
|
48
50
|
<UserBadge />
|
49
51
|
<DropdownMenu.Content className="min-w-[var(--radix-dropdown-menu-trigger-width)] max-w-[var(--radix-dropdown-menu-trigger-width)]">
|
50
52
|
<UserItem />
|
51
53
|
<DropdownMenu.Separator />
|
52
54
|
<DropdownMenu.Item asChild>
|
53
55
|
<Link to="/settings/profile" state={{ from: location.pathname }}>
|
54
|
-
<UserIcon className="text-ui-fg-subtle
|
56
|
+
<UserIcon className="text-ui-fg-subtle me-2" />
|
55
57
|
{t("app.menus.user.profileSettings")}
|
56
58
|
</Link>
|
57
59
|
</DropdownMenu.Item>
|
58
60
|
<DropdownMenu.Separator />
|
59
61
|
<DropdownMenu.Item asChild>
|
60
62
|
<Link to="https://docs.medusajs.com" target="_blank">
|
61
|
-
<BookOpen className="text-ui-fg-subtle
|
63
|
+
<BookOpen className="text-ui-fg-subtle me-2" />
|
62
64
|
{t("app.menus.user.documentation")}
|
63
65
|
</Link>
|
64
66
|
</DropdownMenu.Item>
|
65
67
|
<DropdownMenu.Item asChild>
|
66
68
|
<Link to="https://medusajs.com/changelog/" target="_blank">
|
67
|
-
<TimelineVertical className="text-ui-fg-subtle
|
69
|
+
<TimelineVertical className="text-ui-fg-subtle me-2" />
|
68
70
|
{t("app.menus.user.changelog")}
|
69
71
|
</Link>
|
70
72
|
</DropdownMenu.Item>
|
71
73
|
<DropdownMenu.Separator />
|
72
74
|
<DropdownMenu.Item onClick={toggleModal}>
|
73
|
-
<Keyboard className="text-ui-fg-subtle
|
75
|
+
<Keyboard className="text-ui-fg-subtle me-2" />
|
74
76
|
{t("app.menus.user.shortcuts")}
|
75
77
|
</DropdownMenu.Item>
|
76
78
|
<ThemeToggle />
|
@@ -93,7 +95,7 @@ const UserBadge = () => {
|
|
93
95
|
|
94
96
|
if (isPending) {
|
95
97
|
return (
|
96
|
-
<button className="shadow-borders-base flex max-w-[192px] select-none items-center gap-x-2 overflow-hidden text-ellipsis whitespace-nowrap rounded-full py-1
|
98
|
+
<button className="shadow-borders-base flex max-w-[192px] select-none items-center gap-x-2 overflow-hidden text-ellipsis whitespace-nowrap rounded-full py-1 ps-1 pe-2.5">
|
97
99
|
<Skeleton className="h-5 w-5 rounded-full" />
|
98
100
|
<Skeleton className="h-[9px] w-[70px]" />
|
99
101
|
</button>
|
@@ -109,7 +111,7 @@ const UserBadge = () => {
|
|
109
111
|
<DropdownMenu.Trigger
|
110
112
|
disabled={!user}
|
111
113
|
className={clx(
|
112
|
-
"bg-ui-bg-subtle grid w-full cursor-pointer grid-cols-[24px_1fr_15px] items-center gap-2 rounded-md py-1
|
114
|
+
"bg-ui-bg-subtle grid w-full cursor-pointer grid-cols-[24px_1fr_15px] items-center gap-2 rounded-md py-1 ps-0.5 pe-2 outline-none",
|
113
115
|
"hover:bg-ui-bg-subtle-hover",
|
114
116
|
"data-[state=open]:bg-ui-bg-subtle-hover",
|
115
117
|
"focus-visible:shadow-borders-focus"
|
@@ -148,9 +150,9 @@ const ThemeToggle = () => {
|
|
148
150
|
|
149
151
|
return (
|
150
152
|
<DropdownMenu.SubMenu>
|
151
|
-
<DropdownMenu.SubMenuTrigger className="rounded-md">
|
152
|
-
<CircleHalfSolid className="text-ui-fg-subtle
|
153
|
-
{t("app.menus.user.theme.label")}
|
153
|
+
<DropdownMenu.SubMenuTrigger dir="ltr" className="rounded-md rtl:rotate-180">
|
154
|
+
<CircleHalfSolid className="text-ui-fg-subtle me-2" />
|
155
|
+
<span className="rtl:rotate-180">{t("app.menus.user.theme.label")}</span>
|
154
156
|
</DropdownMenu.SubMenuTrigger>
|
155
157
|
<DropdownMenu.SubMenuContent>
|
156
158
|
<DropdownMenu.RadioGroup value={theme}>
|
@@ -44,6 +44,7 @@ import {
|
|
44
44
|
} from "./constants"
|
45
45
|
import { SearchArea } from "./types"
|
46
46
|
import { useSearchResults } from "./use-search-results"
|
47
|
+
import { useDocumentDirection } from "../../hooks/use-document-direction"
|
47
48
|
|
48
49
|
export const Search = () => {
|
49
50
|
const [area, setArea] = useState<SearchArea>("all")
|
@@ -54,6 +55,7 @@ export const Search = () => {
|
|
54
55
|
const { t } = useTranslation()
|
55
56
|
const navigate = useNavigate()
|
56
57
|
|
58
|
+
|
57
59
|
const inputRef = useRef<HTMLInputElement>(null)
|
58
60
|
const listRef = useRef<HTMLDivElement>(null)
|
59
61
|
|
@@ -367,7 +369,7 @@ const CommandInput = forwardRef<
|
|
367
369
|
) => {
|
368
370
|
const { t } = useTranslation()
|
369
371
|
const innerRef = useRef<HTMLInputElement>(null)
|
370
|
-
|
372
|
+
const direction = useDocumentDirection()
|
371
373
|
useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(
|
372
374
|
ref,
|
373
375
|
() => innerRef.current
|
@@ -376,7 +378,7 @@ const CommandInput = forwardRef<
|
|
376
378
|
return (
|
377
379
|
<div className="flex flex-col border-b">
|
378
380
|
<div className="px-4 pt-4">
|
379
|
-
<DropdownMenu>
|
381
|
+
<DropdownMenu dir={direction}>
|
380
382
|
<DropdownMenu.Trigger asChild>
|
381
383
|
<Badge
|
382
384
|
size="2xsmall"
|
@@ -432,7 +434,7 @@ const CommandInput = forwardRef<
|
|
432
434
|
)}
|
433
435
|
{...props}
|
434
436
|
/>
|
435
|
-
<div className="absolute
|
437
|
+
<div className="absolute end-4 top-1/2 flex -translate-y-1/2 items-center justify-end gap-x-2">
|
436
438
|
{isFetching && (
|
437
439
|
<Spinner className="text-ui-fg-muted animate-spin" />
|
438
440
|
)}
|
@@ -4,6 +4,8 @@ import { useState } from "react"
|
|
4
4
|
import { useTranslation } from "react-i18next"
|
5
5
|
import { useSearchParams } from "react-router-dom"
|
6
6
|
|
7
|
+
import { useDocumentDirection } from "../../../../hooks/use-document-direction"
|
8
|
+
|
7
9
|
export type DataTableOrderByKey<TData> = {
|
8
10
|
key: keyof TData
|
9
11
|
label: string
|
@@ -54,6 +56,7 @@ export const DataTableOrderBy = <TData,>({
|
|
54
56
|
}>(initState(searchParams, prefix))
|
55
57
|
const param = prefix ? `${prefix}_order` : "order"
|
56
58
|
const { t } = useTranslation()
|
59
|
+
const direction = useDocumentDirection()
|
57
60
|
|
58
61
|
const handleDirChange = (dir: string) => {
|
59
62
|
setState((prev) => ({
|
@@ -97,7 +100,7 @@ export const DataTableOrderBy = <TData,>({
|
|
97
100
|
}
|
98
101
|
|
99
102
|
return (
|
100
|
-
<DropdownMenu>
|
103
|
+
<DropdownMenu dir={direction}>
|
101
104
|
<DropdownMenu.Trigger asChild>
|
102
105
|
<IconButton size="small">
|
103
106
|
<DescendingSorting />
|
@@ -262,7 +262,7 @@ export const DataTableRoot = <TData,>({
|
|
262
262
|
<Table.Cell
|
263
263
|
key={cell.id}
|
264
264
|
className={clx({
|
265
|
-
"!
|
265
|
+
"!ps-0 !pe-0": shouldRenderAsLink,
|
266
266
|
"bg-ui-bg-base group-data-[selected=true]/row:bg-ui-bg-highlight group-data-[selected=true]/row:group-hover/row:bg-ui-bg-highlight-hover group-hover/row:bg-ui-bg-base-hover transition-fg group-has-[[data-row-link]:focus-visible]:bg-ui-bg-base-hover sticky left-0 after:absolute after:inset-y-0 after:right-0 after:h-full after:w-px after:bg-transparent after:content-['']":
|
267
267
|
isStickyCell,
|
268
268
|
"bg-ui-bg-subtle group-hover/row:bg-ui-bg-subtle-hover":
|
@@ -288,9 +288,9 @@ export const DataTableRoot = <TData,>({
|
|
288
288
|
>
|
289
289
|
<div
|
290
290
|
className={clx(
|
291
|
-
"flex size-full items-center
|
291
|
+
"flex size-full items-center pe-6",
|
292
292
|
{
|
293
|
-
"
|
293
|
+
"ps-6": isTabableLink && !hasLeftOffset,
|
294
294
|
}
|
295
295
|
)}
|
296
296
|
>
|
@@ -102,7 +102,7 @@ const FormExtensionFieldComponent = ({
|
|
102
102
|
return <Input {...field} placeholder={placeholder} type="number" />
|
103
103
|
}
|
104
104
|
case "boolean": {
|
105
|
-
return <Switch {...field} />
|
105
|
+
return <Switch className="rtl:rotate-180" dir="ltr" {...field} />
|
106
106
|
}
|
107
107
|
default: {
|
108
108
|
return (
|
@@ -1780,6 +1780,42 @@ export function getRouteMap({
|
|
1780
1780
|
},
|
1781
1781
|
],
|
1782
1782
|
},
|
1783
|
+
{
|
1784
|
+
path: "refund-reasons",
|
1785
|
+
element: <Outlet />,
|
1786
|
+
handle: {
|
1787
|
+
breadcrumb: () => t("refundReasons.domain"),
|
1788
|
+
},
|
1789
|
+
children: [
|
1790
|
+
{
|
1791
|
+
path: "",
|
1792
|
+
lazy: () =>
|
1793
|
+
import("../../routes/refund-reasons/refund-reason-list"),
|
1794
|
+
children: [
|
1795
|
+
{
|
1796
|
+
path: "create",
|
1797
|
+
lazy: () =>
|
1798
|
+
import(
|
1799
|
+
"../../routes/refund-reasons/refund-reason-create"
|
1800
|
+
),
|
1801
|
+
},
|
1802
|
+
|
1803
|
+
{
|
1804
|
+
path: ":id",
|
1805
|
+
children: [
|
1806
|
+
{
|
1807
|
+
path: "edit",
|
1808
|
+
lazy: () =>
|
1809
|
+
import(
|
1810
|
+
"../../routes/refund-reasons/refund-reason-edit"
|
1811
|
+
),
|
1812
|
+
},
|
1813
|
+
],
|
1814
|
+
},
|
1815
|
+
],
|
1816
|
+
},
|
1817
|
+
],
|
1818
|
+
},
|
1783
1819
|
...(settingsRoutes?.[0]?.children || []),
|
1784
1820
|
],
|
1785
1821
|
},
|
@@ -1,29 +1,124 @@
|
|
1
1
|
import { HttpTypes } from "@medusajs/types"
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
useMutation,
|
4
|
+
UseMutationOptions,
|
5
|
+
useQuery,
|
6
|
+
UseQueryOptions,
|
7
|
+
} from "@tanstack/react-query"
|
8
|
+
|
9
|
+
import { FetchError } from "@medusajs/js-sdk"
|
3
10
|
import { sdk } from "../../lib/client"
|
11
|
+
import { queryClient } from "../../lib/query-client"
|
4
12
|
import { queryKeysFactory } from "../../lib/query-key-factory"
|
5
|
-
import { FetchError } from "@medusajs/js-sdk"
|
6
13
|
|
7
|
-
const
|
8
|
-
export const
|
14
|
+
const REFUND_REASONS_QUERY_KEY = "refund_reasons" as const
|
15
|
+
export const refundReasonsQueryKeys = queryKeysFactory(REFUND_REASONS_QUERY_KEY)
|
9
16
|
|
10
17
|
export const useRefundReasons = (
|
11
|
-
query?: HttpTypes.
|
18
|
+
query?: HttpTypes.AdminRefundReasonListParams,
|
12
19
|
options?: Omit<
|
13
20
|
UseQueryOptions<
|
14
|
-
HttpTypes.
|
21
|
+
HttpTypes.AdminRefundReasonListResponse,
|
15
22
|
FetchError,
|
16
|
-
HttpTypes.
|
17
|
-
QueryKey
|
23
|
+
HttpTypes.AdminRefundReasonListResponse
|
18
24
|
>,
|
19
|
-
"
|
25
|
+
"queryFn" | "queryKey"
|
20
26
|
>
|
21
27
|
) => {
|
22
28
|
const { data, ...rest } = useQuery({
|
23
29
|
queryFn: () => sdk.admin.refundReason.list(query),
|
24
|
-
queryKey:
|
30
|
+
queryKey: refundReasonsQueryKeys.list(query),
|
25
31
|
...options,
|
26
32
|
})
|
27
33
|
|
28
34
|
return { ...data, ...rest }
|
29
35
|
}
|
36
|
+
|
37
|
+
export const useRefundReason = (
|
38
|
+
id: string,
|
39
|
+
query?: HttpTypes.AdminRefundReasonParams,
|
40
|
+
options?: Omit<
|
41
|
+
UseQueryOptions<
|
42
|
+
HttpTypes.AdminRefundReasonResponse,
|
43
|
+
FetchError,
|
44
|
+
HttpTypes.AdminRefundReasonResponse
|
45
|
+
>,
|
46
|
+
"queryFn" | "queryKey"
|
47
|
+
>
|
48
|
+
) => {
|
49
|
+
const { data, ...rest } = useQuery({
|
50
|
+
queryFn: () => sdk.admin.refundReason.retrieve(id, query),
|
51
|
+
queryKey: refundReasonsQueryKeys.detail(id),
|
52
|
+
...options,
|
53
|
+
})
|
54
|
+
|
55
|
+
return { ...data, ...rest }
|
56
|
+
}
|
57
|
+
|
58
|
+
export const useCreateRefundReason = (
|
59
|
+
query?: HttpTypes.AdminRefundReasonParams,
|
60
|
+
options?: UseMutationOptions<
|
61
|
+
HttpTypes.RefundReasonResponse,
|
62
|
+
FetchError,
|
63
|
+
HttpTypes.AdminCreateRefundReason
|
64
|
+
>
|
65
|
+
) => {
|
66
|
+
return useMutation({
|
67
|
+
mutationFn: async (data) => sdk.admin.refundReason.create(data, query),
|
68
|
+
onSuccess: (data, variables, context) => {
|
69
|
+
queryClient.invalidateQueries({
|
70
|
+
queryKey: refundReasonsQueryKeys.lists(),
|
71
|
+
})
|
72
|
+
|
73
|
+
options?.onSuccess?.(data, variables, context)
|
74
|
+
},
|
75
|
+
...options,
|
76
|
+
})
|
77
|
+
}
|
78
|
+
|
79
|
+
export const useUpdateRefundReason = (
|
80
|
+
id: string,
|
81
|
+
options?: UseMutationOptions<
|
82
|
+
HttpTypes.AdminRefundReasonResponse,
|
83
|
+
FetchError,
|
84
|
+
HttpTypes.AdminUpdateRefundReason
|
85
|
+
>
|
86
|
+
) => {
|
87
|
+
return useMutation({
|
88
|
+
mutationFn: async (data) => sdk.admin.refundReason.update(id, data),
|
89
|
+
onSuccess: (data, variables, context) => {
|
90
|
+
queryClient.invalidateQueries({
|
91
|
+
queryKey: refundReasonsQueryKeys.lists(),
|
92
|
+
})
|
93
|
+
queryClient.invalidateQueries({
|
94
|
+
queryKey: refundReasonsQueryKeys.detail(data.refund_reason.id),
|
95
|
+
})
|
96
|
+
|
97
|
+
options?.onSuccess?.(data, variables, context)
|
98
|
+
},
|
99
|
+
...options,
|
100
|
+
})
|
101
|
+
}
|
102
|
+
|
103
|
+
export const useDeleteRefundReasonLazy = (
|
104
|
+
options?: UseMutationOptions<
|
105
|
+
HttpTypes.AdminRefundReasonDeleteResponse,
|
106
|
+
FetchError,
|
107
|
+
string
|
108
|
+
>
|
109
|
+
) => {
|
110
|
+
return useMutation({
|
111
|
+
mutationFn: (id: string) => sdk.admin.refundReason.delete(id),
|
112
|
+
onSuccess: (data, variables, context) => {
|
113
|
+
queryClient.invalidateQueries({
|
114
|
+
queryKey: refundReasonsQueryKeys.lists(),
|
115
|
+
})
|
116
|
+
queryClient.invalidateQueries({
|
117
|
+
queryKey: refundReasonsQueryKeys.details(),
|
118
|
+
})
|
119
|
+
|
120
|
+
options?.onSuccess?.(data, variables, context)
|
121
|
+
},
|
122
|
+
...options,
|
123
|
+
})
|
124
|
+
}
|
@@ -6,6 +6,7 @@ export * from "./use-order-table-columns"
|
|
6
6
|
export * from "./use-product-table-columns"
|
7
7
|
export * from "./use-product-tag-table-columns"
|
8
8
|
export * from "./use-product-type-table-columns"
|
9
|
+
export * from "./use-refund-reason-table-columns"
|
9
10
|
export * from "./use-region-table-columns"
|
10
11
|
export * from "./use-return-reason-table-columns"
|
11
12
|
export * from "./use-tax-rates-table-columns"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types"
|
2
|
+
import { useMemo } from "react"
|
3
|
+
import { useTranslation } from "react-i18next"
|
4
|
+
import { createDataTableColumnHelper } from "@medusajs/ui"
|
5
|
+
import { DescriptionCell } from "../../../components/table/table-cells/sales-channel/description-cell"
|
6
|
+
|
7
|
+
const columnHelper = createDataTableColumnHelper<HttpTypes.AdminRefundReason>()
|
8
|
+
|
9
|
+
export const useRefundReasonTableColumns = () => {
|
10
|
+
const { t } = useTranslation()
|
11
|
+
|
12
|
+
return useMemo(
|
13
|
+
() => [
|
14
|
+
columnHelper.accessor("label", {
|
15
|
+
header: () => t("fields.label"),
|
16
|
+
enableSorting: true,
|
17
|
+
sortLabel: t("fields.label"),
|
18
|
+
sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
|
19
|
+
sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
|
20
|
+
}),
|
21
|
+
columnHelper.accessor("description", {
|
22
|
+
header: () => t("fields.description"),
|
23
|
+
cell: ({ getValue }) => <DescriptionCell description={getValue()} />,
|
24
|
+
enableSorting: true,
|
25
|
+
sortLabel: t("fields.description"),
|
26
|
+
sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
|
27
|
+
sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
|
28
|
+
}),
|
29
|
+
],
|
30
|
+
[t]
|
31
|
+
)
|
32
|
+
}
|
@@ -6,6 +6,7 @@ export * from "./use-order-table-query"
|
|
6
6
|
export * from "./use-product-table-query"
|
7
7
|
export * from "./use-product-tag-table-query"
|
8
8
|
export * from "./use-product-type-table-query"
|
9
|
+
export * from "./use-refund-reason-table-query"
|
9
10
|
export * from "./use-region-table-query"
|
10
11
|
export * from "./use-return-reason-table-query"
|
11
12
|
export * from "./use-shipping-option-table-query"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types"
|
2
|
+
import { useQueryParams } from "../../use-query-params"
|
3
|
+
|
4
|
+
type UseRefundReasonTableQueryProps = {
|
5
|
+
prefix?: string
|
6
|
+
pageSize?: number
|
7
|
+
}
|
8
|
+
|
9
|
+
export const useRefundReasonTableQuery = ({
|
10
|
+
prefix,
|
11
|
+
pageSize = 20,
|
12
|
+
}: UseRefundReasonTableQueryProps) => {
|
13
|
+
const queryObject = useQueryParams(
|
14
|
+
["offset", "q", "order", "created_at", "updated_at"],
|
15
|
+
prefix
|
16
|
+
)
|
17
|
+
|
18
|
+
const { offset, q, order, created_at, updated_at } = queryObject
|
19
|
+
const searchParams: HttpTypes.AdminRefundReasonListParams = {
|
20
|
+
limit: pageSize,
|
21
|
+
offset: offset ? Number(offset) : 0,
|
22
|
+
order,
|
23
|
+
created_at: created_at ? JSON.parse(created_at) : undefined,
|
24
|
+
updated_at: updated_at ? JSON.parse(updated_at) : undefined,
|
25
|
+
q,
|
26
|
+
}
|
27
|
+
|
28
|
+
return {
|
29
|
+
searchParams,
|
30
|
+
raw: queryObject,
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { useEffect, useState } from "react"
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Hook to get the current document direction (ltr/rtl) and listen for changes
|
5
|
+
* @returns The current document direction as "ltr" | "rtl" | undefined
|
6
|
+
*/
|
7
|
+
export const useDocumentDirection = (): "ltr" | "rtl" | undefined => {
|
8
|
+
const [direction, setDirection] = useState<"ltr" | "rtl" | undefined>(() => {
|
9
|
+
// Initialize with current value
|
10
|
+
if (typeof document !== "undefined") {
|
11
|
+
return (
|
12
|
+
(document.documentElement.getAttribute("dir") as "ltr" | "rtl") ||
|
13
|
+
undefined
|
14
|
+
)
|
15
|
+
}
|
16
|
+
return undefined
|
17
|
+
})
|
18
|
+
|
19
|
+
useEffect(() => {
|
20
|
+
// Only run on client side
|
21
|
+
if (typeof document === "undefined") {
|
22
|
+
return
|
23
|
+
}
|
24
|
+
|
25
|
+
// Create a MutationObserver to watch for changes to the dir attribute
|
26
|
+
const observer = new MutationObserver((mutations) => {
|
27
|
+
mutations.forEach((mutation) => {
|
28
|
+
if (
|
29
|
+
mutation.type === "attributes" &&
|
30
|
+
mutation.attributeName === "dir" &&
|
31
|
+
mutation.target === document.documentElement
|
32
|
+
) {
|
33
|
+
const newDirection = document.documentElement.getAttribute("dir") as
|
34
|
+
| "ltr"
|
35
|
+
| "rtl"
|
36
|
+
setDirection(newDirection || undefined)
|
37
|
+
}
|
38
|
+
})
|
39
|
+
})
|
40
|
+
|
41
|
+
// Start observing the document element for attribute changes
|
42
|
+
observer.observe(document.documentElement, {
|
43
|
+
attributes: true,
|
44
|
+
attributeFilter: ["dir"],
|
45
|
+
})
|
46
|
+
|
47
|
+
// Cleanup observer on unmount
|
48
|
+
return () => {
|
49
|
+
observer.disconnect()
|
50
|
+
}
|
51
|
+
}, [])
|
52
|
+
|
53
|
+
return direction
|
54
|
+
}
|