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/es2018/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
  var _a, _b, _c, _d, _e;
@@ -1077,14 +1079,17 @@ class Async {
1077
1079
  return 0;
1078
1080
  }
1079
1081
  let options = {};
1080
- if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_2__/* .isNumber */ .h)(timeout)) {
1082
+ if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__/* .isVoid */ .n)(timeout)) {
1083
+ timeout = 0;
1084
+ }
1085
+ if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__/* .isNumber */ .h)(timeout)) {
1081
1086
  options = timeout;
1082
1087
  timeout = options.timeout || 0;
1083
1088
  }
1084
1089
  if (options.label) {
1085
1090
  this.clearLabel(options.label);
1086
1091
  }
1087
- const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .setTimeout */ .i)(callback, timeout, ...args), key = options.label || timer;
1092
+ const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .setTimeout */ .i)(callback, timeout, ...args), key = options.label || timer;
1088
1093
  this.timers.set(key, timer);
1089
1094
  this.__callbacks.set(key, callback);
1090
1095
  return timer;
@@ -1100,16 +1105,16 @@ class Async {
1100
1105
  }
1101
1106
  clearLabel(label) {
1102
1107
  if (label && this.timers.has(label)) {
1103
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(this.timers.get(label));
1108
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(this.timers.get(label));
1104
1109
  this.timers.delete(label);
1105
1110
  this.__callbacks.delete(label);
1106
1111
  }
1107
1112
  }
1108
1113
  clearTimeout(timerOrLabel) {
1109
- if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .H)(timerOrLabel)) {
1114
+ if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .H)(timerOrLabel)) {
1110
1115
  return this.clearLabel(timerOrLabel);
1111
1116
  }
1112
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(timerOrLabel);
1117
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(timerOrLabel);
1113
1118
  this.timers.delete(timerOrLabel);
1114
1119
  this.__callbacks.delete(timerOrLabel);
1115
1120
  }
@@ -1138,7 +1143,7 @@ class Async {
1138
1143
  promises.forEach(res => res());
1139
1144
  promises.length = 0;
1140
1145
  };
1141
- (0,jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_5__/* .isPromise */ .t)(res) ? res.finally(runPromises) : runPromises();
1146
+ (0,jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_6__/* .isPromise */ .t)(res) ? res.finally(runPromises) : runPromises();
1142
1147
  }
1143
1148
  }
1144
1149
  };
@@ -1151,12 +1156,12 @@ class Async {
1151
1156
  if (!timer && firstCallImmediately) {
1152
1157
  callFn(...args);
1153
1158
  }
1154
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(timer);
1155
- timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_6__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1159
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(timer);
1160
+ timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1156
1161
  this.timers.set(fn, timer);
1157
1162
  }
1158
1163
  };
1159
- return (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_7__/* .isPlainObject */ .P)(timeout) && timeout.promisify
1164
+ return (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__/* .isPlainObject */ .P)(timeout) && timeout.promisify
1160
1165
  ? (...args) => {
1161
1166
  const promise = this.promise(res => {
1162
1167
  promises.push(res);
@@ -1217,7 +1222,7 @@ class Async {
1217
1222
  if (needInvoke) {
1218
1223
  fn(...lastArgs);
1219
1224
  needInvoke = false;
1220
- timer = this.setTimeout(callee, (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_6__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1225
+ timer = this.setTimeout(callee, (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .m)(timeout) ? timeout() : timeout);
1221
1226
  this.timers.set(callee, timer);
1222
1227
  }
1223
1228
  else {
@@ -1300,7 +1305,7 @@ class Async {
1300
1305
  clear() {
1301
1306
  this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
1302
1307
  this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
1303
- this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_3__/* .clearTimeout */ .g)(this.timers.get(key)));
1308
+ this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .g)(this.timers.get(key)));
1304
1309
  this.timers.clear();
1305
1310
  this.promisesRejections.forEach(reject => reject());
1306
1311
  this.promisesRejections.clear();
@@ -1715,7 +1720,7 @@ __webpack_require__.r(__webpack_exports__);
1715
1720
  * Released under MIT see LICENSE.txt in the project root for license information.
1716
1721
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1717
1722
  */
1718
- const APP_VERSION = "4.0.0-beta.95";
1723
+ const APP_VERSION = "4.0.0-beta.99";
1719
1724
  // prettier-ignore
1720
1725
  const ES = "es2018";
1721
1726
  const IS_ES_MODERN = true;
@@ -7058,7 +7063,7 @@ function ucfirst(value) {
7058
7063
  if (!value.length) {
7059
7064
  return '';
7060
7065
  }
7061
- return value[0].toUpperCase() + value.substr(1);
7066
+ return value[0].toUpperCase() + value.substring(1);
7062
7067
  }
7063
7068
 
7064
7069
 
@@ -8214,8 +8219,7 @@ __webpack_require__.r(__webpack_exports__);
8214
8219
  /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_21__.m; },
8215
8220
  /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.W2; },
8216
8221
  /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_22__.n; },
8217
- /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; },
8218
- /* harmony export */ val: function() { return /* reexport safe */ _val__WEBPACK_IMPORTED_MODULE_27__.P; }
8222
+ /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
8219
8223
  /* harmony export */ });
8220
8224
  /* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13931);
8221
8225
  /* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23144);
@@ -8248,7 +8252,6 @@ __webpack_require__.r(__webpack_exports__);
8248
8252
  /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(49155);
8249
8253
  /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(56114);
8250
8254
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(87398);
8251
- /* harmony import */ var _val__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(96416);
8252
8255
  /*!
8253
8256
  * Jodit Editor (https://xdsoft.net/jodit/)
8254
8257
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8284,7 +8287,6 @@ __webpack_require__.r(__webpack_exports__);
8284
8287
 
8285
8288
 
8286
8289
 
8287
-
8288
8290
 
8289
8291
 
8290
8292
  /***/ }),
@@ -9002,35 +9004,6 @@ const getDataTransfer = (event) => {
9002
9004
  };
9003
9005
 
9004
9006
 
9005
- /***/ }),
9006
-
9007
- /***/ 96416:
9008
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9009
-
9010
- "use strict";
9011
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9012
- /* harmony export */ P: function() { return /* binding */ val; }
9013
- /* harmony export */ });
9014
- /*!
9015
- * Jodit Editor (https://xdsoft.net/jodit/)
9016
- * Released under MIT see LICENSE.txt in the project root for license information.
9017
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
9018
- */
9019
- /**
9020
- * @module helpers/utils
9021
- */
9022
- const val = (elm, selector, value) => {
9023
- const child = elm.querySelector(selector);
9024
- if (!child) {
9025
- return '';
9026
- }
9027
- if (value) {
9028
- child.value = value;
9029
- }
9030
- return child.value;
9031
- };
9032
-
9033
-
9034
9007
  /***/ }),
9035
9008
 
9036
9009
  /***/ 97800:
@@ -13763,7 +13736,7 @@ UIForm = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
13763
13736
  var UITextArea_1;
13764
13737
 
13765
13738
  /**
13766
- * @module ui/form/inputs
13739
+ * @module ui/form
13767
13740
  */
13768
13741
 
13769
13742
 
@@ -13817,7 +13790,7 @@ UITextArea = UITextArea_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate
13817
13790
  var UICheckbox_1;
13818
13791
 
13819
13792
  /**
13820
- * @module ui/form/inputs
13793
+ * @module ui/form
13821
13794
  */
13822
13795
 
13823
13796
 
@@ -13906,7 +13879,7 @@ UICheckbox = UICheckbox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate
13906
13879
  */
13907
13880
 
13908
13881
  /**
13909
- * @module ui/form/inputs
13882
+ * @module ui/form
13910
13883
  */
13911
13884
 
13912
13885
 
@@ -13983,7 +13956,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
13983
13956
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
13984
13957
  */
13985
13958
  /**
13986
- * @module ui/form/inputs
13959
+ * @module ui/form
13987
13960
  */
13988
13961
 
13989
13962
 
@@ -14017,7 +13990,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
14017
13990
  var UIInput_1;
14018
13991
 
14019
13992
  /**
14020
- * @module ui/form/inputs
13993
+ * @module ui/form
14021
13994
  */
14022
13995
 
14023
13996
 
@@ -14258,7 +14231,7 @@ UIInput = UIInput_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn
14258
14231
  var UISelect_1;
14259
14232
 
14260
14233
  /**
14261
- * @module ui/form/inputs
14234
+ * @module ui/form
14262
14235
  */
14263
14236
 
14264
14237
 
@@ -21885,15 +21858,43 @@ let UIMessages = class UIMessages extends jodit_core_ui_group_group__WEBPACK_IMP
21885
21858
  this.options = options;
21886
21859
  this.__messages = new Set();
21887
21860
  }
21861
+ /**
21862
+ * Show popup info message in the lower right corner of the container
21863
+ * ```js
21864
+ * const jodit = Jodit.make('#editor');
21865
+ * jodit.info('Hello world', 3000);
21866
+ * ```
21867
+ */
21888
21868
  info(text, timeout) {
21889
21869
  this.__message(text, 'info', timeout);
21890
21870
  }
21871
+ /**
21872
+ * Show popup success message in the lower right corner of the container
21873
+ * ```js
21874
+ * const jodit = Jodit.make('#editor');
21875
+ * jodit.success('Hello world', 3000);
21876
+ * ```
21877
+ */
21891
21878
  success(text, timeout) {
21892
21879
  this.__message(text, 'success', timeout);
21893
21880
  }
21881
+ /**
21882
+ * Show popup error message in the lower right corner of the container
21883
+ * ```js
21884
+ * const jodit = Jodit.make('#editor');
21885
+ * jodit.error('Hello world', 3000);
21886
+ * ```
21887
+ */
21894
21888
  error(text, timeout) {
21895
21889
  this.__message(text, 'error', timeout);
21896
21890
  }
21891
+ /**
21892
+ * Show popup message in the lower right corner of the container
21893
+ * ```js
21894
+ * const jodit = Jodit.make('#editor');
21895
+ * jodit.message('Hello world', 'info', 3000);
21896
+ * ```
21897
+ */
21897
21898
  message(text, variant, timeout) {
21898
21899
  this.__message(text, variant, timeout);
21899
21900
  }
@@ -22223,9 +22224,11 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_3__/* .ViewCom
22223
22224
  /**
22224
22225
  * Inserts a new line after row what contains the selected cell
22225
22226
  *
22227
+ * @param table - Working table
22226
22228
  * @param line - Insert a new line after/before this
22227
22229
  * line contains the selected cell
22228
22230
  * @param after - Insert a new line after line contains the selected cell
22231
+ * @param create - Instance of Create class
22229
22232
  */
22230
22233
  static appendRow(table, line, after, create) {
22231
22234
  var _a;
@@ -24342,7 +24345,7 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .JO.set('palette', (_palet
24342
24345
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
24343
24346
  * @example
24344
24347
  * ```javascript
24345
- * $tabs = TabsWidget(editor, {
24348
+ * const tabs = TabsWidget(editor, {
24346
24349
  * 'Text' : ColorPickerWidget(editor, function (color) {
24347
24350
  * box.style.color = color;
24348
24351
  * }, box.style.color),
@@ -24442,27 +24445,10 @@ const ColorPickerWidget = (editor, callback, coldColor) => {
24442
24445
  * Generate 3 tabs
24443
24446
  * upload - Use Drag and Drop
24444
24447
  * url - By specifying the image url
24445
- * filebrowser - After opening the file browser . In the absence of one of the parameters will be less tabs
24448
+ * filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
24446
24449
  *
24447
24450
  * @param callbacks - Object with keys `url`, `upload` and `filebrowser`, values which are callback
24448
24451
  * functions with different parameters
24449
- *
24450
- * @example
24451
- * ```javascript
24452
- * let widget = new Jodit.modules.Widget(editor);
24453
- *
24454
- * return widget.c('ImageSelector', {
24455
- * url: function (url, alt) {
24456
- * editor.selections.insertImage(url);
24457
- * },
24458
- * upload: function (images) {
24459
- * editor.selections.insertImage(images[0]);
24460
- * },
24461
- * filebrowser: function (images) {
24462
- * editor.selections.insertImage(images[0]);
24463
- * }
24464
- * }, image);
24465
- * ```
24466
24452
  */
24467
24453
  const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24468
24454
  let currentImage;
@@ -24531,13 +24517,13 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24531
24517
  !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(elm) &&
24532
24518
  (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm).length)) {
24533
24519
  currentImage = elm.tagName === 'IMG' ? elm : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm)[0];
24534
- (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'));
24535
- (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'));
24520
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
24521
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
24536
24522
  button.state.text = 'Update';
24537
24523
  }
24538
24524
  if (elm && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'a')) {
24539
- (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'));
24540
- (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'));
24525
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
24526
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
24541
24527
  button.state.text = 'Update';
24542
24528
  }
24543
24529
  form.onSubmit(data => {
@@ -24553,6 +24539,16 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24553
24539
  }
24554
24540
  return (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .I)(editor, tabs);
24555
24541
  };
24542
+ function val(elm, selector, value) {
24543
+ const child = elm.querySelector(selector);
24544
+ if (!child) {
24545
+ return '';
24546
+ }
24547
+ if (value) {
24548
+ child.value = value;
24549
+ }
24550
+ return child.value;
24551
+ }
24556
24552
 
24557
24553
 
24558
24554
  /***/ }),
@@ -24622,12 +24618,23 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24622
24618
  *
24623
24619
  * @example
24624
24620
  * ```javascript
24625
- * let tabs = Jodit.modules.TabsWidget(editor, [
24626
- * {name: 'Images', content: '<div>Images</div>'},
24627
- * {name: 'Title 2': Jodit.modules.Helpers.dom('<div>Some content</div>')},
24628
- * {name: 'Color Picker': ColorPickerWidget(editor, function (color) {
24629
- * box.style.color = color;
24630
- * }, box.style.color)},
24621
+ * const editor = Jodit.make('#editor');
24622
+ * const tabs = Jodit.modules.TabsWidget(editor, [
24623
+ * { name: 'Images', content: '<div>Images</div>' },
24624
+ * {
24625
+ * name: 'Title 2',
24626
+ * content: editor.c.fromHTML('<div>Some content</div>')
24627
+ * },
24628
+ * {
24629
+ * name: 'Color Picker',
24630
+ * content: ColorPickerWidget(
24631
+ * editor,
24632
+ * function (color) {
24633
+ * box.style.color = color;
24634
+ * },
24635
+ * box.style.color
24636
+ * )
24637
+ * }
24631
24638
  * ]);
24632
24639
  * ```
24633
24640
  */