@cloud-app-dev/vidc 2.1.0-alpha.8 → 2.2.0-alpha.2

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 (166) hide show
  1. package/.umirc.ts +4 -3
  2. package/es/Api/index.js +1 -1
  3. package/es/AppContext/Sync.d.ts +1 -0
  4. package/es/AppContext/interface.d.ts +4 -1
  5. package/es/CheckGroupFixed/index.d.ts +1 -0
  6. package/es/DeviceSelect/TreeType.d.ts +1 -0
  7. package/es/DeviceSelect/demo.d.ts +1 -0
  8. package/es/DeviceSelect/index.d.ts +1 -0
  9. package/es/DeviceSelect/index.js +1 -1
  10. package/es/Drag/DragAndDropItem.js +2 -2
  11. package/es/Drag/DropItem.js +2 -2
  12. package/es/Drawer/Demo.js +24 -3
  13. package/es/Drawer/Footer.d.ts +1 -0
  14. package/es/Drawer/index.d.ts +29 -3
  15. package/es/Drawer/index.js +155 -4
  16. package/es/FrontendPlayer/index.d.ts +2 -0
  17. package/es/FrontendPlayer/index.js +2 -0
  18. package/es/FullScreen/index.d.ts +2 -3
  19. package/es/FullScreen/index.js +14 -41
  20. package/es/InitialConfig/utils.d.ts +5 -5
  21. package/es/InitialConfig/utils.js +19 -19
  22. package/es/Input/index.d.ts +1 -0
  23. package/es/List/CheckExt.d.ts +1 -0
  24. package/es/List/DeviceList/index.js +1 -1
  25. package/es/List/DynamicDeviceList/Demo.d.ts +1 -0
  26. package/es/List/DynamicDeviceList/index.d.ts +1 -0
  27. package/es/List/GridList/index.js +0 -1
  28. package/es/List/VList/index.d.ts +1 -0
  29. package/es/List/index.d.ts +1 -0
  30. package/es/LoaderApp/index.js +26 -22
  31. package/es/LoaderApp/loader.js +2 -6
  32. package/es/LoaderApp/utils.d.ts +1 -0
  33. package/es/LoaderApp/utils.js +37 -0
  34. package/es/Modal/index.d.ts +27 -0
  35. package/es/Modal/index.js +155 -1
  36. package/es/Picture/component/DefaultRects/RectInfo.d.ts +1 -0
  37. package/es/Picture/component/DefaultRects/index.d.ts +2 -1
  38. package/es/Picture/component/DrawRect/index.d.ts +3 -4
  39. package/es/Picture/component/MoveContent/index.js +16 -12
  40. package/es/Picture/component/RectMenu/index.d.ts +2 -3
  41. package/es/Picture/component/Tools/index.js +0 -5
  42. package/es/Picture/component/WheelScale/index.d.ts +1 -0
  43. package/es/Picture/component/WheelScale/index.js +3 -3
  44. package/es/Picture/index.d.ts +1 -0
  45. package/es/Picture/index.js +4 -2
  46. package/es/Picture/interface.d.ts +4 -2
  47. package/es/Picture/utils.d.ts +1 -0
  48. package/es/Player/api/index.d.ts +71 -0
  49. package/es/Player/api/index.js +284 -0
  50. package/es/Player/contraller_bar/bar.d.ts +8 -0
  51. package/es/Player/contraller_bar/bar.js +21 -0
  52. package/es/Player/contraller_bar/contraller_event.d.ts +9 -0
  53. package/es/{RefModal/index.js → Player/contraller_bar/contraller_event.js} +39 -54
  54. package/es/Player/contraller_bar/index.d.ts +19 -0
  55. package/es/Player/contraller_bar/index.js +37 -0
  56. package/es/Player/contraller_bar/left_bar.d.ts +15 -0
  57. package/es/Player/contraller_bar/left_bar.js +91 -0
  58. package/es/Player/contraller_bar/right_bar.d.ts +13 -0
  59. package/es/Player/contraller_bar/right_bar.js +55 -0
  60. package/es/Player/contraller_bar/useBarStatus.d.ts +3 -0
  61. package/es/{RefDrawer/index.js → Player/contraller_bar/useBarStatus.js} +27 -46
  62. package/es/Player/demo.d.ts +2 -0
  63. package/es/Player/demo.js +269 -0
  64. package/es/Player/event/browserTabEvent.d.ts +9 -0
  65. package/es/Player/event/browserTabEvent.js +57 -0
  66. package/es/Player/event/errorEvent.d.ts +16 -0
  67. package/es/Player/event/errorEvent.js +120 -0
  68. package/es/Player/event/eventName.d.ts +3 -0
  69. package/es/Player/event/eventName.js +15 -0
  70. package/es/Player/event/index.d.ts +22 -0
  71. package/es/Player/event/index.js +175 -0
  72. package/es/Player/frontend_player.d.ts +15 -0
  73. package/es/Player/frontend_player.js +90 -0
  74. package/es/Player/frontend_timeline.d.ts +14 -0
  75. package/es/Player/frontend_timeline.js +138 -0
  76. package/es/Player/iconfont.d.ts +13 -0
  77. package/es/Player/iconfont.js +18 -0
  78. package/es/Player/index.d.ts +8 -0
  79. package/es/Player/index.js +8 -0
  80. package/es/Player/live_heart.d.ts +6 -0
  81. package/es/Player/live_heart.js +29 -0
  82. package/es/Player/message.d.ts +11 -0
  83. package/es/Player/message.js +150 -0
  84. package/es/Player/player.d.ts +75 -0
  85. package/es/Player/segment_player.d.ts +13 -0
  86. package/es/Player/segment_player.js +191 -0
  87. package/es/Player/segment_timeline.d.ts +16 -0
  88. package/es/Player/segment_timeline.js +154 -0
  89. package/es/Player/single_player.d.ts +5 -0
  90. package/es/Player/single_player.js +185 -0
  91. package/es/Player/style/bar.css +37 -0
  92. package/es/Player/style/iconfont.css +62 -0
  93. package/es/Player/style/index.css +22 -0
  94. package/es/Player/style/message.css +49 -0
  95. package/es/Player/style/slider.css +96 -0
  96. package/es/Player/style/timeline.css +92 -0
  97. package/es/Player/timeline.d.ts +11 -0
  98. package/es/Player/timeline.js +104 -0
  99. package/es/Player/util.d.ts +48 -0
  100. package/es/Player/util.js +172 -0
  101. package/es/Progress/index.d.ts +1 -0
  102. package/es/SegmentPlayer/index.d.ts +2 -0
  103. package/es/SegmentPlayer/index.js +2 -0
  104. package/es/Service/fetch-adapter.d.ts +12 -0
  105. package/es/Service/fetch-adapter.js +184 -0
  106. package/es/Service/http.d.ts +1 -1
  107. package/es/Service/http.js +4 -2
  108. package/es/Service/interface.d.ts +2 -1
  109. package/es/Tree/BaseTree/demo.d.ts +1 -0
  110. package/es/Tree/BaseTree/demo.js +3 -1
  111. package/es/Tree/BaseTree/index.d.ts +2 -2
  112. package/es/Tree/demo.d.ts +1 -0
  113. package/es/Tree/index.js +1 -1
  114. package/es/UserSelect/demo.d.ts +1 -0
  115. package/es/WorkerFlow/Form/Approver.d.ts +1 -0
  116. package/es/WorkerFlow/Form/Condition.d.ts +1 -0
  117. package/es/WorkerFlow/Form/Condition.js +2 -1
  118. package/es/WorkerFlow/Form/EmptyUserSet.d.ts +1 -0
  119. package/es/WorkerFlow/Form/EmptyUserSet.js +2 -1
  120. package/es/WorkerFlow/Form/FormAuth.d.ts +1 -0
  121. package/es/WorkerFlow/Form/GroupList.d.ts +1 -0
  122. package/es/WorkerFlow/Form/GroupSelect.d.ts +1 -0
  123. package/es/WorkerFlow/Form/GroupSelect.js +2 -1
  124. package/es/WorkerFlow/Form/Handle.d.ts +1 -0
  125. package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +1 -0
  126. package/es/WorkerFlow/Form/LevelGroupSelect.js +2 -1
  127. package/es/WorkerFlow/Form/Notifier.d.ts +1 -0
  128. package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +1 -0
  129. package/es/WorkerFlow/Form/UserAndGroupSelect.js +2 -1
  130. package/es/WorkerFlow/Form/UserSelect.d.ts +1 -0
  131. package/es/WorkerFlow/Form/UserSelect.js +2 -1
  132. package/es/WorkerFlow/Form/UserSet.d.ts +1 -0
  133. package/es/WorkerFlow/Form/UsersHandleType.d.ts +1 -0
  134. package/es/WorkerFlow/Nodes/Add.d.ts +1 -0
  135. package/es/WorkerFlow/Nodes/Add.js +1 -1
  136. package/es/WorkerFlow/Nodes/AddOption.d.ts +1 -0
  137. package/es/WorkerFlow/Nodes/AddOptionList.d.ts +1 -0
  138. package/es/WorkerFlow/Nodes/Approver.d.ts +1 -0
  139. package/es/WorkerFlow/Nodes/Condition.d.ts +1 -0
  140. package/es/WorkerFlow/Nodes/End.d.ts +1 -0
  141. package/es/WorkerFlow/Nodes/Handle.d.ts +1 -0
  142. package/es/WorkerFlow/Nodes/Node.d.ts +1 -0
  143. package/es/WorkerFlow/Nodes/Notifier.d.ts +1 -0
  144. package/es/WorkerFlow/Nodes/Render.d.ts +1 -0
  145. package/es/WorkerFlow/Nodes/Start.d.ts +1 -0
  146. package/es/WorkerFlow/Nodes/TitleElement.d.ts +1 -0
  147. package/es/WorkerFlow/Nodes/TitleElement.js +6 -2
  148. package/es/WorkerFlow/index.js +2 -1
  149. package/es/index.d.ts +5 -8
  150. package/es/index.js +6 -9
  151. package/es/typings.d.ts +1 -0
  152. package/package.json +15 -10
  153. package/tsconfig.json +3 -2
  154. package/typings/global.d.ts +4 -0
  155. package/es/AppRedirect/index.css +0 -0
  156. package/es/AppRedirect/index.d.ts +0 -16
  157. package/es/AppRedirect/index.js +0 -33
  158. package/es/AppRouter/index.d.ts +0 -8
  159. package/es/AppRouter/index.js +0 -17
  160. package/es/RefDrawer/index.d.ts +0 -15
  161. package/es/RefModal/index.d.ts +0 -15
  162. package/es/useDrawer/index.d.ts +0 -14
  163. package/es/useDrawer/index.js +0 -91
  164. package/es/useModal/index.d.ts +0 -14
  165. package/es/useModal/index.js +0 -93
  166. package/typings.d.ts +0 -2
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MutipleUserHandleType, NodeType, NodeUserType, UserSetType } from '../interface';
2
3
  interface IUserSetProps {
3
4
  userType?: UserSetType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MutipleUserHandleType } from '../interface';
2
3
  declare function UsersHandleType({ usersHandType, onChange }: {
3
4
  usersHandType: MutipleUserHandleType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem } from '../interface';
2
3
  interface IAddNodeProps {
3
4
  node: NodeItem;
@@ -35,7 +35,7 @@ function AddNode(_ref) {
35
35
  }, [node]);
36
36
  useEffect(function () {
37
37
  if (!showPop) {
38
- return null;
38
+ return undefined;
39
39
  }
40
40
 
41
41
  var fn = function fn(e) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface IAddNodeOptionProps {
2
3
  type: string;
3
4
  onClick: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AddNodeType, NodeType } from '../interface';
2
3
  interface IAddNodeListProps {
3
4
  onOptionClick: (type: NodeType) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem } from '../interface';
2
3
  interface IApproverNodeProps {
3
4
  parentNode: NodeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem } from '../interface';
2
3
  interface IConditionNodeProps {
3
4
  conditionNodes: NodeItem[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface IEndNodeProps {
2
3
  id: string;
3
4
  nodeName: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem } from '../interface';
2
3
  interface IHandleNodeProps {
3
4
  parentNode: NodeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem } from '../interface';
2
3
  interface IMatchNodeProps {
3
4
  config: NodeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem } from '../interface';
2
3
  interface INotifierNodeProps {
3
4
  parentNode: NodeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem } from '../interface';
2
3
  interface IRenderProps {
3
4
  config: NodeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeItem, NodeUserType } from '../interface';
2
3
  interface IStartNode {
3
4
  node: NodeItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface ITitleElementProps {
2
3
  placeholder: string;
3
4
  nodeName: string;
@@ -67,7 +67,9 @@ function TitleElement(_ref) {
67
67
  }, [readOnly, isFocus, state.editable]);
68
68
 
69
69
  _useUpdateEffect(function () {
70
- return !readOnly && !state.editable && onTitleChange && onTitleChange(state.title);
70
+ if (!readOnly && !state.editable && onTitleChange) {
71
+ onTitleChange(state.title);
72
+ }
71
73
  }, [state.title, state.editable]);
72
74
 
73
75
  _useUpdateEffect(function () {
@@ -77,7 +79,9 @@ function TitleElement(_ref) {
77
79
  }, [state.editable]);
78
80
 
79
81
  _useUpdateEffect(function () {
80
- return !state.title && !isFocus && setTitle(placeholder);
82
+ if (!state.title && !isFocus) {
83
+ setTitle(placeholder);
84
+ }
81
85
  }, [isFocus, state.title, placeholder]);
82
86
 
83
87
  return /*#__PURE__*/React.createElement("div", {
@@ -39,8 +39,9 @@ import Render from './Nodes/Render';
39
39
  import Tools from './Tools';
40
40
  import WFC from './OperatorContext';
41
41
  import { filterNoticeNode, getJAVATaskData, getUserFormKeys } from './utils';
42
- import RefDrawer from '../RefDrawer';
42
+ import Drawer from '../Drawer';
43
43
  import "./index.css";
44
+ var RefDrawer = Drawer.RefDrawer;
44
45
  var FormMap = {
45
46
  1: ApproverForm,
46
47
  4: ConditionForm,
package/es/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  export { default as Api } from './Api';
2
2
  export { default as AppContext } from './AppContext';
3
- export { default as AppRedirect } from './AppRedirect';
4
- export { default as AppRouter } from './AppRouter';
5
3
  export { default as Auth } from './Auth';
6
4
  export { default as AutoExit } from './AutoExit';
7
5
  export { default as Box } from './Box';
@@ -13,6 +11,7 @@ export { default as DeviceSelect } from './DeviceSelect';
13
11
  export { default as Dict } from './Dict';
14
12
  export { default as Drag } from './Drag';
15
13
  export { default as Drawer } from './Drawer';
14
+ export { default as FrontendPlayer } from './FrontendPlayer';
16
15
  export { default as FullScreen } from './FullScreen';
17
16
  export { default as HightLevel } from './HightLevel';
18
17
  export { default as IconFont } from './IconFont';
@@ -27,17 +26,15 @@ export { default as LoaderApp } from './LoaderApp';
27
26
  export { default as LoaderScript } from './LoaderScript';
28
27
  export { default as Modal } from './Modal';
29
28
  export { default as Picture } from './Picture';
29
+ export { default as Player } from './Player';
30
30
  export { default as Progress } from './Progress';
31
- export { default as RefDrawer } from './RefDrawer';
32
- export { default as RefModal } from './RefModal';
31
+ export { default as SegmentPlayer } from './SegmentPlayer';
33
32
  export { default as Service } from './Service';
34
33
  export { default as TableLayout } from './TableLayout';
35
34
  export { default as ThemeAntd } from './ThemeAntd';
36
35
  export { default as Title } from './Title';
37
36
  export { default as Tree } from './Tree';
38
- export { default as useDrawer } from './useDrawer';
39
- export { default as useHistory } from './useHistory';
40
- export { default as useHttp } from './useHttp';
41
- export { default as useModal } from './useModal';
42
37
  export { default as UserSelect } from './UserSelect';
43
38
  export { default as WorkerFlow } from './WorkerFlow';
39
+ export { default as useHistory } from './useHistory';
40
+ export { default as useHttp } from './useHttp';
package/es/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  export { default as Api } from './Api';
2
2
  export { default as AppContext } from './AppContext';
3
- export { default as AppRedirect } from './AppRedirect';
4
- export { default as AppRouter } from './AppRouter';
5
3
  export { default as Auth } from './Auth';
6
4
  export { default as AutoExit } from './AutoExit';
7
5
  export { default as Box } from './Box';
@@ -13,6 +11,7 @@ export { default as DeviceSelect } from './DeviceSelect';
13
11
  export { default as Dict } from './Dict';
14
12
  export { default as Drag } from './Drag';
15
13
  export { default as Drawer } from './Drawer';
14
+ export { default as FrontendPlayer } from './FrontendPlayer';
16
15
  export { default as FullScreen } from './FullScreen';
17
16
  export { default as HightLevel } from './HightLevel';
18
17
  export { default as IconFont } from './IconFont';
@@ -27,17 +26,15 @@ export { default as LoaderApp } from './LoaderApp';
27
26
  export { default as LoaderScript } from './LoaderScript';
28
27
  export { default as Modal } from './Modal';
29
28
  export { default as Picture } from './Picture';
29
+ export { default as Player } from './Player';
30
30
  export { default as Progress } from './Progress';
31
- export { default as RefDrawer } from './RefDrawer';
32
- export { default as RefModal } from './RefModal';
31
+ export { default as SegmentPlayer } from './SegmentPlayer';
33
32
  export { default as Service } from './Service';
34
33
  export { default as TableLayout } from './TableLayout';
35
34
  export { default as ThemeAntd } from './ThemeAntd';
36
35
  export { default as Title } from './Title';
37
36
  export { default as Tree } from './Tree';
38
- export { default as useDrawer } from './useDrawer';
39
- export { default as useHistory } from './useHistory';
40
- export { default as useHttp } from './useHttp';
41
- export { default as useModal } from './useModal';
42
37
  export { default as UserSelect } from './UserSelect';
43
- export { default as WorkerFlow } from './WorkerFlow';
38
+ export { default as WorkerFlow } from './WorkerFlow';
39
+ export { default as useHistory } from './useHistory';
40
+ export { default as useHttp } from './useHttp';
@@ -0,0 +1 @@
1
+ /// <reference path="../typings/global.d.ts"/>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@cloud-app-dev/vidc",
4
4
  "description": "Video Image Data Componennts",
5
- "version": "2.1.0-alpha.8",
5
+ "version": "2.2.0-alpha.2",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",
@@ -30,12 +30,16 @@
30
30
  ]
31
31
  },
32
32
  "dependencies": {
33
+ "@types/lodash-es": "^4.17.6",
33
34
  "add-dom-event-listener": "^1.1.0",
34
35
  "ahooks": "^3.1.0",
36
+ "axios": "^0.27.2",
35
37
  "chroma-js": "^2.1.2",
36
- "fetch-like-axios": "^0.0.5",
38
+ "flv.zv.js": "^2.2.0",
39
+ "hls.js": "^1.1.5",
37
40
  "immer": "^9.0.5",
38
41
  "lodash": "^4.17.21",
42
+ "lodash-es": "^4.17.21",
39
43
  "rc-queue-anim": "^2.0.0"
40
44
  },
41
45
  "devDependencies": {
@@ -44,19 +48,20 @@
44
48
  "@types/chroma-js": "^2.1.3",
45
49
  "@types/lodash": "^4.14.178",
46
50
  "@types/node": "^17.0.5",
51
+ "@types/react": "^18.0.9",
52
+ "@types/react-dom": "^18.0.4",
47
53
  "@umijs/test": "^3.0.5",
48
- "antd": "^4.17.0",
54
+ "antd": "^4.20.6",
49
55
  "babel-plugin-import": "^1.13.3",
50
- "dumi": "^1.1.25",
51
- "father-build": "^1.19.8",
56
+ "dumi": "^1.1.40",
57
+ "father-build": "^1.22.1",
52
58
  "gh-pages": "^3.0.0",
59
+ "history": "^5.3.0",
53
60
  "lint-staged": "^10.0.7",
54
61
  "prettier": "^2.2.1",
55
- "react": "^17.0.2",
56
- "react-dom": "^17.0.2",
57
- "react-router-dom": "^6.2.1",
58
- "rollup-plugin-node-polyfills": "^0.2.1",
59
- "tslib": "^2.3.1",
62
+ "react": "^18.1.0",
63
+ "react-dom": "^18.1.0",
64
+ "react-router-dom": "^6.3.0",
60
65
  "typescript": "^4.5.4",
61
66
  "yorkie": "^2.0.0"
62
67
  },
package/tsconfig.json CHANGED
@@ -32,6 +32,7 @@
32
32
  "allowSyntheticDefaultImports": true,
33
33
  "typeRoots": ["typings", "node_modules/@types"]
34
34
  },
35
- "include": ["src/**/*", "dosc/**/*"],
36
- "exclude": ["node_modules", "lib", "es", "dist", "typings", "**/__test__", "test"]
35
+ "include": ["src/**/*", "dosc/**/*", "typings/*.d.ts"],
36
+
37
+ "exclude": ["node_modules", "lib", "es", "dist", "**/__test__", "test"]
37
38
  }
@@ -0,0 +1,4 @@
1
+ declare module 'axios/lib/core/settle';
2
+ declare module 'axios/lib/helpers/buildURL';
3
+ declare module 'axios/lib/core/buildFullPath';
4
+ declare module 'axios/lib/cancel/CanceledError';
File without changes
@@ -1,16 +0,0 @@
1
- import * as H from 'history';
2
- import './index.less';
3
- interface AppRedirectProps {
4
- /**
5
- * @description 匹配路径
6
- * @default -
7
- */
8
- path?: string | string[];
9
- /**
10
- * @description 重定向路径
11
- * @description -
12
- */
13
- to: H.Location;
14
- }
15
- declare function AppRedirect({ path, to }: AppRedirectProps): JSX.Element;
16
- export default AppRedirect;
@@ -1,33 +0,0 @@
1
- import React, { useEffect } from 'react';
2
- import { useLocation, useNavigate } from 'react-router-dom';
3
- import "./index.css";
4
-
5
- var getKey = function getKey() {
6
- return Math.random().toString(36).substr(2);
7
- };
8
-
9
- function AppRedirect(_ref) {
10
- var path = _ref.path,
11
- to = _ref.to;
12
- var navigate = useNavigate();
13
- var location = useLocation();
14
- useEffect(function () {
15
- if (path === location.pathname) {
16
- if (typeof to !== 'string') {
17
- navigate("".concat(to.pathname).concat(to.search ? "".concat(to.search, "&key=").concat(getKey()) : "?key=".concat(getKey())), {
18
- replace: true,
19
- state: Object.assign({}, to.state, {
20
- isReplace: true
21
- })
22
- });
23
- } else {
24
- navigate("".concat(to, "?key").concat(getKey()), {
25
- replace: true
26
- });
27
- }
28
- }
29
- }, [path, location.pathname, to, history]);
30
- return /*#__PURE__*/React.createElement(React.Fragment, null);
31
- }
32
-
33
- export default AppRedirect;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface AppRouterProps {
3
- basename?: string;
4
- children?: React.ReactNode;
5
- static?: boolean;
6
- }
7
- declare function AppRouter({ children, ...props }: AppRouterProps): JSX.Element;
8
- export default AppRouter;
@@ -1,17 +0,0 @@
1
- import { __rest } from "tslib";
2
- import React from 'react';
3
- import { Router, Routes } from 'react-router-dom';
4
- import InstanceHistory from '../InstanceHistory';
5
-
6
- function AppRouter(_a) {
7
- var children = _a.children,
8
- props = __rest(_a, ["children"]);
9
-
10
- return /*#__PURE__*/React.createElement(Router, Object.assign({}, props, {
11
- navigator: InstanceHistory,
12
- navigationType: InstanceHistory.action,
13
- location: InstanceHistory.location
14
- }), /*#__PURE__*/React.createElement(Routes, null, children));
15
- }
16
-
17
- export default AppRouter;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- export interface IUseDrawerHookState {
3
- content?: React.ReactNode;
4
- visible?: boolean;
5
- title?: React.ReactNode;
6
- onOk?: () => void;
7
- width?: number | string;
8
- className?: string;
9
- }
10
- export interface IRefDrawerMethodsProps {
11
- open: (options: IUseDrawerHookState) => void;
12
- close: () => void;
13
- }
14
- declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<IRefDrawerMethodsProps>>;
15
- export default _default;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- export interface IUseModalHookState {
3
- content?: React.ReactNode;
4
- visible?: boolean;
5
- title?: React.ReactNode;
6
- onOk?: () => void;
7
- width?: number | string;
8
- className?: string;
9
- }
10
- export interface IRefModalMethodsProps {
11
- open: (options: IUseModalHookState) => void;
12
- close: () => void;
13
- }
14
- declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<IRefModalMethodsProps>>;
15
- export default _default;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- export interface IUseDrawerHookState {
3
- content?: React.ReactNode;
4
- visible?: boolean;
5
- title?: React.ReactNode;
6
- onOk?: () => void;
7
- width?: number | string;
8
- className?: string;
9
- }
10
- declare function useDrawer(prefixCls?: string): {
11
- open: (options: IUseDrawerHookState) => void;
12
- close: () => void;
13
- };
14
- export default useDrawer;
@@ -1,91 +0,0 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
-
4
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
-
6
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
-
8
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9
-
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11
-
12
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
13
-
14
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
-
16
- import React, { useContext, useEffect, useMemo, useState } from 'react';
17
- import ReactDOM from 'react-dom';
18
- import Drawer from '../Drawer';
19
- import CC from '../ConfigContext';
20
-
21
- function useDrawer() {
22
- var prefixCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'cloudapp';
23
- var context = useContext(CC.Context);
24
- var root = useMemo(function () {
25
- return (context === null || context === void 0 ? void 0 : context.root) || document.body;
26
- }, [context === null || context === void 0 ? void 0 : context.root]);
27
- var div = useMemo(function () {
28
- return document.createElement('div');
29
- }, []);
30
-
31
- var _useState = useState({
32
- content: null,
33
- visible: false,
34
- title: '',
35
- onOk: undefined,
36
- width: undefined,
37
- className: undefined
38
- }),
39
- _useState2 = _slicedToArray(_useState, 2),
40
- state = _useState2[0],
41
- setState = _useState2[1];
42
-
43
- useEffect(function () {
44
- root.appendChild(div);
45
- return function () {
46
- root.removeChild(div);
47
- ReactDOM.unmountComponentAtNode(div);
48
- div.remove();
49
- };
50
- }, []);
51
- useEffect(function () {
52
- ReactDOM.render( /*#__PURE__*/React.createElement(_ConfigProvider, {
53
- prefixCls: prefixCls,
54
- getPopupContainer: function getPopupContainer() {
55
- return root;
56
- }
57
- }, /*#__PURE__*/React.createElement(Drawer, {
58
- visible: state.visible,
59
- onOk: state.onOk,
60
- onClose: close,
61
- destroyOnClose: true,
62
- title: state.title,
63
- width: state.width,
64
- className: state.className,
65
- getContainer: false
66
- }, state.content)), div);
67
- }, [state.content, state.visible, state.title, state.onOk, state.width, state.className]);
68
-
69
- var open = function open(options) {
70
- setState(function (old) {
71
- return Object.assign(Object.assign(Object.assign({}, old), options), {
72
- visible: true
73
- });
74
- });
75
- };
76
-
77
- var close = function close() {
78
- setState(function (old) {
79
- return Object.assign(Object.assign({}, old), {
80
- visible: false
81
- });
82
- });
83
- };
84
-
85
- return {
86
- open: open,
87
- close: close
88
- };
89
- }
90
-
91
- export default useDrawer;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- export interface IUseModalHookState {
3
- content?: React.ReactNode;
4
- visible?: boolean;
5
- title?: React.ReactNode;
6
- onOk?: () => void;
7
- width?: number | string;
8
- className?: string;
9
- }
10
- declare function useModal(prefixCls?: string): {
11
- open: (options: IUseModalHookState) => void;
12
- close: () => void;
13
- };
14
- export default useModal;
@@ -1,93 +0,0 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
-
4
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
-
6
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
-
8
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
9
-
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11
-
12
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
13
-
14
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
-
16
- import React, { useContext, useEffect, useMemo, useState } from 'react';
17
- import ReactDOM from 'react-dom';
18
- import Modal from '../Modal';
19
- import CC from '../ConfigContext';
20
-
21
- function useModal() {
22
- var prefixCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'cloudapp';
23
- var context = useContext(CC.Context);
24
- var root = useMemo(function () {
25
- return (context === null || context === void 0 ? void 0 : context.root) || document.body;
26
- }, [context === null || context === void 0 ? void 0 : context.root]);
27
- var div = useMemo(function () {
28
- return document.createElement('div');
29
- }, []);
30
-
31
- var _useState = useState({
32
- content: null,
33
- visible: false,
34
- title: '',
35
- onOk: undefined,
36
- width: undefined,
37
- className: undefined
38
- }),
39
- _useState2 = _slicedToArray(_useState, 2),
40
- state = _useState2[0],
41
- setState = _useState2[1];
42
-
43
- useEffect(function () {
44
- root.appendChild(div);
45
- return function () {
46
- root.removeChild(div);
47
- ReactDOM.unmountComponentAtNode(div);
48
- div.remove();
49
- };
50
- }, []);
51
- useEffect(function () {
52
- ReactDOM.render( /*#__PURE__*/React.createElement(_ConfigProvider, {
53
- prefixCls: prefixCls,
54
- getPopupContainer: function getPopupContainer() {
55
- return root;
56
- }
57
- }, /*#__PURE__*/React.createElement(Modal, {
58
- okText: "\u786E\u5B9A",
59
- cancelText: "\u53D6\u6D88",
60
- visible: state.visible,
61
- onOk: state.onOk,
62
- onCancel: close,
63
- destroyOnClose: true,
64
- title: state.title,
65
- width: state.width,
66
- className: state.className,
67
- getContainer: false
68
- }, state.content)), div);
69
- }, [state.content, state.visible, state.title, state.onOk, state.width, state.className]);
70
-
71
- var open = function open(options) {
72
- setState(function (old) {
73
- return Object.assign(Object.assign(Object.assign({}, old), options), {
74
- visible: true
75
- });
76
- });
77
- };
78
-
79
- var close = function close() {
80
- setState(function (old) {
81
- return Object.assign(Object.assign({}, old), {
82
- visible: false
83
- });
84
- });
85
- };
86
-
87
- return {
88
- open: open,
89
- close: close
90
- };
91
- }
92
-
93
- export default useModal;
package/typings.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare module '*.css';
2
- declare module '*.less';