clarity-visualize 0.8.59 → 0.8.60-beta

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.
@@ -151,7 +151,7 @@ function reset$8() {
151
151
  function get$1(input, type) {
152
152
  var a = input.attributes;
153
153
  var prefix = input.prefix ? input.prefix[type] : null;
154
- var suffix = type === 0 /* Selector.Alpha */ ? "".concat("~" /* Constant.Tilde */).concat(input.position - 1) : ":nth-of-type(".concat(input.position, ")");
154
+ var suffix = type === 0 /* Selector.Alpha */ ? "~" /* Constant.Tilde */ + (input.position - 1) : ":nth-of-type(" + input.position + ")";
155
155
  switch (input.tag) {
156
156
  case "STYLE":
157
157
  case "TITLE":
@@ -166,39 +166,39 @@ function get$1(input, type) {
166
166
  if (prefix === null) {
167
167
  return "" /* Constant.Empty */;
168
168
  }
169
- prefix = "".concat(prefix).concat(">" /* Constant.Separator */);
169
+ prefix = prefix + ">" /* Constant.Separator */;
170
170
  input.tag = input.tag.indexOf("svg:" /* Constant.SvgPrefix */) === 0 ? input.tag.substr("svg:" /* Constant.SvgPrefix */.length) : input.tag;
171
- var selector = "".concat(prefix).concat(input.tag).concat(suffix);
171
+ var selector = prefix + input.tag + suffix;
172
172
  var id = "id" /* Constant.Id */ in a && a["id" /* Constant.Id */].length > 0 ? a["id" /* Constant.Id */] : null;
173
173
  var classes = input.tag !== "BODY" /* Constant.BodyTag */ && "class" /* Constant.Class */ in a && a["class" /* Constant.Class */].length > 0 ? a["class" /* Constant.Class */].trim().split(/\s+/).filter(function (c) { return filter(c); }).join("." /* Constant.Period */) : null;
174
174
  if (classes && classes.length > 0) {
175
175
  if (type === 0 /* Selector.Alpha */) {
176
176
  // In Alpha mode, update selector to use class names, with relative positioning within the parent id container.
177
177
  // If the node has valid class name(s) then drop relative positioning within the parent path to keep things simple.
178
- var key = "".concat(getDomPath(prefix)).concat(input.tag).concat("." /* Constant.Dot */).concat(classes);
178
+ var key = getDomPath(prefix) + input.tag + "." /* Constant.Dot */ + classes;
179
179
  if (!(key in selectorMap)) {
180
180
  selectorMap[key] = [];
181
181
  }
182
- if (selectorMap[key].indexOf(input.id) < 0) {
182
+ if (!selectorMap[key].includes(input.id)) {
183
183
  selectorMap[key].push(input.id);
184
184
  }
185
- selector = "".concat(key).concat("~" /* Constant.Tilde */).concat(selectorMap[key].indexOf(input.id));
185
+ selector = key + "~" /* Constant.Tilde */ + selectorMap[key].indexOf(input.id);
186
186
  }
187
187
  else {
188
188
  // In Beta mode, we continue to look at query selectors in context of the full page
189
- selector = "".concat(prefix).concat(input.tag, ".").concat(classes).concat(suffix);
189
+ selector = prefix + input.tag + "." + classes + suffix;
190
190
  }
191
191
  }
192
192
  // Update selector to use "id" field when available. There are two exceptions:
193
193
  // (1) if "id" appears to be an auto generated string token, e.g. guid or a random id containing digits
194
194
  // (2) if "id" appears inside a shadow DOM, in which case we continue to prefix up to shadow DOM to prevent conflicts
195
- selector = id && filter(id) ? "".concat(getDomPrefix(prefix)).concat("#" /* Constant.Hash */).concat(id) : selector;
195
+ selector = id && filter(id) ? getDomPrefix(prefix) + "#" /* Constant.Hash */ + id : selector;
196
196
  return selector;
197
197
  }
198
198
  }
199
199
  function getDomPrefix(prefix) {
200
200
  var shadowDomStart = prefix.lastIndexOf("*S" /* Constant.ShadowDomTag */);
201
- var iframeDomStart = prefix.lastIndexOf("".concat("iframe:" /* Constant.IFramePrefix */).concat("HTML" /* Constant.HTML */));
201
+ var iframeDomStart = prefix.lastIndexOf("iframe:" /* Constant.IFramePrefix */ + "HTML" /* Constant.HTML */);
202
202
  var domStart = Math.max(shadowDomStart, iframeDomStart);
203
203
  if (domStart < 0) {
204
204
  return "" /* Constant.Empty */;
@@ -219,7 +219,7 @@ function filter(value) {
219
219
  if (!value) {
220
220
  return false;
221
221
  } // Do not process empty strings
222
- if (excludeClassNames.some(function (x) { return value.toLowerCase().indexOf(x) >= 0; })) {
222
+ if (excludeClassNames.some(function (x) { return value.toLowerCase().includes(x); })) {
223
223
  return false;
224
224
  }
225
225
  for (var i = 0; i < value.length; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-visualize",
3
- "version": "0.8.59",
3
+ "version": "0.8.60-beta",
4
4
  "description": "An analytics library that uses web page interactions to generate aggregated insights",
5
5
  "author": "Microsoft Corp.",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "url": "https://github.com/Microsoft/clarity/issues"
28
28
  },
29
29
  "dependencies": {
30
- "clarity-decode": "^0.8.59"
30
+ "clarity-decode": "^0.8.60-beta"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@rollup/plugin-commonjs": "^24.0.0",