@mercurjs/vendor 2.2.1 → 2.3.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/[id]-3TCOLUQH.js +197 -0
- package/dist/{[id]-YB3DBBXT.js → [id]-4QVLDR3S.js} +13 -10
- package/dist/{[id]-RJRAZN3T.js → [id]-4VX7CTRZ.js} +8 -6
- package/dist/{[id]-OE5TUWNF.js → [id]-5FP6JZM3.js} +9 -7
- package/dist/[id]-6FEVCKQU.js +949 -0
- package/dist/{[id]-47SUX5X3.js → [id]-7QVJAIDU.js} +13 -10
- package/dist/{[id]-BHU5BSQT.js → [id]-CFVBH66J.js} +20 -17
- package/dist/{[id]-SKU5SFBG.js → [id]-HAJ3735Z.js} +137 -204
- package/dist/{[id]-NGRV5I2A.js → [id]-PBNGQSNY.js} +9 -7
- package/dist/[id]-QGZ26C6D.js +286 -0
- package/dist/{[id]-ZD5HBP2R.js → [id]-RAJUZUNH.js} +13 -10
- package/dist/[id]-RJ3MUR4M.js +697 -0
- package/dist/{[id]-PIB2DEVI.js → [id]-RRVYKA7U.js} +12 -9
- package/dist/{[id]-BPQNQFVE.js → [id]-Y4HRAAV2.js} +75 -124
- package/dist/{[province_id]-CUWKNPBW.js → [province_id]-VWN4OOGM.js} +9 -7
- package/dist/{add-MYV5IOGP.js → add-57LM6WKL.js} +157 -227
- package/dist/{add-YEUSE5QA.js → add-7HIVF77P.js} +10 -8
- package/dist/{add-customer-groups-Q3F357F2.js → add-customer-groups-VJYI5J5Z.js} +8 -6
- package/dist/{add-products-WVNYODC6.js → add-products-XWU5ZUTZ.js} +13 -10
- package/dist/{add-promotions-F62YE3BE.js → add-promotions-DOJS6CEE.js} +27 -9
- package/dist/{add-to-campaign-WBSCTSKW.js → add-to-campaign-B3PGGNFA.js} +3 -2
- package/dist/{address-ZMZ4ST5T.js → address-X4TXBPUG.js} +7 -5
- package/dist/{adjust-inventory-QUGKDXOC.js → adjust-inventory-2OKDFVLK.js} +2 -3
- package/dist/{allocate-items-7NSBGXSF.js → allocate-items-QAYROQMK.js} +4 -2
- package/dist/{areas-EJCZBY2E.js → areas-WQ44GWQO.js} +2 -2
- package/dist/{breadcrumb-M657ZCG6.js → breadcrumb-4I7MU2QY.js} +1 -1
- package/dist/{breadcrumb-KNBZ3JNR.js → breadcrumb-7ZFC43R4.js} +1 -1
- package/dist/{breadcrumb-C7M5PG2Q.js → breadcrumb-HMW2K4DW.js} +7 -5
- package/dist/{breadcrumb-KLNC72RI.js → breadcrumb-MH2L34OD.js} +2 -2
- package/dist/{breadcrumb-QPV566YX.js → breadcrumb-Q7FS3IDL.js} +8 -6
- package/dist/{breadcrumb-JWFTKHLE.js → breadcrumb-RQ52GELM.js} +2 -1
- package/dist/{breadcrumb-M6NW3DRQ.js → breadcrumb-WBUUK3AP.js} +1 -1
- package/dist/breadcrumb-XCPUUZUO.js +26 -0
- package/dist/{breadcrumb-MXYWEBK6.js → breadcrumb-Z2QUGZM3.js} +7 -5
- package/dist/{campaigns-BPLAE6QQ.js → campaigns-LIPKZKI7.js} +5 -4
- package/dist/{categories-H2XAJCGC.js → categories-D2U6VLH5.js} +2 -2
- package/dist/{chunk-4RVWITM2.js → chunk-3JWHERV7.js} +76 -23
- package/dist/{chunk-BCXREBMV.js → chunk-4ATO577Q.js} +1 -1
- package/dist/{chunk-VHFKJLDH.js → chunk-4JVORTN4.js} +1 -1
- package/dist/{chunk-HHD2VUED.js → chunk-4UKAKFKL.js} +1 -1
- package/dist/{chunk-3L7WHWKB.js → chunk-5DRYAIOY.js} +3 -3
- package/dist/{chunk-7TIZP4YG.js → chunk-5RWK4U4V.js} +26 -0
- package/dist/{chunk-XQUF3WIS.js → chunk-5ZHZVKNQ.js} +4 -0
- package/dist/{chunk-IWAL74YU.js → chunk-6GQLSWOO.js} +1 -1
- package/dist/{chunk-HCUIYIIY.js → chunk-6OZQTHCR.js} +1 -1
- package/dist/chunk-6XMUN2BZ.js +0 -0
- package/dist/{chunk-RLRWDHME.js → chunk-6YQR2AWM.js} +3 -20
- package/dist/{chunk-26OOAKQ6.js → chunk-7H6NMQ6U.js} +8 -1
- package/dist/{chunk-OKJHUQBY.js → chunk-7JVJIAWS.js} +17 -29
- package/dist/chunk-7LIENHWP.js +26 -0
- package/dist/{chunk-EPSRO7C5.js → chunk-7LIT4GXO.js} +2 -2
- package/dist/chunk-7POOMBIN.js +108 -0
- package/dist/{chunk-PF7R7LMW.js → chunk-AHR2FIMC.js} +22 -0
- package/dist/{chunk-EJBOBB4B.js → chunk-AQT2G6K2.js} +46 -46
- package/dist/{chunk-UEKRQS5Q.js → chunk-ATYOOL7K.js} +2 -2
- package/dist/chunk-BR6PEFXX.js +27 -0
- package/dist/{chunk-SDFZUBS3.js → chunk-CDZALZ5E.js} +1 -1
- package/dist/{chunk-3XW55FZY.js → chunk-CRVVPIFZ.js} +6 -6
- package/dist/{chunk-72HQFLZI.js → chunk-CSEB2RNO.js} +1 -1
- package/dist/{chunk-X6ZQMFCT.js → chunk-DAOSTHVB.js} +44 -25
- package/dist/{chunk-UUBGLS7U.js → chunk-EWJTXSKI.js} +211 -36
- package/dist/chunk-FKKI62AC.js +282 -0
- package/dist/{chunk-VBKW4GWP.js → chunk-FPBXQIFJ.js} +1 -1
- package/dist/{chunk-SI55QRZ4.js → chunk-G5NNOOHR.js} +59 -6
- package/dist/chunk-G6J5ZKM3.js +31 -0
- package/dist/{chunk-U5V6HNVW.js → chunk-GL3XVUAY.js} +1 -1
- package/dist/{chunk-RJE4MAYB.js → chunk-GYLRZXWS.js} +1 -1
- package/dist/{chunk-SVYBMLVN.js → chunk-HHCLMWXT.js} +1 -1
- package/dist/{chunk-YUQA6TUA.js → chunk-JOCO7JOB.js} +3 -3
- package/dist/{chunk-OGUTFP6B.js → chunk-JYUHDM23.js} +13 -51
- package/dist/{chunk-QB7BI4B7.js → chunk-K2DXXPNA.js} +153 -86
- package/dist/{chunk-XG76XXM2.js → chunk-KKMA6VPG.js} +1 -1
- package/dist/chunk-KVAD5JGS.js +11 -0
- package/dist/{chunk-YRZ53SAN.js → chunk-L26J5MO2.js} +2 -2
- package/dist/{chunk-63XYNXUL.js → chunk-LYP7XK5O.js} +1 -1
- package/dist/chunk-MVVFD2JT.js +51 -0
- package/dist/{chunk-RVFPWOR2.js → chunk-MY5H7C3A.js} +2 -2
- package/dist/{chunk-3GSR455R.js → chunk-NQMHP2LC.js} +1 -1
- package/dist/{chunk-2S2WK2OG.js → chunk-NV2RZAHW.js} +1 -10
- package/dist/{chunk-4IIATKG7.js → chunk-O7OWHKWA.js} +6 -6
- package/dist/{chunk-GIKVFOQL.js → chunk-OJCMHDZI.js} +2 -2
- package/dist/chunk-QLOJNFUE.js +53 -0
- package/dist/{chunk-GTNCNKTC.js → chunk-RBWIHKUF.js} +1 -1
- package/dist/{chunk-XVBONKRV.js → chunk-RCMKDW6O.js} +1 -1
- package/dist/{chunk-WJF24CGA.js → chunk-RDLVH6CM.js} +33 -5
- package/dist/chunk-SF5N2HX4.js +268 -0
- package/dist/{chunk-MQR26KYT.js → chunk-SYHA2RVL.js} +1 -1
- package/dist/{chunk-ZXDMPIXN.js → chunk-U3OEGBHH.js} +2 -2
- package/dist/chunk-UTGI6R2X.js +334 -0
- package/dist/{chunk-VBRTC2VU.js → chunk-VAFGNDAP.js} +4 -3
- package/dist/{chunk-4UQMRTSC.js → chunk-VH3TGSWE.js} +46 -2
- package/dist/{chunk-ZEKV7LGF.js → chunk-VV2K3EBF.js} +1 -1
- package/dist/{chunk-S2VYK3YC.js → chunk-WI2ZAFZF.js} +1 -1
- package/dist/chunk-WP3B4NEU.js +32 -0
- package/dist/{chunk-DY3XQPHC.js → chunk-WW2XYOHJ.js} +5 -3
- package/dist/{chunk-IVYIMGQC.js → chunk-X44P463Q.js} +45 -10
- package/dist/{chunk-FEVCBT24.js → chunk-X4G64W5Q.js} +2 -2
- package/dist/{chunk-R5KN6IFB.js → chunk-XHWBTV72.js} +2 -2
- package/dist/{chunk-OVHIUZ3K.js → chunk-XQ47NZJC.js} +1 -1
- package/dist/{chunk-LN7XHEPJ.js → chunk-YT4RAUWM.js} +2 -2
- package/dist/{chunk-6VKJM537.js → chunk-ZK4DIDXG.js} +1 -1
- package/dist/{collections-52DJLHWW.js → collections-5TH7H2QP.js} +14 -13
- package/dist/{configuration-UMRBE5RQ.js → configuration-QK2FW2CV.js} +2 -2
- package/dist/{configuration-QEDVL2WF.js → configuration-RYH3VUBV.js} +15 -48
- package/dist/{create-ALUKAFJS.js → create-5M66YUYY.js} +2 -2
- package/dist/{create-ABRPUMHQ.js → create-A6KZEZMH.js} +7 -6
- package/dist/{create-LYNWCP2N.js → create-BTODQ4T4.js} +6 -5
- package/dist/{create-2I3GAX4C.js → create-FI6H4AJE.js} +16 -7
- package/dist/{create-6IRD2CVC.js → create-GF76Z5I7.js} +15 -13
- package/dist/create-ICCAEOSA.js +343 -0
- package/dist/{create-NTZH45DW.js → create-JZLU44WB.js} +14 -12
- package/dist/{create-GEYXN6SW.js → create-ME43PNL6.js} +7 -5
- package/dist/{create-MFGMTZ5A.js → create-MIYJCLAJ.js} +8 -6
- package/dist/{create-7SJ5DSQK.js → create-PRDQJ5WI.js} +20 -17
- package/dist/{create-S7VYYTUD.js → create-Q6B6JR4K.js} +10 -8
- package/dist/{create-5RQ32XPT.js → create-SKQAJNDF.js} +287 -287
- package/dist/{create-7FT7N2NH.js → create-WPN3OUJU.js} +3 -2
- package/dist/{create-H77ZUZG5.js → create-XBGN6XEF.js} +10 -8
- package/dist/{create-G76MVCJU.js → create-ZVGYET6W.js} +5 -4
- package/dist/customer-availability-VAOKKCTK.js +164 -0
- package/dist/{customer-group-add-customers-T7OYWJCB.js → customer-group-add-customers-BSMUKWVO.js} +1 -1
- package/dist/{customer-group-detail-E7HRZ3LE.js → customer-group-detail-QCPC2YWK.js} +2 -2
- package/dist/{customer-groups-26HJ55MF.js → customer-groups-6WGUNFHG.js} +2 -2
- package/dist/{customers-EXFRZX5F.js → customers-7OGYQSGA.js} +2 -2
- package/dist/edit-2BKYNGYL.js +262 -0
- package/dist/{edit-WHGYNDEB.js → edit-3S3EH372.js} +20 -17
- package/dist/{edit-MPOTIGUY.js → edit-4WP5SGH6.js} +23 -39
- package/dist/{edit-QBUYHSE7.js → edit-7D2OZBJS.js} +8 -6
- package/dist/{edit-2RN3OT27.js → edit-7T2JMZG3.js} +7 -56
- package/dist/edit-AK4E63X6.js +179 -0
- package/dist/{edit-NB5VN2E4.js → edit-DRT6VOAA.js} +5 -4
- package/dist/{edit-EGBVEWXS.js → edit-GBDHDJK4.js} +9 -7
- package/dist/{edit-TIBQEQVV.js → edit-P7FNRVGB.js} +10 -8
- package/dist/{edit-6VJWRZHQ.js → edit-PZN7UAJI.js} +7 -5
- package/dist/{edit-M4AP65HO.js → edit-RNSXXJVU.js} +8 -6
- package/dist/edit-SKRFQ4WN.js +81 -0
- package/dist/{edit-H5FJ45ZT.js → edit-ZM7NJVRE.js} +1 -1
- package/dist/{edit-budget-PYPHUJPW.js → edit-budget-MOZETGZV.js} +1 -1
- package/dist/{edit-inventory-item-BCVECCLT.js → edit-inventory-item-HFGHS732.js} +17 -14
- package/dist/{edit-inventory-item-attributes-GWEMP67O.js → edit-inventory-item-attributes-5ORZJF4I.js} +18 -1
- package/dist/{edit-price-GLAEAO7R.js → edit-price-KY7LX5QA.js} +2 -2
- package/dist/edit-reservation-LSYQUDYQ.js +294 -0
- package/dist/{edit-stock-E3PM2YOP.js → edit-stock-77VKJR4Z.js} +2 -2
- package/dist/extension-targets.d.ts +6 -3
- package/dist/{fulfillment-HDU7GATG.js → fulfillment-DEGKZL42.js} +7 -5
- package/dist/{fulfillment-providers-6RZNNT7U.js → fulfillment-providers-LDFPZGNX.js} +12 -11
- package/dist/index.css +17 -14
- package/dist/index.js +265 -155
- package/dist/{inventory-XJ2E6DPC.js → inventory-CMIRAJJY.js} +2 -2
- package/dist/{inventory-CKA34HWM.js → inventory-RKAUTQAU.js} +2 -2
- package/dist/{invite-755AJC3M.js → invite-KAHF2MCE.js} +7 -5
- package/dist/{invite-FD2TXZTW.js → invite-S5O7LFEY.js} +10 -8
- package/dist/{loader-UUSAVCK6.js → loader-3BXYSKPT.js} +1 -1
- package/dist/{loader-B4T2VBGV.js → loader-CF54CDM6.js} +2 -2
- package/dist/{login-UGKYRKMD.js → login-CRSALS6Y.js} +9 -7
- package/dist/manage-items-63FPRK7Z.js +302 -0
- package/dist/{manage-locations-PRQI5TI4.js → manage-locations-5B4HP6NQ.js} +24 -5
- package/dist/{media-TGFAHFBV.js → media-74PEXOLV.js} +8 -6
- package/dist/{media-2KEHXPRU.js → media-NKCXFG6X.js} +11 -9
- package/dist/{metadata-7JWZ4VFM.js → metadata-22BCBKVE.js} +7 -5
- package/dist/{metadata-BQQFHVKF.js → metadata-E3BDAMIO.js} +7 -5
- package/dist/{metadata-5TVRCKWX.js → metadata-FRXIY35J.js} +7 -5
- package/dist/{metadata-4ZZ4ZIWJ.js → metadata-L6IA2Z26.js} +7 -5
- package/dist/metadata-WN6Y35RV.js +69 -0
- package/dist/{metadata-G73TILNE.js → metadata-ZZMJNWS3.js} +7 -5
- package/dist/{offer-create-page-PPXRYET4.js → offer-create-page-N5CKYGSS.js} +12 -9
- package/dist/{offer-detail-page-BFGKAS4L.js → offer-detail-page-AJG6TMJC.js} +3 -3
- package/dist/{offer-variant-detail-page-BLHRF4MK.js → offer-variant-detail-page-CEOS2MVM.js} +40 -8
- package/dist/{offers-7I67VSHI.js → offers-WFJ6UGVG.js} +15 -11
- package/dist/{onboarding-7MURQYXX.js → onboarding-2AZ2KEWJ.js} +7 -5
- package/dist/{orders-D7NZNDUS.js → orders-NWYLN6BE.js} +13 -12
- package/dist/{organization-T6ZTYMMW.js → organization-PAWIWKHV.js} +9 -7
- package/dist/pages/index.d.ts +9 -1
- package/dist/pages/index.js +57 -48
- package/dist/{payment-details-UQ65D5AY.js → payment-details-O57HNHWS.js} +7 -5
- package/dist/{payouts-A336D2HG.js → payouts-26ZOYDRP.js} +2 -2
- package/dist/{price-lists-3WRT4TR2.js → price-lists-U5ASDHMI.js} +5 -8
- package/dist/{pricing-3NLEJYRP.js → pricing-C425JTFQ.js} +2 -2
- package/dist/{pricing-CPPIL627.js → pricing-PDOCJEDS.js} +9 -7
- package/dist/{product-tags-7DTA73YT.js → product-tags-MMQ4ZR4W.js} +20 -17
- package/dist/{product-types-OB26NF2D.js → product-types-CMI33S32.js} +3 -4
- package/dist/{product-variant-detail-4DDE6RJ5.js → product-variant-detail-D73ILATK.js} +7 -5
- package/dist/{product-variant-edit-SAZUI4E3.js → product-variant-edit-XN6WGKI2.js} +10 -8
- package/dist/{products-RYXTZFGT.js → products-OZJHGW2K.js} +19 -16
- package/dist/{products-GJ2KTGBZ.js → products-VWH5TAFY.js} +13 -10
- package/dist/{professional-details-UN5B4YDJ.js → professional-details-ZJT6YKZB.js} +7 -5
- package/dist/{profile-6MIDTK52.js → profile-EU46MXFW.js} +7 -5
- package/dist/{promotions-SQ47TCZL.js → promotions-ALWQ7J7A.js} +5 -5
- package/dist/{receive-ZG6FFN7H.js → receive-RRZK3FP2.js} +4 -3
- package/dist/{refund-KJX74N6T.js → refund-FLCZAMPR.js} +3 -2
- package/dist/{register-RDSK4E4D.js → register-C6ON6OL2.js} +9 -7
- package/dist/reservations-C326XEVA.js +350 -0
- package/dist/{reset-password-C462PDN2.js → reset-password-ASLKY3GK.js} +1 -1
- package/dist/respond-IPRDCH57.js +132 -0
- package/dist/{return-reasons-MY63HNF6.js → return-reasons-2BUKIQBO.js} +9 -7
- package/dist/reviews-LBLCFBRQ.js +14 -0
- package/dist/{settings-TJ6HPHMK.js → settings-Q5GAL2LK.js} +28 -25
- package/dist/{shipment-6CTA2GHU.js → shipment-XOU6F7AS.js} +7 -5
- package/dist/{shipping-TKKMYQHJ.js → shipping-IMCP7UDV.js} +2 -2
- package/dist/{shipping-profile-CFISOMTE.js → shipping-profile-7P3RPEIJ.js} +1 -1
- package/dist/{shipping-profiles-5UAZNYKJ.js → shipping-profiles-647FLCNK.js} +9 -7
- package/dist/{stock-465GEUY3.js → stock-D3HCV5UR.js} +22 -8
- package/dist/{store-2PQB2XWE.js → store-XBNFP6O4.js} +8 -6
- package/dist/{store-closure-DYW54VHB.js → store-closure-55EUSKE4.js} +7 -5
- package/dist/{store-select-6A5YR7WH.js → store-select-DEOEGT2O.js} +8 -6
- package/dist/{team-GXEBC57M.js → team-7MJ3NJUT.js} +10 -8
- package/package.json +12 -9
- package/dist/[id]-HEVGSOAV.js +0 -598
- package/dist/[id]-MU7A6SZO.js +0 -526
- package/dist/chunk-2ZFELO2L.js +0 -13
- package/dist/chunk-6IJMSVC6.js +0 -16
- package/dist/chunk-BNOKKKUU.js +0 -88
- package/dist/chunk-BX3JE7IE.js +0 -247
- package/dist/edit-4B364HGZ.js +0 -222
- package/dist/edit-735HBYH2.js +0 -103
- package/dist/edit-SQU5UOGE.js +0 -105
- package/dist/{chunk-CYE7HVAV.js → chunk-SCJBJQCL.js} +3 -3
|
@@ -4,11 +4,15 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DateRangeDisplay
|
|
6
6
|
} from "./chunk-BWGPN6XV.js";
|
|
7
|
+
import {
|
|
8
|
+
campaignStatus,
|
|
9
|
+
statusColor
|
|
10
|
+
} from "./chunk-WP3B4NEU.js";
|
|
7
11
|
import {
|
|
8
12
|
usePromotionTableColumns,
|
|
9
13
|
usePromotionTableQuery
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-AQT2G6K2.js";
|
|
15
|
+
import "./chunk-RBWIHKUF.js";
|
|
12
16
|
import "./chunk-JHIMVLB2.js";
|
|
13
17
|
import {
|
|
14
18
|
usePromotionTableFilters
|
|
@@ -16,10 +20,7 @@ import {
|
|
|
16
20
|
import "./chunk-MDABSESI.js";
|
|
17
21
|
import "./chunk-FMFVTERD.js";
|
|
18
22
|
import "./chunk-PHOCVOZ5.js";
|
|
19
|
-
import
|
|
20
|
-
currencies
|
|
21
|
-
} from "./chunk-IQPN4PZJ.js";
|
|
22
|
-
import "./chunk-UUBGLS7U.js";
|
|
23
|
+
import "./chunk-EWJTXSKI.js";
|
|
23
24
|
import {
|
|
24
25
|
TwoColumnPage
|
|
25
26
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -27,7 +28,7 @@ import "./chunk-FQERBIVS.js";
|
|
|
27
28
|
import {
|
|
28
29
|
_DataTable,
|
|
29
30
|
useDataTable
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-6GQLSWOO.js";
|
|
31
32
|
import "./chunk-YN3FGNJM.js";
|
|
32
33
|
import "./chunk-KCHYLLVG.js";
|
|
33
34
|
import "./chunk-3EF54XFY.js";
|
|
@@ -47,6 +48,7 @@ import {
|
|
|
47
48
|
promotionsQueryKeys,
|
|
48
49
|
useCampaign,
|
|
49
50
|
useDeleteCampaign,
|
|
51
|
+
usePromotions,
|
|
50
52
|
useRemovePromotionFromCampaign
|
|
51
53
|
} from "./chunk-MR6REQKT.js";
|
|
52
54
|
import {
|
|
@@ -82,83 +84,93 @@ import { useLoaderData, useParams } from "react-router-dom";
|
|
|
82
84
|
import { WidgetZone, useLinkQuery } from "@mercurjs/dashboard-shared";
|
|
83
85
|
|
|
84
86
|
// src/pages/campaigns/[id]/_components/campaign-budget/campaign-budget.tsx
|
|
85
|
-
import { ChartPie, PencilSquare } from "@medusajs/icons";
|
|
87
|
+
import { ChartPie, CurrencyDollar, PencilSquare } from "@medusajs/icons";
|
|
86
88
|
import { Container, Heading, Text } from "@medusajs/ui";
|
|
87
|
-
import {
|
|
89
|
+
import { useTranslation } from "react-i18next";
|
|
88
90
|
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
89
91
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
92
|
+
var BudgetRow = ({
|
|
93
|
+
label,
|
|
94
|
+
value,
|
|
95
|
+
action,
|
|
96
|
+
divider
|
|
97
|
+
}) => /* @__PURE__ */ jsx(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
className: divider ? "border-b border-ui-border-base" : "",
|
|
101
|
+
children: /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-component text-ui-fg-subtle grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_28px] items-center gap-4 px-3 py-2", children: [
|
|
102
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: label }),
|
|
103
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: value }),
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: action })
|
|
105
|
+
] })
|
|
106
|
+
}
|
|
107
|
+
);
|
|
90
108
|
var CampaignBudget = ({ campaign }) => {
|
|
91
109
|
const { t } = useTranslation();
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
const budget = campaign.budget;
|
|
111
|
+
const isSpend = budget?.type === "spend";
|
|
112
|
+
const currency = budget?.currency_code?.toUpperCase();
|
|
113
|
+
const formatAmount = (amount) => isSpend && currency ? `${amount} ${currency}` : `${amount}`;
|
|
114
|
+
const attributeLabel = budget?.attribute ? t(`campaigns.budget.attribute.${budget.attribute}`, {
|
|
115
|
+
defaultValue: budget.attribute
|
|
116
|
+
}) : "-";
|
|
117
|
+
return /* @__PURE__ */ jsxs(Container, { className: "p-0", children: [
|
|
118
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("campaigns.budget.details") }) }),
|
|
119
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-3 px-6 pb-4", children: [
|
|
120
|
+
/* @__PURE__ */ jsx("div", { className: "text-ui-fg-subtle bg-ui-bg-component shadow-elevation-card-rest flex size-7 shrink-0 items-center justify-center rounded-md", children: isSpend ? /* @__PURE__ */ jsx(CurrencyDollar, {}) : /* @__PURE__ */ jsx(ChartPie, {}) }),
|
|
121
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
122
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: isSpend ? t("campaigns.budget.type.spend.title") : t("campaigns.budget.type.usage.title") }),
|
|
123
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: isSpend ? t("campaigns.budget.type.spend.description") : t("campaigns.budget.type.usage.description") })
|
|
124
|
+
] })
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ jsx("div", { className: "px-3 pb-3", children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-xl border border-ui-border-base", children: [
|
|
105
127
|
/* @__PURE__ */ jsx(
|
|
106
|
-
|
|
128
|
+
BudgetRow,
|
|
107
129
|
{
|
|
108
|
-
|
|
130
|
+
label: t("campaigns.fields.total_used"),
|
|
131
|
+
value: formatAmount(budget?.used ?? 0),
|
|
132
|
+
divider: true
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
BudgetRow,
|
|
137
|
+
{
|
|
138
|
+
label: t("campaigns.fields.budget_limit"),
|
|
139
|
+
value: budget?.limit != null ? formatAmount(budget.limit) : "-",
|
|
140
|
+
divider: !isSpend,
|
|
141
|
+
action: /* @__PURE__ */ jsx(
|
|
142
|
+
ActionMenu,
|
|
109
143
|
{
|
|
110
|
-
|
|
144
|
+
groups: [
|
|
111
145
|
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
146
|
+
actions: [
|
|
147
|
+
{
|
|
148
|
+
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
149
|
+
label: t("actions.edit"),
|
|
150
|
+
to: "edit-budget"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
115
153
|
}
|
|
116
154
|
]
|
|
117
155
|
}
|
|
118
|
-
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
!isSpend && /* @__PURE__ */ jsx(
|
|
160
|
+
BudgetRow,
|
|
161
|
+
{
|
|
162
|
+
label: t("campaigns.budget.fields.budgetAttribute"),
|
|
163
|
+
value: attributeLabel
|
|
119
164
|
}
|
|
120
165
|
)
|
|
121
|
-
] }),
|
|
122
|
-
/* @__PURE__ */ jsx(
|
|
123
|
-
Text,
|
|
124
|
-
{
|
|
125
|
-
className: "text-ui-fg-subtle border-ui-border-strong border-l-4 pl-3",
|
|
126
|
-
size: "small",
|
|
127
|
-
leading: "compact",
|
|
128
|
-
children: /* @__PURE__ */ jsx(
|
|
129
|
-
Trans,
|
|
130
|
-
{
|
|
131
|
-
i18nKey: "campaigns.totalSpend",
|
|
132
|
-
values: {
|
|
133
|
-
amount: campaign?.budget?.limit || "no limit",
|
|
134
|
-
currency: campaign?.budget?.type === "spend" && campaign?.budget.limit ? campaign.budget?.currency_code : ""
|
|
135
|
-
},
|
|
136
|
-
components: [
|
|
137
|
-
/* @__PURE__ */ jsx(
|
|
138
|
-
"span",
|
|
139
|
-
{
|
|
140
|
-
className: "text-ui-fg-base txt-compact-medium-plus text-lg"
|
|
141
|
-
},
|
|
142
|
-
"amount"
|
|
143
|
-
),
|
|
144
|
-
/* @__PURE__ */ jsx(
|
|
145
|
-
"span",
|
|
146
|
-
{
|
|
147
|
-
className: "text-ui-fg-base txt-compact-medium-plus text-lg"
|
|
148
|
-
},
|
|
149
|
-
"currency"
|
|
150
|
-
)
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
) }),
|
|
166
|
+
] }) }),
|
|
167
|
+
/* @__PURE__ */ jsx(DisplayExtensionZone, { model: "campaign", zone: "spend", data: campaign }),
|
|
156
168
|
/* @__PURE__ */ jsx(DisplayExtensionZone, { model: "campaign", zone: "budget", data: campaign })
|
|
157
169
|
] });
|
|
158
170
|
};
|
|
159
171
|
|
|
160
172
|
// src/pages/campaigns/[id]/_components/campaign-configuration-section/campaign-configuration-section.tsx
|
|
161
|
-
import { Container as Container2, Heading as Heading2 } from "@medusajs/ui";
|
|
173
|
+
import { Container as Container2, Heading as Heading2, InlineTip } from "@medusajs/ui";
|
|
162
174
|
import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
|
|
163
175
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
164
176
|
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
@@ -167,8 +179,8 @@ var CampaignConfigurationSection = ({
|
|
|
167
179
|
campaign
|
|
168
180
|
}) => {
|
|
169
181
|
const { t } = useTranslation2();
|
|
170
|
-
return /* @__PURE__ */ jsxs2(Container2, { className: "
|
|
171
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between", children: [
|
|
182
|
+
return /* @__PURE__ */ jsxs2(Container2, { className: "p-0", children: [
|
|
183
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 pt-6", children: [
|
|
172
184
|
/* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("campaigns.configuration.header") }),
|
|
173
185
|
/* @__PURE__ */ jsx2(
|
|
174
186
|
ActionMenu,
|
|
@@ -187,14 +199,17 @@ var CampaignConfigurationSection = ({
|
|
|
187
199
|
}
|
|
188
200
|
)
|
|
189
201
|
] }),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-y-4 px-3 pb-3 pt-4", children: [
|
|
203
|
+
/* @__PURE__ */ jsx2(
|
|
204
|
+
DateRangeDisplay,
|
|
205
|
+
{
|
|
206
|
+
startsAt: campaign.starts_at,
|
|
207
|
+
endsAt: campaign.ends_at,
|
|
208
|
+
showTime: true
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ jsx2(InlineTip, { variant: "warning", label: t("general.warning"), children: t("campaigns.configuration.expiryWarning") })
|
|
212
|
+
] }),
|
|
198
213
|
/* @__PURE__ */ jsx2(
|
|
199
214
|
DisplayExtensionZone2,
|
|
200
215
|
{
|
|
@@ -209,7 +224,6 @@ var CampaignConfigurationSection = ({
|
|
|
209
224
|
// src/pages/campaigns/[id]/_components/campaign-general-section/campaign-general-section.tsx
|
|
210
225
|
import { PencilSquare as PencilSquare3, Trash } from "@medusajs/icons";
|
|
211
226
|
import {
|
|
212
|
-
Badge,
|
|
213
227
|
Container as Container3,
|
|
214
228
|
Heading as Heading3,
|
|
215
229
|
StatusBadge,
|
|
@@ -220,36 +234,6 @@ import {
|
|
|
220
234
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
221
235
|
import { useNavigate } from "react-router-dom";
|
|
222
236
|
import { DisplayExtensionZone as DisplayExtensionZone3, DisplayField } from "@mercurjs/dashboard-shared";
|
|
223
|
-
|
|
224
|
-
// src/pages/campaigns/common/utils/campaign-status.ts
|
|
225
|
-
import { isAfter, isBefore } from "date-fns";
|
|
226
|
-
function campaignStatus(campaign) {
|
|
227
|
-
if (campaign.ends_at) {
|
|
228
|
-
if (isBefore(new Date(campaign.ends_at), /* @__PURE__ */ new Date())) {
|
|
229
|
-
return "expired";
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
if (campaign.starts_at) {
|
|
233
|
-
if (isAfter(new Date(campaign.starts_at), /* @__PURE__ */ new Date())) {
|
|
234
|
-
return "scheduled";
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
return "active";
|
|
238
|
-
}
|
|
239
|
-
var statusColor = (status) => {
|
|
240
|
-
switch (status) {
|
|
241
|
-
case "expired":
|
|
242
|
-
return "red";
|
|
243
|
-
case "scheduled":
|
|
244
|
-
return "orange";
|
|
245
|
-
case "active":
|
|
246
|
-
return "green";
|
|
247
|
-
default:
|
|
248
|
-
return "grey";
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
// src/pages/campaigns/[id]/_components/campaign-general-section/campaign-general-section.tsx
|
|
253
237
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
254
238
|
var CampaignGeneralSection = ({
|
|
255
239
|
campaign
|
|
@@ -326,19 +310,6 @@ var CampaignGeneralSection = ({
|
|
|
326
310
|
)
|
|
327
311
|
] })
|
|
328
312
|
] }),
|
|
329
|
-
/* @__PURE__ */ jsx3(
|
|
330
|
-
DisplayField,
|
|
331
|
-
{
|
|
332
|
-
model: "campaign",
|
|
333
|
-
zone: "general",
|
|
334
|
-
id: "campaign_identifier",
|
|
335
|
-
data: campaign,
|
|
336
|
-
children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
337
|
-
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: t("campaigns.fields.identifier") }),
|
|
338
|
-
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", children: campaign.campaign_identifier })
|
|
339
|
-
] })
|
|
340
|
-
}
|
|
341
|
-
),
|
|
342
313
|
/* @__PURE__ */ jsx3(
|
|
343
314
|
DisplayField,
|
|
344
315
|
{
|
|
@@ -352,19 +323,16 @@ var CampaignGeneralSection = ({
|
|
|
352
323
|
] })
|
|
353
324
|
}
|
|
354
325
|
),
|
|
355
|
-
|
|
326
|
+
/* @__PURE__ */ jsx3(
|
|
356
327
|
DisplayField,
|
|
357
328
|
{
|
|
358
329
|
model: "campaign",
|
|
359
330
|
zone: "general",
|
|
360
|
-
id: "
|
|
331
|
+
id: "campaign_identifier",
|
|
361
332
|
data: campaign,
|
|
362
333
|
children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
363
|
-
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: t("fields.
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */ jsx3(Badge, { size: "xsmall", children: campaign?.budget.currency_code }),
|
|
366
|
-
/* @__PURE__ */ jsx3(Text2, { className: "inline pl-3", size: "small", leading: "compact", children: currencies[campaign?.budget.currency_code?.toUpperCase()]?.name })
|
|
367
|
-
] })
|
|
334
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: t("campaigns.fields.identifier") }),
|
|
335
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", children: campaign.campaign_identifier })
|
|
368
336
|
] })
|
|
369
337
|
}
|
|
370
338
|
),
|
|
@@ -378,8 +346,7 @@ var CampaignGeneralSection = ({
|
|
|
378
346
|
"name",
|
|
379
347
|
"status",
|
|
380
348
|
"campaign_identifier",
|
|
381
|
-
"description"
|
|
382
|
-
"currency_code"
|
|
349
|
+
"description"
|
|
383
350
|
]
|
|
384
351
|
}
|
|
385
352
|
)
|
|
@@ -388,7 +355,14 @@ var CampaignGeneralSection = ({
|
|
|
388
355
|
|
|
389
356
|
// src/pages/campaigns/[id]/_components/campaign-promotion-section/campaign-promotion-section.tsx
|
|
390
357
|
import { PencilSquare as PencilSquare4, Trash as Trash2 } from "@medusajs/icons";
|
|
391
|
-
import {
|
|
358
|
+
import {
|
|
359
|
+
Button,
|
|
360
|
+
Checkbox,
|
|
361
|
+
Container as Container4,
|
|
362
|
+
Heading as Heading4,
|
|
363
|
+
toast as toast2,
|
|
364
|
+
usePrompt as usePrompt2
|
|
365
|
+
} from "@medusajs/ui";
|
|
392
366
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
393
367
|
import { useMemo, useState } from "react";
|
|
394
368
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
@@ -403,16 +377,20 @@ var CampaignPromotionSection = ({
|
|
|
403
377
|
const { t } = useTranslation4();
|
|
404
378
|
const prompt = usePrompt2();
|
|
405
379
|
const columns = useColumns();
|
|
406
|
-
const filters = usePromotionTableFilters()
|
|
407
|
-
|
|
380
|
+
const filters = usePromotionTableFilters().filter(
|
|
381
|
+
(filter) => filter.key !== "campaign_id"
|
|
382
|
+
);
|
|
383
|
+
const { raw, searchParams } = usePromotionTableQuery({
|
|
408
384
|
pageSize: PAGE_SIZE
|
|
409
385
|
});
|
|
410
|
-
const promotions =
|
|
411
|
-
|
|
386
|
+
const { promotions, count, isLoading } = usePromotions({
|
|
387
|
+
...searchParams,
|
|
388
|
+
campaign_id: campaign.id
|
|
389
|
+
});
|
|
412
390
|
const { table } = useDataTable({
|
|
413
391
|
data: promotions ?? [],
|
|
414
392
|
columns,
|
|
415
|
-
count,
|
|
393
|
+
count: count ?? 0,
|
|
416
394
|
getRowId: (row) => row.id,
|
|
417
395
|
enablePagination: true,
|
|
418
396
|
enableRowSelection: true,
|
|
@@ -432,7 +410,7 @@ var CampaignPromotionSection = ({
|
|
|
432
410
|
description: t("campaigns.promotions.remove.description", {
|
|
433
411
|
count: keys.length
|
|
434
412
|
}),
|
|
435
|
-
confirmText: t("actions.
|
|
413
|
+
confirmText: t("actions.remove"),
|
|
436
414
|
cancelText: t("actions.cancel")
|
|
437
415
|
});
|
|
438
416
|
if (!res) {
|
|
@@ -452,6 +430,9 @@ var CampaignPromotionSection = ({
|
|
|
452
430
|
queryClient.invalidateQueries({
|
|
453
431
|
queryKey: promotionsQueryKeys.all
|
|
454
432
|
});
|
|
433
|
+
toast2.success(
|
|
434
|
+
t("campaigns.promotions.toast.removed", { count: keys.length })
|
|
435
|
+
);
|
|
455
436
|
setRowSelection({});
|
|
456
437
|
};
|
|
457
438
|
return /* @__PURE__ */ jsxs4(Container4, { className: "divide-y p-0", children: [
|
|
@@ -465,8 +446,8 @@ var CampaignPromotionSection = ({
|
|
|
465
446
|
table,
|
|
466
447
|
columns,
|
|
467
448
|
pageSize: PAGE_SIZE,
|
|
468
|
-
isLoading
|
|
469
|
-
count,
|
|
449
|
+
isLoading,
|
|
450
|
+
count: count ?? 0,
|
|
470
451
|
navigateTo: (row) => `/promotions/${row.id}`,
|
|
471
452
|
filters,
|
|
472
453
|
search: true,
|
|
@@ -492,6 +473,7 @@ var CampaignPromotionSection = ({
|
|
|
492
473
|
}
|
|
493
474
|
],
|
|
494
475
|
noRecords: {
|
|
476
|
+
title: t("campaigns.promotions.list.noRecordsTitle"),
|
|
495
477
|
message: t("campaigns.promotions.list.noRecordsMessage")
|
|
496
478
|
}
|
|
497
479
|
}
|
|
@@ -518,13 +500,18 @@ var PromotionActions = ({ promotion }) => {
|
|
|
518
500
|
description: t("campaigns.promotions.remove.description", {
|
|
519
501
|
count: 1
|
|
520
502
|
}),
|
|
521
|
-
confirmText: t("actions.
|
|
503
|
+
confirmText: t("actions.remove"),
|
|
522
504
|
cancelText: t("actions.cancel")
|
|
523
505
|
});
|
|
524
506
|
if (!res) {
|
|
525
507
|
return;
|
|
526
508
|
}
|
|
527
|
-
await mutateAsync(
|
|
509
|
+
await mutateAsync(void 0, {
|
|
510
|
+
onSuccess: () => {
|
|
511
|
+
toast2.success(t("campaigns.promotions.toast.removed", { count: 1 }));
|
|
512
|
+
},
|
|
513
|
+
onError: (error) => toast2.error(error.message)
|
|
514
|
+
});
|
|
528
515
|
};
|
|
529
516
|
return /* @__PURE__ */ jsx4(
|
|
530
517
|
ActionMenu,
|
|
@@ -581,7 +568,7 @@ var useColumns = () => {
|
|
|
581
568
|
);
|
|
582
569
|
}
|
|
583
570
|
}),
|
|
584
|
-
...columns,
|
|
571
|
+
...columns.filter((column) => column.id !== "campaign"),
|
|
585
572
|
columnHelper.display({
|
|
586
573
|
id: "actions",
|
|
587
574
|
cell: ({ row }) => {
|
|
@@ -593,86 +580,33 @@ var useColumns = () => {
|
|
|
593
580
|
);
|
|
594
581
|
};
|
|
595
582
|
|
|
596
|
-
// src/pages/campaigns/[id]/_components/campaign-spend/campaign-spend.tsx
|
|
597
|
-
import { CurrencyDollar } from "@medusajs/icons";
|
|
598
|
-
import { Container as Container5, Heading as Heading5, Text as Text3 } from "@medusajs/ui";
|
|
599
|
-
import { Trans as Trans2, useTranslation as useTranslation5 } from "react-i18next";
|
|
600
|
-
import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
|
|
601
|
-
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
602
|
-
var CampaignSpend = ({ campaign }) => {
|
|
603
|
-
const { t } = useTranslation5();
|
|
604
|
-
return /* @__PURE__ */ jsxs5(Container5, { className: "flex flex-col gap-y-4 px-6 py-4", children: [
|
|
605
|
-
/* @__PURE__ */ jsxs5("div", { className: "mb-2 grid grid-cols-[28px_1fr] items-center gap-x-3", children: [
|
|
606
|
-
/* @__PURE__ */ jsx5("div", { className: "bg-ui-bg-base shadow-borders-base flex size-7 items-center justify-center rounded-md", children: /* @__PURE__ */ jsx5("div", { className: "bg-ui-bg-component flex size-6 items-center justify-center rounded-[4px]", children: /* @__PURE__ */ jsx5(CurrencyDollar, { className: "text-ui-fg-subtle" }) }) }),
|
|
607
|
-
/* @__PURE__ */ jsx5(Heading5, { level: "h3", className: "text-ui-fg-subtle font-normal", children: campaign.budget?.type === "spend" ? t("campaigns.fields.total_spend") : t("campaigns.fields.total_used") })
|
|
608
|
-
] }),
|
|
609
|
-
/* @__PURE__ */ jsx5("div", { children: /* @__PURE__ */ jsx5(
|
|
610
|
-
Text3,
|
|
611
|
-
{
|
|
612
|
-
className: "text-ui-fg-subtle border-ui-border-strong border-l-4 pl-3",
|
|
613
|
-
size: "small",
|
|
614
|
-
leading: "compact",
|
|
615
|
-
children: /* @__PURE__ */ jsx5(
|
|
616
|
-
Trans2,
|
|
617
|
-
{
|
|
618
|
-
i18nKey: "campaigns.totalSpend",
|
|
619
|
-
values: {
|
|
620
|
-
amount: campaign?.budget?.used || 0,
|
|
621
|
-
currency: campaign?.budget?.type === "spend" ? campaign?.budget?.currency_code : ""
|
|
622
|
-
},
|
|
623
|
-
components: [
|
|
624
|
-
/* @__PURE__ */ jsx5(
|
|
625
|
-
"span",
|
|
626
|
-
{
|
|
627
|
-
className: "text-ui-fg-base txt-compact-medium-plus text-lg"
|
|
628
|
-
},
|
|
629
|
-
"amount"
|
|
630
|
-
),
|
|
631
|
-
/* @__PURE__ */ jsx5(
|
|
632
|
-
"span",
|
|
633
|
-
{
|
|
634
|
-
className: "text-ui-fg-base txt-compact-medium-plus text-lg"
|
|
635
|
-
},
|
|
636
|
-
"currency"
|
|
637
|
-
)
|
|
638
|
-
]
|
|
639
|
-
}
|
|
640
|
-
)
|
|
641
|
-
}
|
|
642
|
-
) }),
|
|
643
|
-
/* @__PURE__ */ jsx5(DisplayExtensionZone5, { model: "campaign", zone: "spend", data: campaign })
|
|
644
|
-
] });
|
|
645
|
-
};
|
|
646
|
-
|
|
647
583
|
// src/pages/campaigns/[id]/campaign-detail-page.tsx
|
|
648
|
-
import { Fragment, jsx as
|
|
584
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
649
585
|
var Root = ({ children }) => {
|
|
650
586
|
const initialData = useLoaderData();
|
|
651
587
|
const { id } = useParams();
|
|
652
|
-
const { searchParams } = usePromotionTableQuery({});
|
|
653
588
|
const linkQuery = useLinkQuery("campaign", CAMPAIGN_DETAIL_FIELDS);
|
|
654
589
|
const { campaign, isLoading, isError, error } = useCampaign(
|
|
655
590
|
id,
|
|
656
|
-
{ ...
|
|
591
|
+
{ ...linkQuery },
|
|
657
592
|
{
|
|
658
593
|
placeholderData: initialData
|
|
659
594
|
}
|
|
660
595
|
);
|
|
661
596
|
if (isLoading || !campaign) {
|
|
662
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 2, sidebarSections: 2 });
|
|
663
598
|
}
|
|
664
599
|
if (isError) {
|
|
665
600
|
throw error;
|
|
666
601
|
}
|
|
667
|
-
return /* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { hasOutlet: true, data: campaign, children: [
|
|
603
|
+
/* @__PURE__ */ jsx5(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs5(WidgetZone, { id: "campaigns.detail.main", data: campaign, children: [
|
|
604
|
+
/* @__PURE__ */ jsx5(CampaignGeneralSection, { campaign }),
|
|
605
|
+
/* @__PURE__ */ jsx5(CampaignPromotionSection, { campaign })
|
|
671
606
|
] }) }),
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */ jsx6(CampaignBudget, { campaign })
|
|
607
|
+
/* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsxs5(WidgetZone, { id: "campaigns.detail.side", data: campaign, children: [
|
|
608
|
+
/* @__PURE__ */ jsx5(CampaignConfigurationSection, { campaign }),
|
|
609
|
+
/* @__PURE__ */ jsx5(CampaignBudget, { campaign })
|
|
676
610
|
] }) })
|
|
677
611
|
] }) });
|
|
678
612
|
};
|
|
@@ -682,7 +616,6 @@ var CampaignDetailPage = Object.assign(Root, {
|
|
|
682
616
|
MainGeneralSection: CampaignGeneralSection,
|
|
683
617
|
MainPromotionSection: CampaignPromotionSection,
|
|
684
618
|
SidebarConfigurationSection: CampaignConfigurationSection,
|
|
685
|
-
SidebarSpend: CampaignSpend,
|
|
686
619
|
SidebarBudget: CampaignBudget
|
|
687
620
|
});
|
|
688
621
|
export {
|
|
@@ -16,7 +16,7 @@ import "./chunk-FQERBIVS.js";
|
|
|
16
16
|
import {
|
|
17
17
|
_DataTable,
|
|
18
18
|
useDataTable
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6GQLSWOO.js";
|
|
20
20
|
import "./chunk-YN3FGNJM.js";
|
|
21
21
|
import "./chunk-KCHYLLVG.js";
|
|
22
22
|
import "./chunk-3EF54XFY.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import "./chunk-LRD242C7.js";
|
|
27
27
|
import {
|
|
28
28
|
require_dist
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VH3TGSWE.js";
|
|
30
30
|
import {
|
|
31
31
|
Thumbnail
|
|
32
32
|
} from "./chunk-WIYFXWRI.js";
|
|
@@ -41,13 +41,14 @@ import "./chunk-QHQWEERJ.js";
|
|
|
41
41
|
import "./chunk-Y7QKP6QU.js";
|
|
42
42
|
import {
|
|
43
43
|
useFeatureFlags
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-6YQR2AWM.js";
|
|
45
45
|
import "./chunk-K5324KIX.js";
|
|
46
46
|
import "./chunk-FV76G2D7.js";
|
|
47
47
|
import "./chunk-GHDLST2P.js";
|
|
48
48
|
import "./chunk-YVYYOBAE.js";
|
|
49
49
|
import "./chunk-L2NJPDUD.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-7LIENHWP.js";
|
|
51
|
+
import "./chunk-NV2RZAHW.js";
|
|
51
52
|
import "./chunk-MR6REQKT.js";
|
|
52
53
|
import "./chunk-EPSDO2MJ.js";
|
|
53
54
|
import "./chunk-BHEU34FL.js";
|
|
@@ -58,9 +59,10 @@ import "./chunk-J2XUEO2E.js";
|
|
|
58
59
|
import "./chunk-DETQ6IBQ.js";
|
|
59
60
|
import "./chunk-VWPNMEOE.js";
|
|
60
61
|
import "./chunk-O72AIZUN.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-GL3XVUAY.js";
|
|
63
|
+
import "./chunk-AHR2FIMC.js";
|
|
64
|
+
import "./chunk-JYUHDM23.js";
|
|
65
|
+
import "./chunk-7POOMBIN.js";
|
|
64
66
|
import {
|
|
65
67
|
useSalesChannels
|
|
66
68
|
} from "./chunk-4U2BLH45.js";
|