@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.web.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 createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
|
|
|
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, createFsClientWeb 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, createFsClientWeb 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.web.js
CHANGED
|
@@ -1930,6 +1930,65 @@ var getTotalCompletedCards = (pageScores) => {
|
|
|
1930
1930
|
}, 0);
|
|
1931
1931
|
};
|
|
1932
1932
|
|
|
1933
|
+
// src/domains/cards/utils/get-label-page.ts
|
|
1934
|
+
var labels = {
|
|
1935
|
+
repeat: {
|
|
1936
|
+
short: "Repeat",
|
|
1937
|
+
long: "Listen & Repeat"
|
|
1938
|
+
},
|
|
1939
|
+
mc: {
|
|
1940
|
+
short: "Multiple Choice",
|
|
1941
|
+
long: "Multiple Choice"
|
|
1942
|
+
},
|
|
1943
|
+
mediaPage: {
|
|
1944
|
+
short: "Media Page",
|
|
1945
|
+
long: "Media Page"
|
|
1946
|
+
},
|
|
1947
|
+
shortAnswer: {
|
|
1948
|
+
short: "Short Answer",
|
|
1949
|
+
long: "Short Answer"
|
|
1950
|
+
},
|
|
1951
|
+
respondWritten: {
|
|
1952
|
+
short: "Open Response",
|
|
1953
|
+
long: "Written Open Response"
|
|
1954
|
+
},
|
|
1955
|
+
respondAudio: {
|
|
1956
|
+
short: "Open Response",
|
|
1957
|
+
long: "Spoken Open Response"
|
|
1958
|
+
}
|
|
1959
|
+
};
|
|
1960
|
+
var getLabelPage = (pageType) => {
|
|
1961
|
+
if (!pageType) {
|
|
1962
|
+
return {
|
|
1963
|
+
short: "",
|
|
1964
|
+
long: ""
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
const { isRepeat, isMC, isMediaPage, isShortAnswer, isRespondWritten, isRespondAudio } = checkTypePageActivity(pageType);
|
|
1968
|
+
if (isRepeat) {
|
|
1969
|
+
return labels.repeat;
|
|
1970
|
+
}
|
|
1971
|
+
if (isMC) {
|
|
1972
|
+
return labels.mc;
|
|
1973
|
+
}
|
|
1974
|
+
if (isMediaPage) {
|
|
1975
|
+
return labels.mediaPage;
|
|
1976
|
+
}
|
|
1977
|
+
if (isShortAnswer) {
|
|
1978
|
+
return labels.shortAnswer;
|
|
1979
|
+
}
|
|
1980
|
+
if (isRespondWritten) {
|
|
1981
|
+
return labels.respondWritten;
|
|
1982
|
+
}
|
|
1983
|
+
if (isRespondAudio) {
|
|
1984
|
+
return labels.respondAudio;
|
|
1985
|
+
}
|
|
1986
|
+
return {
|
|
1987
|
+
short: "",
|
|
1988
|
+
long: ""
|
|
1989
|
+
};
|
|
1990
|
+
};
|
|
1991
|
+
|
|
1933
1992
|
// src/domains/sets/set.hooks.ts
|
|
1934
1993
|
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
1935
1994
|
|
|
@@ -3214,6 +3273,7 @@ export {
|
|
|
3214
3273
|
creditQueryKeys,
|
|
3215
3274
|
debounce,
|
|
3216
3275
|
getCardFromCache,
|
|
3276
|
+
getLabelPage,
|
|
3217
3277
|
getPagePrompt,
|
|
3218
3278
|
getPhraseLength,
|
|
3219
3279
|
getRespondCardTool,
|