wargerm 0.7.0 → 0.7.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/dist/index.js CHANGED
@@ -2637,9 +2637,21 @@ dayjs__default['default'].locale('zh-cn');
2637
2637
  var WDatePicker = function WDatePicker(props) {
2638
2638
  var extraProps = _extends({}, props);
2639
2639
 
2640
- return /*#__PURE__*/React__default['default'].createElement(antd.DatePicker, _objectSpread2({
2640
+ return /*#__PURE__*/React__default['default'].createElement(antd.DatePicker, _objectSpread2(_objectSpread2({
2641
2641
  locale: zhCN__default['default']
2642
- }, extraProps));
2642
+ }, extraProps), {}, {
2643
+ clearIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2644
+ className: "clearIconBox"
2645
+ }, /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, {
2646
+ className: "clearIcon"
2647
+ })),
2648
+ suffixIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2649
+ className: "dateIcon"
2650
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
2651
+ className: "datePickerIcon",
2652
+ src: require('../../assets/icon/datePickerIcon.png')
2653
+ }))
2654
+ }));
2643
2655
  };
2644
2656
 
2645
2657
  WDatePicker.defaultProps = {};
@@ -2666,6 +2678,17 @@ var RangePicker = function RangePicker(props) {
2666
2678
  if (panelType === 'within') {
2667
2679
  return /*#__PURE__*/React__default['default'].createElement(RangePicker, _objectSpread2({
2668
2680
  locale: zhCN__default['default'],
2681
+ clearIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2682
+ className: "clearIconBox"
2683
+ }, /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, {
2684
+ className: "clearIcon"
2685
+ })),
2686
+ suffixIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2687
+ className: "dateIcon"
2688
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
2689
+ className: "datePickerIcon",
2690
+ src: require('../../assets/icon/datePickerIcon.png')
2691
+ })),
2669
2692
  value: rangePickerValue,
2670
2693
  onChange: function onChange(date) {
2671
2694
  setRadioValue('');
@@ -2698,7 +2721,7 @@ var RangePicker = function RangePicker(props) {
2698
2721
  }
2699
2722
  }, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
2700
2723
  direction: "vertical",
2701
- size: 'middle'
2724
+ size: 28
2702
2725
  }, /*#__PURE__*/React__default['default'].createElement(antd.Radio.Button, {
2703
2726
  value: '1',
2704
2727
  onClick: function onClick() {
@@ -2755,6 +2778,17 @@ var RangePicker = function RangePicker(props) {
2755
2778
  }
2756
2779
  }, /*#__PURE__*/React__default['default'].createElement("span", null, "\u65E5")))), /*#__PURE__*/React__default['default'].createElement(RangePicker, _objectSpread2({
2757
2780
  locale: zhCN__default['default'],
2781
+ clearIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2782
+ className: "clearIconBox"
2783
+ }, /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, {
2784
+ className: "clearIcon"
2785
+ })),
2786
+ suffixIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2787
+ className: "dateIcon"
2788
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
2789
+ className: "datePickerIcon",
2790
+ src: require('../../assets/icon/datePickerIcon.png')
2791
+ })),
2758
2792
  value: rangePickerValue,
2759
2793
  onChange: function onChange(date) {
2760
2794
  setRadioValue('');
@@ -2764,6 +2798,17 @@ var RangePicker = function RangePicker(props) {
2764
2798
  }
2765
2799
 
2766
2800
  return /*#__PURE__*/React__default['default'].createElement(antd.DatePicker.RangePicker, _objectSpread2({
2801
+ clearIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2802
+ className: "clearIconBox"
2803
+ }, /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, {
2804
+ className: "clearIcon"
2805
+ })),
2806
+ suffixIcon: /*#__PURE__*/React__default['default'].createElement("div", {
2807
+ className: "dateIcon"
2808
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
2809
+ className: "datePickerIcon",
2810
+ src: require('../../assets/icon/datePickerIcon.png')
2811
+ })),
2767
2812
  locale: zhCN__default['default']
2768
2813
  }, extraProps));
2769
2814
  };
@@ -3208,7 +3253,7 @@ var NumericInput = /*#__PURE__*/function (_React$Component) {
3208
3253
  valueTemp = value.slice(0, -1);
3209
3254
  }
3210
3255
 
3211
- onChange && onChange(valueTemp.replace(/0*(\d+)/, '$1'));
3256
+ valueTemp && onChange && onChange(valueTemp.replace(/0*(\d+)/, '$1'));
3212
3257
 
3213
3258
  if (onBlur) {
3214
3259
  onBlur && onBlur();
@@ -8394,6 +8439,9 @@ function VideoPlayer(_ref, ref) {
8394
8439
  React.useEffect(function () {
8395
8440
  setUrls(url);
8396
8441
  }, [url]);
8442
+ React.useEffect(function () {
8443
+ setCurrentLayoutIndex(layoutIndex);
8444
+ }, [layoutIndex]);
8397
8445
  var initPlayerIndex = allLayouts[layoutIndex || 0].span >= url.length ? url.length - 1 >= 0 ? url.length - 1 : 0 : allLayouts[layoutIndex || 0].span - 1;
8398
8446
 
8399
8447
  var _useState5 = React.useState(initPlayerIndex),
@@ -8542,14 +8590,14 @@ function VideoPlayer(_ref, ref) {
8542
8590
 
8543
8591
  var index$6 = /*#__PURE__*/React.forwardRef(VideoPlayer);
8544
8592
 
8545
- var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
8593
+ var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "visible", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
8546
8594
 
8547
8595
  var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字展示时长(s)
8548
8596
 
8549
8597
  var DEFAULT_LAST_PLAY_TIME_DELAY = 5; // 默认音量大小
8550
8598
 
8551
8599
  var DEFAULT_VOLUME = 0.6;
8552
- var index$7 = (function (_ref) {
8600
+ var index$7 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
8553
8601
  var id = _ref.id,
8554
8602
  _ref$videoUrls = _ref.videoUrls,
8555
8603
  videoUrls = _ref$videoUrls === void 0 ? [] : _ref$videoUrls,
@@ -8563,8 +8611,8 @@ var index$7 = (function (_ref) {
8563
8611
  setParentIndex = _ref.setCurrentIndex,
8564
8612
  className = _ref.className,
8565
8613
  style = _ref.style,
8566
- _ref$open = _ref.open,
8567
- open = _ref$open === void 0 ? true : _ref$open,
8614
+ _ref$visible = _ref.visible,
8615
+ visible = _ref$visible === void 0 ? true : _ref$visible,
8568
8616
  _ref$autoplay = _ref.autoplay,
8569
8617
  autoplay = _ref$autoplay === void 0 ? false : _ref$autoplay,
8570
8618
  _ref$videoInit = _ref.videoInit,
@@ -8576,19 +8624,26 @@ var index$7 = (function (_ref) {
8576
8624
  props = _objectWithoutProperties(_ref, _excluded$m);
8577
8625
 
8578
8626
  var player = React.useRef();
8579
- var currentPlayerIndex = React.useRef(0); // 内置的 index 状态管理
8580
8627
 
8581
- var _useState = React.useState(0),
8628
+ var _useState = React.useState(true),
8582
8629
  _useState2 = _slicedToArray(_useState, 2),
8583
- videoIndex = _useState2[0],
8584
- setVideoIndex = _useState2[1];
8585
-
8586
- var currentIndex = React.useMemo(function () {
8587
- return parentIndex !== null && parentIndex !== void 0 ? parentIndex : videoIndex;
8588
- }, [parentIndex, videoIndex]);
8589
- var setCurrentIndex = React.useMemo(function () {
8590
- return setParentIndex !== null && setParentIndex !== void 0 ? setParentIndex : setVideoIndex;
8591
- }, [setParentIndex, setVideoIndex]);
8630
+ firstRender = _useState2[0],
8631
+ setFirstRender = _useState2[1];
8632
+
8633
+ var _useState3 = React.useState(false),
8634
+ _useState4 = _slicedToArray(_useState3, 2),
8635
+ ready = _useState4[0],
8636
+ setReady = _useState4[1];
8637
+
8638
+ var currentPlayerIndex = React.useRef(0); // 内置的 index 状态管理
8639
+
8640
+ var _useState5 = React.useState(0),
8641
+ _useState6 = _slicedToArray(_useState5, 2),
8642
+ videoIndex = _useState6[0],
8643
+ setVideoIndex = _useState6[1];
8644
+
8645
+ var currentIndex = parentIndex !== null && parentIndex !== void 0 ? parentIndex : videoIndex;
8646
+ var setCurrentIndex = setParentIndex !== null && setParentIndex !== void 0 ? setParentIndex : setVideoIndex;
8592
8647
  var config = React.useRef(_objectSpread2({
8593
8648
  url: videoUrls[0],
8594
8649
  playbackRate: DEFAULT_PLAY_BACK_RATE,
@@ -8602,25 +8657,52 @@ var index$7 = (function (_ref) {
8602
8657
  }, props));
8603
8658
  /** 设置当前播放 index */
8604
8659
 
8605
- var handleSetCurrentIndex = React.useCallback(function (currentIdx) {
8660
+ var handleSetCurrentIndex = React.useCallback(function (_ref2) {
8661
+ var currentIdx = _ref2.currentIdx,
8662
+ videoUrls = _ref2.videoUrls;
8606
8663
  var newIdx = currentIdx !== null && currentIdx !== void 0 ? currentIdx : currentPlayerIndex.current + 1;
8607
8664
 
8608
8665
  if (newIdx >= videoUrls.length) {
8609
- if (isLoop) {
8610
- // 允许循环则播放起始视频
8611
- newIdx = 0;
8612
- } else if (player.current && player.current.video) {
8613
- // 不允许循环则进度条快进到最后
8614
- player.current.currentTime = player.current.video.duration;
8615
- return;
8616
- }
8666
+ newIdx = 0;
8617
8667
  }
8618
8668
 
8619
8669
  setCurrentIndex(newIdx);
8620
- }, [isLoop, setCurrentIndex, videoUrls.length]);
8670
+ }, [setCurrentIndex]);
8671
+ /** 结束事件 */
8672
+
8673
+ var onEnd = React.useCallback(function (isLoop, videoUrls) {
8674
+ return function () {
8675
+ // 如果是循环或有其他视频未播放完,继续播放下一个
8676
+ if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
8677
+ setTimeout(function () {
8678
+ var _player$current;
8679
+
8680
+ return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
8681
+ });
8682
+ }
8683
+
8684
+ handleSetCurrentIndex({
8685
+ videoUrls: videoUrls
8686
+ });
8687
+ };
8688
+ }, [handleSetCurrentIndex]);
8689
+ /** 点击下一个事件 */
8690
+
8691
+ var onPlayNextBtnClick = React.useCallback(function (videoUrls) {
8692
+ return function () {
8693
+ if (player.current) {
8694
+ // 防止 next 按钮消失
8695
+ player.current.currentVideoIndex = videoUrls.length - 2;
8696
+ }
8697
+
8698
+ handleSetCurrentIndex({
8699
+ videoUrls: videoUrls
8700
+ });
8701
+ };
8702
+ }, [handleSetCurrentIndex]);
8621
8703
  /** 播放下一个 */
8622
8704
 
8623
- var handlePlayNext = React.useCallback(function (currentIdx) {
8705
+ var handlePlayNext = React.useCallback(function (currentIdx, isLoop) {
8624
8706
  if (!player.current) {
8625
8707
  return;
8626
8708
  }
@@ -8634,7 +8716,7 @@ var index$7 = (function (_ref) {
8634
8716
  // 防止 next 按钮消失
8635
8717
  player.current.currentVideoIndex = -videoUrls.length;
8636
8718
  }
8637
- }, [videoUrls, isLoop]);
8719
+ }, [videoUrls]);
8638
8720
  /** 重置视频 */
8639
8721
 
8640
8722
  var handleReset = React.useCallback(function () {
@@ -8650,47 +8732,47 @@ var index$7 = (function (_ref) {
8650
8732
  /** 弹窗中的视频关闭以后重置 */
8651
8733
 
8652
8734
  React.useEffect(function () {
8653
- if (!open) {
8735
+ if (!visible) {
8654
8736
  handleReset();
8655
8737
  }
8656
- }, [handleReset, open]);
8738
+ }, [handleReset, visible]);
8657
8739
  /** 当 currentIndex 改变以后自动播放下一个 */
8658
8740
 
8659
8741
  React.useEffect(function () {
8660
- if (!player.current || !open) {
8742
+ if (!player.current || !visible) {
8661
8743
  return;
8662
8744
  }
8663
8745
 
8664
- handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current);
8665
- }, [currentIndex, handlePlayNext, open]);
8746
+ handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current, isLoop);
8747
+ }, [currentIndex, handlePlayNext, isLoop, visible]);
8666
8748
  /** 播放器初始化并绑定事件 */
8667
8749
 
8668
8750
  React.useEffect(function () {
8669
- if (!open || lodashEs.isEmpty(videoUrls) || player.current) {
8751
+ var _player$current4;
8752
+
8753
+ if (!visible || lodashEs.isEmpty(videoUrls) || player.current) {
8670
8754
  return;
8671
8755
  }
8672
8756
 
8673
- player.current = new Player__default['default'](config.current);
8674
- player.current.currentVideoIndex = -videoUrls.length;
8675
- player.current.on('ended', function () {
8676
- // 如果是循环或有其他视频未播放完,继续播放下一个
8677
- if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
8678
- handleSetCurrentIndex();
8679
- setTimeout(function () {
8680
- var _player$current;
8757
+ var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
8758
+ muted: muted,
8759
+ volume: muted ? 0 : DEFAULT_VOLUME,
8760
+ autoplay: autoplay,
8761
+ videoInit: videoInit
8762
+ });
8681
8763
 
8682
- return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
8683
- });
8684
- } else {
8685
- var _player$current2;
8764
+ setReady(false);
8765
+ setFirstRender(false); // @ts-ignore
8686
8766
 
8687
- (_player$current2 = player.current) === null || _player$current2 === void 0 ? void 0 : _player$current2.pause();
8688
- }
8689
- }); // 播放记忆缓存
8767
+ player.current = new Player__default['default'](newConfig);
8768
+ player.current.currentVideoIndex = -videoUrls.length;
8769
+ player.current.on('ended', onEnd(isLoop, videoUrls)); // 播放记忆缓存
8690
8770
 
8691
8771
  if (enableMemory) {
8772
+ var _player$current2;
8773
+
8692
8774
  var videoPlayedTimeObj = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}');
8693
- player.current.on('timeupdate', function () {
8775
+ (_player$current2 = player.current) === null || _player$current2 === void 0 ? void 0 : _player$current2.on('timeupdate', function () {
8694
8776
  var _player$current3;
8695
8777
 
8696
8778
  if (currentPlayerIndex.current === -1) {
@@ -8704,27 +8786,23 @@ var index$7 = (function (_ref) {
8704
8786
  });
8705
8787
  }
8706
8788
 
8707
- player.current.on('playNextBtnClick', function () {
8708
- if (!isLoop && player.current) {
8709
- // 防止 next 按钮消失
8710
- player.current.currentVideoIndex = videoUrls.length - 2;
8711
- }
8712
-
8713
- handleSetCurrentIndex();
8714
- });
8715
- }, [autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, open]);
8789
+ (_player$current4 = player.current) === null || _player$current4 === void 0 ? void 0 : _player$current4.on('playNextBtnClick', onPlayNextBtnClick(videoUrls));
8790
+ }, [ready, autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, visible, muted, videoInit, onEnd, onPlayNextBtnClick]);
8716
8791
  /** 读取缓存的播放记忆并跳转 */
8717
8792
 
8718
8793
  React.useEffect(function () {
8719
- if (enableMemory && open) {
8794
+ if (enableMemory && visible) {
8720
8795
  var _JSON$parse;
8721
8796
 
8722
- var _ref2 = ((_JSON$parse = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[id]) || {},
8723
- lastPlayTime = _ref2.lastPlayTime,
8724
- _videoIndex = _ref2.videoIndex;
8797
+ var _ref3 = ((_JSON$parse = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[id]) || {},
8798
+ lastPlayTime = _ref3.lastPlayTime,
8799
+ _videoIndex = _ref3.videoIndex;
8725
8800
 
8726
8801
  setTimeout(function () {
8727
- handleSetCurrentIndex(_videoIndex);
8802
+ handleSetCurrentIndex({
8803
+ currentIdx: _videoIndex,
8804
+ videoUrls: videoUrls
8805
+ });
8728
8806
  setTimeout(function () {
8729
8807
  if (player.current) {
8730
8808
  player.current.currentTime = lastPlayTime;
@@ -8732,7 +8810,7 @@ var index$7 = (function (_ref) {
8732
8810
  });
8733
8811
  });
8734
8812
  }
8735
- }, [open, enableMemory, handleSetCurrentIndex, id]);
8813
+ }, [visible, enableMemory, handleSetCurrentIndex, id, videoUrls]);
8736
8814
  /** 加载清晰度配置 */
8737
8815
 
8738
8816
  React.useEffect(function () {
@@ -8740,8 +8818,21 @@ var index$7 = (function (_ref) {
8740
8818
  player.current.emit('resourceReady', definitionList[currentIndex]);
8741
8819
  }
8742
8820
  }, [currentIndex, definitionList]);
8821
+ React.useEffect(function () {
8822
+ var _player$current5, _player$current6, _player$current7;
8823
+
8824
+ if (firstRender) {
8825
+ return;
8826
+ }
8827
+
8828
+ (_player$current5 = player.current) === null || _player$current5 === void 0 ? void 0 : _player$current5.off('ended', onEnd(isLoop, videoUrls));
8829
+ (_player$current6 = player.current) === null || _player$current6 === void 0 ? void 0 : _player$current6.off('playNextBtnClick', onPlayNextBtnClick(videoUrls));
8830
+ (_player$current7 = player.current) === null || _player$current7 === void 0 ? void 0 : _player$current7.destroy();
8831
+ player.current = undefined;
8832
+ setReady(true); // eslint-disable-next-line react-hooks/exhaustive-deps
8833
+ }, [muted, isLoop, videoUrls, autoplay, videoInit, onEnd, onPlayNextBtnClick]);
8743
8834
  var getRef = React.useCallback(function (ref) {
8744
- if (ref && open) {
8835
+ if (ref && visible) {
8745
8836
  var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
8746
8837
  el: ref,
8747
8838
  url: videoUrls[0],
@@ -8753,8 +8844,8 @@ var index$7 = (function (_ref) {
8753
8844
  if (enableMemory) {
8754
8845
  var _JSON$parse2;
8755
8846
 
8756
- var _ref3 = ((_JSON$parse2 = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2[id]) || {},
8757
- lastPlayTime = _ref3.lastPlayTime;
8847
+ var _ref4 = ((_JSON$parse2 = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2[id]) || {},
8848
+ lastPlayTime = _ref4.lastPlayTime;
8758
8849
 
8759
8850
  Object.assign(newConfig, {
8760
8851
  lastPlayTime: lastPlayTime,
@@ -8764,7 +8855,15 @@ var index$7 = (function (_ref) {
8764
8855
 
8765
8856
  config.current = newConfig;
8766
8857
  }
8767
- }, [open, id, videoUrls, lastPlayTimeHideDelay, enableMemory]);
8858
+
8859
+ if (playerRef) {
8860
+ if (typeof playerRef === 'function') {
8861
+ playerRef(player.current);
8862
+ } else {
8863
+ playerRef.current = player.current;
8864
+ }
8865
+ }
8866
+ }, [visible, playerRef, videoUrls, enableMemory, id, lastPlayTimeHideDelay]);
8768
8867
  return /*#__PURE__*/React__default['default'].createElement("div", {
8769
8868
  className: className,
8770
8869
  ref: getRef,
@@ -9053,7 +9152,7 @@ function NtTable(_ref) {
9053
9152
  return item.value == record[c.dataIndex];
9054
9153
  })) === null || _columnsFields$c$data === void 0 ? void 0 : _columnsFields$c$data.label : record[c.dataIndex])));
9055
9154
  } else {
9056
- var _columnsFields$c$data2, _columnsFields$c$data3;
9155
+ var _columnsFields$c$data2, _columnsFields$c$data3, _columnsFields$c$data4, _columnsFields$c$data5;
9057
9156
 
9058
9157
  return /*#__PURE__*/React__default['default'].createElement("div", {
9059
9158
  key: c.dataIndex,
@@ -9077,9 +9176,13 @@ function NtTable(_ref) {
9077
9176
  }
9078
9177
  }, c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data2 = columnsFields[c.dataIndex].find(function (item) {
9079
9178
  return item.value == record[c.dataIndex];
9080
- })) === null || _columnsFields$c$data2 === void 0 ? void 0 : _columnsFields$c$data2.label : record[c.dataIndex]) : c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data3 = columnsFields[c.dataIndex].find(function (item) {
9179
+ })) === null || _columnsFields$c$data2 === void 0 ? void 0 : _columnsFields$c$data2.label : record[c.dataIndex]) : c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? ((_columnsFields$c$data3 = columnsFields[c.dataIndex].find(function (item) {
9081
9180
  return item.value == record[c.dataIndex];
9082
- })) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label : record[c.dataIndex]);
9181
+ })) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label) && ((_columnsFields$c$data4 = columnsFields[c.dataIndex].find(function (item) {
9182
+ return item.value == record[c.dataIndex];
9183
+ })) === null || _columnsFields$c$data4 === void 0 ? void 0 : _columnsFields$c$data4.label) !== 0 ? (_columnsFields$c$data5 = columnsFields[c.dataIndex].find(function (item) {
9184
+ return item.value == record[c.dataIndex];
9185
+ })) === null || _columnsFields$c$data5 === void 0 ? void 0 : _columnsFields$c$data5.label : '-' : record[c.dataIndex]);
9083
9186
  }
9084
9187
  }
9085
9188
  });
@@ -10176,7 +10279,7 @@ console.log(REACT_APP_ENV, 'REACT_APP_ENV');
10176
10279
 
10177
10280
  if (REACT_APP_ENV == 'development') {
10178
10281
  var COLOR_ATTR_NAME = 'data-prefers-color';
10179
- document.documentElement.setAttribute(COLOR_ATTR_NAME, 'sd');
10282
+ document.documentElement.setAttribute(COLOR_ATTR_NAME, 'nt');
10180
10283
  }
10181
10284
 
10182
10285
  exports.AutoScroll = Index$b;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const registerModel: (model: any) => void;
3
+ declare const _default: ({ children }: any) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function composeRootApp(container: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined): React.FunctionComponentElement<{}>;
@@ -0,0 +1,5 @@
1
+ export default class Dispatcher {
2
+ callbacks: any;
3
+ data: any;
4
+ update: (namespace: string) => void;
5
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: {
3
+ hook: any;
4
+ onUpdate: any;
5
+ namespace: any;
6
+ }) => JSX.Element;
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.Context<{}>;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { useModel } from './useModel';
2
+ import { composeRootApp } from './composeRootApp';
3
+ import { registerModel } from './Provider';
4
+ export default composeRootApp;
5
+ export { useModel, registerModel };
@@ -0,0 +1 @@
1
+ export declare function useModel(namespace: string | number, updater: any): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.0",
4
+ "version": "0.7.1",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",