@tinyweb_dev/oe-exam-sdk 0.2.0 → 0.2.2
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/dist/components/exams/take/components/QuestionRenderer.js +10 -2
- package/dist/components/exams/take/components/question-renderers/FindWordsInMatrixRenderer.d.ts +4 -0
- package/dist/components/exams/take/components/question-renderers/FindWordsInMatrixRenderer.js +389 -0
- package/dist/components/exams/take/components/question-renderers/MoversCrosswordPuzzleRenderer.d.ts +1 -1
- package/dist/components/exams/take/components/question-renderers/MoversCrosswordPuzzleRenderer.js +33 -7
- package/dist/components/exams/take/components/question-renderers/index.d.ts +1 -0
- package/dist/components/exams/take/components/question-renderers/index.js +1 -0
- package/dist/components/exams/take/types.d.ts +50 -0
- package/dist/components/exams/take/utils/question-transformers.d.ts +41 -1
- package/dist/components/exams/take/utils/question-transformers.js +24 -0
- package/dist/components/questions/_shared/config/question-types.config.js +6 -0
- package/dist/components/questions/_shared/types/find-words-in-matrix.type.d.ts +18 -0
- package/dist/components/questions/_shared/types/find-words-in-matrix.type.js +1 -0
- package/dist/components/questions/creator/question-type-registry.js +2 -0
- package/dist/components/questions/question-bank/QuestionEditorRenderer.d.ts +2 -1
- package/dist/components/questions/question-bank/QuestionEditorRenderer.js +16 -0
- package/dist/components/questions/types/crossword-puzzle/CrosswordPuzzleClient.js +10 -6
- package/dist/components/questions/types/find-words-in-matrix/FindWordsInMatrixClient.d.ts +9 -0
- package/dist/components/questions/types/find-words-in-matrix/FindWordsInMatrixClient.js +69 -0
- package/dist/components/questions/types/find-words-in-matrix/FindWordsInMatrixCreator.d.ts +8 -0
- package/dist/components/questions/types/find-words-in-matrix/FindWordsInMatrixCreator.js +302 -0
- package/dist/components/questions/types/find-words-in-matrix/index.d.ts +4 -0
- package/dist/components/questions/types/find-words-in-matrix/index.js +4 -0
- package/dist/components/questions/types/find-words-in-matrix/register.d.ts +2 -0
- package/dist/components/questions/types/find-words-in-matrix/register.js +29 -0
- package/dist/components/questions/types/find-words-in-matrix/transform.d.ts +2 -0
- package/dist/components/questions/types/find-words-in-matrix/transform.js +89 -0
- package/dist/shared/constants/question-skills.js +2 -0
- package/dist/shared/lib/utils/question-reverse-transform.js +63 -0
- package/dist/shared/lib/utils/question-transform.js +2 -0
- package/dist/shared/types/common.types.d.ts +1 -1
- package/dist/shared/types/questions/find-words-in-matrix.d.ts +71 -0
- package/dist/shared/types/questions/find-words-in-matrix.js +8 -0
- package/dist/shared/types/questions/index.d.ts +1 -0
- package/dist/shared/types/questions/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FIND_WORDS_IN_MATRIX Question Type Interfaces (SDK)
|
|
3
|
+
*
|
|
4
|
+
* Supported types:
|
|
5
|
+
* - 'WORD_BANK': Standard word search with given word bank (default).
|
|
6
|
+
* - 'CATEGORIZE': Word search where words are categorized under headings (e.g. Plants vs Animals).
|
|
7
|
+
*/
|
|
8
|
+
import { QuestionBankSettings } from './choose-the-correct-answer';
|
|
9
|
+
export type FindWordsInMatrixType = 'WORD_BANK' | 'CATEGORIZE';
|
|
10
|
+
export interface MatrixCellCoord {
|
|
11
|
+
row: number;
|
|
12
|
+
col: number;
|
|
13
|
+
}
|
|
14
|
+
export interface CategoryHeadingItem {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
color?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface WordBankItem {
|
|
20
|
+
id: string;
|
|
21
|
+
word: string;
|
|
22
|
+
isExample?: boolean;
|
|
23
|
+
categoryId?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ExampleSelection {
|
|
26
|
+
wordId: string;
|
|
27
|
+
categoryId?: string;
|
|
28
|
+
path: MatrixCellCoord[];
|
|
29
|
+
}
|
|
30
|
+
export interface FindWordsInMatrixContent {
|
|
31
|
+
type?: FindWordsInMatrixType;
|
|
32
|
+
title?: string;
|
|
33
|
+
gridSize: {
|
|
34
|
+
rows: number;
|
|
35
|
+
cols: number;
|
|
36
|
+
};
|
|
37
|
+
grid: string[][];
|
|
38
|
+
categories?: CategoryHeadingItem[];
|
|
39
|
+
wordBank: WordBankItem[];
|
|
40
|
+
exampleSelection?: ExampleSelection;
|
|
41
|
+
}
|
|
42
|
+
export interface CorrectWordItem {
|
|
43
|
+
wordId: string;
|
|
44
|
+
word?: string;
|
|
45
|
+
categoryId?: string;
|
|
46
|
+
path: MatrixCellCoord[];
|
|
47
|
+
}
|
|
48
|
+
export interface FindWordsInMatrixCorrectAnswer {
|
|
49
|
+
words: CorrectWordItem[];
|
|
50
|
+
caseSensitive?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface StudentWordSelectionItem {
|
|
53
|
+
wordId?: string;
|
|
54
|
+
word?: string;
|
|
55
|
+
categoryId?: string;
|
|
56
|
+
path: MatrixCellCoord[];
|
|
57
|
+
}
|
|
58
|
+
export interface FindWordsInMatrixAPIPayload {
|
|
59
|
+
id?: string;
|
|
60
|
+
questionType: 'FIND_WORDS_IN_MATRIX';
|
|
61
|
+
content: FindWordsInMatrixContent;
|
|
62
|
+
correctAnswer: FindWordsInMatrixCorrectAnswer;
|
|
63
|
+
points: number;
|
|
64
|
+
explanation?: string;
|
|
65
|
+
questionNumber: number;
|
|
66
|
+
partId?: string;
|
|
67
|
+
partNo?: number;
|
|
68
|
+
addToQuestionBank?: boolean;
|
|
69
|
+
questionBank?: QuestionBankSettings;
|
|
70
|
+
}
|
|
71
|
+
export type FindWordsInMatrixLocalStorage = Omit<FindWordsInMatrixAPIPayload, 'addToQuestionBank' | 'questionBank'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FIND_WORDS_IN_MATRIX Question Type Interfaces (SDK)
|
|
3
|
+
*
|
|
4
|
+
* Supported types:
|
|
5
|
+
* - 'WORD_BANK': Standard word search with given word bank (default).
|
|
6
|
+
* - 'CATEGORIZE': Word search where words are categorized under headings (e.g. Plants vs Animals).
|
|
7
|
+
*/
|
|
8
|
+
export {};
|