@atlaskit/editor-plugin-table 7.16.11 → 7.16.13
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/.eslintrc.js +3 -3
- package/CHANGELOG.md +16 -0
- package/dist/cjs/commands/misc.js +3 -3
- package/dist/cjs/nodeviews/TableCell.js +10 -10
- package/dist/cjs/nodeviews/TableContainer.js +83 -27
- package/dist/cjs/nodeviews/TableResizer.js +40 -19
- package/dist/cjs/nodeviews/TableRow.js +23 -23
- package/dist/cjs/pm-plugins/table-resizing/plugin.js +3 -3
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +4 -4
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/cjs/ui/FloatingDragMenu/styles.js +1 -1
- package/dist/cjs/ui/common-styles.js +13 -13
- package/dist/cjs/ui/ui-styles.js +25 -25
- package/dist/cjs/utils/guidelines.js +7 -4
- package/dist/cjs/utils/merged-cells.js +3 -3
- package/dist/cjs/utils/snapping.js +7 -8
- package/dist/es2019/commands/misc.js +3 -3
- package/dist/es2019/nodeviews/TableContainer.js +70 -9
- package/dist/es2019/nodeviews/TableResizer.js +42 -21
- package/dist/es2019/nodeviews/TableRow.js +21 -21
- package/dist/es2019/pm-plugins/table-resizing/plugin.js +3 -3
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +4 -4
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +47 -47
- package/dist/es2019/ui/FloatingDragMenu/styles.js +30 -30
- package/dist/es2019/ui/common-styles.js +802 -816
- package/dist/es2019/ui/ui-styles.js +665 -678
- package/dist/es2019/utils/guidelines.js +5 -2
- package/dist/es2019/utils/merged-cells.js +3 -3
- package/dist/es2019/utils/snapping.js +5 -6
- package/dist/esm/commands/misc.js +3 -3
- package/dist/esm/nodeviews/TableCell.js +10 -10
- package/dist/esm/nodeviews/TableContainer.js +85 -29
- package/dist/esm/nodeviews/TableResizer.js +42 -21
- package/dist/esm/nodeviews/TableRow.js +23 -23
- package/dist/esm/pm-plugins/table-resizing/plugin.js +3 -3
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +4 -4
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/esm/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/esm/ui/FloatingDragMenu/styles.js +1 -1
- package/dist/esm/ui/common-styles.js +13 -13
- package/dist/esm/ui/ui-styles.js +25 -25
- package/dist/esm/utils/guidelines.js +6 -3
- package/dist/esm/utils/merged-cells.js +3 -3
- package/dist/esm/utils/snapping.js +6 -7
- package/dist/types/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types/pm-plugins/decorations/utils/index.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/index.d.ts +1 -1
- package/dist/types/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
- package/dist/types/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
- package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
- package/dist/types/utils/guidelines.d.ts +2 -1
- package/dist/types/utils/snapping.d.ts +3 -2
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/decorations/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
- package/dist/types-ts4.5/utils/guidelines.d.ts +2 -1
- package/dist/types-ts4.5/utils/snapping.d.ts +3 -2
- package/docs/0-intro.tsx +9 -7
- package/package.json +3 -3
- package/report.api.md +67 -66
- package/src/commands/clear.ts +36 -44
- package/src/commands/collapse.ts +8 -8
- package/src/commands/column-resize.ts +412 -452
- package/src/commands/delete.ts +14 -14
- package/src/commands/display-mode.ts +10 -11
- package/src/commands/go-to-next-cell.ts +48 -54
- package/src/commands/hover.ts +210 -227
- package/src/commands/index.ts +35 -35
- package/src/commands/insert.ts +208 -235
- package/src/commands/misc.ts +655 -748
- package/src/commands/referentiality.ts +9 -9
- package/src/commands/selection.ts +433 -563
- package/src/commands/sort.ts +68 -86
- package/src/commands/split-cell.ts +14 -14
- package/src/commands/toggle.ts +69 -67
- package/src/commands-with-analytics.ts +570 -639
- package/src/create-plugin-config.ts +13 -13
- package/src/event-handlers.ts +513 -612
- package/src/handlers.ts +120 -133
- package/src/nodeviews/ExternalDropTargets.tsx +68 -73
- package/src/nodeviews/OverflowShadowsObserver.ts +148 -157
- package/src/nodeviews/TableCell.ts +47 -54
- package/src/nodeviews/TableComponent.tsx +1018 -1112
- package/src/nodeviews/TableComponentWithSharedState.tsx +91 -94
- package/src/nodeviews/TableContainer.tsx +384 -340
- package/src/nodeviews/TableNodeViewBase.ts +19 -24
- package/src/nodeviews/TableResizer.tsx +642 -653
- package/src/nodeviews/TableRow.ts +580 -629
- package/src/nodeviews/TableStickyScrollbar.ts +173 -190
- package/src/nodeviews/__mocks__/OverflowShadowsObserver.ts +8 -8
- package/src/nodeviews/__mocks__/OverridableMock.ts +14 -15
- package/src/nodeviews/table.tsx +345 -375
- package/src/nodeviews/types.ts +21 -24
- package/src/nodeviews/update-overflow-shadows.ts +8 -14
- package/src/plugin.tsx +578 -603
- package/src/pm-plugins/analytics/actions.ts +10 -12
- package/src/pm-plugins/analytics/commands.ts +31 -37
- package/src/pm-plugins/analytics/plugin-factory.ts +4 -2
- package/src/pm-plugins/analytics/plugin-key.ts +1 -3
- package/src/pm-plugins/analytics/plugin.ts +60 -70
- package/src/pm-plugins/analytics/reducer.ts +19 -19
- package/src/pm-plugins/analytics/types.ts +10 -10
- package/src/pm-plugins/analytics/utils/moved-event.ts +38 -38
- package/src/pm-plugins/decorations/plugin.ts +58 -77
- package/src/pm-plugins/decorations/utils/column-controls.ts +59 -71
- package/src/pm-plugins/decorations/utils/column-resizing.ts +50 -57
- package/src/pm-plugins/decorations/utils/compose-decorations.ts +6 -6
- package/src/pm-plugins/decorations/utils/index.ts +3 -6
- package/src/pm-plugins/decorations/utils/types.ts +7 -12
- package/src/pm-plugins/default-table-selection.ts +3 -3
- package/src/pm-plugins/drag-and-drop/actions.ts +25 -25
- package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +158 -190
- package/src/pm-plugins/drag-and-drop/commands.ts +154 -170
- package/src/pm-plugins/drag-and-drop/consts.ts +4 -5
- package/src/pm-plugins/drag-and-drop/plugin-factory.ts +23 -20
- package/src/pm-plugins/drag-and-drop/plugin-key.ts +1 -3
- package/src/pm-plugins/drag-and-drop/plugin.ts +329 -383
- package/src/pm-plugins/drag-and-drop/reducer.ts +30 -30
- package/src/pm-plugins/drag-and-drop/types.ts +8 -8
- package/src/pm-plugins/drag-and-drop/utils/autoscrollers.ts +38 -41
- package/src/pm-plugins/drag-and-drop/utils/getDragBehaviour.ts +3 -6
- package/src/pm-plugins/drag-and-drop/utils/monitor.ts +57 -70
- package/src/pm-plugins/keymap.ts +208 -220
- package/src/pm-plugins/main.ts +348 -400
- package/src/pm-plugins/plugin-factory.ts +32 -34
- package/src/pm-plugins/safari-delete-composition-text-issue-workaround.ts +83 -97
- package/src/pm-plugins/sticky-headers/commands.ts +2 -6
- package/src/pm-plugins/sticky-headers/plugin-key.ts +1 -3
- package/src/pm-plugins/sticky-headers/plugin-state.ts +41 -44
- package/src/pm-plugins/sticky-headers/plugin.ts +4 -4
- package/src/pm-plugins/sticky-headers/types.ts +8 -8
- package/src/pm-plugins/sticky-headers/util.ts +10 -10
- package/src/pm-plugins/table-analytics.ts +70 -72
- package/src/pm-plugins/table-local-id.ts +180 -184
- package/src/pm-plugins/table-resizing/commands.ts +72 -85
- package/src/pm-plugins/table-resizing/event-handlers.ts +298 -317
- package/src/pm-plugins/table-resizing/plugin-factory.ts +10 -10
- package/src/pm-plugins/table-resizing/plugin-key.ts +1 -3
- package/src/pm-plugins/table-resizing/plugin.ts +61 -68
- package/src/pm-plugins/table-resizing/reducer.ts +30 -33
- package/src/pm-plugins/table-resizing/utils/colgroup.ts +84 -84
- package/src/pm-plugins/table-resizing/utils/column-state.ts +78 -81
- package/src/pm-plugins/table-resizing/utils/content-width.ts +94 -114
- package/src/pm-plugins/table-resizing/utils/dom.ts +93 -110
- package/src/pm-plugins/table-resizing/utils/index.ts +29 -34
- package/src/pm-plugins/table-resizing/utils/misc.ts +94 -119
- package/src/pm-plugins/table-resizing/utils/resize-column.ts +93 -106
- package/src/pm-plugins/table-resizing/utils/resize-logic.ts +240 -257
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +343 -372
- package/src/pm-plugins/table-resizing/utils/scale-table.ts +202 -207
- package/src/pm-plugins/table-resizing/utils/types.ts +17 -17
- package/src/pm-plugins/table-resizing/utils/unit-to-number.ts +1 -2
- package/src/pm-plugins/table-selection-keymap.ts +25 -51
- package/src/pm-plugins/table-width.ts +191 -204
- package/src/pm-plugins/view-mode-sort/index.ts +223 -227
- package/src/pm-plugins/view-mode-sort/plugin-key.ts +3 -2
- package/src/pm-plugins/view-mode-sort/types.ts +12 -12
- package/src/pm-plugins/view-mode-sort/utils.ts +108 -117
- package/src/reducer.ts +139 -155
- package/src/toolbar.tsx +815 -905
- package/src/transforms/column-width.ts +186 -213
- package/src/transforms/delete-columns.ts +208 -222
- package/src/transforms/delete-rows.ts +117 -121
- package/src/transforms/fix-tables.ts +190 -215
- package/src/transforms/merge.ts +263 -269
- package/src/transforms/replace-table.ts +27 -43
- package/src/transforms/split.ts +65 -75
- package/src/types.ts +421 -427
- package/src/ui/ColumnResizeWidget/index.tsx +40 -47
- package/src/ui/DragHandle/HandleIconComponent.tsx +9 -13
- package/src/ui/DragHandle/index.tsx +221 -250
- package/src/ui/DragPreview/index.tsx +35 -35
- package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +33 -41
- package/src/ui/FloatingContextualButton/FixedButton.tsx +154 -157
- package/src/ui/FloatingContextualButton/index.tsx +109 -115
- package/src/ui/FloatingContextualButton/styles.ts +43 -46
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +634 -694
- package/src/ui/FloatingContextualMenu/index.tsx +83 -101
- package/src/ui/FloatingContextualMenu/styles.ts +57 -65
- package/src/ui/FloatingDeleteButton/DeleteButton.tsx +37 -37
- package/src/ui/FloatingDeleteButton/getPopUpOptions.ts +47 -57
- package/src/ui/FloatingDeleteButton/index.tsx +319 -350
- package/src/ui/FloatingDragMenu/DragMenu.tsx +555 -596
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +152 -162
- package/src/ui/FloatingDragMenu/index.tsx +88 -102
- package/src/ui/FloatingDragMenu/styles.ts +51 -54
- package/src/ui/FloatingInsertButton/InsertButton.tsx +204 -217
- package/src/ui/FloatingInsertButton/getPopupOptions.ts +100 -115
- package/src/ui/FloatingInsertButton/index.tsx +248 -292
- package/src/ui/FloatingToolbarLabel/FloatingToolbarLabel.tsx +24 -29
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +308 -329
- package/src/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +85 -94
- package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +46 -46
- package/src/ui/TableFloatingColumnControls/index.tsx +116 -136
- package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +79 -91
- package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +95 -102
- package/src/ui/TableFloatingControls/CornerControls/index.tsx +1 -4
- package/src/ui/TableFloatingControls/CornerControls/types.ts +8 -8
- package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +50 -50
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +111 -124
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +86 -105
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +305 -341
- package/src/ui/TableFloatingControls/RowDropTarget/index.tsx +72 -75
- package/src/ui/TableFloatingControls/index.tsx +191 -193
- package/src/ui/TableFullWidthLabel/index.tsx +20 -20
- package/src/ui/common-styles.ts +880 -912
- package/src/ui/consts.ts +29 -74
- package/src/ui/icons/AddColLeftIcon.tsx +33 -39
- package/src/ui/icons/AddColRightIcon.tsx +33 -39
- package/src/ui/icons/AddRowAboveIcon.tsx +16 -22
- package/src/ui/icons/AddRowBelowIcon.tsx +33 -39
- package/src/ui/icons/DisplayModeIcon.tsx +31 -31
- package/src/ui/icons/DragHandleDisabledIcon.tsx +19 -21
- package/src/ui/icons/DragHandleIcon.tsx +12 -12
- package/src/ui/icons/DragInMotionIcon.tsx +45 -52
- package/src/ui/icons/MergeCellsIcon.tsx +22 -28
- package/src/ui/icons/MinimisedHandle.tsx +9 -9
- package/src/ui/icons/SplitCellIcon.tsx +30 -36
- package/src/ui/ui-styles.ts +769 -798
- package/src/utils/alignment.ts +1 -1
- package/src/utils/analytics.ts +192 -208
- package/src/utils/collapse.ts +55 -64
- package/src/utils/column-controls.ts +237 -254
- package/src/utils/create.ts +30 -30
- package/src/utils/decoration.ts +482 -502
- package/src/utils/dom.ts +127 -134
- package/src/utils/drag-menu.ts +322 -373
- package/src/utils/get-allow-add-column-custom-step.ts +4 -5
- package/src/utils/guidelines.ts +16 -21
- package/src/utils/index.ts +68 -68
- package/src/utils/merged-cells.ts +245 -254
- package/src/utils/nodes.ts +91 -106
- package/src/utils/paste.ts +119 -135
- package/src/utils/row-controls.ts +199 -213
- package/src/utils/selection.ts +77 -87
- package/src/utils/snapping.ts +87 -100
- package/src/utils/table.ts +44 -44
- package/src/utils/transforms.ts +5 -5
- package/src/utils/update-plugin-state-decorations.ts +5 -9
|
@@ -4,30 +4,24 @@ import type { TableLayout } from '@atlaskit/adf-schema';
|
|
|
4
4
|
import { tableBackgroundColorPalette } from '@atlaskit/adf-schema';
|
|
5
5
|
import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from '@atlaskit/editor-common/analytics';
|
|
14
|
-
import type {
|
|
15
|
-
AnalyticsEventPayload,
|
|
16
|
-
EditorAnalyticsAPI,
|
|
7
|
+
ACTION_SUBJECT,
|
|
8
|
+
EVENT_TYPE,
|
|
9
|
+
INPUT_METHOD,
|
|
10
|
+
TABLE_ACTION,
|
|
11
|
+
TABLE_BREAKOUT,
|
|
12
|
+
TABLE_DISPLAY_MODE,
|
|
17
13
|
} from '@atlaskit/editor-common/analytics';
|
|
14
|
+
import type { AnalyticsEventPayload, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
18
15
|
import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
19
|
-
import type {
|
|
20
|
-
Command,
|
|
21
|
-
GetEditorContainerWidth,
|
|
22
|
-
} from '@atlaskit/editor-common/types';
|
|
16
|
+
import type { Command, GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
23
17
|
import type { EditorView } from '@atlaskit/editor-prosemirror/dist/types/view';
|
|
24
18
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
25
19
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
26
20
|
import type { Rect } from '@atlaskit/editor-tables/table-map';
|
|
27
21
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
findCellClosestToPos,
|
|
23
|
+
findCellRectClosestToPos,
|
|
24
|
+
getSelectionRect,
|
|
31
25
|
} from '@atlaskit/editor-tables/utils';
|
|
32
26
|
|
|
33
27
|
import { clearMultipleCells } from './commands/clear';
|
|
@@ -37,695 +31,632 @@ import { deleteColumnsCommand } from './commands/delete';
|
|
|
37
31
|
import { setTableDisplayMode } from './commands/display-mode';
|
|
38
32
|
import { insertColumn, insertRow } from './commands/insert';
|
|
39
33
|
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
deleteTable,
|
|
35
|
+
deleteTableIfSelected,
|
|
36
|
+
getTableSelectionType,
|
|
37
|
+
setMultipleCellAttrs,
|
|
38
|
+
setTableAlignment,
|
|
45
39
|
} from './commands/misc';
|
|
46
40
|
import { sortByColumn } from './commands/sort';
|
|
47
41
|
import { splitCell } from './commands/split-cell';
|
|
48
42
|
import {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
getNextLayout,
|
|
44
|
+
toggleHeaderColumn,
|
|
45
|
+
toggleHeaderRow,
|
|
46
|
+
toggleNumberColumn,
|
|
47
|
+
toggleTableLayout,
|
|
54
48
|
} from './commands/toggle';
|
|
55
49
|
import { getPluginState } from './pm-plugins/plugin-factory';
|
|
56
50
|
import { distributeColumnsWidths } from './pm-plugins/table-resizing/commands';
|
|
57
51
|
import type { ResizeStateWithAnalytics } from './pm-plugins/table-resizing/utils';
|
|
58
52
|
import { deleteRows, mergeCells } from './transforms';
|
|
59
53
|
import type {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
AlignmentOptions,
|
|
55
|
+
InsertRowMethods,
|
|
56
|
+
InsertRowOptions,
|
|
57
|
+
RowInsertPosition,
|
|
64
58
|
} from './types';
|
|
65
|
-
import {
|
|
66
|
-
checkIfNumberColumnEnabled,
|
|
67
|
-
getSelectedCellInfo,
|
|
68
|
-
getSelectedTableInfo,
|
|
69
|
-
} from './utils';
|
|
59
|
+
import { checkIfNumberColumnEnabled, getSelectedCellInfo, getSelectedTableInfo } from './utils';
|
|
70
60
|
import { withEditorAnalyticsAPI } from './utils/analytics';
|
|
71
61
|
|
|
72
62
|
const TABLE_BREAKOUT_NAME_MAPPING = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
63
|
+
default: TABLE_BREAKOUT.NORMAL,
|
|
64
|
+
wide: TABLE_BREAKOUT.WIDE,
|
|
65
|
+
'full-width': TABLE_BREAKOUT.FULL_WIDTH,
|
|
76
66
|
};
|
|
77
67
|
|
|
78
68
|
// #region Analytics wrappers
|
|
79
69
|
export const emptyMultipleCellsWithAnalytics =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
eventType: EVENT_TYPE.TRACK,
|
|
109
|
-
};
|
|
110
|
-
})(editorAnalyticsAPI)(clearMultipleCells(targetCellPosition));
|
|
70
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
71
|
+
(
|
|
72
|
+
inputMethod:
|
|
73
|
+
| INPUT_METHOD.CONTEXT_MENU
|
|
74
|
+
| INPUT_METHOD.KEYBOARD
|
|
75
|
+
| INPUT_METHOD.FLOATING_TB
|
|
76
|
+
| INPUT_METHOD.TABLE_CONTEXT_MENU,
|
|
77
|
+
targetCellPosition?: number,
|
|
78
|
+
) =>
|
|
79
|
+
withEditorAnalyticsAPI(({ selection }) => {
|
|
80
|
+
const { horizontalCells, verticalCells, totalRowCount, totalColumnCount } =
|
|
81
|
+
getSelectedCellInfo(selection);
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
action: TABLE_ACTION.CLEARED,
|
|
85
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
86
|
+
actionSubjectId: null,
|
|
87
|
+
attributes: {
|
|
88
|
+
inputMethod,
|
|
89
|
+
horizontalCells,
|
|
90
|
+
verticalCells,
|
|
91
|
+
totalRowCount,
|
|
92
|
+
totalColumnCount,
|
|
93
|
+
},
|
|
94
|
+
eventType: EVENT_TYPE.TRACK,
|
|
95
|
+
};
|
|
96
|
+
})(editorAnalyticsAPI)(clearMultipleCells(targetCellPosition));
|
|
111
97
|
|
|
112
98
|
export const mergeCellsWithAnalytics =
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (dispatch) {
|
|
140
|
-
dispatch(mergeCells(state.tr));
|
|
141
|
-
}
|
|
142
|
-
return true;
|
|
143
|
-
});
|
|
99
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) =>
|
|
100
|
+
(inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) =>
|
|
101
|
+
withEditorAnalyticsAPI(({ selection }) => {
|
|
102
|
+
const { horizontalCells, verticalCells, totalCells, totalRowCount, totalColumnCount } =
|
|
103
|
+
getSelectedCellInfo(selection);
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
action: TABLE_ACTION.MERGED,
|
|
107
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
108
|
+
actionSubjectId: null,
|
|
109
|
+
attributes: {
|
|
110
|
+
inputMethod,
|
|
111
|
+
horizontalCells,
|
|
112
|
+
verticalCells,
|
|
113
|
+
totalCells,
|
|
114
|
+
totalRowCount,
|
|
115
|
+
totalColumnCount,
|
|
116
|
+
},
|
|
117
|
+
eventType: EVENT_TYPE.TRACK,
|
|
118
|
+
};
|
|
119
|
+
})(editorAnalyticsAPI)((state, dispatch) => {
|
|
120
|
+
if (dispatch) {
|
|
121
|
+
dispatch(mergeCells(state.tr));
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
});
|
|
144
125
|
|
|
145
126
|
export const splitCellWithAnalytics =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return;
|
|
172
|
-
})(editorAnalyticsAPI)(splitCell);
|
|
127
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
128
|
+
(inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) =>
|
|
129
|
+
withEditorAnalyticsAPI(({ selection }) => {
|
|
130
|
+
const { totalRowCount, totalColumnCount } = getSelectedCellInfo(selection);
|
|
131
|
+
const cell = findCellClosestToPos(selection.$anchor);
|
|
132
|
+
if (cell) {
|
|
133
|
+
const { rowspan: verticalCells, colspan: horizontalCells } = cell.node.attrs;
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
action: TABLE_ACTION.SPLIT,
|
|
137
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
138
|
+
actionSubjectId: null,
|
|
139
|
+
attributes: {
|
|
140
|
+
inputMethod,
|
|
141
|
+
horizontalCells,
|
|
142
|
+
verticalCells,
|
|
143
|
+
totalCells: horizontalCells * verticalCells,
|
|
144
|
+
totalRowCount,
|
|
145
|
+
totalColumnCount,
|
|
146
|
+
},
|
|
147
|
+
eventType: EVENT_TYPE.TRACK,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
return;
|
|
151
|
+
})(editorAnalyticsAPI)(splitCell);
|
|
173
152
|
|
|
174
153
|
export const setColorWithAnalytics =
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
eventType: EVENT_TYPE.TRACK,
|
|
211
|
-
};
|
|
212
|
-
})(editorAnalyticsAPI)(
|
|
213
|
-
setMultipleCellAttrs(
|
|
214
|
-
{ background: cellColor },
|
|
215
|
-
targetCellPosition,
|
|
216
|
-
editorView,
|
|
217
|
-
),
|
|
218
|
-
);
|
|
154
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
155
|
+
(
|
|
156
|
+
inputMethod:
|
|
157
|
+
| INPUT_METHOD.CONTEXT_MENU
|
|
158
|
+
| INPUT_METHOD.FLOATING_TB
|
|
159
|
+
| INPUT_METHOD.TABLE_CONTEXT_MENU,
|
|
160
|
+
cellColor: string,
|
|
161
|
+
targetCellPosition?: number,
|
|
162
|
+
editorView?: EditorView | null,
|
|
163
|
+
) =>
|
|
164
|
+
withEditorAnalyticsAPI(({ selection }) => {
|
|
165
|
+
const { horizontalCells, verticalCells, totalCells, totalRowCount, totalColumnCount } =
|
|
166
|
+
getSelectedCellInfo(selection);
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
action: TABLE_ACTION.COLORED,
|
|
170
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
171
|
+
actionSubjectId: null,
|
|
172
|
+
attributes: {
|
|
173
|
+
inputMethod,
|
|
174
|
+
cellColor: (
|
|
175
|
+
tableBackgroundColorPalette.get(cellColor.toLowerCase()) || cellColor
|
|
176
|
+
).toLowerCase(),
|
|
177
|
+
horizontalCells,
|
|
178
|
+
verticalCells,
|
|
179
|
+
totalCells,
|
|
180
|
+
totalRowCount,
|
|
181
|
+
totalColumnCount,
|
|
182
|
+
},
|
|
183
|
+
eventType: EVENT_TYPE.TRACK,
|
|
184
|
+
};
|
|
185
|
+
})(editorAnalyticsAPI)(
|
|
186
|
+
setMultipleCellAttrs({ background: cellColor }, targetCellPosition, editorView),
|
|
187
|
+
);
|
|
219
188
|
|
|
220
189
|
export const addRowAroundSelection =
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
};
|
|
190
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
191
|
+
(side: RowInsertPosition): Command =>
|
|
192
|
+
(state, dispatch) => {
|
|
193
|
+
const { selection } = state;
|
|
194
|
+
const isCellSelection = selection instanceof CellSelection;
|
|
195
|
+
const rect = isCellSelection
|
|
196
|
+
? getSelectionRect(selection)
|
|
197
|
+
: findCellRectClosestToPos(selection.$from);
|
|
198
|
+
|
|
199
|
+
if (!rect) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const position = isCellSelection && side === 'TOP' ? rect.top : rect.bottom - 1;
|
|
204
|
+
|
|
205
|
+
const offset = side === 'BOTTOM' ? 1 : 0;
|
|
206
|
+
|
|
207
|
+
return insertRowWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.SHORTCUT, {
|
|
208
|
+
index: position + offset,
|
|
209
|
+
moveCursorToInsertedRow: false,
|
|
210
|
+
})(state, dispatch);
|
|
211
|
+
};
|
|
244
212
|
|
|
245
213
|
export const insertRowWithAnalytics =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
eventType: EVENT_TYPE.TRACK,
|
|
266
|
-
};
|
|
267
|
-
})(editorAnalyticsAPI)(
|
|
268
|
-
insertRow(
|
|
269
|
-
options.index,
|
|
270
|
-
options.moveCursorToInsertedRow,
|
|
271
|
-
isCellbackgroundDuplicated,
|
|
272
|
-
),
|
|
273
|
-
);
|
|
214
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isCellbackgroundDuplicated = false) =>
|
|
215
|
+
(inputMethod: InsertRowMethods, options: InsertRowOptions) =>
|
|
216
|
+
withEditorAnalyticsAPI((state) => {
|
|
217
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
218
|
+
return {
|
|
219
|
+
action: TABLE_ACTION.ADDED_ROW,
|
|
220
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
221
|
+
actionSubjectId: null,
|
|
222
|
+
attributes: {
|
|
223
|
+
inputMethod,
|
|
224
|
+
position: options.index,
|
|
225
|
+
totalRowCount,
|
|
226
|
+
totalColumnCount,
|
|
227
|
+
},
|
|
228
|
+
eventType: EVENT_TYPE.TRACK,
|
|
229
|
+
};
|
|
230
|
+
})(editorAnalyticsAPI)(
|
|
231
|
+
insertRow(options.index, options.moveCursorToInsertedRow, isCellbackgroundDuplicated),
|
|
232
|
+
);
|
|
274
233
|
|
|
275
234
|
export const changeColumnWidthByStepWithAnalytics =
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}),
|
|
315
|
-
);
|
|
235
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
236
|
+
(
|
|
237
|
+
stepSize: number,
|
|
238
|
+
getEditorContainerWidth: GetEditorContainerWidth,
|
|
239
|
+
isTableScalingEnabled: boolean,
|
|
240
|
+
inputMethod: INPUT_METHOD.SHORTCUT,
|
|
241
|
+
ariaNotify?: (message: string) => void,
|
|
242
|
+
getIntl?: () => IntlShape,
|
|
243
|
+
) =>
|
|
244
|
+
withEditorAnalyticsAPI((state) => {
|
|
245
|
+
const { table, totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
246
|
+
const {
|
|
247
|
+
hoveredCell: { colIndex },
|
|
248
|
+
} = getPluginState(state);
|
|
249
|
+
|
|
250
|
+
return {
|
|
251
|
+
action: TABLE_ACTION.COLUMN_RESIZED,
|
|
252
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
253
|
+
eventType: EVENT_TYPE.TRACK,
|
|
254
|
+
attributes: {
|
|
255
|
+
colIndex,
|
|
256
|
+
resizedDelta: stepSize,
|
|
257
|
+
isLastColumn: colIndex === totalColumnCount - 1,
|
|
258
|
+
tableWidth: table?.node.attrs.width,
|
|
259
|
+
inputMethod,
|
|
260
|
+
totalRowCount,
|
|
261
|
+
totalColumnCount,
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
})(editorAnalyticsAPI)(
|
|
265
|
+
changeColumnWidthByStep({
|
|
266
|
+
stepSize: stepSize,
|
|
267
|
+
getEditorContainerWidth: getEditorContainerWidth,
|
|
268
|
+
isTableScalingEnabled: isTableScalingEnabled,
|
|
269
|
+
ariaNotify: ariaNotify,
|
|
270
|
+
getIntl: getIntl,
|
|
271
|
+
}),
|
|
272
|
+
);
|
|
316
273
|
|
|
317
274
|
export const insertColumnWithAnalytics =
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
insertColumn(isTableScalingEnabled, isCellbackgroundDuplicated)(position),
|
|
350
|
-
);
|
|
275
|
+
(
|
|
276
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
277
|
+
isTableScalingEnabled = false,
|
|
278
|
+
isCellbackgroundDuplicated = false,
|
|
279
|
+
) =>
|
|
280
|
+
(
|
|
281
|
+
inputMethod:
|
|
282
|
+
| INPUT_METHOD.CONTEXT_MENU
|
|
283
|
+
| INPUT_METHOD.BUTTON
|
|
284
|
+
| INPUT_METHOD.SHORTCUT
|
|
285
|
+
| INPUT_METHOD.FLOATING_TB
|
|
286
|
+
| INPUT_METHOD.TABLE_CONTEXT_MENU,
|
|
287
|
+
position: number,
|
|
288
|
+
) =>
|
|
289
|
+
withEditorAnalyticsAPI((state) => {
|
|
290
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
291
|
+
return {
|
|
292
|
+
action: TABLE_ACTION.ADDED_COLUMN,
|
|
293
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
294
|
+
actionSubjectId: null,
|
|
295
|
+
attributes: {
|
|
296
|
+
inputMethod,
|
|
297
|
+
position,
|
|
298
|
+
totalRowCount,
|
|
299
|
+
totalColumnCount,
|
|
300
|
+
},
|
|
301
|
+
eventType: EVENT_TYPE.TRACK,
|
|
302
|
+
};
|
|
303
|
+
})(editorAnalyticsAPI)(
|
|
304
|
+
insertColumn(isTableScalingEnabled, isCellbackgroundDuplicated)(position),
|
|
305
|
+
);
|
|
351
306
|
|
|
352
307
|
export const deleteRowsWithAnalytics =
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
});
|
|
308
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
309
|
+
(
|
|
310
|
+
inputMethod:
|
|
311
|
+
| INPUT_METHOD.CONTEXT_MENU
|
|
312
|
+
| INPUT_METHOD.BUTTON
|
|
313
|
+
| INPUT_METHOD.FLOATING_TB
|
|
314
|
+
| INPUT_METHOD.SHORTCUT
|
|
315
|
+
| INPUT_METHOD.TABLE_CONTEXT_MENU,
|
|
316
|
+
rect: Rect,
|
|
317
|
+
isHeaderRowRequired: boolean,
|
|
318
|
+
) =>
|
|
319
|
+
withEditorAnalyticsAPI(({ selection }) => {
|
|
320
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(selection);
|
|
321
|
+
|
|
322
|
+
return {
|
|
323
|
+
action: TABLE_ACTION.DELETED_ROW,
|
|
324
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
325
|
+
actionSubjectId: null,
|
|
326
|
+
attributes: {
|
|
327
|
+
inputMethod,
|
|
328
|
+
position: rect.top,
|
|
329
|
+
count: rect.bottom - rect.top,
|
|
330
|
+
totalRowCount,
|
|
331
|
+
totalColumnCount,
|
|
332
|
+
},
|
|
333
|
+
eventType: EVENT_TYPE.TRACK,
|
|
334
|
+
};
|
|
335
|
+
})(editorAnalyticsAPI)((state, dispatch) => {
|
|
336
|
+
if (dispatch) {
|
|
337
|
+
dispatch(deleteRows(rect, isHeaderRowRequired)(state.tr));
|
|
338
|
+
}
|
|
339
|
+
return true;
|
|
340
|
+
});
|
|
387
341
|
|
|
388
342
|
export const deleteColumnsWithAnalytics =
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
},
|
|
417
|
-
eventType: EVENT_TYPE.TRACK,
|
|
418
|
-
};
|
|
419
|
-
})(editorAnalyticsAPI)(deleteColumnsCommand(rect, isTableScalingEnabled));
|
|
343
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, isTableScalingEnabled = false) =>
|
|
344
|
+
(
|
|
345
|
+
inputMethod:
|
|
346
|
+
| INPUT_METHOD.CONTEXT_MENU
|
|
347
|
+
| INPUT_METHOD.BUTTON
|
|
348
|
+
| INPUT_METHOD.FLOATING_TB
|
|
349
|
+
| INPUT_METHOD.SHORTCUT
|
|
350
|
+
| INPUT_METHOD.TABLE_CONTEXT_MENU,
|
|
351
|
+
rect: Rect,
|
|
352
|
+
) =>
|
|
353
|
+
withEditorAnalyticsAPI(({ selection }) => {
|
|
354
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(selection);
|
|
355
|
+
|
|
356
|
+
return {
|
|
357
|
+
action: TABLE_ACTION.DELETED_COLUMN,
|
|
358
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
359
|
+
actionSubjectId: null,
|
|
360
|
+
attributes: {
|
|
361
|
+
inputMethod,
|
|
362
|
+
position: rect.left,
|
|
363
|
+
count: rect.right - rect.left,
|
|
364
|
+
totalRowCount,
|
|
365
|
+
totalColumnCount,
|
|
366
|
+
},
|
|
367
|
+
eventType: EVENT_TYPE.TRACK,
|
|
368
|
+
};
|
|
369
|
+
})(editorAnalyticsAPI)(deleteColumnsCommand(rect, isTableScalingEnabled));
|
|
420
370
|
|
|
421
371
|
export const deleteSelectedRowsOrColumnsWithAnalyticsViaShortcut =
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
372
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null): Command =>
|
|
373
|
+
(state, dispatch) => {
|
|
374
|
+
const { selection } = state;
|
|
375
|
+
const isCellSelection = selection instanceof CellSelection;
|
|
376
|
+
if (!isCellSelection) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
const rect = getSelectionRect(selection);
|
|
381
|
+
if (!rect) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const selectionType = getTableSelectionType(selection);
|
|
386
|
+
if (selectionType === 'row') {
|
|
387
|
+
const { pluginConfig } = getPluginState(state);
|
|
388
|
+
const isHeaderRowRequired = pluginConfig.isHeaderRowRequired || false;
|
|
389
|
+
|
|
390
|
+
return deleteRowsWithAnalytics(editorAnalyticsAPI)(
|
|
391
|
+
INPUT_METHOD.SHORTCUT,
|
|
392
|
+
rect,
|
|
393
|
+
isHeaderRowRequired,
|
|
394
|
+
)(state, dispatch);
|
|
395
|
+
} else if (selectionType === 'column') {
|
|
396
|
+
return deleteColumnsWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.SHORTCUT, rect)(
|
|
397
|
+
state,
|
|
398
|
+
dispatch,
|
|
399
|
+
);
|
|
400
|
+
} else {
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
};
|
|
454
404
|
|
|
455
405
|
const getTableDeletedAnalytics = (
|
|
456
|
-
|
|
457
|
-
|
|
406
|
+
selection: Selection,
|
|
407
|
+
inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD,
|
|
458
408
|
): AnalyticsEventPayload => {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
409
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(selection);
|
|
410
|
+
return {
|
|
411
|
+
action: TABLE_ACTION.DELETED,
|
|
412
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
413
|
+
attributes: {
|
|
414
|
+
inputMethod,
|
|
415
|
+
totalRowCount,
|
|
416
|
+
totalColumnCount,
|
|
417
|
+
},
|
|
418
|
+
eventType: EVENT_TYPE.TRACK,
|
|
419
|
+
};
|
|
470
420
|
};
|
|
471
421
|
|
|
472
422
|
export const deleteTableWithAnalytics = (
|
|
473
|
-
|
|
423
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
474
424
|
) =>
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
425
|
+
withEditorAnalyticsAPI(({ selection }) =>
|
|
426
|
+
getTableDeletedAnalytics(selection, INPUT_METHOD.FLOATING_TB),
|
|
427
|
+
)(editorAnalyticsAPI)(deleteTable);
|
|
478
428
|
|
|
479
429
|
export const deleteTableIfSelectedWithAnalytics =
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
430
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
431
|
+
(inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) =>
|
|
432
|
+
withEditorAnalyticsAPI(({ selection }) => getTableDeletedAnalytics(selection, inputMethod))(
|
|
433
|
+
editorAnalyticsAPI,
|
|
434
|
+
)(deleteTableIfSelected);
|
|
485
435
|
|
|
486
436
|
export const toggleHeaderRowWithAnalytics = (
|
|
487
|
-
|
|
437
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
488
438
|
) =>
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
};
|
|
506
|
-
})(editorAnalyticsAPI)(toggleHeaderRow);
|
|
439
|
+
withEditorAnalyticsAPI((state) => {
|
|
440
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
441
|
+
const { isHeaderRowEnabled } = getPluginState(state);
|
|
442
|
+
|
|
443
|
+
return {
|
|
444
|
+
action: TABLE_ACTION.TOGGLED_HEADER_ROW,
|
|
445
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
446
|
+
actionSubjectId: null,
|
|
447
|
+
attributes: {
|
|
448
|
+
newState: !isHeaderRowEnabled,
|
|
449
|
+
totalRowCount,
|
|
450
|
+
totalColumnCount,
|
|
451
|
+
},
|
|
452
|
+
eventType: EVENT_TYPE.TRACK,
|
|
453
|
+
};
|
|
454
|
+
})(editorAnalyticsAPI)(toggleHeaderRow);
|
|
507
455
|
|
|
508
456
|
export const toggleHeaderColumnWithAnalytics = (
|
|
509
|
-
|
|
457
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
510
458
|
) =>
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
};
|
|
528
|
-
})(editorAnalyticsAPI)(toggleHeaderColumn);
|
|
459
|
+
withEditorAnalyticsAPI((state) => {
|
|
460
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
461
|
+
const { isHeaderColumnEnabled } = getPluginState(state);
|
|
462
|
+
|
|
463
|
+
return {
|
|
464
|
+
action: TABLE_ACTION.TOGGLED_HEADER_COLUMN,
|
|
465
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
466
|
+
actionSubjectId: null,
|
|
467
|
+
attributes: {
|
|
468
|
+
newState: !isHeaderColumnEnabled,
|
|
469
|
+
totalRowCount,
|
|
470
|
+
totalColumnCount,
|
|
471
|
+
},
|
|
472
|
+
eventType: EVENT_TYPE.TRACK,
|
|
473
|
+
};
|
|
474
|
+
})(editorAnalyticsAPI)(toggleHeaderColumn);
|
|
529
475
|
|
|
530
476
|
export const toggleNumberColumnWithAnalytics = (
|
|
531
|
-
|
|
477
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
532
478
|
) =>
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
};
|
|
548
|
-
})(editorAnalyticsAPI)(toggleNumberColumn);
|
|
479
|
+
withEditorAnalyticsAPI((state) => {
|
|
480
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
481
|
+
return {
|
|
482
|
+
action: TABLE_ACTION.TOGGLED_NUMBER_COLUMN,
|
|
483
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
484
|
+
actionSubjectId: null,
|
|
485
|
+
attributes: {
|
|
486
|
+
newState: !checkIfNumberColumnEnabled(state.selection),
|
|
487
|
+
totalRowCount,
|
|
488
|
+
totalColumnCount,
|
|
489
|
+
},
|
|
490
|
+
eventType: EVENT_TYPE.TRACK,
|
|
491
|
+
};
|
|
492
|
+
})(editorAnalyticsAPI)(toggleNumberColumn);
|
|
549
493
|
|
|
550
494
|
export const toggleTableLayoutWithAnalytics = (
|
|
551
|
-
|
|
495
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
552
496
|
) =>
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
return;
|
|
576
|
-
})(editorAnalyticsAPI)(toggleTableLayout);
|
|
497
|
+
withEditorAnalyticsAPI((state) => {
|
|
498
|
+
const { table, totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
499
|
+
|
|
500
|
+
if (table) {
|
|
501
|
+
const { layout } = table.node.attrs as {
|
|
502
|
+
layout: 'default' | 'wide' | 'full-width';
|
|
503
|
+
};
|
|
504
|
+
return {
|
|
505
|
+
action: TABLE_ACTION.CHANGED_BREAKOUT_MODE,
|
|
506
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
507
|
+
actionSubjectId: null,
|
|
508
|
+
attributes: {
|
|
509
|
+
newBreakoutMode: TABLE_BREAKOUT_NAME_MAPPING[getNextLayout(layout)],
|
|
510
|
+
previousBreakoutMode: TABLE_BREAKOUT_NAME_MAPPING[layout],
|
|
511
|
+
totalRowCount,
|
|
512
|
+
totalColumnCount,
|
|
513
|
+
},
|
|
514
|
+
eventType: EVENT_TYPE.TRACK,
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
return;
|
|
518
|
+
})(editorAnalyticsAPI)(toggleTableLayout);
|
|
577
519
|
|
|
578
520
|
export const sortColumnWithAnalytics =
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
};
|
|
605
|
-
})(editorAnalyticsAPI)(sortByColumn(columnIndex, sortOrder));
|
|
521
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
522
|
+
(
|
|
523
|
+
inputMethod:
|
|
524
|
+
| INPUT_METHOD.CONTEXT_MENU
|
|
525
|
+
| INPUT_METHOD.FLOATING_TB
|
|
526
|
+
| INPUT_METHOD.TABLE_CONTEXT_MENU,
|
|
527
|
+
columnIndex: number,
|
|
528
|
+
sortOrder: SortOrder,
|
|
529
|
+
) =>
|
|
530
|
+
withEditorAnalyticsAPI((state) => {
|
|
531
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
532
|
+
return {
|
|
533
|
+
action: TABLE_ACTION.SORTED_COLUMN,
|
|
534
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
535
|
+
attributes: {
|
|
536
|
+
inputMethod,
|
|
537
|
+
totalRowCount,
|
|
538
|
+
totalColumnCount,
|
|
539
|
+
position: columnIndex,
|
|
540
|
+
sortOrder,
|
|
541
|
+
mode: 'editor',
|
|
542
|
+
},
|
|
543
|
+
eventType: EVENT_TYPE.TRACK,
|
|
544
|
+
};
|
|
545
|
+
})(editorAnalyticsAPI)(sortByColumn(columnIndex, sortOrder));
|
|
606
546
|
|
|
607
547
|
export const distributeColumnsWidthsWithAnalytics =
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
548
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
549
|
+
(
|
|
550
|
+
inputMethod:
|
|
551
|
+
| INPUT_METHOD.CONTEXT_MENU
|
|
552
|
+
| INPUT_METHOD.FLOATING_TB
|
|
553
|
+
| INPUT_METHOD.TABLE_CONTEXT_MENU,
|
|
554
|
+
{ resizeState, table, attributes }: ResizeStateWithAnalytics,
|
|
555
|
+
) => {
|
|
556
|
+
return withEditorAnalyticsAPI(() => {
|
|
557
|
+
return {
|
|
558
|
+
action: TABLE_ACTION.DISTRIBUTED_COLUMNS_WIDTHS,
|
|
559
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
560
|
+
actionSubjectId: null,
|
|
561
|
+
attributes: {
|
|
562
|
+
inputMethod,
|
|
563
|
+
...attributes,
|
|
564
|
+
},
|
|
565
|
+
eventType: EVENT_TYPE.TRACK,
|
|
566
|
+
};
|
|
567
|
+
})(editorAnalyticsAPI)((state, dispatch) => {
|
|
568
|
+
if (dispatch) {
|
|
569
|
+
distributeColumnsWidths(resizeState, table)(state, dispatch);
|
|
570
|
+
}
|
|
571
|
+
return true;
|
|
572
|
+
});
|
|
573
|
+
};
|
|
634
574
|
|
|
635
575
|
export const wrapTableInExpandWithAnalytics = (
|
|
636
|
-
|
|
576
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
637
577
|
) =>
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
};
|
|
652
|
-
})(editorAnalyticsAPI)(wrapTableInExpand);
|
|
578
|
+
withEditorAnalyticsAPI((state) => {
|
|
579
|
+
const { totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
580
|
+
return {
|
|
581
|
+
action: TABLE_ACTION.COLLAPSED,
|
|
582
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
583
|
+
actionSubjectId: null,
|
|
584
|
+
attributes: {
|
|
585
|
+
totalRowCount,
|
|
586
|
+
totalColumnCount,
|
|
587
|
+
},
|
|
588
|
+
eventType: EVENT_TYPE.TRACK,
|
|
589
|
+
};
|
|
590
|
+
})(editorAnalyticsAPI)(wrapTableInExpand);
|
|
653
591
|
|
|
654
592
|
export const toggleTableLockWithAnalytics =
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
};
|
|
696
|
-
})(editorAnalyticsAPI)(editorCommandToPMCommand(setTableDisplayMode));
|
|
593
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
594
|
+
(
|
|
595
|
+
displayMode: TABLE_DISPLAY_MODE | null,
|
|
596
|
+
inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB,
|
|
597
|
+
) =>
|
|
598
|
+
withEditorAnalyticsAPI((state) => {
|
|
599
|
+
const { table, totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
600
|
+
|
|
601
|
+
let previousDisplayMode: TABLE_DISPLAY_MODE;
|
|
602
|
+
let newDisplayMode: TABLE_DISPLAY_MODE;
|
|
603
|
+
|
|
604
|
+
switch (displayMode) {
|
|
605
|
+
case 'fixed':
|
|
606
|
+
previousDisplayMode = TABLE_DISPLAY_MODE.FIXED;
|
|
607
|
+
newDisplayMode = TABLE_DISPLAY_MODE.DEFAULT;
|
|
608
|
+
break;
|
|
609
|
+
case 'default':
|
|
610
|
+
previousDisplayMode = TABLE_DISPLAY_MODE.DEFAULT;
|
|
611
|
+
newDisplayMode = TABLE_DISPLAY_MODE.FIXED;
|
|
612
|
+
break;
|
|
613
|
+
case null:
|
|
614
|
+
default:
|
|
615
|
+
previousDisplayMode = TABLE_DISPLAY_MODE.INITIAL;
|
|
616
|
+
newDisplayMode = TABLE_DISPLAY_MODE.FIXED;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
return {
|
|
620
|
+
action: TABLE_ACTION.CHANGED_DISPLAY_MODE,
|
|
621
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
622
|
+
attributes: {
|
|
623
|
+
inputMethod,
|
|
624
|
+
previousDisplayMode,
|
|
625
|
+
newDisplayMode,
|
|
626
|
+
tableWidth: table?.node.attrs.width,
|
|
627
|
+
totalRowCount,
|
|
628
|
+
totalColumnCount,
|
|
629
|
+
},
|
|
630
|
+
eventType: EVENT_TYPE.TRACK,
|
|
631
|
+
};
|
|
632
|
+
})(editorAnalyticsAPI)(editorCommandToPMCommand(setTableDisplayMode));
|
|
697
633
|
|
|
698
634
|
export const setTableAlignmentWithAnalytics =
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
},
|
|
728
|
-
};
|
|
729
|
-
})(editorAnalyticsAPI)(
|
|
730
|
-
editorCommandToPMCommand(setTableAlignment(newAlignment)),
|
|
731
|
-
);
|
|
635
|
+
(editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) =>
|
|
636
|
+
(
|
|
637
|
+
newAlignment: AlignmentOptions,
|
|
638
|
+
// previous alignment could be a breakout value, if so use 'null' to indicate alignment was not previously set
|
|
639
|
+
previousAlignment: TableLayout,
|
|
640
|
+
inputMethod: INPUT_METHOD.FLOATING_TB,
|
|
641
|
+
) =>
|
|
642
|
+
withEditorAnalyticsAPI((state) => {
|
|
643
|
+
const { table, totalRowCount, totalColumnCount } = getSelectedTableInfo(state.selection);
|
|
644
|
+
|
|
645
|
+
return {
|
|
646
|
+
action: TABLE_ACTION.CHANGED_ALIGNMENT,
|
|
647
|
+
actionSubject: ACTION_SUBJECT.TABLE,
|
|
648
|
+
actionSubjectId: null,
|
|
649
|
+
eventType: EVENT_TYPE.TRACK,
|
|
650
|
+
attributes: {
|
|
651
|
+
tableWidth: table?.node.attrs.width,
|
|
652
|
+
newAlignment,
|
|
653
|
+
previousAlignment:
|
|
654
|
+
previousAlignment === 'center' || previousAlignment === 'align-start'
|
|
655
|
+
? previousAlignment
|
|
656
|
+
: null,
|
|
657
|
+
totalRowCount,
|
|
658
|
+
totalColumnCount,
|
|
659
|
+
inputMethod,
|
|
660
|
+
},
|
|
661
|
+
};
|
|
662
|
+
})(editorAnalyticsAPI)(editorCommandToPMCommand(setTableAlignment(newAlignment)));
|