@oceanbase/ui 1.0.0-alpha.2 → 1.0.0-alpha.3
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.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Action/style/index.d.ts +2 -2
- package/es/FooterToolbar/style/index.d.ts +0 -2
- package/es/FooterToolbar/style/index.js +0 -12
- package/es/Highlight/index.d.ts +1 -1
- package/es/ProCard/style/index.d.ts +2 -2
- package/es/ProCard/style/index.js +3 -2
- package/es/ProTable/style/index.d.ts +2 -2
- package/es/ProTable/style/index.js +6 -5
- package/lib/Action/Group.js +57 -46
- package/lib/Action/Item.js +14 -9
- package/lib/Action/style/index.d.ts +2 -2
- package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
- package/lib/BackgroundTaskManager/index.js +3 -12
- package/lib/BasicLayout/Header.js +120 -62
- package/lib/BasicLayout/index.js +166 -143
- package/lib/BatchOperationBar/index.js +59 -44
- package/lib/Boundary/Components/Code.js +11 -5
- package/lib/Boundary/Components/Exception.js +33 -23
- package/lib/Boundary/Components/Function.js +11 -5
- package/lib/ContentWithIcon/index.js +30 -22
- package/lib/ContentWithQuestion/index.js +8 -3
- package/lib/DateRanger/PickerPanel.js +235 -217
- package/lib/DateRanger/Ranger.js +349 -313
- package/lib/Dialog/Anchor.js +8 -5
- package/lib/Dialog/EventProxy.js +3 -12
- package/lib/Dialog/index.js +132 -108
- package/lib/DocDialog/index.js +3 -2
- package/lib/FooterToolbar/index.js +3 -2
- package/lib/FooterToolbar/style/index.d.ts +0 -2
- package/lib/FooterToolbar/style/index.js +0 -17
- package/lib/FullscreenBox/index.js +16 -7
- package/lib/GraphToolbar/index.js +70 -58
- package/lib/Highlight/DiffView/DiffCells.js +17 -10
- package/lib/Highlight/DiffView/index.js +35 -31
- package/lib/Highlight/HighlightCell.js +13 -10
- package/lib/Highlight/JsonView.js +15 -14
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/Highlight/index.js +50 -45
- package/lib/IconFont/index.js +2 -12
- package/lib/LightFilter/index.js +3 -2
- package/lib/LocaleDropdown/index.js +13 -20
- package/lib/Login/ActivateForm.js +53 -60
- package/lib/Login/LoginForm.js +118 -109
- package/lib/Login/RegisterForm.js +79 -86
- package/lib/Login/index.js +92 -64
- package/lib/NavMenu/index.js +9 -8
- package/lib/PageContainer/ItemRender.js +5 -5
- package/lib/PageContainer/index.js +9 -5
- package/lib/PageLoading/index.js +6 -16
- package/lib/Password/Content.js +38 -42
- package/lib/Password/index.js +83 -68
- package/lib/ProCard/index.js +5 -4
- package/lib/ProCard/style/index.d.ts +2 -2
- package/lib/ProCard/style/index.js +3 -2
- package/lib/ProTable/index.js +5 -4
- package/lib/ProTable/style/index.d.ts +2 -2
- package/lib/ProTable/style/index.js +6 -7
- package/lib/Ranger/QuickPicker.js +24 -15
- package/lib/Ranger/Ranger.js +37 -34
- package/lib/SideTip/Dragger.js +5 -4
- package/lib/SideTip/IconLoading.js +25 -25
- package/lib/SideTip/index.js +19 -10
- package/lib/TagSelect/Group.js +9 -5
- package/lib/TagSelect/Item.js +22 -18
- package/lib/TaskGraph/Graph.js +29 -24
- package/lib/TaskGraph/index.js +56 -50
- package/lib/TreeSearch/index.js +30 -35
- package/lib/Welcome/index.js +64 -37
- package/lib/Welcome/step.js +11 -4
- package/lib/locale/LocaleWrapper.js +15 -14
- package/package.json +3 -3
package/lib/Dialog/Anchor.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(Anchor_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_util = require("../_util");
|
|
37
37
|
var import_EventProxy = require("./EventProxy");
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
39
|
var prefix = (0, import_util.getPrefix)("dialog");
|
|
39
40
|
var Anchor = class extends import_react.default.Component {
|
|
40
41
|
constructor() {
|
|
@@ -89,15 +90,17 @@ var Anchor = class extends import_react.default.Component {
|
|
|
89
90
|
}
|
|
90
91
|
render() {
|
|
91
92
|
const { children, style, dock } = this.props;
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
93
94
|
"div",
|
|
94
95
|
{
|
|
95
96
|
className: `${prefix}-anchor`,
|
|
96
97
|
style: { ...style, ...dock == null ? void 0 : dock.style },
|
|
97
|
-
onPointerDown: this.onDragStart
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
onPointerDown: this.onDragStart,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EventProxy.EventProxy, { onPointerMove: this.onDragMove, onPointerUp: this.onDragEnd }),
|
|
101
|
+
children
|
|
102
|
+
]
|
|
103
|
+
}
|
|
101
104
|
);
|
|
102
105
|
}
|
|
103
106
|
};
|
package/lib/Dialog/EventProxy.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
|
|
29
19
|
// src/Dialog/EventProxy.tsx
|
|
@@ -33,7 +23,8 @@ __export(EventProxy_exports, {
|
|
|
33
23
|
});
|
|
34
24
|
module.exports = __toCommonJS(EventProxy_exports);
|
|
35
25
|
var import_lodash = require("lodash");
|
|
36
|
-
var import_react =
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
28
|
var EventProxy = (props) => {
|
|
38
29
|
const handlers = (0, import_react.useMemo)(() => {
|
|
39
30
|
return Object.entries(props).reduce((list, [name, handler]) => {
|
|
@@ -61,7 +52,7 @@ var EventProxy = (props) => {
|
|
|
61
52
|
unbind();
|
|
62
53
|
};
|
|
63
54
|
}, [bind, unbind]);
|
|
64
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: "event-proxy" });
|
|
65
56
|
};
|
|
66
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67
58
|
0 && (module.exports = {
|
package/lib/Dialog/index.js
CHANGED
|
@@ -42,6 +42,7 @@ var import_Dock = require("./Dock");
|
|
|
42
42
|
var import_EventProxy = require("./EventProxy");
|
|
43
43
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
44
44
|
var import_index = require("./index.less");
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var prefix = (0, import_util.getPrefix)("dialog");
|
|
46
47
|
var DEFAULT_LEFT = 0.1;
|
|
47
48
|
var DEFAULT_TOP = 0.1;
|
|
@@ -306,71 +307,83 @@ var _DialogComp = class extends import_react.default.PureComponent {
|
|
|
306
307
|
...minimize ? { boxShadow: "0 2px 20px 0 rgba(4, 1, 30, 0.07)" } : {},
|
|
307
308
|
...isEmbed ? { cursor: "initial" } : {}
|
|
308
309
|
};
|
|
309
|
-
return /* @__PURE__ */
|
|
310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
310
311
|
"header",
|
|
311
312
|
{
|
|
312
313
|
className: `${prefix}-header`,
|
|
313
314
|
style,
|
|
314
315
|
onPointerDown: this.onDragStart,
|
|
315
|
-
onDoubleClick: this.toggleMaximization
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
onDoubleClick: this.toggleMaximization,
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-title`, children: title || locale.helpDocument }),
|
|
319
|
+
this.renderControls()
|
|
320
|
+
]
|
|
321
|
+
}
|
|
319
322
|
);
|
|
320
323
|
}
|
|
321
324
|
renderControlLink() {
|
|
322
325
|
const { extLink } = this.props;
|
|
323
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-item`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
324
327
|
"a",
|
|
325
328
|
{
|
|
326
329
|
className: `${prefix}-item-link`,
|
|
327
330
|
href: extLink == null ? void 0 : extLink.link,
|
|
328
331
|
target: "_blank",
|
|
329
|
-
rel: "noopener noreferrer"
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
"svg",
|
|
333
|
-
{
|
|
334
|
-
className: "icon",
|
|
335
|
-
viewBox: "0 0 1024 1024",
|
|
336
|
-
version: "1.1",
|
|
337
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
338
|
-
width: "16",
|
|
339
|
-
height: "16"
|
|
340
|
-
},
|
|
341
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
342
|
-
"path",
|
|
332
|
+
rel: "noopener noreferrer",
|
|
333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
334
|
+
"svg",
|
|
343
335
|
{
|
|
344
|
-
|
|
336
|
+
className: "icon",
|
|
337
|
+
viewBox: "0 0 1024 1024",
|
|
338
|
+
version: "1.1",
|
|
339
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
340
|
+
width: "16",
|
|
341
|
+
height: "16",
|
|
342
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
343
|
+
"path",
|
|
344
|
+
{
|
|
345
|
+
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"
|
|
346
|
+
}
|
|
347
|
+
)
|
|
345
348
|
}
|
|
346
349
|
)
|
|
347
|
-
|
|
348
|
-
));
|
|
350
|
+
}
|
|
351
|
+
) });
|
|
349
352
|
}
|
|
350
353
|
renderControls() {
|
|
351
354
|
const { maximization, minimize } = this.state;
|
|
352
355
|
const { enableMaximization, isEmbed } = this.props;
|
|
353
356
|
if (isEmbed) {
|
|
354
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefix}-controls`, children: [
|
|
358
|
+
this.renderControlLink(),
|
|
359
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-item`, onClick: this.onClose, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseOutlined, {}) })
|
|
360
|
+
] });
|
|
355
361
|
}
|
|
356
|
-
return /* @__PURE__ */
|
|
362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefix}-controls`, children: [
|
|
363
|
+
this.renderControlLink(),
|
|
364
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-item`, onClick: this.toggleMinimize, children: minimize ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExpandAltOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.MinusOutlined, {}) }),
|
|
365
|
+
enableMaximization && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-item`, onClick: this.toggleMaximization, children: maximization ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenExitOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenOutlined, {}) }),
|
|
366
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-item`, onClick: this.onClose, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseOutlined, {}) })
|
|
367
|
+
] });
|
|
357
368
|
}
|
|
358
369
|
renderContent() {
|
|
359
370
|
const { children } = this.props;
|
|
360
|
-
return /* @__PURE__ */
|
|
371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
361
372
|
"main",
|
|
362
373
|
{
|
|
363
374
|
className: `${prefix}-main`,
|
|
364
|
-
style: this.state.minimize ? { visibility: "hidden" } : {}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
375
|
+
style: this.state.minimize ? { visibility: "hidden" } : {},
|
|
376
|
+
children: [
|
|
377
|
+
this.renderMask(),
|
|
378
|
+
children
|
|
379
|
+
]
|
|
380
|
+
}
|
|
368
381
|
);
|
|
369
382
|
}
|
|
370
383
|
renderMask() {
|
|
371
384
|
if (!this.hasMask)
|
|
372
385
|
return;
|
|
373
|
-
return /* @__PURE__ */
|
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-mask` });
|
|
374
387
|
}
|
|
375
388
|
// 将比例转换为绝对数值,各个端的渲染依据视口大小会有不同
|
|
376
389
|
getCompatAbsPostion(info) {
|
|
@@ -416,19 +429,21 @@ var _DialogComp = class extends import_react.default.PureComponent {
|
|
|
416
429
|
renderDialog() {
|
|
417
430
|
const style = this.getStyle();
|
|
418
431
|
const { className, isEmbed } = this.props;
|
|
419
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
420
433
|
"div",
|
|
421
434
|
{
|
|
422
435
|
className: `${prefix}-container ${className} ${isEmbed ? `${prefix}-container-embed` : ""}`,
|
|
423
436
|
style,
|
|
424
|
-
...this.state.minimize ? {} : { tabIndex: 0 }
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
437
|
+
...this.state.minimize ? {} : { tabIndex: 0 },
|
|
438
|
+
children: [
|
|
439
|
+
this.renderHeader(),
|
|
440
|
+
this.renderContent(),
|
|
441
|
+
isEmbed ? this.renderEmbedBorders() : this.renderBorders(),
|
|
442
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EventProxy.EventProxy, { onPointerMove: this.onDragMove, onPointerUp: this.onDragEnd }),
|
|
443
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EventProxy.EventProxy, { onPointerUp: this.detectPointUp })
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
) });
|
|
432
447
|
}
|
|
433
448
|
/**
|
|
434
449
|
* width,height 是否在最大最小值的范围内
|
|
@@ -460,7 +475,7 @@ var _DialogComp = class extends import_react.default.PureComponent {
|
|
|
460
475
|
return result;
|
|
461
476
|
}
|
|
462
477
|
renderEmbedBorders() {
|
|
463
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
464
479
|
import_Anchor.Anchor,
|
|
465
480
|
{
|
|
466
481
|
dock: import_Dock.Dock.left,
|
|
@@ -468,79 +483,88 @@ var _DialogComp = class extends import_react.default.PureComponent {
|
|
|
468
483
|
onMove: this.onResizeMove,
|
|
469
484
|
onEnd: this.onResizeEnd
|
|
470
485
|
}
|
|
471
|
-
));
|
|
486
|
+
) });
|
|
472
487
|
}
|
|
473
488
|
renderBorders() {
|
|
474
|
-
return /* @__PURE__ */
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, { children: [
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
491
|
+
import_Anchor.Anchor,
|
|
492
|
+
{
|
|
493
|
+
dock: import_Dock.Dock.top,
|
|
494
|
+
onStart: this.onResizeStart,
|
|
495
|
+
onMove: this.onResizeMove,
|
|
496
|
+
onEnd: this.onResizeEnd
|
|
497
|
+
}
|
|
498
|
+
),
|
|
499
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
500
|
+
import_Anchor.Anchor,
|
|
501
|
+
{
|
|
502
|
+
dock: import_Dock.Dock.right,
|
|
503
|
+
onStart: this.onResizeStart,
|
|
504
|
+
onMove: this.onResizeMove,
|
|
505
|
+
onEnd: this.onResizeEnd
|
|
506
|
+
}
|
|
507
|
+
),
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
509
|
+
import_Anchor.Anchor,
|
|
510
|
+
{
|
|
511
|
+
dock: import_Dock.Dock.bottom,
|
|
512
|
+
onStart: this.onResizeStart,
|
|
513
|
+
onMove: this.onResizeMove,
|
|
514
|
+
onEnd: this.onResizeEnd
|
|
515
|
+
}
|
|
516
|
+
),
|
|
517
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
518
|
+
import_Anchor.Anchor,
|
|
519
|
+
{
|
|
520
|
+
dock: import_Dock.Dock.left,
|
|
521
|
+
onStart: this.onResizeStart,
|
|
522
|
+
onMove: this.onResizeMove,
|
|
523
|
+
onEnd: this.onResizeEnd
|
|
524
|
+
}
|
|
525
|
+
),
|
|
526
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
527
|
+
import_Anchor.Anchor,
|
|
528
|
+
{
|
|
529
|
+
dock: import_Dock.Dock.topLeft,
|
|
530
|
+
onStart: this.onResizeStart,
|
|
531
|
+
onMove: this.onResizeMove,
|
|
532
|
+
onEnd: this.onResizeEnd
|
|
533
|
+
}
|
|
534
|
+
),
|
|
535
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
536
|
+
import_Anchor.Anchor,
|
|
537
|
+
{
|
|
538
|
+
dock: import_Dock.Dock.topRight,
|
|
539
|
+
onStart: this.onResizeStart,
|
|
540
|
+
onMove: this.onResizeMove,
|
|
541
|
+
onEnd: this.onResizeEnd
|
|
542
|
+
}
|
|
543
|
+
),
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
545
|
+
import_Anchor.Anchor,
|
|
546
|
+
{
|
|
547
|
+
dock: import_Dock.Dock.bottomLeft,
|
|
548
|
+
onStart: this.onResizeStart,
|
|
549
|
+
onMove: this.onResizeMove,
|
|
550
|
+
onEnd: this.onResizeEnd
|
|
551
|
+
}
|
|
552
|
+
),
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
554
|
+
import_Anchor.Anchor,
|
|
555
|
+
{
|
|
556
|
+
dock: import_Dock.Dock.bottomRight,
|
|
557
|
+
onStart: this.onResizeStart,
|
|
558
|
+
onMove: this.onResizeMove,
|
|
559
|
+
onEnd: this.onResizeEnd
|
|
560
|
+
}
|
|
561
|
+
)
|
|
562
|
+
] });
|
|
539
563
|
}
|
|
540
564
|
render() {
|
|
541
565
|
const { visible, isEmbed } = this.props;
|
|
542
566
|
if (!visible && !isEmbed)
|
|
543
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {});
|
|
544
568
|
return (0, import_react_dom.createPortal)(this.renderDialog(), _DialogComp.container);
|
|
545
569
|
}
|
|
546
570
|
};
|
package/lib/DocDialog/index.js
CHANGED
|
@@ -33,10 +33,11 @@ __export(DocDialog_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(DocDialog_exports);
|
|
35
35
|
var import_lodash = require("lodash");
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_Dialog = __toESM(require("../Dialog"));
|
|
38
38
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
39
39
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
41
|
var DEFAULT_EMBDED_WIDTH = 0.4;
|
|
41
42
|
var MAX_EMBED_WIDTH = 0.5;
|
|
42
43
|
var MIN_EMBED_WIDTH = 0.3;
|
|
@@ -126,7 +127,7 @@ var DocDialogComp = (props) => {
|
|
|
126
127
|
setRootWidth,
|
|
127
128
|
setVisible
|
|
128
129
|
]);
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.default, { ...DialogProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("iframe", { src: currentLink }) }) });
|
|
130
131
|
};
|
|
131
132
|
var DocDialog_default = (0, import_LocaleWrapper.default)({
|
|
132
133
|
componentName: "DocDialog",
|
|
@@ -32,10 +32,11 @@ __export(FooterToolbar_exports, {
|
|
|
32
32
|
default: () => FooterToolbar_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(FooterToolbar_exports);
|
|
35
|
-
var import_react =
|
|
35
|
+
var import_react = require("react");
|
|
36
36
|
var import_pro_components = require("@ant-design/pro-components");
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
38
|
var import_style = __toESM(require("./style"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
40
|
var FooterToolbar = ({
|
|
40
41
|
// render footer under parent instead of body by default
|
|
41
42
|
portalDom = false,
|
|
@@ -46,7 +47,7 @@ var FooterToolbar = ({
|
|
|
46
47
|
const prefixCls = getPrefixCls("pro-footer-bar", customizePrefixCls);
|
|
47
48
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
48
49
|
return wrapSSR(
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_pro_components.FooterToolbar, { portalDom, prefixCls: customizePrefixCls, ...restProps })
|
|
50
51
|
);
|
|
51
52
|
};
|
|
52
53
|
var FooterToolbar_default = FooterToolbar;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { CSSObject } from '@ant-design/cssinjs';
|
|
3
2
|
import type { FooterToolBarToken } from '@ant-design/pro-layout/es/components/FooterToolbar/style';
|
|
4
3
|
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
5
|
-
export declare const genCompactStyle: (componentCls: string, subComponentCls?: string) => CSSObject;
|
|
6
4
|
export declare const genFooterToolbarStyle: GenerateStyle<FooterToolBarToken>;
|
|
7
5
|
declare const _default: (prefixCls: string) => {
|
|
8
6
|
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
@@ -20,26 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var style_exports = {};
|
|
21
21
|
__export(style_exports, {
|
|
22
22
|
default: () => style_default,
|
|
23
|
-
genCompactStyle: () => genCompactStyle,
|
|
24
23
|
genFooterToolbarStyle: () => genFooterToolbarStyle
|
|
25
24
|
});
|
|
26
25
|
module.exports = __toCommonJS(style_exports);
|
|
27
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
28
|
-
var genCompactStyle = (componentCls, subComponentCls = "") => {
|
|
29
|
-
return {
|
|
30
|
-
[`&${componentCls}-compact-item:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item ${subComponentCls}`]: {
|
|
31
|
-
borderStartEndRadius: 0,
|
|
32
|
-
borderEndEndRadius: 0
|
|
33
|
-
},
|
|
34
|
-
[`&${componentCls}-compact-item:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item) ${subComponentCls}`]: {
|
|
35
|
-
borderRadius: 0
|
|
36
|
-
},
|
|
37
|
-
[`&${componentCls}-compact-item:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item ${subComponentCls}`]: {
|
|
38
|
-
borderStartStartRadius: 0,
|
|
39
|
-
borderEndStartRadius: 0
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
27
|
var genFooterToolbarStyle = (token) => {
|
|
44
28
|
const { componentCls, colorBgBase, borderRadius, boxShadowSecondary, controlHeightLG } = token;
|
|
45
29
|
return {
|
|
@@ -60,6 +44,5 @@ var style_default = (prefixCls) => {
|
|
|
60
44
|
};
|
|
61
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
62
46
|
0 && (module.exports = {
|
|
63
|
-
genCompactStyle,
|
|
64
47
|
genFooterToolbarStyle
|
|
65
48
|
});
|
|
@@ -40,6 +40,7 @@ var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
|
40
40
|
var import_util = require("../_util");
|
|
41
41
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var prefix = (0, import_util.getPrefix)("fullscreen-box");
|
|
44
45
|
var FullscreenBox = import_react.default.forwardRef(
|
|
45
46
|
({ style, header, className, defaultMode, children, onChange }, ref) => {
|
|
@@ -90,7 +91,7 @@ var FullscreenBox = import_react.default.forwardRef(
|
|
|
90
91
|
changeFullscreen(fullscreen);
|
|
91
92
|
}
|
|
92
93
|
}));
|
|
93
|
-
const icon = innerFullscreen ? /* @__PURE__ */
|
|
94
|
+
const icon = innerFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenExitOutlined, { className: `${prefix}-header-icon`, onClick: toggleFullscreen }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenOutlined, { className: `${prefix}-header-icon`, onClick: toggleFullscreen });
|
|
94
95
|
if (innerFullscreen) {
|
|
95
96
|
document.body.classList.add(`${prefix}-body-overflow-hidden`);
|
|
96
97
|
} else {
|
|
@@ -106,19 +107,27 @@ var FullscreenBox = import_react.default.forwardRef(
|
|
|
106
107
|
} else {
|
|
107
108
|
const title = isStringHeader ? header : isComplexHeader && header.title;
|
|
108
109
|
const extra = isComplexHeader && header.extra;
|
|
109
|
-
headerContent = /* @__PURE__ */
|
|
110
|
+
headerContent = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefix}-header`, "data-testid": "header", children: [
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefix}-header-left`, children: [
|
|
112
|
+
icon,
|
|
113
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefix}-header-title `, children: title })
|
|
114
|
+
] }),
|
|
115
|
+
isComplexHeader && extra && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-header-extra`, children: extra })
|
|
116
|
+
] });
|
|
110
117
|
}
|
|
111
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
112
119
|
"div",
|
|
113
120
|
{
|
|
114
121
|
ref: containerRef,
|
|
115
122
|
style,
|
|
116
123
|
className: (0, import_classnames.default)(prefix, className, {
|
|
117
124
|
[`${prefix}-fullscreen`]: innerFullscreen
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
}),
|
|
126
|
+
children: [
|
|
127
|
+
headerContent,
|
|
128
|
+
children
|
|
129
|
+
]
|
|
130
|
+
}
|
|
122
131
|
);
|
|
123
132
|
}
|
|
124
133
|
);
|