@doenet/assignment-viewer 0.1.0-alpha2 → 0.1.0-alpha3
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 +37 -35
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3400,7 +3400,7 @@ function gatherDocumentStructure(source) {
|
|
|
3400
3400
|
return {
|
|
3401
3401
|
numActivityVariants: { [source.id]: source.numVariants ?? 1 },
|
|
3402
3402
|
questionCounts: {
|
|
3403
|
-
[source.id]: source.
|
|
3403
|
+
[source.id]: source.baseComponentCounts ? (source.baseComponentCounts.question ?? 0) + (source.baseComponentCounts.problem ?? 0) + (source.baseComponentCounts.exercise ?? 0) : 1
|
|
3404
3404
|
}
|
|
3405
3405
|
};
|
|
3406
3406
|
} else {
|
|
@@ -54074,40 +54074,42 @@ function Viewer({
|
|
|
54074
54074
|
}
|
|
54075
54075
|
return /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { children: [
|
|
54076
54076
|
showTitle ? /* @__PURE__ */ jsxRuntimeExports$1.jsx("h2", { style: { marginLeft: "20px" }, children: source.title }) : null,
|
|
54077
|
-
/* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { style: { marginTop: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", {
|
|
54078
|
-
/* @__PURE__ */ jsxRuntimeExports$1.
|
|
54079
|
-
|
|
54080
|
-
|
|
54081
|
-
|
|
54082
|
-
|
|
54083
|
-
|
|
54084
|
-
|
|
54085
|
-
|
|
54086
|
-
|
|
54087
|
-
|
|
54088
|
-
|
|
54089
|
-
|
|
54090
|
-
|
|
54091
|
-
|
|
54092
|
-
|
|
54093
|
-
|
|
54094
|
-
|
|
54095
|
-
|
|
54096
|
-
|
|
54097
|
-
|
|
54098
|
-
|
|
54099
|
-
|
|
54100
|
-
|
|
54101
|
-
|
|
54102
|
-
|
|
54103
|
-
|
|
54104
|
-
|
|
54105
|
-
|
|
54106
|
-
|
|
54107
|
-
|
|
54108
|
-
|
|
54109
|
-
|
|
54110
|
-
|
|
54077
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx("div", { style: { marginTop: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports$1.jsxs("div", { children: [
|
|
54078
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsxs("span", { hidden: !paginate, children: [
|
|
54079
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx(
|
|
54080
|
+
"button",
|
|
54081
|
+
{
|
|
54082
|
+
onClick: clickPrevious,
|
|
54083
|
+
style: {
|
|
54084
|
+
marginLeft: "20px",
|
|
54085
|
+
marginRight: "10px",
|
|
54086
|
+
backgroundColor: "lightgray",
|
|
54087
|
+
borderRadius: "10px",
|
|
54088
|
+
padding: "5px 20px"
|
|
54089
|
+
},
|
|
54090
|
+
disabled: currentItemIdx <= 0,
|
|
54091
|
+
children: "Previous"
|
|
54092
|
+
}
|
|
54093
|
+
),
|
|
54094
|
+
"Page ",
|
|
54095
|
+
currentItemIdx + 1,
|
|
54096
|
+
" of ",
|
|
54097
|
+
numItems,
|
|
54098
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx(
|
|
54099
|
+
"button",
|
|
54100
|
+
{
|
|
54101
|
+
onClick: clickNext,
|
|
54102
|
+
style: {
|
|
54103
|
+
marginLeft: "10px",
|
|
54104
|
+
backgroundColor: "lightgray",
|
|
54105
|
+
borderRadius: "10px",
|
|
54106
|
+
padding: "5px 20px"
|
|
54107
|
+
},
|
|
54108
|
+
disabled: currentItemIdx >= numItems - 1,
|
|
54109
|
+
children: "Next"
|
|
54110
|
+
}
|
|
54111
|
+
)
|
|
54112
|
+
] }),
|
|
54111
54113
|
activityLevelAttempts ? /* @__PURE__ */ jsxRuntimeExports$1.jsx(
|
|
54112
54114
|
"button",
|
|
54113
54115
|
{
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@doenet/assignment-viewer",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "View assignments from questions written in DoenetML",
|
|
5
|
-
"version": "0.1.0-
|
|
5
|
+
"version": "0.1.0-alpha3",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"homepage": "https://github.com/Doenet/assignment-viewer#readme",
|
|
8
8
|
"type": "module",
|