@elice/material-assignment 1.240718.0-trasncript.2 → 1.240718.1
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/cjs/components/material-assignment/MaterialAssignment.js +17 -23
- package/cjs/components/material-assignment/MaterialAssignmentContent.js +194 -281
- package/cjs/components/material-assignment/MaterialAssignmentUploadModal.js +138 -181
- package/cjs/components/material-assignment/constants/color.js +1 -1
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.js +24 -32
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +9 -19
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContent.js +548 -774
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +303 -436
- package/cjs/components/shared/MaterialAssignmentContainer.js +13 -23
- package/es/components/material-assignment/MaterialAssignment.js +17 -18
- package/es/components/material-assignment/MaterialAssignmentContent.js +194 -276
- package/es/components/material-assignment/MaterialAssignmentUploadModal.js +139 -177
- package/es/components/material-assignment/constants/color.js +1 -1
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.js +25 -29
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.styled.js +9 -15
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContent.js +549 -770
- package/es/components/material-assignment-admin/MaterialAssignmentAdminContentTa.js +304 -432
- package/es/components/shared/MaterialAssignmentContainer.js +13 -19
- package/package.json +12 -9
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -383
- package/cjs/components/index.js +0 -9
- package/cjs/components/material-assignment/index.js +0 -7
- package/cjs/components/material-assignment/locales/index.js +0 -13
- package/cjs/components/material-assignment-admin/index.js +0 -7
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -374
- package/es/components/index.js +0 -2
- package/es/components/material-assignment/index.js +0 -1
- package/es/components/material-assignment/locales/index.js +0 -4
- package/es/components/material-assignment-admin/index.js +0 -1
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
5
|
var React = require('react');
|
|
8
6
|
var reactHookForm = require('react-hook-form');
|
|
9
7
|
var apiClient = require('@elice/api-client');
|
|
@@ -13,101 +11,71 @@ var intl = require('@elice/intl');
|
|
|
13
11
|
var utils = require('@elice/utils');
|
|
14
12
|
var styled = require('styled-components');
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
20
|
-
|
|
21
|
-
var StyledAssignmentContentFiles = styled__default.default(blocks.Files).withConfig({
|
|
14
|
+
const StyledAssignmentContentFiles = styled(blocks.Files).withConfig({
|
|
22
15
|
componentId: "sc-9bizrf-0"
|
|
23
16
|
})(["width:100%;.eb-files__choose-button{border-color:", ";background-color:", ";}"], designTokens.base.color.primary5, designTokens.base.color.primary5);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
const MaterialAssignmentUploadModal = ({
|
|
18
|
+
materialAssignment,
|
|
19
|
+
onClose,
|
|
20
|
+
onSubmitCallback
|
|
21
|
+
}) => {
|
|
22
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
23
|
+
const abortCtrl = React.useRef(new AbortController());
|
|
30
24
|
/** Select submission method */
|
|
31
|
-
|
|
32
|
-
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
33
|
-
assignmentMode = _React$useState2[0],
|
|
34
|
-
setAssignmentMode = _React$useState2[1];
|
|
25
|
+
const [assignmentMode, setAssignmentMode] = React.useState('attachment');
|
|
35
26
|
/** Check "Once you submit it, you cannot submit it again." */
|
|
36
|
-
|
|
37
|
-
_React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
|
|
38
|
-
isAgreedSubmit = _React$useState4[0],
|
|
39
|
-
setAgreedSubmit = _React$useState4[1];
|
|
27
|
+
const [isAgreedSubmit, setAgreedSubmit] = React.useState(false);
|
|
40
28
|
/** Check if the submission time is past */
|
|
41
|
-
|
|
29
|
+
const isAssignmentClosed = Boolean(materialAssignment.closeDatetime < Date.now());
|
|
42
30
|
/** Check if it is possible to resubmit */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
31
|
+
const isAssignmentResubmitEnabled = Boolean(materialAssignment.isResubmitEnabled);
|
|
32
|
+
const {
|
|
33
|
+
control,
|
|
34
|
+
formState,
|
|
35
|
+
handleSubmit,
|
|
36
|
+
reset
|
|
37
|
+
} = reactHookForm.useForm({
|
|
38
|
+
mode: 'onChange'
|
|
39
|
+
});
|
|
51
40
|
/**
|
|
52
41
|
* Submit assignment.
|
|
53
42
|
*/
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (!(_context.t0.name === 'AbortError')) {
|
|
81
|
-
_context.next = 12;
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
return _context.abrupt("return", blocks.Notification.error(intl$1.formatMessage({
|
|
85
|
-
id: 'materialAssignment.notification.submit.cancel'
|
|
86
|
-
})));
|
|
87
|
-
case 12:
|
|
88
|
-
blocks.Notification.error(intl$1.formatMessage({
|
|
89
|
-
id: 'materialAssignment.notification.submit.failure'
|
|
90
|
-
}));
|
|
91
|
-
case 13:
|
|
92
|
-
case "end":
|
|
93
|
-
return _context.stop();
|
|
94
|
-
}
|
|
95
|
-
}, _callee, null, [[0, 8]]);
|
|
96
|
-
}));
|
|
97
|
-
return function (_x) {
|
|
98
|
-
return _ref2.apply(this, arguments);
|
|
99
|
-
};
|
|
100
|
-
}());
|
|
43
|
+
const submitAssignment = handleSubmit(async data => {
|
|
44
|
+
var _a;
|
|
45
|
+
try {
|
|
46
|
+
await apiClient.postOrgMaterialAssignmentSubmissionAdd(Object.assign(Object.assign({}, data), {
|
|
47
|
+
materialAssignmentId: (_a = materialAssignment === null || materialAssignment === void 0 ? void 0 : materialAssignment.id) !== null && _a !== void 0 ? _a : 0
|
|
48
|
+
}), {
|
|
49
|
+
signal: abortCtrl.current.signal
|
|
50
|
+
});
|
|
51
|
+
onClose();
|
|
52
|
+
blocks.Notification.success(intl$1.formatMessage({
|
|
53
|
+
id: 'materialAssignment.notification.submit.success'
|
|
54
|
+
}));
|
|
55
|
+
if (typeof onSubmitCallback === 'function') {
|
|
56
|
+
onSubmitCallback();
|
|
57
|
+
}
|
|
58
|
+
} catch (error) {
|
|
59
|
+
if (error.name === 'AbortError') {
|
|
60
|
+
return blocks.Notification.error(intl$1.formatMessage({
|
|
61
|
+
id: 'materialAssignment.notification.submit.cancel'
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
blocks.Notification.error(intl$1.formatMessage({
|
|
65
|
+
id: 'materialAssignment.notification.submit.failure'
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
101
69
|
//
|
|
102
70
|
//
|
|
103
71
|
//
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return
|
|
72
|
+
React.useEffect(() => {
|
|
73
|
+
const _abortCtrl = abortCtrl.current;
|
|
74
|
+
return () => {
|
|
107
75
|
_abortCtrl.abort();
|
|
108
76
|
};
|
|
109
77
|
}, []);
|
|
110
|
-
return
|
|
78
|
+
return React.createElement(blocks.Modal, {
|
|
111
79
|
title: intl$1.formatMessage({
|
|
112
80
|
id: 'materialAssignment.modal.title'
|
|
113
81
|
}),
|
|
@@ -125,108 +93,97 @@ var MaterialAssignmentUploadModal = function MaterialAssignmentUploadModal(_ref)
|
|
|
125
93
|
role: 'gray1',
|
|
126
94
|
onClick: onClose
|
|
127
95
|
}],
|
|
128
|
-
onHide: onClose
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
onChange
|
|
183
|
-
if (Array.isArray(newFiles) && newFiles[0] instanceof File) {
|
|
184
|
-
field.onChange(newFiles[0]);
|
|
185
|
-
} else {
|
|
186
|
-
field.onChange(undefined);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}));
|
|
190
|
-
}
|
|
191
|
-
}) : jsxRuntime.jsx(reactHookForm.Controller, {
|
|
192
|
-
control: control,
|
|
193
|
-
name: "assignmentUrl",
|
|
194
|
-
rules: {
|
|
195
|
-
required: true,
|
|
196
|
-
validate: function validate(url) {
|
|
197
|
-
return utils.validateUrl(url !== null && url !== void 0 ? url : '') ? true : intl$1.formatMessage({
|
|
198
|
-
id: 'materialAssignment.input.invalid'
|
|
199
|
-
});
|
|
96
|
+
onHide: onClose
|
|
97
|
+
}, React.createElement(blocks.Alert, {
|
|
98
|
+
role: isAssignmentResubmitEnabled ? 'primary' : 'warning'
|
|
99
|
+
}, intl$1.formatMessage({
|
|
100
|
+
id: isAssignmentResubmitEnabled ? 'materialAssignment.alert.oftenSubmit' : 'materialAssignment.alert.onceSubmit'
|
|
101
|
+
})), React.createElement(blocks.Vspace, {
|
|
102
|
+
height: 1.5
|
|
103
|
+
}), React.createElement(blocks.Radio, {
|
|
104
|
+
purpleWhite: true,
|
|
105
|
+
borderRound: true,
|
|
106
|
+
value: assignmentMode,
|
|
107
|
+
onChange: value => {
|
|
108
|
+
reset();
|
|
109
|
+
setAgreedSubmit(false);
|
|
110
|
+
setAssignmentMode(value);
|
|
111
|
+
}
|
|
112
|
+
}, React.createElement(blocks.RadioButton, {
|
|
113
|
+
value: "attachment"
|
|
114
|
+
}, intl$1.formatMessage({
|
|
115
|
+
id: 'materialAssignment.radio.option.attachment'
|
|
116
|
+
})), React.createElement(blocks.RadioButton, {
|
|
117
|
+
value: "url"
|
|
118
|
+
}, intl$1.formatMessage({
|
|
119
|
+
id: 'materialAssignment.radio.option.url'
|
|
120
|
+
}))), React.createElement(blocks.Vspace, {
|
|
121
|
+
height: 1
|
|
122
|
+
}), assignmentMode === 'attachment' ? React.createElement(reactHookForm.Controller, {
|
|
123
|
+
control: control,
|
|
124
|
+
name: "assignmentFile",
|
|
125
|
+
rules: {
|
|
126
|
+
required: true
|
|
127
|
+
},
|
|
128
|
+
render: ({
|
|
129
|
+
field
|
|
130
|
+
}) => React.createElement(StyledAssignmentContentFiles, Object.assign({}, field, {
|
|
131
|
+
ref: null,
|
|
132
|
+
files: field.value ? [field.value] : undefined,
|
|
133
|
+
accept: "*",
|
|
134
|
+
maxCount: 1,
|
|
135
|
+
maxSize: 300,
|
|
136
|
+
disabled: isAssignmentClosed,
|
|
137
|
+
dropMessage: intl$1.formatMessage({
|
|
138
|
+
id: 'materialAssignment.attachment.dropMessage'
|
|
139
|
+
}),
|
|
140
|
+
buttonMessage: intl$1.formatMessage({
|
|
141
|
+
id: 'materialAssignment.attachment.button'
|
|
142
|
+
}),
|
|
143
|
+
maxSizeMessage: intl$1.formatMessage({
|
|
144
|
+
id: 'materialAssignment.attachment.maxSizeMessage'
|
|
145
|
+
}),
|
|
146
|
+
onChange: newFiles => {
|
|
147
|
+
if (Array.isArray(newFiles) && newFiles[0] instanceof File) {
|
|
148
|
+
field.onChange(newFiles[0]);
|
|
149
|
+
} else {
|
|
150
|
+
field.onChange(undefined);
|
|
200
151
|
}
|
|
201
|
-
},
|
|
202
|
-
render: function render(_ref4) {
|
|
203
|
-
var field = _ref4.field,
|
|
204
|
-
fieldState = _ref4.fieldState;
|
|
205
|
-
var _a;
|
|
206
|
-
return jsxRuntime.jsx(blocks.Input, Object.assign({}, field, {
|
|
207
|
-
width: "full",
|
|
208
|
-
size: "small",
|
|
209
|
-
placeholder: "http(s)://",
|
|
210
|
-
invalid: fieldState.invalid,
|
|
211
|
-
invalidText: (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message
|
|
212
|
-
}));
|
|
213
152
|
}
|
|
214
|
-
})
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
153
|
+
}))
|
|
154
|
+
}) : React.createElement(reactHookForm.Controller, {
|
|
155
|
+
control: control,
|
|
156
|
+
name: "assignmentUrl",
|
|
157
|
+
rules: {
|
|
158
|
+
required: true,
|
|
159
|
+
validate: url => utils.validateUrl(url !== null && url !== void 0 ? url : '') ? true : intl$1.formatMessage({
|
|
160
|
+
id: 'materialAssignment.input.invalid'
|
|
161
|
+
})
|
|
162
|
+
},
|
|
163
|
+
render: ({
|
|
164
|
+
field,
|
|
165
|
+
fieldState
|
|
166
|
+
}) => {
|
|
167
|
+
var _a;
|
|
168
|
+
return React.createElement(blocks.Input, Object.assign({}, field, {
|
|
169
|
+
width: "full",
|
|
218
170
|
size: "small",
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
171
|
+
placeholder: "http(s)://",
|
|
172
|
+
invalid: fieldState.invalid,
|
|
173
|
+
invalidText: (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
}), isAssignmentResubmitEnabled ? null : React.createElement(React.Fragment, null, React.createElement(blocks.Vspace, {
|
|
177
|
+
height: 1
|
|
178
|
+
}), React.createElement(blocks.Checkbox, {
|
|
179
|
+
size: "small",
|
|
180
|
+
value: isAgreedSubmit,
|
|
181
|
+
onChange: setAgreedSubmit
|
|
182
|
+
}, React.createElement(blocks.Text, {
|
|
183
|
+
size: "small"
|
|
184
|
+
}, intl$1.formatMessage({
|
|
185
|
+
id: 'materialAssignment.attachment.checkbox.onceSubmit'
|
|
186
|
+
})))));
|
|
230
187
|
};
|
|
231
188
|
|
|
232
189
|
exports.default = MaterialAssignmentUploadModal;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
var apiClient = require('@elice/api-client');
|
|
8
7
|
var blocks = require('@elice/blocks');
|
|
@@ -14,53 +13,46 @@ var MaterialAssignmentAdminContent = require('./MaterialAssignmentAdminContent.j
|
|
|
14
13
|
var MaterialAssignmentAdminContentTa = require('./MaterialAssignmentAdminContentTa.js');
|
|
15
14
|
var MaterialAssignmentAdmin_styled = require('./MaterialAssignmentAdmin.styled.js');
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
adminUserId = _ref.adminUserId,
|
|
28
|
-
courseRole = _ref.courseRole,
|
|
29
|
-
updateMaterialUserBrowserResponse = _ref.updateMaterialUserBrowserResponse;
|
|
30
|
-
var prefixCls = 'em-material-assignment-admin';
|
|
16
|
+
const MaterialAssignmentAdmin = React.forwardRef(({
|
|
17
|
+
locale = 'en',
|
|
18
|
+
className,
|
|
19
|
+
materialAssignmentId,
|
|
20
|
+
userId,
|
|
21
|
+
adminUserId,
|
|
22
|
+
courseRole,
|
|
23
|
+
updateMaterialUserBrowserResponse
|
|
24
|
+
}, ref) => {
|
|
25
|
+
const prefixCls = 'em-material-assignment-admin';
|
|
31
26
|
// TODO: initialize in custom hook or withMaterial hoc.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
const isReady = materialSharedUtils.useMaterialConfigApiClientUpdate(apiClient.config.init);
|
|
28
|
+
const isCourseRoleAboveTa = courseRole > types.enums.CourseRole.TA;
|
|
29
|
+
const renderContent = () => {
|
|
35
30
|
if (!isReady) {
|
|
36
|
-
return
|
|
31
|
+
return React.createElement(blocks.Flex, {
|
|
37
32
|
align: "center",
|
|
38
33
|
justify: "center",
|
|
39
34
|
width: "100%",
|
|
40
|
-
height: "100%"
|
|
41
|
-
|
|
42
|
-
});
|
|
35
|
+
height: "100%"
|
|
36
|
+
}, React.createElement(blocks.Spinner, null));
|
|
43
37
|
}
|
|
44
|
-
return isCourseRoleAboveTa ?
|
|
38
|
+
return isCourseRoleAboveTa ? React.createElement(MaterialAssignmentAdminContent.default, {
|
|
45
39
|
ref: ref,
|
|
46
40
|
userId: userId,
|
|
47
41
|
adminUserId: adminUserId,
|
|
48
42
|
materialAssignmentId: materialAssignmentId,
|
|
49
43
|
updateMaterialUserBrowserResponse: updateMaterialUserBrowserResponse
|
|
50
|
-
}) :
|
|
44
|
+
}) : React.createElement(MaterialAssignmentAdminContentTa.default, {
|
|
51
45
|
userId: userId,
|
|
52
46
|
adminUserId: adminUserId,
|
|
53
47
|
materialAssignmentId: materialAssignmentId
|
|
54
48
|
});
|
|
55
49
|
};
|
|
56
|
-
return
|
|
57
|
-
className:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})
|
|
63
|
-
});
|
|
50
|
+
return React.createElement(MaterialAssignmentAdmin_styled.StyledMaterialAssignmentAdminContainer, {
|
|
51
|
+
className: classnames(prefixCls, className)
|
|
52
|
+
}, React.createElement(intl.IntlProvider, {
|
|
53
|
+
locale: locale,
|
|
54
|
+
defaultLocale: "en"
|
|
55
|
+
}, renderContent()));
|
|
64
56
|
});
|
|
65
57
|
|
|
66
58
|
exports.default = MaterialAssignmentAdmin;
|
|
@@ -4,37 +4,27 @@ var blocks = require('@elice/blocks');
|
|
|
4
4
|
var designTokens = require('@elice/design-tokens');
|
|
5
5
|
var styled = require('styled-components');
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
10
|
-
|
|
11
|
-
var StyledMaterialAssignmentAdminContainer = styled__default.default.div.withConfig({
|
|
7
|
+
const StyledMaterialAssignmentAdminContainer = styled.div.withConfig({
|
|
12
8
|
componentId: "sc-1czd3o6-0"
|
|
13
9
|
})(["display:flex;flex-direction:column;align-items:center;width:100%;height:100%;background-color:", ";"], designTokens.base.color.navy9);
|
|
14
|
-
|
|
10
|
+
const StyledMaterialAssignmentAdminHeader = styled(blocks.Flex).withConfig({
|
|
15
11
|
componentId: "sc-1czd3o6-1"
|
|
16
12
|
})(["background-color:", ";"], designTokens.base.color.navy8);
|
|
17
|
-
|
|
13
|
+
const StyledMaterialAssignmentAdminHeaderCell = styled.div.withConfig({
|
|
18
14
|
componentId: "sc-1czd3o6-2"
|
|
19
15
|
})(["display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;padding:0 1.5rem;height:100%;border-right:1px solid ", ";&:last-of-type{border-right:none;}"], designTokens.base.color.gray6);
|
|
20
|
-
|
|
16
|
+
const StyledMaterialAssignmentAdminGradeWrapper = styled(blocks.Flex).withConfig({
|
|
21
17
|
componentId: "sc-1czd3o6-3"
|
|
22
18
|
})(["background-color:", ";width:100%;padding:0 1.5rem;height:4.5rem;border:1px solid ", ";border-radius:0.5rem;"], designTokens.base.color.navy7, designTokens.base.color.navy6);
|
|
23
|
-
|
|
19
|
+
const StyledMaterialAssignmentAdminTextareaWrapper = styled.div.withConfig({
|
|
24
20
|
componentId: "sc-1czd3o6-4"
|
|
25
21
|
})(["background-color:", ";"], designTokens.base.color.gray2);
|
|
26
|
-
|
|
22
|
+
const StyledMaterialAssignmentAdminManualScoreEditButtonWrapper = styled.div.withConfig({
|
|
27
23
|
componentId: "sc-1czd3o6-5"
|
|
28
|
-
})(["cursor:", ";opacity:", ";"],
|
|
29
|
-
|
|
30
|
-
}, function (props) {
|
|
31
|
-
return props.disabled ? 0.5 : 1;
|
|
32
|
-
});
|
|
33
|
-
var StyledMaterialAssignmentAdminManualScoreEditButton = styled__default.default(blocks.Text).withConfig({
|
|
24
|
+
})(["cursor:", ";opacity:", ";"], props => props.disabled ? 'not-allowed' : 'pointer', props => props.disabled ? 0.5 : 1);
|
|
25
|
+
const StyledMaterialAssignmentAdminManualScoreEditButton = styled(blocks.Text).withConfig({
|
|
34
26
|
componentId: "sc-1czd3o6-6"
|
|
35
|
-
})(["pointer-events:", ";"],
|
|
36
|
-
return props.disabled ? 'none' : 'auto';
|
|
37
|
-
});
|
|
27
|
+
})(["pointer-events:", ";"], props => props.disabled ? 'none' : 'auto');
|
|
38
28
|
|
|
39
29
|
exports.StyledMaterialAssignmentAdminContainer = StyledMaterialAssignmentAdminContainer;
|
|
40
30
|
exports.StyledMaterialAssignmentAdminGradeWrapper = StyledMaterialAssignmentAdminGradeWrapper;
|