@mercurjs/vendor 2.0.0 → 2.0.2
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,233 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CategoryCombobox
|
|
3
|
-
} from "./chunk-7EM7WET3.js";
|
|
4
|
-
import {
|
|
5
|
-
useComboboxData
|
|
6
|
-
} from "./chunk-OVPAOBZB.js";
|
|
7
|
-
import {
|
|
8
|
-
Combobox
|
|
9
|
-
} from "./chunk-AW77UWCZ.js";
|
|
10
|
-
import "./chunk-TKGWSUEI.js";
|
|
11
|
-
import {
|
|
12
|
-
KeyboundForm
|
|
13
|
-
} from "./chunk-U2ZFCAPX.js";
|
|
14
|
-
import {
|
|
15
|
-
RouteDrawer,
|
|
16
|
-
useRouteModal
|
|
17
|
-
} from "./chunk-3CK6OINO.js";
|
|
18
|
-
import {
|
|
19
|
-
Form
|
|
20
|
-
} from "./chunk-3QSRE5LS.js";
|
|
21
|
-
import "./chunk-INNFZYX2.js";
|
|
22
|
-
import "./chunk-VJTYMQVA.js";
|
|
23
|
-
import {
|
|
24
|
-
useProduct,
|
|
25
|
-
useUpdateProduct
|
|
26
|
-
} from "./chunk-WPFTRRWV.js";
|
|
27
|
-
import "./chunk-A5DJIOHN.js";
|
|
28
|
-
import "./chunk-RHKRREUU.js";
|
|
29
|
-
import "./chunk-ZA2KFUFR.js";
|
|
30
|
-
import {
|
|
31
|
-
fetchQuery,
|
|
32
|
-
sdk
|
|
33
|
-
} from "./chunk-Y224F4UU.js";
|
|
34
|
-
import "./chunk-PKBMQBKP.js";
|
|
35
|
-
|
|
36
|
-
// src/pages/products/[id]/organization/index.tsx
|
|
37
|
-
import { Heading } from "@medusajs/ui";
|
|
38
|
-
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
39
|
-
import { useParams } from "react-router-dom";
|
|
40
|
-
|
|
41
|
-
// src/pages/products/[id]/organization/product-organization-form/product-organization-form.tsx
|
|
42
|
-
import { Button, toast } from "@medusajs/ui";
|
|
43
|
-
import { useTranslation } from "react-i18next";
|
|
44
|
-
import * as zod from "zod";
|
|
45
|
-
import { useForm } from "react-hook-form";
|
|
46
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
47
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
48
|
-
var ProductOrganizationSchema = zod.object({
|
|
49
|
-
type_id: zod.string().nullable(),
|
|
50
|
-
collection_id: zod.string().nullable(),
|
|
51
|
-
categories: zod.array(zod.string()),
|
|
52
|
-
tag_ids: zod.array(zod.string())
|
|
53
|
-
});
|
|
54
|
-
var ProductOrganizationForm = ({
|
|
55
|
-
product
|
|
56
|
-
}) => {
|
|
57
|
-
const { t } = useTranslation();
|
|
58
|
-
const { handleSuccess } = useRouteModal();
|
|
59
|
-
const collections = useComboboxData({
|
|
60
|
-
queryKey: ["product_collections"],
|
|
61
|
-
queryFn: (params) => sdk.vendor.collections.query(params),
|
|
62
|
-
getOptions: (data) => data.collections.map((collection) => ({
|
|
63
|
-
label: collection.title,
|
|
64
|
-
value: collection.id
|
|
65
|
-
}))
|
|
66
|
-
});
|
|
67
|
-
const types = useComboboxData({
|
|
68
|
-
queryKey: ["product_types"],
|
|
69
|
-
queryFn: (params) => fetchQuery("/vendor/product-types", {
|
|
70
|
-
method: "GET",
|
|
71
|
-
query: params
|
|
72
|
-
}),
|
|
73
|
-
getOptions: (data) => data.product_types.map((type) => ({
|
|
74
|
-
label: type.value,
|
|
75
|
-
value: type.id
|
|
76
|
-
}))
|
|
77
|
-
});
|
|
78
|
-
const tags = useComboboxData({
|
|
79
|
-
queryKey: ["product_tags"],
|
|
80
|
-
queryFn: (params) => fetchQuery("/vendor/product-tags", {
|
|
81
|
-
method: "GET",
|
|
82
|
-
query: params
|
|
83
|
-
}),
|
|
84
|
-
getOptions: (data) => data.product_tags.map((tag) => ({
|
|
85
|
-
label: tag.value,
|
|
86
|
-
value: tag.id
|
|
87
|
-
}))
|
|
88
|
-
});
|
|
89
|
-
const form = useForm({
|
|
90
|
-
defaultValues: {
|
|
91
|
-
type_id: product.type_id ?? "",
|
|
92
|
-
collection_id: product.collection_id ?? "",
|
|
93
|
-
categories: product.categories?.map((c) => c.id) || [],
|
|
94
|
-
tag_ids: product.tags?.map((t2) => t2.id) || []
|
|
95
|
-
},
|
|
96
|
-
resolver: zodResolver(ProductOrganizationSchema)
|
|
97
|
-
});
|
|
98
|
-
const { mutateAsync, isPending } = useUpdateProduct(product.id);
|
|
99
|
-
const handleSubmit = form.handleSubmit(async (data) => {
|
|
100
|
-
await mutateAsync(
|
|
101
|
-
{
|
|
102
|
-
type_id: data.type_id ? data.type_id : void 0,
|
|
103
|
-
collection_id: data.collection_id ? data.collection_id : void 0,
|
|
104
|
-
categories: data.categories?.map((id) => ({ id })) ?? [],
|
|
105
|
-
tags: data.tag_ids?.map((t2) => ({ id: t2 })) ?? []
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
onSuccess: ({ product: product2 }) => {
|
|
109
|
-
toast.success(
|
|
110
|
-
t("products.organization.edit.toasts.success", {
|
|
111
|
-
title: product2.title
|
|
112
|
-
})
|
|
113
|
-
);
|
|
114
|
-
handleSuccess();
|
|
115
|
-
},
|
|
116
|
-
onError: (error) => {
|
|
117
|
-
toast.error(error.message);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
});
|
|
122
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { onSubmit: handleSubmit, className: "flex h-full flex-col", children: [
|
|
123
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, { children: /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col gap-y-4", children: [
|
|
124
|
-
/* @__PURE__ */ jsx(
|
|
125
|
-
Form.Field,
|
|
126
|
-
{
|
|
127
|
-
control: form.control,
|
|
128
|
-
name: "type_id",
|
|
129
|
-
render: ({ field }) => {
|
|
130
|
-
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
131
|
-
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.type.label") }),
|
|
132
|
-
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
133
|
-
Combobox,
|
|
134
|
-
{
|
|
135
|
-
...field,
|
|
136
|
-
options: types.options,
|
|
137
|
-
searchValue: types.searchValue,
|
|
138
|
-
onSearchValueChange: types.onSearchValueChange,
|
|
139
|
-
fetchNextPage: types.fetchNextPage
|
|
140
|
-
}
|
|
141
|
-
) }),
|
|
142
|
-
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
143
|
-
] });
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
/* @__PURE__ */ jsx(
|
|
148
|
-
Form.Field,
|
|
149
|
-
{
|
|
150
|
-
control: form.control,
|
|
151
|
-
name: "collection_id",
|
|
152
|
-
render: ({ field }) => {
|
|
153
|
-
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
154
|
-
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.collection.label") }),
|
|
155
|
-
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
156
|
-
Combobox,
|
|
157
|
-
{
|
|
158
|
-
...field,
|
|
159
|
-
multiple: false,
|
|
160
|
-
options: collections.options,
|
|
161
|
-
onSearchValueChange: collections.onSearchValueChange,
|
|
162
|
-
searchValue: collections.searchValue
|
|
163
|
-
}
|
|
164
|
-
) }),
|
|
165
|
-
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
166
|
-
] });
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
/* @__PURE__ */ jsx(
|
|
171
|
-
Form.Field,
|
|
172
|
-
{
|
|
173
|
-
control: form.control,
|
|
174
|
-
name: "categories",
|
|
175
|
-
render: ({ field }) => {
|
|
176
|
-
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
177
|
-
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.categories.label") }),
|
|
178
|
-
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(CategoryCombobox, { ...field }) }),
|
|
179
|
-
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
180
|
-
] });
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
),
|
|
184
|
-
/* @__PURE__ */ jsx(
|
|
185
|
-
Form.Field,
|
|
186
|
-
{
|
|
187
|
-
control: form.control,
|
|
188
|
-
name: "tag_ids",
|
|
189
|
-
render: ({ field }) => {
|
|
190
|
-
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
191
|
-
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.tags.label") }),
|
|
192
|
-
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
193
|
-
Combobox,
|
|
194
|
-
{
|
|
195
|
-
...field,
|
|
196
|
-
multiple: true,
|
|
197
|
-
options: tags.options,
|
|
198
|
-
onSearchValueChange: tags.onSearchValueChange,
|
|
199
|
-
searchValue: tags.searchValue
|
|
200
|
-
}
|
|
201
|
-
) }),
|
|
202
|
-
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
203
|
-
] });
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
)
|
|
207
|
-
] }) }),
|
|
208
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
209
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
|
|
210
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: t("actions.save") })
|
|
211
|
-
] }) })
|
|
212
|
-
] }) });
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
// src/pages/products/[id]/organization/index.tsx
|
|
216
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
217
|
-
var Component = () => {
|
|
218
|
-
const { id } = useParams();
|
|
219
|
-
const { t } = useTranslation2();
|
|
220
|
-
const { product, isLoading, isError, error } = useProduct(id, {
|
|
221
|
-
fields: "*categories"
|
|
222
|
-
});
|
|
223
|
-
if (isError) {
|
|
224
|
-
throw error;
|
|
225
|
-
}
|
|
226
|
-
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
227
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("products.organization.edit.header") }) }) }),
|
|
228
|
-
!isLoading && product && /* @__PURE__ */ jsx2(ProductOrganizationForm, { product })
|
|
229
|
-
] });
|
|
230
|
-
};
|
|
231
|
-
export {
|
|
232
|
-
Component
|
|
233
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ProductListPage
|
|
3
|
-
} from "./chunk-JK5CK6SW.js";
|
|
4
|
-
import "./chunk-GC33DBKG.js";
|
|
5
|
-
import "./chunk-4MFMCZEJ.js";
|
|
6
|
-
import "./chunk-FQERBIVS.js";
|
|
7
|
-
import "./chunk-AONKZGWL.js";
|
|
8
|
-
import "./chunk-DB6ANJBO.js";
|
|
9
|
-
import "./chunk-PHOCVOZ5.js";
|
|
10
|
-
import "./chunk-WHTS4G5K.js";
|
|
11
|
-
import "./chunk-LYUCDASZ.js";
|
|
12
|
-
import "./chunk-KAZ5BYTQ.js";
|
|
13
|
-
import "./chunk-3EF54XFY.js";
|
|
14
|
-
import {
|
|
15
|
-
ProductCreatePage
|
|
16
|
-
} from "./chunk-NYK5PQIF.js";
|
|
17
|
-
import "./chunk-NCYTM57J.js";
|
|
18
|
-
import "./chunk-ZZ7VKT2S.js";
|
|
19
|
-
import "./chunk-IQPN4PZJ.js";
|
|
20
|
-
import "./chunk-YVCBMOJG.js";
|
|
21
|
-
import "./chunk-SDA5NDMT.js";
|
|
22
|
-
import "./chunk-7EM7WET3.js";
|
|
23
|
-
import "./chunk-BI2WWFPS.js";
|
|
24
|
-
import {
|
|
25
|
-
EditProductMediaSchema,
|
|
26
|
-
MediaSchema,
|
|
27
|
-
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
28
|
-
ProductCreateBaseSchema,
|
|
29
|
-
ProductCreateSchema
|
|
30
|
-
} from "./chunk-52I65K53.js";
|
|
31
|
-
import "./chunk-IZ5RG5XI.js";
|
|
32
|
-
import "./chunk-SMQT3ZNO.js";
|
|
33
|
-
import "./chunk-S3PQKKNV.js";
|
|
34
|
-
import "./chunk-OVPAOBZB.js";
|
|
35
|
-
import "./chunk-AW77UWCZ.js";
|
|
36
|
-
import "./chunk-FGCKXH45.js";
|
|
37
|
-
import "./chunk-RH2NI4BC.js";
|
|
38
|
-
import "./chunk-TKGWSUEI.js";
|
|
39
|
-
import "./chunk-U2ZFCAPX.js";
|
|
40
|
-
import "./chunk-3CK6OINO.js";
|
|
41
|
-
import "./chunk-3QSRE5LS.js";
|
|
42
|
-
import "./chunk-RM5RSDYP.js";
|
|
43
|
-
import "./chunk-WIYFXWRI.js";
|
|
44
|
-
import "./chunk-5XOCUDS2.js";
|
|
45
|
-
import "./chunk-THHRRYRS.js";
|
|
46
|
-
import "./chunk-CFETU5BI.js";
|
|
47
|
-
import "./chunk-JRTZWK77.js";
|
|
48
|
-
import "./chunk-BDGZ4EQO.js";
|
|
49
|
-
import "./chunk-LAVHRER2.js";
|
|
50
|
-
import "./chunk-Y7QKP6QU.js";
|
|
51
|
-
import "./chunk-INNFZYX2.js";
|
|
52
|
-
import "./chunk-FPJLYWOU.js";
|
|
53
|
-
import "./chunk-DHADGZJ5.js";
|
|
54
|
-
import "./chunk-VGJTARSA.js";
|
|
55
|
-
import "./chunk-DYUTYBAQ.js";
|
|
56
|
-
import "./chunk-Y4VBOHAP.js";
|
|
57
|
-
import "./chunk-JKXAL7WR.js";
|
|
58
|
-
import "./chunk-DC2K6CFQ.js";
|
|
59
|
-
import "./chunk-VDWGP2U6.js";
|
|
60
|
-
import "./chunk-RE7YXVFG.js";
|
|
61
|
-
import "./chunk-HUNGNEPY.js";
|
|
62
|
-
import "./chunk-PADOWAXM.js";
|
|
63
|
-
import "./chunk-LWVBKUUL.js";
|
|
64
|
-
import "./chunk-RIILGKYR.js";
|
|
65
|
-
import "./chunk-6EYGH3TB.js";
|
|
66
|
-
import "./chunk-GTUR4HSV.js";
|
|
67
|
-
import "./chunk-SI4ALL7W.js";
|
|
68
|
-
import "./chunk-ZFFA36DB.js";
|
|
69
|
-
import "./chunk-VHMGJUYN.js";
|
|
70
|
-
import "./chunk-VJTYMQVA.js";
|
|
71
|
-
import "./chunk-WPFTRRWV.js";
|
|
72
|
-
import "./chunk-A5DJIOHN.js";
|
|
73
|
-
import "./chunk-RHKRREUU.js";
|
|
74
|
-
import "./chunk-ZA2KFUFR.js";
|
|
75
|
-
import "./chunk-Y224F4UU.js";
|
|
76
|
-
import "./chunk-PKBMQBKP.js";
|
|
77
|
-
export {
|
|
78
|
-
EditProductMediaSchema,
|
|
79
|
-
MediaSchema,
|
|
80
|
-
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
81
|
-
ProductCreateBaseSchema,
|
|
82
|
-
ProductCreatePage,
|
|
83
|
-
ProductCreateSchema,
|
|
84
|
-
ProductListPage
|
|
85
|
-
};
|
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AvatarBox
|
|
3
|
-
} from "./chunk-CP5IL4P6.js";
|
|
4
|
-
import "./chunk-FMFVTERD.js";
|
|
5
|
-
import {
|
|
6
|
-
i18n
|
|
7
|
-
} from "./chunk-RH2NI4BC.js";
|
|
8
|
-
import {
|
|
9
|
-
Form
|
|
10
|
-
} from "./chunk-3QSRE5LS.js";
|
|
11
|
-
import "./chunk-U2EI2ZLM.js";
|
|
12
|
-
import "./chunk-FPJLYWOU.js";
|
|
13
|
-
import {
|
|
14
|
-
useSignUpWithEmailPass
|
|
15
|
-
} from "./chunk-DHADGZJ5.js";
|
|
16
|
-
import "./chunk-VGJTARSA.js";
|
|
17
|
-
import "./chunk-DYUTYBAQ.js";
|
|
18
|
-
import "./chunk-Y4VBOHAP.js";
|
|
19
|
-
import "./chunk-JKXAL7WR.js";
|
|
20
|
-
import "./chunk-DC2K6CFQ.js";
|
|
21
|
-
import "./chunk-VDWGP2U6.js";
|
|
22
|
-
import "./chunk-RE7YXVFG.js";
|
|
23
|
-
import "./chunk-HUNGNEPY.js";
|
|
24
|
-
import "./chunk-PADOWAXM.js";
|
|
25
|
-
import "./chunk-LWVBKUUL.js";
|
|
26
|
-
import "./chunk-RIILGKYR.js";
|
|
27
|
-
import "./chunk-6EYGH3TB.js";
|
|
28
|
-
import "./chunk-GTUR4HSV.js";
|
|
29
|
-
import "./chunk-SI4ALL7W.js";
|
|
30
|
-
import "./chunk-ZFFA36DB.js";
|
|
31
|
-
import "./chunk-VHMGJUYN.js";
|
|
32
|
-
import "./chunk-VJTYMQVA.js";
|
|
33
|
-
import "./chunk-WPFTRRWV.js";
|
|
34
|
-
import "./chunk-A5DJIOHN.js";
|
|
35
|
-
import "./chunk-RHKRREUU.js";
|
|
36
|
-
import "./chunk-ZA2KFUFR.js";
|
|
37
|
-
import {
|
|
38
|
-
fetchQuery
|
|
39
|
-
} from "./chunk-Y224F4UU.js";
|
|
40
|
-
import "./chunk-PKBMQBKP.js";
|
|
41
|
-
|
|
42
|
-
// src/pages/register/register.tsx
|
|
43
|
-
import { Children, useState as useState2 } from "react";
|
|
44
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
45
|
-
import { Alert, Button, Heading, Hint, Input, Text as Text2 } from "@medusajs/ui";
|
|
46
|
-
import { useForm } from "react-hook-form";
|
|
47
|
-
import { Trans, useTranslation as useTranslation2 } from "react-i18next";
|
|
48
|
-
import { Link, Navigate } from "react-router-dom";
|
|
49
|
-
import config from "virtual:mercur/config";
|
|
50
|
-
|
|
51
|
-
// src/pages/register/password-validator.tsx
|
|
52
|
-
import { useCallback, useEffect, useState } from "react";
|
|
53
|
-
import { CheckCircle } from "@medusajs/icons";
|
|
54
|
-
import { Container, Text } from "@medusajs/ui";
|
|
55
|
-
import { useTranslation } from "react-i18next";
|
|
56
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
57
|
-
var INITIAL_VALIDATION_STATE = {
|
|
58
|
-
isValid: false,
|
|
59
|
-
lower: false,
|
|
60
|
-
upper: false,
|
|
61
|
-
"12chars": false,
|
|
62
|
-
digit: false,
|
|
63
|
-
specialChar: false
|
|
64
|
-
};
|
|
65
|
-
function validatePassword(password) {
|
|
66
|
-
const errors = {
|
|
67
|
-
tooShort: password.length < 12,
|
|
68
|
-
noLower: !/[a-z]/.test(password),
|
|
69
|
-
noUpper: !/[A-Z]/.test(password),
|
|
70
|
-
noDigit: !/[0-9]/.test(password),
|
|
71
|
-
noSpecialChar: !/[!@#$%^&*(),.?":{}|<>_\-+=\[\]\\\/~`]/.test(password)
|
|
72
|
-
};
|
|
73
|
-
return {
|
|
74
|
-
isValid: !Object.values(errors).some(Boolean),
|
|
75
|
-
errors
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
var RULE_KEYS = ["12chars", "lower", "upper", "digit", "specialChar"];
|
|
79
|
-
var RULE_I18N_MAP = {
|
|
80
|
-
lower: "validation.rules.lower",
|
|
81
|
-
upper: "validation.rules.upper",
|
|
82
|
-
"12chars": "validation.rules.12chars",
|
|
83
|
-
digit: "validation.rules.digit",
|
|
84
|
-
specialChar: "validation.rules.specialChar"
|
|
85
|
-
};
|
|
86
|
-
var PasswordRule = ({
|
|
87
|
-
ruleKey,
|
|
88
|
-
hasError
|
|
89
|
-
}) => {
|
|
90
|
-
const { t } = useTranslation();
|
|
91
|
-
return /* @__PURE__ */ jsxs(
|
|
92
|
-
Text,
|
|
93
|
-
{
|
|
94
|
-
as: "p",
|
|
95
|
-
size: "xsmall",
|
|
96
|
-
className: `flex items-center gap-2 ${hasError ? "text-ui-fg-error" : "text-ui-tag-green-text"}`,
|
|
97
|
-
children: [
|
|
98
|
-
/* @__PURE__ */ jsx(CheckCircle, {}),
|
|
99
|
-
" ",
|
|
100
|
-
t(RULE_I18N_MAP[ruleKey])
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
var PasswordValidator = ({
|
|
106
|
-
password,
|
|
107
|
-
onValidationChange
|
|
108
|
-
}) => {
|
|
109
|
-
const [dirty, setDirty] = useState(false);
|
|
110
|
-
const [state, setState] = useState(INITIAL_VALIDATION_STATE);
|
|
111
|
-
const handleValidationChange = useCallback(onValidationChange, []);
|
|
112
|
-
useEffect(() => {
|
|
113
|
-
if (!dirty && password.length > 0) {
|
|
114
|
-
setDirty(true);
|
|
115
|
-
}
|
|
116
|
-
const validation = validatePassword(password);
|
|
117
|
-
const nextState = {
|
|
118
|
-
isValid: validation.isValid,
|
|
119
|
-
lower: validation.errors.noLower,
|
|
120
|
-
upper: validation.errors.noUpper,
|
|
121
|
-
"12chars": validation.errors.tooShort,
|
|
122
|
-
digit: validation.errors.noDigit,
|
|
123
|
-
specialChar: validation.errors.noSpecialChar
|
|
124
|
-
};
|
|
125
|
-
handleValidationChange(nextState);
|
|
126
|
-
setState(nextState);
|
|
127
|
-
}, [password, handleValidationChange]);
|
|
128
|
-
if (!dirty) {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
return /* @__PURE__ */ jsx(Container, { className: "flex flex-col gap-y-1 p-2", children: RULE_KEYS.map((key) => /* @__PURE__ */ jsx(PasswordRule, { ruleKey: key, hasError: state[key] }, key)) });
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
// src/pages/register/register-schema.ts
|
|
135
|
-
import * as z from "zod";
|
|
136
|
-
var RegisterSchema = z.object({
|
|
137
|
-
name: z.string().min(2),
|
|
138
|
-
email: z.string().email(),
|
|
139
|
-
password: z.string().min(12).regex(/[a-z]/).regex(/[A-Z]/).regex(/[0-9]/).regex(/[!@#$%^&*(),.?":{}|<>_\-+=\[\]\\\/~`]/),
|
|
140
|
-
confirmPassword: z.string()
|
|
141
|
-
}).refine((data) => data.password === data.confirmPassword, {
|
|
142
|
-
message: i18n.t("register.passwordMismatch"),
|
|
143
|
-
path: ["confirmPassword"]
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
// src/pages/register/register.tsx
|
|
147
|
-
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
148
|
-
var RegisterLogo = () => {
|
|
149
|
-
return /* @__PURE__ */ jsx2(AvatarBox, {});
|
|
150
|
-
};
|
|
151
|
-
var RegisterHeader = () => {
|
|
152
|
-
const { t } = useTranslation2();
|
|
153
|
-
return /* @__PURE__ */ jsxs2("div", { className: "mb-4 flex flex-col items-center", children: [
|
|
154
|
-
/* @__PURE__ */ jsx2(Heading, { children: t("register.title") }),
|
|
155
|
-
/* @__PURE__ */ jsx2(Text2, { size: "small", className: "text-ui-fg-subtle text-center", children: t("register.hint") })
|
|
156
|
-
] });
|
|
157
|
-
};
|
|
158
|
-
var RegisterForm = () => {
|
|
159
|
-
const { t } = useTranslation2();
|
|
160
|
-
const [success, setSuccess] = useState2(false);
|
|
161
|
-
const [passwordValidation, setPasswordValidation] = useState2(INITIAL_VALIDATION_STATE);
|
|
162
|
-
const form = useForm({
|
|
163
|
-
resolver: zodResolver(RegisterSchema),
|
|
164
|
-
defaultValues: {
|
|
165
|
-
name: "",
|
|
166
|
-
email: "",
|
|
167
|
-
password: "",
|
|
168
|
-
confirmPassword: ""
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
const { mutateAsync, isPending } = useSignUpWithEmailPass();
|
|
172
|
-
const [isCreatingSeller, setIsCreatingSeller] = useState2(false);
|
|
173
|
-
const handleSubmit = form.handleSubmit(async ({ name, email, password, confirmPassword }) => {
|
|
174
|
-
if (!passwordValidation.isValid) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
try {
|
|
178
|
-
const authResponse = await mutateAsync({ name, email, password, confirmPassword });
|
|
179
|
-
const token = authResponse.token;
|
|
180
|
-
setIsCreatingSeller(true);
|
|
181
|
-
await fetchQuery("/vendor/sellers", {
|
|
182
|
-
method: "POST",
|
|
183
|
-
body: { name, email },
|
|
184
|
-
headers: {
|
|
185
|
-
Authorization: `Bearer ${token}`
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
setSuccess(true);
|
|
189
|
-
} catch (error) {
|
|
190
|
-
setIsCreatingSeller(false);
|
|
191
|
-
const status = "status" in error ? error.status : void 0;
|
|
192
|
-
if (status === 401) {
|
|
193
|
-
form.setError("email", {
|
|
194
|
-
type: "manual",
|
|
195
|
-
message: error.message
|
|
196
|
-
});
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
if (status === 409) {
|
|
200
|
-
form.setError("email", {
|
|
201
|
-
type: "manual",
|
|
202
|
-
message: t("register.emailTaken")
|
|
203
|
-
});
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
form.setError("root.serverError", {
|
|
207
|
-
type: "manual",
|
|
208
|
-
message: error.message
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
const serverError = form.formState.errors?.root?.serverError?.message;
|
|
213
|
-
const validationError = form.formState.errors.email?.message || form.formState.errors.password?.message || form.formState.errors.name?.message || form.formState.errors.confirmPassword?.message;
|
|
214
|
-
if (success) {
|
|
215
|
-
return /* @__PURE__ */ jsx2(RegisterSuccess, {});
|
|
216
|
-
}
|
|
217
|
-
return /* @__PURE__ */ jsx2("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ jsx2(Form, { ...form, children: /* @__PURE__ */ jsxs2(
|
|
218
|
-
"form",
|
|
219
|
-
{
|
|
220
|
-
onSubmit: handleSubmit,
|
|
221
|
-
className: "flex w-full flex-col gap-y-6",
|
|
222
|
-
children: [
|
|
223
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-y-2", children: [
|
|
224
|
-
/* @__PURE__ */ jsx2(
|
|
225
|
-
Form.Field,
|
|
226
|
-
{
|
|
227
|
-
control: form.control,
|
|
228
|
-
name: "name",
|
|
229
|
-
render: ({ field }) => /* @__PURE__ */ jsx2(Form.Item, { children: /* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsx2(
|
|
230
|
-
Input,
|
|
231
|
-
{
|
|
232
|
-
autoComplete: "organization",
|
|
233
|
-
...field,
|
|
234
|
-
className: "bg-ui-bg-field-component",
|
|
235
|
-
placeholder: t("register.companyName")
|
|
236
|
-
}
|
|
237
|
-
) }) })
|
|
238
|
-
}
|
|
239
|
-
),
|
|
240
|
-
/* @__PURE__ */ jsx2(
|
|
241
|
-
Form.Field,
|
|
242
|
-
{
|
|
243
|
-
control: form.control,
|
|
244
|
-
name: "email",
|
|
245
|
-
render: ({ field }) => /* @__PURE__ */ jsx2(Form.Item, { children: /* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsx2(
|
|
246
|
-
Input,
|
|
247
|
-
{
|
|
248
|
-
autoComplete: "email",
|
|
249
|
-
...field,
|
|
250
|
-
className: "bg-ui-bg-field-component",
|
|
251
|
-
placeholder: t("fields.email")
|
|
252
|
-
}
|
|
253
|
-
) }) })
|
|
254
|
-
}
|
|
255
|
-
),
|
|
256
|
-
/* @__PURE__ */ jsx2(
|
|
257
|
-
Form.Field,
|
|
258
|
-
{
|
|
259
|
-
control: form.control,
|
|
260
|
-
name: "password",
|
|
261
|
-
render: ({ field }) => /* @__PURE__ */ jsx2(Form.Item, { children: /* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsx2(
|
|
262
|
-
Input,
|
|
263
|
-
{
|
|
264
|
-
type: "password",
|
|
265
|
-
autoComplete: "new-password",
|
|
266
|
-
...field,
|
|
267
|
-
className: "bg-ui-bg-field-component",
|
|
268
|
-
placeholder: t("fields.password")
|
|
269
|
-
}
|
|
270
|
-
) }) })
|
|
271
|
-
}
|
|
272
|
-
),
|
|
273
|
-
/* @__PURE__ */ jsx2(
|
|
274
|
-
Form.Field,
|
|
275
|
-
{
|
|
276
|
-
control: form.control,
|
|
277
|
-
name: "confirmPassword",
|
|
278
|
-
render: ({ field }) => /* @__PURE__ */ jsx2(Form.Item, { children: /* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsx2(
|
|
279
|
-
Input,
|
|
280
|
-
{
|
|
281
|
-
type: "password",
|
|
282
|
-
autoComplete: "new-password",
|
|
283
|
-
...field,
|
|
284
|
-
className: "bg-ui-bg-field-component",
|
|
285
|
-
placeholder: t("register.confirmPassword")
|
|
286
|
-
}
|
|
287
|
-
) }) })
|
|
288
|
-
}
|
|
289
|
-
),
|
|
290
|
-
/* @__PURE__ */ jsx2(
|
|
291
|
-
PasswordValidator,
|
|
292
|
-
{
|
|
293
|
-
password: form.watch("password"),
|
|
294
|
-
onValidationChange: setPasswordValidation
|
|
295
|
-
}
|
|
296
|
-
)
|
|
297
|
-
] }),
|
|
298
|
-
validationError && /* @__PURE__ */ jsx2("div", { className: "text-center", children: /* @__PURE__ */ jsx2(Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
|
|
299
|
-
serverError && /* @__PURE__ */ jsx2(
|
|
300
|
-
Alert,
|
|
301
|
-
{
|
|
302
|
-
className: "items-center bg-ui-bg-base p-2",
|
|
303
|
-
dismissible: true,
|
|
304
|
-
variant: "error",
|
|
305
|
-
children: serverError
|
|
306
|
-
}
|
|
307
|
-
),
|
|
308
|
-
/* @__PURE__ */ jsx2(Button, { className: "w-full", type: "submit", isLoading: isPending || isCreatingSeller, children: t("register.signUp") })
|
|
309
|
-
]
|
|
310
|
-
}
|
|
311
|
-
) }) });
|
|
312
|
-
};
|
|
313
|
-
var RegisterSuccess = () => {
|
|
314
|
-
const { t } = useTranslation2();
|
|
315
|
-
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center", children: [
|
|
316
|
-
/* @__PURE__ */ jsx2(Heading, { children: t("register.successTitle") }),
|
|
317
|
-
/* @__PURE__ */ jsx2(
|
|
318
|
-
Text2,
|
|
319
|
-
{
|
|
320
|
-
size: "small",
|
|
321
|
-
className: "mt-2 max-w-[320px] text-center text-ui-fg-subtle",
|
|
322
|
-
children: t("register.successHint")
|
|
323
|
-
}
|
|
324
|
-
),
|
|
325
|
-
/* @__PURE__ */ jsx2(Link, { to: "/login", children: /* @__PURE__ */ jsx2(Button, { className: "mt-8", children: t("register.backToLogin") }) })
|
|
326
|
-
] });
|
|
327
|
-
};
|
|
328
|
-
var RegisterFooter = () => {
|
|
329
|
-
return /* @__PURE__ */ jsx2("span", { className: "txt-small my-6 text-ui-fg-muted", children: /* @__PURE__ */ jsx2(
|
|
330
|
-
Trans,
|
|
331
|
-
{
|
|
332
|
-
i18nKey: "register.alreadySeller",
|
|
333
|
-
components: [
|
|
334
|
-
/* @__PURE__ */ jsx2(
|
|
335
|
-
Link,
|
|
336
|
-
{
|
|
337
|
-
to: "/login",
|
|
338
|
-
className: "text-ui-fg-interactive transition-fg hover:text-ui-fg-interactive-hover focus-visible:text-ui-fg-interactive-hover font-medium outline-none"
|
|
339
|
-
},
|
|
340
|
-
"login-link"
|
|
341
|
-
)
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
) });
|
|
345
|
-
};
|
|
346
|
-
var Root = ({ children }) => {
|
|
347
|
-
if (!config.enableSellerRegistration) {
|
|
348
|
-
return /* @__PURE__ */ jsx2(Navigate, { to: "/login", replace: true });
|
|
349
|
-
}
|
|
350
|
-
return /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ jsx2("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
351
|
-
/* @__PURE__ */ jsx2(RegisterLogo, {}),
|
|
352
|
-
/* @__PURE__ */ jsx2(RegisterHeader, {}),
|
|
353
|
-
/* @__PURE__ */ jsx2(RegisterForm, {}),
|
|
354
|
-
/* @__PURE__ */ jsx2(RegisterFooter, {})
|
|
355
|
-
] }) }) });
|
|
356
|
-
};
|
|
357
|
-
var RegisterPage = Object.assign(Root, {
|
|
358
|
-
Logo: RegisterLogo,
|
|
359
|
-
Header: RegisterHeader,
|
|
360
|
-
Form: RegisterForm,
|
|
361
|
-
Success: RegisterSuccess,
|
|
362
|
-
Footer: RegisterFooter
|
|
363
|
-
});
|
|
364
|
-
export {
|
|
365
|
-
RegisterPage
|
|
366
|
-
};
|