diff --git a/packages/boilerplate-item-type/configure/package.json b/packages/boilerplate-item-type/configure/package.json index 6ab1e0d350..734b99f350 100644 --- a/packages/boilerplate-item-type/configure/package.json +++ b/packages/boilerplate-item-type/configure/package.json @@ -8,7 +8,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/boilerplate-item-type/controller/package.json b/packages/boilerplate-item-type/controller/package.json index 1755a99011..bc086e213b 100644 --- a/packages/boilerplate-item-type/controller/package.json +++ b/packages/boilerplate-item-type/controller/package.json @@ -6,7 +6,7 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/boilerplate-item-type/package.json b/packages/boilerplate-item-type/package.json index 9c6fc7438f..8b0f4cdd1f 100644 --- a/packages/boilerplate-item-type/package.json +++ b/packages/boilerplate-item-type/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "prop-types": "^15.6.1", "react": "^16.8.1", "react-dom": "^16.8.1" diff --git a/packages/calculator/configure/package.json b/packages/calculator/configure/package.json index 05e7996c28..049b15b58b 100644 --- a/packages/calculator/configure/package.json +++ b/packages/calculator/configure/package.json @@ -7,7 +7,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "react": "^16.8.1", "react-dom": "^16.8.1" }, diff --git a/packages/categorize/configure/package.json b/packages/categorize/configure/package.json index b28fb9dd62..ac534b8858 100644 --- a/packages/categorize/configure/package.json +++ b/packages/categorize/configure/package.json @@ -12,7 +12,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^3.1.0", "lodash": "^4.17.15", diff --git a/packages/categorize/configure/src/index.js b/packages/categorize/configure/src/index.js index 27d4141583..9b9a45c746 100644 --- a/packages/categorize/configure/src/index.js +++ b/packages/categorize/configure/src/index.js @@ -102,7 +102,9 @@ export default class CategorizeConfigure extends HTMLElement { this.render(); } - connectedCallback() {} + connectedCallback() { + this.render(); + } /** * diff --git a/packages/categorize/controller/package.json b/packages/categorize/controller/package.json index d45d6dbfbd..8f3b602270 100644 --- a/packages/categorize/controller/package.json +++ b/packages/categorize/controller/package.json @@ -2,7 +2,7 @@ "name": "@pie-element/categorize-controller", "private": true, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15" }, "version": "7.8.10", diff --git a/packages/categorize/package.json b/packages/categorize/package.json index 3202d5f37a..000a6b939d 100644 --- a/packages/categorize/package.json +++ b/packages/categorize/package.json @@ -11,7 +11,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.15", diff --git a/packages/charting/configure/package.json b/packages/charting/configure/package.json index 2fa45a8bcf..c551ca9a06 100644 --- a/packages/charting/configure/package.json +++ b/packages/charting/configure/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "prop-types": "^15.6.2", diff --git a/packages/charting/controller/package.json b/packages/charting/controller/package.json index 9db38ae03c..810b250f0e 100644 --- a/packages/charting/controller/package.json +++ b/packages/charting/controller/package.json @@ -9,7 +9,7 @@ "test": "./node_modules/.bin/jest" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "lodash": "^4.17.15" }, diff --git a/packages/charting/controller/src/index.js b/packages/charting/controller/src/index.js index d3f222342e..927f6bb87a 100644 --- a/packages/charting/controller/src/index.js +++ b/packages/charting/controller/src/index.js @@ -225,6 +225,7 @@ export function model(question, session, env) { base.correctAnswer = correctAnswer; base.showToggle = !!correctAnswer?.data?.length && scoreObject.score !== 1; base.addCategoryEnabled = false; + base.showKeyLegend = true; } if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) { diff --git a/packages/charting/package.json b/packages/charting/package.json index 0d27f6ed7b..71299fa3f4 100644 --- a/packages/charting/package.json +++ b/packages/charting/package.json @@ -12,7 +12,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.15", diff --git a/packages/charting/src/main.jsx b/packages/charting/src/main.jsx index bed5d0d354..33a57a45d6 100644 --- a/packages/charting/src/main.jsx +++ b/packages/charting/src/main.jsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import { color, Collapsible, hasText, PreviewPrompt, UiLayout, hasMedia } from '@pie-lib/pie-toolbox/render-ui'; -import { Chart, chartTypes } from '@pie-lib/pie-toolbox/charting'; +import { Chart, chartTypes, KeyLegend } from '@pie-lib/pie-toolbox/charting'; import isEqual from 'lodash/isEqual'; import { CorrectAnswerToggle } from '@pie-lib/pie-toolbox/correct-answer-toggle'; @@ -61,6 +61,7 @@ export class Main extends React.Component { correctAnswer, language, env, + showKeyLegend, } = model; let { correctedAnswer, extraCSSRules } = model; @@ -145,7 +146,7 @@ export class Main extends React.Component { labelsPlaceholders={{}} /> )} - + {!showingCorrect && showKeyLegend && ()} {showRationale && ( diff --git a/packages/complex-rubric/controller/package.json b/packages/complex-rubric/controller/package.json index 48144ce481..2a7acb6b05 100644 --- a/packages/complex-rubric/controller/package.json +++ b/packages/complex-rubric/controller/package.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15" }, "author": "", diff --git a/packages/drag-in-the-blank/configure/package.json b/packages/drag-in-the-blank/configure/package.json index d0055210ce..5b191545b7 100644 --- a/packages/drag-in-the-blank/configure/package.json +++ b/packages/drag-in-the-blank/configure/package.json @@ -8,7 +8,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/drag-in-the-blank/controller/package.json b/packages/drag-in-the-blank/controller/package.json index e54658f0aa..9e9a9c9f68 100644 --- a/packages/drag-in-the-blank/controller/package.json +++ b/packages/drag-in-the-blank/controller/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "type-of": "^2.0.1" diff --git a/packages/drag-in-the-blank/package.json b/packages/drag-in-the-blank/package.json index 6c40246bbc..7b9fe1501b 100644 --- a/packages/drag-in-the-blank/package.json +++ b/packages/drag-in-the-blank/package.json @@ -12,7 +12,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "lodash": "^4.17.10", "prop-types": "^15.6.1", diff --git a/packages/drawing-response/configure/package.json b/packages/drawing-response/configure/package.json index c9de5631c6..a32b6a2326 100644 --- a/packages/drawing-response/configure/package.json +++ b/packages/drawing-response/configure/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.6", "debug": "^3.1.0", "lodash": "^4.17.15", diff --git a/packages/drawing-response/package.json b/packages/drawing-response/package.json index 95fb730c20..121de41f60 100644 --- a/packages/drawing-response/package.json +++ b/packages/drawing-response/package.json @@ -11,7 +11,7 @@ "@mdi/js": "^3.6.95", "@mdi/react": "^1.1.1", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.6", "enzyme-to-json": "^3.3.5", "konva": "^3.4.1", diff --git a/packages/ebsr/configure/package.json b/packages/ebsr/configure/package.json index 9581824394..5b5e45f322 100644 --- a/packages/ebsr/configure/package.json +++ b/packages/ebsr/configure/package.json @@ -10,7 +10,7 @@ "@material-ui/core": "^3.9.2", "@pie-element/multiple-choice": "^9.17.0", "@pie-framework/pie-configure-events": "^1.2.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", "react": "^16.8.1", diff --git a/packages/ebsr/controller/package.json b/packages/ebsr/controller/package.json index 6075898bed..43f8abbab4 100644 --- a/packages/ebsr/controller/package.json +++ b/packages/ebsr/controller/package.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15" }, "author": "", diff --git a/packages/ebsr/package.json b/packages/ebsr/package.json index 66d50a6f4a..33f9fde0da 100644 --- a/packages/ebsr/package.json +++ b/packages/ebsr/package.json @@ -9,7 +9,7 @@ "dependencies": { "@pie-element/multiple-choice": "^9.17.0", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.11" diff --git a/packages/explicit-constructed-response/configure/package.json b/packages/explicit-constructed-response/configure/package.json index 460f77c9ac..a4489c4e5b 100644 --- a/packages/explicit-constructed-response/configure/package.json +++ b/packages/explicit-constructed-response/configure/package.json @@ -8,7 +8,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.6", "debug": "^3.1.0", "lodash": "^4.17.15", diff --git a/packages/explicit-constructed-response/controller/package.json b/packages/explicit-constructed-response/controller/package.json index d3fe403cb1..46fe053a03 100644 --- a/packages/explicit-constructed-response/controller/package.json +++ b/packages/explicit-constructed-response/controller/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "he": "^1.2.0", "lodash": "^4.17.15", diff --git a/packages/explicit-constructed-response/package.json b/packages/explicit-constructed-response/package.json index 22e4593d3e..51c87f0b0a 100644 --- a/packages/explicit-constructed-response/package.json +++ b/packages/explicit-constructed-response/package.json @@ -12,7 +12,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "he": "^1.2.0", "lodash": "^4.17.10", diff --git a/packages/extended-text-entry/configure/package.json b/packages/extended-text-entry/configure/package.json index a978d18f13..c5df675457 100644 --- a/packages/extended-text-entry/configure/package.json +++ b/packages/extended-text-entry/configure/package.json @@ -10,7 +10,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", "react": "^16.8.1", diff --git a/packages/extended-text-entry/controller/package.json b/packages/extended-text-entry/controller/package.json index 906dd2caa8..7f5ec15cd7 100644 --- a/packages/extended-text-entry/controller/package.json +++ b/packages/extended-text-entry/controller/package.json @@ -6,7 +6,7 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0" + "@pie-lib/pie-toolbox": "2.22.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/packages/extended-text-entry/package.json b/packages/extended-text-entry/package.json index 58825af2cb..4d7f7d0b16 100644 --- a/packages/extended-text-entry/package.json +++ b/packages/extended-text-entry/package.json @@ -12,7 +12,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash.throttle": "^4.1.1", diff --git a/packages/fraction-model/configure/package.json b/packages/fraction-model/configure/package.json index e28ef5eff1..bf98a2a79e 100644 --- a/packages/fraction-model/configure/package.json +++ b/packages/fraction-model/configure/package.json @@ -8,7 +8,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/fraction-model/controller/package.json b/packages/fraction-model/controller/package.json index 447e737ac5..1eeb9b8b16 100644 --- a/packages/fraction-model/controller/package.json +++ b/packages/fraction-model/controller/package.json @@ -6,7 +6,7 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/fraction-model/package.json b/packages/fraction-model/package.json index 0618422b0f..db0037dd5f 100644 --- a/packages/fraction-model/package.json +++ b/packages/fraction-model/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "prop-types": "^15.6.1", "react": "^16.8.1", "react-dom": "^16.8.1", diff --git a/packages/graphing-solution-set/configure/package.json b/packages/graphing-solution-set/configure/package.json index 711d0df725..5d02a846f6 100644 --- a/packages/graphing-solution-set/configure/package.json +++ b/packages/graphing-solution-set/configure/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "prop-types": "^15.6.2", diff --git a/packages/graphing-solution-set/controller/package.json b/packages/graphing-solution-set/controller/package.json index d38a5f6d75..efd95706ad 100644 --- a/packages/graphing-solution-set/controller/package.json +++ b/packages/graphing-solution-set/controller/package.json @@ -9,7 +9,7 @@ "test": "./node_modules/.bin/jest" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1" }, "devDependencies": { diff --git a/packages/graphing-solution-set/package.json b/packages/graphing-solution-set/package.json index 7e645a4f6f..d5748e8615 100644 --- a/packages/graphing-solution-set/package.json +++ b/packages/graphing-solution-set/package.json @@ -13,7 +13,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "react": "^16.8.1", diff --git a/packages/graphing/configure/package.json b/packages/graphing/configure/package.json index 199ae829bd..aa15c81e4a 100644 --- a/packages/graphing/configure/package.json +++ b/packages/graphing/configure/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.15", diff --git a/packages/graphing/controller/package.json b/packages/graphing/controller/package.json index 915b491417..39e3747dd3 100644 --- a/packages/graphing/controller/package.json +++ b/packages/graphing/controller/package.json @@ -9,7 +9,7 @@ "test": "./node_modules/.bin/jest" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1" }, "devDependencies": { diff --git a/packages/graphing/package.json b/packages/graphing/package.json index da939cb452..c5d5330b7b 100644 --- a/packages/graphing/package.json +++ b/packages/graphing/package.json @@ -12,7 +12,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "react": "^16.8.1", diff --git a/packages/hotspot/configure/package.json b/packages/hotspot/configure/package.json index 23fcc09cfb..00b65e072c 100644 --- a/packages/hotspot/configure/package.json +++ b/packages/hotspot/configure/package.json @@ -10,7 +10,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.6", "debug": "^3.1.0", "konva": "^3.2.4", diff --git a/packages/hotspot/controller/package.json b/packages/hotspot/controller/package.json index 635068401a..a5951a44f0 100644 --- a/packages/hotspot/controller/package.json +++ b/packages/hotspot/controller/package.json @@ -11,7 +11,7 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "lodash": "^4.17.15" } diff --git a/packages/hotspot/package.json b/packages/hotspot/package.json index 983858d742..8d528ee83b 100644 --- a/packages/hotspot/package.json +++ b/packages/hotspot/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.3", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "konva": "^3.2.5", "prop-types": "^15.6.1", "react": "^16.8.1", diff --git a/packages/image-cloze-association/configure/package.json b/packages/image-cloze-association/configure/package.json index f3be504edc..59c2a576fd 100644 --- a/packages/image-cloze-association/configure/package.json +++ b/packages/image-cloze-association/configure/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "prop-types": "^15.7.2", "react": "^16.8.6", diff --git a/packages/image-cloze-association/controller/package.json b/packages/image-cloze-association/controller/package.json index 5e45a05340..fe562491a9 100644 --- a/packages/image-cloze-association/controller/package.json +++ b/packages/image-cloze-association/controller/package.json @@ -11,7 +11,7 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "humps": "^2.0.1", "lodash": "^4.17.15" diff --git a/packages/image-cloze-association/package.json b/packages/image-cloze-association/package.json index cef8c9e5a5..283a15000b 100644 --- a/packages/image-cloze-association/package.json +++ b/packages/image-cloze-association/package.json @@ -10,7 +10,7 @@ "@material-ui/core": "^3.9.3", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.6", "humps": "^2.0.1", "prop-types": "^15.6.1", diff --git a/packages/inline-dropdown/configure/package.json b/packages/inline-dropdown/configure/package.json index 308968dcfb..7865d46472 100644 --- a/packages/inline-dropdown/configure/package.json +++ b/packages/inline-dropdown/configure/package.json @@ -8,7 +8,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.6", "debug": "^3.1.0", "lodash": "^4.17.15", diff --git a/packages/inline-dropdown/controller/package.json b/packages/inline-dropdown/controller/package.json index 30ef3c1279..00ddbcab41 100644 --- a/packages/inline-dropdown/controller/package.json +++ b/packages/inline-dropdown/controller/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "type-of": "^2.0.1" diff --git a/packages/inline-dropdown/package.json b/packages/inline-dropdown/package.json index 2fd58a429f..21b53cb457 100644 --- a/packages/inline-dropdown/package.json +++ b/packages/inline-dropdown/package.json @@ -12,7 +12,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "lodash": "^4.17.10", "prop-types": "^15.6.1", diff --git a/packages/likert/configure/package.json b/packages/likert/configure/package.json index 646017a3e2..ff008fe47d 100644 --- a/packages/likert/configure/package.json +++ b/packages/likert/configure/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "prop-types": "^15.6.2", "react": "^16.8.1", diff --git a/packages/likert/package.json b/packages/likert/package.json index d1c0f5169d..ad2c81e261 100644 --- a/packages/likert/package.json +++ b/packages/likert/package.json @@ -12,7 +12,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.10", diff --git a/packages/match-list/controller/package.json b/packages/match-list/controller/package.json index 218cd5dfe3..62713254a6 100644 --- a/packages/match-list/controller/package.json +++ b/packages/match-list/controller/package.json @@ -9,7 +9,7 @@ "test": "./node_modules/.bin/jest" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/match-list/package.json b/packages/match-list/package.json index 16ce946f01..d86e0fdd4f 100644 --- a/packages/match-list/package.json +++ b/packages/match-list/package.json @@ -14,7 +14,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.10", diff --git a/packages/match/configure/package.json b/packages/match/configure/package.json index ebefb97412..9405e66286 100644 --- a/packages/match/configure/package.json +++ b/packages/match/configure/package.json @@ -10,7 +10,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^3.1.0", "lodash": "^4.17.15", diff --git a/packages/match/controller/package.json b/packages/match/controller/package.json index b2912467a8..467ac6f879 100644 --- a/packages/match/controller/package.json +++ b/packages/match/controller/package.json @@ -9,7 +9,7 @@ "test": "./node_modules/.bin/jest" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0" }, "devDependencies": { diff --git a/packages/match/package.json b/packages/match/package.json index d6d5b14266..b78187eaaa 100644 --- a/packages/match/package.json +++ b/packages/match/package.json @@ -13,7 +13,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.10", diff --git a/packages/math-inline/configure/package.json b/packages/math-inline/configure/package.json index 01eae5e391..87f8716edc 100644 --- a/packages/math-inline/configure/package.json +++ b/packages/math-inline/configure/package.json @@ -11,7 +11,7 @@ "@material-ui/icons": "^3.0.1", "@pie-framework/mathquill": "^1.1.3", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^3.1.0", "prop-types": "^15.6.2", diff --git a/packages/math-inline/controller/package.json b/packages/math-inline/controller/package.json index 2ebdb081e5..a3be8d4244 100644 --- a/packages/math-inline/controller/package.json +++ b/packages/math-inline/controller/package.json @@ -9,8 +9,8 @@ "test": "./node_modules/.bin/jest" }, "dependencies": { - "@pie-framework/math-validation": "^1.4.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-framework/math-validation": "^1.4.1", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/math-inline/controller/src/index.js b/packages/math-inline/controller/src/index.js index bf9bb38d80..e48319854f 100644 --- a/packages/math-inline/controller/src/index.js +++ b/packages/math-inline/controller/src/index.js @@ -41,39 +41,36 @@ const getResponseCorrectness = (model, answerItem, isOutcome) => { return correctnessObject; }; -function getIsAnswerCorrect(correctResponseItem, answerItem) { +function getIsAnswerCorrect(correctResponseItems, answerItem) { let answerCorrect = false; - (correctResponseItem || []).forEach((correctResponse) => { - let opts = { + (correctResponseItems || []).forEach((correctResponse) => { + if (answerCorrect) return; + + const opts = { mode: correctResponse.validation || defaults.validationDefault, }; - if (opts.mode == 'literal') { + if (opts.mode === 'literal') { opts.literal = { allowTrailingZeros: correctResponse.allowTrailingZeros || false, ignoreOrder: correctResponse.ignoreOrder || false, }; } - if (!answerCorrect) { - const acceptedValues = - [correctResponse.answer].concat( - Object.keys(correctResponse.alternates || {}).map((alternateId) => correctResponse.alternates[alternateId]), - ) || []; + const acceptedValues = [correctResponse.answer].concat( + Object.keys(correctResponse.alternates || {}).map((alternateId) => correctResponse.alternates[alternateId]), + ); + for (let i = 0; i < acceptedValues.length; i++) { try { - for (let i = 0; i < acceptedValues.length; i++) { - answerCorrect = mv.latexEqual(answerItem, acceptedValues[i], opts); - - if (answerCorrect) { - break; - } + if (mv.latexEqual(answerItem, acceptedValues[i], opts)) { + answerCorrect = true; + break; } } catch (e) { - log('Parse failure when evaluating math', e, correctResponse, answerItem); - - answerCorrect = false; + log('Parse failure when evaluating math', acceptedValues[i], answerItem, e); + continue; } } }); diff --git a/packages/math-inline/package.json b/packages/math-inline/package.json index a9da328b49..0c5c0945b3 100644 --- a/packages/math-inline/package.json +++ b/packages/math-inline/package.json @@ -14,7 +14,7 @@ "@material-ui/core": "^3.9.2", "@pie-framework/mathquill": "^1.1.3", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.10", diff --git a/packages/math-templated/configure/package.json b/packages/math-templated/configure/package.json index c3475ecaee..14aa9174c7 100644 --- a/packages/math-templated/configure/package.json +++ b/packages/math-templated/configure/package.json @@ -8,7 +8,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/math-templated/controller/package.json b/packages/math-templated/controller/package.json index 2ec3a8815c..dc070c5a88 100644 --- a/packages/math-templated/controller/package.json +++ b/packages/math-templated/controller/package.json @@ -6,8 +6,8 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-framework/math-validation": "^1.4.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-framework/math-validation": "^1.4.1", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/math-templated/package.json b/packages/math-templated/package.json index f1df771af5..3b4c6e103a 100644 --- a/packages/math-templated/package.json +++ b/packages/math-templated/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "prop-types": "^15.6.1", "react": "^16.8.1", "react-dom": "^16.8.1" diff --git a/packages/matrix/configure/package.json b/packages/matrix/configure/package.json index 1073c556b7..fe93894a86 100644 --- a/packages/matrix/configure/package.json +++ b/packages/matrix/configure/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "prop-types": "^15.6.2", "react": "^16.8.1", diff --git a/packages/matrix/package.json b/packages/matrix/package.json index d14b8fc8a3..28caf4ace8 100644 --- a/packages/matrix/package.json +++ b/packages/matrix/package.json @@ -12,7 +12,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "prop-types": "^15.6.1", "react": "^16.8.1", diff --git a/packages/multi-trait-rubric/configure/package.json b/packages/multi-trait-rubric/configure/package.json index adac5bf6b4..bbc8b9626c 100644 --- a/packages/multi-trait-rubric/configure/package.json +++ b/packages/multi-trait-rubric/configure/package.json @@ -8,7 +8,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/multi-trait-rubric/controller/package.json b/packages/multi-trait-rubric/controller/package.json index b0b0175fab..4aa5c2f4f5 100644 --- a/packages/multi-trait-rubric/controller/package.json +++ b/packages/multi-trait-rubric/controller/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" } diff --git a/packages/multi-trait-rubric/package.json b/packages/multi-trait-rubric/package.json index 45bfd0766e..01359abfd4 100644 --- a/packages/multi-trait-rubric/package.json +++ b/packages/multi-trait-rubric/package.json @@ -8,7 +8,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "clsx": "^1.1.1", "enzyme-to-json": "^3.3.5", "prop-types": "^15.6.1", diff --git a/packages/multiple-choice/configure/package.json b/packages/multiple-choice/configure/package.json index c5b8bd00d9..89a760239b 100644 --- a/packages/multiple-choice/configure/package.json +++ b/packages/multiple-choice/configure/package.json @@ -8,7 +8,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/multiple-choice/controller/package.json b/packages/multiple-choice/controller/package.json index 2b738b232d..fe0bff7f7f 100644 --- a/packages/multiple-choice/controller/package.json +++ b/packages/multiple-choice/controller/package.json @@ -8,7 +8,7 @@ "author": "", "license": "ISC", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" } diff --git a/packages/multiple-choice/package.json b/packages/multiple-choice/package.json index b0025e46ec..575b7ea6b7 100644 --- a/packages/multiple-choice/package.json +++ b/packages/multiple-choice/package.json @@ -8,7 +8,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "debug": "^4.1.1", "enzyme-to-json": "^3.3.3", diff --git a/packages/multiple-choice/src/multiple-choice.jsx b/packages/multiple-choice/src/multiple-choice.jsx index a78328aa48..097ee75f8c 100644 --- a/packages/multiple-choice/src/multiple-choice.jsx +++ b/packages/multiple-choice/src/multiple-choice.jsx @@ -217,9 +217,9 @@ export class MultipleChoice extends React.Component { } return choiceMode === 'radio' ? ( -

Multiple Choice Question

+

Multiple Choice Question

) : ( -

Multiple Select Question

+

Multiple Select Question

); } @@ -231,8 +231,11 @@ export class MultipleChoice extends React.Component { return; } - if (this.firstInputRef?.current) { - this.firstInputRef.current.focus(); + // Only focus the first input if user is tabbing forward + if (!e.relatedTarget || fieldset.compareDocumentPosition(e.relatedTarget) & Node.DOCUMENT_POSITION_PRECEDING) { + if (this.firstInputRef?.current) { + this.firstInputRef.current.focus(); + } } }; @@ -294,7 +297,7 @@ export class MultipleChoice extends React.Component { return (
- {partLabel &&

{partLabel}

} + {partLabel &&

{partLabel}

} {this.renderHeading()} diff --git a/packages/number-line/configure/package.json b/packages/number-line/configure/package.json index 18f1d535ff..813f14245f 100644 --- a/packages/number-line/configure/package.json +++ b/packages/number-line/configure/package.json @@ -7,7 +7,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15", "react": "^16.8.1", "react-dom": "^16.8.1" diff --git a/packages/number-line/controller/package.json b/packages/number-line/controller/package.json index 0d714e4cf7..a806d5c7c9 100644 --- a/packages/number-line/controller/package.json +++ b/packages/number-line/controller/package.json @@ -14,7 +14,7 @@ "access": "public" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15", "mathjs": "^7.5.1" }, diff --git a/packages/number-line/package.json b/packages/number-line/package.json index 5c19313be0..bb02877d05 100644 --- a/packages/number-line/package.json +++ b/packages/number-line/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@material-ui/core": "^3.9.2", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "d3-scale": "^3.2.1", "d3-selection": "^1.4.1", diff --git a/packages/passage/configure/package.json b/packages/passage/configure/package.json index feab4c5226..be35d68389 100644 --- a/packages/passage/configure/package.json +++ b/packages/passage/configure/package.json @@ -10,7 +10,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", "react": "^16.8.1", diff --git a/packages/passage/package.json b/packages/passage/package.json index b039719193..2c554c98f8 100644 --- a/packages/passage/package.json +++ b/packages/passage/package.json @@ -11,7 +11,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "prop-types": "^15.6.1", "react": "^16.8.1", diff --git a/packages/placement-ordering/configure/package.json b/packages/placement-ordering/configure/package.json index 1b7e8911ab..b65de2f5d0 100644 --- a/packages/placement-ordering/configure/package.json +++ b/packages/placement-ordering/configure/package.json @@ -8,7 +8,7 @@ "@material-ui/core": "^3.9.2", "@material-ui/icons": "^3.0.1", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "nested-property": "^0.0.7", diff --git a/packages/placement-ordering/controller/package.json b/packages/placement-ordering/controller/package.json index ed410736e5..46f77e0eba 100644 --- a/packages/placement-ordering/controller/package.json +++ b/packages/placement-ordering/controller/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "js-combinatorics": "^0.5.4", "lodash": "^4.17.19" diff --git a/packages/placement-ordering/package.json b/packages/placement-ordering/package.json index 455d34658e..9b5e952064 100644 --- a/packages/placement-ordering/package.json +++ b/packages/placement-ordering/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "decimal.js": "^10.0.0", "lodash": "^4.17.10", diff --git a/packages/protractor/package.json b/packages/protractor/package.json index 7b72478cc2..d7d422687e 100644 --- a/packages/protractor/package.json +++ b/packages/protractor/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@material-ui/core": "^3.9.2", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "classnames": "^2.2.5", "react": "^16.8.1", "react-dom": "^16.8.1" diff --git a/packages/rubric/configure/package.json b/packages/rubric/configure/package.json index 4bd8918dcb..2b0684824c 100644 --- a/packages/rubric/configure/package.json +++ b/packages/rubric/configure/package.json @@ -8,7 +8,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^4.1.1", "react": "^16.8.6", "react-dom": "^16.8.6" diff --git a/packages/rubric/controller/package.json b/packages/rubric/controller/package.json index 623436822f..c49da8e9bf 100644 --- a/packages/rubric/controller/package.json +++ b/packages/rubric/controller/package.json @@ -7,7 +7,7 @@ "test": "./node_modules/.bin/jest" }, "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "lodash": "^4.17.15" } } diff --git a/packages/rubric/package.json b/packages/rubric/package.json index 5f64bc3817..4f222efc37 100644 --- a/packages/rubric/package.json +++ b/packages/rubric/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@material-ui/core": "^3.9.2", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "prop-types": "^15.7.2" }, "author": "pie framework developers", diff --git a/packages/ruler/configure/package.json b/packages/ruler/configure/package.json index f3a9c9eda3..052f7d8793 100644 --- a/packages/ruler/configure/package.json +++ b/packages/ruler/configure/package.json @@ -7,7 +7,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0" + "@pie-lib/pie-toolbox": "2.22.0" }, "author": "", "license": "ISC" diff --git a/packages/ruler/package.json b/packages/ruler/package.json index 7e34ebde96..3ac5170798 100644 --- a/packages/ruler/package.json +++ b/packages/ruler/package.json @@ -11,7 +11,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "prop-types": "^15.6.1", "react": "^16.8.1", "react-dom": "^16.8.1" diff --git a/packages/select-text/configure/package.json b/packages/select-text/configure/package.json index d4393295f2..c6fffa00da 100644 --- a/packages/select-text/configure/package.json +++ b/packages/select-text/configure/package.json @@ -8,7 +8,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/select-text/configure/src/utils.js b/packages/select-text/configure/src/utils.js index 4f805df257..f5680eebae 100644 --- a/packages/select-text/configure/src/utils.js +++ b/packages/select-text/configure/src/utils.js @@ -1,4 +1,3 @@ - var createElementFromHTML = function createElementFromHTML() { var htmlString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var div = document.createElement('div'); @@ -28,7 +27,7 @@ var prepareText = function prepareText(text) { var txtDom = createElementFromHTML(text); var div = document.createElement('div'); - div.innerHTML = '
'.concat(txtDom.innerHTML, '
'); + div.innerHTML = "
".concat(txtDom.innerHTML, '
'); txtDom = div; var allDomElements = Array.from(txtDom.querySelectorAll('*')); diff --git a/packages/select-text/controller/package.json b/packages/select-text/controller/package.json index a884947781..9cb8d08e80 100644 --- a/packages/select-text/controller/package.json +++ b/packages/select-text/controller/package.json @@ -6,7 +6,7 @@ "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/select-text/docs/demo/generate.js b/packages/select-text/docs/demo/generate.js index 8bb9086f5a..05d88dc71e 100644 --- a/packages/select-text/docs/demo/generate.js +++ b/packages/select-text/docs/demo/generate.js @@ -1,11 +1,11 @@ const tokens = () => [ { - text: 'If \'tweren\'t for sight and sound and smell,', + text: "If 'tweren't for sight and sound and smell,", start: 0, end: 43, }, { - text: 'I\'d like the city pretty well,', + text: "I'd like the city pretty well,", start: 44, end: 74, }, @@ -25,7 +25,7 @@ const tokens = () => [ end: 176, }, { - text: 'Just quit the city\'s din and dust,', + text: "Just quit the city's din and dust,", start: 177, end: 211, }, @@ -212,7 +212,6 @@ exports.htmlAscii = (id, element) => ({ ], }); - exports.model = (id, element) => { return Object.assign( {}, @@ -241,12 +240,12 @@ exports.model = (id, element) => { { end: 627, correct: false, - text: 'At last Natasha\'s moment arrived.', + text: "At last Natasha's moment arrived.", start: 594, }, { end: 743, - text: 'The faces of past giants of gymnastics swam before her mind\'s eye, now razor–sharp with fierce determination.', + text: "The faces of past giants of gymnastics swam before her mind's eye, now razor–sharp with fierce determination.", correct: false, start: 628, }, @@ -270,7 +269,7 @@ exports.model = (id, element) => { }, ], // "element": "select-text", - text: '

She thought about what she had to do, struggling to rein in her wild, fearful thoughts. Coach Cummings always said that an undisciplined mind never scored a perfect 10. Natasha wanted to please her Coach, yet sometimes his approval wasn\'t as exciting as his anger. The gymnasts were unanimous about one thing: Coach Cummings\'s fits of disapproving rage were much more humorous to witness than his infrequent, backslapping moments of high praise. Just for a hair of a moment, Natasha wondered if she really wanted a perfect 10, so weary was she of trying for but never achieving one.

\n\n

At last Natasha\'s moment arrived. The faces of past giants of gymnastics swam before her mind\'s eye, now razor–sharp with fierce determination. "I am talented. I am not afraid. I will make a perfect 10," she spoke aloud to herself, as she approached the mat, dusted her hands with chalk to prevent slippage, and returned to her starting point. Suddenly, the din of the gymnasium was silent to her. Forcing all sound out of her mind, she focused on the gleaming balance beam ahead of her. Taking a deep breath, Natasha made her graceful, yet powerful approach, mounted the beam flawlessly, and...executed her first perfect 10.

\n', + text: "

She thought about what she had to do, struggling to rein in her wild, fearful thoughts. Coach Cummings always said that an undisciplined mind never scored a perfect 10. Natasha wanted to please her Coach, yet sometimes his approval wasn't as exciting as his anger. The gymnasts were unanimous about one thing: Coach Cummings's fits of disapproving rage were much more humorous to witness than his infrequent, backslapping moments of high praise. Just for a hair of a moment, Natasha wondered if she really wanted a perfect 10, so weary was she of trying for but never achieving one.

\n\n

At last Natasha's moment arrived. The faces of past giants of gymnastics swam before her mind's eye, now razor–sharp with fierce determination. \"I am talented. I am not afraid. I will make a perfect 10,\" she spoke aloud to herself, as she approached the mat, dusted her hands with chalk to prevent slippage, and returned to her starting point. Suddenly, the din of the gymnasium was silent to her. Forcing all sound out of her mind, she focused on the gleaming balance beam ahead of her. Taking a deep breath, Natasha made her graceful, yet powerful approach, mounted the beam flawlessly, and...executed her first perfect 10.

\n", rubricEnabled: false, }), ); diff --git a/packages/select-text/package.json b/packages/select-text/package.json index 32298929cf..3fbf721031 100644 --- a/packages/select-text/package.json +++ b/packages/select-text/package.json @@ -9,7 +9,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.19.0", + "@pie-lib/pie-toolbox": "2.22.0", "prop-types": "^15.6.1", "react": "^16.8.1", "react-dom": "^16.8.1" diff --git a/packages/select-text/src/main.jsx b/packages/select-text/src/main.jsx index 3b08193d63..580f2e4624 100644 --- a/packages/select-text/src/main.jsx +++ b/packages/select-text/src/main.jsx @@ -1,8 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import { TextSelect, Legend } from '@pie-lib/pie-toolbox/text-select'; -import {CorrectAnswerToggle} from '@pie-lib/pie-toolbox/correct-answer-toggle'; -import {color, Feedback, Collapsible, hasText, hasMedia, PreviewPrompt, UiLayout} from '@pie-lib/pie-toolbox/render-ui'; +import { CorrectAnswerToggle } from '@pie-lib/pie-toolbox/correct-answer-toggle'; +import { color, Feedback, Collapsible, hasText, hasMedia, PreviewPrompt, UiLayout } from '@pie-lib/pie-toolbox/render-ui'; import { withStyles } from '@material-ui/core/styles'; import generateModel from './utils'; @@ -113,7 +113,7 @@ export class Main extends React.Component { maxNoOfSelections={model.maxSelections} animationsDisabled={model.animationsDisabled} /> - {mode === 'evaluate' && } + {mode === 'evaluate' && } {showRationale && (!model.animationsDisabled ? ( diff --git a/pslb/pslb.config.js b/pslb/pslb.config.js index 4f5714615e..856a3c3ca9 100644 --- a/pslb/pslb.config.js +++ b/pslb/pslb.config.js @@ -46,7 +46,7 @@ module.exports = { libs: { repository: 'pie-framework/pie-elements', packages: [ - { name: '@pie-lib/pie-toolbox-module', version: '8.0.3' } + { name: '@pie-lib/pie-toolbox-module', version: '8.3.0' } ], }, }; diff --git a/yarn.lock b/yarn.lock index 23a1a959b3..a87a61e957 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2227,10 +2227,10 @@ mathjs "^7.0.1" numeric "^1.2.6" -"@pie-framework/math-validation@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@pie-framework/math-validation/-/math-validation-1.4.0.tgz#0c4dbabec735f6baf708c511854aef7a78c0d95c" - integrity sha512-Fm9DW7FL8KYfYQTqJezEtAPEXpmEWxGwugizODWNFn3AAS5PlrLhn4GEA9bL/6zxb7i7E1E/kEdx+Df2rK4ZtQ== +"@pie-framework/math-validation@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@pie-framework/math-validation/-/math-validation-1.4.1.tgz#091284ddb850c9486dada9528f4bafc497d989ba" + integrity sha512-uUPlJjg9PC2GSbSRYAA21ra1XM3cSlqy2IhK1FX5ziRTxtW6uf1hpqVjKwYSCnLQ6oR8kVztorQaN8ozsJo7Lw== dependencies: lodash "^4.17.21" mathjs "^9.4.2" @@ -2276,10 +2276,10 @@ resolved "https://registry.yarnpkg.com/@pie-framework/pie-player-events/-/pie-player-events-0.1.0.tgz#0150904118fd604559982ab658967811c053ffe3" integrity sha512-6H1tlRGmcZ3Wt+8HMqu5KugVcwwyNrMylfI5rIpvOSt0T82QDmjRj+2sPgQG5zos/w6MtwUqn/QZ+8Rq2EXSOA== -"@pie-lib/pie-toolbox@2.19.0": - version "2.19.0" - resolved "https://registry.yarnpkg.com/@pie-lib/pie-toolbox/-/pie-toolbox-2.19.0.tgz#d2f60f85aec4a4838272f8cae43da8b766953eb5" - integrity sha512-jlvL6wd8PBlOETcw8wH0RuHCYQeMSFAchDN3N3jC6GfvEw7dWoIc7Cfz1xDl1rfeUpRVk33WJnLOOMkelCT1xg== +"@pie-lib/pie-toolbox@2.22.0": + version "2.22.0" + resolved "https://registry.yarnpkg.com/@pie-lib/pie-toolbox/-/pie-toolbox-2.22.0.tgz#38797a0b419b3ae155c5555d2dc64f54d48141c6" + integrity sha512-Fe0+YG1Mr13/4Paj8rmN2XKHnVnfZgOrUvRMoYSdBqjcVsA48FuM3B4G5qxx10B1CYGejfBS/Ta5C/5nnqv+Gw== dependencies: "@mapbox/point-geometry" "^0.1.0" "@material-ui/core" "^3.8.3"