@atlaskit/renderer 109.6.1 → 109.6.3

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
+ ## 109.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#78224](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78224) [`6b4c9dd4ad34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b4c9dd4ad34) - ED-22219: adf-schema updated to 35.5.2
8
+ - Updated dependencies
9
+
10
+ ## 109.6.2
11
+
12
+ ### Patch Changes
13
+
14
+ - [#75568](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75568) [`cf557c64b311`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cf557c64b311) - Updated CardErrorBoundary to pass error and datasourceId to LazyLoadedDatasourceRenderFailedAnalyticsWrapper
15
+ - Updated dependencies
16
+
3
17
  ## 109.6.1
4
18
 
5
19
  ### Patch Changes
@@ -92,7 +92,8 @@ function BlockCard(props) {
92
92
  return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
93
93
  data: analyticsData
94
94
  }, (0, _react2.jsx)(_fallback.CardErrorBoundary, (0, _extends2.default)({
95
- unsupportedComponent: _ui.UnsupportedInline
95
+ unsupportedComponent: _ui.UnsupportedInline,
96
+ datasourceId: props.datasource.id
96
97
  }, cardProps), (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref5) {
97
98
  var width = _ref5.width;
98
99
  return (0, _react2.jsx)("div", {
@@ -29,7 +29,8 @@ var CardErrorBoundary = exports.CardErrorBoundary = /*#__PURE__*/function (_Reac
29
29
  }
30
30
  _this = _super.call.apply(_super, [this].concat(args));
31
31
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
32
- isError: false
32
+ isError: false,
33
+ error: null
33
34
  });
34
35
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickFallback", function (e) {
35
36
  var _this$props = _this.props,
@@ -49,7 +50,8 @@ var CardErrorBoundary = exports.CardErrorBoundary = /*#__PURE__*/function (_Reac
49
50
  var _this$props2 = this.props,
50
51
  _url = _this$props2.url,
51
52
  isDatasource = _this$props2.isDatasource,
52
- UnsupportedComponent = _this$props2.unsupportedComponent;
53
+ UnsupportedComponent = _this$props2.unsupportedComponent,
54
+ datasourceId = _this$props2.datasourceId;
53
55
  if (_url) {
54
56
  var fallback = /*#__PURE__*/_react.default.createElement("a", {
55
57
  href: _url,
@@ -57,9 +59,15 @@ var CardErrorBoundary = exports.CardErrorBoundary = /*#__PURE__*/function (_Reac
57
59
  }, _url);
58
60
  if (isDatasource) {
59
61
  if ((0, _adfSchema.isSafeUrl)(_url)) {
60
- return /*#__PURE__*/_react.default.createElement(_linkDatasource.LazyLoadedDatasourceRenderFailedAnalyticsWrapper, null, /*#__PURE__*/_react.default.createElement(_.InlineCard, this.props));
62
+ return /*#__PURE__*/_react.default.createElement(_linkDatasource.LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
63
+ datasourceId: datasourceId,
64
+ error: this.state.error
65
+ }, /*#__PURE__*/_react.default.createElement(_.InlineCard, this.props));
61
66
  } else {
62
- return /*#__PURE__*/_react.default.createElement(_linkDatasource.LazyLoadedDatasourceRenderFailedAnalyticsWrapper, null, fallback);
67
+ return /*#__PURE__*/_react.default.createElement(_linkDatasource.LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
68
+ datasourceId: datasourceId,
69
+ error: this.state.error
70
+ }, fallback);
63
71
  }
64
72
  } else {
65
73
  return fallback;
@@ -74,14 +82,16 @@ var CardErrorBoundary = exports.CardErrorBoundary = /*#__PURE__*/function (_Reac
74
82
  key: "componentDidCatch",
75
83
  value: function componentDidCatch(_error) {
76
84
  this.setState({
77
- isError: true
85
+ isError: true,
86
+ error: _error
78
87
  });
79
88
  }
80
89
  }], [{
81
90
  key: "getDerivedStateFromError",
82
- value: function getDerivedStateFromError() {
91
+ value: function getDerivedStateFromError(error) {
83
92
  return {
84
- isError: true
93
+ isError: true,
94
+ error: error
85
95
  };
86
96
  }
87
97
  }]);
@@ -54,7 +54,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
54
54
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  var packageName = "@atlaskit/renderer";
57
- var packageVersion = "109.6.1";
57
+ var packageVersion = "109.6.3";
58
58
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
59
59
  (0, _inherits2.default)(Renderer, _PureComponent);
60
60
  var _super = _createSuper(Renderer);
@@ -83,7 +83,8 @@ export default function BlockCard(props) {
83
83
  return jsx(AnalyticsContext, {
84
84
  data: analyticsData
85
85
  }, jsx(CardErrorBoundary, _extends({
86
- unsupportedComponent: UnsupportedInline
86
+ unsupportedComponent: UnsupportedInline,
87
+ datasourceId: props.datasource.id
87
88
  }, cardProps), jsx(WidthConsumer, null, ({
88
89
  width
89
90
  }) => jsx("div", {
@@ -7,7 +7,8 @@ export class CardErrorBoundary extends React.PureComponent {
7
7
  constructor(...args) {
8
8
  super(...args);
9
9
  _defineProperty(this, "state", {
10
- isError: false
10
+ isError: false,
11
+ error: null
11
12
  });
12
13
  _defineProperty(this, "onClickFallback", e => {
13
14
  const {
@@ -20,9 +21,10 @@ export class CardErrorBoundary extends React.PureComponent {
20
21
  }
21
22
  });
22
23
  }
23
- static getDerivedStateFromError() {
24
+ static getDerivedStateFromError(error) {
24
25
  return {
25
- isError: true
26
+ isError: true,
27
+ error
26
28
  };
27
29
  }
28
30
  render() {
@@ -30,7 +32,8 @@ export class CardErrorBoundary extends React.PureComponent {
30
32
  const {
31
33
  url,
32
34
  isDatasource,
33
- unsupportedComponent: UnsupportedComponent
35
+ unsupportedComponent: UnsupportedComponent,
36
+ datasourceId
34
37
  } = this.props;
35
38
  if (url) {
36
39
  const fallback = /*#__PURE__*/React.createElement("a", {
@@ -39,9 +42,15 @@ export class CardErrorBoundary extends React.PureComponent {
39
42
  }, url);
40
43
  if (isDatasource) {
41
44
  if (isSafeUrl(url)) {
42
- return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, null, /*#__PURE__*/React.createElement(InlineCard, this.props));
45
+ return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
46
+ datasourceId: datasourceId,
47
+ error: this.state.error
48
+ }, /*#__PURE__*/React.createElement(InlineCard, this.props));
43
49
  } else {
44
- return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, null, fallback);
50
+ return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
51
+ datasourceId: datasourceId,
52
+ error: this.state.error
53
+ }, fallback);
45
54
  }
46
55
  } else {
47
56
  return fallback;
@@ -54,7 +63,8 @@ export class CardErrorBoundary extends React.PureComponent {
54
63
  }
55
64
  componentDidCatch(_error) {
56
65
  this.setState({
57
- isError: true
66
+ isError: true,
67
+ error: _error
58
68
  });
59
69
  }
60
70
  }
@@ -35,7 +35,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
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 = "109.6.1";
38
+ const packageVersion = "109.6.3";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -85,7 +85,8 @@ export default function BlockCard(props) {
85
85
  return jsx(AnalyticsContext, {
86
86
  data: analyticsData
87
87
  }, jsx(CardErrorBoundary, _extends({
88
- unsupportedComponent: UnsupportedInline
88
+ unsupportedComponent: UnsupportedInline,
89
+ datasourceId: props.datasource.id
89
90
  }, cardProps), jsx(WidthConsumer, null, function (_ref5) {
90
91
  var width = _ref5.width;
91
92
  return jsx("div", {
@@ -22,7 +22,8 @@ export var CardErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
22
22
  }
23
23
  _this = _super.call.apply(_super, [this].concat(args));
24
24
  _defineProperty(_assertThisInitialized(_this), "state", {
25
- isError: false
25
+ isError: false,
26
+ error: null
26
27
  });
27
28
  _defineProperty(_assertThisInitialized(_this), "onClickFallback", function (e) {
28
29
  var _this$props = _this.props,
@@ -42,7 +43,8 @@ export var CardErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
42
43
  var _this$props2 = this.props,
43
44
  _url = _this$props2.url,
44
45
  isDatasource = _this$props2.isDatasource,
45
- UnsupportedComponent = _this$props2.unsupportedComponent;
46
+ UnsupportedComponent = _this$props2.unsupportedComponent,
47
+ datasourceId = _this$props2.datasourceId;
46
48
  if (_url) {
47
49
  var fallback = /*#__PURE__*/React.createElement("a", {
48
50
  href: _url,
@@ -50,9 +52,15 @@ export var CardErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
50
52
  }, _url);
51
53
  if (isDatasource) {
52
54
  if (isSafeUrl(_url)) {
53
- return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, null, /*#__PURE__*/React.createElement(InlineCard, this.props));
55
+ return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
56
+ datasourceId: datasourceId,
57
+ error: this.state.error
58
+ }, /*#__PURE__*/React.createElement(InlineCard, this.props));
54
59
  } else {
55
- return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, null, fallback);
60
+ return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
61
+ datasourceId: datasourceId,
62
+ error: this.state.error
63
+ }, fallback);
56
64
  }
57
65
  } else {
58
66
  return fallback;
@@ -67,14 +75,16 @@ export var CardErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
67
75
  key: "componentDidCatch",
68
76
  value: function componentDidCatch(_error) {
69
77
  this.setState({
70
- isError: true
78
+ isError: true,
79
+ error: _error
71
80
  });
72
81
  }
73
82
  }], [{
74
83
  key: "getDerivedStateFromError",
75
- value: function getDerivedStateFromError() {
84
+ value: function getDerivedStateFromError(error) {
76
85
  return {
77
- isError: true
86
+ isError: true,
87
+ error: error
78
88
  };
79
89
  }
80
90
  }]);
@@ -45,7 +45,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
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 = "109.6.1";
48
+ var packageVersion = "109.6.3";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -7,13 +7,16 @@ export declare class CardErrorBoundary extends React.PureComponent<{
7
7
  onClick?: (e: React.MouseEvent<HTMLElement>, url?: string) => void;
8
8
  isDatasource?: boolean;
9
9
  children?: React.ReactNode;
10
+ datasourceId?: string;
10
11
  } & CardErrorBoundaryProps> {
11
12
  state: {
12
13
  isError: boolean;
14
+ error: null;
13
15
  };
14
16
  onClickFallback: (e: React.MouseEvent<HTMLElement>) => void;
15
- static getDerivedStateFromError(): {
17
+ static getDerivedStateFromError(error: Error): {
16
18
  isError: boolean;
19
+ error: Error;
17
20
  };
18
21
  render(): React.ReactNode;
19
22
  componentDidCatch(_error: Error): void;
@@ -7,13 +7,16 @@ export declare class CardErrorBoundary extends React.PureComponent<{
7
7
  onClick?: (e: React.MouseEvent<HTMLElement>, url?: string) => void;
8
8
  isDatasource?: boolean;
9
9
  children?: React.ReactNode;
10
+ datasourceId?: string;
10
11
  } & CardErrorBoundaryProps> {
11
12
  state: {
12
13
  isError: boolean;
14
+ error: null;
13
15
  };
14
16
  onClickFallback: (e: React.MouseEvent<HTMLElement>) => void;
15
- static getDerivedStateFromError(): {
17
+ static getDerivedStateFromError(error: Error): {
16
18
  isError: boolean;
19
+ error: Error;
17
20
  };
18
21
  render(): React.ReactNode;
19
22
  componentDidCatch(_error: Error): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.6.1",
3
+ "version": "109.6.3",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,14 +24,14 @@
24
24
  "runReact18": false
25
25
  },
26
26
  "dependencies": {
27
- "@atlaskit/adf-schema": "^35.5.1",
27
+ "@atlaskit/adf-schema": "^35.5.2",
28
28
  "@atlaskit/adf-utils": "^19.0.0",
29
29
  "@atlaskit/analytics-listeners": "^8.9.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.9.0",
31
31
  "@atlaskit/analytics-next": "^9.2.0",
32
32
  "@atlaskit/button": "^17.6.0",
33
33
  "@atlaskit/code": "^15.1.0",
34
- "@atlaskit/editor-common": "^78.8.0",
34
+ "@atlaskit/editor-common": "^78.10.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.2",
37
37
  "@atlaskit/editor-prosemirror": "3.0.0",
@@ -44,14 +44,14 @@
44
44
  "@atlaskit/media-client-react": "^2.0.0",
45
45
  "@atlaskit/media-common": "^11.0.0",
46
46
  "@atlaskit/media-filmstrip": "^47.0.0",
47
- "@atlaskit/media-ui": "^25.2.0",
48
- "@atlaskit/media-viewer": "^48.2.0",
47
+ "@atlaskit/media-ui": "^25.3.0",
48
+ "@atlaskit/media-viewer": "^48.3.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.2.0",
50
50
  "@atlaskit/smart-card": "^26.48.0",
51
51
  "@atlaskit/status": "^1.4.0",
52
52
  "@atlaskit/task-decision": "^17.9.0",
53
53
  "@atlaskit/theme": "^12.6.0",
54
- "@atlaskit/tokens": "^1.38.0",
54
+ "@atlaskit/tokens": "^1.39.0",
55
55
  "@atlaskit/tooltip": "^18.1.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@emotion/react": "^11.7.1",
@@ -74,6 +74,7 @@
74
74
  "@atlaskit/css-reset": "^6.6.0",
75
75
  "@atlaskit/link-provider": "^1.7.0",
76
76
  "@atlaskit/link-test-helpers": "^6.2.0",
77
+ "@atlaskit/linking-common": "^5.3.0",
77
78
  "@atlaskit/media-core": "^34.2.0",
78
79
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
79
80
  "@atlaskit/media-test-helpers": "^33.0.0",