@pie-element/explicit-constructed-response 7.1.2-next.9 → 7.1.2
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 +17 -0
- package/configure/CHANGELOG.md +16 -0
- package/configure/package.json +2 -5
- package/controller/CHANGELOG.md +16 -0
- package/controller/package.json +2 -2
- package/module/configure.js +2 -2
- package/module/element.js +144 -4
- package/module/manifest.json +2 -2
- package/module/print.js +144 -4
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response@7.1.1...@pie-element/explicit-constructed-response@7.1.2) (2024-10-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* added complexjs as dependency [PD-4200] ([da393d5](https://github.com/pie-framework/pie-elements/commit/da393d5ae8ef52f17b47ccf32967410a9263180e))
|
|
12
|
+
* added resolutions in controller as well [PD-4200] ([020edc5](https://github.com/pie-framework/pie-elements/commit/020edc5f0bb5de6bf8f344efd0a3b9b0b16b9dc7))
|
|
13
|
+
* added resolutions to every package [PD-4200] ([480bed5](https://github.com/pie-framework/pie-elements/commit/480bed5eddfc91ec9dbc7ca7e3f6d09b2a199e7d))
|
|
14
|
+
* reverting changes since the issue is fixed in the latest complex.js [PD-4200] ([42c9f21](https://github.com/pie-framework/pie-elements/commit/42c9f216c4d29b051156489beb43fa7093667eb7))
|
|
15
|
+
* update pie toolbox ([ba98798](https://github.com/pie-framework/pie-elements/commit/ba987984ebc2f856950611874436cf148a9a3963))
|
|
16
|
+
* update pie-lib/pie-toolbox PD-4200 ([a41a620](https://github.com/pie-framework/pie-elements/commit/a41a62036afe6aa8ef70493900c08875cff8eec2))
|
|
17
|
+
* update pie-lib/pie-toolbox PD-4241 ([b24d439](https://github.com/pie-framework/pie-elements/commit/b24d43945457792d403d0da62ce3e4b5b898ca46))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [7.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response@7.1.0...@pie-element/explicit-constructed-response@7.1.1) (2024-10-03)
|
|
7
24
|
|
|
8
25
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.0.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-configure@7.0.3...@pie-element/explicit-constructed-response-configure@7.0.4) (2024-10-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* added complexjs as dependency [PD-4200] ([da393d5](https://github.com/pie-framework/pie-elements/commit/da393d5ae8ef52f17b47ccf32967410a9263180e))
|
|
12
|
+
* added resolutions to every package [PD-4200] ([480bed5](https://github.com/pie-framework/pie-elements/commit/480bed5eddfc91ec9dbc7ca7e3f6d09b2a199e7d))
|
|
13
|
+
* reverting changes since the issue is fixed in the latest complex.js [PD-4200] ([42c9f21](https://github.com/pie-framework/pie-elements/commit/42c9f216c4d29b051156489beb43fa7093667eb7))
|
|
14
|
+
* update pie toolbox ([ba98798](https://github.com/pie-framework/pie-elements/commit/ba987984ebc2f856950611874436cf148a9a3963))
|
|
15
|
+
* update pie-lib/pie-toolbox PD-4200 ([a41a620](https://github.com/pie-framework/pie-elements/commit/a41a62036afe6aa8ef70493900c08875cff8eec2))
|
|
16
|
+
* update pie-lib/pie-toolbox PD-4241 ([b24d439](https://github.com/pie-framework/pie-elements/commit/b24d43945457792d403d0da62ce3e4b5b898ca46))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [7.0.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-configure@7.0.2...@pie-element/explicit-constructed-response-configure@7.0.3) (2024-10-03)
|
|
7
23
|
|
|
8
24
|
|
package/configure/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/explicit-constructed-response-configure",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"modue": "src/index.js",
|
|
@@ -8,15 +8,12 @@
|
|
|
8
8
|
"@material-ui/core": "^3.9.2",
|
|
9
9
|
"@material-ui/icons": "^3.0.1",
|
|
10
10
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/pie-toolbox": "2.0.
|
|
11
|
+
"@pie-lib/pie-toolbox": "2.0.13",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"debug": "^3.1.0",
|
|
14
14
|
"lodash": "^4.17.15",
|
|
15
15
|
"prop-types": "^15.6.2",
|
|
16
16
|
"react": "^16.8.1",
|
|
17
17
|
"react-dom": "^16.8.1"
|
|
18
|
-
},
|
|
19
|
-
"resolutions": {
|
|
20
|
-
"complex.js": "2.1.1"
|
|
21
18
|
}
|
|
22
19
|
}
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.0.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-controller@5.0.3...@pie-element/explicit-constructed-response-controller@5.0.4) (2024-10-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* added complexjs as dependency [PD-4200] ([da393d5](https://github.com/pie-framework/pie-elements/commit/da393d5ae8ef52f17b47ccf32967410a9263180e))
|
|
12
|
+
* added resolutions in controller as well [PD-4200] ([020edc5](https://github.com/pie-framework/pie-elements/commit/020edc5f0bb5de6bf8f344efd0a3b9b0b16b9dc7))
|
|
13
|
+
* reverting changes since the issue is fixed in the latest complex.js [PD-4200] ([42c9f21](https://github.com/pie-framework/pie-elements/commit/42c9f216c4d29b051156489beb43fa7093667eb7))
|
|
14
|
+
* update pie toolbox ([ba98798](https://github.com/pie-framework/pie-elements/commit/ba987984ebc2f856950611874436cf148a9a3963))
|
|
15
|
+
* update pie-lib/pie-toolbox PD-4200 ([a41a620](https://github.com/pie-framework/pie-elements/commit/a41a62036afe6aa8ef70493900c08875cff8eec2))
|
|
16
|
+
* update pie-lib/pie-toolbox PD-4241 ([b24d439](https://github.com/pie-framework/pie-elements/commit/b24d43945457792d403d0da62ce3e4b5b898ca46))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [5.0.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/explicit-constructed-response-controller@5.0.2...@pie-element/explicit-constructed-response-controller@5.0.3) (2024-10-03)
|
|
7
23
|
|
|
8
24
|
|
package/controller/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/explicit-constructed-response-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.4",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"author": "",
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@pie-lib/pie-toolbox": "2.0.
|
|
11
|
+
"@pie-lib/pie-toolbox": "2.0.13",
|
|
12
12
|
"debug": "^3.1.0",
|
|
13
13
|
"lodash": "^4.17.15",
|
|
14
14
|
"type-of": "^2.0.1"
|
package/module/configure.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.11/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/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) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
package/module/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.11/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/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) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -26171,6 +26171,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
26171
26171
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
26172
26172
|
})(SerializedMmlVisitor);
|
|
26173
26173
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
26174
|
+
var TexError$1 = {};
|
|
26175
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
26176
|
+
value: true
|
|
26177
|
+
});
|
|
26178
|
+
var TexError = (function () {
|
|
26179
|
+
function TexError(id, message) {
|
|
26180
|
+
var rest = [];
|
|
26181
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
26182
|
+
rest[_i - 2] = arguments[_i];
|
|
26183
|
+
}
|
|
26184
|
+
this.id = id;
|
|
26185
|
+
this.message = TexError.processString(message, rest);
|
|
26186
|
+
}
|
|
26187
|
+
TexError.processString = function (str, args) {
|
|
26188
|
+
var parts = str.split(TexError.pattern);
|
|
26189
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
26190
|
+
var c = parts[i].charAt(0);
|
|
26191
|
+
if (c >= '0' && c <= '9') {
|
|
26192
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
26193
|
+
if (typeof parts[i] === 'number') {
|
|
26194
|
+
parts[i] = parts[i].toString();
|
|
26195
|
+
}
|
|
26196
|
+
} else if (c === '{') {
|
|
26197
|
+
c = parts[i].substr(1);
|
|
26198
|
+
if (c >= '0' && c <= '9') {
|
|
26199
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
26200
|
+
if (typeof parts[i] === 'number') {
|
|
26201
|
+
parts[i] = parts[i].toString();
|
|
26202
|
+
}
|
|
26203
|
+
} else {
|
|
26204
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
26205
|
+
if (match) {
|
|
26206
|
+
parts[i] = '%' + parts[i];
|
|
26207
|
+
}
|
|
26208
|
+
}
|
|
26209
|
+
}
|
|
26210
|
+
if (parts[i] == null) {
|
|
26211
|
+
parts[i] = '???';
|
|
26212
|
+
}
|
|
26213
|
+
}
|
|
26214
|
+
return parts.join('');
|
|
26215
|
+
};
|
|
26216
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
26217
|
+
return TexError;
|
|
26218
|
+
})();
|
|
26219
|
+
TexError$1.default = TexError;
|
|
26174
26220
|
(function (exports) {
|
|
26175
26221
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
26176
26222
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -26180,6 +26226,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26180
26226
|
var _typeof2 = _interopRequireDefault(_typeof$d.exports);
|
|
26181
26227
|
var _normalization = normalization;
|
|
26182
26228
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
26229
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
26183
26230
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
26184
26231
|
var toMMl = function toMMl(node) {
|
|
26185
26232
|
return visitor.visitTree(node);
|
|
@@ -26265,6 +26312,15 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26265
26312
|
}
|
|
26266
26313
|
});
|
|
26267
26314
|
};
|
|
26315
|
+
var renderContentsWithMathJax = function renderContentsWithMathJax(el) {
|
|
26316
|
+
if (el instanceof Array) {
|
|
26317
|
+
el.forEach(function (elNode) {
|
|
26318
|
+
return renderContentWithMathJax(elNode);
|
|
26319
|
+
});
|
|
26320
|
+
} else {
|
|
26321
|
+
renderContentWithMathJax(el);
|
|
26322
|
+
}
|
|
26323
|
+
};
|
|
26268
26324
|
var renderContentWithMathJax = function renderContentWithMathJax(executeOn) {
|
|
26269
26325
|
executeOn = executeOn || document.body;
|
|
26270
26326
|
if (!(executeOn instanceof HTMLElement)) return;
|
|
@@ -26294,10 +26350,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26294
26350
|
});
|
|
26295
26351
|
}
|
|
26296
26352
|
};
|
|
26353
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
26354
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
26355
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
26356
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
26357
|
+
var RequireMethods = {
|
|
26358
|
+
Require: function Require(parser, name) {
|
|
26359
|
+
var required = parser.GetArgument(name);
|
|
26360
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
26361
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
26362
|
+
}
|
|
26363
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
26364
|
+
required = requireMap[required];
|
|
26365
|
+
}
|
|
26366
|
+
RequireLoad(parser, required);
|
|
26367
|
+
}
|
|
26368
|
+
};
|
|
26369
|
+
new CommandMap("require", {
|
|
26370
|
+
require: "Require"
|
|
26371
|
+
}, RequireMethods);
|
|
26372
|
+
MathJax.Callback = function (args) {
|
|
26373
|
+
if (Array.isArray(args)) {
|
|
26374
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
26375
|
+
return args[0];
|
|
26376
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
26377
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
26378
|
+
} else if (typeof args[0] === "function") {
|
|
26379
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
26380
|
+
} else if (typeof args[1] === "function") {
|
|
26381
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
26382
|
+
}
|
|
26383
|
+
} else if (typeof args === "function") {
|
|
26384
|
+
return args;
|
|
26385
|
+
}
|
|
26386
|
+
throw Error("Can't make callback from given data");
|
|
26387
|
+
};
|
|
26388
|
+
MathJax.Hub = {
|
|
26389
|
+
Queue: function Queue() {
|
|
26390
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
26391
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
26392
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
26393
|
+
}
|
|
26394
|
+
return MathJax.startup.promise;
|
|
26395
|
+
},
|
|
26396
|
+
Typeset: function Typeset(elements, callback) {
|
|
26397
|
+
var promise = MathJax.typesetPromise(elements);
|
|
26398
|
+
if (callback) {
|
|
26399
|
+
promise = promise.then(callback);
|
|
26400
|
+
}
|
|
26401
|
+
return promise;
|
|
26402
|
+
},
|
|
26403
|
+
Register: {
|
|
26404
|
+
MessageHook: function MessageHook() {
|
|
26405
|
+
console.log("MessageHooks are not supported in version 3");
|
|
26406
|
+
},
|
|
26407
|
+
StartupHook: function StartupHook() {
|
|
26408
|
+
console.log("StartupHooks are not supported in version 3");
|
|
26409
|
+
},
|
|
26410
|
+
LoadHook: function LoadHook() {
|
|
26411
|
+
console.log("LoadHooks are not supported in version 3");
|
|
26412
|
+
}
|
|
26413
|
+
},
|
|
26414
|
+
Config: function Config() {
|
|
26415
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
26416
|
+
}
|
|
26417
|
+
};
|
|
26418
|
+
};
|
|
26297
26419
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
26298
26420
|
if (window.mathjaxLoadedP) {
|
|
26299
26421
|
return;
|
|
26300
26422
|
}
|
|
26423
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
26301
26424
|
var texConfig = {
|
|
26302
26425
|
macros: {
|
|
26303
26426
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -26307,11 +26430,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26307
26430
|
},
|
|
26308
26431
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
26309
26432
|
};
|
|
26433
|
+
if (PreviousMathJaxIsUsed) {
|
|
26434
|
+
texConfig.autoload = {
|
|
26435
|
+
color: [],
|
|
26436
|
+
colorv2: ["color"]
|
|
26437
|
+
};
|
|
26438
|
+
}
|
|
26310
26439
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
26311
26440
|
window.MathJax = {
|
|
26312
26441
|
startup: {
|
|
26442
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
26443
|
+
AMSmath: "ams",
|
|
26444
|
+
AMSsymbols: "ams",
|
|
26445
|
+
AMScd: "amscd",
|
|
26446
|
+
HTML: "html",
|
|
26447
|
+
noErrors: "noerrors",
|
|
26448
|
+
noUndefined: "noundefined"
|
|
26449
|
+
} : {},
|
|
26313
26450
|
typeset: false,
|
|
26314
26451
|
ready: function ready() {
|
|
26452
|
+
if (PreviousMathJaxIsUsed) {
|
|
26453
|
+
convertMathJax2ToMathJax3();
|
|
26454
|
+
}
|
|
26315
26455
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
26316
26456
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
26317
26457
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
|
@@ -26378,11 +26518,11 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26378
26518
|
var executeOn = document.body;
|
|
26379
26519
|
if (!usedForMmlOutput) {
|
|
26380
26520
|
if (window.mathjaxLoadedComplete) {
|
|
26381
|
-
|
|
26521
|
+
renderContentsWithMathJax(el);
|
|
26382
26522
|
} else if (window.mathjaxLoadedP) {
|
|
26383
26523
|
window.mathjaxLoadedP.then(function () {
|
|
26384
26524
|
window.mathjaxLoadedComplete = true;
|
|
26385
|
-
|
|
26525
|
+
renderContentsWithMathJax(el);
|
|
26386
26526
|
})["catch"](function (error) {
|
|
26387
26527
|
return console.error("Error in initializing MathJax:", error);
|
|
26388
26528
|
});
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.11/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/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) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -26134,6 +26134,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
26134
26134
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
26135
26135
|
})(SerializedMmlVisitor);
|
|
26136
26136
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
26137
|
+
var TexError$1 = {};
|
|
26138
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
26139
|
+
value: true
|
|
26140
|
+
});
|
|
26141
|
+
var TexError = (function () {
|
|
26142
|
+
function TexError(id, message) {
|
|
26143
|
+
var rest = [];
|
|
26144
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
26145
|
+
rest[_i - 2] = arguments[_i];
|
|
26146
|
+
}
|
|
26147
|
+
this.id = id;
|
|
26148
|
+
this.message = TexError.processString(message, rest);
|
|
26149
|
+
}
|
|
26150
|
+
TexError.processString = function (str, args) {
|
|
26151
|
+
var parts = str.split(TexError.pattern);
|
|
26152
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
26153
|
+
var c = parts[i].charAt(0);
|
|
26154
|
+
if (c >= '0' && c <= '9') {
|
|
26155
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
26156
|
+
if (typeof parts[i] === 'number') {
|
|
26157
|
+
parts[i] = parts[i].toString();
|
|
26158
|
+
}
|
|
26159
|
+
} else if (c === '{') {
|
|
26160
|
+
c = parts[i].substr(1);
|
|
26161
|
+
if (c >= '0' && c <= '9') {
|
|
26162
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
26163
|
+
if (typeof parts[i] === 'number') {
|
|
26164
|
+
parts[i] = parts[i].toString();
|
|
26165
|
+
}
|
|
26166
|
+
} else {
|
|
26167
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
26168
|
+
if (match) {
|
|
26169
|
+
parts[i] = '%' + parts[i];
|
|
26170
|
+
}
|
|
26171
|
+
}
|
|
26172
|
+
}
|
|
26173
|
+
if (parts[i] == null) {
|
|
26174
|
+
parts[i] = '???';
|
|
26175
|
+
}
|
|
26176
|
+
}
|
|
26177
|
+
return parts.join('');
|
|
26178
|
+
};
|
|
26179
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
26180
|
+
return TexError;
|
|
26181
|
+
})();
|
|
26182
|
+
TexError$1.default = TexError;
|
|
26137
26183
|
(function (exports) {
|
|
26138
26184
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
26139
26185
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -26143,6 +26189,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26143
26189
|
var _typeof2 = _interopRequireDefault(_typeof$d.exports);
|
|
26144
26190
|
var _normalization = normalization;
|
|
26145
26191
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
26192
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
26146
26193
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
26147
26194
|
var toMMl = function toMMl(node) {
|
|
26148
26195
|
return visitor.visitTree(node);
|
|
@@ -26228,6 +26275,15 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26228
26275
|
}
|
|
26229
26276
|
});
|
|
26230
26277
|
};
|
|
26278
|
+
var renderContentsWithMathJax = function renderContentsWithMathJax(el) {
|
|
26279
|
+
if (el instanceof Array) {
|
|
26280
|
+
el.forEach(function (elNode) {
|
|
26281
|
+
return renderContentWithMathJax(elNode);
|
|
26282
|
+
});
|
|
26283
|
+
} else {
|
|
26284
|
+
renderContentWithMathJax(el);
|
|
26285
|
+
}
|
|
26286
|
+
};
|
|
26231
26287
|
var renderContentWithMathJax = function renderContentWithMathJax(executeOn) {
|
|
26232
26288
|
executeOn = executeOn || document.body;
|
|
26233
26289
|
if (!(executeOn instanceof HTMLElement)) return;
|
|
@@ -26257,10 +26313,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26257
26313
|
});
|
|
26258
26314
|
}
|
|
26259
26315
|
};
|
|
26316
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
26317
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
26318
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
26319
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
26320
|
+
var RequireMethods = {
|
|
26321
|
+
Require: function Require(parser, name) {
|
|
26322
|
+
var required = parser.GetArgument(name);
|
|
26323
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
26324
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
26325
|
+
}
|
|
26326
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
26327
|
+
required = requireMap[required];
|
|
26328
|
+
}
|
|
26329
|
+
RequireLoad(parser, required);
|
|
26330
|
+
}
|
|
26331
|
+
};
|
|
26332
|
+
new CommandMap("require", {
|
|
26333
|
+
require: "Require"
|
|
26334
|
+
}, RequireMethods);
|
|
26335
|
+
MathJax.Callback = function (args) {
|
|
26336
|
+
if (Array.isArray(args)) {
|
|
26337
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
26338
|
+
return args[0];
|
|
26339
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
26340
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
26341
|
+
} else if (typeof args[0] === "function") {
|
|
26342
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
26343
|
+
} else if (typeof args[1] === "function") {
|
|
26344
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
26345
|
+
}
|
|
26346
|
+
} else if (typeof args === "function") {
|
|
26347
|
+
return args;
|
|
26348
|
+
}
|
|
26349
|
+
throw Error("Can't make callback from given data");
|
|
26350
|
+
};
|
|
26351
|
+
MathJax.Hub = {
|
|
26352
|
+
Queue: function Queue() {
|
|
26353
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
26354
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
26355
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
26356
|
+
}
|
|
26357
|
+
return MathJax.startup.promise;
|
|
26358
|
+
},
|
|
26359
|
+
Typeset: function Typeset(elements, callback) {
|
|
26360
|
+
var promise = MathJax.typesetPromise(elements);
|
|
26361
|
+
if (callback) {
|
|
26362
|
+
promise = promise.then(callback);
|
|
26363
|
+
}
|
|
26364
|
+
return promise;
|
|
26365
|
+
},
|
|
26366
|
+
Register: {
|
|
26367
|
+
MessageHook: function MessageHook() {
|
|
26368
|
+
console.log("MessageHooks are not supported in version 3");
|
|
26369
|
+
},
|
|
26370
|
+
StartupHook: function StartupHook() {
|
|
26371
|
+
console.log("StartupHooks are not supported in version 3");
|
|
26372
|
+
},
|
|
26373
|
+
LoadHook: function LoadHook() {
|
|
26374
|
+
console.log("LoadHooks are not supported in version 3");
|
|
26375
|
+
}
|
|
26376
|
+
},
|
|
26377
|
+
Config: function Config() {
|
|
26378
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
26379
|
+
}
|
|
26380
|
+
};
|
|
26381
|
+
};
|
|
26260
26382
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
26261
26383
|
if (window.mathjaxLoadedP) {
|
|
26262
26384
|
return;
|
|
26263
26385
|
}
|
|
26386
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
26264
26387
|
var texConfig = {
|
|
26265
26388
|
macros: {
|
|
26266
26389
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -26270,11 +26393,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26270
26393
|
},
|
|
26271
26394
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
26272
26395
|
};
|
|
26396
|
+
if (PreviousMathJaxIsUsed) {
|
|
26397
|
+
texConfig.autoload = {
|
|
26398
|
+
color: [],
|
|
26399
|
+
colorv2: ["color"]
|
|
26400
|
+
};
|
|
26401
|
+
}
|
|
26273
26402
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
26274
26403
|
window.MathJax = {
|
|
26275
26404
|
startup: {
|
|
26405
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
26406
|
+
AMSmath: "ams",
|
|
26407
|
+
AMSsymbols: "ams",
|
|
26408
|
+
AMScd: "amscd",
|
|
26409
|
+
HTML: "html",
|
|
26410
|
+
noErrors: "noerrors",
|
|
26411
|
+
noUndefined: "noundefined"
|
|
26412
|
+
} : {},
|
|
26276
26413
|
typeset: false,
|
|
26277
26414
|
ready: function ready() {
|
|
26415
|
+
if (PreviousMathJaxIsUsed) {
|
|
26416
|
+
convertMathJax2ToMathJax3();
|
|
26417
|
+
}
|
|
26278
26418
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
26279
26419
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
26280
26420
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
|
@@ -26341,11 +26481,11 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
26341
26481
|
var executeOn = document.body;
|
|
26342
26482
|
if (!usedForMmlOutput) {
|
|
26343
26483
|
if (window.mathjaxLoadedComplete) {
|
|
26344
|
-
|
|
26484
|
+
renderContentsWithMathJax(el);
|
|
26345
26485
|
} else if (window.mathjaxLoadedP) {
|
|
26346
26486
|
window.mathjaxLoadedP.then(function () {
|
|
26347
26487
|
window.mathjaxLoadedComplete = true;
|
|
26348
|
-
|
|
26488
|
+
renderContentsWithMathJax(el);
|
|
26349
26489
|
})["catch"](function (error) {
|
|
26350
26490
|
return console.error("Error in initializing MathJax:", error);
|
|
26351
26491
|
});
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "7.1.2
|
|
7
|
+
"version": "7.1.2",
|
|
8
8
|
"description": "",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"postpublish": "../../scripts/postpublish"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@material-ui/core": "^3.9.2",
|
|
14
14
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
15
|
-
"@pie-lib/pie-toolbox": "2.0.
|
|
15
|
+
"@pie-lib/pie-toolbox": "2.0.13",
|
|
16
16
|
"classnames": "^2.2.5",
|
|
17
17
|
"lodash": "^4.17.10",
|
|
18
18
|
"prop-types": "^15.6.1",
|
|
@@ -21,14 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "ISC",
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "55af78558b81f2cd421eaac78eb3e652e3523697",
|
|
25
25
|
"main": "lib/index.js",
|
|
26
26
|
"module": "src/index.js",
|
|
27
27
|
"exports": {
|
|
28
28
|
".": "./src/index.js",
|
|
29
29
|
"./print": "./src/print.js"
|
|
30
|
-
},
|
|
31
|
-
"resolutions": {
|
|
32
|
-
"complex.js": "2.1.1"
|
|
33
30
|
}
|
|
34
31
|
}
|