@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240418.0 → 0.0.0-nightly-20240420.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:()=>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 l(t,e){const r=d();return(l=function(t,e){return r[t-=314]})(t,e)}const p=l;function d(){const t=["registerTokenUrl","3732ybXiDd","40sAeMOb","2060QHyUkM","635922PUAwJY","init","requires","inline","token","editor","cloudServices","add","pluginName","7sxvsKS","get","CloudServices","4477527BorhXV","1761940dLwVCD","_token","1407045zDCpPJ","tokenUrl","https://docx-converter.cke-cs.com/v2/convert/docx-html","importWord","define","plugins","getToken","ImportWordEditing","commands","3069032wQLTOx","none","config","1298652TNTVET"];return(d=function(){return t})()}!function(t,e){const r=l,o=t();for(;;)try{if(435157===-parseInt(r(324))/1+-parseInt(r(319))/2+-parseInt(r(339))/3+-parseInt(r(337))/4+parseInt(r(323))/5*(parseInt(r(321))/6)+-parseInt(r(333))/7*(-parseInt(r(316))/8)+parseInt(r(336))/9*(parseInt(r(322))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class u extends t.Plugin{static get[p(332)](){return p(314)}static get[p(326)](){const t=p;return[e.Notification,i.ClipboardPipeline,t(335)]}constructor(t){const e=p;super(t),this[e(338)]=null}async[p(325)](){const t=p,e=this[t(329)];e[t(318)][t(343)](t(342),{converterUrl:t(341),tokenUrl:(e[t(318)][t(334)](t(330))||{})[t(340)],formatting:{resets:t(317),defaults:t(317),styles:t(327)}}),e[t(315)][t(331)](t(342),new c(e));const{tokenUrl:r}=e[t(318)][t(334)](t(342));if(r){const{tokenUrl:o}=e[t(318)][t(334)](t(330))||{};this[t(338)]=r===o?e[t(344)][t(334)](t(335))[t(328)]:await e[t(344)][t(334)](t(335))[t(320)](r)}}[p(345)](){return this[p(338)]}}var h=m;function m(t,e){var r=f();return(m=function(t,e){return r[t-=229]})(t,e)}function f(){var t=["14kXazlb","1160592GkBFHS","1240874KAzmCx","requires","ImportWord","144bqQALe","4769664GcVeLG","2542250mmfJPt","28tNbEAA","980430UfWwSf","pluginName","212431hWNCEj","7611SKgQor"];return(f=function(){return t})()}!function(t,e){for(var r=m,o=t();;)try{if(313081===-parseInt(r(235))/1+parseInt(r(239))/2+parseInt(r(236))/3*(-parseInt(r(232))/4)+parseInt(r(231))/5+parseInt(r(238))/6*(parseInt(r(237))/7)+parseInt(r(230))/8+-parseInt(r(229))/9*(parseInt(r(233))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class g extends t.Plugin{static get[h(234)](){return h(241)}static get[h(240)](){return[u,n]}}function I(t,e){var r=v();return(I=function(t,e){return r[t-=328]})(t,e)}function v(){var t=["3028553ESnMVA","6hVYwIR","8KLkIwD","19436Reuvml","60EJLaBa","958779pYFIeL","537RVMvNP","743620ublKRI","2189250fwEDVn","16933WcEUpr","456tBfUBf"];return(v=function(){return t})()}!function(t,e){for(var r=I,o=t();;)try{if(118606===-parseInt(r(333))/1*(-parseInt(r(337))/2)+parseInt(r(331))/3*(parseInt(r(330))/4)+-parseInt(r(334))/5+-parseInt(r(328))/6*(parseInt(r(336))/7)+parseInt(r(329))/8*(parseInt(r(332))/9)+parseInt(r(335))/10+-parseInt(r(338))/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-20240420.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-20240420.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 _0x41228b=_0x21c5;(function(_0xaa00ca,_0x38b01a){var _0x333590=_0x21c5,_0x3b865e=_0xaa00ca();while(!![]){try{var _0x48fa89=-parseInt(_0x333590(0xeb))/0x1+parseInt(_0x333590(0xef))/0x2+parseInt(_0x333590(0xec))/0x3*(-parseInt(_0x333590(0xe8))/0x4)+parseInt(_0x333590(0xe7))/0x5+parseInt(_0x333590(0xee))/0x6*(parseInt(_0x333590(0xed))/0x7)+parseInt(_0x333590(0xe6))/0x8+-parseInt(_0x333590(0xe5))/0x9*(parseInt(_0x333590(0xe9))/0xa);if(_0x48fa89===_0x38b01a)break;else _0x3b865e['push'](_0x3b865e['shift']());}catch(_0x10bb42){_0x3b865e['push'](_0x3b865e['shift']());}}}(_0x4965,0x4c6f9));import{Plugin as _0x56295a}from'ckeditor5/src/core.js';function _0x21c5(_0x21eb48,_0x293835){var _0x4965fc=_0x4965();return _0x21c5=function(_0x21c58a,_0x362ae3){_0x21c58a=_0x21c58a-0xe5;var _0x5d9382=_0x4965fc[_0x21c58a];return _0x5d9382;},_0x21c5(_0x21eb48,_0x293835);}import _0x26b201 from'./importwordui.js';function _0x4965(){var _0x3e7030=['14kXazlb','1160592GkBFHS','1240874KAzmCx','requires','ImportWord','144bqQALe','4769664GcVeLG','2542250mmfJPt','28tNbEAA','980430UfWwSf','pluginName','212431hWNCEj','7611SKgQor'];_0x4965=function(){return _0x3e7030;};return _0x4965();}import _0x5440df from'./importwordediting.js';export default class i extends _0x56295a{static get[_0x41228b(0xea)](){var _0x2c52b8=_0x41228b;return _0x2c52b8(0xf1);}static get[_0x41228b(0xf0)](){return[_0x5440df,_0x26b201];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x7ba29}from'ckeditor5/src/core.js';import{Range as _0x3e9f94}from'ckeditor5/src/engine.js';import{logWarning as _0x5df6c9,logError as _0x2d9f46,first as _0x4abda7,uid as _0x14998a}from'ckeditor5/src/utils.js';export default class d extends _0x7ba29{constructor(_0x5d9485){super(_0x5d9485),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x80b5d5,_0x1807b5)=>{const _0x4c2152=new DataTransfer();_0x4c2152['setData']('text/html',_0x1807b5['html']);const _0x137488=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x281746=>{this['_importMarker']['stopListening'](),_0x281746['setSelection'](_0x137488),_0x5d9485['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x4c2152});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x554191,_0x142d1c={}){if(this['isBusy'])return Promise['resolve']();const _0x109dee=this['editor']['config']['get']('importWord'),_0x4a8dad={'url':_0x109dee['converterUrl'],'file':_0x554191,'serviceConfig':{..._0x142d1c,'formatting':_0x109dee['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x4a8dad)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x3bda6f=this['editor']['model'],_0x6129=_0x3bda6f['schema'],_0x1a2b4f=_0x3bda6f['document']['selection'],_0x1fe302=_0x4abda7(_0x1a2b4f['getSelectedBlocks']());return!!_0x1fe302&&_0x6129['checkChild'](_0x1fe302['parent'],'paragraph');}['_prepareForImport'](){const _0x3ac79a=this['editor'],_0xebfb7b=_0x3ac79a['model'],_0xb33b19=_0xebfb7b['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x3ac79a['model']['createBatch']({'isUndoable':!0x0}),_0xebfb7b['enqueueChange'](this['_undoStepBatch'],_0x51b9bc=>{_0xb33b19['isCollapsed']||_0xebfb7b['deleteContent'](_0xb33b19,{'leaveUnmerged':!0x0});const _0x38c259=_0xb33b19['getFirstPosition'](),_0x31b7bd=_0x4abda7(_0xb33b19['getSelectedBlocks']());let _0xefff42;_0xefff42=_0x31b7bd['is']('element','paragraph')&&_0x31b7bd['isEmpty']?_0x38c259:_0x38c259['isAtStart']?_0xebfb7b['createPositionBefore'](_0x31b7bd):_0x38c259['isAtEnd']?_0xebfb7b['createPositionAfter'](_0x31b7bd):_0x51b9bc['split'](_0x38c259)['position'],this['_importMarker']=_0x51b9bc['addMarker']('importWord:'+_0x14998a(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x3e9f94(_0xefff42)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x47154d=this['editor']['model'];_0x47154d['markers']['has'](this['_importMarker'])&&_0x47154d['enqueueChange'](this['_undoStepBatch'],_0xe00f13=>{_0xe00f13['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x4a2391,file:_0xa9904c,serviceConfig:_0x32dafe}){const _0x55adc8=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x368cb7=new FormData();_0x368cb7['set']('config',JSON['stringify'](_0x32dafe)),_0x368cb7['set']('file',_0xa9904c);const _0x5989f4={'method':'POST','headers':{},'body':_0x368cb7,'signal':this['_abortController']['signal']};return _0x55adc8&&(_0x5989f4['headers']['Authorization']=_0x55adc8['value']),fetch(_0x4a2391,_0x5989f4);}['_handleImportResponse'](_0x19cc1e){return _0x19cc1e['ok']?_0x19cc1e['json']()['then'](_0x24a40a=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x24a40a);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x5df6c9('import-word-plugin-import-cancelled');const _0x2b803b=this['editor'],_0x20b412=(0x0,_0x2b803b['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x2b803b['plugins']['get']('Notification')['showWarning'](_0x20b412),_0x2d9f46('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x19a8(_0x138f7c,_0x1fbf2f){const _0x532f89=_0x532f();return _0x19a8=function(_0x19a881,_0x249fd6){_0x19a881=_0x19a881-0x13a;let _0x54391f=_0x532f89[_0x19a881];return _0x54391f;},_0x19a8(_0x138f7c,_0x1fbf2f);}const _0x12193a=_0x19a8;(function(_0x19d05b,_0x1ec778){const _0x1dfa7c=_0x19a8,_0xb3e08d=_0x19d05b();while(!![]){try{const _0x164ac2=-parseInt(_0x1dfa7c(0x144))/0x1+-parseInt(_0x1dfa7c(0x13f))/0x2+-parseInt(_0x1dfa7c(0x153))/0x3+-parseInt(_0x1dfa7c(0x151))/0x4+parseInt(_0x1dfa7c(0x143))/0x5*(parseInt(_0x1dfa7c(0x141))/0x6)+-parseInt(_0x1dfa7c(0x14d))/0x7*(-parseInt(_0x1dfa7c(0x13c))/0x8)+parseInt(_0x1dfa7c(0x150))/0x9*(parseInt(_0x1dfa7c(0x142))/0xa);if(_0x164ac2===_0x1ec778)break;else _0xb3e08d['push'](_0xb3e08d['shift']());}catch(_0x1058b4){_0xb3e08d['push'](_0xb3e08d['shift']());}}}(_0x532f,0x6a3d5));import{Plugin as _0x5fb2e7}from'ckeditor5/src/core.js';function _0x532f(){const _0x861052=['registerTokenUrl','3732ybXiDd','40sAeMOb','2060QHyUkM','635922PUAwJY','init','requires','inline','token','editor','cloudServices','add','pluginName','7sxvsKS','get','CloudServices','4477527BorhXV','1761940dLwVCD','_token','1407045zDCpPJ','tokenUrl','https://docx-converter.cke-cs.com/v2/convert/docx-html','importWord','define','plugins','getToken','ImportWordEditing','commands','3069032wQLTOx','none','config','1298652TNTVET'];_0x532f=function(){return _0x861052;};return _0x532f();}import{Notification as _0x41d710}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x4db61a}from'ckeditor5/src/clipboard.js';import _0x3bb1f8 from'./importwordcommand.js';export default class e extends _0x5fb2e7{static get[_0x12193a(0x14c)](){const _0x4b7a07=_0x12193a;return _0x4b7a07(0x13a);}static get[_0x12193a(0x146)](){const _0x3699bd=_0x12193a;return[_0x41d710,_0x4db61a,_0x3699bd(0x14f)];}constructor(_0x2ee0dc){const _0x4c5d49=_0x12193a;super(_0x2ee0dc),this[_0x4c5d49(0x152)]=null;}async[_0x12193a(0x145)](){const _0x2754f9=_0x12193a,_0xefaf11=this[_0x2754f9(0x149)];_0xefaf11[_0x2754f9(0x13e)][_0x2754f9(0x157)](_0x2754f9(0x156),{'converterUrl':_0x2754f9(0x155),'tokenUrl':(_0xefaf11[_0x2754f9(0x13e)][_0x2754f9(0x14e)](_0x2754f9(0x14a))||{})[_0x2754f9(0x154)],'formatting':{'resets':_0x2754f9(0x13d),'defaults':_0x2754f9(0x13d),'styles':_0x2754f9(0x147)}}),_0xefaf11[_0x2754f9(0x13b)][_0x2754f9(0x14b)](_0x2754f9(0x156),new _0x3bb1f8(_0xefaf11));const {tokenUrl:_0x4e9178}=_0xefaf11[_0x2754f9(0x13e)][_0x2754f9(0x14e)](_0x2754f9(0x156));if(_0x4e9178){const {tokenUrl:_0x3dda40}=_0xefaf11[_0x2754f9(0x13e)][_0x2754f9(0x14e)](_0x2754f9(0x14a))||{};this[_0x2754f9(0x152)]=_0x4e9178===_0x3dda40?_0xefaf11[_0x2754f9(0x158)][_0x2754f9(0x14e)](_0x2754f9(0x14f))[_0x2754f9(0x148)]:await _0xefaf11[_0x2754f9(0x158)][_0x2754f9(0x14e)](_0x2754f9(0x14f))[_0x2754f9(0x140)](_0x4e9178);}}[_0x12193a(0x159)](){const _0x47d625=_0x12193a;return this[_0x47d625(0x152)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x547f10}from'ckeditor5/src/core.js';import{SpinnerView as _0x406258,FileDialogButtonView as _0x11fbe7,MenuBarMenuListItemFileDialogButtonView as _0x4a87aa}from'ckeditor5/src/ui.js';import _0x12807d from'../theme/icons/importword.svg';export default class o extends _0x547f10{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x5e348c=this['editor'];_0x5e348c['ui']['componentFactory']['add']('importWord',()=>{const _0x5398ea=this['_createButton'](_0x11fbe7),_0xa12a95=_0x5e348c['commands']['get']('importWord');return _0x5398ea['bind']('isOn')['to'](_0xa12a95,'isBusy'),_0x5398ea['tooltip']=!0x0,_0x5398ea;}),_0x5e348c['ui']['componentFactory']['add']('menuBar:importWord',()=>this['_createButton'](_0x4a87aa));}['_createButton'](_0x16f968){const _0x1628d9=this['editor'],t=_0x1628d9['locale']['t'],_0x3b0889=_0x1628d9['commands']['get']('importWord'),_0x2a2eb1=new _0x16f968(_0x1628d9['locale']),_0x22ab7e=new _0x406258();return _0x2a2eb1['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x2a2eb1['set']({'label':t('Import\x20from\x20Word'),'icon':_0x12807d}),_0x2a2eb1['bind']('isEnabled')['to'](_0x3b0889),_0x22ab7e['bind']('isVisible')['to'](_0x3b0889,'isBusy'),_0x2a2eb1['iconView']['bind']('isVisible')['to'](_0x3b0889,'isBusy',_0x5c3e4d=>!_0x5c3e4d),_0x2a2eb1['children']['add'](_0x22ab7e),_0x2a2eb1['on']('done',(_0xf73b01,_0x3176bf)=>{_0x1628d9['execute']('importWord',_0x3176bf[0x0],{}),_0x1628d9['editing']['view']['focus']();}),_0x2a2eb1;}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x1ea164,_0x23f683){var _0x2ffb8d=_0x17d9,_0x2ca9e6=_0x1ea164();while(!![]){try{var _0x2b8501=-parseInt(_0x2ffb8d(0x14d))/0x1*(-parseInt(_0x2ffb8d(0x151))/0x2)+parseInt(_0x2ffb8d(0x14b))/0x3*(parseInt(_0x2ffb8d(0x14a))/0x4)+-parseInt(_0x2ffb8d(0x14e))/0x5+-parseInt(_0x2ffb8d(0x148))/0x6*(parseInt(_0x2ffb8d(0x150))/0x7)+parseInt(_0x2ffb8d(0x149))/0x8*(parseInt(_0x2ffb8d(0x14c))/0x9)+parseInt(_0x2ffb8d(0x14f))/0xa+-parseInt(_0x2ffb8d(0x152))/0xb;if(_0x2b8501===_0x23f683)break;else _0x2ca9e6['push'](_0x2ca9e6['shift']());}catch(_0x711063){_0x2ca9e6['push'](_0x2ca9e6['shift']());}}}(_0x58df,0x1cf4e));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';function _0x17d9(_0x15eeff,_0x4ea632){var _0x58dfb7=_0x58df();return _0x17d9=function(_0x17d950,_0x120ecf){_0x17d950=_0x17d950-0x148;var _0xd41b17=_0x58dfb7[_0x17d950];return _0xd41b17;},_0x17d9(_0x15eeff,_0x4ea632);}import'./augmentation.js';function _0x58df(){var _0x36c282=['3028553ESnMVA','6hVYwIR','8KLkIwD','19436Reuvml','60EJLaBa','958779pYFIeL','537RVMvNP','743620ublKRI','2189250fwEDVn','16933WcEUpr','456tBfUBf'];_0x58df=function(){return _0x36c282;};return _0x58df();}
|