@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.
Files changed (2) hide show
  1. package/dist/index.js +37 -35
  2. 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.baseLevelComponentCounts ? (source.baseLevelComponentCounts.question ?? 0) + (source.baseLevelComponentCounts.problem ?? 0) + (source.baseLevelComponentCounts.exercise ?? 0) : 1
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", { hidden: !paginate, children: [
54078
- /* @__PURE__ */ jsxRuntimeExports$1.jsx(
54079
- "button",
54080
- {
54081
- onClick: clickPrevious,
54082
- style: {
54083
- marginLeft: "20px",
54084
- marginRight: "10px",
54085
- backgroundColor: "lightgray",
54086
- borderRadius: "10px",
54087
- padding: "5px 20px"
54088
- },
54089
- disabled: currentItemIdx <= 0,
54090
- children: "Previous"
54091
- }
54092
- ),
54093
- "Page ",
54094
- currentItemIdx + 1,
54095
- " of ",
54096
- numItems,
54097
- /* @__PURE__ */ jsxRuntimeExports$1.jsx(
54098
- "button",
54099
- {
54100
- onClick: clickNext,
54101
- style: {
54102
- marginLeft: "10px",
54103
- backgroundColor: "lightgray",
54104
- borderRadius: "10px",
54105
- padding: "5px 20px"
54106
- },
54107
- disabled: currentItemIdx >= numItems - 1,
54108
- children: "Next"
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-alpha2",
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",