@atlaskit/renderer 108.1.6 → 108.1.8

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,19 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f22911fb9be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f22911fb9be) - ENGHEALTH-2667: Adjust table cell color logic to enable static analysis of token usages and follow eslint rules
8
+ - Updated dependencies
9
+
10
+ ## 108.1.7
11
+
12
+ ### Patch Changes
13
+
14
+ - [`07cc766e1ac`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07cc766e1ac) - Remove conversion of width from string to number
15
+ - Updated dependencies
16
+
3
17
  ## 108.1.6
4
18
 
5
19
  ### Patch Changes
@@ -256,8 +256,7 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
256
256
  var lineLength = _editorSharedStyles.akEditorDefaultLayoutWidth;
257
257
  var left;
258
258
  if (canUseLinelength(this.props.rendererAppearance) && tableWidth !== 'inherit') {
259
- var tableWidthPx = Number(tableWidth.substring(0, tableWidth.length - 2));
260
- left = lineLength / 2 - tableWidthPx / 2;
259
+ left = lineLength / 2 - tableWidth / 2;
261
260
  }
262
261
  var wrapperWidth = this.wrapperRef.current ? this.wrapperRef.current.clientWidth : 0;
263
262
  var children = _react.default.Children.toArray(this.props.children);
@@ -18,7 +18,6 @@ var _adfSchema = require("@atlaskit/adf-schema");
18
18
  var _utils = require("@atlaskit/editor-common/utils");
19
19
  var _types = require("@atlaskit/editor-common/types");
20
20
  var _editorPalette = require("@atlaskit/editor-palette");
21
- var _tokens = require("@atlaskit/tokens");
22
21
  var _SortingIcon = _interopRequireDefault(require("../../ui/SortingIcon"));
23
22
  var _events = require("../../analytics/events");
24
23
  var _analytics = require("@atlaskit/editor-common/analytics");
@@ -83,9 +82,7 @@ var getStyle = function getStyle(background, colGroupWidth, offsetTop) {
83
82
  if (background &&
84
83
  // ignore setting inline styles if ds neutral token is detected
85
84
  !background.includes('--ds-background-neutral')) {
86
- var tokenName = (0, _editorPalette.hexToEditorBackgroundPaletteColorTokenName)(background);
87
- // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
88
- var tokenColor = tokenName ? (0, _tokens.getTokenValue)(tokenName) : background;
85
+ var tokenColor = (0, _editorPalette.hexToEditorBackgroundPaletteRawValue)(background) || background;
89
86
  style.backgroundColor = tokenColor;
90
87
  }
91
88
  if (colGroupWidth) {
@@ -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.1.6";
58
+ var packageVersion = "108.1.8";
59
59
  var Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.1.6",
3
+ "version": "108.1.8",
4
4
  "sideEffects": false
5
5
  }
@@ -215,8 +215,7 @@ export class TableContainer extends React.Component {
215
215
  const lineLength = akEditorDefaultLayoutWidth;
216
216
  let left;
217
217
  if (canUseLinelength(this.props.rendererAppearance) && tableWidth !== 'inherit') {
218
- const tableWidthPx = Number(tableWidth.substring(0, tableWidth.length - 2));
219
- left = lineLength / 2 - tableWidthPx / 2;
218
+ left = lineLength / 2 - tableWidth / 2;
220
219
  }
221
220
  const wrapperWidth = this.wrapperRef.current ? this.wrapperRef.current.clientWidth : 0;
222
221
  const children = React.Children.toArray(this.props.children);
@@ -4,8 +4,7 @@ import React from 'react';
4
4
  import { tableBackgroundColorPalette } from '@atlaskit/adf-schema';
5
5
  import { compose } from '@atlaskit/editor-common/utils';
6
6
  import { SortOrder } from '@atlaskit/editor-common/types';
7
- import { hexToEditorBackgroundPaletteColorTokenName } from '@atlaskit/editor-palette';
8
- import { getTokenValue } from '@atlaskit/tokens';
7
+ import { hexToEditorBackgroundPaletteRawValue } from '@atlaskit/editor-palette';
9
8
  import SortingIcon from '../../ui/SortingIcon';
10
9
  import { MODE, PLATFORM } from '../../analytics/events';
11
10
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
@@ -70,9 +69,7 @@ const getStyle = (background, colGroupWidth, offsetTop) => {
70
69
  if (background &&
71
70
  // ignore setting inline styles if ds neutral token is detected
72
71
  !background.includes('--ds-background-neutral')) {
73
- const tokenName = hexToEditorBackgroundPaletteColorTokenName(background);
74
- // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
75
- const tokenColor = tokenName ? getTokenValue(tokenName) : background;
72
+ const tokenColor = hexToEditorBackgroundPaletteRawValue(background) || background;
76
73
  style.backgroundColor = tokenColor;
77
74
  }
78
75
  if (colGroupWidth) {
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
35
35
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
36
36
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
37
37
  const packageName = "@atlaskit/renderer";
38
- const packageVersion = "108.1.6";
38
+ const packageVersion = "108.1.8";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.1.6",
3
+ "version": "108.1.8",
4
4
  "sideEffects": false
5
5
  }
@@ -249,8 +249,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
249
249
  var lineLength = akEditorDefaultLayoutWidth;
250
250
  var left;
251
251
  if (canUseLinelength(this.props.rendererAppearance) && tableWidth !== 'inherit') {
252
- var tableWidthPx = Number(tableWidth.substring(0, tableWidth.length - 2));
253
- left = lineLength / 2 - tableWidthPx / 2;
252
+ left = lineLength / 2 - tableWidth / 2;
254
253
  }
255
254
  var wrapperWidth = this.wrapperRef.current ? this.wrapperRef.current.clientWidth : 0;
256
255
  var children = React.Children.toArray(this.props.children);
@@ -12,8 +12,7 @@ import React from 'react';
12
12
  import { tableBackgroundColorPalette } from '@atlaskit/adf-schema';
13
13
  import { compose } from '@atlaskit/editor-common/utils';
14
14
  import { SortOrder } from '@atlaskit/editor-common/types';
15
- import { hexToEditorBackgroundPaletteColorTokenName } from '@atlaskit/editor-palette';
16
- import { getTokenValue } from '@atlaskit/tokens';
15
+ import { hexToEditorBackgroundPaletteRawValue } from '@atlaskit/editor-palette';
17
16
  import SortingIcon from '../../ui/SortingIcon';
18
17
  import { MODE, PLATFORM } from '../../analytics/events';
19
18
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
@@ -76,9 +75,7 @@ var getStyle = function getStyle(background, colGroupWidth, offsetTop) {
76
75
  if (background &&
77
76
  // ignore setting inline styles if ds neutral token is detected
78
77
  !background.includes('--ds-background-neutral')) {
79
- var tokenName = hexToEditorBackgroundPaletteColorTokenName(background);
80
- // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
81
- var tokenColor = tokenName ? getTokenValue(tokenName) : background;
78
+ var tokenColor = hexToEditorBackgroundPaletteRawValue(background) || background;
82
79
  style.backgroundColor = tokenColor;
83
80
  }
84
81
  if (colGroupWidth) {
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
45
45
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  var packageName = "@atlaskit/renderer";
48
- var packageVersion = "108.1.6";
48
+ var packageVersion = "108.1.8";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.1.6",
3
+ "version": "108.1.8",
4
4
  "sideEffects": false
5
5
  }
@@ -18,7 +18,7 @@ export type StickyTableProps = {
18
18
  innerRef: React.RefObject<HTMLDivElement>;
19
19
  rowHeight: number;
20
20
  wrapperWidth: number;
21
- tableWidth: string;
21
+ tableWidth: 'inherit' | number;
22
22
  isNumberColumnEnabled: boolean;
23
23
  children: React.ReactNode[];
24
24
  layout: TableLayout;
@@ -18,7 +18,7 @@ export type StickyTableProps = {
18
18
  innerRef: React.RefObject<HTMLDivElement>;
19
19
  rowHeight: number;
20
20
  wrapperWidth: number;
21
- tableWidth: string;
21
+ tableWidth: 'inherit' | number;
22
22
  isNumberColumnEnabled: boolean;
23
23
  children: React.ReactNode[];
24
24
  layout: TableLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.1.6",
3
+ "version": "108.1.8",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,20 +33,20 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^25.8.0",
36
- "@atlaskit/adf-utils": "^18.3.0",
36
+ "@atlaskit/adf-utils": "^18.4.0",
37
37
  "@atlaskit/analytics-listeners": "^8.7.0",
38
38
  "@atlaskit/analytics-namespaced-context": "^6.7.0",
39
39
  "@atlaskit/analytics-next": "^9.1.0",
40
40
  "@atlaskit/button": "^16.7.0",
41
41
  "@atlaskit/code": "^14.6.0",
42
- "@atlaskit/editor-common": "^74.5.0",
42
+ "@atlaskit/editor-common": "^74.7.0",
43
43
  "@atlaskit/editor-json-transformer": "^8.9.0",
44
- "@atlaskit/editor-palette": "1.4.3",
44
+ "@atlaskit/editor-palette": "1.5.0",
45
45
  "@atlaskit/editor-shared-styles": "^2.4.0",
46
46
  "@atlaskit/emoji": "^67.4.0",
47
47
  "@atlaskit/icon": "^21.12.0",
48
48
  "@atlaskit/media-card": "^76.0.0",
49
- "@atlaskit/media-client": "^23.0.0",
49
+ "@atlaskit/media-client": "^23.1.0",
50
50
  "@atlaskit/media-common": "^7.0.0",
51
51
  "@atlaskit/media-filmstrip": "^47.0.0",
52
52
  "@atlaskit/media-ui": "^23.0.0",
@@ -80,8 +80,8 @@
80
80
  "@atlaskit/avatar": "^21.3.0",
81
81
  "@atlaskit/css-reset": "^6.5.0",
82
82
  "@atlaskit/docs": "*",
83
- "@atlaskit/editor-core": "^185.1.0",
84
- "@atlaskit/editor-test-helpers": "^18.5.0",
83
+ "@atlaskit/editor-core": "^185.2.0",
84
+ "@atlaskit/editor-test-helpers": "^18.6.0",
85
85
  "@atlaskit/link-provider": "^1.6.0",
86
86
  "@atlaskit/link-test-helpers": "^4.0.0",
87
87
  "@atlaskit/logo": "^13.14.0",
@@ -90,10 +90,8 @@
90
90
  "@atlaskit/media-test-helpers": "^33.0.0",
91
91
  "@atlaskit/mention": "^22.1.0",
92
92
  "@atlaskit/navigation-next": "^9.0.0",
93
- "@atlaskit/profilecard": "^19.4.0",
94
93
  "@atlaskit/radio": "^5.6.0",
95
94
  "@atlaskit/range": "^7.1.0",
96
- "@atlaskit/ssr": "*",
97
95
  "@atlaskit/util-data-test": "^17.8.0",
98
96
  "@atlaskit/visual-regression": "*",
99
97
  "@atlaskit/webdriver-runner": "*",