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.esm.js
CHANGED
@@ -3,7 +3,7 @@ import React, { useRef, useEffect, useMemo, useState, useCallback, useImperative
|
|
3
3
|
import { cloneDeep, uniqBy, isEmpty } from 'lodash-es';
|
4
4
|
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
5
5
|
import { Menu, Dropdown, Button, Input, Upload as Upload$1, Modal as Modal$2, message, InputNumber, DatePicker, Radio, Space, Checkbox, Select, Switch, Tooltip, TreeSelect as TreeSelect$1, Cascader, Form, Row, Col, Spin, Pagination, Breadcrumb, ConfigProvider } from 'antd';
|
6
|
-
import { createFromIconfontCN, PlusOutlined, SearchOutlined, ReloadOutlined,
|
6
|
+
import { createFromIconfontCN, PlusOutlined, CloseCircleOutlined, SearchOutlined, ReloadOutlined, EllipsisOutlined, ExclamationCircleOutlined, EyeOutlined, EditOutlined, DeleteOutlined, LeftOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons';
|
7
7
|
import FileViewer from 'react-file-viewer';
|
8
8
|
import classnames from 'classnames';
|
9
9
|
import zhCN from 'antd/es/date-picker/locale/zh_CN';
|
@@ -2593,9 +2593,21 @@ dayjs.locale('zh-cn');
|
|
2593
2593
|
var WDatePicker = function WDatePicker(props) {
|
2594
2594
|
var extraProps = _extends({}, props);
|
2595
2595
|
|
2596
|
-
return /*#__PURE__*/React.createElement(DatePicker, _objectSpread2({
|
2596
|
+
return /*#__PURE__*/React.createElement(DatePicker, _objectSpread2(_objectSpread2({
|
2597
2597
|
locale: zhCN
|
2598
|
-
}, extraProps)
|
2598
|
+
}, extraProps), {}, {
|
2599
|
+
clearIcon: /*#__PURE__*/React.createElement("div", {
|
2600
|
+
className: "clearIconBox"
|
2601
|
+
}, /*#__PURE__*/React.createElement(CloseCircleOutlined, {
|
2602
|
+
className: "clearIcon"
|
2603
|
+
})),
|
2604
|
+
suffixIcon: /*#__PURE__*/React.createElement("div", {
|
2605
|
+
className: "dateIcon"
|
2606
|
+
}, /*#__PURE__*/React.createElement("img", {
|
2607
|
+
className: "datePickerIcon",
|
2608
|
+
src: require('../../assets/icon/datePickerIcon.png')
|
2609
|
+
}))
|
2610
|
+
}));
|
2599
2611
|
};
|
2600
2612
|
|
2601
2613
|
WDatePicker.defaultProps = {};
|
@@ -2622,6 +2634,17 @@ var RangePicker = function RangePicker(props) {
|
|
2622
2634
|
if (panelType === 'within') {
|
2623
2635
|
return /*#__PURE__*/React.createElement(RangePicker, _objectSpread2({
|
2624
2636
|
locale: zhCN,
|
2637
|
+
clearIcon: /*#__PURE__*/React.createElement("div", {
|
2638
|
+
className: "clearIconBox"
|
2639
|
+
}, /*#__PURE__*/React.createElement(CloseCircleOutlined, {
|
2640
|
+
className: "clearIcon"
|
2641
|
+
})),
|
2642
|
+
suffixIcon: /*#__PURE__*/React.createElement("div", {
|
2643
|
+
className: "dateIcon"
|
2644
|
+
}, /*#__PURE__*/React.createElement("img", {
|
2645
|
+
className: "datePickerIcon",
|
2646
|
+
src: require('../../assets/icon/datePickerIcon.png')
|
2647
|
+
})),
|
2625
2648
|
value: rangePickerValue,
|
2626
2649
|
onChange: function onChange(date) {
|
2627
2650
|
setRadioValue('');
|
@@ -2654,7 +2677,7 @@ var RangePicker = function RangePicker(props) {
|
|
2654
2677
|
}
|
2655
2678
|
}, /*#__PURE__*/React.createElement(Space, {
|
2656
2679
|
direction: "vertical",
|
2657
|
-
size:
|
2680
|
+
size: 28
|
2658
2681
|
}, /*#__PURE__*/React.createElement(Radio.Button, {
|
2659
2682
|
value: '1',
|
2660
2683
|
onClick: function onClick() {
|
@@ -2711,6 +2734,17 @@ var RangePicker = function RangePicker(props) {
|
|
2711
2734
|
}
|
2712
2735
|
}, /*#__PURE__*/React.createElement("span", null, "\u65E5")))), /*#__PURE__*/React.createElement(RangePicker, _objectSpread2({
|
2713
2736
|
locale: zhCN,
|
2737
|
+
clearIcon: /*#__PURE__*/React.createElement("div", {
|
2738
|
+
className: "clearIconBox"
|
2739
|
+
}, /*#__PURE__*/React.createElement(CloseCircleOutlined, {
|
2740
|
+
className: "clearIcon"
|
2741
|
+
})),
|
2742
|
+
suffixIcon: /*#__PURE__*/React.createElement("div", {
|
2743
|
+
className: "dateIcon"
|
2744
|
+
}, /*#__PURE__*/React.createElement("img", {
|
2745
|
+
className: "datePickerIcon",
|
2746
|
+
src: require('../../assets/icon/datePickerIcon.png')
|
2747
|
+
})),
|
2714
2748
|
value: rangePickerValue,
|
2715
2749
|
onChange: function onChange(date) {
|
2716
2750
|
setRadioValue('');
|
@@ -2720,6 +2754,17 @@ var RangePicker = function RangePicker(props) {
|
|
2720
2754
|
}
|
2721
2755
|
|
2722
2756
|
return /*#__PURE__*/React.createElement(DatePicker.RangePicker, _objectSpread2({
|
2757
|
+
clearIcon: /*#__PURE__*/React.createElement("div", {
|
2758
|
+
className: "clearIconBox"
|
2759
|
+
}, /*#__PURE__*/React.createElement(CloseCircleOutlined, {
|
2760
|
+
className: "clearIcon"
|
2761
|
+
})),
|
2762
|
+
suffixIcon: /*#__PURE__*/React.createElement("div", {
|
2763
|
+
className: "dateIcon"
|
2764
|
+
}, /*#__PURE__*/React.createElement("img", {
|
2765
|
+
className: "datePickerIcon",
|
2766
|
+
src: require('../../assets/icon/datePickerIcon.png')
|
2767
|
+
})),
|
2723
2768
|
locale: zhCN
|
2724
2769
|
}, extraProps));
|
2725
2770
|
};
|
@@ -3164,7 +3209,7 @@ var NumericInput = /*#__PURE__*/function (_React$Component) {
|
|
3164
3209
|
valueTemp = value.slice(0, -1);
|
3165
3210
|
}
|
3166
3211
|
|
3167
|
-
onChange && onChange(valueTemp.replace(/0*(\d+)/, '$1'));
|
3212
|
+
valueTemp && onChange && onChange(valueTemp.replace(/0*(\d+)/, '$1'));
|
3168
3213
|
|
3169
3214
|
if (onBlur) {
|
3170
3215
|
onBlur && onBlur();
|
@@ -8350,6 +8395,9 @@ function VideoPlayer(_ref, ref) {
|
|
8350
8395
|
useEffect(function () {
|
8351
8396
|
setUrls(url);
|
8352
8397
|
}, [url]);
|
8398
|
+
useEffect(function () {
|
8399
|
+
setCurrentLayoutIndex(layoutIndex);
|
8400
|
+
}, [layoutIndex]);
|
8353
8401
|
var initPlayerIndex = allLayouts[layoutIndex || 0].span >= url.length ? url.length - 1 >= 0 ? url.length - 1 : 0 : allLayouts[layoutIndex || 0].span - 1;
|
8354
8402
|
|
8355
8403
|
var _useState5 = useState(initPlayerIndex),
|
@@ -8498,14 +8546,14 @@ function VideoPlayer(_ref, ref) {
|
|
8498
8546
|
|
8499
8547
|
var index$6 = /*#__PURE__*/forwardRef(VideoPlayer);
|
8500
8548
|
|
8501
|
-
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "
|
8549
|
+
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "visible", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
|
8502
8550
|
|
8503
8551
|
var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字展示时长(s)
|
8504
8552
|
|
8505
8553
|
var DEFAULT_LAST_PLAY_TIME_DELAY = 5; // 默认音量大小
|
8506
8554
|
|
8507
8555
|
var DEFAULT_VOLUME = 0.6;
|
8508
|
-
var index$7 = (function (_ref) {
|
8556
|
+
var index$7 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
8509
8557
|
var id = _ref.id,
|
8510
8558
|
_ref$videoUrls = _ref.videoUrls,
|
8511
8559
|
videoUrls = _ref$videoUrls === void 0 ? [] : _ref$videoUrls,
|
@@ -8519,8 +8567,8 @@ var index$7 = (function (_ref) {
|
|
8519
8567
|
setParentIndex = _ref.setCurrentIndex,
|
8520
8568
|
className = _ref.className,
|
8521
8569
|
style = _ref.style,
|
8522
|
-
_ref$
|
8523
|
-
|
8570
|
+
_ref$visible = _ref.visible,
|
8571
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
8524
8572
|
_ref$autoplay = _ref.autoplay,
|
8525
8573
|
autoplay = _ref$autoplay === void 0 ? false : _ref$autoplay,
|
8526
8574
|
_ref$videoInit = _ref.videoInit,
|
@@ -8532,19 +8580,26 @@ var index$7 = (function (_ref) {
|
|
8532
8580
|
props = _objectWithoutProperties(_ref, _excluded$m);
|
8533
8581
|
|
8534
8582
|
var player = useRef();
|
8535
|
-
var currentPlayerIndex = useRef(0); // 内置的 index 状态管理
|
8536
8583
|
|
8537
|
-
var _useState = useState(
|
8584
|
+
var _useState = useState(true),
|
8538
8585
|
_useState2 = _slicedToArray(_useState, 2),
|
8539
|
-
|
8540
|
-
|
8541
|
-
|
8542
|
-
var
|
8543
|
-
|
8544
|
-
|
8545
|
-
|
8546
|
-
|
8547
|
-
|
8586
|
+
firstRender = _useState2[0],
|
8587
|
+
setFirstRender = _useState2[1];
|
8588
|
+
|
8589
|
+
var _useState3 = useState(false),
|
8590
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
8591
|
+
ready = _useState4[0],
|
8592
|
+
setReady = _useState4[1];
|
8593
|
+
|
8594
|
+
var currentPlayerIndex = useRef(0); // 内置的 index 状态管理
|
8595
|
+
|
8596
|
+
var _useState5 = useState(0),
|
8597
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
8598
|
+
videoIndex = _useState6[0],
|
8599
|
+
setVideoIndex = _useState6[1];
|
8600
|
+
|
8601
|
+
var currentIndex = parentIndex !== null && parentIndex !== void 0 ? parentIndex : videoIndex;
|
8602
|
+
var setCurrentIndex = setParentIndex !== null && setParentIndex !== void 0 ? setParentIndex : setVideoIndex;
|
8548
8603
|
var config = useRef(_objectSpread2({
|
8549
8604
|
url: videoUrls[0],
|
8550
8605
|
playbackRate: DEFAULT_PLAY_BACK_RATE,
|
@@ -8558,25 +8613,52 @@ var index$7 = (function (_ref) {
|
|
8558
8613
|
}, props));
|
8559
8614
|
/** 设置当前播放 index */
|
8560
8615
|
|
8561
|
-
var handleSetCurrentIndex = useCallback(function (
|
8616
|
+
var handleSetCurrentIndex = useCallback(function (_ref2) {
|
8617
|
+
var currentIdx = _ref2.currentIdx,
|
8618
|
+
videoUrls = _ref2.videoUrls;
|
8562
8619
|
var newIdx = currentIdx !== null && currentIdx !== void 0 ? currentIdx : currentPlayerIndex.current + 1;
|
8563
8620
|
|
8564
8621
|
if (newIdx >= videoUrls.length) {
|
8565
|
-
|
8566
|
-
// 允许循环则播放起始视频
|
8567
|
-
newIdx = 0;
|
8568
|
-
} else if (player.current && player.current.video) {
|
8569
|
-
// 不允许循环则进度条快进到最后
|
8570
|
-
player.current.currentTime = player.current.video.duration;
|
8571
|
-
return;
|
8572
|
-
}
|
8622
|
+
newIdx = 0;
|
8573
8623
|
}
|
8574
8624
|
|
8575
8625
|
setCurrentIndex(newIdx);
|
8576
|
-
}, [
|
8626
|
+
}, [setCurrentIndex]);
|
8627
|
+
/** 结束事件 */
|
8628
|
+
|
8629
|
+
var onEnd = useCallback(function (isLoop, videoUrls) {
|
8630
|
+
return function () {
|
8631
|
+
// 如果是循环或有其他视频未播放完,继续播放下一个
|
8632
|
+
if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
|
8633
|
+
setTimeout(function () {
|
8634
|
+
var _player$current;
|
8635
|
+
|
8636
|
+
return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
|
8637
|
+
});
|
8638
|
+
}
|
8639
|
+
|
8640
|
+
handleSetCurrentIndex({
|
8641
|
+
videoUrls: videoUrls
|
8642
|
+
});
|
8643
|
+
};
|
8644
|
+
}, [handleSetCurrentIndex]);
|
8645
|
+
/** 点击下一个事件 */
|
8646
|
+
|
8647
|
+
var onPlayNextBtnClick = useCallback(function (videoUrls) {
|
8648
|
+
return function () {
|
8649
|
+
if (player.current) {
|
8650
|
+
// 防止 next 按钮消失
|
8651
|
+
player.current.currentVideoIndex = videoUrls.length - 2;
|
8652
|
+
}
|
8653
|
+
|
8654
|
+
handleSetCurrentIndex({
|
8655
|
+
videoUrls: videoUrls
|
8656
|
+
});
|
8657
|
+
};
|
8658
|
+
}, [handleSetCurrentIndex]);
|
8577
8659
|
/** 播放下一个 */
|
8578
8660
|
|
8579
|
-
var handlePlayNext = useCallback(function (currentIdx) {
|
8661
|
+
var handlePlayNext = useCallback(function (currentIdx, isLoop) {
|
8580
8662
|
if (!player.current) {
|
8581
8663
|
return;
|
8582
8664
|
}
|
@@ -8590,7 +8672,7 @@ var index$7 = (function (_ref) {
|
|
8590
8672
|
// 防止 next 按钮消失
|
8591
8673
|
player.current.currentVideoIndex = -videoUrls.length;
|
8592
8674
|
}
|
8593
|
-
}, [videoUrls
|
8675
|
+
}, [videoUrls]);
|
8594
8676
|
/** 重置视频 */
|
8595
8677
|
|
8596
8678
|
var handleReset = useCallback(function () {
|
@@ -8606,47 +8688,47 @@ var index$7 = (function (_ref) {
|
|
8606
8688
|
/** 弹窗中的视频关闭以后重置 */
|
8607
8689
|
|
8608
8690
|
useEffect(function () {
|
8609
|
-
if (!
|
8691
|
+
if (!visible) {
|
8610
8692
|
handleReset();
|
8611
8693
|
}
|
8612
|
-
}, [handleReset,
|
8694
|
+
}, [handleReset, visible]);
|
8613
8695
|
/** 当 currentIndex 改变以后自动播放下一个 */
|
8614
8696
|
|
8615
8697
|
useEffect(function () {
|
8616
|
-
if (!player.current || !
|
8698
|
+
if (!player.current || !visible) {
|
8617
8699
|
return;
|
8618
8700
|
}
|
8619
8701
|
|
8620
|
-
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current);
|
8621
|
-
}, [currentIndex, handlePlayNext,
|
8702
|
+
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current, isLoop);
|
8703
|
+
}, [currentIndex, handlePlayNext, isLoop, visible]);
|
8622
8704
|
/** 播放器初始化并绑定事件 */
|
8623
8705
|
|
8624
8706
|
useEffect(function () {
|
8625
|
-
|
8707
|
+
var _player$current4;
|
8708
|
+
|
8709
|
+
if (!visible || isEmpty(videoUrls) || player.current) {
|
8626
8710
|
return;
|
8627
8711
|
}
|
8628
8712
|
|
8629
|
-
|
8630
|
-
|
8631
|
-
|
8632
|
-
|
8633
|
-
|
8634
|
-
|
8635
|
-
setTimeout(function () {
|
8636
|
-
var _player$current;
|
8713
|
+
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
8714
|
+
muted: muted,
|
8715
|
+
volume: muted ? 0 : DEFAULT_VOLUME,
|
8716
|
+
autoplay: autoplay,
|
8717
|
+
videoInit: videoInit
|
8718
|
+
});
|
8637
8719
|
|
8638
|
-
|
8639
|
-
|
8640
|
-
} else {
|
8641
|
-
var _player$current2;
|
8720
|
+
setReady(false);
|
8721
|
+
setFirstRender(false); // @ts-ignore
|
8642
8722
|
|
8643
|
-
|
8644
|
-
|
8645
|
-
|
8723
|
+
player.current = new Player(newConfig);
|
8724
|
+
player.current.currentVideoIndex = -videoUrls.length;
|
8725
|
+
player.current.on('ended', onEnd(isLoop, videoUrls)); // 播放记忆缓存
|
8646
8726
|
|
8647
8727
|
if (enableMemory) {
|
8728
|
+
var _player$current2;
|
8729
|
+
|
8648
8730
|
var videoPlayedTimeObj = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}');
|
8649
|
-
player.current.on('timeupdate', function () {
|
8731
|
+
(_player$current2 = player.current) === null || _player$current2 === void 0 ? void 0 : _player$current2.on('timeupdate', function () {
|
8650
8732
|
var _player$current3;
|
8651
8733
|
|
8652
8734
|
if (currentPlayerIndex.current === -1) {
|
@@ -8660,27 +8742,23 @@ var index$7 = (function (_ref) {
|
|
8660
8742
|
});
|
8661
8743
|
}
|
8662
8744
|
|
8663
|
-
player.current.on('playNextBtnClick',
|
8664
|
-
|
8665
|
-
// 防止 next 按钮消失
|
8666
|
-
player.current.currentVideoIndex = videoUrls.length - 2;
|
8667
|
-
}
|
8668
|
-
|
8669
|
-
handleSetCurrentIndex();
|
8670
|
-
});
|
8671
|
-
}, [autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, open]);
|
8745
|
+
(_player$current4 = player.current) === null || _player$current4 === void 0 ? void 0 : _player$current4.on('playNextBtnClick', onPlayNextBtnClick(videoUrls));
|
8746
|
+
}, [ready, autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, visible, muted, videoInit, onEnd, onPlayNextBtnClick]);
|
8672
8747
|
/** 读取缓存的播放记忆并跳转 */
|
8673
8748
|
|
8674
8749
|
useEffect(function () {
|
8675
|
-
if (enableMemory &&
|
8750
|
+
if (enableMemory && visible) {
|
8676
8751
|
var _JSON$parse;
|
8677
8752
|
|
8678
|
-
var
|
8679
|
-
lastPlayTime =
|
8680
|
-
_videoIndex =
|
8753
|
+
var _ref3 = ((_JSON$parse = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[id]) || {},
|
8754
|
+
lastPlayTime = _ref3.lastPlayTime,
|
8755
|
+
_videoIndex = _ref3.videoIndex;
|
8681
8756
|
|
8682
8757
|
setTimeout(function () {
|
8683
|
-
handleSetCurrentIndex(
|
8758
|
+
handleSetCurrentIndex({
|
8759
|
+
currentIdx: _videoIndex,
|
8760
|
+
videoUrls: videoUrls
|
8761
|
+
});
|
8684
8762
|
setTimeout(function () {
|
8685
8763
|
if (player.current) {
|
8686
8764
|
player.current.currentTime = lastPlayTime;
|
@@ -8688,7 +8766,7 @@ var index$7 = (function (_ref) {
|
|
8688
8766
|
});
|
8689
8767
|
});
|
8690
8768
|
}
|
8691
|
-
}, [
|
8769
|
+
}, [visible, enableMemory, handleSetCurrentIndex, id, videoUrls]);
|
8692
8770
|
/** 加载清晰度配置 */
|
8693
8771
|
|
8694
8772
|
useEffect(function () {
|
@@ -8696,8 +8774,21 @@ var index$7 = (function (_ref) {
|
|
8696
8774
|
player.current.emit('resourceReady', definitionList[currentIndex]);
|
8697
8775
|
}
|
8698
8776
|
}, [currentIndex, definitionList]);
|
8777
|
+
useEffect(function () {
|
8778
|
+
var _player$current5, _player$current6, _player$current7;
|
8779
|
+
|
8780
|
+
if (firstRender) {
|
8781
|
+
return;
|
8782
|
+
}
|
8783
|
+
|
8784
|
+
(_player$current5 = player.current) === null || _player$current5 === void 0 ? void 0 : _player$current5.off('ended', onEnd(isLoop, videoUrls));
|
8785
|
+
(_player$current6 = player.current) === null || _player$current6 === void 0 ? void 0 : _player$current6.off('playNextBtnClick', onPlayNextBtnClick(videoUrls));
|
8786
|
+
(_player$current7 = player.current) === null || _player$current7 === void 0 ? void 0 : _player$current7.destroy();
|
8787
|
+
player.current = undefined;
|
8788
|
+
setReady(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
8789
|
+
}, [muted, isLoop, videoUrls, autoplay, videoInit, onEnd, onPlayNextBtnClick]);
|
8699
8790
|
var getRef = useCallback(function (ref) {
|
8700
|
-
if (ref &&
|
8791
|
+
if (ref && visible) {
|
8701
8792
|
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
8702
8793
|
el: ref,
|
8703
8794
|
url: videoUrls[0],
|
@@ -8709,8 +8800,8 @@ var index$7 = (function (_ref) {
|
|
8709
8800
|
if (enableMemory) {
|
8710
8801
|
var _JSON$parse2;
|
8711
8802
|
|
8712
|
-
var
|
8713
|
-
lastPlayTime =
|
8803
|
+
var _ref4 = ((_JSON$parse2 = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2[id]) || {},
|
8804
|
+
lastPlayTime = _ref4.lastPlayTime;
|
8714
8805
|
|
8715
8806
|
Object.assign(newConfig, {
|
8716
8807
|
lastPlayTime: lastPlayTime,
|
@@ -8720,7 +8811,15 @@ var index$7 = (function (_ref) {
|
|
8720
8811
|
|
8721
8812
|
config.current = newConfig;
|
8722
8813
|
}
|
8723
|
-
|
8814
|
+
|
8815
|
+
if (playerRef) {
|
8816
|
+
if (typeof playerRef === 'function') {
|
8817
|
+
playerRef(player.current);
|
8818
|
+
} else {
|
8819
|
+
playerRef.current = player.current;
|
8820
|
+
}
|
8821
|
+
}
|
8822
|
+
}, [visible, playerRef, videoUrls, enableMemory, id, lastPlayTimeHideDelay]);
|
8724
8823
|
return /*#__PURE__*/React.createElement("div", {
|
8725
8824
|
className: className,
|
8726
8825
|
ref: getRef,
|
@@ -9009,7 +9108,7 @@ function NtTable(_ref) {
|
|
9009
9108
|
return item.value == record[c.dataIndex];
|
9010
9109
|
})) === null || _columnsFields$c$data === void 0 ? void 0 : _columnsFields$c$data.label : record[c.dataIndex])));
|
9011
9110
|
} else {
|
9012
|
-
var _columnsFields$c$data2, _columnsFields$c$data3;
|
9111
|
+
var _columnsFields$c$data2, _columnsFields$c$data3, _columnsFields$c$data4, _columnsFields$c$data5;
|
9013
9112
|
|
9014
9113
|
return /*#__PURE__*/React.createElement("div", {
|
9015
9114
|
key: c.dataIndex,
|
@@ -9033,9 +9132,13 @@ function NtTable(_ref) {
|
|
9033
9132
|
}
|
9034
9133
|
}, c.render ? c.render(record[c.dataIndex], record, index) : columnsFields[c.dataIndex] ? (_columnsFields$c$data2 = columnsFields[c.dataIndex].find(function (item) {
|
9035
9134
|
return item.value == record[c.dataIndex];
|
9036
|
-
})) === 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) {
|
9135
|
+
})) === 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) {
|
9037
9136
|
return item.value == record[c.dataIndex];
|
9038
|
-
})) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label
|
9137
|
+
})) === null || _columnsFields$c$data3 === void 0 ? void 0 : _columnsFields$c$data3.label) && ((_columnsFields$c$data4 = columnsFields[c.dataIndex].find(function (item) {
|
9138
|
+
return item.value == record[c.dataIndex];
|
9139
|
+
})) === null || _columnsFields$c$data4 === void 0 ? void 0 : _columnsFields$c$data4.label) !== 0 ? (_columnsFields$c$data5 = columnsFields[c.dataIndex].find(function (item) {
|
9140
|
+
return item.value == record[c.dataIndex];
|
9141
|
+
})) === null || _columnsFields$c$data5 === void 0 ? void 0 : _columnsFields$c$data5.label : '-' : record[c.dataIndex]);
|
9039
9142
|
}
|
9040
9143
|
}
|
9041
9144
|
});
|
@@ -10132,7 +10235,7 @@ console.log(REACT_APP_ENV, 'REACT_APP_ENV');
|
|
10132
10235
|
|
10133
10236
|
if (REACT_APP_ENV == 'development') {
|
10134
10237
|
var COLOR_ATTR_NAME = 'data-prefers-color';
|
10135
|
-
document.documentElement.setAttribute(COLOR_ATTR_NAME, '
|
10238
|
+
document.documentElement.setAttribute(COLOR_ATTR_NAME, 'nt');
|
10136
10239
|
}
|
10137
10240
|
|
10138
10241
|
export { Index$b as AutoScroll, Index$d as Breadcrumb, WButton as Button, index$5 as Calendar, index$3 as Card, WCascader as Cascader, Index$4 as Checkbox, Index$a as CountUp, Index$2 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, index$8 as NtTable, Index$9 as Number, NumericInput, Index$3 as Radio, index$2 as RequestRenderDom, Index$5 as Select, Index$c as Swiper, WSwitch as Switch, index$4 as TabelCard, index$1 as Table, Index$7 as TreeSelect, Upload, index$7 as Video, index$6 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter, useStateWithCall, wTracing, create as whox, wmox };
|