x-star-design 0.0.40 → 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 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
- return setShowCode(false);
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 ? (codeData === null || codeData === void 0 ? void 0 : codeData.language) === 'plain' ? /*#__PURE__*/React.createElement(Button, {
126
- type: "link",
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: 'x-star-design',
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(prevProps: Readonly<React.PropsWithChildren<ErrorBoundaryProps>>): void;
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(prevProps) {
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$props2 = this.props,
105
- fallback = _this$props2.fallback,
106
- FallbackComponent = _this$props2.FallbackComponent,
107
- _this$props2$fallback = _this$props2.fallbackRender,
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$props2$fallback;
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
- if (typeof fallbackRender === 'function') {
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
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { default as AcAnimation } from './ac-animation';
2
- export { default as Aliplayer } from './ali-player';
3
- export type { AliplayerConfig, AliplayerInstance } from './ali-player';
2
+ export { default as Aliplayer } from './aliplayer';
3
+ export type { AliplayerConfig, AliplayerInstance } from './aliplayer';
4
4
  export { default as CodeDetailModal } from './code-detail-modal';
5
5
  export { default as CodeMirrorWrapper } from './code-mirror-wrapper';
6
6
  export { LangId, Language, Theme } from './code-mirror-wrapper/define';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { default as AcAnimation } from "./ac-animation";
2
- export { default as Aliplayer } from "./ali-player";
2
+ export { default as Aliplayer } from "./aliplayer";
3
3
  export { default as CodeDetailModal } from "./code-detail-modal";
4
4
  export { default as CodeMirrorWrapper } from "./code-mirror-wrapper";
5
5
  export { LangId, Language, Theme } from "./code-mirror-wrapper/define";
@@ -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;
@@ -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 {};
@@ -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;
@@ -1,7 +1,7 @@
1
1
  import type { TableProps } from 'antd';
2
2
  import React from 'react';
3
- type customProps = {
4
- onSortEnd?: (newDataSource: Array<any>) => Promise<void>;
5
- };
6
- declare const SortTable: (props: TableProps<any> & customProps) => React.JSX.Element;
3
+ interface SortTableProps<RecordType> extends TableProps<RecordType> {
4
+ onSortEnd?: (newDataSource: RecordType[]) => void;
5
+ }
6
+ declare const SortTable: <RecordType extends Record<string, unknown>>(props: SortTableProps<RecordType>) => React.JSX.Element;
7
7
  export default SortTable;