@mercurjs/vendor 2.0.0 → 2.0.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/{[id]-S6EPH4OO.js → [id]-6WYSWXWC.js} +30 -28
- package/dist/{[id]-SJXBJLAT.js → [id]-CLZ7BUYL.js} +9 -8
- package/dist/{[id]-47FGVJYM.js → [id]-DCCF7277.js} +35 -33
- package/dist/{[id]-ARXBXGNZ.js → [id]-EJAHMOOE.js} +33 -31
- package/dist/{[id]-HD76VJ2P.js → [id]-ENTJSLN2.js} +16 -15
- package/dist/{[id]-XY3A3EMF.js → [id]-LZPT5Y55.js} +32 -31
- package/dist/{[id]-Z4P7XA4G.js → [id]-OGHRZ2VY.js} +232 -103
- package/dist/{[id]-FLIHBDAS.js → [id]-PHS2WYFX.js} +33 -31
- package/dist/{[id]-JF6CCBRE.js → [id]-T64V4G6T.js} +19 -18
- package/dist/{[id]-IWPWKLOH.js → [id]-TLZZ53G7.js} +13 -12
- package/dist/{[id]-6HM66I3E.js → [id]-UAOAQVEM.js} +48 -45
- package/dist/{[id]-Q6HILUAG.js → [id]-VKG2WEIR.js} +39 -37
- package/dist/{[id]-VTFOP3BF.js → [id]-WRA56ZMU.js} +5 -5
- package/dist/{[id]-MIV4U5UW.js → [id]-XRGNT7CY.js} +7 -7
- package/dist/{[location_id]-AWDD2VHW.js → [location_id]-7ZUB2TTU.js} +14 -14
- package/dist/{[province_id]-36QJ2FKC.js → [province_id]-XGA44S7P.js} +30 -29
- package/dist/add-7ZTE42IE.js +158 -0
- package/dist/{add-YUANWTIL.js → add-AKC7LTK3.js} +49 -46
- package/dist/{add-customer-groups-7SLONTS2.js → add-customer-groups-BRC3DKQ2.js} +29 -27
- package/dist/{add-products-ISR3DRPQ.js → add-products-ZSULNZVI.js} +31 -29
- package/dist/{add-promotions-FZRDYHYX.js → add-promotions-TNFVT5ST.js} +12 -11
- package/dist/{add-to-campaign-V6D7JKRS.js → add-to-campaign-HL6NGRR4.js} +6 -6
- package/dist/address-3DSJESKM.js +249 -0
- package/dist/{adjust-inventory-P7AB7VIB.js → adjust-inventory-H4EUP7J3.js} +4 -4
- package/dist/{allocate-items-QAS5PZLR.js → allocate-items-6OAKG25R.js} +8 -8
- package/dist/{areas-Y7VDWH7G.js → areas-JO6L3M7Y.js} +11 -10
- package/dist/{attributes-UEM2VJKV.js → attributes-WRZYJEYN.js} +5 -4
- package/dist/{breadcrumb-6NAAOPIY.js → breadcrumb-3Z7KZG62.js} +4 -4
- package/dist/{breadcrumb-5OTOCYNL.js → breadcrumb-5BXDYVRO.js} +4 -4
- package/dist/{breadcrumb-3QTVWXZB.js → breadcrumb-BS7Y5OKF.js} +5 -5
- package/dist/{breadcrumb-CIGKLKKS.js → breadcrumb-D3UDTWGE.js} +3 -3
- package/dist/breadcrumb-D6QNYOAO.js +45 -0
- package/dist/{breadcrumb-OVMEC5OZ.js → breadcrumb-F3BN5753.js} +3 -3
- package/dist/{breadcrumb-MOQ7GI3Z.js → breadcrumb-KQSFIXQ4.js} +3 -3
- package/dist/{breadcrumb-NCBGPQML.js → breadcrumb-M5Z5WA6I.js} +4 -4
- package/dist/{breadcrumb-EOYLR3IQ.js → breadcrumb-OIGGCB3L.js} +3 -3
- package/dist/{breadcrumb-LENACUAA.js → breadcrumb-UAUX7XCV.js} +3 -3
- package/dist/breadcrumb-UH7FAYU2.js +46 -0
- package/dist/{breadcrumb-ASB2YCNV.js → breadcrumb-Y5UW3I4C.js} +3 -3
- package/dist/{breadcrumb-WP34OXGQ.js → breadcrumb-YBBYFQYG.js} +3 -3
- package/dist/breadcrumb-ZMVHXCOX.js +32 -0
- package/dist/bulk-edit-C6WJKURW.js +244 -0
- package/dist/{campaigns-PMVKUFEA.js → campaigns-SF2YDBID.js} +9 -8
- package/dist/{categories-JARCKR7M.js → categories-WRDJAJ2Q.js} +9 -8
- package/dist/{chunk-HUZG6A3X.js → chunk-2POPPFAP.js} +3 -3
- package/dist/{chunk-S5GQ2SES.js → chunk-2SLAVXFY.js} +5 -5
- package/dist/{chunk-JVBLYMY2.js → chunk-32RYSB2V.js} +2 -2
- package/dist/{chunk-VHMGJUYN.js → chunk-3B34B2M2.js} +1 -1
- package/dist/{chunk-BI2WWFPS.js → chunk-3BZBEC3Y.js} +1 -1
- package/dist/{chunk-LMHJRE4A.js → chunk-3DXMZA7M.js} +2 -2
- package/dist/{chunk-Z2WPXJ6J.js → chunk-4DYUQ3G5.js} +2 -2
- package/dist/{chunk-HBQC3YQZ.js → chunk-573EQEW2.js} +1 -1
- package/dist/{chunk-FBZHM2QZ.js → chunk-5BONGICL.js} +5 -5
- package/dist/{chunk-ZZ7VKT2S.js → chunk-5IWBNPZX.js} +766 -204
- package/dist/{chunk-KHHY7EEM.js → chunk-6WY5X4PE.js} +5 -5
- package/dist/{chunk-CUO22GTM.js → chunk-7TIZP4YG.js} +1 -1
- package/dist/{chunk-52I65K53.js → chunk-7XC7ZRG7.js} +17 -129
- package/dist/{chunk-AONKZGWL.js → chunk-ASEVHHCT.js} +3 -3
- package/dist/{chunk-TG3TCIL6.js → chunk-AW4WN2EK.js} +6 -6
- package/dist/{chunk-DDEIH66R.js → chunk-B5326BWT.js} +4 -4
- package/dist/{chunk-O6PRBSFL.js → chunk-BI2AYXZQ.js} +50 -35
- package/dist/{chunk-HUNGNEPY.js → chunk-BOZJOOGW.js} +1 -1
- package/dist/{chunk-AIFLEWO2.js → chunk-BWGPN6XV.js} +1 -1
- package/dist/{chunk-5XOCUDS2.js → chunk-CUMY2VZ5.js} +1 -1
- package/dist/chunk-DLNNTQRY.js +217 -0
- package/dist/{chunk-B2RVONU7.js → chunk-DRAZNW7J.js} +4 -4
- package/dist/{chunk-CVVYQI5F.js → chunk-EBZ5VZEO.js} +1 -1
- package/dist/{chunk-ZPGWTLF2.js → chunk-EFIF2GCZ.js} +4 -4
- package/dist/{chunk-DHADGZJ5.js → chunk-F4OJN2F2.js} +40 -5
- package/dist/{chunk-PYQJ5N25.js → chunk-FEUCCLKR.js} +6 -6
- package/dist/{chunk-JKSPDM7I.js → chunk-FNG7ZA7N.js} +1 -1
- package/dist/{chunk-UXKKD4AD.js → chunk-FQTYHU6G.js} +5 -5
- package/dist/chunk-FX4V5JCF.js +37 -0
- package/dist/{chunk-ZFFA36DB.js → chunk-GCSQEJMD.js} +2 -2
- package/dist/{chunk-NANYVBFI.js → chunk-GJM5XI3E.js} +1 -1
- package/dist/{chunk-W6ZVQJYB.js → chunk-GYV6SKY7.js} +1 -1
- package/dist/chunk-I5K5USJM.js +330 -0
- package/dist/{chunk-J2XP7VRG.js → chunk-IBTTL6EJ.js} +4 -4
- package/dist/{chunk-3LPVUPZZ.js → chunk-IDYGSAHT.js} +1 -1
- package/dist/{chunk-DC2K6CFQ.js → chunk-IQWK723D.js} +1 -1
- package/dist/{chunk-PWZKFTJS.js → chunk-ITQW6CK2.js} +5 -5
- package/dist/{chunk-NWFWI4IE.js → chunk-JKKRKFCS.js} +55 -62
- package/dist/chunk-JQV7CXEC.js +37 -0
- package/dist/{chunk-RH2NI4BC.js → chunk-JRT2U4UI.js} +448 -101
- package/dist/{chunk-4FCZDRAE.js → chunk-JTCUWZ7D.js} +5 -5
- package/dist/chunk-LA6XSPQG.js +3723 -0
- package/dist/{chunk-JXP5YZ77.js → chunk-LHKHQAAY.js} +1 -1
- package/dist/{chunk-TTFCO5HU.js → chunk-LKA7QM6R.js} +7 -7
- package/dist/{chunk-FGCKXH45.js → chunk-LPOAVK6Y.js} +1 -0
- package/dist/{chunk-VGJTARSA.js → chunk-LRARA622.js} +2 -2
- package/dist/chunk-LRD242C7.js +40 -0
- package/dist/{chunk-PADOWAXM.js → chunk-LWJF63JW.js} +1 -1
- package/dist/{chunk-DYUTYBAQ.js → chunk-M6N4ISXL.js} +1 -1
- package/dist/{chunk-2F3H6ORE.js → chunk-MWQQVKRU.js} +1 -1
- package/dist/{chunk-JK5CK6SW.js → chunk-N2WKLVUX.js} +20 -3
- package/dist/{chunk-R65A4P4H.js → chunk-N335VHD3.js} +1 -1
- package/dist/chunk-NBMM2TZK.js +33 -0
- package/dist/{chunk-SI4ALL7W.js → chunk-NBPMNUKZ.js} +1 -1
- package/dist/{chunk-GDMNHL7E.js → chunk-NCABGI3E.js} +6 -6
- package/dist/chunk-NYRRRCJS.js +339 -0
- package/dist/{chunk-QJ7QW3SZ.js → chunk-O7E4KQAK.js} +6 -6
- package/dist/{chunk-NKB6WTBH.js → chunk-OWPZ3CIR.js} +5 -5
- package/dist/{chunk-RE7YXVFG.js → chunk-PCMNEUMV.js} +3 -3
- package/dist/{chunk-CFETU5BI.js → chunk-QHQWEERJ.js} +1 -36
- package/dist/{chunk-WHTS4G5K.js → chunk-QXUKJDZB.js} +1 -1
- package/dist/{chunk-Y224F4UU.js → chunk-RIN4CBRB.js} +0 -1
- package/dist/{chunk-LWVBKUUL.js → chunk-RL7SFZOF.js} +2 -2
- package/dist/{chunk-UYJ65N46.js → chunk-RLETOWCM.js} +5 -5
- package/dist/{chunk-DVPTD7LZ.js → chunk-RMBCBXWD.js} +1 -1
- package/dist/{chunk-A2BNIZ7D.js → chunk-RTAWYMQP.js} +1 -1
- package/dist/{chunk-VJTYMQVA.js → chunk-RUE5BPC2.js} +2 -2
- package/dist/{chunk-EOOK6473.js → chunk-RV5UTYBG.js} +15 -13
- package/dist/chunk-S2Q7PO7I.js +177 -0
- package/dist/{chunk-Y4VBOHAP.js → chunk-S7EKBD2C.js} +3 -3
- package/dist/{chunk-CELHWX5P.js → chunk-SDSEW72R.js} +5 -5
- package/dist/{chunk-4TBDDMFP.js → chunk-SGT6QYWH.js} +1 -1
- package/dist/chunk-STBCWNZQ.js +57 -0
- package/dist/{chunk-LZ7QV42C.js → chunk-SYNUA6LQ.js} +1 -1
- package/dist/{chunk-CTWSWZ4R.js → chunk-T7LEJIIM.js} +4 -4
- package/dist/{chunk-7EM7WET3.js → chunk-TZTKHOEK.js} +4 -4
- package/dist/chunk-UL4O5M4S.js +45 -0
- package/dist/{chunk-AW77UWCZ.js → chunk-VBRTC2VU.js} +13 -4
- package/dist/{chunk-VDWGP2U6.js → chunk-VV6IKGCN.js} +1 -1
- package/dist/{chunk-JKXAL7WR.js → chunk-VXMOPVRH.js} +2 -2
- package/dist/{chunk-RIILGKYR.js → chunk-VXWN37PT.js} +1 -1
- package/dist/{chunk-CDIZEXFJ.js → chunk-WQX4ASK4.js} +6 -4
- package/dist/{chunk-SOZMJA7V.js → chunk-X22KTLZ7.js} +1 -1
- package/dist/{chunk-SDA5NDMT.js → chunk-XZG2HZYW.js} +2 -2
- package/dist/{chunk-SECZTXSU.js → chunk-YQYRAD5C.js} +1 -1
- package/dist/{chunk-WPFTRRWV.js → chunk-ZEVYT6IX.js} +202 -6
- package/dist/chunk-ZWTCVOHQ.js +14 -0
- package/dist/{chunk-NX26QE2O.js → chunk-ZYOXKUKZ.js} +1 -1
- package/dist/chunk-ZZO3INVE.js +9631 -0
- package/dist/collections-2M4RFH4P.js +66 -0
- package/dist/{configuration-RNWBTRAH.js → configuration-O5GDANA7.js} +5 -5
- package/dist/{configuration-KWAL2QZ5.js → configuration-RHPIO2QT.js} +3 -3
- package/dist/{create-BEVGWF6U.js → create-2TUWGQ2D.js} +33 -32
- package/dist/{create-YPCVTXAK.js → create-33TRLASX.js} +4 -4
- package/dist/{create-BBFTIFI2.js → create-3WUTLUJO.js} +36 -33
- package/dist/create-6IRE6AMF.js +78 -0
- package/dist/{create-F5K53QPH.js → create-D4F457BD.js} +38 -36
- package/dist/{create-7UEEO5TM.js → create-D6EW3EWC.js} +3 -3
- package/dist/{create-EJM5C2XP.js → create-FFKQAZ5D.js} +6 -6
- package/dist/{create-ZU362U3B.js → create-GHM7OTCR.js} +3 -3
- package/dist/{create-VUKGQU4L.js → create-IFMEEHN4.js} +34 -32
- package/dist/{create-IE6MYOIY.js → create-IOUKWPE4.js} +11 -10
- package/dist/{create-XGF6DB5F.js → create-KGOMJUXR.js} +5 -4
- package/dist/{create-TFDUNJSI.js → create-KGYL7FBM.js} +3 -3
- package/dist/{create-UCU73IXX.js → create-OF2OZ7EI.js} +25 -23
- package/dist/{create-MKBBF2V3.js → create-Q6ITSYJM.js} +3 -3
- package/dist/{create-VEWS4QDP.js → create-QK2SSLZK.js} +48 -45
- package/dist/{create-NPSYO6PE.js → create-YITFTHMA.js} +37 -35
- package/dist/{customers-4QWR5UOL.js → customers-OXAD52MC.js} +10 -9
- package/dist/{edit-J3LD76JS.js → edit-4HZHLYI3.js} +6 -6
- package/dist/{edit-47I7VVNB.js → edit-5CJZRHAA.js} +3 -3
- package/dist/{edit-BYXHU3IG.js → edit-7GVP6SRA.js} +3 -3
- package/dist/{edit-J6WCPHDS.js → edit-7HTH2UJF.js} +5 -5
- package/dist/{edit-XU33IVZH.js → edit-ATXE6CM5.js} +3 -3
- package/dist/{edit-ZMINDMGM.js → edit-B5B3XKDM.js} +3 -3
- package/dist/{edit-DG3MY3ZH.js → edit-FC64DWB2.js} +5 -5
- package/dist/{edit-LOKLQGM2.js → edit-FNDDSSMT.js} +3 -3
- package/dist/{edit-S7B7VPM4.js → edit-J5SC7GHQ.js} +29 -28
- package/dist/{edit-7LQATDUD.js → edit-LRRJTHV2.js} +4 -4
- package/dist/{edit-BQLSTFTQ.js → edit-MYSWY6W4.js} +5 -5
- package/dist/edit-ONSN756P.js +237 -0
- package/dist/{edit-JZVEAKJU.js → edit-PIE7Y73J.js} +49 -46
- package/dist/{edit-CZVL3IVY.js → edit-QRJIWTU2.js} +30 -29
- package/dist/{edit-JAKXFAVP.js → edit-SGEECDCR.js} +25 -24
- package/dist/{edit-5BUGSOTL.js → edit-UAXMJAEI.js} +5 -4
- package/dist/edit-UQAQVEUI.js +353 -0
- package/dist/edit-Z7EZRPUP.js +362 -0
- package/dist/{edit-NHU3LJIH.js → edit-ZEIL7EQW.js} +23 -22
- package/dist/{edit-budget-Z5USV462.js → edit-budget-J27CSEZH.js} +3 -3
- package/dist/{edit-inventory-item-YFW2AFRD.js → edit-inventory-item-US77M2FF.js} +3 -3
- package/dist/{edit-inventory-item-attributes-IYAMJDTB.js → edit-inventory-item-attributes-QYNDTUHT.js} +5 -4
- package/dist/edit-stocks-and-prices-543AYFDJ.js +409 -0
- package/dist/{fulfillment-V3D4XU3R.js → fulfillment-5LNFBSBS.js} +26 -25
- package/dist/{fulfillment-providers-YYN3GVV7.js → fulfillment-providers-U7Z7QMOQ.js} +33 -31
- package/dist/{home-PP7YYCSB.js → home-I3OILW5Z.js} +2 -2
- package/dist/index.css +5127 -3
- package/dist/index.js +453 -215
- package/dist/{inventory-AIRQ2KNS.js → inventory-W6S2NIBI.js} +8 -7
- package/dist/invite-P6HTOEIV.js +301 -0
- package/dist/invite-SI2KIPWI.js +370 -0
- package/dist/{locations-SQKM7JWN.js → locations-7SQJ3O2F.js} +4 -4
- package/dist/login-QDS5UXKV.js +36 -0
- package/dist/{manage-locations-4PQS4QY7.js → manage-locations-R4T72DTA.js} +4 -4
- package/dist/{media-UR73M6X2.js → media-RDXCLPKQ.js} +7 -6
- package/dist/{metadata-REBVXJJF.js → metadata-7JKDCVYY.js} +26 -25
- package/dist/{metadata-DIJTVDF7.js → metadata-AWUKZ25V.js} +6 -6
- package/dist/{metadata-ZKG2TRYU.js → metadata-UKBRUFH2.js} +23 -22
- package/dist/{metadata-UBZXDIFG.js → metadata-W5XIPFVU.js} +26 -25
- package/dist/{metadata-OOM44E2U.js → metadata-X4UIPNL6.js} +26 -25
- package/dist/{metadata-OGVHZEKS.js → metadata-ZV5RYLKR.js} +23 -22
- package/dist/{no-match-BO2NNLCM.js → no-match-JLVLPCRH.js} +1 -1
- package/dist/onboarding-DLIBZRKE.js +873 -0
- package/dist/orders-IAL3JNPU.js +61 -0
- package/dist/organization-QCSXE52A.js +303 -0
- package/dist/{organize-5AIJPYS2.js → organize-5W5KNBM2.js} +5 -5
- package/dist/{organize-YXJVI74L.js → organize-U2LVYSOD.js} +5 -5
- package/dist/pages/index.d.ts +222 -49
- package/dist/pages/index.js +96 -93
- package/dist/payment-details-ATUYMVJX.js +234 -0
- package/dist/{payouts-3BY73LZ3.js → payouts-ZLX3KFQT.js} +9 -8
- package/dist/{price-lists-G256JJN7.js → price-lists-JX22K5EO.js} +10 -9
- package/dist/{prices-EW7KBY6R.js → prices-6NY4DELP.js} +14 -13
- package/dist/{pricing-SQNF3KGG.js → pricing-RBESFX5P.js} +33 -31
- package/dist/{product-tags-FR32HXFW.js → product-tags-W4BL6RWV.js} +43 -40
- package/dist/{product-types-WJPLJI7H.js → product-types-MBLFYJOA.js} +10 -9
- package/dist/{product-variant-detail-G5MBDTFL.js → product-variant-detail-KU5OCL7E.js} +270 -56
- package/dist/{product-variant-edit-PW7W5J5E.js → product-variant-edit-5FMMMH2W.js} +8 -7
- package/dist/{products-C4BF2X7D.js → products-3VVYJUH7.js} +31 -29
- package/dist/products-YYLVCOOY.js +93 -0
- package/dist/professional-details-6Y5K6GBL.js +167 -0
- package/dist/profile-Y4AATQES.js +171 -0
- package/dist/{promotions-INYBMACT.js → promotions-NBJTFP6N.js} +10 -9
- package/dist/register-ZLE6MNPF.js +223 -0
- package/dist/{reset-password-CPTU3KHW.js → reset-password-PLCDLFL4.js} +4 -4
- package/dist/{chunk-5NF4OTVV.js → return-reasons-64WZ5Z3Z.js} +46 -5
- package/dist/{sales-channels-6I3U4W4Z.js → sales-channels-UIDLFCX6.js} +10 -9
- package/dist/{sales-channels-SOACADV2.js → sales-channels-UWPEFKAO.js} +12 -11
- package/dist/{settings-MAXHH7EC.js → settings-5MNWE5CR.js} +53 -56
- package/dist/{shipping-profile-7FTHSPY2.js → shipping-profile-JJBIVZPM.js} +4 -4
- package/dist/shipping-profiles-O7XB2DTE.js +45 -0
- package/dist/{stock-LOO5SU5Q.js → stock-2CGEFBXO.js} +30 -30
- package/dist/{stock-4G4PELBV.js → stock-VJAAYYW5.js} +30 -31
- package/dist/store-ZBSMNWFT.js +568 -0
- package/dist/store-closure-43FK32AQ.js +172 -0
- package/dist/store-select-Q2HE572R.js +166 -0
- package/dist/{tax-regions-45JVTUP3.js → tax-regions-FPMGLITT.js} +8 -8
- package/dist/team-ZLZJJWIY.js +269 -0
- package/package.json +9 -6
- package/dist/additional-attributes-XUFDADGP.js +0 -219
- package/dist/breadcrumb-3RAESPC7.js +0 -31
- package/dist/breadcrumb-54IEJEAX.js +0 -45
- package/dist/breadcrumb-CFDJOGTA.js +0 -44
- package/dist/chunk-6EYGH3TB.js +0 -26
- package/dist/chunk-FPJLYWOU.js +0 -190
- package/dist/chunk-GTUR4HSV.js +0 -53
- package/dist/chunk-LODQAVDC.js +0 -179
- package/dist/chunk-NYK5PQIF.js +0 -2078
- package/dist/chunk-PKBMQBKP.js +0 -7
- package/dist/chunk-RNC4NFVK.js +0 -170
- package/dist/collections-2222I5MO.js +0 -63
- package/dist/create-R3SFYWAH.js +0 -69
- package/dist/edit-HBNCGMQO.js +0 -413
- package/dist/login-RDIRFQ7U.js +0 -35
- package/dist/orders-Q347PBOH.js +0 -59
- package/dist/organization-TDDI3HOH.js +0 -233
- package/dist/products-4WTWZIVH.js +0 -85
- package/dist/register-6WOPLDJK.js +0 -366
- package/dist/return-reasons-4V2KVSRI.js +0 -52
- package/dist/seller-44DTDU26.js +0 -36
- package/dist/shipping-profiles-3PYQLYFE.js +0 -43
- /package/dist/{chunk-XG4PTPRM.js → chunk-NXDFDEKP.js} +0 -0
- /package/dist/{chunk-S3PQKKNV.js → chunk-V74Y5NIV.js} +0 -0
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getOrderFulfillmentStatus,
|
|
3
|
+
getOrderPaymentStatus
|
|
4
|
+
} from "./chunk-LQSLDDPT.js";
|
|
1
5
|
import {
|
|
2
6
|
DisplayIdCell,
|
|
3
7
|
DisplayIdHeader
|
|
@@ -5,11 +9,7 @@ import {
|
|
|
5
9
|
import {
|
|
6
10
|
DateCell,
|
|
7
11
|
DateHeader
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
getOrderFulfillmentStatus,
|
|
11
|
-
getOrderPaymentStatus
|
|
12
|
-
} from "./chunk-LQSLDDPT.js";
|
|
12
|
+
} from "./chunk-SYNUA6LQ.js";
|
|
13
13
|
import {
|
|
14
14
|
getStylizedAmount
|
|
15
15
|
} from "./chunk-PXYDR7WQ.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-IZ5RG5XI.js";
|
|
5
5
|
import {
|
|
6
6
|
i18n
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JRT2U4UI.js";
|
|
8
8
|
|
|
9
9
|
// src/pages/products/create/constants.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -56,14 +56,18 @@ var ProductCreateVariantSchema = z.object({
|
|
|
56
56
|
inventory_item_id: z.string(),
|
|
57
57
|
required_quantity: optionalInt
|
|
58
58
|
})
|
|
59
|
-
).optional()
|
|
59
|
+
).optional(),
|
|
60
|
+
media: z.array(MediaSchema).optional()
|
|
60
61
|
});
|
|
61
62
|
var ProductCreateOptionSchema = z.object({
|
|
62
|
-
title: z.string(),
|
|
63
|
-
values: z.array(z.string()).min(1)
|
|
63
|
+
title: z.string().min(1, i18n.t("products.fields.attributes.add.title.required")),
|
|
64
|
+
values: z.array(z.string()).min(1, i18n.t("products.fields.attributes.add.values.required")),
|
|
65
|
+
metadata: z.record(z.unknown()).optional(),
|
|
66
|
+
useForVariants: z.boolean().optional(),
|
|
67
|
+
attributeId: z.string().optional()
|
|
64
68
|
});
|
|
65
69
|
var ProductCreateBaseSchema = z.object({
|
|
66
|
-
title: z.string().min(1),
|
|
70
|
+
title: z.string().min(1, i18n.t("products.fields.title.required")),
|
|
67
71
|
subtitle: z.string().optional(),
|
|
68
72
|
handle: z.string().optional(),
|
|
69
73
|
description: z.string().optional(),
|
|
@@ -71,7 +75,8 @@ var ProductCreateBaseSchema = z.object({
|
|
|
71
75
|
type_id: z.string().optional(),
|
|
72
76
|
collection_id: z.string().optional(),
|
|
73
77
|
shipping_profile_id: z.string().optional(),
|
|
74
|
-
categories: z.array(z.string()),
|
|
78
|
+
categories: z.array(z.string()).min(1, i18n.t("products.create.errors.primaryCategoryRequired")),
|
|
79
|
+
secondary_categories: z.array(z.string()).optional(),
|
|
75
80
|
tags: z.array(z.string()).optional(),
|
|
76
81
|
sales_channels: z.array(
|
|
77
82
|
z.object({
|
|
@@ -87,7 +92,7 @@ var ProductCreateBaseSchema = z.object({
|
|
|
87
92
|
weight: z.string().optional(),
|
|
88
93
|
mid_code: z.string().optional(),
|
|
89
94
|
hs_code: z.string().optional(),
|
|
90
|
-
options: z.array(ProductCreateOptionSchema)
|
|
95
|
+
options: z.array(ProductCreateOptionSchema),
|
|
91
96
|
enable_variants: z.boolean(),
|
|
92
97
|
variants: z.array(ProductCreateVariantSchema).min(1),
|
|
93
98
|
media: z.array(MediaSchema).optional()
|
|
@@ -118,15 +123,10 @@ var EditProductMediaSchema = z.object({
|
|
|
118
123
|
media: z.array(MediaSchema)
|
|
119
124
|
});
|
|
120
125
|
var PRODUCT_CREATE_FORM_DEFAULTS = {
|
|
121
|
-
discountable:
|
|
126
|
+
discountable: false,
|
|
122
127
|
tags: [],
|
|
123
128
|
sales_channels: [],
|
|
124
|
-
options: [
|
|
125
|
-
{
|
|
126
|
-
title: "Default option",
|
|
127
|
-
values: ["Default option value"]
|
|
128
|
-
}
|
|
129
|
-
],
|
|
129
|
+
options: [],
|
|
130
130
|
variants: decorateVariantsWithDefaultValues([
|
|
131
131
|
{
|
|
132
132
|
title: "Default variant",
|
|
@@ -142,6 +142,7 @@ var PRODUCT_CREATE_FORM_DEFAULTS = {
|
|
|
142
142
|
enable_variants: false,
|
|
143
143
|
media: [],
|
|
144
144
|
categories: [],
|
|
145
|
+
secondary_categories: [],
|
|
145
146
|
collection_id: "",
|
|
146
147
|
shipping_profile_id: "",
|
|
147
148
|
description: "",
|
|
@@ -159,125 +160,12 @@ var PRODUCT_CREATE_FORM_DEFAULTS = {
|
|
|
159
160
|
width: ""
|
|
160
161
|
};
|
|
161
162
|
|
|
162
|
-
// src/components/common/file-upload/file-upload.tsx
|
|
163
|
-
import { ArrowDownTray } from "@medusajs/icons";
|
|
164
|
-
import { Text, clx } from "@medusajs/ui";
|
|
165
|
-
import { useRef, useState } from "react";
|
|
166
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
167
|
-
var FileUpload = ({
|
|
168
|
-
label,
|
|
169
|
-
hint,
|
|
170
|
-
multiple = true,
|
|
171
|
-
hasError,
|
|
172
|
-
formats,
|
|
173
|
-
onUploaded,
|
|
174
|
-
uploadedImage = ""
|
|
175
|
-
}) => {
|
|
176
|
-
const [isDragOver, setIsDragOver] = useState(false);
|
|
177
|
-
const inputRef = useRef(null);
|
|
178
|
-
const dropZoneRef = useRef(null);
|
|
179
|
-
const handleOpenFileSelector = () => {
|
|
180
|
-
inputRef.current?.click();
|
|
181
|
-
};
|
|
182
|
-
const handleDragEnter = (event) => {
|
|
183
|
-
event.preventDefault();
|
|
184
|
-
event.stopPropagation();
|
|
185
|
-
const files = event.dataTransfer?.files;
|
|
186
|
-
if (!files) {
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
setIsDragOver(true);
|
|
190
|
-
};
|
|
191
|
-
const handleDragLeave = (event) => {
|
|
192
|
-
event.preventDefault();
|
|
193
|
-
event.stopPropagation();
|
|
194
|
-
if (!dropZoneRef.current || dropZoneRef.current.contains(event.relatedTarget)) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
setIsDragOver(false);
|
|
198
|
-
};
|
|
199
|
-
const handleUploaded = (files) => {
|
|
200
|
-
if (!files) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
const fileList = Array.from(files);
|
|
204
|
-
const fileObj = fileList.map((file) => {
|
|
205
|
-
const id = Math.random().toString(36).substring(7);
|
|
206
|
-
const previewUrl = URL.createObjectURL(file);
|
|
207
|
-
return {
|
|
208
|
-
id,
|
|
209
|
-
url: previewUrl,
|
|
210
|
-
file
|
|
211
|
-
};
|
|
212
|
-
});
|
|
213
|
-
onUploaded(fileObj);
|
|
214
|
-
};
|
|
215
|
-
const handleDrop = (event) => {
|
|
216
|
-
event.preventDefault();
|
|
217
|
-
event.stopPropagation();
|
|
218
|
-
setIsDragOver(false);
|
|
219
|
-
handleUploaded(event.dataTransfer?.files);
|
|
220
|
-
};
|
|
221
|
-
const handleFileChange = async (event) => {
|
|
222
|
-
handleUploaded(event.target.files);
|
|
223
|
-
};
|
|
224
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
225
|
-
/* @__PURE__ */ jsx(
|
|
226
|
-
"button",
|
|
227
|
-
{
|
|
228
|
-
ref: dropZoneRef,
|
|
229
|
-
type: "button",
|
|
230
|
-
onClick: handleOpenFileSelector,
|
|
231
|
-
onDrop: handleDrop,
|
|
232
|
-
onDragOver: (e) => e.preventDefault(),
|
|
233
|
-
onDragEnter: handleDragEnter,
|
|
234
|
-
onDragLeave: handleDragLeave,
|
|
235
|
-
className: clx(
|
|
236
|
-
"bg-ui-bg-component border-ui-border-strong transition-fg group flex w-full flex-col items-center gap-y-2 rounded-lg border border-dashed p-8",
|
|
237
|
-
"hover:border-ui-border-interactive focus:border-ui-border-interactive",
|
|
238
|
-
"focus:shadow-borders-focus outline-none focus:border-solid",
|
|
239
|
-
{
|
|
240
|
-
"!border-ui-border-error": hasError,
|
|
241
|
-
"!border-ui-border-interactive": isDragOver
|
|
242
|
-
}
|
|
243
|
-
),
|
|
244
|
-
children: uploadedImage ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("img", { src: uploadedImage, className: "w-32 h-32 rounded-md" }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
245
|
-
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle group-disabled:text-ui-fg-disabled flex items-center gap-x-2", children: [
|
|
246
|
-
/* @__PURE__ */ jsx(ArrowDownTray, {}),
|
|
247
|
-
/* @__PURE__ */ jsx(Text, { children: label })
|
|
248
|
-
] }),
|
|
249
|
-
!!hint && /* @__PURE__ */ jsx(
|
|
250
|
-
Text,
|
|
251
|
-
{
|
|
252
|
-
size: "small",
|
|
253
|
-
leading: "compact",
|
|
254
|
-
className: "text-ui-fg-muted group-disabled:text-ui-fg-disabled",
|
|
255
|
-
children: hint
|
|
256
|
-
}
|
|
257
|
-
)
|
|
258
|
-
] })
|
|
259
|
-
}
|
|
260
|
-
),
|
|
261
|
-
/* @__PURE__ */ jsx(
|
|
262
|
-
"input",
|
|
263
|
-
{
|
|
264
|
-
hidden: true,
|
|
265
|
-
ref: inputRef,
|
|
266
|
-
onChange: handleFileChange,
|
|
267
|
-
type: "file",
|
|
268
|
-
accept: formats.join(","),
|
|
269
|
-
multiple
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
] });
|
|
273
|
-
};
|
|
274
|
-
|
|
275
163
|
export {
|
|
276
164
|
decorateVariantsWithDefaultValues,
|
|
277
165
|
MediaSchema,
|
|
166
|
+
ProductCreateOptionSchema,
|
|
278
167
|
ProductCreateBaseSchema,
|
|
279
168
|
ProductCreateSchema,
|
|
280
169
|
EditProductMediaSchema,
|
|
281
|
-
PRODUCT_CREATE_FORM_DEFAULTS
|
|
282
|
-
FileUpload
|
|
170
|
+
PRODUCT_CREATE_FORM_DEFAULTS
|
|
283
171
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTags
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NYRRRCJS.js";
|
|
4
4
|
import {
|
|
5
5
|
useProductTypes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VV6IKGCN.js";
|
|
7
7
|
import {
|
|
8
8
|
useSalesChannels
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3B34B2M2.js";
|
|
10
10
|
|
|
11
11
|
// src/hooks/table/filters/use-product-table-filters.tsx
|
|
12
12
|
import { useTranslation } from "react-i18next";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCampaignTableColumns
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7TIZP4YG.js";
|
|
4
4
|
import {
|
|
5
5
|
useCampaignTableQuery
|
|
6
6
|
} from "./chunk-DY3XQPHC.js";
|
|
7
7
|
import {
|
|
8
8
|
_DataTable,
|
|
9
9
|
useDataTable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QXUKJDZB.js";
|
|
11
11
|
import {
|
|
12
12
|
SingleColumnPage
|
|
13
13
|
} from "./chunk-RM5RSDYP.js";
|
|
14
|
-
import {
|
|
15
|
-
ActionMenu
|
|
16
|
-
} from "./chunk-BDGZ4EQO.js";
|
|
17
14
|
import {
|
|
18
15
|
useCampaigns,
|
|
19
16
|
useDeleteCampaign
|
|
20
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BOZJOOGW.js";
|
|
18
|
+
import {
|
|
19
|
+
ActionMenu
|
|
20
|
+
} from "./chunk-BDGZ4EQO.js";
|
|
21
21
|
|
|
22
22
|
// src/pages/campaigns/campaign-list-page.tsx
|
|
23
23
|
import { Children as Children3 } from "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CreateCampaignFormFields
|
|
3
|
+
} from "./chunk-GYV6SKY7.js";
|
|
1
4
|
import {
|
|
2
5
|
VisuallyHidden
|
|
3
6
|
} from "./chunk-54TMLQH3.js";
|
|
4
|
-
import {
|
|
5
|
-
CreateCampaignFormFields
|
|
6
|
-
} from "./chunk-W6ZVQJYB.js";
|
|
7
7
|
import {
|
|
8
8
|
KeyboundForm
|
|
9
9
|
} from "./chunk-U2ZFCAPX.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-3CK6OINO.js";
|
|
14
14
|
import {
|
|
15
15
|
useCreateCampaign
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BOZJOOGW.js";
|
|
17
17
|
|
|
18
18
|
// src/pages/campaigns/create/create-campaign-form/create-campaign-form.tsx
|
|
19
19
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TextCell
|
|
3
|
-
} from "./chunk-JHIMVLB2.js";
|
|
4
1
|
import {
|
|
5
2
|
useQueryParams
|
|
6
3
|
} from "./chunk-THHRRYRS.js";
|
|
@@ -29,6 +26,53 @@ var useReturnReasonTableQuery = ({
|
|
|
29
26
|
};
|
|
30
27
|
};
|
|
31
28
|
|
|
29
|
+
// src/hooks/table/query/use-user-invite-table-query.tsx
|
|
30
|
+
var useUserInviteTableQuery = ({
|
|
31
|
+
prefix,
|
|
32
|
+
pageSize = 20
|
|
33
|
+
}) => {
|
|
34
|
+
const queryObject = useQueryParams(
|
|
35
|
+
["offset", "q", "order", "created_at", "updated_at"],
|
|
36
|
+
prefix
|
|
37
|
+
);
|
|
38
|
+
const { offset, created_at, updated_at, q, order } = queryObject;
|
|
39
|
+
const searchParams = {
|
|
40
|
+
limit: pageSize,
|
|
41
|
+
offset: offset ? Number(offset) : 0,
|
|
42
|
+
order,
|
|
43
|
+
created_at: created_at ? JSON.parse(created_at) : void 0,
|
|
44
|
+
updated_at: updated_at ? JSON.parse(updated_at) : void 0,
|
|
45
|
+
q
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
searchParams,
|
|
49
|
+
raw: queryObject
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/hooks/table/query/use-member-table-query.tsx
|
|
54
|
+
var useMemberTableQuery = ({
|
|
55
|
+
prefix,
|
|
56
|
+
pageSize = 20
|
|
57
|
+
}) => {
|
|
58
|
+
const queryObject = useQueryParams(
|
|
59
|
+
["offset", "order", "created_at", "updated_at"],
|
|
60
|
+
prefix
|
|
61
|
+
);
|
|
62
|
+
const { offset, created_at, updated_at, order } = queryObject;
|
|
63
|
+
const searchParams = {
|
|
64
|
+
limit: pageSize,
|
|
65
|
+
offset: offset ? Number(offset) : 0,
|
|
66
|
+
order,
|
|
67
|
+
created_at: created_at ? JSON.parse(created_at) : void 0,
|
|
68
|
+
updated_at: updated_at ? JSON.parse(updated_at) : void 0
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
searchParams,
|
|
72
|
+
raw: queryObject
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
32
76
|
// src/hooks/table/query/use-collection-table-query.tsx
|
|
33
77
|
var useCollectionTableQuery = ({
|
|
34
78
|
prefix,
|
|
@@ -77,39 +121,10 @@ var useProductTagTableQuery = ({
|
|
|
77
121
|
};
|
|
78
122
|
};
|
|
79
123
|
|
|
80
|
-
// src/hooks/table/columns/use-collection-table-columns.tsx
|
|
81
|
-
import { createColumnHelper } from "@tanstack/react-table";
|
|
82
|
-
import { useMemo } from "react";
|
|
83
|
-
import { useTranslation } from "react-i18next";
|
|
84
|
-
import { jsx } from "react/jsx-runtime";
|
|
85
|
-
var columnHelper = createColumnHelper();
|
|
86
|
-
var useCollectionTableColumns = () => {
|
|
87
|
-
const { t } = useTranslation();
|
|
88
|
-
return useMemo(
|
|
89
|
-
() => [
|
|
90
|
-
columnHelper.accessor("title", {
|
|
91
|
-
header: t("fields.title"),
|
|
92
|
-
cell: ({ getValue }) => /* @__PURE__ */ jsx(TextCell, { text: getValue() })
|
|
93
|
-
}),
|
|
94
|
-
columnHelper.accessor("handle", {
|
|
95
|
-
header: t("fields.handle"),
|
|
96
|
-
cell: ({ getValue }) => /* @__PURE__ */ jsx(TextCell, { text: `/${getValue()}` })
|
|
97
|
-
}),
|
|
98
|
-
columnHelper.accessor("products", {
|
|
99
|
-
header: t("fields.products"),
|
|
100
|
-
cell: ({ getValue }) => {
|
|
101
|
-
const count = getValue()?.length || void 0;
|
|
102
|
-
return /* @__PURE__ */ jsx(TextCell, { text: count });
|
|
103
|
-
}
|
|
104
|
-
})
|
|
105
|
-
],
|
|
106
|
-
[t]
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
124
|
export {
|
|
111
|
-
|
|
125
|
+
useMemberTableQuery,
|
|
112
126
|
useCollectionTableQuery,
|
|
113
127
|
useProductTagTableQuery,
|
|
114
|
-
useReturnReasonTableQuery
|
|
128
|
+
useReturnReasonTableQuery,
|
|
129
|
+
useUserInviteTableQuery
|
|
115
130
|
};
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
// src/components/inputs/numeric-input/numeric-input.tsx
|
|
2
|
+
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
3
|
+
import { Minus, Plus } from "@medusajs/icons";
|
|
4
|
+
import { Input } from "@medusajs/ui";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var NumericInput = forwardRef(
|
|
8
|
+
({
|
|
9
|
+
value,
|
|
10
|
+
onChange,
|
|
11
|
+
onBlur,
|
|
12
|
+
name,
|
|
13
|
+
placeholder,
|
|
14
|
+
min = 0,
|
|
15
|
+
max = 999999,
|
|
16
|
+
step = 1,
|
|
17
|
+
disabled = false,
|
|
18
|
+
className = "",
|
|
19
|
+
hideControls = false,
|
|
20
|
+
"aria-invalid": ariaInvalid = false
|
|
21
|
+
}, ref) => {
|
|
22
|
+
const { t } = useTranslation();
|
|
23
|
+
const [inputValue, setInputValue] = useState(
|
|
24
|
+
value?.toString() || ""
|
|
25
|
+
);
|
|
26
|
+
const timeoutRef = useRef(null);
|
|
27
|
+
const intervalRef = useRef(null);
|
|
28
|
+
const isMouseDownRef = useRef(false);
|
|
29
|
+
const currentValueRef = useRef(0);
|
|
30
|
+
const isUserTypingRef = useRef(false);
|
|
31
|
+
const previousValueRef = useRef(value);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (value !== void 0 && value !== previousValueRef.current) {
|
|
34
|
+
if (!isUserTypingRef.current) {
|
|
35
|
+
setInputValue(value.toString());
|
|
36
|
+
currentValueRef.current = value;
|
|
37
|
+
}
|
|
38
|
+
previousValueRef.current = value;
|
|
39
|
+
}
|
|
40
|
+
}, [value]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
return () => {
|
|
43
|
+
if (timeoutRef.current) {
|
|
44
|
+
clearTimeout(timeoutRef.current);
|
|
45
|
+
}
|
|
46
|
+
if (intervalRef.current) {
|
|
47
|
+
clearInterval(intervalRef.current);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}, []);
|
|
51
|
+
const handleInputChange = (e) => {
|
|
52
|
+
const newValue = e.target.value;
|
|
53
|
+
setInputValue(newValue);
|
|
54
|
+
isUserTypingRef.current = true;
|
|
55
|
+
const numericValue = parseFloat(newValue);
|
|
56
|
+
if (!isNaN(numericValue) && onChange) {
|
|
57
|
+
currentValueRef.current = numericValue;
|
|
58
|
+
onChange(numericValue);
|
|
59
|
+
} else if (newValue === "" && onChange) {
|
|
60
|
+
currentValueRef.current = 0;
|
|
61
|
+
onChange(void 0);
|
|
62
|
+
} else if (newValue === "0" && onChange) {
|
|
63
|
+
currentValueRef.current = 0;
|
|
64
|
+
onChange(0);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const handleIncrement = () => {
|
|
68
|
+
if (disabled) return;
|
|
69
|
+
const currentValue = parseFloat(inputValue) || 0;
|
|
70
|
+
const newValue = Math.min(currentValue + step, max);
|
|
71
|
+
currentValueRef.current = newValue;
|
|
72
|
+
setInputValue(newValue.toString());
|
|
73
|
+
if (onChange) {
|
|
74
|
+
onChange(newValue);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const handleDecrement = () => {
|
|
78
|
+
if (disabled) return;
|
|
79
|
+
const currentValue = parseFloat(inputValue) || 0;
|
|
80
|
+
const newValue = Math.max(currentValue - step, min);
|
|
81
|
+
currentValueRef.current = newValue;
|
|
82
|
+
setInputValue(newValue.toString());
|
|
83
|
+
if (onChange) {
|
|
84
|
+
onChange(newValue);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const handleKeyDown = (e) => {
|
|
88
|
+
if (e.key === "ArrowUp") {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
handleIncrement();
|
|
91
|
+
} else if (e.key === "ArrowDown") {
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
handleDecrement();
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const handleBlur = () => {
|
|
97
|
+
const numericValue = parseFloat(inputValue);
|
|
98
|
+
if (!isNaN(numericValue)) {
|
|
99
|
+
const clampedValue = Math.max(Math.min(numericValue, max), min);
|
|
100
|
+
if (clampedValue !== numericValue) {
|
|
101
|
+
setInputValue(clampedValue.toString());
|
|
102
|
+
if (onChange) {
|
|
103
|
+
onChange(clampedValue);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
isUserTypingRef.current = false;
|
|
109
|
+
}, 100);
|
|
110
|
+
if (onBlur) {
|
|
111
|
+
onBlur();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const clearRepeatInterval = () => {
|
|
115
|
+
if (timeoutRef.current) {
|
|
116
|
+
clearTimeout(timeoutRef.current);
|
|
117
|
+
timeoutRef.current = null;
|
|
118
|
+
}
|
|
119
|
+
if (intervalRef.current) {
|
|
120
|
+
clearInterval(intervalRef.current);
|
|
121
|
+
intervalRef.current = null;
|
|
122
|
+
}
|
|
123
|
+
isMouseDownRef.current = false;
|
|
124
|
+
};
|
|
125
|
+
const handleMouseDown = (action) => {
|
|
126
|
+
if (disabled) return;
|
|
127
|
+
isMouseDownRef.current = true;
|
|
128
|
+
if (action === "increment") {
|
|
129
|
+
handleIncrement();
|
|
130
|
+
} else {
|
|
131
|
+
handleDecrement();
|
|
132
|
+
}
|
|
133
|
+
timeoutRef.current = setTimeout(() => {
|
|
134
|
+
if (isMouseDownRef.current) {
|
|
135
|
+
intervalRef.current = setInterval(() => {
|
|
136
|
+
if (isMouseDownRef.current) {
|
|
137
|
+
if (action === "increment") {
|
|
138
|
+
handleIncrement();
|
|
139
|
+
} else {
|
|
140
|
+
handleDecrement();
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
clearRepeatInterval();
|
|
144
|
+
}
|
|
145
|
+
}, 50);
|
|
146
|
+
}
|
|
147
|
+
}, 500);
|
|
148
|
+
};
|
|
149
|
+
const handleClick = (e) => {
|
|
150
|
+
e.preventDefault();
|
|
151
|
+
};
|
|
152
|
+
const handleMouseUp = () => {
|
|
153
|
+
clearRepeatInterval();
|
|
154
|
+
};
|
|
155
|
+
const handleMouseLeave = () => {
|
|
156
|
+
clearRepeatInterval();
|
|
157
|
+
};
|
|
158
|
+
return /* @__PURE__ */ jsxs("div", { className: `relative w-full ${className}`, children: [
|
|
159
|
+
/* @__PURE__ */ jsx(
|
|
160
|
+
Input,
|
|
161
|
+
{
|
|
162
|
+
ref,
|
|
163
|
+
type: "number",
|
|
164
|
+
value: inputValue,
|
|
165
|
+
onChange: handleInputChange,
|
|
166
|
+
onBlur: handleBlur,
|
|
167
|
+
onKeyDown: handleKeyDown,
|
|
168
|
+
name,
|
|
169
|
+
placeholder: placeholder || t(
|
|
170
|
+
"products.fields.attributes.enterValuePlaceholder"
|
|
171
|
+
),
|
|
172
|
+
min,
|
|
173
|
+
max,
|
|
174
|
+
step,
|
|
175
|
+
disabled,
|
|
176
|
+
"aria-invalid": ariaInvalid,
|
|
177
|
+
className: `w-full [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none ${hideControls ? "" : "pr-16"}`
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
!hideControls && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-0 right-0 top-0 flex flex-row border-l border-ui-border-base", children: [
|
|
181
|
+
/* @__PURE__ */ jsx(
|
|
182
|
+
"button",
|
|
183
|
+
{
|
|
184
|
+
type: "button",
|
|
185
|
+
onClick: handleClick,
|
|
186
|
+
onMouseDown: () => handleMouseDown("decrement"),
|
|
187
|
+
onMouseUp: handleMouseUp,
|
|
188
|
+
onMouseLeave: handleMouseLeave,
|
|
189
|
+
disabled: disabled || (parseFloat(inputValue) || 0) <= min,
|
|
190
|
+
className: "bg-ui-field flex h-full w-8 items-center justify-center border-r border-ui-border-base transition-colors hover:bg-ui-bg-field-hover disabled:cursor-not-allowed disabled:opacity-50",
|
|
191
|
+
"aria-label": t("general.decrement"),
|
|
192
|
+
children: /* @__PURE__ */ jsx(Minus, { className: "h-3 w-3 text-ui-fg-muted" })
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ jsx(
|
|
196
|
+
"button",
|
|
197
|
+
{
|
|
198
|
+
type: "button",
|
|
199
|
+
onClick: handleClick,
|
|
200
|
+
onMouseDown: () => handleMouseDown("increment"),
|
|
201
|
+
onMouseUp: handleMouseUp,
|
|
202
|
+
onMouseLeave: handleMouseLeave,
|
|
203
|
+
disabled: disabled || (parseFloat(inputValue) || 0) >= max,
|
|
204
|
+
className: "bg-ui-field flex h-full w-8 items-center justify-center rounded-r-md transition-colors hover:bg-ui-bg-field-hover disabled:cursor-not-allowed disabled:opacity-50",
|
|
205
|
+
"aria-label": t("general.increment"),
|
|
206
|
+
children: /* @__PURE__ */ jsx(Plus, { className: "h-3 w-3 text-ui-fg-muted" })
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
] })
|
|
210
|
+
] });
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
NumericInput.displayName = "NumericInput";
|
|
214
|
+
|
|
215
|
+
export {
|
|
216
|
+
NumericInput
|
|
217
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCustomerTableColumns
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GJM5XI3E.js";
|
|
4
4
|
import {
|
|
5
5
|
useCustomerTableQuery
|
|
6
6
|
} from "./chunk-PVZBDWLK.js";
|
|
7
7
|
import {
|
|
8
8
|
useCustomerTableFilters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X22KTLZ7.js";
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QXUKJDZB.js";
|
|
14
14
|
import {
|
|
15
15
|
SingleColumnPage
|
|
16
16
|
} from "./chunk-RM5RSDYP.js";
|
|
17
17
|
import {
|
|
18
18
|
useCustomers
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LWJF63JW.js";
|
|
20
20
|
|
|
21
21
|
// src/pages/customers/customer-list-page.tsx
|
|
22
22
|
import { Children as Children3 } from "react";
|