@searpent/react-image-annotate 2.3.4 → 2.3.5
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/Annotator/examplePhotos.js +28 -28
- package/Annotator/examplePhotos_repr.js +28 -28
- package/Annotator/index.js +38 -31
- package/Annotator/index.story_bugdemo_15_1.js +895 -773
- package/Annotator/index.story_repr.js +1048 -933
- package/Annotator/reducers/convert-expanding-line-to-polygon.js +15 -16
- package/ClassSelectionMenu/index.js +55 -35
- package/Crosshairs/index.js +30 -23
- package/DebugSidebarBox/index.js +40 -9
- package/DemoSite/Editor.js +124 -79
- package/DemoSite/ErrorBoundaryDialog.js +19 -6
- package/DemoSite/index.js +26 -17
- package/Editor/index.js +70 -36
- package/Editor/index_bugdemo_15_1.js +68 -35
- package/Editor/readOnly.js +178 -127
- package/Errorer/index.js +8 -3
- package/FullImageSegmentationAnnotator/index.js +6 -3
- package/GroupSelectorSidebarBox/index.js +48 -32
- package/GroupsEditorSidebarBox/index.js +75 -40
- package/HelpSidebarBox/index.js +24 -13
- package/HighlightBox/index.js +37 -30
- package/HistorySidebarBox/index.js +51 -29
- package/ImageCanvas/index.js +165 -130
- package/ImageMask/index.js +9 -6
- package/ImageSelectorSidebarBox/index.js +44 -26
- package/KeyframeTimeline/index.js +65 -45
- package/KeyframesSelectorSidebarBox/index.js +76 -54
- package/LandingPage/index.js +76 -38
- package/Locker/index.js +8 -3
- package/MainLayout/RightSidebarItemsWrapper.js +7 -4
- package/MainLayout/icon-dictionary.js +99 -66
- package/MainLayout/index.js +256 -196
- package/MainLayout/index_bugdemo_15_1.js +253 -195
- package/MetadataEditorSidebarBox/index.js +152 -102
- package/MetadataEditorSidebarBox/index_14_01_25.js +152 -102
- package/MetadataEditorSidebarBox/index_repr.js +183 -128
- package/PageSelector/UpdatedBySemaphore.js +54 -0
- package/PageSelector/index.js +172 -96
- package/PageSelector/page-selector.css +126 -2
- package/PointDistances/index.js +45 -33
- package/PreventScrollToParents/index.js +16 -9
- package/RegionLabel/index.js +217 -165
- package/RegionSelectAndTransformBoxes/index.js +131 -105
- package/RegionSelectorSidebarBox/index.js +243 -165
- package/RegionShapes/index.js +213 -153
- package/RegionTags/index.js +83 -69
- package/SettingsDialog/index.js +50 -37
- package/SettingsProvider/index.js +8 -5
- package/Shortcuts/ShortcutField.js +21 -14
- package/Shortcuts/index.js +18 -12
- package/ShortcutsManager/index.js +7 -4
- package/Sidebar/index.js +46 -29
- package/SidebarBoxContainer/index.js +14 -7
- package/SmallToolButton/index.js +23 -16
- package/TagsSidebarBox/index.js +41 -28
- package/TaskDescriptionSidebarBox/index.js +24 -13
- package/Theme/index.js +8 -3
- package/VideoOrImageCanvasBackground/index.js +30 -17
- package/package.json +1 -1
- package/utils/spellcheck-nspell.js +2 -2
|
@@ -54,20 +54,19 @@ export default (function (expandingLine) {
|
|
|
54
54
|
open: false,
|
|
55
55
|
points: newPoints,
|
|
56
56
|
unfinished: undefined,
|
|
57
|
-
candidatePoint: undefined
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
57
|
+
candidatePoint: undefined
|
|
58
|
+
}); // let { expandingWidth = 0.005, points } = region
|
|
59
|
+
// expandingWidth = points.slice(-1)[0].width || expandingWidth
|
|
60
|
+
// const lastPoint = points.slice(-1)[0]
|
|
61
|
+
// return (
|
|
62
|
+
// <>
|
|
63
|
+
// <polygon
|
|
64
|
+
// points={
|
|
65
|
+
// .map((p) => `${p.x * iw} ${p.y * ih}`)
|
|
66
|
+
// .join(" ")}
|
|
67
|
+
// return {
|
|
68
|
+
// ...expandingLine,
|
|
69
|
+
// unfinished: undefined,
|
|
70
|
+
// candidatePoint: undefined,
|
|
71
|
+
// }
|
|
73
72
|
});
|
|
@@ -100,41 +100,61 @@ export var ClassSelectionMenu = function ClassSelectionMenu(_ref6) {
|
|
|
100
100
|
return window.removeEventListener("keydown", onKeyDown);
|
|
101
101
|
};
|
|
102
102
|
}, [regionClsList, selectedCls]);
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
selected: label === selectedCls
|
|
103
|
+
return (
|
|
104
|
+
/*#__PURE__*/
|
|
105
|
+
React.createElement(ThemeProvider, {
|
|
106
|
+
theme: theme
|
|
107
|
+
},
|
|
108
|
+
/*#__PURE__*/
|
|
109
|
+
React.createElement(SidebarBoxContainer, {
|
|
110
|
+
title: "Classifications",
|
|
111
|
+
subTitle: "",
|
|
112
|
+
icon:
|
|
113
|
+
/*#__PURE__*/
|
|
114
|
+
React.createElement(BallotIcon, {
|
|
115
|
+
style: {
|
|
116
|
+
color: muiColors.grey[700]
|
|
117
|
+
}
|
|
119
118
|
}),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
119
|
+
expandedByDefault: true
|
|
120
|
+
}, regionClsList.map(function (label, index) {
|
|
121
|
+
return (
|
|
122
|
+
/*#__PURE__*/
|
|
123
|
+
React.createElement(LabelContainer, {
|
|
124
|
+
key: label,
|
|
125
|
+
className: classnames({
|
|
126
|
+
selected: label === selectedCls
|
|
127
|
+
}),
|
|
128
|
+
onClick: function onClick() {
|
|
129
|
+
return onSelectCls(label);
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
/*#__PURE__*/
|
|
133
|
+
React.createElement(Circle, {
|
|
134
|
+
style: {
|
|
135
|
+
backgroundColor: clsColor(label)
|
|
136
|
+
}
|
|
137
|
+
}),
|
|
138
|
+
/*#__PURE__*/
|
|
139
|
+
React.createElement(Label, {
|
|
140
|
+
className: classnames({
|
|
141
|
+
selected: label === selectedCls
|
|
142
|
+
})
|
|
143
|
+
}, capitalize(label)),
|
|
144
|
+
/*#__PURE__*/
|
|
145
|
+
React.createElement(DashSep, null),
|
|
146
|
+
/*#__PURE__*/
|
|
147
|
+
React.createElement(Number, {
|
|
148
|
+
className: classnames({
|
|
149
|
+
selected: label === selectedCls
|
|
150
|
+
})
|
|
151
|
+
}, index < 9 ? "Key [".concat(index + 1, "]") : ""))
|
|
152
|
+
);
|
|
153
|
+
}),
|
|
154
|
+
/*#__PURE__*/
|
|
155
|
+
React.createElement(Box, {
|
|
156
|
+
pb: 2
|
|
157
|
+
})))
|
|
158
|
+
);
|
|
139
159
|
};
|
|
140
160
|
export default ClassSelectionMenu;
|
package/Crosshairs/index.js
CHANGED
|
@@ -26,28 +26,35 @@ export var Crosshairs = function Crosshairs(_ref) {
|
|
|
26
26
|
return clearInterval(interval);
|
|
27
27
|
};
|
|
28
28
|
});
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
29
|
+
return (
|
|
30
|
+
/*#__PURE__*/
|
|
31
|
+
React.createElement(Fragment, null,
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
React.createElement("div", {
|
|
34
|
+
style: {
|
|
35
|
+
position: "absolute",
|
|
36
|
+
height: "100%",
|
|
37
|
+
width: 1,
|
|
38
|
+
zIndex: 10,
|
|
39
|
+
backgroundColor: "#f00",
|
|
40
|
+
left: x,
|
|
41
|
+
pointerEvents: "none",
|
|
42
|
+
top: 0
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/
|
|
46
|
+
React.createElement("div", {
|
|
47
|
+
style: {
|
|
48
|
+
position: "absolute",
|
|
49
|
+
width: "100%",
|
|
50
|
+
zIndex: 10,
|
|
51
|
+
height: 1,
|
|
52
|
+
backgroundColor: "#f00",
|
|
53
|
+
top: y,
|
|
54
|
+
pointerEvents: "none",
|
|
55
|
+
left: 0
|
|
56
|
+
}
|
|
57
|
+
}))
|
|
58
|
+
);
|
|
52
59
|
};
|
|
53
60
|
export default Crosshairs;
|
package/DebugSidebarBox/index.js
CHANGED
|
@@ -7,14 +7,45 @@ export var DebugSidebarBox = function DebugSidebarBox(_ref) {
|
|
|
7
7
|
var region = image ? (image.regions || []).filter(function (r) {
|
|
8
8
|
return r.highlighted;
|
|
9
9
|
}) : null;
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
return (
|
|
11
|
+
/*#__PURE__*/
|
|
12
|
+
React.createElement(SidebarBoxContainer, {
|
|
13
|
+
title: "Debug",
|
|
14
|
+
icon:
|
|
15
|
+
/*#__PURE__*/
|
|
16
|
+
React.createElement("span", null),
|
|
17
|
+
expandedByDefault: true
|
|
18
|
+
},
|
|
19
|
+
/*#__PURE__*/
|
|
20
|
+
React.createElement("div", {
|
|
21
|
+
style: {
|
|
22
|
+
padding: 4
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
/*#__PURE__*/
|
|
26
|
+
React.createElement("div", null,
|
|
27
|
+
/*#__PURE__*/
|
|
28
|
+
React.createElement("b", null, "region"), ":"),
|
|
29
|
+
/*#__PURE__*/
|
|
30
|
+
React.createElement("pre", null, JSON.stringify(region, null, " ")),
|
|
31
|
+
/*#__PURE__*/
|
|
32
|
+
React.createElement("div", null,
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
React.createElement("b", null, "lastAction"), ":"),
|
|
35
|
+
/*#__PURE__*/
|
|
36
|
+
React.createElement("pre", null, JSON.stringify(lastAction, null, " ")),
|
|
37
|
+
/*#__PURE__*/
|
|
38
|
+
React.createElement("div", null,
|
|
39
|
+
/*#__PURE__*/
|
|
40
|
+
React.createElement("b", null, "mode"), ":"),
|
|
41
|
+
/*#__PURE__*/
|
|
42
|
+
React.createElement("pre", null, JSON.stringify(state.mode, null, " ")),
|
|
43
|
+
/*#__PURE__*/
|
|
44
|
+
React.createElement("div", null,
|
|
45
|
+
/*#__PURE__*/
|
|
46
|
+
React.createElement("b", null, "frame:")),
|
|
47
|
+
/*#__PURE__*/
|
|
48
|
+
React.createElement("pre", null, JSON.stringify(state.selectedImageFrameTime, null, " "))))
|
|
49
|
+
);
|
|
19
50
|
};
|
|
20
51
|
export default DebugSidebarBox;
|
package/DemoSite/Editor.js
CHANGED
|
@@ -105,90 +105,135 @@ var Editor = function Editor(_ref) {
|
|
|
105
105
|
currentJSONValue = _useState8[0],
|
|
106
106
|
changeCurrentJSONValue = _useState8[1];
|
|
107
107
|
|
|
108
|
-
return
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
display: "inline-flex"
|
|
119
|
-
}
|
|
120
|
-
}, React.createElement(Select, {
|
|
121
|
-
className: c.select,
|
|
122
|
-
value: {
|
|
123
|
-
label: selectedExample,
|
|
124
|
-
value: selectedExample
|
|
108
|
+
return (
|
|
109
|
+
/*#__PURE__*/
|
|
110
|
+
React.createElement(ThemeProvider, {
|
|
111
|
+
theme: theme
|
|
112
|
+
},
|
|
113
|
+
/*#__PURE__*/
|
|
114
|
+
React.createElement("div", null,
|
|
115
|
+
/*#__PURE__*/
|
|
116
|
+
React.createElement("div", {
|
|
117
|
+
className: c.editBar
|
|
125
118
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
119
|
+
/*#__PURE__*/
|
|
120
|
+
React.createElement("h3", null, "React Image Annotate"),
|
|
121
|
+
/*#__PURE__*/
|
|
122
|
+
React.createElement("div", {
|
|
123
|
+
style: {
|
|
124
|
+
flexGrow: 1
|
|
125
|
+
}
|
|
131
126
|
}),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}, React.createElement("div", null, React.createElement(MonacoEditor, {
|
|
157
|
-
value: currentJSONValue,
|
|
158
|
-
language: "javascript",
|
|
159
|
-
onChange: function onChange(code) {
|
|
160
|
-
try {
|
|
161
|
-
window.localStorage.setItem("customInput", JSON.stringify(JSON.parse(code)));
|
|
162
|
-
changeCurrentError(null);
|
|
163
|
-
} catch (e) {
|
|
164
|
-
changeCurrentError(e.toString());
|
|
127
|
+
/*#__PURE__*/
|
|
128
|
+
React.createElement("div", null,
|
|
129
|
+
/*#__PURE__*/
|
|
130
|
+
React.createElement("div", {
|
|
131
|
+
style: {
|
|
132
|
+
display: "inline-flex"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
/*#__PURE__*/
|
|
136
|
+
React.createElement(Select, {
|
|
137
|
+
className: c.select,
|
|
138
|
+
value: {
|
|
139
|
+
label: selectedExample,
|
|
140
|
+
value: selectedExample
|
|
141
|
+
},
|
|
142
|
+
options: Object.keys(examples).map(function (s) {
|
|
143
|
+
return {
|
|
144
|
+
label: s,
|
|
145
|
+
value: s
|
|
146
|
+
};
|
|
147
|
+
}),
|
|
148
|
+
onChange: function onChange(selectedOption) {
|
|
149
|
+
changeSelectedExample(selectedOption.value);
|
|
150
|
+
changeCurrentJSONValue(JSON.stringify(selectedOption.value === "Custom" ? loadSavedInput() : examples[selectedOption.value](), null, " "));
|
|
165
151
|
}
|
|
152
|
+
})),
|
|
153
|
+
/*#__PURE__*/
|
|
154
|
+
React.createElement(Button, {
|
|
155
|
+
className: "button",
|
|
156
|
+
disabled: !lastOutput,
|
|
157
|
+
onClick: function onClick() {
|
|
158
|
+
return changeOutputOpen(true);
|
|
159
|
+
}
|
|
160
|
+
}, "View Output"),
|
|
161
|
+
/*#__PURE__*/
|
|
162
|
+
React.createElement(Button, {
|
|
163
|
+
className: "button",
|
|
164
|
+
variant: "outlined",
|
|
165
|
+
disabled: Boolean(currentError),
|
|
166
|
+
onClick: function onClick() {
|
|
167
|
+
onOpenAnnotator(selectedExample === "Custom" ? loadSavedInput() : examples[selectedExample]);
|
|
168
|
+
}
|
|
169
|
+
}, "Open Annotator"))),
|
|
170
|
+
/*#__PURE__*/
|
|
171
|
+
React.createElement("div", {
|
|
172
|
+
className: c.contentArea,
|
|
173
|
+
style: currentError ? {
|
|
174
|
+
border: "2px solid #f00"
|
|
175
|
+
} : {
|
|
176
|
+
border: "2px solid #fff"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
/*#__PURE__*/
|
|
180
|
+
React.createElement("div", null,
|
|
181
|
+
/*#__PURE__*/
|
|
182
|
+
React.createElement(MonacoEditor, {
|
|
183
|
+
value: currentJSONValue,
|
|
184
|
+
language: "javascript",
|
|
185
|
+
onChange: function onChange(code) {
|
|
186
|
+
try {
|
|
187
|
+
window.localStorage.setItem("customInput", JSON.stringify(JSON.parse(code)));
|
|
188
|
+
changeCurrentError(null);
|
|
189
|
+
} catch (e) {
|
|
190
|
+
changeCurrentError(e.toString());
|
|
191
|
+
}
|
|
166
192
|
|
|
167
|
-
|
|
193
|
+
changeCurrentJSONValue(code);
|
|
194
|
+
},
|
|
195
|
+
width: "100%",
|
|
196
|
+
height: "550px"
|
|
197
|
+
}))),
|
|
198
|
+
/*#__PURE__*/
|
|
199
|
+
React.createElement("div", {
|
|
200
|
+
className: c.specificationArea
|
|
168
201
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
202
|
+
/*#__PURE__*/
|
|
203
|
+
React.createElement("h2", null, "React Image Annotate Format"),
|
|
204
|
+
/*#__PURE__*/
|
|
205
|
+
React.createElement(Code, {
|
|
206
|
+
language: "javascript"
|
|
207
|
+
}, "\n{\n taskDescription?: string, // markdown\n regionTagList?: Array<string>,\n regionClsList?: Array<string>,\n imageTagList?: Array<string>,\n imageClsList?: Array<string>,\n // all tools are enabled by default\n enabledTools?: Array< \"select\" | \"create-point\" | \"create-box\" | \"create-polygon\" | \"create-line\">,\n selectedImage?: string, // initial selected image\n images: Array<{\n src: string,\n thumbnailSrc?: string, // use this if you are using high-res images\n name: string,\n regions?: Array<{\n id: string | number,\n cls?: string,\n color?: string,\n tags?: Array<string>,\n\n // Point\n type: \"point\",\n x: number, // [0-1] % of image width\n y: number, // [0-1] % of image height\n\n // Bounding Box\n type: \"box\",\n x: number, // [0-1] % of image width\n y: number, // [0-1] % of image height\n w: number, // [0-1] % of image width\n h: number, // [0-1] % of image height\n\n // Polygon\n type: \"polygon\",\n open?: boolean, // should last and first points be connected, default: true\n points: Array<[number, number]> // [0-1] % of image width/height\n }>\n }>,\n}\n")),
|
|
208
|
+
/*#__PURE__*/
|
|
209
|
+
React.createElement(Dialog, {
|
|
210
|
+
fullScreen: true,
|
|
211
|
+
open: outputDialogOpen
|
|
212
|
+
},
|
|
213
|
+
/*#__PURE__*/
|
|
214
|
+
React.createElement(DialogTitle, null, "React Image Annotate Output"),
|
|
215
|
+
/*#__PURE__*/
|
|
216
|
+
React.createElement(DialogContent, {
|
|
217
|
+
style: {
|
|
218
|
+
minWidth: 400
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
/*#__PURE__*/
|
|
222
|
+
React.createElement(MonacoEditor, {
|
|
223
|
+
value: JSON.stringify(lastOutput, null, " "),
|
|
224
|
+
language: "javascript",
|
|
225
|
+
width: "100%",
|
|
226
|
+
height: "550px"
|
|
227
|
+
})),
|
|
228
|
+
/*#__PURE__*/
|
|
229
|
+
React.createElement(DialogActions, null,
|
|
230
|
+
/*#__PURE__*/
|
|
231
|
+
React.createElement(Button, {
|
|
232
|
+
onClick: function onClick() {
|
|
233
|
+
return changeOutputOpen(false);
|
|
234
|
+
}
|
|
235
|
+
}, "Close")))))
|
|
236
|
+
);
|
|
192
237
|
};
|
|
193
238
|
|
|
194
239
|
export default Editor;
|
|
@@ -46,12 +46,25 @@ function (_Component) {
|
|
|
46
46
|
key: "render",
|
|
47
47
|
value: function render() {
|
|
48
48
|
if (this.state.hasError) {
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
return (
|
|
50
|
+
/*#__PURE__*/
|
|
51
|
+
React.createElement(Dialog, {
|
|
52
|
+
open: this.state.hasError,
|
|
53
|
+
onClose: this.props.onClose
|
|
54
|
+
},
|
|
55
|
+
/*#__PURE__*/
|
|
56
|
+
React.createElement(DialogTitle, null, "Error Loading Annotator"),
|
|
57
|
+
/*#__PURE__*/
|
|
58
|
+
React.createElement(DialogContent, null,
|
|
59
|
+
/*#__PURE__*/
|
|
60
|
+
React.createElement("pre", null, this.state.err)),
|
|
61
|
+
/*#__PURE__*/
|
|
62
|
+
React.createElement(DialogActions, null,
|
|
63
|
+
/*#__PURE__*/
|
|
64
|
+
React.createElement(Button, {
|
|
65
|
+
onClick: this.props.onClose
|
|
66
|
+
}, "Close")))
|
|
67
|
+
);
|
|
55
68
|
}
|
|
56
69
|
|
|
57
70
|
return this.props.children;
|
package/DemoSite/index.js
CHANGED
|
@@ -20,21 +20,30 @@ export default (function () {
|
|
|
20
20
|
lastOutput = _useState6[0],
|
|
21
21
|
changeLastOutput = _useState6[1];
|
|
22
22
|
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
return (
|
|
24
|
+
/*#__PURE__*/
|
|
25
|
+
React.createElement("div", null, annotatorOpen ?
|
|
26
|
+
/*#__PURE__*/
|
|
27
|
+
React.createElement(ErrorBoundaryDialog, {
|
|
28
|
+
onClose: function onClose() {
|
|
29
|
+
changeAnnotatorOpen(false);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
React.createElement(Annotator, Object.assign({}, annotatorProps, {
|
|
34
|
+
onExit: function onExit(output) {
|
|
35
|
+
delete output["lastAction"];
|
|
36
|
+
changeLastOutput(output);
|
|
37
|
+
changeAnnotatorOpen(false);
|
|
38
|
+
}
|
|
39
|
+
}))) :
|
|
40
|
+
/*#__PURE__*/
|
|
41
|
+
React.createElement(Editor, {
|
|
42
|
+
lastOutput: lastOutput,
|
|
43
|
+
onOpenAnnotator: function onOpenAnnotator(props) {
|
|
44
|
+
changeAnnotatorProps(props);
|
|
45
|
+
changeAnnotatorOpen(true);
|
|
46
|
+
}
|
|
47
|
+
}))
|
|
48
|
+
);
|
|
40
49
|
});
|