@worktile/theia 15.0.16 → 15.0.17
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/esm2020/plugins/common/move-selection.plugin.mjs +1 -2
- package/esm2020/plugins/table/table.plugin.mjs +22 -2
- package/fesm2015/worktile-theia.mjs +19 -2
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +19 -2
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -7753,7 +7753,6 @@ const withMoveSelection = (editor) => {
|
|
|
7753
7753
|
timer(81).subscribe(() => {
|
|
7754
7754
|
Transforms.select(editor, changedRange);
|
|
7755
7755
|
});
|
|
7756
|
-
return;
|
|
7757
7756
|
}
|
|
7758
7757
|
}
|
|
7759
7758
|
onClick(event);
|
|
@@ -14853,7 +14852,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
14853
14852
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }]; } });
|
|
14854
14853
|
|
|
14855
14854
|
const withTable = (editor) => {
|
|
14856
|
-
const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer, onChange } = editor;
|
|
14855
|
+
const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer, onChange, onClick } = editor;
|
|
14857
14856
|
editor.deleteBackward = unit => {
|
|
14858
14857
|
const opts = new TableOptions();
|
|
14859
14858
|
if (!isSelectionInTable(opts, editor)) {
|
|
@@ -14886,6 +14885,24 @@ const withTable = (editor) => {
|
|
|
14886
14885
|
}
|
|
14887
14886
|
deleteForward(unit);
|
|
14888
14887
|
};
|
|
14888
|
+
editor.onClick = (event) => {
|
|
14889
|
+
if (event.detail === 3) {
|
|
14890
|
+
const isMergedCell = isSelectedCellMerged(editor);
|
|
14891
|
+
const domSelection = window.getSelection();
|
|
14892
|
+
if (domSelection && !domSelection.isCollapsed && editor.selection) {
|
|
14893
|
+
const slateSelection = AngularEditor.toSlateRange(editor, domSelection);
|
|
14894
|
+
const opts = new TableOptions();
|
|
14895
|
+
const startPosition = TablePosition.create(opts, editor, slateSelection.anchor.path);
|
|
14896
|
+
const endPosition = TablePosition.create(opts, editor, slateSelection.focus.path);
|
|
14897
|
+
if (isMergedCell && startPosition.cell !== endPosition.cell) {
|
|
14898
|
+
timer(81).subscribe(() => {
|
|
14899
|
+
Transforms.select(editor, slateSelection.anchor.path);
|
|
14900
|
+
});
|
|
14901
|
+
}
|
|
14902
|
+
}
|
|
14903
|
+
}
|
|
14904
|
+
onClick(event);
|
|
14905
|
+
};
|
|
14889
14906
|
editor.onKeydown = (event) => {
|
|
14890
14907
|
const opts = new TableOptions();
|
|
14891
14908
|
const isMoveUp = hotkeys.isMoveUp(event);
|