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
@@ -25,9 +25,37 @@ export declare class UIMessages extends UIGroup implements IMessages {
25
25
  defaultTimeout: number;
26
26
  defaultOffset: number;
27
27
  });
28
+ /**
29
+ * Show popup info message in the lower right corner of the container
30
+ * ```js
31
+ * const jodit = Jodit.make('#editor');
32
+ * jodit.info('Hello world', 3000);
33
+ * ```
34
+ */
28
35
  info(text: string, timeout?: number): void;
36
+ /**
37
+ * Show popup success message in the lower right corner of the container
38
+ * ```js
39
+ * const jodit = Jodit.make('#editor');
40
+ * jodit.success('Hello world', 3000);
41
+ * ```
42
+ */
29
43
  success(text: string, timeout?: number): void;
44
+ /**
45
+ * Show popup error message in the lower right corner of the container
46
+ * ```js
47
+ * const jodit = Jodit.make('#editor');
48
+ * jodit.error('Hello world', 3000);
49
+ * ```
50
+ */
30
51
  error(text: string, timeout?: number): void;
52
+ /**
53
+ * Show popup message in the lower right corner of the container
54
+ * ```js
55
+ * const jodit = Jodit.make('#editor');
56
+ * jodit.message('Hello world', 'info', 3000);
57
+ * ```
58
+ */
31
59
  message(text: string, variant?: MessageVariant, timeout?: number): void;
32
60
  private __message;
33
61
  private __getRemoveCallback;
@@ -8,7 +8,7 @@
8
8
  * @packageDocumentation
9
9
  * @module modules/table
10
10
  */
11
- import type { ICreate, IJodit } from "jodit/esm/types";
11
+ import type { ICreate, IJodit, Prettify } from "jodit/esm/types";
12
12
  import { ViewComponent } from "jodit/esm/core/component";
13
13
  export declare class Table extends ViewComponent<IJodit> {
14
14
  /** @override */
@@ -45,11 +45,13 @@ export declare class Table extends ViewComponent<IJodit> {
45
45
  /**
46
46
  * Inserts a new line after row what contains the selected cell
47
47
  *
48
+ * @param table - Working table
48
49
  * @param line - Insert a new line after/before this
49
50
  * line contains the selected cell
50
51
  * @param after - Insert a new line after line contains the selected cell
52
+ * @param create - Instance of Create class
51
53
  */
52
- static appendRow(table: HTMLTableElement, line: false | HTMLTableRowElement, after: boolean, create: ICreate): void;
54
+ static appendRow(table: HTMLTableElement, line: false | HTMLTableRowElement, after: boolean, create: Prettify<Pick<ICreate, 'element'>>): void;
53
55
  /**
54
56
  * Remove row
55
57
  */
@@ -17,7 +17,7 @@ import type { IJodit } from "jodit/esm/types";
17
17
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
18
18
  * @example
19
19
  * ```javascript
20
- * $tabs = TabsWidget(editor, {
20
+ * const tabs = TabsWidget(editor, {
21
21
  * 'Text' : ColorPickerWidget(editor, function (color) {
22
22
  * box.style.color = color;
23
23
  * }, box.style.color),
@@ -28,27 +28,10 @@ interface ImageSelectorCallbacks {
28
28
  * Generate 3 tabs
29
29
  * upload - Use Drag and Drop
30
30
  * url - By specifying the image url
31
- * filebrowser - After opening the file browser . In the absence of one of the parameters will be less tabs
31
+ * filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
32
32
  *
33
33
  * @param callbacks - Object with keys `url`, `upload` and `filebrowser`, values which are callback
34
34
  * functions with different parameters
35
- *
36
- * @example
37
- * ```javascript
38
- * let widget = new Jodit.modules.Widget(editor);
39
- *
40
- * return widget.c('ImageSelector', {
41
- * url: function (url, alt) {
42
- * editor.selections.insertImage(url);
43
- * },
44
- * upload: function (images) {
45
- * editor.selections.insertImage(images[0]);
46
- * },
47
- * filebrowser: function (images) {
48
- * editor.selections.insertImage(images[0]);
49
- * }
50
- * }, image);
51
- * ```
52
35
  */
53
36
  export declare const FileSelectorWidget: (editor: IJodit, callbacks: ImageSelectorCallbacks, elm: HTMLElement | null, close: () => void, isImage?: boolean) => HTMLDivElement;
54
37
  export {};
@@ -24,12 +24,23 @@ export interface TabOption {
24
24
  *
25
25
  * @example
26
26
  * ```javascript
27
- * let tabs = Jodit.modules.TabsWidget(editor, [
28
- * {name: 'Images', content: '<div>Images</div>'},
29
- * {name: 'Title 2': Jodit.modules.Helpers.dom('<div>Some content</div>')},
30
- * {name: 'Color Picker': ColorPickerWidget(editor, function (color) {
31
- * box.style.color = color;
32
- * }, box.style.color)},
27
+ * const editor = Jodit.make('#editor');
28
+ * const tabs = Jodit.modules.TabsWidget(editor, [
29
+ * { name: 'Images', content: '<div>Images</div>' },
30
+ * {
31
+ * name: 'Title 2',
32
+ * content: editor.c.fromHTML('<div>Some content</div>')
33
+ * },
34
+ * {
35
+ * name: 'Color Picker',
36
+ * content: ColorPickerWidget(
37
+ * editor,
38
+ * function (color) {
39
+ * box.style.color = color;
40
+ * },
41
+ * box.style.color
42
+ * )
43
+ * }
33
44
  * ]);
34
45
  * ```
35
46
  */
@@ -1,9 +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-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
- */
6
- /**
7
- * @module helpers/utils
8
- */
9
- export declare const val: (elm: HTMLInputElement | HTMLElement, selector: string, value?: string | null) => string;
@@ -1,18 +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-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
- */
6
- /**
7
- * @module helpers/utils
8
- */
9
- export const val = (elm, selector, value) => {
10
- const child = elm.querySelector(selector);
11
- if (!child) {
12
- return '';
13
- }
14
- if (value) {
15
- child.value = value;
16
- }
17
- return child.value;
18
- };
@@ -1,9 +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-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
- */
6
- /**
7
- * @module helpers/utils
8
- */
9
- export declare const val: (elm: HTMLInputElement | HTMLElement, selector: string, value?: string | null) => string;