wargerm 0.7.0 → 0.7.2
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 +182 -78
- package/dist/index.js +181 -77
- 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 +90 -90
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();
|
@@ -8342,7 +8387,8 @@ function VideoPlayer(_ref, ref) {
|
|
8342
8387
|
style = _ref.style,
|
8343
8388
|
_ref$config = _ref.config,
|
8344
8389
|
config = _ref$config === void 0 ? {} : _ref$config,
|
8345
|
-
layoutIndex = _ref.layoutIndex,
|
8390
|
+
_ref$layoutIndex = _ref.layoutIndex,
|
8391
|
+
layoutIndex = _ref$layoutIndex === void 0 ? 0 : _ref$layoutIndex,
|
8346
8392
|
_ref$url = _ref.url,
|
8347
8393
|
url = _ref$url === void 0 ? [] : _ref$url,
|
8348
8394
|
_ref$layouts = _ref.layouts,
|
@@ -8394,6 +8440,9 @@ function VideoPlayer(_ref, ref) {
|
|
8394
8440
|
React.useEffect(function () {
|
8395
8441
|
setUrls(url);
|
8396
8442
|
}, [url]);
|
8443
|
+
React.useEffect(function () {
|
8444
|
+
setCurrentLayoutIndex(layoutIndex);
|
8445
|
+
}, [layoutIndex]);
|
8397
8446
|
var initPlayerIndex = allLayouts[layoutIndex || 0].span >= url.length ? url.length - 1 >= 0 ? url.length - 1 : 0 : allLayouts[layoutIndex || 0].span - 1;
|
8398
8447
|
|
8399
8448
|
var _useState5 = React.useState(initPlayerIndex),
|
@@ -8542,14 +8591,14 @@ function VideoPlayer(_ref, ref) {
|
|
8542
8591
|
|
8543
8592
|
var index$6 = /*#__PURE__*/React.forwardRef(VideoPlayer);
|
8544
8593
|
|
8545
|
-
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "
|
8594
|
+
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "visible", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
|
8546
8595
|
|
8547
8596
|
var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字展示时长(s)
|
8548
8597
|
|
8549
8598
|
var DEFAULT_LAST_PLAY_TIME_DELAY = 5; // 默认音量大小
|
8550
8599
|
|
8551
8600
|
var DEFAULT_VOLUME = 0.6;
|
8552
|
-
var index$7 = (function (_ref) {
|
8601
|
+
var index$7 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
8553
8602
|
var id = _ref.id,
|
8554
8603
|
_ref$videoUrls = _ref.videoUrls,
|
8555
8604
|
videoUrls = _ref$videoUrls === void 0 ? [] : _ref$videoUrls,
|
@@ -8563,8 +8612,8 @@ var index$7 = (function (_ref) {
|
|
8563
8612
|
setParentIndex = _ref.setCurrentIndex,
|
8564
8613
|
className = _ref.className,
|
8565
8614
|
style = _ref.style,
|
8566
|
-
_ref$
|
8567
|
-
|
8615
|
+
_ref$visible = _ref.visible,
|
8616
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
8568
8617
|
_ref$autoplay = _ref.autoplay,
|
8569
8618
|
autoplay = _ref$autoplay === void 0 ? false : _ref$autoplay,
|
8570
8619
|
_ref$videoInit = _ref.videoInit,
|
@@ -8576,19 +8625,26 @@ var index$7 = (function (_ref) {
|
|
8576
8625
|
props = _objectWithoutProperties(_ref, _excluded$m);
|
8577
8626
|
|
8578
8627
|
var player = React.useRef();
|
8579
|
-
var currentPlayerIndex = React.useRef(0); // 内置的 index 状态管理
|
8580
8628
|
|
8581
|
-
var _useState = React.useState(
|
8629
|
+
var _useState = React.useState(true),
|
8582
8630
|
_useState2 = _slicedToArray(_useState, 2),
|
8583
|
-
|
8584
|
-
|
8585
|
-
|
8586
|
-
var
|
8587
|
-
|
8588
|
-
|
8589
|
-
|
8590
|
-
|
8591
|
-
|
8631
|
+
firstRender = _useState2[0],
|
8632
|
+
setFirstRender = _useState2[1];
|
8633
|
+
|
8634
|
+
var _useState3 = React.useState(false),
|
8635
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
8636
|
+
ready = _useState4[0],
|
8637
|
+
setReady = _useState4[1];
|
8638
|
+
|
8639
|
+
var currentPlayerIndex = React.useRef(0); // 内置的 index 状态管理
|
8640
|
+
|
8641
|
+
var _useState5 = React.useState(0),
|
8642
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
8643
|
+
videoIndex = _useState6[0],
|
8644
|
+
setVideoIndex = _useState6[1];
|
8645
|
+
|
8646
|
+
var currentIndex = parentIndex !== null && parentIndex !== void 0 ? parentIndex : videoIndex;
|
8647
|
+
var setCurrentIndex = setParentIndex !== null && setParentIndex !== void 0 ? setParentIndex : setVideoIndex;
|
8592
8648
|
var config = React.useRef(_objectSpread2({
|
8593
8649
|
url: videoUrls[0],
|
8594
8650
|
playbackRate: DEFAULT_PLAY_BACK_RATE,
|
@@ -8602,25 +8658,52 @@ var index$7 = (function (_ref) {
|
|
8602
8658
|
}, props));
|
8603
8659
|
/** 设置当前播放 index */
|
8604
8660
|
|
8605
|
-
var handleSetCurrentIndex = React.useCallback(function (
|
8661
|
+
var handleSetCurrentIndex = React.useCallback(function (_ref2) {
|
8662
|
+
var currentIdx = _ref2.currentIdx,
|
8663
|
+
videoUrls = _ref2.videoUrls;
|
8606
8664
|
var newIdx = currentIdx !== null && currentIdx !== void 0 ? currentIdx : currentPlayerIndex.current + 1;
|
8607
8665
|
|
8608
8666
|
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
|
-
}
|
8667
|
+
newIdx = 0;
|
8617
8668
|
}
|
8618
8669
|
|
8619
8670
|
setCurrentIndex(newIdx);
|
8620
|
-
}, [
|
8671
|
+
}, [setCurrentIndex]);
|
8672
|
+
/** 结束事件 */
|
8673
|
+
|
8674
|
+
var onEnd = React.useCallback(function (isLoop, videoUrls) {
|
8675
|
+
return function () {
|
8676
|
+
// 如果是循环或有其他视频未播放完,继续播放下一个
|
8677
|
+
if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
|
8678
|
+
setTimeout(function () {
|
8679
|
+
var _player$current;
|
8680
|
+
|
8681
|
+
return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
|
8682
|
+
});
|
8683
|
+
}
|
8684
|
+
|
8685
|
+
handleSetCurrentIndex({
|
8686
|
+
videoUrls: videoUrls
|
8687
|
+
});
|
8688
|
+
};
|
8689
|
+
}, [handleSetCurrentIndex]);
|
8690
|
+
/** 点击下一个事件 */
|
8691
|
+
|
8692
|
+
var onPlayNextBtnClick = React.useCallback(function (videoUrls) {
|
8693
|
+
return function () {
|
8694
|
+
if (player.current) {
|
8695
|
+
// 防止 next 按钮消失
|
8696
|
+
player.current.currentVideoIndex = videoUrls.length - 2;
|
8697
|
+
}
|
8698
|
+
|
8699
|
+
handleSetCurrentIndex({
|
8700
|
+
videoUrls: videoUrls
|
8701
|
+
});
|
8702
|
+
};
|
8703
|
+
}, [handleSetCurrentIndex]);
|
8621
8704
|
/** 播放下一个 */
|
8622
8705
|
|
8623
|
-
var handlePlayNext = React.useCallback(function (currentIdx) {
|
8706
|
+
var handlePlayNext = React.useCallback(function (currentIdx, isLoop) {
|
8624
8707
|
if (!player.current) {
|
8625
8708
|
return;
|
8626
8709
|
}
|
@@ -8634,7 +8717,7 @@ var index$7 = (function (_ref) {
|
|
8634
8717
|
// 防止 next 按钮消失
|
8635
8718
|
player.current.currentVideoIndex = -videoUrls.length;
|
8636
8719
|
}
|
8637
|
-
}, [videoUrls
|
8720
|
+
}, [videoUrls]);
|
8638
8721
|
/** 重置视频 */
|
8639
8722
|
|
8640
8723
|
var handleReset = React.useCallback(function () {
|
@@ -8650,47 +8733,47 @@ var index$7 = (function (_ref) {
|
|
8650
8733
|
/** 弹窗中的视频关闭以后重置 */
|
8651
8734
|
|
8652
8735
|
React.useEffect(function () {
|
8653
|
-
if (!
|
8736
|
+
if (!visible) {
|
8654
8737
|
handleReset();
|
8655
8738
|
}
|
8656
|
-
}, [handleReset,
|
8739
|
+
}, [handleReset, visible]);
|
8657
8740
|
/** 当 currentIndex 改变以后自动播放下一个 */
|
8658
8741
|
|
8659
8742
|
React.useEffect(function () {
|
8660
|
-
if (!player.current || !
|
8743
|
+
if (!player.current || !visible) {
|
8661
8744
|
return;
|
8662
8745
|
}
|
8663
8746
|
|
8664
|
-
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current);
|
8665
|
-
}, [currentIndex, handlePlayNext,
|
8747
|
+
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current, isLoop);
|
8748
|
+
}, [currentIndex, handlePlayNext, isLoop, visible]);
|
8666
8749
|
/** 播放器初始化并绑定事件 */
|
8667
8750
|
|
8668
8751
|
React.useEffect(function () {
|
8669
|
-
|
8752
|
+
var _player$current4;
|
8753
|
+
|
8754
|
+
if (!visible || lodashEs.isEmpty(videoUrls) || player.current) {
|
8670
8755
|
return;
|
8671
8756
|
}
|
8672
8757
|
|
8673
|
-
|
8674
|
-
|
8675
|
-
|
8676
|
-
|
8677
|
-
|
8678
|
-
|
8679
|
-
setTimeout(function () {
|
8680
|
-
var _player$current;
|
8758
|
+
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
8759
|
+
muted: muted,
|
8760
|
+
volume: muted ? 0 : DEFAULT_VOLUME,
|
8761
|
+
autoplay: autoplay,
|
8762
|
+
videoInit: videoInit
|
8763
|
+
});
|
8681
8764
|
|
8682
|
-
|
8683
|
-
|
8684
|
-
} else {
|
8685
|
-
var _player$current2;
|
8765
|
+
setReady(false);
|
8766
|
+
setFirstRender(false); // @ts-ignore
|
8686
8767
|
|
8687
|
-
|
8688
|
-
|
8689
|
-
|
8768
|
+
player.current = new Player__default['default'](newConfig);
|
8769
|
+
player.current.currentVideoIndex = -videoUrls.length;
|
8770
|
+
player.current.on('ended', onEnd(isLoop, videoUrls)); // 播放记忆缓存
|
8690
8771
|
|
8691
8772
|
if (enableMemory) {
|
8773
|
+
var _player$current2;
|
8774
|
+
|
8692
8775
|
var videoPlayedTimeObj = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}');
|
8693
|
-
player.current.on('timeupdate', function () {
|
8776
|
+
(_player$current2 = player.current) === null || _player$current2 === void 0 ? void 0 : _player$current2.on('timeupdate', function () {
|
8694
8777
|
var _player$current3;
|
8695
8778
|
|
8696
8779
|
if (currentPlayerIndex.current === -1) {
|
@@ -8704,27 +8787,23 @@ var index$7 = (function (_ref) {
|
|
8704
8787
|
});
|
8705
8788
|
}
|
8706
8789
|
|
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]);
|
8790
|
+
(_player$current4 = player.current) === null || _player$current4 === void 0 ? void 0 : _player$current4.on('playNextBtnClick', onPlayNextBtnClick(videoUrls));
|
8791
|
+
}, [ready, autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, visible, muted, videoInit, onEnd, onPlayNextBtnClick]);
|
8716
8792
|
/** 读取缓存的播放记忆并跳转 */
|
8717
8793
|
|
8718
8794
|
React.useEffect(function () {
|
8719
|
-
if (enableMemory &&
|
8795
|
+
if (enableMemory && visible) {
|
8720
8796
|
var _JSON$parse;
|
8721
8797
|
|
8722
|
-
var
|
8723
|
-
lastPlayTime =
|
8724
|
-
_videoIndex =
|
8798
|
+
var _ref3 = ((_JSON$parse = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[id]) || {},
|
8799
|
+
lastPlayTime = _ref3.lastPlayTime,
|
8800
|
+
_videoIndex = _ref3.videoIndex;
|
8725
8801
|
|
8726
8802
|
setTimeout(function () {
|
8727
|
-
handleSetCurrentIndex(
|
8803
|
+
handleSetCurrentIndex({
|
8804
|
+
currentIdx: _videoIndex,
|
8805
|
+
videoUrls: videoUrls
|
8806
|
+
});
|
8728
8807
|
setTimeout(function () {
|
8729
8808
|
if (player.current) {
|
8730
8809
|
player.current.currentTime = lastPlayTime;
|
@@ -8732,7 +8811,7 @@ var index$7 = (function (_ref) {
|
|
8732
8811
|
});
|
8733
8812
|
});
|
8734
8813
|
}
|
8735
|
-
}, [
|
8814
|
+
}, [visible, enableMemory, handleSetCurrentIndex, id, videoUrls]);
|
8736
8815
|
/** 加载清晰度配置 */
|
8737
8816
|
|
8738
8817
|
React.useEffect(function () {
|
@@ -8740,8 +8819,21 @@ var index$7 = (function (_ref) {
|
|
8740
8819
|
player.current.emit('resourceReady', definitionList[currentIndex]);
|
8741
8820
|
}
|
8742
8821
|
}, [currentIndex, definitionList]);
|
8822
|
+
React.useEffect(function () {
|
8823
|
+
var _player$current5, _player$current6, _player$current7;
|
8824
|
+
|
8825
|
+
if (firstRender) {
|
8826
|
+
return;
|
8827
|
+
}
|
8828
|
+
|
8829
|
+
(_player$current5 = player.current) === null || _player$current5 === void 0 ? void 0 : _player$current5.off('ended', onEnd(isLoop, videoUrls));
|
8830
|
+
(_player$current6 = player.current) === null || _player$current6 === void 0 ? void 0 : _player$current6.off('playNextBtnClick', onPlayNextBtnClick(videoUrls));
|
8831
|
+
(_player$current7 = player.current) === null || _player$current7 === void 0 ? void 0 : _player$current7.destroy();
|
8832
|
+
player.current = undefined;
|
8833
|
+
setReady(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
8834
|
+
}, [muted, isLoop, videoUrls, autoplay, videoInit, onEnd, onPlayNextBtnClick]);
|
8743
8835
|
var getRef = React.useCallback(function (ref) {
|
8744
|
-
if (ref &&
|
8836
|
+
if (ref && visible) {
|
8745
8837
|
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
8746
8838
|
el: ref,
|
8747
8839
|
url: videoUrls[0],
|
@@ -8753,8 +8845,8 @@ var index$7 = (function (_ref) {
|
|
8753
8845
|
if (enableMemory) {
|
8754
8846
|
var _JSON$parse2;
|
8755
8847
|
|
8756
|
-
var
|
8757
|
-
lastPlayTime =
|
8848
|
+
var _ref4 = ((_JSON$parse2 = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2[id]) || {},
|
8849
|
+
lastPlayTime = _ref4.lastPlayTime;
|
8758
8850
|
|
8759
8851
|
Object.assign(newConfig, {
|
8760
8852
|
lastPlayTime: lastPlayTime,
|
@@ -8764,7 +8856,15 @@ var index$7 = (function (_ref) {
|
|
8764
8856
|
|
8765
8857
|
config.current = newConfig;
|
8766
8858
|
}
|
8767
|
-
|
8859
|
+
|
8860
|
+
if (playerRef) {
|
8861
|
+
if (typeof playerRef === 'function') {
|
8862
|
+
playerRef(player.current);
|
8863
|
+
} else {
|
8864
|
+
playerRef.current = player.current;
|
8865
|
+
}
|
8866
|
+
}
|
8867
|
+
}, [visible, playerRef, videoUrls, enableMemory, id, lastPlayTimeHideDelay]);
|
8768
8868
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
8769
8869
|
className: className,
|
8770
8870
|
ref: getRef,
|
@@ -9053,7 +9153,7 @@ function NtTable(_ref) {
|
|
9053
9153
|
return item.value == record[c.dataIndex];
|
9054
9154
|
})) === null || _columnsFields$c$data === void 0 ? void 0 : _columnsFields$c$data.label : record[c.dataIndex])));
|
9055
9155
|
} else {
|
9056
|
-
var _columnsFields$c$data2, _columnsFields$c$data3;
|
9156
|
+
var _columnsFields$c$data2, _columnsFields$c$data3, _columnsFields$c$data4, _columnsFields$c$data5;
|
9057
9157
|
|
9058
9158
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
9059
9159
|
key: c.dataIndex,
|
@@ -9077,9 +9177,13 @@ function NtTable(_ref) {
|
|
9077
9177
|
}
|
9078
9178
|
}, c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data2 = columnsFields[c.dataIndex].find(function (item) {
|
9079
9179
|
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) {
|
9180
|
+
})) === 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
9181
|
return item.value == record[c.dataIndex];
|
9082
|
-
})) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label
|
9182
|
+
})) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label) && ((_columnsFields$c$data4 = columnsFields[c.dataIndex].find(function (item) {
|
9183
|
+
return item.value == record[c.dataIndex];
|
9184
|
+
})) === null || _columnsFields$c$data4 === void 0 ? void 0 : _columnsFields$c$data4.label) !== 0 ? (_columnsFields$c$data5 = columnsFields[c.dataIndex].find(function (item) {
|
9185
|
+
return item.value == record[c.dataIndex];
|
9186
|
+
})) === null || _columnsFields$c$data5 === void 0 ? void 0 : _columnsFields$c$data5.label : '-' : record[c.dataIndex]);
|
9083
9187
|
}
|
9084
9188
|
}
|
9085
9189
|
});
|
@@ -10176,7 +10280,7 @@ console.log(REACT_APP_ENV, 'REACT_APP_ENV');
|
|
10176
10280
|
|
10177
10281
|
if (REACT_APP_ENV == 'development') {
|
10178
10282
|
var COLOR_ATTR_NAME = 'data-prefers-color';
|
10179
|
-
document.documentElement.setAttribute(COLOR_ATTR_NAME, '
|
10283
|
+
document.documentElement.setAttribute(COLOR_ATTR_NAME, 'nt');
|
10180
10284
|
}
|
10181
10285
|
|
10182
10286
|
exports.AutoScroll = Index$b;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function useModel(namespace: string | number, updater: any): void;
|