@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240228.0 → 0.0.0-nightly-20240229.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/lang/translations/he.po +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:()=>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-=248]})(t,e)}!function(t,e){const r=d,n=t();for(;;)try{if(599872===-parseInt(r(252))/1*(-parseInt(r(268))/2)+-parseInt(r(276))/3+parseInt(r(260))/4*(parseInt(r(258))/5)+-parseInt(r(274))/6+parseInt(r(255))/7+parseInt(r(254))/8+-parseInt(r(271))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(h);class u extends t.Plugin{static get[l(264)](){return l(257)}static get[l(262)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(278)]}constructor(t){const e=l;super(t),this[e(256)]=null}async[l(249)](){const t=l,e=this[t(253)];e[t(263)][t(269)](t(266),{converterUrl:t(270),tokenUrl:(e[t(263)][t(277)](t(265))||{})[t(275)],formatting:{resets:t(251),defaults:t(251),styles:t(250)}}),e[t(248)][t(273)](t(266),new c(e));const{tokenUrl:r}=e[t(263)][t(277)](t(266));if(r){const{tokenUrl:n}=e[t(263)][t(277)](t(265))||{};this[t(256)]=r===n?e[t(259)][t(277)](t(278))[t(272)]:await e[t(259)][t(277)](t(278))[t(267)](r)}}[l(261)](){return this[l(256)]}}function h(){const t=["requires","config","pluginName","cloudServices","importWord","registerTokenUrl","24126NKRvYO","define","https://docx-converter.cke-cs.com/v2/convert/docx-html","6604029AxOdHS","token","add","6392832hFqeCG","tokenUrl","1306920hIKBXp","get","CloudServices","commands","init","inline","none","88INSzbH","editor","5842824risLLv","6066802LzniHY","_token","ImportWordEditing","880910aEXQNk","plugins","4uvdDaS","getToken"];return(h=function(){return t})()}function m(){var t=["90138RqVefV","12LGmANf","23090OazMuT","2210635eSbAMg","30dmQFnc","ImportWord","requires","1030932LvJfkv","pluginName","256415WXoYDE","2608425GVFPfu","830nLpbDw","46233bZNTsL","8mNDSQh"];return(m=function(){return t})()}var f=g;function g(t,e){var r=m();return(g=function(t,e){return r[t-=441]})(t,e)}!function(t,e){for(var r=g,n=t();;)try{if(187214===-parseInt(r(442))/1+parseInt(r(444))/2*(-parseInt(r(446))/3)+parseInt(r(443))/4*(-parseInt(r(451))/5)+parseInt(r(449))/6+parseInt(r(445))/7*(parseInt(r(441))/8)+-parseInt(r(452))/9+parseInt(r(453))/10*(parseInt(r(454))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(m);class I extends t.Plugin{static get[f(450)](){return f(447)}static get[f(448)](){return[u,i]}}function v(){var t=["27zFvWIU","447180yZDKzW","205804LHTQhc","36AmXcbv","566416UNdYlp","470099OIqJwM","22jxVcDs","30tfslBN","12ZtZQDm","753484VayRHj","10DlVXUm","15899273zTLNMA","257539jBxHPs"];return(v=function(){return t})()}function b(t,e){var r=v();return(b=function(t,e){return r[t-=266]})(t,e)}!function(t,e){for(var r=b,n=t();;)try{if(680027===parseInt(r(269))/1+-parseInt(r(272))/2*(-parseInt(r(273))/3)+-parseInt(r(266))/4*(-parseInt(r(267))/5)+parseInt(r(277))/6*(parseInt(r(275))/7)+-parseInt(r(274))/8*(parseInt(r(270))/9)+parseInt(r(271))/10*(-parseInt(r(276))/11)+-parseInt(r(278))/12*(parseInt(r(268))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(v)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=n})();
|
package/lang/translations/he.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
|
|
16
16
|
"Language: he\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;\n"
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
19
|
|
|
20
20
|
msgctxt "A toolbar button tooltip for the import from Word feature."
|
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-20240229.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-20240229.0"
|
|
34
34
|
},
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"author": "CKSource (https://cksource.com/)",
|
package/src/importword.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
function _0x575a(){var _0x47c256=['90138RqVefV','12LGmANf','23090OazMuT','2210635eSbAMg','30dmQFnc','ImportWord','requires','1030932LvJfkv','pluginName','256415WXoYDE','2608425GVFPfu','830nLpbDw','46233bZNTsL','8mNDSQh'];_0x575a=function(){return _0x47c256;};return _0x575a();}var _0x1c69b6=_0x239c;function _0x239c(_0x41486e,_0x31c722){var _0x575a2c=_0x575a();return _0x239c=function(_0x239c58,_0x3fb4ea){_0x239c58=_0x239c58-0x1b9;var _0x1bd623=_0x575a2c[_0x239c58];return _0x1bd623;},_0x239c(_0x41486e,_0x31c722);}(function(_0x849c97,_0x9c5160){var _0x2c9a40=_0x239c,_0x1ebd79=_0x849c97();while(!![]){try{var _0x2e6e85=-parseInt(_0x2c9a40(0x1ba))/0x1+parseInt(_0x2c9a40(0x1bc))/0x2*(-parseInt(_0x2c9a40(0x1be))/0x3)+parseInt(_0x2c9a40(0x1bb))/0x4*(-parseInt(_0x2c9a40(0x1c3))/0x5)+parseInt(_0x2c9a40(0x1c1))/0x6+parseInt(_0x2c9a40(0x1bd))/0x7*(parseInt(_0x2c9a40(0x1b9))/0x8)+-parseInt(_0x2c9a40(0x1c4))/0x9+parseInt(_0x2c9a40(0x1c5))/0xa*(parseInt(_0x2c9a40(0x1c6))/0xb);if(_0x2e6e85===_0x9c5160)break;else _0x1ebd79['push'](_0x1ebd79['shift']());}catch(_0x5b58cb){_0x1ebd79['push'](_0x1ebd79['shift']());}}}(_0x575a,0x2db4e));import{Plugin as _0x30a538}from'ckeditor5/src/core.js';import _0x4a4ec3 from'./importwordui.js';import _0x450bd4 from'./importwordediting.js';export default class i extends _0x30a538{static get[_0x1c69b6(0x1c2)](){var _0x21dd22=_0x1c69b6;return _0x21dd22(0x1bf);}static get[_0x1c69b6(0x1c0)](){return[_0x450bd4,_0x4a4ec3];}}
|
package/src/importwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x391017}from'ckeditor5/src/core.js';import{Range as _0x128d82}from'ckeditor5/src/engine.js';import{logWarning as _0x2e2ef1,logError as _0x2c32e5,first as _0x23559c,uid as _0x205d23}from'ckeditor5/src/utils.js';export default class d extends _0x391017{constructor(_0x41dfb6){super(_0x41dfb6),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x3c83cf,_0x256da5)=>{const _0x23354d=new DataTransfer();_0x23354d['setData']('text/html',_0x256da5['html']);const _0x275512=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x51720e=>{this['_importMarker']['stopListening'](),_0x51720e['setSelection'](_0x275512),_0x41dfb6['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x23354d});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x544367,_0x2f19d5={}){if(this['isBusy'])return Promise['resolve']();const _0x5cea6a=this['editor']['config']['get']('importWord'),_0x494f5f={'url':_0x5cea6a['converterUrl'],'file':_0x544367,'serviceConfig':{..._0x2f19d5,'formatting':_0x5cea6a['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x494f5f)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x154461=this['editor']['model'],_0x261a68=_0x154461['schema'],_0x5ea1a4=_0x154461['document']['selection'],_0x13ef5f=_0x23559c(_0x5ea1a4['getSelectedBlocks']());return!!_0x13ef5f&&_0x261a68['checkChild'](_0x13ef5f['parent'],'paragraph');}['_prepareForImport'](){const _0x1ff9b1=this['editor'],_0x39e538=_0x1ff9b1['model'],_0x17bb21=_0x39e538['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x1ff9b1['model']['createBatch']({'isUndoable':!0x0}),_0x39e538['enqueueChange'](this['_undoStepBatch'],_0x46ff6a=>{_0x17bb21['isCollapsed']||_0x39e538['deleteContent'](_0x17bb21,{'leaveUnmerged':!0x0});const _0x5ebf3a=_0x17bb21['getFirstPosition'](),_0x5bd30a=_0x23559c(_0x17bb21['getSelectedBlocks']());let _0x417b63;_0x417b63=_0x5bd30a['is']('element','paragraph')&&_0x5bd30a['isEmpty']?_0x5ebf3a:_0x5ebf3a['isAtStart']?_0x39e538['createPositionBefore'](_0x5bd30a):_0x5ebf3a['isAtEnd']?_0x39e538['createPositionAfter'](_0x5bd30a):_0x46ff6a['split'](_0x5ebf3a)['position'],this['_importMarker']=_0x46ff6a['addMarker']('importWord:'+_0x205d23(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x128d82(_0x417b63)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x388c50=this['editor']['model'];_0x388c50['markers']['has'](this['_importMarker'])&&_0x388c50['enqueueChange'](this['_undoStepBatch'],_0xd9c9b5=>{_0xd9c9b5['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x551044,file:_0x559d55,serviceConfig:_0x5792de}){const _0x22b97a=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x413553=new FormData();_0x413553['set']('config',JSON['stringify'](_0x5792de)),_0x413553['set']('file',_0x559d55);const _0x2a5ac5={'method':'POST','headers':{},'body':_0x413553,'signal':this['_abortController']['signal']};return _0x22b97a&&(_0x2a5ac5['headers']['Authorization']=_0x22b97a['value']),fetch(_0x551044,_0x2a5ac5);}['_handleImportResponse'](_0x3cc1a2){return _0x3cc1a2['ok']?_0x3cc1a2['json']()['then'](_0x4bd733=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x4bd733);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x2e2ef1('import-word-plugin-import-cancelled');const _0x41cd95=this['editor'],_0x5e1952=(0x0,_0x41cd95['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x41cd95['plugins']['get']('Notification')['showWarning'](_0x5e1952),_0x2c32e5('import-word-plugin-conversion-failed');}}
|
package/src/importwordediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x42cfb4=_0x1d54;(function(_0x3376d3,_0x583b94){const _0x69ad1e=_0x1d54,_0x1d1917=_0x3376d3();while(!![]){try{const _0xb837d=-parseInt(_0x69ad1e(0xfc))/0x1*(-parseInt(_0x69ad1e(0x10c))/0x2)+-parseInt(_0x69ad1e(0x114))/0x3+parseInt(_0x69ad1e(0x104))/0x4*(parseInt(_0x69ad1e(0x102))/0x5)+-parseInt(_0x69ad1e(0x112))/0x6+parseInt(_0x69ad1e(0xff))/0x7+parseInt(_0x69ad1e(0xfe))/0x8+-parseInt(_0x69ad1e(0x10f))/0x9;if(_0xb837d===_0x583b94)break;else _0x1d1917['push'](_0x1d1917['shift']());}catch(_0x57019c){_0x1d1917['push'](_0x1d1917['shift']());}}}(_0x49a7,0x92740));function _0x1d54(_0x301464,_0x199f57){const _0x49a707=_0x49a7();return _0x1d54=function(_0x1d5414,_0x43a5eb){_0x1d5414=_0x1d5414-0xf8;let _0x59797e=_0x49a707[_0x1d5414];return _0x59797e;},_0x1d54(_0x301464,_0x199f57);}import{Plugin as _0x502ad5}from'ckeditor5/src/core.js';import{Notification as _0x293fbe}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x31875b}from'ckeditor5/src/clipboard.js';import _0x35b80d from'./importwordcommand.js';export default class e extends _0x502ad5{static get[_0x42cfb4(0x108)](){const _0x4f6984=_0x42cfb4;return _0x4f6984(0x101);}static get[_0x42cfb4(0x106)](){const _0x224b84=_0x42cfb4;return[_0x293fbe,_0x31875b,_0x224b84(0x116)];}constructor(_0x4def55){const _0x247265=_0x42cfb4;super(_0x4def55),this[_0x247265(0x100)]=null;}async[_0x42cfb4(0xf9)](){const _0x5482fc=_0x42cfb4,_0x30c4a8=this[_0x5482fc(0xfd)];_0x30c4a8[_0x5482fc(0x107)][_0x5482fc(0x10d)](_0x5482fc(0x10a),{'converterUrl':_0x5482fc(0x10e),'tokenUrl':(_0x30c4a8[_0x5482fc(0x107)][_0x5482fc(0x115)](_0x5482fc(0x109))||{})[_0x5482fc(0x113)],'formatting':{'resets':_0x5482fc(0xfb),'defaults':_0x5482fc(0xfb),'styles':_0x5482fc(0xfa)}}),_0x30c4a8[_0x5482fc(0xf8)][_0x5482fc(0x111)](_0x5482fc(0x10a),new _0x35b80d(_0x30c4a8));const {tokenUrl:_0x24b170}=_0x30c4a8[_0x5482fc(0x107)][_0x5482fc(0x115)](_0x5482fc(0x10a));if(_0x24b170){const {tokenUrl:_0x8e9558}=_0x30c4a8[_0x5482fc(0x107)][_0x5482fc(0x115)](_0x5482fc(0x109))||{};this[_0x5482fc(0x100)]=_0x24b170===_0x8e9558?_0x30c4a8[_0x5482fc(0x103)][_0x5482fc(0x115)](_0x5482fc(0x116))[_0x5482fc(0x110)]:await _0x30c4a8[_0x5482fc(0x103)][_0x5482fc(0x115)](_0x5482fc(0x116))[_0x5482fc(0x10b)](_0x24b170);}}[_0x42cfb4(0x105)](){const _0x4b359d=_0x42cfb4;return this[_0x4b359d(0x100)];}}function _0x49a7(){const _0x1bcfa0=['requires','config','pluginName','cloudServices','importWord','registerTokenUrl','24126NKRvYO','define','https://docx-converter.cke-cs.com/v2/convert/docx-html','6604029AxOdHS','token','add','6392832hFqeCG','tokenUrl','1306920hIKBXp','get','CloudServices','commands','init','inline','none','88INSzbH','editor','5842824risLLv','6066802LzniHY','_token','ImportWordEditing','880910aEXQNk','plugins','4uvdDaS','getToken'];_0x49a7=function(){return _0x1bcfa0;};return _0x49a7();}
|
package/src/importwordui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x582dd7}from'ckeditor5/src/core.js';import{SpinnerView as _0x4953bb}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x4d7ba2}from'ckeditor5/src/upload.js';import _0x45435d from'../theme/icons/importword.svg';export default class o extends _0x582dd7{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x24f969=this['editor'],t=_0x24f969['t'];_0x24f969['ui']['componentFactory']['add']('importWord',_0x4c6293=>{const _0x468d52=_0x24f969['commands']['get']('importWord'),_0x3c526c=new _0x4d7ba2(_0x4c6293),_0x235f53=new _0x4953bb();return _0x3c526c['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x3c526c['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x45435d,'tooltip':!0x0}),_0x3c526c['buttonView']['bind']('isOn','isEnabled')['to'](_0x468d52,'isBusy','isEnabled'),_0x235f53['bind']('isVisible')['to'](_0x468d52,'isBusy'),_0x3c526c['buttonView']['iconView']['bind']('isVisible')['to'](_0x468d52,'isBusy',_0x398ae9=>!_0x398ae9),_0x3c526c['buttonView']['children']['add'](_0x235f53),_0x3c526c['on']('done',(_0x4b2658,_0x50cdf1)=>{_0x24f969['execute']('importWord',_0x50cdf1[0x0],{}),_0x24f969['editing']['view']['focus']();}),_0x3c526c;});}}
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x485681,_0xe6375d){var _0x2e5767=_0x1424,_0x30b8bb=_0x485681();while(!![]){try{var _0x440e4b=parseInt(_0x2e5767(0x10d))/0x1+-parseInt(_0x2e5767(0x110))/0x2*(-parseInt(_0x2e5767(0x111))/0x3)+-parseInt(_0x2e5767(0x10a))/0x4*(-parseInt(_0x2e5767(0x10b))/0x5)+parseInt(_0x2e5767(0x115))/0x6*(parseInt(_0x2e5767(0x113))/0x7)+-parseInt(_0x2e5767(0x112))/0x8*(parseInt(_0x2e5767(0x10e))/0x9)+parseInt(_0x2e5767(0x10f))/0xa*(-parseInt(_0x2e5767(0x114))/0xb)+-parseInt(_0x2e5767(0x116))/0xc*(parseInt(_0x2e5767(0x10c))/0xd);if(_0x440e4b===_0xe6375d)break;else _0x30b8bb['push'](_0x30b8bb['shift']());}catch(_0x3fb30c){_0x30b8bb['push'](_0x30b8bb['shift']());}}}(_0x4e7c,0xa605b));function _0x4e7c(){var _0x35d4a7=['27zFvWIU','447180yZDKzW','205804LHTQhc','36AmXcbv','566416UNdYlp','470099OIqJwM','22jxVcDs','30tfslBN','12ZtZQDm','753484VayRHj','10DlVXUm','15899273zTLNMA','257539jBxHPs'];_0x4e7c=function(){return _0x35d4a7;};return _0x4e7c();}export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';function _0x1424(_0x816616,_0x216828){var _0x4e7c1d=_0x4e7c();return _0x1424=function(_0x142493,_0x41368f){_0x142493=_0x142493-0x10a;var _0x221d4f=_0x4e7c1d[_0x142493];return _0x221d4f;},_0x1424(_0x816616,_0x216828);}import'./augmentation.js';
|