@atlaskit/editor-plugin-table 12.3.0 → 12.3.2
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 +16 -0
- package/dist/cjs/nodeviews/TableContainer.js +9 -7
- package/dist/cjs/nodeviews/table.js +5 -0
- package/dist/cjs/nodeviews/toDOM.js +5 -2
- package/dist/es2019/nodeviews/TableContainer.js +9 -7
- package/dist/es2019/nodeviews/table.js +5 -0
- package/dist/es2019/nodeviews/toDOM.js +5 -1
- package/dist/esm/nodeviews/TableContainer.js +9 -7
- package/dist/esm/nodeviews/table.js +5 -0
- package/dist/esm/nodeviews/toDOM.js +5 -2
- package/dist/types/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types/nodeviews/TableComponent.d.ts +21 -21
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +9 -9
- package/dist/types/nodeviews/TableContainer.d.ts +20 -20
- package/dist/types/nodeviews/TableResizer.d.ts +16 -16
- package/dist/types/nodeviews/TableRow.d.ts +1 -1
- package/dist/types/nodeviews/table-node-views.d.ts +4 -4
- package/dist/types/nodeviews/table.d.ts +2 -2
- package/dist/types/nodeviews/toDOM.d.ts +4 -4
- package/dist/types/nodeviews/types.d.ts +12 -12
- package/dist/types/pm-plugins/analytics/actions.d.ts +2 -2
- package/dist/types/pm-plugins/analytics/types.d.ts +2 -2
- package/dist/types/pm-plugins/commands/column-resize.d.ts +6 -6
- package/dist/types/pm-plugins/commands/insert.d.ts +7 -7
- package/dist/types/pm-plugins/drag-and-drop/actions.d.ts +4 -4
- package/dist/types/pm-plugins/drag-and-drop/types.d.ts +3 -3
- package/dist/types/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
- package/dist/types/pm-plugins/sticky-headers/types.d.ts +2 -2
- package/dist/types/pm-plugins/table-resizing/commands.d.ts +3 -3
- package/dist/types/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
- package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +6 -6
- package/dist/types/pm-plugins/table-resizing/utils/scale-table.d.ts +6 -6
- package/dist/types/pm-plugins/table-resizing/utils/types.d.ts +8 -8
- package/dist/types/pm-plugins/utils/analytics.d.ts +2 -2
- package/dist/types/pm-plugins/utils/collapse.d.ts +3 -3
- package/dist/types/pm-plugins/utils/column-controls.d.ts +1 -1
- package/dist/types/pm-plugins/utils/create.d.ts +8 -8
- package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types/pm-plugins/utils/drag-menu.d.ts +1 -1
- package/dist/types/pm-plugins/utils/row-controls.d.ts +2 -2
- package/dist/types/pm-plugins/utils/snapping.d.ts +1 -1
- package/dist/types/pm-plugins/view-mode-sort/index.d.ts +1 -1
- package/dist/types/pm-plugins/view-mode-sort/types.d.ts +2 -2
- package/dist/types/tablePluginType.d.ts +10 -10
- package/dist/types/types/index.d.ts +99 -99
- package/dist/types/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types/ui/ContentComponent.d.ts +5 -5
- package/dist/types/ui/DragHandle/HandleIconComponent.d.ts +1 -1
- package/dist/types/ui/DragHandle/index.d.ts +11 -11
- package/dist/types/ui/DragPreview/index.d.ts +1 -1
- package/dist/types/ui/FloatingContextualButton/FixedButton.d.ts +2 -2
- package/dist/types/ui/FloatingContextualButton/index.d.ts +7 -7
- package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +10 -10
- package/dist/types/ui/FloatingContextualMenu/index.d.ts +8 -8
- package/dist/types/ui/FloatingDeleteButton/DeleteButton.d.ts +2 -2
- package/dist/types/ui/FloatingDeleteButton/getPopUpOptions.d.ts +1 -1
- package/dist/types/ui/FloatingDeleteButton/index.d.ts +9 -9
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +15 -15
- package/dist/types/ui/FloatingDragMenu/DropdownMenu.d.ts +14 -14
- package/dist/types/ui/FloatingDragMenu/index.d.ts +14 -14
- package/dist/types/ui/FloatingInsertButton/InsertButton.d.ts +3 -3
- package/dist/types/ui/FloatingInsertButton/index.d.ts +11 -11
- package/dist/types/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +4 -4
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -10
- package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
- package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +4 -4
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +10 -10
- package/dist/types/ui/TableFloatingControls/CornerControls/types.d.ts +3 -3
- package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +7 -7
- package/dist/types/ui/TableFloatingControls/NumberColumn/index.d.ts +7 -7
- package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +5 -5
- package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +8 -8
- package/dist/types/ui/TableFloatingControls/index.d.ts +14 -14
- package/dist/types/ui/global-styles.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +21 -21
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +9 -9
- package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +20 -20
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +16 -16
- package/dist/types-ts4.5/nodeviews/TableRow.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/table-node-views.d.ts +4 -4
- package/dist/types-ts4.5/nodeviews/table.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/toDOM.d.ts +4 -4
- package/dist/types-ts4.5/nodeviews/types.d.ts +12 -12
- package/dist/types-ts4.5/pm-plugins/analytics/actions.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/analytics/types.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/commands/insert.d.ts +7 -7
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/actions.d.ts +4 -4
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/types.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/sticky-headers/types.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/table-resizing/commands.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/types.d.ts +8 -8
- package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/collapse.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/column-controls.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +8 -8
- package/dist/types-ts4.5/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/drag-menu.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/row-controls.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/snapping.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/view-mode-sort/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/view-mode-sort/types.d.ts +2 -2
- package/dist/types-ts4.5/tablePluginType.d.ts +10 -10
- package/dist/types-ts4.5/types/index.d.ts +99 -99
- package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentComponent.d.ts +5 -5
- package/dist/types-ts4.5/ui/DragHandle/HandleIconComponent.d.ts +1 -1
- package/dist/types-ts4.5/ui/DragHandle/index.d.ts +11 -11
- package/dist/types-ts4.5/ui/DragPreview/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingContextualButton/FixedButton.d.ts +2 -2
- package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +7 -7
- package/dist/types-ts4.5/ui/FloatingContextualMenu/ContextualMenu.d.ts +10 -10
- package/dist/types-ts4.5/ui/FloatingContextualMenu/index.d.ts +8 -8
- package/dist/types-ts4.5/ui/FloatingDeleteButton/DeleteButton.d.ts +2 -2
- package/dist/types-ts4.5/ui/FloatingDeleteButton/getPopUpOptions.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDeleteButton/index.d.ts +9 -9
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +15 -15
- package/dist/types-ts4.5/ui/FloatingDragMenu/DropdownMenu.d.ts +14 -14
- package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +14 -14
- package/dist/types-ts4.5/ui/FloatingInsertButton/InsertButton.d.ts +3 -3
- package/dist/types-ts4.5/ui/FloatingInsertButton/index.d.ts +11 -11
- package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +4 -4
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -10
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +4 -4
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +10 -10
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/types.d.ts +3 -3
- package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +7 -7
- package/dist/types-ts4.5/ui/TableFloatingControls/NumberColumn/index.d.ts +7 -7
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +5 -5
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +8 -8
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +14 -14
- package/dist/types-ts4.5/ui/global-styles.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 12.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dd62fd4cc8e91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dd62fd4cc8e91) -
|
|
8
|
+
mark table elements for better TTVC tracking
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 12.3.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
16
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 12.3.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -104,14 +104,14 @@ var AlignmentTableContainer = function AlignmentTableContainer(_ref2) {
|
|
|
104
104
|
var style = (0, _react.useMemo)(function () {
|
|
105
105
|
return (0, _tableContainerStyles.getAlignmentStyle)(alignment);
|
|
106
106
|
}, [alignment]);
|
|
107
|
-
return (
|
|
108
|
-
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
+
"data-testid": "table-alignment-container",
|
|
109
|
+
"data-ssr-placeholder": (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined,
|
|
110
|
+
"data-ssr-placeholder-replace": (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined
|
|
109
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, children)
|
|
114
|
-
);
|
|
112
|
+
,
|
|
113
|
+
style: style
|
|
114
|
+
}, children);
|
|
115
115
|
};
|
|
116
116
|
var AlignmentTableContainerWrapper = function AlignmentTableContainerWrapper(_ref3) {
|
|
117
117
|
var isTableAlignmentEnabled = _ref3.isTableAlignmentEnabled,
|
|
@@ -123,6 +123,8 @@ var AlignmentTableContainerWrapper = function AlignmentTableContainerWrapper(_re
|
|
|
123
123
|
if (!isTableAlignmentEnabled) {
|
|
124
124
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
125
125
|
"data-testid": "table-alignment-container",
|
|
126
|
+
"data-ssr-placeholder": (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined,
|
|
127
|
+
"data-ssr-placeholder-replace": (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined,
|
|
126
128
|
style: {
|
|
127
129
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
128
130
|
display: 'flex',
|
|
@@ -21,6 +21,7 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
21
21
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
22
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
23
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
25
|
var _createPluginConfig = require("../pm-plugins/create-plugin-config");
|
|
25
26
|
var _pluginKey = require("../pm-plugins/drag-and-drop/plugin-key");
|
|
26
27
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
@@ -153,6 +154,10 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
153
154
|
if (this.view.state.selection.visible) {
|
|
154
155
|
selectionBookmark = this.view.state.selection.getBookmark();
|
|
155
156
|
}
|
|
157
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
158
|
+
this.dom.setAttribute('data-ssr-placeholder', "table-nodeview-".concat(this.node.attrs.localId));
|
|
159
|
+
this.dom.setAttribute('data-ssr-placeholder-replace', "table-nodeview-".concat(this.node.attrs.localId));
|
|
160
|
+
}
|
|
156
161
|
|
|
157
162
|
// Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
|
|
158
163
|
if (this.dom && this.renderedDOM) {
|
|
@@ -40,13 +40,16 @@ var tableNodeSpecWithFixedToDOM = exports.tableNodeSpecWithFixedToDOM = function
|
|
|
40
40
|
var tableMinWidth = (0, _colgroup.getResizerMinWidth)(node);
|
|
41
41
|
var tableWidthAttribute = node.attrs.width ? "".concat(node.attrs.width, "px") : "100%";
|
|
42
42
|
var isFullPageEditor = !config.isChromelessEditor && !config.isCommentEditor;
|
|
43
|
-
var attrs = {
|
|
43
|
+
var attrs = _objectSpread({
|
|
44
44
|
'data-number-column': node.attrs.isNumberColumnEnabled,
|
|
45
45
|
'data-layout': node.attrs.layout,
|
|
46
46
|
'data-autosize': node.attrs.__autoSize,
|
|
47
47
|
'data-table-local-id': node.attrs.localId,
|
|
48
48
|
'data-table-width': node.attrs.width
|
|
49
|
-
}
|
|
49
|
+
}, (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) && {
|
|
50
|
+
'data-ssr-placeholder': "table-".concat(node.attrs.localId),
|
|
51
|
+
'data-ssr-placeholder-replace': "table-".concat(node.attrs.localId)
|
|
52
|
+
});
|
|
50
53
|
|
|
51
54
|
// This would be used for table scaling in colgroup CSS
|
|
52
55
|
// cqw, or px is well supported
|
|
@@ -101,14 +101,14 @@ const AlignmentTableContainer = ({
|
|
|
101
101
|
const style = useMemo(() => {
|
|
102
102
|
return getAlignmentStyle(alignment);
|
|
103
103
|
}, [alignment]);
|
|
104
|
-
return (
|
|
105
|
-
|
|
104
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
"data-testid": "table-alignment-container",
|
|
106
|
+
"data-ssr-placeholder": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? `table-${node.attrs.localId}` : undefined,
|
|
107
|
+
"data-ssr-placeholder-replace": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? `table-${node.attrs.localId}` : undefined
|
|
106
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, children)
|
|
111
|
-
);
|
|
109
|
+
,
|
|
110
|
+
style: style
|
|
111
|
+
}, children);
|
|
112
112
|
};
|
|
113
113
|
const AlignmentTableContainerWrapper = ({
|
|
114
114
|
isTableAlignmentEnabled,
|
|
@@ -121,6 +121,8 @@ const AlignmentTableContainerWrapper = ({
|
|
|
121
121
|
if (!isTableAlignmentEnabled) {
|
|
122
122
|
return /*#__PURE__*/React.createElement("div", {
|
|
123
123
|
"data-testid": "table-alignment-container",
|
|
124
|
+
"data-ssr-placeholder": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? `table-${node.attrs.localId}` : undefined,
|
|
125
|
+
"data-ssr-placeholder-replace": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? `table-${node.attrs.localId}` : undefined,
|
|
124
126
|
style: {
|
|
125
127
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
126
128
|
display: 'flex',
|
|
@@ -7,6 +7,7 @@ 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
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { pluginConfig as getPluginConfig } from '../pm-plugins/create-plugin-config';
|
|
11
12
|
import { pluginKey as tableDragAndDropPluginKey } from '../pm-plugins/drag-and-drop/plugin-key';
|
|
12
13
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -125,6 +126,10 @@ export default class TableView extends ReactNodeView {
|
|
|
125
126
|
if (this.view.state.selection.visible) {
|
|
126
127
|
selectionBookmark = this.view.state.selection.getBookmark();
|
|
127
128
|
}
|
|
129
|
+
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
130
|
+
this.dom.setAttribute('data-ssr-placeholder', `table-nodeview-${this.node.attrs.localId}`);
|
|
131
|
+
this.dom.setAttribute('data-ssr-placeholder-replace', `table-nodeview-${this.node.attrs.localId}`);
|
|
132
|
+
}
|
|
128
133
|
|
|
129
134
|
// Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
|
|
130
135
|
if (this.dom && this.renderedDOM) {
|
|
@@ -29,7 +29,11 @@ export const tableNodeSpecWithFixedToDOM = config => {
|
|
|
29
29
|
'data-layout': node.attrs.layout,
|
|
30
30
|
'data-autosize': node.attrs.__autoSize,
|
|
31
31
|
'data-table-local-id': node.attrs.localId,
|
|
32
|
-
'data-table-width': node.attrs.width
|
|
32
|
+
'data-table-width': node.attrs.width,
|
|
33
|
+
...(expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) && {
|
|
34
|
+
'data-ssr-placeholder': `table-${node.attrs.localId}`,
|
|
35
|
+
'data-ssr-placeholder-replace': `table-${node.attrs.localId}`
|
|
36
|
+
})
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
// This would be used for table scaling in colgroup CSS
|
|
@@ -95,14 +95,14 @@ var AlignmentTableContainer = function AlignmentTableContainer(_ref2) {
|
|
|
95
95
|
var style = useMemo(function () {
|
|
96
96
|
return getAlignmentStyle(alignment);
|
|
97
97
|
}, [alignment]);
|
|
98
|
-
return (
|
|
99
|
-
|
|
98
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
"data-testid": "table-alignment-container",
|
|
100
|
+
"data-ssr-placeholder": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined,
|
|
101
|
+
"data-ssr-placeholder-replace": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined
|
|
100
102
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}, children)
|
|
105
|
-
);
|
|
103
|
+
,
|
|
104
|
+
style: style
|
|
105
|
+
}, children);
|
|
106
106
|
};
|
|
107
107
|
var AlignmentTableContainerWrapper = function AlignmentTableContainerWrapper(_ref3) {
|
|
108
108
|
var isTableAlignmentEnabled = _ref3.isTableAlignmentEnabled,
|
|
@@ -114,6 +114,8 @@ var AlignmentTableContainerWrapper = function AlignmentTableContainerWrapper(_re
|
|
|
114
114
|
if (!isTableAlignmentEnabled) {
|
|
115
115
|
return /*#__PURE__*/React.createElement("div", {
|
|
116
116
|
"data-testid": "table-alignment-container",
|
|
117
|
+
"data-ssr-placeholder": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined,
|
|
118
|
+
"data-ssr-placeholder-replace": expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) ? "table-".concat(node.attrs.localId) : undefined,
|
|
117
119
|
style: {
|
|
118
120
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
119
121
|
display: 'flex',
|
|
@@ -17,6 +17,7 @@ import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
|
17
17
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
18
18
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import { pluginConfig as getPluginConfig } from '../pm-plugins/create-plugin-config';
|
|
21
22
|
import { pluginKey as tableDragAndDropPluginKey } from '../pm-plugins/drag-and-drop/plugin-key';
|
|
22
23
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -146,6 +147,10 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
146
147
|
if (this.view.state.selection.visible) {
|
|
147
148
|
selectionBookmark = this.view.state.selection.getBookmark();
|
|
148
149
|
}
|
|
150
|
+
if (expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true)) {
|
|
151
|
+
this.dom.setAttribute('data-ssr-placeholder', "table-nodeview-".concat(this.node.attrs.localId));
|
|
152
|
+
this.dom.setAttribute('data-ssr-placeholder-replace', "table-nodeview-".concat(this.node.attrs.localId));
|
|
153
|
+
}
|
|
149
154
|
|
|
150
155
|
// Remove the ProseMirror table DOM structure to avoid duplication, as it's replaced with the React table node.
|
|
151
156
|
if (this.dom && this.renderedDOM) {
|
|
@@ -33,13 +33,16 @@ export var tableNodeSpecWithFixedToDOM = function tableNodeSpecWithFixedToDOM(co
|
|
|
33
33
|
var tableMinWidth = getResizerMinWidth(node);
|
|
34
34
|
var tableWidthAttribute = node.attrs.width ? "".concat(node.attrs.width, "px") : "100%";
|
|
35
35
|
var isFullPageEditor = !config.isChromelessEditor && !config.isCommentEditor;
|
|
36
|
-
var attrs = {
|
|
36
|
+
var attrs = _objectSpread({
|
|
37
37
|
'data-number-column': node.attrs.isNumberColumnEnabled,
|
|
38
38
|
'data-layout': node.attrs.layout,
|
|
39
39
|
'data-autosize': node.attrs.__autoSize,
|
|
40
40
|
'data-table-local-id': node.attrs.localId,
|
|
41
41
|
'data-table-width': node.attrs.width
|
|
42
|
-
}
|
|
42
|
+
}, expValEquals('platform_editor_tables_scaling_css', 'isEnabled', true) && {
|
|
43
|
+
'data-ssr-placeholder': "table-".concat(node.attrs.localId),
|
|
44
|
+
'data-ssr-placeholder-replace': "table-".concat(node.attrs.localId)
|
|
45
|
+
});
|
|
43
46
|
|
|
44
47
|
// This would be used for table scaling in colgroup CSS
|
|
45
48
|
// cqw, or px is well supported
|
|
@@ -3,7 +3,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
export declare const ExternalDropTargets: ({ editorView, node, getScrollOffset, getTableWrapperWidth, }: {
|
|
5
5
|
editorView: EditorView;
|
|
6
|
-
node?: PMNode;
|
|
7
6
|
getScrollOffset: () => number;
|
|
8
7
|
getTableWrapperWidth: () => number;
|
|
8
|
+
node?: PMNode;
|
|
9
9
|
}) => React.JSX.Element | null;
|
|
@@ -10,36 +10,36 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
10
10
|
import type { CellHoverMeta, PluginInjectionAPI } from '../types';
|
|
11
11
|
import type { TableOptions } from './types';
|
|
12
12
|
interface ComponentProps {
|
|
13
|
-
view: EditorView;
|
|
14
|
-
getNode: () => PmNode;
|
|
15
13
|
allowColumnResizing?: boolean;
|
|
16
|
-
eventDispatcher: EventDispatcher;
|
|
17
|
-
getPos: () => number | undefined;
|
|
18
|
-
options?: TableOptions;
|
|
19
|
-
contentDOM: (node: HTMLElement | null) => void;
|
|
20
|
-
containerWidth: EditorContainerWidth;
|
|
21
14
|
allowControls?: boolean;
|
|
22
|
-
allowTableResizing?: boolean;
|
|
23
15
|
allowTableAlignment?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
isDragAndDropEnabled?: boolean;
|
|
28
|
-
isTableScalingEnabled?: boolean;
|
|
29
|
-
tableActive: boolean;
|
|
30
|
-
ordering?: TableColumnOrdering;
|
|
31
|
-
isResizing?: boolean;
|
|
32
|
-
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
16
|
+
allowTableResizing?: boolean;
|
|
17
|
+
containerWidth: EditorContainerWidth;
|
|
18
|
+
contentDOM: (node: HTMLElement | null) => void;
|
|
33
19
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
34
|
-
|
|
20
|
+
eventDispatcher: EventDispatcher;
|
|
21
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
22
|
+
getNode: () => PmNode;
|
|
23
|
+
getPos: () => number | undefined;
|
|
24
|
+
hoveredCell?: CellHoverMeta;
|
|
25
|
+
hoveredRows?: number[];
|
|
35
26
|
intl: IntlShape;
|
|
27
|
+
isDragAndDropEnabled?: boolean;
|
|
28
|
+
isHeaderColumnEnabled: boolean;
|
|
29
|
+
isHeaderRowEnabled: boolean;
|
|
36
30
|
isInDanger?: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
isMediaFullscreen?: boolean;
|
|
32
|
+
isResizing?: boolean;
|
|
39
33
|
isTableHovered?: boolean;
|
|
34
|
+
isTableScalingEnabled?: boolean;
|
|
40
35
|
isWholeTableInDanger?: boolean;
|
|
41
|
-
selection?: Selection;
|
|
42
36
|
limitedMode?: boolean;
|
|
37
|
+
options?: TableOptions;
|
|
38
|
+
ordering?: TableColumnOrdering;
|
|
39
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
40
|
+
selection?: Selection;
|
|
41
|
+
tableActive: boolean;
|
|
42
|
+
view: EditorView;
|
|
43
43
|
}
|
|
44
44
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ComponentProps>> & {
|
|
45
45
|
WrappedComponent: React.ComponentType<ComponentProps>;
|
|
@@ -8,19 +8,19 @@ import type { PluginInjectionAPI } from '../types';
|
|
|
8
8
|
import type { TableOptions } from './types';
|
|
9
9
|
type ForwardRef = (node: HTMLElement | null) => any;
|
|
10
10
|
type TableComponentWithSharedStateProps = {
|
|
11
|
-
view: EditorView;
|
|
12
|
-
options?: TableOptions;
|
|
13
|
-
getNode: () => PmNode;
|
|
14
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
15
|
-
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
16
|
-
api?: PluginInjectionAPI;
|
|
17
|
-
eventDispatcher: EventDispatcher;
|
|
18
|
-
forwardRef: ForwardRef;
|
|
19
|
-
getPos: getPosHandlerNode;
|
|
20
11
|
allowColumnResizing?: boolean;
|
|
21
12
|
allowControls?: boolean;
|
|
22
13
|
allowTableAlignment?: boolean;
|
|
23
14
|
allowTableResizing?: boolean;
|
|
15
|
+
api?: PluginInjectionAPI;
|
|
16
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
17
|
+
eventDispatcher: EventDispatcher;
|
|
18
|
+
forwardRef: ForwardRef;
|
|
19
|
+
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
20
|
+
getNode: () => PmNode;
|
|
21
|
+
getPos: getPosHandlerNode;
|
|
22
|
+
options?: TableOptions;
|
|
23
|
+
view: EditorView;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Use useSharedPluginState to control re-renders from plugin dependencies
|
|
@@ -5,48 +5,48 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { PluginInjectionAPI } from '../types';
|
|
7
7
|
type ResizableTableContainerProps = {
|
|
8
|
-
containerWidth: number;
|
|
9
|
-
lineLength: number;
|
|
10
|
-
node: PMNode;
|
|
11
8
|
className: string;
|
|
9
|
+
containerWidth: number;
|
|
12
10
|
editorView: EditorView;
|
|
13
11
|
getPos: () => number | undefined;
|
|
14
|
-
|
|
12
|
+
isChromelessEditor?: boolean;
|
|
13
|
+
isCommentEditor?: boolean;
|
|
15
14
|
isResizing?: boolean;
|
|
16
|
-
|
|
17
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
18
|
-
tableWrapperHeight?: number;
|
|
19
|
-
isWholeTableInDanger?: boolean;
|
|
15
|
+
isTableAlignmentEnabled?: boolean;
|
|
20
16
|
isTableScalingEnabled?: boolean;
|
|
21
17
|
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
22
|
-
|
|
18
|
+
isWholeTableInDanger?: boolean;
|
|
19
|
+
isWindowResized?: boolean;
|
|
20
|
+
lineLength: number;
|
|
21
|
+
node: PMNode;
|
|
22
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
23
23
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
tableRef: HTMLTableElement;
|
|
25
|
+
tableWrapperHeight?: number;
|
|
26
26
|
};
|
|
27
27
|
export declare const ResizableTableContainer: React.FC<ResizableTableContainerProps & {
|
|
28
28
|
children?: React.ReactNode | undefined;
|
|
29
29
|
}>;
|
|
30
30
|
type TableContainerProps = {
|
|
31
|
-
node: PMNode;
|
|
32
31
|
className: string;
|
|
33
32
|
containerWidth: EditorContainerWidth;
|
|
34
33
|
editorView: EditorView;
|
|
35
34
|
getPos: () => number | undefined;
|
|
36
|
-
|
|
35
|
+
isChromelessEditor?: boolean;
|
|
36
|
+
isCommentEditor?: boolean;
|
|
37
37
|
isNested: boolean;
|
|
38
38
|
isResizing?: boolean;
|
|
39
|
-
|
|
40
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
41
|
-
tableWrapperHeight?: number;
|
|
42
|
-
isWholeTableInDanger?: boolean;
|
|
39
|
+
isTableAlignmentEnabled?: boolean;
|
|
43
40
|
isTableResizingEnabled: boolean | undefined;
|
|
44
41
|
isTableScalingEnabled?: boolean;
|
|
45
42
|
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
46
|
-
|
|
43
|
+
isWholeTableInDanger?: boolean;
|
|
44
|
+
isWindowResized?: boolean;
|
|
45
|
+
node: PMNode;
|
|
46
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
47
47
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
tableRef: HTMLTableElement;
|
|
49
|
+
tableWrapperHeight?: number;
|
|
50
50
|
};
|
|
51
51
|
export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, isWindowResized, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<TableContainerProps>) => React.JSX.Element;
|
|
52
52
|
export {};
|
|
@@ -7,29 +7,29 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { PluginInjectionAPI } from '../types';
|
|
9
9
|
interface TableResizerProps {
|
|
10
|
-
|
|
11
|
-
maxWidth: number | string;
|
|
10
|
+
attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
|
|
12
11
|
containerWidth: number;
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
displayGapCursor: (toggle: boolean) => boolean;
|
|
14
|
+
displayGuideline: (guideline: GuidelineConfig[]) => boolean;
|
|
15
15
|
editorView: EditorView;
|
|
16
16
|
getPos: () => number | undefined;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
|
|
21
|
-
displayGapCursor: (toggle: boolean) => boolean;
|
|
22
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
17
|
+
isCommentEditor?: boolean;
|
|
18
|
+
isFullWidthModeEnabled?: boolean;
|
|
19
|
+
isTableAlignmentEnabled?: boolean;
|
|
23
20
|
isTableScalingEnabled?: boolean;
|
|
24
21
|
isTableWithFixedColumnWidthsOptionEnabled?: boolean;
|
|
25
|
-
isTableAlignmentEnabled?: boolean;
|
|
26
22
|
isWholeTableInDanger?: boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
onResizeStop?: () => void;
|
|
23
|
+
lineLength: number;
|
|
24
|
+
maxWidth: number | string;
|
|
25
|
+
node: PMNode;
|
|
31
26
|
onResizeStart?: () => void;
|
|
32
|
-
|
|
27
|
+
onResizeStop?: () => void;
|
|
28
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
29
|
+
shouldUseIncreasedScalingPercent?: boolean;
|
|
30
|
+
tableRef: HTMLTableElement;
|
|
31
|
+
updateWidth: (width: number) => void;
|
|
32
|
+
width: number;
|
|
33
33
|
}
|
|
34
34
|
export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, isCommentEditor, disabled, }: PropsWithChildren<TableResizerProps>) => React.JSX.Element;
|
|
35
35
|
export {};
|
|
@@ -34,8 +34,8 @@ export default class TableRow extends TableNodeView<HTMLTableRowElement> impleme
|
|
|
34
34
|
update(node: PMNode, ..._args: any[]): boolean;
|
|
35
35
|
destroy(): void;
|
|
36
36
|
ignoreMutation(mutationRecord: MutationRecord | {
|
|
37
|
-
type: 'selection';
|
|
38
37
|
target: Node;
|
|
38
|
+
type: 'selection';
|
|
39
39
|
}): boolean;
|
|
40
40
|
/**
|
|
41
41
|
* Methods
|
|
@@ -8,14 +8,14 @@ import type { PluginInjectionAPI } from '../types';
|
|
|
8
8
|
import TableCell from './TableCell';
|
|
9
9
|
import TableRow from './TableRow';
|
|
10
10
|
type TableViewOptions = {
|
|
11
|
-
|
|
11
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
12
12
|
eventDispatcher: EventDispatcher;
|
|
13
13
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
14
14
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
15
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
16
|
-
pluginInjectionApi?: PluginInjectionAPI;
|
|
17
|
-
isCommentEditor?: boolean;
|
|
18
15
|
isChromelessEditor?: boolean;
|
|
16
|
+
isCommentEditor?: boolean;
|
|
17
|
+
pluginInjectionApi?: PluginInjectionAPI;
|
|
18
|
+
portalProviderAPI: PortalProviderAPI;
|
|
19
19
|
};
|
|
20
20
|
export declare const tableView: (options: TableViewOptions) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => import("prosemirror-view").NodeView;
|
|
21
21
|
type TableCellViewOptions = {
|
|
@@ -19,8 +19,8 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
19
19
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
20
20
|
constructor(props: Props);
|
|
21
21
|
getContentDOM(): {
|
|
22
|
-
dom: HTMLElement;
|
|
23
22
|
contentDOM?: HTMLElement;
|
|
23
|
+
dom: HTMLElement;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Handles moving the table from ProseMirror's DOM structure into a React-rendered table node.
|
|
@@ -36,8 +36,8 @@ export default class TableView extends ReactNodeView<Props> {
|
|
|
36
36
|
private hasHoveredRows;
|
|
37
37
|
viewShouldUpdate(nextNode: PmNode): boolean;
|
|
38
38
|
ignoreMutation(mutation: MutationRecord | {
|
|
39
|
-
type: 'selection';
|
|
40
39
|
target: Node;
|
|
40
|
+
type: 'selection';
|
|
41
41
|
}): boolean;
|
|
42
42
|
destroy(): void;
|
|
43
43
|
}
|
|
@@ -2,14 +2,14 @@ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
type Config = {
|
|
4
4
|
allowColumnResizing: boolean;
|
|
5
|
-
tableResizingEnabled: boolean;
|
|
6
5
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
6
|
+
isChromelessEditor?: boolean;
|
|
7
|
+
isCommentEditor?: boolean;
|
|
8
|
+
isNested?: boolean;
|
|
7
9
|
isNestingSupported?: boolean;
|
|
8
10
|
isTableScalingEnabled?: boolean;
|
|
9
11
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
10
|
-
|
|
11
|
-
isChromelessEditor?: boolean;
|
|
12
|
-
isNested?: boolean;
|
|
12
|
+
tableResizingEnabled: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const tableNodeSpecWithFixedToDOM: (config: Config) => NodeSpec & {
|
|
15
15
|
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
@@ -6,28 +6,28 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { PluginInjectionAPI } from '../types';
|
|
8
8
|
export type TableOptions = {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
isChromelessEditor?: boolean;
|
|
10
|
+
isCommentEditor?: boolean;
|
|
11
11
|
isDragAndDropEnabled?: boolean;
|
|
12
|
+
isFullWidthModeEnabled?: boolean;
|
|
12
13
|
isTableScalingEnabled?: boolean;
|
|
13
|
-
isCommentEditor?: boolean;
|
|
14
|
-
isChromelessEditor?: boolean;
|
|
15
14
|
shouldUseIncreasedScalingPercent?: boolean;
|
|
15
|
+
wasFullWidthModeEnabled?: boolean;
|
|
16
16
|
};
|
|
17
17
|
export interface Props {
|
|
18
|
-
node: PmNode;
|
|
19
|
-
view: EditorView;
|
|
20
18
|
allowColumnResizing?: boolean;
|
|
21
|
-
allowTableResizing?: boolean;
|
|
22
|
-
allowTableAlignment?: boolean;
|
|
23
19
|
allowControls?: boolean;
|
|
20
|
+
allowTableAlignment?: boolean;
|
|
21
|
+
allowTableResizing?: boolean;
|
|
24
22
|
cellMinWidth?: number;
|
|
25
|
-
|
|
23
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
26
24
|
eventDispatcher: EventDispatcher;
|
|
27
|
-
getPos: () => number | undefined;
|
|
28
|
-
options?: TableOptions;
|
|
29
25
|
getEditorContainerWidth: GetEditorContainerWidth;
|
|
30
26
|
getEditorFeatureFlags: GetEditorFeatureFlags;
|
|
31
|
-
|
|
27
|
+
getPos: () => number | undefined;
|
|
28
|
+
node: PmNode;
|
|
29
|
+
options?: TableOptions;
|
|
32
30
|
pluginInjectionApi?: PluginInjectionAPI;
|
|
31
|
+
portalProviderAPI: PortalProviderAPI;
|
|
32
|
+
view: EditorView;
|
|
33
33
|
}
|
|
@@ -7,12 +7,12 @@ export declare enum AnalyticPluginTypes {
|
|
|
7
7
|
UpdateRowOrColumnMovedAndOverflowTrigger = 4
|
|
8
8
|
}
|
|
9
9
|
type UpdateRowOrColumnMovedAction = {
|
|
10
|
-
type: AnalyticPluginTypes.UpdateRowOrColumnMovedAction;
|
|
11
10
|
data: RowOrColumnMovedState;
|
|
11
|
+
type: AnalyticPluginTypes.UpdateRowOrColumnMovedAction;
|
|
12
12
|
};
|
|
13
13
|
type RemoveRowOrColumnMovedAction = {
|
|
14
|
-
type: AnalyticPluginTypes.RemoveRowOrColumnMovedAction;
|
|
15
14
|
data: undefined;
|
|
15
|
+
type: AnalyticPluginTypes.RemoveRowOrColumnMovedAction;
|
|
16
16
|
};
|
|
17
17
|
export type AnalyticPluginAction = UpdateRowOrColumnMovedAction | RemoveRowOrColumnMovedAction;
|
|
18
18
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type ActionType = 'none' | 'addRowOrColumn' | 'copyOrCut' | 'pasted';
|
|
2
2
|
export type RowOrColumnMovedState = {
|
|
3
|
-
|
|
3
|
+
currentActions: Array<ActionType>;
|
|
4
4
|
/** used to confirm if same number of cells was copied and pasted */
|
|
5
5
|
numberOfCells?: number;
|
|
6
|
-
|
|
6
|
+
type?: 'row' | 'column';
|
|
7
7
|
};
|
|
8
8
|
export type AnalyticPluginState = {
|
|
9
9
|
rowOrColumnMoved: RowOrColumnMovedState;
|
|
@@ -11,21 +11,21 @@ export declare const initiateKeyboardColumnResizing: ({ ariaNotify, getIntl, nod
|
|
|
11
11
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
12
12
|
}) => Command;
|
|
13
13
|
export declare const activateNextResizeArea: ({ direction, ariaNotify, getIntl, nodeViewPortalProviderAPI, }: {
|
|
14
|
-
direction: Direction;
|
|
15
14
|
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
15
|
+
direction: Direction;
|
|
16
16
|
getIntl?: () => IntlShape;
|
|
17
17
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
18
18
|
}) => Command;
|
|
19
19
|
export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor, ariaNotify, api, getIntl, }: {
|
|
20
|
-
stepSize: number;
|
|
21
|
-
getEditorContainerWidth: GetEditorContainerWidth;
|
|
22
|
-
isTableScalingEnabled: boolean;
|
|
23
|
-
isTableFixedColumnWidthsOptionEnabled: boolean;
|
|
24
|
-
isCommentEditor: boolean;
|
|
25
20
|
api: PluginInjectionAPI | undefined | null;
|
|
26
21
|
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
22
|
+
getEditorContainerWidth: GetEditorContainerWidth;
|
|
27
23
|
getIntl?: () => IntlShape;
|
|
24
|
+
isCommentEditor: boolean;
|
|
25
|
+
isTableFixedColumnWidthsOptionEnabled: boolean;
|
|
26
|
+
isTableScalingEnabled: boolean;
|
|
28
27
|
originalTr?: Transaction;
|
|
28
|
+
stepSize: number;
|
|
29
29
|
}) => Command;
|
|
30
30
|
export declare const stopKeyboardColumnResizing: ({ ariaNotify, getIntl, originalTr, }: {
|
|
31
31
|
ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
|
|
@@ -5,16 +5,16 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { PluginInjectionAPI } from '../../types';
|
|
7
7
|
type InsertTableWithNestingSupportCommand = (options: {
|
|
8
|
-
isTableScalingEnabled?: boolean;
|
|
9
|
-
isTableAlignmentEnabled?: boolean;
|
|
10
|
-
isFullWidthModeEnabled?: boolean;
|
|
11
|
-
isCommentEditor?: boolean;
|
|
12
|
-
isChromelessEditor?: boolean;
|
|
13
|
-
isTableResizingEnabled?: boolean;
|
|
14
8
|
createTableProps?: {
|
|
15
|
-
rowsCount?: number;
|
|
16
9
|
colsCount?: number;
|
|
10
|
+
rowsCount?: number;
|
|
17
11
|
};
|
|
12
|
+
isChromelessEditor?: boolean;
|
|
13
|
+
isCommentEditor?: boolean;
|
|
14
|
+
isFullWidthModeEnabled?: boolean;
|
|
15
|
+
isTableAlignmentEnabled?: boolean;
|
|
16
|
+
isTableResizingEnabled?: boolean;
|
|
17
|
+
isTableScalingEnabled?: boolean;
|
|
18
18
|
}, api: PluginInjectionAPI | undefined | null, analyticsPayload?: AnalyticsEventPayload) => EditorCommand;
|
|
19
19
|
export declare function addColumnAt(api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction;
|
|
20
20
|
export declare const addColumnBefore: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => Command;
|