@atlaskit/renderer 124.9.3 → 124.9.5

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,22 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 124.9.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5643e8f693872`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5643e8f693872) -
8
+ [ux] Add tests for smart links and smart link list view using new logo design, behind feature gate
9
+ navx-1895-new-logo-design
10
+ - Updated dependencies
11
+
12
+ ## 124.9.4
13
+
14
+ ### Patch Changes
15
+
16
+ - [`6e739b8f7a7a7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e739b8f7a7a7) -
17
+ Only add compact mode styles to extensions if compact mode is turned on
18
+ - Updated dependencies
19
+
3
20
  ## 124.9.3
4
21
 
5
22
  ### Patch Changes
@@ -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$props2, rendererContext, contextIdentifierProvider, id, url, collectionName, nodeIsInCache;
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$props2 = this.props, rendererContext = _this$props2.rendererContext, contextIdentifierProvider = _this$props2.contextIdentifierProvider, id = _this$props2.id, url = _this$props2.url, collectionName = _this$props2.collection;
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$props3 = this.props,
198
- id = _this$props3.id,
199
- dataURI = _this$props3.url;
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$props4 = this.props,
210
- cardDimensions = _this$props4.cardDimensions,
211
- resizeMode = _this$props4.resizeMode,
212
- appearance = _this$props4.appearance,
213
- url = _this$props4.url,
214
- imageStatus = _this$props4.imageStatus,
215
- disableOverlay = _this$props4.disableOverlay,
216
- alt = _this$props4.alt,
217
- featureFlags = _this$props4.featureFlags,
218
- ssr = _this$props4.ssr,
219
- mediaClient = _this$props4.mediaClient,
220
- dataAttributes = _this$props4.dataAttributes,
221
- enableSyncMediaCard = _this$props4.enableSyncMediaCard,
222
- localId = _this$props4.localId;
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$props5 = this.props,
270
- id = _this$props5.id,
271
- alt = _this$props5.alt,
272
- type = _this$props5.type,
273
- collection = _this$props5.collection,
274
- occurrenceKey = _this$props5.occurrenceKey,
275
- cardDimensions = _this$props5.cardDimensions,
276
- resizeMode = _this$props5.resizeMode,
277
- disableOverlay = _this$props5.disableOverlay,
278
- useInlinePlayer = _this$props5.useInlinePlayer,
279
- originalDimensions = _this$props5.originalDimensions,
280
- forceOpenMediaViewer = _this$props5.shouldOpenMediaViewer,
281
- featureFlags = _this$props5.featureFlags,
282
- shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
283
- ssr = _this$props5.ssr,
284
- mediaClient = _this$props5.mediaClient,
285
- dataAttributes = _this$props5.dataAttributes,
286
- enableSyncMediaCard = _this$props5.enableSyncMediaCard,
287
- localId = _this$props5.localId;
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
- // Ignored via go/ees005
384
- // eslint-disable-next-line react/jsx-props-no-spreading
385
- return /*#__PURE__*/_react.default.createElement(MediaCardView, (0, _extends2.default)({}, props, {
386
- mediaClient: mediaClient
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);
@@ -1610,7 +1610,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
1610
1610
  '--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
1611
1611
  '--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
1612
1612
  },
1613
- 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, (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) &&
1613
+ 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
1614
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
1615
1615
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, (0, _platformFeatureFlags.fg)('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1616
1616
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -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
- // Ignored via go/ees005
320
- // eslint-disable-next-line react/jsx-props-no-spreading
321
- return /*#__PURE__*/React.createElement(MediaCardView, _extends({}, props, {
322
- mediaClient: mediaClient
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);
@@ -2027,7 +2027,7 @@ export const RendererStyleContainer = props => {
2027
2027
  '--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
2028
2028
  '--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
2029
2029
  },
2030
- 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, 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) &&
2030
+ 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
2031
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2032
2032
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
2033
2033
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -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$props2, rendererContext, contextIdentifierProvider, id, url, collectionName, nodeIsInCache;
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$props2 = this.props, rendererContext = _this$props2.rendererContext, contextIdentifierProvider = _this$props2.contextIdentifierProvider, id = _this$props2.id, url = _this$props2.url, collectionName = _this$props2.collection;
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$props3 = this.props,
189
- id = _this$props3.id,
190
- dataURI = _this$props3.url;
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$props4 = this.props,
201
- cardDimensions = _this$props4.cardDimensions,
202
- resizeMode = _this$props4.resizeMode,
203
- appearance = _this$props4.appearance,
204
- url = _this$props4.url,
205
- imageStatus = _this$props4.imageStatus,
206
- disableOverlay = _this$props4.disableOverlay,
207
- alt = _this$props4.alt,
208
- featureFlags = _this$props4.featureFlags,
209
- ssr = _this$props4.ssr,
210
- mediaClient = _this$props4.mediaClient,
211
- dataAttributes = _this$props4.dataAttributes,
212
- enableSyncMediaCard = _this$props4.enableSyncMediaCard,
213
- localId = _this$props4.localId;
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$props5 = this.props,
261
- id = _this$props5.id,
262
- alt = _this$props5.alt,
263
- type = _this$props5.type,
264
- collection = _this$props5.collection,
265
- occurrenceKey = _this$props5.occurrenceKey,
266
- cardDimensions = _this$props5.cardDimensions,
267
- resizeMode = _this$props5.resizeMode,
268
- disableOverlay = _this$props5.disableOverlay,
269
- useInlinePlayer = _this$props5.useInlinePlayer,
270
- originalDimensions = _this$props5.originalDimensions,
271
- forceOpenMediaViewer = _this$props5.shouldOpenMediaViewer,
272
- featureFlags = _this$props5.featureFlags,
273
- shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
274
- ssr = _this$props5.ssr,
275
- mediaClient = _this$props5.mediaClient,
276
- dataAttributes = _this$props5.dataAttributes,
277
- enableSyncMediaCard = _this$props5.enableSyncMediaCard,
278
- localId = _this$props5.localId;
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
- // Ignored via go/ees005
375
- // eslint-disable-next-line react/jsx-props-no-spreading
376
- return /*#__PURE__*/React.createElement(MediaCardView, _extends({}, props, {
377
- mediaClient: mediaClient
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);
@@ -1603,7 +1603,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
1603
1603
  '--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
1604
1604
  '--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
1605
1605
  },
1606
- 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, 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) &&
1606
+ 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
1607
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
1608
1608
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1609
1609
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -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 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;
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 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;
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",
3
+ "version": "124.9.5",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^11.1.0",
32
32
  "@atlaskit/browser-apis": "^0.0.1",
33
33
  "@atlaskit/button": "^23.5.0",
34
- "@atlaskit/code": "^17.2.0",
34
+ "@atlaskit/code": "^17.3.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.31.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
@@ -51,13 +51,13 @@
51
51
  "@atlaskit/media-ui": "^28.7.0",
52
52
  "@atlaskit/media-viewer": "^52.4.0",
53
53
  "@atlaskit/platform-feature-flags": "^1.1.0",
54
- "@atlaskit/platform-feature-flags-react": "^0.3.0",
54
+ "@atlaskit/platform-feature-flags-react": "^0.4.0",
55
55
  "@atlaskit/react-ufo": "^4.12.0",
56
56
  "@atlaskit/smart-card": "^43.4.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.19.0",
60
+ "@atlaskit/tmp-editor-statsig": "^13.20.0",
61
61
  "@atlaskit/tokens": "^7.0.0",
62
62
  "@atlaskit/tooltip": "^20.6.0",
63
63
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -248,6 +248,9 @@
248
248
  "hot-121622_lazy_load_expand_content": {
249
249
  "type": "boolean"
250
250
  },
251
+ "navx-1895-new-logo-design": {
252
+ "type": "boolean"
253
+ },
251
254
  "media-perf-uplift-mutation-fix": {
252
255
  "type": "boolean"
253
256
  }
@@ -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
- }