@ckeditor/ckeditor5-collaboration-core 42.0.2 → 43.0.0-alpha.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 -101
- package/dist/index-content.css +49 -0
- package/dist/index-editor.css +23 -1
- package/dist/index.css +143 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/suggestions/view/ariadescriptionview.d.ts +27 -0
- package/dist/suggestions/view/latefocusbuttonview.d.ts +41 -0
- package/dist/suggestionstyles.d.ts +2 -0
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/utils/confirmmixin.d.ts +5 -1
- package/dist/utils/confirmview.d.ts +20 -4
- package/dist/utils/hashobject.d.ts +1 -1
- package/dist/utils/sanitizeEditorConfig.d.ts +1 -1
- package/dist/utils/setupthreadkeyboardnavigation.d.ts +49 -0
- package/dist/utils/trim-html.d.ts +3 -0
- package/package.json +6 -5
- package/src/index.d.ts +4 -1
- package/src/index.js +1 -1
- package/src/permissions.js +1 -1
- package/src/suggestions/view/ariadescriptionview.d.ts +23 -0
- package/src/suggestions/view/ariadescriptionview.js +23 -0
- package/src/suggestions/view/latefocusbuttonview.d.ts +37 -0
- package/src/suggestions/view/latefocusbuttonview.js +23 -0
- package/src/suggestionstyles.d.ts +2 -0
- package/src/suggestionstyles.js +1 -1
- package/src/users/view/userview.js +1 -1
- package/src/users.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/confirmmixin.d.ts +5 -1
- package/src/utils/confirmmixin.js +1 -1
- package/src/utils/confirmview.d.ts +20 -4
- package/src/utils/confirmview.js +1 -1
- package/src/utils/getdatetimeformatter.js +1 -1
- package/src/utils/getmarkerdomelement.js +1 -1
- package/src/utils/hashobject.d.ts +1 -1
- package/src/utils/hashobject.js +1 -1
- package/src/utils/sanitizeEditorConfig.d.ts +1 -1
- package/src/utils/sanitizeEditorConfig.js +1 -1
- package/src/utils/setupthreadkeyboardnavigation.d.ts +45 -0
- package/src/utils/setupthreadkeyboardnavigation.js +23 -0
- package/src/utils/surroundingmarkersdetector.js +1 -1
- package/src/utils/trim-html.d.ts +3 -0
- package/src/utils/trim-html.js +1 -1
- package/theme/ariadescription.css +12 -0
- package/theme/integrations/mergefields.css +67 -0
- package/theme/suggestion.css +29 -1
package/CHANGELOG.md
CHANGED
@@ -1,104 +1,4 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
-
All changes in the package are documented
|
5
|
-
|
6
|
-
Changes for the past releases are available below.
|
7
|
-
|
8
|
-
|
9
|
-
## 23.0.0 (September 25, 2020)
|
10
|
-
|
11
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
12
|
-
|
13
|
-
|
14
|
-
## 22.0.0 (August 25, 2020)
|
15
|
-
|
16
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
17
|
-
|
18
|
-
## 21.0.0 (July 24, 2020)
|
19
|
-
|
20
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
21
|
-
|
22
|
-
|
23
|
-
## 20.0.1 (June 26, 2020)
|
24
|
-
|
25
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
26
|
-
|
27
|
-
|
28
|
-
## 19.0.2 (May 25, 2020)
|
29
|
-
|
30
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
31
|
-
|
32
|
-
|
33
|
-
## 19.0.1 (April 30, 2020)
|
34
|
-
|
35
|
-
### BREAKING CHANGES
|
36
|
-
|
37
|
-
* `Users#me` is now set to `null` if `Users#defineMe()` or `Users#useAnonymousUser()` was not called.
|
38
|
-
|
39
|
-
### Features
|
40
|
-
|
41
|
-
* Localized user-related UI.
|
42
|
-
* Introduced `Users#useAnonymousUser()` and `config.users.anonymousUserId`.
|
43
|
-
|
44
|
-
### Other changes
|
45
|
-
|
46
|
-
* `Users#me` will no longer set the local user to anonymous by default (if `Users#defineMe()` was not called).
|
47
|
-
|
48
|
-
|
49
|
-
## 18.0.0 (March 19, 2020)
|
50
|
-
|
51
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
52
|
-
|
53
|
-
|
54
|
-
## 17.0.0 (February 20, 2020)
|
55
|
-
|
56
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
57
|
-
|
58
|
-
|
59
|
-
## 16.0.0 (December 2, 2019)
|
60
|
-
|
61
|
-
### Features
|
62
|
-
|
63
|
-
* Introduced the [`users.colorsCount`](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/users.html#adding-more-users-colors) configuration option.
|
64
|
-
|
65
|
-
|
66
|
-
## 15.0.0 (October 23, 2019)
|
67
|
-
|
68
|
-
### Other changes
|
69
|
-
|
70
|
-
* Added a more explanatory message for an error that is thrown when the local user is not defined.
|
71
|
-
|
72
|
-
|
73
|
-
## 1.2.0 (August 22, 2019)
|
74
|
-
|
75
|
-
### Features
|
76
|
-
|
77
|
-
* Added a method to get an operation author. See the [Users API guide](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/users.html#operation-authors) for more information.
|
78
|
-
|
79
|
-
|
80
|
-
## 1.1.0 (July 4, 2019)
|
81
|
-
|
82
|
-
### Features
|
83
|
-
|
84
|
-
* Added the `user-id` data attribute to the `user` element. Now you can attach some action to user avatars in the presence list and comments.
|
85
|
-
|
86
|
-
|
87
|
-
## 1.0.3 (June 5, 2019)
|
88
|
-
|
89
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
90
|
-
|
91
|
-
|
92
|
-
## 1.0.2 (April 4, 2019)
|
93
|
-
|
94
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
95
|
-
|
96
|
-
|
97
|
-
## 1.0.1 (February 5, 2019)
|
98
|
-
|
99
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
100
|
-
|
101
|
-
|
102
|
-
## 1.0.0 (December 6, 2018)
|
103
|
-
|
104
|
-
The initialization of this repository. CKEditor 5 collaboration core was extracted from the CKEditor 5 collaboration package. It contains a plugin that supports [user handling](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/users.html) which is a common part of two collaboration features: [real-time collaboration](https://ckeditor.com/collaboration/real-time/) and [comments](https://ckeditor.com/collaboration/comments/).
|
4
|
+
All changes in the package are documented in https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
|
package/dist/index-content.css
CHANGED
@@ -229,6 +229,55 @@
|
|
229
229
|
background-color:var(--ck-color-suggestion-widget-insertion-background-active);
|
230
230
|
}
|
231
231
|
|
232
|
+
.ck-content .ck-suggestion-marker.ck-widget.ck-merge-field,
|
233
|
+
.ck-content .ck-comment-marker.ck-widget.ck-merge-field{
|
234
|
+
border-width:2px;
|
235
|
+
border-left:none;
|
236
|
+
border-right:none;
|
237
|
+
padding-top:0;
|
238
|
+
padding-bottom:0;
|
239
|
+
}
|
240
|
+
|
241
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field{
|
242
|
+
border-top-color:var(--ck-color-suggestion-marker-deletion-border);
|
243
|
+
border-bottom-color:var(--ck-color-suggestion-marker-deletion-border);
|
244
|
+
|
245
|
+
background:var(--ck-color-suggestion-marker-deletion-background);
|
246
|
+
}
|
247
|
+
|
248
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field :not(.ck-merge-field__affix),
|
249
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field.ck-merge-field_with-value,
|
250
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field.ck-merge-field_with-warning{
|
251
|
+
text-decoration:line-through;
|
252
|
+
text-decoration-color:var(--ck-color-suggestion-marker-deletion-stroke);
|
253
|
+
text-decoration-thickness:3px;
|
254
|
+
}
|
255
|
+
|
256
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field.ck-suggestion-marker--active{
|
257
|
+
background-color:var(--ck-color-suggestion-marker-deletion-background-active);
|
258
|
+
}
|
259
|
+
|
260
|
+
.ck-content .ck-suggestion-marker-insertion.ck-widget.ck-merge-field{
|
261
|
+
background-color:var(--ck-color-suggestion-marker-insertion-background);
|
262
|
+
}
|
263
|
+
|
264
|
+
.ck-content .ck-suggestion-marker-insertion.ck-widget.ck-merge-field.ck-suggestion-marker--active{
|
265
|
+
background-color:var(--ck-color-suggestion-marker-insertion-background-active);
|
266
|
+
}
|
267
|
+
|
268
|
+
.ck-content .ck-comment-marker.ck-widget.ck-merge-field{
|
269
|
+
background:var(--ck-color-comment-marker);
|
270
|
+
}
|
271
|
+
|
272
|
+
.ck-content .ck-comment-marker.ck-widget.ck-merge-field.ck-comment-marker--active{
|
273
|
+
background:var(--ck-color-comment-marker-active);
|
274
|
+
}
|
275
|
+
.ck-content span.ck-comment-marker:has(+.ck-comment-marker.ck-widget.ck-merge-field),
|
276
|
+
.ck-content span.ck-suggestion-marker:has(+.ck-suggestion-marker.ck-widget.ck-merge-field){
|
277
|
+
padding-right:1px;
|
278
|
+
margin-right:-1px;
|
279
|
+
}
|
280
|
+
|
232
281
|
.ck-content .ck-suggestion-marker-deletion.ck-widget.page-break{
|
233
282
|
background-color:var(--ck-color-suggestion-widget-deletion-background);
|
234
283
|
}
|
package/dist/index-editor.css
CHANGED
@@ -329,10 +329,28 @@
|
|
329
329
|
}
|
330
330
|
|
331
331
|
.ck .ck-suggestion-wrapper{
|
332
|
-
|
332
|
+
border-radius:0;
|
333
|
+
}
|
334
|
+
|
335
|
+
.ck-rounded-corners .ck .ck-suggestion-wrapper, .ck .ck-suggestion-wrapper.ck-rounded-corners{
|
336
|
+
border-radius:var(--ck-border-radius);
|
337
|
+
}
|
338
|
+
|
339
|
+
.ck .ck-suggestion-wrapper{
|
340
|
+
|
333
341
|
overflow:hidden;
|
334
342
|
}
|
335
343
|
|
344
|
+
.ck .ck-suggestion-wrapper:focus{
|
345
|
+
outline:var(--ck-focus-ring);
|
346
|
+
box-shadow:0 0 0 4px var(--ck-color-focus-outer-shadow);
|
347
|
+
}
|
348
|
+
.ck-balloon-panel:has( .ck-suggestion-wrapper:focus){
|
349
|
+
outline:none;
|
350
|
+
border:var(--ck-focus-ring);
|
351
|
+
box-shadow:var(--ck-drop-shadow), var(--ck-focus-outer-shadow);
|
352
|
+
}
|
353
|
+
|
336
354
|
.ck .ck-suggestion-type{
|
337
355
|
font-weight:bold;
|
338
356
|
}
|
@@ -392,6 +410,10 @@
|
|
392
410
|
--ck-color-suggestion-widget-format-background-active:hsla(191, 90%, 40%, .16);
|
393
411
|
}
|
394
412
|
|
413
|
+
.ck.ck-aria-description{
|
414
|
+
display:none;
|
415
|
+
}
|
416
|
+
|
395
417
|
:root{
|
396
418
|
--ck-color-suggestion-widget-th-insertion-background:hsla(128, 71%, 65%, .12);
|
397
419
|
--ck-color-suggestion-widget-th-insertion-background-active:hsla(128, 71%, 50%, .14);
|
package/dist/index.css
CHANGED
@@ -339,6 +339,34 @@
|
|
339
339
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
340
340
|
*/
|
341
341
|
|
342
|
+
/*
|
343
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
344
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
345
|
+
*/
|
346
|
+
|
347
|
+
/**
|
348
|
+
* A visual style of focused element's border.
|
349
|
+
*/
|
350
|
+
/*
|
351
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
352
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
353
|
+
*/
|
354
|
+
/**
|
355
|
+
* A helper to combine multiple shadows.
|
356
|
+
*/
|
357
|
+
/**
|
358
|
+
* Gives an element a drop shadow so it looks like a floating panel.
|
359
|
+
*/
|
360
|
+
/*
|
361
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
362
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
363
|
+
*/
|
364
|
+
/**
|
365
|
+
* Implements rounded corner interface for .ck-rounded-corners class.
|
366
|
+
*
|
367
|
+
* @see $ck-border-radius
|
368
|
+
*/
|
369
|
+
|
342
370
|
:root {
|
343
371
|
--ck-color-comment-box-border: hsl(55, 98%, 48%);
|
344
372
|
--ck-color-suggestion-box-deletion-border: hsl(345, 62%, 60%);
|
@@ -387,10 +415,43 @@ With track-changes feature enabled, we need to distinguish various types of anno
|
|
387
415
|
}
|
388
416
|
|
389
417
|
.ck .ck-suggestion-wrapper {
|
390
|
-
|
418
|
+
border-radius: 0;
|
419
|
+
}
|
420
|
+
|
421
|
+
.ck-rounded-corners .ck .ck-suggestion-wrapper, .ck .ck-suggestion-wrapper.ck-rounded-corners {
|
422
|
+
border-radius: var(--ck-border-radius);
|
423
|
+
}
|
424
|
+
|
425
|
+
.ck .ck-suggestion-wrapper {
|
426
|
+
|
391
427
|
overflow: hidden;
|
392
428
|
}
|
393
429
|
|
430
|
+
.ck .ck-suggestion-wrapper:focus {
|
431
|
+
/*
|
432
|
+
* We cannot use the ck-focus-ring mixin here because it adds a border that would need to stay transparent
|
433
|
+
* in non-focused state and create an odd space inside the surrounding annotation container.
|
434
|
+
*/
|
435
|
+
outline: var(--ck-focus-ring);
|
436
|
+
|
437
|
+
/*
|
438
|
+
* We cannot use the ck-box-shadow mixin because we're using outline instead of border (see the comment above).
|
439
|
+
* And the shadow size has to be custom because outline is rendered on top of the shadow.
|
440
|
+
*/
|
441
|
+
box-shadow: 0 0 0 4px var(--ck-color-focus-outer-shadow);
|
442
|
+
}
|
443
|
+
|
444
|
+
/*
|
445
|
+
* In case of inline annotations, their focus styles get hoisted to the balloon panel to work around overflow that would
|
446
|
+
* otherwise get them cropped..
|
447
|
+
*/
|
448
|
+
.ck-balloon-panel:has( .ck-suggestion-wrapper:focus ) {
|
449
|
+
/* Disable native outline. */
|
450
|
+
outline: none;
|
451
|
+
border: var(--ck-focus-ring);
|
452
|
+
box-shadow: var(--ck-drop-shadow), var(--ck-focus-outer-shadow);
|
453
|
+
}
|
454
|
+
|
394
455
|
.ck .ck-suggestion-type {
|
395
456
|
font-weight: bold;
|
396
457
|
}
|
@@ -590,6 +651,19 @@ With track-changes feature enabled, we need to distinguish various types of anno
|
|
590
651
|
box-shadow: -2px 0 0 0 var(--ck-color-base-background), -5px 0 0 0 var(--ck-color-suggestion-marker-format-border-active);
|
591
652
|
}
|
592
653
|
|
654
|
+
/*
|
655
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
656
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
657
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
658
|
+
*
|
659
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
660
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
661
|
+
*/
|
662
|
+
|
663
|
+
.ck.ck-aria-description {
|
664
|
+
display: none;
|
665
|
+
}
|
666
|
+
|
593
667
|
/*
|
594
668
|
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
595
669
|
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
@@ -711,6 +785,74 @@ With track-changes feature enabled, we need to distinguish various types of anno
|
|
711
785
|
background-color: var(--ck-color-suggestion-widget-insertion-background-active);
|
712
786
|
}
|
713
787
|
|
788
|
+
/*
|
789
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
790
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
791
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
792
|
+
*
|
793
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
794
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
795
|
+
*/
|
796
|
+
|
797
|
+
.ck-content .ck-suggestion-marker.ck-widget.ck-merge-field,
|
798
|
+
.ck-content .ck-comment-marker.ck-widget.ck-merge-field {
|
799
|
+
/* Note that comments markers have transparent border to be better aligned with suggestions markers. */
|
800
|
+
border-width: 2px;
|
801
|
+
border-left: none;
|
802
|
+
border-right: none;
|
803
|
+
padding-top: 0;
|
804
|
+
padding-bottom: 0;
|
805
|
+
}
|
806
|
+
|
807
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field {
|
808
|
+
border-top-color: var(--ck-color-suggestion-marker-deletion-border);
|
809
|
+
border-bottom-color: var(--ck-color-suggestion-marker-deletion-border);
|
810
|
+
|
811
|
+
background: var(--ck-color-suggestion-marker-deletion-background);
|
812
|
+
}
|
813
|
+
|
814
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field :not(.ck-merge-field__affix),
|
815
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field.ck-merge-field_with-value,
|
816
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field.ck-merge-field_with-warning {
|
817
|
+
text-decoration: line-through;
|
818
|
+
text-decoration-color: var(--ck-color-suggestion-marker-deletion-stroke);
|
819
|
+
text-decoration-thickness: 3px;
|
820
|
+
}
|
821
|
+
|
822
|
+
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-merge-field.ck-suggestion-marker--active {
|
823
|
+
background-color: var(--ck-color-suggestion-marker-deletion-background-active);
|
824
|
+
}
|
825
|
+
|
826
|
+
.ck-content .ck-suggestion-marker-insertion.ck-widget.ck-merge-field {
|
827
|
+
background-color: var(--ck-color-suggestion-marker-insertion-background);
|
828
|
+
}
|
829
|
+
|
830
|
+
.ck-content .ck-suggestion-marker-insertion.ck-widget.ck-merge-field.ck-suggestion-marker--active {
|
831
|
+
background-color: var(--ck-color-suggestion-marker-insertion-background-active);
|
832
|
+
}
|
833
|
+
|
834
|
+
.ck-content .ck-comment-marker.ck-widget.ck-merge-field {
|
835
|
+
background: var(--ck-color-comment-marker);
|
836
|
+
}
|
837
|
+
|
838
|
+
.ck-content .ck-comment-marker.ck-widget.ck-merge-field.ck-comment-marker--active {
|
839
|
+
background: var(--ck-color-comment-marker-active);
|
840
|
+
}
|
841
|
+
|
842
|
+
/*
|
843
|
+
This is a hack for a specific situation. The selector targets all regular markers made on text that are just before
|
844
|
+
a merge field (also in marker). This is a common situation. For example, if you have some text and a merge field
|
845
|
+
just after and all that is in a suggestion. Without this hack, there is a 1px spacing between the span and the merge
|
846
|
+
field, because the merge field has margin. The margin is needed because otherwise caret does not display. To
|
847
|
+
"remove" the spacing, we extend the span before the merge field by 1px using padding, but we need to compensate
|
848
|
+
by using negative margin, so that the whole content does not change its position.
|
849
|
+
*/
|
850
|
+
.ck-content span.ck-comment-marker:has(+.ck-comment-marker.ck-widget.ck-merge-field),
|
851
|
+
.ck-content span.ck-suggestion-marker:has(+.ck-suggestion-marker.ck-widget.ck-merge-field) {
|
852
|
+
padding-right: 1px;
|
853
|
+
margin-right: -1px;
|
854
|
+
}
|
855
|
+
|
714
856
|
/*
|
715
857
|
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
716
858
|
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
package/dist/index.d.ts
CHANGED
@@ -9,13 +9,16 @@
|
|
9
9
|
export { default as Permissions } from './permissions.js';
|
10
10
|
export { default as Users, type User } from './users.js';
|
11
11
|
export { default as UserView } from './users/view/userview.js';
|
12
|
+
export { default as AriaDescriptionView } from './suggestions/view/ariadescriptionview.js';
|
13
|
+
export { LateFocusButtonView, LateFocusDropdownButtonView } from './suggestions/view/latefocusbuttonview.js';
|
12
14
|
export { default as getDateTimeFormatter } from './utils/getdatetimeformatter.js';
|
13
15
|
export { default as getMarkerDomElement, getAllMarkersDomElementsSorted } from './utils/getmarkerdomelement.js';
|
14
16
|
export { default as trimHtml } from './utils/trim-html.js';
|
15
|
-
export { default as ConfirmMixin } from './utils/confirmmixin.js';
|
17
|
+
export { default as ConfirmMixin, type RemoveConfirmEvent } from './utils/confirmmixin.js';
|
16
18
|
export { default as hashObject } from './utils/hashobject.js';
|
17
19
|
export { default as sanitizeEditorConfig } from './utils/sanitizeEditorConfig.js';
|
18
20
|
export { default as surroundingMarkersDetector } from './utils/surroundingmarkersdetector.js';
|
21
|
+
export { default as setupThreadKeyboardNavigation, ENTER_THREAD_KEYSTROKE, type ThreadEscapeEvent, type ThreadArrowUpEvent, type ThreadArrowDownEvent } from './utils/setupthreadkeyboardnavigation.js';
|
19
22
|
export type { default as CollaborationOperation, InsertCollaborationOperation, SplitCollaborationOperation, MarkerCollaborationOperation, MoveCollaborationOperation, MergeCollaborationOperation, RootCollaborationOperation, RootAttributeCollaborationOperation } from './collaborationoperation.js';
|
20
23
|
export type { default as CollaborationHistory } from './collaborationhistory.js';
|
21
24
|
export type { LocaleConfig, RealTimeCollaborationConfig } from './config.js';
|
package/dist/index.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
import{ContextPlugin as _0x36bdaa,Editor as _0x173d87,icons as _0x4bb0e1}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x253966,Collection as _0xdbd9f7,first as _0x5864b6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x42c981,IconView as _0x23e016,ButtonView as _0x5c5a6c}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x34bd36 from'date-fns/format/index.js';import _0x215b40 from'date-fns/parseISO/index.js';import _0x163c00 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x36bdaa{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x439ece,_0x127e31){let _0x5ada82;if(_0x127e31||(_0x127e31=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x127e31?_0x5ada82=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x5ada82=this['context']['editors']['find'](_0x190301=>_0x190301['config']['get']('collaboration.channelId')==_0x127e31)),!_0x5ada82)throw new _0x253966('permissions-set-permissions-invalid-channel-id',null);const _0x54a240=_0x5ada82['plugins'],_0x3c1425=_0x54a240['has']('CommentsRepository')?_0x54a240['get']('CommentsRepository'):void 0x0,_0x5584ac=_0x54a240['has']('CommentsOnly')&&_0x54a240['get']('CommentsOnly'),_0x4a26db=_0x439ece['includes']('document:write'),_0x372ad6=_0x439ece['includes']('comment:modify_all'),_0x120f2b=_0x439ece['includes']('comment:admin'),_0x419a98=_0x439ece['includes']('comment:write'),_0x470ee7=_0x419a98||_0x120f2b,_0x2996f5=_0x470ee7||_0x372ad6,_0x354500=_0x4a26db||_0x470ee7;(_0x5584ac&&(_0x5584ac['isEnabled']=!_0x4a26db&&_0x2996f5),_0x5ada82 instanceof _0x173d87)&&(!(_0x4a26db||_0x2996f5&&_0x3c1425)?_0x5ada82['enableReadOnlyMode']('no-permissions'):_0x5ada82['disableReadOnlyMode']('no-permissions'));if(_0x3c1425){_0x3c1425['setPermissions']({'admin':_0x120f2b,'modifyAll':_0x372ad6,'write':_0x419a98,'resolve':_0x354500},_0x127e31);const _0x24efdd=_0x5ada82 instanceof _0x173d87&&_0x5ada82['commands']['get']('addCommentThread');_0x24efdd&&(_0x470ee7?_0x24efdd['clearForceDisabled']('noPermissions'):_0x24efdd['forceDisabled']('noPermissions'));}}}function r(_0x38379e,_0x1aa9a7){const t=_0x38379e['t'];switch(_0x1aa9a7){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class l extends _0x36bdaa{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x57a9f7){super(_0x57a9f7),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0xdbd9f7(),this['_locale']=_0x57a9f7['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x11d00a=this['context'];this['licenseKey']=_0x11d00a['config']['get']('licenseKey');const _0x3a421b=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xaa6ec5;for(const _0x1743c5 in _0x11d00a){const _0x4c899f=_0x11d00a[_0x1743c5];if(_0x3a421b['includes'](_0x4c899f)){delete _0x11d00a[_0x1743c5],_0xaa6ec5=_0x4c899f;break;}}if('licenseKeyInvalid'===_0xaa6ec5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x253966('invalid-license-key',null);if('licenseKeyTrial'===_0xaa6ec5&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20collaboration\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'licenseKeyTrialLimit:operations'===_0xaa6ec5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x253966('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0xaa6ec5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x253966('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0xaa6ec5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x253966('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0xaa6ec5&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x21c446,name:_0x5dc1e,..._0x553b07}){if(!_0x21c446||'string'!=typeof _0x21c446)throw new _0x253966('users-add-invalid-id');if(this['users']['has'](_0x21c446))throw new _0x253966('users-add-duplicated-id',null,{'id':_0x21c446});const _0x559d7a={..._0x553b07,'id':_0x21c446,'name':a(this['_locale'],_0x5dc1e),'color':this['_getNextColor']()};_0x559d7a['name']=a(this['_locale'],_0x559d7a['name']);const _0x12c8ec=new I(_0x559d7a);return this['users']['add'](_0x12c8ec),_0x12c8ec;}['getUser'](_0x5ba571){return this['users']['get'](_0x5ba571);}['useAnonymousUser'](){const _0x56e5f1=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x56e5f1);}['defineMe'](_0x4a818e){if(this['_myId'])throw new _0x253966('users-me-already-defined',null);const _0x475d35=this['getUser'](_0x4a818e);if(!_0x475d35)throw new _0x253966('users-me-missing-user',null);this['_myId']=_0x4a818e,_0x475d35['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x490796=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x490796&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0xc56f33=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0xc56f33,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class I{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x11ccf3){this['id']=_0x11ccf3['id'],this['color']=_0x11ccf3['color'],this['name']=_0x11ccf3['name'],this['avatar']=_0x11ccf3['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x3f8d6d=this['name']['split']('\x20');return 0x1===_0x3f8d6d['length']?this['_getInitial'](_0x3f8d6d[0x0]):this['_getInitial'](_0x3f8d6d[0x0])+this['_getInitial'](_0x3f8d6d[_0x3f8d6d['length']-0x1]);}['_getInitial'](_0x320fd3){return _0x320fd3['charAt'](0x0)['toUpperCase']();}}function a(_0x510318,_0xbba7c9=''){return''==(_0xbba7c9=_0xbba7c9['trim']())?r(_0x510318,'Anonymous'):_0xbba7c9;}class u{['_id'];constructor(_0x35a313){this['_id']=_0x35a313;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class E extends _0x42c981{['name'];['notificationView'];constructor(_0x440fa4,_0x16320f,_0x4b54ca){super(_0x440fa4),this['name']=_0x16320f['name'],this['notificationView']=null;const _0x233bb4=['ck','ck-user'],_0x2a1c51=['ck','ck-user__img'];if(_0x16320f['isAnonymous']&&_0x2a1c51['push']('ck-user__anonymous'),!_0x16320f['isAnonymous']&&_0x16320f['isMe']&&_0x233bb4['push']('ck-user_me'),_0x16320f['avatar']&&_0x2a1c51['push']('ck-user__avatar'),_0x4b54ca){const _0x5ee2d9=new _0x23e016();_0x5ee2d9['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x5ee2d9['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x4b54ca},'children':[_0x5ee2d9]};}const _0x17f39c=[{'tag':'div','attributes':{'class':_0x2a1c51,'style':{'background-image':_0x16320f['avatar']?'url(\x27'+_0x16320f['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x16320f['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name'},'children':[{'text':_0x16320f['initials']}]}];this['notificationView']&&_0x17f39c['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x233bb4,'data-user-id':_0x16320f['id']},'children':_0x17f39c});}}function j(_0x454e9d={}){if(void 0x0!==_0x454e9d['dateTimeFormat']&&'function'!=typeof _0x454e9d['dateTimeFormat'])throw new _0x253966('invalid-date-time-format');return _0x324ced=>{const _0x1ee11b='string'==typeof _0x324ced?_0x215b40(_0x324ced):_0x324ced,_0x4e2e76=new Date(),_0x433477=_0x163c00(_0x4e2e76,_0x1ee11b);return _0x454e9d['dateTimeFormat']?_0x454e9d['dateTimeFormat'](_0x1ee11b):_0x34bd36(_0x1ee11b,0x0===_0x433477?'\x27Today\x27\x20hh:mma':0x1===_0x433477?'\x27Yesterday\x27\x20hh:mma':_0x433477<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function k(_0x35aa68,_0x5a3fdb){const _0x235e08=_0x35aa68['mapper']['markerNameToElements'](_0x5a3fdb['name']);if(!_0x235e08)return null;const _0xc3a6c4=_0x5864b6(_0x235e08['values']());return _0x35aa68['view']['domConverter']['mapViewToDom'](_0xc3a6c4)||null;}function K(_0x41f531,_0x30ae64){if(0x0===_0x30ae64['length'])return null;const _0x550f3d=[],_0x592757=_0x41f531['view']['domConverter'];for(const _0x57b476 of _0x30ae64){const _0x30758a=_0x41f531['mapper']['markerNameToElements'](_0x57b476['name']);if(!_0x30758a)continue;const _0x1a17b1=Array['from'](_0x30758a)['map'](_0x1bb6b0=>_0x592757['mapViewToDom'](_0x1bb6b0))['filter'](_0x18c711=>!!_0x18c711);_0x550f3d['push'](..._0x1a17b1);}if(0x0===_0x550f3d['length'])return null;const _0x1c53b8=[];for(const _0x3abd38 of _0x550f3d){const _0x48d035=_0x3abd38['getClientRects']()['item'](0x0);_0x48d035&&_0x1c53b8['push']({'x':_0x48d035['x'],'y':_0x48d035['y'],'domElement':_0x3abd38});}return 0x0===_0x1c53b8['length']?null:(_0x1c53b8['sort']((_0x23a7eb,_0x5f5b3e)=>_0x23a7eb['y']-_0x5f5b3e['y']||_0x23a7eb['x']-_0x5f5b3e['x']),_0x1c53b8['map'](_0x492322=>_0x492322['domElement']));}function Z(_0x13913d,{limit:_0x50396c,suffix:_0x194bd7='...'}){const _0x59f151=[];let _0x1b33aa=0x0;const _0x434a26=_0x13913d['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x3aa933=0x0;_0x3aa933<_0x434a26['length'];_0x3aa933++){let _0x4ea6ef=_0x434a26[_0x3aa933];const _0x42b9dc=$(_0x4ea6ef);if(_0x4ea6ef['startsWith']('<')){if(_0x1b33aa>=_0x50396c){const _0x297151=_0x4ea6ef['match'](/[a-zA-Z]+/);if(!_0x297151){_0x434a26[_0x3aa933]='';continue;}const _0x3449dd=_0x297151[0x0];_0x4ea6ef['startsWith']('</')?(_0x59f151['length']&&(_0x4ea6ef=''),_0x59f151['pop']()):(_0x59f151['push'](_0x3449dd),_0x4ea6ef='');}}else{if(_0x1b33aa>=_0x50396c)_0x4ea6ef='';else{if(_0x1b33aa+_0x42b9dc['length']>=_0x50396c){let _0x753d01=_0x50396c-_0x1b33aa;if('\x20'===_0x42b9dc[_0x753d01-0x1])_0x753d01--;else{const _0x41ccd4=_0x42b9dc['slice'](_0x753d01)['indexOf']('\x20');-0x1!==_0x41ccd4?_0x753d01+=_0x41ccd4:_0x753d01=_0x4ea6ef['length'];}_0x4ea6ef=_0x42b9dc['slice'](0x0,_0x753d01)['join']('')+_0x194bd7,_0x1b33aa=_0x50396c;}else _0x1b33aa+=_0x42b9dc['length'];}}_0x434a26[_0x3aa933]=_0x4ea6ef;}return _0x434a26['join']('\x0a')['replace'](/\n/g,'');}function $(_0xbe14c7){const _0x34a5f3=[];for(let _0x398722=0x0;_0x398722<_0xbe14c7['length'];_0x398722++){const _0x466a2a=_0xbe14c7['substring'](_0x398722)['match'](/^&[a-z0-9#]+;/);if(_0x466a2a){const _0x664d87=_0x466a2a[0x0];_0x34a5f3['push'](_0x664d87),_0x398722+=_0x664d87['length']-0x1;}else _0x34a5f3['push'](_0xbe14c7[_0x398722]);}return _0x34a5f3;}class h extends _0x42c981{['submitView'];['cancelView'];constructor(_0x4c6b11){super(_0x4c6b11);const _0x60691=this['bindTemplate'];this['submitView']=this['_createButtonView'](_0x4c6b11,r(_0x4c6b11,'Yes'),_0x4bb0e1['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x4c6b11,r(_0x4c6b11,'No'),_0x4bb0e1['cancel'],'cancel'),this['set']('message',r(_0x4c6b11,'Are\x20you\x20sure?')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__remove-confirm']},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner'},'children':[{'tag':'p','children':[{'text':_0x60691['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['_createButtonView'](_0x7b7d75,_0x470455,_0x4eb843,_0x2bacac){const _0x1038ef=new _0x5c5a6c(_0x7b7d75);return _0x1038ef['label']=_0x470455,_0x1038ef['icon']=_0x4eb843,_0x1038ef['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x2bacac}}),_0x1038ef['on']('execute',()=>this['fire'](_0x2bacac)),_0x1038ef;}}function m(_0x4051cf){return class extends _0x4051cf{['showConfirm'](_0x51fa3e,_0x4d456c){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x51fa3e,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x4d456c['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['element']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x37d729=>this['confirmView']['on']('submit',_0x37d729));}['cancelConfirm'](){this['isConfirm']&&this['confirmView']['fire']('cancel');}['_removeConfirm'](){this['element']&&this['confirmView']&&this['confirmView']['element']&&(this['element']['focus'](),this['confirmView']['element']['remove'](),this['deregisterChild'](this['confirmView']),this['isConfirm']=!0x1,this['confirmView']['destroy'](),this['confirmView']=void 0x0);}};}function b(_0x4f33c7){let _0x7601cc=0x0,_0x3a838c=0x0;for(const _0x2e5f76 of A(_0x4f33c7))_0x7601cc=(_0x7601cc<<0x5)-_0x7601cc+_0x2e5f76,_0x7601cc|=0x0,[_0x7601cc,_0x3a838c]=[_0x3a838c,_0x7601cc];return q(_0x7601cc)+q(_0x3a838c);}function*g(_0x16cc16){null==_0x16cc16||null==_0x16cc16?yield 0x12b9b0a1:0x0===_0x16cc16||!0x1===_0x16cc16?yield 0x0:0x1===_0x16cc16||0x1==_0x16cc16?yield 0x1:Array['isArray'](_0x16cc16)?yield*function*(_0x3f6ce3){for(const _0x1229fb of _0x3f6ce3)yield*g(_0x1229fb);}(_0x16cc16):'object'==typeof _0x16cc16?yield*A(_0x16cc16):'string'==typeof _0x16cc16?yield*M(_0x16cc16):'number'==typeof _0x16cc16&&(yield _0x16cc16);}function*A(_0x2ac0e4){if(yield O('{'),_0x2ac0e4){const _0x1d85ab=Object['keys'](_0x2ac0e4)['sort']();for(const _0x2c378f of _0x1d85ab){yield*M(_0x2c378f),yield O(':');const _0x48bcde=_0x2ac0e4[_0x2c378f];yield*g(_0x48bcde);}}yield O('}');}function*M(_0xade8f9){yield O('\x22');for(const _0x200c7d of _0xade8f9)yield O(_0x200c7d);yield O('\x22');}function O(_0x451f77){return _0x451f77['charCodeAt'](0x0);}function q(_0x750599){return(_0x750599*=Math['sign'](_0x750599))['toString'](0x24);}const w=['initialData','context','toolbar','rootsAttributes'],W=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function v(_0x21ee9a,_0x3f158d,_0x3e1c8d,_0x12068a=[]){const _0x215358='string'==typeof _0x21ee9a?_0x3e1c8d['get'](_0x21ee9a)['constructor']:_0x21ee9a['prototype']['constructor'];if(_0x3f158d['has'](_0x215358))return _0x3f158d['get'](_0x215358);_0x3f158d['set'](_0x215358,!0x0);const _0x354649=[...W,..._0x12068a]['map'](_0x35de7d=>{if(_0x3e1c8d['has'](_0x35de7d))return _0x3e1c8d['get'](_0x35de7d)['constructor'];})['filter'](_0x550cb5=>_0x550cb5);if(_0x215358&&_0x354649['includes'](_0x215358))return _0x3f158d['set'](_0x215358,!0x1),!0x1;if(!_0x215358['requires'])return _0x3f158d['set'](_0x215358,!0x0),!0x0;const _0x3f5482=_0x215358['requires']['every'](_0x46e094=>v(_0x46e094,_0x3f158d,_0x3e1c8d,_0x12068a));return _0x3f158d['set'](_0x215358,_0x3f5482),_0x3f5482;}function D(_0x34406a,_0x3c5015){const _0x574210={};for(const _0x4f180c of _0x34406a['config']['names']())w['includes'](_0x4f180c)||(_0x574210[_0x4f180c]=_0x34406a['config']['get'](_0x4f180c));const _0x437394=_0x574210['plugins']||[],_0x44cb7c=_0x34406a['constructor']['builtinPlugins']||[],_0x2a0f5e=_0x437394['length']?_0x437394:_0x44cb7c,_0x23e2f1=_0x574210['extraPlugins']||[];delete _0x574210['extraPlugins'];const _0x4107c5=_0x574210['removePlugins']||[];delete _0x574210['removePlugins'];const _0xee8c9e=_0x34406a['_context']['config']['get']('plugins')||[],_0x32f2fc=_0x2a0f5e['concat'](_0x23e2f1)['concat'](_0xee8c9e)['map'](_0x32ca17=>'string'==typeof _0x32ca17?_0x44cb7c['find'](_0x3d0f1e=>_0x3d0f1e['pluginName']==_0x32ca17):_0x32ca17)['filter'](_0x3a2496=>!_0x4107c5['includes'](_0x3a2496)&&!_0x4107c5['includes'](_0x3a2496['pluginName'])),_0x13ef39=Array['from'](new Set(_0x32f2fc)),_0x219b8c=new Map();return _0x574210['plugins']=_0x13ef39['filter'](_0x1880b5=>v(_0x1880b5,_0x219b8c,_0x34406a['plugins'],_0x3c5015)),_0x574210;}function z(_0x409ca9,_0x15f68e){const _0x40c723=[];_0x409ca9['document']['selection']['on']('change:range',()=>{const _0x603472=function(_0x548daf,_0x52809b){const _0x26170b=[];for(const _0x3cf2ec of _0x548daf['markers']){const _0x2bbcb9=_0x3cf2ec['getRange']();(_0x2bbcb9['containsPosition'](_0x52809b)||_0x2bbcb9['start']['isEqual'](_0x52809b)||_0x2bbcb9['end']['isEqual'](_0x52809b))&&_0x26170b['push'](_0x3cf2ec);}return _0x26170b;}(_0x409ca9,_0x409ca9['document']['selection']['focus']),_0x3adb52=[],_0x4ecc78=[],_0x477ba2=[];for(const _0xbb7a94 of _0x40c723)_0x603472['includes'](_0xbb7a94)||_0x3adb52['push'](_0xbb7a94);for(const _0x410e4c of _0x603472)_0x40c723['includes'](_0x410e4c)||_0x4ecc78['push'](_0x410e4c),_0x477ba2['push'](_0x410e4c);(_0x3adb52['length']||_0x4ecc78['length'])&&_0x15f68e({'left':_0x3adb52,'entered':_0x4ecc78}),_0x40c723['length']=0x0,_0x40c723['push'](..._0x477ba2);});}export{m as ConfirmMixin,n as Permissions,E as UserView,l as Users,K as getAllMarkersDomElementsSorted,j as getDateTimeFormatter,k as getMarkerDomElement,b as hashObject,D as sanitizeEditorConfig,z as surroundingMarkersDetector,Z as trimHtml};
|
23
|
+
import{ContextPlugin as _0x4af4be,Editor as _0x5b34b5,icons as _0x2d6de0}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x575538,Collection as _0x55f807,uid as _0x43425e,first as _0x40991d,FocusTracker as _0x56b98a,KeystrokeHandler as _0x43f74f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x4ddc5b,IconView as _0x21418c,ButtonView as _0x341bc0,DropdownButtonView as _0x1906a1,FocusCycler as _0x5438cd,isViewWithFocusCycler as _0xc1dfaa}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x3c7dec from'date-fns/format/index.js';import _0x422f03 from'date-fns/parseISO/index.js';import _0x37f6c8 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x4af4be{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x24836c,_0xa38561){let _0x2507ff;if(_0xa38561||(_0xa38561=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0xa38561?_0x2507ff=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x2507ff=this['context']['editors']['find'](_0x178ea6=>_0x178ea6['config']['get']('collaboration.channelId')==_0xa38561)),!_0x2507ff)throw new _0x575538('permissions-set-permissions-invalid-channel-id',null);const _0x149398=_0x2507ff['plugins'],_0x495324=_0x149398['has']('CommentsRepository')?_0x149398['get']('CommentsRepository'):void 0x0,_0x2dcdb8=_0x149398['has']('CommentsOnly')&&_0x149398['get']('CommentsOnly'),_0x8ad96b=_0x24836c['includes']('document:write'),_0xe66d47=_0x24836c['includes']('comment:modify_all'),_0x4c259c=_0x24836c['includes']('comment:admin'),_0xb4b1b2=_0x24836c['includes']('comment:write'),_0x5081cf=_0xb4b1b2||_0x4c259c,_0xf7d8a7=_0x5081cf||_0xe66d47,_0x509f79=_0x8ad96b||_0x5081cf;(_0x2dcdb8&&(_0x2dcdb8['isEnabled']=!_0x8ad96b&&_0xf7d8a7),_0x2507ff instanceof _0x5b34b5)&&(!(_0x8ad96b||_0xf7d8a7&&_0x495324)?_0x2507ff['enableReadOnlyMode']('no-permissions'):_0x2507ff['disableReadOnlyMode']('no-permissions'));if(_0x495324){_0x495324['setPermissions']({'admin':_0x4c259c,'modifyAll':_0xe66d47,'write':_0xb4b1b2,'resolve':_0x509f79},_0xa38561);const _0x47940d=_0x2507ff instanceof _0x5b34b5&&_0x2507ff['commands']['get']('addCommentThread');_0x47940d&&(_0x5081cf?_0x47940d['clearForceDisabled']('noPermissions'):_0x47940d['forceDisabled']('noPermissions'));}}}function r(_0x5a0971,_0x1102c9){const t=_0x5a0971['t'];switch(_0x1102c9){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class l extends _0x4af4be{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x581df1){super(_0x581df1),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x55f807(),this['_locale']=_0x581df1['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x3fd2b1=this['context'];this['licenseKey']=_0x3fd2b1['config']['get']('licenseKey');const _0x1c4652=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x326eca;for(const _0x491cff in _0x3fd2b1){const _0x1065b0=_0x3fd2b1[_0x491cff];if(_0x1c4652['includes'](_0x1065b0)){delete _0x3fd2b1[_0x491cff],_0x326eca=_0x1065b0;break;}}if('licenseKeyInvalid'===_0x326eca)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x575538('invalid-license-key',null);if('licenseKeyTrial'===_0x326eca&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20collaboration\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'licenseKeyTrialLimit:operations'===_0x326eca)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x575538('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x326eca)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x575538('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x326eca)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x575538('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x326eca&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0xbc6d5f,name:_0x1dbb24,..._0x194c1b}){if(!_0xbc6d5f||'string'!=typeof _0xbc6d5f)throw new _0x575538('users-add-invalid-id');if(this['users']['has'](_0xbc6d5f))throw new _0x575538('users-add-duplicated-id',null,{'id':_0xbc6d5f});const _0x3a13d1={..._0x194c1b,'id':_0xbc6d5f,'name':a(this['_locale'],_0x1dbb24),'color':this['_getNextColor']()};_0x3a13d1['name']=a(this['_locale'],_0x3a13d1['name']);const _0x15751e=new N(_0x3a13d1);return this['users']['add'](_0x15751e),_0x15751e;}['getUser'](_0x478755){return this['users']['get'](_0x478755);}['useAnonymousUser'](){const _0x257985=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x257985);}['defineMe'](_0x412822){if(this['_myId'])throw new _0x575538('users-me-already-defined',null);const _0x51f019=this['getUser'](_0x412822);if(!_0x51f019)throw new _0x575538('users-me-missing-user',null);this['_myId']=_0x412822,_0x51f019['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x5342b2=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x5342b2&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0x2734e1=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x2734e1,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class N{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0xc3a44f){this['id']=_0xc3a44f['id'],this['color']=_0xc3a44f['color'],this['name']=_0xc3a44f['name'],this['avatar']=_0xc3a44f['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0xa8502d=this['name']['split']('\x20');return 0x1===_0xa8502d['length']?this['_getInitial'](_0xa8502d[0x0]):this['_getInitial'](_0xa8502d[0x0])+this['_getInitial'](_0xa8502d[_0xa8502d['length']-0x1]);}['_getInitial'](_0x24366d){return _0x24366d['charAt'](0x0)['toUpperCase']();}}function a(_0x4118fd,_0xea50f7=''){return''==(_0xea50f7=_0xea50f7['trim']())?r(_0x4118fd,'Anonymous'):_0xea50f7;}class u{['_id'];constructor(_0x53854e){this['_id']=_0x53854e;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class J extends _0x4ddc5b{['name'];['notificationView'];constructor(_0x54b7a2,_0x4e314c,_0x5bb279){super(_0x54b7a2),this['name']=_0x4e314c['name'],this['notificationView']=null;const _0x120394=['ck','ck-user'],_0x349055=['ck','ck-user__img'];if(_0x4e314c['isAnonymous']&&_0x349055['push']('ck-user__anonymous'),!_0x4e314c['isAnonymous']&&_0x4e314c['isMe']&&_0x120394['push']('ck-user_me'),_0x4e314c['avatar']&&_0x349055['push']('ck-user__avatar'),_0x5bb279){const _0x525551=new _0x21418c();_0x525551['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x525551['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x5bb279},'children':[_0x525551]};}const _0x57bceb=[{'tag':'div','attributes':{'class':_0x349055,'style':{'background-image':_0x4e314c['avatar']?'url(\x27'+_0x4e314c['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x4e314c['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x4e314c['name']},'children':[{'text':_0x4e314c['initials']}]}];this['notificationView']&&_0x57bceb['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x120394,'data-user-id':_0x4e314c['id']},'children':_0x57bceb});}}class G extends _0x4ddc5b{['id'];constructor(_0x25daab,_0x3271ac){super(_0x25daab),this['id']='ck-aria-description-'+_0x43425e(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x3271ac}]});}}class U extends _0x341bc0{['render'](){super['render'](),V(this);}}class P extends _0x1906a1{['render'](){super['render'](),V(this);}}function V(_0x31c25c){_0x31c25c['listenTo'](_0x31c25c['element'],'mousedown',(_0x375031,_0x2582a1)=>{_0x2582a1['stopPropagation'](),_0x2582a1['preventDefault']();}),_0x31c25c['listenTo'](_0x31c25c['element'],'mouseup',()=>{_0x31c25c['element']['focus']();});}function E(_0x146117={}){if(void 0x0!==_0x146117['dateTimeFormat']&&'function'!=typeof _0x146117['dateTimeFormat'])throw new _0x575538('invalid-date-time-format');return _0x2a5f77=>{const _0x4b3130='string'==typeof _0x2a5f77?_0x422f03(_0x2a5f77):_0x2a5f77,_0x422053=new Date(),_0x591ea8=_0x37f6c8(_0x422053,_0x4b3130);return _0x146117['dateTimeFormat']?_0x146117['dateTimeFormat'](_0x4b3130):_0x3c7dec(_0x4b3130,0x0===_0x591ea8?'\x27Today\x27\x20hh:mma':0x1===_0x591ea8?'\x27Yesterday\x27\x20hh:mma':_0x591ea8<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x1a6d06,_0x111e29){const _0x2937f2=_0x1a6d06['mapper']['markerNameToElements'](_0x111e29['name']);if(!_0x2937f2)return null;const _0x1e3057=_0x40991d(_0x2937f2['values']());return _0x1a6d06['view']['domConverter']['mapViewToDom'](_0x1e3057)||null;}function Y(_0x2a2c15,_0xf85cfb){if(0x0===_0xf85cfb['length'])return null;const _0x1b93e6=[],_0x2dc1ce=_0x2a2c15['view']['domConverter'];for(const _0x25d7f7 of _0xf85cfb){const _0x256baa=_0x2a2c15['mapper']['markerNameToElements'](_0x25d7f7['name']);if(!_0x256baa)continue;const _0x479c74=Array['from'](_0x256baa)['map'](_0x169e27=>_0x2dc1ce['mapViewToDom'](_0x169e27))['filter'](_0x3ebc36=>!!_0x3ebc36);_0x1b93e6['push'](..._0x479c74);}if(0x0===_0x1b93e6['length'])return null;const _0x59ccdf=[];for(const _0x44cf47 of _0x1b93e6){const _0x1c4eb1=_0x44cf47['getClientRects']()['item'](0x0);_0x1c4eb1&&_0x59ccdf['push']({'x':_0x1c4eb1['x'],'y':_0x1c4eb1['y'],'domElement':_0x44cf47});}return 0x0===_0x59ccdf['length']?null:(_0x59ccdf['sort']((_0x167752,_0x25d080)=>_0x167752['y']-_0x25d080['y']||_0x167752['x']-_0x25d080['x']),_0x59ccdf['map'](_0x3cac34=>_0x3cac34['domElement']));}function Z(_0x32910a,{limit:_0x1bb533,suffix:_0x2e7e06='...'}){const _0x39f90d=[];let _0x1516a3=0x0;const _0x431323=_0x32910a['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x351df4=0x0;_0x351df4<_0x431323['length'];_0x351df4++){let _0x49a017=_0x431323[_0x351df4];const _0x548132=$(_0x49a017);if(_0x49a017['startsWith']('<')){if(_0x1516a3>=_0x1bb533){const _0x36c374=_0x49a017['match'](/[a-zA-Z]+/);if(!_0x36c374){_0x431323[_0x351df4]='';continue;}const _0x568753=_0x36c374[0x0];_0x49a017['startsWith']('</')?(_0x39f90d['length']&&(_0x49a017=''),_0x39f90d['pop']()):(_0x39f90d['push'](_0x568753),_0x49a017='');}}else{if(_0x1516a3>=_0x1bb533)_0x49a017='';else{if(_0x1516a3+_0x548132['length']>=_0x1bb533){let _0x1bc5e9=_0x1bb533-_0x1516a3;if('\x20'===_0x548132[_0x1bc5e9-0x1])_0x1bc5e9--;else{const _0x1cb71b=_0x548132['slice'](_0x1bc5e9)['indexOf']('\x20');-0x1!==_0x1cb71b?_0x1bc5e9+=_0x1cb71b:_0x1bc5e9=_0x49a017['length'];}_0x49a017=_0x548132['slice'](0x0,_0x1bc5e9)['join']('')+_0x2e7e06,_0x1516a3=_0x1bb533;}else _0x1516a3+=_0x548132['length'];}}_0x431323[_0x351df4]=_0x49a017;}return _0x431323['join']('\x0a')['replace'](/\n/g,'');}function $(_0x40dde3){const _0x554087=[];for(let _0x42411d=0x0;_0x42411d<_0x40dde3['length'];_0x42411d++){const _0x161265=_0x40dde3['substring'](_0x42411d)['match'](/^&[a-z0-9#]+;/);if(_0x161265){const _0x253f5a=_0x161265[0x0];_0x554087['push'](_0x253f5a),_0x42411d+=_0x253f5a['length']-0x1;}else _0x554087['push'](_0x40dde3[_0x42411d]);}return _0x554087;}class h extends _0x4ddc5b{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0xad724b){super(_0xad724b);const _0x69b266=this['bindTemplate'];this['set']('message',r(_0xad724b,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0xad724b,r(_0xad724b,'Yes'),_0x2d6de0['check'],'submit'),this['cancelView']=this['_createButtonView'](_0xad724b,r(_0xad724b,'No'),_0x2d6de0['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x56b98a(),this['keystrokes']=new _0x43f74f(),this['focusCycler']=new _0x5438cd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-thread__remove-confirm'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0x69b266['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x13c367,_0x5c0eb3,_0x1b2274,_0x3bab99){const _0x4b4574=new _0x341bc0(_0x13c367);return _0x4b4574['label']=_0x5c0eb3,_0x4b4574['icon']=_0x1b2274,_0x4b4574['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x3bab99}}),_0x4b4574['on']('execute',()=>this['fire'](_0x3bab99)),_0x4b4574;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x5b7105=>{this['keystrokes']['listenTo'](_0x5b7105['element']),this['focusTracker']['add'](_0x5b7105['element']);}),this['keystrokes']['set']('esc',(_0x28c63d,_0x1635f9)=>{this['fire']('cancel'),_0x1635f9();});}}function m(_0x225fc8){return class extends _0x225fc8{['showConfirm'](_0x5095e3,_0x4a3559){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x5095e3,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x4a3559['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x78a297=>this['confirmView']['on']('submit',_0x78a297));}['cancelConfirm'](){this['isConfirm']&&this['confirmView']['fire']('cancel');}['_removeConfirm'](){this['element']&&this['confirmView']&&this['confirmView']['element']&&(this['element']['focus'](),this['confirmView']['element']['remove'](),this['deregisterChild'](this['confirmView']),this['isConfirm']=!0x1,this['fire']('removeConfirm'),this['confirmView']['destroy'](),this['confirmView']=void 0x0);}};}function M(_0x16ddc0){let _0x2dd984=0x0,_0x3a9e67=0x0;for(const _0x2c632c of q(_0x16ddc0))_0x2dd984=(_0x2dd984<<0x5)-_0x2dd984+_0x2c632c,_0x2dd984|=0x0,[_0x2dd984,_0x3a9e67]=[_0x3a9e67,_0x2dd984];return z(_0x2dd984)+z(_0x3a9e67);}function*O(_0x3e2239){null==_0x3e2239||null==_0x3e2239?yield 0x12b9b0a1:0x0===_0x3e2239||!0x1===_0x3e2239?yield 0x0:0x1===_0x3e2239||0x1==_0x3e2239?yield 0x1:Array['isArray'](_0x3e2239)?yield*function*(_0x3043f5){for(const _0x455972 of _0x3043f5)yield*O(_0x455972);}(_0x3e2239):'object'==typeof _0x3e2239?yield*q(_0x3e2239):'string'==typeof _0x3e2239?yield*v(_0x3e2239):'number'==typeof _0x3e2239&&(yield _0x3e2239);}function*q(_0x111f1a){if(yield w('{'),_0x111f1a){const _0x203d20=Object['keys'](_0x111f1a)['sort']();for(const _0x1d4f34 of _0x203d20){yield*v(_0x1d4f34),yield w(':');const _0xc9060a=_0x111f1a[_0x1d4f34];yield*O(_0xc9060a);}}yield w('}');}function*v(_0x50c63b){yield w('\x22');for(const _0x39487e of _0x50c63b)yield w(_0x39487e);yield w('\x22');}function w(_0x10c75a){return _0x10c75a['charCodeAt'](0x0);}function z(_0xa9ab48){return(_0xa9ab48*=Math['sign'](_0xa9ab48))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x2a5119,_0x23fc98,_0x12b217,_0x1a422b=[]){const _0x4a7543='string'==typeof _0x2a5119?_0x12b217['get'](_0x2a5119)['constructor']:_0x2a5119['prototype']['constructor'];if(_0x23fc98['has'](_0x4a7543))return _0x23fc98['get'](_0x4a7543);_0x23fc98['set'](_0x4a7543,!0x0);const _0x524606=[...D,..._0x1a422b]['map'](_0x3ed0db=>{if(_0x12b217['has'](_0x3ed0db))return _0x12b217['get'](_0x3ed0db)['constructor'];})['filter'](_0x1a1b17=>_0x1a1b17);if(_0x4a7543&&_0x524606['includes'](_0x4a7543))return _0x23fc98['set'](_0x4a7543,!0x1),!0x1;if(!_0x4a7543['requires'])return _0x23fc98['set'](_0x4a7543,!0x0),!0x0;const _0x45728c=_0x4a7543['requires']['every'](_0x13e11d=>S(_0x13e11d,_0x23fc98,_0x12b217,_0x1a422b));return _0x23fc98['set'](_0x4a7543,_0x45728c),_0x45728c;}function C(_0x562913,_0x2032d3){const _0x4ad213={};for(const _0x5e9804 of _0x562913['config']['names']())W['includes'](_0x5e9804)||(_0x4ad213[_0x5e9804]=_0x562913['config']['get'](_0x5e9804));const _0x3e76ce=_0x4ad213['plugins']||[],_0x42ba26=_0x562913['constructor']['builtinPlugins']||[],_0x23c04e=_0x3e76ce['length']?_0x3e76ce:_0x42ba26,_0x1a8716=_0x4ad213['extraPlugins']||[];delete _0x4ad213['extraPlugins'];const _0x3e1cd7=_0x4ad213['removePlugins']||[];delete _0x4ad213['removePlugins'];const _0x28f80d=_0x562913['_context']['config']['get']('plugins')||[],_0x163acb=_0x23c04e['concat'](_0x1a8716)['concat'](_0x28f80d)['map'](_0x547aaa=>'string'==typeof _0x547aaa?_0x42ba26['find'](_0x29aff6=>_0x29aff6['pluginName']==_0x547aaa):_0x547aaa)['filter'](_0x1f8dce=>!_0x3e1cd7['includes'](_0x1f8dce)&&!_0x3e1cd7['includes'](_0x1f8dce['pluginName'])),_0x542d73=Array['from'](new Set(_0x163acb)),_0x3d5c65=new Map();return _0x4ad213['plugins']=_0x542d73['filter'](_0x170e24=>S(_0x170e24,_0x3d5c65,_0x562913['plugins'],_0x2032d3)),_0x4ad213;}function B(_0xa95d6b,_0x2b7afc){const _0xbeafd0=[];_0xa95d6b['document']['selection']['on']('change:range',()=>{const _0x1e1f32=function(_0x179820,_0x1732f7){const _0x107dad=[];for(const _0x585aeb of _0x179820['markers']){const _0x2a8d00=_0x585aeb['getRange']();(_0x2a8d00['containsPosition'](_0x1732f7)||_0x2a8d00['start']['isEqual'](_0x1732f7)||_0x2a8d00['end']['isEqual'](_0x1732f7))&&_0x107dad['push'](_0x585aeb);}return _0x107dad;}(_0xa95d6b,_0xa95d6b['document']['selection']['focus']),_0x4177c7=[],_0x564ad9=[],_0x51e144=[];for(const _0x521c43 of _0xbeafd0)_0x1e1f32['includes'](_0x521c43)||_0x4177c7['push'](_0x521c43);for(const _0x4d3f2c of _0x1e1f32)_0xbeafd0['includes'](_0x4d3f2c)||_0x564ad9['push'](_0x4d3f2c),_0x51e144['push'](_0x4d3f2c);(_0x4177c7['length']||_0x564ad9['length'])&&_0x2b7afc({'left':_0x4177c7,'entered':_0x564ad9}),_0xbeafd0['length']=0x0,_0xbeafd0['push'](..._0x51e144);});}const Q='Ctrl+Shift+E';function T(_0x346a31,_0x455247){const _0xb82e23=_0x346a31['element'];_0x346a31['keystrokes']['listenTo'](_0xb82e23);for(const _0x2eeefd of _0x455247)K(_0x346a31,_0x2eeefd);_0x455247['on']('change',(_0x17b741,_0x161e18)=>{for(const _0xbf4f42 of _0x161e18['removed'])_(_0x346a31,_0xbf4f42);for(const _0xf0ea9f of Array['from'](_0x161e18['added'])['reverse']())K(_0x346a31,_0xf0ea9f);}),_0x346a31['keystrokes']['set']('enter',(_0x25d211,_0x170720)=>{_0xb82e23===_0x25d211['target']&&(_0x346a31['focusCycler']['focusFirst'](),_0x170720());},{'filter':_0x1d84a7=>_0x1d84a7['target']===_0xb82e23}),_0x346a31['keystrokes']['set']('esc',(_0x5856d4,_0x5b1015)=>{_0xb82e23!==_0x5856d4['target']?_0x346a31['focus']():_0x346a31['fire']('escape'),_0x5b1015();}),_0x346a31['keystrokes']['set']('arrowdown',(_0x5dea04,_0x1038f9)=>{_0xb82e23===_0x5dea04['target']&&(_0x346a31['fire']('arrowdown'),_0x1038f9());}),_0x346a31['keystrokes']['set']('arrowup',(_0x4a521f,_0x46cb68)=>{_0xb82e23===_0x4a521f['target']&&(_0x346a31['fire']('arrowup'),_0x46cb68());});}function K(_0x5977ed,_0x237bf7){_0x237bf7['isRendered']&&(_0x5977ed['focusTracker']['add'](_0x237bf7['element']),_0x5977ed['keystrokes']['listenTo'](_0x237bf7['element']),_0xc1dfaa(_0x237bf7)&&function(_0x28b28c,_0x51ae5d){const _0x1c9646=_0x28b28c['actions'],_0x4b7aec=_0x51ae5d['actions'];for(const _0x4df4ee of Object['keys'](_0x1c9646))if(_0x4df4ee in _0x4b7aec&&_0x1c9646[_0x4df4ee]!==_0x4b7aec[_0x4df4ee])return!0x1;return!0x0;}(_0x5977ed['focusCycler'],_0x237bf7['focusCycler'])&&_0x5977ed['focusCycler']['chain'](_0x237bf7['focusCycler']));}function _(_0x3d4fa9,_0x47f668){_0x3d4fa9['focusTracker']['remove'](_0x47f668['element']),_0x3d4fa9['keystrokes']['stopListening'](_0x47f668['element']),_0xc1dfaa(_0x47f668)&&_0x3d4fa9['focusCycler']['unchain'](_0x47f668['focusCycler']);}export{G as AriaDescriptionView,m as ConfirmMixin,Q as ENTER_THREAD_KEYSTROKE,U as LateFocusButtonView,P as LateFocusDropdownButtonView,n as Permissions,J as UserView,l as Users,Y as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @module collaboration-core/suggestions/view/ariadescriptionview
|
11
|
+
* @publicApi
|
12
|
+
*/
|
13
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
14
|
+
import { View } from 'ckeditor5/src/ui.js';
|
15
|
+
/**
|
16
|
+
* The view class (container) for a text referenced by a `aria-describedby` attribute.
|
17
|
+
*/
|
18
|
+
export default class AriaDescriptionView extends View {
|
19
|
+
readonly id: string;
|
20
|
+
/**
|
21
|
+
* Creates an instance of `AriaDescriptionView`.
|
22
|
+
*
|
23
|
+
* @param locale Locale instance.
|
24
|
+
* @param description Plaintext description of the element.
|
25
|
+
*/
|
26
|
+
constructor(locale: Locale, description: string);
|
27
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @module collaboration-core/suggestions/view/latefocusbuttonview
|
11
|
+
* @publicApi
|
12
|
+
*/
|
13
|
+
import { ButtonView, DropdownButtonView } from 'ckeditor5/src/ui.js';
|
14
|
+
/**
|
15
|
+
* The view class representing a button that becomes focused on `mouseup` rather than on `mousedown`.
|
16
|
+
*
|
17
|
+
* This is to delay any "on focus" actions (like e.g. activating annotation) until the user released mouse down,
|
18
|
+
* so that button related actions happen before focus related actions.
|
19
|
+
*
|
20
|
+
* Also, see {@link module:collaboration-core/suggestions/view/latefocusbuttonview~LateFocusDropdownButtonView}.
|
21
|
+
*/
|
22
|
+
export declare class LateFocusButtonView extends ButtonView {
|
23
|
+
/**
|
24
|
+
* @inheritDoc
|
25
|
+
*/
|
26
|
+
render(): void;
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* The view class representing a dropdown button that becomes focused on `mouseup` rather than on `mousedown`.
|
30
|
+
*
|
31
|
+
* This is to delay any "on focus" actions (like e.g. activating annotation) until the user released mouse key,
|
32
|
+
* so that button related actions happen before focus related actions.
|
33
|
+
*
|
34
|
+
* Also, see {@link module:collaboration-core/suggestions/view/latefocusbuttonview~LateFocusButtonView}.
|
35
|
+
*/
|
36
|
+
export declare class LateFocusDropdownButtonView extends DropdownButtonView {
|
37
|
+
/**
|
38
|
+
* @inheritDoc
|
39
|
+
*/
|
40
|
+
render(): void;
|
41
|
+
}
|
@@ -8,9 +8,11 @@
|
|
8
8
|
*/
|
9
9
|
import '../theme/suggestion.css';
|
10
10
|
import '../theme/suggestionmarker.css';
|
11
|
+
import '../theme/ariadescription.css';
|
11
12
|
import '../theme/integrations/image.css';
|
12
13
|
import '../theme/integrations/horizontalline.css';
|
13
14
|
import '../theme/integrations/mediaembed.css';
|
15
|
+
import '../theme/integrations/mergefields.css';
|
14
16
|
import '../theme/integrations/pagebreak.css';
|
15
17
|
import '../theme/integrations/table.css';
|
16
18
|
import '../theme/integrations/codeblock.css';
|
package/dist/translations/af.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
export default{'af':{'dictionary':{'Anonymous':'Anoniem','Yes':'Ja','No':'Nee','Are\x20you\x20sure?':'Is\x20jy\x20seker?'},'getPluralForm':
|
23
|
+
export default{'af':{'dictionary':{'Anonymous':'Anoniem','Yes':'Ja','No':'Nee','Are\x20you\x20sure?':'Is\x20jy\x20seker?'},'getPluralForm':_0x11dbce=>0x1!=_0x11dbce}};
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(
|
23
|
+
(_0xf76187=>{const {af:{dictionary:_0x462faa,getPluralForm:_0x2e01b3}}={'af':{'dictionary':{'Anonymous':'Anoniem','Yes':'Ja','No':'Nee','Are\x20you\x20sure?':'Is\x20jy\x20seker?'},'getPluralForm':_0x15be10=>0x1!=_0x15be10}};_0xf76187['af']||={'dictionary':{},'getPluralForm':null},_0xf76187['af']['dictionary']=Object['assign'](_0xf76187['af']['dictionary'],_0x462faa),_0xf76187['af']['getPluralForm']=_0x2e01b3;})(window['CKEDITOR_TRANSLATIONS']||={});
|
package/dist/translations/ar.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
export default{'ar':{'dictionary':{'Anonymous':'مجهول\x20الهوية','Yes':'نعم','No':'لا','Are\x20you\x20sure?':'هل\x20أنت\x20متأكد؟'},'getPluralForm':
|
23
|
+
export default{'ar':{'dictionary':{'Anonymous':'مجهول\x20الهوية','Yes':'نعم','No':'لا','Are\x20you\x20sure?':'هل\x20أنت\x20متأكد؟'},'getPluralForm':_0x94d162=>0x0==_0x94d162?0x0:0x1==_0x94d162?0x1:0x2==_0x94d162?0x2:_0x94d162%0x64>=0x3&&_0x94d162%0x64<=0xa?0x3:_0x94d162%0x64>=0xb&&_0x94d162%0x64<=0x63?0x4:0x5}};
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(
|
23
|
+
(_0x1ce3a4=>{const {ar:{dictionary:_0x4a48d3,getPluralForm:_0x4c54d6}}={'ar':{'dictionary':{'Anonymous':'مجهول\x20الهوية','Yes':'نعم','No':'لا','Are\x20you\x20sure?':'هل\x20أنت\x20متأكد؟'},'getPluralForm':_0x4c8f17=>0x0==_0x4c8f17?0x0:0x1==_0x4c8f17?0x1:0x2==_0x4c8f17?0x2:_0x4c8f17%0x64>=0x3&&_0x4c8f17%0x64<=0xa?0x3:_0x4c8f17%0x64>=0xb&&_0x4c8f17%0x64<=0x63?0x4:0x5}};_0x1ce3a4['ar']||={'dictionary':{},'getPluralForm':null},_0x1ce3a4['ar']['dictionary']=Object['assign'](_0x1ce3a4['ar']['dictionary'],_0x4a48d3),_0x1ce3a4['ar']['getPluralForm']=_0x4c54d6;})(window['CKEDITOR_TRANSLATIONS']||={});
|
package/dist/translations/az.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
export default{'az':{'dictionary':{'Anonymous':'Anonim','Yes':'','No':'','Are\x20you\x20sure?':''},'getPluralForm':
|
23
|
+
export default{'az':{'dictionary':{'Anonymous':'Anonim','Yes':'','No':'','Are\x20you\x20sure?':''},'getPluralForm':_0x326eaf=>0x1!=_0x326eaf}};
|