@medusajs/dashboard 2.12.3-preview-20251217090412 → 2.12.3-preview-20251217123836
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-4QLXO46G.mjs → add-campaign-promotions-OYPGISTF.mjs} +2 -2
- package/dist/add-locales-GGNZCABB.mjs +81 -0
- package/dist/{adjust-inventory-2MFA656V.mjs → adjust-inventory-26YXAXQL.mjs} +4 -3
- package/dist/{api-key-management-create-ZUVF3SLR.mjs → api-key-management-create-EMP32G2D.mjs} +6 -5
- package/dist/{api-key-management-detail-THD74G7I.mjs → api-key-management-detail-FRUN2KFK.mjs} +11 -10
- package/dist/{api-key-management-edit-42HNUSXL.mjs → api-key-management-edit-IBM3ZXHK.mjs} +6 -5
- package/dist/{api-key-management-list-66CFOILY.mjs → api-key-management-list-KC5GOWAU.mjs} +4 -3
- package/dist/{api-key-management-sales-channels-HN3THM5J.mjs → api-key-management-sales-channels-LUB5G6RC.mjs} +6 -5
- package/dist/app.css +72 -0
- package/dist/app.js +13657 -11324
- package/dist/app.mjs +12 -11
- package/dist/{campaign-budget-edit-6DMZGUCI.mjs → campaign-budget-edit-B5MSE26J.mjs} +2 -2
- package/dist/{campaign-configuration-UNFRB5HR.mjs → campaign-configuration-QOE3D2BE.mjs} +2 -2
- package/dist/{campaign-create-QXG7PD3S.mjs → campaign-create-FJOECKGT.mjs} +3 -3
- package/dist/{campaign-detail-WR3XHHV2.mjs → campaign-detail-HM3GQJLQ.mjs} +11 -10
- package/dist/{campaign-edit-HN4US7DV.mjs → campaign-edit-K2POQH7M.mjs} +2 -2
- package/dist/{categories-metadata-BCZ463KN.mjs → categories-metadata-WKL3MGD7.mjs} +14 -13
- package/dist/{category-create-FFIBWXAH.mjs → category-create-KHJZSC7G.mjs} +5 -4
- package/dist/{category-detail-4HXJ5Z7N.mjs → category-detail-UTWWDKFP.mjs} +29 -13
- package/dist/{category-edit-74MZ6TXN.mjs → category-edit-CTA2EPDG.mjs} +5 -4
- package/dist/{category-list-OCJY2UJV.mjs → category-list-QBYJ4T3R.mjs} +20 -4
- package/dist/{category-organize-B6EFBFKB.mjs → category-organize-SXP33XET.mjs} +5 -4
- package/dist/{category-products-2HXLZDHL.mjs → category-products-XXBTCXFF.mjs} +14 -13
- package/dist/{chunk-XIVBRONM.mjs → chunk-23GTCEOV.mjs} +1 -1
- package/dist/{chunk-2NZDHAOE.mjs → chunk-27MGH3HR.mjs} +2 -2
- package/dist/{chunk-N3FCYZV6.mjs → chunk-2XTBDCGE.mjs} +1 -1
- package/dist/{chunk-RU4ZS47V.mjs → chunk-4JQR6QNW.mjs} +2 -2
- package/dist/{chunk-F65T2X7G.mjs → chunk-5F427YCP.mjs} +5 -5
- package/dist/{chunk-PNPT4W2F.mjs → chunk-5ISRTMYH.mjs} +1 -1
- package/dist/{chunk-Z6NHG5LQ.mjs → chunk-6P4Q4AAP.mjs} +3 -3
- package/dist/{chunk-F5NZDW7L.mjs → chunk-A2WBKOXJ.mjs} +2 -2
- package/dist/{chunk-F63F3FIT.mjs → chunk-A4XYK3MY.mjs} +2 -2
- package/dist/{chunk-NT6C7CHT.mjs → chunk-AWRCV3ME.mjs} +1 -1
- package/dist/{chunk-5X6SKB2P.mjs → chunk-BMS2QLJY.mjs} +1 -1
- package/dist/{chunk-3YPRDSZ6.mjs → chunk-BZKI5J2M.mjs} +1 -1
- package/dist/{chunk-25UWYEJX.mjs → chunk-CQOOXWPZ.mjs} +1 -1
- package/dist/{chunk-42OOM4DJ.mjs → chunk-D6UW7URG.mjs} +23 -6
- package/dist/{chunk-4YAPXPLM.mjs → chunk-DQUXK4WW.mjs} +1 -1
- package/dist/{chunk-MY6I7UJG.mjs → chunk-DTCIBQO2.mjs} +3 -3
- package/dist/{chunk-W7SLPIO2.mjs → chunk-FKNW5MLZ.mjs} +676 -151
- package/dist/{chunk-N4O5FAUC.mjs → chunk-FYWHE3W5.mjs} +1 -1
- package/dist/{chunk-QPKW37WR.mjs → chunk-GLBHPDR4.mjs} +249 -14
- package/dist/chunk-HGRIOEAR.mjs +32 -0
- package/dist/{chunk-PXJFCRIV.mjs → chunk-HNJ65IND.mjs} +4 -4
- package/dist/{chunk-Y5UO73CH.mjs → chunk-HTCYX4VD.mjs} +1 -1
- package/dist/{chunk-34KFHPN6.mjs → chunk-IAV7IKJ6.mjs} +1 -1
- package/dist/{store-add-locales-JLRTXG3Q.mjs → chunk-IKTGFXWR.mjs} +3 -67
- package/dist/{chunk-6W3BKVOC.mjs → chunk-KFYQTOGB.mjs} +1 -1
- package/dist/{chunk-EQTBJSBZ.mjs → chunk-KIIT4BNH.mjs} +3 -0
- package/dist/{chunk-LHNU4DYZ.mjs → chunk-KSDXSKJ7.mjs} +2 -2
- package/dist/{chunk-D4J3CEWH.mjs → chunk-N3SAXQVR.mjs} +2 -2
- package/dist/{chunk-Q6MSICBU.mjs → chunk-O333RR6K.mjs} +1 -1
- package/dist/{chunk-YAPTGHGP.mjs → chunk-OK6NZN2A.mjs} +1 -1
- package/dist/{chunk-7AX6R6G6.mjs → chunk-OSHH5GAS.mjs} +13 -1
- package/dist/{chunk-35LSPN2U.mjs → chunk-QKALAT7P.mjs} +1 -1
- package/dist/{chunk-UM4OIJZ3.mjs → chunk-S22SJRPO.mjs} +1 -1
- package/dist/{chunk-HFT7Q5Y5.mjs → chunk-SG2JZPTG.mjs} +1 -1
- package/dist/{chunk-B3AOQW2B.mjs → chunk-U6G4M5LP.mjs} +1 -1
- package/dist/{chunk-HWKLNKOY.mjs → chunk-U726TGCM.mjs} +1 -1
- package/dist/{chunk-HKIF5HVL.mjs → chunk-UJ2TMPV4.mjs} +12 -0
- package/dist/{chunk-5DUMSVP6.mjs → chunk-UMCJYHAD.mjs} +3 -3
- package/dist/{chunk-NHDFPGQ3.mjs → chunk-UWY5ZV66.mjs} +13 -1
- package/dist/{chunk-7ZYDO3XO.mjs → chunk-VFF5WB7C.mjs} +299 -194
- package/dist/{chunk-XXBP2Z5M.mjs → chunk-WVA4O7QS.mjs} +1 -1
- package/dist/{chunk-AH4DORIW.mjs → chunk-XY7A7GZJ.mjs} +1 -1
- package/dist/{chunk-FQDPOKEK.mjs → chunk-Y2YVTIJI.mjs} +1 -1
- package/dist/{chunk-L4NOVTH5.mjs → chunk-YIOBBZUB.mjs} +2 -2
- package/dist/{chunk-LEJUZW3P.mjs → chunk-Z6BFNHEO.mjs} +12 -0
- package/dist/{collection-add-products-JWAQ277T.mjs → collection-add-products-42F7H77E.mjs} +14 -13
- package/dist/{collection-create-DCRW344Z.mjs → collection-create-GWKWVT7B.mjs} +5 -4
- package/dist/{collection-detail-F4ON763T.mjs → collection-detail-PXIS3G64.mjs} +28 -12
- package/dist/{collection-edit-UNFEW6HT.mjs → collection-edit-EZIO2BR5.mjs} +5 -4
- package/dist/{collection-list-4C5HVO6Y.mjs → collection-list-O74CGY24.mjs} +29 -13
- package/dist/{collection-metadata-P4A5DXBQ.mjs → collection-metadata-U6FMA4IC.mjs} +14 -13
- package/dist/{customer-create-XCLZENJS.mjs → customer-create-IA56MXE6.mjs} +2 -2
- package/dist/{customer-create-address-4HZUIAM7.mjs → customer-create-address-27M25HTO.mjs} +2 -2
- package/dist/{customer-detail-X3RQJPXP.mjs → customer-detail-OMTFJ6CE.mjs} +12 -11
- package/dist/{customer-edit-BW5GVTQI.mjs → customer-edit-XQ5NWIVX.mjs} +2 -2
- package/dist/{customer-group-add-customers-SOXMSWQH.mjs → customer-group-add-customers-XMR2WBXX.mjs} +2 -2
- package/dist/{customer-group-create-6YV7W6TI.mjs → customer-group-create-RY4FVEIW.mjs} +2 -2
- package/dist/{customer-group-detail-NG32WKJT.mjs → customer-group-detail-ADK3M5LG.mjs} +11 -10
- package/dist/{customer-group-edit-7NXU34BQ.mjs → customer-group-edit-MQWARIQZ.mjs} +2 -2
- package/dist/{customer-group-list-EBETHKKO.mjs → customer-group-list-7ZRQ2HWU.mjs} +11 -10
- package/dist/{customer-group-metadata-WK2BGEGO.mjs → customer-group-metadata-JQJRLLXG.mjs} +3 -3
- package/dist/{customer-metadata-ZUWCUTM7.mjs → customer-metadata-HN2DYD5I.mjs} +3 -3
- package/dist/{customers-add-customer-group-7FYD54MZ.mjs → customers-add-customer-group-5U27WHJB.mjs} +13 -12
- package/dist/{edit-inventory-item-Y5W6VTHJ.mjs → edit-inventory-item-H7DAZWIT.mjs} +4 -3
- package/dist/{edit-inventory-item-attributes-NAAZDFEJ.mjs → edit-inventory-item-attributes-7HTXXPGZ.mjs} +4 -3
- package/dist/{edit-reservation-2UD4RZJX.mjs → edit-reservation-OVTRZHJR.mjs} +5 -4
- package/dist/{edit-rules-2W3BXEXR.mjs → edit-rules-BM2ERGVJ.mjs} +13 -12
- package/dist/en.json +38 -0
- package/dist/{inventory-create-VQEK7C5T.mjs → inventory-create-7MA7B5N2.mjs} +14 -13
- package/dist/{inventory-detail-HUHQ6ZNE.mjs → inventory-detail-B4PRHZK3.mjs} +11 -10
- package/dist/{inventory-list-RUSSPKHE.mjs → inventory-list-RXJPSVZE.mjs} +2 -1
- package/dist/{inventory-metadata-X52VGHA7.mjs → inventory-metadata-C7MJ3GY5.mjs} +14 -13
- package/dist/{inventory-stock-EKTOYN2F.mjs → inventory-stock-WVTYPJTX.mjs} +15 -14
- package/dist/{invite-VKHAAF4Z.mjs → invite-FVE4ZBKB.mjs} +2 -2
- package/dist/{location-create-RPLEXUZR.mjs → location-create-WZ43K3W7.mjs} +2 -2
- package/dist/{location-detail-UVWYE6Q2.mjs → location-detail-KO6EBDK5.mjs} +12 -11
- package/dist/{location-edit-L4ISEQHX.mjs → location-edit-VCS7GVWQ.mjs} +2 -2
- package/dist/{location-fulfillment-providers-HZZUHPVL.mjs → location-fulfillment-providers-IORBE3E3.mjs} +15 -14
- package/dist/{location-list-Z42ZYHUF.mjs → location-list-KVBA6J47.mjs} +2 -2
- package/dist/{location-sales-channels-XIMOK66B.mjs → location-sales-channels-P3QJTFDT.mjs} +5 -4
- package/dist/{location-service-zone-create-7ZNVLEE3.mjs → location-service-zone-create-J43WN6G4.mjs} +3 -3
- package/dist/{location-service-zone-edit-6OUAFEZD.mjs → location-service-zone-edit-KHHMSPXD.mjs} +2 -2
- package/dist/{location-service-zone-manage-areas-EOULKRYD.mjs → location-service-zone-manage-areas-6ZPMKMSX.mjs} +3 -3
- package/dist/{location-service-zone-shipping-option-create-M7G4SKNP.mjs → location-service-zone-shipping-option-create-2R3ZFLVK.mjs} +15 -14
- package/dist/{location-service-zone-shipping-option-edit-M2HJAASG.mjs → location-service-zone-shipping-option-edit-4CGPQ3VT.mjs} +2 -2
- package/dist/{location-service-zone-shipping-option-pricing-23QLNSBT.mjs → location-service-zone-shipping-option-pricing-5HN2Z5RB.mjs} +4 -4
- package/dist/{login-NSCAMAU6.mjs → login-XKB6OR7I.mjs} +13 -12
- package/dist/{manage-locations-JD6FSBOT.mjs → manage-locations-7HH6R4UP.mjs} +4 -3
- package/dist/{order-allocate-items-5T57NZOB.mjs → order-allocate-items-HZGGYJ42.mjs} +6 -5
- package/dist/{order-create-claim-TE56IE7P.mjs → order-create-claim-NKCOGF4A.mjs} +15 -14
- package/dist/{order-create-edit-RDFYBVFY.mjs → order-create-edit-UNQYXGLL.mjs} +14 -13
- package/dist/{order-create-exchange-B5ZOEQCJ.mjs → order-create-exchange-WI7OA2WO.mjs} +15 -14
- package/dist/{order-create-fulfillment-SRRP6X64.mjs → order-create-fulfillment-2LJTEWDY.mjs} +13 -12
- package/dist/{order-create-refund-PTOM65QK.mjs → order-create-refund-7K6UJXGP.mjs} +13 -12
- package/dist/{order-create-return-3C2QVNYN.mjs → order-create-return-52GHGW5Z.mjs} +7 -6
- package/dist/{order-create-shipment-HNILNFXB.mjs → order-create-shipment-ZTDLLUBY.mjs} +13 -12
- package/dist/{order-detail-3OUZOQ7G.mjs → order-detail-JTRUMRLO.mjs} +15 -14
- package/dist/{order-edit-billing-address-3IO7GXIK.mjs → order-edit-billing-address-YHYNVLOE.mjs} +13 -12
- package/dist/{order-edit-email-QIAEOUBV.mjs → order-edit-email-TCQPEVZY.mjs} +13 -12
- package/dist/{order-edit-shipping-address-QGGMHGBC.mjs → order-edit-shipping-address-CFSYQLKD.mjs} +13 -12
- package/dist/{order-export-JYYFTOWR.mjs → order-export-G4SBNEJ7.mjs} +14 -13
- package/dist/{order-list-RFR3HNDQ.mjs → order-list-GRLQWN4L.mjs} +6 -5
- package/dist/{order-metadata-ZBDTMBHZ.mjs → order-metadata-KGPB37VL.mjs} +14 -13
- package/dist/{order-receive-return-V42FTCFY.mjs → order-receive-return-JER24SEV.mjs} +14 -13
- package/dist/{order-request-transfer-A6NNIN2O.mjs → order-request-transfer-3FBUYZNT.mjs} +13 -12
- package/dist/{price-list-configuration-RTUEJENE.mjs → price-list-configuration-6S3MLNXQ.mjs} +6 -5
- package/dist/{price-list-create-GRT27KOM.mjs → price-list-create-CXZCFFTP.mjs} +17 -16
- package/dist/{price-list-detail-VKIWM7HP.mjs → price-list-detail-XOMU6U5J.mjs} +13 -12
- package/dist/{price-list-edit-SW7YIR3Z.mjs → price-list-edit-53UW35L3.mjs} +5 -4
- package/dist/{price-list-list-LF2PL4B5.mjs → price-list-list-DG5YEZ44.mjs} +4 -3
- package/dist/{price-list-prices-add-ISLZDQNI.mjs → price-list-prices-add-SDX5CQME.mjs} +16 -15
- package/dist/{price-list-prices-edit-C6SX2TLJ.mjs → price-list-prices-edit-EKB6NI5D.mjs} +7 -6
- package/dist/{product-attributes-REJ5NF2D.mjs → product-attributes-MXDPSOWM.mjs} +14 -13
- package/dist/{product-create-4TFE3JHQ.mjs → product-create-3O34JJLS.mjs} +16 -15
- package/dist/{product-create-option-GEGQNSMQ.mjs → product-create-option-7AOXAA4S.mjs} +4 -3
- package/dist/{product-create-variant-WI6D5CDG.mjs → product-create-variant-OTJKT6WI.mjs} +14 -13
- package/dist/{product-detail-BEIDGPKY.mjs → product-detail-SYTLG5D3.mjs} +59 -17
- package/dist/{product-edit-ZRQUK5OQ.mjs → product-edit-W72S22NM.mjs} +14 -13
- package/dist/{product-edit-option-HBIOBQTS.mjs → product-edit-option-LWJT3CYJ.mjs} +4 -3
- package/dist/{product-export-GIEFG4MA.mjs → product-export-57UUAGXF.mjs} +15 -14
- package/dist/{product-image-variants-edit-AAMRK4KQ.mjs → product-image-variants-edit-2BW5BJON.mjs} +13 -12
- package/dist/{product-import-43UXKCL3.mjs → product-import-6EM4VUXP.mjs} +13 -12
- package/dist/{product-list-D4CVUBQQ.mjs → product-list-5V5GEH5K.mjs} +25 -12
- package/dist/{product-media-EGK66SRX.mjs → product-media-3VJ7KENL.mjs} +4 -3
- package/dist/{product-metadata-55CAQTPS.mjs → product-metadata-JZLHBLZQ.mjs} +14 -13
- package/dist/{product-organization-7J7MUM6F.mjs → product-organization-SVXTCWIF.mjs} +15 -14
- package/dist/{product-prices-WQDE4XYT.mjs → product-prices-5ZL2RP7A.mjs} +5 -4
- package/dist/{product-sales-channels-GIJ7Q57M.mjs → product-sales-channels-PPXUG4KT.mjs} +5 -4
- package/dist/{product-shipping-profile-KIDRTPWA.mjs → product-shipping-profile-ETQFZ7DC.mjs} +4 -3
- package/dist/{product-stock-22S2HGMM.mjs → product-stock-SJJABF6I.mjs} +15 -14
- package/dist/{product-tag-create-7GPE246H.mjs → product-tag-create-XXO4AQEC.mjs} +13 -12
- package/dist/{product-tag-detail-R6C2TTA4.mjs → product-tag-detail-BSK64HXL.mjs} +30 -14
- package/dist/{product-tag-edit-WA6FGSIP.mjs → product-tag-edit-ENCGDT7E.mjs} +13 -12
- package/dist/{product-tag-list-U7PLHMLF.mjs → product-tag-list-SLQGCNDZ.mjs} +30 -14
- package/dist/{product-tag-metadata-EJ7FEXSE.mjs → product-tag-metadata-EPXHMU2K.mjs} +14 -13
- package/dist/{product-type-create-HBDROTGB.mjs → product-type-create-DRFXTL5O.mjs} +4 -3
- package/dist/{product-type-detail-TYQ7MJFE.mjs → product-type-detail-4CRRU7YK.mjs} +29 -13
- package/dist/{product-type-edit-H3JCMVRV.mjs → product-type-edit-SRHCZDK7.mjs} +4 -3
- package/dist/{product-type-list-KIKWBPD7.mjs → product-type-list-QQKAHBJ3.mjs} +19 -3
- package/dist/{product-type-metadata-Q6W5GL7Z.mjs → product-type-metadata-73OKOGPP.mjs} +14 -13
- package/dist/{product-variant-detail-SPJ7MZTK.mjs → product-variant-detail-RPHLG4HU.mjs} +27 -11
- package/dist/{product-variant-edit-BW7QMHC5.mjs → product-variant-edit-JF7NN64Y.mjs} +13 -12
- package/dist/{product-variant-manage-inventory-items-BLHCH6QD.mjs → product-variant-manage-inventory-items-Y2VEOHP7.mjs} +4 -3
- package/dist/{product-variant-media-KLSUISGH.mjs → product-variant-media-2WLVNGI4.mjs} +4 -3
- package/dist/{product-variant-metadata-GDMVC4MZ.mjs → product-variant-metadata-HU2CXGPO.mjs} +14 -13
- package/dist/{profile-edit-YBBXXCCK.mjs → profile-edit-ZNXO6WME.mjs} +2 -2
- package/dist/{promotion-add-campaign-JRTM7WBR.mjs → promotion-add-campaign-DO67QK6M.mjs} +3 -3
- package/dist/{promotion-create-HF6DTKCC.mjs → promotion-create-BHA3FQG2.mjs} +15 -14
- package/dist/{promotion-detail-HTM3F2VO.mjs → promotion-detail-F3QSR52W.mjs} +11 -10
- package/dist/{promotion-edit-details-AREFQ6O5.mjs → promotion-edit-details-6BSOOWQN.mjs} +2 -2
- package/dist/{refund-reason-create-RKIH46D6.mjs → refund-reason-create-ZA5TKW2Z.mjs} +13 -12
- package/dist/{refund-reason-edit-V3KC6NMO.mjs → refund-reason-edit-N2CRCLKZ.mjs} +13 -12
- package/dist/{refund-reason-list-M5BOHFWU.mjs → refund-reason-list-SE4TMGMT.mjs} +11 -10
- package/dist/{region-add-countries-OF5RUSYU.mjs → region-add-countries-2VAVXMJQ.mjs} +2 -2
- package/dist/{region-create-BGOWVCTR.mjs → region-create-NA7Y2LN4.mjs} +2 -2
- package/dist/{region-edit-5GO25GDF.mjs → region-edit-WAU347DP.mjs} +2 -2
- package/dist/{region-metadata-5NGUNAXZ.mjs → region-metadata-O5NZBWXP.mjs} +14 -13
- package/dist/{reservation-create-Z2SUMBGT.mjs → reservation-create-ZCIYM6JI.mjs} +5 -4
- package/dist/{reservation-detail-JH77TQHN.mjs → reservation-detail-UFK6XIXE.mjs} +11 -10
- package/dist/{reservation-list-WHBGZSVH.mjs → reservation-list-B47DXTA7.mjs} +3 -2
- package/dist/{reservation-metadata-ERCWXYVL.mjs → reservation-metadata-AEJEKGLV.mjs} +14 -13
- package/dist/{reset-password-5TAYQEUV.mjs → reset-password-Y5WVXV4Q.mjs} +2 -2
- package/dist/{return-reason-create-NXWDC6AC.mjs → return-reason-create-HM54WRJY.mjs} +2 -2
- package/dist/{return-reason-edit-M6IKNNKB.mjs → return-reason-edit-VSIRHVQ6.mjs} +2 -2
- package/dist/{sales-channel-add-products-DTAXWL6H.mjs → sales-channel-add-products-2LMB7EF5.mjs} +14 -13
- package/dist/{sales-channel-create-E7BDTPWD.mjs → sales-channel-create-MI7HHZYE.mjs} +5 -4
- package/dist/{sales-channel-detail-XWHV7J7X.mjs → sales-channel-detail-EUQ4STQI.mjs} +12 -11
- package/dist/{sales-channel-edit-HMPA3Y3L.mjs → sales-channel-edit-VSHOIR37.mjs} +5 -4
- package/dist/{sales-channel-list-7NSEFCXQ.mjs → sales-channel-list-JXKGHX4G.mjs} +11 -10
- package/dist/{sales-channel-metadata-CMZN74K7.mjs → sales-channel-metadata-AJMQ5SQ2.mjs} +14 -13
- package/dist/{shipping-option-type-create-4BN2GBHP.mjs → shipping-option-type-create-YVVIA2XC.mjs} +13 -12
- package/dist/{shipping-option-type-detail-YB3TCED2.mjs → shipping-option-type-detail-ZZW36XLK.mjs} +12 -11
- package/dist/{shipping-option-type-edit-MDO7ALAU.mjs → shipping-option-type-edit-O6F74T3A.mjs} +13 -12
- package/dist/{shipping-option-type-list-DJAT4RKX.mjs → shipping-option-type-list-SPTE7MT6.mjs} +12 -11
- package/dist/{shipping-profile-create-752TMBBE.mjs → shipping-profile-create-26R64I3Z.mjs} +2 -2
- package/dist/{shipping-profile-metadata-HQI7PCPU.mjs → shipping-profile-metadata-7WFE55VG.mjs} +14 -13
- package/dist/{store-add-currencies-PEWNEWCH.mjs → store-add-currencies-OX2WXFMS.mjs} +2 -2
- package/dist/store-add-locales-GWCGIXHU.mjs +81 -0
- package/dist/{store-detail-MOLAYNQZ.mjs → store-detail-YLJLBBZE.mjs} +11 -10
- package/dist/{store-edit-FTLPT55E.mjs → store-edit-5ZS562ZO.mjs} +2 -2
- package/dist/{store-metadata-ZJD23O4D.mjs → store-metadata-BZ57I2E6.mjs} +14 -13
- package/dist/{tax-region-create-NCO2OQ3I.mjs → tax-region-create-FGTV7VJL.mjs} +13 -12
- package/dist/{tax-region-detail-RIABXU7D.mjs → tax-region-detail-PPIMD7OX.mjs} +21 -20
- package/dist/{tax-region-edit-YZALLSZY.mjs → tax-region-edit-ELZKA7YH.mjs} +13 -12
- package/dist/{tax-region-list-BXZBUXRJ.mjs → tax-region-list-P4LDOPZD.mjs} +3 -3
- package/dist/{tax-region-province-create-5JP3PVID.mjs → tax-region-province-create-GKJ7WMRS.mjs} +2 -2
- package/dist/{tax-region-province-detail-UKLRVJS2.mjs → tax-region-province-detail-FV2NDT3E.mjs} +20 -19
- package/dist/{tax-region-tax-override-create-33XGHH7A.mjs → tax-region-tax-override-create-N572MQPZ.mjs} +16 -15
- package/dist/{tax-region-tax-override-edit-WOKZSPTY.mjs → tax-region-tax-override-edit-5DCSJW6D.mjs} +17 -16
- package/dist/{tax-region-tax-rate-create-O2SDSXCH.mjs → tax-region-tax-rate-create-MECFGVPL.mjs} +2 -2
- package/dist/{tax-region-tax-rate-edit-W62VEVKT.mjs → tax-region-tax-rate-edit-7DYSPYOD.mjs} +2 -2
- package/dist/translation-list-FK7XYLHX.mjs +527 -0
- package/dist/translations-edit-VRXZI5KW.mjs +678 -0
- package/dist/{user-detail-KEDJ7N3Q.mjs → user-detail-BJUXLZZQ.mjs} +2 -1
- package/dist/{user-edit-LXQCTDGA.mjs → user-edit-ZBB4RMTP.mjs} +2 -2
- package/dist/{user-invite-YH33WUC2.mjs → user-invite-GAGIM5DO.mjs} +2 -2
- package/dist/{user-metadata-4WOICEE7.mjs → user-metadata-GRJZZ524.mjs} +14 -13
- package/dist/{workflow-execution-detail-OKM6P4SX.mjs → workflow-execution-detail-HXTFWGKG.mjs} +11 -10
- package/package.json +9 -9
- package/src/components/common/icon-avatar/icon-avatar.tsx +4 -0
- package/src/components/data-grid/components/data-grid-cell-container.tsx +13 -4
- package/src/components/data-grid/components/data-grid-multiline-cell.tsx +103 -0
- package/src/components/data-grid/components/data-grid-readonly-cell.tsx +13 -3
- package/src/components/data-grid/components/data-grid-root.tsx +271 -60
- package/src/components/data-grid/components/data-grid-text-cell.tsx +7 -7
- package/src/components/data-grid/components/data-grid-textarea-modal-cell.tsx +233 -0
- package/src/components/data-grid/components/index.ts +2 -0
- package/src/components/data-grid/data-grid.tsx +16 -1
- package/src/components/data-grid/helpers/create-data-grid-column-helper.ts +18 -0
- package/src/components/data-grid/hooks/use-data-grid-cell.tsx +13 -1
- package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +1 -0
- package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +65 -7
- package/src/components/data-grid/types.ts +1 -0
- package/src/components/layout/settings-layout/settings-layout.tsx +11 -1
- package/src/components/modals/route-focus-modal/route-focus-modal.tsx +8 -3
- package/src/components/modals/route-modal-form/route-modal-form.tsx +6 -1
- package/src/components/modals/route-modal-provider/route-provider.tsx +16 -4
- package/src/dashboard-app/routes/get-route.map.tsx +23 -0
- package/src/hooks/api/categories.tsx +32 -0
- package/src/hooks/api/collections.tsx +31 -0
- package/src/hooks/api/index.ts +1 -0
- package/src/hooks/api/product-types.tsx +32 -0
- package/src/hooks/api/product-variants.tsx +47 -3
- package/src/hooks/api/products.tsx +29 -0
- package/src/hooks/api/tags.tsx +32 -0
- package/src/hooks/api/translations.tsx +315 -0
- package/src/hooks/use-infinite-list.tsx +92 -0
- package/src/i18n/translations/$schema.json +122 -0
- package/src/i18n/translations/en.json +38 -0
- package/src/i18n/translations/es.json +38 -0
- package/src/routes/categories/category-detail/components/category-general-section/category-general-section.tsx +16 -1
- package/src/routes/categories/category-list/components/category-list-table/category-list-table.tsx +16 -1
- package/src/routes/collections/collection-detail/components/collection-general-section/collection-general-section.tsx +16 -1
- package/src/routes/collections/collection-list/components/collection-list-table/collection-row-actions.tsx +16 -1
- package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/product-tag-general-section.tsx +16 -1
- package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/product-tag-list-table.tsx +16 -1
- package/src/routes/product-types/product-type-detail/components/product-type-general-section/product-type-general-section.tsx +16 -1
- package/src/routes/product-types/product-type-list/components/product-type-list-table/product-table-row-actions.tsx +16 -1
- package/src/routes/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx +16 -1
- package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +16 -1
- package/src/routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +32 -1
- package/src/routes/products/product-list/components/product-list-table/product-list-table.tsx +15 -1
- package/src/routes/translations/add-locales/add-locales.tsx +29 -0
- package/src/routes/translations/add-locales/index.tsx +1 -0
- package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +93 -0
- package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +48 -0
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +285 -0
- package/src/routes/translations/translation-list/index.tsx +1 -0
- package/src/routes/translations/translation-list/translation-list.tsx +138 -0
- package/src/routes/translations/translations-edit/components/translations-edit-form/index.ts +1 -0
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +747 -0
- package/src/routes/translations/translations-edit/index.ts +1 -0
- package/src/routes/translations/translations-edit/translations-edit.tsx +90 -0
|
@@ -15,7 +15,11 @@ import {
|
|
|
15
15
|
getCoreRowModel,
|
|
16
16
|
useReactTable,
|
|
17
17
|
} from "@tanstack/react-table"
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
VirtualItem,
|
|
20
|
+
Virtualizer,
|
|
21
|
+
useVirtualizer,
|
|
22
|
+
} from "@tanstack/react-virtual"
|
|
19
23
|
import React, {
|
|
20
24
|
CSSProperties,
|
|
21
25
|
ReactNode,
|
|
@@ -51,7 +55,7 @@ import { isCellMatch, isSpecialFocusKey } from "../utils"
|
|
|
51
55
|
import { DataGridKeyboardShortcutModal } from "./data-grid-keyboard-shortcut-modal"
|
|
52
56
|
export interface DataGridRootProps<
|
|
53
57
|
TData,
|
|
54
|
-
TFieldValues extends FieldValues = FieldValues
|
|
58
|
+
TFieldValues extends FieldValues = FieldValues
|
|
55
59
|
> {
|
|
56
60
|
data?: TData[]
|
|
57
61
|
columns: ColumnDef<TData>[]
|
|
@@ -60,6 +64,25 @@ export interface DataGridRootProps<
|
|
|
60
64
|
onEditingChange?: (isEditing: boolean) => void
|
|
61
65
|
disableInteractions?: boolean
|
|
62
66
|
multiColumnSelection?: boolean
|
|
67
|
+
showColumnsDropdown?: boolean
|
|
68
|
+
/**
|
|
69
|
+
* Custom content to render in the header, positioned between the column visibility
|
|
70
|
+
* controls and the error/shortcuts section.
|
|
71
|
+
*/
|
|
72
|
+
headerContent?: ReactNode
|
|
73
|
+
/**
|
|
74
|
+
* Lazy loading props - when totalRowCount is provided, the grid enters lazy loading mode.
|
|
75
|
+
* In this mode, the virtualizer will size based on totalRowCount and trigger onFetchMore
|
|
76
|
+
* when the user scrolls near the end of loaded data.
|
|
77
|
+
*/
|
|
78
|
+
/** Total count of rows for scroll sizing (enables lazy loading mode when provided) */
|
|
79
|
+
totalRowCount?: number
|
|
80
|
+
/** Called when more data should be fetched */
|
|
81
|
+
onFetchMore?: () => void
|
|
82
|
+
/** Whether more data is currently being fetched */
|
|
83
|
+
isFetchingMore?: boolean
|
|
84
|
+
/** Whether there is more data to fetch */
|
|
85
|
+
hasNextPage?: boolean
|
|
63
86
|
}
|
|
64
87
|
|
|
65
88
|
const ROW_HEIGHT = 40
|
|
@@ -97,7 +120,7 @@ const getCommonPinningStyles = <TData,>(
|
|
|
97
120
|
|
|
98
121
|
export const DataGridRoot = <
|
|
99
122
|
TData,
|
|
100
|
-
TFieldValues extends FieldValues = FieldValues
|
|
123
|
+
TFieldValues extends FieldValues = FieldValues
|
|
101
124
|
>({
|
|
102
125
|
data = [],
|
|
103
126
|
columns,
|
|
@@ -106,7 +129,15 @@ export const DataGridRoot = <
|
|
|
106
129
|
onEditingChange,
|
|
107
130
|
disableInteractions,
|
|
108
131
|
multiColumnSelection = false,
|
|
132
|
+
showColumnsDropdown = true,
|
|
133
|
+
totalRowCount,
|
|
134
|
+
onFetchMore,
|
|
135
|
+
isFetchingMore,
|
|
136
|
+
hasNextPage,
|
|
137
|
+
headerContent,
|
|
109
138
|
}: DataGridRootProps<TData, TFieldValues>) => {
|
|
139
|
+
// TODO: remove once everything is lazy loaded
|
|
140
|
+
const isLazyMode = totalRowCount !== undefined
|
|
110
141
|
const containerRef = useRef<HTMLDivElement>(null)
|
|
111
142
|
|
|
112
143
|
const { redo, undo, execute } = useCommandHistory()
|
|
@@ -163,10 +194,18 @@ export const DataGridRoot = <
|
|
|
163
194
|
)
|
|
164
195
|
const visibleColumns = grid.getVisibleLeafColumns()
|
|
165
196
|
|
|
197
|
+
const effectiveRowCount = isLazyMode ? totalRowCount! : visibleRows.length
|
|
198
|
+
|
|
166
199
|
const rowVirtualizer = useVirtualizer({
|
|
167
|
-
count:
|
|
200
|
+
count: effectiveRowCount,
|
|
168
201
|
estimateSize: () => ROW_HEIGHT,
|
|
169
202
|
getScrollElement: () => containerRef.current,
|
|
203
|
+
// Measure actual row heights for dynamic sizing (disabled in Firefox due to measurement issues). Taken from Tanstack
|
|
204
|
+
measureElement:
|
|
205
|
+
typeof window !== "undefined" &&
|
|
206
|
+
navigator.userAgent.indexOf("Firefox") === -1
|
|
207
|
+
? (element) => element?.getBoundingClientRect().height
|
|
208
|
+
: undefined,
|
|
170
209
|
overscan: 5,
|
|
171
210
|
rangeExtractor: (range) => {
|
|
172
211
|
const toRender = new Set(
|
|
@@ -189,6 +228,76 @@ export const DataGridRoot = <
|
|
|
189
228
|
})
|
|
190
229
|
const virtualRows = rowVirtualizer.getVirtualItems()
|
|
191
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Lazy loading scroll detection.
|
|
233
|
+
* When the user scrolls near the end of loaded data, trigger onFetchMore.
|
|
234
|
+
* We use refs to get latest values in the scroll handler without re-attaching.
|
|
235
|
+
*/
|
|
236
|
+
const lazyLoadingRefs = useRef({
|
|
237
|
+
onFetchMore,
|
|
238
|
+
hasNextPage,
|
|
239
|
+
isFetchingMore,
|
|
240
|
+
loadedRowCount: visibleRows.length,
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
// Keep refs updated
|
|
244
|
+
useEffect(() => {
|
|
245
|
+
lazyLoadingRefs.current = {
|
|
246
|
+
onFetchMore,
|
|
247
|
+
hasNextPage,
|
|
248
|
+
isFetchingMore,
|
|
249
|
+
loadedRowCount: visibleRows.length,
|
|
250
|
+
}
|
|
251
|
+
}, [onFetchMore, hasNextPage, isFetchingMore, visibleRows.length])
|
|
252
|
+
|
|
253
|
+
const hasData = visibleRows.length > 0
|
|
254
|
+
|
|
255
|
+
const handleScroll = useCallback(() => {
|
|
256
|
+
const { onFetchMore, hasNextPage, isFetchingMore, loadedRowCount } =
|
|
257
|
+
lazyLoadingRefs.current
|
|
258
|
+
|
|
259
|
+
if (!onFetchMore || !hasNextPage || isFetchingMore) {
|
|
260
|
+
return
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const scrollElement = containerRef.current
|
|
264
|
+
|
|
265
|
+
const { scrollTop, clientHeight } = scrollElement!
|
|
266
|
+
const loadedHeight = loadedRowCount * ROW_HEIGHT
|
|
267
|
+
const viewportBottom = scrollTop + clientHeight
|
|
268
|
+
const fetchThreshold = loadedHeight - ROW_HEIGHT * 10
|
|
269
|
+
|
|
270
|
+
if (viewportBottom >= fetchThreshold) {
|
|
271
|
+
onFetchMore()
|
|
272
|
+
}
|
|
273
|
+
}, [lazyLoadingRefs, containerRef])
|
|
274
|
+
|
|
275
|
+
useEffect(() => {
|
|
276
|
+
if (!isLazyMode || !hasData) {
|
|
277
|
+
return
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const container = containerRef.current
|
|
281
|
+
if (!container) {
|
|
282
|
+
return
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const timeoutId = setTimeout(() => {
|
|
286
|
+
const scrollElement: HTMLElement | null = containerRef.current
|
|
287
|
+
if (!scrollElement) {
|
|
288
|
+
return
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
scrollElement.addEventListener("scroll", handleScroll)
|
|
292
|
+
}, 100)
|
|
293
|
+
|
|
294
|
+
return () => {
|
|
295
|
+
clearTimeout(timeoutId)
|
|
296
|
+
const scrollElement = containerRef.current
|
|
297
|
+
scrollElement?.removeEventListener("scroll", handleScroll)
|
|
298
|
+
}
|
|
299
|
+
}, [isLazyMode, hasData])
|
|
300
|
+
|
|
192
301
|
const columnVirtualizer = useVirtualizer({
|
|
193
302
|
count: visibleColumns.length,
|
|
194
303
|
estimateSize: (index) => visibleColumns[index].getSize(),
|
|
@@ -552,6 +661,7 @@ export const DataGridRoot = <
|
|
|
552
661
|
<DataGridContext.Provider value={values}>
|
|
553
662
|
<div className="bg-ui-bg-subtle flex size-full flex-col">
|
|
554
663
|
<DataGridHeader
|
|
664
|
+
showColumnsDropdown={showColumnsDropdown}
|
|
555
665
|
columnOptions={columnOptions}
|
|
556
666
|
isDisabled={isColumsDisabled}
|
|
557
667
|
onToggleColumn={handleToggleColumnVisibility}
|
|
@@ -560,6 +670,7 @@ export const DataGridRoot = <
|
|
|
560
670
|
onResetColumns={handleResetColumns}
|
|
561
671
|
isHighlighted={isHighlighted}
|
|
562
672
|
onHeaderInteractionChange={handleHeaderInteractionChange}
|
|
673
|
+
headerContent={headerContent}
|
|
563
674
|
/>
|
|
564
675
|
<div className="size-full overflow-hidden">
|
|
565
676
|
<div
|
|
@@ -650,6 +761,20 @@ export const DataGridRoot = <
|
|
|
650
761
|
>
|
|
651
762
|
{virtualRows.map((virtualRow) => {
|
|
652
763
|
const row = visibleRows[virtualRow.index] as Row<TData>
|
|
764
|
+
|
|
765
|
+
// In lazy mode, rows beyond loaded data show as skeleton
|
|
766
|
+
if (!row) {
|
|
767
|
+
return (
|
|
768
|
+
<DataGridRowSkeleton
|
|
769
|
+
key={`skeleton-${virtualRow.index}`}
|
|
770
|
+
virtualRow={virtualRow}
|
|
771
|
+
virtualColumns={virtualColumns}
|
|
772
|
+
virtualPaddingLeft={virtualPaddingLeft}
|
|
773
|
+
virtualPaddingRight={virtualPaddingRight}
|
|
774
|
+
/>
|
|
775
|
+
)
|
|
776
|
+
}
|
|
777
|
+
|
|
653
778
|
const rowIndex = flatRows.findIndex((r) => r.id === row.id)
|
|
654
779
|
|
|
655
780
|
return (
|
|
@@ -658,6 +783,7 @@ export const DataGridRoot = <
|
|
|
658
783
|
row={row}
|
|
659
784
|
rowIndex={rowIndex}
|
|
660
785
|
virtualRow={virtualRow}
|
|
786
|
+
rowVirtualizer={rowVirtualizer}
|
|
661
787
|
flatColumns={flatColumns}
|
|
662
788
|
virtualColumns={virtualColumns}
|
|
663
789
|
anchor={anchor}
|
|
@@ -680,12 +806,14 @@ export const DataGridRoot = <
|
|
|
680
806
|
type DataGridHeaderProps = {
|
|
681
807
|
columnOptions: GridColumnOption[]
|
|
682
808
|
isDisabled: boolean
|
|
809
|
+
showColumnsDropdown: boolean
|
|
683
810
|
onToggleColumn: (index: number) => (value: boolean) => void
|
|
684
811
|
onResetColumns: () => void
|
|
685
812
|
isHighlighted: boolean
|
|
686
813
|
errorCount: number
|
|
687
814
|
onToggleErrorHighlighting: () => void
|
|
688
815
|
onHeaderInteractionChange: (isActive: boolean) => void
|
|
816
|
+
headerContent?: ReactNode
|
|
689
817
|
}
|
|
690
818
|
|
|
691
819
|
const DataGridHeader = ({
|
|
@@ -697,6 +825,8 @@ const DataGridHeader = ({
|
|
|
697
825
|
errorCount,
|
|
698
826
|
onToggleErrorHighlighting,
|
|
699
827
|
onHeaderInteractionChange,
|
|
828
|
+
showColumnsDropdown,
|
|
829
|
+
headerContent,
|
|
700
830
|
}: DataGridHeaderProps) => {
|
|
701
831
|
const [shortcutsOpen, setShortcutsOpen] = useState(false)
|
|
702
832
|
const [columnsOpen, setColumnsOpen] = useState(false)
|
|
@@ -717,58 +847,61 @@ const DataGridHeader = ({
|
|
|
717
847
|
}
|
|
718
848
|
return (
|
|
719
849
|
<div className="bg-ui-bg-base flex items-center justify-between border-b p-4">
|
|
720
|
-
|
|
721
|
-
<
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
<ConditionalTooltip
|
|
727
|
-
showTooltip={isDisabled}
|
|
728
|
-
content={t("dataGrid.columns.disabled")}
|
|
850
|
+
{showColumnsDropdown && (
|
|
851
|
+
<div className="flex items-center gap-x-2">
|
|
852
|
+
<DropdownMenu
|
|
853
|
+
dir={direction}
|
|
854
|
+
open={columnsOpen}
|
|
855
|
+
onOpenChange={handleColumnsOpenChange}
|
|
729
856
|
>
|
|
730
|
-
<
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
857
|
+
<ConditionalTooltip
|
|
858
|
+
showTooltip={isDisabled}
|
|
859
|
+
content={t("dataGrid.columns.disabled")}
|
|
860
|
+
>
|
|
861
|
+
<DropdownMenu.Trigger asChild disabled={isDisabled}>
|
|
862
|
+
<Button size="small" variant="secondary">
|
|
863
|
+
{hasChanged ? <AdjustmentsDone /> : <Adjustments />}
|
|
864
|
+
{t("dataGrid.columns.view")}
|
|
865
|
+
</Button>
|
|
866
|
+
</DropdownMenu.Trigger>
|
|
867
|
+
</ConditionalTooltip>
|
|
868
|
+
<DropdownMenu.Content>
|
|
869
|
+
{columnOptions.map((column, index) => {
|
|
870
|
+
const { checked, disabled, id, name } = column
|
|
871
|
+
|
|
872
|
+
if (disabled) {
|
|
873
|
+
return null
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
return (
|
|
877
|
+
<DropdownMenu.CheckboxItem
|
|
878
|
+
key={id}
|
|
879
|
+
checked={checked}
|
|
880
|
+
onCheckedChange={onToggleColumn(index)}
|
|
881
|
+
onSelect={(e) => e.preventDefault()}
|
|
882
|
+
>
|
|
883
|
+
{name}
|
|
884
|
+
</DropdownMenu.CheckboxItem>
|
|
885
|
+
)
|
|
886
|
+
})}
|
|
887
|
+
</DropdownMenu.Content>
|
|
888
|
+
</DropdownMenu>
|
|
889
|
+
{hasChanged && (
|
|
890
|
+
<Button
|
|
891
|
+
size="small"
|
|
892
|
+
variant="transparent"
|
|
893
|
+
type="button"
|
|
894
|
+
onClick={onResetColumns}
|
|
895
|
+
className="text-ui-fg-muted hover:text-ui-fg-subtle"
|
|
896
|
+
data-id="reset-columns"
|
|
897
|
+
>
|
|
898
|
+
{t("dataGrid.columns.resetToDefault")}
|
|
899
|
+
</Button>
|
|
900
|
+
)}
|
|
901
|
+
</div>
|
|
902
|
+
)}
|
|
903
|
+
{headerContent}
|
|
904
|
+
<div className="ml-auto flex items-center gap-x-2">
|
|
772
905
|
{errorCount > 0 && (
|
|
773
906
|
<Button
|
|
774
907
|
size="small"
|
|
@@ -832,11 +965,11 @@ const DataGridCell = <TData,>({
|
|
|
832
965
|
data-row-index={rowIndex}
|
|
833
966
|
data-column-index={columnIndex}
|
|
834
967
|
className={clx(
|
|
835
|
-
"relative flex items-
|
|
968
|
+
"relative flex items-stretch border-b border-r p-0 outline-none"
|
|
836
969
|
)}
|
|
837
970
|
tabIndex={-1}
|
|
838
971
|
>
|
|
839
|
-
<div className="relative
|
|
972
|
+
<div className="relative w-full">
|
|
840
973
|
{flexRender(cell.column.columnDef.cell, {
|
|
841
974
|
...cell.getContext(),
|
|
842
975
|
columnIndex,
|
|
@@ -861,10 +994,11 @@ const DataGridCell = <TData,>({
|
|
|
861
994
|
type DataGridRowProps<TData> = {
|
|
862
995
|
row: Row<TData>
|
|
863
996
|
rowIndex: number
|
|
864
|
-
virtualRow: VirtualItem
|
|
997
|
+
virtualRow: VirtualItem
|
|
998
|
+
rowVirtualizer: Virtualizer<HTMLDivElement, Element>
|
|
865
999
|
virtualPaddingLeft?: number
|
|
866
1000
|
virtualPaddingRight?: number
|
|
867
|
-
virtualColumns: VirtualItem
|
|
1001
|
+
virtualColumns: VirtualItem[]
|
|
868
1002
|
flatColumns: Column<TData, unknown>[]
|
|
869
1003
|
anchor: DataGridCoordinates | null
|
|
870
1004
|
onDragToFillStart: (e: React.MouseEvent<HTMLElement>) => void
|
|
@@ -875,6 +1009,7 @@ const DataGridRow = <TData,>({
|
|
|
875
1009
|
row,
|
|
876
1010
|
rowIndex,
|
|
877
1011
|
virtualRow,
|
|
1012
|
+
rowVirtualizer,
|
|
878
1013
|
virtualPaddingLeft,
|
|
879
1014
|
virtualPaddingRight,
|
|
880
1015
|
virtualColumns,
|
|
@@ -889,10 +1024,12 @@ const DataGridRow = <TData,>({
|
|
|
889
1024
|
<div
|
|
890
1025
|
role="row"
|
|
891
1026
|
aria-rowindex={virtualRow.index}
|
|
1027
|
+
data-index={virtualRow.index}
|
|
1028
|
+
ref={(node) => rowVirtualizer.measureElement(node)}
|
|
892
1029
|
style={{
|
|
893
1030
|
transform: `translateY(${virtualRow.start}px)`,
|
|
894
1031
|
}}
|
|
895
|
-
className="bg-ui-bg-subtle txt-compact-small absolute flex h-10 w-full"
|
|
1032
|
+
className="bg-ui-bg-subtle txt-compact-small absolute flex min-h-10 w-full"
|
|
896
1033
|
>
|
|
897
1034
|
{virtualPaddingLeft ? (
|
|
898
1035
|
<div
|
|
@@ -943,3 +1080,77 @@ const DataGridRow = <TData,>({
|
|
|
943
1080
|
</div>
|
|
944
1081
|
)
|
|
945
1082
|
}
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Skeleton row component for lazy loading.
|
|
1086
|
+
* Displays placeholder cells while data is being fetched.
|
|
1087
|
+
*/
|
|
1088
|
+
type DataGridRowSkeletonProps = {
|
|
1089
|
+
virtualRow: VirtualItem
|
|
1090
|
+
virtualPaddingLeft?: number
|
|
1091
|
+
virtualPaddingRight?: number
|
|
1092
|
+
virtualColumns: VirtualItem[]
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
const DataGridRowSkeleton = ({
|
|
1096
|
+
virtualRow,
|
|
1097
|
+
virtualPaddingLeft,
|
|
1098
|
+
virtualPaddingRight,
|
|
1099
|
+
virtualColumns,
|
|
1100
|
+
}: DataGridRowSkeletonProps) => {
|
|
1101
|
+
return (
|
|
1102
|
+
<div
|
|
1103
|
+
role="row"
|
|
1104
|
+
aria-rowindex={virtualRow.index}
|
|
1105
|
+
style={{
|
|
1106
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
1107
|
+
}}
|
|
1108
|
+
className="bg-ui-bg-subtle txt-compact-small absolute flex h-10 w-full"
|
|
1109
|
+
>
|
|
1110
|
+
{virtualPaddingLeft ? (
|
|
1111
|
+
<div
|
|
1112
|
+
role="presentation"
|
|
1113
|
+
style={{ display: "flex", width: virtualPaddingLeft }}
|
|
1114
|
+
/>
|
|
1115
|
+
) : null}
|
|
1116
|
+
{virtualColumns.map((vc, index, array) => {
|
|
1117
|
+
const previousVC = array[index - 1]
|
|
1118
|
+
const elements: ReactNode[] = []
|
|
1119
|
+
|
|
1120
|
+
if (previousVC && vc.index !== previousVC.index + 1) {
|
|
1121
|
+
elements.push(
|
|
1122
|
+
<div
|
|
1123
|
+
key={`padding-${previousVC.index}-${vc.index}`}
|
|
1124
|
+
role="presentation"
|
|
1125
|
+
style={{
|
|
1126
|
+
display: "flex",
|
|
1127
|
+
width: `${vc.start - previousVC.end}px`,
|
|
1128
|
+
}}
|
|
1129
|
+
/>
|
|
1130
|
+
)
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
elements.push(
|
|
1134
|
+
<div
|
|
1135
|
+
key={`skeleton-cell-${vc.index}`}
|
|
1136
|
+
role="gridcell"
|
|
1137
|
+
style={{ width: vc.size }}
|
|
1138
|
+
className="relative flex items-center border-b border-r p-0 outline-none"
|
|
1139
|
+
>
|
|
1140
|
+
<div className="flex h-full w-full items-center px-4">
|
|
1141
|
+
<div className="bg-ui-bg-component h-4 w-3/4 animate-pulse rounded" />
|
|
1142
|
+
</div>
|
|
1143
|
+
</div>
|
|
1144
|
+
)
|
|
1145
|
+
|
|
1146
|
+
return elements
|
|
1147
|
+
})}
|
|
1148
|
+
{virtualPaddingRight ? (
|
|
1149
|
+
<div
|
|
1150
|
+
role="presentation"
|
|
1151
|
+
style={{ display: "flex", width: virtualPaddingRight }}
|
|
1152
|
+
/>
|
|
1153
|
+
) : null}
|
|
1154
|
+
</div>
|
|
1155
|
+
)
|
|
1156
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clx } from "@medusajs/ui"
|
|
2
|
-
import { useEffect, useState } from "react"
|
|
2
|
+
import { useEffect, useRef, useState } from "react"
|
|
3
3
|
import { Controller, ControllerRenderProps } from "react-hook-form"
|
|
4
4
|
|
|
5
5
|
import { useCombinedRefs } from "../../../hooks/use-combined-refs"
|
|
@@ -43,29 +43,29 @@ const Inner = ({
|
|
|
43
43
|
const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps
|
|
44
44
|
|
|
45
45
|
const [localValue, setLocalValue] = useState(value)
|
|
46
|
+
const inputElRef = useRef<HTMLInputElement>(null)
|
|
46
47
|
|
|
47
48
|
useEffect(() => {
|
|
48
49
|
setLocalValue(value)
|
|
49
50
|
}, [value])
|
|
50
51
|
|
|
51
|
-
const combinedRefs = useCombinedRefs(inputRef, ref)
|
|
52
|
+
const combinedRefs = useCombinedRefs(inputRef, ref, inputElRef)
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
55
|
<input
|
|
55
56
|
className={clx(
|
|
56
|
-
"txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer
|
|
57
|
-
"focus:cursor-text"
|
|
57
|
+
"txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer bg-transparent outline-none",
|
|
58
|
+
"focus:cursor-text",
|
|
59
|
+
"items-center justify-center"
|
|
58
60
|
)}
|
|
59
61
|
autoComplete="off"
|
|
60
62
|
tabIndex={-1}
|
|
61
|
-
value={localValue}
|
|
63
|
+
value={localValue ?? ""}
|
|
62
64
|
onChange={(e) => setLocalValue(e.target.value)}
|
|
63
65
|
ref={combinedRefs}
|
|
64
66
|
onBlur={() => {
|
|
65
67
|
onBlur()
|
|
66
68
|
onInputBlur()
|
|
67
|
-
|
|
68
|
-
// We propagate the change to the field only when the input is blurred
|
|
69
69
|
onChange(localValue, value)
|
|
70
70
|
}}
|
|
71
71
|
{...input}
|