x-star-design 0.0.86 → 0.0.88
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/ac-config/GeneralConfigItem.js +57 -7
- package/dist/ac-config/define.d.ts +4 -0
- package/dist/ac-config/define.js +5 -0
- package/dist/ac-config/index.d.ts +1 -0
- package/dist/ac-config/index.js +6 -2
- package/dist/contest-duration-input/index.d.ts +9 -0
- package/dist/contest-duration-input/index.js +79 -0
- package/dist/contest-time-input/index.d.ts +1 -1
- package/dist/contest-time-input/index.js +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/locales/en_US.d.ts +9 -0
- package/dist/locales/en_US.js +10 -1
- package/dist/locales/index.d.ts +19 -1
- package/dist/locales/zh_CN.d.ts +9 -0
- package/dist/locales/zh_CN.js +10 -1
- package/dist/styles/index.css +17 -0
- package/package.json +1 -1
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { QuestionCircleOutlined, SwapOutlined } from '@ant-design/icons';
|
|
3
|
+
import { Checkbox, Col, DatePicker, Flex, Form, Radio, Row, Space, Tooltip, message } from 'antd';
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import ContestDurationInput, { isValidDate } from "../contest-duration-input";
|
|
4
6
|
import ContestTimeInput from "../contest-time-input";
|
|
5
7
|
import { useLocale } from "../locales";
|
|
8
|
+
import { useTenant } from "../tenant-provider";
|
|
9
|
+
import { prefix } from "../utils/global";
|
|
6
10
|
import TimingFormItem from "./TimingFormItem";
|
|
11
|
+
import { ContestTimeMode } from "./define";
|
|
7
12
|
var RangePicker = DatePicker.RangePicker;
|
|
8
13
|
var GeneralConfigItem = function GeneralConfigItem(_ref) {
|
|
9
14
|
var type = _ref.type,
|
|
@@ -12,21 +17,66 @@ var GeneralConfigItem = function GeneralConfigItem(_ref) {
|
|
|
12
17
|
var FOREVER = 876000; // 100 年 = 876000 小时
|
|
13
18
|
var _useLocale = useLocale('AcConfig'),
|
|
14
19
|
t = _useLocale.format;
|
|
15
|
-
|
|
20
|
+
var _useTenant = useTenant(),
|
|
21
|
+
primaryColor = _useTenant.theme.primaryColor;
|
|
16
22
|
// 监听 submission 字段
|
|
17
23
|
var submitType = Form.useWatch('submission', form);
|
|
24
|
+
var _useState = useState(ContestTimeMode.New),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
contestTimeMode = _useState2[0],
|
|
27
|
+
setContestTimeMode = _useState2[1];
|
|
18
28
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
19
29
|
name: 'contestTime',
|
|
20
|
-
label: contestType === 'contest' ?
|
|
30
|
+
label: contestType === 'contest' ? /*#__PURE__*/React.createElement(Flex, {
|
|
31
|
+
style: {
|
|
32
|
+
height: '100%'
|
|
33
|
+
},
|
|
34
|
+
align: "center",
|
|
35
|
+
gap: 5
|
|
36
|
+
}, t('ExamTime'), /*#__PURE__*/React.createElement(Tooltip, {
|
|
37
|
+
title: t('Time_Setting_Mode_Conversion')
|
|
38
|
+
}, /*#__PURE__*/React.createElement(SwapOutlined, {
|
|
39
|
+
className: "".concat(prefix, "-contest-time-swap"),
|
|
40
|
+
style: {
|
|
41
|
+
color: primaryColor
|
|
42
|
+
},
|
|
43
|
+
"data-testid": "contest-config-time-swap",
|
|
44
|
+
onClick: function onClick() {
|
|
45
|
+
//如果是空值就可以切换
|
|
46
|
+
if (form.getFieldValue(['contestTime']).length === 0) {
|
|
47
|
+
setContestTimeMode(contestTimeMode === ContestTimeMode.New ? ContestTimeMode.Old : ContestTimeMode.New);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
//如果有值得看看他是不是符合正确的格式
|
|
51
|
+
form.validateFields(['contestTime']).then(function () {
|
|
52
|
+
setContestTimeMode(contestTimeMode === ContestTimeMode.New ? ContestTimeMode.Old : ContestTimeMode.New);
|
|
53
|
+
}).catch(function () {
|
|
54
|
+
message.error({
|
|
55
|
+
key: 'error',
|
|
56
|
+
content: t('Please_Enter_Correct_Time_Format')
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}))) : t('HomeworkTime'),
|
|
21
61
|
rules: [{
|
|
22
62
|
required: true
|
|
63
|
+
}, {
|
|
64
|
+
validator: function validator(_, value) {
|
|
65
|
+
if (contestType === 'homework') return Promise.resolve();
|
|
66
|
+
var startTime = value === null || value === void 0 ? void 0 : value[0];
|
|
67
|
+
var endTime = value === null || value === void 0 ? void 0 : value[1];
|
|
68
|
+
//开始时间不合法
|
|
69
|
+
if (typeof startTime === 'string' && !isValidDate(startTime)) return Promise.reject(new Error(t('Please_Enter_Correct_Time_Format')));
|
|
70
|
+
//结束时间和开始时间一致证明持续时间没输入
|
|
71
|
+
else if (endTime && endTime.valueOf() === (startTime === null || startTime === void 0 ? void 0 : startTime.valueOf())) return Promise.reject(new Error(t('Duration_Cannot_Be_Set_To_Zero')));else return Promise.resolve();
|
|
72
|
+
}
|
|
23
73
|
}],
|
|
24
74
|
extra: contestType === 'contest' && /*#__PURE__*/React.createElement("span", null, t('Contest_Time_Tip'))
|
|
25
|
-
}, contestType === 'contest' ? /*#__PURE__*/React.createElement(RangePicker, {
|
|
75
|
+
}, contestType === 'contest' ? /*#__PURE__*/React.createElement(React.Fragment, null, contestTimeMode === ContestTimeMode.New ? /*#__PURE__*/React.createElement(ContestDurationInput, null) : /*#__PURE__*/React.createElement(RangePicker, {
|
|
26
76
|
showTime: true,
|
|
27
77
|
format: 'YYYY-MM-DD HH:mm',
|
|
28
78
|
"data-testid": "contest-config-time-input"
|
|
29
|
-
}) : /*#__PURE__*/React.createElement(Radio.Group, {
|
|
79
|
+
})) : /*#__PURE__*/React.createElement(Radio.Group, {
|
|
30
80
|
style: {
|
|
31
81
|
display: 'flex'
|
|
32
82
|
}
|
package/dist/ac-config/define.js
CHANGED
|
@@ -3,4 +3,9 @@ export var ContestExamType = /*#__PURE__*/function (ContestExamType) {
|
|
|
3
3
|
ContestExamType["Homework"] = "homework";
|
|
4
4
|
ContestExamType["Exam"] = "contest";
|
|
5
5
|
return ContestExamType;
|
|
6
|
+
}({});
|
|
7
|
+
export var ContestTimeMode = /*#__PURE__*/function (ContestTimeMode) {
|
|
8
|
+
ContestTimeMode["Old"] = "old";
|
|
9
|
+
ContestTimeMode["New"] = "new";
|
|
10
|
+
return ContestTimeMode;
|
|
6
11
|
}({});
|
|
@@ -6,6 +6,7 @@ export interface AcConfigProps extends Omit<FormProps, 'children'> {
|
|
|
6
6
|
contestType?: ContestExamType;
|
|
7
7
|
initialValues?: Configuration;
|
|
8
8
|
onFinish?: (values: Configuration) => void;
|
|
9
|
+
form?: FormInstance<any>;
|
|
9
10
|
}
|
|
10
11
|
export interface AcConfigHandle {
|
|
11
12
|
form: FormInstance<any>;
|
package/dist/ac-config/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
var _excluded = ["type", "contestType", "initialValues"];
|
|
6
|
+
var _excluded = ["type", "contestType", "initialValues", "form"];
|
|
7
7
|
import { Divider, Form, Space } from 'antd';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import dayjs from 'dayjs';
|
|
@@ -92,10 +92,12 @@ var AcConfig = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
92
92
|
_ref3$contestType = _ref3.contestType,
|
|
93
93
|
contestType = _ref3$contestType === void 0 ? ContestExamType.Homework : _ref3$contestType,
|
|
94
94
|
initialValues = _ref3.initialValues,
|
|
95
|
+
externalForm = _ref3.form,
|
|
95
96
|
props = _objectWithoutProperties(_ref3, _excluded);
|
|
96
97
|
var _Form$useForm = Form.useForm(),
|
|
97
98
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
98
|
-
|
|
99
|
+
internalForm = _Form$useForm2[0];
|
|
100
|
+
var form = externalForm || internalForm; // 使用外部传入的 form,如果没有则使用内部创建的 form
|
|
99
101
|
var _useLocale = useLocale('AcConfig'),
|
|
100
102
|
t = _useLocale.format,
|
|
101
103
|
locale = _useLocale.locale;
|
|
@@ -129,6 +131,7 @@ var AcConfig = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
129
131
|
var _ref7 = (initialValues === null || initialValues === void 0 ? void 0 : initialValues.rank) || {},
|
|
130
132
|
rankListShowRealName = _ref7.rankListShowRealName,
|
|
131
133
|
rankShowUserLabel = _ref7.rankShowUserLabel;
|
|
134
|
+
/* eslint-disable indent */
|
|
132
135
|
var formInitialValues = {
|
|
133
136
|
contestTime: contestType === 'contest' ? [initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$contes = initialValues.contest) === null || _initialValues$contes === void 0 ? void 0 : _initialValues$contes.startTime, initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$contes2 = initialValues.contest) === null || _initialValues$contes2 === void 0 ? void 0 : _initialValues$contes2.endTime].filter(function (i) {
|
|
134
137
|
return i !== undefined;
|
|
@@ -189,6 +192,7 @@ var AcConfig = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
189
192
|
}), type === 'advanced' ? /*#__PURE__*/React.createElement(Space, {
|
|
190
193
|
direction: "horizontal",
|
|
191
194
|
size: 5,
|
|
195
|
+
align: "start",
|
|
192
196
|
className: classNames("".concat(prefix, "-ac-config-space")),
|
|
193
197
|
split: /*#__PURE__*/React.createElement(Divider, {
|
|
194
198
|
type: "vertical",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface ContestDurationInputProps {
|
|
4
|
+
value?: [Dayjs | null | undefined | string, Dayjs | null | undefined];
|
|
5
|
+
onChange?: (value: [Dayjs | null | undefined | string, Dayjs | null | undefined]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const isValidDate: (value: string) => boolean;
|
|
8
|
+
declare const ContestDurationInput: ({ value, onChange, }: ContestDurationInputProps) => React.JSX.Element;
|
|
9
|
+
export default ContestDurationInput;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { Flex, Input, Space } from 'antd'; // 假设使用antd组件库
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import ContestTimeInput from "../contest-time-input";
|
|
6
|
+
import { useLocale } from "../locales";
|
|
7
|
+
import { prefix } from "../utils/global";
|
|
8
|
+
export var isValidDate = function isValidDate(value) {
|
|
9
|
+
return /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(value);
|
|
10
|
+
};
|
|
11
|
+
var ContestDurationInput = function ContestDurationInput(_ref) {
|
|
12
|
+
var value = _ref.value,
|
|
13
|
+
onChange = _ref.onChange;
|
|
14
|
+
var _useLocale = useLocale('ContestDurationInput'),
|
|
15
|
+
t = _useLocale.format;
|
|
16
|
+
var _useState = useState(''),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
startTime = _useState2[0],
|
|
19
|
+
setStartTime = _useState2[1];
|
|
20
|
+
var _useState3 = useState(),
|
|
21
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
22
|
+
duration = _useState4[0],
|
|
23
|
+
setDuration = _useState4[1];
|
|
24
|
+
//同步外部的值
|
|
25
|
+
useEffect(function () {
|
|
26
|
+
if (value) {
|
|
27
|
+
//如果是string证明不合法直接设置值
|
|
28
|
+
if (typeof value[0] === 'string') {
|
|
29
|
+
setStartTime(value === null || value === void 0 ? void 0 : value[0]);
|
|
30
|
+
} else {
|
|
31
|
+
var _value$, _value$2, _value$3;
|
|
32
|
+
setStartTime(((_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.format('YYYY-MM-DD HH:mm')) || '');
|
|
33
|
+
setDuration({
|
|
34
|
+
limitHour: value === null || value === void 0 ? void 0 : (_value$2 = value[1]) === null || _value$2 === void 0 ? void 0 : _value$2.diff(value[0], 'hour'),
|
|
35
|
+
limitMinute: ((value === null || value === void 0 ? void 0 : (_value$3 = value[1]) === null || _value$3 === void 0 ? void 0 : _value$3.diff(value[0], 'minute')) || 0) % 60
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, [value]);
|
|
40
|
+
var handleStartTimeChange = function handleStartTimeChange(e) {
|
|
41
|
+
var value = e.target.value;
|
|
42
|
+
setStartTime(value);
|
|
43
|
+
//不合法
|
|
44
|
+
if (!isValidDate(value)) {
|
|
45
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([value, dayjs(value).add((duration === null || duration === void 0 ? void 0 : duration.limitHour) || 0, 'hour').add((duration === null || duration === void 0 ? void 0 : duration.limitMinute) || 0, 'minute')]);
|
|
46
|
+
} else {
|
|
47
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([dayjs(value), dayjs(value).add((duration === null || duration === void 0 ? void 0 : duration.limitHour) || 0, 'hour').add((duration === null || duration === void 0 ? void 0 : duration.limitMinute) || 0, 'minute')]);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
var handleDurationChange = function handleDurationChange(e) {
|
|
51
|
+
var limitHour = e.limitHour,
|
|
52
|
+
limitMinute = e.limitMinute;
|
|
53
|
+
if (!isValidDate(startTime)) {
|
|
54
|
+
setDuration({
|
|
55
|
+
limitHour: limitHour,
|
|
56
|
+
limitMinute: limitMinute
|
|
57
|
+
});
|
|
58
|
+
} else {
|
|
59
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([dayjs(startTime), dayjs(startTime).add(limitHour || 0, 'hour').add(limitMinute || 0, 'minute')]);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
63
|
+
gap: 10,
|
|
64
|
+
vertical: true
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement("div", null, t('Start_Time')), /*#__PURE__*/React.createElement(Flex, {
|
|
66
|
+
vertical: true
|
|
67
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
68
|
+
placeholder: t('Please_Enter_Start_Time'),
|
|
69
|
+
value: startTime,
|
|
70
|
+
onChange: handleStartTimeChange,
|
|
71
|
+
"data-testid": "duration-start-time"
|
|
72
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "".concat(prefix, "-contest-time-tip")
|
|
74
|
+
}, t('Input_Format')), /*#__PURE__*/React.createElement(Space, null, t('Duration'), /*#__PURE__*/React.createElement(ContestTimeInput, {
|
|
75
|
+
value: duration,
|
|
76
|
+
onChange: handleDurationChange
|
|
77
|
+
})));
|
|
78
|
+
};
|
|
79
|
+
export default ContestDurationInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import { InputNumber } from 'antd';
|
|
4
|
-
import React, { useState } from 'react';
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import { useLocale } from "../locales";
|
|
6
6
|
var ContestTimeInput = function ContestTimeInput(_ref) {
|
|
7
7
|
var _innerValue$limitHour, _innerValue$limitMinu;
|
|
@@ -16,6 +16,9 @@ var ContestTimeInput = function ContestTimeInput(_ref) {
|
|
|
16
16
|
setInnerValue = _useState2[1];
|
|
17
17
|
var _useLocale = useLocale('ContestTimeInput'),
|
|
18
18
|
t = _useLocale.format;
|
|
19
|
+
useEffect(function () {
|
|
20
|
+
setInnerValue(value !== null && value !== void 0 ? value : defaultValue);
|
|
21
|
+
}, [value]);
|
|
19
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
20
23
|
style: {
|
|
21
24
|
display: 'inline-flex',
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { default as CodeMirrorWrapper } from './code-mirror-wrapper';
|
|
|
12
12
|
export type { CodeMirrorWrapperProps } from './code-mirror-wrapper';
|
|
13
13
|
export { LangId, Language, Theme } from './code-mirror-wrapper/define';
|
|
14
14
|
export { default as ContactButton } from './contact-button';
|
|
15
|
+
export { default as ContestDurationInput } from './contest-duration-input';
|
|
15
16
|
export { default as ContestTimeInput } from './contest-time-input';
|
|
16
17
|
export type { ContestTimeInputProps } from './contest-time-input';
|
|
17
18
|
export { default as DomObserver } from './dom-observer';
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { default as CodeDetailModal } from "./code-detail-modal";
|
|
|
6
6
|
export { default as CodeMirrorWrapper } from "./code-mirror-wrapper";
|
|
7
7
|
export { LangId, Language, Theme } from "./code-mirror-wrapper/define";
|
|
8
8
|
export { default as ContactButton } from "./contact-button";
|
|
9
|
+
export { default as ContestDurationInput } from "./contest-duration-input";
|
|
9
10
|
export { default as ContestTimeInput } from "./contest-time-input";
|
|
10
11
|
export { default as DomObserver } from "./dom-observer";
|
|
11
12
|
export { default as DraggableLayout } from "./draggable-layout";
|
package/dist/locales/en_US.d.ts
CHANGED
|
@@ -150,6 +150,9 @@ declare const _default: {
|
|
|
150
150
|
readonly ResourceRestriction: "Resource Restriction";
|
|
151
151
|
readonly ResourceRestrictionDesc: "Access to other course materials, Learning spaces, Premium Problem Bank, and forums is restricted.";
|
|
152
152
|
readonly Config_Affects_Submission_Visibility: "This configuration also affects the submission visibility of problems related to the learning space";
|
|
153
|
+
readonly Time_Setting_Mode_Conversion: "Time Setting Mode Conversion";
|
|
154
|
+
readonly Please_Enter_Correct_Time_Format: "Please Enter Correct Time Format";
|
|
155
|
+
readonly Duration_Cannot_Be_Set_To_Zero: "Duration Cannot Be Set To Zero";
|
|
153
156
|
};
|
|
154
157
|
readonly ScoreReport: {
|
|
155
158
|
readonly In_Game_Total_Score: "Timed Score";
|
|
@@ -181,5 +184,11 @@ declare const _default: {
|
|
|
181
184
|
readonly placeholder: "Please enter the zip code";
|
|
182
185
|
readonly area: "Area";
|
|
183
186
|
};
|
|
187
|
+
readonly ContestDurationInput: {
|
|
188
|
+
readonly Start_Time: "Start Time:";
|
|
189
|
+
readonly Please_Enter_Start_Time: "Please Enter Start Time";
|
|
190
|
+
readonly Input_Format: "Input Format: 2025-03-12 12:00";
|
|
191
|
+
readonly Duration: "Duration:";
|
|
192
|
+
};
|
|
184
193
|
};
|
|
185
194
|
export default _default;
|
package/dist/locales/en_US.js
CHANGED
|
@@ -149,7 +149,10 @@ export default {
|
|
|
149
149
|
RestrictionsDuringHomeworkExam: 'Restrictions During Homework/Exam',
|
|
150
150
|
ResourceRestriction: 'Resource Restriction',
|
|
151
151
|
ResourceRestrictionDesc: 'Access to other course materials, Learning spaces, Premium Problem Bank, and forums is restricted.',
|
|
152
|
-
Config_Affects_Submission_Visibility: 'This configuration also affects the submission visibility of problems related to the learning space'
|
|
152
|
+
Config_Affects_Submission_Visibility: 'This configuration also affects the submission visibility of problems related to the learning space',
|
|
153
|
+
Time_Setting_Mode_Conversion: 'Time Setting Mode Conversion',
|
|
154
|
+
Please_Enter_Correct_Time_Format: 'Please Enter Correct Time Format',
|
|
155
|
+
Duration_Cannot_Be_Set_To_Zero: 'Duration Cannot Be Set To Zero'
|
|
153
156
|
},
|
|
154
157
|
ScoreReport: {
|
|
155
158
|
In_Game_Total_Score: 'Timed Score',
|
|
@@ -180,5 +183,11 @@ export default {
|
|
|
180
183
|
ZipCodeSearchInput: {
|
|
181
184
|
placeholder: 'Please enter the zip code',
|
|
182
185
|
area: 'Area'
|
|
186
|
+
},
|
|
187
|
+
ContestDurationInput: {
|
|
188
|
+
Start_Time: 'Start Time:',
|
|
189
|
+
Please_Enter_Start_Time: 'Please Enter Start Time',
|
|
190
|
+
Input_Format: 'Input Format: 2025-03-12 12:00',
|
|
191
|
+
Duration: 'Duration:'
|
|
183
192
|
}
|
|
184
193
|
};
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface LocaleProviderProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const LocaleProvider: ({ children, locale, }: LocaleProviderProps) => React.JSX.Element;
|
|
9
9
|
type MessageMap = typeof zh_CN | typeof en_US;
|
|
10
|
-
export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton" | "CodeDetailModal" | "ContactButton" | "ErrorPage" | "Feedback" | "MicroApp" | "ContestTimeInput" | "AcConfig" | "ScoreReport" | "SchoolInput" | "ZipCodeSearchInput">(slice: T) => {
|
|
10
|
+
export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton" | "CodeDetailModal" | "ContactButton" | "ErrorPage" | "Feedback" | "MicroApp" | "ContestTimeInput" | "AcConfig" | "ScoreReport" | "SchoolInput" | "ZipCodeSearchInput" | "ContestDurationInput">(slice: T) => {
|
|
11
11
|
locale: string;
|
|
12
12
|
format: <U extends keyof MessageMap[T]>(key: U) => ({
|
|
13
13
|
readonly VisualDataConfig: {
|
|
@@ -161,6 +161,9 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
161
161
|
readonly ResourceRestriction: "限制资源访问";
|
|
162
162
|
readonly ResourceRestrictionDesc: "限制访问其他课件、学习空间、精品题库、论坛";
|
|
163
163
|
readonly Config_Affects_Submission_Visibility: "该配置同时影响学生学习空间相关题目的提交可见性";
|
|
164
|
+
readonly Time_Setting_Mode_Conversion: "时间设置模式转化";
|
|
165
|
+
readonly Please_Enter_Correct_Time_Format: "请输入正确的时间格式";
|
|
166
|
+
readonly Duration_Cannot_Be_Set_To_Zero: "持续时间不能设置为0";
|
|
164
167
|
};
|
|
165
168
|
readonly ScoreReport: {
|
|
166
169
|
readonly In_Game_Total_Score: "赛中总分";
|
|
@@ -192,6 +195,12 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
192
195
|
readonly placeholder: "请输入邮政编码";
|
|
193
196
|
readonly area: "所选地区";
|
|
194
197
|
};
|
|
198
|
+
readonly ContestDurationInput: {
|
|
199
|
+
readonly Start_Time: "开始时间:";
|
|
200
|
+
readonly Please_Enter_Start_Time: "请输入开始时间";
|
|
201
|
+
readonly Input_Format: "输入格式:2025-03-12 12:00";
|
|
202
|
+
readonly Duration: "持续时间:";
|
|
203
|
+
};
|
|
195
204
|
} | {
|
|
196
205
|
readonly VisualDataConfig: {
|
|
197
206
|
readonly Time_MS: "Time Limit(MS)";
|
|
@@ -344,6 +353,9 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
344
353
|
readonly ResourceRestriction: "Resource Restriction";
|
|
345
354
|
readonly ResourceRestrictionDesc: "Access to other course materials, Learning spaces, Premium Problem Bank, and forums is restricted.";
|
|
346
355
|
readonly Config_Affects_Submission_Visibility: "This configuration also affects the submission visibility of problems related to the learning space";
|
|
356
|
+
readonly Time_Setting_Mode_Conversion: "Time Setting Mode Conversion";
|
|
357
|
+
readonly Please_Enter_Correct_Time_Format: "Please Enter Correct Time Format";
|
|
358
|
+
readonly Duration_Cannot_Be_Set_To_Zero: "Duration Cannot Be Set To Zero";
|
|
347
359
|
};
|
|
348
360
|
readonly ScoreReport: {
|
|
349
361
|
readonly In_Game_Total_Score: "Timed Score";
|
|
@@ -375,6 +387,12 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
375
387
|
readonly placeholder: "Please enter the zip code";
|
|
376
388
|
readonly area: "Area";
|
|
377
389
|
};
|
|
390
|
+
readonly ContestDurationInput: {
|
|
391
|
+
readonly Start_Time: "Start Time:";
|
|
392
|
+
readonly Please_Enter_Start_Time: "Please Enter Start Time";
|
|
393
|
+
readonly Input_Format: "Input Format: 2025-03-12 12:00";
|
|
394
|
+
readonly Duration: "Duration:";
|
|
395
|
+
};
|
|
378
396
|
})[T][U];
|
|
379
397
|
};
|
|
380
398
|
export {};
|
package/dist/locales/zh_CN.d.ts
CHANGED
|
@@ -150,6 +150,9 @@ declare const _default: {
|
|
|
150
150
|
readonly ResourceRestriction: "限制资源访问";
|
|
151
151
|
readonly ResourceRestrictionDesc: "限制访问其他课件、学习空间、精品题库、论坛";
|
|
152
152
|
readonly Config_Affects_Submission_Visibility: "该配置同时影响学生学习空间相关题目的提交可见性";
|
|
153
|
+
readonly Time_Setting_Mode_Conversion: "时间设置模式转化";
|
|
154
|
+
readonly Please_Enter_Correct_Time_Format: "请输入正确的时间格式";
|
|
155
|
+
readonly Duration_Cannot_Be_Set_To_Zero: "持续时间不能设置为0";
|
|
153
156
|
};
|
|
154
157
|
readonly ScoreReport: {
|
|
155
158
|
readonly In_Game_Total_Score: "赛中总分";
|
|
@@ -181,5 +184,11 @@ declare const _default: {
|
|
|
181
184
|
readonly placeholder: "请输入邮政编码";
|
|
182
185
|
readonly area: "所选地区";
|
|
183
186
|
};
|
|
187
|
+
readonly ContestDurationInput: {
|
|
188
|
+
readonly Start_Time: "开始时间:";
|
|
189
|
+
readonly Please_Enter_Start_Time: "请输入开始时间";
|
|
190
|
+
readonly Input_Format: "输入格式:2025-03-12 12:00";
|
|
191
|
+
readonly Duration: "持续时间:";
|
|
192
|
+
};
|
|
184
193
|
};
|
|
185
194
|
export default _default;
|
package/dist/locales/zh_CN.js
CHANGED
|
@@ -149,7 +149,10 @@ export default {
|
|
|
149
149
|
RestrictionsDuringHomeworkExam: '作业/考试结束前限制',
|
|
150
150
|
ResourceRestriction: '限制资源访问',
|
|
151
151
|
ResourceRestrictionDesc: '限制访问其他课件、学习空间、精品题库、论坛',
|
|
152
|
-
Config_Affects_Submission_Visibility: '该配置同时影响学生学习空间相关题目的提交可见性'
|
|
152
|
+
Config_Affects_Submission_Visibility: '该配置同时影响学生学习空间相关题目的提交可见性',
|
|
153
|
+
Time_Setting_Mode_Conversion: '时间设置模式转化',
|
|
154
|
+
Please_Enter_Correct_Time_Format: '请输入正确的时间格式',
|
|
155
|
+
Duration_Cannot_Be_Set_To_Zero: '持续时间不能设置为0'
|
|
153
156
|
},
|
|
154
157
|
ScoreReport: {
|
|
155
158
|
In_Game_Total_Score: '赛中总分',
|
|
@@ -180,5 +183,11 @@ export default {
|
|
|
180
183
|
ZipCodeSearchInput: {
|
|
181
184
|
placeholder: '请输入邮政编码',
|
|
182
185
|
area: '所选地区'
|
|
186
|
+
},
|
|
187
|
+
ContestDurationInput: {
|
|
188
|
+
Start_Time: '开始时间:',
|
|
189
|
+
Please_Enter_Start_Time: '请输入开始时间',
|
|
190
|
+
Input_Format: '输入格式:2025-03-12 12:00',
|
|
191
|
+
Duration: '持续时间:'
|
|
183
192
|
}
|
|
184
193
|
};
|
package/dist/styles/index.css
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
+
.x-star-design-ac-config-space {
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
2
5
|
.x-star-design-ac-config-space > :last-child {
|
|
3
6
|
align-self: flex-start;
|
|
4
7
|
}
|
|
8
|
+
.x-star-design-ac-config-space .x-star-design-space-item-split {
|
|
9
|
+
align-self: center;
|
|
10
|
+
}
|
|
5
11
|
|
|
6
12
|
.x-star-design-ac-config-form {
|
|
7
13
|
padding-right: 12px;
|
|
8
14
|
}
|
|
9
15
|
|
|
16
|
+
.x-star-design-contest-time-swap {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
10
21
|
.x-star-design-anchor-x-tabs-container {
|
|
11
22
|
display: flex;
|
|
12
23
|
gap: 30px;
|
|
@@ -763,3 +774,9 @@
|
|
|
763
774
|
max-width: 110rem;
|
|
764
775
|
}
|
|
765
776
|
}
|
|
777
|
+
|
|
778
|
+
.x-star-design-contest-time-tip {
|
|
779
|
+
cursor: pointer;
|
|
780
|
+
font-size: 14px;
|
|
781
|
+
color: rgba(0, 0, 0, 0.4509803922);
|
|
782
|
+
}
|