@heycater/qualification-funnel 1.19.16 → 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,99 +12993,78 @@ 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];
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;
13019
13023
  }
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;
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,
13038
+ concatty(args, arguments)
13039
+ );
13040
+ if (Object(result) === result) {
13041
+ return result;
13028
13042
  }
13043
+ return this;
13029
13044
  }
13030
- return str;
13045
+ return target.apply(
13046
+ that,
13047
+ concatty(args, arguments)
13048
+ );
13031
13049
  };
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,
13052
- concatty(args, arguments)
13053
- );
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() {
13054
13058
  };
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;
13067
- }
13068
- return bound;
13069
- };
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
- }
13081
- var functionCall;
13082
- var hasRequiredFunctionCall;
13083
- function requireFunctionCall() {
13084
- if (hasRequiredFunctionCall) return functionCall;
13085
- hasRequiredFunctionCall = 1;
13086
- functionCall = Function.prototype.call;
13087
- return functionCall;
13088
- }
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;
13067
+ var functionCall = Function.prototype.call;
13089
13068
  var functionApply;
13090
13069
  var hasRequiredFunctionApply;
13091
13070
  function requireFunctionApply() {
@@ -13095,14 +13074,14 @@ function requireFunctionApply() {
13095
13074
  return functionApply;
13096
13075
  }
13097
13076
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
13098
- var bind$2 = requireFunctionBind();
13077
+ var bind$2 = functionBind;
13099
13078
  var $apply$1 = requireFunctionApply();
13100
- var $call$2 = requireFunctionCall();
13079
+ var $call$2 = functionCall;
13101
13080
  var $reflectApply = reflectApply;
13102
13081
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
13103
- var bind$1 = requireFunctionBind();
13082
+ var bind$1 = functionBind;
13104
13083
  var $TypeError$4 = type;
13105
- var $call$1 = requireFunctionCall();
13084
+ var $call$1 = functionCall;
13106
13085
  var $actualApply = actualApply;
13107
13086
  var callBindApplyHelpers = function callBindBasic(args) {
13108
13087
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -13168,8 +13147,8 @@ function requireHasown() {
13168
13147
  hasRequiredHasown = 1;
13169
13148
  var call = Function.prototype.call;
13170
13149
  var $hasOwn = Object.prototype.hasOwnProperty;
13171
- var bind2 = requireFunctionBind();
13172
- hasown = bind2.call(call, $hasOwn);
13150
+ var bind3 = functionBind;
13151
+ hasown = bind3.call(call, $hasOwn);
13173
13152
  return hasown;
13174
13153
  }
13175
13154
  var undefined$1;
@@ -13183,7 +13162,7 @@ var $TypeError$3 = type;
13183
13162
  var $URIError = uri;
13184
13163
  var abs = abs$1;
13185
13164
  var floor = floor$1;
13186
- var max = max$1;
13165
+ var max = max$2;
13187
13166
  var min = min$1;
13188
13167
  var pow = pow$1;
13189
13168
  var round$1 = round$2;
@@ -13217,7 +13196,7 @@ var getProto = requireGetProto();
13217
13196
  var $ObjectGPO = requireObject_getPrototypeOf();
13218
13197
  var $ReflectGPO = requireReflect_getPrototypeOf();
13219
13198
  var $apply = requireFunctionApply();
13220
- var $call = requireFunctionCall();
13199
+ var $call = functionCall;
13221
13200
  var needsEval = {};
13222
13201
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
13223
13202
  var INTRINSICS = {
@@ -13388,13 +13367,13 @@ var LEGACY_ALIASES = {
13388
13367
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
13389
13368
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
13390
13369
  };
13391
- var bind = requireFunctionBind();
13370
+ var bind2 = functionBind;
13392
13371
  var hasOwn = requireHasown();
13393
- var $concat = bind.call($call, Array.prototype.concat);
13394
- var $spliceApply = bind.call($apply, Array.prototype.splice);
13395
- var $replace = bind.call($call, String.prototype.replace);
13396
- var $strSlice = bind.call($call, String.prototype.slice);
13397
- 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);
13398
13377
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13399
13378
  var reEscapeChar = /\\(\\)?/g;
13400
13379
  var stringToPath = function stringToPath2(string2) {
@@ -26453,15 +26432,18 @@ function FormikFormField({
26453
26432
  const capitalizeFirstLetter = (str) => str ? str.charAt(0).toUpperCase() + str.slice(1) : "";
26454
26433
  function PhoneField({ label, name, formik, helperText }) {
26455
26434
  const { t: t2 } = useTranslation();
26435
+ const isGb = useIsGb();
26456
26436
  const rawError = formik.errors.phone;
26457
26437
  const error = rawError ? t2(rawError) : rawError;
26458
26438
  const fieldValue = formik.values.phone;
26459
26439
  const touched = formik.touched.phone;
26440
+ const countryPrefix = isGb ? "+44" : "+49";
26441
+ const placeholder = isGb ? "+44 20 7946 0958" : "+49 30 56837200";
26460
26442
  const handleChange = (e2) => {
26461
26443
  let value = e2.target.value;
26462
26444
  value = value.replace(/[^\d+\s-]/g, "");
26463
26445
  if (!value.startsWith("+")) {
26464
- value = "+49" + value.replace(/^\+/, "");
26446
+ value = countryPrefix + value.replace(/^\+/, "");
26465
26447
  }
26466
26448
  formik.setFieldValue("phone", value, true);
26467
26449
  };
@@ -26475,7 +26457,7 @@ function PhoneField({ label, name, formik, helperText }) {
26475
26457
  value: fieldValue,
26476
26458
  onChange: handleChange,
26477
26459
  onBlur: () => formik.setFieldTouched("phone", true),
26478
- placeholder: "+49 30 56837200",
26460
+ placeholder,
26479
26461
  $hasError: Boolean(touched && error)
26480
26462
  }
26481
26463
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycater/qualification-funnel",
3
- "version": "1.19.16",
3
+ "version": "1.19.17",
4
4
  "type": "module",
5
5
  "description": "Heycater embedded qualification funnel widget",
6
6
  "main": "dist/index.cjs.js",