@speakableio/core 0.1.83 → 0.1.85
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.native.d.mts +6 -1
- package/dist/index.native.d.ts +6 -1
- package/dist/index.native.js +60 -0
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +60 -0
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +6 -1
- package/dist/index.web.js +60 -0
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.d.mts
CHANGED
|
@@ -386,6 +386,11 @@ declare function getPagePrompt(card: PageActivityWithId | undefined): {
|
|
|
386
386
|
|
|
387
387
|
declare const getTotalCompletedCards: (pageScores: Score["cards"] | undefined) => number;
|
|
388
388
|
|
|
389
|
+
declare const getLabelPage: (pageType: ActivityPageType | undefined) => {
|
|
390
|
+
short: string;
|
|
391
|
+
long: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
389
394
|
interface Assignment {
|
|
390
395
|
name: string;
|
|
391
396
|
description: string;
|
|
@@ -2762,4 +2767,4 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
2762
2767
|
};
|
|
2763
2768
|
};
|
|
2764
2769
|
|
|
2765
|
-
export { ActivityPageType, type Assignment, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getTotalCompletedCards, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
|
2770
|
+
export { ActivityPageType, type Assignment, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getTotalCompletedCards, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
package/dist/index.native.d.ts
CHANGED
|
@@ -386,6 +386,11 @@ declare function getPagePrompt(card: PageActivityWithId | undefined): {
|
|
|
386
386
|
|
|
387
387
|
declare const getTotalCompletedCards: (pageScores: Score["cards"] | undefined) => number;
|
|
388
388
|
|
|
389
|
+
declare const getLabelPage: (pageType: ActivityPageType | undefined) => {
|
|
390
|
+
short: string;
|
|
391
|
+
long: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
389
394
|
interface Assignment {
|
|
390
395
|
name: string;
|
|
391
396
|
description: string;
|
|
@@ -2762,4 +2767,4 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
2762
2767
|
};
|
|
2763
2768
|
};
|
|
2764
2769
|
|
|
2765
|
-
export { ActivityPageType, type Assignment, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getTotalCompletedCards, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
|
2770
|
+
export { ActivityPageType, type Assignment, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getTotalCompletedCards, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
package/dist/index.native.js
CHANGED
|
@@ -66,6 +66,7 @@ __export(index_native_exports, {
|
|
|
66
66
|
creditQueryKeys: () => creditQueryKeys,
|
|
67
67
|
debounce: () => debounce,
|
|
68
68
|
getCardFromCache: () => getCardFromCache,
|
|
69
|
+
getLabelPage: () => getLabelPage,
|
|
69
70
|
getPagePrompt: () => getPagePrompt,
|
|
70
71
|
getPhraseLength: () => getPhraseLength,
|
|
71
72
|
getRespondCardTool: () => getRespondCardTool,
|
|
@@ -2034,6 +2035,65 @@ var getTotalCompletedCards = (pageScores) => {
|
|
|
2034
2035
|
}, 0);
|
|
2035
2036
|
};
|
|
2036
2037
|
|
|
2038
|
+
// src/domains/cards/utils/get-label-page.ts
|
|
2039
|
+
var labels = {
|
|
2040
|
+
repeat: {
|
|
2041
|
+
short: "Repeat",
|
|
2042
|
+
long: "Listen & Repeat"
|
|
2043
|
+
},
|
|
2044
|
+
mc: {
|
|
2045
|
+
short: "Multiple Choice",
|
|
2046
|
+
long: "Multiple Choice"
|
|
2047
|
+
},
|
|
2048
|
+
mediaPage: {
|
|
2049
|
+
short: "Media Page",
|
|
2050
|
+
long: "Media Page"
|
|
2051
|
+
},
|
|
2052
|
+
shortAnswer: {
|
|
2053
|
+
short: "Short Answer",
|
|
2054
|
+
long: "Short Answer"
|
|
2055
|
+
},
|
|
2056
|
+
respondWritten: {
|
|
2057
|
+
short: "Open Response",
|
|
2058
|
+
long: "Written Open Response"
|
|
2059
|
+
},
|
|
2060
|
+
respondAudio: {
|
|
2061
|
+
short: "Open Response",
|
|
2062
|
+
long: "Spoken Open Response"
|
|
2063
|
+
}
|
|
2064
|
+
};
|
|
2065
|
+
var getLabelPage = (pageType) => {
|
|
2066
|
+
if (!pageType) {
|
|
2067
|
+
return {
|
|
2068
|
+
short: "",
|
|
2069
|
+
long: ""
|
|
2070
|
+
};
|
|
2071
|
+
}
|
|
2072
|
+
const { isRepeat, isMC, isMediaPage, isShortAnswer, isRespondWritten, isRespondAudio } = checkTypePageActivity(pageType);
|
|
2073
|
+
if (isRepeat) {
|
|
2074
|
+
return labels.repeat;
|
|
2075
|
+
}
|
|
2076
|
+
if (isMC) {
|
|
2077
|
+
return labels.mc;
|
|
2078
|
+
}
|
|
2079
|
+
if (isMediaPage) {
|
|
2080
|
+
return labels.mediaPage;
|
|
2081
|
+
}
|
|
2082
|
+
if (isShortAnswer) {
|
|
2083
|
+
return labels.shortAnswer;
|
|
2084
|
+
}
|
|
2085
|
+
if (isRespondWritten) {
|
|
2086
|
+
return labels.respondWritten;
|
|
2087
|
+
}
|
|
2088
|
+
if (isRespondAudio) {
|
|
2089
|
+
return labels.respondAudio;
|
|
2090
|
+
}
|
|
2091
|
+
return {
|
|
2092
|
+
short: "",
|
|
2093
|
+
long: ""
|
|
2094
|
+
};
|
|
2095
|
+
};
|
|
2096
|
+
|
|
2037
2097
|
// src/domains/sets/set.hooks.ts
|
|
2038
2098
|
var import_react_query4 = require("@tanstack/react-query");
|
|
2039
2099
|
|