catchup-library-web 1.0.0 → 1.0.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/index.d.mts +239 -2
- package/dist/index.d.ts +239 -2
- package/dist/index.js +4686 -2
- package/dist/index.mjs +4621 -1
- package/package.json +10 -2
- package/src/components/activities/DropdownActivityContent.tsx +73 -0
- package/src/components/activities/FillInTheBlanksActivityContent.tsx +102 -0
- package/src/components/activities/GroupingActivityContent.tsx +62 -0
- package/src/components/activities/MCMAActivityContent.tsx +65 -0
- package/src/components/activities/MCSAActivityContent.tsx +58 -0
- package/src/components/activities/MatchingActivityContent.tsx +57 -0
- package/src/components/activities/OpenEndedActivityContent.tsx +92 -0
- package/src/components/activities/OrderingActivityContent.tsx +59 -0
- package/src/components/activities/TrueFalseActivityContent.tsx +98 -0
- package/src/components/activities/body-content/ActivityBodyContent.tsx +108 -0
- package/src/components/activities/body-content/ShowBodyMediaByContentType.tsx +404 -0
- package/src/components/activities/empty-content/ActivityEmptyContent.tsx +15 -0
- package/src/components/activities/material-content/DropdownActivityMaterialContent.tsx +227 -0
- package/src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx +270 -0
- package/src/components/activities/material-content/GroupingActivityMaterialContent.tsx +359 -0
- package/src/components/activities/material-content/MCMAActivityMaterialContent.tsx +166 -0
- package/src/components/activities/material-content/MCSAActivityMaterialContent.tsx +165 -0
- package/src/components/activities/material-content/MatchingActivityMaterialContent.tsx +332 -0
- package/src/components/activities/material-content/OpenEndedActivityMaterialContent.tsx +818 -0
- package/src/components/activities/material-content/OrderingActivityMaterialContent.tsx +216 -0
- package/src/components/activities/material-content/ShowMaterialMediaByContentType.tsx +172 -0
- package/src/components/activities/material-content/TrueFalseActivityMaterialContent.tsx +217 -0
- package/src/components/activities/solution-content/ActivitySolutionContent.tsx +86 -0
- package/src/components/dividers/BlueVerticalDividerLine.tsx +13 -0
- package/src/components/dividers/DividerLine.tsx +5 -0
- package/src/components/dividers/VerticalDividerLine.tsx +5 -0
- package/src/components/dnds/DraggableDroppableItem.tsx +62 -0
- package/src/components/dnds/DraggableItem.tsx +41 -0
- package/src/components/dnds/DroppableItem.tsx +38 -0
- package/src/components/dropdowns/MediaDropdown.tsx +51 -0
- package/src/components/groups/InputGroup.tsx +330 -0
- package/src/hooks/useScreenSize.ts +40 -0
- package/src/index.ts +24 -0
- package/src/language/i18n.ts +10 -0
- package/src/properties/ActivityProperties.ts +204 -0
- package/src/properties/ButtonProperties.ts +1 -1
- package/src/properties/CommonProperties.ts +1 -1
- package/src/properties/DividerLineProperties.ts +3 -0
- package/src/properties/DnDProperties.ts +28 -0
- package/src/properties/DropdownProperties.ts +5 -0
- package/src/properties/EnumProperties.ts +11 -0
- package/src/properties/GroupProperties.ts +19 -0
- package/src/utilization/AppUtilization.ts +56 -0
- package/src/utilization/CatchtivityUtilization.ts +1566 -0
- package/src/utilization/StorageUtilization.ts +35 -0
- package/tsconfig.json +2 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
export interface IInputPart {
|
|
2
|
+
value: string;
|
|
3
|
+
isBold: boolean;
|
|
4
|
+
isUnderline: boolean;
|
|
5
|
+
isEquation: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IShowBodyMediaByContentTypeProps {
|
|
9
|
+
index: number;
|
|
10
|
+
type: string;
|
|
11
|
+
value: string;
|
|
12
|
+
size: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IActivityBodyContentProps {
|
|
16
|
+
templateType: string;
|
|
17
|
+
bodyMap: any;
|
|
18
|
+
contentMap?: any;
|
|
19
|
+
answerMap?: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IOrderingActivityProps {
|
|
23
|
+
answer: any;
|
|
24
|
+
data: any;
|
|
25
|
+
canAnswerQuestion: () => boolean;
|
|
26
|
+
changeAnswer: (e: any) => void;
|
|
27
|
+
isPreview: boolean;
|
|
28
|
+
showCorrectAnswer: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IOrderingActivityMaterialProps {
|
|
32
|
+
uniqueValue: string;
|
|
33
|
+
answer: any;
|
|
34
|
+
materialMap: any;
|
|
35
|
+
contentMap: any;
|
|
36
|
+
checkCanAnswerQuestion: () => boolean;
|
|
37
|
+
onChange: (e1: any, e2: any, e3: any) => void;
|
|
38
|
+
isPreview: boolean;
|
|
39
|
+
showCorrectAnswer: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IDropdownActivityProps {
|
|
43
|
+
answer: any;
|
|
44
|
+
data: any;
|
|
45
|
+
canAnswerQuestion: () => boolean;
|
|
46
|
+
changeAnswer: (e: any) => void;
|
|
47
|
+
isPreview: boolean;
|
|
48
|
+
showCorrectAnswer: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface IDropdownActivityMaterialProps {
|
|
52
|
+
uniqueValue: string;
|
|
53
|
+
answer: any;
|
|
54
|
+
materialMap: any;
|
|
55
|
+
contentMap: any;
|
|
56
|
+
checkCanAnswerQuestion: () => boolean;
|
|
57
|
+
onChange: (e1: any, e2: any, e3: string) => void;
|
|
58
|
+
isPreview: boolean;
|
|
59
|
+
showCorrectAnswer: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface IMCSAActivityProps {
|
|
63
|
+
answer: any;
|
|
64
|
+
data: any;
|
|
65
|
+
canAnswerQuestion: () => boolean;
|
|
66
|
+
changeAnswer: (e: any) => void;
|
|
67
|
+
isPreview: boolean;
|
|
68
|
+
showCorrectAnswer: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface IMCSAActivityMaterialProps {
|
|
72
|
+
uniqueValue: string;
|
|
73
|
+
answer: any;
|
|
74
|
+
materialMap: any;
|
|
75
|
+
contentMap: any;
|
|
76
|
+
checkCanAnswerQuestion: () => boolean;
|
|
77
|
+
onChange: (e1: any, e2: any, e3: string) => void;
|
|
78
|
+
isPreview: boolean;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface IMCMAActivityProps {
|
|
82
|
+
answer: any;
|
|
83
|
+
data: any;
|
|
84
|
+
canAnswerQuestion: () => boolean;
|
|
85
|
+
changeAnswer: (e: any) => void;
|
|
86
|
+
isPreview: boolean;
|
|
87
|
+
showCorrectAnswer: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface IMCMAActivityMaterialProps {
|
|
91
|
+
uniqueValue: string;
|
|
92
|
+
answer: any;
|
|
93
|
+
materialMap: any;
|
|
94
|
+
contentMap: any;
|
|
95
|
+
checkCanAnswerQuestion: () => boolean;
|
|
96
|
+
onChange: (e1: any, e2: any, e3: string) => void;
|
|
97
|
+
isPreview: boolean;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface IGroupingActivityProps {
|
|
101
|
+
answer: any;
|
|
102
|
+
data: any;
|
|
103
|
+
canAnswerQuestion: () => boolean;
|
|
104
|
+
changeAnswer: (e: any) => void;
|
|
105
|
+
isPreview: boolean;
|
|
106
|
+
showCorrectAnswer: boolean;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface IGroupingActivityMaterialProps {
|
|
110
|
+
uniqueValue: string;
|
|
111
|
+
answer: any;
|
|
112
|
+
materialMap: any;
|
|
113
|
+
contentMap: any;
|
|
114
|
+
checkCanAnswerQuestion: () => boolean;
|
|
115
|
+
onChange: (e1: any, e2: any, e3: string | null, e4: number | null) => void;
|
|
116
|
+
isPreview: boolean;
|
|
117
|
+
showCorrectAnswer: boolean;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface IMatchingActivityProps {
|
|
121
|
+
answer: any;
|
|
122
|
+
data: any;
|
|
123
|
+
canAnswerQuestion: () => boolean;
|
|
124
|
+
changeAnswer: (e: any) => void;
|
|
125
|
+
isPreview: boolean;
|
|
126
|
+
showCorrectAnswer: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface IMatchingActivityMaterialProps {
|
|
130
|
+
uniqueValue: string;
|
|
131
|
+
answer: any;
|
|
132
|
+
materialMap: any;
|
|
133
|
+
contentMap: any;
|
|
134
|
+
checkCanAnswerQuestion: () => boolean;
|
|
135
|
+
onChange: (e1: any, e2: any, e3: string | null) => void;
|
|
136
|
+
isPreview: boolean;
|
|
137
|
+
showCorrectAnswer: boolean;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface IFillInTheBlanksActivityProps {
|
|
141
|
+
answer: any;
|
|
142
|
+
data: any;
|
|
143
|
+
canAnswerQuestion: () => boolean;
|
|
144
|
+
changeAnswer: (e: any) => void;
|
|
145
|
+
isPreview: boolean;
|
|
146
|
+
showCorrectAnswer: boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface IFillInTheBlanksActivityMaterialProps {
|
|
150
|
+
uniqueValue: string;
|
|
151
|
+
answer: any;
|
|
152
|
+
optionList: any;
|
|
153
|
+
materialMap: any;
|
|
154
|
+
contentMap: any;
|
|
155
|
+
checkCanAnswerQuestion: () => boolean;
|
|
156
|
+
onChange: (e1: any, e2: any, e3: string | null) => void;
|
|
157
|
+
isPreview: boolean;
|
|
158
|
+
showCorrectAnswer: boolean;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface IOpenEndedActivityProps {
|
|
162
|
+
answer: any;
|
|
163
|
+
data: any;
|
|
164
|
+
changeAnswer: (e: any) => void;
|
|
165
|
+
showMaterialContent: boolean;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface IOpenEndedActivityMaterialProps {
|
|
169
|
+
answer: any;
|
|
170
|
+
contentMap: any;
|
|
171
|
+
onChange: (e1: any, e2: any) => void;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface ITrueFalseActivityProps {
|
|
175
|
+
answer: any;
|
|
176
|
+
data: any;
|
|
177
|
+
canAnswerQuestion: () => boolean;
|
|
178
|
+
changeAnswer: (e: any) => void;
|
|
179
|
+
isPreview: boolean;
|
|
180
|
+
showCorrectAnswer: boolean;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface ITrueFalseActivityMaterialProps {
|
|
184
|
+
uniqueValue: string;
|
|
185
|
+
answer: any;
|
|
186
|
+
materialMap: any;
|
|
187
|
+
contentMap: any;
|
|
188
|
+
checkCanAnswerQuestion: () => boolean;
|
|
189
|
+
onChange: (e1: any, e2: any, e3: string) => void;
|
|
190
|
+
isPreview: boolean;
|
|
191
|
+
showCorrectAnswer: boolean;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface IShowMaterialMediaByContentTypeProps {
|
|
195
|
+
key: string;
|
|
196
|
+
contentType: string;
|
|
197
|
+
src: string;
|
|
198
|
+
canFullScreen: boolean;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface IActivitySolutionProps {
|
|
202
|
+
activityTemplateType: string;
|
|
203
|
+
data: any;
|
|
204
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IDroppableItemProps {
|
|
2
|
+
key: number;
|
|
3
|
+
item: any;
|
|
4
|
+
type: string;
|
|
5
|
+
component: any;
|
|
6
|
+
dropRef: (e: any) => void;
|
|
7
|
+
target: number | null;
|
|
8
|
+
setTarget: (e: any) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface IDraggableItemProps {
|
|
12
|
+
key: number;
|
|
13
|
+
item: any;
|
|
14
|
+
type: string;
|
|
15
|
+
component: any;
|
|
16
|
+
moveCardHandler: () => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IDraggableDroppableItemProps {
|
|
20
|
+
key: number;
|
|
21
|
+
item: any;
|
|
22
|
+
type: string;
|
|
23
|
+
component: any;
|
|
24
|
+
moveCardHandler: () => void;
|
|
25
|
+
dropRef: (e: any) => void;
|
|
26
|
+
target: number | null;
|
|
27
|
+
setTarget: (e: any) => void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IInputGroupProps {
|
|
2
|
+
type: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onFocus?: (e: any) => void;
|
|
8
|
+
onChange?: (e: any) => void;
|
|
9
|
+
onClick?: (e: any) => void;
|
|
10
|
+
onKeyDown?: (e: any) => void;
|
|
11
|
+
optionList?: any;
|
|
12
|
+
errorText?: string;
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
accept?: string;
|
|
15
|
+
theme?: string;
|
|
16
|
+
useMinHeight: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
limit?: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const colors = [
|
|
2
|
+
"#FF5733", // Fiery Red
|
|
3
|
+
"#3357FF", // Royal Blue
|
|
4
|
+
"#FF33A1", // Fuchsia Pink
|
|
5
|
+
"#33FFF0", // Aqua Blue
|
|
6
|
+
"#FF9633", // Tangerine
|
|
7
|
+
"#8D33FF", // Violet
|
|
8
|
+
"#FFD733", // Sunny Yellow
|
|
9
|
+
"#33FF6D", // Mint Green
|
|
10
|
+
"#FFB833", // Amber
|
|
11
|
+
"#33C7FF", // Sky Blue
|
|
12
|
+
"#FF33E4", // Magenta
|
|
13
|
+
"#5EFF33", // Neon Green
|
|
14
|
+
"#FF3380", // Hot Pink
|
|
15
|
+
"#33FFAF", // Seafoam Green
|
|
16
|
+
"#3383FF", // Dodger Blue
|
|
17
|
+
"#FF9533", // Pumpkin Orange
|
|
18
|
+
"#BF33FF", // Electric Purple
|
|
19
|
+
"#FFDA33", // Golden Yellow
|
|
20
|
+
"#33FF89", // Turquoise
|
|
21
|
+
"#FF3333", // Red
|
|
22
|
+
"#33BFFF", // Light Blue
|
|
23
|
+
"#FF33B3", // Pink
|
|
24
|
+
"#5BFF33", // Light Green
|
|
25
|
+
"#FF3385", // Rose
|
|
26
|
+
"#33FFC9", // Aquamarine
|
|
27
|
+
"#33A1FF", // Azure
|
|
28
|
+
"#FF7A33", // Cantaloupe
|
|
29
|
+
"#A533FF", // Lavender
|
|
30
|
+
"#FFE033", // Mustard Yellow
|
|
31
|
+
"#33FF7A", // Apple Green
|
|
32
|
+
"#FF4D33", // Bright Red
|
|
33
|
+
"#33FF95", // Light Turquoise
|
|
34
|
+
"#FFC433", // Peach
|
|
35
|
+
"#33FF7D", // Green Apple
|
|
36
|
+
"#FF338A", // Raspberry Pink
|
|
37
|
+
"#33FFE4", // Light Aqua
|
|
38
|
+
"#336AFF", // Cobalt Blue
|
|
39
|
+
"#FF3370", // Raspberry
|
|
40
|
+
"#33FF95", // Light Green
|
|
41
|
+
"#FFA633", // Orange
|
|
42
|
+
"#33FF57", // Lime Green
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
export const shuffleArray = (array: any) => {
|
|
46
|
+
const copyArray = JSON.parse(JSON.stringify(array));
|
|
47
|
+
for (let i = copyArray.length - 1; i > 0; i--) {
|
|
48
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
49
|
+
[copyArray[i], copyArray[j]] = [copyArray[j], copyArray[i]];
|
|
50
|
+
}
|
|
51
|
+
return copyArray;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const getColorByIndex = (index: number) => {
|
|
55
|
+
return colors[index];
|
|
56
|
+
};
|