@atlaskit/editor-plugin-table 10.5.9 → 10.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 +19 -0
- package/dist/cjs/nodeviews/TableResizer.js +4 -10
- package/dist/cjs/pm-plugins/table-selection-keymap.js +4 -6
- package/dist/es2019/nodeviews/TableResizer.js +5 -12
- package/dist/es2019/pm-plugins/table-selection-keymap.js +4 -6
- package/dist/esm/nodeviews/TableResizer.js +4 -10
- package/dist/esm/pm-plugins/table-selection-keymap.js +4 -6
- package/package.json +6 -9
- package/src/nodeviews/TableResizer.tsx +9 -15
- package/src/pm-plugins/table-selection-keymap.ts +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 10.5.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.5.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#133495](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133495)
|
|
14
|
+
[`6e3c24aeec2b7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e3c24aeec2b7) -
|
|
15
|
+
ED-25981 Clean up feature flag platform_editor_set_alignment_when_resized
|
|
16
|
+
- [#134378](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134378)
|
|
17
|
+
[`210a48c778086`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/210a48c778086) -
|
|
18
|
+
EDITOR-546 Cleaned up platform_editor_cmd_a_progressively_select_nodes to revert to control
|
|
19
|
+
behaviour.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 10.5.9
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -329,16 +329,10 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
|
|
|
329
329
|
}
|
|
330
330
|
if (typeof pos === 'number') {
|
|
331
331
|
var _attachAnalyticsEvent2;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}));
|
|
337
|
-
} else {
|
|
338
|
-
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
339
|
-
width: newWidth
|
|
340
|
-
}));
|
|
341
|
-
}
|
|
332
|
+
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
333
|
+
width: newWidth,
|
|
334
|
+
layout: node.attrs.layout !== _alignment.ALIGN_START && node.attrs.layout !== _alignment.ALIGN_CENTER ? _alignment.ALIGN_CENTER : node.attrs.layout
|
|
335
|
+
}));
|
|
342
336
|
|
|
343
337
|
// Ignored via go/ees005
|
|
344
338
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.tableSelectionKeymapPlugin = tableSelectionKeymapPlugin;
|
|
7
7
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
8
8
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
9
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
10
9
|
var _selection = require("./commands/selection");
|
|
11
10
|
function tableSelectionKeymapPlugin(pluginInjectionApi, getIntl) {
|
|
12
11
|
var _pluginInjectionApi$a;
|
|
@@ -27,10 +26,9 @@ function tableSelectionKeymapPlugin(pluginInjectionApi, getIntl) {
|
|
|
27
26
|
// Ignored via go/ees005
|
|
28
27
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
29
28
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.shiftArrowUp.common, (0, _selection.shiftArrowUpFromTable)(editorSelectionAPI)(), list);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
29
|
+
|
|
30
|
+
// Ignored via go/ees005
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
32
|
+
(0, _keymaps.bindKeymapWithCommand)(_keymaps.selectTable.common, (0, _selection.modASelectTable)(editorSelectionAPI)(), list);
|
|
35
33
|
return (0, _keymap.keymap)(list);
|
|
36
34
|
}
|
|
@@ -324,18 +324,11 @@ export const TableResizer = ({
|
|
|
324
324
|
}
|
|
325
325
|
if (typeof pos === 'number') {
|
|
326
326
|
var _attachAnalyticsEvent2;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
});
|
|
333
|
-
} else {
|
|
334
|
-
tr = tr.setNodeMarkup(pos, undefined, {
|
|
335
|
-
...node.attrs,
|
|
336
|
-
width: newWidth
|
|
337
|
-
});
|
|
338
|
-
}
|
|
327
|
+
tr = tr.setNodeMarkup(pos, undefined, {
|
|
328
|
+
...node.attrs,
|
|
329
|
+
width: newWidth,
|
|
330
|
+
layout: node.attrs.layout !== ALIGN_START && node.attrs.layout !== ALIGN_CENTER ? ALIGN_CENTER : node.attrs.layout
|
|
331
|
+
});
|
|
339
332
|
|
|
340
333
|
// Ignored via go/ees005
|
|
341
334
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { bindKeymapArrayWithCommand, bindKeymapWithCommand, moveLeft, moveRight, selectColumn, selectRow, selectTable, shiftArrowUp } from '@atlaskit/editor-common/keymaps';
|
|
2
2
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
3
|
import { arrowLeftFromTable, arrowRightFromTable, modASelectTable, selectColumns, selectRows, shiftArrowUpFromTable } from './commands/selection';
|
|
5
4
|
export function tableSelectionKeymapPlugin(pluginInjectionApi, getIntl) {
|
|
6
5
|
var _pluginInjectionApi$a;
|
|
@@ -21,10 +20,9 @@ export function tableSelectionKeymapPlugin(pluginInjectionApi, getIntl) {
|
|
|
21
20
|
// Ignored via go/ees005
|
|
22
21
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
22
|
bindKeymapWithCommand(shiftArrowUp.common, shiftArrowUpFromTable(editorSelectionAPI)(), list);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
23
|
+
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
26
|
+
bindKeymapWithCommand(selectTable.common, modASelectTable(editorSelectionAPI)(), list);
|
|
29
27
|
return keymap(list);
|
|
30
28
|
}
|
|
@@ -319,16 +319,10 @@ export var TableResizer = function TableResizer(_ref) {
|
|
|
319
319
|
}
|
|
320
320
|
if (typeof pos === 'number') {
|
|
321
321
|
var _attachAnalyticsEvent2;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}));
|
|
327
|
-
} else {
|
|
328
|
-
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
329
|
-
width: newWidth
|
|
330
|
-
}));
|
|
331
|
-
}
|
|
322
|
+
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
323
|
+
width: newWidth,
|
|
324
|
+
layout: node.attrs.layout !== ALIGN_START && node.attrs.layout !== ALIGN_CENTER ? ALIGN_CENTER : node.attrs.layout
|
|
325
|
+
}));
|
|
332
326
|
|
|
333
327
|
// Ignored via go/ees005
|
|
334
328
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { bindKeymapArrayWithCommand, bindKeymapWithCommand, moveLeft, moveRight, selectColumn, selectRow, selectTable, shiftArrowUp } from '@atlaskit/editor-common/keymaps';
|
|
2
2
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
3
|
import { arrowLeftFromTable, arrowRightFromTable, modASelectTable, selectColumns, selectRows, shiftArrowUpFromTable } from './commands/selection';
|
|
5
4
|
export function tableSelectionKeymapPlugin(pluginInjectionApi, getIntl) {
|
|
6
5
|
var _pluginInjectionApi$a;
|
|
@@ -21,10 +20,9 @@ export function tableSelectionKeymapPlugin(pluginInjectionApi, getIntl) {
|
|
|
21
20
|
// Ignored via go/ees005
|
|
22
21
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
22
|
bindKeymapWithCommand(shiftArrowUp.common, shiftArrowUpFromTable(editorSelectionAPI)(), list);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
23
|
+
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
26
|
+
bindKeymapWithCommand(selectTable.common, modASelectTable(editorSelectionAPI)(), list);
|
|
29
27
|
return keymap(list);
|
|
30
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.11",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,31 +32,31 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
33
33
|
"@atlaskit/button": "^23.0.0",
|
|
34
34
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
35
|
-
"@atlaskit/editor-common": "^102.
|
|
35
|
+
"@atlaskit/editor-common": "^102.18.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-content-insertion": "^2.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
|
|
42
|
-
"@atlaskit/editor-plugin-extension": "5.1.
|
|
42
|
+
"@atlaskit/editor-plugin-extension": "5.1.3",
|
|
43
43
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^2.1.0",
|
|
45
45
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
49
|
-
"@atlaskit/icon": "^25.
|
|
49
|
+
"@atlaskit/icon": "^25.5.0",
|
|
50
50
|
"@atlaskit/menu": "^3.2.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
55
|
-
"@atlaskit/primitives": "^14.
|
|
55
|
+
"@atlaskit/primitives": "^14.3.0",
|
|
56
56
|
"@atlaskit/theme": "^18.0.0",
|
|
57
57
|
"@atlaskit/tmp-editor-statsig": "^4.6.0",
|
|
58
58
|
"@atlaskit/toggle": "^15.0.0",
|
|
59
|
-
"@atlaskit/tokens": "^4.
|
|
59
|
+
"@atlaskit/tokens": "^4.6.0",
|
|
60
60
|
"@atlaskit/tooltip": "^20.0.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|
|
62
62
|
"@emotion/react": "^11.7.1",
|
|
@@ -123,9 +123,6 @@
|
|
|
123
123
|
"type": "boolean",
|
|
124
124
|
"referenceOnly": true
|
|
125
125
|
},
|
|
126
|
-
"platform_editor_set_alignment_when_resized": {
|
|
127
|
-
"type": "boolean"
|
|
128
|
-
},
|
|
129
126
|
"platform_editor_table_overflow_in_full_width_fix": {
|
|
130
127
|
"type": "boolean"
|
|
131
128
|
},
|
|
@@ -580,21 +580,15 @@ export const TableResizer = ({
|
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
if (typeof pos === 'number') {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
layout
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
} else {
|
|
593
|
-
tr = tr.setNodeMarkup(pos, undefined, {
|
|
594
|
-
...node.attrs,
|
|
595
|
-
width: newWidth,
|
|
596
|
-
});
|
|
597
|
-
}
|
|
583
|
+
tr = tr.setNodeMarkup(pos, undefined, {
|
|
584
|
+
...node.attrs,
|
|
585
|
+
width: newWidth,
|
|
586
|
+
layout:
|
|
587
|
+
node.attrs.layout !== ALIGN_START && node.attrs.layout !== ALIGN_CENTER
|
|
588
|
+
? ALIGN_CENTER
|
|
589
|
+
: node.attrs.layout,
|
|
590
|
+
});
|
|
591
|
+
|
|
598
592
|
|
|
599
593
|
// Ignored via go/ees005
|
|
600
594
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
} from '@atlaskit/editor-common/keymaps';
|
|
13
13
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
14
14
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
15
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
15
|
|
|
17
16
|
import { type PluginInjectionAPI } from '../types';
|
|
18
17
|
|
|
@@ -57,11 +56,9 @@ export function tableSelectionKeymapPlugin(
|
|
|
57
56
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
58
57
|
bindKeymapWithCommand(shiftArrowUp.common!, shiftArrowUpFromTable(editorSelectionAPI)(), list);
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
bindKeymapWithCommand(selectTable.common!, modASelectTable(editorSelectionAPI)(), list);
|
|
64
|
-
}
|
|
59
|
+
// Ignored via go/ees005
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
61
|
+
bindKeymapWithCommand(selectTable.common!, modASelectTable(editorSelectionAPI)(), list);
|
|
65
62
|
|
|
66
63
|
return keymap(list) as SafePlugin;
|
|
67
64
|
}
|