clarity-visualize 0.8.41 → 0.8.43

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.
@@ -743,6 +743,9 @@ class InteractionHelper {
743
743
  case "radio":
744
744
  el.checked = data.value === "true";
745
745
  break;
746
+ case "file":
747
+ // We cannot set value for files, only allowed to be an empty string when programatically set
748
+ break;
746
749
  default:
747
750
  el.value = data.value;
748
751
  break;
@@ -2021,74 +2024,80 @@ class Visualizer {
2021
2024
  }
2022
2025
  return this;
2023
2026
  });
2024
- this.render = (events) => __awaiter(this, void 0, void 0, function* () {
2027
+ this.render = (events) => {
2028
+ var _a, _b;
2025
2029
  if (this.state === null) {
2026
2030
  throw new Error(`Initialize visualization by calling "setup" prior to making this call.`);
2027
2031
  }
2028
2032
  let time = 0;
2029
- for (let entry of events) {
2030
- time = entry.time;
2031
- this.interaction.clearOldClickVisualizations(time);
2032
- switch (entry.event) {
2033
- case 0 /* Data.Event.Metric */:
2034
- this.data.metric(entry);
2035
- break;
2036
- case 1 /* Data.Event.Dimension */:
2037
- if (entry.data[37 /* Dimension.InteractionNextPaint */]) {
2033
+ for (const entry of events) {
2034
+ try {
2035
+ time = entry.time;
2036
+ this.interaction.clearOldClickVisualizations(time);
2037
+ switch (entry.event) {
2038
+ case 0 /* Data.Event.Metric */:
2038
2039
  this.data.metric(entry);
2039
- }
2040
- break;
2041
- case 7 /* Data.Event.Region */:
2042
- this.data.region(entry);
2043
- break;
2044
- case 6 /* Data.Event.Mutation */:
2045
- case 43 /* Data.Event.Snapshot */:
2046
- yield this.layout.markup(entry);
2047
- break;
2048
- case 13 /* Data.Event.MouseDown */:
2049
- case 14 /* Data.Event.MouseUp */:
2050
- case 12 /* Data.Event.MouseMove */:
2051
- case 15 /* Data.Event.MouseWheel */:
2052
- case 9 /* Data.Event.Click */:
2053
- case 16 /* Data.Event.DoubleClick */:
2054
- case 17 /* Data.Event.TouchStart */:
2055
- case 20 /* Data.Event.TouchCancel */:
2056
- case 18 /* Data.Event.TouchEnd */:
2057
- case 19 /* Data.Event.TouchMove */:
2058
- this.interaction.pointer(entry);
2059
- break;
2060
- case 28 /* Data.Event.Visibility */:
2061
- this.interaction.visibility(entry);
2062
- break;
2063
- case 27 /* Data.Event.Input */:
2064
- this.interaction.input(entry);
2065
- break;
2066
- case 21 /* Data.Event.Selection */:
2067
- this.interaction.selection(entry);
2068
- break;
2069
- case 11 /* Data.Event.Resize */:
2070
- this.interaction.resize(entry);
2071
- break;
2072
- case 10 /* Data.Event.Scroll */:
2073
- this.interaction.scroll(entry);
2074
- break;
2075
- case 45 /* Data.Event.StyleSheetAdoption */:
2076
- case 46 /* Data.Event.StyleSheetUpdate */:
2077
- this.layout.styleChange(entry);
2078
- break;
2079
- case 44 /* Data.Event.Animation */:
2080
- this.layout.animateChange(entry);
2081
- break;
2082
- case 51 /* Data.Event.CustomElement */:
2083
- this.layout.customElement(entry);
2084
- break;
2040
+ break;
2041
+ case 1 /* Data.Event.Dimension */:
2042
+ if (entry.data[37 /* Dimension.InteractionNextPaint */]) {
2043
+ this.data.metric(entry);
2044
+ }
2045
+ break;
2046
+ case 7 /* Data.Event.Region */:
2047
+ this.data.region(entry);
2048
+ break;
2049
+ case 6 /* Data.Event.Mutation */:
2050
+ case 43 /* Data.Event.Snapshot */:
2051
+ this.layout.markup(entry);
2052
+ break;
2053
+ case 13 /* Data.Event.MouseDown */:
2054
+ case 14 /* Data.Event.MouseUp */:
2055
+ case 12 /* Data.Event.MouseMove */:
2056
+ case 15 /* Data.Event.MouseWheel */:
2057
+ case 9 /* Data.Event.Click */:
2058
+ case 16 /* Data.Event.DoubleClick */:
2059
+ case 17 /* Data.Event.TouchStart */:
2060
+ case 20 /* Data.Event.TouchCancel */:
2061
+ case 18 /* Data.Event.TouchEnd */:
2062
+ case 19 /* Data.Event.TouchMove */:
2063
+ this.interaction.pointer(entry);
2064
+ break;
2065
+ case 28 /* Data.Event.Visibility */:
2066
+ this.interaction.visibility(entry);
2067
+ break;
2068
+ case 27 /* Data.Event.Input */:
2069
+ this.interaction.input(entry);
2070
+ break;
2071
+ case 21 /* Data.Event.Selection */:
2072
+ this.interaction.selection(entry);
2073
+ break;
2074
+ case 11 /* Data.Event.Resize */:
2075
+ this.interaction.resize(entry);
2076
+ break;
2077
+ case 10 /* Data.Event.Scroll */:
2078
+ this.interaction.scroll(entry);
2079
+ break;
2080
+ case 45 /* Data.Event.StyleSheetAdoption */:
2081
+ case 46 /* Data.Event.StyleSheetUpdate */:
2082
+ this.layout.styleChange(entry);
2083
+ break;
2084
+ case 44 /* Data.Event.Animation */:
2085
+ this.layout.animateChange(entry);
2086
+ break;
2087
+ case 51 /* Data.Event.CustomElement */:
2088
+ this.layout.customElement(entry);
2089
+ break;
2090
+ }
2091
+ }
2092
+ catch (e) {
2093
+ (_b = (_a = this._state.options).logerror) === null || _b === void 0 ? void 0 : _b.call(_a, e);
2085
2094
  }
2086
2095
  }
2087
2096
  if (events.length > 0) {
2088
2097
  // Update pointer trail at the end of every frame
2089
2098
  this.interaction.trail(time);
2090
2099
  }
2091
- });
2100
+ };
2092
2101
  this.reset = () => {
2093
2102
  var _a, _b, _c, _d, _e;
2094
2103
  (_a = this.data) === null || _a === void 0 ? void 0 : _a.reset();