catchup-library-web 1.20.21 → 1.20.23
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 +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +36 -20
- package/dist/index.mjs +35 -19
- package/package.json +1 -1
- package/src/utilization/CatchtivityUtilization.ts +17 -0
- package/src/utilization/DateUtilization.ts +26 -20
package/dist/index.d.mts
CHANGED
|
@@ -603,6 +603,10 @@ declare const retrieveOpticalExamPartTypeOptionList: () => {
|
|
|
603
603
|
value: string;
|
|
604
604
|
text: string;
|
|
605
605
|
}[];
|
|
606
|
+
declare const retrievDelayOptionList: () => {
|
|
607
|
+
value: string;
|
|
608
|
+
text: string;
|
|
609
|
+
}[];
|
|
606
610
|
|
|
607
611
|
declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
608
612
|
value: string;
|
|
@@ -627,7 +631,6 @@ declare const retrieveDateIntervalOptionList: () => {
|
|
|
627
631
|
}[];
|
|
628
632
|
declare const calculateStartDateOfWeek: (date: Date, isGMT: boolean) => Date;
|
|
629
633
|
declare const calculateEndDateOfWeek: (date: Date, isGMT: boolean) => Date;
|
|
630
|
-
declare const adjustForTimezone: (date: Date) => Date;
|
|
631
634
|
declare const constructMonthName: (date: Date) => string;
|
|
632
635
|
declare const constructWeekName: (beginDate: Date, endDate: Date, untilSunday: boolean) => string;
|
|
633
636
|
declare const retrieveTimeFilterOptionList: (isDetailed: boolean) => {
|
|
@@ -869,4 +872,4 @@ declare const retrieveActivityMethodologyOptionList: () => {
|
|
|
869
872
|
text: string;
|
|
870
873
|
}[];
|
|
871
874
|
|
|
872
|
-
export { ActivityBodyContent, ActivityEmptyContent, ActivityEvaluationRubricContent, ActivityLabel, ActivityPreviewByAnswerData, ActivityPreviewByData, ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseCard, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BasePDF, BaseTitle, BlueVerticalDividerLine, BrandLabel, CancelButton, CategoryLabel, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, FullCard, GradeLabel, GroupingActivityContent, InfoWithText, InputGroup, InputWithSpecialExpression, LeftTextRightInputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PageTravelGroup, PersonalLabel, PrimaryButton, ProgressBar, PublishingHouseLabel, ScoreBar, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, SelectionTabFill, StatusError, SubTitle, THREE_MONTHS, TimedProgressBar, TrueFalseActivityContent, VerticalDividerLine,
|
|
875
|
+
export { ActivityBodyContent, ActivityEmptyContent, ActivityEvaluationRubricContent, ActivityLabel, ActivityPreviewByAnswerData, ActivityPreviewByData, ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseCard, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BasePDF, BaseTitle, BlueVerticalDividerLine, BrandLabel, CancelButton, CategoryLabel, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, FullCard, GradeLabel, GroupingActivityContent, InfoWithText, InputGroup, InputWithSpecialExpression, LeftTextRightInputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PageTravelGroup, PersonalLabel, PrimaryButton, ProgressBar, PublishingHouseLabel, ScoreBar, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, SelectionTabFill, StatusError, SubTitle, THREE_MONTHS, TimedProgressBar, TrueFalseActivityContent, VerticalDividerLine, base64ToFile, calculateEndDateOfWeek, calculateLevenshteinDistance, calculateStartDateOfWeek, checkActivityAnswerState, checkIfAnswerIsEmpty, constructActivityAnswerMap, constructActivityAnswerStateList, constructActivityData, constructActivityItemListBodyOnly, constructActivityItemListForSolution, constructActivityItemListMaterialOnly, constructActivityItemListSolutionOnly, constructActivityItemListWithAnswersForAI, constructActivityItemListWithSolutionForAI, constructAnswerBasedOnData, constructBaseNumericIndividualModel, constructBaseVerbalIndvidualModel, constructCategoryTreeFromParentCode, constructCombinedCatchxamReportMap, constructCombinedOutcomeActivityScoreMapFromCombinedReport, constructInputWithSpecialExpressionList, constructMonthName, constructOutcomeActivityScoreList, constructUserProfileQueryParams, constructWeekName, convertDataURLtoFile, convertToBase64, convertToBodyMapString, convertToEvaluationRubricMapString, convertToSolutionMapString, convertTurkishCharactersToEnglish, filterCategoryVersionCodeOptionList, filterCategoryVersionCodeOptionListByGradeDTO, filterCategoryVersionCodeOptionListByInstitutionDTO, filterCoterieTypeByDistinctOptionList, filterCoterieTypeOptionList, filterGradeLevelOptionList, filterUserRoleOptionList, findAISettingsFromCurrentProfile, findBestFitActivity, formatPriceWithCommas, getColorByIndex, ignoreMathematicalExpression, mergeObjects, parseBodyMapFromData, parseContentMapFromData, parseJwt, parseMaterialMapFromData, retrievDelayOptionList, retrieveActivityAnswerFromAnswerList, retrieveActivityMethodologyOptionList, 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, retrieveDifficultyByActivityTypeFromData, retrieveDifficultyOptionList, retrieveDistintCoterieTypeFromCatchtivityApplicationDTO, retrieveDocumentTypeFromAcceptedFormat, retrieveDocumentTypeFromExtension, retrieveDurationInMinutesOptionList, retrieveDurationInSecondsOptionList, retrieveDurationTypeOptionList, retrieveEachTimeSpentInSeconds, retrieveEnableOptionList, retrieveExternalRegistrationDTOOptionList, retrieveFrequencyTypeOptionList, retrieveGenderOptionList, retrieveGradeDTOByUserProfileOptionList, retrieveGradeDTOOptionList, retrieveGradeLevelOptionList, retrieveInstitutionDTOByUserProfileOptionList, retrieveInstitutionDTOOptionList, retrieveInstitutionTypeOptionList, retrieveLastNOptionList, retrieveMonthNameByIndex, retrieveOpticalExamPartTypeOptionList, retrieveOpticalExamTypeOptionList, retrieveOtherBadgeDTOList, retrieveOutcomePlanTypeOptionList, retrievePhoneNumberAreaCodeList, retrieveProvinceNameOptionList, retrieveReportTypeOptionList, retrieveSeasonDTOByUserProfileOptionList, retrieveSeasonDTOOptionList, retrieveStandardExamCoterieTypeOptionListByStandardExamType, retrieveStandardExamTypeIcon, retrieveStandardExamTypeOptionList, retrieveStatusOptionList, retrieveTeachingMethodologyOptionList, retrieveTimeFilterOptionList, retrieveTimeFilterWithLastNOptionList, retrieveTokenUsageSubTypeOptionList, retrieveTokenUsageTypeOptionList, retrieveTotalTimeSpentInMinutes, retrieveTotalTimeSpentInSeconds, retrieveUserAuthorityGeneralOptionList, retrieveUserRoleOptionList, retrieveValidationRequirementList, shuffleArray, useScreenSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -603,6 +603,10 @@ declare const retrieveOpticalExamPartTypeOptionList: () => {
|
|
|
603
603
|
value: string;
|
|
604
604
|
text: string;
|
|
605
605
|
}[];
|
|
606
|
+
declare const retrievDelayOptionList: () => {
|
|
607
|
+
value: string;
|
|
608
|
+
text: string;
|
|
609
|
+
}[];
|
|
606
610
|
|
|
607
611
|
declare const retrieveCategoryVersionCodeOptionList: () => {
|
|
608
612
|
value: string;
|
|
@@ -627,7 +631,6 @@ declare const retrieveDateIntervalOptionList: () => {
|
|
|
627
631
|
}[];
|
|
628
632
|
declare const calculateStartDateOfWeek: (date: Date, isGMT: boolean) => Date;
|
|
629
633
|
declare const calculateEndDateOfWeek: (date: Date, isGMT: boolean) => Date;
|
|
630
|
-
declare const adjustForTimezone: (date: Date) => Date;
|
|
631
634
|
declare const constructMonthName: (date: Date) => string;
|
|
632
635
|
declare const constructWeekName: (beginDate: Date, endDate: Date, untilSunday: boolean) => string;
|
|
633
636
|
declare const retrieveTimeFilterOptionList: (isDetailed: boolean) => {
|
|
@@ -869,4 +872,4 @@ declare const retrieveActivityMethodologyOptionList: () => {
|
|
|
869
872
|
text: string;
|
|
870
873
|
}[];
|
|
871
874
|
|
|
872
|
-
export { ActivityBodyContent, ActivityEmptyContent, ActivityEvaluationRubricContent, ActivityLabel, ActivityPreviewByAnswerData, ActivityPreviewByData, ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseCard, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BasePDF, BaseTitle, BlueVerticalDividerLine, BrandLabel, CancelButton, CategoryLabel, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, FullCard, GradeLabel, GroupingActivityContent, InfoWithText, InputGroup, InputWithSpecialExpression, LeftTextRightInputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PageTravelGroup, PersonalLabel, PrimaryButton, ProgressBar, PublishingHouseLabel, ScoreBar, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, SelectionTabFill, StatusError, SubTitle, THREE_MONTHS, TimedProgressBar, TrueFalseActivityContent, VerticalDividerLine,
|
|
875
|
+
export { ActivityBodyContent, ActivityEmptyContent, ActivityEvaluationRubricContent, ActivityLabel, ActivityPreviewByAnswerData, ActivityPreviewByData, ActivitySolutionContent, ActivityTemplateLabel, ApproveButton, BaseCard, BaseImage, BaseLoading, BaseLoadingWithText, BaseModal, BasePDF, BaseTitle, BlueVerticalDividerLine, BrandLabel, CancelButton, CategoryLabel, CoterieLabel, CreateButton, DeleteButton, DividerLine, DropdownActivityContent, FillInTheBlanksActivityContent, FullCard, GradeLabel, GroupingActivityContent, InfoWithText, InputGroup, InputWithSpecialExpression, LeftTextRightInputGroup, MCMAActivityContent, MCSAActivityContent, MatchingActivityContent, ONE_DAY, ONE_HOUR, ONE_MONTH, ONE_WEEK, OpenEndedActivityContent, OrderingActivityContent, OutcomeLabel, PageTravelGroup, PersonalLabel, PrimaryButton, ProgressBar, PublishingHouseLabel, ScoreBar, SecondaryButton, SelectionBox, SelectionCheckbox, SelectionTab, SelectionTabFill, StatusError, SubTitle, THREE_MONTHS, TimedProgressBar, TrueFalseActivityContent, VerticalDividerLine, base64ToFile, calculateEndDateOfWeek, calculateLevenshteinDistance, calculateStartDateOfWeek, checkActivityAnswerState, checkIfAnswerIsEmpty, constructActivityAnswerMap, constructActivityAnswerStateList, constructActivityData, constructActivityItemListBodyOnly, constructActivityItemListForSolution, constructActivityItemListMaterialOnly, constructActivityItemListSolutionOnly, constructActivityItemListWithAnswersForAI, constructActivityItemListWithSolutionForAI, constructAnswerBasedOnData, constructBaseNumericIndividualModel, constructBaseVerbalIndvidualModel, constructCategoryTreeFromParentCode, constructCombinedCatchxamReportMap, constructCombinedOutcomeActivityScoreMapFromCombinedReport, constructInputWithSpecialExpressionList, constructMonthName, constructOutcomeActivityScoreList, constructUserProfileQueryParams, constructWeekName, convertDataURLtoFile, convertToBase64, convertToBodyMapString, convertToEvaluationRubricMapString, convertToSolutionMapString, convertTurkishCharactersToEnglish, filterCategoryVersionCodeOptionList, filterCategoryVersionCodeOptionListByGradeDTO, filterCategoryVersionCodeOptionListByInstitutionDTO, filterCoterieTypeByDistinctOptionList, filterCoterieTypeOptionList, filterGradeLevelOptionList, filterUserRoleOptionList, findAISettingsFromCurrentProfile, findBestFitActivity, formatPriceWithCommas, getColorByIndex, ignoreMathematicalExpression, mergeObjects, parseBodyMapFromData, parseContentMapFromData, parseJwt, parseMaterialMapFromData, retrievDelayOptionList, retrieveActivityAnswerFromAnswerList, retrieveActivityMethodologyOptionList, 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, retrieveDifficultyByActivityTypeFromData, retrieveDifficultyOptionList, retrieveDistintCoterieTypeFromCatchtivityApplicationDTO, retrieveDocumentTypeFromAcceptedFormat, retrieveDocumentTypeFromExtension, retrieveDurationInMinutesOptionList, retrieveDurationInSecondsOptionList, retrieveDurationTypeOptionList, retrieveEachTimeSpentInSeconds, retrieveEnableOptionList, retrieveExternalRegistrationDTOOptionList, retrieveFrequencyTypeOptionList, retrieveGenderOptionList, retrieveGradeDTOByUserProfileOptionList, retrieveGradeDTOOptionList, retrieveGradeLevelOptionList, retrieveInstitutionDTOByUserProfileOptionList, retrieveInstitutionDTOOptionList, retrieveInstitutionTypeOptionList, retrieveLastNOptionList, retrieveMonthNameByIndex, retrieveOpticalExamPartTypeOptionList, retrieveOpticalExamTypeOptionList, retrieveOtherBadgeDTOList, retrieveOutcomePlanTypeOptionList, retrievePhoneNumberAreaCodeList, retrieveProvinceNameOptionList, retrieveReportTypeOptionList, retrieveSeasonDTOByUserProfileOptionList, retrieveSeasonDTOOptionList, retrieveStandardExamCoterieTypeOptionListByStandardExamType, retrieveStandardExamTypeIcon, retrieveStandardExamTypeOptionList, retrieveStatusOptionList, retrieveTeachingMethodologyOptionList, retrieveTimeFilterOptionList, retrieveTimeFilterWithLastNOptionList, retrieveTokenUsageSubTypeOptionList, retrieveTokenUsageTypeOptionList, retrieveTotalTimeSpentInMinutes, retrieveTotalTimeSpentInSeconds, retrieveUserAuthorityGeneralOptionList, retrieveUserRoleOptionList, retrieveValidationRequirementList, shuffleArray, useScreenSize };
|
package/dist/index.js
CHANGED
|
@@ -127,7 +127,6 @@ __export(index_exports, {
|
|
|
127
127
|
TimedProgressBar: () => TimedProgressBar_default,
|
|
128
128
|
TrueFalseActivityContent: () => TrueFalseActivityContent_default,
|
|
129
129
|
VerticalDividerLine: () => VerticalDividerLine_default,
|
|
130
|
-
adjustForTimezone: () => adjustForTimezone,
|
|
131
130
|
base64ToFile: () => base64ToFile,
|
|
132
131
|
calculateEndDateOfWeek: () => calculateEndDateOfWeek,
|
|
133
132
|
calculateLevenshteinDistance: () => calculateLevenshteinDistance,
|
|
@@ -178,6 +177,7 @@ __export(index_exports, {
|
|
|
178
177
|
parseContentMapFromData: () => parseContentMapFromData,
|
|
179
178
|
parseJwt: () => parseJwt,
|
|
180
179
|
parseMaterialMapFromData: () => parseMaterialMapFromData,
|
|
180
|
+
retrievDelayOptionList: () => retrievDelayOptionList,
|
|
181
181
|
retrieveActivityAnswerFromAnswerList: () => retrieveActivityAnswerFromAnswerList,
|
|
182
182
|
retrieveActivityMethodologyOptionList: () => retrieveActivityMethodologyOptionList,
|
|
183
183
|
retrieveActivityTemplateDTOOptionList: () => retrieveActivityTemplateDTOOptionList,
|
|
@@ -3372,6 +3372,22 @@ var retrieveOpticalExamPartTypeOptionList = () => {
|
|
|
3372
3372
|
}
|
|
3373
3373
|
];
|
|
3374
3374
|
};
|
|
3375
|
+
var retrievDelayOptionList = () => {
|
|
3376
|
+
return [
|
|
3377
|
+
{
|
|
3378
|
+
value: "NONE",
|
|
3379
|
+
text: i18n_default.t("NONE")
|
|
3380
|
+
},
|
|
3381
|
+
{
|
|
3382
|
+
value: "ONE_WEEK",
|
|
3383
|
+
text: i18n_default.t("ONE_WEEK")
|
|
3384
|
+
},
|
|
3385
|
+
{
|
|
3386
|
+
value: "TWO_WEEKS",
|
|
3387
|
+
text: i18n_default.t("TWO_WEEKS")
|
|
3388
|
+
}
|
|
3389
|
+
];
|
|
3390
|
+
};
|
|
3375
3391
|
|
|
3376
3392
|
// src/components/activities/body-contents/ShowBodyMediaByContentType.tsx
|
|
3377
3393
|
var import_react_katex = require("react-katex");
|
|
@@ -9202,35 +9218,35 @@ var retrieveDateIntervalOptionList = () => {
|
|
|
9202
9218
|
];
|
|
9203
9219
|
};
|
|
9204
9220
|
var calculateStartDateOfWeek = (date, isGMT) => {
|
|
9205
|
-
|
|
9206
|
-
const startDate = new Date(date.setDate(diff));
|
|
9207
|
-
startDate.setHours(0);
|
|
9208
|
-
startDate.setMinutes(0);
|
|
9209
|
-
startDate.setSeconds(0);
|
|
9210
|
-
startDate.setMilliseconds(0);
|
|
9221
|
+
const dateCopy = new Date(date);
|
|
9211
9222
|
if (isGMT) {
|
|
9212
|
-
|
|
9223
|
+
const diff = dateCopy.getUTCDate() - dateCopy.getUTCDay() + (dateCopy.getUTCDay() === 0 ? -6 : 1);
|
|
9224
|
+
dateCopy.setUTCDate(diff);
|
|
9225
|
+
dateCopy.setUTCHours(0, 0, 0, 0);
|
|
9226
|
+
return dateCopy;
|
|
9213
9227
|
} else {
|
|
9214
|
-
|
|
9228
|
+
const diff = dateCopy.getDate() - dateCopy.getDay() + (dateCopy.getDay() === 0 ? -6 : 1);
|
|
9229
|
+
dateCopy.setDate(diff);
|
|
9230
|
+
dateCopy.setHours(0, 0, 0, 0);
|
|
9231
|
+
return dateCopy;
|
|
9215
9232
|
}
|
|
9216
9233
|
};
|
|
9217
9234
|
var calculateEndDateOfWeek = (date, isGMT) => {
|
|
9218
|
-
const dayOfWeek = date.getDay();
|
|
9219
|
-
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9220
9235
|
const endDate = new Date(date);
|
|
9221
|
-
endDate.setDate(date.getDate() + daysUntilSunday);
|
|
9222
|
-
endDate.setHours(23, 59, 59, 999);
|
|
9223
9236
|
if (isGMT) {
|
|
9224
|
-
|
|
9237
|
+
const dayOfWeek = endDate.getUTCDay();
|
|
9238
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9239
|
+
endDate.setUTCDate(endDate.getUTCDate() + daysUntilSunday);
|
|
9240
|
+
endDate.setUTCHours(23, 59, 59, 999);
|
|
9241
|
+
return endDate;
|
|
9225
9242
|
} else {
|
|
9243
|
+
const dayOfWeek = endDate.getDay();
|
|
9244
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9245
|
+
endDate.setDate(endDate.getDate() + daysUntilSunday);
|
|
9246
|
+
endDate.setHours(23, 59, 59, 999);
|
|
9226
9247
|
return endDate;
|
|
9227
9248
|
}
|
|
9228
9249
|
};
|
|
9229
|
-
var adjustForTimezone = (date) => {
|
|
9230
|
-
var timeOffsetInMS = date.getTimezoneOffset() * 6e4;
|
|
9231
|
-
date.setTime(date.getTime() - timeOffsetInMS);
|
|
9232
|
-
return date;
|
|
9233
|
-
};
|
|
9234
9250
|
var constructMonthName = (date) => {
|
|
9235
9251
|
return `${retrieveMonthNameByIndex(date.getMonth())} ${date.getFullYear()}`;
|
|
9236
9252
|
};
|
|
@@ -10416,7 +10432,6 @@ var retrieveActivityMethodologyOptionList = () => {
|
|
|
10416
10432
|
TimedProgressBar,
|
|
10417
10433
|
TrueFalseActivityContent,
|
|
10418
10434
|
VerticalDividerLine,
|
|
10419
|
-
adjustForTimezone,
|
|
10420
10435
|
base64ToFile,
|
|
10421
10436
|
calculateEndDateOfWeek,
|
|
10422
10437
|
calculateLevenshteinDistance,
|
|
@@ -10467,6 +10482,7 @@ var retrieveActivityMethodologyOptionList = () => {
|
|
|
10467
10482
|
parseContentMapFromData,
|
|
10468
10483
|
parseJwt,
|
|
10469
10484
|
parseMaterialMapFromData,
|
|
10485
|
+
retrievDelayOptionList,
|
|
10470
10486
|
retrieveActivityAnswerFromAnswerList,
|
|
10471
10487
|
retrieveActivityMethodologyOptionList,
|
|
10472
10488
|
retrieveActivityTemplateDTOOptionList,
|
package/dist/index.mjs
CHANGED
|
@@ -3156,6 +3156,22 @@ var retrieveOpticalExamPartTypeOptionList = () => {
|
|
|
3156
3156
|
}
|
|
3157
3157
|
];
|
|
3158
3158
|
};
|
|
3159
|
+
var retrievDelayOptionList = () => {
|
|
3160
|
+
return [
|
|
3161
|
+
{
|
|
3162
|
+
value: "NONE",
|
|
3163
|
+
text: i18n_default.t("NONE")
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
value: "ONE_WEEK",
|
|
3167
|
+
text: i18n_default.t("ONE_WEEK")
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
value: "TWO_WEEKS",
|
|
3171
|
+
text: i18n_default.t("TWO_WEEKS")
|
|
3172
|
+
}
|
|
3173
|
+
];
|
|
3174
|
+
};
|
|
3159
3175
|
|
|
3160
3176
|
// src/components/activities/body-contents/ShowBodyMediaByContentType.tsx
|
|
3161
3177
|
import { InlineMath } from "react-katex";
|
|
@@ -8986,35 +9002,35 @@ var retrieveDateIntervalOptionList = () => {
|
|
|
8986
9002
|
];
|
|
8987
9003
|
};
|
|
8988
9004
|
var calculateStartDateOfWeek = (date, isGMT) => {
|
|
8989
|
-
|
|
8990
|
-
const startDate = new Date(date.setDate(diff));
|
|
8991
|
-
startDate.setHours(0);
|
|
8992
|
-
startDate.setMinutes(0);
|
|
8993
|
-
startDate.setSeconds(0);
|
|
8994
|
-
startDate.setMilliseconds(0);
|
|
9005
|
+
const dateCopy = new Date(date);
|
|
8995
9006
|
if (isGMT) {
|
|
8996
|
-
|
|
9007
|
+
const diff = dateCopy.getUTCDate() - dateCopy.getUTCDay() + (dateCopy.getUTCDay() === 0 ? -6 : 1);
|
|
9008
|
+
dateCopy.setUTCDate(diff);
|
|
9009
|
+
dateCopy.setUTCHours(0, 0, 0, 0);
|
|
9010
|
+
return dateCopy;
|
|
8997
9011
|
} else {
|
|
8998
|
-
|
|
9012
|
+
const diff = dateCopy.getDate() - dateCopy.getDay() + (dateCopy.getDay() === 0 ? -6 : 1);
|
|
9013
|
+
dateCopy.setDate(diff);
|
|
9014
|
+
dateCopy.setHours(0, 0, 0, 0);
|
|
9015
|
+
return dateCopy;
|
|
8999
9016
|
}
|
|
9000
9017
|
};
|
|
9001
9018
|
var calculateEndDateOfWeek = (date, isGMT) => {
|
|
9002
|
-
const dayOfWeek = date.getDay();
|
|
9003
|
-
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9004
9019
|
const endDate = new Date(date);
|
|
9005
|
-
endDate.setDate(date.getDate() + daysUntilSunday);
|
|
9006
|
-
endDate.setHours(23, 59, 59, 999);
|
|
9007
9020
|
if (isGMT) {
|
|
9008
|
-
|
|
9021
|
+
const dayOfWeek = endDate.getUTCDay();
|
|
9022
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9023
|
+
endDate.setUTCDate(endDate.getUTCDate() + daysUntilSunday);
|
|
9024
|
+
endDate.setUTCHours(23, 59, 59, 999);
|
|
9025
|
+
return endDate;
|
|
9009
9026
|
} else {
|
|
9027
|
+
const dayOfWeek = endDate.getDay();
|
|
9028
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9029
|
+
endDate.setDate(endDate.getDate() + daysUntilSunday);
|
|
9030
|
+
endDate.setHours(23, 59, 59, 999);
|
|
9010
9031
|
return endDate;
|
|
9011
9032
|
}
|
|
9012
9033
|
};
|
|
9013
|
-
var adjustForTimezone = (date) => {
|
|
9014
|
-
var timeOffsetInMS = date.getTimezoneOffset() * 6e4;
|
|
9015
|
-
date.setTime(date.getTime() - timeOffsetInMS);
|
|
9016
|
-
return date;
|
|
9017
|
-
};
|
|
9018
9034
|
var constructMonthName = (date) => {
|
|
9019
9035
|
return `${retrieveMonthNameByIndex(date.getMonth())} ${date.getFullYear()}`;
|
|
9020
9036
|
};
|
|
@@ -10199,7 +10215,6 @@ export {
|
|
|
10199
10215
|
TimedProgressBar_default as TimedProgressBar,
|
|
10200
10216
|
TrueFalseActivityContent_default as TrueFalseActivityContent,
|
|
10201
10217
|
VerticalDividerLine_default as VerticalDividerLine,
|
|
10202
|
-
adjustForTimezone,
|
|
10203
10218
|
base64ToFile,
|
|
10204
10219
|
calculateEndDateOfWeek,
|
|
10205
10220
|
calculateLevenshteinDistance,
|
|
@@ -10250,6 +10265,7 @@ export {
|
|
|
10250
10265
|
parseContentMapFromData,
|
|
10251
10266
|
parseJwt,
|
|
10252
10267
|
parseMaterialMapFromData,
|
|
10268
|
+
retrievDelayOptionList,
|
|
10253
10269
|
retrieveActivityAnswerFromAnswerList,
|
|
10254
10270
|
retrieveActivityMethodologyOptionList,
|
|
10255
10271
|
retrieveActivityTemplateDTOOptionList,
|
package/package.json
CHANGED
|
@@ -2375,3 +2375,20 @@ export const retrieveOpticalExamPartTypeOptionList = () => {
|
|
|
2375
2375
|
},
|
|
2376
2376
|
];
|
|
2377
2377
|
};
|
|
2378
|
+
|
|
2379
|
+
export const retrievDelayOptionList = () => {
|
|
2380
|
+
return [
|
|
2381
|
+
{
|
|
2382
|
+
value: "NONE",
|
|
2383
|
+
text: i18n.t("NONE"),
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
value: "ONE_WEEK",
|
|
2387
|
+
text: i18n.t("ONE_WEEK"),
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
value: "TWO_WEEKS",
|
|
2391
|
+
text: i18n.t("TWO_WEEKS"),
|
|
2392
|
+
},
|
|
2393
|
+
];
|
|
2394
|
+
};
|
|
@@ -56,41 +56,47 @@ export const retrieveDateIntervalOptionList = () => {
|
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
export const calculateStartDateOfWeek = (date: Date, isGMT: boolean) => {
|
|
59
|
-
|
|
59
|
+
const dateCopy = new Date(date);
|
|
60
60
|
|
|
61
|
-
const startDate = new Date(date.setDate(diff));
|
|
62
|
-
startDate.setHours(0);
|
|
63
|
-
startDate.setMinutes(0);
|
|
64
|
-
startDate.setSeconds(0);
|
|
65
|
-
startDate.setMilliseconds(0);
|
|
66
61
|
if (isGMT) {
|
|
67
|
-
|
|
62
|
+
const diff =
|
|
63
|
+
dateCopy.getUTCDate() -
|
|
64
|
+
dateCopy.getUTCDay() +
|
|
65
|
+
(dateCopy.getUTCDay() === 0 ? -6 : 1);
|
|
66
|
+
dateCopy.setUTCDate(diff);
|
|
67
|
+
dateCopy.setUTCHours(0, 0, 0, 0);
|
|
68
|
+
return dateCopy;
|
|
68
69
|
} else {
|
|
69
|
-
|
|
70
|
+
const diff =
|
|
71
|
+
dateCopy.getDate() -
|
|
72
|
+
dateCopy.getDay() +
|
|
73
|
+
(dateCopy.getDay() === 0 ? -6 : 1);
|
|
74
|
+
dateCopy.setDate(diff);
|
|
75
|
+
dateCopy.setHours(0, 0, 0, 0);
|
|
76
|
+
return dateCopy;
|
|
70
77
|
}
|
|
71
78
|
};
|
|
72
79
|
|
|
73
80
|
export const calculateEndDateOfWeek = (date: Date, isGMT: boolean) => {
|
|
74
|
-
const dayOfWeek = date.getDay();
|
|
75
|
-
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
76
|
-
|
|
77
81
|
const endDate = new Date(date);
|
|
78
|
-
endDate.setDate(date.getDate() + daysUntilSunday);
|
|
79
|
-
endDate.setHours(23, 59, 59, 999);
|
|
80
82
|
|
|
81
83
|
if (isGMT) {
|
|
82
|
-
|
|
84
|
+
const dayOfWeek = endDate.getUTCDay();
|
|
85
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
86
|
+
|
|
87
|
+
endDate.setUTCDate(endDate.getUTCDate() + daysUntilSunday);
|
|
88
|
+
endDate.setUTCHours(23, 59, 59, 999);
|
|
89
|
+
return endDate;
|
|
83
90
|
} else {
|
|
91
|
+
const dayOfWeek = endDate.getDay();
|
|
92
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
93
|
+
|
|
94
|
+
endDate.setDate(endDate.getDate() + daysUntilSunday);
|
|
95
|
+
endDate.setHours(23, 59, 59, 999);
|
|
84
96
|
return endDate;
|
|
85
97
|
}
|
|
86
98
|
};
|
|
87
99
|
|
|
88
|
-
export const adjustForTimezone = (date: Date) => {
|
|
89
|
-
var timeOffsetInMS = date.getTimezoneOffset() * 60000;
|
|
90
|
-
date.setTime(date.getTime() - timeOffsetInMS);
|
|
91
|
-
return date;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
100
|
export const constructMonthName = (date: Date): string => {
|
|
95
101
|
return `${retrieveMonthNameByIndex(date.getMonth())} ${date.getFullYear()}`;
|
|
96
102
|
};
|