0.0.60 • Published 4 years ago
@riiid/www-pack v0.0.60
WWW-PACK
Core package renderer for Riiid's products
Why
- 대부분 객관식 시험의 형식은 비슷함
- 문제풀이 화면 제작에 많은 시간이 소요
- 핵심 문제풀이 뷰를 필요로하는 프로젝트 증가
- 관리의 편리성
- 새로운 시험영역에 빠른 확장
peerDependencies
- react
>=16.12.0
- react-dom
>=16.12.0
- react-lottie
>=1.2.3
- @riiid/santa-closet-web
>=0.0.12
Install
npm install @riiid/www-pack
or
yarn add @riiid/www-pack
Usage
import PackCore from '@riiid/www-pack';
const Example = () => {
const coreProps = {
isCompleted: boolean;
numberRange: number[];
content: {
id: string;
type: SectionType | string;
headers: ReadonlyArray<Paper>;
passages: ReadonlyArray<Paper>;
questions: ReadonlyArray<Paper>;
explanations: ReadonlyArray<Paper>;
}
history: {
[paperId]: {
sessionId: string;
sectionId: string;
originId: string;
paperId: string;
bookmark: boolean;
correctAnswer: string;
userAnswer: string;
eliminatedAnswers: string[];
}
};
selectAnswer?: (id: string, answer: string) => void;
deleteAnswer?: (id: string, answer: string) => void;
typingAnswer?: (id: string, answer: string) => void;
toggleBookmark?: (id: string, bookmark: boolean) => void;
};
return (
<div className="example">
<PackCore {...coreProps}/>
</div>
);
};
Types
Core
isCompleted: boolean;
numberRange: number[];
content: {
id: string;
type: SectionType | string;
headers: ReadonlyArray<Paper>;
passages: ReadonlyArray<Paper>;
questions: ReadonlyArray<Paper>;
explanations: ReadonlyArray<Paper>;
}
history: {
[paperId]: {
sessionId: string;
sectionId: string;
originId: string;
paperId: string;
bookmark: boolean;
correctAnswer: string;
userAnswer: string;
eliminatedAnswers: string[];
}
};
Handler
selectAnswer?: (id: string, answer: string) => void;
deleteAnswer?: (id: string, answer: string) => void;
typingAnswer?: (id: string, answer: string) => void;
toggleBookmark?: (id: string, bookmark: boolean) => void;
SectionType
MATH_CALCULATOR |
MATH_NO_CALCULATOR |
READING |
WRITING |
PART1 |
PART2 |
PART3 |
PART4 |
PART5 |
PART6 |
PART7
Paper
id: Scalars['ID'];
originId: Scalars['String'];
sectionId: Scalars['String'];
parentId?: Maybe<Scalars['String']>;
position: Scalars['Int'];
html: Scalars['String'];
text: Scalars['String'];
name: PaperName;
type: PaperType;
createdAt: Scalars['DateTime'];
updatedAt: Scalars['DateTime'];
children: ReadonlyArray<Paper>;
tags: ReadonlyArray<Tag>;
Maintainers
- @riiid/web
0.0.60
4 years ago
0.0.59
4 years ago
0.0.58
4 years ago
0.0.57
4 years ago
0.0.56
4 years ago
0.0.55
4 years ago
0.0.54
4 years ago
0.0.53
4 years ago
0.0.52
4 years ago
0.0.51
4 years ago
0.0.50
4 years ago
0.0.49
4 years ago
0.0.48
4 years ago
0.0.47
4 years ago
0.0.46
4 years ago
0.0.45
4 years ago
0.0.44
4 years ago
0.0.43
4 years ago
0.0.42
4 years ago
0.0.41
4 years ago
0.0.40
4 years ago
0.0.38
4 years ago
0.0.39
4 years ago
0.0.37
4 years ago
0.0.35
4 years ago
0.0.36
4 years ago
0.0.34
4 years ago
0.0.33
4 years ago
0.0.31
4 years ago
0.0.32
4 years ago
0.0.30
4 years ago
0.0.29
4 years ago
0.0.28
4 years ago
0.0.27
4 years ago
0.0.26
4 years ago
0.0.25
4 years ago
0.0.24-pre-alpha
4 years ago
0.0.23
4 years ago
0.0.22
4 years ago
0.0.21
4 years ago
0.0.20
4 years ago
0.0.19
4 years ago
0.0.18
4 years ago
0.0.16
4 years ago
0.0.17
4 years ago
0.0.15
4 years ago
0.0.13
4 years ago
0.0.14
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago