catchup-library-web 1.0.13 → 1.0.15
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 +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +207 -55
- package/dist/index.mjs +203 -52
- package/package.json +1 -1
- package/src/components/activities/ActivityPreviewByData.tsx +149 -0
- package/src/components/activities/material-content/DropdownActivityMaterialContent.tsx +2 -2
- package/src/components/tabs/SelectionTab.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/properties/ActivityProperties.ts +7 -0
- package/src/utilization/CatchtivityUtilization.ts +5 -3
package/dist/index.d.mts
CHANGED
|
@@ -140,6 +140,12 @@ interface IActivitySolutionProps {
|
|
|
140
140
|
activityTemplateType: string;
|
|
141
141
|
data: any;
|
|
142
142
|
}
|
|
143
|
+
interface IActivityPreviewByDataProps {
|
|
144
|
+
data: any;
|
|
145
|
+
showType: boolean;
|
|
146
|
+
lockedType: string;
|
|
147
|
+
typeOptionList: any[];
|
|
148
|
+
}
|
|
143
149
|
|
|
144
150
|
declare const DropdownActivityContent: ({ answer, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
|
|
145
151
|
|
|
@@ -161,6 +167,8 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
|
|
|
161
167
|
|
|
162
168
|
declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
163
169
|
|
|
170
|
+
declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
171
|
+
|
|
164
172
|
interface IDividerLineProps {
|
|
165
173
|
opacity: string;
|
|
166
174
|
}
|
|
@@ -382,7 +390,7 @@ declare const parseMaterialMapFromData: (data: any, type: string) => any;
|
|
|
382
390
|
declare const convertToBodyMapString: (type: string, bodyMap: any) => any;
|
|
383
391
|
declare const convertToSolutionMapString: (type: string, solutionMap: any) => any;
|
|
384
392
|
declare const convertToEvaluationRubricMapString: (type: string, evaluationRubricMap: any) => any;
|
|
385
|
-
declare const constructActivityData: (activityTemplateType: string, bodyMap: any, materialMap: any, solutionMap: any, taxonomyMap: any, evaluationRubricMap: any) => any;
|
|
393
|
+
declare const constructActivityData: (activityTemplateType: string, contentMap: any, bodyMap: any, materialMap: any, solutionMap: any, taxonomyMap: any, evaluationRubricMap: any) => any;
|
|
386
394
|
declare const constructAnswerBasedOnData: (data: any) => any;
|
|
387
395
|
|
|
388
396
|
declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
@@ -610,4 +618,4 @@ declare const retrieveTokenUsageSubTypeOptionList: () => {
|
|
|
610
618
|
value: string;
|
|
611
619
|
}[];
|
|
612
620
|
|
|
613
|
-
export { ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BlueVerticalDividerLine, BrandLabel, CancelButton, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, GradeLabel, GroupingActivityContent, InputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PersonalLabel, PrimaryButton, PublishingHouseLabel, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, THREE_MONTHS, TrueFalseActivityContent, VerticalDividerLine, calculateLevenshteinDistance, checkActivityAnswerState, checkIfAnswerIsEmpty, constructActivityAnswerMap, constructActivityAnswerStateList, constructActivityData, constructActivityItemListWithAnswersForAI, constructActivityItemListWithSolutionForAI, constructAnswerBasedOnData, constructBaseNumericIndividualModel, constructBaseVerbalIndvidualModel, constructInputWithSpecialExpressionList, constructUserProfileQueryParams, constructWeekName, convertDataURLtoFile, convertToBase64, convertToBodyMapString, convertToEvaluationRubricMapString, convertToSolutionMapString, convertTurkishCharactersToEnglish, filterCategoryVersionCodeOptionList, filterCategoryVersionCodeOptionListByGradeDTO, filterCategoryVersionCodeOptionListByInstitutionDTO, filterCoterieTypeOptionList, filterGradeLevelOptionList, filterUserRoleOptionList, findAISettingsFromCurrentProfile, findBestFitActivity, getColorByIndex, ignoreMathematicalExpression, mergeObjects, parseBodyMapFromData, parseContentMapFromData, parseJwt, parseMaterialMapFromData, retrieveActivityAnswerFromAnswerList, retrieveActivityTemplateDTOOptionList, retrieveAllEarnedBadgeDTOListByCoterieType, retrieveAllEarnedBadgeDTOListByCoterieTypeList, retrieveAnnouncementAudienceOptionList, retrieveAnnouncementTypeOptionList, retrieveBadgeRuleListByParams, retrieveBadgeRuleTextByParams, retrieveBranchDTOByUserProfileOptionList, retrieveBranchDTOOptionList, retrieveBrandDTOByUserProfileOptionList, retrieveBrandDTOOptionList, retrieveCampusDTOByUserProfileOptionList, retrieveCampusDTOOptionList, retrieveCategoryVersionCodeOptionList, retrieveClockTimeLeft, retrieveColorByScore, retrieveContentTypeOptionList, retrieveContestTypeOptionList, retrieveCoterieTypeFromStandardExamCoterieType, retrieveCoterieTypeOptionList, retrieveCountryCodeOptionList, retrieveCountryNameOptionList, retrieveCurrentDefaultDataMap, retrieveDateIntervalOptionList, retrieveDefaultUserRoleOptionList, retrieveDistintCoterieTypeFromCatchtivityApplicationDTO, retrieveDocumentTypeFromAcceptedFormat, retrieveDocumentTypeFromExtension, retrieveDurationInMinutesOptionList, retrieveDurationInSecondsOptionList, retrieveDurationTypeOptionList, retrieveEachTimeSpentInSeconds, retrieveEnableOptionList, retrieveExternalRegistrationDTOOptionList, retrieveFrequencyTypeOptionList, retrieveGenderOptionList, retrieveGradeDTOByUserProfileOptionList, retrieveGradeDTOOptionList, retrieveGradeLevelOptionList, retrieveInstitutionDTOByUserProfileOptionList, retrieveInstitutionDTOOptionList, retrieveInstitutionTypeOptionList, retrieveMonthNameByIndex, retrieveOtherBadgeDTOList, retrievePhoneNumberAreaCodeList, retrieveProvinceNameOptionList, retrieveReportTypeOptionList, retrieveSeasonDTOByUserProfileOptionList, retrieveSeasonDTOOptionList, retrieveStandardExamCoterieTypeOptionListByStandardExamType, retrieveStandardExamTypeIcon, retrieveStandardExamTypeOptionList, retrieveStatusOptionList, retrieveTaxonomyGroupName, retrieveTaxonomyName, retrieveTaxonomyType, retrieveTokenUsageSubTypeOptionList, retrieveTokenUsageTypeOptionList, retrieveTotalTimeSpentInMinutes, retrieveTotalTimeSpentInSeconds, retrieveUserAuthorityGeneralOptionList, retrieveUserRoleOptionList, retrieveValidationRequirementList, shuffleArray, useScreenSize };
|
|
621
|
+
export { ActivityPreviewByData, ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BlueVerticalDividerLine, BrandLabel, CancelButton, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, GradeLabel, GroupingActivityContent, InputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PersonalLabel, PrimaryButton, PublishingHouseLabel, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, THREE_MONTHS, TrueFalseActivityContent, VerticalDividerLine, calculateLevenshteinDistance, checkActivityAnswerState, checkIfAnswerIsEmpty, constructActivityAnswerMap, constructActivityAnswerStateList, constructActivityData, constructActivityItemListWithAnswersForAI, constructActivityItemListWithSolutionForAI, constructAnswerBasedOnData, constructBaseNumericIndividualModel, constructBaseVerbalIndvidualModel, constructInputWithSpecialExpressionList, constructUserProfileQueryParams, constructWeekName, convertDataURLtoFile, convertToBase64, convertToBodyMapString, convertToEvaluationRubricMapString, convertToSolutionMapString, convertTurkishCharactersToEnglish, filterCategoryVersionCodeOptionList, filterCategoryVersionCodeOptionListByGradeDTO, filterCategoryVersionCodeOptionListByInstitutionDTO, filterCoterieTypeOptionList, filterGradeLevelOptionList, filterUserRoleOptionList, findAISettingsFromCurrentProfile, findBestFitActivity, getColorByIndex, ignoreMathematicalExpression, mergeObjects, parseBodyMapFromData, parseContentMapFromData, parseJwt, parseMaterialMapFromData, retrieveActivityAnswerFromAnswerList, retrieveActivityTemplateDTOOptionList, retrieveAllEarnedBadgeDTOListByCoterieType, retrieveAllEarnedBadgeDTOListByCoterieTypeList, retrieveAnnouncementAudienceOptionList, retrieveAnnouncementTypeOptionList, retrieveBadgeRuleListByParams, retrieveBadgeRuleTextByParams, retrieveBranchDTOByUserProfileOptionList, retrieveBranchDTOOptionList, retrieveBrandDTOByUserProfileOptionList, retrieveBrandDTOOptionList, retrieveCampusDTOByUserProfileOptionList, retrieveCampusDTOOptionList, retrieveCategoryVersionCodeOptionList, retrieveClockTimeLeft, retrieveColorByScore, retrieveContentTypeOptionList, retrieveContestTypeOptionList, retrieveCoterieTypeFromStandardExamCoterieType, retrieveCoterieTypeOptionList, retrieveCountryCodeOptionList, retrieveCountryNameOptionList, retrieveCurrentDefaultDataMap, retrieveDateIntervalOptionList, retrieveDefaultUserRoleOptionList, retrieveDistintCoterieTypeFromCatchtivityApplicationDTO, retrieveDocumentTypeFromAcceptedFormat, retrieveDocumentTypeFromExtension, retrieveDurationInMinutesOptionList, retrieveDurationInSecondsOptionList, retrieveDurationTypeOptionList, retrieveEachTimeSpentInSeconds, retrieveEnableOptionList, retrieveExternalRegistrationDTOOptionList, retrieveFrequencyTypeOptionList, retrieveGenderOptionList, retrieveGradeDTOByUserProfileOptionList, retrieveGradeDTOOptionList, retrieveGradeLevelOptionList, retrieveInstitutionDTOByUserProfileOptionList, retrieveInstitutionDTOOptionList, retrieveInstitutionTypeOptionList, retrieveMonthNameByIndex, retrieveOtherBadgeDTOList, retrievePhoneNumberAreaCodeList, retrieveProvinceNameOptionList, retrieveReportTypeOptionList, retrieveSeasonDTOByUserProfileOptionList, retrieveSeasonDTOOptionList, retrieveStandardExamCoterieTypeOptionListByStandardExamType, retrieveStandardExamTypeIcon, retrieveStandardExamTypeOptionList, retrieveStatusOptionList, retrieveTaxonomyGroupName, retrieveTaxonomyName, retrieveTaxonomyType, retrieveTokenUsageSubTypeOptionList, retrieveTokenUsageTypeOptionList, retrieveTotalTimeSpentInMinutes, retrieveTotalTimeSpentInSeconds, retrieveUserAuthorityGeneralOptionList, retrieveUserRoleOptionList, retrieveValidationRequirementList, shuffleArray, useScreenSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -140,6 +140,12 @@ interface IActivitySolutionProps {
|
|
|
140
140
|
activityTemplateType: string;
|
|
141
141
|
data: any;
|
|
142
142
|
}
|
|
143
|
+
interface IActivityPreviewByDataProps {
|
|
144
|
+
data: any;
|
|
145
|
+
showType: boolean;
|
|
146
|
+
lockedType: string;
|
|
147
|
+
typeOptionList: any[];
|
|
148
|
+
}
|
|
143
149
|
|
|
144
150
|
declare const DropdownActivityContent: ({ answer, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
|
|
145
151
|
|
|
@@ -161,6 +167,8 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
|
|
|
161
167
|
|
|
162
168
|
declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
163
169
|
|
|
170
|
+
declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
171
|
+
|
|
164
172
|
interface IDividerLineProps {
|
|
165
173
|
opacity: string;
|
|
166
174
|
}
|
|
@@ -382,7 +390,7 @@ declare const parseMaterialMapFromData: (data: any, type: string) => any;
|
|
|
382
390
|
declare const convertToBodyMapString: (type: string, bodyMap: any) => any;
|
|
383
391
|
declare const convertToSolutionMapString: (type: string, solutionMap: any) => any;
|
|
384
392
|
declare const convertToEvaluationRubricMapString: (type: string, evaluationRubricMap: any) => any;
|
|
385
|
-
declare const constructActivityData: (activityTemplateType: string, bodyMap: any, materialMap: any, solutionMap: any, taxonomyMap: any, evaluationRubricMap: any) => any;
|
|
393
|
+
declare const constructActivityData: (activityTemplateType: string, contentMap: any, bodyMap: any, materialMap: any, solutionMap: any, taxonomyMap: any, evaluationRubricMap: any) => any;
|
|
386
394
|
declare const constructAnswerBasedOnData: (data: any) => any;
|
|
387
395
|
|
|
388
396
|
declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
@@ -610,4 +618,4 @@ declare const retrieveTokenUsageSubTypeOptionList: () => {
|
|
|
610
618
|
value: string;
|
|
611
619
|
}[];
|
|
612
620
|
|
|
613
|
-
export { ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BlueVerticalDividerLine, BrandLabel, CancelButton, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, GradeLabel, GroupingActivityContent, InputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PersonalLabel, PrimaryButton, PublishingHouseLabel, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, THREE_MONTHS, TrueFalseActivityContent, VerticalDividerLine, calculateLevenshteinDistance, checkActivityAnswerState, checkIfAnswerIsEmpty, constructActivityAnswerMap, constructActivityAnswerStateList, constructActivityData, constructActivityItemListWithAnswersForAI, constructActivityItemListWithSolutionForAI, constructAnswerBasedOnData, constructBaseNumericIndividualModel, constructBaseVerbalIndvidualModel, constructInputWithSpecialExpressionList, constructUserProfileQueryParams, constructWeekName, convertDataURLtoFile, convertToBase64, convertToBodyMapString, convertToEvaluationRubricMapString, convertToSolutionMapString, convertTurkishCharactersToEnglish, filterCategoryVersionCodeOptionList, filterCategoryVersionCodeOptionListByGradeDTO, filterCategoryVersionCodeOptionListByInstitutionDTO, filterCoterieTypeOptionList, filterGradeLevelOptionList, filterUserRoleOptionList, findAISettingsFromCurrentProfile, findBestFitActivity, getColorByIndex, ignoreMathematicalExpression, mergeObjects, parseBodyMapFromData, parseContentMapFromData, parseJwt, parseMaterialMapFromData, retrieveActivityAnswerFromAnswerList, retrieveActivityTemplateDTOOptionList, retrieveAllEarnedBadgeDTOListByCoterieType, retrieveAllEarnedBadgeDTOListByCoterieTypeList, retrieveAnnouncementAudienceOptionList, retrieveAnnouncementTypeOptionList, retrieveBadgeRuleListByParams, retrieveBadgeRuleTextByParams, retrieveBranchDTOByUserProfileOptionList, retrieveBranchDTOOptionList, retrieveBrandDTOByUserProfileOptionList, retrieveBrandDTOOptionList, retrieveCampusDTOByUserProfileOptionList, retrieveCampusDTOOptionList, retrieveCategoryVersionCodeOptionList, retrieveClockTimeLeft, retrieveColorByScore, retrieveContentTypeOptionList, retrieveContestTypeOptionList, retrieveCoterieTypeFromStandardExamCoterieType, retrieveCoterieTypeOptionList, retrieveCountryCodeOptionList, retrieveCountryNameOptionList, retrieveCurrentDefaultDataMap, retrieveDateIntervalOptionList, retrieveDefaultUserRoleOptionList, retrieveDistintCoterieTypeFromCatchtivityApplicationDTO, retrieveDocumentTypeFromAcceptedFormat, retrieveDocumentTypeFromExtension, retrieveDurationInMinutesOptionList, retrieveDurationInSecondsOptionList, retrieveDurationTypeOptionList, retrieveEachTimeSpentInSeconds, retrieveEnableOptionList, retrieveExternalRegistrationDTOOptionList, retrieveFrequencyTypeOptionList, retrieveGenderOptionList, retrieveGradeDTOByUserProfileOptionList, retrieveGradeDTOOptionList, retrieveGradeLevelOptionList, retrieveInstitutionDTOByUserProfileOptionList, retrieveInstitutionDTOOptionList, retrieveInstitutionTypeOptionList, retrieveMonthNameByIndex, retrieveOtherBadgeDTOList, retrievePhoneNumberAreaCodeList, retrieveProvinceNameOptionList, retrieveReportTypeOptionList, retrieveSeasonDTOByUserProfileOptionList, retrieveSeasonDTOOptionList, retrieveStandardExamCoterieTypeOptionListByStandardExamType, retrieveStandardExamTypeIcon, retrieveStandardExamTypeOptionList, retrieveStatusOptionList, retrieveTaxonomyGroupName, retrieveTaxonomyName, retrieveTaxonomyType, retrieveTokenUsageSubTypeOptionList, retrieveTokenUsageTypeOptionList, retrieveTotalTimeSpentInMinutes, retrieveTotalTimeSpentInSeconds, retrieveUserAuthorityGeneralOptionList, retrieveUserRoleOptionList, retrieveValidationRequirementList, shuffleArray, useScreenSize };
|
|
621
|
+
export { ActivityPreviewByData, ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BlueVerticalDividerLine, BrandLabel, CancelButton, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, GradeLabel, GroupingActivityContent, InputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PersonalLabel, PrimaryButton, PublishingHouseLabel, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, THREE_MONTHS, TrueFalseActivityContent, VerticalDividerLine, calculateLevenshteinDistance, checkActivityAnswerState, checkIfAnswerIsEmpty, constructActivityAnswerMap, constructActivityAnswerStateList, constructActivityData, constructActivityItemListWithAnswersForAI, constructActivityItemListWithSolutionForAI, constructAnswerBasedOnData, constructBaseNumericIndividualModel, constructBaseVerbalIndvidualModel, constructInputWithSpecialExpressionList, constructUserProfileQueryParams, constructWeekName, convertDataURLtoFile, convertToBase64, convertToBodyMapString, convertToEvaluationRubricMapString, convertToSolutionMapString, convertTurkishCharactersToEnglish, filterCategoryVersionCodeOptionList, filterCategoryVersionCodeOptionListByGradeDTO, filterCategoryVersionCodeOptionListByInstitutionDTO, filterCoterieTypeOptionList, filterGradeLevelOptionList, filterUserRoleOptionList, findAISettingsFromCurrentProfile, findBestFitActivity, getColorByIndex, ignoreMathematicalExpression, mergeObjects, parseBodyMapFromData, parseContentMapFromData, parseJwt, parseMaterialMapFromData, retrieveActivityAnswerFromAnswerList, retrieveActivityTemplateDTOOptionList, retrieveAllEarnedBadgeDTOListByCoterieType, retrieveAllEarnedBadgeDTOListByCoterieTypeList, retrieveAnnouncementAudienceOptionList, retrieveAnnouncementTypeOptionList, retrieveBadgeRuleListByParams, retrieveBadgeRuleTextByParams, retrieveBranchDTOByUserProfileOptionList, retrieveBranchDTOOptionList, retrieveBrandDTOByUserProfileOptionList, retrieveBrandDTOOptionList, retrieveCampusDTOByUserProfileOptionList, retrieveCampusDTOOptionList, retrieveCategoryVersionCodeOptionList, retrieveClockTimeLeft, retrieveColorByScore, retrieveContentTypeOptionList, retrieveContestTypeOptionList, retrieveCoterieTypeFromStandardExamCoterieType, retrieveCoterieTypeOptionList, retrieveCountryCodeOptionList, retrieveCountryNameOptionList, retrieveCurrentDefaultDataMap, retrieveDateIntervalOptionList, retrieveDefaultUserRoleOptionList, retrieveDistintCoterieTypeFromCatchtivityApplicationDTO, retrieveDocumentTypeFromAcceptedFormat, retrieveDocumentTypeFromExtension, retrieveDurationInMinutesOptionList, retrieveDurationInSecondsOptionList, retrieveDurationTypeOptionList, retrieveEachTimeSpentInSeconds, retrieveEnableOptionList, retrieveExternalRegistrationDTOOptionList, retrieveFrequencyTypeOptionList, retrieveGenderOptionList, retrieveGradeDTOByUserProfileOptionList, retrieveGradeDTOOptionList, retrieveGradeLevelOptionList, retrieveInstitutionDTOByUserProfileOptionList, retrieveInstitutionDTOOptionList, retrieveInstitutionTypeOptionList, retrieveMonthNameByIndex, retrieveOtherBadgeDTOList, retrievePhoneNumberAreaCodeList, retrieveProvinceNameOptionList, retrieveReportTypeOptionList, retrieveSeasonDTOByUserProfileOptionList, retrieveSeasonDTOOptionList, retrieveStandardExamCoterieTypeOptionListByStandardExamType, retrieveStandardExamTypeIcon, retrieveStandardExamTypeOptionList, retrieveStatusOptionList, retrieveTaxonomyGroupName, retrieveTaxonomyName, retrieveTaxonomyType, retrieveTokenUsageSubTypeOptionList, retrieveTokenUsageTypeOptionList, retrieveTotalTimeSpentInMinutes, retrieveTotalTimeSpentInSeconds, retrieveUserAuthorityGeneralOptionList, retrieveUserRoleOptionList, retrieveValidationRequirementList, shuffleArray, useScreenSize };
|
package/dist/index.js
CHANGED
|
@@ -67,6 +67,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
67
67
|
// src/index.ts
|
|
68
68
|
var index_exports = {};
|
|
69
69
|
__export(index_exports, {
|
|
70
|
+
ActivityPreviewByData: () => ActivityPreviewByData_default,
|
|
70
71
|
ActivitySolutionContent: () => ActivitySolutionContent_default,
|
|
71
72
|
ActivityTemplateLabel: () => ActivityTemplateLabel_default,
|
|
72
73
|
ApproveButton: () => ApproveButton_default,
|
|
@@ -2427,11 +2428,9 @@ var convertToEvaluationRubricMapString = (type, evaluationRubricMap) => {
|
|
|
2427
2428
|
}
|
|
2428
2429
|
return convertedEvaluationRubricMap;
|
|
2429
2430
|
};
|
|
2430
|
-
var constructActivityData = (activityTemplateType, bodyMap, materialMap, solutionMap, taxonomyMap, evaluationRubricMap) => {
|
|
2431
|
+
var constructActivityData = (activityTemplateType, contentMap, bodyMap, materialMap, solutionMap, taxonomyMap, evaluationRubricMap) => {
|
|
2431
2432
|
const constructedData = {};
|
|
2432
|
-
constructedData["contentMap"] = JSON.stringify(
|
|
2433
|
-
type: "TEXT"
|
|
2434
|
-
});
|
|
2433
|
+
constructedData["contentMap"] = JSON.stringify(contentMap);
|
|
2435
2434
|
if (activityTemplateType === "ORDERING") {
|
|
2436
2435
|
constructedData["orderingBodyMap"] = JSON.stringify(
|
|
2437
2436
|
convertToBodyMapString("ORDERING", bodyMap)
|
|
@@ -3827,14 +3826,14 @@ var DropdownActivityMaterialContent = ({
|
|
|
3827
3826
|
},
|
|
3828
3827
|
index2
|
|
3829
3828
|
)) }) }),
|
|
3830
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute top-
|
|
3829
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3831
3830
|
BaseImage_default,
|
|
3832
3831
|
{
|
|
3833
3832
|
src: "/icons/checkbox.png",
|
|
3834
3833
|
alt: "chekbbox",
|
|
3835
3834
|
size: "small"
|
|
3836
3835
|
}
|
|
3837
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute top-
|
|
3836
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3838
3837
|
BaseImage_default,
|
|
3839
3838
|
{
|
|
3840
3839
|
src: "/icons/cross-red.png",
|
|
@@ -5879,41 +5878,32 @@ var ActivitySolutionContent = ({
|
|
|
5879
5878
|
};
|
|
5880
5879
|
var ActivitySolutionContent_default = ActivitySolutionContent;
|
|
5881
5880
|
|
|
5882
|
-
// src/components/
|
|
5883
|
-
var
|
|
5884
|
-
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
5885
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5886
|
-
"div",
|
|
5887
|
-
{
|
|
5888
|
-
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
5889
|
-
}
|
|
5890
|
-
);
|
|
5891
|
-
};
|
|
5892
|
-
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
5881
|
+
// src/components/activities/ActivityPreviewByData.tsx
|
|
5882
|
+
var import_react24 = require("react");
|
|
5893
5883
|
|
|
5894
5884
|
// src/components/boxes/SelectionBox.tsx
|
|
5895
|
-
var
|
|
5885
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5896
5886
|
var SelectionBox = ({
|
|
5897
5887
|
optionList,
|
|
5898
5888
|
selectedId,
|
|
5899
5889
|
handleSelectOnClick
|
|
5900
5890
|
}) => {
|
|
5901
|
-
return /* @__PURE__ */ (0,
|
|
5891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5902
5892
|
"div",
|
|
5903
5893
|
{
|
|
5904
5894
|
className: `${option.id === selectedId ? "border-catchup-blue-400" : "border-catchup-gray-100 hover:border-catchup-blue-500"} border-2 rounded-catchup-xlarge py-3 px-8 cursor-pointer duration-300 transition-all`,
|
|
5905
5895
|
onClick: () => {
|
|
5906
5896
|
handleSelectOnClick(option.id);
|
|
5907
5897
|
},
|
|
5908
|
-
children: /* @__PURE__ */ (0,
|
|
5898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5909
5899
|
"div",
|
|
5910
5900
|
{
|
|
5911
5901
|
className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
|
|
5912
5902
|
children: [
|
|
5913
|
-
/* @__PURE__ */ (0,
|
|
5914
|
-
/* @__PURE__ */ (0,
|
|
5915
|
-
/* @__PURE__ */ (0,
|
|
5916
|
-
option.subText ? /* @__PURE__ */ (0,
|
|
5903
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: option.icon }),
|
|
5904
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
5905
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { children: option.text }),
|
|
5906
|
+
option.subText ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("p", { className: "text-md", children: [
|
|
5917
5907
|
"(",
|
|
5918
5908
|
option.subText,
|
|
5919
5909
|
")"
|
|
@@ -5928,15 +5918,176 @@ var SelectionBox = ({
|
|
|
5928
5918
|
};
|
|
5929
5919
|
var SelectionBox_default = SelectionBox;
|
|
5930
5920
|
|
|
5931
|
-
// src/components/
|
|
5921
|
+
// src/components/activities/ActivityPreviewByData.tsx
|
|
5922
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5923
|
+
var ActivityPreviewByData = ({
|
|
5924
|
+
data,
|
|
5925
|
+
showType,
|
|
5926
|
+
lockedType,
|
|
5927
|
+
typeOptionList
|
|
5928
|
+
}) => {
|
|
5929
|
+
const [selectedType, setSelectedType] = (0, import_react24.useState)(null);
|
|
5930
|
+
(0, import_react24.useEffect)(() => {
|
|
5931
|
+
if (!typeOptionList) return;
|
|
5932
|
+
if (typeOptionList.length === 0) return;
|
|
5933
|
+
const foundTypeOption = typeOptionList.find(
|
|
5934
|
+
(typeOption) => typeOption.id === lockedType
|
|
5935
|
+
);
|
|
5936
|
+
if (!foundTypeOption) return;
|
|
5937
|
+
setSelectedType(foundTypeOption.id);
|
|
5938
|
+
}, [typeOptionList]);
|
|
5939
|
+
if (!data) return;
|
|
5940
|
+
const answer = constructAnswerBasedOnData(data);
|
|
5941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
5942
|
+
showType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5943
|
+
SelectionBox_default,
|
|
5944
|
+
{
|
|
5945
|
+
optionList: typeOptionList,
|
|
5946
|
+
selectedId: selectedType,
|
|
5947
|
+
handleSelectOnClick: (itemId) => {
|
|
5948
|
+
setSelectedType(itemId);
|
|
5949
|
+
}
|
|
5950
|
+
}
|
|
5951
|
+
) : null,
|
|
5952
|
+
selectedType ? selectedType === "ORDERING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5953
|
+
OrderingActivityContent_default,
|
|
5954
|
+
{
|
|
5955
|
+
answer,
|
|
5956
|
+
changeAnswer: () => {
|
|
5957
|
+
},
|
|
5958
|
+
canAnswerQuestion: () => {
|
|
5959
|
+
return true;
|
|
5960
|
+
},
|
|
5961
|
+
data,
|
|
5962
|
+
isPreview: true,
|
|
5963
|
+
showCorrectAnswer: true
|
|
5964
|
+
}
|
|
5965
|
+
) : selectedType === "DROPDOWN" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5966
|
+
DropdownActivityContent_default,
|
|
5967
|
+
{
|
|
5968
|
+
answer,
|
|
5969
|
+
changeAnswer: () => {
|
|
5970
|
+
},
|
|
5971
|
+
canAnswerQuestion: () => {
|
|
5972
|
+
return true;
|
|
5973
|
+
},
|
|
5974
|
+
data,
|
|
5975
|
+
isPreview: true,
|
|
5976
|
+
showCorrectAnswer: true
|
|
5977
|
+
}
|
|
5978
|
+
) : selectedType === "MCSA" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5979
|
+
MCSAActivityContent_default,
|
|
5980
|
+
{
|
|
5981
|
+
answer,
|
|
5982
|
+
changeAnswer: () => {
|
|
5983
|
+
},
|
|
5984
|
+
canAnswerQuestion: () => {
|
|
5985
|
+
return true;
|
|
5986
|
+
},
|
|
5987
|
+
data,
|
|
5988
|
+
isPreview: true,
|
|
5989
|
+
showCorrectAnswer: true
|
|
5990
|
+
}
|
|
5991
|
+
) : selectedType === "MCMA" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5992
|
+
MCMAActivityContent_default,
|
|
5993
|
+
{
|
|
5994
|
+
answer,
|
|
5995
|
+
changeAnswer: () => {
|
|
5996
|
+
},
|
|
5997
|
+
canAnswerQuestion: () => {
|
|
5998
|
+
return true;
|
|
5999
|
+
},
|
|
6000
|
+
data,
|
|
6001
|
+
isPreview: true,
|
|
6002
|
+
showCorrectAnswer: true
|
|
6003
|
+
}
|
|
6004
|
+
) : selectedType === "MATCHING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6005
|
+
MatchingActivityContent_default,
|
|
6006
|
+
{
|
|
6007
|
+
answer,
|
|
6008
|
+
changeAnswer: () => {
|
|
6009
|
+
},
|
|
6010
|
+
canAnswerQuestion: () => {
|
|
6011
|
+
return true;
|
|
6012
|
+
},
|
|
6013
|
+
data,
|
|
6014
|
+
isPreview: true,
|
|
6015
|
+
showCorrectAnswer: true
|
|
6016
|
+
}
|
|
6017
|
+
) : selectedType === "GROUPING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6018
|
+
GroupingActivityContent_default,
|
|
6019
|
+
{
|
|
6020
|
+
answer,
|
|
6021
|
+
changeAnswer: () => {
|
|
6022
|
+
},
|
|
6023
|
+
canAnswerQuestion: () => {
|
|
6024
|
+
return true;
|
|
6025
|
+
},
|
|
6026
|
+
data,
|
|
6027
|
+
isPreview: true,
|
|
6028
|
+
showCorrectAnswer: true
|
|
6029
|
+
}
|
|
6030
|
+
) : selectedType === "FILL_IN_THE_BLANKS" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6031
|
+
FillInTheBlanksActivityContent_default,
|
|
6032
|
+
{
|
|
6033
|
+
answer,
|
|
6034
|
+
changeAnswer: () => {
|
|
6035
|
+
},
|
|
6036
|
+
canAnswerQuestion: () => {
|
|
6037
|
+
return true;
|
|
6038
|
+
},
|
|
6039
|
+
data,
|
|
6040
|
+
isPreview: true,
|
|
6041
|
+
showCorrectAnswer: true
|
|
6042
|
+
}
|
|
6043
|
+
) : selectedType === "OPEN_ENDED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6044
|
+
OpenEndedActivityContent_default,
|
|
6045
|
+
{
|
|
6046
|
+
answer,
|
|
6047
|
+
changeAnswer: () => {
|
|
6048
|
+
},
|
|
6049
|
+
showMaterialContent: false,
|
|
6050
|
+
data
|
|
6051
|
+
}
|
|
6052
|
+
) : selectedType === "TRUE_FALSE" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6053
|
+
TrueFalseActivityContent_default,
|
|
6054
|
+
{
|
|
6055
|
+
answer,
|
|
6056
|
+
changeAnswer: () => {
|
|
6057
|
+
},
|
|
6058
|
+
canAnswerQuestion: () => {
|
|
6059
|
+
return true;
|
|
6060
|
+
},
|
|
6061
|
+
data,
|
|
6062
|
+
isPreview: true,
|
|
6063
|
+
showCorrectAnswer: true
|
|
6064
|
+
}
|
|
6065
|
+
) : null : null
|
|
6066
|
+
] });
|
|
6067
|
+
};
|
|
6068
|
+
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
6069
|
+
|
|
6070
|
+
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
5932
6071
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6072
|
+
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
6073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6074
|
+
"div",
|
|
6075
|
+
{
|
|
6076
|
+
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
6077
|
+
}
|
|
6078
|
+
);
|
|
6079
|
+
};
|
|
6080
|
+
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
6081
|
+
|
|
6082
|
+
// src/components/boxes/SelectionCheckbox.tsx
|
|
6083
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5933
6084
|
var SelectionCheckbox = ({
|
|
5934
6085
|
optionList,
|
|
5935
6086
|
selectedIdList,
|
|
5936
6087
|
handleSelectOnClick,
|
|
5937
6088
|
handleRemoveOnClick
|
|
5938
6089
|
}) => {
|
|
5939
|
-
return /* @__PURE__ */ (0,
|
|
6090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5940
6091
|
"div",
|
|
5941
6092
|
{
|
|
5942
6093
|
className: `${selectedIdList.findIndex(
|
|
@@ -5951,14 +6102,14 @@ var SelectionCheckbox = ({
|
|
|
5951
6102
|
handleRemoveOnClick(option.id);
|
|
5952
6103
|
}
|
|
5953
6104
|
},
|
|
5954
|
-
children: /* @__PURE__ */ (0,
|
|
6105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5955
6106
|
"div",
|
|
5956
6107
|
{
|
|
5957
6108
|
className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
|
|
5958
6109
|
(selectedId) => selectedId === option.id
|
|
5959
6110
|
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
5960
6111
|
children: [
|
|
5961
|
-
/* @__PURE__ */ (0,
|
|
6112
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5962
6113
|
BaseImage_default,
|
|
5963
6114
|
{
|
|
5964
6115
|
src: selectedIdList.findIndex(
|
|
@@ -5968,7 +6119,7 @@ var SelectionCheckbox = ({
|
|
|
5968
6119
|
size: "small"
|
|
5969
6120
|
}
|
|
5970
6121
|
) }),
|
|
5971
|
-
/* @__PURE__ */ (0,
|
|
6122
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: option.text }) })
|
|
5972
6123
|
]
|
|
5973
6124
|
}
|
|
5974
6125
|
)
|
|
@@ -5979,7 +6130,7 @@ var SelectionCheckbox = ({
|
|
|
5979
6130
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
5980
6131
|
|
|
5981
6132
|
// src/components/tabs/SelectionTab.tsx
|
|
5982
|
-
var
|
|
6133
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5983
6134
|
var SelectionTab = ({
|
|
5984
6135
|
optionList,
|
|
5985
6136
|
selectedId,
|
|
@@ -5989,7 +6140,7 @@ var SelectionTab = ({
|
|
|
5989
6140
|
textColor,
|
|
5990
6141
|
borderColor
|
|
5991
6142
|
}) => {
|
|
5992
|
-
return /* @__PURE__ */ (0,
|
|
6143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-lg text-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5993
6144
|
"div",
|
|
5994
6145
|
{
|
|
5995
6146
|
className: `${selectedId === option.id ? selectedTextColor ? selectedTextColor : "text-catchup-blue-500" : textColor ? textColor : "text-catchup-gray-300"} ${selectedId === option.id ? selectedBorderColor ? selectedBorderColor : "border-catchup-blue-500" : borderColor ? borderColor : "border-catchup-gray-50"} border-b-2 transition-all duration-300 p-3 cursor-pointer`,
|
|
@@ -6004,57 +6155,57 @@ var SelectionTab = ({
|
|
|
6004
6155
|
var SelectionTab_default = SelectionTab;
|
|
6005
6156
|
|
|
6006
6157
|
// src/components/labels/ActivityTemplateLabel.tsx
|
|
6007
|
-
var
|
|
6158
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6008
6159
|
var ActivityTemplateLabel = ({
|
|
6009
6160
|
title,
|
|
6010
6161
|
font
|
|
6011
6162
|
}) => {
|
|
6012
|
-
return /* @__PURE__ */ (0,
|
|
6013
|
-
/* @__PURE__ */ (0,
|
|
6014
|
-
/* @__PURE__ */ (0,
|
|
6163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6164
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
|
|
6165
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
6015
6166
|
] }) });
|
|
6016
6167
|
};
|
|
6017
6168
|
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
6018
6169
|
|
|
6019
6170
|
// src/components/labels/BrandLabel.tsx
|
|
6020
|
-
var
|
|
6171
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6021
6172
|
var BrandLabel = ({ title, icon, font }) => {
|
|
6022
|
-
return /* @__PURE__ */ (0,
|
|
6023
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
6024
|
-
/* @__PURE__ */ (0,
|
|
6173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6174
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
|
|
6175
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
6025
6176
|
] }) });
|
|
6026
6177
|
};
|
|
6027
6178
|
var BrandLabel_default = BrandLabel;
|
|
6028
6179
|
|
|
6029
6180
|
// src/components/labels/CoterieLabel.tsx
|
|
6030
|
-
var
|
|
6181
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6031
6182
|
var CoterieLabel = ({ title, font }) => {
|
|
6032
|
-
return /* @__PURE__ */ (0,
|
|
6183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
6033
6184
|
};
|
|
6034
6185
|
var CoterieLabel_default = CoterieLabel;
|
|
6035
6186
|
|
|
6036
6187
|
// src/components/labels/GradeLabel.tsx
|
|
6037
|
-
var
|
|
6188
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6038
6189
|
var GradeLabel = ({ title, font }) => {
|
|
6039
|
-
return /* @__PURE__ */ (0,
|
|
6190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
6040
6191
|
};
|
|
6041
6192
|
var GradeLabel_default = GradeLabel;
|
|
6042
6193
|
|
|
6043
6194
|
// src/components/labels/OutcomeLabel.tsx
|
|
6044
|
-
var
|
|
6195
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6045
6196
|
var OutcomeLabel = ({ title, font }) => {
|
|
6046
|
-
return /* @__PURE__ */ (0,
|
|
6047
|
-
/* @__PURE__ */ (0,
|
|
6048
|
-
/* @__PURE__ */ (0,
|
|
6197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6198
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
|
|
6199
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
6049
6200
|
] }) });
|
|
6050
6201
|
};
|
|
6051
6202
|
var OutcomeLabel_default = OutcomeLabel;
|
|
6052
6203
|
|
|
6053
6204
|
// src/components/labels/PersonalLabel.tsx
|
|
6054
|
-
var
|
|
6205
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6055
6206
|
var PersonalLabel = ({ title, icon, font }) => {
|
|
6056
|
-
return /* @__PURE__ */ (0,
|
|
6057
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
6207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-personal-label-border bg-personal-label text-personal-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6208
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6058
6209
|
BaseImage_default,
|
|
6059
6210
|
{
|
|
6060
6211
|
src: "/icons/personal-label.png",
|
|
@@ -6062,16 +6213,16 @@ var PersonalLabel = ({ title, icon, font }) => {
|
|
|
6062
6213
|
size: "xsmall"
|
|
6063
6214
|
}
|
|
6064
6215
|
),
|
|
6065
|
-
/* @__PURE__ */ (0,
|
|
6216
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
6066
6217
|
] }) });
|
|
6067
6218
|
};
|
|
6068
6219
|
var PersonalLabel_default = PersonalLabel;
|
|
6069
6220
|
|
|
6070
6221
|
// src/components/labels/PublishingHouseLabel.tsx
|
|
6071
|
-
var
|
|
6222
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6072
6223
|
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
6073
|
-
return /* @__PURE__ */ (0,
|
|
6074
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
6224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6225
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6075
6226
|
BaseImage_default,
|
|
6076
6227
|
{
|
|
6077
6228
|
src: "/icons/publishing-house-label.png",
|
|
@@ -6079,7 +6230,7 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
|
6079
6230
|
size: "xsmall"
|
|
6080
6231
|
}
|
|
6081
6232
|
),
|
|
6082
|
-
/* @__PURE__ */ (0,
|
|
6233
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
6083
6234
|
] }) });
|
|
6084
6235
|
};
|
|
6085
6236
|
var PublishingHouseLabel_default = PublishingHouseLabel;
|
|
@@ -8178,6 +8329,7 @@ var retrieveTokenUsageSubTypeOptionList = () => {
|
|
|
8178
8329
|
};
|
|
8179
8330
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8180
8331
|
0 && (module.exports = {
|
|
8332
|
+
ActivityPreviewByData,
|
|
8181
8333
|
ActivitySolutionContent,
|
|
8182
8334
|
ActivityTemplateLabel,
|
|
8183
8335
|
ApproveButton,
|
package/dist/index.mjs
CHANGED
|
@@ -2254,11 +2254,9 @@ var convertToEvaluationRubricMapString = (type, evaluationRubricMap) => {
|
|
|
2254
2254
|
}
|
|
2255
2255
|
return convertedEvaluationRubricMap;
|
|
2256
2256
|
};
|
|
2257
|
-
var constructActivityData = (activityTemplateType, bodyMap, materialMap, solutionMap, taxonomyMap, evaluationRubricMap) => {
|
|
2257
|
+
var constructActivityData = (activityTemplateType, contentMap, bodyMap, materialMap, solutionMap, taxonomyMap, evaluationRubricMap) => {
|
|
2258
2258
|
const constructedData = {};
|
|
2259
|
-
constructedData["contentMap"] = JSON.stringify(
|
|
2260
|
-
type: "TEXT"
|
|
2261
|
-
});
|
|
2259
|
+
constructedData["contentMap"] = JSON.stringify(contentMap);
|
|
2262
2260
|
if (activityTemplateType === "ORDERING") {
|
|
2263
2261
|
constructedData["orderingBodyMap"] = JSON.stringify(
|
|
2264
2262
|
convertToBodyMapString("ORDERING", bodyMap)
|
|
@@ -3654,14 +3652,14 @@ var DropdownActivityMaterialContent = ({
|
|
|
3654
3652
|
},
|
|
3655
3653
|
index2
|
|
3656
3654
|
)) }) }),
|
|
3657
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ jsx18("div", { className: "absolute top-
|
|
3655
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ jsx18("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ jsx18(
|
|
3658
3656
|
BaseImage_default,
|
|
3659
3657
|
{
|
|
3660
3658
|
src: "/icons/checkbox.png",
|
|
3661
3659
|
alt: "chekbbox",
|
|
3662
3660
|
size: "small"
|
|
3663
3661
|
}
|
|
3664
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx18("div", { className: "absolute top-
|
|
3662
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx18("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ jsx18(
|
|
3665
3663
|
BaseImage_default,
|
|
3666
3664
|
{
|
|
3667
3665
|
src: "/icons/cross-red.png",
|
|
@@ -5706,26 +5704,17 @@ var ActivitySolutionContent = ({
|
|
|
5706
5704
|
};
|
|
5707
5705
|
var ActivitySolutionContent_default = ActivitySolutionContent;
|
|
5708
5706
|
|
|
5709
|
-
// src/components/
|
|
5710
|
-
import {
|
|
5711
|
-
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
5712
|
-
return /* @__PURE__ */ jsx40(
|
|
5713
|
-
"div",
|
|
5714
|
-
{
|
|
5715
|
-
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
5716
|
-
}
|
|
5717
|
-
);
|
|
5718
|
-
};
|
|
5719
|
-
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
5707
|
+
// src/components/activities/ActivityPreviewByData.tsx
|
|
5708
|
+
import { useEffect as useEffect11, useState as useState19 } from "react";
|
|
5720
5709
|
|
|
5721
5710
|
// src/components/boxes/SelectionBox.tsx
|
|
5722
|
-
import { jsx as
|
|
5711
|
+
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5723
5712
|
var SelectionBox = ({
|
|
5724
5713
|
optionList,
|
|
5725
5714
|
selectedId,
|
|
5726
5715
|
handleSelectOnClick
|
|
5727
5716
|
}) => {
|
|
5728
|
-
return /* @__PURE__ */
|
|
5717
|
+
return /* @__PURE__ */ jsx40("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx40(
|
|
5729
5718
|
"div",
|
|
5730
5719
|
{
|
|
5731
5720
|
className: `${option.id === selectedId ? "border-catchup-blue-400" : "border-catchup-gray-100 hover:border-catchup-blue-500"} border-2 rounded-catchup-xlarge py-3 px-8 cursor-pointer duration-300 transition-all`,
|
|
@@ -5737,9 +5726,9 @@ var SelectionBox = ({
|
|
|
5737
5726
|
{
|
|
5738
5727
|
className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
|
|
5739
5728
|
children: [
|
|
5740
|
-
/* @__PURE__ */
|
|
5729
|
+
/* @__PURE__ */ jsx40("div", { children: option.icon }),
|
|
5741
5730
|
/* @__PURE__ */ jsxs31("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
5742
|
-
/* @__PURE__ */
|
|
5731
|
+
/* @__PURE__ */ jsx40("p", { children: option.text }),
|
|
5743
5732
|
option.subText ? /* @__PURE__ */ jsxs31("p", { className: "text-md", children: [
|
|
5744
5733
|
"(",
|
|
5745
5734
|
option.subText,
|
|
@@ -5755,15 +5744,176 @@ var SelectionBox = ({
|
|
|
5755
5744
|
};
|
|
5756
5745
|
var SelectionBox_default = SelectionBox;
|
|
5757
5746
|
|
|
5747
|
+
// src/components/activities/ActivityPreviewByData.tsx
|
|
5748
|
+
import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5749
|
+
var ActivityPreviewByData = ({
|
|
5750
|
+
data,
|
|
5751
|
+
showType,
|
|
5752
|
+
lockedType,
|
|
5753
|
+
typeOptionList
|
|
5754
|
+
}) => {
|
|
5755
|
+
const [selectedType, setSelectedType] = useState19(null);
|
|
5756
|
+
useEffect11(() => {
|
|
5757
|
+
if (!typeOptionList) return;
|
|
5758
|
+
if (typeOptionList.length === 0) return;
|
|
5759
|
+
const foundTypeOption = typeOptionList.find(
|
|
5760
|
+
(typeOption) => typeOption.id === lockedType
|
|
5761
|
+
);
|
|
5762
|
+
if (!foundTypeOption) return;
|
|
5763
|
+
setSelectedType(foundTypeOption.id);
|
|
5764
|
+
}, [typeOptionList]);
|
|
5765
|
+
if (!data) return;
|
|
5766
|
+
const answer = constructAnswerBasedOnData(data);
|
|
5767
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
5768
|
+
showType ? /* @__PURE__ */ jsx41(
|
|
5769
|
+
SelectionBox_default,
|
|
5770
|
+
{
|
|
5771
|
+
optionList: typeOptionList,
|
|
5772
|
+
selectedId: selectedType,
|
|
5773
|
+
handleSelectOnClick: (itemId) => {
|
|
5774
|
+
setSelectedType(itemId);
|
|
5775
|
+
}
|
|
5776
|
+
}
|
|
5777
|
+
) : null,
|
|
5778
|
+
selectedType ? selectedType === "ORDERING" ? /* @__PURE__ */ jsx41(
|
|
5779
|
+
OrderingActivityContent_default,
|
|
5780
|
+
{
|
|
5781
|
+
answer,
|
|
5782
|
+
changeAnswer: () => {
|
|
5783
|
+
},
|
|
5784
|
+
canAnswerQuestion: () => {
|
|
5785
|
+
return true;
|
|
5786
|
+
},
|
|
5787
|
+
data,
|
|
5788
|
+
isPreview: true,
|
|
5789
|
+
showCorrectAnswer: true
|
|
5790
|
+
}
|
|
5791
|
+
) : selectedType === "DROPDOWN" ? /* @__PURE__ */ jsx41(
|
|
5792
|
+
DropdownActivityContent_default,
|
|
5793
|
+
{
|
|
5794
|
+
answer,
|
|
5795
|
+
changeAnswer: () => {
|
|
5796
|
+
},
|
|
5797
|
+
canAnswerQuestion: () => {
|
|
5798
|
+
return true;
|
|
5799
|
+
},
|
|
5800
|
+
data,
|
|
5801
|
+
isPreview: true,
|
|
5802
|
+
showCorrectAnswer: true
|
|
5803
|
+
}
|
|
5804
|
+
) : selectedType === "MCSA" ? /* @__PURE__ */ jsx41(
|
|
5805
|
+
MCSAActivityContent_default,
|
|
5806
|
+
{
|
|
5807
|
+
answer,
|
|
5808
|
+
changeAnswer: () => {
|
|
5809
|
+
},
|
|
5810
|
+
canAnswerQuestion: () => {
|
|
5811
|
+
return true;
|
|
5812
|
+
},
|
|
5813
|
+
data,
|
|
5814
|
+
isPreview: true,
|
|
5815
|
+
showCorrectAnswer: true
|
|
5816
|
+
}
|
|
5817
|
+
) : selectedType === "MCMA" ? /* @__PURE__ */ jsx41(
|
|
5818
|
+
MCMAActivityContent_default,
|
|
5819
|
+
{
|
|
5820
|
+
answer,
|
|
5821
|
+
changeAnswer: () => {
|
|
5822
|
+
},
|
|
5823
|
+
canAnswerQuestion: () => {
|
|
5824
|
+
return true;
|
|
5825
|
+
},
|
|
5826
|
+
data,
|
|
5827
|
+
isPreview: true,
|
|
5828
|
+
showCorrectAnswer: true
|
|
5829
|
+
}
|
|
5830
|
+
) : selectedType === "MATCHING" ? /* @__PURE__ */ jsx41(
|
|
5831
|
+
MatchingActivityContent_default,
|
|
5832
|
+
{
|
|
5833
|
+
answer,
|
|
5834
|
+
changeAnswer: () => {
|
|
5835
|
+
},
|
|
5836
|
+
canAnswerQuestion: () => {
|
|
5837
|
+
return true;
|
|
5838
|
+
},
|
|
5839
|
+
data,
|
|
5840
|
+
isPreview: true,
|
|
5841
|
+
showCorrectAnswer: true
|
|
5842
|
+
}
|
|
5843
|
+
) : selectedType === "GROUPING" ? /* @__PURE__ */ jsx41(
|
|
5844
|
+
GroupingActivityContent_default,
|
|
5845
|
+
{
|
|
5846
|
+
answer,
|
|
5847
|
+
changeAnswer: () => {
|
|
5848
|
+
},
|
|
5849
|
+
canAnswerQuestion: () => {
|
|
5850
|
+
return true;
|
|
5851
|
+
},
|
|
5852
|
+
data,
|
|
5853
|
+
isPreview: true,
|
|
5854
|
+
showCorrectAnswer: true
|
|
5855
|
+
}
|
|
5856
|
+
) : selectedType === "FILL_IN_THE_BLANKS" ? /* @__PURE__ */ jsx41(
|
|
5857
|
+
FillInTheBlanksActivityContent_default,
|
|
5858
|
+
{
|
|
5859
|
+
answer,
|
|
5860
|
+
changeAnswer: () => {
|
|
5861
|
+
},
|
|
5862
|
+
canAnswerQuestion: () => {
|
|
5863
|
+
return true;
|
|
5864
|
+
},
|
|
5865
|
+
data,
|
|
5866
|
+
isPreview: true,
|
|
5867
|
+
showCorrectAnswer: true
|
|
5868
|
+
}
|
|
5869
|
+
) : selectedType === "OPEN_ENDED" ? /* @__PURE__ */ jsx41(
|
|
5870
|
+
OpenEndedActivityContent_default,
|
|
5871
|
+
{
|
|
5872
|
+
answer,
|
|
5873
|
+
changeAnswer: () => {
|
|
5874
|
+
},
|
|
5875
|
+
showMaterialContent: false,
|
|
5876
|
+
data
|
|
5877
|
+
}
|
|
5878
|
+
) : selectedType === "TRUE_FALSE" ? /* @__PURE__ */ jsx41(
|
|
5879
|
+
TrueFalseActivityContent_default,
|
|
5880
|
+
{
|
|
5881
|
+
answer,
|
|
5882
|
+
changeAnswer: () => {
|
|
5883
|
+
},
|
|
5884
|
+
canAnswerQuestion: () => {
|
|
5885
|
+
return true;
|
|
5886
|
+
},
|
|
5887
|
+
data,
|
|
5888
|
+
isPreview: true,
|
|
5889
|
+
showCorrectAnswer: true
|
|
5890
|
+
}
|
|
5891
|
+
) : null : null
|
|
5892
|
+
] });
|
|
5893
|
+
};
|
|
5894
|
+
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
5895
|
+
|
|
5896
|
+
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
5897
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
5898
|
+
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
5899
|
+
return /* @__PURE__ */ jsx42(
|
|
5900
|
+
"div",
|
|
5901
|
+
{
|
|
5902
|
+
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
5903
|
+
}
|
|
5904
|
+
);
|
|
5905
|
+
};
|
|
5906
|
+
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
5907
|
+
|
|
5758
5908
|
// src/components/boxes/SelectionCheckbox.tsx
|
|
5759
|
-
import { jsx as
|
|
5909
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5760
5910
|
var SelectionCheckbox = ({
|
|
5761
5911
|
optionList,
|
|
5762
5912
|
selectedIdList,
|
|
5763
5913
|
handleSelectOnClick,
|
|
5764
5914
|
handleRemoveOnClick
|
|
5765
5915
|
}) => {
|
|
5766
|
-
return /* @__PURE__ */
|
|
5916
|
+
return /* @__PURE__ */ jsx43("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx43(
|
|
5767
5917
|
"div",
|
|
5768
5918
|
{
|
|
5769
5919
|
className: `${selectedIdList.findIndex(
|
|
@@ -5778,14 +5928,14 @@ var SelectionCheckbox = ({
|
|
|
5778
5928
|
handleRemoveOnClick(option.id);
|
|
5779
5929
|
}
|
|
5780
5930
|
},
|
|
5781
|
-
children: /* @__PURE__ */
|
|
5931
|
+
children: /* @__PURE__ */ jsxs33(
|
|
5782
5932
|
"div",
|
|
5783
5933
|
{
|
|
5784
5934
|
className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
|
|
5785
5935
|
(selectedId) => selectedId === option.id
|
|
5786
5936
|
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
5787
5937
|
children: [
|
|
5788
|
-
/* @__PURE__ */
|
|
5938
|
+
/* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43(
|
|
5789
5939
|
BaseImage_default,
|
|
5790
5940
|
{
|
|
5791
5941
|
src: selectedIdList.findIndex(
|
|
@@ -5795,7 +5945,7 @@ var SelectionCheckbox = ({
|
|
|
5795
5945
|
size: "small"
|
|
5796
5946
|
}
|
|
5797
5947
|
) }),
|
|
5798
|
-
/* @__PURE__ */
|
|
5948
|
+
/* @__PURE__ */ jsx43("div", { className: "flex-1", children: /* @__PURE__ */ jsx43("p", { children: option.text }) })
|
|
5799
5949
|
]
|
|
5800
5950
|
}
|
|
5801
5951
|
)
|
|
@@ -5806,7 +5956,7 @@ var SelectionCheckbox = ({
|
|
|
5806
5956
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
5807
5957
|
|
|
5808
5958
|
// src/components/tabs/SelectionTab.tsx
|
|
5809
|
-
import { jsx as
|
|
5959
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
5810
5960
|
var SelectionTab = ({
|
|
5811
5961
|
optionList,
|
|
5812
5962
|
selectedId,
|
|
@@ -5816,7 +5966,7 @@ var SelectionTab = ({
|
|
|
5816
5966
|
textColor,
|
|
5817
5967
|
borderColor
|
|
5818
5968
|
}) => {
|
|
5819
|
-
return /* @__PURE__ */
|
|
5969
|
+
return /* @__PURE__ */ jsx44("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-lg text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx44(
|
|
5820
5970
|
"div",
|
|
5821
5971
|
{
|
|
5822
5972
|
className: `${selectedId === option.id ? selectedTextColor ? selectedTextColor : "text-catchup-blue-500" : textColor ? textColor : "text-catchup-gray-300"} ${selectedId === option.id ? selectedBorderColor ? selectedBorderColor : "border-catchup-blue-500" : borderColor ? borderColor : "border-catchup-gray-50"} border-b-2 transition-all duration-300 p-3 cursor-pointer`,
|
|
@@ -5831,57 +5981,57 @@ var SelectionTab = ({
|
|
|
5831
5981
|
var SelectionTab_default = SelectionTab;
|
|
5832
5982
|
|
|
5833
5983
|
// src/components/labels/ActivityTemplateLabel.tsx
|
|
5834
|
-
import { jsx as
|
|
5984
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5835
5985
|
var ActivityTemplateLabel = ({
|
|
5836
5986
|
title,
|
|
5837
5987
|
font
|
|
5838
5988
|
}) => {
|
|
5839
|
-
return /* @__PURE__ */
|
|
5840
|
-
/* @__PURE__ */
|
|
5841
|
-
/* @__PURE__ */
|
|
5989
|
+
return /* @__PURE__ */ jsx45("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs34("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5990
|
+
/* @__PURE__ */ jsx45(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
|
|
5991
|
+
/* @__PURE__ */ jsx45("p", { className: font ? font : "text-sm", children: title })
|
|
5842
5992
|
] }) });
|
|
5843
5993
|
};
|
|
5844
5994
|
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
5845
5995
|
|
|
5846
5996
|
// src/components/labels/BrandLabel.tsx
|
|
5847
|
-
import { jsx as
|
|
5997
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5848
5998
|
var BrandLabel = ({ title, icon, font }) => {
|
|
5849
|
-
return /* @__PURE__ */
|
|
5850
|
-
icon ? icon : /* @__PURE__ */
|
|
5851
|
-
/* @__PURE__ */
|
|
5999
|
+
return /* @__PURE__ */ jsx46("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6000
|
+
icon ? icon : /* @__PURE__ */ jsx46(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
|
|
6001
|
+
/* @__PURE__ */ jsx46("p", { className: font ? font : "text-sm", children: title })
|
|
5852
6002
|
] }) });
|
|
5853
6003
|
};
|
|
5854
6004
|
var BrandLabel_default = BrandLabel;
|
|
5855
6005
|
|
|
5856
6006
|
// src/components/labels/CoterieLabel.tsx
|
|
5857
|
-
import { jsx as
|
|
6007
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5858
6008
|
var CoterieLabel = ({ title, font }) => {
|
|
5859
|
-
return /* @__PURE__ */
|
|
6009
|
+
return /* @__PURE__ */ jsx47("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsx47("p", { className: font ? font : "text-sm", children: title }) });
|
|
5860
6010
|
};
|
|
5861
6011
|
var CoterieLabel_default = CoterieLabel;
|
|
5862
6012
|
|
|
5863
6013
|
// src/components/labels/GradeLabel.tsx
|
|
5864
|
-
import { jsx as
|
|
6014
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
5865
6015
|
var GradeLabel = ({ title, font }) => {
|
|
5866
|
-
return /* @__PURE__ */
|
|
6016
|
+
return /* @__PURE__ */ jsx48("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsx48("p", { className: font ? font : "text-sm", children: title }) });
|
|
5867
6017
|
};
|
|
5868
6018
|
var GradeLabel_default = GradeLabel;
|
|
5869
6019
|
|
|
5870
6020
|
// src/components/labels/OutcomeLabel.tsx
|
|
5871
|
-
import { jsx as
|
|
6021
|
+
import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5872
6022
|
var OutcomeLabel = ({ title, font }) => {
|
|
5873
|
-
return /* @__PURE__ */
|
|
5874
|
-
/* @__PURE__ */
|
|
5875
|
-
/* @__PURE__ */
|
|
6023
|
+
return /* @__PURE__ */ jsx49("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs36("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6024
|
+
/* @__PURE__ */ jsx49(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
|
|
6025
|
+
/* @__PURE__ */ jsx49("p", { className: font ? font : "text-sm", children: title })
|
|
5876
6026
|
] }) });
|
|
5877
6027
|
};
|
|
5878
6028
|
var OutcomeLabel_default = OutcomeLabel;
|
|
5879
6029
|
|
|
5880
6030
|
// src/components/labels/PersonalLabel.tsx
|
|
5881
|
-
import { jsx as
|
|
6031
|
+
import { jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5882
6032
|
var PersonalLabel = ({ title, icon, font }) => {
|
|
5883
|
-
return /* @__PURE__ */
|
|
5884
|
-
icon ? icon : /* @__PURE__ */
|
|
6033
|
+
return /* @__PURE__ */ jsx50("div", { className: "px-3 py-1 gap-x-3 border border-personal-label-border bg-personal-label text-personal-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6034
|
+
icon ? icon : /* @__PURE__ */ jsx50(
|
|
5885
6035
|
BaseImage_default,
|
|
5886
6036
|
{
|
|
5887
6037
|
src: "/icons/personal-label.png",
|
|
@@ -5889,16 +6039,16 @@ var PersonalLabel = ({ title, icon, font }) => {
|
|
|
5889
6039
|
size: "xsmall"
|
|
5890
6040
|
}
|
|
5891
6041
|
),
|
|
5892
|
-
/* @__PURE__ */
|
|
6042
|
+
/* @__PURE__ */ jsx50("p", { className: font ? font : "text-sm", children: title })
|
|
5893
6043
|
] }) });
|
|
5894
6044
|
};
|
|
5895
6045
|
var PersonalLabel_default = PersonalLabel;
|
|
5896
6046
|
|
|
5897
6047
|
// src/components/labels/PublishingHouseLabel.tsx
|
|
5898
|
-
import { jsx as
|
|
6048
|
+
import { jsx as jsx51, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5899
6049
|
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
5900
|
-
return /* @__PURE__ */
|
|
5901
|
-
icon ? icon : /* @__PURE__ */
|
|
6050
|
+
return /* @__PURE__ */ jsx51("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6051
|
+
icon ? icon : /* @__PURE__ */ jsx51(
|
|
5902
6052
|
BaseImage_default,
|
|
5903
6053
|
{
|
|
5904
6054
|
src: "/icons/publishing-house-label.png",
|
|
@@ -5906,7 +6056,7 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
|
5906
6056
|
size: "xsmall"
|
|
5907
6057
|
}
|
|
5908
6058
|
),
|
|
5909
|
-
/* @__PURE__ */
|
|
6059
|
+
/* @__PURE__ */ jsx51("p", { className: font ? font : "text-sm", children: title })
|
|
5910
6060
|
] }) });
|
|
5911
6061
|
};
|
|
5912
6062
|
var PublishingHouseLabel_default = PublishingHouseLabel;
|
|
@@ -8004,6 +8154,7 @@ var retrieveTokenUsageSubTypeOptionList = () => {
|
|
|
8004
8154
|
];
|
|
8005
8155
|
};
|
|
8006
8156
|
export {
|
|
8157
|
+
ActivityPreviewByData_default as ActivityPreviewByData,
|
|
8007
8158
|
ActivitySolutionContent_default as ActivitySolutionContent,
|
|
8008
8159
|
ActivityTemplateLabel_default as ActivityTemplateLabel,
|
|
8009
8160
|
ApproveButton_default as ApproveButton,
|
package/package.json
CHANGED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { constructAnswerBasedOnData } from "../../utilization/CatchtivityUtilization";
|
|
3
|
+
import DropdownActivityContent from "./DropdownActivityContent";
|
|
4
|
+
import FillInTheBlanksActivityContent from "./FillInTheBlanksActivityContent";
|
|
5
|
+
import GroupingActivityContent from "./GroupingActivityContent";
|
|
6
|
+
import MatchingActivityContent from "./MatchingActivityContent";
|
|
7
|
+
import MCMAActivityContent from "./MCMAActivityContent";
|
|
8
|
+
import MCSAActivityContent from "./MCSAActivityContent";
|
|
9
|
+
import OpenEndedActivityContent from "./OpenEndedActivityContent";
|
|
10
|
+
import OrderingActivityContent from "./OrderingActivityContent";
|
|
11
|
+
import SelectionBox from "../boxes/SelectionBox";
|
|
12
|
+
import TrueFalseActivityContent from "./TrueFalseActivityContent";
|
|
13
|
+
import { IActivityPreviewByDataProps } from "../../properties/ActivityProperties";
|
|
14
|
+
|
|
15
|
+
const ActivityPreviewByData = ({
|
|
16
|
+
data,
|
|
17
|
+
showType,
|
|
18
|
+
lockedType,
|
|
19
|
+
typeOptionList,
|
|
20
|
+
}: IActivityPreviewByDataProps) => {
|
|
21
|
+
const [selectedType, setSelectedType] = useState(null);
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!typeOptionList) return;
|
|
25
|
+
if (typeOptionList.length === 0) return;
|
|
26
|
+
const foundTypeOption = typeOptionList.find(
|
|
27
|
+
(typeOption) => typeOption.id === lockedType
|
|
28
|
+
);
|
|
29
|
+
if (!foundTypeOption) return;
|
|
30
|
+
setSelectedType(foundTypeOption.id);
|
|
31
|
+
}, [typeOptionList]);
|
|
32
|
+
|
|
33
|
+
if (!data) return;
|
|
34
|
+
const answer = constructAnswerBasedOnData(data);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
{showType ? (
|
|
39
|
+
<SelectionBox
|
|
40
|
+
optionList={typeOptionList}
|
|
41
|
+
selectedId={selectedType}
|
|
42
|
+
handleSelectOnClick={(itemId) => {
|
|
43
|
+
setSelectedType(itemId);
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
) : null}
|
|
47
|
+
{selectedType ? (
|
|
48
|
+
selectedType === "ORDERING" ? (
|
|
49
|
+
<OrderingActivityContent
|
|
50
|
+
answer={answer}
|
|
51
|
+
changeAnswer={() => {}}
|
|
52
|
+
canAnswerQuestion={() => {
|
|
53
|
+
return true;
|
|
54
|
+
}}
|
|
55
|
+
data={data}
|
|
56
|
+
isPreview={true}
|
|
57
|
+
showCorrectAnswer={true}
|
|
58
|
+
/>
|
|
59
|
+
) : selectedType === "DROPDOWN" ? (
|
|
60
|
+
<DropdownActivityContent
|
|
61
|
+
answer={answer}
|
|
62
|
+
changeAnswer={() => {}}
|
|
63
|
+
canAnswerQuestion={() => {
|
|
64
|
+
return true;
|
|
65
|
+
}}
|
|
66
|
+
data={data}
|
|
67
|
+
isPreview={true}
|
|
68
|
+
showCorrectAnswer={true}
|
|
69
|
+
/>
|
|
70
|
+
) : selectedType === "MCSA" ? (
|
|
71
|
+
<MCSAActivityContent
|
|
72
|
+
answer={answer}
|
|
73
|
+
changeAnswer={() => {}}
|
|
74
|
+
canAnswerQuestion={() => {
|
|
75
|
+
return true;
|
|
76
|
+
}}
|
|
77
|
+
data={data}
|
|
78
|
+
isPreview={true}
|
|
79
|
+
showCorrectAnswer={true}
|
|
80
|
+
/>
|
|
81
|
+
) : selectedType === "MCMA" ? (
|
|
82
|
+
<MCMAActivityContent
|
|
83
|
+
answer={answer}
|
|
84
|
+
changeAnswer={() => {}}
|
|
85
|
+
canAnswerQuestion={() => {
|
|
86
|
+
return true;
|
|
87
|
+
}}
|
|
88
|
+
data={data}
|
|
89
|
+
isPreview={true}
|
|
90
|
+
showCorrectAnswer={true}
|
|
91
|
+
/>
|
|
92
|
+
) : selectedType === "MATCHING" ? (
|
|
93
|
+
<MatchingActivityContent
|
|
94
|
+
answer={answer}
|
|
95
|
+
changeAnswer={() => {}}
|
|
96
|
+
canAnswerQuestion={() => {
|
|
97
|
+
return true;
|
|
98
|
+
}}
|
|
99
|
+
data={data}
|
|
100
|
+
isPreview={true}
|
|
101
|
+
showCorrectAnswer={true}
|
|
102
|
+
/>
|
|
103
|
+
) : selectedType === "GROUPING" ? (
|
|
104
|
+
<GroupingActivityContent
|
|
105
|
+
answer={answer}
|
|
106
|
+
changeAnswer={() => {}}
|
|
107
|
+
canAnswerQuestion={() => {
|
|
108
|
+
return true;
|
|
109
|
+
}}
|
|
110
|
+
data={data}
|
|
111
|
+
isPreview={true}
|
|
112
|
+
showCorrectAnswer={true}
|
|
113
|
+
/>
|
|
114
|
+
) : selectedType === "FILL_IN_THE_BLANKS" ? (
|
|
115
|
+
<FillInTheBlanksActivityContent
|
|
116
|
+
answer={answer}
|
|
117
|
+
changeAnswer={() => {}}
|
|
118
|
+
canAnswerQuestion={() => {
|
|
119
|
+
return true;
|
|
120
|
+
}}
|
|
121
|
+
data={data}
|
|
122
|
+
isPreview={true}
|
|
123
|
+
showCorrectAnswer={true}
|
|
124
|
+
/>
|
|
125
|
+
) : selectedType === "OPEN_ENDED" ? (
|
|
126
|
+
<OpenEndedActivityContent
|
|
127
|
+
answer={answer}
|
|
128
|
+
changeAnswer={() => {}}
|
|
129
|
+
showMaterialContent={false}
|
|
130
|
+
data={data}
|
|
131
|
+
/>
|
|
132
|
+
) : selectedType === "TRUE_FALSE" ? (
|
|
133
|
+
<TrueFalseActivityContent
|
|
134
|
+
answer={answer}
|
|
135
|
+
changeAnswer={() => {}}
|
|
136
|
+
canAnswerQuestion={() => {
|
|
137
|
+
return true;
|
|
138
|
+
}}
|
|
139
|
+
data={data}
|
|
140
|
+
isPreview={true}
|
|
141
|
+
showCorrectAnswer={true}
|
|
142
|
+
/>
|
|
143
|
+
) : null
|
|
144
|
+
) : null}
|
|
145
|
+
</>
|
|
146
|
+
);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export default ActivityPreviewByData;
|
|
@@ -197,7 +197,7 @@ const DropdownActivityMaterialContent = ({
|
|
|
197
197
|
)}
|
|
198
198
|
</div>
|
|
199
199
|
{learnerAnswerState === "CORRECT" ? (
|
|
200
|
-
<div className="absolute top-
|
|
200
|
+
<div className="absolute -top-2 right-3 bg-catchup-white">
|
|
201
201
|
<BaseImage
|
|
202
202
|
src="/icons/checkbox.png"
|
|
203
203
|
alt="chekbbox"
|
|
@@ -205,7 +205,7 @@ const DropdownActivityMaterialContent = ({
|
|
|
205
205
|
/>
|
|
206
206
|
</div>
|
|
207
207
|
) : learnerAnswerState === "INCORRECT" ? (
|
|
208
|
-
<div className="absolute top-
|
|
208
|
+
<div className="absolute -top-2 right-3 bg-catchup-white">
|
|
209
209
|
<BaseImage
|
|
210
210
|
src="/icons/cross-red.png"
|
|
211
211
|
alt="cross-red"
|
|
@@ -10,7 +10,7 @@ const SelectionTab = ({
|
|
|
10
10
|
borderColor,
|
|
11
11
|
}: ISelectionTabProps) => {
|
|
12
12
|
return (
|
|
13
|
-
<div className="flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-
|
|
13
|
+
<div className="flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-lg text-center">
|
|
14
14
|
{optionList.map((option: any, index: number) => (
|
|
15
15
|
<div
|
|
16
16
|
key={index}
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { default as OpenEndedActivityContent } from "./components/activities/Ope
|
|
|
22
22
|
export { default as OrderingActivityContent } from "./components/activities/OrderingActivityContent";
|
|
23
23
|
export { default as TrueFalseActivityContent } from "./components/activities/TrueFalseActivityContent";
|
|
24
24
|
export { default as ActivitySolutionContent } from "./components/activities/solution-content/ActivitySolutionContent";
|
|
25
|
+
export { default as ActivityPreviewByData } from "./components/activities/ActivityPreviewByData";
|
|
25
26
|
|
|
26
27
|
export { default as BlueVerticalDividerLine } from "./components/dividers/BlueVerticalDividerLine";
|
|
27
28
|
export { default as DividerLine } from "./components/dividers/DividerLine";
|
|
@@ -1728,6 +1728,7 @@ export const convertToEvaluationRubricMapString = (
|
|
|
1728
1728
|
|
|
1729
1729
|
export const constructActivityData = (
|
|
1730
1730
|
activityTemplateType: string,
|
|
1731
|
+
contentMap: any,
|
|
1731
1732
|
bodyMap: any,
|
|
1732
1733
|
materialMap: any,
|
|
1733
1734
|
solutionMap: any,
|
|
@@ -1735,9 +1736,10 @@ export const constructActivityData = (
|
|
|
1735
1736
|
evaluationRubricMap: any
|
|
1736
1737
|
) => {
|
|
1737
1738
|
const constructedData: any = {};
|
|
1738
|
-
constructedData["contentMap"] = JSON.stringify({
|
|
1739
|
-
|
|
1740
|
-
});
|
|
1739
|
+
// constructedData["contentMap"] = JSON.stringify({
|
|
1740
|
+
// type: "TEXT",
|
|
1741
|
+
// });
|
|
1742
|
+
constructedData["contentMap"] = JSON.stringify(contentMap);
|
|
1741
1743
|
if (activityTemplateType === "ORDERING") {
|
|
1742
1744
|
constructedData["orderingBodyMap"] = JSON.stringify(
|
|
1743
1745
|
convertToBodyMapString("ORDERING", bodyMap)
|