@pie-element/math-templated 3.2.3-next.3 → 3.3.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 +16 -0
- package/configure/CHANGELOG.md +16 -0
- package/configure/lib/response.js +7 -0
- package/configure/lib/response.js.map +1 -1
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +11 -0
- package/controller/package.json +2 -2
- package/module/configure.js +245 -197
- package/module/element.js +35 -18
- package/module/manifest.json +2 -2
- package/module/print.js +35 -18
- package/package.json +3 -3
package/module/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.2.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.2.0/module/index.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
5
5
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
@@ -29436,7 +29436,7 @@ TexError$1.default = TexError;
|
|
|
29436
29436
|
}
|
|
29437
29437
|
},
|
|
29438
29438
|
loader: {
|
|
29439
|
-
load: ["input/mml"
|
|
29439
|
+
load: ["input/mml"],
|
|
29440
29440
|
preLoad: function preLoad() {},
|
|
29441
29441
|
failed: function failed(error) {
|
|
29442
29442
|
return console.log(("MathJax(").concat(error["package"] || '?', "): ").concat(error.message));
|
|
@@ -73010,7 +73010,7 @@ var _interopRequireDefault$3c = interopRequireDefault.exports;
|
|
|
73010
73010
|
Object.defineProperty(color$1, "__esModule", {
|
|
73011
73011
|
value: true
|
|
73012
73012
|
});
|
|
73013
|
-
color$1.white = color$1.v = color$1.transparent = color$1.text = color$1.secondaryText = color$1.secondaryLight = color$1.secondaryDark = color$1.secondaryBackground = color$1.secondary = color$1.primaryText = color$1.primaryLight = color$1.primaryDark = color$1.primary = color$1.missingWithIcon = color$1.missing = color$1.incorrectWithIcon = color$1.incorrectSecondary = color$1.incorrect = color$1.disabledSecondary = color$1.disabled = color$1.defaults = color$1.correctWithIcon = color$1.correctSecondary = color$1.correct = color$1.borderLight = color$1.borderDark = color$1.border = color$1.black = color$1.backgroundDark = color$1.background = void 0;
|
|
73013
|
+
color$1.white = color$1.v = color$1.transparent = color$1.text = color$1.tertiaryLight = color$1.tertiary = color$1.secondaryText = color$1.secondaryLight = color$1.secondaryDark = color$1.secondaryBackground = color$1.secondary = color$1.primaryText = color$1.primaryLight = color$1.primaryDark = color$1.primary = color$1.missingWithIcon = color$1.missing = color$1.incorrectWithIcon = color$1.incorrectSecondary = color$1.incorrect = color$1.disabledSecondary = color$1.disabled = color$1.defaults = color$1.correctWithIcon = color$1.correctSecondary = color$1.correct = color$1.borderLight = color$1.borderDark = color$1.border = color$1.black = color$1.backgroundDark = color$1.background = void 0;
|
|
73014
73014
|
var _green = _interopRequireDefault$3c(green$1);
|
|
73015
73015
|
var _orange = _interopRequireDefault$3c(orange$1);
|
|
73016
73016
|
var _pink = _interopRequireDefault$3c(pink$1);
|
|
@@ -73034,6 +73034,8 @@ var defaults = {
|
|
|
73034
73034
|
SECONDARY: _pink["default"].A400,
|
|
73035
73035
|
SECONDARY_LIGHT: _pink["default"][200],
|
|
73036
73036
|
SECONDARY_DARK: _pink["default"][900],
|
|
73037
|
+
TERTIARY: '#146EB3',
|
|
73038
|
+
TERTIARY_LIGHT: '#D0E2F0',
|
|
73037
73039
|
BACKGROUND: 'rgba(255,255,255,0)',
|
|
73038
73040
|
BACKGROUND_DARK: '#ECEDF1',
|
|
73039
73041
|
SECONDARY_BACKGROUND: 'rgba(241,241,241,1)',
|
|
@@ -73147,6 +73149,14 @@ var secondaryBackground = function secondaryBackground() {
|
|
|
73147
73149
|
return pv('secondary-background', defaults.SECONDARY_BACKGROUND);
|
|
73148
73150
|
};
|
|
73149
73151
|
color$1.secondaryBackground = secondaryBackground;
|
|
73152
|
+
var tertiary = function tertiary() {
|
|
73153
|
+
return pv('tertiary', defaults.TERTIARY);
|
|
73154
|
+
};
|
|
73155
|
+
color$1.tertiary = tertiary;
|
|
73156
|
+
var tertiaryLight = function tertiaryLight() {
|
|
73157
|
+
return pv('tertiary-light', defaults.TERTIARY_LIGHT);
|
|
73158
|
+
};
|
|
73159
|
+
color$1.tertiaryLight = tertiaryLight;
|
|
73150
73160
|
var border = function border() {
|
|
73151
73161
|
return pv('border', defaults.BORDER);
|
|
73152
73162
|
};
|
|
@@ -76813,9 +76823,9 @@ const require$$11$r = _dll_prop_types;
|
|
|
76813
76823
|
color: theme.palette.common.black
|
|
76814
76824
|
}
|
|
76815
76825
|
},
|
|
76816
|
-
'&:not(.MathJax)
|
|
76826
|
+
'&:not(.MathJax) table td, &:not(.MathJax) table th': {
|
|
76817
76827
|
padding: '.6em 1em',
|
|
76818
|
-
textAlign: '
|
|
76828
|
+
textAlign: 'left'
|
|
76819
76829
|
},
|
|
76820
76830
|
'&:not(.MathJax) > table td > p.kds-indent': {
|
|
76821
76831
|
textAlign: 'initial'
|
|
@@ -81051,18 +81061,23 @@ const require$$17$2 = _dll_classnames;
|
|
|
81051
81061
|
}, {
|
|
81052
81062
|
key: "updateDimensions",
|
|
81053
81063
|
value: function updateDimensions() {
|
|
81054
|
-
|
|
81055
|
-
|
|
81056
|
-
|
|
81057
|
-
|
|
81058
|
-
|
|
81059
|
-
|
|
81064
|
+
if (this.spanRef && this.rootRef) {
|
|
81065
|
+
this.rootRef.style.width = 'auto';
|
|
81066
|
+
var width = this.spanRef.offsetWidth || 0;
|
|
81067
|
+
var height = this.spanRef.offsetHeight || 0;
|
|
81068
|
+
var widthWithPadding = width + 24;
|
|
81069
|
+
var responseAreaWidth = parseFloat(this.props.emptyResponseAreaWidth) || 0;
|
|
81070
|
+
var responseAreaHeight = parseFloat(this.props.emptyResponseAreaHeight) || 0;
|
|
81071
|
+
var adjustedWidth = widthWithPadding <= responseAreaWidth ? responseAreaWidth : widthWithPadding;
|
|
81072
|
+
var adjustedHeight = height <= responseAreaHeight ? responseAreaHeight : height;
|
|
81060
81073
|
this.setState(function (prevState) {
|
|
81061
81074
|
return {
|
|
81062
|
-
width:
|
|
81063
|
-
height:
|
|
81075
|
+
width: adjustedWidth > responseAreaWidth ? adjustedWidth : prevState.width,
|
|
81076
|
+
height: adjustedHeight > responseAreaHeight ? adjustedHeight : prevState.height
|
|
81064
81077
|
};
|
|
81065
81078
|
});
|
|
81079
|
+
this.rootRef.style.width = ("").concat(adjustedWidth, "px");
|
|
81080
|
+
this.rootRef.style.height = ("").concat(adjustedHeight, "px");
|
|
81066
81081
|
}
|
|
81067
81082
|
}
|
|
81068
81083
|
}, {
|
|
@@ -81077,13 +81092,15 @@ const require$$17$2 = _dll_classnames;
|
|
|
81077
81092
|
}, {
|
|
81078
81093
|
key: "getRootDimensions",
|
|
81079
81094
|
value: function getRootDimensions() {
|
|
81095
|
+
var responseAreaWidth = !isNaN(parseFloat(this.props.emptyResponseAreaWidth)) ? parseFloat(this.props.emptyResponseAreaWidth) : 0;
|
|
81096
|
+
var responseAreaHeight = !isNaN(parseFloat(this.props.emptyResponseAreaHeight)) ? parseFloat(this.props.emptyResponseAreaHeight) : 0;
|
|
81080
81097
|
var rootStyle = {
|
|
81081
|
-
height: this.state.height ||
|
|
81082
|
-
width: this.state.width ||
|
|
81098
|
+
height: this.state.height || responseAreaHeight,
|
|
81099
|
+
width: this.state.width || responseAreaWidth
|
|
81083
81100
|
};
|
|
81084
|
-
return _objectSpread(_objectSpread(_objectSpread({}, rootStyle),
|
|
81101
|
+
return _objectSpread(_objectSpread(_objectSpread({}, rootStyle), responseAreaWidth ? {} : {
|
|
81085
81102
|
minWidth: 90
|
|
81086
|
-
}),
|
|
81103
|
+
}), responseAreaHeight ? {} : {
|
|
81087
81104
|
minHeight: 32
|
|
81088
81105
|
});
|
|
81089
81106
|
}
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.2.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.2.0/module/index.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
5
5
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
@@ -29399,7 +29399,7 @@ TexError$1.default = TexError;
|
|
|
29399
29399
|
}
|
|
29400
29400
|
},
|
|
29401
29401
|
loader: {
|
|
29402
|
-
load: ["input/mml"
|
|
29402
|
+
load: ["input/mml"],
|
|
29403
29403
|
preLoad: function preLoad() {},
|
|
29404
29404
|
failed: function failed(error) {
|
|
29405
29405
|
return console.log(("MathJax(").concat(error["package"] || '?', "): ").concat(error.message));
|
|
@@ -72973,7 +72973,7 @@ var _interopRequireDefault$3c = interopRequireDefault.exports;
|
|
|
72973
72973
|
Object.defineProperty(color$1, "__esModule", {
|
|
72974
72974
|
value: true
|
|
72975
72975
|
});
|
|
72976
|
-
color$1.white = color$1.v = color$1.transparent = color$1.text = color$1.secondaryText = color$1.secondaryLight = color$1.secondaryDark = color$1.secondaryBackground = color$1.secondary = color$1.primaryText = color$1.primaryLight = color$1.primaryDark = color$1.primary = color$1.missingWithIcon = color$1.missing = color$1.incorrectWithIcon = color$1.incorrectSecondary = color$1.incorrect = color$1.disabledSecondary = color$1.disabled = color$1.defaults = color$1.correctWithIcon = color$1.correctSecondary = color$1.correct = color$1.borderLight = color$1.borderDark = color$1.border = color$1.black = color$1.backgroundDark = color$1.background = void 0;
|
|
72976
|
+
color$1.white = color$1.v = color$1.transparent = color$1.text = color$1.tertiaryLight = color$1.tertiary = color$1.secondaryText = color$1.secondaryLight = color$1.secondaryDark = color$1.secondaryBackground = color$1.secondary = color$1.primaryText = color$1.primaryLight = color$1.primaryDark = color$1.primary = color$1.missingWithIcon = color$1.missing = color$1.incorrectWithIcon = color$1.incorrectSecondary = color$1.incorrect = color$1.disabledSecondary = color$1.disabled = color$1.defaults = color$1.correctWithIcon = color$1.correctSecondary = color$1.correct = color$1.borderLight = color$1.borderDark = color$1.border = color$1.black = color$1.backgroundDark = color$1.background = void 0;
|
|
72977
72977
|
var _green = _interopRequireDefault$3c(green$1);
|
|
72978
72978
|
var _orange = _interopRequireDefault$3c(orange$1);
|
|
72979
72979
|
var _pink = _interopRequireDefault$3c(pink$1);
|
|
@@ -72997,6 +72997,8 @@ var defaults = {
|
|
|
72997
72997
|
SECONDARY: _pink["default"].A400,
|
|
72998
72998
|
SECONDARY_LIGHT: _pink["default"][200],
|
|
72999
72999
|
SECONDARY_DARK: _pink["default"][900],
|
|
73000
|
+
TERTIARY: '#146EB3',
|
|
73001
|
+
TERTIARY_LIGHT: '#D0E2F0',
|
|
73000
73002
|
BACKGROUND: 'rgba(255,255,255,0)',
|
|
73001
73003
|
BACKGROUND_DARK: '#ECEDF1',
|
|
73002
73004
|
SECONDARY_BACKGROUND: 'rgba(241,241,241,1)',
|
|
@@ -73110,6 +73112,14 @@ var secondaryBackground = function secondaryBackground() {
|
|
|
73110
73112
|
return pv('secondary-background', defaults.SECONDARY_BACKGROUND);
|
|
73111
73113
|
};
|
|
73112
73114
|
color$1.secondaryBackground = secondaryBackground;
|
|
73115
|
+
var tertiary = function tertiary() {
|
|
73116
|
+
return pv('tertiary', defaults.TERTIARY);
|
|
73117
|
+
};
|
|
73118
|
+
color$1.tertiary = tertiary;
|
|
73119
|
+
var tertiaryLight = function tertiaryLight() {
|
|
73120
|
+
return pv('tertiary-light', defaults.TERTIARY_LIGHT);
|
|
73121
|
+
};
|
|
73122
|
+
color$1.tertiaryLight = tertiaryLight;
|
|
73113
73123
|
var border = function border() {
|
|
73114
73124
|
return pv('border', defaults.BORDER);
|
|
73115
73125
|
};
|
|
@@ -76776,9 +76786,9 @@ const require$$11$r = _dll_prop_types;
|
|
|
76776
76786
|
color: theme.palette.common.black
|
|
76777
76787
|
}
|
|
76778
76788
|
},
|
|
76779
|
-
'&:not(.MathJax)
|
|
76789
|
+
'&:not(.MathJax) table td, &:not(.MathJax) table th': {
|
|
76780
76790
|
padding: '.6em 1em',
|
|
76781
|
-
textAlign: '
|
|
76791
|
+
textAlign: 'left'
|
|
76782
76792
|
},
|
|
76783
76793
|
'&:not(.MathJax) > table td > p.kds-indent': {
|
|
76784
76794
|
textAlign: 'initial'
|
|
@@ -81014,18 +81024,23 @@ const require$$17$2 = _dll_classnames;
|
|
|
81014
81024
|
}, {
|
|
81015
81025
|
key: "updateDimensions",
|
|
81016
81026
|
value: function updateDimensions() {
|
|
81017
|
-
|
|
81018
|
-
|
|
81019
|
-
|
|
81020
|
-
|
|
81021
|
-
|
|
81022
|
-
|
|
81027
|
+
if (this.spanRef && this.rootRef) {
|
|
81028
|
+
this.rootRef.style.width = 'auto';
|
|
81029
|
+
var width = this.spanRef.offsetWidth || 0;
|
|
81030
|
+
var height = this.spanRef.offsetHeight || 0;
|
|
81031
|
+
var widthWithPadding = width + 24;
|
|
81032
|
+
var responseAreaWidth = parseFloat(this.props.emptyResponseAreaWidth) || 0;
|
|
81033
|
+
var responseAreaHeight = parseFloat(this.props.emptyResponseAreaHeight) || 0;
|
|
81034
|
+
var adjustedWidth = widthWithPadding <= responseAreaWidth ? responseAreaWidth : widthWithPadding;
|
|
81035
|
+
var adjustedHeight = height <= responseAreaHeight ? responseAreaHeight : height;
|
|
81023
81036
|
this.setState(function (prevState) {
|
|
81024
81037
|
return {
|
|
81025
|
-
width:
|
|
81026
|
-
height:
|
|
81038
|
+
width: adjustedWidth > responseAreaWidth ? adjustedWidth : prevState.width,
|
|
81039
|
+
height: adjustedHeight > responseAreaHeight ? adjustedHeight : prevState.height
|
|
81027
81040
|
};
|
|
81028
81041
|
});
|
|
81042
|
+
this.rootRef.style.width = ("").concat(adjustedWidth, "px");
|
|
81043
|
+
this.rootRef.style.height = ("").concat(adjustedHeight, "px");
|
|
81029
81044
|
}
|
|
81030
81045
|
}
|
|
81031
81046
|
}, {
|
|
@@ -81040,13 +81055,15 @@ const require$$17$2 = _dll_classnames;
|
|
|
81040
81055
|
}, {
|
|
81041
81056
|
key: "getRootDimensions",
|
|
81042
81057
|
value: function getRootDimensions() {
|
|
81058
|
+
var responseAreaWidth = !isNaN(parseFloat(this.props.emptyResponseAreaWidth)) ? parseFloat(this.props.emptyResponseAreaWidth) : 0;
|
|
81059
|
+
var responseAreaHeight = !isNaN(parseFloat(this.props.emptyResponseAreaHeight)) ? parseFloat(this.props.emptyResponseAreaHeight) : 0;
|
|
81043
81060
|
var rootStyle = {
|
|
81044
|
-
height: this.state.height ||
|
|
81045
|
-
width: this.state.width ||
|
|
81061
|
+
height: this.state.height || responseAreaHeight,
|
|
81062
|
+
width: this.state.width || responseAreaWidth
|
|
81046
81063
|
};
|
|
81047
|
-
return _objectSpread(_objectSpread(_objectSpread({}, rootStyle),
|
|
81064
|
+
return _objectSpread(_objectSpread(_objectSpread({}, rootStyle), responseAreaWidth ? {} : {
|
|
81048
81065
|
minWidth: 90
|
|
81049
|
-
}),
|
|
81066
|
+
}), responseAreaHeight ? {} : {
|
|
81050
81067
|
minHeight: 32
|
|
81051
81068
|
});
|
|
81052
81069
|
}
|
package/package.json
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "3.
|
|
7
|
+
"version": "3.3.0",
|
|
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": "2.
|
|
12
|
+
"@pie-lib/pie-toolbox": "2.2.0",
|
|
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": "
|
|
19
|
+
"gitHead": "20cc12d3d06ad5318bfa4c6994cf7c7614dfed2f",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|