@mercurjs/vendor 2.2.1 → 2.3.0-canary.0
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]-47SUX5X3.js → [id]-3IFUEMOA.js} +12 -9
- package/dist/{[id]-PIB2DEVI.js → [id]-3NM7G2QP.js} +11 -8
- package/dist/[id]-3TCOLUQH.js +197 -0
- package/dist/{[id]-SKU5SFBG.js → [id]-4IWSF6TW.js} +137 -204
- package/dist/{[id]-BPQNQFVE.js → [id]-AMZFAAJ3.js} +75 -124
- package/dist/[id]-C3TB6V2O.js +286 -0
- package/dist/{[id]-NGRV5I2A.js → [id]-HEDNHQ5Z.js} +8 -6
- package/dist/[id]-KFACDZAI.js +949 -0
- package/dist/{[id]-BHU5BSQT.js → [id]-KFRGBNLH.js} +19 -16
- package/dist/{[id]-OE5TUWNF.js → [id]-OVWD6DNG.js} +8 -6
- package/dist/{[id]-RJRAZN3T.js → [id]-PJ2K4O3C.js} +7 -5
- package/dist/{[id]-ZD5HBP2R.js → [id]-ROMWNPJA.js} +13 -10
- package/dist/[id]-UPNI3OCU.js +697 -0
- package/dist/{[id]-YB3DBBXT.js → [id]-YFLQXZGC.js} +12 -9
- package/dist/{[province_id]-CUWKNPBW.js → [province_id]-IM22PLJP.js} +8 -6
- package/dist/{add-YEUSE5QA.js → add-AUSWWCA3.js} +9 -7
- package/dist/{add-MYV5IOGP.js → add-MBCWT6XT.js} +157 -227
- package/dist/{add-customer-groups-Q3F357F2.js → add-customer-groups-3FD754Z2.js} +7 -5
- package/dist/{add-products-WVNYODC6.js → add-products-IS22SHHN.js} +12 -9
- package/dist/{add-promotions-F62YE3BE.js → add-promotions-VDD5PKMN.js} +27 -9
- package/dist/{add-to-campaign-WBSCTSKW.js → add-to-campaign-B3PGGNFA.js} +3 -2
- package/dist/{address-ZMZ4ST5T.js → address-7HSQSXUS.js} +6 -4
- 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-IDLCUHX3.js} +6 -4
- package/dist/{breadcrumb-MXYWEBK6.js → breadcrumb-OXRGEOVL.js} +6 -4
- package/dist/{breadcrumb-JWFTKHLE.js → breadcrumb-RQ52GELM.js} +2 -1
- package/dist/{breadcrumb-QPV566YX.js → breadcrumb-UDSK4EUS.js} +7 -5
- package/dist/breadcrumb-XCPUUZUO.js +26 -0
- 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-UEKRQS5Q.js → chunk-6ECHPZS3.js} +2 -2
- 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-SVYBMLVN.js → chunk-7J2QRH4V.js} +1 -1
- 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-SDFZUBS3.js → chunk-CDZALZ5E.js} +1 -1
- package/dist/{chunk-72HQFLZI.js → chunk-CSEB2RNO.js} +1 -1
- package/dist/{chunk-X6ZQMFCT.js → chunk-DAOSTHVB.js} +44 -25
- 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-3XW55FZY.js → chunk-IYQHEISY.js} +6 -6
- package/dist/chunk-IZI2PKL7.js +27 -0
- package/dist/chunk-JN6MHI6V.js +334 -0
- 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-FEVCBT24.js → chunk-LOSVZJXS.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-GTNCNKTC.js → chunk-NP5TISFX.js} +1 -1
- 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-OKJHUQBY.js → chunk-QSS7ATY3.js} +15 -27
- 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-EJBOBB4B.js → chunk-V3N2Y4OL.js} +46 -46
- package/dist/{chunk-UUBGLS7U.js → chunk-V43BEBDT.js} +187 -35
- 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-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-3MEKABDT.js} +13 -12
- 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-75C65ZIS.js} +6 -5
- package/dist/{create-6IRD2CVC.js → create-A3CQXIRQ.js} +11 -9
- package/dist/{create-LYNWCP2N.js → create-GYNDVCY2.js} +5 -4
- package/dist/create-ICCAEOSA.js +343 -0
- package/dist/{create-5RQ32XPT.js → create-KBDT33O2.js} +287 -287
- package/dist/{create-GEYXN6SW.js → create-L5HMOVY5.js} +6 -4
- package/dist/{create-MFGMTZ5A.js → create-M2W5N6QV.js} +7 -5
- package/dist/{create-NTZH45DW.js → create-NSJGRO4L.js} +13 -11
- package/dist/{create-H77ZUZG5.js → create-O4K6TO4G.js} +9 -7
- package/dist/{create-S7VYYTUD.js → create-PW5L3MJI.js} +9 -7
- package/dist/{create-7SJ5DSQK.js → create-UQ26QTPQ.js} +19 -16
- package/dist/{create-2I3GAX4C.js → create-WIGBFSRH.js} +15 -6
- package/dist/{create-7FT7N2NH.js → create-WPN3OUJU.js} +3 -2
- 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-M4AP65HO.js → edit-32ZGQUWZ.js} +7 -5
- package/dist/{edit-MPOTIGUY.js → edit-3OXHBHY4.js} +22 -38
- package/dist/{edit-2RN3OT27.js → edit-7T2JMZG3.js} +7 -56
- package/dist/{edit-6VJWRZHQ.js → edit-AFWQY3BZ.js} +6 -4
- package/dist/{edit-NB5VN2E4.js → edit-EDXF3T7F.js} +4 -3
- package/dist/edit-GJCXPD5A.js +81 -0
- package/dist/{edit-WHGYNDEB.js → edit-KOLDPZ4H.js} +19 -16
- package/dist/{edit-TIBQEQVV.js → edit-LZFD3RSY.js} +9 -7
- package/dist/{edit-QBUYHSE7.js → edit-QVK3BEPA.js} +7 -5
- package/dist/{edit-EGBVEWXS.js → edit-ZLZR7F33.js} +8 -6
- 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-reservation-LSYQUDYQ.js +294 -0
- package/dist/extension-targets.d.ts +6 -3
- package/dist/{fulfillment-HDU7GATG.js → fulfillment-TVRF5TID.js} +6 -4
- package/dist/{fulfillment-providers-6RZNNT7U.js → fulfillment-providers-TEV23LGB.js} +11 -10
- package/dist/index.css +14 -14
- package/dist/index.js +252 -146
- package/dist/{inventory-XJ2E6DPC.js → inventory-CMIRAJJY.js} +2 -2
- package/dist/{invite-755AJC3M.js → invite-K3R2GRYF.js} +6 -4
- package/dist/{invite-FD2TXZTW.js → invite-ZMIYLOWJ.js} +9 -7
- package/dist/{login-UGKYRKMD.js → login-LG3XH6B2.js} +8 -6
- package/dist/{manage-locations-PRQI5TI4.js → manage-locations-5B4HP6NQ.js} +24 -5
- package/dist/{media-TGFAHFBV.js → media-DY2XDZYT.js} +7 -5
- package/dist/{media-2KEHXPRU.js → media-OGO6M3CP.js} +10 -8
- package/dist/{metadata-BQQFHVKF.js → metadata-AW5Y72BI.js} +6 -4
- package/dist/metadata-HS6CLO4Z.js +69 -0
- package/dist/{metadata-5TVRCKWX.js → metadata-HXXVD3VP.js} +6 -4
- package/dist/{metadata-7JWZ4VFM.js → metadata-TXNUZBPX.js} +6 -4
- package/dist/{metadata-G73TILNE.js → metadata-UVOHT2VF.js} +6 -4
- package/dist/{metadata-4ZZ4ZIWJ.js → metadata-ZBSZL74N.js} +6 -4
- package/dist/{offer-create-page-PPXRYET4.js → offer-create-page-53P65U2V.js} +11 -8
- package/dist/{offer-detail-page-BFGKAS4L.js → offer-detail-page-BGFLDXO7.js} +1 -1
- package/dist/{offer-variant-detail-page-BLHRF4MK.js → offer-variant-detail-page-DCTRZUTM.js} +1 -1
- package/dist/{offers-7I67VSHI.js → offers-5776XUH5.js} +13 -9
- package/dist/{onboarding-7MURQYXX.js → onboarding-ROLIHG3L.js} +6 -4
- package/dist/{orders-D7NZNDUS.js → orders-VA3HNJAY.js} +12 -11
- package/dist/{organization-T6ZTYMMW.js → organization-UH4IUA62.js} +8 -6
- package/dist/pages/index.d.ts +9 -1
- package/dist/pages/index.js +53 -44
- package/dist/{payment-details-UQ65D5AY.js → payment-details-CD4GZEUL.js} +6 -4
- 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-CPPIL627.js → pricing-SWUZSQL3.js} +8 -6
- package/dist/{product-tags-7DTA73YT.js → product-tags-4V65LOJJ.js} +19 -16
- package/dist/{product-types-OB26NF2D.js → product-types-CMI33S32.js} +3 -4
- package/dist/{product-variant-detail-4DDE6RJ5.js → product-variant-detail-NW3LQZE7.js} +6 -4
- package/dist/{product-variant-edit-SAZUI4E3.js → product-variant-edit-MNYFEZND.js} +9 -7
- package/dist/{products-RYXTZFGT.js → products-L2H6HOL2.js} +18 -15
- package/dist/{products-GJ2KTGBZ.js → products-YIF6FPBO.js} +12 -9
- package/dist/{professional-details-UN5B4YDJ.js → professional-details-QO5BWMRD.js} +6 -4
- package/dist/{profile-6MIDTK52.js → profile-2KKBVKAL.js} +6 -4
- package/dist/{promotions-SQ47TCZL.js → promotions-C5YWXVP5.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-SZ2T6QQA.js} +8 -6
- package/dist/reservations-C326XEVA.js +350 -0
- package/dist/{reset-password-C462PDN2.js → reset-password-H66R27K4.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-THSRJ5WS.js} +26 -23
- package/dist/{shipment-6CTA2GHU.js → shipment-X2WWJ3AE.js} +6 -4
- package/dist/{shipping-profile-CFISOMTE.js → shipping-profile-7P3RPEIJ.js} +1 -1
- package/dist/{shipping-profiles-5UAZNYKJ.js → shipping-profiles-JPBRRMPD.js} +8 -6
- package/dist/{stock-465GEUY3.js → stock-UMESDWV5.js} +21 -7
- package/dist/{store-2PQB2XWE.js → store-5YMOSKVT.js} +7 -5
- package/dist/{store-closure-DYW54VHB.js → store-closure-EPGDOV7U.js} +6 -4
- package/dist/{store-select-6A5YR7WH.js → store-select-JEEV4V57.js} +7 -5
- package/dist/{team-GXEBC57M.js → team-R6ARMF73.js} +9 -7
- 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-SQU5UOGE.js +0 -105
- package/dist/{[location_id]-OXNC5E4F.js → [location_id]-IGPM7LDR.js} +1 -1
- package/dist/{chunk-CYE7HVAV.js → chunk-SCJBJQCL.js} +3 -3
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatPercentage
|
|
3
3
|
} from "./chunk-QDPLZDMX.js";
|
|
4
|
+
import {
|
|
5
|
+
BadgeListSummary
|
|
6
|
+
} from "./chunk-QLOJNFUE.js";
|
|
4
7
|
import {
|
|
5
8
|
DateRangeDisplay
|
|
6
9
|
} from "./chunk-BWGPN6XV.js";
|
|
7
10
|
import {
|
|
8
11
|
getPromotionStatus
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NP5TISFX.js";
|
|
10
13
|
import "./chunk-FMFVTERD.js";
|
|
11
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-V43BEBDT.js";
|
|
12
15
|
import {
|
|
13
16
|
TwoColumnPage
|
|
14
17
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -144,62 +147,10 @@ var CampaignSection = ({
|
|
|
144
147
|
|
|
145
148
|
// src/pages/promotions/[id]/_components/promotion-conditions-section/promotion-conditions-section.tsx
|
|
146
149
|
import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
|
|
147
|
-
import { Badge
|
|
148
|
-
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
149
|
-
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
150
|
-
|
|
151
|
-
// src/components/common/badge-list-summary/badge-list-summary.tsx
|
|
152
|
-
import { Badge, Tooltip, clx } from "@medusajs/ui";
|
|
150
|
+
import { Badge, Container as Container2, Heading as Heading2 } from "@medusajs/ui";
|
|
153
151
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
152
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
154
153
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
155
|
-
var BadgeListSummary = ({
|
|
156
|
-
list,
|
|
157
|
-
className,
|
|
158
|
-
inline,
|
|
159
|
-
rounded = false,
|
|
160
|
-
n = 2
|
|
161
|
-
}) => {
|
|
162
|
-
const { t } = useTranslation2();
|
|
163
|
-
const title = t("general.plusCount", {
|
|
164
|
-
count: list.length - n
|
|
165
|
-
});
|
|
166
|
-
return /* @__PURE__ */ jsxs2(
|
|
167
|
-
"div",
|
|
168
|
-
{
|
|
169
|
-
className: clx(
|
|
170
|
-
"text-ui-fg-subtle txt-compact-small gap-x-2 overflow-hidden",
|
|
171
|
-
{
|
|
172
|
-
"inline-flex": inline,
|
|
173
|
-
flex: !inline
|
|
174
|
-
},
|
|
175
|
-
className
|
|
176
|
-
),
|
|
177
|
-
children: [
|
|
178
|
-
list.slice(0, n).map((item) => {
|
|
179
|
-
return /* @__PURE__ */ jsx2(Badge, { rounded: rounded ? "full" : "base", size: "2xsmall", children: item }, item);
|
|
180
|
-
}),
|
|
181
|
-
list.length > n && /* @__PURE__ */ jsx2("div", { className: "whitespace-nowrap", children: /* @__PURE__ */ jsx2(
|
|
182
|
-
Tooltip,
|
|
183
|
-
{
|
|
184
|
-
content: /* @__PURE__ */ jsx2("ul", { children: list.slice(n).map((c) => /* @__PURE__ */ jsx2("li", { children: c }, c)) }),
|
|
185
|
-
children: /* @__PURE__ */ jsx2(
|
|
186
|
-
Badge,
|
|
187
|
-
{
|
|
188
|
-
rounded: rounded ? "full" : "base",
|
|
189
|
-
size: "2xsmall",
|
|
190
|
-
className: "cursor-default whitespace-nowrap",
|
|
191
|
-
children: title
|
|
192
|
-
}
|
|
193
|
-
)
|
|
194
|
-
}
|
|
195
|
-
) })
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
// src/pages/promotions/[id]/_components/promotion-conditions-section/promotion-conditions-section.tsx
|
|
202
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
203
154
|
function RuleBlock({ rule }) {
|
|
204
155
|
const getValuesList = () => {
|
|
205
156
|
if (rule.field_type === "number") {
|
|
@@ -207,9 +158,9 @@ function RuleBlock({ rule }) {
|
|
|
207
158
|
}
|
|
208
159
|
return rule.values?.map((v) => v.label || v.value || String(v)).filter(Boolean) || [];
|
|
209
160
|
};
|
|
210
|
-
return /* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
|
|
161
|
+
return /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-subtle shadow-borders-base align-center flex justify-around rounded-md p-2", children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle txt-compact-xsmall flex items-center whitespace-nowrap", children: [
|
|
162
|
+
/* @__PURE__ */ jsx2(
|
|
163
|
+
Badge,
|
|
213
164
|
{
|
|
214
165
|
size: "2xsmall",
|
|
215
166
|
className: "txt-compact-xsmall-plus tag-neutral-text mx-1 inline-block truncate",
|
|
@@ -217,8 +168,8 @@ function RuleBlock({ rule }) {
|
|
|
217
168
|
},
|
|
218
169
|
"rule-attribute"
|
|
219
170
|
),
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ jsx2("span", { className: "txt-compact-2xsmall mx-1 inline-block", children: rule.operator_label }),
|
|
172
|
+
/* @__PURE__ */ jsx2(
|
|
222
173
|
BadgeListSummary,
|
|
223
174
|
{
|
|
224
175
|
inline: true,
|
|
@@ -232,19 +183,19 @@ var PromotionConditionsSection = ({
|
|
|
232
183
|
rules,
|
|
233
184
|
ruleType
|
|
234
185
|
}) => {
|
|
235
|
-
const { t } =
|
|
186
|
+
const { t } = useTranslation2();
|
|
236
187
|
const translationKey = `promotions.fields.conditions.${ruleType}.title`;
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
188
|
+
return /* @__PURE__ */ jsxs2(Container2, { className: "p-0", children: [
|
|
189
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
190
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx2(Heading2, { children: t(translationKey) }) }),
|
|
191
|
+
/* @__PURE__ */ jsx2(
|
|
241
192
|
ActionMenu,
|
|
242
193
|
{
|
|
243
194
|
groups: [
|
|
244
195
|
{
|
|
245
196
|
actions: [
|
|
246
197
|
{
|
|
247
|
-
icon: /* @__PURE__ */
|
|
198
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
|
|
248
199
|
label: t("actions.edit"),
|
|
249
200
|
to: `${ruleType}/edit`
|
|
250
201
|
}
|
|
@@ -254,8 +205,8 @@ var PromotionConditionsSection = ({
|
|
|
254
205
|
}
|
|
255
206
|
)
|
|
256
207
|
] }),
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
!rules.length && /* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle flex flex-col gap-2 px-6 pb-4 pt-2", children: [
|
|
209
|
+
!rules.length && /* @__PURE__ */ jsx2(
|
|
259
210
|
NoRecords,
|
|
260
211
|
{
|
|
261
212
|
className: "h-[180px]",
|
|
@@ -267,9 +218,9 @@ var PromotionConditionsSection = ({
|
|
|
267
218
|
}
|
|
268
219
|
}
|
|
269
220
|
),
|
|
270
|
-
rules.map((rule) => /* @__PURE__ */
|
|
221
|
+
rules.map((rule) => /* @__PURE__ */ jsx2(RuleBlock, { rule }, `${rule.id}-${rule.attribute}`))
|
|
271
222
|
] }),
|
|
272
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ jsx2(
|
|
273
224
|
DisplayExtensionZone2,
|
|
274
225
|
{
|
|
275
226
|
model: "promotion",
|
|
@@ -283,7 +234,7 @@ var PromotionConditionsSection = ({
|
|
|
283
234
|
// src/pages/promotions/[id]/_components/promotion-general-section/promotion-general-section.tsx
|
|
284
235
|
import { PencilSquare as PencilSquare3, Trash } from "@medusajs/icons";
|
|
285
236
|
import {
|
|
286
|
-
Badge as
|
|
237
|
+
Badge as Badge2,
|
|
287
238
|
Container as Container3,
|
|
288
239
|
Copy,
|
|
289
240
|
Heading as Heading3,
|
|
@@ -291,7 +242,7 @@ import {
|
|
|
291
242
|
Text as Text2,
|
|
292
243
|
usePrompt
|
|
293
244
|
} from "@medusajs/ui";
|
|
294
|
-
import { useTranslation as
|
|
245
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
295
246
|
import { useNavigate } from "react-router-dom";
|
|
296
247
|
import { DisplayExtensionZone as DisplayExtensionZone3, DisplayField } from "@mercurjs/dashboard-shared";
|
|
297
248
|
|
|
@@ -305,7 +256,7 @@ var formatCurrency = (amount, currency) => {
|
|
|
305
256
|
};
|
|
306
257
|
|
|
307
258
|
// src/pages/promotions/[id]/_components/promotion-general-section/promotion-general-section.tsx
|
|
308
|
-
import { jsx as
|
|
259
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
309
260
|
function getTypeLabelKey(promotion) {
|
|
310
261
|
if (promotion.type === "buyget") {
|
|
311
262
|
return "promotions.form.type.buyget.title";
|
|
@@ -338,7 +289,7 @@ function getDisplayValue(promotion) {
|
|
|
338
289
|
var PromotionGeneralSection = ({
|
|
339
290
|
promotion
|
|
340
291
|
}) => {
|
|
341
|
-
const { t } =
|
|
292
|
+
const { t } = useTranslation3();
|
|
342
293
|
const prompt = usePrompt();
|
|
343
294
|
const navigate = useNavigate();
|
|
344
295
|
const { mutateAsync } = useDeletePromotion(promotion.id);
|
|
@@ -366,28 +317,28 @@ var PromotionGeneralSection = ({
|
|
|
366
317
|
const typeLabelKey = getTypeLabelKey(promotion);
|
|
367
318
|
const usageLimit = promotion.limit;
|
|
368
319
|
const [statusColor, statusText] = getPromotionStatus(promotion);
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
/* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
|
|
321
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
322
|
+
/* @__PURE__ */ jsx3("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx3(DisplayField, { model: "promotion", zone: "general", id: "code", data: promotion, children: /* @__PURE__ */ jsx3(Heading3, { children: promotion.code }) }) }),
|
|
323
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-4", children: [
|
|
324
|
+
/* @__PURE__ */ jsx3(
|
|
374
325
|
DisplayField,
|
|
375
326
|
{
|
|
376
327
|
model: "promotion",
|
|
377
328
|
zone: "general",
|
|
378
329
|
id: "status",
|
|
379
330
|
data: promotion,
|
|
380
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ jsx3(StatusBadge, { color: statusColor, children: statusText })
|
|
381
332
|
}
|
|
382
333
|
),
|
|
383
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ jsx3(
|
|
384
335
|
ActionMenu,
|
|
385
336
|
{
|
|
386
337
|
groups: [
|
|
387
338
|
{
|
|
388
339
|
actions: [
|
|
389
340
|
{
|
|
390
|
-
icon: /* @__PURE__ */
|
|
341
|
+
icon: /* @__PURE__ */ jsx3(PencilSquare3, {}),
|
|
391
342
|
label: t("actions.edit"),
|
|
392
343
|
to: `/promotions/${promotion.id}/edit`
|
|
393
344
|
}
|
|
@@ -396,7 +347,7 @@ var PromotionGeneralSection = ({
|
|
|
396
347
|
{
|
|
397
348
|
actions: [
|
|
398
349
|
{
|
|
399
|
-
icon: /* @__PURE__ */
|
|
350
|
+
icon: /* @__PURE__ */ jsx3(Trash, {}),
|
|
400
351
|
label: t("actions.delete"),
|
|
401
352
|
onClick: handleDelete
|
|
402
353
|
}
|
|
@@ -407,40 +358,40 @@ var PromotionGeneralSection = ({
|
|
|
407
358
|
)
|
|
408
359
|
] })
|
|
409
360
|
] }),
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ jsx3(DisplayField, { model: "promotion", zone: "general", id: "type", data: promotion, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
362
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.type") }),
|
|
363
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", className: "text-pretty", children: typeLabelKey ? t(typeLabelKey) : "-" })
|
|
413
364
|
] }) }),
|
|
414
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ jsx3(
|
|
415
366
|
DisplayField,
|
|
416
367
|
{
|
|
417
368
|
model: "promotion",
|
|
418
369
|
zone: "general",
|
|
419
370
|
id: "is_automatic",
|
|
420
371
|
data: promotion,
|
|
421
|
-
children: /* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
373
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.method") }),
|
|
374
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", className: "text-pretty", children: promotion.is_automatic ? t("promotions.form.method.automatic.title") : t("promotions.form.method.code.title") })
|
|
424
375
|
] })
|
|
425
376
|
}
|
|
426
377
|
),
|
|
427
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ jsx3(
|
|
428
379
|
DisplayField,
|
|
429
380
|
{
|
|
430
381
|
model: "promotion",
|
|
431
382
|
zone: "general",
|
|
432
383
|
id: "code_value",
|
|
433
384
|
data: promotion,
|
|
434
|
-
children: /* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
385
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
386
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", children: t("fields.code") }),
|
|
387
|
+
/* @__PURE__ */ jsx3(
|
|
437
388
|
Copy,
|
|
438
389
|
{
|
|
439
390
|
content: promotion.code,
|
|
440
391
|
className: "text-ui-tag-neutral-text",
|
|
441
392
|
asChild: true,
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
|
|
393
|
+
children: /* @__PURE__ */ jsx3(
|
|
394
|
+
Badge2,
|
|
444
395
|
{
|
|
445
396
|
size: "2xsmall",
|
|
446
397
|
rounded: "full",
|
|
@@ -453,36 +404,36 @@ var PromotionGeneralSection = ({
|
|
|
453
404
|
] })
|
|
454
405
|
}
|
|
455
406
|
),
|
|
456
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ jsx3(
|
|
457
408
|
DisplayField,
|
|
458
409
|
{
|
|
459
410
|
model: "promotion",
|
|
460
411
|
zone: "general",
|
|
461
412
|
id: "tax_inclusive",
|
|
462
413
|
data: promotion,
|
|
463
|
-
children: /* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
415
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.taxInclusive") }),
|
|
416
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", className: "text-pretty", children: promotion.is_tax_inclusive ? t("general.yes") : t("general.no") })
|
|
466
417
|
] })
|
|
467
418
|
}
|
|
468
419
|
),
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
promotion?.application_method?.type === "fixed" && /* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ jsx3(DisplayField, { model: "promotion", zone: "general", id: "value", data: promotion, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
421
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.value") }),
|
|
422
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
|
|
423
|
+
/* @__PURE__ */ jsx3(Text2, { className: "inline", size: "small", leading: "compact", children: displayValue || "-" }),
|
|
424
|
+
promotion?.application_method?.type === "fixed" && /* @__PURE__ */ jsx3(Badge2, { size: "2xsmall", rounded: "full", children: promotion?.application_method?.currency_code?.toUpperCase() })
|
|
474
425
|
] })
|
|
475
426
|
] }) }),
|
|
476
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ jsx3(
|
|
477
428
|
DisplayField,
|
|
478
429
|
{
|
|
479
430
|
model: "promotion",
|
|
480
431
|
zone: "general",
|
|
481
432
|
id: "allocation",
|
|
482
433
|
data: promotion,
|
|
483
|
-
children: /* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
/* @__PURE__ */
|
|
434
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
435
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.allocation") }),
|
|
436
|
+
/* @__PURE__ */ jsx3(
|
|
486
437
|
Text2,
|
|
487
438
|
{
|
|
488
439
|
size: "small",
|
|
@@ -494,20 +445,20 @@ var PromotionGeneralSection = ({
|
|
|
494
445
|
] })
|
|
495
446
|
}
|
|
496
447
|
),
|
|
497
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ jsx3(
|
|
498
449
|
DisplayField,
|
|
499
450
|
{
|
|
500
451
|
model: "promotion",
|
|
501
452
|
zone: "general",
|
|
502
453
|
id: "usage_limit",
|
|
503
454
|
data: promotion,
|
|
504
|
-
children: /* @__PURE__ */
|
|
505
|
-
/* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
456
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.usageLimit") }),
|
|
457
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", className: "text-pretty", children: usageLimit ?? t("promotions.fields.unlimited") })
|
|
507
458
|
] })
|
|
508
459
|
}
|
|
509
460
|
),
|
|
510
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ jsx3(
|
|
511
462
|
DisplayExtensionZone3,
|
|
512
463
|
{
|
|
513
464
|
model: "promotion",
|
|
@@ -530,7 +481,7 @@ var PromotionGeneralSection = ({
|
|
|
530
481
|
};
|
|
531
482
|
|
|
532
483
|
// src/pages/promotions/[id]/promotion-detail-page.tsx
|
|
533
|
-
import { Fragment, jsx as
|
|
484
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
534
485
|
var Root = ({ children }) => {
|
|
535
486
|
const initialData = useLoaderData();
|
|
536
487
|
const { id } = useParams2();
|
|
@@ -544,19 +495,19 @@ var Root = ({ children }) => {
|
|
|
544
495
|
const { rules: targetRules } = usePromotionRules(id, "target-rules", query);
|
|
545
496
|
const { rules: buyRules } = usePromotionRules(id, "buy-rules", query);
|
|
546
497
|
if (isLoading || !promotion)
|
|
547
|
-
return /* @__PURE__ */
|
|
548
|
-
return /* @__PURE__ */
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ jsx4(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1, showJSON: true });
|
|
499
|
+
return /* @__PURE__ */ jsx4(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs4(TwoColumnPage, { data: promotion, hasOutlet: true, children: [
|
|
500
|
+
/* @__PURE__ */ jsx4(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs4(WidgetZone, { id: "promotions.detail.main", data: promotion, children: [
|
|
501
|
+
/* @__PURE__ */ jsx4(PromotionGeneralSection, { promotion }),
|
|
502
|
+
/* @__PURE__ */ jsx4(PromotionConditionsSection, { rules: rules || [], ruleType: "rules" }),
|
|
503
|
+
/* @__PURE__ */ jsx4(
|
|
553
504
|
PromotionConditionsSection,
|
|
554
505
|
{
|
|
555
506
|
rules: targetRules || [],
|
|
556
507
|
ruleType: "target-rules"
|
|
557
508
|
}
|
|
558
509
|
),
|
|
559
|
-
promotion.type === "buyget" && /* @__PURE__ */
|
|
510
|
+
promotion.type === "buyget" && /* @__PURE__ */ jsx4(
|
|
560
511
|
PromotionConditionsSection,
|
|
561
512
|
{
|
|
562
513
|
rules: buyRules || [],
|
|
@@ -564,7 +515,7 @@ var Root = ({ children }) => {
|
|
|
564
515
|
}
|
|
565
516
|
)
|
|
566
517
|
] }) }),
|
|
567
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ jsx4(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx4(WidgetZone, { id: "promotions.detail.side", data: promotion, children: /* @__PURE__ */ jsx4(
|
|
568
519
|
CampaignSection,
|
|
569
520
|
{
|
|
570
521
|
campaign: promotion.campaign,
|