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