@heycater/qualification-funnel 1.19.20 → 1.19.22
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/heycater-funnel.iife.js +125 -97
- package/dist/index.cjs.js +135 -107
- package/dist/index.esm.js +47 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -9532,7 +9532,7 @@ const EmbeddedQuestionLayout = ({
|
|
|
9532
9532
|
title,
|
|
9533
9533
|
subtitle,
|
|
9534
9534
|
content,
|
|
9535
|
-
containerSize
|
|
9535
|
+
containerSize,
|
|
9536
9536
|
disableGutters,
|
|
9537
9537
|
answerContainerSize = 826,
|
|
9538
9538
|
side,
|
|
@@ -9541,6 +9541,7 @@ const EmbeddedQuestionLayout = ({
|
|
|
9541
9541
|
...boxProps
|
|
9542
9542
|
}) => {
|
|
9543
9543
|
const isFullscreen = mode === "fullscreen";
|
|
9544
|
+
const effectiveContainerSize = containerSize ?? (isFullscreen ? "md" : "sm");
|
|
9544
9545
|
const { state } = useQualification();
|
|
9545
9546
|
const isMobile = useBreakpointDown("sm");
|
|
9546
9547
|
if (state.status !== QUALIFICATION_STATUS.answered && state.status !== QUALIFICATION_STATUS.answering && state.status !== QUALIFICATION_STATUS.qualifiedForRequest) {
|
|
@@ -9553,7 +9554,7 @@ const EmbeddedQuestionLayout = ({
|
|
|
9553
9554
|
return /* @__PURE__ */ jsxs(
|
|
9554
9555
|
Container,
|
|
9555
9556
|
{
|
|
9556
|
-
size:
|
|
9557
|
+
size: effectiveContainerSize,
|
|
9557
9558
|
disableGutters,
|
|
9558
9559
|
...isFullscreen ? { style: { display: "flex", flexDirection: "column", flexGrow: 1 } } : {},
|
|
9559
9560
|
...boxProps,
|
|
@@ -9704,6 +9705,10 @@ const FullscreenTitle = styled.h2`
|
|
|
9704
9705
|
${({ theme }) => theme.breakpoints.up("md")} {
|
|
9705
9706
|
font-size: 30px;
|
|
9706
9707
|
}
|
|
9708
|
+
|
|
9709
|
+
${({ theme }) => theme.breakpoints.up("lg")} {
|
|
9710
|
+
font-size: 34px;
|
|
9711
|
+
}
|
|
9707
9712
|
`;
|
|
9708
9713
|
const StickyFooter = styled.div`
|
|
9709
9714
|
position: sticky;
|
|
@@ -10264,6 +10269,20 @@ function trackOptimeleonConversion(eventName, serviceType) {
|
|
|
10264
10269
|
console.log("[Optimeleon Debug] window.optimeleon not available");
|
|
10265
10270
|
}
|
|
10266
10271
|
}
|
|
10272
|
+
function trackGtagConversion(eventName, params) {
|
|
10273
|
+
if (typeof window === "undefined") return;
|
|
10274
|
+
if (window.gtag) {
|
|
10275
|
+
try {
|
|
10276
|
+
window.gtag("event", eventName, {
|
|
10277
|
+
...params,
|
|
10278
|
+
transport_type: "beacon",
|
|
10279
|
+
send_to: getConfig().googleTagId || void 0
|
|
10280
|
+
});
|
|
10281
|
+
} catch (error) {
|
|
10282
|
+
console.error("[gtag] Failed to send event:", error);
|
|
10283
|
+
}
|
|
10284
|
+
}
|
|
10285
|
+
}
|
|
10267
10286
|
function serializeAnswerValue(value) {
|
|
10268
10287
|
if (value === void 0) return null;
|
|
10269
10288
|
if (value === null) return null;
|
|
@@ -10544,6 +10563,11 @@ const TilesWrapper = styled(Box)`
|
|
|
10544
10563
|
flex-wrap: wrap;
|
|
10545
10564
|
justify-content: center;
|
|
10546
10565
|
}
|
|
10566
|
+
|
|
10567
|
+
${({ theme }) => theme.breakpoints.up("lg")} {
|
|
10568
|
+
max-width: 1200px;
|
|
10569
|
+
gap: ${({ theme, $size }) => $size === "sm" ? theme.spacing(2) : theme.spacing(3)}px;
|
|
10570
|
+
}
|
|
10547
10571
|
`;
|
|
10548
10572
|
const StyledTileTypography = styled(Typography)`
|
|
10549
10573
|
line-height: 172.5%;
|
|
@@ -11477,6 +11501,11 @@ const ServiceTile = styled(Tile)`
|
|
|
11477
11501
|
flex-shrink: 0;
|
|
11478
11502
|
gap: ${({ theme }) => theme.spacing(1)}px;
|
|
11479
11503
|
}
|
|
11504
|
+
|
|
11505
|
+
${({ theme }) => theme.breakpoints.up("lg")} {
|
|
11506
|
+
height: 220px;
|
|
11507
|
+
width: 220px;
|
|
11508
|
+
}
|
|
11480
11509
|
`;
|
|
11481
11510
|
const IconWrapper$2 = styled(Box)`
|
|
11482
11511
|
min-width: 32px;
|
|
@@ -11489,6 +11518,11 @@ const IconWrapper$2 = styled(Box)`
|
|
|
11489
11518
|
height: 40px;
|
|
11490
11519
|
font-size: 36px;
|
|
11491
11520
|
}
|
|
11521
|
+
|
|
11522
|
+
${({ theme }) => theme.breakpoints.up("lg")} {
|
|
11523
|
+
height: 48px;
|
|
11524
|
+
font-size: 42px;
|
|
11525
|
+
}
|
|
11492
11526
|
`;
|
|
11493
11527
|
const ServiceTileLabel = styled(Typography)`
|
|
11494
11528
|
font-size: 11px;
|
|
@@ -11498,6 +11532,10 @@ const ServiceTileLabel = styled(Typography)`
|
|
|
11498
11532
|
${({ theme }) => theme.breakpoints.up("sm")} {
|
|
11499
11533
|
font-size: 15px;
|
|
11500
11534
|
}
|
|
11535
|
+
|
|
11536
|
+
${({ theme }) => theme.breakpoints.up("lg")} {
|
|
11537
|
+
font-size: 16px;
|
|
11538
|
+
}
|
|
11501
11539
|
`;
|
|
11502
11540
|
const SubtitleText = styled(Typography)`
|
|
11503
11541
|
font-size: 9px;
|
|
@@ -11509,6 +11547,11 @@ const SubtitleText = styled(Typography)`
|
|
|
11509
11547
|
${({ theme }) => theme.breakpoints.up("sm")} {
|
|
11510
11548
|
font-size: 12px;
|
|
11511
11549
|
}
|
|
11550
|
+
|
|
11551
|
+
${({ theme }) => theme.breakpoints.up("lg")} {
|
|
11552
|
+
font-size: 13px;
|
|
11553
|
+
max-width: 180px;
|
|
11554
|
+
}
|
|
11512
11555
|
`;
|
|
11513
11556
|
const ICON_BASE_PATH = "/artifacts/icons/catering_category";
|
|
11514
11557
|
const getIconUrl = (name) => getAssetUrl(`${ICON_BASE_PATH}/${name}.svg`);
|
|
@@ -26948,7 +26991,7 @@ function RequestForm({ header = null }) {
|
|
|
26948
26991
|
trackCompleted(funnelContextRef.current);
|
|
26949
26992
|
console.log("[Optimeleon Debug] Lead-only flow - tracking funnel_completed with:", effectiveServiceType);
|
|
26950
26993
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
26951
|
-
|
|
26994
|
+
trackGtagConversion("submit_qf_request");
|
|
26952
26995
|
return;
|
|
26953
26996
|
} else {
|
|
26954
26997
|
console.error("[HeyCater Funnel] Lead submission failed. Result:", response);
|
|
@@ -27000,7 +27043,7 @@ function RequestForm({ header = null }) {
|
|
|
27000
27043
|
trackCompleted(funnelContextRef.current);
|
|
27001
27044
|
console.log("[Optimeleon Debug] Regular flow - tracking funnel_completed with:", effectiveServiceType);
|
|
27002
27045
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
27003
|
-
|
|
27046
|
+
trackGtagConversion("submit_qf_request");
|
|
27004
27047
|
actions.setRequest(values2);
|
|
27005
27048
|
redirectToCustomerAccountRequest(redirectRoute);
|
|
27006
27049
|
};
|