@pie-element/complex-rubric 3.3.2-next.13 → 3.3.2-next.16
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/controller/package.json +1 -1
- package/module/configure.js +47 -4
- package/module/element.js +47 -4
- package/module/print.js +47 -4
- package/package.json +4 -4
package/controller/package.json
CHANGED
package/module/configure.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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/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
|
-
|
|
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.
|
|
4
|
+
"version": "3.3.2-next.16+afafda4a5",
|
|
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.
|
|
11
|
-
"@pie-element/rubric": "^4.3.2-next.
|
|
10
|
+
"@pie-element/multi-trait-rubric": "^4.2.4-next.16+afafda4a5",
|
|
11
|
+
"@pie-element/rubric": "^4.3.2-next.16+afafda4a5",
|
|
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": "
|
|
18
|
+
"gitHead": "afafda4a504ecae6e4c85a45817b7f73a4b81244",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|