jodit 4.0.0-beta.95 → 4.0.0-beta.98

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 (92) hide show
  1. package/CHANGELOG.md +4 -0
  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 +73 -71
  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 +73 -71
  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 +73 -71
  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 +73 -71
  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 +73 -71
  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/constants.js +1 -1
  50. package/esm/core/helpers/string/ucfirst.js +1 -1
  51. package/esm/core/helpers/utils/index.d.ts +0 -1
  52. package/esm/core/helpers/utils/index.js +0 -1
  53. package/esm/core/selection/interface.d.ts +1 -1
  54. package/esm/core/ui/form/inputs/area/area.d.ts +1 -1
  55. package/esm/core/ui/form/inputs/area/area.js +1 -1
  56. package/esm/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
  57. package/esm/core/ui/form/inputs/checkbox/checkbox.js +1 -1
  58. package/esm/core/ui/form/inputs/file/file.d.ts +1 -1
  59. package/esm/core/ui/form/inputs/file/file.js +1 -1
  60. package/esm/core/ui/form/inputs/index.d.ts +1 -1
  61. package/esm/core/ui/form/inputs/index.js +1 -1
  62. package/esm/core/ui/form/inputs/input/input.d.ts +1 -1
  63. package/esm/core/ui/form/inputs/input/input.js +1 -1
  64. package/esm/core/ui/form/inputs/select/select.d.ts +1 -1
  65. package/esm/core/ui/form/inputs/select/select.js +1 -1
  66. package/esm/modules/messages/messages.d.ts +28 -0
  67. package/esm/modules/messages/messages.js +28 -0
  68. package/esm/modules/table/table.d.ts +4 -2
  69. package/esm/modules/table/table.js +2 -0
  70. package/esm/modules/widget/color-picker/color-picker.d.ts +1 -1
  71. package/esm/modules/widget/color-picker/color-picker.js +1 -1
  72. package/esm/modules/widget/file-selector/file-selector.d.ts +1 -18
  73. package/esm/modules/widget/file-selector/file-selector.js +12 -19
  74. package/esm/modules/widget/tabs/tabs.d.ts +17 -6
  75. package/esm/modules/widget/tabs/tabs.js +17 -6
  76. package/package.json +1 -1
  77. package/types/core/helpers/utils/index.d.ts +0 -1
  78. package/types/core/selection/interface.d.ts +1 -1
  79. package/types/core/ui/form/inputs/area/area.d.ts +1 -1
  80. package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
  81. package/types/core/ui/form/inputs/file/file.d.ts +1 -1
  82. package/types/core/ui/form/inputs/index.d.ts +1 -1
  83. package/types/core/ui/form/inputs/input/input.d.ts +1 -1
  84. package/types/core/ui/form/inputs/select/select.d.ts +1 -1
  85. package/types/modules/messages/messages.d.ts +28 -0
  86. package/types/modules/table/table.d.ts +4 -2
  87. package/types/modules/widget/color-picker/color-picker.d.ts +1 -1
  88. package/types/modules/widget/file-selector/file-selector.d.ts +1 -18
  89. package/types/modules/widget/tabs/tabs.d.ts +17 -6
  90. package/esm/core/helpers/utils/val.d.ts +0 -9
  91. package/esm/core/helpers/utils/val.js +0 -18
  92. package/types/core/helpers/utils/val.d.ts +0 -9
package/es5/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.98
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -3108,7 +3108,7 @@ __webpack_require__.r(__webpack_exports__);
3108
3108
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
3109
3109
  */
3110
3110
 
3111
- var APP_VERSION = "4.0.0-beta.95";
3111
+ var APP_VERSION = "4.0.0-beta.98";
3112
3112
  // prettier-ignore
3113
3113
  var ES = "es5";
3114
3114
  var IS_ES_MODERN = false;
@@ -8675,7 +8675,7 @@ function ucfirst(value) {
8675
8675
  if (!value.length) {
8676
8676
  return '';
8677
8677
  }
8678
- return value[0].toUpperCase() + value.substr(1);
8678
+ return value[0].toUpperCase() + value.substring(1);
8679
8679
  }
8680
8680
 
8681
8681
 
@@ -9878,8 +9878,7 @@ __webpack_require__.r(__webpack_exports__);
9878
9878
  /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_21__.m; },
9879
9879
  /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.W2; },
9880
9880
  /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_22__.n; },
9881
- /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; },
9882
- /* harmony export */ val: function() { return /* reexport safe */ _val__WEBPACK_IMPORTED_MODULE_27__.P; }
9881
+ /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
9883
9882
  /* harmony export */ });
9884
9883
  /* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13931);
9885
9884
  /* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23144);
@@ -9912,7 +9911,6 @@ __webpack_require__.r(__webpack_exports__);
9912
9911
  /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(49155);
9913
9912
  /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(56114);
9914
9913
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(87398);
9915
- /* harmony import */ var _val__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(96416);
9916
9914
  /*!
9917
9915
  * Jodit Editor (https://xdsoft.net/jodit/)
9918
9916
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9948,7 +9946,6 @@ __webpack_require__.r(__webpack_exports__);
9948
9946
 
9949
9947
 
9950
9948
 
9951
-
9952
9949
 
9953
9950
 
9954
9951
  /***/ }),
@@ -10688,35 +10685,6 @@ var getDataTransfer = function (event) {
10688
10685
  };
10689
10686
 
10690
10687
 
10691
- /***/ }),
10692
-
10693
- /***/ 96416:
10694
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
10695
-
10696
- "use strict";
10697
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10698
- /* harmony export */ P: function() { return /* binding */ val; }
10699
- /* harmony export */ });
10700
- /*!
10701
- * Jodit Editor (https://xdsoft.net/jodit/)
10702
- * Released under MIT see LICENSE.txt in the project root for license information.
10703
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
10704
- */
10705
- /**
10706
- * @module helpers/utils
10707
- */
10708
- var val = function (elm, selector, value) {
10709
- var child = elm.querySelector(selector);
10710
- if (!child) {
10711
- return '';
10712
- }
10713
- if (value) {
10714
- child.value = value;
10715
- }
10716
- return child.value;
10717
- };
10718
-
10719
-
10720
10688
  /***/ }),
10721
10689
 
10722
10690
  /***/ 97800:
@@ -15717,7 +15685,7 @@ var UIForm = /** @class */ (function (_super) {
15717
15685
  */
15718
15686
 
15719
15687
  /**
15720
- * @module ui/form/inputs
15688
+ * @module ui/form
15721
15689
  */
15722
15690
 
15723
15691
 
@@ -15771,7 +15739,7 @@ var UITextArea = /** @class */ (function (_super) {
15771
15739
  */
15772
15740
 
15773
15741
  /**
15774
- * @module ui/form/inputs
15742
+ * @module ui/form
15775
15743
  */
15776
15744
 
15777
15745
 
@@ -15861,7 +15829,7 @@ var UICheckbox = /** @class */ (function (_super) {
15861
15829
  */
15862
15830
 
15863
15831
  /**
15864
- * @module ui/form/inputs
15832
+ * @module ui/form
15865
15833
  */
15866
15834
 
15867
15835
 
@@ -15928,7 +15896,7 @@ var UIFileInput = /** @class */ (function (_super) {
15928
15896
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
15929
15897
  */
15930
15898
  /**
15931
- * @module ui/form/inputs
15899
+ * @module ui/form
15932
15900
  */
15933
15901
 
15934
15902
 
@@ -15961,7 +15929,7 @@ var UIFileInput = /** @class */ (function (_super) {
15961
15929
  */
15962
15930
 
15963
15931
  /**
15964
- * @module ui/form/inputs
15932
+ * @module ui/form
15965
15933
  */
15966
15934
 
15967
15935
 
@@ -16220,7 +16188,7 @@ var UIInput = /** @class */ (function (_super) {
16220
16188
  */
16221
16189
 
16222
16190
  /**
16223
- * @module ui/form/inputs
16191
+ * @module ui/form
16224
16192
  */
16225
16193
 
16226
16194
 
@@ -24213,15 +24181,43 @@ var UIMessages = /** @class */ (function (_super) {
24213
24181
  UIMessages.prototype.className = function () {
24214
24182
  return 'UIMessages';
24215
24183
  };
24184
+ /**
24185
+ * Show popup info message in the lower right corner of the container
24186
+ * ```js
24187
+ * const jodit = Jodit.make('#editor');
24188
+ * jodit.info('Hello world', 3000);
24189
+ * ```
24190
+ */
24216
24191
  UIMessages.prototype.info = function (text, timeout) {
24217
24192
  this.__message(text, 'info', timeout);
24218
24193
  };
24194
+ /**
24195
+ * Show popup success message in the lower right corner of the container
24196
+ * ```js
24197
+ * const jodit = Jodit.make('#editor');
24198
+ * jodit.success('Hello world', 3000);
24199
+ * ```
24200
+ */
24219
24201
  UIMessages.prototype.success = function (text, timeout) {
24220
24202
  this.__message(text, 'success', timeout);
24221
24203
  };
24204
+ /**
24205
+ * Show popup error message in the lower right corner of the container
24206
+ * ```js
24207
+ * const jodit = Jodit.make('#editor');
24208
+ * jodit.error('Hello world', 3000);
24209
+ * ```
24210
+ */
24222
24211
  UIMessages.prototype.error = function (text, timeout) {
24223
24212
  this.__message(text, 'error', timeout);
24224
24213
  };
24214
+ /**
24215
+ * Show popup message in the lower right corner of the container
24216
+ * ```js
24217
+ * const jodit = Jodit.make('#editor');
24218
+ * jodit.message('Hello world', 'info', 3000);
24219
+ * ```
24220
+ */
24225
24221
  UIMessages.prototype.message = function (text, variant, timeout) {
24226
24222
  this.__message(text, variant, timeout);
24227
24223
  };
@@ -24567,9 +24563,11 @@ var Table = /** @class */ (function (_super) {
24567
24563
  /**
24568
24564
  * Inserts a new line after row what contains the selected cell
24569
24565
  *
24566
+ * @param table - Working table
24570
24567
  * @param line - Insert a new line after/before this
24571
24568
  * line contains the selected cell
24572
24569
  * @param after - Insert a new line after line contains the selected cell
24570
+ * @param create - Instance of Create class
24573
24571
  */
24574
24572
  Table.appendRow = function (table, line, after, create) {
24575
24573
  var _a;
@@ -26738,7 +26736,7 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .JO.set('palette', (_palet
26738
26736
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
26739
26737
  * @example
26740
26738
  * ```javascript
26741
- * $tabs = TabsWidget(editor, {
26739
+ * const tabs = TabsWidget(editor, {
26742
26740
  * 'Text' : ColorPickerWidget(editor, function (color) {
26743
26741
  * box.style.color = color;
26744
26742
  * }, box.style.color),
@@ -26838,27 +26836,10 @@ var ColorPickerWidget = function (editor, callback, coldColor) {
26838
26836
  * Generate 3 tabs
26839
26837
  * upload - Use Drag and Drop
26840
26838
  * url - By specifying the image url
26841
- * filebrowser - After opening the file browser . In the absence of one of the parameters will be less tabs
26839
+ * filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
26842
26840
  *
26843
26841
  * @param callbacks - Object with keys `url`, `upload` and `filebrowser`, values which are callback
26844
26842
  * functions with different parameters
26845
- *
26846
- * @example
26847
- * ```javascript
26848
- * let widget = new Jodit.modules.Widget(editor);
26849
- *
26850
- * return widget.c('ImageSelector', {
26851
- * url: function (url, alt) {
26852
- * editor.selections.insertImage(url);
26853
- * },
26854
- * upload: function (images) {
26855
- * editor.selections.insertImage(images[0]);
26856
- * },
26857
- * filebrowser: function (images) {
26858
- * editor.selections.insertImage(images[0]);
26859
- * }
26860
- * }, image);
26861
- * ```
26862
26843
  */
26863
26844
  var FileSelectorWidget = function (editor, callbacks, elm, close, isImage) {
26864
26845
  if (isImage === void 0) { isImage = true; }
@@ -26928,13 +26909,13 @@ var FileSelectorWidget = function (editor, callbacks, elm, close, isImage) {
26928
26909
  !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(elm) &&
26929
26910
  (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm).length)) {
26930
26911
  currentImage = elm.tagName === 'IMG' ? elm : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm)[0];
26931
- (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'));
26932
- (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'));
26912
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
26913
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
26933
26914
  button.state.text = 'Update';
26934
26915
  }
26935
26916
  if (elm && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'a')) {
26936
- (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'));
26937
- (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'));
26917
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
26918
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
26938
26919
  button.state.text = 'Update';
26939
26920
  }
26940
26921
  form.onSubmit(function (data) {
@@ -26950,6 +26931,16 @@ var FileSelectorWidget = function (editor, callbacks, elm, close, isImage) {
26950
26931
  }
26951
26932
  return (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .I)(editor, tabs);
26952
26933
  };
26934
+ function val(elm, selector, value) {
26935
+ var child = elm.querySelector(selector);
26936
+ if (!child) {
26937
+ return '';
26938
+ }
26939
+ if (value) {
26940
+ child.value = value;
26941
+ }
26942
+ return child.value;
26943
+ }
26953
26944
 
26954
26945
 
26955
26946
  /***/ }),
@@ -27019,12 +27010,23 @@ var FileSelectorWidget = function (editor, callbacks, elm, close, isImage) {
27019
27010
  *
27020
27011
  * @example
27021
27012
  * ```javascript
27022
- * let tabs = Jodit.modules.TabsWidget(editor, [
27023
- * {name: 'Images', content: '<div>Images</div>'},
27024
- * {name: 'Title 2': Jodit.modules.Helpers.dom('<div>Some content</div>')},
27025
- * {name: 'Color Picker': ColorPickerWidget(editor, function (color) {
27026
- * box.style.color = color;
27027
- * }, box.style.color)},
27013
+ * const editor = Jodit.make('#editor');
27014
+ * const tabs = Jodit.modules.TabsWidget(editor, [
27015
+ * { name: 'Images', content: '<div>Images</div>' },
27016
+ * {
27017
+ * name: 'Title 2',
27018
+ * content: editor.c.fromHTML('<div>Some content</div>')
27019
+ * },
27020
+ * {
27021
+ * name: 'Color Picker',
27022
+ * content: ColorPickerWidget(
27023
+ * editor,
27024
+ * function (color) {
27025
+ * box.style.color = color;
27026
+ * },
27027
+ * box.style.color
27028
+ * )
27029
+ * }
27028
27030
  * ]);
27029
27031
  * ```
27030
27032
  */
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
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.98
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.0.0-beta.95
11
+ * Version: v4.0.0-beta.98
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */