lost-sia 1.0.2 → 1.1.1
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/CHANGELOG.md +12 -0
- package/dist/index.es.js +142 -25
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +143 -24
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.1.1] - 2022-05-11
|
|
8
|
+
### Changed
|
|
9
|
+
- Update sematic-ui-react to version 2.0.3
|
|
10
|
+
|
|
11
|
+
## [1.1.0] - 2022-05-10
|
|
12
|
+
### Added
|
|
13
|
+
- More fine grained visibility level for toolbar elements
|
|
14
|
+
|
|
15
|
+
## [1.0.3] - 2022-05-10
|
|
16
|
+
### Fixed
|
|
17
|
+
- Export of toolbarEvents and tools
|
|
18
|
+
|
|
7
19
|
## [1.0.2] - 2022-05-09
|
|
8
20
|
### Fixed
|
|
9
21
|
- Improved internal uiConfig handling
|
package/dist/index.es.js
CHANGED
|
@@ -3800,6 +3800,13 @@ var BBOX = 'bBox';
|
|
|
3800
3800
|
var LINE = 'line';
|
|
3801
3801
|
var POLYGON = 'polygon';
|
|
3802
3802
|
|
|
3803
|
+
var tools = /*#__PURE__*/Object.freeze({
|
|
3804
|
+
POINT: POINT,
|
|
3805
|
+
BBOX: BBOX,
|
|
3806
|
+
LINE: LINE,
|
|
3807
|
+
POLYGON: POLYGON
|
|
3808
|
+
});
|
|
3809
|
+
|
|
3803
3810
|
var _createClass$f = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
3804
3811
|
|
|
3805
3812
|
function _classCallCheck$f(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -8690,6 +8697,24 @@ var EDIT_NODE_RADIUS = 'editNodeRadius';
|
|
|
8690
8697
|
var APPLY_FILTER = 'applyFilter';
|
|
8691
8698
|
var SAVE = 'save';
|
|
8692
8699
|
|
|
8700
|
+
var toolbarEvents = /*#__PURE__*/Object.freeze({
|
|
8701
|
+
TOOL_SELECTED: TOOL_SELECTED,
|
|
8702
|
+
GET_NEXT_IMAGE: GET_NEXT_IMAGE,
|
|
8703
|
+
GET_PREV_IMAGE: GET_PREV_IMAGE,
|
|
8704
|
+
TASK_FINISHED: TASK_FINISHED,
|
|
8705
|
+
SHOW_IMAGE_LABEL_INPUT: SHOW_IMAGE_LABEL_INPUT,
|
|
8706
|
+
IMG_IS_JUNK: IMG_IS_JUNK,
|
|
8707
|
+
DELETE_ALL_ANNOS: DELETE_ALL_ANNOS,
|
|
8708
|
+
SET_FULLSCREEN: SET_FULLSCREEN,
|
|
8709
|
+
SHOW_ANNO_DETAILS: SHOW_ANNO_DETAILS,
|
|
8710
|
+
SHOW_LABEL_INFO: SHOW_LABEL_INFO,
|
|
8711
|
+
SHOW_ANNO_STATS: SHOW_ANNO_STATS,
|
|
8712
|
+
EDIT_STROKE_WIDTH: EDIT_STROKE_WIDTH,
|
|
8713
|
+
EDIT_NODE_RADIUS: EDIT_NODE_RADIUS,
|
|
8714
|
+
APPLY_FILTER: APPLY_FILTER,
|
|
8715
|
+
SAVE: SAVE
|
|
8716
|
+
});
|
|
8717
|
+
|
|
8693
8718
|
var _createClass$j = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
8694
8719
|
|
|
8695
8720
|
function _classCallCheck$j(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -8743,12 +8768,11 @@ var SIASettingButton = function (_Component) {
|
|
|
8743
8768
|
this.triggerEvent(EDIT_NODE_RADIUS, parseInt(e.target.value));
|
|
8744
8769
|
}
|
|
8745
8770
|
}, {
|
|
8746
|
-
key: '
|
|
8747
|
-
value: function
|
|
8771
|
+
key: 'renderInfoBoxContent',
|
|
8772
|
+
value: function renderInfoBoxContent() {
|
|
8748
8773
|
var _this2 = this;
|
|
8749
8774
|
|
|
8750
|
-
|
|
8751
|
-
var popupContent = React.createElement(
|
|
8775
|
+
return React.createElement(
|
|
8752
8776
|
'div',
|
|
8753
8777
|
null,
|
|
8754
8778
|
React.createElement(
|
|
@@ -8776,7 +8800,41 @@ var SIASettingButton = function (_Component) {
|
|
|
8776
8800
|
onClick: function onClick() {
|
|
8777
8801
|
return _this2.toggleAnnoStats();
|
|
8778
8802
|
}
|
|
8779
|
-
})
|
|
8803
|
+
})
|
|
8804
|
+
);
|
|
8805
|
+
}
|
|
8806
|
+
}, {
|
|
8807
|
+
key: 'renderInfoBoxes',
|
|
8808
|
+
value: function renderInfoBoxes() {
|
|
8809
|
+
if (!this.props.enabled) return null;
|
|
8810
|
+
if (this.props.enabled == true) {
|
|
8811
|
+
return this.renderInfoBoxContent();
|
|
8812
|
+
} else {
|
|
8813
|
+
if (this.props.enabled.infoBoxes) {
|
|
8814
|
+
return this.renderInfoBoxContent();
|
|
8815
|
+
}
|
|
8816
|
+
}
|
|
8817
|
+
}
|
|
8818
|
+
}, {
|
|
8819
|
+
key: 'renderAnnoStyle',
|
|
8820
|
+
value: function renderAnnoStyle() {
|
|
8821
|
+
if (!this.props.enabled) return null;
|
|
8822
|
+
if (this.props.enabled == true) {
|
|
8823
|
+
return this.renderAnnoStyleContent();
|
|
8824
|
+
} else {
|
|
8825
|
+
if (this.props.enabled.annoStyle) {
|
|
8826
|
+
return this.renderAnnoStyleContent();
|
|
8827
|
+
}
|
|
8828
|
+
}
|
|
8829
|
+
}
|
|
8830
|
+
}, {
|
|
8831
|
+
key: 'renderAnnoStyleContent',
|
|
8832
|
+
value: function renderAnnoStyleContent() {
|
|
8833
|
+
var _this3 = this;
|
|
8834
|
+
|
|
8835
|
+
return React.createElement(
|
|
8836
|
+
'div',
|
|
8837
|
+
null,
|
|
8780
8838
|
React.createElement(
|
|
8781
8839
|
Divider,
|
|
8782
8840
|
{ horizontal: true },
|
|
@@ -8794,7 +8852,7 @@ var SIASettingButton = function (_Component) {
|
|
|
8794
8852
|
max: 10,
|
|
8795
8853
|
value: this.props.uiConfig.strokeWidth,
|
|
8796
8854
|
onChange: function onChange(e) {
|
|
8797
|
-
return
|
|
8855
|
+
return _this3.handleStrokeWidthChange(e);
|
|
8798
8856
|
}
|
|
8799
8857
|
}),
|
|
8800
8858
|
React.createElement(
|
|
@@ -8809,10 +8867,22 @@ var SIASettingButton = function (_Component) {
|
|
|
8809
8867
|
max: 10,
|
|
8810
8868
|
value: this.props.uiConfig.nodeRadius,
|
|
8811
8869
|
onChange: function onChange(e) {
|
|
8812
|
-
return
|
|
8870
|
+
return _this3.handleNodeRadiusChange(e);
|
|
8813
8871
|
}
|
|
8814
8872
|
})
|
|
8815
8873
|
);
|
|
8874
|
+
}
|
|
8875
|
+
}, {
|
|
8876
|
+
key: 'render',
|
|
8877
|
+
value: function render() {
|
|
8878
|
+
|
|
8879
|
+
if (!this.props.uiConfig) return null;
|
|
8880
|
+
var popupContent = React.createElement(
|
|
8881
|
+
'div',
|
|
8882
|
+
null,
|
|
8883
|
+
this.renderInfoBoxes(),
|
|
8884
|
+
this.renderAnnoStyle()
|
|
8885
|
+
);
|
|
8816
8886
|
return React.createElement(Popup, { trigger: React.createElement(
|
|
8817
8887
|
Menu.Item,
|
|
8818
8888
|
{ name: 'setting' },
|
|
@@ -8937,13 +9007,12 @@ var SIAFilterButton = function (_Component) {
|
|
|
8937
9007
|
// })
|
|
8938
9008
|
}
|
|
8939
9009
|
}, {
|
|
8940
|
-
key: '
|
|
8941
|
-
value: function
|
|
9010
|
+
key: 'renderRotateContent',
|
|
9011
|
+
value: function renderRotateContent() {
|
|
8942
9012
|
var _this2 = this;
|
|
8943
9013
|
|
|
8944
9014
|
var filter = this.props.filter;
|
|
8945
|
-
|
|
8946
|
-
var popupContent = React.createElement(
|
|
9015
|
+
return React.createElement(
|
|
8947
9016
|
'div',
|
|
8948
9017
|
null,
|
|
8949
9018
|
React.createElement(
|
|
@@ -8971,7 +9040,30 @@ var SIAFilterButton = function (_Component) {
|
|
|
8971
9040
|
onClick: function onClick() {
|
|
8972
9041
|
return _this2.rotateImg(180);
|
|
8973
9042
|
}
|
|
8974
|
-
})
|
|
9043
|
+
})
|
|
9044
|
+
);
|
|
9045
|
+
}
|
|
9046
|
+
}, {
|
|
9047
|
+
key: 'renderRotate',
|
|
9048
|
+
value: function renderRotate() {
|
|
9049
|
+
if (!this.props.enabled) return null;
|
|
9050
|
+
if (this.props.enabled === true) {
|
|
9051
|
+
return this.renderRotateContent();
|
|
9052
|
+
} else {
|
|
9053
|
+
if (this.props.enabled.rotate) {
|
|
9054
|
+
return this.renderRotateContent();
|
|
9055
|
+
}
|
|
9056
|
+
}
|
|
9057
|
+
}
|
|
9058
|
+
}, {
|
|
9059
|
+
key: 'renderClaheContent',
|
|
9060
|
+
value: function renderClaheContent() {
|
|
9061
|
+
var _this3 = this;
|
|
9062
|
+
|
|
9063
|
+
var filter = this.props.filter;
|
|
9064
|
+
return React.createElement(
|
|
9065
|
+
'div',
|
|
9066
|
+
null,
|
|
8975
9067
|
React.createElement(
|
|
8976
9068
|
Divider,
|
|
8977
9069
|
{ horizontal: true },
|
|
@@ -8981,7 +9073,7 @@ var SIAFilterButton = function (_Component) {
|
|
|
8981
9073
|
checked: filter.clahe.active,
|
|
8982
9074
|
label: 'Histogram equalization', toggle: true,
|
|
8983
9075
|
onClick: function onClick() {
|
|
8984
|
-
return
|
|
9076
|
+
return _this3.claheFilter(_this3.state.clipLimit);
|
|
8985
9077
|
}
|
|
8986
9078
|
}),
|
|
8987
9079
|
React.createElement(
|
|
@@ -8996,13 +9088,36 @@ var SIAFilterButton = function (_Component) {
|
|
|
8996
9088
|
max: 40,
|
|
8997
9089
|
value: this.state.clipLimit,
|
|
8998
9090
|
onChange: function onChange(e) {
|
|
8999
|
-
return
|
|
9091
|
+
return _this3.handleClipLimitChange(e);
|
|
9000
9092
|
},
|
|
9001
9093
|
onMouseUp: function onMouseUp(e) {
|
|
9002
|
-
return
|
|
9094
|
+
return _this3.releaseCLAHESlider(e);
|
|
9003
9095
|
}
|
|
9004
9096
|
})
|
|
9005
9097
|
);
|
|
9098
|
+
}
|
|
9099
|
+
}, {
|
|
9100
|
+
key: 'renderClahe',
|
|
9101
|
+
value: function renderClahe() {
|
|
9102
|
+
if (!this.props.enabled) return null;
|
|
9103
|
+
if (this.props.enabled === true) {
|
|
9104
|
+
return this.renderClaheContent();
|
|
9105
|
+
} else {
|
|
9106
|
+
if (this.props.enabled.clahe) {
|
|
9107
|
+
return this.renderClaheContent();
|
|
9108
|
+
}
|
|
9109
|
+
}
|
|
9110
|
+
}
|
|
9111
|
+
}, {
|
|
9112
|
+
key: 'render',
|
|
9113
|
+
value: function render() {
|
|
9114
|
+
if (!this.props.imageMeta) return null;
|
|
9115
|
+
var popupContent = React.createElement(
|
|
9116
|
+
'div',
|
|
9117
|
+
null,
|
|
9118
|
+
this.renderRotate(),
|
|
9119
|
+
this.renderClahe()
|
|
9120
|
+
);
|
|
9006
9121
|
return React.createElement(Popup, { trigger: React.createElement(
|
|
9007
9122
|
Menu.Item,
|
|
9008
9123
|
{ name: 'filter', active: this.state.active },
|
|
@@ -9580,6 +9695,7 @@ var ToolBar = function (_Component) {
|
|
|
9580
9695
|
|
|
9581
9696
|
if (!this.props.enabled.settings) return null;
|
|
9582
9697
|
return React.createElement(SIASettingButton, {
|
|
9698
|
+
enabled: this.props.enabled.settings,
|
|
9583
9699
|
uiConfig: this.props.uiConfig,
|
|
9584
9700
|
onSettingEvent: function onSettingEvent(e, data) {
|
|
9585
9701
|
return _this11.triggerToolBarEvent(e, data);
|
|
@@ -9592,6 +9708,7 @@ var ToolBar = function (_Component) {
|
|
|
9592
9708
|
|
|
9593
9709
|
if (!this.props.enabled.filter) return null;
|
|
9594
9710
|
return React.createElement(SIAFilterButton, {
|
|
9711
|
+
enabled: this.props.enabled.filter,
|
|
9595
9712
|
onFilterEvent: function onFilterEvent(e, data) {
|
|
9596
9713
|
return _this12.triggerToolBarEvent(e, data);
|
|
9597
9714
|
},
|
|
@@ -9752,15 +9869,15 @@ var _slicedToArray$3 = function () { function sliceIterator(arr, i) { var _arr =
|
|
|
9752
9869
|
* @param {bool | object} toolbarEnabled Defines which toolbar buttons are
|
|
9753
9870
|
* displayed or if toolbar is shown at all.
|
|
9754
9871
|
* false | {
|
|
9755
|
-
* imgLabel:
|
|
9756
|
-
* nextPrev:
|
|
9757
|
-
* toolSelection:
|
|
9758
|
-
* fullscreen:
|
|
9759
|
-
* junk:
|
|
9760
|
-
* deleteAll:
|
|
9761
|
-
* settings:
|
|
9762
|
-
* filter:
|
|
9763
|
-
* help:
|
|
9872
|
+
* imgLabel: bool,
|
|
9873
|
+
* nextPrev: bool,
|
|
9874
|
+
* toolSelection: bool,
|
|
9875
|
+
* fullscreen: bool,
|
|
9876
|
+
* junk: bool,
|
|
9877
|
+
* deleteAll: bool,
|
|
9878
|
+
* settings: bool | {infoBoxes: bool, annoStyle: bool},
|
|
9879
|
+
* filter: bool | {rotate: bool, clahe:bool},
|
|
9880
|
+
* help: bool
|
|
9764
9881
|
* }
|
|
9765
9882
|
* @event onNotification - Callback for Notification messages
|
|
9766
9883
|
* args: {title: str, message: str, type: str}
|
|
@@ -10056,5 +10173,5 @@ var Sia = function Sia(props) {
|
|
|
10056
10173
|
);
|
|
10057
10174
|
};
|
|
10058
10175
|
|
|
10059
|
-
export { transform, annoConversion, canvasActions, Canvas, Sia, ToolBar as Toolbar };
|
|
10176
|
+
export { transform, annoConversion, canvasActions, toolbarEvents, tools, Canvas, Sia, ToolBar as Toolbar };
|
|
10060
10177
|
//# sourceMappingURL=index.es.js.map
|