@pie-element/complex-rubric 3.4.4-next.11 → 3.4.4-next.9
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 +15 -53
- package/module/element.js +15 -53
- package/module/manifest.json +1 -1
- package/module/print.js +15 -53
- package/package.json +4 -4
package/controller/package.json
CHANGED
package/module/configure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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@3.3.2/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.10.
|
|
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.10.1/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) {
|
|
@@ -126864,7 +126864,7 @@ const require$$11$G = _dll_prop_types;
|
|
|
126864
126864
|
},
|
|
126865
126865
|
label: {
|
|
126866
126866
|
color: ("").concat(color.text(), " !important"),
|
|
126867
|
-
display: '
|
|
126867
|
+
display: 'inline-block',
|
|
126868
126868
|
verticalAlign: 'middle',
|
|
126869
126869
|
cursor: 'pointer',
|
|
126870
126870
|
'& > p': {
|
|
@@ -177874,74 +177874,36 @@ var reduceRedundantNewLineCharacters = function reduceRedundantNewLineCharacters
|
|
|
177874
177874
|
}
|
|
177875
177875
|
return markup;
|
|
177876
177876
|
};
|
|
177877
|
-
var
|
|
177878
|
-
var
|
|
177879
|
-
|
|
177880
|
-
var fixParagraphs = function fixParagraphs(child) {
|
|
177881
|
-
var p = document.createElement('p');
|
|
177882
|
-
p.innerHTML = child.innerHTML;
|
|
177883
|
-
Array.from(child.attributes).forEach(function (attr) {
|
|
177884
|
-
p.setAttribute(attr.name, attr.value);
|
|
177885
|
-
});
|
|
177886
|
-
child.replaceWith(p);
|
|
177887
|
-
};
|
|
177888
|
-
var fixTables = function fixTables(tableArray) {
|
|
177889
|
-
tableArray.forEach(function (el) {
|
|
177890
|
-
var index = el.index, child = el.child, parent = el.parent;
|
|
177891
|
-
var nodesBefore = [];
|
|
177892
|
-
var nodesAfter = [];
|
|
177893
|
-
var allNodes = Array.from(parent.childNodes);
|
|
177894
|
-
var i;
|
|
177895
|
-
for (i = 0; i < allNodes.length; i++) {
|
|
177896
|
-
var node = allNodes[i];
|
|
177897
|
-
if (i < index) {
|
|
177898
|
-
nodesBefore.push(node);
|
|
177899
|
-
} else if (i > index) {
|
|
177900
|
-
nodesAfter.push(node);
|
|
177901
|
-
}
|
|
177902
|
-
}
|
|
177903
|
-
var beforeEl = document.createElement(parent.nodeName);
|
|
177904
|
-
beforeEl.append.apply(beforeEl, nodesBefore);
|
|
177905
|
-
parent.replaceWith(beforeEl);
|
|
177906
|
-
beforeEl.after(child);
|
|
177907
|
-
var afterEl = document.createElement(parent.nodeName);
|
|
177908
|
-
afterEl.append.apply(afterEl, nodesAfter);
|
|
177909
|
-
child.after(afterEl);
|
|
177910
|
-
});
|
|
177911
|
-
};
|
|
177877
|
+
var wrapHtmlProperly = function wrapHtmlProperly(markup) {
|
|
177878
|
+
var el = document.createElement('div');
|
|
177879
|
+
el.innerHTML = markup;
|
|
177912
177880
|
var parseNode = function parseNode(el) {
|
|
177913
|
-
var childArray = Array.from(el.
|
|
177881
|
+
var childArray = Array.from(el.children);
|
|
177914
177882
|
var hasParagraphs = childArray.find(function (child) {
|
|
177915
177883
|
return child.nodeName === 'P';
|
|
177916
177884
|
});
|
|
177917
|
-
|
|
177918
|
-
childArray.forEach(function (child, index) {
|
|
177885
|
+
childArray.forEach(function (child) {
|
|
177919
177886
|
if ((child.nodeName === 'DIV' || child.nodeName === 'P') && child.childNodes.length === 0) {
|
|
177920
177887
|
child.remove();
|
|
177921
177888
|
return;
|
|
177922
177889
|
}
|
|
177923
177890
|
if (hasParagraphs && child.nodeName === 'DIV') {
|
|
177924
|
-
|
|
177925
|
-
|
|
177926
|
-
|
|
177927
|
-
|
|
177928
|
-
index: index,
|
|
177929
|
-
child: child,
|
|
177930
|
-
parent: el
|
|
177891
|
+
var p = document.createElement('p');
|
|
177892
|
+
p.innerHTML = child.innerHTML;
|
|
177893
|
+
Array.from(child.attributes).forEach(function (attr) {
|
|
177894
|
+
p.setAttribute(attr.name, attr.value);
|
|
177931
177895
|
});
|
|
177896
|
+
child.replaceWith(p);
|
|
177932
177897
|
}
|
|
177933
177898
|
parseNode(child);
|
|
177934
177899
|
});
|
|
177935
|
-
if (tables.length) {
|
|
177936
|
-
fixTables(tables);
|
|
177937
|
-
}
|
|
177938
177900
|
};
|
|
177939
|
-
parseNode(
|
|
177940
|
-
return
|
|
177901
|
+
parseNode(el);
|
|
177902
|
+
return el.innerHTML;
|
|
177941
177903
|
};
|
|
177942
177904
|
var htmlToValue = function htmlToValue(html) {
|
|
177943
177905
|
try {
|
|
177944
|
-
return serializer.deserialize(
|
|
177906
|
+
return serializer.deserialize(wrapHtmlProperly(reduceRedundantNewLineCharacters(reduceMultipleBrs(html))));
|
|
177945
177907
|
} catch (e) {
|
|
177946
177908
|
console.log("Couldn't parse html: ", e);
|
|
177947
177909
|
return {};
|
package/module/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.2/module/index.js";
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.1/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) {
|
|
@@ -142827,7 +142827,7 @@ const require$$11$B = _dll_prop_types;
|
|
|
142827
142827
|
},
|
|
142828
142828
|
label: {
|
|
142829
142829
|
color: ("").concat(color$1.text(), " !important"),
|
|
142830
|
-
display: '
|
|
142830
|
+
display: 'inline-block',
|
|
142831
142831
|
verticalAlign: 'middle',
|
|
142832
142832
|
cursor: 'pointer',
|
|
142833
142833
|
'& > p': {
|
|
@@ -175948,74 +175948,36 @@ var reduceRedundantNewLineCharacters = function reduceRedundantNewLineCharacters
|
|
|
175948
175948
|
}
|
|
175949
175949
|
return markup;
|
|
175950
175950
|
};
|
|
175951
|
-
var
|
|
175952
|
-
var
|
|
175953
|
-
|
|
175954
|
-
var fixParagraphs = function fixParagraphs(child) {
|
|
175955
|
-
var p = document.createElement('p');
|
|
175956
|
-
p.innerHTML = child.innerHTML;
|
|
175957
|
-
Array.from(child.attributes).forEach(function (attr) {
|
|
175958
|
-
p.setAttribute(attr.name, attr.value);
|
|
175959
|
-
});
|
|
175960
|
-
child.replaceWith(p);
|
|
175961
|
-
};
|
|
175962
|
-
var fixTables = function fixTables(tableArray) {
|
|
175963
|
-
tableArray.forEach(function (el) {
|
|
175964
|
-
var index = el.index, child = el.child, parent = el.parent;
|
|
175965
|
-
var nodesBefore = [];
|
|
175966
|
-
var nodesAfter = [];
|
|
175967
|
-
var allNodes = Array.from(parent.childNodes);
|
|
175968
|
-
var i;
|
|
175969
|
-
for (i = 0; i < allNodes.length; i++) {
|
|
175970
|
-
var node = allNodes[i];
|
|
175971
|
-
if (i < index) {
|
|
175972
|
-
nodesBefore.push(node);
|
|
175973
|
-
} else if (i > index) {
|
|
175974
|
-
nodesAfter.push(node);
|
|
175975
|
-
}
|
|
175976
|
-
}
|
|
175977
|
-
var beforeEl = document.createElement(parent.nodeName);
|
|
175978
|
-
beforeEl.append.apply(beforeEl, nodesBefore);
|
|
175979
|
-
parent.replaceWith(beforeEl);
|
|
175980
|
-
beforeEl.after(child);
|
|
175981
|
-
var afterEl = document.createElement(parent.nodeName);
|
|
175982
|
-
afterEl.append.apply(afterEl, nodesAfter);
|
|
175983
|
-
child.after(afterEl);
|
|
175984
|
-
});
|
|
175985
|
-
};
|
|
175951
|
+
var wrapHtmlProperly = function wrapHtmlProperly(markup) {
|
|
175952
|
+
var el = document.createElement('div');
|
|
175953
|
+
el.innerHTML = markup;
|
|
175986
175954
|
var parseNode = function parseNode(el) {
|
|
175987
|
-
var childArray = Array.from(el.
|
|
175955
|
+
var childArray = Array.from(el.children);
|
|
175988
175956
|
var hasParagraphs = childArray.find(function (child) {
|
|
175989
175957
|
return child.nodeName === 'P';
|
|
175990
175958
|
});
|
|
175991
|
-
|
|
175992
|
-
childArray.forEach(function (child, index) {
|
|
175959
|
+
childArray.forEach(function (child) {
|
|
175993
175960
|
if ((child.nodeName === 'DIV' || child.nodeName === 'P') && child.childNodes.length === 0) {
|
|
175994
175961
|
child.remove();
|
|
175995
175962
|
return;
|
|
175996
175963
|
}
|
|
175997
175964
|
if (hasParagraphs && child.nodeName === 'DIV') {
|
|
175998
|
-
|
|
175999
|
-
|
|
176000
|
-
|
|
176001
|
-
|
|
176002
|
-
index: index,
|
|
176003
|
-
child: child,
|
|
176004
|
-
parent: el
|
|
175965
|
+
var p = document.createElement('p');
|
|
175966
|
+
p.innerHTML = child.innerHTML;
|
|
175967
|
+
Array.from(child.attributes).forEach(function (attr) {
|
|
175968
|
+
p.setAttribute(attr.name, attr.value);
|
|
176005
175969
|
});
|
|
175970
|
+
child.replaceWith(p);
|
|
176006
175971
|
}
|
|
176007
175972
|
parseNode(child);
|
|
176008
175973
|
});
|
|
176009
|
-
if (tables.length) {
|
|
176010
|
-
fixTables(tables);
|
|
176011
|
-
}
|
|
176012
175974
|
};
|
|
176013
|
-
parseNode(
|
|
176014
|
-
return
|
|
175975
|
+
parseNode(el);
|
|
175976
|
+
return el.innerHTML;
|
|
176015
175977
|
};
|
|
176016
175978
|
var htmlToValue = function htmlToValue(html) {
|
|
176017
175979
|
try {
|
|
176018
|
-
return serializer.deserialize(
|
|
175980
|
+
return serializer.deserialize(wrapHtmlProperly(reduceRedundantNewLineCharacters(reduceMultipleBrs(html))));
|
|
176019
175981
|
} catch (e) {
|
|
176020
175982
|
console.log("Couldn't parse html: ", e);
|
|
176021
175983
|
return {};
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.2/module/index.js";
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.1/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) {
|
|
@@ -142827,7 +142827,7 @@ const require$$11$B = _dll_prop_types;
|
|
|
142827
142827
|
},
|
|
142828
142828
|
label: {
|
|
142829
142829
|
color: ("").concat(color$1.text(), " !important"),
|
|
142830
|
-
display: '
|
|
142830
|
+
display: 'inline-block',
|
|
142831
142831
|
verticalAlign: 'middle',
|
|
142832
142832
|
cursor: 'pointer',
|
|
142833
142833
|
'& > p': {
|
|
@@ -175948,74 +175948,36 @@ var reduceRedundantNewLineCharacters = function reduceRedundantNewLineCharacters
|
|
|
175948
175948
|
}
|
|
175949
175949
|
return markup;
|
|
175950
175950
|
};
|
|
175951
|
-
var
|
|
175952
|
-
var
|
|
175953
|
-
|
|
175954
|
-
var fixParagraphs = function fixParagraphs(child) {
|
|
175955
|
-
var p = document.createElement('p');
|
|
175956
|
-
p.innerHTML = child.innerHTML;
|
|
175957
|
-
Array.from(child.attributes).forEach(function (attr) {
|
|
175958
|
-
p.setAttribute(attr.name, attr.value);
|
|
175959
|
-
});
|
|
175960
|
-
child.replaceWith(p);
|
|
175961
|
-
};
|
|
175962
|
-
var fixTables = function fixTables(tableArray) {
|
|
175963
|
-
tableArray.forEach(function (el) {
|
|
175964
|
-
var index = el.index, child = el.child, parent = el.parent;
|
|
175965
|
-
var nodesBefore = [];
|
|
175966
|
-
var nodesAfter = [];
|
|
175967
|
-
var allNodes = Array.from(parent.childNodes);
|
|
175968
|
-
var i;
|
|
175969
|
-
for (i = 0; i < allNodes.length; i++) {
|
|
175970
|
-
var node = allNodes[i];
|
|
175971
|
-
if (i < index) {
|
|
175972
|
-
nodesBefore.push(node);
|
|
175973
|
-
} else if (i > index) {
|
|
175974
|
-
nodesAfter.push(node);
|
|
175975
|
-
}
|
|
175976
|
-
}
|
|
175977
|
-
var beforeEl = document.createElement(parent.nodeName);
|
|
175978
|
-
beforeEl.append.apply(beforeEl, nodesBefore);
|
|
175979
|
-
parent.replaceWith(beforeEl);
|
|
175980
|
-
beforeEl.after(child);
|
|
175981
|
-
var afterEl = document.createElement(parent.nodeName);
|
|
175982
|
-
afterEl.append.apply(afterEl, nodesAfter);
|
|
175983
|
-
child.after(afterEl);
|
|
175984
|
-
});
|
|
175985
|
-
};
|
|
175951
|
+
var wrapHtmlProperly = function wrapHtmlProperly(markup) {
|
|
175952
|
+
var el = document.createElement('div');
|
|
175953
|
+
el.innerHTML = markup;
|
|
175986
175954
|
var parseNode = function parseNode(el) {
|
|
175987
|
-
var childArray = Array.from(el.
|
|
175955
|
+
var childArray = Array.from(el.children);
|
|
175988
175956
|
var hasParagraphs = childArray.find(function (child) {
|
|
175989
175957
|
return child.nodeName === 'P';
|
|
175990
175958
|
});
|
|
175991
|
-
|
|
175992
|
-
childArray.forEach(function (child, index) {
|
|
175959
|
+
childArray.forEach(function (child) {
|
|
175993
175960
|
if ((child.nodeName === 'DIV' || child.nodeName === 'P') && child.childNodes.length === 0) {
|
|
175994
175961
|
child.remove();
|
|
175995
175962
|
return;
|
|
175996
175963
|
}
|
|
175997
175964
|
if (hasParagraphs && child.nodeName === 'DIV') {
|
|
175998
|
-
|
|
175999
|
-
|
|
176000
|
-
|
|
176001
|
-
|
|
176002
|
-
index: index,
|
|
176003
|
-
child: child,
|
|
176004
|
-
parent: el
|
|
175965
|
+
var p = document.createElement('p');
|
|
175966
|
+
p.innerHTML = child.innerHTML;
|
|
175967
|
+
Array.from(child.attributes).forEach(function (attr) {
|
|
175968
|
+
p.setAttribute(attr.name, attr.value);
|
|
176005
175969
|
});
|
|
175970
|
+
child.replaceWith(p);
|
|
176006
175971
|
}
|
|
176007
175972
|
parseNode(child);
|
|
176008
175973
|
});
|
|
176009
|
-
if (tables.length) {
|
|
176010
|
-
fixTables(tables);
|
|
176011
|
-
}
|
|
176012
175974
|
};
|
|
176013
|
-
parseNode(
|
|
176014
|
-
return
|
|
175975
|
+
parseNode(el);
|
|
175976
|
+
return el.innerHTML;
|
|
176015
175977
|
};
|
|
176016
175978
|
var htmlToValue = function htmlToValue(html) {
|
|
176017
175979
|
try {
|
|
176018
|
-
return serializer.deserialize(
|
|
175980
|
+
return serializer.deserialize(wrapHtmlProperly(reduceRedundantNewLineCharacters(reduceMultipleBrs(html))));
|
|
176019
175981
|
} catch (e) {
|
|
176020
175982
|
console.log("Couldn't parse html: ", e);
|
|
176021
175983
|
return {};
|
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.4.4-next.
|
|
4
|
+
"version": "3.4.4-next.9+0d9ce0b3b",
|
|
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.3.4-next.
|
|
11
|
-
"@pie-element/rubric": "^4.4.4-next.
|
|
10
|
+
"@pie-element/multi-trait-rubric": "^4.3.4-next.9+0d9ce0b3b",
|
|
11
|
+
"@pie-element/rubric": "^4.4.4-next.9+0d9ce0b3b",
|
|
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": "0d9ce0b3ba004625b63eec1704ad22da1c14bcad",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|