@oceanbase/ui 0.3.1 → 0.3.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/Boundary/Components/Code.d.ts +1 -1
- package/es/Boundary/Components/Code.js +17 -4
- package/es/Boundary/Components/Exception.d.ts +1 -1
- package/es/Boundary/Components/Exception.js +17 -7
- package/es/Boundary/Components/Function.d.ts +1 -1
- package/es/Boundary/Components/Function.js +17 -4
- package/es/Highlight/index.d.ts +1 -1
- package/es/LightFilter/index.d.ts +5 -0
- package/es/LightFilter/index.js +27 -0
- package/es/LightFilter/style/index.d.ts +9 -0
- package/es/LightFilter/style/index.js +26 -0
- package/es/ProTable/index.d.ts +5 -0
- package/es/ProTable/index.js +54 -0
- package/es/ProTable/style/index.d.ts +9 -0
- package/es/ProTable/style/index.js +10 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +2 -0
- package/lib/Boundary/Components/Code.d.ts +1 -1
- package/lib/Boundary/Components/Code.js +15 -2
- package/lib/Boundary/Components/Exception.d.ts +1 -1
- package/lib/Boundary/Components/Exception.js +37 -16
- package/lib/Boundary/Components/Function.d.ts +1 -1
- package/lib/Boundary/Components/Function.js +10 -2
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/LightFilter/index.d.ts +5 -0
- package/lib/LightFilter/index.js +45 -0
- package/lib/LightFilter/style/index.d.ts +9 -0
- package/lib/LightFilter/style/index.js +60 -0
- package/lib/ProTable/index.d.ts +5 -0
- package/lib/ProTable/index.js +80 -0
- package/lib/ProTable/style/index.d.ts +9 -0
- package/lib/ProTable/style/index.js +39 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +6 -0
- package/package.json +13 -13
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { LightFilterToken } from '@ant-design/pro-form/es/layouts/LightFilter/style';
|
|
3
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
4
|
+
export declare const genLightFilterStyle: GenerateStyle<LightFilterToken>;
|
|
5
|
+
declare const _default: (prefixCls: string) => {
|
|
6
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
7
|
+
hashId: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/LightFilter/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genLightFilterStyle: () => genLightFilterStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genLightFilterStyle = (token) => {
|
|
28
|
+
const { componentCls, proComponentsCls } = token;
|
|
29
|
+
return {
|
|
30
|
+
[`${componentCls}`]: {
|
|
31
|
+
[`${proComponentsCls}-core-field-label`]: {
|
|
32
|
+
"&-active, &:hover": {
|
|
33
|
+
backgroundColor: token.controlItemBgActive
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
[`${componentCls}-middle`]: {
|
|
38
|
+
[`${proComponentsCls}-core-field-label`]: {
|
|
39
|
+
paddingInline: token.paddingSM,
|
|
40
|
+
borderRadius: token.borderRadius
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
[`${componentCls}${componentCls}-small`]: {
|
|
44
|
+
[`${proComponentsCls}-core-field-label`]: {
|
|
45
|
+
paddingInline: token.paddingXS,
|
|
46
|
+
borderRadius: token.borderRadiusSM
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
var style_default = (prefixCls) => {
|
|
52
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("LightFilter", (token) => {
|
|
53
|
+
return [genLightFilterStyle(token)];
|
|
54
|
+
});
|
|
55
|
+
return useStyle(prefixCls);
|
|
56
|
+
};
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
genLightFilterStyle
|
|
60
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
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
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/ProTable/index.tsx
|
|
30
|
+
var ProTable_exports = {};
|
|
31
|
+
__export(ProTable_exports, {
|
|
32
|
+
default: () => ProTable_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ProTable_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_pro_components = require("@ant-design/pro-components");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_design = require("@oceanbase/design");
|
|
39
|
+
var import_style = __toESM(require("../LightFilter/style"));
|
|
40
|
+
var import_style2 = __toESM(require("./style"));
|
|
41
|
+
var ProTable = ({
|
|
42
|
+
pagination: customPagination,
|
|
43
|
+
form,
|
|
44
|
+
prefixCls: customizePrefixCls,
|
|
45
|
+
className,
|
|
46
|
+
...restProps
|
|
47
|
+
}) => {
|
|
48
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
49
|
+
const tablePrefixCls = getPrefixCls("table", customizePrefixCls);
|
|
50
|
+
const { wrapSSR: tableWrapSSR } = import_design.Table.useStyle(tablePrefixCls);
|
|
51
|
+
const pagination = import_design.Table.useDefaultPagination(customPagination);
|
|
52
|
+
const lightFilterPrefixCls = getPrefixCls("pro-form-light-filter", customizePrefixCls);
|
|
53
|
+
const { wrapSSR: lightFilterWrapSSR } = (0, import_style.default)(lightFilterPrefixCls);
|
|
54
|
+
const prefixCls = getPrefixCls("pro-table", customizePrefixCls);
|
|
55
|
+
const { wrapSSR } = (0, import_style2.default)(prefixCls);
|
|
56
|
+
const proTableCls = (0, import_classnames.default)(className);
|
|
57
|
+
return tableWrapSSR(
|
|
58
|
+
lightFilterWrapSSR(
|
|
59
|
+
wrapSSR(
|
|
60
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
61
|
+
import_pro_components.ProTable,
|
|
62
|
+
{
|
|
63
|
+
defaultSize: "large",
|
|
64
|
+
pagination,
|
|
65
|
+
form: {
|
|
66
|
+
// query form should remove required mark
|
|
67
|
+
requiredMark: false,
|
|
68
|
+
...form
|
|
69
|
+
},
|
|
70
|
+
prefixCls: customizePrefixCls,
|
|
71
|
+
className: proTableCls,
|
|
72
|
+
...restProps
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
ProTable.Summary = import_pro_components.ProTable.Summary;
|
|
80
|
+
var ProTable_default = ProTable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
3
|
+
import type { OBToken } from '../../_util/genComponentStyleHook';
|
|
4
|
+
export declare const genProTableStyle: GenerateStyle<OBToken>;
|
|
5
|
+
declare const _default: (prefixCls: string) => {
|
|
6
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
7
|
+
hashId: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/ProTable/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genProTableStyle: () => genProTableStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genProTableStyle = (token) => {
|
|
28
|
+
return {};
|
|
29
|
+
};
|
|
30
|
+
var style_default = (prefixCls) => {
|
|
31
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("ProTable", (token) => {
|
|
32
|
+
return [genProTableStyle(token)];
|
|
33
|
+
});
|
|
34
|
+
return useStyle(prefixCls);
|
|
35
|
+
};
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
genProTableStyle
|
|
39
|
+
});
|
package/lib/index.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ export { default as PageLoading } from './PageLoading';
|
|
|
38
38
|
export type { PageLoadingProps } from './PageLoading';
|
|
39
39
|
export { default as FooterToolbar } from './FooterToolbar';
|
|
40
40
|
export type { FooterToolbarProps } from './FooterToolbar';
|
|
41
|
+
export { default as ProTable } from './ProTable';
|
|
42
|
+
export type { ProTableProps } from './ProTable';
|
|
43
|
+
export { default as LightFilter } from './LightFilter';
|
|
44
|
+
export type { LightFilterProps } from './LightFilter';
|
|
41
45
|
export { default as Password } from './Password';
|
|
42
46
|
export type { PasswordProps } from './Password';
|
|
43
47
|
export { default as Ranger } from './Ranger';
|
package/lib/index.js
CHANGED
|
@@ -45,12 +45,14 @@ __export(src_exports, {
|
|
|
45
45
|
GraphToolbar: () => import_GraphToolbar.default,
|
|
46
46
|
Highlight: () => import_Highlight.default,
|
|
47
47
|
IconFont: () => import_IconFont.default,
|
|
48
|
+
LightFilter: () => import_LightFilter.default,
|
|
48
49
|
Login: () => import_Login.default,
|
|
49
50
|
Lottie: () => import_Lottie.default,
|
|
50
51
|
NavMenu: () => import_NavMenu.default,
|
|
51
52
|
PageContainer: () => import_PageContainer.default,
|
|
52
53
|
PageLoading: () => import_PageLoading.default,
|
|
53
54
|
Password: () => import_Password.default,
|
|
55
|
+
ProTable: () => import_ProTable.default,
|
|
54
56
|
Ranger: () => import_Ranger.default,
|
|
55
57
|
SideTip: () => import_SideTip.default,
|
|
56
58
|
TagSelect: () => import_TagSelect.default,
|
|
@@ -83,6 +85,8 @@ var import_NavMenu = __toESM(require("./NavMenu"));
|
|
|
83
85
|
var import_PageContainer = __toESM(require("./PageContainer"));
|
|
84
86
|
var import_PageLoading = __toESM(require("./PageLoading"));
|
|
85
87
|
var import_FooterToolbar = __toESM(require("./FooterToolbar"));
|
|
88
|
+
var import_ProTable = __toESM(require("./ProTable"));
|
|
89
|
+
var import_LightFilter = __toESM(require("./LightFilter"));
|
|
86
90
|
var import_Password = __toESM(require("./Password"));
|
|
87
91
|
var import_Ranger = __toESM(require("./Ranger"));
|
|
88
92
|
var import_SideTip = __toESM(require("./SideTip"));
|
|
@@ -108,12 +112,14 @@ var import_BackgroundTaskManager = __toESM(require("./BackgroundTaskManager"));
|
|
|
108
112
|
GraphToolbar,
|
|
109
113
|
Highlight,
|
|
110
114
|
IconFont,
|
|
115
|
+
LightFilter,
|
|
111
116
|
Login,
|
|
112
117
|
Lottie,
|
|
113
118
|
NavMenu,
|
|
114
119
|
PageContainer,
|
|
115
120
|
PageLoading,
|
|
116
121
|
Password,
|
|
122
|
+
ProTable,
|
|
117
123
|
Ranger,
|
|
118
124
|
SideTip,
|
|
119
125
|
TagSelect,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -34,36 +34,36 @@
|
|
|
34
34
|
"build": "NODE_OPTIONS=--max_old_space_size=4096 father build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ant-design/cssinjs": "^1.
|
|
38
|
-
"@ant-design/pro-components": "^2.
|
|
39
|
-
"@
|
|
40
|
-
"@oceanbase/design": "^0.3.
|
|
41
|
-
"@oceanbase/icons": "^0.3.
|
|
42
|
-
"@oceanbase/util": "^0.3.
|
|
37
|
+
"@ant-design/cssinjs": "^1.19.1",
|
|
38
|
+
"@ant-design/pro-components": "^2.7.0",
|
|
39
|
+
"@antv/g6": "3.4.10",
|
|
40
|
+
"@oceanbase/design": "^0.3.3",
|
|
41
|
+
"@oceanbase/icons": "^0.3.1",
|
|
42
|
+
"@oceanbase/util": "^0.3.1",
|
|
43
43
|
"ahooks": "^2.10.14",
|
|
44
44
|
"classnames": "^2.5.1",
|
|
45
45
|
"dayjs": "^1.11.10",
|
|
46
|
-
"diff": "^5.
|
|
46
|
+
"diff": "^5.2.0",
|
|
47
47
|
"highlight.js": "^11.9.0",
|
|
48
48
|
"highlightjs-solidity": "^2.0.6",
|
|
49
49
|
"hoist-non-react-statics": "^3.3.2",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
51
|
"moment": "^2.30.1",
|
|
52
|
-
"path-to-regexp": "^6.2.
|
|
52
|
+
"path-to-regexp": "^6.2.2",
|
|
53
53
|
"randexp": "^0.5.3",
|
|
54
|
-
"rc-util": "^5.
|
|
54
|
+
"rc-util": "^5.39.1",
|
|
55
55
|
"react-copy-to-clipboard": "^5.1.0",
|
|
56
56
|
"react-json-view": "^1.21.3",
|
|
57
57
|
"react-split-pane": "^0.1.92",
|
|
58
58
|
"screenfull": "^6.0.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@
|
|
61
|
+
"@ant-design/pro-form": "^2.25.1",
|
|
62
|
+
"@ant-design/pro-layout": "^7.19.0"
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
|
-
"@antv/g6": "3.4.10",
|
|
65
65
|
"react": ">=16.9.0",
|
|
66
66
|
"react-dom": ">=16.9.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "862f7cbc51b348bac6166b8d61e20153c017d87e"
|
|
69
69
|
}
|