@pie-element/explicit-constructed-response 3.12.1 → 3.12.4

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/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/explicit-constructed-response@3.12.0</title>
5
+ <title>@pie-element/explicit-constructed-response@3.12.3</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,6 +1,6 @@
1
- import {_dll_debug, _dll_lodash, _dll_react, _dll_react_dom_server, _dll_prop_types, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_classnames, _dll_react_dom, _dll_pie_lib__render_ui, _dll_pie_lib__correct_answer_toggle} from "../../../@pie-lib/shared-module@^1.2.19/module/index.js";
2
- import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.22/module/index.js";
3
- import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.20/module/index.js";
1
+ import {_dll_debug, _dll_lodash, _dll_react, _dll_react_dom_server, _dll_prop_types, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_classnames, _dll_react_dom, _dll_pie_lib__render_ui, _dll_pie_lib__correct_answer_toggle} from "../../../@pie-lib/shared-module@^1.4.2/module/index.js";
2
+ import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.27/module/index.js";
3
+ import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.25/module/index.js";
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
5
  var toString$1 = Object.prototype.toString;
6
6
  var typeOf = function (val) {
@@ -12939,6 +12939,12 @@ const rules = [marks, {
12939
12939
  ...normalAttrs
12940
12940
  });
12941
12941
  const object = getObject(type);
12942
+ if (el.tagName.toLowerCase() === 'math') {
12943
+ return {
12944
+ isMath: true,
12945
+ nodes: [el]
12946
+ };
12947
+ }
12942
12948
  return {
12943
12949
  object,
12944
12950
  type,
@@ -13003,6 +13009,19 @@ const renderChildren = (layout, value, onChange, rootRenderChildren, parentNode)
13003
13009
  const children = [];
13004
13010
  (layout.nodes || []).forEach((n, index) => {
13005
13011
  const key = `${n.type}-${index}`;
13012
+ if (n.isMath) {
13013
+ children.push(React$c.createElement('span', {
13014
+ dangerouslySetInnerHTML: {
13015
+ __html: `<math>${n.nodes[0].innerHTML}</math>`
13016
+ },
13017
+ __self: undefined,
13018
+ __source: {
13019
+ fileName: _jsxFileName$b,
13020
+ lineNumber: 49
13021
+ }
13022
+ }));
13023
+ return children;
13024
+ }
13006
13025
  if (rootRenderChildren) {
13007
13026
  const c = rootRenderChildren(n, value, onChange);
13008
13027
  if (c) {
@@ -13026,7 +13045,7 @@ const renderChildren = (layout, value, onChange, rootRenderChildren, parentNode)
13026
13045
  __self: undefined,
13027
13046
  __source: {
13028
13047
  fileName: _jsxFileName$b,
13029
- lineNumber: 70
13048
+ lineNumber: 77
13030
13049
  }
13031
13050
  }, content));
13032
13051
  break;
@@ -13043,7 +13062,7 @@ const renderChildren = (layout, value, onChange, rootRenderChildren, parentNode)
13043
13062
  __self: undefined,
13044
13063
  __source: {
13045
13064
  fileName: _jsxFileName$b,
13046
- lineNumber: 80
13065
+ lineNumber: 87
13047
13066
  }
13048
13067
  }, subNodes));
13049
13068
  } else {
@@ -13055,7 +13074,7 @@ const renderChildren = (layout, value, onChange, rootRenderChildren, parentNode)
13055
13074
  __self: undefined,
13056
13075
  __source: {
13057
13076
  fileName: _jsxFileName$b,
13058
- lineNumber: 85
13077
+ lineNumber: 92
13059
13078
  }
13060
13079
  }, subNodes));
13061
13080
  } else {
@@ -13065,7 +13084,7 @@ const renderChildren = (layout, value, onChange, rootRenderChildren, parentNode)
13065
13084
  __self: undefined,
13066
13085
  __source: {
13067
13086
  fileName: _jsxFileName$b,
13068
- lineNumber: 90
13087
+ lineNumber: 97
13069
13088
  }
13070
13089
  }));
13071
13090
  }
@@ -13083,7 +13102,7 @@ const MaskContainer = withStyles$5(() => ({
13083
13102
  __self: undefined,
13084
13103
  __source: {
13085
13104
  fileName: _jsxFileName$b,
13086
- lineNumber: 102
13105
+ lineNumber: 109
13087
13106
  }
13088
13107
  }, props.children));
13089
13108
  class Mask extends React$c.Component {
@@ -13115,7 +13134,7 @@ class Mask extends React$c.Component {
13115
13134
  __self: this,
13116
13135
  __source: {
13117
13136
  fileName: _jsxFileName$b,
13118
- lineNumber: 124
13137
+ lineNumber: 131
13119
13138
  }
13120
13139
  }, children);
13121
13140
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "3.12.1",
7
+ "version": "3.12.4",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -14,7 +14,7 @@
14
14
  "@material-ui/core": "^3.9.2",
15
15
  "@pie-framework/pie-player-events": "^0.1.0",
16
16
  "@pie-lib/correct-answer-toggle": "^2.3.34",
17
- "@pie-lib/mask-markup": "^1.11.4",
17
+ "@pie-lib/mask-markup": "^1.12.0",
18
18
  "@pie-lib/math-rendering": "^2.3.12",
19
19
  "@pie-lib/render-ui": "^4.12.4",
20
20
  "classnames": "^2.2.5",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "author": "",
27
27
  "license": "ISC",
28
- "gitHead": "820dc9994e5f621018ca2c262f9a999996fd2079",
28
+ "gitHead": "7b61c8a15ceae75e9e6db5d465abfb6d22c34f30",
29
29
  "main": "lib/index.js",
30
30
  "module": "src/index.js",
31
31
  "exports": {