@elice/material-runbox 1.250306.0-runboxtutoring.2 → 1.250310.0

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.
@@ -1,15 +1,4 @@
1
1
  import React from 'react';
2
- import type { TagProps } from '@elice/mui-elements';
3
- export type GetAchievementColor = {
4
- (params: {
5
- score: number;
6
- variant: 'text' | 'chart';
7
- }): string | null;
8
- (params: {
9
- score: number;
10
- variant: 'tag';
11
- }): TagProps['color'];
12
- };
13
2
  export interface MaterialRunboxContentProps {
14
3
  /** Runbox ID. */
15
4
  runboxId: string | null;
@@ -21,8 +10,6 @@ export interface MaterialRunboxContentProps {
21
10
  userId: number;
22
11
  /** Whether tutoring is enabled. */
23
12
  isTutoring: boolean;
24
- /** Used for submit log score tag color. */
25
- getAchievementColor?: GetAchievementColor;
26
13
  }
27
14
  declare const MaterialRunboxContent: React.FC<MaterialRunboxContentProps>;
28
15
  export default MaterialRunboxContent;
@@ -35,8 +35,7 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
35
35
  enabledLxpPlan = _ref.enabledLxpPlan,
36
36
  userId = _ref.userId,
37
37
  _ref$isTutoring = _ref.isTutoring,
38
- isTutoring = _ref$isTutoring === void 0 ? false : _ref$isTutoring,
39
- getAchievementColor = _ref.getAchievementColor;
38
+ isTutoring = _ref$isTutoring === void 0 ? false : _ref$isTutoring;
40
39
  var intl$1 = intl.useRawEliceIntl();
41
40
  var _useMaterialRunboxCon = MaterialRunboxContext.useMaterialRunboxContext(),
42
41
  showMessenger = _useMaterialRunboxCon.showMessenger;
@@ -171,8 +170,7 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
171
170
  courseId: courseId,
172
171
  userId: userId,
173
172
  isTutoring: isTutoring,
174
- refetch: refetch,
175
- getAchievementColor: getAchievementColor
173
+ refetch: refetch
176
174
  };
177
175
  return jsxRuntime.jsx(MaterialRunboxCommandContext.default, {
178
176
  runtime: runtime,
@@ -45,8 +45,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
45
45
  courseId = _ref3.courseId,
46
46
  userId = _ref3.userId,
47
47
  isTutoring = _ref3.isTutoring,
48
- refetch = _ref3.refetch,
49
- getAchievementColor = _ref3.getAchievementColor;
48
+ refetch = _ref3.refetch;
50
49
  var intl$1 = intl.useRawEliceIntl();
51
50
  var _useMaterialRunboxCon = MaterialRunboxContext.useMaterialRunboxContext(),
52
51
  enableAutoShutdownToggle = _useMaterialRunboxCon.enableAutoShutdownToggle;
@@ -128,7 +127,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
128
127
  *
129
128
  */
130
129
  var renderHeaderActionGrade = function renderHeaderActionGrade() {
131
- if (!runbox.submission.enabled || isTutoring) {
130
+ if (!runbox.submission.enabled) {
132
131
  return null;
133
132
  }
134
133
  return jsxRuntime.jsx(MaterialRunboxActionGrade.default, {
@@ -161,8 +160,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
161
160
  isTutoring: isTutoring,
162
161
  menuAnchorEl: menuAnchorEl,
163
162
  refetch: refetch,
164
- handleMenuClose: handleMenuClose,
165
- getAchievementColor: getAchievementColor
163
+ handleMenuClose: handleMenuClose
166
164
  })]
167
165
  });
168
166
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RuntimeProps } from '../runtime/Runtime';
3
- type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch' | 'userId' | 'isTutoring' | 'getAchievementColor'> & {
3
+ type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch' | 'userId' | 'isTutoring'> & {
4
4
  menuAnchorEl: null | HTMLButtonElement;
5
5
  handleMenuClose: () => void;
6
6
  };
@@ -26,7 +26,6 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
26
26
  isTutoring = _ref.isTutoring,
27
27
  menuAnchorEl = _ref.menuAnchorEl,
28
28
  refetch = _ref.refetch,
29
- getAchievementColor = _ref.getAchievementColor,
30
29
  handleMenuClose = _ref.handleMenuClose;
31
30
  var _useEliceRunboxRunnin = runboxClient.useEliceRunboxRunning(),
32
31
  status = _useEliceRunboxRunnin.status;
@@ -67,7 +66,6 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
67
66
  runboxId: runbox === null || runbox === void 0 ? void 0 : runbox.id,
68
67
  userId: userId,
69
68
  eliceCourseId: courseId,
70
- getAchievementColor: getAchievementColor,
71
69
  handleMenuClose: handleMenuClose
72
70
  }) : jsxRuntime.jsx(MaterialRunboxActionReset.default, {
73
71
  runtime: runtime,
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { RunboxRunboxIdGradeGetRequest } from '@elice/openapi-client-material-runbox';
3
- import type { GetAchievementColor } from '../MaterialRunboxContent';
4
3
  export type MaterialRunboxActionSubmitLogProps = Omit<RunboxRunboxIdGradeGetRequest, 'skip' | 'count'> & {
5
4
  handleMenuClose: () => void;
6
- getAchievementColor?: GetAchievementColor;
7
5
  };
8
6
  declare const MaterialRunboxActionSubmitLog: React.FC<MaterialRunboxActionSubmitLogProps>;
9
7
  export default MaterialRunboxActionSubmitLog;
@@ -29,8 +29,7 @@ var dayjs__default = /*#__PURE__*/_interopDefaultCompat(dayjs);
29
29
  var MaterialRunboxActionSubmitLogDialog = function MaterialRunboxActionSubmitLogDialog(_a) {
30
30
  var isOpen = _a.isOpen,
31
31
  onClose = _a.onClose,
32
- getAchievementColor = _a.getAchievementColor,
33
- props = tslib.__rest(_a, ["isOpen", "onClose", "getAchievementColor"]);
32
+ props = tslib.__rest(_a, ["isOpen", "onClose"]);
34
33
  var intl$1 = intl.useRawEliceIntl();
35
34
  //
36
35
  var _useMaterialRunboxCon = MaterialRunboxContext.useMaterialRunboxContext(),
@@ -94,10 +93,7 @@ var MaterialRunboxActionSubmitLogDialog = function MaterialRunboxActionSubmitLog
94
93
  gap: "0.5rem",
95
94
  children: [(item === null || item === void 0 ? void 0 : item.score) ? jsxRuntime.jsx(muiElements.Tag, {
96
95
  variant: "muted",
97
- color: typeof getAchievementColor === 'function' ? getAchievementColor({
98
- score: Number(item.score),
99
- variant: 'tag'
100
- }) : 'info',
96
+ color: "info",
101
97
  label: intl$1.formatMessage({
102
98
  id: 'runbox.common.score'
103
99
  }, {
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RunboxGetAndListResponse, RuntimeGetAndListResponse, RuntimeTemplateGetAndListResponse } from '@elice/openapi-client-material-runbox';
3
3
  import type { QueryObserverResult } from '@tanstack/react-query';
4
- import type { GetAchievementColor } from '../MaterialRunboxContent';
5
4
  export interface RuntimeProps {
6
5
  /** */
7
6
  runbox: RunboxGetAndListResponse;
@@ -21,8 +20,6 @@ export interface RuntimeProps {
21
20
  RuntimeGetAndListResponse,
22
21
  RuntimeTemplateGetAndListResponse
23
22
  ], unknown>>;
24
- /** */
25
- getAchievementColor?: GetAchievementColor;
26
23
  }
27
24
  declare const Runtime: React.FC<RuntimeProps>;
28
25
  export default Runtime;
@@ -1,15 +1,4 @@
1
1
  import React from 'react';
2
- import type { TagProps } from '@elice/mui-elements';
3
- export type GetAchievementColor = {
4
- (params: {
5
- score: number;
6
- variant: 'text' | 'chart';
7
- }): string | null;
8
- (params: {
9
- score: number;
10
- variant: 'tag';
11
- }): TagProps['color'];
12
- };
13
2
  export interface MaterialRunboxContentProps {
14
3
  /** Runbox ID. */
15
4
  runboxId: string | null;
@@ -21,8 +10,6 @@ export interface MaterialRunboxContentProps {
21
10
  userId: number;
22
11
  /** Whether tutoring is enabled. */
23
12
  isTutoring: boolean;
24
- /** Used for submit log score tag color. */
25
- getAchievementColor?: GetAchievementColor;
26
13
  }
27
14
  declare const MaterialRunboxContent: React.FC<MaterialRunboxContentProps>;
28
15
  export default MaterialRunboxContent;
@@ -31,8 +31,7 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
31
31
  enabledLxpPlan = _ref.enabledLxpPlan,
32
32
  userId = _ref.userId,
33
33
  _ref$isTutoring = _ref.isTutoring,
34
- isTutoring = _ref$isTutoring === void 0 ? false : _ref$isTutoring,
35
- getAchievementColor = _ref.getAchievementColor;
34
+ isTutoring = _ref$isTutoring === void 0 ? false : _ref$isTutoring;
36
35
  var intl = useRawEliceIntl();
37
36
  var _useMaterialRunboxCon = useMaterialRunboxContext(),
38
37
  showMessenger = _useMaterialRunboxCon.showMessenger;
@@ -167,8 +166,7 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
167
166
  courseId: courseId,
168
167
  userId: userId,
169
168
  isTutoring: isTutoring,
170
- refetch: refetch,
171
- getAchievementColor: getAchievementColor
169
+ refetch: refetch
172
170
  };
173
171
  return jsx(MaterialRunboxCommandContextProvider, {
174
172
  runtime: runtime,
@@ -36,8 +36,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
36
36
  courseId = _ref3.courseId,
37
37
  userId = _ref3.userId,
38
38
  isTutoring = _ref3.isTutoring,
39
- refetch = _ref3.refetch,
40
- getAchievementColor = _ref3.getAchievementColor;
39
+ refetch = _ref3.refetch;
41
40
  var intl = useRawEliceIntl();
42
41
  var _useMaterialRunboxCon = useMaterialRunboxContext(),
43
42
  enableAutoShutdownToggle = _useMaterialRunboxCon.enableAutoShutdownToggle;
@@ -119,7 +118,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
119
118
  *
120
119
  */
121
120
  var renderHeaderActionGrade = function renderHeaderActionGrade() {
122
- if (!runbox.submission.enabled || isTutoring) {
121
+ if (!runbox.submission.enabled) {
123
122
  return null;
124
123
  }
125
124
  return jsx(MaterialRunboxActionGrade, {
@@ -152,8 +151,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
152
151
  isTutoring: isTutoring,
153
152
  menuAnchorEl: menuAnchorEl,
154
153
  refetch: refetch,
155
- handleMenuClose: handleMenuClose,
156
- getAchievementColor: getAchievementColor
154
+ handleMenuClose: handleMenuClose
157
155
  })]
158
156
  });
159
157
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RuntimeProps } from '../runtime/Runtime';
3
- type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch' | 'userId' | 'isTutoring' | 'getAchievementColor'> & {
3
+ type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch' | 'userId' | 'isTutoring'> & {
4
4
  menuAnchorEl: null | HTMLButtonElement;
5
5
  handleMenuClose: () => void;
6
6
  };
@@ -18,7 +18,6 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
18
18
  isTutoring = _ref.isTutoring,
19
19
  menuAnchorEl = _ref.menuAnchorEl,
20
20
  refetch = _ref.refetch,
21
- getAchievementColor = _ref.getAchievementColor,
22
21
  handleMenuClose = _ref.handleMenuClose;
23
22
  var _useEliceRunboxRunnin = useEliceRunboxRunning(),
24
23
  status = _useEliceRunboxRunnin.status;
@@ -59,7 +58,6 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
59
58
  runboxId: runbox === null || runbox === void 0 ? void 0 : runbox.id,
60
59
  userId: userId,
61
60
  eliceCourseId: courseId,
62
- getAchievementColor: getAchievementColor,
63
61
  handleMenuClose: handleMenuClose
64
62
  }) : jsx(MaterialRunboxActionReset, {
65
63
  runtime: runtime,
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { RunboxRunboxIdGradeGetRequest } from '@elice/openapi-client-material-runbox';
3
- import type { GetAchievementColor } from '../MaterialRunboxContent';
4
3
  export type MaterialRunboxActionSubmitLogProps = Omit<RunboxRunboxIdGradeGetRequest, 'skip' | 'count'> & {
5
4
  handleMenuClose: () => void;
6
- getAchievementColor?: GetAchievementColor;
7
5
  };
8
6
  declare const MaterialRunboxActionSubmitLog: React.FC<MaterialRunboxActionSubmitLogProps>;
9
7
  export default MaterialRunboxActionSubmitLog;
@@ -20,8 +20,7 @@ import { useInfiniteRunboxRunboxIdGrade } from '../hooks/useInfiniteRunboxRunbox
20
20
  var MaterialRunboxActionSubmitLogDialog = function MaterialRunboxActionSubmitLogDialog(_a) {
21
21
  var isOpen = _a.isOpen,
22
22
  onClose = _a.onClose,
23
- getAchievementColor = _a.getAchievementColor,
24
- props = __rest(_a, ["isOpen", "onClose", "getAchievementColor"]);
23
+ props = __rest(_a, ["isOpen", "onClose"]);
25
24
  var intl = useRawEliceIntl();
26
25
  //
27
26
  var _useMaterialRunboxCon = useMaterialRunboxContext(),
@@ -85,10 +84,7 @@ var MaterialRunboxActionSubmitLogDialog = function MaterialRunboxActionSubmitLog
85
84
  gap: "0.5rem",
86
85
  children: [(item === null || item === void 0 ? void 0 : item.score) ? jsx(Tag, {
87
86
  variant: "muted",
88
- color: typeof getAchievementColor === 'function' ? getAchievementColor({
89
- score: Number(item.score),
90
- variant: 'tag'
91
- }) : 'info',
87
+ color: "info",
92
88
  label: intl.formatMessage({
93
89
  id: 'runbox.common.score'
94
90
  }, {
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RunboxGetAndListResponse, RuntimeGetAndListResponse, RuntimeTemplateGetAndListResponse } from '@elice/openapi-client-material-runbox';
3
3
  import type { QueryObserverResult } from '@tanstack/react-query';
4
- import type { GetAchievementColor } from '../MaterialRunboxContent';
5
4
  export interface RuntimeProps {
6
5
  /** */
7
6
  runbox: RunboxGetAndListResponse;
@@ -21,8 +20,6 @@ export interface RuntimeProps {
21
20
  RuntimeGetAndListResponse,
22
21
  RuntimeTemplateGetAndListResponse
23
22
  ], unknown>>;
24
- /** */
25
- getAchievementColor?: GetAchievementColor;
26
23
  }
27
24
  declare const Runtime: React.FC<RuntimeProps>;
28
25
  export default Runtime;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-runbox",
3
- "version": "1.250306.0-runboxtutoring.2",
3
+ "version": "1.250310.0",
4
4
  "description": "User view and editing components of Elice material runbox",
5
5
  "repository": "https://git.elicer.io/elice/frontend/library/elice-material",
6
6
  "license": "UNLICENSED",
@@ -51,8 +51,8 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@elice/intl": "0.241127.0",
54
- "@elice/material-shared-types": "1.250306.0-runboxtutoring.2",
55
- "@elice/material-shared-utils": "1.250306.0-runboxtutoring.2",
54
+ "@elice/material-shared-types": "1.250310.0",
55
+ "@elice/material-shared-utils": "1.250310.0",
56
56
  "@elice/mui-elements": "^5.250108.0-controllabel.0",
57
57
  "@elice/mui-system": "^5.250108.0-controllabel.0",
58
58
  "@elice/mui-x-snackbar": "^5.250108.0-controllabel.0",