@atlaskit/renderer 109.4.1 → 109.4.2
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 +7 -0
- package/dist/cjs/react/nodes/mediaInline.js +12 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/mediaInline.js +13 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/mediaInline.js +12 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#71201](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71201) [`1b48cdd3c074`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1b48cdd3c074) - ED-21767 fixed dom structure for inline images.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 109.4.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -19,6 +19,10 @@ var _mediaUi = require("@atlaskit/media-ui");
|
|
|
19
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
20
|
var _reactIntlNext = require("react-intl-next");
|
|
21
21
|
var _MediaCard = require("../../ui/MediaCard");
|
|
22
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
23
|
+
var _ErrorBoundary = require("../../ui/Renderer/ErrorBoundary");
|
|
24
|
+
var _enums = require("../../analytics/enums");
|
|
25
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
22
26
|
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); }
|
|
23
27
|
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; }
|
|
24
28
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -163,6 +167,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
163
167
|
collectionName: collection
|
|
164
168
|
};
|
|
165
169
|
var mediaClient = (0, _react.useContext)(_mediaClientReact.MediaClientContext);
|
|
170
|
+
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
171
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
166
172
|
if (fileType === 'image') {
|
|
167
173
|
var _borderMark$attrs$col, _borderMark$attrs$siz;
|
|
168
174
|
var borderMark = marks === null || marks === void 0 ? void 0 : marks.find(function (mark) {
|
|
@@ -170,7 +176,11 @@ var MediaInline = function MediaInline(props) {
|
|
|
170
176
|
});
|
|
171
177
|
var borderColor = (_borderMark$attrs$col = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color) !== null && _borderMark$attrs$col !== void 0 ? _borderMark$attrs$col : '';
|
|
172
178
|
var borderSize = (_borderMark$attrs$siz = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size) !== null && _borderMark$attrs$siz !== void 0 ? _borderMark$attrs$siz : 0;
|
|
173
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
|
|
180
|
+
component: _enums.ACTION_SUBJECT.RENDERER,
|
|
181
|
+
componentId: _analytics.ACTION_SUBJECT_ID.MEDIA_INLINE_IMAGE,
|
|
182
|
+
createAnalyticsEvent: createAnalyticsEvent
|
|
183
|
+
}, /*#__PURE__*/_react.default.createElement(_mediaInline.MediaInlineImageCard, {
|
|
174
184
|
mediaClient: mediaClient,
|
|
175
185
|
identifier: identifier,
|
|
176
186
|
alt: alt,
|
|
@@ -182,7 +192,7 @@ var MediaInline = function MediaInline(props) {
|
|
|
182
192
|
borderColor: borderColor
|
|
183
193
|
},
|
|
184
194
|
serializeDataAttrs: true
|
|
185
|
-
});
|
|
195
|
+
}));
|
|
186
196
|
}
|
|
187
197
|
return /*#__PURE__*/_react.default.createElement(RenderMediaInline, {
|
|
188
198
|
identifier: identifier,
|
|
@@ -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.4.
|
|
57
|
+
var packageVersion = "109.4.2";
|
|
58
58
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
59
59
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
60
60
|
var _super = _createSuper(Renderer);
|
|
@@ -7,6 +7,10 @@ import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
|
|
|
7
7
|
import React, { useCallback, useEffect, useState, useContext } from 'react';
|
|
8
8
|
import { injectIntl } from 'react-intl-next';
|
|
9
9
|
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
10
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
11
|
+
import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
12
|
+
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
13
|
+
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
10
14
|
export const RenderMediaInline = ({
|
|
11
15
|
rendererAppearance,
|
|
12
16
|
clipboardAttrs,
|
|
@@ -129,12 +133,19 @@ const MediaInline = props => {
|
|
|
129
133
|
collectionName: collection
|
|
130
134
|
};
|
|
131
135
|
const mediaClient = useContext(MediaClientContext);
|
|
136
|
+
const {
|
|
137
|
+
createAnalyticsEvent
|
|
138
|
+
} = useAnalyticsEvents();
|
|
132
139
|
if (fileType === 'image') {
|
|
133
140
|
var _borderMark$attrs$col, _borderMark$attrs$siz;
|
|
134
141
|
const borderMark = marks === null || marks === void 0 ? void 0 : marks.find(mark => (mark === null || mark === void 0 ? void 0 : mark.type.name) === 'border');
|
|
135
142
|
const borderColor = (_borderMark$attrs$col = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color) !== null && _borderMark$attrs$col !== void 0 ? _borderMark$attrs$col : '';
|
|
136
143
|
const borderSize = (_borderMark$attrs$siz = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size) !== null && _borderMark$attrs$siz !== void 0 ? _borderMark$attrs$siz : 0;
|
|
137
|
-
return /*#__PURE__*/React.createElement(
|
|
144
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
145
|
+
component: ACTION_SUBJECT.RENDERER,
|
|
146
|
+
componentId: ACTION_SUBJECT_ID.MEDIA_INLINE_IMAGE,
|
|
147
|
+
createAnalyticsEvent: createAnalyticsEvent
|
|
148
|
+
}, /*#__PURE__*/React.createElement(MediaInlineImageCard, {
|
|
138
149
|
mediaClient: mediaClient,
|
|
139
150
|
identifier: identifier,
|
|
140
151
|
alt: alt,
|
|
@@ -146,7 +157,7 @@ const MediaInline = props => {
|
|
|
146
157
|
borderColor
|
|
147
158
|
},
|
|
148
159
|
serializeDataAttrs: true
|
|
149
|
-
});
|
|
160
|
+
}));
|
|
150
161
|
}
|
|
151
162
|
return /*#__PURE__*/React.createElement(RenderMediaInline, {
|
|
152
163
|
identifier: identifier,
|
|
@@ -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.4.
|
|
38
|
+
const packageVersion = "109.4.2";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
|
@@ -13,6 +13,10 @@ import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
|
|
|
13
13
|
import React, { useCallback, useEffect, useState, useContext } from 'react';
|
|
14
14
|
import { injectIntl } from 'react-intl-next';
|
|
15
15
|
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
16
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
17
|
+
import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
18
|
+
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
19
|
+
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
16
20
|
export var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
17
21
|
var rendererAppearance = _ref.rendererAppearance,
|
|
18
22
|
clipboardAttrs = _ref.clipboardAttrs,
|
|
@@ -153,6 +157,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
153
157
|
collectionName: collection
|
|
154
158
|
};
|
|
155
159
|
var mediaClient = useContext(MediaClientContext);
|
|
160
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
161
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
156
162
|
if (fileType === 'image') {
|
|
157
163
|
var _borderMark$attrs$col, _borderMark$attrs$siz;
|
|
158
164
|
var borderMark = marks === null || marks === void 0 ? void 0 : marks.find(function (mark) {
|
|
@@ -160,7 +166,11 @@ var MediaInline = function MediaInline(props) {
|
|
|
160
166
|
});
|
|
161
167
|
var borderColor = (_borderMark$attrs$col = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color) !== null && _borderMark$attrs$col !== void 0 ? _borderMark$attrs$col : '';
|
|
162
168
|
var borderSize = (_borderMark$attrs$siz = borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size) !== null && _borderMark$attrs$siz !== void 0 ? _borderMark$attrs$siz : 0;
|
|
163
|
-
return /*#__PURE__*/React.createElement(
|
|
169
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
170
|
+
component: ACTION_SUBJECT.RENDERER,
|
|
171
|
+
componentId: ACTION_SUBJECT_ID.MEDIA_INLINE_IMAGE,
|
|
172
|
+
createAnalyticsEvent: createAnalyticsEvent
|
|
173
|
+
}, /*#__PURE__*/React.createElement(MediaInlineImageCard, {
|
|
164
174
|
mediaClient: mediaClient,
|
|
165
175
|
identifier: identifier,
|
|
166
176
|
alt: alt,
|
|
@@ -172,7 +182,7 @@ var MediaInline = function MediaInline(props) {
|
|
|
172
182
|
borderColor: borderColor
|
|
173
183
|
},
|
|
174
184
|
serializeDataAttrs: true
|
|
175
|
-
});
|
|
185
|
+
}));
|
|
176
186
|
}
|
|
177
187
|
return /*#__PURE__*/React.createElement(RenderMediaInline, {
|
|
178
188
|
identifier: identifier,
|
|
@@ -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.4.
|
|
48
|
+
var packageVersion = "109.4.2";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.4.
|
|
3
|
+
"version": "109.4.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
33
33
|
"@atlaskit/button": "^17.3.0",
|
|
34
34
|
"@atlaskit/code": "^15.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^77.
|
|
35
|
+
"@atlaskit/editor-common": "^77.4.0",
|
|
36
36
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
37
37
|
"@atlaskit/editor-palette": "1.5.2",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"@atlaskit/emoji": "^67.6.0",
|
|
41
41
|
"@atlaskit/icon": "^22.0.0",
|
|
42
42
|
"@atlaskit/link-datasource": "^1.22.0",
|
|
43
|
-
"@atlaskit/media-card": "^77.
|
|
43
|
+
"@atlaskit/media-card": "^77.9.0",
|
|
44
44
|
"@atlaskit/media-client": "^26.1.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
46
46
|
"@atlaskit/media-common": "^11.0.0",
|
|
47
47
|
"@atlaskit/media-filmstrip": "^47.0.0",
|
|
48
|
-
"@atlaskit/media-ui": "^25.
|
|
48
|
+
"@atlaskit/media-ui": "^25.1.0",
|
|
49
49
|
"@atlaskit/media-viewer": "^48.2.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
51
|
-
"@atlaskit/smart-card": "^26.
|
|
51
|
+
"@atlaskit/smart-card": "^26.47.0",
|
|
52
52
|
"@atlaskit/status": "^1.4.0",
|
|
53
53
|
"@atlaskit/task-decision": "^17.9.0",
|
|
54
54
|
"@atlaskit/theme": "^12.6.0",
|
|
55
|
-
"@atlaskit/tokens": "^1.
|
|
55
|
+
"@atlaskit/tokens": "^1.36.0",
|
|
56
56
|
"@atlaskit/tooltip": "^18.1.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"@emotion/react": "^11.7.1",
|