@elice/material-quiz 1.250325.0 → 1.250325.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.
@@ -77,9 +77,7 @@ var OptionEditor = React__default.default.forwardRef(function (_a, ref) {
77
77
  ref: handleTextAreaApi,
78
78
  invalid: invalid,
79
79
  readOnly: readOnly,
80
- resetFocus: props.onBlur,
81
- disabled: readOnly,
82
- "aria-disabled": props.disabled
80
+ resetFocus: props.onBlur
83
81
  })), suffix ? jsxRuntime.jsx("div", {
84
82
  className: "".concat(PREFIX, "-adornment suffix"),
85
83
  onDragStart: function onDragStart(e) {
@@ -6,7 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var reactHookForm = require('react-hook-form');
7
7
  var intl = require('@elice/intl');
8
8
  var material = require('@mui/material');
9
- var context = require('../../context.js');
10
9
 
11
10
  //
12
11
  //
@@ -22,8 +21,6 @@ var AnswerInfoDefaultController = function AnswerInfoDefaultController(_ref) {
22
21
  //
23
22
  var intl$1 = intl.useRawEliceIntl();
24
23
  //
25
- var _useMaterialQuizEditC = context.useMaterialQuizEditContext(),
26
- disabled = _useMaterialQuizEditC.disabled;
27
24
  var _useFormContext = reactHookForm.useFormContext(),
28
25
  control = _useFormContext.control;
29
26
  //
@@ -75,7 +72,7 @@ var AnswerInfoDefaultController = function AnswerInfoDefaultController(_ref) {
75
72
  max: MAX_TEXT_LENGTH
76
73
  }
77
74
  },
78
- disabled: !watchedIsAutoGrade || disabled,
75
+ disabled: !watchedIsAutoGrade,
79
76
  error: fieldState.invalid,
80
77
  helperText: ((_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message) || ((_b = slotProps === null || slotProps === void 0 ? void 0 : slotProps.TextField) === null || _b === void 0 ? void 0 : _b.helperText),
81
78
  placeholder: ((_c = slotProps === null || slotProps === void 0 ? void 0 : slotProps.TextField) === null || _c === void 0 ? void 0 : _c.placeholder) || intl$1.formatMessage({
@@ -155,8 +155,7 @@ var OptionGroupAnswerListItem = function OptionGroupAnswerListItem(_ref) {
155
155
  render: function render(_ref3) {
156
156
  var field = _ref3.field;
157
157
  return jsxRuntime.jsx(StyledQuizOptionTextInput, Object.assign({}, field, {
158
- width: "full",
159
- disabled: disabled
158
+ width: "full"
160
159
  }));
161
160
  }
162
161
  })
@@ -81,8 +81,7 @@ var OptionGroupGroupListItem = function OptionGroupGroupListItem(_ref2) {
81
81
  fieldState = _ref3.fieldState;
82
82
  return jsxRuntime.jsx(StyledInputGroup, Object.assign({
83
83
  invalid: fieldState.invalid || !isGroupChildAnswer,
84
- width: "full",
85
- disabled: disabled
84
+ width: "full"
86
85
  }, field, {
87
86
  ref: null
88
87
  }));
@@ -67,9 +67,7 @@ var OptionEditor = React.forwardRef(function (_a, ref) {
67
67
  ref: handleTextAreaApi,
68
68
  invalid: invalid,
69
69
  readOnly: readOnly,
70
- resetFocus: props.onBlur,
71
- disabled: readOnly,
72
- "aria-disabled": props.disabled
70
+ resetFocus: props.onBlur
73
71
  })), suffix ? jsx("div", {
74
72
  className: "".concat(PREFIX, "-adornment suffix"),
75
73
  onDragStart: function onDragStart(e) {
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { useFormContext, useWatch, Controller } from 'react-hook-form';
3
3
  import { useRawEliceIntl } from '@elice/intl';
4
4
  import { TextField } from '@mui/material';
5
- import { useMaterialQuizEditContext } from '../../context.js';
6
5
 
7
6
  //
8
7
  //
@@ -18,8 +17,6 @@ var AnswerInfoDefaultController = function AnswerInfoDefaultController(_ref) {
18
17
  //
19
18
  var intl = useRawEliceIntl();
20
19
  //
21
- var _useMaterialQuizEditC = useMaterialQuizEditContext(),
22
- disabled = _useMaterialQuizEditC.disabled;
23
20
  var _useFormContext = useFormContext(),
24
21
  control = _useFormContext.control;
25
22
  //
@@ -71,7 +68,7 @@ var AnswerInfoDefaultController = function AnswerInfoDefaultController(_ref) {
71
68
  max: MAX_TEXT_LENGTH
72
69
  }
73
70
  },
74
- disabled: !watchedIsAutoGrade || disabled,
71
+ disabled: !watchedIsAutoGrade,
75
72
  error: fieldState.invalid,
76
73
  helperText: ((_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message) || ((_b = slotProps === null || slotProps === void 0 ? void 0 : slotProps.TextField) === null || _b === void 0 ? void 0 : _b.helperText),
77
74
  placeholder: ((_c = slotProps === null || slotProps === void 0 ? void 0 : slotProps.TextField) === null || _c === void 0 ? void 0 : _c.placeholder) || intl.formatMessage({
@@ -146,8 +146,7 @@ var OptionGroupAnswerListItem = function OptionGroupAnswerListItem(_ref) {
146
146
  render: function render(_ref3) {
147
147
  var field = _ref3.field;
148
148
  return jsx(StyledQuizOptionTextInput, Object.assign({}, field, {
149
- width: "full",
150
- disabled: disabled
149
+ width: "full"
151
150
  }));
152
151
  }
153
152
  })
@@ -72,8 +72,7 @@ var OptionGroupGroupListItem = function OptionGroupGroupListItem(_ref2) {
72
72
  fieldState = _ref3.fieldState;
73
73
  return jsx(StyledInputGroup, Object.assign({
74
74
  invalid: fieldState.invalid || !isGroupChildAnswer,
75
- width: "full",
76
- disabled: disabled
75
+ width: "full"
77
76
  }, field, {
78
77
  ref: null
79
78
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-quiz",
3
- "version": "1.250325.0",
3
+ "version": "1.250325.1",
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",
@@ -76,8 +76,8 @@
76
76
  "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
77
77
  "@elice/intl": "0.241127.0",
78
78
  "@elice/markdown": "1.241015.0",
79
- "@elice/material-shared-types": "1.250325.0",
80
- "@elice/material-shared-utils": "1.250325.0",
79
+ "@elice/material-shared-types": "1.250325.1",
80
+ "@elice/material-shared-utils": "1.250325.1",
81
81
  "@elice/mui-elements": "^5.250108.0-controllabel.0",
82
82
  "@elice/mui-system": "^5.250108.0-controllabel.0",
83
83
  "@elice/openapi-client-course": "^1.241220.0",