@pie-element/complex-rubric 2.10.2-next.31 → 2.10.2-next.32
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/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/editable-html/editor.js +32 -16
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/editable-html/editor.js.map +1 -1
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/editable-html/plugins/image/component.js +4 -18
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/editable-html/plugins/image/component.js.map +1 -1
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/editable-html/plugins/list/index.js +12 -4
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/editable-html/plugins/list/index.js.map +1 -1
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/plot/label.js +2 -2
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/plot/label.js.map +1 -1
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/plot/root.js +3 -3
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/code/plot/root.js.map +1 -1
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/package.json +2 -2
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/src/code/editable-html/editor.jsx +34 -17
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/src/code/editable-html/plugins/image/component.jsx +4 -13
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/src/code/editable-html/plugins/list/index.jsx +9 -4
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/src/code/plot/label.jsx +1 -1
- package/configure/node_modules/@pie-element/rubric/node_modules/@pie-lib/pie-toolbox/src/code/plot/root.jsx +3 -3
- package/module/configure.js +1 -1
- package/module/element.js +1 -1
- package/module/manifest.json +1 -1
- package/module/print.js +1 -1
- package/package.json +2 -2
|
@@ -20,10 +20,7 @@ export class Component extends React.Component {
|
|
|
20
20
|
data: PropTypes.object,
|
|
21
21
|
}).isRequired,
|
|
22
22
|
focused: PropTypes.bool,
|
|
23
|
-
editor: PropTypes.
|
|
24
|
-
change: PropTypes.func.isRequired,
|
|
25
|
-
value: PropTypes.object,
|
|
26
|
-
}).isRequired,
|
|
23
|
+
editor: PropTypes.object.isRequired,
|
|
27
24
|
classes: PropTypes.object.isRequired,
|
|
28
25
|
attributes: PropTypes.object,
|
|
29
26
|
onFocus: PropTypes.func,
|
|
@@ -48,7 +45,7 @@ export class Component extends React.Component {
|
|
|
48
45
|
};
|
|
49
46
|
|
|
50
47
|
applySizeData = () => {
|
|
51
|
-
const { node, editor } = this.props;
|
|
48
|
+
const { node, nodePath, editor } = this.props;
|
|
52
49
|
|
|
53
50
|
let update = cloneDeep(node.data);
|
|
54
51
|
|
|
@@ -61,8 +58,6 @@ export class Component extends React.Component {
|
|
|
61
58
|
log('[applySizeData] update: ', update);
|
|
62
59
|
|
|
63
60
|
if (editor.selection && !isEqual(update, node.data)) {
|
|
64
|
-
const [, nodePath] = Editor.parent(editor, editor.selection);
|
|
65
|
-
|
|
66
61
|
editor.apply({
|
|
67
62
|
type: 'set_node',
|
|
68
63
|
path: nodePath,
|
|
@@ -131,7 +126,7 @@ export class Component extends React.Component {
|
|
|
131
126
|
dimensions: { height: height, width: width },
|
|
132
127
|
});
|
|
133
128
|
|
|
134
|
-
const { node, editor } = this.props;
|
|
129
|
+
const { node, nodePath, editor } = this.props;
|
|
135
130
|
|
|
136
131
|
const update = cloneDeep(node.data);
|
|
137
132
|
|
|
@@ -139,8 +134,6 @@ export class Component extends React.Component {
|
|
|
139
134
|
update.height = height;
|
|
140
135
|
|
|
141
136
|
if (editor.selection && !isEqual(update, node.data)) {
|
|
142
|
-
const [, nodePath] = Editor.parent(editor, editor.selection);
|
|
143
|
-
|
|
144
137
|
editor.apply({
|
|
145
138
|
type: 'set_node',
|
|
146
139
|
path: nodePath,
|
|
@@ -181,7 +174,7 @@ export class Component extends React.Component {
|
|
|
181
174
|
dimensions: { height: height, width: width },
|
|
182
175
|
});
|
|
183
176
|
|
|
184
|
-
const { node, editor } = this.props;
|
|
177
|
+
const { node, nodePath, editor } = this.props;
|
|
185
178
|
|
|
186
179
|
const update = {
|
|
187
180
|
...node.data,
|
|
@@ -190,8 +183,6 @@ export class Component extends React.Component {
|
|
|
190
183
|
};
|
|
191
184
|
|
|
192
185
|
if (!isEqual(update, node.data)) {
|
|
193
|
-
const [, nodePath] = Editor.parent(editor, editor.selection);
|
|
194
|
-
|
|
195
186
|
editor.apply({
|
|
196
187
|
type: 'set_node',
|
|
197
188
|
path: nodePath,
|
|
@@ -420,8 +420,9 @@ export default (options) => {
|
|
|
420
420
|
// Block is empty, we exit the list
|
|
421
421
|
const [, listPath] = editor.parent(currentLiPath);
|
|
422
422
|
const [parentListItem] = listPath.length > 1 ? editor.parent(listPath) : [];
|
|
423
|
+
const isListItem = parentListItem && parentListItem.type === 'li';
|
|
423
424
|
|
|
424
|
-
if (
|
|
425
|
+
if (isListItem) {
|
|
425
426
|
return decreaseItemDepth(editor);
|
|
426
427
|
}
|
|
427
428
|
|
|
@@ -435,7 +436,7 @@ export default (options) => {
|
|
|
435
436
|
editor.apply({
|
|
436
437
|
type: 'split_node',
|
|
437
438
|
path: pathToSplit,
|
|
438
|
-
position:
|
|
439
|
+
position: currentLi.children.length,
|
|
439
440
|
properties: { type: 'li' },
|
|
440
441
|
});
|
|
441
442
|
|
|
@@ -466,8 +467,11 @@ export default (options) => {
|
|
|
466
467
|
|
|
467
468
|
core.onBackSpace = (editor, event) => {
|
|
468
469
|
const startRange = Range.start(editor.selection);
|
|
470
|
+
const isNotOnTheFirstNode = startRange.path[startRange.path.length - 1] !== 0;
|
|
471
|
+
const isNotOnTheFirstIndex = startRange.offset !== 0;
|
|
472
|
+
const isAtStartOfListItem = isNotOnTheFirstNode || isNotOnTheFirstIndex;
|
|
469
473
|
|
|
470
|
-
if (
|
|
474
|
+
if (isAtStartOfListItem) {
|
|
471
475
|
return;
|
|
472
476
|
}
|
|
473
477
|
|
|
@@ -482,8 +486,9 @@ export default (options) => {
|
|
|
482
486
|
// Block is empty, we exit the list
|
|
483
487
|
const [, listPath] = editor.parent(currentLiPath);
|
|
484
488
|
const [parentListItem] = listPath.length > 1 ? editor.parent(listPath) : [];
|
|
489
|
+
const isListItem = parentListItem && parentListItem.type === 'li';
|
|
485
490
|
|
|
486
|
-
if (
|
|
491
|
+
if (isListItem) {
|
|
487
492
|
return decreaseItemDepth(editor);
|
|
488
493
|
}
|
|
489
494
|
|
|
@@ -69,7 +69,6 @@ const LabelComponent = (props) => {
|
|
|
69
69
|
[classes.customBottom]: isChartBottomLabel || isDefineChartBottomLabel,
|
|
70
70
|
})}
|
|
71
71
|
style={rotatedToHorizontal ? rotatedStyle : defaultStyle}
|
|
72
|
-
onClick={rotateLabel}
|
|
73
72
|
>
|
|
74
73
|
{disabledLabel ? (
|
|
75
74
|
<div className={classes.disabledLabel} dangerouslySetInnerHTML={{ __html: text || '' }} />
|
|
@@ -84,6 +83,7 @@ const LabelComponent = (props) => {
|
|
|
84
83
|
}}
|
|
85
84
|
disableScrollbar
|
|
86
85
|
activePlugins={activePlugins}
|
|
86
|
+
onFocus={rotateLabel}
|
|
87
87
|
onDone={() => setRotatedToHorizontal(false)}
|
|
88
88
|
mathMlOptions={mathMlOptions}
|
|
89
89
|
charactersLimit={charactersLimit}
|
|
@@ -68,15 +68,15 @@ export class Root extends React.Component {
|
|
|
68
68
|
|
|
69
69
|
if (isChart) {
|
|
70
70
|
if (side === 'left') {
|
|
71
|
-
onChangeLabels('range', newValue);
|
|
71
|
+
onChangeLabels && onChangeLabels('range', newValue);
|
|
72
72
|
} else {
|
|
73
|
-
onChangeLabels('domain', newValue);
|
|
73
|
+
onChangeLabels && onChangeLabels('domain', newValue);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
onChangeLabels({
|
|
79
|
+
onChangeLabels && onChangeLabels({
|
|
80
80
|
...labels,
|
|
81
81
|
[side]: newValue,
|
|
82
82
|
});
|
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@1.10.4/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@4.11.1-next.
|
|
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@4.11.1-next.13/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) {
|
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_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.10.4/module/index.js";
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.11.1-next.
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.11.1-next.13/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) {
|
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_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.10.4/module/index.js";
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.11.1-next.
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.11.1-next.13/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) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/complex-rubric",
|
|
3
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
-
"version": "2.10.2-next.
|
|
4
|
+
"version": "2.10.2-next.32+453fdc3a0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"lodash": "^4.17.11",
|
|
16
16
|
"prop-types": "^15.7.2"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "453fdc3a036634f3062a6986e606af14dda5912e",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|