@pie-element/extended-text-entry 6.8.1 → 6.8.4
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 +24 -0
- package/configure/CHANGELOG.md +24 -0
- package/configure/package.json +3 -3
- package/module/configure.js +3 -3
- package/module/element.js +67 -33
- package/module/index.html +1 -1
- package/module/manifest.json +5 -5
- package/module/print.html +1 -1
- package/module/print.js +67 -33
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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
|
+
## [6.8.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.3...@pie-element/extended-text-entry@6.8.4) (2022-03-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [6.8.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.2...@pie-element/extended-text-entry@6.8.3) (2022-03-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [6.8.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.1...@pie-element/extended-text-entry@6.8.2) (2022-02-21)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [6.8.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry@6.8.0...@pie-element/extended-text-entry@6.8.1) (2022-02-04)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @pie-element/extended-text-entry
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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
|
+
## [5.4.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.12...@pie-element/extended-text-entry-configure@5.4.13) (2022-03-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [5.4.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.11...@pie-element/extended-text-entry-configure@5.4.12) (2022-03-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [5.4.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.10...@pie-element/extended-text-entry-configure@5.4.11) (2022-02-21)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [5.4.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.9...@pie-element/extended-text-entry-configure@5.4.10) (2022-02-04)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "5.4.
|
|
4
|
+
"version": "5.4.13",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@material-ui/core": "^3.9.2",
|
|
12
12
|
"@pie-framework/pie-configure-events": "^1.2.0",
|
|
13
|
-
"@pie-lib/config-ui": "^10.10.
|
|
14
|
-
"@pie-lib/editable-html": "^7.
|
|
13
|
+
"@pie-lib/config-ui": "^10.10.23",
|
|
14
|
+
"@pie-lib/editable-html": "^7.19.2",
|
|
15
15
|
"lodash": "^4.17.15",
|
|
16
16
|
"prop-types": "^15.6.2",
|
|
17
17
|
"react": "^16.8.1",
|
package/module/configure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.2
|
|
2
|
-
import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.
|
|
3
|
-
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.2/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.25/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.1/module/index.js";
|
|
4
4
|
var lib = {};
|
|
5
5
|
Object.defineProperty(lib, "__esModule", {
|
|
6
6
|
value: true
|
package/module/element.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.2
|
|
2
|
-
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.
|
|
3
|
-
import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.
|
|
4
|
-
import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.
|
|
1
|
+
import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.4.2/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.27/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.23/module/index.js";
|
|
4
|
+
import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.25/module/index.js";
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
function getDefaultExportFromCjs(x) {
|
|
7
7
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -30654,20 +30654,24 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30654
30654
|
if (node.object !== 'document') {
|
|
30655
30655
|
return;
|
|
30656
30656
|
}
|
|
30657
|
+
const tableAdded = node.findDescendant(d => d.data && d.data.get('newTable'));
|
|
30658
|
+
if (!tableAdded) {
|
|
30659
|
+
return;
|
|
30660
|
+
}
|
|
30661
|
+
const nodeToSearch = node.getParent(tableAdded.key) || node;
|
|
30657
30662
|
let shouldAddTextAfterNode = false;
|
|
30658
|
-
const indexToNotHaveTableOn =
|
|
30659
|
-
const indexOfLastTable =
|
|
30663
|
+
const indexToNotHaveTableOn = nodeToSearch.nodes.size - 1;
|
|
30664
|
+
const indexOfLastTable = nodeToSearch.nodes.findLastIndex(d => d.type === 'table');
|
|
30660
30665
|
if (indexOfLastTable === indexToNotHaveTableOn) {
|
|
30661
30666
|
shouldAddTextAfterNode = true;
|
|
30662
30667
|
}
|
|
30663
30668
|
if (!shouldAddTextAfterNode) {
|
|
30664
30669
|
return;
|
|
30665
30670
|
}
|
|
30666
|
-
const tableNode = node.nodes.get(indexOfLastTable);
|
|
30667
30671
|
return change => {
|
|
30668
30672
|
if (shouldAddTextAfterNode) {
|
|
30669
|
-
const tableJSON =
|
|
30670
|
-
change.removeNodeByKey(
|
|
30673
|
+
const tableJSON = tableAdded.toJSON();
|
|
30674
|
+
change.removeNodeByKey(tableAdded.key);
|
|
30671
30675
|
const newBlock = Block.create({
|
|
30672
30676
|
object: 'block',
|
|
30673
30677
|
type: 'div'
|
|
@@ -30792,13 +30796,13 @@ const serialization$1 = {
|
|
|
30792
30796
|
__self: this,
|
|
30793
30797
|
__source: {
|
|
30794
30798
|
fileName: _jsxFileName$e,
|
|
30795
|
-
lineNumber:
|
|
30799
|
+
lineNumber: 418
|
|
30796
30800
|
}
|
|
30797
30801
|
}, React$f.createElement('tbody', {
|
|
30798
30802
|
__self: this,
|
|
30799
30803
|
__source: {
|
|
30800
30804
|
fileName: _jsxFileName$e,
|
|
30801
|
-
lineNumber:
|
|
30805
|
+
lineNumber: 419
|
|
30802
30806
|
}
|
|
30803
30807
|
}, children));
|
|
30804
30808
|
}
|
|
@@ -30808,7 +30812,7 @@ const serialization$1 = {
|
|
|
30808
30812
|
__self: this,
|
|
30809
30813
|
__source: {
|
|
30810
30814
|
fileName: _jsxFileName$e,
|
|
30811
|
-
lineNumber:
|
|
30815
|
+
lineNumber: 424
|
|
30812
30816
|
}
|
|
30813
30817
|
}, children);
|
|
30814
30818
|
}
|
|
@@ -30822,7 +30826,7 @@ const serialization$1 = {
|
|
|
30822
30826
|
__self: this,
|
|
30823
30827
|
__source: {
|
|
30824
30828
|
fileName: _jsxFileName$e,
|
|
30825
|
-
lineNumber:
|
|
30829
|
+
lineNumber: 430
|
|
30826
30830
|
}
|
|
30827
30831
|
}, children);
|
|
30828
30832
|
} else {
|
|
@@ -30831,7 +30835,7 @@ const serialization$1 = {
|
|
|
30831
30835
|
__self: this,
|
|
30832
30836
|
__source: {
|
|
30833
30837
|
fileName: _jsxFileName$e,
|
|
30834
|
-
lineNumber:
|
|
30838
|
+
lineNumber: 432
|
|
30835
30839
|
}
|
|
30836
30840
|
}, children);
|
|
30837
30841
|
}
|
|
@@ -31294,7 +31298,7 @@ const ExplicitConstructedResponse = props => {
|
|
|
31294
31298
|
};
|
|
31295
31299
|
ExplicitConstructedResponse.propTypes = {
|
|
31296
31300
|
attributes: PropTypes$5.object,
|
|
31297
|
-
value: PropTypes$5.
|
|
31301
|
+
value: PropTypes$5.string
|
|
31298
31302
|
};
|
|
31299
31303
|
const defaultECR = index => Inline.create({
|
|
31300
31304
|
type: 'explicit_constructed_response',
|
|
@@ -31336,14 +31340,19 @@ const {isUndefined: isUndefined} = _dll_lodash;
|
|
|
31336
31340
|
const _jsxFileName$8 = "/home/circleci/repo/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx";
|
|
31337
31341
|
const log$8 = debug$8('@pie-lib:editable-html:plugins:respArea');
|
|
31338
31342
|
const lastIndexMap = {};
|
|
31339
|
-
const
|
|
31343
|
+
const elTypesMap = {
|
|
31344
|
+
'inline-dropdown': 'inline_dropdown',
|
|
31345
|
+
'explicit-constructed-response': 'explicit_constructed_response',
|
|
31346
|
+
'drag-in-the-blank': 'drag_in_the_blank'
|
|
31347
|
+
};
|
|
31348
|
+
const elTypesArray = Object.values(elTypesMap);
|
|
31340
31349
|
function ResponseAreaPlugin(opts) {
|
|
31341
31350
|
const toolbar = {
|
|
31342
31351
|
icon: React$9.createElement(ToolbarIcon, {
|
|
31343
31352
|
__self: this,
|
|
31344
31353
|
__source: {
|
|
31345
31354
|
fileName: _jsxFileName$8,
|
|
31346
|
-
lineNumber:
|
|
31355
|
+
lineNumber: 23
|
|
31347
31356
|
}
|
|
31348
31357
|
}),
|
|
31349
31358
|
buttonStyles: {
|
|
@@ -31406,7 +31415,7 @@ function ResponseAreaPlugin(opts) {
|
|
|
31406
31415
|
__self: this,
|
|
31407
31416
|
__source: {
|
|
31408
31417
|
fileName: _jsxFileName$8,
|
|
31409
|
-
lineNumber:
|
|
31418
|
+
lineNumber: 93
|
|
31410
31419
|
}
|
|
31411
31420
|
});
|
|
31412
31421
|
}
|
|
@@ -31421,7 +31430,7 @@ function ResponseAreaPlugin(opts) {
|
|
|
31421
31430
|
__self: this,
|
|
31422
31431
|
__source: {
|
|
31423
31432
|
fileName: _jsxFileName$8,
|
|
31424
|
-
lineNumber:
|
|
31433
|
+
lineNumber: 100
|
|
31425
31434
|
}
|
|
31426
31435
|
});
|
|
31427
31436
|
}
|
|
@@ -31433,12 +31442,12 @@ function ResponseAreaPlugin(opts) {
|
|
|
31433
31442
|
__self: this,
|
|
31434
31443
|
__source: {
|
|
31435
31444
|
fileName: _jsxFileName$8,
|
|
31436
|
-
lineNumber:
|
|
31445
|
+
lineNumber: 107
|
|
31437
31446
|
}
|
|
31438
31447
|
});
|
|
31439
31448
|
}
|
|
31440
31449
|
},
|
|
31441
|
-
onChange(change) {
|
|
31450
|
+
onChange(change, editor) {
|
|
31442
31451
|
const type = opts.type.replace(/-/g, '_');
|
|
31443
31452
|
if (isUndefined(lastIndexMap[type])) {
|
|
31444
31453
|
lastIndexMap[type] = 0;
|
|
@@ -31451,6 +31460,18 @@ function ResponseAreaPlugin(opts) {
|
|
|
31451
31460
|
}
|
|
31452
31461
|
});
|
|
31453
31462
|
}
|
|
31463
|
+
if (!editor.value) {
|
|
31464
|
+
return;
|
|
31465
|
+
}
|
|
31466
|
+
const isOfCurrentType = d => d.type === opts.type || d.type === elTypesMap[opts.type];
|
|
31467
|
+
const currentRespAreaList = change.value.document.filterDescendants(isOfCurrentType);
|
|
31468
|
+
const oldRespAreaList = editor.value.document.filterDescendants(isOfCurrentType);
|
|
31469
|
+
const arrayToFilter = oldRespAreaList.size > currentRespAreaList.size ? oldRespAreaList : currentRespAreaList;
|
|
31470
|
+
const arrayToUseForFilter = arrayToFilter === oldRespAreaList ? currentRespAreaList : oldRespAreaList;
|
|
31471
|
+
const elementsWithChangedStatus = arrayToFilter.filter(d => !arrayToUseForFilter.find(e => e.data.get('index') === d.data.get('index')));
|
|
31472
|
+
if (elementsWithChangedStatus.size && oldRespAreaList.size > currentRespAreaList.size) {
|
|
31473
|
+
opts.onHandleAreaChange(elementsWithChangedStatus);
|
|
31474
|
+
}
|
|
31454
31475
|
},
|
|
31455
31476
|
onDrop(event, change, editor) {
|
|
31456
31477
|
const closestEl = event.target.closest('[data-key]');
|
|
@@ -31514,7 +31535,7 @@ const serialization = {
|
|
|
31514
31535
|
__self: this,
|
|
31515
31536
|
__source: {
|
|
31516
31537
|
fileName: _jsxFileName$8,
|
|
31517
|
-
lineNumber:
|
|
31538
|
+
lineNumber: 207
|
|
31518
31539
|
}
|
|
31519
31540
|
});
|
|
31520
31541
|
}
|
|
@@ -31528,7 +31549,7 @@ const serialization = {
|
|
|
31528
31549
|
__self: this,
|
|
31529
31550
|
__source: {
|
|
31530
31551
|
fileName: _jsxFileName$8,
|
|
31531
|
-
lineNumber:
|
|
31552
|
+
lineNumber: 213
|
|
31532
31553
|
}
|
|
31533
31554
|
});
|
|
31534
31555
|
}
|
|
@@ -31544,7 +31565,7 @@ const serialization = {
|
|
|
31544
31565
|
__self: this,
|
|
31545
31566
|
__source: {
|
|
31546
31567
|
fileName: _jsxFileName$8,
|
|
31547
|
-
lineNumber:
|
|
31568
|
+
lineNumber: 224
|
|
31548
31569
|
}
|
|
31549
31570
|
});
|
|
31550
31571
|
}
|
|
@@ -31872,7 +31893,7 @@ class Toolbar extends React$7.Component {
|
|
|
31872
31893
|
position: PropTypes$4.oneOf(['bottom', 'top']),
|
|
31873
31894
|
alignment: PropTypes$4.oneOf(['left', 'right']),
|
|
31874
31895
|
alwaysVisible: PropTypes$4.bool,
|
|
31875
|
-
ref: PropTypes$4.
|
|
31896
|
+
ref: PropTypes$4.func,
|
|
31876
31897
|
showDone: PropTypes$4.bool
|
|
31877
31898
|
}),
|
|
31878
31899
|
onDataChange: PropTypes$4.func
|
|
@@ -32660,6 +32681,11 @@ const defaultToolbarOpts = {
|
|
|
32660
32681
|
showDone: true,
|
|
32661
32682
|
doneOn: 'blur'
|
|
32662
32683
|
};
|
|
32684
|
+
const defaultResponseAreaProps = {
|
|
32685
|
+
options: {},
|
|
32686
|
+
respAreaToolbar: () => {},
|
|
32687
|
+
onHandleAreaChange: () => {}
|
|
32688
|
+
};
|
|
32663
32689
|
const createToolbarOpts = toolbarOpts => {
|
|
32664
32690
|
return {
|
|
32665
32691
|
...defaultToolbarOpts,
|
|
@@ -32686,6 +32712,7 @@ class Editor extends React$3.Component {
|
|
|
32686
32712
|
classes: PropTypes$2.object.isRequired,
|
|
32687
32713
|
highlightShape: PropTypes$2.bool,
|
|
32688
32714
|
disabled: PropTypes$2.bool,
|
|
32715
|
+
spellCheck: PropTypes$2.bool,
|
|
32689
32716
|
nonEmpty: PropTypes$2.bool,
|
|
32690
32717
|
disableUnderline: PropTypes$2.bool,
|
|
32691
32718
|
autoWidthToolbar: PropTypes$2.bool,
|
|
@@ -32695,7 +32722,7 @@ class Editor extends React$3.Component {
|
|
|
32695
32722
|
type: PropTypes$2.oneOf(['explicit-constructed-response', 'inline-dropdown', 'drag-in-the-blank']),
|
|
32696
32723
|
options: PropTypes$2.object,
|
|
32697
32724
|
respAreaToolbar: PropTypes$2.func,
|
|
32698
|
-
|
|
32725
|
+
onHandleAreaChange: PropTypes$2.func
|
|
32699
32726
|
}),
|
|
32700
32727
|
toolbarOpts: PropTypes$2.shape({
|
|
32701
32728
|
position: PropTypes$2.oneOf(['bottom', 'top']),
|
|
@@ -32716,8 +32743,9 @@ class Editor extends React$3.Component {
|
|
|
32716
32743
|
disableUnderline: true,
|
|
32717
32744
|
onFocus: () => {},
|
|
32718
32745
|
onBlur: () => {},
|
|
32746
|
+
onKeyDown: () => {},
|
|
32719
32747
|
toolbarOpts: defaultToolbarOpts,
|
|
32720
|
-
|
|
32748
|
+
responseAreaProps: defaultResponseAreaProps
|
|
32721
32749
|
};
|
|
32722
32750
|
}
|
|
32723
32751
|
constructor(props) {
|
|
@@ -32741,6 +32769,10 @@ class Editor extends React$3.Component {
|
|
|
32741
32769
|
value: props.value,
|
|
32742
32770
|
toolbarOpts: createToolbarOpts(props.toolbarOpts)
|
|
32743
32771
|
};
|
|
32772
|
+
const normalizedResponseAreaProps = {
|
|
32773
|
+
...defaultResponseAreaProps,
|
|
32774
|
+
...props.responseAreaProps
|
|
32775
|
+
};
|
|
32744
32776
|
this.onResize = () => {
|
|
32745
32777
|
props.onChange(this.state.value, true);
|
|
32746
32778
|
};
|
|
@@ -32794,9 +32826,10 @@ class Editor extends React$3.Component {
|
|
|
32794
32826
|
}
|
|
32795
32827
|
},
|
|
32796
32828
|
responseArea: {
|
|
32797
|
-
type:
|
|
32798
|
-
options:
|
|
32799
|
-
respAreaToolbar:
|
|
32829
|
+
type: normalizedResponseAreaProps.type,
|
|
32830
|
+
options: normalizedResponseAreaProps.options,
|
|
32831
|
+
respAreaToolbar: normalizedResponseAreaProps.respAreaToolbar,
|
|
32832
|
+
onHandleAreaChange: normalizedResponseAreaProps.onHandleAreaChange,
|
|
32800
32833
|
onFocus: () => {
|
|
32801
32834
|
log$3('[table:onFocus]...');
|
|
32802
32835
|
this.onPluginFocus();
|
|
@@ -33100,7 +33133,7 @@ class Editor extends React$3.Component {
|
|
|
33100
33133
|
};
|
|
33101
33134
|
}
|
|
33102
33135
|
render() {
|
|
33103
|
-
const {disabled, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
|
|
33136
|
+
const {disabled, spellCheck, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
|
|
33104
33137
|
const {value, focusedNode, toolbarOpts} = this.state;
|
|
33105
33138
|
log$3('[render] value: ', value);
|
|
33106
33139
|
const sizeStyle = this.buildSizeStyle();
|
|
@@ -33117,7 +33150,7 @@ class Editor extends React$3.Component {
|
|
|
33117
33150
|
__self: this,
|
|
33118
33151
|
__source: {
|
|
33119
33152
|
fileName: _jsxFileName$2,
|
|
33120
|
-
lineNumber:
|
|
33153
|
+
lineNumber: 559
|
|
33121
33154
|
}
|
|
33122
33155
|
}, React$3.createElement(Editor$2, {
|
|
33123
33156
|
plugins: this.plugins,
|
|
@@ -33142,6 +33175,7 @@ class Editor extends React$3.Component {
|
|
|
33142
33175
|
focusedNode: focusedNode,
|
|
33143
33176
|
normalize: this.normalize,
|
|
33144
33177
|
readOnly: disabled,
|
|
33178
|
+
spellCheck: spellCheck,
|
|
33145
33179
|
className: classes.slateEditor,
|
|
33146
33180
|
style: {
|
|
33147
33181
|
minHeight: sizeStyle.minHeight,
|
|
@@ -33155,7 +33189,7 @@ class Editor extends React$3.Component {
|
|
|
33155
33189
|
__self: this,
|
|
33156
33190
|
__source: {
|
|
33157
33191
|
fileName: _jsxFileName$2,
|
|
33158
|
-
lineNumber:
|
|
33192
|
+
lineNumber: 564
|
|
33159
33193
|
}
|
|
33160
33194
|
}));
|
|
33161
33195
|
}
|
package/module/index.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!doctype html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
|
-
<title>@pie-element/extended-text-entry@6.8.
|
|
5
|
+
<title>@pie-element/extended-text-entry@6.8.3</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>
|
package/module/manifest.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.3",
|
|
4
4
|
"modules": [
|
|
5
5
|
{
|
|
6
6
|
"name": "@pie-lib/shared-module",
|
|
7
|
-
"version": "^1.2
|
|
7
|
+
"version": "^1.4.2"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"name": "@pie-lib/math-rendering-module",
|
|
11
|
-
"version": "^1.0.
|
|
11
|
+
"version": "^1.0.27"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "@pie-lib/math-edit-module",
|
|
15
|
-
"version": "^1.1.
|
|
15
|
+
"version": "^1.1.23"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "@pie-lib/drag-module",
|
|
19
|
-
"version": "^1.0.
|
|
19
|
+
"version": "^1.0.25"
|
|
20
20
|
}
|
|
21
21
|
]
|
|
22
22
|
}
|
package/module/print.html
CHANGED
package/module/print.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.2
|
|
2
|
-
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.
|
|
3
|
-
import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.
|
|
4
|
-
import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.
|
|
1
|
+
import {_dll_debug, _dll_lodash, _dll_react_dom, _dll_prop_types, _dll_react, _dll_react_dom_server, _dll_material_ui__core, _dll_classnames, _dll_material_ui__core_styles, _dll_material_ui__icons, _dll_pie_lib__render_ui} from "../../../@pie-lib/shared-module@^1.4.2/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__math_rendering} from "../../../@pie-lib/math-rendering-module@^1.0.27/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__math_toolbar} from "../../../@pie-lib/math-edit-module@^1.1.23/module/index.js";
|
|
4
|
+
import {_dll_pie_lib__drag} from "../../../@pie-lib/drag-module@^1.0.25/module/index.js";
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
function getDefaultExportFromCjs(x) {
|
|
7
7
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -30654,20 +30654,24 @@ var TablePlugin = (opts, toolbarPlugins) => {
|
|
|
30654
30654
|
if (node.object !== 'document') {
|
|
30655
30655
|
return;
|
|
30656
30656
|
}
|
|
30657
|
+
const tableAdded = node.findDescendant(d => d.data && d.data.get('newTable'));
|
|
30658
|
+
if (!tableAdded) {
|
|
30659
|
+
return;
|
|
30660
|
+
}
|
|
30661
|
+
const nodeToSearch = node.getParent(tableAdded.key) || node;
|
|
30657
30662
|
let shouldAddTextAfterNode = false;
|
|
30658
|
-
const indexToNotHaveTableOn =
|
|
30659
|
-
const indexOfLastTable =
|
|
30663
|
+
const indexToNotHaveTableOn = nodeToSearch.nodes.size - 1;
|
|
30664
|
+
const indexOfLastTable = nodeToSearch.nodes.findLastIndex(d => d.type === 'table');
|
|
30660
30665
|
if (indexOfLastTable === indexToNotHaveTableOn) {
|
|
30661
30666
|
shouldAddTextAfterNode = true;
|
|
30662
30667
|
}
|
|
30663
30668
|
if (!shouldAddTextAfterNode) {
|
|
30664
30669
|
return;
|
|
30665
30670
|
}
|
|
30666
|
-
const tableNode = node.nodes.get(indexOfLastTable);
|
|
30667
30671
|
return change => {
|
|
30668
30672
|
if (shouldAddTextAfterNode) {
|
|
30669
|
-
const tableJSON =
|
|
30670
|
-
change.removeNodeByKey(
|
|
30673
|
+
const tableJSON = tableAdded.toJSON();
|
|
30674
|
+
change.removeNodeByKey(tableAdded.key);
|
|
30671
30675
|
const newBlock = Block.create({
|
|
30672
30676
|
object: 'block',
|
|
30673
30677
|
type: 'div'
|
|
@@ -30792,13 +30796,13 @@ const serialization$1 = {
|
|
|
30792
30796
|
__self: this,
|
|
30793
30797
|
__source: {
|
|
30794
30798
|
fileName: _jsxFileName$e,
|
|
30795
|
-
lineNumber:
|
|
30799
|
+
lineNumber: 418
|
|
30796
30800
|
}
|
|
30797
30801
|
}, React$f.createElement('tbody', {
|
|
30798
30802
|
__self: this,
|
|
30799
30803
|
__source: {
|
|
30800
30804
|
fileName: _jsxFileName$e,
|
|
30801
|
-
lineNumber:
|
|
30805
|
+
lineNumber: 419
|
|
30802
30806
|
}
|
|
30803
30807
|
}, children));
|
|
30804
30808
|
}
|
|
@@ -30808,7 +30812,7 @@ const serialization$1 = {
|
|
|
30808
30812
|
__self: this,
|
|
30809
30813
|
__source: {
|
|
30810
30814
|
fileName: _jsxFileName$e,
|
|
30811
|
-
lineNumber:
|
|
30815
|
+
lineNumber: 424
|
|
30812
30816
|
}
|
|
30813
30817
|
}, children);
|
|
30814
30818
|
}
|
|
@@ -30822,7 +30826,7 @@ const serialization$1 = {
|
|
|
30822
30826
|
__self: this,
|
|
30823
30827
|
__source: {
|
|
30824
30828
|
fileName: _jsxFileName$e,
|
|
30825
|
-
lineNumber:
|
|
30829
|
+
lineNumber: 430
|
|
30826
30830
|
}
|
|
30827
30831
|
}, children);
|
|
30828
30832
|
} else {
|
|
@@ -30831,7 +30835,7 @@ const serialization$1 = {
|
|
|
30831
30835
|
__self: this,
|
|
30832
30836
|
__source: {
|
|
30833
30837
|
fileName: _jsxFileName$e,
|
|
30834
|
-
lineNumber:
|
|
30838
|
+
lineNumber: 432
|
|
30835
30839
|
}
|
|
30836
30840
|
}, children);
|
|
30837
30841
|
}
|
|
@@ -31294,7 +31298,7 @@ const ExplicitConstructedResponse = props => {
|
|
|
31294
31298
|
};
|
|
31295
31299
|
ExplicitConstructedResponse.propTypes = {
|
|
31296
31300
|
attributes: PropTypes$5.object,
|
|
31297
|
-
value: PropTypes$5.
|
|
31301
|
+
value: PropTypes$5.string
|
|
31298
31302
|
};
|
|
31299
31303
|
const defaultECR = index => Inline.create({
|
|
31300
31304
|
type: 'explicit_constructed_response',
|
|
@@ -31336,14 +31340,19 @@ const {isUndefined: isUndefined} = _dll_lodash;
|
|
|
31336
31340
|
const _jsxFileName$8 = "/home/circleci/repo/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx";
|
|
31337
31341
|
const log$8 = debug$8('@pie-lib:editable-html:plugins:respArea');
|
|
31338
31342
|
const lastIndexMap = {};
|
|
31339
|
-
const
|
|
31343
|
+
const elTypesMap = {
|
|
31344
|
+
'inline-dropdown': 'inline_dropdown',
|
|
31345
|
+
'explicit-constructed-response': 'explicit_constructed_response',
|
|
31346
|
+
'drag-in-the-blank': 'drag_in_the_blank'
|
|
31347
|
+
};
|
|
31348
|
+
const elTypesArray = Object.values(elTypesMap);
|
|
31340
31349
|
function ResponseAreaPlugin(opts) {
|
|
31341
31350
|
const toolbar = {
|
|
31342
31351
|
icon: React$9.createElement(ToolbarIcon, {
|
|
31343
31352
|
__self: this,
|
|
31344
31353
|
__source: {
|
|
31345
31354
|
fileName: _jsxFileName$8,
|
|
31346
|
-
lineNumber:
|
|
31355
|
+
lineNumber: 23
|
|
31347
31356
|
}
|
|
31348
31357
|
}),
|
|
31349
31358
|
buttonStyles: {
|
|
@@ -31406,7 +31415,7 @@ function ResponseAreaPlugin(opts) {
|
|
|
31406
31415
|
__self: this,
|
|
31407
31416
|
__source: {
|
|
31408
31417
|
fileName: _jsxFileName$8,
|
|
31409
|
-
lineNumber:
|
|
31418
|
+
lineNumber: 93
|
|
31410
31419
|
}
|
|
31411
31420
|
});
|
|
31412
31421
|
}
|
|
@@ -31421,7 +31430,7 @@ function ResponseAreaPlugin(opts) {
|
|
|
31421
31430
|
__self: this,
|
|
31422
31431
|
__source: {
|
|
31423
31432
|
fileName: _jsxFileName$8,
|
|
31424
|
-
lineNumber:
|
|
31433
|
+
lineNumber: 100
|
|
31425
31434
|
}
|
|
31426
31435
|
});
|
|
31427
31436
|
}
|
|
@@ -31433,12 +31442,12 @@ function ResponseAreaPlugin(opts) {
|
|
|
31433
31442
|
__self: this,
|
|
31434
31443
|
__source: {
|
|
31435
31444
|
fileName: _jsxFileName$8,
|
|
31436
|
-
lineNumber:
|
|
31445
|
+
lineNumber: 107
|
|
31437
31446
|
}
|
|
31438
31447
|
});
|
|
31439
31448
|
}
|
|
31440
31449
|
},
|
|
31441
|
-
onChange(change) {
|
|
31450
|
+
onChange(change, editor) {
|
|
31442
31451
|
const type = opts.type.replace(/-/g, '_');
|
|
31443
31452
|
if (isUndefined(lastIndexMap[type])) {
|
|
31444
31453
|
lastIndexMap[type] = 0;
|
|
@@ -31451,6 +31460,18 @@ function ResponseAreaPlugin(opts) {
|
|
|
31451
31460
|
}
|
|
31452
31461
|
});
|
|
31453
31462
|
}
|
|
31463
|
+
if (!editor.value) {
|
|
31464
|
+
return;
|
|
31465
|
+
}
|
|
31466
|
+
const isOfCurrentType = d => d.type === opts.type || d.type === elTypesMap[opts.type];
|
|
31467
|
+
const currentRespAreaList = change.value.document.filterDescendants(isOfCurrentType);
|
|
31468
|
+
const oldRespAreaList = editor.value.document.filterDescendants(isOfCurrentType);
|
|
31469
|
+
const arrayToFilter = oldRespAreaList.size > currentRespAreaList.size ? oldRespAreaList : currentRespAreaList;
|
|
31470
|
+
const arrayToUseForFilter = arrayToFilter === oldRespAreaList ? currentRespAreaList : oldRespAreaList;
|
|
31471
|
+
const elementsWithChangedStatus = arrayToFilter.filter(d => !arrayToUseForFilter.find(e => e.data.get('index') === d.data.get('index')));
|
|
31472
|
+
if (elementsWithChangedStatus.size && oldRespAreaList.size > currentRespAreaList.size) {
|
|
31473
|
+
opts.onHandleAreaChange(elementsWithChangedStatus);
|
|
31474
|
+
}
|
|
31454
31475
|
},
|
|
31455
31476
|
onDrop(event, change, editor) {
|
|
31456
31477
|
const closestEl = event.target.closest('[data-key]');
|
|
@@ -31514,7 +31535,7 @@ const serialization = {
|
|
|
31514
31535
|
__self: this,
|
|
31515
31536
|
__source: {
|
|
31516
31537
|
fileName: _jsxFileName$8,
|
|
31517
|
-
lineNumber:
|
|
31538
|
+
lineNumber: 207
|
|
31518
31539
|
}
|
|
31519
31540
|
});
|
|
31520
31541
|
}
|
|
@@ -31528,7 +31549,7 @@ const serialization = {
|
|
|
31528
31549
|
__self: this,
|
|
31529
31550
|
__source: {
|
|
31530
31551
|
fileName: _jsxFileName$8,
|
|
31531
|
-
lineNumber:
|
|
31552
|
+
lineNumber: 213
|
|
31532
31553
|
}
|
|
31533
31554
|
});
|
|
31534
31555
|
}
|
|
@@ -31544,7 +31565,7 @@ const serialization = {
|
|
|
31544
31565
|
__self: this,
|
|
31545
31566
|
__source: {
|
|
31546
31567
|
fileName: _jsxFileName$8,
|
|
31547
|
-
lineNumber:
|
|
31568
|
+
lineNumber: 224
|
|
31548
31569
|
}
|
|
31549
31570
|
});
|
|
31550
31571
|
}
|
|
@@ -31872,7 +31893,7 @@ class Toolbar extends React$7.Component {
|
|
|
31872
31893
|
position: PropTypes$4.oneOf(['bottom', 'top']),
|
|
31873
31894
|
alignment: PropTypes$4.oneOf(['left', 'right']),
|
|
31874
31895
|
alwaysVisible: PropTypes$4.bool,
|
|
31875
|
-
ref: PropTypes$4.
|
|
31896
|
+
ref: PropTypes$4.func,
|
|
31876
31897
|
showDone: PropTypes$4.bool
|
|
31877
31898
|
}),
|
|
31878
31899
|
onDataChange: PropTypes$4.func
|
|
@@ -32660,6 +32681,11 @@ const defaultToolbarOpts = {
|
|
|
32660
32681
|
showDone: true,
|
|
32661
32682
|
doneOn: 'blur'
|
|
32662
32683
|
};
|
|
32684
|
+
const defaultResponseAreaProps = {
|
|
32685
|
+
options: {},
|
|
32686
|
+
respAreaToolbar: () => {},
|
|
32687
|
+
onHandleAreaChange: () => {}
|
|
32688
|
+
};
|
|
32663
32689
|
const createToolbarOpts = toolbarOpts => {
|
|
32664
32690
|
return {
|
|
32665
32691
|
...defaultToolbarOpts,
|
|
@@ -32686,6 +32712,7 @@ class Editor extends React$3.Component {
|
|
|
32686
32712
|
classes: PropTypes$2.object.isRequired,
|
|
32687
32713
|
highlightShape: PropTypes$2.bool,
|
|
32688
32714
|
disabled: PropTypes$2.bool,
|
|
32715
|
+
spellCheck: PropTypes$2.bool,
|
|
32689
32716
|
nonEmpty: PropTypes$2.bool,
|
|
32690
32717
|
disableUnderline: PropTypes$2.bool,
|
|
32691
32718
|
autoWidthToolbar: PropTypes$2.bool,
|
|
@@ -32695,7 +32722,7 @@ class Editor extends React$3.Component {
|
|
|
32695
32722
|
type: PropTypes$2.oneOf(['explicit-constructed-response', 'inline-dropdown', 'drag-in-the-blank']),
|
|
32696
32723
|
options: PropTypes$2.object,
|
|
32697
32724
|
respAreaToolbar: PropTypes$2.func,
|
|
32698
|
-
|
|
32725
|
+
onHandleAreaChange: PropTypes$2.func
|
|
32699
32726
|
}),
|
|
32700
32727
|
toolbarOpts: PropTypes$2.shape({
|
|
32701
32728
|
position: PropTypes$2.oneOf(['bottom', 'top']),
|
|
@@ -32716,8 +32743,9 @@ class Editor extends React$3.Component {
|
|
|
32716
32743
|
disableUnderline: true,
|
|
32717
32744
|
onFocus: () => {},
|
|
32718
32745
|
onBlur: () => {},
|
|
32746
|
+
onKeyDown: () => {},
|
|
32719
32747
|
toolbarOpts: defaultToolbarOpts,
|
|
32720
|
-
|
|
32748
|
+
responseAreaProps: defaultResponseAreaProps
|
|
32721
32749
|
};
|
|
32722
32750
|
}
|
|
32723
32751
|
constructor(props) {
|
|
@@ -32741,6 +32769,10 @@ class Editor extends React$3.Component {
|
|
|
32741
32769
|
value: props.value,
|
|
32742
32770
|
toolbarOpts: createToolbarOpts(props.toolbarOpts)
|
|
32743
32771
|
};
|
|
32772
|
+
const normalizedResponseAreaProps = {
|
|
32773
|
+
...defaultResponseAreaProps,
|
|
32774
|
+
...props.responseAreaProps
|
|
32775
|
+
};
|
|
32744
32776
|
this.onResize = () => {
|
|
32745
32777
|
props.onChange(this.state.value, true);
|
|
32746
32778
|
};
|
|
@@ -32794,9 +32826,10 @@ class Editor extends React$3.Component {
|
|
|
32794
32826
|
}
|
|
32795
32827
|
},
|
|
32796
32828
|
responseArea: {
|
|
32797
|
-
type:
|
|
32798
|
-
options:
|
|
32799
|
-
respAreaToolbar:
|
|
32829
|
+
type: normalizedResponseAreaProps.type,
|
|
32830
|
+
options: normalizedResponseAreaProps.options,
|
|
32831
|
+
respAreaToolbar: normalizedResponseAreaProps.respAreaToolbar,
|
|
32832
|
+
onHandleAreaChange: normalizedResponseAreaProps.onHandleAreaChange,
|
|
32800
32833
|
onFocus: () => {
|
|
32801
32834
|
log$3('[table:onFocus]...');
|
|
32802
32835
|
this.onPluginFocus();
|
|
@@ -33100,7 +33133,7 @@ class Editor extends React$3.Component {
|
|
|
33100
33133
|
};
|
|
33101
33134
|
}
|
|
33102
33135
|
render() {
|
|
33103
|
-
const {disabled, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
|
|
33136
|
+
const {disabled, spellCheck, highlightShape, classes, className, placeholder, pluginProps, onKeyDown} = this.props;
|
|
33104
33137
|
const {value, focusedNode, toolbarOpts} = this.state;
|
|
33105
33138
|
log$3('[render] value: ', value);
|
|
33106
33139
|
const sizeStyle = this.buildSizeStyle();
|
|
@@ -33117,7 +33150,7 @@ class Editor extends React$3.Component {
|
|
|
33117
33150
|
__self: this,
|
|
33118
33151
|
__source: {
|
|
33119
33152
|
fileName: _jsxFileName$2,
|
|
33120
|
-
lineNumber:
|
|
33153
|
+
lineNumber: 559
|
|
33121
33154
|
}
|
|
33122
33155
|
}, React$3.createElement(Editor$2, {
|
|
33123
33156
|
plugins: this.plugins,
|
|
@@ -33142,6 +33175,7 @@ class Editor extends React$3.Component {
|
|
|
33142
33175
|
focusedNode: focusedNode,
|
|
33143
33176
|
normalize: this.normalize,
|
|
33144
33177
|
readOnly: disabled,
|
|
33178
|
+
spellCheck: spellCheck,
|
|
33145
33179
|
className: classes.slateEditor,
|
|
33146
33180
|
style: {
|
|
33147
33181
|
minHeight: sizeStyle.minHeight,
|
|
@@ -33155,7 +33189,7 @@ class Editor extends React$3.Component {
|
|
|
33155
33189
|
__self: this,
|
|
33156
33190
|
__source: {
|
|
33157
33191
|
fileName: _jsxFileName$2,
|
|
33158
|
-
lineNumber:
|
|
33192
|
+
lineNumber: 564
|
|
33159
33193
|
}
|
|
33160
33194
|
}));
|
|
33161
33195
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/extended-text-entry",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
13
|
"@material-ui/icons": "^3.0.2",
|
|
14
14
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
15
|
-
"@pie-lib/editable-html": "^7.
|
|
15
|
+
"@pie-lib/editable-html": "^7.19.2",
|
|
16
16
|
"@pie-lib/math-rendering": "^2.3.12",
|
|
17
17
|
"@pie-lib/render-ui": "^4.12.4",
|
|
18
18
|
"classnames": "^2.2.5",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react": "^16.8.1",
|
|
23
23
|
"react-dom": "^16.8.1"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "7b61c8a15ceae75e9e6db5d465abfb6d22c34f30",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"postpublish": "../../scripts/postpublish"
|
|
28
28
|
},
|