@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.
Files changed (100) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.d.ts +1 -1
  3. package/es/Action/Group.js +50 -41
  4. package/es/Action/Item.d.ts +2 -2
  5. package/es/Action/Item.js +32 -26
  6. package/es/Action/index.d.ts +1 -2
  7. package/es/BackgroundTaskManager/RefreshMan.js +8 -3
  8. package/es/BackgroundTaskManager/index.js +8 -4
  9. package/es/BasicLayout/Header.js +193 -140
  10. package/es/BasicLayout/index.js +149 -108
  11. package/es/BatchOperationBar/index.js +46 -29
  12. package/es/Boundary/Components/Code.js +17 -10
  13. package/es/Boundary/Components/Exception.js +46 -31
  14. package/es/Boundary/Components/Function.js +17 -10
  15. package/es/ContentWithIcon/index.js +42 -26
  16. package/es/ContentWithIcon/index.less +0 -1
  17. package/es/Dialog/Anchor.d.ts +1 -1
  18. package/es/Dialog/Anchor.js +9 -6
  19. package/es/Dialog/EventProxy.d.ts +1 -1
  20. package/es/Dialog/EventProxy.js +3 -2
  21. package/es/Dialog/index.js +129 -108
  22. package/es/Dialog/index.less +3 -1
  23. package/es/DocDialog/index.d.ts +1 -1
  24. package/es/DocDialog/index.js +8 -3
  25. package/es/FullscreenBox/index.d.ts +1 -1
  26. package/es/FullscreenBox/index.js +22 -16
  27. package/es/GraphToolbar/index.js +79 -65
  28. package/es/Highlight/DiffView/DiffCells.d.ts +2 -2
  29. package/es/Highlight/DiffView/DiffCells.js +22 -15
  30. package/es/Highlight/DiffView/index.js +49 -40
  31. package/es/Highlight/HighlightCell.d.ts +1 -1
  32. package/es/Highlight/HighlightCell.js +19 -13
  33. package/es/Highlight/JsonView.d.ts +1 -2
  34. package/es/Highlight/JsonView.js +15 -13
  35. package/es/Highlight/index.d.ts +1 -1
  36. package/es/Highlight/index.js +66 -54
  37. package/es/IconFont/index.d.ts +1 -1
  38. package/es/IconFont/index.js +9 -3
  39. package/es/LocaleDropdown/index.js +38 -26
  40. package/es/Login/ActivateForm.js +63 -50
  41. package/es/Login/LoginForm.js +115 -99
  42. package/es/Login/RegisterForm.js +78 -67
  43. package/es/Login/index.js +122 -91
  44. package/es/Lottie/index.js +2 -1
  45. package/es/NavMenu/index.d.ts +2 -2
  46. package/es/NavMenu/index.js +34 -29
  47. package/es/PageContainer/ItemRender.d.ts +1 -2
  48. package/es/PageContainer/ItemRender.js +7 -3
  49. package/es/PageContainer/index.js +13 -10
  50. package/es/Password/Content.js +55 -47
  51. package/es/Password/index.js +62 -45
  52. package/es/Ranger/QuickPicker.d.ts +1 -2
  53. package/es/Ranger/QuickPicker.js +42 -31
  54. package/es/Ranger/Ranger.js +31 -27
  55. package/es/SideTip/Dragger.d.ts +1 -1
  56. package/es/SideTip/Dragger.js +5 -3
  57. package/es/SideTip/IconLoading.d.ts +1 -2
  58. package/es/SideTip/IconLoading.js +28 -20
  59. package/es/SideTip/index.js +43 -30
  60. package/es/SideTip/index.less +4 -1
  61. package/es/TagSelect/Group.d.ts +1 -1
  62. package/es/TagSelect/Group.js +16 -11
  63. package/es/TagSelect/Item.d.ts +1 -1
  64. package/es/TagSelect/Item.js +30 -23
  65. package/es/TagSelect/style/index.d.ts +1 -1
  66. package/es/TaskGraph/Graph.js +39 -31
  67. package/es/TaskGraph/index.js +68 -57
  68. package/es/TreeSearch/index.js +36 -32
  69. package/es/Welcome/index.js +113 -83
  70. package/es/Welcome/step.js +31 -23
  71. package/es/locale/LocaleWrapper.js +3 -3
  72. package/lib/Action/Group.d.ts +1 -1
  73. package/lib/Action/Item.d.ts +2 -2
  74. package/lib/Action/index.d.ts +1 -2
  75. package/lib/ContentWithIcon/index.less +0 -1
  76. package/lib/Dialog/Anchor.d.ts +1 -1
  77. package/lib/Dialog/EventProxy.d.ts +1 -1
  78. package/lib/Dialog/EventProxy.js +12 -2
  79. package/lib/Dialog/index.less +3 -1
  80. package/lib/DocDialog/index.d.ts +1 -1
  81. package/lib/FullscreenBox/index.d.ts +1 -1
  82. package/lib/FullscreenBox/index.js +76 -74
  83. package/lib/Highlight/DiffView/DiffCells.d.ts +2 -2
  84. package/lib/Highlight/DiffView/index.js +1 -1
  85. package/lib/Highlight/HighlightCell.d.ts +1 -1
  86. package/lib/Highlight/JsonView.d.ts +1 -2
  87. package/lib/Highlight/JsonView.js +3 -3
  88. package/lib/Highlight/index.d.ts +1 -1
  89. package/lib/IconFont/index.d.ts +1 -1
  90. package/lib/NavMenu/index.d.ts +2 -2
  91. package/lib/PageContainer/ItemRender.d.ts +1 -2
  92. package/lib/Ranger/QuickPicker.d.ts +1 -2
  93. package/lib/SideTip/Dragger.d.ts +1 -1
  94. package/lib/SideTip/IconLoading.d.ts +1 -2
  95. package/lib/SideTip/index.less +4 -1
  96. package/lib/TagSelect/Group.d.ts +1 -1
  97. package/lib/TagSelect/Group.js +4 -6
  98. package/lib/TagSelect/Item.d.ts +1 -1
  99. package/lib/TagSelect/style/index.d.ts +1 -1
  100. 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 _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
+ 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__*/React.createElement(QuestionCircleOutlined, {
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__*/React.createElement(InfoCircleFilled, {
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__*/React.createElement(InfoCircleOutlined, {
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__*/React.createElement(ExclamationCircleFilled, {
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
- React.createElement(Space, {
87
- size: 4
88
- }, iconConfig, /*#__PURE__*/React.createElement("span", {
89
- style: {
90
- color: '#5C6B8A'
91
- }
92
- }, "\u6587\u672C\u793A\u610F\u4E0D\u8D85\u8FC7\u4E8C\u5341\u5B57\u6587\u672C\u793A\u610F\u4E0D\u8D85\u8FC7\u4E8C\u5341\u5B57")) :
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__*/React.createElement(Popover, popOver, /*#__PURE__*/isValidElement(iconConfig) ? iconConfig : defaultIconType()) : /*#__PURE__*/React.createElement(Tooltip, tooltip, /*#__PURE__*/isValidElement(iconConfig) ? iconConfig : defaultIconType()) : null;
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__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", _extends({
97
- className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "-item"), true), _defineProperty(_classNames, className, !!className), _classNames))
98
- }, restProps), /*#__PURE__*/React.createElement(Space, {
99
- size: 4
100
- }, getIcon(
101
- // 图标在文字前
102
- prefixIcon === true ? defaultIconType() : prefixIcon), /*#__PURE__*/React.createElement("span", {
103
- "data-testid": "content",
104
- style: {
105
- color: color === 'default' ? '#5C6B8A' : color,
106
- fontSize: size
107
- }
108
- }, content !== null && content !== void 0 ? content : children), getIcon(suffixIcon))));
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;
@@ -17,6 +17,5 @@
17
17
  }
18
18
  .@{prefix}-color {
19
19
  color: red;
20
-
21
20
  }
22
21
  }
@@ -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(): React.JSX.Element;
18
+ render(): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
19
19
  }
@@ -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__*/React.createElement("div", {
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
- }, /*#__PURE__*/React.createElement(EventProxy, {
98
- onPointerMove: this.onDragMove,
99
- onPointerUp: this.onDragEnd
100
- }), children);
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").JSX.Element;
2
+ export declare const EventProxy: (props: HTMLAttributes<HTMLDivElement>) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
@@ -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__*/React.createElement("div", {
48
+ return /*#__PURE__*/_jsx("div", {
48
49
  id: "event-proxy"
49
50
  });
50
51
  };
@@ -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__*/React.createElement("header", {
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
- }, /*#__PURE__*/React.createElement("span", {
342
- className: "".concat(prefix, "-title")
343
- }, title || locale.helpDocument), this.renderControls());
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__*/React.createElement("span", {
350
- className: "".concat(prefix, "-item")
351
- }, /*#__PURE__*/React.createElement("a", {
352
- className: "".concat(prefix, "-item-link"),
353
- href: extLink === null || extLink === void 0 ? void 0 : extLink.link,
354
- target: "_blank",
355
- rel: "noopener noreferrer"
356
- }, /*#__PURE__*/React.createElement("svg", {
357
- // t="1679557306532"
358
- className: "icon",
359
- viewBox: "0 0 1024 1024",
360
- version: "1.1",
361
- xmlns: "http://www.w3.org/2000/svg"
362
- // p-id="2545"
363
- ,
364
- width: "16",
365
- height: "16"
366
- }, /*#__PURE__*/React.createElement("path", {
367
- 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"
368
- // p-id="2546"
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__*/React.createElement("span", {
382
- className: "".concat(prefix, "-controls")
383
- }, this.renderControlLink(), /*#__PURE__*/React.createElement("span", {
384
- className: "".concat(prefix, "-item"),
385
- onClick: this.onClose
386
- }, /*#__PURE__*/React.createElement(CloseOutlined, null)));
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__*/React.createElement("span", {
389
- className: "".concat(prefix, "-controls")
390
- }, this.renderControlLink(), /*#__PURE__*/React.createElement("span", {
391
- className: "".concat(prefix, "-item"),
392
- onClick: this.toggleMinimize
393
- }, minimize ? /*#__PURE__*/React.createElement(ExpandAltOutlined, null) : /*#__PURE__*/React.createElement(MinusOutlined, null)), enableMaximization && /*#__PURE__*/React.createElement("span", {
394
- className: "".concat(prefix, "-item"),
395
- onClick: this.toggleMaximization
396
- }, maximization ? /*#__PURE__*/React.createElement(FullscreenExitOutlined, null) : /*#__PURE__*/React.createElement(FullscreenOutlined, null)), /*#__PURE__*/React.createElement("span", {
397
- className: "".concat(prefix, "-item"),
398
- onClick: this.onClose
399
- }, /*#__PURE__*/React.createElement(CloseOutlined, null)));
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__*/React.createElement("main", {
417
+ return /*#__PURE__*/_jsxs("main", {
406
418
  className: "".concat(prefix, "-main"),
407
419
  style: this.state.minimize ? {
408
420
  visibility: 'hidden'
409
- } : {}
410
- }, this.renderMask(), children);
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__*/React.createElement("div", {
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__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends({
483
- className: "".concat(prefix, "-container ").concat(className, " ").concat(isEmbed ? "".concat(prefix, "-container-embed") : ''),
484
- style: style
485
- }, this.state.minimize ? {} : {
486
- tabIndex: 0
487
- }), this.renderHeader(), this.renderContent(), isEmbed ? this.renderEmbedBorders() : this.renderBorders(), /*#__PURE__*/React.createElement(EventProxy, {
488
- onPointerMove: this.onDragMove,
489
- onPointerUp: this.onDragEnd
490
- }), /*#__PURE__*/React.createElement(EventProxy, {
491
- onPointerUp: this.detectPointUp
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__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Anchor, {
530
- dock: Dock.left,
531
- onStart: this.onResizeStart,
532
- onMove: this.onResizeMove,
533
- onEnd: this.onResizeEnd
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__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Anchor, {
540
- dock: Dock.top,
541
- onStart: this.onResizeStart,
542
- onMove: this.onResizeMove,
543
- onEnd: this.onResizeEnd
544
- }), /*#__PURE__*/React.createElement(Anchor, {
545
- dock: Dock.right,
546
- onStart: this.onResizeStart,
547
- onMove: this.onResizeMove,
548
- onEnd: this.onResizeEnd
549
- }), /*#__PURE__*/React.createElement(Anchor, {
550
- dock: Dock.bottom,
551
- onStart: this.onResizeStart,
552
- onMove: this.onResizeMove,
553
- onEnd: this.onResizeEnd
554
- }), /*#__PURE__*/React.createElement(Anchor, {
555
- dock: Dock.left,
556
- onStart: this.onResizeStart,
557
- onMove: this.onResizeMove,
558
- onEnd: this.onResizeEnd
559
- }), /*#__PURE__*/React.createElement(Anchor, {
560
- dock: Dock.topLeft,
561
- onStart: this.onResizeStart,
562
- onMove: this.onResizeMove,
563
- onEnd: this.onResizeEnd
564
- }), /*#__PURE__*/React.createElement(Anchor, {
565
- dock: Dock.topRight,
566
- onStart: this.onResizeStart,
567
- onMove: this.onResizeMove,
568
- onEnd: this.onResizeEnd
569
- }), /*#__PURE__*/React.createElement(Anchor, {
570
- dock: Dock.bottomLeft,
571
- onStart: this.onResizeStart,
572
- onMove: this.onResizeMove,
573
- onEnd: this.onResizeEnd
574
- }), /*#__PURE__*/React.createElement(Anchor, {
575
- dock: Dock.bottomRight,
576
- onStart: this.onResizeStart,
577
- onMove: this.onResizeMove,
578
- onEnd: this.onResizeEnd
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__*/React.createElement(React.Fragment, null);
609
+ if (!visible && !isEmbed) return /*#__PURE__*/_jsx(React.Fragment, {});
589
610
  return /*#__PURE__*/createPortal(this.renderDialog(), DialogComp.container);
590
611
  }
591
612
  }], [{
@@ -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: visibility 0.2s ease-in-out, opacity 0.2s linear;
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;
@@ -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?: string;
17
+ normalModeWidth?: number;
18
18
  defautTop?: number;
19
19
  visible: boolean;
20
20
  setRootWidth: (newWidth: string) => void;
@@ -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__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Dialog, DialogProps, /*#__PURE__*/React.createElement("iframe", {
108
- src: currentLink
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 _ref2 = screenFull,
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__*/React.createElement(FullscreenExitOutlined, {
102
+ var icon = innerFullscreen ? /*#__PURE__*/_jsx(FullscreenExitOutlined, {
102
103
  className: "".concat(prefix, "-header-icon"),
103
104
  onClick: toggleFullscreen
104
- }) : /*#__PURE__*/React.createElement(FullscreenOutlined, {
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__*/React.createElement("div", {
126
+ headerContent = /*#__PURE__*/_jsxs("div", {
126
127
  className: "".concat(prefix, "-header"),
127
- "data-testid": "header"
128
- }, /*#__PURE__*/React.createElement("div", {
129
- className: "".concat(prefix, "-header-left")
130
- }, icon, title && /*#__PURE__*/React.createElement("span", {
131
- className: "".concat(prefix, "-header-title ")
132
- }, title)), isComplexHeader && extra && /*#__PURE__*/React.createElement("div", {
133
- className: "".concat(prefix, "-header-extra")
134
- }, extra));
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__*/React.createElement("div", {
141
+ return /*#__PURE__*/_jsxs("div", {
137
142
  ref: containerRef,
138
143
  style: style,
139
- className: classnames(prefix, className, _defineProperty({}, "".concat(prefix, "-fullscreen"), innerFullscreen))
140
- }, headerContent, children);
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',