@speakableio/core 1.0.7 → 1.0.9

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.
@@ -153,30 +153,16 @@ interface PageActivity {
153
153
  max_attempts?: number;
154
154
  rich_text?: string;
155
155
  }
156
- declare enum ActivityPageType {
156
+ declare const enum ActivityPageType {
157
157
  READ_REPEAT = "READ_REPEAT",
158
- VIDEO = "VIDEO",
159
- TEXT = "TEXT",
160
158
  READ_RESPOND = "READ_RESPOND",
161
159
  FREE_RESPONSE = "FREE_RESPONSE",
162
160
  REPEAT = "REPEAT",
163
161
  RESPOND = "RESPOND",
164
162
  RESPOND_WRITE = "RESPOND_WRITE",
165
- TEXT_TO_SPEECH = "TEXT_TO_SPEECH",
166
163
  MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
167
- PODCAST = "PODCAST",
168
164
  MEDIA_PAGE = "MEDIA_PAGE",
169
- WRITE = "WRITE",
170
- SHORT_ANSWER = "SHORT_ANSWER",
171
- SHORT_STORY = "SHORT_STORY",
172
- SPEAK = "SPEAK",
173
- CONVERSATION = "CONVERSATION",
174
- CONVERSATION_WRITE = "CONVERSATION_WRITE",
175
- DIALOGUE = "DIALOGUE",
176
- INSTRUCTION = "INSTRUCTION",
177
- LISTEN = "LISTEN",
178
- READ = "READ",
179
- ANSWER = "ANSWER"
165
+ SHORT_ANSWER = "SHORT_ANSWER"
180
166
  }
181
167
  declare const RESPOND_PAGE_ACTIVITY_TYPES: ActivityPageType[];
182
168
  declare const MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES: ActivityPageType[];
@@ -197,7 +183,76 @@ declare function useCards({ cardIds, enabled, asObject, }: {
197
183
  }): {
198
184
  cards: PageActivityWithId[];
199
185
  cardsObject: Record<string, PageActivityWithId> | null;
200
- cardsQueries: _tanstack_react_query.UseQueryResult<PageActivityWithId | null, Error>[];
186
+ cardsQueries: _tanstack_react_query.UseQueryResult<{
187
+ id: string;
188
+ data: {
189
+ type: ActivityPageType;
190
+ id: string;
191
+ owners: string[];
192
+ checked?: boolean;
193
+ completed?: boolean;
194
+ media_area_id?: string | null;
195
+ media_area_layout?: "left" | "right" | null;
196
+ score?: number;
197
+ verificationStatus?: VerificationCardStatus;
198
+ native_text?: string;
199
+ repeat?: number;
200
+ language?: string | null;
201
+ image?: {
202
+ path?: string | null;
203
+ url?: string;
204
+ };
205
+ audio?: {
206
+ path?: string | null;
207
+ url?: string;
208
+ } | null;
209
+ notes?: string;
210
+ difficulty?: string;
211
+ default_language?: string;
212
+ target_text?: string;
213
+ grading_criteria?: string;
214
+ scoring_type?: string;
215
+ grading_method?: "simple" | "rubric" | "manual" | "standards_based";
216
+ feedback_types?: string[];
217
+ rubricId?: string;
218
+ prompt?: string;
219
+ title?: string;
220
+ passing_score?: number;
221
+ maxCharacters?: number;
222
+ answer?: string[];
223
+ choices?: {
224
+ value: string;
225
+ option: string;
226
+ }[];
227
+ MCQType?: string;
228
+ multipleAttemptsAllowed?: boolean;
229
+ allowRetries?: boolean;
230
+ question?: string;
231
+ respondTime?: number;
232
+ hidePrompt?: boolean;
233
+ videoUrl?: string;
234
+ link?: string;
235
+ text?: string;
236
+ isListenAloud?: boolean;
237
+ embedCode?: string;
238
+ attempt?: number;
239
+ correct?: number;
240
+ autoGrade?: boolean;
241
+ points?: number;
242
+ shuffle?: boolean;
243
+ translation?: string;
244
+ includeAIContext?: boolean;
245
+ media_area_context_ref?: string | null;
246
+ standardId?: string;
247
+ target_proficiency_level?: string;
248
+ allowTTS?: boolean;
249
+ feedback_language?: string | null;
250
+ correct_answer?: string | null;
251
+ limit_attempts?: boolean;
252
+ max_attempts?: number;
253
+ rich_text?: string;
254
+ };
255
+ } | null, Error>[];
201
256
  };
202
257
  declare function useCreateCard(): {
203
258
  mutationCreateCard: _tanstack_react_query.UseMutationResult<{
@@ -289,7 +344,76 @@ declare function updateCardInCache({ cardId, card, queryClient, }: {
289
344
  declare function useGetCard({ cardId, enabled }: {
290
345
  cardId: string;
291
346
  enabled?: boolean;
292
- }): _tanstack_react_query.UseQueryResult<PageActivityWithId | null, Error>;
347
+ }): _tanstack_react_query.UseQueryResult<{
348
+ id: string;
349
+ data: {
350
+ type: ActivityPageType;
351
+ id: string;
352
+ owners: string[];
353
+ checked?: boolean;
354
+ completed?: boolean;
355
+ media_area_id?: string | null;
356
+ media_area_layout?: "left" | "right" | null;
357
+ score?: number;
358
+ verificationStatus?: VerificationCardStatus;
359
+ native_text?: string;
360
+ repeat?: number;
361
+ language?: string | null;
362
+ image?: {
363
+ path?: string | null;
364
+ url?: string;
365
+ };
366
+ audio?: {
367
+ path?: string | null;
368
+ url?: string;
369
+ } | null;
370
+ notes?: string;
371
+ difficulty?: string;
372
+ default_language?: string;
373
+ target_text?: string;
374
+ grading_criteria?: string;
375
+ scoring_type?: string;
376
+ grading_method?: "simple" | "rubric" | "manual" | "standards_based";
377
+ feedback_types?: string[];
378
+ rubricId?: string;
379
+ prompt?: string;
380
+ title?: string;
381
+ passing_score?: number;
382
+ maxCharacters?: number;
383
+ answer?: string[];
384
+ choices?: {
385
+ value: string;
386
+ option: string;
387
+ }[];
388
+ MCQType?: string;
389
+ multipleAttemptsAllowed?: boolean;
390
+ allowRetries?: boolean;
391
+ question?: string;
392
+ respondTime?: number;
393
+ hidePrompt?: boolean;
394
+ videoUrl?: string;
395
+ link?: string;
396
+ text?: string;
397
+ isListenAloud?: boolean;
398
+ embedCode?: string;
399
+ attempt?: number;
400
+ correct?: number;
401
+ autoGrade?: boolean;
402
+ points?: number;
403
+ shuffle?: boolean;
404
+ translation?: string;
405
+ includeAIContext?: boolean;
406
+ media_area_context_ref?: string | null;
407
+ standardId?: string;
408
+ target_proficiency_level?: string;
409
+ allowTTS?: boolean;
410
+ feedback_language?: string | null;
411
+ correct_answer?: string | null;
412
+ limit_attempts?: boolean;
413
+ max_attempts?: number;
414
+ rich_text?: string;
415
+ };
416
+ } | null, Error>;
293
417
 
294
418
  declare const createCardRepo: () => {
295
419
  createCard: (args_0: {
@@ -368,7 +492,76 @@ declare const createCardRepo: () => {
368
492
  }[]>;
369
493
  getCard: (params: {
370
494
  cardId: string;
371
- }) => Promise<PageActivityWithId | null>;
495
+ }) => Promise<{
496
+ id: string;
497
+ data: {
498
+ type: ActivityPageType;
499
+ id: string;
500
+ owners: string[];
501
+ checked?: boolean;
502
+ completed?: boolean;
503
+ media_area_id?: string | null;
504
+ media_area_layout?: "left" | "right" | null;
505
+ score?: number;
506
+ verificationStatus?: VerificationCardStatus;
507
+ native_text?: string;
508
+ repeat?: number;
509
+ language?: string | null;
510
+ image?: {
511
+ path?: string | null;
512
+ url?: string;
513
+ };
514
+ audio?: {
515
+ path?: string | null;
516
+ url?: string;
517
+ } | null;
518
+ notes?: string;
519
+ difficulty?: string;
520
+ default_language?: string;
521
+ target_text?: string;
522
+ grading_criteria?: string;
523
+ scoring_type?: string;
524
+ grading_method?: "simple" | "rubric" | "manual" | "standards_based";
525
+ feedback_types?: string[];
526
+ rubricId?: string;
527
+ prompt?: string;
528
+ title?: string;
529
+ passing_score?: number;
530
+ maxCharacters?: number;
531
+ answer?: string[];
532
+ choices?: {
533
+ value: string;
534
+ option: string;
535
+ }[];
536
+ MCQType?: string;
537
+ multipleAttemptsAllowed?: boolean;
538
+ allowRetries?: boolean;
539
+ question?: string;
540
+ respondTime?: number;
541
+ hidePrompt?: boolean;
542
+ videoUrl?: string;
543
+ link?: string;
544
+ text?: string;
545
+ isListenAloud?: boolean;
546
+ embedCode?: string;
547
+ attempt?: number;
548
+ correct?: number;
549
+ autoGrade?: boolean;
550
+ points?: number;
551
+ shuffle?: boolean;
552
+ translation?: string;
553
+ includeAIContext?: boolean;
554
+ media_area_context_ref?: string | null;
555
+ standardId?: string;
556
+ target_proficiency_level?: string;
557
+ allowTTS?: boolean;
558
+ feedback_language?: string | null;
559
+ correct_answer?: string | null;
560
+ limit_attempts?: boolean;
561
+ max_attempts?: number;
562
+ rich_text?: string;
563
+ };
564
+ } | null>;
372
565
  };
373
566
 
374
567
  declare function checkIsRepeatPage(cardType: ActivityPageType | undefined): boolean;
@@ -386,6 +579,7 @@ declare const checkTypePageActivity: (cardType: ActivityPageType | undefined) =>
386
579
  isRepeat: boolean;
387
580
  isMediaPage: boolean;
388
581
  isShortAnswer: boolean;
582
+ hasSomeType: boolean;
389
583
  };
390
584
 
391
585
  declare function getPagePrompt(card: PageActivityWithId | undefined): {
@@ -585,6 +779,7 @@ interface PageScore {
585
779
  }[];
586
780
  target_proficiency_level?: string;
587
781
  hint?: string[];
782
+ reviewed?: boolean;
588
783
  }
589
784
 
590
785
  declare enum AssignmentAnalyticsType {
@@ -1173,7 +1368,76 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
1173
1368
  }[]>;
1174
1369
  getCard: (params: {
1175
1370
  cardId: string;
1176
- }) => Promise<PageActivityWithId | null>;
1371
+ }) => Promise<{
1372
+ id: string;
1373
+ data: {
1374
+ type: ActivityPageType;
1375
+ id: string;
1376
+ owners: string[];
1377
+ checked?: boolean;
1378
+ completed?: boolean;
1379
+ media_area_id?: string | null;
1380
+ media_area_layout?: "left" | "right" | null;
1381
+ score?: number;
1382
+ verificationStatus?: VerificationCardStatus;
1383
+ native_text?: string;
1384
+ repeat?: number;
1385
+ language?: string | null;
1386
+ image?: {
1387
+ path?: string | null;
1388
+ url?: string;
1389
+ };
1390
+ audio?: {
1391
+ path?: string | null;
1392
+ url?: string;
1393
+ } | null;
1394
+ notes?: string;
1395
+ difficulty?: string;
1396
+ default_language?: string;
1397
+ target_text?: string;
1398
+ grading_criteria?: string;
1399
+ scoring_type?: string;
1400
+ grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1401
+ feedback_types?: string[];
1402
+ rubricId?: string;
1403
+ prompt?: string;
1404
+ title?: string;
1405
+ passing_score?: number;
1406
+ maxCharacters?: number;
1407
+ answer?: string[];
1408
+ choices?: {
1409
+ value: string;
1410
+ option: string;
1411
+ }[];
1412
+ MCQType?: string;
1413
+ multipleAttemptsAllowed?: boolean;
1414
+ allowRetries?: boolean;
1415
+ question?: string;
1416
+ respondTime?: number;
1417
+ hidePrompt?: boolean;
1418
+ videoUrl?: string;
1419
+ link?: string;
1420
+ text?: string;
1421
+ isListenAloud?: boolean;
1422
+ embedCode?: string;
1423
+ attempt?: number;
1424
+ correct?: number;
1425
+ autoGrade?: boolean;
1426
+ points?: number;
1427
+ shuffle?: boolean;
1428
+ translation?: string;
1429
+ includeAIContext?: boolean;
1430
+ media_area_context_ref?: string | null;
1431
+ standardId?: string;
1432
+ target_proficiency_level?: string;
1433
+ allowTTS?: boolean;
1434
+ feedback_language?: string | null;
1435
+ correct_answer?: string | null;
1436
+ limit_attempts?: boolean;
1437
+ max_attempts?: number;
1438
+ rich_text?: string;
1439
+ };
1440
+ } | null>;
1177
1441
  };
1178
1442
  };
1179
1443
 
@@ -1346,7 +1610,76 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
1346
1610
  };
1347
1611
  cards: {
1348
1612
  data: Record<string, PageActivityWithId> | null;
1349
- query: _tanstack_react_query.UseQueryResult<PageActivityWithId | null, Error>[];
1613
+ query: _tanstack_react_query.UseQueryResult<{
1614
+ id: string;
1615
+ data: {
1616
+ type: ActivityPageType;
1617
+ id: string;
1618
+ owners: string[];
1619
+ checked?: boolean;
1620
+ completed?: boolean;
1621
+ media_area_id?: string | null;
1622
+ media_area_layout?: "left" | "right" | null;
1623
+ score?: number;
1624
+ verificationStatus?: VerificationCardStatus;
1625
+ native_text?: string;
1626
+ repeat?: number;
1627
+ language?: string | null;
1628
+ image?: {
1629
+ path?: string | null;
1630
+ url?: string;
1631
+ };
1632
+ audio?: {
1633
+ path?: string | null;
1634
+ url?: string;
1635
+ } | null;
1636
+ notes?: string;
1637
+ difficulty?: string;
1638
+ default_language?: string;
1639
+ target_text?: string;
1640
+ grading_criteria?: string;
1641
+ scoring_type?: string;
1642
+ grading_method?: "simple" | "rubric" | "manual" | "standards_based";
1643
+ feedback_types?: string[];
1644
+ rubricId?: string;
1645
+ prompt?: string;
1646
+ title?: string;
1647
+ passing_score?: number;
1648
+ maxCharacters?: number;
1649
+ answer?: string[];
1650
+ choices?: {
1651
+ value: string;
1652
+ option: string;
1653
+ }[];
1654
+ MCQType?: string;
1655
+ multipleAttemptsAllowed?: boolean;
1656
+ allowRetries?: boolean;
1657
+ question?: string;
1658
+ respondTime?: number;
1659
+ hidePrompt?: boolean;
1660
+ videoUrl?: string;
1661
+ link?: string;
1662
+ text?: string;
1663
+ isListenAloud?: boolean;
1664
+ embedCode?: string;
1665
+ attempt?: number;
1666
+ correct?: number;
1667
+ autoGrade?: boolean;
1668
+ points?: number;
1669
+ shuffle?: boolean;
1670
+ translation?: string;
1671
+ includeAIContext?: boolean;
1672
+ media_area_context_ref?: string | null;
1673
+ standardId?: string;
1674
+ target_proficiency_level?: string;
1675
+ allowTTS?: boolean;
1676
+ feedback_language?: string | null;
1677
+ correct_answer?: string | null;
1678
+ limit_attempts?: boolean;
1679
+ max_attempts?: number;
1680
+ rich_text?: string;
1681
+ };
1682
+ } | null, Error>[];
1350
1683
  cardsArray: PageActivityWithId[];
1351
1684
  };
1352
1685
  assignment: {
@@ -2853,7 +3186,76 @@ declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
2853
3186
  }[]>;
2854
3187
  getCard: (params: {
2855
3188
  cardId: string;
2856
- }) => Promise<PageActivityWithId | null>;
3189
+ }) => Promise<{
3190
+ id: string;
3191
+ data: {
3192
+ type: ActivityPageType;
3193
+ id: string;
3194
+ owners: string[];
3195
+ checked?: boolean;
3196
+ completed?: boolean;
3197
+ media_area_id?: string | null;
3198
+ media_area_layout?: "left" | "right" | null;
3199
+ score?: number;
3200
+ verificationStatus?: VerificationCardStatus;
3201
+ native_text?: string;
3202
+ repeat?: number;
3203
+ language?: string | null;
3204
+ image?: {
3205
+ path?: string | null;
3206
+ url?: string;
3207
+ };
3208
+ audio?: {
3209
+ path?: string | null;
3210
+ url?: string;
3211
+ } | null;
3212
+ notes?: string;
3213
+ difficulty?: string;
3214
+ default_language?: string;
3215
+ target_text?: string;
3216
+ grading_criteria?: string;
3217
+ scoring_type?: string;
3218
+ grading_method?: "simple" | "rubric" | "manual" | "standards_based";
3219
+ feedback_types?: string[];
3220
+ rubricId?: string;
3221
+ prompt?: string;
3222
+ title?: string;
3223
+ passing_score?: number;
3224
+ maxCharacters?: number;
3225
+ answer?: string[];
3226
+ choices?: {
3227
+ value: string;
3228
+ option: string;
3229
+ }[];
3230
+ MCQType?: string;
3231
+ multipleAttemptsAllowed?: boolean;
3232
+ allowRetries?: boolean;
3233
+ question?: string;
3234
+ respondTime?: number;
3235
+ hidePrompt?: boolean;
3236
+ videoUrl?: string;
3237
+ link?: string;
3238
+ text?: string;
3239
+ isListenAloud?: boolean;
3240
+ embedCode?: string;
3241
+ attempt?: number;
3242
+ correct?: number;
3243
+ autoGrade?: boolean;
3244
+ points?: number;
3245
+ shuffle?: boolean;
3246
+ translation?: string;
3247
+ includeAIContext?: boolean;
3248
+ media_area_context_ref?: string | null;
3249
+ standardId?: string;
3250
+ target_proficiency_level?: string;
3251
+ allowTTS?: boolean;
3252
+ feedback_language?: string | null;
3253
+ correct_answer?: string | null;
3254
+ limit_attempts?: boolean;
3255
+ max_attempts?: number;
3256
+ rich_text?: string;
3257
+ };
3258
+ } | null>;
2857
3259
  };
2858
3260
  };
2859
3261
 
package/dist/index.web.js CHANGED
@@ -1512,6 +1512,36 @@ function useSubmitPracticeScore() {
1512
1512
  import { useMutation as useMutation2, useQueries, useQuery as useQuery3 } from "@tanstack/react-query";
1513
1513
  import { useMemo } from "react";
1514
1514
 
1515
+ // src/domains/cards/card.model.ts
1516
+ var ActivityPageType = /* @__PURE__ */ ((ActivityPageType2) => {
1517
+ ActivityPageType2["READ_REPEAT"] = "READ_REPEAT";
1518
+ ActivityPageType2["READ_RESPOND"] = "READ_RESPOND";
1519
+ ActivityPageType2["FREE_RESPONSE"] = "FREE_RESPONSE";
1520
+ ActivityPageType2["REPEAT"] = "REPEAT";
1521
+ ActivityPageType2["RESPOND"] = "RESPOND";
1522
+ ActivityPageType2["RESPOND_WRITE"] = "RESPOND_WRITE";
1523
+ ActivityPageType2["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
1524
+ ActivityPageType2["MEDIA_PAGE"] = "MEDIA_PAGE";
1525
+ ActivityPageType2["SHORT_ANSWER"] = "SHORT_ANSWER";
1526
+ return ActivityPageType2;
1527
+ })(ActivityPageType || {});
1528
+ var RESPOND_PAGE_ACTIVITY_TYPES = [
1529
+ "READ_RESPOND" /* READ_RESPOND */,
1530
+ "RESPOND" /* RESPOND */,
1531
+ "RESPOND_WRITE" /* RESPOND_WRITE */,
1532
+ "FREE_RESPONSE" /* FREE_RESPONSE */
1533
+ ];
1534
+ var MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES = ["MULTIPLE_CHOICE" /* MULTIPLE_CHOICE */];
1535
+ var REPEAT_PAGE_ACTIVITY_TYPES = ["READ_REPEAT" /* READ_REPEAT */, "REPEAT" /* REPEAT */];
1536
+ var RESPOND_WRITE_PAGE_ACTIVITY_TYPES = [
1537
+ "RESPOND_WRITE" /* RESPOND_WRITE */,
1538
+ "FREE_RESPONSE" /* FREE_RESPONSE */
1539
+ ];
1540
+ var RESPOND_AUDIO_PAGE_ACTIVITY_TYPES = [
1541
+ "RESPOND" /* RESPOND */,
1542
+ "READ_RESPOND" /* READ_RESPOND */
1543
+ ];
1544
+
1515
1545
  // src/domains/cards/card.constants.ts
1516
1546
  var FeedbackTypesCard = /* @__PURE__ */ ((FeedbackTypesCard2) => {
1517
1547
  FeedbackTypesCard2["SuggestedResponse"] = "suggested_response";
@@ -1615,57 +1645,21 @@ async function _getCard(params) {
1615
1645
  const ref = refsCardsFiresotre.card(params.cardId);
1616
1646
  const response = await api.getDoc(ref);
1617
1647
  if (!response.data) return null;
1618
- return response.data;
1648
+ const type = response.data.type || "READ_REPEAT" /* READ_REPEAT */;
1649
+ const cardsMapped = {
1650
+ ...response.data,
1651
+ type
1652
+ };
1653
+ return {
1654
+ id: response.id,
1655
+ data: cardsMapped
1656
+ };
1619
1657
  }
1620
1658
  var getCard = withErrorHandler(_getCard, "getCard");
1621
1659
 
1622
1660
  // src/domains/cards/services/create-card.service.ts
1623
1661
  import { v4 } from "uuid";
1624
1662
 
1625
- // src/domains/cards/card.model.ts
1626
- var ActivityPageType = /* @__PURE__ */ ((ActivityPageType2) => {
1627
- ActivityPageType2["READ_REPEAT"] = "READ_REPEAT";
1628
- ActivityPageType2["VIDEO"] = "VIDEO";
1629
- ActivityPageType2["TEXT"] = "TEXT";
1630
- ActivityPageType2["READ_RESPOND"] = "READ_RESPOND";
1631
- ActivityPageType2["FREE_RESPONSE"] = "FREE_RESPONSE";
1632
- ActivityPageType2["REPEAT"] = "REPEAT";
1633
- ActivityPageType2["RESPOND"] = "RESPOND";
1634
- ActivityPageType2["RESPOND_WRITE"] = "RESPOND_WRITE";
1635
- ActivityPageType2["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
1636
- ActivityPageType2["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
1637
- ActivityPageType2["PODCAST"] = "PODCAST";
1638
- ActivityPageType2["MEDIA_PAGE"] = "MEDIA_PAGE";
1639
- ActivityPageType2["WRITE"] = "WRITE";
1640
- ActivityPageType2["SHORT_ANSWER"] = "SHORT_ANSWER";
1641
- ActivityPageType2["SHORT_STORY"] = "SHORT_STORY";
1642
- ActivityPageType2["SPEAK"] = "SPEAK";
1643
- ActivityPageType2["CONVERSATION"] = "CONVERSATION";
1644
- ActivityPageType2["CONVERSATION_WRITE"] = "CONVERSATION_WRITE";
1645
- ActivityPageType2["DIALOGUE"] = "DIALOGUE";
1646
- ActivityPageType2["INSTRUCTION"] = "INSTRUCTION";
1647
- ActivityPageType2["LISTEN"] = "LISTEN";
1648
- ActivityPageType2["READ"] = "READ";
1649
- ActivityPageType2["ANSWER"] = "ANSWER";
1650
- return ActivityPageType2;
1651
- })(ActivityPageType || {});
1652
- var RESPOND_PAGE_ACTIVITY_TYPES = [
1653
- "READ_RESPOND" /* READ_RESPOND */,
1654
- "RESPOND" /* RESPOND */,
1655
- "RESPOND_WRITE" /* RESPOND_WRITE */,
1656
- "FREE_RESPONSE" /* FREE_RESPONSE */
1657
- ];
1658
- var MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES = ["MULTIPLE_CHOICE" /* MULTIPLE_CHOICE */];
1659
- var REPEAT_PAGE_ACTIVITY_TYPES = ["READ_REPEAT" /* READ_REPEAT */, "REPEAT" /* REPEAT */];
1660
- var RESPOND_WRITE_PAGE_ACTIVITY_TYPES = [
1661
- "RESPOND_WRITE" /* RESPOND_WRITE */,
1662
- "FREE_RESPONSE" /* FREE_RESPONSE */
1663
- ];
1664
- var RESPOND_AUDIO_PAGE_ACTIVITY_TYPES = [
1665
- "RESPOND" /* RESPOND */,
1666
- "READ_RESPOND" /* READ_RESPOND */
1667
- ];
1668
-
1669
1663
  // src/utils/text-utils.ts
1670
1664
  import sha1 from "js-sha1";
1671
1665
  var purify = (word) => {
@@ -1887,6 +1881,19 @@ var checkTypePageActivity = (cardType) => {
1887
1881
  const isRepeat = checkIsRepeatPage(cardType);
1888
1882
  const isMediaPage = checkIsMediaPage(cardType);
1889
1883
  const isShortAnswer = checkIsShortAnswerPage(cardType);
1884
+ const isNoOneOfThem = !isRespond && !isMC && !isRepeat && !isMediaPage && !isShortAnswer;
1885
+ if (isNoOneOfThem) {
1886
+ return {
1887
+ isRespondAudio: false,
1888
+ isRespondWritten: false,
1889
+ isRespond: false,
1890
+ isMC: false,
1891
+ isRepeat: true,
1892
+ isMediaPage: false,
1893
+ isShortAnswer: false,
1894
+ hasSomeType: false
1895
+ };
1896
+ }
1890
1897
  return {
1891
1898
  isRespondAudio,
1892
1899
  isRespondWritten,
@@ -1894,7 +1901,8 @@ var checkTypePageActivity = (cardType) => {
1894
1901
  isMC,
1895
1902
  isRepeat,
1896
1903
  isMediaPage,
1897
- isShortAnswer
1904
+ isShortAnswer,
1905
+ hasSomeType: true
1898
1906
  };
1899
1907
  };
1900
1908