@cloud-app-dev/vidc 3.2.38 → 4.0.0

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 (121) 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.js +6 -7
  20. package/es/Picture/demo.js +9 -13
  21. package/es/Picture/index.js +55 -64
  22. package/es/Picture/utils.js +0 -1
  23. package/es/Player/api/index.js +2 -1
  24. package/es/Player/contraller_bar/volume.js +3 -6
  25. package/es/Player/demo.js +28 -58
  26. package/es/Player/frontend_timeline.js +1 -1
  27. package/es/Player/segment_timeline.js +3 -5
  28. package/es/Player/single_player.js +1 -1
  29. package/es/Player/util.d.ts +0 -1
  30. package/es/Player/util.js +2 -40
  31. package/es/PlayerExt/demo.js +12 -20
  32. package/es/Progress/index.js +4 -6
  33. package/es/RefDrawer/Footer.d.ts +9 -0
  34. package/es/{Drawer → RefDrawer}/Footer.js +3 -5
  35. package/es/{Drawer/Demo.d.ts → RefDrawer/demo.d.ts} +0 -0
  36. package/es/RefDrawer/demo.js +35 -0
  37. package/es/RefDrawer/index.d.ts +26 -0
  38. package/es/{Input → RefDrawer}/index.js +54 -58
  39. package/es/{Input → RefModal}/demo.d.ts +0 -0
  40. package/es/RefModal/demo.js +35 -0
  41. package/es/RefModal/index.d.ts +17 -0
  42. package/es/RefModal/index.js +71 -0
  43. package/es/ScreenPlayer/PlayerWithExt.js +1 -1
  44. package/es/ScreenPlayer/RatePick.js +8 -9
  45. package/es/ScreenPlayer/ScreenSelect.js +2 -3
  46. package/es/ScreenPlayer/SegmentTimeLine.js +3 -11
  47. package/es/ScreenPlayer/TimeMode.js +3 -4
  48. package/es/ScreenPlayer/TimeSelect.js +14 -39
  49. package/es/ScreenPlayer/demo.js +2 -3
  50. package/es/ScreenPlayer/demo2.js +8 -28
  51. package/es/ScreenPlayer/useTimeSlider.js +1 -1
  52. package/es/Service/http.js +6 -8
  53. package/es/TableLayout/index.d.ts +0 -3
  54. package/es/TableLayout/index.js +8 -10
  55. package/es/ThemeAntd/demo.js +21 -40
  56. package/es/ThemeAntd/index.js +16 -2
  57. package/es/ThemeAntd/index.less +0 -12
  58. package/es/Timeout/index.js +2 -2
  59. package/es/core.d.ts +0 -149
  60. package/es/index.d.ts +2 -6
  61. package/es/index.js +2 -6
  62. package/es/useDrawROI/index.js +4 -4
  63. package/es/utils.d.ts +1 -12
  64. package/es/utils.js +0 -56
  65. package/package.json +24 -24
  66. package/theme-config.ts +3 -1
  67. package/typings/global.d.ts +4 -4
  68. package/es/Api/index.d.ts +0 -12
  69. package/es/Api/index.js +0 -267
  70. package/es/Box/BetweenBox/index.d.ts +0 -12
  71. package/es/Box/BetweenBox/index.js +0 -31
  72. package/es/Box/BetweenBox/index.less +0 -5
  73. package/es/Box/InfoBox/index.d.ts +0 -12
  74. package/es/Box/InfoBox/index.js +0 -30
  75. package/es/Box/InfoBox/index.less +0 -24
  76. package/es/Box/TwoColumnBox/index.d.ts +0 -10
  77. package/es/Box/TwoColumnBox/index.js +0 -54
  78. package/es/Box/TwoColumnBox/index.less +0 -80
  79. package/es/Box/deps/content-grid.d.ts +0 -9
  80. package/es/Box/deps/content-grid.js +0 -9
  81. package/es/Box/deps/grid-factory.d.ts +0 -10
  82. package/es/Box/deps/grid-factory.js +0 -72
  83. package/es/Box/deps/simple-grid.d.ts +0 -9
  84. package/es/Box/deps/simple-grid.js +0 -8
  85. package/es/Box/index.d.ts +0 -14
  86. package/es/Box/index.js +0 -39
  87. package/es/Box/index.less +0 -10
  88. package/es/Drawer/Demo.js +0 -109
  89. package/es/Drawer/Footer.d.ts +0 -5
  90. package/es/Drawer/index.d.ts +0 -38
  91. package/es/Drawer/index.js +0 -207
  92. package/es/Drawer/index.less +0 -42
  93. package/es/Drawer/interface.d.ts +0 -22
  94. package/es/Input/demo.js +0 -16
  95. package/es/Input/index.d.ts +0 -19
  96. package/es/Input/index.less +0 -12
  97. package/es/Modal/demo.d.ts +0 -3
  98. package/es/Modal/demo.js +0 -106
  99. package/es/Modal/index.d.ts +0 -44
  100. package/es/Modal/index.js +0 -197
  101. package/es/Modal/index.less +0 -44
  102. package/es/Modal/interface.d.ts +0 -23
  103. package/es/Service/fetch-adapter.d.ts +0 -12
  104. package/es/Service/fetch-adapter.js +0 -203
  105. package/es/ThemeAntd/style/button.less +0 -67
  106. package/es/ThemeAntd/style/checkbox.less +0 -72
  107. package/es/ThemeAntd/style/form.less +0 -12
  108. package/es/ThemeAntd/style/input.less +0 -83
  109. package/es/ThemeAntd/style/pagination.less +0 -96
  110. package/es/ThemeAntd/style/picker.less +0 -106
  111. package/es/ThemeAntd/style/popover.less +0 -5
  112. package/es/ThemeAntd/style/radio.less +0 -87
  113. package/es/ThemeAntd/style/scrollbar.less +0 -23
  114. package/es/ThemeAntd/style/select.less +0 -81
  115. package/es/ThemeAntd/style/table.less +0 -57
  116. package/es/ThemeAntd/style/tree.less +0 -18
  117. package/es/Tree/demo.d.ts +0 -3
  118. package/es/Tree/demo.js +0 -32
  119. package/es/Tree/index.d.ts +0 -24
  120. package/es/Tree/index.js +0 -100
  121. package/es/Tree/index.less +0 -60
@@ -1,8 +0,0 @@
1
- export default {
2
- xxl: 4,
3
- xl: 6,
4
- lg: 6,
5
- md: 7,
6
- sm: 24,
7
- xs: 24
8
- };
package/es/Box/index.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface ContentBoxProps {
4
- className?: string;
5
- contentGrid?: any;
6
- children?: React.ReactNode;
7
- }
8
- declare function Box({ className, contentGrid, children }: ContentBoxProps): JSX.Element;
9
- declare namespace Box {
10
- var TwoColumnBox: typeof import("./TwoColumnBox").default;
11
- var InfoBox: typeof import("./InfoBox").default;
12
- var BetweenBox: typeof import("./BetweenBox").default;
13
- }
14
- export default Box;
package/es/Box/index.js DELETED
@@ -1,39 +0,0 @@
1
- import "antd/lib/row/style";
2
- import _Row from "antd/lib/row";
3
- import "antd/lib/col/style";
4
- import _Col from "antd/lib/col";
5
-
6
- 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; }
7
-
8
- 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; }
9
-
10
- 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; }
11
-
12
- import React from 'react';
13
- import TwoColumnBox from "./TwoColumnBox";
14
- import InfoBox from "./InfoBox";
15
- import defaultContentGrid from "./deps/content-grid";
16
- import BetweenBox from "./BetweenBox";
17
- import "./index.less";
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
-
20
- function Box(_ref) {
21
- var _ref$className = _ref.className,
22
- className = _ref$className === void 0 ? '' : _ref$className,
23
- _ref$contentGrid = _ref.contentGrid,
24
- contentGrid = _ref$contentGrid === void 0 ? defaultContentGrid : _ref$contentGrid,
25
- children = _ref.children;
26
- return /*#__PURE__*/_jsx(_Row, {
27
- className: "single-column-layout-container ".concat(className),
28
- children: /*#__PURE__*/_jsx(_Col, _objectSpread(_objectSpread({
29
- className: "single-column-content"
30
- }, contentGrid), {}, {
31
- children: children
32
- }))
33
- });
34
- }
35
-
36
- Box.TwoColumnBox = TwoColumnBox;
37
- Box.InfoBox = InfoBox;
38
- Box.BetweenBox = BetweenBox;
39
- export default Box;
package/es/Box/index.less DELETED
@@ -1,10 +0,0 @@
1
- .single-column-layout-container {
2
- width: 100%;
3
- height: 100%;
4
- background-color: var(--gray1);
5
-
6
- .single-column-content {
7
- height: 100%;
8
- margin: 0 auto;
9
- }
10
- }
package/es/Drawer/Demo.js DELETED
@@ -1,109 +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 Drawer 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 drawer = Drawer.useDrawer();
26
- var ref = useRef();
27
-
28
- var _useState = useState(false),
29
- _useState2 = _slicedToArray(_useState, 2),
30
- visible = _useState2[0],
31
- setVisible = _useState2[1];
32
-
33
- var showDrawer = function showDrawer() {
34
- setVisible(true);
35
- };
36
-
37
- var onClose = function onClose() {
38
- setVisible(false);
39
- };
40
-
41
- return /*#__PURE__*/_jsxs(_ConfigProvider, {
42
- prefixCls: "cloudapp",
43
- children: [/*#__PURE__*/_jsxs("div", {
44
- children: [/*#__PURE__*/_jsx(_Button, {
45
- type: "primary",
46
- onClick: showDrawer,
47
- children: "Open"
48
- }), /*#__PURE__*/_jsxs(Drawer, {
49
- title: "Basic Drawer",
50
- placement: "right",
51
- onClose: onClose,
52
- visible: visible,
53
- onOk: function onOk() {
54
- alert('确定!');
55
- onClose();
56
- },
57
- children: [/*#__PURE__*/_jsx("p", {
58
- children: "Some contents..."
59
- }), /*#__PURE__*/_jsx("p", {
60
- children: "Some contents..."
61
- }), /*#__PURE__*/_jsx("p", {
62
- children: "Some contents..."
63
- })]
64
- })]
65
- }), /*#__PURE__*/_jsx("div", {
66
- children: /*#__PURE__*/_jsx(_Button, {
67
- type: "primary",
68
- onClick: function onClick() {
69
- return drawer.open({
70
- content: /*#__PURE__*/_jsxs(_Fragment, {
71
- children: [/*#__PURE__*/_jsx("p", {
72
- children: "Some contents..."
73
- }), /*#__PURE__*/_jsx("p", {
74
- children: "Some contents..."
75
- }), /*#__PURE__*/_jsx("p", {
76
- children: "Some contents..."
77
- })]
78
- })
79
- });
80
- },
81
- children: "useDrawer"
82
- })
83
- }), /*#__PURE__*/_jsxs("div", {
84
- children: [/*#__PURE__*/_jsx(_Button, {
85
- type: "primary",
86
- onClick: function onClick() {
87
- var _ref$current;
88
-
89
- return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.open({
90
- content: /*#__PURE__*/_jsxs(_Fragment, {
91
- children: [/*#__PURE__*/_jsx("p", {
92
- children: "Some contents..."
93
- }), /*#__PURE__*/_jsx("p", {
94
- children: "Some contents..."
95
- }), /*#__PURE__*/_jsx("p", {
96
- children: "Some contents..."
97
- })]
98
- })
99
- });
100
- },
101
- children: "RefDrawer"
102
- }), /*#__PURE__*/_jsx(Drawer.RefDrawer, {
103
- ref: ref
104
- })]
105
- })]
106
- });
107
- };
108
-
109
- export default App;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { IFooterProps } from './interface';
3
- import './index.less';
4
- declare function Footer({ onClose, cancelText, okText, onOk }: IFooterProps): JSX.Element;
5
- export default Footer;
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
- import { IDrawerProps } from './interface';
3
- import './index.less';
4
- declare function Drawer({ style, getContainer, onClose, className, onOk, cancelText, okText, children, ...props }: IDrawerProps): JSX.Element;
5
- declare namespace Drawer {
6
- var defaultProps: {
7
- getContainer: boolean;
8
- className: string;
9
- cancelText: string;
10
- okText: string;
11
- };
12
- var useDrawer: (prefixCls?: string) => {
13
- open: (options: IUseDrawerHookState) => void;
14
- close: () => void;
15
- };
16
- var RefDrawer: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<IRefDrawerMethodsProps>>;
17
- }
18
- export interface IUseDrawerHookState {
19
- content?: React.ReactNode;
20
- visible?: boolean;
21
- title?: React.ReactNode;
22
- onOk?: () => void;
23
- width?: number | string;
24
- className?: string;
25
- }
26
- export interface IUseDrawerHookState {
27
- content?: React.ReactNode;
28
- visible?: boolean;
29
- title?: React.ReactNode;
30
- onOk?: () => void;
31
- width?: number | string;
32
- className?: string;
33
- }
34
- export interface IRefDrawerMethodsProps {
35
- open: (options: IUseDrawerHookState) => void;
36
- close: () => void;
37
- }
38
- export default Drawer;
@@ -1,207 +0,0 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
- import "antd/lib/drawer/style";
4
- import _Drawer from "antd/lib/drawer";
5
- var _excluded = ["style", "getContainer", "onClose", "className", "onOk", "cancelText", "okText", "children"];
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 { default as CC, default as ConfigContext } from "../ConfigContext";
32
- import Footer from "./Footer";
33
- import "./index.less";
34
- import { jsx as _jsx } from "react/jsx-runtime";
35
-
36
- function Drawer(_ref) {
37
- var style = _ref.style,
38
- getContainer = _ref.getContainer,
39
- onClose = _ref.onClose,
40
- className = _ref.className,
41
- onOk = _ref.onOk,
42
- cancelText = _ref.cancelText,
43
- okText = _ref.okText,
44
- children = _ref.children,
45
- props = _objectWithoutProperties(_ref, _excluded);
46
-
47
- return /*#__PURE__*/_jsx(_Drawer, _objectSpread(_objectSpread({
48
- style: _objectSpread(_objectSpread({}, style), {}, {
49
- textAlign: 'left'
50
- }),
51
- className: "lm-drawer-container ".concat(className),
52
- onClose: onClose,
53
- getContainer: getContainer,
54
- footer: /*#__PURE__*/_jsx(Footer, {
55
- onClose: onClose,
56
- onOk: onOk,
57
- cancelText: cancelText,
58
- okText: okText
59
- })
60
- }, props), {}, {
61
- children: children
62
- }));
63
- }
64
-
65
- Drawer.defaultProps = {
66
- getContainer: false,
67
- className: '',
68
- cancelText: '取消',
69
- okText: '确定'
70
- };
71
-
72
- function useDrawer() {
73
- var prefixCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'cloudapp';
74
- var context = useContext(CC.Context);
75
- var container = useMemo(function () {
76
- var _context$root;
77
-
78
- return (_context$root = context === null || context === void 0 ? void 0 : context.root) !== null && _context$root !== void 0 ? _context$root : document.body;
79
- }, [context === null || context === void 0 ? void 0 : context.root]);
80
- var div = useMemo(function () {
81
- return document.createElement('div');
82
- }, []);
83
-
84
- var _useState = useState({
85
- content: null,
86
- visible: false,
87
- title: '',
88
- onOk: undefined,
89
- width: undefined,
90
- className: undefined
91
- }),
92
- _useState2 = _slicedToArray(_useState, 2),
93
- state = _useState2[0],
94
- setState = _useState2[1];
95
-
96
- var root = useMemo(function () {
97
- return ReactDOMClient.createRoot(div, {
98
- onRecoverableError: console.error
99
- });
100
- }, []);
101
-
102
- var open = function open(options) {
103
- setState(function (old) {
104
- return _objectSpread(_objectSpread(_objectSpread({}, old), options), {}, {
105
- visible: true
106
- });
107
- });
108
- };
109
-
110
- var close = function close() {
111
- setState(function (old) {
112
- return _objectSpread(_objectSpread({}, old), {}, {
113
- visible: false
114
- });
115
- });
116
- };
117
-
118
- useEffect(function () {
119
- container.appendChild(div);
120
- return function () {
121
- setTimeout(function () {
122
- return root.unmount(), div.remove();
123
- }, 100);
124
- };
125
- }, []);
126
- useEffect(function () {
127
- root.render( /*#__PURE__*/_jsx(_ConfigProvider, {
128
- prefixCls: prefixCls,
129
- getPopupContainer: function getPopupContainer() {
130
- return container;
131
- },
132
- children: /*#__PURE__*/_jsx(Drawer, {
133
- visible: state.visible,
134
- onOk: state.onOk,
135
- onClose: close,
136
- destroyOnClose: true,
137
- title: state.title,
138
- width: state.width,
139
- className: state.className,
140
- getContainer: false,
141
- children: state.content
142
- })
143
- }));
144
- }, [state.content, state.visible, state.title, state.onOk, state.width, state.className]);
145
- return {
146
- open: open,
147
- close: close
148
- };
149
- }
150
-
151
- var RefDrawer = /*#__PURE__*/React.forwardRef(function RefDrawer(_, ref) {
152
- var context = useContext(ConfigContext.Context);
153
- var root = useMemo(function () {
154
- return (context === null || context === void 0 ? void 0 : context.root) || document.body;
155
- }, [context === null || context === void 0 ? void 0 : context.root]);
156
-
157
- var _useState3 = useState({
158
- content: null,
159
- visible: false,
160
- title: '',
161
- onOk: undefined,
162
- width: undefined,
163
- className: undefined
164
- }),
165
- _useState4 = _slicedToArray(_useState3, 2),
166
- state = _useState4[0],
167
- setState = _useState4[1];
168
-
169
- var open = function open(options) {
170
- setState(function (old) {
171
- return _objectSpread(_objectSpread(_objectSpread({}, old), options), {}, {
172
- visible: true
173
- });
174
- });
175
- };
176
-
177
- var close = function close() {
178
- setState(function (old) {
179
- return _objectSpread(_objectSpread({}, old), {}, {
180
- visible: false
181
- });
182
- });
183
- };
184
-
185
- useImperativeHandle(ref, function () {
186
- return {
187
- open: open,
188
- close: close
189
- };
190
- }, [state]);
191
- return /*#__PURE__*/_jsx(Drawer, {
192
- visible: state.visible,
193
- onOk: state.onOk,
194
- onClose: close,
195
- destroyOnClose: true,
196
- title: state.title,
197
- width: state.width,
198
- className: state.className,
199
- getContainer: function getContainer() {
200
- return root;
201
- },
202
- children: state.content
203
- });
204
- });
205
- Drawer.useDrawer = useDrawer;
206
- Drawer.RefDrawer = RefDrawer;
207
- export default Drawer;
@@ -1,42 +0,0 @@
1
- .lm-drawer-container.@{ant-prefix}-drawer {
2
- .@{ant-prefix}-drawer-wrapper-body {
3
- display: flex;
4
- flex-direction: column;
5
- height: 100%;
6
- }
7
- .@{ant-prefix}-drawer-header {
8
- position: relative;
9
- display: flex;
10
- height: var(--drawer-title-height);
11
- padding: 0 24px;
12
- color: inherit;
13
- background-color: var(--drawer-title-bg);
14
- justify-content: space-between;
15
- align-items: center;
16
- border-bottom-color: var(--drawer-divider-color);
17
- .@{ant-prefix}-drawer-title {
18
- font-size: var(--fs-large);
19
- line-height: 2em;
20
- color: inherit;
21
- }
22
- .@{ant-prefix}-drawer-close {
23
- position: absolute;
24
- right: 0;
25
- padding: 0;
26
- color: inherit;
27
- }
28
- }
29
- .@{ant-prefix}-drawer-body {
30
- overflow: auto;
31
- background: var(--drawer-content-bg);
32
- flex: 1;
33
- }
34
- .@{ant-prefix}-drawer-footer {
35
- height: var(--drawer-footer-height);
36
- padding: 0 24px;
37
- overflow: hidden;
38
- line-height: var(--drawer-footer-height);
39
- background: var(--drawer-footer-bg);
40
- border-top-color: var(--drawer-divider-color);
41
- }
42
- }
@@ -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;