alexsys-exam-renderer 0.1.40 → 0.1.41
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/exam-session/subquestions.d.ts.map +1 -1
- package/dist/index.js +33 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subquestions.d.ts","sourceRoot":"","sources":["../../src/exam-session/subquestions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EAGb,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAG3B,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,WAqBpF;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAMxK;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,aAAa,GAAG,sBAAsB,EAAE,CAqE5F;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYnG;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQtG;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CASvF;AAED,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,aAAa,sBAOzE;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa,CAIlF;AAED,wBAAgB,oBAAoB,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R;AAED,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,WAAW,WAExE"}
|
package/dist/index.js
CHANGED
|
@@ -212,7 +212,7 @@ function Ae(e) {
|
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
function je(e, t, n) {
|
|
215
|
-
let r = G(e), i = Te(e).findIndex((e) => e.id === t);
|
|
215
|
+
let r = G(e), i = (e.type === "checkbox-choice" ? e.choices : Te(e)).findIndex((e) => e.id === t);
|
|
216
216
|
return i < 0 || r.prefixStyle === "none" ? "" : r.prefixStyle === "bullet" ? "•" : r.prefixStyle === "numeric" ? `${i + 1}.` : `${n === "rtl" ? Pe(i) : Ne(i)}.`;
|
|
217
217
|
}
|
|
218
218
|
function Me(e) {
|
|
@@ -5500,6 +5500,7 @@ function ls(e, t, n, r, i, a = !1, l) {
|
|
|
5500
5500
|
choices: e.choices,
|
|
5501
5501
|
isRightToLeft: a,
|
|
5502
5502
|
onChange: (t) => n(e.id, t),
|
|
5503
|
+
question: e,
|
|
5503
5504
|
selectionMode: e.selectionMode,
|
|
5504
5505
|
value: xs(t(e.id))
|
|
5505
5506
|
});
|
|
@@ -6233,12 +6234,12 @@ function Hs({ clearAnswer: e, getAnswer: t, isRightToLeft: n, question: r, updat
|
|
|
6233
6234
|
})
|
|
6234
6235
|
});
|
|
6235
6236
|
}
|
|
6236
|
-
function Us({ choices: e, isRightToLeft: t, onChange: n,
|
|
6237
|
-
let
|
|
6238
|
-
function
|
|
6239
|
-
let t =
|
|
6237
|
+
function Us({ choices: e, isRightToLeft: t, onChange: n, question: r, selectionMode: i, value: a }) {
|
|
6238
|
+
let o = a?.choiceIds ?? [], l = new Set(o);
|
|
6239
|
+
function u(e) {
|
|
6240
|
+
let t = l.has(e);
|
|
6240
6241
|
n({
|
|
6241
|
-
choiceIds:
|
|
6242
|
+
choiceIds: i === "single" ? t ? [] : [e] : t ? o.filter((t) => t !== e) : [...o, e],
|
|
6242
6243
|
kind: "checkbox-choices"
|
|
6243
6244
|
});
|
|
6244
6245
|
}
|
|
@@ -6248,18 +6249,26 @@ function Us({ choices: e, isRightToLeft: t, onChange: n, selectionMode: r, value
|
|
|
6248
6249
|
children: /* @__PURE__ */ s("div", {
|
|
6249
6250
|
className: "checkbox-choice__grid",
|
|
6250
6251
|
children: e.map((e) => {
|
|
6251
|
-
let
|
|
6252
|
+
let n = l.has(e.id);
|
|
6252
6253
|
return /* @__PURE__ */ c("button", {
|
|
6253
|
-
"aria-checked":
|
|
6254
|
-
className:
|
|
6255
|
-
onClick: () =>
|
|
6254
|
+
"aria-checked": n,
|
|
6255
|
+
className: n ? "checkbox-choice__option checkbox-choice__option--selected" : "checkbox-choice__option",
|
|
6256
|
+
onClick: () => u(e.id),
|
|
6256
6257
|
role: "checkbox",
|
|
6257
6258
|
type: "button",
|
|
6258
|
-
children: [
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6259
|
+
children: [
|
|
6260
|
+
/* @__PURE__ */ s("span", {
|
|
6261
|
+
"aria-hidden": "true",
|
|
6262
|
+
className: "checkbox-choice__box",
|
|
6263
|
+
children: n ? "✓" : null
|
|
6264
|
+
}),
|
|
6265
|
+
/* @__PURE__ */ s(fs, {
|
|
6266
|
+
childId: e.id,
|
|
6267
|
+
isRightToLeft: t,
|
|
6268
|
+
question: r
|
|
6269
|
+
}),
|
|
6270
|
+
/* @__PURE__ */ s("span", { children: e.label })
|
|
6271
|
+
]
|
|
6263
6272
|
}, e.id);
|
|
6264
6273
|
})
|
|
6265
6274
|
})
|
|
@@ -7022,7 +7031,15 @@ function fc(t, n, r, i) {
|
|
|
7022
7031
|
className: "printable-checkbox-choice__grid",
|
|
7023
7032
|
children: t.choices.map((e) => /* @__PURE__ */ c("div", {
|
|
7024
7033
|
className: "printable-checkbox-choice__option",
|
|
7025
|
-
children: [
|
|
7034
|
+
children: [
|
|
7035
|
+
/* @__PURE__ */ s("span", { "aria-hidden": "true" }),
|
|
7036
|
+
/* @__PURE__ */ s(el, {
|
|
7037
|
+
childId: e.id,
|
|
7038
|
+
contentDirection: a,
|
|
7039
|
+
question: t
|
|
7040
|
+
}),
|
|
7041
|
+
/* @__PURE__ */ s("strong", { children: e.label })
|
|
7042
|
+
]
|
|
7026
7043
|
}, e.id))
|
|
7027
7044
|
})
|
|
7028
7045
|
});
|