@atlaskit/renderer 127.4.0 → 128.0.0
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 +24 -0
- package/dist/cjs/react/nodes/inlineCard.js +0 -3
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +9 -4
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/inlineCard.js +0 -3
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +9 -4
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/inlineCard.js +0 -3
- package/dist/esm/ui/Renderer/ErrorBoundary.js +9 -4
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/ui/Renderer/ErrorBoundary.d.ts +2 -0
- package/dist/types-ts4.5/ui/Renderer/ErrorBoundary.d.ts +2 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 128.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`0fda7892b26bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fda7892b26bc) -
|
|
8
|
+
[ux] Remove useSmartCardReloadAfterCache hook
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 127.5.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`dcc45a2290b59`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dcc45a2290b59) -
|
|
19
|
+
Cleaned up enable_absolute_positioning_profile_card feature gate
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`5c1f0e3fb0a3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c1f0e3fb0a3f) -
|
|
24
|
+
EDITO-5622 Update errorboundary key to reduce rerenders from new key being generated
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 127.4.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
|
@@ -15,7 +15,6 @@ var _utils = require("@atlaskit/linking-common/utils");
|
|
|
15
15
|
var _hooks = require("@atlaskit/smart-card/hooks");
|
|
16
16
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
17
17
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
18
|
-
var _hooks2 = require("@atlaskit/editor-common/hooks");
|
|
19
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
21
20
|
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
@@ -171,8 +170,6 @@ var InlineCard = function InlineCard(props) {
|
|
|
171
170
|
isResolvedViewRendered = _useState2[0],
|
|
172
171
|
setIsResolvedViewRendered = _useState2[1];
|
|
173
172
|
var cardState = getSmartlinkState === null || getSmartlinkState === void 0 ? void 0 : getSmartlinkState()[url || ''];
|
|
174
|
-
var cardStatus = cardState === null || cardState === void 0 ? void 0 : cardState.status;
|
|
175
|
-
(0, _hooks2.useSmartCardReloadAfterCache)(url, cardStatus, (smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.ssr) || false);
|
|
176
173
|
var onClick = (0, _getCardClickHandler.getCardClickHandler)(eventHandlers, url);
|
|
177
174
|
var cardProps = {
|
|
178
175
|
url: url,
|
|
@@ -16,6 +16,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
16
16
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
17
17
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
18
18
|
var _events = require("../../analytics/events");
|
|
19
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
20
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
20
21
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
21
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
@@ -31,7 +32,8 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
31
32
|
_this = _callSuper(this, ErrorBoundary, [].concat(args));
|
|
32
33
|
(0, _defineProperty2.default)(_this, "state", {
|
|
33
34
|
errorCaptured: false,
|
|
34
|
-
domError: false
|
|
35
|
+
domError: false,
|
|
36
|
+
domErrorCount: 0
|
|
35
37
|
});
|
|
36
38
|
return _this;
|
|
37
39
|
}
|
|
@@ -91,9 +93,10 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
91
93
|
errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
|
|
92
94
|
}
|
|
93
95
|
});
|
|
94
|
-
this.setState(function () {
|
|
96
|
+
this.setState(function (prevState) {
|
|
95
97
|
return {
|
|
96
|
-
domError: true
|
|
98
|
+
domError: true,
|
|
99
|
+
domErrorCount: prevState.domErrorCount + 1
|
|
97
100
|
};
|
|
98
101
|
});
|
|
99
102
|
}
|
|
@@ -111,9 +114,11 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
111
114
|
key: "render",
|
|
112
115
|
value: function render() {
|
|
113
116
|
if (this.state.domError) {
|
|
117
|
+
var key = (0, _expValEquals.expValEquals)('platform_editor_renderer_error_boundary_stable_key', 'isEnabled', true) ? this.state.domErrorCount :
|
|
114
118
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
119
|
+
(0, _uuid.default)();
|
|
115
120
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
116
|
-
key:
|
|
121
|
+
key: key
|
|
117
122
|
}, this.props.children);
|
|
118
123
|
}
|
|
119
124
|
if (this.shouldRecover()) {
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "127.
|
|
74
|
+
var packageVersion = "127.5.0";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -13,7 +13,6 @@ import { isWithinPreviewPanelIFrame } from '@atlaskit/linking-common/utils';
|
|
|
13
13
|
import { useSmartLinkActions } from '@atlaskit/smart-card/hooks';
|
|
14
14
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
15
15
|
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
16
|
-
import { useSmartCardReloadAfterCache } from '@atlaskit/editor-common/hooks';
|
|
17
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
19
18
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
@@ -154,8 +153,6 @@ const InlineCard = props => {
|
|
|
154
153
|
} = (cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value5 = cardContext.value) === null || _cardContext$value5 === void 0 ? void 0 : _cardContext$value5.store) || {};
|
|
155
154
|
const [isResolvedViewRendered, setIsResolvedViewRendered] = useState(false);
|
|
156
155
|
const cardState = getSmartlinkState === null || getSmartlinkState === void 0 ? void 0 : getSmartlinkState()[url || ''];
|
|
157
|
-
const cardStatus = cardState === null || cardState === void 0 ? void 0 : cardState.status;
|
|
158
|
-
useSmartCardReloadAfterCache(url, cardStatus, (smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.ssr) || false);
|
|
159
156
|
const onClick = getCardClickHandler(eventHandlers, url);
|
|
160
157
|
const cardProps = {
|
|
161
158
|
url,
|
|
@@ -4,6 +4,7 @@ import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
5
5
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
6
6
|
import { PLATFORM } from '../../analytics/events';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
8
9
|
import uuid from 'uuid';
|
|
9
10
|
// Ignored via go/ees005
|
|
@@ -13,7 +14,8 @@ export class ErrorBoundary extends React.Component {
|
|
|
13
14
|
super(...args);
|
|
14
15
|
_defineProperty(this, "state", {
|
|
15
16
|
errorCaptured: false,
|
|
16
|
-
domError: false
|
|
17
|
+
domError: false,
|
|
18
|
+
domErrorCount: 0
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
fireAnalyticsEvent(event) {
|
|
@@ -64,8 +66,9 @@ export class ErrorBoundary extends React.Component {
|
|
|
64
66
|
errorMessage: `${additionalInfo}${error === null || error === void 0 ? void 0 : error.message}`
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
|
-
this.setState(
|
|
68
|
-
domError: true
|
|
69
|
+
this.setState(prevState => ({
|
|
70
|
+
domError: true,
|
|
71
|
+
domErrorCount: prevState.domErrorCount + 1
|
|
69
72
|
}));
|
|
70
73
|
}
|
|
71
74
|
if (this.hasFallback()) {
|
|
@@ -80,9 +83,11 @@ export class ErrorBoundary extends React.Component {
|
|
|
80
83
|
}
|
|
81
84
|
render() {
|
|
82
85
|
if (this.state.domError) {
|
|
86
|
+
const key = expValEquals('platform_editor_renderer_error_boundary_stable_key', 'isEnabled', true) ? this.state.domErrorCount :
|
|
83
87
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
88
|
+
uuid();
|
|
84
89
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
85
|
-
key:
|
|
90
|
+
key: key
|
|
86
91
|
}, this.props.children);
|
|
87
92
|
}
|
|
88
93
|
if (this.shouldRecover()) {
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "127.
|
|
60
|
+
const packageVersion = "127.5.0";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -14,7 +14,6 @@ import { isWithinPreviewPanelIFrame } from '@atlaskit/linking-common/utils';
|
|
|
14
14
|
import { useSmartLinkActions } from '@atlaskit/smart-card/hooks';
|
|
15
15
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
16
16
|
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
17
|
-
import { useSmartCardReloadAfterCache } from '@atlaskit/editor-common/hooks';
|
|
18
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
20
19
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
@@ -162,8 +161,6 @@ var InlineCard = function InlineCard(props) {
|
|
|
162
161
|
isResolvedViewRendered = _useState2[0],
|
|
163
162
|
setIsResolvedViewRendered = _useState2[1];
|
|
164
163
|
var cardState = getSmartlinkState === null || getSmartlinkState === void 0 ? void 0 : getSmartlinkState()[url || ''];
|
|
165
|
-
var cardStatus = cardState === null || cardState === void 0 ? void 0 : cardState.status;
|
|
166
|
-
useSmartCardReloadAfterCache(url, cardStatus, (smartLinks === null || smartLinks === void 0 ? void 0 : smartLinks.ssr) || false);
|
|
167
164
|
var onClick = getCardClickHandler(eventHandlers, url);
|
|
168
165
|
var cardProps = {
|
|
169
166
|
url: url,
|
|
@@ -11,6 +11,7 @@ import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
|
11
11
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
12
12
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
13
13
|
import { PLATFORM } from '../../analytics/events';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
15
16
|
import uuid from 'uuid';
|
|
16
17
|
// Ignored via go/ees005
|
|
@@ -25,7 +26,8 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
25
26
|
_this = _callSuper(this, ErrorBoundary, [].concat(args));
|
|
26
27
|
_defineProperty(_this, "state", {
|
|
27
28
|
errorCaptured: false,
|
|
28
|
-
domError: false
|
|
29
|
+
domError: false,
|
|
30
|
+
domErrorCount: 0
|
|
29
31
|
});
|
|
30
32
|
return _this;
|
|
31
33
|
}
|
|
@@ -85,9 +87,10 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
85
87
|
errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
|
|
86
88
|
}
|
|
87
89
|
});
|
|
88
|
-
this.setState(function () {
|
|
90
|
+
this.setState(function (prevState) {
|
|
89
91
|
return {
|
|
90
|
-
domError: true
|
|
92
|
+
domError: true,
|
|
93
|
+
domErrorCount: prevState.domErrorCount + 1
|
|
91
94
|
};
|
|
92
95
|
});
|
|
93
96
|
}
|
|
@@ -105,9 +108,11 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
105
108
|
key: "render",
|
|
106
109
|
value: function render() {
|
|
107
110
|
if (this.state.domError) {
|
|
111
|
+
var key = expValEquals('platform_editor_renderer_error_boundary_stable_key', 'isEnabled', true) ? this.state.domErrorCount :
|
|
108
112
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
113
|
+
uuid();
|
|
109
114
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
110
|
-
key:
|
|
115
|
+
key: key
|
|
111
116
|
}, this.props.children);
|
|
112
117
|
}
|
|
113
118
|
if (this.shouldRecover()) {
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "127.
|
|
65
|
+
var packageVersion = "127.5.0";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -12,12 +12,14 @@ interface ErrorBoundaryProps {
|
|
|
12
12
|
}
|
|
13
13
|
interface ErrorBoundaryState {
|
|
14
14
|
domError: boolean;
|
|
15
|
+
domErrorCount: number;
|
|
15
16
|
errorCaptured: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
18
19
|
state: {
|
|
19
20
|
errorCaptured: boolean;
|
|
20
21
|
domError: boolean;
|
|
22
|
+
domErrorCount: number;
|
|
21
23
|
};
|
|
22
24
|
private fireAnalyticsEvent;
|
|
23
25
|
private hasFallback;
|
|
@@ -12,12 +12,14 @@ interface ErrorBoundaryProps {
|
|
|
12
12
|
}
|
|
13
13
|
interface ErrorBoundaryState {
|
|
14
14
|
domError: boolean;
|
|
15
|
+
domErrorCount: number;
|
|
15
16
|
errorCaptured: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
18
19
|
state: {
|
|
19
20
|
errorCaptured: boolean;
|
|
20
21
|
domError: boolean;
|
|
22
|
+
domErrorCount: number;
|
|
21
23
|
};
|
|
22
24
|
private fireAnalyticsEvent;
|
|
23
25
|
private hasFallback;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "128.0.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
42
42
|
"@atlaskit/icon": "^32.0.0",
|
|
43
43
|
"@atlaskit/link": "^3.3.0",
|
|
44
|
-
"@atlaskit/link-datasource": "^4.
|
|
44
|
+
"@atlaskit/link-datasource": "^4.34.0",
|
|
45
45
|
"@atlaskit/link-extractors": "^2.4.0",
|
|
46
46
|
"@atlaskit/linking-common": "^9.10.0",
|
|
47
47
|
"@atlaskit/media-card": "^79.15.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/status": "^3.1.0",
|
|
60
60
|
"@atlaskit/task-decision": "^19.3.0",
|
|
61
61
|
"@atlaskit/theme": "^22.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^35.
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^35.10.0",
|
|
63
63
|
"@atlaskit/tokens": "^11.1.0",
|
|
64
64
|
"@atlaskit/tooltip": "^20.14.0",
|
|
65
65
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^3.1.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^
|
|
76
|
+
"@atlaskit/editor-common": "^112.0.0",
|
|
77
77
|
"@atlaskit/link-provider": "^4.2.0",
|
|
78
78
|
"@atlaskit/media-core": "^37.0.0",
|
|
79
79
|
"react": "^18.2.0",
|
|
@@ -85,14 +85,14 @@
|
|
|
85
85
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
86
86
|
"@atlaskit/checkbox": "^17.3.0",
|
|
87
87
|
"@atlaskit/link-provider": "^4.2.0",
|
|
88
|
-
"@atlaskit/link-test-helpers": "^9.
|
|
88
|
+
"@atlaskit/link-test-helpers": "^9.1.0",
|
|
89
89
|
"@atlaskit/media-core": "^37.0.0",
|
|
90
90
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
91
91
|
"@atlaskit/media-test-helpers": "^40.0.0",
|
|
92
92
|
"@atlaskit/mention": "^24.5.0",
|
|
93
93
|
"@atlaskit/modal-dialog": "^14.11.0",
|
|
94
94
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
|
|
95
|
-
"@atlaskit/profilecard": "^24.
|
|
95
|
+
"@atlaskit/profilecard": "^24.44.0",
|
|
96
96
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
97
97
|
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
98
98
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|