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/components/Video/index.d.ts +14 -5
- package/dist/index.css +171 -48
- package/dist/index.esm.css +171 -48
- package/dist/index.esm.js +180 -77
- package/dist/index.js +179 -76
- package/dist/utils/useModelPlugin/Provider.d.ts +4 -0
- package/dist/utils/useModelPlugin/composeRootApp.d.ts +2 -0
- package/dist/utils/useModelPlugin/helpers/dispatcher.d.ts +5 -0
- package/dist/utils/useModelPlugin/helpers/executor.d.ts +7 -0
- package/dist/utils/useModelPlugin/helpers/storeContext.d.ts +3 -0
- package/dist/utils/useModelPlugin/index.d.ts +5 -0
- package/dist/utils/useModelPlugin/useModel.d.ts +1 -0
- package/package.json +1 -1
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:
|
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", "
|
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$
|
8567
|
-
|
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(
|
8628
|
+
var _useState = React.useState(true),
|
8582
8629
|
_useState2 = _slicedToArray(_useState, 2),
|
8583
|
-
|
8584
|
-
|
8585
|
-
|
8586
|
-
var
|
8587
|
-
|
8588
|
-
|
8589
|
-
|
8590
|
-
|
8591
|
-
|
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 (
|
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
|
-
|
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
|
-
}, [
|
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
|
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 (!
|
8735
|
+
if (!visible) {
|
8654
8736
|
handleReset();
|
8655
8737
|
}
|
8656
|
-
}, [handleReset,
|
8738
|
+
}, [handleReset, visible]);
|
8657
8739
|
/** 当 currentIndex 改变以后自动播放下一个 */
|
8658
8740
|
|
8659
8741
|
React.useEffect(function () {
|
8660
|
-
if (!player.current || !
|
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,
|
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
|
-
|
8751
|
+
var _player$current4;
|
8752
|
+
|
8753
|
+
if (!visible || lodashEs.isEmpty(videoUrls) || player.current) {
|
8670
8754
|
return;
|
8671
8755
|
}
|
8672
8756
|
|
8673
|
-
|
8674
|
-
|
8675
|
-
|
8676
|
-
|
8677
|
-
|
8678
|
-
|
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
|
-
|
8683
|
-
|
8684
|
-
} else {
|
8685
|
-
var _player$current2;
|
8764
|
+
setReady(false);
|
8765
|
+
setFirstRender(false); // @ts-ignore
|
8686
8766
|
|
8687
|
-
|
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',
|
8708
|
-
|
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 &&
|
8794
|
+
if (enableMemory && visible) {
|
8720
8795
|
var _JSON$parse;
|
8721
8796
|
|
8722
|
-
var
|
8723
|
-
lastPlayTime =
|
8724
|
-
_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(
|
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
|
-
}, [
|
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 &&
|
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
|
8757
|
-
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
|
-
|
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
|
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, '
|
10282
|
+
document.documentElement.setAttribute(COLOR_ATTR_NAME, 'nt');
|
10180
10283
|
}
|
10181
10284
|
|
10182
10285
|
exports.AutoScroll = Index$b;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function useModel(namespace: string | number, updater: any): void;
|