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
@@ -9,16 +9,20 @@
9
9
  .jodit-properties {
10
10
  &__unlock > svg,
11
11
  &__lock > svg {
12
- font-style: normal;
13
12
  display: inline-block;
13
+ overflow: hidden;
14
+
14
15
  width: 14px;
15
16
  height: 14px;
16
- line-height: 14px;
17
- font-size: 8px;
18
- overflow: hidden;
19
- vertical-align: middle;
17
+
20
18
  fill: #222;
19
+
20
+ font-size: 8px;
21
+ font-style: normal;
22
+ line-height: 14px;
23
+
21
24
  transform-origin: 0 0 !important;
25
+ vertical-align: middle;
22
26
  }
23
27
 
24
28
  .jodit-properties_view_box {
@@ -26,9 +30,9 @@
26
30
 
27
31
  .jodit-properties_image_view {
28
32
  display: flex;
33
+ height: 150px;
29
34
  align-items: center;
30
35
  justify-content: center;
31
- height: 150px;
32
36
  padding: 0;
33
37
  margin: 0 0 var(--padding-default);
34
38
  background-color: #f6f6f6;
@@ -40,11 +44,11 @@
40
44
  }
41
45
 
42
46
  .jodit-properties_image_sizes.jodit-form__group {
47
+ min-width: auto;
43
48
  flex-direction: row;
44
49
  align-items: center;
45
50
  padding: 0 !important;
46
51
  margin: 0 !important;
47
- min-width: auto;
48
52
 
49
53
  a {
50
54
  display: inline-block;
@@ -643,17 +643,20 @@ export class imageProperties extends Plugin {
643
643
  imageWidth.value !== image.offsetWidth.toString() ||
644
644
  imageHeight.value !== image.offsetHeight.toString()
645
645
  ) {
646
+ const updatedtWidth = trim(imageWidth.value)
647
+ ? normalSizeToString(imageWidth.value)
648
+ : null;
649
+ const updatedHeight = trim(imageHeight.value)
650
+ ? normalSizeToString(imageHeight.value)
651
+ : null;
652
+
646
653
  css(image, {
647
- width: trim(imageWidth.value)
648
- ? normalSizeToString(imageWidth.value)
649
- : null,
650
- height: trim(imageHeight.value)
651
- ? normalSizeToString(imageHeight.value)
652
- : null
654
+ width: updatedtWidth,
655
+ height: updatedHeight
653
656
  });
654
657
 
655
- attr(image, 'width', null);
656
- attr(image, 'height', null);
658
+ attr(image, 'width', attr(image, 'width') ? updatedtWidth : null);
659
+ attr(image, 'height', attr(image, 'height') ? updatedHeight : null);
657
660
  }
658
661
 
659
662
  const margins = [marginTop, marginRight, marginBottom, marginLeft];
@@ -7,14 +7,14 @@
7
7
  @import (reference) '../../styles/variables';
8
8
 
9
9
  .jodit-placeholder {
10
- width: 100%;
11
- user-select: none !important;
10
+ position: absolute;
11
+ z-index: 1;
12
12
  top: 0;
13
13
  left: 0;
14
14
  display: block;
15
- position: absolute;
15
+ width: 100%;
16
16
  padding: var(--padding-default);
17
17
  color: var(--color-placeholder);
18
- z-index: 1;
19
18
  pointer-events: none;
19
+ user-select: none !important;
20
20
  }
@@ -13,33 +13,33 @@
13
13
  }
14
14
 
15
15
  [data-jodit_iframe_wrapper] {
16
+ position: relative;
16
17
  display: block;
17
18
  user-select: none;
18
- position: relative;
19
19
 
20
20
  &::after {
21
21
  position: absolute;
22
- content: '';
23
22
  z-index: 1;
24
23
  top: 0;
25
- left: 0;
26
24
  right: 0;
27
25
  bottom: 0;
28
- cursor: pointer;
26
+ left: 0;
29
27
  display: block;
30
28
  background: rgba(0, 0, 0, 0);
29
+ content: '';
30
+ cursor: pointer;
31
31
  }
32
32
  }
33
33
 
34
34
  .jodit-resizer {
35
- width: 100px;
36
- height: 100px;
37
35
  position: absolute;
38
- border: 1px solid var(--color-border-dark);
39
36
  top: 0;
40
37
  left: 0;
41
- pointer-events: none;
38
+ width: 100px;
39
+ height: 100px;
40
+ border: 1px solid var(--color-border-dark);
42
41
  font-size: 0;
42
+ pointer-events: none;
43
43
 
44
44
  * {
45
45
  box-sizing: border-box;
@@ -47,47 +47,52 @@
47
47
 
48
48
  > span {
49
49
  position: absolute;
50
- left: 50%;
51
50
  top: 50%;
51
+ left: 50%;
52
+
52
53
  display: inline-block;
54
+ overflow: visible;
53
55
  width: var(--viewer_width);
54
56
  height: var(--viewer_height);
55
- margin-left: calc(var(--viewer_width) / -2);
56
57
  margin-top: calc(var(--viewer_height) / -2);
57
- line-height: var(--viewer_height);
58
- font-size: 12px;
59
- text-align: center;
60
- color: var(--color-white);
58
+ margin-left: calc(var(--viewer_width) / -2);
59
+
61
60
  background-color: var(--color-placeholder);
61
+ color: var(--color-white);
62
+
63
+ font-size: 12px;
64
+ line-height: var(--viewer_height);
65
+
62
66
  opacity: 0;
67
+ text-align: center;
63
68
  transition: opacity 0.2s linear;
64
- overflow: visible;
65
69
  }
66
70
 
67
71
  > i {
68
72
  position: absolute;
69
- display: inline-block;
70
73
  z-index: 4;
71
- pointer-events: all;
74
+ display: inline-block;
75
+
76
+ width: var(--resizer-handle-size);
77
+ height: var(--resizer-handle-size);
78
+
72
79
  border: 1px solid var(--color-border-dark);
73
80
  background-color: var(--color-background-gray);
81
+ pointer-events: all;
74
82
 
75
83
  &:hover {
76
84
  background-color: var(--color-background-gray-hover);
77
85
  }
78
86
 
79
- width: var(--resizer-handle-size);
80
- height: var(--resizer-handle-size);
81
-
82
87
  &:nth-child(1) {
83
- left: calc(var(--resizer-handle-size) / -2);
84
88
  top: calc(var(--resizer-handle-size) / -2);
89
+ left: calc(var(--resizer-handle-size) / -2);
85
90
  cursor: nw-resize;
86
91
  }
87
92
 
88
93
  &:nth-child(2) {
89
- right: calc(var(--resizer-handle-size) / -2);
90
94
  top: calc(var(--resizer-handle-size) / -2);
95
+ right: calc(var(--resizer-handle-size) / -2);
91
96
  cursor: ne-resize;
92
97
  }
93
98
 
@@ -98,8 +103,8 @@
98
103
  }
99
104
 
100
105
  &:nth-child(4) {
101
- left: calc(var(--resizer-handle-size) / -2);
102
106
  bottom: calc(var(--resizer-handle-size) / -2);
107
+ left: calc(var(--resizer-handle-size) / -2);
103
108
  cursor: sw-resize;
104
109
  }
105
110
 
@@ -16,6 +16,12 @@
16
16
  }
17
17
 
18
18
  .jodit-search {
19
+ position: absolute;
20
+ top: 0;
21
+ right: 0;
22
+ width: 0;
23
+ height: 0;
24
+
19
25
  visibility: hidden;
20
26
 
21
27
  &_sticky {
@@ -26,33 +32,28 @@
26
32
  visibility: visible;
27
33
  }
28
34
 
29
- position: absolute;
30
- top: 0;
31
- right: 0;
32
- width: 0;
33
- height: 0;
34
-
35
35
  .jodit-search__box {
36
- width: var(--width-search);
37
- max-width: 100vw;
36
+ position: absolute;
37
+ right: 0;
38
38
 
39
39
  display: flex;
40
40
 
41
- position: absolute;
42
- right: 0;
43
- background-color: var(--color-panel);
41
+ width: var(--width-search);
42
+ max-width: 100vw;
43
+ padding: calc(var(--padding-default) / 2);
44
+
44
45
  border: solid var(--color-border);
45
46
  border-width: 0 0 1px 1px;
46
- padding: calc(var(--padding-default) / 2);
47
+ background-color: var(--color-panel);
47
48
 
48
49
  input {
49
- margin: 0;
50
50
  width: 100%;
51
51
  height: 100%;
52
+ padding: 0 var(--padding-default);
52
53
  border: 0;
54
+ margin: 0;
53
55
  background-color: transparent;
54
56
  outline: none;
55
- padding: 0 var(--padding-default);
56
57
 
57
58
  &[data-ref='replace'] {
58
59
  display: none;
@@ -75,36 +76,35 @@
75
76
  }
76
77
 
77
78
  .jodit-search__counts {
78
- width: var(--width-search-count-box);
79
79
  display: flex;
80
- justify-content: center;
80
+ width: var(--width-search-count-box);
81
81
  align-items: center;
82
- color: var(--color-border);
82
+ justify-content: center;
83
83
  border-left: 1px solid var(--color-border);
84
+ color: var(--color-border);
84
85
  }
85
86
 
86
87
  .jodit-search__buttons {
87
- flex: 1;
88
- padding-left: 0;
89
88
  display: flex;
90
- justify-content: center;
89
+ flex: 1;
91
90
  align-items: center;
91
+ justify-content: center;
92
+ padding-left: 0;
92
93
 
93
94
  button {
94
95
  width: 32%;
96
+ height: 100%;
97
+ border: 1px solid transparent;
95
98
  margin-right: 1%;
99
+ background-color: transparent;
96
100
 
97
101
  &[data-ref='replace-btn'] {
102
+ display: none;
98
103
  width: 100%;
99
104
  border: 1px solid var(--color-border);
100
105
  margin-top: 2px;
101
- display: none;
102
106
  }
103
107
 
104
- height: 100%;
105
- border: 1px solid transparent;
106
- background-color: transparent;
107
-
108
108
  &:hover {
109
109
  background-color: var(--color-background-button-hover);
110
110
  }
@@ -12,12 +12,12 @@
12
12
  }
13
13
 
14
14
  .jodit-source {
15
- display: none;
16
15
  position: relative;
17
- background-color: var(--color-source-area);
16
+ display: none;
17
+ overflow: auto;
18
18
  min-height: 100%;
19
19
  flex: auto;
20
- overflow: auto;
20
+ background-color: var(--color-source-area);
21
21
 
22
22
  .jodit-source__mirror-fake {
23
23
  min-height: 100%;
@@ -41,8 +41,8 @@
41
41
 
42
42
  .jodit-container.jodit_split_mode {
43
43
  .jodit-workplace {
44
- flex-wrap: nowrap;
45
44
  flex-direction: row;
45
+ flex-wrap: nowrap;
46
46
  }
47
47
 
48
48
  .jodit-wysiwyg,
@@ -55,26 +55,26 @@
55
55
  }
56
56
 
57
57
  .jodit-source__mirror {
58
- border: 0;
58
+ z-index: 2;
59
+ overflow: auto;
59
60
  width: 100%;
60
61
  height: 100%;
61
- background: var(--color-source-area);
62
- margin: 0;
63
- resize: none;
62
+ min-height: 100%;
64
63
  box-sizing: border-box;
64
+ padding: var(--padding-default);
65
+ border: 0;
66
+ margin: 0;
67
+ background: var(--color-source-area);
68
+ box-shadow: none;
65
69
  color: #f0f0f0;
70
+ line-height: 1.5;
66
71
  outline: none;
72
+ resize: none;
73
+ tab-size: 2em;
67
74
 
68
75
  .fontSource();
69
76
 
70
- line-height: 1.5;
71
- box-shadow: none;
72
- overflow: auto;
73
- z-index: 2;
74
- padding: var(--padding-default);
75
77
  white-space: pre-wrap;
76
- tab-size: 2em;
77
- min-height: 100%;
78
78
 
79
79
  &::selection {
80
80
  background: var(--color-selection-area);
@@ -14,14 +14,14 @@
14
14
 
15
15
  &__item {
16
16
  display: flex;
17
- line-height: calc(var(--font-size-small) - 1px);
18
17
  height: var(--font-size-small);
18
+ line-height: calc(var(--font-size-small) - 1px);
19
19
 
20
20
  a {
21
- font-size: var(--font-size-small);
22
- color: var(--color-default);
23
21
  padding: 0 3px;
24
22
  margin-left: 2px;
23
+ color: var(--color-default);
24
+ font-size: var(--font-size-small);
25
25
  outline: 0;
26
26
  }
27
27
  }
@@ -7,6 +7,15 @@
7
7
  @import (reference) './variables';
8
8
  @import (reference) './mixins';
9
9
 
10
+ :root {
11
+ --switche-width: 60px;
12
+ --switche-height: 32px;
13
+ --switche-slider-margin: 4px;
14
+ --switche-slider-size: calc(
15
+ var(--switche-height) - var(--switche-slider-margin) * 2
16
+ );
17
+ }
18
+
10
19
  .jodit-form {
11
20
  .font();
12
21
 
@@ -201,15 +210,10 @@
201
210
  }
202
211
 
203
212
  .jodi-switcher {
204
- --width: 60px;
205
- --height: 32px;
206
- --slider-margin: 4px;
207
- --slider-size: calc(var(--height) - var(--slider-margin) * 2);
208
-
209
213
  position: relative;
210
214
  display: inline-block;
211
- width: var(--width);
212
- height: var(--height);
215
+ width: var(--switche-width);
216
+ height: var(--switche-height);
213
217
 
214
218
  input {
215
219
  width: 0;
@@ -217,23 +221,23 @@
217
221
  opacity: 0;
218
222
  }
219
223
 
220
- &__slider {
224
+ & &__slider {
221
225
  position: absolute;
222
226
  top: 0;
223
227
  right: 0;
224
228
  bottom: 0;
225
229
  left: 0;
226
230
  background-color: var(--color-gray);
227
- border-radius: var(--height);
231
+ border-radius: var(--switche-height);
228
232
  cursor: pointer;
229
233
  transition: 0.4s;
230
234
 
231
235
  &:before {
232
236
  position: absolute;
233
- bottom: var(--slider-margin);
234
- left: var(--slider-margin);
235
- width: var(--slider-size);
236
- height: var(--slider-size);
237
+ bottom: var(--switche-slider-margin);
238
+ left: var(--switche-slider-margin);
239
+ width: var(--switche-slider-size);
240
+ height: var(--switche-slider-size);
237
241
  background-color: white;
238
242
  border-radius: 50%;
239
243
  content: '';
@@ -247,7 +251,8 @@
247
251
  &:before {
248
252
  transform: translateX(
249
253
  calc(
250
- var(--width) - var(--slider-margin) * 2 - var(--slider-size)
254
+ var(--switche-width) - var(--switche-slider-margin) * 2 -
255
+ var(--switche-slider-size)
251
256
  )
252
257
  );
253
258
  }
@@ -27,15 +27,15 @@
27
27
  input:first-child + button,
28
28
  button:first-child {
29
29
  border-right: 0;
30
- border-top-right-radius: 0;
31
30
  border-bottom-right-radius: 0;
31
+ border-top-right-radius: 0;
32
32
  }
33
33
 
34
34
  input:last-child + button,
35
35
  button:last-child {
36
36
  border-left: 0;
37
- border-top-left-radius: 0;
38
37
  border-bottom-left-radius: 0;
38
+ border-top-left-radius: 0;
39
39
  }
40
40
 
41
41
  input[type='checkbox'] {
@@ -14,26 +14,27 @@
14
14
  }
15
15
 
16
16
  .jodit-icon_loader {
17
- background: data-uri('../icons/loader.png') no-repeat center;
18
- background-size: 100% 100%;
17
+ display: inline-block;
19
18
  width: var(--icon-loader-size);
20
19
  height: var(--icon-loader-size);
21
- display: inline-block;
20
+ animation: rotate 2s ease-out 0s infinite;
21
+ background: data-uri('../icons/loader.png') no-repeat center;
22
+ background-size: 100% 100%;
22
23
  vertical-align: middle;
23
24
  will-change: transform;
24
- animation: rotate 2s ease-out 0s infinite;
25
25
  }
26
26
 
27
27
  .jodit-icon {
28
+ overflow: visible;
28
29
  .size(@icon-middle-size);
29
30
 
31
+ background: center no-repeat;
32
+ background-size: contain;
33
+
30
34
  fill: var(--color-icon);
31
35
  stroke: var(--color-icon);
32
36
 
33
37
  transform-origin: 0 0 !important;
34
- overflow: visible;
35
- background: center no-repeat;
36
- background-size: contain;
37
38
  }
38
39
 
39
40
  .jodit-icon_close {
@@ -41,8 +42,8 @@
41
42
  }
42
43
 
43
44
  svg.jodit-icon {
44
- isolation: isolate;
45
45
  height: auto;
46
+ isolation: isolate;
46
47
  }
47
48
 
48
49
  .jodit-icon_text {
@@ -38,17 +38,45 @@ export interface IAjax extends IDestructible {
38
38
  }
39
39
 
40
40
  export interface AjaxOptions {
41
+ /**
42
+ * json or text The type of data that you're expecting back
43
+ * from the server. if `json` the return value passes through the `JSON.parse`
44
+ */
41
45
  dataType?: string;
46
+
47
+ /**
48
+ * The HTTP method toWYSIWYG use for the request
49
+ * (e.g. "POST", "GET", "PUT")
50
+ */
42
51
  method?: string;
43
52
 
53
+ /**
54
+ * A string containing the URL toWYSIWYG which the request is sent.
55
+ */
44
56
  url?: string;
45
57
 
58
+ /**
59
+ * Data toWYSIWYG be sent toWYSIWYG the server.
60
+ * It is converted toWYSIWYG a query string, if not already a string. It's appended toWYSIWYG the url for GET-requests.
61
+ */
46
62
  data: DataVariant;
47
63
 
64
+ /**
65
+ * When sending data toWYSIWYG the server, use this content type. Default is "application/x-www-form-urlencoded;
66
+ * charset=UTF-8", which is fine for most cases
67
+ */
48
68
  contentType?: string | false;
49
69
 
70
+ /**
71
+ * An object of additional header key/value pairs toWYSIWYG send along
72
+ * with requests using the XMLHttpRequest transport. Uses in {@link FileBrowser|FileBrowser}
73
+ * and {@link Uploader|Uploader}
74
+ */
50
75
  headers?: IDictionary<string> | null;
51
76
 
77
+ /**
78
+ * Enable or disable Access-Control-Allow-Credentials client side. Useful for cross domain requests
79
+ */
52
80
  withCredentials?: boolean;
53
81
 
54
82
  queryBuild?: (
@@ -4,9 +4,10 @@
4
4
  * Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
 
7
- import { CallbackFunction, IDestructible } from './types';
7
+ import type { CallbackFunction, IDestructible } from './types';
8
8
 
9
9
  export type ITimeout = number | (() => number);
10
+
10
11
  export interface IAsyncParams {
11
12
  timeout?: number;
12
13
  label?: string;
@@ -54,7 +55,7 @@ export interface IAsync extends IDestructible {
54
55
  firstCallImmediately?: boolean
55
56
  ): CallbackFunction;
56
57
 
57
- requestIdleCallback(fn: CallbackFunction): number;
58
- requestIdlePromise(): Promise<number>;
58
+ requestIdleCallback(fn: IdleRequestCallback): number;
59
+ requestIdlePromise(): RejectablePromise<number>;
59
60
  cancelIdleCallback(request: number): void;
60
61
  }
@@ -26,6 +26,21 @@ interface IEventsNative extends IDestructible {
26
26
  current: string;
27
27
  currents: string[];
28
28
 
29
+ /**
30
+ * Doesn't start any handler
31
+ */
32
+ mute(event?: string): IEventsNative;
33
+
34
+ /**
35
+ * No handlers are triggered for the event
36
+ */
37
+ isMuted(event?: string): boolean;
38
+
39
+ /**
40
+ * Returns event handling
41
+ */
42
+ unmute(event?: string): IEventsNative;
43
+
29
44
  /**
30
45
  * Sets the handler for the specified event ( Event List ) for a given element .
31
46
  *
package/tsconfig.json CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  "importHelpers": true,
33
33
 
34
- "lib": ["es5", "esnext", "dom", "scripthost"]
34
+ "lib": ["es5", "esnext", "dom", "scripthost", "es2015.iterable"]
35
35
  },
36
36
  "include": [
37
37
  "./src/types/"