@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240415.0 → 0.0.0-nightly-20240417.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:()=>g,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")}}const p=d;function l(){const t=["_token","1907504eVQqMG","add","define","tokenUrl","15gREjOr","1711586JYOeQO","importWord","inline","none","7aJJspn","pluginName","token","cloudServices","registerTokenUrl","6253566CCbput","4561405QJQEpB","editor","CloudServices","446324MUkYrn","commands","get","plugins","config","getToken","ImportWordEditing","init","27539721BmQHzp","615020DVBmyB","https://docx-converter.cke-cs.com/v2/convert/docx-html","requires"];return(l=function(){return t})()}function d(t,e){const r=l();return(d=function(t,e){return r[t-=419]})(t,e)}!function(t,e){const r=d,o=t();for(;;)try{if(549857===-parseInt(r(422))/1+parseInt(r(431))/2+parseInt(r(430))/3*(-parseInt(r(444))/4)+-parseInt(r(441))/5+-parseInt(r(440))/6*(parseInt(r(435))/7)+-parseInt(r(426))/8+parseInt(r(421))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(l);class u extends t.Plugin{static get[p(436)](){return p(419)}static get[p(424)](){const t=p;return[e.Notification,i.ClipboardPipeline,t(443)]}constructor(t){const e=p;super(t),this[e(425)]=null}async[p(420)](){const t=p,e=this[t(442)];e[t(448)][t(428)](t(432),{converterUrl:t(423),tokenUrl:(e[t(448)][t(446)](t(438))||{})[t(429)],formatting:{resets:t(434),defaults:t(434),styles:t(433)}}),e[t(445)][t(427)](t(432),new c(e));const{tokenUrl:r}=e[t(448)][t(446)](t(432));if(r){const{tokenUrl:o}=e[t(448)][t(446)](t(438))||{};this[t(425)]=r===o?e[t(447)][t(446)](t(443))[t(437)]:await e[t(447)][t(446)](t(443))[t(439)](r)}}[p(449)](){return this[p(425)]}}function h(){var t=["284212mlGeTQ","pluginName","3dJLBMa","1688LhwDQp","9567ZGrnxE","702390VmPwgy","234793pNIclM","4zOjOKS","3177070OWBbQo","887564ukQOlQ","6481816OwJceo","10FspQTB","1032jwLAGY","ImportWord","7ImjiLz","requires"];return(h=function(){return t})()}function m(t,e){var r=h();return(m=function(t,e){return r[t-=183]})(t,e)}var f=m;!function(t,e){for(var r=m,o=t();;)try{if(333751===parseInt(r(197))/1*(parseInt(r(190))/2)+-parseInt(r(192))/3*(parseInt(r(183))/4)+-parseInt(r(198))/5+-parseInt(r(195))/6*(parseInt(r(188))/7)+-parseInt(r(193))/8*(parseInt(r(194))/9)+-parseInt(r(185))/10*(parseInt(r(184))/11)+-parseInt(r(186))/12*(-parseInt(r(196))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(h);class g extends t.Plugin{static get[f(191)](){return f(187)}static get[f(189)](){return[u,n]}}function I(t,e){var r=v();return(I=function(t,e){return r[t-=198]})(t,e)}function v(){var t=["91752xHzeIk","240odUPur","324LYyADM","79376aiPhBX","594SffGFY","48097rJEirE","189994aIvgSA","1202GwxJnu","1710155ziHNrK","2917648PcxOVC","3351qMBfik"];return(v=function(){return t})()}!function(t,e){for(var r=I,o=t();;)try{if(568091===parseInt(r(203))/1+parseInt(r(204))/2*(parseInt(r(207))/3)+-parseInt(r(206))/4+parseInt(r(205))/5+parseInt(r(201))/6*(parseInt(r(202))/7)+-parseInt(r(208))/8*(parseInt(r(199))/9)+parseInt(r(198))/10*(-parseInt(r(200))/11))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-20240417.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-20240417.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 _0x68cb(){var _0x3418c8=['284212mlGeTQ','pluginName','3dJLBMa','1688LhwDQp','9567ZGrnxE','702390VmPwgy','234793pNIclM','4zOjOKS','3177070OWBbQo','887564ukQOlQ','6481816OwJceo','10FspQTB','1032jwLAGY','ImportWord','7ImjiLz','requires'];_0x68cb=function(){return _0x3418c8;};return _0x68cb();}function _0x19cd(_0x237565,_0x278b74){var _0x68cb78=_0x68cb();return _0x19cd=function(_0x19cdb8,_0x15fc4a){_0x19cdb8=_0x19cdb8-0xb7;var _0x238f10=_0x68cb78[_0x19cdb8];return _0x238f10;},_0x19cd(_0x237565,_0x278b74);}var _0x1d7578=_0x19cd;(function(_0x36e7e9,_0x18065e){var _0x373c0a=_0x19cd,_0x48b181=_0x36e7e9();while(!![]){try{var _0x57e796=parseInt(_0x373c0a(0xc5))/0x1*(parseInt(_0x373c0a(0xbe))/0x2)+-parseInt(_0x373c0a(0xc0))/0x3*(parseInt(_0x373c0a(0xb7))/0x4)+-parseInt(_0x373c0a(0xc6))/0x5+-parseInt(_0x373c0a(0xc3))/0x6*(parseInt(_0x373c0a(0xbc))/0x7)+-parseInt(_0x373c0a(0xc1))/0x8*(parseInt(_0x373c0a(0xc2))/0x9)+-parseInt(_0x373c0a(0xb9))/0xa*(parseInt(_0x373c0a(0xb8))/0xb)+-parseInt(_0x373c0a(0xba))/0xc*(-parseInt(_0x373c0a(0xc4))/0xd);if(_0x57e796===_0x18065e)break;else _0x48b181['push'](_0x48b181['shift']());}catch(_0x4b0516){_0x48b181['push'](_0x48b181['shift']());}}}(_0x68cb,0x517b7));import{Plugin as _0x111008}from'ckeditor5/src/core.js';import _0x207f1f from'./importwordui.js';import _0x4b4a4d from'./importwordediting.js';export default class i extends _0x111008{static get[_0x1d7578(0xbf)](){var _0x3fd4eb=_0x1d7578;return _0x3fd4eb(0xbb);}static get[_0x1d7578(0xbd)](){return[_0x4b4a4d,_0x207f1f];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x4c9863}from'ckeditor5/src/core.js';import{Range as _0x23b1f5}from'ckeditor5/src/engine.js';import{logWarning as _0x29a3a0,logError as _0x2cac47,first as _0x3a239a,uid as _0x340d88}from'ckeditor5/src/utils.js';export default class d extends _0x4c9863{constructor(_0x48e9d2){super(_0x48e9d2),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x19077d,_0x4da3d7)=>{const _0x574ced=new DataTransfer();_0x574ced['setData']('text/html',_0x4da3d7['html']);const _0x51bd2a=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x118c7c=>{this['_importMarker']['stopListening'](),_0x118c7c['setSelection'](_0x51bd2a),_0x48e9d2['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x574ced});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2bd0cf,_0x385d03={}){if(this['isBusy'])return Promise['resolve']();const _0x14d38e=this['editor']['config']['get']('importWord'),_0x3a3c73={'url':_0x14d38e['converterUrl'],'file':_0x2bd0cf,'serviceConfig':{..._0x385d03,'formatting':_0x14d38e['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x3a3c73)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x3a6b0e=this['editor']['model'],_0x1313c3=_0x3a6b0e['schema'],_0x2b89de=_0x3a6b0e['document']['selection'],_0x3c7186=_0x3a239a(_0x2b89de['getSelectedBlocks']());return!!_0x3c7186&&_0x1313c3['checkChild'](_0x3c7186['parent'],'paragraph');}['_prepareForImport'](){const _0x4aba5d=this['editor'],_0x175a31=_0x4aba5d['model'],_0x35d318=_0x175a31['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x4aba5d['model']['createBatch']({'isUndoable':!0x0}),_0x175a31['enqueueChange'](this['_undoStepBatch'],_0x4d6788=>{_0x35d318['isCollapsed']||_0x175a31['deleteContent'](_0x35d318,{'leaveUnmerged':!0x0});const _0x2143c2=_0x35d318['getFirstPosition'](),_0x4da6bd=_0x3a239a(_0x35d318['getSelectedBlocks']());let _0x2fff3a;_0x2fff3a=_0x4da6bd['is']('element','paragraph')&&_0x4da6bd['isEmpty']?_0x2143c2:_0x2143c2['isAtStart']?_0x175a31['createPositionBefore'](_0x4da6bd):_0x2143c2['isAtEnd']?_0x175a31['createPositionAfter'](_0x4da6bd):_0x4d6788['split'](_0x2143c2)['position'],this['_importMarker']=_0x4d6788['addMarker']('importWord:'+_0x340d88(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x23b1f5(_0x2fff3a)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x202683=this['editor']['model'];_0x202683['markers']['has'](this['_importMarker'])&&_0x202683['enqueueChange'](this['_undoStepBatch'],_0x5e9638=>{_0x5e9638['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x333a5,file:_0x2370d8,serviceConfig:_0x11a9b1}){const _0x119ac1=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x42b6c6=new FormData();_0x42b6c6['set']('config',JSON['stringify'](_0x11a9b1)),_0x42b6c6['set']('file',_0x2370d8);const _0x1fba63={'method':'POST','headers':{},'body':_0x42b6c6,'signal':this['_abortController']['signal']};return _0x119ac1&&(_0x1fba63['headers']['Authorization']=_0x119ac1['value']),fetch(_0x333a5,_0x1fba63);}['_handleImportResponse'](_0x5d672a){return _0x5d672a['ok']?_0x5d672a['json']()['then'](_0x247794=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x247794);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x29a3a0('import-word-plugin-import-cancelled');const _0x3fcd8c=this['editor'],_0x474d07=(0x0,_0x3fcd8c['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x3fcd8c['plugins']['get']('Notification')['showWarning'](_0x474d07),_0x2cac47('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x141e0d=_0x3a97;(function(_0x21aba6,_0x503276){const _0x42db28=_0x3a97,_0x5e4067=_0x21aba6();while(!![]){try{const _0x357003=-parseInt(_0x42db28(0x1a6))/0x1+parseInt(_0x42db28(0x1af))/0x2+parseInt(_0x42db28(0x1ae))/0x3*(-parseInt(_0x42db28(0x1bc))/0x4)+-parseInt(_0x42db28(0x1b9))/0x5+-parseInt(_0x42db28(0x1b8))/0x6*(parseInt(_0x42db28(0x1b3))/0x7)+-parseInt(_0x42db28(0x1aa))/0x8+parseInt(_0x42db28(0x1a5))/0x9;if(_0x357003===_0x503276)break;else _0x5e4067['push'](_0x5e4067['shift']());}catch(_0x93f9e5){_0x5e4067['push'](_0x5e4067['shift']());}}}(_0x3635,0x863e1));function _0x3635(){const _0x3389af=['_token','1907504eVQqMG','add','define','tokenUrl','15gREjOr','1711586JYOeQO','importWord','inline','none','7aJJspn','pluginName','token','cloudServices','registerTokenUrl','6253566CCbput','4561405QJQEpB','editor','CloudServices','446324MUkYrn','commands','get','plugins','config','getToken','ImportWordEditing','init','27539721BmQHzp','615020DVBmyB','https://docx-converter.cke-cs.com/v2/convert/docx-html','requires'];_0x3635=function(){return _0x3389af;};return _0x3635();}import{Plugin as _0x27eaa1}from'ckeditor5/src/core.js';import{Notification as _0x333970}from'ckeditor5/src/ui.js';function _0x3a97(_0x573835,_0x31b092){const _0x363588=_0x3635();return _0x3a97=function(_0x3a97f4,_0xbc9ee5){_0x3a97f4=_0x3a97f4-0x1a3;let _0x498644=_0x363588[_0x3a97f4];return _0x498644;},_0x3a97(_0x573835,_0x31b092);}import{ClipboardPipeline as _0x1c8dc0}from'ckeditor5/src/clipboard.js';import _0xc87aeb from'./importwordcommand.js';export default class e extends _0x27eaa1{static get[_0x141e0d(0x1b4)](){const _0x29db12=_0x141e0d;return _0x29db12(0x1a3);}static get[_0x141e0d(0x1a8)](){const _0x48e1b7=_0x141e0d;return[_0x333970,_0x1c8dc0,_0x48e1b7(0x1bb)];}constructor(_0x6a42a1){const _0x3795cc=_0x141e0d;super(_0x6a42a1),this[_0x3795cc(0x1a9)]=null;}async[_0x141e0d(0x1a4)](){const _0x2bbdf3=_0x141e0d,_0x13a8c3=this[_0x2bbdf3(0x1ba)];_0x13a8c3[_0x2bbdf3(0x1c0)][_0x2bbdf3(0x1ac)](_0x2bbdf3(0x1b0),{'converterUrl':_0x2bbdf3(0x1a7),'tokenUrl':(_0x13a8c3[_0x2bbdf3(0x1c0)][_0x2bbdf3(0x1be)](_0x2bbdf3(0x1b6))||{})[_0x2bbdf3(0x1ad)],'formatting':{'resets':_0x2bbdf3(0x1b2),'defaults':_0x2bbdf3(0x1b2),'styles':_0x2bbdf3(0x1b1)}}),_0x13a8c3[_0x2bbdf3(0x1bd)][_0x2bbdf3(0x1ab)](_0x2bbdf3(0x1b0),new _0xc87aeb(_0x13a8c3));const {tokenUrl:_0x52068f}=_0x13a8c3[_0x2bbdf3(0x1c0)][_0x2bbdf3(0x1be)](_0x2bbdf3(0x1b0));if(_0x52068f){const {tokenUrl:_0x3013ac}=_0x13a8c3[_0x2bbdf3(0x1c0)][_0x2bbdf3(0x1be)](_0x2bbdf3(0x1b6))||{};this[_0x2bbdf3(0x1a9)]=_0x52068f===_0x3013ac?_0x13a8c3[_0x2bbdf3(0x1bf)][_0x2bbdf3(0x1be)](_0x2bbdf3(0x1bb))[_0x2bbdf3(0x1b5)]:await _0x13a8c3[_0x2bbdf3(0x1bf)][_0x2bbdf3(0x1be)](_0x2bbdf3(0x1bb))[_0x2bbdf3(0x1b7)](_0x52068f);}}[_0x141e0d(0x1c1)](){const _0xb779b6=_0x141e0d;return this[_0xb779b6(0x1a9)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x18e982}from'ckeditor5/src/core.js';import{SpinnerView as _0x5e665b,FileDialogButtonView as _0x37e32b,MenuBarMenuListItemFileDialogButtonView as _0xfc49ee}from'ckeditor5/src/ui.js';import _0x2d9c51 from'../theme/icons/importword.svg';export default class o extends _0x18e982{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x475c64=this['editor'];_0x475c64['ui']['componentFactory']['add']('importWord',()=>{const _0x2f44c9=this['_createButton'](_0x37e32b),_0x1e350c=_0x475c64['commands']['get']('importWord');return _0x2f44c9['bind']('isOn')['to'](_0x1e350c,'isBusy'),_0x2f44c9['tooltip']=!0x0,_0x2f44c9;}),_0x475c64['ui']['componentFactory']['add']('menuBar:importWord',()=>this['_createButton'](_0xfc49ee));}['_createButton'](_0x2fcd14){const _0x5d35db=this['editor'],t=_0x5d35db['locale']['t'],_0x3be14f=_0x5d35db['commands']['get']('importWord'),_0x451de5=new _0x2fcd14(_0x5d35db['locale']),_0x3ddbdb=new _0x5e665b();return _0x451de5['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x451de5['set']({'label':t('Import\x20from\x20Word'),'icon':_0x2d9c51}),_0x451de5['bind']('isEnabled')['to'](_0x3be14f),_0x3ddbdb['bind']('isVisible')['to'](_0x3be14f,'isBusy'),_0x451de5['iconView']['bind']('isVisible')['to'](_0x3be14f,'isBusy',_0x49886f=>!_0x49886f),_0x451de5['children']['add'](_0x3ddbdb),_0x451de5['on']('done',(_0x16fa20,_0x22d7c6)=>{_0x5d35db['execute']('importWord',_0x22d7c6[0x0],{}),_0x5d35db['editing']['view']['focus']();}),_0x451de5;}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x598bb4,_0x2e0c06){var _0x266c6e=_0x5d14,_0x227e42=_0x598bb4();while(!![]){try{var _0x3f699c=parseInt(_0x266c6e(0xcb))/0x1+parseInt(_0x266c6e(0xcc))/0x2*(parseInt(_0x266c6e(0xcf))/0x3)+-parseInt(_0x266c6e(0xce))/0x4+parseInt(_0x266c6e(0xcd))/0x5+parseInt(_0x266c6e(0xc9))/0x6*(parseInt(_0x266c6e(0xca))/0x7)+-parseInt(_0x266c6e(0xd0))/0x8*(parseInt(_0x266c6e(0xc7))/0x9)+parseInt(_0x266c6e(0xc6))/0xa*(-parseInt(_0x266c6e(0xc8))/0xb);if(_0x3f699c===_0x2e0c06)break;else _0x227e42['push'](_0x227e42['shift']());}catch(_0x41a703){_0x227e42['push'](_0x227e42['shift']());}}}(_0x27c2,0x8ab1b));function _0x5d14(_0x1878a3,_0x29fc61){var _0x27c255=_0x27c2();return _0x5d14=function(_0x5d1476,_0x453d5c){_0x5d1476=_0x5d1476-0xc6;var _0x58309e=_0x27c255[_0x5d1476];return _0x58309e;},_0x5d14(_0x1878a3,_0x29fc61);}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 _0x27c2(){var _0x187ecd=['91752xHzeIk','240odUPur','324LYyADM','79376aiPhBX','594SffGFY','48097rJEirE','189994aIvgSA','1202GwxJnu','1710155ziHNrK','2917648PcxOVC','3351qMBfik'];_0x27c2=function(){return _0x187ecd;};return _0x27c2();}
|