@atlaskit/editor-plugin-table 7.31.2 → 8.0.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 +92 -0
- package/dist/cjs/commands/insert.js +16 -19
- package/dist/cjs/commands-with-analytics.js +5 -7
- package/dist/cjs/event-handlers.js +12 -1
- package/dist/cjs/nodeviews/TableComponent.js +18 -15
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +5 -2
- package/dist/cjs/nodeviews/lazy-node-views.js +2 -3
- package/dist/cjs/nodeviews/table.js +16 -12
- package/dist/cjs/plugin.js +22 -28
- package/dist/cjs/pm-plugins/keymap.js +9 -10
- package/dist/cjs/pm-plugins/main.js +3 -5
- package/dist/cjs/toolbar.js +10 -13
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +2 -4
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +1 -2
- package/dist/cjs/ui/FloatingDragMenu/index.js +2 -4
- package/dist/cjs/ui/FloatingInsertButton/index.js +3 -7
- package/dist/cjs/utils/drag-menu.js +6 -7
- package/dist/es2019/commands/insert.js +10 -10
- package/dist/es2019/commands-with-analytics.js +4 -4
- package/dist/es2019/event-handlers.js +12 -1
- package/dist/es2019/nodeviews/TableComponent.js +18 -15
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +5 -2
- package/dist/es2019/nodeviews/lazy-node-views.js +2 -3
- package/dist/es2019/nodeviews/table.js +16 -12
- package/dist/es2019/plugin.js +22 -26
- package/dist/es2019/pm-plugins/keymap.js +5 -5
- package/dist/es2019/pm-plugins/main.js +3 -5
- package/dist/es2019/toolbar.js +6 -7
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +2 -3
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +1 -2
- package/dist/es2019/ui/FloatingDragMenu/index.js +2 -3
- package/dist/es2019/ui/FloatingInsertButton/index.js +3 -6
- package/dist/es2019/utils/drag-menu.js +3 -3
- package/dist/esm/commands/insert.js +16 -19
- package/dist/esm/commands-with-analytics.js +5 -7
- package/dist/esm/event-handlers.js +12 -1
- package/dist/esm/nodeviews/TableComponent.js +18 -15
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +5 -2
- package/dist/esm/nodeviews/lazy-node-views.js +2 -3
- package/dist/esm/nodeviews/table.js +16 -12
- package/dist/esm/plugin.js +22 -28
- package/dist/esm/pm-plugins/keymap.js +9 -10
- package/dist/esm/pm-plugins/main.js +3 -5
- package/dist/esm/toolbar.js +10 -13
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +2 -4
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +1 -2
- package/dist/esm/ui/FloatingDragMenu/index.js +2 -4
- package/dist/esm/ui/FloatingInsertButton/index.js +3 -7
- package/dist/esm/utils/drag-menu.js +6 -7
- package/dist/types/commands/insert.d.ts +5 -5
- package/dist/types/commands-with-analytics.d.ts +3 -4
- package/dist/types/event-handlers.d.ts +1 -1
- package/dist/types/nodeviews/TableComponent.d.ts +2 -1
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +3 -1
- package/dist/types/nodeviews/lazy-node-views.d.ts +0 -1
- package/dist/types/nodeviews/table.d.ts +1 -1
- package/dist/types/nodeviews/types.d.ts +2 -2
- package/dist/types/plugin.d.ts +1 -3
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/toolbar.d.ts +1 -1
- package/dist/types/types.d.ts +2 -1
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +0 -1
- package/dist/types/utils/drag-menu.d.ts +1 -1
- package/dist/types-ts4.5/commands/insert.d.ts +5 -5
- package/dist/types-ts4.5/commands-with-analytics.d.ts +3 -4
- package/dist/types-ts4.5/event-handlers.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +3 -1
- package/dist/types-ts4.5/nodeviews/lazy-node-views.d.ts +0 -1
- package/dist/types-ts4.5/nodeviews/table.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/types.d.ts +2 -2
- package/dist/types-ts4.5/plugin.d.ts +1 -3
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/toolbar.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +0 -1
- package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
- package/package.json +3 -3
- package/src/commands/insert.ts +3 -10
- package/src/commands-with-analytics.ts +7 -8
- package/src/event-handlers.ts +17 -1
- package/src/nodeviews/TableComponent.tsx +22 -16
- package/src/nodeviews/TableComponentWithSharedState.tsx +6 -1
- package/src/nodeviews/lazy-node-views.ts +0 -4
- package/src/nodeviews/table.tsx +13 -8
- package/src/nodeviews/types.ts +2 -2
- package/src/plugin.tsx +24 -35
- package/src/pm-plugins/keymap.ts +0 -5
- package/src/pm-plugins/main.ts +2 -6
- package/src/toolbar.tsx +1 -9
- package/src/types.ts +2 -1
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +7 -10
- package/src/ui/FloatingDragMenu/DragMenu.tsx +0 -3
- package/src/ui/FloatingDragMenu/index.tsx +1 -3
- package/src/ui/FloatingInsertButton/index.tsx +5 -10
- package/src/utils/drag-menu.ts +4 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#162935](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162935)
|
|
8
|
+
[`48011dc10467a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/48011dc10467a) -
|
|
9
|
+
Removed `tablesPlugin` property and its child properties of `tableResizingEnabled` and
|
|
10
|
+
`isTableAlignmentEnabled` from `InitialPluginConfiguration`, and added these options as part of
|
|
11
|
+
tablePlugin.tableOptions configuration instead. The new options for each are allowTableResizing
|
|
12
|
+
and allowTableAlignment respectively and can be configured on the Editor component via
|
|
13
|
+
`allowTables` or via preset configurations.
|
|
14
|
+
|
|
15
|
+
**Warning**: Both these features require ADF storage to persist these changes.
|
|
16
|
+
|
|
17
|
+
### WHY?
|
|
18
|
+
|
|
19
|
+
To make these table features available for consumers who have no adopted composable editor and
|
|
20
|
+
want to enable table resizing and table alignment features
|
|
21
|
+
|
|
22
|
+
### WHAT changed?
|
|
23
|
+
|
|
24
|
+
**Removed** `InitialPluginConfiguration` type: Removed `tablePlugin` and child properties -
|
|
25
|
+
`isTableAlignmentEnabled`, `tableResizingEnabled`
|
|
26
|
+
|
|
27
|
+
**Added** `TableOptions` type: Added `allowTableResizing` and `allowTableAlignment`
|
|
28
|
+
|
|
29
|
+
### HOW to resolve?
|
|
30
|
+
|
|
31
|
+
Move the options from `initialPluginConfiguration` to `tableOptions`
|
|
32
|
+
|
|
33
|
+
Example:
|
|
34
|
+
|
|
35
|
+
Before
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const universalPreset = useUniversalPreset([
|
|
39
|
+
tablePlugin,
|
|
40
|
+
{ tableResizingEnabled: true, isTableAlignmentEnabled: true, tableOptions: {} },
|
|
41
|
+
]);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
After
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const universalPreset = useUniversalPreset([
|
|
48
|
+
tablePlugin,
|
|
49
|
+
{ tableOptions: { allowTableResizing: true, allowTableAlignment: true } },
|
|
50
|
+
]);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Before
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
return (
|
|
57
|
+
<Editor
|
|
58
|
+
allowTables={{advanced: true}}
|
|
59
|
+
initialPluginConfiguration={{
|
|
60
|
+
tablesPlugin: {
|
|
61
|
+
tableResizingEnabled: true, isTableAlignmentEnabled: true,
|
|
62
|
+
}
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
After
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
return (
|
|
72
|
+
<Editor
|
|
73
|
+
allowTables={{advanced: true, allowTableResizing: enabled, allowTableAlignment: true}}
|
|
74
|
+
|
|
75
|
+
/>
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- [#166172](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166172)
|
|
82
|
+
[`00bf95ef0cc72`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/00bf95ef0cc72) -
|
|
83
|
+
[ux] [ED-25535] Fix for issue where resize handler decorations added/removed in view mode affected
|
|
84
|
+
selection range.
|
|
85
|
+
|
|
86
|
+
## 7.31.3
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- [#165001](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/165001)
|
|
91
|
+
[`d77bdbfe892ed`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d77bdbfe892ed) -
|
|
92
|
+
tidy table duplicate cell color experiment
|
|
93
|
+
- Updated dependencies
|
|
94
|
+
|
|
3
95
|
## 7.31.2
|
|
4
96
|
|
|
5
97
|
### Patch Changes
|
|
@@ -30,10 +30,9 @@ function addColumnAtCustomStep(column) {
|
|
|
30
30
|
}
|
|
31
31
|
function addColumnAt(api) {
|
|
32
32
|
var isTableScalingEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var isCommentEditor = arguments.length > 5 ? arguments[5] : undefined;
|
|
33
|
+
var isTableFixedColumnWidthsOptionEnabled = arguments.length > 2 ? arguments[2] : undefined;
|
|
34
|
+
var shouldUseIncreasedScalingPercent = arguments.length > 3 ? arguments[3] : undefined;
|
|
35
|
+
var isCommentEditor = arguments.length > 4 ? arguments[4] : undefined;
|
|
37
36
|
return function (column) {
|
|
38
37
|
var allowAddColumnCustomStep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
39
38
|
var view = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -42,7 +41,7 @@ function addColumnAt(api) {
|
|
|
42
41
|
if (allowAddColumnCustomStep) {
|
|
43
42
|
updatedTr = addColumnAtCustomStep(column)(updatedTr);
|
|
44
43
|
} else {
|
|
45
|
-
updatedTr = (0, _utils2.addColumnAt)(column
|
|
44
|
+
updatedTr = (0, _utils2.addColumnAt)(column)(updatedTr);
|
|
46
45
|
}
|
|
47
46
|
var table = (0, _utils2.findTable)(updatedTr.selection);
|
|
48
47
|
if (table) {
|
|
@@ -66,10 +65,9 @@ function addColumnAt(api) {
|
|
|
66
65
|
// Command to add a column before the column with the selection.
|
|
67
66
|
var addColumnBefore = exports.addColumnBefore = function addColumnBefore(api) {
|
|
68
67
|
var isTableScalingEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var isCommentEditor = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
68
|
+
var isTableFixedColumnWidthsOptionEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
69
|
+
var shouldUseIncreasedScalingPercent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
70
|
+
var isCommentEditor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
73
71
|
return function (state, dispatch, view) {
|
|
74
72
|
var table = (0, _utils2.findTable)(state.selection);
|
|
75
73
|
if (!table) {
|
|
@@ -77,7 +75,7 @@ var addColumnBefore = exports.addColumnBefore = function addColumnBefore(api) {
|
|
|
77
75
|
}
|
|
78
76
|
if (dispatch) {
|
|
79
77
|
var rect = (0, _utils2.selectedRect)(state);
|
|
80
|
-
dispatch(addColumnAt(api, isTableScalingEnabled,
|
|
78
|
+
dispatch(addColumnAt(api, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor)(rect.left, (0, _getAllowAddColumnCustomStep.getAllowAddColumnCustomStep)(state), view)(state.tr));
|
|
81
79
|
}
|
|
82
80
|
return true;
|
|
83
81
|
};
|
|
@@ -85,7 +83,7 @@ var addColumnBefore = exports.addColumnBefore = function addColumnBefore(api) {
|
|
|
85
83
|
|
|
86
84
|
// :: (EditorState, dispatch: ?(tr: Transaction)) → bool
|
|
87
85
|
// Command to add a column after the column with the selection.
|
|
88
|
-
var addColumnAfter = exports.addColumnAfter = function addColumnAfter(api, isTableScalingEnabled,
|
|
86
|
+
var addColumnAfter = exports.addColumnAfter = function addColumnAfter(api, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor) {
|
|
89
87
|
return function (state, dispatch, view) {
|
|
90
88
|
var table = (0, _utils2.findTable)(state.selection);
|
|
91
89
|
if (!table) {
|
|
@@ -93,20 +91,19 @@ var addColumnAfter = exports.addColumnAfter = function addColumnAfter(api, isTab
|
|
|
93
91
|
}
|
|
94
92
|
if (dispatch) {
|
|
95
93
|
var rect = (0, _utils2.selectedRect)(state);
|
|
96
|
-
dispatch(addColumnAt(api, isTableScalingEnabled,
|
|
94
|
+
dispatch(addColumnAt(api, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor)(rect.right, (0, _getAllowAddColumnCustomStep.getAllowAddColumnCustomStep)(state), view)(state.tr));
|
|
97
95
|
}
|
|
98
96
|
return true;
|
|
99
97
|
};
|
|
100
98
|
};
|
|
101
99
|
var insertColumn = exports.insertColumn = function insertColumn(api) {
|
|
102
100
|
var isTableScalingEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
103
|
-
var
|
|
104
|
-
var
|
|
105
|
-
var
|
|
106
|
-
var isCommentEditor = arguments.length > 5 ? arguments[5] : undefined;
|
|
101
|
+
var isTableFixedColumnWidthsOptionEnabled = arguments.length > 2 ? arguments[2] : undefined;
|
|
102
|
+
var shouldUseIncreasedScalingPercent = arguments.length > 3 ? arguments[3] : undefined;
|
|
103
|
+
var isCommentEditor = arguments.length > 4 ? arguments[4] : undefined;
|
|
107
104
|
return function (column) {
|
|
108
105
|
return function (state, dispatch, view) {
|
|
109
|
-
var tr = addColumnAt(api, isTableScalingEnabled,
|
|
106
|
+
var tr = addColumnAt(api, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor)(column, (0, _getAllowAddColumnCustomStep.getAllowAddColumnCustomStep)(state), view)(state.tr);
|
|
110
107
|
var table = (0, _utils2.findTable)(tr.selection);
|
|
111
108
|
if (!table) {
|
|
112
109
|
return false;
|
|
@@ -120,7 +117,7 @@ var insertColumn = exports.insertColumn = function insertColumn(api) {
|
|
|
120
117
|
};
|
|
121
118
|
};
|
|
122
119
|
};
|
|
123
|
-
var insertRow = exports.insertRow = function insertRow(row, moveCursorToTheNewRow
|
|
120
|
+
var insertRow = exports.insertRow = function insertRow(row, moveCursorToTheNewRow) {
|
|
124
121
|
return function (state, dispatch) {
|
|
125
122
|
// Don't clone the header row
|
|
126
123
|
var headerRowEnabled = (0, _utils3.checkIfHeaderRowEnabled)(state.selection);
|
|
@@ -131,7 +128,7 @@ var insertRow = exports.insertRow = function insertRow(row, moveCursorToTheNewRo
|
|
|
131
128
|
if (row === 0 && headerRowEnabled) {
|
|
132
129
|
return false;
|
|
133
130
|
}
|
|
134
|
-
var tr = clonePreviousRow ? (0, _utils3.copyPreviousRow)(state.schema)(row)(state.tr) : (0, _utils2.addRowAt)(row, undefined
|
|
131
|
+
var tr = clonePreviousRow ? (0, _utils3.copyPreviousRow)(state.schema)(row)(state.tr) : (0, _utils2.addRowAt)(row, undefined)(state.tr);
|
|
135
132
|
var table = (0, _utils2.findTable)(tr.selection);
|
|
136
133
|
if (!table) {
|
|
137
134
|
return false;
|
|
@@ -167,7 +167,6 @@ var addRowAroundSelection = exports.addRowAroundSelection = function addRowAroun
|
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
var insertRowWithAnalytics = exports.insertRowWithAnalytics = function insertRowWithAnalytics(editorAnalyticsAPI) {
|
|
170
|
-
var isCellbackgroundDuplicated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
171
170
|
return function (inputMethod, options) {
|
|
172
171
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
173
172
|
var _getSelectedTableInfo = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
@@ -185,7 +184,7 @@ var insertRowWithAnalytics = exports.insertRowWithAnalytics = function insertRow
|
|
|
185
184
|
},
|
|
186
185
|
eventType: _analytics.EVENT_TYPE.TRACK
|
|
187
186
|
};
|
|
188
|
-
})(editorAnalyticsAPI)((0, _insert.insertRow)(options.index, options.moveCursorToInsertedRow
|
|
187
|
+
})(editorAnalyticsAPI)((0, _insert.insertRow)(options.index, options.moveCursorToInsertedRow));
|
|
189
188
|
};
|
|
190
189
|
};
|
|
191
190
|
var changeColumnWidthByStepWithAnalytics = exports.changeColumnWidthByStepWithAnalytics = function changeColumnWidthByStepWithAnalytics(editorAnalyticsAPI, api) {
|
|
@@ -225,10 +224,9 @@ var changeColumnWidthByStepWithAnalytics = exports.changeColumnWidthByStepWithAn
|
|
|
225
224
|
};
|
|
226
225
|
var insertColumnWithAnalytics = exports.insertColumnWithAnalytics = function insertColumnWithAnalytics(api, editorAnalyticsAPI) {
|
|
227
226
|
var isTableScalingEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
228
|
-
var
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
var isCommentEditor = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
227
|
+
var isTableFixedColumnWidthsOptionEnabled = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
228
|
+
var shouldUseIncreasedScalingPercent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
229
|
+
var isCommentEditor = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
232
230
|
return function (inputMethod, position) {
|
|
233
231
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
234
232
|
var _getSelectedTableInfo3 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
@@ -246,7 +244,7 @@ var insertColumnWithAnalytics = exports.insertColumnWithAnalytics = function ins
|
|
|
246
244
|
},
|
|
247
245
|
eventType: _analytics.EVENT_TYPE.TRACK
|
|
248
246
|
};
|
|
249
|
-
})(editorAnalyticsAPI)((0, _insert.insertColumn)(api, isTableScalingEnabled,
|
|
247
|
+
})(editorAnalyticsAPI)((0, _insert.insertColumn)(api, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor)(position));
|
|
250
248
|
};
|
|
251
249
|
};
|
|
252
250
|
var deleteRowsWithAnalytics = exports.deleteRowsWithAnalytics = function deleteRowsWithAnalytics(editorAnalyticsAPI) {
|
|
@@ -407,11 +407,22 @@ var isTableInFocus = exports.isTableInFocus = function isTableInFocus(view) {
|
|
|
407
407
|
var _getPluginState10, _getResizePluginState;
|
|
408
408
|
return !!((_getPluginState10 = (0, _pluginFactory2.getPluginState)(view.state)) !== null && _getPluginState10 !== void 0 && _getPluginState10.tableNode) && !((_getResizePluginState = (0, _pluginFactory3.getPluginState)(view.state)) !== null && _getResizePluginState !== void 0 && _getResizePluginState.dragging);
|
|
409
409
|
};
|
|
410
|
-
var whenTableInFocus = exports.whenTableInFocus = function whenTableInFocus(eventHandler) {
|
|
410
|
+
var whenTableInFocus = exports.whenTableInFocus = function whenTableInFocus(eventHandler, pluginInjectionApi) {
|
|
411
411
|
return function (view, mouseEvent) {
|
|
412
|
+
var _pluginInjectionApi$e;
|
|
412
413
|
if (!isTableInFocus(view)) {
|
|
413
414
|
return false;
|
|
414
415
|
}
|
|
416
|
+
var isViewMode = (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) === 'view';
|
|
417
|
+
/**
|
|
418
|
+
* Table cannot be in focus if we are in view mode.
|
|
419
|
+
* This will prevent an infinite flow of adding and removing
|
|
420
|
+
* resize handle decorations in view mode that causes unpredictable
|
|
421
|
+
* selections.
|
|
422
|
+
*/
|
|
423
|
+
if (isViewMode) {
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
415
426
|
return eventHandler(view, mouseEvent);
|
|
416
427
|
};
|
|
417
428
|
};
|
|
@@ -155,7 +155,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
155
155
|
var _this$props = _this.props,
|
|
156
156
|
getNode = _this$props.getNode,
|
|
157
157
|
containerWidth = _this$props.containerWidth,
|
|
158
|
-
options = _this$props.options
|
|
158
|
+
options = _this$props.options,
|
|
159
|
+
allowTableResizing = _this$props.allowTableResizing;
|
|
159
160
|
var prevNode = _this.node;
|
|
160
161
|
var node = getNode();
|
|
161
162
|
var prevAttrs = prevNode.attrs;
|
|
@@ -189,7 +190,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
189
190
|
// This last check is also to cater for dynamic text sizing changing the 'default' layout width
|
|
190
191
|
// Usually happens on window resize.
|
|
191
192
|
layoutSize !== _this.layoutSize || noOfColumnsChanged) {
|
|
192
|
-
var shouldScaleTable = (!
|
|
193
|
+
var shouldScaleTable = (!allowTableResizing || allowTableResizing && isNested) && !hasNumberedColumnChanged && !noOfColumnsChanged;
|
|
193
194
|
|
|
194
195
|
// If column has been inserted/deleted avoid multi dispatch
|
|
195
196
|
if (shouldScaleTable) {
|
|
@@ -199,7 +200,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
// only when table resizing is enabled and toggle numbered column to run scaleTable
|
|
202
|
-
if (
|
|
203
|
+
if (allowTableResizing && hasNumberedColumnChanged) {
|
|
203
204
|
if (!(0, _colgroup.hasTableBeenResized)(prevNode)) {
|
|
204
205
|
_this.scaleTable({
|
|
205
206
|
parentWidth: node.attrs.width
|
|
@@ -251,7 +252,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
251
252
|
var _this$props3 = _this.props,
|
|
252
253
|
dispatchAnalyticsEvent = _this$props3.dispatchAnalyticsEvent,
|
|
253
254
|
containerWidth = _this$props3.containerWidth,
|
|
254
|
-
|
|
255
|
+
allowTableResizing = _this$props3.allowTableResizing;
|
|
255
256
|
var parentWidth = ((_this$state = _this.state) === null || _this$state === void 0 ? void 0 : _this$state.parentWidth) || 0;
|
|
256
257
|
_this.initialOverflowCaptureTimerId = setTimeout(function () {
|
|
257
258
|
dispatchAnalyticsEvent({
|
|
@@ -262,7 +263,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
262
263
|
attributes: {
|
|
263
264
|
editorWidth: containerWidth.width || 0,
|
|
264
265
|
isOverflowing: isOverflowing,
|
|
265
|
-
tableResizingEnabled:
|
|
266
|
+
tableResizingEnabled: allowTableResizing || false,
|
|
266
267
|
width: _this.node.attrs.width || 0,
|
|
267
268
|
parentWidth: parentWidth
|
|
268
269
|
}
|
|
@@ -383,8 +384,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
383
384
|
_this2 = this;
|
|
384
385
|
var _this$props7 = this.props,
|
|
385
386
|
allowColumnResizing = _this$props7.allowColumnResizing,
|
|
387
|
+
allowTableResizing = _this$props7.allowTableResizing,
|
|
386
388
|
eventDispatcher = _this$props7.eventDispatcher,
|
|
387
|
-
options = _this$props7.options,
|
|
388
389
|
isDragAndDropEnabled = _this$props7.isDragAndDropEnabled,
|
|
389
390
|
getNode = _this$props7.getNode,
|
|
390
391
|
getEditorFeatureFlags = _this$props7.getEditorFeatureFlags,
|
|
@@ -437,7 +438,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
437
438
|
* We no longer use `containerWidth` as a variable to determine an update for table resizing (avoids unnecessary updates).
|
|
438
439
|
* Instead we use the resize event to only trigger updates when necessary.
|
|
439
440
|
*/
|
|
440
|
-
if (!
|
|
441
|
+
if (!allowTableResizing) {
|
|
441
442
|
window.addEventListener('resize', this.handleWindowResizeDebounced);
|
|
442
443
|
}
|
|
443
444
|
this.handleTableResizingDebounced();
|
|
@@ -458,8 +459,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
458
459
|
var _this$resizeObserver, _this$wrapperReisizeO, _this$table4, _this$table5, _this$table6;
|
|
459
460
|
var _this$props8 = this.props,
|
|
460
461
|
allowColumnResizing = _this$props8.allowColumnResizing,
|
|
462
|
+
allowTableResizing = _this$props8.allowTableResizing,
|
|
461
463
|
eventDispatcher = _this$props8.eventDispatcher,
|
|
462
|
-
options = _this$props8.options,
|
|
463
464
|
isDragAndDropEnabled = _this$props8.isDragAndDropEnabled;
|
|
464
465
|
if (this.wrapper && !isIE11) {
|
|
465
466
|
this.wrapper.removeEventListener('scroll', this.handleScrollDebounced);
|
|
@@ -476,10 +477,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
476
477
|
this.scaleTableDebounced.cancel();
|
|
477
478
|
this.handleTableResizingDebounced.cancel();
|
|
478
479
|
this.handleAutoSizeDebounced.cancel();
|
|
479
|
-
if (!
|
|
480
|
+
if (!allowTableResizing) {
|
|
480
481
|
this.handleWindowResizeDebounced.cancel();
|
|
481
482
|
}
|
|
482
|
-
if (!
|
|
483
|
+
if (!allowTableResizing && allowColumnResizing) {
|
|
483
484
|
window.removeEventListener('resize', this.handleWindowResizeDebounced);
|
|
484
485
|
}
|
|
485
486
|
this === null || this === void 0 || (_this$table4 = this.table) === null || _this$table4 === void 0 || _this$table4.removeEventListener('mouseenter', this.handleMouseEnter);
|
|
@@ -626,6 +627,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
626
627
|
getNode = _this$props11.getNode,
|
|
627
628
|
isMediaFullscreen = _this$props11.isMediaFullscreen,
|
|
628
629
|
allowColumnResizing = _this$props11.allowColumnResizing,
|
|
630
|
+
allowTableResizing = _this$props11.allowTableResizing,
|
|
629
631
|
isResizing = _this$props11.isResizing,
|
|
630
632
|
options = _this$props11.options,
|
|
631
633
|
isTableScalingEnabled = _this$props11.isTableScalingEnabled,
|
|
@@ -658,7 +660,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
658
660
|
if (isInDanger && !table) {
|
|
659
661
|
(0, _commands.clearHoverSelection)()(view.state, view.dispatch);
|
|
660
662
|
}
|
|
661
|
-
if ((_this$props$options9 = this.props.options) !== null && _this$props$options9 !== void 0 && _this$props$options9.isCommentEditor &&
|
|
663
|
+
if ((_this$props$options9 = this.props.options) !== null && _this$props$options9 !== void 0 && _this$props$options9.isCommentEditor && allowTableResizing && !(options !== null && options !== void 0 && options.isTableScalingEnabled)) {
|
|
662
664
|
this.removeInlineTableWidth();
|
|
663
665
|
}
|
|
664
666
|
if ((_this$wrapper = this.wrapper) !== null && _this$wrapper !== void 0 && _this$wrapper.parentElement && this.table && !this.overflowShadowsObserver) {
|
|
@@ -698,7 +700,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
698
700
|
// re-draw colgroup.
|
|
699
701
|
if ((0, _utils5.tablesHaveDifferentColumnWidths)(currentTable, previousTable) || isNoOfColumnsChanged) {
|
|
700
702
|
var _view = this.props.view;
|
|
701
|
-
var shouldRecreateResizeCols = !
|
|
703
|
+
var shouldRecreateResizeCols = !allowTableResizing || !isResizing || isNoOfColumnsChanged && isResizing;
|
|
702
704
|
if (shouldRecreateResizeCols) {
|
|
703
705
|
var start = getPos() || 0;
|
|
704
706
|
var depth = _view.state.doc.resolve(start).depth;
|
|
@@ -766,7 +768,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
766
768
|
isDragAndDropEnabled = _this$props12.isDragAndDropEnabled,
|
|
767
769
|
getEditorFeatureFlags = _this$props12.getEditorFeatureFlags,
|
|
768
770
|
isTableScalingEnabled = _this$props12.isTableScalingEnabled,
|
|
769
|
-
|
|
771
|
+
allowTableResizing = _this$props12.allowTableResizing,
|
|
772
|
+
allowTableAlignment = _this$props12.allowTableAlignment;
|
|
770
773
|
var _this$props13 = this.props,
|
|
771
774
|
isInDanger = _this$props13.isInDanger,
|
|
772
775
|
hoveredRows = _this$props13.hoveredRows,
|
|
@@ -880,12 +883,12 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
880
883
|
isNested: isNested,
|
|
881
884
|
pluginInjectionApi: pluginInjectionApi,
|
|
882
885
|
tableWrapperHeight: this.state.tableWrapperHeight,
|
|
883
|
-
isTableResizingEnabled:
|
|
886
|
+
isTableResizingEnabled: allowTableResizing,
|
|
884
887
|
isResizing: isResizing,
|
|
885
888
|
isTableScalingEnabled: isTableScalingEnabled,
|
|
886
889
|
isTableWithFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption,
|
|
887
890
|
isWholeTableInDanger: isWholeTableInDanger,
|
|
888
|
-
isTableAlignmentEnabled:
|
|
891
|
+
isTableAlignmentEnabled: allowTableAlignment,
|
|
889
892
|
shouldUseIncreasedScalingPercent: shouldUseIncreasedScalingPercent,
|
|
890
893
|
isCommentEditor: options === null || options === void 0 ? void 0 : options.isCommentEditor,
|
|
891
894
|
isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor
|
|
@@ -23,7 +23,9 @@ var TableComponentWithSharedState = exports.TableComponentWithSharedState = func
|
|
|
23
23
|
allowColumnResizing = _ref.allowColumnResizing,
|
|
24
24
|
allowControls = _ref.allowControls,
|
|
25
25
|
getPos = _ref.getPos,
|
|
26
|
-
forwardRef = _ref.forwardRef
|
|
26
|
+
forwardRef = _ref.forwardRef,
|
|
27
|
+
allowTableAlignment = _ref.allowTableAlignment,
|
|
28
|
+
allowTableResizing = _ref.allowTableResizing;
|
|
27
29
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['width', 'table', 'media']),
|
|
28
30
|
widthState = _useSharedPluginState.widthState,
|
|
29
31
|
tableState = _useSharedPluginState.tableState,
|
|
@@ -69,7 +71,8 @@ var TableComponentWithSharedState = exports.TableComponentWithSharedState = func
|
|
|
69
71
|
isHeaderColumnEnabled: isHeaderColumnEnabled,
|
|
70
72
|
isDragAndDropEnabled: options === null || options === void 0 ? void 0 : options.isDragAndDropEnabled,
|
|
71
73
|
isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
|
|
72
|
-
|
|
74
|
+
allowTableAlignment: allowTableAlignment,
|
|
75
|
+
allowTableResizing: allowTableResizing,
|
|
73
76
|
tableActive: tableActive,
|
|
74
77
|
ordering: ordering,
|
|
75
78
|
isResizing: isResizing,
|
|
@@ -16,7 +16,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
16
16
|
var lazyTableView = exports.lazyTableView = function lazyTableView(options) {
|
|
17
17
|
if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false)) {
|
|
18
18
|
return function (node, view, getPos) {
|
|
19
|
-
return (0, _table.createTableView)(node, view, getPos, options.portalProviderAPI, options.eventDispatcher, options.getEditorContainerWidth, options.getEditorFeatureFlags, options.dispatchAnalyticsEvent, options.pluginInjectionApi, options.
|
|
19
|
+
return (0, _table.createTableView)(node, view, getPos, options.portalProviderAPI, options.eventDispatcher, options.getEditorContainerWidth, options.getEditorFeatureFlags, options.dispatchAnalyticsEvent, options.pluginInjectionApi, options.isCommentEditor, options.isChromelessEditor);
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
var loader = function loader() {
|
|
@@ -33,10 +33,9 @@ var lazyTableView = exports.lazyTableView = function lazyTableView(options) {
|
|
|
33
33
|
getEditorFeatureFlags = _getNodeViewOptions.getEditorFeatureFlags,
|
|
34
34
|
dispatchAnalyticsEvent = _getNodeViewOptions.dispatchAnalyticsEvent,
|
|
35
35
|
pluginInjectionApi = _getNodeViewOptions.pluginInjectionApi,
|
|
36
|
-
isTableAlignmentEnabled = _getNodeViewOptions.isTableAlignmentEnabled,
|
|
37
36
|
isCommentEditor = _getNodeViewOptions.isCommentEditor,
|
|
38
37
|
isChromelessEditor = _getNodeViewOptions.isChromelessEditor;
|
|
39
|
-
return createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi,
|
|
38
|
+
return createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi, isCommentEditor, isChromelessEditor);
|
|
40
39
|
};
|
|
41
40
|
});
|
|
42
41
|
return result;
|
|
@@ -45,15 +45,15 @@ var tableAttributes = function tableAttributes(node) {
|
|
|
45
45
|
'data-table-display-mode': node.attrs.displayMode
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
var getInlineWidth = function getInlineWidth(node, options, state, pos) {
|
|
49
|
-
if (!node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor &&
|
|
48
|
+
var getInlineWidth = function getInlineWidth(node, options, state, pos, allowTableResizing) {
|
|
49
|
+
if (!node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// provide a width for tables when custom table width is supported
|
|
54
54
|
// this is to ensure 'responsive' tables (colgroup widths are undefined) become fixed to
|
|
55
55
|
// support screen size adjustments
|
|
56
|
-
var shouldHaveInlineWidth =
|
|
56
|
+
var shouldHaveInlineWidth = allowTableResizing && !(0, _utils2.isTableNested)(state, pos);
|
|
57
57
|
var widthValue = (0, _nodeWidth.getTableContainerWidth)(node);
|
|
58
58
|
if (node.attrs.isNumberColumnEnabled) {
|
|
59
59
|
widthValue -= _editorSharedStyles.akEditorTableNumberColumnWidth;
|
|
@@ -98,7 +98,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
98
98
|
var _this$options, _this$options2, _this$getEditorFeatur;
|
|
99
99
|
this.table = rendered.dom;
|
|
100
100
|
if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.isTableScalingEnabled) || (_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.isTableScalingEnabled && (_this$getEditorFeatur = this.getEditorFeatureFlags) !== null && _this$getEditorFeatur !== void 0 && _this$getEditorFeatur.call(this).tableWithFixedColumnWidthsOption && this.node.attrs.displayMode === 'fixed') {
|
|
101
|
-
var tableInlineWidth = getInlineWidth(this.node, this.reactComponentProps.options, this.reactComponentProps.view.state, this.reactComponentProps.getPos());
|
|
101
|
+
var tableInlineWidth = getInlineWidth(this.node, this.reactComponentProps.options, this.reactComponentProps.view.state, this.reactComponentProps.getPos(), this.reactComponentProps.allowTableResizing);
|
|
102
102
|
if (tableInlineWidth) {
|
|
103
103
|
handleInlineTableWidth(this.table, tableInlineWidth);
|
|
104
104
|
}
|
|
@@ -125,7 +125,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
125
125
|
if (!((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.isTableScalingEnabled) || (_this$options4 = this.options) !== null && _this$options4 !== void 0 && _this$options4.isTableScalingEnabled && (_this$getEditorFeatur2 = this.getEditorFeatureFlags) !== null && _this$getEditorFeatur2 !== void 0 && _this$getEditorFeatur2.call(this).tableWithFixedColumnWidthsOption && node.attrs.displayMode === 'fixed') {
|
|
126
126
|
var _tableWidthPluginKey$;
|
|
127
127
|
// handle inline style when table been resized
|
|
128
|
-
var tableInlineWidth = getInlineWidth(node, this.reactComponentProps.options, this.view.state, this.getPos());
|
|
128
|
+
var tableInlineWidth = getInlineWidth(node, this.reactComponentProps.options, this.view.state, this.getPos(), this.reactComponentProps.allowTableResizing);
|
|
129
129
|
var isTableResizing = (_tableWidthPluginKey$ = _tableWidth.pluginKey.getState(this.view.state)) === null || _tableWidthPluginKey$ === void 0 ? void 0 : _tableWidthPluginKey$.resizing;
|
|
130
130
|
if (!isTableResizing && tableInlineWidth) {
|
|
131
131
|
handleInlineTableWidth(this.table, tableInlineWidth);
|
|
@@ -145,6 +145,8 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
145
145
|
eventDispatcher: props.eventDispatcher,
|
|
146
146
|
api: props.pluginInjectionApi,
|
|
147
147
|
allowColumnResizing: props.allowColumnResizing,
|
|
148
|
+
allowTableAlignment: props.allowTableAlignment,
|
|
149
|
+
allowTableResizing: props.allowTableResizing,
|
|
148
150
|
allowControls: props.allowControls,
|
|
149
151
|
getPos: props.getPos,
|
|
150
152
|
getEditorFeatureFlags: props.getEditorFeatureFlags,
|
|
@@ -182,7 +184,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
182
184
|
},
|
|
183
185
|
editorView: props.view,
|
|
184
186
|
render: function render(pluginStates) {
|
|
185
|
-
var _props$options
|
|
187
|
+
var _props$options;
|
|
186
188
|
var tableResizingPluginState = pluginStates.tableResizingPluginState,
|
|
187
189
|
tableWidthPluginState = pluginStates.tableWidthPluginState,
|
|
188
190
|
pluginState = pluginStates.pluginState,
|
|
@@ -216,7 +218,8 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
216
218
|
isDragAndDropEnabled: pluginState.isDragAndDropEnabled,
|
|
217
219
|
isTableScalingEnabled: (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.isTableScalingEnabled // this.options?.isTableScalingEnabled same as TableOptions.isTableScalingEnabled same as pluginState.isTableScalingEnabled
|
|
218
220
|
,
|
|
219
|
-
|
|
221
|
+
allowTableAlignment: props.allowTableAlignment,
|
|
222
|
+
allowTableResizing: props.allowTableResizing,
|
|
220
223
|
tableActive: tableActive,
|
|
221
224
|
ordering: pluginState.ordering,
|
|
222
225
|
isResizing: isResizing,
|
|
@@ -293,21 +296,24 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
293
296
|
}]);
|
|
294
297
|
return TableView;
|
|
295
298
|
}(_reactNodeView.default);
|
|
296
|
-
var createTableView = exports.createTableView = function createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi,
|
|
299
|
+
var createTableView = exports.createTableView = function createTableView(node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi, isCommentEditor, isChromelessEditor) {
|
|
297
300
|
var _getPluginState2 = (0, _pluginFactory.getPluginState)(view.state),
|
|
298
301
|
pluginConfig = _getPluginState2.pluginConfig,
|
|
299
302
|
isFullWidthModeEnabled = _getPluginState2.isFullWidthModeEnabled,
|
|
300
303
|
wasFullWidthModeEnabled = _getPluginState2.wasFullWidthModeEnabled,
|
|
301
|
-
isTableResizingEnabled = _getPluginState2.isTableResizingEnabled,
|
|
302
304
|
isDragAndDropEnabled = _getPluginState2.isDragAndDropEnabled,
|
|
303
305
|
isTableScalingEnabled = _getPluginState2.isTableScalingEnabled;
|
|
304
306
|
var _getPluginConfig = (0, _createPluginConfig.pluginConfig)(pluginConfig),
|
|
305
307
|
allowColumnResizing = _getPluginConfig.allowColumnResizing,
|
|
306
|
-
allowControls = _getPluginConfig.allowControls
|
|
308
|
+
allowControls = _getPluginConfig.allowControls,
|
|
309
|
+
allowTableResizing = _getPluginConfig.allowTableResizing,
|
|
310
|
+
allowTableAlignment = _getPluginConfig.allowTableAlignment;
|
|
307
311
|
return new TableView({
|
|
308
312
|
node: node,
|
|
309
313
|
view: view,
|
|
310
314
|
allowColumnResizing: allowColumnResizing,
|
|
315
|
+
allowTableResizing: allowTableResizing,
|
|
316
|
+
allowTableAlignment: allowTableAlignment,
|
|
311
317
|
allowControls: allowControls,
|
|
312
318
|
portalProviderAPI: portalProviderAPI,
|
|
313
319
|
eventDispatcher: eventDispatcher,
|
|
@@ -315,11 +321,9 @@ var createTableView = exports.createTableView = function createTableView(node, v
|
|
|
315
321
|
options: {
|
|
316
322
|
isFullWidthModeEnabled: isFullWidthModeEnabled,
|
|
317
323
|
wasFullWidthModeEnabled: wasFullWidthModeEnabled,
|
|
318
|
-
isTableResizingEnabled: isTableResizingEnabled,
|
|
319
324
|
isDragAndDropEnabled: isDragAndDropEnabled,
|
|
320
325
|
isTableScalingEnabled: isTableScalingEnabled,
|
|
321
326
|
// same as options.isTableScalingEnabled
|
|
322
|
-
isTableAlignmentEnabled: isTableAlignmentEnabled,
|
|
323
327
|
isCommentEditor: isCommentEditor,
|
|
324
328
|
isChromelessEditor: isChromelessEditor
|
|
325
329
|
},
|