3d-decorate-platform 1.0.25 → 1.0.26
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/index.umd.js +52 -25
- package/dist/index.umd.min.js +4 -4
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('antd/es/message'), require('dva'), require('react'), require('dva-loading'), require('antd/dist/antd.css'), require('history'), require('antd/es/config-provider'), require('antd/es/locale/zh_CN'), require('dva/dynamic'), require('dva/router'), require('antd/es/card'), require('antd/es/button'), require('antd/es/switch'), require('antd/es/form'), require('antd/es/input'), require('antd/es/tag'), require('antd/es/descriptions'), require('antd/es/spin'), require('antd/es/pagination'), require('antd/es/tooltip'), require('antd/es/empty'), require('antd/es/modal'), require('antd/es/typography'), require('@ant-design/icons'), require('axios'), require('crypto-js/sha1'), require('crypto-js/sha256'), require('antd/es/radio'), require('antd/es/select'), require('antd/es/progress'), require('react-dom'), require('antd/es/table'), require('antd/es/popconfirm'), require('antd/es/upload'), require('events'), require('ue-game-container-app'), require('antd/es/checkbox'), require('antd/es/input-number'), require('antd/es/avatar'), require('antd/es/tabs')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'antd/es/message', 'dva', 'react', 'dva-loading', 'antd/dist/antd.css', 'history', 'antd/es/config-provider', 'antd/es/locale/zh_CN', 'dva/dynamic', 'dva/router', 'antd/es/card', 'antd/es/button', 'antd/es/switch', 'antd/es/form', 'antd/es/input', 'antd/es/tag', 'antd/es/descriptions', 'antd/es/spin', 'antd/es/pagination', 'antd/es/tooltip', 'antd/es/empty', 'antd/es/modal', 'antd/es/typography', '@ant-design/icons', 'axios', 'crypto-js/sha1', 'crypto-js/sha256', 'antd/es/radio', 'antd/es/select', 'antd/es/progress', 'react-dom', 'antd/es/table', 'antd/es/popconfirm', 'antd/es/upload', 'events', 'ue-game-container-app', 'antd/es/checkbox', 'antd/es/input-number', 'antd/es/avatar', 'antd/es/tabs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.message, global.Dva, global.React, global.dvaLoading, null, global.history, global._ConfigProvider, global._zhCN, global.dvaDynamic, global.dvaRouter, global._Card, global._Button, global._Switch, global._Form, global._Input, global._Tag, global._Descriptions, global._Spin, global._Pagination, global._Tooltip, global._Empty, global._Modal, global._Typography, global._Icons, global.axios, global.sha1, global.sha256, global._Radio, global._Select, global._Progress, global.ReactDOM, global._Table, global._Popconfirm, global._Upload, global.events, global.ueGameContainerApp, global._Checkbox, global._InputNumber, global._Avatar, global._Tabs));
|
|
5
|
-
}(this, (function (exports, _message, dva, React, createLoading, antd_css, history, _ConfigProvider, zhCN, dynamic, router, _Card, _Button, _Switch, _Form, _Input, _Tag, _Descriptions, _Spin, _Pagination, _Tooltip, _Empty, _Modal, _Typography, icons, axios, sha1, sha256, _Radio, _Select, _Progress, ReactDOM, _Table, _Popconfirm, _Upload, events, ueGameContainerApp, _Checkbox, _InputNumber, _Avatar, _Tabs) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('antd/es/message'), require('dva'), require('react'), require('dva-loading'), require('antd/dist/antd.css'), require('history'), require('antd/es/config-provider'), require('antd/es/locale/zh_CN'), require('dva/dynamic'), require('dva/router'), require('antd/es/card'), require('antd/es/button'), require('antd/es/switch'), require('antd/es/form'), require('antd/es/input'), require('antd/es/tag'), require('antd/es/descriptions'), require('antd/es/spin'), require('antd/es/pagination'), require('antd/es/tooltip'), require('antd/es/empty'), require('antd/es/modal'), require('antd/es/typography'), require('@ant-design/icons'), require('axios'), require('crypto-js/sha1'), require('crypto-js/sha256'), require('antd/es/radio'), require('antd/es/select'), require('antd/es/progress'), require('react-dom'), require('v-engine-react-homeline'), require('antd/es/table'), require('antd/es/popconfirm'), require('antd/es/upload'), require('events'), require('ue-game-container-app'), require('antd/es/checkbox'), require('antd/es/input-number'), require('antd/es/avatar'), require('antd/es/tabs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'antd/es/message', 'dva', 'react', 'dva-loading', 'antd/dist/antd.css', 'history', 'antd/es/config-provider', 'antd/es/locale/zh_CN', 'dva/dynamic', 'dva/router', 'antd/es/card', 'antd/es/button', 'antd/es/switch', 'antd/es/form', 'antd/es/input', 'antd/es/tag', 'antd/es/descriptions', 'antd/es/spin', 'antd/es/pagination', 'antd/es/tooltip', 'antd/es/empty', 'antd/es/modal', 'antd/es/typography', '@ant-design/icons', 'axios', 'crypto-js/sha1', 'crypto-js/sha256', 'antd/es/radio', 'antd/es/select', 'antd/es/progress', 'react-dom', 'v-engine-react-homeline', 'antd/es/table', 'antd/es/popconfirm', 'antd/es/upload', 'events', 'ue-game-container-app', 'antd/es/checkbox', 'antd/es/input-number', 'antd/es/avatar', 'antd/es/tabs'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.message, global.Dva, global.React, global.dvaLoading, null, global.history, global._ConfigProvider, global._zhCN, global.dvaDynamic, global.dvaRouter, global._Card, global._Button, global._Switch, global._Form, global._Input, global._Tag, global._Descriptions, global._Spin, global._Pagination, global._Tooltip, global._Empty, global._Modal, global._Typography, global._Icons, global.axios, global.sha1, global.sha256, global._Radio, global._Select, global._Progress, global.ReactDOM, global.vEngineReactHomeline, global._Table, global._Popconfirm, global._Upload, global.events, global.ueGameContainerApp, global._Checkbox, global._InputNumber, global._Avatar, global._Tabs));
|
|
5
|
+
}(this, (function (exports, _message, dva, React, createLoading, antd_css, history, _ConfigProvider, zhCN, dynamic, router, _Card, _Button, _Switch, _Form, _Input, _Tag, _Descriptions, _Spin, _Pagination, _Tooltip, _Empty, _Modal, _Typography, icons, axios, sha1, sha256, _Radio, _Select, _Progress, ReactDOM, vEngineReactHomeline, _Table, _Popconfirm, _Upload, events, ueGameContainerApp, _Checkbox, _InputNumber, _Avatar, _Tabs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -4827,11 +4827,53 @@
|
|
|
4827
4827
|
|
|
4828
4828
|
var viewerCloseIcon = "data:image/svg+xml,%3Csvg%20preserveAspectRatio%3D%22none%22%20overflow%3D%22visible%22%20style%3D%22display%3A%20block%3B%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20id%3D%22Frame%201000018337%22%3E%3Cpath%20id%3D%22Vector%22%20opacity%3D%220.6%22%20d%3D%22M16.8049%2015.8637L12.9415%2012.0002L16.8049%208.13634C16.9308%208.0104%2017.0001%207.84294%2017%207.66481C16.9999%207.48721%2016.9307%207.3205%2016.8052%207.19539C16.6796%207.0694%2016.5127%207.0001%2016.3351%207C16.1567%207%2015.9894%207.06928%2015.8636%207.19506L12.0003%2011.0584L8.13634%207.19506C8.01056%207.06928%207.84342%207%207.6657%207C7.48799%207%207.32085%207.06926%207.19509%207.19503C7.06935%207.32042%207.00012%207.48721%207%207.66481C6.99988%207.84294%207.06916%208.0104%207.19509%208.13633L11.059%2012.0002L7.19507%2015.8637C7.06928%2015.9895%207%2016.1566%207%2016.3343C7%2016.512%207.06929%2016.6792%207.19509%2016.805C7.32085%2016.9308%207.48798%2017%207.66568%2017C7.8434%2017%208.01056%2016.9307%208.13632%2016.805L12.0002%2012.9415L15.8636%2016.805C15.9894%2016.9308%2016.1567%2017%2016.3347%2017C16.5127%2016.9999%2016.6795%2016.9307%2016.8046%2016.8053C17.0643%2016.5455%2017.0644%2016.1232%2016.8049%2015.8637Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
4829
4829
|
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4830
|
+
function fitDrawingView(api) {
|
|
4831
|
+
if (!api) return;
|
|
4832
|
+
if (typeof api.setBackgroundColor === 'function') {
|
|
4833
|
+
api.setBackgroundColor('#000000');
|
|
4834
|
+
}
|
|
4835
|
+
if (typeof api.zoomToCenter === 'function') {
|
|
4836
|
+
api.zoomToCenter();
|
|
4837
|
+
return;
|
|
4838
|
+
}
|
|
4839
|
+
if (typeof api.viewHome === 'function') {
|
|
4840
|
+
api.viewHome();
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
function DouGongDwgEngineView(_ref) {
|
|
4844
|
+
var fileId = _ref.fileId,
|
|
4845
|
+
onReady = _ref.onReady,
|
|
4846
|
+
onError = _ref.onError;
|
|
4847
|
+
var handleReady = React.useCallback(function (viewer, apiV2) {
|
|
4848
|
+
var api = apiV2 || vEngineReactHomeline.AppComApiV2;
|
|
4849
|
+
try {
|
|
4850
|
+
fitDrawingView(api);
|
|
4851
|
+
} catch (error) {
|
|
4852
|
+
console.warn('图纸居中失败', error);
|
|
4853
|
+
}
|
|
4854
|
+
if (onReady) onReady(viewer, api);
|
|
4855
|
+
}, [onReady]);
|
|
4856
|
+
if (!fileId) {
|
|
4857
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4858
|
+
className: styles$5.dwgViewerEmpty,
|
|
4859
|
+
role: "alert"
|
|
4860
|
+
}, "\u65E0\u6CD5\u6253\u5F00\u56FE\u7EB8\uFF1A\u7F3A\u5C11\u5F15\u64CE\u6587\u4EF6 ID");
|
|
4861
|
+
}
|
|
4862
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4863
|
+
className: styles$5.dwgEngineHost
|
|
4864
|
+
}, /*#__PURE__*/React__default['default'].createElement(vEngineReactHomeline.AppComV2, {
|
|
4865
|
+
viewerData: {
|
|
4866
|
+
fileId: fileId,
|
|
4867
|
+
server: checkEnv().SERVERS,
|
|
4868
|
+
sceneMode: '2D',
|
|
4869
|
+
viewType: '2d'
|
|
4870
|
+
},
|
|
4871
|
+
onReady: handleReady,
|
|
4872
|
+
onError: onError
|
|
4873
|
+
}));
|
|
4834
4874
|
}
|
|
4875
|
+
|
|
4876
|
+
var ANIMATION_DURATION$2 = 180;
|
|
4835
4877
|
function DouGongDwgViewer(_ref) {
|
|
4836
4878
|
var visible = _ref.visible,
|
|
4837
4879
|
drawing = _ref.drawing,
|
|
@@ -4848,24 +4890,11 @@
|
|
|
4848
4890
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
4849
4891
|
loadError = _useState6[0],
|
|
4850
4892
|
setLoadError = _useState6[1];
|
|
4851
|
-
var _useState7 = React.useState(null),
|
|
4852
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
4853
|
-
EngineView = _useState8[0],
|
|
4854
|
-
setEngineView = _useState8[1];
|
|
4855
4893
|
React.useEffect(function () {
|
|
4856
4894
|
var timer = null;
|
|
4857
4895
|
if (visible) {
|
|
4858
4896
|
setShouldRender(true);
|
|
4859
4897
|
setLoadError('');
|
|
4860
|
-
try {
|
|
4861
|
-
var NextEngineView = loadEngineView();
|
|
4862
|
-
setEngineView(function () {
|
|
4863
|
-
return NextEngineView;
|
|
4864
|
-
});
|
|
4865
|
-
} catch (error) {
|
|
4866
|
-
setEngineView(null);
|
|
4867
|
-
setLoadError(error && error.message || '图纸引擎加载失败');
|
|
4868
|
-
}
|
|
4869
4898
|
timer = window.setTimeout(function () {
|
|
4870
4899
|
return setIsOpen(true);
|
|
4871
4900
|
}, 10);
|
|
@@ -4922,15 +4951,13 @@
|
|
|
4922
4951
|
}, loadError ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4923
4952
|
className: styles$5.dwgViewerEmpty,
|
|
4924
4953
|
role: "alert"
|
|
4925
|
-
}, loadError) :
|
|
4954
|
+
}, loadError) : /*#__PURE__*/React__default['default'].createElement(DouGongDwgEngineView, {
|
|
4926
4955
|
key: fileId || drawing.id,
|
|
4927
4956
|
fileId: fileId,
|
|
4928
4957
|
onError: function onError(error) {
|
|
4929
4958
|
setLoadError(error && error.message || '图纸加载失败,请稍后重试');
|
|
4930
4959
|
}
|
|
4931
|
-
})
|
|
4932
|
-
className: styles$5.dwgViewerEmpty
|
|
4933
|
-
}, "\u56FE\u7EB8\u5F15\u64CE\u52A0\u8F7D\u4E2D..."))), document.body);
|
|
4960
|
+
}))), document.body);
|
|
4934
4961
|
}
|
|
4935
4962
|
|
|
4936
4963
|
var ANIMATION_DURATION$3 = 180;
|