@atlaskit/editor-plugin-table 2.6.12 → 2.6.13
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 +6 -0
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +10 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +10 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +10 -1
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
- package/src/plugins/table/ui/FloatingInsertButton/index.tsx +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 2.6.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8fe864e4f7a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8fe864e4f7a) - [ux] ED-19336: Fixed insert column button not visible when sticky header is enabled."
|
|
8
|
+
|
|
3
9
|
## 2.6.12
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -19,6 +19,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
19
19
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
20
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
21
21
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
22
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
23
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
23
24
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
24
25
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
@@ -114,6 +115,12 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
114
115
|
var tableWrapper = (0, _utils.closestElement)(targetCellRef, ".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER));
|
|
115
116
|
var index = type === 'column' ? insertColumnButtonIndex : insertRowButtonIndex;
|
|
116
117
|
var hasNumberedColumns = (0, _utils4.checkIfNumberColumnEnabled)(editorView.state.selection);
|
|
118
|
+
|
|
119
|
+
// ED-19336: Fixed the 'add column button' not visible issue when sticky header is enabled
|
|
120
|
+
// By setting the Popup z-index higher than the sticky header z-index ( common-styles.ts tr.sticky)
|
|
121
|
+
// Only when inserting a column, otherwise set to undefined
|
|
122
|
+
// Need to set z-index in the Popup, set z-index in the <InsertButton /> will not work
|
|
123
|
+
var zIndex = type === 'column' ? _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex : undefined;
|
|
117
124
|
return /*#__PURE__*/_react.default.createElement(_ui.Popup, (0, _extends2.default)({
|
|
118
125
|
target: targetCellRef,
|
|
119
126
|
mountTo: tableContainerWrapper || mountPoint,
|
|
@@ -121,7 +128,9 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
121
128
|
scrollableElement: tableWrapper,
|
|
122
129
|
forcePlacement: true,
|
|
123
130
|
allowOutOfBounds: true
|
|
124
|
-
}, (0, _getPopupOptions.default)(type, index, hasNumberedColumns, tableContainerWrapper)
|
|
131
|
+
}, (0, _getPopupOptions.default)(type, index, hasNumberedColumns, tableContainerWrapper), {
|
|
132
|
+
zIndex: zIndex
|
|
133
|
+
}), /*#__PURE__*/_react.default.createElement(_InsertButton.default, {
|
|
125
134
|
type: type,
|
|
126
135
|
tableRef: tableRef,
|
|
127
136
|
onMouseDown: type === 'column' ? this.insertColumn : this.insertRow,
|
package/dist/cjs/version.json
CHANGED
|
@@ -6,6 +6,7 @@ import { ACTION, ACTION_SUBJECT, CONTENT_COMPONENT, EVENT_TYPE, INPUT_METHOD } f
|
|
|
6
6
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
+
import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
10
11
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
11
12
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -97,6 +98,12 @@ export class FloatingInsertButton extends React.Component {
|
|
|
97
98
|
const tableWrapper = closestElement(targetCellRef, `.${ClassName.TABLE_NODE_WRAPPER}`);
|
|
98
99
|
const index = type === 'column' ? insertColumnButtonIndex : insertRowButtonIndex;
|
|
99
100
|
const hasNumberedColumns = checkIfNumberColumnEnabled(editorView.state.selection);
|
|
101
|
+
|
|
102
|
+
// ED-19336: Fixed the 'add column button' not visible issue when sticky header is enabled
|
|
103
|
+
// By setting the Popup z-index higher than the sticky header z-index ( common-styles.ts tr.sticky)
|
|
104
|
+
// Only when inserting a column, otherwise set to undefined
|
|
105
|
+
// Need to set z-index in the Popup, set z-index in the <InsertButton /> will not work
|
|
106
|
+
const zIndex = type === 'column' ? akEditorTableCellOnStickyHeaderZIndex : undefined;
|
|
100
107
|
return /*#__PURE__*/React.createElement(Popup, _extends({
|
|
101
108
|
target: targetCellRef,
|
|
102
109
|
mountTo: tableContainerWrapper || mountPoint,
|
|
@@ -104,7 +111,9 @@ export class FloatingInsertButton extends React.Component {
|
|
|
104
111
|
scrollableElement: tableWrapper,
|
|
105
112
|
forcePlacement: true,
|
|
106
113
|
allowOutOfBounds: true
|
|
107
|
-
}, getPopupOptions(type, index, hasNumberedColumns, tableContainerWrapper)
|
|
114
|
+
}, getPopupOptions(type, index, hasNumberedColumns, tableContainerWrapper), {
|
|
115
|
+
zIndex: zIndex
|
|
116
|
+
}), /*#__PURE__*/React.createElement(InsertButton, {
|
|
108
117
|
type: type,
|
|
109
118
|
tableRef: tableRef,
|
|
110
119
|
onMouseDown: type === 'column' ? this.insertColumn : this.insertRow,
|
package/dist/es2019/version.json
CHANGED
|
@@ -14,6 +14,7 @@ import { ACTION, ACTION_SUBJECT, CONTENT_COMPONENT, EVENT_TYPE, INPUT_METHOD } f
|
|
|
14
14
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
15
15
|
import { closestElement } from '@atlaskit/editor-common/utils';
|
|
16
16
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
17
|
+
import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
17
18
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
18
19
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
19
20
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -107,6 +108,12 @@ export var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
107
108
|
var tableWrapper = closestElement(targetCellRef, ".".concat(ClassName.TABLE_NODE_WRAPPER));
|
|
108
109
|
var index = type === 'column' ? insertColumnButtonIndex : insertRowButtonIndex;
|
|
109
110
|
var hasNumberedColumns = checkIfNumberColumnEnabled(editorView.state.selection);
|
|
111
|
+
|
|
112
|
+
// ED-19336: Fixed the 'add column button' not visible issue when sticky header is enabled
|
|
113
|
+
// By setting the Popup z-index higher than the sticky header z-index ( common-styles.ts tr.sticky)
|
|
114
|
+
// Only when inserting a column, otherwise set to undefined
|
|
115
|
+
// Need to set z-index in the Popup, set z-index in the <InsertButton /> will not work
|
|
116
|
+
var zIndex = type === 'column' ? akEditorTableCellOnStickyHeaderZIndex : undefined;
|
|
110
117
|
return /*#__PURE__*/React.createElement(Popup, _extends({
|
|
111
118
|
target: targetCellRef,
|
|
112
119
|
mountTo: tableContainerWrapper || mountPoint,
|
|
@@ -114,7 +121,9 @@ export var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
114
121
|
scrollableElement: tableWrapper,
|
|
115
122
|
forcePlacement: true,
|
|
116
123
|
allowOutOfBounds: true
|
|
117
|
-
}, getPopupOptions(type, index, hasNumberedColumns, tableContainerWrapper)
|
|
124
|
+
}, getPopupOptions(type, index, hasNumberedColumns, tableContainerWrapper), {
|
|
125
|
+
zIndex: zIndex
|
|
126
|
+
}), /*#__PURE__*/React.createElement(InsertButton, {
|
|
118
127
|
type: type,
|
|
119
128
|
tableRef: tableRef,
|
|
120
129
|
onMouseDown: type === 'column' ? this.insertColumn : this.insertRow,
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ import { closestElement } from '@atlaskit/editor-common/utils';
|
|
|
18
18
|
import { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
19
19
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
20
20
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
21
|
+
import { akEditorTableCellOnStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
21
22
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
22
23
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
23
24
|
import { findTable } from '@atlaskit/editor-tables/utils';
|
|
@@ -176,6 +177,13 @@ export class FloatingInsertButton extends React.Component<
|
|
|
176
177
|
editorView.state.selection,
|
|
177
178
|
);
|
|
178
179
|
|
|
180
|
+
// ED-19336: Fixed the 'add column button' not visible issue when sticky header is enabled
|
|
181
|
+
// By setting the Popup z-index higher than the sticky header z-index ( common-styles.ts tr.sticky)
|
|
182
|
+
// Only when inserting a column, otherwise set to undefined
|
|
183
|
+
// Need to set z-index in the Popup, set z-index in the <InsertButton /> will not work
|
|
184
|
+
const zIndex: number | undefined =
|
|
185
|
+
type === 'column' ? akEditorTableCellOnStickyHeaderZIndex : undefined;
|
|
186
|
+
|
|
179
187
|
return (
|
|
180
188
|
<Popup
|
|
181
189
|
target={targetCellRef}
|
|
@@ -190,6 +198,7 @@ export class FloatingInsertButton extends React.Component<
|
|
|
190
198
|
hasNumberedColumns,
|
|
191
199
|
tableContainerWrapper,
|
|
192
200
|
)}
|
|
201
|
+
zIndex={zIndex}
|
|
193
202
|
>
|
|
194
203
|
<InsertButton
|
|
195
204
|
type={type}
|