@ckeditor/ckeditor5-export-word 29.2.0 → 32.0.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/LICENSE.md +2 -2
- package/README.md +2 -2
- package/package.json +27 -26
- package/src/exportword.js +2 -2
- package/src/exportwordcommand.js +2 -2
- package/src/index.js +2 -2
- package/src/utils.js +2 -2
- package/theme/exportword.css +1 -1
- package/theme/icons/exportword.svg +1 -1
- package/CHANGELOG.md +0 -4
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 export to Docs feature** (https://ckeditor.com/ckeditor-5/)<br>
|
|
5
|
-
Copyright (c) 2003-
|
|
5
|
+
Copyright (c) 2003-2022, [CKSource](https://cksource.com) Holding sp. z o.o. All rights reserved.
|
|
6
6
|
|
|
7
7
|
CKEditor 5 export to Word feature is licensed under a commercial license and is protected by copyright law.
|
|
8
8
|
For more details about available licensing options please contact us at sales@cksource.com.
|
|
@@ -15,4 +15,4 @@ Where not otherwise indicated, all CKEditor 5 export to Word feature content is
|
|
|
15
15
|
Trademarks
|
|
16
16
|
----------
|
|
17
17
|
|
|
18
|
-
**CKEditor** is a trademark of [CKSource](https://cksource.com)
|
|
18
|
+
**CKEditor** is a trademark of [CKSource](https://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
package/README.md
CHANGED
|
@@ -29,11 +29,11 @@ As a licensed CKEditor 5 export to Word feature user you can report bugs and req
|
|
|
29
29
|
## License
|
|
30
30
|
|
|
31
31
|
**CKEditor 5 export to Word** (https://ckeditor.com/ckeditor-5/)<br>
|
|
32
|
-
Copyright (c) 2003-
|
|
32
|
+
Copyright (c) 2003-2022, [CKSource](https://cksource.com) Holding sp. z o.o. All rights reserved.
|
|
33
33
|
|
|
34
34
|
CKEditor 5 export to Word feature is licensed under a commercial license and is protected by copyright law.
|
|
35
35
|
For more details about available licensing options please contact us at sales@cksource.com.
|
|
36
36
|
|
|
37
37
|
### Trademarks
|
|
38
38
|
|
|
39
|
-
**CKEditor** is a trademark of [CKSource](https://cksource.com)
|
|
39
|
+
**CKEditor** is a trademark of [CKSource](https://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-export-word",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "Export to Word feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -29,35 +29,36 @@
|
|
|
29
29
|
],
|
|
30
30
|
"main": "src/index.js",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"ckeditor5": "
|
|
32
|
+
"ckeditor5": "^32.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@ckeditor/ckeditor5-alignment": "
|
|
36
|
-
"@ckeditor/ckeditor5-basic-styles": "
|
|
37
|
-
"@ckeditor/ckeditor5-cloud-services": "
|
|
38
|
-
"@ckeditor/ckeditor5-code-block": "
|
|
39
|
-
"@ckeditor/ckeditor5-collaboration-core": "
|
|
40
|
-
"@ckeditor/ckeditor5-comments": "
|
|
41
|
-
"@ckeditor/ckeditor5-core": "
|
|
42
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
43
|
-
"@ckeditor/ckeditor5-
|
|
44
|
-
"@ckeditor/ckeditor5-
|
|
45
|
-
"@ckeditor/ckeditor5-
|
|
46
|
-
"@ckeditor/ckeditor5-
|
|
47
|
-
"@ckeditor/ckeditor5-
|
|
48
|
-
"@ckeditor/ckeditor5-
|
|
49
|
-
"@ckeditor/ckeditor5-
|
|
50
|
-
"@ckeditor/ckeditor5-
|
|
51
|
-
"@ckeditor/ckeditor5-
|
|
52
|
-
"@ckeditor/ckeditor5-
|
|
53
|
-
"@ckeditor/ckeditor5-
|
|
54
|
-
"@ckeditor/ckeditor5-
|
|
55
|
-
"@ckeditor/ckeditor5-
|
|
56
|
-
"
|
|
57
|
-
"webpack
|
|
35
|
+
"@ckeditor/ckeditor5-alignment": "^32.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-basic-styles": "^32.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-cloud-services": "^32.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-code-block": "^32.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-collaboration-core": "^32.0.0",
|
|
40
|
+
"@ckeditor/ckeditor5-comments": "^32.0.0",
|
|
41
|
+
"@ckeditor/ckeditor5-core": "^32.0.0",
|
|
42
|
+
"@ckeditor/ckeditor5-dev-utils": "^28.0.1",
|
|
43
|
+
"@ckeditor/ckeditor5-easy-image": "^32.0.0",
|
|
44
|
+
"@ckeditor/ckeditor5-editor-decoupled": "^32.0.0",
|
|
45
|
+
"@ckeditor/ckeditor5-font": "^32.0.0",
|
|
46
|
+
"@ckeditor/ckeditor5-heading": "^32.0.0",
|
|
47
|
+
"@ckeditor/ckeditor5-horizontal-line": "^32.0.0",
|
|
48
|
+
"@ckeditor/ckeditor5-image": "^32.0.0",
|
|
49
|
+
"@ckeditor/ckeditor5-indent": "^32.0.0",
|
|
50
|
+
"@ckeditor/ckeditor5-page-break": "^32.0.0",
|
|
51
|
+
"@ckeditor/ckeditor5-paragraph": "^32.0.0",
|
|
52
|
+
"@ckeditor/ckeditor5-table": "^32.0.0",
|
|
53
|
+
"@ckeditor/ckeditor5-theme-lark": "^32.0.0",
|
|
54
|
+
"@ckeditor/ckeditor5-track-changes": "^32.0.0",
|
|
55
|
+
"@ckeditor/ckeditor5-ui": "^32.0.0",
|
|
56
|
+
"@ckeditor/ckeditor5-utils": "^32.0.0",
|
|
57
|
+
"webpack": "^5.58.1",
|
|
58
|
+
"webpack-cli": "^4.9.0"
|
|
58
59
|
},
|
|
59
60
|
"engines": {
|
|
60
|
-
"node": ">=
|
|
61
|
+
"node": ">=14.0.0",
|
|
61
62
|
"npm": ">=5.7.1"
|
|
62
63
|
},
|
|
63
64
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/exportword.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x151b24}from'ckeditor5/src/core';import{ButtonView as _0x20a137,View as _0x57ff31,Notification as _0x465e86}from'ckeditor5/src/ui';import _0x967f39 from'./exportwordcommand';import _0x5f2acd from'../theme/icons/exportword.svg';import'../theme/exportword.css';export default class c extends _0x151b24{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x465e86];}['init'](){const _0x1484fe=this['editor'],t=_0x1484fe['t'],_0x4ef749=_0x1484fe['config']['get']('exportWord')||{};_0x1484fe['commands']['add']('exportWord',new _0x967f39(_0x1484fe)),_0x1484fe['ui']['componentFactory']['add']('exportWord',_0x404698=>{const _0x1012a7=_0x1484fe['commands']['get']('exportWord'),_0x53523b=new _0x20a137(_0x404698);_0x53523b['set']({'label':t('Export\x20to\x20Word'),'icon':_0x5f2acd,'tooltip':!0x0}),_0x53523b['bind']('isOn','isEnabled')['to'](_0x1012a7,'isBusy','isEnabled'),_0x53523b['extendTemplate']({'attributes':{'class':[_0x53523b['bindTemplate']['if']('isOn','ck-exportword_status-pending')]}});const _0x45aab3=new _0x57ff31();return _0x45aab3['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-exportword__spinner-container']},'children':[{'tag':'span','attributes':{'class':['ck','ck-exportword__spinner']}}]}),_0x53523b['children']['add'](_0x45aab3),this['listenTo'](_0x53523b,'execute',()=>{_0x1484fe['execute']('exportWord',_0x4ef749),_0x1484fe['editing']['view']['focus']();}),_0x53523b;});const _0x5a7f96=_0x1484fe['plugins']['get']('CloudServices');if(!0x1===_0x4ef749['tokenUrl'])this['_token']=null;else{if(_0x4ef749['tokenUrl'])return _0x5a7f96['registerTokenUrl'](_0x4ef749['tokenUrl'])['then'](_0x34faa5=>{this['_token']=_0x34faa5;});this['_token']=_0x5a7f96['token'];}}}
|
package/src/exportwordcommand.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x4ecde6}from'ckeditor5/src/core';import{getStyles as _0x3bc817,getConverterOptions as _0x113d3f}from'./utils';export default class i extends _0x4ecde6{constructor(_0x121005){super(_0x121005),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x215bf7={}){const _0x28b6c6=this['editor'],t=_0x28b6c6['t'],_0x11f547=_0x215bf7['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x2e2789=_0x215bf7['converterOptions']||{},_0x52ce3c=_0x28b6c6['plugins']['get']('ExportWord'),_0x4e9725=_0x215bf7['token']||_0x52ce3c['_token'],_0x52a9d8=!0x1!==_0x2e2789['auto_pagination'],_0x2d45e6=_0x215bf7['dataCallback']||(_0xf262d=>_0xf262d['getData']({'pagination':_0x52a9d8}));return this['isBusy']=!0x0,this['refresh'](),_0x3bc817(_0x215bf7['stylesheets']||['EDITOR_STYLES'])['then'](_0x33a912=>{const _0x3bb2d4=_0x2d45e6(_0x28b6c6),_0x468692={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x28b6c6['locale']['contentLanguageDirection']+'\x22>'+_0x3bb2d4+'</div>','css':_0x33a912,'options':{..._0x2e2789,..._0x113d3f(_0x28b6c6)}},_0x1ce0d9={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x4e9725?{'Authorization':_0x4e9725['value']}:null},'body':JSON['stringify'](_0x468692)};return window['fetch'](_0x11f547,_0x1ce0d9)['then'](_0x1bcc50=>{if(0xc8!==_0x1bcc50['status'])throw _0x1bcc50;return _0x1bcc50['blob']();})['then'](_0x34e461=>{this['o'](_0x34e461,_0x215bf7['fileName']||'document.docx');});})['catch'](_0x45c691=>{throw _0x28b6c6['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x45c691;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['o'](_0x4b15d3,_0x2f6f86){const _0x57c245=document['createElement']('a');_0x57c245['href']=window['URL']['createObjectURL'](_0x4b15d3),_0x57c245['download']=_0x2f6f86,_0x57c245['click'](),_0x57c245['remove']();}}
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export{default as ExportWord}
|
|
23
|
+
var _0x54c3=['./exportword'];(function(_0x18b0c6,_0x54c3d8){var _0x4e7abe=function(_0x37f797){while(--_0x37f797){_0x18b0c6['push'](_0x18b0c6['shift']());}};_0x4e7abe(++_0x54c3d8);}(_0x54c3,0xcb));var _0x4e7a=function(_0x18b0c6,_0x54c3d8){_0x18b0c6=_0x18b0c6-0x0;var _0x4e7abe=_0x54c3[_0x18b0c6];return _0x4e7abe;};export{default as ExportWord}from_0x4e7a('0x0');
|
package/src/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x544e=['timezone',':root','length','indexOf','get','author','getSuggestions','map','plugins','CommentsRepository','content','resolvedOptions','name','getCommentThreads','keys','join','.ck-content','has','comments','users','Users','push','then','createdAt','DateTimeFormat','suggestions','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','text','TrackChanges','ownerNode','warn','timeZone','fetch','data-cke','styleSheets','cssText'];(function(_0x37109e,_0x544edf){const _0x1b9bbc=function(_0x5ba6f4){while(--_0x5ba6f4){_0x37109e['push'](_0x37109e['shift']());}};_0x1b9bbc(++_0x544edf);}(_0x544e,0x14b));const _0x1b9b=function(_0x37109e,_0x544edf){_0x37109e=_0x37109e-0x0;let _0x1b9bbc=_0x544e[_0x37109e];return _0x1b9bbc;};export function getStyles(_0x245255){if(!_0x245255)return new Promise(_0x634d30=>_0x634d30(''));const _0x349e9d=[];for(const _0x45ac50 of _0x245255)'EDITOR_STYLES'!==_0x45ac50?_0x349e9d[_0x1b9b('0xe')](window[_0x1b9b('0x19')](_0x45ac50)['then'](_0x2097f7=>_0x2097f7[_0x1b9b('0x14')]())):_0x349e9d[_0x1b9b('0xe')](u());return Promise['all'](_0x349e9d)[_0x1b9b('0xf')](_0x2be91a=>_0x2be91a[_0x1b9b('0x8')]('\x20')['trim']());}function u(){const _0x2a6e0c=[],_0x32346d=[];for(const _0x3ee4ff of document[_0x1b9b('0x1b')])if(_0x3ee4ff[_0x1b9b('0x16')]['hasAttribute'](_0x1b9b('0x1a')))for(const _0x21c1da of _0x3ee4ff['cssRules'])-0x1!==_0x21c1da[_0x1b9b('0x1c')][_0x1b9b('0x20')](_0x1b9b('0x9'))?_0x2a6e0c[_0x1b9b('0xe')](_0x21c1da[_0x1b9b('0x1c')]):-0x1!==_0x21c1da[_0x1b9b('0x1c')][_0x1b9b('0x20')](_0x1b9b('0x1e'))&&_0x32346d[_0x1b9b('0xe')](_0x21c1da[_0x1b9b('0x1c')]);return _0x2a6e0c[_0x1b9b('0x1f')]||console[_0x1b9b('0x17')](_0x1b9b('0x13')),[..._0x32346d,..._0x2a6e0c][_0x1b9b('0x8')]('\x20')['trim']();}export function getConverterOptions(_0x28bc06){const _0xde75b=_0x28bc06['plugins'][_0x1b9b('0xa')](_0x1b9b('0xd')),_0x5c3b8e=_0x28bc06[_0x1b9b('0x1')][_0x1b9b('0xa')]('CommentsRepository'),_0x812ea9=_0x28bc06[_0x1b9b('0x1')][_0x1b9b('0xa')](_0x1b9b('0x15')),_0x53a22c={};if(_0xde75b&&_0x5c3b8e){const _0x5a4ee5=getComments(_0x28bc06[_0x1b9b('0x1')][_0x1b9b('0x21')](_0x1b9b('0x2'))[_0x1b9b('0x6')]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object['keys'](_0x5a4ee5)[_0x1b9b('0x1f')]&&(_0x53a22c[_0x1b9b('0xb')]=_0x5a4ee5);}if(_0xde75b&&_0x812ea9){const _0x7cfbd4=_0x28bc06['plugins']['get']('TrackChanges'),_0x4154a3=_0x28bc06[_0x1b9b('0x1')][_0x1b9b('0x21')]('Users'),_0x58c0cc=getSuggestions(_0x7cfbd4[_0x1b9b('0x23')]({'toJSON':!0x0}),_0x4154a3[_0x1b9b('0xc')]);Object[_0x1b9b('0x7')](_0x58c0cc)[_0x1b9b('0x1f')]&&(_0x53a22c[_0x1b9b('0x12')]=_0x58c0cc);}return(_0x53a22c[_0x1b9b('0x12')]||_0x53a22c[_0x1b9b('0xb')])&&(_0x53a22c[_0x1b9b('0x1d')]=new Intl[(_0x1b9b('0x11'))]()[_0x1b9b('0x4')]()[_0x1b9b('0x18')]),_0x53a22c;}export function getComments(_0x5e42a1){const _0x41420e={};if(!_0x5e42a1[_0x1b9b('0x1f')])return _0x41420e;for(const _0x52cf35 of _0x5e42a1)_0x52cf35['comments'][_0x1b9b('0x0')](_0x444012=>{void 0x0===_0x41420e[_0x52cf35['id']]&&(_0x41420e[_0x52cf35['id']]=[]),_0x41420e[_0x52cf35['id']][_0x1b9b('0xe')]({'author':_0x444012[_0x1b9b('0x22')][_0x1b9b('0x5')],'content':_0x444012[_0x1b9b('0x3')],'created':_0x444012[_0x1b9b('0x10')]});});return _0x41420e;}export function getSuggestions(_0x547f69,_0x451cfa){const _0x6819bb={};if(!_0x547f69['length']||!_0x451cfa[_0x1b9b('0x1f')])return _0x6819bb;for(const _0x55206d of _0x547f69)_0x6819bb[_0x55206d['id']]={'author':_0x451cfa[_0x1b9b('0x21')](_0x55206d['authorId'])[_0x1b9b('0x5')],'created':_0x55206d[_0x1b9b('0x10')]};return _0x6819bb;}
|
package/theme/exportword.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5V20H3v-1.5h14.5v-12h-5v-5h-8v4H3V0h11ZM8.5 7a1.5 1.5 0 0 1 1.493 1.356L10 8.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 17h-7a1.5 1.5 0 0 1-1.493-1.356L0 15.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 7h7ZM7.483 9.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.601.601 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.601.601 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43ZM14 2v3h3.3L14 2Z"/></svg>
|
package/CHANGELOG.md
DELETED