@atlaskit/editor-plugin-table 2.10.6 → 2.10.7
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/types/index.d.ts +1 -0
- package/dist/types/plugins/table/index.d.ts +12 -11
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/plugins/table/index.d.ts +12 -11
- package/package.json +4 -5
- package/report.api.md +23 -20
- package/src/index.ts +1 -0
- package/src/plugins/table/index.tsx +15 -13
- package/tmp/api-report-tmp.d.ts +0 -108
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 2.10.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`24e27147cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/24e27147cbd) - Added atlaskit docs to all existing plugins.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 2.10.6
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import type { Command, GetEditorFeatureFlags, NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import { PluginConfig } from './types';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
6
|
+
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
7
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
8
|
+
import type { PluginConfig } from './types';
|
|
9
9
|
interface TablePluginOptions {
|
|
10
10
|
tableOptions: PluginConfig;
|
|
11
11
|
tableResizingEnabled?: boolean;
|
|
@@ -17,16 +17,17 @@ interface TablePluginOptions {
|
|
|
17
17
|
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
18
18
|
}
|
|
19
19
|
type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
|
|
20
|
-
|
|
20
|
+
export type TablePlugin = NextEditorPlugin<'table', {
|
|
21
21
|
pluginConfiguration: TablePluginOptions | undefined;
|
|
22
22
|
actions: {
|
|
23
23
|
insertTable: InsertTableAction;
|
|
24
24
|
};
|
|
25
25
|
dependencies: [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
AnalyticsPlugin,
|
|
27
|
+
ContentInsertionPlugin,
|
|
28
|
+
WidthPlugin,
|
|
29
|
+
GuidelinePlugin
|
|
30
30
|
];
|
|
31
31
|
}>;
|
|
32
|
+
declare const tablesPlugin: TablePlugin;
|
|
32
33
|
export default tablesPlugin;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import type { Command, GetEditorFeatureFlags, NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import { PluginConfig } from './types';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
6
|
+
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
7
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
8
|
+
import type { PluginConfig } from './types';
|
|
9
9
|
interface TablePluginOptions {
|
|
10
10
|
tableOptions: PluginConfig;
|
|
11
11
|
tableResizingEnabled?: boolean;
|
|
@@ -17,16 +17,17 @@ interface TablePluginOptions {
|
|
|
17
17
|
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
18
18
|
}
|
|
19
19
|
type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
|
|
20
|
-
|
|
20
|
+
export type TablePlugin = NextEditorPlugin<'table', {
|
|
21
21
|
pluginConfiguration: TablePluginOptions | undefined;
|
|
22
22
|
actions: {
|
|
23
23
|
insertTable: InsertTableAction;
|
|
24
24
|
};
|
|
25
25
|
dependencies: [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
AnalyticsPlugin,
|
|
27
|
+
ContentInsertionPlugin,
|
|
28
|
+
WidthPlugin,
|
|
29
|
+
GuidelinePlugin
|
|
30
30
|
];
|
|
31
31
|
}>;
|
|
32
|
+
declare const tablesPlugin: TablePlugin;
|
|
32
33
|
export default tablesPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.7",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/adf-schema": "28.1.2",
|
|
31
|
-
"@atlaskit/editor-common": "^74.
|
|
31
|
+
"@atlaskit/editor-common": "^74.52.0",
|
|
32
32
|
"@atlaskit/editor-palette": "1.5.1",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^0.1.0",
|
|
34
|
-
"@atlaskit/editor-plugin-content-insertion": "^0.0.
|
|
34
|
+
"@atlaskit/editor-plugin-content-insertion": "^0.0.10",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^2.6.0",
|
|
37
37
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
38
38
|
"@atlaskit/icon": "^21.12.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
40
40
|
"@atlaskit/theme": "^12.5.0",
|
|
41
|
-
"@atlaskit/tokens": "^1.
|
|
41
|
+
"@atlaskit/tokens": "^1.16.0",
|
|
42
42
|
"@atlaskit/tooltip": "^17.8.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1",
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"@atlaskit/editor-plugin-guideline": "^0.4.0",
|
|
62
62
|
"@atlaskit/editor-plugin-hyperlink": "^0.3.0",
|
|
63
63
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
64
|
-
"@atlaskit/editor-test-helpers": "^18.11.0",
|
|
65
64
|
"@atlaskit/visual-regression": "*",
|
|
66
65
|
"@atlaskit/webdriver-runner": "*",
|
|
67
66
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
package/report.api.md
CHANGED
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
<!--SECTION START: Main Entry Types-->
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
19
|
-
import type {
|
|
18
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
19
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
20
20
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
21
|
-
import type {
|
|
21
|
+
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
22
22
|
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
23
23
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
24
|
-
import type {
|
|
24
|
+
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
25
25
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
26
26
|
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
27
|
-
import type {
|
|
27
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
28
28
|
|
|
29
29
|
// @public (undocumented)
|
|
30
30
|
type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
|
|
@@ -80,6 +80,23 @@ interface PluginConfig {
|
|
|
80
80
|
tableRenderOptimization?: boolean;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
// @public (undocumented)
|
|
84
|
+
export type TablePlugin = NextEditorPlugin<
|
|
85
|
+
'table',
|
|
86
|
+
{
|
|
87
|
+
pluginConfiguration: TablePluginOptions | undefined;
|
|
88
|
+
actions: {
|
|
89
|
+
insertTable: InsertTableAction;
|
|
90
|
+
};
|
|
91
|
+
dependencies: [
|
|
92
|
+
AnalyticsPlugin,
|
|
93
|
+
ContentInsertionPlugin,
|
|
94
|
+
WidthPlugin,
|
|
95
|
+
GuidelinePlugin,
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
>;
|
|
99
|
+
|
|
83
100
|
// @public (undocumented)
|
|
84
101
|
interface TablePluginOptions {
|
|
85
102
|
// (undocumented)
|
|
@@ -101,21 +118,7 @@ interface TablePluginOptions {
|
|
|
101
118
|
}
|
|
102
119
|
|
|
103
120
|
// @public (undocumented)
|
|
104
|
-
export const tablesPlugin:
|
|
105
|
-
'table',
|
|
106
|
-
{
|
|
107
|
-
pluginConfiguration: TablePluginOptions | undefined;
|
|
108
|
-
actions: {
|
|
109
|
-
insertTable: InsertTableAction;
|
|
110
|
-
};
|
|
111
|
-
dependencies: [
|
|
112
|
-
typeof analyticsPlugin,
|
|
113
|
-
typeof contentInsertionPlugin,
|
|
114
|
-
typeof widthPlugin,
|
|
115
|
-
typeof guidelinePlugin,
|
|
116
|
-
];
|
|
117
|
-
}
|
|
118
|
-
>;
|
|
121
|
+
export const tablesPlugin: TablePlugin;
|
|
119
122
|
|
|
120
123
|
// (No @packageDocumentation comment for this package)
|
|
121
124
|
```
|
package/src/index.ts
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
tableRow,
|
|
8
8
|
tableWithCustomWidth,
|
|
9
9
|
} from '@atlaskit/adf-schema';
|
|
10
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
10
11
|
import {
|
|
11
12
|
ACTION,
|
|
12
13
|
ACTION_SUBJECT,
|
|
13
14
|
ACTION_SUBJECT_ID,
|
|
14
|
-
AnalyticsEventPayload,
|
|
15
15
|
EVENT_TYPE,
|
|
16
16
|
INPUT_METHOD,
|
|
17
17
|
TABLE_ACTION,
|
|
@@ -31,11 +31,11 @@ import type {
|
|
|
31
31
|
} from '@atlaskit/editor-common/types';
|
|
32
32
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
33
33
|
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
34
|
-
import type {
|
|
35
|
-
import type {
|
|
36
|
-
import type {
|
|
37
|
-
import type {
|
|
38
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
34
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
35
|
+
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
36
|
+
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
37
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
38
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
39
39
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
40
40
|
import { tableEditing } from '@atlaskit/editor-tables/pm-plugins';
|
|
41
41
|
import { createTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
pluginKey as tableWidthPluginKey,
|
|
63
63
|
} from './pm-plugins/table-width';
|
|
64
64
|
import { getToolbarConfig } from './toolbar';
|
|
65
|
-
import { ColumnResizingPluginState, PluginConfig } from './types';
|
|
65
|
+
import type { ColumnResizingPluginState, PluginConfig } from './types';
|
|
66
66
|
import FloatingContextualButton from './ui/FloatingContextualButton';
|
|
67
67
|
import FloatingContextualMenu from './ui/FloatingContextualMenu';
|
|
68
68
|
import FloatingDeleteButton from './ui/FloatingDeleteButton';
|
|
@@ -88,7 +88,7 @@ type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
|
|
|
88
88
|
|
|
89
89
|
const defaultGetEditorFeatureFlags = () => ({});
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
export type TablePlugin = NextEditorPlugin<
|
|
92
92
|
'table',
|
|
93
93
|
{
|
|
94
94
|
pluginConfiguration: TablePluginOptions | undefined;
|
|
@@ -96,13 +96,15 @@ const tablesPlugin: NextEditorPlugin<
|
|
|
96
96
|
insertTable: InsertTableAction;
|
|
97
97
|
};
|
|
98
98
|
dependencies: [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
AnalyticsPlugin,
|
|
100
|
+
ContentInsertionPlugin,
|
|
101
|
+
WidthPlugin,
|
|
102
|
+
GuidelinePlugin,
|
|
103
103
|
];
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
>;
|
|
106
|
+
|
|
107
|
+
const tablesPlugin: TablePlugin = (options?: TablePluginOptions, api?) => {
|
|
106
108
|
const editorViewRef: Record<'current', EditorView | null> = { current: null };
|
|
107
109
|
const defaultGetEditorContainerWidth: GetEditorContainerWidth = () => {
|
|
108
110
|
const defaultState = {
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-plugin-table"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
11
|
-
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
12
|
-
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
13
|
-
import type { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
14
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
15
|
-
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
16
|
-
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
17
|
-
|
|
18
|
-
// @public (undocumented)
|
|
19
|
-
type InsertTableAction = (analyticsPayload: AnalyticsEventPayload) => Command;
|
|
20
|
-
|
|
21
|
-
// @public (undocumented)
|
|
22
|
-
type PermittedLayoutsDescriptor = 'all' | TableLayout[];
|
|
23
|
-
|
|
24
|
-
// @public (undocumented)
|
|
25
|
-
interface PluginConfig {
|
|
26
|
-
// (undocumented)
|
|
27
|
-
advanced?: boolean;
|
|
28
|
-
// (undocumented)
|
|
29
|
-
allowAddColumnWithCustomStep?: boolean;
|
|
30
|
-
// (undocumented)
|
|
31
|
-
allowBackgroundColor?: boolean;
|
|
32
|
-
// (undocumented)
|
|
33
|
-
allowCellOptionsInFloatingToolbar?: boolean;
|
|
34
|
-
// (undocumented)
|
|
35
|
-
allowCollapse?: boolean;
|
|
36
|
-
// (undocumented)
|
|
37
|
-
allowColumnResizing?: boolean;
|
|
38
|
-
// (undocumented)
|
|
39
|
-
allowColumnSorting?: boolean;
|
|
40
|
-
// (undocumented)
|
|
41
|
-
allowControls?: boolean;
|
|
42
|
-
// (undocumented)
|
|
43
|
-
allowDistributeColumns?: boolean;
|
|
44
|
-
// (undocumented)
|
|
45
|
-
allowHeaderColumn?: boolean;
|
|
46
|
-
// (undocumented)
|
|
47
|
-
allowHeaderRow?: boolean;
|
|
48
|
-
// (undocumented)
|
|
49
|
-
allowMergeCells?: boolean;
|
|
50
|
-
// (undocumented)
|
|
51
|
-
allowNumberColumn?: boolean;
|
|
52
|
-
// (undocumented)
|
|
53
|
-
initialRenderOptimization?: boolean;
|
|
54
|
-
// (undocumented)
|
|
55
|
-
isHeaderRowRequired?: boolean;
|
|
56
|
-
// (undocumented)
|
|
57
|
-
mouseMoveOptimization?: boolean;
|
|
58
|
-
// (undocumented)
|
|
59
|
-
permittedLayouts?: PermittedLayoutsDescriptor;
|
|
60
|
-
// (undocumented)
|
|
61
|
-
stickyHeaders?: boolean;
|
|
62
|
-
// (undocumented)
|
|
63
|
-
stickyHeadersOptimization?: boolean;
|
|
64
|
-
// (undocumented)
|
|
65
|
-
tableCellOptimization?: boolean;
|
|
66
|
-
// (undocumented)
|
|
67
|
-
tableOverflowShadowsOptimization?: boolean;
|
|
68
|
-
// (undocumented)
|
|
69
|
-
tableRenderOptimization?: boolean;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// @public (undocumented)
|
|
73
|
-
interface TablePluginOptions {
|
|
74
|
-
// (undocumented)
|
|
75
|
-
allowContextualMenu?: boolean;
|
|
76
|
-
// (undocumented)
|
|
77
|
-
breakoutEnabled?: boolean;
|
|
78
|
-
// (undocumented)
|
|
79
|
-
editorSelectionAPI?: EditorSelectionAPI;
|
|
80
|
-
// (undocumented)
|
|
81
|
-
fullWidthEnabled?: boolean;
|
|
82
|
-
// (undocumented)
|
|
83
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
84
|
-
// (undocumented)
|
|
85
|
-
tableOptions: PluginConfig;
|
|
86
|
-
// (undocumented)
|
|
87
|
-
tableResizingEnabled?: boolean;
|
|
88
|
-
// (undocumented)
|
|
89
|
-
wasFullWidthEnabled?: boolean;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// @public (undocumented)
|
|
93
|
-
export const tablesPlugin: NextEditorPlugin<'table', {
|
|
94
|
-
pluginConfiguration: TablePluginOptions | undefined;
|
|
95
|
-
actions: {
|
|
96
|
-
insertTable: InsertTableAction;
|
|
97
|
-
};
|
|
98
|
-
dependencies: [
|
|
99
|
-
typeof analyticsPlugin,
|
|
100
|
-
typeof contentInsertionPlugin,
|
|
101
|
-
typeof widthPlugin,
|
|
102
|
-
typeof guidelinePlugin
|
|
103
|
-
];
|
|
104
|
-
}>;
|
|
105
|
-
|
|
106
|
-
// (No @packageDocumentation comment for this package)
|
|
107
|
-
|
|
108
|
-
```
|