@khanacademy/perseus 19.6.1 → 19.6.2
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/es/index.js +13 -17
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +8 -12
- package/dist/index.js.map +1 -1
- package/dist/widgets/categorizer.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -24355,18 +24355,14 @@ class Categorizer extends React__namespace.Component {
|
|
|
24355
24355
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24356
24356
|
className: ClassNames.INTERACTIVE,
|
|
24357
24357
|
role: "button",
|
|
24358
|
-
"aria-label": catName
|
|
24359
|
-
|
|
24360
|
-
,
|
|
24361
|
-
onClick: this.onChange.bind(this, itemNum, catNum)
|
|
24358
|
+
"aria-label": catName,
|
|
24359
|
+
onClick: () => this.onChange(itemNum, catNum)
|
|
24362
24360
|
}, isMobile && /*#__PURE__*/React__namespace.createElement("input", {
|
|
24363
24361
|
type: "radio",
|
|
24364
24362
|
name: uniqueId,
|
|
24365
24363
|
className: aphrodite.css(sharedStyles.responsiveInput, sharedStyles.responsiveRadioInput),
|
|
24366
|
-
checked: selected
|
|
24367
|
-
|
|
24368
|
-
,
|
|
24369
|
-
onChange: this.onChange.bind(this, itemNum, catNum),
|
|
24364
|
+
checked: selected,
|
|
24365
|
+
onChange: () => this.onChange(itemNum, catNum),
|
|
24370
24366
|
onClick: e => e.stopPropagation()
|
|
24371
24367
|
}), !isMobile && /*#__PURE__*/React__namespace.createElement("span", {
|
|
24372
24368
|
className: aphrodite.css(styles$r.radioSpan, selected && styles$r.checkedRadioSpan, this.props.static && selected && styles$r.staticCheckedRadioSpan)
|
|
@@ -24386,20 +24382,20 @@ class Categorizer extends React__namespace.Component {
|
|
|
24386
24382
|
className: extraClassNames + " " + aphrodite.css(...inlineStyles)
|
|
24387
24383
|
}, table);
|
|
24388
24384
|
}
|
|
24389
|
-
onChange
|
|
24385
|
+
onChange(itemNum, catNum) {
|
|
24390
24386
|
const values = [...this.props.values];
|
|
24391
24387
|
// @ts-expect-error - TS2322 - Type 'number' is not assignable to type 'never'.
|
|
24392
24388
|
values[itemNum] = catNum;
|
|
24393
24389
|
this.change("values", values);
|
|
24394
24390
|
this.props.trackInteraction();
|
|
24395
|
-
}
|
|
24391
|
+
}
|
|
24396
24392
|
simpleValidate = rubric => {
|
|
24397
24393
|
return Categorizer.validate(this.getUserInput(), rubric);
|
|
24398
24394
|
};
|
|
24399
24395
|
static validate(userInput, rubric) {
|
|
24400
24396
|
let completed = true;
|
|
24401
24397
|
let allCorrect = true;
|
|
24402
|
-
|
|
24398
|
+
rubric.values.forEach((value, i) => {
|
|
24403
24399
|
if (userInput.values[i] == null) {
|
|
24404
24400
|
completed = false;
|
|
24405
24401
|
}
|
|
@@ -41692,7 +41688,7 @@ const init = function (options) {
|
|
|
41692
41688
|
|
|
41693
41689
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
41694
41690
|
const libName = "@khanacademy/perseus";
|
|
41695
|
-
const libVersion = "19.6.
|
|
41691
|
+
const libVersion = "19.6.2";
|
|
41696
41692
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
41697
41693
|
|
|
41698
41694
|
const apiVersion = {
|