@medusajs/dashboard 2.22.0 → 2.22.1
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-VGH4LCDR.mjs → add-campaign-promotions-IUQHZ5QA.mjs} +1 -1
- package/dist/{add-locales-3OTB5FQM.mjs → add-locales-FQQ5W3MB.mjs} +2 -2
- package/dist/{adjust-inventory-UPEEXXFU.mjs → adjust-inventory-DJFQZTLA.mjs} +1 -1
- package/dist/{api-key-management-create-ROQ6LKUO.mjs → api-key-management-create-7T2MCQ3T.mjs} +1 -1
- package/dist/{api-key-management-detail-PPQ6XGZ4.mjs → api-key-management-detail-X3AUNHCO.mjs} +9 -8
- package/dist/{api-key-management-edit-QGKZADJX.mjs → api-key-management-edit-S3GYYNWM.mjs} +1 -1
- package/dist/{api-key-management-list-OCQN2VOQ.mjs → api-key-management-list-WHT7LED5.mjs} +8 -7
- package/dist/{api-key-management-sales-channels-4NTNDHYS.mjs → api-key-management-sales-channels-3WYYKLST.mjs} +1 -1
- package/dist/app.js +13056 -12895
- package/dist/app.mjs +6 -6
- package/dist/{campaign-budget-edit-U6ZGFZCN.mjs → campaign-budget-edit-MVPC66RJ.mjs} +2 -2
- package/dist/{campaign-configuration-SESM5XWE.mjs → campaign-configuration-LTA6NKGQ.mjs} +1 -1
- package/dist/{campaign-create-KUN2YHP2.mjs → campaign-create-XZ3ZCDTE.mjs} +4 -4
- package/dist/{campaign-detail-EW4RJY64.mjs → campaign-detail-ILZA4DJG.mjs} +9 -8
- package/dist/{campaign-edit-TPU6ACYT.mjs → campaign-edit-V7KUN7M5.mjs} +1 -1
- package/dist/{campaign-list-ZGAMG2HJ.mjs → campaign-list-TPH4BBDI.mjs} +8 -7
- package/dist/{categories-metadata-3IX3Y7NM.mjs → categories-metadata-H3TZ7ZC7.mjs} +2 -2
- package/dist/{category-create-NMOUVBVL.mjs → category-create-AKYJLVJ2.mjs} +1 -1
- package/dist/{category-detail-ZIEUC7DM.mjs → category-detail-I6RNSMTN.mjs} +8 -7
- package/dist/{category-edit-HXRXUXIX.mjs → category-edit-PS34TOQX.mjs} +1 -1
- package/dist/{category-products-5GM6K37K.mjs → category-products-6DCNKT6C.mjs} +1 -1
- package/dist/{chunk-QQOHHUDU.mjs → chunk-23BHNQ2L.mjs} +2 -2
- package/dist/chunk-25A53KSK.mjs +156 -0
- package/dist/{chunk-SWN424AE.mjs → chunk-2XG5UPAM.mjs} +3 -3
- package/dist/{chunk-ZCERNCOX.mjs → chunk-34AF5R5P.mjs} +193 -193
- package/dist/{chunk-SOUK6BUQ.mjs → chunk-3M5AAW4J.mjs} +4 -4
- package/dist/{chunk-NANNVVYP.mjs → chunk-4KQBZRB4.mjs} +1 -1
- package/dist/{chunk-JLY6YSEE.mjs → chunk-7FR6ZF6H.mjs} +18 -181
- package/dist/{chunk-JNIMWJV2.mjs → chunk-AFAE54E2.mjs} +2 -2
- package/dist/{chunk-6HTZNHPT.mjs → chunk-B3R53QK3.mjs} +1 -1
- package/dist/{chunk-7ZGGLSE2.mjs → chunk-BXF2VPJX.mjs} +1 -1
- package/dist/{chunk-C36TGGI7.mjs → chunk-DBSNE3L2.mjs} +2 -2
- package/dist/{chunk-DJF6GPIA.mjs → chunk-DOJWUV5E.mjs} +1 -1
- package/dist/{chunk-L6OMZR2J.mjs → chunk-EBK5S7WC.mjs} +1 -1
- package/dist/chunk-HGXZ5BJO.mjs +153 -0
- package/dist/{chunk-WCLL7RVP.mjs → chunk-JPXF73N2.mjs} +1 -1
- package/dist/{chunk-G6CQOB4G.mjs → chunk-JZXJXG3V.mjs} +1 -1
- package/dist/{chunk-AKDC6BWT.mjs → chunk-M7FQTSDS.mjs} +2 -2
- package/dist/{chunk-3UMI3ISU.mjs → chunk-PRJK2BND.mjs} +41 -0
- package/dist/{chunk-LT7MP5JO.mjs → chunk-QFE4OVWT.mjs} +1 -1
- package/dist/{chunk-HZXJDVPI.mjs → chunk-QIK2SODO.mjs} +1 -1
- package/dist/{chunk-6MTTMX7E.mjs → chunk-QW3P2QHZ.mjs} +1 -1
- package/dist/{chunk-UHB4DWUF.mjs → chunk-R2A5UDCT.mjs} +1 -1
- package/dist/{chunk-ZH57KBU7.mjs → chunk-RDBROTJE.mjs} +6 -0
- package/dist/{chunk-Y5ZQ26VN.mjs → chunk-V3TXAU2Y.mjs} +1 -1
- package/dist/{chunk-3NS4FYII.mjs → chunk-VJIURRDA.mjs} +3 -3
- package/dist/{chunk-7QQQEODJ.mjs → chunk-WHWDHRC2.mjs} +1 -1
- package/dist/{chunk-O6JNJQ4K.mjs → chunk-Y2CXBS7S.mjs} +1 -1
- package/dist/{chunk-ZNSPQGIO.mjs → chunk-Z4CMG3I4.mjs} +1 -1
- package/dist/{collection-add-products-JZIEEVAD.mjs → collection-add-products-VHX3EDMB.mjs} +1 -1
- package/dist/{collection-create-ZGCQ3UZ4.mjs → collection-create-BIMST735.mjs} +1 -1
- package/dist/{collection-detail-STCDEYFR.mjs → collection-detail-7SG445Z7.mjs} +8 -7
- package/dist/{collection-edit-Q6UBZJBA.mjs → collection-edit-7E6KSC2T.mjs} +1 -1
- package/dist/{collection-list-7Q74YH4K.mjs → collection-list-4DQ3KSL6.mjs} +8 -7
- package/dist/{collection-metadata-G7HJW3YY.mjs → collection-metadata-CE5JGMBU.mjs} +2 -2
- package/dist/components.js +303 -294
- package/dist/components.mjs +10 -9
- package/dist/{customer-create-5OKTED3S.mjs → customer-create-DUJEC4OL.mjs} +1 -1
- package/dist/{customer-create-address-DXGXL3AR.mjs → customer-create-address-WB6EQTF7.mjs} +1 -1
- package/dist/{customer-detail-VDUTRECH.mjs → customer-detail-OCGWUEAC.mjs} +9 -8
- package/dist/{customer-edit-FCJB2CR3.mjs → customer-edit-45JRYR7C.mjs} +1 -1
- package/dist/{customer-export-CBHVVHT7.mjs → customer-export-SJ7TPUYZ.mjs} +1 -1
- package/dist/{customer-group-add-customers-2MXCI4AU.mjs → customer-group-add-customers-2LO4JWCL.mjs} +1 -1
- package/dist/{customer-group-create-UWEI2IIX.mjs → customer-group-create-46IX5XKC.mjs} +1 -1
- package/dist/{customer-group-detail-537L3QCV.mjs → customer-group-detail-YF4N3ZJQ.mjs} +8 -7
- package/dist/{customer-group-edit-OVOHPO3H.mjs → customer-group-edit-AE5DT44M.mjs} +1 -1
- package/dist/{customer-group-list-KTNZYQTD.mjs → customer-group-list-3ESALQFX.mjs} +8 -7
- package/dist/{customer-group-metadata-5FBOQTIC.mjs → customer-group-metadata-6VTJ63KW.mjs} +2 -2
- package/dist/{customer-list-F7FBYGDK.mjs → customer-list-6QEB7GKU.mjs} +8 -7
- package/dist/{customer-metadata-4AX44PFG.mjs → customer-metadata-MWH222DL.mjs} +2 -2
- package/dist/{customers-add-customer-group-V6FHGHBA.mjs → customers-add-customer-group-K4URSJBC.mjs} +1 -1
- package/dist/{edit-inventory-item-FIAC6T5S.mjs → edit-inventory-item-SIBKLOQ5.mjs} +1 -1
- package/dist/{edit-inventory-item-attributes-32SIJNVQ.mjs → edit-inventory-item-attributes-FX3YWI36.mjs} +1 -1
- package/dist/{edit-reservation-LKXCTILV.mjs → edit-reservation-E6WLT7GE.mjs} +1 -1
- package/dist/{edit-rules-P2W5U34C.mjs → edit-rules-VDWS7LUQ.mjs} +1 -1
- package/dist/{inventory-create-GZQWBRNZ.mjs → inventory-create-XQ6JNL34.mjs} +3 -3
- package/dist/{inventory-list-TNCHH5AH.mjs → inventory-list-XDAGS3IC.mjs} +8 -7
- package/dist/{inventory-metadata-WFC6F5S4.mjs → inventory-metadata-J5VYM2KL.mjs} +2 -2
- package/dist/{inventory-stock-ALPB5DHU.mjs → inventory-stock-OTM7XOOH.mjs} +4 -4
- package/dist/lib.js +6 -0
- package/dist/lib.mjs +5 -5
- package/dist/{location-create-W3N4OIRN.mjs → location-create-65BKVUH7.mjs} +1 -1
- package/dist/{location-edit-WR3GUO2A.mjs → location-edit-XWALWBUW.mjs} +1 -1
- package/dist/{location-fulfillment-providers-IPV42XHK.mjs → location-fulfillment-providers-KSYCKAE3.mjs} +1 -1
- package/dist/{location-list-WX3A2AFK.mjs → location-list-3YQAKOXL.mjs} +8 -7
- package/dist/{location-metadata-H6KEPDM6.mjs → location-metadata-AL6Y2C5Z.mjs} +2 -2
- package/dist/{location-sales-channels-Z4KJ6TA7.mjs → location-sales-channels-P2EKHRGZ.mjs} +1 -1
- package/dist/{location-service-zone-create-LPN2I2A6.mjs → location-service-zone-create-L7MUFXZ7.mjs} +1 -1
- package/dist/{location-service-zone-edit-J5ZQRLT6.mjs → location-service-zone-edit-EH6B7A24.mjs} +1 -1
- package/dist/{location-service-zone-manage-areas-S3D2NRGT.mjs → location-service-zone-manage-areas-SDLDMJO7.mjs} +1 -1
- package/dist/{location-service-zone-shipping-option-create-ZNL5ZAEF.mjs → location-service-zone-shipping-option-create-LOYMYV5B.mjs} +6 -6
- package/dist/{location-service-zone-shipping-option-edit-DUIVARUT.mjs → location-service-zone-shipping-option-edit-BARLZ7H6.mjs} +1 -1
- package/dist/{location-service-zone-shipping-option-pricing-ESOFTO36.mjs → location-service-zone-shipping-option-pricing-6DR7Z2W5.mjs} +6 -6
- package/dist/{order-allocate-items-WM3SQ6YO.mjs → order-allocate-items-CTQLV42Q.mjs} +1 -1
- package/dist/{order-create-claim-W2PFYFZZ.mjs → order-create-claim-P5WL2XWX.mjs} +5 -5
- package/dist/{order-create-edit-V52ZDF54.mjs → order-create-edit-7NCWX6UB.mjs} +4 -4
- package/dist/{order-create-exchange-5U3ULMBH.mjs → order-create-exchange-MU566SDR.mjs} +5 -5
- package/dist/{order-create-fulfillment-CT5XV576.mjs → order-create-fulfillment-57GSNWKY.mjs} +1 -1
- package/dist/{order-create-refund-VUOUFSMS.mjs → order-create-refund-SZT2AGMZ.mjs} +3 -3
- package/dist/{order-create-return-NWPAQFIJ.mjs → order-create-return-NNDQSKD3.mjs} +5 -5
- package/dist/{order-create-shipment-FVFRAISJ.mjs → order-create-shipment-RQK7EC47.mjs} +1 -1
- package/dist/{order-detail-DMWYRRGT.mjs → order-detail-ERHRK6W3.mjs} +2 -2
- package/dist/{order-edit-billing-address-NDCMYXJ6.mjs → order-edit-billing-address-XCGDGT6L.mjs} +1 -1
- package/dist/{order-edit-email-COPXQGIB.mjs → order-edit-email-7DJEDL7L.mjs} +1 -1
- package/dist/{order-edit-shipping-address-VZKXPB2N.mjs → order-edit-shipping-address-G6UVC32Y.mjs} +1 -1
- package/dist/{order-export-KZ7DK7W7.mjs → order-export-X4GFB4OT.mjs} +1 -1
- package/dist/{order-list-NQT2DVHU.mjs → order-list-Y4KAYHDB.mjs} +9 -8
- package/dist/{order-metadata-STLSWSXP.mjs → order-metadata-LX5ZWHQF.mjs} +2 -2
- package/dist/{order-receive-return-JA3JNAHR.mjs → order-receive-return-QXVVZFHF.mjs} +3 -3
- package/dist/{order-request-transfer-ZD5KDNCB.mjs → order-request-transfer-ZEQOYAL6.mjs} +1 -1
- package/dist/{policy-list-45PG7GBA.mjs → policy-list-ENDXAWFU.mjs} +1 -1
- package/dist/{price-list-configuration-TPUOHUER.mjs → price-list-configuration-BQZRBNXQ.mjs} +1 -1
- package/dist/{price-list-create-QPBMO7LD.mjs → price-list-create-XN53E6RE.mjs} +6 -6
- package/dist/{price-list-detail-SM4DA6L7.mjs → price-list-detail-2R24L2L3.mjs} +8 -7
- package/dist/{price-list-edit-5E2FLEHN.mjs → price-list-edit-7EIZ3FVK.mjs} +1 -1
- package/dist/{price-list-list-V4XVXOAV.mjs → price-list-list-B3PGM3ND.mjs} +8 -7
- package/dist/{price-list-metadata-DCSZAO2C.mjs → price-list-metadata-NTJKQEOE.mjs} +2 -2
- package/dist/{price-list-prices-add-QB2QORIN.mjs → price-list-prices-add-E3O2OI7K.mjs} +6 -6
- package/dist/{price-list-prices-edit-3EWBS4PO.mjs → price-list-prices-edit-L45MXHZR.mjs} +6 -6
- package/dist/{product-attributes-VDTTOEN6.mjs → product-attributes-FXOAXOQ5.mjs} +2 -2
- package/dist/{product-create-WUZ22WMJ.mjs → product-create-3XQUET7Y.mjs} +4 -4
- package/dist/{product-create-variant-ZMBY5CDO.mjs → product-create-variant-KZAUREQY.mjs} +3 -3
- package/dist/{product-detail-Q7R6CEZD.mjs → product-detail-EFCAHRXH.mjs} +2 -2
- package/dist/{product-edit-FIAXOVZP.mjs → product-edit-YKIGN4M3.mjs} +2 -2
- package/dist/product-export-VTUEQCYE.mjs +260 -0
- package/dist/{product-image-variants-edit-6MOKSV2U.mjs → product-image-variants-edit-Y3M56B2U.mjs} +1 -1
- package/dist/{product-list-UKJVYCMV.mjs → product-list-XAW4AQNH.mjs} +32 -174
- package/dist/{product-media-72TTTVV5.mjs → product-media-HGLANNNT.mjs} +10 -6
- package/dist/{product-metadata-4KPGJ36Y.mjs → product-metadata-LTW4M2N3.mjs} +2 -2
- package/dist/{product-option-create-4C2BHWTH.mjs → product-option-create-EIKW4V3P.mjs} +1 -1
- package/dist/{product-option-detail-WQCRUROA.mjs → product-option-detail-LE44YFQQ.mjs} +9 -8
- package/dist/{product-option-edit-O354X7DK.mjs → product-option-edit-5ZP4YBAR.mjs} +1 -1
- package/dist/{product-option-list-52TQV6GJ.mjs → product-option-list-JQGZMNPD.mjs} +8 -7
- package/dist/{product-option-metadata-K5E6CV4U.mjs → product-option-metadata-2G47V6ZL.mjs} +2 -2
- package/dist/{product-option-value-metadata-QJ6D5GPI.mjs → product-option-value-metadata-PDG22GD2.mjs} +2 -2
- package/dist/{product-options-manage-H3RCESKS.mjs → product-options-manage-NXZ6CDGE.mjs} +3 -3
- package/dist/{product-organization-PAEWTW56.mjs → product-organization-K6EGAZZC.mjs} +2 -2
- package/dist/{product-prices-DK6LKOIN.mjs → product-prices-B3DJOMTS.mjs} +3 -3
- package/dist/{product-shipping-profile-CGQN7EL4.mjs → product-shipping-profile-NDMCCENZ.mjs} +1 -1
- package/dist/{product-stock-G3QGRX2B.mjs → product-stock-FNMVF2RH.mjs} +4 -4
- package/dist/{product-tag-create-QRJM6LX5.mjs → product-tag-create-HBIXYJDZ.mjs} +1 -1
- package/dist/{product-tag-detail-27XONTR7.mjs → product-tag-detail-ZSPQRFDC.mjs} +9 -8
- package/dist/{product-tag-edit-XE5MJ7M2.mjs → product-tag-edit-TO2ACUK3.mjs} +1 -1
- package/dist/{product-tag-list-FB25LCY5.mjs → product-tag-list-D5HZNBL3.mjs} +9 -8
- package/dist/{product-tag-metadata-K563ZKCO.mjs → product-tag-metadata-7P3JGVYS.mjs} +2 -2
- package/dist/{product-type-create-T36A3NSA.mjs → product-type-create-2AZKVK35.mjs} +1 -1
- package/dist/{product-type-detail-HCA2AKIV.mjs → product-type-detail-JNFFSUC2.mjs} +8 -7
- package/dist/{product-type-edit-TGVPP66B.mjs → product-type-edit-SOLNOW3Y.mjs} +1 -1
- package/dist/{product-type-list-G3ROKD3W.mjs → product-type-list-2FWI6OVE.mjs} +8 -7
- package/dist/{product-type-metadata-Q4TNWB2C.mjs → product-type-metadata-HTEP2YTQ.mjs} +2 -2
- package/dist/{product-variant-detail-IEV2JJM7.mjs → product-variant-detail-FDCRPWMV.mjs} +2 -2
- package/dist/{product-variant-edit-CVG5DWFB.mjs → product-variant-edit-Z4ELZB47.mjs} +1 -1
- package/dist/{product-variant-manage-inventory-items-GJNQW7JC.mjs → product-variant-manage-inventory-items-W3ZQDUML.mjs} +1 -1
- package/dist/{product-variant-media-XT2EQ5M2.mjs → product-variant-media-JARM7GQW.mjs} +1 -1
- package/dist/{product-variant-metadata-YXMJ3XTG.mjs → product-variant-metadata-LP3RK7D3.mjs} +2 -2
- package/dist/{profile-edit-L3F567PF.mjs → profile-edit-S4F52I66.mjs} +1 -1
- package/dist/{promotion-add-campaign-5Q7YXHM3.mjs → promotion-add-campaign-MFC6I5JW.mjs} +4 -4
- package/dist/{promotion-create-G5A3CLSU.mjs → promotion-create-USUUTWHS.mjs} +5 -5
- package/dist/{promotion-edit-details-7BKQR36L.mjs → promotion-edit-details-3INVCAPZ.mjs} +2 -2
- package/dist/{promotion-list-F4UKF55J.mjs → promotion-list-SRJ6MO3U.mjs} +9 -8
- package/dist/{promotion-metadata-CFGQFARL.mjs → promotion-metadata-QNNWNI6S.mjs} +2 -2
- package/dist/{property-labels-WALH2AGU.mjs → property-labels-4PJQJXTH.mjs} +5 -5
- package/dist/{property-labels-edit-WOGYPDDG.mjs → property-labels-edit-5QFRPGAO.mjs} +3 -3
- package/dist/{refund-reason-create-PY3Z64HW.mjs → refund-reason-create-QXHOKWDZ.mjs} +1 -1
- package/dist/{refund-reason-edit-UYQP4C6W.mjs → refund-reason-edit-RQFGSNGN.mjs} +1 -1
- package/dist/{refund-reason-list-SM5XTUD5.mjs → refund-reason-list-RKULHAWA.mjs} +9 -8
- package/dist/{region-add-countries-ICNGZMFP.mjs → region-add-countries-L3LBC5SS.mjs} +1 -1
- package/dist/{region-create-VWAGH4BK.mjs → region-create-IISVSM64.mjs} +2 -2
- package/dist/{region-detail-IXDWO6A6.mjs → region-detail-L3YT7CAJ.mjs} +1 -1
- package/dist/{region-edit-LDKU5GRF.mjs → region-edit-6TJFOZ6L.mjs} +2 -2
- package/dist/{region-list-P5BUNYLG.mjs → region-list-UOWKWKH3.mjs} +8 -7
- package/dist/{region-metadata-QNHAH2KJ.mjs → region-metadata-2GTR2Q4K.mjs} +2 -2
- package/dist/{reservation-create-OFCQFQAO.mjs → reservation-create-TJPEHJO4.mjs} +1 -1
- package/dist/{reservation-list-7R3KIRZM.mjs → reservation-list-3IBGFDFV.mjs} +8 -7
- package/dist/{reservation-metadata-W4CVXJXT.mjs → reservation-metadata-H6XWWZ7O.mjs} +2 -2
- package/dist/{return-reason-create-NNPGF6E6.mjs → return-reason-create-GLORKWFC.mjs} +1 -1
- package/dist/{return-reason-edit-BMSZB2JK.mjs → return-reason-edit-G2KHDOVU.mjs} +1 -1
- package/dist/{return-reason-list-IIKH6WL6.mjs → return-reason-list-2NBTNAH3.mjs} +9 -8
- package/dist/{role-add-users-UIEDW5HE.mjs → role-add-users-O7CTRYF2.mjs} +1 -1
- package/dist/{role-create-M3Y7KHT5.mjs → role-create-J5TXRN2A.mjs} +1 -1
- package/dist/{role-edit-76JHBTDL.mjs → role-edit-6CTPHWGH.mjs} +1 -1
- package/dist/{role-permissions-7D7D37MZ.mjs → role-permissions-F6WANR5D.mjs} +1 -1
- package/dist/{sales-channel-add-products-OUWMFPUM.mjs → sales-channel-add-products-S7NJUD3G.mjs} +1 -1
- package/dist/{sales-channel-create-YMFBTQTV.mjs → sales-channel-create-YDM7SRWK.mjs} +1 -1
- package/dist/{sales-channel-edit-CQOUQ4HC.mjs → sales-channel-edit-BPTKLMWV.mjs} +1 -1
- package/dist/{sales-channel-list-26DGOXPN.mjs → sales-channel-list-P7JPONDZ.mjs} +9 -8
- package/dist/{sales-channel-metadata-DYXIDARU.mjs → sales-channel-metadata-R36JO2U7.mjs} +2 -2
- package/dist/{search-index-list-UMBYJEE2.mjs → search-index-list-UUJXL4UL.mjs} +1 -1
- package/dist/{settings-NUX5MO5M.mjs → settings-L3FQOPX3.mjs} +1 -1
- package/dist/{shipping-option-type-create-E3U6A5AP.mjs → shipping-option-type-create-O62NAECA.mjs} +1 -1
- package/dist/{shipping-option-type-edit-AWLY6VGH.mjs → shipping-option-type-edit-NZQQSODS.mjs} +1 -1
- package/dist/{shipping-option-type-list-IS33BXIS.mjs → shipping-option-type-list-MZGGUXYT.mjs} +8 -7
- package/dist/{shipping-profile-create-Q4MANTUB.mjs → shipping-profile-create-WPLVLDXG.mjs} +1 -1
- package/dist/{shipping-profile-metadata-3E3MFK6S.mjs → shipping-profile-metadata-IEQP6IVY.mjs} +2 -2
- package/dist/{shipping-profiles-list-R2OKGF64.mjs → shipping-profiles-list-3TNRV7U4.mjs} +8 -7
- package/dist/{store-add-currencies-PM37F2M6.mjs → store-add-currencies-HBAN3GWA.mjs} +1 -1
- package/dist/{store-add-locales-TF4A4LOI.mjs → store-add-locales-VJWN65EE.mjs} +2 -2
- package/dist/{store-edit-BUNHDYE2.mjs → store-edit-SKGGBBFN.mjs} +1 -1
- package/dist/{store-metadata-XQI3KTO6.mjs → store-metadata-4P3U6G7J.mjs} +2 -2
- package/dist/{tax-region-create-HESVWGCI.mjs → tax-region-create-AI2IQGAX.mjs} +1 -1
- package/dist/{tax-region-detail-4N5VVAA3.mjs → tax-region-detail-OOB7SOFT.mjs} +10 -10
- package/dist/{tax-region-edit-T534TZN6.mjs → tax-region-edit-AAVTEU6A.mjs} +1 -1
- package/dist/{tax-region-province-create-PM3ZTK5Q.mjs → tax-region-province-create-UDBHBE66.mjs} +1 -1
- package/dist/{tax-region-province-detail-LP6LQFU3.mjs → tax-region-province-detail-RW6ORJ3I.mjs} +10 -10
- package/dist/{tax-region-tax-override-create-EOSGUTGM.mjs → tax-region-tax-override-create-7BXNHR5F.mjs} +8 -8
- package/dist/{tax-region-tax-override-edit-RFHZPX7T.mjs → tax-region-tax-override-edit-VTP7B3W3.mjs} +9 -9
- package/dist/{tax-region-tax-rate-create-23WNEWRS.mjs → tax-region-tax-rate-create-4MNRDQMB.mjs} +1 -1
- package/dist/{tax-region-tax-rate-edit-II6LQJU7.mjs → tax-region-tax-rate-edit-EQEPSONV.mjs} +1 -1
- package/dist/{translations-edit-IGHIRXSY.mjs → translations-edit-3264U52X.mjs} +3 -3
- package/dist/{user-edit-QAGGKUD5.mjs → user-edit-UYE4NST2.mjs} +1 -1
- package/dist/{user-invite-DDESHVJK.mjs → user-invite-RLAG4P4K.mjs} +1 -1
- package/dist/{user-list-KIRMDCPZ.mjs → user-list-GN3FM5YA.mjs} +8 -7
- package/dist/{user-metadata-FIHOQQBD.mjs → user-metadata-BVIBE7ID.mjs} +2 -2
- package/package.json +9 -9
- package/src/__tests__/vite-config.spec.ts +46 -0
- package/src/components/table/configurable-data-table/configurable-data-table.tsx +1 -27
- package/src/components/utilities/keybound-form/__tests__/keybound-form.spec.ts +65 -0
- package/src/components/utilities/keybound-form/keybound-form.tsx +3 -1
- package/src/hooks/table/query/index.ts +1 -0
- package/src/hooks/table/query/parse-prefixed-query-params.ts +64 -0
- package/src/hooks/table/use-column-filters.tsx +44 -0
- package/src/hooks/table/use-table-configuration.tsx +3 -34
- package/src/lib/data/currencies.ts +6 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-inbound-item.tsx +2 -1
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-inbound-item.tsx +2 -1
- package/src/routes/orders/order-create-return/components/return-create-form/return-item.tsx +2 -1
- package/src/routes/products/product-export/components/configurable-export-filters.spec.tsx +69 -0
- package/src/routes/products/product-export/components/configurable-export-filters.tsx +104 -0
- package/src/routes/products/product-export/components/export-filters.tsx +14 -2
- package/src/routes/products/product-export/product-export.spec.tsx +131 -0
- package/src/routes/products/product-export/product-export.tsx +24 -4
- package/src/routes/products/product-media/components/edit-product-media-form/edit-product-media-form.spec.tsx +164 -0
- package/src/routes/products/product-media/components/edit-product-media-form/edit-product-media-form.tsx +13 -9
- package/dist/product-export-FVEBRZUJ.mjs +0 -138
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
TargetItem,
|
|
4
4
|
TaxRateRuleReferenceSchema,
|
|
5
5
|
createTaxRulePayload
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JZXJXG3V.mjs";
|
|
7
7
|
import {
|
|
8
8
|
PercentageInput
|
|
9
9
|
} from "./chunk-677UVYOL.mjs";
|
|
@@ -17,7 +17,7 @@ import "./chunk-KFT4EHYM.mjs";
|
|
|
17
17
|
import "./chunk-K44PQXQY.mjs";
|
|
18
18
|
import "./chunk-GSZPEFBC.mjs";
|
|
19
19
|
import "./chunk-CTMLEFNG.mjs";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-QW3P2QHZ.mjs";
|
|
21
21
|
import "./chunk-FW5EX2XG.mjs";
|
|
22
22
|
import "./chunk-ADOCJB6L.mjs";
|
|
23
23
|
import "./chunk-DRHDNSJA.mjs";
|
|
@@ -37,20 +37,20 @@ import "./chunk-OPMQF765.mjs";
|
|
|
37
37
|
import "./chunk-3PLXVPOV.mjs";
|
|
38
38
|
import "./chunk-PABIC6D7.mjs";
|
|
39
39
|
import "./chunk-EMIHDNB7.mjs";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-PRJK2BND.mjs";
|
|
41
41
|
import "./chunk-RIV7FKGN.mjs";
|
|
42
42
|
import "./chunk-CEYKNZTH.mjs";
|
|
43
43
|
import "./chunk-WRSGHGAT.mjs";
|
|
44
44
|
import "./chunk-MOSRJHJ3.mjs";
|
|
45
45
|
import "./chunk-R65S6ZZV.mjs";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-V3TXAU2Y.mjs";
|
|
47
47
|
import "./chunk-JIH7UPZU.mjs";
|
|
48
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-WHWDHRC2.mjs";
|
|
49
49
|
import "./chunk-NTEWUH4C.mjs";
|
|
50
50
|
import "./chunk-XQCYSVGP.mjs";
|
|
51
51
|
import "./chunk-XEEPMJRY.mjs";
|
|
52
52
|
import "./chunk-P5RN6AUG.mjs";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-JPXF73N2.mjs";
|
|
54
54
|
import "./chunk-P3UUX2T6.mjs";
|
|
55
55
|
import "./chunk-DG7J63J2.mjs";
|
|
56
56
|
import {
|
|
@@ -59,11 +59,11 @@ import {
|
|
|
59
59
|
import "./chunk-IUCDCPJU.mjs";
|
|
60
60
|
import {
|
|
61
61
|
KeyboundForm
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-B3R53QK3.mjs";
|
|
63
63
|
import "./chunk-IFQC5X3W.mjs";
|
|
64
64
|
import "./chunk-LPEUYMRK.mjs";
|
|
65
65
|
import "./chunk-C76H5USB.mjs";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-RDBROTJE.mjs";
|
|
67
67
|
import "./chunk-MNXC6Q4F.mjs";
|
|
68
68
|
import "./chunk-ZY7CAOHZ.mjs";
|
|
69
69
|
import "./chunk-2JYTX67H.mjs";
|
package/dist/{tax-region-tax-override-edit-RFHZPX7T.mjs → tax-region-tax-override-edit-VTP7B3W3.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DISPLAY_OVERRIDE_ITEMS_LIMIT,
|
|
3
3
|
TaxRegionTaxOverrideEditForm
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-M7FQTSDS.mjs";
|
|
5
|
+
import "./chunk-JZXJXG3V.mjs";
|
|
6
6
|
import "./chunk-677UVYOL.mjs";
|
|
7
7
|
import "./chunk-UC26CCHZ.mjs";
|
|
8
8
|
import "./chunk-UQQD6PHX.mjs";
|
|
@@ -14,7 +14,7 @@ import "./chunk-KFT4EHYM.mjs";
|
|
|
14
14
|
import "./chunk-K44PQXQY.mjs";
|
|
15
15
|
import "./chunk-GSZPEFBC.mjs";
|
|
16
16
|
import "./chunk-CTMLEFNG.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-QW3P2QHZ.mjs";
|
|
18
18
|
import "./chunk-FW5EX2XG.mjs";
|
|
19
19
|
import "./chunk-ADOCJB6L.mjs";
|
|
20
20
|
import "./chunk-DRHDNSJA.mjs";
|
|
@@ -34,29 +34,29 @@ import "./chunk-OPMQF765.mjs";
|
|
|
34
34
|
import "./chunk-3PLXVPOV.mjs";
|
|
35
35
|
import "./chunk-PABIC6D7.mjs";
|
|
36
36
|
import "./chunk-EMIHDNB7.mjs";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-PRJK2BND.mjs";
|
|
38
38
|
import "./chunk-RIV7FKGN.mjs";
|
|
39
39
|
import "./chunk-CEYKNZTH.mjs";
|
|
40
40
|
import "./chunk-WRSGHGAT.mjs";
|
|
41
41
|
import "./chunk-MOSRJHJ3.mjs";
|
|
42
42
|
import "./chunk-R65S6ZZV.mjs";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-V3TXAU2Y.mjs";
|
|
44
44
|
import "./chunk-JIH7UPZU.mjs";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-WHWDHRC2.mjs";
|
|
46
46
|
import "./chunk-NTEWUH4C.mjs";
|
|
47
47
|
import "./chunk-XQCYSVGP.mjs";
|
|
48
48
|
import "./chunk-XEEPMJRY.mjs";
|
|
49
49
|
import "./chunk-P5RN6AUG.mjs";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-JPXF73N2.mjs";
|
|
51
51
|
import "./chunk-P3UUX2T6.mjs";
|
|
52
52
|
import "./chunk-DG7J63J2.mjs";
|
|
53
53
|
import "./chunk-PRLQLEEQ.mjs";
|
|
54
54
|
import "./chunk-IUCDCPJU.mjs";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-B3R53QK3.mjs";
|
|
56
56
|
import "./chunk-IFQC5X3W.mjs";
|
|
57
57
|
import "./chunk-LPEUYMRK.mjs";
|
|
58
58
|
import "./chunk-C76H5USB.mjs";
|
|
59
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-RDBROTJE.mjs";
|
|
60
60
|
import "./chunk-MNXC6Q4F.mjs";
|
|
61
61
|
import "./chunk-ZY7CAOHZ.mjs";
|
|
62
62
|
import "./chunk-2JYTX67H.mjs";
|
|
@@ -2,16 +2,16 @@ import "./chunk-GZW4X34M.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
DataGrid,
|
|
4
4
|
createDataGridHelper
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QIK2SODO.mjs";
|
|
6
6
|
import "./chunk-IUCDCPJU.mjs";
|
|
7
7
|
import {
|
|
8
8
|
KeyboundForm
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B3R53QK3.mjs";
|
|
10
10
|
import "./chunk-LPEUYMRK.mjs";
|
|
11
11
|
import {
|
|
12
12
|
useFeatureFlag
|
|
13
13
|
} from "./chunk-PJU3RODH.mjs";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-RDBROTJE.mjs";
|
|
15
15
|
import "./chunk-M6QL27ZL.mjs";
|
|
16
16
|
import {
|
|
17
17
|
RouteFocusModal,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "./chunk-3GLXEMCN.mjs";
|
|
2
2
|
import {
|
|
3
3
|
ConfigurableDataTable
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-7FR6ZF6H.mjs";
|
|
5
|
+
import "./chunk-HGXZ5BJO.mjs";
|
|
6
|
+
import "./chunk-PRJK2BND.mjs";
|
|
6
7
|
import "./chunk-RIV7FKGN.mjs";
|
|
7
8
|
import "./chunk-CEYKNZTH.mjs";
|
|
8
9
|
import "./chunk-WRSGHGAT.mjs";
|
|
@@ -11,16 +12,16 @@ import "./chunk-R65S6ZZV.mjs";
|
|
|
11
12
|
import {
|
|
12
13
|
createTableAdapter
|
|
13
14
|
} from "./chunk-UZVGDY3G.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-EBK5S7WC.mjs";
|
|
16
|
+
import "./chunk-V3TXAU2Y.mjs";
|
|
16
17
|
import "./chunk-JIH7UPZU.mjs";
|
|
17
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-WHWDHRC2.mjs";
|
|
18
19
|
import "./chunk-NTEWUH4C.mjs";
|
|
19
20
|
import "./chunk-XQCYSVGP.mjs";
|
|
20
21
|
import "./chunk-XEEPMJRY.mjs";
|
|
21
22
|
import "./chunk-P5RN6AUG.mjs";
|
|
22
23
|
import "./chunk-3VSHJ64Q.mjs";
|
|
23
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-JPXF73N2.mjs";
|
|
24
25
|
import "./chunk-P3UUX2T6.mjs";
|
|
25
26
|
import "./chunk-DG7J63J2.mjs";
|
|
26
27
|
import {
|
|
@@ -43,7 +44,7 @@ import {
|
|
|
43
44
|
import {
|
|
44
45
|
useQueryParams
|
|
45
46
|
} from "./chunk-C76H5USB.mjs";
|
|
46
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-RDBROTJE.mjs";
|
|
47
48
|
import "./chunk-MNXC6Q4F.mjs";
|
|
48
49
|
import "./chunk-ZY7CAOHZ.mjs";
|
|
49
50
|
import "./chunk-2JYTX67H.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./chunk-XRTVFYCW.mjs";
|
|
2
2
|
import {
|
|
3
3
|
MetadataForm
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4KQBZRB4.mjs";
|
|
5
5
|
import "./chunk-IUCDCPJU.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-B3R53QK3.mjs";
|
|
7
7
|
import "./chunk-LPEUYMRK.mjs";
|
|
8
8
|
import {
|
|
9
9
|
RouteDrawer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/dashboard",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsgo --noEmit -p tsconfig.typecheck.json",
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"@dnd-kit/utilities": "^3.2.2",
|
|
73
73
|
"@hookform/error-message": "^2.0.1",
|
|
74
74
|
"@hookform/resolvers": "5.5.7",
|
|
75
|
-
"@medusajs/admin-shared": "2.22.
|
|
76
|
-
"@medusajs/icons": "2.22.
|
|
77
|
-
"@medusajs/js-sdk": "2.22.
|
|
78
|
-
"@medusajs/ui": "4.2.
|
|
75
|
+
"@medusajs/admin-shared": "2.22.1",
|
|
76
|
+
"@medusajs/icons": "2.22.1",
|
|
77
|
+
"@medusajs/js-sdk": "2.22.1",
|
|
78
|
+
"@medusajs/ui": "4.2.8",
|
|
79
79
|
"@radix-ui/react-dialog": "1.1.4",
|
|
80
80
|
"@radix-ui/react-dismissable-layer": "1.1.4",
|
|
81
81
|
"@tanstack/react-query": "5.64.2",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
"zod": "4.2.0"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@medusajs/admin-shared": "2.22.
|
|
111
|
-
"@medusajs/admin-vite-plugin": "2.22.
|
|
112
|
-
"@medusajs/types": "2.22.
|
|
113
|
-
"@medusajs/ui-preset": "2.22.
|
|
110
|
+
"@medusajs/admin-shared": "2.22.1",
|
|
111
|
+
"@medusajs/admin-vite-plugin": "2.22.1",
|
|
112
|
+
"@medusajs/types": "2.22.1",
|
|
113
|
+
"@medusajs/ui-preset": "2.22.1",
|
|
114
114
|
"@types/qrcode": "^1.5.5",
|
|
115
115
|
"@typescript/native-preview": "^7.0.0-dev.20260423.1",
|
|
116
116
|
"eslint": "8",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { readFileSync } from "fs"
|
|
2
|
+
import { resolve } from "path"
|
|
3
|
+
import { describe, expect, it, vi } from "vitest"
|
|
4
|
+
|
|
5
|
+
vi.mock("vite", () => ({
|
|
6
|
+
defineConfig: (config: unknown) => config,
|
|
7
|
+
loadEnv: () => ({}),
|
|
8
|
+
}))
|
|
9
|
+
vi.mock("@medusajs/admin-vite-plugin", () => ({ default: () => ({}) }))
|
|
10
|
+
vi.mock("@vitejs/plugin-react", () => ({ default: () => ({}) }))
|
|
11
|
+
vi.mock("vite-plugin-inspect", () => ({ default: () => ({}) }))
|
|
12
|
+
|
|
13
|
+
const getDefine = async () => {
|
|
14
|
+
const configPath = resolve(__dirname, "../../vite.config.mts")
|
|
15
|
+
const { default: viteConfig } = await import(configPath)
|
|
16
|
+
const config = await viteConfig({
|
|
17
|
+
mode: "development",
|
|
18
|
+
command: "serve",
|
|
19
|
+
})
|
|
20
|
+
return config.define as Record<string, string>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe("dashboard vite config", () => {
|
|
24
|
+
it("should define every build-time constant declared in vite-env.d.ts", async () => {
|
|
25
|
+
const define = await getDefine()
|
|
26
|
+
|
|
27
|
+
const envTypes = readFileSync(
|
|
28
|
+
resolve(__dirname, "../vite-env.d.ts"),
|
|
29
|
+
"utf-8"
|
|
30
|
+
)
|
|
31
|
+
const declared = [...envTypes.matchAll(/declare const (__\w+__)/g)].map(
|
|
32
|
+
([, name]) => name
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
expect(declared.length).toBeGreaterThan(0)
|
|
36
|
+
expect(Object.keys(define)).toEqual(expect.arrayContaining(declared))
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it("should default to session auth and a 1MB upload limit", async () => {
|
|
40
|
+
const define = await getDefine()
|
|
41
|
+
|
|
42
|
+
expect(define.__AUTH_TYPE__).toBe(JSON.stringify("session"))
|
|
43
|
+
expect(define.__JWT_TOKEN_STORAGE_KEY__).toBe(JSON.stringify(""))
|
|
44
|
+
expect(define.__MAX_UPLOAD_FILE_SIZE__).toBe(JSON.stringify(1024 * 1024))
|
|
45
|
+
})
|
|
46
|
+
})
|
|
@@ -7,7 +7,7 @@ import { SaveViewDialog } from "../save-view-dialog"
|
|
|
7
7
|
import { SaveViewDropdown } from "./save-view-dropdown"
|
|
8
8
|
import { useTableConfiguration } from "../../../hooks/table/use-table-configuration"
|
|
9
9
|
import { useConfigurableTableColumns } from "../../../hooks/table/columns/use-configurable-table-columns"
|
|
10
|
-
import { parseFilterParam } from "../../../hooks/table/query"
|
|
10
|
+
import { expandDottedKeys, parseFilterParam } from "../../../hooks/table/query"
|
|
11
11
|
import {
|
|
12
12
|
createActionsColumn,
|
|
13
13
|
createSelectColumn,
|
|
@@ -26,32 +26,6 @@ type DataTableActionProps = {
|
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* Expand dotted param keys into nested objects so the SDK's qs serializer emits
|
|
31
|
-
* bracket notation the endpoint's nested filter schema expects, e.g.
|
|
32
|
-
* `{ "location_levels.location_id": ["x"] }` -> `{ location_levels: { location_id: ["x"] } }`
|
|
33
|
-
* -> `location_levels[location_id][0]=x`. Keys without a dot pass through.
|
|
34
|
-
*/
|
|
35
|
-
function expandDottedKeys(params: Record<string, any>): Record<string, any> {
|
|
36
|
-
const result: Record<string, any> = {}
|
|
37
|
-
for (const [key, value] of Object.entries(params)) {
|
|
38
|
-
if (!key.includes(".")) {
|
|
39
|
-
result[key] = value
|
|
40
|
-
continue
|
|
41
|
-
}
|
|
42
|
-
const parts = key.split(".")
|
|
43
|
-
let node = result
|
|
44
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
45
|
-
if (typeof node[parts[i]] !== "object" || node[parts[i]] === null) {
|
|
46
|
-
node[parts[i]] = {}
|
|
47
|
-
}
|
|
48
|
-
node = node[parts[i]]
|
|
49
|
-
}
|
|
50
|
-
node[parts[parts.length - 1]] = value
|
|
51
|
-
}
|
|
52
|
-
return result
|
|
53
|
-
}
|
|
54
|
-
|
|
55
29
|
export interface ConfigurableDataTableProps<TData> {
|
|
56
30
|
adapter: TableAdapter<TData>
|
|
57
31
|
heading?: string
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from "vitest"
|
|
2
|
+
|
|
3
|
+
const g = globalThis as any
|
|
4
|
+
g.HTMLTextAreaElement = class {}
|
|
5
|
+
g.HTMLButtonElement = class {}
|
|
6
|
+
g.HTMLAnchorElement = class {}
|
|
7
|
+
g.HTMLInputElement = class {}
|
|
8
|
+
|
|
9
|
+
import { KeyboundForm } from "../keybound-form"
|
|
10
|
+
|
|
11
|
+
const renderForm = () => {
|
|
12
|
+
const onSubmit = vi.fn()
|
|
13
|
+
const form = (KeyboundForm as any).render({ onSubmit }, null)
|
|
14
|
+
|
|
15
|
+
return { onKeyDown: form.props.onKeyDown, onSubmit }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const createEnterEvent = (
|
|
19
|
+
target: unknown,
|
|
20
|
+
modifiers: { metaKey?: boolean; ctrlKey?: boolean } = {}
|
|
21
|
+
) => ({
|
|
22
|
+
key: "Enter",
|
|
23
|
+
target,
|
|
24
|
+
metaKey: false,
|
|
25
|
+
ctrlKey: false,
|
|
26
|
+
preventDefault: vi.fn(),
|
|
27
|
+
...modifiers,
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
describe("KeyboundForm", () => {
|
|
31
|
+
it.each([
|
|
32
|
+
["button", () => new g.HTMLButtonElement()],
|
|
33
|
+
["link", () => new g.HTMLAnchorElement()],
|
|
34
|
+
])(
|
|
35
|
+
"should let Enter activate a focused %s",
|
|
36
|
+
(_, createTarget) => {
|
|
37
|
+
const { onKeyDown, onSubmit } = renderForm()
|
|
38
|
+
const event = createEnterEvent(createTarget())
|
|
39
|
+
|
|
40
|
+
onKeyDown(event)
|
|
41
|
+
|
|
42
|
+
expect(event.preventDefault).not.toHaveBeenCalled()
|
|
43
|
+
expect(onSubmit).not.toHaveBeenCalled()
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
it("should not submit the form when pressing Enter in an input", () => {
|
|
48
|
+
const { onKeyDown, onSubmit } = renderForm()
|
|
49
|
+
const event = createEnterEvent(new g.HTMLInputElement())
|
|
50
|
+
|
|
51
|
+
onKeyDown(event)
|
|
52
|
+
|
|
53
|
+
expect(event.preventDefault).toHaveBeenCalled()
|
|
54
|
+
expect(onSubmit).not.toHaveBeenCalled()
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
it("should submit the form when pressing Cmd+Enter or Ctrl+Enter", () => {
|
|
58
|
+
const { onKeyDown, onSubmit } = renderForm()
|
|
59
|
+
|
|
60
|
+
onKeyDown(createEnterEvent(new g.HTMLInputElement(), { metaKey: true }))
|
|
61
|
+
onKeyDown(createEnterEvent(new g.HTMLButtonElement(), { ctrlKey: true }))
|
|
62
|
+
|
|
63
|
+
expect(onSubmit).toHaveBeenCalledTimes(2)
|
|
64
|
+
})
|
|
65
|
+
})
|
|
@@ -15,7 +15,9 @@ export const KeyboundForm = React.forwardRef<
|
|
|
15
15
|
const handleKeyDown = (event: React.KeyboardEvent<HTMLFormElement>) => {
|
|
16
16
|
if (event.key === "Enter") {
|
|
17
17
|
if (
|
|
18
|
-
event.target instanceof HTMLTextAreaElement
|
|
18
|
+
(event.target instanceof HTMLTextAreaElement ||
|
|
19
|
+
event.target instanceof HTMLButtonElement ||
|
|
20
|
+
event.target instanceof HTMLAnchorElement) &&
|
|
19
21
|
!(event.metaKey || event.ctrlKey)
|
|
20
22
|
) {
|
|
21
23
|
return
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { parseFilterParam } from "./parse-filter-param"
|
|
2
|
+
|
|
3
|
+
const NON_FILTER_KEYS = ["offset", "limit", "order"]
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Expand dotted param keys into nested objects so the SDK's qs serializer emits
|
|
7
|
+
* bracket notation the endpoint's nested filter schema expects, e.g.
|
|
8
|
+
* `{ "location_levels.location_id": ["x"] }` -> `{ location_levels: { location_id: ["x"] } }`
|
|
9
|
+
* -> `location_levels[location_id][0]=x`. Keys without a dot pass through.
|
|
10
|
+
*/
|
|
11
|
+
export function expandDottedKeys(
|
|
12
|
+
params: Record<string, any>
|
|
13
|
+
): Record<string, any> {
|
|
14
|
+
const result: Record<string, any> = {}
|
|
15
|
+
for (const [key, value] of Object.entries(params)) {
|
|
16
|
+
if (!key.includes(".")) {
|
|
17
|
+
result[key] = value
|
|
18
|
+
continue
|
|
19
|
+
}
|
|
20
|
+
const parts = key.split(".")
|
|
21
|
+
let node = result
|
|
22
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
23
|
+
if (typeof node[parts[i]] !== "object" || node[parts[i]] === null) {
|
|
24
|
+
node[parts[i]] = {}
|
|
25
|
+
}
|
|
26
|
+
node = node[parts[i]]
|
|
27
|
+
}
|
|
28
|
+
node[parts[parts.length - 1]] = value
|
|
29
|
+
}
|
|
30
|
+
return result
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Builds API filters from the `<prefix>_*` URL params written by a
|
|
35
|
+
* configurable data table, where each filter value is stored as JSON.
|
|
36
|
+
*
|
|
37
|
+
* @param searchParams - The current URL search params.
|
|
38
|
+
* @param prefix - The table's query prefix, e.g. `p` for products.
|
|
39
|
+
* @returns The search query and filters, without pagination or sorting.
|
|
40
|
+
*/
|
|
41
|
+
export function parsePrefixedQueryParams(
|
|
42
|
+
searchParams: URLSearchParams,
|
|
43
|
+
prefix: string
|
|
44
|
+
): Record<string, any> {
|
|
45
|
+
const params: Record<string, any> = {}
|
|
46
|
+
|
|
47
|
+
searchParams.forEach((raw, prefixedKey) => {
|
|
48
|
+
if (!prefixedKey.startsWith(`${prefix}_`)) {
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const key = prefixedKey.slice(prefix.length + 1)
|
|
53
|
+
if (NON_FILTER_KEYS.includes(key)) {
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const value = key === "q" ? raw || undefined : parseFilterParam(raw)
|
|
58
|
+
if (value !== undefined) {
|
|
59
|
+
params[key] = value
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
return expandDottedKeys(params)
|
|
64
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { HttpTypes } from "@medusajs/types"
|
|
2
|
+
import { DataTableFilter } from "@medusajs/ui"
|
|
3
|
+
import { useMemo } from "react"
|
|
4
|
+
import {
|
|
5
|
+
generateFiltersFromColumns,
|
|
6
|
+
getRelationshipFilterConfigs,
|
|
7
|
+
} from "../../lib/table/filter-utils"
|
|
8
|
+
import {
|
|
9
|
+
RelationshipFilterConfig,
|
|
10
|
+
useRelationshipFilterOptions,
|
|
11
|
+
} from "./use-relationship-filter-options"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Resolves the data table filters for the filterable columns, including the
|
|
15
|
+
* options of relationship filters.
|
|
16
|
+
*/
|
|
17
|
+
export function useColumnFilters(apiColumns?: HttpTypes.AdminColumn[]): {
|
|
18
|
+
filters: DataTableFilter[]
|
|
19
|
+
isLoading: boolean
|
|
20
|
+
} {
|
|
21
|
+
const filterableColumns = useMemo(
|
|
22
|
+
() => apiColumns?.filter((column) => column.filter?.enabled),
|
|
23
|
+
[apiColumns]
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
const relationshipFilterConfigs = useMemo(() => {
|
|
27
|
+
return filterableColumns
|
|
28
|
+
? getRelationshipFilterConfigs(filterableColumns)
|
|
29
|
+
: []
|
|
30
|
+
}, [filterableColumns])
|
|
31
|
+
|
|
32
|
+
const { options: relationshipOptions, isLoading } =
|
|
33
|
+
useRelationshipFilterOptions(
|
|
34
|
+
relationshipFilterConfigs as RelationshipFilterConfig[]
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
const filters = useMemo(() => {
|
|
38
|
+
return filterableColumns
|
|
39
|
+
? generateFiltersFromColumns(filterableColumns, relationshipOptions)
|
|
40
|
+
: []
|
|
41
|
+
}, [filterableColumns, relationshipOptions])
|
|
42
|
+
|
|
43
|
+
return { filters, isLoading }
|
|
44
|
+
}
|
|
@@ -11,14 +11,7 @@ import { useFeatureFlag } from "../../providers/feature-flag-provider"
|
|
|
11
11
|
import { useColumnState } from "./columns/use-column-state"
|
|
12
12
|
import { useQueryParams } from "../use-query-params"
|
|
13
13
|
import { calculateRequiredFields } from "../../lib/table/field-utils"
|
|
14
|
-
import {
|
|
15
|
-
generateFiltersFromColumns,
|
|
16
|
-
getRelationshipFilterConfigs,
|
|
17
|
-
} from "../../lib/table/filter-utils"
|
|
18
|
-
import {
|
|
19
|
-
RelationshipFilterConfig,
|
|
20
|
-
useRelationshipFilterOptions,
|
|
21
|
-
} from "./use-relationship-filter-options"
|
|
14
|
+
import { useColumnFilters } from "./use-column-filters"
|
|
22
15
|
import { TableAdapter } from "../../lib/table/table-adapters"
|
|
23
16
|
|
|
24
17
|
export interface TableConfiguration {
|
|
@@ -135,32 +128,8 @@ export function useTableConfiguration({
|
|
|
135
128
|
: transformed
|
|
136
129
|
}, [rawApiColumns, transformColumns, extraColumns])
|
|
137
130
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (!apiColumns) {
|
|
141
|
-
return []
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const filterableColumns = apiColumns.filter(
|
|
145
|
-
(column) => column.filter?.enabled
|
|
146
|
-
)
|
|
147
|
-
return getRelationshipFilterConfigs(filterableColumns)
|
|
148
|
-
}, [apiColumns])
|
|
149
|
-
|
|
150
|
-
const { options: relationshipOptions, isLoading: isLoadingFilterOptions } =
|
|
151
|
-
useRelationshipFilterOptions(
|
|
152
|
-
relationshipFilterConfigs as RelationshipFilterConfig[]
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
const resolvedFilters = useMemo(() => {
|
|
156
|
-
if (!apiColumns) {
|
|
157
|
-
return []
|
|
158
|
-
}
|
|
159
|
-
const filterableColumns = apiColumns.filter(
|
|
160
|
-
(column) => column.filter?.enabled
|
|
161
|
-
)
|
|
162
|
-
return generateFiltersFromColumns(filterableColumns, relationshipOptions)
|
|
163
|
-
}, [apiColumns, relationshipOptions])
|
|
131
|
+
const { filters: resolvedFilters, isLoading: isLoadingFilterOptions } =
|
|
132
|
+
useColumnFilters(apiColumns)
|
|
164
133
|
|
|
165
134
|
const queryParams = useQueryParams(
|
|
166
135
|
["q", "order", "offset", "limit", ...resolvedFilters.map((f) => f.id)],
|
|
@@ -289,6 +289,12 @@ export const currencies: Record<string, CurrencyInfo> = {
|
|
|
289
289
|
symbol_native: "kn",
|
|
290
290
|
decimal_digits: 2,
|
|
291
291
|
},
|
|
292
|
+
HTG: {
|
|
293
|
+
code: "HTG",
|
|
294
|
+
name: "Haitian Gourde",
|
|
295
|
+
symbol_native: "G",
|
|
296
|
+
decimal_digits: 2,
|
|
297
|
+
},
|
|
292
298
|
HUF: {
|
|
293
299
|
code: "HUF",
|
|
294
300
|
name: "Hungarian Forint",
|
package/src/routes/orders/order-create-claim/components/claim-create-form/claim-inbound-item.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ActionMenu,
|
|
10
10
|
} from "../../../../../components/common/action-menu"
|
|
11
11
|
import { Form } from "../../../../../components/common/form"
|
|
12
|
+
import { getReturnableQuantity } from "../../../../../lib/rma"
|
|
12
13
|
import { Thumbnail } from "../../../../../components/common/thumbnail"
|
|
13
14
|
import { Combobox } from "../../../../../components/inputs/combobox"
|
|
14
15
|
import { MoneyAmountCell } from "../../../../../components/table/table-cells/common/money-amount-cell"
|
|
@@ -77,7 +78,7 @@ function ClaimInboundItem({
|
|
|
77
78
|
{...field}
|
|
78
79
|
className="bg-ui-bg-base txt-small w-[67px] rounded-lg"
|
|
79
80
|
min={1}
|
|
80
|
-
max={item
|
|
81
|
+
max={getReturnableQuantity(item)}
|
|
81
82
|
type="number"
|
|
82
83
|
onBlur={(e) => {
|
|
83
84
|
const val = e.target.value
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
ActionMenu,
|
|
20
20
|
} from "../../../../../components/common/action-menu"
|
|
21
21
|
import { Form } from "../../../../../components/common/form"
|
|
22
|
+
import { getReturnableQuantity } from "../../../../../lib/rma"
|
|
22
23
|
import { Thumbnail } from "../../../../../components/common/thumbnail"
|
|
23
24
|
import { Combobox } from "../../../../../components/inputs/combobox"
|
|
24
25
|
import { MoneyAmountCell } from "../../../../../components/table/table-cells/common/money-amount-cell"
|
|
@@ -104,7 +105,7 @@ function ExchangeInboundItem({
|
|
|
104
105
|
{...field}
|
|
105
106
|
className="bg-ui-bg-base txt-small w-[67px] rounded-lg"
|
|
106
107
|
min={1}
|
|
107
|
-
max={item
|
|
108
|
+
max={getReturnableQuantity(item)}
|
|
108
109
|
type="number"
|
|
109
110
|
onBlur={(e) => {
|
|
110
111
|
const val = e.target.value
|