diff --git a/packages/boilerplate-item-type/configure/package.json b/packages/boilerplate-item-type/configure/package.json index 0713197b92..4cfa579edc 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 44682a5b6c..d6cf6c79a2 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 2b3d308d77..8d567f9716 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 da6fef1410..d01ad71d4a 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 aaf658dce5..33ab37dd99 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "classnames": "^2.2.5", "debug": "^3.1.0", "lodash": "^4.17.15", diff --git a/packages/categorize/controller/package.json b/packages/categorize/controller/package.json index fc9cc5365f..23d89ed44a 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "lodash": "^4.17.15" }, "version": "7.9.2", diff --git a/packages/categorize/package.json b/packages/categorize/package.json index c0872e4058..a8f1e224a7 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 53027f0b24..59fea43c85 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 8bf8d730b0..adf05c4283 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^4.1.1", "lodash": "^4.17.15" }, diff --git a/packages/charting/package.json b/packages/charting/package.json index 86798db23a..4d22007941 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "classnames": "^2.2.5", "debug": "^4.1.1", "lodash": "^4.17.15", diff --git a/packages/complex-rubric/controller/package.json b/packages/complex-rubric/controller/package.json index 523008c8d4..3d58d34d07 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 1cbd6ecf7b..ce9c0f4551 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 ad9ac09673..0b10574f65 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 fe02937599..6af483e34b 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 bb4c09bcdf..4f3c66bedf 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 44cc0accb7..9aaaf44788 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 0c1c4914d8..6b7bee8df0 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.18.2", "@pie-framework/pie-configure-events": "^1.2.0", - "@pie-lib/pie-toolbox": "2.22.3", + "@pie-lib/pie-toolbox": "2.20.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 9b624bf872..926b087a0d 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "lodash": "^4.17.15" }, "author": "", diff --git a/packages/ebsr/package.json b/packages/ebsr/package.json index 8d01c92299..f1b45a54e0 100644 --- a/packages/ebsr/package.json +++ b/packages/ebsr/package.json @@ -9,7 +9,7 @@ "dependencies": { "@pie-element/multiple-choice": "^9.18.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.22.3", + "@pie-lib/pie-toolbox": "2.20.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 44efbb45eb..5b81bbd898 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 96840e578c..cb582fbc8a 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 2ddb9f4e86..02e549cda5 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 4c9985c892..5c06abea04 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 c1b466f8d0..ee8209dcb7 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.22.3" + "@pie-lib/pie-toolbox": "2.20.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 e00b8a8265..180381f0af 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 6b7056efb7..6652d77e0a 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 6b3192a29e..6f76857ca5 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/fraction-model/package.json b/packages/fraction-model/package.json index bc0eac45d2..247c5bf3ef 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 d67a1d3618..160c2ba4e3 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 73a0f9dcbc..b44c6a6f0b 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^4.1.1" }, "devDependencies": { diff --git a/packages/graphing-solution-set/package.json b/packages/graphing-solution-set/package.json index 1f4c82aa47..8997da8498 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 6e44a42ee0..20fe15713e 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 754e594e78..e3136beacb 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^4.1.1" }, "devDependencies": { diff --git a/packages/graphing/package.json b/packages/graphing/package.json index fdafb9f7de..ff13b989bd 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 7324ca66f6..5a491c4236 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 0b1ae89f78..446b2e2dbf 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^4.1.1", "lodash": "^4.17.15" } diff --git a/packages/hotspot/package.json b/packages/hotspot/package.json index 773ed16406..43dc5f7dba 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 c24553aef6..4ea3d03006 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 7db95ba73c..dda396a186 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 dc005d9053..cffaca7795 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 979badaf83..1b597ddddc 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 121c01bafb..314a83e453 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 4c9b025ba4..a096cfdee4 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 7b8a538807..97b9d091a9 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 cbb6aae1d7..0d69591fae 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 752a183e72..69dee40ee0 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/match-list/package.json b/packages/match-list/package.json index 5e90f19925..2b406840ef 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 523673a692..13a2300038 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 908b6a47c6..a8aa200831 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0" }, "devDependencies": { diff --git a/packages/match/package.json b/packages/match/package.json index fd9a81af34..f0ed6d4e12 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 5e799f025a..bbede57d6d 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 d1006c4fbf..f6dc92a9da 100644 --- a/packages/math-inline/controller/package.json +++ b/packages/math-inline/controller/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@pie-framework/math-validation": "^1.4.2", - "@pie-lib/pie-toolbox": "2.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/math-inline/package.json b/packages/math-inline/package.json index 1a832ce9df..b41f55b6e2 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 db914da314..bdb1c6a80e 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 d71133427d..cbd5c76bfd 100644 --- a/packages/math-templated/controller/package.json +++ b/packages/math-templated/controller/package.json @@ -7,7 +7,7 @@ "module": "src/index.js", "dependencies": { "@pie-framework/math-validation": "^1.4.2", - "@pie-lib/pie-toolbox": "2.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/math-templated/package.json b/packages/math-templated/package.json index 69cc86e359..60ad799897 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 ebfe05271a..cb0e5df3ad 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 803e8b8737..180a8c46c0 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 61beb50964..dc80457016 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 970044281a..99275a4335 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 08a28df17d..95502bf732 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 a2817c4f06..40b3724a48 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 e8260ab952..b8128fc46c 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0", "lodash": "^4.17.15" } diff --git a/packages/multiple-choice/package.json b/packages/multiple-choice/package.json index a571454e99..3a944c8947 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "classnames": "^2.2.5", "debug": "^4.1.1", "enzyme-to-json": "^3.3.3", diff --git a/packages/number-line/configure/package.json b/packages/number-line/configure/package.json index be6e40457e..4e186750fc 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 eb49a3b128..c1be36b13c 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "lodash": "^4.17.15", "mathjs": "^7.5.1" }, diff --git a/packages/number-line/package.json b/packages/number-line/package.json index 365d2d21a4..5b6d76d9a7 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 c24dbee21c..3eb844f58b 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 fda6d8f462..f82ab1726b 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 10005558a0..b02cf21b07 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 156342985b..674b7c157a 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 65c59c93d4..edcf172f55 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 4653a931b2..eddc77d417 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 f393434183..54294c25f9 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 a68cc24b02..80f24e418b 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "lodash": "^4.17.15" } } diff --git a/packages/rubric/package.json b/packages/rubric/package.json index e21d6a4dc7..6f900f34f0 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.22.3", + "@pie-lib/pie-toolbox": "2.20.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 a71b29ac9b..3fb118a805 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.22.3" + "@pie-lib/pie-toolbox": "2.20.0" }, "author": "", "license": "ISC" diff --git a/packages/ruler/package.json b/packages/ruler/package.json index a1b3601856..b7a1c0e759 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.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "prop-types": "^15.6.1", "react": "^16.8.1", "react-dom": "^16.8.1" diff --git a/packages/select-text/CHANGELOG.md b/packages/select-text/CHANGELOG.md index a5bb0d018f..70a82d4d26 100644 --- a/packages/select-text/CHANGELOG.md +++ b/packages/select-text/CHANGELOG.md @@ -3,48 +3,6 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [9.6.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@9.6.1...@pie-element/select-text@9.6.2) (2025-07-25) - - -### Bug Fixes - -* refactor PD-5132, update pie-lib/pie-toolbox PD-3797 ([7434408](https://github.com/pie-framework/pie-elements/commit/7434408416a883fd680eec13fe1109711fd7e6b5)) -* update pie-lib/pie-toolbox PD-4885, PD-5131 ([4b9859c](https://github.com/pie-framework/pie-elements/commit/4b9859c919a1a7cc8e29d6168a91cd1f7d1aafd1)) - - - - - -## [9.6.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@9.6.0...@pie-element/select-text@9.6.1) (2025-07-22) - - -### Bug Fixes - -* update pie-toolbox PD-4885 ([a6d439e](https://github.com/pie-framework/pie-elements/commit/a6d439e49a0082f3d5e8bf46cc73c69d1d0ae311)) - - - - - -# [9.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@9.5.10...@pie-element/select-text@9.6.0) (2025-07-18) - - -### Bug Fixes - -* update pie-lib/pie-toolbox PD-363 ([10ce402](https://github.com/pie-framework/pie-elements/commit/10ce402bcb1c0c9c24dfc9ecff2e13c4de14a753)) - - -### Features - -* update pie-lib/pie toolbox PD-5082, PD-5081, PD-3797, PD-5083, revert PD-363, PD-653 ([9214466](https://github.com/pie-framework/pie-elements/commit/92144667464f18c213c7ab1d769595e43b553dab)) -* update pie-lib/pie-toolbox PD-5082, PD-5081, PD-3797, PD-5083, PD-4885, PD-5097, PD-5100, PD-5131, PD-5080 ([dc67b1c](https://github.com/pie-framework/pie-elements/commit/dc67b1c735b2adb60943e5d145e739ce4e39a428)) -* **select-text:** move tokens into markup and implement custom selection POC PD-363 ([aca8eb3](https://github.com/pie-framework/pie-elements/commit/aca8eb3336a4111db12537b16d8ca0f4595b08ce)) -* **select-text:** update Legend component to show only correct answers in evaluate mode PD-5100 ([592e8d3](https://github.com/pie-framework/pie-elements/commit/592e8d38dda32a4dab1a10b4bd6598977a858bad)) - - - - - ## [9.5.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@9.5.9...@pie-element/select-text@9.5.10) (2025-06-27) diff --git a/packages/select-text/configure/CHANGELOG.md b/packages/select-text/configure/CHANGELOG.md index 161e6503a3..3b1527b930 100644 --- a/packages/select-text/configure/CHANGELOG.md +++ b/packages/select-text/configure/CHANGELOG.md @@ -3,47 +3,6 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [8.5.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@8.5.1...@pie-element/select-text-configure@8.5.2) (2025-07-25) - - -### Bug Fixes - -* refactor PD-5132, update pie-lib/pie-toolbox PD-3797 ([7434408](https://github.com/pie-framework/pie-elements/commit/7434408416a883fd680eec13fe1109711fd7e6b5)) -* update pie-lib/pie-toolbox PD-4885, PD-5131 ([4b9859c](https://github.com/pie-framework/pie-elements/commit/4b9859c919a1a7cc8e29d6168a91cd1f7d1aafd1)) - - - - - -## [8.5.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@8.5.0...@pie-element/select-text-configure@8.5.1) (2025-07-22) - - -### Bug Fixes - -* update pie-toolbox PD-4885 ([a6d439e](https://github.com/pie-framework/pie-elements/commit/a6d439e49a0082f3d5e8bf46cc73c69d1d0ae311)) - - - - - -# [8.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@8.4.10...@pie-element/select-text-configure@8.5.0) (2025-07-18) - - -### Bug Fixes - -* update pie-lib/pie-toolbox PD-363 ([10ce402](https://github.com/pie-framework/pie-elements/commit/10ce402bcb1c0c9c24dfc9ecff2e13c4de14a753)) - - -### Features - -* update pie-lib/pie toolbox PD-5082, PD-5081, PD-3797, PD-5083, revert PD-363, PD-653 ([9214466](https://github.com/pie-framework/pie-elements/commit/92144667464f18c213c7ab1d769595e43b553dab)) -* update pie-lib/pie-toolbox PD-5082, PD-5081, PD-3797, PD-5083, PD-4885, PD-5097, PD-5100, PD-5131, PD-5080 ([dc67b1c](https://github.com/pie-framework/pie-elements/commit/dc67b1c735b2adb60943e5d145e739ce4e39a428)) -* **select-text:** move tokens into markup and implement custom selection POC PD-363 ([aca8eb3](https://github.com/pie-framework/pie-elements/commit/aca8eb3336a4111db12537b16d8ca0f4595b08ce)) - - - - - ## [8.4.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@8.4.9...@pie-element/select-text-configure@8.4.10) (2025-06-27) diff --git a/packages/select-text/configure/package.json b/packages/select-text/configure/package.json index 91a77f1a9f..09ca96a70b 100644 --- a/packages/select-text/configure/package.json +++ b/packages/select-text/configure/package.json @@ -1,14 +1,14 @@ { "name": "@pie-element/select-text-configure", "private": true, - "version": "8.5.2", + "version": "8.4.10", "description": "", "main": "lib/index.js", "module": "src/index.js", "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-configure-events": "^1.3.0", - "@pie-lib/pie-toolbox": "2.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0", "lodash": "^4.17.15", "prop-types": "^15.6.2", diff --git a/packages/select-text/configure/src/__tests__/__snapshots__/design.test.jsx.snap b/packages/select-text/configure/src/__tests__/__snapshots__/design.test.jsx.snap index b508b948da..6a8dd96175 100644 --- a/packages/select-text/configure/src/__tests__/__snapshots__/design.test.jsx.snap +++ b/packages/select-text/configure/src/__tests__/__snapshots__/design.test.jsx.snap @@ -141,6 +141,17 @@ exports[`design snapshot renders all items except feedback 1`] = ` "settings": true, }, "text": Object { + "inputConfiguration": Object { + "audio": Object { + "disabled": true, + }, + "image": Object { + "disabled": true, + }, + "video": Object { + "disabled": true, + }, + }, "label": "Content", "settings": true, }, @@ -183,68 +194,73 @@ exports[`design snapshot renders all items except feedback 1`] = ` /> } > +
+ NEW functionality + + } + label="Select tokens" + /> +
- - - - - - - -
- - - - -
`; @@ -389,6 +405,17 @@ exports[`design snapshot renders all items except the content input 1`] = ` "settings": true, }, "text": Object { + "inputConfiguration": Object { + "audio": Object { + "disabled": true, + }, + "image": Object { + "disabled": true, + }, + "video": Object { + "disabled": true, + }, + }, "label": "Content", "settings": false, }, @@ -431,54 +458,16 @@ exports[`design snapshot renders all items except the content input 1`] = ` /> } > - - - - - -
- - - - + } + label="Select tokens" />
@@ -625,6 +614,17 @@ exports[`design snapshot renders all items with defaultProps 1`] = ` "settings": true, }, "text": Object { + "inputConfiguration": Object { + "audio": Object { + "disabled": true, + }, + "image": Object { + "disabled": true, + }, + "video": Object { + "disabled": true, + }, + }, "label": "Content", "settings": true, }, @@ -667,68 +667,73 @@ exports[`design snapshot renders all items with defaultProps 1`] = ` /> } > +
+ NEW functionality + + } + label="Select tokens" + /> +
- - - - - - - -
- - - - -
`; @@ -873,6 +878,17 @@ exports[`design snapshot tokenizer renders with html entities 1`] = ` "settings": true, }, "text": Object { + "inputConfiguration": Object { + "audio": Object { + "disabled": true, + }, + "image": Object { + "disabled": true, + }, + "video": Object { + "disabled": true, + }, + }, "label": "Content", "settings": true, }, @@ -916,68 +932,72 @@ exports[`design snapshot tokenizer renders with html entities 1`] = ` /> } > +
+ NEW functionality + + } + label="Select tokens" + /> +
- - - - - - - -
- - - - -
`; diff --git a/packages/select-text/configure/src/__tests__/design.test.jsx b/packages/select-text/configure/src/__tests__/design.test.jsx index 12b6621cf5..ff991b37d4 100644 --- a/packages/select-text/configure/src/__tests__/design.test.jsx +++ b/packages/select-text/configure/src/__tests__/design.test.jsx @@ -121,12 +121,12 @@ describe('design', () => { }); }; - describe('changeText', () => { - assert('changeText', [{ target: { value: 'foo' } }], (m) => ({ - ...m, - text: 'foo', - })); - }); + // describe('changeText', () => { + // assert('changeText', [{ target: { value: 'foo' } }], (m) => ({ + // ...m, + // text: 'foo', + // })); + // }); describe('changeTokens', () => { assert('changeTokens', [[{ start: 0, end: 1, text: 'f' }], 'words'], (m) => ({ diff --git a/packages/select-text/configure/src/defaultConfiguration.js b/packages/select-text/configure/src/defaultConfiguration.js index a138ca7d50..f08e84d27e 100644 --- a/packages/select-text/configure/src/defaultConfiguration.js +++ b/packages/select-text/configure/src/defaultConfiguration.js @@ -83,6 +83,11 @@ export default { text: { settings: true, label: 'Content', + inputConfiguration: { + audio: { disabled: true }, + video: { disabled: true }, + image: { disabled: true }, + }, }, tokens: { settings: true, diff --git a/packages/select-text/configure/src/design.jsx b/packages/select-text/configure/src/design.jsx index b0e01027a6..a4f1cbf290 100644 --- a/packages/select-text/configure/src/design.jsx +++ b/packages/select-text/configure/src/design.jsx @@ -4,14 +4,28 @@ import TextField from '@material-ui/core/TextField'; import { withStyles } from '@material-ui/core/styles'; import cloneDeep from 'lodash/cloneDeep'; import debounce from 'lodash/debounce'; -import { Tokenizer } from '@pie-lib/pie-toolbox/text-select'; +import { Tokenizer, Controls } from '@pie-lib/pie-toolbox/text-select'; import { InputContainer, NumberTextField, FeedbackConfig, settings, layout } from '@pie-lib/pie-toolbox/config-ui'; import Chip from '@material-ui/core/Chip'; import Info from '@material-ui/icons/Info'; import debug from 'debug'; import { EditableHtml } from '@pie-lib/pie-toolbox/editable-html'; +import { renderMath } from '@pie-lib/pie-toolbox/math-rendering'; import Tooltip from '@material-ui/core/Tooltip'; -import { generateValidationMessage } from './utils'; +import { clearSelection, generateValidationMessage } from './utils'; +// import { +// clearSelection, +// getDOMNodes, +// getLabelElement, +// getRangeDetails, +// isSideLabel, +// wrapRange, +// } from '@pie-element/extended-text-entry/src/annotation/annotation-utils'; +import classNames from 'classnames'; + +import Switch from '@material-ui/core/Switch'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import ReactDOM from 'react-dom'; const { Panel, toggle, radio, dropdown } = settings; @@ -39,7 +53,10 @@ export class Design extends React.Component { const { model } = this.props; this.state = { + correctMode: false, + selectMode: false, text: (model && model.text) || '', + tokenizedText: (model && model.token) || '', }; } @@ -49,10 +66,38 @@ export class Design extends React.Component { if (model && model.text) { this.setState({ text: model.text, + text: model.text, + tokenizedText: model.tokenizedText || model.text, }); + + // model.tokens.forEach((annotation) => { + // console.log('annotation', annotation); + // const [domStart, domEnd] = getDOMNodes(annotation.start, annotation.end, this.textRef); + // console.log('domStart, domEnd', domStart, domEnd); + // + // if (domStart && domEnd) { + // const range = document.createRange(); + // + // range.setStart(domStart.node, domStart.offset); + // range.setEnd(domEnd.node, domEnd.offset); + // + // const spans = wrapRange(range); + // + // this.createDOMAnnotation(spans, annotation); + // } + // }); } } + componentDidUpdate() { + // console.log('UPDATED'); + // console.log('this.state.text', this.state.text); + //eslint-disable-next-line + const domNode = ReactDOM.findDOMNode(this); + + renderMath(domNode); + } + updateText = debounce((val) => { this.apply((u) => { u.text = val; @@ -60,7 +105,12 @@ export class Design extends React.Component { }); }, 200); - changeText = (event) => this.updateText(event.target.value); + changeText = (text) => { + this.updateText(text); + this.clearTokens(); + }; + + changeTextEvent = (event) => this.updateText(event.target.value); changeTokens = (tokens, mode) => { this.apply((u) => { @@ -74,6 +124,17 @@ export class Design extends React.Component { }); }; + changeTokenizedText = (text) => { + this.apply((u) => { + u.tokenizedText = text; + + // const correctTokenCount = tokens.filter((t) => t.correct).length; + // const max = isFinite(u.maxSelections) ? u.maxSelections : 0; + // + // u.maxSelections = Math.max(max, correctTokenCount); + }); + }; + changeMaxSelections = (event, max) => { this.apply((u) => (u.maxSelections = max)); }; @@ -120,8 +181,270 @@ export class Design extends React.Component { onModelChanged({ ...model, rationale }); }; + // Highlight functionalities based on extended-text-entry + + createDOMAnnotation = (elems, annotation) => { + const { classes } = this.props; + const { id } = annotation; + + (elems || []).forEach((elem) => { + elem.dataset.id = id; + elem.className = classNames(classes.token); + // elem.onclick = !disabled && this.handleClick; + // elem.onmouseover = this.handleHover; + // elem.onmouseout = this.handleCancelHover; + }); + }; + + createNewAnnotation = (selectedElems, selectionDetails) => { + const annotation = { + id: [selectionDetails.start, selectionDetails.end, new Date().getTime()].join('-'), + ...selectionDetails, + }; + + this.createDOMAnnotation(selectedElems, annotation); + + return annotation; + }; + + // addAnnotation = (type) => { + // const { annotations, onChange } = this.props; + // const annotation = this.createNewAnnotation('', type); + // const labelElem = getLabelElement(annotation.id); + // + // annotations.push(annotation); + // + // this.setState({ + // openedMenu: false, + // openedEditor: true, + // annotationIndex: annotations.length - 1, + // annotation, + // labelElem, + // }); + // + // onChange(annotations); + // }; + + // new functionalities + + wrapWordsInSpans(html, onClick) { + const { classes } = this.props; + const container = document.createElement('div'); + container.innerHTML = html; + + const processNode = (node) => { + if (node.nodeType === Node.TEXT_NODE) { + const words = node.textContent.split(/(\s+|\b)/); // split by word boundaries + spaces + const fragment = document.createDocumentFragment(); + + for (const word of words) { + if (word.trim()) { + const span = document.createElement('span'); + + span.className = classNames(classes.token); + span.addEventListener('click', (e) => onClick(e)); + span.textContent = word; + fragment.appendChild(span); + } else { + fragment.appendChild(document.createTextNode(word)); + } + } + + node.replaceWith(fragment); + } else if (node.nodeType === Node.ELEMENT_NODE) { + Array.from(node.childNodes).forEach(processNode); + } + }; + + Array.from(container.childNodes).forEach(processNode); + + return container.innerHTML; + } + + wrapSentencesInSpans = (html, onClickHandler = null) => { + const { classes } = this.props; + const container = document.createElement('div'); + container.innerHTML = html; + + const splitSentences = (text) => { + // Match sentences ending with punctuation: + // "." or "!" or "?" + const pattern = /([^.!?]+[.!?]+[\s"]*)|([^.!?]+$)/g; + const matches = text.match(pattern); + return matches || []; + }; + + const processNode = (node) => { + if (node.nodeType === Node.TEXT_NODE) { + const sentences = splitSentences(node.textContent); + const fragment = document.createDocumentFragment(); + + for (const sentence of sentences) { + if (sentence.trim()) { + const span = document.createElement('span'); + span.textContent = sentence; + span.className = classNames(classes.token); + + if (onClickHandler) { + span.addEventListener('click', (e) => { + onClickHandler(e, sentence); + }); + } + + fragment.appendChild(span); + } else { + fragment.appendChild(document.createTextNode(sentence)); + } + } + + node.replaceWith(fragment); + } else if (node.nodeType === Node.ELEMENT_NODE) { + Array.from(node.childNodes).forEach(processNode); + } + }; + + Array.from(container.childNodes).forEach(processNode); + + return container; + }; + + wrapParagraphContentInSpan(html) { + const { classes } = this.props; + const container = document.createElement('div'); + container.innerHTML = html; + + container.querySelectorAll('p').forEach((p) => { + const span = document.createElement('span'); + span.className = classNames(classes.token); + span.addEventListener('click', this.handleTokenClick); + + // Move all children of

into the span + while (p.firstChild) { + span.appendChild(p.firstChild); + } + + p.appendChild(span); + }); + + return container; + } + + wrapSelectionInSpan(selection) { + const { classes } = this.props; + const range = selection.getRangeAt(0); + + if (range.collapsed) { + console.log('Selection is collapsed (no text selected).'); + return; + } + + // Extract the contents of the selection + const contents = range.extractContents(); + + // Create the span wrapper + const span = document.createElement('span'); + span.className = classNames(classes.token); + span.addEventListener('click', this.handleTokenClick); + span.appendChild(contents); + + // Insert back into the DOM + range.insertNode(span); + + // Collapse the selection + selection.removeAllRanges(); + } + + handleSelection = (event) => { + const selection = window.getSelection(); + + // prevent unwanted selections + if (event.detail > 2) { + clearSelection(); + return; + } + + if (selection && selection.rangeCount > 0) { + this.wrapSelectionInSpan(selection); + clearSelection(); + + if (this.textRef) { + const content = this.textRef.getHTML(); + + this.changeTokenizedText(content); + // this.setState({ tokenizedText: content }); + } + } + }; + + handleTokenClick = (event) => { + const { correctMode } = this.state; + + if (!correctMode) { + return; + } + + event.target.classList.toggle('correct'); + }; + + clearTokens = () => { + const { model } = this.props; + + if (this.textRef) { + const container = document.createElement('div'); + container.innerHTML = model.text; + + // Remove all children and add new content + this.textRef.innerHTML = ''; + this.textRef.appendChild(container); + } + + this.changeTokenizedText(model.text); + this.setState({ tokenizedText: model.text }); + }; + + selectWords = () => { + const { text } = this.state; + this.clearTokens(); + const tokenized = this.wrapWordsInSpans(text, (e) => this.handleTokenClick(e)); + + console.log('words:', tokenized); + + this.changeTokenizedText(tokenized); + this.setState({ tokenizedText: tokenized }); + }; + + selectSentences = () => { + const { text } = this.state; + this.clearTokens(); + const container = this.wrapSentencesInSpans(text); + + // Remove all children and add new content + this.textRef.innerHTML = ''; + this.textRef.appendChild(container); + + const tokenized = container.innerHTML; + console.log('sentences:', tokenized); + this.changeTokenizedText(tokenized); + // this.setState({ tokenizedText: tokenized }); + }; + + selectParagraphs = () => { + const { text } = this.state; + this.clearTokens(); + const container = this.wrapParagraphContentInSpan(text); + + // Remove all children and add new content + this.textRef.innerHTML = ''; + this.textRef.appendChild(container); + + const tokenized = container.innerHTML; + console.log('paragraphs:', tokenized); + this.changeTokenizedText(tokenized); + // this.setState({ tokenizedText: tokenized }); + }; + render() { - const { text: textValue } = this.state; + const { text: textValue, correctMode, selectMode, tokenizedText } = this.state; const { classes, configuration, imageSupport, model, onConfigurationChanged, onModelChanged, uploadSoundSupport } = this.props; const { @@ -266,68 +589,124 @@ export class Design extends React.Component { )} - {text.settings && ( - - - + {/*{text.settings && (*/} + {/* */} + {/* */} + {/* */} + {/*)}*/} + + {/*{tokens.settings && (*/} + {/* */} + {/* */} + {/* */} + {/* */} + + {/* */} + {/* */} + {/*)}*/} + {/*{tokensError &&

{tokensError}
}*/} + {/*{selectionsError &&
{selectionsError}
}*/} + + {/*
*/} + {/* {mode.settings && (*/} + {/* */} + {/* )}*/} + + {/* {selections.settings && (*/} + {/* */} + {/* )}*/} + + {/* {correctAnswer.settings && (*/} + {/* t.correct).length}`}*/} + {/* className={classes.chip}*/} + {/* />*/} + {/* )}*/} + + {/* {selectionCount.settings && (*/} + {/* t.correct).length || 0}*/} + {/* label={`${selectionCount.label} (0:any)`}*/} + {/* max={tokensModel.length}*/} + {/* value={model.maxSelections}*/} + {/* onChange={this.changeMaxSelections}*/} + {/* className={classes.numberField}*/} + {/* />*/} + {/* )}*/} + {/*
*/} + +
+ NEW functionality + { + this.setState({ selectMode: !selectMode }); + // renderMath(this); + }} + /> + } + label="Select tokens" + /> +
+ + {selectMode && ( + this.setState({ correctMode: !correctMode })} + /> )} - {tokens.settings && ( - - - - - - + {text.settings && ( + + {selectMode ? ( +
(this.textRef = r)} + onMouseDown={selectMode && !correctMode ? clearSelection : () => {}} + onMouseUp={selectMode && !correctMode ? this.handleSelection : () => {}} + dangerouslySetInnerHTML={{ __html: tokenizedText }} + /> + ) : ( + + )} )} - {tokensError &&
{tokensError}
} - {selectionsError &&
{selectionsError}
} - -
- {mode.settings && ( - - )} - - {selections.settings && ( - - )} - - {correctAnswer.settings && ( - t.correct).length}`} - className={classes.chip} - /> - )} - - {selectionCount.settings && ( - t.correct).length || 0} - label={`${selectionCount.label} (0:any)`} - max={tokensModel.length} - value={model.maxSelections} - onChange={this.changeMaxSelections} - className={classes.numberField} - /> - )} -
{rationaleEnabled && ( @@ -414,4 +793,44 @@ export default withStyles((theme) => ({ color: theme.palette.error.main, paddingTop: theme.spacing.unit, }, + + subheader: { + paddingBottom: '8px', + borderBottom: '1px solid grey', + marginBottom: '16px', + marginTop: '24px', + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + }, + textContainer: { + padding: '15px 21px', + border: '1px solid #ccc', + borderRadius: '4px', + overflowY: 'scroll', + whiteSpace: 'pre-wrap', + overflowWrap: 'break-word', + '& p': { + margin: 0, + }, + '& span[data-latex]': { + userSelect: 'none', + '-webkit-user-select': 'none', + '-moz-user-select': 'none', + '-ms-user-select': 'none', + }, + }, + token: { + position: 'relative', + cursor: 'pointer', + backgroundColor: '#fff9c4', + + '&:hover': { + backgroundColor: '#E5E0B0', + }, + + '&.correct': { + backgroundColor: '#4caf50', + }, + }, }))(Design); diff --git a/packages/select-text/configure/src/index.js b/packages/select-text/configure/src/index.js index 60cd86b7dc..3b3c8439e6 100644 --- a/packages/select-text/configure/src/index.js +++ b/packages/select-text/configure/src/index.js @@ -8,6 +8,8 @@ import { InsertSoundEvent, DeleteSoundEvent, } from '@pie-framework/pie-configure-events'; +import { renderMath } from '@pie-lib/pie-toolbox/math-rendering'; + import defaultValues from './defaultConfiguration'; import { generateModel } from './utils'; @@ -57,7 +59,7 @@ export default class SelectTextConfigure extends HTMLElement { // check if the language is already included in the languageChoices.options array // and if not, then add it. - if (!this._configuration.languageChoices.options.find(option => option.value === this._model.language)) { + if (!this._configuration.languageChoices.options.find((option) => option.value === this._model.language)) { this._configuration.languageChoices.options.push({ value: this._model.language, label: this._model.language, @@ -127,7 +129,9 @@ export default class SelectTextConfigure extends HTMLElement { }, }); - ReactDOM.render(el, this); + ReactDOM.render(el, this, () => { + renderMath(this); + }); } } } diff --git a/packages/select-text/configure/src/utils.js b/packages/select-text/configure/src/utils.js index f5680eebae..a250dffad9 100644 --- a/packages/select-text/configure/src/utils.js +++ b/packages/select-text/configure/src/utils.js @@ -110,3 +110,25 @@ export const generateValidationMessage = (config) => { return message; }; + +// also used in extended-text-entry +export const clearSelection = () => { + if (document.getSelection) { + // for all new browsers (IE9+, Chrome, Firefox) + document.getSelection().removeAllRanges(); + document.getSelection().addRange(document.createRange()); + } else if (window.getSelection) { + // equals with the document.getSelection (MSDN info) + if (window.getSelection().removeAllRanges) { + // for all new browsers (IE9+, Chrome, Firefox) + window.getSelection().removeAllRanges(); + window.getSelection().addRange(document.createRange()); + } else if (window.getSelection().empty) { + // Chrome supports this as well + window.getSelection().empty(); + } + } else if (document.selection) { + // IE8- + document.selection.empty(); + } +}; diff --git a/packages/select-text/controller/CHANGELOG.md b/packages/select-text/controller/CHANGELOG.md index 1067446be9..141d3850dc 100644 --- a/packages/select-text/controller/CHANGELOG.md +++ b/packages/select-text/controller/CHANGELOG.md @@ -3,46 +3,6 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [6.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-controller@6.3.1...@pie-element/select-text-controller@6.3.2) (2025-07-25) - - -### Bug Fixes - -* refactor PD-5132, update pie-lib/pie-toolbox PD-3797 ([7434408](https://github.com/pie-framework/pie-elements/commit/7434408416a883fd680eec13fe1109711fd7e6b5)) -* update pie-lib/pie-toolbox PD-4885, PD-5131 ([4b9859c](https://github.com/pie-framework/pie-elements/commit/4b9859c919a1a7cc8e29d6168a91cd1f7d1aafd1)) - - - - - -## [6.3.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-controller@6.3.0...@pie-element/select-text-controller@6.3.1) (2025-07-22) - - -### Bug Fixes - -* update pie-toolbox PD-4885 ([a6d439e](https://github.com/pie-framework/pie-elements/commit/a6d439e49a0082f3d5e8bf46cc73c69d1d0ae311)) - - - - - -# [6.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-controller@6.2.10...@pie-element/select-text-controller@6.3.0) (2025-07-18) - - -### Bug Fixes - -* update pie-lib/pie-toolbox PD-363 ([10ce402](https://github.com/pie-framework/pie-elements/commit/10ce402bcb1c0c9c24dfc9ecff2e13c4de14a753)) - - -### Features - -* update pie-lib/pie toolbox PD-5082, PD-5081, PD-3797, PD-5083, revert PD-363, PD-653 ([9214466](https://github.com/pie-framework/pie-elements/commit/92144667464f18c213c7ab1d769595e43b553dab)) -* update pie-lib/pie-toolbox PD-5082, PD-5081, PD-3797, PD-5083, PD-4885, PD-5097, PD-5100, PD-5131, PD-5080 ([dc67b1c](https://github.com/pie-framework/pie-elements/commit/dc67b1c735b2adb60943e5d145e739ce4e39a428)) - - - - - ## [6.2.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-controller@6.2.9...@pie-element/select-text-controller@6.2.10) (2025-06-27) diff --git a/packages/select-text/controller/package.json b/packages/select-text/controller/package.json index f8e2c9d753..c322f6562b 100644 --- a/packages/select-text/controller/package.json +++ b/packages/select-text/controller/package.json @@ -1,12 +1,12 @@ { "name": "@pie-element/select-text-controller", "private": true, - "version": "6.3.2", + "version": "6.2.10", "description": "", "main": "lib/index.js", "module": "src/index.js", "dependencies": { - "@pie-lib/pie-toolbox": "2.22.3", + "@pie-lib/pie-toolbox": "2.20.0", "debug": "^3.1.0", "lodash": "^4.17.15" }, diff --git a/packages/select-text/controller/src/index.js b/packages/select-text/controller/src/index.js index da26885b9c..5869961dd4 100644 --- a/packages/select-text/controller/src/index.js +++ b/packages/select-text/controller/src/index.js @@ -122,6 +122,7 @@ export const model = (question, session, env) => { highlightChoices: normalizedQuestion.highlightChoices, prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null, text: normalizedQuestion.text, + tokenizedText: normalizedQuestion.tokenizedText, disabled: env.mode !== 'gather', maxSelections: normalizedQuestion.maxSelections, correctness, diff --git a/packages/select-text/docs/demo/generate.js b/packages/select-text/docs/demo/generate.js index 05d88dc71e..518d592772 100644 --- a/packages/select-text/docs/demo/generate.js +++ b/packages/select-text/docs/demo/generate.js @@ -224,52 +224,109 @@ exports.model = (id, element) => { '

Select the sentence from "The Gymnast" that best represents the theme.

', rationale: '

The final sentence of the passage best exemplifies the theme of the short story because Natasha's practice and determination finally pays off.

', + // tokens: [ + // { + // text: 'She thought about what she had to do, struggling to rein in her wild, fearful thoughts.', + // end: 90, + // start: 3, + // correct: false, + // }, + // { + // start: 449, + // end: 585, + // text: '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.', + // correct: false, + // }, + // { + // end: 627, + // correct: false, + // 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.', + // correct: false, + // start: 628, + // }, + // { + // text: 'Suddenly, the din of the gymnasium was silent to her.', + // end: 997, + // correct: false, + // start: 944, + // }, + // { + // end: 1087, + // start: 998, + // correct: false, + // text: 'Forcing all sound out of her mind, she focused on the gleaming balance beam ahead of her.', + // }, + // { + // correct: true, + // start: 1088, + // end: 1225, + // text: 'Taking a deep breath, Natasha made her graceful, yet powerful approach, mounted the beam flawlessly, and...executed her first perfect 10.', + // }, + // ], + // "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', tokens: [ - { - text: 'She thought about what she had to do, struggling to rein in her wild, fearful thoughts.', - end: 90, - start: 3, - correct: false, - }, - { - start: 449, - end: 585, - text: '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.', - correct: false, - }, - { - end: 627, - correct: false, - 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.", - correct: false, - start: 628, - }, - { - text: 'Suddenly, the din of the gymnasium was silent to her.', - end: 997, - correct: false, - start: 944, - }, - { - end: 1087, - start: 998, - correct: false, - text: 'Forcing all sound out of her mind, she focused on the gleaming balance beam ahead of her.', - }, - { - correct: true, - start: 1088, - end: 1225, - text: 'Taking a deep breath, Natasha made her graceful, yet powerful approach, mounted the beam flawlessly, and...executed her first perfect 10.', - }, + // { + // id: '0-30-1751440197593', + // quote: 'She thought about what she had', + // start: 0, + // end: 30, + // }, + // { + // id: '185-206-1751440199435', + // quote: 'o please her Coach, y', + // start: 185, + // end: 206, + // }, + // { + // id: '356-379-1751440202337', + // quote: 'e much more humorous to', + // start: 356, + // end: 379, + // }, + // { + // id: '0-88-1751443110733', + // quote: 'She thought about what she had to do, struggling to rein in her wild, fearful thoughts. ', + // start: 0, + // end: 88, + // }, + // { + // id: '590-607-1751443116013', + // quote: "Át last Ñatasha's", + // start: 590, + // end: 607, + // }, + // { + // id: '624-641-1751443118643', + // quote: 'The faces of past', + // start: 624, + // end: 641, + // }, + // { + // id: '1223-1231-1751443121777', + // quote: 'header 2', + // start: 1223, + // end: 1231, + // }, + // { + // id: '358-376-1751443129379', + // quote: '»»» were much more', + // start: 358, + // end: 376, + // }, + // { + // id: '137-154-1751443132310', + // quote: 'mind never scored', + // start: 137, + // end: 154, + // }, ], - // "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

Át last Ñatasha'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.

header 1

header 2

row

row

', rubricEnabled: false, }), ); diff --git a/packages/select-text/package.json b/packages/select-text/package.json index c8b70b9c37..ecf1cde80a 100644 --- a/packages/select-text/package.json +++ b/packages/select-text/package.json @@ -4,12 +4,12 @@ "access": "public" }, "repository": "pie-framework/pie-elements", - "version": "9.6.2", + "version": "9.5.10", "description": "", "dependencies": { "@material-ui/core": "^3.9.2", "@pie-framework/pie-player-events": "^0.1.0", - "@pie-lib/pie-toolbox": "2.22.3", + "@pie-lib/pie-toolbox": "2.20.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 580f2e4624..a49b1900b2 100644 --- a/packages/select-text/src/main.jsx +++ b/packages/select-text/src/main.jsx @@ -2,9 +2,18 @@ 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 { + 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'; +import classNames from 'classnames'; import debug from 'debug'; @@ -26,14 +35,27 @@ export class Main extends React.Component { this.state = { showCorrectAnswer: this.props.model.alwaysShowCorrect || false, - model: generateModel(props.model), + model: { + ...generateModel(props.model), + tokenizedText: this.initializeTokenizedText( + props.model.tokenizedText || props.model.text, + this.handleTokenClick, + ), + }, + selectedTokens: [], }; } UNSAFE_componentWillReceiveProps(nextProps) { this.setState({ showCorrectAnswer: !!nextProps.model.alwaysShowCorrect, - model: generateModel(nextProps.model), + model: { + ...generateModel(nextProps.model), + tokenizedText: this.initializeTokenizedText( + nextProps.model.tokenizedText || nextProps.model.text, + this.handleTokenClick, + ), + }, }); } @@ -47,16 +69,37 @@ export class Main extends React.Component { return model.tokens.filter((t) => t.correct); }; + initializeTokenizedText = (html, onClick) => { + const { classes } = this.props; + const container = document.createElement('div'); + container.innerHTML = html; + + const spans = container.querySelectorAll('span'); + + spans.forEach((span) => { + span.className = classNames(classes.token); + // span.addEventListener('click', (e) => onClick(e)); + }); + + return container.innerHTML; + }; + + handleTokenClick = (event) => { + console.log('event click', event.target.id); + + event.target.classList.toggle('selected'); + }; + render() { const { session, onSelectionChange, classes } = this.props; const { showCorrectAnswer, model } = this.state; const { env, extraCSSRules } = model; const { mode } = env || {}; - const selectedTokens = showCorrectAnswer ? this.correctAnswer() : session.selectedTokens; const showRationale = model.rationale && (hasText(model.rationale) || hasMedia(model.rationale)); - const showTeacherInstructions = model.teacherInstructions && (hasText(model.teacherInstructions) || hasMedia(model.teacherInstructions)); + const showTeacherInstructions = + model.teacherInstructions && (hasText(model.teacherInstructions) || hasMedia(model.teacherInstructions)); log('[render] selectedTokens:', selectedTokens); @@ -92,7 +135,7 @@ export class Main extends React.Component { { @@ -113,7 +156,7 @@ export class Main extends React.Component { maxNoOfSelections={model.maxSelections} animationsDisabled={model.animationsDisabled} /> - {mode === 'evaluate' && } + {mode === 'evaluate' && } {showRationale && (!model.animationsDisabled ? ( @@ -154,6 +197,22 @@ const StyledMain = withStyles((theme) => ({ collapsible: { marginBottom: theme.spacing.unit * 2, }, + token: { + position: 'relative', + cursor: 'pointer', + border: 'dashed 2px grey', + lineHeight: '24px', + // backgroundColor: '#fff9c4', + + '&:hover': { + backgroundColor: '#9fa8da', + }, + + '&.selected': { + backgroundColor: '#9fa8da', + border: 'none', + }, + }, }))(Main); export default class Stateful extends React.Component { diff --git a/yarn.lock b/yarn.lock index a68b04ea5d..ba0dea9ba4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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.22.3": - version "2.22.3" - resolved "https://registry.yarnpkg.com/@pie-lib/pie-toolbox/-/pie-toolbox-2.22.3.tgz#653f1ffbedaf74786bd0e4245015158d32af7e84" - integrity sha512-1VmwnDe6bo6GoBRP+MwyvoAtb4Udwbcb5ToppR2CsoAb1XSDtQCJBxWytPW3RA0IuHd4jRi02eFUhVQcxpPQkg== +"@pie-lib/pie-toolbox@2.20.0": + version "2.20.0" + resolved "https://registry.yarnpkg.com/@pie-lib/pie-toolbox/-/pie-toolbox-2.20.0.tgz#607cd6f2ba8a60f419a7a2ac5b8f2eac8af5169c" + integrity sha512-IYptYd4ZwLtZEnwsTNIf+X6nK3JNeCvQZQZn5ow4NQyp6aI5A1vVCNOVHOVzjz5a0kNReDK/5jvyV8mF2ov89g== dependencies: "@mapbox/point-geometry" "^0.1.0" "@material-ui/core" "^3.8.3"