alexsys-exam-renderer 0.1.47 → 0.1.48

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.js CHANGED
@@ -6972,11 +6972,11 @@ var vc = {
6972
6972
  logoAlt: "المملكة المغربية — وزارة التربية الوطنية والتعليم الأولي والرياضة",
6973
6973
  logoSrc: "/logo/Logo_Men_AR.png"
6974
6974
  };
6975
- function yc({ exam: e, locale: t = "fr", variant: n }) {
6976
- let r = vl(t), i = Mc(e);
6975
+ function yc({ exam: e, institutionLogoSrc: t, locale: n = "fr", variant: r }) {
6976
+ let i = vl(n), a = Mc(e);
6977
6977
  return /* @__PURE__ */ c("article", {
6978
- className: `printable-exam printable-exam--${n}`,
6979
- dir: _l(t) ? "rtl" : "ltr",
6978
+ className: `printable-exam printable-exam--${r}`,
6979
+ dir: _l(n) ? "rtl" : "ltr",
6980
6980
  children: [
6981
6981
  /* @__PURE__ */ c("header", {
6982
6982
  className: "printable-exam__head",
@@ -6986,7 +6986,7 @@ function yc({ exam: e, locale: t = "fr", variant: n }) {
6986
6986
  className: "printable-exam__student",
6987
6987
  children: [/* @__PURE__ */ s("span", {
6988
6988
  className: "printable-exam__student-label",
6989
- children: r.studentName
6989
+ children: i.studentName
6990
6990
  }), /* @__PURE__ */ s("span", {
6991
6991
  "aria-hidden": "true",
6992
6992
  className: "printable-exam__student-line"
@@ -6995,7 +6995,7 @@ function yc({ exam: e, locale: t = "fr", variant: n }) {
6995
6995
  }), /* @__PURE__ */ s("img", {
6996
6996
  alt: vc.logoAlt,
6997
6997
  className: "printable-exam__crest",
6998
- src: vc.logoSrc
6998
+ src: t || vc.logoSrc
6999
6999
  })]
7000
7000
  }),
7001
7001
  /* @__PURE__ */ c("div", {
@@ -7005,23 +7005,23 @@ function yc({ exam: e, locale: t = "fr", variant: n }) {
7005
7005
  children: [
7006
7006
  /* @__PURE__ */ s(Dc, {
7007
7007
  icon: /* @__PURE__ */ s(_, { "aria-hidden": "true" }),
7008
- label: r.duration,
7008
+ label: i.duration,
7009
7009
  value: jc(e.timer)
7010
7010
  }),
7011
7011
  /* @__PURE__ */ s(Dc, {
7012
7012
  icon: /* @__PURE__ */ s(x, { "aria-hidden": "true" }),
7013
- label: r.level,
7013
+ label: i.level,
7014
7014
  value: e.level
7015
7015
  }),
7016
7016
  /* @__PURE__ */ s(Dc, {
7017
7017
  icon: /* @__PURE__ */ s(m, { "aria-hidden": "true" }),
7018
- label: _l(t) ? "المادة" : r.subject ?? "Matière",
7018
+ label: _l(n) ? "المادة" : i.subject ?? "Matière",
7019
7019
  value: e.subject
7020
7020
  }),
7021
7021
  /* @__PURE__ */ s(Dc, {
7022
7022
  icon: /* @__PURE__ */ s(P, { "aria-hidden": "true" }),
7023
- label: r.totalPoints,
7024
- value: i > 0 ? Ac(i, r) : ""
7023
+ label: i.totalPoints,
7024
+ value: a > 0 ? Ac(a, i) : ""
7025
7025
  })
7026
7026
  ]
7027
7027
  }), /* @__PURE__ */ c("div", {
@@ -7031,19 +7031,19 @@ function yc({ exam: e, locale: t = "fr", variant: n }) {
7031
7031
  children: /* @__PURE__ */ s(p, { "aria-hidden": "true" })
7032
7032
  }), /* @__PURE__ */ c("span", {
7033
7033
  className: "printable-meta-pill__text",
7034
- children: [/* @__PURE__ */ s("small", { children: r.finalGrade }), /* @__PURE__ */ c("strong", { children: [/* @__PURE__ */ s("span", {
7034
+ children: [/* @__PURE__ */ s("small", { children: i.finalGrade }), /* @__PURE__ */ c("strong", { children: [/* @__PURE__ */ s("span", {
7035
7035
  "aria-hidden": "true",
7036
7036
  className: "printable-meta-pill__blank"
7037
- }), i > 0 ? ` / ${Ac(i, r)}` : ""] })]
7037
+ }), a > 0 ? ` / ${Ac(a, i)}` : ""] })]
7038
7038
  })]
7039
7039
  })]
7040
7040
  }),
7041
7041
  /* @__PURE__ */ s("div", {
7042
7042
  className: "printable-exam__sections",
7043
7043
  children: e.sections.map((e) => /* @__PURE__ */ s(bc, {
7044
- locale: t,
7044
+ locale: n,
7045
7045
  section: e,
7046
- variant: n
7046
+ variant: r
7047
7047
  }, e.id))
7048
7048
  }),
7049
7049
  /* @__PURE__ */ s("div", {
@@ -2,6 +2,8 @@ import type { ExamPaper, ExamSection, QuestionBlock } from '../exam-session/exam
2
2
  export type PrintableExamVariant = 'exam-themed' | 'simplified';
3
3
  type PrintableExamDocumentProps = {
4
4
  exam: ExamPaper;
5
+ /** Optional institutional mark supplied by the hosting application. */
6
+ institutionLogoSrc?: string;
5
7
  locale?: string;
6
8
  variant: PrintableExamVariant;
7
9
  };
@@ -15,7 +17,7 @@ export type PrintableQuestionRendererProps = {
15
17
  question: QuestionBlock;
16
18
  variant: PrintableExamVariant;
17
19
  };
18
- export declare function PrintableExamDocument({ exam, locale, variant, }: PrintableExamDocumentProps): import("react").JSX.Element;
20
+ export declare function PrintableExamDocument({ exam, institutionLogoSrc, locale, variant, }: PrintableExamDocumentProps): import("react").JSX.Element;
19
21
  export declare function PrintableSectionRenderer({ locale, section, variant, }: PrintableSectionRendererProps): import("react").JSX.Element;
20
22
  export declare function PrintableQuestionRenderer({ locale, question, variant, }: PrintableQuestionRendererProps): import("react").JSX.Element;
21
23
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PrintableExamDocument.d.ts","sourceRoot":"","sources":["../../src/renderer/PrintableExamDocument.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,SAAS,EACT,WAAW,EAYX,aAAa,EAId,MAAM,kCAAkC,CAAA;AAkCzC,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,YAAY,CAAA;AAE/D,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,oBAAoB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,WAAW,CAAA;IACpB,O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AAa,EACb,OAAO,GACR,EAAE,0BAA0B,+BA4G5B;AAED,wBAAgB,wBAAwB,CAAC,EACvC,MAAa,EACb,OAAO,EACP,OAAO,GACR,EAAE,6BAA6B,+BA+C/B;AAED,wBAAgB,yBAAyB,CAAC,EACxC,MAAa,EACb,QAAQ,EACR,OAAO,GACR,EAAE,8BAA8B,+BAsDhC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alexsys-exam-renderer",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "React UI library for rendering digital exam interfaces.",
5
5
  "type": "module",
6
6
  "license": "MIT",