@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240319.1 → 0.0.0-nightly-20240321.0
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/build/import-word.js +1 -1
- package/package.json +2 -2
- package/src/importword.js +1 -1
- package/src/importwordcommand.js +1 -1
- package/src/importwordediting.js +1 -1
- package/src/importwordui.js +1 -1
- package/src/index.js +1 -1
package/build/import-word.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(
|
|
5
|
+
*/(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),n=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(o=>{const i=t.commands.get("importWord"),s=new n.FileDialogButtonView(o),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),c=r(584);class p extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const o=new DataTransfer;o.setData("text/html",r.html);const n=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(n),t.editing.view.document.fire("clipboardInput",{dataTransfer:o})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),o={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(o).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,o=(0,c.first)(r.getSelectedBlocks());return!!o&&e.checkChild(o.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const o=r.getFirstPosition(),n=(0,c.first)(r.getSelectedBlocks());let i;i=n.is("element","paragraph")&&n.isEmpty?o:o.isAtStart?e.createPositionBefore(n):o.isAtEnd?e.createPositionAfter(n):t.split(o).position,this._importMarker=t.addMarker("importWord:"+(0,c.uid)(),{usingOperation:!1,affectsData:!1,range:new a.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,c.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,c.logError)("import-word-plugin-conversion-failed")}}const l=d;function d(t,e){const r=u();return(d=function(t,e){return r[t-=103]})(t,e)}function u(){const t=["pluginName","1058072fQJerH","add","ImportWordEditing","320412ZBOoMk","73422hKcgQz","importWord","plugins","cloudServices","editor","14XEGzzo","49170UtIlAQ","none","8082560PsxfBf","65944hMytyy","requires","define","40lkiAdf","registerTokenUrl","get","_token","getToken","token","CloudServices","tokenUrl","init","782568bHQRhN","https://docx-converter.cke-cs.com/v2/convert/docx-html","15WAVQKN","commands","inline","config"];return(u=function(){return t})()}!function(t,e){const r=d,o=t();for(;;)try{if(135215===-parseInt(r(130))/1+-parseInt(r(127))/2+parseInt(r(121))/3*(-parseInt(r(133))/4)+-parseInt(r(112))/5*(parseInt(r(120))/6)+parseInt(r(126))/7*(-parseInt(r(117))/8)+parseInt(r(110))/9+parseInt(r(129))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(u);class h extends t.Plugin{static get[l(116)](){return l(119)}static get[l(131)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(107)]}constructor(t){const e=l;super(t),this[e(104)]=null}async[l(109)](){const t=l,e=this[t(125)];e[t(115)][t(132)](t(122),{converterUrl:t(111),tokenUrl:(e[t(115)][t(103)](t(124))||{})[t(108)],formatting:{resets:t(128),defaults:t(128),styles:t(114)}}),e[t(113)][t(118)](t(122),new p(e));const{tokenUrl:r}=e[t(115)][t(103)](t(122));if(r){const{tokenUrl:o}=e[t(115)][t(103)](t(124))||{};this[t(104)]=r===o?e[t(123)][t(103)](t(107))[t(106)]:await e[t(123)][t(103)](t(107))[t(134)](r)}}[l(105)](){return this[l(104)]}}var m=f;function f(t,e){var r=g();return(f=function(t,e){return r[t-=268]})(t,e)}function g(){var t=["170CFalvw","requires","2748LgAdRq","ImportWord","1374gHdEcS","18042TwsMXA","9313768yGpTTH","20FsrQwX","8987256uxdBSi","pluginName","916212vjTKgw","1552rbgcAu","4974925UVIEKE","3423fKVLUu"];return(g=function(){return t})()}!function(t,e){for(var r=f,o=t();;)try{if(783195===parseInt(r(281))/1*(-parseInt(r(271))/2)+-parseInt(r(278))/3*(parseInt(r(276))/4)+-parseInt(r(272))/5+-parseInt(r(279))/6*(parseInt(r(273))/7)+parseInt(r(280))/8+parseInt(r(268))/9+-parseInt(r(274))/10*(-parseInt(r(270))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class I extends t.Plugin{static get[m(269)](){return m(277)}static get[m(275)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=393]})(t,e)}function b(){var t=["1oeasoY","2739284YGfgsp","1967112TUobaK","5cvPOKq","2089884fhEWti","2176863LHJbVy","128JGuSWk","9970713YgNESa","26115110pwAreM","120596FdKSgx"];return(b=function(){return t})()}!function(t,e){for(var r=v,o=t();;)try{if(723793===-parseInt(r(394))/1*(-parseInt(r(395))/2)+parseInt(r(399))/3+-parseInt(r(396))/4+parseInt(r(397))/5*(parseInt(r(398))/6)+-parseInt(r(393))/7*(-parseInt(r(400))/8)+parseInt(r(401))/9+-parseInt(r(402))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-import-word",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240321.0",
|
|
4
4
|
"description": "Import from Word feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"type": "module",
|
|
31
31
|
"main": "src/index.js",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20240321.0"
|
|
34
34
|
},
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"author": "CKSource (https://cksource.com/)",
|
package/src/importword.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x24dbd5=_0x53a5;(function(_0x6b8468,_0x4159b6){var _0x38a838=_0x53a5,_0x4dc18d=_0x6b8468();while(!![]){try{var _0x4a0935=parseInt(_0x38a838(0x119))/0x1*(-parseInt(_0x38a838(0x10f))/0x2)+-parseInt(_0x38a838(0x116))/0x3*(parseInt(_0x38a838(0x114))/0x4)+-parseInt(_0x38a838(0x110))/0x5+-parseInt(_0x38a838(0x117))/0x6*(parseInt(_0x38a838(0x111))/0x7)+parseInt(_0x38a838(0x118))/0x8+parseInt(_0x38a838(0x10c))/0x9+-parseInt(_0x38a838(0x112))/0xa*(-parseInt(_0x38a838(0x10e))/0xb);if(_0x4a0935===_0x4159b6)break;else _0x4dc18d['push'](_0x4dc18d['shift']());}catch(_0x446135){_0x4dc18d['push'](_0x4dc18d['shift']());}}}(_0x2885,0xbf35b));function _0x53a5(_0xb92d72,_0x3ab43f){var _0x288573=_0x2885();return _0x53a5=function(_0x53a54c,_0x1d4f1d){_0x53a54c=_0x53a54c-0x10c;var _0x35b0e9=_0x288573[_0x53a54c];return _0x35b0e9;},_0x53a5(_0xb92d72,_0x3ab43f);}import{Plugin as _0x2213f7}from'ckeditor5/src/core.js';import _0xbb603a from'./importwordui.js';function _0x2885(){var _0x31f48b=['170CFalvw','requires','2748LgAdRq','ImportWord','1374gHdEcS','18042TwsMXA','9313768yGpTTH','20FsrQwX','8987256uxdBSi','pluginName','916212vjTKgw','1552rbgcAu','4974925UVIEKE','3423fKVLUu'];_0x2885=function(){return _0x31f48b;};return _0x2885();}import _0x289c46 from'./importwordediting.js';export default class i extends _0x2213f7{static get[_0x24dbd5(0x10d)](){var _0x261a33=_0x24dbd5;return _0x261a33(0x115);}static get[_0x24dbd5(0x113)](){return[_0x289c46,_0xbb603a];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x131937}from'ckeditor5/src/core.js';import{Range as _0x3b9f19}from'ckeditor5/src/engine.js';import{logWarning as _0x5d8ca8,logError as _0x524576,first as _0xddc400,uid as _0x382928}from'ckeditor5/src/utils.js';export default class d extends _0x131937{constructor(_0x32da0b){super(_0x32da0b),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x5b2dcd,_0x57765b)=>{const _0x581387=new DataTransfer();_0x581387['setData']('text/html',_0x57765b['html']);const _0x1d9f01=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x4202a8=>{this['_importMarker']['stopListening'](),_0x4202a8['setSelection'](_0x1d9f01),_0x32da0b['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x581387});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5e3850,_0xa94af0={}){if(this['isBusy'])return Promise['resolve']();const _0x550dc0=this['editor']['config']['get']('importWord'),_0x3c0aa1={'url':_0x550dc0['converterUrl'],'file':_0x5e3850,'serviceConfig':{..._0xa94af0,'formatting':_0x550dc0['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x3c0aa1)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x2b34d2=this['editor']['model'],_0x24586b=_0x2b34d2['schema'],_0x2595a7=_0x2b34d2['document']['selection'],_0x38e7d1=_0xddc400(_0x2595a7['getSelectedBlocks']());return!!_0x38e7d1&&_0x24586b['checkChild'](_0x38e7d1['parent'],'paragraph');}['_prepareForImport'](){const _0xe01f2b=this['editor'],_0x25008c=_0xe01f2b['model'],_0x38908e=_0x25008c['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0xe01f2b['model']['createBatch']({'isUndoable':!0x0}),_0x25008c['enqueueChange'](this['_undoStepBatch'],_0x42ba07=>{_0x38908e['isCollapsed']||_0x25008c['deleteContent'](_0x38908e,{'leaveUnmerged':!0x0});const _0x49cb89=_0x38908e['getFirstPosition'](),_0x3a0911=_0xddc400(_0x38908e['getSelectedBlocks']());let _0x4f87e6;_0x4f87e6=_0x3a0911['is']('element','paragraph')&&_0x3a0911['isEmpty']?_0x49cb89:_0x49cb89['isAtStart']?_0x25008c['createPositionBefore'](_0x3a0911):_0x49cb89['isAtEnd']?_0x25008c['createPositionAfter'](_0x3a0911):_0x42ba07['split'](_0x49cb89)['position'],this['_importMarker']=_0x42ba07['addMarker']('importWord:'+_0x382928(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x3b9f19(_0x4f87e6)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x4ad13e=this['editor']['model'];_0x4ad13e['markers']['has'](this['_importMarker'])&&_0x4ad13e['enqueueChange'](this['_undoStepBatch'],_0x20e4f7=>{_0x20e4f7['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x4c1d19,file:_0xa39d64,serviceConfig:_0x13ace2}){const _0x352d84=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x425dc7=new FormData();_0x425dc7['set']('config',JSON['stringify'](_0x13ace2)),_0x425dc7['set']('file',_0xa39d64);const _0x18cbd5={'method':'POST','headers':{},'body':_0x425dc7,'signal':this['_abortController']['signal']};return _0x352d84&&(_0x18cbd5['headers']['Authorization']=_0x352d84['value']),fetch(_0x4c1d19,_0x18cbd5);}['_handleImportResponse'](_0x5db438){return _0x5db438['ok']?_0x5db438['json']()['then'](_0x519cc8=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x519cc8);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x5d8ca8('import-word-plugin-import-cancelled');const _0x34fa3c=this['editor'],_0x1d1226=(0x0,_0x34fa3c['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x34fa3c['plugins']['get']('Notification')['showWarning'](_0x1d1226),_0x524576('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
const _0x181e25=_0x8294;function _0x8294(_0x1347d7,_0x4ace4f){const _0x1a8cfc=_0x1a8c();return _0x8294=function(_0x82949d,_0x50cee3){_0x82949d=_0x82949d-0x67;let _0x48b973=_0x1a8cfc[_0x82949d];return _0x48b973;},_0x8294(_0x1347d7,_0x4ace4f);}function _0x1a8c(){const _0x231be3=['pluginName','1058072fQJerH','add','ImportWordEditing','320412ZBOoMk','73422hKcgQz','importWord','plugins','cloudServices','editor','14XEGzzo','49170UtIlAQ','none','8082560PsxfBf','65944hMytyy','requires','define','40lkiAdf','registerTokenUrl','get','_token','getToken','token','CloudServices','tokenUrl','init','782568bHQRhN','https://docx-converter.cke-cs.com/v2/convert/docx-html','15WAVQKN','commands','inline','config'];_0x1a8c=function(){return _0x231be3;};return _0x1a8c();}(function(_0x241724,_0xab8166){const _0xd333d6=_0x8294,_0x5620fb=_0x241724();while(!![]){try{const _0x173ba4=-parseInt(_0xd333d6(0x82))/0x1+-parseInt(_0xd333d6(0x7f))/0x2+parseInt(_0xd333d6(0x79))/0x3*(-parseInt(_0xd333d6(0x85))/0x4)+-parseInt(_0xd333d6(0x70))/0x5*(parseInt(_0xd333d6(0x78))/0x6)+parseInt(_0xd333d6(0x7e))/0x7*(-parseInt(_0xd333d6(0x75))/0x8)+parseInt(_0xd333d6(0x6e))/0x9+parseInt(_0xd333d6(0x81))/0xa;if(_0x173ba4===_0xab8166)break;else _0x5620fb['push'](_0x5620fb['shift']());}catch(_0x406eee){_0x5620fb['push'](_0x5620fb['shift']());}}}(_0x1a8c,0x2102f));import{Plugin as _0x1719b9}from'ckeditor5/src/core.js';import{Notification as _0x2a558f}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x490403}from'ckeditor5/src/clipboard.js';import _0x22fdfe from'./importwordcommand.js';export default class e extends _0x1719b9{static get[_0x181e25(0x74)](){const _0x3e530a=_0x181e25;return _0x3e530a(0x77);}static get[_0x181e25(0x83)](){const _0x57f12d=_0x181e25;return[_0x2a558f,_0x490403,_0x57f12d(0x6b)];}constructor(_0x3a56ab){const _0x1ad8fe=_0x181e25;super(_0x3a56ab),this[_0x1ad8fe(0x68)]=null;}async[_0x181e25(0x6d)](){const _0x3353a6=_0x181e25,_0x5e53a5=this[_0x3353a6(0x7d)];_0x5e53a5[_0x3353a6(0x73)][_0x3353a6(0x84)](_0x3353a6(0x7a),{'converterUrl':_0x3353a6(0x6f),'tokenUrl':(_0x5e53a5[_0x3353a6(0x73)][_0x3353a6(0x67)](_0x3353a6(0x7c))||{})[_0x3353a6(0x6c)],'formatting':{'resets':_0x3353a6(0x80),'defaults':_0x3353a6(0x80),'styles':_0x3353a6(0x72)}}),_0x5e53a5[_0x3353a6(0x71)][_0x3353a6(0x76)](_0x3353a6(0x7a),new _0x22fdfe(_0x5e53a5));const {tokenUrl:_0x2eccec}=_0x5e53a5[_0x3353a6(0x73)][_0x3353a6(0x67)](_0x3353a6(0x7a));if(_0x2eccec){const {tokenUrl:_0x498cfb}=_0x5e53a5[_0x3353a6(0x73)][_0x3353a6(0x67)](_0x3353a6(0x7c))||{};this[_0x3353a6(0x68)]=_0x2eccec===_0x498cfb?_0x5e53a5[_0x3353a6(0x7b)][_0x3353a6(0x67)](_0x3353a6(0x6b))[_0x3353a6(0x6a)]:await _0x5e53a5[_0x3353a6(0x7b)][_0x3353a6(0x67)](_0x3353a6(0x6b))[_0x3353a6(0x86)](_0x2eccec);}}[_0x181e25(0x69)](){const _0x1962fe=_0x181e25;return this[_0x1962fe(0x68)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x49ef2a}from'ckeditor5/src/core.js';import{SpinnerView as _0x5a4cd3}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x25b244}from'ckeditor5/src/upload.js';import _0x492a26 from'../theme/icons/importword.svg';export default class o extends _0x49ef2a{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x408e0c=this['editor'],t=_0x408e0c['t'];_0x408e0c['ui']['componentFactory']['add']('importWord',_0x1258b9=>{const _0x3269aa=_0x408e0c['commands']['get']('importWord'),_0x58f9d2=new _0x25b244(_0x1258b9),_0x562a51=new _0x5a4cd3();return _0x58f9d2['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x58f9d2['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x492a26,'tooltip':!0x0}),_0x58f9d2['buttonView']['bind']('isOn','isEnabled')['to'](_0x3269aa,'isBusy','isEnabled'),_0x562a51['bind']('isVisible')['to'](_0x3269aa,'isBusy'),_0x58f9d2['buttonView']['iconView']['bind']('isVisible')['to'](_0x3269aa,'isBusy',_0x480fa4=>!_0x480fa4),_0x58f9d2['buttonView']['children']['add'](_0x562a51),_0x58f9d2['on']('done',(_0x9a3175,_0x4cfe73)=>{_0x408e0c['execute']('importWord',_0x4cfe73[0x0],{}),_0x408e0c['editing']['view']['focus']();}),_0x58f9d2;});}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0xf286(_0x22db46,_0x1bde92){var _0x54a757=_0x54a7();return _0xf286=function(_0xf286e7,_0x5f09de){_0xf286e7=_0xf286e7-0x189;var _0x15420c=_0x54a757[_0xf286e7];return _0x15420c;},_0xf286(_0x22db46,_0x1bde92);}(function(_0x34ef94,_0x33cfeb){var _0xf6e0a6=_0xf286,_0x360e2=_0x34ef94();while(!![]){try{var _0x5a5e11=-parseInt(_0xf6e0a6(0x18a))/0x1*(-parseInt(_0xf6e0a6(0x18b))/0x2)+parseInt(_0xf6e0a6(0x18f))/0x3+-parseInt(_0xf6e0a6(0x18c))/0x4+parseInt(_0xf6e0a6(0x18d))/0x5*(parseInt(_0xf6e0a6(0x18e))/0x6)+-parseInt(_0xf6e0a6(0x189))/0x7*(-parseInt(_0xf6e0a6(0x190))/0x8)+parseInt(_0xf6e0a6(0x191))/0x9+-parseInt(_0xf6e0a6(0x192))/0xa;if(_0x5a5e11===_0x33cfeb)break;else _0x360e2['push'](_0x360e2['shift']());}catch(_0x5179de){_0x360e2['push'](_0x360e2['shift']());}}}(_0x54a7,0xb0b51));function _0x54a7(){var _0x26a5a2=['1oeasoY','2739284YGfgsp','1967112TUobaK','5cvPOKq','2089884fhEWti','2176863LHJbVy','128JGuSWk','9970713YgNESa','26115110pwAreM','120596FdKSgx'];_0x54a7=function(){return _0x26a5a2;};return _0x54a7();}export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
|