@atlaskit/editor-plugin-table 7.19.12 → 7.20.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 +12 -0
- package/dist/cjs/nodeviews/table.js +2 -4
- package/dist/es2019/nodeviews/table.js +3 -5
- package/dist/esm/nodeviews/table.js +3 -5
- package/dist/types/nodeviews/table.d.ts +1 -2
- package/dist/types/nodeviews/types.d.ts +1 -3
- package/dist/types/pm-plugins/main.d.ts +1 -2
- package/dist/types-ts4.5/nodeviews/table.d.ts +1 -2
- package/dist/types-ts4.5/nodeviews/types.d.ts +1 -3
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -2
- package/package.json +3 -3
- package/src/nodeviews/table.tsx +3 -10
- package/src/nodeviews/types.ts +1 -3
- package/src/pm-plugins/main.ts +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#119966](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119966)
|
|
8
|
+
[`596ad24e38929`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/596ad24e38929) -
|
|
9
|
+
Clean up typescript references to LegacyPortalProviderAPI
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 7.19.12
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -75,7 +75,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
75
75
|
function TableView(props) {
|
|
76
76
|
var _this;
|
|
77
77
|
(0, _classCallCheck2.default)(this, TableView);
|
|
78
|
-
_this = _super.call(this, props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props
|
|
78
|
+
_this = _super.call(this, props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props);
|
|
79
79
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getNode", function () {
|
|
80
80
|
return _this.node;
|
|
81
81
|
});
|
|
@@ -132,7 +132,7 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
132
132
|
key: "render",
|
|
133
133
|
value: function render(props, forwardRef) {
|
|
134
134
|
var _this3 = this;
|
|
135
|
-
if ((0, _platformFeatureFlags.
|
|
135
|
+
if ((0, _platformFeatureFlags.fg)('platform.editor.table.use-shared-state-hook')) {
|
|
136
136
|
return /*#__PURE__*/_react.default.createElement(_TableComponentWithSharedState.TableComponentWithSharedState, {
|
|
137
137
|
forwardRef: forwardRef,
|
|
138
138
|
getNode: this.getNode,
|
|
@@ -297,7 +297,6 @@ var createTableView = exports.createTableView = function createTableView(node, v
|
|
|
297
297
|
var _getPluginConfig = (0, _createPluginConfig.pluginConfig)(pluginConfig),
|
|
298
298
|
allowColumnResizing = _getPluginConfig.allowColumnResizing,
|
|
299
299
|
allowControls = _getPluginConfig.allowControls;
|
|
300
|
-
var hasIntlContext = true;
|
|
301
300
|
return new TableView({
|
|
302
301
|
node: node,
|
|
303
302
|
view: view,
|
|
@@ -318,7 +317,6 @@ var createTableView = exports.createTableView = function createTableView(node, v
|
|
|
318
317
|
getEditorContainerWidth: getEditorContainerWidth,
|
|
319
318
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
320
319
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
321
|
-
hasIntlContext: hasIntlContext,
|
|
322
320
|
pluginInjectionApi: pluginInjectionApi
|
|
323
321
|
}).init();
|
|
324
322
|
};
|
|
@@ -6,7 +6,7 @@ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
|
6
6
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
9
|
-
import {
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import { pluginConfig as getPluginConfig } from '../create-plugin-config';
|
|
11
11
|
import { pluginKey as tableDragAndDropPluginKey } from '../pm-plugins/drag-and-drop';
|
|
12
12
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -53,7 +53,7 @@ const toDOM = (node, props) => {
|
|
|
53
53
|
};
|
|
54
54
|
export default class TableView extends ReactNodeView {
|
|
55
55
|
constructor(props) {
|
|
56
|
-
super(props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props
|
|
56
|
+
super(props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props);
|
|
57
57
|
_defineProperty(this, "getNode", () => {
|
|
58
58
|
return this.node;
|
|
59
59
|
});
|
|
@@ -99,7 +99,7 @@ export default class TableView extends ReactNodeView {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
render(props, forwardRef) {
|
|
102
|
-
if (
|
|
102
|
+
if (fg('platform.editor.table.use-shared-state-hook')) {
|
|
103
103
|
return /*#__PURE__*/React.createElement(TableComponentWithSharedState, {
|
|
104
104
|
forwardRef: forwardRef,
|
|
105
105
|
getNode: this.getNode,
|
|
@@ -264,7 +264,6 @@ export const createTableView = (node, view, getPos, portalProviderAPI, eventDisp
|
|
|
264
264
|
allowColumnResizing,
|
|
265
265
|
allowControls
|
|
266
266
|
} = getPluginConfig(pluginConfig);
|
|
267
|
-
const hasIntlContext = true;
|
|
268
267
|
return new TableView({
|
|
269
268
|
node,
|
|
270
269
|
view,
|
|
@@ -285,7 +284,6 @@ export const createTableView = (node, view, getPos, portalProviderAPI, eventDisp
|
|
|
285
284
|
getEditorContainerWidth,
|
|
286
285
|
getEditorFeatureFlags,
|
|
287
286
|
dispatchAnalyticsEvent,
|
|
288
|
-
hasIntlContext,
|
|
289
287
|
pluginInjectionApi
|
|
290
288
|
}).init();
|
|
291
289
|
};
|
|
@@ -17,7 +17,7 @@ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
|
17
17
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
18
18
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
20
|
-
import {
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
21
|
import { pluginConfig as getPluginConfig } from '../create-plugin-config';
|
|
22
22
|
import { pluginKey as tableDragAndDropPluginKey } from '../pm-plugins/drag-and-drop';
|
|
23
23
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -68,7 +68,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
68
68
|
function TableView(props) {
|
|
69
69
|
var _this;
|
|
70
70
|
_classCallCheck(this, TableView);
|
|
71
|
-
_this = _super.call(this, props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props
|
|
71
|
+
_this = _super.call(this, props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props);
|
|
72
72
|
_defineProperty(_assertThisInitialized(_this), "getNode", function () {
|
|
73
73
|
return _this.node;
|
|
74
74
|
});
|
|
@@ -125,7 +125,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
125
125
|
key: "render",
|
|
126
126
|
value: function render(props, forwardRef) {
|
|
127
127
|
var _this3 = this;
|
|
128
|
-
if (
|
|
128
|
+
if (fg('platform.editor.table.use-shared-state-hook')) {
|
|
129
129
|
return /*#__PURE__*/React.createElement(TableComponentWithSharedState, {
|
|
130
130
|
forwardRef: forwardRef,
|
|
131
131
|
getNode: this.getNode,
|
|
@@ -291,7 +291,6 @@ export var createTableView = function createTableView(node, view, getPos, portal
|
|
|
291
291
|
var _getPluginConfig = getPluginConfig(pluginConfig),
|
|
292
292
|
allowColumnResizing = _getPluginConfig.allowColumnResizing,
|
|
293
293
|
allowControls = _getPluginConfig.allowControls;
|
|
294
|
-
var hasIntlContext = true;
|
|
295
294
|
return new TableView({
|
|
296
295
|
node: node,
|
|
297
296
|
view: view,
|
|
@@ -312,7 +311,6 @@ export var createTableView = function createTableView(node, view, getPos, portal
|
|
|
312
311
|
getEditorContainerWidth: getEditorContainerWidth,
|
|
313
312
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
314
313
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
315
|
-
hasIntlContext: hasIntlContext,
|
|
316
314
|
pluginInjectionApi: pluginInjectionApi
|
|
317
315
|
}).init();
|
|
318
316
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
6
5
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
7
6
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags, getPosHandler, getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
8
7
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -33,5 +32,5 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
33
32
|
}): boolean;
|
|
34
33
|
destroy(): void;
|
|
35
34
|
}
|
|
36
|
-
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI:
|
|
35
|
+
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, dispatchAnalyticsEvent: DispatchAnalyticsEvent, pluginInjectionApi?: PluginInjectionAPI, isTableAlignmentEnabled?: boolean) => NodeView;
|
|
37
36
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
5
4
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
5
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -20,13 +19,12 @@ export interface Props {
|
|
|
20
19
|
allowColumnResizing?: boolean;
|
|
21
20
|
allowControls?: boolean;
|
|
22
21
|
cellMinWidth?: number;
|
|
23
|
-
portalProviderAPI:
|
|
22
|
+
portalProviderAPI: PortalProviderAPI;
|
|
24
23
|
eventDispatcher: EventDispatcher;
|
|
25
24
|
getPos: () => number | undefined;
|
|
26
25
|
options?: TableOptions;
|
|
27
26
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
28
27
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
29
28
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
30
|
-
hasIntlContext: boolean;
|
|
31
29
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
32
30
|
}
|
|
@@ -2,8 +2,7 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
6
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
6
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
7
|
import type { PluginConfig, PluginInjectionAPI } from '../types';
|
|
9
|
-
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI:
|
|
8
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, tableResizingEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => SafePlugin<import("../types").TablePluginState>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
6
5
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
7
6
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags, getPosHandler, getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
8
7
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -33,5 +32,5 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
33
32
|
}): boolean;
|
|
34
33
|
destroy(): void;
|
|
35
34
|
}
|
|
36
|
-
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI:
|
|
35
|
+
export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, dispatchAnalyticsEvent: DispatchAnalyticsEvent, pluginInjectionApi?: PluginInjectionAPI, isTableAlignmentEnabled?: boolean) => NodeView;
|
|
37
36
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
5
4
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
5
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -20,13 +19,12 @@ export interface Props {
|
|
|
20
19
|
allowColumnResizing?: boolean;
|
|
21
20
|
allowControls?: boolean;
|
|
22
21
|
cellMinWidth?: number;
|
|
23
|
-
portalProviderAPI:
|
|
22
|
+
portalProviderAPI: PortalProviderAPI;
|
|
24
23
|
eventDispatcher: EventDispatcher;
|
|
25
24
|
getPos: () => number | undefined;
|
|
26
25
|
options?: TableOptions;
|
|
27
26
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
28
27
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
29
28
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
30
|
-
hasIntlContext: boolean;
|
|
31
29
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
32
30
|
}
|
|
@@ -2,8 +2,7 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
5
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
6
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
6
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
8
7
|
import type { PluginConfig, PluginInjectionAPI } from '../types';
|
|
9
|
-
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI:
|
|
8
|
+
export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, getIntl: () => IntlShape, tableResizingEnabled?: boolean, fullWidthModeEnabled?: boolean, previousFullWidthModeEnabled?: boolean, dragAndDropEnabled?: boolean, editorAnalyticsAPI?: EditorAnalyticsAPI, pluginInjectionApi?: PluginInjectionAPI, isTableScalingEnabled?: boolean, isTableAlignmentEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean) => SafePlugin<import("../types").TablePluginState>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.20.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/adf-schema": "^39.0.3",
|
|
32
32
|
"@atlaskit/button": "^18.4.0",
|
|
33
33
|
"@atlaskit/custom-steps": "^0.4.0",
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^85.0.0",
|
|
35
35
|
"@atlaskit/editor-palette": "1.6.0",
|
|
36
36
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
45
45
|
"@atlaskit/editor-tables": "^2.7.0",
|
|
46
46
|
"@atlaskit/icon": "^22.6.0",
|
|
47
|
-
"@atlaskit/menu": "^2.
|
|
47
|
+
"@atlaskit/menu": "^2.8.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
49
|
"@atlaskit/pragmatic-drag-and-drop": "^1.2.0",
|
|
50
50
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.4.0",
|
package/src/nodeviews/table.tsx
CHANGED
|
@@ -5,7 +5,6 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
|
5
5
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
6
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
7
7
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
8
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
9
8
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
10
9
|
import type {
|
|
11
10
|
GetEditorContainerWidth,
|
|
@@ -20,7 +19,7 @@ import type { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state'
|
|
|
20
19
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
21
20
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
22
21
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
23
|
-
import {
|
|
22
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
24
23
|
|
|
25
24
|
import { pluginConfig as getPluginConfig } from '../create-plugin-config';
|
|
26
25
|
import { pluginKey as tableDragAndDropPluginKey } from '../pm-plugins/drag-and-drop';
|
|
@@ -102,10 +101,6 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
102
101
|
props.portalProviderAPI,
|
|
103
102
|
props.eventDispatcher,
|
|
104
103
|
props,
|
|
105
|
-
undefined,
|
|
106
|
-
undefined,
|
|
107
|
-
undefined,
|
|
108
|
-
props.hasIntlContext,
|
|
109
104
|
);
|
|
110
105
|
this.getPos = props.getPos;
|
|
111
106
|
this.eventDispatcher = props.eventDispatcher;
|
|
@@ -183,7 +178,7 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
183
178
|
};
|
|
184
179
|
|
|
185
180
|
render(props: Props, forwardRef: ForwardRef) {
|
|
186
|
-
if (
|
|
181
|
+
if (fg('platform.editor.table.use-shared-state-hook')) {
|
|
187
182
|
return (
|
|
188
183
|
<TableComponentWithSharedState
|
|
189
184
|
forwardRef={forwardRef}
|
|
@@ -358,7 +353,7 @@ export const createTableView = (
|
|
|
358
353
|
node: PmNode,
|
|
359
354
|
view: EditorView,
|
|
360
355
|
getPos: getPosHandler,
|
|
361
|
-
portalProviderAPI:
|
|
356
|
+
portalProviderAPI: PortalProviderAPI,
|
|
362
357
|
eventDispatcher: EventDispatcher,
|
|
363
358
|
getEditorContainerWidth: GetEditorContainerWidth,
|
|
364
359
|
getEditorFeatureFlags: GetEditorFeatureFlags,
|
|
@@ -375,7 +370,6 @@ export const createTableView = (
|
|
|
375
370
|
isTableScalingEnabled, // same as options.isTableScalingEnabled
|
|
376
371
|
} = getPluginState(view.state);
|
|
377
372
|
const { allowColumnResizing, allowControls } = getPluginConfig(pluginConfig);
|
|
378
|
-
const hasIntlContext = true;
|
|
379
373
|
|
|
380
374
|
return new TableView({
|
|
381
375
|
node,
|
|
@@ -396,7 +390,6 @@ export const createTableView = (
|
|
|
396
390
|
getEditorContainerWidth,
|
|
397
391
|
getEditorFeatureFlags,
|
|
398
392
|
dispatchAnalyticsEvent,
|
|
399
|
-
hasIntlContext,
|
|
400
393
|
pluginInjectionApi,
|
|
401
394
|
}).init();
|
|
402
395
|
};
|
package/src/nodeviews/types.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
3
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
5
4
|
import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
5
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -23,13 +22,12 @@ export interface Props {
|
|
|
23
22
|
allowColumnResizing?: boolean;
|
|
24
23
|
allowControls?: boolean;
|
|
25
24
|
cellMinWidth?: number;
|
|
26
|
-
portalProviderAPI:
|
|
25
|
+
portalProviderAPI: PortalProviderAPI;
|
|
27
26
|
eventDispatcher: EventDispatcher;
|
|
28
27
|
getPos: () => number | undefined;
|
|
29
28
|
options?: TableOptions;
|
|
30
29
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
31
30
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
32
31
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
33
|
-
hasIntlContext: boolean;
|
|
34
32
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
35
33
|
}
|
package/src/pm-plugins/main.ts
CHANGED
|
@@ -10,7 +10,6 @@ import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/edito
|
|
|
10
10
|
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
11
11
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
12
12
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
13
|
-
import type { LegacyPortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
14
13
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
15
14
|
import {
|
|
16
15
|
transformSliceToRemoveOpenBodiedExtension,
|
|
@@ -79,7 +78,7 @@ import { pluginKey } from './plugin-key';
|
|
|
79
78
|
export const createPlugin = (
|
|
80
79
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent,
|
|
81
80
|
dispatch: Dispatch,
|
|
82
|
-
portalProviderAPI:
|
|
81
|
+
portalProviderAPI: PortalProviderAPI,
|
|
83
82
|
eventDispatcher: EventDispatcher,
|
|
84
83
|
pluginConfig: PluginConfig,
|
|
85
84
|
getEditorContainerWidth: GetEditorContainerWidth,
|