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,35 @@
|
|
|
1
|
+
export const convertDataURLtoFile = (dataurl: string, filename: string) => {
|
|
2
|
+
var arr = dataurl.split(","),
|
|
3
|
+
mime = (arr[0].match(/:(.*?);/) || [])[1],
|
|
4
|
+
bstr = atob(arr[arr.length - 1]),
|
|
5
|
+
n = bstr.length,
|
|
6
|
+
u8arr = new Uint8Array(n);
|
|
7
|
+
while (n--) {
|
|
8
|
+
u8arr[n] = bstr.charCodeAt(n);
|
|
9
|
+
}
|
|
10
|
+
return new File([u8arr], filename, { type: mime });
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const retrieveDocumentTypeFromAcceptedFormat = (format: string) => {
|
|
14
|
+
if (format === "application/pdf") {
|
|
15
|
+
return "PDF";
|
|
16
|
+
} else if (
|
|
17
|
+
format === "image/jpeg" ||
|
|
18
|
+
format === "image/png" ||
|
|
19
|
+
format === "image/jpg"
|
|
20
|
+
) {
|
|
21
|
+
return "IMAGE";
|
|
22
|
+
} else if (format === "audio/mp3") {
|
|
23
|
+
return "AUDIO";
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const retrieveDocumentTypeFromExtension = (format: string) => {
|
|
28
|
+
if (format === "pdf") {
|
|
29
|
+
return "PDF";
|
|
30
|
+
} else if (format === "jpeg" || format === "png" || format === "jpg") {
|
|
31
|
+
return "IMAGE";
|
|
32
|
+
} else if (format === "mp3") {
|
|
33
|
+
return "AUDIO";
|
|
34
|
+
}
|
|
35
|
+
};
|