@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240317.0 → 0.0.0-nightly-20240319.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),p=r(584);class
|
|
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 l 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 c(){const t=["pluginName","432812SVXteW","define","913256grtRTs","266096EyXygB","ImportWordEditing","CloudServices","1140RUNotO","_token","none","https://docx-converter.cke-cs.com/v2/convert/docx-html","1504532XaUVup","registerTokenUrl","7vzrVjX","requires","token","3947652XyNPnJ","1298450HUKgio","3NIrXzO","config","cloudServices","importWord","inline","getToken","editor","commands","tokenUrl","get","18kizLAe","plugins","init","add"];return(c=function(){return t})()}const d=u;function u(t,e){const r=c();return(u=function(t,e){return r[t-=187]})(t,e)}!function(t,e){const r=u,n=t();for(;;)try{if(430384===parseInt(r(191))/1+-parseInt(r(201))/2+-parseInt(r(208))/3*(-parseInt(r(194))/4)+-parseInt(r(197))/5*(-parseInt(r(218))/6)+parseInt(r(203))/7*(parseInt(r(193))/8)+parseInt(r(206))/9+parseInt(r(207))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(c);class h extends t.Plugin{static get[d(190)](){return d(195)}static get[d(204)](){const t=d;return[e.Notification,s.ClipboardPipeline,t(196)]}constructor(t){const e=d;super(t),this[e(198)]=null}async[d(188)](){const t=d,e=this[t(214)];e[t(209)][t(192)](t(211),{converterUrl:t(200),tokenUrl:(e[t(209)][t(217)](t(210))||{})[t(216)],formatting:{resets:t(199),defaults:t(199),styles:t(212)}}),e[t(215)][t(189)](t(211),new l(e));const{tokenUrl:r}=e[t(209)][t(217)](t(211));if(r){const{tokenUrl:n}=e[t(209)][t(217)](t(210))||{};this[t(198)]=r===n?e[t(187)][t(217)](t(196))[t(205)]:await e[t(187)][t(217)](t(196))[t(202)](r)}}[d(213)](){return this[d(198)]}}var m=g;function g(t,e){var r=f();return(g=function(t,e){return r[t-=325]})(t,e)}function f(){var t=["11963210VfrgGj","1238896HZNnjY","501610DsTavk","2533134todmtf","276084uqGOWu","4640OwaBEC","requires","ImportWord","192LmeucJ","pluginName","5064pHzzgf","60BHOaIM","2LzxwNo","1316249TduXDh"];return(f=function(){return t})()}!function(t,e){for(var r=g,n=t();;)try{if(874484===-parseInt(r(329))/1*(-parseInt(r(333))/2)+-parseInt(r(334))/3+parseInt(r(332))/4+-parseInt(r(336))/5*(parseInt(r(327))/6)+parseInt(r(331))/7+parseInt(r(325))/8*(-parseInt(r(335))/9)+parseInt(r(328))/10*(parseInt(r(330))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(f);class I extends t.Plugin{static get[m(326)](){return m(338)}static get[m(337)](){return[h,i]}}function v(){var t=["139102DBuWxq","162140KHbgMU","18533438bPSmyv","6ZqntWY","36habpbl","9835792NHSdlt","236688vHqWbZ","6zgLXHP","5240695pwskBl","4680606lehDDa","342aDtZtT"];return(v=function(){return t})()}function b(t,e){var r=v();return(b=function(t,e){return r[t-=303]})(t,e)}!function(t,e){for(var r=b,n=t();;)try{if(791349===parseInt(r(309))/1*(-parseInt(r(305))/2)+parseInt(r(304))/3*(-parseInt(r(313))/4)+-parseInt(r(306))/5*(parseInt(r(312))/6)+parseInt(r(307))/7+parseInt(r(303))/8+-parseInt(r(308))/9*(parseInt(r(310))/10)+parseInt(r(311))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(v)})(),(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-20240319.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-20240319.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
|
-
function
|
|
23
|
+
var _0x3b90f4=_0x5320;function _0x5320(_0x1f6117,_0x20fc23){var _0x234a09=_0x234a();return _0x5320=function(_0x532050,_0xe830e9){_0x532050=_0x532050-0x145;var _0x363dc1=_0x234a09[_0x532050];return _0x363dc1;},_0x5320(_0x1f6117,_0x20fc23);}(function(_0x13f40c,_0x39ef99){var _0x2991b4=_0x5320,_0x11ff0f=_0x13f40c();while(!![]){try{var _0x59298e=-parseInt(_0x2991b4(0x149))/0x1*(-parseInt(_0x2991b4(0x14d))/0x2)+-parseInt(_0x2991b4(0x14e))/0x3+parseInt(_0x2991b4(0x14c))/0x4+-parseInt(_0x2991b4(0x150))/0x5*(parseInt(_0x2991b4(0x147))/0x6)+parseInt(_0x2991b4(0x14b))/0x7+parseInt(_0x2991b4(0x145))/0x8*(-parseInt(_0x2991b4(0x14f))/0x9)+parseInt(_0x2991b4(0x148))/0xa*(parseInt(_0x2991b4(0x14a))/0xb);if(_0x59298e===_0x39ef99)break;else _0x11ff0f['push'](_0x11ff0f['shift']());}catch(_0x4665d3){_0x11ff0f['push'](_0x11ff0f['shift']());}}}(_0x234a,0xd57f4));import{Plugin as _0x472beb}from'ckeditor5/src/core.js';import _0x5108b0 from'./importwordui.js';function _0x234a(){var _0x598c39=['11963210VfrgGj','1238896HZNnjY','501610DsTavk','2533134todmtf','276084uqGOWu','4640OwaBEC','requires','ImportWord','192LmeucJ','pluginName','5064pHzzgf','60BHOaIM','2LzxwNo','1316249TduXDh'];_0x234a=function(){return _0x598c39;};return _0x234a();}import _0x465693 from'./importwordediting.js';export default class i extends _0x472beb{static get[_0x3b90f4(0x146)](){var _0x108c4e=_0x3b90f4;return _0x108c4e(0x152);}static get[_0x3b90f4(0x151)](){return[_0x465693,_0x5108b0];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x307d1e}from'ckeditor5/src/core.js';import{Range as _0x32e8f0}from'ckeditor5/src/engine.js';import{logWarning as _0x1890af,logError as _0x25d9c5,first as _0x532a9d,uid as _0x5f5a55}from'ckeditor5/src/utils.js';export default class d extends _0x307d1e{constructor(_0xff0237){super(_0xff0237),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x1589f3,_0x1fed02)=>{const _0x298ed7=new DataTransfer();_0x298ed7['setData']('text/html',_0x1fed02['html']);const _0x588c00=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x3b5ad4=>{this['_importMarker']['stopListening'](),_0x3b5ad4['setSelection'](_0x588c00),_0xff0237['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x298ed7});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x43ac9f,_0x506d24={}){if(this['isBusy'])return Promise['resolve']();const _0x1963b4=this['editor']['config']['get']('importWord'),_0x2ae840={'url':_0x1963b4['converterUrl'],'file':_0x43ac9f,'serviceConfig':{..._0x506d24,'formatting':_0x1963b4['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x2ae840)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x3c5be9=this['editor']['model'],_0x226ada=_0x3c5be9['schema'],_0x2cd248=_0x3c5be9['document']['selection'],_0x57bfd4=_0x532a9d(_0x2cd248['getSelectedBlocks']());return!!_0x57bfd4&&_0x226ada['checkChild'](_0x57bfd4['parent'],'paragraph');}['_prepareForImport'](){const _0xdd93c2=this['editor'],_0x10f3d4=_0xdd93c2['model'],_0x3ce407=_0x10f3d4['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0xdd93c2['model']['createBatch']({'isUndoable':!0x0}),_0x10f3d4['enqueueChange'](this['_undoStepBatch'],_0x10a718=>{_0x3ce407['isCollapsed']||_0x10f3d4['deleteContent'](_0x3ce407,{'leaveUnmerged':!0x0});const _0x20a963=_0x3ce407['getFirstPosition'](),_0x58d0e1=_0x532a9d(_0x3ce407['getSelectedBlocks']());let _0x129958;_0x129958=_0x58d0e1['is']('element','paragraph')&&_0x58d0e1['isEmpty']?_0x20a963:_0x20a963['isAtStart']?_0x10f3d4['createPositionBefore'](_0x58d0e1):_0x20a963['isAtEnd']?_0x10f3d4['createPositionAfter'](_0x58d0e1):_0x10a718['split'](_0x20a963)['position'],this['_importMarker']=_0x10a718['addMarker']('importWord:'+_0x5f5a55(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x32e8f0(_0x129958)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x2dbfb1=this['editor']['model'];_0x2dbfb1['markers']['has'](this['_importMarker'])&&_0x2dbfb1['enqueueChange'](this['_undoStepBatch'],_0x3ae904=>{_0x3ae904['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x282993,file:_0x11ccda,serviceConfig:_0x10a200}){const _0x214010=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x258fdb=new FormData();_0x258fdb['set']('config',JSON['stringify'](_0x10a200)),_0x258fdb['set']('file',_0x11ccda);const _0x26b6eb={'method':'POST','headers':{},'body':_0x258fdb,'signal':this['_abortController']['signal']};return _0x214010&&(_0x26b6eb['headers']['Authorization']=_0x214010['value']),fetch(_0x282993,_0x26b6eb);}['_handleImportResponse'](_0x1fa51a){return _0x1fa51a['ok']?_0x1fa51a['json']()['then'](_0x165445=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x165445);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x1890af('import-word-plugin-import-cancelled');const _0x5e373b=this['editor'],_0x4e95c3=(0x0,_0x5e373b['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x5e373b['plugins']['get']('Notification')['showWarning'](_0x4e95c3),_0x25d9c5('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x10bb(){const _0x53ed9f=['pluginName','432812SVXteW','define','913256grtRTs','266096EyXygB','ImportWordEditing','CloudServices','1140RUNotO','_token','none','https://docx-converter.cke-cs.com/v2/convert/docx-html','1504532XaUVup','registerTokenUrl','7vzrVjX','requires','token','3947652XyNPnJ','1298450HUKgio','3NIrXzO','config','cloudServices','importWord','inline','getToken','editor','commands','tokenUrl','get','18kizLAe','plugins','init','add'];_0x10bb=function(){return _0x53ed9f;};return _0x10bb();}const _0x576e9f=_0xaf01;(function(_0x1a44a7,_0x5ab800){const _0x5ef976=_0xaf01,_0x537426=_0x1a44a7();while(!![]){try{const _0x9d1a0e=parseInt(_0x5ef976(0xbf))/0x1+-parseInt(_0x5ef976(0xc9))/0x2+-parseInt(_0x5ef976(0xd0))/0x3*(-parseInt(_0x5ef976(0xc2))/0x4)+-parseInt(_0x5ef976(0xc5))/0x5*(-parseInt(_0x5ef976(0xda))/0x6)+parseInt(_0x5ef976(0xcb))/0x7*(parseInt(_0x5ef976(0xc1))/0x8)+parseInt(_0x5ef976(0xce))/0x9+parseInt(_0x5ef976(0xcf))/0xa;if(_0x9d1a0e===_0x5ab800)break;else _0x537426['push'](_0x537426['shift']());}catch(_0x2015b6){_0x537426['push'](_0x537426['shift']());}}}(_0x10bb,0x69130));import{Plugin as _0x24e698}from'ckeditor5/src/core.js';import{Notification as _0x25a669}from'ckeditor5/src/ui.js';function _0xaf01(_0x5c7cdc,_0x6560c4){const _0x10bbb3=_0x10bb();return _0xaf01=function(_0xaf0108,_0x128f34){_0xaf0108=_0xaf0108-0xbb;let _0x17980e=_0x10bbb3[_0xaf0108];return _0x17980e;},_0xaf01(_0x5c7cdc,_0x6560c4);}import{ClipboardPipeline as _0x349cc2}from'ckeditor5/src/clipboard.js';import _0x28c048 from'./importwordcommand.js';export default class e extends _0x24e698{static get[_0x576e9f(0xbe)](){const _0x270670=_0x576e9f;return _0x270670(0xc3);}static get[_0x576e9f(0xcc)](){const _0x481bd3=_0x576e9f;return[_0x25a669,_0x349cc2,_0x481bd3(0xc4)];}constructor(_0x475cb7){const _0x30f0b0=_0x576e9f;super(_0x475cb7),this[_0x30f0b0(0xc6)]=null;}async[_0x576e9f(0xbc)](){const _0x3b1411=_0x576e9f,_0x3157bf=this[_0x3b1411(0xd6)];_0x3157bf[_0x3b1411(0xd1)][_0x3b1411(0xc0)](_0x3b1411(0xd3),{'converterUrl':_0x3b1411(0xc8),'tokenUrl':(_0x3157bf[_0x3b1411(0xd1)][_0x3b1411(0xd9)](_0x3b1411(0xd2))||{})[_0x3b1411(0xd8)],'formatting':{'resets':_0x3b1411(0xc7),'defaults':_0x3b1411(0xc7),'styles':_0x3b1411(0xd4)}}),_0x3157bf[_0x3b1411(0xd7)][_0x3b1411(0xbd)](_0x3b1411(0xd3),new _0x28c048(_0x3157bf));const {tokenUrl:_0x5e842b}=_0x3157bf[_0x3b1411(0xd1)][_0x3b1411(0xd9)](_0x3b1411(0xd3));if(_0x5e842b){const {tokenUrl:_0x371d58}=_0x3157bf[_0x3b1411(0xd1)][_0x3b1411(0xd9)](_0x3b1411(0xd2))||{};this[_0x3b1411(0xc6)]=_0x5e842b===_0x371d58?_0x3157bf[_0x3b1411(0xbb)][_0x3b1411(0xd9)](_0x3b1411(0xc4))[_0x3b1411(0xcd)]:await _0x3157bf[_0x3b1411(0xbb)][_0x3b1411(0xd9)](_0x3b1411(0xc4))[_0x3b1411(0xca)](_0x5e842b);}}[_0x576e9f(0xd5)](){const _0x5a0d99=_0x576e9f;return this[_0x5a0d99(0xc6)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x43cf70}from'ckeditor5/src/core.js';import{SpinnerView as _0x5246e6}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x243b3f}from'ckeditor5/src/upload.js';import _0x2f24f0 from'../theme/icons/importword.svg';export default class o extends _0x43cf70{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x45555a=this['editor'],t=_0x45555a['t'];_0x45555a['ui']['componentFactory']['add']('importWord',_0x4bbe3d=>{const _0x6deb5b=_0x45555a['commands']['get']('importWord'),_0x45f5ef=new _0x243b3f(_0x4bbe3d),_0x13ae21=new _0x5246e6();return _0x45f5ef['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x45f5ef['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x2f24f0,'tooltip':!0x0}),_0x45f5ef['buttonView']['bind']('isOn','isEnabled')['to'](_0x6deb5b,'isBusy','isEnabled'),_0x13ae21['bind']('isVisible')['to'](_0x6deb5b,'isBusy'),_0x45f5ef['buttonView']['iconView']['bind']('isVisible')['to'](_0x6deb5b,'isBusy',_0x5a1bf4=>!_0x5a1bf4),_0x45f5ef['buttonView']['children']['add'](_0x13ae21),_0x45f5ef['on']('done',(_0x15b61c,_0x2e245a)=>{_0x45555a['execute']('importWord',_0x2e245a[0x0],{}),_0x45555a['editing']['view']['focus']();}),_0x45f5ef;});}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x49b4(){var _0xc62867=['139102DBuWxq','162140KHbgMU','18533438bPSmyv','6ZqntWY','36habpbl','9835792NHSdlt','236688vHqWbZ','6zgLXHP','5240695pwskBl','4680606lehDDa','342aDtZtT'];_0x49b4=function(){return _0xc62867;};return _0x49b4();}(function(_0x1de782,_0x49039b){var _0x2e9367=_0x3f64,_0x217bbe=_0x1de782();while(!![]){try{var _0x3bbbb5=parseInt(_0x2e9367(0x135))/0x1*(-parseInt(_0x2e9367(0x131))/0x2)+parseInt(_0x2e9367(0x130))/0x3*(-parseInt(_0x2e9367(0x139))/0x4)+-parseInt(_0x2e9367(0x132))/0x5*(parseInt(_0x2e9367(0x138))/0x6)+parseInt(_0x2e9367(0x133))/0x7+parseInt(_0x2e9367(0x12f))/0x8+-parseInt(_0x2e9367(0x134))/0x9*(parseInt(_0x2e9367(0x136))/0xa)+parseInt(_0x2e9367(0x137))/0xb;if(_0x3bbbb5===_0x49039b)break;else _0x217bbe['push'](_0x217bbe['shift']());}catch(_0x387c59){_0x217bbe['push'](_0x217bbe['shift']());}}}(_0x49b4,0xc1335));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';function _0x3f64(_0x579fa9,_0x36295a){var _0x49b473=_0x49b4();return _0x3f64=function(_0x3f642d,_0x469576){_0x3f642d=_0x3f642d-0x12f;var _0xdef1ea=_0x49b473[_0x3f642d];return _0xdef1ea;},_0x3f64(_0x579fa9,_0x36295a);}export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
|