@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
package/lang/contexts.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"Dimensions": "The label describing a group of form fields that allows setting dimensions of a table or a table cell.",
|
|
37
37
|
"Table cell text alignment": "The label for the group of toolbars that allows configuring the text alignment in a table cell.",
|
|
38
38
|
"Table Alignment": "The label for the toolbar that allows configuring the alignment of a table.",
|
|
39
|
+
"Alignment": "The label for the toolbar that allows configuring the alignment of a table.",
|
|
39
40
|
"Horizontal text alignment toolbar": "The label used by assistive technologies describing a toolbar that allows configuring the horizontal text alignment in a table cell.",
|
|
40
41
|
"Vertical text alignment toolbar": "The label used by assistive technologies describing a toolbar that allows configuring the vertical text alignment in a table cell.",
|
|
41
42
|
"Table alignment toolbar": "The label used by assistive technologies describing a toolbar that allows configuring the alignment of a table.",
|
|
@@ -60,6 +61,9 @@
|
|
|
60
61
|
"Align table to the right with text wrapping": "The label used by assistive technologies describing a button that aligns the table to the right as an inline element, allowing text to wrap around it.",
|
|
61
62
|
"Align table to the left with no text wrapping": "The label used by assistive technologies describing a button that aligns the table to the left as a block element with no text wrapping.",
|
|
62
63
|
"Align table to the right with no text wrapping": "The label used by assistive technologies describing a button that aligns the table to the right as a block element with no text wrapping.",
|
|
64
|
+
"Align table to the left": "The label used by assistive technologies describing a button that aligns the table to the left.",
|
|
65
|
+
"Center table": "The label used by assistive technologies describing a button that centers the table.",
|
|
66
|
+
"Align table to the right": "The label used by assistive technologies describing a button that aligns the table to the right.",
|
|
63
67
|
"The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".": "The localized error string that can be displayed next to color (background, border) fields that have an invalid value",
|
|
64
68
|
"The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".": "The localized error string that can be displayed next to length (padding, border width) fields that have an invalid value.",
|
|
65
69
|
"Enter table caption": "The placeholder text for the table caption displayed when the caption is empty.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-table",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251223.0",
|
|
4
4
|
"description": "Table feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"ckeditor5": "0.0.0-nightly-
|
|
17
|
-
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-
|
|
18
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
19
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-
|
|
20
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
21
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
22
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
23
|
-
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-
|
|
16
|
+
"ckeditor5": "0.0.0-nightly-20251223.0",
|
|
17
|
+
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20251223.0",
|
|
18
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251223.0",
|
|
19
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20251223.0",
|
|
20
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251223.0",
|
|
21
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251223.0",
|
|
22
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251223.0",
|
|
23
|
+
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-20251223.0",
|
|
24
24
|
"es-toolkit": "1.39.5"
|
|
25
25
|
},
|
|
26
26
|
"author": "CKSource (http://cksource.com/)",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -15,6 +15,21 @@ declare module '@ckeditor/ckeditor5-engine' {
|
|
|
15
15
|
* This will be enabled by default in the future CKEditor 5 releases.
|
|
16
16
|
*/
|
|
17
17
|
upcastTableBorderZeroAttributes?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* When enabled, the the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing table properties feature}
|
|
20
|
+
* will support extended alignment options for tables, i.e. `blockLeft` and `blockRight`, using CSS `margin` property.
|
|
21
|
+
*
|
|
22
|
+
* This will be enabled by default in the future CKEditor 5 releases.
|
|
23
|
+
*/
|
|
24
|
+
useExtendedTableBlockAlignment?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* When enabled, the
|
|
27
|
+
* {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing table cell properties feature}
|
|
28
|
+
* will introduce a special selector for table cell types (i.e. header and data cells) in the cell properties dropdown.
|
|
29
|
+
*
|
|
30
|
+
* This will be enabled by default in the future CKEditor 5 releases.
|
|
31
|
+
*/
|
|
32
|
+
tableCellTypeSupport?: boolean;
|
|
18
33
|
}
|
|
19
34
|
}
|
|
20
35
|
declare module '@ckeditor/ckeditor5-core' {
|
|
@@ -174,7 +174,10 @@ function hasAnyAttribute(element) {
|
|
|
174
174
|
*/
|
|
175
175
|
export function convertPlainTable(editor) {
|
|
176
176
|
return (table, conversionApi) => {
|
|
177
|
-
|
|
177
|
+
const hasPlainTableOutput = editor.plugins.has('PlainTableOutput');
|
|
178
|
+
const isClipboardPipeline = conversionApi.options.isClipboardPipeline;
|
|
179
|
+
const useExtendedAlignment = editor.config.get('experimentalFlags.useExtendedTableBlockAlignment');
|
|
180
|
+
if (!hasPlainTableOutput && !(useExtendedAlignment && isClipboardPipeline)) {
|
|
178
181
|
return null;
|
|
179
182
|
}
|
|
180
183
|
return downcastPlainTable(table, conversionApi, editor);
|
|
@@ -185,7 +188,10 @@ export function convertPlainTable(editor) {
|
|
|
185
188
|
*/
|
|
186
189
|
export function convertPlainTableCaption(editor) {
|
|
187
190
|
return (modelElement, { writer, options }) => {
|
|
188
|
-
|
|
191
|
+
const hasPlainTableOutput = editor.plugins.has('PlainTableOutput');
|
|
192
|
+
const isClipboardPipeline = options.isClipboardPipeline;
|
|
193
|
+
const useExtendedAlignment = editor.config.get('experimentalFlags.useExtendedTableBlockAlignment');
|
|
194
|
+
if (!hasPlainTableOutput && !(useExtendedAlignment && isClipboardPipeline)) {
|
|
189
195
|
return null;
|
|
190
196
|
}
|
|
191
197
|
if (modelElement.parent.name === 'table') {
|
|
@@ -270,7 +276,10 @@ export function downcastTableBorderAndBackgroundAttributes(editor) {
|
|
|
270
276
|
return dispatcher.on(`attribute:${modelAttribute}:table`, (evt, data, conversionApi) => {
|
|
271
277
|
const { item, attributeNewValue } = data;
|
|
272
278
|
const { mapper, writer } = conversionApi;
|
|
273
|
-
|
|
279
|
+
const hasPlainTableOutput = editor.plugins.has('PlainTableOutput');
|
|
280
|
+
const isClipboardPipeline = conversionApi.options.isClipboardPipeline;
|
|
281
|
+
const useExtendedAlignment = editor.config.get('experimentalFlags.useExtendedTableBlockAlignment');
|
|
282
|
+
if (!hasPlainTableOutput && !(useExtendedAlignment && isClipboardPipeline)) {
|
|
274
283
|
return;
|
|
275
284
|
}
|
|
276
285
|
if (!conversionApi.consumable.consume(item, evt.name)) {
|
package/src/index.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ export { TableUtils, type TableIndexesObject } from './tableutils.js';
|
|
|
34
34
|
export { TableColumnResize } from './tablecolumnresize.js';
|
|
35
35
|
export { TableColumnResizeEditing } from './tablecolumnresize/tablecolumnresizeediting.js';
|
|
36
36
|
export { TableWidthsCommand, type TableWidthsCommandOptions } from './tablecolumnresize/tablewidthscommand.js';
|
|
37
|
+
export { TablePropertiesUIExperimental } from './tableproperties/tablepropertiesuiexperimental.js';
|
|
38
|
+
export { TablePropertiesViewExperimental, type TablePropertiesViewOptionsExperimental } from './tableproperties/ui/tablepropertiesviewexperimental.js';
|
|
39
|
+
export { TableCellPropertiesUIExperimental } from './tablecellproperties/tablecellpropertiesuiexperimental.js';
|
|
40
|
+
export { TableCellPropertiesViewExperimental, type TableCellPropertiesViewOptionsExperimental } from './tablecellproperties/ui/tablecellpropertiesviewexperimental.js';
|
|
37
41
|
export { InsertColumnCommand } from './commands/insertcolumncommand.js';
|
|
38
42
|
export { InsertRowCommand } from './commands/insertrowcommand.js';
|
|
39
43
|
export { InsertTableCommand } from './commands/inserttablecommand.js';
|
package/src/index.js
CHANGED
|
@@ -34,6 +34,11 @@ export { TableUtils } from './tableutils.js';
|
|
|
34
34
|
export { TableColumnResize } from './tablecolumnresize.js';
|
|
35
35
|
export { TableColumnResizeEditing } from './tablecolumnresize/tablecolumnresizeediting.js';
|
|
36
36
|
export { TableWidthsCommand } from './tablecolumnresize/tablewidthscommand.js';
|
|
37
|
+
// [experimental] Remove in the v48.
|
|
38
|
+
export { TablePropertiesUIExperimental } from './tableproperties/tablepropertiesuiexperimental.js';
|
|
39
|
+
export { TablePropertiesViewExperimental } from './tableproperties/ui/tablepropertiesviewexperimental.js';
|
|
40
|
+
export { TableCellPropertiesUIExperimental } from './tablecellproperties/tablecellpropertiesuiexperimental.js';
|
|
41
|
+
export { TableCellPropertiesViewExperimental } from './tablecellproperties/ui/tablecellpropertiesviewexperimental.js';
|
|
37
42
|
export { InsertColumnCommand } from './commands/insertcolumncommand.js';
|
|
38
43
|
export { InsertRowCommand } from './commands/insertrowcommand.js';
|
|
39
44
|
export { InsertTableCommand } from './commands/inserttablecommand.js';
|
|
@@ -129,8 +129,10 @@ export class TableCellPropertiesEditing extends Plugin {
|
|
|
129
129
|
editor.commands.add('tableCellHorizontalAlignment', new TableCellHorizontalAlignmentCommand(editor, defaultTableCellProperties.horizontalAlignment));
|
|
130
130
|
enableVerticalAlignmentProperty(schema, conversion, defaultTableCellProperties.verticalAlignment);
|
|
131
131
|
editor.commands.add('tableCellVerticalAlignment', new TableCellVerticalAlignmentCommand(editor, defaultTableCellProperties.verticalAlignment));
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
if (editor.config.get('experimentalFlags.tableCellTypeSupport')) {
|
|
133
|
+
enableCellTypeProperty(editor);
|
|
134
|
+
editor.commands.add('tableCellType', new TableCellTypeCommand(editor));
|
|
135
|
+
}
|
|
134
136
|
}
|
|
135
137
|
}
|
|
136
138
|
/**
|
|
@@ -25,8 +25,7 @@ const propertyToCommandMap = {
|
|
|
25
25
|
padding: 'tableCellPadding',
|
|
26
26
|
backgroundColor: 'tableCellBackgroundColor',
|
|
27
27
|
horizontalAlignment: 'tableCellHorizontalAlignment',
|
|
28
|
-
verticalAlignment: 'tableCellVerticalAlignment'
|
|
29
|
-
cellType: 'tableCellType'
|
|
28
|
+
verticalAlignment: 'tableCellVerticalAlignment'
|
|
30
29
|
};
|
|
31
30
|
/**
|
|
32
31
|
* The table cell properties UI plugin. It introduces the `'tableCellProperties'` button
|
|
@@ -125,10 +124,8 @@ export class TableCellPropertiesUI extends Plugin {
|
|
|
125
124
|
tooltip: true
|
|
126
125
|
});
|
|
127
126
|
this.listenTo(view, 'execute', () => this._showView());
|
|
128
|
-
const commands = (
|
|
129
|
-
.
|
|
130
|
-
.map(commandName => editor.commands.get(commandName))
|
|
131
|
-
.filter(val => !!val));
|
|
127
|
+
const commands = Object.values(propertyToCommandMap)
|
|
128
|
+
.map(commandName => editor.commands.get(commandName));
|
|
132
129
|
view.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled) => (areEnabled.some(isCommandEnabled => isCommandEnabled)));
|
|
133
130
|
return view;
|
|
134
131
|
});
|
|
@@ -234,11 +231,6 @@ export class TableCellPropertiesUI extends Plugin {
|
|
|
234
231
|
}));
|
|
235
232
|
view.on('change:horizontalAlignment', this._getPropertyChangeCallback('tableCellHorizontalAlignment'));
|
|
236
233
|
view.on('change:verticalAlignment', this._getPropertyChangeCallback('tableCellVerticalAlignment'));
|
|
237
|
-
const cellTypeCommand = editor.commands.get('tableCellType');
|
|
238
|
-
if (cellTypeCommand) {
|
|
239
|
-
view.cellTypeDropdown.bind('isEnabled').to(cellTypeCommand, 'isEnabled');
|
|
240
|
-
view.on('change:cellType', this._getPropertyChangeCallback('tableCellType'));
|
|
241
|
-
}
|
|
242
234
|
return view;
|
|
243
235
|
}
|
|
244
236
|
/**
|
|
@@ -252,28 +244,16 @@ export class TableCellPropertiesUI extends Plugin {
|
|
|
252
244
|
_fillViewFormFromCommandValues() {
|
|
253
245
|
const commands = this.editor.commands;
|
|
254
246
|
const borderStyleCommand = commands.get('tableCellBorderStyle');
|
|
255
|
-
Object
|
|
256
|
-
.
|
|
257
|
-
.flatMap(([property, commandName]) => {
|
|
258
|
-
const command = commands.get(commandName);
|
|
259
|
-
if (!command) {
|
|
260
|
-
return [];
|
|
261
|
-
}
|
|
247
|
+
Object.entries(propertyToCommandMap)
|
|
248
|
+
.map(([property, commandName]) => {
|
|
262
249
|
const propertyKey = property;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
else {
|
|
268
|
-
defaultValue = this.view === this._viewWithContentTableDefaults ?
|
|
269
|
-
this._defaultContentTableCellProperties[propertyKey] || '' :
|
|
270
|
-
this._defaultLayoutTableCellProperties[propertyKey] || '';
|
|
271
|
-
}
|
|
272
|
-
const entry = [
|
|
250
|
+
const defaultValue = this.view === this._viewWithContentTableDefaults ?
|
|
251
|
+
this._defaultContentTableCellProperties[propertyKey] || '' :
|
|
252
|
+
this._defaultLayoutTableCellProperties[propertyKey] || '';
|
|
253
|
+
return [
|
|
273
254
|
property,
|
|
274
|
-
|
|
255
|
+
commands.get(commandName).value || defaultValue
|
|
275
256
|
];
|
|
276
|
-
return [entry];
|
|
277
257
|
})
|
|
278
258
|
.forEach(([property, value]) => {
|
|
279
259
|
// Do not set the `border-color` and `border-width` fields if `border-style:none`.
|
|
@@ -0,0 +1,128 @@
|
|
|
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/tablecellpropertiesuiexperimental
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { TableCellPropertiesViewExperimental } from './ui/tablecellpropertiesviewexperimental.js';
|
|
11
|
+
/**
|
|
12
|
+
* The table cell properties UI plugin. It introduces the `'tableCellProperties'` button
|
|
13
|
+
* that opens a form allowing to specify the visual styling of a table cell.
|
|
14
|
+
*
|
|
15
|
+
* It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.
|
|
16
|
+
*/
|
|
17
|
+
export declare class TableCellPropertiesUIExperimental extends Plugin {
|
|
18
|
+
/**
|
|
19
|
+
* The default table cell properties.
|
|
20
|
+
*/
|
|
21
|
+
private _defaultContentTableCellProperties;
|
|
22
|
+
/**
|
|
23
|
+
* The default layout table cell properties.
|
|
24
|
+
*/
|
|
25
|
+
private _defaultLayoutTableCellProperties;
|
|
26
|
+
/**
|
|
27
|
+
* The contextual balloon plugin instance.
|
|
28
|
+
*/
|
|
29
|
+
private _balloon?;
|
|
30
|
+
/**
|
|
31
|
+
* The cell properties form view displayed inside the balloon.
|
|
32
|
+
*/
|
|
33
|
+
view?: TableCellPropertiesViewExperimental | null;
|
|
34
|
+
/**
|
|
35
|
+
* The cell properties form view displayed inside the balloon (content table).
|
|
36
|
+
*/
|
|
37
|
+
private _viewWithContentTableDefaults?;
|
|
38
|
+
/**
|
|
39
|
+
* The cell properties form view displayed inside the balloon (layout table).
|
|
40
|
+
*/
|
|
41
|
+
private _viewWithLayoutTableDefaults?;
|
|
42
|
+
/**
|
|
43
|
+
* The batch used to undo all changes made by the form (which are live, as the user types)
|
|
44
|
+
* when "Cancel" was pressed. Each time the view is shown, a new batch is created.
|
|
45
|
+
*/
|
|
46
|
+
private _undoStepBatch?;
|
|
47
|
+
/**
|
|
48
|
+
* Flag used to indicate whether view is ready to execute update commands
|
|
49
|
+
* (it finished loading initial data).
|
|
50
|
+
*/
|
|
51
|
+
private _isReady?;
|
|
52
|
+
/**
|
|
53
|
+
* @inheritDoc
|
|
54
|
+
*/
|
|
55
|
+
static get requires(): readonly [typeof ContextualBalloon];
|
|
56
|
+
/**
|
|
57
|
+
* @inheritDoc
|
|
58
|
+
*/
|
|
59
|
+
static get pluginName(): "TableCellPropertiesUIExperimental";
|
|
60
|
+
/**
|
|
61
|
+
* @inheritDoc
|
|
62
|
+
*/
|
|
63
|
+
static get isOfficialPlugin(): true;
|
|
64
|
+
/**
|
|
65
|
+
* @inheritDoc
|
|
66
|
+
*/
|
|
67
|
+
constructor(editor: Editor);
|
|
68
|
+
/**
|
|
69
|
+
* @inheritDoc
|
|
70
|
+
*/
|
|
71
|
+
init(): void;
|
|
72
|
+
/**
|
|
73
|
+
* @inheritDoc
|
|
74
|
+
*/
|
|
75
|
+
destroy(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Creates the {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView} instance.
|
|
78
|
+
*
|
|
79
|
+
* @returns The cell properties form view instance.
|
|
80
|
+
*/
|
|
81
|
+
private _createPropertiesView;
|
|
82
|
+
/**
|
|
83
|
+
* In this method the "editor data -> UI" binding is happening.
|
|
84
|
+
*
|
|
85
|
+
* When executed, this method obtains selected cell property values from various table commands
|
|
86
|
+
* and passes them to the {@link #view}.
|
|
87
|
+
*
|
|
88
|
+
* This way, the UI stays up–to–date with the editor data.
|
|
89
|
+
*/
|
|
90
|
+
private _fillViewFormFromCommandValues;
|
|
91
|
+
/**
|
|
92
|
+
* Shows the {@link #view} in the {@link #_balloon}.
|
|
93
|
+
*
|
|
94
|
+
* **Note**: Each time a view is shown, a new {@link #_undoStepBatch} is created. It contains
|
|
95
|
+
* all changes made to the document when the view is visible, allowing a single undo step
|
|
96
|
+
* for all of them.
|
|
97
|
+
*/
|
|
98
|
+
protected _showView(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Removes the {@link #view} from the {@link #_balloon}.
|
|
101
|
+
*/
|
|
102
|
+
protected _hideView(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Repositions the {@link #_balloon} or hides the {@link #view} if a table cell is no longer selected.
|
|
105
|
+
*/
|
|
106
|
+
protected _updateView(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Returns `true` when the {@link #view} is visible in the {@link #_balloon}.
|
|
109
|
+
*/
|
|
110
|
+
private get _isViewVisible();
|
|
111
|
+
/**
|
|
112
|
+
* Returns `true` when the {@link #view} is in the {@link #_balloon}.
|
|
113
|
+
*/
|
|
114
|
+
private get _isViewInBalloon();
|
|
115
|
+
/**
|
|
116
|
+
* Creates a callback that when executed upon the {@link #view view's} property change
|
|
117
|
+
* executes a related editor command with the new property value.
|
|
118
|
+
*
|
|
119
|
+
* @param commandName The default value of the command.
|
|
120
|
+
*/
|
|
121
|
+
private _getPropertyChangeCallback;
|
|
122
|
+
/**
|
|
123
|
+
* Creates a callback that when executed upon the {@link #view view's} property change:
|
|
124
|
+
* * Executes a related editor command with the new property value if the value is valid,
|
|
125
|
+
* * Or sets the error text next to the invalid field, if the value did not pass the validation.
|
|
126
|
+
*/
|
|
127
|
+
private _getValidatedPropertyChangeCallback;
|
|
128
|
+
}
|