@atlaskit/editor-plugin-table 15.4.17 → 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,13 @@
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
+
3
11
  ## 15.4.17
4
12
 
5
13
  ### 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
  });
@@ -108,11 +104,15 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
108
104
  var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
109
105
  var parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(_types.TableCssClassName.NATIVE_STICKY);
110
106
  if ((0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _anchor.isAnchorSupported)() && targetCellRef.nodeName === 'TH' && parentStickyNative) {
111
- var _targetCellRef$datase;
107
+ var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
112
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 : '';
113
110
  return (0, _react2.jsx)("div", {
114
111
  css: anchorStyles,
115
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))"),
116
116
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
117
117
  positionAnchor: anchorName
118
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
  });
@@ -106,11 +102,15 @@ const FloatingContextualButtonInner = /*#__PURE__*/React.memo(props => {
106
102
  const parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
107
103
  const parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(ClassName.NATIVE_STICKY);
108
104
  if (expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && isAnchorSupported() && targetCellRef.nodeName === 'TH' && parentStickyNative) {
109
- var _targetCellRef$datase;
105
+ var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
110
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 : '';
111
108
  return jsx("div", {
112
109
  css: anchorStyles,
113
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))`,
114
114
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
115
115
  positionAnchor: anchorName
116
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
  });
@@ -98,11 +94,15 @@ var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
98
94
  var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
99
95
  var parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(ClassName.NATIVE_STICKY);
100
96
  if (expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && isAnchorSupported() && targetCellRef.nodeName === 'TH' && parentStickyNative) {
101
- var _targetCellRef$datase;
97
+ var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
102
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 : '';
103
100
  return jsx("div", {
104
101
  css: anchorStyles,
105
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))"),
106
106
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
107
107
  positionAnchor: anchorName
108
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.17",
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.39.0",
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"