react-complaint-image 0.0.30 → 0.0.31
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/LICENSE +201 -201
- package/README.md +14 -14
- package/dist/react-complaint-image.js +6 -6
- package/dist/react-complaint-image.js.map +1 -1
- package/lib/ComplaintImageFactory.js +5 -5
- package/lib/MultipleComplaintImageFactory.js +24 -21
- package/package.json +121 -121
@@ -231,11 +231,11 @@ exports.default = function (Complaints, SelectImages) {
|
|
231
231
|
};
|
232
232
|
|
233
233
|
this.notify = function () {
|
234
|
-
/**
|
235
|
-
I believe render is in the call stack and this async operation settimeout sends the function to the webapi.
|
236
|
-
Even if the timeout is 0, it does not get added to the call stack until the call stack is empty
|
237
|
-
this solves our problem of notify executing before the render function
|
238
|
-
or use promise new Promise((event) => setTimeout(event, 10)).then(()=> {
|
234
|
+
/**
|
235
|
+
I believe render is in the call stack and this async operation settimeout sends the function to the webapi.
|
236
|
+
Even if the timeout is 0, it does not get added to the call stack until the call stack is empty
|
237
|
+
this solves our problem of notify executing before the render function
|
238
|
+
or use promise new Promise((event) => setTimeout(event, 10)).then(()=> {
|
239
239
|
*/
|
240
240
|
(0, _timers.setTimeout)(function () {
|
241
241
|
if (_this3.props.onChange) {
|
@@ -364,11 +364,11 @@ exports.default = function (Complaints, SelectImages) {
|
|
364
364
|
};
|
365
365
|
|
366
366
|
this.notify = function () {
|
367
|
-
/**
|
368
|
-
I believe render is in the call stack and this async operation settimeout sends the function to the webapi.
|
369
|
-
Even if the timeout is 0, it does not get added to the call stack until the call stack is empty
|
370
|
-
this solves our problem of notify executing before the render function
|
371
|
-
or use promise new Promise((event) => setTimeout(event, 10)).then(()=> {
|
367
|
+
/**
|
368
|
+
I believe render is in the call stack and this async operation settimeout sends the function to the webapi.
|
369
|
+
Even if the timeout is 0, it does not get added to the call stack until the call stack is empty
|
370
|
+
this solves our problem of notify executing before the render function
|
371
|
+
or use promise new Promise((event) => setTimeout(event, 10)).then(()=> {
|
372
372
|
*/
|
373
373
|
|
374
374
|
if (_this3.state.srcWidth !== undefined) {
|
@@ -495,8 +495,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
495
495
|
|
496
496
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
497
497
|
|
498
|
-
/**
|
499
|
-
* Class Component the inserts free drawn image of the layer in the stage
|
498
|
+
/**
|
499
|
+
* Class Component the inserts free drawn image of the layer in the stage
|
500
500
|
*/
|
501
501
|
var Drawing = function (_Component2) {
|
502
502
|
_inherits(Drawing, _Component2);
|
@@ -603,9 +603,9 @@ var Drawing = function (_Component2) {
|
|
603
603
|
key: "componentDidMount",
|
604
604
|
|
605
605
|
|
606
|
-
/**
|
607
|
-
* componentDidMount- creates the canvas element and adds that to local state
|
608
|
-
* If points are passed as props, those get drawn when the component loads
|
606
|
+
/**
|
607
|
+
* componentDidMount- creates the canvas element and adds that to local state
|
608
|
+
* If points are passed as props, those get drawn when the component loads
|
609
609
|
*/
|
610
610
|
value: function componentDidMount() {
|
611
611
|
var canvas = document.createElement("canvas");
|
@@ -656,25 +656,25 @@ var Drawing = function (_Component2) {
|
|
656
656
|
}, this.props.notifyParent);
|
657
657
|
}
|
658
658
|
|
659
|
-
/**
|
660
|
-
* handleMouseDown- Function to handle mouse down operation
|
661
|
-
* function sets isDrawing to true and saves the first point to the state
|
659
|
+
/**
|
660
|
+
* handleMouseDown- Function to handle mouse down operation
|
661
|
+
* function sets isDrawing to true and saves the first point to the state
|
662
662
|
*/
|
663
663
|
|
664
664
|
|
665
|
-
/**
|
666
|
-
* handleMouseUp- This is where isDrawing is set to false, state is updated with
|
667
|
-
* the most recent points and parent component is notified
|
665
|
+
/**
|
666
|
+
* handleMouseUp- This is where isDrawing is set to false, state is updated with
|
667
|
+
* the most recent points and parent component is notified
|
668
668
|
*/
|
669
669
|
|
670
670
|
|
671
|
-
/**
|
672
|
-
* clear() is used to clear the drawings
|
671
|
+
/**
|
672
|
+
* clear() is used to clear the drawings
|
673
673
|
*/
|
674
674
|
|
675
|
-
/**
|
676
|
-
* handleMouseMove- This is where the drawing logic is implemented using context.
|
677
|
-
* points are added to the state too
|
675
|
+
/**
|
676
|
+
* handleMouseMove- This is where the drawing logic is implemented using context.
|
677
|
+
* points are added to the state too
|
678
678
|
*/
|
679
679
|
|
680
680
|
}, {
|
@@ -692,8 +692,11 @@ var Drawing = function (_Component2) {
|
|
692
692
|
width: this.props.parentImageSize,
|
693
693
|
height: this.props.parentImageSize,
|
694
694
|
onMouseDown: this.handleMouseDown,
|
695
|
+
onTouchStart: this.handleMouseDown,
|
695
696
|
onMouseUp: this.handleMouseUp,
|
697
|
+
onTouchEnd: this.handleMouseUp,
|
696
698
|
onMouseMove: this.handleMouseMove,
|
699
|
+
onTouchMove: this.handleMouseMove,
|
697
700
|
onMouseLeave: this.handleMouseUp
|
698
701
|
});
|
699
702
|
}
|
package/package.json
CHANGED
@@ -1,121 +1,121 @@
|
|
1
|
-
{
|
2
|
-
"name": "react-complaint-image",
|
3
|
-
"description": "React Component, that allows to register patient complains on the image",
|
4
|
-
"private": false,
|
5
|
-
"author": "mavarazy@gmail.com",
|
6
|
-
"version": "0.0.
|
7
|
-
"scripts": {
|
8
|
-
"build:lib": "rimraf lib && cross-env NODE_ENV=production babel -d lib/ src/",
|
9
|
-
"build:dist": "rimraf dist && cross-env NODE_ENV=production webpack --config webpack.config.dist.js --optimize-minimize",
|
10
|
-
"build:playground": "rimraf build && cross-env NODE_ENV=production webpack --config webpack.config.prod.js --optimize-minimize && cp playground/index.prod.html build/index.html",
|
11
|
-
"cs-check": "prettier -l $npm_package_prettierOptions '{playground,src,test}/**/*.js'",
|
12
|
-
"cs-format": "prettier $npm_package_prettierOptions '{playground,src,test}/**/*.js' --write",
|
13
|
-
"dist": "npm run build:lib && npm run build:dist",
|
14
|
-
"lint": "eslint src test playground",
|
15
|
-
"precommit": "lint-staged",
|
16
|
-
"prepush": "npm test",
|
17
|
-
"publish-to-npm": "npm run dist && npm publish && npm version patch",
|
18
|
-
"start": "webpack-dev-server",
|
19
|
-
"tdd": "jest --watchAll",
|
20
|
-
"test": "jest"
|
21
|
-
},
|
22
|
-
"jest": {
|
23
|
-
"verbose": true,
|
24
|
-
"collectCoverage": true,
|
25
|
-
"collectCoverageFrom": [
|
26
|
-
"src/**/*.{js,jsx}"
|
27
|
-
]
|
28
|
-
},
|
29
|
-
"prettierOptions": "--jsx-bracket-same-line --trailing-comma es5 --semi",
|
30
|
-
"lint-staged": {
|
31
|
-
"{playground,src,test}/**/*.js": [
|
32
|
-
"npm run lint",
|
33
|
-
"npm run cs-format",
|
34
|
-
"git add"
|
35
|
-
]
|
36
|
-
},
|
37
|
-
"main": "lib/index.js",
|
38
|
-
"files": [
|
39
|
-
"dist",
|
40
|
-
"lib"
|
41
|
-
],
|
42
|
-
"engineStrict": false,
|
43
|
-
"engines": {
|
44
|
-
"node": ">=8"
|
45
|
-
},
|
46
|
-
"peerDependencies": {
|
47
|
-
"prop-types": "^15.5.10",
|
48
|
-
"react": "^16.2.0"
|
49
|
-
},
|
50
|
-
"dependencies": {
|
51
|
-
"deepcopy": "^0.6.3",
|
52
|
-
"konva": "^2.5.1",
|
53
|
-
"react-bootstrap-typeahead": "^3.2.4",
|
54
|
-
"react-konva": "^16.6.31",
|
55
|
-
"selectn": "^1.1.2"
|
56
|
-
},
|
57
|
-
"devDependencies": {
|
58
|
-
"atob": "^2.0.3",
|
59
|
-
"babel-cli": "^6.0.0",
|
60
|
-
"babel-core": "^6.0.0",
|
61
|
-
"babel-eslint": "^8.0.1",
|
62
|
-
"babel-jest": "^21.0.2",
|
63
|
-
"babel-loader": "^7.1.2",
|
64
|
-
"babel-plugin-transform-class-properties": "^6.24.1",
|
65
|
-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
66
|
-
"babel-polyfill": "^6.26.0",
|
67
|
-
"babel-preset-env": "^1.6.0",
|
68
|
-
"babel-preset-react": "^6.24.1",
|
69
|
-
"babel-preset-stage-0": "^6.24.1",
|
70
|
-
"babel-register": "^6.26.0",
|
71
|
-
"coveralls": "^3.0.0",
|
72
|
-
"cross-env": "^5.0.5",
|
73
|
-
"css-loader": "^0.28.7",
|
74
|
-
"enzyme": "^3.1.0",
|
75
|
-
"enzyme-adapter-react-16": "^1.0.3",
|
76
|
-
"eslint": "^4.6.1",
|
77
|
-
"eslint-plugin-jest": "^21.0.2",
|
78
|
-
"eslint-plugin-react": "^7.3.0",
|
79
|
-
"eslint-plugin-standard": "^3.0.1",
|
80
|
-
"exit-hook": "^1.1.1",
|
81
|
-
"express": "^4.15.4",
|
82
|
-
"extract-text-webpack-plugin": "^3.0.0",
|
83
|
-
"gh-pages": "^1.0.0",
|
84
|
-
"has-flag": "^2.0.0",
|
85
|
-
"html": "1.0.0",
|
86
|
-
"husky": "^0.14.3",
|
87
|
-
"jest": "^21.0.2",
|
88
|
-
"jest-cli": "^21.1.0",
|
89
|
-
"jsdom": "^11.2.0",
|
90
|
-
"lint-staged": "^4.1.3",
|
91
|
-
"prettier": "^1.6.1",
|
92
|
-
"react": "^16.2.0",
|
93
|
-
"react-dom": "^16.2.0",
|
94
|
-
"react-test-renderer": "^16.2.0",
|
95
|
-
"react-transform-catch-errors": "^1.0.2",
|
96
|
-
"react-transform-hmr": "^1.0.4",
|
97
|
-
"regenerator-runtime": "^0.11.0",
|
98
|
-
"rimraf": "^2.6.1",
|
99
|
-
"sinon": "^4.0.2",
|
100
|
-
"style-loader": "^0.19.0",
|
101
|
-
"webpack": "^3.5.6",
|
102
|
-
"webpack-dev-server": "^2.7.1",
|
103
|
-
"webpack-hot-middleware": "^2.19.1"
|
104
|
-
},
|
105
|
-
"directories": {
|
106
|
-
"test": "test"
|
107
|
-
},
|
108
|
-
"repository": {
|
109
|
-
"type": "git",
|
110
|
-
"url": "git+https://github.com/RxNT/react-jsonschema-form-conditionals.git"
|
111
|
-
},
|
112
|
-
"keywords": [
|
113
|
-
"react",
|
114
|
-
"form",
|
115
|
-
"json-schema",
|
116
|
-
"conditional",
|
117
|
-
"predicate"
|
118
|
-
],
|
119
|
-
"license": "Apache-2.0",
|
120
|
-
"homepage": "https://github.com/RxNT/react-jsonschema-form-conditionals#readme"
|
121
|
-
}
|
1
|
+
{
|
2
|
+
"name": "react-complaint-image",
|
3
|
+
"description": "React Component, that allows to register patient complains on the image",
|
4
|
+
"private": false,
|
5
|
+
"author": "mavarazy@gmail.com",
|
6
|
+
"version": "0.0.31",
|
7
|
+
"scripts": {
|
8
|
+
"build:lib": "rimraf lib && cross-env NODE_ENV=production babel -d lib/ src/",
|
9
|
+
"build:dist": "rimraf dist && cross-env NODE_ENV=production webpack --config webpack.config.dist.js --optimize-minimize",
|
10
|
+
"build:playground": "rimraf build && cross-env NODE_ENV=production webpack --config webpack.config.prod.js --optimize-minimize && cp playground/index.prod.html build/index.html",
|
11
|
+
"cs-check": "prettier -l $npm_package_prettierOptions '{playground,src,test}/**/*.js'",
|
12
|
+
"cs-format": "prettier $npm_package_prettierOptions '{playground,src,test}/**/*.js' --write",
|
13
|
+
"dist": "npm run build:lib && npm run build:dist",
|
14
|
+
"lint": "eslint src test playground",
|
15
|
+
"precommit": "lint-staged",
|
16
|
+
"prepush": "npm test",
|
17
|
+
"publish-to-npm": "npm run dist && npm publish && npm version patch",
|
18
|
+
"start": "webpack-dev-server",
|
19
|
+
"tdd": "jest --watchAll",
|
20
|
+
"test": "jest"
|
21
|
+
},
|
22
|
+
"jest": {
|
23
|
+
"verbose": true,
|
24
|
+
"collectCoverage": true,
|
25
|
+
"collectCoverageFrom": [
|
26
|
+
"src/**/*.{js,jsx}"
|
27
|
+
]
|
28
|
+
},
|
29
|
+
"prettierOptions": "--jsx-bracket-same-line --trailing-comma es5 --semi",
|
30
|
+
"lint-staged": {
|
31
|
+
"{playground,src,test}/**/*.js": [
|
32
|
+
"npm run lint",
|
33
|
+
"npm run cs-format",
|
34
|
+
"git add"
|
35
|
+
]
|
36
|
+
},
|
37
|
+
"main": "lib/index.js",
|
38
|
+
"files": [
|
39
|
+
"dist",
|
40
|
+
"lib"
|
41
|
+
],
|
42
|
+
"engineStrict": false,
|
43
|
+
"engines": {
|
44
|
+
"node": ">=8"
|
45
|
+
},
|
46
|
+
"peerDependencies": {
|
47
|
+
"prop-types": "^15.5.10",
|
48
|
+
"react": "^16.2.0"
|
49
|
+
},
|
50
|
+
"dependencies": {
|
51
|
+
"deepcopy": "^0.6.3",
|
52
|
+
"konva": "^2.5.1",
|
53
|
+
"react-bootstrap-typeahead": "^3.2.4",
|
54
|
+
"react-konva": "^16.6.31",
|
55
|
+
"selectn": "^1.1.2"
|
56
|
+
},
|
57
|
+
"devDependencies": {
|
58
|
+
"atob": "^2.0.3",
|
59
|
+
"babel-cli": "^6.0.0",
|
60
|
+
"babel-core": "^6.0.0",
|
61
|
+
"babel-eslint": "^8.0.1",
|
62
|
+
"babel-jest": "^21.0.2",
|
63
|
+
"babel-loader": "^7.1.2",
|
64
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
65
|
+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
66
|
+
"babel-polyfill": "^6.26.0",
|
67
|
+
"babel-preset-env": "^1.6.0",
|
68
|
+
"babel-preset-react": "^6.24.1",
|
69
|
+
"babel-preset-stage-0": "^6.24.1",
|
70
|
+
"babel-register": "^6.26.0",
|
71
|
+
"coveralls": "^3.0.0",
|
72
|
+
"cross-env": "^5.0.5",
|
73
|
+
"css-loader": "^0.28.7",
|
74
|
+
"enzyme": "^3.1.0",
|
75
|
+
"enzyme-adapter-react-16": "^1.0.3",
|
76
|
+
"eslint": "^4.6.1",
|
77
|
+
"eslint-plugin-jest": "^21.0.2",
|
78
|
+
"eslint-plugin-react": "^7.3.0",
|
79
|
+
"eslint-plugin-standard": "^3.0.1",
|
80
|
+
"exit-hook": "^1.1.1",
|
81
|
+
"express": "^4.15.4",
|
82
|
+
"extract-text-webpack-plugin": "^3.0.0",
|
83
|
+
"gh-pages": "^1.0.0",
|
84
|
+
"has-flag": "^2.0.0",
|
85
|
+
"html": "1.0.0",
|
86
|
+
"husky": "^0.14.3",
|
87
|
+
"jest": "^21.0.2",
|
88
|
+
"jest-cli": "^21.1.0",
|
89
|
+
"jsdom": "^11.2.0",
|
90
|
+
"lint-staged": "^4.1.3",
|
91
|
+
"prettier": "^1.6.1",
|
92
|
+
"react": "^16.2.0",
|
93
|
+
"react-dom": "^16.2.0",
|
94
|
+
"react-test-renderer": "^16.2.0",
|
95
|
+
"react-transform-catch-errors": "^1.0.2",
|
96
|
+
"react-transform-hmr": "^1.0.4",
|
97
|
+
"regenerator-runtime": "^0.11.0",
|
98
|
+
"rimraf": "^2.6.1",
|
99
|
+
"sinon": "^4.0.2",
|
100
|
+
"style-loader": "^0.19.0",
|
101
|
+
"webpack": "^3.5.6",
|
102
|
+
"webpack-dev-server": "^2.7.1",
|
103
|
+
"webpack-hot-middleware": "^2.19.1"
|
104
|
+
},
|
105
|
+
"directories": {
|
106
|
+
"test": "test"
|
107
|
+
},
|
108
|
+
"repository": {
|
109
|
+
"type": "git",
|
110
|
+
"url": "git+https://github.com/RxNT/react-jsonschema-form-conditionals.git"
|
111
|
+
},
|
112
|
+
"keywords": [
|
113
|
+
"react",
|
114
|
+
"form",
|
115
|
+
"json-schema",
|
116
|
+
"conditional",
|
117
|
+
"predicate"
|
118
|
+
],
|
119
|
+
"license": "Apache-2.0",
|
120
|
+
"homepage": "https://github.com/RxNT/react-jsonschema-form-conditionals#readme"
|
121
|
+
}
|