@tinyweb_dev/oe-exam-sdk 0.1.7 → 0.1.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.
Files changed (47) hide show
  1. package/dist/api/exam-entry.d.ts +1 -1
  2. package/dist/api/exam-entry.types.d.ts +14 -0
  3. package/dist/api/exam-taking.types.d.ts +2 -0
  4. package/dist/components/exams/entry/StudentExamEntryPageContainer.d.ts +4 -2
  5. package/dist/components/exams/entry/StudentExamEntryPageContainer.js +1 -1
  6. package/dist/components/exams/take/ExamTakingPageContainer.d.ts +4 -2
  7. package/dist/components/exams/take/ExamTakingPageContainer.js +1 -1
  8. package/dist/components/exams/take/components/question-renderers/MoversWritingRenderer.js +1 -1
  9. package/dist/components/exams/take/exam-taking.utils.d.ts +8 -2
  10. package/dist/components/exams/take/exam-taking.utils.js +1 -1
  11. package/dist/components/exams/take/utils/question-transformers.d.ts +4 -0
  12. package/dist/components/exams/take/utils/question-transformers.js +1 -1
  13. package/dist/components/features/exam-entry/themed/CambridgeYleWaitingRoom.js +1 -1
  14. package/dist/components/features/exam-entry/themed/cambridge-yle-waiting-parts.d.ts +18 -0
  15. package/dist/components/features/exam-entry/themed/cambridge-yle-waiting-parts.js +1 -0
  16. package/dist/components/features/exam-entry/themed/index.d.ts +3 -0
  17. package/dist/components/features/exam-entry/themed/index.js +1 -1
  18. package/dist/components/questions/types/write-a-short-letter/WriteAShortLetterClient.js +1 -1
  19. package/dist/components/results/ResultReviewPageContainer.js +1 -1
  20. package/dist/components/themes/cambridge-yle/CambridgeYleSidebar.d.ts +2 -0
  21. package/dist/components/themes/cambridge-yle/CambridgeYleSidebar.js +1 -1
  22. package/dist/components/themes/english-certification/EcAnswerTheQuestion.js +1 -1
  23. package/dist/components/themes/english-certification/EcMatchByWritingAnswer.js +1 -1
  24. package/dist/components/themes/english-certification/EcWordFillParagraph.js +1 -1
  25. package/dist/components/themes/english-certification/EcWordFillStructuredForm.js +1 -1
  26. package/dist/components/themes/english-certification/EcWritingTask.js +1 -1
  27. package/dist/components/themes/english-certification/EnglishCertificationExamLayout.js +1 -1
  28. package/dist/components/themes/english-certification/EnglishCertificationGroupedQuestion.js +1 -1
  29. package/dist/components/themes/english-certification/EnglishCertificationInstructionBanner.d.ts +17 -0
  30. package/dist/components/themes/english-certification/EnglishCertificationInstructionBanner.js +1 -0
  31. package/dist/components/themes/english-certification/EnglishCertificationPartHeader.d.ts +24 -0
  32. package/dist/components/themes/english-certification/EnglishCertificationPartHeader.js +1 -0
  33. package/dist/components/themes/english-certification/EnglishCertificationQuestionCard.d.ts +3 -1
  34. package/dist/components/themes/english-certification/EnglishCertificationQuestionCard.js +1 -1
  35. package/dist/components/themes/english-certification/EnglishCertificationQuestionRenderer.js +1 -1
  36. package/dist/components/themes/english-certification/EnglishCertificationReadingSection.js +1 -1
  37. package/dist/components/themes/english-certification/EnglishCertificationSingleQuestionList.d.ts +0 -2
  38. package/dist/components/themes/english-certification/EnglishCertificationSingleQuestionList.js +1 -1
  39. package/dist/components/themes/english-certification/english-cert-scroll.d.ts +32 -0
  40. package/dist/components/themes/english-certification/english-cert-scroll.js +1 -0
  41. package/dist/components/themes/english-certification/index.d.ts +4 -1
  42. package/dist/components/themes/english-certification/index.js +1 -1
  43. package/dist/shared/lib/html-content.d.ts +14 -0
  44. package/dist/shared/lib/html-content.js +1 -0
  45. package/dist/shared/types/exam-taking.types.d.ts +2 -0
  46. package/dist/shared/types/student.types.d.ts +14 -0
  47. package/package.json +1 -1
@@ -6,11 +6,14 @@ export { EnglishCertificationFooterBar } from './EnglishCertificationFooterBar';
6
6
  export { EnglishCertificationOptionSelector } from './EnglishCertificationOptionSelector';
7
7
  export { EnglishCertificationAudioPlayer } from './EnglishCertificationAudioPlayer';
8
8
  export { EnglishCertificationSingleQuestion } from './EnglishCertificationSingleQuestion';
9
- export { EnglishCertificationSingleQuestionList, englishCertQuestionDomId, } from './EnglishCertificationSingleQuestionList';
9
+ export { EnglishCertificationSingleQuestionList, } from './EnglishCertificationSingleQuestionList';
10
+ export { ENGLISH_CERT_STICKY_AUDIO_ATTR, englishCertQuestionDomId, scrollToEnglishCertQuestion, } from './english-cert-scroll';
10
11
  export { EnglishCertificationGroupedQuestion } from './EnglishCertificationGroupedQuestion';
11
12
  export { EnglishCertificationReadingSection } from './EnglishCertificationReadingSection';
12
13
  export { EnglishCertificationFlagButton } from './EnglishCertificationFlagButton';
13
14
  export { EnglishCertificationBrand } from './EnglishCertificationBrand';
15
+ export { EnglishCertificationPartHeader } from './EnglishCertificationPartHeader';
16
+ export { EnglishCertificationInstructionBanner } from './EnglishCertificationInstructionBanner';
14
17
  export { EcWordFillStructuredForm } from './EcWordFillStructuredForm';
15
18
  export { EcMatchByWritingAnswer } from './EcMatchByWritingAnswer';
16
19
  export { EcAnswerTheQuestion } from './EcAnswerTheQuestion';
@@ -1 +1 @@
1
- export{EnglishCertificationExamLayout}from"./EnglishCertificationExamLayout";export{EnglishCertificationQuestionRenderer}from"./EnglishCertificationQuestionRenderer";export{EnglishCertificationHeader}from"./EnglishCertificationHeader";export{EnglishCertificationNavigationPanel}from"./EnglishCertificationNavigationPanel";export{EnglishCertificationFooterBar}from"./EnglishCertificationFooterBar";export{EnglishCertificationOptionSelector}from"./EnglishCertificationOptionSelector";export{EnglishCertificationAudioPlayer}from"./EnglishCertificationAudioPlayer";export{EnglishCertificationSingleQuestion}from"./EnglishCertificationSingleQuestion";export{EnglishCertificationSingleQuestionList,englishCertQuestionDomId}from"./EnglishCertificationSingleQuestionList";export{EnglishCertificationGroupedQuestion}from"./EnglishCertificationGroupedQuestion";export{EnglishCertificationReadingSection}from"./EnglishCertificationReadingSection";export{EnglishCertificationFlagButton}from"./EnglishCertificationFlagButton";export{EnglishCertificationBrand}from"./EnglishCertificationBrand";export{EcWordFillStructuredForm}from"./EcWordFillStructuredForm";export{EcMatchByWritingAnswer}from"./EcMatchByWritingAnswer";export{EcAnswerTheQuestion}from"./EcAnswerTheQuestion";export{EcWordFillParagraph}from"./EcWordFillParagraph";export{EcWritingTask}from"./EcWritingTask";
1
+ export{EnglishCertificationExamLayout}from"./EnglishCertificationExamLayout";export{EnglishCertificationQuestionRenderer}from"./EnglishCertificationQuestionRenderer";export{EnglishCertificationHeader}from"./EnglishCertificationHeader";export{EnglishCertificationNavigationPanel}from"./EnglishCertificationNavigationPanel";export{EnglishCertificationFooterBar}from"./EnglishCertificationFooterBar";export{EnglishCertificationOptionSelector}from"./EnglishCertificationOptionSelector";export{EnglishCertificationAudioPlayer}from"./EnglishCertificationAudioPlayer";export{EnglishCertificationSingleQuestion}from"./EnglishCertificationSingleQuestion";export{EnglishCertificationSingleQuestionList}from"./EnglishCertificationSingleQuestionList";export{ENGLISH_CERT_STICKY_AUDIO_ATTR,englishCertQuestionDomId,scrollToEnglishCertQuestion}from"./english-cert-scroll";export{EnglishCertificationGroupedQuestion}from"./EnglishCertificationGroupedQuestion";export{EnglishCertificationReadingSection}from"./EnglishCertificationReadingSection";export{EnglishCertificationFlagButton}from"./EnglishCertificationFlagButton";export{EnglishCertificationBrand}from"./EnglishCertificationBrand";export{EnglishCertificationPartHeader}from"./EnglishCertificationPartHeader";export{EnglishCertificationInstructionBanner}from"./EnglishCertificationInstructionBanner";export{EcWordFillStructuredForm}from"./EcWordFillStructuredForm";export{EcMatchByWritingAnswer}from"./EcMatchByWritingAnswer";export{EcAnswerTheQuestion}from"./EcAnswerTheQuestion";export{EcWordFillParagraph}from"./EcWordFillParagraph";export{EcWritingTask}from"./EcWritingTask";
@@ -0,0 +1,14 @@
1
+ /** Detects whether a CMS string carries HTML markup vs plain text. */
2
+ export declare function isHtmlContent(value: string): boolean;
3
+ interface HtmlOrTextProps {
4
+ value: string;
5
+ className?: string;
6
+ /** Element used for plain-text fallback. Default: `p`. */
7
+ as?: 'p' | 'div' | 'span';
8
+ }
9
+ /**
10
+ * Renders CMS-authored content as HTML when it contains tags, otherwise as
11
+ * plain text. Content comes from the exam CMS (not end-user input).
12
+ */
13
+ export declare function HtmlOrText({ value, className, as }: HtmlOrTextProps): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{cn as l}from"../lib/utils";export function isHtmlContent(t){return/<[a-z][\s\S]*>/i.test(t)}export function HtmlOrText({value:e,className:s,as:i="p"}){if(!e)return null;if(isHtmlContent(e))return t("div",{className:l("[&_p]:mb-2 [&_p:last-child]:mb-0 [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_strong]:font-semibold",s),dangerouslySetInnerHTML:{__html:e}});return t(i,{className:s,children:e})}
@@ -16,6 +16,8 @@ export interface StoreTemplatePart {
16
16
  id: string | number;
17
17
  name: string;
18
18
  category?: string;
19
+ /** Max points for this part from exams.template.parts */
20
+ points?: number;
19
21
  startIndex?: number;
20
22
  endIndex?: number;
21
23
  questionCount?: number;
@@ -102,6 +102,17 @@ export interface AttemptQuestionsResponse {
102
102
  } | null;
103
103
  questions: any[];
104
104
  }
105
+ /** Summary of one exam part for student waiting room / room detail */
106
+ export interface StudentExamPartSummary {
107
+ id: string;
108
+ name: string;
109
+ skill?: string;
110
+ category?: string;
111
+ points: number;
112
+ questionCount: number;
113
+ instructions?: string;
114
+ questionType?: string;
115
+ }
105
116
  export interface StudentRoom {
106
117
  id: string;
107
118
  name: string;
@@ -127,9 +138,12 @@ export interface StudentRoom {
127
138
  passScore: number;
128
139
  numberOfParts: number | null;
129
140
  level?: string;
141
+ theme?: string;
130
142
  template?: {
131
143
  theme?: string;
132
144
  };
145
+ /** Summary parts from exams.template.parts */
146
+ parts?: StudentExamPartSummary[];
133
147
  };
134
148
  contest?: {
135
149
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinyweb_dev/oe-exam-sdk",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Reusable OceanEdu question components.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",