@atlaskit/renderer 124.9.4 → 124.9.6
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 +17 -0
- package/dist/cjs/ui/MediaCard.js +68 -46
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1 -3
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/element/mark.js +1 -1
- package/dist/es2019/ui/MediaCard.js +31 -8
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -3
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/element/mark.js +1 -1
- package/dist/esm/ui/MediaCard.js +68 -46
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +1 -3
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/element/mark.js +1 -1
- package/dist/types/analytics/events.d.ts +5 -1
- package/dist/types/ui/MediaCard.d.ts +3 -0
- package/dist/types-ts4.5/analytics/events.d.ts +5 -1
- package/dist/types-ts4.5/ui/MediaCard.d.ts +3 -0
- package/package.json +9 -12
- package/afm-townsquare/tsconfig.json +0 -141
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.9.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`903955a44b4e0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/903955a44b4e0) -
|
|
8
|
+
FG cleanup smartcard_avatar_margin_fix
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 124.9.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`5643e8f693872`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5643e8f693872) -
|
|
16
|
+
[ux] Add tests for smart links and smart link list view using new logo design, behind feature gate
|
|
17
|
+
navx-1895-new-logo-design
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 124.9.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -21,6 +21,9 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
21
21
|
var _mediaCard = require("@atlaskit/media-card");
|
|
22
22
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
23
23
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
24
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
|
+
var _analyticsContext = _interopRequireDefault(require("../analytics/analyticsContext"));
|
|
26
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
24
27
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
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; }
|
|
26
29
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -105,6 +108,19 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
105
108
|
return _ref.apply(this, arguments);
|
|
106
109
|
};
|
|
107
110
|
}());
|
|
111
|
+
(0, _defineProperty2.default)(_this, "onError", function (reason) {
|
|
112
|
+
var _this$props$fireAnaly, _this$props2;
|
|
113
|
+
(_this$props$fireAnaly = (_this$props2 = _this.props).fireAnalyticsEvent) === null || _this$props$fireAnaly === void 0 || _this$props$fireAnaly.call(_this$props2, {
|
|
114
|
+
action: _analytics.ACTION.ERRORED,
|
|
115
|
+
actionSubject: _analytics.ACTION_SUBJECT.RENDERER,
|
|
116
|
+
actionSubjectId: _analytics.ACTION_SUBJECT_ID.MEDIA,
|
|
117
|
+
eventType: _analytics.EVENT_TYPE.UI,
|
|
118
|
+
attributes: {
|
|
119
|
+
reason: reason,
|
|
120
|
+
external: false
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
108
124
|
(0, _defineProperty2.default)(_this, "renderLoadingCard", function () {
|
|
109
125
|
var cardDimensions = _this.props.cardDimensions;
|
|
110
126
|
return /*#__PURE__*/_react.default.createElement(_mediaCard.CardLoading, {
|
|
@@ -138,11 +154,11 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
138
154
|
key: "componentDidMount",
|
|
139
155
|
value: function () {
|
|
140
156
|
var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
141
|
-
var _this$
|
|
157
|
+
var _this$props3, rendererContext, contextIdentifierProvider, id, url, collectionName, nodeIsInCache;
|
|
142
158
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
143
159
|
while (1) switch (_context2.prev = _context2.next) {
|
|
144
160
|
case 0:
|
|
145
|
-
_this$
|
|
161
|
+
_this$props3 = this.props, rendererContext = _this$props3.rendererContext, contextIdentifierProvider = _this$props3.contextIdentifierProvider, id = _this$props3.id, url = _this$props3.url, collectionName = _this$props3.collection;
|
|
146
162
|
if (!contextIdentifierProvider) {
|
|
147
163
|
_context2.next = 8;
|
|
148
164
|
break;
|
|
@@ -194,9 +210,9 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
194
210
|
}, {
|
|
195
211
|
key: "componentWillUnmount",
|
|
196
212
|
value: function componentWillUnmount() {
|
|
197
|
-
var _this$
|
|
198
|
-
id = _this$
|
|
199
|
-
dataURI = _this$
|
|
213
|
+
var _this$props4 = this.props,
|
|
214
|
+
id = _this$props4.id,
|
|
215
|
+
dataURI = _this$props4.url;
|
|
200
216
|
if (id) {
|
|
201
217
|
mediaIdentifierMap.delete(id);
|
|
202
218
|
} else if (dataURI) {
|
|
@@ -206,20 +222,20 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
206
222
|
}, {
|
|
207
223
|
key: "renderExternal",
|
|
208
224
|
value: function renderExternal(shouldOpenMediaViewer) {
|
|
209
|
-
var _this$
|
|
210
|
-
cardDimensions = _this$
|
|
211
|
-
resizeMode = _this$
|
|
212
|
-
appearance = _this$
|
|
213
|
-
url = _this$
|
|
214
|
-
imageStatus = _this$
|
|
215
|
-
disableOverlay = _this$
|
|
216
|
-
alt = _this$
|
|
217
|
-
featureFlags = _this$
|
|
218
|
-
ssr = _this$
|
|
219
|
-
mediaClient = _this$
|
|
220
|
-
dataAttributes = _this$
|
|
221
|
-
enableSyncMediaCard = _this$
|
|
222
|
-
localId = _this$
|
|
225
|
+
var _this$props5 = this.props,
|
|
226
|
+
cardDimensions = _this$props5.cardDimensions,
|
|
227
|
+
resizeMode = _this$props5.resizeMode,
|
|
228
|
+
appearance = _this$props5.appearance,
|
|
229
|
+
url = _this$props5.url,
|
|
230
|
+
imageStatus = _this$props5.imageStatus,
|
|
231
|
+
disableOverlay = _this$props5.disableOverlay,
|
|
232
|
+
alt = _this$props5.alt,
|
|
233
|
+
featureFlags = _this$props5.featureFlags,
|
|
234
|
+
ssr = _this$props5.ssr,
|
|
235
|
+
mediaClient = _this$props5.mediaClient,
|
|
236
|
+
dataAttributes = _this$props5.dataAttributes,
|
|
237
|
+
enableSyncMediaCard = _this$props5.enableSyncMediaCard,
|
|
238
|
+
localId = _this$props5.localId;
|
|
223
239
|
if (imageStatus === 'loading' || !url) {
|
|
224
240
|
return this.renderLoadingCard();
|
|
225
241
|
}
|
|
@@ -256,7 +272,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
256
272
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
257
273
|
featureFlags: featureFlags,
|
|
258
274
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
259
|
-
shouldHideTooltip: false
|
|
275
|
+
shouldHideTooltip: false,
|
|
276
|
+
onError: (0, _expValEquals.expValEquals)('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
260
277
|
}))
|
|
261
278
|
);
|
|
262
279
|
}
|
|
@@ -266,25 +283,25 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
266
283
|
var _this$state = this.state,
|
|
267
284
|
contextIdentifierProvider = _this$state.contextIdentifierProvider,
|
|
268
285
|
fileState = _this$state.fileState;
|
|
269
|
-
var _this$
|
|
270
|
-
id = _this$
|
|
271
|
-
alt = _this$
|
|
272
|
-
type = _this$
|
|
273
|
-
collection = _this$
|
|
274
|
-
occurrenceKey = _this$
|
|
275
|
-
cardDimensions = _this$
|
|
276
|
-
resizeMode = _this$
|
|
277
|
-
disableOverlay = _this$
|
|
278
|
-
useInlinePlayer = _this$
|
|
279
|
-
originalDimensions = _this$
|
|
280
|
-
forceOpenMediaViewer = _this$
|
|
281
|
-
featureFlags = _this$
|
|
282
|
-
shouldEnableDownloadButton = _this$
|
|
283
|
-
ssr = _this$
|
|
284
|
-
mediaClient = _this$
|
|
285
|
-
dataAttributes = _this$
|
|
286
|
-
enableSyncMediaCard = _this$
|
|
287
|
-
localId = _this$
|
|
286
|
+
var _this$props6 = this.props,
|
|
287
|
+
id = _this$props6.id,
|
|
288
|
+
alt = _this$props6.alt,
|
|
289
|
+
type = _this$props6.type,
|
|
290
|
+
collection = _this$props6.collection,
|
|
291
|
+
occurrenceKey = _this$props6.occurrenceKey,
|
|
292
|
+
cardDimensions = _this$props6.cardDimensions,
|
|
293
|
+
resizeMode = _this$props6.resizeMode,
|
|
294
|
+
disableOverlay = _this$props6.disableOverlay,
|
|
295
|
+
useInlinePlayer = _this$props6.useInlinePlayer,
|
|
296
|
+
originalDimensions = _this$props6.originalDimensions,
|
|
297
|
+
forceOpenMediaViewer = _this$props6.shouldOpenMediaViewer,
|
|
298
|
+
featureFlags = _this$props6.featureFlags,
|
|
299
|
+
shouldEnableDownloadButton = _this$props6.shouldEnableDownloadButton,
|
|
300
|
+
ssr = _this$props6.ssr,
|
|
301
|
+
mediaClient = _this$props6.mediaClient,
|
|
302
|
+
dataAttributes = _this$props6.dataAttributes,
|
|
303
|
+
enableSyncMediaCard = _this$props6.enableSyncMediaCard,
|
|
304
|
+
localId = _this$props6.localId;
|
|
288
305
|
var isMobile = false;
|
|
289
306
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
290
307
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -339,7 +356,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
339
356
|
featureFlags: featureFlags,
|
|
340
357
|
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
341
358
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
342
|
-
shouldHideTooltip: isMobile
|
|
359
|
+
shouldHideTooltip: isMobile,
|
|
360
|
+
onError: (0, _expValEquals.expValEquals)('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
343
361
|
}));
|
|
344
362
|
}
|
|
345
363
|
}]);
|
|
@@ -379,11 +397,15 @@ var getClipboardAttrs = exports.getClipboardAttrs = function getClipboardAttrs(_
|
|
|
379
397
|
};
|
|
380
398
|
var MediaCardInternal = exports.MediaCardInternal = function MediaCardInternal(props) {
|
|
381
399
|
var mediaClient = (0, _react.useContext)(_mediaClientReact.MediaClientContext);
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
400
|
+
return /*#__PURE__*/_react.default.createElement(_analyticsContext.default.Consumer, null, function (_ref3) {
|
|
401
|
+
var fireAnalyticsEvent = _ref3.fireAnalyticsEvent;
|
|
402
|
+
return /*#__PURE__*/_react.default.createElement(MediaCardView
|
|
403
|
+
// Ignored via go/ees005
|
|
404
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
405
|
+
, (0, _extends2.default)({}, props, {
|
|
406
|
+
mediaClient: mediaClient,
|
|
407
|
+
fireAnalyticsEvent: fireAnalyticsEvent
|
|
408
|
+
}));
|
|
409
|
+
});
|
|
388
410
|
};
|
|
389
411
|
var MediaCard = exports.MediaCard = (0, _utils.withImageLoader)(MediaCardInternal);
|
|
@@ -863,8 +863,6 @@ var smartCardStylesAvatarFix = (0, _react.css)((0, _defineProperty2.default)({},
|
|
|
863
863
|
}
|
|
864
864
|
/* EDM-11991: Fix list plugin add padding to ADS AvatarGroup end */
|
|
865
865
|
}));
|
|
866
|
-
|
|
867
|
-
// fg smartcard_avatar_margin_fix
|
|
868
866
|
var smartCardStylesAvatarMarginFix = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
|
|
869
867
|
'ul, ol': {
|
|
870
868
|
marginRight: 'inherit'
|
|
@@ -1612,7 +1610,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1612
1610
|
},
|
|
1613
1611
|
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, !(0, _platformFeatureFlags.fg)('aifc_create_enabled') && telepointerStyles, (0, _platformFeatureFlags.fg)('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, (0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true) &&
|
|
1614
1612
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1615
|
-
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles,
|
|
1613
|
+
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1616
1614
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1617
1615
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && (0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1618
1616
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
@@ -68,7 +68,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
68
68
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
69
69
|
var TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
70
70
|
var packageName = "@atlaskit/renderer";
|
|
71
|
-
var packageVersion = "
|
|
71
|
+
var packageVersion = "124.9.5";
|
|
72
72
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
73
73
|
containerName: 'ak-renderer-wrapper',
|
|
74
74
|
containerType: 'inline-size'
|
|
@@ -215,7 +215,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
215
215
|
ref: id === currentSelectedAnnotationId ? markRef : undefined,
|
|
216
216
|
id: id
|
|
217
217
|
}, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
218
|
-
css: [markStyles,
|
|
218
|
+
css: [markStyles, markStylesLayeringFix, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, (0, _platformFeatureFlags.fg)('confluence-frontend-comments-panel') && markStylesWithCommentsPanel, !isMobile() && accessibilityStyles, markStylesWithUpdatedShadow],
|
|
219
219
|
style: {
|
|
220
220
|
'--ak-renderer-annotation-startmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
221
221
|
'--ak-renderer-annotation-endmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
@@ -6,6 +6,9 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
6
6
|
import { Card as CardAsync, CardSync, CardLoading, CardError } from '@atlaskit/media-card';
|
|
7
7
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
8
8
|
import { withImageLoader } from '@atlaskit/editor-common/utils';
|
|
9
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
|
+
import AnalyticsContext from '../analytics/analyticsContext';
|
|
11
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
9
12
|
export const mediaIdentifierMap = new Map();
|
|
10
13
|
export const getListOfIdentifiersFromDoc = doc => {
|
|
11
14
|
if (!doc) {
|
|
@@ -60,6 +63,19 @@ export class MediaCardView extends Component {
|
|
|
60
63
|
// do not set state on error
|
|
61
64
|
}
|
|
62
65
|
});
|
|
66
|
+
_defineProperty(this, "onError", reason => {
|
|
67
|
+
var _this$props$fireAnaly, _this$props;
|
|
68
|
+
(_this$props$fireAnaly = (_this$props = this.props).fireAnalyticsEvent) === null || _this$props$fireAnaly === void 0 ? void 0 : _this$props$fireAnaly.call(_this$props, {
|
|
69
|
+
action: ACTION.ERRORED,
|
|
70
|
+
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
71
|
+
actionSubjectId: ACTION_SUBJECT_ID.MEDIA,
|
|
72
|
+
eventType: EVENT_TYPE.UI,
|
|
73
|
+
attributes: {
|
|
74
|
+
reason,
|
|
75
|
+
external: false
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
63
79
|
_defineProperty(this, "renderLoadingCard", () => {
|
|
64
80
|
const {
|
|
65
81
|
cardDimensions
|
|
@@ -192,7 +208,8 @@ export class MediaCardView extends Component {
|
|
|
192
208
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
193
209
|
featureFlags: featureFlags,
|
|
194
210
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
195
|
-
shouldHideTooltip: false
|
|
211
|
+
shouldHideTooltip: false,
|
|
212
|
+
onError: expValEquals('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
196
213
|
}))
|
|
197
214
|
);
|
|
198
215
|
}
|
|
@@ -275,7 +292,8 @@ export class MediaCardView extends Component {
|
|
|
275
292
|
featureFlags: featureFlags,
|
|
276
293
|
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
277
294
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
278
|
-
shouldHideTooltip: isMobile
|
|
295
|
+
shouldHideTooltip: isMobile,
|
|
296
|
+
onError: expValEquals('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
279
297
|
}));
|
|
280
298
|
}
|
|
281
299
|
}
|
|
@@ -315,11 +333,16 @@ export const getClipboardAttrs = ({
|
|
|
315
333
|
};
|
|
316
334
|
export const MediaCardInternal = props => {
|
|
317
335
|
const mediaClient = useContext(MediaClientContext);
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
336
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, ({
|
|
337
|
+
fireAnalyticsEvent
|
|
338
|
+
}) => {
|
|
339
|
+
return /*#__PURE__*/React.createElement(MediaCardView
|
|
340
|
+
// Ignored via go/ees005
|
|
341
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
342
|
+
, _extends({}, props, {
|
|
343
|
+
mediaClient: mediaClient,
|
|
344
|
+
fireAnalyticsEvent: fireAnalyticsEvent
|
|
345
|
+
}));
|
|
346
|
+
});
|
|
324
347
|
};
|
|
325
348
|
export const MediaCard = withImageLoader(MediaCardInternal);
|
|
@@ -998,8 +998,6 @@ const smartCardStylesAvatarFix = css({
|
|
|
998
998
|
/* EDM-11991: Fix list plugin add padding to ADS AvatarGroup end */
|
|
999
999
|
}
|
|
1000
1000
|
});
|
|
1001
|
-
|
|
1002
|
-
// fg smartcard_avatar_margin_fix
|
|
1003
1001
|
const smartCardStylesAvatarMarginFix = css({
|
|
1004
1002
|
[`.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER}`]: {
|
|
1005
1003
|
'ul, ol': {
|
|
@@ -2029,7 +2027,7 @@ export const RendererStyleContainer = props => {
|
|
|
2029
2027
|
},
|
|
2030
2028
|
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') && extensionStyle, fg('platform_editor_typography_ugc') ? expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
|
|
2031
2029
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2032
|
-
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles,
|
|
2030
|
+
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
2033
2031
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2034
2032
|
fg('editor_inline_comments_on_inline_nodes') && fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
2035
2033
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
@@ -54,7 +54,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
54
54
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
55
55
|
const TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
56
56
|
const packageName = "@atlaskit/renderer";
|
|
57
|
-
const packageVersion = "
|
|
57
|
+
const packageVersion = "124.9.5";
|
|
58
58
|
const setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size'
|
|
@@ -227,7 +227,7 @@ export const MarkComponent = ({
|
|
|
227
227
|
...accessibility,
|
|
228
228
|
...overriddenData,
|
|
229
229
|
...(!useBlockLevel && {
|
|
230
|
-
css: [markStyles,
|
|
230
|
+
css: [markStyles, markStylesLayeringFix, fg('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, fg('confluence-frontend-comments-panel') && markStylesWithCommentsPanel, !isMobile() && accessibilityStyles, markStylesWithUpdatedShadow],
|
|
231
231
|
style: {
|
|
232
232
|
'--ak-renderer-annotation-startmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
233
233
|
'--ak-renderer-annotation-endmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -17,6 +17,9 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
17
17
|
import { Card as CardAsync, CardSync, CardLoading, CardError } from '@atlaskit/media-card';
|
|
18
18
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
19
19
|
import { withImageLoader } from '@atlaskit/editor-common/utils';
|
|
20
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
|
+
import AnalyticsContext from '../analytics/analyticsContext';
|
|
22
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
20
23
|
export var mediaIdentifierMap = new Map();
|
|
21
24
|
export var getListOfIdentifiersFromDoc = function getListOfIdentifiersFromDoc(doc) {
|
|
22
25
|
if (!doc) {
|
|
@@ -96,6 +99,19 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
96
99
|
return _ref.apply(this, arguments);
|
|
97
100
|
};
|
|
98
101
|
}());
|
|
102
|
+
_defineProperty(_this, "onError", function (reason) {
|
|
103
|
+
var _this$props$fireAnaly, _this$props2;
|
|
104
|
+
(_this$props$fireAnaly = (_this$props2 = _this.props).fireAnalyticsEvent) === null || _this$props$fireAnaly === void 0 || _this$props$fireAnaly.call(_this$props2, {
|
|
105
|
+
action: ACTION.ERRORED,
|
|
106
|
+
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
107
|
+
actionSubjectId: ACTION_SUBJECT_ID.MEDIA,
|
|
108
|
+
eventType: EVENT_TYPE.UI,
|
|
109
|
+
attributes: {
|
|
110
|
+
reason: reason,
|
|
111
|
+
external: false
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
99
115
|
_defineProperty(_this, "renderLoadingCard", function () {
|
|
100
116
|
var cardDimensions = _this.props.cardDimensions;
|
|
101
117
|
return /*#__PURE__*/React.createElement(CardLoading, {
|
|
@@ -129,11 +145,11 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
129
145
|
key: "componentDidMount",
|
|
130
146
|
value: function () {
|
|
131
147
|
var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
132
|
-
var _this$
|
|
148
|
+
var _this$props3, rendererContext, contextIdentifierProvider, id, url, collectionName, nodeIsInCache;
|
|
133
149
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
134
150
|
while (1) switch (_context2.prev = _context2.next) {
|
|
135
151
|
case 0:
|
|
136
|
-
_this$
|
|
152
|
+
_this$props3 = this.props, rendererContext = _this$props3.rendererContext, contextIdentifierProvider = _this$props3.contextIdentifierProvider, id = _this$props3.id, url = _this$props3.url, collectionName = _this$props3.collection;
|
|
137
153
|
if (!contextIdentifierProvider) {
|
|
138
154
|
_context2.next = 8;
|
|
139
155
|
break;
|
|
@@ -185,9 +201,9 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
185
201
|
}, {
|
|
186
202
|
key: "componentWillUnmount",
|
|
187
203
|
value: function componentWillUnmount() {
|
|
188
|
-
var _this$
|
|
189
|
-
id = _this$
|
|
190
|
-
dataURI = _this$
|
|
204
|
+
var _this$props4 = this.props,
|
|
205
|
+
id = _this$props4.id,
|
|
206
|
+
dataURI = _this$props4.url;
|
|
191
207
|
if (id) {
|
|
192
208
|
mediaIdentifierMap.delete(id);
|
|
193
209
|
} else if (dataURI) {
|
|
@@ -197,20 +213,20 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
197
213
|
}, {
|
|
198
214
|
key: "renderExternal",
|
|
199
215
|
value: function renderExternal(shouldOpenMediaViewer) {
|
|
200
|
-
var _this$
|
|
201
|
-
cardDimensions = _this$
|
|
202
|
-
resizeMode = _this$
|
|
203
|
-
appearance = _this$
|
|
204
|
-
url = _this$
|
|
205
|
-
imageStatus = _this$
|
|
206
|
-
disableOverlay = _this$
|
|
207
|
-
alt = _this$
|
|
208
|
-
featureFlags = _this$
|
|
209
|
-
ssr = _this$
|
|
210
|
-
mediaClient = _this$
|
|
211
|
-
dataAttributes = _this$
|
|
212
|
-
enableSyncMediaCard = _this$
|
|
213
|
-
localId = _this$
|
|
216
|
+
var _this$props5 = this.props,
|
|
217
|
+
cardDimensions = _this$props5.cardDimensions,
|
|
218
|
+
resizeMode = _this$props5.resizeMode,
|
|
219
|
+
appearance = _this$props5.appearance,
|
|
220
|
+
url = _this$props5.url,
|
|
221
|
+
imageStatus = _this$props5.imageStatus,
|
|
222
|
+
disableOverlay = _this$props5.disableOverlay,
|
|
223
|
+
alt = _this$props5.alt,
|
|
224
|
+
featureFlags = _this$props5.featureFlags,
|
|
225
|
+
ssr = _this$props5.ssr,
|
|
226
|
+
mediaClient = _this$props5.mediaClient,
|
|
227
|
+
dataAttributes = _this$props5.dataAttributes,
|
|
228
|
+
enableSyncMediaCard = _this$props5.enableSyncMediaCard,
|
|
229
|
+
localId = _this$props5.localId;
|
|
214
230
|
if (imageStatus === 'loading' || !url) {
|
|
215
231
|
return this.renderLoadingCard();
|
|
216
232
|
}
|
|
@@ -247,7 +263,8 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
247
263
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
248
264
|
featureFlags: featureFlags,
|
|
249
265
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
250
|
-
shouldHideTooltip: false
|
|
266
|
+
shouldHideTooltip: false,
|
|
267
|
+
onError: expValEquals('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
251
268
|
}))
|
|
252
269
|
);
|
|
253
270
|
}
|
|
@@ -257,25 +274,25 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
257
274
|
var _this$state = this.state,
|
|
258
275
|
contextIdentifierProvider = _this$state.contextIdentifierProvider,
|
|
259
276
|
fileState = _this$state.fileState;
|
|
260
|
-
var _this$
|
|
261
|
-
id = _this$
|
|
262
|
-
alt = _this$
|
|
263
|
-
type = _this$
|
|
264
|
-
collection = _this$
|
|
265
|
-
occurrenceKey = _this$
|
|
266
|
-
cardDimensions = _this$
|
|
267
|
-
resizeMode = _this$
|
|
268
|
-
disableOverlay = _this$
|
|
269
|
-
useInlinePlayer = _this$
|
|
270
|
-
originalDimensions = _this$
|
|
271
|
-
forceOpenMediaViewer = _this$
|
|
272
|
-
featureFlags = _this$
|
|
273
|
-
shouldEnableDownloadButton = _this$
|
|
274
|
-
ssr = _this$
|
|
275
|
-
mediaClient = _this$
|
|
276
|
-
dataAttributes = _this$
|
|
277
|
-
enableSyncMediaCard = _this$
|
|
278
|
-
localId = _this$
|
|
277
|
+
var _this$props6 = this.props,
|
|
278
|
+
id = _this$props6.id,
|
|
279
|
+
alt = _this$props6.alt,
|
|
280
|
+
type = _this$props6.type,
|
|
281
|
+
collection = _this$props6.collection,
|
|
282
|
+
occurrenceKey = _this$props6.occurrenceKey,
|
|
283
|
+
cardDimensions = _this$props6.cardDimensions,
|
|
284
|
+
resizeMode = _this$props6.resizeMode,
|
|
285
|
+
disableOverlay = _this$props6.disableOverlay,
|
|
286
|
+
useInlinePlayer = _this$props6.useInlinePlayer,
|
|
287
|
+
originalDimensions = _this$props6.originalDimensions,
|
|
288
|
+
forceOpenMediaViewer = _this$props6.shouldOpenMediaViewer,
|
|
289
|
+
featureFlags = _this$props6.featureFlags,
|
|
290
|
+
shouldEnableDownloadButton = _this$props6.shouldEnableDownloadButton,
|
|
291
|
+
ssr = _this$props6.ssr,
|
|
292
|
+
mediaClient = _this$props6.mediaClient,
|
|
293
|
+
dataAttributes = _this$props6.dataAttributes,
|
|
294
|
+
enableSyncMediaCard = _this$props6.enableSyncMediaCard,
|
|
295
|
+
localId = _this$props6.localId;
|
|
279
296
|
var isMobile = false;
|
|
280
297
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
281
298
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -330,7 +347,8 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
330
347
|
featureFlags: featureFlags,
|
|
331
348
|
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
332
349
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
333
|
-
shouldHideTooltip: isMobile
|
|
350
|
+
shouldHideTooltip: isMobile,
|
|
351
|
+
onError: expValEquals('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
334
352
|
}));
|
|
335
353
|
}
|
|
336
354
|
}]);
|
|
@@ -370,11 +388,15 @@ export var getClipboardAttrs = function getClipboardAttrs(_ref2) {
|
|
|
370
388
|
};
|
|
371
389
|
export var MediaCardInternal = function MediaCardInternal(props) {
|
|
372
390
|
var mediaClient = useContext(MediaClientContext);
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
391
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, function (_ref3) {
|
|
392
|
+
var fireAnalyticsEvent = _ref3.fireAnalyticsEvent;
|
|
393
|
+
return /*#__PURE__*/React.createElement(MediaCardView
|
|
394
|
+
// Ignored via go/ees005
|
|
395
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
396
|
+
, _extends({}, props, {
|
|
397
|
+
mediaClient: mediaClient,
|
|
398
|
+
fireAnalyticsEvent: fireAnalyticsEvent
|
|
399
|
+
}));
|
|
400
|
+
});
|
|
379
401
|
};
|
|
380
402
|
export var MediaCard = withImageLoader(MediaCardInternal);
|
|
@@ -856,8 +856,6 @@ var smartCardStylesAvatarFix = css(_defineProperty({}, ".".concat(SmartCardShare
|
|
|
856
856
|
}
|
|
857
857
|
/* EDM-11991: Fix list plugin add padding to ADS AvatarGroup end */
|
|
858
858
|
}));
|
|
859
|
-
|
|
860
|
-
// fg smartcard_avatar_margin_fix
|
|
861
859
|
var smartCardStylesAvatarMarginFix = css(_defineProperty({}, ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
|
|
862
860
|
'ul, ol': {
|
|
863
861
|
marginRight: 'inherit'
|
|
@@ -1605,7 +1603,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1605
1603
|
},
|
|
1606
1604
|
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') && extensionStyle, fg('platform_editor_typography_ugc') ? expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
|
|
1607
1605
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
1608
|
-
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles,
|
|
1606
|
+
textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1609
1607
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
1610
1608
|
fg('editor_inline_comments_on_inline_nodes') && fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
|
|
1611
1609
|
// merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
|
|
@@ -59,7 +59,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
59
59
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
60
60
|
var TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
61
61
|
var packageName = "@atlaskit/renderer";
|
|
62
|
-
var packageVersion = "
|
|
62
|
+
var packageVersion = "124.9.5";
|
|
63
63
|
var setAsQueryContainerStyles = css({
|
|
64
64
|
containerName: 'ak-renderer-wrapper',
|
|
65
65
|
containerType: 'inline-size'
|
|
@@ -211,7 +211,7 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
211
211
|
ref: id === currentSelectedAnnotationId ? markRef : undefined,
|
|
212
212
|
id: id
|
|
213
213
|
}, fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
214
|
-
css: [markStyles,
|
|
214
|
+
css: [markStyles, markStylesLayeringFix, fg('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, fg('confluence-frontend-comments-panel') && markStylesWithCommentsPanel, !isMobile() && accessibilityStyles, markStylesWithUpdatedShadow],
|
|
215
215
|
style: {
|
|
216
216
|
'--ak-renderer-annotation-startmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
217
217
|
'--ak-renderer-annotation-endmarker': intl.formatMessage(inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
@@ -128,6 +128,10 @@ declare enum RESOLVE_METHOD {
|
|
|
128
128
|
type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
129
129
|
type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
130
130
|
type NestedTableTransformedAEP = OperationalAEP<ACTION.NESTED_TABLE_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined>;
|
|
131
|
-
export type
|
|
131
|
+
export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID.MEDIA, {
|
|
132
|
+
external?: boolean;
|
|
133
|
+
reason: string;
|
|
134
|
+
}>;
|
|
135
|
+
export type AnalyticsEventPayload<T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
132
136
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
133
137
|
export {};
|
|
@@ -10,6 +10,7 @@ import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
|
10
10
|
import type { RendererAppearance } from './Renderer/types';
|
|
11
11
|
import type { RendererContext } from '../react/types';
|
|
12
12
|
import type { MediaSSR } from '../types/mediaOptions';
|
|
13
|
+
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
13
14
|
export type MediaProvider = {
|
|
14
15
|
viewMediaClientConfig: MediaClientConfig;
|
|
15
16
|
};
|
|
@@ -50,6 +51,7 @@ interface State {
|
|
|
50
51
|
export declare const mediaIdentifierMap: Map<string, Identifier>;
|
|
51
52
|
export declare const getListOfIdentifiersFromDoc: (doc?: ADFEntity) => Identifier[];
|
|
52
53
|
export declare class MediaCardView extends Component<MediaCardProps & {
|
|
54
|
+
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
53
55
|
mediaClient?: MediaClient;
|
|
54
56
|
}, State> {
|
|
55
57
|
state: State;
|
|
@@ -57,6 +59,7 @@ export declare class MediaCardView extends Component<MediaCardProps & {
|
|
|
57
59
|
componentDidUpdate(prevProps: MediaCardProps): void;
|
|
58
60
|
componentWillUnmount(): void;
|
|
59
61
|
saveFileState: (id: string) => Promise<void>;
|
|
62
|
+
private onError;
|
|
60
63
|
private renderLoadingCard;
|
|
61
64
|
private renderExternal;
|
|
62
65
|
/**
|
|
@@ -128,6 +128,10 @@ declare enum RESOLVE_METHOD {
|
|
|
128
128
|
type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
129
129
|
type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
130
130
|
type NestedTableTransformedAEP = OperationalAEP<ACTION.NESTED_TABLE_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined>;
|
|
131
|
-
export type
|
|
131
|
+
export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID.MEDIA, {
|
|
132
|
+
external?: boolean;
|
|
133
|
+
reason: string;
|
|
134
|
+
}>;
|
|
135
|
+
export type AnalyticsEventPayload<T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
132
136
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
133
137
|
export {};
|
|
@@ -10,6 +10,7 @@ import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
|
10
10
|
import type { RendererAppearance } from './Renderer/types';
|
|
11
11
|
import type { RendererContext } from '../react/types';
|
|
12
12
|
import type { MediaSSR } from '../types/mediaOptions';
|
|
13
|
+
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
13
14
|
export type MediaProvider = {
|
|
14
15
|
viewMediaClientConfig: MediaClientConfig;
|
|
15
16
|
};
|
|
@@ -50,6 +51,7 @@ interface State {
|
|
|
50
51
|
export declare const mediaIdentifierMap: Map<string, Identifier>;
|
|
51
52
|
export declare const getListOfIdentifiersFromDoc: (doc?: ADFEntity) => Identifier[];
|
|
52
53
|
export declare class MediaCardView extends Component<MediaCardProps & {
|
|
54
|
+
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
53
55
|
mediaClient?: MediaClient;
|
|
54
56
|
}, State> {
|
|
55
57
|
state: State;
|
|
@@ -57,6 +59,7 @@ export declare class MediaCardView extends Component<MediaCardProps & {
|
|
|
57
59
|
componentDidUpdate(prevProps: MediaCardProps): void;
|
|
58
60
|
componentWillUnmount(): void;
|
|
59
61
|
saveFileState: (id: string) => Promise<void>;
|
|
62
|
+
private onError;
|
|
60
63
|
private renderLoadingCard;
|
|
61
64
|
private renderExternal;
|
|
62
65
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.9.
|
|
3
|
+
"version": "124.9.6",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@atlaskit/media-viewer": "^52.4.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
55
|
-
"@atlaskit/react-ufo": "^4.
|
|
56
|
-
"@atlaskit/smart-card": "^43.
|
|
55
|
+
"@atlaskit/react-ufo": "^4.14.0",
|
|
56
|
+
"@atlaskit/smart-card": "^43.5.0",
|
|
57
57
|
"@atlaskit/status": "^3.0.0",
|
|
58
58
|
"@atlaskit/task-decision": "^19.2.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^13.23.0",
|
|
61
61
|
"@atlaskit/tokens": "^7.0.0",
|
|
62
|
-
"@atlaskit/tooltip": "^20.
|
|
62
|
+
"@atlaskit/tooltip": "^20.7.0",
|
|
63
63
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"uuid": "^3.1.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^110.
|
|
74
|
+
"@atlaskit/editor-common": "^110.20.0",
|
|
75
75
|
"@atlaskit/link-provider": "^4.0.0",
|
|
76
76
|
"@atlaskit/media-core": "^37.0.0",
|
|
77
77
|
"react": "^18.2.0",
|
|
@@ -188,9 +188,6 @@
|
|
|
188
188
|
"platform_renderer_isPresentational": {
|
|
189
189
|
"type": "boolean"
|
|
190
190
|
},
|
|
191
|
-
"platform_renderer_nested_annotation_styling": {
|
|
192
|
-
"type": "boolean"
|
|
193
|
-
},
|
|
194
191
|
"platform_renderer_triple_click_selects_paragraph": {
|
|
195
192
|
"type": "boolean"
|
|
196
193
|
},
|
|
@@ -206,9 +203,6 @@
|
|
|
206
203
|
"platform_editor_bordered_panel_nested_in_table": {
|
|
207
204
|
"type": "boolean"
|
|
208
205
|
},
|
|
209
|
-
"smartcard_avatar_margin_fix": {
|
|
210
|
-
"type": "boolean"
|
|
211
|
-
},
|
|
212
206
|
"platform_editor_nested_table_extension_comment_fix": {
|
|
213
207
|
"type": "boolean"
|
|
214
208
|
},
|
|
@@ -248,6 +242,9 @@
|
|
|
248
242
|
"hot-121622_lazy_load_expand_content": {
|
|
249
243
|
"type": "boolean"
|
|
250
244
|
},
|
|
245
|
+
"navx-1895-new-logo-design": {
|
|
246
|
+
"type": "boolean"
|
|
247
|
+
},
|
|
251
248
|
"media-perf-uplift-mutation-fix": {
|
|
252
249
|
"type": "boolean"
|
|
253
250
|
}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../../tsconfig.entry-points.townsquare.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"target": "es5",
|
|
6
|
-
"outDir": "../../../../../townsquare/tsDist/@atlaskit__renderer/app",
|
|
7
|
-
"rootDir": "../",
|
|
8
|
-
"composite": true
|
|
9
|
-
},
|
|
10
|
-
"include": [
|
|
11
|
-
"../src/**/*.ts",
|
|
12
|
-
"../src/**/*.tsx"
|
|
13
|
-
],
|
|
14
|
-
"exclude": [
|
|
15
|
-
"../src/**/__tests__/*",
|
|
16
|
-
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*",
|
|
18
|
-
"../src/**/examples.*",
|
|
19
|
-
"../src/**/examples/*",
|
|
20
|
-
"../src/**/examples/**/*",
|
|
21
|
-
"../src/**/*.stories.*",
|
|
22
|
-
"../src/**/stories/*",
|
|
23
|
-
"../src/**/stories/**/*"
|
|
24
|
-
],
|
|
25
|
-
"references": [
|
|
26
|
-
{
|
|
27
|
-
"path": "../../adf-utils/afm-townsquare/tsconfig.json"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "../../../analytics/analytics-listeners/afm-townsquare/tsconfig.json"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "../../../analytics/analytics-namespaced-context/afm-townsquare/tsconfig.json"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "../../../analytics/analytics-next/afm-townsquare/tsconfig.json"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"path": "../../../helpers/browser-apis/afm-townsquare/tsconfig.json"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"path": "../../../design-system/button/afm-townsquare/tsconfig.json"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "../../../design-system/code/afm-townsquare/tsconfig.json"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "../../editor-json-transformer/afm-townsquare/tsconfig.json"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "../../editor-palette/afm-townsquare/tsconfig.json"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "../../editor-shared-styles/afm-townsquare/tsconfig.json"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "../../editor-tables/afm-townsquare/tsconfig.json"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"path": "../../../elements/emoji/afm-townsquare/tsconfig.json"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"path": "../../../measurement/feature-gate-js-client/afm-townsquare/tsconfig.json"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"path": "../../../design-system/icon/afm-townsquare/tsconfig.json"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"path": "../../../design-system/link/afm-townsquare/tsconfig.json"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"path": "../../../linking-platform/link-datasource/afm-townsquare/tsconfig.json"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"path": "../../../linking-platform/link-extractors/afm-townsquare/tsconfig.json"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"path": "../../../media/media-card/afm-townsquare/tsconfig.json"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"path": "../../../media/media-client/afm-townsquare/tsconfig.json"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"path": "../../../media/media-client-react/afm-townsquare/tsconfig.json"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"path": "../../../media/media-common/afm-townsquare/tsconfig.json"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"path": "../../../media/media-filmstrip/afm-townsquare/tsconfig.json"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"path": "../../../media/media-ui/afm-townsquare/tsconfig.json"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"path": "../../../media/media-viewer/afm-townsquare/tsconfig.json"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"path": "../../../platform/feature-flags/afm-townsquare/tsconfig.json"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"path": "../../../platform/feature-flags-react/afm-townsquare/tsconfig.json"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"path": "../../../react-ufo/atlaskit/afm-townsquare/tsconfig.json"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"path": "../../../linking-platform/smart-card/afm-townsquare/tsconfig.json"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"path": "../../../elements/status/afm-townsquare/tsconfig.json"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"path": "../../../elements/task-decision/afm-townsquare/tsconfig.json"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"path": "../../../design-system/theme/afm-townsquare/tsconfig.json"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"path": "../../tmp-editor-statsig/afm-townsquare/tsconfig.json"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"path": "../../../design-system/tokens/afm-townsquare/tsconfig.json"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"path": "../../../design-system/tooltip/afm-townsquare/tsconfig.json"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"path": "../../../design-system/visually-hidden/afm-townsquare/tsconfig.json"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"path": "../../editor-common/afm-townsquare/tsconfig.json"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"path": "../../../linking-platform/link-provider/afm-townsquare/tsconfig.json"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"path": "../../../media/media-core/afm-townsquare/tsconfig.json"
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
}
|