@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
@@ -1,22 +0,0 @@
1
- import type { DrawerProps } from 'antd';
2
- import React from 'react';
3
-
4
- export interface IDrawerProps extends DrawerProps {
5
- cancelText?: string;
6
-
7
- onOk?: (e: React.MouseEvent) => void;
8
-
9
- /**
10
- * @description 确认按钮文本
11
- * @default 确定
12
- * @type string
13
- */
14
- okText?: string;
15
- }
16
-
17
- export interface IFooterProps {
18
- onClose: (e: React.MouseEvent) => void;
19
- cancelText: string;
20
- okText: string;
21
- onOk: (e: React.MouseEvent) => void;
22
- }
package/es/Input/demo.js DELETED
@@ -1,16 +0,0 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
- import React from 'react';
4
- import Input from "./index";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
-
7
- var App = function App() {
8
- return /*#__PURE__*/_jsx(_ConfigProvider, {
9
- prefixCls: "cloudapp",
10
- children: /*#__PURE__*/_jsx(Input, {
11
- onChange: console.log
12
- })
13
- });
14
- };
15
-
16
- export default App;
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputProps } from 'antd';
3
- import './index.less';
4
- interface IInputProps extends Omit<InputProps, 'onChange'> {
5
- defaultValue?: string;
6
- value?: string;
7
- className?: string;
8
- onEnter?: (val: string) => void;
9
- onChange?: (val: string) => void;
10
- }
11
- declare function Input({ prefix, className, suffix, allowClear, defaultValue, value, onChange, onEnter, ...props }: IInputProps): JSX.Element;
12
- declare namespace Input {
13
- var defaultProps: {
14
- className: string;
15
- prefix: JSX.Element;
16
- allowClear: boolean;
17
- };
18
- }
19
- export default Input;
@@ -1,12 +0,0 @@
1
- .bc-search-input {
2
- input.@{ant-prefix}-input {
3
- font-weight: normal;
4
- }
5
- .@{ant-prefix}-input-prefix,
6
- .@{ant-prefix}-input-suffix {
7
- > i {
8
- font-size: 16px;
9
- color: var(--icon);
10
- }
11
- }
12
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const App: () => JSX.Element;
3
- export default App;
package/es/Modal/demo.js DELETED
@@ -1,106 +0,0 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
- import "antd/lib/button/style";
4
- import _Button from "antd/lib/button";
5
-
6
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
7
-
8
- 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."); }
9
-
10
- 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); }
11
-
12
- 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; }
13
-
14
- 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; }
15
-
16
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
-
18
- import React, { useRef, useState } from 'react';
19
- import Modal from "./index";
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- import { jsxs as _jsxs } from "react/jsx-runtime";
22
- import { Fragment as _Fragment } from "react/jsx-runtime";
23
-
24
- var App = function App() {
25
- var _Modal$useModal = Modal.useModal(),
26
- open = _Modal$useModal.open;
27
-
28
- var _useState = useState(false),
29
- _useState2 = _slicedToArray(_useState, 2),
30
- visible = _useState2[0],
31
- setVisible = _useState2[1];
32
-
33
- var ref = useRef(null);
34
- return /*#__PURE__*/_jsxs(_ConfigProvider, {
35
- prefixCls: "cloudapp",
36
- children: [/*#__PURE__*/_jsxs("div", {
37
- children: [/*#__PURE__*/_jsx(_Button, {
38
- type: "primary",
39
- onClick: function onClick() {
40
- return setVisible(true);
41
- },
42
- children: "Open Modal of 1000px width"
43
- }), /*#__PURE__*/_jsxs(Modal, {
44
- title: "Modal 1000px width",
45
- centered: true,
46
- visible: visible,
47
- onOk: function onOk() {
48
- return setVisible(false);
49
- },
50
- onCancel: function onCancel() {
51
- return setVisible(false);
52
- },
53
- width: 1000,
54
- children: [/*#__PURE__*/_jsx("p", {
55
- children: "some contents..."
56
- }), /*#__PURE__*/_jsx("p", {
57
- children: "some contents..."
58
- }), /*#__PURE__*/_jsx("p", {
59
- children: "some contents..."
60
- })]
61
- })]
62
- }), /*#__PURE__*/_jsx("div", {
63
- children: /*#__PURE__*/_jsx(_Button, {
64
- type: "primary",
65
- onClick: function onClick() {
66
- return open({
67
- content: /*#__PURE__*/_jsxs(_Fragment, {
68
- children: [/*#__PURE__*/_jsx("p", {
69
- children: "some contents..."
70
- }), /*#__PURE__*/_jsx("p", {
71
- children: "some contents..."
72
- }), /*#__PURE__*/_jsx("p", {
73
- children: "some contents..."
74
- })]
75
- })
76
- });
77
- },
78
- children: "useModal"
79
- })
80
- }), /*#__PURE__*/_jsxs("div", {
81
- children: [/*#__PURE__*/_jsx(_Button, {
82
- type: "primary",
83
- onClick: function onClick() {
84
- var _ref$current;
85
-
86
- return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.open({
87
- content: /*#__PURE__*/_jsxs(_Fragment, {
88
- children: [/*#__PURE__*/_jsx("p", {
89
- children: "some contents..."
90
- }), /*#__PURE__*/_jsx("p", {
91
- children: "some contents..."
92
- }), /*#__PURE__*/_jsx("p", {
93
- children: "some contents..."
94
- })]
95
- })
96
- });
97
- },
98
- children: "RefModal"
99
- }), /*#__PURE__*/_jsx(Modal.RefModal, {
100
- ref: ref
101
- })]
102
- })]
103
- });
104
- };
105
-
106
- export default App;
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- import { IModalProps } from './interface';
4
- declare function Modal({ children, className, style, getContainer, ...props }: IModalProps): JSX.Element;
5
- declare namespace Modal {
6
- var defaultProps: {
7
- className: string;
8
- getContainer: boolean;
9
- };
10
- var info: import("antd/lib/modal/confirm").ModalFunc;
11
- var success: import("antd/lib/modal/confirm").ModalFunc;
12
- var error: import("antd/lib/modal/confirm").ModalFunc;
13
- var warn: import("antd/lib/modal/confirm").ModalFunc;
14
- var warning: import("antd/lib/modal/confirm").ModalFunc;
15
- var confirm: import("antd/lib/modal/confirm").ModalFunc;
16
- var destroyAll: () => void;
17
- var useModal: (prefixCls?: string) => {
18
- open: (options: IUseModalHookState) => void;
19
- close: () => void;
20
- };
21
- var useAntdModal: typeof import("antd/lib/modal/useModal").default;
22
- var RefModal: React.ForwardRefExoticComponent<IModalProps & React.RefAttributes<IRefModalMethodsProps>>;
23
- }
24
- export interface IUseModalHookState {
25
- content?: React.ReactNode;
26
- visible?: boolean;
27
- title?: React.ReactNode;
28
- onOk?: () => void;
29
- width?: number | string;
30
- className?: string;
31
- }
32
- export interface IUseModalHookState {
33
- content?: React.ReactNode;
34
- visible?: boolean;
35
- title?: React.ReactNode;
36
- onOk?: () => void;
37
- width?: number | string;
38
- className?: string;
39
- }
40
- export interface IRefModalMethodsProps {
41
- open: (options: IUseModalHookState) => void;
42
- close: () => void;
43
- }
44
- export default Modal;
package/es/Modal/index.js DELETED
@@ -1,197 +0,0 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
- import "antd/lib/modal/style";
4
- import _Modal from "antd/lib/modal";
5
- var _excluded = ["children", "className", "style", "getContainer"];
6
-
7
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
-
9
- 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."); }
10
-
11
- 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); }
12
-
13
- 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; }
14
-
15
- 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; }
16
-
17
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
-
19
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
-
21
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22
-
23
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
-
25
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
26
-
27
- 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; }
28
-
29
- import React, { useContext, useEffect, useImperativeHandle, useMemo, useState } from 'react';
30
- import * as ReactDOMClient from 'react-dom/client';
31
- import CC from "../ConfigContext";
32
- import "./index.less";
33
- import { jsx as _jsx } from "react/jsx-runtime";
34
-
35
- function Modal(_ref) {
36
- var children = _ref.children,
37
- className = _ref.className,
38
- style = _ref.style,
39
- getContainer = _ref.getContainer,
40
- props = _objectWithoutProperties(_ref, _excluded);
41
-
42
- return /*#__PURE__*/_jsx(_Modal, _objectSpread(_objectSpread({
43
- style: _objectSpread(_objectSpread({}, style), {}, {
44
- textAlign: 'left'
45
- }),
46
- getContainer: getContainer,
47
- className: "lm-modal-container ".concat(className)
48
- }, props), {}, {
49
- children: children
50
- }));
51
- }
52
-
53
- Modal.defaultProps = {
54
- className: '',
55
- getContainer: false
56
- };
57
-
58
- function useModal() {
59
- var prefixCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'cloudapp';
60
- var context = useContext(CC.Context);
61
- var container = useMemo(function () {
62
- var _context$root;
63
-
64
- return (_context$root = context === null || context === void 0 ? void 0 : context.root) !== null && _context$root !== void 0 ? _context$root : document.body;
65
- }, [context === null || context === void 0 ? void 0 : context.root]);
66
- var div = useMemo(function () {
67
- return document.createElement('div');
68
- }, []);
69
-
70
- var _useState = useState({
71
- content: null,
72
- visible: false,
73
- title: '',
74
- onOk: undefined,
75
- width: undefined,
76
- className: undefined
77
- }),
78
- _useState2 = _slicedToArray(_useState, 2),
79
- state = _useState2[0],
80
- setState = _useState2[1];
81
-
82
- var root = useMemo(function () {
83
- return ReactDOMClient.createRoot(div);
84
- }, [div]);
85
-
86
- var open = function open(options) {
87
- setState(function (old) {
88
- return _objectSpread(_objectSpread(_objectSpread({}, old), options), {}, {
89
- visible: true
90
- });
91
- });
92
- };
93
-
94
- var close = function close() {
95
- setState(function (old) {
96
- return _objectSpread(_objectSpread({}, old), {}, {
97
- visible: false
98
- });
99
- });
100
- };
101
-
102
- useEffect(function () {
103
- container.appendChild(div);
104
- return function () {
105
- // eslint-disable-next-line no-sequences
106
- setTimeout(function () {
107
- return root.unmount(), div.remove();
108
- }, 100);
109
- };
110
- }, [container, div, root]);
111
- useEffect(function () {
112
- root.render( /*#__PURE__*/_jsx(_ConfigProvider, {
113
- prefixCls: prefixCls,
114
- getPopupContainer: function getPopupContainer() {
115
- return container;
116
- },
117
- children: /*#__PURE__*/_jsx(Modal, {
118
- okText: "\u786E\u5B9A",
119
- cancelText: "\u53D6\u6D88",
120
- open: state.visible,
121
- onOk: state.onOk,
122
- onCancel: close,
123
- destroyOnClose: true,
124
- title: state.title,
125
- width: state.width,
126
- className: state.className,
127
- getContainer: false,
128
- children: state.content
129
- })
130
- }));
131
- }, [state.content, state.visible, state.title, state.onOk, state.width, state.className, root, prefixCls, container]);
132
- return {
133
- open: open,
134
- close: close
135
- };
136
- }
137
-
138
- var RefModal = /*#__PURE__*/React.forwardRef(function RefModal(props, ref) {
139
- var _useState3 = useState({
140
- content: null,
141
- visible: false,
142
- title: '',
143
- onOk: undefined,
144
- width: undefined,
145
- className: undefined
146
- }),
147
- _useState4 = _slicedToArray(_useState3, 2),
148
- state = _useState4[0],
149
- setState = _useState4[1];
150
-
151
- var open = function open(options) {
152
- setState(function (old) {
153
- return _objectSpread(_objectSpread(_objectSpread({}, old), options), {}, {
154
- visible: true
155
- });
156
- });
157
- };
158
-
159
- var close = function close() {
160
- setState(function (old) {
161
- return _objectSpread(_objectSpread({}, old), {}, {
162
- visible: false
163
- });
164
- });
165
- }; // eslint-disable-next-line react-hooks/exhaustive-deps
166
-
167
-
168
- useImperativeHandle(ref, function () {
169
- return {
170
- open: open,
171
- close: close
172
- };
173
- }, [state]);
174
- return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({}, props), {}, {
175
- okText: "\u786E\u5B9A",
176
- cancelText: "\u53D6\u6D88",
177
- open: state.visible,
178
- onOk: state.onOk,
179
- onCancel: close,
180
- destroyOnClose: true,
181
- title: state.title,
182
- width: state.width,
183
- className: state.className,
184
- children: state.content
185
- }));
186
- });
187
- Modal.info = _Modal.info;
188
- Modal.success = _Modal.success;
189
- Modal.error = _Modal.error;
190
- Modal.warn = _Modal.warn;
191
- Modal.warning = _Modal.warning;
192
- Modal.confirm = _Modal.confirm;
193
- Modal.destroyAll = _Modal.destroyAll;
194
- Modal.useModal = useModal;
195
- Modal.useAntdModal = _Modal.useModal;
196
- Modal.RefModal = RefModal;
197
- export default Modal;
@@ -1,44 +0,0 @@
1
- .lm-modal-container.@{ant-prefix}-modal {
2
- padding-bottom: 0;
3
- color: inherit;
4
- .@{ant-prefix}-modal-content {
5
- display: flex;
6
- height: 100%;
7
- overflow: hidden;
8
- background-color: transparent;
9
- border-radius: var(--redius1);
10
- flex-direction: column;
11
- }
12
- .@{ant-prefix}-modal-close {
13
- color: inherit;
14
- .@{ant-prefix}-modal-close-x {
15
- width: 48px;
16
- height: 47px;
17
- line-height: 48px;
18
- }
19
- }
20
- .@{ant-prefix}-modal-header {
21
- padding: 12px 24px;
22
- padding-right: 56px;
23
- color: inherit;
24
- background: var(--modal-title-bg);
25
- border-radius: 0;
26
- border-bottom-color: var(--modal-divider-color);
27
- .@{ant-prefix}-modal-title {
28
- font-size: var(--fs-large);
29
- color: inherit;
30
- }
31
- }
32
-
33
- .@{ant-prefix}-modal-body {
34
- overflow: hidden;
35
- background: var(--modal-content-bg);
36
- flex: 1;
37
- }
38
- .@{ant-prefix}-modal-footer {
39
- padding: 12px 24px;
40
- background: var(--modal-footer-bg);
41
- border-radius: 0;
42
- border-top-color: var(--modal-divider-color);
43
- }
44
- }
@@ -1,23 +0,0 @@
1
- import { ModalProps, ModalFuncProps } from 'antd/lib/modal/Modal';
2
- import * as React from 'react';
3
-
4
- declare type getContainerFunc = () => HTMLElement;
5
-
6
- export interface IModalProps extends ModalProps {}
7
- export interface IModalFuncProps extends ModalFuncProps {}
8
- export declare type ModalFunc = (props: ModalFuncProps) => {
9
- destroy: () => void;
10
- update: (newConfig: ModalFuncProps) => void;
11
- };
12
-
13
- export interface IModalStatic {
14
- info: ModalFunc;
15
- success: ModalFunc;
16
- error: ModalFunc;
17
- warn: ModalFunc;
18
- warning: ModalFunc;
19
- confirm: ModalFunc;
20
- destroyAll: () => void;
21
- }
22
-
23
- export declare const ModalFuncProps: React.FC<ModalFuncProps>;
@@ -1,5 +0,0 @@
1
- import { PositionType } from './interface';
2
- export declare function computedBound(ele: HTMLElement, currentPosition: PositionType, scale: number, rotate: number): {
3
- x: number;
4
- y: number;
5
- } | undefined;
@@ -1,77 +0,0 @@
1
- export function computedBound(ele, currentPosition, scale, rotate) {
2
- var data = currentPosition;
3
- var eleRect = ele.getBoundingClientRect();
4
- var isHorizontal = Math.abs(rotate) % 180 === 0;
5
- var w = eleRect.width;
6
- var h = eleRect.height;
7
- var lx = 0,
8
- ly = 0;
9
-
10
- if (scale === 1 && isHorizontal) {
11
- return {
12
- x: 0,
13
- y: 0
14
- };
15
- }
16
-
17
- if (scale === 1 && !isHorizontal) {
18
- lx = 0;
19
- ly = (w - h) / 2;
20
- } else {
21
- //TODO 这是限制x区域,应该是使用原来高度的缩放大小来计算,
22
- if (h * scale < w && !isHorizontal) {
23
- //TODO 放大后竖向是 h*scale<w是 x = 0,
24
- lx = 0;
25
- } else {
26
- //TODO 得到缩放后可移动区域 在减去误差 (w - h) / 2
27
- lx = !isHorizontal ? Math.round(h * (scale - 1) / 2 - (w - h) / 2) : Math.round(w * (scale - 1) / 2);
28
- } //TODO y的限制区域应该是原来宽度的限制区域计算后还要加上原始的(w-h)/2
29
-
30
-
31
- ly = !isHorizontal ? Math.round(w * (scale - 1) / 2 + (w - h) / 2) : Math.round(h * (scale - 1) / 2);
32
- }
33
-
34
- var x = 0,
35
- y = 0;
36
-
37
- if (data.x >= 0 && data.x > lx) {
38
- x = lx;
39
- }
40
-
41
- if (data.x >= 0 && data.x < lx) {
42
- x = data.x;
43
- }
44
-
45
- if (data.x < 0 && data.x < -lx) {
46
- x = -lx;
47
- }
48
-
49
- if (data.x < 0 && data.x > -lx) {
50
- x = data.x;
51
- }
52
-
53
- if (data.y >= 0 && data.y > ly) {
54
- y = ly;
55
- }
56
-
57
- if (data.y >= 0 && data.y < ly) {
58
- y = data.y;
59
- }
60
-
61
- if (data.y < 0 && data.y < -ly) {
62
- y = -ly;
63
- }
64
-
65
- if (data.y < 0 && data.y > -ly) {
66
- y = data.y;
67
- }
68
-
69
- if (x !== data.x || y !== data.y) {
70
- return {
71
- x: x,
72
- y: y
73
- };
74
- } else {
75
- return undefined;
76
- }
77
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="test/typings/global" />
2
- import { AxiosPromise, AxiosRequestConfig } from 'axios';
3
- export interface AxiosFetchRequestConfig extends AxiosRequestConfig<BodyInit> {
4
- mode?: RequestMode;
5
- body?: BodyInit;
6
- cache?: RequestCache;
7
- integrity?: string;
8
- redirect?: RequestRedirect;
9
- referrer?: string;
10
- credentials?: RequestCredentials;
11
- }
12
- export default function fetchAdapter(config: AxiosFetchRequestConfig): AxiosPromise;