@ckeditor/ckeditor5-export-word 39.0.1 → 40.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/CHANGELOG.md +1 -1
- package/LICENSE.md +4 -4
- package/README.md +8 -8
- package/build/export-word.js +2 -2
- package/lang/translations/ar.po +1 -0
- package/lang/translations/bg.po +1 -0
- package/lang/translations/bn.po +1 -0
- package/lang/translations/ca.po +1 -0
- package/lang/translations/cs.po +1 -0
- package/lang/translations/da.po +1 -0
- package/lang/translations/de.po +1 -0
- package/lang/translations/el.po +1 -0
- package/lang/translations/en-au.po +1 -0
- package/lang/translations/en.po +1 -0
- package/lang/translations/es.po +1 -0
- package/lang/translations/et.po +1 -0
- package/lang/translations/fi.po +1 -0
- package/lang/translations/fr.po +1 -0
- package/lang/translations/gl.po +1 -0
- package/lang/translations/he.po +1 -0
- package/lang/translations/hi.po +1 -0
- package/lang/translations/hr.po +1 -0
- package/lang/translations/hu.po +1 -0
- package/lang/translations/id.po +1 -0
- package/lang/translations/it.po +1 -0
- package/lang/translations/ja.po +1 -0
- package/lang/translations/jv.po +1 -0
- package/lang/translations/ko.po +1 -0
- package/lang/translations/lt.po +1 -0
- package/lang/translations/lv.po +1 -0
- package/lang/translations/ms.po +1 -0
- package/lang/translations/nl.po +1 -0
- package/lang/translations/no.po +1 -0
- package/lang/translations/pl.po +1 -0
- package/lang/translations/pt-br.po +1 -0
- package/lang/translations/pt.po +1 -0
- package/lang/translations/ro.po +1 -0
- package/lang/translations/ru.po +1 -0
- package/lang/translations/sk.po +1 -0
- package/lang/translations/sr-latn.po +1 -0
- package/lang/translations/sr.po +1 -0
- package/lang/translations/sv.po +1 -0
- package/lang/translations/th.po +1 -0
- package/lang/translations/tr.po +1 -0
- package/lang/translations/ug.po +1 -0
- package/lang/translations/uk.po +1 -0
- package/lang/translations/ur.po +1 -0
- package/lang/translations/vi.po +1 -0
- package/lang/translations/zh-cn.po +1 -0
- package/lang/translations/zh.po +1 -0
- package/package.json +2 -6
- package/src/augmentation.d.ts +21 -21
- package/src/exportword.d.ts +231 -232
- package/src/exportword.js +1 -1
- package/src/exportwordcommand.d.ts +36 -36
- package/src/exportwordcommand.js +1 -1
- package/src/index.d.ts +10 -10
- package/src/utils.d.ts +36 -36
- package/src/utils.js +1 -1
- package/theme/exportword.css +0 -49
package/src/utils.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
import type { Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import type { Collection } from 'ckeditor5/src/utils';
|
|
7
|
-
import type { ExportWordConverterOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption } from './exportword';
|
|
8
|
-
import type { CommentThread } from '@ckeditor/ckeditor5-comments';
|
|
9
|
-
import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes';
|
|
10
|
-
import type { User } from '@ckeditor/ckeditor5-collaboration-core';
|
|
11
|
-
/**
|
|
12
|
-
* A helper function for getting concatenated CSS rules from external stylesheets.
|
|
13
|
-
*
|
|
14
|
-
* @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getStyles(stylesheets?: Array<string>): Promise<string>;
|
|
17
|
-
/**
|
|
18
|
-
* A helper function for getting a proper options object containing
|
|
19
|
-
* comments, suggestions and the browser's timezone for the "Export to Word" converter.
|
|
20
|
-
*
|
|
21
|
-
* @param editor An editor instance.
|
|
22
|
-
*/
|
|
23
|
-
export declare function getConverterOptions(editor: Editor): ExportWordConverterOptions;
|
|
24
|
-
/**
|
|
25
|
-
* A helper function for getting a comments object for the converter options.
|
|
26
|
-
*
|
|
27
|
-
* @param threads The comment threads array.
|
|
28
|
-
*/
|
|
29
|
-
export declare function getComments(threads: Array<CommentThread>): ExportWordConverterCommentsOption;
|
|
30
|
-
/**
|
|
31
|
-
* A helper function for getting a suggestions object for the converter options.
|
|
32
|
-
*
|
|
33
|
-
* @param suggestions The suggestions array.
|
|
34
|
-
* @param users A list of all users in the editor.
|
|
35
|
-
*/
|
|
36
|
-
export declare function getSuggestions(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOption;
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { Editor } from 'ckeditor5/src/core';
|
|
6
|
+
import type { Collection } from 'ckeditor5/src/utils';
|
|
7
|
+
import type { ExportWordConverterOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption } from './exportword';
|
|
8
|
+
import type { CommentThread } from '@ckeditor/ckeditor5-comments';
|
|
9
|
+
import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes';
|
|
10
|
+
import type { User } from '@ckeditor/ckeditor5-collaboration-core';
|
|
11
|
+
/**
|
|
12
|
+
* A helper function for getting concatenated CSS rules from external stylesheets.
|
|
13
|
+
*
|
|
14
|
+
* @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getStyles(stylesheets?: Array<string>): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* A helper function for getting a proper options object containing
|
|
19
|
+
* comments, suggestions and the browser's timezone for the "Export to Word" converter.
|
|
20
|
+
*
|
|
21
|
+
* @param editor An editor instance.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getConverterOptions(editor: Editor): ExportWordConverterOptions;
|
|
24
|
+
/**
|
|
25
|
+
* A helper function for getting a comments object for the converter options.
|
|
26
|
+
*
|
|
27
|
+
* @param threads The comment threads array.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getComments(threads: Array<CommentThread>): ExportWordConverterCommentsOption;
|
|
30
|
+
/**
|
|
31
|
+
* A helper function for getting a suggestions object for the converter options.
|
|
32
|
+
*
|
|
33
|
+
* @param suggestions The suggestions array.
|
|
34
|
+
* @param users A list of all users in the editor.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getSuggestions(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOption;
|
package/src/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2b94=['name','text','content',':root','all','TrackChanges','isResolved','Users','comments','styleSheets','timeZone','plugins','has','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.','createdAt','.ck-content','resolvedOptions','getCommentThreads','warn','suggestions','cssText','CommentsRepository','from','push','trim','indexOf','join','DateTimeFormat','author','fetch','timezone','ownerNode','keys','length','get','then','authorId'];(function(_0x3cca87,_0x2b94a9){const _0x1bc98b=function(_0x55eaf2){while(--_0x55eaf2){_0x3cca87['push'](_0x3cca87['shift']());}};_0x1bc98b(++_0x2b94a9);}(_0x2b94,0x163));const _0x1bc9=function(_0x3cca87,_0x2b94a9){_0x3cca87=_0x3cca87-0x0;let _0x1bc98b=_0x2b94[_0x3cca87];return _0x1bc98b;};export function getStyles(_0x2d7eda){if(!_0x2d7eda)return new Promise(_0x199e0b=>_0x199e0b(''));const _0x142bac=[];for(const _0x22dd34 of _0x2d7eda)'EDITOR_STYLES'!==_0x22dd34?_0x142bac[_0x1bc9('0x1')](window[_0x1bc9('0x7')](_0x22dd34)[_0x1bc9('0xd')](_0x40a079=>_0x40a079[_0x1bc9('0x10')]())):_0x142bac[_0x1bc9('0x1')](u());return Promise[_0x1bc9('0x13')](_0x142bac)[_0x1bc9('0xd')](_0x19f9f2=>_0x19f9f2['join']('\x20')[_0x1bc9('0x2')]());}function u(){const _0x2d4293=[],_0x4183db=[];for(const _0x39f0b2 of Array[_0x1bc9('0x0')](document[_0x1bc9('0x18')])){if(_0x39f0b2[_0x1bc9('0x9')]['hasAttribute']('data-cke'))for(const _0x1b003a of Array['from'](_0x39f0b2['cssRules']))-0x1!==_0x1b003a[_0x1bc9('0x23')][_0x1bc9('0x3')](_0x1bc9('0x1e'))?_0x2d4293[_0x1bc9('0x1')](_0x1b003a[_0x1bc9('0x23')]):-0x1!==_0x1b003a[_0x1bc9('0x23')]['indexOf'](_0x1bc9('0x12'))&&_0x4183db[_0x1bc9('0x1')](_0x1b003a[_0x1bc9('0x23')]);}return _0x2d4293['length']||console[_0x1bc9('0x21')](_0x1bc9('0x1c')),[..._0x4183db,..._0x2d4293][_0x1bc9('0x4')]('\x20')[_0x1bc9('0x2')]();}export function getConverterOptions(_0x641b41){const _0x1a9899=_0x641b41['plugins'][_0x1bc9('0x1b')](_0x1bc9('0x16')),_0x6cf138=_0x641b41[_0x1bc9('0x1a')]['has'](_0x1bc9('0x24')),_0x3f496a=_0x641b41[_0x1bc9('0x1a')]['has'](_0x1bc9('0x14')),_0x5c2ad8={};if(_0x1a9899&&_0x6cf138){const _0x56db9a=getComments(_0x641b41[_0x1bc9('0x1a')][_0x1bc9('0xc')](_0x1bc9('0x24'))[_0x1bc9('0x20')]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x1bc9('0xa')](_0x56db9a)[_0x1bc9('0xb')]&&(_0x5c2ad8['comments']=_0x56db9a);}if(_0x1a9899&&_0x3f496a){const _0xda7387=_0x641b41[_0x1bc9('0x1a')]['get'](_0x1bc9('0x14')),_0x40b9af=_0x641b41[_0x1bc9('0x1a')]['get']('Users'),_0xc70438=getSuggestions(_0xda7387['getSuggestions']({'toJSON':!0x0}),_0x40b9af['users']);Object['keys'](_0xc70438)['length']&&(_0x5c2ad8[_0x1bc9('0x22')]=_0xc70438);}return(_0x5c2ad8[_0x1bc9('0x22')]||_0x5c2ad8[_0x1bc9('0x17')])&&(_0x5c2ad8[_0x1bc9('0x8')]=new Intl[(_0x1bc9('0x5'))]()[_0x1bc9('0x1f')]()[_0x1bc9('0x19')]),_0x5c2ad8;}export function getComments(_0x224d05){const _0x5c472a={};if(!_0x224d05[_0x1bc9('0xb')])return _0x5c472a;for(const _0x45894d of _0x224d05)_0x45894d[_0x1bc9('0x17')]['map'](_0x31d657=>{void 0x0===_0x5c472a[_0x45894d['id']]&&(_0x5c472a[_0x45894d['id']]=[]),_0x5c472a[_0x45894d['id']][_0x1bc9('0x1')]({'author':_0x31d657[_0x1bc9('0x6')][_0x1bc9('0xf')],'content':_0x31d657[_0x1bc9('0x11')],'created':_0x31d657[_0x1bc9('0x1d')],'is_resolved':_0x45894d[_0x1bc9('0x15')]});});return _0x5c472a;}export function getSuggestions(_0x3eb766,_0x1527e2){const _0x488b4d={};if(!_0x3eb766[_0x1bc9('0xb')]||!_0x1527e2[_0x1bc9('0xb')])return _0x488b4d;for(const _0x15973c of _0x3eb766)_0x488b4d[_0x15973c['id']]={'author':_0x1527e2['get'](_0x15973c[_0x1bc9('0xe')])['name'],'created':_0x15973c['createdAt']};return _0x488b4d;}
|
package/theme/exportword.css
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
:root {
|
|
7
|
-
--ck-toolbar-spinner-size: 18px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ck-exportword_status-pending {
|
|
11
|
-
position: relative;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.ck.ck-exportword__spinner-container {
|
|
15
|
-
display: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ck.ck-exportword__spinner {
|
|
19
|
-
position: absolute;
|
|
20
|
-
top: 50%;
|
|
21
|
-
left: 0;
|
|
22
|
-
right: 0;
|
|
23
|
-
margin: 0 auto;
|
|
24
|
-
width: var(--ck-toolbar-spinner-size);
|
|
25
|
-
height: var(--ck-toolbar-spinner-size);
|
|
26
|
-
border-radius: 50%;
|
|
27
|
-
border: 2px solid var(--ck-color-text);
|
|
28
|
-
border-top-color: transparent;
|
|
29
|
-
transform: translateY(-50%);
|
|
30
|
-
z-index: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.ck-exportword_status-pending .ck.ck-exportword__spinner-container {
|
|
34
|
-
display: block;
|
|
35
|
-
position: absolute;
|
|
36
|
-
width: var(--ck-toolbar-spinner-size);
|
|
37
|
-
height: var(--ck-toolbar-spinner-size);
|
|
38
|
-
animation: 1.5s infinite rotate linear;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.ck-exportword_status-pending .ck.ck-button__icon {
|
|
42
|
-
color: transparent;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@keyframes rotate {
|
|
46
|
-
to {
|
|
47
|
-
transform: rotate(360deg)
|
|
48
|
-
}
|
|
49
|
-
}
|