@atlaskit/editor-plugin-table 7.5.10 → 7.5.11
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 +7 -0
- package/dist/cjs/plugin.js +4 -2
- package/dist/cjs/pm-plugins/keymap.js +4 -3
- package/dist/cjs/ui/icons/DragHandleDisabledIcon.js +2 -1
- package/dist/cjs/ui/icons/DragHandleIcon.js +2 -1
- package/dist/es2019/plugin.js +3 -2
- package/dist/es2019/pm-plugins/keymap.js +4 -4
- package/dist/es2019/ui/icons/DragHandleDisabledIcon.js +2 -1
- package/dist/es2019/ui/icons/DragHandleIcon.js +2 -1
- package/dist/esm/plugin.js +4 -2
- package/dist/esm/pm-plugins/keymap.js +4 -3
- package/dist/esm/ui/icons/DragHandleDisabledIcon.js +2 -1
- package/dist/esm/ui/icons/DragHandleIcon.js +2 -1
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +1 -1
- package/package.json +2 -2
- package/src/plugin.tsx +6 -3
- package/src/pm-plugins/keymap.ts +11 -2
- package/src/ui/icons/DragHandleDisabledIcon.tsx +1 -0
- package/src/ui/icons/DragHandleIcon.tsx +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.5.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#82119](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82119) [`0358b8d41041`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0358b8d41041) - insert table at full width via shortcut in full width page
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 7.5.10
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -157,8 +157,10 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
157
157
|
var _ref6 = options || {},
|
|
158
158
|
dragAndDropEnabled = _ref6.dragAndDropEnabled,
|
|
159
159
|
_ref6$isTableScalingE = _ref6.isTableScalingEnabled,
|
|
160
|
-
isTableScalingEnabled = _ref6$isTableScalingE === void 0 ? false : _ref6$isTableScalingE
|
|
161
|
-
|
|
160
|
+
isTableScalingEnabled = _ref6$isTableScalingE === void 0 ? false : _ref6$isTableScalingE,
|
|
161
|
+
_ref6$fullWidthEnable = _ref6.fullWidthEnabled,
|
|
162
|
+
fullWidthEnabled = _ref6$fullWidthEnable === void 0 ? false : _ref6$fullWidthEnable;
|
|
163
|
+
return (0, _keymap.keymapPlugin)(defaultGetEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled, fullWidthEnabled);
|
|
162
164
|
}
|
|
163
165
|
}, {
|
|
164
166
|
name: 'tableSelectionKeymap',
|
|
@@ -16,7 +16,7 @@ var _columnResize = require("../commands/column-resize");
|
|
|
16
16
|
var _insert = require("../commands/insert");
|
|
17
17
|
var _commandsWithAnalytics2 = require("../pm-plugins/drag-and-drop/commands-with-analytics");
|
|
18
18
|
var _analytics2 = require("../utils/analytics");
|
|
19
|
-
var createTableWithAnalytics = function createTableWithAnalytics(editorAnalyticsAPI) {
|
|
19
|
+
var createTableWithAnalytics = function createTableWithAnalytics(isTableScalingEnabled, isFullWidthModeEnabled, editorAnalyticsAPI) {
|
|
20
20
|
return (0, _analytics2.withEditorAnalyticsAPI)({
|
|
21
21
|
action: _analytics.ACTION.INSERTED,
|
|
22
22
|
actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
|
|
@@ -25,14 +25,15 @@ var createTableWithAnalytics = function createTableWithAnalytics(editorAnalytics
|
|
|
25
25
|
inputMethod: _analytics.INPUT_METHOD.SHORTCUT
|
|
26
26
|
},
|
|
27
27
|
eventType: _analytics.EVENT_TYPE.TRACK
|
|
28
|
-
})(editorAnalyticsAPI)((0, _commands2.createTable)());
|
|
28
|
+
})(editorAnalyticsAPI)((0, _commands2.createTable)(isTableScalingEnabled, isFullWidthModeEnabled));
|
|
29
29
|
};
|
|
30
30
|
function keymapPlugin(getEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled) {
|
|
31
31
|
var isTableScalingEnabled = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
32
|
+
var isFullWidthEnabled = arguments.length > 4 ? arguments[4] : undefined;
|
|
32
33
|
var list = {};
|
|
33
34
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.nextCell.common, (0, _commands2.goToNextCell)(editorAnalyticsAPI)(1), list);
|
|
34
35
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.previousCell.common, (0, _commands2.goToNextCell)(editorAnalyticsAPI)(-1), list);
|
|
35
|
-
(0, _keymaps.bindKeymapWithCommand)(_keymaps.toggleTable.common, createTableWithAnalytics(editorAnalyticsAPI), list);
|
|
36
|
+
(0, _keymaps.bindKeymapWithCommand)(_keymaps.toggleTable.common, createTableWithAnalytics(isTableScalingEnabled, !!isFullWidthEnabled, editorAnalyticsAPI), list);
|
|
36
37
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.backspace.common, (0, _commands.chainCommands)((0, _commandsWithAnalytics.deleteTableIfSelectedWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD), (0, _commandsWithAnalytics.emptyMultipleCellsWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.KEYBOARD)), list);
|
|
37
38
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.backspace.common, _commands2.moveCursorBackward, list);
|
|
38
39
|
|
|
@@ -14,7 +14,8 @@ var DragHandleDisabledIcon = exports.DragHandleDisabledIcon = function DragHandl
|
|
|
14
14
|
viewBox: "0 0 24 16",
|
|
15
15
|
fill: "none",
|
|
16
16
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
-
style: style
|
|
17
|
+
style: style,
|
|
18
|
+
"data-testid": "drag-icon-disabled"
|
|
18
19
|
}, /*#__PURE__*/_react.default.createElement("rect", {
|
|
19
20
|
width: "24",
|
|
20
21
|
height: "16",
|
|
@@ -11,7 +11,8 @@ var DragHandleIcon = exports.DragHandleIcon = function DragHandleIcon() {
|
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
12
|
width: "24",
|
|
13
13
|
height: "16",
|
|
14
|
-
fill: "none"
|
|
14
|
+
fill: "none",
|
|
15
|
+
"data-testid": "drag-icon-enabled"
|
|
15
16
|
}, /*#__PURE__*/_react.default.createElement("rect", {
|
|
16
17
|
width: "24",
|
|
17
18
|
height: "16",
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -149,9 +149,10 @@ const tablesPlugin = ({
|
|
|
149
149
|
plugin: () => {
|
|
150
150
|
const {
|
|
151
151
|
dragAndDropEnabled,
|
|
152
|
-
isTableScalingEnabled = false
|
|
152
|
+
isTableScalingEnabled = false,
|
|
153
|
+
fullWidthEnabled = false
|
|
153
154
|
} = options || {};
|
|
154
|
-
return keymapPlugin(defaultGetEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled);
|
|
155
|
+
return keymapPlugin(defaultGetEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled, fullWidthEnabled);
|
|
155
156
|
}
|
|
156
157
|
}, {
|
|
157
158
|
name: 'tableSelectionKeymap',
|
|
@@ -9,7 +9,7 @@ import { activateNextResizeArea, initiateKeyboardColumnResizing, stopKeyboardCol
|
|
|
9
9
|
import { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
10
10
|
import { moveSourceWithAnalyticsViaShortcut } from '../pm-plugins/drag-and-drop/commands-with-analytics';
|
|
11
11
|
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
12
|
-
const createTableWithAnalytics = editorAnalyticsAPI => withEditorAnalyticsAPI({
|
|
12
|
+
const createTableWithAnalytics = (isTableScalingEnabled, isFullWidthModeEnabled, editorAnalyticsAPI) => withEditorAnalyticsAPI({
|
|
13
13
|
action: ACTION.INSERTED,
|
|
14
14
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
15
15
|
actionSubjectId: ACTION_SUBJECT_ID.TABLE,
|
|
@@ -17,12 +17,12 @@ const createTableWithAnalytics = editorAnalyticsAPI => withEditorAnalyticsAPI({
|
|
|
17
17
|
inputMethod: INPUT_METHOD.SHORTCUT
|
|
18
18
|
},
|
|
19
19
|
eventType: EVENT_TYPE.TRACK
|
|
20
|
-
})(editorAnalyticsAPI)(createTable());
|
|
21
|
-
export function keymapPlugin(getEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled = false) {
|
|
20
|
+
})(editorAnalyticsAPI)(createTable(isTableScalingEnabled, isFullWidthModeEnabled));
|
|
21
|
+
export function keymapPlugin(getEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled = false, isFullWidthEnabled) {
|
|
22
22
|
const list = {};
|
|
23
23
|
bindKeymapWithCommand(nextCell.common, goToNextCell(editorAnalyticsAPI)(1), list);
|
|
24
24
|
bindKeymapWithCommand(previousCell.common, goToNextCell(editorAnalyticsAPI)(-1), list);
|
|
25
|
-
bindKeymapWithCommand(toggleTable.common, createTableWithAnalytics(editorAnalyticsAPI), list);
|
|
25
|
+
bindKeymapWithCommand(toggleTable.common, createTableWithAnalytics(isTableScalingEnabled, !!isFullWidthEnabled, editorAnalyticsAPI), list);
|
|
26
26
|
bindKeymapWithCommand(backspace.common, chainCommands(deleteTableIfSelectedWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD), emptyMultipleCellsWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD)), list);
|
|
27
27
|
bindKeymapWithCommand(backspace.common, moveCursorBackward, list);
|
|
28
28
|
|
|
@@ -7,7 +7,8 @@ export const DragHandleDisabledIcon = ({
|
|
|
7
7
|
viewBox: "0 0 24 16",
|
|
8
8
|
fill: "none",
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
style: style
|
|
10
|
+
style: style,
|
|
11
|
+
"data-testid": "drag-icon-disabled"
|
|
11
12
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
12
13
|
width: "24",
|
|
13
14
|
height: "16",
|
|
@@ -3,7 +3,8 @@ export const DragHandleIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
width: "24",
|
|
5
5
|
height: "16",
|
|
6
|
-
fill: "none"
|
|
6
|
+
fill: "none",
|
|
7
|
+
"data-testid": "drag-icon-enabled"
|
|
7
8
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
8
9
|
width: "24",
|
|
9
10
|
height: "16",
|
package/dist/esm/plugin.js
CHANGED
|
@@ -150,8 +150,10 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
150
150
|
var _ref6 = options || {},
|
|
151
151
|
dragAndDropEnabled = _ref6.dragAndDropEnabled,
|
|
152
152
|
_ref6$isTableScalingE = _ref6.isTableScalingEnabled,
|
|
153
|
-
isTableScalingEnabled = _ref6$isTableScalingE === void 0 ? false : _ref6$isTableScalingE
|
|
154
|
-
|
|
153
|
+
isTableScalingEnabled = _ref6$isTableScalingE === void 0 ? false : _ref6$isTableScalingE,
|
|
154
|
+
_ref6$fullWidthEnable = _ref6.fullWidthEnabled,
|
|
155
|
+
fullWidthEnabled = _ref6$fullWidthEnable === void 0 ? false : _ref6$fullWidthEnable;
|
|
156
|
+
return keymapPlugin(defaultGetEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled, fullWidthEnabled);
|
|
155
157
|
}
|
|
156
158
|
}, {
|
|
157
159
|
name: 'tableSelectionKeymap',
|
|
@@ -9,7 +9,7 @@ import { activateNextResizeArea, initiateKeyboardColumnResizing, stopKeyboardCol
|
|
|
9
9
|
import { addColumnAfter as addColumnAfterCommand, addColumnBefore as addColumnBeforeCommand } from '../commands/insert';
|
|
10
10
|
import { moveSourceWithAnalyticsViaShortcut } from '../pm-plugins/drag-and-drop/commands-with-analytics';
|
|
11
11
|
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
12
|
-
var createTableWithAnalytics = function createTableWithAnalytics(editorAnalyticsAPI) {
|
|
12
|
+
var createTableWithAnalytics = function createTableWithAnalytics(isTableScalingEnabled, isFullWidthModeEnabled, editorAnalyticsAPI) {
|
|
13
13
|
return withEditorAnalyticsAPI({
|
|
14
14
|
action: ACTION.INSERTED,
|
|
15
15
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
@@ -18,14 +18,15 @@ var createTableWithAnalytics = function createTableWithAnalytics(editorAnalytics
|
|
|
18
18
|
inputMethod: INPUT_METHOD.SHORTCUT
|
|
19
19
|
},
|
|
20
20
|
eventType: EVENT_TYPE.TRACK
|
|
21
|
-
})(editorAnalyticsAPI)(createTable());
|
|
21
|
+
})(editorAnalyticsAPI)(createTable(isTableScalingEnabled, isFullWidthModeEnabled));
|
|
22
22
|
};
|
|
23
23
|
export function keymapPlugin(getEditorContainerWidth, editorAnalyticsAPI, dragAndDropEnabled) {
|
|
24
24
|
var isTableScalingEnabled = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
25
|
+
var isFullWidthEnabled = arguments.length > 4 ? arguments[4] : undefined;
|
|
25
26
|
var list = {};
|
|
26
27
|
bindKeymapWithCommand(nextCell.common, goToNextCell(editorAnalyticsAPI)(1), list);
|
|
27
28
|
bindKeymapWithCommand(previousCell.common, goToNextCell(editorAnalyticsAPI)(-1), list);
|
|
28
|
-
bindKeymapWithCommand(toggleTable.common, createTableWithAnalytics(editorAnalyticsAPI), list);
|
|
29
|
+
bindKeymapWithCommand(toggleTable.common, createTableWithAnalytics(isTableScalingEnabled, !!isFullWidthEnabled, editorAnalyticsAPI), list);
|
|
29
30
|
bindKeymapWithCommand(backspace.common, chainCommands(deleteTableIfSelectedWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD), emptyMultipleCellsWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.KEYBOARD)), list);
|
|
30
31
|
bindKeymapWithCommand(backspace.common, moveCursorBackward, list);
|
|
31
32
|
|
|
@@ -7,7 +7,8 @@ export var DragHandleDisabledIcon = function DragHandleDisabledIcon(_ref) {
|
|
|
7
7
|
viewBox: "0 0 24 16",
|
|
8
8
|
fill: "none",
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
style: style
|
|
10
|
+
style: style,
|
|
11
|
+
"data-testid": "drag-icon-disabled"
|
|
11
12
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
12
13
|
width: "24",
|
|
13
14
|
height: "16",
|
|
@@ -4,7 +4,8 @@ export var DragHandleIcon = function DragHandleIcon() {
|
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5
5
|
width: "24",
|
|
6
6
|
height: "16",
|
|
7
|
-
fill: "none"
|
|
7
|
+
fill: "none",
|
|
8
|
+
"data-testid": "drag-icon-enabled"
|
|
8
9
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
9
10
|
width: "24",
|
|
10
11
|
height: "16",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean): SafePlugin;
|
|
4
|
+
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isFullWidthEnabled?: boolean): SafePlugin;
|
|
5
5
|
export default keymapPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean): SafePlugin;
|
|
4
|
+
export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, dragAndDropEnabled?: boolean, isTableScalingEnabled?: boolean, isFullWidthEnabled?: boolean): SafePlugin;
|
|
5
5
|
export default keymapPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.11",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/pragmatic-drag-and-drop": "^1.0.0",
|
|
47
47
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.0.0",
|
|
48
48
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
49
|
-
"@atlaskit/primitives": "^
|
|
49
|
+
"@atlaskit/primitives": "^5.0.0",
|
|
50
50
|
"@atlaskit/theme": "^12.6.0",
|
|
51
51
|
"@atlaskit/toggle": "^13.0.0",
|
|
52
52
|
"@atlaskit/tokens": "^1.41.0",
|
package/src/plugin.tsx
CHANGED
|
@@ -266,14 +266,17 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
266
266
|
{
|
|
267
267
|
name: 'tableKeymap',
|
|
268
268
|
plugin: () => {
|
|
269
|
-
const {
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
const {
|
|
270
|
+
dragAndDropEnabled,
|
|
271
|
+
isTableScalingEnabled = false,
|
|
272
|
+
fullWidthEnabled = false,
|
|
273
|
+
} = options || ({} as TablePluginOptions);
|
|
272
274
|
return keymapPlugin(
|
|
273
275
|
defaultGetEditorContainerWidth,
|
|
274
276
|
editorAnalyticsAPI,
|
|
275
277
|
dragAndDropEnabled,
|
|
276
278
|
isTableScalingEnabled,
|
|
279
|
+
fullWidthEnabled,
|
|
277
280
|
);
|
|
278
281
|
},
|
|
279
282
|
},
|
package/src/pm-plugins/keymap.ts
CHANGED
|
@@ -56,6 +56,8 @@ import { moveSourceWithAnalyticsViaShortcut } from '../pm-plugins/drag-and-drop/
|
|
|
56
56
|
import { withEditorAnalyticsAPI } from '../utils/analytics';
|
|
57
57
|
|
|
58
58
|
const createTableWithAnalytics = (
|
|
59
|
+
isTableScalingEnabled: boolean,
|
|
60
|
+
isFullWidthModeEnabled: boolean,
|
|
59
61
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
60
62
|
) =>
|
|
61
63
|
withEditorAnalyticsAPI({
|
|
@@ -64,13 +66,16 @@ const createTableWithAnalytics = (
|
|
|
64
66
|
actionSubjectId: ACTION_SUBJECT_ID.TABLE,
|
|
65
67
|
attributes: { inputMethod: INPUT_METHOD.SHORTCUT },
|
|
66
68
|
eventType: EVENT_TYPE.TRACK,
|
|
67
|
-
})(editorAnalyticsAPI)(
|
|
69
|
+
})(editorAnalyticsAPI)(
|
|
70
|
+
createTable(isTableScalingEnabled, isFullWidthModeEnabled),
|
|
71
|
+
);
|
|
68
72
|
|
|
69
73
|
export function keymapPlugin(
|
|
70
74
|
getEditorContainerWidth: GetEditorContainerWidth,
|
|
71
75
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
72
76
|
dragAndDropEnabled?: boolean,
|
|
73
77
|
isTableScalingEnabled = false,
|
|
78
|
+
isFullWidthEnabled?: boolean,
|
|
74
79
|
): SafePlugin {
|
|
75
80
|
const list = {};
|
|
76
81
|
|
|
@@ -86,7 +91,11 @@ export function keymapPlugin(
|
|
|
86
91
|
);
|
|
87
92
|
bindKeymapWithCommand(
|
|
88
93
|
toggleTable.common!,
|
|
89
|
-
createTableWithAnalytics(
|
|
94
|
+
createTableWithAnalytics(
|
|
95
|
+
isTableScalingEnabled,
|
|
96
|
+
!!isFullWidthEnabled,
|
|
97
|
+
editorAnalyticsAPI,
|
|
98
|
+
),
|
|
90
99
|
list,
|
|
91
100
|
);
|
|
92
101
|
bindKeymapWithCommand(
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
export const DragHandleIcon = () => (
|
|
4
|
-
<svg
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
width="24"
|
|
7
|
+
height="16"
|
|
8
|
+
fill="none"
|
|
9
|
+
data-testid="drag-icon-enabled"
|
|
10
|
+
>
|
|
5
11
|
<rect width="24" height="16" rx="4" />
|
|
6
12
|
<g>
|
|
7
13
|
<path d="M9 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM9 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z" />
|