@ckeditor/ckeditor5-track-changes 44.1.0 → 44.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -2
- package/README.md +1 -1
- package/build/track-changes.js +3 -3
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +7 -0
- package/dist/index-content.css +3 -2
- package/dist/index-editor.css +13 -2
- package/dist/index.css +24 -2
- package/dist/index.js +4 -4
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/contexts.json +3 -1
- package/lang/translations/af.po +13 -5
- package/lang/translations/ar.po +13 -5
- package/lang/translations/ast.po +13 -5
- package/lang/translations/az.po +13 -5
- package/lang/translations/bg.po +13 -5
- package/lang/translations/bn.po +13 -5
- package/lang/translations/bs.po +13 -5
- package/lang/translations/ca.po +13 -5
- package/lang/translations/cs.po +13 -5
- package/lang/translations/da.po +13 -5
- package/lang/translations/de-ch.po +13 -5
- package/lang/translations/de.po +13 -5
- package/lang/translations/el.po +13 -5
- package/lang/translations/en-au.po +13 -5
- package/lang/translations/en-gb.po +13 -5
- package/lang/translations/en.po +13 -5
- package/lang/translations/eo.po +13 -5
- package/lang/translations/es-co.po +13 -5
- package/lang/translations/es.po +13 -5
- package/lang/translations/et.po +13 -5
- package/lang/translations/eu.po +13 -5
- package/lang/translations/fa.po +13 -5
- package/lang/translations/fi.po +13 -5
- package/lang/translations/fr.po +13 -5
- package/lang/translations/gl.po +13 -5
- package/lang/translations/gu.po +13 -5
- package/lang/translations/he.po +13 -5
- package/lang/translations/hi.po +13 -5
- package/lang/translations/hr.po +13 -5
- package/lang/translations/hu.po +13 -5
- package/lang/translations/hy.po +13 -5
- package/lang/translations/id.po +13 -5
- package/lang/translations/it.po +13 -5
- package/lang/translations/ja.po +13 -5
- package/lang/translations/jv.po +13 -5
- package/lang/translations/kk.po +13 -5
- package/lang/translations/km.po +13 -5
- package/lang/translations/kn.po +13 -5
- package/lang/translations/ko.po +13 -5
- package/lang/translations/ku.po +13 -5
- package/lang/translations/lt.po +13 -5
- package/lang/translations/lv.po +13 -5
- package/lang/translations/ms.po +13 -5
- package/lang/translations/nb.po +13 -5
- package/lang/translations/ne.po +13 -5
- package/lang/translations/nl.po +13 -5
- package/lang/translations/no.po +13 -5
- package/lang/translations/oc.po +13 -5
- package/lang/translations/pl.po +13 -5
- package/lang/translations/pt-br.po +13 -5
- package/lang/translations/pt.po +13 -5
- package/lang/translations/ro.po +13 -5
- package/lang/translations/ru.po +13 -5
- package/lang/translations/si.po +13 -5
- package/lang/translations/sk.po +13 -5
- package/lang/translations/sl.po +13 -5
- package/lang/translations/sq.po +13 -5
- package/lang/translations/sr-latn.po +13 -5
- package/lang/translations/sr.po +13 -5
- package/lang/translations/sv.po +13 -5
- package/lang/translations/th.po +13 -5
- package/lang/translations/ti.po +13 -5
- package/lang/translations/tk.po +13 -5
- package/lang/translations/tr.po +13 -5
- package/lang/translations/tt.po +13 -5
- package/lang/translations/ug.po +13 -5
- package/lang/translations/uk.po +13 -5
- package/lang/translations/ur.po +13 -5
- package/lang/translations/uz.po +13 -5
- package/lang/translations/vi.po +13 -5
- package/lang/translations/zh-cn.po +13 -5
- package/lang/translations/zh.po +13 -5
- package/package.json +47 -10
- package/src/augmentation.d.ts +4 -2
- package/src/augmentation.js +1 -1
- package/src/commands/acceptsuggestioncommand.d.ts +1 -1
- package/src/commands/acceptsuggestioncommand.js +2 -2
- package/src/commands/discardsuggestioncommand.d.ts +1 -1
- package/src/commands/discardsuggestioncommand.js +2 -2
- package/src/commands/executeonallsuggestionscommand.d.ts +1 -1
- package/src/commands/executeonallsuggestionscommand.js +2 -2
- package/src/commands/executeonselectedsuggestionscommand.d.ts +1 -1
- package/src/commands/executeonselectedsuggestionscommand.js +2 -2
- package/src/commands/previewfinalcontentcommand.d.ts +26 -0
- package/src/commands/previewfinalcontentcommand.js +23 -0
- package/src/commands/trackchangescommand.d.ts +1 -1
- package/src/commands/trackchangescommand.js +2 -2
- package/src/index.d.ts +3 -1
- package/src/index.js +2 -2
- package/src/integrations/aiassistant.d.ts +1 -1
- package/src/integrations/aiassistant.js +2 -2
- package/src/integrations/alignment.d.ts +1 -1
- package/src/integrations/alignment.js +2 -2
- package/src/integrations/basicstyles.d.ts +1 -1
- package/src/integrations/basicstyles.js +2 -2
- package/src/integrations/blockquote.d.ts +1 -1
- package/src/integrations/blockquote.js +2 -2
- package/src/integrations/bookmark.d.ts +1 -1
- package/src/integrations/bookmark.js +2 -2
- package/src/integrations/casechange.d.ts +1 -1
- package/src/integrations/casechange.js +2 -2
- package/src/integrations/ckbox.d.ts +1 -1
- package/src/integrations/ckbox.js +2 -2
- package/src/integrations/codeblock.d.ts +1 -1
- package/src/integrations/codeblock.js +2 -2
- package/src/integrations/comments.d.ts +1 -1
- package/src/integrations/comments.js +2 -2
- package/src/integrations/deletecommand.d.ts +1 -1
- package/src/integrations/deletecommand.js +2 -2
- package/src/integrations/entercommand.d.ts +1 -1
- package/src/integrations/entercommand.js +2 -2
- package/src/integrations/findandreplace.d.ts +1 -1
- package/src/integrations/findandreplace.js +2 -2
- package/src/integrations/font.d.ts +1 -1
- package/src/integrations/font.js +2 -2
- package/src/integrations/formatpainter.d.ts +1 -1
- package/src/integrations/formatpainter.js +2 -2
- package/src/integrations/heading.d.ts +1 -1
- package/src/integrations/heading.js +2 -2
- package/src/integrations/highlight.d.ts +1 -1
- package/src/integrations/highlight.js +2 -2
- package/src/integrations/horizontalline.d.ts +1 -1
- package/src/integrations/horizontalline.js +2 -2
- package/src/integrations/htmlembed.d.ts +1 -1
- package/src/integrations/htmlembed.js +2 -2
- package/src/integrations/image.d.ts +1 -1
- package/src/integrations/image.js +2 -2
- package/src/integrations/imagereplace.d.ts +1 -1
- package/src/integrations/imagereplace.js +2 -2
- package/src/integrations/imagestyle.d.ts +1 -1
- package/src/integrations/imagestyle.js +2 -2
- package/src/integrations/importword.d.ts +1 -1
- package/src/integrations/importword.js +2 -2
- package/src/integrations/indent.d.ts +1 -1
- package/src/integrations/indent.js +2 -2
- package/src/integrations/inputcommand.d.ts +1 -1
- package/src/integrations/inputcommand.js +2 -2
- package/src/integrations/legacylist.d.ts +1 -1
- package/src/integrations/legacylist.js +2 -2
- package/src/integrations/legacylistproperties.d.ts +1 -1
- package/src/integrations/legacylistproperties.js +2 -2
- package/src/integrations/link.d.ts +1 -1
- package/src/integrations/link.js +2 -2
- package/src/integrations/list.d.ts +1 -1
- package/src/integrations/list.js +2 -2
- package/src/integrations/listproperties.d.ts +1 -1
- package/src/integrations/listproperties.js +2 -2
- package/src/integrations/mediaembed.d.ts +1 -1
- package/src/integrations/mediaembed.js +2 -2
- package/src/integrations/mention.d.ts +1 -1
- package/src/integrations/mention.js +2 -2
- package/src/integrations/mergefields.d.ts +1 -1
- package/src/integrations/mergefields.js +2 -2
- package/src/integrations/multilevellist.d.ts +1 -1
- package/src/integrations/multilevellist.js +2 -2
- package/src/integrations/pagebreak.d.ts +1 -1
- package/src/integrations/pagebreak.js +2 -2
- package/src/integrations/paragraph.d.ts +1 -1
- package/src/integrations/paragraph.js +2 -2
- package/src/integrations/removeformat.d.ts +1 -1
- package/src/integrations/removeformat.js +2 -2
- package/src/integrations/restrictededitingmode.d.ts +1 -1
- package/src/integrations/restrictededitingmode.js +2 -2
- package/src/integrations/shiftentercommand.d.ts +1 -1
- package/src/integrations/shiftentercommand.js +2 -2
- package/src/integrations/standardeditingmode.d.ts +1 -1
- package/src/integrations/standardeditingmode.js +2 -2
- package/src/integrations/style.d.ts +1 -1
- package/src/integrations/style.js +2 -2
- package/src/integrations/table.d.ts +1 -1
- package/src/integrations/table.js +2 -2
- package/src/integrations/tablecaption.d.ts +1 -1
- package/src/integrations/tablecaption.js +2 -2
- package/src/integrations/tableclipboard.d.ts +1 -1
- package/src/integrations/tableclipboard.js +2 -2
- package/src/integrations/tablecolumnresize.d.ts +1 -1
- package/src/integrations/tablecolumnresize.js +2 -2
- package/src/integrations/tableheadings.d.ts +1 -1
- package/src/integrations/tableheadings.js +2 -2
- package/src/integrations/tablemergesplit.d.ts +1 -1
- package/src/integrations/tablemergesplit.js +2 -2
- package/src/integrations/tableofcontents.d.ts +1 -1
- package/src/integrations/tableofcontents.js +2 -2
- package/src/integrations/tableproperties.d.ts +1 -1
- package/src/integrations/tableproperties.js +2 -2
- package/src/integrations/template.d.ts +1 -1
- package/src/integrations/template.js +2 -2
- package/src/integrations/title.d.ts +1 -1
- package/src/integrations/title.js +2 -2
- package/src/integrations/undo.d.ts +1 -1
- package/src/integrations/undo.js +2 -2
- package/src/integrations/uploadcare.d.ts +17 -0
- package/src/integrations/uploadcare.js +23 -0
- package/src/integrations/utils.d.ts +1 -1
- package/src/integrations/utils.js +2 -2
- package/src/suggestion.d.ts +1 -1
- package/src/suggestion.js +3 -3
- package/src/suggestiondescriptionfactory.d.ts +1 -1
- package/src/suggestiondescriptionfactory.js +2 -2
- package/src/trackchanges.d.ts +1 -1
- package/src/trackchanges.js +2 -2
- package/src/trackchangesconfig.d.ts +23 -1
- package/src/trackchangesconfig.js +1 -1
- package/src/trackchangesdata.d.ts +2 -2
- package/src/trackchangesdata.js +2 -2
- package/src/trackchangesediting.d.ts +3 -2
- package/src/trackchangesediting.js +2 -2
- package/src/trackchangespreview.d.ts +31 -0
- package/src/trackchangespreview.js +23 -0
- package/src/trackchangesui.d.ts +1 -1
- package/src/trackchangesui.js +2 -2
- package/src/ui/suggestioncontroller.d.ts +1 -1
- package/src/ui/suggestioncontroller.js +3 -3
- package/src/ui/view/basesuggestionthreadview.d.ts +1 -1
- package/src/ui/view/basesuggestionthreadview.js +2 -2
- package/src/ui/view/suggestionthreadview.d.ts +1 -1
- package/src/ui/view/suggestionthreadview.js +2 -2
- package/src/ui/view/suggestionview.d.ts +1 -1
- package/src/ui/view/suggestionview.js +2 -2
- package/src/ui/view/trackchangespreviewview.d.ts +48 -0
- package/src/ui/view/trackchangespreviewview.js +23 -0
- package/src/utils/common-translations.d.ts +1 -1
- package/src/utils/common-translations.js +2 -2
- package/src/utils/utils.d.ts +1 -1
- package/src/utils/utils.js +2 -2
- package/theme/icons/track-changes-accept.svg +1 -1
- package/theme/icons/track-changes-discard.svg +1 -1
- package/theme/icons/track-changes.svg +1 -1
- package/theme/trackchangespreview.css +22 -0
- package/dist/augmentation.d.ts +0 -46
- package/dist/commands/acceptsuggestioncommand.d.ts +0 -28
- package/dist/commands/discardsuggestioncommand.d.ts +0 -28
- package/dist/commands/executeonallsuggestionscommand.d.ts +0 -28
- package/dist/commands/executeonselectedsuggestionscommand.d.ts +0 -28
- package/dist/commands/trackchangescommand.d.ts +0 -30
- package/dist/index.d.ts +0 -23
- package/dist/integrations/aiassistant.d.ts +0 -21
- package/dist/integrations/alignment.d.ts +0 -21
- package/dist/integrations/basicstyles.d.ts +0 -21
- package/dist/integrations/blockquote.d.ts +0 -21
- package/dist/integrations/bookmark.d.ts +0 -21
- package/dist/integrations/casechange.d.ts +0 -21
- package/dist/integrations/ckbox.d.ts +0 -21
- package/dist/integrations/codeblock.d.ts +0 -21
- package/dist/integrations/comments.d.ts +0 -18
- package/dist/integrations/deletecommand.d.ts +0 -21
- package/dist/integrations/entercommand.d.ts +0 -20
- package/dist/integrations/findandreplace.d.ts +0 -25
- package/dist/integrations/font.d.ts +0 -21
- package/dist/integrations/formatpainter.d.ts +0 -21
- package/dist/integrations/heading.d.ts +0 -21
- package/dist/integrations/highlight.d.ts +0 -21
- package/dist/integrations/horizontalline.d.ts +0 -21
- package/dist/integrations/htmlembed.d.ts +0 -21
- package/dist/integrations/image.d.ts +0 -21
- package/dist/integrations/imagereplace.d.ts +0 -21
- package/dist/integrations/imagestyle.d.ts +0 -21
- package/dist/integrations/importword.d.ts +0 -22
- package/dist/integrations/indent.d.ts +0 -21
- package/dist/integrations/inputcommand.d.ts +0 -20
- package/dist/integrations/legacylist.d.ts +0 -21
- package/dist/integrations/legacylistproperties.d.ts +0 -33
- package/dist/integrations/link.d.ts +0 -21
- package/dist/integrations/list.d.ts +0 -21
- package/dist/integrations/listproperties.d.ts +0 -24
- package/dist/integrations/mediaembed.d.ts +0 -21
- package/dist/integrations/mention.d.ts +0 -21
- package/dist/integrations/mergefields.d.ts +0 -21
- package/dist/integrations/multilevellist.d.ts +0 -28
- package/dist/integrations/pagebreak.d.ts +0 -21
- package/dist/integrations/paragraph.d.ts +0 -21
- package/dist/integrations/removeformat.d.ts +0 -21
- package/dist/integrations/restrictededitingmode.d.ts +0 -21
- package/dist/integrations/shiftentercommand.d.ts +0 -20
- package/dist/integrations/standardeditingmode.d.ts +0 -21
- package/dist/integrations/style.d.ts +0 -21
- package/dist/integrations/table.d.ts +0 -46
- package/dist/integrations/tablecaption.d.ts +0 -26
- package/dist/integrations/tableclipboard.d.ts +0 -23
- package/dist/integrations/tablecolumnresize.d.ts +0 -30
- package/dist/integrations/tableheadings.d.ts +0 -26
- package/dist/integrations/tablemergesplit.d.ts +0 -26
- package/dist/integrations/tableofcontents.d.ts +0 -21
- package/dist/integrations/tableproperties.d.ts +0 -39
- package/dist/integrations/template.d.ts +0 -21
- package/dist/integrations/title.d.ts +0 -21
- package/dist/integrations/undo.d.ts +0 -21
- package/dist/integrations/utils.d.ts +0 -21
- package/dist/suggestion.d.ts +0 -295
- package/dist/suggestiondescriptionfactory.d.ts +0 -187
- package/dist/trackchanges.d.ts +0 -192
- package/dist/trackchangesconfig.d.ts +0 -89
- package/dist/trackchangesdata.d.ts +0 -53
- package/dist/trackchangesediting.d.ts +0 -563
- package/dist/trackchangesui.d.ts +0 -50
- package/dist/ui/suggestioncontroller.d.ts +0 -41
- package/dist/ui/view/basesuggestionthreadview.d.ts +0 -209
- package/dist/ui/view/suggestionthreadview.d.ts +0 -98
- package/dist/ui/view/suggestionview.d.ts +0 -194
- package/dist/utils/common-translations.d.ts +0 -13
- package/dist/utils/utils.d.ts +0 -41
|
@@ -1,209 +0,0 @@
|
|
|
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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module track-changes/ui/view/basesuggestionthreadview
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { FocusCycler, View, ViewCollection, type FocusableView } from 'ckeditor5/src/ui.js';
|
|
14
|
-
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
15
|
-
import type { EditorConfig } from 'ckeditor5/src/core.js';
|
|
16
|
-
import type Suggestion from '../../suggestion.js';
|
|
17
|
-
import type { CommentsListView, CommentThreadInputView, CommentView } from '@ckeditor/ckeditor5-comments';
|
|
18
|
-
import { AriaDescriptionView, type User } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
19
|
-
import type { Description } from '../../suggestiondescriptionfactory.js';
|
|
20
|
-
import type SuggestionView from './suggestionview.js';
|
|
21
|
-
/**
|
|
22
|
-
* An abstract suggestion thread view class that should be used as a base for suggestion thread view implementations.
|
|
23
|
-
* It provides some behaviors, flags and building blocks to use when creating a custom suggestion thread view class.
|
|
24
|
-
*
|
|
25
|
-
* All events fired by {@link module:comments/comments/ui/view/basecommentview~BaseCommentView}
|
|
26
|
-
* are delegated to {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView}.
|
|
27
|
-
* This means that {@link module:track-changes/ui/view/basesuggestionthreadview~BaseSuggestionThreadView} can also fire these
|
|
28
|
-
* events to communicate with CKEditor 5 collaboration features.
|
|
29
|
-
*
|
|
30
|
-
* For the usage examples check the {@glink features/collaboration/annotations/annotations-custom-view
|
|
31
|
-
* Annotations custom view} guide.
|
|
32
|
-
*/
|
|
33
|
-
export default abstract class BaseSuggestionThreadView extends View {
|
|
34
|
-
/**
|
|
35
|
-
* The list of comment views. It should be used as a part of the view template when present.
|
|
36
|
-
*/
|
|
37
|
-
commentsListView: CommentsListView | null;
|
|
38
|
-
/**
|
|
39
|
-
* The comment input area view. It should be used as a part of the view template when present.
|
|
40
|
-
*/
|
|
41
|
-
commentThreadInputView: CommentThreadInputView | null;
|
|
42
|
-
/**
|
|
43
|
-
* A helper view that provides an ARIA description for the comment thread used by
|
|
44
|
-
* assistive technologies.
|
|
45
|
-
*/
|
|
46
|
-
readonly ariaDescriptionView: AriaDescriptionView;
|
|
47
|
-
/**
|
|
48
|
-
* A boolean value that informs if the comment thread view is in the active state ("highlighted").
|
|
49
|
-
* A comment thread view is in this state when it is focused or was activated by the user in any different way.
|
|
50
|
-
*
|
|
51
|
-
* @observable
|
|
52
|
-
*/
|
|
53
|
-
isActive: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Suggestion creation date.
|
|
56
|
-
*
|
|
57
|
-
* @observable
|
|
58
|
-
*/
|
|
59
|
-
authoredAt: Date | null;
|
|
60
|
-
/**
|
|
61
|
-
* Flag that indicates whether suggestion acceptation is possible.
|
|
62
|
-
*
|
|
63
|
-
* @observable
|
|
64
|
-
*/
|
|
65
|
-
canAccept: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Flag that indicates whether suggestion discarding is possible.
|
|
68
|
-
*
|
|
69
|
-
* @observable
|
|
70
|
-
*/
|
|
71
|
-
canDiscard: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Stores description entries generated for this suggestion that describe what is the suggested change.
|
|
74
|
-
* They are used to create the final description presented in the suggestion view to the user.
|
|
75
|
-
*
|
|
76
|
-
* Note that one suggestion may include multiple changes.
|
|
77
|
-
*
|
|
78
|
-
* Most cases are simple and include just one description item:
|
|
79
|
-
*
|
|
80
|
-
* ```ts
|
|
81
|
-
* [
|
|
82
|
-
* { type: 'insertion', content: '*Insert:* "Foo"' }
|
|
83
|
-
* ]
|
|
84
|
-
* ```
|
|
85
|
-
*
|
|
86
|
-
* This description item represents a suggestion for inserting the "Foo" text. The `type` property describes the performed action
|
|
87
|
-
* while the `content` property contains additional information about the action and is optional.
|
|
88
|
-
*
|
|
89
|
-
* A more complex example is presented below:
|
|
90
|
-
*
|
|
91
|
-
* ```ts
|
|
92
|
-
* [
|
|
93
|
-
* { type: 'insertion', content: '*Insert:* 2 paragraphs' },
|
|
94
|
-
* { type: 'insertion', content: '*Insert:* image' },
|
|
95
|
-
* { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
|
|
96
|
-
* ]
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* In this example, there are three description instances (or lines). Two new (empty) paragraphs were added,
|
|
100
|
-
* an image was added and then "Foo" text was replaced by "Bar". The above structure could be rendered as:
|
|
101
|
-
*
|
|
102
|
-
* ```html
|
|
103
|
-
* <p><strong>Insert:</strong> 2 paragraphs</p>
|
|
104
|
-
* <p><strong>Insert:</strong> image</p>
|
|
105
|
-
* <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @observable
|
|
109
|
-
*/
|
|
110
|
-
descriptionParts: Array<Description>;
|
|
111
|
-
/**
|
|
112
|
-
* Informs whether the suggestion thread has any changes that have not been saved.
|
|
113
|
-
*
|
|
114
|
-
* @observable
|
|
115
|
-
*/
|
|
116
|
-
isDirty: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* Informs whether the suggestion can be accepted or discarded.
|
|
119
|
-
*
|
|
120
|
-
* @observable
|
|
121
|
-
*/
|
|
122
|
-
isEnabled: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* The number of items in the view, where the suggestion itself counts as one.
|
|
125
|
-
*
|
|
126
|
-
* In other words, it is equal to the number of comments in the suggestion thread view plus one.
|
|
127
|
-
*
|
|
128
|
-
* @observable
|
|
129
|
-
*/
|
|
130
|
-
readonly length: number;
|
|
131
|
-
/**
|
|
132
|
-
* An accessible thread label text exposed to assistive technologies.
|
|
133
|
-
*/
|
|
134
|
-
ariaLabel: string;
|
|
135
|
-
/**
|
|
136
|
-
* A collection of focusable child views.
|
|
137
|
-
*/
|
|
138
|
-
readonly focusables: ViewCollection<FocusableView>;
|
|
139
|
-
/**
|
|
140
|
-
* Tracks information about DOM focus in the thread.
|
|
141
|
-
*/
|
|
142
|
-
readonly focusTracker: FocusTracker;
|
|
143
|
-
/**
|
|
144
|
-
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
145
|
-
*/
|
|
146
|
-
readonly keystrokes: KeystrokeHandler;
|
|
147
|
-
/**
|
|
148
|
-
* Helps cycling over focusable views in the thread.
|
|
149
|
-
*/
|
|
150
|
-
readonly focusCycler: FocusCycler;
|
|
151
|
-
constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
|
|
152
|
-
/**
|
|
153
|
-
* @inheritDoc
|
|
154
|
-
*/
|
|
155
|
-
render(): void;
|
|
156
|
-
/**
|
|
157
|
-
* Focuses the view.
|
|
158
|
-
*/
|
|
159
|
-
focus(): void;
|
|
160
|
-
/**
|
|
161
|
-
* @inheritDoc
|
|
162
|
-
*/
|
|
163
|
-
destroy(): void;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Fired when a user performed an action that should lead to accepting the suggestion.
|
|
167
|
-
*
|
|
168
|
-
* This event is not fired by default by any component created by `BaseSuggestionThreadView`.
|
|
169
|
-
* If you create a view class extending `BaseSuggestionCommentView`, you should provide
|
|
170
|
-
* a UI element that will fire this event.
|
|
171
|
-
*
|
|
172
|
-
* @eventName ~BaseSuggestionThreadView#acceptSuggestion
|
|
173
|
-
*/
|
|
174
|
-
export type AcceptSuggestionEvent = {
|
|
175
|
-
name: 'acceptSuggestion';
|
|
176
|
-
args: [
|
|
177
|
-
id: string
|
|
178
|
-
];
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Fired when a user performed an action that should lead to discarding the suggestion.
|
|
182
|
-
*
|
|
183
|
-
* This event is not fired by default by any component created by `BaseSuggestionThreadView`.
|
|
184
|
-
* If you create a view class extending `BaseSuggestionCommentView`, you should provide
|
|
185
|
-
* a UI element that will fire this event.
|
|
186
|
-
*
|
|
187
|
-
* @eventName ~BaseSuggestionThreadView#discardSuggestion
|
|
188
|
-
*/
|
|
189
|
-
export type DiscardSuggestionEvent = {
|
|
190
|
-
name: 'discardSuggestion';
|
|
191
|
-
args: [
|
|
192
|
-
id: string
|
|
193
|
-
];
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Config used for suggestion thread views.
|
|
197
|
-
*/
|
|
198
|
-
export interface SuggestionThreadConfig {
|
|
199
|
-
disableComments: boolean;
|
|
200
|
-
editorConfig: EditorConfig;
|
|
201
|
-
maxCommentsWhenCollapsed: number;
|
|
202
|
-
maxThreadTotalWeight: number;
|
|
203
|
-
maxCommentCharsWhenCollapsed: number;
|
|
204
|
-
formatDateTime: (date: Date | string) => string;
|
|
205
|
-
CommentView: typeof CommentView;
|
|
206
|
-
CommentsListView: typeof CommentsListView;
|
|
207
|
-
CommentThreadInputView: typeof CommentThreadInputView;
|
|
208
|
-
SuggestionView: typeof SuggestionView;
|
|
209
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module track-changes/ui/view/suggestionthreadview
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { default as BaseSuggestionThreadView, type SuggestionThreadConfig } from './basesuggestionthreadview.js';
|
|
14
|
-
import { type TemplateDefinition, type ViewWithFocusCycler } from 'ckeditor5/src/ui.js';
|
|
15
|
-
import { type User } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
16
|
-
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
17
|
-
import type Suggestion from '../../suggestion.js';
|
|
18
|
-
import type SuggestionView from './suggestionview.js';
|
|
19
|
-
/**
|
|
20
|
-
* The default view for a suggestion thread.
|
|
21
|
-
*
|
|
22
|
-
* This view can be replaced by other view by overwriting the
|
|
23
|
-
* {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionThreadView} configuration.
|
|
24
|
-
*/
|
|
25
|
-
export default class SuggestionThreadView extends BaseSuggestionThreadView implements ViewWithFocusCycler {
|
|
26
|
-
/**
|
|
27
|
-
* The suggestion thread view type.
|
|
28
|
-
*
|
|
29
|
-
* This value is not equal to the suggestion (model) type. It is evaluated based on the type of the first suggestion for
|
|
30
|
-
* the suggestion thread view template purposes.
|
|
31
|
-
*
|
|
32
|
-
* @observable
|
|
33
|
-
*/
|
|
34
|
-
type: 'format' | 'replace' | 'deletion' | 'insertion' | '';
|
|
35
|
-
/**
|
|
36
|
-
* A suggestion description explaining what has been changed. To be presented to the user.
|
|
37
|
-
*
|
|
38
|
-
* @observable
|
|
39
|
-
*/
|
|
40
|
-
description: string;
|
|
41
|
-
/**
|
|
42
|
-
* A view displaying a detailed information about the suggestion as well as controls to accept or discard it.
|
|
43
|
-
*/
|
|
44
|
-
suggestionView: SuggestionView;
|
|
45
|
-
constructor(locale: Locale, model: Suggestion, localUser: User, config: SuggestionThreadConfig);
|
|
46
|
-
/**
|
|
47
|
-
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
48
|
-
*
|
|
49
|
-
* Overwrite this method if you want to set a custom template for the suggestion thread view.
|
|
50
|
-
*
|
|
51
|
-
* The template looks as follows:
|
|
52
|
-
*
|
|
53
|
-
* ```ts
|
|
54
|
-
* const bind = this.bindTemplate;
|
|
55
|
-
* const suggestionThreadChildren = [
|
|
56
|
-
* this.suggestionView
|
|
57
|
-
* ];
|
|
58
|
-
*
|
|
59
|
-
* if ( this.commentsListView ) {
|
|
60
|
-
* suggestionThreadChildren.push( this.commentsListView );
|
|
61
|
-
* }
|
|
62
|
-
*
|
|
63
|
-
* if ( this.commentThreadInputView ) {
|
|
64
|
-
* suggestionThreadChildren.push( this.commentThreadInputView );
|
|
65
|
-
* }
|
|
66
|
-
*
|
|
67
|
-
* suggestionThreadChildren.push( this.ariaDescriptionView );
|
|
68
|
-
*
|
|
69
|
-
* return {
|
|
70
|
-
* tag: 'div',
|
|
71
|
-
* attributes: {
|
|
72
|
-
* class: [
|
|
73
|
-
* 'ck',
|
|
74
|
-
* 'ck-rounded-corners',
|
|
75
|
-
* 'ck-suggestion-wrapper',
|
|
76
|
-
* bind.if( 'isActive', 'ck-suggestion-wrapper--active' ),
|
|
77
|
-
* bind.to( 'type', value => `ck-suggestion-${ value }` ),
|
|
78
|
-
* this._config.disableComments && 'ck-suggestion--disabled-comments'
|
|
79
|
-
* ],
|
|
80
|
-
* 'data-suggestion-id': this._model.id,
|
|
81
|
-
* 'data-thread-id': this._model.commentThread!.id,
|
|
82
|
-
* 'data-author-id': this._model.author.id,
|
|
83
|
-
* // Needed for managing focus after adding new comment.
|
|
84
|
-
* tabindex: 0,
|
|
85
|
-
* role: 'listitem',
|
|
86
|
-
* 'aria-label': bind.to( 'ariaLabel' ),
|
|
87
|
-
* 'aria-describedby': this.ariaDescriptionView.id
|
|
88
|
-
* },
|
|
89
|
-
* children: suggestionThreadChildren
|
|
90
|
-
* };
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
getTemplate(): TemplateDefinition;
|
|
94
|
-
/**
|
|
95
|
-
* @inheritDoc
|
|
96
|
-
*/
|
|
97
|
-
render(): void;
|
|
98
|
-
}
|
|
@@ -1,194 +0,0 @@
|
|
|
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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module track-changes/ui/view/suggestionview
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
14
|
-
import { View, type TemplateDefinition, type FocusableView, ViewCollection, FocusCycler } from 'ckeditor5/src/ui.js';
|
|
15
|
-
import { LateFocusButtonView, UserView } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
16
|
-
import type Suggestion from '../../suggestion.js';
|
|
17
|
-
/**
|
|
18
|
-
* A view displaying a detailed information about the suggestion as well as controls to accept or discard it.
|
|
19
|
-
*
|
|
20
|
-
* This view can be replaced by other view by overwriting the
|
|
21
|
-
* {@link module:track-changes/trackchangesconfig~TrackChangesConfig#SuggestionView} configuration.
|
|
22
|
-
*/
|
|
23
|
-
export default class SuggestionView extends View implements FocusableView {
|
|
24
|
-
/**
|
|
25
|
-
* A suggestion description explaining what has been changed. To be presented to the user.
|
|
26
|
-
*
|
|
27
|
-
* @observable
|
|
28
|
-
*/
|
|
29
|
-
description: string;
|
|
30
|
-
/**
|
|
31
|
-
* A user view for the suggestion author.
|
|
32
|
-
*/
|
|
33
|
-
userView: UserView;
|
|
34
|
-
/**
|
|
35
|
-
* A button view for the button that accepts the suggestion.
|
|
36
|
-
*/
|
|
37
|
-
acceptButton: LateFocusButtonView;
|
|
38
|
-
/**
|
|
39
|
-
* A button view for the button that discards the suggestion.
|
|
40
|
-
*/
|
|
41
|
-
discardButton: LateFocusButtonView;
|
|
42
|
-
/**
|
|
43
|
-
* A collection of focusable child views.
|
|
44
|
-
*/
|
|
45
|
-
readonly focusables: ViewCollection<FocusableView>;
|
|
46
|
-
/**
|
|
47
|
-
* Tracks information about DOM focus in the suggestion.
|
|
48
|
-
*/
|
|
49
|
-
readonly focusTracker: FocusTracker;
|
|
50
|
-
/**
|
|
51
|
-
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
52
|
-
*/
|
|
53
|
-
readonly keystrokes: KeystrokeHandler;
|
|
54
|
-
/**
|
|
55
|
-
* Helps cycling over focusable views in the suggestion.
|
|
56
|
-
*/
|
|
57
|
-
readonly focusCycler: FocusCycler;
|
|
58
|
-
/**
|
|
59
|
-
* Suggestion creation date.
|
|
60
|
-
*
|
|
61
|
-
* @observable
|
|
62
|
-
*/
|
|
63
|
-
authoredAt: Date | null;
|
|
64
|
-
constructor(locale: Locale, model: Suggestion, config: SuggestionConfig);
|
|
65
|
-
/**
|
|
66
|
-
* @inheritDoc
|
|
67
|
-
*/
|
|
68
|
-
render(): void;
|
|
69
|
-
/**
|
|
70
|
-
* Returns a template definition that will be passed to {@link module:ui/view~View#setTemplate}.
|
|
71
|
-
*
|
|
72
|
-
* Overwrite this method if you want to set a custom template for the suggestion view.
|
|
73
|
-
*
|
|
74
|
-
* The template looks as follows:
|
|
75
|
-
*
|
|
76
|
-
* ```ts
|
|
77
|
-
* const bind = this.bindTemplate;
|
|
78
|
-
* const suggestionContentElements = [
|
|
79
|
-
* {
|
|
80
|
-
* tag: 'div',
|
|
81
|
-
*
|
|
82
|
-
* attributes: {
|
|
83
|
-
* class: [ 'ck-suggestion__info', 'ck-annotation__info' ]
|
|
84
|
-
* },
|
|
85
|
-
*
|
|
86
|
-
* children: [
|
|
87
|
-
* {
|
|
88
|
-
* tag: 'span',
|
|
89
|
-
*
|
|
90
|
-
* children: [
|
|
91
|
-
* {
|
|
92
|
-
* text: this.userView.name
|
|
93
|
-
* }
|
|
94
|
-
* ],
|
|
95
|
-
*
|
|
96
|
-
* attributes: {
|
|
97
|
-
* class: [ 'ck-suggestion__info-name', 'ck-annotation__info-name' ]
|
|
98
|
-
* }
|
|
99
|
-
* },
|
|
100
|
-
* {
|
|
101
|
-
* tag: 'time',
|
|
102
|
-
*
|
|
103
|
-
* attributes: {
|
|
104
|
-
* datetime: bind.to( 'authoredAt' ),
|
|
105
|
-
* class: [ 'ck-comment__info-time', 'ck-annotation__info-time' ]
|
|
106
|
-
* },
|
|
107
|
-
*
|
|
108
|
-
* children: [
|
|
109
|
-
* {
|
|
110
|
-
* text: bind.to( 'authoredAt', value => this._config.formatDateTime( value ) )
|
|
111
|
-
* }
|
|
112
|
-
* ]
|
|
113
|
-
* }
|
|
114
|
-
* ]
|
|
115
|
-
* },
|
|
116
|
-
* {
|
|
117
|
-
* tag: 'div',
|
|
118
|
-
*
|
|
119
|
-
* attributes: {
|
|
120
|
-
* class: [ 'ck-suggestion__actions', 'ck-annotation__actions' ]
|
|
121
|
-
* },
|
|
122
|
-
*
|
|
123
|
-
* children: [
|
|
124
|
-
* this.acceptButton,
|
|
125
|
-
* this.discardButton
|
|
126
|
-
* ]
|
|
127
|
-
* },
|
|
128
|
-
* {
|
|
129
|
-
* tag: 'div',
|
|
130
|
-
*
|
|
131
|
-
* attributes: {
|
|
132
|
-
* class: [ 'ck-annotation__content-wrapper' ]
|
|
133
|
-
* }
|
|
134
|
-
* }
|
|
135
|
-
* ];
|
|
136
|
-
*
|
|
137
|
-
* if ( this._model.isExternal ) {
|
|
138
|
-
* suggestionContentElements.push( {
|
|
139
|
-
* tag: 'div',
|
|
140
|
-
*
|
|
141
|
-
* attributes: {
|
|
142
|
-
* class: [ 'ck-comment__external' ]
|
|
143
|
-
* },
|
|
144
|
-
*
|
|
145
|
-
* children: [ {
|
|
146
|
-
* text: this.getExternalSuggestionNote()
|
|
147
|
-
* } ]
|
|
148
|
-
* } );
|
|
149
|
-
* }
|
|
150
|
-
*
|
|
151
|
-
* return {
|
|
152
|
-
* tag: 'div',
|
|
153
|
-
*
|
|
154
|
-
* attributes: {
|
|
155
|
-
* class: [
|
|
156
|
-
* 'ck-suggestion',
|
|
157
|
-
* 'ck-annotation'
|
|
158
|
-
* ],
|
|
159
|
-
* tabindex: -1
|
|
160
|
-
* },
|
|
161
|
-
*
|
|
162
|
-
* children: [
|
|
163
|
-
* this.userView,
|
|
164
|
-
* {
|
|
165
|
-
* tag: 'div',
|
|
166
|
-
*
|
|
167
|
-
* attributes: {
|
|
168
|
-
* class: [ 'ck-suggestion__main', 'ck-annotation__main' ],
|
|
169
|
-
* role: 'presentation'
|
|
170
|
-
* },
|
|
171
|
-
*
|
|
172
|
-
* children: suggestionContentElements
|
|
173
|
-
* }
|
|
174
|
-
* ]
|
|
175
|
-
* };
|
|
176
|
-
* ```
|
|
177
|
-
*/
|
|
178
|
-
getTemplate(): TemplateDefinition;
|
|
179
|
-
/**
|
|
180
|
-
* @inheritDoc
|
|
181
|
-
*/
|
|
182
|
-
focus(): void;
|
|
183
|
-
/**
|
|
184
|
-
* Gets the translated notification text which indicates that the author name comes from an external source.
|
|
185
|
-
*/
|
|
186
|
-
getUserViewNotificationText(): string | null;
|
|
187
|
-
/**
|
|
188
|
-
* Gets the translated note which indicates that the suggestion comes from an external source.
|
|
189
|
-
*/
|
|
190
|
-
getExternalSuggestionNote(): string;
|
|
191
|
-
}
|
|
192
|
-
export interface SuggestionConfig {
|
|
193
|
-
formatDateTime: (date: Date | string) => string;
|
|
194
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module track-changes/utils/common-translations
|
|
11
|
-
*/
|
|
12
|
-
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
13
|
-
export declare function getTranslation(locale: Locale, id: string, values?: number | string | ReadonlyArray<number | string>): string;
|
package/dist/utils/utils.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module track-changes/utils/utils
|
|
11
|
-
*/
|
|
12
|
-
import type { Command } from 'ckeditor5/src/core.js';
|
|
13
|
-
import type { DocumentSelection, Model } from 'ckeditor5/src/engine.js';
|
|
14
|
-
import type Suggestion from '../suggestion.js';
|
|
15
|
-
import type { Description } from '../suggestiondescriptionfactory.js';
|
|
16
|
-
/**
|
|
17
|
-
* Used in tests for easy suggestion comparison.
|
|
18
|
-
*/
|
|
19
|
-
export declare function normalizeDescription(description: Array<Description> | Description): string;
|
|
20
|
-
/**
|
|
21
|
-
* Renders a rich HTML description out of primitive description string.
|
|
22
|
-
*/
|
|
23
|
-
export declare function renderDescription(description: string, color?: {
|
|
24
|
-
value: string;
|
|
25
|
-
title: string;
|
|
26
|
-
}): string;
|
|
27
|
-
export declare function sortSuggestions(suggestions: Array<Suggestion>): Array<Suggestion>;
|
|
28
|
-
/**
|
|
29
|
-
* From the list of passed `suggestions` returns those that are selected by given `selection`.
|
|
30
|
-
*/
|
|
31
|
-
export declare function getSelectedSuggestions(selection: DocumentSelection, suggestions: Array<Suggestion>): Set<Suggestion>;
|
|
32
|
-
/**
|
|
33
|
-
* How many suggestion actions should be put into one batch when multiple suggestions are accepted or discarded.
|
|
34
|
-
*/
|
|
35
|
-
export declare const MAX_SUGGESTION_ACTIONS_IN_BATCH = 100;
|
|
36
|
-
/**
|
|
37
|
-
* Executes given `command` for given `suggestions`. If there is a lot of suggestions, the command executions is split into batches.
|
|
38
|
-
* There is at most `MAX_SUGGESTION_ACTIONS_IN_BATCH` exeuctions in one batch. As a result, this limits number of actions to be done
|
|
39
|
-
* in one undo step but may create multiple undo steps.
|
|
40
|
-
*/
|
|
41
|
-
export declare function executeCommandForSuggestions(model: Model, command: Command, suggestions: Array<Suggestion>): void;
|