@elice/material-quiz 1.241008.0-file.0 → 1.241008.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.
package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js
CHANGED
|
@@ -12,12 +12,14 @@ var icons = require('@elice/icons');
|
|
|
12
12
|
var intl = require('@elice/intl');
|
|
13
13
|
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
14
14
|
var cloneDeep = require('lodash-es/cloneDeep');
|
|
15
|
+
var trim = require('lodash-es/trim');
|
|
15
16
|
var styled = require('styled-components');
|
|
16
17
|
var checkTwoDimensionArray = require('../../utils/checkTwoDimensionArray.js');
|
|
17
18
|
|
|
18
19
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
19
20
|
|
|
20
21
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultCompat(cloneDeep);
|
|
22
|
+
var trim__default = /*#__PURE__*/_interopDefaultCompat(trim);
|
|
21
23
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
22
24
|
|
|
23
25
|
var SHEET_Z_INDEX = 982;
|
|
@@ -143,13 +145,12 @@ var OptionGroupAnswerListItem = function OptionGroupAnswerListItem(_ref) {
|
|
|
143
145
|
id: 'answer.option.errorMessage'
|
|
144
146
|
})
|
|
145
147
|
},
|
|
146
|
-
validate: function validate() {
|
|
147
|
-
if (
|
|
148
|
-
return
|
|
148
|
+
validate: function validate(e) {
|
|
149
|
+
if (!trim__default.default(e).length) {
|
|
150
|
+
return intl$1.formatMessage({
|
|
151
|
+
id: 'answer.option.errorMessage'
|
|
152
|
+
});
|
|
149
153
|
}
|
|
150
|
-
return intl$1.formatMessage({
|
|
151
|
-
id: 'answer.option.errorMessage'
|
|
152
|
-
});
|
|
153
154
|
}
|
|
154
155
|
},
|
|
155
156
|
render: function render(_ref3) {
|
|
@@ -8,6 +8,7 @@ import { eilMathsignMultiplyBasic } from '@elice/icons';
|
|
|
8
8
|
import { useRawEliceIntl } from '@elice/intl';
|
|
9
9
|
import { useMaterialConfigApiClientUpdate } from '@elice/material-shared-utils';
|
|
10
10
|
import cloneDeep from 'lodash-es/cloneDeep';
|
|
11
|
+
import trim from 'lodash-es/trim';
|
|
11
12
|
import styled, { css } from 'styled-components';
|
|
12
13
|
import { checkTwoDimensionArray } from '../../utils/checkTwoDimensionArray.js';
|
|
13
14
|
|
|
@@ -134,13 +135,12 @@ var OptionGroupAnswerListItem = function OptionGroupAnswerListItem(_ref) {
|
|
|
134
135
|
id: 'answer.option.errorMessage'
|
|
135
136
|
})
|
|
136
137
|
},
|
|
137
|
-
validate: function validate() {
|
|
138
|
-
if (
|
|
139
|
-
return
|
|
138
|
+
validate: function validate(e) {
|
|
139
|
+
if (!trim(e).length) {
|
|
140
|
+
return intl.formatMessage({
|
|
141
|
+
id: 'answer.option.errorMessage'
|
|
142
|
+
});
|
|
140
143
|
}
|
|
141
|
-
return intl.formatMessage({
|
|
142
|
-
id: 'answer.option.errorMessage'
|
|
143
|
-
});
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
render: function render(_ref3) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.241008.0
|
|
3
|
+
"version": "1.241008.0",
|
|
4
4
|
"description": "User view and editing components of Elice material quiz",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
69
69
|
"@elice/intl": "0.240718.0",
|
|
70
70
|
"@elice/markdown": "^1.240124.0",
|
|
71
|
-
"@elice/material-shared-types": "1.241008.0
|
|
72
|
-
"@elice/material-shared-utils": "1.241008.0
|
|
71
|
+
"@elice/material-shared-types": "1.241008.0",
|
|
72
|
+
"@elice/material-shared-utils": "1.241008.0",
|
|
73
73
|
"@elice/mui-elements": "^5.240820.0",
|
|
74
74
|
"@elice/mui-system": "^5.240820.0",
|
|
75
75
|
"@elice/openapi-client-course": "^1.230814.0",
|