@atlaskit/editor-common 130.2.0 → 130.2.1

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,14 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 130.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a43e85621e87c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a43e85621e87c) -
8
+ Lower sticky table headers, masks, and dependent controls below the agent control under the
9
+ platform_editor_sticky_headers_zindex experiment.
10
+ - Updated dependencies
11
+
3
12
  ## 130.2.0
4
13
 
5
14
  ### Minor Changes
@@ -15,6 +15,7 @@ var _react = _interopRequireDefault(require("react"));
15
15
  var _classnames = _interopRequireDefault(require("classnames"));
16
16
  var _reResizable = require("re-resizable");
17
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
18
19
  var _analytics = require("../../analytics");
19
20
  var _styles = require("../../styles");
20
21
  var _utils = require("../../utils");
@@ -164,11 +165,14 @@ var Resizer = exports.default = /*#__PURE__*/function (_React$Component) {
164
165
  handleComponentFunc = _this$props4.handleComponentFunc,
165
166
  handleStyles = _this$props4.handleStyles;
166
167
  var isResizing = this.state.isResizing;
168
+
169
+ // Tables supply the lower value; media outside tables retains its existing layer.
170
+ var resizeHandleZIndex = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_sticky_headers_zindex') ? "var(--ak-editor-table-resize-handle-z-index, ".concat(_editorSharedStyles.akRichMediaResizeZIndex, ")") : _editorSharedStyles.akRichMediaResizeZIndex;
167
171
  _handleSides.handleSides.forEach(function (side) {
168
172
  handles[side] = "richMedia-resize-handle-".concat(side);
169
173
  baseHandleStyles[side] = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
170
174
  width: '24px'
171
- }, side, "".concat(-13 - innerPadding, "px")), "zIndex", _editorSharedStyles.akRichMediaResizeZIndex), "pointerEvents", 'auto');
175
+ }, side, "".concat(-13 - innerPadding, "px")), "zIndex", resizeHandleZIndex), "pointerEvents", 'auto');
172
176
  var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
173
177
  if (sideHandleComponent) {
174
178
  handleComponent[side] = sideHandleComponent;
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import classnames from 'classnames';
4
4
  import { Resizable } from 're-resizable';
5
5
  import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
6
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
7
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
7
8
  import { richMediaClassName } from '../../styles';
8
9
  import { gridTypeForLayout } from '../../utils';
@@ -146,12 +147,15 @@ export default class Resizer extends React.Component {
146
147
  const {
147
148
  isResizing
148
149
  } = this.state;
150
+
151
+ // Tables supply the lower value; media outside tables retains its existing layer.
152
+ const resizeHandleZIndex = isExperimentEnabled('platform_editor_sticky_headers_zindex') ? `var(--ak-editor-table-resize-handle-z-index, ${akRichMediaResizeZIndex})` : akRichMediaResizeZIndex;
149
153
  handleSides.forEach(side => {
150
154
  handles[side] = `richMedia-resize-handle-${side}`;
151
155
  baseHandleStyles[side] = {
152
156
  width: '24px',
153
157
  [side]: `${-13 - innerPadding}px`,
154
- zIndex: akRichMediaResizeZIndex,
158
+ zIndex: resizeHandleZIndex,
155
159
  pointerEvents: 'auto'
156
160
  };
157
161
  const sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
@@ -12,6 +12,7 @@ import React from 'react';
12
12
  import classnames from 'classnames';
13
13
  import { Resizable } from 're-resizable';
14
14
  import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
15
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
15
16
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
16
17
  import { richMediaClassName } from '../../styles';
17
18
  import { gridTypeForLayout } from '../../utils';
@@ -157,11 +158,14 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
157
158
  handleComponentFunc = _this$props4.handleComponentFunc,
158
159
  handleStyles = _this$props4.handleStyles;
159
160
  var isResizing = this.state.isResizing;
161
+
162
+ // Tables supply the lower value; media outside tables retains its existing layer.
163
+ var resizeHandleZIndex = isExperimentEnabled('platform_editor_sticky_headers_zindex') ? "var(--ak-editor-table-resize-handle-z-index, ".concat(akRichMediaResizeZIndex, ")") : akRichMediaResizeZIndex;
160
164
  handleSides.forEach(function (side) {
161
165
  handles[side] = "richMedia-resize-handle-".concat(side);
162
166
  baseHandleStyles[side] = _defineProperty(_defineProperty(_defineProperty({
163
167
  width: '24px'
164
- }, side, "".concat(-13 - innerPadding, "px")), "zIndex", akRichMediaResizeZIndex), "pointerEvents", 'auto');
168
+ }, side, "".concat(-13 - innerPadding, "px")), "zIndex", resizeHandleZIndex), "pointerEvents", 'auto');
165
169
  var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
166
170
  if (sideHandleComponent) {
167
171
  handleComponent[side] = sideHandleComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "130.2.0",
3
+ "version": "130.2.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"