@pie-element/complex-rubric 3.0.1-next.4 → 3.0.1

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,21 @@
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
+ ## [3.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric@3.0.0...@pie-element/complex-rubric@3.0.1) (2024-09-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([c363be4](https://github.com/pie-framework/pie-elements/commit/c363be48f9428024d4acc1eed05cd598840ffe3a))
12
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([fe83296](https://github.com/pie-framework/pie-elements/commit/fe83296445f9785e67c9643642221b28b4485921))
13
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([321147b](https://github.com/pie-framework/pie-elements/commit/321147b4072f2a6200d155f7f09c712960fe078c))
14
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([d3e24e8](https://github.com/pie-framework/pie-elements/commit/d3e24e83d74e93f0720eff8841ebac1d0493b769))
15
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([a3dd8d6](https://github.com/pie-framework/pie-elements/commit/a3dd8d65a754acadd95134ee825b769355a08a45))
16
+
17
+
18
+
19
+
20
+
6
21
  # [3.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric@2.19.6...@pie-element/complex-rubric@3.0.0) (2024-09-25)
7
22
 
8
23
 
@@ -3,6 +3,14 @@
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
+ ## [2.2.51](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-configure@2.2.50...@pie-element/complex-rubric-configure@2.2.51) (2024-09-26)
7
+
8
+ **Note:** Version bump only for package @pie-element/complex-rubric-configure
9
+
10
+
11
+
12
+
13
+
6
14
  ## [2.2.50](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-configure@2.2.49...@pie-element/complex-rubric-configure@2.2.50) (2024-09-25)
7
15
 
8
16
  **Note:** Version bump only for package @pie-element/complex-rubric-configure
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric-configure",
3
3
  "private": true,
4
- "version": "2.2.50",
4
+ "version": "2.2.51",
5
5
  "description": "Complex Rubric authoring view",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "author": "Pie Framework Authors",
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
- "@pie-element/multi-trait-rubric": "^4.0.0",
12
- "@pie-element/rubric": "^4.0.0",
11
+ "@pie-element/multi-trait-rubric": "^4.0.1",
12
+ "@pie-element/rubric": "^4.0.1",
13
13
  "@pie-framework/pie-configure-events": "^1.3.0",
14
14
  "@pie-lib/config-ui": "^11.9.25-next.0",
15
15
  "@pie-lib/editable-html": "^11.1.2-next.0",
@@ -3,6 +3,21 @@
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
+ ## [3.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-controller@3.0.0...@pie-element/complex-rubric-controller@3.0.1) (2024-09-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([c363be4](https://github.com/pie-framework/pie-elements/commit/c363be48f9428024d4acc1eed05cd598840ffe3a))
12
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([fe83296](https://github.com/pie-framework/pie-elements/commit/fe83296445f9785e67c9643642221b28b4485921))
13
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([321147b](https://github.com/pie-framework/pie-elements/commit/321147b4072f2a6200d155f7f09c712960fe078c))
14
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([d3e24e8](https://github.com/pie-framework/pie-elements/commit/d3e24e83d74e93f0720eff8841ebac1d0493b769))
15
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([a3dd8d6](https://github.com/pie-framework/pie-elements/commit/a3dd8d65a754acadd95134ee825b769355a08a45))
16
+
17
+
18
+
19
+
20
+
6
21
  # [3.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-controller@2.18.6...@pie-element/complex-rubric-controller@3.0.0) (2024-09-25)
7
22
 
8
23
 
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric-controller",
3
3
  "private": true,
4
- "version": "3.0.0",
4
+ "version": "3.0.1",
5
5
  "description": "",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-lib/pie-toolbox": "2.0.7",
10
+ "@pie-lib/pie-toolbox": "2.0.8",
11
11
  "lodash": "^4.17.15"
12
12
  },
13
13
  "author": "",
@@ -1,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.5/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.6/module/index.js";
2
2
  import RubricConfigure from '@pie-element/rubric/configure/lib';
3
- import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.4/module/index.js";
3
+ import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.5/module/index.js";
4
4
  function _mergeNamespaces(n, m) {
5
5
  m.forEach(function (e) {
6
6
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -49087,6 +49087,29 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
49087
49087
  return node.setAttribute("displaystyle", "true");
49088
49088
  });
49089
49089
  };
49090
+ var createPlaceholder = function createPlaceholder(element) {
49091
+ var _element$previousSibl;
49092
+ if (!element.previousSibling || !((_element$previousSibl = element.previousSibling.classList) !== null && _element$previousSibl !== void 0 && _element$previousSibl.contains("math-placeholder"))) {
49093
+ var _element$parentNode;
49094
+ element.dataset.originalDisplay = element.style.display || "";
49095
+ element.style.display = "none";
49096
+ var placeholder = document.createElement("span");
49097
+ placeholder.style.cssText = "height: 10px; width: 50px; display: inline-block; vertical-align: middle; justify-content: center; background: #fafafa; border-radius: 4px;";
49098
+ placeholder.classList.add("math-placeholder");
49099
+ (_element$parentNode = element.parentNode) === null || _element$parentNode === void 0 ? void 0 : _element$parentNode.insertBefore(placeholder, element);
49100
+ }
49101
+ };
49102
+ var removePlaceholdersAndRestoreDisplay = function removePlaceholdersAndRestoreDisplay() {
49103
+ document.querySelectorAll(".math-placeholder").forEach(function (placeholder) {
49104
+ var _targetElement$datase;
49105
+ var targetElement = placeholder.nextElementSibling;
49106
+ if (targetElement && ((_targetElement$datase = targetElement.dataset) === null || _targetElement$datase === void 0 ? void 0 : _targetElement$datase.originalDisplay) !== undefined) {
49107
+ targetElement.style.display = targetElement.dataset.originalDisplay;
49108
+ delete targetElement.dataset.originalDisplay;
49109
+ }
49110
+ placeholder.remove();
49111
+ });
49112
+ };
49090
49113
  var removeExcessMjxContainers = function removeExcessMjxContainers(content) {
49091
49114
  var elements = content.querySelectorAll("[data-latex][data-math-handled=\"true\"]");
49092
49115
  elements.forEach(function (element) {
@@ -49109,6 +49132,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
49109
49132
  mathJaxInstance.typesetClear();
49110
49133
  mathJaxInstance.typesetPromise([executeOn]).then(function () {
49111
49134
  try {
49135
+ removePlaceholdersAndRestoreDisplay();
49112
49136
  removeExcessMjxContainers(executeOn);
49113
49137
  var updatedDocument = mathJaxInstance.startup.document;
49114
49138
  var list = updatedDocument.math.list;
@@ -49195,6 +49219,13 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
49195
49219
  script.src = ("https://cdn.jsdelivr.net/npm/mathjax@").concat(MathJaxVersion, "/es5/tex-chtml-full.js");
49196
49220
  script.async = true;
49197
49221
  document.head.appendChild(script);
49222
+ setTimeout(function () {
49223
+ if (!window.mathjaxLoadedComplete) {
49224
+ var _document, _document$body;
49225
+ var mathElements = (_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : _document$body.querySelectorAll("[data-latex]");
49226
+ (mathElements || []).forEach(createPlaceholder);
49227
+ }
49228
+ });
49198
49229
  });
49199
49230
  };
49200
49231
  exports.initializeMathJax = initializeMathJax;
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.5/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.6/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.5/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) {
@@ -72367,6 +72367,29 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
72367
72367
  return node.setAttribute("displaystyle", "true");
72368
72368
  });
72369
72369
  };
72370
+ var createPlaceholder = function createPlaceholder(element) {
72371
+ var _element$previousSibl;
72372
+ if (!element.previousSibling || !((_element$previousSibl = element.previousSibling.classList) !== null && _element$previousSibl !== void 0 && _element$previousSibl.contains("math-placeholder"))) {
72373
+ var _element$parentNode;
72374
+ element.dataset.originalDisplay = element.style.display || "";
72375
+ element.style.display = "none";
72376
+ var placeholder = document.createElement("span");
72377
+ placeholder.style.cssText = "height: 10px; width: 50px; display: inline-block; vertical-align: middle; justify-content: center; background: #fafafa; border-radius: 4px;";
72378
+ placeholder.classList.add("math-placeholder");
72379
+ (_element$parentNode = element.parentNode) === null || _element$parentNode === void 0 ? void 0 : _element$parentNode.insertBefore(placeholder, element);
72380
+ }
72381
+ };
72382
+ var removePlaceholdersAndRestoreDisplay = function removePlaceholdersAndRestoreDisplay() {
72383
+ document.querySelectorAll(".math-placeholder").forEach(function (placeholder) {
72384
+ var _targetElement$datase;
72385
+ var targetElement = placeholder.nextElementSibling;
72386
+ if (targetElement && ((_targetElement$datase = targetElement.dataset) === null || _targetElement$datase === void 0 ? void 0 : _targetElement$datase.originalDisplay) !== undefined) {
72387
+ targetElement.style.display = targetElement.dataset.originalDisplay;
72388
+ delete targetElement.dataset.originalDisplay;
72389
+ }
72390
+ placeholder.remove();
72391
+ });
72392
+ };
72370
72393
  var removeExcessMjxContainers = function removeExcessMjxContainers(content) {
72371
72394
  var elements = content.querySelectorAll("[data-latex][data-math-handled=\"true\"]");
72372
72395
  elements.forEach(function (element) {
@@ -72389,6 +72412,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
72389
72412
  mathJaxInstance.typesetClear();
72390
72413
  mathJaxInstance.typesetPromise([executeOn]).then(function () {
72391
72414
  try {
72415
+ removePlaceholdersAndRestoreDisplay();
72392
72416
  removeExcessMjxContainers(executeOn);
72393
72417
  var updatedDocument = mathJaxInstance.startup.document;
72394
72418
  var list = updatedDocument.math.list;
@@ -72475,6 +72499,13 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
72475
72499
  script.src = ("https://cdn.jsdelivr.net/npm/mathjax@").concat(MathJaxVersion, "/es5/tex-chtml-full.js");
72476
72500
  script.async = true;
72477
72501
  document.head.appendChild(script);
72502
+ setTimeout(function () {
72503
+ if (!window.mathjaxLoadedComplete) {
72504
+ var _document, _document$body;
72505
+ var mathElements = (_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : _document$body.querySelectorAll("[data-latex]");
72506
+ (mathElements || []).forEach(createPlaceholder);
72507
+ }
72508
+ });
72478
72509
  });
72479
72510
  };
72480
72511
  exports.initializeMathJax = initializeMathJax;
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "2.0.5"
7
+ "version": "2.0.6"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "5.0.4"
11
+ "version": "5.0.5"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.5/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.6/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.5/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) {
@@ -72367,6 +72367,29 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
72367
72367
  return node.setAttribute("displaystyle", "true");
72368
72368
  });
72369
72369
  };
72370
+ var createPlaceholder = function createPlaceholder(element) {
72371
+ var _element$previousSibl;
72372
+ if (!element.previousSibling || !((_element$previousSibl = element.previousSibling.classList) !== null && _element$previousSibl !== void 0 && _element$previousSibl.contains("math-placeholder"))) {
72373
+ var _element$parentNode;
72374
+ element.dataset.originalDisplay = element.style.display || "";
72375
+ element.style.display = "none";
72376
+ var placeholder = document.createElement("span");
72377
+ placeholder.style.cssText = "height: 10px; width: 50px; display: inline-block; vertical-align: middle; justify-content: center; background: #fafafa; border-radius: 4px;";
72378
+ placeholder.classList.add("math-placeholder");
72379
+ (_element$parentNode = element.parentNode) === null || _element$parentNode === void 0 ? void 0 : _element$parentNode.insertBefore(placeholder, element);
72380
+ }
72381
+ };
72382
+ var removePlaceholdersAndRestoreDisplay = function removePlaceholdersAndRestoreDisplay() {
72383
+ document.querySelectorAll(".math-placeholder").forEach(function (placeholder) {
72384
+ var _targetElement$datase;
72385
+ var targetElement = placeholder.nextElementSibling;
72386
+ if (targetElement && ((_targetElement$datase = targetElement.dataset) === null || _targetElement$datase === void 0 ? void 0 : _targetElement$datase.originalDisplay) !== undefined) {
72387
+ targetElement.style.display = targetElement.dataset.originalDisplay;
72388
+ delete targetElement.dataset.originalDisplay;
72389
+ }
72390
+ placeholder.remove();
72391
+ });
72392
+ };
72370
72393
  var removeExcessMjxContainers = function removeExcessMjxContainers(content) {
72371
72394
  var elements = content.querySelectorAll("[data-latex][data-math-handled=\"true\"]");
72372
72395
  elements.forEach(function (element) {
@@ -72389,6 +72412,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
72389
72412
  mathJaxInstance.typesetClear();
72390
72413
  mathJaxInstance.typesetPromise([executeOn]).then(function () {
72391
72414
  try {
72415
+ removePlaceholdersAndRestoreDisplay();
72392
72416
  removeExcessMjxContainers(executeOn);
72393
72417
  var updatedDocument = mathJaxInstance.startup.document;
72394
72418
  var list = updatedDocument.math.list;
@@ -72475,6 +72499,13 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
72475
72499
  script.src = ("https://cdn.jsdelivr.net/npm/mathjax@").concat(MathJaxVersion, "/es5/tex-chtml-full.js");
72476
72500
  script.async = true;
72477
72501
  document.head.appendChild(script);
72502
+ setTimeout(function () {
72503
+ if (!window.mathjaxLoadedComplete) {
72504
+ var _document, _document$body;
72505
+ var mathElements = (_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : _document$body.querySelectorAll("[data-latex]");
72506
+ (mathElements || []).forEach(createPlaceholder);
72507
+ }
72508
+ });
72478
72509
  });
72479
72510
  };
72480
72511
  exports.initializeMathJax = initializeMathJax;
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "3.0.1-next.4+fe8329644",
4
+ "version": "3.0.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
- "@pie-element/multi-trait-rubric": "^4.0.1-next.4+fe8329644",
11
- "@pie-element/rubric": "^4.0.1-next.4+fe8329644",
10
+ "@pie-element/multi-trait-rubric": "^4.0.1",
11
+ "@pie-element/rubric": "^4.0.1",
12
12
  "@pie-framework/pie-player-events": "^0.1.0",
13
13
  "classnames": "^2.2.5",
14
14
  "debug": "^4.1.1",
15
15
  "lodash": "^4.17.11",
16
16
  "prop-types": "^15.7.2"
17
17
  },
18
- "gitHead": "fe83296445f9785e67c9643642221b28b4485921",
18
+ "gitHead": "c05c307fab3edbd718f34b9826cab987e2ebf08f",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },