@searpent/react-image-annotate 2.0.80 → 2.0.82-cand-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.
Files changed (57) hide show
  1. package/Annotator/examplePhotos.js +28 -28
  2. package/Annotator/index.js +15 -21
  3. package/Annotator/reducers/combine-reducers.js +18 -3
  4. package/Annotator/reducers/convert-expanding-line-to-polygon.js +15 -16
  5. package/Annotator/reducers/get-implied-video-regions.js +18 -30
  6. package/ClassSelectionMenu/index.js +8 -8
  7. package/Crosshairs/index.js +2 -2
  8. package/DebugSidebarBox/index.js +4 -4
  9. package/DemoSite/Editor.js +15 -15
  10. package/DemoSite/ErrorBoundaryDialog.js +3 -5
  11. package/DemoSite/index.js +3 -3
  12. package/Editor/annotation-plugin/annotation.js +1 -3
  13. package/Editor/index.js +12 -31
  14. package/Editor/readOnly.js +395 -47
  15. package/Errorer/index.js +2 -2
  16. package/FullImageSegmentationAnnotator/index.js +1 -1
  17. package/GroupSelectorSidebarBox/index.js +7 -7
  18. package/GroupsEditorSidebarBox/index.js +11 -11
  19. package/HelpSidebarBox/index.js +4 -4
  20. package/HighlightBox/index.js +3 -3
  21. package/HistorySidebarBox/index.js +8 -8
  22. package/ImageCanvas/index.js +16 -16
  23. package/ImageMask/index.js +1 -1
  24. package/ImageSelectorSidebarBox/index.js +7 -7
  25. package/KeyframeTimeline/index.js +30 -14
  26. package/KeyframesSelectorSidebarBox/index.js +8 -8
  27. package/LandingPage/index.js +12 -12
  28. package/Locker/index.js +2 -2
  29. package/MainLayout/RightSidebarItemsWrapper.js +1 -1
  30. package/MainLayout/icon-dictionary.js +11 -11
  31. package/MainLayout/index.js +25 -23
  32. package/MetadataEditorSidebarBox/index.js +18 -18
  33. package/PageSelector/index.js +21 -21
  34. package/PointDistances/index.js +4 -4
  35. package/PreventScrollToParents/index.js +3 -3
  36. package/RegionLabel/index.js +24 -24
  37. package/RegionSelectAndTransformBoxes/index.js +8 -8
  38. package/RegionSelectorSidebarBox/index.js +33 -33
  39. package/RegionShapes/index.js +22 -22
  40. package/RegionTags/index.js +6 -6
  41. package/SettingsDialog/index.js +4 -4
  42. package/SettingsProvider/index.js +1 -1
  43. package/Shortcuts/ShortcutField.js +3 -3
  44. package/Shortcuts/index.js +2 -2
  45. package/ShortcutsManager/index.js +9 -9
  46. package/Sidebar/index.js +7 -7
  47. package/SidebarBoxContainer/index.js +3 -3
  48. package/SmallToolButton/index.js +2 -2
  49. package/TagsSidebarBox/index.js +6 -6
  50. package/TaskDescriptionSidebarBox/index.js +4 -4
  51. package/Theme/index.js +2 -2
  52. package/VideoOrImageCanvasBackground/index.js +5 -5
  53. package/mj_smaz_hist.log +20015 -0
  54. package/package.json +4 -3
  55. package/utils/blocks-to-article.js +3 -3
  56. package/utils/get-landmarks-with-transform.js +13 -15
  57. package/utils/spellcheck-nspell.js +635 -0
@@ -1,121 +1,469 @@
1
- import React from 'react';
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import React, { useEffect, useRef, useState } from 'react';
5
+ import { highlightMisspellingsInHtml } from '../utils/spellcheck-nspell';
2
6
 
3
7
  function ReadOnly(_ref) {
4
8
  var article = _ref.article;
5
- return React.createElement("div", null, React.createElement("h1", {
9
+ var containerRef = useRef(null); // Warm up dictionary on component mount
10
+
11
+ useEffect(function () {
12
+ var run = /*#__PURE__*/function () {
13
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
14
+ var combinedHtml;
15
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
16
+ while (1) {
17
+ switch (_context.prev = _context.next) {
18
+ case 0:
19
+ combinedHtml = [article.title, article.subtitle, article.text, article.author, article.about_author, article.appendix, article.photo_author, article.photo_caption, article.advertisement, article.other_graphics, article.unknown, article.table, article.section, article.continuation_ref, article.cover_clip, article.page_id, article.continuation_mark, article.follow_up_mark, article.article_termination_mark, article.page_splitting_stripe, article.column_id_stripe, article.prev_page_reference, article.section_subcategory].filter(Boolean).join(' '); // warm up dictionary once with auto-detection
20
+
21
+ _context.next = 3;
22
+ return highlightMisspellingsInHtml(combinedHtml, 'auto');
23
+
24
+ case 3:
25
+ case "end":
26
+ return _context.stop();
27
+ }
28
+ }
29
+ }, _callee);
30
+ }));
31
+
32
+ return function run() {
33
+ return _ref2.apply(this, arguments);
34
+ };
35
+ }();
36
+
37
+ run();
38
+ }, [article]);
39
+
40
+ var _useState = useState(article.title),
41
+ _useState2 = _slicedToArray(_useState, 2),
42
+ titleHTML = _useState2[0],
43
+ setTitleHTML = _useState2[1];
44
+
45
+ var _useState3 = useState(article.subtitle),
46
+ _useState4 = _slicedToArray(_useState3, 2),
47
+ subtitleHTML = _useState4[0],
48
+ setSubtitleHTML = _useState4[1];
49
+
50
+ var _useState5 = useState(article.text),
51
+ _useState6 = _slicedToArray(_useState5, 2),
52
+ textHTML = _useState6[0],
53
+ setTextHTML = _useState6[1];
54
+
55
+ var _useState7 = useState(article.author),
56
+ _useState8 = _slicedToArray(_useState7, 2),
57
+ authorHTML = _useState8[0],
58
+ setAuthorHTML = _useState8[1];
59
+
60
+ var _useState9 = useState(article.about_author),
61
+ _useState10 = _slicedToArray(_useState9, 2),
62
+ aboutHTML = _useState10[0],
63
+ setAboutHTML = _useState10[1];
64
+
65
+ var _useState11 = useState(article.appendix),
66
+ _useState12 = _slicedToArray(_useState11, 2),
67
+ appendixHTML = _useState12[0],
68
+ setAppendixHTML = _useState12[1];
69
+
70
+ var _useState13 = useState(article.photo_author),
71
+ _useState14 = _slicedToArray(_useState13, 2),
72
+ photoAuthorHTML = _useState14[0],
73
+ setPhotoAuthorHTML = _useState14[1];
74
+
75
+ var _useState15 = useState(article.photo_caption),
76
+ _useState16 = _slicedToArray(_useState15, 2),
77
+ photoCaptionHTML = _useState16[0],
78
+ setPhotoCaptionHTML = _useState16[1];
79
+
80
+ var _useState17 = useState(article.advertisement),
81
+ _useState18 = _slicedToArray(_useState17, 2),
82
+ adHTML = _useState18[0],
83
+ setAdHTML = _useState18[1];
84
+
85
+ var _useState19 = useState(article.other_graphics),
86
+ _useState20 = _slicedToArray(_useState19, 2),
87
+ otherGraphicsHTML = _useState20[0],
88
+ setOtherGraphicsHTML = _useState20[1];
89
+
90
+ var _useState21 = useState(article.unknown),
91
+ _useState22 = _slicedToArray(_useState21, 2),
92
+ unknownHTML = _useState22[0],
93
+ setUnknownHTML = _useState22[1];
94
+
95
+ var _useState23 = useState(article.table),
96
+ _useState24 = _slicedToArray(_useState23, 2),
97
+ tableHTML = _useState24[0],
98
+ setTableHTML = _useState24[1];
99
+
100
+ var _useState25 = useState(article.section),
101
+ _useState26 = _slicedToArray(_useState25, 2),
102
+ sectionHTML = _useState26[0],
103
+ setSectionHTML = _useState26[1];
104
+
105
+ var _useState27 = useState(article.continuation_ref),
106
+ _useState28 = _slicedToArray(_useState27, 2),
107
+ continuationRefHTML = _useState28[0],
108
+ setContinuationRefHTML = _useState28[1];
109
+
110
+ var _useState29 = useState(article.cover_clip),
111
+ _useState30 = _slicedToArray(_useState29, 2),
112
+ coverClipHTML = _useState30[0],
113
+ setCoverClipHTML = _useState30[1];
114
+
115
+ var _useState31 = useState(article.page_id),
116
+ _useState32 = _slicedToArray(_useState31, 2),
117
+ pageIdHTML = _useState32[0],
118
+ setPageIdHTML = _useState32[1];
119
+
120
+ var _useState33 = useState(article.continuation_mark),
121
+ _useState34 = _slicedToArray(_useState33, 2),
122
+ continuationMarkHTML = _useState34[0],
123
+ setContinuationMarkHTML = _useState34[1];
124
+
125
+ var _useState35 = useState(article.follow_up_mark),
126
+ _useState36 = _slicedToArray(_useState35, 2),
127
+ followUpMarkHTML = _useState36[0],
128
+ setFollowUpMarkHTML = _useState36[1];
129
+
130
+ var _useState37 = useState(article.article_termination_mark),
131
+ _useState38 = _slicedToArray(_useState37, 2),
132
+ articleTerminationMarkHTML = _useState38[0],
133
+ setArticleTerminationMarkHTML = _useState38[1];
134
+
135
+ var _useState39 = useState(article.page_splitting_stripe),
136
+ _useState40 = _slicedToArray(_useState39, 2),
137
+ pageSplittingStripeHTML = _useState40[0],
138
+ setPageSplittingStripeHTML = _useState40[1];
139
+
140
+ var _useState41 = useState(article.column_id_stripe),
141
+ _useState42 = _slicedToArray(_useState41, 2),
142
+ columnIdStripeHTML = _useState42[0],
143
+ setColumnIdStripeHTML = _useState42[1];
144
+
145
+ var _useState43 = useState(article.prev_page_reference),
146
+ _useState44 = _slicedToArray(_useState43, 2),
147
+ prevPageReferenceHTML = _useState44[0],
148
+ setPrevPageReferenceHTML = _useState44[1];
149
+
150
+ var _useState45 = useState(article.section_subcategory),
151
+ _useState46 = _slicedToArray(_useState45, 2),
152
+ sectionSubcategoryHTML = _useState46[0],
153
+ setSectionSubcategoryHTML = _useState46[1];
154
+
155
+ useEffect(function () {
156
+ var cancelled = false;
157
+
158
+ var apply = /*#__PURE__*/function () {
159
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
160
+ var h1, h2, t, a, ab, ap, pa, pc, adv, og, unk, tbl, sec, contRef, coverClip, pageId, contMark, followUp, articleTerm, pageStripe, columnStripe, prevPageRef, sectionSubcat;
161
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
162
+ while (1) {
163
+ switch (_context2.prev = _context2.next) {
164
+ case 0:
165
+ _context2.prev = 0;
166
+ _context2.next = 3;
167
+ return highlightMisspellingsInHtml(article.title || '', 'auto');
168
+
169
+ case 3:
170
+ h1 = _context2.sent;
171
+ _context2.next = 6;
172
+ return highlightMisspellingsInHtml(article.subtitle || '', 'auto');
173
+
174
+ case 6:
175
+ h2 = _context2.sent;
176
+ _context2.next = 9;
177
+ return highlightMisspellingsInHtml(article.text || '', 'auto');
178
+
179
+ case 9:
180
+ t = _context2.sent;
181
+ _context2.next = 12;
182
+ return highlightMisspellingsInHtml(article.author || '', 'auto');
183
+
184
+ case 12:
185
+ a = _context2.sent;
186
+ _context2.next = 15;
187
+ return highlightMisspellingsInHtml(article.about_author || '', 'auto');
188
+
189
+ case 15:
190
+ ab = _context2.sent;
191
+ _context2.next = 18;
192
+ return highlightMisspellingsInHtml(article.appendix || '', 'auto');
193
+
194
+ case 18:
195
+ ap = _context2.sent;
196
+ _context2.next = 21;
197
+ return highlightMisspellingsInHtml(article.photo_author || '', 'auto');
198
+
199
+ case 21:
200
+ pa = _context2.sent;
201
+ _context2.next = 24;
202
+ return highlightMisspellingsInHtml(article.photo_caption || '', 'auto');
203
+
204
+ case 24:
205
+ pc = _context2.sent;
206
+ _context2.next = 27;
207
+ return highlightMisspellingsInHtml(article.advertisement || '', 'auto');
208
+
209
+ case 27:
210
+ adv = _context2.sent;
211
+ _context2.next = 30;
212
+ return highlightMisspellingsInHtml(article.other_graphics || '', 'auto');
213
+
214
+ case 30:
215
+ og = _context2.sent;
216
+ _context2.next = 33;
217
+ return highlightMisspellingsInHtml(article.unknown || '', 'auto');
218
+
219
+ case 33:
220
+ unk = _context2.sent;
221
+ _context2.next = 36;
222
+ return highlightMisspellingsInHtml(article.table || '', 'auto');
223
+
224
+ case 36:
225
+ tbl = _context2.sent;
226
+ _context2.next = 39;
227
+ return highlightMisspellingsInHtml(article.section || '', 'auto');
228
+
229
+ case 39:
230
+ sec = _context2.sent;
231
+ _context2.next = 42;
232
+ return highlightMisspellingsInHtml(article.continuation_ref || '', 'auto');
233
+
234
+ case 42:
235
+ contRef = _context2.sent;
236
+ _context2.next = 45;
237
+ return highlightMisspellingsInHtml(article.cover_clip || '', 'auto');
238
+
239
+ case 45:
240
+ coverClip = _context2.sent;
241
+ _context2.next = 48;
242
+ return highlightMisspellingsInHtml(article.page_id || '', 'auto');
243
+
244
+ case 48:
245
+ pageId = _context2.sent;
246
+ _context2.next = 51;
247
+ return highlightMisspellingsInHtml(article.continuation_mark || '', 'auto');
248
+
249
+ case 51:
250
+ contMark = _context2.sent;
251
+ _context2.next = 54;
252
+ return highlightMisspellingsInHtml(article.follow_up_mark || '', 'auto');
253
+
254
+ case 54:
255
+ followUp = _context2.sent;
256
+ _context2.next = 57;
257
+ return highlightMisspellingsInHtml(article.article_termination_mark || '', 'auto');
258
+
259
+ case 57:
260
+ articleTerm = _context2.sent;
261
+ _context2.next = 60;
262
+ return highlightMisspellingsInHtml(article.page_splitting_stripe || '', 'auto');
263
+
264
+ case 60:
265
+ pageStripe = _context2.sent;
266
+ _context2.next = 63;
267
+ return highlightMisspellingsInHtml(article.column_id_stripe || '', 'auto');
268
+
269
+ case 63:
270
+ columnStripe = _context2.sent;
271
+ _context2.next = 66;
272
+ return highlightMisspellingsInHtml(article.prev_page_reference || '', 'auto');
273
+
274
+ case 66:
275
+ prevPageRef = _context2.sent;
276
+ _context2.next = 69;
277
+ return highlightMisspellingsInHtml(article.section_subcategory || '', 'auto');
278
+
279
+ case 69:
280
+ sectionSubcat = _context2.sent;
281
+
282
+ if (!cancelled) {
283
+ _context2.next = 72;
284
+ break;
285
+ }
286
+
287
+ return _context2.abrupt("return");
288
+
289
+ case 72:
290
+ setTitleHTML(h1);
291
+ setSubtitleHTML(h2);
292
+ setTextHTML(t);
293
+ setAuthorHTML(a);
294
+ setAboutHTML(ab);
295
+ setAppendixHTML(ap);
296
+ setPhotoAuthorHTML(pa);
297
+ setPhotoCaptionHTML(pc);
298
+ setAdHTML(adv);
299
+ setOtherGraphicsHTML(og);
300
+ setUnknownHTML(unk);
301
+ setTableHTML(tbl);
302
+ setSectionHTML(sec);
303
+ setContinuationRefHTML(contRef);
304
+ setCoverClipHTML(coverClip);
305
+ setPageIdHTML(pageId);
306
+ setContinuationMarkHTML(contMark);
307
+ setFollowUpMarkHTML(followUp);
308
+ setArticleTerminationMarkHTML(articleTerm);
309
+ setPageSplittingStripeHTML(pageStripe);
310
+ setColumnIdStripeHTML(columnStripe);
311
+ setPrevPageReferenceHTML(prevPageRef);
312
+ setSectionSubcategoryHTML(sectionSubcat);
313
+ _context2.next = 100;
314
+ break;
315
+
316
+ case 97:
317
+ _context2.prev = 97;
318
+ _context2.t0 = _context2["catch"](0);
319
+
320
+ if (!cancelled) {
321
+ console.warn('Spellcheck error:', _context2.t0);
322
+ }
323
+
324
+ case 100:
325
+ case "end":
326
+ return _context2.stop();
327
+ }
328
+ }
329
+ }, _callee2, null, [[0, 97]]);
330
+ }));
331
+
332
+ return function apply() {
333
+ return _ref3.apply(this, arguments);
334
+ };
335
+ }();
336
+
337
+ apply();
338
+ return function () {
339
+ cancelled = true;
340
+ };
341
+ }, [article]);
342
+ return /*#__PURE__*/React.createElement("div", {
343
+ ref: containerRef,
344
+ contentEditable: false,
345
+ suppressContentEditableWarning: true,
346
+ spellCheck: false,
347
+ lang: "en-US",
348
+ style: {
349
+ outline: 'none',
350
+ userSelect: 'text',
351
+ minHeight: '100px'
352
+ }
353
+ }, /*#__PURE__*/React.createElement("style", null, ".spell-error { text-decoration: wavy underline red; text-decoration-skip-ink: auto; }"), /*#__PURE__*/React.createElement("h1", {
6
354
  className: "ro-title",
7
355
  dangerouslySetInnerHTML: {
8
- __html: article.title
356
+ __html: titleHTML
9
357
  }
10
- }), React.createElement("h2", {
358
+ }), /*#__PURE__*/React.createElement("h2", {
11
359
  className: "ro-subtitle",
12
360
  dangerouslySetInnerHTML: {
13
- __html: article.subtitle
361
+ __html: subtitleHTML
14
362
  }
15
- }), React.createElement("p", {
363
+ }), /*#__PURE__*/React.createElement("p", {
16
364
  className: "ro-text",
17
365
  dangerouslySetInnerHTML: {
18
- __html: article.text
366
+ __html: textHTML
19
367
  }
20
- }), React.createElement("p", {
368
+ }), /*#__PURE__*/React.createElement("p", {
21
369
  className: "ro-author",
22
370
  dangerouslySetInnerHTML: {
23
- __html: article.author
371
+ __html: authorHTML
24
372
  }
25
- }), React.createElement("p", {
373
+ }), /*#__PURE__*/React.createElement("p", {
26
374
  className: "ro-about-author",
27
375
  dangerouslySetInnerHTML: {
28
- __html: article.about_author
376
+ __html: aboutHTML
29
377
  }
30
- }), React.createElement("p", {
378
+ }), /*#__PURE__*/React.createElement("p", {
31
379
  className: "ro-appendix",
32
380
  dangerouslySetInnerHTML: {
33
- __html: article.appendix
381
+ __html: appendixHTML
34
382
  }
35
- }), React.createElement("p", {
383
+ }), /*#__PURE__*/React.createElement("p", {
36
384
  className: "ro-photo-author",
37
385
  dangerouslySetInnerHTML: {
38
- __html: article.photo_author
386
+ __html: photoAuthorHTML
39
387
  }
40
- }), React.createElement("p", {
388
+ }), /*#__PURE__*/React.createElement("p", {
41
389
  className: "ro-photo-caption",
42
390
  dangerouslySetInnerHTML: {
43
- __html: article.photo_caption
391
+ __html: photoCaptionHTML
44
392
  }
45
- }), React.createElement("p", {
393
+ }), /*#__PURE__*/React.createElement("p", {
46
394
  className: "ro-advertisment",
47
395
  dangerouslySetInnerHTML: {
48
- __html: article.advertisement
396
+ __html: adHTML
49
397
  }
50
- }), React.createElement("p", {
398
+ }), /*#__PURE__*/React.createElement("p", {
51
399
  className: "ro-other-graphics",
52
400
  dangerouslySetInnerHTML: {
53
- __html: article.other_graphics
401
+ __html: otherGraphicsHTML
54
402
  }
55
- }), React.createElement("p", {
403
+ }), /*#__PURE__*/React.createElement("p", {
56
404
  className: "ro-unknown",
57
405
  dangerouslySetInnerHTML: {
58
- __html: article.unknown
406
+ __html: unknownHTML
59
407
  }
60
- }), React.createElement("p", {
408
+ }), /*#__PURE__*/React.createElement("p", {
61
409
  className: "ro-table",
62
410
  dangerouslySetInnerHTML: {
63
- __html: article.table
411
+ __html: tableHTML
64
412
  }
65
- }), React.createElement("p", {
413
+ }), /*#__PURE__*/React.createElement("p", {
66
414
  className: "ro-section",
67
415
  dangerouslySetInnerHTML: {
68
- __html: article.section
416
+ __html: sectionHTML
69
417
  }
70
- }), React.createElement("p", {
418
+ }), /*#__PURE__*/React.createElement("p", {
71
419
  className: "ro-continuation_ref",
72
420
  dangerouslySetInnerHTML: {
73
- __html: article.continuation_ref
421
+ __html: continuationRefHTML
74
422
  }
75
- }), React.createElement("p", {
423
+ }), /*#__PURE__*/React.createElement("p", {
76
424
  className: "ro-cover_clip",
77
425
  dangerouslySetInnerHTML: {
78
- __html: article.cover_clip
426
+ __html: coverClipHTML
79
427
  }
80
- }), React.createElement("p", {
428
+ }), /*#__PURE__*/React.createElement("p", {
81
429
  className: "ro-page_id",
82
430
  dangerouslySetInnerHTML: {
83
- __html: article.page_id
431
+ __html: pageIdHTML
84
432
  }
85
- }), React.createElement("p", {
433
+ }), /*#__PURE__*/React.createElement("p", {
86
434
  className: "ro-continuation_mark",
87
435
  dangerouslySetInnerHTML: {
88
- __html: article.continuation_mark
436
+ __html: continuationMarkHTML
89
437
  }
90
- }), React.createElement("p", {
438
+ }), /*#__PURE__*/React.createElement("p", {
91
439
  className: "ro-follow_up_mark",
92
440
  dangerouslySetInnerHTML: {
93
- __html: article.follow_up_mark
441
+ __html: followUpMarkHTML
94
442
  }
95
- }), React.createElement("p", {
443
+ }), /*#__PURE__*/React.createElement("p", {
96
444
  className: "ro-article_termination_mark",
97
445
  dangerouslySetInnerHTML: {
98
- __html: article.article_termination_mark
446
+ __html: articleTerminationMarkHTML
99
447
  }
100
- }), React.createElement("p", {
448
+ }), /*#__PURE__*/React.createElement("p", {
101
449
  className: "ro-page_splitting_stripe",
102
450
  dangerouslySetInnerHTML: {
103
- __html: article.page_splitting_stripe
451
+ __html: pageSplittingStripeHTML
104
452
  }
105
- }), React.createElement("p", {
453
+ }), /*#__PURE__*/React.createElement("p", {
106
454
  className: "ro-column_id_stripe",
107
455
  dangerouslySetInnerHTML: {
108
- __html: article.column_id_stripe
456
+ __html: columnIdStripeHTML
109
457
  }
110
- }), React.createElement("p", {
458
+ }), /*#__PURE__*/React.createElement("p", {
111
459
  className: "ro-prev_page_reference",
112
460
  dangerouslySetInnerHTML: {
113
- __html: article.prev_page_reference
461
+ __html: prevPageReferenceHTML
114
462
  }
115
- }), React.createElement("p", {
463
+ }), /*#__PURE__*/React.createElement("p", {
116
464
  className: "ro-section_subcategory",
117
465
  dangerouslySetInnerHTML: {
118
- __html: article.section_subcategory
466
+ __html: sectionSubcategoryHTML
119
467
  }
120
468
  }));
121
469
  }
package/Errorer/index.js CHANGED
@@ -3,9 +3,9 @@ import ErrorIcon from '@mui/icons-material/Error';
3
3
  import './errorer.css';
4
4
 
5
5
  function Errorer() {
6
- return React.createElement("div", {
6
+ return /*#__PURE__*/React.createElement("div", {
7
7
  className: "errorer"
8
- }, React.createElement(ErrorIcon, null));
8
+ }, /*#__PURE__*/React.createElement(ErrorIcon, null));
9
9
  }
10
10
 
11
11
  export default Errorer;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Annotator from "../Annotator";
3
3
  export default (function (props) {
4
- return React.createElement(Annotator, Object.assign({}, props, {
4
+ return /*#__PURE__*/React.createElement(Annotator, Object.assign({}, props, {
5
5
  fullImageSegmentationMode: true
6
6
  }));
7
7
  });
@@ -25,22 +25,22 @@ export var GroupSelectorSidebarBox = function GroupSelectorSidebarBox(_ref) {
25
25
  onSelect = _ref.onSelect,
26
26
  selectedGroupId = _ref.selectedGroupId;
27
27
  var classes = useStyles();
28
- return React.createElement(ThemeProvider, {
28
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
29
29
  theme: theme
30
- }, React.createElement(SidebarBoxContainer, {
30
+ }, /*#__PURE__*/React.createElement(SidebarBoxContainer, {
31
31
  title: title || '',
32
32
  subTitle: subtitle || '',
33
- icon: React.createElement(CollectionsIcon, {
33
+ icon: /*#__PURE__*/React.createElement(CollectionsIcon, {
34
34
  style: {
35
35
  color: grey[700]
36
36
  }
37
37
  })
38
- }, React.createElement(List, null, groups.map(function (_ref2, i) {
38
+ }, /*#__PURE__*/React.createElement(List, null, groups.map(function (_ref2, i) {
39
39
  var id = _ref2.id,
40
40
  groupTitle = _ref2.title,
41
41
  groupSubtitle = _ref2.subtitle,
42
42
  color = _ref2.color;
43
- return React.createElement(ListItem, {
43
+ return /*#__PURE__*/React.createElement(ListItem, {
44
44
  button: true,
45
45
  onClick: function onClick() {
46
46
  return onSelect(id);
@@ -50,8 +50,8 @@ export var GroupSelectorSidebarBox = function GroupSelectorSidebarBox(_ref) {
50
50
  style: {
51
51
  backgroundColor: id === selectedGroupId ? '#bbdefb' : null
52
52
  }
53
- }, React.createElement(ListItemText, {
54
- primary: React.createElement("strong", {
53
+ }, /*#__PURE__*/React.createElement(ListItemText, {
54
+ primary: /*#__PURE__*/React.createElement("strong", {
55
55
  style: {
56
56
  color: color
57
57
  }
@@ -23,13 +23,13 @@ var GroupItemDiv = styled("div")(function (_ref) {
23
23
 
24
24
  var GroupItem = function GroupItem(_ref2) {
25
25
  var group = _ref2.group;
26
- return React.createElement(GroupItemDiv, null, uuidToHash(group.id));
26
+ return /*#__PURE__*/React.createElement(GroupItemDiv, null, uuidToHash(group.id));
27
27
  };
28
28
 
29
29
  var GroupList = function GroupList(_ref3) {
30
30
  var groups = _ref3.groups;
31
- return React.createElement("div", null, React.createElement("h2", null, "Groups"), groups.map(function (g, idx) {
32
- return React.createElement(GroupItem, {
31
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", null, "Groups"), groups.map(function (g, idx) {
32
+ return /*#__PURE__*/React.createElement(GroupItem, {
33
33
  key: "".concat(g, "-").concat(idx),
34
34
  group: g
35
35
  });
@@ -62,13 +62,13 @@ var AddGroupFrom = function AddGroupFrom(_ref5) {
62
62
  setValue('');
63
63
  };
64
64
 
65
- return React.createElement(AddGroupFormDiv, null, React.createElement("form", {
65
+ return /*#__PURE__*/React.createElement(AddGroupFormDiv, null, /*#__PURE__*/React.createElement("form", {
66
66
  onSubmit: handleSubmit,
67
67
  style: {
68
68
  display: "flex",
69
69
  paddingRight: "6px"
70
70
  }
71
- }, React.createElement("input", {
71
+ }, /*#__PURE__*/React.createElement("input", {
72
72
  type: "text",
73
73
  value: value,
74
74
  name: "new-group",
@@ -77,7 +77,7 @@ var AddGroupFrom = function AddGroupFrom(_ref5) {
77
77
  style: {
78
78
  marginRight: "1rem"
79
79
  }
80
- }), React.createElement("input", {
80
+ }), /*#__PURE__*/React.createElement("input", {
81
81
  type: "submit",
82
82
  value: "Create group"
83
83
  })));
@@ -119,19 +119,19 @@ var DivContainer = styled("div")(function (_ref6) {
119
119
  export var GroupsEditorSidebarBox = function GroupsEditorSidebarBox(_ref7) {
120
120
  var groups = _ref7.groups,
121
121
  onAddGroup = _ref7.onAddGroup;
122
- return React.createElement(ThemeProvider, {
122
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
123
123
  theme: theme
124
- }, React.createElement(SidebarBoxContainer, {
124
+ }, /*#__PURE__*/React.createElement(SidebarBoxContainer, {
125
125
  title: "Groups",
126
- icon: React.createElement(FilterNoneIcon, {
126
+ icon: /*#__PURE__*/React.createElement(FilterNoneIcon, {
127
127
  style: {
128
128
  color: grey[700]
129
129
  }
130
130
  }),
131
131
  expandedByDefault: true
132
- }, React.createElement(DivContainer, null, React.createElement("h2", null, "Add new group"), React.createElement(AddGroupFrom, {
132
+ }, /*#__PURE__*/React.createElement(DivContainer, null, /*#__PURE__*/React.createElement("h2", null, "Add new group"), /*#__PURE__*/React.createElement(AddGroupFrom, {
133
133
  onAddGroup: onAddGroup
134
- }), React.createElement(GroupList, {
134
+ }), /*#__PURE__*/React.createElement(GroupList, {
135
135
  groups: groups
136
136
  }))));
137
137
  };
@@ -41,17 +41,17 @@ var MarkdownContainer = styled("div")(function (_ref) {
41
41
  });
42
42
  export var HelpSidebarBox = function HelpSidebarBox(_ref2) {
43
43
  var help = _ref2.help;
44
- return React.createElement(ThemeProvider, {
44
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
45
45
  theme: theme
46
- }, React.createElement(SidebarBoxContainer, {
46
+ }, /*#__PURE__*/React.createElement(SidebarBoxContainer, {
47
47
  title: "Help",
48
- icon: React.createElement(HelpIcon, {
48
+ icon: /*#__PURE__*/React.createElement(HelpIcon, {
49
49
  style: {
50
50
  color: grey[700]
51
51
  }
52
52
  }),
53
53
  expandedByDefault: help && help !== "" ? false : true
54
- }, React.createElement(MarkdownContainer, null, React.createElement(Markdown, {
54
+ }, /*#__PURE__*/React.createElement(MarkdownContainer, null, /*#__PURE__*/React.createElement(Markdown, {
55
55
  source: help
56
56
  }))));
57
57
  };