@heycater/qualification-funnel 1.19.15 → 1.19.17

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/index.esm.js CHANGED
@@ -12476,7 +12476,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
12476
12476
  var ys = arrObjKeys(obj, inspect2);
12477
12477
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
12478
12478
  var protoTag = obj instanceof Object ? "" : "null prototype";
12479
- var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
12479
+ var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
12480
12480
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
12481
12481
  var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
12482
12482
  if (ys.length === 0) {
@@ -12501,25 +12501,25 @@ function canTrustToString(obj) {
12501
12501
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
12502
12502
  }
12503
12503
  function isArray$3(obj) {
12504
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
12504
+ return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
12505
12505
  }
12506
12506
  function isDate(obj) {
12507
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
12507
+ return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
12508
12508
  }
12509
12509
  function isRegExp$1(obj) {
12510
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
12510
+ return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
12511
12511
  }
12512
12512
  function isError(obj) {
12513
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
12513
+ return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
12514
12514
  }
12515
12515
  function isString(obj) {
12516
- return toStr(obj) === "[object String]" && canTrustToString(obj);
12516
+ return toStr$1(obj) === "[object String]" && canTrustToString(obj);
12517
12517
  }
12518
12518
  function isNumber(obj) {
12519
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
12519
+ return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
12520
12520
  }
12521
12521
  function isBoolean(obj) {
12522
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
12522
+ return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
12523
12523
  }
12524
12524
  function isSymbol(obj) {
12525
12525
  if (hasShammedSymbols) {
@@ -12555,7 +12555,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
12555
12555
  function has$4(obj, key) {
12556
12556
  return hasOwn$1.call(obj, key);
12557
12557
  }
12558
- function toStr(obj) {
12558
+ function toStr$1(obj) {
12559
12559
  return objectToString.call(obj);
12560
12560
  }
12561
12561
  function nameOf(f) {
@@ -12864,7 +12864,7 @@ var syntax = SyntaxError;
12864
12864
  var uri = URIError;
12865
12865
  var abs$1 = Math.abs;
12866
12866
  var floor$1 = Math.floor;
12867
- var max$1 = Math.max;
12867
+ var max$2 = Math.max;
12868
12868
  var min$1 = Math.min;
12869
12869
  var pow$1 = Math.pow;
12870
12870
  var round$2 = Math.round;
@@ -12993,91 +12993,77 @@ function requireObject_getPrototypeOf() {
12993
12993
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
12994
12994
  return Object_getPrototypeOf;
12995
12995
  }
12996
- var implementation;
12997
- var hasRequiredImplementation;
12998
- function requireImplementation() {
12999
- if (hasRequiredImplementation) return implementation;
13000
- hasRequiredImplementation = 1;
13001
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
13002
- var toStr2 = Object.prototype.toString;
13003
- var max2 = Math.max;
13004
- var funcType = "[object Function]";
13005
- var concatty = function concatty2(a3, b2) {
13006
- var arr = [];
13007
- for (var i2 = 0; i2 < a3.length; i2 += 1) {
13008
- arr[i2] = a3[i2];
13009
- }
13010
- for (var j = 0; j < b2.length; j += 1) {
13011
- arr[j + a3.length] = b2[j];
13012
- }
13013
- return arr;
13014
- };
13015
- var slicy = function slicy2(arrLike, offset2) {
13016
- var arr = [];
13017
- for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
13018
- arr[j] = arrLike[i2];
13019
- }
13020
- return arr;
13021
- };
13022
- var joiny = function(arr, joiner) {
13023
- var str = "";
13024
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
13025
- str += arr[i2];
13026
- if (i2 + 1 < arr.length) {
13027
- str += joiner;
13028
- }
12996
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
12997
+ var toStr = Object.prototype.toString;
12998
+ var max$1 = Math.max;
12999
+ var funcType = "[object Function]";
13000
+ var concatty = function concatty2(a3, b2) {
13001
+ var arr = [];
13002
+ for (var i2 = 0; i2 < a3.length; i2 += 1) {
13003
+ arr[i2] = a3[i2];
13004
+ }
13005
+ for (var j = 0; j < b2.length; j += 1) {
13006
+ arr[j + a3.length] = b2[j];
13007
+ }
13008
+ return arr;
13009
+ };
13010
+ var slicy = function slicy2(arrLike, offset2) {
13011
+ var arr = [];
13012
+ for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
13013
+ arr[j] = arrLike[i2];
13014
+ }
13015
+ return arr;
13016
+ };
13017
+ var joiny = function(arr, joiner) {
13018
+ var str = "";
13019
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
13020
+ str += arr[i2];
13021
+ if (i2 + 1 < arr.length) {
13022
+ str += joiner;
13029
13023
  }
13030
- return str;
13031
- };
13032
- implementation = function bind2(that) {
13033
- var target = this;
13034
- if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
13035
- throw new TypeError(ERROR_MESSAGE + target);
13036
- }
13037
- var args = slicy(arguments, 1);
13038
- var bound;
13039
- var binder = function() {
13040
- if (this instanceof bound) {
13041
- var result = target.apply(
13042
- this,
13043
- concatty(args, arguments)
13044
- );
13045
- if (Object(result) === result) {
13046
- return result;
13047
- }
13048
- return this;
13049
- }
13050
- return target.apply(
13051
- that,
13024
+ }
13025
+ return str;
13026
+ };
13027
+ var implementation$1 = function bind(that) {
13028
+ var target = this;
13029
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
13030
+ throw new TypeError(ERROR_MESSAGE + target);
13031
+ }
13032
+ var args = slicy(arguments, 1);
13033
+ var bound;
13034
+ var binder = function() {
13035
+ if (this instanceof bound) {
13036
+ var result = target.apply(
13037
+ this,
13052
13038
  concatty(args, arguments)
13053
13039
  );
13054
- };
13055
- var boundLength = max2(0, target.length - args.length);
13056
- var boundArgs = [];
13057
- for (var i2 = 0; i2 < boundLength; i2++) {
13058
- boundArgs[i2] = "$" + i2;
13059
- }
13060
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
13061
- if (target.prototype) {
13062
- var Empty = function Empty2() {
13063
- };
13064
- Empty.prototype = target.prototype;
13065
- bound.prototype = new Empty();
13066
- Empty.prototype = null;
13040
+ if (Object(result) === result) {
13041
+ return result;
13042
+ }
13043
+ return this;
13067
13044
  }
13068
- return bound;
13045
+ return target.apply(
13046
+ that,
13047
+ concatty(args, arguments)
13048
+ );
13069
13049
  };
13070
- return implementation;
13071
- }
13072
- var functionBind;
13073
- var hasRequiredFunctionBind;
13074
- function requireFunctionBind() {
13075
- if (hasRequiredFunctionBind) return functionBind;
13076
- hasRequiredFunctionBind = 1;
13077
- var implementation2 = requireImplementation();
13078
- functionBind = Function.prototype.bind || implementation2;
13079
- return functionBind;
13080
- }
13050
+ var boundLength = max$1(0, target.length - args.length);
13051
+ var boundArgs = [];
13052
+ for (var i2 = 0; i2 < boundLength; i2++) {
13053
+ boundArgs[i2] = "$" + i2;
13054
+ }
13055
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
13056
+ if (target.prototype) {
13057
+ var Empty = function Empty2() {
13058
+ };
13059
+ Empty.prototype = target.prototype;
13060
+ bound.prototype = new Empty();
13061
+ Empty.prototype = null;
13062
+ }
13063
+ return bound;
13064
+ };
13065
+ var implementation = implementation$1;
13066
+ var functionBind = Function.prototype.bind || implementation;
13081
13067
  var functionCall = Function.prototype.call;
13082
13068
  var functionApply;
13083
13069
  var hasRequiredFunctionApply;
@@ -13088,12 +13074,12 @@ function requireFunctionApply() {
13088
13074
  return functionApply;
13089
13075
  }
13090
13076
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
13091
- var bind$2 = requireFunctionBind();
13077
+ var bind$2 = functionBind;
13092
13078
  var $apply$1 = requireFunctionApply();
13093
13079
  var $call$2 = functionCall;
13094
13080
  var $reflectApply = reflectApply;
13095
13081
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
13096
- var bind$1 = requireFunctionBind();
13082
+ var bind$1 = functionBind;
13097
13083
  var $TypeError$4 = type;
13098
13084
  var $call$1 = functionCall;
13099
13085
  var $actualApply = actualApply;
@@ -13161,8 +13147,8 @@ function requireHasown() {
13161
13147
  hasRequiredHasown = 1;
13162
13148
  var call = Function.prototype.call;
13163
13149
  var $hasOwn = Object.prototype.hasOwnProperty;
13164
- var bind2 = requireFunctionBind();
13165
- hasown = bind2.call(call, $hasOwn);
13150
+ var bind3 = functionBind;
13151
+ hasown = bind3.call(call, $hasOwn);
13166
13152
  return hasown;
13167
13153
  }
13168
13154
  var undefined$1;
@@ -13176,7 +13162,7 @@ var $TypeError$3 = type;
13176
13162
  var $URIError = uri;
13177
13163
  var abs = abs$1;
13178
13164
  var floor = floor$1;
13179
- var max = max$1;
13165
+ var max = max$2;
13180
13166
  var min = min$1;
13181
13167
  var pow = pow$1;
13182
13168
  var round$1 = round$2;
@@ -13381,13 +13367,13 @@ var LEGACY_ALIASES = {
13381
13367
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
13382
13368
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
13383
13369
  };
13384
- var bind = requireFunctionBind();
13370
+ var bind2 = functionBind;
13385
13371
  var hasOwn = requireHasown();
13386
- var $concat = bind.call($call, Array.prototype.concat);
13387
- var $spliceApply = bind.call($apply, Array.prototype.splice);
13388
- var $replace = bind.call($call, String.prototype.replace);
13389
- var $strSlice = bind.call($call, String.prototype.slice);
13390
- var $exec = bind.call($call, RegExp.prototype.exec);
13372
+ var $concat = bind2.call($call, Array.prototype.concat);
13373
+ var $spliceApply = bind2.call($apply, Array.prototype.splice);
13374
+ var $replace = bind2.call($call, String.prototype.replace);
13375
+ var $strSlice = bind2.call($call, String.prototype.slice);
13376
+ var $exec = bind2.call($call, RegExp.prototype.exec);
13391
13377
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13392
13378
  var reEscapeChar = /\\(\\)?/g;
13393
13379
  var stringToPath = function stringToPath2(string2) {
@@ -26445,14 +26431,19 @@ function FormikFormField({
26445
26431
  }
26446
26432
  const capitalizeFirstLetter = (str) => str ? str.charAt(0).toUpperCase() + str.slice(1) : "";
26447
26433
  function PhoneField({ label, name, formik, helperText }) {
26448
- const error = formik.errors.phone;
26434
+ const { t: t2 } = useTranslation();
26435
+ const isGb = useIsGb();
26436
+ const rawError = formik.errors.phone;
26437
+ const error = rawError ? t2(rawError) : rawError;
26449
26438
  const fieldValue = formik.values.phone;
26450
26439
  const touched = formik.touched.phone;
26440
+ const countryPrefix = isGb ? "+44" : "+49";
26441
+ const placeholder = isGb ? "+44 20 7946 0958" : "+49 30 56837200";
26451
26442
  const handleChange = (e2) => {
26452
26443
  let value = e2.target.value;
26453
26444
  value = value.replace(/[^\d+\s-]/g, "");
26454
26445
  if (!value.startsWith("+")) {
26455
- value = "+49" + value.replace(/^\+/, "");
26446
+ value = countryPrefix + value.replace(/^\+/, "");
26456
26447
  }
26457
26448
  formik.setFieldValue("phone", value, true);
26458
26449
  };
@@ -26466,7 +26457,7 @@ function PhoneField({ label, name, formik, helperText }) {
26466
26457
  value: fieldValue,
26467
26458
  onChange: handleChange,
26468
26459
  onBlur: () => formik.setFieldTouched("phone", true),
26469
- placeholder: "+49 30 56837200",
26460
+ placeholder,
26470
26461
  $hasError: Boolean(touched && error)
26471
26462
  }
26472
26463
  ),
@@ -29769,8 +29760,14 @@ const ENGLISH_RESOURCES = {
29769
29760
  };
29770
29761
  const localeResources = {
29771
29762
  en: { ...ENGLISH_RESOURCES },
29763
+ "en-uk": { ...ENGLISH_RESOURCES },
29764
+ "en-de": { ...ENGLISH_RESOURCES },
29772
29765
  de: { ...GERMAN_RESOURCES },
29773
- da: { ...ENGLISH_RESOURCES }
29766
+ "de-at": { ...GERMAN_RESOURCES },
29767
+ "de-ch": { ...GERMAN_RESOURCES },
29768
+ "de-de": { ...GERMAN_RESOURCES },
29769
+ da: { ...ENGLISH_RESOURCES },
29770
+ "da-dk": { ...ENGLISH_RESOURCES }
29774
29771
  };
29775
29772
  const LOCALE_FALLBACKS = {
29776
29773
  "en-uk": ["en"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycater/qualification-funnel",
3
- "version": "1.19.15",
3
+ "version": "1.19.17",
4
4
  "type": "module",
5
5
  "description": "Heycater embedded qualification funnel widget",
6
6
  "main": "dist/index.cjs.js",