@mercurjs/vendor 2.1.6 → 2.2.0-canary.11
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]-A55T2ORL.js +3066 -0
- package/dist/[id]-B4YZTANM.js +1571 -0
- package/dist/{[id]-UTKO3VG4.js → [id]-EKLRGVBA.js} +10 -10
- package/dist/{[id]-TO6KT3ZE.js → [id]-FE5GYYVZ.js} +28 -25
- package/dist/{[id]-4VCL3MMM.js → [id]-GBT6VB4S.js} +29 -23
- package/dist/{[id]-3G5G7ZFV.js → [id]-GC3ZYPK4.js} +25 -22
- package/dist/{[id]-6PXEWRG7.js → [id]-J6BZG5PU.js} +14 -14
- package/dist/{[id]-B3LHVQM5.js → [id]-QOEO3JOV.js} +29 -23
- package/dist/{[id]-H3C3ZSC6.js → [id]-QQU5HVFU.js} +29 -23
- package/dist/{[id]-PDGHF5J2.js → [id]-SHAJTJNZ.js} +43 -36
- package/dist/{[id]-X4DDKOMQ.js → [id]-T5ECVBPF.js} +30 -24
- package/dist/{[id]-T2ROPEGY.js → [id]-U5KZEQDR.js} +7 -7
- package/dist/{[id]-7RUAH3TI.js → [id]-YPCO3DJV.js} +5 -5
- package/dist/{[id]-Y7GAMNC5.js → [id]-ZCMSBEVM.js} +4 -4
- package/dist/{[location_id]-D55RQOXT.js → [location_id]-NUBXDDJC.js} +9 -9
- package/dist/{[province_id]-OFH2ZOFQ.js → [province_id]-6GUA4PV5.js} +23 -20
- package/dist/{add-C6OX5C54.js → add-NTRYWOJF.js} +42 -35
- package/dist/add-RU3WL4YB.js +428 -0
- package/dist/{add-customer-groups-PJRJUWS2.js → add-customer-groups-U5RZWW4B.js} +19 -16
- package/dist/{add-products-INOLNPO6.js → add-products-Q4MMDQKT.js} +26 -20
- package/dist/{add-promotions-AHDOP52Q.js → add-promotions-3AYXQXTP.js} +8 -8
- package/dist/{add-to-campaign-HL6NGRR4.js → add-to-campaign-QKYQCSR2.js} +4 -4
- package/dist/{address-KRENKSLP.js → address-77Y3AOQ3.js} +19 -16
- package/dist/{adjust-inventory-H4EUP7J3.js → adjust-inventory-AFJLWF5R.js} +2 -2
- package/dist/{allocate-items-SUCUZU4D.js → allocate-items-TCM5A55Y.js} +141 -126
- package/dist/{areas-UUMZDXLX.js → areas-XUC5V5UO.js} +8 -8
- package/dist/{attributes-CALEHJJG.js → attributes-SZP2MM5L.js} +3 -3
- package/dist/{breadcrumb-KQSFIXQ4.js → breadcrumb-2XA2WOK7.js} +1 -1
- package/dist/{breadcrumb-IG7VZGW2.js → breadcrumb-5NP23D6X.js} +15 -12
- package/dist/{breadcrumb-TW5JEOYS.js → breadcrumb-EVZIOB2G.js} +14 -11
- package/dist/{breadcrumb-OIGGCB3L.js → breadcrumb-FPWBT76A.js} +8 -2
- package/dist/{breadcrumb-BS7Y5OKF.js → breadcrumb-IK6XCQOQ.js} +2 -2
- package/dist/{breadcrumb-M5Z5WA6I.js → breadcrumb-KTARIL65.js} +2 -2
- package/dist/{breadcrumb-VNNZ3TTW.js → breadcrumb-PBR27GGX.js} +3 -3
- package/dist/breadcrumb-THJ2HPRB.js +26 -0
- package/dist/{breadcrumb-6W2VP3OZ.js → breadcrumb-TNJSGX4T.js} +15 -12
- package/dist/{campaigns-HS6MIO7X.js → campaigns-JAQTSA4Z.js} +6 -6
- package/dist/{categories-PKWR3FM3.js → categories-T4QJYX4R.js} +8 -8
- package/dist/{chunk-4URLUCTD.js → chunk-25E4KME5.js} +3 -3
- package/dist/chunk-27KRIXMQ.js +71 -0
- package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
- package/dist/{chunk-ZYOXKUKZ.js → chunk-2QTNCGKX.js} +1 -1
- package/dist/{chunk-5UD4P6YL.js → chunk-2USXZSTK.js} +4 -4
- package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
- package/dist/{chunk-VQ5EKDA3.js → chunk-3PMM6AMP.js} +3 -3
- package/dist/{chunk-J6BRLL3F.js → chunk-463CNCJC.js} +3 -3
- package/dist/{chunk-Y2QI7KWS.js → chunk-4LVP635F.js} +408 -664
- package/dist/{chunk-UL4O5M4S.js → chunk-4S6XGIC6.js} +1 -18
- package/dist/{chunk-RUE5BPC2.js → chunk-5QI3NDJG.js} +1 -1
- package/dist/{chunk-PPLC4IKI.js → chunk-5T6UWTRU.js} +10 -5
- package/dist/{chunk-WITQNQXN.js → chunk-6FUIK3PX.js} +4 -4
- package/dist/{chunk-HGQTL7NX.js → chunk-6K6EQOJF.js} +3 -3
- package/dist/{chunk-KAZ5BYTQ.js → chunk-6OUPJNYO.js} +5 -3
- package/dist/{chunk-PEKANQ3T.js → chunk-6UZERVBI.js} +2 -2
- package/dist/{chunk-RTAWYMQP.js → chunk-7CMRFP5Q.js} +2 -2
- package/dist/{chunk-I2IKYOZX.js → chunk-7IPCLQ5V.js} +19 -19
- package/dist/chunk-ADGVQVHP.js +101 -0
- package/dist/{chunk-IZ5RG5XI.js → chunk-AJLGY3LQ.js} +1 -21
- package/dist/chunk-BER45EYD.js +82 -0
- package/dist/{chunk-PCMNEUMV.js → chunk-BXRNZS5K.js} +1 -1
- package/dist/chunk-CFRWIQIZ.js +43 -0
- package/dist/{chunk-RL7SFZOF.js → chunk-DDJQRV6E.js} +1 -1
- package/dist/{chunk-D2MA5TAP.js → chunk-DO4F5FIO.js} +2 -2
- package/dist/{chunk-X4FLOQ45.js → chunk-DQKK43PR.js} +3 -3
- package/dist/{chunk-6WY5X4PE.js → chunk-E6W57UP3.js} +35 -125
- package/dist/chunk-FP6U6BPH.js +61 -0
- package/dist/chunk-FWPGOIFA.js +22 -0
- package/dist/{chunk-BLVJAKBA.js → chunk-FWS4YJ4B.js} +1 -1
- package/dist/chunk-GAE6TKOR.js +811 -0
- package/dist/{chunk-3CK6OINO.js → chunk-GDWBOQI5.js} +3 -5
- package/dist/{chunk-PDQSPKG5.js → chunk-GN6KB75Z.js} +1 -1
- package/dist/chunk-HDEOZN2Q.js +60 -0
- package/dist/chunk-IBEUR3J7.js +173 -0
- package/dist/chunk-J6XCRFBW.js +30 -0
- package/dist/{chunk-ZEVYT6IX.js → chunk-JAUZ73XE.js} +151 -266
- package/dist/{chunk-CNLP35S7.js → chunk-K6LOZ4S3.js} +54 -18
- package/dist/{chunk-JQP7MOFH.js → chunk-KIFSQOM2.js} +2 -2
- package/dist/{chunk-DARJTN4I.js → chunk-L4KBTV57.js} +9 -2
- package/dist/chunk-L57USMYC.js +39 -0
- package/dist/chunk-LARLBYU6.js +127 -0
- package/dist/chunk-LDZCCWJB.js +518 -0
- package/dist/chunk-LEWA4BPH.js +18 -0
- package/dist/chunk-LFX6WU4A.js +36 -0
- package/dist/{chunk-ITI54CII.js → chunk-LKUW5SV4.js} +6 -6
- package/dist/{chunk-LPOAVK6Y.js → chunk-LQD232FW.js} +47 -12
- package/dist/{chunk-4MFMCZEJ.js → chunk-MJCL3WID.js} +2 -2
- package/dist/{chunk-32RYSB2V.js → chunk-NBKWY6XN.js} +2 -2
- package/dist/{chunk-GYV6SKY7.js → chunk-O7VOGTLX.js} +4 -6
- package/dist/{chunk-KQGVSLUI.js → chunk-OYKUQXJX.js} +1926 -957
- package/dist/{chunk-CYTNBXWF.js → chunk-OZ44ATGE.js} +8 -8
- package/dist/{chunk-7Q5SDEK7.js → chunk-PAVZ6FPK.js} +7 -7
- package/dist/{chunk-2RHAI7WK.js → chunk-QLBIBLOY.js} +2 -2
- package/dist/chunk-RXV7INUV.js +426 -0
- package/dist/chunk-S23FD6FA.js +210 -0
- package/dist/{chunk-NYDJTWRL.js → chunk-SGR4DMCW.js} +4 -4
- package/dist/{chunk-OXXL4WQU.js → chunk-SPOHNK4X.js} +6 -6
- package/dist/{chunk-AIF2KTEE.js → chunk-SSUUT5LK.js} +12 -2
- package/dist/{chunk-QX45GVAL.js → chunk-SZBERGA4.js} +8 -8
- package/dist/{chunk-6SBMVLJ2.js → chunk-T5MJWWDX.js} +2 -2
- package/dist/chunk-T6LHVNWO.js +27 -0
- package/dist/chunk-TBYCZRZ7.js +248 -0
- package/dist/chunk-TF6V3TFG.js +438 -0
- package/dist/chunk-TW324MAT.js +185 -0
- package/dist/{chunk-4ZGFODSC.js → chunk-TYESCFYW.js} +1 -1
- package/dist/chunk-U5G3AVED.js +64 -0
- package/dist/chunk-U6PBLMXD.js +14 -0
- package/dist/{chunk-GZMXTNDN.js → chunk-UCYSCKZV.js} +1432 -1380
- package/dist/{chunk-P3ZTO6T2.js → chunk-UFFVRF4V.js} +2 -2
- package/dist/chunk-UM7ZR3VU.js +14 -0
- package/dist/chunk-UORPTGV2.js +114 -0
- package/dist/{chunk-5M3SL4UZ.js → chunk-VCOQ7WQ2.js} +30 -106
- package/dist/chunk-VCUUITW6.js +35 -0
- package/dist/{chunk-PTW7JNAP.js → chunk-VDHW6H5F.js} +5 -5
- package/dist/chunk-VZUA5SRD.js +62 -0
- package/dist/{chunk-DKQ4XMSN.js → chunk-X4GWB6AT.js} +6 -6
- package/dist/{chunk-6YA3C4NB.js → chunk-XCIMOIX6.js} +3 -12
- package/dist/chunk-XP23ZVQT.js +2183 -0
- package/dist/{chunk-WBI7FEGI.js → chunk-Y2MQ5EMD.js} +29 -24
- package/dist/chunk-YBF45CX5.js +23 -0
- package/dist/{chunk-N7OVXN72.js → chunk-YGJCJBPM.js} +1 -1
- package/dist/{chunk-WNVEMFIK.js → chunk-YHIJCI4U.js} +3 -3
- package/dist/{chunk-WFE6CT6M.js → chunk-YQZBAP3S.js} +22 -76
- package/dist/chunk-ZHFFTT3I.js +17 -0
- package/dist/{collections-DJZI2RM2.js → collections-URH2TCWJ.js} +28 -24
- package/dist/{configuration-GN3TO77H.js → configuration-7IYZ6GNP.js} +3 -3
- package/dist/{configuration-RHPIO2QT.js → configuration-C4IGBNXH.js} +1 -1
- package/dist/{create-7S7CZWEN.js → create-5PSOIHIT.js} +4 -4
- package/dist/create-7R6CZU53.js +215 -0
- package/dist/{create-3EK5CNNX.js → create-A7B3MLJX.js} +41 -34
- package/dist/create-F5R76QML.js +1178 -0
- package/dist/create-FKRYB7ZS.js +1784 -0
- package/dist/create-GGACODDN.js +1914 -0
- package/dist/{create-YO55Z3YD.js → create-HVZYJ3YC.js} +35 -38
- package/dist/{create-IDVCZHIX.js → create-JF2OUZQA.js} +16 -13
- package/dist/{create-3ZVXEPX5.js → create-JGYG5SBM.js} +29 -23
- package/dist/{create-G4T2PAJH.js → create-MS6KKFSV.js} +21 -18
- package/dist/{create-OCFPLNNY.js → create-MZYXMGKP.js} +6 -6
- package/dist/{create-HKJVSFB7.js → create-O35JRZEF.js} +25 -22
- package/dist/{create-OGLPDVOI.js → create-ODOFJF5N.js} +40 -37
- package/dist/{create-GHM7OTCR.js → create-R7K3ECN6.js} +1 -1
- package/dist/{create-D6EW3EWC.js → create-SFU3W3ZH.js} +1 -1
- package/dist/create-TKXH5KQY.js +239 -0
- package/dist/{create-33TRLASX.js → create-UPYB65PD.js} +1 -1
- package/dist/{create-KGYL7FBM.js → create-XVHOCZHJ.js} +1 -1
- package/dist/{create-4AE3VTWN.js → create-YBF4YGWG.js} +2 -2
- package/dist/{customers-6ZLE65UX.js → customers-SOLJ2KQQ.js} +5 -5
- package/dist/{edit-QBISX7D3.js → edit-2R5QCPTB.js} +16 -13
- package/dist/{edit-IR6V2IDN.js → edit-3E4ZO7HT.js} +21 -18
- package/dist/{edit-ZSOI56BQ.js → edit-4G5D7TES.js} +52 -40
- package/dist/{edit-B5B3XKDM.js → edit-522DG3BY.js} +1 -1
- package/dist/{edit-B75KK5ZX.js → edit-5CROKEJE.js} +41 -34
- package/dist/{edit-ATXE6CM5.js → edit-C4OCKQVU.js} +1 -1
- package/dist/{edit-7HTH2UJF.js → edit-FXNXTVIW.js} +3 -3
- package/dist/{edit-RNT555GP.js → edit-G2E5SNGU.js} +15 -12
- package/dist/{edit-4HZHLYI3.js → edit-GQNIINRR.js} +1 -1
- package/dist/{edit-2KRJIPRK.js → edit-HTLLYECP.js} +21 -18
- package/dist/{edit-LRRJTHV2.js → edit-KAKVPHZZ.js} +1 -1
- package/dist/{edit-GIJXLMC3.js → edit-O4JLGKQR.js} +2 -2
- package/dist/{edit-FNDDSSMT.js → edit-OKU6FMHJ.js} +60 -9
- package/dist/{edit-5CJZRHAA.js → edit-ORXS3A2Y.js} +1 -1
- package/dist/{edit-FC64DWB2.js → edit-Q3UQIOLS.js} +1 -1
- package/dist/edit-VVLITC2E.js +910 -0
- package/dist/edit-XSICGAVO.js +176 -0
- package/dist/{edit-7GVP6SRA.js → edit-ZAHCMF5U.js} +1 -1
- package/dist/{edit-MYSWY6W4.js → edit-ZMERG3L7.js} +1 -1
- package/dist/{edit-budget-J27CSEZH.js → edit-budget-L3CCEWNF.js} +1 -1
- package/dist/{edit-inventory-item-US77M2FF.js → edit-inventory-item-ZKXXL3QK.js} +2 -2
- package/dist/{edit-inventory-item-attributes-UGAE2NAZ.js → edit-inventory-item-attributes-GSKUMORD.js} +3 -3
- package/dist/{fulfillment-DCS67LTK.js → fulfillment-76IVZ266.js} +32 -22
- package/dist/{fulfillment-providers-GM5PO6N3.js → fulfillment-providers-G2L6LEVO.js} +24 -20
- package/dist/index.css +104 -65
- package/dist/index.d.ts +3 -10
- package/dist/index.js +549 -456
- package/dist/{inventory-OPZ2FSEE.js → inventory-WSFLTA6Z.js} +7 -7
- package/dist/{invite-KEJLNXEZ.js → invite-2673PU4I.js} +17 -13
- package/dist/{invite-CQCKEQW2.js → invite-HRXZ5YBP.js} +28 -24
- package/dist/loader-VDYPD3RI.js +31 -0
- package/dist/{locations-ZVPTQCQY.js → locations-INS6FTMJ.js} +4 -4
- package/dist/{login-OUHRNNXA.js → login-TWUBU6I6.js} +14 -11
- package/dist/{manage-locations-YUKEFCBJ.js → manage-locations-XHH5DVIR.js} +2 -2
- package/dist/{media-4KYFHB5V.js → media-Z4N5MKFG.js} +42 -9
- package/dist/{metadata-AWUKZ25V.js → metadata-5BPOBBU2.js} +3 -3
- package/dist/{metadata-OCE6A3JE.js → metadata-D6M66NQK.js} +17 -14
- package/dist/{metadata-PYY4IB7K.js → metadata-NIDIBXJT.js} +17 -14
- package/dist/{metadata-XP3ZYW2M.js → metadata-Q74OJWUD.js} +18 -15
- package/dist/{metadata-NYYL26MQ.js → metadata-REQIFWWH.js} +18 -15
- package/dist/{metadata-G7KZXVNE.js → metadata-YVHJPDLD.js} +17 -14
- package/dist/offer-create-page-E4FLSDJQ.js +743 -0
- package/dist/offer-detail-page-6SIBQTLP.js +492 -0
- package/dist/offer-edit-page-3MO566RP.js +151 -0
- package/dist/offer-inventory-batch-page-BD6PMDLW.js +290 -0
- package/dist/offer-pricing-edit-page-4TINK42V.js +199 -0
- package/dist/offers-GVN5LCK6.js +32 -0
- package/dist/{onboarding-WXZHW62K.js → onboarding-MK2RIFD4.js} +24 -21
- package/dist/{orders-LWJ472VM.js → orders-TVQDR4OJ.js} +30 -26
- package/dist/organization-XO3T2K2X.js +340 -0
- package/dist/{organize-RFOMQCBG.js → organize-5XRZWD5C.js} +4 -4
- package/dist/{organize-OVKJ3HZO.js → organize-Z7JTTDH4.js} +4 -4
- package/dist/pages/index.d.ts +439 -758
- package/dist/pages/index.js +85 -78
- package/dist/{payment-details-UVXYCTUK.js → payment-details-CFTX3QDL.js} +19 -16
- package/dist/{payouts-TR7K5I37.js → payouts-7Q7D4FET.js} +8 -8
- package/dist/{price-lists-S2WNELFZ.js → price-lists-6TFLA53G.js} +9 -9
- package/dist/{pricing-UF27DAXA.js → pricing-ECXV6K7G.js} +41 -37
- package/dist/{product-tags-2CKH2M6D.js → product-tags-5O7ZG6SA.js} +40 -33
- package/dist/{product-types-FX43JEO2.js → product-types-PKUEL7X5.js} +6 -6
- package/dist/product-variant-detail-PUWOMVHQ.js +210 -0
- package/dist/{product-variant-edit-P3DSIFE3.js → product-variant-edit-WZNO4CQX.js} +134 -66
- package/dist/{products-H5EMRJYS.js → products-BM3IIH5P.js} +27 -21
- package/dist/{products-2LHGS7X3.js → products-CPTRYL2Z.js} +44 -45
- package/dist/{professional-details-HYKTH44B.js → professional-details-ED4HNYXY.js} +18 -15
- package/dist/{profile-PB27WIRW.js → profile-6TGCNNUU.js} +21 -18
- package/dist/{promotions-5EYPGHJP.js → promotions-4336KI7E.js} +9 -9
- package/dist/receive-224KLULH.js +578 -0
- package/dist/refund-IGMSXQNX.js +268 -0
- package/dist/{register-X45K325N.js → register-OZ5CRANZ.js} +18 -15
- package/dist/{reset-password-GTWLBOFK.js → reset-password-5UHZU4D3.js} +1 -1
- package/dist/{return-reasons-LOKYRGMI.js → return-reasons-QJRA2ZX6.js} +21 -17
- package/dist/{sales-channels-Y4LRP7JC.js → sales-channels-CZDU7VTE.js} +7 -6
- package/dist/{sales-channels-7R2IY3KG.js → sales-channels-U55MUDQP.js} +7 -6
- package/dist/{settings-2XDLFYMS.js → settings-2GCQQTO6.js} +47 -40
- package/dist/shipment-HWQHMX2L.js +242 -0
- package/dist/{shipping-profile-R3NABPQF.js → shipping-profile-ZP7M6VSS.js} +2 -2
- package/dist/{shipping-profiles-QVKNFLCW.js → shipping-profiles-C5WBXWZ2.js} +21 -18
- package/dist/{stock-5RXNUPUT.js → stock-MQA7PRO6.js} +21 -18
- package/dist/{store-MPYOWMZT.js → store-5ZHZR4JI.js} +84 -149
- package/dist/{store-closure-DNMCHUXD.js → store-closure-H5WHV3LA.js} +24 -16
- package/dist/{store-select-UTPJ7DM7.js → store-select-PZS556FB.js} +19 -16
- package/dist/{tax-regions-UD6P5FVC.js → tax-regions-HDLBFZVG.js} +6 -6
- package/dist/{team-IMS66MVP.js → team-CLKJCZNH.js} +29 -26
- package/dist/types-CtCEtTE6.d.ts +16 -0
- package/package.json +5 -5
- package/dist/[id]-BYP37PU4.js +0 -1314
- package/dist/[id]-INOFZHL7.js +0 -1219
- package/dist/add-KRAGFFBJ.js +0 -158
- package/dist/bulk-edit-3SMBLIOA.js +0 -244
- package/dist/chunk-47SXTGLN.js +0 -397
- package/dist/chunk-4KX6CBJ4.js +0 -178
- package/dist/chunk-DLNNTQRY.js +0 -217
- package/dist/chunk-FX4V5JCF.js +0 -37
- package/dist/chunk-GC33DBKG.js +0 -143
- package/dist/chunk-LQYMBSRQ.js +0 -66
- package/dist/chunk-NK4NR6MN.js +0 -173
- package/dist/chunk-PFU6FSXY.js +0 -430
- package/dist/chunk-QJEOPT2P.js +0 -330
- package/dist/chunk-QSGR43JM.js +0 -30
- package/dist/chunk-STR3NGWE.js +0 -3736
- package/dist/create-3DOO3RNH.js +0 -716
- package/dist/create-I7HV3RM6.js +0 -150
- package/dist/edit-K2AD335I.js +0 -237
- package/dist/edit-VO5XLIEL.js +0 -362
- package/dist/edit-stocks-and-prices-MHHQFWFA.js +0 -408
- package/dist/organization-LPYQRTQC.js +0 -303
- package/dist/prices-3OXV5RGY.js +0 -270
- package/dist/product-variant-detail-WV4KXVXR.js +0 -590
- package/dist/shipment-4GW2JFWB.js +0 -174
- package/dist/stock-GPC3BCL6.js +0 -500
- package/dist/{chunk-SDSEW72R.js → chunk-E2HQPY32.js} +3 -3
- /package/dist/{chunk-CAS74NLJ.js → chunk-YV6MK4PZ.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProductTypeListPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KIFSQOM2.js";
|
|
4
4
|
import "./chunk-MWQQVKRU.js";
|
|
5
5
|
import "./chunk-EBZ5VZEO.js";
|
|
6
6
|
import "./chunk-VOHEQ7B5.js";
|
|
@@ -10,19 +10,19 @@ import "./chunk-26OOAKQ6.js";
|
|
|
10
10
|
import "./chunk-SYNUA6LQ.js";
|
|
11
11
|
import "./chunk-FQERBIVS.js";
|
|
12
12
|
import "./chunk-PHOCVOZ5.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-SSUUT5LK.js";
|
|
14
14
|
import "./chunk-YN3FGNJM.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-6OUPJNYO.js";
|
|
16
16
|
import "./chunk-3EF54XFY.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-YV6MK4PZ.js";
|
|
18
18
|
import "./chunk-THHRRYRS.js";
|
|
19
19
|
import "./chunk-LRD242C7.js";
|
|
20
|
+
import "./chunk-INNFZYX2.js";
|
|
20
21
|
import "./chunk-VV6IKGCN.js";
|
|
21
22
|
import "./chunk-BDGZ4EQO.js";
|
|
22
|
-
import "./chunk-QHQWEERJ.js";
|
|
23
23
|
import "./chunk-LAVHRER2.js";
|
|
24
|
+
import "./chunk-QHQWEERJ.js";
|
|
24
25
|
import "./chunk-Y7QKP6QU.js";
|
|
25
|
-
import "./chunk-INNFZYX2.js";
|
|
26
26
|
import "./chunk-A5DJIOHN.js";
|
|
27
27
|
import "./chunk-RHKRREUU.js";
|
|
28
28
|
import "./chunk-ZA2KFUFR.js";
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SectionRow
|
|
3
|
+
} from "./chunk-4TLP3TAA.js";
|
|
4
|
+
import {
|
|
5
|
+
TwoColumnPage
|
|
6
|
+
} from "./chunk-YV6MK4PZ.js";
|
|
7
|
+
import {
|
|
8
|
+
TwoColumnPageSkeleton
|
|
9
|
+
} from "./chunk-INNFZYX2.js";
|
|
10
|
+
import "./chunk-TBYCZRZ7.js";
|
|
11
|
+
import "./chunk-F4OJN2F2.js";
|
|
12
|
+
import "./chunk-LRARA622.js";
|
|
13
|
+
import "./chunk-M6N4ISXL.js";
|
|
14
|
+
import "./chunk-S7EKBD2C.js";
|
|
15
|
+
import "./chunk-VV6IKGCN.js";
|
|
16
|
+
import "./chunk-BXRNZS5K.js";
|
|
17
|
+
import "./chunk-BOZJOOGW.js";
|
|
18
|
+
import "./chunk-T6LHVNWO.js";
|
|
19
|
+
import "./chunk-4S6XGIC6.js";
|
|
20
|
+
import "./chunk-S23FD6FA.js";
|
|
21
|
+
import "./chunk-IQWK723D.js";
|
|
22
|
+
import "./chunk-DDJQRV6E.js";
|
|
23
|
+
import "./chunk-LWJF63JW.js";
|
|
24
|
+
import "./chunk-VXWN37PT.js";
|
|
25
|
+
import "./chunk-5QI3NDJG.js";
|
|
26
|
+
import "./chunk-VZUA5SRD.js";
|
|
27
|
+
import "./chunk-VXMOPVRH.js";
|
|
28
|
+
import "./chunk-NBPMNUKZ.js";
|
|
29
|
+
import "./chunk-UORPTGV2.js";
|
|
30
|
+
import "./chunk-Y2MQ5EMD.js";
|
|
31
|
+
import "./chunk-3B34B2M2.js";
|
|
32
|
+
import {
|
|
33
|
+
ActionMenu
|
|
34
|
+
} from "./chunk-BDGZ4EQO.js";
|
|
35
|
+
import "./chunk-LAVHRER2.js";
|
|
36
|
+
import "./chunk-Y7QKP6QU.js";
|
|
37
|
+
import {
|
|
38
|
+
useDeleteVariant,
|
|
39
|
+
useProductVariant,
|
|
40
|
+
variantsQueryKeys
|
|
41
|
+
} from "./chunk-JAUZ73XE.js";
|
|
42
|
+
import "./chunk-A5DJIOHN.js";
|
|
43
|
+
import {
|
|
44
|
+
queryClient
|
|
45
|
+
} from "./chunk-RHKRREUU.js";
|
|
46
|
+
import "./chunk-ZA2KFUFR.js";
|
|
47
|
+
import {
|
|
48
|
+
sdk
|
|
49
|
+
} from "./chunk-RIN4CBRB.js";
|
|
50
|
+
import "./chunk-NBMM2TZK.js";
|
|
51
|
+
|
|
52
|
+
// src/pages/product-variants/product-variant-detail/breadcrumb.tsx
|
|
53
|
+
import { jsx } from "react/jsx-runtime";
|
|
54
|
+
var ProductVariantDetailBreadcrumb = (props) => {
|
|
55
|
+
const { product_id, variant_id } = props.params || {};
|
|
56
|
+
const { variant } = useProductVariant(
|
|
57
|
+
product_id,
|
|
58
|
+
variant_id,
|
|
59
|
+
{},
|
|
60
|
+
{
|
|
61
|
+
initialData: props.data,
|
|
62
|
+
enabled: Boolean(product_id) && Boolean(variant_id)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
if (!variant) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ jsx("span", { children: variant.title });
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// src/pages/product-variants/product-variant-detail/loader.ts
|
|
72
|
+
var VARIANT_DETAIL_FIELDS = "*options,*options.option";
|
|
73
|
+
var variantDetailQuery = (productId, variantId) => ({
|
|
74
|
+
queryKey: variantsQueryKeys.detail(variantId, { fields: VARIANT_DETAIL_FIELDS }),
|
|
75
|
+
queryFn: async () => sdk.vendor.products.$id.variants.$variantId.query({
|
|
76
|
+
$id: productId,
|
|
77
|
+
$variantId: variantId,
|
|
78
|
+
fields: VARIANT_DETAIL_FIELDS
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
var variantLoader = async ({
|
|
82
|
+
params
|
|
83
|
+
}) => {
|
|
84
|
+
const productId = params.product_id;
|
|
85
|
+
const variantId = params.variant_id;
|
|
86
|
+
const query = variantDetailQuery(productId, variantId);
|
|
87
|
+
return queryClient.ensureQueryData(query);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// src/pages/product-variants/product-variant-detail/product-variant-detail.tsx
|
|
91
|
+
import { Children } from "react";
|
|
92
|
+
import { useLoaderData, useParams } from "react-router-dom";
|
|
93
|
+
|
|
94
|
+
// src/pages/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx
|
|
95
|
+
import { Component, PencilSquare, Trash } from "@medusajs/icons";
|
|
96
|
+
import { Badge, Container, Heading, usePrompt } from "@medusajs/ui";
|
|
97
|
+
import { useTranslation } from "react-i18next";
|
|
98
|
+
import { useNavigate } from "react-router-dom";
|
|
99
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
100
|
+
function VariantGeneralSection({
|
|
101
|
+
variant
|
|
102
|
+
}) {
|
|
103
|
+
const { t } = useTranslation();
|
|
104
|
+
const prompt = usePrompt();
|
|
105
|
+
const navigate = useNavigate();
|
|
106
|
+
const hasInventoryKit = (variant.inventory_items?.length ?? 0) > 1;
|
|
107
|
+
const { mutateAsync } = useDeleteVariant(variant.product_id, variant.id);
|
|
108
|
+
const handleDelete = async () => {
|
|
109
|
+
const res = await prompt({
|
|
110
|
+
title: t("general.areYouSure"),
|
|
111
|
+
description: t("products.variant.deleteWarning", {
|
|
112
|
+
title: variant.title
|
|
113
|
+
}),
|
|
114
|
+
confirmText: t("actions.delete"),
|
|
115
|
+
cancelText: t("actions.cancel")
|
|
116
|
+
});
|
|
117
|
+
if (!res) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
await mutateAsync(void 0, {
|
|
121
|
+
onSuccess: () => {
|
|
122
|
+
navigate("..", { replace: true });
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
127
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
128
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
129
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
130
|
+
/* @__PURE__ */ jsx2(Heading, { children: variant.title }),
|
|
131
|
+
hasInventoryKit && /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted font-normal", children: /* @__PURE__ */ jsx2(Component, {}) })
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsx2("span", { className: "text-ui-fg-subtle txt-small mt-2", children: t("labels.productVariant") })
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-4", children: /* @__PURE__ */ jsx2(
|
|
136
|
+
ActionMenu,
|
|
137
|
+
{
|
|
138
|
+
groups: [
|
|
139
|
+
{
|
|
140
|
+
actions: [
|
|
141
|
+
{
|
|
142
|
+
label: t("actions.edit"),
|
|
143
|
+
to: "edit",
|
|
144
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare, {})
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
actions: [
|
|
150
|
+
{
|
|
151
|
+
label: t("actions.delete"),
|
|
152
|
+
onClick: handleDelete,
|
|
153
|
+
icon: /* @__PURE__ */ jsx2(Trash, {})
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
) })
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ jsx2(SectionRow, { title: t("fields.sku"), value: variant.sku }),
|
|
162
|
+
(variant.options ?? []).map((opt) => {
|
|
163
|
+
const title = opt.option?.title;
|
|
164
|
+
if (!title || !opt.value) return null;
|
|
165
|
+
return /* @__PURE__ */ jsx2(
|
|
166
|
+
SectionRow,
|
|
167
|
+
{
|
|
168
|
+
title,
|
|
169
|
+
value: /* @__PURE__ */ jsx2("div", { className: "flex flex-wrap items-center gap-1", children: /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", children: opt.value }) })
|
|
170
|
+
},
|
|
171
|
+
opt.id
|
|
172
|
+
);
|
|
173
|
+
})
|
|
174
|
+
] });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// src/pages/product-variants/product-variant-detail/product-variant-detail.tsx
|
|
178
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
179
|
+
var Root = ({ children }) => {
|
|
180
|
+
const initialData = useLoaderData();
|
|
181
|
+
const { product_id, variant_id } = useParams();
|
|
182
|
+
const { variant, isLoading, isError, error } = useProductVariant(
|
|
183
|
+
product_id,
|
|
184
|
+
variant_id,
|
|
185
|
+
{ fields: "*options,*options.option" },
|
|
186
|
+
{
|
|
187
|
+
initialData
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
if (isLoading || !variant) {
|
|
191
|
+
return /* @__PURE__ */ jsx3(TwoColumnPageSkeleton, { mainSections: 1, sidebarSections: 0 });
|
|
192
|
+
}
|
|
193
|
+
if (isError) {
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
return Children.count(children) > 0 ? /* @__PURE__ */ jsx3(TwoColumnPage, { data: variant, hasOutlet: true, children }) : /* @__PURE__ */ jsxs2(TwoColumnPage, { data: variant, hasOutlet: true, children: [
|
|
197
|
+
/* @__PURE__ */ jsx3(TwoColumnPage.Main, { children: /* @__PURE__ */ jsx3(VariantGeneralSection, { variant }) }),
|
|
198
|
+
/* @__PURE__ */ jsx3(TwoColumnPage.Sidebar, {})
|
|
199
|
+
] });
|
|
200
|
+
};
|
|
201
|
+
var ProductVariantDetail = Object.assign(Root, {
|
|
202
|
+
Main: TwoColumnPage.Main,
|
|
203
|
+
Sidebar: TwoColumnPage.Sidebar,
|
|
204
|
+
MainGeneralSection: VariantGeneralSection
|
|
205
|
+
});
|
|
206
|
+
export {
|
|
207
|
+
ProductVariantDetailBreadcrumb as Breadcrumb,
|
|
208
|
+
ProductVariantDetail as Component,
|
|
209
|
+
variantLoader as loader
|
|
210
|
+
};
|
|
@@ -6,13 +6,15 @@ import "./chunk-NXDFDEKP.js";
|
|
|
6
6
|
import {
|
|
7
7
|
CountrySelect
|
|
8
8
|
} from "./chunk-7CAFYKKA.js";
|
|
9
|
+
import {
|
|
10
|
+
AttributeValueInput
|
|
11
|
+
} from "./chunk-ADGVQVHP.js";
|
|
12
|
+
import "./chunk-JRTZWK77.js";
|
|
9
13
|
import {
|
|
10
14
|
optionalInt
|
|
11
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AJLGY3LQ.js";
|
|
12
16
|
import "./chunk-SMQT3ZNO.js";
|
|
13
|
-
import
|
|
14
|
-
Combobox
|
|
15
|
-
} from "./chunk-VBRTC2VU.js";
|
|
17
|
+
import "./chunk-VBRTC2VU.js";
|
|
16
18
|
import "./chunk-TKGWSUEI.js";
|
|
17
19
|
import {
|
|
18
20
|
KeyboundForm
|
|
@@ -20,27 +22,38 @@ import {
|
|
|
20
22
|
import {
|
|
21
23
|
RouteDrawer,
|
|
22
24
|
useRouteModal
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GDWBOQI5.js";
|
|
24
26
|
import {
|
|
25
27
|
Form
|
|
26
28
|
} from "./chunk-3QSRE5LS.js";
|
|
27
|
-
import
|
|
29
|
+
import {
|
|
30
|
+
require_dist
|
|
31
|
+
} from "./chunk-UCYSCKZV.js";
|
|
28
32
|
import {
|
|
29
33
|
useProduct,
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
useProductVariant,
|
|
35
|
+
useUpdateProductVariant,
|
|
36
|
+
variantsQueryKeys
|
|
37
|
+
} from "./chunk-JAUZ73XE.js";
|
|
32
38
|
import "./chunk-A5DJIOHN.js";
|
|
33
|
-
import
|
|
39
|
+
import {
|
|
40
|
+
queryClient
|
|
41
|
+
} from "./chunk-RHKRREUU.js";
|
|
34
42
|
import "./chunk-ZA2KFUFR.js";
|
|
35
|
-
import
|
|
36
|
-
|
|
43
|
+
import {
|
|
44
|
+
sdk
|
|
45
|
+
} from "./chunk-RIN4CBRB.js";
|
|
46
|
+
import {
|
|
47
|
+
__toESM
|
|
48
|
+
} from "./chunk-NBMM2TZK.js";
|
|
37
49
|
|
|
38
50
|
// src/pages/product-variants/product-variant-edit/product-variant-edit.tsx
|
|
39
51
|
import { Heading as Heading2 } from "@medusajs/ui";
|
|
40
52
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
41
|
-
import { useParams } from "react-router-dom";
|
|
53
|
+
import { useLoaderData, useParams, useSearchParams } from "react-router-dom";
|
|
42
54
|
|
|
43
55
|
// src/pages/product-variants/product-variant-edit/components/product-edit-variant-form/product-edit-variant-form.tsx
|
|
56
|
+
var import_types = __toESM(require_dist(), 1);
|
|
44
57
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
45
58
|
import { Button, Divider, Heading, Input, toast } from "@medusajs/ui";
|
|
46
59
|
import { useForm } from "react-hook-form";
|
|
@@ -54,8 +67,6 @@ var ProductEditVariantSchema = z.object({
|
|
|
54
67
|
ean: z.string().optional(),
|
|
55
68
|
upc: z.string().optional(),
|
|
56
69
|
barcode: z.string().optional(),
|
|
57
|
-
manage_inventory: z.boolean(),
|
|
58
|
-
allow_backorder: z.boolean(),
|
|
59
70
|
weight: optionalInt,
|
|
60
71
|
height: optionalInt,
|
|
61
72
|
width: optionalInt,
|
|
@@ -63,7 +74,7 @@ var ProductEditVariantSchema = z.object({
|
|
|
63
74
|
mid_code: z.string().optional(),
|
|
64
75
|
hs_code: z.string().optional(),
|
|
65
76
|
origin_country: z.string().optional(),
|
|
66
|
-
options: z.record(z.string())
|
|
77
|
+
options: z.record(z.string()).optional()
|
|
67
78
|
});
|
|
68
79
|
var ProductEditVariantForm = ({
|
|
69
80
|
variant,
|
|
@@ -71,35 +82,40 @@ var ProductEditVariantForm = ({
|
|
|
71
82
|
}) => {
|
|
72
83
|
const { t } = useTranslation();
|
|
73
84
|
const { handleSuccess } = useRouteModal();
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
acc
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
const variantAttributes = product.attributes?.filter((a) => a.is_variant_axis) ?? [];
|
|
86
|
+
const defaultOptions = variantAttributes.reduce(
|
|
87
|
+
(acc, attribute) => {
|
|
88
|
+
const key = attribute.handle ?? attribute.id;
|
|
89
|
+
const matched = variant.options?.find(
|
|
90
|
+
(o) => o.option?.title === attribute.name
|
|
91
|
+
);
|
|
92
|
+
acc[key] = matched?.value ?? "";
|
|
93
|
+
return acc;
|
|
94
|
+
},
|
|
95
|
+
{}
|
|
96
|
+
);
|
|
79
97
|
const form = useForm({
|
|
80
98
|
defaultValues: {
|
|
81
|
-
title: variant
|
|
82
|
-
material: variant
|
|
83
|
-
sku: variant
|
|
84
|
-
ean: variant
|
|
85
|
-
upc: variant
|
|
86
|
-
barcode: variant
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
hs_code: variant?.hs_code || "",
|
|
95
|
-
origin_country: variant?.origin_country || "",
|
|
99
|
+
title: variant.title || "",
|
|
100
|
+
material: variant.material || "",
|
|
101
|
+
sku: variant.sku || "",
|
|
102
|
+
ean: variant.ean || "",
|
|
103
|
+
upc: variant.upc || "",
|
|
104
|
+
barcode: variant.barcode || "",
|
|
105
|
+
weight: variant.weight || "",
|
|
106
|
+
height: variant.height || "",
|
|
107
|
+
width: variant.width || "",
|
|
108
|
+
length: variant.length || "",
|
|
109
|
+
mid_code: variant.mid_code || "",
|
|
110
|
+
hs_code: variant.hs_code || "",
|
|
111
|
+
origin_country: variant.origin_country || "",
|
|
96
112
|
options: defaultOptions
|
|
97
113
|
},
|
|
98
114
|
resolver: zodResolver(ProductEditVariantSchema)
|
|
99
115
|
});
|
|
100
116
|
const { mutateAsync, isPending } = useUpdateProductVariant(
|
|
101
|
-
variant
|
|
102
|
-
variant
|
|
117
|
+
variant.product_id,
|
|
118
|
+
variant.id
|
|
103
119
|
);
|
|
104
120
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
105
121
|
const {
|
|
@@ -108,12 +124,19 @@ var ProductEditVariantForm = ({
|
|
|
108
124
|
height,
|
|
109
125
|
width,
|
|
110
126
|
length,
|
|
111
|
-
allow_backorder,
|
|
112
|
-
manage_inventory,
|
|
113
127
|
options,
|
|
114
128
|
...optional
|
|
115
129
|
} = data;
|
|
116
130
|
const nullableData = transformNullableFormData(optional);
|
|
131
|
+
const cleanedOptions = variantAttributes.reduce(
|
|
132
|
+
(acc, attr) => {
|
|
133
|
+
const fieldKey = attr.handle ?? attr.id;
|
|
134
|
+
const v = options?.[fieldKey];
|
|
135
|
+
if (v && attr.name) acc[attr.name] = v;
|
|
136
|
+
return acc;
|
|
137
|
+
},
|
|
138
|
+
{}
|
|
139
|
+
);
|
|
117
140
|
await mutateAsync(
|
|
118
141
|
{
|
|
119
142
|
weight: transformNullableFormNumber(weight),
|
|
@@ -121,9 +144,7 @@ var ProductEditVariantForm = ({
|
|
|
121
144
|
width: transformNullableFormNumber(width),
|
|
122
145
|
length: transformNullableFormNumber(length),
|
|
123
146
|
title,
|
|
124
|
-
|
|
125
|
-
manage_inventory,
|
|
126
|
-
options,
|
|
147
|
+
options: Object.keys(cleanedOptions).length ? cleanedOptions : void 0,
|
|
127
148
|
...nullableData
|
|
128
149
|
},
|
|
129
150
|
{
|
|
@@ -173,39 +194,40 @@ var ProductEditVariantForm = ({
|
|
|
173
194
|
}
|
|
174
195
|
}
|
|
175
196
|
),
|
|
176
|
-
|
|
197
|
+
variantAttributes.map((attribute) => {
|
|
198
|
+
const fieldKey = attribute.handle ?? attribute.id;
|
|
177
199
|
return /* @__PURE__ */ jsx(
|
|
178
200
|
Form.Field,
|
|
179
201
|
{
|
|
180
202
|
control: form.control,
|
|
181
|
-
name: `options.${
|
|
182
|
-
render: ({ field: { value, onChange
|
|
203
|
+
name: `options.${fieldKey}`,
|
|
204
|
+
render: ({ field: { value, onChange } }) => {
|
|
183
205
|
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
184
|
-
/* @__PURE__ */ jsx(Form.Label, { children:
|
|
206
|
+
/* @__PURE__ */ jsx(Form.Label, { children: attribute.name }),
|
|
185
207
|
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
186
|
-
|
|
208
|
+
AttributeValueInput,
|
|
187
209
|
{
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
210
|
+
type: import_types.AttributeType.SINGLE_SELECT,
|
|
211
|
+
value: typeof value === "string" ? value : "",
|
|
212
|
+
onChange,
|
|
213
|
+
availableValues: (attribute.values ?? []).map(
|
|
214
|
+
(v) => ({
|
|
215
|
+
id: v.id,
|
|
216
|
+
name: v.name
|
|
217
|
+
})
|
|
218
|
+
)
|
|
197
219
|
}
|
|
198
|
-
) })
|
|
220
|
+
) }),
|
|
221
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
199
222
|
] });
|
|
200
223
|
}
|
|
201
224
|
},
|
|
202
|
-
|
|
225
|
+
attribute.id
|
|
203
226
|
);
|
|
204
227
|
})
|
|
205
228
|
] }),
|
|
206
229
|
/* @__PURE__ */ jsx(Divider, {}),
|
|
207
230
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-y-8", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4", children: [
|
|
208
|
-
/* @__PURE__ */ jsx(Heading, { level: "h2", children: t("products.variant.inventory.header") }),
|
|
209
231
|
/* @__PURE__ */ jsx(
|
|
210
232
|
Form.Field,
|
|
211
233
|
{
|
|
@@ -378,26 +400,72 @@ var ProductEditVariantForm = ({
|
|
|
378
400
|
// src/pages/product-variants/product-variant-edit/product-variant-edit.tsx
|
|
379
401
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
380
402
|
var ProductVariantEdit = () => {
|
|
403
|
+
const initialData = useLoaderData();
|
|
381
404
|
const { t } = useTranslation2();
|
|
382
|
-
const { product_id, variant_id } = useParams();
|
|
405
|
+
const { id, product_id, variant_id } = useParams();
|
|
406
|
+
const productId = product_id || id;
|
|
407
|
+
const [URLSearchParms] = useSearchParams();
|
|
408
|
+
const searchVariantId = URLSearchParms.get("variant_id");
|
|
409
|
+
const { variant, isPending, isError, error } = useProductVariant(
|
|
410
|
+
productId,
|
|
411
|
+
variant_id || searchVariantId,
|
|
412
|
+
{ fields: "*options,*options.option" },
|
|
413
|
+
{
|
|
414
|
+
initialData
|
|
415
|
+
}
|
|
416
|
+
);
|
|
383
417
|
const {
|
|
384
418
|
product,
|
|
385
419
|
isPending: isProductPending,
|
|
386
420
|
isError: isProductError,
|
|
387
421
|
error: productError
|
|
388
|
-
} = useProduct(
|
|
389
|
-
|
|
390
|
-
|
|
422
|
+
} = useProduct(
|
|
423
|
+
variant?.product_id,
|
|
424
|
+
{
|
|
425
|
+
fields: "-variants"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
enabled: !!variant?.product_id
|
|
429
|
+
}
|
|
391
430
|
);
|
|
392
|
-
const ready = !isProductPending && !!product;
|
|
431
|
+
const ready = !isPending && !!variant && !isProductPending && !!product;
|
|
432
|
+
if (isError) {
|
|
433
|
+
throw error;
|
|
434
|
+
}
|
|
393
435
|
if (isProductError) {
|
|
394
436
|
throw productError;
|
|
395
437
|
}
|
|
396
438
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
397
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(Heading2, { children: t("products.variant.edit.header") }) }),
|
|
439
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading2, { children: t("products.variant.edit.header") }) }) }),
|
|
398
440
|
ready && /* @__PURE__ */ jsx2(ProductEditVariantForm, { variant, product })
|
|
399
441
|
] });
|
|
400
442
|
};
|
|
443
|
+
|
|
444
|
+
// src/pages/product-variants/product-variant-edit/loader.ts
|
|
445
|
+
var VARIANT_EDIT_FIELDS = "*options,*options.option";
|
|
446
|
+
var queryFn = async (id, variantId) => {
|
|
447
|
+
return await sdk.vendor.products.$id.variants.$variantId.query({
|
|
448
|
+
$id: id,
|
|
449
|
+
$variantId: variantId,
|
|
450
|
+
fields: VARIANT_EDIT_FIELDS
|
|
451
|
+
});
|
|
452
|
+
};
|
|
453
|
+
var editProductVariantQuery = (id, variantId) => ({
|
|
454
|
+
queryKey: variantsQueryKeys.detail(variantId, { fields: VARIANT_EDIT_FIELDS }),
|
|
455
|
+
queryFn: async () => queryFn(id, variantId)
|
|
456
|
+
});
|
|
457
|
+
var editProductVariantLoader = async ({
|
|
458
|
+
params,
|
|
459
|
+
request
|
|
460
|
+
}) => {
|
|
461
|
+
const id = params.product_id || params.id;
|
|
462
|
+
const searchParams = new URL(request.url).searchParams;
|
|
463
|
+
const searchVariantId = searchParams.get("variant_id");
|
|
464
|
+
const variantId = params.variant_id || searchVariantId;
|
|
465
|
+
const query = editProductVariantQuery(id, variantId || searchVariantId);
|
|
466
|
+
return queryClient.getQueryData(query.queryKey) ?? await queryClient.fetchQuery(query);
|
|
467
|
+
};
|
|
401
468
|
export {
|
|
402
|
-
ProductVariantEdit
|
|
469
|
+
ProductVariantEdit as Component,
|
|
470
|
+
editProductVariantLoader as loader
|
|
403
471
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTableColumns
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BER45EYD.js";
|
|
4
|
+
import "./chunk-U5G3AVED.js";
|
|
4
5
|
import {
|
|
5
6
|
useProductTableQuery
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MJCL3WID.js";
|
|
8
|
+
import "./chunk-FWPGOIFA.js";
|
|
7
9
|
import "./chunk-FQERBIVS.js";
|
|
8
10
|
import {
|
|
9
11
|
useProductTableFilters
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-K6LOZ4S3.js";
|
|
11
13
|
import "./chunk-DB6ANJBO.js";
|
|
12
14
|
import "./chunk-PHOCVOZ5.js";
|
|
13
15
|
import {
|
|
14
16
|
_DataTable,
|
|
15
17
|
useDataTable
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SSUUT5LK.js";
|
|
17
19
|
import "./chunk-YN3FGNJM.js";
|
|
18
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-6OUPJNYO.js";
|
|
19
21
|
import "./chunk-3EF54XFY.js";
|
|
20
22
|
import "./chunk-TKGWSUEI.js";
|
|
21
23
|
import {
|
|
@@ -24,39 +26,43 @@ import {
|
|
|
24
26
|
import {
|
|
25
27
|
RouteFocusModal,
|
|
26
28
|
useRouteModal
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GDWBOQI5.js";
|
|
28
30
|
import "./chunk-3QSRE5LS.js";
|
|
29
31
|
import "./chunk-THHRRYRS.js";
|
|
30
32
|
import "./chunk-LRD242C7.js";
|
|
31
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-UCYSCKZV.js";
|
|
34
|
+
import "./chunk-WIYFXWRI.js";
|
|
35
|
+
import "./chunk-INNFZYX2.js";
|
|
36
|
+
import "./chunk-TBYCZRZ7.js";
|
|
32
37
|
import "./chunk-F4OJN2F2.js";
|
|
33
38
|
import "./chunk-LRARA622.js";
|
|
34
39
|
import "./chunk-M6N4ISXL.js";
|
|
35
40
|
import "./chunk-S7EKBD2C.js";
|
|
36
|
-
import "./chunk-VXMOPVRH.js";
|
|
37
|
-
import "./chunk-IQWK723D.js";
|
|
38
41
|
import "./chunk-VV6IKGCN.js";
|
|
39
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-BXRNZS5K.js";
|
|
40
43
|
import "./chunk-BOZJOOGW.js";
|
|
41
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-T6LHVNWO.js";
|
|
45
|
+
import "./chunk-4S6XGIC6.js";
|
|
46
|
+
import "./chunk-S23FD6FA.js";
|
|
47
|
+
import "./chunk-IQWK723D.js";
|
|
48
|
+
import "./chunk-DDJQRV6E.js";
|
|
42
49
|
import "./chunk-LWJF63JW.js";
|
|
43
|
-
import "./chunk-NBPMNUKZ.js";
|
|
44
|
-
import "./chunk-WBI7FEGI.js";
|
|
45
50
|
import "./chunk-VXWN37PT.js";
|
|
46
|
-
import "./chunk-UL4O5M4S.js";
|
|
47
|
-
import "./chunk-FX4V5JCF.js";
|
|
48
|
-
import "./chunk-QHQWEERJ.js";
|
|
49
|
-
import "./chunk-3B34B2M2.js";
|
|
50
51
|
import {
|
|
51
52
|
useProductCategory,
|
|
52
53
|
useUpdateProductCategoryProducts
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import "./chunk-
|
|
54
|
+
} from "./chunk-5QI3NDJG.js";
|
|
55
|
+
import "./chunk-VZUA5SRD.js";
|
|
56
|
+
import "./chunk-VXMOPVRH.js";
|
|
57
|
+
import "./chunk-NBPMNUKZ.js";
|
|
58
|
+
import "./chunk-UORPTGV2.js";
|
|
59
|
+
import "./chunk-Y2MQ5EMD.js";
|
|
60
|
+
import "./chunk-3B34B2M2.js";
|
|
61
|
+
import "./chunk-QHQWEERJ.js";
|
|
55
62
|
import "./chunk-Y7QKP6QU.js";
|
|
56
|
-
import "./chunk-INNFZYX2.js";
|
|
57
63
|
import {
|
|
58
64
|
useProducts
|
|
59
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-JAUZ73XE.js";
|
|
60
66
|
import "./chunk-A5DJIOHN.js";
|
|
61
67
|
import "./chunk-RHKRREUU.js";
|
|
62
68
|
import "./chunk-ZA2KFUFR.js";
|