@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.
Files changed (60) hide show
  1. package/Annotator/examplePhotos.js +28 -28
  2. package/Annotator/examplePhotos_repr.js +28 -28
  3. package/Annotator/index.js +38 -31
  4. package/Annotator/index.story_bugdemo_15_1.js +895 -773
  5. package/Annotator/index.story_repr.js +1048 -933
  6. package/Annotator/reducers/convert-expanding-line-to-polygon.js +15 -16
  7. package/ClassSelectionMenu/index.js +55 -35
  8. package/Crosshairs/index.js +30 -23
  9. package/DebugSidebarBox/index.js +40 -9
  10. package/DemoSite/Editor.js +124 -79
  11. package/DemoSite/ErrorBoundaryDialog.js +19 -6
  12. package/DemoSite/index.js +26 -17
  13. package/Editor/index.js +70 -36
  14. package/Editor/index_bugdemo_15_1.js +68 -35
  15. package/Editor/readOnly.js +178 -127
  16. package/Errorer/index.js +8 -3
  17. package/FullImageSegmentationAnnotator/index.js +6 -3
  18. package/GroupSelectorSidebarBox/index.js +48 -32
  19. package/GroupsEditorSidebarBox/index.js +75 -40
  20. package/HelpSidebarBox/index.js +24 -13
  21. package/HighlightBox/index.js +37 -30
  22. package/HistorySidebarBox/index.js +51 -29
  23. package/ImageCanvas/index.js +165 -130
  24. package/ImageMask/index.js +9 -6
  25. package/ImageSelectorSidebarBox/index.js +44 -26
  26. package/KeyframeTimeline/index.js +65 -45
  27. package/KeyframesSelectorSidebarBox/index.js +76 -54
  28. package/LandingPage/index.js +76 -38
  29. package/Locker/index.js +8 -3
  30. package/MainLayout/RightSidebarItemsWrapper.js +7 -4
  31. package/MainLayout/icon-dictionary.js +99 -66
  32. package/MainLayout/index.js +256 -196
  33. package/MainLayout/index_bugdemo_15_1.js +253 -195
  34. package/MetadataEditorSidebarBox/index.js +152 -102
  35. package/MetadataEditorSidebarBox/index_14_01_25.js +152 -102
  36. package/MetadataEditorSidebarBox/index_repr.js +183 -128
  37. package/PageSelector/UpdatedBySemaphore.js +54 -0
  38. package/PageSelector/index.js +172 -96
  39. package/PageSelector/page-selector.css +126 -2
  40. package/PointDistances/index.js +45 -33
  41. package/PreventScrollToParents/index.js +16 -9
  42. package/RegionLabel/index.js +217 -165
  43. package/RegionSelectAndTransformBoxes/index.js +131 -105
  44. package/RegionSelectorSidebarBox/index.js +243 -165
  45. package/RegionShapes/index.js +213 -153
  46. package/RegionTags/index.js +83 -69
  47. package/SettingsDialog/index.js +50 -37
  48. package/SettingsProvider/index.js +8 -5
  49. package/Shortcuts/ShortcutField.js +21 -14
  50. package/Shortcuts/index.js +18 -12
  51. package/ShortcutsManager/index.js +7 -4
  52. package/Sidebar/index.js +46 -29
  53. package/SidebarBoxContainer/index.js +14 -7
  54. package/SmallToolButton/index.js +23 -16
  55. package/TagsSidebarBox/index.js +41 -28
  56. package/TaskDescriptionSidebarBox/index.js +24 -13
  57. package/Theme/index.js +8 -3
  58. package/VideoOrImageCanvasBackground/index.js +30 -17
  59. package/package.json +1 -1
  60. package/utils/spellcheck-nspell.js +2 -2
@@ -710,34 +710,34 @@ var examplePhotos = [{
710
710
  },
711
711
  "text": "[{\"label\":\"photo_caption\",\"text\":\"Protest n z února v Indii,\\n\\tpred proti v Pekingu.\"}]",
712
712
  "groupId": "6",
713
- "id": "346807506913198081" // {
714
- // "label": "photo_caption",
715
- // "score": 0.99,
716
- // "box": {
717
- // "X1": 0.80248857,
718
- // "X2": 0.95999366,
719
- // "Y1": 0.32127157,
720
- // "Y2": 0.34381694
721
- // },
722
- // "text": "[{\"label\":\"photo_caption\",\"text\":\"Protest z února v Indii proti konání ZOH v Pekingu\"}]",
723
- // "groupId": "6",
724
- // "id": "346807506913198082"
725
- // },
726
- // {
727
- // "label": "author",
728
- // "score": 0.99,
729
- // "box": {
730
- // "X1": 0.9584186,
731
- // "X2": 0.9733816,
732
- // "Y1": 0.51628906,
733
- // "Y2": 0.53319806
734
- // },
735
- // "text": "[{\"label\":\"author\",\"text\":\"PUR\"}]",
736
- // "groupId": "6",
737
- // "id": "346807506913198083"
738
- // }
739
-
740
- }]
713
+ "id": "346807506913198081"
714
+ } // {
715
+ // "label": "photo_caption",
716
+ // "score": 0.99,
717
+ // "box": {
718
+ // "X1": 0.80248857,
719
+ // "X2": 0.95999366,
720
+ // "Y1": 0.32127157,
721
+ // "Y2": 0.34381694
722
+ // },
723
+ // "text": "[{\"label\":\"photo_caption\",\"text\":\"Protest z února v Indii proti konání ZOH v Pekingu\"}]",
724
+ // "groupId": "6",
725
+ // "id": "346807506913198082"
726
+ // },
727
+ // {
728
+ // "label": "author",
729
+ // "score": 0.99,
730
+ // "box": {
731
+ // "X1": 0.9584186,
732
+ // "X2": 0.9733816,
733
+ // "Y1": 0.51628906,
734
+ // "Y2": 0.53319806
735
+ // },
736
+ // "text": "[{\"label\":\"author\",\"text\":\"PUR\"}]",
737
+ // "groupId": "6",
738
+ // "id": "346807506913198083"
739
+ // }
740
+ ]
741
741
  }, {
742
742
  "modelFamily": "metadata-engine",
743
743
  "name": "metadata-engine",
@@ -710,34 +710,34 @@ var examplePhotos = [{
710
710
  },
711
711
  "text": "[{\"label\":\"photo_caption\",\"text\":\"Protest n z února v Indii,\\n\\tpred proti v Pekingu.\"}]",
712
712
  "groupId": "6",
713
- "id": "346807506913198081" // {
714
- // "label": "photo_caption",
715
- // "score": 0.99,
716
- // "box": {
717
- // "X1": 0.80248857,
718
- // "X2": 0.95999366,
719
- // "Y1": 0.32127157,
720
- // "Y2": 0.34381694
721
- // },
722
- // "text": "[{\"label\":\"photo_caption\",\"text\":\"Protest z února v Indii proti konání ZOH v Pekingu\"}]",
723
- // "groupId": "6",
724
- // "id": "346807506913198082"
725
- // },
726
- // {
727
- // "label": "author",
728
- // "score": 0.99,
729
- // "box": {
730
- // "X1": 0.9584186,
731
- // "X2": 0.9733816,
732
- // "Y1": 0.51628906,
733
- // "Y2": 0.53319806
734
- // },
735
- // "text": "[{\"label\":\"author\",\"text\":\"PUR\"}]",
736
- // "groupId": "6",
737
- // "id": "346807506913198083"
738
- // }
739
-
740
- }]
713
+ "id": "346807506913198081"
714
+ } // {
715
+ // "label": "photo_caption",
716
+ // "score": 0.99,
717
+ // "box": {
718
+ // "X1": 0.80248857,
719
+ // "X2": 0.95999366,
720
+ // "Y1": 0.32127157,
721
+ // "Y2": 0.34381694
722
+ // },
723
+ // "text": "[{\"label\":\"photo_caption\",\"text\":\"Protest z února v Indii proti konání ZOH v Pekingu\"}]",
724
+ // "groupId": "6",
725
+ // "id": "346807506913198082"
726
+ // },
727
+ // {
728
+ // "label": "author",
729
+ // "score": 0.99,
730
+ // "box": {
731
+ // "X1": 0.9584186,
732
+ // "X2": 0.9733816,
733
+ // "Y1": 0.51628906,
734
+ // "Y2": 0.53319806
735
+ // },
736
+ // "text": "[{\"label\":\"author\",\"text\":\"PUR\"}]",
737
+ // "groupId": "6",
738
+ // "id": "346807506913198083"
739
+ // }
740
+ ]
741
741
  }, {
742
742
  "modelFamily": "metadata-engine",
743
743
  "name": "metadata-engine",
@@ -84,7 +84,8 @@ export var Annotator = function Annotator(_ref) {
84
84
  _ref$save = _ref.save,
85
85
  save = _ref$save === void 0 ? function () {} : _ref$save,
86
86
  _ref$fetchImage = _ref.fetchImage,
87
- fetchImage = _ref$fetchImage === void 0 ? function () {} : _ref$fetchImage;
87
+ fetchImage = _ref$fetchImage === void 0 ? function () {} : _ref$fetchImage,
88
+ updatedBy = _ref.updatedBy;
88
89
 
89
90
  if (typeof selectedImage === "string") {
90
91
  selectedImage = (images || []).findIndex(function (img) {
@@ -413,35 +414,41 @@ export var Annotator = function Annotator(_ref) {
413
414
  recalcActive = _ref7[0],
414
415
  saveActive = _ref7[1];
415
416
 
416
- return React.createElement(SettingsProvider, {
417
- clsColors: clsColors,
418
- groupColors: groupColors
419
- }, React.createElement(MainLayout, {
420
- RegionEditLabel: RegionEditLabel,
421
- alwaysShowNextButton: Boolean(onNextImage),
422
- alwaysShowPrevButton: Boolean(onPrevImage),
423
- state: state,
424
- dispatch: dispatch,
425
- onRegionClassAdded: onRegionClassAdded,
426
- hideHeader: hideHeader,
427
- hideHeaderText: hideHeaderText,
428
- hideNext: hideNext,
429
- hidePrev: hidePrev,
430
- hideClone: hideClone,
431
- hideSettings: hideSettings,
432
- hideFullScreen: hideFullScreen,
433
- hideSave: hideSave,
434
- groups: groups,
435
- onGroupSelect: onGroupSelect,
436
- hideHistory: hideHistory,
437
- hideNotEditingLabel: hideNotEditingLabel,
438
- showEditor: showEditor,
439
- showPageSelector: showPageSelector,
440
- saveActive: recalcActive,
441
- recalcActive: saveActive,
442
- onMetadataChange: handleMetadataChange,
443
- onAddGroup: handleAddGroup,
444
- onRecalcClick: handleRecalcClicked
445
- }));
417
+ return (
418
+ /*#__PURE__*/
419
+ React.createElement(SettingsProvider, {
420
+ clsColors: clsColors,
421
+ groupColors: groupColors
422
+ },
423
+ /*#__PURE__*/
424
+ React.createElement(MainLayout, {
425
+ RegionEditLabel: RegionEditLabel,
426
+ alwaysShowNextButton: Boolean(onNextImage),
427
+ alwaysShowPrevButton: Boolean(onPrevImage),
428
+ state: state,
429
+ dispatch: dispatch,
430
+ onRegionClassAdded: onRegionClassAdded,
431
+ hideHeader: hideHeader,
432
+ hideHeaderText: hideHeaderText,
433
+ hideNext: hideNext,
434
+ hidePrev: hidePrev,
435
+ hideClone: hideClone,
436
+ hideSettings: hideSettings,
437
+ hideFullScreen: hideFullScreen,
438
+ hideSave: hideSave,
439
+ groups: groups,
440
+ onGroupSelect: onGroupSelect,
441
+ hideHistory: hideHistory,
442
+ hideNotEditingLabel: hideNotEditingLabel,
443
+ showEditor: showEditor,
444
+ showPageSelector: showPageSelector,
445
+ saveActive: recalcActive,
446
+ recalcActive: saveActive,
447
+ onMetadataChange: handleMetadataChange,
448
+ onAddGroup: handleAddGroup,
449
+ onRecalcClick: handleRecalcClicked,
450
+ updatedBy: updatedBy
451
+ }))
452
+ );
446
453
  };
447
454
  export default Annotator;