@gemx-dev/clarity-visualize 3.5.1 → 3.5.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.
@@ -0,0 +1,13 @@
1
+ **/*.ts
2
+ **/*.tsx
3
+ **/*.json
4
+ **/*.css
5
+ **/*.md
6
+ **/*.svg
7
+ **/*.html
8
+ **/*.xml
9
+ **/*.yml
10
+ **/*.yaml
11
+ **/*.toml
12
+ **/*.ini
13
+ **/*.env
@@ -0,0 +1,9 @@
1
+ {
2
+ "trailingComma": "all",
3
+ "printWidth": 350,
4
+ "tabWidth": 2,
5
+ "singleQuote": false,
6
+ "endOfLine": "lf",
7
+ "useTabs": false,
8
+ "plugins": []
9
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @gemx-dev/clarity-visualize
2
2
 
3
+ ## 3.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#31](https://github.com/ducky0209/gemx-sdk/pull/31) [`6fa4bcd`](https://github.com/ducky0209/gemx-sdk/commit/6fa4bcd7f83694df9b012d41fe6cc257fa74a37b) Thanks [@ducky0209](https://github.com/ducky0209)! - Update type and eslint
8
+
3
9
  ## 3.5.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gemx-dev/clarity-visualize",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "description": "An analytics library that uses web page interactions to generate aggregated insights",
5
5
  "author": "Microsoft Corp.",
6
6
  "license": "MIT",
@@ -30,15 +30,15 @@
30
30
  "clarity-decode": "^0.8.38"
31
31
  },
32
32
  "devDependencies": {
33
- "@rollup/plugin-commonjs": "^24.0.0",
34
- "@rollup/plugin-node-resolve": "^15.0.0",
35
- "@rollup/plugin-terser": "^0.4.0",
36
- "@rollup/plugin-typescript": "^11.0.0",
37
- "rollup-plugin-string-import": "^1.2.5",
33
+ "@rollup/plugin-commonjs": "24.1.0",
34
+ "@rollup/plugin-node-resolve": "15.2.3",
35
+ "@rollup/plugin-terser": "0.4.4",
36
+ "@rollup/plugin-typescript": "11.1.6",
37
+ "rollup-plugin-string-import": "1.2.6",
38
38
  "del-cli": "^5.0.0",
39
39
  "husky": "^8.0.0",
40
40
  "lint-staged": "^13.1.0",
41
- "rollup": "^3.0.0",
41
+ "rollup": "3.29.5",
42
42
  "ts-node": "^10.1.0",
43
43
  "tslint": "^6.1.3",
44
44
  "typescript": "^4.3.5"
@@ -48,7 +48,8 @@
48
48
  "build:main": "rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript",
49
49
  "build:clean": "del-cli build/*",
50
50
  "tslint": "tslint --project ./",
51
- "tslint:fix": "tslint --fix --project ./ --force"
51
+ "tslint:fix": "tslint --fix --project ./ --force",
52
+ "format": "prettier --write \"**/*.{ts,json}\""
52
53
  },
53
54
  "husky": {
54
55
  "hooks": {
@@ -54,8 +54,8 @@ export class InteractionHelper {
54
54
 
55
55
  // Position canvas relative to scroll events on the parent page
56
56
  if (scrollTarget === de || scrollTarget === doc.body) {
57
- if (!scrollable) {
58
- this.state.window.scrollTo(data.x, data.y);
57
+ if (!scrollable) {
58
+ this.state.window.scrollTo(data.x, data.y);
59
59
  }
60
60
  let canvas = this.overlay();
61
61
  if (canvas) {
@@ -189,11 +189,11 @@ export class InteractionHelper {
189
189
  this.state.options.onclickMismatch({
190
190
  time: event.time,
191
191
  x: data.x,
192
- y: data.y,
192
+ y: data.y,
193
193
  nodeId: data.target as number});
194
194
  }
195
195
  }
196
-
196
+
197
197
  p.className = Constant.PointerNone;
198
198
  break;
199
199
  case Data.Event.DoubleClick:
@@ -245,7 +245,7 @@ export class InteractionHelper {
245
245
  this.fadeOutElement(click.click, click.doc);
246
246
  this.visualizedClicks.splice(this.visualizedClicks.indexOf(click), 1);
247
247
  });
248
- }
248
+ }
249
249
  }
250
250
 
251
251
  private fadeOutElement = (element: HTMLElement, document: HTMLElement): void => {
@@ -310,7 +310,7 @@ export class InteractionHelper {
310
310
  let de = doc.documentElement;
311
311
  let click = doc.createElement("DIV");
312
312
  click.className = Constant.ClickLayer;
313
-
313
+
314
314
  click.setAttribute(Constant.Title, `${title} (${x}${Constant.Pixel}, ${y}${Constant.Pixel})`);
315
315
  click.style.left = (x - Setting.ClickRadius / 2) + Constant.Pixel;
316
316
  click.style.top = (y - Setting.ClickRadius / 2) + Constant.Pixel
@@ -328,18 +328,18 @@ export class InteractionHelper {
328
328
  let center = doc.createElement("DIV");
329
329
  center.className = `${Constant.ClickLayer}-center`;
330
330
  click.appendChild(center);
331
- } else {
331
+ } else {
332
332
  // Second pulsating ring
333
333
  let ringTwo = ringOne.cloneNode() as HTMLElement;
334
334
  ringTwo.style.animation = "pulsate-two 1 1s";
335
335
  click.appendChild(ringTwo);
336
336
  }
337
337
  de.appendChild(click);
338
-
338
+
339
339
  // Play sound
340
340
  if (typeof Audio !== Constant.Undefined) {
341
- if (this.clickAudio === null) {
342
- this.clickAudio = new Audio(Asset.Sound);
341
+ if (this.clickAudio === null) {
342
+ this.clickAudio = new Audio(Asset.Sound);
343
343
  click.appendChild(this.clickAudio);
344
344
  }
345
345
  this.clickAudio.play();