@ckeditor/ckeditor5-ui 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 +21 -0
- package/README.md +26 -0
- package/ckeditor5-metadata.json +25 -0
- package/dist/arialiveannouncer.d.ts +113 -0
- package/dist/augmentation.d.ts +92 -0
- package/dist/autocomplete/autocompleteview.d.ts +85 -0
- package/dist/badge/badge.d.ts +133 -0
- package/dist/bindings/addkeyboardhandlingforgrid.d.ts +31 -0
- package/dist/bindings/clickoutsidehandler.d.ts +34 -0
- package/dist/bindings/csstransitiondisablermixin.d.ts +44 -0
- package/dist/bindings/draggableviewmixin.d.ts +50 -0
- package/dist/bindings/injectcsstransitiondisabler.d.ts +63 -0
- package/dist/bindings/preventdefault.d.ts +37 -0
- package/dist/bindings/submithandler.d.ts +61 -0
- package/dist/button/button.d.ts +179 -0
- package/dist/button/buttonlabel.d.ts +38 -0
- package/dist/button/buttonlabelview.d.ts +35 -0
- package/dist/button/buttonview.d.ts +201 -0
- package/dist/button/filedialogbuttonview.d.ts +111 -0
- package/dist/button/listitembuttonview.d.ts +82 -0
- package/dist/button/switchbuttonview.d.ts +49 -0
- package/dist/collapsible/collapsibleview.d.ts +74 -0
- package/dist/colorgrid/colorgridview.d.ts +136 -0
- package/dist/colorgrid/colortileview.d.ts +32 -0
- package/dist/colorgrid/utils.d.ts +51 -0
- package/dist/colorpicker/colorpickerview.d.ts +177 -0
- package/dist/colorpicker/utils.d.ts +52 -0
- package/dist/colorselector/colorgridsfragmentview.d.ts +199 -0
- package/dist/colorselector/colorpickerfragmentview.d.ts +137 -0
- package/dist/colorselector/colorselectorview.d.ts +246 -0
- package/dist/colorselector/documentcolorcollection.d.ts +74 -0
- package/dist/componentfactory.d.ts +85 -0
- package/dist/dialog/dialog.d.ts +281 -0
- package/dist/dialog/dialogactionsview.d.ts +73 -0
- package/dist/dialog/dialogcontentview.d.ts +31 -0
- package/dist/dialog/dialogview.d.ts +260 -0
- package/dist/dropdown/button/dropdownbutton.d.ts +29 -0
- package/dist/dropdown/button/dropdownbuttonview.d.ts +52 -0
- package/dist/dropdown/button/splitbuttonview.d.ts +166 -0
- package/dist/dropdown/dropdownpanelfocusable.d.ts +25 -0
- package/dist/dropdown/dropdownpanelview.d.ts +66 -0
- package/dist/dropdown/dropdownview.d.ts +332 -0
- package/dist/dropdown/menu/dropdownmenubehaviors.d.ts +48 -0
- package/dist/dropdown/menu/dropdownmenubuttonview.d.ts +40 -0
- package/dist/dropdown/menu/dropdownmenulistitembuttonview.d.ts +21 -0
- package/dist/dropdown/menu/dropdownmenulistitemview.d.ts +26 -0
- package/dist/dropdown/menu/dropdownmenulistview.d.ts +28 -0
- package/dist/dropdown/menu/dropdownmenunestedmenupanelview.d.ts +38 -0
- package/dist/dropdown/menu/dropdownmenunestedmenuview.d.ts +135 -0
- package/dist/dropdown/menu/dropdownmenurootlistview.d.ts +144 -0
- package/dist/dropdown/menu/utils.d.ts +128 -0
- package/dist/dropdown/utils.d.ts +297 -0
- package/dist/editableui/editableuiview.d.ts +76 -0
- package/dist/editableui/inline/inlineeditableuiview.d.ts +48 -0
- package/dist/editorui/accessibilityhelp/accessibilityhelp.d.ts +59 -0
- package/dist/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +39 -0
- package/dist/editorui/bodycollection.d.ts +59 -0
- package/dist/editorui/boxed/boxededitoruiview.d.ts +44 -0
- package/dist/editorui/editorui.d.ts +358 -0
- package/dist/editorui/editoruiview.d.ts +48 -0
- package/dist/editorui/evaluationbadge.d.ts +37 -0
- package/dist/editorui/poweredby.d.ts +38 -0
- package/dist/focuscycler.d.ts +295 -0
- package/dist/formheader/formheaderview.d.ts +62 -0
- package/dist/highlightedtext/buttonlabelwithhighlightview.d.ts +34 -0
- package/dist/highlightedtext/highlightedtextview.d.ts +42 -0
- package/dist/highlightedtext/labelwithhighlightview.d.ts +30 -0
- package/dist/icon/iconview.d.ts +92 -0
- package/dist/iframe/iframeview.d.ts +54 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +754 -0
- package/dist/index.css +1063 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +17688 -0
- package/dist/index.js.map +1 -0
- package/dist/input/inputbase.d.ts +123 -0
- package/dist/input/inputview.d.ts +40 -0
- package/dist/inputnumber/inputnumberview.d.ts +53 -0
- package/dist/inputtext/inputtextview.d.ts +22 -0
- package/dist/label/labelview.d.ts +40 -0
- package/dist/labeledfield/labeledfieldview.d.ts +191 -0
- package/dist/labeledfield/utils.d.ts +127 -0
- package/dist/labeledinput/labeledinputview.d.ts +129 -0
- package/dist/list/listitemgroupview.d.ts +63 -0
- package/dist/list/listitemview.d.ts +40 -0
- package/dist/list/listseparatorview.d.ts +22 -0
- package/dist/list/listview.d.ts +128 -0
- package/dist/menubar/menubarmenubuttonview.d.ts +39 -0
- package/dist/menubar/menubarmenulistitembuttonview.d.ts +25 -0
- package/dist/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +27 -0
- package/dist/menubar/menubarmenulistitemview.d.ts +29 -0
- package/dist/menubar/menubarmenulistview.d.ts +33 -0
- package/dist/menubar/menubarmenupanelview.d.ts +57 -0
- package/dist/menubar/menubarmenuview.d.ts +113 -0
- package/dist/menubar/menubarview.d.ts +177 -0
- package/dist/menubar/utils.d.ts +451 -0
- package/dist/model.d.ts +26 -0
- package/dist/notification/notification.d.ts +219 -0
- package/dist/panel/balloon/balloonpanelview.d.ts +701 -0
- package/dist/panel/balloon/contextualballoon.d.ts +313 -0
- package/dist/panel/sticky/stickypanelview.d.ts +160 -0
- package/dist/search/filteredview.d.ts +35 -0
- package/dist/search/filtergroupanditemnames.d.ts +19 -0
- package/dist/search/searchinfoview.d.ts +49 -0
- package/dist/search/searchresultsview.d.ts +58 -0
- package/dist/search/text/searchtextqueryview.d.ts +80 -0
- package/dist/search/text/searchtextview.d.ts +223 -0
- package/dist/spinner/spinnerview.d.ts +29 -0
- package/dist/template.d.ts +946 -0
- package/dist/textarea/textareaview.d.ts +108 -0
- package/dist/toolbar/balloon/balloontoolbar.d.ts +130 -0
- package/dist/toolbar/block/blockbuttonview.d.ts +39 -0
- package/dist/toolbar/block/blocktoolbar.d.ts +175 -0
- package/dist/toolbar/normalizetoolbarconfig.d.ts +44 -0
- package/dist/toolbar/toolbarlinebreakview.d.ts +22 -0
- package/dist/toolbar/toolbarseparatorview.d.ts +22 -0
- package/dist/toolbar/toolbarview.d.ts +271 -0
- package/dist/tooltipmanager.d.ts +192 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +5 -0
- package/dist/translations/af.umd.js +11 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/ast.d.ts +8 -0
- package/dist/translations/ast.js +5 -0
- package/dist/translations/ast.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +5 -0
- package/dist/translations/bs.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en-gb.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/eo.d.ts +8 -0
- package/dist/translations/eo.js +5 -0
- package/dist/translations/eo.umd.js +11 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +5 -0
- package/dist/translations/es-co.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +5 -0
- package/dist/translations/eu.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +5 -0
- package/dist/translations/kn.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.umd.js +11 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/ne.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sl.d.ts +8 -0
- package/dist/translations/sl.js +5 -0
- package/dist/translations/sl.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/view.d.ts +426 -0
- package/dist/viewcollection.d.ts +143 -0
- package/lang/contexts.json +51 -0
- package/lang/translations/af.po +214 -0
- package/lang/translations/ar.po +214 -0
- package/lang/translations/ast.po +214 -0
- package/lang/translations/az.po +214 -0
- package/lang/translations/bg.po +214 -0
- package/lang/translations/bn.po +214 -0
- package/lang/translations/bs.po +214 -0
- package/lang/translations/ca.po +214 -0
- package/lang/translations/cs.po +214 -0
- package/lang/translations/da.po +214 -0
- package/lang/translations/de-ch.po +214 -0
- package/lang/translations/de.po +214 -0
- package/lang/translations/el.po +214 -0
- package/lang/translations/en-au.po +214 -0
- package/lang/translations/en-gb.po +214 -0
- package/lang/translations/en.po +214 -0
- package/lang/translations/eo.po +214 -0
- package/lang/translations/es-co.po +214 -0
- package/lang/translations/es.po +214 -0
- package/lang/translations/et.po +214 -0
- package/lang/translations/eu.po +214 -0
- package/lang/translations/fa.po +214 -0
- package/lang/translations/fi.po +214 -0
- package/lang/translations/fr.po +214 -0
- package/lang/translations/gl.po +214 -0
- package/lang/translations/he.po +214 -0
- package/lang/translations/hi.po +214 -0
- package/lang/translations/hr.po +214 -0
- package/lang/translations/hu.po +214 -0
- package/lang/translations/id.po +214 -0
- package/lang/translations/it.po +214 -0
- package/lang/translations/ja.po +214 -0
- package/lang/translations/jv.po +214 -0
- package/lang/translations/km.po +214 -0
- package/lang/translations/kn.po +214 -0
- package/lang/translations/ko.po +214 -0
- package/lang/translations/ku.po +214 -0
- package/lang/translations/lt.po +214 -0
- package/lang/translations/lv.po +214 -0
- package/lang/translations/ms.po +214 -0
- package/lang/translations/nb.po +214 -0
- package/lang/translations/ne.po +214 -0
- package/lang/translations/nl.po +214 -0
- package/lang/translations/no.po +214 -0
- package/lang/translations/pl.po +214 -0
- package/lang/translations/pt-br.po +214 -0
- package/lang/translations/pt.po +214 -0
- package/lang/translations/ro.po +214 -0
- package/lang/translations/ru.po +214 -0
- package/lang/translations/sk.po +214 -0
- package/lang/translations/sl.po +214 -0
- package/lang/translations/sq.po +214 -0
- package/lang/translations/sr-latn.po +214 -0
- package/lang/translations/sr.po +214 -0
- package/lang/translations/sv.po +214 -0
- package/lang/translations/th.po +214 -0
- package/lang/translations/ti.po +214 -0
- package/lang/translations/tk.po +214 -0
- package/lang/translations/tr.po +214 -0
- package/lang/translations/tt.po +214 -0
- package/lang/translations/ug.po +214 -0
- package/lang/translations/uk.po +214 -0
- package/lang/translations/ur.po +214 -0
- package/lang/translations/uz.po +214 -0
- package/lang/translations/vi.po +214 -0
- package/lang/translations/zh-cn.po +214 -0
- package/lang/translations/zh.po +214 -0
- package/package.json +42 -0
- package/src/arialiveannouncer.d.ts +109 -0
- package/src/arialiveannouncer.js +165 -0
- package/src/augmentation.d.ts +88 -0
- package/src/augmentation.js +5 -0
- package/src/autocomplete/autocompleteview.d.ts +81 -0
- package/src/autocomplete/autocompleteview.js +154 -0
- package/src/badge/badge.d.ts +129 -0
- package/src/badge/badge.js +218 -0
- package/src/bindings/addkeyboardhandlingforgrid.d.ts +27 -0
- package/src/bindings/addkeyboardhandlingforgrid.js +107 -0
- package/src/bindings/clickoutsidehandler.d.ts +30 -0
- package/src/bindings/clickoutsidehandler.js +37 -0
- package/src/bindings/csstransitiondisablermixin.d.ts +40 -0
- package/src/bindings/csstransitiondisablermixin.js +55 -0
- package/src/bindings/draggableviewmixin.d.ts +46 -0
- package/src/bindings/draggableviewmixin.js +144 -0
- package/src/bindings/injectcsstransitiondisabler.d.ts +59 -0
- package/src/bindings/injectcsstransitiondisabler.js +71 -0
- package/src/bindings/preventdefault.d.ts +33 -0
- package/src/bindings/preventdefault.js +34 -0
- package/src/bindings/submithandler.d.ts +57 -0
- package/src/bindings/submithandler.js +47 -0
- package/src/button/button.d.ts +175 -0
- package/src/button/button.js +5 -0
- package/src/button/buttonlabel.d.ts +34 -0
- package/src/button/buttonlabel.js +5 -0
- package/src/button/buttonlabelview.d.ts +31 -0
- package/src/button/buttonlabelview.js +42 -0
- package/src/button/buttonview.d.ts +197 -0
- package/src/button/buttonview.js +248 -0
- package/src/button/filedialogbuttonview.d.ts +107 -0
- package/src/button/filedialogbuttonview.js +145 -0
- package/src/button/listitembuttonview.d.ts +78 -0
- package/src/button/listitembuttonview.js +129 -0
- package/src/button/switchbuttonview.d.ts +45 -0
- package/src/button/switchbuttonview.js +75 -0
- package/src/collapsible/collapsibleview.d.ts +70 -0
- package/src/collapsible/collapsibleview.js +95 -0
- package/src/colorgrid/colorgridview.d.ts +132 -0
- package/src/colorgrid/colorgridview.js +124 -0
- package/src/colorgrid/colortileview.d.ts +28 -0
- package/src/colorgrid/colortileview.js +42 -0
- package/src/colorgrid/utils.d.ts +47 -0
- package/src/colorgrid/utils.js +84 -0
- package/src/colorpicker/colorpickerview.d.ts +173 -0
- package/src/colorpicker/colorpickerview.js +326 -0
- package/src/colorpicker/utils.d.ts +48 -0
- package/src/colorpicker/utils.js +108 -0
- package/src/colorselector/colorgridsfragmentview.d.ts +195 -0
- package/src/colorselector/colorgridsfragmentview.js +291 -0
- package/src/colorselector/colorpickerfragmentview.d.ts +133 -0
- package/src/colorselector/colorpickerfragmentview.js +212 -0
- package/src/colorselector/colorselectorview.d.ts +242 -0
- package/src/colorselector/colorselectorview.js +257 -0
- package/src/colorselector/documentcolorcollection.d.ts +70 -0
- package/src/colorselector/documentcolorcollection.js +42 -0
- package/src/componentfactory.d.ts +81 -0
- package/src/componentfactory.js +104 -0
- package/src/dialog/dialog.d.ts +277 -0
- package/src/dialog/dialog.js +279 -0
- package/src/dialog/dialogactionsview.d.ts +69 -0
- package/src/dialog/dialogactionsview.js +98 -0
- package/src/dialog/dialogcontentview.d.ts +27 -0
- package/src/dialog/dialogcontentview.js +35 -0
- package/src/dialog/dialogview.d.ts +256 -0
- package/src/dialog/dialogview.js +453 -0
- package/src/dropdown/button/dropdownbutton.d.ts +25 -0
- package/src/dropdown/button/dropdownbutton.js +5 -0
- package/src/dropdown/button/dropdownbuttonview.d.ts +48 -0
- package/src/dropdown/button/dropdownbuttonview.js +66 -0
- package/src/dropdown/button/splitbuttonview.d.ts +162 -0
- package/src/dropdown/button/splitbuttonview.js +154 -0
- package/src/dropdown/dropdownpanelfocusable.d.ts +21 -0
- package/src/dropdown/dropdownpanelfocusable.js +5 -0
- package/src/dropdown/dropdownpanelview.d.ts +62 -0
- package/src/dropdown/dropdownpanelview.js +97 -0
- package/src/dropdown/dropdownview.d.ts +328 -0
- package/src/dropdown/dropdownview.js +380 -0
- package/src/dropdown/menu/dropdownmenubehaviors.d.ts +44 -0
- package/src/dropdown/menu/dropdownmenubehaviors.js +119 -0
- package/src/dropdown/menu/dropdownmenubuttonview.d.ts +36 -0
- package/src/dropdown/menu/dropdownmenubuttonview.js +65 -0
- package/src/dropdown/menu/dropdownmenulistitembuttonview.d.ts +17 -0
- package/src/dropdown/menu/dropdownmenulistitembuttonview.js +29 -0
- package/src/dropdown/menu/dropdownmenulistitemview.d.ts +22 -0
- package/src/dropdown/menu/dropdownmenulistitemview.js +34 -0
- package/src/dropdown/menu/dropdownmenulistview.d.ts +24 -0
- package/src/dropdown/menu/dropdownmenulistview.js +29 -0
- package/src/dropdown/menu/dropdownmenunestedmenupanelview.d.ts +34 -0
- package/src/dropdown/menu/dropdownmenunestedmenupanelview.js +63 -0
- package/src/dropdown/menu/dropdownmenunestedmenuview.d.ts +131 -0
- package/src/dropdown/menu/dropdownmenunestedmenuview.js +191 -0
- package/src/dropdown/menu/dropdownmenurootlistview.d.ts +140 -0
- package/src/dropdown/menu/dropdownmenurootlistview.js +160 -0
- package/src/dropdown/menu/utils.d.ts +124 -0
- package/src/dropdown/menu/utils.js +61 -0
- package/src/dropdown/utils.d.ts +293 -0
- package/src/dropdown/utils.js +562 -0
- package/src/editableui/editableuiview.d.ts +72 -0
- package/src/editableui/editableuiview.js +112 -0
- package/src/editableui/inline/inlineeditableuiview.d.ts +44 -0
- package/src/editableui/inline/inlineeditableuiview.js +71 -0
- package/src/editorui/accessibilityhelp/accessibilityhelp.d.ts +55 -0
- package/src/editorui/accessibilityhelp/accessibilityhelp.js +145 -0
- package/src/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +35 -0
- package/src/editorui/accessibilityhelp/accessibilityhelpcontentview.js +112 -0
- package/src/editorui/bodycollection.d.ts +55 -0
- package/src/editorui/bodycollection.js +85 -0
- package/src/editorui/boxed/boxededitoruiview.d.ts +40 -0
- package/src/editorui/boxed/boxededitoruiview.js +81 -0
- package/src/editorui/editorui.d.ts +354 -0
- package/src/editorui/editorui.js +522 -0
- package/src/editorui/editoruiview.d.ts +44 -0
- package/src/editorui/editoruiview.js +38 -0
- package/src/editorui/evaluationbadge.d.ts +33 -0
- package/src/editorui/evaluationbadge.js +99 -0
- package/src/editorui/poweredby.d.ts +34 -0
- package/src/editorui/poweredby.js +127 -0
- package/src/focuscycler.d.ts +291 -0
- package/src/focuscycler.js +352 -0
- package/src/formheader/formheaderview.d.ts +58 -0
- package/src/formheader/formheaderview.js +69 -0
- package/src/highlightedtext/buttonlabelwithhighlightview.d.ts +30 -0
- package/src/highlightedtext/buttonlabelwithhighlightview.js +31 -0
- package/src/highlightedtext/highlightedtextview.d.ts +38 -0
- package/src/highlightedtext/highlightedtextview.js +102 -0
- package/src/highlightedtext/labelwithhighlightview.d.ts +26 -0
- package/src/highlightedtext/labelwithhighlightview.js +33 -0
- package/src/icon/iconview.d.ts +88 -0
- package/src/icon/iconview.js +115 -0
- package/src/iframe/iframeview.d.ts +50 -0
- package/src/iframe/iframeview.js +63 -0
- package/src/index.d.ts +93 -0
- package/src/index.js +90 -0
- package/src/input/inputbase.d.ts +119 -0
- package/src/input/inputbase.js +114 -0
- package/src/input/inputview.d.ts +36 -0
- package/src/input/inputview.js +24 -0
- package/src/inputnumber/inputnumberview.d.ts +49 -0
- package/src/inputnumber/inputnumberview.js +40 -0
- package/src/inputtext/inputtextview.d.ts +18 -0
- package/src/inputtext/inputtextview.js +27 -0
- package/src/label/labelview.d.ts +36 -0
- package/src/label/labelview.js +41 -0
- package/src/labeledfield/labeledfieldview.d.ts +187 -0
- package/src/labeledfield/labeledfieldview.js +157 -0
- package/src/labeledfield/utils.d.ts +123 -0
- package/src/labeledfield/utils.js +176 -0
- package/src/labeledinput/labeledinputview.d.ts +125 -0
- package/src/labeledinput/labeledinputview.js +125 -0
- package/src/list/listitemgroupview.d.ts +59 -0
- package/src/list/listitemgroupview.js +67 -0
- package/src/list/listitemview.d.ts +36 -0
- package/src/list/listitemview.js +42 -0
- package/src/list/listseparatorview.d.ts +18 -0
- package/src/list/listseparatorview.js +28 -0
- package/src/list/listview.d.ts +124 -0
- package/src/list/listview.js +188 -0
- package/src/menubar/menubarmenubuttonview.d.ts +35 -0
- package/src/menubar/menubarmenubuttonview.js +64 -0
- package/src/menubar/menubarmenulistitembuttonview.d.ts +21 -0
- package/src/menubar/menubarmenulistitembuttonview.js +30 -0
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +23 -0
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.js +32 -0
- package/src/menubar/menubarmenulistitemview.d.ts +25 -0
- package/src/menubar/menubarmenulistitemview.js +34 -0
- package/src/menubar/menubarmenulistview.d.ts +29 -0
- package/src/menubar/menubarmenulistview.js +72 -0
- package/src/menubar/menubarmenupanelview.d.ts +53 -0
- package/src/menubar/menubarmenupanelview.js +60 -0
- package/src/menubar/menubarmenuview.d.ts +109 -0
- package/src/menubar/menubarmenuview.js +160 -0
- package/src/menubar/menubarview.d.ts +173 -0
- package/src/menubar/menubarview.js +261 -0
- package/src/menubar/utils.d.ts +447 -0
- package/src/menubar/utils.js +1388 -0
- package/src/model.d.ts +22 -0
- package/src/model.js +31 -0
- package/src/notification/notification.d.ts +215 -0
- package/src/notification/notification.js +193 -0
- package/src/panel/balloon/balloonpanelview.d.ts +697 -0
- package/src/panel/balloon/balloonpanelview.js +1055 -0
- package/src/panel/balloon/contextualballoon.d.ts +309 -0
- package/src/panel/balloon/contextualballoon.js +576 -0
- package/src/panel/sticky/stickypanelview.d.ts +156 -0
- package/src/panel/sticky/stickypanelview.js +234 -0
- package/src/search/filteredview.d.ts +31 -0
- package/src/search/filteredview.js +5 -0
- package/src/search/filtergroupanditemnames.d.ts +15 -0
- package/src/search/filtergroupanditemnames.js +38 -0
- package/src/search/searchinfoview.d.ts +45 -0
- package/src/search/searchinfoview.js +59 -0
- package/src/search/searchresultsview.d.ts +54 -0
- package/src/search/searchresultsview.js +65 -0
- package/src/search/text/searchtextqueryview.d.ts +76 -0
- package/src/search/text/searchtextqueryview.js +75 -0
- package/src/search/text/searchtextview.d.ts +219 -0
- package/src/search/text/searchtextview.js +202 -0
- package/src/spinner/spinnerview.d.ts +25 -0
- package/src/spinner/spinnerview.js +38 -0
- package/src/template.d.ts +942 -0
- package/src/template.js +1294 -0
- package/src/textarea/textareaview.d.ts +104 -0
- package/src/textarea/textareaview.js +182 -0
- package/src/toolbar/balloon/balloontoolbar.d.ts +126 -0
- package/src/toolbar/balloon/balloontoolbar.js +324 -0
- package/src/toolbar/block/blockbuttonview.d.ts +35 -0
- package/src/toolbar/block/blockbuttonview.js +41 -0
- package/src/toolbar/block/blocktoolbar.d.ts +171 -0
- package/src/toolbar/block/blocktoolbar.js +492 -0
- package/src/toolbar/normalizetoolbarconfig.d.ts +40 -0
- package/src/toolbar/normalizetoolbarconfig.js +52 -0
- package/src/toolbar/toolbarlinebreakview.d.ts +18 -0
- package/src/toolbar/toolbarlinebreakview.js +28 -0
- package/src/toolbar/toolbarseparatorview.d.ts +18 -0
- package/src/toolbar/toolbarseparatorview.js +28 -0
- package/src/toolbar/toolbarview.d.ts +267 -0
- package/src/toolbar/toolbarview.js +721 -0
- package/src/tooltipmanager.d.ts +188 -0
- package/src/tooltipmanager.js +413 -0
- package/src/view.d.ts +422 -0
- package/src/view.js +396 -0
- package/src/viewcollection.d.ts +139 -0
- package/src/viewcollection.js +206 -0
- package/theme/components/arialiveannouncer/arialiveannouncer.css +14 -0
- package/theme/components/autocomplete/autocomplete.css +22 -0
- package/theme/components/button/button.css +39 -0
- package/theme/components/button/listitembutton.css +48 -0
- package/theme/components/button/switchbutton.css +14 -0
- package/theme/components/collapsible/collapsible.css +10 -0
- package/theme/components/colorgrid/colorgrid.css +8 -0
- package/theme/components/colorpicker/colorpicker.css +34 -0
- package/theme/components/colorselector/colorselector.css +35 -0
- package/theme/components/dialog/dialog.css +39 -0
- package/theme/components/dialog/dialogactions.css +11 -0
- package/theme/components/dropdown/dropdown.css +95 -0
- package/theme/components/dropdown/listdropdown.css +10 -0
- package/theme/components/dropdown/menu/dropdownmenu.css +8 -0
- package/theme/components/dropdown/menu/dropdownmenubutton.css +9 -0
- package/theme/components/dropdown/menu/dropdownmenulistitem.css +10 -0
- package/theme/components/dropdown/menu/dropdownmenulistitembutton.css +10 -0
- package/theme/components/dropdown/menu/dropdownmenupanel.css +11 -0
- package/theme/components/dropdown/splitbutton.css +14 -0
- package/theme/components/dropdown/toolbardropdown.css +20 -0
- package/theme/components/editorui/accessibilityhelp.css +10 -0
- package/theme/components/editorui/editorui.css +10 -0
- package/theme/components/formheader/formheader.css +16 -0
- package/theme/components/highlightedtext/highlightedtext.css +12 -0
- package/theme/components/icon/icon.css +8 -0
- package/theme/components/input/input.css +10 -0
- package/theme/components/label/label.css +12 -0
- package/theme/components/labeledfield/labeledfieldview.css +16 -0
- package/theme/components/labeledinput/labeledinput.css +10 -0
- package/theme/components/list/list.css +26 -0
- package/theme/components/menubar/menubar.css +10 -0
- package/theme/components/menubar/menubarmenu.css +9 -0
- package/theme/components/menubar/menubarmenubutton.css +11 -0
- package/theme/components/menubar/menubarmenulistitem.css +10 -0
- package/theme/components/menubar/menubarmenulistitembutton.css +10 -0
- package/theme/components/menubar/menubarmenupanel.css +62 -0
- package/theme/components/panel/balloonpanel.css +56 -0
- package/theme/components/panel/balloonrotator.css +17 -0
- package/theme/components/panel/fakepanel.css +23 -0
- package/theme/components/panel/stickypanel.css +17 -0
- package/theme/components/responsive-form/responsiveform.css +42 -0
- package/theme/components/search/search.css +43 -0
- package/theme/components/spinner/spinner.css +23 -0
- package/theme/components/textarea/textarea.css +10 -0
- package/theme/components/toolbar/blocktoolbar.css +9 -0
- package/theme/components/toolbar/toolbar.css +58 -0
- package/theme/components/tooltip/tooltip.css +12 -0
- package/theme/globals/_evaluationbadge.css +50 -0
- package/theme/globals/_hidden.css +13 -0
- package/theme/globals/_poweredby.css +72 -0
- package/theme/globals/_transition.css +12 -0
- package/theme/globals/_zindex.css +10 -0
- package/theme/globals/globals.css +10 -0
- package/theme/icons/accessibility.svg +1 -0
- package/theme/icons/color-tile-check.svg +1 -0
- package/theme/icons/dropdown-arrow.svg +1 -0
- package/theme/icons/project-logo.svg +1 -0
- package/theme/mixins/_dir.css +10 -0
- package/theme/mixins/_mediacolors.css +20 -0
- package/theme/mixins/_rwd.css +10 -0
- package/theme/mixins/_unselectable.css +14 -0
|
@@ -0,0 +1,81 @@
|
|
|
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 ui/autocomplete/autocompleteview
|
|
7
|
+
*/
|
|
8
|
+
import { type PositioningFunction, type Locale } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import SearchTextView, { type SearchTextViewConfig } from '../search/text/searchtextview.js';
|
|
10
|
+
import type SearchResultsView from '../search/searchresultsview.js';
|
|
11
|
+
import type InputBase from '../input/inputbase.js';
|
|
12
|
+
import '../../theme/components/autocomplete/autocomplete.css';
|
|
13
|
+
/**
|
|
14
|
+
* The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class
|
|
15
|
+
* with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur
|
|
16
|
+
* the component.
|
|
17
|
+
*/
|
|
18
|
+
export default class AutocompleteView<TQueryFieldView extends InputBase<HTMLInputElement | HTMLTextAreaElement>> extends SearchTextView<TQueryFieldView> {
|
|
19
|
+
/**
|
|
20
|
+
* The configuration of the autocomplete view.
|
|
21
|
+
*/
|
|
22
|
+
protected _config: AutocompleteViewConfig<TQueryFieldView>;
|
|
23
|
+
resultsView: AutocompleteResultsView;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(locale: Locale, config: AutocompleteViewConfig<TQueryFieldView>);
|
|
28
|
+
/**
|
|
29
|
+
* Updates the position of the results view on demand.
|
|
30
|
+
*/
|
|
31
|
+
private _updateResultsViewWidthAndPosition;
|
|
32
|
+
/**
|
|
33
|
+
* Updates the visibility of the results view on demand.
|
|
34
|
+
*/
|
|
35
|
+
private _updateResultsVisibility;
|
|
36
|
+
/**
|
|
37
|
+
* Positions for the autocomplete results view. Two positions are defined by default:
|
|
38
|
+
* * `s` - below the search field,
|
|
39
|
+
* * `n` - above the search field.
|
|
40
|
+
*/
|
|
41
|
+
static defaultResultsPositions: Array<PositioningFunction>;
|
|
42
|
+
/**
|
|
43
|
+
* A function used to calculate the optimal position for the dropdown panel.
|
|
44
|
+
*/
|
|
45
|
+
private static _getOptimalPosition;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* An interface describing additional properties of the floating search results view used by the autocomplete plugin.
|
|
49
|
+
*/
|
|
50
|
+
export interface AutocompleteResultsView extends SearchResultsView {
|
|
51
|
+
/**
|
|
52
|
+
* Controls the visibility of the results view.
|
|
53
|
+
*
|
|
54
|
+
* @observable
|
|
55
|
+
*/
|
|
56
|
+
isVisible: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Controls the position (CSS class suffix) of the results view.
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
_position?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The observable property determining the CSS width of the results view.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_width: number;
|
|
69
|
+
}
|
|
70
|
+
export interface AutocompleteViewConfig<TConfigInputCreator extends InputBase<HTMLInputElement | HTMLTextAreaElement>> extends SearchTextViewConfig<TConfigInputCreator> {
|
|
71
|
+
/**
|
|
72
|
+
* When set `true`, the query view will be reset when the autocomplete view loses focus.
|
|
73
|
+
*/
|
|
74
|
+
resetOnBlur?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Minimum number of characters that need to be typed before the search is performed.
|
|
77
|
+
*
|
|
78
|
+
* @default 0
|
|
79
|
+
*/
|
|
80
|
+
queryMinChars?: number;
|
|
81
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
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 ui/autocomplete/autocompleteview
|
|
7
|
+
*/
|
|
8
|
+
import { getOptimalPosition, global, toUnit, Rect } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import SearchTextView from '../search/text/searchtextview.js';
|
|
10
|
+
import '../../theme/components/autocomplete/autocomplete.css';
|
|
11
|
+
/**
|
|
12
|
+
* The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class
|
|
13
|
+
* with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur
|
|
14
|
+
* the component.
|
|
15
|
+
*/
|
|
16
|
+
class AutocompleteView extends SearchTextView {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
constructor(locale, config) {
|
|
21
|
+
super(locale, config);
|
|
22
|
+
this._config = config;
|
|
23
|
+
const toPx = toUnit('px');
|
|
24
|
+
this.extendTemplate({
|
|
25
|
+
attributes: {
|
|
26
|
+
class: ['ck-autocomplete']
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const bindResultsView = this.resultsView.bindTemplate;
|
|
30
|
+
this.resultsView.set('isVisible', false);
|
|
31
|
+
this.resultsView.set('_position', 's');
|
|
32
|
+
this.resultsView.set('_width', 0);
|
|
33
|
+
this.resultsView.extendTemplate({
|
|
34
|
+
attributes: {
|
|
35
|
+
class: [
|
|
36
|
+
bindResultsView.if('isVisible', 'ck-hidden', value => !value),
|
|
37
|
+
bindResultsView.to('_position', value => `ck-search__results_${value}`)
|
|
38
|
+
],
|
|
39
|
+
style: {
|
|
40
|
+
width: bindResultsView.to('_width', toPx)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
// Update the visibility of the results view when the user focuses or blurs the component.
|
|
45
|
+
// This is also integration for the `resetOnBlur` configuration.
|
|
46
|
+
this.focusTracker.on('change:isFocused', (evt, name, isFocused) => {
|
|
47
|
+
this._updateResultsVisibility();
|
|
48
|
+
if (isFocused) {
|
|
49
|
+
// Reset the scroll position of the results view whenever the autocomplete reopens.
|
|
50
|
+
this.resultsView.element.scrollTop = 0;
|
|
51
|
+
}
|
|
52
|
+
else if (config.resetOnBlur) {
|
|
53
|
+
this.queryView.reset();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
// Update the visibility of the results view when the user types in the query field.
|
|
57
|
+
// This is an integration for `queryMinChars` configuration.
|
|
58
|
+
// This is an integration for search results changing length and the #resultsView requiring to be repositioned.
|
|
59
|
+
this.on('search', () => {
|
|
60
|
+
this._updateResultsVisibility();
|
|
61
|
+
this._updateResultsViewWidthAndPosition();
|
|
62
|
+
});
|
|
63
|
+
// Hide the results view when the user presses the ESC key.
|
|
64
|
+
this.keystrokes.set('esc', (evt, cancel) => {
|
|
65
|
+
// Let the DOM event pass through if the focus is in the query view.
|
|
66
|
+
if (!this.resultsView.isVisible) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// Focus the query view first and only then close the results view. Otherwise, if the focus
|
|
70
|
+
// was in the results view, it will get lost.
|
|
71
|
+
this.queryView.focus();
|
|
72
|
+
this.resultsView.isVisible = false;
|
|
73
|
+
cancel();
|
|
74
|
+
});
|
|
75
|
+
// Update the position of the results view when the user scrolls the page.
|
|
76
|
+
// TODO: This needs to be debounced down the road.
|
|
77
|
+
this.listenTo(global.document, 'scroll', () => {
|
|
78
|
+
this._updateResultsViewWidthAndPosition();
|
|
79
|
+
});
|
|
80
|
+
// Hide the results when the component becomes disabled.
|
|
81
|
+
this.on('change:isEnabled', () => {
|
|
82
|
+
this._updateResultsVisibility();
|
|
83
|
+
});
|
|
84
|
+
// Update the value of the query field when the user selects a result.
|
|
85
|
+
this.filteredView.on('execute', (evt, { value }) => {
|
|
86
|
+
// Focus the query view first to avoid losing the focus.
|
|
87
|
+
this.focus();
|
|
88
|
+
// Resetting the view will ensure that the #queryView will update its empty state correctly.
|
|
89
|
+
// This prevents bugs related to dynamic labels or auto-grow when re-setting the same value
|
|
90
|
+
// to #queryView.fieldView.value (which does not trigger empty state change) to an
|
|
91
|
+
// #queryView.fieldView.element that has been changed by the user.
|
|
92
|
+
this.reset();
|
|
93
|
+
// Update the value of the query field.
|
|
94
|
+
this.queryView.fieldView.value = this.queryView.fieldView.element.value = value;
|
|
95
|
+
// Finally, hide the results view. The focus has been moved earlier so this is safe.
|
|
96
|
+
this.resultsView.isVisible = false;
|
|
97
|
+
});
|
|
98
|
+
// Update the position and width of the results view when it becomes visible.
|
|
99
|
+
this.resultsView.on('change:isVisible', () => {
|
|
100
|
+
this._updateResultsViewWidthAndPosition();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Updates the position of the results view on demand.
|
|
105
|
+
*/
|
|
106
|
+
_updateResultsViewWidthAndPosition() {
|
|
107
|
+
if (!this.resultsView.isVisible) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.resultsView._width = new Rect(this.queryView.fieldView.element).width;
|
|
111
|
+
const optimalResultsPosition = AutocompleteView._getOptimalPosition({
|
|
112
|
+
element: this.resultsView.element,
|
|
113
|
+
target: this.queryView.element,
|
|
114
|
+
fitInViewport: true,
|
|
115
|
+
positions: AutocompleteView.defaultResultsPositions
|
|
116
|
+
});
|
|
117
|
+
// _getOptimalPosition will return null if there is no optimal position found (e.g. target is off the viewport).
|
|
118
|
+
this.resultsView._position = optimalResultsPosition ? optimalResultsPosition.name : 's';
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Updates the visibility of the results view on demand.
|
|
122
|
+
*/
|
|
123
|
+
_updateResultsVisibility() {
|
|
124
|
+
const queryMinChars = typeof this._config.queryMinChars === 'undefined' ? 0 : this._config.queryMinChars;
|
|
125
|
+
const queryLength = this.queryView.fieldView.element.value.length;
|
|
126
|
+
this.resultsView.isVisible = this.focusTracker.isFocused && this.isEnabled && queryLength >= queryMinChars;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Positions for the autocomplete results view. Two positions are defined by default:
|
|
131
|
+
* * `s` - below the search field,
|
|
132
|
+
* * `n` - above the search field.
|
|
133
|
+
*/
|
|
134
|
+
AutocompleteView.defaultResultsPositions = [
|
|
135
|
+
(fieldRect => {
|
|
136
|
+
return {
|
|
137
|
+
top: fieldRect.bottom,
|
|
138
|
+
left: fieldRect.left,
|
|
139
|
+
name: 's'
|
|
140
|
+
};
|
|
141
|
+
}),
|
|
142
|
+
((fieldRect, resultsRect) => {
|
|
143
|
+
return {
|
|
144
|
+
top: fieldRect.top - resultsRect.height,
|
|
145
|
+
left: fieldRect.left,
|
|
146
|
+
name: 'n'
|
|
147
|
+
};
|
|
148
|
+
})
|
|
149
|
+
];
|
|
150
|
+
/**
|
|
151
|
+
* A function used to calculate the optimal position for the dropdown panel.
|
|
152
|
+
*/
|
|
153
|
+
AutocompleteView._getOptimalPosition = getOptimalPosition;
|
|
154
|
+
export default AutocompleteView;
|
|
@@ -0,0 +1,129 @@
|
|
|
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 ui/badge/badge
|
|
7
|
+
*/
|
|
8
|
+
import type { Editor } from '@ckeditor/ckeditor5-core';
|
|
9
|
+
import type View from '../view.js';
|
|
10
|
+
declare const Badge_base: {
|
|
11
|
+
new (): import("@ckeditor/ckeditor5-utils").DomEmitter;
|
|
12
|
+
prototype: import("@ckeditor/ckeditor5-utils").DomEmitter;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A helper that enables the badge feature in the editor and renders a custom view next to the bottom of the editable element
|
|
16
|
+
* (editor root, source editing area, etc.) when the editor is focused.
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
export default abstract class Badge extends /* #__PURE__ */ Badge_base {
|
|
21
|
+
/**
|
|
22
|
+
* Editor instance the helper was created for.
|
|
23
|
+
*/
|
|
24
|
+
protected readonly editor: Editor;
|
|
25
|
+
/**
|
|
26
|
+
* A reference to the balloon panel hosting and positioning the badge content.
|
|
27
|
+
*/
|
|
28
|
+
private _balloonView;
|
|
29
|
+
/**
|
|
30
|
+
* A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.
|
|
31
|
+
*/
|
|
32
|
+
private _showBalloonThrottled;
|
|
33
|
+
/**
|
|
34
|
+
* A reference to the last editable element (root, source editing area, etc.) focused by the user.
|
|
35
|
+
* Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the
|
|
36
|
+
* right element whether the user is typing or using the UI.
|
|
37
|
+
*/
|
|
38
|
+
private _lastFocusedEditableElement;
|
|
39
|
+
/**
|
|
40
|
+
* An additional CSS class added to the `BalloonView`.
|
|
41
|
+
*/
|
|
42
|
+
private readonly _balloonClass;
|
|
43
|
+
/**
|
|
44
|
+
* Creates a badge for a given editor. The feature is initialized on Editor#ready
|
|
45
|
+
* event.
|
|
46
|
+
*/
|
|
47
|
+
protected constructor(editor: Editor, options?: {
|
|
48
|
+
balloonClass?: string;
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Destroys the badge along with its view.
|
|
52
|
+
*/
|
|
53
|
+
destroy(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Enables badge label once the editor (ui) is ready.
|
|
56
|
+
*/
|
|
57
|
+
protected _handleEditorReady(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Returns normalized configuration for the badge.
|
|
60
|
+
*/
|
|
61
|
+
protected _getNormalizedConfig(): BadgeConfig;
|
|
62
|
+
/**
|
|
63
|
+
* Creates the badge content.
|
|
64
|
+
*/
|
|
65
|
+
protected abstract _createBadgeContent(): View<HTMLElement>;
|
|
66
|
+
/**
|
|
67
|
+
* Enables the badge feature.
|
|
68
|
+
*/
|
|
69
|
+
protected abstract _isEnabled(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Attempts to display the balloon with the badge view.
|
|
72
|
+
*/
|
|
73
|
+
private _showBalloon;
|
|
74
|
+
/**
|
|
75
|
+
* Hides the badge balloon if already visible.
|
|
76
|
+
*/
|
|
77
|
+
private _hideBalloon;
|
|
78
|
+
/**
|
|
79
|
+
* Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}
|
|
80
|
+
* with the badge view inside ready for positioning.
|
|
81
|
+
*/
|
|
82
|
+
private _createBalloonView;
|
|
83
|
+
/**
|
|
84
|
+
* Returns the options for attaching the balloon to the focused editable element.
|
|
85
|
+
*/
|
|
86
|
+
private _getBalloonAttachOptions;
|
|
87
|
+
/**
|
|
88
|
+
* Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.
|
|
89
|
+
*/
|
|
90
|
+
private _updateLastFocusedEditableElement;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The badge configuration options.
|
|
94
|
+
**/
|
|
95
|
+
export interface BadgeConfig {
|
|
96
|
+
/**
|
|
97
|
+
* The position of the badge.
|
|
98
|
+
*
|
|
99
|
+
* * When `'inside'`, the badge will be displayed within the boundaries of the editing area.
|
|
100
|
+
* * When `'border'`, the basge will be displayed over the bottom border of the editing area.
|
|
101
|
+
*
|
|
102
|
+
* @default 'border'
|
|
103
|
+
*/
|
|
104
|
+
position: 'inside' | 'border';
|
|
105
|
+
/**
|
|
106
|
+
* Allows choosing the side of the editing area where the badge will be displayed.
|
|
107
|
+
*
|
|
108
|
+
* **Note:** If {@link module:core/editor/editorconfig~EditorConfig#language `config.language`} is set to an RTL (right-to-left)
|
|
109
|
+
* language, the side switches to `'left'` by default.
|
|
110
|
+
*
|
|
111
|
+
* @default 'right'
|
|
112
|
+
*/
|
|
113
|
+
side: 'left' | 'right';
|
|
114
|
+
/**
|
|
115
|
+
* The vertical distance the badge can be moved away from its default position.
|
|
116
|
+
*
|
|
117
|
+
* **Note:** If `position` is `'border'`, the offset is measured from the (vertical) center of the badge.
|
|
118
|
+
*
|
|
119
|
+
* @default 5
|
|
120
|
+
*/
|
|
121
|
+
verticalOffset: number;
|
|
122
|
+
/**
|
|
123
|
+
* The horizontal distance between the side of the editing root and the nearest side of the badge.
|
|
124
|
+
*
|
|
125
|
+
* @default 5
|
|
126
|
+
*/
|
|
127
|
+
horizontalOffset: number;
|
|
128
|
+
}
|
|
129
|
+
export {};
|
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
import { Rect, DomEmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
6
|
+
import BalloonPanelView from '../panel/balloon/balloonpanelview.js';
|
|
7
|
+
import { throttle } from 'lodash-es';
|
|
8
|
+
// ⚠ Note, whenever changing the threshold, make sure to update the docs/support/managing-ckeditor-logo.md docs
|
|
9
|
+
// as this information is also mentioned there ⚠.
|
|
10
|
+
const NARROW_ROOT_HEIGHT_THRESHOLD = 50;
|
|
11
|
+
const NARROW_ROOT_WIDTH_THRESHOLD = 350;
|
|
12
|
+
/**
|
|
13
|
+
* A helper that enables the badge feature in the editor and renders a custom view next to the bottom of the editable element
|
|
14
|
+
* (editor root, source editing area, etc.) when the editor is focused.
|
|
15
|
+
*
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
export default class Badge extends /* #__PURE__ */ DomEmitterMixin() {
|
|
19
|
+
/**
|
|
20
|
+
* Creates a badge for a given editor. The feature is initialized on Editor#ready
|
|
21
|
+
* event.
|
|
22
|
+
*/
|
|
23
|
+
constructor(editor, options = {}) {
|
|
24
|
+
super();
|
|
25
|
+
/**
|
|
26
|
+
* A reference to the balloon panel hosting and positioning the badge content.
|
|
27
|
+
*/
|
|
28
|
+
this._balloonView = null;
|
|
29
|
+
/**
|
|
30
|
+
* A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.
|
|
31
|
+
*/
|
|
32
|
+
this._showBalloonThrottled = throttle(() => this._showBalloon(), 50, { leading: true });
|
|
33
|
+
/**
|
|
34
|
+
* A reference to the last editable element (root, source editing area, etc.) focused by the user.
|
|
35
|
+
* Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the
|
|
36
|
+
* right element whether the user is typing or using the UI.
|
|
37
|
+
*/
|
|
38
|
+
this._lastFocusedEditableElement = null;
|
|
39
|
+
this.editor = editor;
|
|
40
|
+
this._balloonClass = options.balloonClass;
|
|
41
|
+
editor.on('ready', () => this._handleEditorReady());
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Destroys the badge along with its view.
|
|
45
|
+
*/
|
|
46
|
+
destroy() {
|
|
47
|
+
const balloon = this._balloonView;
|
|
48
|
+
if (balloon) {
|
|
49
|
+
// Balloon gets destroyed by the body collection.
|
|
50
|
+
// The badge view gets destroyed by the balloon.
|
|
51
|
+
balloon.unpin();
|
|
52
|
+
this._balloonView = null;
|
|
53
|
+
}
|
|
54
|
+
this._showBalloonThrottled.cancel();
|
|
55
|
+
this.stopListening();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Enables badge label once the editor (ui) is ready.
|
|
59
|
+
*/
|
|
60
|
+
_handleEditorReady() {
|
|
61
|
+
const editor = this.editor;
|
|
62
|
+
if (!this._isEnabled()) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// No view means no body collection to append the badge balloon to.
|
|
66
|
+
if (!editor.ui.view) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
editor.ui.focusTracker.on('change:isFocused', (evt, data, isFocused) => {
|
|
70
|
+
this._updateLastFocusedEditableElement();
|
|
71
|
+
if (isFocused) {
|
|
72
|
+
this._showBalloon();
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this._hideBalloon();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
editor.ui.focusTracker.on('change:focusedElement', (evt, data, focusedElement) => {
|
|
79
|
+
this._updateLastFocusedEditableElement();
|
|
80
|
+
if (focusedElement) {
|
|
81
|
+
this._showBalloon();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
editor.ui.on('update', () => {
|
|
85
|
+
this._showBalloonThrottled();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Returns normalized configuration for the badge.
|
|
90
|
+
*/
|
|
91
|
+
_getNormalizedConfig() {
|
|
92
|
+
return {
|
|
93
|
+
side: this.editor.locale.contentLanguageDirection === 'ltr' ? 'right' : 'left',
|
|
94
|
+
position: 'border',
|
|
95
|
+
verticalOffset: 0,
|
|
96
|
+
horizontalOffset: 5
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Attempts to display the balloon with the badge view.
|
|
101
|
+
*/
|
|
102
|
+
_showBalloon() {
|
|
103
|
+
const attachOptions = this._getBalloonAttachOptions();
|
|
104
|
+
if (!attachOptions) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (!this._balloonView) {
|
|
108
|
+
this._balloonView = this._createBalloonView();
|
|
109
|
+
}
|
|
110
|
+
this._balloonView.pin(attachOptions);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Hides the badge balloon if already visible.
|
|
114
|
+
*/
|
|
115
|
+
_hideBalloon() {
|
|
116
|
+
if (this._balloonView) {
|
|
117
|
+
this._balloonView.unpin();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}
|
|
122
|
+
* with the badge view inside ready for positioning.
|
|
123
|
+
*/
|
|
124
|
+
_createBalloonView() {
|
|
125
|
+
const editor = this.editor;
|
|
126
|
+
const balloon = new BalloonPanelView();
|
|
127
|
+
const view = this._createBadgeContent();
|
|
128
|
+
balloon.content.add(view);
|
|
129
|
+
if (this._balloonClass) {
|
|
130
|
+
balloon.class = this._balloonClass;
|
|
131
|
+
}
|
|
132
|
+
editor.ui.view.body.add(balloon);
|
|
133
|
+
return balloon;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Returns the options for attaching the balloon to the focused editable element.
|
|
137
|
+
*/
|
|
138
|
+
_getBalloonAttachOptions() {
|
|
139
|
+
if (!this._lastFocusedEditableElement) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
const badgeConfig = this._getNormalizedConfig();
|
|
143
|
+
const positioningFunction = badgeConfig.side === 'right' ?
|
|
144
|
+
getLowerRightCornerPosition(this._lastFocusedEditableElement, badgeConfig) :
|
|
145
|
+
getLowerLeftCornerPosition(this._lastFocusedEditableElement, badgeConfig);
|
|
146
|
+
return {
|
|
147
|
+
target: this._lastFocusedEditableElement,
|
|
148
|
+
positions: [positioningFunction]
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.
|
|
153
|
+
*/
|
|
154
|
+
_updateLastFocusedEditableElement() {
|
|
155
|
+
const editor = this.editor;
|
|
156
|
+
const isFocused = editor.ui.focusTracker.isFocused;
|
|
157
|
+
const focusedElement = editor.ui.focusTracker.focusedElement;
|
|
158
|
+
if (!isFocused || !focusedElement) {
|
|
159
|
+
this._lastFocusedEditableElement = null;
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const editableEditorElements = Array.from(editor.ui.getEditableElementsNames()).map(name => {
|
|
163
|
+
return editor.ui.getEditableElement(name);
|
|
164
|
+
});
|
|
165
|
+
if (editableEditorElements.includes(focusedElement)) {
|
|
166
|
+
this._lastFocusedEditableElement = focusedElement;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
// If it's none of the editable element, then the focus is somewhere in the UI. Let's display the badge
|
|
170
|
+
// over the first element then.
|
|
171
|
+
this._lastFocusedEditableElement = editableEditorElements[0];
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function getLowerRightCornerPosition(focusedEditableElement, config) {
|
|
176
|
+
return getLowerCornerPosition(focusedEditableElement, config, (rootRect, balloonRect) => {
|
|
177
|
+
return rootRect.left + rootRect.width - balloonRect.width - config.horizontalOffset;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function getLowerLeftCornerPosition(focusedEditableElement, config) {
|
|
181
|
+
return getLowerCornerPosition(focusedEditableElement, config, rootRect => rootRect.left + config.horizontalOffset);
|
|
182
|
+
}
|
|
183
|
+
function getLowerCornerPosition(focusedEditableElement, config, getBalloonLeft) {
|
|
184
|
+
return (visibleEditableElementRect, balloonRect) => {
|
|
185
|
+
const editableElementRect = new Rect(focusedEditableElement);
|
|
186
|
+
if (editableElementRect.width < NARROW_ROOT_WIDTH_THRESHOLD || editableElementRect.height < NARROW_ROOT_HEIGHT_THRESHOLD) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
let balloonTop;
|
|
190
|
+
if (config.position === 'inside') {
|
|
191
|
+
balloonTop = editableElementRect.bottom - balloonRect.height;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
balloonTop = editableElementRect.bottom - balloonRect.height / 2;
|
|
195
|
+
}
|
|
196
|
+
balloonTop -= config.verticalOffset;
|
|
197
|
+
const balloonLeft = getBalloonLeft(editableElementRect, balloonRect);
|
|
198
|
+
// Clone the editable element rect and place it where the balloon would be placed.
|
|
199
|
+
// This will allow getVisible() to work from editable element's perspective (rect source).
|
|
200
|
+
// and yield a result as if the balloon was on the same (scrollable) layer as the editable element.
|
|
201
|
+
const newBalloonPositionRect = visibleEditableElementRect
|
|
202
|
+
.clone()
|
|
203
|
+
.moveTo(balloonLeft, balloonTop)
|
|
204
|
+
.getIntersection(balloonRect.clone().moveTo(balloonLeft, balloonTop));
|
|
205
|
+
const newBalloonPositionVisibleRect = newBalloonPositionRect.getVisible();
|
|
206
|
+
if (!newBalloonPositionVisibleRect || newBalloonPositionVisibleRect.getArea() < balloonRect.getArea()) {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
top: balloonTop,
|
|
211
|
+
left: balloonLeft,
|
|
212
|
+
name: `position_${config.position}-side_${config.side}`,
|
|
213
|
+
config: {
|
|
214
|
+
withArrow: false
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ui/bindings/addkeyboardhandlingforgrid
|
|
7
|
+
*/
|
|
8
|
+
import type { FocusTracker, KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import type ViewCollection from '../viewcollection.js';
|
|
10
|
+
/**
|
|
11
|
+
* A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.
|
|
12
|
+
*
|
|
13
|
+
* @param options Configuration options.
|
|
14
|
+
* @param options.keystrokeHandler Keystroke handler to register navigation with arrow keys.
|
|
15
|
+
* @param options.focusTracker A focus tracker for grid elements.
|
|
16
|
+
* @param options.gridItems A collection of grid items.
|
|
17
|
+
* @param options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns
|
|
18
|
+
* the number (e.g. for responsive grids).
|
|
19
|
+
* @param options.uiLanguageDirection String of ui language direction.
|
|
20
|
+
*/
|
|
21
|
+
export default function addKeyboardHandlingForGrid({ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }: {
|
|
22
|
+
keystrokeHandler: KeystrokeHandler;
|
|
23
|
+
focusTracker: FocusTracker;
|
|
24
|
+
gridItems: ViewCollection;
|
|
25
|
+
numberOfColumns: number | (() => number);
|
|
26
|
+
uiLanguageDirection?: string;
|
|
27
|
+
}): void;
|