@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240409.0 → 0.0.0-nightly-20240411.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")},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:()=>
|
|
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")},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:()=>f,ImportWordEditing:()=>u,ImportWordUI:()=>n});var t=r(782),e=r(311);class n extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor;t.ui.componentFactory.add("importWord",(()=>{const r=this._createButton(e.FileDialogButtonView),o=t.commands.get("importWord");return r.bind("isOn").to(o,"isBusy"),r.tooltip=!0,r})),t.ui.componentFactory.add("menuBar:importWord",(()=>this._createButton(e.MenuBarMenuListItemFileDialogButtonView)))}_createButton(t){const r=this.editor,o=r.locale.t,n=r.commands.get("importWord"),i=new t(r.locale),s=new e.SpinnerView;return i.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),i.set({label:o("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'}),i.bind("isEnabled").to(n),s.bind("isVisible").to(n,"isBusy"),i.iconView.bind("isVisible").to(n,"isBusy",(t=>!t)),i.children.add(s),i.on("done",((t,e)=>{r.execute("importWord",e[0],{}),r.editing.view.focus()})),i}}var i=r(331),s=r(783),a=r(584);class c 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,a.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,a.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,a.uid)(),{usingOperation:!1,affectsData:!1,range:new s.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,a.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,a.logError)("import-word-plugin-conversion-failed")}}function p(t,e){const r=d();return(p=function(t,e){return r[t-=498]})(t,e)}const l=p;function d(){const t=["CloudServices","4WYczvq","1478AQhenc","2738931kJYgmr","commands","getToken","define","config","223NjdZHp","pluginName","10583450AsJBxX","tokenUrl","editor","none","1572868SKMock","inline","461656QBfADR","ImportWordEditing","cloudServices","importWord","plugins","_token","registerTokenUrl","add","45vOpKFz","492xwKvbV","requires","token","init","126105ymfJVJ","get","https://docx-converter.cke-cs.com/v2/convert/docx-html","12BmYMzN","1542910YHIeJE"];return(d=function(){return t})()}!function(t,e){const r=p,o=t();for(;;)try{if(783424===-parseInt(r(522))/1*(parseInt(r(516))/2)+parseInt(r(517))/3+-parseInt(r(515))/4*(-parseInt(r(513))/5)+-parseInt(r(505))/6*(parseInt(r(509))/7)+parseInt(r(530))/8*(parseInt(r(504))/9)+parseInt(r(524))/10+-parseInt(r(528))/11*(parseInt(r(512))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class u extends t.Plugin{static get[l(523)](){return l(531)}static get[l(506)](){const t=l;return[e.Notification,i.ClipboardPipeline,t(514)]}constructor(t){const e=l;super(t),this[e(501)]=null}async[l(508)](){const t=l,e=this[t(526)];e[t(521)][t(520)](t(499),{converterUrl:t(511),tokenUrl:(e[t(521)][t(510)](t(498))||{})[t(525)],formatting:{resets:t(527),defaults:t(527),styles:t(529)}}),e[t(518)][t(503)](t(499),new c(e));const{tokenUrl:r}=e[t(521)][t(510)](t(499));if(r){const{tokenUrl:o}=e[t(521)][t(510)](t(498))||{};this[t(501)]=r===o?e[t(500)][t(510)](t(514))[t(507)]:await e[t(500)][t(510)](t(514))[t(502)](r)}}[l(519)](){return this[l(501)]}}function h(){var t=["2608130jVgZxu","1757921eKSmHy","4jqGLCv","31804SoQJkZ","710121hBgeIE","requires","pluginName","50rYAXQu","439922ADPxun","2004896iKaJBC","3kRQADK","71721wNYWJA","114stJPPR","ImportWord"];return(h=function(){return t})()}var m=g;function g(t,e){var r=h();return(g=function(t,e){return r[t-=318]})(t,e)}!function(t,e){for(var r=g,o=t();;)try{if(838303===parseInt(r(330))/1*(-parseInt(r(323))/2)+parseInt(r(324))/3*(-parseInt(r(322))/4)+-parseInt(r(320))/5+parseInt(r(318))/6*(parseInt(r(328))/7)+parseInt(r(329))/8+-parseInt(r(331))/9*(-parseInt(r(327))/10)+parseInt(r(321))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(h);class f extends t.Plugin{static get[m(326)](){return m(319)}static get[m(325)](){return[u,n]}}function I(t,e){var r=v();return(I=function(t,e){return r[t-=186]})(t,e)}function v(){var t=["527612aVOthm","28XcXpSx","40RBftgG","3327815gNCXfb","754199gGLulp","1045506yHeNxd","45540YkkFLE","6801912ZOnRyF","1061928kTkmol"];return(v=function(){return t})()}!function(t,e){for(var r=I,o=t();;)try{if(464258===parseInt(r(192))/1+parseInt(r(188))/2+-parseInt(r(194))/3*(-parseInt(r(189))/4)+parseInt(r(191))/5+parseInt(r(187))/6+-parseInt(r(193))/7*(parseInt(r(190))/8)+-parseInt(r(186))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(v)})(),(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-20240411.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-20240411.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
|
+
function _0xe4da(){var _0x4fe31f=['2608130jVgZxu','1757921eKSmHy','4jqGLCv','31804SoQJkZ','710121hBgeIE','requires','pluginName','50rYAXQu','439922ADPxun','2004896iKaJBC','3kRQADK','71721wNYWJA','114stJPPR','ImportWord'];_0xe4da=function(){return _0x4fe31f;};return _0xe4da();}var _0x3ed037=_0x3a83;(function(_0x3b136a,_0x1e3893){var _0x2bede7=_0x3a83,_0x207942=_0x3b136a();while(!![]){try{var _0x15d25a=parseInt(_0x2bede7(0x14a))/0x1*(-parseInt(_0x2bede7(0x143))/0x2)+parseInt(_0x2bede7(0x144))/0x3*(-parseInt(_0x2bede7(0x142))/0x4)+-parseInt(_0x2bede7(0x140))/0x5+parseInt(_0x2bede7(0x13e))/0x6*(parseInt(_0x2bede7(0x148))/0x7)+parseInt(_0x2bede7(0x149))/0x8+-parseInt(_0x2bede7(0x14b))/0x9*(-parseInt(_0x2bede7(0x147))/0xa)+parseInt(_0x2bede7(0x141))/0xb;if(_0x15d25a===_0x1e3893)break;else _0x207942['push'](_0x207942['shift']());}catch(_0x562048){_0x207942['push'](_0x207942['shift']());}}}(_0xe4da,0xcca9f));import{Plugin as _0x5812f3}from'ckeditor5/src/core.js';import _0x19439f from'./importwordui.js';import _0x1733f0 from'./importwordediting.js';function _0x3a83(_0x2bae2b,_0x15135a){var _0xe4da65=_0xe4da();return _0x3a83=function(_0x3a83ab,_0x1f8fb1){_0x3a83ab=_0x3a83ab-0x13e;var _0x3c1b06=_0xe4da65[_0x3a83ab];return _0x3c1b06;},_0x3a83(_0x2bae2b,_0x15135a);}export default class i extends _0x5812f3{static get[_0x3ed037(0x146)](){var _0x3274a4=_0x3ed037;return _0x3274a4(0x13f);}static get[_0x3ed037(0x145)](){return[_0x1733f0,_0x19439f];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x156307}from'ckeditor5/src/core.js';import{Range as _0x3a8157}from'ckeditor5/src/engine.js';import{logWarning as _0x56acd1,logError as _0x5358ec,first as _0x34bf94,uid as _0x4ba866}from'ckeditor5/src/utils.js';export default class d extends _0x156307{constructor(_0x50a8b1){super(_0x50a8b1),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x22d4ec,_0x8b38b4)=>{const _0x17be5a=new DataTransfer();_0x17be5a['setData']('text/html',_0x8b38b4['html']);const _0x115b86=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x207eba=>{this['_importMarker']['stopListening'](),_0x207eba['setSelection'](_0x115b86),_0x50a8b1['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x17be5a});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5dfbe5,_0xa6b95d={}){if(this['isBusy'])return Promise['resolve']();const _0x5f5260=this['editor']['config']['get']('importWord'),_0x31e89e={'url':_0x5f5260['converterUrl'],'file':_0x5dfbe5,'serviceConfig':{..._0xa6b95d,'formatting':_0x5f5260['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x31e89e)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x169a63=this['editor']['model'],_0x1d5f3e=_0x169a63['schema'],_0x493605=_0x169a63['document']['selection'],_0x286200=_0x34bf94(_0x493605['getSelectedBlocks']());return!!_0x286200&&_0x1d5f3e['checkChild'](_0x286200['parent'],'paragraph');}['_prepareForImport'](){const _0x5c9a84=this['editor'],_0x1f22de=_0x5c9a84['model'],_0x42a94b=_0x1f22de['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x5c9a84['model']['createBatch']({'isUndoable':!0x0}),_0x1f22de['enqueueChange'](this['_undoStepBatch'],_0x4d52ce=>{_0x42a94b['isCollapsed']||_0x1f22de['deleteContent'](_0x42a94b,{'leaveUnmerged':!0x0});const _0x4a506b=_0x42a94b['getFirstPosition'](),_0x34d6e5=_0x34bf94(_0x42a94b['getSelectedBlocks']());let _0x47c781;_0x47c781=_0x34d6e5['is']('element','paragraph')&&_0x34d6e5['isEmpty']?_0x4a506b:_0x4a506b['isAtStart']?_0x1f22de['createPositionBefore'](_0x34d6e5):_0x4a506b['isAtEnd']?_0x1f22de['createPositionAfter'](_0x34d6e5):_0x4d52ce['split'](_0x4a506b)['position'],this['_importMarker']=_0x4d52ce['addMarker']('importWord:'+_0x4ba866(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x3a8157(_0x47c781)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x116a3d=this['editor']['model'];_0x116a3d['markers']['has'](this['_importMarker'])&&_0x116a3d['enqueueChange'](this['_undoStepBatch'],_0x58653c=>{_0x58653c['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x258d94,file:_0x9ca171,serviceConfig:_0x536cd9}){const _0x26e6ed=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x5634b0=new FormData();_0x5634b0['set']('config',JSON['stringify'](_0x536cd9)),_0x5634b0['set']('file',_0x9ca171);const _0x12e4d5={'method':'POST','headers':{},'body':_0x5634b0,'signal':this['_abortController']['signal']};return _0x26e6ed&&(_0x12e4d5['headers']['Authorization']=_0x26e6ed['value']),fetch(_0x258d94,_0x12e4d5);}['_handleImportResponse'](_0x1906e0){return _0x1906e0['ok']?_0x1906e0['json']()['then'](_0xd9321e=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0xd9321e);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x56acd1('import-word-plugin-import-cancelled');const _0x57a369=this['editor'],_0x444044=(0x0,_0x57a369['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x57a369['plugins']['get']('Notification')['showWarning'](_0x444044),_0x5358ec('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x3561(_0x4658ed,_0x19deab){const _0x2112e0=_0x2112();return _0x3561=function(_0x3561c2,_0x1d65a4){_0x3561c2=_0x3561c2-0x1f2;let _0x4bed38=_0x2112e0[_0x3561c2];return _0x4bed38;},_0x3561(_0x4658ed,_0x19deab);}const _0x31018f=_0x3561;(function(_0x501480,_0x5abb2f){const _0x524a4c=_0x3561,_0x5cf4d4=_0x501480();while(!![]){try{const _0x3abb68=-parseInt(_0x524a4c(0x20a))/0x1*(parseInt(_0x524a4c(0x204))/0x2)+parseInt(_0x524a4c(0x205))/0x3+-parseInt(_0x524a4c(0x203))/0x4*(-parseInt(_0x524a4c(0x201))/0x5)+-parseInt(_0x524a4c(0x1f9))/0x6*(parseInt(_0x524a4c(0x1fd))/0x7)+parseInt(_0x524a4c(0x212))/0x8*(parseInt(_0x524a4c(0x1f8))/0x9)+parseInt(_0x524a4c(0x20c))/0xa+-parseInt(_0x524a4c(0x210))/0xb*(parseInt(_0x524a4c(0x200))/0xc);if(_0x3abb68===_0x5abb2f)break;else _0x5cf4d4['push'](_0x5cf4d4['shift']());}catch(_0xeefed3){_0x5cf4d4['push'](_0x5cf4d4['shift']());}}}(_0x2112,0xbf440));import{Plugin as _0x387117}from'ckeditor5/src/core.js';import{Notification as _0x45f5c7}from'ckeditor5/src/ui.js';function _0x2112(){const _0x21fc36=['CloudServices','4WYczvq','1478AQhenc','2738931kJYgmr','commands','getToken','define','config','223NjdZHp','pluginName','10583450AsJBxX','tokenUrl','editor','none','1572868SKMock','inline','461656QBfADR','ImportWordEditing','cloudServices','importWord','plugins','_token','registerTokenUrl','add','45vOpKFz','492xwKvbV','requires','token','init','126105ymfJVJ','get','https://docx-converter.cke-cs.com/v2/convert/docx-html','12BmYMzN','1542910YHIeJE'];_0x2112=function(){return _0x21fc36;};return _0x2112();}import{ClipboardPipeline as _0x36cb9f}from'ckeditor5/src/clipboard.js';import _0x324e79 from'./importwordcommand.js';export default class e extends _0x387117{static get[_0x31018f(0x20b)](){const _0x416db2=_0x31018f;return _0x416db2(0x213);}static get[_0x31018f(0x1fa)](){const _0x2d150a=_0x31018f;return[_0x45f5c7,_0x36cb9f,_0x2d150a(0x202)];}constructor(_0x532cc6){const _0x5ccd7f=_0x31018f;super(_0x532cc6),this[_0x5ccd7f(0x1f5)]=null;}async[_0x31018f(0x1fc)](){const _0x2a2b0d=_0x31018f,_0xb7bad4=this[_0x2a2b0d(0x20e)];_0xb7bad4[_0x2a2b0d(0x209)][_0x2a2b0d(0x208)](_0x2a2b0d(0x1f3),{'converterUrl':_0x2a2b0d(0x1ff),'tokenUrl':(_0xb7bad4[_0x2a2b0d(0x209)][_0x2a2b0d(0x1fe)](_0x2a2b0d(0x1f2))||{})[_0x2a2b0d(0x20d)],'formatting':{'resets':_0x2a2b0d(0x20f),'defaults':_0x2a2b0d(0x20f),'styles':_0x2a2b0d(0x211)}}),_0xb7bad4[_0x2a2b0d(0x206)][_0x2a2b0d(0x1f7)](_0x2a2b0d(0x1f3),new _0x324e79(_0xb7bad4));const {tokenUrl:_0xd4842}=_0xb7bad4[_0x2a2b0d(0x209)][_0x2a2b0d(0x1fe)](_0x2a2b0d(0x1f3));if(_0xd4842){const {tokenUrl:_0x248bc9}=_0xb7bad4[_0x2a2b0d(0x209)][_0x2a2b0d(0x1fe)](_0x2a2b0d(0x1f2))||{};this[_0x2a2b0d(0x1f5)]=_0xd4842===_0x248bc9?_0xb7bad4[_0x2a2b0d(0x1f4)][_0x2a2b0d(0x1fe)](_0x2a2b0d(0x202))[_0x2a2b0d(0x1fb)]:await _0xb7bad4[_0x2a2b0d(0x1f4)][_0x2a2b0d(0x1fe)](_0x2a2b0d(0x202))[_0x2a2b0d(0x1f6)](_0xd4842);}}[_0x31018f(0x207)](){const _0x30023a=_0x31018f;return this[_0x30023a(0x1f5)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x19a8b8}from'ckeditor5/src/core.js';import{SpinnerView as _0x340886,FileDialogButtonView as _0xe96359,MenuBarMenuListItemFileDialogButtonView as _0x53b557}from'ckeditor5/src/ui.js';import _0x3976f5 from'../theme/icons/importword.svg';export default class o extends _0x19a8b8{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x59095c=this['editor'];_0x59095c['ui']['componentFactory']['add']('importWord',()=>{const _0x24427b=this['_createButton'](_0xe96359),_0x1f9d86=_0x59095c['commands']['get']('importWord');return _0x24427b['bind']('isOn')['to'](_0x1f9d86,'isBusy'),_0x24427b['tooltip']=!0x0,_0x24427b;}),_0x59095c['ui']['componentFactory']['add']('menuBar:importWord',()=>this['_createButton'](_0x53b557));}['_createButton'](_0x37c163){const _0x104e51=this['editor'],t=_0x104e51['locale']['t'],_0x1338c5=_0x104e51['commands']['get']('importWord'),_0x11e2ea=new _0x37c163(_0x104e51['locale']),_0x44d838=new _0x340886();return _0x11e2ea['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x11e2ea['set']({'label':t('Import\x20from\x20Word'),'icon':_0x3976f5}),_0x11e2ea['bind']('isEnabled')['to'](_0x1338c5),_0x44d838['bind']('isVisible')['to'](_0x1338c5,'isBusy'),_0x11e2ea['iconView']['bind']('isVisible')['to'](_0x1338c5,'isBusy',_0x32f67d=>!_0x32f67d),_0x11e2ea['children']['add'](_0x44d838),_0x11e2ea['on']('done',(_0x3974b0,_0x811577)=>{_0x104e51['execute']('importWord',_0x811577[0x0],{}),_0x104e51['editing']['view']['focus']();}),_0x11e2ea;}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x141aa7,_0x4fed9d){var _0x7061b5=_0x5985,_0x20bec6=_0x141aa7();while(!![]){try{var _0x4d9638=parseInt(_0x7061b5(0xc0))/0x1+parseInt(_0x7061b5(0xbc))/0x2+-parseInt(_0x7061b5(0xc2))/0x3*(-parseInt(_0x7061b5(0xbd))/0x4)+parseInt(_0x7061b5(0xbf))/0x5+parseInt(_0x7061b5(0xbb))/0x6+-parseInt(_0x7061b5(0xc1))/0x7*(parseInt(_0x7061b5(0xbe))/0x8)+-parseInt(_0x7061b5(0xba))/0x9;if(_0x4d9638===_0x4fed9d)break;else _0x20bec6['push'](_0x20bec6['shift']());}catch(_0x28ca29){_0x20bec6['push'](_0x20bec6['shift']());}}}(_0x3df1,0x71582));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';function _0x5985(_0x312a70,_0x3317a2){var _0x3df191=_0x3df1();return _0x5985=function(_0x59858f,_0x5aaf5b){_0x59858f=_0x59858f-0xba;var _0x45014b=_0x3df191[_0x59858f];return _0x45014b;},_0x5985(_0x312a70,_0x3317a2);}function _0x3df1(){var _0x5e37dc=['527612aVOthm','28XcXpSx','40RBftgG','3327815gNCXfb','754199gGLulp','1045506yHeNxd','45540YkkFLE','6801912ZOnRyF','1061928kTkmol'];_0x3df1=function(){return _0x5e37dc;};return _0x3df1();}
|