@ckeditor/ckeditor5-revision-history 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/lang/contexts.json +23 -22
- package/lang/translations/az.po +27 -23
- package/lang/translations/bs.po +124 -0
- package/lang/translations/cs.po +27 -23
- package/lang/translations/da.po +28 -24
- package/lang/translations/de-ch.po +27 -23
- package/lang/translations/de.po +50 -46
- package/lang/translations/en-au.po +27 -23
- package/lang/translations/en-gb.po +27 -23
- package/lang/translations/en.po +27 -23
- package/lang/translations/es.po +29 -25
- package/lang/translations/et.po +27 -23
- package/lang/translations/fa.po +27 -23
- package/lang/translations/fr.po +31 -27
- package/lang/translations/gl.po +50 -46
- package/lang/translations/he.po +27 -23
- package/lang/translations/hi.po +27 -23
- package/lang/translations/hr.po +49 -45
- package/lang/translations/hu.po +33 -29
- package/lang/translations/id.po +29 -25
- package/lang/translations/it.po +50 -46
- package/lang/translations/ja.po +27 -23
- package/lang/translations/ko.po +27 -23
- package/lang/translations/ku.po +27 -23
- package/lang/translations/lv.po +27 -23
- package/lang/translations/ne.po +27 -23
- package/lang/translations/nl.po +28 -24
- package/lang/translations/no.po +27 -23
- package/lang/translations/pl.po +29 -25
- package/lang/translations/pt-br.po +28 -24
- package/lang/translations/ro.po +49 -45
- package/lang/translations/ru.po +27 -23
- package/lang/translations/sk.po +27 -23
- package/lang/translations/sr-latn.po +28 -24
- package/lang/translations/sr.po +28 -24
- package/lang/translations/tk.po +27 -23
- package/lang/translations/tr.po +45 -41
- package/lang/translations/ug.po +27 -23
- package/lang/translations/uk.po +27 -23
- package/lang/translations/vi.po +27 -23
- package/lang/translations/zh-cn.po +27 -23
- package/lang/translations/zh.po +28 -24
- package/package.json +11 -11
- package/src/changeitem.js +2 -2
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +2 -2
- package/src/revisionhistory.js +2 -2
- package/src/revisionsrepository.js +2 -2
- package/src/revisiontracker.js +2 -2
- package/src/revisionviewer.js +2 -2
- package/src/ui/revision/createrevisionactionsdropdown.js +2 -2
- package/src/ui/revision/revisionauthorview.js +2 -2
- package/src/ui/revision/revisionnameview.js +2 -2
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +2 -2
- package/src/ui/revision/subrevisionview.js +2 -2
- package/src/ui/revision/utils.js +2 -2
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +2 -2
- package/src/ui/revisionhistory/revisionhistoryui.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebar.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebarview.js +2 -2
- package/src/ui/revisionssidebar/utils.js +2 -2
- package/src/ui/revisionviewer/changedetailsview.js +2 -2
- package/src/ui/revisionviewer/changesnavigationview.js +2 -2
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +2 -2
- package/src/ui/revisionviewer/revisionviewerui.js +2 -2
- package/theme/revisionhistorysaverevisionform.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2003-
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
2
|
#
|
|
3
3
|
# !!! IMPORTANT !!!
|
|
4
4
|
#
|
|
@@ -16,75 +16,75 @@ msgstr ""
|
|
|
16
16
|
"Language: zh_CN\n"
|
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
18
|
|
|
19
|
-
msgctxt "The prefix for a name of a revision created by restoring other revision"
|
|
19
|
+
msgctxt "The prefix for a name of a revision created by restoring other revision."
|
|
20
20
|
msgid "Restored"
|
|
21
21
|
msgstr ""
|
|
22
22
|
|
|
23
|
-
msgctxt "The name for an initial revision that is empty"
|
|
23
|
+
msgctxt "The name for an initial revision that is empty."
|
|
24
24
|
msgid "Empty document"
|
|
25
25
|
msgstr ""
|
|
26
26
|
|
|
27
|
-
msgctxt "The name for an initial revision (if it was not empty)"
|
|
27
|
+
msgctxt "The name for an initial revision (if it was not empty)."
|
|
28
28
|
msgid "Initial revision"
|
|
29
29
|
msgstr ""
|
|
30
30
|
|
|
31
|
-
msgctxt "The label for a dropdown item to compare given revision with already selected revision"
|
|
31
|
+
msgctxt "The label for a dropdown item to compare given revision with already selected revision."
|
|
32
32
|
msgid "Compare against selected"
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
35
|
-
msgctxt "The label for a dropdown item to rename given revision"
|
|
35
|
+
msgctxt "The label for a dropdown item to rename given revision."
|
|
36
36
|
msgid "Name this revision"
|
|
37
37
|
msgstr ""
|
|
38
38
|
|
|
39
|
-
msgctxt "The label for the user who saved the revision"
|
|
39
|
+
msgctxt "The label for the user who saved the revision."
|
|
40
40
|
msgid "Revision creator"
|
|
41
41
|
msgstr ""
|
|
42
42
|
|
|
43
|
-
msgctxt "The label for users who introduced changes in the revision"
|
|
43
|
+
msgctxt "The label for users who introduced changes in the revision."
|
|
44
44
|
msgid "Revision author"
|
|
45
45
|
msgstr ""
|
|
46
46
|
|
|
47
|
-
msgctxt "The label for the revision name"
|
|
47
|
+
msgctxt "The label for the revision name."
|
|
48
48
|
msgid "Revision name"
|
|
49
49
|
msgstr ""
|
|
50
50
|
|
|
51
|
-
msgctxt "The label for a toolbar form field where a name for a new revision should be provided"
|
|
51
|
+
msgctxt "The label for a toolbar form field where a name for a new revision should be provided."
|
|
52
52
|
msgid "Name of the revision (optional)"
|
|
53
53
|
msgstr ""
|
|
54
54
|
|
|
55
|
-
msgctxt "The label for a dropdown item that saves current revision"
|
|
55
|
+
msgctxt "The label for a dropdown item that saves current revision."
|
|
56
56
|
msgid "Save current revision"
|
|
57
57
|
msgstr ""
|
|
58
58
|
|
|
59
|
-
msgctxt "The label for a dropdown item to open the revision history view (revision viewer)"
|
|
59
|
+
msgctxt "The label for a dropdown item to open the revision history view (revision viewer)."
|
|
60
60
|
msgid "Open revision history"
|
|
61
61
|
msgstr ""
|
|
62
62
|
|
|
63
|
-
msgctxt "The label for the sidebar in revision viewer"
|
|
63
|
+
msgctxt "The label for the sidebar in revision viewer."
|
|
64
64
|
msgid "Revision history"
|
|
65
65
|
msgstr ""
|
|
66
66
|
|
|
67
|
-
msgctxt "The label for a change tooltip for a suggestion change, shown in revision viewer"
|
|
67
|
+
msgctxt "The label for a change tooltip for a suggestion change, shown in revision viewer."
|
|
68
68
|
msgid "Suggested by"
|
|
69
69
|
msgstr ""
|
|
70
70
|
|
|
71
|
-
msgctxt "The label for a change tooltip for an insertion change, shown in revision viewer"
|
|
71
|
+
msgctxt "The label for a change tooltip for an insertion change, shown in revision viewer."
|
|
72
72
|
msgid "Added by"
|
|
73
73
|
msgstr ""
|
|
74
74
|
|
|
75
|
-
msgctxt "The label for a change tooltip for a remove change, shown in revision viewer"
|
|
75
|
+
msgctxt "The label for a change tooltip for a remove change, shown in revision viewer."
|
|
76
76
|
msgid "Removed by"
|
|
77
77
|
msgstr ""
|
|
78
78
|
|
|
79
|
-
msgctxt "Displayed in the revision viewer toolbar when loading a revision"
|
|
79
|
+
msgctxt "Displayed in the revision viewer toolbar when loading a revision."
|
|
80
80
|
msgid "Loading..."
|
|
81
81
|
msgstr ""
|
|
82
82
|
|
|
83
|
-
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have no changes"
|
|
83
|
+
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have no changes."
|
|
84
84
|
msgid "No changes"
|
|
85
85
|
msgstr ""
|
|
86
86
|
|
|
87
|
-
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have changes"
|
|
87
|
+
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have changes."
|
|
88
88
|
msgid "NUMBER_OF_CHANGES"
|
|
89
89
|
msgid_plural "%0 changes"
|
|
90
90
|
msgstr[0] ""
|
|
@@ -93,11 +93,11 @@ msgctxt "Edit: (2 of 5)"
|
|
|
93
93
|
msgid "X_OF_Y_CHANGES"
|
|
94
94
|
msgstr "第 %0 步,共 %1 步"
|
|
95
95
|
|
|
96
|
-
msgctxt "The label for a button that highlights previous change in revision viewer"
|
|
96
|
+
msgctxt "The label for a button that highlights previous change in revision viewer."
|
|
97
97
|
msgid "Show previous change"
|
|
98
98
|
msgstr ""
|
|
99
99
|
|
|
100
|
-
msgctxt "The label for a button that highlights next change in revision viewer"
|
|
100
|
+
msgctxt "The label for a button that highlights next change in revision viewer."
|
|
101
101
|
msgid "Show next change"
|
|
102
102
|
msgstr ""
|
|
103
103
|
|
|
@@ -109,10 +109,14 @@ msgctxt "(Edit): 2 of 5"
|
|
|
109
109
|
msgid "EDIT_X_OF_Y_REVISIONS"
|
|
110
110
|
msgstr "编辑"
|
|
111
111
|
|
|
112
|
-
msgctxt "The label for a button that closes revision viewer and shows editor"
|
|
112
|
+
msgctxt "The label for a button that closes revision viewer and shows editor."
|
|
113
113
|
msgid "Back to editing"
|
|
114
114
|
msgstr ""
|
|
115
115
|
|
|
116
|
-
msgctxt "The label for a button that restores given revision"
|
|
116
|
+
msgctxt "The label for a button that restores given revision."
|
|
117
117
|
msgid "Restore this revision"
|
|
118
118
|
msgstr ""
|
|
119
|
+
|
|
120
|
+
msgctxt "The label for the alert shown when closing the editor with an unsaved revision history change."
|
|
121
|
+
msgid "PENDING_ACTION_REVISION_HISTORY"
|
|
122
|
+
msgstr ""
|
package/lang/translations/zh.po
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2003-
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
2
|
#
|
|
3
3
|
# !!! IMPORTANT !!!
|
|
4
4
|
#
|
|
@@ -16,75 +16,75 @@ msgstr ""
|
|
|
16
16
|
"Language: zh_TW\n"
|
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
18
|
|
|
19
|
-
msgctxt "The prefix for a name of a revision created by restoring other revision"
|
|
19
|
+
msgctxt "The prefix for a name of a revision created by restoring other revision."
|
|
20
20
|
msgid "Restored"
|
|
21
|
-
msgstr "
|
|
21
|
+
msgstr ""
|
|
22
22
|
|
|
23
|
-
msgctxt "The name for an initial revision that is empty"
|
|
23
|
+
msgctxt "The name for an initial revision that is empty."
|
|
24
24
|
msgid "Empty document"
|
|
25
25
|
msgstr ""
|
|
26
26
|
|
|
27
|
-
msgctxt "The name for an initial revision (if it was not empty)"
|
|
27
|
+
msgctxt "The name for an initial revision (if it was not empty)."
|
|
28
28
|
msgid "Initial revision"
|
|
29
29
|
msgstr ""
|
|
30
30
|
|
|
31
|
-
msgctxt "The label for a dropdown item to compare given revision with already selected revision"
|
|
31
|
+
msgctxt "The label for a dropdown item to compare given revision with already selected revision."
|
|
32
32
|
msgid "Compare against selected"
|
|
33
33
|
msgstr ""
|
|
34
34
|
|
|
35
|
-
msgctxt "The label for a dropdown item to rename given revision"
|
|
35
|
+
msgctxt "The label for a dropdown item to rename given revision."
|
|
36
36
|
msgid "Name this revision"
|
|
37
37
|
msgstr ""
|
|
38
38
|
|
|
39
|
-
msgctxt "The label for the user who saved the revision"
|
|
39
|
+
msgctxt "The label for the user who saved the revision."
|
|
40
40
|
msgid "Revision creator"
|
|
41
41
|
msgstr ""
|
|
42
42
|
|
|
43
|
-
msgctxt "The label for users who introduced changes in the revision"
|
|
43
|
+
msgctxt "The label for users who introduced changes in the revision."
|
|
44
44
|
msgid "Revision author"
|
|
45
45
|
msgstr ""
|
|
46
46
|
|
|
47
|
-
msgctxt "The label for the revision name"
|
|
47
|
+
msgctxt "The label for the revision name."
|
|
48
48
|
msgid "Revision name"
|
|
49
49
|
msgstr ""
|
|
50
50
|
|
|
51
|
-
msgctxt "The label for a toolbar form field where a name for a new revision should be provided"
|
|
51
|
+
msgctxt "The label for a toolbar form field where a name for a new revision should be provided."
|
|
52
52
|
msgid "Name of the revision (optional)"
|
|
53
53
|
msgstr ""
|
|
54
54
|
|
|
55
|
-
msgctxt "The label for a dropdown item that saves current revision"
|
|
55
|
+
msgctxt "The label for a dropdown item that saves current revision."
|
|
56
56
|
msgid "Save current revision"
|
|
57
57
|
msgstr ""
|
|
58
58
|
|
|
59
|
-
msgctxt "The label for a dropdown item to open the revision history view (revision viewer)"
|
|
59
|
+
msgctxt "The label for a dropdown item to open the revision history view (revision viewer)."
|
|
60
60
|
msgid "Open revision history"
|
|
61
61
|
msgstr ""
|
|
62
62
|
|
|
63
|
-
msgctxt "The label for the sidebar in revision viewer"
|
|
63
|
+
msgctxt "The label for the sidebar in revision viewer."
|
|
64
64
|
msgid "Revision history"
|
|
65
65
|
msgstr ""
|
|
66
66
|
|
|
67
|
-
msgctxt "The label for a change tooltip for a suggestion change, shown in revision viewer"
|
|
67
|
+
msgctxt "The label for a change tooltip for a suggestion change, shown in revision viewer."
|
|
68
68
|
msgid "Suggested by"
|
|
69
69
|
msgstr ""
|
|
70
70
|
|
|
71
|
-
msgctxt "The label for a change tooltip for an insertion change, shown in revision viewer"
|
|
71
|
+
msgctxt "The label for a change tooltip for an insertion change, shown in revision viewer."
|
|
72
72
|
msgid "Added by"
|
|
73
73
|
msgstr ""
|
|
74
74
|
|
|
75
|
-
msgctxt "The label for a change tooltip for a remove change, shown in revision viewer"
|
|
75
|
+
msgctxt "The label for a change tooltip for a remove change, shown in revision viewer."
|
|
76
76
|
msgid "Removed by"
|
|
77
77
|
msgstr ""
|
|
78
78
|
|
|
79
|
-
msgctxt "Displayed in the revision viewer toolbar when loading a revision"
|
|
79
|
+
msgctxt "Displayed in the revision viewer toolbar when loading a revision."
|
|
80
80
|
msgid "Loading..."
|
|
81
81
|
msgstr ""
|
|
82
82
|
|
|
83
|
-
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have no changes"
|
|
83
|
+
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have no changes."
|
|
84
84
|
msgid "No changes"
|
|
85
85
|
msgstr ""
|
|
86
86
|
|
|
87
|
-
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have changes"
|
|
87
|
+
msgctxt "Displayed in the revision viewer toolbar when the compared revisions have changes."
|
|
88
88
|
msgid "NUMBER_OF_CHANGES"
|
|
89
89
|
msgid_plural "%0 changes"
|
|
90
90
|
msgstr[0] ""
|
|
@@ -93,11 +93,11 @@ msgctxt "Edit: (2 of 5)"
|
|
|
93
93
|
msgid "X_OF_Y_CHANGES"
|
|
94
94
|
msgstr "%0/%1"
|
|
95
95
|
|
|
96
|
-
msgctxt "The label for a button that highlights previous change in revision viewer"
|
|
96
|
+
msgctxt "The label for a button that highlights previous change in revision viewer."
|
|
97
97
|
msgid "Show previous change"
|
|
98
98
|
msgstr ""
|
|
99
99
|
|
|
100
|
-
msgctxt "The label for a button that highlights next change in revision viewer"
|
|
100
|
+
msgctxt "The label for a button that highlights next change in revision viewer."
|
|
101
101
|
msgid "Show next change"
|
|
102
102
|
msgstr ""
|
|
103
103
|
|
|
@@ -109,10 +109,14 @@ msgctxt "(Edit): 2 of 5"
|
|
|
109
109
|
msgid "EDIT_X_OF_Y_REVISIONS"
|
|
110
110
|
msgstr "編輯"
|
|
111
111
|
|
|
112
|
-
msgctxt "The label for a button that closes revision viewer and shows editor"
|
|
112
|
+
msgctxt "The label for a button that closes revision viewer and shows editor."
|
|
113
113
|
msgid "Back to editing"
|
|
114
114
|
msgstr ""
|
|
115
115
|
|
|
116
|
-
msgctxt "The label for a button that restores given revision"
|
|
116
|
+
msgctxt "The label for a button that restores given revision."
|
|
117
117
|
msgid "Restore this revision"
|
|
118
118
|
msgstr ""
|
|
119
|
+
|
|
120
|
+
msgctxt "The label for the alert shown when closing the editor with an unsaved revision history change."
|
|
121
|
+
msgid "PENDING_ACTION_REVISION_HISTORY"
|
|
122
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "Document revision history feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"versioning"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ckeditor/ckeditor5-collaboration-core": "^
|
|
28
|
-
"@ckeditor/ckeditor5-comments": "^
|
|
29
|
-
"@ckeditor/ckeditor5-track-changes": "^
|
|
30
|
-
"@ckeditor/ckeditor5-core": "^
|
|
31
|
-
"@ckeditor/ckeditor5-ui": "^
|
|
32
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
33
|
-
"@ckeditor/ckeditor5-utils": "^
|
|
34
|
-
"@ckeditor/ckeditor5-undo": "^
|
|
35
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
36
|
-
"ckeditor5": "^
|
|
27
|
+
"@ckeditor/ckeditor5-collaboration-core": "^32.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-comments": "^32.0.0",
|
|
29
|
+
"@ckeditor/ckeditor5-track-changes": "^32.0.0",
|
|
30
|
+
"@ckeditor/ckeditor5-core": "^32.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-ui": "^32.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-engine": "^32.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-utils": "^32.0.0",
|
|
34
|
+
"@ckeditor/ckeditor5-undo": "^32.0.0",
|
|
35
|
+
"@ckeditor/ckeditor5-editor-classic": "^32.0.0",
|
|
36
|
+
"ckeditor5": "^32.0.0",
|
|
37
37
|
"lodash-es": "^4.17.15",
|
|
38
38
|
"luxon": "^1.25.0"
|
|
39
39
|
}
|
package/src/changeitem.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
|
-
var
|
|
23
|
+
var _0x4969=['author','data','type','toJSON','createdAt'];(function(_0x158e19,_0x4969d3){var _0x32b638=function(_0x519781){while(--_0x519781){_0x158e19['push'](_0x158e19['shift']());}};_0x32b638(++_0x4969d3);}(_0x4969,0xbe));var _0x32b6=function(_0x158e19,_0x4969d3){_0x158e19=_0x158e19-0x0;var _0x32b638=_0x4969[_0x158e19];return _0x32b638;};import{ObservableMixin as _0x2347a3,mix as _0x14cc50,uid as _0x224274}from'ckeditor5/src/utils';export default class h{constructor(_0x40688a){this['id']=_0x40688a['id']||_0x224274(),this['author']=_0x40688a[_0x32b6('0x0')],this[_0x32b6('0x2')]=_0x40688a[_0x32b6('0x2')],this[_0x32b6('0x1')]=_0x40688a['data']||{},this['set']('createdAt',_0x40688a[_0x32b6('0x4')]);}[_0x32b6('0x3')](){return{'id':this['id'],'authorId':this[_0x32b6('0x0')]['id'],'type':this[_0x32b6('0x2')],'data':this[_0x32b6('0x1')],'createdAt':this[_0x32b6('0x4')]};}}_0x14cc50(h,_0x2347a3);
|
package/src/revision.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 _0x3a3d=['creator','fromVersion','toJSON','authors','set','creatorId','toVersion','createdAt','fire','setAttribute','setName','name','authorsIds','map','_update','diffData','attributes'];(function(_0x421dfc,_0x3a3dec){const _0xaad7de=function(_0x96d79e){while(--_0x96d79e){_0x421dfc['push'](_0x421dfc['shift']());}};_0xaad7de(++_0x3a3dec);}(_0x3a3d,0x179));const _0xaad7=function(_0x421dfc,_0x3a3dec){_0x421dfc=_0x421dfc-0x0;let _0xaad7de=_0x3a3d[_0x421dfc];return _0xaad7de;};import{ObservableMixin as _0x493f53,mix as _0x205864,uid as _0x55479a}from'ckeditor5/src/utils';import{cloneDeep as _0x5ef709,set as _0x1f71c6,unset as _0x45e9a3}from'lodash-es';export default class n{constructor(_0x22de2c){this['id']=_0x22de2c['id']||_0x55479a(),this[_0xaad7('0x1')]('name',_0x22de2c['name']||''),this[_0xaad7('0xe')]=_0x22de2c[_0xaad7('0xe')]||null,this[_0xaad7('0x0')]=_0x22de2c[_0xaad7('0x0')]||[],this[_0xaad7('0x1')]('createdAt',_0x22de2c['createdAt']||new Date()),this[_0xaad7('0xc')]=_0x22de2c[_0xaad7('0xc')]||null,this[_0xaad7('0x1')](_0xaad7('0xd'),_0x22de2c['attributes']||{}),this[_0xaad7('0x3')]=_0x22de2c[_0xaad7('0x3')]||0x0,this['fromVersion']=_0x22de2c[_0xaad7('0xf')]||0x0;}[_0xaad7('0x7')](_0xaf5543){this[_0xaad7('0xb')]({'name':_0xaf5543});}[_0xaad7('0x6')](_0x37c623,_0x1c8b9d){const _0x54ea82=_0x5ef709(this[_0xaad7('0xd')]);_0x1f71c6(_0x54ea82,_0x37c623,_0x1c8b9d),this['_update']({'attributes':_0x54ea82});}['removeAttribute'](_0x5bf47c){const _0x2a8408=_0x5ef709(this['attributes']);_0x45e9a3(_0x2a8408,_0x5bf47c),this[_0xaad7('0xb')]({'attributes':_0x2a8408});}[_0xaad7('0xb')](_0x10c910,_0x389be3=!0x1){let _0x73fb1d=!0x1;const _0xe17e02={'id':this['id']};for(const _0x12a188 of[_0xaad7('0x8'),'createdAt','diffData',_0xaad7('0x0'),'attributes',_0xaad7('0x3'),_0xaad7('0xf'),_0xaad7('0x2')]){const _0x5c39a0=_0x10c910[_0x12a188];void 0x0!==_0x5c39a0&&_0x5c39a0!==this[_0x12a188]&&(this[_0x12a188]=_0x5c39a0,_0xe17e02[_0x12a188]=_0x5c39a0,_0x73fb1d=!0x0);}_0x73fb1d&&(_0xe17e02['authors']&&(_0xe17e02[_0xaad7('0x9')]=_0xe17e02[_0xaad7('0x0')][_0xaad7('0xa')](_0x1fcb3e=>_0x1fcb3e['id']),delete _0xe17e02[_0xaad7('0x0')]),this[_0xaad7('0x5')](_0xaad7('0xb'),_0xe17e02,_0x389be3));}[_0xaad7('0x10')](){return{'id':this['id'],'name':this['name'],'creatorId':this[_0xaad7('0xe')]?this[_0xaad7('0xe')]['id']:null,'authorsIds':this[_0xaad7('0x0')]['map'](_0x1e0d15=>_0x1e0d15['id']),'diffData':this['diffData'],'createdAt':this[_0xaad7('0x4')],'attributes':this['attributes'],'fromVersion':this[_0xaad7('0xf')],'toVersion':this['toVersion']};}}_0x205864(n,_0x493f53);
|
package/src/revisiondiff.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 _0x24ea=['add','oldRevisionId','changes','_setData','newRevisionId'];(function(_0x1d78e1,_0x24ea53){const _0xcc0a41=function(_0xc0b34f){while(--_0xc0b34f){_0x1d78e1['push'](_0x1d78e1['shift']());}};_0xcc0a41(++_0x24ea53);}(_0x24ea,0xdf));const _0xcc0a=function(_0x1d78e1,_0x24ea53){_0x1d78e1=_0x1d78e1-0x0;let _0xcc0a41=_0x24ea[_0x1d78e1];return _0xcc0a41;};import{Collection as _0x1a2a50}from'ckeditor5/src/utils';export default class f{constructor(_0x251c6d,_0x32a19d){this[_0xcc0a('0x1')]=_0x251c6d,this[_0xcc0a('0x3')]=_0x32a19d;}[_0xcc0a('0x0')](_0x1f772c){this[_0xcc0a('0x4')]=new _0x1a2a50();for(const _0x5ef534 of _0x1f772c['changes'])this['changes'][_0xcc0a('0x2')](_0x5ef534);}}
|
package/src/revisionhistory.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 _0x50e1dc}from'ckeditor5/src/core';import _0x2bee1c from'./revisiontracker';import _0x57135f from'./ui/revisionhistory/revisionhistoryui';import _0x1b09d1 from'./revisionviewer';import _0x5a15e5 from'./ui/revisionviewer/revisionviewerui';import _0x2be2a8 from'./ui/revisionssidebar/revisionssidebar';import _0x1016a9 from'@ckeditor/ckeditor5-editor-classic/src/classiceditor';import{CKEditorError as _0x56ddef,uid as _0x34d8ec}from'ckeditor5/src/utils';const m=['RevisionTracker','RevisionHistoryUI','WebSocketGateway','CommentsRepository','TrackChangesEditing','RestrictedEditingMode','Autosave'];export default class p extends _0x50e1dc{static get['pluginName'](){return'RevisionHistory';}static get['requires'](){return[_0x2bee1c,_0x57135f];}constructor(..._0x4e8356){if(super(..._0x4e8356),!this['editor']['config']['get']('revisionHistory'))throw new _0x56ddef('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x106648=>this['_showRevisionViewer'](_0x106648)),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xf6f3f8=>this['_closeRevisionViewer'](_0xf6f3f8)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xa0105e=>this['_restoreRevision'](_0xa0105e)),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4dfa2f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4dfa2f;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](..._0x474d6f){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](..._0x474d6f);}['getRevision'](..._0x349c5e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](..._0x349c5e);}['getRevisions'](..._0x288010){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](..._0x288010);}['_getRevisionViewerEditorConfig'](){const _0x4d633f={},_0x18a94f=this['editor'],_0x5cd830=_0x18a94f['plugins']['get']('RevisionTracker'),_0x2fac93=_0x18a94f['plugins']['get']('Users')['users'];for(const _0x1fd68e of _0x18a94f['config']['names']())_0x4d633f[_0x1fd68e]=_0x18a94f['config']['get'](_0x1fd68e);delete _0x4d633f['context'],_0x4d633f['initialData']='',_0x4d633f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'];const _0x5644f5=this['editor']['constructor']['builtinPlugins']||[],_0x3d6139=_0x4d633f['extraPlugins']||[];delete _0x4d633f['extraPlugins'];const _0x4f6af3=_0x5644f5['concat'](_0x4d633f['plugins'])['concat'](_0x3d6139)['map'](_0x3986c4=>'string'==typeof _0x3986c4?_0x5644f5['find'](_0x3f63f8=>_0x3f63f8['pluginName']==_0x3986c4):_0x3986c4);return _0x4d633f['plugins']=Array['from'](new Set(_0x4f6af3))['filter'](_0x57dffa=>g(_0x57dffa,_0x18a94f['plugins'],[])),(_0x4d633f['plugins']['push'](_0x1b09d1,_0x5a15e5,class extends _0x50e1dc{static get['requires'](){return[_0x1b09d1,'Users'];}['init'](){const _0x2ef17e=this['editor']['plugins']['get']('Users');for(const _0x6fc38 of _0x2fac93)_0x6fc38['isAnonymous']||_0x2ef17e['getUser'](_0x6fc38['id'])||_0x2ef17e['addUser'](_0x6fc38);const _0x52a9e6=_0x5cd830['repository']['getRevisions']();let _0xde7fb2=null;const _0x54121d=this['editor']['plugins']['get']('RevisionViewer');_0x54121d['adapter']=_0x5cd830['adapter'],_0x54121d['bind']('isEnabled')['to'](_0x5cd830),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x18a94f,'isReadOnly',_0x20a930=>!_0x20a930);for(const _0x4c7c0c of _0x52a9e6){const _0x8f18d7=null===_0x4c7c0c['creator'];if(_0x8f18d7&&_0x4c7c0c['toVersion']===_0x4c7c0c['fromVersion'])continue;const _0x5b4e99=_0x4c7c0c['toJSON']();_0x54121d['addRevisionData'](_0x5b4e99,(_0x2f7f26,_0x962746,_0x1ca981)=>{if(_0x8f18d7){if(_0xde7fb2)_0xde7fb2['_update'](_0x2f7f26,_0x962746);else{if(!_0x962746){const _0x33e5e5=_0x1ca981['toJSON']();_0x33e5e5['id']=_0x34d8ec(),_0x5cd830['saveRevision'](_0x33e5e5,_0x1ca981['toVersion'])['then'](_0x2d941f=>{_0xde7fb2=_0x2d941f;});}}}else _0x4c7c0c['_update'](_0x2f7f26,_0x962746);});}}},_0x2be2a8),_0x4d633f);}['_enhanceShowRevisionViewerCallback'](){const _0x2ee331=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['isReadOnly']=!0x0;const _0x1cd8e7=this['editor']['plugins']['get']('RevisionTracker');this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x1cd8e7['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks']();const _0x519b1e=this['_getRevisionViewerEditorConfig']();return _0x2ee331(_0x519b1e)['then'](_0x1268e6=>{this['_viewerEditor']=_0x1268e6,this['editor']['plugins']['has']('Annotations')&&this['editor']['plugins']['get']('Annotations')['refreshVisibility']();});});}['_enhanceCloseRevisionViewerCallback'](){const _0x5cc4a8=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),_0x5cc4a8(this['_viewerEditor'])['then'](()=>{this['editor']['plugins']['has']('WebSocketGateway')?this['editor']['isReadOnly']='connected'!==this['editor']['plugins']['get']('WebSocketGateway')['state']:this['editor']['isReadOnly']=!0x1,this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')&&(this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),this['editor']['plugins']['get']('Annotations')['refreshPositioning']());})));}['_showRevisionViewer'](_0x1efede){const _0x48d049=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x506ef7=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x39f5fe=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return _0x1016a9['create'](_0x39f5fe,_0x1efede)['then'](_0x3ac28d=>(_0x506ef7['style']['display']='block',_0x48d049['style']['display']='none',_0x3ac28d));}['_closeRevisionViewer'](_0x1b198e){const _0x28c28d=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x28c28d['style']['display']='',_0x1b198e['destroy']();}async['_restoreRevision'](_0x4cd530){const _0xcba04d=this['editor'],t=_0xcba04d['t'],_0x3bcc27=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x453c28=_0xcba04d['plugins']['get']('RevisionTracker'),_0xffebe6=_0x3bcc27['repository']['getRevision'](_0x4cd530);_0xcba04d['model']['change'](_0xac3c02=>{for(const _0xc3bcf2 of Array['from'](_0xcba04d['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xac3c02['removeMarker'](_0xc3bcf2);}),_0x3bcc27['isReady']=!0x1;const _0x5ee360=await _0x3bcc27['getRevisionData'](_0xffebe6);let _0x14d45f;_0xcba04d['data']['set'](_0x5ee360,{'suppressErrorInCollaboration':!0x0});const _0x56c10f=t('Restored');if(_0xffebe6['name'])_0x14d45f=-0x1==_0xffebe6['name']['indexOf'](_0x56c10f)?_0x56c10f+':\x20'+_0xffebe6['name']:_0xffebe6['name'];else _0x14d45f=_0x56c10f+':\x20'+(_0xffebe6['createdAt']['toLocaleDateString'](_0xcba04d['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xffebe6['createdAt']['toLocaleTimeString'](_0xcba04d['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x453c28['saveRevision']({'name':_0x14d45f}),_0x3bcc27['isReady']=!0x0,_0xcba04d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}function g(_0x302101,_0x5a3e4a,_0x1eaa5c){const _0x2d906c='function'==typeof _0x302101?_0x302101['pluginName']||_0x302101['name']:_0x302101;if(_0x1eaa5c['includes'](_0x2d906c))return!0x0;if(_0x1eaa5c['push'](_0x2d906c),m['includes'](_0x2d906c))return!0x1;const _0x300e7b=(('function'==typeof _0x302101?_0x302101:_0x5a3e4a['has'](_0x2d906c)?_0x5a3e4a['get'](_0x2d906c):{})['requires']||[])['every'](_0x3746d4=>g(_0x3746d4,_0x5a3e4a,_0x1eaa5c));return _0x300e7b||m['push'](_0x2d906c),_0x300e7b;}
|