@ckeditor/ckeditor5-ui 35.2.1 → 35.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +31 -23
- package/src/bindings/addkeyboardhandlingforgrid.js +45 -57
- package/src/bindings/clickoutsidehandler.js +15 -21
- package/src/bindings/injectcsstransitiondisabler.js +16 -20
- package/src/bindings/preventdefault.js +6 -8
- package/src/bindings/submithandler.js +5 -7
- package/src/button/button.js +5 -0
- package/src/button/buttonview.js +220 -259
- package/src/button/switchbuttonview.js +56 -71
- package/src/colorgrid/colorgridview.js +135 -197
- package/src/colorgrid/colortileview.js +37 -47
- package/src/colorgrid/utils.js +57 -66
- package/src/componentfactory.js +79 -93
- package/src/dropdown/button/dropdownbutton.js +5 -0
- package/src/dropdown/button/dropdownbuttonview.js +44 -57
- package/src/dropdown/button/splitbuttonview.js +159 -207
- package/src/dropdown/dropdownpanelfocusable.js +5 -0
- package/src/dropdown/dropdownpanelview.js +101 -112
- package/src/dropdown/dropdownview.js +396 -438
- package/src/dropdown/utils.js +164 -213
- package/src/editableui/editableuiview.js +125 -141
- package/src/editableui/inline/inlineeditableuiview.js +44 -54
- package/src/editorui/bodycollection.js +61 -75
- package/src/editorui/boxed/boxededitoruiview.js +91 -104
- package/src/editorui/editoruiview.js +30 -39
- package/src/focuscycler.js +214 -245
- package/src/formheader/formheaderview.js +58 -70
- package/src/icon/iconview.js +145 -111
- package/src/iframe/iframeview.js +37 -49
- package/src/index.js +0 -17
- package/src/input/inputview.js +170 -198
- package/src/inputnumber/inputnumberview.js +48 -56
- package/src/inputtext/inputtextview.js +14 -18
- package/src/label/labelview.js +44 -53
- package/src/labeledfield/labeledfieldview.js +212 -235
- package/src/labeledfield/utils.js +39 -57
- package/src/labeledinput/labeledinputview.js +190 -221
- package/src/list/listitemview.js +40 -50
- package/src/list/listseparatorview.js +15 -19
- package/src/list/listview.js +94 -115
- package/src/model.js +19 -25
- package/src/notification/notification.js +151 -202
- package/src/panel/balloon/balloonpanelview.js +535 -628
- package/src/panel/balloon/contextualballoon.js +611 -732
- package/src/panel/sticky/stickypanelview.js +238 -270
- package/src/template.js +1049 -1479
- package/src/toolbar/balloon/balloontoolbar.js +337 -424
- package/src/toolbar/block/blockbuttonview.js +32 -42
- package/src/toolbar/block/blocktoolbar.js +375 -477
- package/src/toolbar/normalizetoolbarconfig.js +17 -21
- package/src/toolbar/toolbarlinebreakview.js +15 -19
- package/src/toolbar/toolbarseparatorview.js +15 -19
- package/src/toolbar/toolbarview.js +866 -1053
- package/src/tooltipmanager.js +324 -353
- package/src/view.js +389 -430
- package/src/viewcollection.js +147 -178
- package/src/button/button.jsdoc +0 -165
- package/src/dropdown/button/dropdownbutton.jsdoc +0 -22
- package/src/dropdown/dropdownpanelfocusable.jsdoc +0 -27
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2022, 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
|
-
|
|
6
5
|
/**
|
|
7
6
|
* @module ui/editorui/boxed/boxededitoruiview
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
import EditorUIView from '../../editorui/editoruiview';
|
|
8
|
+
import EditorUIView from '../editoruiview';
|
|
11
9
|
import LabelView from '../../label/labelview';
|
|
12
|
-
|
|
13
10
|
/**
|
|
14
11
|
* The boxed editor UI view class. This class represents an editor interface
|
|
15
12
|
* consisting of a toolbar and an editable area, enclosed within a box.
|
|
@@ -17,104 +14,94 @@ import LabelView from '../../label/labelview';
|
|
|
17
14
|
* @extends module:ui/editorui/editoruiview~EditorUIView
|
|
18
15
|
*/
|
|
19
16
|
export default class BoxedEditorUIView extends EditorUIView {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
voiceLabel.text = t( 'Rich Text Editor' );
|
|
111
|
-
|
|
112
|
-
voiceLabel.extendTemplate( {
|
|
113
|
-
attributes: {
|
|
114
|
-
class: 'ck-voice-label'
|
|
115
|
-
}
|
|
116
|
-
} );
|
|
117
|
-
|
|
118
|
-
return voiceLabel;
|
|
119
|
-
}
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of the boxed editor UI view class.
|
|
19
|
+
*
|
|
20
|
+
* @param {module:utils/locale~Locale} locale The locale instance..
|
|
21
|
+
*/
|
|
22
|
+
constructor(locale) {
|
|
23
|
+
super(locale);
|
|
24
|
+
/**
|
|
25
|
+
* Collection of the child views located in the top (`.ck-editor__top`)
|
|
26
|
+
* area of the UI.
|
|
27
|
+
*
|
|
28
|
+
* @readonly
|
|
29
|
+
* @member {module:ui/viewcollection~ViewCollection}
|
|
30
|
+
*/
|
|
31
|
+
this.top = this.createCollection();
|
|
32
|
+
/**
|
|
33
|
+
* Collection of the child views located in the main (`.ck-editor__main`)
|
|
34
|
+
* area of the UI.
|
|
35
|
+
*
|
|
36
|
+
* @readonly
|
|
37
|
+
* @member {module:ui/viewcollection~ViewCollection}
|
|
38
|
+
*/
|
|
39
|
+
this.main = this.createCollection();
|
|
40
|
+
/**
|
|
41
|
+
* Voice label of the UI.
|
|
42
|
+
*
|
|
43
|
+
* @protected
|
|
44
|
+
* @readonly
|
|
45
|
+
* @member {module:ui/view~View} #_voiceLabelView
|
|
46
|
+
*/
|
|
47
|
+
this._voiceLabelView = this._createVoiceLabel();
|
|
48
|
+
this.setTemplate({
|
|
49
|
+
tag: 'div',
|
|
50
|
+
attributes: {
|
|
51
|
+
class: [
|
|
52
|
+
'ck',
|
|
53
|
+
'ck-reset',
|
|
54
|
+
'ck-editor',
|
|
55
|
+
'ck-rounded-corners'
|
|
56
|
+
],
|
|
57
|
+
role: 'application',
|
|
58
|
+
dir: locale.uiLanguageDirection,
|
|
59
|
+
lang: locale.uiLanguage,
|
|
60
|
+
'aria-labelledby': this._voiceLabelView.id
|
|
61
|
+
},
|
|
62
|
+
children: [
|
|
63
|
+
this._voiceLabelView,
|
|
64
|
+
{
|
|
65
|
+
tag: 'div',
|
|
66
|
+
attributes: {
|
|
67
|
+
class: [
|
|
68
|
+
'ck',
|
|
69
|
+
'ck-editor__top',
|
|
70
|
+
'ck-reset_all'
|
|
71
|
+
],
|
|
72
|
+
role: 'presentation'
|
|
73
|
+
},
|
|
74
|
+
children: this.top
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
tag: 'div',
|
|
78
|
+
attributes: {
|
|
79
|
+
class: [
|
|
80
|
+
'ck',
|
|
81
|
+
'ck-editor__main'
|
|
82
|
+
],
|
|
83
|
+
role: 'presentation'
|
|
84
|
+
},
|
|
85
|
+
children: this.main
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates a voice label view instance.
|
|
92
|
+
*
|
|
93
|
+
* @private
|
|
94
|
+
* @returns {module:ui/label/labelview~LabelView}
|
|
95
|
+
*/
|
|
96
|
+
_createVoiceLabel() {
|
|
97
|
+
const t = this.t;
|
|
98
|
+
const voiceLabel = new LabelView();
|
|
99
|
+
voiceLabel.text = t('Rich Text Editor');
|
|
100
|
+
voiceLabel.extendTemplate({
|
|
101
|
+
attributes: {
|
|
102
|
+
class: 'ck-voice-label'
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return voiceLabel;
|
|
106
|
+
}
|
|
120
107
|
}
|
|
@@ -2,55 +2,46 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2022, 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
|
-
|
|
6
5
|
/**
|
|
7
6
|
* @module ui/editorui/editoruiview
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
8
|
import View from '../view';
|
|
11
9
|
import BodyCollection from './bodycollection';
|
|
12
|
-
|
|
13
10
|
import '../../theme/components/editorui/editorui.css';
|
|
14
|
-
|
|
15
11
|
/**
|
|
16
12
|
* The editor UI view class. Base class for the editor main views.
|
|
17
13
|
*
|
|
18
14
|
* @extends module:ui/view~View
|
|
19
15
|
*/
|
|
20
16
|
export default class EditorUIView extends View {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
destroy() {
|
|
52
|
-
this.body.detachFromDom();
|
|
53
|
-
|
|
54
|
-
return super.destroy();
|
|
55
|
-
}
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of the editor UI view class.
|
|
19
|
+
*
|
|
20
|
+
* @param {module:utils/locale~Locale} [locale] The locale instance.
|
|
21
|
+
*/
|
|
22
|
+
constructor(locale) {
|
|
23
|
+
super(locale);
|
|
24
|
+
/**
|
|
25
|
+
* Collection of the child views, detached from the DOM
|
|
26
|
+
* structure of the editor, like panels, icons etc.
|
|
27
|
+
*
|
|
28
|
+
* @readonly
|
|
29
|
+
* @member {module:ui/viewcollection~ViewCollection} #body
|
|
30
|
+
*/
|
|
31
|
+
this.body = new BodyCollection(locale);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
render() {
|
|
37
|
+
super.render();
|
|
38
|
+
this.body.attachToDom();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
destroy() {
|
|
44
|
+
this.body.detachFromDom();
|
|
45
|
+
return super.destroy();
|
|
46
|
+
}
|
|
56
47
|
}
|