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.
Files changed (65) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/es2015/jodit.css +17 -2
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +14 -14
  5. package/es2015/jodit.js +64 -6
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +3 -3
  8. package/es2015/plugins/debug/debug.css +1 -1
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +3 -3
  16. package/es2018/jodit.min.css +1 -1
  17. package/es2018/jodit.min.js +14 -14
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  20. package/es2021/jodit.css +17 -2
  21. package/es2021/jodit.fat.min.css +1 -1
  22. package/es2021/jodit.fat.min.js +3 -3
  23. package/es2021/jodit.js +64 -6
  24. package/es2021/jodit.min.css +1 -1
  25. package/es2021/jodit.min.js +3 -3
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  32. package/es2021.en/jodit.css +17 -2
  33. package/es2021.en/jodit.fat.min.css +1 -1
  34. package/es2021.en/jodit.fat.min.js +4 -4
  35. package/es2021.en/jodit.js +64 -6
  36. package/es2021.en/jodit.min.css +1 -1
  37. package/es2021.en/jodit.min.js +3 -3
  38. package/es2021.en/plugins/debug/debug.css +1 -1
  39. package/es2021.en/plugins/debug/debug.js +1 -1
  40. package/es2021.en/plugins/debug/debug.min.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  44. package/es5/jodit.css +23 -3
  45. package/es5/jodit.fat.min.css +1 -1
  46. package/es5/jodit.fat.min.js +2 -2
  47. package/es5/jodit.js +76 -12
  48. package/es5/jodit.min.css +3 -3
  49. package/es5/jodit.min.js +2 -2
  50. package/es5/plugins/debug/debug.css +1 -1
  51. package/es5/plugins/debug/debug.js +1 -1
  52. package/es5/plugins/debug/debug.min.js +1 -1
  53. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  56. package/es5/polyfills.fat.min.js +1 -1
  57. package/es5/polyfills.js +1 -1
  58. package/es5/polyfills.min.js +1 -1
  59. package/esm/core/constants.js +1 -1
  60. package/esm/core/ui/progress-bar/progress-bar.d.ts +9 -0
  61. package/esm/core/ui/progress-bar/progress-bar.js +53 -0
  62. package/esm/types/toolbar.d.ts +10 -0
  63. package/package.json +1 -1
  64. package/types/core/ui/progress-bar/progress-bar.d.ts +9 -0
  65. package/types/types/toolbar.d.ts +10 -0
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/es5/polyfills.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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.11.4
4
+ * Version: v4.11.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.4";
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
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.11.4",
3
+ "version": "4.11.6",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -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
  }
@@ -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
  }