jodit 4.0.0-beta.95 → 4.0.0-beta.99

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 (95) hide show
  1. package/CHANGELOG.md +21 -5
  2. package/README.md +4 -4
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +95 -88
  6. package/es2015/jodit.min.js +2 -2
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.css +1 -1
  13. package/es2018/jodit.fat.min.js +2 -2
  14. package/es2018/jodit.js +95 -88
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.js +1 -1
  17. package/es2018/plugins/debug/debug.min.js +1 -1
  18. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  21. package/es2021/jodit.css +1 -1
  22. package/es2021/jodit.fat.min.js +2 -2
  23. package/es2021/jodit.js +95 -88
  24. package/es2021/jodit.min.js +2 -2
  25. package/es2021/plugins/debug/debug.js +1 -1
  26. package/es2021/plugins/debug/debug.min.js +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  28. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  30. package/es2021.en/jodit.css +1 -1
  31. package/es2021.en/jodit.fat.min.js +2 -2
  32. package/es2021.en/jodit.js +95 -88
  33. package/es2021.en/jodit.min.js +2 -2
  34. package/es2021.en/plugins/debug/debug.js +1 -1
  35. package/es2021.en/plugins/debug/debug.min.js +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  37. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  38. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  39. package/es5/jodit.css +2 -2
  40. package/es5/jodit.fat.min.js +2 -2
  41. package/es5/jodit.js +104 -97
  42. package/es5/jodit.min.css +2 -2
  43. package/es5/jodit.min.js +2 -2
  44. package/es5/plugins/debug/debug.js +1 -1
  45. package/es5/plugins/debug/debug.min.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  47. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  48. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  49. package/esm/core/async/async.d.ts +1 -1
  50. package/esm/core/async/async.js +4 -0
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/helpers/string/ucfirst.js +1 -1
  53. package/esm/core/helpers/utils/index.d.ts +0 -1
  54. package/esm/core/helpers/utils/index.js +0 -1
  55. package/esm/core/selection/interface.d.ts +1 -1
  56. package/esm/core/ui/form/inputs/area/area.d.ts +1 -1
  57. package/esm/core/ui/form/inputs/area/area.js +1 -1
  58. package/esm/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
  59. package/esm/core/ui/form/inputs/checkbox/checkbox.js +1 -1
  60. package/esm/core/ui/form/inputs/file/file.d.ts +1 -1
  61. package/esm/core/ui/form/inputs/file/file.js +1 -1
  62. package/esm/core/ui/form/inputs/index.d.ts +1 -1
  63. package/esm/core/ui/form/inputs/index.js +1 -1
  64. package/esm/core/ui/form/inputs/input/input.d.ts +1 -1
  65. package/esm/core/ui/form/inputs/input/input.js +1 -1
  66. package/esm/core/ui/form/inputs/select/select.d.ts +1 -1
  67. package/esm/core/ui/form/inputs/select/select.js +1 -1
  68. package/esm/modules/messages/messages.d.ts +28 -0
  69. package/esm/modules/messages/messages.js +28 -0
  70. package/esm/modules/table/table.d.ts +4 -2
  71. package/esm/modules/table/table.js +2 -0
  72. package/esm/modules/widget/color-picker/color-picker.d.ts +1 -1
  73. package/esm/modules/widget/color-picker/color-picker.js +1 -1
  74. package/esm/modules/widget/file-selector/file-selector.d.ts +1 -18
  75. package/esm/modules/widget/file-selector/file-selector.js +12 -19
  76. package/esm/modules/widget/tabs/tabs.d.ts +17 -6
  77. package/esm/modules/widget/tabs/tabs.js +17 -6
  78. package/package.json +1 -1
  79. package/types/core/async/async.d.ts +1 -1
  80. package/types/core/helpers/utils/index.d.ts +0 -1
  81. package/types/core/selection/interface.d.ts +1 -1
  82. package/types/core/ui/form/inputs/area/area.d.ts +1 -1
  83. package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
  84. package/types/core/ui/form/inputs/file/file.d.ts +1 -1
  85. package/types/core/ui/form/inputs/index.d.ts +1 -1
  86. package/types/core/ui/form/inputs/input/input.d.ts +1 -1
  87. package/types/core/ui/form/inputs/select/select.d.ts +1 -1
  88. package/types/modules/messages/messages.d.ts +28 -0
  89. package/types/modules/table/table.d.ts +4 -2
  90. package/types/modules/widget/color-picker/color-picker.d.ts +1 -1
  91. package/types/modules/widget/file-selector/file-selector.d.ts +1 -18
  92. package/types/modules/widget/tabs/tabs.d.ts +17 -6
  93. package/esm/core/helpers/utils/val.d.ts +0 -9
  94. package/esm/core/helpers/utils/val.js +0 -18
  95. package/types/core/helpers/utils/val.d.ts +0 -9
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.0.0-beta.95
4
+ * Version: v4.0.0-beta.99
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1023,14 +1023,15 @@ Config.prototype.controls = {};
1023
1023
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1024
1024
  /* harmony export */ e: function() { return /* binding */ Async; }
1025
1025
  /* harmony export */ });
1026
- /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78037);
1027
- /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(69099);
1028
- /* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45564);
1029
- /* harmony import */ var jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59862);
1030
- /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2926);
1031
- /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(32952);
1026
+ /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78037);
1027
+ /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(69099);
1028
+ /* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45564);
1029
+ /* harmony import */ var jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(59862);
1030
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2926);
1031
+ /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32952);
1032
1032
  /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52378);
1033
1033
  /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_0__);
1034
+ /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41240);
1034
1035
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62924);
1035
1036
  /*!
1036
1037
  * Jodit Editor (https://xdsoft.net/jodit/)
@@ -1045,6 +1046,7 @@ Config.prototype.controls = {};
1045
1046
 
1046
1047
 
1047
1048
 
1049
+
1048
1050
  class Async {
1049
1051
  constructor() {
1050
1052
  this.timers = new Map();
@@ -1078,14 +1080,17 @@ class Async {
1078
1080
  return 0;
1079
1081
  }
1080
1082
  let options = {};
1081
- if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_2__/* .isNumber */ .h)(timeout)) {
1083
+ if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__/* .isVoid */ .n)(timeout)) {
1084
+ timeout = 0;
1085
+ }
1086
+ if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__/* .isNumber */ .h)(timeout)) {
1082
1087
  options = timeout;
1083
1088
  timeout = options.timeout || 0;
1084
1089
  }
1085
1090
  if (options.label) {
1086
1091
  this.clearLabel(options.label);
1087
1092
  }
1088
- const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .setTimeout */ .i)(callback, timeout, ...args), key = options.label || timer;
1093
+ const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .setTimeout */ .i)(callback, timeout, ...args), key = options.label || timer;
1089
1094
  this.timers.set(key, timer);
1090
1095
  this.__callbacks.set(key, callback);
1091
1096
  return timer;
@@ -1101,16 +1106,16 @@ class Async {
1101
1106
  }
1102
1107
  clearLabel(label) {
1103
1108
  if (label && this.timers.has(label)) {
1104
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(this.timers.get(label));
1109
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(this.timers.get(label));
1105
1110
  this.timers.delete(label);
1106
1111
  this.__callbacks.delete(label);
1107
1112
  }
1108
1113
  }
1109
1114
  clearTimeout(timerOrLabel) {
1110
- if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .H)(timerOrLabel)) {
1115
+ if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .H)(timerOrLabel)) {
1111
1116
  return this.clearLabel(timerOrLabel);
1112
1117
  }
1113
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(timerOrLabel);
1118
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(timerOrLabel);
1114
1119
  this.timers.delete(timerOrLabel);
1115
1120
  this.__callbacks.delete(timerOrLabel);
1116
1121
  }
@@ -1139,7 +1144,7 @@ class Async {
1139
1144
  promises.forEach(res => res());
1140
1145
  promises.length = 0;
1141
1146
  };
1142
- (0,jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_5__/* .isPromise */ .t)(res) ? res.finally(runPromises) : runPromises();
1147
+ (0,jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_6__/* .isPromise */ .t)(res) ? res.finally(runPromises) : runPromises();
1143
1148
  }
1144
1149
  }
1145
1150
  };
@@ -1152,12 +1157,12 @@ class Async {
1152
1157
  if (!timer && firstCallImmediately) {
1153
1158
  callFn(...args);
1154
1159
  }
1155
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(timer);
1156
- timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_6__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1160
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(timer);
1161
+ timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1157
1162
  this.timers.set(fn, timer);
1158
1163
  }
1159
1164
  };
1160
- return (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_7__/* .isPlainObject */ .P)(timeout) && timeout.promisify
1165
+ return (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__/* .isPlainObject */ .P)(timeout) && timeout.promisify
1161
1166
  ? (...args) => {
1162
1167
  const promise = this.promise(res => {
1163
1168
  promises.push(res);
@@ -1218,7 +1223,7 @@ class Async {
1218
1223
  if (needInvoke) {
1219
1224
  fn(...lastArgs);
1220
1225
  needInvoke = false;
1221
- timer = this.setTimeout(callee, (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_6__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1226
+ timer = this.setTimeout(callee, (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1222
1227
  this.timers.set(callee, timer);
1223
1228
  }
1224
1229
  else {
@@ -1301,7 +1306,7 @@ class Async {
1301
1306
  clear() {
1302
1307
  this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
1303
1308
  this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
1304
- this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(this.timers.get(key)));
1309
+ this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(this.timers.get(key)));
1305
1310
  this.timers.clear();
1306
1311
  this.promisesRejections.forEach(reject => reject());
1307
1312
  this.promisesRejections.clear();
@@ -1716,7 +1721,7 @@ __webpack_require__.r(__webpack_exports__);
1716
1721
  * Released under MIT see LICENSE.txt in the project root for license information.
1717
1722
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1718
1723
  */
1719
- const APP_VERSION = "4.0.0-beta.95";
1724
+ const APP_VERSION = "4.0.0-beta.99";
1720
1725
  // prettier-ignore
1721
1726
  const ES = "es2021";
1722
1727
  const IS_ES_MODERN = true;
@@ -7042,7 +7047,7 @@ function ucfirst(value) {
7042
7047
  if (!value.length) {
7043
7048
  return '';
7044
7049
  }
7045
- return value[0].toUpperCase() + value.substr(1);
7050
+ return value[0].toUpperCase() + value.substring(1);
7046
7051
  }
7047
7052
 
7048
7053
 
@@ -8197,8 +8202,7 @@ __webpack_require__.r(__webpack_exports__);
8197
8202
  /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_21__.m; },
8198
8203
  /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.W2; },
8199
8204
  /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_22__.n; },
8200
- /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; },
8201
- /* harmony export */ val: function() { return /* reexport safe */ _val__WEBPACK_IMPORTED_MODULE_27__.P; }
8205
+ /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
8202
8206
  /* harmony export */ });
8203
8207
  /* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13931);
8204
8208
  /* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23144);
@@ -8231,7 +8235,6 @@ __webpack_require__.r(__webpack_exports__);
8231
8235
  /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(49155);
8232
8236
  /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(56114);
8233
8237
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(87398);
8234
- /* harmony import */ var _val__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(96416);
8235
8238
  /*!
8236
8239
  * Jodit Editor (https://xdsoft.net/jodit/)
8237
8240
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8267,7 +8270,6 @@ __webpack_require__.r(__webpack_exports__);
8267
8270
 
8268
8271
 
8269
8272
 
8270
-
8271
8273
 
8272
8274
 
8273
8275
  /***/ }),
@@ -8982,35 +8984,6 @@ const getDataTransfer = (event) => {
8982
8984
  };
8983
8985
 
8984
8986
 
8985
- /***/ }),
8986
-
8987
- /***/ 96416:
8988
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8989
-
8990
- "use strict";
8991
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8992
- /* harmony export */ P: function() { return /* binding */ val; }
8993
- /* harmony export */ });
8994
- /*!
8995
- * Jodit Editor (https://xdsoft.net/jodit/)
8996
- * Released under MIT see LICENSE.txt in the project root for license information.
8997
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
8998
- */
8999
- /**
9000
- * @module helpers/utils
9001
- */
9002
- const val = (elm, selector, value) => {
9003
- const child = elm.querySelector(selector);
9004
- if (!child) {
9005
- return '';
9006
- }
9007
- if (value) {
9008
- child.value = value;
9009
- }
9010
- return child.value;
9011
- };
9012
-
9013
-
9014
8987
  /***/ }),
9015
8988
 
9016
8989
  /***/ 97800:
@@ -13720,7 +13693,7 @@ UIForm = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
13720
13693
  var UITextArea_1;
13721
13694
 
13722
13695
  /**
13723
- * @module ui/form/inputs
13696
+ * @module ui/form
13724
13697
  */
13725
13698
 
13726
13699
 
@@ -13774,7 +13747,7 @@ UITextArea = UITextArea_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate
13774
13747
  var UICheckbox_1;
13775
13748
 
13776
13749
  /**
13777
- * @module ui/form/inputs
13750
+ * @module ui/form
13778
13751
  */
13779
13752
 
13780
13753
 
@@ -13863,7 +13836,7 @@ UICheckbox = UICheckbox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate
13863
13836
  */
13864
13837
 
13865
13838
  /**
13866
- * @module ui/form/inputs
13839
+ * @module ui/form
13867
13840
  */
13868
13841
 
13869
13842
 
@@ -13940,7 +13913,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
13940
13913
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
13941
13914
  */
13942
13915
  /**
13943
- * @module ui/form/inputs
13916
+ * @module ui/form
13944
13917
  */
13945
13918
 
13946
13919
 
@@ -13974,7 +13947,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
13974
13947
  var UIInput_1;
13975
13948
 
13976
13949
  /**
13977
- * @module ui/form/inputs
13950
+ * @module ui/form
13978
13951
  */
13979
13952
 
13980
13953
 
@@ -14213,7 +14186,7 @@ UIInput = UIInput_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn
14213
14186
  var UISelect_1;
14214
14187
 
14215
14188
  /**
14216
- * @module ui/form/inputs
14189
+ * @module ui/form
14217
14190
  */
14218
14191
 
14219
14192
 
@@ -21824,15 +21797,43 @@ let UIMessages = class UIMessages extends jodit_core_ui_group_group__WEBPACK_IMP
21824
21797
  this.options = options;
21825
21798
  this.__messages = new Set();
21826
21799
  }
21800
+ /**
21801
+ * Show popup info message in the lower right corner of the container
21802
+ * ```js
21803
+ * const jodit = Jodit.make('#editor');
21804
+ * jodit.info('Hello world', 3000);
21805
+ * ```
21806
+ */
21827
21807
  info(text, timeout) {
21828
21808
  this.__message(text, 'info', timeout);
21829
21809
  }
21810
+ /**
21811
+ * Show popup success message in the lower right corner of the container
21812
+ * ```js
21813
+ * const jodit = Jodit.make('#editor');
21814
+ * jodit.success('Hello world', 3000);
21815
+ * ```
21816
+ */
21830
21817
  success(text, timeout) {
21831
21818
  this.__message(text, 'success', timeout);
21832
21819
  }
21820
+ /**
21821
+ * Show popup error message in the lower right corner of the container
21822
+ * ```js
21823
+ * const jodit = Jodit.make('#editor');
21824
+ * jodit.error('Hello world', 3000);
21825
+ * ```
21826
+ */
21833
21827
  error(text, timeout) {
21834
21828
  this.__message(text, 'error', timeout);
21835
21829
  }
21830
+ /**
21831
+ * Show popup message in the lower right corner of the container
21832
+ * ```js
21833
+ * const jodit = Jodit.make('#editor');
21834
+ * jodit.message('Hello world', 'info', 3000);
21835
+ * ```
21836
+ */
21836
21837
  message(text, variant, timeout) {
21837
21838
  this.__message(text, variant, timeout);
21838
21839
  }
@@ -22160,9 +22161,11 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_3__/* .ViewCom
22160
22161
  /**
22161
22162
  * Inserts a new line after row what contains the selected cell
22162
22163
  *
22164
+ * @param table - Working table
22163
22165
  * @param line - Insert a new line after/before this
22164
22166
  * line contains the selected cell
22165
22167
  * @param after - Insert a new line after line contains the selected cell
22168
+ * @param create - Instance of Create class
22166
22169
  */
22167
22170
  static appendRow(table, line, after, create) {
22168
22171
  let row;
@@ -24264,7 +24267,7 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .JO.set('palette', (_palet
24264
24267
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
24265
24268
  * @example
24266
24269
  * ```javascript
24267
- * $tabs = TabsWidget(editor, {
24270
+ * const tabs = TabsWidget(editor, {
24268
24271
  * 'Text' : ColorPickerWidget(editor, function (color) {
24269
24272
  * box.style.color = color;
24270
24273
  * }, box.style.color),
@@ -24364,27 +24367,10 @@ const ColorPickerWidget = (editor, callback, coldColor) => {
24364
24367
  * Generate 3 tabs
24365
24368
  * upload - Use Drag and Drop
24366
24369
  * url - By specifying the image url
24367
- * filebrowser - After opening the file browser . In the absence of one of the parameters will be less tabs
24370
+ * filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
24368
24371
  *
24369
24372
  * @param callbacks - Object with keys `url`, `upload` and `filebrowser`, values which are callback
24370
24373
  * functions with different parameters
24371
- *
24372
- * @example
24373
- * ```javascript
24374
- * let widget = new Jodit.modules.Widget(editor);
24375
- *
24376
- * return widget.c('ImageSelector', {
24377
- * url: function (url, alt) {
24378
- * editor.selections.insertImage(url);
24379
- * },
24380
- * upload: function (images) {
24381
- * editor.selections.insertImage(images[0]);
24382
- * },
24383
- * filebrowser: function (images) {
24384
- * editor.selections.insertImage(images[0]);
24385
- * }
24386
- * }, image);
24387
- * ```
24388
24374
  */
24389
24375
  const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24390
24376
  let currentImage;
@@ -24453,13 +24439,13 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24453
24439
  !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(elm) &&
24454
24440
  (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm).length)) {
24455
24441
  currentImage = elm.tagName === 'IMG' ? elm : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm)[0];
24456
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
24457
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
24442
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
24443
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
24458
24444
  button.state.text = 'Update';
24459
24445
  }
24460
24446
  if (elm && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'a')) {
24461
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
24462
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
24447
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
24448
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
24463
24449
  button.state.text = 'Update';
24464
24450
  }
24465
24451
  form.onSubmit(data => {
@@ -24475,6 +24461,16 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24475
24461
  }
24476
24462
  return (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .I)(editor, tabs);
24477
24463
  };
24464
+ function val(elm, selector, value) {
24465
+ const child = elm.querySelector(selector);
24466
+ if (!child) {
24467
+ return '';
24468
+ }
24469
+ if (value) {
24470
+ child.value = value;
24471
+ }
24472
+ return child.value;
24473
+ }
24478
24474
 
24479
24475
 
24480
24476
  /***/ }),
@@ -24544,12 +24540,23 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24544
24540
  *
24545
24541
  * @example
24546
24542
  * ```javascript
24547
- * let tabs = Jodit.modules.TabsWidget(editor, [
24548
- * {name: 'Images', content: '<div>Images</div>'},
24549
- * {name: 'Title 2': Jodit.modules.Helpers.dom('<div>Some content</div>')},
24550
- * {name: 'Color Picker': ColorPickerWidget(editor, function (color) {
24551
- * box.style.color = color;
24552
- * }, box.style.color)},
24543
+ * const editor = Jodit.make('#editor');
24544
+ * const tabs = Jodit.modules.TabsWidget(editor, [
24545
+ * { name: 'Images', content: '<div>Images</div>' },
24546
+ * {
24547
+ * name: 'Title 2',
24548
+ * content: editor.c.fromHTML('<div>Some content</div>')
24549
+ * },
24550
+ * {
24551
+ * name: 'Color Picker',
24552
+ * content: ColorPickerWidget(
24553
+ * editor,
24554
+ * function (color) {
24555
+ * box.style.color = color;
24556
+ * },
24557
+ * box.style.color
24558
+ * )
24559
+ * }
24553
24560
  * ]);
24554
24561
  * ```
24555
24562
  */