@atlaskit/editor-plugin-table 7.29.0 → 7.29.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/CHANGELOG.md +21 -0
- package/dist/cjs/toolbar.js +30 -5
- package/dist/es2019/toolbar.js +26 -5
- package/dist/esm/toolbar.js +30 -5
- package/dist/types/plugin.d.ts +1 -0
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +3 -2
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +6 -4
- package/dist/types/ui/TableFloatingControls/index.d.ts +3 -2
- package/dist/types-ts4.5/plugin.d.ts +1 -0
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +6 -4
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +3 -2
- package/package.json +8 -8
- package/src/plugin.tsx +1 -0
- package/src/toolbar.tsx +32 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.29.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#152399](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152399)
|
|
8
|
+
[`fbd7217f0cb51`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fbd7217f0cb51) -
|
|
9
|
+
[ux] ED-25092: Migrated table toolbar icons
|
|
10
|
+
- [#152510](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152510)
|
|
11
|
+
[`dcf9edde7ac7b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcf9edde7ac7b) -
|
|
12
|
+
bump adf-schema to 42.0.1
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 7.29.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#151938](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151938)
|
|
20
|
+
[`91b5768ef0c7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/91b5768ef0c7c) -
|
|
21
|
+
[ux] ED-25203 refactor image previewer outside of floating toolbar
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 7.29.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -22,11 +22,17 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
22
22
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
23
23
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
24
24
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
25
|
+
var _contentAlignCenter = _interopRequireDefault(require("@atlaskit/icon/core/content-align-center"));
|
|
26
|
+
var _contentAlignLeft = _interopRequireDefault(require("@atlaskit/icon/core/content-align-left"));
|
|
27
|
+
var _customize = _interopRequireDefault(require("@atlaskit/icon/core/customize"));
|
|
28
|
+
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
29
|
+
var _tableColumnsDistribute = _interopRequireDefault(require("@atlaskit/icon/core/table-columns-distribute"));
|
|
25
30
|
var _alignImageCenter = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-center"));
|
|
26
31
|
var _alignImageLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-left"));
|
|
27
32
|
var _layoutThreeEqual = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-three-equal"));
|
|
28
33
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
29
34
|
var _preferences = _interopRequireDefault(require("@atlaskit/icon/glyph/preferences"));
|
|
35
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
30
36
|
var _commands = require("./commands");
|
|
31
37
|
var _commandsWithAnalytics = require("./commands-with-analytics");
|
|
32
38
|
var _pluginFactory = require("./pm-plugins/plugin-factory");
|
|
@@ -104,7 +110,10 @@ var getToolbarMenuConfig = exports.getToolbarMenuConfig = function getToolbarMen
|
|
|
104
110
|
id: 'editor.table.tableOptions',
|
|
105
111
|
type: 'dropdown',
|
|
106
112
|
testId: 'table_options',
|
|
107
|
-
|
|
113
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
114
|
+
icon: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? undefined : _preferences.default,
|
|
115
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
116
|
+
iconBefore: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? _customize.default : undefined,
|
|
108
117
|
title: formatMessage(_messages.tableMessages.tableOptions),
|
|
109
118
|
hidden: options.every(function (option) {
|
|
110
119
|
return option.hidden;
|
|
@@ -440,7 +449,8 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
|
|
|
440
449
|
id: 'editor.table.delete',
|
|
441
450
|
type: 'button',
|
|
442
451
|
appearance: 'danger',
|
|
443
|
-
icon:
|
|
452
|
+
icon: _delete.default,
|
|
453
|
+
iconFallback: _remove.default,
|
|
444
454
|
onClick: (0, _commandsWithAnalytics.deleteTableWithAnalytics)(editorAnalyticsAPI),
|
|
445
455
|
disabled: !!resizeState && !!resizeState.dragging,
|
|
446
456
|
onMouseEnter: (0, _commands.hoverTable)(true),
|
|
@@ -519,7 +529,8 @@ var getColumnSettingItems = function getColumnSettingItems(editorState, editorVi
|
|
|
519
529
|
id: 'editor.table.distributeColumns',
|
|
520
530
|
type: 'button',
|
|
521
531
|
title: formatMessage(_messages.tableMessages.distributeColumns),
|
|
522
|
-
icon:
|
|
532
|
+
icon: _tableColumnsDistribute.default,
|
|
533
|
+
iconFallback: _layoutThreeEqual.default,
|
|
523
534
|
onClick: function onClick(state, dispatch, view) {
|
|
524
535
|
return getDistributeConfig(getEditorContainerWidth, api, editorAnalyticsAPI, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor)(state, dispatch, view);
|
|
525
536
|
},
|
|
@@ -603,11 +614,25 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
|
|
|
603
614
|
var alignmentIcons = [{
|
|
604
615
|
id: 'editor.table.alignLeft',
|
|
605
616
|
value: 'align-start',
|
|
606
|
-
icon:
|
|
617
|
+
icon: function icon() {
|
|
618
|
+
return (0, _react.jsx)(_contentAlignLeft.default, {
|
|
619
|
+
color: "currentColor",
|
|
620
|
+
spacing: "spacious",
|
|
621
|
+
label: "table-align-start-icon",
|
|
622
|
+
LEGACY_fallbackIcon: _alignImageLeft.default
|
|
623
|
+
});
|
|
624
|
+
}
|
|
607
625
|
}, {
|
|
608
626
|
id: 'editor.table.alignCenter',
|
|
609
627
|
value: 'center',
|
|
610
|
-
icon:
|
|
628
|
+
icon: function icon() {
|
|
629
|
+
return (0, _react.jsx)(_contentAlignCenter.default, {
|
|
630
|
+
color: "currentColor",
|
|
631
|
+
spacing: "spacious",
|
|
632
|
+
label: "table-align-center-icon",
|
|
633
|
+
LEGACY_fallbackIcon: _alignImageCenter.default
|
|
634
|
+
});
|
|
635
|
+
}
|
|
611
636
|
}];
|
|
612
637
|
|
|
613
638
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -17,11 +17,17 @@ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
17
17
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
18
18
|
import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
|
|
19
19
|
import { findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType, splitCell } from '@atlaskit/editor-tables/utils';
|
|
20
|
+
import ContentAlignCenterIcon from '@atlaskit/icon/core/content-align-center';
|
|
21
|
+
import ContentAlignLeftIcon from '@atlaskit/icon/core/content-align-left';
|
|
22
|
+
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
23
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
24
|
+
import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
|
|
20
25
|
import EditorAlignImageCenter from '@atlaskit/icon/glyph/editor/align-image-center';
|
|
21
26
|
import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
|
|
22
27
|
import DistributeColumnIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
|
|
23
28
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
24
29
|
import TableOptionsIcon from '@atlaskit/icon/glyph/preferences';
|
|
30
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
31
|
import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, hoverTable, removeDescendantNodes } from './commands';
|
|
26
32
|
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, deleteTableWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, setTableAlignmentWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics, toggleFixedColumnWidthsOptionAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics, wrapTableInExpandWithAnalytics } from './commands-with-analytics';
|
|
27
33
|
import { getPluginState } from './pm-plugins/plugin-factory';
|
|
@@ -91,7 +97,10 @@ export const getToolbarMenuConfig = (config, state, {
|
|
|
91
97
|
id: 'editor.table.tableOptions',
|
|
92
98
|
type: 'dropdown',
|
|
93
99
|
testId: 'table_options',
|
|
94
|
-
|
|
100
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
101
|
+
icon: fg('platform-visual-refresh-icons') ? undefined : TableOptionsIcon,
|
|
102
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
103
|
+
iconBefore: fg('platform-visual-refresh-icons') ? CustomizeIcon : undefined,
|
|
95
104
|
title: formatMessage(messages.tableOptions),
|
|
96
105
|
hidden: options.every(option => option.hidden),
|
|
97
106
|
options,
|
|
@@ -411,7 +420,8 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
|
|
|
411
420
|
id: 'editor.table.delete',
|
|
412
421
|
type: 'button',
|
|
413
422
|
appearance: 'danger',
|
|
414
|
-
icon:
|
|
423
|
+
icon: DeleteIcon,
|
|
424
|
+
iconFallback: RemoveIcon,
|
|
415
425
|
onClick: deleteTableWithAnalytics(editorAnalyticsAPI),
|
|
416
426
|
disabled: !!resizeState && !!resizeState.dragging,
|
|
417
427
|
onMouseEnter: hoverTable(true),
|
|
@@ -477,7 +487,8 @@ const getColumnSettingItems = (editorState, editorView, {
|
|
|
477
487
|
id: 'editor.table.distributeColumns',
|
|
478
488
|
type: 'button',
|
|
479
489
|
title: formatMessage(messages.distributeColumns),
|
|
480
|
-
icon:
|
|
490
|
+
icon: TableColumnsDistributeIcon,
|
|
491
|
+
iconFallback: DistributeColumnIcon,
|
|
481
492
|
onClick: (state, dispatch, view) => getDistributeConfig(getEditorContainerWidth, api, editorAnalyticsAPI, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor)(state, dispatch, view),
|
|
482
493
|
disabled: !wouldChange
|
|
483
494
|
});
|
|
@@ -556,11 +567,21 @@ const getAlignmentOptionsConfig = (editorState, {
|
|
|
556
567
|
const alignmentIcons = [{
|
|
557
568
|
id: 'editor.table.alignLeft',
|
|
558
569
|
value: 'align-start',
|
|
559
|
-
icon:
|
|
570
|
+
icon: () => jsx(ContentAlignLeftIcon, {
|
|
571
|
+
color: "currentColor",
|
|
572
|
+
spacing: "spacious",
|
|
573
|
+
label: "table-align-start-icon",
|
|
574
|
+
LEGACY_fallbackIcon: EditorAlignImageLeft
|
|
575
|
+
})
|
|
560
576
|
}, {
|
|
561
577
|
id: 'editor.table.alignCenter',
|
|
562
578
|
value: 'center',
|
|
563
|
-
icon:
|
|
579
|
+
icon: () => jsx(ContentAlignCenterIcon, {
|
|
580
|
+
color: "currentColor",
|
|
581
|
+
spacing: "spacious",
|
|
582
|
+
label: "table-align-center-icon",
|
|
583
|
+
LEGACY_fallbackIcon: EditorAlignImageCenter
|
|
584
|
+
})
|
|
564
585
|
}];
|
|
565
586
|
|
|
566
587
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -21,11 +21,17 @@ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
21
21
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
22
22
|
import { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
|
|
23
23
|
import { findCellRectClosestToPos, findTable, getSelectionRect, isSelectionType, splitCell } from '@atlaskit/editor-tables/utils';
|
|
24
|
+
import ContentAlignCenterIcon from '@atlaskit/icon/core/content-align-center';
|
|
25
|
+
import ContentAlignLeftIcon from '@atlaskit/icon/core/content-align-left';
|
|
26
|
+
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
27
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
28
|
+
import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
|
|
24
29
|
import EditorAlignImageCenter from '@atlaskit/icon/glyph/editor/align-image-center';
|
|
25
30
|
import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
|
|
26
31
|
import DistributeColumnIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
|
|
27
32
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
28
33
|
import TableOptionsIcon from '@atlaskit/icon/glyph/preferences';
|
|
34
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
35
|
import { clearHoverSelection, hoverColumns, hoverMergedCells, hoverRows, hoverTable, removeDescendantNodes } from './commands';
|
|
30
36
|
import { deleteColumnsWithAnalytics, deleteRowsWithAnalytics, deleteTableWithAnalytics, distributeColumnsWidthsWithAnalytics, emptyMultipleCellsWithAnalytics, insertColumnWithAnalytics, insertRowWithAnalytics, mergeCellsWithAnalytics, setColorWithAnalytics, setTableAlignmentWithAnalytics, sortColumnWithAnalytics, splitCellWithAnalytics, toggleFixedColumnWidthsOptionAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics, wrapTableInExpandWithAnalytics } from './commands-with-analytics';
|
|
31
37
|
import { getPluginState } from './pm-plugins/plugin-factory';
|
|
@@ -96,7 +102,10 @@ export var getToolbarMenuConfig = function getToolbarMenuConfig(config, state, _
|
|
|
96
102
|
id: 'editor.table.tableOptions',
|
|
97
103
|
type: 'dropdown',
|
|
98
104
|
testId: 'table_options',
|
|
99
|
-
|
|
105
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
106
|
+
icon: fg('platform-visual-refresh-icons') ? undefined : TableOptionsIcon,
|
|
107
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
108
|
+
iconBefore: fg('platform-visual-refresh-icons') ? CustomizeIcon : undefined,
|
|
100
109
|
title: formatMessage(messages.tableOptions),
|
|
101
110
|
hidden: options.every(function (option) {
|
|
102
111
|
return option.hidden;
|
|
@@ -432,7 +441,8 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
|
|
|
432
441
|
id: 'editor.table.delete',
|
|
433
442
|
type: 'button',
|
|
434
443
|
appearance: 'danger',
|
|
435
|
-
icon:
|
|
444
|
+
icon: DeleteIcon,
|
|
445
|
+
iconFallback: RemoveIcon,
|
|
436
446
|
onClick: deleteTableWithAnalytics(editorAnalyticsAPI),
|
|
437
447
|
disabled: !!resizeState && !!resizeState.dragging,
|
|
438
448
|
onMouseEnter: hoverTable(true),
|
|
@@ -511,7 +521,8 @@ var getColumnSettingItems = function getColumnSettingItems(editorState, editorVi
|
|
|
511
521
|
id: 'editor.table.distributeColumns',
|
|
512
522
|
type: 'button',
|
|
513
523
|
title: formatMessage(messages.distributeColumns),
|
|
514
|
-
icon:
|
|
524
|
+
icon: TableColumnsDistributeIcon,
|
|
525
|
+
iconFallback: DistributeColumnIcon,
|
|
515
526
|
onClick: function onClick(state, dispatch, view) {
|
|
516
527
|
return getDistributeConfig(getEditorContainerWidth, api, editorAnalyticsAPI, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor)(state, dispatch, view);
|
|
517
528
|
},
|
|
@@ -595,11 +606,25 @@ var getAlignmentOptionsConfig = function getAlignmentOptionsConfig(editorState,
|
|
|
595
606
|
var alignmentIcons = [{
|
|
596
607
|
id: 'editor.table.alignLeft',
|
|
597
608
|
value: 'align-start',
|
|
598
|
-
icon:
|
|
609
|
+
icon: function icon() {
|
|
610
|
+
return jsx(ContentAlignLeftIcon, {
|
|
611
|
+
color: "currentColor",
|
|
612
|
+
spacing: "spacious",
|
|
613
|
+
label: "table-align-start-icon",
|
|
614
|
+
LEGACY_fallbackIcon: EditorAlignImageLeft
|
|
615
|
+
});
|
|
616
|
+
}
|
|
599
617
|
}, {
|
|
600
618
|
id: 'editor.table.alignCenter',
|
|
601
619
|
value: 'center',
|
|
602
|
-
icon:
|
|
620
|
+
icon: function icon() {
|
|
621
|
+
return jsx(ContentAlignCenterIcon, {
|
|
622
|
+
color: "currentColor",
|
|
623
|
+
spacing: "spacious",
|
|
624
|
+
label: "table-align-center-icon",
|
|
625
|
+
LEGACY_fallbackIcon: EditorAlignImageCenter
|
|
626
|
+
});
|
|
627
|
+
}
|
|
603
628
|
}];
|
|
604
629
|
|
|
605
630
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -68,13 +68,13 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
68
68
|
displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
|
|
69
69
|
};
|
|
70
70
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
71
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
71
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
72
72
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
73
73
|
commands: {
|
|
74
74
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
75
75
|
};
|
|
76
76
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
77
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
77
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
78
78
|
actions: {
|
|
79
79
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
80
80
|
};
|
|
@@ -89,6 +89,7 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
89
89
|
dependencies: any;
|
|
90
90
|
sharedState: any;
|
|
91
91
|
actions: any;
|
|
92
|
+
commands: any;
|
|
92
93
|
}, any>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
93
94
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
94
95
|
dependencies: [];
|
|
@@ -49,13 +49,13 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
49
49
|
displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
|
|
50
50
|
};
|
|
51
51
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
52
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
52
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
53
53
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
54
54
|
commands: {
|
|
55
55
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
56
56
|
};
|
|
57
57
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
58
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
58
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
59
59
|
actions: {
|
|
60
60
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
61
61
|
};
|
|
@@ -70,6 +70,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
70
70
|
dependencies: any;
|
|
71
71
|
sharedState: any;
|
|
72
72
|
actions: any;
|
|
73
|
+
commands: any;
|
|
73
74
|
}, any>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
74
75
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
75
76
|
dependencies: [];
|
|
@@ -135,13 +136,13 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
135
136
|
displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
|
|
136
137
|
};
|
|
137
138
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
138
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
139
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
139
140
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
140
141
|
commands: {
|
|
141
142
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
142
143
|
};
|
|
143
144
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
144
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
145
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
145
146
|
actions: {
|
|
146
147
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
147
148
|
};
|
|
@@ -156,6 +157,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
156
157
|
dependencies: any;
|
|
157
158
|
sharedState: any;
|
|
158
159
|
actions: any;
|
|
160
|
+
commands: any;
|
|
159
161
|
}, any>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
160
162
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
161
163
|
dependencies: [];
|
|
@@ -78,13 +78,13 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
78
78
|
displayGuideline: import("@atlaskit/editor-common/guideline").DisplayGuideline;
|
|
79
79
|
};
|
|
80
80
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
81
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
81
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
82
82
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
83
83
|
commands: {
|
|
84
84
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
85
85
|
};
|
|
86
86
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
87
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
87
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
88
88
|
actions: {
|
|
89
89
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
90
90
|
};
|
|
@@ -99,6 +99,7 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
99
99
|
dependencies: any;
|
|
100
100
|
sharedState: any;
|
|
101
101
|
actions: any;
|
|
102
|
+
commands: any;
|
|
102
103
|
}, any>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
103
104
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
104
105
|
dependencies: [];
|
|
@@ -81,13 +81,13 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
81
81
|
};
|
|
82
82
|
}, undefined>,
|
|
83
83
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
84
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
84
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
85
85
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
86
86
|
commands: {
|
|
87
87
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
88
88
|
};
|
|
89
89
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
90
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
90
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>,
|
|
91
91
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
92
92
|
actions: {
|
|
93
93
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
@@ -106,6 +106,7 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
|
|
|
106
106
|
dependencies: any;
|
|
107
107
|
sharedState: any;
|
|
108
108
|
actions: any;
|
|
109
|
+
commands: any;
|
|
109
110
|
}, any>>,
|
|
110
111
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
111
112
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -62,13 +62,13 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
62
62
|
};
|
|
63
63
|
}, undefined>,
|
|
64
64
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
65
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
65
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
66
66
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
67
67
|
commands: {
|
|
68
68
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
69
69
|
};
|
|
70
70
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
71
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
71
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>,
|
|
72
72
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
73
73
|
actions: {
|
|
74
74
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
@@ -87,6 +87,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
87
87
|
dependencies: any;
|
|
88
88
|
sharedState: any;
|
|
89
89
|
actions: any;
|
|
90
|
+
commands: any;
|
|
90
91
|
}, any>>,
|
|
91
92
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
92
93
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -169,13 +170,13 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
169
170
|
};
|
|
170
171
|
}, undefined>,
|
|
171
172
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
172
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
173
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
173
174
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
174
175
|
commands: {
|
|
175
176
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
176
177
|
};
|
|
177
178
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
178
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
179
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>,
|
|
179
180
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
180
181
|
actions: {
|
|
181
182
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
@@ -194,6 +195,7 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
194
195
|
dependencies: any;
|
|
195
196
|
sharedState: any;
|
|
196
197
|
actions: any;
|
|
198
|
+
commands: any;
|
|
197
199
|
}, any>>,
|
|
198
200
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
199
201
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
@@ -91,13 +91,13 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
91
91
|
};
|
|
92
92
|
}, undefined>,
|
|
93
93
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"selection", {
|
|
94
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-selection
|
|
94
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined;
|
|
95
95
|
actions: import("@atlaskit/editor-plugin-selection").EditorSelectionAPI;
|
|
96
96
|
commands: {
|
|
97
97
|
displayGapCursor: (toggle: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
98
98
|
};
|
|
99
99
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
100
|
-
}, import("@atlaskit/editor-plugin-selection
|
|
100
|
+
}, import("@atlaskit/editor-plugin-selection").SelectionPluginOptions | undefined>,
|
|
101
101
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"batchAttributeUpdates", {
|
|
102
102
|
actions: {
|
|
103
103
|
batchSteps: import("@atlaskit/editor-plugin-batch-attribute-updates").BatchStepsAction;
|
|
@@ -116,6 +116,7 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
116
116
|
dependencies: any;
|
|
117
117
|
sharedState: any;
|
|
118
118
|
actions: any;
|
|
119
|
+
commands: any;
|
|
119
120
|
}, any>>,
|
|
120
121
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
121
122
|
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.29.
|
|
3
|
+
"version": "7.29.2",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"runReact18": true
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^
|
|
30
|
+
"@atlaskit/adf-schema": "^42.0.2",
|
|
31
31
|
"@atlaskit/button": "^20.2.0",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.8.0",
|
|
33
|
-
"@atlaskit/editor-common": "^93.
|
|
33
|
+
"@atlaskit/editor-common": "^93.5.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.6.1",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
37
|
-
"@atlaskit/editor-plugin-batch-attribute-updates": "1.1.
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
|
+
"@atlaskit/editor-plugin-batch-attribute-updates": "1.1.1",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^1.9.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-guideline": "^1.2.0",
|
|
41
|
-
"@atlaskit/editor-plugin-selection": "^1.
|
|
41
|
+
"@atlaskit/editor-plugin-selection": "^1.5.0",
|
|
42
42
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
43
43
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^3.0.0",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.4.0",
|
|
51
51
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
52
52
|
"@atlaskit/primitives": "^12.2.0",
|
|
53
|
-
"@atlaskit/theme": "^13.
|
|
54
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
53
|
+
"@atlaskit/theme": "^13.1.0",
|
|
54
|
+
"@atlaskit/tmp-editor-statsig": "^2.5.0",
|
|
55
55
|
"@atlaskit/toggle": "^13.4.0",
|
|
56
56
|
"@atlaskit/tokens": "^2.0.0",
|
|
57
57
|
"@atlaskit/tooltip": "^18.8.0",
|
package/src/plugin.tsx
CHANGED
package/src/toolbar.tsx
CHANGED
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
FloatingToolbarItem,
|
|
24
24
|
GetEditorContainerWidth,
|
|
25
25
|
GetEditorFeatureFlags,
|
|
26
|
+
Icon,
|
|
26
27
|
} from '@atlaskit/editor-common/types';
|
|
27
28
|
import { cellBackgroundColorPalette, DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
28
29
|
import {
|
|
@@ -45,11 +46,17 @@ import {
|
|
|
45
46
|
isSelectionType,
|
|
46
47
|
splitCell,
|
|
47
48
|
} from '@atlaskit/editor-tables/utils';
|
|
49
|
+
import ContentAlignCenterIcon from '@atlaskit/icon/core/content-align-center';
|
|
50
|
+
import ContentAlignLeftIcon from '@atlaskit/icon/core/content-align-left';
|
|
51
|
+
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
52
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
53
|
+
import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
|
|
48
54
|
import EditorAlignImageCenter from '@atlaskit/icon/glyph/editor/align-image-center';
|
|
49
55
|
import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
|
|
50
56
|
import DistributeColumnIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
|
|
51
57
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
52
58
|
import TableOptionsIcon from '@atlaskit/icon/glyph/preferences';
|
|
59
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
53
60
|
|
|
54
61
|
import {
|
|
55
62
|
clearHoverSelection,
|
|
@@ -165,7 +172,10 @@ export const getToolbarMenuConfig = (
|
|
|
165
172
|
id: 'editor.table.tableOptions',
|
|
166
173
|
type: 'dropdown',
|
|
167
174
|
testId: 'table_options',
|
|
168
|
-
|
|
175
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
176
|
+
icon: fg('platform-visual-refresh-icons') ? undefined : TableOptionsIcon,
|
|
177
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
178
|
+
iconBefore: fg('platform-visual-refresh-icons') ? CustomizeIcon : undefined,
|
|
169
179
|
title: formatMessage(messages.tableOptions),
|
|
170
180
|
hidden: options.every((option) => option.hidden),
|
|
171
181
|
options,
|
|
@@ -636,7 +646,8 @@ export const getToolbarConfig =
|
|
|
636
646
|
id: 'editor.table.delete',
|
|
637
647
|
type: 'button',
|
|
638
648
|
appearance: 'danger',
|
|
639
|
-
icon:
|
|
649
|
+
icon: DeleteIcon,
|
|
650
|
+
iconFallback: RemoveIcon,
|
|
640
651
|
onClick: deleteTableWithAnalytics(editorAnalyticsAPI),
|
|
641
652
|
disabled: !!resizeState && !!resizeState.dragging,
|
|
642
653
|
onMouseEnter: hoverTable(true),
|
|
@@ -768,7 +779,8 @@ const getColumnSettingItems = (
|
|
|
768
779
|
id: 'editor.table.distributeColumns',
|
|
769
780
|
type: 'button',
|
|
770
781
|
title: formatMessage(messages.distributeColumns),
|
|
771
|
-
icon:
|
|
782
|
+
icon: TableColumnsDistributeIcon,
|
|
783
|
+
iconFallback: DistributeColumnIcon,
|
|
772
784
|
onClick: (state, dispatch, view) =>
|
|
773
785
|
getDistributeConfig(
|
|
774
786
|
getEditorContainerWidth,
|
|
@@ -873,7 +885,7 @@ const highlightColumnsHandler = (state: EditorState, dispatch?: CommandDispatch)
|
|
|
873
885
|
type AlignmentIcon = {
|
|
874
886
|
id?: string;
|
|
875
887
|
value: AlignmentOptions;
|
|
876
|
-
icon:
|
|
888
|
+
icon: Icon;
|
|
877
889
|
};
|
|
878
890
|
|
|
879
891
|
const getAlignmentOptionsConfig = (
|
|
@@ -897,12 +909,26 @@ const getAlignmentOptionsConfig = (
|
|
|
897
909
|
{
|
|
898
910
|
id: 'editor.table.alignLeft',
|
|
899
911
|
value: 'align-start',
|
|
900
|
-
icon:
|
|
912
|
+
icon: () => (
|
|
913
|
+
<ContentAlignLeftIcon
|
|
914
|
+
color="currentColor"
|
|
915
|
+
spacing="spacious"
|
|
916
|
+
label="table-align-start-icon"
|
|
917
|
+
LEGACY_fallbackIcon={EditorAlignImageLeft}
|
|
918
|
+
/>
|
|
919
|
+
),
|
|
901
920
|
},
|
|
902
921
|
{
|
|
903
922
|
id: 'editor.table.alignCenter',
|
|
904
923
|
value: 'center',
|
|
905
|
-
icon:
|
|
924
|
+
icon: () => (
|
|
925
|
+
<ContentAlignCenterIcon
|
|
926
|
+
color="currentColor"
|
|
927
|
+
spacing="spacious"
|
|
928
|
+
label="table-align-center-icon"
|
|
929
|
+
LEGACY_fallbackIcon={EditorAlignImageCenter}
|
|
930
|
+
/>
|
|
931
|
+
),
|
|
906
932
|
},
|
|
907
933
|
];
|
|
908
934
|
|