@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240326.0 → 0.0.0-nightly-20240328.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(
|
|
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:()=>u,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")}}const l=d;function d(t,e){const r=h();return(d=function(t,e){return r[t-=337]})(t,e)}!function(t,e){const r=d,n=t();for(;;)try{if(790792===parseInt(r(351))/1*(parseInt(r(369))/2)+-parseInt(r(346))/3+parseInt(r(354))/4*(parseInt(r(344))/5)+-parseInt(r(350))/6+parseInt(r(347))/7+-parseInt(r(363))/8*(parseInt(r(368))/9)+-parseInt(r(340))/10*(-parseInt(r(353))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(h);class u extends t.Plugin{static get[l(367)](){return l(341)}static get[l(342)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(358)]}constructor(t){const e=l;super(t),this[e(362)]=null}async[l(348)](){const t=l,e=this[t(360)];e[t(352)][t(338)](t(366),{converterUrl:t(365),tokenUrl:(e[t(352)][t(343)](t(337))||{})[t(361)],formatting:{resets:t(349),defaults:t(349),styles:t(364)}}),e[t(345)][t(356)](t(366),new c(e));const{tokenUrl:r}=e[t(352)][t(343)](t(366));if(r){const{tokenUrl:n}=e[t(352)][t(343)](t(337))||{};this[t(362)]=r===n?e[t(355)][t(343)](t(358))[t(357)]:await e[t(355)][t(343)](t(358))[t(339)](r)}}[l(359)](){return this[l(362)]}}function h(){const t=["pluginName","171awcPBN","314yqFewx","cloudServices","define","registerTokenUrl","70wyrGgt","ImportWordEditing","requires","get","111025wPwbMW","commands","4647729ZuypOI","4264806eOGICu","init","none","6084852frUpQS","7054YFiAIT","config","1310155faVkYL","224mniubQ","plugins","add","token","CloudServices","getToken","editor","tokenUrl","_token","185168tGcgKw","inline","https://docx-converter.cke-cs.com/v2/convert/docx-html","importWord"];return(h=function(){return t})()}function m(){var t=["27766600fGebnk","644884lbZTCn","312jgaBlH","pluginName","requires","124036hgFUaK","7409024qrjTfY","ImportWord","8443374bwxZin","3wYvAKT","333828RLeHVh","5AvfYYy","1320606tpEwsY"];return(m=function(){return t})()}var f=g;function g(t,e){var r=m();return(g=function(t,e){return r[t-=274]})(t,e)}!function(t,e){for(var r=g,n=t();;)try{if(728414===-parseInt(r(278))/1+parseInt(r(280))/2+-parseInt(r(275))/3*(parseInt(r(284))/4)+parseInt(r(277))/5*(-parseInt(r(274))/6)+-parseInt(r(285))/7+-parseInt(r(281))/8*(-parseInt(r(276))/9)+parseInt(r(279))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(m);class I extends t.Plugin{static get[f(282)](){return f(286)}static get[f(283)](){return[u,i]}}function v(){var t=["244308OLoXWC","54539710bhImxV","5988640AiYElV","9QfsIke","11ZSMpag","2CUUDsz","6113982aGASYa","12055336kgtoim","180930ncpmFp","5602257kOSJga","170FpnHix"];return(v=function(){return t})()}function b(t,e){var r=v();return(b=function(t,e){return r[t-=134]})(t,e)}!function(t,e){for(var r=b,n=t();;)try{if(978627===parseInt(r(136))/1+-parseInt(r(141))/2*(parseInt(r(134))/3)+-parseInt(r(138))/4+parseInt(r(135))/5*(parseInt(r(144))/6)+-parseInt(r(142))/7+parseInt(r(143))/8*(-parseInt(r(139))/9)+-parseInt(r(137))/10*(-parseInt(r(140))/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-20240328.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-20240328.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
|
+
function _0x3131(){var _0x31bd63=['27766600fGebnk','644884lbZTCn','312jgaBlH','pluginName','requires','124036hgFUaK','7409024qrjTfY','ImportWord','8443374bwxZin','3wYvAKT','333828RLeHVh','5AvfYYy','1320606tpEwsY'];_0x3131=function(){return _0x31bd63;};return _0x3131();}var _0x3f8546=_0x77e2;(function(_0x3311f7,_0x5bedfc){var _0x275f24=_0x77e2,_0x1ba269=_0x3311f7();while(!![]){try{var _0x2870a9=-parseInt(_0x275f24(0x116))/0x1+parseInt(_0x275f24(0x118))/0x2+-parseInt(_0x275f24(0x113))/0x3*(parseInt(_0x275f24(0x11c))/0x4)+parseInt(_0x275f24(0x115))/0x5*(-parseInt(_0x275f24(0x112))/0x6)+-parseInt(_0x275f24(0x11d))/0x7+-parseInt(_0x275f24(0x119))/0x8*(-parseInt(_0x275f24(0x114))/0x9)+parseInt(_0x275f24(0x117))/0xa;if(_0x2870a9===_0x5bedfc)break;else _0x1ba269['push'](_0x1ba269['shift']());}catch(_0x471f77){_0x1ba269['push'](_0x1ba269['shift']());}}}(_0x3131,0xb1d5e));function _0x77e2(_0x5b7aa6,_0x519e81){var _0x31316a=_0x3131();return _0x77e2=function(_0x77e20d,_0x6abc9d){_0x77e20d=_0x77e20d-0x112;var _0x484519=_0x31316a[_0x77e20d];return _0x484519;},_0x77e2(_0x5b7aa6,_0x519e81);}import{Plugin as _0x2d8a71}from'ckeditor5/src/core.js';import _0x500fd1 from'./importwordui.js';import _0x9dee00 from'./importwordediting.js';export default class i extends _0x2d8a71{static get[_0x3f8546(0x11a)](){var _0x4e9eb9=_0x3f8546;return _0x4e9eb9(0x11e);}static get[_0x3f8546(0x11b)](){return[_0x9dee00,_0x500fd1];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x4be77a}from'ckeditor5/src/core.js';import{Range as _0x5e13c4}from'ckeditor5/src/engine.js';import{logWarning as _0xacb4a5,logError as _0x4196f9,first as _0x217682,uid as _0x211381}from'ckeditor5/src/utils.js';export default class d extends _0x4be77a{constructor(_0x27cec4){super(_0x27cec4),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x25fa9b,_0x270ba0)=>{const _0x31425c=new DataTransfer();_0x31425c['setData']('text/html',_0x270ba0['html']);const _0x46535b=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x4fbccc=>{this['_importMarker']['stopListening'](),_0x4fbccc['setSelection'](_0x46535b),_0x27cec4['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x31425c});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0xa6b126,_0x250438={}){if(this['isBusy'])return Promise['resolve']();const _0x97cfc1=this['editor']['config']['get']('importWord'),_0x3cb455={'url':_0x97cfc1['converterUrl'],'file':_0xa6b126,'serviceConfig':{..._0x250438,'formatting':_0x97cfc1['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x3cb455)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x232471=this['editor']['model'],_0x4af619=_0x232471['schema'],_0x55a2c8=_0x232471['document']['selection'],_0x1b6adf=_0x217682(_0x55a2c8['getSelectedBlocks']());return!!_0x1b6adf&&_0x4af619['checkChild'](_0x1b6adf['parent'],'paragraph');}['_prepareForImport'](){const _0x243e41=this['editor'],_0x5fd54c=_0x243e41['model'],_0x66b950=_0x5fd54c['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x243e41['model']['createBatch']({'isUndoable':!0x0}),_0x5fd54c['enqueueChange'](this['_undoStepBatch'],_0x38cb86=>{_0x66b950['isCollapsed']||_0x5fd54c['deleteContent'](_0x66b950,{'leaveUnmerged':!0x0});const _0x3b732d=_0x66b950['getFirstPosition'](),_0x3392a5=_0x217682(_0x66b950['getSelectedBlocks']());let _0x227869;_0x227869=_0x3392a5['is']('element','paragraph')&&_0x3392a5['isEmpty']?_0x3b732d:_0x3b732d['isAtStart']?_0x5fd54c['createPositionBefore'](_0x3392a5):_0x3b732d['isAtEnd']?_0x5fd54c['createPositionAfter'](_0x3392a5):_0x38cb86['split'](_0x3b732d)['position'],this['_importMarker']=_0x38cb86['addMarker']('importWord:'+_0x211381(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x5e13c4(_0x227869)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x44a313=this['editor']['model'];_0x44a313['markers']['has'](this['_importMarker'])&&_0x44a313['enqueueChange'](this['_undoStepBatch'],_0x3d61b5=>{_0x3d61b5['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x69c784,file:_0x404e0b,serviceConfig:_0x34a9aa}){const _0x129243=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x246f97=new FormData();_0x246f97['set']('config',JSON['stringify'](_0x34a9aa)),_0x246f97['set']('file',_0x404e0b);const _0x524b53={'method':'POST','headers':{},'body':_0x246f97,'signal':this['_abortController']['signal']};return _0x129243&&(_0x524b53['headers']['Authorization']=_0x129243['value']),fetch(_0x69c784,_0x524b53);}['_handleImportResponse'](_0xce9cec){return _0xce9cec['ok']?_0xce9cec['json']()['then'](_0x5f556b=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x5f556b);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0xacb4a5('import-word-plugin-import-cancelled');const _0x592acc=this['editor'],_0x277ca5=(0x0,_0x592acc['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x592acc['plugins']['get']('Notification')['showWarning'](_0x277ca5),_0x4196f9('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x2f1605=_0x9a87;(function(_0x141290,_0x555315){const _0x310eaf=_0x9a87,_0x1dbbb9=_0x141290();while(!![]){try{const _0x4ec99d=parseInt(_0x310eaf(0x15f))/0x1*(parseInt(_0x310eaf(0x171))/0x2)+-parseInt(_0x310eaf(0x15a))/0x3+parseInt(_0x310eaf(0x162))/0x4*(parseInt(_0x310eaf(0x158))/0x5)+-parseInt(_0x310eaf(0x15e))/0x6+parseInt(_0x310eaf(0x15b))/0x7+-parseInt(_0x310eaf(0x16b))/0x8*(parseInt(_0x310eaf(0x170))/0x9)+-parseInt(_0x310eaf(0x154))/0xa*(-parseInt(_0x310eaf(0x161))/0xb);if(_0x4ec99d===_0x555315)break;else _0x1dbbb9['push'](_0x1dbbb9['shift']());}catch(_0x494523){_0x1dbbb9['push'](_0x1dbbb9['shift']());}}}(_0x2094,0xc1108));import{Plugin as _0x444a03}from'ckeditor5/src/core.js';import{Notification as _0x86d5f4}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x4999b7}from'ckeditor5/src/clipboard.js';import _0x5574f6 from'./importwordcommand.js';function _0x9a87(_0x35f183,_0x441096){const _0x209406=_0x2094();return _0x9a87=function(_0x9a8720,_0x5628a0){_0x9a8720=_0x9a8720-0x151;let _0x3b6541=_0x209406[_0x9a8720];return _0x3b6541;},_0x9a87(_0x35f183,_0x441096);}export default class e extends _0x444a03{static get[_0x2f1605(0x16f)](){const _0x5aa343=_0x2f1605;return _0x5aa343(0x155);}static get[_0x2f1605(0x156)](){const _0x7ac524=_0x2f1605;return[_0x86d5f4,_0x4999b7,_0x7ac524(0x166)];}constructor(_0x2c7a96){const _0x37d8ca=_0x2f1605;super(_0x2c7a96),this[_0x37d8ca(0x16a)]=null;}async[_0x2f1605(0x15c)](){const _0x474ece=_0x2f1605,_0xfdb22c=this[_0x474ece(0x168)];_0xfdb22c[_0x474ece(0x160)][_0x474ece(0x152)](_0x474ece(0x16e),{'converterUrl':_0x474ece(0x16d),'tokenUrl':(_0xfdb22c[_0x474ece(0x160)][_0x474ece(0x157)](_0x474ece(0x151))||{})[_0x474ece(0x169)],'formatting':{'resets':_0x474ece(0x15d),'defaults':_0x474ece(0x15d),'styles':_0x474ece(0x16c)}}),_0xfdb22c[_0x474ece(0x159)][_0x474ece(0x164)](_0x474ece(0x16e),new _0x5574f6(_0xfdb22c));const {tokenUrl:_0x5da980}=_0xfdb22c[_0x474ece(0x160)][_0x474ece(0x157)](_0x474ece(0x16e));if(_0x5da980){const {tokenUrl:_0xa53023}=_0xfdb22c[_0x474ece(0x160)][_0x474ece(0x157)](_0x474ece(0x151))||{};this[_0x474ece(0x16a)]=_0x5da980===_0xa53023?_0xfdb22c[_0x474ece(0x163)][_0x474ece(0x157)](_0x474ece(0x166))[_0x474ece(0x165)]:await _0xfdb22c[_0x474ece(0x163)][_0x474ece(0x157)](_0x474ece(0x166))[_0x474ece(0x153)](_0x5da980);}}[_0x2f1605(0x167)](){const _0x392fb5=_0x2f1605;return this[_0x392fb5(0x16a)];}}function _0x2094(){const _0xe8c60b=['pluginName','171awcPBN','314yqFewx','cloudServices','define','registerTokenUrl','70wyrGgt','ImportWordEditing','requires','get','111025wPwbMW','commands','4647729ZuypOI','4264806eOGICu','init','none','6084852frUpQS','7054YFiAIT','config','1310155faVkYL','224mniubQ','plugins','add','token','CloudServices','getToken','editor','tokenUrl','_token','185168tGcgKw','inline','https://docx-converter.cke-cs.com/v2/convert/docx-html','importWord'];_0x2094=function(){return _0xe8c60b;};return _0x2094();}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x45c1ca}from'ckeditor5/src/core.js';import{SpinnerView as _0x26da3c}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x4b8913}from'ckeditor5/src/upload.js';import _0x207828 from'../theme/icons/importword.svg';export default class o extends _0x45c1ca{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0xc52435=this['editor'],t=_0xc52435['t'];_0xc52435['ui']['componentFactory']['add']('importWord',_0x380881=>{const _0x89e0de=_0xc52435['commands']['get']('importWord'),_0x35d6b3=new _0x4b8913(_0x380881),_0x1fdad1=new _0x26da3c();return _0x35d6b3['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x35d6b3['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x207828,'tooltip':!0x0}),_0x35d6b3['buttonView']['bind']('isOn','isEnabled')['to'](_0x89e0de,'isBusy','isEnabled'),_0x1fdad1['bind']('isVisible')['to'](_0x89e0de,'isBusy'),_0x35d6b3['buttonView']['iconView']['bind']('isVisible')['to'](_0x89e0de,'isBusy',_0x43b9f6=>!_0x43b9f6),_0x35d6b3['buttonView']['children']['add'](_0x1fdad1),_0x35d6b3['on']('done',(_0x154b30,_0x23a222)=>{_0xc52435['execute']('importWord',_0x23a222[0x0],{}),_0xc52435['editing']['view']['focus']();}),_0x35d6b3;});}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x75fc(){var _0x4fbfbd=['244308OLoXWC','54539710bhImxV','5988640AiYElV','9QfsIke','11ZSMpag','2CUUDsz','6113982aGASYa','12055336kgtoim','180930ncpmFp','5602257kOSJga','170FpnHix'];_0x75fc=function(){return _0x4fbfbd;};return _0x75fc();}(function(_0x29f682,_0x1f918d){var _0x1aeedc=_0x1cd1,_0x272c1f=_0x29f682();while(!![]){try{var _0x247709=parseInt(_0x1aeedc(0x88))/0x1+-parseInt(_0x1aeedc(0x8d))/0x2*(parseInt(_0x1aeedc(0x86))/0x3)+-parseInt(_0x1aeedc(0x8a))/0x4+parseInt(_0x1aeedc(0x87))/0x5*(parseInt(_0x1aeedc(0x90))/0x6)+-parseInt(_0x1aeedc(0x8e))/0x7+parseInt(_0x1aeedc(0x8f))/0x8*(-parseInt(_0x1aeedc(0x8b))/0x9)+-parseInt(_0x1aeedc(0x89))/0xa*(-parseInt(_0x1aeedc(0x8c))/0xb);if(_0x247709===_0x1f918d)break;else _0x272c1f['push'](_0x272c1f['shift']());}catch(_0x224836){_0x272c1f['push'](_0x272c1f['shift']());}}}(_0x75fc,0xeeec3));function _0x1cd1(_0x549178,_0xdb31f6){var _0x75fc6=_0x75fc();return _0x1cd1=function(_0x1cd161,_0x401e50){_0x1cd161=_0x1cd161-0x86;var _0x2408c8=_0x75fc6[_0x1cd161];return _0x2408c8;},_0x1cd1(_0x549178,_0xdb31f6);}export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
|