@pie-element/hotspot 7.9.9 → 7.9.10-next.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot",
3
- "version": "7.9.9",
3
+ "version": "7.9.10-next.10+7ab24ec5b",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "author": "pie framework developers",
20
20
  "license": "ISC",
21
- "gitHead": "29d1a241caadaa6b16ac0e6885a2e3a744ec8f24",
21
+ "gitHead": "7ab24ec5bc047e9ebea8c34854247fdd006e807e",
22
22
  "scripts": {
23
23
  "postpublish": "../../scripts/postpublish"
24
24
  },
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import _ from 'lodash';
3
2
  import { shallow } from 'enzyme';
4
3
  import toJson from 'enzyme-to-json';
5
4
  import Konva from 'konva';
6
5
 
7
6
  import { shallowChild } from '@pie-lib/pie-toolbox/test-utils';
8
- import {CorrectAnswerToggle} from '@pie-lib/pie-toolbox/correct-answer-toggle';
7
+ import { CorrectAnswerToggle } from '@pie-lib/pie-toolbox/correct-answer-toggle';
9
8
 
10
9
  import Container, { Container as ContainerComp } from '../hotspot/container';
11
10
  import HotspotComponent from '../hotspot/index';
@@ -129,28 +128,22 @@ describe('Container', () => {
129
128
  let onSelectChoice, wrapper;
130
129
 
131
130
  const mkWrapper = (opts = {}) => {
132
- opts = _.extend(
133
- {
134
- classes: {
135
- base: 'base',
136
- },
137
- dimensions: {
138
- height: 0,
139
- width: 0,
140
- },
141
- disabled: false,
142
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
143
- imageUrl: '',
144
- isEvaluateMode: false,
145
- outlineColor: 'blue',
146
- session: { answers: [] },
147
- shapes: {
148
- rectangles: [],
149
- polygons: [],
150
- },
131
+ opts =
132
+ {
133
+ classes: { base: 'base' },
134
+ dimensions: { height: 0, width: 0, },
135
+ disabled: false,
136
+ hotspotColor: 'rgba(137, 183, 244, 0.65)',
137
+ imageUrl: '',
138
+ isEvaluateMode: false,
139
+ outlineColor: 'blue',
140
+ session: { answers: [] },
141
+ shapes: {
142
+ rectangles: [],
143
+ polygons: [],
151
144
  },
152
- opts,
153
- );
145
+ ...opts,
146
+ }
154
147
 
155
148
  return shallow(<Container {...opts} onSelectChoice={onSelectChoice} />);
156
149
  };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import _ from 'lodash';
3
2
  import { shallow } from 'enzyme';
4
3
  import toJson from 'enzyme-to-json';
5
4
  import Konva from 'konva';
@@ -17,28 +16,24 @@ describe('Polygon', () => {
17
16
  let onClick, wrapper;
18
17
 
19
18
  const mkWrapper = (opts = {}) => {
20
- opts = _.extend(
21
- {
22
- classes: {
23
- base: 'base',
24
- },
25
- height: 200,
26
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
27
- id: '1',
28
- isCorrect: false,
29
- isEvaluateMode: false,
30
- evaluateText: null,
31
- disabled: false,
32
- outlineColor: 'blue',
33
- selected: false,
34
- points: [
35
- { x: 94, y: 4 },
36
- { x: 89, y: 4 },
37
- { x: 36, y: 40 },
38
- ],
39
- },
40
- opts,
41
- );
19
+ opts = {
20
+ classes: { base: 'base' },
21
+ height: 200,
22
+ hotspotColor: 'rgba(137, 183, 244, 0.65)',
23
+ id: '1',
24
+ isCorrect: false,
25
+ isEvaluateMode: false,
26
+ evaluateText: null,
27
+ disabled: false,
28
+ outlineColor: 'blue',
29
+ selected: false,
30
+ points: [
31
+ { x: 94, y: 4 },
32
+ { x: 89, y: 4 },
33
+ { x: 36, y: 40 },
34
+ ],
35
+ ...opts,
36
+ };
42
37
 
43
38
  return shallow(<Polygon {...opts} onClick={onClick} />);
44
39
  };
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import _ from 'lodash';
3
2
  import { shallow } from 'enzyme';
4
3
  import toJson from 'enzyme-to-json';
5
4
  import Konva from 'konva';
@@ -23,26 +22,22 @@ describe('Rectangle', () => {
23
22
  let onClick, wrapper;
24
23
 
25
24
  const mkWrapper = (opts = {}) => {
26
- opts = _.extend(
27
- {
28
- classes: {
29
- base: 'base',
30
- },
31
- height: 200,
32
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
33
- id: '1',
34
- isCorrect: false,
35
- isEvaluateMode: false,
36
- evaluateText: null,
37
- disabled: false,
38
- outlineColor: 'blue',
39
- selected: false,
40
- width: 300,
41
- x: 5,
42
- y: 5,
43
- },
44
- opts,
45
- );
25
+ opts = {
26
+ classes: { base: 'base' },
27
+ height: 200,
28
+ hotspotColor: 'rgba(137, 183, 244, 0.65)',
29
+ id: '1',
30
+ isCorrect: false,
31
+ isEvaluateMode: false,
32
+ evaluateText: null,
33
+ disabled: false,
34
+ outlineColor: 'blue',
35
+ selected: false,
36
+ width: 300,
37
+ x: 5,
38
+ y: 5,
39
+ ...opts,
40
+ };
46
41
 
47
42
  return shallow(<Rectangle {...opts} onClick={onClick} />);
48
43
  };