@mercurjs/vendor 2.2.0-canary.2 → 2.2.0-canary.21
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]-KRLGIVLR.js → [id]-3JICOSAI.js} +133 -41
- package/dist/[id]-CR76L5TG.js +3102 -0
- package/dist/{[id]-7BAKUHUO.js → [id]-DDGHFRSB.js} +5 -5
- package/dist/{[id]-KVWYLDN3.js → [id]-E7DYRMMO.js} +162 -71
- package/dist/{[id]-4OBGG7OH.js → [id]-FIP4UMQ4.js} +197 -105
- package/dist/{[id]-3EC6HYXL.js → [id]-FZRXOJWL.js} +22 -21
- package/dist/{[id]-ZWWMJAKI.js → [id]-PD3ISUL5.js} +7 -7
- package/dist/{[id]-UUUQK22M.js → [id]-Q5AXQ5XO.js} +460 -581
- package/dist/{[id]-KJIQTFGE.js → [id]-VSNA6SV5.js} +15 -15
- package/dist/{[id]-Y2ISCLUD.js → [id]-XUKQKCDN.js} +3 -3
- package/dist/{[id]-K2CT7BXQ.js → [id]-YPCO3DJV.js} +1 -1
- package/dist/{[id]-LUFRJLAU.js → [id]-ZEFQ7FQQ.js} +36 -33
- package/dist/{[id]-COLO4TQJ.js → [id]-ZW7TBWDU.js} +24 -23
- package/dist/{[province_id]-H2QAPKVH.js → [province_id]-CHOO7ERP.js} +14 -14
- package/dist/{add-FIWTANZX.js → add-GYXNRUAE.js} +40 -37
- package/dist/{add-PBZQCIZQ.js → add-IC5R27X3.js} +95 -32
- package/dist/{add-customer-groups-RAHCP67U.js → add-customer-groups-KIGBZT5G.js} +20 -23
- package/dist/{add-products-N3V2MVLD.js → add-products-ALJVIFXU.js} +23 -22
- package/dist/{add-promotions-CSCAJZHV.js → add-promotions-EQ5MMQKG.js} +8 -8
- package/dist/{add-to-campaign-DLP7PSQB.js → add-to-campaign-C6JDNB6F.js} +4 -4
- package/dist/{address-7F5SN7PV.js → address-UKLDTSTP.js} +13 -13
- package/dist/{adjust-inventory-SZF4W7LR.js → adjust-inventory-5XPGE44Y.js} +2 -2
- package/dist/allocate-items-URVRAFPS.js +685 -0
- package/dist/{areas-7Y6BVS5A.js → areas-64VXOFYS.js} +6 -6
- package/dist/{attributes-MBZ76HVZ.js → attributes-YQNW5JBY.js} +2 -2
- package/dist/{breadcrumb-HND5FFWC.js → breadcrumb-26G7BS3Q.js} +3 -3
- package/dist/{breadcrumb-7PURSRTT.js → breadcrumb-2AYN2SV7.js} +12 -12
- package/dist/{breadcrumb-ZCG2RHIU.js → breadcrumb-4KKLMVC3.js} +12 -12
- package/dist/{breadcrumb-WRG4SITG.js → breadcrumb-4XSHX5RV.js} +13 -13
- package/dist/{breadcrumb-QV2IAX7N.js → breadcrumb-E5OF4L2J.js} +2 -2
- package/dist/breadcrumb-JC5FUQYF.js +28 -0
- package/dist/{breadcrumb-YBBYFQYG.js → breadcrumb-LBO2I4OJ.js} +1 -1
- package/dist/breadcrumb-PIDJ23EZ.js +13 -0
- package/dist/{breadcrumb-65SAGUUL.js → breadcrumb-RWYEU5JK.js} +3 -3
- package/dist/{breadcrumb-VWELWDB2.js → breadcrumb-VXKAO6GP.js} +1 -1
- package/dist/{breadcrumb-FLDHJRVY.js → breadcrumb-WMNG4P6C.js} +9 -8
- package/dist/{breadcrumb-EDPMEN2P.js → breadcrumb-XPQETVMM.js} +2 -2
- package/dist/{campaigns-L6ULR6KR.js → campaigns-4I2T6EDZ.js} +5 -5
- package/dist/{categories-FUZQKBXV.js → categories-3P2DRH5V.js} +10 -8
- package/dist/{chunk-EZ3JOAUS.js → chunk-22CIYLKO.js} +1 -1
- package/dist/{chunk-RZLN2Q6G.js → chunk-247L47JD.js} +1 -1
- package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
- package/dist/{chunk-M7KSRYRI.js → chunk-2ECD67FO.js} +2 -2
- package/dist/{chunk-36L54SQQ.js → chunk-2H4FGZ4U.js} +1 -1
- package/dist/{chunk-X2FVFUET.js → chunk-2NUZTTBU.js} +27 -8
- package/dist/chunk-2OY4NW7L.js +185 -0
- package/dist/{chunk-K4X324QP.js → chunk-36WXPGD2.js} +6 -5
- package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
- package/dist/chunk-3EDZQSKG.js +33 -0
- package/dist/{chunk-2DXNJURE.js → chunk-3L2DVCOC.js} +1 -1
- package/dist/chunk-42R54Z2X.js +8 -0
- package/dist/{chunk-CNMY5HVP.js → chunk-4EQIJMQT.js} +3 -3
- package/dist/{chunk-UAF2S447.js → chunk-4OIOYUQE.js} +3 -3
- package/dist/{chunk-UORPTGV2.js → chunk-4R5GESED.js} +10 -14
- package/dist/{chunk-WUPJADSO.js → chunk-4RFPRO2W.js} +2 -2
- package/dist/chunk-4YWKKCTT.js +32 -0
- package/dist/{chunk-XFQJU6FA.js → chunk-5QG6P6EU.js} +1 -1
- package/dist/{chunk-N4MVIBFM.js → chunk-5Y6RDTW2.js} +3 -3
- package/dist/{chunk-DZIXC7OE.js → chunk-6FLSBL4Q.js} +30 -85
- package/dist/{chunk-DVEKYLPV.js → chunk-6QS6IZC6.js} +1 -1
- package/dist/chunk-6ZGQ3SOR.js +127 -0
- package/dist/{chunk-NXNJQZCP.js → chunk-7FIPNQM2.js} +1 -1
- package/dist/{chunk-NSZQERLE.js → chunk-7GGWRJJF.js} +2 -2
- package/dist/{chunk-QS6RWIBL.js → chunk-7RGUD6PI.js} +34 -20
- package/dist/{chunk-5L2DCA4W.js → chunk-7ZPJGL4C.js} +57 -6
- package/dist/{chunk-KD7RYE6R.js → chunk-AG6KIAUD.js} +2 -2
- package/dist/{chunk-UCQKXXLD.js → chunk-AKKIZD2P.js} +32 -34
- package/dist/chunk-CHBURL76.js +438 -0
- package/dist/{chunk-PBD36EZJ.js → chunk-CI4YXVQF.js} +2 -2
- package/dist/{chunk-7LBY5JLV.js → chunk-DAV7WS53.js} +1 -1
- package/dist/{chunk-6BS2AVGJ.js → chunk-DNXMONCL.js} +6 -6
- package/dist/{chunk-TNVYTMBL.js → chunk-E4O5PARZ.js} +4 -4
- package/dist/{chunk-L7QKFC5N.js → chunk-E6W57UP3.js} +32 -122
- package/dist/chunk-EEBJYXWA.js +15 -0
- package/dist/chunk-FP6U6BPH.js +61 -0
- package/dist/{chunk-SGR4DMCW.js → chunk-FRYZRBLA.js} +1 -1
- package/dist/chunk-FWPGOIFA.js +22 -0
- package/dist/chunk-GL7F6NDU.js +30 -0
- package/dist/chunk-H7BVANDX.js +407 -0
- package/dist/{chunk-FDR22JMM.js → chunk-HFRHHT36.js} +8 -63
- package/dist/{chunk-FJUUGFXL.js → chunk-HOUDNM5M.js} +1 -1
- package/dist/{chunk-6Y53VZ3C.js → chunk-HZCSJLGH.js} +11 -11
- package/dist/chunk-I75SROQZ.js +315 -0
- package/dist/{chunk-JQV7CXEC.js → chunk-II3ACSV2.js} +17 -2
- package/dist/{chunk-DARJTN4I.js → chunk-IMJ62GAP.js} +10 -5
- package/dist/{chunk-PPLC4IKI.js → chunk-IV57G2CB.js} +14 -1
- package/dist/{chunk-7SLWXX6L.js → chunk-J434WDD3.js} +5 -6
- package/dist/chunk-J6XCRFBW.js +30 -0
- package/dist/{chunk-KAZ5BYTQ.js → chunk-KCHYLLVG.js} +6 -4
- package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
- package/dist/{chunk-GXIAIITP.js → chunk-KZYRC3WR.js} +36 -39
- package/dist/chunk-L57USMYC.js +39 -0
- package/dist/chunk-LFX6WU4A.js +36 -0
- package/dist/{chunk-EROX26D4.js → chunk-LRMWYKSF.js} +1 -1
- package/dist/{chunk-LWJF63JW.js → chunk-LTQQRVZG.js} +89 -14
- package/dist/chunk-LYYM7H7H.js +59 -0
- package/dist/{chunk-NHFEY3EI.js → chunk-M3YUT5AY.js} +2 -2
- package/dist/{chunk-H6LZ77GX.js → chunk-MJCL3WID.js} +1 -1
- package/dist/{chunk-X4INVIWL.js → chunk-MZRZVLWD.js} +3 -3
- package/dist/{chunk-DDH7ULIQ.js → chunk-N6MGVXXQ.js} +1 -1
- package/dist/{chunk-QXLRABYH.js → chunk-O7VOGTLX.js} +1 -1
- package/dist/{chunk-35G3SZRN.js → chunk-P3SOE76R.js} +1 -1
- package/dist/{chunk-PZ44R4AS.js → chunk-P7Q5ZSZD.js} +1 -1
- package/dist/{chunk-5ATEALH7.js → chunk-PFJFS3F4.js} +1 -5
- package/dist/chunk-POOTMH3K.js +62 -0
- package/dist/{chunk-GGWUWT55.js → chunk-QJI4OET7.js} +23 -36
- package/dist/{chunk-NJMNYS7G.js → chunk-QS35HWC5.js} +1 -1
- package/dist/{chunk-RTBNJQOV.js → chunk-R4JLYNUA.js} +419 -538
- package/dist/{chunk-DIW4GRTI.js → chunk-RT3G3GEK.js} +47 -31
- package/dist/{chunk-QT7YFHCA.js → chunk-S23FD6FA.js} +12 -0
- package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
- package/dist/chunk-SPFLYPY6.js +6 -0
- package/dist/{chunk-EIUYXS7E.js → chunk-SZBERGA4.js} +1 -1
- package/dist/chunk-T6DSYOY5.js +173 -0
- package/dist/{chunk-4LVP635F.js → chunk-TKSKCYM3.js} +128 -126
- package/dist/{chunk-QNNJN4H6.js → chunk-TSTUAL6N.js} +59 -0
- package/dist/{chunk-LNM2D2I4.js → chunk-TZMNEN7A.js} +7 -6
- package/dist/chunk-UM7ZR3VU.js +14 -0
- package/dist/{chunk-X22KTLZ7.js → chunk-UO6IX5Y7.js} +1 -1
- package/dist/chunk-VCUUITW6.js +35 -0
- package/dist/{chunk-LQD232FW.js → chunk-WJ5EU3KW.js} +1 -1
- package/dist/{chunk-AIF2KTEE.js → chunk-WKRW5OPL.js} +12 -2
- package/dist/{chunk-6YA3C4NB.js → chunk-XBKWFLJG.js} +4 -13
- package/dist/{chunk-WBHFU3MG.js → chunk-XJYQ4SW5.js} +2 -2
- package/dist/chunk-XQUF3WIS.js +159 -0
- package/dist/chunk-YBF45CX5.js +23 -0
- package/dist/{chunk-AVOIZO63.js → chunk-YQZBAP3S.js} +4 -2
- package/dist/chunk-ZHFFTT3I.js +17 -0
- package/dist/{chunk-TODJFRLH.js → chunk-ZHR77OQI.js} +2 -2
- package/dist/chunk-ZUHIKMQL.js +353 -0
- package/dist/{chunk-44RQ5PTN.js → chunk-ZZIJSTXN.js} +225 -90
- package/dist/{collections-YCAAFGSW.js → collections-7M7O23NO.js} +28 -26
- package/dist/{configuration-UOSNP45I.js → configuration-5IDQRYJQ.js} +4 -4
- package/dist/{configuration-C4IGBNXH.js → configuration-TXRAYMI4.js} +1 -1
- package/dist/{create-BJ4OO6LS.js → create-2N73Y6FO.js} +14 -14
- package/dist/{create-R7K3ECN6.js → create-3MUVY3UY.js} +1 -1
- package/dist/{create-SFU3W3ZH.js → create-6DRXGPYA.js} +1 -1
- package/dist/{create-XAD5NMSJ.js → create-6KM5AZCG.js} +20 -20
- package/dist/{create-YDDBH4VQ.js → create-A6CPQMMH.js} +27 -26
- package/dist/create-B4EWCX7X.js +1798 -0
- package/dist/{create-YBF4YGWG.js → create-BHSMHOFN.js} +1 -1
- package/dist/{create-XVHOCZHJ.js → create-BVUZWMET.js} +1 -1
- package/dist/create-CJEZCYN6.js +1179 -0
- package/dist/create-DAVMJNC2.js +1931 -0
- package/dist/{create-35MYQPVM.js → create-E4HTVPP7.js} +17 -17
- package/dist/{create-JDGM5KXE.js → create-G4TF2M7G.js} +88 -42
- package/dist/{create-UQNYMVBM.js → create-LOP7AF5N.js} +6 -6
- package/dist/{create-UPYB65PD.js → create-MKFDE32U.js} +1 -1
- package/dist/{create-B5ZXTK3K.js → create-NR7ULWQS.js} +37 -34
- package/dist/{create-HI5UI2EZ.js → create-SJSLOXOW.js} +31 -26
- package/dist/{create-GB3ZA4LH.js → create-SYI6DVKM.js} +4 -4
- package/dist/{create-ORXYT74H.js → create-ZAGMLDR4.js} +13 -13
- package/dist/create-ZP4LSJYQ.js +216 -0
- package/dist/customer-group-add-customers-GTM556QA.js +251 -0
- package/dist/customer-group-create-OYHAXX2T.js +140 -0
- package/dist/customer-group-detail-KW62TLWA.js +58 -0
- package/dist/customer-group-edit-WH7O4N4L.js +137 -0
- package/dist/customer-groups-UJFZBZ2B.js +276 -0
- package/dist/{customers-ETXVNM3G.js → customers-4WKIFPUU.js} +7 -7
- package/dist/{edit-UGEC27HP.js → edit-3EN2H52W.js} +39 -36
- package/dist/{edit-ZMERG3L7.js → edit-3VNT35DW.js} +1 -1
- package/dist/{edit-ORXS3A2Y.js → edit-6DUTTLEV.js} +1 -1
- package/dist/edit-6K3NSVI7.js +103 -0
- package/dist/{edit-REDDBLTA.js → edit-6Z6RIJRZ.js} +4 -4
- package/dist/{edit-2Q7TRUTL.js → edit-CVSO5CX7.js} +14 -14
- package/dist/{edit-ZAHCMF5U.js → edit-FQDSESVI.js} +1 -1
- package/dist/edit-GZXLWSTL.js +176 -0
- package/dist/edit-LLNKSZR4.js +871 -0
- package/dist/{edit-O4JLGKQR.js → edit-MKVDAUA5.js} +1 -1
- package/dist/{edit-ZCXUG42Q.js → edit-NDUSRTWY.js} +13 -13
- package/dist/{edit-522DG3BY.js → edit-RBREBAQQ.js} +1 -1
- package/dist/{edit-Q3UQIOLS.js → edit-RQHOHZR6.js} +1 -1
- package/dist/{edit-VKT62KHG.js → edit-SAB6F3ZG.js} +36 -15
- package/dist/{edit-C4OCKQVU.js → edit-SM2GHVKW.js} +1 -1
- package/dist/{edit-KAKVPHZZ.js → edit-UVY3TEHD.js} +1 -1
- package/dist/{edit-SGUY2CCK.js → edit-V7WLYLOQ.js} +16 -16
- package/dist/{edit-FKXIQ6ZI.js → edit-XMZSLH4O.js} +16 -16
- package/dist/{edit-L5ZZLMAY.js → edit-YTS77SJS.js} +43 -32
- package/dist/{edit-budget-L3CCEWNF.js → edit-budget-4JMGEPNF.js} +1 -1
- package/dist/{edit-inventory-item-6B7ITDGD.js → edit-inventory-item-G22KFCYY.js} +2 -2
- package/dist/{edit-inventory-item-attributes-Y7MQZLXI.js → edit-inventory-item-attributes-RJSM4MEI.js} +2 -2
- package/dist/edit-price-K6K2FTMF.js +196 -0
- package/dist/edit-stock-6TUSJD5R.js +229 -0
- package/dist/fulfillment-VEF6HG6D.js +641 -0
- package/dist/{fulfillment-providers-DQAU43JZ.js → fulfillment-providers-VKBWFH45.js} +24 -24
- package/dist/index.css +107 -10
- package/dist/index.js +302 -183
- package/dist/{inventory-KAUVPMPZ.js → inventory-OCIGVZ4V.js} +6 -6
- package/dist/{offer-inventory-batch-page-WKCWNDNK.js → inventory-T7BRSFKY.js} +16 -16
- package/dist/{invite-CI2P4GF6.js → invite-J6L3Q7MQ.js} +12 -12
- package/dist/{invite-Q6EYDZVQ.js → invite-VWNUFOFI.js} +21 -21
- package/dist/loader-2EQ4ROTD.js +34 -0
- package/dist/loader-HYUC2XZX.js +33 -0
- package/dist/{login-KY342RMK.js → login-WOZMCEFY.js} +12 -12
- package/dist/{manage-locations-WNHEBS3A.js → manage-locations-R3ASMF5B.js} +1 -1
- package/dist/{media-B6ME2WXY.js → media-KIIJ6WSZ.js} +18 -17
- package/dist/media-RJHUSBXL.js +315 -0
- package/dist/{metadata-WR4RFXO5.js → metadata-45S6CFKY.js} +14 -14
- package/dist/{metadata-2CMH4I6U.js → metadata-FCATUWIZ.js} +14 -14
- package/dist/{metadata-GWI6R4ES.js → metadata-L5GBBXC4.js} +14 -14
- package/dist/{metadata-TLDUF5KV.js → metadata-R4ZRMAO6.js} +14 -14
- package/dist/{metadata-NUXUC2JA.js → metadata-RM5VVAOS.js} +14 -14
- package/dist/{offer-create-page-4Z6L63BU.js → offer-create-page-DV4JCIL2.js} +190 -195
- package/dist/offer-detail-page-TIBYGQBS.js +590 -0
- package/dist/offer-variant-detail-page-ORH56HZI.js +421 -0
- package/dist/offers-VA63KV3C.js +54 -0
- package/dist/{onboarding-43LQQQGQ.js → onboarding-L5RRKT65.js} +12 -12
- package/dist/{orders-ZV4D6L2V.js → orders-KKJD6EWZ.js} +27 -27
- package/dist/{organization-ZTQGRJWS.js → organization-6YPU2RQP.js} +53 -89
- package/dist/{organize-K6QMAMEN.js → organize-LR7FWK2J.js} +3 -3
- package/dist/{organize-HNJUHEEG.js → organize-SUG4SGVR.js} +3 -3
- package/dist/pages/index.d.ts +40 -16
- package/dist/pages/index.js +73 -73
- package/dist/{payment-details-64US5XWD.js → payment-details-UVEIHQA5.js} +13 -13
- package/dist/{payouts-UXJDTXDL.js → payouts-D4A4CILI.js} +8 -8
- package/dist/{price-lists-KBPUVSZI.js → price-lists-WJFXFGEV.js} +10 -10
- package/dist/{pricing-DF6C5XK4.js → pricing-QEVR2Z4K.js} +19 -19
- package/dist/{offer-pricing-edit-page-4TYGGSOE.js → pricing-XJUUCYL5.js} +24 -18
- package/dist/{product-tags-6MZB4W5R.js → product-tags-MW2JMRFY.js} +36 -33
- package/dist/{product-types-UUHBV4IZ.js → product-types-XXU7X42K.js} +6 -6
- package/dist/product-variant-detail-XZWTSH3H.js +369 -0
- package/dist/{product-variant-edit-YYNPHE4L.js → product-variant-edit-A2KO3E7B.js} +41 -44
- package/dist/{products-MZBU5MEV.js → products-TZS2OPK3.js} +37 -37
- package/dist/{products-IWKTGZS6.js → products-XSXEUKIB.js} +23 -22
- package/dist/{professional-details-5T2VS6MM.js → professional-details-ELUEJPOH.js} +13 -13
- package/dist/{profile-6XGHAT7H.js → profile-EDVGIBW6.js} +16 -16
- package/dist/{promotions-O7U4BTK6.js → promotions-JYO23G6N.js} +8 -8
- package/dist/receive-47SMYKIJ.js +578 -0
- package/dist/refund-IU7B77FV.js +268 -0
- package/dist/{register-N6WOSMLA.js → register-SR2SYX4Q.js} +14 -14
- package/dist/{reset-password-EICPAY2N.js → reset-password-N22YRMR3.js} +1 -1
- package/dist/{return-reasons-IX3LIOCU.js → return-reasons-POR5YPTF.js} +18 -15
- package/dist/{sales-channels-JW3QUYR7.js → sales-channels-ETB6QRRY.js} +8 -8
- package/dist/{sales-channels-B6FULRWI.js → sales-channels-YXRRARDL.js} +7 -7
- package/dist/{settings-MV53ZZ53.js → settings-MHBYIZ2I.js} +38 -35
- package/dist/shipment-ZX6PQ32L.js +241 -0
- package/dist/shipping-W4SPR3JO.js +122 -0
- package/dist/{shipping-profile-Y4SNEPZX.js → shipping-profile-L5CFXVEE.js} +4 -8
- package/dist/{shipping-profiles-2NWKCEJK.js → shipping-profiles-QBJUWXVQ.js} +17 -17
- package/dist/{stock-7CSVEJJU.js → stock-FW4DOVFV.js} +14 -14
- package/dist/{store-X23G3JCJ.js → store-NWWBV2UO.js} +75 -144
- package/dist/{store-closure-P5PD2RSV.js → store-closure-O3CBSOJD.js} +19 -14
- package/dist/{store-select-TREPDS3G.js → store-select-C7GI5MKK.js} +13 -13
- package/dist/{tax-regions-YXZW7UVX.js → tax-regions-2JCIB4T7.js} +2 -2
- package/dist/{team-SPP5OY5W.js → team-MY24J5WO.js} +20 -20
- package/package.json +2 -2
- package/dist/[id]-LTNOHLGE.js +0 -1219
- package/dist/allocate-items-SDFS5GYN.js +0 -533
- package/dist/chunk-432S4FGR.js +0 -0
- package/dist/chunk-AIZM66CG.js +0 -66
- package/dist/chunk-BDZOSMAX.js +0 -23
- package/dist/chunk-CFRWIQIZ.js +0 -43
- package/dist/chunk-GKZHBXZK.js +0 -426
- package/dist/chunk-RXZFEFNV.js +0 -73
- package/dist/chunk-T6LHVNWO.js +0 -27
- package/dist/chunk-WLT7K7K7.js +0 -63
- package/dist/create-FCKGCZSM.js +0 -210
- package/dist/edit-GQNIINRR.js +0 -192
- package/dist/fulfillment-75Z4H23W.js +0 -559
- package/dist/loader-FBB5OQRT.js +0 -31
- package/dist/metadata-5BPOBBU2.js +0 -45
- package/dist/offer-detail-page-6MAHNNIO.js +0 -488
- package/dist/offer-edit-page-DYQFU6JU.js +0 -151
- package/dist/offers-ZG6OTDZ2.js +0 -32
- package/dist/product-variant-detail-RVWEYVPC.js +0 -220
- package/dist/shipment-Q33QBMXX.js +0 -176
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// src/pages/offers/common/constants.ts
|
|
2
|
+
var OFFERS_PAGE_SIZE = 10;
|
|
3
|
+
var OFFER_DETAIL_FIELDS = [
|
|
4
|
+
"id",
|
|
5
|
+
"sku",
|
|
6
|
+
"ean",
|
|
7
|
+
"upc",
|
|
8
|
+
"variant_id",
|
|
9
|
+
"seller_id",
|
|
10
|
+
"shipping_profile_id",
|
|
11
|
+
"metadata",
|
|
12
|
+
"created_at",
|
|
13
|
+
"updated_at",
|
|
14
|
+
"deleted_at",
|
|
15
|
+
"product_variant.id",
|
|
16
|
+
"product_variant.title",
|
|
17
|
+
"product_variant.sku",
|
|
18
|
+
"product_variant.product_id",
|
|
19
|
+
"product_variant.product.id",
|
|
20
|
+
"product_variant.product.title",
|
|
21
|
+
"product_variant.product.thumbnail",
|
|
22
|
+
"shipping_profile.id",
|
|
23
|
+
"shipping_profile.name",
|
|
24
|
+
"shipping_profile.type",
|
|
25
|
+
"prices.id",
|
|
26
|
+
"prices.amount",
|
|
27
|
+
"prices.currency_code",
|
|
28
|
+
"prices.min_quantity",
|
|
29
|
+
"prices.max_quantity",
|
|
30
|
+
"prices.rules_count",
|
|
31
|
+
"prices.price_rules.attribute",
|
|
32
|
+
"prices.price_rules.value",
|
|
33
|
+
"inventory_item_link.id",
|
|
34
|
+
"inventory_item_link.required_quantity",
|
|
35
|
+
"inventory_item_link.inventory_item_id",
|
|
36
|
+
"inventory_item_link.inventory_item.id",
|
|
37
|
+
"inventory_item_link.inventory_item.sku",
|
|
38
|
+
"inventory_item_link.inventory_item.title",
|
|
39
|
+
"inventory_item_link.inventory_item.location_levels.id",
|
|
40
|
+
"inventory_item_link.inventory_item.location_levels.location_id",
|
|
41
|
+
"inventory_item_link.inventory_item.location_levels.stocked_quantity",
|
|
42
|
+
"inventory_item_link.inventory_item.location_levels.reserved_quantity",
|
|
43
|
+
"inventory_item_link.inventory_item.location_levels.incoming_quantity",
|
|
44
|
+
"inventory_item_link.inventory_item.location_levels.available_quantity"
|
|
45
|
+
].join(",");
|
|
46
|
+
var OFFER_VARIANT_DETAIL_FIELDS = [
|
|
47
|
+
"id",
|
|
48
|
+
"sku",
|
|
49
|
+
"ean",
|
|
50
|
+
"upc",
|
|
51
|
+
"variant_id",
|
|
52
|
+
"seller_id",
|
|
53
|
+
"shipping_profile_id",
|
|
54
|
+
"metadata",
|
|
55
|
+
"created_at",
|
|
56
|
+
"updated_at",
|
|
57
|
+
"product_variant.id",
|
|
58
|
+
"product_variant.title",
|
|
59
|
+
"product_variant.sku",
|
|
60
|
+
"product_variant.product_id",
|
|
61
|
+
"product_variant.product.id",
|
|
62
|
+
"product_variant.product.title",
|
|
63
|
+
"product_variant.product.thumbnail",
|
|
64
|
+
"product_variant.options.id",
|
|
65
|
+
"product_variant.options.value",
|
|
66
|
+
"product_variant.options.option.id",
|
|
67
|
+
"product_variant.options.option.title",
|
|
68
|
+
"shipping_profile.id",
|
|
69
|
+
"shipping_profile.name",
|
|
70
|
+
"shipping_profile.type",
|
|
71
|
+
"prices.id",
|
|
72
|
+
"prices.amount",
|
|
73
|
+
"prices.currency_code",
|
|
74
|
+
"prices.min_quantity",
|
|
75
|
+
"prices.max_quantity",
|
|
76
|
+
"prices.rules_count",
|
|
77
|
+
"prices.price_rules.attribute",
|
|
78
|
+
"prices.price_rules.value",
|
|
79
|
+
"inventory_item_link.id",
|
|
80
|
+
"inventory_item_link.required_quantity",
|
|
81
|
+
"inventory_item_link.inventory_item_id",
|
|
82
|
+
"inventory_item_link.inventory_item.id",
|
|
83
|
+
"inventory_item_link.inventory_item.sku",
|
|
84
|
+
"inventory_item_link.inventory_item.title",
|
|
85
|
+
"inventory_item_link.inventory_item.location_levels.id",
|
|
86
|
+
"inventory_item_link.inventory_item.location_levels.location_id",
|
|
87
|
+
"inventory_item_link.inventory_item.location_levels.stocked_quantity",
|
|
88
|
+
"inventory_item_link.inventory_item.location_levels.available_quantity"
|
|
89
|
+
].join(",");
|
|
90
|
+
var OFFER_LIST_FIELDS = [
|
|
91
|
+
"id",
|
|
92
|
+
"sku",
|
|
93
|
+
"variant_id",
|
|
94
|
+
"seller_id",
|
|
95
|
+
"created_at",
|
|
96
|
+
"updated_at",
|
|
97
|
+
"deleted_at",
|
|
98
|
+
"product_variant.id",
|
|
99
|
+
"product_variant.title",
|
|
100
|
+
"product_variant.product_id",
|
|
101
|
+
"product_variant.product.id",
|
|
102
|
+
"product_variant.product.title",
|
|
103
|
+
"product_variant.product.status",
|
|
104
|
+
"product_variant.product.thumbnail",
|
|
105
|
+
"product_variant.product.categories.id",
|
|
106
|
+
"product_variant.product.categories.name",
|
|
107
|
+
"shipping_profile.id",
|
|
108
|
+
"shipping_profile.name"
|
|
109
|
+
].join(",");
|
|
110
|
+
var OFFER_PRODUCT_LIST_FIELDS = [
|
|
111
|
+
"id",
|
|
112
|
+
"title",
|
|
113
|
+
"handle",
|
|
114
|
+
"status",
|
|
115
|
+
"thumbnail",
|
|
116
|
+
"created_at",
|
|
117
|
+
"updated_at",
|
|
118
|
+
"*collection",
|
|
119
|
+
"categories.id",
|
|
120
|
+
"categories.name",
|
|
121
|
+
"variants.id",
|
|
122
|
+
"variants.offers.id"
|
|
123
|
+
].join(",");
|
|
124
|
+
var OFFER_PRODUCT_DETAIL_FIELDS = [
|
|
125
|
+
"id",
|
|
126
|
+
"title",
|
|
127
|
+
"subtitle",
|
|
128
|
+
"description",
|
|
129
|
+
"handle",
|
|
130
|
+
"discountable",
|
|
131
|
+
"status",
|
|
132
|
+
"thumbnail",
|
|
133
|
+
"*collection",
|
|
134
|
+
"*images",
|
|
135
|
+
"variants.id",
|
|
136
|
+
"variants.title",
|
|
137
|
+
"variants.sku",
|
|
138
|
+
"variants.options.id",
|
|
139
|
+
"variants.options.value",
|
|
140
|
+
"variants.options.option.id",
|
|
141
|
+
"variants.options.option.title",
|
|
142
|
+
"variants.offers.id",
|
|
143
|
+
"variants.offers.sku",
|
|
144
|
+
"variants.offers.created_at",
|
|
145
|
+
"variants.offers.updated_at",
|
|
146
|
+
"variants.offers.prices.amount",
|
|
147
|
+
"variants.offers.prices.currency_code",
|
|
148
|
+
"variants.offers.shipping_profile.id",
|
|
149
|
+
"variants.offers.shipping_profile.name",
|
|
150
|
+
"variants.offers.inventory_items.id",
|
|
151
|
+
"variants.offers.inventory_items.required_quantity"
|
|
152
|
+
].join(",");
|
|
153
|
+
|
|
154
|
+
export {
|
|
155
|
+
OFFERS_PAGE_SIZE,
|
|
156
|
+
OFFER_VARIANT_DETAIL_FIELDS,
|
|
157
|
+
OFFER_PRODUCT_LIST_FIELDS,
|
|
158
|
+
OFFER_PRODUCT_DETAIL_FIELDS
|
|
159
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/pages/orders/common/placeholders.tsx
|
|
2
|
+
import { Trans, useTranslation } from "react-i18next";
|
|
3
|
+
import { Link } from "react-router-dom";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
var ReturnShippingPlaceholder = () => {
|
|
6
|
+
const { t } = useTranslation();
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-[120px] flex-col items-center justify-center gap-2 p-2 text-center", children: [
|
|
8
|
+
/* @__PURE__ */ jsx("span", { className: "txt-small text-ui-fg-subtle font-medium", children: t("orders.returns.placeholders.noReturnShippingOptions.title") }),
|
|
9
|
+
/* @__PURE__ */ jsx("span", { className: "txt-small text-ui-fg-muted", children: /* @__PURE__ */ jsx(
|
|
10
|
+
Trans,
|
|
11
|
+
{
|
|
12
|
+
i18nKey: "orders.returns.placeholders.noReturnShippingOptions.hint",
|
|
13
|
+
components: {
|
|
14
|
+
LinkComponent: /* @__PURE__ */ jsx(Link, { to: `/settings/locations`, className: "text-blue-500" })
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
) })
|
|
18
|
+
] });
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
ReturnShippingPlaceholder
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/pages/orders/[id]/claims/create/_components/claim-create-form/item-placeholder.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var ItemPlaceholder = () => {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
style: {
|
|
8
|
+
background: "repeating-linear-gradient(-45deg, rgb(212, 212, 216, 0.15), rgb(212, 212, 216,.15) 10px, transparent 10px, transparent 20px)"
|
|
9
|
+
},
|
|
10
|
+
className: "bg-ui-bg-field mt-4 block h-[56px] w-full rounded-lg border border-dashed"
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
ItemPlaceholder
|
|
17
|
+
};
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OFFERS_PAGE_SIZE,
|
|
3
|
+
OFFER_PRODUCT_LIST_FIELDS
|
|
4
|
+
} from "./chunk-XQUF3WIS.js";
|
|
5
|
+
import {
|
|
6
|
+
CategoryCell,
|
|
7
|
+
CategoryHeader,
|
|
8
|
+
ProductStatusCell,
|
|
9
|
+
ProductStatusHeader
|
|
10
|
+
} from "./chunk-PFJFS3F4.js";
|
|
11
|
+
import {
|
|
12
|
+
ProductCell
|
|
13
|
+
} from "./chunk-FWPGOIFA.js";
|
|
14
|
+
import {
|
|
15
|
+
useProductTableFilters
|
|
16
|
+
} from "./chunk-7ZPJGL4C.js";
|
|
17
|
+
import {
|
|
18
|
+
PlaceholderCell
|
|
19
|
+
} from "./chunk-PHOCVOZ5.js";
|
|
20
|
+
import {
|
|
21
|
+
_DataTable,
|
|
22
|
+
useDataTable
|
|
23
|
+
} from "./chunk-WKRW5OPL.js";
|
|
24
|
+
import {
|
|
25
|
+
SingleColumnPage
|
|
26
|
+
} from "./chunk-YV6MK4PZ.js";
|
|
27
|
+
import {
|
|
28
|
+
useQueryParams
|
|
29
|
+
} from "./chunk-THHRRYRS.js";
|
|
30
|
+
import {
|
|
31
|
+
useBulkDeleteOffers
|
|
32
|
+
} from "./chunk-4R5GESED.js";
|
|
33
|
+
import {
|
|
34
|
+
ActionMenu
|
|
35
|
+
} from "./chunk-BDGZ4EQO.js";
|
|
36
|
+
import {
|
|
37
|
+
useProducts
|
|
38
|
+
} from "./chunk-TSTUAL6N.js";
|
|
39
|
+
|
|
40
|
+
// src/pages/offers/offer-list-page.tsx
|
|
41
|
+
import { Children as Children2 } from "react";
|
|
42
|
+
|
|
43
|
+
// src/pages/offers/_components/offer-list-table.tsx
|
|
44
|
+
import { Container } from "@medusajs/ui";
|
|
45
|
+
import { Children } from "react";
|
|
46
|
+
import { Outlet } from "react-router-dom";
|
|
47
|
+
|
|
48
|
+
// src/pages/offers/_components/offer-list-data-table.tsx
|
|
49
|
+
import { keepPreviousData } from "@tanstack/react-query";
|
|
50
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
51
|
+
|
|
52
|
+
// src/pages/offers/_components/use-offer-table-columns.tsx
|
|
53
|
+
import { Text } from "@medusajs/ui";
|
|
54
|
+
import { createColumnHelper } from "@tanstack/react-table";
|
|
55
|
+
import { useMemo } from "react";
|
|
56
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
57
|
+
|
|
58
|
+
// src/pages/offers/_components/offer-actions.tsx
|
|
59
|
+
import { Buildings, CurrencyDollar, Trash } from "@medusajs/icons";
|
|
60
|
+
import { toast, usePrompt } from "@medusajs/ui";
|
|
61
|
+
import { useTranslation } from "react-i18next";
|
|
62
|
+
import { jsx } from "react/jsx-runtime";
|
|
63
|
+
var OfferActions = ({ product }) => {
|
|
64
|
+
const { t } = useTranslation();
|
|
65
|
+
const prompt = usePrompt();
|
|
66
|
+
const { mutateAsync: bulkDelete } = useBulkDeleteOffers();
|
|
67
|
+
const handleDelete = async () => {
|
|
68
|
+
if (!product.offerIds.length) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const confirmed = await prompt({
|
|
72
|
+
title: t("general.areYouSure"),
|
|
73
|
+
// The product listing is one offer to the seller, regardless of how
|
|
74
|
+
// many of its variants are offered under the hood.
|
|
75
|
+
description: t("offers.delete.descriptionByName", { name: product.title }),
|
|
76
|
+
confirmText: t("actions.delete"),
|
|
77
|
+
cancelText: t("actions.cancel"),
|
|
78
|
+
variant: "danger"
|
|
79
|
+
});
|
|
80
|
+
if (!confirmed) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const result = await bulkDelete(product.offerIds);
|
|
84
|
+
if (result.failed.length === 0) {
|
|
85
|
+
toast.success(t("offers.delete.successToast"));
|
|
86
|
+
} else {
|
|
87
|
+
toast.warning(
|
|
88
|
+
t("offers.bulkDelete.partialToast", {
|
|
89
|
+
succeeded: result.succeeded.length,
|
|
90
|
+
total: product.offerIds.length,
|
|
91
|
+
failed: result.failed.length
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
ActionMenu,
|
|
98
|
+
{
|
|
99
|
+
groups: [
|
|
100
|
+
{
|
|
101
|
+
actions: [
|
|
102
|
+
{
|
|
103
|
+
icon: /* @__PURE__ */ jsx(CurrencyDollar, {}),
|
|
104
|
+
label: t("offers.actions.edit_prices"),
|
|
105
|
+
to: `${product.id}/edit-price`
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
icon: /* @__PURE__ */ jsx(Buildings, {}),
|
|
109
|
+
label: t("offers.actions.edit_stock_levels"),
|
|
110
|
+
to: `${product.id}/edit-stock`
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
actions: [
|
|
116
|
+
{
|
|
117
|
+
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
118
|
+
label: t("actions.delete"),
|
|
119
|
+
onClick: handleDelete,
|
|
120
|
+
disabled: product.offerIds.length === 0
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// src/pages/offers/_components/use-offer-table-columns.tsx
|
|
130
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
131
|
+
var columnHelper = createColumnHelper();
|
|
132
|
+
var countOfferedVariants = (row) => (row.variants ?? []).filter((v) => (v.offers?.length ?? 0) > 0).length;
|
|
133
|
+
var collectOfferIds = (row) => (row.variants ?? []).flatMap((v) => (v.offers ?? []).map((o) => o.id));
|
|
134
|
+
var useOfferTableColumns = () => {
|
|
135
|
+
const { t } = useTranslation2();
|
|
136
|
+
return useMemo(
|
|
137
|
+
() => [
|
|
138
|
+
columnHelper.display({
|
|
139
|
+
id: "product",
|
|
140
|
+
header: t("offers.domain"),
|
|
141
|
+
cell: ({ row }) => /* @__PURE__ */ jsx2(
|
|
142
|
+
ProductCell,
|
|
143
|
+
{
|
|
144
|
+
product: {
|
|
145
|
+
title: row.original.title ?? "",
|
|
146
|
+
thumbnail: row.original.thumbnail ?? null
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
}),
|
|
151
|
+
columnHelper.display({
|
|
152
|
+
id: "categories",
|
|
153
|
+
header: () => /* @__PURE__ */ jsx2(CategoryHeader, {}),
|
|
154
|
+
cell: ({ row }) => /* @__PURE__ */ jsx2(CategoryCell, { categories: row.original.categories })
|
|
155
|
+
}),
|
|
156
|
+
columnHelper.display({
|
|
157
|
+
id: "collection",
|
|
158
|
+
header: t("fields.collection"),
|
|
159
|
+
cell: ({ row }) => {
|
|
160
|
+
const collection = row.original.collection;
|
|
161
|
+
if (!collection?.title) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
|
|
162
|
+
return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "truncate", children: collection.title });
|
|
163
|
+
}
|
|
164
|
+
}),
|
|
165
|
+
columnHelper.display({
|
|
166
|
+
id: "variants",
|
|
167
|
+
header: t("offers.fields.variants"),
|
|
168
|
+
cell: ({ row }) => /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "truncate", children: t("offers.fields.variantsCount", {
|
|
169
|
+
count: countOfferedVariants(row.original)
|
|
170
|
+
}) })
|
|
171
|
+
}),
|
|
172
|
+
columnHelper.display({
|
|
173
|
+
id: "status",
|
|
174
|
+
header: () => /* @__PURE__ */ jsx2(ProductStatusHeader, {}),
|
|
175
|
+
cell: ({ row }) => {
|
|
176
|
+
const status = row.original.status;
|
|
177
|
+
if (!status) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
|
|
178
|
+
return /* @__PURE__ */ jsx2(ProductStatusCell, { status });
|
|
179
|
+
}
|
|
180
|
+
}),
|
|
181
|
+
columnHelper.display({
|
|
182
|
+
id: "actions",
|
|
183
|
+
cell: ({ row }) => /* @__PURE__ */ jsx2(
|
|
184
|
+
OfferActions,
|
|
185
|
+
{
|
|
186
|
+
product: {
|
|
187
|
+
id: row.original.id,
|
|
188
|
+
title: row.original.title ?? "",
|
|
189
|
+
offerIds: collectOfferIds(row.original)
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
})
|
|
194
|
+
],
|
|
195
|
+
[t]
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
// src/pages/offers/_components/use-offer-table-filters.tsx
|
|
200
|
+
var useOfferTableFilters = () => useProductTableFilters();
|
|
201
|
+
|
|
202
|
+
// src/pages/offers/_components/use-offer-table-query.tsx
|
|
203
|
+
var useOfferTableQuery = ({
|
|
204
|
+
pageSize = 10,
|
|
205
|
+
prefix
|
|
206
|
+
}) => {
|
|
207
|
+
const raw = useQueryParams(
|
|
208
|
+
[
|
|
209
|
+
"q",
|
|
210
|
+
"order",
|
|
211
|
+
"offset",
|
|
212
|
+
"created_at",
|
|
213
|
+
"updated_at",
|
|
214
|
+
"category_id",
|
|
215
|
+
"collection_id",
|
|
216
|
+
"type_id",
|
|
217
|
+
"tag_id",
|
|
218
|
+
"status",
|
|
219
|
+
"id"
|
|
220
|
+
],
|
|
221
|
+
prefix
|
|
222
|
+
);
|
|
223
|
+
const {
|
|
224
|
+
offset,
|
|
225
|
+
created_at,
|
|
226
|
+
updated_at,
|
|
227
|
+
category_id,
|
|
228
|
+
collection_id,
|
|
229
|
+
type_id,
|
|
230
|
+
tag_id,
|
|
231
|
+
status,
|
|
232
|
+
order,
|
|
233
|
+
q
|
|
234
|
+
} = raw;
|
|
235
|
+
const searchParams = {
|
|
236
|
+
limit: pageSize,
|
|
237
|
+
offset: offset ? Number(offset) : 0,
|
|
238
|
+
order: order || "title",
|
|
239
|
+
q,
|
|
240
|
+
category_id: category_id ? category_id.split(",") : void 0,
|
|
241
|
+
collection_id: collection_id ? collection_id.split(",") : void 0,
|
|
242
|
+
type_id: type_id ? type_id.split(",") : void 0,
|
|
243
|
+
tag_id: tag_id ? tag_id.split(",") : void 0,
|
|
244
|
+
status: status ? status.split(",") : void 0,
|
|
245
|
+
created_at: created_at ? JSON.parse(created_at) : void 0,
|
|
246
|
+
updated_at: updated_at ? JSON.parse(updated_at) : void 0,
|
|
247
|
+
has_offer: "true",
|
|
248
|
+
fields: OFFER_PRODUCT_LIST_FIELDS
|
|
249
|
+
};
|
|
250
|
+
return {
|
|
251
|
+
searchParams,
|
|
252
|
+
raw
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// src/pages/offers/_components/offer-list-data-table.tsx
|
|
257
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
258
|
+
var OfferListDataTable = () => {
|
|
259
|
+
const { t } = useTranslation3();
|
|
260
|
+
const { raw, searchParams } = useOfferTableQuery({
|
|
261
|
+
pageSize: OFFERS_PAGE_SIZE
|
|
262
|
+
});
|
|
263
|
+
const { products, count, isLoading, isError, error } = useProducts(
|
|
264
|
+
searchParams,
|
|
265
|
+
{ placeholderData: keepPreviousData }
|
|
266
|
+
);
|
|
267
|
+
const rows = products ?? [];
|
|
268
|
+
const filters = useOfferTableFilters();
|
|
269
|
+
const columns = useOfferTableColumns();
|
|
270
|
+
const { table } = useDataTable({
|
|
271
|
+
data: rows,
|
|
272
|
+
columns,
|
|
273
|
+
count,
|
|
274
|
+
enablePagination: true,
|
|
275
|
+
getRowId: (row) => row.id,
|
|
276
|
+
pageSize: OFFERS_PAGE_SIZE
|
|
277
|
+
});
|
|
278
|
+
if (isError) {
|
|
279
|
+
throw error;
|
|
280
|
+
}
|
|
281
|
+
return /* @__PURE__ */ jsx3(
|
|
282
|
+
_DataTable,
|
|
283
|
+
{
|
|
284
|
+
table,
|
|
285
|
+
columns,
|
|
286
|
+
pageSize: OFFERS_PAGE_SIZE,
|
|
287
|
+
count,
|
|
288
|
+
isLoading,
|
|
289
|
+
pagination: true,
|
|
290
|
+
search: true,
|
|
291
|
+
filters,
|
|
292
|
+
queryObject: raw,
|
|
293
|
+
orderBy: [
|
|
294
|
+
{ key: "title", label: t("fields.title") },
|
|
295
|
+
{ key: "created_at", label: t("fields.createdAt") },
|
|
296
|
+
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
297
|
+
],
|
|
298
|
+
defaultOrderBy: "title",
|
|
299
|
+
navigateTo: (row) => `${row.original.id}`,
|
|
300
|
+
noRecords: {
|
|
301
|
+
title: t("offers.empty.heading"),
|
|
302
|
+
message: t("offers.empty.description"),
|
|
303
|
+
action: {
|
|
304
|
+
to: "create",
|
|
305
|
+
label: t("offers.actions.create")
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// src/pages/offers/_components/offer-list-header.tsx
|
|
313
|
+
import { Button, Heading } from "@medusajs/ui";
|
|
314
|
+
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
315
|
+
import { Link } from "react-router-dom";
|
|
316
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
317
|
+
var OfferListTitle = () => {
|
|
318
|
+
const { t } = useTranslation4();
|
|
319
|
+
return /* @__PURE__ */ jsx4(Heading, { children: t("offers.domain") });
|
|
320
|
+
};
|
|
321
|
+
var OfferListActions = () => {
|
|
322
|
+
const { t } = useTranslation4();
|
|
323
|
+
return /* @__PURE__ */ jsx4(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx4(Link, { to: "create", "data-testid": "offer-list-create-button", children: t("offers.actions.create") }) });
|
|
324
|
+
};
|
|
325
|
+
var OfferListHeader = () => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
326
|
+
/* @__PURE__ */ jsx4(OfferListTitle, {}),
|
|
327
|
+
/* @__PURE__ */ jsx4(OfferListActions, {})
|
|
328
|
+
] });
|
|
329
|
+
|
|
330
|
+
// src/pages/offers/_components/offer-list-table.tsx
|
|
331
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
332
|
+
var OfferListTable = ({ children }) => /* @__PURE__ */ jsxs2(Container, { className: "divide-y p-0", "data-testid": "offer-list-table", children: [
|
|
333
|
+
Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
334
|
+
/* @__PURE__ */ jsx5(OfferListHeader, {}),
|
|
335
|
+
/* @__PURE__ */ jsx5(OfferListDataTable, {})
|
|
336
|
+
] }),
|
|
337
|
+
/* @__PURE__ */ jsx5(Outlet, {})
|
|
338
|
+
] });
|
|
339
|
+
|
|
340
|
+
// src/pages/offers/offer-list-page.tsx
|
|
341
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
342
|
+
var Root = ({ children }) => /* @__PURE__ */ jsx6(SingleColumnPage, { children: Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx6(OfferListTable, {}) });
|
|
343
|
+
var OfferListPage = Object.assign(Root, {
|
|
344
|
+
Table: OfferListTable,
|
|
345
|
+
Header: OfferListHeader,
|
|
346
|
+
HeaderTitle: OfferListTitle,
|
|
347
|
+
HeaderActions: OfferListActions,
|
|
348
|
+
DataTable: OfferListDataTable
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
export {
|
|
352
|
+
OfferListPage
|
|
353
|
+
};
|