@ckeditor/ckeditor5-table 0.0.0-nightly-next-20251222.0 → 0.0.0-nightly-20251223.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/build/table.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +2 -11
- package/dist/index-content.css +30 -30
- package/dist/index-editor.css +170 -104
- package/dist/index.css +237 -147
- package/dist/index.css.map +1 -1
- package/dist/index.js +2399 -307
- package/dist/index.js.map +1 -1
- package/lang/contexts.json +4 -0
- package/package.json +9 -9
- package/src/augmentation.d.ts +15 -0
- package/src/converters/downcast.js +12 -3
- package/src/index.d.ts +4 -0
- package/src/index.js +5 -0
- package/src/tablecellproperties/tablecellpropertiesediting.js +4 -2
- package/src/tablecellproperties/tablecellpropertiesui.js +10 -30
- package/src/tablecellproperties/tablecellpropertiesuiexperimental.d.ts +128 -0
- package/src/tablecellproperties/tablecellpropertiesuiexperimental.js +408 -0
- package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +0 -35
- package/src/tablecellproperties/ui/tablecellpropertiesview.js +23 -137
- package/src/tablecellproperties/ui/tablecellpropertiesviewexperimental.d.ts +266 -0
- package/src/tablecellproperties/ui/tablecellpropertiesviewexperimental.js +744 -0
- package/src/tableconfig.d.ts +4 -4
- package/src/tableproperties/tablepropertiesediting.js +147 -14
- package/src/tableproperties/tablepropertiesuiexperimental.d.ts +136 -0
- package/src/tableproperties/tablepropertiesuiexperimental.js +375 -0
- package/src/tableproperties/ui/tablepropertiesview.d.ts +0 -8
- package/src/tableproperties/ui/tablepropertiesview.js +37 -59
- package/src/tableproperties/ui/tablepropertiesviewexperimental.d.ts +216 -0
- package/src/tableproperties/ui/tablepropertiesviewexperimental.js +544 -0
- package/src/utils/common.js +3 -2
- package/src/utils/ui/table-propertiesexperimental.d.ts +215 -0
- package/src/utils/ui/table-propertiesexperimental.js +391 -0
- package/theme/formrow-experimental.css +15 -0
- package/theme/formrow.css +0 -2
- package/theme/tablecellproperties-experimental.css +4 -0
- package/theme/tableform-experimental.css +61 -0
- package/theme/tableform.css +5 -1
- package/theme/tableproperties-experimental.css +78 -0
- package/theme/tableproperties.css +0 -60
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module table/tablecellproperties/ui/tablecellpropertiesview
|
|
7
7
|
*/
|
|
8
|
-
import { addListToDropdown, ButtonView, createLabeledDropdown, createLabeledInputText, FocusCycler, FormRowView, FormHeaderView, LabeledFieldView, LabelView, submitHandler, ToolbarView,
|
|
9
|
-
import {
|
|
10
|
-
import { IconAlignBottom, IconAlignCenter, IconAlignJustify, IconAlignLeft, IconAlignMiddle, IconAlignRight, IconAlignTop,
|
|
8
|
+
import { addListToDropdown, ButtonView, createLabeledDropdown, createLabeledInputText, FocusCycler, FormRowView, FormHeaderView, LabeledFieldView, LabelView, submitHandler, ToolbarView, View, ViewCollection } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { KeystrokeHandler, FocusTracker } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { IconAlignBottom, IconAlignCenter, IconAlignJustify, IconAlignLeft, IconAlignMiddle, IconAlignRight, IconAlignTop, IconCancel, IconCheck } from 'ckeditor5/src/icons.js';
|
|
11
11
|
import { fillToolbar, getBorderStyleDefinitions, getBorderStyleLabels, getLabeledColorInputCreator } from '../../utils/ui/table-properties.js';
|
|
12
12
|
// eslint-disable-next-line ckeditor5-rules/ckeditor-imports
|
|
13
13
|
import '@ckeditor/ckeditor5-ui/theme/components/form/form.css';
|
|
@@ -51,10 +51,6 @@ export class TableCellPropertiesView extends View {
|
|
|
51
51
|
* An input that allows specifying the table cell background color.
|
|
52
52
|
*/
|
|
53
53
|
backgroundInput;
|
|
54
|
-
/**
|
|
55
|
-
* A dropdown that allows selecting the type of the table cell (data or header).
|
|
56
|
-
*/
|
|
57
|
-
cellTypeDropdown;
|
|
58
54
|
/**
|
|
59
55
|
* An input that allows specifying the table cell padding.
|
|
60
56
|
*/
|
|
@@ -83,10 +79,6 @@ export class TableCellPropertiesView extends View {
|
|
|
83
79
|
* The "Cancel" button view.
|
|
84
80
|
*/
|
|
85
81
|
cancelButtonView;
|
|
86
|
-
/**
|
|
87
|
-
* The "Back" button view.
|
|
88
|
-
*/
|
|
89
|
-
backButtonView;
|
|
90
82
|
/**
|
|
91
83
|
* A collection of views that can be focused in the form.
|
|
92
84
|
*/
|
|
@@ -115,13 +107,11 @@ export class TableCellPropertiesView extends View {
|
|
|
115
107
|
width: '',
|
|
116
108
|
height: '',
|
|
117
109
|
horizontalAlignment: '',
|
|
118
|
-
verticalAlignment: ''
|
|
119
|
-
cellType: ''
|
|
110
|
+
verticalAlignment: ''
|
|
120
111
|
});
|
|
121
112
|
this.options = options;
|
|
122
113
|
const { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();
|
|
123
114
|
const { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();
|
|
124
|
-
const { cellTypeRowLabel, cellTypeDropdown } = this._createCellTypeField();
|
|
125
115
|
const { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();
|
|
126
116
|
const { horizontalAlignmentToolbar, verticalAlignmentToolbar, alignmentLabel } = this._createAlignmentFields();
|
|
127
117
|
this.focusTracker = new FocusTracker();
|
|
@@ -131,7 +121,6 @@ export class TableCellPropertiesView extends View {
|
|
|
131
121
|
this.borderWidthInput = borderWidthInput;
|
|
132
122
|
this.borderColorInput = borderColorInput;
|
|
133
123
|
this.backgroundInput = backgroundInput;
|
|
134
|
-
this.cellTypeDropdown = cellTypeDropdown;
|
|
135
124
|
this.paddingInput = this._createPaddingField();
|
|
136
125
|
this.widthInput = widthInput;
|
|
137
126
|
this.heightInput = heightInput;
|
|
@@ -143,7 +132,6 @@ export class TableCellPropertiesView extends View {
|
|
|
143
132
|
const { saveButtonView, cancelButtonView } = this._createActionButtons();
|
|
144
133
|
this.saveButtonView = saveButtonView;
|
|
145
134
|
this.cancelButtonView = cancelButtonView;
|
|
146
|
-
this.backButtonView = this._createBackButton();
|
|
147
135
|
this._focusables = new ViewCollection();
|
|
148
136
|
this._focusCycler = new FocusCycler({
|
|
149
137
|
focusables: this._focusables,
|
|
@@ -157,42 +145,28 @@ export class TableCellPropertiesView extends View {
|
|
|
157
145
|
}
|
|
158
146
|
});
|
|
159
147
|
// Form header.
|
|
160
|
-
|
|
148
|
+
this.children.add(new FormHeaderView(locale, {
|
|
161
149
|
label: this.t('Cell properties')
|
|
162
|
-
});
|
|
163
|
-
header.children.add(this.backButtonView, 0);
|
|
164
|
-
this.children.add(header);
|
|
150
|
+
}));
|
|
165
151
|
// Border row.
|
|
166
152
|
this.children.add(new FormRowView(locale, {
|
|
167
153
|
labelView: borderRowLabel,
|
|
168
154
|
children: [
|
|
169
155
|
borderRowLabel,
|
|
170
156
|
borderStyleDropdown,
|
|
171
|
-
|
|
172
|
-
|
|
157
|
+
borderColorInput,
|
|
158
|
+
borderWidthInput
|
|
173
159
|
],
|
|
174
160
|
class: 'ck-table-form__border-row'
|
|
175
161
|
}));
|
|
176
|
-
// Background
|
|
162
|
+
// Background.
|
|
177
163
|
this.children.add(new FormRowView(locale, {
|
|
164
|
+
labelView: backgroundRowLabel,
|
|
178
165
|
children: [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
cellTypeDropdown
|
|
184
|
-
],
|
|
185
|
-
class: 'ck-table-form__cell-type-row'
|
|
186
|
-
}),
|
|
187
|
-
new FormRowView(locale, {
|
|
188
|
-
labelView: backgroundRowLabel,
|
|
189
|
-
children: [
|
|
190
|
-
backgroundRowLabel,
|
|
191
|
-
backgroundInput
|
|
192
|
-
],
|
|
193
|
-
class: 'ck-table-form__background-row'
|
|
194
|
-
})
|
|
195
|
-
]
|
|
166
|
+
backgroundRowLabel,
|
|
167
|
+
backgroundInput
|
|
168
|
+
],
|
|
169
|
+
class: 'ck-table-form__background-row'
|
|
196
170
|
}));
|
|
197
171
|
// Dimensions row and padding.
|
|
198
172
|
this.children.add(new FormRowView(locale, {
|
|
@@ -230,8 +204,8 @@ export class TableCellPropertiesView extends View {
|
|
|
230
204
|
// Action row.
|
|
231
205
|
this.children.add(new FormRowView(locale, {
|
|
232
206
|
children: [
|
|
233
|
-
this.
|
|
234
|
-
this.
|
|
207
|
+
this.saveButtonView,
|
|
208
|
+
this.cancelButtonView
|
|
235
209
|
],
|
|
236
210
|
class: 'ck-table-form__action-row'
|
|
237
211
|
}));
|
|
@@ -268,16 +242,14 @@ export class TableCellPropertiesView extends View {
|
|
|
268
242
|
this.borderStyleDropdown,
|
|
269
243
|
this.borderColorInput,
|
|
270
244
|
this.borderWidthInput,
|
|
271
|
-
this.cellTypeDropdown,
|
|
272
245
|
this.backgroundInput,
|
|
273
246
|
this.widthInput,
|
|
274
247
|
this.heightInput,
|
|
275
248
|
this.paddingInput,
|
|
276
249
|
this.horizontalAlignmentToolbar,
|
|
277
250
|
this.verticalAlignmentToolbar,
|
|
278
|
-
this.cancelButtonView,
|
|
279
251
|
this.saveButtonView,
|
|
280
|
-
this.
|
|
252
|
+
this.cancelButtonView
|
|
281
253
|
].forEach(view => {
|
|
282
254
|
// Register the view as focusable.
|
|
283
255
|
this._focusables.add(view);
|
|
@@ -427,47 +399,6 @@ export class TableCellPropertiesView extends View {
|
|
|
427
399
|
backgroundInput
|
|
428
400
|
};
|
|
429
401
|
}
|
|
430
|
-
/**
|
|
431
|
-
* Create cell type field.
|
|
432
|
-
*
|
|
433
|
-
* * {@link #cellTypeDropdown}.
|
|
434
|
-
*
|
|
435
|
-
* @internal
|
|
436
|
-
*/
|
|
437
|
-
_createCellTypeField() {
|
|
438
|
-
const locale = this.locale;
|
|
439
|
-
const t = this.t;
|
|
440
|
-
const cellTypeRowLabel = new LabelView(locale);
|
|
441
|
-
cellTypeRowLabel.text = t('Cell type');
|
|
442
|
-
const cellTypeLabels = this._cellTypeLabels;
|
|
443
|
-
const cellTypeDropdown = new LabeledFieldView(locale, createLabeledDropdown);
|
|
444
|
-
cellTypeDropdown.set({
|
|
445
|
-
label: t('Cell type'),
|
|
446
|
-
class: 'ck-table-cell-properties-form__cell-type'
|
|
447
|
-
});
|
|
448
|
-
cellTypeDropdown.fieldView.buttonView.set({
|
|
449
|
-
ariaLabel: t('Cell type'),
|
|
450
|
-
ariaLabelledBy: undefined,
|
|
451
|
-
isOn: false,
|
|
452
|
-
withText: true,
|
|
453
|
-
tooltip: t('Cell type')
|
|
454
|
-
});
|
|
455
|
-
cellTypeDropdown.fieldView.buttonView.bind('label').to(this, 'cellType', value => {
|
|
456
|
-
return cellTypeLabels[value || 'data'];
|
|
457
|
-
});
|
|
458
|
-
cellTypeDropdown.fieldView.on('execute', evt => {
|
|
459
|
-
this.cellType = evt.source._cellTypeValue;
|
|
460
|
-
});
|
|
461
|
-
cellTypeDropdown.bind('isEmpty').to(this, 'cellType', value => !value);
|
|
462
|
-
addListToDropdown(cellTypeDropdown.fieldView, this._getCellTypeDefinitions(), {
|
|
463
|
-
role: 'menu',
|
|
464
|
-
ariaLabel: t('Cell type')
|
|
465
|
-
});
|
|
466
|
-
return {
|
|
467
|
-
cellTypeRowLabel,
|
|
468
|
-
cellTypeDropdown
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
402
|
/**
|
|
472
403
|
* Creates the following form fields:
|
|
473
404
|
*
|
|
@@ -565,8 +496,7 @@ export class TableCellPropertiesView extends View {
|
|
|
565
496
|
horizontalAlignmentToolbar.set({
|
|
566
497
|
isCompact: true,
|
|
567
498
|
role: 'radiogroup',
|
|
568
|
-
ariaLabel: t('Horizontal text alignment toolbar')
|
|
569
|
-
class: 'ck-table-cell-properties-form__horizontal-alignment-toolbar'
|
|
499
|
+
ariaLabel: t('Horizontal text alignment toolbar')
|
|
570
500
|
});
|
|
571
501
|
fillToolbar({
|
|
572
502
|
view: this,
|
|
@@ -593,8 +523,7 @@ export class TableCellPropertiesView extends View {
|
|
|
593
523
|
verticalAlignmentToolbar.set({
|
|
594
524
|
isCompact: true,
|
|
595
525
|
role: 'radiogroup',
|
|
596
|
-
ariaLabel: t('Vertical text alignment toolbar')
|
|
597
|
-
class: 'ck-table-cell-properties-form__vertical-alignment-toolbar'
|
|
526
|
+
ariaLabel: t('Vertical text alignment toolbar')
|
|
598
527
|
});
|
|
599
528
|
fillToolbar({
|
|
600
529
|
view: this,
|
|
@@ -629,7 +558,8 @@ export class TableCellPropertiesView extends View {
|
|
|
629
558
|
];
|
|
630
559
|
saveButtonView.set({
|
|
631
560
|
label: t('Save'),
|
|
632
|
-
|
|
561
|
+
icon: IconCheck,
|
|
562
|
+
class: 'ck-button-save',
|
|
633
563
|
type: 'submit',
|
|
634
564
|
withText: true
|
|
635
565
|
});
|
|
@@ -638,6 +568,8 @@ export class TableCellPropertiesView extends View {
|
|
|
638
568
|
});
|
|
639
569
|
cancelButtonView.set({
|
|
640
570
|
label: t('Cancel'),
|
|
571
|
+
icon: IconCancel,
|
|
572
|
+
class: 'ck-button-cancel',
|
|
641
573
|
withText: true
|
|
642
574
|
});
|
|
643
575
|
cancelButtonView.delegate('execute').to(this, 'cancel');
|
|
@@ -645,42 +577,6 @@ export class TableCellPropertiesView extends View {
|
|
|
645
577
|
saveButtonView, cancelButtonView
|
|
646
578
|
};
|
|
647
579
|
}
|
|
648
|
-
/**
|
|
649
|
-
* Creates a back button view that cancels the form.
|
|
650
|
-
*/
|
|
651
|
-
_createBackButton() {
|
|
652
|
-
const t = this.locale.t;
|
|
653
|
-
const backButton = new ButtonView(this.locale);
|
|
654
|
-
backButton.set({
|
|
655
|
-
class: 'ck-button-back',
|
|
656
|
-
label: t('Back'),
|
|
657
|
-
icon: IconPreviousArrow,
|
|
658
|
-
tooltip: true
|
|
659
|
-
});
|
|
660
|
-
backButton.delegate('execute').to(this, 'cancel');
|
|
661
|
-
return backButton;
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
|
-
* Creates the cell type dropdown definitions.
|
|
665
|
-
*/
|
|
666
|
-
_getCellTypeDefinitions() {
|
|
667
|
-
const itemDefinitions = new Collection();
|
|
668
|
-
const cellTypeLabels = this._cellTypeLabels;
|
|
669
|
-
for (const type of ['data', 'header']) {
|
|
670
|
-
const definition = {
|
|
671
|
-
type: 'button',
|
|
672
|
-
model: new UIModel({
|
|
673
|
-
_cellTypeValue: type,
|
|
674
|
-
label: cellTypeLabels[type],
|
|
675
|
-
role: 'menuitemradio',
|
|
676
|
-
withText: true
|
|
677
|
-
})
|
|
678
|
-
};
|
|
679
|
-
definition.model.bind('isOn').to(this, 'cellType', value => value === type);
|
|
680
|
-
itemDefinitions.add(definition);
|
|
681
|
-
}
|
|
682
|
-
return itemDefinitions;
|
|
683
|
-
}
|
|
684
580
|
/**
|
|
685
581
|
* Provides localized labels for {@link #horizontalAlignmentToolbar} buttons.
|
|
686
582
|
*/
|
|
@@ -710,16 +606,6 @@ export class TableCellPropertiesView extends View {
|
|
|
710
606
|
bottom: t('Align cell text to the bottom')
|
|
711
607
|
};
|
|
712
608
|
}
|
|
713
|
-
/**
|
|
714
|
-
* Provides localized labels for {@link #cellTypeDropdown}.
|
|
715
|
-
*/
|
|
716
|
-
get _cellTypeLabels() {
|
|
717
|
-
const t = this.t;
|
|
718
|
-
return {
|
|
719
|
-
data: t('Data cell'),
|
|
720
|
-
header: t('Header cell')
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
609
|
}
|
|
724
610
|
function isBorderStyleSet(value) {
|
|
725
611
|
return value !== 'none';
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module table/tablecellproperties/ui/tablecellpropertiesviewexperimental
|
|
7
|
+
*/
|
|
8
|
+
import { ButtonView, FocusCycler, LabeledFieldView, ToolbarView, View, ViewCollection, type FocusableView, type NormalizedColorOption, type ColorPickerConfig } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { KeystrokeHandler, FocusTracker, type Locale } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { type ColorInputView } from '../../ui/colorinputview.js';
|
|
11
|
+
import type { TableCellPropertiesOptions } from '../../tableconfig.js';
|
|
12
|
+
import '@ckeditor/ckeditor5-ui/theme/components/form/form.css';
|
|
13
|
+
import '../../../theme/formrow-experimental.css';
|
|
14
|
+
import '../../../theme/tableform-experimental.css';
|
|
15
|
+
import '../../../theme/tablecellproperties-experimental.css';
|
|
16
|
+
export interface TableCellPropertiesViewOptionsExperimental {
|
|
17
|
+
borderColors: Array<NormalizedColorOption>;
|
|
18
|
+
backgroundColors: Array<NormalizedColorOption>;
|
|
19
|
+
defaultTableCellProperties: TableCellPropertiesOptions;
|
|
20
|
+
colorPickerConfig: false | ColorPickerConfig;
|
|
21
|
+
isTableCellTypeSupported: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The class representing a table cell properties form, allowing users to customize
|
|
25
|
+
* certain style aspects of a table cell, for instance, border, padding, text alignment, etc..
|
|
26
|
+
*/
|
|
27
|
+
export declare class TableCellPropertiesViewExperimental extends View {
|
|
28
|
+
/**
|
|
29
|
+
* The value of the cell border style.
|
|
30
|
+
*
|
|
31
|
+
* @observable
|
|
32
|
+
* @default ''
|
|
33
|
+
*/
|
|
34
|
+
borderStyle: string;
|
|
35
|
+
/**
|
|
36
|
+
* The value of the cell border width style.
|
|
37
|
+
*
|
|
38
|
+
* @observable
|
|
39
|
+
* @default ''
|
|
40
|
+
*/
|
|
41
|
+
borderWidth: string;
|
|
42
|
+
/**
|
|
43
|
+
* The value of the cell border color style.
|
|
44
|
+
*
|
|
45
|
+
* @observable
|
|
46
|
+
* @default ''
|
|
47
|
+
*/
|
|
48
|
+
borderColor: string;
|
|
49
|
+
/**
|
|
50
|
+
* The value of the cell padding style.
|
|
51
|
+
*
|
|
52
|
+
* @observable
|
|
53
|
+
* @default ''
|
|
54
|
+
*/
|
|
55
|
+
padding: string;
|
|
56
|
+
/**
|
|
57
|
+
* The value of the cell background color style.
|
|
58
|
+
*
|
|
59
|
+
* @observable
|
|
60
|
+
* @default ''
|
|
61
|
+
*/
|
|
62
|
+
backgroundColor: string;
|
|
63
|
+
/**
|
|
64
|
+
* The value of the table cell width style.
|
|
65
|
+
*
|
|
66
|
+
* @observable
|
|
67
|
+
* @default ''
|
|
68
|
+
*/
|
|
69
|
+
width: string;
|
|
70
|
+
/**
|
|
71
|
+
* The value of the table cell height style.
|
|
72
|
+
*
|
|
73
|
+
* @observable
|
|
74
|
+
* @default ''
|
|
75
|
+
*/
|
|
76
|
+
height: string;
|
|
77
|
+
/**
|
|
78
|
+
* The value of the horizontal text alignment style.
|
|
79
|
+
*
|
|
80
|
+
* @observable
|
|
81
|
+
* @default ''
|
|
82
|
+
*/
|
|
83
|
+
horizontalAlignment: string;
|
|
84
|
+
/**
|
|
85
|
+
* The value of the vertical text alignment style.
|
|
86
|
+
*
|
|
87
|
+
* @observable
|
|
88
|
+
* @default ''
|
|
89
|
+
*/
|
|
90
|
+
verticalAlignment: string;
|
|
91
|
+
/**
|
|
92
|
+
* The type of the table cell ('data' or 'header').
|
|
93
|
+
*
|
|
94
|
+
* @observable
|
|
95
|
+
* @default ''
|
|
96
|
+
*/
|
|
97
|
+
cellType: string;
|
|
98
|
+
/**
|
|
99
|
+
* Options passed to the view. See {@link #constructor} to learn more.
|
|
100
|
+
*/
|
|
101
|
+
readonly options: TableCellPropertiesViewOptionsExperimental;
|
|
102
|
+
/**
|
|
103
|
+
* Tracks information about the DOM focus in the form.
|
|
104
|
+
*/
|
|
105
|
+
readonly focusTracker: FocusTracker;
|
|
106
|
+
/**
|
|
107
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
108
|
+
*/
|
|
109
|
+
readonly keystrokes: KeystrokeHandler;
|
|
110
|
+
/**
|
|
111
|
+
* A collection of child views in the form.
|
|
112
|
+
*/
|
|
113
|
+
readonly children: ViewCollection;
|
|
114
|
+
/**
|
|
115
|
+
* A dropdown that allows selecting the style of the table cell border.
|
|
116
|
+
*/
|
|
117
|
+
readonly borderStyleDropdown: LabeledFieldView<FocusableView>;
|
|
118
|
+
/**
|
|
119
|
+
* An input that allows specifying the width of the table cell border.
|
|
120
|
+
*/
|
|
121
|
+
readonly borderWidthInput: LabeledFieldView<FocusableView>;
|
|
122
|
+
/**
|
|
123
|
+
* An input that allows specifying the color of the table cell border.
|
|
124
|
+
*/
|
|
125
|
+
readonly borderColorInput: LabeledFieldView<ColorInputView>;
|
|
126
|
+
/**
|
|
127
|
+
* An input that allows specifying the table cell background color.
|
|
128
|
+
*/
|
|
129
|
+
readonly backgroundInput: LabeledFieldView<ColorInputView>;
|
|
130
|
+
/**
|
|
131
|
+
* A dropdown that allows selecting the type of the table cell (data or header).
|
|
132
|
+
*/
|
|
133
|
+
readonly cellTypeDropdown: LabeledFieldView<FocusableView>;
|
|
134
|
+
/**
|
|
135
|
+
* An input that allows specifying the table cell padding.
|
|
136
|
+
*/
|
|
137
|
+
readonly paddingInput: LabeledFieldView;
|
|
138
|
+
/**
|
|
139
|
+
* An input that allows specifying the table cell width.
|
|
140
|
+
*/
|
|
141
|
+
readonly widthInput: LabeledFieldView<FocusableView>;
|
|
142
|
+
/**
|
|
143
|
+
* An input that allows specifying the table cell height.
|
|
144
|
+
*/
|
|
145
|
+
readonly heightInput: LabeledFieldView<FocusableView>;
|
|
146
|
+
/**
|
|
147
|
+
* A toolbar with buttons that allow changing the horizontal text alignment in a table cell.
|
|
148
|
+
*/
|
|
149
|
+
readonly horizontalAlignmentToolbar: ToolbarView;
|
|
150
|
+
/**
|
|
151
|
+
* A toolbar with buttons that allow changing the vertical text alignment in a table cell.
|
|
152
|
+
*/
|
|
153
|
+
readonly verticalAlignmentToolbar: ToolbarView;
|
|
154
|
+
/**
|
|
155
|
+
* The "Save" button view.
|
|
156
|
+
*/
|
|
157
|
+
saveButtonView: ButtonView;
|
|
158
|
+
/**
|
|
159
|
+
* The "Cancel" button view.
|
|
160
|
+
*/
|
|
161
|
+
cancelButtonView: ButtonView;
|
|
162
|
+
/**
|
|
163
|
+
* The "Back" button view.
|
|
164
|
+
*/
|
|
165
|
+
backButtonView: ButtonView;
|
|
166
|
+
/**
|
|
167
|
+
* A collection of views that can be focused in the form.
|
|
168
|
+
*/
|
|
169
|
+
protected readonly _focusables: ViewCollection<FocusableView>;
|
|
170
|
+
/**
|
|
171
|
+
* Helps cycling over {@link #_focusables} in the form.
|
|
172
|
+
*/
|
|
173
|
+
protected readonly _focusCycler: FocusCycler;
|
|
174
|
+
/**
|
|
175
|
+
* @param locale The {@link module:core/editor/editor~Editor#locale} instance.
|
|
176
|
+
* @param options Additional configuration of the view.
|
|
177
|
+
* @param options.borderColors A configuration of the border color palette used by the
|
|
178
|
+
* {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#borderColorInput}.
|
|
179
|
+
* @param options.backgroundColors A configuration of the background color palette used by the
|
|
180
|
+
* {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#backgroundInput}.
|
|
181
|
+
* @param options.defaultTableCellProperties The default table cell properties.
|
|
182
|
+
* @param options.isTableCellTypeSupported A flag indicating whether the table cell type is supported.
|
|
183
|
+
*/
|
|
184
|
+
constructor(locale: Locale, options: TableCellPropertiesViewOptionsExperimental);
|
|
185
|
+
/**
|
|
186
|
+
* @inheritDoc
|
|
187
|
+
*/
|
|
188
|
+
render(): void;
|
|
189
|
+
/**
|
|
190
|
+
* @inheritDoc
|
|
191
|
+
*/
|
|
192
|
+
destroy(): void;
|
|
193
|
+
/**
|
|
194
|
+
* Focuses the fist focusable field in the form.
|
|
195
|
+
*/
|
|
196
|
+
focus(): void;
|
|
197
|
+
/**
|
|
198
|
+
* Creates the following form fields:
|
|
199
|
+
*
|
|
200
|
+
* * {@link #borderStyleDropdown},
|
|
201
|
+
* * {@link #borderWidthInput},
|
|
202
|
+
* * {@link #borderColorInput}.
|
|
203
|
+
*/
|
|
204
|
+
private _createBorderFields;
|
|
205
|
+
/**
|
|
206
|
+
* Creates the following form fields:
|
|
207
|
+
*
|
|
208
|
+
* * {@link #backgroundInput}.
|
|
209
|
+
*/
|
|
210
|
+
private _createBackgroundFields;
|
|
211
|
+
/**
|
|
212
|
+
* Create cell type field.
|
|
213
|
+
*
|
|
214
|
+
* * {@link #cellTypeDropdown}.
|
|
215
|
+
*
|
|
216
|
+
* @internal
|
|
217
|
+
*/
|
|
218
|
+
private _createCellTypeField;
|
|
219
|
+
/**
|
|
220
|
+
* Creates the following form fields:
|
|
221
|
+
*
|
|
222
|
+
* * {@link #widthInput}.
|
|
223
|
+
* * {@link #heightInput}.
|
|
224
|
+
*/
|
|
225
|
+
private _createDimensionFields;
|
|
226
|
+
/**
|
|
227
|
+
* Creates the following form fields:
|
|
228
|
+
*
|
|
229
|
+
* * {@link #paddingInput}.
|
|
230
|
+
*/
|
|
231
|
+
private _createPaddingField;
|
|
232
|
+
/**
|
|
233
|
+
* Creates the following form fields:
|
|
234
|
+
*
|
|
235
|
+
* * {@link #horizontalAlignmentToolbar},
|
|
236
|
+
* * {@link #verticalAlignmentToolbar}.
|
|
237
|
+
*/
|
|
238
|
+
private _createAlignmentFields;
|
|
239
|
+
/**
|
|
240
|
+
* Creates the following form controls:
|
|
241
|
+
*
|
|
242
|
+
* * {@link #saveButtonView},
|
|
243
|
+
* * {@link #cancelButtonView}.
|
|
244
|
+
*/
|
|
245
|
+
private _createActionButtons;
|
|
246
|
+
/**
|
|
247
|
+
* Creates a back button view that cancels the form.
|
|
248
|
+
*/
|
|
249
|
+
private _createBackButton;
|
|
250
|
+
/**
|
|
251
|
+
* Creates the cell type dropdown definitions.
|
|
252
|
+
*/
|
|
253
|
+
private _getCellTypeDefinitions;
|
|
254
|
+
/**
|
|
255
|
+
* Provides localized labels for {@link #horizontalAlignmentToolbar} buttons.
|
|
256
|
+
*/
|
|
257
|
+
private get _horizontalAlignmentLabels();
|
|
258
|
+
/**
|
|
259
|
+
* Provides localized labels for {@link #verticalAlignmentToolbar} buttons.
|
|
260
|
+
*/
|
|
261
|
+
private get _verticalAlignmentLabels();
|
|
262
|
+
/**
|
|
263
|
+
* Provides localized labels for {@link #cellTypeDropdown}.
|
|
264
|
+
*/
|
|
265
|
+
private get _cellTypeLabels();
|
|
266
|
+
}
|