jodit 4.19.14 → 4.20.1
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 +30 -0
- package/es2015/jodit.css +76 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +12 -12
- package/es2015/jodit.js +1464 -599
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +12 -12
- 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 +12 -12
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +12 -12
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +76 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +17 -17
- package/es2021/jodit.js +1445 -596
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +17 -17
- 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 +76 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +17 -17
- package/es2021.en/jodit.js +1419 -570
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +17 -17
- 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 +96 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1707 -706
- 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/config.d.ts +10 -3
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/anchor.d.ts +22 -0
- package/esm/core/helpers/utils/anchor.js +29 -0
- package/esm/core/helpers/utils/index.d.ts +1 -0
- package/esm/core/helpers/utils/index.js +1 -0
- package/esm/core/ui/form/inputs/input/input.js +2 -0
- package/esm/core/ui/popup/popup.d.ts +5 -0
- package/esm/core/ui/popup/popup.js +5 -0
- package/esm/jodit.js +11 -14
- package/esm/langs/ar.d.ts +5 -0
- package/esm/langs/ar.js +5 -0
- package/esm/langs/az.d.ts +5 -0
- package/esm/langs/az.js +5 -0
- package/esm/langs/cs_cz.d.ts +5 -0
- package/esm/langs/cs_cz.js +6 -1
- package/esm/langs/de.d.ts +5 -0
- package/esm/langs/de.js +6 -0
- package/esm/langs/es.d.ts +5 -0
- package/esm/langs/es.js +6 -1
- package/esm/langs/fa.d.ts +5 -0
- package/esm/langs/fa.js +6 -1
- package/esm/langs/fi.d.ts +5 -0
- package/esm/langs/fi.js +5 -0
- package/esm/langs/fr.d.ts +5 -0
- package/esm/langs/fr.js +5 -0
- package/esm/langs/he.d.ts +5 -0
- package/esm/langs/he.js +6 -1
- package/esm/langs/hu.d.ts +5 -0
- package/esm/langs/hu.js +5 -0
- package/esm/langs/id.d.ts +5 -0
- package/esm/langs/id.js +6 -1
- package/esm/langs/it.d.ts +5 -0
- package/esm/langs/it.js +6 -1
- package/esm/langs/ja.d.ts +5 -0
- package/esm/langs/ja.js +6 -1
- package/esm/langs/ko.d.ts +5 -0
- package/esm/langs/ko.js +6 -1
- package/esm/langs/mn.d.ts +5 -0
- package/esm/langs/mn.js +6 -1
- package/esm/langs/nl.d.ts +5 -0
- package/esm/langs/nl.js +5 -0
- package/esm/langs/no.d.ts +5 -0
- package/esm/langs/no.js +5 -0
- package/esm/langs/pl.d.ts +5 -0
- package/esm/langs/pl.js +5 -0
- package/esm/langs/pt_br.d.ts +5 -0
- package/esm/langs/pt_br.js +6 -1
- package/esm/langs/ru.d.ts +5 -0
- package/esm/langs/ru.js +6 -1
- package/esm/langs/sk.d.ts +5 -0
- package/esm/langs/sk.js +5 -0
- package/esm/langs/sv.d.ts +5 -0
- package/esm/langs/sv.js +5 -0
- package/esm/langs/tr.d.ts +5 -0
- package/esm/langs/tr.js +6 -1
- package/esm/langs/ua.d.ts +5 -0
- package/esm/langs/ua.js +6 -1
- package/esm/langs/zh_cn.d.ts +5 -0
- package/esm/langs/zh_cn.js +6 -1
- package/esm/langs/zh_tw.d.ts +5 -0
- package/esm/langs/zh_tw.js +5 -0
- package/esm/modules/file-browser/file-browser.d.ts +3 -4
- package/esm/modules/file-browser/file-browser.js +12 -12
- package/esm/modules/toolbar/button/button.d.ts +7 -0
- package/esm/modules/toolbar/button/button.js +32 -4
- package/esm/modules/uploader/config.js +18 -18
- package/esm/modules/uploader/helpers/index.d.ts +1 -0
- package/esm/modules/uploader/helpers/index.js +1 -0
- package/esm/modules/uploader/helpers/normalize-uploader-data.d.ts +32 -0
- package/esm/modules/uploader/helpers/normalize-uploader-data.js +54 -0
- package/esm/modules/uploader/helpers/send-files.js +11 -6
- package/esm/modules/uploader/uploader.d.ts +4 -5
- package/esm/modules/uploader/uploader.js +12 -8
- package/esm/plugins/all.d.ts +1 -0
- package/esm/plugins/all.js +1 -0
- package/esm/plugins/anchor/anchor.d.ts +67 -0
- package/esm/plugins/anchor/anchor.js +302 -0
- package/esm/plugins/anchor/config.d.ts +6 -0
- package/esm/plugins/anchor/config.js +13 -0
- package/esm/plugins/file/file.d.ts +1 -1
- package/esm/plugins/file/file.js +6 -6
- package/esm/plugins/image/image.js +2 -2
- package/esm/plugins/image-caption/image-caption.js +1 -2
- package/esm/plugins/image-properties/utils/open-image-popup.js +7 -6
- package/esm/plugins/index.d.ts +1 -0
- package/esm/plugins/inline-popup/config/config.d.ts +8 -2
- package/esm/plugins/inline-popup/config/config.js +1 -0
- package/esm/plugins/inline-popup/config/items/cells.js +0 -10
- package/esm/plugins/inline-popup/config/items/img.js +1 -1
- package/esm/plugins/inline-popup/inline-popup.d.ts +9 -12
- package/esm/plugins/inline-popup/inline-popup.js +53 -77
- package/esm/plugins/link/link.js +150 -3
- package/esm/plugins/link/template.js +3 -1
- package/esm/plugins/resizer/resizer.d.ts +6 -0
- package/esm/plugins/resizer/resizer.js +11 -0
- package/esm/plugins/select/select.d.ts +31 -0
- package/esm/plugins/select/select.js +235 -2
- package/esm/plugins/select-cells/select-cells.d.ts +11 -0
- package/esm/plugins/select-cells/select-cells.js +48 -17
- package/esm/plugins/video/config.d.ts +1 -1
- package/esm/plugins/video/config.js +4 -3
- package/esm/plugins/video-properties/video-properties.js +7 -6
- package/esm/styles/icons/anchor.svg.js +1 -0
- package/esm/styles/icons/index.d.ts +1 -1
- package/esm/styles/icons/index.js +2 -1
- package/esm/types/file-browser.d.ts +8 -1
- package/esm/types/popup.d.ts +1 -0
- package/esm/types/uploader.d.ts +39 -1
- package/package.json +1 -1
- package/types/config.d.ts +10 -3
- package/types/core/helpers/utils/anchor.d.ts +22 -0
- package/types/core/helpers/utils/index.d.ts +1 -0
- package/types/core/ui/popup/popup.d.ts +5 -0
- package/types/langs/ar.d.ts +5 -0
- package/types/langs/az.d.ts +5 -0
- package/types/langs/cs_cz.d.ts +5 -0
- package/types/langs/de.d.ts +5 -0
- package/types/langs/es.d.ts +5 -0
- package/types/langs/fa.d.ts +5 -0
- package/types/langs/fi.d.ts +5 -0
- package/types/langs/fr.d.ts +5 -0
- package/types/langs/he.d.ts +5 -0
- package/types/langs/hu.d.ts +5 -0
- package/types/langs/id.d.ts +5 -0
- package/types/langs/it.d.ts +5 -0
- package/types/langs/ja.d.ts +5 -0
- package/types/langs/ko.d.ts +5 -0
- package/types/langs/mn.d.ts +5 -0
- package/types/langs/nl.d.ts +5 -0
- package/types/langs/no.d.ts +5 -0
- package/types/langs/pl.d.ts +5 -0
- package/types/langs/pt_br.d.ts +5 -0
- package/types/langs/ru.d.ts +5 -0
- package/types/langs/sk.d.ts +5 -0
- package/types/langs/sv.d.ts +5 -0
- package/types/langs/tr.d.ts +5 -0
- package/types/langs/ua.d.ts +5 -0
- package/types/langs/zh_cn.d.ts +5 -0
- package/types/langs/zh_tw.d.ts +5 -0
- package/types/modules/file-browser/file-browser.d.ts +3 -4
- package/types/modules/toolbar/button/button.d.ts +7 -0
- package/types/modules/uploader/helpers/index.d.ts +1 -0
- package/types/modules/uploader/helpers/normalize-uploader-data.d.ts +32 -0
- package/types/modules/uploader/uploader.d.ts +4 -5
- package/types/plugins/anchor/anchor.d.ts +67 -0
- package/types/plugins/anchor/config.d.ts +6 -0
- package/types/plugins/file/file.d.ts +1 -1
- package/types/plugins/index.d.ts +1 -0
- package/types/plugins/inline-popup/config/config.d.ts +8 -2
- package/types/plugins/inline-popup/inline-popup.d.ts +9 -12
- package/types/plugins/resizer/resizer.d.ts +6 -0
- package/types/plugins/select/select.d.ts +31 -0
- package/types/plugins/select-cells/select-cells.d.ts +11 -0
- package/types/plugins/video/config.d.ts +1 -1
- package/types/styles/icons/index.d.ts +1 -1
- package/types/types/file-browser.d.ts +8 -1
- package/types/types/popup.d.ts +1 -0
- package/types/types/uploader.d.ts +39 -1
|
@@ -163,6 +163,14 @@ export class resizer extends Plugin {
|
|
|
163
163
|
this.addEventListeners();
|
|
164
164
|
this.__onChangeEditor();
|
|
165
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* A tap that selects an image sends no `click` (iPadOS), so `touchend`
|
|
168
|
+
* stands in for it. A tick later, after `onClickOutside` has had the same
|
|
169
|
+
* `touchend`, as `click` comes after `mouseup`
|
|
170
|
+
*/
|
|
171
|
+
onEditorTouchEnd(e) {
|
|
172
|
+
this.j.async.setTimeout(() => this.onEditorClick(e), 1);
|
|
173
|
+
}
|
|
166
174
|
/**
|
|
167
175
|
* Click in the editor area
|
|
168
176
|
*/
|
|
@@ -595,6 +603,9 @@ export class resizer extends Plugin {
|
|
|
595
603
|
.off('keydown', this.onEditorKeyDown);
|
|
596
604
|
}
|
|
597
605
|
}
|
|
606
|
+
__decorate([
|
|
607
|
+
watch(':touchend')
|
|
608
|
+
], resizer.prototype, "onEditorTouchEnd", null);
|
|
598
609
|
__decorate([
|
|
599
610
|
watch(':click')
|
|
600
611
|
], resizer.prototype, "onEditorClick", null);
|
|
@@ -26,6 +26,21 @@ export declare class select extends Plugin {
|
|
|
26
26
|
private proxyEventsList;
|
|
27
27
|
protected afterInit(jodit: IJodit): void;
|
|
28
28
|
protected beforeDestruct(jodit: IJodit): void;
|
|
29
|
+
private __selectedMediaStyle;
|
|
30
|
+
/**
|
|
31
|
+
* The browsers shade an image in the selection, but Chrome doesn't shade
|
|
32
|
+
* a video with controls, or one in a `jodit-media` wrapper, so a selection
|
|
33
|
+
* that took one in didn't show it, and typing deleted it unseen (#1768).
|
|
34
|
+
* The media gets the same shade from a filter, in place of the tint Safari
|
|
35
|
+
* gives a block wrapper's whole line. It's a style in the editing
|
|
36
|
+
* document, as selected cells get their border, so the content, and with
|
|
37
|
+
* it the value, the history and a copy, doesn't change. Media a click
|
|
38
|
+
* selected whole is left alone, as its resize frame shows it (#1528). A
|
|
39
|
+
* change, read-only and the source mode redo or drop the style, as the
|
|
40
|
+
* selection may not change with them, and the style's paths could then
|
|
41
|
+
* fit other elements
|
|
42
|
+
*/
|
|
43
|
+
private __markSelectedMedia;
|
|
29
44
|
private onStartSelection;
|
|
30
45
|
/**
|
|
31
46
|
* Where the last press started. Chrome reports a drag that begins in one
|
|
@@ -93,5 +108,21 @@ export declare class select extends Plugin {
|
|
|
93
108
|
* Normalize selection after triple click
|
|
94
109
|
*/
|
|
95
110
|
protected onTripleClickNormalizeSelection(e: MouseEvent): void;
|
|
111
|
+
/**
|
|
112
|
+
* A double click past the end of a line selects only its line break, up
|
|
113
|
+
* to the start of the next line a caret can go on. The browsers show no
|
|
114
|
+
* caret for it, and typing replaces the break, joining the lines and
|
|
115
|
+
* taking any video in between with it (#1768). Put the caret at the end
|
|
116
|
+
* of the line instead
|
|
117
|
+
*/
|
|
118
|
+
protected onDblClickPastLineEnd(): void;
|
|
119
|
+
/**
|
|
120
|
+
* The browsers have no caret position beside an uneditable block alone
|
|
121
|
+
* on its line, such as a video, so a drag that ends on its line runs on
|
|
122
|
+
* past it, and typing deletes it (#1768). Until the pointer has passed
|
|
123
|
+
* the block, the selection stops at the last caret place in the block
|
|
124
|
+
* before its line, or for a drag upwards at the first in the block after
|
|
125
|
+
*/
|
|
126
|
+
protected onMouseUpOnUneditableLine(e: MouseEvent): void;
|
|
96
127
|
protected onCopyNormalizeSelectionBound(e?: ClipboardEvent): void;
|
|
97
128
|
}
|
|
@@ -13,15 +13,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
13
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
14
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
15
|
};
|
|
16
|
-
import { IS_INLINE, LIST_TAGS } from "../../core/constants.js";
|
|
16
|
+
import { IS_INLINE, LIST_TAGS, MODE_SOURCE } from "../../core/constants.js";
|
|
17
17
|
import { autobind, watch } from "../../core/decorators/index.js";
|
|
18
18
|
import { Dom } from "../../core/dom/dom.js";
|
|
19
|
-
import { pluginSystem } from "../../core/global.js";
|
|
19
|
+
import { getContainer, pluginSystem } from "../../core/global.js";
|
|
20
20
|
import { toArray } from "../../core/helpers/array/to-array.js";
|
|
21
21
|
import { camelCase } from "../../core/helpers/string/camel-case.js";
|
|
22
|
+
import { trim } from "../../core/helpers/string/trim.js";
|
|
23
|
+
import { cssPath } from "../../core/helpers/utils/selector.js";
|
|
22
24
|
import { Plugin } from "../../core/plugin/index.js";
|
|
23
25
|
import { Popup, UIElement } from "../../core/ui/index.js";
|
|
24
26
|
import "./config.js";
|
|
27
|
+
const MEDIA = 'video, iframe, audio, object, embed';
|
|
28
|
+
// The shade the browsers lay over a selected image: #b5d6fd on white
|
|
29
|
+
const SHADE = `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg'>" +
|
|
30
|
+
"<filter id='s' x='0' y='0' width='1' height='1' color-interpolation-filters='sRGB'>" +
|
|
31
|
+
"<feFlood flood-color='#84bbfc' flood-opacity='.6'/><feComposite in2='SourceGraphic'/>" +
|
|
32
|
+
'</filter></svg>')}#s")`;
|
|
25
33
|
/**
|
|
26
34
|
* A utility plugin that allows you to subscribe to a click/mousedown/touchstart/mouseup on an element in DOM order
|
|
27
35
|
*
|
|
@@ -43,6 +51,7 @@ export class select extends Plugin {
|
|
|
43
51
|
'mouseup',
|
|
44
52
|
'touchend'
|
|
45
53
|
];
|
|
54
|
+
this.__selectedMediaStyle = '';
|
|
46
55
|
/**
|
|
47
56
|
* Where the last press started. Chrome reports a drag that begins in one
|
|
48
57
|
* element and ends in another as a `click` on their common ancestor, so a
|
|
@@ -60,6 +69,7 @@ export class select extends Plugin {
|
|
|
60
69
|
jodit.e.on(eventName + '.select', this.onStartSelection);
|
|
61
70
|
});
|
|
62
71
|
jodit.e.on('dblclick', this.__onDblClickBesideRow, { top: true });
|
|
72
|
+
jodit.e.on(jodit.ed, 'selectionchange', this.__markSelectedMedia);
|
|
63
73
|
}
|
|
64
74
|
beforeDestruct(jodit) {
|
|
65
75
|
this.proxyEventsList.forEach(eventName => {
|
|
@@ -67,6 +77,45 @@ export class select extends Plugin {
|
|
|
67
77
|
});
|
|
68
78
|
this.__endPressBesideRow();
|
|
69
79
|
jodit.e.off('dblclick', this.__onDblClickBesideRow);
|
|
80
|
+
jodit.e.off(jodit.ed, 'selectionchange', this.__markSelectedMedia);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The browsers shade an image in the selection, but Chrome doesn't shade
|
|
84
|
+
* a video with controls, or one in a `jodit-media` wrapper, so a selection
|
|
85
|
+
* that took one in didn't show it, and typing deleted it unseen (#1768).
|
|
86
|
+
* The media gets the same shade from a filter, in place of the tint Safari
|
|
87
|
+
* gives a block wrapper's whole line. It's a style in the editing
|
|
88
|
+
* document, as selected cells get their border, so the content, and with
|
|
89
|
+
* it the value, the history and a copy, doesn't change. Media a click
|
|
90
|
+
* selected whole is left alone, as its resize frame shows it (#1528). A
|
|
91
|
+
* change, read-only and the source mode redo or drop the style, as the
|
|
92
|
+
* selection may not change with them, and the style's paths could then
|
|
93
|
+
* fit other elements
|
|
94
|
+
*/
|
|
95
|
+
__markSelectedMedia() {
|
|
96
|
+
var _a;
|
|
97
|
+
const { s, editor, o } = this.j;
|
|
98
|
+
const range = ((_a = s.sel) === null || _a === void 0 ? void 0 : _a.rangeCount) ? s.sel.getRangeAt(0) : null;
|
|
99
|
+
const rules = [];
|
|
100
|
+
if (range &&
|
|
101
|
+
!range.collapsed &&
|
|
102
|
+
!o.readonly &&
|
|
103
|
+
this.j.getMode() !== MODE_SOURCE &&
|
|
104
|
+
!isElementSelection(range) &&
|
|
105
|
+
Dom.isOrContains(editor, range.commonAncestorContainer)) {
|
|
106
|
+
uneditableIn(range, editor).forEach(elm => {
|
|
107
|
+
const media = elm.querySelector(MEDIA);
|
|
108
|
+
const wrapper = cssPath(elm);
|
|
109
|
+
if (media && wrapper) {
|
|
110
|
+
rules.push(`${wrapper}::selection,${wrapper} ::selection{background:transparent}`, `${cssPath(media)}{filter:${SHADE}}`);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
const style = rules.join('');
|
|
115
|
+
if (style !== this.__selectedMediaStyle) {
|
|
116
|
+
this.__selectedMediaStyle = style;
|
|
117
|
+
getContainer(this.j, select, 'style', true).textContent = style;
|
|
118
|
+
}
|
|
70
119
|
}
|
|
71
120
|
onStartSelection(e) {
|
|
72
121
|
const { j } = this;
|
|
@@ -96,6 +145,10 @@ export class select extends Plugin {
|
|
|
96
145
|
if (pressed && UIElement.closestElement(pressed, Popup)) {
|
|
97
146
|
return;
|
|
98
147
|
}
|
|
148
|
+
// An item of a list that closed once it was chosen was in a popup
|
|
149
|
+
if (Dom.isNode(node) && !node.isConnected) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
99
152
|
const box = UIElement.closestElement(node, Popup);
|
|
100
153
|
if (!box) {
|
|
101
154
|
this.j.e.fire('outsideClick', e);
|
|
@@ -324,6 +377,94 @@ export class select extends Plugin {
|
|
|
324
377
|
startContainer, true);
|
|
325
378
|
}
|
|
326
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* A double click past the end of a line selects only its line break, up
|
|
382
|
+
* to the start of the next line a caret can go on. The browsers show no
|
|
383
|
+
* caret for it, and typing replaces the break, joining the lines and
|
|
384
|
+
* taking any video in between with it (#1768). Put the caret at the end
|
|
385
|
+
* of the line instead
|
|
386
|
+
*/
|
|
387
|
+
onDblClickPastLineEnd() {
|
|
388
|
+
const { s, editor, o } = this.j;
|
|
389
|
+
const range = s.range;
|
|
390
|
+
if (o.readonly ||
|
|
391
|
+
!Dom.isOrContains(editor, range.commonAncestorContainer) ||
|
|
392
|
+
!isLineBreak(range, editor)) {
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
range.collapse(true);
|
|
396
|
+
s.selectRange(range);
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* The browsers have no caret position beside an uneditable block alone
|
|
400
|
+
* on its line, such as a video, so a drag that ends on its line runs on
|
|
401
|
+
* past it, and typing deletes it (#1768). Until the pointer has passed
|
|
402
|
+
* the block, the selection stops at the last caret place in the block
|
|
403
|
+
* before its line, or for a drag upwards at the first in the block after
|
|
404
|
+
*/
|
|
405
|
+
onMouseUpOnUneditableLine(e) {
|
|
406
|
+
var _a, _b;
|
|
407
|
+
const { s, editor, o } = this.j;
|
|
408
|
+
const { sel } = s;
|
|
409
|
+
if (o.readonly || !(sel === null || sel === void 0 ? void 0 : sel.rangeCount) || sel.isCollapsed) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
const range = sel.getRangeAt(0).cloneRange();
|
|
413
|
+
// A video or image Jodit selected itself on the press
|
|
414
|
+
if (isElementSelection(range)) {
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const forward = sel.anchorNode === range.startContainer &&
|
|
418
|
+
sel.anchorOffset === range.startOffset;
|
|
419
|
+
const lines = uneditableIn(range, editor)
|
|
420
|
+
.map(elm => { var _a; return (_a = Dom.closest(elm, Dom.isBlock, editor)) !== null && _a !== void 0 ? _a : elm; })
|
|
421
|
+
.filter(line => !trim(ownText(line)));
|
|
422
|
+
const isAhead = (line) => {
|
|
423
|
+
const box = line.getBoundingClientRect();
|
|
424
|
+
return forward ? e.clientY < box.bottom : e.clientY > box.top;
|
|
425
|
+
};
|
|
426
|
+
const line = forward
|
|
427
|
+
? lines.find(isAhead)
|
|
428
|
+
: lines.reverse().find(isAhead);
|
|
429
|
+
if (!line) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
// Where a caret can go: in text, or before a <br>
|
|
433
|
+
const isCaretPlace = (node) => (Dom.isText(node) && !Dom.isEmptyTextNode(node)) ||
|
|
434
|
+
Dom.isTag(node, 'br');
|
|
435
|
+
// Only the block beside the line, not one further on
|
|
436
|
+
const beside = Dom.findNotEmptySibling(line, forward);
|
|
437
|
+
const place = Dom.isBlock(beside)
|
|
438
|
+
? forward
|
|
439
|
+
? Dom.last(beside, isCaretPlace)
|
|
440
|
+
: Dom.first(beside, isCaretPlace)
|
|
441
|
+
: null;
|
|
442
|
+
if (!place) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
if (Dom.isText(place)) {
|
|
446
|
+
if (forward) {
|
|
447
|
+
range.setEnd(place, (_b = (_a = place.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
range.setStart(place, 0);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
else if (forward) {
|
|
454
|
+
range.setEndBefore(place);
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
range.setStartBefore(place);
|
|
458
|
+
}
|
|
459
|
+
// The drag's start stays the anchor
|
|
460
|
+
const { startContainer, startOffset, endContainer, endOffset } = range;
|
|
461
|
+
if (forward) {
|
|
462
|
+
sel.setBaseAndExtent(startContainer, startOffset, endContainer, endOffset);
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
sel.setBaseAndExtent(endContainer, endOffset, startContainer, startOffset);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
327
468
|
onCopyNormalizeSelectionBound(e) {
|
|
328
469
|
const { s, editor, o } = this.j;
|
|
329
470
|
if (!o.select.normalizeSelectionBeforeCutAndCopy || s.isCollapsed()) {
|
|
@@ -338,6 +479,10 @@ export class select extends Plugin {
|
|
|
338
479
|
this.jodit.s.expandSelection();
|
|
339
480
|
}
|
|
340
481
|
}
|
|
482
|
+
__decorate([
|
|
483
|
+
watch([':change', ':readonly', ':afterSetMode']),
|
|
484
|
+
autobind
|
|
485
|
+
], select.prototype, "__markSelectedMedia", null);
|
|
341
486
|
__decorate([
|
|
342
487
|
autobind
|
|
343
488
|
], select.prototype, "onStartSelection", null);
|
|
@@ -374,7 +519,95 @@ __decorate([
|
|
|
374
519
|
__decorate([
|
|
375
520
|
watch([':click'])
|
|
376
521
|
], select.prototype, "onTripleClickNormalizeSelection", null);
|
|
522
|
+
__decorate([
|
|
523
|
+
watch([':dblclick'])
|
|
524
|
+
], select.prototype, "onDblClickPastLineEnd", null);
|
|
525
|
+
__decorate([
|
|
526
|
+
watch([':mouseup'])
|
|
527
|
+
], select.prototype, "onMouseUpOnUneditableLine", null);
|
|
377
528
|
__decorate([
|
|
378
529
|
watch([':copy', ':cut'])
|
|
379
530
|
], select.prototype, "onCopyNormalizeSelectionBound", null);
|
|
531
|
+
const isUneditable = (node) => Dom.isElement(node) && node.getAttribute('contenteditable') === 'false';
|
|
532
|
+
/**
|
|
533
|
+
* The text a node shows outside its uneditable elements, whose own text, as
|
|
534
|
+
* a video's fallback text, isn't on the line
|
|
535
|
+
*/
|
|
536
|
+
const ownText = (node) => {
|
|
537
|
+
var _a;
|
|
538
|
+
return isUneditable(node)
|
|
539
|
+
? ''
|
|
540
|
+
: Dom.isText(node)
|
|
541
|
+
? ((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '')
|
|
542
|
+
: toArray(node.childNodes).map(ownText).join('');
|
|
543
|
+
};
|
|
544
|
+
/**
|
|
545
|
+
* The uneditable elements the range holds whole, without those inside
|
|
546
|
+
* another. Only those under the range's common ancestor can be, and none
|
|
547
|
+
* when that's a text node, as along one line of a drag
|
|
548
|
+
*/
|
|
549
|
+
function uneditableIn(range, root) {
|
|
550
|
+
const box = range.commonAncestorContainer;
|
|
551
|
+
if (!Dom.isElement(box)) {
|
|
552
|
+
return [];
|
|
553
|
+
}
|
|
554
|
+
return toArray(box.querySelectorAll('[contenteditable="false"]')).filter(elm => {
|
|
555
|
+
if (!range.intersectsNode(elm)) {
|
|
556
|
+
return false;
|
|
557
|
+
}
|
|
558
|
+
const own = elm.ownerDocument.createRange();
|
|
559
|
+
own.selectNode(elm);
|
|
560
|
+
return (range.compareBoundaryPoints(Range.START_TO_START, own) <= 0 &&
|
|
561
|
+
range.compareBoundaryPoints(Range.END_TO_END, own) >= 0 &&
|
|
562
|
+
!Dom.closest(elm.parentNode, isUneditable, root));
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* The range holds one element and nothing else, as a selected image does
|
|
567
|
+
*/
|
|
568
|
+
function isElementSelection(range) {
|
|
569
|
+
const { startContainer, startOffset, endContainer, endOffset } = range;
|
|
570
|
+
return (startContainer === endContainer &&
|
|
571
|
+
endOffset - startOffset === 1 &&
|
|
572
|
+
Dom.isElement(startContainer.childNodes[startOffset]));
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* The range holds a line end and nothing else: no characters but
|
|
576
|
+
* whitespace, and no element whole but a `<br>` or a line a caret can't go
|
|
577
|
+
* on, as a video's. It ends in another block, or holds the `<br>`
|
|
578
|
+
*/
|
|
579
|
+
function isLineBreak(range, root) {
|
|
580
|
+
const { startContainer, endContainer } = range;
|
|
581
|
+
if (range.collapsed ||
|
|
582
|
+
(trim(range.toString()) && trim(ownText(range.cloneContents())))) {
|
|
583
|
+
return false;
|
|
584
|
+
}
|
|
585
|
+
let crossesLineEnd = Dom.closest(startContainer, Dom.isBlock, root) !==
|
|
586
|
+
Dom.closest(endContainer, Dom.isBlock, root);
|
|
587
|
+
const holdsBreaksOnly = (node) => {
|
|
588
|
+
if (!range.intersectsNode(node)) {
|
|
589
|
+
return true;
|
|
590
|
+
}
|
|
591
|
+
if (Dom.isOrContains(node, startContainer) ||
|
|
592
|
+
Dom.isOrContains(node, endContainer)) {
|
|
593
|
+
return toArray(node.childNodes).every(holdsBreaksOnly);
|
|
594
|
+
}
|
|
595
|
+
if (Dom.isTag(node, 'br')) {
|
|
596
|
+
crossesLineEnd = true;
|
|
597
|
+
return true;
|
|
598
|
+
}
|
|
599
|
+
return Dom.isText(node) || isCaretless(node);
|
|
600
|
+
};
|
|
601
|
+
return holdsBreaksOnly(range.commonAncestorContainer) && crossesLineEnd;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* An uneditable element, or a block holding one and nothing else
|
|
605
|
+
*/
|
|
606
|
+
function isCaretless(node) {
|
|
607
|
+
const children = toArray(node.childNodes);
|
|
608
|
+
return (isUneditable(node) ||
|
|
609
|
+
(Dom.isBlock(node) &&
|
|
610
|
+
children.some(isCaretless) &&
|
|
611
|
+
children.every(child => Dom.isEmptyTextNode(child) || isCaretless(child))));
|
|
612
|
+
}
|
|
380
613
|
pluginSystem.add('select', select);
|
|
@@ -41,6 +41,11 @@ export declare class selectCells extends Plugin {
|
|
|
41
41
|
*/
|
|
42
42
|
protected onKeyUp(): void;
|
|
43
43
|
private __followCaret;
|
|
44
|
+
/**
|
|
45
|
+
* The box round the marked cells, which their popup opens beside and
|
|
46
|
+
* follows when its commands add, merge or replace cells
|
|
47
|
+
*/
|
|
48
|
+
private __markedBound;
|
|
44
49
|
/**
|
|
45
50
|
* First selected cell
|
|
46
51
|
*/
|
|
@@ -71,6 +76,12 @@ export declare class selectCells extends Plugin {
|
|
|
71
76
|
* cells, the browser's own selection from the drag goes
|
|
72
77
|
*/
|
|
73
78
|
private __onClickAfterDrag;
|
|
79
|
+
/**
|
|
80
|
+
* The last press or key went to a popup, as to the cell popup's own
|
|
81
|
+
* controls, whose changes keep the cells marked
|
|
82
|
+
*/
|
|
83
|
+
private __inPopup;
|
|
84
|
+
protected onPress(e?: Event): void;
|
|
74
85
|
protected onChange(): void;
|
|
75
86
|
/**
|
|
76
87
|
* Mouse move inside the table
|
|
@@ -20,6 +20,7 @@ import { pluginSystem } from "../../core/global.js";
|
|
|
20
20
|
import { $$, alignElement, position, toArray } from "../../core/helpers/index.js";
|
|
21
21
|
import { Plugin } from "../../core/plugin/index.js";
|
|
22
22
|
import { isMoved } from "../../core/selection/helpers/index.js";
|
|
23
|
+
import { Popup, UIElement } from "../../core/ui/index.js";
|
|
23
24
|
import { Table } from "../../modules/table/table.js";
|
|
24
25
|
import "./config.js";
|
|
25
26
|
const key = 'table_processor_observer';
|
|
@@ -52,6 +53,11 @@ export class selectCells extends Plugin {
|
|
|
52
53
|
* would unmark its cells
|
|
53
54
|
*/
|
|
54
55
|
this.__keepMarks = false;
|
|
56
|
+
/**
|
|
57
|
+
* The last press or key went to a popup, as to the cell popup's own
|
|
58
|
+
* controls, whose changes keep the cells marked
|
|
59
|
+
*/
|
|
60
|
+
this.__inPopup = false;
|
|
55
61
|
}
|
|
56
62
|
/**
|
|
57
63
|
* Shortcut for Jodit.modules.Table
|
|
@@ -152,7 +158,22 @@ export class selectCells extends Plugin {
|
|
|
152
158
|
// As after a click, the first change to the cell keeps the mark
|
|
153
159
|
this.__selectedCell = cell;
|
|
154
160
|
this.__tableModule.addSelection(cell);
|
|
155
|
-
this.j.e.fire('showPopup', table,
|
|
161
|
+
this.j.e.fire('showPopup', table, this.__markedBound, 'cells');
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The box round the marked cells, which their popup opens beside and
|
|
165
|
+
* follows when its commands add, merge or replace cells
|
|
166
|
+
*/
|
|
167
|
+
__markedBound() {
|
|
168
|
+
const bounds = this.__tableModule
|
|
169
|
+
.getAllSelectedCells()
|
|
170
|
+
.filter(cell => cell.isConnected)
|
|
171
|
+
.map(cell => position(cell, this.j));
|
|
172
|
+
if (!bounds.length) {
|
|
173
|
+
return { left: 0, top: 0, width: 0, height: 0 };
|
|
174
|
+
}
|
|
175
|
+
const left = Math.min(...bounds.map(b => b.left)), top = Math.min(...bounds.map(b => b.top)), right = Math.max(...bounds.map(b => b.left + b.width)), bottom = Math.max(...bounds.map(b => b.top + b.height));
|
|
176
|
+
return { left, top, width: right - left, height: bottom - top };
|
|
156
177
|
}
|
|
157
178
|
/**
|
|
158
179
|
* Mouse click inside the table
|
|
@@ -182,7 +203,7 @@ export class selectCells extends Plugin {
|
|
|
182
203
|
this.__selectedCell = cell;
|
|
183
204
|
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
184
205
|
if (this.__tableModule.getAllSelectedCells().length) {
|
|
185
|
-
this.j.e.fire('showPopup', table,
|
|
206
|
+
this.j.e.fire('showPopup', table, this.__markedBound, 'cells');
|
|
186
207
|
}
|
|
187
208
|
else {
|
|
188
209
|
this.j.e.fire('hidePopup', 'cells');
|
|
@@ -231,8 +252,13 @@ export class selectCells extends Plugin {
|
|
|
231
252
|
return false;
|
|
232
253
|
}
|
|
233
254
|
}
|
|
255
|
+
onPress(e) {
|
|
256
|
+
this.__inPopup = Boolean(e &&
|
|
257
|
+
Dom.isNode(e.target) &&
|
|
258
|
+
UIElement.closestElement(e.target, Popup));
|
|
259
|
+
}
|
|
234
260
|
onChange() {
|
|
235
|
-
if (!this.j.isLocked && !this.__isSelectionMode) {
|
|
261
|
+
if (!this.j.isLocked && !this.__isSelectionMode && !this.__inPopup) {
|
|
236
262
|
this.__onRemoveSelection();
|
|
237
263
|
}
|
|
238
264
|
}
|
|
@@ -351,15 +377,7 @@ export class selectCells extends Plugin {
|
|
|
351
377
|
if (!min || !max) {
|
|
352
378
|
return;
|
|
353
379
|
}
|
|
354
|
-
this.j.e.fire('showPopup', table,
|
|
355
|
-
const minOffset = position(min, this.j), maxOffset = position(max, this.j);
|
|
356
|
-
return {
|
|
357
|
-
left: minOffset.left,
|
|
358
|
-
top: minOffset.top,
|
|
359
|
-
width: maxOffset.left - minOffset.left + maxOffset.width,
|
|
360
|
-
height: maxOffset.top - minOffset.top + maxOffset.height
|
|
361
|
-
};
|
|
362
|
-
}, 'cells');
|
|
380
|
+
this.j.e.fire('showPopup', table, this.__markedBound, 'cells');
|
|
363
381
|
}
|
|
364
382
|
__stopListening() {
|
|
365
383
|
$$('table', this.j.editor).forEach(table => {
|
|
@@ -474,6 +492,11 @@ export class selectCells extends Plugin {
|
|
|
474
492
|
this.__toggleHeaderRow(table, cells);
|
|
475
493
|
break;
|
|
476
494
|
}
|
|
495
|
+
// A split unmarks the cells. They stay marked, as after the
|
|
496
|
+
// other commands, so their popup stays beside them
|
|
497
|
+
if (/^split/.test(command)) {
|
|
498
|
+
cells.forEach(cell => this.__tableModule.addSelection(cell));
|
|
499
|
+
}
|
|
477
500
|
if (/^bin(row|column)$/.test(command) &&
|
|
478
501
|
!this.__tableModule.getColumnsCount(table)) {
|
|
479
502
|
this.__removeTable(table);
|
|
@@ -487,7 +510,6 @@ export class selectCells extends Plugin {
|
|
|
487
510
|
* move to the cells that replace them
|
|
488
511
|
*/
|
|
489
512
|
__toggleHeaderRow(table, cells) {
|
|
490
|
-
var _a, _b;
|
|
491
513
|
const module = this.__tableModule;
|
|
492
514
|
this.j.s.save();
|
|
493
515
|
const replaced = module.toggleHeaderRow(table);
|
|
@@ -499,10 +521,6 @@ export class selectCells extends Plugin {
|
|
|
499
521
|
module.addSelection(next);
|
|
500
522
|
}
|
|
501
523
|
});
|
|
502
|
-
// As after the click that marked it, the command's own change keeps
|
|
503
|
-
// the marks, so the popup can stay open for another toggle
|
|
504
|
-
const anchor = (_a = this.__selectedCell) !== null && _a !== void 0 ? _a : cells[0];
|
|
505
|
-
this.__selectedCell = (_b = replaced.get(anchor)) !== null && _b !== void 0 ? _b : anchor;
|
|
506
524
|
}
|
|
507
525
|
/**
|
|
508
526
|
* The cell that takes the caret when rows or columns are deleted: the next
|
|
@@ -565,6 +583,9 @@ __decorate([
|
|
|
565
583
|
__decorate([
|
|
566
584
|
watch(':keyup')
|
|
567
585
|
], selectCells.prototype, "onKeyUp", null);
|
|
586
|
+
__decorate([
|
|
587
|
+
autobind
|
|
588
|
+
], selectCells.prototype, "__markedBound", null);
|
|
568
589
|
__decorate([
|
|
569
590
|
autobind
|
|
570
591
|
], selectCells.prototype, "onStartSelection", null);
|
|
@@ -577,6 +598,16 @@ __decorate([
|
|
|
577
598
|
__decorate([
|
|
578
599
|
autobind
|
|
579
600
|
], selectCells.prototype, "__onClickAfterDrag", null);
|
|
601
|
+
__decorate([
|
|
602
|
+
watch([
|
|
603
|
+
'ow:mousedown',
|
|
604
|
+
'ow:touchstart',
|
|
605
|
+
'ow:keydown',
|
|
606
|
+
':mousedown',
|
|
607
|
+
':touchstart',
|
|
608
|
+
':keydown'
|
|
609
|
+
])
|
|
610
|
+
], selectCells.prototype, "onPress", null);
|
|
580
611
|
__decorate([
|
|
581
612
|
watch(':change')
|
|
582
613
|
], selectCells.prototype, "onChange", null);
|
|
@@ -41,7 +41,7 @@ declare module 'jodit/config' {
|
|
|
41
41
|
* Jodit.make('#editor', {
|
|
42
42
|
* video: {
|
|
43
43
|
* defaultHandlerSuccess(data) {
|
|
44
|
-
* data.
|
|
44
|
+
* data.items.forEach(({ file }) => {
|
|
45
45
|
* this.s.insertHTML(`<video controls preload="metadata" src="${data.baseurl + file}"></video>`);
|
|
46
46
|
* });
|
|
47
47
|
* }
|
|
@@ -8,14 +8,15 @@ import { Button } from "../../core/ui/button/index.js";
|
|
|
8
8
|
import { UIBlock, UIForm, UIInput, UITextArea } from "../../core/ui/form/index.js";
|
|
9
9
|
import { Icon } from "../../core/ui/icon.js";
|
|
10
10
|
import { Config } from "../../config.js";
|
|
11
|
+
import { getItems } from "../../modules/uploader/helpers/normalize-uploader-data.js";
|
|
11
12
|
import { TabsWidget, UploadTab } from "../../modules/widget/index.js";
|
|
12
13
|
import videoIcon from "./video.svg.js";
|
|
13
14
|
function insertVideos(data) {
|
|
14
|
-
|
|
15
|
-
(
|
|
15
|
+
const { baseurl } = data;
|
|
16
|
+
getItems(data).forEach(({ file }) => {
|
|
16
17
|
this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
|
|
17
18
|
controls: '',
|
|
18
|
-
src:
|
|
19
|
+
src: baseurl + file
|
|
19
20
|
})));
|
|
20
21
|
});
|
|
21
22
|
}
|
|
@@ -16,12 +16,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
16
16
|
import { cache, cached, watch } from "../../core/decorators/index.js";
|
|
17
17
|
import { Dom } from "../../core/dom/dom.js";
|
|
18
18
|
import { pluginSystem } from "../../core/global.js";
|
|
19
|
-
import { isArray } from "../../core/helpers/checker/is-array.js";
|
|
20
19
|
import { position } from "../../core/helpers/size/position.js";
|
|
21
20
|
import { markOwner } from "../../core/helpers/utils/utils.js";
|
|
22
21
|
import { Plugin } from "../../core/plugin/plugin.js";
|
|
23
22
|
import { Button } from "../../core/ui/button/index.js";
|
|
24
23
|
import { Popup } from "../../core/ui/popup/popup.js";
|
|
24
|
+
import { getItems } from "../../modules/uploader/helpers/normalize-uploader-data.js";
|
|
25
25
|
import { FileSelectorWidget } from "../../modules/widget/file-selector/file-selector.js";
|
|
26
26
|
import { UIVideoPropertiesForm } from "./ui/ui-video-form.js";
|
|
27
27
|
import { editedMedia, readValues } from "./readers.js";
|
|
@@ -132,15 +132,16 @@ export class videoProperties extends Plugin {
|
|
|
132
132
|
popup
|
|
133
133
|
.setContent(FileSelectorWidget(j, {
|
|
134
134
|
upload: (data) => {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
const [item] = getItems(data);
|
|
136
|
+
if (item) {
|
|
137
|
+
state.values.poster = data.baseurl + item.file;
|
|
138
138
|
}
|
|
139
139
|
close();
|
|
140
140
|
},
|
|
141
141
|
filebrowser: (data) => {
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
const [item] = getItems(data);
|
|
143
|
+
if (item) {
|
|
144
|
+
state.values.poster = item.file;
|
|
144
145
|
close();
|
|
145
146
|
}
|
|
146
147
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <path d=\"M6 3h12v18l-6-4-6 4z\"/> </g> </svg> ";
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module icons
|
|
10
10
|
*/
|
|
11
|
-
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
11
|
+
export { anchor, angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module icons
|
|
10
10
|
*/
|
|
11
|
+
import anchor from "./anchor.svg.js";
|
|
11
12
|
import angle_down from "./angle-down.svg.js";
|
|
12
13
|
import angle_left from "./angle-left.svg.js";
|
|
13
14
|
import angle_right from "./angle-right.svg.js";
|
|
@@ -37,4 +38,4 @@ import unlock from "./unlock.svg.js";
|
|
|
37
38
|
import update from "./update.svg.js";
|
|
38
39
|
import upload from "./upload.svg.js";
|
|
39
40
|
import valign from "./valign.svg.js";
|
|
40
|
-
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
41
|
+
export { anchor, angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eraser, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module types
|
|
8
8
|
*/
|
|
9
9
|
import type { CanPromise, IDestructible, IDictionary, ImageBox, IPermissions, Nullable } from "./types";
|
|
10
|
-
import type { IUploader, IUploaderOptions } from "./uploader";
|
|
10
|
+
import type { IUploadedFile, IUploader, IUploaderOptions } from "./uploader";
|
|
11
11
|
import type { IViewOptions, IViewWithToolbar } from "./view";
|
|
12
12
|
import type { IUIGroup } from "./ui";
|
|
13
13
|
import type { IObservable } from "./events";
|
|
@@ -140,7 +140,14 @@ export interface IFileBrowserOptions extends IViewOptions {
|
|
|
140
140
|
}
|
|
141
141
|
export interface IFileBrowserCallBackData {
|
|
142
142
|
baseurl: string;
|
|
143
|
+
/**
|
|
144
|
+
* One object per file. In 4.x the arrays win while `files` is set, as in
|
|
145
|
+
* the uploader's data
|
|
146
|
+
*/
|
|
147
|
+
items?: IUploadedFile[];
|
|
148
|
+
/** @deprecated Use `items` instead. Removed in 5.0 */
|
|
143
149
|
files: string[];
|
|
150
|
+
/** @deprecated Use `items` instead. Removed in 5.0 */
|
|
144
151
|
isImages?: boolean[];
|
|
145
152
|
}
|
|
146
153
|
interface IFileBrowserDataProviderItemsMods {
|
package/esm/types/popup.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface IPopup extends IUIElement, IDestructible {
|
|
|
13
13
|
readonly container: HTMLElement;
|
|
14
14
|
readonly isOpened: boolean;
|
|
15
15
|
readonly strategy: PopupStrategy;
|
|
16
|
+
keepOpen?: boolean;
|
|
16
17
|
viewBound: () => IBound;
|
|
17
18
|
open(getBound: () => IBound, keepPosition?: boolean, parentContainer?: HTMLElement): this;
|
|
18
19
|
setContent(content: IUIElement | HTMLElement | string): this;
|