@ckeditor/ckeditor5-ui 37.0.0-alpha.0 → 37.0.0-alpha.2
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/package.json +22 -22
- package/src/{uiconfig.d.ts → augmentation.d.ts} +7 -3
- package/src/bindings/submithandler.d.ts +3 -3
- package/src/bindings/submithandler.js +1 -1
- package/src/button/button.d.ts +2 -2
- package/src/colorgrid/colorgridview.d.ts +13 -13
- package/src/colorgrid/colorgridview.js +6 -6
- package/src/colorgrid/colortileview.d.ts +2 -2
- package/src/colorgrid/colortileview.js +2 -2
- package/src/colorgrid/utils.d.ts +1 -1
- package/src/colorgrid/utils.js +1 -1
- package/src/componentfactory.js +1 -1
- package/src/dropdown/button/dropdownbutton.d.ts +2 -2
- package/src/dropdown/button/splitbuttonview.d.ts +1 -1
- package/src/dropdown/button/splitbuttonview.js +1 -1
- package/src/dropdown/dropdownview.d.ts +3 -3
- package/src/editableui/editableuiview.d.ts +2 -1
- package/src/editableui/editableuiview.js +2 -1
- package/src/editorui/editorui.d.ts +8 -9
- package/src/editorui/editorui.js +7 -7
- package/src/iframe/iframeview.d.ts +1 -1
- package/src/index.d.ts +2 -1
- package/src/index.js +1 -0
- package/src/input/inputview.d.ts +1 -1
- package/src/notification/notification.d.ts +4 -9
- package/src/panel/balloon/contextualballoon.d.ts +64 -5
- package/src/panel/balloon/contextualballoon.js +1 -1
- package/src/panel/sticky/stickypanelview.d.ts +1 -1
- package/src/template.d.ts +9 -7
- package/src/template.js +1 -1
- package/src/toolbar/balloon/balloontoolbar.d.ts +3 -9
- package/src/toolbar/balloon/balloontoolbar.js +0 -1
- package/src/toolbar/block/blocktoolbar.d.ts +0 -6
- package/src/toolbar/block/blocktoolbar.js +0 -1
- package/src/toolbar/toolbarview.d.ts +26 -2
- package/src/tooltipmanager.d.ts +1 -1
- package/src/tooltipmanager.js +1 -1
- package/src/view.d.ts +3 -3
- /package/src/{uiconfig.js → augmentation.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-ui",
|
|
3
|
-
"version": "37.0.0-alpha.
|
|
3
|
+
"version": "37.0.0-alpha.2",
|
|
4
4
|
"description": "The UI framework and standard UI library of CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -11,29 +11,29 @@
|
|
|
11
11
|
],
|
|
12
12
|
"main": "src/index.js",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ckeditor/ckeditor5-utils": "^37.0.0-alpha.
|
|
15
|
-
"@ckeditor/ckeditor5-core": "^37.0.0-alpha.
|
|
14
|
+
"@ckeditor/ckeditor5-utils": "^37.0.0-alpha.2",
|
|
15
|
+
"@ckeditor/ckeditor5-core": "^37.0.0-alpha.2",
|
|
16
16
|
"lodash-es": "^4.17.15"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@ckeditor/ckeditor5-basic-styles": "^37.0.0-alpha.
|
|
20
|
-
"@ckeditor/ckeditor5-block-quote": "^37.0.0-alpha.
|
|
21
|
-
"@ckeditor/ckeditor5-editor-balloon": "^37.0.0-alpha.
|
|
22
|
-
"@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.
|
|
23
|
-
"@ckeditor/ckeditor5-engine": "^37.0.0-alpha.
|
|
24
|
-
"@ckeditor/ckeditor5-enter": "^37.0.0-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-essentials": "^37.0.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-font": "^37.0.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-find-and-replace": "^37.0.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-heading": "^37.0.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-image": "^37.0.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-link": "^37.0.0-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-list": "^37.0.0-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-mention": "^37.0.0-alpha.
|
|
33
|
-
"@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.
|
|
34
|
-
"@ckeditor/ckeditor5-horizontal-line": "^37.0.0-alpha.
|
|
35
|
-
"@ckeditor/ckeditor5-table": "^37.0.0-alpha.
|
|
36
|
-
"@ckeditor/ckeditor5-typing": "^37.0.0-alpha.
|
|
19
|
+
"@ckeditor/ckeditor5-basic-styles": "^37.0.0-alpha.2",
|
|
20
|
+
"@ckeditor/ckeditor5-block-quote": "^37.0.0-alpha.2",
|
|
21
|
+
"@ckeditor/ckeditor5-editor-balloon": "^37.0.0-alpha.2",
|
|
22
|
+
"@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.2",
|
|
23
|
+
"@ckeditor/ckeditor5-engine": "^37.0.0-alpha.2",
|
|
24
|
+
"@ckeditor/ckeditor5-enter": "^37.0.0-alpha.2",
|
|
25
|
+
"@ckeditor/ckeditor5-essentials": "^37.0.0-alpha.2",
|
|
26
|
+
"@ckeditor/ckeditor5-font": "^37.0.0-alpha.2",
|
|
27
|
+
"@ckeditor/ckeditor5-find-and-replace": "^37.0.0-alpha.2",
|
|
28
|
+
"@ckeditor/ckeditor5-heading": "^37.0.0-alpha.2",
|
|
29
|
+
"@ckeditor/ckeditor5-image": "^37.0.0-alpha.2",
|
|
30
|
+
"@ckeditor/ckeditor5-link": "^37.0.0-alpha.2",
|
|
31
|
+
"@ckeditor/ckeditor5-list": "^37.0.0-alpha.2",
|
|
32
|
+
"@ckeditor/ckeditor5-mention": "^37.0.0-alpha.2",
|
|
33
|
+
"@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.2",
|
|
34
|
+
"@ckeditor/ckeditor5-horizontal-line": "^37.0.0-alpha.2",
|
|
35
|
+
"@ckeditor/ckeditor5-table": "^37.0.0-alpha.2",
|
|
36
|
+
"@ckeditor/ckeditor5-typing": "^37.0.0-alpha.2",
|
|
37
37
|
"typescript": "^4.8.4",
|
|
38
38
|
"webpack": "^5.58.1",
|
|
39
39
|
"webpack-cli": "^4.9.0"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"CHANGELOG.md"
|
|
61
61
|
],
|
|
62
62
|
"scripts": {
|
|
63
|
-
"build": "tsc -p ./tsconfig.
|
|
63
|
+
"build": "tsc -p ./tsconfig.json",
|
|
64
64
|
"postversion": "npm run build"
|
|
65
65
|
},
|
|
66
66
|
"types": "src/index.d.ts"
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
+
import type { BalloonToolbar, BlockToolbar, ContextualBalloon, Notification } from './index';
|
|
5
6
|
import type { ToolbarConfig } from '@ckeditor/ckeditor5-core';
|
|
6
|
-
/**
|
|
7
|
-
* @module ui/uiconfig
|
|
8
|
-
*/
|
|
9
7
|
declare module '@ckeditor/ckeditor5-core' {
|
|
10
8
|
interface EditorConfig {
|
|
11
9
|
/**
|
|
@@ -79,4 +77,10 @@ declare module '@ckeditor/ckeditor5-core' {
|
|
|
79
77
|
*/
|
|
80
78
|
blockToolbar?: ToolbarConfig;
|
|
81
79
|
}
|
|
80
|
+
interface PluginsMap {
|
|
81
|
+
[BalloonToolbar.pluginName]: BalloonToolbar;
|
|
82
|
+
[BlockToolbar.pluginName]: BlockToolbar;
|
|
83
|
+
[ContextualBalloon.pluginName]: ContextualBalloon;
|
|
84
|
+
[Notification.pluginName]: Notification;
|
|
85
|
+
}
|
|
82
86
|
}
|
|
@@ -10,7 +10,7 @@ import type View from '../view';
|
|
|
10
10
|
* A handler useful for {@link module:ui/view~View views} working as HTML forms. It intercepts a native DOM
|
|
11
11
|
* `submit` event, prevents the default web browser behavior (navigation and page reload) and
|
|
12
12
|
* fires the `submit` event on a view instead. Such a custom event can be then used by any
|
|
13
|
-
* {@link module:utils/dom/emittermixin~
|
|
13
|
+
* {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.
|
|
14
14
|
*
|
|
15
15
|
* ```ts
|
|
16
16
|
* import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';
|
|
@@ -47,9 +47,9 @@ export default function submitHandler({ view }: {
|
|
|
47
47
|
view: View;
|
|
48
48
|
}): void;
|
|
49
49
|
/**
|
|
50
|
-
* Fired by {@link ~submitHandler} helper.
|
|
50
|
+
* Fired by {@link module:ui/bindings/submithandler~submitHandler} helper.
|
|
51
51
|
*
|
|
52
|
-
* @eventName submit
|
|
52
|
+
* @eventName module:ui/view~View#submit
|
|
53
53
|
*/
|
|
54
54
|
export type SubmitHandlerEvent = {
|
|
55
55
|
name: 'submit';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* A handler useful for {@link module:ui/view~View views} working as HTML forms. It intercepts a native DOM
|
|
7
7
|
* `submit` event, prevents the default web browser behavior (navigation and page reload) and
|
|
8
8
|
* fires the `submit` event on a view instead. Such a custom event can be then used by any
|
|
9
|
-
* {@link module:utils/dom/emittermixin~
|
|
9
|
+
* {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
12
|
* import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';
|
package/src/button/button.d.ts
CHANGED
|
@@ -143,10 +143,10 @@ export default interface Button {
|
|
|
143
143
|
labelStyle: string | undefined;
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
|
-
* Fired when the button view is clicked. It won't be fired when the button {@link #isEnabled}
|
|
146
|
+
* Fired when the button view is clicked. It won't be fired when the button {@link module:ui/button/button~Button#isEnabled}
|
|
147
147
|
* is `false`.
|
|
148
148
|
*
|
|
149
|
-
* @eventName execute
|
|
149
|
+
* @eventName ~Button#execute
|
|
150
150
|
*/
|
|
151
151
|
export type ButtonExecuteEvent = {
|
|
152
152
|
name: 'execute';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @module ui/colorgrid/
|
|
6
|
+
* @module ui/colorgrid/colorgridview
|
|
7
7
|
*/
|
|
8
8
|
import View from '../view';
|
|
9
9
|
import ColorTileView from './colortileview';
|
|
@@ -12,7 +12,7 @@ import type ViewCollection from '../viewcollection';
|
|
|
12
12
|
import { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';
|
|
13
13
|
import '../../theme/components/colorgrid/colorgrid.css';
|
|
14
14
|
/**
|
|
15
|
-
* A grid of {@link module:ui/colorgrid/
|
|
15
|
+
* A grid of {@link module:ui/colorgrid/colortileview~ColorTileView color tiles}.
|
|
16
16
|
*/
|
|
17
17
|
export default class ColorGridView extends View implements DropdownPanelFocusable {
|
|
18
18
|
/**
|
|
@@ -38,13 +38,13 @@ export default class ColorGridView extends View implements DropdownPanelFocusabl
|
|
|
38
38
|
*/
|
|
39
39
|
selectedColor: string | undefined | null;
|
|
40
40
|
/**
|
|
41
|
-
* Creates an instance of a color grid containing {@link module:ui/colorgrid/
|
|
41
|
+
* Creates an instance of a color grid containing {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.
|
|
42
42
|
*
|
|
43
43
|
* @fires execute
|
|
44
44
|
* @param locale The localization services instance.
|
|
45
45
|
* @param options Component configuration
|
|
46
46
|
* @param options.colorDefinitions Array with definitions
|
|
47
|
-
* required to create the {@link module:ui/colorgrid/
|
|
47
|
+
* required to create the {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.
|
|
48
48
|
* @param options.columns A number of columns to display the tiles.
|
|
49
49
|
*/
|
|
50
50
|
constructor(locale?: Locale, options?: {
|
|
@@ -69,7 +69,7 @@ export default class ColorGridView extends View implements DropdownPanelFocusabl
|
|
|
69
69
|
destroy(): void;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* A color definition used to create a {@link module:ui/colorgrid/
|
|
72
|
+
* A color definition used to create a {@link module:ui/colorgrid/colortileview~ColorTileView}.
|
|
73
73
|
*
|
|
74
74
|
* ```json
|
|
75
75
|
* {
|
|
@@ -84,20 +84,20 @@ export default class ColorGridView extends View implements DropdownPanelFocusabl
|
|
|
84
84
|
export interface ColorDefinition {
|
|
85
85
|
/**
|
|
86
86
|
* String representing a color.
|
|
87
|
-
* It is used as value of background-color style in {@link module:ui/colorgrid/
|
|
87
|
+
* It is used as value of background-color style in {@link module:ui/colorgrid/colortileview~ColorTileView}.
|
|
88
88
|
*/
|
|
89
89
|
color: string;
|
|
90
90
|
/**
|
|
91
|
-
* String used as label for {@link module:ui/colorgrid/
|
|
91
|
+
* String used as label for {@link module:ui/colorgrid/colortileview~ColorTileView}.
|
|
92
92
|
*/
|
|
93
93
|
label: string;
|
|
94
94
|
/**
|
|
95
|
-
* Additional options passed to create a {@link module:ui/colorgrid/
|
|
95
|
+
* Additional options passed to create a {@link module:ui/colorgrid/colortileview~ColorTileView}.
|
|
96
96
|
*/
|
|
97
97
|
options: {
|
|
98
98
|
/**
|
|
99
99
|
* A flag that indicates if special a CSS class should be added
|
|
100
|
-
* to {@link module:ui/colorgrid/
|
|
100
|
+
* to {@link module:ui/colorgrid/colortileview~ColorTileView}, which renders a border around it.
|
|
101
101
|
*/
|
|
102
102
|
hasBorder: boolean;
|
|
103
103
|
};
|
|
@@ -105,7 +105,7 @@ export interface ColorDefinition {
|
|
|
105
105
|
/**
|
|
106
106
|
* Fired when the `ColorTileView` for the picked item is executed.
|
|
107
107
|
*
|
|
108
|
-
* @eventName execute
|
|
108
|
+
* @eventName ~ColorGridView#execute
|
|
109
109
|
* @param data Additional information about the event.
|
|
110
110
|
*/
|
|
111
111
|
export type ColorGridViewExecuteEvent = {
|
|
@@ -117,16 +117,16 @@ export type ColorGridViewExecuteEvent = {
|
|
|
117
117
|
*/
|
|
118
118
|
export interface ColorGridViewExecuteEventData {
|
|
119
119
|
/**
|
|
120
|
-
* The value of the selected color ({@link module:ui/colorgrid/
|
|
120
|
+
* The value of the selected color ({@link module:ui/colorgrid/colorgridview~ColorDefinition#color `color.color`}).
|
|
121
121
|
*/
|
|
122
122
|
value: string;
|
|
123
123
|
/**
|
|
124
124
|
* The `hasBorder` property of the selected color
|
|
125
|
-
* ({@link module:ui/colorgrid/
|
|
125
|
+
* ({@link module:ui/colorgrid/colorgridview~ColorDefinition#options `color.options.hasBorder`}).
|
|
126
126
|
*/
|
|
127
127
|
hasBorder: boolean;
|
|
128
128
|
/**
|
|
129
|
-
* The label of the selected color ({@link module:ui/colorgrid/
|
|
129
|
+
* The label of the selected color ({@link module:ui/colorgrid/colorgridview~ColorDefinition#label `color.label`})
|
|
130
130
|
*/
|
|
131
131
|
label: string;
|
|
132
132
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @module ui/colorgrid/
|
|
6
|
+
* @module ui/colorgrid/colorgridview
|
|
7
7
|
*/
|
|
8
8
|
import View from '../view';
|
|
9
9
|
import ColorTileView from './colortileview';
|
|
@@ -11,23 +11,23 @@ import addKeyboardHandlingForGrid from '../bindings/addkeyboardhandlingforgrid';
|
|
|
11
11
|
import { FocusTracker, KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
|
|
12
12
|
import '../../theme/components/colorgrid/colorgrid.css';
|
|
13
13
|
/**
|
|
14
|
-
* A grid of {@link module:ui/colorgrid/
|
|
14
|
+
* A grid of {@link module:ui/colorgrid/colortileview~ColorTileView color tiles}.
|
|
15
15
|
*/
|
|
16
16
|
export default class ColorGridView extends View {
|
|
17
17
|
/**
|
|
18
|
-
* Creates an instance of a color grid containing {@link module:ui/colorgrid/
|
|
18
|
+
* Creates an instance of a color grid containing {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.
|
|
19
19
|
*
|
|
20
20
|
* @fires execute
|
|
21
21
|
* @param locale The localization services instance.
|
|
22
22
|
* @param options Component configuration
|
|
23
23
|
* @param options.colorDefinitions Array with definitions
|
|
24
|
-
* required to create the {@link module:ui/colorgrid/
|
|
24
|
+
* required to create the {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.
|
|
25
25
|
* @param options.columns A number of columns to display the tiles.
|
|
26
26
|
*/
|
|
27
27
|
constructor(locale, options) {
|
|
28
28
|
super(locale);
|
|
29
|
-
const colorDefinitions = options
|
|
30
|
-
this.columns = options
|
|
29
|
+
const colorDefinitions = options && options.colorDefinitions ? options.colorDefinitions : [];
|
|
30
|
+
this.columns = options && options.columns ? options.columns : 5;
|
|
31
31
|
const viewStyleAttribute = {
|
|
32
32
|
gridTemplateColumns: `repeat( ${this.columns}, 1fr)`
|
|
33
33
|
};
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @module ui/colorgrid/
|
|
6
|
+
* @module ui/colorgrid/colortileview
|
|
7
7
|
*/
|
|
8
8
|
import ButtonView from '../button/buttonview';
|
|
9
9
|
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
/**
|
|
11
|
-
* This class represents a single color tile in the {@link module:ui/colorgrid/
|
|
11
|
+
* This class represents a single color tile in the {@link module:ui/colorgrid/colorgridview~ColorGridView}.
|
|
12
12
|
*/
|
|
13
13
|
export default class ColorTileView extends ButtonView {
|
|
14
14
|
/**
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @module ui/colorgrid/
|
|
6
|
+
* @module ui/colorgrid/colortileview
|
|
7
7
|
*/
|
|
8
8
|
import ButtonView from '../button/buttonview';
|
|
9
9
|
import checkIcon from '../../theme/icons/color-tile-check.svg';
|
|
10
10
|
/**
|
|
11
|
-
* This class represents a single color tile in the {@link module:ui/colorgrid/
|
|
11
|
+
* This class represents a single color tile in the {@link module:ui/colorgrid/colorgridview~ColorGridView}.
|
|
12
12
|
*/
|
|
13
13
|
export default class ColorTileView extends ButtonView {
|
|
14
14
|
constructor(locale) {
|
package/src/colorgrid/utils.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare function normalizeColorOptions(options: Array<ColorOption>): Arra
|
|
|
41
41
|
/**
|
|
42
42
|
* Creates a normalized color definition from the user-defined configuration.
|
|
43
43
|
* The "normalization" means it will create full
|
|
44
|
-
* {@link module:ui/colorgrid/
|
|
44
|
+
* {@link module:ui/colorgrid/colorgridview~ColorDefinition `ColorDefinition-like`}
|
|
45
45
|
* object for string values, and add a `view` property, for each definition.
|
|
46
46
|
*/
|
|
47
47
|
export declare function normalizeSingleColorDefinition(color: ColorOption): NormalizedColorOption;
|
package/src/colorgrid/utils.js
CHANGED
|
@@ -51,7 +51,7 @@ export function normalizeColorOptions(options) {
|
|
|
51
51
|
/**
|
|
52
52
|
* Creates a normalized color definition from the user-defined configuration.
|
|
53
53
|
* The "normalization" means it will create full
|
|
54
|
-
* {@link module:ui/colorgrid/
|
|
54
|
+
* {@link module:ui/colorgrid/colorgridview~ColorDefinition `ColorDefinition-like`}
|
|
55
55
|
* object for string values, and add a `view` property, for each definition.
|
|
56
56
|
*/
|
|
57
57
|
export function normalizeSingleColorDefinition(color) {
|
package/src/componentfactory.js
CHANGED
|
@@ -78,7 +78,7 @@ export default class ComponentFactory {
|
|
|
78
78
|
/**
|
|
79
79
|
* The required component is not registered in the component factory. Please make sure
|
|
80
80
|
* the provided name is correct and the component has been correctly
|
|
81
|
-
* {@link #add added} to the factory.
|
|
81
|
+
* {@link module:ui/componentfactory~ComponentFactory#add added} to the factory.
|
|
82
82
|
*
|
|
83
83
|
* @error componentfactory-item-missing
|
|
84
84
|
* @param name The name of the missing component.
|
|
@@ -15,9 +15,9 @@ export default interface DropdownButton extends Button {
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Fired when the dropdown should be opened.
|
|
18
|
-
* It will not be fired when the button {@link #isEnabled is disabled}.
|
|
18
|
+
* It will not be fired when the button {@link module:ui/dropdown/button/dropdownbutton~DropdownButton#isEnabled is disabled}.
|
|
19
19
|
*
|
|
20
|
-
* @eventName open
|
|
20
|
+
* @eventName ~DropdownButton#open
|
|
21
21
|
*/
|
|
22
22
|
export type DropdownButtonOpenEvent = {
|
|
23
23
|
name: 'open';
|
|
@@ -129,7 +129,7 @@ export default class SplitButtonView extends View<HTMLDivElement> implements Dro
|
|
|
129
129
|
*/
|
|
130
130
|
destroy(): void;
|
|
131
131
|
/**
|
|
132
|
-
* Focuses the {@link #
|
|
132
|
+
* Focuses the {@link module:ui/button/buttonview~ButtonView#element} of the action part of split button.
|
|
133
133
|
*/
|
|
134
134
|
focus(): void;
|
|
135
135
|
/**
|
|
@@ -105,7 +105,7 @@ export default class SplitButtonView extends View {
|
|
|
105
105
|
this.keystrokes.destroy();
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
* Focuses the {@link #
|
|
108
|
+
* Focuses the {@link module:ui/button/buttonview~ButtonView#element} of the action part of split button.
|
|
109
109
|
*/
|
|
110
110
|
focus() {
|
|
111
111
|
this.actionView.focus();
|
|
@@ -298,16 +298,16 @@ export default class DropdownView extends View<HTMLDivElement> {
|
|
|
298
298
|
/**
|
|
299
299
|
* Fired when the toolbar button or list item is executed.
|
|
300
300
|
*
|
|
301
|
-
* For {@link #listView} It fires when a child of some {@link module:ui/list/listitemview~ListItemView}
|
|
301
|
+
* For {@link ~DropdownView#listView} It fires when a child of some {@link module:ui/list/listitemview~ListItemView}
|
|
302
302
|
* fired `execute`.
|
|
303
303
|
*
|
|
304
|
-
* For {@link #toolbarView} It fires when one of the buttons has been
|
|
304
|
+
* For {@link ~DropdownView#toolbarView} It fires when one of the buttons has been
|
|
305
305
|
* {@link module:ui/button/buttonview~ButtonView#event:execute executed}.
|
|
306
306
|
*
|
|
307
307
|
* **Note**: Only supported when dropdown has list view added using {@link module:ui/dropdown/utils~addListToDropdown}
|
|
308
308
|
* or {@link module:ui/dropdown/utils~addToolbarToDropdown}.
|
|
309
309
|
*
|
|
310
|
-
* @eventName execute
|
|
310
|
+
* @eventName ~DropdownView#execute
|
|
311
311
|
*/
|
|
312
312
|
export type DropdownViewEvent = {
|
|
313
313
|
name: 'execute';
|
|
@@ -51,7 +51,8 @@ export default class EditableUIView extends View {
|
|
|
51
51
|
constructor(locale: Locale, editingView: EditingView, editableElement?: HTMLElement);
|
|
52
52
|
/**
|
|
53
53
|
* Renders the view by either applying the {@link #template} to the existing
|
|
54
|
-
* {@link #_editableElement} or assigning {@link #element}
|
|
54
|
+
* {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}
|
|
55
|
+
* as {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement}.
|
|
55
56
|
*/
|
|
56
57
|
render(): void;
|
|
57
58
|
/**
|
|
@@ -44,7 +44,8 @@ export default class EditableUIView extends View {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Renders the view by either applying the {@link #template} to the existing
|
|
47
|
-
* {@link #_editableElement} or assigning {@link #element}
|
|
47
|
+
* {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}
|
|
48
|
+
* as {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement}.
|
|
48
49
|
*/
|
|
49
50
|
render() {
|
|
50
51
|
super.render();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @module
|
|
6
|
+
* @module ui/editorui/editorui
|
|
7
7
|
*/
|
|
8
8
|
import ComponentFactory from '../componentfactory';
|
|
9
9
|
import TooltipManager from '../tooltipmanager';
|
|
@@ -11,7 +11,6 @@ import type EditorUIView from './editoruiview';
|
|
|
11
11
|
import type ToolbarView from '../toolbar/toolbarview';
|
|
12
12
|
import { FocusTracker } from '@ckeditor/ckeditor5-utils';
|
|
13
13
|
import type { Editor } from '@ckeditor/ckeditor5-core';
|
|
14
|
-
import '../uiconfig';
|
|
15
14
|
declare const EditorUI_base: {
|
|
16
15
|
new (): import("@ckeditor/ckeditor5-utils").Observable;
|
|
17
16
|
prototype: import("@ckeditor/ckeditor5-utils").Observable;
|
|
@@ -110,7 +109,7 @@ export default abstract class EditorUI extends EditorUI_base {
|
|
|
110
109
|
*/
|
|
111
110
|
get element(): HTMLElement | null;
|
|
112
111
|
/**
|
|
113
|
-
* Fires the {@link module:
|
|
112
|
+
* Fires the {@link module:ui/editorui/editorui~EditorUI#event:update `update`} event.
|
|
114
113
|
*
|
|
115
114
|
* This method should be called when the editor UI (e.g. positions of its balloons) needs to be updated due to
|
|
116
115
|
* some environmental change which CKEditor 5 is not aware of (e.g. resize of a container in which it is used).
|
|
@@ -181,7 +180,7 @@ export default abstract class EditorUI extends EditorUI_base {
|
|
|
181
180
|
*
|
|
182
181
|
* Focusable toolbars candidates are either:
|
|
183
182
|
* * already visible,
|
|
184
|
-
* * have `beforeFocus()` set in their {@link module:
|
|
183
|
+
* * have `beforeFocus()` set in their {@link module:ui/editorui/editorui~FocusableToolbarDefinition definition} that suggests that
|
|
185
184
|
* they might show up when called. Keep in mind that determining whether a toolbar will show up (and become focusable) is impossible
|
|
186
185
|
* at this stage because it depends on its implementation, that in turn depends on the editing context (selection).
|
|
187
186
|
*
|
|
@@ -207,7 +206,7 @@ export default abstract class EditorUI extends EditorUI_base {
|
|
|
207
206
|
*
|
|
208
207
|
* Fired before {@link module:engine/controller/datacontroller~DataController#event:ready}.
|
|
209
208
|
*
|
|
210
|
-
* @eventName ready
|
|
209
|
+
* @eventName ~EditorUI#ready
|
|
211
210
|
*/
|
|
212
211
|
export type EditorUIReadyEvent = {
|
|
213
212
|
name: 'ready';
|
|
@@ -217,16 +216,16 @@ export type EditorUIReadyEvent = {
|
|
|
217
216
|
* Fired whenever the UI (all related components) should be refreshed.
|
|
218
217
|
*
|
|
219
218
|
* **Note:**: The event is fired after each {@link module:engine/view/document~Document#event:layoutChanged}.
|
|
220
|
-
* It can also be fired manually via the {@link module:
|
|
219
|
+
* It can also be fired manually via the {@link module:ui/editorui/editorui~EditorUI#update} method.
|
|
221
220
|
*
|
|
222
|
-
* @eventName update
|
|
221
|
+
* @eventName ~EditorUI#update
|
|
223
222
|
*/
|
|
224
223
|
export type EditorUIUpdateEvent = {
|
|
225
224
|
name: 'update';
|
|
226
225
|
args: [];
|
|
227
226
|
};
|
|
228
227
|
/**
|
|
229
|
-
* A definition of a focusable toolbar. Used by {@link module:
|
|
228
|
+
* A definition of a focusable toolbar. Used by {@link module:ui/editorui/editorui~EditorUI#addToolbar}.
|
|
230
229
|
*/
|
|
231
230
|
export interface FocusableToolbarDefinition {
|
|
232
231
|
/**
|
|
@@ -257,7 +256,7 @@ export interface FocusableToolbarOptions {
|
|
|
257
256
|
beforeFocus?: () => void;
|
|
258
257
|
/**
|
|
259
258
|
* Specify a callback executed after the toolbar instance DOM element loses focus upon
|
|
260
|
-
* <kbd>Esc</kbd> keystroke but before the focus goes back to the {@link #setEditableElement editable element}.
|
|
259
|
+
* <kbd>Esc</kbd> keystroke but before the focus goes back to the {@link ~EditorUI#setEditableElement editable element}.
|
|
261
260
|
*/
|
|
262
261
|
afterBlur?: () => void;
|
|
263
262
|
}
|
package/src/editorui/editorui.js
CHANGED
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @module
|
|
6
|
+
* @module ui/editorui/editorui
|
|
7
7
|
*/
|
|
8
8
|
/* globals console */
|
|
9
9
|
import ComponentFactory from '../componentfactory';
|
|
10
10
|
import TooltipManager from '../tooltipmanager';
|
|
11
11
|
import { ObservableMixin, isVisible, FocusTracker } from '@ckeditor/ckeditor5-utils';
|
|
12
|
-
import '../uiconfig';
|
|
13
12
|
/**
|
|
14
13
|
* A class providing the minimal interface that is required to successfully bootstrap any editor UI.
|
|
15
14
|
*/
|
|
@@ -64,7 +63,7 @@ export default class EditorUI extends ObservableMixin() {
|
|
|
64
63
|
return null;
|
|
65
64
|
}
|
|
66
65
|
/**
|
|
67
|
-
* Fires the {@link module:
|
|
66
|
+
* Fires the {@link module:ui/editorui/editorui~EditorUI#event:update `update`} event.
|
|
68
67
|
*
|
|
69
68
|
* This method should be called when the editor UI (e.g. positions of its balloons) needs to be updated due to
|
|
70
69
|
* some environmental change which CKEditor 5 is not aware of (e.g. resize of a container in which it is used).
|
|
@@ -165,9 +164,10 @@ export default class EditorUI extends ObservableMixin() {
|
|
|
165
164
|
*/
|
|
166
165
|
get _editableElements() {
|
|
167
166
|
/**
|
|
168
|
-
* The {@link module:
|
|
169
|
-
* deprecated and will be removed in the near future. Please use
|
|
170
|
-
* {@link #
|
|
167
|
+
* The {@link module:ui/editorui/editorui~EditorUI#_editableElements `EditorUI#_editableElements`} property has been
|
|
168
|
+
* deprecated and will be removed in the near future. Please use
|
|
169
|
+
* {@link module:ui/editorui/editorui~EditorUI#setEditableElement `setEditableElement()`} and
|
|
170
|
+
* {@link module:ui/editorui/editorui~EditorUI#getEditableElement `getEditableElement()`} methods instead.
|
|
171
171
|
*
|
|
172
172
|
* @error editor-ui-deprecated-editable-elements
|
|
173
173
|
* @param editorUI Editor UI instance the deprecated property belongs to.
|
|
@@ -295,7 +295,7 @@ export default class EditorUI extends ObservableMixin() {
|
|
|
295
295
|
*
|
|
296
296
|
* Focusable toolbars candidates are either:
|
|
297
297
|
* * already visible,
|
|
298
|
-
* * have `beforeFocus()` set in their {@link module:
|
|
298
|
+
* * have `beforeFocus()` set in their {@link module:ui/editorui/editorui~FocusableToolbarDefinition definition} that suggests that
|
|
299
299
|
* they might show up when called. Keep in mind that determining whether a toolbar will show up (and become focusable) is impossible
|
|
300
300
|
* at this stage because it depends on its implementation, that in turn depends on the editing context (selection).
|
|
301
301
|
*
|
|
@@ -42,7 +42,7 @@ export default class IframeView extends View<HTMLIFrameElement> {
|
|
|
42
42
|
/**
|
|
43
43
|
* Fired when the DOM iframe's `contentDocument` finished loading.
|
|
44
44
|
*
|
|
45
|
-
* @eventName loaded
|
|
45
|
+
* @eventName ~IframeView#loaded
|
|
46
46
|
*/
|
|
47
47
|
export type IframeViewLoadedEvent = {
|
|
48
48
|
name: 'loaded';
|
package/src/index.d.ts
CHANGED
|
@@ -48,7 +48,8 @@ export { default as Template, type TemplateDefinition } from './template';
|
|
|
48
48
|
export { default as ToolbarView } from './toolbar/toolbarview';
|
|
49
49
|
export { default as ToolbarSeparatorView } from './toolbar/toolbarseparatorview';
|
|
50
50
|
export { default as normalizeToolbarConfig } from './toolbar/normalizetoolbarconfig';
|
|
51
|
-
export { default as BalloonToolbar, type
|
|
51
|
+
export { default as BalloonToolbar, type BalloonToolbarShowEvent } from './toolbar/balloon/balloontoolbar';
|
|
52
52
|
export { default as BlockToolbar } from './toolbar/block/blocktoolbar';
|
|
53
53
|
export { default as View, type UIViewRenderEvent } from './view';
|
|
54
54
|
export { default as ViewCollection } from './viewcollection';
|
|
55
|
+
import './augmentation';
|
package/src/index.js
CHANGED
|
@@ -51,3 +51,4 @@ export { default as BalloonToolbar } from './toolbar/balloon/balloontoolbar';
|
|
|
51
51
|
export { default as BlockToolbar } from './toolbar/block/blocktoolbar';
|
|
52
52
|
export { default as View } from './view';
|
|
53
53
|
export { default as ViewCollection } from './viewcollection';
|
|
54
|
+
import './augmentation';
|
package/src/input/inputview.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ export default class InputView extends View<HTMLInputElement> {
|
|
|
113
113
|
* Fired when the user types in the input. Corresponds to the native
|
|
114
114
|
* DOM `input` event.
|
|
115
115
|
*
|
|
116
|
-
* @eventName input
|
|
116
|
+
* @eventName ~InputView#input
|
|
117
117
|
*/
|
|
118
118
|
export type InputViewInputEvent = {
|
|
119
119
|
name: 'input';
|
|
@@ -160,7 +160,7 @@ export type NotificationEventType = 'success' | 'info' | 'warning';
|
|
|
160
160
|
/**
|
|
161
161
|
* Fired when one of the `showSuccess()`, `showInfo()`, `showWarning()` methods is called.
|
|
162
162
|
*
|
|
163
|
-
* @eventName show
|
|
163
|
+
* @eventName ~Notification#show
|
|
164
164
|
* @param data The notification data.
|
|
165
165
|
*/
|
|
166
166
|
export type NotificationShowEvent = {
|
|
@@ -170,14 +170,14 @@ export type NotificationShowEvent = {
|
|
|
170
170
|
/**
|
|
171
171
|
* Fired when the `showSuccess()` method is called.
|
|
172
172
|
*
|
|
173
|
-
* @eventName show:success
|
|
173
|
+
* @eventName ~Notification#show:success
|
|
174
174
|
* @param data The notification data.
|
|
175
175
|
*/
|
|
176
176
|
export type NotificationShowSuccessEvent = NotificationShowTypeEvent<'success'>;
|
|
177
177
|
/**
|
|
178
178
|
* Fired when the `showInfo()` method is called.
|
|
179
179
|
*
|
|
180
|
-
* @eventName show:info
|
|
180
|
+
* @eventName ~Notification#show:info
|
|
181
181
|
* @param data The notification data.
|
|
182
182
|
*/
|
|
183
183
|
export type NotificationShowInfoEvent = NotificationShowTypeEvent<'info'>;
|
|
@@ -187,7 +187,7 @@ export type NotificationShowInfoEvent = NotificationShowTypeEvent<'info'>;
|
|
|
187
187
|
* When this event is not handled or stopped by `event.stop()`, the `data.message` of this event will
|
|
188
188
|
* be automatically displayed as a system alert.
|
|
189
189
|
*
|
|
190
|
-
* @eventName show:warning
|
|
190
|
+
* @eventName ~Notification#show:warning
|
|
191
191
|
* @param data The notification data.
|
|
192
192
|
*/
|
|
193
193
|
export type NotificationShowWarningEvent = NotificationShowTypeEvent<'warning'>;
|
|
@@ -209,8 +209,3 @@ export type NotificationShowEventData<NotificationType extends NotificationEvent
|
|
|
209
209
|
*/
|
|
210
210
|
type: NotificationType;
|
|
211
211
|
};
|
|
212
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
213
|
-
interface PluginsMap {
|
|
214
|
-
[Notification.pluginName]: Notification;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import BalloonPanelView from './balloonpanelview';
|
|
9
9
|
import View from '../../view';
|
|
10
|
+
import ButtonView from '../../button/buttonview';
|
|
11
|
+
import type ViewCollection from '../../viewcollection';
|
|
10
12
|
import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
|
|
11
|
-
import { type PositionOptions } from '@ckeditor/ckeditor5-utils';
|
|
13
|
+
import { FocusTracker, type Locale, type PositionOptions } from '@ckeditor/ckeditor5-utils';
|
|
12
14
|
import '../../../theme/components/panel/balloonrotator.css';
|
|
13
15
|
import '../../../theme/components/panel/fakepanel.css';
|
|
14
16
|
/**
|
|
@@ -233,8 +235,65 @@ export interface ViewConfiguration {
|
|
|
233
235
|
*/
|
|
234
236
|
singleViewMode?: boolean;
|
|
235
237
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Rotator view is a helper class for the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon}.
|
|
240
|
+
* It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.
|
|
241
|
+
* See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.
|
|
242
|
+
*/
|
|
243
|
+
export declare class RotatorView extends View {
|
|
244
|
+
/**
|
|
245
|
+
* Used for checking if a view is focused or not.
|
|
246
|
+
*/
|
|
247
|
+
readonly focusTracker: FocusTracker;
|
|
248
|
+
/**
|
|
249
|
+
* Navigation button for switching the stack to the previous one.
|
|
250
|
+
*/
|
|
251
|
+
readonly buttonPrevView: ButtonView;
|
|
252
|
+
/**
|
|
253
|
+
* Navigation button for switching the stack to the next one.
|
|
254
|
+
*/
|
|
255
|
+
readonly buttonNextView: ButtonView;
|
|
256
|
+
/**
|
|
257
|
+
* A collection of the child views that creates the rotator content.
|
|
258
|
+
*/
|
|
259
|
+
readonly content: ViewCollection;
|
|
260
|
+
/**
|
|
261
|
+
* Defines whether navigation is visible or not.
|
|
262
|
+
*
|
|
263
|
+
* @observable
|
|
264
|
+
*/
|
|
265
|
+
isNavigationVisible: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* @observable
|
|
268
|
+
*/
|
|
269
|
+
counter: string;
|
|
270
|
+
/**
|
|
271
|
+
* @inheritDoc
|
|
272
|
+
*/
|
|
273
|
+
constructor(locale: Locale);
|
|
274
|
+
/**
|
|
275
|
+
* @inheritDoc
|
|
276
|
+
*/
|
|
277
|
+
render(): void;
|
|
278
|
+
/**
|
|
279
|
+
* @inheritDoc
|
|
280
|
+
*/
|
|
281
|
+
destroy(): void;
|
|
282
|
+
/**
|
|
283
|
+
* Shows a given view.
|
|
284
|
+
*
|
|
285
|
+
* @param view The view to show.
|
|
286
|
+
*/
|
|
287
|
+
showView(view: View): void;
|
|
288
|
+
/**
|
|
289
|
+
* Hides the currently displayed view.
|
|
290
|
+
*/
|
|
291
|
+
hideView(): void;
|
|
292
|
+
/**
|
|
293
|
+
* Creates a navigation button view.
|
|
294
|
+
*
|
|
295
|
+
* @param label The button label.
|
|
296
|
+
* @param icon The button icon.
|
|
297
|
+
*/
|
|
298
|
+
private _createButtonView;
|
|
240
299
|
}
|
|
@@ -396,7 +396,7 @@ export default class ContextualBalloon extends Plugin {
|
|
|
396
396
|
* It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.
|
|
397
397
|
* See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.
|
|
398
398
|
*/
|
|
399
|
-
class RotatorView extends View {
|
|
399
|
+
export class RotatorView extends View {
|
|
400
400
|
/**
|
|
401
401
|
* @inheritDoc
|
|
402
402
|
*/
|
|
@@ -61,7 +61,7 @@ export default class StickyPanelView extends View {
|
|
|
61
61
|
* either using `position: fixed` or `position: sticky`, which would cover the
|
|
62
62
|
* sticky panel or vice–versa (depending on the `z-index` hierarchy).
|
|
63
63
|
*
|
|
64
|
-
* Bound to {@link module:
|
|
64
|
+
* Bound to {@link module:ui/editorui/editorui~EditorUI#viewportOffset `EditorUI#viewportOffset`}.
|
|
65
65
|
*
|
|
66
66
|
* If {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset.top`} is defined, then
|
|
67
67
|
* it will override the default value.
|
package/src/template.d.ts
CHANGED
|
@@ -726,10 +726,10 @@ export type TemplateListenerSchema = ArrayOrItem<ListenerBinding>;
|
|
|
726
726
|
declare const AttributeBindingSymbol: unique symbol;
|
|
727
727
|
declare const ListenerBindingSymbol: unique symbol;
|
|
728
728
|
export interface AttributeBinding {
|
|
729
|
-
|
|
729
|
+
_opaqueAttributeBinding: typeof AttributeBindingSymbol;
|
|
730
730
|
}
|
|
731
731
|
export interface ListenerBinding {
|
|
732
|
-
|
|
732
|
+
_opaqueListenerBinding: typeof ListenerBindingSymbol;
|
|
733
733
|
}
|
|
734
734
|
/**
|
|
735
735
|
* The return value of {@link ~Template.bind `Template.bind()`}. It provides `to()` and `if()`
|
|
@@ -777,6 +777,7 @@ export interface BindChain<TObservable> {
|
|
|
777
777
|
* Learn more about using `to()` in the {@link module:ui/template~TemplateValueSchema} and
|
|
778
778
|
* {@link module:ui/template~TemplateListenerSchema}.
|
|
779
779
|
*
|
|
780
|
+
* @label ATTRIBUTE
|
|
780
781
|
* @param attribute An attribute name of {@link module:utils/observablemixin~Observable}.
|
|
781
782
|
*/
|
|
782
783
|
to<TAttribute extends keyof TObservable & string>(attribute: TAttribute): AttributeBinding & ListenerBinding;
|
|
@@ -821,6 +822,7 @@ export interface BindChain<TObservable> {
|
|
|
821
822
|
* Learn more about using `to()` in the {@link module:ui/template~TemplateValueSchema} and
|
|
822
823
|
* {@link module:ui/template~TemplateListenerSchema}.
|
|
823
824
|
*
|
|
825
|
+
* @label ATTRIBUTE_CALLBACK
|
|
824
826
|
* @param attribute An attribute name of {@link module:utils/observablemixin~Observable}.
|
|
825
827
|
* @param callback Allows for processing of the value. Accepts `Node` and `value` as arguments.
|
|
826
828
|
*/
|
|
@@ -866,6 +868,7 @@ export interface BindChain<TObservable> {
|
|
|
866
868
|
* Learn more about using `to()` in the {@link module:ui/template~TemplateValueSchema} and
|
|
867
869
|
* {@link module:ui/template~TemplateListenerSchema}.
|
|
868
870
|
*
|
|
871
|
+
* @label EVENT
|
|
869
872
|
* @param eventNameOrCallback A DOM event name or an event callback.
|
|
870
873
|
*/
|
|
871
874
|
to(eventNameOrCallback: string | ((domEvent: Event) => void)): ListenerBinding;
|
|
@@ -908,7 +911,7 @@ export interface BindChain<TObservable> {
|
|
|
908
911
|
/**
|
|
909
912
|
* The {@link module:ui/template~Template#_renderNode} configuration.
|
|
910
913
|
*/
|
|
911
|
-
interface RenderData {
|
|
914
|
+
export interface RenderData {
|
|
912
915
|
/**
|
|
913
916
|
* A node which is being rendered.
|
|
914
917
|
*/
|
|
@@ -920,14 +923,13 @@ interface RenderData {
|
|
|
920
923
|
*/
|
|
921
924
|
intoFragment: boolean;
|
|
922
925
|
/**
|
|
923
|
-
* Indicates whether the {@module:ui/template~
|
|
924
|
-
* been provided by {@module:ui/template~Template#apply}.
|
|
926
|
+
* Indicates whether the {@link #node} has been provided by {@link module:ui/template~Template#apply}.
|
|
925
927
|
*/
|
|
926
928
|
isApplying: boolean;
|
|
927
929
|
/**
|
|
928
|
-
* An object storing the data that helps {@module:ui/template~Template#revert}
|
|
930
|
+
* An object storing the data that helps {@link module:ui/template~Template#revert}
|
|
929
931
|
* bringing back an element to its initial state, i.e. before
|
|
930
|
-
* {@module:ui/template~Template#apply} was called.
|
|
932
|
+
* {@link module:ui/template~Template#apply} was called.
|
|
931
933
|
*/
|
|
932
934
|
revertData?: RevertData;
|
|
933
935
|
}
|
package/src/template.js
CHANGED
|
@@ -309,7 +309,7 @@ export default class Template extends EmitterMixin() {
|
|
|
309
309
|
/**
|
|
310
310
|
* Extending a template after rendering may not work as expected. To make sure
|
|
311
311
|
* the {@link module:ui/template~Template.extend extending} works for an element,
|
|
312
|
-
* make sure it happens before {@link #render} is called.
|
|
312
|
+
* make sure it happens before {@link module:ui/template~Template#render} is called.
|
|
313
313
|
*
|
|
314
314
|
* @error template-extend-render
|
|
315
315
|
*/
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import ToolbarView from '../toolbarview';
|
|
6
6
|
import { Plugin, type Editor, type PluginDependencies } from '@ckeditor/ckeditor5-core';
|
|
7
7
|
import { FocusTracker } from '@ckeditor/ckeditor5-utils';
|
|
8
|
-
import '../../uiconfig';
|
|
9
8
|
/**
|
|
10
9
|
* The contextual toolbar.
|
|
11
10
|
*
|
|
@@ -17,7 +16,7 @@ export default class BalloonToolbar extends Plugin {
|
|
|
17
16
|
*/
|
|
18
17
|
readonly toolbarView: ToolbarView;
|
|
19
18
|
/**
|
|
20
|
-
* Tracks the focus of the {@link module:
|
|
19
|
+
* Tracks the focus of the {@link module:ui/editorui/editorui~EditorUI#getEditableElement editable element}
|
|
21
20
|
* and the {@link #toolbarView}. When both are blurred then the toolbar should hide.
|
|
22
21
|
*/
|
|
23
22
|
readonly focusTracker: FocusTracker;
|
|
@@ -111,14 +110,9 @@ export default class BalloonToolbar extends Plugin {
|
|
|
111
110
|
/**
|
|
112
111
|
* This event is fired just before the toolbar shows up. Stopping this event will prevent this.
|
|
113
112
|
*
|
|
114
|
-
* @eventName show
|
|
113
|
+
* @eventName ~BalloonToolbar#show
|
|
115
114
|
*/
|
|
116
|
-
export type
|
|
115
|
+
export type BalloonToolbarShowEvent = {
|
|
117
116
|
name: 'show';
|
|
118
117
|
args: [];
|
|
119
118
|
};
|
|
120
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
121
|
-
interface PluginsMap {
|
|
122
|
-
[BalloonToolbar.pluginName]: BalloonToolbar;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
@@ -12,7 +12,6 @@ import normalizeToolbarConfig from '../normalizetoolbarconfig';
|
|
|
12
12
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
13
13
|
import { FocusTracker, Rect, ResizeObserver, env, global, toUnit } from '@ckeditor/ckeditor5-utils';
|
|
14
14
|
import { debounce } from 'lodash-es';
|
|
15
|
-
import '../../uiconfig';
|
|
16
15
|
const toPx = toUnit('px');
|
|
17
16
|
/**
|
|
18
17
|
* The contextual toolbar.
|
|
@@ -9,7 +9,6 @@ import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
|
|
|
9
9
|
import BlockButtonView from './blockbuttonview';
|
|
10
10
|
import BalloonPanelView from '../../panel/balloon/balloonpanelview';
|
|
11
11
|
import ToolbarView from '../toolbarview';
|
|
12
|
-
import '../../uiconfig';
|
|
13
12
|
/**
|
|
14
13
|
* The block toolbar plugin.
|
|
15
14
|
*
|
|
@@ -152,8 +151,3 @@ export default class BlockToolbar extends Plugin {
|
|
|
152
151
|
*/
|
|
153
152
|
private _getToolbarMaxWidth;
|
|
154
153
|
}
|
|
155
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
156
|
-
interface PluginsMap {
|
|
157
|
-
[BlockToolbar.pluginName]: BlockToolbar;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
@@ -13,7 +13,6 @@ import BalloonPanelView from '../../panel/balloon/balloonpanelview';
|
|
|
13
13
|
import ToolbarView from '../toolbarview';
|
|
14
14
|
import clickOutsideHandler from '../../bindings/clickoutsidehandler';
|
|
15
15
|
import normalizeToolbarConfig from '../normalizetoolbarconfig';
|
|
16
|
-
import '../../uiconfig';
|
|
17
16
|
const toPx = toUnit('px');
|
|
18
17
|
const { pilcrow } = icons;
|
|
19
18
|
/**
|
|
@@ -187,7 +187,7 @@ export default class ToolbarView extends View implements DropdownPanelFocusable
|
|
|
187
187
|
private _createNestedToolbarDropdown;
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
|
-
* Fired when some toolbar {@link #items} were grouped or ungrouped as a result of some change
|
|
190
|
+
* Fired when some toolbar {@link ~ToolbarView#items} were grouped or ungrouped as a result of some change
|
|
191
191
|
* in the toolbar geometry.
|
|
192
192
|
*
|
|
193
193
|
* **Note**: This event is always fired **once** regardless of the number of items that were be
|
|
@@ -196,7 +196,7 @@ export default class ToolbarView extends View implements DropdownPanelFocusable
|
|
|
196
196
|
* **Note**: This event is fired only if the items grouping functionality was enabled in
|
|
197
197
|
* the first place (see {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull}).
|
|
198
198
|
*
|
|
199
|
-
* @eventName groupedItemsUpdate
|
|
199
|
+
* @eventName ~ToolbarView#groupedItemsUpdate
|
|
200
200
|
*/
|
|
201
201
|
export type ToolbarViewGroupedItemsUpdateEvent = {
|
|
202
202
|
name: 'groupedItemsUpdate';
|
|
@@ -238,4 +238,28 @@ export interface ToolbarOptions {
|
|
|
238
238
|
*/
|
|
239
239
|
isFloating?: boolean;
|
|
240
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* A class interface defining the behavior of the {@link module:ui/toolbar/toolbarview~ToolbarView}.
|
|
243
|
+
*
|
|
244
|
+
* Toolbar behaviors extend its look and functionality and have an impact on the
|
|
245
|
+
* {@link module:ui/toolbar/toolbarview~ToolbarView#element} template or
|
|
246
|
+
* {@link module:ui/toolbar/toolbarview~ToolbarView#render rendering}. They can be enabled
|
|
247
|
+
* conditionally, e.g. depending on the configuration of the toolbar.
|
|
248
|
+
*/
|
|
249
|
+
export interface ToolbarBehavior {
|
|
250
|
+
/**
|
|
251
|
+
* A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#render rendered}.
|
|
252
|
+
* It can be used to, for example, customize the behavior of the toolbar when its
|
|
253
|
+
* {@link module:ui/toolbar/toolbarview~ToolbarView#element} is available.
|
|
254
|
+
*
|
|
255
|
+
* @param view An instance of the toolbar being rendered.
|
|
256
|
+
*/
|
|
257
|
+
render(view: ToolbarView): void;
|
|
258
|
+
/**
|
|
259
|
+
* A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#destroy destroyed}.
|
|
260
|
+
* It allows cleaning up after the toolbar behavior, for instance, this is the right place to detach
|
|
261
|
+
* event listeners, free up references, etc.
|
|
262
|
+
*/
|
|
263
|
+
destroy(): void;
|
|
264
|
+
}
|
|
241
265
|
export {};
|
package/src/tooltipmanager.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare const TooltipManager_base: {
|
|
|
66
66
|
* ```
|
|
67
67
|
*
|
|
68
68
|
* **Note**: This class is a singleton. All editor instances re-use the same instance loaded by
|
|
69
|
-
* {@link module:
|
|
69
|
+
* {@link module:ui/editorui/editorui~EditorUI} of the first editor.
|
|
70
70
|
*/
|
|
71
71
|
export default class TooltipManager extends TooltipManager_base {
|
|
72
72
|
/**
|
package/src/tooltipmanager.js
CHANGED
|
@@ -63,7 +63,7 @@ const BALLOON_CLASS = 'ck-tooltip';
|
|
|
63
63
|
* ```
|
|
64
64
|
*
|
|
65
65
|
* **Note**: This class is a singleton. All editor instances re-use the same instance loaded by
|
|
66
|
-
* {@link module:
|
|
66
|
+
* {@link module:ui/editorui/editorui~EditorUI} of the first editor.
|
|
67
67
|
*/
|
|
68
68
|
export default class TooltipManager extends DomEmitterMixin() {
|
|
69
69
|
/**
|
package/src/view.d.ts
CHANGED
|
@@ -411,12 +411,12 @@ export default class View<TElement extends HTMLElement = HTMLElement> extends Vi
|
|
|
411
411
|
destroy(): void;
|
|
412
412
|
}
|
|
413
413
|
/**
|
|
414
|
-
* Event fired by the {@link #render} method. Actual rendering is executed as a listener to
|
|
414
|
+
* Event fired by the {@link module:ui/view~View#render} method. Actual rendering is executed as a listener to
|
|
415
415
|
* this event with the default priority.
|
|
416
416
|
*
|
|
417
|
-
* See {@link module:utils/observablemixin~
|
|
417
|
+
* See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.
|
|
418
418
|
*
|
|
419
|
-
* @eventName render
|
|
419
|
+
* @eventName ~View#render
|
|
420
420
|
*/
|
|
421
421
|
export type UIViewRenderEvent = DecoratedMethodEvent<View, 'render'>;
|
|
422
422
|
export {};
|
|
File without changes
|