jodit 4.13.16 → 4.13.18

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 (55) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +3 -3
  4. package/es2015/jodit.js +26 -6
  5. package/es2015/jodit.min.js +3 -3
  6. package/es2015/plugins/debug/debug.css +1 -1
  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.fat.min.js +3 -3
  13. package/es2018/jodit.min.js +3 -3
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +4 -4
  18. package/es2021/jodit.js +26 -6
  19. package/es2021/jodit.min.js +4 -4
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +4 -4
  28. package/es2021.en/jodit.js +26 -6
  29. package/es2021.en/jodit.min.js +4 -4
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +26 -6
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/core/helpers/utils/scroll-into-view.d.ts +0 -3
  52. package/esm/core/helpers/utils/scroll-into-view.js +12 -2
  53. package/esm/modules/uploader/helpers/send-files.js +16 -2
  54. package/package.json +1 -1
  55. package/types/core/helpers/utils/scroll-into-view.d.ts +0 -3
package/es5/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.13.16
4
+ * Version: v4.13.18
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2107,7 +2107,7 @@ __webpack_require__.r(__webpack_exports__);
2107
2107
  * @packageDocumentation
2108
2108
  * @module constants
2109
2109
  */
2110
- var APP_VERSION = "4.13.16";
2110
+ var APP_VERSION = "4.13.18";
2111
2111
  // prettier-ignore
2112
2112
  var ES = "es5";
2113
2113
  var IS_ES_MODERN = false;
@@ -10166,6 +10166,14 @@ var map = {};
10166
10166
  /**
10167
10167
  * @module helpers/utils
10168
10168
  */ /**
10169
+ * `getBoundingClientRect` returns fractional values while `scrollTop`,
10170
+ * `offsetTop` and `clientHeight` are rounded to integers, so a container
10171
+ * scrolled right up to its limit can still appear to clip the element by a
10172
+ * fraction of a pixel. Treat anything clipped by less than a pixel as
10173
+ * visible — otherwise `scrollIntoViewIfNeeded` falls through to
10174
+ * `elm.scrollIntoView()` and needlessly scrolls the whole page.
10175
+ */ var SUBPIXEL_TOLERANCE = 1;
10176
+ /**
10169
10177
  * Check if element is in view
10170
10178
  */ function inView(elm, root, doc) {
10171
10179
  var rect = elm.getBoundingClientRect(), el = elm;
@@ -10178,7 +10186,7 @@ var map = {};
10178
10186
  // view even though its top still fits. The `top > rect.top` guard keeps
10179
10187
  // elements taller than the container (which can never fully fit) from
10180
10188
  // being treated as always out of view. See #1300
10181
- if (top + height > rect.bottom && top > rect.top) {
10189
+ if (top + height > rect.bottom + SUBPIXEL_TOLERANCE && top > rect.top) {
10182
10190
  return false;
10183
10191
  }
10184
10192
  // Check if the element is out of view due to a container scrolling
@@ -10192,7 +10200,7 @@ var map = {};
10192
10200
  // element scrolled above the top was wrongly reported as visible and never
10193
10201
  // scrolled to. See #1279
10194
10202
  var clientHeight = doc.documentElement && doc.documentElement.clientHeight || 0;
10195
- return (top + height <= clientHeight || top <= 0) && top + height >= 0;
10203
+ return (top + height <= clientHeight + SUBPIXEL_TOLERANCE || top <= 0) && top + height >= 0;
10196
10204
  }
10197
10205
  /**
10198
10206
  * Scroll element into view if it is not in view
@@ -30293,7 +30301,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
30293
30301
  return "continue";
30294
30302
  }
30295
30303
  var reader = new FileReader();
30296
- promises.push(uploader.j.async.promise(function(resolve, reject) {
30304
+ var readerPromise = uploader.j.async.promise(function(resolve, reject) {
30297
30305
  reader.onerror = reject;
30298
30306
  reader.onloadend = function() {
30299
30307
  var resp = {
@@ -30310,12 +30318,24 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
30310
30318
  resolve(resp);
30311
30319
  };
30312
30320
  reader.readAsDataURL(file);
30313
- }));
30321
+ });
30322
+ readerPromises.push(readerPromise);
30323
+ promises.push(readerPromise);
30314
30324
  fileList[i] = null;
30315
30325
  }
30316
30326
  };
30327
+ var readerPromises = [];
30317
30328
  var file, i;
30318
30329
  for(i = 0; i < fileList.length; i += 1)_loop();
30330
+ // Images inserted as base64 never reach the server branch in `sendFiles`,
30331
+ // which is the only other place that fires `filesWereUploaded`
30332
+ if (readerPromises.length) {
30333
+ Promise.all(readerPromises).then(function() {
30334
+ uploader.j.events && uploader.j.e.fire('filesWereUploaded');
30335
+ }).catch(function() {
30336
+ // Read errors are propagated to the caller via `promises`
30337
+ });
30338
+ }
30319
30339
  }
30320
30340
 
30321
30341
 
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.13.16
4
+ * Version: v4.13.18
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.13.16
11
+ * Version: v4.13.18
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */