@atlaskit/renderer 108.7.2 → 108.7.4

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/react/nodes/{media.js → media/index.js} +6 -12
  3. package/dist/cjs/react/nodes/media/styles.js +19 -0
  4. package/dist/cjs/react/nodes/table/colgroup.js +5 -4
  5. package/dist/cjs/react/nodes/table/sticky.js +19 -15
  6. package/dist/cjs/react/nodes/table/table.js +4 -2
  7. package/dist/cjs/react/nodes/table.js +13 -5
  8. package/dist/cjs/react/utils/appearance.js +18 -0
  9. package/dist/cjs/ui/Renderer/index.js +1 -1
  10. package/dist/cjs/ui/Renderer/style.js +7 -4
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/react/nodes/{media.js → media/index.js} +7 -13
  13. package/dist/es2019/react/nodes/media/styles.js +21 -0
  14. package/dist/es2019/react/nodes/table/colgroup.js +6 -4
  15. package/dist/es2019/react/nodes/table/sticky.js +46 -40
  16. package/dist/es2019/react/nodes/table/table.js +4 -2
  17. package/dist/es2019/react/nodes/table.js +9 -4
  18. package/dist/es2019/react/utils/appearance.js +3 -0
  19. package/dist/es2019/ui/Renderer/index.js +1 -1
  20. package/dist/es2019/ui/Renderer/style.js +8 -5
  21. package/dist/es2019/version.json +1 -1
  22. package/dist/esm/react/nodes/{media.js → media/index.js} +7 -13
  23. package/dist/esm/react/nodes/media/styles.js +10 -0
  24. package/dist/esm/react/nodes/table/colgroup.js +6 -4
  25. package/dist/esm/react/nodes/table/sticky.js +19 -15
  26. package/dist/esm/react/nodes/table/table.js +4 -2
  27. package/dist/esm/react/nodes/table.js +11 -4
  28. package/dist/esm/react/utils/appearance.js +9 -0
  29. package/dist/esm/ui/Renderer/index.js +1 -1
  30. package/dist/esm/ui/Renderer/style.js +7 -4
  31. package/dist/esm/version.json +1 -1
  32. package/dist/{types-ts4.5/react/nodes/media.d.ts → types/react/nodes/media/index.d.ts} +2 -2
  33. package/dist/types/react/nodes/media/styles.d.ts +2 -0
  34. package/dist/types/react/nodes/table/sticky.d.ts +4 -1
  35. package/dist/types/react/nodes/table/table.d.ts +1 -1
  36. package/dist/types/react/nodes/table/types.d.ts +2 -0
  37. package/dist/types/react/nodes/table.d.ts +1 -0
  38. package/dist/types/react/utils/appearance.d.ts +4 -0
  39. package/dist/{types/react/nodes/media.d.ts → types-ts4.5/react/nodes/media/index.d.ts} +2 -2
  40. package/dist/types-ts4.5/react/nodes/media/styles.d.ts +2 -0
  41. package/dist/types-ts4.5/react/nodes/table/sticky.d.ts +4 -1
  42. package/dist/types-ts4.5/react/nodes/table/table.d.ts +1 -1
  43. package/dist/types-ts4.5/react/nodes/table/types.d.ts +2 -0
  44. package/dist/types-ts4.5/react/nodes/table.d.ts +1 -0
  45. package/dist/types-ts4.5/react/utils/appearance.d.ts +4 -0
  46. package/package.json +4 -4
  47. package/tmp/api-report-tmp.d.ts +546 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5057217ab16`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5057217ab16) - [ux] Fix border cutoff on renderer for linked images
8
+
9
+ ## 108.7.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`e7ed90bad7c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e7ed90bad7c) - Use renderer appearance to use custom width
14
+
3
15
  ## 108.7.2
4
16
 
5
17
  ### Patch Changes
@@ -20,11 +20,12 @@ var _analyticsNext = require("@atlaskit/analytics-next");
20
20
  var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
21
21
  var _providerFactory = require("@atlaskit/editor-common/provider-factory");
22
22
  var _ui = require("@atlaskit/editor-common/ui");
23
- var _MediaCard = require("../../ui/MediaCard");
23
+ var _MediaCard = require("../../../ui/MediaCard");
24
24
  var _editorPalette = require("@atlaskit/editor-palette");
25
- var _utils = require("../../utils");
25
+ var _utils = require("../../../utils");
26
26
  var _analytics = require("@atlaskit/editor-common/analytics");
27
- var _events = require("../../analytics/events");
27
+ var _events = require("../../../analytics/events");
28
+ var _styles = require("./styles");
28
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
31
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -79,21 +80,14 @@ var Media = /*#__PURE__*/function (_PureComponent) {
79
80
  "data-mark-type": "border",
80
81
  "data-color": borderColor,
81
82
  "data-size": borderWidth,
82
- style: {
83
- width: "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
84
- height: "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
85
- borderColor: paletteColorValue,
86
- borderWidth: "".concat(borderWidth, "px"),
87
- borderStyle: 'solid',
88
- borderRadius: "".concat(borderWidth * 2, "px")
89
- }
83
+ css: (0, _styles.borderStyle)(!!linkHref, paletteColorValue, borderWidth)
90
84
  }, mediaComponent) : mediaComponent;
91
85
  return linkHref ? (0, _react2.jsx)("a", {
92
86
  href: linkHref,
93
87
  rel: "noreferrer noopener",
94
88
  onClick: _this.handleMediaLinkClick,
95
89
  "data-block-link": linkHref,
96
- css: _ui.mediaLinkStyle
90
+ css: (0, _styles.linkStyle)(!!borderMark)
97
91
  }, mediaComponentWithBorder) : mediaComponentWithBorder;
98
92
  });
99
93
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMediaLinkClick", function (event) {
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.linkStyle = exports.borderStyle = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _ui = require("@atlaskit/editor-common/ui");
11
+ var _templateObject, _templateObject2;
12
+ var linkStyle = function linkStyle(hasBorderMark) {
13
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n background: transparent;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n cursor: pointer;\n width: ", ";\n height: ", ";\n"])), hasBorderMark ? "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)") : '100%', hasBorderMark ? "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)") : '100%');
14
+ };
15
+ exports.linkStyle = linkStyle;
16
+ var borderStyle = function borderStyle(hasLinkMark, color, width) {
17
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: ", ";\n height: ", ";\n border-color: ", ";\n border-width: ", "px;\n border-style: solid;\n border-radius: ", "px;\n"])), hasLinkMark ? '100%' : "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"), hasLinkMark ? '100%' : "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"), color, width, width * 2);
18
+ };
19
+ exports.borderStyle = borderStyle;
@@ -8,8 +8,8 @@ exports.calcScalePercent = exports.Colgroup = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styles = require("@atlaskit/editor-common/styles");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _nodeWidth = require("@atlaskit/editor-common/node-width");
12
+ var _table = require("../table");
13
13
  // we allow scaling down column widths by no more than 30%
14
14
  // this intends to reduce unwanted scrolling in the Renderer in these scenarios:
15
15
  // User A creates a table with column widths → User B views it on a smaller screen
@@ -58,12 +58,13 @@ var Colgroup = function Colgroup(props) {
58
58
  layout = props.layout,
59
59
  isNumberColumnEnabled = props.isNumberColumnEnabled,
60
60
  renderWidth = props.renderWidth,
61
- tableNode = props.tableNode;
61
+ tableNode = props.tableNode,
62
+ rendererAppearance = props.rendererAppearance;
62
63
  if (!columnWidths) {
63
64
  return null;
64
65
  }
65
66
  var tableResized = isTableResized(columnWidths);
66
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && !tableResized) {
67
+ if ((0, _table.isTableResizingEnabled)(rendererAppearance) && !tableResized) {
67
68
  return /*#__PURE__*/_react.default.createElement("colgroup", null, isNumberColumnEnabled && /*#__PURE__*/_react.default.createElement("col", {
68
69
  style: {
69
70
  width: _editorSharedStyles.akEditorTableNumberColumnWidth
@@ -80,7 +81,7 @@ var Colgroup = function Colgroup(props) {
80
81
  return null;
81
82
  }
82
83
  var tableContainerWidth;
83
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && tableNode) {
84
+ if ((0, _table.isTableResizingEnabled)(rendererAppearance) && tableNode) {
84
85
  tableContainerWidth = (0, _nodeWidth.getTableContainerWidth)(tableNode);
85
86
  } else {
86
87
  tableContainerWidth = getTableLayoutWidth(layout);
@@ -14,9 +14,9 @@ var _react2 = require("@emotion/react");
14
14
  var _styles = require("@atlaskit/editor-common/styles");
15
15
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
16
  var _colors = require("@atlaskit/theme/colors");
17
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
17
  var _table = require("./table");
19
18
  var _injectProps = require("../../utils/inject-props");
19
+ var _table2 = require("../table");
20
20
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
21
21
  /** @jsx jsx */
22
22
  var tableStickyPadding = 8;
@@ -26,22 +26,23 @@ var modeSpecficStyles = {
26
26
  stick: (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n "]))),
27
27
  'pin-bottom': (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n "])))
28
28
  };
29
- var stickyHeaderZIndex;
30
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width')) {
31
- stickyHeaderZIndex = 13;
32
- } else {
33
- stickyHeaderZIndex = _editorSharedStyles.akEditorStickyHeaderZIndex;
34
- }
35
29
 
36
30
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
37
- var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
38
- return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".is-sticky.right-shadow::after,\n &\n .", ".is-sticky.left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, stickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
31
+ var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, rendererAppearance) {
32
+ var stickyHeaderZIndex;
33
+ if ((0, _table2.isTableResizingEnabled)(rendererAppearance)) {
34
+ stickyHeaderZIndex = 13;
35
+ } else {
36
+ stickyHeaderZIndex = _editorSharedStyles.akEditorStickyHeaderZIndex;
37
+ }
38
+ return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".is-sticky.right-shadow::after,\n &\n .", ".is-sticky.left-shadow::before {\n top: 0px;\n height: 100%;\n }\n "])), typeof top === 'number' && "top: ".concat(top, "px;"), width, stickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
39
39
  };
40
40
  var FixedTableDiv = function FixedTableDiv(props) {
41
41
  var top = props.top,
42
42
  wrapperWidth = props.wrapperWidth,
43
- mode = props.mode;
44
- var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
43
+ mode = props.mode,
44
+ rendererAppearance = props.rendererAppearance;
45
+ var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth, rendererAppearance), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
45
46
  var attrs = {
46
47
  mode: mode
47
48
  };
@@ -65,10 +66,11 @@ var StickyTable = function StickyTable(_ref) {
65
66
  columnWidths = _ref.columnWidths,
66
67
  renderWidth = _ref.renderWidth,
67
68
  rowHeight = _ref.rowHeight,
68
- tableNode = _ref.tableNode;
69
+ tableNode = _ref.tableNode,
70
+ rendererAppearance = _ref.rendererAppearance;
69
71
  var styles;
70
72
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
71
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width')) {
73
+ if ((0, _table2.isTableResizingEnabled)(rendererAppearance)) {
72
74
  styles = (0, _react2.css)({
73
75
  top: mode === 'pin-bottom' ? top : undefined,
74
76
  position: 'relative'
@@ -86,7 +88,8 @@ var StickyTable = function StickyTable(_ref) {
86
88
  }, (0, _react2.jsx)(FixedTableDiv, {
87
89
  top: mode === 'stick' ? top : undefined,
88
90
  mode: rowHeight > 300 ? 'none' : mode,
89
- wrapperWidth: wrapperWidth
91
+ wrapperWidth: wrapperWidth,
92
+ rendererAppearance: rendererAppearance
90
93
  }, (0, _react2.jsx)("div", {
91
94
  className: "".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " is-sticky ").concat(shadowClassNames || ''),
92
95
  "data-layout": layout,
@@ -104,7 +107,8 @@ var StickyTable = function StickyTable(_ref) {
104
107
  layout: layout,
105
108
  isNumberColumnEnabled: isNumberColumnEnabled,
106
109
  renderWidth: renderWidth,
107
- tableNode: tableNode
110
+ tableNode: tableNode,
111
+ rendererAppearance: rendererAppearance
108
112
  },
109
113
  /**
110
114
  * @see https://product-fabric.atlassian.net/browse/ED-10235
@@ -14,7 +14,8 @@ var Table = /*#__PURE__*/_react.default.memo(function (_ref) {
14
14
  layout = _ref.layout,
15
15
  renderWidth = _ref.renderWidth,
16
16
  children = _ref.children,
17
- tableNode = _ref.tableNode;
17
+ tableNode = _ref.tableNode,
18
+ rendererAppearance = _ref.rendererAppearance;
18
19
  return /*#__PURE__*/_react.default.createElement("table", {
19
20
  "data-number-column": isNumberColumnEnabled,
20
21
  ref: innerRef
@@ -23,7 +24,8 @@ var Table = /*#__PURE__*/_react.default.memo(function (_ref) {
23
24
  layout: layout,
24
25
  isNumberColumnEnabled: isNumberColumnEnabled,
25
26
  renderWidth: renderWidth,
26
- tableNode: tableNode
27
+ tableNode: tableNode,
28
+ rendererAppearance: rendererAppearance
27
29
  }), /*#__PURE__*/_react.default.createElement("tbody", null, children));
28
30
  });
29
31
  exports.Table = Table;
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.TableProcessor = exports.TableContainer = void 0;
7
+ exports.isTableResizingEnabled = exports.default = exports.TableProcessor = exports.TableContainer = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -26,8 +26,13 @@ var _tableCell = require("./tableCell");
26
26
  var _SmartCardStorage = require("../../ui/SmartCardStorage");
27
27
  var _sticky = require("./table/sticky");
28
28
  var _table = require("./table/table");
29
+ var _appearance = require("../utils/appearance");
29
30
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
30
31
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
32
+ var isTableResizingEnabled = function isTableResizingEnabled(appearance) {
33
+ return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && (0, _appearance.isFullWidthOrFullPageAppearance)(appearance);
34
+ };
35
+ exports.isTableResizingEnabled = isTableResizingEnabled;
31
36
  var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus) {
32
37
  if (!tableOrderStatus || tableOrderStatus.order === _types.SortOrder.NO_ORDER) {
33
38
  return children;
@@ -261,7 +266,7 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
261
266
  var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(tableNode, rendererAppearance) {
262
267
  return rendererAppearance === 'full-width' && !tableNode.attrs.width ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, renderWidth) : Math.min((0, _nodeWidth.getTableContainerWidth)(tableNode), renderWidth);
263
268
  };
264
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && tableNode) {
269
+ if (isTableResizingEnabled(rendererAppearance) && tableNode) {
265
270
  tableWidth = calcDefaultLayoutWidthByAppearance(tableNode, rendererAppearance);
266
271
  } else {
267
272
  tableWidth = (0, _styles.calcTableWidth)(layout, renderWidth, false);
@@ -284,7 +289,8 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
284
289
  innerRef: this.stickyWrapperRef,
285
290
  wrapperWidth: wrapperWidth,
286
291
  columnWidths: columnWidths,
287
- rowHeight: this.headerRowHeight
292
+ rowHeight: this.headerRowHeight,
293
+ rendererAppearance: rendererAppearance
288
294
  }, [children && children[0]]), /*#__PURE__*/_react.default.createElement("div", {
289
295
  className: "".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " ").concat(this.props.shadowClassNames || ''),
290
296
  "data-layout": layout,
@@ -306,7 +312,8 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
306
312
  wrapperWidth: wrapperWidth,
307
313
  columnWidths: columnWidths,
308
314
  rowHeight: this.headerRowHeight,
309
- tableNode: tableNode
315
+ tableNode: tableNode,
316
+ rendererAppearance: rendererAppearance
310
317
  }, [children && children[0]]), /*#__PURE__*/_react.default.createElement("div", {
311
318
  className: _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER,
312
319
  ref: this.wrapperRef,
@@ -317,7 +324,8 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
317
324
  layout: layout,
318
325
  isNumberColumnEnabled: isNumberColumnEnabled,
319
326
  renderWidth: renderWidth,
320
- tableNode: tableNode
327
+ tableNode: tableNode,
328
+ rendererAppearance: rendererAppearance
321
329
  }, this.grabFirstRowRef(children)))));
322
330
  }
323
331
  }]);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isFullWidthOrFullPageAppearance = exports.isFullWidthAppearance = exports.isFullPageAppearance = void 0;
7
+ var isFullWidthAppearance = function isFullWidthAppearance(appearance) {
8
+ return appearance === 'full-width';
9
+ };
10
+ exports.isFullWidthAppearance = isFullWidthAppearance;
11
+ var isFullPageAppearance = function isFullPageAppearance(appearance) {
12
+ return appearance === 'full-page';
13
+ };
14
+ exports.isFullPageAppearance = isFullPageAppearance;
15
+ var isFullWidthOrFullPageAppearance = function isFullWidthOrFullPageAppearance(appearance) {
16
+ return isFullPageAppearance(appearance) || isFullWidthAppearance(appearance);
17
+ };
18
+ exports.isFullWidthOrFullPageAppearance = isFullWidthOrFullPageAppearance;
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "108.7.2";
58
+ var packageVersion = "108.7.4";
59
59
  var Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -12,7 +12,6 @@ var _components = require("@atlaskit/theme/components");
12
12
  var _constants = require("@atlaskit/theme/constants");
13
13
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
14
14
  var _typography = require("@atlaskit/theme/typography");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _styles = require("@atlaskit/editor-common/styles");
17
16
  var _ui = require("@atlaskit/editor-common/ui");
18
17
  var _utils = require("@atlaskit/editor-common/utils");
@@ -20,6 +19,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
20
19
  var _consts = require("../../consts");
21
20
  var _headingAnchor = require("../../react/nodes/heading-anchor");
22
21
  var _lightWeightCodeBlock = require("../../react/nodes/codeBlock/components/lightWeightCodeBlock");
22
+ var _table = require("../../react/nodes/table");
23
23
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
24
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -50,14 +50,17 @@ var headingSizes = {
50
50
  };
51
51
  exports.headingSizes = headingSizes;
52
52
  var headingAnchorStyle = function headingAnchorStyle(headingTag) {
53
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n .", " {\n position: absolute;\n height: ", "em;\n\n margin-left: 6px;\n\n button {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n /**\n * Applies hover effects to the heading anchor link button\n * to fade in when the user rolls over the heading.\n *\n * The link is persistent on mobile, so we use feature detection\n * to enable hover effects for systems that support it (desktop).\n *\n * @see https://caniuse.com/mdn-css_at-rules_media_hover\n */\n @media (hover: hover) and (pointer: fine) {\n .", " {\n > button {\n opacity: 0;\n transform: translate(-8px, 0px);\n transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;\n }\n }\n\n &:hover {\n .", " > button {\n opacity: 1;\n transform: none !important;\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName);
53
+ return (// TODO Delete this comment after verifying space token -> previous value `margin-left: 6px`
54
+ (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n .", " {\n position: absolute;\n height: ", "em;\n\n margin-left: ", ";\n\n button {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n /**\n * Applies hover effects to the heading anchor link button\n * to fade in when the user rolls over the heading.\n *\n * The link is persistent on mobile, so we use feature detection\n * to enable hover effects for systems that support it (desktop).\n *\n * @see https://caniuse.com/mdn-css_at-rules_media_hover\n */\n @media (hover: hover) and (pointer: fine) {\n .", " {\n > button {\n opacity: 0;\n transform: translate(-8px, 0px);\n transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;\n }\n }\n\n &:hover {\n .", " > button {\n opacity: 1;\n transform: none !important;\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, "var(--ds-space-075, 6px)", _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName)
55
+ );
54
56
  };
55
57
  var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
56
58
  var allowNestedHeaderLinks = _ref.allowNestedHeaderLinks;
57
59
  if (!allowNestedHeaderLinks) {
58
60
  return '';
59
61
  }
60
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 6px 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "], ["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 6px 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName);
62
+ // TODO Delete this comment after verifying space token -> previous value `margin: 6px`
63
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "], ["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName, "var(--ds-space-075, 6px)", _headingAnchor.HeadingAnchorWrapperClassName);
61
64
  };
62
65
  var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
63
66
  var allowColumnSorting = _ref2.allowColumnSorting,
@@ -84,7 +87,7 @@ var fullWidthStyles = function fullWidthStyles(_ref5) {
84
87
  if (appearance !== 'full-width') {
85
88
  return '';
86
89
  }
87
- return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .ak-renderer-extension {\n width: 100% !important;\n }\n\n ", "\n "])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
90
+ return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .ak-renderer-extension {\n width: 100% !important;\n }\n\n ", "\n "])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _table.isTableResizingEnabled)(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
88
91
  };
89
92
  var breakoutWidthStyle = function breakoutWidthStyle(useFragmentMarkBreakoutWidthStylingFix) {
90
93
  if (useFragmentMarkBreakoutWidthStylingFix) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.7.2",
3
+ "version": "108.7.4",
4
4
  "sideEffects": false
5
5
  }
@@ -7,12 +7,13 @@ import { jsx } from '@emotion/react';
7
7
  import { AnalyticsContext } from '@atlaskit/analytics-next';
8
8
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
9
9
  import { WithProviders } from '@atlaskit/editor-common/provider-factory';
10
- import { mediaLinkStyle, IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
11
- import { MediaCard } from '../../ui/MediaCard';
10
+ import { IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
11
+ import { MediaCard } from '../../../ui/MediaCard';
12
12
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
13
- import { getEventHandler } from '../../utils';
13
+ import { getEventHandler } from '../../../utils';
14
14
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
15
- import { MODE, PLATFORM } from '../../analytics/events';
15
+ import { MODE, PLATFORM } from '../../../analytics/events';
16
+ import { linkStyle, borderStyle } from './styles';
16
17
  export default class Media extends PureComponent {
17
18
  constructor(...args) {
18
19
  super(...args);
@@ -60,21 +61,14 @@ export default class Media extends PureComponent {
60
61
  "data-mark-type": "border",
61
62
  "data-color": borderColor,
62
63
  "data-size": borderWidth,
63
- style: {
64
- width: `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`,
65
- height: `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`,
66
- borderColor: paletteColorValue,
67
- borderWidth: `${borderWidth}px`,
68
- borderStyle: 'solid',
69
- borderRadius: `${borderWidth * 2}px`
70
- }
64
+ css: borderStyle(!!linkHref, paletteColorValue, borderWidth)
71
65
  }, mediaComponent) : mediaComponent;
72
66
  return linkHref ? jsx("a", {
73
67
  href: linkHref,
74
68
  rel: "noreferrer noopener",
75
69
  onClick: this.handleMediaLinkClick,
76
70
  "data-block-link": linkHref,
77
- css: mediaLinkStyle
71
+ css: linkStyle(!!borderMark)
78
72
  }, mediaComponentWithBorder) : mediaComponentWithBorder;
79
73
  });
80
74
  _defineProperty(this, "handleMediaLinkClick", event => {
@@ -0,0 +1,21 @@
1
+ import { css } from '@emotion/react';
2
+ import { IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
3
+ export const linkStyle = hasBorderMark => css`
4
+ position: absolute;
5
+ background: transparent;
6
+ top: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ left: 0;
10
+ cursor: pointer;
11
+ width: ${hasBorderMark ? `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)` : '100%'};
12
+ height: ${hasBorderMark ? `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)` : '100%'};
13
+ `;
14
+ export const borderStyle = (hasLinkMark, color, width) => css`
15
+ width: ${hasLinkMark ? '100%' : `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`};
16
+ height: ${hasLinkMark ? '100%' : `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`};
17
+ border-color: ${color};
18
+ border-width: ${width}px;
19
+ border-style: solid;
20
+ border-radius: ${width * 2}px;
21
+ `;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
3
3
  import { akEditorTableNumberColumnWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorTableLegacyCellMinWidth, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
4
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
5
+ import { isTableResizingEnabled } from '../table';
6
+
6
7
  // we allow scaling down column widths by no more than 30%
7
8
  // this intends to reduce unwanted scrolling in the Renderer in these scenarios:
8
9
  // User A creates a table with column widths → User B views it on a smaller screen
@@ -50,13 +51,14 @@ export const Colgroup = props => {
50
51
  layout,
51
52
  isNumberColumnEnabled,
52
53
  renderWidth,
53
- tableNode
54
+ tableNode,
55
+ rendererAppearance
54
56
  } = props;
55
57
  if (!columnWidths) {
56
58
  return null;
57
59
  }
58
60
  const tableResized = isTableResized(columnWidths);
59
- if (getBooleanFF('platform.editor.custom-table-width') && !tableResized) {
61
+ if (isTableResizingEnabled(rendererAppearance) && !tableResized) {
60
62
  return /*#__PURE__*/React.createElement("colgroup", null, isNumberColumnEnabled && /*#__PURE__*/React.createElement("col", {
61
63
  style: {
62
64
  width: akEditorTableNumberColumnWidth
@@ -71,7 +73,7 @@ export const Colgroup = props => {
71
73
  return null;
72
74
  }
73
75
  let tableContainerWidth;
74
- if (getBooleanFF('platform.editor.custom-table-width') && tableNode) {
76
+ if (isTableResizingEnabled(rendererAppearance) && tableNode) {
75
77
  tableContainerWidth = getTableContainerWidth(tableNode);
76
78
  } else {
77
79
  tableContainerWidth = getTableLayoutWidth(layout);
@@ -5,9 +5,9 @@ import { css, jsx } from '@emotion/react';
5
5
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
6
6
  import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
7
7
  import { N40A } from '@atlaskit/theme/colors';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
8
  import { Table } from './table';
10
9
  import { recursivelyInjectProps } from '../../utils/inject-props';
10
+ import { isTableResizingEnabled } from '../table';
11
11
  export const tableStickyPadding = 8;
12
12
  const modeSpecficStyles = {
13
13
  none: css`
@@ -20,54 +20,57 @@ const modeSpecficStyles = {
20
20
  position: absolute;
21
21
  `
22
22
  };
23
- let stickyHeaderZIndex;
24
- if (getBooleanFF('platform.editor.custom-table-width')) {
25
- stickyHeaderZIndex = 13;
26
- } else {
27
- stickyHeaderZIndex = akEditorStickyHeaderZIndex;
28
- }
29
23
 
30
24
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
31
- const fixedTableDivStaticStyles = (top, width) => css`
32
- ${typeof top === 'number' && `top: ${top}px;`}
33
- width: ${width}px;
34
- z-index: ${stickyHeaderZIndex};
35
- &
36
- .${TableSharedCssClassName.TABLE_CONTAINER},
25
+ const fixedTableDivStaticStyles = (top, width, rendererAppearance) => {
26
+ let stickyHeaderZIndex;
27
+ if (isTableResizingEnabled(rendererAppearance)) {
28
+ stickyHeaderZIndex = 13;
29
+ } else {
30
+ stickyHeaderZIndex = akEditorStickyHeaderZIndex;
31
+ }
32
+ return css`
33
+ ${typeof top === 'number' && `top: ${top}px;`}
34
+ width: ${width}px;
35
+ z-index: ${stickyHeaderZIndex};
37
36
  &
38
- .${TableSharedCssClassName.TABLE_STICKY_WRAPPER}
39
- > table {
40
- margin-top: 0;
41
- margin-bottom: 0;
42
- tr {
43
- background: ${"var(--ds-surface, white)"};
37
+ .${TableSharedCssClassName.TABLE_CONTAINER},
38
+ &
39
+ .${TableSharedCssClassName.TABLE_STICKY_WRAPPER}
40
+ > table {
41
+ margin-top: 0;
42
+ margin-bottom: 0;
43
+ tr {
44
+ background: ${"var(--ds-surface, white)"};
45
+ }
44
46
  }
45
- }
46
47
 
47
- border-top: ${tableStickyPadding}px solid
48
- ${"var(--ds-surface, white)"};
49
- background: ${"var(--ds-surface-overlay, white)"};
50
- box-shadow: 0 6px 4px -4px ${`var(--ds-shadow-overflow-perimeter, ${N40A})`};
48
+ border-top: ${tableStickyPadding}px solid
49
+ ${"var(--ds-surface, white)"};
50
+ background: ${"var(--ds-surface-overlay, white)"};
51
+ box-shadow: 0 6px 4px -4px ${`var(--ds-shadow-overflow-perimeter, ${N40A})`};
51
52
 
52
- div[data-expanded='false'] & {
53
- display: none;
54
- }
53
+ div[data-expanded='false'] & {
54
+ display: none;
55
+ }
55
56
 
56
- &
57
- .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.right-shadow::after,
58
57
  &
59
- .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.left-shadow::before {
60
- top: 0px;
61
- height: 100%;
62
- }
63
- `;
58
+ .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.right-shadow::after,
59
+ &
60
+ .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.left-shadow::before {
61
+ top: 0px;
62
+ height: 100%;
63
+ }
64
+ `;
65
+ };
64
66
  export const FixedTableDiv = props => {
65
67
  const {
66
68
  top,
67
69
  wrapperWidth,
68
- mode
70
+ mode,
71
+ rendererAppearance
69
72
  } = props;
70
- const fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
73
+ const fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth, rendererAppearance), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
71
74
  const attrs = {
72
75
  mode
73
76
  };
@@ -90,11 +93,12 @@ export const StickyTable = ({
90
93
  columnWidths,
91
94
  renderWidth,
92
95
  rowHeight,
93
- tableNode
96
+ tableNode,
97
+ rendererAppearance
94
98
  }) => {
95
99
  let styles;
96
100
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
97
- if (getBooleanFF('platform.editor.custom-table-width')) {
101
+ if (isTableResizingEnabled(rendererAppearance)) {
98
102
  styles = css({
99
103
  top: mode === 'pin-bottom' ? top : undefined,
100
104
  position: 'relative'
@@ -112,7 +116,8 @@ export const StickyTable = ({
112
116
  }, jsx(FixedTableDiv, {
113
117
  top: mode === 'stick' ? top : undefined,
114
118
  mode: rowHeight > 300 ? 'none' : mode,
115
- wrapperWidth: wrapperWidth
119
+ wrapperWidth: wrapperWidth,
120
+ rendererAppearance: rendererAppearance
116
121
  }, jsx("div", {
117
122
  className: `${TableSharedCssClassName.TABLE_CONTAINER} is-sticky ${shadowClassNames || ''}`,
118
123
  "data-layout": layout,
@@ -130,7 +135,8 @@ export const StickyTable = ({
130
135
  layout: layout,
131
136
  isNumberColumnEnabled: isNumberColumnEnabled,
132
137
  renderWidth: renderWidth,
133
- tableNode: tableNode
138
+ tableNode: tableNode,
139
+ rendererAppearance: rendererAppearance
134
140
  },
135
141
  /**
136
142
  * @see https://product-fabric.atlassian.net/browse/ED-10235