jodit 4.13.18 → 4.13.20

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 (56) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +5 -5
  4. package/es2015/jodit.js +205 -115
  5. package/es2015/jodit.min.js +9 -9
  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 +9 -9
  13. package/es2018/jodit.min.js +5 -5
  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 +15 -15
  18. package/es2021/jodit.js +201 -111
  19. package/es2021/jodit.min.js +8 -8
  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 +8 -8
  28. package/es2021.en/jodit.js +201 -111
  29. package/es2021.en/jodit.min.js +8 -8
  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 +501 -407
  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 +6 -6
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +13 -19
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/modules/toolbar/button/button.d.ts +1 -0
  52. package/esm/modules/toolbar/button/button.js +13 -0
  53. package/esm/plugins/search/ui/search.js +24 -4
  54. package/esm/plugins/table/config.js +79 -19
  55. package/package.json +1 -1
  56. package/types/modules/toolbar/button/button.d.ts +1 -0
@@ -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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1128,8 +1128,8 @@ __webpack_require__.r(__webpack_exports__);
1128
1128
  /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
1129
1129
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
1130
1130
  /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34918);
1131
- /* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(38574);
1132
- /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
1131
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635);
1132
+ /* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38574);
1133
1133
  /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68616);
1134
1134
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23211);
1135
1135
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28077);
@@ -1257,11 +1257,11 @@ var SpeechRecognizeNative = /*#__PURE__*/ function(Plugin) {
1257
1257
  }
1258
1258
  ]);
1259
1259
  return SpeechRecognizeNative;
1260
- }((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_11__.Plugin));
1261
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
1260
+ }((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_6__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_11__.Plugin));
1261
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
1262
1262
  (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_7__.watch)(':speechRecognizeProgressResult')
1263
1263
  ], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
1264
- (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
1264
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([
1265
1265
  (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_7__.watch)(':speechRecognizeResult')
1266
1266
  ], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
1267
1267
  _jodit__WEBPACK_IMPORTED_MODULE_13__.Jodit.plugins.add('speech-recognize', SpeechRecognizeNative);
@@ -1,8 +1,8 @@
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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
- !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var i in t)("object"==typeof exports?exports:e)[i]=t[i]}}(self,function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{75143:function(e,n,t){"use strict";var i=t(22289),o=t(85932),s=t(7909),r=t(36400),u=t(29434),c=t(5266),a=t(97743),l=t(68097),p=t(22227),d=t.n(p);c.Config.prototype.speechRecognize={api:void 0!==a.SpeechRecognition?a.SpeechRecognition:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},u.Icon.set("speech-recognize",d()),c.Config.prototype.controls.speechRecognize={isVisible:function(e){return!!e.o.speechRecognize.api},isActive:function(e,n){var t=(0,r.dataBind)(e,"speech");return!!(null==t?void 0:t.isEnabled)},isDisabled:function(e){return!e.o.speechRecognize.api},exec:function(e,n,t){var u=t.button,c=t.control,a=e.o.speechRecognize,p=a.api,d=a.lang,h=a.continuous,f=a.interimResults,m=a.sound;if(!p)return void e.alert("Speech recognize API unsupported in your browser");var _=(0,r.dataBind)(e,"speech");if(!_){var g,R=new p;(_=new l.RecognizeManager(e.async,R)).lang=(0,o.isString)(d)?d:null!=(g=(0,s.attr)(e.od.documentElement,"lang"))?g:void 0,_.continuous=h,_.interimResults=f,_.sound=m,(0,r.dataBind)(e,"speech",_),_.on("pulse",function(e){u.setMod("pulse",e)}),_.on("result",function(n){return e.e.fire("speechRecognizeResult",n)}),_.on("progress",function(n){return e.e.fire("speechRecognizeProgressResult",n)}),_.on("error",function(n){return e.message.error(n)}),e.hookStatus("beforeDestruct",function(){(0,r.dataBind)(e,"speech",null),_.destruct()})}if(c.args){var v=c.args[0];if((0,i.isBoolean)(_[v])){_[v]=!_[v],_.isEnabled&&_.restart();return}}_.toggle(),_.isEnabled&&u.setMod("pulse",!0),u.state.activated=_.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate:function(e,n,t){var i,o=(0,r.dataBind)(e,"speech"),s=null!=(i=null==o?void 0:o[n])?i:e.o.speechRecognize[n];return"<span class='jodit-speech-recognize__list-item'><input ".concat(s?"checked":""," class='jodit-checkbox' type='checkbox'>&nbsp;").concat(t,"</span>")},mods:{stroke:!1}}},94092:function(e,n,t){"use strict";t.d(n,{PII:function(){return i},WARN:function(){return o}});var i=440,o=940},97743:function(e,n,t){"use strict";t.d(n,{SpeechRecognition:function(){return o}});var i=t(81937),o=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0},8962:function(e,n,t){"use strict";t.d(n,{execSpellCommand:function(){return o}});var i=t(50684);function o(e,n){var t=(0,i._)(n.split("::"),2),o=t[0],s=t[1];"open"===o.toLowerCase()&&s&&/^(javascript:|data:|vbscript:)/i.test(s.trim())||e.execCommand(o,null,s)}},68097:function(e,n,t){"use strict";t.d(n,{RecognizeManager:function(){return m}});var i=t(69262),o=t(73104),s=t(53429),r=t(25045),u=t(22248),c=t(66773),a=t(34918),l=t(31635),p=t(84839),d=t(60216),h=t(32560),f=t(94092),m=function(e){function n(e,t){var s;return(0,o._)(this,n),s=(0,i._)(this,n),(0,r._)(s,"async",void 0),(0,r._)(s,"_lang",void 0),(0,r._)(s,"_continuous",void 0),(0,r._)(s,"_interimResults",void 0),(0,r._)(s,"sound",void 0),(0,r._)(s,"_isEnabled",void 0),(0,r._)(s,"_restartTimeout",void 0),(0,r._)(s,"_onSpeechStart",void 0),(0,r._)(s,"_api",void 0),(0,r._)(s,"__interimResults",void 0),s.async=e,s._continuous=!1,s._interimResults=!1,s.sound=!0,s._isEnabled=!1,s._restartTimeout=0,s._onSpeechStart=function(e){s._isEnabled&&(s.async.clearTimeout(s._restartTimeout),s._restartTimeout=s.async.setTimeout(function(){s.restart(),s.emit("pulse",!1),s._makeSound(f.WARN)},5e3),s.emit("pulse",!0))},s.__interimResults="",s._api=t,n._instances.add(s),s}return(0,a._)(n,e),(0,s._)(n,[{key:"lang",get:function(){return this._lang},set:function(e){this._lang=e,this._api.lang=e}},{key:"continuous",get:function(){return this._continuous},set:function(e){this._continuous=e,this._api.continuous=e}},{key:"interimResults",get:function(){return this._interimResults},set:function(e){this._interimResults=e,this._api.interimResults=e}},{key:"destruct",value:function(){this.stop(),(0,h.closeSound)(this),n._instances.delete(this),(0,u._)((0,c._)(n.prototype),"destruct",this).call(this)}},{key:"isEnabled",get:function(){return this._isEnabled}},{key:"start",value:function(){var e=this;if(!this._isEnabled){this._isEnabled=!0,n._instances.forEach(function(n){n!==e&&n.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}},{key:"stop",value:function(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}},{key:"toggle",value:function(){this._isEnabled?this.stop():this.start()}},{key:"restart",value:function(){this.stop(),this.start()}},{key:"__on",value:function(e,n){return this._api.addEventListener(e,n),this}},{key:"__off",value:function(e,n){return this._api.removeEventListener(e,n),this}},{key:"_onResults",value:function(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(f.PII),this.restart()}},{key:"_onProgress",value:function(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(var n=0;n<e.results.length;n++){var t=e.results.item(n);if(t.length){var i=t.item(0).transcript;this.__interimResults+=i}}this.__interimResults&&this.emit("progress",this.__interimResults)}}},{key:"_onError",value:function(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),("language-unavailable"===e.error||"language-not-supported"===e.error)&&this.emit("error","Language unavailable"),this._makeSound(f.WARN),this.emit("pulse",!1),this.stop()}},{key:"_makeSound",value:function(e){this.sound&&(0,h.sound)(this,{frequency:e})}}]),n}(d.Eventify);(0,r._)(m,"_instances",new Set),(0,l.__decorate)([p.autobind],m.prototype,"_onResults",null),(0,l.__decorate)([p.autobind],m.prototype,"_onProgress",null),(0,l.__decorate)([p.autobind],m.prototype,"_onError",null)},32560:function(e,n,t){"use strict";t.d(n,{closeSound:function(){return u},sound:function(){return r}});var i=t(81937),o=t(94092),s=new WeakMap;function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.sec,r=n.frequency,u=void 0===r?o.PII:r,c=n.gain,a=n.type,l=function(e){if(!i.globalWindow)return null;var n=s.get(e);if(n&&"closed"!==n.state)return n;var t=i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext;if(!t)return null;var o=new t;return s.set(e,o),o}(e);if(l){var p=l.createGain(),d=l.createOscillator();d.type=void 0===a?"sine":a,d.frequency.value=u,p.gain.value=void 0===c?.1:c,d.connect(p),p.connect(l.destination),d.start(),d.stop(l.currentTime+(void 0===t?.1:t))}}function u(e){var n=s.get(e);n&&(s.delete(e),"closed"!==n.state&&n.close())}},19922:function(e){e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},20759:function(e){e.exports={newline:"ř\xe1dek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpozn\xe1n\xed Řeči",Sound:"Zvuk","Interim Results":"Průběžn\xe9 V\xfdsledky"}},22350:function(e){e.exports={newline:"Zeilenumbruch",delete:"l\xf6schen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},97509:function(e){e.exports={newline:"nueva l\xednea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},49668:function(e){e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},33276:function(e){e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"\xc4\xe4ni","Interim Results":"V\xe4litulokset"}},43517:function(e){e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"R\xe9sultats Interm\xe9diaires"}},8858:function(e){e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},22922:function(e){e.exports={newline:"\xfajsor",delete:"t\xf6rl\xe9s",space:"t\xe9r","Speech Recognize":"A Besz\xe9d Felismeri",Sound:"Hang","Interim Results":"Idők\xf6zi Eredm\xe9nyek"}},81900:function(e){e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},43219:function(e,n,t){"use strict";t.r(n),t.d(n,{ar:function(){return i},cs_cz:function(){return o},de:function(){return s},es:function(){return r},fa:function(){return u},fi:function(){return c},fr:function(){return a},he:function(){return l},hu:function(){return p},id:function(){return d},it:function(){return h},ja:function(){return f},ko:function(){return m},mn:function(){return _},nl:function(){return g},no:function(){return R},pl:function(){return v},pt_br:function(){return S},ru:function(){return z},sk:function(){return w},tr:function(){return y},ua:function(){return k},zh_cn:function(){return b},zh_tw:function(){return x}});var i=t(19922),o=t(20759),s=t(22350),r=t(97509),u=t(49668),c=t(33276),a=t(43517),l=t(8858),p=t(22922),d=t(81900),h=t(35420),f=t(18712),m=t(73363),_=t(74762),g=t(73759),R=t(72850),v=t(37161),S=t(62896),z=t(39996),w=t(62415),y=t(93423),k=t(10179),b=t(62547),x=t(29475)},35420:function(e){e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},18712:function(e){e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},73363:function(e){e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},74762:function(e){e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},73759:function(e){e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},72850:function(e){e.exports={newline:"nylinje",delete:"slette",space:"rom","Speech Recognize":"Talegjenkjenning",Sound:"Lyd","Interim Results":"Midlertidige resultater"}},37161:function(e){e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},62896:function(e){e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provis\xf3rios"}},39996:function(e){e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},62415:function(e){e.exports={newline:"nov\xfd riadok",delete:"vymazať",space:"medzera","Speech Recognize":"Rozpozn\xe1vanie reči",Sound:"Zvuk","Interim Results":"Predbežn\xe9 v\xfdsledky"}},93423:function(e){e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonu\xe7lar"}},10179:function(e){e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}},62547:function(e){e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},29475:function(e){e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},31262:function(e,n,t){"use strict";t.r(n),t.d(n,{SpeechRecognizeNative:function(){return R}});var i=t(69262),o=t(73104),s=t(53429),r=t(25045),u=t(34918),c=t(38574),a=t(31635),l=t(68616),p=t(23211),d=t(28077),h=t(71125),f=t(91206);t(75143);var m=t(73302),_=t(8962),g=t(43219),R=function(e){function n(){var e;return(0,o._)(this,n),e=(0,i._)(this,n,arguments),(0,r._)(e,"buttons",[{group:"state",name:"speechRecognize"}]),(0,r._)(e,"messagePopup",void 0),(0,r._)(e,"__hidePopupTimeout",void 0),(0,r._)(e,"_commandToWord",{}),e}return(0,u._)(n,e),(0,s._)(n,[{key:"afterInit",value:function(e){var n=this,t=e.o.speechRecognize.commands;t&&((0,d.extendLang)(g),(0,h.keys)(t,!1).forEach(function(i){i.split("|").forEach(function(o){o=o.trim().toLowerCase(),n._commandToWord[o]=t[i];var s=e.i18n(o);s!==o&&s.split("|").forEach(function(e){n._commandToWord[e.trim().toLowerCase()]=t[i].trim()})})}))}},{key:"beforeDestruct",value:function(e){p.Dom.safeRemove(this.messagePopup)}},{key:"onSpeechRecognizeProgressResult",value:function(e){var n=this;this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(function(){p.Dom.safeRemove(n.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}},{key:"onSpeechRecognizeResult",value:function(e){this.j.async.clearTimeout(this.__hidePopupTimeout),p.Dom.safeRemove(this.messagePopup);var n=this.j,t=n.s;if(!this._checkCommand(e)){var i=t.range,o=t.current();if(t.isCollapsed()&&p.Dom.isText(o)&&p.Dom.isOrContains(n.editor,o)&&o.nodeValue){var s=o.nodeValue;o.nodeValue=s+(/[\u00A0 ]\uFEFF*$/.test(s)?"":" ")+e,i.setStartAfter(o),t.selectRange(i),n.synchronizeValues()}else t.insertHTML(e)}}},{key:"_checkCommand",value:function(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,_.execSpellCommand)(this.j,this._commandToWord[e]),!0)}}]),n}((0,c._)(f.Plugin));(0,a.__decorate)([(0,l.watch)(":speechRecognizeProgressResult")],R.prototype,"onSpeechRecognizeProgressResult",null),(0,a.__decorate)([(0,l.watch)(":speechRecognizeResult")],R.prototype,"onSpeechRecognizeResult",null),m.Jodit.plugins.add("speech-recognize",R)},22227:function(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'}},function(e){return e(e.s=31262)}])});
8
+ !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var i in t)("object"==typeof exports?exports:e)[i]=t[i]}}(self,function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{75143:function(e,n,t){"use strict";var i=t(22289),o=t(85932),s=t(7909),r=t(36400),u=t(29434),c=t(5266),a=t(97743),l=t(68097),p=t(22227),d=t.n(p);c.Config.prototype.speechRecognize={api:void 0!==a.SpeechRecognition?a.SpeechRecognition:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},u.Icon.set("speech-recognize",d()),c.Config.prototype.controls.speechRecognize={isVisible:function(e){return!!e.o.speechRecognize.api},isActive:function(e,n){var t=(0,r.dataBind)(e,"speech");return!!(null==t?void 0:t.isEnabled)},isDisabled:function(e){return!e.o.speechRecognize.api},exec:function(e,n,t){var u=t.button,c=t.control,a=e.o.speechRecognize,p=a.api,d=a.lang,h=a.continuous,f=a.interimResults,m=a.sound;if(!p)return void e.alert("Speech recognize API unsupported in your browser");var _=(0,r.dataBind)(e,"speech");if(!_){var g,R=new p;(_=new l.RecognizeManager(e.async,R)).lang=(0,o.isString)(d)?d:null!=(g=(0,s.attr)(e.od.documentElement,"lang"))?g:void 0,_.continuous=h,_.interimResults=f,_.sound=m,(0,r.dataBind)(e,"speech",_),_.on("pulse",function(e){u.setMod("pulse",e)}),_.on("result",function(n){return e.e.fire("speechRecognizeResult",n)}),_.on("progress",function(n){return e.e.fire("speechRecognizeProgressResult",n)}),_.on("error",function(n){return e.message.error(n)}),e.hookStatus("beforeDestruct",function(){(0,r.dataBind)(e,"speech",null),_.destruct()})}if(c.args){var v=c.args[0];if((0,i.isBoolean)(_[v])){_[v]=!_[v],_.isEnabled&&_.restart();return}}_.toggle(),_.isEnabled&&u.setMod("pulse",!0),u.state.activated=_.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate:function(e,n,t){var i,o=(0,r.dataBind)(e,"speech"),s=null!=(i=null==o?void 0:o[n])?i:e.o.speechRecognize[n];return"<span class='jodit-speech-recognize__list-item'><input ".concat(s?"checked":""," class='jodit-checkbox' type='checkbox'>&nbsp;").concat(t,"</span>")},mods:{stroke:!1}}},94092:function(e,n,t){"use strict";t.d(n,{PII:function(){return i},WARN:function(){return o}});var i=440,o=940},97743:function(e,n,t){"use strict";t.d(n,{SpeechRecognition:function(){return o}});var i=t(81937),o=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0},8962:function(e,n,t){"use strict";t.d(n,{execSpellCommand:function(){return o}});var i=t(50684);function o(e,n){var t=(0,i._)(n.split("::"),2),o=t[0],s=t[1];"open"===o.toLowerCase()&&s&&/^(javascript:|data:|vbscript:)/i.test(s.trim())||e.execCommand(o,null,s)}},68097:function(e,n,t){"use strict";t.d(n,{RecognizeManager:function(){return m}});var i=t(69262),o=t(73104),s=t(53429),r=t(25045),u=t(22248),c=t(66773),a=t(34918),l=t(31635),p=t(84839),d=t(60216),h=t(32560),f=t(94092),m=function(e){function n(e,t){var s;return(0,o._)(this,n),s=(0,i._)(this,n),(0,r._)(s,"async",void 0),(0,r._)(s,"_lang",void 0),(0,r._)(s,"_continuous",void 0),(0,r._)(s,"_interimResults",void 0),(0,r._)(s,"sound",void 0),(0,r._)(s,"_isEnabled",void 0),(0,r._)(s,"_restartTimeout",void 0),(0,r._)(s,"_onSpeechStart",void 0),(0,r._)(s,"_api",void 0),(0,r._)(s,"__interimResults",void 0),s.async=e,s._continuous=!1,s._interimResults=!1,s.sound=!0,s._isEnabled=!1,s._restartTimeout=0,s._onSpeechStart=function(e){s._isEnabled&&(s.async.clearTimeout(s._restartTimeout),s._restartTimeout=s.async.setTimeout(function(){s.restart(),s.emit("pulse",!1),s._makeSound(f.WARN)},5e3),s.emit("pulse",!0))},s.__interimResults="",s._api=t,n._instances.add(s),s}return(0,a._)(n,e),(0,s._)(n,[{key:"lang",get:function(){return this._lang},set:function(e){this._lang=e,this._api.lang=e}},{key:"continuous",get:function(){return this._continuous},set:function(e){this._continuous=e,this._api.continuous=e}},{key:"interimResults",get:function(){return this._interimResults},set:function(e){this._interimResults=e,this._api.interimResults=e}},{key:"destruct",value:function(){this.stop(),(0,h.closeSound)(this),n._instances.delete(this),(0,u._)((0,c._)(n.prototype),"destruct",this).call(this)}},{key:"isEnabled",get:function(){return this._isEnabled}},{key:"start",value:function(){var e=this;if(!this._isEnabled){this._isEnabled=!0,n._instances.forEach(function(n){n!==e&&n.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}},{key:"stop",value:function(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}},{key:"toggle",value:function(){this._isEnabled?this.stop():this.start()}},{key:"restart",value:function(){this.stop(),this.start()}},{key:"__on",value:function(e,n){return this._api.addEventListener(e,n),this}},{key:"__off",value:function(e,n){return this._api.removeEventListener(e,n),this}},{key:"_onResults",value:function(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(f.PII),this.restart()}},{key:"_onProgress",value:function(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(var n=0;n<e.results.length;n++){var t=e.results.item(n);if(t.length){var i=t.item(0).transcript;this.__interimResults+=i}}this.__interimResults&&this.emit("progress",this.__interimResults)}}},{key:"_onError",value:function(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),("language-unavailable"===e.error||"language-not-supported"===e.error)&&this.emit("error","Language unavailable"),this._makeSound(f.WARN),this.emit("pulse",!1),this.stop()}},{key:"_makeSound",value:function(e){this.sound&&(0,h.sound)(this,{frequency:e})}}]),n}(d.Eventify);(0,r._)(m,"_instances",new Set),(0,l.__decorate)([p.autobind],m.prototype,"_onResults",null),(0,l.__decorate)([p.autobind],m.prototype,"_onProgress",null),(0,l.__decorate)([p.autobind],m.prototype,"_onError",null)},32560:function(e,n,t){"use strict";t.d(n,{closeSound:function(){return u},sound:function(){return r}});var i=t(81937),o=t(94092),s=new WeakMap;function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.sec,r=n.frequency,u=void 0===r?o.PII:r,c=n.gain,a=n.type,l=function(e){if(!i.globalWindow)return null;var n=s.get(e);if(n&&"closed"!==n.state)return n;var t=i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext;if(!t)return null;var o=new t;return s.set(e,o),o}(e);if(l){var p=l.createGain(),d=l.createOscillator();d.type=void 0===a?"sine":a,d.frequency.value=u,p.gain.value=void 0===c?.1:c,d.connect(p),p.connect(l.destination),d.start(),d.stop(l.currentTime+(void 0===t?.1:t))}}function u(e){var n=s.get(e);n&&(s.delete(e),"closed"!==n.state&&n.close())}},19922:function(e){e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},20759:function(e){e.exports={newline:"ř\xe1dek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpozn\xe1n\xed Řeči",Sound:"Zvuk","Interim Results":"Průběžn\xe9 V\xfdsledky"}},22350:function(e){e.exports={newline:"Zeilenumbruch",delete:"l\xf6schen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},97509:function(e){e.exports={newline:"nueva l\xednea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},49668:function(e){e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},33276:function(e){e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"\xc4\xe4ni","Interim Results":"V\xe4litulokset"}},43517:function(e){e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"R\xe9sultats Interm\xe9diaires"}},8858:function(e){e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},22922:function(e){e.exports={newline:"\xfajsor",delete:"t\xf6rl\xe9s",space:"t\xe9r","Speech Recognize":"A Besz\xe9d Felismeri",Sound:"Hang","Interim Results":"Idők\xf6zi Eredm\xe9nyek"}},81900:function(e){e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},43219:function(e,n,t){"use strict";t.r(n),t.d(n,{ar:function(){return i},cs_cz:function(){return o},de:function(){return s},es:function(){return r},fa:function(){return u},fi:function(){return c},fr:function(){return a},he:function(){return l},hu:function(){return p},id:function(){return d},it:function(){return h},ja:function(){return f},ko:function(){return m},mn:function(){return _},nl:function(){return g},no:function(){return R},pl:function(){return v},pt_br:function(){return S},ru:function(){return z},sk:function(){return w},tr:function(){return y},ua:function(){return k},zh_cn:function(){return b},zh_tw:function(){return x}});var i=t(19922),o=t(20759),s=t(22350),r=t(97509),u=t(49668),c=t(33276),a=t(43517),l=t(8858),p=t(22922),d=t(81900),h=t(35420),f=t(18712),m=t(73363),_=t(74762),g=t(73759),R=t(72850),v=t(37161),S=t(62896),z=t(39996),w=t(62415),y=t(93423),k=t(10179),b=t(62547),x=t(29475)},35420:function(e){e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},18712:function(e){e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},73363:function(e){e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},74762:function(e){e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},73759:function(e){e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},72850:function(e){e.exports={newline:"nylinje",delete:"slette",space:"rom","Speech Recognize":"Talegjenkjenning",Sound:"Lyd","Interim Results":"Midlertidige resultater"}},37161:function(e){e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},62896:function(e){e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provis\xf3rios"}},39996:function(e){e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},62415:function(e){e.exports={newline:"nov\xfd riadok",delete:"vymazať",space:"medzera","Speech Recognize":"Rozpozn\xe1vanie reči",Sound:"Zvuk","Interim Results":"Predbežn\xe9 v\xfdsledky"}},93423:function(e){e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonu\xe7lar"}},10179:function(e){e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}},62547:function(e){e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},29475:function(e){e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},31262:function(e,n,t){"use strict";t.r(n),t.d(n,{SpeechRecognizeNative:function(){return R}});var i=t(69262),o=t(73104),s=t(53429),r=t(25045),u=t(34918),c=t(31635),a=t(38574),l=t(68616),p=t(23211),d=t(28077),h=t(71125),f=t(91206);t(75143);var m=t(73302),_=t(8962),g=t(43219),R=function(e){function n(){var e;return(0,o._)(this,n),e=(0,i._)(this,n,arguments),(0,r._)(e,"buttons",[{group:"state",name:"speechRecognize"}]),(0,r._)(e,"messagePopup",void 0),(0,r._)(e,"__hidePopupTimeout",void 0),(0,r._)(e,"_commandToWord",{}),e}return(0,u._)(n,e),(0,s._)(n,[{key:"afterInit",value:function(e){var n=this,t=e.o.speechRecognize.commands;t&&((0,d.extendLang)(g),(0,h.keys)(t,!1).forEach(function(i){i.split("|").forEach(function(o){o=o.trim().toLowerCase(),n._commandToWord[o]=t[i];var s=e.i18n(o);s!==o&&s.split("|").forEach(function(e){n._commandToWord[e.trim().toLowerCase()]=t[i].trim()})})}))}},{key:"beforeDestruct",value:function(e){p.Dom.safeRemove(this.messagePopup)}},{key:"onSpeechRecognizeProgressResult",value:function(e){var n=this;this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(function(){p.Dom.safeRemove(n.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}},{key:"onSpeechRecognizeResult",value:function(e){this.j.async.clearTimeout(this.__hidePopupTimeout),p.Dom.safeRemove(this.messagePopup);var n=this.j,t=n.s;if(!this._checkCommand(e)){var i=t.range,o=t.current();if(t.isCollapsed()&&p.Dom.isText(o)&&p.Dom.isOrContains(n.editor,o)&&o.nodeValue){var s=o.nodeValue;o.nodeValue=s+(/[\u00A0 ]\uFEFF*$/.test(s)?"":" ")+e,i.setStartAfter(o),t.selectRange(i),n.synchronizeValues()}else t.insertHTML(e)}}},{key:"_checkCommand",value:function(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,_.execSpellCommand)(this.j,this._commandToWord[e]),!0)}}]),n}((0,a._)(f.Plugin));(0,c.__decorate)([(0,l.watch)(":speechRecognizeProgressResult")],R.prototype,"onSpeechRecognizeProgressResult",null),(0,c.__decorate)([(0,l.watch)(":speechRecognizeResult")],R.prototype,"onSpeechRecognizeResult",null),m.Jodit.plugins.add("speech-recognize",R)},22227:function(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'}},function(e){return e(e.s=31262)}])});
@@ -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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/es5/polyfills.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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -201,11 +201,10 @@ module.exports = (__webpack_require__(29100).polyfill)();
201
201
  /***/ (function(module, exports, __webpack_require__) {
202
202
 
203
203
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _instanceof(left, right) {
204
+ "@swc/helpers - instanceof";
204
205
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
205
206
  return !!right[Symbol.hasInstance](left);
206
- } else {
207
- return left instanceof right;
208
- }
207
+ } else return left instanceof right;
209
208
  }
210
209
  function _type_of(obj) {
211
210
  "@swc/helpers - typeof";
@@ -1602,11 +1601,10 @@ module.exports = function(METHOD_NAME) {
1602
1601
  "use strict";
1603
1602
 
1604
1603
  function _instanceof(left, right) {
1604
+ "@swc/helpers - instanceof";
1605
1605
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
1606
1606
  return !!right[Symbol.hasInstance](left);
1607
- } else {
1608
- return left instanceof right;
1609
- }
1607
+ } else return left instanceof right;
1610
1608
  }
1611
1609
  var DESCRIPTORS = __webpack_require__(17158);
1612
1610
  var isArray = __webpack_require__(40554);
@@ -3463,11 +3461,10 @@ exports.f = Object.getOwnPropertySymbols;
3463
3461
  "use strict";
3464
3462
 
3465
3463
  function _instanceof(left, right) {
3464
+ "@swc/helpers - instanceof";
3466
3465
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3467
3466
  return !!right[Symbol.hasInstance](left);
3468
- } else {
3469
- return left instanceof right;
3470
- }
3467
+ } else return left instanceof right;
3471
3468
  }
3472
3469
  var hasOwn = __webpack_require__(26419);
3473
3470
  var isCallable = __webpack_require__(14595);
@@ -3576,11 +3573,10 @@ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
3576
3573
  "use strict";
3577
3574
 
3578
3575
  function _instanceof(left, right) {
3576
+ "@swc/helpers - instanceof";
3579
3577
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3580
3578
  return !!right[Symbol.hasInstance](left);
3581
- } else {
3582
- return left instanceof right;
3583
- }
3579
+ } else return left instanceof right;
3584
3580
  }
3585
3581
  /* eslint-disable no-proto -- safe */ var uncurryThisAccessor = __webpack_require__(60288);
3586
3582
  var isObject = __webpack_require__(78144);
@@ -3874,11 +3870,10 @@ module.exports = {
3874
3870
  "use strict";
3875
3871
 
3876
3872
  function _instanceof(left, right) {
3873
+ "@swc/helpers - instanceof";
3877
3874
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3878
3875
  return !!right[Symbol.hasInstance](left);
3879
- } else {
3880
- return left instanceof right;
3881
- }
3876
+ } else return left instanceof right;
3882
3877
  }
3883
3878
  /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = __webpack_require__(1669);
3884
3879
  var fails = __webpack_require__(96673);
@@ -4671,11 +4666,10 @@ defineWellKnownSymbol('asyncIterator');
4671
4666
  "use strict";
4672
4667
 
4673
4668
  function _instanceof(left, right) {
4669
+ "@swc/helpers - instanceof";
4674
4670
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
4675
4671
  return !!right[Symbol.hasInstance](left);
4676
- } else {
4677
- return left instanceof right;
4678
- }
4672
+ } else return left instanceof right;
4679
4673
  }
4680
4674
  var $ = __webpack_require__(50300);
4681
4675
  var globalThis = __webpack_require__(75058);
@@ -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.18
4
+ * Version: v4.13.20
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -3,7 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- export const APP_VERSION = "4.13.18";
6
+ export const APP_VERSION = "4.13.20";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -66,6 +66,7 @@ export declare class ToolbarButton<T extends IViewBased = IViewBased> extends UI
66
66
  * Click on trigger button
67
67
  */
68
68
  protected onTriggerClick(e: MouseEvent): void;
69
+ protected onTriggerKeyDown(e: KeyboardEvent): void;
69
70
  private openedPopup;
70
71
  /**
71
72
  * Create an open popup list
@@ -14,6 +14,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
14
14
  return c > 3 && r && Object.defineProperty(target, key, r), r;
15
15
  };
16
16
  import { STATUSES } from "../../../core/component/statuses.js";
17
+ import { KEY_ENTER, KEY_SPACE } from "../../../core/constants.js";
17
18
  import { autobind } from "../../../core/decorators/autobind/autobind.js";
18
19
  import { cacheHTML } from "../../../core/decorators/cache/cache.js";
19
20
  import { component, getComponentClass } from "../../../core/decorators/component/component.js";
@@ -118,6 +119,7 @@ let ToolbarButton = class ToolbarButton extends UIButton {
118
119
  }
119
120
  onChangeTabIndex() {
120
121
  attr(this.button, 'tabindex', this.state.tabIndex);
122
+ attr(this.trigger, 'tabindex', this.state.tabIndex);
121
123
  }
122
124
  createContainer() {
123
125
  const cn = this.componentName;
@@ -287,6 +289,14 @@ let ToolbarButton = class ToolbarButton extends UIButton {
287
289
  this.j.e.fire(camelCase(`after-${ctr.name}-open-popup`), popup.container);
288
290
  }
289
291
  }
292
+ onTriggerKeyDown(e) {
293
+ if (this.state.disabled ||
294
+ ![KEY_ENTER, KEY_SPACE, ' '].includes(e.key)) {
295
+ return;
296
+ }
297
+ e.preventDefault();
298
+ this.trigger.click();
299
+ }
290
300
  /**
291
301
  * Create an open popup list
292
302
  */
@@ -439,6 +449,9 @@ __decorate([
439
449
  __decorate([
440
450
  watch('trigger:click')
441
451
  ], ToolbarButton.prototype, "onTriggerClick", null);
452
+ __decorate([
453
+ watch('trigger:keydown')
454
+ ], ToolbarButton.prototype, "onTriggerKeyDown", null);
442
455
  __decorate([
443
456
  autobind
444
457
  ], ToolbarButton.prototype, "onOutsideClick", null);
@@ -72,11 +72,28 @@ let UISearch = class UISearch extends UIElement {
72
72
  this.replaceButton = replaceBtn;
73
73
  this.currentBox = current;
74
74
  this.countBox = count;
75
+ const closeAction = () => this.close();
76
+ const replaceAction = () => void jodit.e.fire(this, 'pressReplaceButton');
77
+ const nextAction = () => void jodit.e.fire('searchNext');
78
+ const prevAction = () => void jodit.e.fire('searchPrevious');
79
+ // Pointer activation is handled on `pointerdown` (returning `false`
80
+ // there keeps the focus and selection intact), but activating a
81
+ // native button from the keyboard (Enter/Space) fires only `click`
82
+ // with `detail === 0` — handle that path separately. Pointer clicks
83
+ // arrive with `detail >= 1`, so the action does not run twice.
84
+ // See https://github.com/xdan/jodit/issues/1440
85
+ const onKeyboardActivate = (action) => (e) => {
86
+ if (!e.detail) {
87
+ e.preventDefault();
88
+ action();
89
+ }
90
+ };
75
91
  jodit.e
76
92
  .on(this.closeButton, 'pointerdown', () => {
77
- this.close();
93
+ closeAction();
78
94
  return false;
79
95
  })
96
+ .on(this.closeButton, 'click', onKeyboardActivate(closeAction))
80
97
  .on(this.queryInput, 'input', () => {
81
98
  this.currentIndex = 0;
82
99
  })
@@ -87,17 +104,20 @@ let UISearch = class UISearch extends UIElement {
87
104
  }
88
105
  })
89
106
  .on(this.replaceButton, 'pointerdown', () => {
90
- jodit.e.fire(this, 'pressReplaceButton');
107
+ replaceAction();
91
108
  return false;
92
109
  })
110
+ .on(this.replaceButton, 'click', onKeyboardActivate(replaceAction))
93
111
  .on(next, 'pointerdown', () => {
94
- void jodit.e.fire('searchNext');
112
+ nextAction();
95
113
  return false;
96
114
  })
115
+ .on(next, 'click', onKeyboardActivate(nextAction))
97
116
  .on(prev, 'pointerdown', () => {
98
- jodit.e.fire('searchPrevious');
117
+ prevAction();
99
118
  return false;
100
119
  })
120
+ .on(prev, 'click', onKeyboardActivate(prevAction))
101
121
  .on(this.queryInput, 'input', () => {
102
122
  this.setMod('empty-query', !trim(this.queryInput.value).length);
103
123
  })
@@ -3,6 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ import { KEY_DOWN, KEY_ENTER, KEY_ESC, KEY_LEFT, KEY_RIGHT, KEY_UP } from "../../core/constants.js";
6
7
  import { Dom } from "../../core/dom/index.js";
7
8
  import { $$, css, scrollIntoViewIfNeeded } from "../../core/helpers/index.js";
8
9
  import { attr } from "../../core/helpers/utils/index.js";
@@ -55,21 +56,25 @@ Config.prototype.controls.table = {
55
56
  '</label>' +
56
57
  '</form>'), rows = form.querySelectorAll('span')[0], cols = form.querySelectorAll('span')[1], blocksContainer = form.querySelector('.jodit-form__container'), options = form.querySelector('.jodit-form__options'), cells = [];
57
58
  const cnt = default_rows_count * default_cols_count;
59
+ attr(blocksContainer, {
60
+ role: 'grid',
61
+ ariaLabel: 'Table size',
62
+ ariaRowcount: default_rows_count,
63
+ ariaColcount: default_cols_count
64
+ });
58
65
  for (let i = 0; i < cnt; i += 1) {
59
66
  if (!cells[i]) {
67
+ const row = Math.floor(i / default_cols_count) + 1, col = (i % default_cols_count) + 1;
60
68
  cells.push(editor.c.element('span', {
61
- dataIndex: i
69
+ dataIndex: i,
70
+ role: 'gridcell',
71
+ tabindex: i === 0 ? 0 : -1,
72
+ ariaLabel: `${row} by ${col}`
62
73
  }));
63
74
  }
64
75
  }
65
- const mouseenter = (e, index) => {
66
- const dv = e.target;
67
- if (!Dom.isTag(dv, 'span')) {
68
- return;
69
- }
70
- const k = index === undefined || isNaN(index)
71
- ? parseInt(attr(dv, '-index') || '0', 10)
72
- : index || 0;
76
+ const highlightCell = (cell) => {
77
+ const k = parseInt(attr(cell, '-index') || '0', 10);
73
78
  const rows_count = Math.ceil((k + 1) / default_cols_count), cols_count = (k % default_cols_count) + 1;
74
79
  for (let i = 0; i < cells.length; i += 1) {
75
80
  if (cols_count >= (i % default_cols_count) + 1 &&
@@ -83,16 +88,8 @@ Config.prototype.controls.table = {
83
88
  cols.textContent = cols_count.toString();
84
89
  rows.textContent = rows_count.toString();
85
90
  };
86
- editor.e
87
- .on(blocksContainer, 'mousemove', mouseenter)
88
- .on(blocksContainer, 'touchstart mousedown', (e) => {
89
- const dv = e.target;
90
- e.preventDefault();
91
- e.stopImmediatePropagation();
92
- if (!Dom.isTag(dv, 'span')) {
93
- return;
94
- }
95
- const k = parseInt(attr(dv, '-index') || '0', 10);
91
+ const insertTable = (cell) => {
92
+ const k = parseInt(attr(cell, '-index') || '0', 10);
96
93
  const rows_count = Math.ceil((k + 1) / default_cols_count), cols_count = (k % default_cols_count) + 1;
97
94
  const crt = editor.createInside, tbody = crt.element('tbody'), table = crt.element('table');
98
95
  table.appendChild(tbody);
@@ -159,10 +156,73 @@ Config.prototype.controls.table = {
159
156
  scrollIntoViewIfNeeded(first_td, editor.editor, editor.ed);
160
157
  }
161
158
  close();
159
+ };
160
+ editor.e
161
+ .on(blocksContainer, 'mousemove', (e) => {
162
+ if (Dom.isTag(e.target, 'span')) {
163
+ highlightCell(e.target);
164
+ }
165
+ })
166
+ .on(blocksContainer, 'touchstart mousedown', (e) => {
167
+ if (!Dom.isTag(e.target, 'span')) {
168
+ return;
169
+ }
170
+ e.preventDefault();
171
+ e.stopImmediatePropagation();
172
+ insertTable(e.target);
173
+ })
174
+ .on(blocksContainer, 'keydown', (e) => {
175
+ if (!Dom.isTag(e.target, 'span')) {
176
+ return;
177
+ }
178
+ if (e.key === KEY_ENTER) {
179
+ e.preventDefault();
180
+ e.stopImmediatePropagation();
181
+ insertTable(e.target);
182
+ return;
183
+ }
184
+ if (e.key === KEY_ESC) {
185
+ e.preventDefault();
186
+ e.stopImmediatePropagation();
187
+ close();
188
+ return;
189
+ }
190
+ const index = parseInt(attr(e.target, '-index') || '0', 10), row = Math.floor(index / default_cols_count), col = index % default_cols_count;
191
+ let nextIndex = index;
192
+ switch (e.key) {
193
+ case KEY_LEFT:
194
+ nextIndex = col > 0 ? index - 1 : index;
195
+ break;
196
+ case KEY_RIGHT:
197
+ nextIndex =
198
+ col < default_cols_count - 1 ? index + 1 : index;
199
+ break;
200
+ case KEY_UP:
201
+ nextIndex =
202
+ row > 0 ? index - default_cols_count : index;
203
+ break;
204
+ case KEY_DOWN:
205
+ nextIndex =
206
+ row < default_rows_count - 1
207
+ ? index + default_cols_count
208
+ : index;
209
+ break;
210
+ default:
211
+ return;
212
+ }
213
+ e.preventDefault();
214
+ e.stopImmediatePropagation();
215
+ if (nextIndex !== index) {
216
+ cells[index].tabIndex = -1;
217
+ cells[nextIndex].tabIndex = 0;
218
+ cells[nextIndex].focus();
219
+ highlightCell(cells[nextIndex]);
220
+ }
162
221
  });
163
222
  if (button && button.parentElement) {
164
223
  for (let i = 0; i < default_rows_count; i += 1) {
165
224
  const row = editor.c.div();
225
+ attr(row, 'role', 'row');
166
226
  for (let j = 0; j < default_cols_count; j += 1) {
167
227
  row.appendChild(cells[i * default_cols_count + j]);
168
228
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.13.18",
3
+ "version": "4.13.20",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -66,6 +66,7 @@ export declare class ToolbarButton<T extends IViewBased = IViewBased> extends UI
66
66
  * Click on trigger button
67
67
  */
68
68
  protected onTriggerClick(e: MouseEvent): void;
69
+ protected onTriggerKeyDown(e: KeyboardEvent): void;
69
70
  private openedPopup;
70
71
  /**
71
72
  * Create an open popup list