@heycater/qualification-funnel 1.19.28 → 1.19.30
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 +590 -533
- package/dist/index.cjs.js +563 -506
- package/dist/index.esm.js +419 -291
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -7224,15 +7224,21 @@ const EVENT_TYPE_ITEMS = [
|
|
|
7224
7224
|
},
|
|
7225
7225
|
{
|
|
7226
7226
|
value: "conference",
|
|
7227
|
-
labelDe: "Konferenz/Messe",
|
|
7228
|
-
labelEn: "Conference/Trade Show",
|
|
7227
|
+
labelDe: "Konferenz / Messe",
|
|
7228
|
+
labelEn: "Conference / Trade Show",
|
|
7229
7229
|
iconName: "conference"
|
|
7230
7230
|
},
|
|
7231
7231
|
{
|
|
7232
7232
|
value: "workshop",
|
|
7233
|
-
labelDe: "Workshop/Teamtag",
|
|
7234
|
-
labelEn: "Workshop/Team Day",
|
|
7233
|
+
labelDe: "Workshop / Teamtag",
|
|
7234
|
+
labelEn: "Workshop / Team Day",
|
|
7235
7235
|
iconName: "workshop"
|
|
7236
|
+
},
|
|
7237
|
+
{
|
|
7238
|
+
value: "other",
|
|
7239
|
+
labelDe: "Anderer Anlass",
|
|
7240
|
+
labelEn: "Other occasion",
|
|
7241
|
+
iconName: "other"
|
|
7236
7242
|
}
|
|
7237
7243
|
];
|
|
7238
7244
|
function mapEventTypeToServiceAndCategory(eventType) {
|
|
@@ -12703,7 +12709,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
12703
12709
|
var ys = arrObjKeys(obj, inspect2);
|
|
12704
12710
|
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
12705
12711
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
12706
|
-
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
12712
|
+
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
|
|
12707
12713
|
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
12708
12714
|
var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
|
|
12709
12715
|
if (ys.length === 0) {
|
|
@@ -12728,25 +12734,25 @@ function canTrustToString(obj) {
|
|
|
12728
12734
|
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
12729
12735
|
}
|
|
12730
12736
|
function isArray$3(obj) {
|
|
12731
|
-
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
12737
|
+
return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
|
|
12732
12738
|
}
|
|
12733
12739
|
function isDate(obj) {
|
|
12734
|
-
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
12740
|
+
return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
|
|
12735
12741
|
}
|
|
12736
12742
|
function isRegExp$1(obj) {
|
|
12737
|
-
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
12743
|
+
return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
12738
12744
|
}
|
|
12739
12745
|
function isError(obj) {
|
|
12740
|
-
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
12746
|
+
return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
|
|
12741
12747
|
}
|
|
12742
12748
|
function isString(obj) {
|
|
12743
|
-
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
12749
|
+
return toStr$1(obj) === "[object String]" && canTrustToString(obj);
|
|
12744
12750
|
}
|
|
12745
12751
|
function isNumber(obj) {
|
|
12746
|
-
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
12752
|
+
return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
|
|
12747
12753
|
}
|
|
12748
12754
|
function isBoolean(obj) {
|
|
12749
|
-
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
12755
|
+
return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
12750
12756
|
}
|
|
12751
12757
|
function isSymbol(obj) {
|
|
12752
12758
|
if (hasShammedSymbols) {
|
|
@@ -12782,7 +12788,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
12782
12788
|
function has$4(obj, key) {
|
|
12783
12789
|
return hasOwn$1.call(obj, key);
|
|
12784
12790
|
}
|
|
12785
|
-
function toStr(obj) {
|
|
12791
|
+
function toStr$1(obj) {
|
|
12786
12792
|
return objectToString.call(obj);
|
|
12787
12793
|
}
|
|
12788
12794
|
function nameOf(f) {
|
|
@@ -13091,7 +13097,7 @@ var syntax = SyntaxError;
|
|
|
13091
13097
|
var uri = URIError;
|
|
13092
13098
|
var abs$1 = Math.abs;
|
|
13093
13099
|
var floor$1 = Math.floor;
|
|
13094
|
-
var max$
|
|
13100
|
+
var max$2 = Math.max;
|
|
13095
13101
|
var min$1 = Math.min;
|
|
13096
13102
|
var pow$1 = Math.pow;
|
|
13097
13103
|
var round$2 = Math.round;
|
|
@@ -13220,99 +13226,78 @@ function requireObject_getPrototypeOf() {
|
|
|
13220
13226
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
13221
13227
|
return Object_getPrototypeOf;
|
|
13222
13228
|
}
|
|
13223
|
-
var
|
|
13224
|
-
var
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
var
|
|
13229
|
-
var
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
var
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
}
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13229
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
13230
|
+
var toStr = Object.prototype.toString;
|
|
13231
|
+
var max$1 = Math.max;
|
|
13232
|
+
var funcType = "[object Function]";
|
|
13233
|
+
var concatty = function concatty2(a3, b2) {
|
|
13234
|
+
var arr = [];
|
|
13235
|
+
for (var i2 = 0; i2 < a3.length; i2 += 1) {
|
|
13236
|
+
arr[i2] = a3[i2];
|
|
13237
|
+
}
|
|
13238
|
+
for (var j = 0; j < b2.length; j += 1) {
|
|
13239
|
+
arr[j + a3.length] = b2[j];
|
|
13240
|
+
}
|
|
13241
|
+
return arr;
|
|
13242
|
+
};
|
|
13243
|
+
var slicy = function slicy2(arrLike, offset2) {
|
|
13244
|
+
var arr = [];
|
|
13245
|
+
for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
|
|
13246
|
+
arr[j] = arrLike[i2];
|
|
13247
|
+
}
|
|
13248
|
+
return arr;
|
|
13249
|
+
};
|
|
13250
|
+
var joiny = function(arr, joiner) {
|
|
13251
|
+
var str = "";
|
|
13252
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
13253
|
+
str += arr[i2];
|
|
13254
|
+
if (i2 + 1 < arr.length) {
|
|
13255
|
+
str += joiner;
|
|
13246
13256
|
}
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13257
|
+
}
|
|
13258
|
+
return str;
|
|
13259
|
+
};
|
|
13260
|
+
var implementation$1 = function bind(that) {
|
|
13261
|
+
var target = this;
|
|
13262
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
13263
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
13264
|
+
}
|
|
13265
|
+
var args = slicy(arguments, 1);
|
|
13266
|
+
var bound;
|
|
13267
|
+
var binder = function() {
|
|
13268
|
+
if (this instanceof bound) {
|
|
13269
|
+
var result = target.apply(
|
|
13270
|
+
this,
|
|
13271
|
+
concatty(args, arguments)
|
|
13272
|
+
);
|
|
13273
|
+
if (Object(result) === result) {
|
|
13274
|
+
return result;
|
|
13255
13275
|
}
|
|
13276
|
+
return this;
|
|
13256
13277
|
}
|
|
13257
|
-
return
|
|
13278
|
+
return target.apply(
|
|
13279
|
+
that,
|
|
13280
|
+
concatty(args, arguments)
|
|
13281
|
+
);
|
|
13258
13282
|
};
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
var
|
|
13267
|
-
if (this instanceof bound) {
|
|
13268
|
-
var result = target.apply(
|
|
13269
|
-
this,
|
|
13270
|
-
concatty(args, arguments)
|
|
13271
|
-
);
|
|
13272
|
-
if (Object(result) === result) {
|
|
13273
|
-
return result;
|
|
13274
|
-
}
|
|
13275
|
-
return this;
|
|
13276
|
-
}
|
|
13277
|
-
return target.apply(
|
|
13278
|
-
that,
|
|
13279
|
-
concatty(args, arguments)
|
|
13280
|
-
);
|
|
13283
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
13284
|
+
var boundArgs = [];
|
|
13285
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
13286
|
+
boundArgs[i2] = "$" + i2;
|
|
13287
|
+
}
|
|
13288
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
13289
|
+
if (target.prototype) {
|
|
13290
|
+
var Empty = function Empty2() {
|
|
13281
13291
|
};
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
Empty.prototype = target.prototype;
|
|
13292
|
-
bound.prototype = new Empty();
|
|
13293
|
-
Empty.prototype = null;
|
|
13294
|
-
}
|
|
13295
|
-
return bound;
|
|
13296
|
-
};
|
|
13297
|
-
return implementation;
|
|
13298
|
-
}
|
|
13299
|
-
var functionBind;
|
|
13300
|
-
var hasRequiredFunctionBind;
|
|
13301
|
-
function requireFunctionBind() {
|
|
13302
|
-
if (hasRequiredFunctionBind) return functionBind;
|
|
13303
|
-
hasRequiredFunctionBind = 1;
|
|
13304
|
-
var implementation2 = requireImplementation();
|
|
13305
|
-
functionBind = Function.prototype.bind || implementation2;
|
|
13306
|
-
return functionBind;
|
|
13307
|
-
}
|
|
13308
|
-
var functionCall;
|
|
13309
|
-
var hasRequiredFunctionCall;
|
|
13310
|
-
function requireFunctionCall() {
|
|
13311
|
-
if (hasRequiredFunctionCall) return functionCall;
|
|
13312
|
-
hasRequiredFunctionCall = 1;
|
|
13313
|
-
functionCall = Function.prototype.call;
|
|
13314
|
-
return functionCall;
|
|
13315
|
-
}
|
|
13292
|
+
Empty.prototype = target.prototype;
|
|
13293
|
+
bound.prototype = new Empty();
|
|
13294
|
+
Empty.prototype = null;
|
|
13295
|
+
}
|
|
13296
|
+
return bound;
|
|
13297
|
+
};
|
|
13298
|
+
var implementation = implementation$1;
|
|
13299
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
13300
|
+
var functionCall = Function.prototype.call;
|
|
13316
13301
|
var functionApply;
|
|
13317
13302
|
var hasRequiredFunctionApply;
|
|
13318
13303
|
function requireFunctionApply() {
|
|
@@ -13322,14 +13307,14 @@ function requireFunctionApply() {
|
|
|
13322
13307
|
return functionApply;
|
|
13323
13308
|
}
|
|
13324
13309
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
13325
|
-
var bind$2 =
|
|
13310
|
+
var bind$2 = functionBind;
|
|
13326
13311
|
var $apply$1 = requireFunctionApply();
|
|
13327
|
-
var $call$2 =
|
|
13312
|
+
var $call$2 = functionCall;
|
|
13328
13313
|
var $reflectApply = reflectApply;
|
|
13329
13314
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
13330
|
-
var bind$1 =
|
|
13315
|
+
var bind$1 = functionBind;
|
|
13331
13316
|
var $TypeError$4 = type;
|
|
13332
|
-
var $call$1 =
|
|
13317
|
+
var $call$1 = functionCall;
|
|
13333
13318
|
var $actualApply = actualApply;
|
|
13334
13319
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
13335
13320
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -13395,8 +13380,8 @@ function requireHasown() {
|
|
|
13395
13380
|
hasRequiredHasown = 1;
|
|
13396
13381
|
var call = Function.prototype.call;
|
|
13397
13382
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
13398
|
-
var
|
|
13399
|
-
hasown =
|
|
13383
|
+
var bind3 = functionBind;
|
|
13384
|
+
hasown = bind3.call(call, $hasOwn);
|
|
13400
13385
|
return hasown;
|
|
13401
13386
|
}
|
|
13402
13387
|
var undefined$1;
|
|
@@ -13410,7 +13395,7 @@ var $TypeError$3 = type;
|
|
|
13410
13395
|
var $URIError = uri;
|
|
13411
13396
|
var abs = abs$1;
|
|
13412
13397
|
var floor = floor$1;
|
|
13413
|
-
var max = max$
|
|
13398
|
+
var max = max$2;
|
|
13414
13399
|
var min = min$1;
|
|
13415
13400
|
var pow = pow$1;
|
|
13416
13401
|
var round$1 = round$2;
|
|
@@ -13444,7 +13429,7 @@ var getProto = requireGetProto();
|
|
|
13444
13429
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
13445
13430
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
13446
13431
|
var $apply = requireFunctionApply();
|
|
13447
|
-
var $call =
|
|
13432
|
+
var $call = functionCall;
|
|
13448
13433
|
var needsEval = {};
|
|
13449
13434
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
13450
13435
|
var INTRINSICS = {
|
|
@@ -13615,13 +13600,13 @@ var LEGACY_ALIASES = {
|
|
|
13615
13600
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
13616
13601
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
13617
13602
|
};
|
|
13618
|
-
var
|
|
13603
|
+
var bind2 = functionBind;
|
|
13619
13604
|
var hasOwn = requireHasown();
|
|
13620
|
-
var $concat =
|
|
13621
|
-
var $spliceApply =
|
|
13622
|
-
var $replace =
|
|
13623
|
-
var $strSlice =
|
|
13624
|
-
var $exec =
|
|
13605
|
+
var $concat = bind2.call($call, Array.prototype.concat);
|
|
13606
|
+
var $spliceApply = bind2.call($apply, Array.prototype.splice);
|
|
13607
|
+
var $replace = bind2.call($call, String.prototype.replace);
|
|
13608
|
+
var $strSlice = bind2.call($call, String.prototype.slice);
|
|
13609
|
+
var $exec = bind2.call($call, RegExp.prototype.exec);
|
|
13625
13610
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
13626
13611
|
var reEscapeChar = /\\(\\)?/g;
|
|
13627
13612
|
var stringToPath = function stringToPath2(string2) {
|
|
@@ -26840,9 +26825,10 @@ function useFunnelCheckout() {
|
|
|
26840
26825
|
const { locale: locale2 } = useRouter();
|
|
26841
26826
|
const client = useClient();
|
|
26842
26827
|
const funnelCheckout = async (variables) => {
|
|
26843
|
-
var _a2;
|
|
26844
26828
|
try {
|
|
26845
|
-
const
|
|
26829
|
+
const {
|
|
26830
|
+
data: { funnelCheckout: response }
|
|
26831
|
+
} = await funnelCheckoutMutation(
|
|
26846
26832
|
{
|
|
26847
26833
|
userAttributes: {
|
|
26848
26834
|
email: variables.email,
|
|
@@ -26856,22 +26842,13 @@ function useFunnelCheckout() {
|
|
|
26856
26842
|
},
|
|
26857
26843
|
{ client }
|
|
26858
26844
|
);
|
|
26859
|
-
|
|
26860
|
-
const error = new Error("funnelCheckout returned no data");
|
|
26861
|
-
BugsnagExport.notify(error, (event) => {
|
|
26862
|
-
event.addMetadata("funnelCheckoutArgs", variables);
|
|
26863
|
-
event.addMetadata("funnelCheckoutResult", result);
|
|
26864
|
-
});
|
|
26865
|
-
throw error;
|
|
26866
|
-
}
|
|
26867
|
-
return result.data.funnelCheckout;
|
|
26845
|
+
return response;
|
|
26868
26846
|
} catch (error) {
|
|
26869
26847
|
if (error instanceof Error) {
|
|
26870
26848
|
BugsnagExport.notify(error, (event) => {
|
|
26871
26849
|
event.addMetadata("funnelCheckoutArgs", variables);
|
|
26872
26850
|
});
|
|
26873
26851
|
}
|
|
26874
|
-
throw error;
|
|
26875
26852
|
}
|
|
26876
26853
|
};
|
|
26877
26854
|
return {
|
|
@@ -27059,18 +27036,17 @@ function useRequestForm() {
|
|
|
27059
27036
|
return { success: false, isUkLead };
|
|
27060
27037
|
}
|
|
27061
27038
|
} else {
|
|
27062
|
-
|
|
27063
|
-
|
|
27064
|
-
|
|
27065
|
-
|
|
27066
|
-
|
|
27067
|
-
|
|
27068
|
-
|
|
27069
|
-
|
|
27070
|
-
|
|
27071
|
-
|
|
27072
|
-
|
|
27073
|
-
}
|
|
27039
|
+
const {
|
|
27040
|
+
signInToken,
|
|
27041
|
+
customerAccount,
|
|
27042
|
+
opportunity
|
|
27043
|
+
} = await funnelCheckout(buildOpportunityPayload(values2));
|
|
27044
|
+
return {
|
|
27045
|
+
signInToken,
|
|
27046
|
+
customerAccount,
|
|
27047
|
+
opportunity,
|
|
27048
|
+
isUkLead: false
|
|
27049
|
+
};
|
|
27074
27050
|
}
|
|
27075
27051
|
};
|
|
27076
27052
|
return {
|
|
@@ -30562,9 +30538,10 @@ const EVENT_TYPE_TO_ICON = {
|
|
|
30562
30538
|
lunch: "business_lunch",
|
|
30563
30539
|
breakfast: "breakfast",
|
|
30564
30540
|
party: "buffet",
|
|
30565
|
-
meeting: "
|
|
30566
|
-
conference: "
|
|
30567
|
-
workshop: "
|
|
30541
|
+
meeting: "drinks",
|
|
30542
|
+
conference: "fine_dining",
|
|
30543
|
+
workshop: "fingerfood",
|
|
30544
|
+
other: null
|
|
30568
30545
|
};
|
|
30569
30546
|
const EventTypeTiles = ({
|
|
30570
30547
|
onSelect,
|
|
@@ -30589,10 +30566,11 @@ const EventTypeTiles = ({
|
|
|
30589
30566
|
children: [
|
|
30590
30567
|
isSelected && /* @__PURE__ */ jsx(SelectionBadge, { children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) }),
|
|
30591
30568
|
/* @__PURE__ */ jsx(IconContainer, { children: /* @__PURE__ */ jsx(EventIcon, { iconName: item.iconName }) }),
|
|
30592
|
-
/* @__PURE__ */ jsx(TileLabel, { children: label.includes("/") ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30593
|
-
label.split("/")[0],
|
|
30569
|
+
/* @__PURE__ */ jsx(TileLabel, { children: label.includes(" / ") ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30570
|
+
label.split(" / ")[0],
|
|
30571
|
+
" /",
|
|
30594
30572
|
/* @__PURE__ */ jsx("br", {}),
|
|
30595
|
-
label.split("/")[1]
|
|
30573
|
+
label.split(" / ")[1]
|
|
30596
30574
|
] }) : label })
|
|
30597
30575
|
]
|
|
30598
30576
|
},
|
|
@@ -30603,7 +30581,7 @@ const EventTypeTiles = ({
|
|
|
30603
30581
|
const EventIcon = ({ iconName }) => {
|
|
30604
30582
|
const mappedIcon = EVENT_TYPE_TO_ICON[iconName];
|
|
30605
30583
|
if (!mappedIcon) {
|
|
30606
|
-
return /* @__PURE__ */ jsx(QuestionMark, { height: "46px" });
|
|
30584
|
+
return /* @__PURE__ */ jsx(GreyIconWrapper, { children: /* @__PURE__ */ jsx(QuestionMark, { height: "46px" }) });
|
|
30607
30585
|
}
|
|
30608
30586
|
return /* @__PURE__ */ jsx(
|
|
30609
30587
|
StyledImg,
|
|
@@ -30618,6 +30596,10 @@ const EventIcon = ({ iconName }) => {
|
|
|
30618
30596
|
const StyledImg = styled.img`
|
|
30619
30597
|
object-fit: contain;
|
|
30620
30598
|
`;
|
|
30599
|
+
const GreyIconWrapper = styled.div`
|
|
30600
|
+
opacity: 0.4;
|
|
30601
|
+
filter: grayscale(100%);
|
|
30602
|
+
`;
|
|
30621
30603
|
const popIn = keyframes`
|
|
30622
30604
|
0% { transform: scale(0.4); opacity: 0; }
|
|
30623
30605
|
60% { transform: scale(1.12); }
|
|
@@ -30964,35 +30946,94 @@ const BudgetPeopleStep = ({
|
|
|
30964
30946
|
var _a2;
|
|
30965
30947
|
const { i18n } = useTranslation();
|
|
30966
30948
|
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
30949
|
+
const [peopleInputValue, setPeopleInputValue] = useState(String(peopleCount));
|
|
30950
|
+
const [budgetInputValue, setBudgetInputValue] = useState(String(budgetPerPerson2));
|
|
30951
|
+
const peopleInputRef = useRef(null);
|
|
30952
|
+
const budgetInputRef = useRef(null);
|
|
30967
30953
|
const totalBudget = peopleCount * budgetPerPerson2;
|
|
30968
30954
|
const formattedTotal = totalBudget.toLocaleString("de-DE");
|
|
30969
30955
|
const handlePeopleIncrement = useCallback(() => {
|
|
30970
|
-
|
|
30956
|
+
const newValue = peopleCount + 5;
|
|
30957
|
+
onPeopleCountChange(newValue);
|
|
30958
|
+
setPeopleInputValue(String(newValue));
|
|
30971
30959
|
}, [peopleCount, onPeopleCountChange]);
|
|
30972
30960
|
const handlePeopleDecrement = useCallback(() => {
|
|
30973
|
-
|
|
30961
|
+
const newValue = Math.max(1, peopleCount - 5);
|
|
30962
|
+
onPeopleCountChange(newValue);
|
|
30963
|
+
setPeopleInputValue(String(newValue));
|
|
30974
30964
|
}, [peopleCount, onPeopleCountChange]);
|
|
30975
30965
|
const handleBudgetIncrement = useCallback(() => {
|
|
30976
|
-
|
|
30966
|
+
const newValue = budgetPerPerson2 + 5;
|
|
30967
|
+
onBudgetPerPersonChange(newValue);
|
|
30968
|
+
setBudgetInputValue(String(newValue));
|
|
30977
30969
|
}, [budgetPerPerson2, onBudgetPerPersonChange]);
|
|
30978
30970
|
const handleBudgetDecrement = useCallback(() => {
|
|
30979
|
-
|
|
30971
|
+
const newValue = Math.max(5, budgetPerPerson2 - 5);
|
|
30972
|
+
onBudgetPerPersonChange(newValue);
|
|
30973
|
+
setBudgetInputValue(String(newValue));
|
|
30980
30974
|
}, [budgetPerPerson2, onBudgetPerPersonChange]);
|
|
30975
|
+
const handlePeopleInputChange = useCallback((e2) => {
|
|
30976
|
+
const value = e2.target.value.replace(/[^0-9]/g, "");
|
|
30977
|
+
setPeopleInputValue(value);
|
|
30978
|
+
const numValue = parseInt(value, 10);
|
|
30979
|
+
if (!isNaN(numValue) && numValue >= 1) {
|
|
30980
|
+
onPeopleCountChange(numValue);
|
|
30981
|
+
}
|
|
30982
|
+
}, [onPeopleCountChange]);
|
|
30983
|
+
const handlePeopleInputBlur = useCallback(() => {
|
|
30984
|
+
const numValue = parseInt(peopleInputValue, 10);
|
|
30985
|
+
if (isNaN(numValue) || numValue < 1) {
|
|
30986
|
+
setPeopleInputValue(String(peopleCount));
|
|
30987
|
+
}
|
|
30988
|
+
}, [peopleInputValue, peopleCount]);
|
|
30989
|
+
const handleBudgetInputChange = useCallback((e2) => {
|
|
30990
|
+
const value = e2.target.value.replace(/[^0-9]/g, "");
|
|
30991
|
+
setBudgetInputValue(value);
|
|
30992
|
+
const numValue = parseInt(value, 10);
|
|
30993
|
+
if (!isNaN(numValue) && numValue >= 1) {
|
|
30994
|
+
onBudgetPerPersonChange(numValue);
|
|
30995
|
+
}
|
|
30996
|
+
}, [onBudgetPerPersonChange]);
|
|
30997
|
+
const handleBudgetInputBlur = useCallback(() => {
|
|
30998
|
+
const numValue = parseInt(budgetInputValue, 10);
|
|
30999
|
+
if (isNaN(numValue) || numValue < 1) {
|
|
31000
|
+
setBudgetInputValue(String(budgetPerPerson2));
|
|
31001
|
+
}
|
|
31002
|
+
}, [budgetInputValue, budgetPerPerson2]);
|
|
31003
|
+
const handlePresetClick = useCallback((preset) => {
|
|
31004
|
+
onPeopleCountChange(preset);
|
|
31005
|
+
setPeopleInputValue(String(preset));
|
|
31006
|
+
}, [onPeopleCountChange]);
|
|
30981
31007
|
return /* @__PURE__ */ jsx(Container$2, { children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
30982
31008
|
/* @__PURE__ */ jsxs(Row, { children: [
|
|
30983
31009
|
/* @__PURE__ */ jsx(Label, { children: isGerman ? "Personenanzahl" : "Number of people" }),
|
|
30984
31010
|
/* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
30985
|
-
/* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleDecrement, children: "−" }),
|
|
30986
|
-
/* @__PURE__ */ jsx(
|
|
30987
|
-
|
|
31011
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleDecrement, type: "button", children: "−" }),
|
|
31012
|
+
/* @__PURE__ */ jsx(
|
|
31013
|
+
ValueInput,
|
|
31014
|
+
{
|
|
31015
|
+
ref: peopleInputRef,
|
|
31016
|
+
type: "tel",
|
|
31017
|
+
inputMode: "numeric",
|
|
31018
|
+
value: peopleInputValue,
|
|
31019
|
+
onChange: handlePeopleInputChange,
|
|
31020
|
+
onBlur: handlePeopleInputBlur
|
|
31021
|
+
}
|
|
31022
|
+
),
|
|
31023
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleIncrement, type: "button", children: "+" })
|
|
30988
31024
|
] })
|
|
30989
31025
|
] }),
|
|
30990
|
-
/* @__PURE__ */ jsx(PresetRow, { children: PRESETS.map((preset) => /* @__PURE__ */
|
|
30991
|
-
|
|
31026
|
+
/* @__PURE__ */ jsx(PresetRow, { children: PRESETS.map((preset) => /* @__PURE__ */ jsxs(
|
|
31027
|
+
PresetLink,
|
|
30992
31028
|
{
|
|
30993
31029
|
$selected: peopleCount === preset,
|
|
30994
|
-
onClick: () =>
|
|
30995
|
-
|
|
31030
|
+
onClick: () => handlePresetClick(preset),
|
|
31031
|
+
type: "button",
|
|
31032
|
+
children: [
|
|
31033
|
+
preset,
|
|
31034
|
+
" ",
|
|
31035
|
+
isGerman ? "Personen" : "People"
|
|
31036
|
+
]
|
|
30996
31037
|
},
|
|
30997
31038
|
preset
|
|
30998
31039
|
)) }),
|
|
@@ -31003,12 +31044,22 @@ const BudgetPeopleStep = ({
|
|
|
31003
31044
|
isGerman ? "pro Person" : "per person"
|
|
31004
31045
|
] }),
|
|
31005
31046
|
/* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
31006
|
-
/* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetDecrement, children: "−" }),
|
|
31007
|
-
/* @__PURE__ */ jsxs(
|
|
31008
|
-
|
|
31009
|
-
|
|
31047
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetDecrement, type: "button", children: "−" }),
|
|
31048
|
+
/* @__PURE__ */ jsxs(ValueInputWrapper, { children: [
|
|
31049
|
+
/* @__PURE__ */ jsx(
|
|
31050
|
+
ValueInput,
|
|
31051
|
+
{
|
|
31052
|
+
ref: budgetInputRef,
|
|
31053
|
+
type: "tel",
|
|
31054
|
+
inputMode: "numeric",
|
|
31055
|
+
value: budgetInputValue,
|
|
31056
|
+
onChange: handleBudgetInputChange,
|
|
31057
|
+
onBlur: handleBudgetInputBlur
|
|
31058
|
+
}
|
|
31059
|
+
),
|
|
31060
|
+
/* @__PURE__ */ jsx(CurrencyLabel, { children: "€" })
|
|
31010
31061
|
] }),
|
|
31011
|
-
/* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetIncrement, children: "+" })
|
|
31062
|
+
/* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetIncrement, type: "button", children: "+" })
|
|
31012
31063
|
] })
|
|
31013
31064
|
] }),
|
|
31014
31065
|
/* @__PURE__ */ jsxs(TotalRow, { children: [
|
|
@@ -31078,47 +31129,64 @@ const StepButton = styled.button`
|
|
|
31078
31129
|
transform: scale(0.95);
|
|
31079
31130
|
}
|
|
31080
31131
|
`;
|
|
31081
|
-
const
|
|
31082
|
-
width:
|
|
31132
|
+
const ValueInput = styled.input`
|
|
31133
|
+
width: 80px;
|
|
31083
31134
|
height: 40px;
|
|
31084
31135
|
border-radius: 12px;
|
|
31085
31136
|
background: ${REDESIGN_COLORS.white};
|
|
31086
31137
|
border: 1px solid ${REDESIGN_COLORS.inputBorder};
|
|
31138
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
31139
|
+
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31140
|
+
font-size: 16px;
|
|
31141
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31142
|
+
text-align: center;
|
|
31143
|
+
outline: none;
|
|
31144
|
+
transition: border-color 0.15s;
|
|
31145
|
+
|
|
31146
|
+
&:focus {
|
|
31147
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
31148
|
+
}
|
|
31149
|
+
|
|
31150
|
+
&::-webkit-outer-spin-button,
|
|
31151
|
+
&::-webkit-inner-spin-button {
|
|
31152
|
+
-webkit-appearance: none;
|
|
31153
|
+
margin: 0;
|
|
31154
|
+
}
|
|
31155
|
+
`;
|
|
31156
|
+
const ValueInputWrapper = styled.div`
|
|
31157
|
+
position: relative;
|
|
31087
31158
|
display: flex;
|
|
31088
31159
|
align-items: center;
|
|
31089
|
-
|
|
31160
|
+
`;
|
|
31161
|
+
const CurrencyLabel = styled.span`
|
|
31162
|
+
position: absolute;
|
|
31163
|
+
right: 12px;
|
|
31090
31164
|
font-family: ${REDESIGN_FONTS.family};
|
|
31091
31165
|
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31092
31166
|
font-size: 16px;
|
|
31093
31167
|
color: ${REDESIGN_COLORS.mainText};
|
|
31168
|
+
pointer-events: none;
|
|
31094
31169
|
`;
|
|
31095
31170
|
const PresetRow = styled.div`
|
|
31096
31171
|
display: flex;
|
|
31097
|
-
gap:
|
|
31172
|
+
gap: 16px;
|
|
31098
31173
|
margin-bottom: 20px;
|
|
31174
|
+
flex-wrap: wrap;
|
|
31099
31175
|
`;
|
|
31100
|
-
const
|
|
31101
|
-
|
|
31102
|
-
|
|
31103
|
-
|
|
31176
|
+
const PresetLink = styled.button`
|
|
31177
|
+
background: none;
|
|
31178
|
+
border: none;
|
|
31179
|
+
padding: 0;
|
|
31104
31180
|
font-family: ${REDESIGN_FONTS.family};
|
|
31105
31181
|
font-size: 13px;
|
|
31106
|
-
|
|
31107
|
-
display: flex;
|
|
31108
|
-
align-items: center;
|
|
31109
|
-
justify-content: center;
|
|
31110
|
-
text-align: center;
|
|
31111
|
-
line-height: 1;
|
|
31112
|
-
flex: none;
|
|
31113
|
-
box-sizing: border-box;
|
|
31114
|
-
transition: all 0.15s;
|
|
31115
|
-
background: ${({ $selected }) => $selected ? REDESIGN_COLORS.orange : REDESIGN_COLORS.white};
|
|
31116
|
-
color: ${({ $selected }) => $selected ? "#fff" : REDESIGN_COLORS.secondaryText};
|
|
31117
|
-
border: 1px solid ${({ $selected }) => $selected ? REDESIGN_COLORS.orange : REDESIGN_COLORS.inputBorder};
|
|
31182
|
+
color: ${({ $selected }) => $selected ? REDESIGN_COLORS.mainText : REDESIGN_COLORS.secondaryText};
|
|
31118
31183
|
font-weight: ${({ $selected }) => $selected ? REDESIGN_FONTS.weight.semibold : REDESIGN_FONTS.weight.regular};
|
|
31184
|
+
text-decoration: underline;
|
|
31185
|
+
cursor: pointer;
|
|
31186
|
+
transition: color 0.15s;
|
|
31119
31187
|
|
|
31120
31188
|
&:hover {
|
|
31121
|
-
|
|
31189
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31122
31190
|
}
|
|
31123
31191
|
`;
|
|
31124
31192
|
const Divider = styled.div`
|
|
@@ -31168,9 +31236,9 @@ const REDESIGN_STEPS = {
|
|
|
31168
31236
|
[REDESIGN_STEP_IDS.city]: {
|
|
31169
31237
|
id: REDESIGN_STEP_IDS.city,
|
|
31170
31238
|
titleDe: "Wo findet dein Event statt?",
|
|
31171
|
-
titleEn: "Where is your event?",
|
|
31172
|
-
subtitleDe: "Wähle deinen Standort –
|
|
31173
|
-
subtitleEn: "Choose your location – we
|
|
31239
|
+
titleEn: "Where is your event taking place?",
|
|
31240
|
+
subtitleDe: "Wähle deinen Standort – wir kennen die besten Caterer in deiner Region.",
|
|
31241
|
+
subtitleEn: "Choose your location – we know the best caterers around you.",
|
|
31174
31242
|
breadcrumbDe: "Stadt",
|
|
31175
31243
|
breadcrumbEn: "City"
|
|
31176
31244
|
},
|
|
@@ -31201,10 +31269,12 @@ const REDESIGN_STEPS = {
|
|
|
31201
31269
|
},
|
|
31202
31270
|
[REDESIGN_STEP_IDS.contact]: {
|
|
31203
31271
|
id: REDESIGN_STEP_IDS.contact,
|
|
31204
|
-
titleDe: "
|
|
31205
|
-
titleEn: "
|
|
31206
|
-
|
|
31207
|
-
|
|
31272
|
+
titleDe: "Wohin dürfen wir deine Angebote schicken?",
|
|
31273
|
+
titleEn: "Where should we send your quotes?",
|
|
31274
|
+
subtitleDe: "Nur noch deine Kontaktdaten – danach erhältst du kostenlos & unverbindlich passende Angebote.",
|
|
31275
|
+
subtitleEn: "Just your contact details, and you'll receive matching quotes, free and with no obligation.",
|
|
31276
|
+
breadcrumbDe: "Angebote erhalten",
|
|
31277
|
+
breadcrumbEn: "Get quotes"
|
|
31208
31278
|
}
|
|
31209
31279
|
};
|
|
31210
31280
|
function getRedesignTotalSteps() {
|
|
@@ -31214,7 +31284,7 @@ const RAIL_DISPLAY_STEPS = [
|
|
|
31214
31284
|
...REDESIGN_STEP_ORDER,
|
|
31215
31285
|
REDESIGN_STEP_IDS.contact
|
|
31216
31286
|
];
|
|
31217
|
-
const StepRail = ({ currentStepId, onStepClick }) => {
|
|
31287
|
+
const StepRail = ({ currentStepId, onStepClick, answers }) => {
|
|
31218
31288
|
var _a2;
|
|
31219
31289
|
const { i18n } = useTranslation();
|
|
31220
31290
|
const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
|
|
@@ -31224,45 +31294,53 @@ const StepRail = ({ currentStepId, onStepClick }) => {
|
|
|
31224
31294
|
onStepClick(stepId);
|
|
31225
31295
|
}
|
|
31226
31296
|
};
|
|
31297
|
+
const getAnswerDisplay = (stepId) => {
|
|
31298
|
+
if (!answers) return null;
|
|
31299
|
+
switch (stepId) {
|
|
31300
|
+
case REDESIGN_STEP_IDS.city:
|
|
31301
|
+
return answers.city ? CITY_LABELS[answers.city] || answers.city : null;
|
|
31302
|
+
case REDESIGN_STEP_IDS.eventType:
|
|
31303
|
+
if (!answers.eventType) return null;
|
|
31304
|
+
const labels2 = isGerman ? EVENT_LABELS_DE : EVENT_LABELS_EN;
|
|
31305
|
+
return labels2[answers.eventType] || answers.eventType;
|
|
31306
|
+
case REDESIGN_STEP_IDS.date:
|
|
31307
|
+
return answers.eventDate ? format(answers.eventDate, "dd.MM.yy") : null;
|
|
31308
|
+
case REDESIGN_STEP_IDS.peopleCount:
|
|
31309
|
+
return answers.peopleCount ? `${answers.peopleCount} Pax` : null;
|
|
31310
|
+
default:
|
|
31311
|
+
return null;
|
|
31312
|
+
}
|
|
31313
|
+
};
|
|
31227
31314
|
return /* @__PURE__ */ jsxs(RailContainer, { children: [
|
|
31228
31315
|
/* @__PURE__ */ jsxs(TopSection, { children: [
|
|
31229
31316
|
/* @__PURE__ */ jsx(LogoWrapper$1, { children: /* @__PURE__ */ jsx(Logo, { height: 26 }) }),
|
|
31230
31317
|
/* @__PURE__ */ jsx(SectionLabel, { children: isGerman ? "Catering anfragen" : "Request catering" }),
|
|
31231
31318
|
/* @__PURE__ */ jsx(Title$1, { children: isGerman ? "In wenigen Schritten zum passenden Catering." : "Get the perfect catering in just a few steps." }),
|
|
31232
|
-
/* @__PURE__ */
|
|
31233
|
-
|
|
31234
|
-
|
|
31235
|
-
|
|
31236
|
-
|
|
31237
|
-
|
|
31238
|
-
|
|
31239
|
-
|
|
31240
|
-
|
|
31241
|
-
|
|
31242
|
-
|
|
31243
|
-
|
|
31244
|
-
|
|
31245
|
-
|
|
31246
|
-
|
|
31247
|
-
|
|
31248
|
-
|
|
31249
|
-
|
|
31250
|
-
|
|
31251
|
-
|
|
31252
|
-
|
|
31253
|
-
|
|
31254
|
-
|
|
31255
|
-
|
|
31256
|
-
|
|
31257
|
-
/* @__PURE__ */ jsxs(OffersText, { children: [
|
|
31258
|
-
/* @__PURE__ */ jsxs(OffersTitle, { children: [
|
|
31259
|
-
"3 ",
|
|
31260
|
-
isGerman ? "passende Angebote" : "matching offers"
|
|
31261
|
-
] }),
|
|
31262
|
-
/* @__PURE__ */ jsx(OffersSubtitle, { children: isGerman ? "nach wenigen Stunden" : "within hours" })
|
|
31263
|
-
] })
|
|
31264
|
-
] })
|
|
31265
|
-
] })
|
|
31319
|
+
/* @__PURE__ */ jsx(StepList, { children: RAIL_DISPLAY_STEPS.map((stepId, index) => {
|
|
31320
|
+
const step2 = REDESIGN_STEPS[stepId];
|
|
31321
|
+
const isActive = index === currentIndex;
|
|
31322
|
+
const isCompleted = index < currentIndex;
|
|
31323
|
+
const breadcrumb = isGerman ? step2.breadcrumbDe : step2.breadcrumbEn;
|
|
31324
|
+
const isClickable = index < currentIndex;
|
|
31325
|
+
const answerDisplay = isCompleted ? getAnswerDisplay(stepId) : null;
|
|
31326
|
+
return /* @__PURE__ */ jsxs(StepItemWrapper, { children: [
|
|
31327
|
+
index > 0 && /* @__PURE__ */ jsx(Connector, { $completed: index <= currentIndex }),
|
|
31328
|
+
/* @__PURE__ */ jsxs(
|
|
31329
|
+
StepRow,
|
|
31330
|
+
{
|
|
31331
|
+
$clickable: isClickable,
|
|
31332
|
+
onClick: () => handleStepClick(stepId, index),
|
|
31333
|
+
children: [
|
|
31334
|
+
/* @__PURE__ */ jsx(StepCircle, { $isActive: isActive, $isCompleted: isCompleted, children: isCompleted ? /* @__PURE__ */ jsx(CheckIcon$2, {}) : index + 1 }),
|
|
31335
|
+
/* @__PURE__ */ jsxs(StepLabelGroup, { children: [
|
|
31336
|
+
/* @__PURE__ */ jsx(StepLabel, { $isActive: isActive, $isCompleted: isCompleted, children: breadcrumb }),
|
|
31337
|
+
answerDisplay && /* @__PURE__ */ jsx(StepAnswerValue, { children: answerDisplay })
|
|
31338
|
+
] })
|
|
31339
|
+
]
|
|
31340
|
+
}
|
|
31341
|
+
)
|
|
31342
|
+
] }, stepId);
|
|
31343
|
+
}) })
|
|
31266
31344
|
] }),
|
|
31267
31345
|
/* @__PURE__ */ jsx(BottomSection, { children: /* @__PURE__ */ jsxs(RatingRow, { children: [
|
|
31268
31346
|
/* @__PURE__ */ jsx(Stars, { children: "★★★★★" }),
|
|
@@ -31275,7 +31353,6 @@ const StepRail = ({ currentStepId, onStepClick }) => {
|
|
|
31275
31353
|
] });
|
|
31276
31354
|
};
|
|
31277
31355
|
const CheckIcon$2 = () => /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) });
|
|
31278
|
-
const CheckIconMuted = () => /* @__PURE__ */ jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) });
|
|
31279
31356
|
const RailContainer = styled.div`
|
|
31280
31357
|
display: none;
|
|
31281
31358
|
|
|
@@ -31319,13 +31396,8 @@ const Connector = styled.div`
|
|
|
31319
31396
|
width: 2px;
|
|
31320
31397
|
height: ${REDESIGN_SPACING.connectorHeight};
|
|
31321
31398
|
margin: 3px 0 3px 14px;
|
|
31322
|
-
background: ${({ $completed }) => $completed ? REDESIGN_COLORS.
|
|
31323
|
-
|
|
31324
|
-
const FinalConnector = styled.div`
|
|
31325
|
-
width: 2px;
|
|
31326
|
-
height: ${REDESIGN_SPACING.connectorHeight};
|
|
31327
|
-
margin: 3px 0 3px 14px;
|
|
31328
|
-
background: ${REDESIGN_COLORS.railConnector};
|
|
31399
|
+
background: ${({ $completed }) => $completed ? REDESIGN_COLORS.orange : REDESIGN_COLORS.railConnector};
|
|
31400
|
+
transition: background 0.3s ease;
|
|
31329
31401
|
`;
|
|
31330
31402
|
const StepRow = styled.div`
|
|
31331
31403
|
display: flex;
|
|
@@ -31352,6 +31424,7 @@ const StepCircle = styled.div`
|
|
|
31352
31424
|
font-size: 13px;
|
|
31353
31425
|
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31354
31426
|
flex: none;
|
|
31427
|
+
transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
|
|
31355
31428
|
background: ${({ $isActive, $isCompleted }) => {
|
|
31356
31429
|
if ($isCompleted) return REDESIGN_COLORS.mainText;
|
|
31357
31430
|
if ($isActive) return REDESIGN_COLORS.orange;
|
|
@@ -31362,45 +31435,39 @@ const StepCircle = styled.div`
|
|
|
31362
31435
|
return REDESIGN_COLORS.railMuted;
|
|
31363
31436
|
}};
|
|
31364
31437
|
`;
|
|
31438
|
+
const StepLabelGroup = styled.div`
|
|
31439
|
+
display: flex;
|
|
31440
|
+
flex-direction: column;
|
|
31441
|
+
gap: 2px;
|
|
31442
|
+
`;
|
|
31365
31443
|
const StepLabel = styled.span`
|
|
31366
31444
|
font-family: ${REDESIGN_FONTS.family};
|
|
31367
31445
|
font-size: 14px;
|
|
31368
31446
|
font-weight: ${({ $isActive }) => $isActive ? REDESIGN_FONTS.weight.semibold : REDESIGN_FONTS.weight.regular};
|
|
31447
|
+
transition: color 0.3s ease;
|
|
31369
31448
|
color: ${({ $isActive, $isCompleted }) => {
|
|
31370
31449
|
if ($isActive) return REDESIGN_COLORS.mainText;
|
|
31371
31450
|
if ($isCompleted) return REDESIGN_COLORS.secondaryText;
|
|
31372
31451
|
return REDESIGN_COLORS.railMuted;
|
|
31373
31452
|
}};
|
|
31374
31453
|
`;
|
|
31375
|
-
const
|
|
31376
|
-
display: flex;
|
|
31377
|
-
align-items: center;
|
|
31378
|
-
gap: 13px;
|
|
31379
|
-
`;
|
|
31380
|
-
const OffersCircle = styled.div`
|
|
31381
|
-
width: ${REDESIGN_SPACING.stepCircleSize};
|
|
31382
|
-
height: ${REDESIGN_SPACING.stepCircleSize};
|
|
31383
|
-
border-radius: 50%;
|
|
31384
|
-
flex: none;
|
|
31385
|
-
display: flex;
|
|
31386
|
-
align-items: center;
|
|
31387
|
-
justify-content: center;
|
|
31388
|
-
background: ${REDESIGN_COLORS.railInactive};
|
|
31389
|
-
color: ${REDESIGN_COLORS.muted};
|
|
31390
|
-
`;
|
|
31391
|
-
const OffersText = styled.div``;
|
|
31392
|
-
const OffersTitle = styled.div`
|
|
31393
|
-
font-family: ${REDESIGN_FONTS.family};
|
|
31394
|
-
font-size: 14px;
|
|
31395
|
-
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
31396
|
-
color: ${REDESIGN_COLORS.mainText};
|
|
31397
|
-
line-height: 1.25;
|
|
31398
|
-
`;
|
|
31399
|
-
const OffersSubtitle = styled.div`
|
|
31454
|
+
const StepAnswerValue = styled.span`
|
|
31400
31455
|
font-family: ${REDESIGN_FONTS.family};
|
|
31401
31456
|
font-size: 12px;
|
|
31402
|
-
|
|
31403
|
-
|
|
31457
|
+
font-weight: ${REDESIGN_FONTS.weight.medium};
|
|
31458
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
31459
|
+
animation: fadeIn 0.3s ease;
|
|
31460
|
+
|
|
31461
|
+
@keyframes fadeIn {
|
|
31462
|
+
from {
|
|
31463
|
+
opacity: 0;
|
|
31464
|
+
transform: translateY(-4px);
|
|
31465
|
+
}
|
|
31466
|
+
to {
|
|
31467
|
+
opacity: 1;
|
|
31468
|
+
transform: translateY(0);
|
|
31469
|
+
}
|
|
31470
|
+
}
|
|
31404
31471
|
`;
|
|
31405
31472
|
const BottomSection = styled.div``;
|
|
31406
31473
|
const RatingRow = styled.div`
|
|
@@ -31578,8 +31645,8 @@ const RedesignContactForm = ({
|
|
|
31578
31645
|
company: create$5().required(isGerman ? "Bitte Firma eingeben" : "Please enter company"),
|
|
31579
31646
|
email: create$5().email(isGerman ? "Bitte gültige E-Mail eingeben" : "Please enter valid email").required(isGerman ? "Bitte E-Mail eingeben" : "Please enter email"),
|
|
31580
31647
|
phone: create$5().required(isGerman ? "Bitte Telefon eingeben" : "Please enter phone"),
|
|
31581
|
-
deliveryAddressStreet: create$5().min(1).required(),
|
|
31582
|
-
deliveryAddressCity: create$5().min(1).required()
|
|
31648
|
+
deliveryAddressStreet: create$5().min(1).required(isGerman ? "Bitte Lieferadresse eingeben" : "Please enter delivery address"),
|
|
31649
|
+
deliveryAddressCity: create$5().min(1).required(isGerman ? "Bitte Stadt eingeben" : "Please enter city")
|
|
31583
31650
|
});
|
|
31584
31651
|
const buildSummaryChips = () => {
|
|
31585
31652
|
const chips = [];
|
|
@@ -31655,12 +31722,12 @@ const RedesignContactForm = ({
|
|
|
31655
31722
|
] }, index))
|
|
31656
31723
|
] }),
|
|
31657
31724
|
/* @__PURE__ */ jsx(NudgeWrap, { children: !commentOpen ? /* @__PURE__ */ jsxs(NudgeClosed, { onClick: () => setCommentOpen(true), children: [
|
|
31658
|
-
/* @__PURE__ */ jsx(NudgeIconWrap, { children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) }) }),
|
|
31659
31725
|
/* @__PURE__ */ jsxs(NudgeContent, { children: [
|
|
31660
|
-
/* @__PURE__ */ jsx(NudgeTitle, { children: isGerman ? "
|
|
31661
|
-
/* @__PURE__ */ jsx(NudgeDesc, { children: isGerman ? "
|
|
31726
|
+
/* @__PURE__ */ jsx(NudgeTitle, { children: isGerman ? "Hast du weitere konkrete Vorstellungen?" : "Anything specific you have in mind?" }),
|
|
31727
|
+
/* @__PURE__ */ jsx(NudgeDesc, { children: isGerman ? "Je genauer du Ablauf oder besondere Wünsche beschreibst, desto passender werden deine Angebote." : "The more you tell us about the schedule or any special requests, the better your quotes will match." }),
|
|
31728
|
+
/* @__PURE__ */ jsx(NudgeReassurance, { children: isGerman ? "Optional – du kannst uns auch ohne weitere Details anfragen und wir beraten dich." : "Optional. You can also send your enquiry without any further details and we'll advise you." })
|
|
31662
31729
|
] }),
|
|
31663
|
-
/* @__PURE__ */ jsx(
|
|
31730
|
+
/* @__PURE__ */ jsx(NudgeIconWrap, { children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) }) })
|
|
31664
31731
|
] }) : /* @__PURE__ */ jsxs(NudgeOpen, { children: [
|
|
31665
31732
|
/* @__PURE__ */ jsxs(FormLabel, { children: [
|
|
31666
31733
|
isGerman ? "Deine Wünsche" : "Your preferences",
|
|
@@ -31909,7 +31976,8 @@ const NudgeWrap = styled.div`
|
|
|
31909
31976
|
`;
|
|
31910
31977
|
const NudgeClosed = styled.div`
|
|
31911
31978
|
display: flex;
|
|
31912
|
-
align-items:
|
|
31979
|
+
align-items: flex-start;
|
|
31980
|
+
justify-content: space-between;
|
|
31913
31981
|
gap: 12px;
|
|
31914
31982
|
cursor: pointer;
|
|
31915
31983
|
padding: 13px 16px;
|
|
@@ -31924,6 +31992,7 @@ const NudgeIconWrap = styled.div`
|
|
|
31924
31992
|
display: flex;
|
|
31925
31993
|
align-items: center;
|
|
31926
31994
|
justify-content: center;
|
|
31995
|
+
margin-top: 2px;
|
|
31927
31996
|
`;
|
|
31928
31997
|
const NudgeContent = styled.div`
|
|
31929
31998
|
flex: 1;
|
|
@@ -31942,12 +32011,14 @@ const NudgeDesc = styled.div`
|
|
|
31942
32011
|
line-height: 1.4;
|
|
31943
32012
|
margin-top: 1px;
|
|
31944
32013
|
`;
|
|
31945
|
-
const
|
|
31946
|
-
flex: none;
|
|
32014
|
+
const NudgeReassurance = styled.div`
|
|
31947
32015
|
font-family: ${REDESIGN_FONTS.family};
|
|
31948
|
-
font-size:
|
|
31949
|
-
|
|
31950
|
-
|
|
32016
|
+
font-size: 11px;
|
|
32017
|
+
color: ${REDESIGN_COLORS.muted};
|
|
32018
|
+
line-height: 1.4;
|
|
32019
|
+
margin-top: 8px;
|
|
32020
|
+
padding-top: 8px;
|
|
32021
|
+
border-top: 1px solid ${REDESIGN_COLORS.inputBorder};
|
|
31951
32022
|
`;
|
|
31952
32023
|
const NudgeOpen = styled.div`
|
|
31953
32024
|
padding: 14px 16px;
|
|
@@ -32012,8 +32083,10 @@ const AddressFieldWrapper = styled.div`
|
|
|
32012
32083
|
position: relative;
|
|
32013
32084
|
z-index: 1;
|
|
32014
32085
|
|
|
32015
|
-
.MuiFormControl-root
|
|
32086
|
+
.MuiFormControl-root,
|
|
32087
|
+
.hc-form-control {
|
|
32016
32088
|
width: 100%;
|
|
32089
|
+
margin-bottom: 0;
|
|
32017
32090
|
}
|
|
32018
32091
|
|
|
32019
32092
|
.MuiAutocomplete-root {
|
|
@@ -32032,7 +32105,7 @@ const AddressFieldWrapper = styled.div`
|
|
|
32032
32105
|
font-family: ${REDESIGN_FONTS.family};
|
|
32033
32106
|
font-size: 15px;
|
|
32034
32107
|
color: ${REDESIGN_COLORS.mainText};
|
|
32035
|
-
background: ${REDESIGN_COLORS.white};
|
|
32108
|
+
background: ${REDESIGN_COLORS.white} !important;
|
|
32036
32109
|
transition: border-color 0.15s;
|
|
32037
32110
|
cursor: text;
|
|
32038
32111
|
|
|
@@ -32057,6 +32130,7 @@ const AddressFieldWrapper = styled.div`
|
|
|
32057
32130
|
font-family: ${REDESIGN_FONTS.family};
|
|
32058
32131
|
font-size: 15px;
|
|
32059
32132
|
cursor: text;
|
|
32133
|
+
background: transparent !important;
|
|
32060
32134
|
|
|
32061
32135
|
&::placeholder {
|
|
32062
32136
|
color: #a5a5a5;
|
|
@@ -32065,7 +32139,35 @@ const AddressFieldWrapper = styled.div`
|
|
|
32065
32139
|
}
|
|
32066
32140
|
}
|
|
32067
32141
|
|
|
32068
|
-
|
|
32142
|
+
/* Override the custom Input component styles */
|
|
32143
|
+
.hc-form-control input[name="delivery_address"] {
|
|
32144
|
+
width: 100%;
|
|
32145
|
+
padding: 13px 16px;
|
|
32146
|
+
border: 1px solid ${REDESIGN_COLORS.inputBorder};
|
|
32147
|
+
border-radius: 12px;
|
|
32148
|
+
font-family: ${REDESIGN_FONTS.family};
|
|
32149
|
+
font-size: 15px;
|
|
32150
|
+
color: ${REDESIGN_COLORS.mainText};
|
|
32151
|
+
background: ${REDESIGN_COLORS.white} !important;
|
|
32152
|
+
transition: border-color 0.15s;
|
|
32153
|
+
|
|
32154
|
+
&:hover {
|
|
32155
|
+
border-color: #cfcfcf;
|
|
32156
|
+
}
|
|
32157
|
+
|
|
32158
|
+
&:focus {
|
|
32159
|
+
border-color: ${REDESIGN_COLORS.orange};
|
|
32160
|
+
outline: none;
|
|
32161
|
+
}
|
|
32162
|
+
|
|
32163
|
+
&::placeholder {
|
|
32164
|
+
color: #a5a5a5;
|
|
32165
|
+
opacity: 1;
|
|
32166
|
+
}
|
|
32167
|
+
}
|
|
32168
|
+
|
|
32169
|
+
.MuiInputLabel-root,
|
|
32170
|
+
label {
|
|
32069
32171
|
font-family: ${REDESIGN_FONTS.family};
|
|
32070
32172
|
font-size: 13px;
|
|
32071
32173
|
font-weight: ${REDESIGN_FONTS.weight.semibold};
|
|
@@ -32073,25 +32175,37 @@ const AddressFieldWrapper = styled.div`
|
|
|
32073
32175
|
position: relative;
|
|
32074
32176
|
transform: none;
|
|
32075
32177
|
margin-bottom: 6px;
|
|
32178
|
+
margin-left: 0 !important;
|
|
32076
32179
|
pointer-events: none;
|
|
32180
|
+
display: block;
|
|
32077
32181
|
|
|
32078
32182
|
&.Mui-focused {
|
|
32079
32183
|
color: ${REDESIGN_COLORS.mainText};
|
|
32080
32184
|
}
|
|
32081
32185
|
}
|
|
32082
32186
|
|
|
32083
|
-
.MuiFormHelperText-root
|
|
32187
|
+
.MuiFormHelperText-root,
|
|
32188
|
+
.hc-form-control span {
|
|
32084
32189
|
font-family: ${REDESIGN_FONTS.family};
|
|
32085
32190
|
font-size: 11.5px;
|
|
32086
32191
|
color: ${REDESIGN_COLORS.muted};
|
|
32087
32192
|
margin: 5px 0 0;
|
|
32193
|
+
margin-left: 0 !important;
|
|
32194
|
+
display: block;
|
|
32088
32195
|
|
|
32089
32196
|
&.Mui-error {
|
|
32090
|
-
${({ $hideInitialError }) => $hideInitialError
|
|
32197
|
+
display: ${({ $hideInitialError }) => $hideInitialError ? "none !important" : "block"};
|
|
32091
32198
|
color: ${REDESIGN_COLORS.error};
|
|
32092
32199
|
}
|
|
32093
32200
|
}
|
|
32094
32201
|
|
|
32202
|
+
/* Hide error text from AddressAutocomplete until form submission */
|
|
32203
|
+
.hc-form-control--error {
|
|
32204
|
+
span:not(:last-of-type) {
|
|
32205
|
+
display: ${({ $hideInitialError }) => $hideInitialError ? "none" : "block"} !important;
|
|
32206
|
+
}
|
|
32207
|
+
}
|
|
32208
|
+
|
|
32095
32209
|
.MuiAutocomplete-listbox {
|
|
32096
32210
|
font-family: ${REDESIGN_FONTS.family};
|
|
32097
32211
|
}
|
|
@@ -32290,11 +32404,17 @@ const RedesignedFunnel = ({
|
|
|
32290
32404
|
useEffect(() => {
|
|
32291
32405
|
if (currentStepId === "redesign_people_count") {
|
|
32292
32406
|
const existingCount = answerOf("min_order_number");
|
|
32293
|
-
const existingBudget = answerOf("price_per_person");
|
|
32294
32407
|
if (existingCount === void 0) {
|
|
32295
32408
|
actions.answerQuestion("min_order_number", 100);
|
|
32296
32409
|
}
|
|
32297
|
-
|
|
32410
|
+
const eventType = answerOf("event_type");
|
|
32411
|
+
const existingBudget = answerOf("price_per_person");
|
|
32412
|
+
if (existingBudget === void 0 && eventType) {
|
|
32413
|
+
const category = EVENT_TYPE_MAPPINGS[eventType].catering_category;
|
|
32414
|
+
const defaultBudget = PRICE_PER_PERSON_OF_CATEGORY[category].defaultPricePerPerson;
|
|
32415
|
+
setBudgetPerPerson(defaultBudget);
|
|
32416
|
+
actions.answerQuestion("price_per_person", defaultBudget);
|
|
32417
|
+
} else if (existingBudget === void 0) {
|
|
32298
32418
|
actions.answerQuestion("price_per_person", budgetPerPerson2);
|
|
32299
32419
|
}
|
|
32300
32420
|
}
|
|
@@ -32395,10 +32515,13 @@ const RedesignedFunnel = ({
|
|
|
32395
32515
|
};
|
|
32396
32516
|
const response = await submitAsNewCustomer(buildValues);
|
|
32397
32517
|
const { signInToken, opportunity } = response || {};
|
|
32398
|
-
if (opportunity
|
|
32399
|
-
|
|
32400
|
-
|
|
32518
|
+
if (!opportunity || !opportunity.id) {
|
|
32519
|
+
console.error("[HeyCater Funnel] submitAsNewCustomer returned invalid opportunity:", response);
|
|
32520
|
+
setIsSubmitting(false);
|
|
32521
|
+
return;
|
|
32401
32522
|
}
|
|
32523
|
+
const accountUrl = signInToken ? `/${router.locale}/account/requests/${opportunity.id}?one_time_sign_in_token=${signInToken}` : `/${router.locale}/account/external/requests/${opportunity.id}`;
|
|
32524
|
+
setRedirectUrl(accountUrl);
|
|
32402
32525
|
trackCompleted(funnelContextRef.current);
|
|
32403
32526
|
setSubmittedData(formData);
|
|
32404
32527
|
setPhase("done");
|
|
@@ -32426,6 +32549,12 @@ const RedesignedFunnel = ({
|
|
|
32426
32549
|
return false;
|
|
32427
32550
|
}
|
|
32428
32551
|
}, [currentStepId, answerOf]);
|
|
32552
|
+
const buildStepAnswers = () => ({
|
|
32553
|
+
city: answerOf("city"),
|
|
32554
|
+
eventType: answerOf("event_type"),
|
|
32555
|
+
eventDate: answerOf("event_date"),
|
|
32556
|
+
peopleCount: answerOf("min_order_number")
|
|
32557
|
+
});
|
|
32429
32558
|
const buildSelectionChips = () => {
|
|
32430
32559
|
const chips2 = [];
|
|
32431
32560
|
const city = answerOf("city");
|
|
@@ -32447,10 +32576,11 @@ const RedesignedFunnel = ({
|
|
|
32447
32576
|
return /* @__PURE__ */ jsx(FunnelContainer, { children: /* @__PURE__ */ jsx(MainContent, { $fullWidth: true, children: /* @__PURE__ */ jsx(LoadingScreen, { onComplete: handleLoadingComplete }) }) });
|
|
32448
32577
|
}
|
|
32449
32578
|
if (phase === "contact") {
|
|
32450
|
-
const
|
|
32451
|
-
const
|
|
32579
|
+
const contactStep = REDESIGN_STEPS[REDESIGN_STEP_IDS.contact];
|
|
32580
|
+
const contactTitle = isGerman ? contactStep.titleDe : contactStep.titleEn;
|
|
32581
|
+
const contactSubtitle = isGerman ? contactStep.subtitleDe : contactStep.subtitleEn;
|
|
32452
32582
|
return /* @__PURE__ */ jsxs(FunnelContainer, { children: [
|
|
32453
|
-
/* @__PURE__ */ jsx(StepRail, { currentStepId: REDESIGN_STEP_IDS.contact, onStepClick: goToStep }),
|
|
32583
|
+
/* @__PURE__ */ jsx(StepRail, { currentStepId: REDESIGN_STEP_IDS.contact, onStepClick: goToStep, answers: buildStepAnswers() }),
|
|
32454
32584
|
/* @__PURE__ */ jsxs(MainContent, { children: [
|
|
32455
32585
|
/* @__PURE__ */ jsxs(MobileHeader, { children: [
|
|
32456
32586
|
/* @__PURE__ */ jsx(MobileLogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 20 }) }),
|
|
@@ -32569,7 +32699,7 @@ const RedesignedFunnel = ({
|
|
|
32569
32699
|
}
|
|
32570
32700
|
};
|
|
32571
32701
|
return /* @__PURE__ */ jsxs(FunnelContainer, { children: [
|
|
32572
|
-
/* @__PURE__ */ jsx(StepRail, { currentStepId, onStepClick: goToStep }),
|
|
32702
|
+
/* @__PURE__ */ jsx(StepRail, { currentStepId, onStepClick: goToStep, answers: buildStepAnswers() }),
|
|
32573
32703
|
/* @__PURE__ */ jsxs(MainContent, { children: [
|
|
32574
32704
|
/* @__PURE__ */ jsxs(MobileHeader, { children: [
|
|
32575
32705
|
/* @__PURE__ */ jsx(MobileLogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 20 }) }),
|
|
@@ -32698,9 +32828,7 @@ const CancelText = styled.span`
|
|
|
32698
32828
|
}
|
|
32699
32829
|
`;
|
|
32700
32830
|
const DesktopStepCount = styled.span`
|
|
32701
|
-
|
|
32702
|
-
font-size: 13px;
|
|
32703
|
-
color: ${REDESIGN_COLORS.muted};
|
|
32831
|
+
display: none;
|
|
32704
32832
|
`;
|
|
32705
32833
|
const ContentArea = styled.div`
|
|
32706
32834
|
flex: 1;
|
|
@@ -32783,7 +32911,7 @@ const ChipRow = styled.div`
|
|
|
32783
32911
|
justify-content: center;
|
|
32784
32912
|
|
|
32785
32913
|
@media (min-width: 960px) {
|
|
32786
|
-
|
|
32914
|
+
display: none;
|
|
32787
32915
|
}
|
|
32788
32916
|
`;
|
|
32789
32917
|
const ChipLabel = styled.span`
|