@sonhero/explanation-package 1.9.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 (175) hide show
  1. package/README.md +40 -0
  2. package/dist/Quiz.d.ts +7 -0
  3. package/dist/QuizComponent.d.ts +23 -0
  4. package/dist/button/ButtonCancelSubmit.d.ts +3 -0
  5. package/dist/button/ErrorMessage.d.ts +7 -0
  6. package/dist/button/SappButton.d.ts +4 -0
  7. package/dist/button/YourAnswer.d.ts +6 -0
  8. package/dist/checkbox/HookFormCheckBox.d.ts +19 -0
  9. package/dist/checkbox/HookFormCheckBoxGroup.d.ts +37 -0
  10. package/dist/checkbox/SAPPCheckbox.d.ts +14 -0
  11. package/dist/common/ArrowIcon.d.ts +9 -0
  12. package/dist/common/CommentList.d.ts +9 -0
  13. package/dist/common/EssayRender.d.ts +52 -0
  14. package/dist/common/ExhibitMovableWindow.d.ts +13 -0
  15. package/dist/common/ExhibitRender.d.ts +21 -0
  16. package/dist/common/Explanation.d.ts +12 -0
  17. package/dist/common/FileDisplay.d.ts +14 -0
  18. package/dist/common/HookClick.d.ts +7 -0
  19. package/dist/common/Icon.d.ts +8 -0
  20. package/dist/common/MovableWindow.d.ts +11 -0
  21. package/dist/common/MoveQuestionBar.d.ts +16 -0
  22. package/dist/common/SappIcon.d.ts +11 -0
  23. package/dist/common/TopicDisplay.d.ts +34 -0
  24. package/dist/components/ArrowIcon.d.ts +8 -0
  25. package/dist/components/ExhibitMovableWindow.d.ts +13 -0
  26. package/dist/components/ExhibitMovableWindowV2.d.ts +13 -0
  27. package/dist/components/ExhibitRender.d.ts +20 -0
  28. package/dist/components/FileDisplay.d.ts +15 -0
  29. package/dist/components/HookClick.d.ts +7 -0
  30. package/dist/components/Icon.d.ts +17 -0
  31. package/dist/components/MovableWindow.d.ts +11 -0
  32. package/dist/components/SappIcon.d.ts +11 -0
  33. package/dist/components/comment-list/commentList.styles.d.ts +1 -0
  34. package/dist/components/comment-list/index.d.ts +11 -0
  35. package/dist/components/comment-list-v2/commentListV2.styles.d.ts +1 -0
  36. package/dist/components/comment-list-v2/index.d.ts +14 -0
  37. package/dist/components/comment-modal/CommentModal.d.ts +9 -0
  38. package/dist/components/comment-modal/commentModal.styles.d.ts +1 -0
  39. package/dist/components/comment-modal/index.d.ts +2 -0
  40. package/dist/components/common/button/ButtonCancelSubmit.d.ts +3 -0
  41. package/dist/components/common/button/ErrorMessage.d.ts +7 -0
  42. package/dist/components/common/button/SappButton.d.ts +4 -0
  43. package/dist/components/common/button/YourAnswer.d.ts +6 -0
  44. package/dist/components/common/button/YourAnswerV2.d.ts +7 -0
  45. package/dist/components/common/checkbox/HookFormCheckBoxGroup.d.ts +37 -0
  46. package/dist/components/common/checkbox/SAPPCheckbox.d.ts +14 -0
  47. package/dist/components/common/checkboxV2/HookFormCheckBoxGroupV2.d.ts +37 -0
  48. package/dist/components/common/checkboxV2/SAPPCheckboxV2.d.ts +15 -0
  49. package/dist/components/common/common.styles.d.ts +1 -0
  50. package/dist/components/common/divider/Divider.d.ts +5 -0
  51. package/dist/components/common/divider/styles.d.ts +1 -0
  52. package/dist/components/common/modal/PopupViewPdf.d.ts +13 -0
  53. package/dist/components/common/modal/SappModal.d.ts +64 -0
  54. package/dist/components/common/modal/SappModalImage.d.ts +7 -0
  55. package/dist/components/common/modal/SappModalVideo.d.ts +7 -0
  56. package/dist/components/common/pdf/pdf-viewer.d.ts +5 -0
  57. package/dist/components/common/pdf/popupViewPdf.d.ts +8 -0
  58. package/dist/components/common/radiobutton/HookFormRadioGroup.d.ts +26 -0
  59. package/dist/components/common/radiobutton/SAPPRadio.d.ts +15 -0
  60. package/dist/components/common/radiobuttonV2/HookFormRadioGroupV2.d.ts +26 -0
  61. package/dist/components/common/radiobuttonV2/SAPPRadioV2.d.ts +15 -0
  62. package/dist/components/common/video/Player.d.ts +2 -0
  63. package/dist/components/common/video/SAPPVideo.d.ts +10 -0
  64. package/dist/components/common/video/video.styles.d.ts +1 -0
  65. package/dist/components/editor/EditorReader.d.ts +13 -0
  66. package/dist/components/essay-render/essayRender.styles.d.ts +1 -0
  67. package/dist/components/essay-render/index.d.ts +87 -0
  68. package/dist/components/essay-render-v2/essayRenderV2.styles.d.ts +1 -0
  69. package/dist/components/essay-render-v2/index.d.ts +96 -0
  70. package/dist/components/explanation/explanation.styles.d.ts +1 -0
  71. package/dist/components/explanation/index.d.ts +13 -0
  72. package/dist/components/explanationV2/index.d.ts +13 -0
  73. package/dist/components/grading-file/GradingFileDisplay.d.ts +10 -0
  74. package/dist/components/grading-file/ListGradingFile.d.ts +8 -0
  75. package/dist/components/icons/CloseIcon.d.ts +5 -0
  76. package/dist/components/icons/ResizeIcon.d.ts +5 -0
  77. package/dist/components/icons/UploadIcon.d.ts +2 -0
  78. package/dist/components/icons/index.d.ts +12 -0
  79. package/dist/components/list-question/ListQuestion.d.ts +13 -0
  80. package/dist/components/list-question/QuestionGrid.d.ts +21 -0
  81. package/dist/components/list-question/types.d.ts +14 -0
  82. package/dist/components/move-question-bar/index.d.ts +16 -0
  83. package/dist/components/move-question-bar/moveQuestionBar.styles.d.ts +1 -0
  84. package/dist/components/questionType/ConstructedQuestion.d.ts +19 -0
  85. package/dist/components/questionType/DragNDrop.d.ts +17 -0
  86. package/dist/components/questionType/FillText.d.ts +21 -0
  87. package/dist/components/questionType/MatchingQuestion.d.ts +18 -0
  88. package/dist/components/questionType/MultipleChoiceQuestion.d.ts +4 -0
  89. package/dist/components/questionType/OneChoiceQuestion.d.ts +19 -0
  90. package/dist/components/questionType/SelectWordQuestion.d.ts +28 -0
  91. package/dist/components/questionType/questionTypes.styles.d.ts +1 -0
  92. package/dist/components/quiz-component/index.d.ts +25 -0
  93. package/dist/components/quiz-component/quizComponent.styles.d.ts +1 -0
  94. package/dist/components/quiz-component-v2/index.d.ts +29 -0
  95. package/dist/components/quiz-component-v2/questionTypeV2/ConstructedQuestionV2.d.ts +22 -0
  96. package/dist/components/quiz-component-v2/questionTypeV2/DragNDrop.d.ts +18 -0
  97. package/dist/components/quiz-component-v2/questionTypeV2/FillText.d.ts +21 -0
  98. package/dist/components/quiz-component-v2/questionTypeV2/MatchQuiz/CustomEdge.d.ts +4 -0
  99. package/dist/components/quiz-component-v2/questionTypeV2/MatchQuiz/CustomFlow.d.ts +11 -0
  100. package/dist/components/quiz-component-v2/questionTypeV2/MatchQuiz/CustomNode.d.ts +9 -0
  101. package/dist/components/quiz-component-v2/questionTypeV2/MatchQuiz/index.d.ts +22 -0
  102. package/dist/components/quiz-component-v2/questionTypeV2/MultipleChoiceQuestion.d.ts +4 -0
  103. package/dist/components/quiz-component-v2/questionTypeV2/OneChoiceQuestion.d.ts +19 -0
  104. package/dist/components/quiz-component-v2/questionTypeV2/SelectWordQuestion.d.ts +21 -0
  105. package/dist/components/quiz-component-v2/questionTypeV2/questionTypes.styles.d.ts +1 -0
  106. package/dist/components/quiz-component-v2/quizComponentV2.styles.d.ts +1 -0
  107. package/dist/components/render-view/AIComment.d.ts +10 -0
  108. package/dist/components/render-view/MarkdownRender.d.ts +10 -0
  109. package/dist/components/render-view/ModalPreviewFile.d.ts +11 -0
  110. package/dist/components/styles.d.ts +1 -0
  111. package/dist/components/topic-display/index.d.ts +34 -0
  112. package/dist/components/topic-display/topicDisplay.styles.d.ts +1 -0
  113. package/dist/constant/icon.d.ts +3 -0
  114. package/dist/constant/index.d.ts +313 -0
  115. package/dist/contexts/index.d.ts +10 -0
  116. package/dist/conts/index.d.ts +273 -0
  117. package/dist/editor/EditorReader.d.ts +13 -0
  118. package/dist/editor/HookFormEditor.d.ts +22 -0
  119. package/dist/editor/editor.d.ts +18 -0
  120. package/dist/hooks/HookClick.d.ts +7 -0
  121. package/dist/hooks/useCommentMobileView.d.ts +3 -0
  122. package/dist/hooks/useListQuestionColumnsPerRow.d.ts +4 -0
  123. package/dist/hooks/useMousePosition.d.ts +5 -0
  124. package/dist/hooks/useTailwindBreakpoint.d.ts +17 -0
  125. package/dist/icons/CloseIcon.d.ts +4 -0
  126. package/dist/icons/UploadIcon.d.ts +2 -0
  127. package/dist/index.css +12 -0
  128. package/dist/index.d.ts +19 -0
  129. package/dist/index.js +7685 -0
  130. package/dist/index.js.map +1 -0
  131. package/dist/index.modern.js +7681 -0
  132. package/dist/index.modern.js.map +1 -0
  133. package/dist/index.test.d.ts +1 -0
  134. package/dist/modal/PopupViewPdf.d.ts +8 -0
  135. package/dist/modal/SappModal.d.ts +64 -0
  136. package/dist/modal/SappModalImage.d.ts +7 -0
  137. package/dist/modal/SappModalVideo.d.ts +7 -0
  138. package/dist/pdf/pdf-viewer.d.ts +4 -0
  139. package/dist/pdf/popupViewPdf.d.ts +8 -0
  140. package/dist/questionType/ConstructedQuestion.d.ts +19 -0
  141. package/dist/questionType/DragNDrop.d.ts +17 -0
  142. package/dist/questionType/FillText.d.ts +21 -0
  143. package/dist/questionType/MatchingQuestion.d.ts +18 -0
  144. package/dist/questionType/MultipleChoiceQuestion.d.ts +4 -0
  145. package/dist/questionType/OneChoiceQuestion.d.ts +19 -0
  146. package/dist/questionType/SelectWordQuestion.d.ts +28 -0
  147. package/dist/radiobutton/HookFormRadioGroup.d.ts +26 -0
  148. package/dist/radiobutton/SAPPRadio.d.ts +15 -0
  149. package/dist/style.d.ts +1 -0
  150. package/dist/styles/base/colors.d.ts +1 -0
  151. package/dist/styles/base/typography.d.ts +1 -0
  152. package/dist/styles/base/utils.d.ts +1 -0
  153. package/dist/styles/global-styles.d.ts +1 -0
  154. package/dist/styles/index.d.ts +1 -0
  155. package/dist/styles/legacy/button.d.ts +1 -0
  156. package/dist/styles/legacy/caret.d.ts +1 -0
  157. package/dist/styles/legacy/condition.d.ts +1 -0
  158. package/dist/styles/legacy/custom-style.d.ts +1 -0
  159. package/dist/styles/legacy/editor-wrap.d.ts +1 -0
  160. package/dist/styles/legacy/fortune.d.ts +1 -0
  161. package/dist/styles/legacy/lucky-sheet.d.ts +1 -0
  162. package/dist/styles/legacy/resizable.d.ts +1 -0
  163. package/dist/styles/legacy/sapp-custom.d.ts +1 -0
  164. package/dist/styles/legacy/stream-player.d.ts +1 -0
  165. package/dist/styles/legacy/tailwind.d.ts +1 -0
  166. package/dist/styles/legacy/tooltip.d.ts +1 -0
  167. package/dist/styles/list-question/listQuestion.styles.d.ts +1 -0
  168. package/dist/styles/react-flow-styled.d.ts +1 -0
  169. package/dist/utils/dragandresize.d.ts +6 -0
  170. package/dist/utils/graded.d.ts +48 -0
  171. package/dist/utils/icons.d.ts +9 -0
  172. package/dist/utils/index.d.ts +24 -0
  173. package/dist/video/Player.d.ts +2 -0
  174. package/dist/video/SAPPVideo.d.ts +13 -0
  175. package/package.json +99 -0
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # explanation package
2
+
3
+ > Made with create-react-library
4
+
5
+ [![NPM](https://img.shields.io/npm/v/examination.svg)](https://www.npmjs.com/package/examination) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6
+
7
+ ## Setup
8
+ ```bash
9
+ yarn global add yalc
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ```bash
15
+ # In explanation-package
16
+ yarn
17
+ yarn build
18
+
19
+ yalc publish # Push package to yalc store
20
+ nodemon -x 'yalc push' ## watch for change
21
+ yarn start
22
+
23
+ # In targeted app
24
+ yalc add --link explanation-package
25
+
26
+ # add to .gitignore
27
+ # .yalc
28
+ .yalc
29
+ yalc.lock
30
+ ```
31
+
32
+ ## Unlink package
33
+ ```bash
34
+ # In targeted app
35
+ yarn remove explanation-package
36
+ ```
37
+
38
+ ## License
39
+
40
+ MIT © [](https://github.com/)
package/dist/Quiz.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { IQuestion } from './conts';
3
+ declare type Props = {
4
+ questions: IQuestion[];
5
+ };
6
+ declare const Quiz: ({ questions }: Props) => React.JSX.Element;
7
+ export default Quiz;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { FieldValues, UseFormReset } from 'react-hook-form';
3
+ export declare type QuizComponentRef = {
4
+ onSubmit: ({ activityId, tabId, quizId, then }: {
5
+ activityId: string;
6
+ tabId: string;
7
+ quizId: string;
8
+ then?: (e: any) => void;
9
+ }) => void;
10
+ reset: UseFormReset<FieldValues>;
11
+ };
12
+ declare type Props = {
13
+ activeQuestion?: any;
14
+ document_id: string;
15
+ handleDownload: (param: any) => void;
16
+ getActiveQuestion: (id: string) => Promise<void>;
17
+ topic?: any;
18
+ };
19
+ declare const QuizComponent: {
20
+ ({ activeQuestion, document_id, handleDownload, getActiveQuestion, topic }: Props): React.JSX.Element;
21
+ displayName: string;
22
+ };
23
+ export default QuizComponent;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ButtonCancelSubmit: ({ submit, cancel, className, color, colorCancel, showOkButton, showCancelButton, revertFunction }: any) => React.JSX.Element;
3
+ export default ButtonCancelSubmit;
@@ -0,0 +1,7 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface IProps {
3
+ className?: string;
4
+ children: ReactNode;
5
+ }
6
+ declare const ErrorMessage: ({ className, children }: IProps) => React.JSX.Element;
7
+ export default ErrorMessage;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IButtonProps } from '../conts';
3
+ declare const SappButton: ({ title, onClick, className, link, size, full, disabled, loading, type, color, isUnderLine, isPadding, childClass }: IButtonProps) => React.JSX.Element;
4
+ export default SappButton;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ show: boolean;
4
+ };
5
+ declare const YourAnswer: ({ show }: Props) => React.JSX.Element;
6
+ export default YourAnswer;
@@ -0,0 +1,19 @@
1
+ import { Control } from 'react-hook-form';
2
+ import React from 'react';
3
+ interface IHookFormCheckBoxProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ defaultValue?: string | boolean;
7
+ title?: string;
8
+ className?: string;
9
+ onChange?: React.ChangeEventHandler<any>;
10
+ checked?: string | boolean;
11
+ label?: string | undefined;
12
+ required?: boolean;
13
+ disabled?: boolean;
14
+ classNameTitle?: string;
15
+ state?: 'default' | 'error' | 'success';
16
+ size?: 'small' | 'medium' | 'lager';
17
+ }
18
+ declare const HookFormCheckBox: ({ name, control, defaultValue, title, className, onChange, checked, disabled, classNameTitle, size, state }: IHookFormCheckBoxProps) => React.JSX.Element;
19
+ export default HookFormCheckBox;
@@ -0,0 +1,37 @@
1
+ import { Control } from 'react-hook-form';
2
+ import React from 'react';
3
+ interface IHookFormCheckBoxProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ defaultValue?: string | boolean;
7
+ title?: string;
8
+ className?: string;
9
+ onChange?: (e: any) => void;
10
+ checked?: string | boolean;
11
+ isWrong?: boolean;
12
+ label?: string | undefined;
13
+ required?: boolean;
14
+ disabled?: boolean;
15
+ classNameTitle?: string;
16
+ options: Array<{
17
+ label?: string;
18
+ value: string | boolean;
19
+ description?: string;
20
+ }>;
21
+ direction?: 'horizontal' | 'vertical';
22
+ gap?: string;
23
+ justify?: 'between' | 'start' | 'center' | 'end';
24
+ multiple?: boolean;
25
+ state?: 'default' | 'error' | 'success';
26
+ size?: 'small' | 'medium' | 'lager';
27
+ corrects?: {
28
+ [key: string]: boolean;
29
+ };
30
+ toggle?: boolean;
31
+ positionCheckBox?: 'start' | 'center' | 'bottom';
32
+ lowerOptions?: boolean;
33
+ seprateLine?: boolean;
34
+ widthOptions?: string;
35
+ }
36
+ declare const HookFormCheckBoxGroup: ({ name, control, defaultValue, title, className, onChange, checked, isWrong, disabled, classNameTitle, options, direction, gap, justify, multiple, size, state, corrects, toggle, positionCheckBox, lowerOptions, seprateLine, widthOptions }: IHookFormCheckBoxProps) => React.JSX.Element;
37
+ export default HookFormCheckBoxGroup;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ checked: boolean;
4
+ disabled?: boolean;
5
+ onChange: React.ChangeEventHandler<HTMLInputElement>;
6
+ className?: string;
7
+ name?: string;
8
+ value?: string | boolean;
9
+ state?: 'default' | 'error' | 'success' | 'primary';
10
+ size?: 'small' | 'medium' | 'lager';
11
+ lowerOptions?: boolean;
12
+ }
13
+ declare const SAPPCheckbox: ({ checked, disabled, onChange, className, value, state, size, lowerOptions }: IProps) => React.JSX.Element;
14
+ export default SAPPCheckbox;
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface Props {
3
+ className?: string;
4
+ iconType?: 'chervon' | 'teeny';
5
+ right?: boolean;
6
+ children?: ReactNode;
7
+ }
8
+ declare const ArrowIcon: ({ className, iconType, right }: Props) => React.JSX.Element;
9
+ export default ArrowIcon;
@@ -0,0 +1,9 @@
1
+ import React, { RefObject } from 'react';
2
+ import { ICommment } from '../conts';
3
+ interface IProps {
4
+ data?: ICommment;
5
+ editorRef?: RefObject<HTMLElement>;
6
+ commentRef?: RefObject<HTMLElement>;
7
+ }
8
+ declare const CommentList: ({ data, editorRef, commentRef }: IProps) => React.JSX.Element;
9
+ export default CommentList;
@@ -0,0 +1,52 @@
1
+ import React, { Dispatch, RefObject, SetStateAction } from 'react';
2
+ import { ICommment, IFile, IFileAnswer, IRequirement } from '../conts';
3
+ interface IProps {
4
+ activeQuestion: {
5
+ question_topic: {
6
+ files: IFile[];
7
+ };
8
+ requirements: IRequirement[];
9
+ exhibits: {
10
+ id: string;
11
+ description: string;
12
+ name: string;
13
+ files: IFile[];
14
+ }[];
15
+ short_answer: string | any;
16
+ answer_file: IFileAnswer;
17
+ question_content: string;
18
+ requirement_answers?: Array<any>;
19
+ grading_method?: string;
20
+ };
21
+ handleShowListRequirement: (e: any) => void;
22
+ showRequirement?: IRequirement | null;
23
+ showListRequirement: boolean;
24
+ handleShowRequirement: ({ description, index, name, files, explanation, answer_template_files }: {
25
+ description: string;
26
+ index: number;
27
+ name: string;
28
+ files: IFile[];
29
+ explanation: string;
30
+ answer_template_files?: string[];
31
+ }) => void;
32
+ setOpenPdf: Dispatch<SetStateAction<{
33
+ status: boolean;
34
+ url: string;
35
+ } | undefined>>;
36
+ handleShowExhibit: (data: {
37
+ id: string;
38
+ description: string;
39
+ index: number;
40
+ name: string;
41
+ files: IFile[];
42
+ }, e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
43
+ controlAnswer: any;
44
+ listRequirementRef: RefObject<HTMLDivElement>;
45
+ comment?: ICommment;
46
+ commentRef?: RefObject<HTMLDivElement>;
47
+ editorRef?: RefObject<HTMLDivElement>;
48
+ bodyRef?: RefObject<HTMLDivElement>;
49
+ submitted?: string;
50
+ }
51
+ declare const EssayRender: ({ activeQuestion, handleShowListRequirement, showListRequirement, showRequirement, handleShowRequirement, setOpenPdf, handleShowExhibit, controlAnswer, listRequirementRef, comment, commentRef, editorRef, bodyRef, submitted }: IProps) => React.JSX.Element;
52
+ export default EssayRender;
@@ -0,0 +1,13 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import { IShowExhibit } from '../conts';
3
+ interface IProps {
4
+ showExhibit: IShowExhibit;
5
+ setOpenPdf: Dispatch<SetStateAction<{
6
+ status: boolean;
7
+ url: string;
8
+ } | undefined>>;
9
+ setShowExhibit: Dispatch<SetStateAction<IShowExhibit | undefined>>;
10
+ exhibitText: string;
11
+ }
12
+ declare const ExhibitMovableWindow: ({ showExhibit, setOpenPdf, setShowExhibit, exhibitText }: IProps) => React.JSX.Element;
13
+ export default ExhibitMovableWindow;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { IFile } from '../conts';
3
+ interface IProps {
4
+ exhibits: Array<{
5
+ created_at: Date;
6
+ description: string;
7
+ files: IFile[];
8
+ id: string;
9
+ name: string;
10
+ }>;
11
+ handleShowExhibit: (params: {
12
+ id: string;
13
+ description: string;
14
+ index: number;
15
+ name: string;
16
+ files: IFile[];
17
+ }, event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
18
+ exhibitText: string;
19
+ }
20
+ declare const ExhibitRender: ({ exhibits, handleShowExhibit, exhibitText }: IProps) => React.JSX.Element;
21
+ export default ExhibitRender;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { IRequirement } from '../conts';
3
+ interface IProps {
4
+ activeQuestion: {
5
+ solution?: string;
6
+ confirmed?: boolean;
7
+ };
8
+ explanationTitle?: string;
9
+ showRequirement?: IRequirement | null;
10
+ }
11
+ declare const Explanation: ({ activeQuestion, explanationTitle, showRequirement }: IProps) => React.JSX.Element;
12
+ export default Explanation;
@@ -0,0 +1,14 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ interface IProps {
3
+ title?: string;
4
+ fileName?: string;
5
+ key?: number | string;
6
+ url?: string;
7
+ setOpenPdf?: Dispatch<SetStateAction<{
8
+ status: boolean;
9
+ url: string;
10
+ } | undefined>>;
11
+ isDownloadFile?: boolean;
12
+ }
13
+ declare const FileDisplay: ({ setOpenPdf, fileName, key, title, url, isDownloadFile }: IProps) => React.JSX.Element;
14
+ export default FileDisplay;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface ClickOutsideProps {
3
+ ref: React.RefObject<HTMLElement>;
4
+ callback: () => void;
5
+ }
6
+ declare const useClickOutside: ({ ref, callback }: ClickOutsideProps) => void;
7
+ export default useClickOutside;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type IconsPros = {
3
+ type?: string;
4
+ className?: string;
5
+ };
6
+ export default function Icon({ type, className }: IconsPros): import("react").JSX.Element;
7
+ export declare const TimeIcon: () => import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ children?: any;
4
+ getResize?: (data: any) => void;
5
+ position?: any;
6
+ onClick?: any;
7
+ zIndex?: number;
8
+ className?: string;
9
+ }
10
+ declare const MovableWindow: ({ children, getResize, position, onClick, zIndex, className }: IProps) => React.JSX.Element;
11
+ export default MovableWindow;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ activeQuestion: {
4
+ total_question: number;
5
+ index: string;
6
+ previous: {
7
+ id: string;
8
+ };
9
+ next: {
10
+ id: string;
11
+ };
12
+ };
13
+ getActiveQuestion: (id: string) => Promise<void>;
14
+ }
15
+ declare const MoveQuestionBar: ({ activeQuestion, getActiveQuestion }: IProps) => React.JSX.Element;
16
+ export default MoveQuestionBar;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ declare type iconType = 'camera' | 'course_text' | 'course_video' | 'course_video_timeline' | 'arrow_left' | 'arrow_right' | 'arrow_down' | 'x';
3
+ declare type SAPP_ICONS_TYPE = {
4
+ [key in iconType]: React.ReactNode;
5
+ };
6
+ declare type Props = {
7
+ icon: keyof SAPP_ICONS_TYPE;
8
+ className?: string;
9
+ };
10
+ declare const SappIcon: ({ icon, className }: Props) => React.JSX.Element;
11
+ export default SappIcon;
@@ -0,0 +1,34 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import { IFile } from '../conts';
3
+ interface Exhibit {
4
+ created_at: Date;
5
+ description: string;
6
+ files: IFile[];
7
+ id: string;
8
+ name: string;
9
+ }
10
+ interface IProps {
11
+ activeQuestion: {
12
+ question_topic?: {
13
+ description: string;
14
+ files: IFile[];
15
+ exhibits: Array<Exhibit>;
16
+ };
17
+ exhibits?: Array<Exhibit>;
18
+ };
19
+ isTwoColumn?: boolean;
20
+ setOpenPdf: Dispatch<SetStateAction<{
21
+ status: boolean;
22
+ url: string;
23
+ } | undefined>>;
24
+ handleShowExhibit: (params: {
25
+ id: string;
26
+ description: string;
27
+ index: number;
28
+ name: string;
29
+ files: IFile[];
30
+ }, event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
31
+ exhibitText: string;
32
+ }
33
+ declare const TopicDisplay: ({ activeQuestion, setOpenPdf, handleShowExhibit, isTwoColumn, exhibitText }: IProps) => React.JSX.Element;
34
+ export default TopicDisplay;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ className?: string;
4
+ iconType?: 'chervon' | 'teeny';
5
+ right?: boolean;
6
+ }
7
+ declare const ArrowIcon: ({ className, iconType, right }: Props) => React.JSX.Element;
8
+ export default ArrowIcon;
@@ -0,0 +1,13 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import { IShowExhibit } from '../constant';
3
+ interface IProps {
4
+ showExhibit: IShowExhibit;
5
+ setOpenPdf: Dispatch<SetStateAction<{
6
+ status: boolean;
7
+ url: string;
8
+ } | undefined>>;
9
+ setShowExhibit: Dispatch<SetStateAction<IShowExhibit | undefined>>;
10
+ exhibitText: string;
11
+ }
12
+ declare const ExhibitMovableWindow: ({ showExhibit, setOpenPdf, setShowExhibit, exhibitText }: IProps) => React.JSX.Element;
13
+ export default ExhibitMovableWindow;
@@ -0,0 +1,13 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import { IShowExhibit } from '../constant';
3
+ interface IProps {
4
+ showExhibit: IShowExhibit;
5
+ setOpenPdf: Dispatch<SetStateAction<{
6
+ status: boolean;
7
+ url: string;
8
+ } | undefined>>;
9
+ setShowExhibit: Dispatch<SetStateAction<IShowExhibit | undefined>>;
10
+ exhibitText: string;
11
+ }
12
+ declare const ExhibitMovableWindowV2: ({ showExhibit, setOpenPdf, setShowExhibit, exhibitText }: IProps) => React.JSX.Element;
13
+ export default ExhibitMovableWindowV2;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { IFile } from '../constant';
3
+ interface IProps {
4
+ exhibits: Array<{
5
+ description: string;
6
+ files: IFile[];
7
+ id: string;
8
+ name: string;
9
+ }>;
10
+ handleShowExhibit: (params: {
11
+ id: string;
12
+ description: string;
13
+ index: number;
14
+ name: string;
15
+ files: IFile[];
16
+ }, event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
17
+ exhibitText: string;
18
+ }
19
+ declare const ExhibitRender: ({ exhibits, handleShowExhibit, exhibitText }: IProps) => React.JSX.Element;
20
+ export default ExhibitRender;
@@ -0,0 +1,15 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ interface IProps {
3
+ title?: string;
4
+ fileName?: string;
5
+ key?: number | string;
6
+ url?: string;
7
+ setOpenPdf?: Dispatch<SetStateAction<{
8
+ status: boolean;
9
+ url: string;
10
+ name?: string;
11
+ } | undefined>>;
12
+ isDownloadFile?: boolean;
13
+ }
14
+ declare const FileDisplay: ({ setOpenPdf, fileName, key, title, url, isDownloadFile }: IProps) => React.JSX.Element;
15
+ export default FileDisplay;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface ClickOutsideProps {
3
+ ref: React.RefObject<HTMLElement>;
4
+ callback: () => void;
5
+ }
6
+ declare const useClickOutside: ({ ref, callback }: ClickOutsideProps) => void;
7
+ export default useClickOutside;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ declare type IconsPros = {
3
+ type?: string;
4
+ className?: string;
5
+ };
6
+ export default function Icon({ type, className }: IconsPros): React.JSX.Element;
7
+ export declare const TimeIcon: () => React.JSX.Element;
8
+ export declare const CollapseArrowIcon: React.MemoExoticComponent<({ selected, className }: {
9
+ selected?: boolean | undefined;
10
+ className?: string | undefined;
11
+ }) => React.JSX.Element>;
12
+ export declare const LoadingIcon: ({ loading, loadingPercentage, stroke }: {
13
+ loading?: boolean | undefined;
14
+ loadingPercentage?: number | undefined;
15
+ stroke?: "#ffffff" | "#404041" | undefined;
16
+ }) => React.JSX.Element;
17
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ children?: any;
4
+ getResize?: (data: any) => void;
5
+ position?: any;
6
+ onClick?: any;
7
+ zIndex?: number;
8
+ className?: string;
9
+ }
10
+ declare const MovableWindow: ({ children, getResize, position, onClick, zIndex, className }: IProps) => React.JSX.Element;
11
+ export default MovableWindow;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ declare type iconType = 'camera' | 'course_text' | 'course_video' | 'course_video_timeline' | 'arrow_left' | 'arrow_right' | 'arrow_down' | 'x';
3
+ declare type SAPP_ICONS_TYPE = {
4
+ [key in iconType]: React.ReactNode;
5
+ };
6
+ declare type Props = {
7
+ icon: keyof SAPP_ICONS_TYPE;
8
+ className?: string;
9
+ };
10
+ declare const SappIcon: ({ icon, className }: Props) => React.JSX.Element;
11
+ export default SappIcon;
@@ -0,0 +1 @@
1
+ export declare const commentListStyles: import("styled-components").FlattenSimpleInterpolation;
@@ -0,0 +1,11 @@
1
+ import React, { RefObject } from 'react';
2
+ import { ICommment } from 'constant';
3
+ interface IProps {
4
+ data?: ICommment;
5
+ editorRef?: RefObject<HTMLElement>;
6
+ commentRef?: RefObject<HTMLDivElement>;
7
+ className?: string;
8
+ overlayClassName?: string;
9
+ }
10
+ declare const CommentList: ({ data, editorRef, commentRef, className, overlayClassName }: IProps) => React.JSX.Element;
11
+ export default CommentList;
@@ -0,0 +1 @@
1
+ export declare const commentListStylesV2: import("styled-components").FlattenSimpleInterpolation;
@@ -0,0 +1,14 @@
1
+ import React, { RefObject } from 'react';
2
+ import { ICommment } from 'constant';
3
+ interface IProps {
4
+ data?: ICommment;
5
+ editorRef?: RefObject<HTMLElement>;
6
+ commentRef?: RefObject<HTMLDivElement>;
7
+ className?: string;
8
+ overlayClassName?: string;
9
+ activeCommentId?: string | null;
10
+ setActiveCommentId: React.Dispatch<React.SetStateAction<string | null>>;
11
+ setOpenComment?: (status: boolean) => void;
12
+ }
13
+ declare const CommentListV2: ({ data, editorRef, commentRef, className, overlayClassName, activeCommentId, setActiveCommentId, setOpenComment, }: IProps) => React.JSX.Element;
14
+ export default CommentListV2;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { GradingDetail } from 'constant';
3
+ export interface CommentModalProps {
4
+ open: boolean;
5
+ detail: GradingDetail | null;
6
+ onClose: () => void;
7
+ }
8
+ declare const CommentModal: ({ open, detail }: CommentModalProps) => React.JSX.Element | null;
9
+ export default CommentModal;
@@ -0,0 +1 @@
1
+ export declare const commentModalStyles: import("styled-components").FlattenSimpleInterpolation;
@@ -0,0 +1,2 @@
1
+ export { default as CommentModal } from './CommentModal';
2
+ export type { CommentModalProps } from './CommentModal';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ButtonCancelSubmit: ({ submit, cancel, className, color, colorCancel, showOkButton, showCancelButton, revertFunction }: any) => React.JSX.Element;
3
+ export default ButtonCancelSubmit;
@@ -0,0 +1,7 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface IProps {
3
+ className?: string;
4
+ children: ReactNode;
5
+ }
6
+ declare const ErrorMessage: ({ className, children }: IProps) => React.JSX.Element;
7
+ export default ErrorMessage;
@@ -0,0 +1,4 @@
1
+ import { IButtonProps } from 'constant';
2
+ import React from 'react';
3
+ declare const SappButton: ({ title, onClick, className, link, size, full, disabled, loading, type, color, isUnderLine, isPadding, childClass }: IButtonProps) => React.JSX.Element;
4
+ export default SappButton;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ show: boolean;
4
+ };
5
+ declare const YourAnswer: ({ show }: Props) => React.JSX.Element;
6
+ export default YourAnswer;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ show: boolean;
4
+ className?: string;
5
+ };
6
+ declare const YourAnswerV2: ({ show, className }: Props) => React.JSX.Element;
7
+ export default YourAnswerV2;