@atlaskit/editor-plugin-table 15.4.16 → 15.4.18
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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 15.4.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a2fa645318b72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a2fa645318b72) -
|
|
8
|
+
EDITOR-3822 Update anchor styles to fix cell option manu alignment in safari
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 15.4.17
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`193738561b24f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/193738561b24f) -
|
|
16
|
+
[ux] Fix bug where contextual table cell button not rendered when overflowing
|
|
17
|
+
|
|
3
18
|
## 15.4.16
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -39,10 +39,6 @@ var BUTTON_OFFSET = 3;
|
|
|
39
39
|
var CONTEXTUAL_MENU_BUTTON_Z_INDEX = 2;
|
|
40
40
|
var anchorStyles = (0, _react2.css)({
|
|
41
41
|
position: 'absolute',
|
|
42
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
43
|
-
top: "calc(anchor(top) + ".concat(BUTTON_OFFSET, "px)"),
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
45
|
-
right: "calc(anchor(right) + ".concat(BUTTON_OFFSET, "px)"),
|
|
46
42
|
positionVisibility: 'anchors-visible',
|
|
47
43
|
zIndex: CONTEXTUAL_MENU_BUTTON_Z_INDEX
|
|
48
44
|
});
|
|
@@ -106,12 +102,17 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
|
|
|
106
102
|
"aria-expanded": isContextualMenuOpen
|
|
107
103
|
}));
|
|
108
104
|
var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
var parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(_types.TableCssClassName.NATIVE_STICKY);
|
|
106
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _anchor.isAnchorSupported)() && targetCellRef.nodeName === 'TH' && parentStickyNative) {
|
|
107
|
+
var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
|
|
111
108
|
var anchorName = (_targetCellRef$datase = targetCellRef.dataset.nodeAnchor) !== null && _targetCellRef$datase !== void 0 ? _targetCellRef$datase : '';
|
|
109
|
+
var rowAnchorName = (_targetCellRef$parent = (_targetCellRef$parent2 = targetCellRef.parentElement) === null || _targetCellRef$parent2 === void 0 ? void 0 : _targetCellRef$parent2.dataset.nodeAnchor) !== null && _targetCellRef$parent !== void 0 ? _targetCellRef$parent : '';
|
|
112
110
|
return (0, _react2.jsx)("div", {
|
|
113
111
|
css: anchorStyles,
|
|
114
112
|
style: {
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
114
|
+
top: "calc(".concat(BUTTON_OFFSET, "px + anchor(").concat(rowAnchorName, " top))"),
|
|
115
|
+
right: "calc(".concat(BUTTON_OFFSET, "px + anchor(").concat(anchorName, " right))"),
|
|
115
116
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
116
117
|
positionAnchor: anchorName
|
|
117
118
|
} // need to do this because CSSProperties doesn't have positionAnchor property even though it's a valid CSS property
|
|
@@ -29,10 +29,6 @@ const BUTTON_OFFSET = 3;
|
|
|
29
29
|
const CONTEXTUAL_MENU_BUTTON_Z_INDEX = 2;
|
|
30
30
|
const anchorStyles = css({
|
|
31
31
|
position: 'absolute',
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
33
|
-
top: `calc(anchor(top) + ${BUTTON_OFFSET}px)`,
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
35
|
-
right: `calc(anchor(right) + ${BUTTON_OFFSET}px)`,
|
|
36
32
|
positionVisibility: 'anchors-visible',
|
|
37
33
|
zIndex: CONTEXTUAL_MENU_BUTTON_Z_INDEX
|
|
38
34
|
});
|
|
@@ -104,12 +100,17 @@ const FloatingContextualButtonInner = /*#__PURE__*/React.memo(props => {
|
|
|
104
100
|
"aria-expanded": isContextualMenuOpen
|
|
105
101
|
}));
|
|
106
102
|
const parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
const parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(ClassName.NATIVE_STICKY);
|
|
104
|
+
if (expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && isAnchorSupported() && targetCellRef.nodeName === 'TH' && parentStickyNative) {
|
|
105
|
+
var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
|
|
109
106
|
const anchorName = (_targetCellRef$datase = targetCellRef.dataset.nodeAnchor) !== null && _targetCellRef$datase !== void 0 ? _targetCellRef$datase : '';
|
|
107
|
+
const rowAnchorName = (_targetCellRef$parent = (_targetCellRef$parent2 = targetCellRef.parentElement) === null || _targetCellRef$parent2 === void 0 ? void 0 : _targetCellRef$parent2.dataset.nodeAnchor) !== null && _targetCellRef$parent !== void 0 ? _targetCellRef$parent : '';
|
|
110
108
|
return jsx("div", {
|
|
111
109
|
css: anchorStyles,
|
|
112
110
|
style: {
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
112
|
+
top: `calc(${BUTTON_OFFSET}px + anchor(${rowAnchorName} top))`,
|
|
113
|
+
right: `calc(${BUTTON_OFFSET}px + anchor(${anchorName} right))`,
|
|
113
114
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
114
115
|
positionAnchor: anchorName
|
|
115
116
|
} // need to do this because CSSProperties doesn't have positionAnchor property even though it's a valid CSS property
|
|
@@ -29,10 +29,6 @@ var BUTTON_OFFSET = 3;
|
|
|
29
29
|
var CONTEXTUAL_MENU_BUTTON_Z_INDEX = 2;
|
|
30
30
|
var anchorStyles = css({
|
|
31
31
|
position: 'absolute',
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
33
|
-
top: "calc(anchor(top) + ".concat(BUTTON_OFFSET, "px)"),
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
35
|
-
right: "calc(anchor(right) + ".concat(BUTTON_OFFSET, "px)"),
|
|
36
32
|
positionVisibility: 'anchors-visible',
|
|
37
33
|
zIndex: CONTEXTUAL_MENU_BUTTON_Z_INDEX
|
|
38
34
|
});
|
|
@@ -96,12 +92,17 @@ var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
|
|
|
96
92
|
"aria-expanded": isContextualMenuOpen
|
|
97
93
|
}));
|
|
98
94
|
var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
var parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(ClassName.NATIVE_STICKY);
|
|
96
|
+
if (expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && isAnchorSupported() && targetCellRef.nodeName === 'TH' && parentStickyNative) {
|
|
97
|
+
var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
|
|
101
98
|
var anchorName = (_targetCellRef$datase = targetCellRef.dataset.nodeAnchor) !== null && _targetCellRef$datase !== void 0 ? _targetCellRef$datase : '';
|
|
99
|
+
var rowAnchorName = (_targetCellRef$parent = (_targetCellRef$parent2 = targetCellRef.parentElement) === null || _targetCellRef$parent2 === void 0 ? void 0 : _targetCellRef$parent2.dataset.nodeAnchor) !== null && _targetCellRef$parent !== void 0 ? _targetCellRef$parent : '';
|
|
102
100
|
return jsx("div", {
|
|
103
101
|
css: anchorStyles,
|
|
104
102
|
style: {
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
104
|
+
top: "calc(".concat(BUTTON_OFFSET, "px + anchor(").concat(rowAnchorName, " top))"),
|
|
105
|
+
right: "calc(".concat(BUTTON_OFFSET, "px + anchor(").concat(anchorName, " right))"),
|
|
105
106
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
106
107
|
positionAnchor: anchorName
|
|
107
108
|
} // need to do this because CSSProperties doesn't have positionAnchor property even though it's a valid CSS property
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "15.4.
|
|
3
|
+
"version": "15.4.18",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"uuid": "^3.1.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^110.
|
|
74
|
+
"@atlaskit/editor-common": "^110.40.0",
|
|
75
75
|
"react": "^18.2.0",
|
|
76
76
|
"react-dom": "^18.2.0",
|
|
77
77
|
"react-intl-next": "npm:react-intl@^5.18.1"
|