@atlaskit/editor-plugin-table 9.2.0 → 9.3.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/CHANGELOG.md +18 -0
- package/dist/cjs/nodeviews/TableCell.js +0 -2
- package/dist/cjs/nodeviews/TableContainer.js +13 -2
- package/dist/cjs/nodeviews/TableNodeViewBase.js +0 -2
- package/dist/cjs/nodeviews/TableResizer.js +5 -10
- package/dist/cjs/nodeviews/TableRow.js +0 -2
- package/dist/cjs/nodeviews/lazy-node-views.js +4 -16
- package/dist/cjs/nodeviews/table.js +2 -8
- package/dist/cjs/pm-plugins/commands/column-resize.js +1 -4
- package/dist/cjs/pm-plugins/commands/commands-with-analytics.js +4 -16
- package/dist/cjs/pm-plugins/commands/insert.js +4 -19
- package/dist/cjs/pm-plugins/commands/misc.js +3 -12
- package/dist/cjs/pm-plugins/decorations/plugin.js +1 -6
- package/dist/cjs/pm-plugins/decorations/utils/column-resizing.js +1 -4
- package/dist/cjs/pm-plugins/drag-and-drop/commands-with-analytics.js +3 -12
- package/dist/cjs/pm-plugins/drag-and-drop/commands.js +3 -12
- package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +1 -4
- package/dist/cjs/pm-plugins/keymap.js +0 -2
- package/dist/cjs/pm-plugins/main.js +1 -6
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +1 -4
- package/dist/cjs/pm-plugins/table-resizing/plugin.js +0 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +1 -7
- package/dist/cjs/pm-plugins/table-resizing/utils/column-state.js +1 -4
- package/dist/cjs/pm-plugins/table-resizing/utils/content-width.js +0 -8
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-logic.js +2 -10
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +1 -4
- package/dist/cjs/pm-plugins/table-width.js +1 -6
- package/dist/cjs/pm-plugins/transforms/column-width.js +1 -4
- package/dist/cjs/pm-plugins/transforms/fix-tables.js +3 -15
- package/dist/cjs/pm-plugins/transforms/replace-table.js +1 -4
- package/dist/cjs/pm-plugins/transforms/split.js +0 -2
- package/dist/cjs/pm-plugins/utils/alignment.js +1 -4
- package/dist/cjs/pm-plugins/utils/decoration.js +4 -16
- package/dist/cjs/pm-plugins/utils/drag-menu.js +1 -4
- package/dist/cjs/pm-plugins/utils/nodes.js +0 -3
- package/dist/cjs/pm-plugins/utils/paste.js +4 -0
- package/dist/cjs/pm-plugins/utils/row-controls.js +1 -4
- package/dist/cjs/tablePlugin.js +12 -10
- package/dist/cjs/ui/FloatingInsertButton/getPopupOptions.js +0 -6
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -4
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +1 -4
- package/dist/cjs/ui/TableFloatingControls/index.js +1 -4
- package/dist/cjs/ui/toolbar.js +3 -12
- package/dist/es2019/nodeviews/TableCell.js +0 -2
- package/dist/es2019/nodeviews/TableContainer.js +13 -2
- package/dist/es2019/nodeviews/TableNodeViewBase.js +0 -2
- package/dist/es2019/nodeviews/TableResizer.js +5 -10
- package/dist/es2019/nodeviews/TableRow.js +0 -2
- package/dist/es2019/nodeviews/lazy-node-views.js +4 -16
- package/dist/es2019/nodeviews/table.js +2 -8
- package/dist/es2019/pm-plugins/commands/column-resize.js +1 -4
- package/dist/es2019/pm-plugins/commands/commands-with-analytics.js +6 -24
- package/dist/es2019/pm-plugins/commands/delete.js +1 -4
- package/dist/es2019/pm-plugins/commands/insert.js +5 -23
- package/dist/es2019/pm-plugins/commands/misc.js +3 -12
- package/dist/es2019/pm-plugins/decorations/plugin.js +1 -6
- package/dist/es2019/pm-plugins/decorations/utils/column-resizing.js +1 -4
- package/dist/es2019/pm-plugins/drag-and-drop/commands-with-analytics.js +3 -12
- package/dist/es2019/pm-plugins/drag-and-drop/commands.js +4 -16
- package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +2 -8
- package/dist/es2019/pm-plugins/keymap.js +0 -3
- package/dist/es2019/pm-plugins/main.js +1 -6
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +1 -4
- package/dist/es2019/pm-plugins/table-resizing/plugin.js +0 -3
- package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +2 -11
- package/dist/es2019/pm-plugins/table-resizing/utils/column-state.js +1 -4
- package/dist/es2019/pm-plugins/table-resizing/utils/content-width.js +0 -8
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +1 -4
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-logic.js +2 -10
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +2 -8
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +4 -16
- package/dist/es2019/pm-plugins/table-width.js +1 -6
- package/dist/es2019/pm-plugins/transforms/column-width.js +2 -8
- package/dist/es2019/pm-plugins/transforms/delete-columns.js +1 -4
- package/dist/es2019/pm-plugins/transforms/fix-tables.js +3 -15
- package/dist/es2019/pm-plugins/transforms/replace-table.js +1 -4
- package/dist/es2019/pm-plugins/transforms/split.js +0 -2
- package/dist/es2019/pm-plugins/utils/alignment.js +1 -4
- package/dist/es2019/pm-plugins/utils/decoration.js +4 -16
- package/dist/es2019/pm-plugins/utils/drag-menu.js +2 -8
- package/dist/es2019/pm-plugins/utils/nodes.js +0 -3
- package/dist/es2019/pm-plugins/utils/paste.js +5 -4
- package/dist/es2019/pm-plugins/utils/row-controls.js +1 -4
- package/dist/es2019/pm-plugins/utils/snapping.js +1 -4
- package/dist/es2019/tablePlugin.js +12 -10
- package/dist/es2019/ui/FloatingInsertButton/getPopupOptions.js +0 -6
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -4
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +1 -4
- package/dist/es2019/ui/TableFloatingControls/index.js +1 -5
- package/dist/es2019/ui/event-handlers.js +1 -4
- package/dist/es2019/ui/toolbar.js +9 -36
- package/dist/esm/nodeviews/TableCell.js +0 -2
- package/dist/esm/nodeviews/TableContainer.js +13 -2
- package/dist/esm/nodeviews/TableNodeViewBase.js +0 -2
- package/dist/esm/nodeviews/TableResizer.js +5 -10
- package/dist/esm/nodeviews/TableRow.js +0 -2
- package/dist/esm/nodeviews/lazy-node-views.js +4 -16
- package/dist/esm/nodeviews/table.js +2 -8
- package/dist/esm/pm-plugins/commands/column-resize.js +1 -4
- package/dist/esm/pm-plugins/commands/commands-with-analytics.js +4 -16
- package/dist/esm/pm-plugins/commands/insert.js +4 -19
- package/dist/esm/pm-plugins/commands/misc.js +3 -12
- package/dist/esm/pm-plugins/decorations/plugin.js +1 -6
- package/dist/esm/pm-plugins/decorations/utils/column-resizing.js +1 -4
- package/dist/esm/pm-plugins/drag-and-drop/commands-with-analytics.js +3 -12
- package/dist/esm/pm-plugins/drag-and-drop/commands.js +3 -12
- package/dist/esm/pm-plugins/drag-and-drop/plugin.js +1 -4
- package/dist/esm/pm-plugins/keymap.js +0 -3
- package/dist/esm/pm-plugins/main.js +1 -6
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +1 -4
- package/dist/esm/pm-plugins/table-resizing/plugin.js +0 -3
- package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +1 -7
- package/dist/esm/pm-plugins/table-resizing/utils/column-state.js +1 -4
- package/dist/esm/pm-plugins/table-resizing/utils/content-width.js +0 -8
- package/dist/esm/pm-plugins/table-resizing/utils/resize-logic.js +2 -10
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +1 -4
- package/dist/esm/pm-plugins/table-width.js +1 -6
- package/dist/esm/pm-plugins/transforms/column-width.js +1 -4
- package/dist/esm/pm-plugins/transforms/fix-tables.js +3 -15
- package/dist/esm/pm-plugins/transforms/replace-table.js +1 -4
- package/dist/esm/pm-plugins/transforms/split.js +0 -2
- package/dist/esm/pm-plugins/utils/alignment.js +1 -4
- package/dist/esm/pm-plugins/utils/decoration.js +4 -16
- package/dist/esm/pm-plugins/utils/drag-menu.js +1 -4
- package/dist/esm/pm-plugins/utils/nodes.js +0 -3
- package/dist/esm/pm-plugins/utils/paste.js +4 -0
- package/dist/esm/pm-plugins/utils/row-controls.js +1 -4
- package/dist/esm/tablePlugin.js +12 -10
- package/dist/esm/ui/FloatingInsertButton/getPopupOptions.js +0 -6
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -4
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +1 -4
- package/dist/esm/ui/TableFloatingControls/index.js +1 -4
- package/dist/esm/ui/toolbar.js +3 -12
- package/dist/types/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
- package/package.json +11 -5
- package/src/nodeviews/TableCell.ts +0 -2
- package/src/nodeviews/TableComponent.tsx +1 -1
- package/src/nodeviews/TableContainer.tsx +12 -1
- package/src/nodeviews/TableNodeViewBase.ts +0 -2
- package/src/nodeviews/TableResizer.tsx +9 -5
- package/src/nodeviews/TableRow.ts +0 -2
- package/src/nodeviews/lazy-node-views.ts +0 -8
- package/src/nodeviews/table.tsx +0 -4
- package/src/pm-plugins/commands/column-resize.ts +0 -2
- package/src/pm-plugins/commands/commands-with-analytics.ts +0 -12
- package/src/pm-plugins/commands/delete.ts +0 -2
- package/src/pm-plugins/commands/insert.ts +0 -12
- package/src/pm-plugins/commands/misc.ts +0 -6
- package/src/pm-plugins/decorations/plugin.ts +0 -4
- package/src/pm-plugins/decorations/utils/column-resizing.ts +0 -2
- package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +0 -6
- package/src/pm-plugins/drag-and-drop/commands.ts +0 -8
- package/src/pm-plugins/drag-and-drop/plugin.ts +0 -4
- package/src/pm-plugins/keymap.ts +0 -2
- package/src/pm-plugins/main.ts +0 -4
- package/src/pm-plugins/table-resizing/event-handlers.ts +0 -2
- package/src/pm-plugins/table-resizing/plugin.ts +0 -2
- package/src/pm-plugins/table-resizing/utils/colgroup.ts +0 -6
- package/src/pm-plugins/table-resizing/utils/column-state.ts +0 -2
- package/src/pm-plugins/table-resizing/utils/content-width.ts +0 -6
- package/src/pm-plugins/table-resizing/utils/resize-column.ts +0 -2
- package/src/pm-plugins/table-resizing/utils/resize-logic.ts +0 -6
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +0 -4
- package/src/pm-plugins/table-resizing/utils/scale-table.ts +0 -8
- package/src/pm-plugins/table-width.ts +0 -4
- package/src/pm-plugins/transforms/column-width.ts +0 -4
- package/src/pm-plugins/transforms/delete-columns.ts +0 -2
- package/src/pm-plugins/transforms/fix-tables.ts +0 -8
- package/src/pm-plugins/transforms/replace-table.ts +0 -2
- package/src/pm-plugins/transforms/split.ts +0 -2
- package/src/pm-plugins/utils/alignment.ts +0 -2
- package/src/pm-plugins/utils/decoration.ts +0 -8
- package/src/pm-plugins/utils/drag-menu.ts +0 -4
- package/src/pm-plugins/utils/nodes.ts +0 -2
- package/src/pm-plugins/utils/paste.ts +4 -2
- package/src/pm-plugins/utils/row-controls.ts +0 -2
- package/src/pm-plugins/utils/snapping.ts +0 -2
- package/src/tablePlugin.tsx +7 -2
- package/src/ui/FloatingInsertButton/getPopupOptions.ts +0 -4
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +1 -3
- package/src/ui/TableFloatingColumnControls/index.tsx +1 -1
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +0 -2
- package/src/ui/TableFloatingControls/index.tsx +1 -5
- package/src/ui/event-handlers.ts +0 -2
- package/src/ui/toolbar.tsx +0 -18
|
@@ -92,8 +92,6 @@ export const getRowClassNames = (
|
|
|
92
92
|
hoveredRows: number[] = [],
|
|
93
93
|
isInDanger?: boolean,
|
|
94
94
|
isResizing?: boolean,
|
|
95
|
-
// Ignored via go/ees005
|
|
96
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
97
95
|
): string => {
|
|
98
96
|
const classNames: string[] = [];
|
|
99
97
|
if (isRowSelected(index)(selection) || (hoveredRows.indexOf(index) > -1 && !isResizing)) {
|
|
@@ -91,8 +91,6 @@ export const findClosestSnap = (
|
|
|
91
91
|
guidelines: GuidelineConfig[],
|
|
92
92
|
snapGap: number = 0,
|
|
93
93
|
tolerance: number = 0,
|
|
94
|
-
// Ignored via go/ees005
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
96
94
|
) => {
|
|
97
95
|
const closestGapIndex = snapWidths.reduce(
|
|
98
96
|
(prev, curr, index) =>
|
package/src/tablePlugin.tsx
CHANGED
|
@@ -148,7 +148,10 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
148
148
|
insertTable:
|
|
149
149
|
(analyticsPayload): Command =>
|
|
150
150
|
(state, dispatch) => {
|
|
151
|
-
if (
|
|
151
|
+
if (
|
|
152
|
+
options?.tableOptions?.allowNestedTables &&
|
|
153
|
+
fg('platform_editor_use_nested_table_pm_nodes')
|
|
154
|
+
) {
|
|
152
155
|
return editorCommandToPMCommand(
|
|
153
156
|
insertTableWithNestingSupport(
|
|
154
157
|
{
|
|
@@ -235,7 +238,8 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
235
238
|
nodes() {
|
|
236
239
|
const { allowColumnResizing } = pluginConfig(options?.tableOptions);
|
|
237
240
|
// TODO: ED-25901 - We need to move this into a plugin config option so we don't accidentally enable nested nodes in Jira
|
|
238
|
-
const isNestingSupported =
|
|
241
|
+
const isNestingSupported =
|
|
242
|
+
options?.tableOptions?.allowNestedTables && fg('platform_editor_use_nested_table_pm_nodes');
|
|
239
243
|
|
|
240
244
|
return isNestingSupported
|
|
241
245
|
? [
|
|
@@ -716,6 +720,7 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
716
720
|
// If the cursor is inside a table
|
|
717
721
|
if (
|
|
718
722
|
hasParentNodeOfType(state.schema.nodes.table)(state.selection) &&
|
|
723
|
+
options?.tableOptions?.allowNestedTables &&
|
|
719
724
|
fg('platform_editor_use_nested_table_pm_nodes')
|
|
720
725
|
) {
|
|
721
726
|
// If the experiment is disabled, or we're trying to nest deeper than one level, we insert the table after the top table
|
|
@@ -54,8 +54,6 @@ function getRowOptions(index: number, isDragAndDropEnabled: boolean): Partial<Po
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
// Ignored via go/ees005
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
59
57
|
function getColumnOptions(
|
|
60
58
|
index: number,
|
|
61
59
|
tableContainer: HTMLElement | null,
|
|
@@ -113,8 +111,6 @@ function getColumnOptions(
|
|
|
113
111
|
return options;
|
|
114
112
|
}
|
|
115
113
|
|
|
116
|
-
// Ignored via go/ees005
|
|
117
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
118
114
|
function getPopupOptions(
|
|
119
115
|
direction: TableDirection,
|
|
120
116
|
index: number,
|
|
@@ -97,7 +97,7 @@ export const ColumnControls = ({
|
|
|
97
97
|
const hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
98
98
|
|
|
99
99
|
const rowControlStickyTop = fg('platform_editor_breakout_use_css') ? 45 : rowHeights?.[0];
|
|
100
|
-
const marginTop = hasHeaderRow && stickyTop !== undefined ?
|
|
100
|
+
const marginTop = hasHeaderRow && stickyTop !== undefined ? rowControlStickyTop ?? 0 : 0;
|
|
101
101
|
|
|
102
102
|
const handleClick = useCallback(
|
|
103
103
|
(event: MouseEvent) => {
|
|
@@ -195,8 +195,6 @@ export const ColumnControls = ({
|
|
|
195
195
|
appearance: DragHandleAppearance,
|
|
196
196
|
gridColumn: string,
|
|
197
197
|
indexes: number[],
|
|
198
|
-
// Ignored via go/ees005
|
|
199
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
200
198
|
) => {
|
|
201
199
|
const isHover = type === 'hover';
|
|
202
200
|
const isPlaceholder = appearance === 'placeholder';
|
|
@@ -101,7 +101,7 @@ const TableFloatingColumnControls = ({
|
|
|
101
101
|
|
|
102
102
|
if (stickyTop) {
|
|
103
103
|
const columnControlTopOffsetFromParent = '-12px';
|
|
104
|
-
const headerRowHeight = hasHeaderRow && stickyTop !== undefined ?
|
|
104
|
+
const headerRowHeight = hasHeaderRow && stickyTop !== undefined ? rowHeights?.[0] ?? 0 : 0;
|
|
105
105
|
containerRef?.current?.style.setProperty(
|
|
106
106
|
'top',
|
|
107
107
|
fg('platform_editor_breakout_use_css')
|
|
@@ -184,8 +184,6 @@ export const DragControls = ({
|
|
|
184
184
|
appearance: DragHandleAppearance,
|
|
185
185
|
gridRow: string,
|
|
186
186
|
indexes: number[],
|
|
187
|
-
// Ignored via go/ees005
|
|
188
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
189
187
|
) => {
|
|
190
188
|
const isHover = type === 'hover';
|
|
191
189
|
|
|
@@ -2,7 +2,6 @@ import React, { useCallback } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { TableColumnOrdering } from '@atlaskit/custom-steps';
|
|
4
4
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
5
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
6
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
7
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -125,8 +124,6 @@ export const TableFloatingControls = ({
|
|
|
125
124
|
[editorView, tableActive],
|
|
126
125
|
);
|
|
127
126
|
|
|
128
|
-
const { featureFlagsState } = useSharedPluginState(api, ['featureFlags']);
|
|
129
|
-
|
|
130
127
|
if (!tableRef) {
|
|
131
128
|
return null;
|
|
132
129
|
}
|
|
@@ -144,8 +141,7 @@ export const TableFloatingControls = ({
|
|
|
144
141
|
// Ignored via go/ees005
|
|
145
142
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
146
143
|
const isNested = tablePos !== undefined && isTableNested(editorView.state, tablePos!);
|
|
147
|
-
const shouldShowCornerControls =
|
|
148
|
-
!featureFlagsState?.elementDragAndDrop || (isNested && !editorExperiment('nested-dnd', true));
|
|
144
|
+
const shouldShowCornerControls = isNested && !editorExperiment('nested-dnd', true);
|
|
149
145
|
|
|
150
146
|
return (
|
|
151
147
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
package/src/ui/event-handlers.ts
CHANGED
|
@@ -507,8 +507,6 @@ export const handleCut = (
|
|
|
507
507
|
isTableScalingEnabled = false,
|
|
508
508
|
isTableFixedColumnWidthsOptionEnabled = false,
|
|
509
509
|
shouldUseIncreasedScalingPercent = false,
|
|
510
|
-
// Ignored via go/ees005
|
|
511
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
512
510
|
): Transaction => {
|
|
513
511
|
const oldSelection = oldState.tr.selection;
|
|
514
512
|
let { tr } = newState;
|
package/src/ui/toolbar.tsx
CHANGED
|
@@ -115,8 +115,6 @@ export const getToolbarMenuConfig = (
|
|
|
115
115
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
116
116
|
isTableScalingWithFixedColumnWidthsOptionShown = false,
|
|
117
117
|
areTableColumnWidthsFixed = false,
|
|
118
|
-
// Ignored via go/ees005
|
|
119
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
120
118
|
): FloatingToolbarItem<Command> => {
|
|
121
119
|
const optionItem: typeOption = 'item-checkbox';
|
|
122
120
|
|
|
@@ -209,8 +207,6 @@ export const getToolbarCellOptionsConfig = (
|
|
|
209
207
|
isTableFixedColumnWidthsOptionEnabled = false,
|
|
210
208
|
shouldUseIncreasedScalingPercent = false,
|
|
211
209
|
isCommentEditor = false,
|
|
212
|
-
// Ignored via go/ees005
|
|
213
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
214
210
|
): FloatingToolbarDropdown<Command> => {
|
|
215
211
|
const { top, bottom, right, left } = initialSelectionRect;
|
|
216
212
|
const numberOfColumns = right - left;
|
|
@@ -487,8 +483,6 @@ export const getToolbarConfig =
|
|
|
487
483
|
options?: TablePluginOptions,
|
|
488
484
|
isTableFixedColumnWidthsOptionEnabled = false,
|
|
489
485
|
shouldUseIncreasedScalingPercent = false,
|
|
490
|
-
// Ignored via go/ees005
|
|
491
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
492
486
|
) =>
|
|
493
487
|
(config: PluginConfig): FloatingToolbarHandler =>
|
|
494
488
|
(state, intl) => {
|
|
@@ -678,8 +672,6 @@ const getCellItems = (
|
|
|
678
672
|
isTableFixedColumnWidthsOptionEnabled = false,
|
|
679
673
|
shouldUseIncreasedScalingPercent = false,
|
|
680
674
|
isCommentEditor = false,
|
|
681
|
-
// Ignored via go/ees005
|
|
682
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
683
675
|
): Array<FloatingToolbarItem<Command>> => {
|
|
684
676
|
const initialSelectionRect = getClosestSelectionRect(state);
|
|
685
677
|
if (initialSelectionRect) {
|
|
@@ -711,8 +703,6 @@ const getDistributeConfig =
|
|
|
711
703
|
isTableScalingEnabled = false,
|
|
712
704
|
isTableFixedColumnWidthsOptionEnabled = false,
|
|
713
705
|
isCommentEditor = false,
|
|
714
|
-
// Ignored via go/ees005
|
|
715
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
716
706
|
): Command =>
|
|
717
707
|
(state, dispatch, editorView) => {
|
|
718
708
|
const selectionOrTableRect = getClosestSelectionOrTableRect(state);
|
|
@@ -752,8 +742,6 @@ const getColumnSettingItems = (
|
|
|
752
742
|
isTableScalingEnabled = false,
|
|
753
743
|
isTableFixedColumnWidthsOptionEnabled = false,
|
|
754
744
|
isCommentEditor = false,
|
|
755
|
-
// Ignored via go/ees005
|
|
756
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
757
745
|
): Array<FloatingToolbarItem<Command>> => {
|
|
758
746
|
const pluginState = getPluginState(editorState);
|
|
759
747
|
const selectionOrTableRect = getClosestSelectionOrTableRect(editorState);
|
|
@@ -809,8 +797,6 @@ const getColorPicker = (
|
|
|
809
797
|
{ formatMessage }: ToolbarMenuContext,
|
|
810
798
|
editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined,
|
|
811
799
|
getEditorView: () => EditorView | null,
|
|
812
|
-
// Ignored via go/ees005
|
|
813
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
814
800
|
): Array<FloatingToolbarItem<Command>> => {
|
|
815
801
|
const { targetCellPosition, pluginConfig } = getPluginState(state);
|
|
816
802
|
if (!pluginConfig.allowBackgroundColor) {
|
|
@@ -902,8 +888,6 @@ const getAlignmentOptionsConfig = (
|
|
|
902
888
|
shouldUseIncreasedScalingPercent: boolean,
|
|
903
889
|
isFullWidthEditor?: boolean,
|
|
904
890
|
isCommentEditor?: boolean,
|
|
905
|
-
// Ignored via go/ees005
|
|
906
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
907
891
|
): Array<FloatingToolbarDropdown<Command>> => {
|
|
908
892
|
const tableObject = findTable(editorState.selection);
|
|
909
893
|
|
|
@@ -1017,8 +1001,6 @@ const isLayoutOptionDisabled = (
|
|
|
1017
1001
|
editorView: EditorView | null,
|
|
1018
1002
|
shouldUseIncreasedScalingPercent: boolean,
|
|
1019
1003
|
isFullWidthEditor: boolean | undefined,
|
|
1020
|
-
// Ignored via go/ees005
|
|
1021
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
1022
1004
|
) => {
|
|
1023
1005
|
const { lineLength } = getEditorContainerWidth();
|
|
1024
1006
|
let tableContainerWidth = getTableContainerWidth(selectedNode);
|