@heycater/qualification-funnel 1.19.18 → 1.19.20
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.css +1 -1
- package/dist/heycater-funnel.iife.js +25 -25
- package/dist/index.cjs.js +61 -61
- package/dist/index.esm.js +144 -119
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -4334,6 +4334,7 @@ const DEFAULT_CONFIG = {
|
|
|
4334
4334
|
host: "https://www.heycater.com",
|
|
4335
4335
|
graphqlEndpoint: "https://api.heycater.com/graphql",
|
|
4336
4336
|
googleMapsApiKey: "",
|
|
4337
|
+
googleTagId: "",
|
|
4337
4338
|
algoliaAppId: "",
|
|
4338
4339
|
algoliaSearchApiKey: "",
|
|
4339
4340
|
salesforceWebToLeadOid: "",
|
|
@@ -10220,6 +10221,22 @@ function trackStarted(context, initialStepId) {
|
|
|
10220
10221
|
captureEvent("qf_v14_started", properties);
|
|
10221
10222
|
trackOptimeleonConversion("funnel_started");
|
|
10222
10223
|
}
|
|
10224
|
+
function identifyUser(userId) {
|
|
10225
|
+
if (typeof window === "undefined") return;
|
|
10226
|
+
const { googleTagId } = getConfig();
|
|
10227
|
+
if (window.gtag && googleTagId) {
|
|
10228
|
+
try {
|
|
10229
|
+
window.gtag("config", googleTagId, { user_id: userId });
|
|
10230
|
+
} catch (error) {
|
|
10231
|
+
console.error("[gtag] Failed to identify user:", error);
|
|
10232
|
+
}
|
|
10233
|
+
}
|
|
10234
|
+
}
|
|
10235
|
+
function pushDataLayer(userId) {
|
|
10236
|
+
if (typeof window === "undefined") return;
|
|
10237
|
+
window.dataLayer = window.dataLayer || [];
|
|
10238
|
+
window.dataLayer.push({ userId });
|
|
10239
|
+
}
|
|
10223
10240
|
function trackOptimeleonConversion(eventName, serviceType) {
|
|
10224
10241
|
if (typeof window === "undefined") return;
|
|
10225
10242
|
console.log("[Optimeleon Debug] trackOptimeleonConversion called", {
|
|
@@ -12492,7 +12509,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
12492
12509
|
var ys = arrObjKeys(obj, inspect2);
|
|
12493
12510
|
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
12494
12511
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
12495
|
-
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
12512
|
+
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
|
|
12496
12513
|
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
12497
12514
|
var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
|
|
12498
12515
|
if (ys.length === 0) {
|
|
@@ -12517,25 +12534,25 @@ function canTrustToString(obj) {
|
|
|
12517
12534
|
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
12518
12535
|
}
|
|
12519
12536
|
function isArray$3(obj) {
|
|
12520
|
-
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
12537
|
+
return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
|
|
12521
12538
|
}
|
|
12522
12539
|
function isDate(obj) {
|
|
12523
|
-
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
12540
|
+
return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
|
|
12524
12541
|
}
|
|
12525
12542
|
function isRegExp$1(obj) {
|
|
12526
|
-
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
12543
|
+
return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
12527
12544
|
}
|
|
12528
12545
|
function isError(obj) {
|
|
12529
|
-
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
12546
|
+
return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
|
|
12530
12547
|
}
|
|
12531
12548
|
function isString(obj) {
|
|
12532
|
-
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
12549
|
+
return toStr$1(obj) === "[object String]" && canTrustToString(obj);
|
|
12533
12550
|
}
|
|
12534
12551
|
function isNumber(obj) {
|
|
12535
|
-
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
12552
|
+
return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
|
|
12536
12553
|
}
|
|
12537
12554
|
function isBoolean(obj) {
|
|
12538
|
-
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
12555
|
+
return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
12539
12556
|
}
|
|
12540
12557
|
function isSymbol(obj) {
|
|
12541
12558
|
if (hasShammedSymbols) {
|
|
@@ -12571,7 +12588,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
12571
12588
|
function has$4(obj, key) {
|
|
12572
12589
|
return hasOwn$1.call(obj, key);
|
|
12573
12590
|
}
|
|
12574
|
-
function toStr(obj) {
|
|
12591
|
+
function toStr$1(obj) {
|
|
12575
12592
|
return objectToString.call(obj);
|
|
12576
12593
|
}
|
|
12577
12594
|
function nameOf(f) {
|
|
@@ -12880,7 +12897,7 @@ var syntax = SyntaxError;
|
|
|
12880
12897
|
var uri = URIError;
|
|
12881
12898
|
var abs$1 = Math.abs;
|
|
12882
12899
|
var floor$1 = Math.floor;
|
|
12883
|
-
var max$
|
|
12900
|
+
var max$2 = Math.max;
|
|
12884
12901
|
var min$1 = Math.min;
|
|
12885
12902
|
var pow$1 = Math.pow;
|
|
12886
12903
|
var round$2 = Math.round;
|
|
@@ -13009,99 +13026,78 @@ function requireObject_getPrototypeOf() {
|
|
|
13009
13026
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
13010
13027
|
return Object_getPrototypeOf;
|
|
13011
13028
|
}
|
|
13012
|
-
var
|
|
13013
|
-
var
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
var
|
|
13018
|
-
var
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
var
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
}
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13029
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
13030
|
+
var toStr = Object.prototype.toString;
|
|
13031
|
+
var max$1 = Math.max;
|
|
13032
|
+
var funcType = "[object Function]";
|
|
13033
|
+
var concatty = function concatty2(a3, b2) {
|
|
13034
|
+
var arr = [];
|
|
13035
|
+
for (var i2 = 0; i2 < a3.length; i2 += 1) {
|
|
13036
|
+
arr[i2] = a3[i2];
|
|
13037
|
+
}
|
|
13038
|
+
for (var j = 0; j < b2.length; j += 1) {
|
|
13039
|
+
arr[j + a3.length] = b2[j];
|
|
13040
|
+
}
|
|
13041
|
+
return arr;
|
|
13042
|
+
};
|
|
13043
|
+
var slicy = function slicy2(arrLike, offset2) {
|
|
13044
|
+
var arr = [];
|
|
13045
|
+
for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
|
|
13046
|
+
arr[j] = arrLike[i2];
|
|
13047
|
+
}
|
|
13048
|
+
return arr;
|
|
13049
|
+
};
|
|
13050
|
+
var joiny = function(arr, joiner) {
|
|
13051
|
+
var str = "";
|
|
13052
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
13053
|
+
str += arr[i2];
|
|
13054
|
+
if (i2 + 1 < arr.length) {
|
|
13055
|
+
str += joiner;
|
|
13035
13056
|
}
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13057
|
+
}
|
|
13058
|
+
return str;
|
|
13059
|
+
};
|
|
13060
|
+
var implementation$1 = function bind(that) {
|
|
13061
|
+
var target = this;
|
|
13062
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
13063
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
13064
|
+
}
|
|
13065
|
+
var args = slicy(arguments, 1);
|
|
13066
|
+
var bound;
|
|
13067
|
+
var binder = function() {
|
|
13068
|
+
if (this instanceof bound) {
|
|
13069
|
+
var result = target.apply(
|
|
13070
|
+
this,
|
|
13071
|
+
concatty(args, arguments)
|
|
13072
|
+
);
|
|
13073
|
+
if (Object(result) === result) {
|
|
13074
|
+
return result;
|
|
13044
13075
|
}
|
|
13076
|
+
return this;
|
|
13045
13077
|
}
|
|
13046
|
-
return
|
|
13078
|
+
return target.apply(
|
|
13079
|
+
that,
|
|
13080
|
+
concatty(args, arguments)
|
|
13081
|
+
);
|
|
13047
13082
|
};
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
var
|
|
13056
|
-
if (this instanceof bound) {
|
|
13057
|
-
var result = target.apply(
|
|
13058
|
-
this,
|
|
13059
|
-
concatty(args, arguments)
|
|
13060
|
-
);
|
|
13061
|
-
if (Object(result) === result) {
|
|
13062
|
-
return result;
|
|
13063
|
-
}
|
|
13064
|
-
return this;
|
|
13065
|
-
}
|
|
13066
|
-
return target.apply(
|
|
13067
|
-
that,
|
|
13068
|
-
concatty(args, arguments)
|
|
13069
|
-
);
|
|
13083
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
13084
|
+
var boundArgs = [];
|
|
13085
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
13086
|
+
boundArgs[i2] = "$" + i2;
|
|
13087
|
+
}
|
|
13088
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
13089
|
+
if (target.prototype) {
|
|
13090
|
+
var Empty = function Empty2() {
|
|
13070
13091
|
};
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
Empty.prototype = target.prototype;
|
|
13081
|
-
bound.prototype = new Empty();
|
|
13082
|
-
Empty.prototype = null;
|
|
13083
|
-
}
|
|
13084
|
-
return bound;
|
|
13085
|
-
};
|
|
13086
|
-
return implementation;
|
|
13087
|
-
}
|
|
13088
|
-
var functionBind;
|
|
13089
|
-
var hasRequiredFunctionBind;
|
|
13090
|
-
function requireFunctionBind() {
|
|
13091
|
-
if (hasRequiredFunctionBind) return functionBind;
|
|
13092
|
-
hasRequiredFunctionBind = 1;
|
|
13093
|
-
var implementation2 = requireImplementation();
|
|
13094
|
-
functionBind = Function.prototype.bind || implementation2;
|
|
13095
|
-
return functionBind;
|
|
13096
|
-
}
|
|
13097
|
-
var functionCall;
|
|
13098
|
-
var hasRequiredFunctionCall;
|
|
13099
|
-
function requireFunctionCall() {
|
|
13100
|
-
if (hasRequiredFunctionCall) return functionCall;
|
|
13101
|
-
hasRequiredFunctionCall = 1;
|
|
13102
|
-
functionCall = Function.prototype.call;
|
|
13103
|
-
return functionCall;
|
|
13104
|
-
}
|
|
13092
|
+
Empty.prototype = target.prototype;
|
|
13093
|
+
bound.prototype = new Empty();
|
|
13094
|
+
Empty.prototype = null;
|
|
13095
|
+
}
|
|
13096
|
+
return bound;
|
|
13097
|
+
};
|
|
13098
|
+
var implementation = implementation$1;
|
|
13099
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
13100
|
+
var functionCall = Function.prototype.call;
|
|
13105
13101
|
var functionApply;
|
|
13106
13102
|
var hasRequiredFunctionApply;
|
|
13107
13103
|
function requireFunctionApply() {
|
|
@@ -13111,14 +13107,14 @@ function requireFunctionApply() {
|
|
|
13111
13107
|
return functionApply;
|
|
13112
13108
|
}
|
|
13113
13109
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
13114
|
-
var bind$2 =
|
|
13110
|
+
var bind$2 = functionBind;
|
|
13115
13111
|
var $apply$1 = requireFunctionApply();
|
|
13116
|
-
var $call$2 =
|
|
13112
|
+
var $call$2 = functionCall;
|
|
13117
13113
|
var $reflectApply = reflectApply;
|
|
13118
13114
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
13119
|
-
var bind$1 =
|
|
13115
|
+
var bind$1 = functionBind;
|
|
13120
13116
|
var $TypeError$4 = type;
|
|
13121
|
-
var $call$1 =
|
|
13117
|
+
var $call$1 = functionCall;
|
|
13122
13118
|
var $actualApply = actualApply;
|
|
13123
13119
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
13124
13120
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -13184,8 +13180,8 @@ function requireHasown() {
|
|
|
13184
13180
|
hasRequiredHasown = 1;
|
|
13185
13181
|
var call = Function.prototype.call;
|
|
13186
13182
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
13187
|
-
var
|
|
13188
|
-
hasown =
|
|
13183
|
+
var bind3 = functionBind;
|
|
13184
|
+
hasown = bind3.call(call, $hasOwn);
|
|
13189
13185
|
return hasown;
|
|
13190
13186
|
}
|
|
13191
13187
|
var undefined$1;
|
|
@@ -13199,7 +13195,7 @@ var $TypeError$3 = type;
|
|
|
13199
13195
|
var $URIError = uri;
|
|
13200
13196
|
var abs = abs$1;
|
|
13201
13197
|
var floor = floor$1;
|
|
13202
|
-
var max = max$
|
|
13198
|
+
var max = max$2;
|
|
13203
13199
|
var min = min$1;
|
|
13204
13200
|
var pow = pow$1;
|
|
13205
13201
|
var round$1 = round$2;
|
|
@@ -13233,7 +13229,7 @@ var getProto = requireGetProto();
|
|
|
13233
13229
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
13234
13230
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
13235
13231
|
var $apply = requireFunctionApply();
|
|
13236
|
-
var $call =
|
|
13232
|
+
var $call = functionCall;
|
|
13237
13233
|
var needsEval = {};
|
|
13238
13234
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
13239
13235
|
var INTRINSICS = {
|
|
@@ -13404,13 +13400,13 @@ var LEGACY_ALIASES = {
|
|
|
13404
13400
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
13405
13401
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
13406
13402
|
};
|
|
13407
|
-
var
|
|
13403
|
+
var bind2 = functionBind;
|
|
13408
13404
|
var hasOwn = requireHasown();
|
|
13409
|
-
var $concat =
|
|
13410
|
-
var $spliceApply =
|
|
13411
|
-
var $replace =
|
|
13412
|
-
var $strSlice =
|
|
13413
|
-
var $exec =
|
|
13405
|
+
var $concat = bind2.call($call, Array.prototype.concat);
|
|
13406
|
+
var $spliceApply = bind2.call($apply, Array.prototype.splice);
|
|
13407
|
+
var $replace = bind2.call($call, String.prototype.replace);
|
|
13408
|
+
var $strSlice = bind2.call($call, String.prototype.slice);
|
|
13409
|
+
var $exec = bind2.call($call, RegExp.prototype.exec);
|
|
13414
13410
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
13415
13411
|
var reEscapeChar = /\\(\\)?/g;
|
|
13416
13412
|
var stringToPath = function stringToPath2(string2) {
|
|
@@ -14427,7 +14423,7 @@ const redirectToMarketplace = (url) => {
|
|
|
14427
14423
|
const redirectToCustomerAccountRequest = (path = "/") => {
|
|
14428
14424
|
window.location.href = `${getConfig().customerAppHost}${path}`;
|
|
14429
14425
|
};
|
|
14430
|
-
const getCookie = (name) => {
|
|
14426
|
+
const getCookie$1 = (name) => {
|
|
14431
14427
|
const match2 = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)"));
|
|
14432
14428
|
return match2 ? decodeURIComponent(match2[2]) : void 0;
|
|
14433
14429
|
};
|
|
@@ -14554,8 +14550,8 @@ function createOpportunityCreationPayload(payload) {
|
|
|
14554
14550
|
staff: service,
|
|
14555
14551
|
locationCity: deliveryAddressCity,
|
|
14556
14552
|
conversionUrl: conversion_url,
|
|
14557
|
-
entranceUrl: getCookie("entrance_url"),
|
|
14558
|
-
referrerUrl: getCookie("referrer_url"),
|
|
14553
|
+
entranceUrl: getCookie$1("entrance_url"),
|
|
14554
|
+
referrerUrl: getCookie$1("referrer_url"),
|
|
14559
14555
|
degreeOfSatiation: degree_of_satiation,
|
|
14560
14556
|
eventsAttributes: [
|
|
14561
14557
|
{
|
|
@@ -26687,7 +26683,12 @@ function useQfLeadCreator() {
|
|
|
26687
26683
|
service_type,
|
|
26688
26684
|
team_size,
|
|
26689
26685
|
delivery_frequency,
|
|
26690
|
-
budget_range
|
|
26686
|
+
budget_range,
|
|
26687
|
+
leadSource,
|
|
26688
|
+
conversionUrl,
|
|
26689
|
+
entranceUrl,
|
|
26690
|
+
referrerUrl,
|
|
26691
|
+
landingPageSource
|
|
26691
26692
|
} = variables;
|
|
26692
26693
|
const numberOfPeople = number_of_vegans + number_of_vegetarians + number_of_carnivore;
|
|
26693
26694
|
const {
|
|
@@ -26714,7 +26715,12 @@ function useQfLeadCreator() {
|
|
|
26714
26715
|
serviceType: service_type,
|
|
26715
26716
|
teamSize: team_size,
|
|
26716
26717
|
deliveryFrequency: delivery_frequency,
|
|
26717
|
-
budgetRange: budget_range
|
|
26718
|
+
budgetRange: budget_range,
|
|
26719
|
+
leadSource,
|
|
26720
|
+
conversionUrl,
|
|
26721
|
+
entranceUrl,
|
|
26722
|
+
referrerUrl,
|
|
26723
|
+
landingPageSource
|
|
26718
26724
|
},
|
|
26719
26725
|
{ client }
|
|
26720
26726
|
);
|
|
@@ -26731,6 +26737,10 @@ function useQfLeadCreator() {
|
|
|
26731
26737
|
createQfLead
|
|
26732
26738
|
};
|
|
26733
26739
|
}
|
|
26740
|
+
const getCookie = (name) => {
|
|
26741
|
+
const match2 = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)"));
|
|
26742
|
+
return match2 ? decodeURIComponent(match2[2]) : void 0;
|
|
26743
|
+
};
|
|
26734
26744
|
function useRequestForm() {
|
|
26735
26745
|
const { state } = useQualification();
|
|
26736
26746
|
const qualification = "qualification" in state ? state.qualification : null;
|
|
@@ -26780,7 +26790,7 @@ function useRequestForm() {
|
|
|
26780
26790
|
return opportunity;
|
|
26781
26791
|
};
|
|
26782
26792
|
const submitAsNewCustomer = async (values2) => {
|
|
26783
|
-
var _a2;
|
|
26793
|
+
var _a2, _b;
|
|
26784
26794
|
const serviceType = (_a2 = qualification == null ? void 0 : qualification.answers) == null ? void 0 : _a2.service_type;
|
|
26785
26795
|
const isLeadOnlyFunnel = serviceType === "regular_employee_catering" || serviceType === "full_service_event";
|
|
26786
26796
|
const { deliveryAddressCountry } = values2;
|
|
@@ -26789,9 +26799,15 @@ function useRequestForm() {
|
|
|
26789
26799
|
);
|
|
26790
26800
|
if (isLeadOnlyFunnel || isUkLead) {
|
|
26791
26801
|
try {
|
|
26802
|
+
const leadSource = ((_b = qualification == null ? void 0 : qualification.leadSource) == null ? void 0 : _b.includes("/events")) ? "events-landingpage" : "Qualification Funnel";
|
|
26792
26803
|
const response = await createQfLead({
|
|
26793
26804
|
...values2,
|
|
26794
|
-
...qualification == null ? void 0 : qualification.answers
|
|
26805
|
+
...qualification == null ? void 0 : qualification.answers,
|
|
26806
|
+
leadSource,
|
|
26807
|
+
conversionUrl: window.location.href,
|
|
26808
|
+
entranceUrl: getCookie("entrance_url"),
|
|
26809
|
+
referrerUrl: getCookie("referrer_url"),
|
|
26810
|
+
landingPageSource: qualification == null ? void 0 : qualification.leadSource
|
|
26795
26811
|
});
|
|
26796
26812
|
if (!response) {
|
|
26797
26813
|
console.error("[HeyCater Funnel] createQfLead returned undefined/null");
|
|
@@ -26932,6 +26948,7 @@ function RequestForm({ header = null }) {
|
|
|
26932
26948
|
trackCompleted(funnelContextRef.current);
|
|
26933
26949
|
console.log("[Optimeleon Debug] Lead-only flow - tracking funnel_completed with:", effectiveServiceType);
|
|
26934
26950
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
26951
|
+
window.gtag && window.gtag("event", "submit_qf_request");
|
|
26935
26952
|
return;
|
|
26936
26953
|
} else {
|
|
26937
26954
|
console.error("[HeyCater Funnel] Lead submission failed. Result:", response);
|
|
@@ -26940,6 +26957,7 @@ function RequestForm({ header = null }) {
|
|
|
26940
26957
|
}
|
|
26941
26958
|
}
|
|
26942
26959
|
let redirectRoute = "";
|
|
26960
|
+
let userId = "";
|
|
26943
26961
|
if (currentUserAccount) {
|
|
26944
26962
|
try {
|
|
26945
26963
|
const opportunity = await submitAsExistingCustomer(values2);
|
|
@@ -26948,6 +26966,7 @@ function RequestForm({ header = null }) {
|
|
|
26948
26966
|
handleDisableCTA(false);
|
|
26949
26967
|
return;
|
|
26950
26968
|
}
|
|
26969
|
+
userId = opportunity.userId;
|
|
26951
26970
|
redirectRoute = `/account/requests/${opportunity.id}`;
|
|
26952
26971
|
} catch (err) {
|
|
26953
26972
|
if (err instanceof Error) {
|
|
@@ -26964,18 +26983,24 @@ function RequestForm({ header = null }) {
|
|
|
26964
26983
|
handleDisableCTA(false);
|
|
26965
26984
|
return;
|
|
26966
26985
|
}
|
|
26986
|
+
userId = opportunity.userId;
|
|
26967
26987
|
if (signInToken) {
|
|
26968
26988
|
redirectRoute = `/${router.locale}/account/requests/${opportunity.id}?one_time_sign_in_token=${signInToken}`;
|
|
26969
26989
|
} else {
|
|
26970
26990
|
redirectRoute = `/${router.locale}/account/external/requests/${opportunity.id}`;
|
|
26971
26991
|
}
|
|
26972
26992
|
}
|
|
26993
|
+
if (userId) {
|
|
26994
|
+
identifyUser(userId);
|
|
26995
|
+
pushDataLayer(userId);
|
|
26996
|
+
}
|
|
26973
26997
|
trackFormSubmitted(funnelContextRef.current, {
|
|
26974
26998
|
is_logged_in: !!currentUserAccount
|
|
26975
26999
|
});
|
|
26976
27000
|
trackCompleted(funnelContextRef.current);
|
|
26977
27001
|
console.log("[Optimeleon Debug] Regular flow - tracking funnel_completed with:", effectiveServiceType);
|
|
26978
27002
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
27003
|
+
window.gtag && window.gtag("event", "submit_qf_request");
|
|
26979
27004
|
actions.setRequest(values2);
|
|
26980
27005
|
redirectToCustomerAccountRequest(redirectRoute);
|
|
26981
27006
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.rdp{--rdp-cell-size: 40px;--rdp-caption-font-size: 18px;--rdp-accent-color: #0000ff;--rdp-background-color: #e7edff;--rdp-accent-color-dark: #3003e1;--rdp-background-color-dark: #180270;--rdp-outline: 2px solid var(--rdp-accent-color);--rdp-outline-selected: 3px solid var(--rdp-accent-color);--rdp-selected-color: #fff;margin:1em}.rdp-vhidden{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute!important;top:0;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(1px,1px,1px,1px)!important;border:0!important}.rdp-button_reset{appearance:none;position:relative;margin:0;padding:0;cursor:default;color:inherit;background:none;font:inherit;-moz-appearance:none;-webkit-appearance:none}.rdp-button_reset:focus-visible{outline:none}.rdp-button{border:2px solid transparent}.rdp-button[disabled]:not(.rdp-day_selected){opacity:.25}.rdp-button:not([disabled]){cursor:pointer}.rdp-button:focus-visible:not([disabled]){color:inherit;background-color:var(--rdp-background-color);border:var(--rdp-outline)}.rdp-button:hover:not([disabled]):not(.rdp-day_selected){background-color:var(--rdp-background-color)}.rdp-months{display:flex}.rdp-month{margin:0 1em}.rdp-month:first-child{margin-left:0}.rdp-month:last-child{margin-right:0}.rdp-table{margin:0;max-width:calc(var(--rdp-cell-size) * 7);border-collapse:collapse}.rdp-with_weeknumber .rdp-table{max-width:calc(var(--rdp-cell-size) * 8);border-collapse:collapse}.rdp-caption{display:flex;align-items:center;justify-content:space-between;padding:0;text-align:left}.rdp-multiple_months .rdp-caption{position:relative;display:block;text-align:center}.rdp-caption_dropdowns{position:relative;display:inline-flex}.rdp-caption_label{position:relative;z-index:1;display:inline-flex;align-items:center;margin:0;padding:0 .25em;white-space:nowrap;color:currentColor;border:0;border:2px solid transparent;font-family:inherit;font-size:var(--rdp-caption-font-size);font-weight:700}.rdp-nav{white-space:nowrap}.rdp-multiple_months .rdp-caption_start .rdp-nav{position:absolute;top:50%;left:0;transform:translateY(-50%)}.rdp-multiple_months .rdp-caption_end .rdp-nav{position:absolute;top:50%;right:0;transform:translateY(-50%)}.rdp-nav_button{display:inline-flex;align-items:center;justify-content:center;width:var(--rdp-cell-size);height:var(--rdp-cell-size);padding:.25em;border-radius:100%}.rdp-dropdown_year,.rdp-dropdown_month{position:relative;display:inline-flex;align-items:center}.rdp-dropdown{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;z-index:2;top:0;bottom:0;left:0;width:100%;margin:0;padding:0;cursor:inherit;opacity:0;border:none;background-color:transparent;font-family:inherit;font-size:inherit;line-height:inherit}.rdp-dropdown[disabled]{opacity:unset;color:unset}.rdp-dropdown:focus-visible:not([disabled])+.rdp-caption_label{background-color:var(--rdp-background-color);border:var(--rdp-outline);border-radius:6px}.rdp-dropdown_icon{margin:0 0 0 5px}.rdp-head{border:0}.rdp-head_row,.rdp-row{height:100%}.rdp-head_cell{vertical-align:middle;font-size:.75em;font-weight:700;text-align:center;height:100%;height:var(--rdp-cell-size);padding:0;text-transform:uppercase}.rdp-tbody{border:0}.rdp-tfoot{margin:.5em}.rdp-cell{width:var(--rdp-cell-size);height:100%;height:var(--rdp-cell-size);padding:0;text-align:center}.rdp-weeknumber{font-size:.75em}.rdp-weeknumber,.rdp-day{display:flex;overflow:hidden;align-items:center;justify-content:center;box-sizing:border-box;width:var(--rdp-cell-size);max-width:var(--rdp-cell-size);height:var(--rdp-cell-size);margin:0;border:2px solid transparent;border-radius:100%}.rdp-day_today:not(.rdp-day_outside){font-weight:700}.rdp-day_selected,.rdp-day_selected:focus-visible,.rdp-day_selected:hover{color:var(--rdp-selected-color);opacity:1;background-color:var(--rdp-accent-color)}.rdp-day_outside{opacity:.5}.rdp-day_selected:focus-visible{outline:var(--rdp-outline);outline-offset:2px;z-index:1}.rdp:not([dir=rtl]) .rdp-day_range_start:not(.rdp-day_range_end){border-top-right-radius:0;border-bottom-right-radius:0}.rdp:not([dir=rtl]) .rdp-day_range_end:not(.rdp-day_range_start){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_start:not(.rdp-day_range_end){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_end:not(.rdp-day_range_start){border-top-right-radius:0;border-bottom-right-radius:0}.rdp-day_range_end.rdp-day_range_start{border-radius:100%}.rdp-day_range_middle{border-radius:0}
|
|
1
|
+
.rdp{--rdp-cell-size: 40px;--rdp-caption-font-size: 18px;--rdp-accent-color: #0000ff;--rdp-background-color: #e7edff;--rdp-accent-color-dark: #3003e1;--rdp-background-color-dark: #180270;--rdp-outline: 2px solid var(--rdp-accent-color);--rdp-outline-selected: 3px solid var(--rdp-accent-color);--rdp-selected-color: #fff;margin:1em}.rdp-vhidden{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute!important;top:0;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(1px,1px,1px,1px)!important;border:0!important}.rdp-button_reset{appearance:none;position:relative;margin:0;padding:0;cursor:default;color:inherit;background:none;font:inherit;-moz-appearance:none;-webkit-appearance:none}.rdp-button_reset:focus-visible{outline:none}.rdp-button{border:2px solid transparent}.rdp-button[disabled]:not(.rdp-day_selected){opacity:.25}.rdp-button:not([disabled]){cursor:pointer}.rdp-button:focus-visible:not([disabled]){color:inherit;background-color:var(--rdp-background-color);border:var(--rdp-outline)}.rdp-button:hover:not([disabled]):not(.rdp-day_selected){background-color:var(--rdp-background-color)}.rdp-months{display:flex}.rdp-month{margin:0 1em}.rdp-month:first-child{margin-left:0}.rdp-month:last-child{margin-right:0}.rdp-table{margin:0;max-width:calc(var(--rdp-cell-size) * 7);border-collapse:collapse}.rdp-with_weeknumber .rdp-table{max-width:calc(var(--rdp-cell-size) * 8);border-collapse:collapse}.rdp-caption{display:flex;align-items:center;justify-content:space-between;padding:0;text-align:left}.rdp-multiple_months .rdp-caption{position:relative;display:block;text-align:center}.rdp-caption_dropdowns{position:relative;display:inline-flex}.rdp-caption_label{position:relative;z-index:1;display:inline-flex;align-items:center;margin:0;padding:0 .25em;white-space:nowrap;color:currentColor;border:0;border:2px solid transparent;font-family:inherit;font-size:var(--rdp-caption-font-size);font-weight:700}.rdp-nav{white-space:nowrap}.rdp-multiple_months .rdp-caption_start .rdp-nav{position:absolute;top:50%;left:0;transform:translateY(-50%)}.rdp-multiple_months .rdp-caption_end .rdp-nav{position:absolute;top:50%;right:0;transform:translateY(-50%)}.rdp-nav_button{display:inline-flex;align-items:center;justify-content:center;width:var(--rdp-cell-size);height:var(--rdp-cell-size);padding:.25em;border-radius:100%}.rdp-dropdown_year,.rdp-dropdown_month{position:relative;display:inline-flex;align-items:center}.rdp-dropdown{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;z-index:2;top:0;bottom:0;left:0;width:100%;margin:0;padding:0;cursor:inherit;opacity:0;border:none;background-color:transparent;font-family:inherit;font-size:inherit;line-height:inherit}.rdp-dropdown[disabled]{opacity:unset;color:unset}.rdp-dropdown:focus-visible:not([disabled])+.rdp-caption_label{background-color:var(--rdp-background-color);border:var(--rdp-outline);border-radius:6px}.rdp-dropdown_icon{margin:0 0 0 5px}.rdp-head{border:0}.rdp-head_row,.rdp-row{height:100%}.rdp-head_cell{vertical-align:middle;font-size:.75em;font-weight:700;text-align:center;height:100%;height:var(--rdp-cell-size);padding:0;text-transform:uppercase}.rdp-tbody{border:0}.rdp-tfoot{margin:.5em}.rdp-cell{width:var(--rdp-cell-size);height:100%;height:var(--rdp-cell-size);padding:0;text-align:center}.rdp-weeknumber{font-size:.75em}.rdp-weeknumber,.rdp-day{display:flex;overflow:hidden;align-items:center;justify-content:center;box-sizing:border-box;width:var(--rdp-cell-size);max-width:var(--rdp-cell-size);height:var(--rdp-cell-size);margin:0;border:2px solid transparent;border-radius:100%}.rdp-day_today:not(.rdp-day_outside){font-weight:700}.rdp-day_selected,.rdp-day_selected:focus-visible,.rdp-day_selected:hover{color:var(--rdp-selected-color);opacity:1;background-color:var(--rdp-accent-color)}.rdp-day_outside{opacity:.5}.rdp-day_selected:focus-visible{outline:var(--rdp-outline);outline-offset:2px;z-index:1}.rdp:not([dir=rtl]) .rdp-day_range_start:not(.rdp-day_range_end){border-top-right-radius:0;border-bottom-right-radius:0}.rdp:not([dir=rtl]) .rdp-day_range_end:not(.rdp-day_range_start){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_start:not(.rdp-day_range_end){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_end:not(.rdp-day_range_start){border-top-right-radius:0;border-bottom-right-radius:0}.rdp-day_range_end.rdp-day_range_start{border-radius:100%}.rdp-day_range_middle{border-radius:0}
|