@cloud-app-dev/vidc 3.2.37 → 3.2.39

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.
Files changed (127) hide show
  1. package/.dumirc.ts +7 -11
  2. package/.fatherrc.ts +0 -1
  3. package/es/CheckGroupFixed/demo.js +2 -3
  4. package/es/CheckGroupFixed/index.js +4 -7
  5. package/es/Config/index.js +10 -9
  6. package/es/Config/interface.d.ts +2 -3
  7. package/es/CustomRenderSelect/index.js +2 -3
  8. package/es/DynamicList/demo.js +3 -4
  9. package/es/DynamicList/index.js +2 -3
  10. package/es/ErrorFallback/index.js +3 -6
  11. package/es/FrontendPlayer/index.d.ts +4 -2
  12. package/es/List/index.d.ts +0 -13
  13. package/es/List/index.js +1 -19
  14. package/es/LoaderScript/utils.d.ts +0 -1
  15. package/es/LoaderScript/utils.js +1 -36
  16. package/es/Map/FindPio/index.js +2 -3
  17. package/es/Map/LevelCenter/demo.js +2 -4
  18. package/es/Map/ResetTools/index.js +4 -5
  19. package/es/Picture/component/Tools/index.d.ts +1 -2
  20. package/es/Picture/component/Tools/index.js +7 -14
  21. package/es/Picture/demo.js +14 -28
  22. package/es/Picture/index.d.ts +1 -1
  23. package/es/Picture/index.js +91 -141
  24. package/es/Picture/index.less +7 -2
  25. package/es/Picture/utils.d.ts +6 -0
  26. package/es/Picture/utils.js +57 -2
  27. package/es/Player/api/index.js +2 -1
  28. package/es/Player/contraller_bar/volume.js +3 -6
  29. package/es/Player/demo.js +28 -58
  30. package/es/Player/frontend_timeline.js +1 -1
  31. package/es/Player/segment_timeline.js +3 -5
  32. package/es/Player/single_player.js +1 -1
  33. package/es/Player/util.d.ts +0 -1
  34. package/es/Player/util.js +2 -40
  35. package/es/PlayerExt/demo.js +12 -20
  36. package/es/Progress/index.js +4 -6
  37. package/es/RefDrawer/Footer.d.ts +9 -0
  38. package/es/{Drawer → RefDrawer}/Footer.js +3 -5
  39. package/es/{Drawer/Demo.d.ts → RefDrawer/demo.d.ts} +0 -0
  40. package/es/RefDrawer/demo.js +35 -0
  41. package/es/RefDrawer/index.d.ts +26 -0
  42. package/es/{Input → RefDrawer}/index.js +54 -58
  43. package/es/{Input → RefModal}/demo.d.ts +0 -0
  44. package/es/RefModal/demo.js +35 -0
  45. package/es/RefModal/index.d.ts +17 -0
  46. package/es/RefModal/index.js +71 -0
  47. package/es/ScreenPlayer/PlayerWithExt.js +1 -1
  48. package/es/ScreenPlayer/RatePick.js +8 -9
  49. package/es/ScreenPlayer/ScreenSelect.js +2 -3
  50. package/es/ScreenPlayer/SegmentTimeLine.js +3 -11
  51. package/es/ScreenPlayer/TimeMode.js +3 -4
  52. package/es/ScreenPlayer/TimeSelect.js +14 -39
  53. package/es/ScreenPlayer/demo.js +2 -3
  54. package/es/ScreenPlayer/demo2.js +8 -28
  55. package/es/ScreenPlayer/useTimeSlider.js +1 -1
  56. package/es/Service/http.js +6 -8
  57. package/es/TableLayout/index.d.ts +0 -3
  58. package/es/TableLayout/index.js +8 -10
  59. package/es/ThemeAntd/demo.js +21 -40
  60. package/es/ThemeAntd/index.js +16 -2
  61. package/es/ThemeAntd/index.less +0 -12
  62. package/es/Timeout/index.js +2 -2
  63. package/es/core.d.ts +0 -149
  64. package/es/index.d.ts +2 -6
  65. package/es/index.js +2 -6
  66. package/es/useDrawROI/index.js +4 -4
  67. package/es/utils.d.ts +1 -12
  68. package/es/utils.js +0 -56
  69. package/package.json +24 -24
  70. package/theme-config.ts +3 -1
  71. package/typings/global.d.ts +4 -4
  72. package/es/Api/index.d.ts +0 -12
  73. package/es/Api/index.js +0 -267
  74. package/es/Box/BetweenBox/index.d.ts +0 -12
  75. package/es/Box/BetweenBox/index.js +0 -31
  76. package/es/Box/BetweenBox/index.less +0 -5
  77. package/es/Box/InfoBox/index.d.ts +0 -12
  78. package/es/Box/InfoBox/index.js +0 -30
  79. package/es/Box/InfoBox/index.less +0 -24
  80. package/es/Box/TwoColumnBox/index.d.ts +0 -10
  81. package/es/Box/TwoColumnBox/index.js +0 -54
  82. package/es/Box/TwoColumnBox/index.less +0 -80
  83. package/es/Box/deps/content-grid.d.ts +0 -9
  84. package/es/Box/deps/content-grid.js +0 -9
  85. package/es/Box/deps/grid-factory.d.ts +0 -10
  86. package/es/Box/deps/grid-factory.js +0 -72
  87. package/es/Box/deps/simple-grid.d.ts +0 -9
  88. package/es/Box/deps/simple-grid.js +0 -8
  89. package/es/Box/index.d.ts +0 -14
  90. package/es/Box/index.js +0 -39
  91. package/es/Box/index.less +0 -10
  92. package/es/Drawer/Demo.js +0 -109
  93. package/es/Drawer/Footer.d.ts +0 -5
  94. package/es/Drawer/index.d.ts +0 -38
  95. package/es/Drawer/index.js +0 -207
  96. package/es/Drawer/index.less +0 -42
  97. package/es/Drawer/interface.d.ts +0 -22
  98. package/es/Input/demo.js +0 -16
  99. package/es/Input/index.d.ts +0 -19
  100. package/es/Input/index.less +0 -12
  101. package/es/Modal/demo.d.ts +0 -3
  102. package/es/Modal/demo.js +0 -106
  103. package/es/Modal/index.d.ts +0 -44
  104. package/es/Modal/index.js +0 -197
  105. package/es/Modal/index.less +0 -44
  106. package/es/Modal/interface.d.ts +0 -23
  107. package/es/Picture/dragBound.d.ts +0 -5
  108. package/es/Picture/dragBound.js +0 -77
  109. package/es/Service/fetch-adapter.d.ts +0 -12
  110. package/es/Service/fetch-adapter.js +0 -203
  111. package/es/ThemeAntd/style/button.less +0 -67
  112. package/es/ThemeAntd/style/checkbox.less +0 -72
  113. package/es/ThemeAntd/style/form.less +0 -12
  114. package/es/ThemeAntd/style/input.less +0 -83
  115. package/es/ThemeAntd/style/pagination.less +0 -96
  116. package/es/ThemeAntd/style/picker.less +0 -106
  117. package/es/ThemeAntd/style/popover.less +0 -5
  118. package/es/ThemeAntd/style/radio.less +0 -87
  119. package/es/ThemeAntd/style/scrollbar.less +0 -23
  120. package/es/ThemeAntd/style/select.less +0 -81
  121. package/es/ThemeAntd/style/table.less +0 -57
  122. package/es/ThemeAntd/style/tree.less +0 -18
  123. package/es/Tree/demo.d.ts +0 -3
  124. package/es/Tree/demo.js +0 -32
  125. package/es/Tree/index.d.ts +0 -24
  126. package/es/Tree/index.js +0 -100
  127. package/es/Tree/index.less +0 -60
@@ -10,16 +10,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
10
10
 
11
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
12
 
13
- /* eslint-disable no-param-reassign */
14
13
  import Axios from 'axios';
15
- import fetchAdapter from "./fetch-adapter";
16
14
  import * as Middleware from "./middleware";
17
15
  var CancelToken = Axios.CancelToken;
18
16
  var config = {
19
17
  baseURL: '/',
20
18
  timeout: 60 * 1000,
21
19
  xhrMode: 'fetch',
22
- adapter: fetchAdapter,
23
20
  headers: {
24
21
  Accept: 'application/json; charset=utf-8',
25
22
  'Content-Type': 'application/json; charset=utf-8'
@@ -43,17 +40,19 @@ httpInstance.interceptors.response.use(function (response) {
43
40
  if (Middleware.responseMiddleware.length === 0) {
44
41
  return response.data;
45
42
  } else {
43
+ var resp = response;
46
44
  Middleware.responseMiddleware.forEach(function (fn) {
47
- return response = fn(response);
45
+ resp = fn(response);
48
46
  });
49
- return response;
47
+ return resp;
50
48
  }
51
49
  }, function httpUtilErrorRequest(error) {
52
50
  if (Middleware.responseErrorMiddleware.length !== 0) {
51
+ var err = error;
53
52
  Middleware.responseErrorMiddleware.forEach(function (fn) {
54
- return error = fn(error);
53
+ err = fn(error);
55
54
  });
56
- return Promise.reject(error);
55
+ return Promise.reject(err);
57
56
  }
58
57
 
59
58
  if (!error.response) {
@@ -83,7 +82,6 @@ function http(_ref) {
83
82
 
84
83
  var httpMultiPartInstance = Axios.create({
85
84
  timeout: 10 * 60 * 1000,
86
- adapter: fetchAdapter,
87
85
  headers: {
88
86
  'Content-Type': 'multipart/form-data'
89
87
  }
@@ -7,7 +7,4 @@ interface ITableLayoutProps {
7
7
  x?: string | number;
8
8
  }
9
9
  declare function TableLayout({ className, children, cutNum, x }: ITableLayoutProps): JSX.Element;
10
- declare namespace TableLayout {
11
- var defaultProps: ITableLayoutProps;
12
- }
13
10
  export default TableLayout;
@@ -4,17 +4,20 @@ import "./index.less";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
 
6
6
  function TableLayout(_ref) {
7
- var className = _ref.className,
7
+ var _ref$className = _ref.className,
8
+ className = _ref$className === void 0 ? '' : _ref$className,
8
9
  children = _ref.children,
9
- cutNum = _ref.cutNum,
10
- x = _ref.x;
10
+ _ref$cutNum = _ref.cutNum,
11
+ cutNum = _ref$cutNum === void 0 ? 0 : _ref$cutNum,
12
+ _ref$x = _ref.x,
13
+ x = _ref$x === void 0 ? 1200 : _ref$x;
11
14
  var domRef = useRef(null);
12
15
 
13
16
  var size = _useSize(domRef);
14
17
 
15
18
  var height = useMemo(function () {
16
- return size.height - cutNum;
17
- }, [size.height, cutNum]);
19
+ return size !== null && size !== void 0 && size.height ? size.height - cutNum : 0;
20
+ }, [size === null || size === void 0 ? void 0 : size.height, cutNum]);
18
21
  return /*#__PURE__*/_jsx("div", {
19
22
  ref: domRef,
20
23
  className: "table-layout ".concat(className),
@@ -27,9 +30,4 @@ function TableLayout(_ref) {
27
30
  });
28
31
  }
29
32
 
30
- TableLayout.defaultProps = {
31
- className: '',
32
- cutNum: 0,
33
- x: 1200
34
- };
35
33
  export default TableLayout;
@@ -1,23 +1,4 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
- import "antd/lib/table/style";
4
- import _Table from "antd/lib/table";
5
- import "antd/lib/button/style";
6
- import _Button from "antd/lib/button";
7
- import "antd/lib/pagination/style";
8
- import _Pagination from "antd/lib/pagination";
9
- import "antd/lib/date-picker/style";
10
- import _DatePicker from "antd/lib/date-picker";
11
- import "antd/lib/checkbox/style";
12
- import _Checkbox from "antd/lib/checkbox";
13
- import "antd/lib/radio/style";
14
- import _Radio from "antd/lib/radio";
15
- import "antd/lib/select/style";
16
- import _Select from "antd/lib/select";
17
- import "antd/lib/input-number/style";
18
- import _InputNumber from "antd/lib/input-number";
19
- import "antd/lib/input/style";
20
- import _Input from "antd/lib/input";
1
+ import { Button, Checkbox, ConfigProvider, DatePicker, Input, InputNumber, Pagination, Radio, Select, Table } from 'antd';
21
2
  import React, { useRef } from 'react';
22
3
  import ThemeAntd from '.';
23
4
  import "./demo.less";
@@ -26,14 +7,14 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
26
7
 
27
8
  var App = function App() {
28
9
  var ref = useRef(null);
29
- return /*#__PURE__*/_jsx(_ConfigProvider, {
10
+ return /*#__PURE__*/_jsx(ConfigProvider, {
30
11
  prefixCls: "cloudapp",
31
12
  children: /*#__PURE__*/_jsx(ThemeAntd, {
32
13
  children: /*#__PURE__*/_jsxs("div", {
33
14
  className: "theme-antd-demo",
34
15
  ref: ref,
35
16
  children: [/*#__PURE__*/_jsx("p", {
36
- children: /*#__PURE__*/_jsx(_Input, {
17
+ children: /*#__PURE__*/_jsx(Input, {
37
18
  placeholder: "\u6587\u672C\u8F93\u5165",
38
19
  prefix: /*#__PURE__*/_jsx("div", {
39
20
  children: "111"
@@ -43,80 +24,80 @@ var App = function App() {
43
24
  })
44
25
  })
45
26
  }), /*#__PURE__*/_jsx("p", {
46
- children: /*#__PURE__*/_jsx(_Input, {
27
+ children: /*#__PURE__*/_jsx(Input, {
47
28
  placeholder: "\u6587\u672C\u8F93\u5165"
48
29
  })
49
30
  }), /*#__PURE__*/_jsx("p", {
50
- children: /*#__PURE__*/_jsx(_InputNumber, {
31
+ children: /*#__PURE__*/_jsx(InputNumber, {
51
32
  placeholder: "\u6570\u5B57\u8F93\u5165"
52
33
  })
53
34
  }), /*#__PURE__*/_jsx("p", {
54
- children: /*#__PURE__*/_jsx(_Input.TextArea, {
35
+ children: /*#__PURE__*/_jsx(Input.TextArea, {
55
36
  placeholder: "\u591A\u884C\u6587\u672C\u8F93\u5165"
56
37
  })
57
38
  }), /*#__PURE__*/_jsx("p", {
58
- children: /*#__PURE__*/_jsxs(_Select, {
39
+ children: /*#__PURE__*/_jsxs(Select, {
59
40
  placeholder: "\u9009\u62E9\u8F93\u5165",
60
41
  getPopupContainer: function getPopupContainer() {
61
42
  return ref.current;
62
43
  },
63
- children: [/*#__PURE__*/_jsx(_Select.Option, {
44
+ children: [/*#__PURE__*/_jsx(Select.Option, {
64
45
  value: 1,
65
46
  children: "\u9009\u98791"
66
- }), /*#__PURE__*/_jsx(_Select.Option, {
47
+ }), /*#__PURE__*/_jsx(Select.Option, {
67
48
  value: 2,
68
49
  children: "\u9009\u98792"
69
50
  })]
70
51
  })
71
52
  }), /*#__PURE__*/_jsx("p", {
72
- children: /*#__PURE__*/_jsxs(_Radio.Group, {
73
- children: [/*#__PURE__*/_jsx(_Radio, {
53
+ children: /*#__PURE__*/_jsxs(Radio.Group, {
54
+ children: [/*#__PURE__*/_jsx(Radio, {
74
55
  value: 1,
75
56
  children: "\u9009\u98791"
76
- }), /*#__PURE__*/_jsx(_Radio, {
57
+ }), /*#__PURE__*/_jsx(Radio, {
77
58
  value: 2,
78
59
  children: "\u9009\u98792"
79
60
  })]
80
61
  })
81
62
  }), /*#__PURE__*/_jsx("p", {
82
- children: /*#__PURE__*/_jsxs(_Checkbox.Group, {
83
- children: [/*#__PURE__*/_jsx(_Checkbox, {
63
+ children: /*#__PURE__*/_jsxs(Checkbox.Group, {
64
+ children: [/*#__PURE__*/_jsx(Checkbox, {
84
65
  value: 1,
85
66
  children: "\u9009\u98791"
86
- }), /*#__PURE__*/_jsx(_Checkbox, {
67
+ }), /*#__PURE__*/_jsx(Checkbox, {
87
68
  value: 2,
88
69
  children: "\u9009\u98792"
89
70
  })]
90
71
  })
91
72
  }), /*#__PURE__*/_jsx("p", {
92
- children: /*#__PURE__*/_jsx(_DatePicker, {
73
+ children: /*#__PURE__*/_jsx(DatePicker, {
93
74
  getPopupContainer: function getPopupContainer() {
94
75
  return ref.current;
95
76
  }
96
77
  })
97
78
  }), /*#__PURE__*/_jsx("p", {
98
- children: /*#__PURE__*/_jsx(_DatePicker.RangePicker, {
79
+ children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
99
80
  getPopupContainer: function getPopupContainer() {
100
81
  return ref.current;
101
82
  }
102
83
  })
103
84
  }), /*#__PURE__*/_jsx("p", {
104
- children: /*#__PURE__*/_jsx(_Pagination, {
85
+ children: /*#__PURE__*/_jsx(Pagination, {
105
86
  total: 100
106
87
  })
107
88
  }), /*#__PURE__*/_jsxs("p", {
108
- children: [/*#__PURE__*/_jsx(_Button, {
89
+ children: [/*#__PURE__*/_jsx(Button, {
109
90
  children: "\u6309\u94AE1"
110
91
  }), /*#__PURE__*/_jsx("span", {
111
92
  style: {
112
93
  paddingRight: 10
113
94
  }
114
- }), /*#__PURE__*/_jsx(_Button, {
95
+ }), /*#__PURE__*/_jsx(Button, {
115
96
  type: "primary",
116
97
  children: "\u6309\u94AE2"
117
98
  })]
118
99
  }), /*#__PURE__*/_jsx("p", {
119
- children: /*#__PURE__*/_jsx(_Table, {
100
+ children: /*#__PURE__*/_jsx(Table, {
120
101
  columns: [{
121
102
  title: '姓名',
122
103
  dataIndex: 'name'
@@ -1,10 +1,24 @@
1
+ import { ConfigProvider } from 'antd';
1
2
  import React from 'react';
2
3
  import "./index.less";
3
- import { Fragment as _Fragment } from "react/jsx-runtime";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  export default function ThemeAntd(_ref) {
6
6
  var children = _ref.children;
7
- return /*#__PURE__*/_jsx(_Fragment, {
7
+ return /*#__PURE__*/_jsx(ConfigProvider, {
8
+ theme: {
9
+ token: {
10
+ colorBgBase: '#1d4788',
11
+ colorTextBase: '#fff',
12
+ colorBgContainer: '#1d4788',
13
+ colorBgElevated: '#2a64bc',
14
+ controlItemBgActive: '#1d4788',
15
+ // 表单选中颜色
16
+ colorPrimary: 'orange',
17
+ // 主色
18
+ controlOutline: 'transparent' // 表单阴影
19
+
20
+ }
21
+ },
8
22
  children: children
9
23
  });
10
24
  }
@@ -1,15 +1,3 @@
1
- @import url('./style/button.less');
2
- @import url('./style/checkbox.less');
3
- @import url('./style/form.less');
4
- @import url('./style/input.less');
5
- @import url('./style/pagination.less');
6
- @import url('./style/picker.less');
7
- @import url('./style/popover.less');
8
- @import url('./style/radio.less');
9
- @import url('./style/scrollbar.less');
10
- @import url('./style/select.less');
11
- @import url('./style/tree.less');
12
- @import url('./style/table.less');
13
1
 
14
2
  :root {
15
3
  color: var(--color);
@@ -61,9 +61,9 @@ function Timeout(_ref) {
61
61
 
62
62
  if (!lockstatusRef.current && state.timelock - cuurentTimeRef.current > time * 1000 && !isIgnore) {
63
63
  lockstatusRef.current = true;
64
- onTimeout && onTimeout();
64
+ onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout();
65
65
  setTimeout(function () {
66
- return lockstatusRef.current = false;
66
+ lockstatusRef.current = false;
67
67
  }, 1000);
68
68
  } // eslint-disable-next-line react-hooks/exhaustive-deps
69
69
 
package/es/core.d.ts CHANGED
@@ -1,149 +0,0 @@
1
- export interface HttpResult<T> {
2
- code: number;
3
- message: string;
4
- data: T;
5
- }
6
-
7
- export interface HttpPageResult<T> {
8
- code: number;
9
- message: string;
10
- data: {
11
- limit: number;
12
- list: T;
13
- offset: number;
14
- total: number;
15
- };
16
- }
17
-
18
- export interface HttpPageResult2<T> {
19
- code: number;
20
- codeRemark: string;
21
- data: T[];
22
- message: string;
23
- totalCount: number;
24
- totalPage: number;
25
- }
26
-
27
- export interface PostItemType {
28
- id: string;
29
- postName: string;
30
- orgId: string;
31
- }
32
-
33
- export type BzTreeItemType = {
34
- appSysId: string;
35
- createTime: number;
36
- creator: number;
37
- customType: number;
38
- description: string;
39
- groupName: string;
40
- id: string;
41
- level: number;
42
- orderNo: number;
43
- parentId: string;
44
- treeDescription: string;
45
- treeId: string;
46
- };
47
-
48
- export interface OrgItemType {
49
- createTime: string;
50
- id: string;
51
- orgSort: number;
52
- parentId: string;
53
- type: string;
54
- name: string;
55
- organizationName: string;
56
- organizationDescription: string;
57
- organizationSort: number;
58
- }
59
-
60
- export interface DeviceItemType {
61
- ability: any;
62
- accessType: null;
63
- aliasBrand: null;
64
- appSystemId: string;
65
- areaLevel: number;
66
- bindUserid: string;
67
- boxNum: string;
68
- buzGroupId: string;
69
- buzGroupIds: string[];
70
- buzGroupName: string;
71
- cameraType: string;
72
- capDirection: string;
73
- cid: string;
74
- createTime: string;
75
- deleteFlag: number;
76
- detailLiftBuild: number;
77
- detailLiftUnit: number;
78
- deviceBrand: number;
79
- deviceIp: string;
80
- deviceModel: string;
81
- deviceName: string;
82
- devicePlace: string;
83
- deviceStatus: 0 | 1;
84
- deviceType: string;
85
- extJson: any;
86
- fullPy: string;
87
- gbId: string;
88
- geoCoordinateSystem: string;
89
- groupId: string;
90
- groupIds: string[];
91
- groupName: string;
92
- hadLocaltion: boolean;
93
- hasFrontEnd: boolean;
94
- hasStorage: boolean;
95
- id: string;
96
- inOutDirection: any;
97
- industry: any;
98
- industry1: string;
99
- industry2: string;
100
- installationLocationDetail: any;
101
- installationMethod: any;
102
- installationSite: any;
103
- ipAddr: any;
104
- ipV6Addr: any;
105
- isBind: any;
106
- isIdleDeal: any;
107
- latitude: number;
108
- longitude: number;
109
- maintenancePerson: any;
110
- maintenancePhone: any;
111
- maintenanceUnit: any;
112
- manufacturerDeviceType: string;
113
- monitorAreaDesc: any;
114
- monitorDirection: any;
115
- operationCenterIds: any;
116
- orgCode: any;
117
- parentId: any;
118
- pathId: string[];
119
- place: string;
120
- placeCode: string;
121
- placeId: string;
122
- placeIds: string[];
123
- placeName: null;
124
- placeTags: string[];
125
- port: string;
126
- ptzControl: string;
127
- simpPy: string;
128
- sn: string;
129
- snapshotMode: string;
130
- sourceFrom: string;
131
- superiorGbcode: string;
132
- tags: string;
133
- villageLocationType: string;
134
- }
135
-
136
- export type PlaceItemType = {
137
- areaCode: string;
138
- areaName: string;
139
- center: string;
140
- hasDevice: boolean;
141
- id: string;
142
- level: number;
143
- name: string;
144
- parentCode: string;
145
- placeId: string;
146
- pcodes?: Array<string>;
147
- provinceId: string;
148
- placeInfoUrl?: string;
149
- };
package/es/index.d.ts CHANGED
@@ -1,8 +1,6 @@
1
- export { default as Api } from './Api';
2
1
  export { default as AppContext } from './AppContext';
3
2
  export { default as Auth } from './Auth';
4
3
  export { default as AutoExit } from './AutoExit';
5
- export { default as Box } from './Box';
6
4
  export { default as CheckGroupFixed } from './CheckGroupFixed';
7
5
  export { default as Config } from './Config';
8
6
  export { default as ConfigContext } from './ConfigContext';
@@ -10,7 +8,6 @@ export { default as CustomRenderSelect } from './CustomRenderSelect';
10
8
  export { default as DisableMark } from './DisableMark';
11
9
  export { default as DomMove } from './DomMove';
12
10
  export { default as Drag } from './Drag';
13
- export { default as Drawer } from './Drawer';
14
11
  export { default as DynamicGridList } from './DynamicGridList';
15
12
  export { default as DynamicList } from './DynamicList';
16
13
  export { default as ErrorFallback } from './ErrorFallback';
@@ -20,7 +17,6 @@ export { default as GridList } from './GridList';
20
17
  export { default as HightLevel } from './HightLevel';
21
18
  export { default as IconFont } from './IconFont';
22
19
  export { default as ImageView } from './ImageView';
23
- export { default as Input } from './Input';
24
20
  export { default as InstanceHistory } from './InstanceHistory';
25
21
  export { default as LabelValue } from './LabelValue';
26
22
  export { default as List } from './List';
@@ -28,19 +24,19 @@ export { default as ListWithSizeAnimate } from './ListWithSizeAnimate';
28
24
  export { default as LoaderApp } from './LoaderApp';
29
25
  export { default as LoaderScript } from './LoaderScript';
30
26
  export { default as Map } from './Map';
31
- export { default as Modal } from './Modal';
32
27
  export { default as Picture } from './Picture';
33
28
  export { default as Player } from './Player';
34
29
  export { default as PlayerExt } from './PlayerExt';
35
30
  export { default as Progress } from './Progress';
36
31
  export { default as ROI } from './ROI';
32
+ export { default as RefDrawer } from './RefDrawer';
33
+ export { default as RefModal } from './RefModal';
37
34
  export { default as ScreenPlayer } from './ScreenPlayer';
38
35
  export { default as SegmentPlayer } from './SegmentPlayer';
39
36
  export { default as Service } from './Service';
40
37
  export { default as TableLayout } from './TableLayout';
41
38
  export { default as ThemeAntd } from './ThemeAntd';
42
39
  export { default as Timeout } from './Timeout';
43
- export { default as Tree } from './Tree';
44
40
  export { default as VList } from './VList';
45
41
  export { default as useDrawROI } from './useDrawROI';
46
42
  export { default as useEventEmitterHandle } from './useEventEmitterHandle';
package/es/index.js CHANGED
@@ -1,8 +1,6 @@
1
- export { default as Api } from "./Api";
2
1
  export { default as AppContext } from "./AppContext";
3
2
  export { default as Auth } from "./Auth";
4
3
  export { default as AutoExit } from "./AutoExit";
5
- export { default as Box } from "./Box";
6
4
  export { default as CheckGroupFixed } from "./CheckGroupFixed";
7
5
  export { default as Config } from "./Config";
8
6
  export { default as ConfigContext } from "./ConfigContext";
@@ -10,7 +8,6 @@ export { default as CustomRenderSelect } from "./CustomRenderSelect";
10
8
  export { default as DisableMark } from "./DisableMark";
11
9
  export { default as DomMove } from "./DomMove";
12
10
  export { default as Drag } from "./Drag";
13
- export { default as Drawer } from "./Drawer";
14
11
  export { default as DynamicGridList } from "./DynamicGridList";
15
12
  export { default as DynamicList } from "./DynamicList";
16
13
  export { default as ErrorFallback } from "./ErrorFallback";
@@ -20,7 +17,6 @@ export { default as GridList } from "./GridList";
20
17
  export { default as HightLevel } from "./HightLevel";
21
18
  export { default as IconFont } from "./IconFont";
22
19
  export { default as ImageView } from "./ImageView";
23
- export { default as Input } from "./Input";
24
20
  export { default as InstanceHistory } from "./InstanceHistory";
25
21
  export { default as LabelValue } from "./LabelValue";
26
22
  export { default as List } from "./List";
@@ -28,19 +24,19 @@ export { default as ListWithSizeAnimate } from "./ListWithSizeAnimate";
28
24
  export { default as LoaderApp } from "./LoaderApp";
29
25
  export { default as LoaderScript } from "./LoaderScript";
30
26
  export { default as Map } from "./Map";
31
- export { default as Modal } from "./Modal";
32
27
  export { default as Picture } from "./Picture";
33
28
  export { default as Player } from "./Player";
34
29
  export { default as PlayerExt } from "./PlayerExt";
35
30
  export { default as Progress } from "./Progress";
36
31
  export { default as ROI } from "./ROI";
32
+ export { default as RefDrawer } from "./RefDrawer";
33
+ export { default as RefModal } from "./RefModal";
37
34
  export { default as ScreenPlayer } from "./ScreenPlayer";
38
35
  export { default as SegmentPlayer } from "./SegmentPlayer";
39
36
  export { default as Service } from "./Service";
40
37
  export { default as TableLayout } from "./TableLayout";
41
38
  export { default as ThemeAntd } from "./ThemeAntd";
42
39
  export { default as Timeout } from "./Timeout";
43
- export { default as Tree } from "./Tree";
44
40
  export { default as VList } from "./VList";
45
41
  export { default as useDrawROI } from "./useDrawROI";
46
42
  export { default as useEventEmitterHandle } from "./useEventEmitterHandle";
@@ -32,11 +32,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
32
32
 
33
33
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
34
34
 
35
- import { getTargetElement } from 'ahooks/lib/utils/domTarget';
36
- import { useEffect, useMemo } from 'react';
35
+ import booleanDisjoint from '@turf/boolean-disjoint';
37
36
  import { lineString } from '@turf/helpers';
38
37
  import lineToPolygon from '@turf/line-to-polygon';
39
- import booleanDisjoint from '@turf/boolean-disjoint';
38
+ import { getTargetElement } from 'ahooks/lib/utils/domTarget';
39
+ import { useEffect, useMemo } from 'react';
40
40
  import { useHotkeys } from 'react-hotkeys-hook';
41
41
  import useSimpleState from "../useSimpleState";
42
42
 
@@ -91,7 +91,7 @@ function useDrawROI(target, _ref) {
91
91
  }, [size === null || size === void 0 ? void 0 : size.height, size === null || size === void 0 ? void 0 : size.width]);
92
92
 
93
93
  _useUpdateEffect(function () {
94
- if (state.saveArea.length === 0 && defaultAreas.length > 0) {
94
+ if (state.saveArea.length === 0 && defaultAreas && defaultAreas.length > 0) {
95
95
  updateState({
96
96
  saveArea: defaultAreas
97
97
  });
package/es/utils.d.ts CHANGED
@@ -2,18 +2,7 @@ import type { MutableRefObject } from 'react';
2
2
  export declare const getHeader: () => {
3
3
  Authorization: any;
4
4
  };
5
- /**
6
- * @desc 根据id获取所有父级
7
- */
8
- export declare function getParentListById(id: string, orgList?: any[], list?: any[], key?: string, pkey?: string): any[];
9
- /**
10
- * 获取场所下的所有场所codes
11
- * @param {string} orgId
12
- * @param {Array} ids = []
13
- */
14
- export declare function getPlaceCodesWithParent(areaCode: string, list?: any[], areaCodes?: string[], key?: string, pkey?: string): any;
15
- export declare function nextTick(cb: () => void): void;
16
- export declare function tryCatch(resolveFn: () => Promise<any>, rejectFn?: (e: unknown) => void): Promise<void>;
5
+ export declare function tryCatch(resolveFn: () => any, rejectFn?: (e: unknown) => void): Promise<void>;
17
6
  declare type TargetValue<T> = T | undefined | null;
18
7
  declare type TargetType = HTMLElement | Element | Window | Document;
19
8
  export declare type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>;
package/es/utils.js CHANGED
@@ -13,62 +13,6 @@ export var getHeader = function getHeader() {
13
13
  Authorization: _cache.getCache('token', 'session')
14
14
  };
15
15
  };
16
- /**
17
- * @desc 根据id获取所有父级
18
- */
19
-
20
- export function getParentListById(id) {
21
- var orgList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
22
- var list = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
23
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'id';
24
- var pkey = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'parentId';
25
-
26
- for (var i = 0, len = orgList.length; i < len; i++) {
27
- var item = orgList[i];
28
-
29
- if (item[key] === id) {
30
- list.push(item);
31
-
32
- if (item[pkey]) {
33
- getParentListById(item[pkey], orgList, list, key, pkey);
34
- }
35
- }
36
- }
37
-
38
- return list;
39
- }
40
- /**
41
- * 获取场所下的所有场所codes
42
- * @param {string} orgId
43
- * @param {Array} ids = []
44
- */
45
-
46
- export function getPlaceCodesWithParent(areaCode) {
47
- var list = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
48
- var areaCodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
49
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'areaCode';
50
- var pkey = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'parentCode';
51
- var info = list.find(function (v) {
52
- return v[key] === areaCode;
53
- });
54
-
55
- if (info !== null && info !== void 0 && info.pcodes) {
56
- return info.pcodes.reverse();
57
- }
58
-
59
- if (info) {
60
- areaCodes.push(areaCode);
61
-
62
- if (info[pkey] && info[pkey] * 1 !== 0) {
63
- getPlaceCodesWithParent(info.parentCode, areaCodes, list, key, pkey);
64
- }
65
- }
66
-
67
- return areaCodes;
68
- }
69
- export function nextTick(cb) {
70
- Promise.resolve().then(cb);
71
- }
72
16
  export function tryCatch(_x) {
73
17
  return _tryCatch.apply(this, arguments);
74
18
  }