@ckeditor/ckeditor5-comments 0.0.0-internal-20241017.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +23 -0
- package/README.md +58 -0
- package/build/comments.js +5 -0
- package/build/translations/af.js +1 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es-co.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sq.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +55 -0
- package/dist/annotations/annotation.d.ts +101 -0
- package/dist/annotations/annotationcollection.d.ts +102 -0
- package/dist/annotations/annotations.d.ts +166 -0
- package/dist/annotations/annotationsuis.d.ts +244 -0
- package/dist/annotations/editorannotations.d.ts +79 -0
- package/dist/annotations/inlineannotations.d.ts +102 -0
- package/dist/annotations/narrowsidebar.d.ts +97 -0
- package/dist/annotations/sidebar.d.ts +112 -0
- package/dist/annotations/view/annotationcounterbuttonview.d.ts +33 -0
- package/dist/annotations/view/annotationview.d.ts +94 -0
- package/dist/annotations/view/sidebaritemview.d.ts +63 -0
- package/dist/annotations/view/sidebarview.d.ts +57 -0
- package/dist/annotations/widesidebar.d.ts +89 -0
- package/dist/augmentation.d.ts +56 -0
- package/dist/comments/addcommentthreadcommand.d.ts +39 -0
- package/dist/comments/commentsarchive.d.ts +43 -0
- package/dist/comments/commentsarchiveui.d.ts +50 -0
- package/dist/comments/commentsediting.d.ts +105 -0
- package/dist/comments/commentsrepository.d.ts +1137 -0
- package/dist/comments/commentsui.d.ts +49 -0
- package/dist/comments/integrations/clipboard.d.ts +30 -0
- package/dist/comments/integrations/commentsrestrictededitingmode.d.ts +21 -0
- package/dist/comments/integrations/importword.d.ts +25 -0
- package/dist/comments/ui/commenteditor/commenteditor.d.ts +40 -0
- package/dist/comments/ui/commenteditor/commenteditorui.d.ts +35 -0
- package/dist/comments/ui/commenteditor/commenteditoruiview.d.ts +40 -0
- package/dist/comments/ui/commentthreadcontroller.d.ts +68 -0
- package/dist/comments/ui/view/basecommentthreadview.d.ts +152 -0
- package/dist/comments/ui/view/basecommentview.d.ts +154 -0
- package/dist/comments/ui/view/collapsedcommentsview.d.ts +17 -0
- package/dist/comments/ui/view/commentcontentview.d.ts +18 -0
- package/dist/comments/ui/view/commentinputview.d.ts +105 -0
- package/dist/comments/ui/view/commentsarchiveview.d.ts +50 -0
- package/dist/comments/ui/view/commentslistview.d.ts +116 -0
- package/dist/comments/ui/view/commentthreadheadercontextview.d.ts +25 -0
- package/dist/comments/ui/view/commentthreadheaderview.d.ts +80 -0
- package/dist/comments/ui/view/commentthreadinputview.d.ts +60 -0
- package/dist/comments/ui/view/commentthreadview.d.ts +127 -0
- package/dist/comments/ui/view/commentview.d.ts +244 -0
- package/dist/comments.d.ts +47 -0
- package/dist/commentsonly.d.ts +45 -0
- package/dist/config.d.ts +199 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +847 -0
- package/dist/index.css +1077 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +31 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +23 -0
- package/dist/translations/af.umd.js +23 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/ar.umd.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bg.umd.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/bn.umd.js +23 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +23 -0
- package/dist/translations/bs.umd.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/ca.umd.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/cs.umd.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/da.umd.js +23 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +23 -0
- package/dist/translations/de-ch.umd.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/de.umd.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/el.umd.js +23 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +23 -0
- package/dist/translations/en-au.umd.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/en.umd.js +23 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +23 -0
- package/dist/translations/es-co.umd.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/es.umd.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/et.umd.js +23 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +23 -0
- package/dist/translations/fa.umd.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fi.umd.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/fr.umd.js +23 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +23 -0
- package/dist/translations/gl.umd.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/he.umd.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hi.umd.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hr.umd.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/hu.umd.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/id.umd.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/it.umd.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/ja.umd.js +23 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +23 -0
- package/dist/translations/jv.umd.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/ko.umd.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lt.umd.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/lv.umd.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/ms.umd.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/nl.umd.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/no.umd.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pl.umd.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt-br.umd.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/pt.umd.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ro.umd.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/ru.umd.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sk.umd.js +23 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +23 -0
- package/dist/translations/sq.umd.js +23 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +23 -0
- package/dist/translations/sr-latn.umd.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sr.umd.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/sv.umd.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/th.umd.js +23 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +23 -0
- package/dist/translations/ti.umd.js +23 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +23 -0
- package/dist/translations/tk.umd.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/tr.umd.js +23 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +23 -0
- package/dist/translations/tt.umd.js +23 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +23 -0
- package/dist/translations/ug.umd.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/uk.umd.js +23 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +23 -0
- package/dist/translations/ur.umd.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/vi.umd.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh-cn.umd.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/translations/zh.umd.js +23 -0
- package/dist/utils/common-translations.d.ts +13 -0
- package/dist/utils/createmutationobserver.d.ts +18 -0
- package/lang/contexts.json +42 -0
- package/lang/translations/af.po +182 -0
- package/lang/translations/ar.po +190 -0
- package/lang/translations/bg.po +182 -0
- package/lang/translations/bn.po +182 -0
- package/lang/translations/bs.po +184 -0
- package/lang/translations/ca.po +182 -0
- package/lang/translations/cs.po +186 -0
- package/lang/translations/da.po +182 -0
- package/lang/translations/de-ch.po +182 -0
- package/lang/translations/de.po +182 -0
- package/lang/translations/el.po +182 -0
- package/lang/translations/en-au.po +182 -0
- package/lang/translations/en.po +182 -0
- package/lang/translations/es-co.po +184 -0
- package/lang/translations/es.po +184 -0
- package/lang/translations/et.po +182 -0
- package/lang/translations/fa.po +182 -0
- package/lang/translations/fi.po +182 -0
- package/lang/translations/fr.po +184 -0
- package/lang/translations/gl.po +182 -0
- package/lang/translations/he.po +184 -0
- package/lang/translations/hi.po +182 -0
- package/lang/translations/hr.po +184 -0
- package/lang/translations/hu.po +182 -0
- package/lang/translations/id.po +180 -0
- package/lang/translations/it.po +184 -0
- package/lang/translations/ja.po +180 -0
- package/lang/translations/jv.po +180 -0
- package/lang/translations/ko.po +180 -0
- package/lang/translations/lt.po +186 -0
- package/lang/translations/lv.po +184 -0
- package/lang/translations/ms.po +180 -0
- package/lang/translations/nl.po +182 -0
- package/lang/translations/no.po +182 -0
- package/lang/translations/pl.po +186 -0
- package/lang/translations/pt-br.po +184 -0
- package/lang/translations/pt.po +184 -0
- package/lang/translations/ro.po +184 -0
- package/lang/translations/ru.po +186 -0
- package/lang/translations/sk.po +186 -0
- package/lang/translations/sq.po +182 -0
- package/lang/translations/sr-latn.po +184 -0
- package/lang/translations/sr.po +184 -0
- package/lang/translations/sv.po +182 -0
- package/lang/translations/th.po +180 -0
- package/lang/translations/ti.po +182 -0
- package/lang/translations/tk.po +182 -0
- package/lang/translations/tr.po +182 -0
- package/lang/translations/tt.po +180 -0
- package/lang/translations/ug.po +182 -0
- package/lang/translations/uk.po +186 -0
- package/lang/translations/ur.po +182 -0
- package/lang/translations/vi.po +180 -0
- package/lang/translations/zh-cn.po +180 -0
- package/lang/translations/zh.po +180 -0
- package/package.json +66 -0
- package/src/annotations/annotation.d.ts +97 -0
- package/src/annotations/annotation.js +24 -0
- package/src/annotations/annotationcollection.d.ts +98 -0
- package/src/annotations/annotationcollection.js +23 -0
- package/src/annotations/annotations.d.ts +162 -0
- package/src/annotations/annotations.js +23 -0
- package/src/annotations/annotationsuis.d.ts +240 -0
- package/src/annotations/annotationsuis.js +23 -0
- package/src/annotations/editorannotations.d.ts +75 -0
- package/src/annotations/editorannotations.js +23 -0
- package/src/annotations/inlineannotations.d.ts +98 -0
- package/src/annotations/inlineannotations.js +23 -0
- package/src/annotations/narrowsidebar.d.ts +93 -0
- package/src/annotations/narrowsidebar.js +23 -0
- package/src/annotations/sidebar.d.ts +108 -0
- package/src/annotations/sidebar.js +23 -0
- package/src/annotations/view/annotationcounterbuttonview.d.ts +29 -0
- package/src/annotations/view/annotationcounterbuttonview.js +23 -0
- package/src/annotations/view/annotationview.d.ts +90 -0
- package/src/annotations/view/annotationview.js +23 -0
- package/src/annotations/view/sidebaritemview.d.ts +59 -0
- package/src/annotations/view/sidebaritemview.js +23 -0
- package/src/annotations/view/sidebarview.d.ts +53 -0
- package/src/annotations/view/sidebarview.js +23 -0
- package/src/annotations/widesidebar.d.ts +85 -0
- package/src/annotations/widesidebar.js +23 -0
- package/src/augmentation.d.ts +52 -0
- package/src/augmentation.js +23 -0
- package/src/comments/addcommentthreadcommand.d.ts +35 -0
- package/src/comments/addcommentthreadcommand.js +23 -0
- package/src/comments/commentsarchive.d.ts +39 -0
- package/src/comments/commentsarchive.js +23 -0
- package/src/comments/commentsarchiveui.d.ts +46 -0
- package/src/comments/commentsarchiveui.js +23 -0
- package/src/comments/commentsediting.d.ts +101 -0
- package/src/comments/commentsediting.js +23 -0
- package/src/comments/commentsrepository.d.ts +1133 -0
- package/src/comments/commentsrepository.js +25 -0
- package/src/comments/commentsui.d.ts +45 -0
- package/src/comments/commentsui.js +23 -0
- package/src/comments/integrations/clipboard.d.ts +26 -0
- package/src/comments/integrations/clipboard.js +23 -0
- package/src/comments/integrations/commentsrestrictededitingmode.d.ts +17 -0
- package/src/comments/integrations/commentsrestrictededitingmode.js +23 -0
- package/src/comments/integrations/importword.d.ts +21 -0
- package/src/comments/integrations/importword.js +23 -0
- package/src/comments/ui/commenteditor/commenteditor.d.ts +36 -0
- package/src/comments/ui/commenteditor/commenteditor.js +24 -0
- package/src/comments/ui/commenteditor/commenteditorui.d.ts +31 -0
- package/src/comments/ui/commenteditor/commenteditorui.js +23 -0
- package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +36 -0
- package/src/comments/ui/commenteditor/commenteditoruiview.js +23 -0
- package/src/comments/ui/commentthreadcontroller.d.ts +64 -0
- package/src/comments/ui/commentthreadcontroller.js +24 -0
- package/src/comments/ui/view/basecommentthreadview.d.ts +148 -0
- package/src/comments/ui/view/basecommentthreadview.js +23 -0
- package/src/comments/ui/view/basecommentview.d.ts +150 -0
- package/src/comments/ui/view/basecommentview.js +23 -0
- package/src/comments/ui/view/collapsedcommentsview.d.ts +13 -0
- package/src/comments/ui/view/collapsedcommentsview.js +23 -0
- package/src/comments/ui/view/commentcontentview.d.ts +14 -0
- package/src/comments/ui/view/commentcontentview.js +23 -0
- package/src/comments/ui/view/commentinputview.d.ts +101 -0
- package/src/comments/ui/view/commentinputview.js +23 -0
- package/src/comments/ui/view/commentsarchiveview.d.ts +46 -0
- package/src/comments/ui/view/commentsarchiveview.js +23 -0
- package/src/comments/ui/view/commentslistview.d.ts +112 -0
- package/src/comments/ui/view/commentslistview.js +23 -0
- package/src/comments/ui/view/commentthreadheadercontextview.d.ts +21 -0
- package/src/comments/ui/view/commentthreadheadercontextview.js +23 -0
- package/src/comments/ui/view/commentthreadheaderview.d.ts +76 -0
- package/src/comments/ui/view/commentthreadheaderview.js +23 -0
- package/src/comments/ui/view/commentthreadinputview.d.ts +56 -0
- package/src/comments/ui/view/commentthreadinputview.js +23 -0
- package/src/comments/ui/view/commentthreadview.d.ts +123 -0
- package/src/comments/ui/view/commentthreadview.js +24 -0
- package/src/comments/ui/view/commentview.d.ts +240 -0
- package/src/comments/ui/view/commentview.js +24 -0
- package/src/comments.d.ts +43 -0
- package/src/comments.js +23 -0
- package/src/commentsonly.d.ts +41 -0
- package/src/commentsonly.js +23 -0
- package/src/config.d.ts +195 -0
- package/src/config.js +23 -0
- package/src/index.d.ts +28 -0
- package/src/index.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/src/utils/createmutationobserver.d.ts +14 -0
- package/src/utils/createmutationobserver.js +23 -0
- package/theme/annotation-inline.css +50 -0
- package/theme/annotation.css +151 -0
- package/theme/comment.css +179 -0
- package/theme/commentinput.css +96 -0
- package/theme/commentmarker.css +45 -0
- package/theme/commentsarchive.css +49 -0
- package/theme/commentthread.css +292 -0
- package/theme/icons/add-comment.svg +11 -0
- package/theme/icons/comments-archive.svg +11 -0
- package/theme/icons/edit-comment.svg +11 -0
- package/theme/icons/remove-comment.svg +11 -0
- package/theme/icons/undo.svg +1 -0
- package/theme/sidebar-narrow.css +91 -0
- package/theme/sidebar.css +72 -0
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
* @module comments/annotations/narrowsidebar
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
|
|
11
|
+
import Sidebar from './sidebar.js';
|
|
12
|
+
import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui.js';
|
|
13
|
+
import '../../theme/sidebar-narrow.css';
|
|
14
|
+
import type Annotation from './annotation.js';
|
|
15
|
+
import type { default as AnnotationCollection } from './annotationcollection.js';
|
|
16
|
+
/**
|
|
17
|
+
* The narrow sidebar UI for displaying annotations.
|
|
18
|
+
*
|
|
19
|
+
* Binds {@link module:comments/annotations/annotations~Annotations} plugin with
|
|
20
|
+
* {@link module:comments/annotations/sidebar~Sidebar} plugin to display annotations in the sidebar as
|
|
21
|
+
* {@link module:comments/annotations/view/annotationcounterbuttonview~AnnotationCounterButtonView small icons}.
|
|
22
|
+
*
|
|
23
|
+
* After selecting an annotation the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} with an
|
|
24
|
+
* {@link module:comments/annotations/view/annotationview~AnnotationView} appears attached to the sidebar item.
|
|
25
|
+
*
|
|
26
|
+
* This UI is intended for medium-sized viewports.
|
|
27
|
+
*
|
|
28
|
+
* To activate this UI use one of the following:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* editor.plugins.get( 'AnnotationsUIs' ).switchTo( 'narrowSidebar' );
|
|
32
|
+
* editor.plugins.get( 'AnnotationsUIs' ).activate( 'narrowSidebar', filter );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* See {@link module:comments/annotations/annotationsuis~AnnotationsUIs}.
|
|
36
|
+
*/
|
|
37
|
+
export default class NarrowSidebar extends ContextPlugin implements AnnotationsUI<ContextPlugin> {
|
|
38
|
+
/**
|
|
39
|
+
* An active annotation tracked by this UI.
|
|
40
|
+
*/
|
|
41
|
+
activeAnnotation: Annotation | null;
|
|
42
|
+
bodyCollection: BodyCollection;
|
|
43
|
+
balloonPanelView: BalloonPanelView;
|
|
44
|
+
isAttached: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A collection of annotations controlled by this UI.
|
|
47
|
+
*
|
|
48
|
+
* This property is readonly and should not be operated on directly. Use it only to read which annotations are added to this UI.
|
|
49
|
+
*
|
|
50
|
+
* It is set to `null` if `NarrowSidebar` is not {@link module:comments/annotations/narrowsidebar~NarrowSidebar#attach attached}.
|
|
51
|
+
*/
|
|
52
|
+
annotations: AnnotationCollection | null;
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
static get requires(): readonly [typeof Sidebar, typeof AnnotationsUIs];
|
|
57
|
+
/**
|
|
58
|
+
* @inheritDoc
|
|
59
|
+
*/
|
|
60
|
+
static get pluginName(): "NarrowSidebar";
|
|
61
|
+
/**
|
|
62
|
+
* @inheritDoc
|
|
63
|
+
*/
|
|
64
|
+
static get isOfficialPlugin(): true;
|
|
65
|
+
/**
|
|
66
|
+
* @inheritDoc
|
|
67
|
+
*/
|
|
68
|
+
static get isPremiumPlugin(): true;
|
|
69
|
+
/**
|
|
70
|
+
* @inheritDoc
|
|
71
|
+
*/
|
|
72
|
+
constructor(context: Context | Editor);
|
|
73
|
+
/**
|
|
74
|
+
* @inheritDoc
|
|
75
|
+
*/
|
|
76
|
+
init(): void;
|
|
77
|
+
/**
|
|
78
|
+
* @inheritDoc
|
|
79
|
+
*/
|
|
80
|
+
attach(annotations: AnnotationCollection): void;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the active annotation for this UI.
|
|
83
|
+
*/
|
|
84
|
+
setActiveAnnotation(annotation: Annotation | null): void;
|
|
85
|
+
/**
|
|
86
|
+
* @inheritDoc
|
|
87
|
+
*/
|
|
88
|
+
detach(): void;
|
|
89
|
+
/**
|
|
90
|
+
* @inheritDoc
|
|
91
|
+
*/
|
|
92
|
+
destroy(): void;
|
|
93
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x45a80e=_0x381c;(function(_0x814afd,_0x5e7c5b){const _0x55b56a=_0x381c,_0x462d4c=_0x814afd();while(!![]){try{const _0x8547fb=-parseInt(_0x55b56a(0x1b2))/0x1+parseInt(_0x55b56a(0x1c0))/0x2*(-parseInt(_0x55b56a(0x1db))/0x3)+parseInt(_0x55b56a(0x177))/0x4+parseInt(_0x55b56a(0x1a2))/0x5+parseInt(_0x55b56a(0x16e))/0x6*(parseInt(_0x55b56a(0x1cc))/0x7)+-parseInt(_0x55b56a(0x172))/0x8+parseInt(_0x55b56a(0x1c2))/0x9;if(_0x8547fb===_0x5e7c5b)break;else _0x462d4c['push'](_0x462d4c['shift']());}catch(_0x5331b7){_0x462d4c['push'](_0x462d4c['shift']());}}}(_0x5415,0x2ec6c));import{ContextPlugin as _0x4c9d5f,Context as _0x3a77f5}from'ckeditor5/src/core.js';import _0x430ab2 from'./annotationsuis.js';import _0x2a2e93 from'./sidebar.js';function _0x5415(){const _0x31eb15=['_annotations','mousedown','_detachListeners','getOrderedSelectedAnnotations','isVisible','resize','find','_attachToContainer','24zyKRwK','listenTo','989343ZkyYgi','get','_refreshPositioningDebounced','annotations','length','_updateBalloonPosition','narrowSidebar','type','create','clear','46291qWasxY','focus','narrowsidebar-detach-not-attached','from','northArrowSouth','_showBalloon','add','refreshPositioning','_manuallyClosedAnnotationViews','locale','uiUpdate','getSidebarItemView','southArrowNorth','addAnnotation','element','48261qlVGBj','values','annotationType','cancel','includes','Esc','has','destroy','execute','isOfficialPlugin','keyCode','removeEventListener','attachToDom','contains','138JRLVKa','refresh','bodyCollection','getByView','1946480uumZsm','_domEmitter','detach','pluginName','esc','348644NHsGjA','setActiveAnnotation','remove','stopListening','hasDomSelection','bind','detachFromDom','requires','ready','stop','southArrowNorthEast','keydown','isDirty','preventDefault','low','init','preventClosingBalloon','number','register','EditorAnnotations','_destroyEditorAnnotationsIntegration','isAttached','off','content','activeAnnotation','pin','attach','change:height','high','defaultPositions','view','stopPropagation','northArrowSouthWest','unpin','_editorAnnotations','balloonPanelView','blur','editors','southArrowNorthWest','focusableElements','context','_attachListeners','addEventListener','1582385xnXCrY','narrowsidebar-attach-already-attached','target','_selectedAnnotations','isPremiumPlugin','NarrowSidebar','first','plugins','_detachFromContainer','change:container','rearrange','_annotationToNarrowView','set','northArrowSouthEast','_integrateWithEditorAnnotations','_hideBalloon','37714OnXYMz','set:container','delete','_refreshPositioning','_setSelectedAnnotations','ck-sidebar--narrow'];_0x5415=function(){return _0x31eb15;};return _0x5415();}import _0x4e3e08 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x26c7c2,BodyCollection as _0x536f24}from'ckeditor5/src/ui.js';import{CKEditorError as _0x1227cc,DomEmitterMixin as _0x181334,keyCodes as _0x20f7d2,Collection as _0xb25588}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x2a9029}from'lodash-es';function _0x381c(_0x4f5a76,_0xac402a){const _0x54150a=_0x5415();return _0x381c=function(_0x381c3a,_0x3c3791){_0x381c3a=_0x381c3a-0x16a;let _0x58f6c6=_0x54150a[_0x381c3a];return _0x58f6c6;},_0x381c(_0x4f5a76,_0xac402a);}export default class n extends _0x4c9d5f{static get[_0x45a80e(0x17e)](){return[_0x2a2e93,_0x430ab2];}static get[_0x45a80e(0x175)](){const _0x38ab24=_0x45a80e;return _0x38ab24(0x1a7);}static get[_0x45a80e(0x1e4)](){return!0x0;}static get[_0x45a80e(0x1a6)](){return!0x0;}constructor(_0x32dfff){const _0x8b924b=_0x45a80e;super(_0x32dfff),this[_0x8b924b(0x18c)]=!0x1,this[_0x8b924b(0x1d4)]=new Set(),this[_0x8b924b(0x173)]=Object[_0x8b924b(0x1ca)](_0x181334),this[_0x8b924b(0x1ad)]=new Map(),this[_0x8b924b(0x1ae)](_0x8b924b(0x18f),null),this[_0x8b924b(0x1c5)]=null,this[_0x8b924b(0x1a5)]=[],this[_0x8b924b(0x199)]=new _0xb25588(),this[_0x8b924b(0x1c4)]=_0x2a9029(()=>{const _0x4f1fbe=_0x8b924b;this[_0x4f1fbe(0x1b5)]();},0xfa,{'leading':!0x1});}[_0x45a80e(0x186)](){const _0x2274c8=_0x45a80e;this[_0x2274c8(0x19f)][_0x2274c8(0x1a9)][_0x2274c8(0x1c3)](_0x430ab2)[_0x2274c8(0x189)](_0x2274c8(0x1c8),this),this[_0x2274c8(0x170)]=new _0x536f24(this[_0x2274c8(0x19f)][_0x2274c8(0x1d5)]),this[_0x2274c8(0x19a)]=new _0x26c7c2(this[_0x2274c8(0x19f)][_0x2274c8(0x1d5)]),this[_0x2274c8(0x170)][_0x2274c8(0x16c)](),this[_0x2274c8(0x170)][_0x2274c8(0x1d2)](this[_0x2274c8(0x19a)]);}[_0x45a80e(0x191)](_0x27ba23){const _0x316369=_0x45a80e;this[_0x316369(0x1c5)]=_0x27ba23;const _0x295914=this[_0x316369(0x19f)][_0x316369(0x1a9)][_0x316369(0x1c3)](_0x2a2e93),_0x27fcda=this[_0x316369(0x19a)];if(_0x295914[_0x316369(0x1b8)]=_0x27ba23,this[_0x316369(0x18c)])throw new _0x1227cc(_0x316369(0x1a3),this);this[_0x316369(0x18c)]=!0x0,this[_0x316369(0x1c1)](_0x295914,_0x316369(0x1b3),()=>{const _0xe83304=_0x316369;this[_0xe83304(0x174)](),this[_0xe83304(0x1c1)](_0x295914,_0xe83304(0x1ab),_0x414b87=>{const _0x1e0770=_0xe83304;_0x414b87[_0x1e0770(0x18d)](),this[_0x1e0770(0x191)](_0x27ba23);});}),_0x295914[_0x316369(0x1bf)]({'viewClass':_0x316369(0x1b7),'spaceBetweenItems':0x5});const _0x643e37=_0x155065=>{const _0x27066e=_0x316369,_0x57812c=new _0x4e3e08(this[_0x27066e(0x19f)][_0x27066e(0x1d5)]);_0x295914[_0x27066e(0x1d9)](_0x155065,_0x57812c),this[_0x27066e(0x1ad)][_0x27066e(0x1ae)](_0x155065,_0x57812c),_0x57812c[_0x27066e(0x17c)](_0x27066e(0x183),_0x27066e(0x1dd),_0x27066e(0x188))['to'](_0x155065[_0x27066e(0x195)],_0x27066e(0x183),_0x27066e(0x1c9),_0x27066e(0x1c6)),_0x57812c['on'](_0x27066e(0x1e3),()=>{const _0x58c714=_0x27066e;this[_0x58c714(0x1d4)][_0x58c714(0x1cb)](),_0x27fcda[_0x58c714(0x18e)][_0x58c714(0x1a8)]!==_0x155065[_0x58c714(0x195)]?(this[_0x58c714(0x1d1)](_0x155065),_0x155065[_0x58c714(0x195)][_0x58c714(0x1da)][_0x58c714(0x1cd)](),this[_0x58c714(0x178)](_0x155065)):this[_0x58c714(0x178)](null);});};for(const _0x4ff7fc of _0x27ba23)_0x643e37(_0x4ff7fc);this[_0x316369(0x1c1)](_0x27ba23,_0x316369(0x1d2),(_0x5ce866,_0x514b3c)=>{_0x643e37(_0x514b3c);}),this[_0x316369(0x1c1)](_0x27ba23,_0x316369(0x179),(_0x7973dd,_0xe9d7cf,_0x394d52)=>{const _0x3ea72a=_0x316369;this[_0x3ea72a(0x1ad)][_0x3ea72a(0x1c3)](_0xe9d7cf)[_0x3ea72a(0x1e2)](),this[_0x3ea72a(0x1ad)][_0x3ea72a(0x1b4)](_0xe9d7cf),_0x295914[_0x3ea72a(0x1ac)]({'removedAnnotation':_0xe9d7cf,'previousAnnotation':_0x27ba23[_0x3ea72a(0x1c3)](_0x394d52-0x1),'nextAnnotation':_0x27ba23[_0x3ea72a(0x1c3)](_0x394d52+0x1)}),_0xe9d7cf===this[_0x3ea72a(0x18f)]&&this[_0x3ea72a(0x178)](null);},{'priority':_0x316369(0x185)}),this[_0x316369(0x1c1)](_0x27ba23,_0x316369(0x1cd),(_0x5228f3,_0x24e87e)=>{const _0x4e2ac3=_0x316369;this[_0x4e2ac3(0x178)](_0x24e87e);}),this[_0x316369(0x1c1)](_0x27ba23,_0x316369(0x19b),()=>{const _0x204c5e=_0x316369;this[_0x204c5e(0x178)](null);}),this[_0x316369(0x173)][_0x316369(0x1c1)](document,_0x316369(0x182),(_0x51beb2,_0x7b7b87)=>{const _0x601ee5=_0x316369;_0x7b7b87[_0x601ee5(0x16a)]===_0x20f7d2[_0x601ee5(0x176)]&&_0x27fcda[_0x601ee5(0x1bc)]&&(this[_0x601ee5(0x1d4)][_0x601ee5(0x1d2)](_0x27fcda[_0x601ee5(0x18e)][_0x601ee5(0x1a8)]),this[_0x601ee5(0x1b1)](),_0x7b7b87[_0x601ee5(0x196)](),_0x7b7b87[_0x601ee5(0x184)]());}),this[_0x316369(0x173)][_0x316369(0x1c1)](document,_0x316369(0x1b9),(_0x485da9,_0x16f46f)=>{const _0x13b713=_0x316369,_0xc95f42=_0x16f46f[_0x13b713(0x1a4)];_0x27fcda[_0x13b713(0x1bc)]&&_0x27fcda[_0x13b713(0x1da)][_0x13b713(0x16d)](_0xc95f42)||_0x295914[_0x13b713(0x195)][_0x13b713(0x1da)][_0x13b713(0x16d)](_0xc95f42)||_0x485da9[_0x13b713(0x187)]||this[_0x13b713(0x18f)]&&this[_0x13b713(0x18f)][_0x13b713(0x19e)][_0x13b713(0x1be)](_0x556472=>_0x556472[_0x13b713(0x16d)](_0xc95f42))||(this[_0x13b713(0x1d4)][_0x13b713(0x1cb)](),this[_0x13b713(0x1b1)](),this[_0x13b713(0x178)](null));});const _0x22325d=this[_0x316369(0x19f)]instanceof _0x3a77f5?this[_0x316369(0x19f)][_0x316369(0x19c)]:new _0xb25588([this[_0x316369(0x19f)]]);for(const _0x2dcd01 of _0x22325d)this[_0x316369(0x1b0)](_0x2dcd01);this[_0x316369(0x1c1)](_0x22325d,_0x316369(0x1d2),(_0x49ebbb,_0x303f38)=>{const _0xdc5d22=_0x316369;this[_0xdc5d22(0x1c1)](_0x303f38,_0xdc5d22(0x17f),()=>{const _0xdee8e7=_0xdc5d22;this[_0xdee8e7(0x1b0)](_0x303f38);});}),this[_0x316369(0x1c1)](_0x22325d,_0x316369(0x179),(_0x29215b,_0x431537)=>{const _0x580eed=_0x316369;_0x431537[_0x580eed(0x1a9)][_0x580eed(0x1e1)](_0x580eed(0x18a))&&this[_0x580eed(0x18b)](_0x431537[_0x580eed(0x1a9)][_0x580eed(0x1c3)](_0x580eed(0x18a)));}),window[_0x316369(0x1a1)](_0x316369(0x1bd),this[_0x316369(0x1c4)]),this[_0x316369(0x1b5)]();}[_0x45a80e(0x178)](_0x3ed5e4){const _0x4e1a18=_0x45a80e;if(_0x3ed5e4===this[_0x4e1a18(0x18f)])return;const _0x412a24=this[_0x4e1a18(0x19f)][_0x4e1a18(0x1a9)][_0x4e1a18(0x1c3)](_0x2a2e93);if(_0x412a24[_0x4e1a18(0x16f)]({'blurredAnnotation':this[_0x4e1a18(0x18f)],'activatedAnnotation':_0x3ed5e4,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3ed5e4)_0x412a24[_0x4e1a18(0x1d7)](_0x3ed5e4)?this[_0x4e1a18(0x1d1)](_0x3ed5e4):this[_0x4e1a18(0x1b1)]();else this[_0x4e1a18(0x1b1)]();this[_0x4e1a18(0x18f)]=_0x3ed5e4;}[_0x45a80e(0x174)](){const _0x26f476=_0x45a80e;if(!this[_0x26f476(0x18c)])throw new _0x1227cc(_0x26f476(0x1ce),this);this[_0x26f476(0x178)](null);const _0x466bbc=this[_0x26f476(0x19f)][_0x26f476(0x1a9)][_0x26f476(0x1c3)](_0x2a2e93);this[_0x26f476(0x1b1)](),Array[_0x26f476(0x1cf)](this[_0x26f476(0x1ad)][_0x26f476(0x1dc)](),_0x254544=>_0x254544[_0x26f476(0x1e2)]()),this[_0x26f476(0x1ad)][_0x26f476(0x1cb)](),_0x466bbc[_0x26f476(0x1aa)](this[_0x26f476(0x1c5)]),this[_0x26f476(0x17a)](),this[_0x26f476(0x173)][_0x26f476(0x17a)](),this[_0x26f476(0x19f)]instanceof _0x3a77f5&&this[_0x26f476(0x17a)](this[_0x26f476(0x19f)][_0x26f476(0x19c)]);for(const _0x395932 of Array[_0x26f476(0x1cf)](this[_0x26f476(0x199)]))this[_0x26f476(0x18b)](_0x395932);window[_0x26f476(0x16b)](_0x26f476(0x1bd),this[_0x26f476(0x1c4)]),this[_0x26f476(0x1c4)][_0x26f476(0x1de)](),this[_0x26f476(0x1a5)]=[],this[_0x26f476(0x18c)]=!0x1,this[_0x26f476(0x1c5)]=null;}[_0x45a80e(0x1e2)](){const _0x1d3322=_0x45a80e;this[_0x1d3322(0x18c)]&&this[_0x1d3322(0x174)](),this[_0x1d3322(0x170)][_0x1d3322(0x17d)]();}[_0x45a80e(0x1b0)](_0x55b708){const _0x1d7743=_0x45a80e;if(!_0x55b708[_0x1d7743(0x1a9)][_0x1d7743(0x1e1)](_0x1d7743(0x18a)))return;const _0x2721bc=_0x55b708[_0x1d7743(0x1a9)][_0x1d7743(0x1c3)](_0x1d7743(0x18a)),_0x137dfa=this[_0x1d7743(0x19f)][_0x1d7743(0x1a9)][_0x1d7743(0x1c3)](_0x2a2e93),_0x4d2562=this[_0x1d7743(0x1c5)],_0x4fc6ba=this[_0x1d7743(0x19a)],_0x2997c6=()=>{const _0x5252c4=_0x1d7743,_0x54dfa4=_0x2721bc[_0x5252c4(0x1bb)]({'annotations':this[_0x5252c4(0x1c5)],'activeAnnotation':this[_0x5252c4(0x18f)]});this[_0x5252c4(0x1b6)](_0x54dfa4),this[_0x5252c4(0x178)](_0x54dfa4[0x0]||null);};this[_0x1d7743(0x1c1)](_0x2721bc,_0x1d7743(0x16f),_0x2997c6),this[_0x1d7743(0x1c1)](_0x2721bc,_0x1d7743(0x19b),(_0x3b4e7d,{isAnnotationTracked:_0x45a4c1})=>{const _0x5be2be=_0x1d7743;this[_0x5be2be(0x18f)]&&_0x45a4c1(this[_0x5be2be(0x18f)])&&(this[_0x5be2be(0x1b6)]([]),this[_0x5be2be(0x178)](null));}),this[_0x1d7743(0x1c1)](_0x2721bc,_0x1d7743(0x1d6),()=>{const _0x1c2b61=_0x1d7743;this[_0x1c2b61(0x1c4)]();}),this[_0x1d7743(0x1c1)](_0x4d2562,_0x1d7743(0x19b),_0x553887=>{const _0x2bdd4d=_0x1d7743;_0x2721bc[_0x2bdd4d(0x17b)]()&&_0x553887[_0x2bdd4d(0x180)]();},{'priority':_0x1d7743(0x193)}),this[_0x1d7743(0x1c1)](this[_0x1d7743(0x173)],_0x1d7743(0x1b9),(_0x388932,_0x153182)=>{const _0x118679=_0x1d7743,_0x2e4e8a=_0x153182[_0x118679(0x1a4)];_0x4fc6ba[_0x118679(0x1bc)]&&_0x4fc6ba[_0x118679(0x1da)][_0x118679(0x16d)](_0x2e4e8a)||_0x137dfa[_0x118679(0x195)][_0x118679(0x1da)][_0x118679(0x16d)](_0x2e4e8a)||this[_0x118679(0x18f)]&&_0x2721bc[_0x118679(0x17b)]()&&(_0x2997c6(),_0x388932[_0x118679(0x187)]=!0x0);},{'priority':_0x1d7743(0x193)}),this[_0x1d7743(0x199)][_0x1d7743(0x1d2)](_0x2721bc);}[_0x45a80e(0x18b)](_0x4bffa3){const _0x25ec52=_0x45a80e;_0x4bffa3&&(this[_0x25ec52(0x17a)](_0x4bffa3),this[_0x25ec52(0x199)][_0x25ec52(0x179)](_0x4bffa3));}[_0x45a80e(0x1b6)](_0x15f965){const _0x204b96=_0x45a80e;for(const _0x1adfbc of this[_0x204b96(0x1a5)])_0x15f965[_0x204b96(0x1df)](_0x1adfbc)||this[_0x204b96(0x1d4)][_0x204b96(0x1b4)](_0x1adfbc[_0x204b96(0x195)]);this[_0x204b96(0x1a5)]=_0x15f965;}[_0x45a80e(0x1b5)](){const _0x287335=_0x45a80e,_0x604fc9=this[_0x287335(0x19a)];this[_0x287335(0x1c5)][_0x287335(0x1d3)](),_0x604fc9[_0x287335(0x1bc)]&&this[_0x287335(0x1c7)]();}[_0x45a80e(0x1d1)](_0x20c47e){const _0x3b6f12=_0x45a80e;if(this[_0x3b6f12(0x1d4)][_0x3b6f12(0x1e1)](_0x20c47e[_0x3b6f12(0x195)]))return;const _0x2cc29e=this[_0x3b6f12(0x19a)][_0x3b6f12(0x18e)][_0x3b6f12(0x1a8)];_0x2cc29e!==_0x20c47e[_0x3b6f12(0x195)]?(_0x2cc29e&&this[_0x3b6f12(0x1ba)](_0x2cc29e),this[_0x3b6f12(0x1a0)](_0x20c47e[_0x3b6f12(0x195)]),this[_0x3b6f12(0x19a)][_0x3b6f12(0x18e)][_0x3b6f12(0x1cb)](),this[_0x3b6f12(0x19a)][_0x3b6f12(0x18e)][_0x3b6f12(0x1d2)](_0x20c47e[_0x3b6f12(0x195)]),this[_0x3b6f12(0x1c7)]()):this[_0x3b6f12(0x1c7)]();}[_0x45a80e(0x1c7)](){const _0x17b0a4=_0x45a80e,_0x26bfe2=this[_0x17b0a4(0x19a)][_0x17b0a4(0x18e)][_0x17b0a4(0x1a8)],_0x236083=_0x26bfe2&&this[_0x17b0a4(0x1c5)][_0x17b0a4(0x171)](_0x26bfe2);if(!_0x236083||!this[_0x17b0a4(0x1ad)][_0x17b0a4(0x1e1)](_0x236083))return;const _0x4e25b9=this[_0x17b0a4(0x1ad)][_0x17b0a4(0x1c3)](_0x236083)[_0x17b0a4(0x1da)],_0x36d525=(function(){const _0x37b213=_0x17b0a4,_0x4d1a4a=_0x26c7c2[_0x37b213(0x194)];return[_0x4d1a4a[_0x37b213(0x181)],_0x4d1a4a[_0x37b213(0x1af)],_0x4d1a4a[_0x37b213(0x1d8)],_0x4d1a4a[_0x37b213(0x1d0)],_0x4d1a4a[_0x37b213(0x19d)],_0x4d1a4a[_0x37b213(0x197)]];}());this[_0x17b0a4(0x19a)][_0x17b0a4(0x190)]({'target':_0x4e25b9,'positions':_0x36d525});}[_0x45a80e(0x1b1)](){const _0x18e2ca=_0x45a80e,_0x3b1389=this[_0x18e2ca(0x19a)],_0x666a64=_0x3b1389[_0x18e2ca(0x18e)][_0x18e2ca(0x1a8)];_0x666a64&&(this[_0x18e2ca(0x1ba)](_0x666a64),_0x3b1389[_0x18e2ca(0x198)](),_0x3b1389[_0x18e2ca(0x18e)][_0x18e2ca(0x1cb)]());}[_0x45a80e(0x1a0)](_0x1803c4){const _0x4ffb42=_0x45a80e;this[_0x4ffb42(0x1c1)](_0x1803c4,_0x4ffb42(0x192),()=>this[_0x4ffb42(0x1c7)]()),this[_0x4ffb42(0x1c1)](_0x1803c4,_0x4ffb42(0x1e0),(_0x5d4d48,_0x156d9c)=>{const _0x35b4e6=_0x4ffb42;this[_0x35b4e6(0x1d4)][_0x35b4e6(0x1d2)](_0x1803c4),this[_0x35b4e6(0x1b1)](),_0x156d9c();});}[_0x45a80e(0x1ba)](_0x3d2382){const _0x46b146=_0x45a80e;this[_0x46b146(0x17a)](_0x3d2382);}}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
* @module comments/annotations/sidebar
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type { FocusableView } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import SidebarView from './view/sidebarview.js';
|
|
12
|
+
import SidebarItemView from './view/sidebaritemview.js';
|
|
13
|
+
import type Annotation from './annotation.js';
|
|
14
|
+
/**
|
|
15
|
+
* Displays {@link module:comments/annotations/annotationcollection~AnnotationCollection annotations} inside a sidebar.
|
|
16
|
+
*
|
|
17
|
+
* `Sidebar` provides a {@link module:comments/annotations/view/sidebarview~SidebarView} which can be injected at any place on a website.
|
|
18
|
+
*
|
|
19
|
+
* It's main role is to display and correctly position annotation views added to the sidebar, accordingly to their target elements
|
|
20
|
+
* or `Rect`s.
|
|
21
|
+
*
|
|
22
|
+
* The following plugins use `Sidebar` to provide annotations UI:
|
|
23
|
+
*
|
|
24
|
+
* * {@link module:comments/annotations/widesidebar~WideSidebar}
|
|
25
|
+
* * {@link module:comments/annotations/narrowsidebar~NarrowSidebar}
|
|
26
|
+
*
|
|
27
|
+
* The sidebar plugin introduces {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} which is a wrapper view for
|
|
28
|
+
* {@link module:comments/annotations/view/annotationview~AnnotationView}. It adds an interface needed for positioning views inside
|
|
29
|
+
* the sidebar.
|
|
30
|
+
*
|
|
31
|
+
* Structure of items:
|
|
32
|
+
*
|
|
33
|
+
* |-> SidebarItemView -> AnnotationView -> added View
|
|
34
|
+
* Sidebar#view#list -|-> SidebarItemView -> AnnotationView -> added View
|
|
35
|
+
* |-> ...
|
|
36
|
+
*/
|
|
37
|
+
export default class Sidebar extends ContextPlugin {
|
|
38
|
+
/**
|
|
39
|
+
* Container element into which sidebar is injected (in the DOM).
|
|
40
|
+
*
|
|
41
|
+
* @observable
|
|
42
|
+
*/
|
|
43
|
+
container: HTMLElement | null;
|
|
44
|
+
/**
|
|
45
|
+
* Sidebar view.
|
|
46
|
+
*/
|
|
47
|
+
view: SidebarView;
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
static get pluginName(): "Sidebar";
|
|
52
|
+
/**
|
|
53
|
+
* @inheritDoc
|
|
54
|
+
*/
|
|
55
|
+
static get isOfficialPlugin(): true;
|
|
56
|
+
/**
|
|
57
|
+
* @inheritDoc
|
|
58
|
+
*/
|
|
59
|
+
static get isPremiumPlugin(): true;
|
|
60
|
+
/**
|
|
61
|
+
* @inheritDoc
|
|
62
|
+
*/
|
|
63
|
+
constructor(context: Context | Editor);
|
|
64
|
+
/**
|
|
65
|
+
* @inheritDoc
|
|
66
|
+
*/
|
|
67
|
+
init(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Sets a new sidebar container.
|
|
70
|
+
*/
|
|
71
|
+
setContainer(container: HTMLElement): void;
|
|
72
|
+
/**
|
|
73
|
+
* Rearranges annotations when the annotation is removed.
|
|
74
|
+
*/
|
|
75
|
+
rearrange({ removedAnnotation, previousAnnotation, nextAnnotation }: {
|
|
76
|
+
removedAnnotation: Annotation;
|
|
77
|
+
previousAnnotation: Annotation | null;
|
|
78
|
+
nextAnnotation: Annotation | null;
|
|
79
|
+
}): void;
|
|
80
|
+
/**
|
|
81
|
+
* Refreshes sidebar items when one of the annotations is activated.
|
|
82
|
+
*
|
|
83
|
+
* @param options.activatedAnnotation The activated annotation.
|
|
84
|
+
* @param options.blurredAnnotation The previously active annotation.
|
|
85
|
+
* @param options.disableAnimationOnActivatedAnnotation Disables animation on the activated annotation.
|
|
86
|
+
*/
|
|
87
|
+
refresh({ blurredAnnotation, activatedAnnotation, disableAnimationOnActivatedAnnotation }: {
|
|
88
|
+
blurredAnnotation: Annotation | null;
|
|
89
|
+
activatedAnnotation: Annotation | null;
|
|
90
|
+
disableAnimationOnActivatedAnnotation?: boolean;
|
|
91
|
+
}): void;
|
|
92
|
+
/**
|
|
93
|
+
* Creates new {@link module:comments/annotations/view/sidebaritemview~SidebarItemView} and binds its
|
|
94
|
+
* position with {@link module:comments/annotations/view/annotationview~AnnotationView} target position.
|
|
95
|
+
*
|
|
96
|
+
* By default, annotation's view will be displayed in the sidebar. However, you can provide any other view
|
|
97
|
+
* to be displayed instead using `annotationToDisplay`. `annotation` will be then used only to gather data needed by `Sidebar`.
|
|
98
|
+
*/
|
|
99
|
+
addAnnotation(annotation: Annotation, viewToDisplay?: FocusableView): SidebarItemView;
|
|
100
|
+
/**
|
|
101
|
+
* Returns sidebar item view that wraps given annotation view.
|
|
102
|
+
*/
|
|
103
|
+
getSidebarItemView(annotation: Annotation): SidebarItemView | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* @inheritDoc
|
|
106
|
+
*/
|
|
107
|
+
destroy(): void;
|
|
108
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x4f0843=_0x202d;(function(_0x32db1f,_0x54bb70){const _0x3ca2d6=_0x202d,_0x2b04e5=_0x32db1f();while(!![]){try{const _0x55586b=parseInt(_0x3ca2d6(0x191))/0x1*(-parseInt(_0x3ca2d6(0x1b8))/0x2)+-parseInt(_0x3ca2d6(0x196))/0x3*(parseInt(_0x3ca2d6(0x195))/0x4)+-parseInt(_0x3ca2d6(0x1b3))/0x5*(parseInt(_0x3ca2d6(0x1ea))/0x6)+parseInt(_0x3ca2d6(0x1bf))/0x7*(parseInt(_0x3ca2d6(0x1ad))/0x8)+-parseInt(_0x3ca2d6(0x199))/0x9*(parseInt(_0x3ca2d6(0x192))/0xa)+parseInt(_0x3ca2d6(0x1cb))/0xb*(parseInt(_0x3ca2d6(0x1b0))/0xc)+parseInt(_0x3ca2d6(0x1e0))/0xd;if(_0x55586b===_0x54bb70)break;else _0x2b04e5['push'](_0x2b04e5['shift']());}catch(_0x599dab){_0x2b04e5['push'](_0x2b04e5['shift']());}}}(_0x24cb,0xc0a69));function _0x202d(_0x5c9f02,_0x183a2f){const _0x24cb75=_0x24cb();return _0x202d=function(_0x202dce,_0x321856){_0x202dce=_0x202dce-0x18d;let _0x3578c0=_0x24cb75[_0x202dce];return _0x3578c0;},_0x202d(_0x5c9f02,_0x183a2f);}import{ContextPlugin as _0x558001}from'ckeditor5/src/core.js';import{Rect as _0x3bc91b,CKEditorError as _0x8afbaa}from'ckeditor5/src/utils.js';import _0x1e7767 from'./view/sidebarview.js';import _0x516c10 from'./view/sidebaritemview.js';export default class z extends _0x558001{static get[_0x4f0843(0x1d9)](){const _0x1b25bb=_0x4f0843;return _0x1b25bb(0x1ce);}static get[_0x4f0843(0x1e9)](){return!0x0;}static get[_0x4f0843(0x19c)](){return!0x0;}constructor(_0x145e3c){const _0x3c86b9=_0x4f0843;super(_0x145e3c),this[_0x3c86b9(0x1d4)](_0x3c86b9(0x1e7),void 0x0),this[_0x3c86b9(0x1dd)]=this[_0x3c86b9(0x1c9)](),this[_0x3c86b9(0x1d4)](_0x3c86b9(0x190),null),this[_0x3c86b9(0x1af)]=0x19,this[_0x3c86b9(0x1c7)]=new Map(),this[_0x3c86b9(0x1a0)]=new Map(),this[_0x3c86b9(0x1a8)][_0x3c86b9(0x1c1)][_0x3c86b9(0x19e)](_0x3c86b9(0x1a5),!0x1),this[_0x3c86b9(0x1ab)]=null,this[_0x3c86b9(0x1db)]=null,this[_0x3c86b9(0x1bc)]=[];}[_0x4f0843(0x1ca)](){const _0x7a867b=_0x4f0843,_0x46ae3e=this[_0x7a867b(0x1a8)][_0x7a867b(0x1c1)][_0x7a867b(0x1cc)](_0x7a867b(0x1a4));_0x46ae3e&&this[_0x7a867b(0x1c6)](_0x46ae3e);}[_0x4f0843(0x1c6)](_0x43fe29){const _0x2312f5=_0x4f0843;if(!y(_0x43fe29))throw new _0x8afbaa(_0x2312f5(0x1c4));this[_0x2312f5(0x190)]=_0x43fe29;}[_0x4f0843(0x1de)]({viewClass:_0x3c2fed='',spaceBetweenItems:_0x5441a4=0x19}={}){const _0x16b1d9=_0x4f0843;if(!y(this[_0x16b1d9(0x190)]))throw new _0x8afbaa(_0x16b1d9(0x197),this);this[_0x16b1d9(0x190)][_0x16b1d9(0x1bd)](this[_0x16b1d9(0x1dd)][_0x16b1d9(0x1b9)]),this[_0x16b1d9(0x1dd)][_0x16b1d9(0x1da)]=_0x3c2fed,this[_0x16b1d9(0x1af)]=_0x5441a4;}[_0x4f0843(0x1cd)]({removedAnnotation:_0x10b468,previousAnnotation:_0x36ce91,nextAnnotation:_0x532d86}){const _0x439631=_0x4f0843,_0x5a8fcf=this[_0x439631(0x1c2)](_0x10b468);this[_0x439631(0x1dd)][_0x439631(0x1b4)][_0x439631(0x1b5)](_0x5a8fcf),this[_0x439631(0x19b)](_0x10b468),_0x36ce91&&this[_0x439631(0x1e2)](this[_0x439631(0x1c2)](_0x36ce91)),_0x532d86&&this[_0x439631(0x1e2)](this[_0x439631(0x1c2)](_0x532d86)),this[_0x439631(0x1be)]();}[_0x4f0843(0x18e)]({blurredAnnotation:_0x226060,activatedAnnotation:_0x54b20c,disableAnimationOnActivatedAnnotation:_0x26fb36}){const _0x1e77c4=_0x4f0843;if(this[_0x1e77c4(0x1db)]=_0x54b20c,_0x226060){_0x226060[_0x1e77c4(0x1dc)]=!0x1;const _0x3f268d=this[_0x1e77c4(0x1c2)](_0x226060);_0x3f268d&&_0x26fb36&&(_0x3f268d[_0x1e77c4(0x19d)]=!0x1);}if(_0x54b20c){const _0x2eeeb6=this[_0x1e77c4(0x1c2)](_0x54b20c);_0x2eeeb6&&(_0x54b20c[_0x1e77c4(0x1dc)]=!0x0,_0x26fb36&&(_0x2eeeb6[_0x1e77c4(0x19d)]=!0x0,_0x2eeeb6[_0x1e77c4(0x1a9)]+=0x1),this[_0x1e77c4(0x1e2)](_0x2eeeb6));}}[_0x4f0843(0x1a1)](_0x10899c){const _0x11b1d9=_0x4f0843;if(this[_0x11b1d9(0x1dd)][_0x11b1d9(0x1b9)][_0x11b1d9(0x1b5)](),_0x10899c){for(const _0x225c7a of _0x10899c)this[_0x11b1d9(0x19b)](_0x225c7a);}this[_0x11b1d9(0x1dd)][_0x11b1d9(0x1b4)][_0x11b1d9(0x1aa)](),this[_0x11b1d9(0x1dd)][_0x11b1d9(0x1da)]='',this[_0x11b1d9(0x1e7)]=null;}[_0x4f0843(0x198)](_0x390df2,_0x3ba70d){const _0x1d5bc6=_0x4f0843;_0x3ba70d||(_0x3ba70d=_0x390df2[_0x1d5bc6(0x1dd)]);const _0x24eff5=new _0x516c10(this[_0x1d5bc6(0x1a8)][_0x1d5bc6(0x1e4)]);this[_0x1d5bc6(0x1c7)][_0x1d5bc6(0x1d4)](_0x24eff5,_0x390df2),this[_0x1d5bc6(0x1a0)][_0x1d5bc6(0x1d4)](_0x390df2,_0x24eff5),_0x24eff5[_0x1d5bc6(0x1c8)][_0x1d5bc6(0x1b6)](_0x3ba70d),this[_0x1d5bc6(0x193)](_0x390df2[_0x1d5bc6(0x1dd)],_0x1d5bc6(0x1a6),(_0x528a71,_0x71a0b8,_0x36adb9)=>{const _0x52e98c=_0x1d5bc6,_0x5b7d49=this[_0x52e98c(0x1d5)](_0x390df2,_0x36adb9);_0x24eff5[_0x52e98c(0x1bb)]!=_0x5b7d49&&(_0x24eff5[_0x52e98c(0x1bb)]=_0x5b7d49,this[_0x52e98c(0x1df)](_0x24eff5,_0x5b7d49));}),this[_0x1d5bc6(0x193)](_0x24eff5,_0x1d5bc6(0x19a),()=>{const _0x1585a1=_0x1d5bc6;this[_0x1585a1(0x19f)](_0x24eff5,_0x1585a1(0x1a9));}),this[_0x1d5bc6(0x193)](_0x24eff5,_0x1d5bc6(0x1b2),()=>{const _0x124bcc=_0x1d5bc6;this[_0x124bcc(0x19f)](_0x24eff5,_0x124bcc(0x1b1));}),this[_0x1d5bc6(0x1e2)](_0x24eff5);const _0x31ad13=this[_0x1d5bc6(0x1e3)](_0x24eff5);if(_0x31ad13)this[_0x1d5bc6(0x194)](_0x31ad13,_0x24eff5)||this[_0x1d5bc6(0x1e2)](_0x24eff5);else this[_0x1d5bc6(0x1e2)](_0x24eff5);return this[_0x1d5bc6(0x1be)](),this[_0x1d5bc6(0x1dd)][_0x1d5bc6(0x1b4)][_0x1d5bc6(0x1b6)](_0x24eff5),_0x24eff5;}[_0x4f0843(0x1d8)](_0x9f3f94){const _0xcadcc7=_0x4f0843;if(!_0x9f3f94[_0xcadcc7(0x1c8)][_0xcadcc7(0x18d)])return;const _0x35c4ec=this[_0xcadcc7(0x1e3)](_0x9f3f94);if(!_0x35c4ec)return;const _0x46e24f=this[_0xcadcc7(0x1c7)][_0xcadcc7(0x1cc)](_0x35c4ec),_0x1a5f6f=this[_0xcadcc7(0x1db)];_0x1a5f6f&&_0x1a5f6f===_0x46e24f?this[_0xcadcc7(0x194)](_0x35c4ec,_0x9f3f94):this[_0xcadcc7(0x1e6)](_0x9f3f94,_0x35c4ec);}[_0x4f0843(0x1e5)](_0x2d5c7a){const _0x1c8ab1=_0x4f0843;if(!_0x2d5c7a[_0x1c8ab1(0x1c8)][_0x1c8ab1(0x18d)])return;const _0x540e90=this[_0x1c8ab1(0x1d7)](_0x2d5c7a);if(!_0x540e90)return;const _0x486f6e=this[_0x1c8ab1(0x1c7)][_0x1c8ab1(0x1cc)](_0x540e90),_0x2df4c7=this[_0x1c8ab1(0x1a8)][_0x1c8ab1(0x1c1)][_0x1c8ab1(0x1cc)](_0x1c8ab1(0x1a5)),_0x275750=this[_0x1c8ab1(0x1db)];_0x275750&&_0x275750===_0x486f6e&&_0x2df4c7?(this[_0x1c8ab1(0x1e6)](_0x540e90,_0x2d5c7a),this[_0x1c8ab1(0x194)](_0x2d5c7a,_0x540e90)):_0x275750&&_0x275750===_0x486f6e?this[_0x1c8ab1(0x1e6)](_0x540e90,_0x2d5c7a):this[_0x1c8ab1(0x194)](_0x2d5c7a,_0x540e90);}[_0x4f0843(0x19f)](_0x26eca0,_0x398ab0){const _0x438437=_0x4f0843;0x0===this[_0x438437(0x1bc)][_0x438437(0x18d)]&&setTimeout(()=>{const _0x43e56b=_0x438437;for(const {sidebarItemView:_0x5bf4ef,changedProp:_0x34d67f}of this[_0x43e56b(0x1bc)])_0x43e56b(0x1a9)===_0x34d67f?this[_0x43e56b(0x1d8)](_0x5bf4ef):this[_0x43e56b(0x1e5)](_0x5bf4ef);this[_0x43e56b(0x1bc)]=[];},0xa),this[_0x438437(0x1bc)][_0x438437(0x1ae)]({'sidebarItemView':_0x26eca0,'changedProp':_0x398ab0});}[_0x4f0843(0x1c2)](_0x290b16){const _0x701b0b=_0x4f0843;return this[_0x701b0b(0x1a0)][_0x701b0b(0x1cc)](_0x290b16);}[_0x4f0843(0x1c3)](){const _0x2d1762=_0x4f0843;this[_0x2d1762(0x1d0)](),this[_0x2d1762(0x1dd)][_0x2d1762(0x1c3)]();}[_0x4f0843(0x19b)](_0x10675a){const _0x30d98a=_0x4f0843,_0x24dfa0=this[_0x30d98a(0x1c2)](_0x10675a);this[_0x30d98a(0x1d0)](_0x24dfa0),this[_0x30d98a(0x1d0)](_0x10675a[_0x30d98a(0x1dd)]),_0x24dfa0[_0x30d98a(0x1c3)](),this[_0x30d98a(0x1a0)][_0x30d98a(0x1d2)](_0x10675a),this[_0x30d98a(0x1c7)][_0x30d98a(0x1d2)](_0x24dfa0);}[_0x4f0843(0x1c9)](){const _0xae2282=_0x4f0843,_0x5aa492=new _0x1e7767(this[_0xae2282(0x1a8)][_0xae2282(0x1e4)]);return _0x5aa492[_0xae2282(0x1d3)](),this['on'](_0xae2282(0x1d6),(_0x492859,_0x33c0f7,_0x394376,_0x16db29)=>{const _0x320d49=_0xae2282;_0x16db29&&_0x5aa492[_0x320d49(0x1e1)](_0x320d49(0x1a3)),_0x394376?_0x5aa492[_0x320d49(0x18f)](_0x320d49(0x1a3))['to'](_0x394376,_0x320d49(0x1b1)):_0x5aa492[_0x320d49(0x1a3)]=null;}),_0x5aa492;}[_0x4f0843(0x1be)](){const _0x4d8703=_0x4f0843;var _0x33b9d6;this[_0x4d8703(0x1e7)]=(null===(_0x33b9d6=this[_0x4d8703(0x1ab)])||void 0x0===_0x33b9d6?void 0x0:_0x33b9d6[_0x4d8703(0x1cf)])?this[_0x4d8703(0x1c2)](this[_0x4d8703(0x1ab)][_0x4d8703(0x1cf)]):null;}[_0x4f0843(0x1e3)](_0x2f6874){const _0x1e5c4d=_0x4f0843;var _0x34a98f;const _0x5278cb=this[_0x1e5c4d(0x1c7)][_0x1e5c4d(0x1cc)](_0x2f6874),_0x533fbe=_0x5278cb&&(null===(_0x34a98f=this[_0x1e5c4d(0x1ab)])||void 0x0===_0x34a98f?void 0x0:_0x34a98f[_0x1e5c4d(0x1cc)](this[_0x1e5c4d(0x1ab)][_0x1e5c4d(0x1e8)](_0x5278cb)-0x1));return _0x533fbe&&this[_0x1e5c4d(0x1c2)](_0x533fbe)||null;}[_0x4f0843(0x1d7)](_0x4806a7){const _0x42de5d=_0x4f0843;var _0x2a9105;const _0xe79f56=this[_0x42de5d(0x1c7)][_0x42de5d(0x1cc)](_0x4806a7),_0x456fb8=_0xe79f56&&(null===(_0x2a9105=this[_0x42de5d(0x1ab)])||void 0x0===_0x2a9105?void 0x0:_0x2a9105[_0x42de5d(0x1cc)](this[_0x42de5d(0x1ab)][_0x42de5d(0x1e8)](_0xe79f56)+0x1));return _0x456fb8&&this[_0x42de5d(0x1c2)](_0x456fb8)||null;}[_0x4f0843(0x1e6)](_0xa47cc5,_0x52ad50){const _0xc9e50a=_0x4f0843;_0xa47cc5[_0xc9e50a(0x1b7)]();const _0x2f67d3=R(_0x52ad50[_0xc9e50a(0x1b1)]+this[_0xc9e50a(0x1af)],_0xa47cc5[_0xc9e50a(0x1a9)]);return!!_0x2f67d3&&(this[_0xc9e50a(0x1df)](_0x52ad50,_0x52ad50[_0xc9e50a(0x1a9)]-_0x2f67d3),!0x0);}[_0x4f0843(0x194)](_0x479117,_0x395627){const _0x57d132=_0x4f0843;_0x479117[_0x57d132(0x1b7)]();const _0x30720d=R(_0x479117[_0x57d132(0x1b1)]+this[_0x57d132(0x1af)],_0x395627[_0x57d132(0x1a9)]);return!!_0x30720d&&(this[_0x57d132(0x1df)](_0x395627,_0x395627[_0x57d132(0x1a9)]+_0x30720d,!0x1),!0x0);}[_0x4f0843(0x1e2)](_0x1770ee){const _0x4bcd07=_0x4f0843,_0x513313=this[_0x4bcd07(0x1c7)][_0x4bcd07(0x1cc)](_0x1770ee);if(!_0x513313||!_0x513313[_0x4bcd07(0x1ac)]||!_0x513313[_0x4bcd07(0x1c0)])return;const _0x1dd707=this[_0x4bcd07(0x1d5)](_0x513313,_0x513313[_0x4bcd07(0x1c0)]);this[_0x4bcd07(0x1df)](_0x1770ee,_0x1dd707);}[_0x4f0843(0x1d5)](_0x2f4bfb,_0xf489fe){const _0x3fd7f5=_0x4f0843;if(null===_0xf489fe)return 0x0;if(_0x2f4bfb[_0x3fd7f5(0x1ac)]instanceof _0x3bc91b)return _0xf489fe[_0x3fd7f5(0x1a9)];{const _0x207495=new _0x3bc91b(this[_0x3fd7f5(0x1dd)][_0x3fd7f5(0x1b9)])[_0x3fd7f5(0x1a9)];return _0xf489fe[_0x3fd7f5(0x1a9)]-_0x207495;}}[_0x4f0843(0x1df)](_0x25568b,_0x1c082c,_0x2f45a8=this[_0x4f0843(0x1a8)][_0x4f0843(0x1c1)][_0x4f0843(0x1cc)](_0x4f0843(0x1a5))){const _0x5a912e=_0x4f0843;_0x2f45a8&&(_0x1c082c=Math[_0x5a912e(0x1a2)](_0x1c082c,this[_0x5a912e(0x1d1)](_0x25568b))),_0x25568b[_0x5a912e(0x1a9)]=_0x1c082c;}[_0x4f0843(0x1d1)](_0x2e0ded){const _0x41ce38=_0x4f0843;let _0x17b24a=this[_0x41ce38(0x1e3)](_0x2e0ded),_0x5612f1=0x0;for(;_0x17b24a;)_0x17b24a[_0x41ce38(0x1b7)](),_0x5612f1+=this[_0x41ce38(0x1af)]+_0x17b24a[_0x41ce38(0x1ba)],_0x17b24a=this[_0x41ce38(0x1e3)](_0x17b24a);return _0x5612f1;}}function R(_0x2f6e32,_0xd20f8d){const _0x1518bb=_0x4f0843;return Math[_0x1518bb(0x1a2)](_0x2f6e32-_0xd20f8d,0x0);}function _0x24cb(){const _0x2b414=['appendChild','_updateLastItem','217VVbhUk','targetRect','config','getSidebarItemView','destroy','sidebar-setcontainer-invalid-element','nodeType','setContainer','_sidebarItemViewToAnnotation','content','_createSidebarView','init','31856QPeaUu','get','rearrange','Sidebar','last','stopListening','_getMaxAvailableTop','delete','render','set','_getTargetTop','change:_lastItem','_getItemAfter','_alignForTopChange','pluginName','class','_activeAnnotation','isActive','view','_attachToContainer','_setItemTop','23757955vrBWEB','unbind','_alignToTargetRect','_getItemBefore','locale','_alignForBottomChange','_alignBeforeItem','_lastItem','getIndex','isOfficialPlugin','60QWzvAB','length','refresh','bind','container','26561lnkKZN','11901990gIcLNZ','listenTo','_alignAfterItem','4DbVGXp','206001tawuYE','sidebar-attachtocontainer-missing-container','addAnnotation','9gvKTOk','change:top','_destroySidebarItemView','isPremiumPlugin','isAnimationDisabled','define','_recalculate','_annotationToSidebarItemView','_detachFromContainer','max','minHeight','sidebar.container','sidebar.preventScrollOutOfView','change:targetRect','object','context','top','clear','_annotations','target','15848ZjNFHU','push','_spaceBetweenItems','5484aSajvv','bottom','change:bottom','515825oqFRrX','list','remove','add','updateHeight','10BwWswe','element','height','_targetTop','_recalculateBuffer'];_0x24cb=function(){return _0x2b414;};return _0x24cb();}function y(_0x540afc){const _0x128636=_0x4f0843;return null!==_0x540afc&&_0x128636(0x1a7)==typeof _0x540afc&&0x1===_0x540afc[_0x128636(0x1c5)];}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
* @module comments/annotations/view/annotationcounterbuttonview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { ButtonView, View } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
11
|
+
/**
|
|
12
|
+
* A view used in the sidebar by {@link module:comments/annotations/narrowsidebar~NarrowSidebar}.
|
|
13
|
+
*/
|
|
14
|
+
export default class AnnotationCounterButtonView extends ButtonView {
|
|
15
|
+
/**
|
|
16
|
+
* @observable
|
|
17
|
+
*/
|
|
18
|
+
isDirty: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
22
|
+
number: number;
|
|
23
|
+
/**
|
|
24
|
+
* @observable
|
|
25
|
+
*/
|
|
26
|
+
annotationType: string;
|
|
27
|
+
counterView: View;
|
|
28
|
+
constructor(locale: Locale);
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x2388f9,_0x23766e){const _0x916128=_0x50cc,_0x3a8c78=_0x2388f9();while(!![]){try{const _0x2edbd8=parseInt(_0x916128(0x1b9))/0x1+-parseInt(_0x916128(0x1b5))/0x2+parseInt(_0x916128(0x1a5))/0x3*(parseInt(_0x916128(0x1b1))/0x4)+parseInt(_0x916128(0x1bc))/0x5*(parseInt(_0x916128(0x1b2))/0x6)+parseInt(_0x916128(0x1aa))/0x7+-parseInt(_0x916128(0x1b6))/0x8*(-parseInt(_0x916128(0x1b0))/0x9)+-parseInt(_0x916128(0x1a2))/0xa;if(_0x2edbd8===_0x23766e)break;else _0x3a8c78['push'](_0x3a8c78['shift']());}catch(_0x5e8314){_0x3a8c78['push'](_0x3a8c78['shift']());}}}(_0x30b6,0x38c53));import{ButtonView as _0x192e80,View as _0x325da3}from'ckeditor5/src/ui.js';function _0x50cc(_0x3c96e9,_0x342a4b){const _0x30b620=_0x30b6();return _0x50cc=function(_0x50cc44,_0x1b2958){_0x50cc44=_0x50cc44-0x19f;let _0x2c3b76=_0x30b620[_0x50cc44];return _0x2c3b76;},_0x50cc(_0x3c96e9,_0x342a4b);}import _0x31e927 from'../../../theme/icons/add-comment.svg';export default class D extends _0x192e80{constructor(_0xc74a10){const _0x46836b=_0x50cc;super(_0xc74a10);const _0x4e6f9c=this[_0x46836b(0x1ba)];this[_0x46836b(0x1a8)](_0x46836b(0x1ae),!0x1),this[_0x46836b(0x1a8)](_0x46836b(0x1b8),0x0),this[_0x46836b(0x1ab)](_0x46836b(0x1a6))['to'](this,_0x46836b(0x1ae),this,_0x46836b(0x1b8),(_0x4d2a66,_0x3b5071)=>_0x4d2a66?_0x46836b(0x1b7):_0x3b5071[_0x46836b(0x1a7)]()),this[_0x46836b(0x1a8)](_0x46836b(0x1a3),''),this[_0x46836b(0x1a9)]=_0x31e927,this[_0x46836b(0x1af)]({'attributes':{'class':[_0x46836b(0x1a4)]}}),this[_0x46836b(0x1bb)]=new _0x325da3(),this[_0x46836b(0x1bb)][_0x46836b(0x1ad)]({'tag':_0x46836b(0x1b3),'attributes':{'class':[_0x46836b(0x19f),_0x4e6f9c['to'](_0x46836b(0x1a3),_0x222ac5=>_0x46836b(0x1a1)+_0x222ac5),_0x4e6f9c['if'](_0x46836b(0x1ae),_0x46836b(0x1ac))]},'children':[{'text':_0x4e6f9c['to'](_0x46836b(0x1a6))}]}),this[_0x46836b(0x1a0)][_0x46836b(0x1b4)](this[_0x46836b(0x1bb)]);}}function _0x30b6(){const _0x4f6aae=['558824GKWqYO','bind','ck-annotation-counter__badge--edit-mode','setTemplate','isDirty','extendTemplate','9ZaDUiH','6252eyMZvz','6shRfAg','span','add','589890HVRHvI','420456yIEjya','...','number','182763IxgXjZ','bindTemplate','counterView','1073285cMiGzo','ck-annotation-counter__badge','children','ck-annotation-counter__badge--','210890DAXaNC','annotationType','ck-annotation-counter','36ASsWDp','_badge','toString','set','icon'];_0x30b6=function(){return _0x4f6aae;};return _0x30b6();}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
* @module comments/annotations/view/annotationview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { type FocusableView, View, type ViewCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { FocusTracker, KeystrokeHandler, type Rect, type Locale } from 'ckeditor5/src/utils.js';
|
|
11
|
+
import '../../../theme/annotation.css';
|
|
12
|
+
/**
|
|
13
|
+
* A wrapping view for any view added to the `Annotations` plugin.
|
|
14
|
+
*
|
|
15
|
+
* It introduces functionalities that make the given view ready to be used as an annotation, such as focus tracking, height resizing,
|
|
16
|
+
* and other observable properties that help share current annotation state across different UIs.
|
|
17
|
+
*/
|
|
18
|
+
export default class AnnotationView extends View implements FocusableView {
|
|
19
|
+
/**
|
|
20
|
+
* Tracks focus on the annotation view.
|
|
21
|
+
*
|
|
22
|
+
* Add a DOM element to this focus tracker to prevent blurring annotation view
|
|
23
|
+
* when the DOM element is focused.
|
|
24
|
+
*/
|
|
25
|
+
readonly focusTracker: FocusTracker;
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly keystrokes: KeystrokeHandler;
|
|
28
|
+
/**
|
|
29
|
+
* Target rectangle to which the annotation should be attached.
|
|
30
|
+
*
|
|
31
|
+
* @observable
|
|
32
|
+
*/
|
|
33
|
+
targetRect: Rect | null;
|
|
34
|
+
/**
|
|
35
|
+
* Annotation view height.
|
|
36
|
+
*
|
|
37
|
+
* @observable
|
|
38
|
+
*/
|
|
39
|
+
height: number;
|
|
40
|
+
/**
|
|
41
|
+
* Informs if an annotation is active.
|
|
42
|
+
*
|
|
43
|
+
* @observable
|
|
44
|
+
*/
|
|
45
|
+
isActive: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Informs if there are unsaved changes in the annotation.
|
|
48
|
+
*
|
|
49
|
+
* @observable
|
|
50
|
+
*/
|
|
51
|
+
isDirty: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The number of items in the annotation.
|
|
54
|
+
*
|
|
55
|
+
* @observable
|
|
56
|
+
*/
|
|
57
|
+
length: number;
|
|
58
|
+
/**
|
|
59
|
+
* @observable
|
|
60
|
+
*/
|
|
61
|
+
type: string;
|
|
62
|
+
element: HTMLElement;
|
|
63
|
+
/**
|
|
64
|
+
* Collection for content views.
|
|
65
|
+
*/
|
|
66
|
+
content: ViewCollection<FocusableView>;
|
|
67
|
+
/**
|
|
68
|
+
* The inner annotation view.
|
|
69
|
+
*/
|
|
70
|
+
mainView: AnnotationMainView;
|
|
71
|
+
/**
|
|
72
|
+
* @inheritDoc
|
|
73
|
+
*/
|
|
74
|
+
constructor(locale: Locale, mainView: AnnotationMainView);
|
|
75
|
+
/**
|
|
76
|
+
* @inheritDoc
|
|
77
|
+
*/
|
|
78
|
+
render(): void;
|
|
79
|
+
/**
|
|
80
|
+
* @inheritDoc
|
|
81
|
+
*/
|
|
82
|
+
destroy(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Focuses the annotation view.
|
|
85
|
+
*/
|
|
86
|
+
focus(): void;
|
|
87
|
+
}
|
|
88
|
+
export interface AnnotationMainView extends FocusableView {
|
|
89
|
+
isActive: boolean;
|
|
90
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x55d0(){const _0x4357f3=['ck-annotation-wrapper--active','fire','5536812pswIXi','isActive','type','_mutationObserver','68whuDpz','ck-annotation-wrapper','length','mainView','135080sVzVzm','delegate','4696868cRfPsO','targetRect','destroy','setTemplate','createCollection','26KYEczf','element','arrowdown','arrowup','add','presentation','render','51uhGgjJ','5duFDhm','attach','ck-rounded-corners','clientHeight','bindTemplate','content','isDirty','630792MkFtFv','keystrokes','set','detach','_updateHeight','focusTracker','clear','10zdkIEv','161156KYIpUR','div','5583eUtHLI','listenTo','focus','2340072bkahLP','height','first','Esc','72PaGODW'];_0x55d0=function(){return _0x4357f3;};return _0x55d0();}function _0x47c9(_0x2e7371,_0x11f8a7){const _0x55d0b1=_0x55d0();return _0x47c9=function(_0x47c915,_0x59c9f1){_0x47c915=_0x47c915-0x1dc;let _0x4bf34b=_0x55d0b1[_0x47c915];return _0x4bf34b;},_0x47c9(_0x2e7371,_0x11f8a7);}const _0x1785f1=_0x47c9;(function(_0x22d2af,_0x4a486a){const _0x10fbec=_0x47c9,_0x3af24b=_0x22d2af();while(!![]){try{const _0x5e2196=-parseInt(_0x10fbec(0x1f2))/0x1*(parseInt(_0x10fbec(0x200))/0x2)+-parseInt(_0x10fbec(0x1e0))/0x3*(-parseInt(_0x10fbec(0x1f0))/0x4)+parseInt(_0x10fbec(0x1e1))/0x5*(-parseInt(_0x10fbec(0x1e8))/0x6)+-parseInt(_0x10fbec(0x1f5))/0x7+parseInt(_0x10fbec(0x204))/0x8*(-parseInt(_0x10fbec(0x1f9))/0x9)+parseInt(_0x10fbec(0x1ef))/0xa*(-parseInt(_0x10fbec(0x206))/0xb)+parseInt(_0x10fbec(0x1fc))/0xc*(parseInt(_0x10fbec(0x20b))/0xd);if(_0x5e2196===_0x4a486a)break;else _0x3af24b['push'](_0x3af24b['shift']());}catch(_0x5309ce){_0x3af24b['push'](_0x3af24b['shift']());}}}(_0x55d0,0x65a8d));import{View as _0x2ab22a}from'ckeditor5/src/ui.js';import{FocusTracker as _0x15e5f7,KeystrokeHandler as _0x553db0,uid as _0x278dc3}from'ckeditor5/src/utils.js';import _0x421c56 from'../../utils/createmutationobserver.js';import'../../../theme/annotation.css';export default class T extends _0x2ab22a{constructor(_0x5e517b,_0x3c97dc){const _0x18c6b6=_0x47c9;super(_0x5e517b),this['id']=_0x278dc3(),this[_0x18c6b6(0x1ed)]=new _0x15e5f7(),this[_0x18c6b6(0x1e9)]=new _0x553db0(),this[_0x18c6b6(0x1e9)][_0x18c6b6(0x1ea)](_0x18c6b6(0x1f8),(_0x30cd75,_0x33f371)=>this[_0x18c6b6(0x1fb)](_0x18c6b6(0x1f8),_0x33f371)),this[_0x18c6b6(0x1ea)](_0x18c6b6(0x207),{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this[_0x18c6b6(0x1ea)](_0x18c6b6(0x1f6),0x0),this[_0x18c6b6(0x1ea)](_0x18c6b6(0x1fd),!0x1),this[_0x18c6b6(0x1ea)](_0x18c6b6(0x1e7),!0x1),this[_0x18c6b6(0x1ea)](_0x18c6b6(0x202),0x0),this[_0x18c6b6(0x1ea)](_0x18c6b6(0x1fe),''),this[_0x18c6b6(0x1ff)]=_0x421c56(()=>this[_0x18c6b6(0x1ec)]()),this[_0x18c6b6(0x1e6)]=this[_0x18c6b6(0x20a)](),this[_0x18c6b6(0x1e6)][_0x18c6b6(0x205)](_0x18c6b6(0x1dc),_0x18c6b6(0x20d))['to'](this),this[_0x18c6b6(0x1e6)][_0x18c6b6(0x1dd)](_0x3c97dc),this[_0x18c6b6(0x203)]=_0x3c97dc;const _0x128f01=this[_0x18c6b6(0x1e5)];this[_0x18c6b6(0x209)]({'tag':_0x18c6b6(0x1f1),'attributes':{'class':['ck',_0x18c6b6(0x201),_0x18c6b6(0x1e3),_0x128f01['if'](_0x18c6b6(0x1fd),_0x18c6b6(0x1fa))],'role':_0x18c6b6(0x1de)},'children':this[_0x18c6b6(0x1e6)]});}[_0x1785f1(0x1df)](){const _0x2abe42=_0x1785f1;super[_0x2abe42(0x1df)](),this[_0x2abe42(0x1ed)][_0x2abe42(0x1dd)](this[_0x2abe42(0x20c)]),this[_0x2abe42(0x1e9)][_0x2abe42(0x1f3)](this[_0x2abe42(0x20c)]),this[_0x2abe42(0x1ff)][_0x2abe42(0x1e2)](this[_0x2abe42(0x20c)]);}[_0x1785f1(0x208)](){const _0x3d4078=_0x1785f1;this[_0x3d4078(0x1e6)][_0x3d4078(0x1ee)](),this[_0x3d4078(0x1e9)][_0x3d4078(0x208)](),this[_0x3d4078(0x1ed)][_0x3d4078(0x208)](),this[_0x3d4078(0x1ff)][_0x3d4078(0x1eb)](),super[_0x3d4078(0x208)]();}[_0x1785f1(0x1f4)](){const _0x175e2d=_0x1785f1;this[_0x175e2d(0x1e6)][_0x175e2d(0x1f7)]&&this[_0x175e2d(0x1e6)][_0x175e2d(0x1f7)][_0x175e2d(0x1f4)]();}[_0x1785f1(0x1ec)](){const _0x289f3f=_0x1785f1,_0x6f6475=this[_0x289f3f(0x20c)][_0x289f3f(0x1e4)];_0x6f6475&&(this[_0x289f3f(0x1f6)]=_0x6f6475);}}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* @module comments/annotations/view/sidebaritemview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { View, type ViewCollection, type FocusableView } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
11
|
+
/**
|
|
12
|
+
* A wrapper view that wraps given {@link module:ui/view~View} to display it as a {@link module:comments/annotations/sidebar~Sidebar} item.
|
|
13
|
+
*/
|
|
14
|
+
export default class SidebarItemView extends View implements FocusableView {
|
|
15
|
+
element: HTMLElement;
|
|
16
|
+
/**
|
|
17
|
+
* The item top offset.
|
|
18
|
+
* Setting `0` as the initial value makes new items falling from heaven.
|
|
19
|
+
*
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
22
|
+
top: number;
|
|
23
|
+
/**
|
|
24
|
+
* @observable
|
|
25
|
+
*/
|
|
26
|
+
bottom: number;
|
|
27
|
+
/**
|
|
28
|
+
* @observable
|
|
29
|
+
*/
|
|
30
|
+
height: number;
|
|
31
|
+
/**
|
|
32
|
+
* @observable
|
|
33
|
+
*/
|
|
34
|
+
isAnimationDisabled: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* A collection of content views.
|
|
37
|
+
*/
|
|
38
|
+
content: ViewCollection<FocusableView>;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
constructor(locale: Locale);
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
render(): void;
|
|
47
|
+
/**
|
|
48
|
+
* @inheritDoc
|
|
49
|
+
*/
|
|
50
|
+
focus(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Updates {@link #height the height property} according to the element's DOM height.
|
|
53
|
+
*/
|
|
54
|
+
updateHeight(): void;
|
|
55
|
+
/**
|
|
56
|
+
* @inheritDoc
|
|
57
|
+
*/
|
|
58
|
+
destroy(): void;
|
|
59
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x12436d=_0x628f;(function(_0xc3d1cf,_0x44501b){const _0x6ff5d1=_0x628f,_0x418397=_0xc3d1cf();while(!![]){try{const _0x45637f=-parseInt(_0x6ff5d1(0x11e))/0x1+-parseInt(_0x6ff5d1(0x126))/0x2+-parseInt(_0x6ff5d1(0x12d))/0x3*(-parseInt(_0x6ff5d1(0x121))/0x4)+-parseInt(_0x6ff5d1(0x122))/0x5+-parseInt(_0x6ff5d1(0x134))/0x6*(-parseInt(_0x6ff5d1(0x125))/0x7)+-parseInt(_0x6ff5d1(0x142))/0x8+-parseInt(_0x6ff5d1(0x136))/0x9;if(_0x45637f===_0x44501b)break;else _0x418397['push'](_0x418397['shift']());}catch(_0x59963a){_0x418397['push'](_0x418397['shift']());}}}(_0x287e,0x411bb));import{View as _0x44fd47}from'ckeditor5/src/ui.js';import{toUnit as _0xf7e8f}from'ckeditor5/src/utils.js';function _0x287e(){const _0x23a223=['arrowup','setTemplate','bind','ck-sidebar-item','clear','ck-sidebar-item--no-animation','482408CWEAZj','element','9308GmOvSs','presentation','attach','536dpewDi','1209280DMVruB','bindTemplate','focus','3657269RvQKYu','41100sxdqmY','_mutationObserver','bottom','delegate','content','arrowdown','destroy','4416nizNly','render','height','detach','isAnimationDisabled','updateHeight','_targetTop','6nLCxLV','clientHeight','1089153IgDBJQ','first','div','set','top','createCollection'];_0x287e=function(){return _0x23a223;};return _0x287e();}function _0x628f(_0x3e3cfb,_0x563242){const _0x287eac=_0x287e();return _0x628f=function(_0x628f19,_0x453fc7){_0x628f19=_0x628f19-0x11d;let _0x501426=_0x287eac[_0x628f19];return _0x501426;},_0x628f(_0x3e3cfb,_0x563242);}import _0x324c45 from'../../utils/createmutationobserver.js';const qt=_0xf7e8f('px');export default class H extends _0x44fd47{constructor(_0x2f77be){const _0x4dc3b5=_0x628f;super(_0x2f77be),this[_0x4dc3b5(0x139)](_0x4dc3b5(0x13a),0x0),this[_0x4dc3b5(0x139)](_0x4dc3b5(0x12f),0x0),this[_0x4dc3b5(0x13e)](_0x4dc3b5(0x128))['to'](this,_0x4dc3b5(0x13a),this,_0x4dc3b5(0x12f),(_0x111105,_0xa82269)=>_0x111105+_0xa82269),this[_0x4dc3b5(0x139)](_0x4dc3b5(0x131),!0x1),this[_0x4dc3b5(0x127)]=_0x324c45(()=>this[_0x4dc3b5(0x132)]()),this[_0x4dc3b5(0x133)]=null,this[_0x4dc3b5(0x12a)]=this[_0x4dc3b5(0x13b)](),this[_0x4dc3b5(0x12a)][_0x4dc3b5(0x129)](_0x4dc3b5(0x13c),_0x4dc3b5(0x12b))['to'](this);const _0x42ea60=this[_0x4dc3b5(0x123)];this[_0x4dc3b5(0x13d)]({'tag':_0x4dc3b5(0x138),'attributes':{'class':[_0x4dc3b5(0x13f),_0x42ea60['to'](_0x4dc3b5(0x131),_0x555613=>_0x555613?_0x4dc3b5(0x141):'')],'style':{'top':_0x42ea60['to'](_0x4dc3b5(0x13a),_0x162c30=>qt(_0x162c30))},'role':_0x4dc3b5(0x11f)},'children':this[_0x4dc3b5(0x12a)]});}[_0x12436d(0x12e)](){const _0x26131e=_0x12436d;super[_0x26131e(0x12e)](),this[_0x26131e(0x127)][_0x26131e(0x120)](this[_0x26131e(0x11d)]);}[_0x12436d(0x124)](){const _0x2b8d1b=_0x12436d;this[_0x2b8d1b(0x12a)][_0x2b8d1b(0x137)]&&this[_0x2b8d1b(0x12a)][_0x2b8d1b(0x137)][_0x2b8d1b(0x124)]();}[_0x12436d(0x132)](){const _0x20d25d=_0x12436d,_0x392b8c=this[_0x20d25d(0x11d)][_0x20d25d(0x135)];_0x392b8c&&(this[_0x20d25d(0x12f)]=_0x392b8c);}[_0x12436d(0x12c)](){const _0x2ea489=_0x12436d;this[_0x2ea489(0x12a)][_0x2ea489(0x140)](),this[_0x2ea489(0x127)][_0x2ea489(0x130)](),super[_0x2ea489(0x12c)]();}}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* @module comments/annotations/view/sidebarview
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { View, FocusCycler, type ViewCollection, type ViewWithFocusCycler } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { FocusTracker, type Locale } from 'ckeditor5/src/utils.js';
|
|
11
|
+
import type SidebarItemView from './sidebaritemview.js';
|
|
12
|
+
import '../../../theme/sidebar.css';
|
|
13
|
+
/**
|
|
14
|
+
* The sidebar view class that displays the collection of sidebar item views.
|
|
15
|
+
*/
|
|
16
|
+
export default class SidebarView extends View implements ViewWithFocusCycler {
|
|
17
|
+
/**
|
|
18
|
+
* @observable
|
|
19
|
+
*/
|
|
20
|
+
minHeight: number | null;
|
|
21
|
+
/**
|
|
22
|
+
* @observable
|
|
23
|
+
*/
|
|
24
|
+
class: string;
|
|
25
|
+
/**
|
|
26
|
+
* A collection of sidebar item views.
|
|
27
|
+
*/
|
|
28
|
+
list: ViewCollection<SidebarItemView>;
|
|
29
|
+
/**
|
|
30
|
+
* A collection of focusable views in the sidebar.
|
|
31
|
+
*/
|
|
32
|
+
focusables: ViewCollection<SidebarItemView>;
|
|
33
|
+
/**
|
|
34
|
+
* Tracks information about DOM focus among sidebar item views.
|
|
35
|
+
*/
|
|
36
|
+
readonly focusTracker: FocusTracker;
|
|
37
|
+
/**
|
|
38
|
+
* Helps cycling over {@link #focusables focusable items} in the sidebar.
|
|
39
|
+
*/
|
|
40
|
+
readonly focusCycler: FocusCycler;
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
constructor(locale: Locale);
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
render(): void;
|
|
49
|
+
/**
|
|
50
|
+
* @inheritDoc
|
|
51
|
+
*/
|
|
52
|
+
focus(): void;
|
|
53
|
+
}
|