@atlaskit/renderer 108.6.6 → 108.6.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,17 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.6.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`776a88442e4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/776a88442e4) - [ux] When on mobile, the datasources will fallback to inline smartcard views.
8
+
9
+ ## 108.6.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [`caa8dc8e5f5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/caa8dc8e5f5) - ED-18758:Making the box-shadow used in table with sticky headers consistent in light theme to original
14
+
3
15
  ## 108.6.6
4
16
 
5
17
  ### Patch Changes
@@ -15,6 +15,7 @@ var _fallback = require("./fallback");
15
15
  var _getCardClickHandler = require("../utils/getCardClickHandler");
16
16
  var _analyticsNext = require("@atlaskit/analytics-next");
17
17
  var _linkDatasource = require("@atlaskit/link-datasource");
18
+ var _ = require("./");
18
19
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
19
20
  var _colors = require("@atlaskit/theme/colors");
20
21
  var _utils2 = require("@atlaskit/editor-common/utils");
@@ -55,15 +56,24 @@ function BlockCard(props) {
55
56
  // Below is added for the future implementation of Linking Platform namespaced analytic context
56
57
  location: 'renderer'
57
58
  };
59
+ var onError = function onError(_ref2) {
60
+ var err = _ref2.err;
61
+ if (err) {
62
+ throw err;
63
+ }
64
+ };
58
65
  if (props.datasource) {
66
+ if (platform === 'mobile') {
67
+ return (0, _react2.jsx)(_.InlineCard, props);
68
+ }
59
69
  var views = props.datasource.views;
60
70
  var tableView = views.find(function (view) {
61
71
  return view.type === 'table';
62
72
  });
63
73
  if (tableView && (0, _utils2.canRenderDatasource)(props.datasource)) {
64
74
  var _tableView$properties;
65
- var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref2) {
66
- var key = _ref2.key;
75
+ var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref3) {
76
+ var key = _ref3.key;
67
77
  return key;
68
78
  });
69
79
  var datasource = props.datasource,
@@ -72,8 +82,8 @@ function BlockCard(props) {
72
82
  data: analyticsData
73
83
  }, (0, _react2.jsx)(_fallback.CardErrorBoundary, (0, _extends2.default)({
74
84
  unsupportedComponent: _ui.UnsupportedBlock
75
- }, cardProps), (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref3) {
76
- var width = _ref3.width;
85
+ }, cardProps), (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref4) {
86
+ var width = _ref4.width;
77
87
  return (0, _react2.jsx)("div", {
78
88
  css: datasourceContainerStyle,
79
89
  style: {
@@ -89,12 +99,6 @@ function BlockCard(props) {
89
99
  }
90
100
  return null;
91
101
  }
92
- var onError = function onError(_ref4) {
93
- var err = _ref4.err;
94
- if (err) {
95
- throw err;
96
- }
97
- };
98
102
  return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
99
103
  data: analyticsData
100
104
  }, (0, _react2.jsx)("div", {
@@ -28,7 +28,7 @@ var modeSpecficStyles = {
28
28
 
29
29
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
30
30
  var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
31
- 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: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _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, ".concat("0 6px 4px -4px ".concat(_colors.N40A), ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
31
+ 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 .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _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);
32
32
  };
33
33
  var FixedTableDiv = function FixedTableDiv(props) {
34
34
  var top = props.top,
@@ -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.6.6";
58
+ var packageVersion = "108.6.9";
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.6.6",
3
+ "version": "108.6.9",
4
4
  "sideEffects": false
5
5
  }
@@ -9,6 +9,7 @@ import { CardErrorBoundary } from './fallback';
9
9
  import { getCardClickHandler } from '../utils/getCardClickHandler';
10
10
  import { AnalyticsContext } from '@atlaskit/analytics-next';
11
11
  import { DatasourceTableView } from '@atlaskit/link-datasource';
12
+ import { InlineCard } from './';
12
13
  import { akEditorRuleBorderRadius } from '@atlaskit/editor-shared-styles';
13
14
  import { N40 } from '@atlaskit/theme/colors';
14
15
  import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
@@ -49,7 +50,17 @@ export default function BlockCard(props) {
49
50
  // Below is added for the future implementation of Linking Platform namespaced analytic context
50
51
  location: 'renderer'
51
52
  };
53
+ const onError = ({
54
+ err
55
+ }) => {
56
+ if (err) {
57
+ throw err;
58
+ }
59
+ };
52
60
  if (props.datasource) {
61
+ if (platform === 'mobile') {
62
+ return jsx(InlineCard, props);
63
+ }
53
64
  const views = props.datasource.views;
54
65
  const tableView = views.find(view => view.type === 'table');
55
66
  if (tableView && canRenderDatasource(props.datasource)) {
@@ -81,13 +92,6 @@ export default function BlockCard(props) {
81
92
  }
82
93
  return null;
83
94
  }
84
- const onError = ({
85
- err
86
- }) => {
87
- if (err) {
88
- throw err;
89
- }
90
- };
91
95
  return jsx(AnalyticsContext, {
92
96
  data: analyticsData
93
97
  }, jsx("div", {
@@ -40,7 +40,7 @@ const fixedTableDivStaticStyles = (top, width) => css`
40
40
  border-top: ${tableStickyPadding}px solid
41
41
  ${"var(--ds-surface, white)"};
42
42
  background: ${"var(--ds-surface-overlay, white)"};
43
- box-shadow: ${`var(--ds-shadow-overflow, ${`0 6px 4px -4px ${N40A}`})`};
43
+ box-shadow: 0 6px 4px -4px ${`var(--ds-shadow-overflow-perimeter, ${N40A})`};
44
44
 
45
45
  div[data-expanded='false'] & {
46
46
  display: none;
@@ -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.6.6";
38
+ const packageVersion = "108.6.9";
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.6.6",
3
+ "version": "108.6.9",
4
4
  "sideEffects": false
5
5
  }
@@ -9,6 +9,7 @@ import { CardErrorBoundary } from './fallback';
9
9
  import { getCardClickHandler } from '../utils/getCardClickHandler';
10
10
  import { AnalyticsContext } from '@atlaskit/analytics-next';
11
11
  import { DatasourceTableView } from '@atlaskit/link-datasource';
12
+ import { InlineCard } from './';
12
13
  import { akEditorRuleBorderRadius } from '@atlaskit/editor-shared-styles';
13
14
  import { N40 } from '@atlaskit/theme/colors';
14
15
  import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
@@ -48,15 +49,24 @@ export default function BlockCard(props) {
48
49
  // Below is added for the future implementation of Linking Platform namespaced analytic context
49
50
  location: 'renderer'
50
51
  };
52
+ var onError = function onError(_ref2) {
53
+ var err = _ref2.err;
54
+ if (err) {
55
+ throw err;
56
+ }
57
+ };
51
58
  if (props.datasource) {
59
+ if (platform === 'mobile') {
60
+ return jsx(InlineCard, props);
61
+ }
52
62
  var views = props.datasource.views;
53
63
  var tableView = views.find(function (view) {
54
64
  return view.type === 'table';
55
65
  });
56
66
  if (tableView && canRenderDatasource(props.datasource)) {
57
67
  var _tableView$properties;
58
- var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref2) {
59
- var key = _ref2.key;
68
+ var visibleColumnKeys = (_tableView$properties = tableView.properties) === null || _tableView$properties === void 0 ? void 0 : _tableView$properties.columns.map(function (_ref3) {
69
+ var key = _ref3.key;
60
70
  return key;
61
71
  });
62
72
  var datasource = props.datasource,
@@ -65,8 +75,8 @@ export default function BlockCard(props) {
65
75
  data: analyticsData
66
76
  }, jsx(CardErrorBoundary, _extends({
67
77
  unsupportedComponent: UnsupportedBlock
68
- }, cardProps), jsx(WidthConsumer, null, function (_ref3) {
69
- var width = _ref3.width;
78
+ }, cardProps), jsx(WidthConsumer, null, function (_ref4) {
79
+ var width = _ref4.width;
70
80
  return jsx("div", {
71
81
  css: datasourceContainerStyle,
72
82
  style: {
@@ -82,12 +92,6 @@ export default function BlockCard(props) {
82
92
  }
83
93
  return null;
84
94
  }
85
- var onError = function onError(_ref4) {
86
- var err = _ref4.err;
87
- if (err) {
88
- throw err;
89
- }
90
- };
91
95
  return jsx(AnalyticsContext, {
92
96
  data: analyticsData
93
97
  }, jsx("div", {
@@ -20,7 +20,7 @@ var modeSpecficStyles = {
20
20
 
21
21
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
22
22
  var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
23
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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: ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, akEditorStickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
23
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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 .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, akEditorStickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
24
24
  };
25
25
  export var FixedTableDiv = function FixedTableDiv(props) {
26
26
  var top = props.top,
@@ -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.6.6";
48
+ var packageVersion = "108.6.9";
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.6.6",
3
+ "version": "108.6.9",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.6",
3
+ "version": "108.6.8",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,14 +24,14 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@atlaskit/adf-schema": "^26.1.0",
27
+ "@atlaskit/adf-schema": "^26.2.0",
28
28
  "@atlaskit/adf-utils": "^19.0.0",
29
29
  "@atlaskit/analytics-listeners": "^8.7.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.7.0",
31
31
  "@atlaskit/analytics-next": "^9.1.0",
32
32
  "@atlaskit/button": "^16.8.0",
33
33
  "@atlaskit/code": "^14.6.0",
34
- "@atlaskit/editor-common": "^74.19.0",
34
+ "@atlaskit/editor-common": "^74.20.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.1",
37
37
  "@atlaskit/editor-shared-styles": "^2.4.0",
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@atlaskit/analytics-gas-types": "^5.1.0",
73
73
  "@atlaskit/css-reset": "^6.5.0",
74
- "@atlaskit/editor-core": "^185.13.0",
74
+ "@atlaskit/editor-core": "^185.15.0",
75
75
  "@atlaskit/editor-test-helpers": "^18.10.0",
76
76
  "@atlaskit/link-provider": "^1.6.0",
77
77
  "@atlaskit/link-test-helpers": "^4.1.0",
@@ -89,7 +89,7 @@
89
89
  "@types/react-loadable": "^5.4.1",
90
90
  "ajv": "^6.12.6",
91
91
  "enzyme": "^3.10.0",
92
- "jsdom": "^16.2.2",
92
+ "jsdom": "^17.0.0",
93
93
  "mockdate": "^3.0.5",
94
94
  "puppeteer": "13.7.0",
95
95
  "react": "^16.8.0",