wargerm 0.7.31 → 0.7.32
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/Swiper/index.d.ts +1 -0
- package/dist/components/Upload/example/UploadBigFile/api.d.ts +0 -0
- package/dist/components/Upload/example/UploadBigFile/index.d.ts +0 -0
- package/dist/components/Upload/example/UploadBigFile/utils/hash.d.ts +0 -0
- package/dist/components/Video/index.d.ts +5 -14
- package/dist/components/WForm/example/demo4.d.ts +3 -0
- package/dist/components/WForm/example/demo5.d.ts +3 -0
- package/dist/index.esm.js +90 -129
- package/dist/index.js +90 -129
- package/package.json +92 -92
File without changes
|
File without changes
|
File without changes
|
@@ -1,14 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
interface PlayerProps extends Player {
|
4
|
-
currentVideoIndex?: number;
|
5
|
-
video?: {
|
6
|
-
duration: number;
|
7
|
-
};
|
8
|
-
on: (eventName: string | symbol, listener: (...args: any[]) => void) => this;
|
9
|
-
off: (eventName: string | symbol, listener: (...args: any[]) => void) => this;
|
10
|
-
emit: (eventName: string | symbol, ...args: any[]) => boolean;
|
11
|
-
}
|
1
|
+
import { CSSProperties } from 'react';
|
2
|
+
import { IPlayerOptions } from 'xgplayer';
|
12
3
|
/** 清晰度视频项目,name 为清晰度,url 为视频源 */
|
13
4
|
export interface DefinitionItemProps {
|
14
5
|
name: string;
|
@@ -22,10 +13,10 @@ interface VideoProps extends Omit<IPlayerOptions, 'url' | 'loop'> {
|
|
22
13
|
videoUrls: string[];
|
23
14
|
/** 清晰度视频数组,顺序应与 videoUrls 保持一致 */
|
24
15
|
definitionList?: DefinitionItemProps[][];
|
25
|
-
/** 是否循环播放
|
16
|
+
/** 是否循环播放 */
|
26
17
|
isLoop?: boolean;
|
27
18
|
/** 是否可见 */
|
28
|
-
|
19
|
+
open?: boolean;
|
29
20
|
/** 是否静音播放 */
|
30
21
|
muted?: boolean;
|
31
22
|
/** 初始化显示首帧 */
|
@@ -40,5 +31,5 @@ interface VideoProps extends Omit<IPlayerOptions, 'url' | 'loop'> {
|
|
40
31
|
style?: CSSProperties;
|
41
32
|
className?: string;
|
42
33
|
}
|
43
|
-
declare const _default:
|
34
|
+
declare const _default: ({ id, videoUrls, definitionList, isLoop, muted, currentIndex: parentIndex, setCurrentIndex: setParentIndex, className, style, open, autoplay, videoInit, enableMemory, lastPlayTimeHideDelay, ...props }: VideoProps) => JSX.Element;
|
44
35
|
export default _default;
|
package/dist/index.esm.js
CHANGED
@@ -5316,7 +5316,7 @@ var Index$b = function Index(_ref) {
|
|
5316
5316
|
}, none || '暂无数据');
|
5317
5317
|
};
|
5318
5318
|
|
5319
|
-
var _excluded$f = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
|
5319
|
+
var _excluded$f = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
|
5320
5320
|
|
5321
5321
|
SwiperCore.use([Pagination$1, Navigation, Autoplay, Virtual]);
|
5322
5322
|
var Index$c = /*#__PURE__*/forwardRef(function (props, ref) {
|
@@ -5327,6 +5327,7 @@ var Index$c = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
5327
5327
|
rowKey = props.rowKey,
|
5328
5328
|
onSwiperChange = props.onSwiperChange,
|
5329
5329
|
renderItem = props.renderItem,
|
5330
|
+
noMove = props.noMove,
|
5330
5331
|
extraProps = _objectWithoutProperties(props, _excluded$f);
|
5331
5332
|
|
5332
5333
|
var _useState = useState(null),
|
@@ -5372,7 +5373,7 @@ var Index$c = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
5372
5373
|
height: '100%'
|
5373
5374
|
},
|
5374
5375
|
onClick: function onClick(event) {
|
5375
|
-
if (controlledSwiper) {
|
5376
|
+
if (controlledSwiper && !noMove) {
|
5376
5377
|
if (controlledSwiper.clickedIndex - slidesPerView > data.length) {
|
5377
5378
|
controlledSwiper.slideNext();
|
5378
5379
|
} else {
|
@@ -7559,22 +7560,32 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7559
7560
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : _actionRef$current6.reload(true);
|
7560
7561
|
};
|
7561
7562
|
|
7563
|
+
var onKeyUpSubmit = function onKeyUpSubmit(values) {
|
7564
|
+
if (values.keyCode === 13) {
|
7565
|
+
var _searchFormRef$curren, _searchFormRef$curren2, _actionRef$current7;
|
7566
|
+
|
7567
|
+
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.handleSubmit) && searchFormConfig.handleSubmit((_searchFormRef$curren = searchFormRef.current) === null || _searchFormRef$curren === void 0 ? void 0 : _searchFormRef$curren.getFormValues());
|
7568
|
+
formSearchRef.current = (_searchFormRef$curren2 = searchFormRef.current) === null || _searchFormRef$curren2 === void 0 ? void 0 : _searchFormRef$curren2.getFormValues();
|
7569
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload(true);
|
7570
|
+
}
|
7571
|
+
};
|
7572
|
+
|
7562
7573
|
var onReset = function onReset(values) {
|
7563
|
-
var _actionRef$
|
7574
|
+
var _actionRef$current8;
|
7564
7575
|
|
7565
7576
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.onReset) && searchFormConfig.onReset();
|
7566
7577
|
formSearchRef.current = _objectSpread2({}, values);
|
7567
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7578
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : _actionRef$current8.reload(true);
|
7568
7579
|
};
|
7569
7580
|
|
7570
7581
|
useEffect(function () {
|
7571
|
-
var _searchFormRef$
|
7582
|
+
var _searchFormRef$curren3, _searchFormRef$curren4;
|
7572
7583
|
|
7573
|
-
if ((_searchFormRef$
|
7574
|
-
var _searchFormRef$
|
7584
|
+
if ((_searchFormRef$curren3 = searchFormRef.current) === null || _searchFormRef$curren3 === void 0 ? void 0 : (_searchFormRef$curren4 = _searchFormRef$curren3.form) === null || _searchFormRef$curren4 === void 0 ? void 0 : _searchFormRef$curren4.getFieldsValue) {
|
7585
|
+
var _searchFormRef$curren5;
|
7575
7586
|
|
7576
7587
|
var obj = // filterObj(searchFormRef.current?.form?.getFieldsValue()) || {};
|
7577
|
-
filterObj((_searchFormRef$
|
7588
|
+
filterObj((_searchFormRef$curren5 = searchFormRef.current) === null || _searchFormRef$curren5 === void 0 ? void 0 : _searchFormRef$curren5.handleSearch(true)) || {};
|
7578
7589
|
(columns || []).filter(function (c) {
|
7579
7590
|
return c.notInitialValueInSearch;
|
7580
7591
|
}).forEach(function (item) {
|
@@ -7720,6 +7731,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7720
7731
|
}),
|
7721
7732
|
onSubmit: onSubmit,
|
7722
7733
|
onReset: onReset,
|
7734
|
+
onKeyUp: onKeyUpSubmit,
|
7723
7735
|
columns: formSearchColumn.reduce(function (pre, column) {
|
7724
7736
|
if (column.type == 'group') {
|
7725
7737
|
return [].concat(_toConsumableArray(pre), _toConsumableArray(column.children));
|
@@ -11484,14 +11496,14 @@ function DhPlayer(_ref, ref) {
|
|
11484
11496
|
|
11485
11497
|
var index$7 = /*#__PURE__*/forwardRef(DhPlayer);
|
11486
11498
|
|
11487
|
-
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "
|
11499
|
+
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
|
11488
11500
|
|
11489
11501
|
var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字展示时长(s)
|
11490
11502
|
|
11491
11503
|
var DEFAULT_LAST_PLAY_TIME_DELAY = 5; // 默认音量大小
|
11492
11504
|
|
11493
11505
|
var DEFAULT_VOLUME = 0.6;
|
11494
|
-
var index$8 =
|
11506
|
+
var index$8 = (function (_ref) {
|
11495
11507
|
var id = _ref.id,
|
11496
11508
|
_ref$videoUrls = _ref.videoUrls,
|
11497
11509
|
videoUrls = _ref$videoUrls === void 0 ? [] : _ref$videoUrls,
|
@@ -11505,8 +11517,8 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11505
11517
|
setParentIndex = _ref.setCurrentIndex,
|
11506
11518
|
className = _ref.className,
|
11507
11519
|
style = _ref.style,
|
11508
|
-
_ref$
|
11509
|
-
|
11520
|
+
_ref$open = _ref.open,
|
11521
|
+
open = _ref$open === void 0 ? true : _ref$open,
|
11510
11522
|
_ref$autoplay = _ref.autoplay,
|
11511
11523
|
autoplay = _ref$autoplay === void 0 ? false : _ref$autoplay,
|
11512
11524
|
_ref$videoInit = _ref.videoInit,
|
@@ -11518,26 +11530,19 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11518
11530
|
props = _objectWithoutProperties(_ref, _excluded$m);
|
11519
11531
|
|
11520
11532
|
var player = useRef();
|
11521
|
-
|
11522
|
-
var _useState = useState(true),
|
11523
|
-
_useState2 = _slicedToArray(_useState, 2),
|
11524
|
-
firstRender = _useState2[0],
|
11525
|
-
setFirstRender = _useState2[1];
|
11526
|
-
|
11527
|
-
var _useState3 = useState(false),
|
11528
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
11529
|
-
ready = _useState4[0],
|
11530
|
-
setReady = _useState4[1];
|
11531
|
-
|
11532
11533
|
var currentPlayerIndex = useRef(0); // 内置的 index 状态管理
|
11533
11534
|
|
11534
|
-
var
|
11535
|
-
|
11536
|
-
videoIndex =
|
11537
|
-
setVideoIndex =
|
11538
|
-
|
11539
|
-
var currentIndex =
|
11540
|
-
|
11535
|
+
var _useState = useState(0),
|
11536
|
+
_useState2 = _slicedToArray(_useState, 2),
|
11537
|
+
videoIndex = _useState2[0],
|
11538
|
+
setVideoIndex = _useState2[1];
|
11539
|
+
|
11540
|
+
var currentIndex = useMemo(function () {
|
11541
|
+
return parentIndex !== null && parentIndex !== void 0 ? parentIndex : videoIndex;
|
11542
|
+
}, [parentIndex, videoIndex]);
|
11543
|
+
var setCurrentIndex = useMemo(function () {
|
11544
|
+
return setParentIndex !== null && setParentIndex !== void 0 ? setParentIndex : setVideoIndex;
|
11545
|
+
}, [setParentIndex, setVideoIndex]);
|
11541
11546
|
var config = useRef(_objectSpread2({
|
11542
11547
|
url: videoUrls[0],
|
11543
11548
|
playbackRate: DEFAULT_PLAY_BACK_RATE,
|
@@ -11551,52 +11556,25 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11551
11556
|
}, props));
|
11552
11557
|
/** 设置当前播放 index */
|
11553
11558
|
|
11554
|
-
var handleSetCurrentIndex = useCallback(function (
|
11555
|
-
var currentIdx = _ref2.currentIdx,
|
11556
|
-
videoUrls = _ref2.videoUrls;
|
11559
|
+
var handleSetCurrentIndex = useCallback(function (currentIdx) {
|
11557
11560
|
var newIdx = currentIdx !== null && currentIdx !== void 0 ? currentIdx : currentPlayerIndex.current + 1;
|
11558
11561
|
|
11559
11562
|
if (newIdx >= videoUrls.length) {
|
11560
|
-
|
11563
|
+
if (isLoop) {
|
11564
|
+
// 允许循环则播放起始视频
|
11565
|
+
newIdx = 0;
|
11566
|
+
} else if (player.current && player.current.video) {
|
11567
|
+
// 不允许循环则进度条快进到最后
|
11568
|
+
player.current.currentTime = player.current.video.duration;
|
11569
|
+
return;
|
11570
|
+
}
|
11561
11571
|
}
|
11562
11572
|
|
11563
11573
|
setCurrentIndex(newIdx);
|
11564
|
-
}, [setCurrentIndex]);
|
11565
|
-
/** 结束事件 */
|
11566
|
-
|
11567
|
-
var onEnd = useCallback(function (isLoop, videoUrls) {
|
11568
|
-
return function () {
|
11569
|
-
// 如果是循环或有其他视频未播放完,继续播放下一个
|
11570
|
-
if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
|
11571
|
-
setTimeout(function () {
|
11572
|
-
var _player$current;
|
11573
|
-
|
11574
|
-
return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
|
11575
|
-
});
|
11576
|
-
}
|
11577
|
-
|
11578
|
-
handleSetCurrentIndex({
|
11579
|
-
videoUrls: videoUrls
|
11580
|
-
});
|
11581
|
-
};
|
11582
|
-
}, [handleSetCurrentIndex]);
|
11583
|
-
/** 点击下一个事件 */
|
11584
|
-
|
11585
|
-
var onPlayNextBtnClick = useCallback(function (videoUrls) {
|
11586
|
-
return function () {
|
11587
|
-
if (player.current) {
|
11588
|
-
// 防止 next 按钮消失
|
11589
|
-
player.current.currentVideoIndex = videoUrls.length - 2;
|
11590
|
-
}
|
11591
|
-
|
11592
|
-
handleSetCurrentIndex({
|
11593
|
-
videoUrls: videoUrls
|
11594
|
-
});
|
11595
|
-
};
|
11596
|
-
}, [handleSetCurrentIndex]);
|
11574
|
+
}, [isLoop, setCurrentIndex, videoUrls.length]);
|
11597
11575
|
/** 播放下一个 */
|
11598
11576
|
|
11599
|
-
var handlePlayNext = useCallback(function (currentIdx
|
11577
|
+
var handlePlayNext = useCallback(function (currentIdx) {
|
11600
11578
|
if (!player.current) {
|
11601
11579
|
return;
|
11602
11580
|
}
|
@@ -11610,7 +11588,7 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11610
11588
|
// 防止 next 按钮消失
|
11611
11589
|
player.current.currentVideoIndex = -videoUrls.length;
|
11612
11590
|
}
|
11613
|
-
}, [videoUrls]);
|
11591
|
+
}, [videoUrls, isLoop]);
|
11614
11592
|
/** 重置视频 */
|
11615
11593
|
|
11616
11594
|
var handleReset = useCallback(function () {
|
@@ -11626,47 +11604,47 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11626
11604
|
/** 弹窗中的视频关闭以后重置 */
|
11627
11605
|
|
11628
11606
|
useEffect(function () {
|
11629
|
-
if (!
|
11607
|
+
if (!open) {
|
11630
11608
|
handleReset();
|
11631
11609
|
}
|
11632
|
-
}, [handleReset,
|
11610
|
+
}, [handleReset, open]);
|
11633
11611
|
/** 当 currentIndex 改变以后自动播放下一个 */
|
11634
11612
|
|
11635
11613
|
useEffect(function () {
|
11636
|
-
if (!player.current || !
|
11614
|
+
if (!player.current || !open) {
|
11637
11615
|
return;
|
11638
11616
|
}
|
11639
11617
|
|
11640
|
-
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current
|
11641
|
-
}, [currentIndex, handlePlayNext,
|
11618
|
+
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current);
|
11619
|
+
}, [currentIndex, handlePlayNext, open]);
|
11642
11620
|
/** 播放器初始化并绑定事件 */
|
11643
11621
|
|
11644
11622
|
useEffect(function () {
|
11645
|
-
|
11646
|
-
|
11647
|
-
if (!visible || isEmpty(videoUrls) || player.current) {
|
11623
|
+
if (!open || isEmpty(videoUrls) || player.current) {
|
11648
11624
|
return;
|
11649
11625
|
}
|
11650
11626
|
|
11651
|
-
|
11652
|
-
|
11653
|
-
|
11654
|
-
|
11655
|
-
|
11656
|
-
|
11627
|
+
player.current = new Player(config.current);
|
11628
|
+
player.current.currentVideoIndex = -videoUrls.length;
|
11629
|
+
player.current.on('ended', function () {
|
11630
|
+
// 如果是循环或有其他视频未播放完,继续播放下一个
|
11631
|
+
if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
|
11632
|
+
handleSetCurrentIndex();
|
11633
|
+
setTimeout(function () {
|
11634
|
+
var _player$current;
|
11657
11635
|
|
11658
|
-
|
11659
|
-
|
11636
|
+
return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
|
11637
|
+
});
|
11638
|
+
} else {
|
11639
|
+
var _player$current2;
|
11660
11640
|
|
11661
|
-
|
11662
|
-
|
11663
|
-
|
11641
|
+
(_player$current2 = player.current) === null || _player$current2 === void 0 ? void 0 : _player$current2.pause();
|
11642
|
+
}
|
11643
|
+
}); // 播放记忆缓存
|
11664
11644
|
|
11665
11645
|
if (enableMemory) {
|
11666
|
-
var _player$current2;
|
11667
|
-
|
11668
11646
|
var videoPlayedTimeObj = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}');
|
11669
|
-
|
11647
|
+
player.current.on('timeupdate', function () {
|
11670
11648
|
var _player$current3;
|
11671
11649
|
|
11672
11650
|
if (currentPlayerIndex.current === -1) {
|
@@ -11680,23 +11658,27 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11680
11658
|
});
|
11681
11659
|
}
|
11682
11660
|
|
11683
|
-
|
11684
|
-
|
11661
|
+
player.current.on('playNextBtnClick', function () {
|
11662
|
+
if (!isLoop && player.current) {
|
11663
|
+
// 防止 next 按钮消失
|
11664
|
+
player.current.currentVideoIndex = videoUrls.length - 2;
|
11665
|
+
}
|
11666
|
+
|
11667
|
+
handleSetCurrentIndex();
|
11668
|
+
});
|
11669
|
+
}, [autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, open]);
|
11685
11670
|
/** 读取缓存的播放记忆并跳转 */
|
11686
11671
|
|
11687
11672
|
useEffect(function () {
|
11688
|
-
if (enableMemory &&
|
11673
|
+
if (enableMemory && open) {
|
11689
11674
|
var _JSON$parse;
|
11690
11675
|
|
11691
|
-
var
|
11692
|
-
lastPlayTime =
|
11693
|
-
_videoIndex =
|
11676
|
+
var _ref2 = ((_JSON$parse = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[id]) || {},
|
11677
|
+
lastPlayTime = _ref2.lastPlayTime,
|
11678
|
+
_videoIndex = _ref2.videoIndex;
|
11694
11679
|
|
11695
11680
|
setTimeout(function () {
|
11696
|
-
handleSetCurrentIndex(
|
11697
|
-
currentIdx: _videoIndex,
|
11698
|
-
videoUrls: videoUrls
|
11699
|
-
});
|
11681
|
+
handleSetCurrentIndex(_videoIndex);
|
11700
11682
|
setTimeout(function () {
|
11701
11683
|
if (player.current) {
|
11702
11684
|
player.current.currentTime = lastPlayTime;
|
@@ -11704,7 +11686,7 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11704
11686
|
});
|
11705
11687
|
});
|
11706
11688
|
}
|
11707
|
-
}, [
|
11689
|
+
}, [open, enableMemory, handleSetCurrentIndex, id]);
|
11708
11690
|
/** 加载清晰度配置 */
|
11709
11691
|
|
11710
11692
|
useEffect(function () {
|
@@ -11712,23 +11694,10 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11712
11694
|
player.current.emit('resourceReady', definitionList[currentIndex]);
|
11713
11695
|
}
|
11714
11696
|
}, [currentIndex, definitionList]);
|
11715
|
-
|
11716
|
-
|
11717
|
-
|
11718
|
-
if (firstRender) {
|
11719
|
-
return;
|
11720
|
-
}
|
11721
|
-
|
11722
|
-
(_player$current5 = player.current) === null || _player$current5 === void 0 ? void 0 : _player$current5.off('ended', onEnd(isLoop, videoUrls));
|
11723
|
-
(_player$current6 = player.current) === null || _player$current6 === void 0 ? void 0 : _player$current6.off('playNextBtnClick', onPlayNextBtnClick(videoUrls));
|
11724
|
-
(_player$current7 = player.current) === null || _player$current7 === void 0 ? void 0 : _player$current7.destroy();
|
11725
|
-
player.current = undefined;
|
11726
|
-
setReady(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
11727
|
-
}, [muted, isLoop, videoUrls, autoplay, videoInit, onEnd, onPlayNextBtnClick]);
|
11728
|
-
var getRef = useCallback(function (r) {
|
11729
|
-
if (r && visible) {
|
11697
|
+
var getRef = useCallback(function (ref) {
|
11698
|
+
if (ref && open) {
|
11730
11699
|
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
11731
|
-
el:
|
11700
|
+
el: ref,
|
11732
11701
|
url: videoUrls[0],
|
11733
11702
|
playNext: {
|
11734
11703
|
urlList: videoUrls.slice(1)
|
@@ -11738,8 +11707,8 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11738
11707
|
if (enableMemory) {
|
11739
11708
|
var _JSON$parse2;
|
11740
11709
|
|
11741
|
-
var
|
11742
|
-
lastPlayTime =
|
11710
|
+
var _ref3 = ((_JSON$parse2 = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2[id]) || {},
|
11711
|
+
lastPlayTime = _ref3.lastPlayTime;
|
11743
11712
|
|
11744
11713
|
Object.assign(newConfig, {
|
11745
11714
|
lastPlayTime: lastPlayTime,
|
@@ -11749,15 +11718,7 @@ var index$8 = /*#__PURE__*/forwardRef(function (_ref, playerRef) {
|
|
11749
11718
|
|
11750
11719
|
config.current = newConfig;
|
11751
11720
|
}
|
11752
|
-
|
11753
|
-
if (playerRef) {
|
11754
|
-
if (typeof playerRef === 'function') {
|
11755
|
-
playerRef(player.current);
|
11756
|
-
} else {
|
11757
|
-
playerRef.current = player.current;
|
11758
|
-
}
|
11759
|
-
}
|
11760
|
-
}, [visible, playerRef, videoUrls, enableMemory, id, lastPlayTimeHideDelay]);
|
11721
|
+
}, [open, id, videoUrls, lastPlayTimeHideDelay, enableMemory]);
|
11761
11722
|
return /*#__PURE__*/React.createElement("div", {
|
11762
11723
|
className: className,
|
11763
11724
|
ref: getRef,
|
package/dist/index.js
CHANGED
@@ -5360,7 +5360,7 @@ var Index$b = function Index(_ref) {
|
|
5360
5360
|
}, none || '暂无数据');
|
5361
5361
|
};
|
5362
5362
|
|
5363
|
-
var _excluded$f = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
|
5363
|
+
var _excluded$f = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
|
5364
5364
|
|
5365
5365
|
SwiperCore__default['default'].use([SwiperCore.Pagination, SwiperCore.Navigation, SwiperCore.Autoplay, SwiperCore.Virtual]);
|
5366
5366
|
var Index$c = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
@@ -5371,6 +5371,7 @@ var Index$c = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5371
5371
|
rowKey = props.rowKey,
|
5372
5372
|
onSwiperChange = props.onSwiperChange,
|
5373
5373
|
renderItem = props.renderItem,
|
5374
|
+
noMove = props.noMove,
|
5374
5375
|
extraProps = _objectWithoutProperties(props, _excluded$f);
|
5375
5376
|
|
5376
5377
|
var _useState = React.useState(null),
|
@@ -5416,7 +5417,7 @@ var Index$c = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5416
5417
|
height: '100%'
|
5417
5418
|
},
|
5418
5419
|
onClick: function onClick(event) {
|
5419
|
-
if (controlledSwiper) {
|
5420
|
+
if (controlledSwiper && !noMove) {
|
5420
5421
|
if (controlledSwiper.clickedIndex - slidesPerView > data.length) {
|
5421
5422
|
controlledSwiper.slideNext();
|
5422
5423
|
} else {
|
@@ -7603,22 +7604,32 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7603
7604
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : _actionRef$current6.reload(true);
|
7604
7605
|
};
|
7605
7606
|
|
7607
|
+
var onKeyUpSubmit = function onKeyUpSubmit(values) {
|
7608
|
+
if (values.keyCode === 13) {
|
7609
|
+
var _searchFormRef$curren, _searchFormRef$curren2, _actionRef$current7;
|
7610
|
+
|
7611
|
+
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.handleSubmit) && searchFormConfig.handleSubmit((_searchFormRef$curren = searchFormRef.current) === null || _searchFormRef$curren === void 0 ? void 0 : _searchFormRef$curren.getFormValues());
|
7612
|
+
formSearchRef.current = (_searchFormRef$curren2 = searchFormRef.current) === null || _searchFormRef$curren2 === void 0 ? void 0 : _searchFormRef$curren2.getFormValues();
|
7613
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload(true);
|
7614
|
+
}
|
7615
|
+
};
|
7616
|
+
|
7606
7617
|
var onReset = function onReset(values) {
|
7607
|
-
var _actionRef$
|
7618
|
+
var _actionRef$current8;
|
7608
7619
|
|
7609
7620
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.onReset) && searchFormConfig.onReset();
|
7610
7621
|
formSearchRef.current = _objectSpread2({}, values);
|
7611
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7622
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : _actionRef$current8.reload(true);
|
7612
7623
|
};
|
7613
7624
|
|
7614
7625
|
React.useEffect(function () {
|
7615
|
-
var _searchFormRef$
|
7626
|
+
var _searchFormRef$curren3, _searchFormRef$curren4;
|
7616
7627
|
|
7617
|
-
if ((_searchFormRef$
|
7618
|
-
var _searchFormRef$
|
7628
|
+
if ((_searchFormRef$curren3 = searchFormRef.current) === null || _searchFormRef$curren3 === void 0 ? void 0 : (_searchFormRef$curren4 = _searchFormRef$curren3.form) === null || _searchFormRef$curren4 === void 0 ? void 0 : _searchFormRef$curren4.getFieldsValue) {
|
7629
|
+
var _searchFormRef$curren5;
|
7619
7630
|
|
7620
7631
|
var obj = // filterObj(searchFormRef.current?.form?.getFieldsValue()) || {};
|
7621
|
-
filterObj((_searchFormRef$
|
7632
|
+
filterObj((_searchFormRef$curren5 = searchFormRef.current) === null || _searchFormRef$curren5 === void 0 ? void 0 : _searchFormRef$curren5.handleSearch(true)) || {};
|
7622
7633
|
(columns || []).filter(function (c) {
|
7623
7634
|
return c.notInitialValueInSearch;
|
7624
7635
|
}).forEach(function (item) {
|
@@ -7764,6 +7775,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7764
7775
|
}),
|
7765
7776
|
onSubmit: onSubmit,
|
7766
7777
|
onReset: onReset,
|
7778
|
+
onKeyUp: onKeyUpSubmit,
|
7767
7779
|
columns: formSearchColumn.reduce(function (pre, column) {
|
7768
7780
|
if (column.type == 'group') {
|
7769
7781
|
return [].concat(_toConsumableArray(pre), _toConsumableArray(column.children));
|
@@ -11528,14 +11540,14 @@ function DhPlayer(_ref, ref) {
|
|
11528
11540
|
|
11529
11541
|
var index$7 = /*#__PURE__*/React.forwardRef(DhPlayer);
|
11530
11542
|
|
11531
|
-
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "
|
11543
|
+
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
|
11532
11544
|
|
11533
11545
|
var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字展示时长(s)
|
11534
11546
|
|
11535
11547
|
var DEFAULT_LAST_PLAY_TIME_DELAY = 5; // 默认音量大小
|
11536
11548
|
|
11537
11549
|
var DEFAULT_VOLUME = 0.6;
|
11538
|
-
var index$8 =
|
11550
|
+
var index$8 = (function (_ref) {
|
11539
11551
|
var id = _ref.id,
|
11540
11552
|
_ref$videoUrls = _ref.videoUrls,
|
11541
11553
|
videoUrls = _ref$videoUrls === void 0 ? [] : _ref$videoUrls,
|
@@ -11549,8 +11561,8 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11549
11561
|
setParentIndex = _ref.setCurrentIndex,
|
11550
11562
|
className = _ref.className,
|
11551
11563
|
style = _ref.style,
|
11552
|
-
_ref$
|
11553
|
-
|
11564
|
+
_ref$open = _ref.open,
|
11565
|
+
open = _ref$open === void 0 ? true : _ref$open,
|
11554
11566
|
_ref$autoplay = _ref.autoplay,
|
11555
11567
|
autoplay = _ref$autoplay === void 0 ? false : _ref$autoplay,
|
11556
11568
|
_ref$videoInit = _ref.videoInit,
|
@@ -11562,26 +11574,19 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11562
11574
|
props = _objectWithoutProperties(_ref, _excluded$m);
|
11563
11575
|
|
11564
11576
|
var player = React.useRef();
|
11565
|
-
|
11566
|
-
var _useState = React.useState(true),
|
11567
|
-
_useState2 = _slicedToArray(_useState, 2),
|
11568
|
-
firstRender = _useState2[0],
|
11569
|
-
setFirstRender = _useState2[1];
|
11570
|
-
|
11571
|
-
var _useState3 = React.useState(false),
|
11572
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
11573
|
-
ready = _useState4[0],
|
11574
|
-
setReady = _useState4[1];
|
11575
|
-
|
11576
11577
|
var currentPlayerIndex = React.useRef(0); // 内置的 index 状态管理
|
11577
11578
|
|
11578
|
-
var
|
11579
|
-
|
11580
|
-
videoIndex =
|
11581
|
-
setVideoIndex =
|
11582
|
-
|
11583
|
-
var currentIndex =
|
11584
|
-
|
11579
|
+
var _useState = React.useState(0),
|
11580
|
+
_useState2 = _slicedToArray(_useState, 2),
|
11581
|
+
videoIndex = _useState2[0],
|
11582
|
+
setVideoIndex = _useState2[1];
|
11583
|
+
|
11584
|
+
var currentIndex = React.useMemo(function () {
|
11585
|
+
return parentIndex !== null && parentIndex !== void 0 ? parentIndex : videoIndex;
|
11586
|
+
}, [parentIndex, videoIndex]);
|
11587
|
+
var setCurrentIndex = React.useMemo(function () {
|
11588
|
+
return setParentIndex !== null && setParentIndex !== void 0 ? setParentIndex : setVideoIndex;
|
11589
|
+
}, [setParentIndex, setVideoIndex]);
|
11585
11590
|
var config = React.useRef(_objectSpread2({
|
11586
11591
|
url: videoUrls[0],
|
11587
11592
|
playbackRate: DEFAULT_PLAY_BACK_RATE,
|
@@ -11595,52 +11600,25 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11595
11600
|
}, props));
|
11596
11601
|
/** 设置当前播放 index */
|
11597
11602
|
|
11598
|
-
var handleSetCurrentIndex = React.useCallback(function (
|
11599
|
-
var currentIdx = _ref2.currentIdx,
|
11600
|
-
videoUrls = _ref2.videoUrls;
|
11603
|
+
var handleSetCurrentIndex = React.useCallback(function (currentIdx) {
|
11601
11604
|
var newIdx = currentIdx !== null && currentIdx !== void 0 ? currentIdx : currentPlayerIndex.current + 1;
|
11602
11605
|
|
11603
11606
|
if (newIdx >= videoUrls.length) {
|
11604
|
-
|
11607
|
+
if (isLoop) {
|
11608
|
+
// 允许循环则播放起始视频
|
11609
|
+
newIdx = 0;
|
11610
|
+
} else if (player.current && player.current.video) {
|
11611
|
+
// 不允许循环则进度条快进到最后
|
11612
|
+
player.current.currentTime = player.current.video.duration;
|
11613
|
+
return;
|
11614
|
+
}
|
11605
11615
|
}
|
11606
11616
|
|
11607
11617
|
setCurrentIndex(newIdx);
|
11608
|
-
}, [setCurrentIndex]);
|
11609
|
-
/** 结束事件 */
|
11610
|
-
|
11611
|
-
var onEnd = React.useCallback(function (isLoop, videoUrls) {
|
11612
|
-
return function () {
|
11613
|
-
// 如果是循环或有其他视频未播放完,继续播放下一个
|
11614
|
-
if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
|
11615
|
-
setTimeout(function () {
|
11616
|
-
var _player$current;
|
11617
|
-
|
11618
|
-
return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
|
11619
|
-
});
|
11620
|
-
}
|
11621
|
-
|
11622
|
-
handleSetCurrentIndex({
|
11623
|
-
videoUrls: videoUrls
|
11624
|
-
});
|
11625
|
-
};
|
11626
|
-
}, [handleSetCurrentIndex]);
|
11627
|
-
/** 点击下一个事件 */
|
11628
|
-
|
11629
|
-
var onPlayNextBtnClick = React.useCallback(function (videoUrls) {
|
11630
|
-
return function () {
|
11631
|
-
if (player.current) {
|
11632
|
-
// 防止 next 按钮消失
|
11633
|
-
player.current.currentVideoIndex = videoUrls.length - 2;
|
11634
|
-
}
|
11635
|
-
|
11636
|
-
handleSetCurrentIndex({
|
11637
|
-
videoUrls: videoUrls
|
11638
|
-
});
|
11639
|
-
};
|
11640
|
-
}, [handleSetCurrentIndex]);
|
11618
|
+
}, [isLoop, setCurrentIndex, videoUrls.length]);
|
11641
11619
|
/** 播放下一个 */
|
11642
11620
|
|
11643
|
-
var handlePlayNext = React.useCallback(function (currentIdx
|
11621
|
+
var handlePlayNext = React.useCallback(function (currentIdx) {
|
11644
11622
|
if (!player.current) {
|
11645
11623
|
return;
|
11646
11624
|
}
|
@@ -11654,7 +11632,7 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11654
11632
|
// 防止 next 按钮消失
|
11655
11633
|
player.current.currentVideoIndex = -videoUrls.length;
|
11656
11634
|
}
|
11657
|
-
}, [videoUrls]);
|
11635
|
+
}, [videoUrls, isLoop]);
|
11658
11636
|
/** 重置视频 */
|
11659
11637
|
|
11660
11638
|
var handleReset = React.useCallback(function () {
|
@@ -11670,47 +11648,47 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11670
11648
|
/** 弹窗中的视频关闭以后重置 */
|
11671
11649
|
|
11672
11650
|
React.useEffect(function () {
|
11673
|
-
if (!
|
11651
|
+
if (!open) {
|
11674
11652
|
handleReset();
|
11675
11653
|
}
|
11676
|
-
}, [handleReset,
|
11654
|
+
}, [handleReset, open]);
|
11677
11655
|
/** 当 currentIndex 改变以后自动播放下一个 */
|
11678
11656
|
|
11679
11657
|
React.useEffect(function () {
|
11680
|
-
if (!player.current || !
|
11658
|
+
if (!player.current || !open) {
|
11681
11659
|
return;
|
11682
11660
|
}
|
11683
11661
|
|
11684
|
-
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current
|
11685
|
-
}, [currentIndex, handlePlayNext,
|
11662
|
+
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current);
|
11663
|
+
}, [currentIndex, handlePlayNext, open]);
|
11686
11664
|
/** 播放器初始化并绑定事件 */
|
11687
11665
|
|
11688
11666
|
React.useEffect(function () {
|
11689
|
-
|
11690
|
-
|
11691
|
-
if (!visible || lodashEs.isEmpty(videoUrls) || player.current) {
|
11667
|
+
if (!open || lodashEs.isEmpty(videoUrls) || player.current) {
|
11692
11668
|
return;
|
11693
11669
|
}
|
11694
11670
|
|
11695
|
-
|
11696
|
-
|
11697
|
-
|
11698
|
-
|
11699
|
-
|
11700
|
-
|
11671
|
+
player.current = new Player__default['default'](config.current);
|
11672
|
+
player.current.currentVideoIndex = -videoUrls.length;
|
11673
|
+
player.current.on('ended', function () {
|
11674
|
+
// 如果是循环或有其他视频未播放完,继续播放下一个
|
11675
|
+
if (isLoop || !isLoop && currentPlayerIndex.current < videoUrls.length - 1) {
|
11676
|
+
handleSetCurrentIndex();
|
11677
|
+
setTimeout(function () {
|
11678
|
+
var _player$current;
|
11701
11679
|
|
11702
|
-
|
11703
|
-
|
11680
|
+
return (_player$current = player.current) === null || _player$current === void 0 ? void 0 : _player$current.play();
|
11681
|
+
});
|
11682
|
+
} else {
|
11683
|
+
var _player$current2;
|
11704
11684
|
|
11705
|
-
|
11706
|
-
|
11707
|
-
|
11685
|
+
(_player$current2 = player.current) === null || _player$current2 === void 0 ? void 0 : _player$current2.pause();
|
11686
|
+
}
|
11687
|
+
}); // 播放记忆缓存
|
11708
11688
|
|
11709
11689
|
if (enableMemory) {
|
11710
|
-
var _player$current2;
|
11711
|
-
|
11712
11690
|
var videoPlayedTimeObj = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}');
|
11713
|
-
|
11691
|
+
player.current.on('timeupdate', function () {
|
11714
11692
|
var _player$current3;
|
11715
11693
|
|
11716
11694
|
if (currentPlayerIndex.current === -1) {
|
@@ -11724,23 +11702,27 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11724
11702
|
});
|
11725
11703
|
}
|
11726
11704
|
|
11727
|
-
|
11728
|
-
|
11705
|
+
player.current.on('playNextBtnClick', function () {
|
11706
|
+
if (!isLoop && player.current) {
|
11707
|
+
// 防止 next 按钮消失
|
11708
|
+
player.current.currentVideoIndex = videoUrls.length - 2;
|
11709
|
+
}
|
11710
|
+
|
11711
|
+
handleSetCurrentIndex();
|
11712
|
+
});
|
11713
|
+
}, [autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, open]);
|
11729
11714
|
/** 读取缓存的播放记忆并跳转 */
|
11730
11715
|
|
11731
11716
|
React.useEffect(function () {
|
11732
|
-
if (enableMemory &&
|
11717
|
+
if (enableMemory && open) {
|
11733
11718
|
var _JSON$parse;
|
11734
11719
|
|
11735
|
-
var
|
11736
|
-
lastPlayTime =
|
11737
|
-
_videoIndex =
|
11720
|
+
var _ref2 = ((_JSON$parse = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[id]) || {},
|
11721
|
+
lastPlayTime = _ref2.lastPlayTime,
|
11722
|
+
_videoIndex = _ref2.videoIndex;
|
11738
11723
|
|
11739
11724
|
setTimeout(function () {
|
11740
|
-
handleSetCurrentIndex(
|
11741
|
-
currentIdx: _videoIndex,
|
11742
|
-
videoUrls: videoUrls
|
11743
|
-
});
|
11725
|
+
handleSetCurrentIndex(_videoIndex);
|
11744
11726
|
setTimeout(function () {
|
11745
11727
|
if (player.current) {
|
11746
11728
|
player.current.currentTime = lastPlayTime;
|
@@ -11748,7 +11730,7 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11748
11730
|
});
|
11749
11731
|
});
|
11750
11732
|
}
|
11751
|
-
}, [
|
11733
|
+
}, [open, enableMemory, handleSetCurrentIndex, id]);
|
11752
11734
|
/** 加载清晰度配置 */
|
11753
11735
|
|
11754
11736
|
React.useEffect(function () {
|
@@ -11756,23 +11738,10 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11756
11738
|
player.current.emit('resourceReady', definitionList[currentIndex]);
|
11757
11739
|
}
|
11758
11740
|
}, [currentIndex, definitionList]);
|
11759
|
-
React.
|
11760
|
-
|
11761
|
-
|
11762
|
-
if (firstRender) {
|
11763
|
-
return;
|
11764
|
-
}
|
11765
|
-
|
11766
|
-
(_player$current5 = player.current) === null || _player$current5 === void 0 ? void 0 : _player$current5.off('ended', onEnd(isLoop, videoUrls));
|
11767
|
-
(_player$current6 = player.current) === null || _player$current6 === void 0 ? void 0 : _player$current6.off('playNextBtnClick', onPlayNextBtnClick(videoUrls));
|
11768
|
-
(_player$current7 = player.current) === null || _player$current7 === void 0 ? void 0 : _player$current7.destroy();
|
11769
|
-
player.current = undefined;
|
11770
|
-
setReady(true); // eslint-disable-next-line react-hooks/exhaustive-deps
|
11771
|
-
}, [muted, isLoop, videoUrls, autoplay, videoInit, onEnd, onPlayNextBtnClick]);
|
11772
|
-
var getRef = React.useCallback(function (r) {
|
11773
|
-
if (r && visible) {
|
11741
|
+
var getRef = React.useCallback(function (ref) {
|
11742
|
+
if (ref && open) {
|
11774
11743
|
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
11775
|
-
el:
|
11744
|
+
el: ref,
|
11776
11745
|
url: videoUrls[0],
|
11777
11746
|
playNext: {
|
11778
11747
|
urlList: videoUrls.slice(1)
|
@@ -11782,8 +11751,8 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11782
11751
|
if (enableMemory) {
|
11783
11752
|
var _JSON$parse2;
|
11784
11753
|
|
11785
|
-
var
|
11786
|
-
lastPlayTime =
|
11754
|
+
var _ref3 = ((_JSON$parse2 = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2[id]) || {},
|
11755
|
+
lastPlayTime = _ref3.lastPlayTime;
|
11787
11756
|
|
11788
11757
|
Object.assign(newConfig, {
|
11789
11758
|
lastPlayTime: lastPlayTime,
|
@@ -11793,15 +11762,7 @@ var index$8 = /*#__PURE__*/React.forwardRef(function (_ref, playerRef) {
|
|
11793
11762
|
|
11794
11763
|
config.current = newConfig;
|
11795
11764
|
}
|
11796
|
-
|
11797
|
-
if (playerRef) {
|
11798
|
-
if (typeof playerRef === 'function') {
|
11799
|
-
playerRef(player.current);
|
11800
|
-
} else {
|
11801
|
-
playerRef.current = player.current;
|
11802
|
-
}
|
11803
|
-
}
|
11804
|
-
}, [visible, playerRef, videoUrls, enableMemory, id, lastPlayTimeHideDelay]);
|
11765
|
+
}, [open, id, videoUrls, lastPlayTimeHideDelay, enableMemory]);
|
11805
11766
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
11806
11767
|
className: className,
|
11807
11768
|
ref: getRef,
|
package/package.json
CHANGED
@@ -1,93 +1,93 @@
|
|
1
|
-
{
|
2
|
-
"private": false,
|
3
|
-
"name": "wargerm",
|
4
|
-
"version": "0.7.
|
5
|
-
"scripts": {
|
6
|
-
"dev": "dumi dev",
|
7
|
-
"docs:build": "dumi build",
|
8
|
-
"docs:deploy": "gh-pages -d docs-dist",
|
9
|
-
"build": "father-build",
|
10
|
-
"deploy": "npm run docs:build && npm run docs:deploy",
|
11
|
-
"release": "npm run build && npm publish",
|
12
|
-
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
13
|
-
"test": "umi-test",
|
14
|
-
"test:coverage": "umi-test --coverage"
|
15
|
-
},
|
16
|
-
"main": "dist/index.js",
|
17
|
-
"module": "dist/index.esm.js",
|
18
|
-
"unpkg": "dist/index.umd.min.js",
|
19
|
-
"typings": "dist/index.d.ts",
|
20
|
-
"author": "jinly2",
|
21
|
-
"license": "MIT",
|
22
|
-
"keywords": [
|
23
|
-
"React",
|
24
|
-
"Component"
|
25
|
-
],
|
26
|
-
"gitHooks": {
|
27
|
-
"pre-commit": "lint-staged"
|
28
|
-
},
|
29
|
-
"repository": {
|
30
|
-
"type": "git",
|
31
|
-
"url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
|
32
|
-
"branch": "main"
|
33
|
-
},
|
34
|
-
"files": [
|
35
|
-
"dist",
|
36
|
-
"es",
|
37
|
-
"lib",
|
38
|
-
"index.css"
|
39
|
-
],
|
40
|
-
"lint-staged": {
|
41
|
-
"*.{js,jsx,less,md,json}": [
|
42
|
-
"prettier --write"
|
43
|
-
],
|
44
|
-
"*.ts?(x)": [
|
45
|
-
"prettier --parser=typescript --write"
|
46
|
-
]
|
47
|
-
},
|
48
|
-
"dependencies": {
|
49
|
-
"@ant-design/pro-table": "^3.3.1",
|
50
|
-
"animate.css": "^4.1.1",
|
51
|
-
"dayjs": "^1.11.7",
|
52
|
-
"echarts": "^5.2.2",
|
53
|
-
"echarts-for-react": "^3.0.2",
|
54
|
-
"lodash-es": "^4.17.21",
|
55
|
-
"react-countup": "^6.0.0",
|
56
|
-
"react-dom": "^17.0.2",
|
57
|
-
"react-file-viewer": "^1.2.1",
|
58
|
-
"swiper": "^6.7.0",
|
59
|
-
"use-sync-external-store": "^1.2.0",
|
60
|
-
"xgplayer": "^2.31.6",
|
61
|
-
"xgplayer-flv": "^2.5.1",
|
62
|
-
"xgplayer-flv.js": "^2.3.0",
|
63
|
-
"xgplayer-hls": "^2.5.2",
|
64
|
-
"xgplayer-hls.js": "^2.6.1"
|
65
|
-
},
|
66
|
-
"peerDependencies": {
|
67
|
-
"@ant-design/icons": ">=4.2.0",
|
68
|
-
"antd": ">=4.7.0",
|
69
|
-
"classnames": ">=2.2.0",
|
70
|
-
"echarts": "^5.2.2",
|
71
|
-
"echarts-for-react": "^3.0.2",
|
72
|
-
"lodash-es": ">=4.17.21",
|
73
|
-
"react": ">=17.0.0"
|
74
|
-
},
|
75
|
-
"devDependencies": {
|
76
|
-
"@ant-design/icons": "^4.6.4",
|
77
|
-
"@types/lodash-es": "^4.17.6",
|
78
|
-
"@types/react-dom": "^17.0.11",
|
79
|
-
"@types/use-sync-external-store": "^0.0.3",
|
80
|
-
"@umijs/test": "^3.0.5",
|
81
|
-
"antd": "^5.2.2",
|
82
|
-
"classnames": "^2.3.1",
|
83
|
-
"dumi": "^1.1.31",
|
84
|
-
"father-build": "^1.19.1",
|
85
|
-
"gh-pages": "^3.0.0",
|
86
|
-
"lint-staged": "^10.0.7",
|
87
|
-
"prettier": "^1.19.1",
|
88
|
-
"react": "^16.12.0",
|
89
|
-
"react-dnd": "^16.0.1",
|
90
|
-
"react-dnd-html5-backend": "^16.0.1",
|
91
|
-
"yorkie": "^2.0.0"
|
92
|
-
}
|
1
|
+
{
|
2
|
+
"private": false,
|
3
|
+
"name": "wargerm",
|
4
|
+
"version": "0.7.32",
|
5
|
+
"scripts": {
|
6
|
+
"dev": "dumi dev",
|
7
|
+
"docs:build": "dumi build",
|
8
|
+
"docs:deploy": "gh-pages -d docs-dist",
|
9
|
+
"build": "father-build",
|
10
|
+
"deploy": "npm run docs:build && npm run docs:deploy",
|
11
|
+
"release": "npm run build && npm publish",
|
12
|
+
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
13
|
+
"test": "umi-test",
|
14
|
+
"test:coverage": "umi-test --coverage"
|
15
|
+
},
|
16
|
+
"main": "dist/index.js",
|
17
|
+
"module": "dist/index.esm.js",
|
18
|
+
"unpkg": "dist/index.umd.min.js",
|
19
|
+
"typings": "dist/index.d.ts",
|
20
|
+
"author": "jinly2",
|
21
|
+
"license": "MIT",
|
22
|
+
"keywords": [
|
23
|
+
"React",
|
24
|
+
"Component"
|
25
|
+
],
|
26
|
+
"gitHooks": {
|
27
|
+
"pre-commit": "lint-staged"
|
28
|
+
},
|
29
|
+
"repository": {
|
30
|
+
"type": "git",
|
31
|
+
"url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
|
32
|
+
"branch": "main"
|
33
|
+
},
|
34
|
+
"files": [
|
35
|
+
"dist",
|
36
|
+
"es",
|
37
|
+
"lib",
|
38
|
+
"index.css"
|
39
|
+
],
|
40
|
+
"lint-staged": {
|
41
|
+
"*.{js,jsx,less,md,json}": [
|
42
|
+
"prettier --write"
|
43
|
+
],
|
44
|
+
"*.ts?(x)": [
|
45
|
+
"prettier --parser=typescript --write"
|
46
|
+
]
|
47
|
+
},
|
48
|
+
"dependencies": {
|
49
|
+
"@ant-design/pro-table": "^3.3.1",
|
50
|
+
"animate.css": "^4.1.1",
|
51
|
+
"dayjs": "^1.11.7",
|
52
|
+
"echarts": "^5.2.2",
|
53
|
+
"echarts-for-react": "^3.0.2",
|
54
|
+
"lodash-es": "^4.17.21",
|
55
|
+
"react-countup": "^6.0.0",
|
56
|
+
"react-dom": "^17.0.2",
|
57
|
+
"react-file-viewer": "^1.2.1",
|
58
|
+
"swiper": "^6.7.0",
|
59
|
+
"use-sync-external-store": "^1.2.0",
|
60
|
+
"xgplayer": "^2.31.6",
|
61
|
+
"xgplayer-flv": "^2.5.1",
|
62
|
+
"xgplayer-flv.js": "^2.3.0",
|
63
|
+
"xgplayer-hls": "^2.5.2",
|
64
|
+
"xgplayer-hls.js": "^2.6.1"
|
65
|
+
},
|
66
|
+
"peerDependencies": {
|
67
|
+
"@ant-design/icons": ">=4.2.0",
|
68
|
+
"antd": ">=4.7.0",
|
69
|
+
"classnames": ">=2.2.0",
|
70
|
+
"echarts": "^5.2.2",
|
71
|
+
"echarts-for-react": "^3.0.2",
|
72
|
+
"lodash-es": ">=4.17.21",
|
73
|
+
"react": ">=17.0.0"
|
74
|
+
},
|
75
|
+
"devDependencies": {
|
76
|
+
"@ant-design/icons": "^4.6.4",
|
77
|
+
"@types/lodash-es": "^4.17.6",
|
78
|
+
"@types/react-dom": "^17.0.11",
|
79
|
+
"@types/use-sync-external-store": "^0.0.3",
|
80
|
+
"@umijs/test": "^3.0.5",
|
81
|
+
"antd": "^5.2.2",
|
82
|
+
"classnames": "^2.3.1",
|
83
|
+
"dumi": "^1.1.31",
|
84
|
+
"father-build": "^1.19.1",
|
85
|
+
"gh-pages": "^3.0.0",
|
86
|
+
"lint-staged": "^10.0.7",
|
87
|
+
"prettier": "^1.19.1",
|
88
|
+
"react": "^16.12.0",
|
89
|
+
"react-dnd": "^16.0.1",
|
90
|
+
"react-dnd-html5-backend": "^16.0.1",
|
91
|
+
"yorkie": "^2.0.0"
|
92
|
+
}
|
93
93
|
}
|