@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240411.0 → 0.0.0-nightly-20240412.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:()=>f,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:()=>f,ImportWordEditing:()=>d,ImportWordUI:()=>n});var t=r(782),e=r(311);class n extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor;t.ui.componentFactory.add("importWord",(()=>{const r=this._createButton(e.FileDialogButtonView),o=t.commands.get("importWord");return r.bind("isOn").to(o,"isBusy"),r.tooltip=!0,r})),t.ui.componentFactory.add("menuBar:importWord",(()=>this._createButton(e.MenuBarMenuListItemFileDialogButtonView)))}_createButton(t){const r=this.editor,o=r.locale.t,n=r.commands.get("importWord"),i=new t(r.locale),s=new e.SpinnerView;return i.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),i.set({label:o("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n'}),i.bind("isEnabled").to(n),s.bind("isVisible").to(n,"isBusy"),i.iconView.bind("isVisible").to(n,"isBusy",(t=>!t)),i.children.add(s),i.on("done",((t,e)=>{r.execute("importWord",e[0],{}),r.editing.view.focus()})),i}}var i=r(331),s=r(783),a=r(584);class c extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const o=new DataTransfer;o.setData("text/html",r.html);const n=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(n),t.editing.view.document.fire("clipboardInput",{dataTransfer:o})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),o={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(o).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,o=(0,a.first)(r.getSelectedBlocks());return!!o&&e.checkChild(o.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const o=r.getFirstPosition(),n=(0,a.first)(r.getSelectedBlocks());let i;i=n.is("element","paragraph")&&n.isEmpty?o:o.isAtStart?e.createPositionBefore(n):o.isAtEnd?e.createPositionAfter(n):t.split(o).position,this._importMarker=t.addMarker("importWord:"+(0,a.uid)(),{usingOperation:!1,affectsData:!1,range:new s.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,a.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,a.logError)("import-word-plugin-conversion-failed")}}const l=p;function p(t,e){const r=u();return(p=function(t,e){return r[t-=257]})(t,e)}!function(t,e){const r=p,o=t();for(;;)try{if(770677===parseInt(r(285))/1*(-parseInt(r(265))/2)+-parseInt(r(273))/3+-parseInt(r(266))/4+-parseInt(r(283))/5*(-parseInt(r(260))/6)+parseInt(r(267))/7+parseInt(r(270))/8+parseInt(r(261))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(u);class d extends t.Plugin{static get[l(269)](){return l(276)}static get[l(286)](){const t=l;return[e.Notification,i.ClipboardPipeline,t(287)]}constructor(t){const e=l;super(t),this[e(272)]=null}async[l(282)](){const t=l,e=this[t(279)];e[t(281)][t(257)](t(263),{converterUrl:t(258),tokenUrl:(e[t(281)][t(268)](t(284))||{})[t(274)],formatting:{resets:t(275),defaults:t(275),styles:t(271)}}),e[t(262)][t(277)](t(263),new c(e));const{tokenUrl:r}=e[t(281)][t(268)](t(263));if(r){const{tokenUrl:o}=e[t(281)][t(268)](t(284))||{};this[t(272)]=r===o?e[t(259)][t(268)](t(287))[t(280)]:await e[t(259)][t(268)](t(287))[t(264)](r)}}[l(278)](){return this[l(272)]}}function u(){const t=["613305oiTCUW","get","pluginName","8233616wskYYT","inline","_token","3095460wzVUpM","tokenUrl","none","ImportWordEditing","add","getToken","editor","token","config","init","2511535poNkwC","cloudServices","562738WHhnFI","requires","CloudServices","define","https://docx-converter.cke-cs.com/v2/convert/docx-html","plugins","6ReiWqK","15210936yCQloq","commands","importWord","registerTokenUrl","2FAUXpE","3775972CCBkvL"];return(u=function(){return t})()}var h=g;function m(){var t=["requires","561258bNnPRJ","534246aMdhNz","3740040sxOaoW","pluginName","44806fmpkoF","ImportWord","14qBfuIO","1997475ghrKHW","2172108FgMuhW","9qrEJPV","904192UntHqj"];return(m=function(){return t})()}function g(t,e){var r=m();return(g=function(t,e){return r[t-=306]})(t,e)}!function(t,e){for(var r=g,o=t();;)try{if(397009===-parseInt(r(308))/1+parseInt(r(312))/2+parseInt(r(315))/3+-parseInt(r(316))/4+parseInt(r(310))/5+parseInt(r(309))/6*(parseInt(r(314))/7)+-parseInt(r(306))/8*(parseInt(r(317))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(m);class f extends t.Plugin{static get[h(311)](){return h(313)}static get[h(307)](){return[d,n]}}function I(t,e){var r=v();return(I=function(t,e){return r[t-=269]})(t,e)}function v(){var t=["732028GWrvUh","9RAndgX","5420576ynQDsK","808584OiCUfm","2915900epEIvZ","44XSGsoL","3780656joJDZf","27847bLXPRu","2135583IZuggy"];return(v=function(){return t})()}!function(t,e){for(var r=I,o=t();;)try{if(708968===-parseInt(r(275))/1*(-parseInt(r(273))/2)+parseInt(r(276))/3+parseInt(r(277))/4+parseInt(r(272))/5+-parseInt(r(271))/6+-parseInt(r(270))/7+parseInt(r(274))/8*(-parseInt(r(269))/9))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-20240412.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-20240412.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
|
-
|
|
23
|
+
var _0x2580b4=_0x4c8c;(function(_0x48bbd8,_0x20f7c7){var _0xd891a9=_0x4c8c,_0x1e49ce=_0x48bbd8();while(!![]){try{var _0x344a82=-parseInt(_0xd891a9(0x134))/0x1+parseInt(_0xd891a9(0x138))/0x2+parseInt(_0xd891a9(0x13b))/0x3+-parseInt(_0xd891a9(0x13c))/0x4+parseInt(_0xd891a9(0x136))/0x5+parseInt(_0xd891a9(0x135))/0x6*(parseInt(_0xd891a9(0x13a))/0x7)+-parseInt(_0xd891a9(0x132))/0x8*(parseInt(_0xd891a9(0x13d))/0x9);if(_0x344a82===_0x20f7c7)break;else _0x1e49ce['push'](_0x1e49ce['shift']());}catch(_0x288aba){_0x1e49ce['push'](_0x1e49ce['shift']());}}}(_0x25ce,0x60ed1));import{Plugin as _0x5dd9e9}from'ckeditor5/src/core.js';function _0x25ce(){var _0x268f81=['requires','561258bNnPRJ','534246aMdhNz','3740040sxOaoW','pluginName','44806fmpkoF','ImportWord','14qBfuIO','1997475ghrKHW','2172108FgMuhW','9qrEJPV','904192UntHqj'];_0x25ce=function(){return _0x268f81;};return _0x25ce();}function _0x4c8c(_0x2b35ac,_0x207a36){var _0x25ce3b=_0x25ce();return _0x4c8c=function(_0x4c8cc8,_0x2cb0fd){_0x4c8cc8=_0x4c8cc8-0x132;var _0x1a691a=_0x25ce3b[_0x4c8cc8];return _0x1a691a;},_0x4c8c(_0x2b35ac,_0x207a36);}import _0x3960ac from'./importwordui.js';import _0x1167a7 from'./importwordediting.js';export default class i extends _0x5dd9e9{static get[_0x2580b4(0x137)](){var _0xc2ee76=_0x2580b4;return _0xc2ee76(0x139);}static get[_0x2580b4(0x133)](){return[_0x1167a7,_0x3960ac];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x202755}from'ckeditor5/src/core.js';import{Range as _0x74e0df}from'ckeditor5/src/engine.js';import{logWarning as _0x3ad105,logError as _0xaa9360,first as _0x3b28cf,uid as _0xf63b32}from'ckeditor5/src/utils.js';export default class d extends _0x202755{constructor(_0x532fc4){super(_0x532fc4),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x11fcc1,_0x932422)=>{const _0x2e8ed6=new DataTransfer();_0x2e8ed6['setData']('text/html',_0x932422['html']);const _0x2b8a47=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x17bd79=>{this['_importMarker']['stopListening'](),_0x17bd79['setSelection'](_0x2b8a47),_0x532fc4['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x2e8ed6});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2e2209,_0x5eafc2={}){if(this['isBusy'])return Promise['resolve']();const _0x44856d=this['editor']['config']['get']('importWord'),_0x40e631={'url':_0x44856d['converterUrl'],'file':_0x2e2209,'serviceConfig':{..._0x5eafc2,'formatting':_0x44856d['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x40e631)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x482efa=this['editor']['model'],_0x67a421=_0x482efa['schema'],_0x2af64f=_0x482efa['document']['selection'],_0x4c1bbf=_0x3b28cf(_0x2af64f['getSelectedBlocks']());return!!_0x4c1bbf&&_0x67a421['checkChild'](_0x4c1bbf['parent'],'paragraph');}['_prepareForImport'](){const _0x1de58b=this['editor'],_0x4a92bb=_0x1de58b['model'],_0x5d8502=_0x4a92bb['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x1de58b['model']['createBatch']({'isUndoable':!0x0}),_0x4a92bb['enqueueChange'](this['_undoStepBatch'],_0x57e555=>{_0x5d8502['isCollapsed']||_0x4a92bb['deleteContent'](_0x5d8502,{'leaveUnmerged':!0x0});const _0x135183=_0x5d8502['getFirstPosition'](),_0x2b7318=_0x3b28cf(_0x5d8502['getSelectedBlocks']());let _0x20540f;_0x20540f=_0x2b7318['is']('element','paragraph')&&_0x2b7318['isEmpty']?_0x135183:_0x135183['isAtStart']?_0x4a92bb['createPositionBefore'](_0x2b7318):_0x135183['isAtEnd']?_0x4a92bb['createPositionAfter'](_0x2b7318):_0x57e555['split'](_0x135183)['position'],this['_importMarker']=_0x57e555['addMarker']('importWord:'+_0xf63b32(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x74e0df(_0x20540f)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x2c03e4=this['editor']['model'];_0x2c03e4['markers']['has'](this['_importMarker'])&&_0x2c03e4['enqueueChange'](this['_undoStepBatch'],_0x4ad54d=>{_0x4ad54d['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x176911,file:_0x3c0df4,serviceConfig:_0x59aedc}){const _0x1bf404=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x28d86f=new FormData();_0x28d86f['set']('config',JSON['stringify'](_0x59aedc)),_0x28d86f['set']('file',_0x3c0df4);const _0x1d375a={'method':'POST','headers':{},'body':_0x28d86f,'signal':this['_abortController']['signal']};return _0x1bf404&&(_0x1d375a['headers']['Authorization']=_0x1bf404['value']),fetch(_0x176911,_0x1d375a);}['_handleImportResponse'](_0x3642ac){return _0x3642ac['ok']?_0x3642ac['json']()['then'](_0x439a92=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x439a92);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x3ad105('import-word-plugin-import-cancelled');const _0xd93fc5=this['editor'],_0x52bf13=(0x0,_0xd93fc5['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0xd93fc5['plugins']['get']('Notification')['showWarning'](_0x52bf13),_0xaa9360('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x32336b=_0x1a53;(function(_0x253c20,_0x25df9e){const _0x3ae7e7=_0x1a53,_0x126921=_0x253c20();while(!![]){try{const _0x5ab4c1=parseInt(_0x3ae7e7(0x11d))/0x1*(-parseInt(_0x3ae7e7(0x109))/0x2)+-parseInt(_0x3ae7e7(0x111))/0x3+-parseInt(_0x3ae7e7(0x10a))/0x4+-parseInt(_0x3ae7e7(0x11b))/0x5*(-parseInt(_0x3ae7e7(0x104))/0x6)+parseInt(_0x3ae7e7(0x10b))/0x7+parseInt(_0x3ae7e7(0x10e))/0x8+parseInt(_0x3ae7e7(0x105))/0x9;if(_0x5ab4c1===_0x25df9e)break;else _0x126921['push'](_0x126921['shift']());}catch(_0x24dcf3){_0x126921['push'](_0x126921['shift']());}}}(_0x13ec,0xbc275));import{Plugin as _0x46f9a1}from'ckeditor5/src/core.js';import{Notification as _0x32bdb0}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x2cd064}from'ckeditor5/src/clipboard.js';function _0x1a53(_0x5214fb,_0x243d01){const _0x13ece2=_0x13ec();return _0x1a53=function(_0x1a53c1,_0x2736e4){_0x1a53c1=_0x1a53c1-0x101;let _0x58221a=_0x13ece2[_0x1a53c1];return _0x58221a;},_0x1a53(_0x5214fb,_0x243d01);}import _0x25e0b4 from'./importwordcommand.js';export default class e extends _0x46f9a1{static get[_0x32336b(0x10d)](){const _0x4ac6c8=_0x32336b;return _0x4ac6c8(0x114);}static get[_0x32336b(0x11e)](){const _0x53dbc6=_0x32336b;return[_0x32bdb0,_0x2cd064,_0x53dbc6(0x11f)];}constructor(_0x504f7b){const _0x236a36=_0x32336b;super(_0x504f7b),this[_0x236a36(0x110)]=null;}async[_0x32336b(0x11a)](){const _0x234416=_0x32336b,_0x51650c=this[_0x234416(0x117)];_0x51650c[_0x234416(0x119)][_0x234416(0x101)](_0x234416(0x107),{'converterUrl':_0x234416(0x102),'tokenUrl':(_0x51650c[_0x234416(0x119)][_0x234416(0x10c)](_0x234416(0x11c))||{})[_0x234416(0x112)],'formatting':{'resets':_0x234416(0x113),'defaults':_0x234416(0x113),'styles':_0x234416(0x10f)}}),_0x51650c[_0x234416(0x106)][_0x234416(0x115)](_0x234416(0x107),new _0x25e0b4(_0x51650c));const {tokenUrl:_0x6aa56b}=_0x51650c[_0x234416(0x119)][_0x234416(0x10c)](_0x234416(0x107));if(_0x6aa56b){const {tokenUrl:_0x363c83}=_0x51650c[_0x234416(0x119)][_0x234416(0x10c)](_0x234416(0x11c))||{};this[_0x234416(0x110)]=_0x6aa56b===_0x363c83?_0x51650c[_0x234416(0x103)][_0x234416(0x10c)](_0x234416(0x11f))[_0x234416(0x118)]:await _0x51650c[_0x234416(0x103)][_0x234416(0x10c)](_0x234416(0x11f))[_0x234416(0x108)](_0x6aa56b);}}[_0x32336b(0x116)](){const _0x463c43=_0x32336b;return this[_0x463c43(0x110)];}}function _0x13ec(){const _0x20436d=['613305oiTCUW','get','pluginName','8233616wskYYT','inline','_token','3095460wzVUpM','tokenUrl','none','ImportWordEditing','add','getToken','editor','token','config','init','2511535poNkwC','cloudServices','562738WHhnFI','requires','CloudServices','define','https://docx-converter.cke-cs.com/v2/convert/docx-html','plugins','6ReiWqK','15210936yCQloq','commands','importWord','registerTokenUrl','2FAUXpE','3775972CCBkvL'];_0x13ec=function(){return _0x20436d;};return _0x13ec();}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x362c7d}from'ckeditor5/src/core.js';import{SpinnerView as _0x5810fa,FileDialogButtonView as _0x2c2c96,MenuBarMenuListItemFileDialogButtonView as _0x48a5e8}from'ckeditor5/src/ui.js';import _0x204f4a from'../theme/icons/importword.svg';export default class o extends _0x362c7d{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x19e351=this['editor'];_0x19e351['ui']['componentFactory']['add']('importWord',()=>{const _0x36cc98=this['_createButton'](_0x2c2c96),_0x13b7a0=_0x19e351['commands']['get']('importWord');return _0x36cc98['bind']('isOn')['to'](_0x13b7a0,'isBusy'),_0x36cc98['tooltip']=!0x0,_0x36cc98;}),_0x19e351['ui']['componentFactory']['add']('menuBar:importWord',()=>this['_createButton'](_0x48a5e8));}['_createButton'](_0x3dbeac){const _0x3ec733=this['editor'],t=_0x3ec733['locale']['t'],_0x472ea3=_0x3ec733['commands']['get']('importWord'),_0x5687e1=new _0x3dbeac(_0x3ec733['locale']),_0x4c4c2b=new _0x5810fa();return _0x5687e1['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x5687e1['set']({'label':t('Import\x20from\x20Word'),'icon':_0x204f4a}),_0x5687e1['bind']('isEnabled')['to'](_0x472ea3),_0x4c4c2b['bind']('isVisible')['to'](_0x472ea3,'isBusy'),_0x5687e1['iconView']['bind']('isVisible')['to'](_0x472ea3,'isBusy',_0x466da3=>!_0x466da3),_0x5687e1['children']['add'](_0x4c4c2b),_0x5687e1['on']('done',(_0x24f517,_0x19478a)=>{_0x3ec733['execute']('importWord',_0x19478a[0x0],{}),_0x3ec733['editing']['view']['focus']();}),_0x5687e1;}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x47dc10,_0xc22b37){var _0x1e2db3=_0x5513,_0x3746d2=_0x47dc10();while(!![]){try{var _0x2491aa=-parseInt(_0x1e2db3(0x113))/0x1*(-parseInt(_0x1e2db3(0x111))/0x2)+parseInt(_0x1e2db3(0x114))/0x3+parseInt(_0x1e2db3(0x115))/0x4+parseInt(_0x1e2db3(0x110))/0x5+-parseInt(_0x1e2db3(0x10f))/0x6+-parseInt(_0x1e2db3(0x10e))/0x7+parseInt(_0x1e2db3(0x112))/0x8*(-parseInt(_0x1e2db3(0x10d))/0x9);if(_0x2491aa===_0xc22b37)break;else _0x3746d2['push'](_0x3746d2['shift']());}catch(_0x250cf2){_0x3746d2['push'](_0x3746d2['shift']());}}}(_0x1ec8,0xad168));function _0x5513(_0x2b886d,_0x192b23){var _0x1ec8c1=_0x1ec8();return _0x5513=function(_0x5513f1,_0x494016){_0x5513f1=_0x5513f1-0x10d;var _0x501dab=_0x1ec8c1[_0x5513f1];return _0x501dab;},_0x5513(_0x2b886d,_0x192b23);}export{default as ImportWord}from'./importword.js';function _0x1ec8(){var _0x487876=['732028GWrvUh','9RAndgX','5420576ynQDsK','808584OiCUfm','2915900epEIvZ','44XSGsoL','3780656joJDZf','27847bLXPRu','2135583IZuggy'];_0x1ec8=function(){return _0x487876;};return _0x1ec8();}export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
|