@ckeditor/ckeditor5-collaboration-core 42.0.2 → 43.0.0-alpha.1
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 _0x627b98,Editor as _0x5b5adb,icons as _0x171092}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x4a2c49,Collection as _0x177e64,uid as _0x4367a8,first as _0x3c694b,FocusTracker as _0x52d904,KeystrokeHandler as _0x51b31c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x4048e0,IconView as _0x576c2d,ButtonView as _0xbb6377,DropdownButtonView as _0x3ccf4f,FocusCycler as _0x20b5a7,isViewWithFocusCycler as _0x3c03a2}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x3accaa from'date-fns/format/index.js';import _0x4568e9 from'date-fns/parseISO/index.js';import _0x297093 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x627b98{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x2fd6bf,_0x120b72){let _0x2aeda4;if(_0x120b72||(_0x120b72=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x120b72?_0x2aeda4=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x2aeda4=this['context']['editors']['find'](_0x33bbd8=>_0x33bbd8['config']['get']('collaboration.channelId')==_0x120b72)),!_0x2aeda4)throw new _0x4a2c49('permissions-set-permissions-invalid-channel-id',null);const _0x167823=_0x2aeda4['plugins'],_0x172fb5=_0x167823['has']('CommentsRepository')?_0x167823['get']('CommentsRepository'):void 0x0,_0xa4b867=_0x167823['has']('CommentsOnly')&&_0x167823['get']('CommentsOnly'),_0x5d3404=_0x2fd6bf['includes']('document:write'),_0xd8921b=_0x2fd6bf['includes']('comment:modify_all'),_0x259dc7=_0x2fd6bf['includes']('comment:admin'),_0x1877b4=_0x2fd6bf['includes']('comment:write'),_0x501fb8=_0x1877b4||_0x259dc7,_0x154949=_0x501fb8||_0xd8921b,_0x57afed=_0x5d3404||_0x501fb8;(_0xa4b867&&(_0xa4b867['isEnabled']=!_0x5d3404&&_0x154949),_0x2aeda4 instanceof _0x5b5adb)&&(!(_0x5d3404||_0x154949&&_0x172fb5)?_0x2aeda4['enableReadOnlyMode']('no-permissions'):_0x2aeda4['disableReadOnlyMode']('no-permissions'));if(_0x172fb5){_0x172fb5['setPermissions']({'admin':_0x259dc7,'modifyAll':_0xd8921b,'write':_0x1877b4,'resolve':_0x57afed},_0x120b72);const _0x29fe5e=_0x2aeda4 instanceof _0x5b5adb&&_0x2aeda4['commands']['get']('addCommentThread');_0x29fe5e&&(_0x501fb8?_0x29fe5e['clearForceDisabled']('noPermissions'):_0x29fe5e['forceDisabled']('noPermissions'));}}}function r(_0x365d37,_0x5a7440){const t=_0x365d37['t'];switch(_0x5a7440){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 _0x627b98{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x17a829){super(_0x17a829),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x177e64(),this['_locale']=_0x17a829['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x30f8c0=this['context'];this['licenseKey']=_0x30f8c0['config']['get']('licenseKey');const _0x53d8ae=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3af5c5;for(const _0x43e81f in _0x30f8c0){const _0x281491=_0x30f8c0[_0x43e81f];if(_0x53d8ae['includes'](_0x281491)){delete _0x30f8c0[_0x43e81f],_0x3af5c5=_0x281491;break;}}if('licenseKeyInvalid'===_0x3af5c5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x4a2c49('invalid-license-key',null);if('licenseKeyTrial'===_0x3af5c5&&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'===_0x3af5c5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x4a2c49('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x3af5c5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x4a2c49('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x3af5c5)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x4a2c49('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x3af5c5&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x230088,name:_0x5791ee,..._0x4679d8}){if(!_0x230088||'string'!=typeof _0x230088)throw new _0x4a2c49('users-add-invalid-id');if(this['users']['has'](_0x230088))throw new _0x4a2c49('users-add-duplicated-id',null,{'id':_0x230088});const _0x552c9f={..._0x4679d8,'id':_0x230088,'name':a(this['_locale'],_0x5791ee),'color':this['_getNextColor']()};_0x552c9f['name']=a(this['_locale'],_0x552c9f['name']);const _0x38f530=new N(_0x552c9f);return this['users']['add'](_0x38f530),_0x38f530;}['getUser'](_0x54208a){return this['users']['get'](_0x54208a);}['useAnonymousUser'](){const _0x4e804f=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x4e804f);}['defineMe'](_0x43ad09){if(this['_myId'])throw new _0x4a2c49('users-me-already-defined',null);const _0x1f8313=this['getUser'](_0x43ad09);if(!_0x1f8313)throw new _0x4a2c49('users-me-missing-user',null);this['_myId']=_0x43ad09,_0x1f8313['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x255d8e=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x255d8e&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0x1b8ad5=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x1b8ad5,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class N{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x501c71){this['id']=_0x501c71['id'],this['color']=_0x501c71['color'],this['name']=_0x501c71['name'],this['avatar']=_0x501c71['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x101594=this['name']['split']('\x20');return 0x1===_0x101594['length']?this['_getInitial'](_0x101594[0x0]):this['_getInitial'](_0x101594[0x0])+this['_getInitial'](_0x101594[_0x101594['length']-0x1]);}['_getInitial'](_0x544e0c){return _0x544e0c['charAt'](0x0)['toUpperCase']();}}function a(_0x47acee,_0x4d03f1=''){return''==(_0x4d03f1=_0x4d03f1['trim']())?r(_0x47acee,'Anonymous'):_0x4d03f1;}class u{['_id'];constructor(_0x3f96d0){this['_id']=_0x3f96d0;}['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 _0x4048e0{['name'];['notificationView'];constructor(_0x7e9e70,_0x4eb7da,_0x2ce021){super(_0x7e9e70),this['name']=_0x4eb7da['name'],this['notificationView']=null;const _0x486c87=['ck','ck-user'],_0x57ac0e=['ck','ck-user__img'];if(_0x4eb7da['isAnonymous']&&_0x57ac0e['push']('ck-user__anonymous'),!_0x4eb7da['isAnonymous']&&_0x4eb7da['isMe']&&_0x486c87['push']('ck-user_me'),_0x4eb7da['avatar']&&_0x57ac0e['push']('ck-user__avatar'),_0x2ce021){const _0x526955=new _0x576c2d();_0x526955['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x526955['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':_0x2ce021},'children':[_0x526955]};}const _0xe7d723=[{'tag':'div','attributes':{'class':_0x57ac0e,'style':{'background-image':_0x4eb7da['avatar']?'url(\x27'+_0x4eb7da['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x4eb7da['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x4eb7da['name']},'children':[{'text':_0x4eb7da['initials']}]}];this['notificationView']&&_0xe7d723['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x486c87,'data-user-id':_0x4eb7da['id']},'children':_0xe7d723});}}class G extends _0x4048e0{['id'];constructor(_0x46daf4,_0x4869e8){super(_0x46daf4),this['id']='ck-aria-description-'+_0x4367a8(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x4869e8}]});}}class U extends _0xbb6377{['render'](){super['render'](),V(this);}}class P extends _0x3ccf4f{['render'](){super['render'](),V(this);}}function V(_0x2fb975){_0x2fb975['listenTo'](_0x2fb975['element'],'mousedown',(_0x28c43d,_0x3383f1)=>{_0x3383f1['stopPropagation'](),_0x3383f1['preventDefault']();}),_0x2fb975['listenTo'](_0x2fb975['element'],'mouseup',()=>{_0x2fb975['element']['focus']();});}function E(_0x4055d9={}){if(void 0x0!==_0x4055d9['dateTimeFormat']&&'function'!=typeof _0x4055d9['dateTimeFormat'])throw new _0x4a2c49('invalid-date-time-format');return _0x401206=>{const _0x2327cb='string'==typeof _0x401206?_0x4568e9(_0x401206):_0x401206,_0x227c06=new Date(),_0x221e04=_0x297093(_0x227c06,_0x2327cb);return _0x4055d9['dateTimeFormat']?_0x4055d9['dateTimeFormat'](_0x2327cb):_0x3accaa(_0x2327cb,0x0===_0x221e04?'\x27Today\x27\x20hh:mma':0x1===_0x221e04?'\x27Yesterday\x27\x20hh:mma':_0x221e04<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x5ed74e,_0x1b5e91){const _0x5592b2=_0x5ed74e['mapper']['markerNameToElements'](_0x1b5e91['name']);if(!_0x5592b2)return null;const _0x2e5a2e=_0x3c694b(_0x5592b2['values']());return _0x5ed74e['view']['domConverter']['mapViewToDom'](_0x2e5a2e)||null;}function Y(_0x2f3f2c,_0x4548e0){if(0x0===_0x4548e0['length'])return null;const _0x46694c=[],_0x44aa5c=_0x2f3f2c['view']['domConverter'];for(const _0xffd4f3 of _0x4548e0){const _0x3a633d=_0x2f3f2c['mapper']['markerNameToElements'](_0xffd4f3['name']);if(!_0x3a633d)continue;const _0x209766=Array['from'](_0x3a633d)['map'](_0x4db719=>_0x44aa5c['mapViewToDom'](_0x4db719))['filter'](_0x423101=>!!_0x423101);_0x46694c['push'](..._0x209766);}if(0x0===_0x46694c['length'])return null;const _0x5c79fe=[];for(const _0x854661 of _0x46694c){const _0x42be29=_0x854661['getClientRects']()['item'](0x0);_0x42be29&&_0x5c79fe['push']({'x':_0x42be29['x'],'y':_0x42be29['y'],'domElement':_0x854661});}return 0x0===_0x5c79fe['length']?null:(_0x5c79fe['sort']((_0xdd2bdc,_0x54d81b)=>_0xdd2bdc['y']-_0x54d81b['y']||_0xdd2bdc['x']-_0x54d81b['x']),_0x5c79fe['map'](_0x45fcb6=>_0x45fcb6['domElement']));}function Z(_0x4caf66,{limit:_0x3b78ec,suffix:_0x5a9eb5='...'}){const _0x3d34ee=[];let _0xab10f5=0x0;const _0x12a359=_0x4caf66['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x50f4f0=0x0;_0x50f4f0<_0x12a359['length'];_0x50f4f0++){let _0x4e659b=_0x12a359[_0x50f4f0];const _0x46263d=$(_0x4e659b);if(_0x4e659b['startsWith']('<')){if(_0xab10f5>=_0x3b78ec){const _0x59be72=_0x4e659b['match'](/[a-zA-Z]+/);if(!_0x59be72){_0x12a359[_0x50f4f0]='';continue;}const _0x21232b=_0x59be72[0x0];_0x4e659b['startsWith']('</')?(_0x3d34ee['length']&&(_0x4e659b=''),_0x3d34ee['pop']()):(_0x3d34ee['push'](_0x21232b),_0x4e659b='');}}else{if(_0xab10f5>=_0x3b78ec)_0x4e659b='';else{if(_0xab10f5+_0x46263d['length']>=_0x3b78ec){let _0x18e4c1=_0x3b78ec-_0xab10f5;if('\x20'===_0x46263d[_0x18e4c1-0x1])_0x18e4c1--;else{const _0x16ae08=_0x46263d['slice'](_0x18e4c1)['indexOf']('\x20');-0x1!==_0x16ae08?_0x18e4c1+=_0x16ae08:_0x18e4c1=_0x4e659b['length'];}_0x4e659b=_0x46263d['slice'](0x0,_0x18e4c1)['join']('')+_0x5a9eb5,_0xab10f5=_0x3b78ec;}else _0xab10f5+=_0x46263d['length'];}}_0x12a359[_0x50f4f0]=_0x4e659b;}return _0x12a359['join']('\x0a')['replace'](/\n/g,'');}function $(_0x1ec762){const _0x114a20=[];for(let _0x39c1f8=0x0;_0x39c1f8<_0x1ec762['length'];_0x39c1f8++){const _0x5f328f=_0x1ec762['substring'](_0x39c1f8)['match'](/^&[a-z0-9#]+;/);if(_0x5f328f){const _0x2ff95e=_0x5f328f[0x0];_0x114a20['push'](_0x2ff95e),_0x39c1f8+=_0x2ff95e['length']-0x1;}else _0x114a20['push'](_0x1ec762[_0x39c1f8]);}return _0x114a20;}class h extends _0x4048e0{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x1661b8){super(_0x1661b8);const _0xdc6d78=this['bindTemplate'];this['set']('message',r(_0x1661b8,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x1661b8,r(_0x1661b8,'Yes'),_0x171092['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x1661b8,r(_0x1661b8,'No'),_0x171092['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x52d904(),this['keystrokes']=new _0x51b31c(),this['focusCycler']=new _0x20b5a7({'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':_0xdc6d78['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'](_0x17c7ea,_0x382d25,_0x3a04cb,_0x28aaaa){const _0x58b134=new _0xbb6377(_0x17c7ea);return _0x58b134['label']=_0x382d25,_0x58b134['icon']=_0x3a04cb,_0x58b134['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x28aaaa}}),_0x58b134['on']('execute',()=>this['fire'](_0x28aaaa)),_0x58b134;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x563e64=>{this['keystrokes']['listenTo'](_0x563e64['element']),this['focusTracker']['add'](_0x563e64['element']);}),this['keystrokes']['set']('esc',(_0x3d97cf,_0x145d1b)=>{this['fire']('cancel'),_0x145d1b();});}}function m(_0x449b67){return class extends _0x449b67{['showConfirm'](_0x48efd7,_0x2fae0d){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x48efd7,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x2fae0d['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x36605e=>this['confirmView']['on']('submit',_0x36605e));}['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(_0x29436a){let _0x20cd8b=0x0,_0x28c53e=0x0;for(const _0x1206d7 of q(_0x29436a))_0x20cd8b=(_0x20cd8b<<0x5)-_0x20cd8b+_0x1206d7,_0x20cd8b|=0x0,[_0x20cd8b,_0x28c53e]=[_0x28c53e,_0x20cd8b];return z(_0x20cd8b)+z(_0x28c53e);}function*O(_0x15d901){null==_0x15d901||null==_0x15d901?yield 0x12b9b0a1:0x0===_0x15d901||!0x1===_0x15d901?yield 0x0:0x1===_0x15d901||0x1==_0x15d901?yield 0x1:Array['isArray'](_0x15d901)?yield*function*(_0x277835){for(const _0x5c742b of _0x277835)yield*O(_0x5c742b);}(_0x15d901):'object'==typeof _0x15d901?yield*q(_0x15d901):'string'==typeof _0x15d901?yield*v(_0x15d901):'number'==typeof _0x15d901&&(yield _0x15d901);}function*q(_0x3f8ce6){if(yield w('{'),_0x3f8ce6){const _0x999698=Object['keys'](_0x3f8ce6)['sort']();for(const _0x2d44a3 of _0x999698){yield*v(_0x2d44a3),yield w(':');const _0xd1add6=_0x3f8ce6[_0x2d44a3];yield*O(_0xd1add6);}}yield w('}');}function*v(_0x393d95){yield w('\x22');for(const _0x4e7587 of _0x393d95)yield w(_0x4e7587);yield w('\x22');}function w(_0x1b5b1e){return _0x1b5b1e['charCodeAt'](0x0);}function z(_0x569992){return(_0x569992*=Math['sign'](_0x569992))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x11d805,_0x493f8a,_0x87fea8,_0x25896a=[]){const _0x41bbfb='string'==typeof _0x11d805?_0x87fea8['get'](_0x11d805)['constructor']:_0x11d805['prototype']['constructor'];if(_0x493f8a['has'](_0x41bbfb))return _0x493f8a['get'](_0x41bbfb);_0x493f8a['set'](_0x41bbfb,!0x0);const _0x4428d0=[...D,..._0x25896a]['map'](_0x1fbf07=>{if(_0x87fea8['has'](_0x1fbf07))return _0x87fea8['get'](_0x1fbf07)['constructor'];})['filter'](_0x379d71=>_0x379d71);if(_0x41bbfb&&_0x4428d0['includes'](_0x41bbfb))return _0x493f8a['set'](_0x41bbfb,!0x1),!0x1;if(!_0x41bbfb['requires'])return _0x493f8a['set'](_0x41bbfb,!0x0),!0x0;const _0x21be76=_0x41bbfb['requires']['every'](_0x4c63ba=>S(_0x4c63ba,_0x493f8a,_0x87fea8,_0x25896a));return _0x493f8a['set'](_0x41bbfb,_0x21be76),_0x21be76;}function C(_0x5e486c,_0x44d34e){const _0x207c4f={};for(const _0x59e9bb of _0x5e486c['config']['names']())W['includes'](_0x59e9bb)||(_0x207c4f[_0x59e9bb]=_0x5e486c['config']['get'](_0x59e9bb));const _0x46c86b=_0x207c4f['plugins']||[],_0x3506ce=_0x5e486c['constructor']['builtinPlugins']||[],_0x4bd58d=_0x46c86b['length']?_0x46c86b:_0x3506ce,_0x2f654d=_0x207c4f['extraPlugins']||[];delete _0x207c4f['extraPlugins'];const _0x94a468=_0x207c4f['removePlugins']||[];delete _0x207c4f['removePlugins'];const _0x5133fc=_0x5e486c['_context']['config']['get']('plugins')||[],_0x20304a=_0x4bd58d['concat'](_0x2f654d)['concat'](_0x5133fc)['map'](_0xfd9ab2=>'string'==typeof _0xfd9ab2?_0x3506ce['find'](_0x49361b=>_0x49361b['pluginName']==_0xfd9ab2):_0xfd9ab2)['filter'](_0x179733=>!_0x94a468['includes'](_0x179733)&&!_0x94a468['includes'](_0x179733['pluginName'])),_0x51a152=Array['from'](new Set(_0x20304a)),_0x3d11c7=new Map();return _0x207c4f['plugins']=_0x51a152['filter'](_0x29be09=>S(_0x29be09,_0x3d11c7,_0x5e486c['plugins'],_0x44d34e)),_0x207c4f;}function B(_0x32bb6c,_0x54b848){const _0x11c7a3=[];_0x32bb6c['document']['selection']['on']('change:range',()=>{const _0x5e8c13=function(_0x25eed6,_0x345ff9){const _0x2e4d28=[];for(const _0x452054 of _0x25eed6['markers']){const _0x2f646d=_0x452054['getRange']();(_0x2f646d['containsPosition'](_0x345ff9)||_0x2f646d['start']['isEqual'](_0x345ff9)||_0x2f646d['end']['isEqual'](_0x345ff9))&&_0x2e4d28['push'](_0x452054);}return _0x2e4d28;}(_0x32bb6c,_0x32bb6c['document']['selection']['focus']),_0x3a5d84=[],_0xf00209=[],_0xd4b7b8=[];for(const _0x213ce2 of _0x11c7a3)_0x5e8c13['includes'](_0x213ce2)||_0x3a5d84['push'](_0x213ce2);for(const _0x5b1f7b of _0x5e8c13)_0x11c7a3['includes'](_0x5b1f7b)||_0xf00209['push'](_0x5b1f7b),_0xd4b7b8['push'](_0x5b1f7b);(_0x3a5d84['length']||_0xf00209['length'])&&_0x54b848({'left':_0x3a5d84,'entered':_0xf00209}),_0x11c7a3['length']=0x0,_0x11c7a3['push'](..._0xd4b7b8);});}const Q='Ctrl+Shift+E';function T(_0x6fbeeb,_0x2f3e9f){const _0x4c524c=_0x6fbeeb['element'];_0x6fbeeb['keystrokes']['listenTo'](_0x4c524c);for(const _0x21a550 of _0x2f3e9f)K(_0x6fbeeb,_0x21a550);_0x2f3e9f['on']('change',(_0x2251d3,_0xe0e2c0)=>{for(const _0x47e414 of _0xe0e2c0['removed'])_(_0x6fbeeb,_0x47e414);for(const _0x259ad2 of Array['from'](_0xe0e2c0['added'])['reverse']())K(_0x6fbeeb,_0x259ad2);}),_0x6fbeeb['keystrokes']['set']('enter',(_0x3f4950,_0x6c4158)=>{_0x4c524c===_0x3f4950['target']&&(_0x6fbeeb['focusCycler']['focusFirst'](),_0x6c4158());},{'filter':_0x473249=>_0x473249['target']===_0x4c524c}),_0x6fbeeb['keystrokes']['set']('esc',(_0x1c379b,_0x259304)=>{_0x4c524c!==_0x1c379b['target']?_0x6fbeeb['focus']():_0x6fbeeb['fire']('escape'),_0x259304();}),_0x6fbeeb['keystrokes']['set']('arrowdown',(_0x54ba6f,_0x189428)=>{_0x4c524c===_0x54ba6f['target']&&(_0x6fbeeb['fire']('arrowdown'),_0x189428());}),_0x6fbeeb['keystrokes']['set']('arrowup',(_0x300206,_0x30fe5e)=>{_0x4c524c===_0x300206['target']&&(_0x6fbeeb['fire']('arrowup'),_0x30fe5e());});}function K(_0x28a3cf,_0x2664b4){_0x2664b4['isRendered']&&(_0x28a3cf['focusTracker']['add'](_0x2664b4['element']),_0x28a3cf['keystrokes']['listenTo'](_0x2664b4['element']),_0x3c03a2(_0x2664b4)&&function(_0x4528c4,_0x421cb1){const _0x1d82d5=_0x4528c4['actions'],_0x171c62=_0x421cb1['actions'];for(const _0x5ccc4e of Object['keys'](_0x1d82d5))if(_0x5ccc4e in _0x171c62&&_0x1d82d5[_0x5ccc4e]!==_0x171c62[_0x5ccc4e])return!0x1;return!0x0;}(_0x28a3cf['focusCycler'],_0x2664b4['focusCycler'])&&_0x28a3cf['focusCycler']['chain'](_0x2664b4['focusCycler']));}function _(_0x43a8c6,_0x1f6a33){_0x43a8c6['focusTracker']['remove'](_0x1f6a33['element']),_0x43a8c6['keystrokes']['stopListening'](_0x1f6a33['element']),_0x3c03a2(_0x1f6a33)&&_0x43a8c6['focusCycler']['unchain'](_0x1f6a33['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':_0x4fb362=>0x1!=_0x4fb362}};
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(
|
23
|
+
(_0x119811=>{const {af:{dictionary:_0x876252,getPluralForm:_0x3ef0df}}={'af':{'dictionary':{'Anonymous':'Anoniem','Yes':'Ja','No':'Nee','Are\x20you\x20sure?':'Is\x20jy\x20seker?'},'getPluralForm':_0x1ed567=>0x1!=_0x1ed567}};_0x119811['af']||={'dictionary':{},'getPluralForm':null},_0x119811['af']['dictionary']=Object['assign'](_0x119811['af']['dictionary'],_0x876252),_0x119811['af']['getPluralForm']=_0x3ef0df;})(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':_0x40e5c8=>0x0==_0x40e5c8?0x0:0x1==_0x40e5c8?0x1:0x2==_0x40e5c8?0x2:_0x40e5c8%0x64>=0x3&&_0x40e5c8%0x64<=0xa?0x3:_0x40e5c8%0x64>=0xb&&_0x40e5c8%0x64<=0x63?0x4:0x5}};
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(
|
23
|
+
(_0x32d875=>{const {ar:{dictionary:_0x212f91,getPluralForm:_0x32972a}}={'ar':{'dictionary':{'Anonymous':'مجهول\x20الهوية','Yes':'نعم','No':'لا','Are\x20you\x20sure?':'هل\x20أنت\x20متأكد؟'},'getPluralForm':_0x2e7593=>0x0==_0x2e7593?0x0:0x1==_0x2e7593?0x1:0x2==_0x2e7593?0x2:_0x2e7593%0x64>=0x3&&_0x2e7593%0x64<=0xa?0x3:_0x2e7593%0x64>=0xb&&_0x2e7593%0x64<=0x63?0x4:0x5}};_0x32d875['ar']||={'dictionary':{},'getPluralForm':null},_0x32d875['ar']['dictionary']=Object['assign'](_0x32d875['ar']['dictionary'],_0x212f91),_0x32d875['ar']['getPluralForm']=_0x32972a;})(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':_0x2f36a8=>0x1!=_0x2f36a8}};
|