jodit 4.1.5 → 4.1.8

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 (67) hide show
  1. package/CHANGELOG.md +9 -5
  2. package/es2015/jodit.css +11 -2
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +354 -5514
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +2 -2
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  13. package/es2018/jodit.css +11 -2
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +2 -2
  16. package/es2018/jodit.js +353 -5513
  17. package/es2018/jodit.min.css +1 -1
  18. package/es2018/jodit.min.js +2 -2
  19. package/es2018/plugins/debug/debug.js +1 -1
  20. package/es2018/plugins/debug/debug.min.js +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  23. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  24. package/es2021/jodit.css +11 -2
  25. package/es2021/jodit.fat.min.css +1 -1
  26. package/es2021/jodit.fat.min.js +2 -2
  27. package/es2021/jodit.js +353 -5513
  28. package/es2021/jodit.min.css +1 -1
  29. package/es2021/jodit.min.js +2 -2
  30. package/es2021/plugins/debug/debug.js +1 -1
  31. package/es2021/plugins/debug/debug.min.js +1 -1
  32. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  33. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  34. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  35. package/es2021.en/jodit.css +11 -2
  36. package/es2021.en/jodit.fat.min.css +1 -1
  37. package/es2021.en/jodit.fat.min.js +2 -2
  38. package/es2021.en/jodit.js +352 -5512
  39. package/es2021.en/jodit.min.css +1 -1
  40. package/es2021.en/jodit.min.js +2 -2
  41. package/es2021.en/plugins/debug/debug.js +1 -1
  42. package/es2021.en/plugins/debug/debug.min.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  46. package/es5/jodit.css +12 -3
  47. package/es5/jodit.fat.min.css +1 -1
  48. package/es5/jodit.fat.min.js +2 -2
  49. package/es5/jodit.js +25 -14
  50. package/es5/jodit.min.css +3 -3
  51. package/es5/jodit.min.js +2 -2
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  57. package/esm/core/constants.js +1 -1
  58. package/esm/index.js +0 -7
  59. package/esm/plugins/ai-assistant/ai-assistant.d.ts +2 -2
  60. package/esm/plugins/ai-assistant/ai-assistant.js +3 -3
  61. package/esm/plugins/ai-assistant/ui/ui-ai-assistant.d.ts +5 -1
  62. package/esm/plugins/ai-assistant/ui/ui-ai-assistant.js +18 -7
  63. package/package.json +1 -1
  64. package/types/plugins/ai-assistant/ai-assistant.d.ts +2 -2
  65. package/types/plugins/ai-assistant/ui/ui-ai-assistant.d.ts +5 -1
  66. package/esm/polyfills.d.ts +0 -10
  67. package/types/polyfills.d.ts +0 -10
@@ -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.1.5
4
+ * Version: v4.1.8
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.1.5
4
+ * Version: v4.1.8
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.1.5
4
+ * Version: v4.1.8
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.1.5
4
+ * Version: v4.1.8
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.1.5
4
+ * Version: v4.1.8
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-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- export const APP_VERSION = "4.1.5";
6
+ export const APP_VERSION = "4.1.8";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
package/esm/index.js CHANGED
@@ -14,15 +14,8 @@ import * as constants from "./core/constants";
14
14
  import * as decorators from "./core/decorators";
15
15
  import * as Modules from "./modules/";
16
16
  import * as Icons from "./styles/icons/";
17
- // JODIT-SECTION-END:POLYFILLS
18
17
  import { Jodit as DefaultJodit } from "./jodit";
19
18
  import Languages from "./languages";
20
- // JODIT-SECTION-START:POLYFILLS
21
- if (typeof process !== 'undefined' &&
22
- constants.ES === 'es5' &&
23
- typeof window !== 'undefined') {
24
- require("./polyfills");
25
- }
26
19
  // copy constants in Jodit
27
20
  Object.keys(constants).forEach((key) => {
28
21
  DefaultJodit[key] = constants[key];
@@ -4,9 +4,9 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * [[include:plugins/jodit-ai/README.md]]
7
+ * [[include:plugins/ai-assistant/README.md]]
8
8
  * @packageDocumentation
9
- * @module plugins/joditai
9
+ * @module plugins/ai-assistant
10
10
  */
11
11
  import type { IJodit } from "jodit/esm/types";
12
12
  import { Plugin } from "jodit/esm/core/plugin/plugin";
@@ -47,9 +47,9 @@ export class aiAssistant extends Plugin {
47
47
  closeOnClickOverlay: true,
48
48
  closeOnEsc: true,
49
49
  resizable: false,
50
- draggable: true,
51
- minWidth: 460,
52
- maxWidth: 460
50
+ draggable: true
51
+ // minWidth: 460,
52
+ // maxWidth: 460
53
53
  });
54
54
  dialog.bindDestruct(jodit);
55
55
  const container = new UiAiAssistant(jodit, {
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/ai-assistant
8
+ */
6
9
  import type { IJodit } from "jodit/esm/types";
7
10
  import { UITextArea } from "jodit/esm/core/ui";
8
11
  import { UIElement } from "jodit/esm/core/ui/element";
@@ -30,5 +33,6 @@ export declare class UiAiAssistant extends UIElement<IJodit> {
30
33
  protected onAiAssistentResponse(result: string): void;
31
34
  protected onAiAssistentError(error: string): void;
32
35
  protected onChangePromptValue(): void;
33
- private __toogleSubmitButton;
36
+ private __toggleSubmitButton;
37
+ private __toggleInsertButton;
34
38
  }
@@ -36,11 +36,12 @@ let UiAiAssistant = class UiAiAssistant extends UIElement {
36
36
  const onSubmit = () => {
37
37
  if (this.__formAiAssistant.validate()) {
38
38
  this.__formAiAssistant.submit();
39
- this.__toogleSubmitButton(true);
39
+ this.__toggleInsertButton(true);
40
+ this.__toggleSubmitButton(true);
40
41
  }
41
42
  };
42
43
  this.__submitButton = Button(jodit, 'ai-assistant', '').onAction(onSubmit);
43
- this.__tryAgainButton = Button(jodit, '', 'Try Again', 'initial').onAction(onSubmit);
44
+ this.__tryAgainButton = Button(jodit, 'update', '', 'initial').onAction(onSubmit);
44
45
  this.promptInput = new UITextArea(jodit, {
45
46
  name: 'prompt',
46
47
  required: true,
@@ -98,9 +99,10 @@ let UiAiAssistant = class UiAiAssistant extends UIElement {
98
99
  ]
99
100
  .filter(Boolean)
100
101
  .join(' ');
102
+ this.__toggleInsertButton(true);
101
103
  if (this.promptInput.value) {
102
104
  this.__formAiAssistant.submit();
103
- this.__toogleSubmitButton(true);
105
+ this.__toggleSubmitButton(true);
104
106
  }
105
107
  }
106
108
  this.promptInput.focus();
@@ -110,21 +112,30 @@ let UiAiAssistant = class UiAiAssistant extends UIElement {
110
112
  Dom.detach(this.__results);
111
113
  this.__aiResult = result;
112
114
  this.__results.appendChild(this.jodit.c.fromHTML(result));
113
- this.__toogleSubmitButton(false);
115
+ this.__toggleSubmitButton(false);
116
+ this.__toggleInsertButton(false);
114
117
  }
115
118
  onAiAssistentError(error) {
116
119
  this.__aiResult = '';
117
120
  this.setMod('loading', false);
118
121
  this.__error.textContent = error;
119
- this.__toogleSubmitButton(false);
122
+ Dom.detach(this.__results);
123
+ this.__toggleSubmitButton(false);
124
+ const hideMod = this.getFullElName('', 'hide', 'true');
125
+ this.__results.classList.add(hideMod);
126
+ this.__toggleInsertButton(true);
120
127
  }
121
128
  onChangePromptValue() {
122
- this.__toogleSubmitButton(!this.promptInput.value);
129
+ this.__toggleSubmitButton(!this.promptInput.value);
123
130
  }
124
- __toogleSubmitButton(value) {
131
+ __toggleSubmitButton(value) {
125
132
  this.__submitButton.state.disabled = value;
126
133
  this.__tryAgainButton.state.disabled = value;
127
134
  }
135
+ __toggleInsertButton(value) {
136
+ this.__insertButton.state.disabled = value;
137
+ this.__insertAfterButton.state.disabled = value;
138
+ }
128
139
  };
129
140
  __decorate([
130
141
  watch(':ai-assistant-response')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.1.5",
3
+ "version": "4.1.8",
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",
@@ -4,9 +4,9 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  /**
7
- * [[include:plugins/jodit-ai/README.md]]
7
+ * [[include:plugins/ai-assistant/README.md]]
8
8
  * @packageDocumentation
9
- * @module plugins/joditai
9
+ * @module plugins/ai-assistant
10
10
  */
11
11
  import type { IJodit } from "jodit/esm/types";
12
12
  import { Plugin } from "jodit/esm/core/plugin/plugin";
@@ -3,6 +3,9 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/ai-assistant
8
+ */
6
9
  import type { IJodit } from "jodit/esm/types";
7
10
  import { UITextArea } from "jodit/esm/core/ui";
8
11
  import { UIElement } from "jodit/esm/core/ui/element";
@@ -30,5 +33,6 @@ export declare class UiAiAssistant extends UIElement<IJodit> {
30
33
  protected onAiAssistentResponse(result: string): void;
31
34
  protected onAiAssistentError(error: string): void;
32
35
  protected onChangePromptValue(): void;
33
- private __toogleSubmitButton;
36
+ private __toggleSubmitButton;
37
+ private __toggleInsertButton;
34
38
  }
@@ -1,10 +0,0 @@
1
- /*!
2
- * Jodit Editor (https://xdsoft.net/jodit/)
3
- * Released under MIT see LICENSE.txt in the project root for license information.
4
- * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
- */
6
- import "classlist-polyfill";
7
- import "es6-promise/auto";
8
- import "core-js/es/symbol";
9
- import "core-js/es/array/find-index";
10
- import "core-js/es/array/from";
@@ -1,10 +0,0 @@
1
- /*!
2
- * Jodit Editor (https://xdsoft.net/jodit/)
3
- * Released under MIT see LICENSE.txt in the project root for license information.
4
- * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
- */
6
- import "classlist-polyfill";
7
- import "es6-promise/auto";
8
- import "core-js/es/symbol";
9
- import "core-js/es/array/find-index";
10
- import "core-js/es/array/from";