jodit 4.19.7 → 4.19.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 (76) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +8 -8
  4. package/es2015/jodit.js +295 -100
  5. package/es2015/jodit.min.js +4 -4
  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 +8 -8
  13. package/es2018/jodit.min.js +4 -4
  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 +9 -9
  18. package/es2021/jodit.js +229 -44
  19. package/es2021/jodit.min.js +57 -57
  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 +5 -5
  28. package/es2021.en/jodit.js +229 -44
  29. package/es2021.en/jodit.min.js +5 -5
  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 +371 -103
  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.d.ts +1 -0
  51. package/esm/core/constants.js +3 -1
  52. package/esm/core/helpers/utils/error/error.d.ts +1 -0
  53. package/esm/core/helpers/utils/error/error.js +4 -1
  54. package/esm/core/helpers/utils/error/errors/answer-error.d.ts +13 -0
  55. package/esm/core/helpers/utils/error/errors/answer-error.js +17 -0
  56. package/esm/core/helpers/utils/error/errors/index.d.ts +1 -0
  57. package/esm/core/helpers/utils/error/errors/index.js +1 -0
  58. package/esm/core/request/ajax.d.ts +1 -0
  59. package/esm/core/request/ajax.js +20 -1
  60. package/esm/modules/file-browser/data-provider.js +5 -3
  61. package/esm/modules/uploader/config.js +4 -0
  62. package/esm/modules/uploader/helpers/send-files.d.ts +2 -2
  63. package/esm/modules/uploader/helpers/send-files.js +76 -9
  64. package/esm/modules/uploader/helpers/upload-error.d.ts +15 -0
  65. package/esm/modules/uploader/helpers/upload-error.js +16 -0
  66. package/esm/modules/uploader/uploader.js +15 -3
  67. package/esm/types/uploader.d.ts +117 -11
  68. package/package.json +2 -2
  69. package/types/core/constants.d.ts +1 -0
  70. package/types/core/helpers/utils/error/error.d.ts +1 -0
  71. package/types/core/helpers/utils/error/errors/answer-error.d.ts +13 -0
  72. package/types/core/helpers/utils/error/errors/index.d.ts +1 -0
  73. package/types/core/request/ajax.d.ts +1 -0
  74. package/types/modules/uploader/helpers/send-files.d.ts +2 -2
  75. package/types/modules/uploader/helpers/upload-error.d.ts +15 -0
  76. package/types/types/uploader.d.ts +117 -11
package/CHANGELOG.md CHANGED
@@ -9,6 +9,18 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.19.8
13
+
14
+ #### :rocket: New Feature
15
+
16
+ - `uploader.promptOnExists` (on by default): when the connector answers `409`, an uploaded name is already taken (the `error` value of `saveSameFileNameStrategy`; jodit-nodejs 2.1.1, PHP 3.0.61, jodit-python), the uploader asks for another name in a prompt and sends the file again under it, before the error handler gets a say. `uploader.promptOnExistsSuggestName(name)` fills the prompt in (default: the same name), Cancel drops the file, a batch is sent again one file at a time so only the taken names ask. Requested by Kevin Sormann (li-life web+it).
17
+ - A refused upload reaches the error handler as an `UploadError`: `message` is the connector's text as before, plus `answer`, `code` (`data.code`), the sent `files` and `retry(plan)` to send them again with other files or extra request fields such as `onExists: 'replace'`, without running `beforeUpload` twice. The file browser's data provider throws an `AnswerError` with `answer` and `code` for its requests.
18
+ - `uploader.beforeUpload` may return a promise, and may hand back the files to send instead of the dropped ones (renamed, or some left out) or `{ files, data }` that also adds fields to the request. Returning `false` still cancels.
19
+
20
+ #### :bug: Bug Fix
21
+
22
+ - `Ajax` dropped the body of a connector answer sent with a status outside `successStatuses` (403, 409) and rejected with the reason phrase, so the file browser and uploader showed "Forbidden" or "Conflict" instead of the connector's own message. An answer whose body is the JSON envelope (`{"success": false, "data": {"code", "messages"}}`) is now resolved whatever the status and judged by `success` and `data.code`; only a body that is not such an envelope (an HTML error page) still rejects with the status text. Groundwork for the Finder dialog on an uploaded name that is already taken (connectors answer 409 since jodit-nodejs 2.1.1 and PHP 3.0.61).
23
+
12
24
  ## 4.19.7
13
25
 
14
26
  #### :bug: Bug Fix
package/es2015/jodit.css 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.19.7
4
+ * Version: v4.19.8
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */