@pie-element/complex-rubric 3.3.2-next.8 → 3.3.3-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
+ ## [3.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric@3.3.1...@pie-element/complex-rubric@3.3.2) (2024-12-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-4393, PD-4388, PD-4550, PD-4394, PD-4165 ([afafda4](https://github.com/pie-framework/pie-elements/commit/afafda4a504ecae6e4c85a45817b7f73a4b81244))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.3.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric@3.3.0...@pie-element/complex-rubric@3.3.1) (2024-11-29)
7
18
 
8
19
 
@@ -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.4.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-configure@2.4.1...@pie-element/complex-rubric-configure@2.4.2) (2024-12-05)
7
+
8
+ **Note:** Version bump only for package @pie-element/complex-rubric-configure
9
+
10
+
11
+
12
+
13
+
6
14
  ## [2.4.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-configure@2.4.0...@pie-element/complex-rubric-configure@2.4.1) (2024-11-29)
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.4.1",
4
+ "version": "2.4.2",
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.2.3",
12
- "@pie-element/rubric": "^4.3.1",
11
+ "@pie-element/multi-trait-rubric": "^4.2.4",
12
+ "@pie-element/rubric": "^4.3.2",
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,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
+ ## [3.0.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-controller@3.0.10...@pie-element/complex-rubric-controller@3.0.11) (2024-12-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-4393, PD-4388, PD-4550, PD-4394, PD-4165 ([afafda4](https://github.com/pie-framework/pie-elements/commit/afafda4a504ecae6e4c85a45817b7f73a4b81244))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.0.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/complex-rubric-controller@3.0.9...@pie-element/complex-rubric-controller@3.0.10) (2024-11-29)
7
18
 
8
19
 
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric-controller",
3
3
  "private": true,
4
- "version": "3.0.10",
4
+ "version": "3.0.11",
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.3.0",
10
+ "@pie-lib/pie-toolbox": "2.4.0",
11
11
  "lodash": "^4.17.15"
12
12
  },
13
13
  "author": "",
@@ -60200,7 +60200,7 @@ const {omit: require$$13$d} = _dll_lodash;
60200
60200
  key: "render",
60201
60201
  value: function render() {
60202
60202
  var _this$props = this.props, children = _this$props.children, className = _this$props.className, classes = _this$props.classes, fontSizeFactor = _this$props.fontSizeFactor, rest = (0, _objectWithoutProperties2["default"])(_this$props, _excluded);
60203
- var finalClass = (0, _classnames["default"])(className, classes.extraCSSRules);
60203
+ var finalClass = (0, _classnames["default"])(className, classes.extraCSSRules, classes.uiLayoutContainer);
60204
60204
  var restProps = (0, _omit["default"])(rest, 'extraCSSRules');
60205
60205
  return _react["default"].createElement("div", (0, _extends2["default"])({
60206
60206
  className: finalClass
@@ -60226,7 +60226,12 @@ const {omit: require$$13$d} = _dll_lodash;
60226
60226
  fontSizeFactor: 1
60227
60227
  });
60228
60228
  var styles = {
60229
- extraCSSRules: {}
60229
+ extraCSSRules: {},
60230
+ uiLayoutContainer: {
60231
+ '& table, th, td': {
60232
+ fontSize: 'inherit'
60233
+ }
60234
+ }
60230
60235
  };
60231
60236
  var Styled = (0, _styles.withStyles)(styles)(UiLayout);
60232
60237
  var _default = Styled;
@@ -102318,6 +102323,41 @@ var INLINE_TAGS = {
102318
102323
  span: 'span'
102319
102324
  };
102320
102325
  serialization.INLINE_TAGS = INLINE_TAGS;
102326
+ var inlines = {
102327
+ deserialize: function deserialize(el, next) {
102328
+ log$2('[inlines:deserialize] inline: ', el);
102329
+ var inlineTag = INLINE_TAGS[el.tagName.toLowerCase()];
102330
+ if (!inlineTag) return;
102331
+ log$2('[inlines:deserialize] inline: ', inlineTag);
102332
+ if (el.childNodes.length === 1) {
102333
+ var cn = el.childNodes[0];
102334
+ if (cn && cn.tagName && cn.tagName.toLowerCase() === inlineTag) {
102335
+ log$2('[we have a child node of the same]...');
102336
+ return;
102337
+ }
102338
+ }
102339
+ return {
102340
+ object: 'inline',
102341
+ type: inlineTag,
102342
+ data: {
102343
+ attributes: attributes.reduce(attributesToMap(el), {})
102344
+ },
102345
+ nodes: next(el.childNodes)
102346
+ };
102347
+ },
102348
+ serialize: function serialize(object, children) {
102349
+ if (object.object !== 'inline') return;
102350
+ var jsonData = object.data.toJSON();
102351
+ log$2('[inlines:serialize] object: ', object, children);
102352
+ var key;
102353
+ for (key in INLINE_TAGS) {
102354
+ if (INLINE_TAGS[key] === object.type) {
102355
+ var Tag = key;
102356
+ return _react$1o["default"].createElement(Tag, jsonData.attributes, children);
102357
+ }
102358
+ }
102359
+ }
102360
+ };
102321
102361
  var extraCSSRulesOpts = {};
102322
102362
  serialization.extraCSSRulesOpts = extraCSSRulesOpts;
102323
102363
  var STYLES_MAP$1 = {
@@ -102423,7 +102463,7 @@ var TEXT_RULE = {
102423
102463
  }
102424
102464
  };
102425
102465
  serialization.TEXT_RULE = TEXT_RULE;
102426
- var RULES = [_list$1.serialization, _math$1.serialization, _media$1.serialization, _image$1.serialization, _table$1.serialization, _respArea$1.serialization, TEXT_RULE, blocks, marks];
102466
+ var RULES = [_list$1.serialization, _math$1.serialization, _media$1.serialization, _image$1.serialization, _table$1.serialization, _respArea$1.serialization, TEXT_RULE, inlines, blocks, marks];
102427
102467
  function allWhitespace(node) {
102428
102468
  return !(/[^\t\n\r ]/).test(node.textContent);
102429
102469
  }
@@ -102436,7 +102476,10 @@ function defaultParseHtml(html) {
102436
102476
  var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);
102437
102477
  var n = textNodes.nextNode();
102438
102478
  while (n) {
102439
- if (allWhitespace(n) || n.nodeValue === "\u200B") {
102479
+ var _n$nextSibling, _n$nextSibling$tagNam, _n$previousSibling, _n$previousSibling$ta;
102480
+ var isWhiteSpace = allWhitespace(n);
102481
+ var isNotNearMarkup = !MARK_TAGS[(_n$nextSibling = n.nextSibling) === null || _n$nextSibling === void 0 ? void 0 : (_n$nextSibling$tagNam = _n$nextSibling.tagName) === null || _n$nextSibling$tagNam === void 0 ? void 0 : _n$nextSibling$tagNam.toLowerCase()] && !MARK_TAGS[(_n$previousSibling = n.previousSibling) === null || _n$previousSibling === void 0 ? void 0 : (_n$previousSibling$ta = _n$previousSibling.tagName) === null || _n$previousSibling$ta === void 0 ? void 0 : _n$previousSibling$ta.toLowerCase()];
102482
+ if (isWhiteSpace && isNotNearMarkup || n.nodeValue === "\u200B") {
102440
102483
  n.parentNode.removeChild(n);
102441
102484
  }
102442
102485
  n = textNodes.nextNode();
package/module/element.js CHANGED
@@ -82076,7 +82076,7 @@ const {omit: require$$13$8} = _dll_lodash;
82076
82076
  key: "render",
82077
82077
  value: function render() {
82078
82078
  var _this$props = this.props, children = _this$props.children, className = _this$props.className, classes = _this$props.classes, fontSizeFactor = _this$props.fontSizeFactor, rest = (0, _objectWithoutProperties2["default"])(_this$props, _excluded);
82079
- var finalClass = (0, _classnames["default"])(className, classes.extraCSSRules);
82079
+ var finalClass = (0, _classnames["default"])(className, classes.extraCSSRules, classes.uiLayoutContainer);
82080
82080
  var restProps = (0, _omit["default"])(rest, 'extraCSSRules');
82081
82081
  return _react["default"].createElement("div", (0, _extends2["default"])({
82082
82082
  className: finalClass
@@ -82102,7 +82102,12 @@ const {omit: require$$13$8} = _dll_lodash;
82102
82102
  fontSizeFactor: 1
82103
82103
  });
82104
82104
  var styles = {
82105
- extraCSSRules: {}
82105
+ extraCSSRules: {},
82106
+ uiLayoutContainer: {
82107
+ '& table, th, td': {
82108
+ fontSize: 'inherit'
82109
+ }
82110
+ }
82106
82111
  };
82107
82112
  var Styled = (0, _styles.withStyles)(styles)(UiLayout);
82108
82113
  var _default = Styled;
@@ -100590,6 +100595,41 @@ var INLINE_TAGS = {
100590
100595
  span: 'span'
100591
100596
  };
100592
100597
  serialization.INLINE_TAGS = INLINE_TAGS;
100598
+ var inlines = {
100599
+ deserialize: function deserialize(el, next) {
100600
+ log$2('[inlines:deserialize] inline: ', el);
100601
+ var inlineTag = INLINE_TAGS[el.tagName.toLowerCase()];
100602
+ if (!inlineTag) return;
100603
+ log$2('[inlines:deserialize] inline: ', inlineTag);
100604
+ if (el.childNodes.length === 1) {
100605
+ var cn = el.childNodes[0];
100606
+ if (cn && cn.tagName && cn.tagName.toLowerCase() === inlineTag) {
100607
+ log$2('[we have a child node of the same]...');
100608
+ return;
100609
+ }
100610
+ }
100611
+ return {
100612
+ object: 'inline',
100613
+ type: inlineTag,
100614
+ data: {
100615
+ attributes: attributes.reduce(attributesToMap(el), {})
100616
+ },
100617
+ nodes: next(el.childNodes)
100618
+ };
100619
+ },
100620
+ serialize: function serialize(object, children) {
100621
+ if (object.object !== 'inline') return;
100622
+ var jsonData = object.data.toJSON();
100623
+ log$2('[inlines:serialize] object: ', object, children);
100624
+ var key;
100625
+ for (key in INLINE_TAGS) {
100626
+ if (INLINE_TAGS[key] === object.type) {
100627
+ var Tag = key;
100628
+ return _react$1m["default"].createElement(Tag, jsonData.attributes, children);
100629
+ }
100630
+ }
100631
+ }
100632
+ };
100593
100633
  var extraCSSRulesOpts = {};
100594
100634
  serialization.extraCSSRulesOpts = extraCSSRulesOpts;
100595
100635
  var STYLES_MAP$1 = {
@@ -100695,7 +100735,7 @@ var TEXT_RULE = {
100695
100735
  }
100696
100736
  };
100697
100737
  serialization.TEXT_RULE = TEXT_RULE;
100698
- var RULES = [_list$1.serialization, _math$1.serialization, _media$1.serialization, _image$1.serialization, _table$1.serialization, _respArea$1.serialization, TEXT_RULE, blocks, marks];
100738
+ var RULES = [_list$1.serialization, _math$1.serialization, _media$1.serialization, _image$1.serialization, _table$1.serialization, _respArea$1.serialization, TEXT_RULE, inlines, blocks, marks];
100699
100739
  function allWhitespace(node) {
100700
100740
  return !(/[^\t\n\r ]/).test(node.textContent);
100701
100741
  }
@@ -100708,7 +100748,10 @@ function defaultParseHtml(html) {
100708
100748
  var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);
100709
100749
  var n = textNodes.nextNode();
100710
100750
  while (n) {
100711
- if (allWhitespace(n) || n.nodeValue === "\u200B") {
100751
+ var _n$nextSibling, _n$nextSibling$tagNam, _n$previousSibling, _n$previousSibling$ta;
100752
+ var isWhiteSpace = allWhitespace(n);
100753
+ var isNotNearMarkup = !MARK_TAGS[(_n$nextSibling = n.nextSibling) === null || _n$nextSibling === void 0 ? void 0 : (_n$nextSibling$tagNam = _n$nextSibling.tagName) === null || _n$nextSibling$tagNam === void 0 ? void 0 : _n$nextSibling$tagNam.toLowerCase()] && !MARK_TAGS[(_n$previousSibling = n.previousSibling) === null || _n$previousSibling === void 0 ? void 0 : (_n$previousSibling$ta = _n$previousSibling.tagName) === null || _n$previousSibling$ta === void 0 ? void 0 : _n$previousSibling$ta.toLowerCase()];
100754
+ if (isWhiteSpace && isNotNearMarkup || n.nodeValue === "\u200B") {
100712
100755
  n.parentNode.removeChild(n);
100713
100756
  }
100714
100757
  n = textNodes.nextNode();
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/complex-rubric@3.3.1</title>
5
+ <title>@pie-element/complex-rubric@3.3.2</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,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/complex-rubric@3.3.1</title>
5
+ <title>@pie-element/complex-rubric@3.3.2</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
@@ -82076,7 +82076,7 @@ const {omit: require$$13$8} = _dll_lodash;
82076
82076
  key: "render",
82077
82077
  value: function render() {
82078
82078
  var _this$props = this.props, children = _this$props.children, className = _this$props.className, classes = _this$props.classes, fontSizeFactor = _this$props.fontSizeFactor, rest = (0, _objectWithoutProperties2["default"])(_this$props, _excluded);
82079
- var finalClass = (0, _classnames["default"])(className, classes.extraCSSRules);
82079
+ var finalClass = (0, _classnames["default"])(className, classes.extraCSSRules, classes.uiLayoutContainer);
82080
82080
  var restProps = (0, _omit["default"])(rest, 'extraCSSRules');
82081
82081
  return _react["default"].createElement("div", (0, _extends2["default"])({
82082
82082
  className: finalClass
@@ -82102,7 +82102,12 @@ const {omit: require$$13$8} = _dll_lodash;
82102
82102
  fontSizeFactor: 1
82103
82103
  });
82104
82104
  var styles = {
82105
- extraCSSRules: {}
82105
+ extraCSSRules: {},
82106
+ uiLayoutContainer: {
82107
+ '& table, th, td': {
82108
+ fontSize: 'inherit'
82109
+ }
82110
+ }
82106
82111
  };
82107
82112
  var Styled = (0, _styles.withStyles)(styles)(UiLayout);
82108
82113
  var _default = Styled;
@@ -100590,6 +100595,41 @@ var INLINE_TAGS = {
100590
100595
  span: 'span'
100591
100596
  };
100592
100597
  serialization.INLINE_TAGS = INLINE_TAGS;
100598
+ var inlines = {
100599
+ deserialize: function deserialize(el, next) {
100600
+ log$2('[inlines:deserialize] inline: ', el);
100601
+ var inlineTag = INLINE_TAGS[el.tagName.toLowerCase()];
100602
+ if (!inlineTag) return;
100603
+ log$2('[inlines:deserialize] inline: ', inlineTag);
100604
+ if (el.childNodes.length === 1) {
100605
+ var cn = el.childNodes[0];
100606
+ if (cn && cn.tagName && cn.tagName.toLowerCase() === inlineTag) {
100607
+ log$2('[we have a child node of the same]...');
100608
+ return;
100609
+ }
100610
+ }
100611
+ return {
100612
+ object: 'inline',
100613
+ type: inlineTag,
100614
+ data: {
100615
+ attributes: attributes.reduce(attributesToMap(el), {})
100616
+ },
100617
+ nodes: next(el.childNodes)
100618
+ };
100619
+ },
100620
+ serialize: function serialize(object, children) {
100621
+ if (object.object !== 'inline') return;
100622
+ var jsonData = object.data.toJSON();
100623
+ log$2('[inlines:serialize] object: ', object, children);
100624
+ var key;
100625
+ for (key in INLINE_TAGS) {
100626
+ if (INLINE_TAGS[key] === object.type) {
100627
+ var Tag = key;
100628
+ return _react$1m["default"].createElement(Tag, jsonData.attributes, children);
100629
+ }
100630
+ }
100631
+ }
100632
+ };
100593
100633
  var extraCSSRulesOpts = {};
100594
100634
  serialization.extraCSSRulesOpts = extraCSSRulesOpts;
100595
100635
  var STYLES_MAP$1 = {
@@ -100695,7 +100735,7 @@ var TEXT_RULE = {
100695
100735
  }
100696
100736
  };
100697
100737
  serialization.TEXT_RULE = TEXT_RULE;
100698
- var RULES = [_list$1.serialization, _math$1.serialization, _media$1.serialization, _image$1.serialization, _table$1.serialization, _respArea$1.serialization, TEXT_RULE, blocks, marks];
100738
+ var RULES = [_list$1.serialization, _math$1.serialization, _media$1.serialization, _image$1.serialization, _table$1.serialization, _respArea$1.serialization, TEXT_RULE, inlines, blocks, marks];
100699
100739
  function allWhitespace(node) {
100700
100740
  return !(/[^\t\n\r ]/).test(node.textContent);
100701
100741
  }
@@ -100708,7 +100748,10 @@ function defaultParseHtml(html) {
100708
100748
  var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);
100709
100749
  var n = textNodes.nextNode();
100710
100750
  while (n) {
100711
- if (allWhitespace(n) || n.nodeValue === "\u200B") {
100751
+ var _n$nextSibling, _n$nextSibling$tagNam, _n$previousSibling, _n$previousSibling$ta;
100752
+ var isWhiteSpace = allWhitespace(n);
100753
+ var isNotNearMarkup = !MARK_TAGS[(_n$nextSibling = n.nextSibling) === null || _n$nextSibling === void 0 ? void 0 : (_n$nextSibling$tagNam = _n$nextSibling.tagName) === null || _n$nextSibling$tagNam === void 0 ? void 0 : _n$nextSibling$tagNam.toLowerCase()] && !MARK_TAGS[(_n$previousSibling = n.previousSibling) === null || _n$previousSibling === void 0 ? void 0 : (_n$previousSibling$ta = _n$previousSibling.tagName) === null || _n$previousSibling$ta === void 0 ? void 0 : _n$previousSibling$ta.toLowerCase()];
100754
+ if (isWhiteSpace && isNotNearMarkup || n.nodeValue === "\u200B") {
100712
100755
  n.parentNode.removeChild(n);
100713
100756
  }
100714
100757
  n = textNodes.nextNode();
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.3.2-next.8+c5b7134df",
4
+ "version": "3.3.3-next.0+c8a5ec494",
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.2.4-next.8+c5b7134df",
11
- "@pie-element/rubric": "^4.3.2-next.8+c5b7134df",
10
+ "@pie-element/multi-trait-rubric": "^4.2.5-next.0+c8a5ec494",
11
+ "@pie-element/rubric": "^4.3.3-next.0+c8a5ec494",
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": "c5b7134dffd873f8119fe7c4ac820e2142158e9b",
18
+ "gitHead": "c8a5ec494017a289b458cc2203760273767ef328",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },