@heycater/qualification-funnel 1.19.1 → 1.19.3

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
@@ -7551,7 +7551,16 @@ function handleServiceTypeChange(state, answer) {
7551
7551
  return state;
7552
7552
  }
7553
7553
  const newStepOrder = getStepOrderForServiceType(serviceType);
7554
- const newSteps = newStepOrder.map((stepId) => ({ id: stepId }));
7554
+ const existingSteps = state.qualification.steps;
7555
+ const newSteps = newStepOrder.map((stepId) => {
7556
+ if (stepId === "city") {
7557
+ const existingCityStep = existingSteps.find((s3) => s3.id === "city");
7558
+ if (existingCityStep == null ? void 0 : existingCityStep.disabled) {
7559
+ return { id: stepId, disabled: true };
7560
+ }
7561
+ }
7562
+ return { id: stepId };
7563
+ });
7555
7564
  return {
7556
7565
  ...state,
7557
7566
  qualification: {
@@ -12444,7 +12453,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
12444
12453
  var ys = arrObjKeys(obj, inspect2);
12445
12454
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
12446
12455
  var protoTag = obj instanceof Object ? "" : "null prototype";
12447
- var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
12456
+ var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
12448
12457
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
12449
12458
  var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
12450
12459
  if (ys.length === 0) {
@@ -12469,25 +12478,25 @@ function canTrustToString(obj) {
12469
12478
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
12470
12479
  }
12471
12480
  function isArray$3(obj) {
12472
- return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
12481
+ return toStr(obj) === "[object Array]" && canTrustToString(obj);
12473
12482
  }
12474
12483
  function isDate(obj) {
12475
- return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
12484
+ return toStr(obj) === "[object Date]" && canTrustToString(obj);
12476
12485
  }
12477
12486
  function isRegExp$1(obj) {
12478
- return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
12487
+ return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
12479
12488
  }
12480
12489
  function isError(obj) {
12481
- return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
12490
+ return toStr(obj) === "[object Error]" && canTrustToString(obj);
12482
12491
  }
12483
12492
  function isString(obj) {
12484
- return toStr$1(obj) === "[object String]" && canTrustToString(obj);
12493
+ return toStr(obj) === "[object String]" && canTrustToString(obj);
12485
12494
  }
12486
12495
  function isNumber(obj) {
12487
- return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
12496
+ return toStr(obj) === "[object Number]" && canTrustToString(obj);
12488
12497
  }
12489
12498
  function isBoolean(obj) {
12490
- return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
12499
+ return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
12491
12500
  }
12492
12501
  function isSymbol(obj) {
12493
12502
  if (hasShammedSymbols) {
@@ -12523,7 +12532,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
12523
12532
  function has$4(obj, key) {
12524
12533
  return hasOwn$1.call(obj, key);
12525
12534
  }
12526
- function toStr$1(obj) {
12535
+ function toStr(obj) {
12527
12536
  return objectToString.call(obj);
12528
12537
  }
12529
12538
  function nameOf(f) {
@@ -12832,7 +12841,7 @@ var syntax = SyntaxError;
12832
12841
  var uri = URIError;
12833
12842
  var abs$1 = Math.abs;
12834
12843
  var floor$1 = Math.floor;
12835
- var max$2 = Math.max;
12844
+ var max$1 = Math.max;
12836
12845
  var min$1 = Math.min;
12837
12846
  var pow$1 = Math.pow;
12838
12847
  var round$2 = Math.round;
@@ -12961,78 +12970,99 @@ function requireObject_getPrototypeOf() {
12961
12970
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
12962
12971
  return Object_getPrototypeOf;
12963
12972
  }
12964
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
12965
- var toStr = Object.prototype.toString;
12966
- var max$1 = Math.max;
12967
- var funcType = "[object Function]";
12968
- var concatty = function concatty2(a3, b2) {
12969
- var arr = [];
12970
- for (var i2 = 0; i2 < a3.length; i2 += 1) {
12971
- arr[i2] = a3[i2];
12972
- }
12973
- for (var j = 0; j < b2.length; j += 1) {
12974
- arr[j + a3.length] = b2[j];
12975
- }
12976
- return arr;
12977
- };
12978
- var slicy = function slicy2(arrLike, offset2) {
12979
- var arr = [];
12980
- for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
12981
- arr[j] = arrLike[i2];
12982
- }
12983
- return arr;
12984
- };
12985
- var joiny = function(arr, joiner) {
12986
- var str = "";
12987
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
12988
- str += arr[i2];
12989
- if (i2 + 1 < arr.length) {
12990
- str += joiner;
12973
+ var implementation;
12974
+ var hasRequiredImplementation;
12975
+ function requireImplementation() {
12976
+ if (hasRequiredImplementation) return implementation;
12977
+ hasRequiredImplementation = 1;
12978
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
12979
+ var toStr2 = Object.prototype.toString;
12980
+ var max2 = Math.max;
12981
+ var funcType = "[object Function]";
12982
+ var concatty = function concatty2(a3, b2) {
12983
+ var arr = [];
12984
+ for (var i2 = 0; i2 < a3.length; i2 += 1) {
12985
+ arr[i2] = a3[i2];
12991
12986
  }
12992
- }
12993
- return str;
12994
- };
12995
- var implementation$1 = function bind(that) {
12996
- var target = this;
12997
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
12998
- throw new TypeError(ERROR_MESSAGE + target);
12999
- }
13000
- var args = slicy(arguments, 1);
13001
- var bound;
13002
- var binder = function() {
13003
- if (this instanceof bound) {
13004
- var result = target.apply(
13005
- this,
13006
- concatty(args, arguments)
13007
- );
13008
- if (Object(result) === result) {
13009
- return result;
12987
+ for (var j = 0; j < b2.length; j += 1) {
12988
+ arr[j + a3.length] = b2[j];
12989
+ }
12990
+ return arr;
12991
+ };
12992
+ var slicy = function slicy2(arrLike, offset2) {
12993
+ var arr = [];
12994
+ for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
12995
+ arr[j] = arrLike[i2];
12996
+ }
12997
+ return arr;
12998
+ };
12999
+ var joiny = function(arr, joiner) {
13000
+ var str = "";
13001
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
13002
+ str += arr[i2];
13003
+ if (i2 + 1 < arr.length) {
13004
+ str += joiner;
13010
13005
  }
13011
- return this;
13012
13006
  }
13013
- return target.apply(
13014
- that,
13015
- concatty(args, arguments)
13016
- );
13007
+ return str;
13017
13008
  };
13018
- var boundLength = max$1(0, target.length - args.length);
13019
- var boundArgs = [];
13020
- for (var i2 = 0; i2 < boundLength; i2++) {
13021
- boundArgs[i2] = "$" + i2;
13022
- }
13023
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
13024
- if (target.prototype) {
13025
- var Empty = function Empty2() {
13009
+ implementation = function bind2(that) {
13010
+ var target = this;
13011
+ if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
13012
+ throw new TypeError(ERROR_MESSAGE + target);
13013
+ }
13014
+ var args = slicy(arguments, 1);
13015
+ var bound;
13016
+ var binder = function() {
13017
+ if (this instanceof bound) {
13018
+ var result = target.apply(
13019
+ this,
13020
+ concatty(args, arguments)
13021
+ );
13022
+ if (Object(result) === result) {
13023
+ return result;
13024
+ }
13025
+ return this;
13026
+ }
13027
+ return target.apply(
13028
+ that,
13029
+ concatty(args, arguments)
13030
+ );
13026
13031
  };
13027
- Empty.prototype = target.prototype;
13028
- bound.prototype = new Empty();
13029
- Empty.prototype = null;
13030
- }
13031
- return bound;
13032
- };
13033
- var implementation = implementation$1;
13034
- var functionBind = Function.prototype.bind || implementation;
13035
- var functionCall = Function.prototype.call;
13032
+ var boundLength = max2(0, target.length - args.length);
13033
+ var boundArgs = [];
13034
+ for (var i2 = 0; i2 < boundLength; i2++) {
13035
+ boundArgs[i2] = "$" + i2;
13036
+ }
13037
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
13038
+ if (target.prototype) {
13039
+ var Empty = function Empty2() {
13040
+ };
13041
+ Empty.prototype = target.prototype;
13042
+ bound.prototype = new Empty();
13043
+ Empty.prototype = null;
13044
+ }
13045
+ return bound;
13046
+ };
13047
+ return implementation;
13048
+ }
13049
+ var functionBind;
13050
+ var hasRequiredFunctionBind;
13051
+ function requireFunctionBind() {
13052
+ if (hasRequiredFunctionBind) return functionBind;
13053
+ hasRequiredFunctionBind = 1;
13054
+ var implementation2 = requireImplementation();
13055
+ functionBind = Function.prototype.bind || implementation2;
13056
+ return functionBind;
13057
+ }
13058
+ var functionCall;
13059
+ var hasRequiredFunctionCall;
13060
+ function requireFunctionCall() {
13061
+ if (hasRequiredFunctionCall) return functionCall;
13062
+ hasRequiredFunctionCall = 1;
13063
+ functionCall = Function.prototype.call;
13064
+ return functionCall;
13065
+ }
13036
13066
  var functionApply;
13037
13067
  var hasRequiredFunctionApply;
13038
13068
  function requireFunctionApply() {
@@ -13042,14 +13072,14 @@ function requireFunctionApply() {
13042
13072
  return functionApply;
13043
13073
  }
13044
13074
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
13045
- var bind$2 = functionBind;
13075
+ var bind$2 = requireFunctionBind();
13046
13076
  var $apply$1 = requireFunctionApply();
13047
- var $call$2 = functionCall;
13077
+ var $call$2 = requireFunctionCall();
13048
13078
  var $reflectApply = reflectApply;
13049
13079
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
13050
- var bind$1 = functionBind;
13080
+ var bind$1 = requireFunctionBind();
13051
13081
  var $TypeError$4 = type;
13052
- var $call$1 = functionCall;
13082
+ var $call$1 = requireFunctionCall();
13053
13083
  var $actualApply = actualApply;
13054
13084
  var callBindApplyHelpers = function callBindBasic(args) {
13055
13085
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -13115,8 +13145,8 @@ function requireHasown() {
13115
13145
  hasRequiredHasown = 1;
13116
13146
  var call = Function.prototype.call;
13117
13147
  var $hasOwn = Object.prototype.hasOwnProperty;
13118
- var bind3 = functionBind;
13119
- hasown = bind3.call(call, $hasOwn);
13148
+ var bind2 = requireFunctionBind();
13149
+ hasown = bind2.call(call, $hasOwn);
13120
13150
  return hasown;
13121
13151
  }
13122
13152
  var undefined$1;
@@ -13130,7 +13160,7 @@ var $TypeError$3 = type;
13130
13160
  var $URIError = uri;
13131
13161
  var abs = abs$1;
13132
13162
  var floor = floor$1;
13133
- var max = max$2;
13163
+ var max = max$1;
13134
13164
  var min = min$1;
13135
13165
  var pow = pow$1;
13136
13166
  var round$1 = round$2;
@@ -13164,7 +13194,7 @@ var getProto = requireGetProto();
13164
13194
  var $ObjectGPO = requireObject_getPrototypeOf();
13165
13195
  var $ReflectGPO = requireReflect_getPrototypeOf();
13166
13196
  var $apply = requireFunctionApply();
13167
- var $call = functionCall;
13197
+ var $call = requireFunctionCall();
13168
13198
  var needsEval = {};
13169
13199
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
13170
13200
  var INTRINSICS = {
@@ -13335,13 +13365,13 @@ var LEGACY_ALIASES = {
13335
13365
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
13336
13366
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
13337
13367
  };
13338
- var bind2 = functionBind;
13368
+ var bind = requireFunctionBind();
13339
13369
  var hasOwn = requireHasown();
13340
- var $concat = bind2.call($call, Array.prototype.concat);
13341
- var $spliceApply = bind2.call($apply, Array.prototype.splice);
13342
- var $replace = bind2.call($call, String.prototype.replace);
13343
- var $strSlice = bind2.call($call, String.prototype.slice);
13344
- var $exec = bind2.call($call, RegExp.prototype.exec);
13370
+ var $concat = bind.call($call, Array.prototype.concat);
13371
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
13372
+ var $replace = bind.call($call, String.prototype.replace);
13373
+ var $strSlice = bind.call($call, String.prototype.slice);
13374
+ var $exec = bind.call($call, RegExp.prototype.exec);
13345
13375
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13346
13376
  var reEscapeChar = /\\(\\)?/g;
13347
13377
  var stringToPath = function stringToPath2(string2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycater/qualification-funnel",
3
- "version": "1.19.1",
3
+ "version": "1.19.3",
4
4
  "type": "module",
5
5
  "description": "Heycater embedded qualification funnel widget",
6
6
  "main": "dist/index.cjs.js",