jodit 3.8.4 → 3.8.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 (245) hide show
  1. package/.idea/workspace.xml +165 -1308
  2. package/{.stylelintrc.json → .stylelintrc} +2 -1
  3. package/CHANGELOG.MD +54 -14
  4. package/build/jodit.css +280 -258
  5. package/build/jodit.es2018.css +231 -213
  6. package/build/jodit.es2018.en.css +231 -213
  7. package/build/jodit.es2018.en.js +9453 -9409
  8. package/build/jodit.es2018.en.min.css +1 -1
  9. package/build/jodit.es2018.en.min.js +1 -10
  10. package/build/jodit.es2018.js +13482 -13438
  11. package/build/jodit.es2018.min.css +1 -1
  12. package/build/jodit.es2018.min.js +1 -10
  13. package/build/jodit.js +9064 -9013
  14. package/build/jodit.min.css +2 -2
  15. package/build/jodit.min.js +1 -10
  16. package/build-system/index.js +78 -0
  17. package/{src/utils → build-system/loaders}/css-variables-prefixes.js +0 -0
  18. package/{src/utils → build-system/loaders}/lang-loader.js +0 -0
  19. package/build-system/loaders/style.js +31 -0
  20. package/{src/utils → build-system/loaders}/svg-loader.js +1 -0
  21. package/build-system/minimizer/css.js +20 -0
  22. package/build-system/minimizer/index.js +7 -0
  23. package/build-system/minimizer/js.js +41 -0
  24. package/{src/utils/plugin-loader.js → build-system/plugins/banner.js} +7 -6
  25. package/build-system/plugins/define.js +22 -0
  26. package/build-system/plugins/extract-css.js +14 -0
  27. package/build-system/plugins/index.js +31 -0
  28. package/build-system/plugins/post-build.js +52 -0
  29. package/build-system/rules/css.js +12 -0
  30. package/build-system/rules/extra-typescript.js +22 -0
  31. package/build-system/rules/index.js +17 -0
  32. package/build-system/rules/internal-typescript.js +23 -0
  33. package/build-system/rules/langs.js +20 -0
  34. package/build-system/rules/svg.js +19 -0
  35. package/build-system/utils/filename.js +17 -0
  36. package/{src → build-system}/utils/post-build.js +0 -0
  37. package/build-system/variables.js +53 -0
  38. package/package.json +34 -33
  39. package/src/config.ts +8 -14
  40. package/src/core/ajax.ts +16 -46
  41. package/src/core/async.ts +6 -17
  42. package/src/core/component/view-component.ts +0 -1
  43. package/src/core/constants.ts +5 -5
  44. package/src/core/create.ts +8 -27
  45. package/src/core/decorators/debounce.ts +0 -8
  46. package/src/core/decorators/hook.ts +0 -1
  47. package/src/core/decorators/nonenumerable.ts +1 -2
  48. package/src/core/decorators/persistent.ts +0 -3
  49. package/src/core/decorators/spy.ts +0 -1
  50. package/src/core/decorators/wait.ts +0 -1
  51. package/src/core/dom.ts +56 -114
  52. package/src/core/events/events-native.ts +52 -26
  53. package/src/core/events/observe-object.ts +0 -2
  54. package/src/core/global.ts +10 -6
  55. package/src/core/helpers/append-script.ts +0 -8
  56. package/src/core/helpers/array/as-array.ts +2 -5
  57. package/src/core/helpers/array/split-array.ts +0 -1
  58. package/src/core/helpers/async/set-timeout.ts +0 -7
  59. package/src/core/helpers/browser.ts +0 -1
  60. package/src/core/helpers/checker/has-browser-color-picker.ts +0 -3
  61. package/src/core/helpers/checker/is-array.ts +0 -1
  62. package/src/core/helpers/checker/is-equal.ts +0 -3
  63. package/src/core/helpers/checker/is-function.ts +0 -2
  64. package/src/core/helpers/checker/is-html-from-word.ts +0 -3
  65. package/src/core/helpers/checker/is-html.ts +0 -1
  66. package/src/core/helpers/checker/is-number.ts +0 -1
  67. package/src/core/helpers/checker/is-numeric.ts +0 -2
  68. package/src/core/helpers/checker/is-plain-object.ts +0 -1
  69. package/src/core/helpers/checker/is-string.ts +0 -1
  70. package/src/core/helpers/checker/is-url.ts +0 -4
  71. package/src/core/helpers/color/color-to-hex.ts +2 -2
  72. package/src/core/helpers/config-proto.ts +0 -3
  73. package/src/core/helpers/convert-media-url-to-video-embed.ts +1 -6
  74. package/src/core/helpers/ctrl-key.ts +1 -3
  75. package/src/core/helpers/data-bind.ts +0 -6
  76. package/src/core/helpers/default-language.ts +0 -3
  77. package/src/core/helpers/each.ts +12 -0
  78. package/src/core/helpers/html/htmlspecialchars.ts +0 -4
  79. package/src/core/helpers/html/nl2br.ts +0 -1
  80. package/src/core/helpers/human-size-to-bytes.ts +1 -4
  81. package/src/core/helpers/normalize/normalize-color.ts +2 -3
  82. package/src/core/helpers/normalize/normalize-key-aliases.ts +0 -2
  83. package/src/core/helpers/normalize/normalize-path.ts +0 -2
  84. package/src/core/helpers/normalize/normalize-size.ts +0 -3
  85. package/src/core/helpers/selector.ts +0 -8
  86. package/src/core/helpers/size/get-content-width.ts +0 -2
  87. package/src/core/helpers/size/offset.ts +1 -7
  88. package/src/core/helpers/size/position.ts +0 -4
  89. package/src/core/helpers/string/camel-case.ts +1 -2
  90. package/src/core/helpers/string/i18n.ts +0 -7
  91. package/src/core/helpers/string/kebab-case.ts +7 -5
  92. package/src/core/helpers/string/stringify.ts +0 -3
  93. package/src/core/helpers/string/trim.ts +0 -2
  94. package/src/core/helpers/string/ucfirst.ts +2 -5
  95. package/src/core/helpers/type.ts +0 -1
  96. package/src/core/helpers/utils/get.ts +0 -2
  97. package/src/core/helpers/utils/mark-deprecated.ts +0 -4
  98. package/src/core/helpers/utils/set.ts +0 -2
  99. package/src/core/helpers/utils/utils.ts +35 -14
  100. package/src/core/plugin-system.ts +0 -31
  101. package/src/core/selection/select.ts +15 -13
  102. package/src/core/selection/style/api/is-normal-node.ts +1 -2
  103. package/src/core/selection/style/api/toggle-styles.ts +0 -2
  104. package/src/core/selection/style/apply-style.ts +6 -2
  105. package/src/core/traits/mods.ts +1 -3
  106. package/src/core/ui/button/button/button.less +7 -3
  107. package/src/core/ui/button/button/button.ts +1 -1
  108. package/src/core/ui/button/group/group.less +5 -5
  109. package/src/core/ui/element.ts +0 -4
  110. package/src/core/ui/form/inputs/file/file.less +4 -4
  111. package/src/core/ui/form/validators/input.ts +0 -2
  112. package/src/core/ui/form/validators/select.ts +0 -1
  113. package/src/core/ui/helpers/get-control-type.ts +0 -2
  114. package/src/core/ui/icon.ts +0 -10
  115. package/src/core/ui/list/group.less +1 -1
  116. package/src/core/ui/list/group.ts +1 -6
  117. package/src/core/ui/list/list.ts +0 -3
  118. package/src/core/ui/popup/popup.ts +0 -11
  119. package/src/core/ui/progress-bar/progress-bar.less +8 -8
  120. package/src/core/view/view-with-toolbar.ts +0 -5
  121. package/src/core/view/view.ts +2 -18
  122. package/src/index.ts +1 -1
  123. package/src/jodit.ts +14 -70
  124. package/src/modules/context-menu/context-menu.ts +3 -6
  125. package/src/modules/dialog/alert.ts +0 -6
  126. package/src/modules/dialog/confirm.ts +1 -1
  127. package/src/modules/dialog/dialog.ts +22 -55
  128. package/src/modules/dialog/prompt.ts +3 -5
  129. package/src/modules/image-editor/image-editor.less +51 -46
  130. package/src/modules/status-bar/status-bar.less +12 -12
  131. package/src/modules/status-bar/status-bar.ts +0 -3
  132. package/src/modules/table.ts +17 -6
  133. package/src/modules/toolbar/button/button.less +5 -6
  134. package/src/modules/toolbar/button/button.ts +1 -1
  135. package/src/modules/toolbar/button/content.less +2 -2
  136. package/src/modules/widget/color-picker/color-picker.less +7 -6
  137. package/src/modules/widget/tabs/tabs.less +3 -3
  138. package/src/plugins/about/about.less +1 -1
  139. package/src/plugins/add-new-line/add-new-line.less +14 -15
  140. package/src/plugins/add-new-line/add-new-line.ts +1 -1
  141. package/src/plugins/clipboard/paste-storage/paste-storage.less +10 -11
  142. package/src/plugins/fix/clean-html.ts +2 -2
  143. package/src/plugins/fix/wrap-text-nodes.ts +1 -2
  144. package/src/plugins/fullsize/fullsize.less +5 -5
  145. package/src/plugins/image/image-properties/image-properties.less +11 -7
  146. package/src/plugins/image/image-properties/image-properties.ts +11 -8
  147. package/src/plugins/placeholder/placeholder.less +4 -4
  148. package/src/plugins/resizer/resizer.less +28 -23
  149. package/src/plugins/search/search.less +25 -25
  150. package/src/plugins/source/source.less +15 -15
  151. package/src/plugins/xpath/xpath.less +3 -3
  152. package/src/styles/form.less +19 -14
  153. package/src/styles/modules/button-group.less +2 -2
  154. package/src/styles/modules/icon.less +9 -8
  155. package/src/types/ajax.d.ts +28 -0
  156. package/src/types/async.d.ts +4 -3
  157. package/src/types/events.d.ts +15 -0
  158. package/tsconfig.json +1 -1
  159. package/types/config.d.ts +8 -14
  160. package/types/core/ajax.d.ts +6 -29
  161. package/types/core/async.d.ts +2 -15
  162. package/types/core/component/view-component.d.ts +0 -1
  163. package/types/core/constants.d.ts +5 -5
  164. package/types/core/create.d.ts +0 -4
  165. package/types/core/decorators/debounce.d.ts +0 -8
  166. package/types/core/decorators/hook.d.ts +0 -1
  167. package/types/core/decorators/nonenumerable.d.ts +1 -2
  168. package/types/core/decorators/persistent.d.ts +0 -3
  169. package/types/core/decorators/wait.d.ts +0 -1
  170. package/types/core/dom.d.ts +25 -112
  171. package/types/core/events/events-native.d.ts +18 -17
  172. package/types/core/events/observe-object.d.ts +0 -2
  173. package/types/core/global.d.ts +0 -4
  174. package/types/core/helpers/append-script.d.ts +0 -8
  175. package/types/core/helpers/array/as-array.d.ts +3 -0
  176. package/types/core/helpers/array/split-array.d.ts +0 -1
  177. package/types/core/helpers/async/set-timeout.d.ts +0 -7
  178. package/types/core/helpers/browser.d.ts +0 -1
  179. package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  180. package/types/core/helpers/checker/is-array.d.ts +0 -1
  181. package/types/core/helpers/checker/is-equal.d.ts +0 -3
  182. package/types/core/helpers/checker/is-function.d.ts +0 -2
  183. package/types/core/helpers/checker/is-html-from-word.d.ts +0 -3
  184. package/types/core/helpers/checker/is-html.d.ts +0 -1
  185. package/types/core/helpers/checker/is-number.d.ts +0 -1
  186. package/types/core/helpers/checker/is-numeric.d.ts +0 -2
  187. package/types/core/helpers/checker/is-plain-object.d.ts +0 -1
  188. package/types/core/helpers/checker/is-string.d.ts +0 -1
  189. package/types/core/helpers/checker/is-url.d.ts +0 -4
  190. package/types/core/helpers/color/color-to-hex.d.ts +2 -2
  191. package/types/core/helpers/config-proto.d.ts +0 -3
  192. package/types/core/helpers/convert-media-url-to-video-embed.d.ts +1 -6
  193. package/types/core/helpers/ctrl-key.d.ts +1 -3
  194. package/types/core/helpers/data-bind.d.ts +0 -6
  195. package/types/core/helpers/default-language.d.ts +0 -3
  196. package/types/core/helpers/each.d.ts +9 -0
  197. package/types/core/helpers/html/htmlspecialchars.d.ts +0 -4
  198. package/types/core/helpers/html/nl2br.d.ts +0 -1
  199. package/types/core/helpers/human-size-to-bytes.d.ts +1 -4
  200. package/types/core/helpers/normalize/normalize-color.d.ts +2 -3
  201. package/types/core/helpers/normalize/normalize-key-aliases.d.ts +0 -2
  202. package/types/core/helpers/normalize/normalize-path.d.ts +0 -2
  203. package/types/core/helpers/normalize/normalize-size.d.ts +0 -3
  204. package/types/core/helpers/selector.d.ts +0 -8
  205. package/types/core/helpers/size/get-content-width.d.ts +0 -2
  206. package/types/core/helpers/size/offset.d.ts +1 -7
  207. package/types/core/helpers/string/camel-case.d.ts +1 -2
  208. package/types/core/helpers/string/i18n.d.ts +0 -7
  209. package/types/core/helpers/string/kebab-case.d.ts +1 -5
  210. package/types/core/helpers/string/stringify.d.ts +0 -3
  211. package/types/core/helpers/string/trim.d.ts +0 -2
  212. package/types/core/helpers/string/ucfirst.d.ts +1 -4
  213. package/types/core/helpers/type.d.ts +0 -1
  214. package/types/core/helpers/utils/get.d.ts +0 -2
  215. package/types/core/helpers/utils/mark-deprecated.d.ts +0 -4
  216. package/types/core/helpers/utils/set.d.ts +0 -2
  217. package/types/core/helpers/utils/utils.d.ts +4 -15
  218. package/types/core/plugin-system.d.ts +0 -31
  219. package/types/core/selection/select.d.ts +8 -9
  220. package/types/core/selection/style/api/toggle-styles.d.ts +0 -2
  221. package/types/core/traits/mods.d.ts +1 -3
  222. package/types/core/ui/element.d.ts +0 -4
  223. package/types/core/ui/form/validators/input.d.ts +0 -2
  224. package/types/core/ui/form/validators/select.d.ts +0 -1
  225. package/types/core/ui/helpers/get-control-type.d.ts +0 -2
  226. package/types/core/ui/icon.d.ts +0 -10
  227. package/types/core/ui/list/group.d.ts +1 -6
  228. package/types/core/ui/list/list.d.ts +0 -3
  229. package/types/core/ui/popup/popup.d.ts +0 -11
  230. package/types/core/view/view-with-toolbar.d.ts +0 -5
  231. package/types/core/view/view.d.ts +2 -18
  232. package/types/index.d.ts +1 -1
  233. package/types/jodit.d.ts +2 -46
  234. package/types/modules/context-menu/context-menu.d.ts +3 -6
  235. package/types/modules/dialog/alert.d.ts +0 -6
  236. package/types/modules/dialog/confirm.d.ts +1 -1
  237. package/types/modules/dialog/dialog.d.ts +9 -29
  238. package/types/modules/dialog/prompt.d.ts +3 -5
  239. package/types/modules/status-bar/status-bar.d.ts +0 -3
  240. package/types/modules/table.d.ts +1 -1
  241. package/types/types/ajax.d.ts +28 -0
  242. package/types/types/async.d.ts +4 -3
  243. package/types/types/events.d.ts +15 -0
  244. package/src/utils/create-entries.js +0 -57
  245. package/src/utils/lang-translater.js +0 -142
@@ -1,6 +1,7 @@
1
1
  {
2
- "extends": "stylelint-config-idiomatic-order",
2
+ "extends": ["stylelint-config-idiomatic-order"],
3
3
  "plugins": ["stylelint-prettier"],
4
+ "customSyntax": "postcss-less",
4
5
  "rules": {
5
6
  "prettier/prettier": true,
6
7
  "selector-type-no-unknown": null,
package/CHANGELOG.MD CHANGED
@@ -9,12 +9,52 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 3.8.5
13
+
14
+ #### :house: Internal
15
+
16
+ - The build system is divided into modules and is now located in the 'build-system' folder, the `src/utils` folder has been moved to it.
17
+
18
+ #### :bug: Bug Fix
19
+
20
+ - [When I merged some cells by dragging it to change its width. #737](https://github.com/xdan/jodit/issues/737)
21
+ - [Color dropdown looks broken #736](https://github.com/xdan/jodit/issues/736)
22
+ - [all popups and dialogs are outside shadow dom #731](https://github.com/xdan/jodit/issues/731)
23
+ - [shadow dom browser support #730](https://github.com/xdan/jodit/issues/730)
24
+ - [fix removal of attributes width and height when editing images](https://github.com/xdan/jodit/pull/733)
25
+ - Fixed work in IE11
26
+ - [toolbar menus are almost not visible on IE11 #458](https://github.com/xdan/jodit/issues/458)
27
+
28
+ ## 3.8.4
29
+
30
+ #### :rocket: New Feature
31
+
32
+ - В eventEmmiter добавлены методы:
33
+ - `mute(event?: string)` Doesn't start any handler;
34
+ - `isMuted(event?: string)` No handlers are triggered for the event
35
+ - `unmute(event?: string)` Returns event handling
36
+
37
+ ```js
38
+ const editor = Jodit.make('#editor');
39
+
40
+ editor.events.on('change', () => {
41
+ console.log(editor.value);
42
+ });
43
+ editor.value = '1'; // Console '1'
44
+
45
+ editor.events.mute('change');
46
+ editor.value = '2'; // Nothing
47
+ editor.events.unmute('change');
48
+ editor.value = '3'; // Console '3'
49
+ ```
50
+
12
51
  ## 3.8.3
13
52
 
14
53
  #### :boom: Breaking Change
15
54
 
16
- - beforeSetNativeEditorValue - get object {value: string} and can change value
17
- - Added `resizer.forImageChangeAttributes=true` option. Issue: https://github.com/xdan/jodit/issues/696
55
+ - beforeSetNativeEditorValue - get object {value: string} and can change value
56
+ - Added `resizer.forImageChangeAttributes=true` option. Issue: https://github.com/xdan/jodit/issues/696
57
+
18
58
  ```js
19
59
  // Disable
20
60
  Jodit.make('#editor', {
@@ -30,11 +70,11 @@ Jodit.make('#editor', {
30
70
 
31
71
  #### :bug: Bug Fix
32
72
 
33
- - [Trying to get in touch regarding a security issue #702](https://github.com/xdan/jodit/issues/702)
34
- - [Scrolling to top of editor bug in Safari. #715](https://github.com/xdan/jodit/issues/715)
35
- - [Refused to run the JavaScript URL because it violates the following Content Security Policy directive #716](https://github.com/xdan/jodit/issues/716)
36
- - [Popup doesn't follow the toolbar on scroll #703](https://github.com/xdan/jodit/issues/703)
37
- - Fixed the link dialog: the unlink button does not work in some cases, and the selection is not restored
73
+ - [Trying to get in touch regarding a security issue #702](https://github.com/xdan/jodit/issues/702)
74
+ - [Scrolling to top of editor bug in Safari. #715](https://github.com/xdan/jodit/issues/715)
75
+ - [Refused to run the JavaScript URL because it violates the following Content Security Policy directive #716](https://github.com/xdan/jodit/issues/716)
76
+ - [Popup doesn't follow the toolbar on scroll #703](https://github.com/xdan/jodit/issues/703)
77
+ - Fixed the link dialog: the unlink button does not work in some cases, and the selection is not restored
38
78
 
39
79
  ## 3.8.1
40
80
 
@@ -583,11 +623,11 @@ Related with https://github.com/xdan/jodit/issues/574. In some cases need to lim
583
623
  - @property {number} link.selectSizeClassName=3 The size of the select (to use with modeClassName="select")
584
624
  - @property {IUIOption[]} link.selectOptionsClassName=[] The list of the option for the select (to use with modeClassName="select")
585
625
  - ex: [
586
- - { value: "", text: "" },
587
- - { value: "val1", text: "text1" },
588
- - { value: "val2", text: "text2" },
589
- - { value: "val3", text: "text3" }
590
- - ]
626
+ - { value: "", text: "" },
627
+ - { value: "val1", text: "text1" },
628
+ - { value: "val2", text: "text2" },
629
+ - { value: "val3", text: "text3" }
630
+ - ]
591
631
  PR: https://github.com/xdan/jodit/pull/577 Thanks @s-renier-taonix-fr
592
632
 
593
633
  ##### New option `statusbar: boolean = true`
@@ -1471,7 +1511,7 @@ Jodit.Promt('Enter your name', 'Promt Dialog', function (name) {
1471
1511
  ![Confirm dialog](http://xdsoft.net/jodit/stuf/confirm.jpg)
1472
1512
 
1473
1513
  ```javascript
1474
- Jodit.Confirm('Are you shure?', function (yes) {
1514
+ Jodit.Confirm('Are you sure?', function (yes) {
1475
1515
  if (yes) {
1476
1516
  // do something
1477
1517
  }
@@ -1703,7 +1743,7 @@ Fix syncronize code in TableProcessor module
1703
1743
  Fix bug in Dialog.Confirm
1704
1744
 
1705
1745
  ```javascript
1706
- Jodit.Confirm('Are you shure?', 'Confirm', function (success) {
1746
+ Jodit.Confirm('Are you sure?', 'Confirm', function (success) {
1707
1747
  if (success) {
1708
1748
  alert('Agree');
1709
1749
  }