@ckeditor/ckeditor5-export-word 31.0.0 → 33.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 +29 -27
- package/src/exportword.js +2 -2
- package/src/exportwordcommand.js +2 -2
- package/src/index.js +1 -1
- package/src/utils.js +2 -2
- package/theme/exportword.css +1 -1
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": "33.0.0",
|
|
4
4
|
"description": "Export to Word feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -29,36 +29,38 @@
|
|
|
29
29
|
],
|
|
30
30
|
"main": "src/index.js",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"ckeditor5": "
|
|
32
|
+
"ckeditor5": "^33.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@ckeditor/ckeditor5-alignment": "
|
|
36
|
-
"@ckeditor/ckeditor5-
|
|
37
|
-
"@ckeditor/ckeditor5-
|
|
38
|
-
"@ckeditor/ckeditor5-
|
|
39
|
-
"@ckeditor/ckeditor5-
|
|
40
|
-
"@ckeditor/ckeditor5-
|
|
41
|
-
"@ckeditor/ckeditor5-
|
|
42
|
-
"@ckeditor/ckeditor5-
|
|
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
|
-
"@ckeditor/ckeditor5-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
35
|
+
"@ckeditor/ckeditor5-alignment": "^33.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-autoformat": "^33.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-basic-styles": "^33.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-cloud-services": "^33.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-code-block": "^33.0.0",
|
|
40
|
+
"@ckeditor/ckeditor5-collaboration-core": "^33.0.0",
|
|
41
|
+
"@ckeditor/ckeditor5-comments": "^33.0.0",
|
|
42
|
+
"@ckeditor/ckeditor5-core": "^33.0.0",
|
|
43
|
+
"@ckeditor/ckeditor5-dev-utils": "^28.0.1",
|
|
44
|
+
"@ckeditor/ckeditor5-easy-image": "^33.0.0",
|
|
45
|
+
"@ckeditor/ckeditor5-editor-decoupled": "^33.0.0",
|
|
46
|
+
"@ckeditor/ckeditor5-font": "^33.0.0",
|
|
47
|
+
"@ckeditor/ckeditor5-heading": "^33.0.0",
|
|
48
|
+
"@ckeditor/ckeditor5-horizontal-line": "^33.0.0",
|
|
49
|
+
"@ckeditor/ckeditor5-image": "^33.0.0",
|
|
50
|
+
"@ckeditor/ckeditor5-indent": "^33.0.0",
|
|
51
|
+
"@ckeditor/ckeditor5-list": "^33.0.0",
|
|
52
|
+
"@ckeditor/ckeditor5-page-break": "^33.0.0",
|
|
53
|
+
"@ckeditor/ckeditor5-paragraph": "^33.0.0",
|
|
54
|
+
"@ckeditor/ckeditor5-table": "^33.0.0",
|
|
55
|
+
"@ckeditor/ckeditor5-theme-lark": "^33.0.0",
|
|
56
|
+
"@ckeditor/ckeditor5-track-changes": "^33.0.0",
|
|
57
|
+
"@ckeditor/ckeditor5-ui": "^33.0.0",
|
|
58
|
+
"@ckeditor/ckeditor5-utils": "^33.0.0",
|
|
59
|
+
"webpack": "^5.58.1",
|
|
60
|
+
"webpack-cli": "^4.9.0"
|
|
59
61
|
},
|
|
60
62
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
63
|
+
"node": ">=14.0.0",
|
|
62
64
|
"npm": ">=5.7.1"
|
|
63
65
|
},
|
|
64
66
|
"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 _0x43a328}from'ckeditor5/src/core';import{ButtonView as _0x4fcfd3,View as _0x222e0b,Notification as _0x488493}from'ckeditor5/src/ui';import _0x4d0e72 from'./exportwordcommand';import _0x1c3578 from'../theme/icons/exportword.svg';import'../theme/exportword.css';export default class c extends _0x43a328{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x488493];}['init'](){const _0x541484=this['editor'],t=_0x541484['t'],_0x173e40=_0x541484['config']['get']('exportWord')||{};_0x541484['commands']['add']('exportWord',new _0x4d0e72(_0x541484)),_0x541484['ui']['componentFactory']['add']('exportWord',_0x4969e3=>{const _0x1aa1ec=_0x541484['commands']['get']('exportWord'),_0xe0c5fe=new _0x4fcfd3(_0x4969e3);_0xe0c5fe['set']({'label':t('Export\x20to\x20Word'),'icon':_0x1c3578,'tooltip':!0x0}),_0xe0c5fe['bind']('isOn','isEnabled')['to'](_0x1aa1ec,'isBusy','isEnabled'),_0xe0c5fe['extendTemplate']({'attributes':{'class':[_0xe0c5fe['bindTemplate']['if']('isOn','ck-exportword_status-pending')]}});const _0x3a5f06=new _0x222e0b();return _0x3a5f06['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-exportword__spinner-container']},'children':[{'tag':'span','attributes':{'class':['ck','ck-exportword__spinner']}}]}),_0xe0c5fe['children']['add'](_0x3a5f06),this['listenTo'](_0xe0c5fe,'execute',()=>{_0x541484['execute']('exportWord',_0x173e40),_0x541484['editing']['view']['focus']();}),_0xe0c5fe;});const _0x306c89=_0x541484['plugins']['get']('CloudServices');if(!0x1===_0x173e40['tokenUrl'])this['_token']=null;else{if(_0x173e40['tokenUrl'])return _0x306c89['registerTokenUrl'](_0x173e40['tokenUrl'])['then'](_0x1b185c=>{this['_token']=_0x1b185c;});this['_token']=_0x306c89['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 _0x47fe31}from'ckeditor5/src/core';import{getStyles as _0x21da73,getConverterOptions as _0x45bd87}from'./utils';export default class i extends _0x47fe31{constructor(_0x39fc0d){super(_0x39fc0d),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x3b11e1={}){const _0x37d3c1=this['editor'],t=_0x37d3c1['t'],_0x564498=_0x3b11e1['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x10fe16=_0x3b11e1['converterOptions']||{},_0x1fcc01=_0x37d3c1['plugins']['get']('ExportWord'),_0x551cc7=_0x3b11e1['token']||_0x1fcc01['_token'],_0x15481d=!0x1!==_0x10fe16['auto_pagination'],_0x572f9b=_0x3b11e1['dataCallback']||(_0x190acf=>_0x190acf['getData']({'pagination':_0x15481d}));return this['isBusy']=!0x0,this['refresh'](),_0x21da73(_0x3b11e1['stylesheets']||['EDITOR_STYLES'])['then'](_0x2bd12d=>{const _0x40aeee=_0x572f9b(_0x37d3c1),_0x27744d={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x37d3c1['locale']['contentLanguageDirection']+'\x22>'+_0x40aeee+'</div>','css':_0x2bd12d,'options':{..._0x10fe16,..._0x45bd87(_0x37d3c1)}},_0x3283c6={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x551cc7?{'Authorization':_0x551cc7['value']}:null},'body':JSON['stringify'](_0x27744d)};return window['fetch'](_0x564498,_0x3283c6)['then'](_0x147881=>{if(0xc8!==_0x147881['status'])throw _0x147881;return _0x147881['blob']();})['then'](_0x25d393=>{this['o'](_0x25d393,_0x3b11e1['fileName']||'document.docx');});})['catch'](_0x5389f2=>{throw _0x37d3c1['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x5389f2;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['o'](_0x1c4818,_0x4e335a){const _0x4091ca=document['createElement']('a');_0x4091ca['href']=window['URL']['createObjectURL'](_0x1c4818),_0x4091ca['download']=_0x4e335a,_0x4091ca['click'](),_0x4091ca['remove']();}}
|
package/src/index.js
CHANGED
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 _0x33f7=['timezone','DateTimeFormat','has','keys','trim','users','plugins','get','join','getSuggestions','data-cke','ownerNode','resolvedOptions','cssText','comments','then','fetch','Users','TrackChanges','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.','.ck-content','getCommentThreads','indexOf','CommentsRepository','warn','length','name',':root','content','push','createdAt','suggestions','cssRules','text','all','map'];(function(_0x35936d,_0x33f7c1){const _0x23366e=function(_0x25ff13){while(--_0x25ff13){_0x35936d['push'](_0x35936d['shift']());}};_0x23366e(++_0x33f7c1);}(_0x33f7,0x145));const _0x2336=function(_0x35936d,_0x33f7c1){_0x35936d=_0x35936d-0x0;let _0x23366e=_0x33f7[_0x35936d];return _0x23366e;};export function getStyles(_0x252655){if(!_0x252655)return new Promise(_0x2e8820=>_0x2e8820(''));const _0x22e0b1=[];for(const _0x3f7cd9 of _0x252655)'EDITOR_STYLES'!==_0x3f7cd9?_0x22e0b1[_0x2336('0x1c')](window[_0x2336('0xf')](_0x3f7cd9)[_0x2336('0xe')](_0x2f622f=>_0x2f622f[_0x2336('0x20')]())):_0x22e0b1[_0x2336('0x1c')](u());return Promise[_0x2336('0x21')](_0x22e0b1)[_0x2336('0xe')](_0x4118ab=>_0x4118ab[_0x2336('0x7')]('\x20')[_0x2336('0x3')]());}function u(){const _0x3ca971=[],_0x3db5e1=[];for(const _0x46a007 of document['styleSheets'])if(_0x46a007[_0x2336('0xa')]['hasAttribute'](_0x2336('0x9')))for(const _0x3b56b3 of _0x46a007[_0x2336('0x1f')])-0x1!==_0x3b56b3[_0x2336('0xc')][_0x2336('0x15')](_0x2336('0x13'))?_0x3ca971[_0x2336('0x1c')](_0x3b56b3['cssText']):-0x1!==_0x3b56b3['cssText']['indexOf'](_0x2336('0x1a'))&&_0x3db5e1[_0x2336('0x1c')](_0x3b56b3[_0x2336('0xc')]);return _0x3ca971['length']||console[_0x2336('0x17')](_0x2336('0x12')),[..._0x3db5e1,..._0x3ca971][_0x2336('0x7')]('\x20')[_0x2336('0x3')]();}export function getConverterOptions(_0x1f8bbf){const _0x4c36fc=_0x1f8bbf[_0x2336('0x5')]['has'](_0x2336('0x10')),_0x5371af=_0x1f8bbf[_0x2336('0x5')][_0x2336('0x1')]('CommentsRepository'),_0x25fb04=_0x1f8bbf[_0x2336('0x5')][_0x2336('0x1')](_0x2336('0x11')),_0x4aa937={};if(_0x4c36fc&&_0x5371af){const _0x3eb438=getComments(_0x1f8bbf['plugins'][_0x2336('0x6')](_0x2336('0x16'))[_0x2336('0x14')]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x2336('0x2')](_0x3eb438)[_0x2336('0x18')]&&(_0x4aa937[_0x2336('0xd')]=_0x3eb438);}if(_0x4c36fc&&_0x25fb04){const _0x230ba1=_0x1f8bbf['plugins'][_0x2336('0x6')](_0x2336('0x11')),_0x6526fd=_0x1f8bbf[_0x2336('0x5')]['get'](_0x2336('0x10')),_0x15b82e=getSuggestions(_0x230ba1[_0x2336('0x8')]({'toJSON':!0x0}),_0x6526fd[_0x2336('0x4')]);Object[_0x2336('0x2')](_0x15b82e)[_0x2336('0x18')]&&(_0x4aa937[_0x2336('0x1e')]=_0x15b82e);}return(_0x4aa937[_0x2336('0x1e')]||_0x4aa937[_0x2336('0xd')])&&(_0x4aa937[_0x2336('0x23')]=new Intl[(_0x2336('0x0'))]()[_0x2336('0xb')]()['timeZone']),_0x4aa937;}export function getComments(_0x5ab2ed){const _0x2d2d5b={};if(!_0x5ab2ed[_0x2336('0x18')])return _0x2d2d5b;for(const _0x47f936 of _0x5ab2ed)_0x47f936[_0x2336('0xd')][_0x2336('0x22')](_0x550c86=>{void 0x0===_0x2d2d5b[_0x47f936['id']]&&(_0x2d2d5b[_0x47f936['id']]=[]),_0x2d2d5b[_0x47f936['id']][_0x2336('0x1c')]({'author':_0x550c86['author'][_0x2336('0x19')],'content':_0x550c86[_0x2336('0x1b')],'created':_0x550c86[_0x2336('0x1d')]});});return _0x2d2d5b;}export function getSuggestions(_0x40dc08,_0x50323f){const _0x178f85={};if(!_0x40dc08[_0x2336('0x18')]||!_0x50323f[_0x2336('0x18')])return _0x178f85;for(const _0x450dc4 of _0x40dc08)_0x178f85[_0x450dc4['id']]={'author':_0x50323f[_0x2336('0x6')](_0x450dc4['authorId'])[_0x2336('0x19')],'created':_0x450dc4[_0x2336('0x1d')]};return _0x178f85;}
|
package/theme/exportword.css
CHANGED