@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240226.0 → 0.0.0-nightly-20240228.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(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},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 n={};(()=>{"use strict";r.r(n),r.d(n,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),o=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",(n=>{const i=t.commands.get("importWord"),s=new o.FileDialogButtonView(n),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(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},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 n={};(()=>{"use strict";r.r(n),r.d(n,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),o=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",(n=>{const i=t.commands.get("importWord"),s=new o.FileDialogButtonView(n),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 n=new DataTransfer;n.setData("text/html",r.html);const o=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(o),t.editing.view.document.fire("clipboardInput",{dataTransfer:n})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),n={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(n).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,n=(0,p.first)(r.getSelectedBlocks());return!!n&&e.checkChild(n.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 n=r.getFirstPosition(),o=(0,p.first)(r.getSelectedBlocks());let i;i=o.is("element","paragraph")&&o.isEmpty?n:n.isAtStart?e.createPositionBefore(o):n.isAtEnd?e.createPositionAfter(o):t.split(n).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 n=this.editor.plugins.get("ImportWordEditing").getToken(),o=new FormData;o.set("config",JSON.stringify(r)),o.set("file",e);const i={method:"POST",headers:{},body:o,signal:this._abortController.signal};return n&&(i.headers.Authorization=n.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 d(t,e){const r=u();return(d=function(t,e){return r[t-=247]})(t,e)}const l=d;function u(){const t=["editor","_token","getToken","token","488882Nmhfxg","1128HmqvXo","50437464DXenEd","58203CIeGyj","4OJXdqe","importWord","7607755wBdbTI","3258950RdpDaL","define","commands","6BGntDp","inline","6772409WSJYzb","cloudServices","tokenUrl","8VNshUh","init","https://docx-converter.cke-cs.com/v2/convert/docx-html","get","CloudServices","config","requires","none","ImportWordEditing","404946VBKeCM","registerTokenUrl","add","plugins","pluginName"];return(u=function(){return t})()}!function(t,e){const r=d,n=t();for(;;)try{if(802434===parseInt(r(251))/1*(-parseInt(r(247))/2)+-parseInt(r(271))/3*(-parseInt(r(262))/4)+-parseInt(r(253))/5+parseInt(r(257))/6*(-parseInt(r(259))/7)+-parseInt(r(248))/8*(parseInt(r(250))/9)+parseInt(r(254))/10+parseInt(r(249))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class h extends t.Plugin{static get[l(275)](){return l(270)}static get[l(268)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(266)]}constructor(t){const e=l;super(t),this[e(277)]=null}async[l(263)](){const t=l,e=this[t(276)];e[t(267)][t(255)](t(252),{converterUrl:t(264),tokenUrl:(e[t(267)][t(265)](t(260))||{})[t(261)],formatting:{resets:t(269),defaults:t(269),styles:t(258)}}),e[t(256)][t(273)](t(252),new c(e));const{tokenUrl:r}=e[t(267)][t(265)](t(252));if(r){const{tokenUrl:n}=e[t(267)][t(265)](t(260))||{};this[t(277)]=r===n?e[t(274)][t(265)](t(266))[t(279)]:await e[t(274)][t(265)](t(266))[t(272)](r)}}[l(278)](){return this[l(277)]}}var m=f;function f(t,e){var r=g();return(f=function(t,e){return r[t-=379]})(t,e)}function g(){var t=["1476307iYrlSC","1265847NurWmD","45OteGXY","1104726JVVtVT","19puusGg","34312oubLlF","1772135MGFXRZ","5696860PKUxmK","requires","pluginName","ImportWord","4HDuLkq","618aHtPgY"];return(g=function(){return t})()}!function(t,e){for(var r=f,n=t();;)try{if(217896===parseInt(r(381))/1*(parseInt(r(389))/2)+-parseInt(r(391))/3*(-parseInt(r(388))/4)+parseInt(r(383))/5+-parseInt(r(380))/6+parseInt(r(390))/7+-parseInt(r(382))/8*(parseInt(r(379))/9)+-parseInt(r(384))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(g);class I extends t.Plugin{static get[m(386)](){return m(387)}static get[m(385)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=391]})(t,e)}function b(){var t=["756984iEmDsc","613728HJUied","12vIkLnI","376ssSUKt","181082oyPxdn","9489950qBWezd","3159394cZdbxe","9WdqdhC","8798488CmhbvG","30215oCCbFY"];return(b=function(){return t})()}!function(t,e){for(var r=v,n=t();;)try{if(572540===parseInt(r(395))/1*(parseInt(r(397))/2)+parseInt(r(393))/3+-parseInt(r(396))/4*(parseInt(r(392))/5)+parseInt(r(394))/6+-parseInt(r(399))/7+-parseInt(r(391))/8*(-parseInt(r(400))/9)+-parseInt(r(398))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=n})();
|
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-20240228.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-20240228.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 _0x75268=_0x1602;function _0x1602(_0x57761c,_0x275cde){var _0x49d8d9=_0x49d8();return _0x1602=function(_0x160210,_0x4bb80f){_0x160210=_0x160210-0x17b;var _0x232e00=_0x49d8d9[_0x160210];return _0x232e00;},_0x1602(_0x57761c,_0x275cde);}(function(_0xa7aebe,_0x56eebb){var _0x3be586=_0x1602,_0x4b60f5=_0xa7aebe();while(!![]){try{var _0x580ea5=parseInt(_0x3be586(0x17d))/0x1*(parseInt(_0x3be586(0x185))/0x2)+-parseInt(_0x3be586(0x187))/0x3*(-parseInt(_0x3be586(0x184))/0x4)+parseInt(_0x3be586(0x17f))/0x5+-parseInt(_0x3be586(0x17c))/0x6+parseInt(_0x3be586(0x186))/0x7+-parseInt(_0x3be586(0x17e))/0x8*(parseInt(_0x3be586(0x17b))/0x9)+-parseInt(_0x3be586(0x180))/0xa;if(_0x580ea5===_0x56eebb)break;else _0x4b60f5['push'](_0x4b60f5['shift']());}catch(_0x45c50d){_0x4b60f5['push'](_0x4b60f5['shift']());}}}(_0x49d8,0x35328));function _0x49d8(){var _0x3a6ffa=['1476307iYrlSC','1265847NurWmD','45OteGXY','1104726JVVtVT','19puusGg','34312oubLlF','1772135MGFXRZ','5696860PKUxmK','requires','pluginName','ImportWord','4HDuLkq','618aHtPgY'];_0x49d8=function(){return _0x3a6ffa;};return _0x49d8();}import{Plugin as _0x4ce018}from'ckeditor5/src/core.js';import _0x34bd8f from'./importwordui.js';import _0x4118c5 from'./importwordediting.js';export default class i extends _0x4ce018{static get[_0x75268(0x182)](){var _0x30bab9=_0x75268;return _0x30bab9(0x183);}static get[_0x75268(0x181)](){return[_0x4118c5,_0x34bd8f];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x5d2e91}from'ckeditor5/src/core.js';import{Range as _0x53ea38}from'ckeditor5/src/engine.js';import{logWarning as _0xa9cae7,logError as _0x3b0aad,first as _0x4f8ecd,uid as _0xa6e355}from'ckeditor5/src/utils.js';export default class d extends _0x5d2e91{constructor(_0x3a06da){super(_0x3a06da),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x538bc2,_0x1ee8b2)=>{const _0x23b277=new DataTransfer();_0x23b277['setData']('text/html',_0x1ee8b2['html']);const _0x6f9d15=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x4dc477=>{this['_importMarker']['stopListening'](),_0x4dc477['setSelection'](_0x6f9d15),_0x3a06da['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x23b277});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3406d1,_0x2fd654={}){if(this['isBusy'])return Promise['resolve']();const _0x5158b5=this['editor']['config']['get']('importWord'),_0x255927={'url':_0x5158b5['converterUrl'],'file':_0x3406d1,'serviceConfig':{..._0x2fd654,'formatting':_0x5158b5['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x255927)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x461df0=this['editor']['model'],_0x298c5a=_0x461df0['schema'],_0x260493=_0x461df0['document']['selection'],_0x223b44=_0x4f8ecd(_0x260493['getSelectedBlocks']());return!!_0x223b44&&_0x298c5a['checkChild'](_0x223b44['parent'],'paragraph');}['_prepareForImport'](){const _0x5e274f=this['editor'],_0x3905b5=_0x5e274f['model'],_0x25b98a=_0x3905b5['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x5e274f['model']['createBatch']({'isUndoable':!0x0}),_0x3905b5['enqueueChange'](this['_undoStepBatch'],_0x37b312=>{_0x25b98a['isCollapsed']||_0x3905b5['deleteContent'](_0x25b98a,{'leaveUnmerged':!0x0});const _0x34ef1d=_0x25b98a['getFirstPosition'](),_0x513e61=_0x4f8ecd(_0x25b98a['getSelectedBlocks']());let _0xb63703;_0xb63703=_0x513e61['is']('element','paragraph')&&_0x513e61['isEmpty']?_0x34ef1d:_0x34ef1d['isAtStart']?_0x3905b5['createPositionBefore'](_0x513e61):_0x34ef1d['isAtEnd']?_0x3905b5['createPositionAfter'](_0x513e61):_0x37b312['split'](_0x34ef1d)['position'],this['_importMarker']=_0x37b312['addMarker']('importWord:'+_0xa6e355(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x53ea38(_0xb63703)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x203748=this['editor']['model'];_0x203748['markers']['has'](this['_importMarker'])&&_0x203748['enqueueChange'](this['_undoStepBatch'],_0x2cecc0=>{_0x2cecc0['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x1177ad,file:_0x39c490,serviceConfig:_0xf10e28}){const _0x165d09=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x302f73=new FormData();_0x302f73['set']('config',JSON['stringify'](_0xf10e28)),_0x302f73['set']('file',_0x39c490);const _0x4f7bbf={'method':'POST','headers':{},'body':_0x302f73,'signal':this['_abortController']['signal']};return _0x165d09&&(_0x4f7bbf['headers']['Authorization']=_0x165d09['value']),fetch(_0x1177ad,_0x4f7bbf);}['_handleImportResponse'](_0x40217a){return _0x40217a['ok']?_0x40217a['json']()['then'](_0x2c3e4e=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x2c3e4e);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0xa9cae7('import-word-plugin-import-cancelled');const _0x4a2a97=this['editor'],_0x1934d9=(0x0,_0x4a2a97['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x4a2a97['plugins']['get']('Notification')['showWarning'](_0x1934d9),_0x3b0aad('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x186b(_0x5c72cd,_0x9a8c0f){const _0x1dc681=_0x1dc6();return _0x186b=function(_0x186b8c,_0x9e0b4b){_0x186b8c=_0x186b8c-0xf7;let _0x11b967=_0x1dc681[_0x186b8c];return _0x11b967;},_0x186b(_0x5c72cd,_0x9a8c0f);}const _0x4f1f68=_0x186b;(function(_0x1ac5f4,_0x53f1e6){const _0x53b3b8=_0x186b,_0x3f9d8c=_0x1ac5f4();while(!![]){try{const _0x1ce554=parseInt(_0x53b3b8(0xfb))/0x1*(-parseInt(_0x53b3b8(0xf7))/0x2)+-parseInt(_0x53b3b8(0x10f))/0x3*(-parseInt(_0x53b3b8(0x106))/0x4)+-parseInt(_0x53b3b8(0xfd))/0x5+parseInt(_0x53b3b8(0x101))/0x6*(-parseInt(_0x53b3b8(0x103))/0x7)+-parseInt(_0x53b3b8(0xf8))/0x8*(parseInt(_0x53b3b8(0xfa))/0x9)+parseInt(_0x53b3b8(0xfe))/0xa+parseInt(_0x53b3b8(0xf9))/0xb;if(_0x1ce554===_0x53f1e6)break;else _0x3f9d8c['push'](_0x3f9d8c['shift']());}catch(_0x4c76e2){_0x3f9d8c['push'](_0x3f9d8c['shift']());}}}(_0x1dc6,0xc3e82));function _0x1dc6(){const _0x4f559e=['editor','_token','getToken','token','488882Nmhfxg','1128HmqvXo','50437464DXenEd','58203CIeGyj','4OJXdqe','importWord','7607755wBdbTI','3258950RdpDaL','define','commands','6BGntDp','inline','6772409WSJYzb','cloudServices','tokenUrl','8VNshUh','init','https://docx-converter.cke-cs.com/v2/convert/docx-html','get','CloudServices','config','requires','none','ImportWordEditing','404946VBKeCM','registerTokenUrl','add','plugins','pluginName'];_0x1dc6=function(){return _0x4f559e;};return _0x1dc6();}import{Plugin as _0x3627e4}from'ckeditor5/src/core.js';import{Notification as _0x5472cd}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x53540c}from'ckeditor5/src/clipboard.js';import _0x5d8a7c from'./importwordcommand.js';export default class e extends _0x3627e4{static get[_0x4f1f68(0x113)](){const _0x1724ff=_0x4f1f68;return _0x1724ff(0x10e);}static get[_0x4f1f68(0x10c)](){const _0x252b72=_0x4f1f68;return[_0x5472cd,_0x53540c,_0x252b72(0x10a)];}constructor(_0x32b41e){const _0x2721f3=_0x4f1f68;super(_0x32b41e),this[_0x2721f3(0x115)]=null;}async[_0x4f1f68(0x107)](){const _0x5e2b18=_0x4f1f68,_0x2dc5f6=this[_0x5e2b18(0x114)];_0x2dc5f6[_0x5e2b18(0x10b)][_0x5e2b18(0xff)](_0x5e2b18(0xfc),{'converterUrl':_0x5e2b18(0x108),'tokenUrl':(_0x2dc5f6[_0x5e2b18(0x10b)][_0x5e2b18(0x109)](_0x5e2b18(0x104))||{})[_0x5e2b18(0x105)],'formatting':{'resets':_0x5e2b18(0x10d),'defaults':_0x5e2b18(0x10d),'styles':_0x5e2b18(0x102)}}),_0x2dc5f6[_0x5e2b18(0x100)][_0x5e2b18(0x111)](_0x5e2b18(0xfc),new _0x5d8a7c(_0x2dc5f6));const {tokenUrl:_0x26512d}=_0x2dc5f6[_0x5e2b18(0x10b)][_0x5e2b18(0x109)](_0x5e2b18(0xfc));if(_0x26512d){const {tokenUrl:_0xa2334d}=_0x2dc5f6[_0x5e2b18(0x10b)][_0x5e2b18(0x109)](_0x5e2b18(0x104))||{};this[_0x5e2b18(0x115)]=_0x26512d===_0xa2334d?_0x2dc5f6[_0x5e2b18(0x112)][_0x5e2b18(0x109)](_0x5e2b18(0x10a))[_0x5e2b18(0x117)]:await _0x2dc5f6[_0x5e2b18(0x112)][_0x5e2b18(0x109)](_0x5e2b18(0x10a))[_0x5e2b18(0x110)](_0x26512d);}}[_0x4f1f68(0x116)](){const _0x1b933b=_0x4f1f68;return this[_0x1b933b(0x115)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x29dcb1}from'ckeditor5/src/core.js';import{SpinnerView as _0x579f15}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x9848c4}from'ckeditor5/src/upload.js';import _0x185a51 from'../theme/icons/importword.svg';export default class o extends _0x29dcb1{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x1379ea=this['editor'],t=_0x1379ea['t'];_0x1379ea['ui']['componentFactory']['add']('importWord',_0x197c95=>{const _0x3fa023=_0x1379ea['commands']['get']('importWord'),_0x1c2b81=new _0x9848c4(_0x197c95),_0x31f8b3=new _0x579f15();return _0x1c2b81['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x1c2b81['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x185a51,'tooltip':!0x0}),_0x1c2b81['buttonView']['bind']('isOn','isEnabled')['to'](_0x3fa023,'isBusy','isEnabled'),_0x31f8b3['bind']('isVisible')['to'](_0x3fa023,'isBusy'),_0x1c2b81['buttonView']['iconView']['bind']('isVisible')['to'](_0x3fa023,'isBusy',_0x8fdb97=>!_0x8fdb97),_0x1c2b81['buttonView']['children']['add'](_0x31f8b3),_0x1c2b81['on']('done',(_0x3c69ad,_0x12e004)=>{_0x1379ea['execute']('importWord',_0x12e004[0x0],{}),_0x1379ea['editing']['view']['focus']();}),_0x1c2b81;});}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x4be594,_0x39e406){var _0x1b3464=_0x5d5a,_0x376288=_0x4be594();while(!![]){try{var _0x18d670=parseInt(_0x1b3464(0x18b))/0x1*(parseInt(_0x1b3464(0x18d))/0x2)+parseInt(_0x1b3464(0x189))/0x3+-parseInt(_0x1b3464(0x18c))/0x4*(parseInt(_0x1b3464(0x188))/0x5)+parseInt(_0x1b3464(0x18a))/0x6+-parseInt(_0x1b3464(0x18f))/0x7+-parseInt(_0x1b3464(0x187))/0x8*(-parseInt(_0x1b3464(0x190))/0x9)+-parseInt(_0x1b3464(0x18e))/0xa;if(_0x18d670===_0x39e406)break;else _0x376288['push'](_0x376288['shift']());}catch(_0x21d9db){_0x376288['push'](_0x376288['shift']());}}}(_0x1864,0x8bc7c));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';function _0x5d5a(_0x2c29a6,_0x3a518a){var _0x1864f6=_0x1864();return _0x5d5a=function(_0x5d5a0b,_0x1954a0){_0x5d5a0b=_0x5d5a0b-0x187;var _0x2064d8=_0x1864f6[_0x5d5a0b];return _0x2064d8;},_0x5d5a(_0x2c29a6,_0x3a518a);}export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';function _0x1864(){var _0xe532e3=['756984iEmDsc','613728HJUied','12vIkLnI','376ssSUKt','181082oyPxdn','9489950qBWezd','3159394cZdbxe','9WdqdhC','8798488CmhbvG','30215oCCbFY'];_0x1864=function(){return _0xe532e3;};return _0x1864();}
|