x-star-design 0.0.41 → 0.0.42
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/README.md +6 -6
- package/dist/code-detail-modal/index.js +7 -10
- package/dist/code-mirror-wrapper/index.js +1 -1
- package/dist/config-provider-wrapper/index.js +2 -6
- package/dist/contact-button/index.js +1 -1
- package/dist/draggable-layout/index.js +8 -8
- package/dist/error-boundary/error-page/index.js +2 -1
- package/dist/error-boundary/index.d.ts +1 -10
- package/dist/error-boundary/index.js +7 -87
- package/dist/loading-mask/index.js +6 -6
- package/dist/locales/index.d.ts +0 -129
- package/dist/locales/index.js +0 -12
- package/dist/rainbow-cat/index.js +2 -2
- package/dist/status-tag/index.js +2 -2
- package/dist/styles/index.css +71 -71
- package/dist/title-with-icon/index.js +3 -3
- package/dist/utils/global.d.ts +1 -1
- package/dist/utils/global.js +1 -1
- package/dist/virtual-table/index.js +3 -3
- package/dist/visual-data-config/SingleDataConfig.js +3 -1
- package/dist/visual-data-config/SubTaskConfig.js +3 -1
- package/dist/visual-data-config/define.js +8 -14
- package/dist/visual-data-config/index.js +4 -4
- package/dist/xtabs/index.js +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,24 +34,24 @@ index.tsx, //组件
|
|
|
34
34
|
import { prefix } from '../utils/global';
|
|
35
35
|
<img
|
|
36
36
|
src={diamondSVG}
|
|
37
|
-
className={classNames(`${prefix}required`, {
|
|
38
|
-
[`${prefix}circleRequired`]: shape === 'circle',
|
|
39
|
-
[`${prefix}rectRequired`]: shape !== 'circle',
|
|
37
|
+
className={classNames(`${prefix}-required`, {
|
|
38
|
+
[`${prefix}-circleRequired`]: shape === 'circle',
|
|
39
|
+
[`${prefix}-rectRequired`]: shape !== 'circle',
|
|
40
40
|
})}
|
|
41
41
|
/>
|
|
42
42
|
// _index.scss
|
|
43
|
-
.#{$prefix}required {
|
|
43
|
+
.#{$prefix}-required {
|
|
44
44
|
position: absolute;
|
|
45
45
|
width: 0.8rem;
|
|
46
46
|
height: 0.8rem;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.#{$prefix}circleRequired {
|
|
49
|
+
.#{$prefix}-circleRequired {
|
|
50
50
|
top: -3px;
|
|
51
51
|
right: -3px;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.#{$prefix}rectRequired {
|
|
54
|
+
.#{$prefix}-rectRequired {
|
|
55
55
|
top: -5px;
|
|
56
56
|
right: -5px;
|
|
57
57
|
}
|
|
@@ -81,7 +81,8 @@ var CodeDetailModal = function CodeDetailModal(_ref) {
|
|
|
81
81
|
return /*#__PURE__*/React.createElement(Button, {
|
|
82
82
|
href: v,
|
|
83
83
|
type: "link",
|
|
84
|
-
icon: /*#__PURE__*/React.createElement(DownloadOutlined, null)
|
|
84
|
+
icon: /*#__PURE__*/React.createElement(DownloadOutlined, null),
|
|
85
|
+
"data-testid": 'downloadBtn'
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
} : {
|
|
@@ -109,31 +110,27 @@ var CodeDetailModal = function CodeDetailModal(_ref) {
|
|
|
109
110
|
return /*#__PURE__*/React.createElement(ConfigProviderWrapper, null, /*#__PURE__*/React.createElement(Modal, _extends({
|
|
110
111
|
title: t('Code_Detail'),
|
|
111
112
|
afterClose: function afterClose() {
|
|
112
|
-
|
|
113
|
+
setShowCode(false);
|
|
113
114
|
},
|
|
114
115
|
open: open,
|
|
115
116
|
onCancel: onCancel,
|
|
116
117
|
width: 800,
|
|
117
118
|
footer: null
|
|
118
119
|
}, props, {
|
|
119
|
-
className: "".concat(prefix, "codeDetailModal")
|
|
120
|
+
className: "".concat(prefix, "-codeDetailModal")
|
|
120
121
|
}), /*#__PURE__*/React.createElement(Table, {
|
|
121
122
|
pagination: false,
|
|
122
123
|
columns: columns,
|
|
123
124
|
dataSource: [codeData],
|
|
124
125
|
rowKey: 'problemNameZh'
|
|
125
|
-
}), showCode ?
|
|
126
|
-
|
|
127
|
-
icon: /*#__PURE__*/React.createElement(DownloadOutlined, null),
|
|
128
|
-
href: codeData === null || codeData === void 0 ? void 0 : codeData.source
|
|
129
|
-
}, t('Download_File')) : /*#__PURE__*/React.createElement(CodeMirrorWrapper, {
|
|
130
|
-
className: "".concat(prefix, "codeMirror"),
|
|
126
|
+
}), showCode ? /*#__PURE__*/React.createElement(CodeMirrorWrapper, {
|
|
127
|
+
className: "".concat(prefix, "-codeMirror"),
|
|
131
128
|
lang: codeData === null || codeData === void 0 ? void 0 : codeData.language,
|
|
132
129
|
theme: Theme.LIGHT,
|
|
133
130
|
value: codeData === null || codeData === void 0 ? void 0 : codeData.source,
|
|
134
131
|
readOnly: true
|
|
135
132
|
}) : /*#__PURE__*/React.createElement("pre", {
|
|
136
|
-
className: "".concat(prefix, "codeCompileResult")
|
|
133
|
+
className: "".concat(prefix, "-codeCompileResult")
|
|
137
134
|
}, /*#__PURE__*/React.createElement("code", null, codeData.detail))));
|
|
138
135
|
};
|
|
139
136
|
export default CodeDetailModal;
|
|
@@ -89,7 +89,7 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(_ref) {
|
|
|
89
89
|
}
|
|
90
90
|
}, [lang, regexpLinter]);
|
|
91
91
|
return /*#__PURE__*/React.createElement(CodeMirror, _extends({
|
|
92
|
-
className: classNames(className, "".concat(prefix, "codeMirror")),
|
|
92
|
+
className: classNames(className, "".concat(prefix, "-codeMirror")),
|
|
93
93
|
value: value,
|
|
94
94
|
extensions: langConfigMap,
|
|
95
95
|
onChange: onChange,
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { ConfigProvider } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { prefix } from "../utils/global";
|
|
3
4
|
var ConfigProviderWrapper = function ConfigProviderWrapper(_ref) {
|
|
4
5
|
var children = _ref.children;
|
|
5
6
|
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
6
|
-
prefixCls:
|
|
7
|
-
theme: {
|
|
8
|
-
token: {
|
|
9
|
-
colorPrimary: '#1890ff'
|
|
10
|
-
}
|
|
11
|
-
}
|
|
7
|
+
prefixCls: prefix
|
|
12
8
|
}, children);
|
|
13
9
|
};
|
|
14
10
|
export default ConfigProviderWrapper;
|
|
@@ -26,7 +26,7 @@ var ContactButton = function ContactButton() {
|
|
|
26
26
|
src: getTransResult(lang, wechatCode, xcQrCode)
|
|
27
27
|
}), t('CONTACT_TIP'), t('CONTACT_TELEPHONE'))
|
|
28
28
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
29
|
-
className: "".concat(prefix, "contactButtonCard"),
|
|
29
|
+
className: "".concat(prefix, "-contactButtonCard"),
|
|
30
30
|
"data-testid": 'contactButtonText'
|
|
31
31
|
}, /*#__PURE__*/React.createElement(Space, {
|
|
32
32
|
direction: "vertical",
|
|
@@ -57,7 +57,7 @@ var DraggableLayout = function DraggableLayout(_ref) {
|
|
|
57
57
|
setTimeout(function () {
|
|
58
58
|
return transition.current = false;
|
|
59
59
|
}, 300);
|
|
60
|
-
divider.classList.add("".concat(prefix, "draggable-divider-active"));
|
|
60
|
+
divider.classList.add("".concat(prefix, "-draggable-divider-active"));
|
|
61
61
|
divider.style.left = '0';
|
|
62
62
|
left.style.left = "-".concat(minWidth[0]);
|
|
63
63
|
left.style.right = '100%';
|
|
@@ -72,7 +72,7 @@ var DraggableLayout = function DraggableLayout(_ref) {
|
|
|
72
72
|
setTimeout(function () {
|
|
73
73
|
return transition.current = false;
|
|
74
74
|
}, 300);
|
|
75
|
-
divider.classList.add("".concat(prefix, "draggable-divider-active"));
|
|
75
|
+
divider.classList.add("".concat(prefix, "-draggable-divider-active"));
|
|
76
76
|
divider.style.left = "calc(100% - ".concat(dividerWidth, ")");
|
|
77
77
|
left.style.left = '0';
|
|
78
78
|
left.style.right = dividerWidth;
|
|
@@ -89,7 +89,7 @@ var DraggableLayout = function DraggableLayout(_ref) {
|
|
|
89
89
|
}, 300);
|
|
90
90
|
}
|
|
91
91
|
var width = "min(max(".concat(offsetX, "px, calc(").concat(minWidth[0], " + ").concat(dividerWidth, " / 2)), calc(100% - ").concat(minWidth[1], " - ").concat(dividerWidth, " / 2))");
|
|
92
|
-
divider.classList.remove("".concat(prefix, "draggable-divider-active"));
|
|
92
|
+
divider.classList.remove("".concat(prefix, "-draggable-divider-active"));
|
|
93
93
|
divider.style.left = "calc(".concat(width, " - ").concat(dividerWidth, " / 2)");
|
|
94
94
|
left.style.left = '0';
|
|
95
95
|
left.style.right = "calc(100% - ".concat(width, " + ").concat(dividerWidth, " / 2)");
|
|
@@ -118,23 +118,23 @@ var DraggableLayout = function DraggableLayout(_ref) {
|
|
|
118
118
|
return /*#__PURE__*/React.createElement("div", {
|
|
119
119
|
"data-testid": "wrapper",
|
|
120
120
|
ref: wrapperRef,
|
|
121
|
-
className: classNames("".concat(prefix, "draggable-layout"), className),
|
|
121
|
+
className: classNames("".concat(prefix, "-draggable-layout"), className),
|
|
122
122
|
style: style
|
|
123
123
|
}, /*#__PURE__*/React.createElement("div", {
|
|
124
124
|
"data-testid": "divider",
|
|
125
125
|
ref: dividerRef,
|
|
126
|
-
className: dividerClassName !== null && dividerClassName !== void 0 ? dividerClassName : classNames("".concat(prefix, "draggable-divider")),
|
|
126
|
+
className: dividerClassName !== null && dividerClassName !== void 0 ? dividerClassName : classNames("".concat(prefix, "-draggable-divider")),
|
|
127
127
|
style: {
|
|
128
128
|
left: "calc(".concat(defaultWidth, " - ").concat(dividerWidth, " / 2)")
|
|
129
129
|
},
|
|
130
130
|
onMouseDown: dragStart
|
|
131
131
|
}, dividerChildren), dragging && /*#__PURE__*/React.createElement("div", {
|
|
132
132
|
"data-testid": "mask",
|
|
133
|
-
className: "".concat(prefix, "draggable-mask")
|
|
133
|
+
className: "".concat(prefix, "-draggable-mask")
|
|
134
134
|
}), /*#__PURE__*/React.createElement("div", {
|
|
135
135
|
"data-testid": "left",
|
|
136
136
|
ref: leftRef,
|
|
137
|
-
className: "".concat(prefix, "draggable-children"),
|
|
137
|
+
className: "".concat(prefix, "-draggable-children"),
|
|
138
138
|
style: {
|
|
139
139
|
left: 0,
|
|
140
140
|
right: "calc(100% - ".concat(defaultWidth, " + ").concat(dividerWidth, " / 2)")
|
|
@@ -142,7 +142,7 @@ var DraggableLayout = function DraggableLayout(_ref) {
|
|
|
142
142
|
}, left), /*#__PURE__*/React.createElement("div", {
|
|
143
143
|
"data-testid": "right",
|
|
144
144
|
ref: rightRef,
|
|
145
|
-
className: "".concat(prefix, "draggable-children"),
|
|
145
|
+
className: "".concat(prefix, "-draggable-children"),
|
|
146
146
|
style: {
|
|
147
147
|
left: "calc(".concat(defaultWidth, " + ").concat(dividerWidth, " / 2)"),
|
|
148
148
|
right: 0
|
|
@@ -8,7 +8,8 @@ var ErrorPage = function ErrorPage(_ref) {
|
|
|
8
8
|
var _useLocale = useLocale('ErrorPage'),
|
|
9
9
|
t = _useLocale.format;
|
|
10
10
|
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
-
className: classNames("".concat(prefix, "errorPage"))
|
|
11
|
+
className: classNames("".concat(prefix, "-errorPage")),
|
|
12
|
+
"data-testid": 'errorPage'
|
|
12
13
|
}, /*#__PURE__*/React.createElement("div", {
|
|
13
14
|
className: classNames("hello")
|
|
14
15
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -10,12 +10,9 @@ interface ErrorBoundaryState {
|
|
|
10
10
|
export declare function FallbackRender(props: FallbackProps): FallbackElement;
|
|
11
11
|
interface ErrorBoundaryProps {
|
|
12
12
|
fallback?: FallbackElement;
|
|
13
|
-
FallbackComponent?: React.ComponentType<FallbackProps>;
|
|
14
13
|
fallbackRender?: typeof FallbackRender;
|
|
15
14
|
onError?: (error: Error, info: string) => void;
|
|
16
15
|
onReset?: () => void;
|
|
17
|
-
resetKeys?: Array<unknown>;
|
|
18
|
-
onResetKeysChange?: (prevResetKey: Array<unknown> | undefined, resetKeys: Array<unknown> | undefined) => void;
|
|
19
16
|
homeLink?: string;
|
|
20
17
|
}
|
|
21
18
|
/**
|
|
@@ -25,15 +22,9 @@ declare class ErrorBoundary extends React.Component<React.PropsWithChildren<Erro
|
|
|
25
22
|
state: ErrorBoundaryState;
|
|
26
23
|
updatedWithError: boolean;
|
|
27
24
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
28
|
-
componentDidUpdate(
|
|
25
|
+
componentDidUpdate(): void;
|
|
29
26
|
reset: () => void;
|
|
30
27
|
resetErrorBoundary: () => void;
|
|
31
28
|
render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
32
29
|
}
|
|
33
30
|
export default ErrorBoundary;
|
|
34
|
-
/**
|
|
35
|
-
* with 写法
|
|
36
|
-
* @param Component 业务组件
|
|
37
|
-
* @param errorBoundaryProps error boundary 的 props
|
|
38
|
-
*/
|
|
39
|
-
export declare function withErrorBoundary<P extends JSX.IntrinsicAttributes>(Component: React.ComponentType<P>, errorBoundaryProps: ErrorBoundaryProps): React.ComponentType<P>;
|
|
@@ -21,16 +21,6 @@ var initialState = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// 本组件 ErrorBoundary 的 props
|
|
24
|
-
|
|
25
|
-
// 检查 resetKeys 是否有变化
|
|
26
|
-
var changedArray = function changedArray() {
|
|
27
|
-
var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
28
|
-
var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
29
|
-
return a.length !== b.length || a.some(function (item, index) {
|
|
30
|
-
return !Object.is(item, b[index]);
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
24
|
/**
|
|
35
25
|
* 错误边界捕获
|
|
36
26
|
*/
|
|
@@ -77,41 +67,29 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
77
67
|
}
|
|
78
68
|
}, {
|
|
79
69
|
key: "componentDidUpdate",
|
|
80
|
-
value: function componentDidUpdate(
|
|
70
|
+
value: function componentDidUpdate() {
|
|
81
71
|
var error = this.state.error;
|
|
82
|
-
var _this$props = this.props,
|
|
83
|
-
resetKeys = _this$props.resetKeys,
|
|
84
|
-
onResetKeysChange = _this$props.onResetKeysChange;
|
|
85
72
|
|
|
86
73
|
// 已经存在错误,并且是第一次由于 error 而引发的 render/update,那么设置 flag=true,不会重置
|
|
87
74
|
if (error !== null && !this.updatedWithError) {
|
|
88
75
|
this.updatedWithError = true;
|
|
89
76
|
return;
|
|
90
77
|
}
|
|
91
|
-
|
|
92
|
-
// 已经存在错误,并且是普通的组件 render,则检查 resetKeys 是否有改动,改了就重置
|
|
93
|
-
if (error !== null && changedArray(prevProps.resetKeys, resetKeys)) {
|
|
94
|
-
if (onResetKeysChange) {
|
|
95
|
-
onResetKeysChange(prevProps.resetKeys, resetKeys);
|
|
96
|
-
}
|
|
97
|
-
this.reset();
|
|
98
|
-
}
|
|
99
78
|
}
|
|
100
79
|
}, {
|
|
101
80
|
key: "render",
|
|
102
81
|
value: function render() {
|
|
103
82
|
var _this2 = this;
|
|
104
|
-
var _this$
|
|
105
|
-
fallback = _this$
|
|
106
|
-
|
|
107
|
-
_this$
|
|
108
|
-
fallbackRender = _this$props2$fallback === void 0 ? function (props) {
|
|
83
|
+
var _this$props = this.props,
|
|
84
|
+
fallback = _this$props.fallback,
|
|
85
|
+
_this$props$fallbackR = _this$props.fallbackRender,
|
|
86
|
+
fallbackRender = _this$props$fallbackR === void 0 ? function (props) {
|
|
109
87
|
// fallback 组件的渲染函数 ErrorPage需要自己定义该组件
|
|
110
88
|
return /*#__PURE__*/React.createElement(ErrorPage, {
|
|
111
89
|
onReset: props.resetErrorBoundary,
|
|
112
90
|
homeLink: _this2.props.homeLink
|
|
113
91
|
});
|
|
114
|
-
} : _this$
|
|
92
|
+
} : _this$props$fallbackR;
|
|
115
93
|
var error = this.state.error;
|
|
116
94
|
if (error !== null) {
|
|
117
95
|
var fallbackProps = {
|
|
@@ -122,13 +100,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
122
100
|
if ( /*#__PURE__*/React.isValidElement(fallback)) {
|
|
123
101
|
return fallback;
|
|
124
102
|
}
|
|
125
|
-
|
|
126
|
-
return fallbackRender(fallbackProps);
|
|
127
|
-
}
|
|
128
|
-
if (FallbackComponent) {
|
|
129
|
-
return /*#__PURE__*/React.createElement(FallbackComponent, fallbackProps);
|
|
130
|
-
}
|
|
131
|
-
throw new Error('ErrorBoundary 组件需要传入 fallback, fallbackRender, FallbackComponent 其中一个');
|
|
103
|
+
return fallbackRender(fallbackProps);
|
|
132
104
|
}
|
|
133
105
|
return this.props.children;
|
|
134
106
|
}
|
|
@@ -137,22 +109,6 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
137
109
|
}(React.Component);
|
|
138
110
|
export default ErrorBoundary;
|
|
139
111
|
|
|
140
|
-
/**
|
|
141
|
-
* with 写法
|
|
142
|
-
* @param Component 业务组件
|
|
143
|
-
* @param errorBoundaryProps error boundary 的 props
|
|
144
|
-
*/
|
|
145
|
-
export function withErrorBoundary(Component, errorBoundaryProps) {
|
|
146
|
-
var Wrapped = function Wrapped(props) {
|
|
147
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, errorBoundaryProps, /*#__PURE__*/React.createElement(Component, props));
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// DevTools 显示的组件名
|
|
151
|
-
var name = Component.displayName || Component.name || 'Unknown';
|
|
152
|
-
Wrapped.displayName = "withErrorBoundary(".concat(name, ")");
|
|
153
|
-
return Wrapped;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
112
|
// [example for ErrorBoundary]
|
|
157
113
|
{
|
|
158
114
|
/*
|
|
@@ -186,40 +142,4 @@ export function withErrorBoundary(Component, errorBoundaryProps) {
|
|
|
186
142
|
<Routes />
|
|
187
143
|
</ErrorBoundary>;
|
|
188
144
|
*/
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// -----------------------
|
|
192
|
-
|
|
193
|
-
// [example for withErrorBoundary]
|
|
194
|
-
{
|
|
195
|
-
/*
|
|
196
|
-
const onError = () => console.error('页面崩溃');
|
|
197
|
-
const onReset = () => {
|
|
198
|
-
console.log('已重置');
|
|
199
|
-
message.info('刚刚出错了,不好意思,现在已经重置好了,请找老板锤这个开发');
|
|
200
|
-
};
|
|
201
|
-
const renderFallback = (props: FallbackProps) => {
|
|
202
|
-
// fallback 组件的渲染函数
|
|
203
|
-
return (
|
|
204
|
-
<Alert
|
|
205
|
-
className={styles.alert}
|
|
206
|
-
message="出错啦"
|
|
207
|
-
showIcon
|
|
208
|
-
description="不好意思,页面因为一些原因崩溃了,您可以尝试重置"
|
|
209
|
-
type="error"
|
|
210
|
-
action={
|
|
211
|
-
<Button size="small" danger onClick={props.resetErrorBoundary}>
|
|
212
|
-
{'重置'}
|
|
213
|
-
</Button>
|
|
214
|
-
}
|
|
215
|
-
/>
|
|
216
|
-
);
|
|
217
|
-
};
|
|
218
|
-
// 在业务组件加一层 ErrorBoundary
|
|
219
|
-
const RoutesWithErrorBoundary = withErrorBoundary(() => <Routes />, {
|
|
220
|
-
fallbackRender: renderFallback,
|
|
221
|
-
onError,
|
|
222
|
-
onReset,
|
|
223
|
-
});
|
|
224
|
-
*/
|
|
225
145
|
}
|
|
@@ -14,17 +14,17 @@ var LoadingMask = function LoadingMask(_ref) {
|
|
|
14
14
|
visible = _useDelayedMount2[1];
|
|
15
15
|
return /*#__PURE__*/React.createElement(React.Fragment, null, mount && /*#__PURE__*/React.createElement("div", {
|
|
16
16
|
"data-testid": 'loadingMask',
|
|
17
|
-
className: classNames("".concat(prefix, "loadingMask"), "".concat(visible ? '' : "".concat(prefix, "loadingHide")))
|
|
17
|
+
className: classNames("".concat(prefix, "-loadingMask"), "".concat(visible ? '' : "".concat(prefix, "-loadingHide")))
|
|
18
18
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: "".concat(prefix, "loadingLoader")
|
|
19
|
+
className: "".concat(prefix, "-loadingLoader")
|
|
20
20
|
}, /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: "".concat(prefix, "loadingSquare")
|
|
21
|
+
className: "".concat(prefix, "-loadingSquare")
|
|
22
22
|
}), /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: "".concat(prefix, "loadingSquare")
|
|
23
|
+
className: "".concat(prefix, "-loadingSquare")
|
|
24
24
|
}), /*#__PURE__*/React.createElement("div", {
|
|
25
|
-
className: "".concat(prefix, "loadingSquare")
|
|
25
|
+
className: "".concat(prefix, "-loadingSquare")
|
|
26
26
|
}), /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: "".concat(prefix, "loadingSquare")
|
|
27
|
+
className: "".concat(prefix, "-loadingSquare")
|
|
28
28
|
}))));
|
|
29
29
|
};
|
|
30
30
|
export default LoadingMask;
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -139,133 +139,4 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
139
139
|
};
|
|
140
140
|
})[T][U];
|
|
141
141
|
};
|
|
142
|
-
export declare const getFormat: <T extends "VisualDataConfig" | "TranslateButton" | "CodeDetailModal" | "ContactButton" | "ErrorPage">(locale: string | undefined, slice: T) => <U extends keyof MessageMap[T]>(key: U) => ({
|
|
143
|
-
readonly VisualDataConfig: {
|
|
144
|
-
readonly Time_MS: "时间限制(MS)";
|
|
145
|
-
readonly Space_MS: "空间限制(KB)";
|
|
146
|
-
readonly Individual_Assessment: "单个测试点/子任务分数";
|
|
147
|
-
readonly Individual_Assessment_Tip: "默认分数,各个测试点/子任务可以覆盖";
|
|
148
|
-
readonly SPJ_EXE_FILE: "Special Judge(SPJ)可执行文件名";
|
|
149
|
-
readonly SPJ_EXE_FILE_TIP: "不填表示不需要SPJ";
|
|
150
|
-
readonly Input_Format: "输入文件名格式";
|
|
151
|
-
readonly Output_Format: "输出文件名格式";
|
|
152
|
-
readonly Input_Output_Format_Tip: "例如:data#.in(表示data1.in), #.in(表示1.in);data#.out(表示data1.out), #.out(表示1.out)";
|
|
153
|
-
readonly File_Input_Format: "文件读写输入文件";
|
|
154
|
-
readonly File_Output_Format: "文件读写输出文件";
|
|
155
|
-
readonly File_Input_Output_Format_Tip: "不填表示不需要文件读写";
|
|
156
|
-
readonly Interactive_Library: "交互题函数库文件名";
|
|
157
|
-
readonly Interactive_Library_Tip: "不填表示不使用函数库";
|
|
158
|
-
readonly Evaluation_Method: "测评方式";
|
|
159
|
-
readonly Single_Point_Data_Testing: "单点数据测试";
|
|
160
|
-
readonly SubTask: "子任务";
|
|
161
|
-
readonly Confirm_Import: "确定并导入";
|
|
162
|
-
readonly Test_Point: "测试点";
|
|
163
|
-
readonly ID: "编号";
|
|
164
|
-
readonly Space: "空间";
|
|
165
|
-
readonly Add_New_Test_Point: "添加新测试点";
|
|
166
|
-
readonly Test_Data: "测试数据";
|
|
167
|
-
readonly Data_Dependency_Subtask: "数据依赖-子任务";
|
|
168
|
-
readonly Add_New_SubTask: "添加新子任务";
|
|
169
|
-
readonly Add_New_SubTask_Tip: "评测机为 uoj 的时候,单独设置时间和空间限制是不生效的。需要把评测机切换为xjoj才生效。";
|
|
170
|
-
readonly Generate_Config_Success: "配置生成成功,请回到数据配置里进行检查";
|
|
171
|
-
readonly Multi_Cases_Tip: "可以填入区间,也可以填入一个数字,逗号分割,例如:[1-5],7";
|
|
172
|
-
readonly TIME: "时间";
|
|
173
|
-
readonly SCORE: "得分";
|
|
174
|
-
readonly BATCH_ADD: "批量添加";
|
|
175
|
-
};
|
|
176
|
-
readonly TranslateButton: {
|
|
177
|
-
readonly CURRENT_LANG: "当前语言:";
|
|
178
|
-
};
|
|
179
|
-
readonly CodeDetailModal: {
|
|
180
|
-
readonly Problem: "题目";
|
|
181
|
-
readonly Language: "语言";
|
|
182
|
-
readonly Status: "状态";
|
|
183
|
-
readonly Score: "得分";
|
|
184
|
-
readonly Memory: "大小";
|
|
185
|
-
readonly Code: "代码";
|
|
186
|
-
readonly Show: "显示";
|
|
187
|
-
readonly Hide: "隐藏";
|
|
188
|
-
readonly Submission_Time: "提交时间";
|
|
189
|
-
readonly Code_Detail: "代码详情";
|
|
190
|
-
readonly Download_File: "下载文件";
|
|
191
|
-
readonly File: "文件";
|
|
192
|
-
};
|
|
193
|
-
readonly ContactButton: {
|
|
194
|
-
readonly CONTACT_TELEPHONE: "电话:17367064678";
|
|
195
|
-
readonly CONTACT_TIP: "微信扫码,直接咨询";
|
|
196
|
-
readonly CONTACT_US: "联系我们";
|
|
197
|
-
};
|
|
198
|
-
readonly ErrorPage: {
|
|
199
|
-
readonly ERROR: "☹ 出错啦";
|
|
200
|
-
readonly ERROR_BOUNDARY_TIP_1: "不好意思,代码意外卷入了黑洞,页面发生了崩溃。";
|
|
201
|
-
readonly ERROR_BOUNDARY_TIP_2: "您可以重试访问该页面,或可以先访问其他页面。";
|
|
202
|
-
readonly RETURN_TO_HOME: "回到首页";
|
|
203
|
-
readonly RETRY: "重试";
|
|
204
|
-
readonly TECHNICAL_DEPARTMENT_CONTACT_EMAIL: "技术部联系邮箱:";
|
|
205
|
-
};
|
|
206
|
-
} | {
|
|
207
|
-
readonly VisualDataConfig: {
|
|
208
|
-
readonly Time_MS: "Time Limit(MS)";
|
|
209
|
-
readonly Space_MS: "Memory Limit(KB)";
|
|
210
|
-
readonly Individual_Assessment: "Score of Each Case/Subtask";
|
|
211
|
-
readonly Individual_Assessment_Tip: "Default score, can be overridden by each case/subtask";
|
|
212
|
-
readonly SPJ_EXE_FILE: "Special Judge(SPJ) Executable Filename";
|
|
213
|
-
readonly SPJ_EXE_FILE_TIP: "Leave blank for no SPJ";
|
|
214
|
-
readonly Input_Format: "Input Filename Format";
|
|
215
|
-
readonly Output_Format: "Output Filename Format";
|
|
216
|
-
readonly Input_Output_Format_Tip: "For example: data#.in (data1.in), #.in (1.in); data#.out (data1.out), #.out (1.out)";
|
|
217
|
-
readonly File_Input_Format: "File I/O Input File";
|
|
218
|
-
readonly File_Output_Format: "File I/O Output File";
|
|
219
|
-
readonly File_Input_Output_Format_Tip: "Leave blank for no File I/O";
|
|
220
|
-
readonly Interactive_Library: "Interactive Function Library Filename";
|
|
221
|
-
readonly Interactive_Library_Tip: "Leave blank for no function library";
|
|
222
|
-
readonly Evaluation_Method: "Evaluation Method";
|
|
223
|
-
readonly Single_Point_Data_Testing: "Single point data test";
|
|
224
|
-
readonly SubTask: "SubTask";
|
|
225
|
-
readonly Confirm_Import: "Confirm and import";
|
|
226
|
-
readonly Test_Point: "Test Point";
|
|
227
|
-
readonly ID: "Id";
|
|
228
|
-
readonly Space: "Space";
|
|
229
|
-
readonly Add_New_Test_Point: "Add a new test point";
|
|
230
|
-
readonly Test_Data: "Test Data";
|
|
231
|
-
readonly Data_Dependency_Subtask: "Data dependency - subtask";
|
|
232
|
-
readonly Add_New_SubTask: "Add new subtask ";
|
|
233
|
-
readonly Add_New_SubTask_Tip: "When the evaluation machine is uoj, setting time and space limits separately does not take effect. You need to switch the tester to xjoj for this to work.";
|
|
234
|
-
readonly Generate_Config_Success: "The configuration is generated successfully. Please go back to the data configuration to check";
|
|
235
|
-
readonly Multi_Cases_Tip: "You can enter an interval or a number, separated by commas, for example :[1-5],7";
|
|
236
|
-
readonly TIME: "Time";
|
|
237
|
-
readonly SCORE: "Score";
|
|
238
|
-
readonly BATCH_ADD: "Batch Add";
|
|
239
|
-
};
|
|
240
|
-
readonly TranslateButton: {
|
|
241
|
-
readonly CURRENT_LANG: "Current Language:";
|
|
242
|
-
};
|
|
243
|
-
readonly CodeDetailModal: {
|
|
244
|
-
readonly Problem: "Problem";
|
|
245
|
-
readonly Language: "Language";
|
|
246
|
-
readonly Status: "Status";
|
|
247
|
-
readonly Score: "Score";
|
|
248
|
-
readonly Memory: "Memory";
|
|
249
|
-
readonly Code: "Code";
|
|
250
|
-
readonly Show: "Show";
|
|
251
|
-
readonly Hide: "Hide";
|
|
252
|
-
readonly Submission_Time: "Submission Time";
|
|
253
|
-
readonly Code_Detail: "Code Detail";
|
|
254
|
-
readonly Download_File: "Download File";
|
|
255
|
-
readonly File: "File";
|
|
256
|
-
};
|
|
257
|
-
readonly ContactButton: {
|
|
258
|
-
readonly CONTACT_TELEPHONE: "Telephone: +1-510-760-1098";
|
|
259
|
-
readonly CONTACT_TIP: "Please Scan The QR Code";
|
|
260
|
-
readonly CONTACT_US: "Contact Us";
|
|
261
|
-
};
|
|
262
|
-
readonly ErrorPage: {
|
|
263
|
-
readonly ERROR: "☹ Error";
|
|
264
|
-
readonly ERROR_BOUNDARY_TIP_1: "Sorry, the code accidentally got caught in a black hole and the page crashed.";
|
|
265
|
-
readonly ERROR_BOUNDARY_TIP_2: "You can try accessing the page again, or you can visit another page first.";
|
|
266
|
-
readonly RETURN_TO_HOME: "Return to home";
|
|
267
|
-
readonly RETRY: "Retry";
|
|
268
|
-
readonly TECHNICAL_DEPARTMENT_CONTACT_EMAIL: "Technical department contact email: ";
|
|
269
|
-
};
|
|
270
|
-
})[T][U];
|
|
271
142
|
export {};
|
package/dist/locales/index.js
CHANGED
|
@@ -34,16 +34,4 @@ export var useLocale = function useLocale(slice) {
|
|
|
34
34
|
}[locale] ? locale : 'zh_CN',
|
|
35
35
|
format: format
|
|
36
36
|
};
|
|
37
|
-
};
|
|
38
|
-
export var getFormat = function getFormat() {
|
|
39
|
-
var _zh_CN$en_US$locale2;
|
|
40
|
-
var locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
41
|
-
var slice = arguments.length > 1 ? arguments[1] : undefined;
|
|
42
|
-
var message = ((_zh_CN$en_US$locale2 = {
|
|
43
|
-
zh_CN: zh_CN,
|
|
44
|
-
en_US: en_US
|
|
45
|
-
}[locale]) !== null && _zh_CN$en_US$locale2 !== void 0 ? _zh_CN$en_US$locale2 : zh_CN)[slice];
|
|
46
|
-
return function (key) {
|
|
47
|
-
return message[key];
|
|
48
|
-
};
|
|
49
37
|
};
|
|
@@ -3,14 +3,14 @@ import { prefix } from "../utils/global";
|
|
|
3
3
|
var RainbowCat = function RainbowCat(_ref) {
|
|
4
4
|
var text = _ref.text;
|
|
5
5
|
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
className: "".concat(prefix, "rainbowContent")
|
|
6
|
+
className: "".concat(prefix, "-rainbowContent")
|
|
7
7
|
}, /*#__PURE__*/React.createElement("img", {
|
|
8
8
|
src: "https://static.production.xjoi.net/images/emoticon-1.gif",
|
|
9
9
|
alt: ""
|
|
10
10
|
}), /*#__PURE__*/React.createElement("div", {
|
|
11
11
|
"data-testid": "text"
|
|
12
12
|
}, text, /*#__PURE__*/React.createElement("span", {
|
|
13
|
-
className: "".concat(prefix, "rainbowDot")
|
|
13
|
+
className: "".concat(prefix, "-rainbowDot")
|
|
14
14
|
}, "...")));
|
|
15
15
|
};
|
|
16
16
|
export default RainbowCat;
|
package/dist/status-tag/index.js
CHANGED
|
@@ -83,7 +83,7 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
83
83
|
}]]);
|
|
84
84
|
return /*#__PURE__*/React.createElement("div", {
|
|
85
85
|
"data-testid": 'status-tag',
|
|
86
|
-
className: classNames("".concat(prefix, "statusTag"), props.className),
|
|
86
|
+
className: classNames("".concat(prefix, "-statusTag"), props.className),
|
|
87
87
|
style: _objectSpread(_objectSpread({}, statusCSSMap.get(status)), {}, {
|
|
88
88
|
borderRadius: shape === 'circle' ? '50%' : '4px'
|
|
89
89
|
}, props.style),
|
|
@@ -93,7 +93,7 @@ var StatusTag = function StatusTag(_ref) {
|
|
|
93
93
|
}, statusCSSMap !== null && statusCSSMap !== void 0 && (_statusCSSMap$get = statusCSSMap.get(status)) !== null && _statusCSSMap$get !== void 0 && _statusCSSMap$get.icon ? hover ? showContent ? children : statusCSSMap === null || statusCSSMap === void 0 ? void 0 : (_statusCSSMap$get2 = statusCSSMap.get(status)) === null || _statusCSSMap$get2 === void 0 ? void 0 : _statusCSSMap$get2.icon : statusCSSMap === null || statusCSSMap === void 0 ? void 0 : (_statusCSSMap$get3 = statusCSSMap.get(status)) === null || _statusCSSMap$get3 === void 0 ? void 0 : _statusCSSMap$get3.icon : children, required && /*#__PURE__*/React.createElement("img", {
|
|
94
94
|
"data-testid": 'required-icon',
|
|
95
95
|
src: diamondSVG,
|
|
96
|
-
className: classNames("".concat(prefix, "required"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "circleRequired"), shape === 'circle'), _defineProperty(_classNames, "".concat(prefix, "rectRequired"), shape !== 'circle'), _classNames))
|
|
96
|
+
className: classNames("".concat(prefix, "-required"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "-circleRequired"), shape === 'circle'), _defineProperty(_classNames, "".concat(prefix, "-rectRequired"), shape !== 'circle'), _classNames))
|
|
97
97
|
}));
|
|
98
98
|
};
|
|
99
99
|
export default StatusTag;
|
package/dist/styles/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
.x-star-design
|
|
2
|
+
.x-star-design--codeDetailModal .x-star-design--codeCompileResult {
|
|
3
3
|
padding: 10px 20px;
|
|
4
4
|
background-color: #fafafa;
|
|
5
5
|
border: 1px solid #e3e3e3;
|
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
min-height: 200px;
|
|
11
11
|
height: 50vh;
|
|
12
12
|
}
|
|
13
|
-
.x-star-design
|
|
13
|
+
.x-star-design--codeDetailModal .x-star-design--codeMirror {
|
|
14
14
|
min-height: 200px;
|
|
15
15
|
height: 50vh;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.x-star-design
|
|
18
|
+
.x-star-design--codeMirror {
|
|
19
19
|
width: 100%;
|
|
20
20
|
height: 100%;
|
|
21
21
|
}
|
|
22
|
-
.x-star-design
|
|
22
|
+
.x-star-design--codeMirror .cm-editor {
|
|
23
23
|
font-family: JBMono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New";
|
|
24
24
|
height: 100%;
|
|
25
25
|
font-size: 16px;
|
|
26
26
|
line-height: 150%;
|
|
27
27
|
}
|
|
28
|
-
.x-star-design
|
|
28
|
+
.x-star-design--codeMirror .cm-focused {
|
|
29
29
|
outline: unset;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.x-star-design
|
|
32
|
+
.x-star-design--contactButtonCard {
|
|
33
33
|
position: fixed !important;
|
|
34
34
|
right: 3rem;
|
|
35
35
|
top: 70%;
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
z-index: 999;
|
|
40
40
|
border: 3px dashed orange !important;
|
|
41
41
|
}
|
|
42
|
-
.x-star-design
|
|
43
|
-
.x-star-design
|
|
42
|
+
.x-star-design--contactButtonCard .ant-card-body,
|
|
43
|
+
.x-star-design--contactButtonCard .x-star-design--card-body {
|
|
44
44
|
padding: 5px;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.x-star-design
|
|
47
|
+
.x-star-design--draggable-layout {
|
|
48
48
|
position: relative;
|
|
49
49
|
width: 100%;
|
|
50
50
|
height: 100%;
|
|
51
51
|
overflow: hidden;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.x-star-design
|
|
54
|
+
.x-star-design--draggable-divider {
|
|
55
55
|
position: absolute;
|
|
56
56
|
top: 0;
|
|
57
57
|
bottom: 0;
|
|
@@ -62,33 +62,33 @@
|
|
|
62
62
|
cursor: col-resize;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.x-star-design
|
|
66
|
-
.x-star-design
|
|
67
|
-
.x-star-design
|
|
65
|
+
.x-star-design--draggable-divider:hover,
|
|
66
|
+
.x-star-design--draggable-divider:active,
|
|
67
|
+
.x-star-design--draggable-divider.x-star-design--draggable-divider-active {
|
|
68
68
|
border-left: 4px #1890ff solid;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.x-star-design
|
|
71
|
+
.x-star-design--draggable-mask {
|
|
72
72
|
position: fixed;
|
|
73
73
|
inset: 0;
|
|
74
74
|
z-index: 99;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.x-star-design
|
|
77
|
+
.x-star-design--draggable-children {
|
|
78
78
|
position: absolute;
|
|
79
79
|
top: 0;
|
|
80
80
|
bottom: 0;
|
|
81
81
|
}
|
|
82
|
-
.x-star-design
|
|
82
|
+
.x-star-design--draggable-children > * {
|
|
83
83
|
height: 100%;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.x-star-design
|
|
86
|
+
.x-star-design--errorPage {
|
|
87
87
|
position: relative;
|
|
88
88
|
height: calc(100vh - 64px);
|
|
89
89
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
90
90
|
}
|
|
91
|
-
.x-star-design
|
|
91
|
+
.x-star-design--errorPage .hello {
|
|
92
92
|
position: absolute;
|
|
93
93
|
bottom: 240px;
|
|
94
94
|
left: 100px;
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
background: url("https://media.strapi.turingstar.com.cn/production/2023/3/hello_0dd8b00bbf.png") 100% no-repeat;
|
|
98
98
|
background-size: 100% 100%;
|
|
99
99
|
}
|
|
100
|
-
.x-star-design
|
|
100
|
+
.x-star-design--errorPage .ip {
|
|
101
101
|
position: absolute;
|
|
102
102
|
bottom: 0;
|
|
103
103
|
left: 0;
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
background: url("https://media.strapi.turingstar.com.cn/production/2023/3/_31e3aca7f2.png") 100% no-repeat;
|
|
107
107
|
background-size: 100% 100%;
|
|
108
108
|
}
|
|
109
|
-
.x-star-design
|
|
109
|
+
.x-star-design--errorPage .planets {
|
|
110
110
|
position: absolute;
|
|
111
111
|
top: 0;
|
|
112
112
|
right: 0;
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
background: url("https://media.strapi.turingstar.com.cn/production/2023/3/background_right_6ff67955bc.png") 100% no-repeat;
|
|
116
116
|
background-size: 100% 100%;
|
|
117
117
|
}
|
|
118
|
-
.x-star-design
|
|
118
|
+
.x-star-design--errorPage .content {
|
|
119
119
|
position: absolute;
|
|
120
120
|
top: 50%;
|
|
121
121
|
left: 50%;
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
transform: translate(-50%, -50%);
|
|
127
127
|
flex-direction: column;
|
|
128
128
|
}
|
|
129
|
-
.x-star-design
|
|
129
|
+
.x-star-design--errorPage .content .alert {
|
|
130
130
|
position: relative;
|
|
131
131
|
display: flex;
|
|
132
132
|
align-items: flex-start;
|
|
@@ -141,19 +141,19 @@
|
|
|
141
141
|
padding-block: 20px;
|
|
142
142
|
box-sizing: border-box;
|
|
143
143
|
}
|
|
144
|
-
.x-star-design
|
|
144
|
+
.x-star-design--errorPage .content .alert .description {
|
|
145
145
|
display: flex;
|
|
146
146
|
flex-direction: column;
|
|
147
147
|
}
|
|
148
|
-
.x-star-design
|
|
148
|
+
.x-star-design--errorPage .content .alert .description div {
|
|
149
149
|
line-height: 2.5rem;
|
|
150
150
|
}
|
|
151
|
-
.x-star-design
|
|
151
|
+
.x-star-design--errorPage .content .alert .description .actions {
|
|
152
152
|
display: flex;
|
|
153
153
|
justify-content: space-between;
|
|
154
154
|
width: 50%;
|
|
155
155
|
}
|
|
156
|
-
.x-star-design
|
|
156
|
+
.x-star-design--errorPage .content a {
|
|
157
157
|
color: #1890ff;
|
|
158
158
|
text-decoration: none;
|
|
159
159
|
background-color: transparent;
|
|
@@ -162,13 +162,13 @@
|
|
|
162
162
|
transition: color 0.3s;
|
|
163
163
|
touch-action: manipulation;
|
|
164
164
|
}
|
|
165
|
-
.x-star-design
|
|
165
|
+
.x-star-design--errorPage .content a:hover {
|
|
166
166
|
text-decoration: none;
|
|
167
167
|
outline: 0;
|
|
168
168
|
color: #40a9ff;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.x-star-design
|
|
171
|
+
.x-star-design--loadingMask {
|
|
172
172
|
position: absolute;
|
|
173
173
|
inset: 0;
|
|
174
174
|
display: flex;
|
|
@@ -179,40 +179,40 @@
|
|
|
179
179
|
transition: all 0.3s;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
.x-star-design
|
|
182
|
+
.x-star-design--loadingHide {
|
|
183
183
|
opacity: 0;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
.x-star-design
|
|
186
|
+
.x-star-design--loadingLoader {
|
|
187
187
|
position: relative;
|
|
188
188
|
width: 86px;
|
|
189
189
|
height: 20px;
|
|
190
190
|
margin: auto;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
.x-star-design
|
|
193
|
+
.x-star-design--loadingSquare {
|
|
194
194
|
position: absolute;
|
|
195
195
|
top: 0;
|
|
196
196
|
width: 20px;
|
|
197
197
|
height: 20px;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
.x-star-design
|
|
200
|
+
.x-star-design--loadingSquare:nth-child(1) {
|
|
201
201
|
left: 0;
|
|
202
202
|
animation: square1 1.5s linear forwards infinite;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
.x-star-design
|
|
205
|
+
.x-star-design--loadingSquare:nth-child(2) {
|
|
206
206
|
left: 22px;
|
|
207
207
|
animation: square2 1.5s linear forwards infinite;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
.x-star-design
|
|
210
|
+
.x-star-design--loadingSquare:nth-child(3) {
|
|
211
211
|
left: 44px;
|
|
212
212
|
animation: square3 1.5s linear forwards infinite;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
.x-star-design
|
|
215
|
+
.x-star-design--loadingSquare:nth-child(4) {
|
|
216
216
|
left: 66px;
|
|
217
217
|
animation: square4 1.5s linear forwards infinite;
|
|
218
218
|
}
|
|
@@ -313,17 +313,17 @@
|
|
|
313
313
|
transform: translate(-66px, 0);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
.x-star-design
|
|
316
|
+
.x-star-design--rainbowContent {
|
|
317
317
|
height: 100vh;
|
|
318
318
|
display: flex;
|
|
319
319
|
justify-content: center;
|
|
320
320
|
align-items: center;
|
|
321
321
|
flex-direction: column;
|
|
322
322
|
}
|
|
323
|
-
.x-star-design
|
|
323
|
+
.x-star-design--rainbowContent img {
|
|
324
324
|
margin-bottom: 20px;
|
|
325
325
|
}
|
|
326
|
-
.x-star-design
|
|
326
|
+
.x-star-design--rainbowContent .x-star-design--rainbowDot {
|
|
327
327
|
font-family: simsun, monospace;
|
|
328
328
|
/* 固定字体避免设置的宽度无效 */
|
|
329
329
|
display: inline-block;
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
.x-star-design
|
|
354
|
+
.x-star-design--statusTag {
|
|
355
355
|
position: relative;
|
|
356
356
|
display: flex;
|
|
357
357
|
justify-content: center;
|
|
@@ -364,30 +364,30 @@
|
|
|
364
364
|
border: 1px dashed #b7b7b7;
|
|
365
365
|
background-color: #efefef;
|
|
366
366
|
}
|
|
367
|
-
.x-star-design
|
|
367
|
+
.x-star-design--statusTag img {
|
|
368
368
|
width: 1rem;
|
|
369
369
|
height: 1rem;
|
|
370
370
|
}
|
|
371
|
-
.x-star-design
|
|
371
|
+
.x-star-design--statusTag .x-star-design--required {
|
|
372
372
|
position: absolute;
|
|
373
373
|
width: 0.8rem;
|
|
374
374
|
height: 0.8rem;
|
|
375
375
|
}
|
|
376
|
-
.x-star-design
|
|
376
|
+
.x-star-design--statusTag .x-star-design--circleRequired {
|
|
377
377
|
top: -3px;
|
|
378
378
|
right: -3px;
|
|
379
379
|
}
|
|
380
|
-
.x-star-design
|
|
380
|
+
.x-star-design--statusTag .x-star-design--rectRequired {
|
|
381
381
|
top: -5px;
|
|
382
382
|
right: -5px;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
.x-star-design
|
|
385
|
+
.x-star-design--titleSection {
|
|
386
386
|
font-size: 18px;
|
|
387
387
|
margin: 15px 10px 20px 0;
|
|
388
388
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
389
389
|
}
|
|
390
|
-
.x-star-design
|
|
390
|
+
.x-star-design--titleSection img {
|
|
391
391
|
width: 1em;
|
|
392
392
|
height: 1em;
|
|
393
393
|
display: inline-flex;
|
|
@@ -401,32 +401,32 @@
|
|
|
401
401
|
text-rendering: optimizelegibility;
|
|
402
402
|
-webkit-font-smoothing: antialiased;
|
|
403
403
|
}
|
|
404
|
-
.x-star-design
|
|
404
|
+
.x-star-design--titleSection .x-star-design--title {
|
|
405
405
|
color: #000;
|
|
406
406
|
margin: 0 10px;
|
|
407
407
|
}
|
|
408
|
-
.x-star-design
|
|
408
|
+
.x-star-design--titleSection .x-star-design--description {
|
|
409
409
|
color: #b6b6b6;
|
|
410
410
|
font-size: 12px;
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
.x-star-design
|
|
413
|
+
.x-star-design--virtual-grid::-webkit-scrollbar {
|
|
414
414
|
width: 7px;
|
|
415
415
|
height: 7px;
|
|
416
416
|
}
|
|
417
|
-
.x-star-design
|
|
417
|
+
.x-star-design--virtual-grid::-webkit-scrollbar-thumb {
|
|
418
418
|
border-radius: 3px;
|
|
419
419
|
box-shadow: inset 0 0 5px #9b9ba3;
|
|
420
420
|
background: rgba(152, 155, 163, 0.5);
|
|
421
421
|
}
|
|
422
|
-
.x-star-design
|
|
422
|
+
.x-star-design--virtual-grid::-webkit-scrollbar-thumb:hover {
|
|
423
423
|
background: rgba(152, 155, 163, 0.7);
|
|
424
424
|
}
|
|
425
|
-
.x-star-design
|
|
425
|
+
.x-star-design--virtual-grid::-webkit-scrollbar-thumb:active {
|
|
426
426
|
background: rgba(152, 155, 163, 0.9);
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
.x-star-design
|
|
429
|
+
.x-star-design--virtual-table-cell {
|
|
430
430
|
box-sizing: border-box;
|
|
431
431
|
padding: 14px;
|
|
432
432
|
border-bottom: 1px solid #e8e8e8;
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
background: #fff;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
[data-theme=dark] .x-star-design
|
|
437
|
+
[data-theme=dark] .x-star-design--virtual-table-cell {
|
|
438
438
|
box-sizing: border-box;
|
|
439
439
|
padding: 14px;
|
|
440
440
|
border-bottom: 1px solid #303030;
|
|
@@ -442,16 +442,16 @@
|
|
|
442
442
|
background: #141414;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
-
.x-star-design
|
|
445
|
+
.x-star-design--visualForm {
|
|
446
446
|
width: 90%;
|
|
447
447
|
}
|
|
448
|
-
.x-star-design
|
|
448
|
+
.x-star-design--visualForm .x-star-design--row {
|
|
449
449
|
width: 100%;
|
|
450
450
|
}
|
|
451
|
-
.x-star-design
|
|
451
|
+
.x-star-design--visualForm .x-star-design--row .x-star-design--explainItem {
|
|
452
452
|
margin: -20px 0 16px;
|
|
453
453
|
}
|
|
454
|
-
.x-star-design
|
|
454
|
+
.x-star-design--visualForm .x-star-design--row .x-star-design--form-item-extra {
|
|
455
455
|
clear: both;
|
|
456
456
|
color: rgba(0, 0, 0, 0.4509803922);
|
|
457
457
|
font-size: 14px;
|
|
@@ -459,22 +459,22 @@
|
|
|
459
459
|
transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
460
460
|
min-height: 24px;
|
|
461
461
|
}
|
|
462
|
-
.x-star-design
|
|
462
|
+
.x-star-design--visualForm .x-star-design--formList {
|
|
463
463
|
width: 100%;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
.x-star-design
|
|
466
|
+
.x-star-design--XTabs.x-star-design--tabs, .x-star-design--XTabs.ant-tabs {
|
|
467
467
|
width: 100%;
|
|
468
468
|
min-height: 80vh;
|
|
469
469
|
border: 0;
|
|
470
470
|
background-color: #fff;
|
|
471
471
|
color: #9e9e9e;
|
|
472
472
|
}
|
|
473
|
-
.x-star-design
|
|
474
|
-
.x-star-design
|
|
473
|
+
.x-star-design--XTabs .x-star-design--tabs-nav-wrap,
|
|
474
|
+
.x-star-design--XTabs .ant-tabs-nav-wrap {
|
|
475
475
|
background-color: #e3ecff;
|
|
476
476
|
}
|
|
477
|
-
.x-star-design
|
|
477
|
+
.x-star-design--XTabs.x-star-design--tabs-card > .x-star-design--tabs-nav .x-star-design--tabs-tab, .x-star-design--XTabs.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
|
|
478
478
|
width: 130px;
|
|
479
479
|
height: 130px;
|
|
480
480
|
background-color: #e3ecff;
|
|
@@ -484,35 +484,35 @@
|
|
|
484
484
|
justify-content: center;
|
|
485
485
|
border: 0;
|
|
486
486
|
}
|
|
487
|
-
.x-star-design
|
|
487
|
+
.x-star-design--XTabs.x-star-design--tabs-card > .x-star-design--tabs-nav .x-star-design--tabs-tab-active, .x-star-design--XTabs.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active {
|
|
488
488
|
border-left: 6px solid #1890ff;
|
|
489
489
|
background-color: #fff;
|
|
490
490
|
transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
491
491
|
border-radius: 0;
|
|
492
492
|
}
|
|
493
|
-
.x-star-design
|
|
494
|
-
.x-star-design
|
|
493
|
+
.x-star-design--XTabs .x-star-design--tabs-tab-btn,
|
|
494
|
+
.x-star-design--XTabs .ant-tabs-tab-btn {
|
|
495
495
|
text-align: center;
|
|
496
496
|
white-space: normal;
|
|
497
497
|
}
|
|
498
|
-
.x-star-design
|
|
499
|
-
.x-star-design
|
|
498
|
+
.x-star-design--XTabs .x-star-design--tabs-content,
|
|
499
|
+
.x-star-design--XTabs .ant-tabs-content {
|
|
500
500
|
display: flex;
|
|
501
501
|
width: 100%;
|
|
502
502
|
height: 100%;
|
|
503
503
|
border: 1px solid #d7d7d7;
|
|
504
504
|
padding: 0 20px;
|
|
505
505
|
}
|
|
506
|
-
.x-star-design
|
|
507
|
-
.x-star-design
|
|
506
|
+
.x-star-design--XTabs .x-star-design--tabs-tabpane,
|
|
507
|
+
.x-star-design--XTabs .ant-tabs-tabpane {
|
|
508
508
|
padding: 0 24px 24px;
|
|
509
509
|
}
|
|
510
|
-
.x-star-design
|
|
510
|
+
.x-star-design--XTabs .x-star-design--icon-img {
|
|
511
511
|
text-align: center;
|
|
512
512
|
font-size: 44px;
|
|
513
513
|
padding-left: 10px;
|
|
514
514
|
}
|
|
515
|
-
.x-star-design
|
|
515
|
+
.x-star-design--XTabs .x-star-design--icon-title {
|
|
516
516
|
font-size: 16px;
|
|
517
517
|
display: block;
|
|
518
518
|
padding-top: 10px;
|
|
@@ -9,17 +9,17 @@ var TitleWithIcon = function TitleWithIcon(_ref) {
|
|
|
9
9
|
id = _ref.id;
|
|
10
10
|
return /*#__PURE__*/React.createElement("div", {
|
|
11
11
|
"data-testid": "wrapper",
|
|
12
|
-
className: classNames(className, "".concat(prefix, "titleSection")),
|
|
12
|
+
className: classNames(className, "".concat(prefix, "-titleSection")),
|
|
13
13
|
id: id
|
|
14
14
|
}, /*#__PURE__*/React.createElement("img", {
|
|
15
15
|
src: rightSvg,
|
|
16
16
|
alt: ""
|
|
17
17
|
}), /*#__PURE__*/React.createElement("span", {
|
|
18
18
|
"data-testid": "title",
|
|
19
|
-
className: "".concat(prefix, "title")
|
|
19
|
+
className: "".concat(prefix, "-title")
|
|
20
20
|
}, title), /*#__PURE__*/React.createElement("span", {
|
|
21
21
|
"data-testid": "description",
|
|
22
|
-
className: "".concat(prefix, "description")
|
|
22
|
+
className: "".concat(prefix, "-description")
|
|
23
23
|
}, description));
|
|
24
24
|
};
|
|
25
25
|
export default TitleWithIcon;
|
package/dist/utils/global.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const prefix = "x-star-design
|
|
1
|
+
export declare const prefix = "x-star-design";
|
package/dist/utils/global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var prefix = 'x-star-design
|
|
1
|
+
export var prefix = 'x-star-design';
|
|
@@ -151,7 +151,7 @@ var VirtualTable = function VirtualTable(props) {
|
|
|
151
151
|
var record = rawData[rowIndex];
|
|
152
152
|
var props = (_column$onCell = column.onCell) === null || _column$onCell === void 0 ? void 0 : _column$onCell.call(column, record, rowIndex);
|
|
153
153
|
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
154
|
-
className: classNames("".concat(prefix, "virtual-table-cell"), {
|
|
154
|
+
className: classNames("".concat(prefix, "-virtual-table-cell"), {
|
|
155
155
|
'virtual-table-cell-last': columnIndex === mergedColumns.length - 1
|
|
156
156
|
}, props === null || props === void 0 ? void 0 : props.className),
|
|
157
157
|
style: _objectSpread(_objectSpread({}, style), props === null || props === void 0 ? void 0 : props.style)
|
|
@@ -212,7 +212,7 @@ var VirtualTable = function VirtualTable(props) {
|
|
|
212
212
|
});
|
|
213
213
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
214
214
|
ref: gridRef,
|
|
215
|
-
className: "".concat(prefix, "virtual-grid"),
|
|
215
|
+
className: "".concat(prefix, "-virtual-grid"),
|
|
216
216
|
columnCount: mergedColumns.length,
|
|
217
217
|
columnWidth: function columnWidth(index) {
|
|
218
218
|
var width = mergedColumns[index].width;
|
|
@@ -241,7 +241,7 @@ var VirtualTable = function VirtualTable(props) {
|
|
|
241
241
|
return setTableWidth(width);
|
|
242
242
|
}
|
|
243
243
|
}, /*#__PURE__*/React.createElement(Table, _extends({}, props, {
|
|
244
|
-
className: classNames("".concat(prefix, "virtual-table"), props.className),
|
|
244
|
+
className: classNames("".concat(prefix, "-virtual-table"), props.className),
|
|
245
245
|
pagination: false,
|
|
246
246
|
components: {
|
|
247
247
|
header: {
|
|
@@ -27,7 +27,7 @@ var SingleDataConfig = function SingleDataConfig() {
|
|
|
27
27
|
span: 24
|
|
28
28
|
}
|
|
29
29
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
30
|
-
className: "".concat(prefix, "formList"),
|
|
30
|
+
className: "".concat(prefix, "-formList"),
|
|
31
31
|
gutter: [10, 0]
|
|
32
32
|
}, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement(Form.Item, _extends({}, field, {
|
|
33
33
|
label: t('ID'),
|
|
@@ -46,6 +46,7 @@ var SingleDataConfig = function SingleDataConfig() {
|
|
|
46
46
|
name: [field.name, 'points']
|
|
47
47
|
}), /*#__PURE__*/React.createElement(InputNumber, null))), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
|
|
48
48
|
className: "dynamic-delete-button",
|
|
49
|
+
"data-testid": 'deleteSingleBtn',
|
|
49
50
|
style: {
|
|
50
51
|
lineHeight: '32px',
|
|
51
52
|
height: 32
|
|
@@ -76,6 +77,7 @@ var SingleDataConfig = function SingleDataConfig() {
|
|
|
76
77
|
value: addTestNumber,
|
|
77
78
|
min: 1,
|
|
78
79
|
max: 50,
|
|
80
|
+
"data-testid": 'batchAddInput',
|
|
79
81
|
onChange: function onChange(value) {
|
|
80
82
|
return setAddTestNumber(value || 0);
|
|
81
83
|
}
|
|
@@ -27,7 +27,7 @@ var SubTaskConfig = function SubTaskConfig() {
|
|
|
27
27
|
span: 24
|
|
28
28
|
}
|
|
29
29
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
30
|
-
className: "".concat(prefix, "formList"),
|
|
30
|
+
className: "".concat(prefix, "-formList"),
|
|
31
31
|
gutter: [10, 10]
|
|
32
32
|
}, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement(Form.Item, _extends({}, field, {
|
|
33
33
|
label: t('TIME'),
|
|
@@ -49,6 +49,7 @@ var SubTaskConfig = function SubTaskConfig() {
|
|
|
49
49
|
label: t('Data_Dependency_Subtask'),
|
|
50
50
|
name: [field.name, 'dependences']
|
|
51
51
|
}), /*#__PURE__*/React.createElement(Input, null))), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
|
|
52
|
+
"data-testid": "deleteSubtaskBtn",
|
|
52
53
|
className: "dynamic-delete-button",
|
|
53
54
|
style: {
|
|
54
55
|
lineHeight: '32px',
|
|
@@ -77,6 +78,7 @@ var SubTaskConfig = function SubTaskConfig() {
|
|
|
77
78
|
}, t('BATCH_ADD')), /*#__PURE__*/React.createElement(InputNumber, {
|
|
78
79
|
min: 1,
|
|
79
80
|
max: 50,
|
|
81
|
+
"data-testid": 'batchAddInput',
|
|
80
82
|
value: addTestNumber,
|
|
81
83
|
onChange: function onChange(value) {
|
|
82
84
|
return setAddTestNumber(value || 0);
|
|
@@ -2,12 +2,7 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
|
2
2
|
// 删除空对象 删除'', null, undefined
|
|
3
3
|
export var isEmpty = function isEmpty(obj) {
|
|
4
4
|
if (_typeof(obj) === 'object') {
|
|
5
|
-
|
|
6
|
-
if (obj.hasOwnProperty(i)) {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
return true;
|
|
5
|
+
return !Object.keys(obj).length;
|
|
11
6
|
} else {
|
|
12
7
|
return obj === '' || obj === null || obj === undefined;
|
|
13
8
|
}
|
|
@@ -18,14 +13,13 @@ export var isEmpty = function isEmpty(obj) {
|
|
|
18
13
|
* @param {Object} obj 来源对象
|
|
19
14
|
*/
|
|
20
15
|
export var compactObj = function compactObj(obj) {
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
16
|
+
for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
|
|
17
|
+
var i = _Object$keys[_i];
|
|
18
|
+
if (_typeof(obj[i]) === 'object') {
|
|
19
|
+
compactObj(obj[i]);
|
|
20
|
+
}
|
|
21
|
+
if (isEmpty(obj[i])) {
|
|
22
|
+
delete obj[i];
|
|
29
23
|
}
|
|
30
24
|
}
|
|
31
25
|
return obj;
|
|
@@ -87,11 +87,11 @@ var VisualDataConfig = function VisualDataConfig(_ref) {
|
|
|
87
87
|
return _ref2.apply(this, arguments);
|
|
88
88
|
};
|
|
89
89
|
}(),
|
|
90
|
-
className: "".concat(prefix, "visualForm")
|
|
90
|
+
className: "".concat(prefix, "-visualForm")
|
|
91
91
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
92
92
|
justify: "start",
|
|
93
93
|
gutter: [16, 0],
|
|
94
|
-
className: "".concat(prefix, "row")
|
|
94
|
+
className: "".concat(prefix, "-row")
|
|
95
95
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
96
96
|
span: 6
|
|
97
97
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -143,7 +143,7 @@ var VisualDataConfig = function VisualDataConfig(_ref) {
|
|
|
143
143
|
}, /*#__PURE__*/React.createElement(Input, null))), /*#__PURE__*/React.createElement(Col, {
|
|
144
144
|
span: 24
|
|
145
145
|
}, /*#__PURE__*/React.createElement("div", {
|
|
146
|
-
className: "".concat(prefix, "form-item-extra ", "".concat(prefix, "explainItem"))
|
|
146
|
+
className: "".concat(prefix, "-form-item-extra ", "".concat(prefix, "-explainItem"))
|
|
147
147
|
}, t('Input_Output_Format_Tip'))), /*#__PURE__*/React.createElement(Col, {
|
|
148
148
|
span: 8
|
|
149
149
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -157,7 +157,7 @@ var VisualDataConfig = function VisualDataConfig(_ref) {
|
|
|
157
157
|
}, /*#__PURE__*/React.createElement(Input, null))), /*#__PURE__*/React.createElement(Col, {
|
|
158
158
|
span: 24
|
|
159
159
|
}, /*#__PURE__*/React.createElement("div", {
|
|
160
|
-
className: "".concat(prefix, "form-item-extra ").concat(prefix, "explainItem")
|
|
160
|
+
className: "".concat(prefix, "-form-item-extra ").concat(prefix, "-explainItem")
|
|
161
161
|
}, t('File_Input_Output_Format_Tip'))), /*#__PURE__*/React.createElement(Col, {
|
|
162
162
|
span: 12
|
|
163
163
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
package/dist/xtabs/index.js
CHANGED
|
@@ -13,17 +13,17 @@ var XTabs = function XTabs(_ref) {
|
|
|
13
13
|
return items === null || items === void 0 ? void 0 : items.map(function (item) {
|
|
14
14
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
15
15
|
label: /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
className: "".concat(prefix, "icon-pane")
|
|
16
|
+
className: "".concat(prefix, "-icon-pane")
|
|
17
17
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
className: "".concat(prefix, "icon-img")
|
|
18
|
+
className: "".concat(prefix, "-icon-img")
|
|
19
19
|
}, item.icon), /*#__PURE__*/React.createElement("em", {
|
|
20
|
-
className: "".concat(prefix, "icon-title")
|
|
20
|
+
className: "".concat(prefix, "-icon-title")
|
|
21
21
|
}, item === null || item === void 0 ? void 0 : item.label))
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
}, [items]);
|
|
25
25
|
return /*#__PURE__*/React.createElement(ConfigProviderWrapper, null, /*#__PURE__*/React.createElement(Tabs, _extends({
|
|
26
|
-
className: "".concat(prefix, "XTabs"),
|
|
26
|
+
className: "".concat(prefix, "-XTabs"),
|
|
27
27
|
tabPosition: 'left',
|
|
28
28
|
size: "large",
|
|
29
29
|
type: "card",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-star-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "A react component library developed by turingstar",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"prepare": "husky install && dumi setup",
|
|
21
21
|
"prepublishOnly": "father doctor && npm run build",
|
|
22
22
|
"start": "npm run dev",
|
|
23
|
-
"test": "jest"
|
|
23
|
+
"test": "TZ=UTC-8 jest"
|
|
24
24
|
},
|
|
25
25
|
"commitlint": {
|
|
26
26
|
"extends": [
|