jodit 4.19.11 → 4.19.12
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 +11 -0
- package/es2015/jodit.css +33 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +9 -9
- package/es2015/jodit.js +83 -34
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +9 -9
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +9 -9
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +9 -9
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +33 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +9 -9
- package/es2021/jodit.js +82 -32
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +9 -9
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +33 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +9 -9
- package/es2021.en/jodit.js +82 -32
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +10 -10
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +34 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +101 -34
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/ui/button/tooltip/tooltip.d.ts +6 -0
- package/esm/core/ui/button/tooltip/tooltip.js +14 -3
- package/esm/core/view/view-with-toolbar.js +6 -1
- package/esm/plugins/add-new-line/add-new-line.d.ts +5 -0
- package/esm/plugins/add-new-line/add-new-line.js +20 -3
- package/esm/plugins/delete/delete.d.ts +7 -0
- package/esm/plugins/delete/delete.js +22 -0
- package/esm/plugins/hr/hr.js +5 -0
- package/esm/plugins/media/media.js +8 -5
- package/esm/plugins/resizer/resizer.js +4 -1
- package/esm/plugins/select-cells/select-cells.d.ts +1 -0
- package/esm/plugins/select-cells/select-cells.js +12 -18
- package/package.json +1 -1
- package/types/core/ui/button/tooltip/tooltip.d.ts +6 -0
- package/types/plugins/add-new-line/add-new-line.d.ts +5 -0
- package/types/plugins/delete/delete.d.ts +7 -0
- package/types/plugins/select-cells/select-cells.d.ts +1 -0
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.19.
|
|
4
|
+
* Version: v4.19.12
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2155,7 +2155,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2155
2155
|
* @packageDocumentation
|
|
2156
2156
|
* @module constants
|
|
2157
2157
|
*/
|
|
2158
|
-
var APP_VERSION = "4.19.
|
|
2158
|
+
var APP_VERSION = "4.19.12";
|
|
2159
2159
|
// prettier-ignore
|
|
2160
2160
|
var ES = "es5";
|
|
2161
2161
|
var IS_ES_MODERN = false;
|
|
@@ -19057,7 +19057,7 @@ var UITooltip = /*#__PURE__*/ function(UIElement) {
|
|
|
19057
19057
|
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UITooltip, [
|
|
19058
19058
|
view
|
|
19059
19059
|
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__isOpened", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__attachedContainers", new Set()), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__listenClose", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__currentTarget", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__delayShowTimeout", 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__hideTimeout", 0);
|
|
19060
|
-
if (
|
|
19060
|
+
if (_this.__isEnabled) {
|
|
19061
19061
|
_this.j.e.on('getContainer', function(box) {
|
|
19062
19062
|
_this.__onAttach(box);
|
|
19063
19063
|
});
|
|
@@ -19080,6 +19080,24 @@ var UITooltip = /*#__PURE__*/ function(UIElement) {
|
|
|
19080
19080
|
return '<div><div class="&__content"></div></div>';
|
|
19081
19081
|
}
|
|
19082
19082
|
},
|
|
19083
|
+
{
|
|
19084
|
+
key: "__isEnabled",
|
|
19085
|
+
get: function get() {
|
|
19086
|
+
var o = this.j.o;
|
|
19087
|
+
return !o.textIcons && Boolean(o.showTooltip) && !o.useNativeTooltip;
|
|
19088
|
+
}
|
|
19089
|
+
},
|
|
19090
|
+
{
|
|
19091
|
+
/**
|
|
19092
|
+
* Show tooltips for the buttons in an element outside the editor's
|
|
19093
|
+
* container, such as a toolbar placed by the `toolbar` option
|
|
19094
|
+
*/ key: "attach",
|
|
19095
|
+
value: function attach(container) {
|
|
19096
|
+
if (this.__isEnabled) {
|
|
19097
|
+
this.__onAttach(container);
|
|
19098
|
+
}
|
|
19099
|
+
}
|
|
19100
|
+
},
|
|
19083
19101
|
{
|
|
19084
19102
|
key: "__onAttach",
|
|
19085
19103
|
value: function __onAttach(container) {
|
|
@@ -22342,7 +22360,12 @@ var ViewWithToolbar = /*#__PURE__*/ function(View) {
|
|
|
22342
22360
|
return;
|
|
22343
22361
|
}
|
|
22344
22362
|
var buttons = this.o.buttons ? (0,jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_13__.splitArray)(this.o.buttons) : [];
|
|
22345
|
-
|
|
22363
|
+
var container = this.toolbarContainer;
|
|
22364
|
+
(_this_toolbar = this.toolbar) === null || _this_toolbar === void 0 ? void 0 : _this_toolbar.setRemoveButtons(this.o.removeButtons).build(buttons.concat(this.o.extraButtons || [])).appendTo(container);
|
|
22365
|
+
// The toolbar's own element, as editors can share the one it is placed in
|
|
22366
|
+
if (this.toolbar && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_12__.Dom.isOrContains(this.container, container)) {
|
|
22367
|
+
this.__tooltip.attach(this.toolbar.container);
|
|
22368
|
+
}
|
|
22346
22369
|
}
|
|
22347
22370
|
},
|
|
22348
22371
|
{
|
|
@@ -34248,7 +34271,7 @@ var ns = 'addnewline';
|
|
|
34248
34271
|
return elm != null && jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.isBlock(elm) && !/^(img|table|iframe|hr)$/i.test(elm.nodeName);
|
|
34249
34272
|
}), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__onClickLine", function(e) {
|
|
34250
34273
|
var editor = _this.j;
|
|
34251
|
-
var p =
|
|
34274
|
+
var p = _this.__newLine();
|
|
34252
34275
|
if (_this.__isBeforeContent && _this.__current && _this.__current.parentNode) {
|
|
34253
34276
|
if (_this.__current === editor.editor) {
|
|
34254
34277
|
jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.prepend(editor.editor, p);
|
|
@@ -34331,6 +34354,20 @@ var ns = 'addnewline';
|
|
|
34331
34354
|
], 'scroll' + '.' + ns, this.__hideForce).on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce).on(editor.editor, 'click' + '.' + ns, this.__hide).on(editor.container, 'mouseleave' + '.' + ns, this.__hide).on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
|
|
34332
34355
|
}
|
|
34333
34356
|
},
|
|
34357
|
+
{
|
|
34358
|
+
key: "__newLine",
|
|
34359
|
+
value: /**
|
|
34360
|
+
* An empty line with a `<br>`, as Enter makes, so it keeps its height
|
|
34361
|
+
* without clean-html's fillEmptyParagraph (#1807)
|
|
34362
|
+
*/ function __newLine() {
|
|
34363
|
+
var j = this.j;
|
|
34364
|
+
var line = j.createInside.element(j.o.enter);
|
|
34365
|
+
if (!jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.isTag(line, 'br')) {
|
|
34366
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.append(line, j.createInside.element('br'));
|
|
34367
|
+
}
|
|
34368
|
+
return line;
|
|
34369
|
+
}
|
|
34370
|
+
},
|
|
34334
34371
|
{
|
|
34335
34372
|
key: "onArrowKey",
|
|
34336
34373
|
value: /**
|
|
@@ -34339,12 +34376,18 @@ var ns = 'addnewline';
|
|
|
34339
34376
|
* starts it. When an arrow key leaves the caret where it was and there is
|
|
34340
34377
|
* content beyond it, a new line goes there, as when the line is clicked.
|
|
34341
34378
|
*/ function onArrowKey(e) {
|
|
34379
|
+
var _this = this;
|
|
34342
34380
|
var editor = this.j;
|
|
34343
34381
|
var forward = e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_DOWN || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_RIGHT;
|
|
34344
34382
|
if (!editor.o.addNewLine || editor.o.readonly || editor.isLocked || e.shiftKey || !(forward || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_UP || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_7__.KEY_LEFT) || !editor.s.isCollapsed()) {
|
|
34345
34383
|
return;
|
|
34346
34384
|
}
|
|
34347
34385
|
var _editor_s_range = editor.s.range, startContainer = _editor_s_range.startContainer, startOffset = _editor_s_range.startOffset;
|
|
34386
|
+
// A caret in the editor itself, as beside a horizontal line, is in no
|
|
34387
|
+
// paragraph, and the browsers can leave it there with text beyond (#1803)
|
|
34388
|
+
if (startContainer === editor.editor) {
|
|
34389
|
+
return;
|
|
34390
|
+
}
|
|
34348
34391
|
// Once the browser has moved the caret, if it could. With a 0 timeout
|
|
34349
34392
|
// Jodit would run this at once, before the browser moves it
|
|
34350
34393
|
editor.async.setTimeout(function() {
|
|
@@ -34353,7 +34396,7 @@ var ns = 'addnewline';
|
|
|
34353
34396
|
if (e.defaultPrevented || !editor.s.isInsideArea || !range.collapsed || range.startContainer !== startContainer || range.startOffset !== startOffset || !block || !jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.findNotEmptyNeighbor(block, !forward, editor.editor)) {
|
|
34354
34397
|
return;
|
|
34355
34398
|
}
|
|
34356
|
-
var p =
|
|
34399
|
+
var p = _this.__newLine();
|
|
34357
34400
|
forward ? jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.append(editor.editor, p) : jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.prepend(editor.editor, p);
|
|
34358
34401
|
editor.s.setCursorIn(p);
|
|
34359
34402
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
|
|
@@ -34368,7 +34411,7 @@ var ns = 'addnewline';
|
|
|
34368
34411
|
if (!editor.o.readonly && editor.o.addNewLineOnDBLClick && e.target === editor.editor && editor.s.isCollapsed()) {
|
|
34369
34412
|
var editorBound = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_10__.offset)(editor.editor, editor, editor.ed);
|
|
34370
34413
|
var top = e.pageY - editor.ew.scrollX;
|
|
34371
|
-
var p =
|
|
34414
|
+
var p = this.__newLine();
|
|
34372
34415
|
if (Math.abs(top - editorBound.top) < Math.abs(top - (editorBound.height + editorBound.top)) && editor.editor.firstChild) {
|
|
34373
34416
|
jodit_modules__WEBPACK_IMPORTED_MODULE_12__.Dom.prepend(editor.editor, p);
|
|
34374
34417
|
} else {
|
|
@@ -39650,6 +39693,7 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
39650
39693
|
}
|
|
39651
39694
|
jodit.s.expandSelection();
|
|
39652
39695
|
var range = jodit.s.range;
|
|
39696
|
+
this.__moveEdgesIntoCells(range);
|
|
39653
39697
|
var caret = this.__clearSelectedCells(range);
|
|
39654
39698
|
if (caret && range.collapsed) {
|
|
39655
39699
|
jodit.s.selectRange(caret);
|
|
@@ -39672,6 +39716,25 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
39672
39716
|
return false;
|
|
39673
39717
|
}
|
|
39674
39718
|
},
|
|
39719
|
+
{
|
|
39720
|
+
key: "__moveEdgesIntoCells",
|
|
39721
|
+
value: /**
|
|
39722
|
+
* Firefox selects cells whole from their row, as after a drag into or out
|
|
39723
|
+
* of a table nested in a cell, and `deleteContents` would remove them. The
|
|
39724
|
+
* edges move into the cells, so their content is cleared instead, as in
|
|
39725
|
+
* Firefox's own delete
|
|
39726
|
+
*/ function __moveEdgesIntoCells(range) {
|
|
39727
|
+
var startContainer = range.startContainer, startOffset = range.startOffset, endContainer = range.endContainer, endOffset = range.endOffset;
|
|
39728
|
+
var first = jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(startContainer, 'tr') ? startContainer.childNodes[startOffset] : null;
|
|
39729
|
+
var last = jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isTag(endContainer, 'tr') ? endContainer.childNodes[endOffset - 1] : null;
|
|
39730
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isCell(first)) {
|
|
39731
|
+
range.setStart(first, 0);
|
|
39732
|
+
}
|
|
39733
|
+
if (jodit_core_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isCell(last)) {
|
|
39734
|
+
range.setEnd(last, last.childNodes.length);
|
|
39735
|
+
}
|
|
39736
|
+
}
|
|
39737
|
+
},
|
|
39675
39738
|
{
|
|
39676
39739
|
key: "__clearSelectedCells",
|
|
39677
39740
|
value: /**
|
|
@@ -43268,6 +43331,11 @@ function hr(editor) {
|
|
|
43268
43331
|
return false;
|
|
43269
43332
|
}
|
|
43270
43333
|
var p = editor.createInside.element(editor.o.enter);
|
|
43334
|
+
// As Enter's new line has, so it keeps its height without clean-html's
|
|
43335
|
+
// fillEmptyParagraph (#1807)
|
|
43336
|
+
if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, 'br')) {
|
|
43337
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.append(p, editor.createInside.element('br'));
|
|
43338
|
+
}
|
|
43271
43339
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
|
|
43272
43340
|
editor.s.setCursorIn(p);
|
|
43273
43341
|
return false;
|
|
@@ -50320,11 +50388,15 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
50320
50388
|
}, "data-".concat(keyFake), 1));
|
|
50321
50389
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.attr)(wrapper, 'style', (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_6__.attr)(element, 'style'));
|
|
50322
50390
|
// The wrapper fits the media, whose size changes as its metadata loads
|
|
50323
|
-
// and as it's resized.
|
|
50391
|
+
// and as it's resized. It's inline, as the media is by default, so the
|
|
50392
|
+
// line's text-align still places it, or a block when the media is one.
|
|
50393
|
+
// A percentage width is of the line, so the wrapper is a block that
|
|
50394
|
+
// takes the line, and the media in it follows the text-align it inherits
|
|
50324
50395
|
var fit = function fit() {
|
|
50396
|
+
var ofLine = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.cssInline)(_$media, 'width').endsWith('%');
|
|
50325
50397
|
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.css)(wrapper, {
|
|
50326
|
-
display: (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.
|
|
50327
|
-
width:
|
|
50398
|
+
display: !ofLine && /^inline/.test((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_7__.css)(_$media, 'display').toString()) ? 'inline-block' : 'block',
|
|
50399
|
+
width: ofLine ? '' : 'fit-content',
|
|
50328
50400
|
height: ''
|
|
50329
50401
|
});
|
|
50330
50402
|
};
|
|
@@ -53994,8 +54066,11 @@ var IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
53994
54066
|
// is nothing measurable at all, let the wrapper size itself.
|
|
53995
54067
|
var width = element.offsetWidth || attrPixelSize(element, 'width');
|
|
53996
54068
|
var height = element.offsetHeight || attrPixelSize(element, 'height');
|
|
54069
|
+
// The wrapper takes the iframe's place in its line: inline, as an
|
|
54070
|
+
// iframe is by default, so the line's text-align still places it,
|
|
54071
|
+
// or a block when the iframe is one
|
|
53997
54072
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(wrapper, {
|
|
53998
|
-
display: (0,
|
|
54073
|
+
display: /^inline/.test((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(element, 'display').toString()) ? 'inline-block' : 'block'
|
|
53999
54074
|
});
|
|
54000
54075
|
if (width) {
|
|
54001
54076
|
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_11__.css)(wrapper, 'width', width);
|
|
@@ -55725,20 +55800,13 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
55725
55800
|
value: /**
|
|
55726
55801
|
* Mouse move inside the table
|
|
55727
55802
|
*/ function __onMove(table, e) {
|
|
55728
|
-
var _this_j_o_shadowRoot;
|
|
55729
55803
|
if (this.j.o.readonly && !this.j.isLocked) {
|
|
55730
55804
|
return;
|
|
55731
55805
|
}
|
|
55732
55806
|
if (this.j.isLockedNotBy(key)) {
|
|
55733
55807
|
return;
|
|
55734
55808
|
}
|
|
55735
|
-
|
|
55736
|
-
// host, so the lookup must start from the shadow root
|
|
55737
|
-
var node = ((_this_j_o_shadowRoot = this.j.o.shadowRoot) !== null && _this_j_o_shadowRoot !== void 0 ? _this_j_o_shadowRoot : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
55738
|
-
var cell = node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(node, [
|
|
55739
|
-
'td',
|
|
55740
|
-
'th'
|
|
55741
|
-
], table);
|
|
55809
|
+
var cell = this.__cellUnder(e, table);
|
|
55742
55810
|
if (!cell || !this.__selectedCell) {
|
|
55743
55811
|
return;
|
|
55744
55812
|
}
|
|
@@ -55787,34 +55855,33 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
55787
55855
|
this.__selectedCell = null;
|
|
55788
55856
|
}
|
|
55789
55857
|
},
|
|
55858
|
+
{
|
|
55859
|
+
key: "__cellUnder",
|
|
55860
|
+
value: // The cell of this table under the pointer; over a table nested in a cell, the mouse is still in that cell
|
|
55861
|
+
function __cellUnder(e, table) {
|
|
55862
|
+
var _this_j_o_shadowRoot;
|
|
55863
|
+
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
55864
|
+
// host, so the lookup must start from the shadow root
|
|
55865
|
+
var node = ((_this_j_o_shadowRoot = this.j.o.shadowRoot) !== null && _this_j_o_shadowRoot !== void 0 ? _this_j_o_shadowRoot : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
55866
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(node, function(elm) {
|
|
55867
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.isCell(elm) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(elm, 'table', table);
|
|
55868
|
+
}, table);
|
|
55869
|
+
}
|
|
55870
|
+
},
|
|
55790
55871
|
{
|
|
55791
55872
|
key: "__onStopSelection",
|
|
55792
55873
|
value: /**
|
|
55793
55874
|
* Stop a selection process
|
|
55794
55875
|
*/ function __onStopSelection(table, e) {
|
|
55795
|
-
var _this_j_o_shadowRoot;
|
|
55796
55876
|
if (!this.__selectedCell) {
|
|
55797
55877
|
return;
|
|
55798
55878
|
}
|
|
55799
55879
|
this.__isSelectionMode = false;
|
|
55800
55880
|
this.j.unlock();
|
|
55801
|
-
|
|
55802
|
-
// host, so the lookup must start from the shadow root
|
|
55803
|
-
var node = ((_this_j_o_shadowRoot = this.j.o.shadowRoot) !== null && _this_j_o_shadowRoot !== void 0 ? _this_j_o_shadowRoot : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
55804
|
-
if (!node) {
|
|
55805
|
-
return;
|
|
55806
|
-
}
|
|
55807
|
-
var cell = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(node, [
|
|
55808
|
-
'td',
|
|
55809
|
-
'th'
|
|
55810
|
-
], table);
|
|
55881
|
+
var cell = this.__cellUnder(e, table);
|
|
55811
55882
|
if (!cell) {
|
|
55812
55883
|
return;
|
|
55813
55884
|
}
|
|
55814
|
-
var ownTable = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_10__.Dom.closest(cell, 'table', table);
|
|
55815
|
-
if (ownTable && ownTable !== table) {
|
|
55816
|
-
return; // Nested tables
|
|
55817
|
-
}
|
|
55818
55885
|
this.__showCellsPopup(table, [
|
|
55819
55886
|
cell,
|
|
55820
55887
|
this.__selectedCell
|