@icos-desktop/react-components 2.2.11 → 2.2.13-zdhd.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/icos-desktop.d.ts +16 -0
- package/dist/icos-desktop.js +35 -15
- package/dist/icos-desktop.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/icos-desktop.d.ts
CHANGED
@@ -556,6 +556,10 @@ interface SenseDetailProps {
|
|
556
556
|
* 点击实体记录
|
557
557
|
*/
|
558
558
|
onClickSense?: (senseGlobalCode: string) => void;
|
559
|
+
/**
|
560
|
+
* 获取实体详情回调
|
561
|
+
*/
|
562
|
+
onGetSenseDetail?: (data: any) => void;
|
559
563
|
/**
|
560
564
|
* tabs背景颜色
|
561
565
|
*/
|
@@ -885,6 +889,10 @@ interface SenseInfoProps {
|
|
885
889
|
* 实体编码
|
886
890
|
*/
|
887
891
|
senseGlobalCode: string;
|
892
|
+
/**
|
893
|
+
* 获取实体详情回调
|
894
|
+
*/
|
895
|
+
onGetSenseDetail?: (data: any) => void;
|
888
896
|
/**
|
889
897
|
* 启用标签
|
890
898
|
*/
|
@@ -1494,6 +1502,14 @@ interface VideoPlayerProps {
|
|
1494
1502
|
* 视频源类型
|
1495
1503
|
*/
|
1496
1504
|
videoStreamSource?: 'cityeyes' | 'hikvision' | 'custom';
|
1505
|
+
/**
|
1506
|
+
* 视频播放器宽度
|
1507
|
+
*/
|
1508
|
+
width?: number;
|
1509
|
+
/**
|
1510
|
+
* 视频播放器高度
|
1511
|
+
*/
|
1512
|
+
height?: number;
|
1497
1513
|
}
|
1498
1514
|
|
1499
1515
|
declare const VideoPlayer: (props: VideoPlayerProps) => React.JSX.Element;
|
package/dist/icos-desktop.js
CHANGED
@@ -7416,7 +7416,7 @@ var styles$n = {"container":"SenseInfo-module_container__BjxkT"};
|
|
7416
7416
|
styleInject(css_248z$n);
|
7417
7417
|
|
7418
7418
|
var SenseInfo = function (props) {
|
7419
|
-
var senseGlobalCode = props.senseGlobalCode, enableTag = props.enableTag, textColor = props.textColor, borderColor = props.borderColor, borderWidth = props.borderWidth, borderStyle = props.borderStyle;
|
7419
|
+
var senseGlobalCode = props.senseGlobalCode, onGetSenseDetail = props.onGetSenseDetail, enableTag = props.enableTag, textColor = props.textColor, borderColor = props.borderColor, borderWidth = props.borderWidth, borderStyle = props.borderStyle;
|
7420
7420
|
var data = useRequest(function () { return __awaiter(void 0, void 0, void 0, function () {
|
7421
7421
|
var res, renderData;
|
7422
7422
|
var _a;
|
@@ -7427,6 +7427,7 @@ var SenseInfo = function (props) {
|
|
7427
7427
|
return [4 /*yield*/, getSenseDetail({ senseGlobalCode: senseGlobalCode })];
|
7428
7428
|
case 1:
|
7429
7429
|
res = _b.sent();
|
7430
|
+
onGetSenseDetail === null || onGetSenseDetail === void 0 ? void 0 : onGetSenseDetail(res);
|
7430
7431
|
renderData = res === null || res === void 0 ? void 0 : res.fieldInfoList;
|
7431
7432
|
if (enableTag && (renderData === null || renderData === void 0 ? void 0 : renderData.length) && ((_a = res.tagNames) === null || _a === void 0 ? void 0 : _a.length)) {
|
7432
7433
|
renderData.push({
|
@@ -7701,9 +7702,11 @@ var Cityeyes = function (_a) {
|
|
7701
7702
|
return React__default.createElement("video", { ref: videoElement, style: { width: '100%', height: '100%' }, autoPlay: true });
|
7702
7703
|
};
|
7703
7704
|
|
7705
|
+
// import { useExternal } from 'ahooks';
|
7704
7706
|
var H5player = function (_a) {
|
7705
|
-
|
7706
|
-
var
|
7707
|
+
// const status = useExternal(`${libPath}/h5player.min.js`, { type: 'js' });
|
7708
|
+
var url = _a.url, libPath = _a.libPath, width = _a.width, height = _a.height;
|
7709
|
+
// console.log('status', status);
|
7707
7710
|
var videoRef = useRef(null);
|
7708
7711
|
var videoElementId = useState(function () { return v4(); })[0];
|
7709
7712
|
var _b = useState(false), init = _b[0], setInit = _b[1];
|
@@ -7717,24 +7720,41 @@ var H5player = function (_a) {
|
|
7717
7720
|
}
|
7718
7721
|
}
|
7719
7722
|
}, [init, url]);
|
7723
|
+
// TODO: 重大活动保障定制
|
7720
7724
|
useEffect(function () {
|
7721
7725
|
var JSPlugin = window.JSPlugin;
|
7722
|
-
if (
|
7726
|
+
if (JSPlugin && !videoRef.current) {
|
7723
7727
|
videoRef.current = new JSPlugin({
|
7724
7728
|
szId: videoElementId,
|
7725
7729
|
szBasePath: libPath,
|
7726
7730
|
bSupporDoubleClickFull: true,
|
7727
7731
|
iMaxSplit: 1,
|
7732
|
+
iWidth: width,
|
7733
|
+
iHeight: height,
|
7728
7734
|
});
|
7729
7735
|
setInit(true);
|
7730
7736
|
}
|
7731
|
-
}, [
|
7737
|
+
}, []);
|
7738
|
+
// useEffect(() => {
|
7739
|
+
// const JSPlugin = (window as any).JSPlugin;
|
7740
|
+
// if (status === 'ready' && JSPlugin && !videoRef.current) {
|
7741
|
+
// videoRef.current = new JSPlugin({
|
7742
|
+
// szId: videoElementId,
|
7743
|
+
// szBasePath: libPath,
|
7744
|
+
// bSupporDoubleClickFull: true,
|
7745
|
+
// iMaxSplit: 1,
|
7746
|
+
// iWidth: width,
|
7747
|
+
// iHeight: height,
|
7748
|
+
// });
|
7749
|
+
// setInit(true);
|
7750
|
+
// }
|
7751
|
+
// }, [status]);
|
7732
7752
|
return React__default.createElement("div", { id: videoElementId, style: { width: '100%', height: '100%' } });
|
7733
7753
|
};
|
7734
7754
|
|
7735
7755
|
var Player = function (props) {
|
7736
7756
|
var _a, _b;
|
7737
|
-
var libsPath = props.libsPath, url = props.url, videoPlayerType = props.videoPlayerType;
|
7757
|
+
var libsPath = props.libsPath, url = props.url, videoPlayerType = props.videoPlayerType, width = props.width, height = props.height;
|
7738
7758
|
var cityeyesPath = (_a = libsPath === null || libsPath === void 0 ? void 0 : libsPath.cityeyes) !== null && _a !== void 0 ? _a : 'https://unpkg.com/hls.js';
|
7739
7759
|
var h5playerPath = (_b = libsPath === null || libsPath === void 0 ? void 0 : libsPath.h5player) !== null && _b !== void 0 ? _b : '/libs/h5player';
|
7740
7760
|
if (!url) {
|
@@ -7744,7 +7764,7 @@ var Player = function (props) {
|
|
7744
7764
|
return React__default.createElement(Cityeyes, { url: url, libPath: cityeyesPath });
|
7745
7765
|
}
|
7746
7766
|
if (videoPlayerType === 'h5player') {
|
7747
|
-
return React__default.createElement(H5player, { url: url, libPath: h5playerPath });
|
7767
|
+
return React__default.createElement(H5player, { url: url, libPath: h5playerPath, width: width, height: height });
|
7748
7768
|
}
|
7749
7769
|
};
|
7750
7770
|
|
@@ -7753,7 +7773,7 @@ var styles$k = {"container":"VideoPlayer-module_container__Afx8w","control":"Vid
|
|
7753
7773
|
styleInject(css_248z$k);
|
7754
7774
|
|
7755
7775
|
var VideoPlayer = function (props) {
|
7756
|
-
var libsPath = props.libsPath, url = props.url, senseGlobalCode = props.senseGlobalCode, channelId = props.channelId, videoPlayerType = props.videoPlayerType, videoStreamSource = props.videoStreamSource;
|
7776
|
+
var libsPath = props.libsPath, url = props.url, senseGlobalCode = props.senseGlobalCode, channelId = props.channelId, videoPlayerType = props.videoPlayerType, videoStreamSource = props.videoStreamSource, width = props.width, height = props.height;
|
7757
7777
|
var _a = useState(false), openControl = _a[0], setOpenControl = _a[1];
|
7758
7778
|
/**
|
7759
7779
|
* 视频播放器需要参数 url 和 videoPlayerType
|
@@ -7814,7 +7834,7 @@ var VideoPlayer = function (props) {
|
|
7814
7834
|
return null;
|
7815
7835
|
}
|
7816
7836
|
return (React__default.createElement("div", { className: styles$k.container },
|
7817
|
-
React__default.createElement(Player, { libsPath: libsPath, videoPlayerType: data.videoPlayerType, url: data.url }),
|
7837
|
+
React__default.createElement(Player, { libsPath: libsPath, videoPlayerType: data.videoPlayerType, url: data.url, width: width, height: height }),
|
7818
7838
|
data.ptzControl ? (React__default.createElement("div", { className: styles$k.control, onClick: handleOpenControl },
|
7819
7839
|
React__default.createElement(FullscreenOutlined, null),
|
7820
7840
|
React__default.createElement("span", null, "\u8BBE\u5907\u63A7\u5236"))) : null,
|
@@ -8038,7 +8058,7 @@ var useToken$4 = theme.useToken;
|
|
8038
8058
|
var Base = function (props) {
|
8039
8059
|
var _a;
|
8040
8060
|
var token = useToken$4().token;
|
8041
|
-
var senseGlobalCode = props.senseGlobalCode, enableTag = props.enableTag, senseInfoTextColor = props.senseInfoTextColor, senseInfoBorderColor = props.senseInfoBorderColor, senseInfoBorderWidth = props.senseInfoBorderWidth, senseInfoBorderStyle = props.senseInfoBorderStyle;
|
8061
|
+
var senseGlobalCode = props.senseGlobalCode, onGetSenseDetail = props.onGetSenseDetail, enableTag = props.enableTag, senseInfoTextColor = props.senseInfoTextColor, senseInfoBorderColor = props.senseInfoBorderColor, senseInfoBorderWidth = props.senseInfoBorderWidth, senseInfoBorderStyle = props.senseInfoBorderStyle;
|
8042
8062
|
var data = useRequest(function () { return __awaiter(void 0, void 0, void 0, function () {
|
8043
8063
|
return __generator(this, function (_a) {
|
8044
8064
|
switch (_a.label) {
|
@@ -8056,7 +8076,7 @@ var Base = function (props) {
|
|
8056
8076
|
arr.push({
|
8057
8077
|
key: 'SenseInfo',
|
8058
8078
|
label: '属性信息',
|
8059
|
-
children: (React__default.createElement(SenseInfo, { textColor: senseInfoTextColor, borderColor: senseInfoBorderColor, borderWidth: senseInfoBorderWidth, borderStyle: senseInfoBorderStyle, senseGlobalCode: senseGlobalCode, enableTag: enableTag })),
|
8079
|
+
children: (React__default.createElement(SenseInfo, { textColor: senseInfoTextColor, borderColor: senseInfoBorderColor, borderWidth: senseInfoBorderWidth, borderStyle: senseInfoBorderStyle, senseGlobalCode: senseGlobalCode, enableTag: enableTag, onGetSenseDetail: onGetSenseDetail })),
|
8060
8080
|
});
|
8061
8081
|
// 内容信息
|
8062
8082
|
if (data && !isEmpty(data.entityContentTableConfigs)) {
|
@@ -8150,7 +8170,7 @@ var styles$f = {"container":"SenseDetail-module_container__lF2vB","tabs":"SenseD
|
|
8150
8170
|
styleInject(css_248z$f);
|
8151
8171
|
|
8152
8172
|
var SenseDetail = function (props) {
|
8153
|
-
var senseGlobalCode = props.senseGlobalCode, topMenuConfig = props.topMenuConfig, enableTag = props.enableTag, extraTopMenu = props.extraTopMenu, hideBook = props.hideBook, onClickSense = props.onClickSense, tabsBgColor = props.tabsBgColor, contentCardNameColor = props.contentCardNameColor, contentCardContentColor = props.contentCardContentColor, contentCardBorderColor = props.contentCardBorderColor, contentCardBgColor = props.contentCardBgColor, senseInfoTextColor = props.senseInfoTextColor, senseInfoBorderColor = props.senseInfoBorderColor, senseInfoBorderWidth = props.senseInfoBorderWidth, senseInfoBorderStyle = props.senseInfoBorderStyle;
|
8173
|
+
var senseGlobalCode = props.senseGlobalCode, topMenuConfig = props.topMenuConfig, enableTag = props.enableTag, extraTopMenu = props.extraTopMenu, hideBook = props.hideBook, onClickSense = props.onClickSense, onGetSenseDetail = props.onGetSenseDetail, tabsBgColor = props.tabsBgColor, contentCardNameColor = props.contentCardNameColor, contentCardContentColor = props.contentCardContentColor, contentCardBorderColor = props.contentCardBorderColor, contentCardBgColor = props.contentCardBgColor, senseInfoTextColor = props.senseInfoTextColor, senseInfoBorderColor = props.senseInfoBorderColor, senseInfoBorderWidth = props.senseInfoBorderWidth, senseInfoBorderStyle = props.senseInfoBorderStyle;
|
8154
8174
|
var tabItems = (function () {
|
8155
8175
|
var list = [];
|
8156
8176
|
if (!(topMenuConfig === null || topMenuConfig === void 0 ? void 0 : topMenuConfig.length)) {
|
@@ -8160,7 +8180,7 @@ var SenseDetail = function (props) {
|
|
8160
8180
|
list.push({
|
8161
8181
|
key: 'base',
|
8162
8182
|
label: '基础信息',
|
8163
|
-
children: (React__default.createElement(Base, { senseInfoTextColor: senseInfoTextColor, senseInfoBorderColor: senseInfoBorderColor, senseInfoBorderWidth: senseInfoBorderWidth, senseInfoBorderStyle: senseInfoBorderStyle, senseGlobalCode: senseGlobalCode, enableTag: enableTag })),
|
8183
|
+
children: (React__default.createElement(Base, { senseInfoTextColor: senseInfoTextColor, senseInfoBorderColor: senseInfoBorderColor, senseInfoBorderWidth: senseInfoBorderWidth, senseInfoBorderStyle: senseInfoBorderStyle, senseGlobalCode: senseGlobalCode, enableTag: enableTag, onGetSenseDetail: onGetSenseDetail })),
|
8164
8184
|
});
|
8165
8185
|
}
|
8166
8186
|
if (topMenuConfig.includes('relation')) {
|
@@ -12976,11 +12996,11 @@ var CcosVideoPlayer = function (props) {
|
|
12976
12996
|
CcosVideoPlayer.settings = settings$1;
|
12977
12997
|
|
12978
12998
|
try {
|
12979
|
-
window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.2.
|
12999
|
+
window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.2.13-zdhd.1","branch":"release_v2.2.0","buildDate":"2025-07-29 20:06:29"}');
|
12980
13000
|
}
|
12981
13001
|
catch (err) {
|
12982
13002
|
console.warn(err);
|
12983
|
-
window._ICOS_DESKTOP_VERSION_ = '{"version":"2.2.
|
13003
|
+
window._ICOS_DESKTOP_VERSION_ = '{"version":"2.2.13-zdhd.1","branch":"release_v2.2.0","buildDate":"2025-07-29 20:06:29"}';
|
12984
13004
|
}
|
12985
13005
|
|
12986
13006
|
export { BookDetail, BookGroupImport, BookGroupTable, BookImport, BookInfo, BookSelect, BookTable, CcosBookDetail, CcosImportTable, CcosSenseContentTable, CcosSenseCreate, CcosSenseDetail, CcosSenseEdit, CcosSenseFullTable, CcosSenseManager, CcosSenseSearch, CcosSenseTree, CcosSenseView, CcosTagConfig, CcosVideoControl, CcosVideoPlayer, EntityClassFilter, EntityClassTreeSelect, ImportTable, Modal, OrgTreeSelect, PersonSelector, ProTable$1 as ProTable, RegionCascader, RegionTreeSelect, RelationGraph, SenseContentTable, SenseCreate, SenseDetail, SenseEdit, SenseForm, SenseFullTable, SenseInfo, SenseManager, SenseSearch, SenseTable, SenseTree, SenseView, TagConfig, TagTreeSelect, VideoControl, VideoPlayer, setCconfig as config };
|