@pie-element/select-text 8.12.1-next.9 → 8.12.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [8.12.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@8.12.0...@pie-element/select-text@8.12.1) (2024-06-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-3788, PD-1273 ([f4b6aba](https://github.com/pie-framework/pie-elements/commit/f4b6aba5c741fbf6305dba71bf47d2226f39f2ee))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.12.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@8.11.6...@pie-element/select-text@8.12.0) (2024-05-27)
7
18
 
8
19
 
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.11.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@7.11.0...@pie-element/select-text-configure@7.11.1) (2024-06-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-3788, PD-1273 ([f4b6aba](https://github.com/pie-framework/pie-elements/commit/f4b6aba5c741fbf6305dba71bf47d2226f39f2ee))
12
+
13
+
14
+
15
+
16
+
6
17
  # [7.11.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@7.10.6...@pie-element/select-text-configure@7.11.0) (2024-05-27)
7
18
 
8
19
 
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/select-text-configure",
3
3
  "private": true,
4
- "version": "7.11.0",
4
+ "version": "7.11.1",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "1.20.0",
11
+ "@pie-lib/pie-toolbox": "1.20.1",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "prop-types": "^15.6.2",
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.10.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-controller@5.10.0...@pie-element/select-text-controller@5.10.1) (2024-06-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-3788, PD-1273 ([f4b6aba](https://github.com/pie-framework/pie-elements/commit/f4b6aba5c741fbf6305dba71bf47d2226f39f2ee))
12
+
13
+
14
+
15
+
16
+
6
17
  # [5.10.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-controller@5.9.6...@pie-element/select-text-controller@5.10.0) (2024-05-27)
7
18
 
8
19
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pie-element/select-text-controller",
3
3
  "private": true,
4
- "version": "5.10.0",
4
+ "version": "5.10.1",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
- "@pie-lib/pie-toolbox": "1.20.0",
9
+ "@pie-lib/pie-toolbox": "1.20.1",
10
10
  "debug": "^3.1.0",
11
11
  "lodash": "^4.17.15"
12
12
  },
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_react_dom_server} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.12.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_react_dom_server} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.13.0/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@4.12.0/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
@@ -1014,7 +1014,7 @@ var _interopRequireDefault$2 = interopRequireDefault.exports;
1014
1014
  Object.defineProperty(feedback, "__esModule", {
1015
1015
  value: true
1016
1016
  });
1017
- feedback.getFeedbackForCorrectness = feedback.getFeedback = feedback.defaults = void 0;
1017
+ feedback.getFeedbackForCorrectness = feedback.getFeedback = feedback.getActualFeedbackForCorrectness = feedback.getActualFeedback = feedback.defaults = void 0;
1018
1018
 
1019
1019
  var _defineProperty2 = _interopRequireDefault$2(defineProperty.exports);
1020
1020
 
@@ -1105,10 +1105,45 @@ var getFeedback = function getFeedback(feedback, fallback) {
1105
1105
  var out = feedback[feedback.type] || fallback;
1106
1106
  resolve(out);
1107
1107
  });
1108
- };
1108
+ }; // TODO: should replace getFeedbackForCorrectness
1109
+
1110
+ /**
1111
+ * Get feedback for correctness
1112
+ * @param {'correct'|'incorrect'|'partial'} correctness
1113
+ * @param {Feedback} feedback
1114
+ */
1115
+
1109
1116
 
1110
1117
  feedback.getFeedback = getFeedback;
1111
1118
 
1119
+ var getActualFeedbackForCorrectness = function getActualFeedbackForCorrectness(correctness, feedback) {
1120
+ feedback = _objectSpread(_objectSpread({}, defaults$1), feedback); // normalize correctness
1121
+
1122
+ correctness = correctness === 'partially-correct' ? 'partial' : correctness;
1123
+ var defaultFeedback = defaults$1[correctness] || {};
1124
+ var fb = feedback[correctness] || defaultFeedback;
1125
+ return getActualFeedback(fb, defaultFeedback[fb.type || 'default']);
1126
+ }; // TODO: should replace getFeedback
1127
+
1128
+ /**
1129
+ * Get the feedback from a {FeedbackConfig}
1130
+ * @param {FeedbackConfig} feedback
1131
+ * @param {string} fallback
1132
+ */
1133
+
1134
+
1135
+ feedback.getActualFeedbackForCorrectness = getActualFeedbackForCorrectness;
1136
+
1137
+ var getActualFeedback = function getActualFeedback(feedback, fallback) {
1138
+ if (!feedback || feedback.type === 'none') {
1139
+ return undefined;
1140
+ }
1141
+
1142
+ return feedback[feedback.type] || fallback;
1143
+ };
1144
+
1145
+ feedback.getActualFeedback = getActualFeedback;
1146
+
1112
1147
  (function (exports) {
1113
1148
 
1114
1149
  Object.defineProperty(exports, "__esModule", {
@@ -1120,6 +1155,18 @@ Object.defineProperty(exports, "defaults", {
1120
1155
  return _feedback.defaults;
1121
1156
  }
1122
1157
  });
1158
+ Object.defineProperty(exports, "getActualFeedback", {
1159
+ enumerable: true,
1160
+ get: function get() {
1161
+ return _feedback.getActualFeedback;
1162
+ }
1163
+ });
1164
+ Object.defineProperty(exports, "getActualFeedbackForCorrectness", {
1165
+ enumerable: true,
1166
+ get: function get() {
1167
+ return _feedback.getActualFeedbackForCorrectness;
1168
+ }
1169
+ });
1123
1170
  Object.defineProperty(exports, "getFeedback", {
1124
1171
  enumerable: true,
1125
1172
  get: function get() {
package/module/element.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_debug, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.12.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_debug, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.13.0/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.12.0/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/select-text@8.12.0</title>
5
+ <title>@pie-element/select-text@8.12.1</title>
6
6
  <script
7
7
  type="module"
8
8
  src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@pie-element/select-text",
3
- "version": "8.12.0",
3
+ "version": "8.12.1",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "1.12.1"
7
+ "version": "1.13.0"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/select-text@8.12.0</title>
5
+ <title>@pie-element/select-text@8.12.1</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/module/print.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_debug, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.12.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_lodash, _dll_debug, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.13.0/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.12.0/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
package/package.json CHANGED
@@ -4,19 +4,19 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "8.12.1-next.9+b9980bc25",
7
+ "version": "8.12.2-next.0+b556acd41",
8
8
  "description": "",
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
- "@pie-lib/pie-toolbox": "1.20.0",
12
+ "@pie-lib/pie-toolbox": "1.20.1",
13
13
  "prop-types": "^15.6.1",
14
14
  "react": "^16.8.1",
15
15
  "react-dom": "^16.8.1"
16
16
  },
17
17
  "author": "",
18
18
  "license": "ISC",
19
- "gitHead": "b9980bc25dc024e53eb08ef3f932d5e1629bf38a",
19
+ "gitHead": "b556acd416f156334c07c0b1233cab83dfa65301",
20
20
  "scripts": {
21
21
  "postpublish": "../../scripts/postpublish"
22
22
  },