jodit 4.11.4 → 4.11.6
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 +16 -0
- package/es2015/jodit.css +17 -2
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +14 -14
- package/es2015/jodit.js +64 -6
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +3 -3
- 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 +3 -3
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +14 -14
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +17 -2
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +3 -3
- package/es2021/jodit.js +64 -6
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +3 -3
- 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 +17 -2
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +4 -4
- package/es2021.en/jodit.js +64 -6
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +3 -3
- 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 +23 -3
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +76 -12
- 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/progress-bar/progress-bar.d.ts +9 -0
- package/esm/core/ui/progress-bar/progress-bar.js +53 -0
- package/esm/types/toolbar.d.ts +10 -0
- package/package.json +1 -1
- package/types/core/ui/progress-bar/progress-bar.d.ts +9 -0
- package/types/types/toolbar.d.ts +10 -0
package/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
package/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.11.
|
|
6
|
+
export const APP_VERSION = "4.11.6";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -21,5 +21,14 @@ export declare class ProgressBar extends UIElement implements IProgressBar {
|
|
|
21
21
|
show(): IProgressBar;
|
|
22
22
|
hide(): IProgressBar;
|
|
23
23
|
progress(percentage: number): IProgressBar;
|
|
24
|
+
private __animationElement;
|
|
25
|
+
showFileUploadAnimation(from?: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}, to?: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}): void;
|
|
32
|
+
private __cleanUpAnimation;
|
|
24
33
|
destruct(): any;
|
|
25
34
|
}
|
|
@@ -4,8 +4,16 @@
|
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import { Dom } from "../../dom/dom.js";
|
|
7
|
+
import { getContainer } from "../../global.js";
|
|
8
|
+
import { position } from "../../helpers/size/position.js";
|
|
9
|
+
import { css } from "../../helpers/utils/css.js";
|
|
7
10
|
import { UIElement } from "../element.js";
|
|
11
|
+
import { Icon } from "../icon.js";
|
|
8
12
|
export class ProgressBar extends UIElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.__animationElement = null;
|
|
16
|
+
}
|
|
9
17
|
/** @override */
|
|
10
18
|
className() {
|
|
11
19
|
return 'ProgressBar';
|
|
@@ -30,7 +38,52 @@ export class ProgressBar extends UIElement {
|
|
|
30
38
|
this.container.style.width = percentage.toFixed(2) + '%';
|
|
31
39
|
return this;
|
|
32
40
|
}
|
|
41
|
+
showFileUploadAnimation(from, to) {
|
|
42
|
+
this.__cleanUpAnimation();
|
|
43
|
+
const box = getContainer(this.j, ProgressBar);
|
|
44
|
+
const pos = position(this.j.container, this.j);
|
|
45
|
+
const el = this.j.c.div(this.getFullElName('file-animation'));
|
|
46
|
+
const iconSvg = Icon.get('file', '');
|
|
47
|
+
if (iconSvg) {
|
|
48
|
+
el.innerHTML = iconSvg;
|
|
49
|
+
}
|
|
50
|
+
const start = from !== null && from !== void 0 ? from : {
|
|
51
|
+
x: pos.width / 2,
|
|
52
|
+
y: 0
|
|
53
|
+
};
|
|
54
|
+
const end = to !== null && to !== void 0 ? to : {
|
|
55
|
+
x: start.x + 60,
|
|
56
|
+
y: start.y - 80
|
|
57
|
+
};
|
|
58
|
+
css(el, {
|
|
59
|
+
left: pos.left + start.x,
|
|
60
|
+
top: pos.top + start.y
|
|
61
|
+
});
|
|
62
|
+
box.appendChild(el);
|
|
63
|
+
this.__animationElement = el;
|
|
64
|
+
// Force reflow before starting transition
|
|
65
|
+
// eslint-disable-next-line no-unused-expressions
|
|
66
|
+
el.offsetWidth;
|
|
67
|
+
css(el, {
|
|
68
|
+
left: pos.left + end.x,
|
|
69
|
+
top: pos.top + end.y,
|
|
70
|
+
opacity: 0,
|
|
71
|
+
transform: 'scale(0.4)'
|
|
72
|
+
});
|
|
73
|
+
const onEnd = () => {
|
|
74
|
+
el.removeEventListener('transitionend', onEnd);
|
|
75
|
+
this.__cleanUpAnimation();
|
|
76
|
+
};
|
|
77
|
+
el.addEventListener('transitionend', onEnd);
|
|
78
|
+
}
|
|
79
|
+
__cleanUpAnimation() {
|
|
80
|
+
if (this.__animationElement) {
|
|
81
|
+
Dom.safeRemove(this.__animationElement);
|
|
82
|
+
this.__animationElement = null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
33
85
|
destruct() {
|
|
86
|
+
this.__cleanUpAnimation();
|
|
34
87
|
this.hide();
|
|
35
88
|
return super.destruct();
|
|
36
89
|
}
|
package/esm/types/toolbar.d.ts
CHANGED
|
@@ -270,4 +270,14 @@ export interface IProgressBar extends IUIElement {
|
|
|
270
270
|
show(): IProgressBar;
|
|
271
271
|
hide(): IProgressBar;
|
|
272
272
|
progress(percentage: number): IProgressBar;
|
|
273
|
+
/**
|
|
274
|
+
* Show file upload animation - file icon flies from `from` to `to` and fades out
|
|
275
|
+
*/
|
|
276
|
+
showFileUploadAnimation(from?: {
|
|
277
|
+
x: number;
|
|
278
|
+
y: number;
|
|
279
|
+
}, to?: {
|
|
280
|
+
x: number;
|
|
281
|
+
y: number;
|
|
282
|
+
}): void;
|
|
273
283
|
}
|
package/package.json
CHANGED
|
@@ -21,5 +21,14 @@ export declare class ProgressBar extends UIElement implements IProgressBar {
|
|
|
21
21
|
show(): IProgressBar;
|
|
22
22
|
hide(): IProgressBar;
|
|
23
23
|
progress(percentage: number): IProgressBar;
|
|
24
|
+
private __animationElement;
|
|
25
|
+
showFileUploadAnimation(from?: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}, to?: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}): void;
|
|
32
|
+
private __cleanUpAnimation;
|
|
24
33
|
destruct(): any;
|
|
25
34
|
}
|
package/types/types/toolbar.d.ts
CHANGED
|
@@ -270,4 +270,14 @@ export interface IProgressBar extends IUIElement {
|
|
|
270
270
|
show(): IProgressBar;
|
|
271
271
|
hide(): IProgressBar;
|
|
272
272
|
progress(percentage: number): IProgressBar;
|
|
273
|
+
/**
|
|
274
|
+
* Show file upload animation - file icon flies from `from` to `to` and fades out
|
|
275
|
+
*/
|
|
276
|
+
showFileUploadAnimation(from?: {
|
|
277
|
+
x: number;
|
|
278
|
+
y: number;
|
|
279
|
+
}, to?: {
|
|
280
|
+
x: number;
|
|
281
|
+
y: number;
|
|
282
|
+
}): void;
|
|
273
283
|
}
|