@elice/material-quiz 1.230726.0 → 1.230817.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.
Files changed (39) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +6 -11
  2. package/cjs/components/eb-sortable/EbDraggable.d.ts +1 -0
  3. package/cjs/components/eb-sortable/EbDroppable.d.ts +1 -0
  4. package/cjs/components/eb-sortable/EbSortable.d.ts +2 -1
  5. package/cjs/components/material-quiz/context/MaterialQuizContext.d.ts +2 -2
  6. package/cjs/components/material-quiz/material-quiz-group/context/context.d.ts +2 -2
  7. package/cjs/components/material-quiz-edit/MaterialQuizEdit.d.ts +2 -2
  8. package/cjs/components/material-quiz-edit/context.d.ts +1 -1
  9. package/cjs/components/material-quiz-edit/utils/editValue.d.ts +1 -1
  10. package/cjs/components/shared/QuizDraggbleOption.d.ts +1 -1
  11. package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +2 -2
  12. package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.js +1 -0
  13. package/cjs/components/shared/question-checkbox/QuestionCheckboxOption.d.ts +1 -1
  14. package/cjs/components/shared/question-radio/QuestionRadioContext.d.ts +2 -2
  15. package/cjs/components/shared/question-radio/QuestionRadioContext.js +1 -0
  16. package/cjs/components/shared/question-radio/QuestionRadioOption.d.ts +1 -1
  17. package/cjs/components/shared/utils/getQuestionStatusStyle.d.ts +1 -1
  18. package/cjs/helpers/index.d.ts +2 -2
  19. package/es/_virtual/_rollupPluginBabelHelpers.js +6 -11
  20. package/es/components/eb-sortable/EbDraggable.d.ts +1 -0
  21. package/es/components/eb-sortable/EbDroppable.d.ts +1 -0
  22. package/es/components/eb-sortable/EbSortable.d.ts +2 -1
  23. package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +1 -1
  24. package/es/components/material-quiz/context/MaterialQuizContext.d.ts +2 -2
  25. package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +1 -1
  26. package/es/components/material-quiz/material-quiz-group/context/context.d.ts +2 -2
  27. package/es/components/material-quiz-edit/MaterialQuizEdit.d.ts +2 -2
  28. package/es/components/material-quiz-edit/context.d.ts +1 -1
  29. package/es/components/material-quiz-edit/utils/editValue.d.ts +1 -1
  30. package/es/components/shared/QuizDraggbleOption.d.ts +1 -1
  31. package/es/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +2 -2
  32. package/es/components/shared/question-checkbox/QuestionCheckboxContext.js +1 -0
  33. package/es/components/shared/question-checkbox/QuestionCheckboxOption.d.ts +1 -1
  34. package/es/components/shared/question-radio/QuestionRadioContext.d.ts +2 -2
  35. package/es/components/shared/question-radio/QuestionRadioContext.js +1 -0
  36. package/es/components/shared/question-radio/QuestionRadioOption.d.ts +1 -1
  37. package/es/components/shared/utils/getQuestionStatusStyle.d.ts +1 -1
  38. package/es/helpers/index.d.ts +2 -2
  39. package/package.json +12 -16
@@ -135,7 +135,10 @@ function _regeneratorRuntime() {
135
135
  if ("executing" === state) throw new Error("Generator is already running");
136
136
  if ("completed" === state) {
137
137
  if ("throw" === method) throw arg;
138
- return doneResult();
138
+ return {
139
+ value: void 0,
140
+ done: !0
141
+ };
139
142
  }
140
143
  for (context.method = method, context.arg = arg;;) {
141
144
  var delegate = context.delegate;
@@ -188,7 +191,7 @@ function _regeneratorRuntime() {
188
191
  }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
189
192
  }
190
193
  function values(iterable) {
191
- if (iterable) {
194
+ if (iterable || "" === iterable) {
192
195
  var iteratorMethod = iterable[iteratorSymbol];
193
196
  if (iteratorMethod) return iteratorMethod.call(iterable);
194
197
  if ("function" == typeof iterable.next) return iterable;
@@ -201,15 +204,7 @@ function _regeneratorRuntime() {
201
204
  return next.next = next;
202
205
  }
203
206
  }
204
- return {
205
- next: doneResult
206
- };
207
- }
208
- function doneResult() {
209
- return {
210
- value: undefined,
211
- done: !0
212
- };
207
+ throw new TypeError(typeof iterable + " is not iterable");
213
208
  }
214
209
  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
215
210
  value: GeneratorFunctionPrototype,
@@ -1,4 +1,5 @@
1
1
  /// <reference types="jquery" />
2
+ /// <reference types="jquery" />
2
3
  /// <reference types="jqueryui" />
3
4
  import React from 'react';
4
5
  import 'jquery-ui/ui/widgets/draggable';
@@ -1,4 +1,5 @@
1
1
  /// <reference types="jquery" />
2
+ /// <reference types="jquery" />
2
3
  /// <reference types="jqueryui" />
3
4
  import React from 'react';
4
5
  import 'jquery-ui/ui/widgets/droppable';
@@ -1,9 +1,10 @@
1
1
  /// <reference types="jquery" />
2
+ /// <reference types="jquery" />
2
3
  /// <reference types="jqueryui" />
3
4
  import React from 'react';
4
5
  import 'jquery-ui/ui/widgets/sortable.js';
5
6
  import 'jquery-ui/ui/widgets/sortable';
6
- declare type SortedIds = string[];
7
+ type SortedIds = string[];
7
8
  interface EbSortableProps {
8
9
  id?: string;
9
10
  className?: string;
@@ -9,7 +9,7 @@ export interface State {
9
9
  userId?: number;
10
10
  initStatus: APIStatus;
11
11
  }
12
- export declare type MaterialQuizProps = {
12
+ export type MaterialQuizProps = {
13
13
  materialQuizId: number;
14
14
  userId?: number;
15
15
  locale?: string;
@@ -27,7 +27,7 @@ interface DispatchContextType {
27
27
  setVertical: React.Dispatch<React.SetStateAction<boolean>>;
28
28
  onNext?: () => void;
29
29
  }
30
- declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, children, }: MaterialQuizProviderProps): JSX.Element;
30
+ declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, children, }: MaterialQuizProviderProps): React.JSX.Element;
31
31
  declare function useMaterialQuizState(): State;
32
32
  declare function useMaterialQuizDispatch(): DispatchContextType;
33
33
  export { MaterialQuizProvider, useMaterialQuizState, useMaterialQuizDispatch };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { GetOrgMaterialQuizGetResponses } from '@elice/types';
3
- export declare type MaterialOptionList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['options']>;
4
- export declare type MaterialGroupList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['groups']>;
3
+ export type MaterialOptionList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['options']>;
4
+ export type MaterialGroupList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['groups']>;
5
5
  export interface QuizGroupOption {
6
6
  order: number;
7
7
  options: MaterialOptionList[number];
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import type { MarkdownEditorFileUploadReqFn } from '@elice/markdown';
3
3
  import type { GetOrgMaterialQuizGetResponses } from '@elice/types';
4
4
  import type { FormState } from 'react-hook-form';
5
- export declare type MaterialQuizEditValue = Pick<GetOrgMaterialQuizGetResponses['materialQuiz'], 'id' | 'questionTitle' | 'questionDescription' | 'optionType' | 'options' | 'answerInfo' | 'answerHint' | 'isAutoGrade' | 'explanationInfo' | 'groups'>;
6
- export declare type MaterialQuizEditFormState = Pick<FormState<Record<string, any>>, 'isDirty' | 'isValid'>;
5
+ export type MaterialQuizEditValue = Pick<GetOrgMaterialQuizGetResponses['materialQuiz'], 'id' | 'questionTitle' | 'questionDescription' | 'optionType' | 'options' | 'answerInfo' | 'answerHint' | 'isAutoGrade' | 'explanationInfo' | 'groups'>;
6
+ export type MaterialQuizEditFormState = Pick<FormState<Record<string, any>>, 'isDirty' | 'isValid'>;
7
7
  export interface MaterialQuizEditProps {
8
8
  /** Value of material quiz edit form. */
9
9
  value: MaterialQuizEditValue;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { MaterialQuizEditProps } from './MaterialQuizEdit';
3
- declare type MaterialQuizEditContextValue = Pick<MaterialQuizEditProps, 'disabled' | 'onFileUploadRequest'>;
3
+ type MaterialQuizEditContextValue = Pick<MaterialQuizEditProps, 'disabled' | 'onFileUploadRequest'>;
4
4
  declare const MaterialQuizEditContext: React.Context<MaterialQuizEditContextValue>;
5
5
  export declare const useMaterialQuizEditContext: () => MaterialQuizEditContextValue;
6
6
  export default MaterialQuizEditContext;
@@ -1,5 +1,5 @@
1
1
  import type { MaterialQuizEditValue } from '../MaterialQuizEdit';
2
- export declare type _QuizEditValue = Omit<MaterialQuizEditValue, 'options' | 'groups'> & {
2
+ export type _QuizEditValue = Omit<MaterialQuizEditValue, 'options' | 'groups'> & {
3
3
  options: {
4
4
  id: string;
5
5
  title?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type QuizDraggbleOptionRole = 'default' | 'correct' | 'wrong' | 'answer';
2
+ export type QuizDraggbleOptionRole = 'default' | 'correct' | 'wrong' | 'answer';
3
3
  export interface QuizDraggbleOptionProps {
4
4
  id: string;
5
5
  className: string;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { QuestionCheckboxProps } from './QuestionCheckbox';
3
- declare type Value = Pick<QuestionCheckboxProps, 'selectedOptions' | 'disabled' | 'onSelect'>;
3
+ type Value = Pick<QuestionCheckboxProps, 'selectedOptions' | 'disabled' | 'onSelect'>;
4
4
  interface QuestionCheckboxProviderProps extends QuestionCheckboxProps {
5
5
  children: React.ReactNode;
6
6
  }
7
- declare function QuestionCheckboxContextProvider({ selectedOptions, onSelect, disabled, children, }: QuestionCheckboxProviderProps): JSX.Element;
7
+ declare function QuestionCheckboxContextProvider({ selectedOptions, onSelect, disabled, children, }: QuestionCheckboxProviderProps): React.JSX.Element;
8
8
  declare function useQuestionCheckboxContext(): Value;
9
9
  export { QuestionCheckboxContextProvider, useQuestionCheckboxContext };
@@ -15,6 +15,7 @@ function QuestionCheckboxContextProvider(_ref) {
15
15
  onSelect = _ref.onSelect,
16
16
  disabled = _ref.disabled,
17
17
  children = _ref.children;
18
+ // eslint-disable-next-line react-hooks/exhaustive-deps
18
19
  var onSelectValue = React__default["default"].useCallback(onSelect, []);
19
20
  var value = React__default["default"].useMemo(function () {
20
21
  return {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type Status = 'correct' | 'wrong' | 'answer';
2
+ type Status = 'correct' | 'wrong' | 'answer';
3
3
  interface QuestionCheckboxOptionProps {
4
4
  value: any;
5
5
  status?: Status;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { QuestionRadioProps } from './QuestionRadio';
3
- declare type Value = Pick<QuestionRadioProps, 'selectedValue' | 'disabled' | 'onSelect'>;
3
+ type Value = Pick<QuestionRadioProps, 'selectedValue' | 'disabled' | 'onSelect'>;
4
4
  interface QuestionRadioProviderProps extends QuestionRadioProps {
5
5
  children: React.ReactNode;
6
6
  }
7
- declare function QuestionRadioContextProvider({ selectedValue, onSelect, disabled, children, }: QuestionRadioProviderProps): JSX.Element;
7
+ declare function QuestionRadioContextProvider({ selectedValue, onSelect, disabled, children, }: QuestionRadioProviderProps): React.JSX.Element;
8
8
  declare function useQuestionRadioContext(): Value;
9
9
  export { QuestionRadioContextProvider, useQuestionRadioContext };
@@ -15,6 +15,7 @@ function QuestionRadioContextProvider(_ref) {
15
15
  onSelect = _ref.onSelect,
16
16
  disabled = _ref.disabled,
17
17
  children = _ref.children;
18
+ // eslint-disable-next-line react-hooks/exhaustive-deps
18
19
  var onSelectValue = React__default["default"].useCallback(onSelect, []);
19
20
  var value = React__default["default"].useMemo(function () {
20
21
  return {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type Status = 'correct' | 'wrong' | 'answer';
2
+ type Status = 'correct' | 'wrong' | 'answer';
3
3
  interface QuestionRadioOptionProps {
4
4
  value: any;
5
5
  status?: Status;
@@ -1,4 +1,4 @@
1
- declare type Status = 'correct' | 'wrong' | 'answer';
1
+ type Status = 'correct' | 'wrong' | 'answer';
2
2
  interface QuestionValues {
3
3
  checked: boolean;
4
4
  status?: Status;
@@ -11,8 +11,8 @@ interface AnswerInfo {
11
11
  order: number | null;
12
12
  isSelected: boolean;
13
13
  }
14
- export declare type Option = OptionInfo & Omit<AnswerInfo, 'optionIdent'>;
15
- export declare type OptionList = Option[];
14
+ export type Option = OptionInfo & Omit<AnswerInfo, 'optionIdent'>;
15
+ export type OptionList = Option[];
16
16
  export declare enum QuizResultStatus {
17
17
  Correct = 0,
18
18
  Wrong = 1,
@@ -131,7 +131,10 @@ function _regeneratorRuntime() {
131
131
  if ("executing" === state) throw new Error("Generator is already running");
132
132
  if ("completed" === state) {
133
133
  if ("throw" === method) throw arg;
134
- return doneResult();
134
+ return {
135
+ value: void 0,
136
+ done: !0
137
+ };
135
138
  }
136
139
  for (context.method = method, context.arg = arg;;) {
137
140
  var delegate = context.delegate;
@@ -184,7 +187,7 @@ function _regeneratorRuntime() {
184
187
  }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
185
188
  }
186
189
  function values(iterable) {
187
- if (iterable) {
190
+ if (iterable || "" === iterable) {
188
191
  var iteratorMethod = iterable[iteratorSymbol];
189
192
  if (iteratorMethod) return iteratorMethod.call(iterable);
190
193
  if ("function" == typeof iterable.next) return iterable;
@@ -197,15 +200,7 @@ function _regeneratorRuntime() {
197
200
  return next.next = next;
198
201
  }
199
202
  }
200
- return {
201
- next: doneResult
202
- };
203
- }
204
- function doneResult() {
205
- return {
206
- value: undefined,
207
- done: !0
208
- };
203
+ throw new TypeError(typeof iterable + " is not iterable");
209
204
  }
210
205
  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
211
206
  value: GeneratorFunctionPrototype,
@@ -1,4 +1,5 @@
1
1
  /// <reference types="jquery" />
2
+ /// <reference types="jquery" />
2
3
  /// <reference types="jqueryui" />
3
4
  import React from 'react';
4
5
  import 'jquery-ui/ui/widgets/draggable';
@@ -1,4 +1,5 @@
1
1
  /// <reference types="jquery" />
2
+ /// <reference types="jquery" />
2
3
  /// <reference types="jqueryui" />
3
4
  import React from 'react';
4
5
  import 'jquery-ui/ui/widgets/droppable';
@@ -1,9 +1,10 @@
1
1
  /// <reference types="jquery" />
2
+ /// <reference types="jquery" />
2
3
  /// <reference types="jqueryui" />
3
4
  import React from 'react';
4
5
  import 'jquery-ui/ui/widgets/sortable.js';
5
6
  import 'jquery-ui/ui/widgets/sortable';
6
- declare type SortedIds = string[];
7
+ type SortedIds = string[];
7
8
  interface EbSortableProps {
8
9
  id?: string;
9
10
  className?: string;
@@ -2,7 +2,7 @@ import { slicedToArray as _slicedToArray, toConsumableArray as _toConsumableArra
2
2
  import React from 'react';
3
3
  import { useIntl } from 'react-intl';
4
4
  import { getOrgMaterialQuizResponseGet, getOrgMaterialQuizResponseList, postOrgMaterialQuizResponseAdd } from '@elice/api-client';
5
- import { Flex, Text, Icon } from '@elice/blocks';
5
+ import { Icon, Flex, Text } from '@elice/blocks';
6
6
  import { base } from '@elice/design-tokens';
7
7
  import { eilSortItem } from '@elice/icons';
8
8
  import styled from 'styled-components';
@@ -9,7 +9,7 @@ export interface State {
9
9
  userId?: number;
10
10
  initStatus: APIStatus;
11
11
  }
12
- export declare type MaterialQuizProps = {
12
+ export type MaterialQuizProps = {
13
13
  materialQuizId: number;
14
14
  userId?: number;
15
15
  locale?: string;
@@ -27,7 +27,7 @@ interface DispatchContextType {
27
27
  setVertical: React.Dispatch<React.SetStateAction<boolean>>;
28
28
  onNext?: () => void;
29
29
  }
30
- declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, children, }: MaterialQuizProviderProps): JSX.Element;
30
+ declare function MaterialQuizProvider({ materialQuizId, userId, onSubmit, onDirty, onNext, children, }: MaterialQuizProviderProps): React.JSX.Element;
31
31
  declare function useMaterialQuizState(): State;
32
32
  declare function useMaterialQuizDispatch(): DispatchContextType;
33
33
  export { MaterialQuizProvider, useMaterialQuizState, useMaterialQuizDispatch };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { Flex, Text, Vspace, Icon, Button } from '@elice/blocks';
3
+ import { Flex, Button, Vspace, Text, Icon } from '@elice/blocks';
4
4
  import { base } from '@elice/design-tokens';
5
5
  import { eilSortItem } from '@elice/icons';
6
6
  import styled from 'styled-components';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { GetOrgMaterialQuizGetResponses } from '@elice/types';
3
- export declare type MaterialOptionList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['options']>;
4
- export declare type MaterialGroupList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['groups']>;
3
+ export type MaterialOptionList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['options']>;
4
+ export type MaterialGroupList = NonNullable<GetOrgMaterialQuizGetResponses['materialQuiz']['groups']>;
5
5
  export interface QuizGroupOption {
6
6
  order: number;
7
7
  options: MaterialOptionList[number];
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import type { MarkdownEditorFileUploadReqFn } from '@elice/markdown';
3
3
  import type { GetOrgMaterialQuizGetResponses } from '@elice/types';
4
4
  import type { FormState } from 'react-hook-form';
5
- export declare type MaterialQuizEditValue = Pick<GetOrgMaterialQuizGetResponses['materialQuiz'], 'id' | 'questionTitle' | 'questionDescription' | 'optionType' | 'options' | 'answerInfo' | 'answerHint' | 'isAutoGrade' | 'explanationInfo' | 'groups'>;
6
- export declare type MaterialQuizEditFormState = Pick<FormState<Record<string, any>>, 'isDirty' | 'isValid'>;
5
+ export type MaterialQuizEditValue = Pick<GetOrgMaterialQuizGetResponses['materialQuiz'], 'id' | 'questionTitle' | 'questionDescription' | 'optionType' | 'options' | 'answerInfo' | 'answerHint' | 'isAutoGrade' | 'explanationInfo' | 'groups'>;
6
+ export type MaterialQuizEditFormState = Pick<FormState<Record<string, any>>, 'isDirty' | 'isValid'>;
7
7
  export interface MaterialQuizEditProps {
8
8
  /** Value of material quiz edit form. */
9
9
  value: MaterialQuizEditValue;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { MaterialQuizEditProps } from './MaterialQuizEdit';
3
- declare type MaterialQuizEditContextValue = Pick<MaterialQuizEditProps, 'disabled' | 'onFileUploadRequest'>;
3
+ type MaterialQuizEditContextValue = Pick<MaterialQuizEditProps, 'disabled' | 'onFileUploadRequest'>;
4
4
  declare const MaterialQuizEditContext: React.Context<MaterialQuizEditContextValue>;
5
5
  export declare const useMaterialQuizEditContext: () => MaterialQuizEditContextValue;
6
6
  export default MaterialQuizEditContext;
@@ -1,5 +1,5 @@
1
1
  import type { MaterialQuizEditValue } from '../MaterialQuizEdit';
2
- export declare type _QuizEditValue = Omit<MaterialQuizEditValue, 'options' | 'groups'> & {
2
+ export type _QuizEditValue = Omit<MaterialQuizEditValue, 'options' | 'groups'> & {
3
3
  options: {
4
4
  id: string;
5
5
  title?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type QuizDraggbleOptionRole = 'default' | 'correct' | 'wrong' | 'answer';
2
+ export type QuizDraggbleOptionRole = 'default' | 'correct' | 'wrong' | 'answer';
3
3
  export interface QuizDraggbleOptionProps {
4
4
  id: string;
5
5
  className: string;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { QuestionCheckboxProps } from './QuestionCheckbox';
3
- declare type Value = Pick<QuestionCheckboxProps, 'selectedOptions' | 'disabled' | 'onSelect'>;
3
+ type Value = Pick<QuestionCheckboxProps, 'selectedOptions' | 'disabled' | 'onSelect'>;
4
4
  interface QuestionCheckboxProviderProps extends QuestionCheckboxProps {
5
5
  children: React.ReactNode;
6
6
  }
7
- declare function QuestionCheckboxContextProvider({ selectedOptions, onSelect, disabled, children, }: QuestionCheckboxProviderProps): JSX.Element;
7
+ declare function QuestionCheckboxContextProvider({ selectedOptions, onSelect, disabled, children, }: QuestionCheckboxProviderProps): React.JSX.Element;
8
8
  declare function useQuestionCheckboxContext(): Value;
9
9
  export { QuestionCheckboxContextProvider, useQuestionCheckboxContext };
@@ -7,6 +7,7 @@ function QuestionCheckboxContextProvider(_ref) {
7
7
  onSelect = _ref.onSelect,
8
8
  disabled = _ref.disabled,
9
9
  children = _ref.children;
10
+ // eslint-disable-next-line react-hooks/exhaustive-deps
10
11
  var onSelectValue = React.useCallback(onSelect, []);
11
12
  var value = React.useMemo(function () {
12
13
  return {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type Status = 'correct' | 'wrong' | 'answer';
2
+ type Status = 'correct' | 'wrong' | 'answer';
3
3
  interface QuestionCheckboxOptionProps {
4
4
  value: any;
5
5
  status?: Status;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { QuestionRadioProps } from './QuestionRadio';
3
- declare type Value = Pick<QuestionRadioProps, 'selectedValue' | 'disabled' | 'onSelect'>;
3
+ type Value = Pick<QuestionRadioProps, 'selectedValue' | 'disabled' | 'onSelect'>;
4
4
  interface QuestionRadioProviderProps extends QuestionRadioProps {
5
5
  children: React.ReactNode;
6
6
  }
7
- declare function QuestionRadioContextProvider({ selectedValue, onSelect, disabled, children, }: QuestionRadioProviderProps): JSX.Element;
7
+ declare function QuestionRadioContextProvider({ selectedValue, onSelect, disabled, children, }: QuestionRadioProviderProps): React.JSX.Element;
8
8
  declare function useQuestionRadioContext(): Value;
9
9
  export { QuestionRadioContextProvider, useQuestionRadioContext };
@@ -7,6 +7,7 @@ function QuestionRadioContextProvider(_ref) {
7
7
  onSelect = _ref.onSelect,
8
8
  disabled = _ref.disabled,
9
9
  children = _ref.children;
10
+ // eslint-disable-next-line react-hooks/exhaustive-deps
10
11
  var onSelectValue = React.useCallback(onSelect, []);
11
12
  var value = React.useMemo(function () {
12
13
  return {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type Status = 'correct' | 'wrong' | 'answer';
2
+ type Status = 'correct' | 'wrong' | 'answer';
3
3
  interface QuestionRadioOptionProps {
4
4
  value: any;
5
5
  status?: Status;
@@ -1,4 +1,4 @@
1
- declare type Status = 'correct' | 'wrong' | 'answer';
1
+ type Status = 'correct' | 'wrong' | 'answer';
2
2
  interface QuestionValues {
3
3
  checked: boolean;
4
4
  status?: Status;
@@ -11,8 +11,8 @@ interface AnswerInfo {
11
11
  order: number | null;
12
12
  isSelected: boolean;
13
13
  }
14
- export declare type Option = OptionInfo & Omit<AnswerInfo, 'optionIdent'>;
15
- export declare type OptionList = Option[];
14
+ export type Option = OptionInfo & Omit<AnswerInfo, 'optionIdent'>;
15
+ export type OptionList = Option[];
16
16
  export declare enum QuizResultStatus {
17
17
  Correct = 0,
18
18
  Wrong = 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-quiz",
3
- "version": "1.230726.0",
3
+ "version": "1.230817.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",
@@ -14,10 +14,6 @@
14
14
  "README.md"
15
15
  ],
16
16
  "sideEffects": false,
17
- "engines": {
18
- "node": "~16.14",
19
- "yarn": ">=1.20 <2"
20
- },
21
17
  "scripts": {
22
18
  "start": "run-s watch",
23
19
  "prebuild": "run-s clean",
@@ -47,20 +43,20 @@
47
43
  "jquery": "^3.6.0",
48
44
  "jquery-ui": "^1.13.1",
49
45
  "lodash-es": "^4.17.21",
50
- "react-hook-form": "~7.12.0",
46
+ "react-hook-form": "~7.45.4",
51
47
  "react-transition-group": "^4.4.0",
52
- "tslib": "^2.3.1"
48
+ "tslib": "^2.6.1"
53
49
  },
54
50
  "devDependencies": {
55
- "@elice/api-client": "^1.230522.0",
56
- "@elice/blocks": "1.220930.0",
51
+ "@elice/api-client": "^1.230815.0",
52
+ "@elice/blocks": "^1.230815.0",
57
53
  "@elice/design-tokens": "^1.220803.0",
58
- "@elice/icons": "^1.220803.0",
59
- "@elice/icons-legacy": "npm:@elice/icons@0.220803.1",
60
- "@elice/markdown": "^1.220803.0",
61
- "@elice/material-shared-types": "1.230726.0",
62
- "@elice/material-shared-utils": "1.230726.0",
63
- "@elice/types": "^1.230629.0",
54
+ "@elice/icons": "^1.230814.0",
55
+ "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
56
+ "@elice/markdown": "^1.220815.0",
57
+ "@elice/material-shared-types": "1.230817.1",
58
+ "@elice/material-shared-utils": "1.230817.1",
59
+ "@elice/types": "^1.230815.0",
64
60
  "@types/classnames": "^2.3.1",
65
61
  "@types/jquery": "^3.5.13",
66
62
  "@types/jqueryui": "^1.12.16",
@@ -73,5 +69,5 @@
73
69
  "react-use": "^17.2.4",
74
70
  "styled-components": "^5.3.0"
75
71
  },
76
- "gitHead": "7a5377d83939215c5dfc543c867ffd59300710fe"
72
+ "gitHead": "93a18ac95c6242a4985f6dc35ca03028312bff71"
77
73
  }