@heycater/qualification-funnel 1.12.0 → 1.13.0

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
@@ -10085,7 +10085,7 @@ function trackAnswerSelected(context, answer) {
10085
10085
  if (context.city) {
10086
10086
  properties.city = context.city;
10087
10087
  }
10088
- captureEvent("qf_v11_answer_selected", properties);
10088
+ captureEvent("qf_v12_answer_selected", properties);
10089
10089
  }
10090
10090
  function trackFormSubmitted(context, metadata) {
10091
10091
  if (!context.session_id) {
@@ -10103,7 +10103,7 @@ function trackFormSubmitted(context, metadata) {
10103
10103
  if (context.city) {
10104
10104
  properties.city = context.city;
10105
10105
  }
10106
- captureEvent("qf_v11_form_submitted", properties);
10106
+ captureEvent("qf_v12_form_submitted", properties);
10107
10107
  }
10108
10108
  function trackCompleted(context) {
10109
10109
  if (!context.session_id) {
@@ -10120,7 +10120,7 @@ function trackCompleted(context) {
10120
10120
  if (context.city) {
10121
10121
  properties.city = context.city;
10122
10122
  }
10123
- captureEvent("qf_v11_completed", properties);
10123
+ captureEvent("qf_v12_completed", properties);
10124
10124
  }
10125
10125
  function trackAbandoned(context, lastStep) {
10126
10126
  if (!context.session_id) {
@@ -10139,7 +10139,7 @@ function trackAbandoned(context, lastStep) {
10139
10139
  if (context.city) {
10140
10140
  properties.city = context.city;
10141
10141
  }
10142
- captureEvent("qf_v11_abandoned", properties);
10142
+ captureEvent("qf_v12_abandoned", properties);
10143
10143
  }
10144
10144
  function trackStarted(context, initialStepId) {
10145
10145
  const properties = {
@@ -10147,7 +10147,7 @@ function trackStarted(context, initialStepId) {
10147
10147
  session_id: context.session_id,
10148
10148
  initial_step: initialStepId
10149
10149
  };
10150
- captureEvent("qf_v11_started", properties);
10150
+ captureEvent("qf_v12_started", properties);
10151
10151
  }
10152
10152
  function serializeAnswerValue(value) {
10153
10153
  if (value === void 0) return null;
@@ -10179,8 +10179,9 @@ function TrackingProvider({
10179
10179
  const step2 = qual.step;
10180
10180
  const stepIndex = qual.stepIndex;
10181
10181
  const steps2 = ((_a2 = qual.steps) == null ? void 0 : _a2.filter((s3) => !s3.disabled)) || [];
10182
- const sessionKey = `qf_v11_started_${funnelContextRef.current.session_id}`;
10183
- const trackedStepsKey = `qf_v11_tracked_steps_${funnelContextRef.current.session_id}`;
10182
+ const serviceType = funnelContextRef.current.service_type || answerOf("service_type") || "";
10183
+ const sessionKey = `qf_v12_started_${funnelContextRef.current.session_id}_${serviceType}`;
10184
+ const trackedStepsKey = `qf_v12_tracked_steps_${funnelContextRef.current.session_id}_${serviceType}`;
10184
10185
  let isFirstTracking = false;
10185
10186
  if (typeof sessionStorage !== "undefined") {
10186
10187
  const hasStarted = sessionStorage.getItem(sessionKey);
@@ -12367,7 +12368,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
12367
12368
  var ys = arrObjKeys(obj, inspect2);
12368
12369
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
12369
12370
  var protoTag = obj instanceof Object ? "" : "null prototype";
12370
- var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
12371
+ var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
12371
12372
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
12372
12373
  var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
12373
12374
  if (ys.length === 0) {
@@ -12392,25 +12393,25 @@ function canTrustToString(obj) {
12392
12393
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
12393
12394
  }
12394
12395
  function isArray$3(obj) {
12395
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
12396
+ return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
12396
12397
  }
12397
12398
  function isDate(obj) {
12398
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
12399
+ return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
12399
12400
  }
12400
12401
  function isRegExp$1(obj) {
12401
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
12402
+ return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
12402
12403
  }
12403
12404
  function isError(obj) {
12404
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
12405
+ return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
12405
12406
  }
12406
12407
  function isString(obj) {
12407
- return toStr(obj) === "[object String]" && canTrustToString(obj);
12408
+ return toStr$1(obj) === "[object String]" && canTrustToString(obj);
12408
12409
  }
12409
12410
  function isNumber(obj) {
12410
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
12411
+ return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
12411
12412
  }
12412
12413
  function isBoolean(obj) {
12413
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
12414
+ return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
12414
12415
  }
12415
12416
  function isSymbol(obj) {
12416
12417
  if (hasShammedSymbols) {
@@ -12446,7 +12447,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
12446
12447
  function has$4(obj, key) {
12447
12448
  return hasOwn$1.call(obj, key);
12448
12449
  }
12449
- function toStr(obj) {
12450
+ function toStr$1(obj) {
12450
12451
  return objectToString.call(obj);
12451
12452
  }
12452
12453
  function nameOf(f) {
@@ -12755,7 +12756,7 @@ var syntax = SyntaxError;
12755
12756
  var uri = URIError;
12756
12757
  var abs$1 = Math.abs;
12757
12758
  var floor$1 = Math.floor;
12758
- var max$1 = Math.max;
12759
+ var max$2 = Math.max;
12759
12760
  var min$1 = Math.min;
12760
12761
  var pow$1 = Math.pow;
12761
12762
  var round$2 = Math.round;
@@ -12884,99 +12885,78 @@ function requireObject_getPrototypeOf() {
12884
12885
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
12885
12886
  return Object_getPrototypeOf;
12886
12887
  }
12887
- var implementation;
12888
- var hasRequiredImplementation;
12889
- function requireImplementation() {
12890
- if (hasRequiredImplementation) return implementation;
12891
- hasRequiredImplementation = 1;
12892
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
12893
- var toStr2 = Object.prototype.toString;
12894
- var max2 = Math.max;
12895
- var funcType = "[object Function]";
12896
- var concatty = function concatty2(a3, b2) {
12897
- var arr = [];
12898
- for (var i2 = 0; i2 < a3.length; i2 += 1) {
12899
- arr[i2] = a3[i2];
12900
- }
12901
- for (var j = 0; j < b2.length; j += 1) {
12902
- arr[j + a3.length] = b2[j];
12903
- }
12904
- return arr;
12905
- };
12906
- var slicy = function slicy2(arrLike, offset2) {
12907
- var arr = [];
12908
- for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
12909
- arr[j] = arrLike[i2];
12888
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
12889
+ var toStr = Object.prototype.toString;
12890
+ var max$1 = Math.max;
12891
+ var funcType = "[object Function]";
12892
+ var concatty = function concatty2(a3, b2) {
12893
+ var arr = [];
12894
+ for (var i2 = 0; i2 < a3.length; i2 += 1) {
12895
+ arr[i2] = a3[i2];
12896
+ }
12897
+ for (var j = 0; j < b2.length; j += 1) {
12898
+ arr[j + a3.length] = b2[j];
12899
+ }
12900
+ return arr;
12901
+ };
12902
+ var slicy = function slicy2(arrLike, offset2) {
12903
+ var arr = [];
12904
+ for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
12905
+ arr[j] = arrLike[i2];
12906
+ }
12907
+ return arr;
12908
+ };
12909
+ var joiny = function(arr, joiner) {
12910
+ var str = "";
12911
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
12912
+ str += arr[i2];
12913
+ if (i2 + 1 < arr.length) {
12914
+ str += joiner;
12910
12915
  }
12911
- return arr;
12912
- };
12913
- var joiny = function(arr, joiner) {
12914
- var str = "";
12915
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
12916
- str += arr[i2];
12917
- if (i2 + 1 < arr.length) {
12918
- str += joiner;
12916
+ }
12917
+ return str;
12918
+ };
12919
+ var implementation$1 = function bind(that) {
12920
+ var target = this;
12921
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
12922
+ throw new TypeError(ERROR_MESSAGE + target);
12923
+ }
12924
+ var args = slicy(arguments, 1);
12925
+ var bound;
12926
+ var binder = function() {
12927
+ if (this instanceof bound) {
12928
+ var result = target.apply(
12929
+ this,
12930
+ concatty(args, arguments)
12931
+ );
12932
+ if (Object(result) === result) {
12933
+ return result;
12919
12934
  }
12935
+ return this;
12920
12936
  }
12921
- return str;
12937
+ return target.apply(
12938
+ that,
12939
+ concatty(args, arguments)
12940
+ );
12922
12941
  };
12923
- implementation = function bind2(that) {
12924
- var target = this;
12925
- if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
12926
- throw new TypeError(ERROR_MESSAGE + target);
12927
- }
12928
- var args = slicy(arguments, 1);
12929
- var bound;
12930
- var binder = function() {
12931
- if (this instanceof bound) {
12932
- var result = target.apply(
12933
- this,
12934
- concatty(args, arguments)
12935
- );
12936
- if (Object(result) === result) {
12937
- return result;
12938
- }
12939
- return this;
12940
- }
12941
- return target.apply(
12942
- that,
12943
- concatty(args, arguments)
12944
- );
12942
+ var boundLength = max$1(0, target.length - args.length);
12943
+ var boundArgs = [];
12944
+ for (var i2 = 0; i2 < boundLength; i2++) {
12945
+ boundArgs[i2] = "$" + i2;
12946
+ }
12947
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
12948
+ if (target.prototype) {
12949
+ var Empty = function Empty2() {
12945
12950
  };
12946
- var boundLength = max2(0, target.length - args.length);
12947
- var boundArgs = [];
12948
- for (var i2 = 0; i2 < boundLength; i2++) {
12949
- boundArgs[i2] = "$" + i2;
12950
- }
12951
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
12952
- if (target.prototype) {
12953
- var Empty = function Empty2() {
12954
- };
12955
- Empty.prototype = target.prototype;
12956
- bound.prototype = new Empty();
12957
- Empty.prototype = null;
12958
- }
12959
- return bound;
12960
- };
12961
- return implementation;
12962
- }
12963
- var functionBind;
12964
- var hasRequiredFunctionBind;
12965
- function requireFunctionBind() {
12966
- if (hasRequiredFunctionBind) return functionBind;
12967
- hasRequiredFunctionBind = 1;
12968
- var implementation2 = requireImplementation();
12969
- functionBind = Function.prototype.bind || implementation2;
12970
- return functionBind;
12971
- }
12972
- var functionCall;
12973
- var hasRequiredFunctionCall;
12974
- function requireFunctionCall() {
12975
- if (hasRequiredFunctionCall) return functionCall;
12976
- hasRequiredFunctionCall = 1;
12977
- functionCall = Function.prototype.call;
12978
- return functionCall;
12979
- }
12951
+ Empty.prototype = target.prototype;
12952
+ bound.prototype = new Empty();
12953
+ Empty.prototype = null;
12954
+ }
12955
+ return bound;
12956
+ };
12957
+ var implementation = implementation$1;
12958
+ var functionBind = Function.prototype.bind || implementation;
12959
+ var functionCall = Function.prototype.call;
12980
12960
  var functionApply;
12981
12961
  var hasRequiredFunctionApply;
12982
12962
  function requireFunctionApply() {
@@ -12986,14 +12966,14 @@ function requireFunctionApply() {
12986
12966
  return functionApply;
12987
12967
  }
12988
12968
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
12989
- var bind$2 = requireFunctionBind();
12969
+ var bind$2 = functionBind;
12990
12970
  var $apply$1 = requireFunctionApply();
12991
- var $call$2 = requireFunctionCall();
12971
+ var $call$2 = functionCall;
12992
12972
  var $reflectApply = reflectApply;
12993
12973
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
12994
- var bind$1 = requireFunctionBind();
12974
+ var bind$1 = functionBind;
12995
12975
  var $TypeError$4 = type;
12996
- var $call$1 = requireFunctionCall();
12976
+ var $call$1 = functionCall;
12997
12977
  var $actualApply = actualApply;
12998
12978
  var callBindApplyHelpers = function callBindBasic(args) {
12999
12979
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -13059,8 +13039,8 @@ function requireHasown() {
13059
13039
  hasRequiredHasown = 1;
13060
13040
  var call = Function.prototype.call;
13061
13041
  var $hasOwn = Object.prototype.hasOwnProperty;
13062
- var bind2 = requireFunctionBind();
13063
- hasown = bind2.call(call, $hasOwn);
13042
+ var bind3 = functionBind;
13043
+ hasown = bind3.call(call, $hasOwn);
13064
13044
  return hasown;
13065
13045
  }
13066
13046
  var undefined$1;
@@ -13074,7 +13054,7 @@ var $TypeError$3 = type;
13074
13054
  var $URIError = uri;
13075
13055
  var abs = abs$1;
13076
13056
  var floor = floor$1;
13077
- var max = max$1;
13057
+ var max = max$2;
13078
13058
  var min = min$1;
13079
13059
  var pow = pow$1;
13080
13060
  var round$1 = round$2;
@@ -13108,7 +13088,7 @@ var getProto = requireGetProto();
13108
13088
  var $ObjectGPO = requireObject_getPrototypeOf();
13109
13089
  var $ReflectGPO = requireReflect_getPrototypeOf();
13110
13090
  var $apply = requireFunctionApply();
13111
- var $call = requireFunctionCall();
13091
+ var $call = functionCall;
13112
13092
  var needsEval = {};
13113
13093
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
13114
13094
  var INTRINSICS = {
@@ -13279,13 +13259,13 @@ var LEGACY_ALIASES = {
13279
13259
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
13280
13260
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
13281
13261
  };
13282
- var bind = requireFunctionBind();
13262
+ var bind2 = functionBind;
13283
13263
  var hasOwn = requireHasown();
13284
- var $concat = bind.call($call, Array.prototype.concat);
13285
- var $spliceApply = bind.call($apply, Array.prototype.splice);
13286
- var $replace = bind.call($call, String.prototype.replace);
13287
- var $strSlice = bind.call($call, String.prototype.slice);
13288
- var $exec = bind.call($call, RegExp.prototype.exec);
13264
+ var $concat = bind2.call($call, Array.prototype.concat);
13265
+ var $spliceApply = bind2.call($apply, Array.prototype.splice);
13266
+ var $replace = bind2.call($call, String.prototype.replace);
13267
+ var $strSlice = bind2.call($call, String.prototype.slice);
13268
+ var $exec = bind2.call($call, RegExp.prototype.exec);
13289
13269
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13290
13270
  var reEscapeChar = /\\(\\)?/g;
13291
13271
  var stringToPath = function stringToPath2(string2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycater/qualification-funnel",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "type": "module",
5
5
  "description": "Heycater embedded qualification funnel widget",
6
6
  "main": "dist/index.cjs.js",