@ckeditor/ckeditor5-ui 41.3.1 → 41.4.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/dist/index-content.css +4 -0
- package/dist/index-editor.css +497 -0
- package/dist/index.css +942 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +14343 -0
- package/dist/index.js.map +1 -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/types/arialiveannouncer.d.ts +113 -0
- package/dist/types/augmentation.d.ts +92 -0
- package/dist/types/autocomplete/autocompleteview.d.ts +85 -0
- package/dist/types/bindings/addkeyboardhandlingforgrid.d.ts +31 -0
- package/dist/types/bindings/clickoutsidehandler.d.ts +32 -0
- package/dist/types/bindings/csstransitiondisablermixin.d.ts +44 -0
- package/dist/types/bindings/draggableviewmixin.d.ts +50 -0
- package/dist/types/bindings/injectcsstransitiondisabler.d.ts +63 -0
- package/dist/types/bindings/preventdefault.d.ts +37 -0
- package/dist/types/bindings/submithandler.d.ts +61 -0
- package/dist/types/button/button.d.ts +185 -0
- package/dist/types/button/buttonlabel.d.ts +38 -0
- package/dist/types/button/buttonlabelview.d.ts +35 -0
- package/dist/types/button/buttonview.d.ts +189 -0
- package/dist/types/button/filedialogbuttonview.d.ts +84 -0
- package/dist/types/button/switchbuttonview.d.ts +49 -0
- package/dist/types/collapsible/collapsibleview.d.ts +74 -0
- package/dist/types/colorgrid/colorgridview.d.ts +136 -0
- package/dist/types/colorgrid/colortileview.d.ts +32 -0
- package/dist/types/colorgrid/utils.d.ts +51 -0
- package/dist/types/colorpicker/colorpickerview.d.ts +177 -0
- package/dist/types/colorpicker/utils.d.ts +52 -0
- package/dist/types/colorselector/colorgridsfragmentview.d.ts +199 -0
- package/dist/types/colorselector/colorpickerfragmentview.d.ts +137 -0
- package/dist/types/colorselector/colorselectorview.d.ts +246 -0
- package/dist/types/colorselector/documentcolorcollection.d.ts +74 -0
- package/dist/types/componentfactory.d.ts +85 -0
- package/dist/types/dialog/dialog.d.ts +277 -0
- package/dist/types/dialog/dialogactionsview.d.ts +73 -0
- package/dist/types/dialog/dialogcontentview.d.ts +31 -0
- package/dist/types/dialog/dialogview.d.ts +260 -0
- package/dist/types/dropdown/button/dropdownbutton.d.ts +29 -0
- package/dist/types/dropdown/button/dropdownbuttonview.d.ts +52 -0
- package/dist/types/dropdown/button/splitbuttonview.d.ts +166 -0
- package/dist/types/dropdown/dropdownpanelfocusable.d.ts +25 -0
- package/dist/types/dropdown/dropdownpanelview.d.ts +66 -0
- package/dist/types/dropdown/dropdownview.d.ts +319 -0
- package/dist/types/dropdown/utils.d.ts +239 -0
- package/dist/types/editableui/editableuiview.d.ts +76 -0
- package/dist/types/editableui/inline/inlineeditableuiview.d.ts +44 -0
- package/dist/types/editorui/accessibilityhelp/accessibilityhelp.d.ts +55 -0
- package/dist/types/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +39 -0
- package/dist/types/editorui/bodycollection.d.ts +59 -0
- package/dist/types/editorui/boxed/boxededitoruiview.d.ts +44 -0
- package/dist/types/editorui/editorui.d.ts +292 -0
- package/dist/types/editorui/editoruiview.d.ts +43 -0
- package/dist/types/editorui/poweredby.d.ts +75 -0
- package/dist/types/focuscycler.d.ts +249 -0
- package/dist/types/formheader/formheaderview.d.ts +63 -0
- package/dist/types/highlightedtext/highlightedtextview.d.ts +42 -0
- package/dist/types/icon/iconview.d.ts +92 -0
- package/dist/types/iframe/iframeview.d.ts +54 -0
- package/dist/types/index.d.ts +87 -0
- package/dist/types/input/inputbase.d.ts +123 -0
- package/dist/types/input/inputview.d.ts +40 -0
- package/dist/types/inputnumber/inputnumberview.d.ts +53 -0
- package/dist/types/inputtext/inputtextview.d.ts +22 -0
- package/dist/types/label/labelview.d.ts +40 -0
- package/dist/types/labeledfield/labeledfieldview.d.ts +191 -0
- package/dist/types/labeledfield/utils.d.ts +127 -0
- package/dist/types/labeledinput/labeledinputview.d.ts +129 -0
- package/dist/types/list/listitemgroupview.d.ts +63 -0
- package/dist/types/list/listitemview.d.ts +40 -0
- package/dist/types/list/listseparatorview.d.ts +22 -0
- package/dist/types/list/listview.d.ts +128 -0
- package/dist/types/menubar/menubarmenubuttonview.d.ts +39 -0
- package/dist/types/menubar/menubarmenulistitembuttonview.d.ts +25 -0
- package/dist/types/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +27 -0
- package/dist/types/menubar/menubarmenulistitemview.d.ts +29 -0
- package/dist/types/menubar/menubarmenulistview.d.ts +28 -0
- package/dist/types/menubar/menubarmenupanelview.d.ts +57 -0
- package/dist/types/menubar/menubarmenuview.d.ts +113 -0
- package/dist/types/menubar/menubarview.d.ts +168 -0
- package/dist/types/menubar/utils.d.ts +443 -0
- package/dist/types/model.d.ts +26 -0
- package/dist/types/notification/notification.d.ts +215 -0
- package/dist/types/panel/balloon/balloonpanelview.d.ts +689 -0
- package/dist/types/panel/balloon/contextualballoon.d.ts +303 -0
- package/dist/types/panel/sticky/stickypanelview.d.ts +160 -0
- package/dist/types/search/filteredview.d.ts +35 -0
- package/dist/types/search/searchinfoview.d.ts +49 -0
- package/dist/types/search/searchresultsview.d.ts +58 -0
- package/dist/types/search/text/searchtextqueryview.d.ts +80 -0
- package/dist/types/search/text/searchtextview.d.ts +223 -0
- package/dist/types/spinner/spinnerview.d.ts +29 -0
- package/dist/types/template.d.ts +946 -0
- package/dist/types/textarea/textareaview.d.ts +108 -0
- package/dist/types/toolbar/balloon/balloontoolbar.d.ts +121 -0
- package/dist/types/toolbar/block/blockbuttonview.d.ts +39 -0
- package/dist/types/toolbar/block/blocktoolbar.d.ts +157 -0
- package/dist/types/toolbar/normalizetoolbarconfig.d.ts +44 -0
- package/dist/types/toolbar/toolbarlinebreakview.d.ts +22 -0
- package/dist/types/toolbar/toolbarseparatorview.d.ts +22 -0
- package/dist/types/toolbar/toolbarview.d.ts +271 -0
- package/dist/types/tooltipmanager.d.ts +199 -0
- package/dist/types/view.d.ts +426 -0
- package/dist/types/viewcollection.d.ts +143 -0
- package/lang/contexts.json +2 -1
- package/lang/translations/af.po +4 -0
- package/lang/translations/ar.po +4 -0
- package/lang/translations/ast.po +4 -0
- package/lang/translations/az.po +4 -0
- package/lang/translations/bg.po +4 -0
- package/lang/translations/bn.po +4 -0
- package/lang/translations/bs.po +4 -0
- package/lang/translations/ca.po +4 -0
- package/lang/translations/cs.po +4 -0
- package/lang/translations/da.po +4 -0
- package/lang/translations/de-ch.po +4 -0
- package/lang/translations/de.po +4 -0
- package/lang/translations/el.po +4 -0
- package/lang/translations/en-au.po +4 -0
- package/lang/translations/en-gb.po +4 -0
- package/lang/translations/en.po +4 -0
- package/lang/translations/eo.po +4 -0
- package/lang/translations/es-co.po +4 -0
- package/lang/translations/es.po +4 -0
- package/lang/translations/et.po +4 -0
- package/lang/translations/eu.po +4 -0
- package/lang/translations/fa.po +4 -0
- package/lang/translations/fi.po +4 -0
- package/lang/translations/fr.po +4 -0
- package/lang/translations/gl.po +4 -0
- package/lang/translations/he.po +4 -0
- package/lang/translations/hi.po +4 -0
- package/lang/translations/hr.po +4 -0
- package/lang/translations/hu.po +4 -0
- package/lang/translations/id.po +4 -0
- package/lang/translations/it.po +4 -0
- package/lang/translations/ja.po +4 -0
- package/lang/translations/jv.po +4 -0
- package/lang/translations/km.po +4 -0
- package/lang/translations/kn.po +4 -0
- package/lang/translations/ko.po +4 -0
- package/lang/translations/ku.po +4 -0
- package/lang/translations/lt.po +4 -0
- package/lang/translations/lv.po +4 -0
- package/lang/translations/ms.po +4 -0
- package/lang/translations/nb.po +4 -0
- package/lang/translations/ne.po +4 -0
- package/lang/translations/nl.po +4 -0
- package/lang/translations/no.po +4 -0
- package/lang/translations/pl.po +4 -0
- package/lang/translations/pt-br.po +4 -0
- package/lang/translations/pt.po +4 -0
- package/lang/translations/ro.po +4 -0
- package/lang/translations/ru.po +4 -0
- package/lang/translations/sk.po +4 -0
- package/lang/translations/sl.po +4 -0
- package/lang/translations/sq.po +4 -0
- package/lang/translations/sr-latn.po +4 -0
- package/lang/translations/sr.po +4 -0
- package/lang/translations/sv.po +4 -0
- package/lang/translations/th.po +4 -0
- package/lang/translations/ti.po +214 -0
- package/lang/translations/tk.po +4 -0
- package/lang/translations/tr.po +4 -0
- package/lang/translations/tt.po +4 -0
- package/lang/translations/ug.po +4 -0
- package/lang/translations/uk.po +4 -0
- package/lang/translations/ur.po +4 -0
- package/lang/translations/uz.po +4 -0
- package/lang/translations/vi.po +4 -0
- package/lang/translations/zh-cn.po +4 -0
- package/lang/translations/zh.po +4 -0
- package/package.json +4 -3
- package/src/arialiveannouncer.d.ts +34 -23
- package/src/arialiveannouncer.js +80 -30
- package/src/colorgrid/colortileview.d.ts +1 -1
- package/src/colorgrid/colortileview.js +3 -1
- package/src/colorpicker/colorpickerview.d.ts +32 -1
- package/src/colorpicker/colorpickerview.js +62 -13
- package/src/colorselector/colorpickerfragmentview.d.ts +4 -0
- package/src/colorselector/colorpickerfragmentview.js +13 -5
- package/src/colorselector/colorselectorview.js +1 -0
- package/src/index.d.ts +4 -4
- package/src/index.js +3 -2
- package/src/menubar/utils.d.ts +8 -1
- package/src/menubar/utils.js +26 -2
- package/src/toolbar/toolbarview.js +2 -3
- package/theme/components/arialiveannouncer/arialiveannouncer.css +4 -0
- package/theme/components/tooltip/tooltip.css +4 -0
- package/theme/globals/globals.css +0 -1
- package/theme/mixins/_mediacolors.css +20 -0
- package/theme/globals/_reset.css +0 -13
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ui/view
|
|
11
|
+
*/
|
|
12
|
+
import ViewCollection from './viewcollection.js';
|
|
13
|
+
import Template, { type BindChain, type TemplateDefinition } from './template.js';
|
|
14
|
+
import { Collection, type DecoratedMethodEvent, type Locale, type LocaleTranslate } from '@ckeditor/ckeditor5-utils';
|
|
15
|
+
import '../theme/globals/globals.css';
|
|
16
|
+
declare const View_base: import("@ckeditor/ckeditor5-utils").Mixed<{
|
|
17
|
+
new (): import("@ckeditor/ckeditor5-utils").Observable;
|
|
18
|
+
prototype: import("@ckeditor/ckeditor5-utils").Observable;
|
|
19
|
+
}, import("@ckeditor/ckeditor5-utils").DomEmitter>;
|
|
20
|
+
/**
|
|
21
|
+
* The basic view class, which represents an HTML element created out of a
|
|
22
|
+
* {@link module:ui/view~View#template}. Views are building blocks of the user interface and handle
|
|
23
|
+
* interaction
|
|
24
|
+
*
|
|
25
|
+
* Views {@link module:ui/view~View#registerChild aggregate} children in
|
|
26
|
+
* {@link module:ui/view~View#createCollection collections} and manage the life cycle of DOM
|
|
27
|
+
* listeners e.g. by handling rendering and destruction.
|
|
28
|
+
*
|
|
29
|
+
* See the {@link module:ui/template~TemplateDefinition} syntax to learn more about shaping view
|
|
30
|
+
* elements, attributes and listeners.
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* class SampleView extends View {
|
|
34
|
+
* constructor( locale ) {
|
|
35
|
+
* super( locale );
|
|
36
|
+
*
|
|
37
|
+
* const bind = this.bindTemplate;
|
|
38
|
+
*
|
|
39
|
+
* // Views define their interface (state) using observable attributes.
|
|
40
|
+
* this.set( 'elementClass', 'bar' );
|
|
41
|
+
*
|
|
42
|
+
* this.setTemplate( {
|
|
43
|
+
* tag: 'p',
|
|
44
|
+
*
|
|
45
|
+
* // The element of the view can be defined with its children.
|
|
46
|
+
* children: [
|
|
47
|
+
* 'Hello',
|
|
48
|
+
* {
|
|
49
|
+
* tag: 'b',
|
|
50
|
+
* children: [ 'world!' ]
|
|
51
|
+
* }
|
|
52
|
+
* ],
|
|
53
|
+
* attributes: {
|
|
54
|
+
* class: [
|
|
55
|
+
* 'foo',
|
|
56
|
+
*
|
|
57
|
+
* // Observable attributes control the state of the view in DOM.
|
|
58
|
+
* bind.to( 'elementClass' )
|
|
59
|
+
* ]
|
|
60
|
+
* },
|
|
61
|
+
* on: {
|
|
62
|
+
* // Views listen to DOM events and propagate them.
|
|
63
|
+
* click: bind.to( 'clicked' )
|
|
64
|
+
* }
|
|
65
|
+
* } );
|
|
66
|
+
* }
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
69
|
+
* const view = new SampleView( locale );
|
|
70
|
+
*
|
|
71
|
+
* view.render();
|
|
72
|
+
*
|
|
73
|
+
* // Append <p class="foo bar">Hello<b>world</b></p> to the <body>
|
|
74
|
+
* document.body.appendChild( view.element );
|
|
75
|
+
*
|
|
76
|
+
* // Change the class attribute to <p class="foo baz">Hello<b>world</b></p>
|
|
77
|
+
* view.elementClass = 'baz';
|
|
78
|
+
*
|
|
79
|
+
* // Respond to the "click" event in DOM by executing a custom action.
|
|
80
|
+
* view.on( 'clicked', () => {
|
|
81
|
+
* console.log( 'The view has been clicked!' );
|
|
82
|
+
* } );
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export default class View<TElement extends HTMLElement = HTMLElement> extends View_base {
|
|
86
|
+
/**
|
|
87
|
+
* An HTML element of the view. `null` until {@link #render rendered}
|
|
88
|
+
* from the {@link #template}.
|
|
89
|
+
*
|
|
90
|
+
* ```ts
|
|
91
|
+
* class SampleView extends View {
|
|
92
|
+
* constructor() {
|
|
93
|
+
* super();
|
|
94
|
+
*
|
|
95
|
+
* // A template instance the #element will be created from.
|
|
96
|
+
* this.setTemplate( {
|
|
97
|
+
* tag: 'p'
|
|
98
|
+
*
|
|
99
|
+
* // ...
|
|
100
|
+
* } );
|
|
101
|
+
* }
|
|
102
|
+
* }
|
|
103
|
+
*
|
|
104
|
+
* const view = new SampleView();
|
|
105
|
+
*
|
|
106
|
+
* // Renders the #template.
|
|
107
|
+
* view.render();
|
|
108
|
+
*
|
|
109
|
+
* // Append the HTML element of the view to <body>.
|
|
110
|
+
* document.body.appendChild( view.element );
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* **Note**: The element of the view can also be assigned directly:
|
|
114
|
+
*
|
|
115
|
+
* ```ts
|
|
116
|
+
* view.element = document.querySelector( '#my-container' );
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
element: TElement | null;
|
|
120
|
+
/**
|
|
121
|
+
* Set `true` when the view has already been {@link module:ui/view~View#render rendered}.
|
|
122
|
+
*
|
|
123
|
+
* @readonly
|
|
124
|
+
*/
|
|
125
|
+
isRendered: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* A set of tools to localize the user interface.
|
|
128
|
+
*
|
|
129
|
+
* Also see {@link module:core/editor/editor~Editor#locale}.
|
|
130
|
+
*
|
|
131
|
+
* @readonly
|
|
132
|
+
*/
|
|
133
|
+
locale: Locale | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Shorthand for {@link module:utils/locale~Locale#t}.
|
|
136
|
+
*
|
|
137
|
+
* Note: If {@link #locale} instance hasn't been passed to the view this method may not
|
|
138
|
+
* be available.
|
|
139
|
+
*
|
|
140
|
+
* @see module:utils/locale~Locale#t
|
|
141
|
+
*/
|
|
142
|
+
t: LocaleTranslate | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* Template of this view. It provides the {@link #element} representing
|
|
145
|
+
* the view in DOM, which is {@link #render rendered}.
|
|
146
|
+
*/
|
|
147
|
+
template?: Template;
|
|
148
|
+
viewUid?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Collections registered with {@link #createCollection}.
|
|
151
|
+
*/
|
|
152
|
+
protected _viewCollections: Collection<ViewCollection>;
|
|
153
|
+
/**
|
|
154
|
+
* A collection of view instances, which have been added directly
|
|
155
|
+
* into the {@link module:ui/template~Template#children}.
|
|
156
|
+
*/
|
|
157
|
+
protected _unboundChildren: ViewCollection;
|
|
158
|
+
/**
|
|
159
|
+
* Cached {@link module:ui/template~BindChain bind chain} object created by the
|
|
160
|
+
* {@link #template}. See {@link #bindTemplate}.
|
|
161
|
+
*/
|
|
162
|
+
private _bindTemplate?;
|
|
163
|
+
/**
|
|
164
|
+
* Creates an instance of the {@link module:ui/view~View} class.
|
|
165
|
+
*
|
|
166
|
+
* Also see {@link #render}.
|
|
167
|
+
*
|
|
168
|
+
* @param locale The localization services instance.
|
|
169
|
+
*/
|
|
170
|
+
constructor(locale?: Locale);
|
|
171
|
+
/**
|
|
172
|
+
* Shorthand for {@link module:ui/template~Template.bind}, a binding
|
|
173
|
+
* {@link module:ui/template~BindChain interface} pre–configured for the view instance.
|
|
174
|
+
*
|
|
175
|
+
* It provides {@link module:ui/template~BindChain#to `to()`} and
|
|
176
|
+
* {@link module:ui/template~BindChain#if `if()`} methods that initialize bindings with
|
|
177
|
+
* observable attributes and attach DOM listeners.
|
|
178
|
+
*
|
|
179
|
+
* ```ts
|
|
180
|
+
* class SampleView extends View {
|
|
181
|
+
* constructor( locale ) {
|
|
182
|
+
* super( locale );
|
|
183
|
+
*
|
|
184
|
+
* const bind = this.bindTemplate;
|
|
185
|
+
*
|
|
186
|
+
* // These {@link module:utils/observablemixin~Observable observable} attributes will control
|
|
187
|
+
* // the state of the view in DOM.
|
|
188
|
+
* this.set( {
|
|
189
|
+
* elementClass: 'foo',
|
|
190
|
+
* isEnabled: true
|
|
191
|
+
* } );
|
|
192
|
+
*
|
|
193
|
+
* this.setTemplate( {
|
|
194
|
+
* tag: 'p',
|
|
195
|
+
*
|
|
196
|
+
* attributes: {
|
|
197
|
+
* // The class HTML attribute will follow elementClass
|
|
198
|
+
* // and isEnabled view attributes.
|
|
199
|
+
* class: [
|
|
200
|
+
* bind.to( 'elementClass' )
|
|
201
|
+
* bind.if( 'isEnabled', 'present-when-enabled' )
|
|
202
|
+
* ]
|
|
203
|
+
* },
|
|
204
|
+
*
|
|
205
|
+
* on: {
|
|
206
|
+
* // The view will fire the "clicked" event upon clicking <p> in DOM.
|
|
207
|
+
* click: bind.to( 'clicked' )
|
|
208
|
+
* }
|
|
209
|
+
* } );
|
|
210
|
+
* }
|
|
211
|
+
* }
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
get bindTemplate(): BindChain<this>;
|
|
215
|
+
/**
|
|
216
|
+
* Creates a new collection of views, which can be used as
|
|
217
|
+
* {@link module:ui/template~Template#children} of this view.
|
|
218
|
+
*
|
|
219
|
+
* ```ts
|
|
220
|
+
* class SampleView extends View {
|
|
221
|
+
* constructor( locale ) {
|
|
222
|
+
* super( locale );
|
|
223
|
+
*
|
|
224
|
+
* const child = new ChildView( locale );
|
|
225
|
+
* this.items = this.createCollection( [ child ] );
|
|
226
|
+
*
|
|
227
|
+
* this.setTemplate( {
|
|
228
|
+
* tag: 'p',
|
|
229
|
+
*
|
|
230
|
+
* // `items` collection will render here.
|
|
231
|
+
* children: this.items
|
|
232
|
+
* } );
|
|
233
|
+
* }
|
|
234
|
+
* }
|
|
235
|
+
*
|
|
236
|
+
* const view = new SampleView( locale );
|
|
237
|
+
* view.render();
|
|
238
|
+
*
|
|
239
|
+
* // It will append <p><child#element></p> to the <body>.
|
|
240
|
+
* document.body.appendChild( view.element );
|
|
241
|
+
* ```
|
|
242
|
+
*
|
|
243
|
+
* @param views Initial views of the collection.
|
|
244
|
+
* @returns A new collection of view instances.
|
|
245
|
+
*/
|
|
246
|
+
createCollection<T extends View = View>(views?: Iterable<T>): ViewCollection<T>;
|
|
247
|
+
/**
|
|
248
|
+
* Registers a new child view under the view instance. Once registered, a child
|
|
249
|
+
* view is managed by its parent, including {@link #render rendering}
|
|
250
|
+
* and {@link #destroy destruction}.
|
|
251
|
+
*
|
|
252
|
+
* To revert this, use {@link #deregisterChild}.
|
|
253
|
+
*
|
|
254
|
+
* ```ts
|
|
255
|
+
* class SampleView extends View {
|
|
256
|
+
* constructor( locale ) {
|
|
257
|
+
* super( locale );
|
|
258
|
+
*
|
|
259
|
+
* this.childA = new SomeChildView( locale );
|
|
260
|
+
* this.childB = new SomeChildView( locale );
|
|
261
|
+
*
|
|
262
|
+
* this.setTemplate( { tag: 'p' } );
|
|
263
|
+
*
|
|
264
|
+
* // Register the children.
|
|
265
|
+
* this.registerChild( [ this.childA, this.childB ] );
|
|
266
|
+
* }
|
|
267
|
+
*
|
|
268
|
+
* render() {
|
|
269
|
+
* super.render();
|
|
270
|
+
*
|
|
271
|
+
* this.element.appendChild( this.childA.element );
|
|
272
|
+
* this.element.appendChild( this.childB.element );
|
|
273
|
+
* }
|
|
274
|
+
* }
|
|
275
|
+
*
|
|
276
|
+
* const view = new SampleView( locale );
|
|
277
|
+
*
|
|
278
|
+
* view.render();
|
|
279
|
+
*
|
|
280
|
+
* // Will append <p><childA#element><b></b><childB#element></p>.
|
|
281
|
+
* document.body.appendChild( view.element );
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* **Note**: There's no need to add child views if they're already referenced in the
|
|
285
|
+
* {@link #template}:
|
|
286
|
+
*
|
|
287
|
+
* ```ts
|
|
288
|
+
* class SampleView extends View {
|
|
289
|
+
* constructor( locale ) {
|
|
290
|
+
* super( locale );
|
|
291
|
+
*
|
|
292
|
+
* this.childA = new SomeChildView( locale );
|
|
293
|
+
* this.childB = new SomeChildView( locale );
|
|
294
|
+
*
|
|
295
|
+
* this.setTemplate( {
|
|
296
|
+
* tag: 'p',
|
|
297
|
+
*
|
|
298
|
+
* // These children will be added automatically. There's no
|
|
299
|
+
* // need to call {@link #registerChild} for any of them.
|
|
300
|
+
* children: [ this.childA, this.childB ]
|
|
301
|
+
* } );
|
|
302
|
+
* }
|
|
303
|
+
*
|
|
304
|
+
* // ...
|
|
305
|
+
* }
|
|
306
|
+
* ```
|
|
307
|
+
*
|
|
308
|
+
* @param children Children views to be registered.
|
|
309
|
+
*/
|
|
310
|
+
registerChild(children: View | Iterable<View>): void;
|
|
311
|
+
/**
|
|
312
|
+
* The opposite of {@link #registerChild}. Removes a child view from this view instance.
|
|
313
|
+
* Once removed, the child is no longer managed by its parent, e.g. it can safely
|
|
314
|
+
* become a child of another parent view.
|
|
315
|
+
*
|
|
316
|
+
* @see #registerChild
|
|
317
|
+
* @param children Child views to be removed.
|
|
318
|
+
*/
|
|
319
|
+
deregisterChild(children: View | Iterable<View>): void;
|
|
320
|
+
/**
|
|
321
|
+
* Sets the {@link #template} of the view with with given definition.
|
|
322
|
+
*
|
|
323
|
+
* A shorthand for:
|
|
324
|
+
*
|
|
325
|
+
* ```ts
|
|
326
|
+
* view.setTemplate( definition );
|
|
327
|
+
* ```
|
|
328
|
+
*
|
|
329
|
+
* @param definition Definition of view's template.
|
|
330
|
+
*/
|
|
331
|
+
setTemplate(definition: TemplateDefinition): void;
|
|
332
|
+
/**
|
|
333
|
+
* {@link module:ui/template~Template.extend Extends} the {@link #template} of the view with
|
|
334
|
+
* with given definition.
|
|
335
|
+
*
|
|
336
|
+
* A shorthand for:
|
|
337
|
+
*
|
|
338
|
+
* ```ts
|
|
339
|
+
* Template.extend( view.template, definition );
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* **Note**: Is requires the {@link #template} to be already set. See {@link #setTemplate}.
|
|
343
|
+
*
|
|
344
|
+
* @param definition Definition which extends the {@link #template}.
|
|
345
|
+
*/
|
|
346
|
+
extendTemplate(definition: Partial<TemplateDefinition>): void;
|
|
347
|
+
/**
|
|
348
|
+
* Recursively renders the view.
|
|
349
|
+
*
|
|
350
|
+
* Once the view is rendered:
|
|
351
|
+
* * the {@link #element} becomes an HTML element out of {@link #template},
|
|
352
|
+
* * the {@link #isRendered} flag is set `true`.
|
|
353
|
+
*
|
|
354
|
+
* **Note**: The children of the view:
|
|
355
|
+
* * defined directly in the {@link #template}
|
|
356
|
+
* * residing in collections created by the {@link #createCollection} method,
|
|
357
|
+
* * and added by {@link #registerChild}
|
|
358
|
+
* are also rendered in the process.
|
|
359
|
+
*
|
|
360
|
+
* In general, `render()` method is the right place to keep the code which refers to the
|
|
361
|
+
* {@link #element} and should be executed at the very beginning of the view's life cycle.
|
|
362
|
+
*
|
|
363
|
+
* It is possible to {@link module:ui/template~Template.extend} the {@link #template} before
|
|
364
|
+
* the view is rendered. To allow an early customization of the view (e.g. by its parent),
|
|
365
|
+
* such references should be done in `render()`.
|
|
366
|
+
*
|
|
367
|
+
* ```ts
|
|
368
|
+
* class SampleView extends View {
|
|
369
|
+
* constructor() {
|
|
370
|
+
* this.setTemplate( {
|
|
371
|
+
* // ...
|
|
372
|
+
* } );
|
|
373
|
+
* },
|
|
374
|
+
*
|
|
375
|
+
* render() {
|
|
376
|
+
* // View#element becomes available.
|
|
377
|
+
* super.render();
|
|
378
|
+
*
|
|
379
|
+
* // The "scroll" listener depends on #element.
|
|
380
|
+
* this.listenTo( window, 'scroll', () => {
|
|
381
|
+
* // A reference to #element would render the #template and make it non-extendable.
|
|
382
|
+
* if ( window.scrollY > 0 ) {
|
|
383
|
+
* this.element.scrollLeft = 100;
|
|
384
|
+
* } else {
|
|
385
|
+
* this.element.scrollLeft = 0;
|
|
386
|
+
* }
|
|
387
|
+
* } );
|
|
388
|
+
* }
|
|
389
|
+
* }
|
|
390
|
+
*
|
|
391
|
+
* const view = new SampleView();
|
|
392
|
+
*
|
|
393
|
+
* // Let's customize the view before it gets rendered.
|
|
394
|
+
* view.extendTemplate( {
|
|
395
|
+
* attributes: {
|
|
396
|
+
* class: [
|
|
397
|
+
* 'additional-class'
|
|
398
|
+
* ]
|
|
399
|
+
* }
|
|
400
|
+
* } );
|
|
401
|
+
*
|
|
402
|
+
* // Late rendering allows customization of the view.
|
|
403
|
+
* view.render();
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
render(): void;
|
|
407
|
+
/**
|
|
408
|
+
* Recursively destroys the view instance and child views added by {@link #registerChild} and
|
|
409
|
+
* residing in collections created by the {@link #createCollection}.
|
|
410
|
+
*
|
|
411
|
+
* Destruction disables all event listeners:
|
|
412
|
+
* * created on the view, e.g. `view.on( 'event', () => {} )`,
|
|
413
|
+
* * defined in the {@link #template} for DOM events.
|
|
414
|
+
*/
|
|
415
|
+
destroy(): void;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Event fired by the {@link module:ui/view~View#render} method. Actual rendering is executed as a listener to
|
|
419
|
+
* this event with the default priority.
|
|
420
|
+
*
|
|
421
|
+
* See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.
|
|
422
|
+
*
|
|
423
|
+
* @eventName ~View#render
|
|
424
|
+
*/
|
|
425
|
+
export type UIViewRenderEvent = DecoratedMethodEvent<View, 'render'>;
|
|
426
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ui/viewcollection
|
|
11
|
+
*/
|
|
12
|
+
import { Collection, type EmitterMixinDelegateChain } from '@ckeditor/ckeditor5-utils';
|
|
13
|
+
import type View from './view.js';
|
|
14
|
+
/**
|
|
15
|
+
* Collects {@link module:ui/view~View} instances.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* const parentView = new ParentView( locale );
|
|
19
|
+
* const collection = new ViewCollection( locale );
|
|
20
|
+
*
|
|
21
|
+
* collection.setParent( parentView.element );
|
|
22
|
+
*
|
|
23
|
+
* const viewA = new ChildView( locale );
|
|
24
|
+
* const viewB = new ChildView( locale );
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* View collection renders and manages view {@link module:ui/view~View#element elements}:
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* collection.add( viewA );
|
|
31
|
+
* collection.add( viewB );
|
|
32
|
+
*
|
|
33
|
+
* console.log( parentView.element.firsChild ); // -> viewA.element
|
|
34
|
+
* console.log( parentView.element.lastChild ); // -> viewB.element
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* It {@link module:ui/viewcollection~ViewCollection#delegate propagates} DOM events too:
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* // Delegate #click and #keydown events from viewA and viewB to the parentView.
|
|
41
|
+
* collection.delegate( 'click' ).to( parentView );
|
|
42
|
+
*
|
|
43
|
+
* parentView.on( 'click', ( evt ) => {
|
|
44
|
+
* console.log( `${ evt.source } has been clicked.` );
|
|
45
|
+
* } );
|
|
46
|
+
*
|
|
47
|
+
* // This event will be delegated to the parentView.
|
|
48
|
+
* viewB.fire( 'click' );
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}
|
|
52
|
+
* of a {@link module:ui/template~Template template}.
|
|
53
|
+
*/
|
|
54
|
+
export default class ViewCollection<TView extends View = View> extends Collection<TView> {
|
|
55
|
+
id?: string;
|
|
56
|
+
/**
|
|
57
|
+
* A parent element within which child views are rendered and managed in DOM.
|
|
58
|
+
*/
|
|
59
|
+
private _parentElement;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new instance of the {@link module:ui/viewcollection~ViewCollection}.
|
|
62
|
+
*
|
|
63
|
+
* @param initialItems The initial items of the collection.
|
|
64
|
+
*/
|
|
65
|
+
constructor(initialItems?: Iterable<TView>);
|
|
66
|
+
/**
|
|
67
|
+
* Destroys the view collection along with child views.
|
|
68
|
+
* See the view {@link module:ui/view~View#destroy} method.
|
|
69
|
+
*/
|
|
70
|
+
destroy(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the parent HTML element of this collection. When parent is set, {@link #add adding} and
|
|
73
|
+
* {@link #remove removing} views in the collection synchronizes their
|
|
74
|
+
* {@link module:ui/view~View#element elements} in the parent element.
|
|
75
|
+
*
|
|
76
|
+
* @param element A new parent element.
|
|
77
|
+
*/
|
|
78
|
+
setParent(elementOrDocFragment: DocumentFragment | HTMLElement): void;
|
|
79
|
+
/**
|
|
80
|
+
* Delegates selected events coming from within views in the collection to any
|
|
81
|
+
* {@link module:utils/emittermixin~Emitter}.
|
|
82
|
+
*
|
|
83
|
+
* For the following views and collection:
|
|
84
|
+
*
|
|
85
|
+
* ```ts
|
|
86
|
+
* const viewA = new View();
|
|
87
|
+
* const viewB = new View();
|
|
88
|
+
* const viewC = new View();
|
|
89
|
+
*
|
|
90
|
+
* const views = parentView.createCollection();
|
|
91
|
+
*
|
|
92
|
+
* views.delegate( 'eventX' ).to( viewB );
|
|
93
|
+
* views.delegate( 'eventX', 'eventY' ).to( viewC );
|
|
94
|
+
*
|
|
95
|
+
* views.add( viewA );
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* the `eventX` is delegated (fired by) `viewB` and `viewC` along with `customData`:
|
|
99
|
+
*
|
|
100
|
+
* ```ts
|
|
101
|
+
* viewA.fire( 'eventX', customData );
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* and `eventY` is delegated (fired by) `viewC` along with `customData`:
|
|
105
|
+
*
|
|
106
|
+
* ```ts
|
|
107
|
+
* viewA.fire( 'eventY', customData );
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* See {@link module:utils/emittermixin~Emitter#delegate}.
|
|
111
|
+
*
|
|
112
|
+
* @param events {@link module:ui/view~View} event names to be delegated to another
|
|
113
|
+
* {@link module:utils/emittermixin~Emitter}.
|
|
114
|
+
* @returns Object with `to` property, a function which accepts the destination
|
|
115
|
+
* of {@link module:utils/emittermixin~Emitter#delegate delegated} events.
|
|
116
|
+
*/
|
|
117
|
+
delegate(...events: Array<string>): EmitterMixinDelegateChain;
|
|
118
|
+
/**
|
|
119
|
+
* This method {@link module:ui/view~View#render renders} a new view added to the collection.
|
|
120
|
+
*
|
|
121
|
+
* If the {@link #_parentElement parent element} of the collection is set, this method also adds
|
|
122
|
+
* the view's {@link module:ui/view~View#element} as a child of the parent in DOM at a specified index.
|
|
123
|
+
*
|
|
124
|
+
* **Note**: If index is not specified, the view's element is pushed as the last child
|
|
125
|
+
* of the parent element.
|
|
126
|
+
*
|
|
127
|
+
* @param view A new view added to the collection.
|
|
128
|
+
* @param index An index the view holds in the collection. When not specified,
|
|
129
|
+
* the view is added at the end.
|
|
130
|
+
*/
|
|
131
|
+
private _renderViewIntoCollectionParent;
|
|
132
|
+
/**
|
|
133
|
+
* Removes a child view from the collection. If the {@link #setParent parent element} of the
|
|
134
|
+
* collection has been set, the {@link module:ui/view~View#element element} of the view is also removed
|
|
135
|
+
* in DOM, reflecting the order of the collection.
|
|
136
|
+
*
|
|
137
|
+
* See the {@link #add} method.
|
|
138
|
+
*
|
|
139
|
+
* @param subject The view to remove, its id or index in the collection.
|
|
140
|
+
* @returns The removed view.
|
|
141
|
+
*/
|
|
142
|
+
remove(subject: TView | number | string): TView;
|
|
143
|
+
}
|
package/lang/contexts.json
CHANGED
|
@@ -46,5 +46,6 @@
|
|
|
46
46
|
"MENU_BAR_MENU_HELP": "The label of the top-level application menu bar menu containing buttons and features helping users to learn about the editor (e.g. accessibility help).",
|
|
47
47
|
"MENU_BAR_MENU_TEXT": "The label of the application menu bar menu containing buttons and features that apply formatting to a text (e.g. bold, italic, etc.).",
|
|
48
48
|
"MENU_BAR_MENU_FONT": "The label of the application menu bar menu containing buttons and features that control the font of the edited content (e.g. font size, font color, etc.).",
|
|
49
|
-
"Editor menu bar": "The accessible label of the editor menu bar used by assistive technologies."
|
|
49
|
+
"Editor menu bar": "The accessible label of the editor menu bar used by assistive technologies.",
|
|
50
|
+
"Please enter a valid color (e.g. \"ff0000\").": "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
50
51
|
}
|
package/lang/translations/af.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr ""
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr ""
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr ""
|
package/lang/translations/ar.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr "خط"
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr "شريط قائمة المحرِّر"
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr "يُرجى إدخال لون صالح (على سبيل المثال \"ff0000\")."
|
package/lang/translations/ast.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr ""
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr ""
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr ""
|
package/lang/translations/az.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr ""
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr ""
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr ""
|
package/lang/translations/bg.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr "Шрифт"
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr "Редактор на лентата с менюта"
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr "Моля, въведете валиден цвят (напр. \"ff0000\")."
|
package/lang/translations/bn.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr "ফন্ট"
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr "ইডিটর মেনু বার"
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr "অনুগ্রহ করে একটি ভ্যালিড কালার প্রবেশ করান (e.g. \"ff0000\")."
|
package/lang/translations/bs.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr ""
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr ""
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr ""
|
package/lang/translations/ca.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr "Font"
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr "Barra de menú del editor"
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr "Introdueix un color vàlid (p. ex. \"ff0000\")."
|
package/lang/translations/cs.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr "Písmo"
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr "Panel nabídek editoru"
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr "Zadejte platnou barvu (např. „ff0000“)."
|
package/lang/translations/da.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr "Font"
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr "Editor menulinje"
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr "Indtast venligst en gyldig farve (f.eks. \"ff0000"
|
|
@@ -208,3 +208,7 @@ msgstr ""
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr ""
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr ""
|
package/lang/translations/de.po
CHANGED
|
@@ -208,3 +208,7 @@ msgstr "Schriftart"
|
|
|
208
208
|
msgctxt "The accessible label of the editor menu bar used by assistive technologies."
|
|
209
209
|
msgid "Editor menu bar"
|
|
210
210
|
msgstr "Menüleiste des Editors"
|
|
211
|
+
|
|
212
|
+
msgctxt "An error text displayed when user attempted to enter an color that is not in HEX format."
|
|
213
|
+
msgid "Please enter a valid color (e.g. \"ff0000\")."
|
|
214
|
+
msgstr "Bitte geben Sie eine gültige Farbe ein (z. B. „ff0000“)."
|