@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240324.0 → 0.0.0-nightly-20240326.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/import-word.js +1 -1
- package/package.json +2 -2
- package/src/importword.js +1 -1
- package/src/importwordcommand.js +1 -1
- package/src/importwordediting.js +1 -1
- package/src/importwordui.js +1 -1
- package/src/index.js +1 -1
package/build/import-word.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),n=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(o=>{const i=t.commands.get("importWord"),s=new n.FileDialogButtonView(o),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),
|
|
5
|
+
*/(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),n=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(o=>{const i=t.commands.get("importWord"),s=new n.FileDialogButtonView(o),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),p=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,p.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,p.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,p.uid)(),{usingOperation:!1,affectsData:!1,range:new a.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,p.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,p.logError)("import-word-plugin-conversion-failed")}}function l(){const t=["getToken","2868732cOyjpG","1901672jpPQia","1036JPoqek","4323018SCWYPT","15286yPqqgL","CloudServices","plugins","pluginName","importWord","requires","5zGeGmF","2742AfLAVw","commands","editor","config","define","13202079qSfTue","registerTokenUrl","https://docx-converter.cke-cs.com/v2/convert/docx-html","130QWldPd","276201msQDrX","tokenUrl","add","_token","cloudServices","ImportWordEditing","get","none","81hdSUIr","token","init","inline"];return(l=function(){return t})()}const d=u;function u(t,e){const r=l();return(u=function(t,e){return r[t-=313]})(t,e)}!function(t,e){const r=u,o=t();for(;;)try{if(325602===parseInt(r(318))/1*(parseInt(r(327))/2)+-parseInt(r(334))/3*(parseInt(r(325))/4)+parseInt(r(333))/5*(-parseInt(r(323))/6)+-parseInt(r(326))/7+parseInt(r(324))/8+-parseInt(r(343))/9*(parseInt(r(342))/10)+parseInt(r(339))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(l);class h extends t.Plugin{static get[d(330)](){return d(315)}static get[d(332)](){const t=d;return[e.Notification,s.ClipboardPipeline,t(328)]}constructor(t){const e=d;super(t),this[e(313)]=null}async[d(320)](){const t=d,e=this[t(336)];e[t(337)][t(338)](t(331),{converterUrl:t(341),tokenUrl:(e[t(337)][t(316)](t(314))||{})[t(344)],formatting:{resets:t(317),defaults:t(317),styles:t(321)}}),e[t(335)][t(345)](t(331),new c(e));const{tokenUrl:r}=e[t(337)][t(316)](t(331));if(r){const{tokenUrl:o}=e[t(337)][t(316)](t(314))||{};this[t(313)]=r===o?e[t(329)][t(316)](t(328))[t(319)]:await e[t(329)][t(316)](t(328))[t(340)](r)}}[d(322)](){return this[d(313)]}}function m(t,e){var r=g();return(m=function(t,e){return r[t-=444]})(t,e)}var f=m;function g(){var t=["1287928CDMumq","58491jGPLoB","9338210bzdsgQ","8505018yCDNhe","25DaSpEw","ImportWord","requires","1205394hThcWp","1746056vbODqE","7kppjZs","351956srJZho","9TFSsdA","pluginName","30bxCyMW"];return(g=function(){return t})()}!function(t,e){for(var r=m,o=t();;)try{if(789754===-parseInt(r(451))/1*(parseInt(r(449))/2)+-parseInt(r(447))/3*(parseInt(r(450))/4)+parseInt(r(454))/5*(parseInt(r(457))/6)+parseInt(r(445))/7*(-parseInt(r(444))/8)+parseInt(r(453))/9+parseInt(r(452))/10+-parseInt(r(446))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class I extends t.Plugin{static get[f(448)](){return f(455)}static get[f(456)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=192]})(t,e)}function b(){var t=["3515152HgAbTo","1790929ZvoUut","769430BTdCNI","8223GQjLdW","68ZQglEX","7750390hscmdt","311468cLhlal","11TxvRCX","12GMyCMb","4963455BOyBWW","2hNhLco"];return(b=function(){return t})()}!function(t,e){for(var r=v,o=t();;)try{if(308787===-parseInt(r(197))/1*(parseInt(r(193))/2)+-parseInt(r(201))/3*(-parseInt(r(202))/4)+-parseInt(r(200))/5+parseInt(r(195))/6*(parseInt(r(199))/7)+parseInt(r(198))/8+parseInt(r(196))/9+parseInt(r(192))/10*(-parseInt(r(194))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-import-word",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240326.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-20240326.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 _0x56e4(_0x1fa658,_0x3f1ad7){var _0x78c820=_0x78c8();return _0x56e4=function(_0x56e454,_0x4de479){_0x56e454=_0x56e454-0x1bc;var _0x4c5ad6=_0x78c820[_0x56e454];return _0x4c5ad6;},_0x56e4(_0x1fa658,_0x3f1ad7);}var _0x1df327=_0x56e4;(function(_0x5936db,_0x166588){var _0x52f520=_0x56e4,_0x461443=_0x5936db();while(!![]){try{var _0x4947f0=-parseInt(_0x52f520(0x1c3))/0x1*(parseInt(_0x52f520(0x1c1))/0x2)+-parseInt(_0x52f520(0x1bf))/0x3*(parseInt(_0x52f520(0x1c2))/0x4)+parseInt(_0x52f520(0x1c6))/0x5*(parseInt(_0x52f520(0x1c9))/0x6)+parseInt(_0x52f520(0x1bd))/0x7*(-parseInt(_0x52f520(0x1bc))/0x8)+parseInt(_0x52f520(0x1c5))/0x9+parseInt(_0x52f520(0x1c4))/0xa+-parseInt(_0x52f520(0x1be))/0xb;if(_0x4947f0===_0x166588)break;else _0x461443['push'](_0x461443['shift']());}catch(_0x1d17d3){_0x461443['push'](_0x461443['shift']());}}}(_0x78c8,0xc0cfa));import{Plugin as _0x317de8}from'ckeditor5/src/core.js';import _0x6e4c59 from'./importwordui.js';import _0x83ed88 from'./importwordediting.js';function _0x78c8(){var _0x4f9bc9=['1287928CDMumq','58491jGPLoB','9338210bzdsgQ','8505018yCDNhe','25DaSpEw','ImportWord','requires','1205394hThcWp','1746056vbODqE','7kppjZs','351956srJZho','9TFSsdA','pluginName','30bxCyMW'];_0x78c8=function(){return _0x4f9bc9;};return _0x78c8();}export default class i extends _0x317de8{static get[_0x1df327(0x1c0)](){var _0x62017c=_0x1df327;return _0x62017c(0x1c7);}static get[_0x1df327(0x1c8)](){return[_0x83ed88,_0x6e4c59];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x1de17f}from'ckeditor5/src/core.js';import{Range as _0x5c4ec7}from'ckeditor5/src/engine.js';import{logWarning as _0x126164,logError as _0x5e6dd4,first as _0x18432f,uid as _0x377deb}from'ckeditor5/src/utils.js';export default class d extends _0x1de17f{constructor(_0x3a9ffc){super(_0x3a9ffc),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x335d08,_0x182284)=>{const _0x10c5d2=new DataTransfer();_0x10c5d2['setData']('text/html',_0x182284['html']);const _0x3a48a0=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x58a051=>{this['_importMarker']['stopListening'](),_0x58a051['setSelection'](_0x3a48a0),_0x3a9ffc['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x10c5d2});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x31512d,_0x33ef51={}){if(this['isBusy'])return Promise['resolve']();const _0x24359f=this['editor']['config']['get']('importWord'),_0x398ae1={'url':_0x24359f['converterUrl'],'file':_0x31512d,'serviceConfig':{..._0x33ef51,'formatting':_0x24359f['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x398ae1)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x46be32=this['editor']['model'],_0x4c98fe=_0x46be32['schema'],_0xc31b4a=_0x46be32['document']['selection'],_0x49df29=_0x18432f(_0xc31b4a['getSelectedBlocks']());return!!_0x49df29&&_0x4c98fe['checkChild'](_0x49df29['parent'],'paragraph');}['_prepareForImport'](){const _0x34180b=this['editor'],_0x37e6f0=_0x34180b['model'],_0x3f07d9=_0x37e6f0['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x34180b['model']['createBatch']({'isUndoable':!0x0}),_0x37e6f0['enqueueChange'](this['_undoStepBatch'],_0x1d99e8=>{_0x3f07d9['isCollapsed']||_0x37e6f0['deleteContent'](_0x3f07d9,{'leaveUnmerged':!0x0});const _0x468f27=_0x3f07d9['getFirstPosition'](),_0x302f6a=_0x18432f(_0x3f07d9['getSelectedBlocks']());let _0xfa0f3;_0xfa0f3=_0x302f6a['is']('element','paragraph')&&_0x302f6a['isEmpty']?_0x468f27:_0x468f27['isAtStart']?_0x37e6f0['createPositionBefore'](_0x302f6a):_0x468f27['isAtEnd']?_0x37e6f0['createPositionAfter'](_0x302f6a):_0x1d99e8['split'](_0x468f27)['position'],this['_importMarker']=_0x1d99e8['addMarker']('importWord:'+_0x377deb(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x5c4ec7(_0xfa0f3)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x2d1d50=this['editor']['model'];_0x2d1d50['markers']['has'](this['_importMarker'])&&_0x2d1d50['enqueueChange'](this['_undoStepBatch'],_0x85dedd=>{_0x85dedd['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x5840fd,file:_0xa314b1,serviceConfig:_0x1c92b9}){const _0xbcae1a=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x32d31e=new FormData();_0x32d31e['set']('config',JSON['stringify'](_0x1c92b9)),_0x32d31e['set']('file',_0xa314b1);const _0x2328a4={'method':'POST','headers':{},'body':_0x32d31e,'signal':this['_abortController']['signal']};return _0xbcae1a&&(_0x2328a4['headers']['Authorization']=_0xbcae1a['value']),fetch(_0x5840fd,_0x2328a4);}['_handleImportResponse'](_0x4c1e48){return _0x4c1e48['ok']?_0x4c1e48['json']()['then'](_0x4c8148=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x4c8148);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x126164('import-word-plugin-import-cancelled');const _0x274770=this['editor'],_0xe246ad=(0x0,_0x274770['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x274770['plugins']['get']('Notification')['showWarning'](_0xe246ad),_0x5e6dd4('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x4e12(){const _0x72f718=['getToken','2868732cOyjpG','1901672jpPQia','1036JPoqek','4323018SCWYPT','15286yPqqgL','CloudServices','plugins','pluginName','importWord','requires','5zGeGmF','2742AfLAVw','commands','editor','config','define','13202079qSfTue','registerTokenUrl','https://docx-converter.cke-cs.com/v2/convert/docx-html','130QWldPd','276201msQDrX','tokenUrl','add','_token','cloudServices','ImportWordEditing','get','none','81hdSUIr','token','init','inline'];_0x4e12=function(){return _0x72f718;};return _0x4e12();}const _0x52ca0c=_0xde68;(function(_0x4bed59,_0x35bdd2){const _0x4ded64=_0xde68,_0x221a19=_0x4bed59();while(!![]){try{const _0x144ccb=parseInt(_0x4ded64(0x13e))/0x1*(parseInt(_0x4ded64(0x147))/0x2)+-parseInt(_0x4ded64(0x14e))/0x3*(parseInt(_0x4ded64(0x145))/0x4)+parseInt(_0x4ded64(0x14d))/0x5*(-parseInt(_0x4ded64(0x143))/0x6)+-parseInt(_0x4ded64(0x146))/0x7+parseInt(_0x4ded64(0x144))/0x8+-parseInt(_0x4ded64(0x157))/0x9*(parseInt(_0x4ded64(0x156))/0xa)+parseInt(_0x4ded64(0x153))/0xb;if(_0x144ccb===_0x35bdd2)break;else _0x221a19['push'](_0x221a19['shift']());}catch(_0x69296c){_0x221a19['push'](_0x221a19['shift']());}}}(_0x4e12,0x4f7e2));import{Plugin as _0x42baa7}from'ckeditor5/src/core.js';function _0xde68(_0x3a7e91,_0x54048c){const _0x4e12ab=_0x4e12();return _0xde68=function(_0xde6860,_0x393709){_0xde6860=_0xde6860-0x139;let _0x1ee570=_0x4e12ab[_0xde6860];return _0x1ee570;},_0xde68(_0x3a7e91,_0x54048c);}import{Notification as _0x194a76}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x1fd145}from'ckeditor5/src/clipboard.js';import _0x3b7914 from'./importwordcommand.js';export default class e extends _0x42baa7{static get[_0x52ca0c(0x14a)](){const _0x3ce866=_0x52ca0c;return _0x3ce866(0x13b);}static get[_0x52ca0c(0x14c)](){const _0x29c5b8=_0x52ca0c;return[_0x194a76,_0x1fd145,_0x29c5b8(0x148)];}constructor(_0x340ede){const _0x57b880=_0x52ca0c;super(_0x340ede),this[_0x57b880(0x139)]=null;}async[_0x52ca0c(0x140)](){const _0x3c016c=_0x52ca0c,_0xadc97e=this[_0x3c016c(0x150)];_0xadc97e[_0x3c016c(0x151)][_0x3c016c(0x152)](_0x3c016c(0x14b),{'converterUrl':_0x3c016c(0x155),'tokenUrl':(_0xadc97e[_0x3c016c(0x151)][_0x3c016c(0x13c)](_0x3c016c(0x13a))||{})[_0x3c016c(0x158)],'formatting':{'resets':_0x3c016c(0x13d),'defaults':_0x3c016c(0x13d),'styles':_0x3c016c(0x141)}}),_0xadc97e[_0x3c016c(0x14f)][_0x3c016c(0x159)](_0x3c016c(0x14b),new _0x3b7914(_0xadc97e));const {tokenUrl:_0x38b791}=_0xadc97e[_0x3c016c(0x151)][_0x3c016c(0x13c)](_0x3c016c(0x14b));if(_0x38b791){const {tokenUrl:_0x1dc328}=_0xadc97e[_0x3c016c(0x151)][_0x3c016c(0x13c)](_0x3c016c(0x13a))||{};this[_0x3c016c(0x139)]=_0x38b791===_0x1dc328?_0xadc97e[_0x3c016c(0x149)][_0x3c016c(0x13c)](_0x3c016c(0x148))[_0x3c016c(0x13f)]:await _0xadc97e[_0x3c016c(0x149)][_0x3c016c(0x13c)](_0x3c016c(0x148))[_0x3c016c(0x154)](_0x38b791);}}[_0x52ca0c(0x142)](){const _0x1726bf=_0x52ca0c;return this[_0x1726bf(0x139)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x35b9da}from'ckeditor5/src/core.js';import{SpinnerView as _0x50d436}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x5a718d}from'ckeditor5/src/upload.js';import _0x4fef9e from'../theme/icons/importword.svg';export default class o extends _0x35b9da{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x5ebcfc=this['editor'],t=_0x5ebcfc['t'];_0x5ebcfc['ui']['componentFactory']['add']('importWord',_0x40f121=>{const _0x5acacd=_0x5ebcfc['commands']['get']('importWord'),_0x5f01a9=new _0x5a718d(_0x40f121),_0x4ed850=new _0x50d436();return _0x5f01a9['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x5f01a9['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x4fef9e,'tooltip':!0x0}),_0x5f01a9['buttonView']['bind']('isOn','isEnabled')['to'](_0x5acacd,'isBusy','isEnabled'),_0x4ed850['bind']('isVisible')['to'](_0x5acacd,'isBusy'),_0x5f01a9['buttonView']['iconView']['bind']('isVisible')['to'](_0x5acacd,'isBusy',_0x5726f4=>!_0x5726f4),_0x5f01a9['buttonView']['children']['add'](_0x4ed850),_0x5f01a9['on']('done',(_0x11e720,_0x5bd8b8)=>{_0x5ebcfc['execute']('importWord',_0x5bd8b8[0x0],{}),_0x5ebcfc['editing']['view']['focus']();}),_0x5f01a9;});}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x12019f,_0x4221d0){var _0x277076=_0x42b8,_0xcacab0=_0x12019f();while(!![]){try{var _0x4c6e84=-parseInt(_0x277076(0xc5))/0x1*(parseInt(_0x277076(0xc1))/0x2)+-parseInt(_0x277076(0xc9))/0x3*(-parseInt(_0x277076(0xca))/0x4)+-parseInt(_0x277076(0xc8))/0x5+parseInt(_0x277076(0xc3))/0x6*(parseInt(_0x277076(0xc7))/0x7)+parseInt(_0x277076(0xc6))/0x8+parseInt(_0x277076(0xc4))/0x9+parseInt(_0x277076(0xc0))/0xa*(-parseInt(_0x277076(0xc2))/0xb);if(_0x4c6e84===_0x4221d0)break;else _0xcacab0['push'](_0xcacab0['shift']());}catch(_0x30b254){_0xcacab0['push'](_0xcacab0['shift']());}}}(_0x4892,0x4b633));export{default as ImportWord}from'./importword.js';function _0x42b8(_0x416f48,_0x3b8c04){var _0x489200=_0x4892();return _0x42b8=function(_0x42b87d,_0x323c66){_0x42b87d=_0x42b87d-0xc0;var _0x55b98d=_0x489200[_0x42b87d];return _0x55b98d;},_0x42b8(_0x416f48,_0x3b8c04);}function _0x4892(){var _0x8e86ef=['3515152HgAbTo','1790929ZvoUut','769430BTdCNI','8223GQjLdW','68ZQglEX','7750390hscmdt','311468cLhlal','11TxvRCX','12GMyCMb','4963455BOyBWW','2hNhLco'];_0x4892=function(){return _0x8e86ef;};return _0x4892();}export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
|