@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240422.0 → 0.0.0-nightly-20240423.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:()=>g,ImportWordEditing:()=>
|
|
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:()=>g,ImportWordEditing:()=>d,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")}}const l=p;function p(t,e){const r=u();return(p=function(t,e){return r[t-=409]})(t,e)}!function(t,e){const r=p,o=t();for(;;)try{if(350145===-parseInt(r(431))/1+parseInt(r(435))/2+parseInt(r(432))/3+-parseInt(r(434))/4+-parseInt(r(439))/5+parseInt(r(412))/6*(-parseInt(r(433))/7)+-parseInt(r(419))/8*(-parseInt(r(411))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(u);class d extends t.Plugin{static get[l(414)](){return l(418)}static get[l(426)](){const t=l;return[e.Notification,i.ClipboardPipeline,t(421)]}constructor(t){const e=l;super(t),this[e(416)]=null}async[l(429)](){const t=l,e=this[t(413)];e[t(409)][t(427)](t(428),{converterUrl:t(423),tokenUrl:(e[t(409)][t(417)](t(410))||{})[t(436)],formatting:{resets:t(438),defaults:t(438),styles:t(425)}}),e[t(430)][t(422)](t(428),new c(e));const{tokenUrl:r}=e[t(409)][t(417)](t(428));if(r){const{tokenUrl:o}=e[t(409)][t(417)](t(410))||{};this[t(416)]=r===o?e[t(415)][t(417)](t(421))[t(420)]:await e[t(415)][t(417)](t(421))[t(437)](r)}}[l(424)](){return this[l(416)]}}function u(){const t=["49252dDbGJt","1771444eRXVBT","184800fdrpjz","tokenUrl","registerTokenUrl","none","1157735jadBdZ","config","cloudServices","2943LwmfOC","450FinavK","editor","pluginName","plugins","_token","get","ImportWordEditing","34856ELSwaM","token","CloudServices","add","https://docx-converter.cke-cs.com/v2/convert/docx-html","getToken","inline","requires","define","importWord","init","commands","302940KiGVfX","1014162nxIata"];return(u=function(){return t})()}var h=m;function m(t,e){var r=f();return(m=function(t,e){return r[t-=275]})(t,e)}function f(){var t=["5XfLolR","6618306XaTAaE","1012280CUMBpc","requires","11aOhEdJ","ImportWord","5985kCzLsr","pluginName","3048756ocRtJJ","866dgZsSb","471849NThVLm","7UdBYFF","6767289JVxvXl","9885150ncstbo"];return(f=function(){return t})()}!function(t,e){for(var r=m,o=t();;)try{if(639615===-parseInt(r(284))/1+parseInt(r(283))/2*(-parseInt(r(280))/3)+parseInt(r(282))/4+-parseInt(r(288))/5*(-parseInt(r(275))/6)+parseInt(r(285))/7*(-parseInt(r(276))/8)+-parseInt(r(286))/9+-parseInt(r(287))/10*(-parseInt(r(278))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class g extends t.Plugin{static get[h(281)](){return h(279)}static get[h(277)](){return[d,n]}}function I(){var t=["7341064wVzytz","67074Guvnuw","5126841vcHcrV","3LAQvWN","426829bXjiRJ","803UNzkvG","6SmVHrH","42170cGuoqk","516RTZlec","2915116ogdmRj","3sUexrk","416310gSuYKK","7mkzbty"];return(I=function(){return t})()}function v(t,e){var r=I();return(v=function(t,e){return r[t-=430]})(t,e)}!function(t,e){for(var r=v,o=t();;)try{if(907056===parseInt(r(432))/1*(parseInt(r(430))/2)+parseInt(r(439))/3*(-parseInt(r(438))/4)+parseInt(r(440))/5*(parseInt(r(435))/6)+parseInt(r(441))/7*(parseInt(r(442))/8)+-parseInt(r(431))/9+parseInt(r(436))/10*(-parseInt(r(434))/11)+-parseInt(r(437))/12*(-parseInt(r(433))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(I)})(),(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-20240423.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-20240423.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 _0x1a6683=_0x3b79;(function(_0x44e3d1,_0x39ddff){var _0x3e573c=_0x3b79,_0x1f224f=_0x44e3d1();while(!![]){try{var _0x2ffe2c=-parseInt(_0x3e573c(0x11c))/0x1+parseInt(_0x3e573c(0x11b))/0x2*(-parseInt(_0x3e573c(0x118))/0x3)+parseInt(_0x3e573c(0x11a))/0x4+-parseInt(_0x3e573c(0x120))/0x5*(-parseInt(_0x3e573c(0x113))/0x6)+parseInt(_0x3e573c(0x11d))/0x7*(-parseInt(_0x3e573c(0x114))/0x8)+-parseInt(_0x3e573c(0x11e))/0x9+-parseInt(_0x3e573c(0x11f))/0xa*(-parseInt(_0x3e573c(0x116))/0xb);if(_0x2ffe2c===_0x39ddff)break;else _0x1f224f['push'](_0x1f224f['shift']());}catch(_0x28066f){_0x1f224f['push'](_0x1f224f['shift']());}}}(_0x11c6,0x9c27f));import{Plugin as _0x24aa9f}from'ckeditor5/src/core.js';function _0x3b79(_0x108caf,_0x13a71d){var _0x11c6b8=_0x11c6();return _0x3b79=function(_0x3b7977,_0x2ade7a){_0x3b7977=_0x3b7977-0x113;var _0x3219c9=_0x11c6b8[_0x3b7977];return _0x3219c9;},_0x3b79(_0x108caf,_0x13a71d);}function _0x11c6(){var _0x1c9ae8=['5XfLolR','6618306XaTAaE','1012280CUMBpc','requires','11aOhEdJ','ImportWord','5985kCzLsr','pluginName','3048756ocRtJJ','866dgZsSb','471849NThVLm','7UdBYFF','6767289JVxvXl','9885150ncstbo'];_0x11c6=function(){return _0x1c9ae8;};return _0x11c6();}import _0x2d27bb from'./importwordui.js';import _0x3ee601 from'./importwordediting.js';export default class i extends _0x24aa9f{static get[_0x1a6683(0x119)](){var _0x5aa35e=_0x1a6683;return _0x5aa35e(0x117);}static get[_0x1a6683(0x115)](){return[_0x3ee601,_0x2d27bb];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x59d480}from'ckeditor5/src/core.js';import{Range as _0x151322}from'ckeditor5/src/engine.js';import{logWarning as _0x1ac41c,logError as _0x5712d7,first as _0x5549bf,uid as _0xba4d71}from'ckeditor5/src/utils.js';export default class d extends _0x59d480{constructor(_0x1e8f0f){super(_0x1e8f0f),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x231a70,_0x24c254)=>{const _0x56adc3=new DataTransfer();_0x56adc3['setData']('text/html',_0x24c254['html']);const _0x17e619=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x39d30e=>{this['_importMarker']['stopListening'](),_0x39d30e['setSelection'](_0x17e619),_0x1e8f0f['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x56adc3});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x45a41c,_0x407ebb={}){if(this['isBusy'])return Promise['resolve']();const _0x38077d=this['editor']['config']['get']('importWord'),_0x188e26={'url':_0x38077d['converterUrl'],'file':_0x45a41c,'serviceConfig':{..._0x407ebb,'formatting':_0x38077d['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x188e26)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x47760e=this['editor']['model'],_0x10f45a=_0x47760e['schema'],_0x166d84=_0x47760e['document']['selection'],_0x19d27d=_0x5549bf(_0x166d84['getSelectedBlocks']());return!!_0x19d27d&&_0x10f45a['checkChild'](_0x19d27d['parent'],'paragraph');}['_prepareForImport'](){const _0x5066d9=this['editor'],_0x139db0=_0x5066d9['model'],_0x3d3a8f=_0x139db0['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x5066d9['model']['createBatch']({'isUndoable':!0x0}),_0x139db0['enqueueChange'](this['_undoStepBatch'],_0x1f5b66=>{_0x3d3a8f['isCollapsed']||_0x139db0['deleteContent'](_0x3d3a8f,{'leaveUnmerged':!0x0});const _0x15c1f5=_0x3d3a8f['getFirstPosition'](),_0x23f2c6=_0x5549bf(_0x3d3a8f['getSelectedBlocks']());let _0x4bec36;_0x4bec36=_0x23f2c6['is']('element','paragraph')&&_0x23f2c6['isEmpty']?_0x15c1f5:_0x15c1f5['isAtStart']?_0x139db0['createPositionBefore'](_0x23f2c6):_0x15c1f5['isAtEnd']?_0x139db0['createPositionAfter'](_0x23f2c6):_0x1f5b66['split'](_0x15c1f5)['position'],this['_importMarker']=_0x1f5b66['addMarker']('importWord:'+_0xba4d71(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x151322(_0x4bec36)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x2ca5b1=this['editor']['model'];_0x2ca5b1['markers']['has'](this['_importMarker'])&&_0x2ca5b1['enqueueChange'](this['_undoStepBatch'],_0x2e024a=>{_0x2e024a['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0xf2cad1,file:_0x31b6eb,serviceConfig:_0x7c39c}){const _0x193f62=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x34393a=new FormData();_0x34393a['set']('config',JSON['stringify'](_0x7c39c)),_0x34393a['set']('file',_0x31b6eb);const _0x188bec={'method':'POST','headers':{},'body':_0x34393a,'signal':this['_abortController']['signal']};return _0x193f62&&(_0x188bec['headers']['Authorization']=_0x193f62['value']),fetch(_0xf2cad1,_0x188bec);}['_handleImportResponse'](_0x2365bc){return _0x2365bc['ok']?_0x2365bc['json']()['then'](_0x39d1b5=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x39d1b5);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x1ac41c('import-word-plugin-import-cancelled');const _0x290649=this['editor'],_0x1493fe=(0x0,_0x290649['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x290649['plugins']['get']('Notification')['showWarning'](_0x1493fe),_0x5712d7('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
const _0x170f91=_0x8adb;function _0x8adb(_0x39b069,_0x3e221f){const _0x2be024=_0x2be0();return _0x8adb=function(_0x8adb17,_0x1a189e){_0x8adb17=_0x8adb17-0x199;let _0x17dba4=_0x2be024[_0x8adb17];return _0x17dba4;},_0x8adb(_0x39b069,_0x3e221f);}(function(_0x6af6e1,_0x4f4589){const _0x2b7d9c=_0x8adb,_0x5b2bac=_0x6af6e1();while(!![]){try{const _0x107d5d=-parseInt(_0x2b7d9c(0x1af))/0x1+parseInt(_0x2b7d9c(0x1b3))/0x2+parseInt(_0x2b7d9c(0x1b0))/0x3+-parseInt(_0x2b7d9c(0x1b2))/0x4+-parseInt(_0x2b7d9c(0x1b7))/0x5+parseInt(_0x2b7d9c(0x19c))/0x6*(-parseInt(_0x2b7d9c(0x1b1))/0x7)+-parseInt(_0x2b7d9c(0x1a3))/0x8*(-parseInt(_0x2b7d9c(0x19b))/0x9);if(_0x107d5d===_0x4f4589)break;else _0x5b2bac['push'](_0x5b2bac['shift']());}catch(_0xafc4f3){_0x5b2bac['push'](_0x5b2bac['shift']());}}}(_0x2be0,0x557c1));import{Plugin as _0xf0724f}from'ckeditor5/src/core.js';import{Notification as _0x2511b7}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x495bb4}from'ckeditor5/src/clipboard.js';import _0xd558b from'./importwordcommand.js';export default class e extends _0xf0724f{static get[_0x170f91(0x19e)](){const _0x3086b4=_0x170f91;return _0x3086b4(0x1a2);}static get[_0x170f91(0x1aa)](){const _0x4e0c84=_0x170f91;return[_0x2511b7,_0x495bb4,_0x4e0c84(0x1a5)];}constructor(_0x1438f7){const _0x14150d=_0x170f91;super(_0x1438f7),this[_0x14150d(0x1a0)]=null;}async[_0x170f91(0x1ad)](){const _0x480761=_0x170f91,_0x58529c=this[_0x480761(0x19d)];_0x58529c[_0x480761(0x199)][_0x480761(0x1ab)](_0x480761(0x1ac),{'converterUrl':_0x480761(0x1a7),'tokenUrl':(_0x58529c[_0x480761(0x199)][_0x480761(0x1a1)](_0x480761(0x19a))||{})[_0x480761(0x1b4)],'formatting':{'resets':_0x480761(0x1b6),'defaults':_0x480761(0x1b6),'styles':_0x480761(0x1a9)}}),_0x58529c[_0x480761(0x1ae)][_0x480761(0x1a6)](_0x480761(0x1ac),new _0xd558b(_0x58529c));const {tokenUrl:_0x36bb4a}=_0x58529c[_0x480761(0x199)][_0x480761(0x1a1)](_0x480761(0x1ac));if(_0x36bb4a){const {tokenUrl:_0x5c4073}=_0x58529c[_0x480761(0x199)][_0x480761(0x1a1)](_0x480761(0x19a))||{};this[_0x480761(0x1a0)]=_0x36bb4a===_0x5c4073?_0x58529c[_0x480761(0x19f)][_0x480761(0x1a1)](_0x480761(0x1a5))[_0x480761(0x1a4)]:await _0x58529c[_0x480761(0x19f)][_0x480761(0x1a1)](_0x480761(0x1a5))[_0x480761(0x1b5)](_0x36bb4a);}}[_0x170f91(0x1a8)](){const _0x1e0bdd=_0x170f91;return this[_0x1e0bdd(0x1a0)];}}function _0x2be0(){const _0x4dfe56=['49252dDbGJt','1771444eRXVBT','184800fdrpjz','tokenUrl','registerTokenUrl','none','1157735jadBdZ','config','cloudServices','2943LwmfOC','450FinavK','editor','pluginName','plugins','_token','get','ImportWordEditing','34856ELSwaM','token','CloudServices','add','https://docx-converter.cke-cs.com/v2/convert/docx-html','getToken','inline','requires','define','importWord','init','commands','302940KiGVfX','1014162nxIata'];_0x2be0=function(){return _0x4dfe56;};return _0x2be0();}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x19dc96}from'ckeditor5/src/core.js';import{SpinnerView as _0x380737,FileDialogButtonView as _0x1e06f2,MenuBarMenuListItemFileDialogButtonView as _0x52dfea}from'ckeditor5/src/ui.js';import _0x19f6e1 from'../theme/icons/importword.svg';export default class o extends _0x19dc96{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x5ef601=this['editor'];_0x5ef601['ui']['componentFactory']['add']('importWord',()=>{const _0x434ca0=this['_createButton'](_0x1e06f2),_0x1df9f2=_0x5ef601['commands']['get']('importWord');return _0x434ca0['bind']('isOn')['to'](_0x1df9f2,'isBusy'),_0x434ca0['tooltip']=!0x0,_0x434ca0;}),_0x5ef601['ui']['componentFactory']['add']('menuBar:importWord',()=>this['_createButton'](_0x52dfea));}['_createButton'](_0x3f89a7){const _0x1d5f83=this['editor'],t=_0x1d5f83['locale']['t'],_0x2cb096=_0x1d5f83['commands']['get']('importWord'),_0x57cdce=new _0x3f89a7(_0x1d5f83['locale']),_0x4b503a=new _0x380737();return _0x57cdce['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x57cdce['set']({'label':t('Import\x20from\x20Word'),'icon':_0x19f6e1}),_0x57cdce['bind']('isEnabled')['to'](_0x2cb096),_0x4b503a['bind']('isVisible')['to'](_0x2cb096,'isBusy'),_0x57cdce['iconView']['bind']('isVisible')['to'](_0x2cb096,'isBusy',_0x2a7b36=>!_0x2a7b36),_0x57cdce['children']['add'](_0x4b503a),_0x57cdce['on']('done',(_0x260e6a,_0x42c6ec)=>{_0x1d5f83['execute']('importWord',_0x42c6ec[0x0],{}),_0x1d5f83['editing']['view']['focus']();}),_0x57cdce;}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x806c(){var _0x58b39a=['7341064wVzytz','67074Guvnuw','5126841vcHcrV','3LAQvWN','426829bXjiRJ','803UNzkvG','6SmVHrH','42170cGuoqk','516RTZlec','2915116ogdmRj','3sUexrk','416310gSuYKK','7mkzbty'];_0x806c=function(){return _0x58b39a;};return _0x806c();}function _0x73ad(_0x560ef0,_0x48b394){var _0x806cbf=_0x806c();return _0x73ad=function(_0x73ada2,_0x3c6e6a){_0x73ada2=_0x73ada2-0x1ae;var _0x4e9647=_0x806cbf[_0x73ada2];return _0x4e9647;},_0x73ad(_0x560ef0,_0x48b394);}(function(_0x2ee756,_0x7c2012){var _0x7a2a38=_0x73ad,_0x457131=_0x2ee756();while(!![]){try{var _0x4940fb=parseInt(_0x7a2a38(0x1b0))/0x1*(parseInt(_0x7a2a38(0x1ae))/0x2)+parseInt(_0x7a2a38(0x1b7))/0x3*(-parseInt(_0x7a2a38(0x1b6))/0x4)+parseInt(_0x7a2a38(0x1b8))/0x5*(parseInt(_0x7a2a38(0x1b3))/0x6)+parseInt(_0x7a2a38(0x1b9))/0x7*(parseInt(_0x7a2a38(0x1ba))/0x8)+-parseInt(_0x7a2a38(0x1af))/0x9+parseInt(_0x7a2a38(0x1b4))/0xa*(-parseInt(_0x7a2a38(0x1b2))/0xb)+-parseInt(_0x7a2a38(0x1b5))/0xc*(-parseInt(_0x7a2a38(0x1b1))/0xd);if(_0x4940fb===_0x7c2012)break;else _0x457131['push'](_0x457131['shift']());}catch(_0x4a231d){_0x457131['push'](_0x457131['shift']());}}}(_0x806c,0xdd730));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
|