@ckeditor/ckeditor5-collaboration-core 42.0.2-alpha.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +1 -101
  2. package/dist/index-content.css +49 -0
  3. package/dist/index-editor.css +23 -1
  4. package/dist/index.css +143 -1
  5. package/dist/index.d.ts +4 -1
  6. package/dist/index.js +1 -1
  7. package/dist/suggestions/view/ariadescriptionview.d.ts +27 -0
  8. package/dist/suggestions/view/latefocusbuttonview.d.ts +41 -0
  9. package/dist/suggestionstyles.d.ts +2 -0
  10. package/dist/translations/af.js +1 -1
  11. package/dist/translations/af.umd.js +1 -1
  12. package/dist/translations/ar.js +1 -1
  13. package/dist/translations/ar.umd.js +1 -1
  14. package/dist/translations/az.js +1 -1
  15. package/dist/translations/az.umd.js +1 -1
  16. package/dist/translations/bg.js +1 -1
  17. package/dist/translations/bg.umd.js +1 -1
  18. package/dist/translations/bn.js +1 -1
  19. package/dist/translations/bn.umd.js +1 -1
  20. package/dist/translations/bs.js +1 -1
  21. package/dist/translations/bs.umd.js +1 -1
  22. package/dist/translations/ca.js +1 -1
  23. package/dist/translations/ca.umd.js +1 -1
  24. package/dist/translations/cs.js +1 -1
  25. package/dist/translations/cs.umd.js +1 -1
  26. package/dist/translations/da.js +1 -1
  27. package/dist/translations/da.umd.js +1 -1
  28. package/dist/translations/de-ch.js +1 -1
  29. package/dist/translations/de-ch.umd.js +1 -1
  30. package/dist/translations/de.js +1 -1
  31. package/dist/translations/de.umd.js +1 -1
  32. package/dist/translations/el.js +1 -1
  33. package/dist/translations/el.umd.js +1 -1
  34. package/dist/translations/en-au.js +1 -1
  35. package/dist/translations/en-au.umd.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/es-co.js +1 -1
  38. package/dist/translations/es-co.umd.js +1 -1
  39. package/dist/translations/es.js +1 -1
  40. package/dist/translations/es.umd.js +1 -1
  41. package/dist/translations/et.js +1 -1
  42. package/dist/translations/et.umd.js +1 -1
  43. package/dist/translations/fa.js +1 -1
  44. package/dist/translations/fa.umd.js +1 -1
  45. package/dist/translations/fi.js +1 -1
  46. package/dist/translations/fi.umd.js +1 -1
  47. package/dist/translations/fr.js +1 -1
  48. package/dist/translations/fr.umd.js +1 -1
  49. package/dist/translations/gl.js +1 -1
  50. package/dist/translations/gl.umd.js +1 -1
  51. package/dist/translations/he.js +1 -1
  52. package/dist/translations/he.umd.js +1 -1
  53. package/dist/translations/hi.js +1 -1
  54. package/dist/translations/hi.umd.js +1 -1
  55. package/dist/translations/hr.js +1 -1
  56. package/dist/translations/hr.umd.js +1 -1
  57. package/dist/translations/hu.js +1 -1
  58. package/dist/translations/hu.umd.js +1 -1
  59. package/dist/translations/id.js +1 -1
  60. package/dist/translations/id.umd.js +1 -1
  61. package/dist/translations/it.js +1 -1
  62. package/dist/translations/it.umd.js +1 -1
  63. package/dist/translations/ja.js +1 -1
  64. package/dist/translations/ja.umd.js +1 -1
  65. package/dist/translations/jv.js +1 -1
  66. package/dist/translations/jv.umd.js +1 -1
  67. package/dist/translations/ko.js +1 -1
  68. package/dist/translations/ko.umd.js +1 -1
  69. package/dist/translations/lt.js +1 -1
  70. package/dist/translations/lt.umd.js +1 -1
  71. package/dist/translations/lv.js +1 -1
  72. package/dist/translations/lv.umd.js +1 -1
  73. package/dist/translations/ms.js +1 -1
  74. package/dist/translations/ms.umd.js +1 -1
  75. package/dist/translations/nl.js +1 -1
  76. package/dist/translations/nl.umd.js +1 -1
  77. package/dist/translations/no.js +1 -1
  78. package/dist/translations/no.umd.js +1 -1
  79. package/dist/translations/pl.js +1 -1
  80. package/dist/translations/pl.umd.js +1 -1
  81. package/dist/translations/pt-br.js +1 -1
  82. package/dist/translations/pt-br.umd.js +1 -1
  83. package/dist/translations/pt.js +1 -1
  84. package/dist/translations/pt.umd.js +1 -1
  85. package/dist/translations/ro.js +1 -1
  86. package/dist/translations/ro.umd.js +1 -1
  87. package/dist/translations/ru.js +1 -1
  88. package/dist/translations/ru.umd.js +1 -1
  89. package/dist/translations/sk.js +1 -1
  90. package/dist/translations/sk.umd.js +1 -1
  91. package/dist/translations/sr-latn.js +1 -1
  92. package/dist/translations/sr-latn.umd.js +1 -1
  93. package/dist/translations/sr.js +1 -1
  94. package/dist/translations/sr.umd.js +1 -1
  95. package/dist/translations/sv.js +1 -1
  96. package/dist/translations/sv.umd.js +1 -1
  97. package/dist/translations/th.js +1 -1
  98. package/dist/translations/th.umd.js +1 -1
  99. package/dist/translations/tk.js +1 -1
  100. package/dist/translations/tk.umd.js +1 -1
  101. package/dist/translations/tr.js +1 -1
  102. package/dist/translations/tr.umd.js +1 -1
  103. package/dist/translations/tt.js +1 -1
  104. package/dist/translations/tt.umd.js +1 -1
  105. package/dist/translations/ug.js +1 -1
  106. package/dist/translations/ug.umd.js +1 -1
  107. package/dist/translations/uk.js +1 -1
  108. package/dist/translations/uk.umd.js +1 -1
  109. package/dist/translations/ur.js +1 -1
  110. package/dist/translations/ur.umd.js +1 -1
  111. package/dist/translations/vi.js +1 -1
  112. package/dist/translations/vi.umd.js +1 -1
  113. package/dist/translations/zh-cn.js +1 -1
  114. package/dist/translations/zh-cn.umd.js +1 -1
  115. package/dist/translations/zh.js +1 -1
  116. package/dist/translations/zh.umd.js +1 -1
  117. package/dist/utils/confirmmixin.d.ts +5 -1
  118. package/dist/utils/confirmview.d.ts +20 -4
  119. package/dist/utils/hashobject.d.ts +1 -1
  120. package/dist/utils/sanitizeEditorConfig.d.ts +1 -1
  121. package/dist/utils/setupthreadkeyboardnavigation.d.ts +49 -0
  122. package/dist/utils/trim-html.d.ts +3 -0
  123. package/package.json +6 -5
  124. package/src/index.d.ts +4 -1
  125. package/src/index.js +1 -1
  126. package/src/permissions.js +1 -1
  127. package/src/suggestions/view/ariadescriptionview.d.ts +23 -0
  128. package/src/suggestions/view/ariadescriptionview.js +23 -0
  129. package/src/suggestions/view/latefocusbuttonview.d.ts +37 -0
  130. package/src/suggestions/view/latefocusbuttonview.js +23 -0
  131. package/src/suggestionstyles.d.ts +2 -0
  132. package/src/suggestionstyles.js +1 -1
  133. package/src/users/view/userview.js +1 -1
  134. package/src/users.js +1 -1
  135. package/src/utils/common-translations.js +1 -1
  136. package/src/utils/confirmmixin.d.ts +5 -1
  137. package/src/utils/confirmmixin.js +1 -1
  138. package/src/utils/confirmview.d.ts +20 -4
  139. package/src/utils/confirmview.js +1 -1
  140. package/src/utils/getdatetimeformatter.js +1 -1
  141. package/src/utils/getmarkerdomelement.js +1 -1
  142. package/src/utils/hashobject.d.ts +1 -1
  143. package/src/utils/hashobject.js +1 -1
  144. package/src/utils/sanitizeEditorConfig.d.ts +1 -1
  145. package/src/utils/sanitizeEditorConfig.js +1 -1
  146. package/src/utils/setupthreadkeyboardnavigation.d.ts +45 -0
  147. package/src/utils/setupthreadkeyboardnavigation.js +23 -0
  148. package/src/utils/surroundingmarkersdetector.js +1 -1
  149. package/src/utils/trim-html.d.ts +3 -0
  150. package/src/utils/trim-html.js +1 -1
  151. package/theme/ariadescription.css +12 -0
  152. package/theme/integrations/mergefields.css +67 -0
  153. 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 at https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
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.
@@ -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
  }
@@ -329,10 +329,28 @@
329
329
  }
330
330
 
331
331
  .ck .ck-suggestion-wrapper{
332
- outline:0;
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
- outline: 0;
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 _0x4eb134,Editor as _0x365176,icons as _0x369484}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x3a49d2,Collection as _0x470e68,first as _0x180b9b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x318022,IconView as _0xf6673a,ButtonView as _0x1f00d6}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x18bc43 from'date-fns/format/index.js';import _0x2fc165 from'date-fns/parseISO/index.js';import _0x1d3036 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x4eb134{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x1f151c,_0x1be658){let _0x23d1a8;if(_0x1be658||(_0x1be658=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x1be658?_0x23d1a8=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x23d1a8=this['context']['editors']['find'](_0x104260=>_0x104260['config']['get']('collaboration.channelId')==_0x1be658)),!_0x23d1a8)throw new _0x3a49d2('permissions-set-permissions-invalid-channel-id',null);const _0x170d4c=_0x23d1a8['plugins'],_0x688330=_0x170d4c['has']('CommentsRepository')?_0x170d4c['get']('CommentsRepository'):void 0x0,_0x129dc9=_0x170d4c['has']('CommentsOnly')&&_0x170d4c['get']('CommentsOnly'),_0xb348cc=_0x1f151c['includes']('document:write'),_0x30d8da=_0x1f151c['includes']('comment:modify_all'),_0x12cd64=_0x1f151c['includes']('comment:admin'),_0x4e0bb2=_0x1f151c['includes']('comment:write'),_0x14f7a3=_0x4e0bb2||_0x12cd64,_0x39d3a3=_0x14f7a3||_0x30d8da,_0x44a305=_0xb348cc||_0x14f7a3;(_0x129dc9&&(_0x129dc9['isEnabled']=!_0xb348cc&&_0x39d3a3),_0x23d1a8 instanceof _0x365176)&&(!(_0xb348cc||_0x39d3a3&&_0x688330)?_0x23d1a8['enableReadOnlyMode']('no-permissions'):_0x23d1a8['disableReadOnlyMode']('no-permissions'));if(_0x688330){_0x688330['setPermissions']({'admin':_0x12cd64,'modifyAll':_0x30d8da,'write':_0x4e0bb2,'resolve':_0x44a305},_0x1be658);const _0x36a8d1=_0x23d1a8 instanceof _0x365176&&_0x23d1a8['commands']['get']('addCommentThread');_0x36a8d1&&(_0x14f7a3?_0x36a8d1['clearForceDisabled']('noPermissions'):_0x36a8d1['forceDisabled']('noPermissions'));}}}function r(_0x12d262,_0x4c575b){const t=_0x12d262['t'];switch(_0x4c575b){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 _0x4eb134{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x19298c){super(_0x19298c),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x470e68(),this['_locale']=_0x19298c['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x291d8d=this['context'];this['licenseKey']=_0x291d8d['config']['get']('licenseKey');const _0x2c45d5=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2b529f;for(const _0x556691 in _0x291d8d){const _0x3396a4=_0x291d8d[_0x556691];if(_0x2c45d5['includes'](_0x3396a4)){delete _0x291d8d[_0x556691],_0x2b529f=_0x3396a4;break;}}if('licenseKeyInvalid'===_0x2b529f)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3a49d2('invalid-license-key',null);if('licenseKeyTrial'===_0x2b529f&&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'===_0x2b529f)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3a49d2('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x2b529f)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3a49d2('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x2b529f)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3a49d2('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x2b529f&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x2d31af,name:_0x5cddc5,..._0x230a52}){if(!_0x2d31af||'string'!=typeof _0x2d31af)throw new _0x3a49d2('users-add-invalid-id');if(this['users']['has'](_0x2d31af))throw new _0x3a49d2('users-add-duplicated-id',null,{'id':_0x2d31af});const _0x1448a1={..._0x230a52,'id':_0x2d31af,'name':a(this['_locale'],_0x5cddc5),'color':this['_getNextColor']()};_0x1448a1['name']=a(this['_locale'],_0x1448a1['name']);const _0x4e1f6b=new I(_0x1448a1);return this['users']['add'](_0x4e1f6b),_0x4e1f6b;}['getUser'](_0x28dbaa){return this['users']['get'](_0x28dbaa);}['useAnonymousUser'](){const _0x1775f1=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x1775f1);}['defineMe'](_0x21e3a9){if(this['_myId'])throw new _0x3a49d2('users-me-already-defined',null);const _0x3f6c67=this['getUser'](_0x21e3a9);if(!_0x3f6c67)throw new _0x3a49d2('users-me-missing-user',null);this['_myId']=_0x21e3a9,_0x3f6c67['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0xf7edfe=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0xf7edfe&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0x2ddf34=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x2ddf34,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class I{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x2005ff){this['id']=_0x2005ff['id'],this['color']=_0x2005ff['color'],this['name']=_0x2005ff['name'],this['avatar']=_0x2005ff['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0xc0fad7=this['name']['split']('\x20');return 0x1===_0xc0fad7['length']?this['_getInitial'](_0xc0fad7[0x0]):this['_getInitial'](_0xc0fad7[0x0])+this['_getInitial'](_0xc0fad7[_0xc0fad7['length']-0x1]);}['_getInitial'](_0x3ef8fc){return _0x3ef8fc['charAt'](0x0)['toUpperCase']();}}function a(_0x4b893c,_0x451d93=''){return''==(_0x451d93=_0x451d93['trim']())?r(_0x4b893c,'Anonymous'):_0x451d93;}class u{['_id'];constructor(_0x45c221){this['_id']=_0x45c221;}['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 _0x318022{['name'];['notificationView'];constructor(_0xf59c83,_0x23eee7,_0x5e60cd){super(_0xf59c83),this['name']=_0x23eee7['name'],this['notificationView']=null;const _0x3f9cff=['ck','ck-user'],_0x573e7a=['ck','ck-user__img'];if(_0x23eee7['isAnonymous']&&_0x573e7a['push']('ck-user__anonymous'),!_0x23eee7['isAnonymous']&&_0x23eee7['isMe']&&_0x3f9cff['push']('ck-user_me'),_0x23eee7['avatar']&&_0x573e7a['push']('ck-user__avatar'),_0x5e60cd){const _0x4217fe=new _0xf6673a();_0x4217fe['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x4217fe['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':_0x5e60cd},'children':[_0x4217fe]};}const _0x563773=[{'tag':'div','attributes':{'class':_0x573e7a,'style':{'background-image':_0x23eee7['avatar']?'url(\x27'+_0x23eee7['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x23eee7['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name'},'children':[{'text':_0x23eee7['initials']}]}];this['notificationView']&&_0x563773['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x3f9cff,'data-user-id':_0x23eee7['id']},'children':_0x563773});}}function j(_0x47907f={}){if(void 0x0!==_0x47907f['dateTimeFormat']&&'function'!=typeof _0x47907f['dateTimeFormat'])throw new _0x3a49d2('invalid-date-time-format');return _0x26d6fa=>{const _0xc6ba9a='string'==typeof _0x26d6fa?_0x2fc165(_0x26d6fa):_0x26d6fa,_0x74dc7b=new Date(),_0x124af5=_0x1d3036(_0x74dc7b,_0xc6ba9a);return _0x47907f['dateTimeFormat']?_0x47907f['dateTimeFormat'](_0xc6ba9a):_0x18bc43(_0xc6ba9a,0x0===_0x124af5?'\x27Today\x27\x20hh:mma':0x1===_0x124af5?'\x27Yesterday\x27\x20hh:mma':_0x124af5<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function k(_0xfbc970,_0x5548ab){const _0x29ee82=_0xfbc970['mapper']['markerNameToElements'](_0x5548ab['name']);if(!_0x29ee82)return null;const _0x11594b=_0x180b9b(_0x29ee82['values']());return _0xfbc970['view']['domConverter']['mapViewToDom'](_0x11594b)||null;}function K(_0x43abe3,_0x39b810){if(0x0===_0x39b810['length'])return null;const _0x62cf88=[],_0xf500db=_0x43abe3['view']['domConverter'];for(const _0xecd33a of _0x39b810){const _0x5b1355=_0x43abe3['mapper']['markerNameToElements'](_0xecd33a['name']);if(!_0x5b1355)continue;const _0x83bd5b=Array['from'](_0x5b1355)['map'](_0x55dae2=>_0xf500db['mapViewToDom'](_0x55dae2))['filter'](_0x18a944=>!!_0x18a944);_0x62cf88['push'](..._0x83bd5b);}if(0x0===_0x62cf88['length'])return null;const _0x186ee5=[];for(const _0x361cf9 of _0x62cf88){const _0x1db69e=_0x361cf9['getClientRects']()['item'](0x0);_0x1db69e&&_0x186ee5['push']({'x':_0x1db69e['x'],'y':_0x1db69e['y'],'domElement':_0x361cf9});}return 0x0===_0x186ee5['length']?null:(_0x186ee5['sort']((_0x4ec114,_0x40f50e)=>_0x4ec114['y']-_0x40f50e['y']||_0x4ec114['x']-_0x40f50e['x']),_0x186ee5['map'](_0x307f8b=>_0x307f8b['domElement']));}function Z(_0x10bd52,{limit:_0x38ee63,suffix:_0x1865fb='...'}){const _0xb17222=[];let _0x55fdba=0x0;const _0x242ab6=_0x10bd52['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x3850f6=0x0;_0x3850f6<_0x242ab6['length'];_0x3850f6++){let _0xa6d023=_0x242ab6[_0x3850f6];const _0xf59946=$(_0xa6d023);if(_0xa6d023['startsWith']('<')){if(_0x55fdba>=_0x38ee63){const _0x538957=_0xa6d023['match'](/[a-zA-Z]+/);if(!_0x538957){_0x242ab6[_0x3850f6]='';continue;}const _0x2da154=_0x538957[0x0];_0xa6d023['startsWith']('</')?(_0xb17222['length']&&(_0xa6d023=''),_0xb17222['pop']()):(_0xb17222['push'](_0x2da154),_0xa6d023='');}}else{if(_0x55fdba>=_0x38ee63)_0xa6d023='';else{if(_0x55fdba+_0xf59946['length']>=_0x38ee63){let _0x239b58=_0x38ee63-_0x55fdba;if('\x20'===_0xf59946[_0x239b58-0x1])_0x239b58--;else{const _0x8cd5d3=_0xf59946['slice'](_0x239b58)['indexOf']('\x20');-0x1!==_0x8cd5d3?_0x239b58+=_0x8cd5d3:_0x239b58=_0xa6d023['length'];}_0xa6d023=_0xf59946['slice'](0x0,_0x239b58)['join']('')+_0x1865fb,_0x55fdba=_0x38ee63;}else _0x55fdba+=_0xf59946['length'];}}_0x242ab6[_0x3850f6]=_0xa6d023;}return _0x242ab6['join']('\x0a')['replace'](/\n/g,'');}function $(_0x17db9b){const _0x2493b9=[];for(let _0xf182af=0x0;_0xf182af<_0x17db9b['length'];_0xf182af++){const _0x552c1f=_0x17db9b['substring'](_0xf182af)['match'](/^&[a-z0-9#]+;/);if(_0x552c1f){const _0x18565a=_0x552c1f[0x0];_0x2493b9['push'](_0x18565a),_0xf182af+=_0x18565a['length']-0x1;}else _0x2493b9['push'](_0x17db9b[_0xf182af]);}return _0x2493b9;}class h extends _0x318022{['submitView'];['cancelView'];constructor(_0x5897b0){super(_0x5897b0);const _0x2635e0=this['bindTemplate'];this['submitView']=this['_createButtonView'](_0x5897b0,r(_0x5897b0,'Yes'),_0x369484['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x5897b0,r(_0x5897b0,'No'),_0x369484['cancel'],'cancel'),this['set']('message',r(_0x5897b0,'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':_0x2635e0['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['_createButtonView'](_0x1f6e36,_0x3d0121,_0x42943e,_0x18e728){const _0x585328=new _0x1f00d6(_0x1f6e36);return _0x585328['label']=_0x3d0121,_0x585328['icon']=_0x42943e,_0x585328['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x18e728}}),_0x585328['on']('execute',()=>this['fire'](_0x18e728)),_0x585328;}}function m(_0x5a3753){return class extends _0x5a3753{['showConfirm'](_0x425b3e,_0x53df4c){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x425b3e,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x53df4c['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['element']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x5b0f71=>this['confirmView']['on']('submit',_0x5b0f71));}['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(_0x2adc0d){let _0x492bf9=0x0,_0x24de45=0x0;for(const _0x42a92c of A(_0x2adc0d))_0x492bf9=(_0x492bf9<<0x5)-_0x492bf9+_0x42a92c,_0x492bf9|=0x0,[_0x492bf9,_0x24de45]=[_0x24de45,_0x492bf9];return q(_0x492bf9)+q(_0x24de45);}function*g(_0x227ba4){null==_0x227ba4||null==_0x227ba4?yield 0x12b9b0a1:0x0===_0x227ba4||!0x1===_0x227ba4?yield 0x0:0x1===_0x227ba4||0x1==_0x227ba4?yield 0x1:Array['isArray'](_0x227ba4)?yield*function*(_0xb539e){for(const _0x2b82e4 of _0xb539e)yield*g(_0x2b82e4);}(_0x227ba4):'object'==typeof _0x227ba4?yield*A(_0x227ba4):'string'==typeof _0x227ba4?yield*M(_0x227ba4):'number'==typeof _0x227ba4&&(yield _0x227ba4);}function*A(_0x4f8c09){if(yield O('{'),_0x4f8c09){const _0x23c08c=Object['keys'](_0x4f8c09)['sort']();for(const _0x327461 of _0x23c08c){yield*M(_0x327461),yield O(':');const _0x2abca3=_0x4f8c09[_0x327461];yield*g(_0x2abca3);}}yield O('}');}function*M(_0x45327b){yield O('\x22');for(const _0x14bc80 of _0x45327b)yield O(_0x14bc80);yield O('\x22');}function O(_0x7ef789){return _0x7ef789['charCodeAt'](0x0);}function q(_0x82ac78){return(_0x82ac78*=Math['sign'](_0x82ac78))['toString'](0x24);}const w=['initialData','context','toolbar','rootsAttributes'],W=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function v(_0x2c3c46,_0x3e7996,_0x43f60d,_0x4e9373=[]){const _0x61046c='string'==typeof _0x2c3c46?_0x43f60d['get'](_0x2c3c46)['constructor']:_0x2c3c46['prototype']['constructor'];if(_0x3e7996['has'](_0x61046c))return _0x3e7996['get'](_0x61046c);_0x3e7996['set'](_0x61046c,!0x0);const _0x31cf6e=[...W,..._0x4e9373]['map'](_0x3ea00c=>{if(_0x43f60d['has'](_0x3ea00c))return _0x43f60d['get'](_0x3ea00c)['constructor'];})['filter'](_0x4a4939=>_0x4a4939);if(_0x61046c&&_0x31cf6e['includes'](_0x61046c))return _0x3e7996['set'](_0x61046c,!0x1),!0x1;if(!_0x61046c['requires'])return _0x3e7996['set'](_0x61046c,!0x0),!0x0;const _0x541f74=_0x61046c['requires']['every'](_0x5e26b4=>v(_0x5e26b4,_0x3e7996,_0x43f60d,_0x4e9373));return _0x3e7996['set'](_0x61046c,_0x541f74),_0x541f74;}function D(_0x15706e,_0x1fc9c2){const _0x117451={};for(const _0x5c8eb3 of _0x15706e['config']['names']())w['includes'](_0x5c8eb3)||(_0x117451[_0x5c8eb3]=_0x15706e['config']['get'](_0x5c8eb3));const _0x453ab7=_0x117451['plugins']||[],_0x168ed3=_0x15706e['constructor']['builtinPlugins']||[],_0x1e7dc3=_0x453ab7['length']?_0x453ab7:_0x168ed3,_0x1aaf36=_0x117451['extraPlugins']||[];delete _0x117451['extraPlugins'];const _0x2d575d=_0x117451['removePlugins']||[];delete _0x117451['removePlugins'];const _0x4a0da5=_0x15706e['_context']['config']['get']('plugins')||[],_0x36eb6e=_0x1e7dc3['concat'](_0x1aaf36)['concat'](_0x4a0da5)['map'](_0x4b1916=>'string'==typeof _0x4b1916?_0x168ed3['find'](_0x3c1854=>_0x3c1854['pluginName']==_0x4b1916):_0x4b1916)['filter'](_0x3b78df=>!_0x2d575d['includes'](_0x3b78df)&&!_0x2d575d['includes'](_0x3b78df['pluginName'])),_0xa6c729=Array['from'](new Set(_0x36eb6e)),_0x2b493e=new Map();return _0x117451['plugins']=_0xa6c729['filter'](_0x2a6bad=>v(_0x2a6bad,_0x2b493e,_0x15706e['plugins'],_0x1fc9c2)),_0x117451;}function z(_0x294177,_0x178c41){const _0x12356c=[];_0x294177['document']['selection']['on']('change:range',()=>{const _0x26c02e=function(_0x1bb9fe,_0x314781){const _0x816581=[];for(const _0x2103a8 of _0x1bb9fe['markers']){const _0x2e0ab7=_0x2103a8['getRange']();(_0x2e0ab7['containsPosition'](_0x314781)||_0x2e0ab7['start']['isEqual'](_0x314781)||_0x2e0ab7['end']['isEqual'](_0x314781))&&_0x816581['push'](_0x2103a8);}return _0x816581;}(_0x294177,_0x294177['document']['selection']['focus']),_0x1522fa=[],_0x578fc2=[],_0x213020=[];for(const _0x270500 of _0x12356c)_0x26c02e['includes'](_0x270500)||_0x1522fa['push'](_0x270500);for(const _0x199bff of _0x26c02e)_0x12356c['includes'](_0x199bff)||_0x578fc2['push'](_0x199bff),_0x213020['push'](_0x199bff);(_0x1522fa['length']||_0x578fc2['length'])&&_0x178c41({'left':_0x1522fa,'entered':_0x578fc2}),_0x12356c['length']=0x0,_0x12356c['push'](..._0x213020);});}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';
@@ -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':_0x38e40e=>0x1!=_0x38e40e}};
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
- (_0x26ff3b=>{const {af:{dictionary:_0x36a0bc,getPluralForm:_0x56970d}}={'af':{'dictionary':{'Anonymous':'Anoniem','Yes':'Ja','No':'Nee','Are\x20you\x20sure?':'Is\x20jy\x20seker?'},'getPluralForm':_0x2249c5=>0x1!=_0x2249c5}};_0x26ff3b['af']||={'dictionary':{},'getPluralForm':null},_0x26ff3b['af']['dictionary']=Object['assign'](_0x26ff3b['af']['dictionary'],_0x36a0bc),_0x26ff3b['af']['getPluralForm']=_0x56970d;})(window['CKEDITOR_TRANSLATIONS']||={});
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']||={});
@@ -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':_0x1f8f31=>0x0==_0x1f8f31?0x0:0x1==_0x1f8f31?0x1:0x2==_0x1f8f31?0x2:_0x1f8f31%0x64>=0x3&&_0x1f8f31%0x64<=0xa?0x3:_0x1f8f31%0x64>=0xb&&_0x1f8f31%0x64<=0x63?0x4:0x5}};
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
- (_0x5da080=>{const {ar:{dictionary:_0x461abc,getPluralForm:_0x52188f}}={'ar':{'dictionary':{'Anonymous':'مجهول\x20الهوية','Yes':'نعم','No':'لا','Are\x20you\x20sure?':'هل\x20أنت\x20متأكد؟'},'getPluralForm':_0x744486=>0x0==_0x744486?0x0:0x1==_0x744486?0x1:0x2==_0x744486?0x2:_0x744486%0x64>=0x3&&_0x744486%0x64<=0xa?0x3:_0x744486%0x64>=0xb&&_0x744486%0x64<=0x63?0x4:0x5}};_0x5da080['ar']||={'dictionary':{},'getPluralForm':null},_0x5da080['ar']['dictionary']=Object['assign'](_0x5da080['ar']['dictionary'],_0x461abc),_0x5da080['ar']['getPluralForm']=_0x52188f;})(window['CKEDITOR_TRANSLATIONS']||={});
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']||={});
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'az':{'dictionary':{'Anonymous':'Anonim','Yes':'','No':'','Are\x20you\x20sure?':''},'getPluralForm':_0x34563f=>0x1!=_0x34563f}};
23
+ export default{'az':{'dictionary':{'Anonymous':'Anonim','Yes':'','No':'','Are\x20you\x20sure?':''},'getPluralForm':_0x326eaf=>0x1!=_0x326eaf}};