jodit 4.7.5 → 4.7.6
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.
- package/CHANGELOG.md +41 -0
- package/README.md +4 -18
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +8 -8
- package/es2015/jodit.js +85 -137
- package/es2015/jodit.min.js +7 -7
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.fat.min.js +8 -8
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +9 -9
- package/es2021/jodit.js +85 -137
- package/es2021/jodit.min.js +8 -8
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +10 -10
- package/es2021.en/jodit.js +85 -137
- package/es2021.en/jodit.min.js +9 -9
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +86 -141
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +9 -3
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/decorators/autobind/autobind.d.ts +19 -1
- package/esm/core/decorators/autobind/autobind.js +40 -1
- package/esm/modules/file-browser/data-provider.js +2 -17
- package/esm/plugins/resize-handler/resize-handler.js +10 -5
- package/esm/plugins/size/size.js +8 -6
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +13 -9
- package/esm/tsconfig.json +1 -1
- package/package.json +1 -1
- package/types/core/decorators/autobind/autobind.d.ts +19 -1
- package/types/tsconfig.json +1 -1
|
@@ -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.7.
|
|
4
|
+
* Version: v4.7.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -891,9 +891,15 @@ var RecognizeManager = /*#__PURE__*/ function(Eventify) {
|
|
|
891
891
|
return RecognizeManager;
|
|
892
892
|
}(jodit_core_event_emitter_eventify__WEBPACK_IMPORTED_MODULE_9__.Eventify);
|
|
893
893
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(RecognizeManager, "_instances", new Set());
|
|
894
|
-
|
|
894
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
895
895
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
896
|
-
], RecognizeManager);
|
|
896
|
+
], RecognizeManager.prototype, "_onResults", null);
|
|
897
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
898
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
899
|
+
], RecognizeManager.prototype, "_onProgress", null);
|
|
900
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
901
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
|
|
902
|
+
], RecognizeManager.prototype, "_onError", null);
|
|
897
903
|
|
|
898
904
|
|
|
899
905
|
/***/ }),
|
|
@@ -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.7.
|
|
4
|
+
* Version: v4.7.6
|
|
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],{8858:function(e){e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},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];e.execCommand(o,null,s)}},10179:function(e){e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}},18712:function(e){e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},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"}},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>'},22350:function(e){e.exports={newline:"Zeilenumbruch",delete:"l\xf6schen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},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"}},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)},32560:function(e,n,t){"use strict";t.d(n,{sound:function(){return s}});var i=t(81937),o=t(94092);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.sec,t=e.frequency,s=void 0===t?o.PII:t,r=e.gain,u=e.type;if(i.globalWindow&&(void 0!==i.globalWindow.AudioContext||void 0!==i.globalWindow.webkitAudioContext)){var c=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),a=c.createGain(),l=c.createOscillator();l.type=void 0===u?"sine":u,l.frequency.value=s,l.connect(a),a.connect(c.destination),l.start(),l.stop(c.currentTime+(void 0===n?.1:n)),a.gain.value=void 0===r?.1:r}}},33276:function(e){e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"\xc4\xe4ni","Interim Results":"V\xe4litulokset"}},35420:function(e){e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},37161:function(e){e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},39996:function(e){e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},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},tr:function(){return w},ua:function(){return y},zh_cn:function(){return k},zh_tw:function(){return b}});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(93423),y=t(10179),k=t(62547),b=t(29475)},43517:function(e){e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"R\xe9sultats Interm\xe9diaires"}},49668: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":"中期业绩"}},62896:function(e){e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provis\xf3rios"}},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(),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)({frequency:e})}}]),n}(d.Eventify);(0,r._)(m,"_instances",new Set),m=(0,l.__decorate)([p.autobind],m)},72850:function(e){e.exports={newline:"nylinje",delete:"slette",space:"rom","Speech Recognize":"Talegjenkjenning",Sound:"Lyd","Interim Results":"Midlertidige resultater"}},73363: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"}},74762:function(e){e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},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)}),u.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'> ").concat(t,"</span>")},mods:{stroke:!1}}},81900:function(e){e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},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"}},94092:function(e,n,t){"use strict";t.d(n,{PII:function(){return i},WARN:function(){return o}});var i=440,o=940},97509:function(e){e.exports={newline:"nueva l\xednea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},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}},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],{8858:function(e){e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},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];e.execCommand(o,null,s)}},10179:function(e){e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}},18712:function(e){e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},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"}},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>'},22350:function(e){e.exports={newline:"Zeilenumbruch",delete:"l\xf6schen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},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"}},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)},32560:function(e,n,t){"use strict";t.d(n,{sound:function(){return s}});var i=t(81937),o=t(94092);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.sec,t=e.frequency,s=void 0===t?o.PII:t,r=e.gain,u=e.type;if(i.globalWindow&&(void 0!==i.globalWindow.AudioContext||void 0!==i.globalWindow.webkitAudioContext)){var c=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),a=c.createGain(),l=c.createOscillator();l.type=void 0===u?"sine":u,l.frequency.value=s,l.connect(a),a.connect(c.destination),l.start(),l.stop(c.currentTime+(void 0===n?.1:n)),a.gain.value=void 0===r?.1:r}}},33276:function(e){e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"\xc4\xe4ni","Interim Results":"V\xe4litulokset"}},35420:function(e){e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},37161:function(e){e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},39996:function(e){e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},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},tr:function(){return w},ua:function(){return y},zh_cn:function(){return k},zh_tw:function(){return b}});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(93423),y=t(10179),k=t(62547),b=t(29475)},43517:function(e){e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"R\xe9sultats Interm\xe9diaires"}},49668: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":"中期业绩"}},62896:function(e){e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provis\xf3rios"}},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(),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)({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)},72850:function(e){e.exports={newline:"nylinje",delete:"slette",space:"rom","Speech Recognize":"Talegjenkjenning",Sound:"Lyd","Interim Results":"Midlertidige resultater"}},73363: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"}},74762:function(e){e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},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)}),u.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'> ").concat(t,"</span>")},mods:{stroke:!1}}},81900:function(e){e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},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"}},94092:function(e,n,t){"use strict";t.d(n,{PII:function(){return i},WARN:function(){return o}});var i=440,o=940},97509:function(e){e.exports={newline:"nueva l\xednea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},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}},function(e){return e(e.s=31262)}])});
|
package/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
package/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.7.
|
|
6
|
+
export const APP_VERSION = "4.7.6";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -8,4 +8,22 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module decorators/autobind
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Decorator that automatically binds a method to its class instance.
|
|
13
|
+
* This is useful when passing methods as callbacks to preserve the correct `this` context.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* class MyComponent {
|
|
18
|
+
* @autobind
|
|
19
|
+
* handleClick() {
|
|
20
|
+
* console.log(this); // Always refers to MyComponent instance
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* const component = new MyComponent();
|
|
25
|
+
* const button = document.createElement('button');
|
|
26
|
+
* button.addEventListener('click', component.handleClick); // `this` is correctly bound
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function autobind(_target: object, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
@@ -3,9 +3,48 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
import { isFunction } from "../../helpers/checker/is-function.js";
|
|
6
7
|
/**
|
|
7
8
|
* [[include:core/decorators/autobind/README.md]]
|
|
8
9
|
* @packageDocumentation
|
|
9
10
|
* @module decorators/autobind
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Decorator that automatically binds a method to its class instance.
|
|
14
|
+
* This is useful when passing methods as callbacks to preserve the correct `this` context.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* class MyComponent {
|
|
19
|
+
* @autobind
|
|
20
|
+
* handleClick() {
|
|
21
|
+
* console.log(this); // Always refers to MyComponent instance
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* const component = new MyComponent();
|
|
26
|
+
* const button = document.createElement('button');
|
|
27
|
+
* button.addEventListener('click', component.handleClick); // `this` is correctly bound
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export function autobind(_target, propertyKey, descriptor) {
|
|
31
|
+
if (!isFunction(descriptor.value)) {
|
|
32
|
+
throw new TypeError(`@autobind can only be applied to methods, but "${propertyKey}" is not a function`);
|
|
33
|
+
}
|
|
34
|
+
const originalMethod = descriptor.value;
|
|
35
|
+
return {
|
|
36
|
+
configurable: true,
|
|
37
|
+
get() {
|
|
38
|
+
// Create a bound version of the method and cache it on the instance
|
|
39
|
+
const boundMethod = originalMethod.bind(this);
|
|
40
|
+
// Define the bound method as a property on the instance
|
|
41
|
+
// This ensures the same bound function is returned on subsequent accesses
|
|
42
|
+
Object.defineProperty(this, propertyKey, {
|
|
43
|
+
value: boundMethod,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true
|
|
46
|
+
});
|
|
47
|
+
return boundMethod;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -3,18 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
9
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
-
else
|
|
11
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
12
|
-
if (d = decorators[i])
|
|
13
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
-
};
|
|
16
6
|
import { IS_PROD } from "../../core/constants.js";
|
|
17
|
-
import { autobind } from "../../core/decorators/index.js";
|
|
18
7
|
import { abort, ConfigProto, error, isFunction, normalizeRelativePath, set } from "../../core/helpers/index.js";
|
|
19
8
|
import { Ajax } from "../../core/request/index.js";
|
|
20
9
|
import { FileBrowserItem } from "./builders/item.js";
|
|
@@ -34,7 +23,7 @@ const possibleRules = new Set([
|
|
|
34
23
|
'allowImageResize',
|
|
35
24
|
'allowImageCrop'
|
|
36
25
|
]);
|
|
37
|
-
|
|
26
|
+
export default class DataProvider {
|
|
38
27
|
constructor(parent, options) {
|
|
39
28
|
this.parent = parent;
|
|
40
29
|
this.options = options;
|
|
@@ -396,8 +385,4 @@ let DataProvider = class DataProvider {
|
|
|
396
385
|
this.__ajaxInstances.forEach(a => a.destruct());
|
|
397
386
|
this.__ajaxInstances.clear();
|
|
398
387
|
}
|
|
399
|
-
}
|
|
400
|
-
DataProvider = __decorate([
|
|
401
|
-
autobind
|
|
402
|
-
], DataProvider);
|
|
403
|
-
export default DataProvider;
|
|
388
|
+
}
|
|
@@ -19,7 +19,7 @@ import { pluginSystem } from "../../core/global.js";
|
|
|
19
19
|
import { Plugin } from "../../core/plugin/index.js";
|
|
20
20
|
import { Icon } from "../../core/ui/index.js";
|
|
21
21
|
import "./config.js";
|
|
22
|
-
|
|
22
|
+
export class resizeHandler extends Plugin {
|
|
23
23
|
constructor() {
|
|
24
24
|
super(...arguments);
|
|
25
25
|
/**
|
|
@@ -104,11 +104,16 @@ let resizeHandler = class resizeHandler extends Plugin {
|
|
|
104
104
|
Dom.safeRemove(this.handle);
|
|
105
105
|
this.j.e.off(this.j.ow, 'mouseup touchsend', this.onHandleResizeEnd);
|
|
106
106
|
}
|
|
107
|
-
}
|
|
107
|
+
}
|
|
108
108
|
/** @override **/
|
|
109
109
|
resizeHandler.requires = ['size'];
|
|
110
|
-
|
|
110
|
+
__decorate([
|
|
111
|
+
autobind
|
|
112
|
+
], resizeHandler.prototype, "onHandleResizeStart", null);
|
|
113
|
+
__decorate([
|
|
114
|
+
autobind
|
|
115
|
+
], resizeHandler.prototype, "onHandleResize", null);
|
|
116
|
+
__decorate([
|
|
111
117
|
autobind
|
|
112
|
-
], resizeHandler);
|
|
113
|
-
export { resizeHandler };
|
|
118
|
+
], resizeHandler.prototype, "onHandleResizeEnd", null);
|
|
114
119
|
pluginSystem.add('resizeHandler', resizeHandler);
|
package/esm/plugins/size/size.js
CHANGED
|
@@ -22,7 +22,7 @@ import "./config.js";
|
|
|
22
22
|
/**
|
|
23
23
|
* Calculate sizes for editor workspace and handle setHeight and setWidth events
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
export class size extends Plugin {
|
|
26
26
|
constructor() {
|
|
27
27
|
super(...arguments);
|
|
28
28
|
/**
|
|
@@ -160,15 +160,17 @@ let size = class size extends Plugin {
|
|
|
160
160
|
.off(jodit.ow, 'load.size', this.__resizeWorkspaces)
|
|
161
161
|
.off('.size');
|
|
162
162
|
}
|
|
163
|
-
}
|
|
163
|
+
}
|
|
164
164
|
__decorate([
|
|
165
165
|
throttle()
|
|
166
166
|
], size.prototype, "__initialize", null);
|
|
167
167
|
__decorate([
|
|
168
168
|
autobind
|
|
169
|
-
], size.prototype, "
|
|
170
|
-
|
|
169
|
+
], size.prototype, "__setHeight", null);
|
|
170
|
+
__decorate([
|
|
171
171
|
autobind
|
|
172
|
-
], size);
|
|
173
|
-
|
|
172
|
+
], size.prototype, "__setWidth", null);
|
|
173
|
+
__decorate([
|
|
174
|
+
autobind
|
|
175
|
+
], size.prototype, "__resizeWorkspaceImd", null);
|
|
174
176
|
pluginSystem.add('size', size);
|
|
@@ -13,12 +13,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
13
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
14
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
15
|
};
|
|
16
|
-
var RecognizeManager_1;
|
|
17
16
|
import { autobind } from "../../../core/decorators/index.js";
|
|
18
17
|
import { Eventify } from "../../../core/event-emitter/eventify.js";
|
|
19
18
|
import { sound } from "./sound.js";
|
|
20
19
|
import { PII, WARN } from "../constants.js";
|
|
21
|
-
|
|
20
|
+
export class RecognizeManager extends Eventify {
|
|
22
21
|
set lang(v) {
|
|
23
22
|
this._lang = v;
|
|
24
23
|
this._api.lang = v;
|
|
@@ -62,11 +61,11 @@ let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends Event
|
|
|
62
61
|
};
|
|
63
62
|
this.__interimResults = '';
|
|
64
63
|
this._api = api;
|
|
65
|
-
|
|
64
|
+
RecognizeManager._instances.add(this);
|
|
66
65
|
}
|
|
67
66
|
destruct() {
|
|
68
67
|
this.stop();
|
|
69
|
-
|
|
68
|
+
RecognizeManager._instances.delete(this);
|
|
70
69
|
super.destruct();
|
|
71
70
|
}
|
|
72
71
|
get isEnabled() {
|
|
@@ -77,7 +76,7 @@ let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends Event
|
|
|
77
76
|
return;
|
|
78
77
|
}
|
|
79
78
|
this._isEnabled = true;
|
|
80
|
-
|
|
79
|
+
RecognizeManager._instances.forEach(instance => {
|
|
81
80
|
if (instance !== this) {
|
|
82
81
|
instance.stop();
|
|
83
82
|
}
|
|
@@ -176,9 +175,14 @@ let RecognizeManager = RecognizeManager_1 = class RecognizeManager extends Event
|
|
|
176
175
|
sound({ frequency });
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
|
-
}
|
|
178
|
+
}
|
|
180
179
|
RecognizeManager._instances = new Set();
|
|
181
|
-
|
|
180
|
+
__decorate([
|
|
181
|
+
autobind
|
|
182
|
+
], RecognizeManager.prototype, "_onResults", null);
|
|
183
|
+
__decorate([
|
|
184
|
+
autobind
|
|
185
|
+
], RecognizeManager.prototype, "_onProgress", null);
|
|
186
|
+
__decorate([
|
|
182
187
|
autobind
|
|
183
|
-
], RecognizeManager);
|
|
184
|
-
export { RecognizeManager };
|
|
188
|
+
], RecognizeManager.prototype, "_onError", null);
|
package/esm/tsconfig.json
CHANGED
package/package.json
CHANGED
|
@@ -8,4 +8,22 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module decorators/autobind
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Decorator that automatically binds a method to its class instance.
|
|
13
|
+
* This is useful when passing methods as callbacks to preserve the correct `this` context.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* class MyComponent {
|
|
18
|
+
* @autobind
|
|
19
|
+
* handleClick() {
|
|
20
|
+
* console.log(this); // Always refers to MyComponent instance
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* const component = new MyComponent();
|
|
25
|
+
* const button = document.createElement('button');
|
|
26
|
+
* button.addEventListener('click', component.handleClick); // `this` is correctly bound
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function autobind(_target: object, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|