@oceanbase/ui 0.2.19 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui.min.js +1 -1
- package/es/Action/Group.d.ts +1 -1
- package/es/Action/Group.js +50 -41
- package/es/Action/Item.d.ts +2 -2
- package/es/Action/Item.js +32 -26
- package/es/Action/index.d.ts +1 -2
- package/es/BackgroundTaskManager/RefreshMan.js +8 -3
- package/es/BackgroundTaskManager/index.js +8 -4
- package/es/BasicLayout/Header.js +193 -140
- package/es/BasicLayout/index.js +149 -108
- package/es/BatchOperationBar/index.js +46 -29
- package/es/Boundary/Components/Code.js +17 -10
- package/es/Boundary/Components/Exception.js +46 -31
- package/es/Boundary/Components/Function.js +17 -10
- package/es/ContentWithIcon/index.js +42 -26
- package/es/ContentWithIcon/index.less +0 -1
- package/es/Dialog/Anchor.d.ts +1 -1
- package/es/Dialog/Anchor.js +9 -6
- package/es/Dialog/EventProxy.d.ts +1 -1
- package/es/Dialog/EventProxy.js +3 -2
- package/es/Dialog/index.js +129 -108
- package/es/Dialog/index.less +3 -1
- package/es/DocDialog/index.d.ts +1 -1
- package/es/DocDialog/index.js +8 -3
- package/es/FullscreenBox/index.d.ts +1 -1
- package/es/FullscreenBox/index.js +22 -16
- package/es/GraphToolbar/index.js +79 -65
- package/es/Highlight/DiffView/DiffCells.d.ts +2 -2
- package/es/Highlight/DiffView/DiffCells.js +22 -15
- package/es/Highlight/DiffView/index.js +49 -40
- package/es/Highlight/HighlightCell.d.ts +1 -1
- package/es/Highlight/HighlightCell.js +19 -13
- package/es/Highlight/JsonView.d.ts +1 -2
- package/es/Highlight/JsonView.js +15 -13
- package/es/Highlight/index.d.ts +1 -1
- package/es/Highlight/index.js +66 -54
- package/es/IconFont/index.d.ts +1 -1
- package/es/IconFont/index.js +9 -3
- package/es/LocaleDropdown/index.js +38 -26
- package/es/Login/ActivateForm.js +63 -50
- package/es/Login/LoginForm.js +115 -99
- package/es/Login/RegisterForm.js +78 -67
- package/es/Login/index.js +122 -91
- package/es/Lottie/index.js +2 -1
- package/es/NavMenu/index.d.ts +2 -2
- package/es/NavMenu/index.js +34 -29
- package/es/PageContainer/ItemRender.d.ts +1 -2
- package/es/PageContainer/ItemRender.js +7 -3
- package/es/PageContainer/index.js +13 -10
- package/es/Password/Content.js +55 -47
- package/es/Password/index.js +62 -45
- package/es/Ranger/QuickPicker.d.ts +1 -2
- package/es/Ranger/QuickPicker.js +42 -31
- package/es/Ranger/Ranger.js +31 -27
- package/es/SideTip/Dragger.d.ts +1 -1
- package/es/SideTip/Dragger.js +5 -3
- package/es/SideTip/IconLoading.d.ts +1 -2
- package/es/SideTip/IconLoading.js +28 -20
- package/es/SideTip/index.js +43 -30
- package/es/SideTip/index.less +4 -1
- package/es/TagSelect/Group.d.ts +1 -1
- package/es/TagSelect/Group.js +16 -11
- package/es/TagSelect/Item.d.ts +1 -1
- package/es/TagSelect/Item.js +30 -23
- package/es/TagSelect/style/index.d.ts +1 -1
- package/es/TaskGraph/Graph.js +39 -31
- package/es/TaskGraph/index.js +68 -57
- package/es/TreeSearch/index.js +36 -32
- package/es/Welcome/index.js +113 -83
- package/es/Welcome/step.js +31 -23
- package/es/locale/LocaleWrapper.js +3 -3
- package/lib/Action/Group.d.ts +1 -1
- package/lib/Action/Item.d.ts +2 -2
- package/lib/Action/index.d.ts +1 -2
- package/lib/ContentWithIcon/index.less +0 -1
- package/lib/Dialog/Anchor.d.ts +1 -1
- package/lib/Dialog/EventProxy.d.ts +1 -1
- package/lib/Dialog/EventProxy.js +12 -2
- package/lib/Dialog/index.less +3 -1
- package/lib/DocDialog/index.d.ts +1 -1
- package/lib/FullscreenBox/index.d.ts +1 -1
- package/lib/FullscreenBox/index.js +76 -74
- package/lib/Highlight/DiffView/DiffCells.d.ts +2 -2
- package/lib/Highlight/DiffView/index.js +1 -1
- package/lib/Highlight/HighlightCell.d.ts +1 -1
- package/lib/Highlight/JsonView.d.ts +1 -2
- package/lib/Highlight/JsonView.js +3 -3
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/IconFont/index.d.ts +1 -1
- package/lib/NavMenu/index.d.ts +2 -2
- package/lib/PageContainer/ItemRender.d.ts +1 -2
- package/lib/Ranger/QuickPicker.d.ts +1 -2
- package/lib/SideTip/Dragger.d.ts +1 -1
- package/lib/SideTip/IconLoading.d.ts +1 -2
- package/lib/SideTip/index.less +4 -1
- package/lib/TagSelect/Group.d.ts +1 -1
- package/lib/TagSelect/Group.js +4 -6
- package/lib/TagSelect/Item.d.ts +1 -1
- package/lib/TagSelect/style/index.d.ts +1 -1
- package/package.json +10 -9
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
2
|
var _excluded = ["content", "tooltip", "prefixIcon", "suffixIcon", "className", "children", "iconType", "color", "tooltipWithLink", "popOver", "textHidden", "size", "infoColor", "exclamationColor"];
|
|
3
|
-
function
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
4
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -12,6 +13,9 @@ import { ExclamationCircleFilled, InfoCircleFilled, InfoCircleOutlined, Question
|
|
|
12
13
|
import classNames from 'classnames';
|
|
13
14
|
import { getPrefix } from "../_util";
|
|
14
15
|
import "./index.less";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
19
|
var prefix = getPrefix('content-with-question');
|
|
16
20
|
var ContentWithIcon = function ContentWithIcon(_ref) {
|
|
17
21
|
var _classNames;
|
|
@@ -37,7 +41,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
|
|
|
37
41
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
38
42
|
var defaultIconType = function defaultIconType() {
|
|
39
43
|
if (iconType === 'question') {
|
|
40
|
-
return /*#__PURE__*/
|
|
44
|
+
return /*#__PURE__*/_jsx(QuestionCircleOutlined, {
|
|
41
45
|
style: {
|
|
42
46
|
color: color === 'default' ? '#132039' : color,
|
|
43
47
|
fontSize: size
|
|
@@ -47,7 +51,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
|
|
|
47
51
|
}
|
|
48
52
|
if (iconType === 'info') {
|
|
49
53
|
if (infoColor) {
|
|
50
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/_jsx(InfoCircleFilled, {
|
|
51
55
|
style: {
|
|
52
56
|
color: infoColor,
|
|
53
57
|
fontSize: size
|
|
@@ -55,7 +59,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
|
|
|
55
59
|
className: "".concat(prefix, "-help")
|
|
56
60
|
});
|
|
57
61
|
} else {
|
|
58
|
-
return /*#__PURE__*/
|
|
62
|
+
return /*#__PURE__*/_jsx(InfoCircleOutlined, {
|
|
59
63
|
style: {
|
|
60
64
|
color: '3333333',
|
|
61
65
|
fontSize: size
|
|
@@ -65,7 +69,7 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
|
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
if (iconType === 'exclamation') {
|
|
68
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/_jsx(ExclamationCircleFilled, {
|
|
69
73
|
style: {
|
|
70
74
|
color: exclamationColor,
|
|
71
75
|
fontSize: size
|
|
@@ -83,28 +87,40 @@ var ContentWithIcon = function ContentWithIcon(_ref) {
|
|
|
83
87
|
return iconConfig ? !textHidden && iconType === 'info' ?
|
|
84
88
|
/*#__PURE__*/
|
|
85
89
|
// 文本描述直接展示且只在 info 类型下生效
|
|
86
|
-
|
|
87
|
-
size: 4
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
_jsxs(Space, {
|
|
91
|
+
size: 4,
|
|
92
|
+
children: [iconConfig, /*#__PURE__*/_jsx("span", {
|
|
93
|
+
style: {
|
|
94
|
+
color: '#5C6B8A'
|
|
95
|
+
},
|
|
96
|
+
children: "\u6587\u672C\u793A\u610F\u4E0D\u8D85\u8FC7\u4E8C\u5341\u5B57\u6587\u672C\u793A\u610F\u4E0D\u8D85\u8FC7\u4E8C\u5341\u5B57"
|
|
97
|
+
})]
|
|
98
|
+
}) :
|
|
93
99
|
// 提示文案描述带有链接
|
|
94
|
-
tooltipWithLink ? /*#__PURE__*/
|
|
100
|
+
tooltipWithLink ? /*#__PURE__*/_jsx(Popover, _objectSpread(_objectSpread({}, popOver), {}, {
|
|
101
|
+
children: /*#__PURE__*/isValidElement(iconConfig) ? iconConfig : defaultIconType()
|
|
102
|
+
})) : /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({}, tooltip), {}, {
|
|
103
|
+
children: /*#__PURE__*/isValidElement(iconConfig) ? iconConfig : defaultIconType()
|
|
104
|
+
})) : null;
|
|
95
105
|
};
|
|
96
|
-
return /*#__PURE__*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
107
|
+
children: /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({
|
|
108
|
+
className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "-item"), true), _defineProperty(_classNames, className, !!className), _classNames))
|
|
109
|
+
}, restProps), {}, {
|
|
110
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
111
|
+
size: 4,
|
|
112
|
+
children: [getIcon(
|
|
113
|
+
// 图标在文字前
|
|
114
|
+
prefixIcon === true ? defaultIconType() : prefixIcon), /*#__PURE__*/_jsx("span", {
|
|
115
|
+
"data-testid": "content",
|
|
116
|
+
style: {
|
|
117
|
+
color: color === 'default' ? '#5C6B8A' : color,
|
|
118
|
+
fontSize: size
|
|
119
|
+
},
|
|
120
|
+
children: content !== null && content !== void 0 ? content : children
|
|
121
|
+
}), getIcon(suffixIcon)]
|
|
122
|
+
})
|
|
123
|
+
}))
|
|
124
|
+
});
|
|
109
125
|
};
|
|
110
126
|
export default ContentWithIcon;
|
package/es/Dialog/Anchor.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export declare class Anchor extends React.Component<IAnchorProps> {
|
|
|
15
15
|
onDragStart: (event: PointerEvent) => void;
|
|
16
16
|
onDragMove: (event: PointerEvent) => void;
|
|
17
17
|
onDragEnd: (event: PointerEvent) => void;
|
|
18
|
-
render():
|
|
18
|
+
render(): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
19
19
|
}
|
package/es/Dialog/Anchor.js
CHANGED
|
@@ -17,6 +17,8 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { getPrefix } from "../_util";
|
|
19
19
|
import { EventProxy } from "./EventProxy";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
22
|
var prefix = getPrefix('dialog');
|
|
21
23
|
export var Anchor = /*#__PURE__*/function (_React$Component) {
|
|
22
24
|
_inherits(Anchor, _React$Component);
|
|
@@ -90,14 +92,15 @@ export var Anchor = /*#__PURE__*/function (_React$Component) {
|
|
|
90
92
|
children = _this$props3.children,
|
|
91
93
|
style = _this$props3.style,
|
|
92
94
|
dock = _this$props3.dock;
|
|
93
|
-
return /*#__PURE__*/
|
|
95
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
94
96
|
className: "".concat(prefix, "-anchor"),
|
|
95
97
|
style: _objectSpread(_objectSpread({}, style), dock === null || dock === void 0 ? void 0 : dock.style),
|
|
96
|
-
onPointerDown: this.onDragStart
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
onPointerDown: this.onDragStart,
|
|
99
|
+
children: [/*#__PURE__*/_jsx(EventProxy, {
|
|
100
|
+
onPointerMove: this.onDragMove,
|
|
101
|
+
onPointerUp: this.onDragEnd
|
|
102
|
+
}), children]
|
|
103
|
+
});
|
|
101
104
|
}
|
|
102
105
|
}]);
|
|
103
106
|
return Anchor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
export declare const EventProxy: (props: HTMLAttributes<HTMLDivElement>) => import("react").
|
|
2
|
+
export declare const EventProxy: (props: HTMLAttributes<HTMLDivElement>) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
package/es/Dialog/EventProxy.js
CHANGED
|
@@ -9,7 +9,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
9
9
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { isFunction } from 'lodash';
|
|
12
|
-
import { useCallback, useEffect, useMemo } from 'react';
|
|
12
|
+
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
export var EventProxy = function EventProxy(props) {
|
|
14
15
|
var handlers = useMemo(function () {
|
|
15
16
|
return Object.entries(props).reduce(function (list, _ref) {
|
|
@@ -44,7 +45,7 @@ export var EventProxy = function EventProxy(props) {
|
|
|
44
45
|
unbind();
|
|
45
46
|
};
|
|
46
47
|
}, [bind, unbind]);
|
|
47
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/_jsx("div", {
|
|
48
49
|
id: "event-proxy"
|
|
49
50
|
});
|
|
50
51
|
};
|
package/es/Dialog/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
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; }
|
|
4
3
|
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; }
|
|
5
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -25,6 +24,8 @@ import { Dock } from "./Dock";
|
|
|
25
24
|
import { EventProxy } from "./EventProxy";
|
|
26
25
|
import zhCN from "./locale/zh-CN";
|
|
27
26
|
import "./index.less";
|
|
27
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
29
|
var prefix = getPrefix('dialog');
|
|
29
30
|
var DEFAULT_LEFT = 0.1;
|
|
30
31
|
var DEFAULT_TOP = 0.1;
|
|
@@ -333,40 +334,45 @@ var DialogComp = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
333
334
|
} : {}), isEmbed ? {
|
|
334
335
|
cursor: 'initial'
|
|
335
336
|
} : {});
|
|
336
|
-
return /*#__PURE__*/
|
|
337
|
+
return /*#__PURE__*/_jsxs("header", {
|
|
337
338
|
className: "".concat(prefix, "-header"),
|
|
338
339
|
style: style,
|
|
339
340
|
onPointerDown: this.onDragStart,
|
|
340
|
-
onDoubleClick: this.toggleMaximization
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
onDoubleClick: this.toggleMaximization,
|
|
342
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
343
|
+
className: "".concat(prefix, "-title"),
|
|
344
|
+
children: title || locale.helpDocument
|
|
345
|
+
}), this.renderControls()]
|
|
346
|
+
});
|
|
344
347
|
}
|
|
345
348
|
}, {
|
|
346
349
|
key: "renderControlLink",
|
|
347
350
|
value: function renderControlLink() {
|
|
348
351
|
var extLink = this.props.extLink;
|
|
349
|
-
return /*#__PURE__*/
|
|
350
|
-
className: "".concat(prefix, "-item")
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
352
|
+
return /*#__PURE__*/_jsx("span", {
|
|
353
|
+
className: "".concat(prefix, "-item"),
|
|
354
|
+
children: /*#__PURE__*/_jsx("a", {
|
|
355
|
+
className: "".concat(prefix, "-item-link"),
|
|
356
|
+
href: extLink === null || extLink === void 0 ? void 0 : extLink.link,
|
|
357
|
+
target: "_blank",
|
|
358
|
+
rel: "noopener noreferrer",
|
|
359
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
360
|
+
// t="1679557306532"
|
|
361
|
+
className: "icon",
|
|
362
|
+
viewBox: "0 0 1024 1024",
|
|
363
|
+
version: "1.1",
|
|
364
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
365
|
+
// p-id="2545"
|
|
366
|
+
,
|
|
367
|
+
width: "16",
|
|
368
|
+
height: "16",
|
|
369
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
370
|
+
d: "M880.0256 912.0256H144.0256a31.9488 31.9488 0 0 1-32.0512-32V144.0256c0-17.7152 14.336-32.0512 32.0512-32.0512h359.936c4.4544 0 8.0384 3.584 8.0384 8.0384v56.0128c0 4.352-3.584 7.9872-7.9872 7.9872h-320v655.9744h655.9744v-320c0-4.4032 3.584-7.9872 8.0384-7.9872h55.9616c4.4032 0 8.0384 3.584 8.0384 7.9872v359.9872c0 17.7152-14.336 32-32 32zM770.8672 199.1168l-52.224-52.224a8.0384 8.0384 0 0 1 4.7104-13.568l179.4048-20.992c5.12-0.6144 9.5232 3.6864 8.9088 8.9088l-20.992 179.4048a8.0384 8.0384 0 0 1-13.6192 4.6592L824.6784 252.928l-256.2048 256.2048c-3.072 3.072-8.192 3.072-11.264 0l-42.4448-42.3936a8.0384 8.0384 0 0 1 0-11.264l256.1024-256.3584z"
|
|
371
|
+
// p-id="2546"
|
|
372
|
+
})
|
|
373
|
+
})
|
|
374
|
+
})
|
|
375
|
+
});
|
|
370
376
|
}
|
|
371
377
|
}, {
|
|
372
378
|
key: "renderControls",
|
|
@@ -378,42 +384,49 @@ var DialogComp = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
378
384
|
enableMaximization = _this$props6.enableMaximization,
|
|
379
385
|
isEmbed = _this$props6.isEmbed;
|
|
380
386
|
if (isEmbed) {
|
|
381
|
-
return /*#__PURE__*/
|
|
382
|
-
className: "".concat(prefix, "-controls")
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
+
return /*#__PURE__*/_jsxs("span", {
|
|
388
|
+
className: "".concat(prefix, "-controls"),
|
|
389
|
+
children: [this.renderControlLink(), /*#__PURE__*/_jsx("span", {
|
|
390
|
+
className: "".concat(prefix, "-item"),
|
|
391
|
+
onClick: this.onClose,
|
|
392
|
+
children: /*#__PURE__*/_jsx(CloseOutlined, {})
|
|
393
|
+
})]
|
|
394
|
+
});
|
|
387
395
|
}
|
|
388
|
-
return /*#__PURE__*/
|
|
389
|
-
className: "".concat(prefix, "-controls")
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
396
|
+
return /*#__PURE__*/_jsxs("span", {
|
|
397
|
+
className: "".concat(prefix, "-controls"),
|
|
398
|
+
children: [this.renderControlLink(), /*#__PURE__*/_jsx("span", {
|
|
399
|
+
className: "".concat(prefix, "-item"),
|
|
400
|
+
onClick: this.toggleMinimize,
|
|
401
|
+
children: minimize ? /*#__PURE__*/_jsx(ExpandAltOutlined, {}) : /*#__PURE__*/_jsx(MinusOutlined, {})
|
|
402
|
+
}), enableMaximization && /*#__PURE__*/_jsx("span", {
|
|
403
|
+
className: "".concat(prefix, "-item"),
|
|
404
|
+
onClick: this.toggleMaximization,
|
|
405
|
+
children: maximization ? /*#__PURE__*/_jsx(FullscreenExitOutlined, {}) : /*#__PURE__*/_jsx(FullscreenOutlined, {})
|
|
406
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
407
|
+
className: "".concat(prefix, "-item"),
|
|
408
|
+
onClick: this.onClose,
|
|
409
|
+
children: /*#__PURE__*/_jsx(CloseOutlined, {})
|
|
410
|
+
})]
|
|
411
|
+
});
|
|
400
412
|
}
|
|
401
413
|
}, {
|
|
402
414
|
key: "renderContent",
|
|
403
415
|
value: function renderContent() {
|
|
404
416
|
var children = this.props.children;
|
|
405
|
-
return /*#__PURE__*/
|
|
417
|
+
return /*#__PURE__*/_jsxs("main", {
|
|
406
418
|
className: "".concat(prefix, "-main"),
|
|
407
419
|
style: this.state.minimize ? {
|
|
408
420
|
visibility: 'hidden'
|
|
409
|
-
} : {}
|
|
410
|
-
|
|
421
|
+
} : {},
|
|
422
|
+
children: [this.renderMask(), children]
|
|
423
|
+
});
|
|
411
424
|
}
|
|
412
425
|
}, {
|
|
413
426
|
key: "renderMask",
|
|
414
427
|
value: function renderMask() {
|
|
415
428
|
if (!this.hasMask) return;
|
|
416
|
-
return /*#__PURE__*/
|
|
429
|
+
return /*#__PURE__*/_jsx("div", {
|
|
417
430
|
className: "".concat(prefix, "-mask")
|
|
418
431
|
});
|
|
419
432
|
}
|
|
@@ -479,17 +492,21 @@ var DialogComp = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
479
492
|
var _this$props8 = this.props,
|
|
480
493
|
className = _this$props8.className,
|
|
481
494
|
isEmbed = _this$props8.isEmbed;
|
|
482
|
-
return /*#__PURE__*/
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
495
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
496
|
+
children: /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
497
|
+
className: "".concat(prefix, "-container ").concat(className, " ").concat(isEmbed ? "".concat(prefix, "-container-embed") : ''),
|
|
498
|
+
style: style
|
|
499
|
+
}, this.state.minimize ? {} : {
|
|
500
|
+
tabIndex: 0
|
|
501
|
+
}), {}, {
|
|
502
|
+
children: [this.renderHeader(), this.renderContent(), isEmbed ? this.renderEmbedBorders() : this.renderBorders(), /*#__PURE__*/_jsx(EventProxy, {
|
|
503
|
+
onPointerMove: this.onDragMove,
|
|
504
|
+
onPointerUp: this.onDragEnd
|
|
505
|
+
}), /*#__PURE__*/_jsx(EventProxy, {
|
|
506
|
+
onPointerUp: this.detectPointUp
|
|
507
|
+
})]
|
|
508
|
+
}))
|
|
509
|
+
});
|
|
493
510
|
}
|
|
494
511
|
}, {
|
|
495
512
|
key: "checkSize",
|
|
@@ -526,57 +543,61 @@ var DialogComp = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
526
543
|
}, {
|
|
527
544
|
key: "renderEmbedBorders",
|
|
528
545
|
value: function renderEmbedBorders() {
|
|
529
|
-
return /*#__PURE__*/
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
546
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
547
|
+
children: /*#__PURE__*/_jsx(Anchor, {
|
|
548
|
+
dock: Dock.left,
|
|
549
|
+
onStart: this.onResizeStart,
|
|
550
|
+
onMove: this.onResizeMove,
|
|
551
|
+
onEnd: this.onResizeEnd
|
|
552
|
+
})
|
|
553
|
+
});
|
|
535
554
|
}
|
|
536
555
|
}, {
|
|
537
556
|
key: "renderBorders",
|
|
538
557
|
value: function renderBorders() {
|
|
539
|
-
return /*#__PURE__*/
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
558
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
559
|
+
children: [/*#__PURE__*/_jsx(Anchor, {
|
|
560
|
+
dock: Dock.top,
|
|
561
|
+
onStart: this.onResizeStart,
|
|
562
|
+
onMove: this.onResizeMove,
|
|
563
|
+
onEnd: this.onResizeEnd
|
|
564
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
565
|
+
dock: Dock.right,
|
|
566
|
+
onStart: this.onResizeStart,
|
|
567
|
+
onMove: this.onResizeMove,
|
|
568
|
+
onEnd: this.onResizeEnd
|
|
569
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
570
|
+
dock: Dock.bottom,
|
|
571
|
+
onStart: this.onResizeStart,
|
|
572
|
+
onMove: this.onResizeMove,
|
|
573
|
+
onEnd: this.onResizeEnd
|
|
574
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
575
|
+
dock: Dock.left,
|
|
576
|
+
onStart: this.onResizeStart,
|
|
577
|
+
onMove: this.onResizeMove,
|
|
578
|
+
onEnd: this.onResizeEnd
|
|
579
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
580
|
+
dock: Dock.topLeft,
|
|
581
|
+
onStart: this.onResizeStart,
|
|
582
|
+
onMove: this.onResizeMove,
|
|
583
|
+
onEnd: this.onResizeEnd
|
|
584
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
585
|
+
dock: Dock.topRight,
|
|
586
|
+
onStart: this.onResizeStart,
|
|
587
|
+
onMove: this.onResizeMove,
|
|
588
|
+
onEnd: this.onResizeEnd
|
|
589
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
590
|
+
dock: Dock.bottomLeft,
|
|
591
|
+
onStart: this.onResizeStart,
|
|
592
|
+
onMove: this.onResizeMove,
|
|
593
|
+
onEnd: this.onResizeEnd
|
|
594
|
+
}), /*#__PURE__*/_jsx(Anchor, {
|
|
595
|
+
dock: Dock.bottomRight,
|
|
596
|
+
onStart: this.onResizeStart,
|
|
597
|
+
onMove: this.onResizeMove,
|
|
598
|
+
onEnd: this.onResizeEnd
|
|
599
|
+
})]
|
|
600
|
+
});
|
|
580
601
|
}
|
|
581
602
|
}, {
|
|
582
603
|
key: "render",
|
|
@@ -585,7 +606,7 @@ var DialogComp = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
585
606
|
visible = _this$props9.visible,
|
|
586
607
|
isEmbed = _this$props9.isEmbed;
|
|
587
608
|
// 嵌入模式通过style控制显隐
|
|
588
|
-
if (!visible && !isEmbed) return /*#__PURE__*/
|
|
609
|
+
if (!visible && !isEmbed) return /*#__PURE__*/_jsx(React.Fragment, {});
|
|
589
610
|
return /*#__PURE__*/createPortal(this.renderDialog(), DialogComp.container);
|
|
590
611
|
}
|
|
591
612
|
}], [{
|
package/es/Dialog/index.less
CHANGED
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
background-color: rgba(65, 74, 77, 1);
|
|
20
20
|
border-radius: 8px;
|
|
21
21
|
box-shadow: @boxShadowSecondary;
|
|
22
|
-
transition:
|
|
22
|
+
transition:
|
|
23
|
+
visibility 0.2s ease-in-out,
|
|
24
|
+
opacity 0.2s linear;
|
|
23
25
|
@header: 52px;
|
|
24
26
|
@footer: 40px;
|
|
25
27
|
@radius: 1px;
|
package/es/DocDialog/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface IDocDialogProps extends LocaleWrapperProps {
|
|
|
14
14
|
docUrls?: Record<string, string>;
|
|
15
15
|
embedConfig?: IDialogConfig;
|
|
16
16
|
normalConfig?: IDialogConfig;
|
|
17
|
-
normalModeWidth?:
|
|
17
|
+
normalModeWidth?: number;
|
|
18
18
|
defautTop?: number;
|
|
19
19
|
visible: boolean;
|
|
20
20
|
setRootWidth: (newWidth: string) => void;
|
package/es/DocDialog/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
15
15
|
import Dialog from "../Dialog";
|
|
16
16
|
import LocaleWrapper from "../locale/LocaleWrapper";
|
|
17
17
|
import zhCN from "./locale/zh-CN";
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
var DEFAULT_EMBDED_WIDTH = 0.4;
|
|
19
20
|
var MAX_EMBED_WIDTH = 0.5;
|
|
20
21
|
var MIN_EMBED_WIDTH = 0.3;
|
|
@@ -104,9 +105,13 @@ var DocDialogComp = function DocDialogComp(props) {
|
|
|
104
105
|
}
|
|
105
106
|
return result;
|
|
106
107
|
}, [defautTop, className, embedConfig, normalConfig, normalModeWidth, currentLink, title, clientWidth, clientHeight, visible, setRootWidth, setVisible]);
|
|
107
|
-
return /*#__PURE__*/
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
return /*#__PURE__*/_jsx("div", {
|
|
109
|
+
children: /*#__PURE__*/_jsx(Dialog, _objectSpread(_objectSpread({}, DialogProps), {}, {
|
|
110
|
+
children: /*#__PURE__*/_jsx("iframe", {
|
|
111
|
+
src: currentLink
|
|
112
|
+
})
|
|
113
|
+
}))
|
|
114
|
+
});
|
|
110
115
|
};
|
|
111
116
|
export default LocaleWrapper({
|
|
112
117
|
componentName: 'DocDialog',
|
|
@@ -4,7 +4,7 @@ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
|
|
|
4
4
|
import './index.less';
|
|
5
5
|
export type FullscreenModeType = 'viewport' | 'browser';
|
|
6
6
|
export interface FullscreenBoxRef {
|
|
7
|
-
changeFullscreen: () => void;
|
|
7
|
+
changeFullscreen: (fullscreen: boolean) => void;
|
|
8
8
|
}
|
|
9
9
|
export interface FullscreenBoxProps extends LocaleWrapperProps {
|
|
10
10
|
/**
|
|
@@ -17,6 +17,8 @@ import { getPrefix } from "../_util";
|
|
|
17
17
|
import zhCN from "./locale/zh-CN";
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
import "./index.less";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
22
|
var prefix = getPrefix('fullscreen-box');
|
|
21
23
|
var FullscreenBox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
22
24
|
var style = _ref.style,
|
|
@@ -44,8 +46,7 @@ var FullscreenBox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
44
46
|
* 处理全屏模式切换完成后动作
|
|
45
47
|
*/
|
|
46
48
|
var handleFullscreenChange = function handleFullscreenChange() {
|
|
47
|
-
var
|
|
48
|
-
isFullscreen = _ref2.isFullscreen;
|
|
49
|
+
var isFullscreen = screenFull.isFullscreen;
|
|
49
50
|
setInnerFullscreen(function () {
|
|
50
51
|
return isFullscreen;
|
|
51
52
|
});
|
|
@@ -98,10 +99,10 @@ var FullscreenBox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
98
99
|
}
|
|
99
100
|
};
|
|
100
101
|
});
|
|
101
|
-
var icon = innerFullscreen ? /*#__PURE__*/
|
|
102
|
+
var icon = innerFullscreen ? /*#__PURE__*/_jsx(FullscreenExitOutlined, {
|
|
102
103
|
className: "".concat(prefix, "-header-icon"),
|
|
103
104
|
onClick: toggleFullscreen
|
|
104
|
-
}) : /*#__PURE__*/
|
|
105
|
+
}) : /*#__PURE__*/_jsx(FullscreenOutlined, {
|
|
105
106
|
className: "".concat(prefix, "-header-icon"),
|
|
106
107
|
onClick: toggleFullscreen
|
|
107
108
|
});
|
|
@@ -122,22 +123,27 @@ var FullscreenBox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
122
123
|
} else {
|
|
123
124
|
var title = isStringHeader ? header : isComplexHeader && header.title;
|
|
124
125
|
var extra = isComplexHeader && header.extra;
|
|
125
|
-
headerContent = /*#__PURE__*/
|
|
126
|
+
headerContent = /*#__PURE__*/_jsxs("div", {
|
|
126
127
|
className: "".concat(prefix, "-header"),
|
|
127
|
-
"data-testid": "header"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
"data-testid": "header",
|
|
129
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
130
|
+
className: "".concat(prefix, "-header-left"),
|
|
131
|
+
children: [icon, title && /*#__PURE__*/_jsx("span", {
|
|
132
|
+
className: "".concat(prefix, "-header-title "),
|
|
133
|
+
children: title
|
|
134
|
+
})]
|
|
135
|
+
}), isComplexHeader && extra && /*#__PURE__*/_jsx("div", {
|
|
136
|
+
className: "".concat(prefix, "-header-extra"),
|
|
137
|
+
children: extra
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
135
140
|
}
|
|
136
|
-
return /*#__PURE__*/
|
|
141
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
137
142
|
ref: containerRef,
|
|
138
143
|
style: style,
|
|
139
|
-
className: classnames(prefix, className, _defineProperty({}, "".concat(prefix, "-fullscreen"), innerFullscreen))
|
|
140
|
-
|
|
144
|
+
className: classnames(prefix, className, _defineProperty({}, "".concat(prefix, "-fullscreen"), innerFullscreen)),
|
|
145
|
+
children: [headerContent, children]
|
|
146
|
+
});
|
|
141
147
|
});
|
|
142
148
|
export default LocaleWrapper({
|
|
143
149
|
componentName: 'FullscreenBox',
|