@heycater/qualification-funnel 1.19.1 → 1.19.2

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,11 @@ 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
+ const existingStep = existingSteps.find((s3) => s3.id === stepId);
7557
+ return existingStep ? { ...existingStep } : { id: stepId };
7558
+ });
7555
7559
  return {
7556
7560
  ...state,
7557
7561
  qualification: {
@@ -12444,7 +12448,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
12444
12448
  var ys = arrObjKeys(obj, inspect2);
12445
12449
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
12446
12450
  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" : "";
12451
+ var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
12448
12452
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
12449
12453
  var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
12450
12454
  if (ys.length === 0) {
@@ -12469,25 +12473,25 @@ function canTrustToString(obj) {
12469
12473
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
12470
12474
  }
12471
12475
  function isArray$3(obj) {
12472
- return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
12476
+ return toStr(obj) === "[object Array]" && canTrustToString(obj);
12473
12477
  }
12474
12478
  function isDate(obj) {
12475
- return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
12479
+ return toStr(obj) === "[object Date]" && canTrustToString(obj);
12476
12480
  }
12477
12481
  function isRegExp$1(obj) {
12478
- return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
12482
+ return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
12479
12483
  }
12480
12484
  function isError(obj) {
12481
- return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
12485
+ return toStr(obj) === "[object Error]" && canTrustToString(obj);
12482
12486
  }
12483
12487
  function isString(obj) {
12484
- return toStr$1(obj) === "[object String]" && canTrustToString(obj);
12488
+ return toStr(obj) === "[object String]" && canTrustToString(obj);
12485
12489
  }
12486
12490
  function isNumber(obj) {
12487
- return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
12491
+ return toStr(obj) === "[object Number]" && canTrustToString(obj);
12488
12492
  }
12489
12493
  function isBoolean(obj) {
12490
- return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
12494
+ return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
12491
12495
  }
12492
12496
  function isSymbol(obj) {
12493
12497
  if (hasShammedSymbols) {
@@ -12523,7 +12527,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
12523
12527
  function has$4(obj, key) {
12524
12528
  return hasOwn$1.call(obj, key);
12525
12529
  }
12526
- function toStr$1(obj) {
12530
+ function toStr(obj) {
12527
12531
  return objectToString.call(obj);
12528
12532
  }
12529
12533
  function nameOf(f) {
@@ -12832,7 +12836,7 @@ var syntax = SyntaxError;
12832
12836
  var uri = URIError;
12833
12837
  var abs$1 = Math.abs;
12834
12838
  var floor$1 = Math.floor;
12835
- var max$2 = Math.max;
12839
+ var max$1 = Math.max;
12836
12840
  var min$1 = Math.min;
12837
12841
  var pow$1 = Math.pow;
12838
12842
  var round$2 = Math.round;
@@ -12961,78 +12965,99 @@ function requireObject_getPrototypeOf() {
12961
12965
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
12962
12966
  return Object_getPrototypeOf;
12963
12967
  }
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;
12968
+ var implementation;
12969
+ var hasRequiredImplementation;
12970
+ function requireImplementation() {
12971
+ if (hasRequiredImplementation) return implementation;
12972
+ hasRequiredImplementation = 1;
12973
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
12974
+ var toStr2 = Object.prototype.toString;
12975
+ var max2 = Math.max;
12976
+ var funcType = "[object Function]";
12977
+ var concatty = function concatty2(a3, b2) {
12978
+ var arr = [];
12979
+ for (var i2 = 0; i2 < a3.length; i2 += 1) {
12980
+ arr[i2] = a3[i2];
12991
12981
  }
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;
12982
+ for (var j = 0; j < b2.length; j += 1) {
12983
+ arr[j + a3.length] = b2[j];
12984
+ }
12985
+ return arr;
12986
+ };
12987
+ var slicy = function slicy2(arrLike, offset2) {
12988
+ var arr = [];
12989
+ for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
12990
+ arr[j] = arrLike[i2];
12991
+ }
12992
+ return arr;
12993
+ };
12994
+ var joiny = function(arr, joiner) {
12995
+ var str = "";
12996
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
12997
+ str += arr[i2];
12998
+ if (i2 + 1 < arr.length) {
12999
+ str += joiner;
13010
13000
  }
13011
- return this;
13012
13001
  }
13013
- return target.apply(
13014
- that,
13015
- concatty(args, arguments)
13016
- );
13002
+ return str;
13017
13003
  };
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() {
13004
+ implementation = function bind2(that) {
13005
+ var target = this;
13006
+ if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
13007
+ throw new TypeError(ERROR_MESSAGE + target);
13008
+ }
13009
+ var args = slicy(arguments, 1);
13010
+ var bound;
13011
+ var binder = function() {
13012
+ if (this instanceof bound) {
13013
+ var result = target.apply(
13014
+ this,
13015
+ concatty(args, arguments)
13016
+ );
13017
+ if (Object(result) === result) {
13018
+ return result;
13019
+ }
13020
+ return this;
13021
+ }
13022
+ return target.apply(
13023
+ that,
13024
+ concatty(args, arguments)
13025
+ );
13026
13026
  };
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;
13027
+ var boundLength = max2(0, target.length - args.length);
13028
+ var boundArgs = [];
13029
+ for (var i2 = 0; i2 < boundLength; i2++) {
13030
+ boundArgs[i2] = "$" + i2;
13031
+ }
13032
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
13033
+ if (target.prototype) {
13034
+ var Empty = function Empty2() {
13035
+ };
13036
+ Empty.prototype = target.prototype;
13037
+ bound.prototype = new Empty();
13038
+ Empty.prototype = null;
13039
+ }
13040
+ return bound;
13041
+ };
13042
+ return implementation;
13043
+ }
13044
+ var functionBind;
13045
+ var hasRequiredFunctionBind;
13046
+ function requireFunctionBind() {
13047
+ if (hasRequiredFunctionBind) return functionBind;
13048
+ hasRequiredFunctionBind = 1;
13049
+ var implementation2 = requireImplementation();
13050
+ functionBind = Function.prototype.bind || implementation2;
13051
+ return functionBind;
13052
+ }
13053
+ var functionCall;
13054
+ var hasRequiredFunctionCall;
13055
+ function requireFunctionCall() {
13056
+ if (hasRequiredFunctionCall) return functionCall;
13057
+ hasRequiredFunctionCall = 1;
13058
+ functionCall = Function.prototype.call;
13059
+ return functionCall;
13060
+ }
13036
13061
  var functionApply;
13037
13062
  var hasRequiredFunctionApply;
13038
13063
  function requireFunctionApply() {
@@ -13042,14 +13067,14 @@ function requireFunctionApply() {
13042
13067
  return functionApply;
13043
13068
  }
13044
13069
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
13045
- var bind$2 = functionBind;
13070
+ var bind$2 = requireFunctionBind();
13046
13071
  var $apply$1 = requireFunctionApply();
13047
- var $call$2 = functionCall;
13072
+ var $call$2 = requireFunctionCall();
13048
13073
  var $reflectApply = reflectApply;
13049
13074
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
13050
- var bind$1 = functionBind;
13075
+ var bind$1 = requireFunctionBind();
13051
13076
  var $TypeError$4 = type;
13052
- var $call$1 = functionCall;
13077
+ var $call$1 = requireFunctionCall();
13053
13078
  var $actualApply = actualApply;
13054
13079
  var callBindApplyHelpers = function callBindBasic(args) {
13055
13080
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -13115,8 +13140,8 @@ function requireHasown() {
13115
13140
  hasRequiredHasown = 1;
13116
13141
  var call = Function.prototype.call;
13117
13142
  var $hasOwn = Object.prototype.hasOwnProperty;
13118
- var bind3 = functionBind;
13119
- hasown = bind3.call(call, $hasOwn);
13143
+ var bind2 = requireFunctionBind();
13144
+ hasown = bind2.call(call, $hasOwn);
13120
13145
  return hasown;
13121
13146
  }
13122
13147
  var undefined$1;
@@ -13130,7 +13155,7 @@ var $TypeError$3 = type;
13130
13155
  var $URIError = uri;
13131
13156
  var abs = abs$1;
13132
13157
  var floor = floor$1;
13133
- var max = max$2;
13158
+ var max = max$1;
13134
13159
  var min = min$1;
13135
13160
  var pow = pow$1;
13136
13161
  var round$1 = round$2;
@@ -13164,7 +13189,7 @@ var getProto = requireGetProto();
13164
13189
  var $ObjectGPO = requireObject_getPrototypeOf();
13165
13190
  var $ReflectGPO = requireReflect_getPrototypeOf();
13166
13191
  var $apply = requireFunctionApply();
13167
- var $call = functionCall;
13192
+ var $call = requireFunctionCall();
13168
13193
  var needsEval = {};
13169
13194
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
13170
13195
  var INTRINSICS = {
@@ -13335,13 +13360,13 @@ var LEGACY_ALIASES = {
13335
13360
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
13336
13361
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
13337
13362
  };
13338
- var bind2 = functionBind;
13363
+ var bind = requireFunctionBind();
13339
13364
  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);
13365
+ var $concat = bind.call($call, Array.prototype.concat);
13366
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
13367
+ var $replace = bind.call($call, String.prototype.replace);
13368
+ var $strSlice = bind.call($call, String.prototype.slice);
13369
+ var $exec = bind.call($call, RegExp.prototype.exec);
13345
13370
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13346
13371
  var reEscapeChar = /\\(\\)?/g;
13347
13372
  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.2",
4
4
  "type": "module",
5
5
  "description": "Heycater embedded qualification funnel widget",
6
6
  "main": "dist/index.cjs.js",