catchup-library-web 1.0.14 → 1.0.16

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 CHANGED
@@ -140,6 +140,13 @@ 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
+ showSolution: boolean;
149
+ }
143
150
 
144
151
  declare const DropdownActivityContent: ({ answer, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
145
152
 
@@ -161,6 +168,8 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
161
168
 
162
169
  declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
163
170
 
171
+ declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, showSolution, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
172
+
164
173
  interface IDividerLineProps {
165
174
  opacity: string;
166
175
  }
@@ -610,4 +619,4 @@ declare const retrieveTokenUsageSubTypeOptionList: () => {
610
619
  value: string;
611
620
  }[];
612
621
 
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 };
622
+ 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,13 @@ 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
+ showSolution: boolean;
149
+ }
143
150
 
144
151
  declare const DropdownActivityContent: ({ answer, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
145
152
 
@@ -161,6 +168,8 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
161
168
 
162
169
  declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
163
170
 
171
+ declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, showSolution, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
172
+
164
173
  interface IDividerLineProps {
165
174
  opacity: string;
166
175
  }
@@ -610,4 +619,4 @@ declare const retrieveTokenUsageSubTypeOptionList: () => {
610
619
  value: string;
611
620
  }[];
612
621
 
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 };
622
+ 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,
@@ -5877,41 +5878,32 @@ var ActivitySolutionContent = ({
5877
5878
  };
5878
5879
  var ActivitySolutionContent_default = ActivitySolutionContent;
5879
5880
 
5880
- // src/components/dividers/BlueVerticalDividerLine.tsx
5881
- var import_jsx_runtime40 = require("react/jsx-runtime");
5882
- var BlueVerticalDividerLine = ({ opacity }) => {
5883
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5884
- "div",
5885
- {
5886
- className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
5887
- }
5888
- );
5889
- };
5890
- var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
5881
+ // src/components/activities/ActivityPreviewByData.tsx
5882
+ var import_react24 = require("react");
5891
5883
 
5892
5884
  // src/components/boxes/SelectionBox.tsx
5893
- var import_jsx_runtime41 = require("react/jsx-runtime");
5885
+ var import_jsx_runtime40 = require("react/jsx-runtime");
5894
5886
  var SelectionBox = ({
5895
5887
  optionList,
5896
5888
  selectedId,
5897
5889
  handleSelectOnClick
5898
5890
  }) => {
5899
- return /* @__PURE__ */ (0, import_jsx_runtime41.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_runtime41.jsx)(
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)(
5900
5892
  "div",
5901
5893
  {
5902
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`,
5903
5895
  onClick: () => {
5904
5896
  handleSelectOnClick(option.id);
5905
5897
  },
5906
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
5898
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5907
5899
  "div",
5908
5900
  {
5909
5901
  className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
5910
5902
  children: [
5911
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: option.icon }),
5912
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 flex flex-col items-center", children: [
5913
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: option.text }),
5914
- option.subText ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "text-md", children: [
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: [
5915
5907
  "(",
5916
5908
  option.subText,
5917
5909
  ")"
@@ -5926,15 +5918,184 @@ var SelectionBox = ({
5926
5918
  };
5927
5919
  var SelectionBox_default = SelectionBox;
5928
5920
 
5929
- // src/components/boxes/SelectionCheckbox.tsx
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
+ showSolution
5929
+ }) => {
5930
+ const [selectedType, setSelectedType] = (0, import_react24.useState)(null);
5931
+ (0, import_react24.useEffect)(() => {
5932
+ if (!typeOptionList) return;
5933
+ if (typeOptionList.length === 0) return;
5934
+ const foundTypeOption = typeOptionList.find(
5935
+ (typeOption) => typeOption.id === lockedType
5936
+ );
5937
+ if (!foundTypeOption) return;
5938
+ setSelectedType(foundTypeOption.id);
5939
+ }, [typeOptionList]);
5940
+ if (!data) return;
5941
+ const answer = constructAnswerBasedOnData(data);
5942
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5943
+ showType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5944
+ SelectionBox_default,
5945
+ {
5946
+ optionList: typeOptionList,
5947
+ selectedId: selectedType,
5948
+ handleSelectOnClick: (itemId) => {
5949
+ setSelectedType(itemId);
5950
+ }
5951
+ }
5952
+ ) : null,
5953
+ selectedType ? selectedType === "ORDERING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5954
+ OrderingActivityContent_default,
5955
+ {
5956
+ answer,
5957
+ changeAnswer: () => {
5958
+ },
5959
+ canAnswerQuestion: () => {
5960
+ return true;
5961
+ },
5962
+ data,
5963
+ isPreview: true,
5964
+ showCorrectAnswer: true
5965
+ }
5966
+ ) : selectedType === "DROPDOWN" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5967
+ DropdownActivityContent_default,
5968
+ {
5969
+ answer,
5970
+ changeAnswer: () => {
5971
+ },
5972
+ canAnswerQuestion: () => {
5973
+ return true;
5974
+ },
5975
+ data,
5976
+ isPreview: true,
5977
+ showCorrectAnswer: true
5978
+ }
5979
+ ) : selectedType === "MCSA" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5980
+ MCSAActivityContent_default,
5981
+ {
5982
+ answer,
5983
+ changeAnswer: () => {
5984
+ },
5985
+ canAnswerQuestion: () => {
5986
+ return true;
5987
+ },
5988
+ data,
5989
+ isPreview: true,
5990
+ showCorrectAnswer: true
5991
+ }
5992
+ ) : selectedType === "MCMA" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5993
+ MCMAActivityContent_default,
5994
+ {
5995
+ answer,
5996
+ changeAnswer: () => {
5997
+ },
5998
+ canAnswerQuestion: () => {
5999
+ return true;
6000
+ },
6001
+ data,
6002
+ isPreview: true,
6003
+ showCorrectAnswer: true
6004
+ }
6005
+ ) : selectedType === "MATCHING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6006
+ MatchingActivityContent_default,
6007
+ {
6008
+ answer,
6009
+ changeAnswer: () => {
6010
+ },
6011
+ canAnswerQuestion: () => {
6012
+ return true;
6013
+ },
6014
+ data,
6015
+ isPreview: true,
6016
+ showCorrectAnswer: true
6017
+ }
6018
+ ) : selectedType === "GROUPING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6019
+ GroupingActivityContent_default,
6020
+ {
6021
+ answer,
6022
+ changeAnswer: () => {
6023
+ },
6024
+ canAnswerQuestion: () => {
6025
+ return true;
6026
+ },
6027
+ data,
6028
+ isPreview: true,
6029
+ showCorrectAnswer: true
6030
+ }
6031
+ ) : selectedType === "FILL_IN_THE_BLANKS" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6032
+ FillInTheBlanksActivityContent_default,
6033
+ {
6034
+ answer,
6035
+ changeAnswer: () => {
6036
+ },
6037
+ canAnswerQuestion: () => {
6038
+ return true;
6039
+ },
6040
+ data,
6041
+ isPreview: true,
6042
+ showCorrectAnswer: true
6043
+ }
6044
+ ) : selectedType === "OPEN_ENDED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6045
+ OpenEndedActivityContent_default,
6046
+ {
6047
+ answer,
6048
+ changeAnswer: () => {
6049
+ },
6050
+ showMaterialContent: false,
6051
+ data
6052
+ }
6053
+ ) : selectedType === "TRUE_FALSE" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6054
+ TrueFalseActivityContent_default,
6055
+ {
6056
+ answer,
6057
+ changeAnswer: () => {
6058
+ },
6059
+ canAnswerQuestion: () => {
6060
+ return true;
6061
+ },
6062
+ data,
6063
+ isPreview: true,
6064
+ showCorrectAnswer: true
6065
+ }
6066
+ ) : null : null,
6067
+ selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6068
+ ActivitySolutionContent_default,
6069
+ {
6070
+ activityTemplateType: selectedType,
6071
+ data
6072
+ }
6073
+ ) : null
6074
+ ] });
6075
+ };
6076
+ var ActivityPreviewByData_default = ActivityPreviewByData;
6077
+
6078
+ // src/components/dividers/BlueVerticalDividerLine.tsx
5930
6079
  var import_jsx_runtime42 = require("react/jsx-runtime");
6080
+ var BlueVerticalDividerLine = ({ opacity }) => {
6081
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6082
+ "div",
6083
+ {
6084
+ className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
6085
+ }
6086
+ );
6087
+ };
6088
+ var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
6089
+
6090
+ // src/components/boxes/SelectionCheckbox.tsx
6091
+ var import_jsx_runtime43 = require("react/jsx-runtime");
5931
6092
  var SelectionCheckbox = ({
5932
6093
  optionList,
5933
6094
  selectedIdList,
5934
6095
  handleSelectOnClick,
5935
6096
  handleRemoveOnClick
5936
6097
  }) => {
5937
- return /* @__PURE__ */ (0, import_jsx_runtime42.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_runtime42.jsx)(
6098
+ 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)(
5938
6099
  "div",
5939
6100
  {
5940
6101
  className: `${selectedIdList.findIndex(
@@ -5949,14 +6110,14 @@ var SelectionCheckbox = ({
5949
6110
  handleRemoveOnClick(option.id);
5950
6111
  }
5951
6112
  },
5952
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6113
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5953
6114
  "div",
5954
6115
  {
5955
6116
  className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
5956
6117
  (selectedId) => selectedId === option.id
5957
6118
  ) > -1 ? "opacity-100" : "opacity-50"}`,
5958
6119
  children: [
5959
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6120
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5960
6121
  BaseImage_default,
5961
6122
  {
5962
6123
  src: selectedIdList.findIndex(
@@ -5966,7 +6127,7 @@ var SelectionCheckbox = ({
5966
6127
  size: "small"
5967
6128
  }
5968
6129
  ) }),
5969
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: option.text }) })
6130
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: option.text }) })
5970
6131
  ]
5971
6132
  }
5972
6133
  )
@@ -5977,7 +6138,7 @@ var SelectionCheckbox = ({
5977
6138
  var SelectionCheckbox_default = SelectionCheckbox;
5978
6139
 
5979
6140
  // src/components/tabs/SelectionTab.tsx
5980
- var import_jsx_runtime43 = require("react/jsx-runtime");
6141
+ var import_jsx_runtime44 = require("react/jsx-runtime");
5981
6142
  var SelectionTab = ({
5982
6143
  optionList,
5983
6144
  selectedId,
@@ -5987,14 +6148,17 @@ var SelectionTab = ({
5987
6148
  textColor,
5988
6149
  borderColor
5989
6150
  }) => {
5990
- return /* @__PURE__ */ (0, import_jsx_runtime43.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_runtime43.jsx)(
6151
+ 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-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
5991
6152
  "div",
5992
6153
  {
5993
6154
  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`,
5994
6155
  onClick: () => {
5995
6156
  handleSelectOnClick(option.id);
5996
6157
  },
5997
- children: option.title
6158
+ children: [
6159
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-lg", children: option.title }),
6160
+ option.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-md", children: option.subTitle }) : null
6161
+ ]
5998
6162
  },
5999
6163
  index
6000
6164
  )) });
@@ -6002,57 +6166,57 @@ var SelectionTab = ({
6002
6166
  var SelectionTab_default = SelectionTab;
6003
6167
 
6004
6168
  // src/components/labels/ActivityTemplateLabel.tsx
6005
- var import_jsx_runtime44 = require("react/jsx-runtime");
6169
+ var import_jsx_runtime45 = require("react/jsx-runtime");
6006
6170
  var ActivityTemplateLabel = ({
6007
6171
  title,
6008
6172
  font
6009
6173
  }) => {
6010
- return /* @__PURE__ */ (0, import_jsx_runtime44.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_runtime44.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6011
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
6012
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: font ? font : "text-sm", children: title })
6174
+ 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: [
6175
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
6176
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: font ? font : "text-sm", children: title })
6013
6177
  ] }) });
6014
6178
  };
6015
6179
  var ActivityTemplateLabel_default = ActivityTemplateLabel;
6016
6180
 
6017
6181
  // src/components/labels/BrandLabel.tsx
6018
- var import_jsx_runtime45 = require("react/jsx-runtime");
6182
+ var import_jsx_runtime46 = require("react/jsx-runtime");
6019
6183
  var BrandLabel = ({ title, icon, font }) => {
6020
- return /* @__PURE__ */ (0, import_jsx_runtime45.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_runtime45.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6021
- icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
6022
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: font ? font : "text-sm", children: title })
6184
+ 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: [
6185
+ icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
6186
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: font ? font : "text-sm", children: title })
6023
6187
  ] }) });
6024
6188
  };
6025
6189
  var BrandLabel_default = BrandLabel;
6026
6190
 
6027
6191
  // src/components/labels/CoterieLabel.tsx
6028
- var import_jsx_runtime46 = require("react/jsx-runtime");
6192
+ var import_jsx_runtime47 = require("react/jsx-runtime");
6029
6193
  var CoterieLabel = ({ title, font }) => {
6030
- 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.jsx)("p", { className: font ? font : "text-sm", children: title }) });
6194
+ 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 }) });
6031
6195
  };
6032
6196
  var CoterieLabel_default = CoterieLabel;
6033
6197
 
6034
6198
  // src/components/labels/GradeLabel.tsx
6035
- var import_jsx_runtime47 = require("react/jsx-runtime");
6199
+ var import_jsx_runtime48 = require("react/jsx-runtime");
6036
6200
  var GradeLabel = ({ title, font }) => {
6037
- return /* @__PURE__ */ (0, import_jsx_runtime47.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_runtime47.jsx)("p", { className: font ? font : "text-sm", children: title }) });
6201
+ 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 }) });
6038
6202
  };
6039
6203
  var GradeLabel_default = GradeLabel;
6040
6204
 
6041
6205
  // src/components/labels/OutcomeLabel.tsx
6042
- var import_jsx_runtime48 = require("react/jsx-runtime");
6206
+ var import_jsx_runtime49 = require("react/jsx-runtime");
6043
6207
  var OutcomeLabel = ({ title, font }) => {
6044
- return /* @__PURE__ */ (0, import_jsx_runtime48.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_runtime48.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6045
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
6046
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: font ? font : "text-sm", children: title })
6208
+ 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: [
6209
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
6210
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: font ? font : "text-sm", children: title })
6047
6211
  ] }) });
6048
6212
  };
6049
6213
  var OutcomeLabel_default = OutcomeLabel;
6050
6214
 
6051
6215
  // src/components/labels/PersonalLabel.tsx
6052
- var import_jsx_runtime49 = require("react/jsx-runtime");
6216
+ var import_jsx_runtime50 = require("react/jsx-runtime");
6053
6217
  var PersonalLabel = ({ title, icon, font }) => {
6054
- return /* @__PURE__ */ (0, import_jsx_runtime49.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_runtime49.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6055
- icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6218
+ 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: [
6219
+ icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6056
6220
  BaseImage_default,
6057
6221
  {
6058
6222
  src: "/icons/personal-label.png",
@@ -6060,16 +6224,16 @@ var PersonalLabel = ({ title, icon, font }) => {
6060
6224
  size: "xsmall"
6061
6225
  }
6062
6226
  ),
6063
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: font ? font : "text-sm", children: title })
6227
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: font ? font : "text-sm", children: title })
6064
6228
  ] }) });
6065
6229
  };
6066
6230
  var PersonalLabel_default = PersonalLabel;
6067
6231
 
6068
6232
  // src/components/labels/PublishingHouseLabel.tsx
6069
- var import_jsx_runtime50 = require("react/jsx-runtime");
6233
+ var import_jsx_runtime51 = require("react/jsx-runtime");
6070
6234
  var PublishingHouseLabel = ({ title, icon, font }) => {
6071
- return /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6072
- icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6235
+ 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: [
6236
+ icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6073
6237
  BaseImage_default,
6074
6238
  {
6075
6239
  src: "/icons/publishing-house-label.png",
@@ -6077,7 +6241,7 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
6077
6241
  size: "xsmall"
6078
6242
  }
6079
6243
  ),
6080
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: font ? font : "text-sm", children: title })
6244
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: font ? font : "text-sm", children: title })
6081
6245
  ] }) });
6082
6246
  };
6083
6247
  var PublishingHouseLabel_default = PublishingHouseLabel;
@@ -8176,6 +8340,7 @@ var retrieveTokenUsageSubTypeOptionList = () => {
8176
8340
  };
8177
8341
  // Annotate the CommonJS export names for ESM import in node:
8178
8342
  0 && (module.exports = {
8343
+ ActivityPreviewByData,
8179
8344
  ActivitySolutionContent,
8180
8345
  ActivityTemplateLabel,
8181
8346
  ApproveButton,
package/dist/index.mjs CHANGED
@@ -5704,26 +5704,17 @@ var ActivitySolutionContent = ({
5704
5704
  };
5705
5705
  var ActivitySolutionContent_default = ActivitySolutionContent;
5706
5706
 
5707
- // src/components/dividers/BlueVerticalDividerLine.tsx
5708
- import { jsx as jsx40 } from "react/jsx-runtime";
5709
- var BlueVerticalDividerLine = ({ opacity }) => {
5710
- return /* @__PURE__ */ jsx40(
5711
- "div",
5712
- {
5713
- className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
5714
- }
5715
- );
5716
- };
5717
- var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
5707
+ // src/components/activities/ActivityPreviewByData.tsx
5708
+ import { useEffect as useEffect11, useState as useState19 } from "react";
5718
5709
 
5719
5710
  // src/components/boxes/SelectionBox.tsx
5720
- import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
5711
+ import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
5721
5712
  var SelectionBox = ({
5722
5713
  optionList,
5723
5714
  selectedId,
5724
5715
  handleSelectOnClick
5725
5716
  }) => {
5726
- return /* @__PURE__ */ jsx41("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx41(
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(
5727
5718
  "div",
5728
5719
  {
5729
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`,
@@ -5735,9 +5726,9 @@ var SelectionBox = ({
5735
5726
  {
5736
5727
  className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
5737
5728
  children: [
5738
- /* @__PURE__ */ jsx41("div", { children: option.icon }),
5729
+ /* @__PURE__ */ jsx40("div", { children: option.icon }),
5739
5730
  /* @__PURE__ */ jsxs31("div", { className: "flex-1 flex flex-col items-center", children: [
5740
- /* @__PURE__ */ jsx41("p", { children: option.text }),
5731
+ /* @__PURE__ */ jsx40("p", { children: option.text }),
5741
5732
  option.subText ? /* @__PURE__ */ jsxs31("p", { className: "text-md", children: [
5742
5733
  "(",
5743
5734
  option.subText,
@@ -5753,15 +5744,184 @@ var SelectionBox = ({
5753
5744
  };
5754
5745
  var SelectionBox_default = SelectionBox;
5755
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
+ showSolution
5755
+ }) => {
5756
+ const [selectedType, setSelectedType] = useState19(null);
5757
+ useEffect11(() => {
5758
+ if (!typeOptionList) return;
5759
+ if (typeOptionList.length === 0) return;
5760
+ const foundTypeOption = typeOptionList.find(
5761
+ (typeOption) => typeOption.id === lockedType
5762
+ );
5763
+ if (!foundTypeOption) return;
5764
+ setSelectedType(foundTypeOption.id);
5765
+ }, [typeOptionList]);
5766
+ if (!data) return;
5767
+ const answer = constructAnswerBasedOnData(data);
5768
+ return /* @__PURE__ */ jsxs32(Fragment9, { children: [
5769
+ showType ? /* @__PURE__ */ jsx41(
5770
+ SelectionBox_default,
5771
+ {
5772
+ optionList: typeOptionList,
5773
+ selectedId: selectedType,
5774
+ handleSelectOnClick: (itemId) => {
5775
+ setSelectedType(itemId);
5776
+ }
5777
+ }
5778
+ ) : null,
5779
+ selectedType ? selectedType === "ORDERING" ? /* @__PURE__ */ jsx41(
5780
+ OrderingActivityContent_default,
5781
+ {
5782
+ answer,
5783
+ changeAnswer: () => {
5784
+ },
5785
+ canAnswerQuestion: () => {
5786
+ return true;
5787
+ },
5788
+ data,
5789
+ isPreview: true,
5790
+ showCorrectAnswer: true
5791
+ }
5792
+ ) : selectedType === "DROPDOWN" ? /* @__PURE__ */ jsx41(
5793
+ DropdownActivityContent_default,
5794
+ {
5795
+ answer,
5796
+ changeAnswer: () => {
5797
+ },
5798
+ canAnswerQuestion: () => {
5799
+ return true;
5800
+ },
5801
+ data,
5802
+ isPreview: true,
5803
+ showCorrectAnswer: true
5804
+ }
5805
+ ) : selectedType === "MCSA" ? /* @__PURE__ */ jsx41(
5806
+ MCSAActivityContent_default,
5807
+ {
5808
+ answer,
5809
+ changeAnswer: () => {
5810
+ },
5811
+ canAnswerQuestion: () => {
5812
+ return true;
5813
+ },
5814
+ data,
5815
+ isPreview: true,
5816
+ showCorrectAnswer: true
5817
+ }
5818
+ ) : selectedType === "MCMA" ? /* @__PURE__ */ jsx41(
5819
+ MCMAActivityContent_default,
5820
+ {
5821
+ answer,
5822
+ changeAnswer: () => {
5823
+ },
5824
+ canAnswerQuestion: () => {
5825
+ return true;
5826
+ },
5827
+ data,
5828
+ isPreview: true,
5829
+ showCorrectAnswer: true
5830
+ }
5831
+ ) : selectedType === "MATCHING" ? /* @__PURE__ */ jsx41(
5832
+ MatchingActivityContent_default,
5833
+ {
5834
+ answer,
5835
+ changeAnswer: () => {
5836
+ },
5837
+ canAnswerQuestion: () => {
5838
+ return true;
5839
+ },
5840
+ data,
5841
+ isPreview: true,
5842
+ showCorrectAnswer: true
5843
+ }
5844
+ ) : selectedType === "GROUPING" ? /* @__PURE__ */ jsx41(
5845
+ GroupingActivityContent_default,
5846
+ {
5847
+ answer,
5848
+ changeAnswer: () => {
5849
+ },
5850
+ canAnswerQuestion: () => {
5851
+ return true;
5852
+ },
5853
+ data,
5854
+ isPreview: true,
5855
+ showCorrectAnswer: true
5856
+ }
5857
+ ) : selectedType === "FILL_IN_THE_BLANKS" ? /* @__PURE__ */ jsx41(
5858
+ FillInTheBlanksActivityContent_default,
5859
+ {
5860
+ answer,
5861
+ changeAnswer: () => {
5862
+ },
5863
+ canAnswerQuestion: () => {
5864
+ return true;
5865
+ },
5866
+ data,
5867
+ isPreview: true,
5868
+ showCorrectAnswer: true
5869
+ }
5870
+ ) : selectedType === "OPEN_ENDED" ? /* @__PURE__ */ jsx41(
5871
+ OpenEndedActivityContent_default,
5872
+ {
5873
+ answer,
5874
+ changeAnswer: () => {
5875
+ },
5876
+ showMaterialContent: false,
5877
+ data
5878
+ }
5879
+ ) : selectedType === "TRUE_FALSE" ? /* @__PURE__ */ jsx41(
5880
+ TrueFalseActivityContent_default,
5881
+ {
5882
+ answer,
5883
+ changeAnswer: () => {
5884
+ },
5885
+ canAnswerQuestion: () => {
5886
+ return true;
5887
+ },
5888
+ data,
5889
+ isPreview: true,
5890
+ showCorrectAnswer: true
5891
+ }
5892
+ ) : null : null,
5893
+ selectedType && showSolution ? /* @__PURE__ */ jsx41(
5894
+ ActivitySolutionContent_default,
5895
+ {
5896
+ activityTemplateType: selectedType,
5897
+ data
5898
+ }
5899
+ ) : null
5900
+ ] });
5901
+ };
5902
+ var ActivityPreviewByData_default = ActivityPreviewByData;
5903
+
5904
+ // src/components/dividers/BlueVerticalDividerLine.tsx
5905
+ import { jsx as jsx42 } from "react/jsx-runtime";
5906
+ var BlueVerticalDividerLine = ({ opacity }) => {
5907
+ return /* @__PURE__ */ jsx42(
5908
+ "div",
5909
+ {
5910
+ className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
5911
+ }
5912
+ );
5913
+ };
5914
+ var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
5915
+
5756
5916
  // src/components/boxes/SelectionCheckbox.tsx
5757
- import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
5917
+ import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
5758
5918
  var SelectionCheckbox = ({
5759
5919
  optionList,
5760
5920
  selectedIdList,
5761
5921
  handleSelectOnClick,
5762
5922
  handleRemoveOnClick
5763
5923
  }) => {
5764
- return /* @__PURE__ */ jsx42("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx42(
5924
+ 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(
5765
5925
  "div",
5766
5926
  {
5767
5927
  className: `${selectedIdList.findIndex(
@@ -5776,14 +5936,14 @@ var SelectionCheckbox = ({
5776
5936
  handleRemoveOnClick(option.id);
5777
5937
  }
5778
5938
  },
5779
- children: /* @__PURE__ */ jsxs32(
5939
+ children: /* @__PURE__ */ jsxs33(
5780
5940
  "div",
5781
5941
  {
5782
5942
  className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
5783
5943
  (selectedId) => selectedId === option.id
5784
5944
  ) > -1 ? "opacity-100" : "opacity-50"}`,
5785
5945
  children: [
5786
- /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsx42(
5946
+ /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43(
5787
5947
  BaseImage_default,
5788
5948
  {
5789
5949
  src: selectedIdList.findIndex(
@@ -5793,7 +5953,7 @@ var SelectionCheckbox = ({
5793
5953
  size: "small"
5794
5954
  }
5795
5955
  ) }),
5796
- /* @__PURE__ */ jsx42("div", { className: "flex-1", children: /* @__PURE__ */ jsx42("p", { children: option.text }) })
5956
+ /* @__PURE__ */ jsx43("div", { className: "flex-1", children: /* @__PURE__ */ jsx43("p", { children: option.text }) })
5797
5957
  ]
5798
5958
  }
5799
5959
  )
@@ -5804,7 +5964,7 @@ var SelectionCheckbox = ({
5804
5964
  var SelectionCheckbox_default = SelectionCheckbox;
5805
5965
 
5806
5966
  // src/components/tabs/SelectionTab.tsx
5807
- import { jsx as jsx43 } from "react/jsx-runtime";
5967
+ import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
5808
5968
  var SelectionTab = ({
5809
5969
  optionList,
5810
5970
  selectedId,
@@ -5814,14 +5974,17 @@ var SelectionTab = ({
5814
5974
  textColor,
5815
5975
  borderColor
5816
5976
  }) => {
5817
- return /* @__PURE__ */ jsx43("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__ */ jsx43(
5977
+ return /* @__PURE__ */ jsx44("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsxs34(
5818
5978
  "div",
5819
5979
  {
5820
5980
  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`,
5821
5981
  onClick: () => {
5822
5982
  handleSelectOnClick(option.id);
5823
5983
  },
5824
- children: option.title
5984
+ children: [
5985
+ /* @__PURE__ */ jsx44("p", { className: "text-lg", children: option.title }),
5986
+ option.subTitle ? /* @__PURE__ */ jsx44("p", { className: "text-md", children: option.subTitle }) : null
5987
+ ]
5825
5988
  },
5826
5989
  index
5827
5990
  )) });
@@ -5829,57 +5992,57 @@ var SelectionTab = ({
5829
5992
  var SelectionTab_default = SelectionTab;
5830
5993
 
5831
5994
  // src/components/labels/ActivityTemplateLabel.tsx
5832
- import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
5995
+ import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
5833
5996
  var ActivityTemplateLabel = ({
5834
5997
  title,
5835
5998
  font
5836
5999
  }) => {
5837
- return /* @__PURE__ */ jsx44("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__ */ jsxs33("div", { className: "flex flex-row items-center gap-x-2", children: [
5838
- /* @__PURE__ */ jsx44(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
5839
- /* @__PURE__ */ jsx44("p", { className: font ? font : "text-sm", children: title })
6000
+ 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__ */ jsxs35("div", { className: "flex flex-row items-center gap-x-2", children: [
6001
+ /* @__PURE__ */ jsx45(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
6002
+ /* @__PURE__ */ jsx45("p", { className: font ? font : "text-sm", children: title })
5840
6003
  ] }) });
5841
6004
  };
5842
6005
  var ActivityTemplateLabel_default = ActivityTemplateLabel;
5843
6006
 
5844
6007
  // src/components/labels/BrandLabel.tsx
5845
- import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
6008
+ import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
5846
6009
  var BrandLabel = ({ title, icon, font }) => {
5847
- return /* @__PURE__ */ jsx45("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__ */ jsxs34("div", { className: "flex flex-row items-center gap-x-2", children: [
5848
- icon ? icon : /* @__PURE__ */ jsx45(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
5849
- /* @__PURE__ */ jsx45("p", { className: font ? font : "text-sm", children: title })
6010
+ 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__ */ jsxs36("div", { className: "flex flex-row items-center gap-x-2", children: [
6011
+ icon ? icon : /* @__PURE__ */ jsx46(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
6012
+ /* @__PURE__ */ jsx46("p", { className: font ? font : "text-sm", children: title })
5850
6013
  ] }) });
5851
6014
  };
5852
6015
  var BrandLabel_default = BrandLabel;
5853
6016
 
5854
6017
  // src/components/labels/CoterieLabel.tsx
5855
- import { jsx as jsx46 } from "react/jsx-runtime";
6018
+ import { jsx as jsx47 } from "react/jsx-runtime";
5856
6019
  var CoterieLabel = ({ title, font }) => {
5857
- 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__ */ jsx46("p", { className: font ? font : "text-sm", children: title }) });
6020
+ 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 }) });
5858
6021
  };
5859
6022
  var CoterieLabel_default = CoterieLabel;
5860
6023
 
5861
6024
  // src/components/labels/GradeLabel.tsx
5862
- import { jsx as jsx47 } from "react/jsx-runtime";
6025
+ import { jsx as jsx48 } from "react/jsx-runtime";
5863
6026
  var GradeLabel = ({ title, font }) => {
5864
- return /* @__PURE__ */ jsx47("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__ */ jsx47("p", { className: font ? font : "text-sm", children: title }) });
6027
+ 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 }) });
5865
6028
  };
5866
6029
  var GradeLabel_default = GradeLabel;
5867
6030
 
5868
6031
  // src/components/labels/OutcomeLabel.tsx
5869
- import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
6032
+ import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
5870
6033
  var OutcomeLabel = ({ title, font }) => {
5871
- return /* @__PURE__ */ jsx48("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: [
5872
- /* @__PURE__ */ jsx48(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
5873
- /* @__PURE__ */ jsx48("p", { className: font ? font : "text-sm", children: title })
6034
+ 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__ */ jsxs37("div", { className: "flex flex-row items-center gap-x-2", children: [
6035
+ /* @__PURE__ */ jsx49(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
6036
+ /* @__PURE__ */ jsx49("p", { className: font ? font : "text-sm", children: title })
5874
6037
  ] }) });
5875
6038
  };
5876
6039
  var OutcomeLabel_default = OutcomeLabel;
5877
6040
 
5878
6041
  // src/components/labels/PersonalLabel.tsx
5879
- import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
6042
+ import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
5880
6043
  var PersonalLabel = ({ title, icon, font }) => {
5881
- return /* @__PURE__ */ jsx49("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__ */ jsxs36("div", { className: "flex flex-row items-center gap-x-2", children: [
5882
- icon ? icon : /* @__PURE__ */ jsx49(
6044
+ 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__ */ jsxs38("div", { className: "flex flex-row items-center gap-x-2", children: [
6045
+ icon ? icon : /* @__PURE__ */ jsx50(
5883
6046
  BaseImage_default,
5884
6047
  {
5885
6048
  src: "/icons/personal-label.png",
@@ -5887,16 +6050,16 @@ var PersonalLabel = ({ title, icon, font }) => {
5887
6050
  size: "xsmall"
5888
6051
  }
5889
6052
  ),
5890
- /* @__PURE__ */ jsx49("p", { className: font ? font : "text-sm", children: title })
6053
+ /* @__PURE__ */ jsx50("p", { className: font ? font : "text-sm", children: title })
5891
6054
  ] }) });
5892
6055
  };
5893
6056
  var PersonalLabel_default = PersonalLabel;
5894
6057
 
5895
6058
  // src/components/labels/PublishingHouseLabel.tsx
5896
- import { jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
6059
+ import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
5897
6060
  var PublishingHouseLabel = ({ title, icon, font }) => {
5898
- return /* @__PURE__ */ jsx50("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__ */ jsxs37("div", { className: "flex flex-row items-center gap-x-2", children: [
5899
- icon ? icon : /* @__PURE__ */ jsx50(
6061
+ 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__ */ jsxs39("div", { className: "flex flex-row items-center gap-x-2", children: [
6062
+ icon ? icon : /* @__PURE__ */ jsx51(
5900
6063
  BaseImage_default,
5901
6064
  {
5902
6065
  src: "/icons/publishing-house-label.png",
@@ -5904,7 +6067,7 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
5904
6067
  size: "xsmall"
5905
6068
  }
5906
6069
  ),
5907
- /* @__PURE__ */ jsx50("p", { className: font ? font : "text-sm", children: title })
6070
+ /* @__PURE__ */ jsx51("p", { className: font ? font : "text-sm", children: title })
5908
6071
  ] }) });
5909
6072
  };
5910
6073
  var PublishingHouseLabel_default = PublishingHouseLabel;
@@ -8002,6 +8165,7 @@ var retrieveTokenUsageSubTypeOptionList = () => {
8002
8165
  ];
8003
8166
  };
8004
8167
  export {
8168
+ ActivityPreviewByData_default as ActivityPreviewByData,
8005
8169
  ActivitySolutionContent_default as ActivitySolutionContent,
8006
8170
  ActivityTemplateLabel_default as ActivityTemplateLabel,
8007
8171
  ApproveButton_default as ApproveButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -0,0 +1,157 @@
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
+ import ActivitySolutionContent from "./solution-content/ActivitySolutionContent";
15
+
16
+ const ActivityPreviewByData = ({
17
+ data,
18
+ showType,
19
+ lockedType,
20
+ typeOptionList,
21
+ showSolution,
22
+ }: IActivityPreviewByDataProps) => {
23
+ const [selectedType, setSelectedType] = useState(null);
24
+
25
+ useEffect(() => {
26
+ if (!typeOptionList) return;
27
+ if (typeOptionList.length === 0) return;
28
+ const foundTypeOption = typeOptionList.find(
29
+ (typeOption) => typeOption.id === lockedType
30
+ );
31
+ if (!foundTypeOption) return;
32
+ setSelectedType(foundTypeOption.id);
33
+ }, [typeOptionList]);
34
+
35
+ if (!data) return;
36
+ const answer = constructAnswerBasedOnData(data);
37
+
38
+ return (
39
+ <>
40
+ {showType ? (
41
+ <SelectionBox
42
+ optionList={typeOptionList}
43
+ selectedId={selectedType}
44
+ handleSelectOnClick={(itemId) => {
45
+ setSelectedType(itemId);
46
+ }}
47
+ />
48
+ ) : null}
49
+ {selectedType ? (
50
+ selectedType === "ORDERING" ? (
51
+ <OrderingActivityContent
52
+ answer={answer}
53
+ changeAnswer={() => {}}
54
+ canAnswerQuestion={() => {
55
+ return true;
56
+ }}
57
+ data={data}
58
+ isPreview={true}
59
+ showCorrectAnswer={true}
60
+ />
61
+ ) : selectedType === "DROPDOWN" ? (
62
+ <DropdownActivityContent
63
+ answer={answer}
64
+ changeAnswer={() => {}}
65
+ canAnswerQuestion={() => {
66
+ return true;
67
+ }}
68
+ data={data}
69
+ isPreview={true}
70
+ showCorrectAnswer={true}
71
+ />
72
+ ) : selectedType === "MCSA" ? (
73
+ <MCSAActivityContent
74
+ answer={answer}
75
+ changeAnswer={() => {}}
76
+ canAnswerQuestion={() => {
77
+ return true;
78
+ }}
79
+ data={data}
80
+ isPreview={true}
81
+ showCorrectAnswer={true}
82
+ />
83
+ ) : selectedType === "MCMA" ? (
84
+ <MCMAActivityContent
85
+ answer={answer}
86
+ changeAnswer={() => {}}
87
+ canAnswerQuestion={() => {
88
+ return true;
89
+ }}
90
+ data={data}
91
+ isPreview={true}
92
+ showCorrectAnswer={true}
93
+ />
94
+ ) : selectedType === "MATCHING" ? (
95
+ <MatchingActivityContent
96
+ answer={answer}
97
+ changeAnswer={() => {}}
98
+ canAnswerQuestion={() => {
99
+ return true;
100
+ }}
101
+ data={data}
102
+ isPreview={true}
103
+ showCorrectAnswer={true}
104
+ />
105
+ ) : selectedType === "GROUPING" ? (
106
+ <GroupingActivityContent
107
+ answer={answer}
108
+ changeAnswer={() => {}}
109
+ canAnswerQuestion={() => {
110
+ return true;
111
+ }}
112
+ data={data}
113
+ isPreview={true}
114
+ showCorrectAnswer={true}
115
+ />
116
+ ) : selectedType === "FILL_IN_THE_BLANKS" ? (
117
+ <FillInTheBlanksActivityContent
118
+ answer={answer}
119
+ changeAnswer={() => {}}
120
+ canAnswerQuestion={() => {
121
+ return true;
122
+ }}
123
+ data={data}
124
+ isPreview={true}
125
+ showCorrectAnswer={true}
126
+ />
127
+ ) : selectedType === "OPEN_ENDED" ? (
128
+ <OpenEndedActivityContent
129
+ answer={answer}
130
+ changeAnswer={() => {}}
131
+ showMaterialContent={false}
132
+ data={data}
133
+ />
134
+ ) : selectedType === "TRUE_FALSE" ? (
135
+ <TrueFalseActivityContent
136
+ answer={answer}
137
+ changeAnswer={() => {}}
138
+ canAnswerQuestion={() => {
139
+ return true;
140
+ }}
141
+ data={data}
142
+ isPreview={true}
143
+ showCorrectAnswer={true}
144
+ />
145
+ ) : null
146
+ ) : null}
147
+ {selectedType && showSolution ? (
148
+ <ActivitySolutionContent
149
+ activityTemplateType={selectedType}
150
+ data={data}
151
+ />
152
+ ) : null}
153
+ </>
154
+ );
155
+ };
156
+
157
+ export default ActivityPreviewByData;
@@ -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-2 text-lg text-center">
13
+ <div className="flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-center">
14
14
  {optionList.map((option: any, index: number) => (
15
15
  <div
16
16
  key={index}
@@ -35,7 +35,10 @@ const SelectionTab = ({
35
35
  handleSelectOnClick(option.id);
36
36
  }}
37
37
  >
38
- {option.title}
38
+ <p className="text-lg">{option.title}</p>
39
+ {option.subTitle ? (
40
+ <p className="text-md">{option.subTitle}</p>
41
+ ) : null}
39
42
  </div>
40
43
  ))}
41
44
  </div>
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";
@@ -202,3 +202,11 @@ export interface IActivitySolutionProps {
202
202
  activityTemplateType: string;
203
203
  data: any;
204
204
  }
205
+
206
+ export interface IActivityPreviewByDataProps {
207
+ data: any;
208
+ showType: boolean;
209
+ lockedType: string;
210
+ typeOptionList: any[];
211
+ showSolution: boolean;
212
+ }