hellfire 0.17.1 → 0.17.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/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.17.5](http://10.16.100.57/diffusion/115/paladin/compare/v0.17.4...v0.17.5) (2021-12-27)
6
+
7
+
8
+
9
+ ## [0.17.4](http://10.16.100.57/diffusion/115/paladin/compare/v0.17.3...v0.17.4) (2021-12-22)
10
+
11
+
12
+
13
+ ## [0.17.3](http://10.16.100.57/diffusion/115/paladin/compare/v0.17.2...v0.17.3) (2021-12-15)
14
+
15
+
16
+
17
+ ## [0.17.2](http://10.16.100.57/diffusion/115/paladin/compare/v0.17.1...v0.17.2) (2021-12-14)
18
+
19
+
20
+
5
21
  ## [0.17.1](http://10.16.100.57/diffusion/115/paladin/compare/v0.17.0...v0.17.1) (2021-11-30)
6
22
 
7
23
 
package/dist/index.js CHANGED
@@ -44473,7 +44473,8 @@ var DicomTool = /*#__PURE__*/function (_Component) {
44473
44473
  VR = _this$props.VR,
44474
44474
  VRCenterPointShow = _this$props.VRCenterPointShow,
44475
44475
  VRModeText = _this$props.VRModeText,
44476
- isMobile = _this$props.isMobile;
44476
+ isMobile = _this$props.isMobile,
44477
+ windowLayoutType = _this$props.windowLayoutType;
44477
44478
 
44478
44479
  if (VR) {
44479
44480
  if (this.toolsMap) {
@@ -44502,9 +44503,12 @@ var DicomTool = /*#__PURE__*/function (_Component) {
44502
44503
 
44503
44504
  var FlattenMode = DicomToolFlattenMode;
44504
44505
 
44505
- if (width < height) {
44506
+ if (windowLayoutType) {
44507
+ // 竖屏
44508
+ if (windowLayoutType === 'vertical') FlattenMode = DicomToolFlattenMode$1;
44509
+ } else {
44506
44510
  // 竖屏
44507
- FlattenMode = DicomToolFlattenMode$1;
44511
+ if (width < height) FlattenMode = DicomToolFlattenMode$1;
44508
44512
  }
44509
44513
 
44510
44514
  return /*#__PURE__*/React__default.createElement("div", {
@@ -47693,6 +47697,7 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
47693
47697
  return;
47694
47698
  }
47695
47699
 
47700
+ _this.props.onResizeEmit && _this.props.onResizeEmit();
47696
47701
  cornerstone.resize(_this.element, true);
47697
47702
  });
47698
47703
 
@@ -49304,7 +49309,8 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
49304
49309
  onViewportMouseDown: _this2.onViewportMouseDown,
49305
49310
  onCustomScroll: _this2.onCustomScroll,
49306
49311
  onDrop: _this2.props.onDrop,
49307
- showAIResult: _this2.props.showAIResult
49312
+ showAIResult: _this2.props.showAIResult,
49313
+ onResizeEmit: _this2.props.onResizeEmit
49308
49314
  });
49309
49315
  }));
49310
49316
  })), showVerticalScroll && /*#__PURE__*/React__default.createElement("div", {
@@ -49474,10 +49480,13 @@ var mergeProps$e = function mergeProps(propsFromState, propsFromDispatch, ownPro
49474
49480
  currentScrollLine = propsFromState.currentScrollLine,
49475
49481
  lastActiveIndex = propsFromState.lastActiveIndex; // 此处open/close onepickmode里包含scrollLine的设置是为了避免重复的render
49476
49482
 
49483
+ var resizeIndex = 0;
49484
+
49477
49485
  if (onePickMode) {
49478
49486
  // 当前是op 即将进入custom 回到lastScrollLine
49479
49487
  propsFromDispatch.closeOnePickLayout(lastScrollLine);
49480
49488
  propsFromDispatch.setActiveIndex(lastActiveIndex);
49489
+ resizeIndex = lastActiveIndex;
49481
49490
  } else {
49482
49491
  // 当前是custom 即将进入op
49483
49492
  // 自定义布局为1*1时不触发
@@ -49494,6 +49503,15 @@ var mergeProps$e = function mergeProps(propsFromState, propsFromDispatch, ownPro
49494
49503
  linkSynchronizer.destroy();
49495
49504
  linkScrollSynchronizer.destroy();
49496
49505
  }
49506
+
49507
+ setTimeout(function () {
49508
+ try {
49509
+ var element = getElement(resizeIndex);
49510
+ cornerstone.resize(element, true);
49511
+ } catch (e) {
49512
+ console.log('ignore element not enabled event');
49513
+ }
49514
+ });
49497
49515
  },
49498
49516
  // 首次加载把激活状态的element添加到sync中
49499
49517
  onImageFirstRender: function onImageFirstRender(index) {
@@ -51576,6 +51594,43 @@ var _default$18 = ConnectedVR;
51576
51594
  enterModule && enterModule(module);
51577
51595
  })();
51578
51596
 
51597
+ var __signature__$3c = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
51598
+ return a;
51599
+ };
51600
+
51601
+ function colorMapFix(viewportData) {
51602
+ viewportData.imageViewports = lodash$1.map(viewportData.imageViewports, function (seriesViewportArr) {
51603
+ return lodash$1.map(seriesViewportArr, function (item) {
51604
+ if (item.colorMapId) {
51605
+ item.colormap = cornerstone.colors.getColormap(item.colorMapId);
51606
+ }
51607
+
51608
+ return item;
51609
+ });
51610
+ });
51611
+ return viewportData;
51612
+ }
51613
+
51614
+ (function () {
51615
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
51616
+
51617
+ if (!reactHotLoader) {
51618
+ return;
51619
+ }
51620
+
51621
+ reactHotLoader.register(colorMapFix, "colorMapFix", "/Users/huyeqing/workspace/chainz/paladin/src/utils/colorMapMethod.js");
51622
+ })();
51623
+
51624
+ (function () {
51625
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
51626
+ leaveModule && leaveModule(module);
51627
+ })();
51628
+
51629
+ (function () {
51630
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
51631
+ enterModule && enterModule(module);
51632
+ })();
51633
+
51579
51634
  function _createForOfIteratorHelper$d(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$f(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
51580
51635
 
51581
51636
  function _unsupportedIterableToArray$f(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$f(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$f(o, minLen); }
@@ -51586,7 +51641,7 @@ function _createSuper$1i(Derived) { var hasNativeReflectConstruct = _isNativeRef
51586
51641
 
51587
51642
  function _isNativeReflectConstruct$1i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
51588
51643
 
51589
- var __signature__$3c = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
51644
+ var __signature__$3d = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
51590
51645
  return a;
51591
51646
  };
51592
51647
 
@@ -51739,6 +51794,10 @@ var DicomView = /*#__PURE__*/function (_Component) {
51739
51794
  this.props.unmount();
51740
51795
  window.removeEventListener('mousedown', checkAndUnLockToolState);
51741
51796
  window.removeEventListener('resize', this.debouncedResize);
51797
+
51798
+ if (this.props.paladinActionEmit) {
51799
+ _default$e.removeListener('paladin_action', this.props.paladinActionEmit);
51800
+ }
51742
51801
  }
51743
51802
  }, {
51744
51803
  key: "emitImageResize",
@@ -51834,7 +51893,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
51834
51893
  if (value.cornerstoneState) {
51835
51894
  // 从server获取当前viewport数据 更新element 然后重新渲染
51836
51895
  // 序列模式 图像模式
51837
- var cornerstoneState = value.cornerstoneState;
51896
+ var cornerstoneState = colorMapFix(value.cornerstoneState);
51838
51897
  set$1('all', cornerstoneState);
51839
51898
  var imageViewports = cornerstoneState.imageViewports;
51840
51899
 
@@ -51965,7 +52024,9 @@ var DicomView = /*#__PURE__*/function (_Component) {
51965
52024
  break;
51966
52025
 
51967
52026
  case "cornerstone_state_change":
51968
- set$1('all', data);
52027
+ var _data = colorMapFix(data);
52028
+
52029
+ set$1('all', _data);
51969
52030
  break;
51970
52031
 
51971
52032
  case "cornerstone_measurement_reset":
@@ -52057,12 +52118,16 @@ var DicomView = /*#__PURE__*/function (_Component) {
52057
52118
  operateCentesisPath: this.props.operateCentesisPath,
52058
52119
  helpLink: this.props.helpLink,
52059
52120
  changeWindowSet: this.props.changeWindowSet,
52060
- study: this.state.study
52121
+ study: this.state.study,
52122
+ windowLayoutType: this.props.windowLayoutType
52061
52123
  }));
52062
52124
  var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && (this.props.mode === 'seriesMode' ? /*#__PURE__*/React__default.createElement(_default$14, {
52063
52125
  series: this.props.series,
52064
- showAIResult: this.props.showAIResult
52065
- }) : /*#__PURE__*/React__default.createElement(_default$15, null)), viewMode === 'MPR' && /*#__PURE__*/React__default.createElement(_default$17, null), viewMode === 'VR' && /*#__PURE__*/React__default.createElement(_default$18, null), viewMode === 'Surgery' && /*#__PURE__*/React__default.createElement(_default$16, null));
52126
+ showAIResult: this.props.showAIResult,
52127
+ onResizeEmit: this.props.onResizeEmit
52128
+ }) : /*#__PURE__*/React__default.createElement(_default$15, {
52129
+ onResizeEmit: this.props.onResizeEmit
52130
+ })), viewMode === 'MPR' && /*#__PURE__*/React__default.createElement(_default$17, null), viewMode === 'VR' && /*#__PURE__*/React__default.createElement(_default$18, null), viewMode === 'Surgery' && /*#__PURE__*/React__default.createElement(_default$16, null));
52066
52131
  var DicomThumbnail = /*#__PURE__*/React__default.createElement("div", {
52067
52132
  className: "paladin-dicomView-dicomThumbnailWrapper"
52068
52133
  }, /*#__PURE__*/React__default.createElement(_default$10, {
@@ -52080,21 +52145,26 @@ var DicomView = /*#__PURE__*/function (_Component) {
52080
52145
  }, DicomTool, /*#__PURE__*/React__default.createElement("div", {
52081
52146
  className: "paladin-dicomView-pcmobileWrapper"
52082
52147
  }, DicomLayout, this.props.showDicomThumbnail && DicomThumbnail));
52148
+ var verticalLayout = /*#__PURE__*/React__default.createElement("div", {
52149
+ style: dcStyle
52150
+ }, /*#__PURE__*/React__default.createElement("div", {
52151
+ style: {
52152
+ display: 'flex',
52153
+ flexDirection: 'column',
52154
+ flex: 1,
52155
+ width: 0
52156
+ }
52157
+ }, DicomLayout, this.props.showDicomThumbnail && DicomThumbnail, DicomTool));
52083
52158
  var width = window.innerWidth;
52084
52159
  var height = window.innerHeight;
52085
52160
 
52086
- if (width < height && toolMode === 'flatten') {
52087
- // 竖屏 + 展开
52088
- pc = /*#__PURE__*/React__default.createElement("div", {
52089
- style: dcStyle
52090
- }, /*#__PURE__*/React__default.createElement("div", {
52091
- style: {
52092
- display: 'flex',
52093
- flexDirection: 'column',
52094
- flex: 1,
52095
- width: 0
52096
- }
52097
- }, DicomLayout, this.props.showDicomThumbnail && DicomThumbnail, DicomTool));
52161
+ if (this.props.windowLayoutType) {
52162
+ if (this.props.windowLayoutType === 'vertical') pc = verticalLayout;
52163
+ } else {
52164
+ if (width < height && toolMode === 'flatten') {
52165
+ // 竖屏 + 展开
52166
+ pc = verticalLayout;
52167
+ }
52098
52168
  }
52099
52169
 
52100
52170
  return (
@@ -52153,7 +52223,7 @@ function ownKeys$E(object, enumerableOnly) { var keys = Object.keys(object); if
52153
52223
 
52154
52224
  function _objectSpread$F(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$E(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$E(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
52155
52225
 
52156
- var __signature__$3d = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52226
+ var __signature__$3e = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52157
52227
  return a;
52158
52228
  };
52159
52229
  var scroll = _default$E.importInternal('util/scroll');
@@ -52713,7 +52783,7 @@ var _default$19 = ConnectedDicomView;
52713
52783
  enterModule && enterModule(module);
52714
52784
  })();
52715
52785
 
52716
- var __signature__$3e = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52786
+ var __signature__$3f = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52717
52787
  return a;
52718
52788
  };
52719
52789
  var _default$1a = _default$19;