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
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.1.5
4
+ * Version: v4.1.8
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -3096,7 +3096,7 @@ __webpack_require__.r(__webpack_exports__);
3096
3096
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
3097
3097
  */
3098
3098
 
3099
- var APP_VERSION = "4.1.5";
3099
+ var APP_VERSION = "4.1.8";
3100
3100
  // prettier-ignore
3101
3101
  var ES = "es5";
3102
3102
  var IS_ES_MODERN = false;
@@ -3106,7 +3106,7 @@ var IS_TEST = false;
3106
3106
  var FAT_MODE = false;
3107
3107
  var HOMEPAGE = "https://xdsoft.net/jodit/";
3108
3108
  var SET_TEST = function () { return (IS_TEST = true); };
3109
- var TOKENS = {"TOKEN_GPT":"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"};
3109
+ var TOKENS = {};
3110
3110
  var INVISIBLE_SPACE = '\uFEFF';
3111
3111
  var NBSP_SPACE = '\u00A0';
3112
3112
  var INVISIBLE_SPACE_REG_EXP = function () { return /[\uFEFF]/g; };
@@ -27540,9 +27540,9 @@ var aiAssistant = /** @class */ (function (_super) {
27540
27540
  closeOnClickOverlay: true,
27541
27541
  closeOnEsc: true,
27542
27542
  resizable: false,
27543
- draggable: true,
27544
- minWidth: 460,
27545
- maxWidth: 460
27543
+ draggable: true
27544
+ // minWidth: 460,
27545
+ // maxWidth: 460
27546
27546
  });
27547
27547
  dialog.bindDestruct(jodit);
27548
27548
  var container = new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_4__/* .UiAiAssistant */ .b(jodit, {
@@ -27861,11 +27861,12 @@ var UiAiAssistant = /** @class */ (function (_super) {
27861
27861
  var onSubmit = function () {
27862
27862
  if (_this.__formAiAssistant.validate()) {
27863
27863
  _this.__formAiAssistant.submit();
27864
- _this.__toogleSubmitButton(true);
27864
+ _this.__toggleInsertButton(true);
27865
+ _this.__toggleSubmitButton(true);
27865
27866
  }
27866
27867
  };
27867
27868
  _this.__submitButton = (0,jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .Button */ .$n)(jodit, 'ai-assistant', '').onAction(onSubmit);
27868
- _this.__tryAgainButton = (0,jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .Button */ .$n)(jodit, '', 'Try Again', 'initial').onAction(onSubmit);
27869
+ _this.__tryAgainButton = (0,jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .Button */ .$n)(jodit, 'update', '', 'initial').onAction(onSubmit);
27869
27870
  _this.promptInput = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
27870
27871
  name: 'prompt',
27871
27872
  required: true,
@@ -27918,9 +27919,10 @@ var UiAiAssistant = /** @class */ (function (_super) {
27918
27919
  ]
27919
27920
  .filter(Boolean)
27920
27921
  .join(' ');
27922
+ this.__toggleInsertButton(true);
27921
27923
  if (this.promptInput.value) {
27922
27924
  this.__formAiAssistant.submit();
27923
- this.__toogleSubmitButton(true);
27925
+ this.__toggleSubmitButton(true);
27924
27926
  }
27925
27927
  }
27926
27928
  this.promptInput.focus();
@@ -27930,21 +27932,30 @@ var UiAiAssistant = /** @class */ (function (_super) {
27930
27932
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.detach(this.__results);
27931
27933
  this.__aiResult = result;
27932
27934
  this.__results.appendChild(this.jodit.c.fromHTML(result));
27933
- this.__toogleSubmitButton(false);
27935
+ this.__toggleSubmitButton(false);
27936
+ this.__toggleInsertButton(false);
27934
27937
  };
27935
27938
  UiAiAssistant.prototype.onAiAssistentError = function (error) {
27936
27939
  this.__aiResult = '';
27937
27940
  this.setMod('loading', false);
27938
27941
  this.__error.textContent = error;
27939
- this.__toogleSubmitButton(false);
27942
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.detach(this.__results);
27943
+ this.__toggleSubmitButton(false);
27944
+ var hideMod = this.getFullElName('', 'hide', 'true');
27945
+ this.__results.classList.add(hideMod);
27946
+ this.__toggleInsertButton(true);
27940
27947
  };
27941
27948
  UiAiAssistant.prototype.onChangePromptValue = function () {
27942
- this.__toogleSubmitButton(!this.promptInput.value);
27949
+ this.__toggleSubmitButton(!this.promptInput.value);
27943
27950
  };
27944
- UiAiAssistant.prototype.__toogleSubmitButton = function (value) {
27951
+ UiAiAssistant.prototype.__toggleSubmitButton = function (value) {
27945
27952
  this.__submitButton.state.disabled = value;
27946
27953
  this.__tryAgainButton.state.disabled = value;
27947
27954
  };
27955
+ UiAiAssistant.prototype.__toggleInsertButton = function (value) {
27956
+ this.__insertButton.state.disabled = value;
27957
+ this.__insertAfterButton.state.disabled = value;
27958
+ };
27948
27959
  (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
27949
27960
  (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)(':ai-assistant-response')
27950
27961
  ], UiAiAssistant.prototype, "onAiAssistentResponse", null);
@@ -50132,7 +50143,6 @@ __webpack_require__.r(__webpack_exports__);
50132
50143
 
50133
50144
 
50134
50145
 
50135
- // JODIT-SECTION-END:POLYFILLS
50136
50146
 
50137
50147
 
50138
50148
 
@@ -50143,6 +50153,7 @@ if (typeof process !== 'undefined' &&
50143
50153
  typeof window !== 'undefined') {
50144
50154
  __webpack_require__(19005);
50145
50155
  }
50156
+ // JODIT-SECTION-END:POLYFILLS
50146
50157
  // copy constants in Jodit
50147
50158
  Object.keys(_core_constants__WEBPACK_IMPORTED_MODULE_2__).forEach(function (key) {
50148
50159
  _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x[key] = _core_constants__WEBPACK_IMPORTED_MODULE_2__[key];