@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240304.0 → 0.0.0-nightly-20240306.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:()=>
|
|
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),l=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,l.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,l.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,l.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,l.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,l.logError)("import-word-plugin-conversion-failed")}}const p=d;function d(t,e){const r=u();return(d=function(t,e){return r[t-=191]})(t,e)}function u(){const t=["1927158dRBaQK","config","56uATHEc","inline","editor","getToken","_token","7418FuWHsj","init","commands","132nXTPyK","token","define","requires","importWord","tokenUrl","2924780WXAAMl","none","cloudServices","466384PgFFXZ","1690440AACvsC","ImportWordEditing","1946880EgNRFG","add","27aMBlTN","21VQlQwQ","registerTokenUrl","40100alRNEB","plugins","https://docx-converter.cke-cs.com/v2/convert/docx-html","CloudServices","pluginName","263HnYjFw","get"];return(u=function(){return t})()}!function(t,e){const r=d,n=t();for(;;)try{if(630837===-parseInt(r(204))/1*(-parseInt(r(213))/2)+parseInt(r(197))/3*(parseInt(r(199))/4)+-parseInt(r(194))/5+parseInt(r(206))/6+-parseInt(r(208))/7*(-parseInt(r(191))/8)+-parseInt(r(196))/9*(-parseInt(r(222))/10)+-parseInt(r(216))/11*(parseInt(r(192))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class h extends t.Plugin{static get[p(203)](){return p(193)}static get[p(219)](){const t=p;return[e.Notification,s.ClipboardPipeline,t(202)]}constructor(t){const e=p;super(t),this[e(212)]=null}async[p(214)](){const t=p,e=this[t(210)];e[t(207)][t(218)](t(220),{converterUrl:t(201),tokenUrl:(e[t(207)][t(205)](t(224))||{})[t(221)],formatting:{resets:t(223),defaults:t(223),styles:t(209)}}),e[t(215)][t(195)](t(220),new c(e));const{tokenUrl:r}=e[t(207)][t(205)](t(220));if(r){const{tokenUrl:n}=e[t(207)][t(205)](t(224))||{};this[t(212)]=r===n?e[t(200)][t(205)](t(202))[t(217)]:await e[t(200)][t(205)](t(202))[t(198)](r)}}[p(211)](){return this[p(212)]}}var m=g;function f(){var t=["3ScXCfG","2877381vJKxmu","5Ydmukk","pluginName","355006QezwPY","1810244wEeSPo","ImportWord","258152DNInzX","2827909hVJYTt","629618YuKNFh","466338nkrleT","requires"];return(f=function(){return t})()}function g(t,e){var r=f();return(g=function(t,e){return r[t-=124]})(t,e)}!function(t,e){for(var r=g,n=t();;)try{if(256078===parseInt(r(125))/1+-parseInt(r(130))/2*(-parseInt(r(133))/3)+-parseInt(r(126))/4*(parseInt(r(135))/5)+-parseInt(r(131))/6+parseInt(r(129))/7+parseInt(r(128))/8+-parseInt(r(134))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(f);class I extends t.Plugin{static get[m(124)](){return m(127)}static get[m(132)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=179]})(t,e)}function b(){var t=["1544025xikyki","1376612brAIrj","116133VkLQJQ","2964880JogxmQ","650466ptRlTu","14tCyWVj","5sWiJjb","211470dSXUzM","4153356reoDCf"];return(b=function(){return t})()}!function(t,e){for(var r=v,n=t();;)try{if(218462===-parseInt(r(187))/1+parseInt(r(185))/2*(parseInt(r(182))/3)+parseInt(r(181))/4*(-parseInt(r(186))/5)+-parseInt(r(184))/6+-parseInt(r(180))/7+parseInt(r(183))/8+parseInt(r(179))/9)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-20240306.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-20240306.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 _0x52dfc1=_0x13f2;(function(_0x2e6882,_0xbef37b){var _0x3b7dfb=_0x13f2,_0x456b11=_0x2e6882();while(!![]){try{var _0x30fcf2=parseInt(_0x3b7dfb(0x7d))/0x1+-parseInt(_0x3b7dfb(0x82))/0x2*(-parseInt(_0x3b7dfb(0x85))/0x3)+-parseInt(_0x3b7dfb(0x7e))/0x4*(parseInt(_0x3b7dfb(0x87))/0x5)+-parseInt(_0x3b7dfb(0x83))/0x6+parseInt(_0x3b7dfb(0x81))/0x7+parseInt(_0x3b7dfb(0x80))/0x8+-parseInt(_0x3b7dfb(0x86))/0x9;if(_0x30fcf2===_0xbef37b)break;else _0x456b11['push'](_0x456b11['shift']());}catch(_0x151728){_0x456b11['push'](_0x456b11['shift']());}}}(_0x48e7,0x3e84e));import{Plugin as _0x10bca9}from'ckeditor5/src/core.js';import _0x1aa9f7 from'./importwordui.js';import _0x556c61 from'./importwordediting.js';function _0x48e7(){var _0x5a8663=['3ScXCfG','2877381vJKxmu','5Ydmukk','pluginName','355006QezwPY','1810244wEeSPo','ImportWord','258152DNInzX','2827909hVJYTt','629618YuKNFh','466338nkrleT','requires'];_0x48e7=function(){return _0x5a8663;};return _0x48e7();}function _0x13f2(_0x19b207,_0x22d80b){var _0x48e735=_0x48e7();return _0x13f2=function(_0x13f2b8,_0x509242){_0x13f2b8=_0x13f2b8-0x7c;var _0x1f1b9b=_0x48e735[_0x13f2b8];return _0x1f1b9b;},_0x13f2(_0x19b207,_0x22d80b);}export default class i extends _0x10bca9{static get[_0x52dfc1(0x7c)](){var _0x2ab125=_0x52dfc1;return _0x2ab125(0x7f);}static get[_0x52dfc1(0x84)](){return[_0x556c61,_0x1aa9f7];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x59d548}from'ckeditor5/src/core.js';import{Range as _0x577fc6}from'ckeditor5/src/engine.js';import{logWarning as _0x519f75,logError as _0x210e6a,first as _0x4d6941,uid as _0x713c10}from'ckeditor5/src/utils.js';export default class d extends _0x59d548{constructor(_0x373f8d){super(_0x373f8d),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x4ad4dc,_0x28404a)=>{const _0x4f6ddb=new DataTransfer();_0x4f6ddb['setData']('text/html',_0x28404a['html']);const _0x35aa45=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x178e2b=>{this['_importMarker']['stopListening'](),_0x178e2b['setSelection'](_0x35aa45),_0x373f8d['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x4f6ddb});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x452181,_0x660cb={}){if(this['isBusy'])return Promise['resolve']();const _0x18d3ce=this['editor']['config']['get']('importWord'),_0x56229c={'url':_0x18d3ce['converterUrl'],'file':_0x452181,'serviceConfig':{..._0x660cb,'formatting':_0x18d3ce['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x56229c)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x5e5d85=this['editor']['model'],_0x2bcfea=_0x5e5d85['schema'],_0x2f22a6=_0x5e5d85['document']['selection'],_0x13835c=_0x4d6941(_0x2f22a6['getSelectedBlocks']());return!!_0x13835c&&_0x2bcfea['checkChild'](_0x13835c['parent'],'paragraph');}['_prepareForImport'](){const _0x7e1045=this['editor'],_0x3f8193=_0x7e1045['model'],_0x3d41a5=_0x3f8193['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x7e1045['model']['createBatch']({'isUndoable':!0x0}),_0x3f8193['enqueueChange'](this['_undoStepBatch'],_0x46a7c8=>{_0x3d41a5['isCollapsed']||_0x3f8193['deleteContent'](_0x3d41a5,{'leaveUnmerged':!0x0});const _0x4209bf=_0x3d41a5['getFirstPosition'](),_0x3f3a12=_0x4d6941(_0x3d41a5['getSelectedBlocks']());let _0x30753c;_0x30753c=_0x3f3a12['is']('element','paragraph')&&_0x3f3a12['isEmpty']?_0x4209bf:_0x4209bf['isAtStart']?_0x3f8193['createPositionBefore'](_0x3f3a12):_0x4209bf['isAtEnd']?_0x3f8193['createPositionAfter'](_0x3f3a12):_0x46a7c8['split'](_0x4209bf)['position'],this['_importMarker']=_0x46a7c8['addMarker']('importWord:'+_0x713c10(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x577fc6(_0x30753c)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x2d2b66=this['editor']['model'];_0x2d2b66['markers']['has'](this['_importMarker'])&&_0x2d2b66['enqueueChange'](this['_undoStepBatch'],_0x28d6a3=>{_0x28d6a3['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x32c756,file:_0x1c493a,serviceConfig:_0x597a04}){const _0x47c9dc=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x144071=new FormData();_0x144071['set']('config',JSON['stringify'](_0x597a04)),_0x144071['set']('file',_0x1c493a);const _0x40a94a={'method':'POST','headers':{},'body':_0x144071,'signal':this['_abortController']['signal']};return _0x47c9dc&&(_0x40a94a['headers']['Authorization']=_0x47c9dc['value']),fetch(_0x32c756,_0x40a94a);}['_handleImportResponse'](_0xd65ec6){return _0xd65ec6['ok']?_0xd65ec6['json']()['then'](_0x4409eb=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x4409eb);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x519f75('import-word-plugin-import-cancelled');const _0x3e6f0a=this['editor'],_0x3c299c=(0x0,_0x3e6f0a['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x3e6f0a['plugins']['get']('Notification')['showWarning'](_0x3c299c),_0x210e6a('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x37be85=_0x3cfa;function _0x3cfa(_0x3d4069,_0x18989b){const _0x29e7d7=_0x29e7();return _0x3cfa=function(_0x3cfa2b,_0x1fa4fd){_0x3cfa2b=_0x3cfa2b-0xbf;let _0x340ee7=_0x29e7d7[_0x3cfa2b];return _0x340ee7;},_0x3cfa(_0x3d4069,_0x18989b);}(function(_0x27316d,_0x2b2a8d){const _0x502971=_0x3cfa,_0x454b59=_0x27316d();while(!![]){try{const _0x4e81cc=-parseInt(_0x502971(0xcc))/0x1*(-parseInt(_0x502971(0xd5))/0x2)+parseInt(_0x502971(0xc5))/0x3*(parseInt(_0x502971(0xc7))/0x4)+-parseInt(_0x502971(0xc2))/0x5+parseInt(_0x502971(0xce))/0x6+-parseInt(_0x502971(0xd0))/0x7*(-parseInt(_0x502971(0xbf))/0x8)+-parseInt(_0x502971(0xc4))/0x9*(-parseInt(_0x502971(0xde))/0xa)+-parseInt(_0x502971(0xd8))/0xb*(parseInt(_0x502971(0xc0))/0xc);if(_0x4e81cc===_0x2b2a8d)break;else _0x454b59['push'](_0x454b59['shift']());}catch(_0x4166e8){_0x454b59['push'](_0x454b59['shift']());}}}(_0x29e7,0x9a035));import{Plugin as _0x3ca7d3}from'ckeditor5/src/core.js';function _0x29e7(){const _0x225e4b=['1927158dRBaQK','config','56uATHEc','inline','editor','getToken','_token','7418FuWHsj','init','commands','132nXTPyK','token','define','requires','importWord','tokenUrl','2924780WXAAMl','none','cloudServices','466384PgFFXZ','1690440AACvsC','ImportWordEditing','1946880EgNRFG','add','27aMBlTN','21VQlQwQ','registerTokenUrl','40100alRNEB','plugins','https://docx-converter.cke-cs.com/v2/convert/docx-html','CloudServices','pluginName','263HnYjFw','get'];_0x29e7=function(){return _0x225e4b;};return _0x29e7();}import{Notification as _0x19fb3c}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x336cad}from'ckeditor5/src/clipboard.js';import _0x260a08 from'./importwordcommand.js';export default class e extends _0x3ca7d3{static get[_0x37be85(0xcb)](){const _0x38d096=_0x37be85;return _0x38d096(0xc1);}static get[_0x37be85(0xdb)](){const _0xc03dd1=_0x37be85;return[_0x19fb3c,_0x336cad,_0xc03dd1(0xca)];}constructor(_0x163c91){const _0x2c0aa6=_0x37be85;super(_0x163c91),this[_0x2c0aa6(0xd4)]=null;}async[_0x37be85(0xd6)](){const _0xfb592c=_0x37be85,_0x587504=this[_0xfb592c(0xd2)];_0x587504[_0xfb592c(0xcf)][_0xfb592c(0xda)](_0xfb592c(0xdc),{'converterUrl':_0xfb592c(0xc9),'tokenUrl':(_0x587504[_0xfb592c(0xcf)][_0xfb592c(0xcd)](_0xfb592c(0xe0))||{})[_0xfb592c(0xdd)],'formatting':{'resets':_0xfb592c(0xdf),'defaults':_0xfb592c(0xdf),'styles':_0xfb592c(0xd1)}}),_0x587504[_0xfb592c(0xd7)][_0xfb592c(0xc3)](_0xfb592c(0xdc),new _0x260a08(_0x587504));const {tokenUrl:_0x1cc6dd}=_0x587504[_0xfb592c(0xcf)][_0xfb592c(0xcd)](_0xfb592c(0xdc));if(_0x1cc6dd){const {tokenUrl:_0x270c16}=_0x587504[_0xfb592c(0xcf)][_0xfb592c(0xcd)](_0xfb592c(0xe0))||{};this[_0xfb592c(0xd4)]=_0x1cc6dd===_0x270c16?_0x587504[_0xfb592c(0xc8)][_0xfb592c(0xcd)](_0xfb592c(0xca))[_0xfb592c(0xd9)]:await _0x587504[_0xfb592c(0xc8)][_0xfb592c(0xcd)](_0xfb592c(0xca))[_0xfb592c(0xc6)](_0x1cc6dd);}}[_0x37be85(0xd3)](){const _0xb8c1c1=_0x37be85;return this[_0xb8c1c1(0xd4)];}}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x27b49c}from'ckeditor5/src/core.js';import{SpinnerView as _0x2d95b9}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x413118}from'ckeditor5/src/upload.js';import _0x18f32a from'../theme/icons/importword.svg';export default class o extends _0x27b49c{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0xa49344=this['editor'],t=_0xa49344['t'];_0xa49344['ui']['componentFactory']['add']('importWord',_0x1c3b0a=>{const _0x519a17=_0xa49344['commands']['get']('importWord'),_0x268be8=new _0x413118(_0x1c3b0a),_0x59beba=new _0x2d95b9();return _0x268be8['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x268be8['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x18f32a,'tooltip':!0x0}),_0x268be8['buttonView']['bind']('isOn','isEnabled')['to'](_0x519a17,'isBusy','isEnabled'),_0x59beba['bind']('isVisible')['to'](_0x519a17,'isBusy'),_0x268be8['buttonView']['iconView']['bind']('isVisible')['to'](_0x519a17,'isBusy',_0x2fe04f=>!_0x2fe04f),_0x268be8['buttonView']['children']['add'](_0x59beba),_0x268be8['on']('done',(_0x3c9694,_0x22d7ec)=>{_0xa49344['execute']('importWord',_0x22d7ec[0x0],{}),_0xa49344['editing']['view']['focus']();}),_0x268be8;});}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x183dc7,_0x455762){var _0x386780=_0x4686,_0x7928ab=_0x183dc7();while(!![]){try{var _0x1d2f77=-parseInt(_0x386780(0xbb))/0x1+parseInt(_0x386780(0xb9))/0x2*(parseInt(_0x386780(0xb6))/0x3)+parseInt(_0x386780(0xb5))/0x4*(-parseInt(_0x386780(0xba))/0x5)+-parseInt(_0x386780(0xb8))/0x6+-parseInt(_0x386780(0xb4))/0x7+parseInt(_0x386780(0xb7))/0x8+parseInt(_0x386780(0xb3))/0x9;if(_0x1d2f77===_0x455762)break;else _0x7928ab['push'](_0x7928ab['shift']());}catch(_0x5960af){_0x7928ab['push'](_0x7928ab['shift']());}}}(_0x23ed,0x3555e));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';function _0x4686(_0x45a309,_0x57d6d3){var _0x23ed6f=_0x23ed();return _0x4686=function(_0x4686ae,_0x299fd7){_0x4686ae=_0x4686ae-0xb3;var _0x44a9f4=_0x23ed6f[_0x4686ae];return _0x44a9f4;},_0x4686(_0x45a309,_0x57d6d3);}function _0x23ed(){var _0x5ea974=['1544025xikyki','1376612brAIrj','116133VkLQJQ','2964880JogxmQ','650466ptRlTu','14tCyWVj','5sWiJjb','211470dSXUzM','4153356reoDCf'];_0x23ed=function(){return _0x5ea974;};return _0x23ed();}
|