@atlaskit/media-card 79.3.4 → 79.3.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/card/card.js +1 -1
- package/dist/cjs/card/externalImageCard.js +1 -1
- package/dist/cjs/card/fileCard.js +8 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/tickBox/tickBox.js +3 -2
- package/dist/cjs/card/ui/titleBox/failedTitleBox.js +3 -2
- package/dist/cjs/card/ui/titleBox/titleBox.js +3 -2
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +3 -2
- package/dist/cjs/inline/mediaInlineCard.js +8 -0
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/externalImageCard.js +2 -2
- package/dist/es2019/card/fileCard.js +9 -2
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/tickBox/tickBox.js +3 -2
- package/dist/es2019/card/ui/titleBox/failedTitleBox.js +3 -2
- package/dist/es2019/card/ui/titleBox/titleBox.js +3 -2
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +3 -2
- package/dist/es2019/inline/mediaInlineCard.js +8 -0
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/externalImageCard.js +2 -2
- package/dist/esm/card/fileCard.js +9 -2
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/tickBox/tickBox.js +3 -2
- package/dist/esm/card/ui/titleBox/failedTitleBox.js +3 -2
- package/dist/esm/card/ui/titleBox/titleBox.js +3 -2
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +3 -2
- package/dist/esm/inline/mediaInlineCard.js +8 -0
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/package.json +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 79.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169848](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169848)
|
|
8
|
+
[`0c2daefdb5712`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0c2daefdb5712) -
|
|
9
|
+
Standardise generation of telemetry IDs across media packages.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 79.3.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#168763](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/168763)
|
|
17
|
+
[`96133b2953ba2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/96133b2953ba2) -
|
|
18
|
+
Abort VC when click file card to open media viewer
|
|
19
|
+
|
|
3
20
|
## 79.3.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -20,7 +20,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
|
|
|
20
20
|
var _excluded = ["identifier"];
|
|
21
21
|
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); }
|
|
22
22
|
var packageName = "@atlaskit/media-card";
|
|
23
|
-
var packageVersion = "79.3.
|
|
23
|
+
var packageVersion = "79.3.6";
|
|
24
24
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
25
25
|
var identifier = _ref.identifier,
|
|
26
26
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -65,7 +65,7 @@ var ExternalImageCard = exports.ExternalImageCard = function ExternalImageCard(_
|
|
|
65
65
|
// Generate unique traceId for file
|
|
66
66
|
var traceContext = (0, _react.useMemo)(function () {
|
|
67
67
|
return {
|
|
68
|
-
traceId: (0, _mediaCommon.
|
|
68
|
+
traceId: (0, _mediaCommon.getRandomTelemetryId)()
|
|
69
69
|
};
|
|
70
70
|
}, []);
|
|
71
71
|
var fileStateFlagsRef = (0, _react.useRef)({
|
|
@@ -40,6 +40,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
40
40
|
var _abuseModal = require("@atlaskit/media-ui/abuseModal");
|
|
41
41
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
42
42
|
var _experienceTraceIdContext = require("@atlaskit/react-ufo/experience-trace-id-context");
|
|
43
|
+
var _usePressTracing = _interopRequireDefault(require("@atlaskit/react-ufo/use-press-tracing"));
|
|
43
44
|
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); }
|
|
44
45
|
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; }
|
|
45
46
|
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; }
|
|
@@ -52,7 +53,7 @@ var traceContextRetriever = function traceContextRetriever() {
|
|
|
52
53
|
};
|
|
53
54
|
} else {
|
|
54
55
|
return {
|
|
55
|
-
traceId: (0, _mediaCommon.
|
|
56
|
+
traceId: (0, _mediaCommon.getRandomTelemetryId)()
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
};
|
|
@@ -102,6 +103,7 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
102
103
|
//------------ State, Refs & Initial Values ----------------------//
|
|
103
104
|
//----------------------------------------------------------------//
|
|
104
105
|
|
|
106
|
+
var pressTracing = (0, _usePressTracing.default)('click-file-card');
|
|
105
107
|
var mediaClient = (0, _mediaClientReact.useMediaClient)();
|
|
106
108
|
var _useState3 = (0, _react.useState)(null),
|
|
107
109
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
@@ -429,6 +431,11 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
429
431
|
occurrenceKey: identifier.occurrenceKey
|
|
430
432
|
});
|
|
431
433
|
}
|
|
434
|
+
|
|
435
|
+
// Abort VC when click file card
|
|
436
|
+
if ((0, _platformFeatureFlags.fg)('platform_abort_vc_click_file_card')) {
|
|
437
|
+
pressTracing();
|
|
438
|
+
}
|
|
432
439
|
};
|
|
433
440
|
|
|
434
441
|
//----------------------------------------------------------------//
|
|
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
87
87
|
}(_react.default.Component);
|
|
88
88
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
89
89
|
var packageName = "@atlaskit/media-card";
|
|
90
|
-
var packageVersion = "79.3.
|
|
90
|
+
var packageVersion = "79.3.6";
|
|
91
91
|
|
|
92
92
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
93
93
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.TickBox = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _checkMarkCheck = _interopRequireDefault(require("@atlaskit/icon/
|
|
9
|
+
var _checkMarkCheck = _interopRequireDefault(require("@atlaskit/icon/core/migration/check-mark--check"));
|
|
10
10
|
var _tickBoxWrapper = require("./tickBoxWrapper");
|
|
11
11
|
var TickBox = exports.TickBox = function TickBox(_ref) {
|
|
12
12
|
var selected = _ref.selected;
|
|
@@ -14,6 +14,7 @@ var TickBox = exports.TickBox = function TickBox(_ref) {
|
|
|
14
14
|
selected: selected
|
|
15
15
|
}, /*#__PURE__*/_react.default.createElement(_checkMarkCheck.default, {
|
|
16
16
|
color: "currentColor",
|
|
17
|
-
label: "tick"
|
|
17
|
+
label: "tick",
|
|
18
|
+
size: "small"
|
|
18
19
|
}));
|
|
19
20
|
};
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.FailedTitleBox = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
|
-
var _warningEditorWarning = _interopRequireDefault(require("@atlaskit/icon/
|
|
10
|
+
var _warningEditorWarning = _interopRequireDefault(require("@atlaskit/icon/core/migration/warning--editor-warning"));
|
|
11
11
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
13
|
var _titleBoxComponents = require("./titleBoxComponents");
|
|
@@ -21,6 +21,7 @@ var FailedTitleBox = exports.FailedTitleBox = function FailedTitleBox(_ref) {
|
|
|
21
21
|
label: 'Warning',
|
|
22
22
|
LEGACY_size: 'small',
|
|
23
23
|
LEGACY_margin: "0 ".concat("var(--ds-space-negative-025, -2px)"),
|
|
24
|
-
color: "var(--ds-text-danger, ".concat(_colors.R300, ")")
|
|
24
|
+
color: "var(--ds-text-danger, ".concat(_colors.R300, ")"),
|
|
25
|
+
size: "small"
|
|
25
26
|
}), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, customMessage))));
|
|
26
27
|
};
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.TitleBox = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
|
-
var _lockLockedLockFilled = _interopRequireDefault(require("@atlaskit/icon/
|
|
10
|
+
var _lockLockedLockFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/lock-locked--lock-filled"));
|
|
11
11
|
var _truncateText = require("@atlaskit/media-ui/truncateText");
|
|
12
12
|
var _formatDate = require("@atlaskit/media-ui/formatDate");
|
|
13
13
|
var _titleBoxComponents = require("./titleBoxComponents");
|
|
@@ -37,7 +37,8 @@ var TitleBox = exports.TitleBox = (0, _reactIntlNext.injectIntl)(function (_ref)
|
|
|
37
37
|
}, createdAt !== undefined && isValidTimestamp(createdAt) ? (0, _formatDate.formatDate)(createdAt, (_intl$locale = intl === null || intl === void 0 ? void 0 : intl.locale) !== null && _intl$locale !== void 0 ? _intl$locale : 'en') : placeholderText), titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/_react.default.createElement(_titleBoxComponents.TitleBoxIcon, null, /*#__PURE__*/_react.default.createElement(_lockLockedLockFilled.default, {
|
|
38
38
|
color: "currentColor",
|
|
39
39
|
label: "",
|
|
40
|
-
LEGACY_size: "small"
|
|
40
|
+
LEGACY_size: "small",
|
|
41
|
+
size: "small"
|
|
41
42
|
})));
|
|
42
43
|
}, {
|
|
43
44
|
enforceContext: false
|
|
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
116
116
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
117
117
|
var analyticsContext = {
|
|
118
118
|
packageVersion: "@atlaskit/media-card",
|
|
119
|
-
packageName: "79.3.
|
|
119
|
+
packageName: "79.3.6",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -14,7 +14,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
|
-
var _warning = _interopRequireDefault(require("@atlaskit/icon/
|
|
17
|
+
var _warning = _interopRequireDefault(require("@atlaskit/icon/core/migration/warning"));
|
|
18
18
|
var _analytics = require("../utils/analytics");
|
|
19
19
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -71,7 +71,8 @@ var ErrorBoundaryComponent = function ErrorBoundaryComponent(_ref) {
|
|
|
71
71
|
LEGACY_margin: "0 ".concat("var(--ds-space-negative-050, -4px)", " 0 0"),
|
|
72
72
|
label: "error",
|
|
73
73
|
LEGACY_size: "small",
|
|
74
|
-
color: "var(--ds-icon-danger, ".concat(_colors.R300, ")")
|
|
74
|
+
color: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
|
|
75
|
+
size: "small"
|
|
75
76
|
}), message)
|
|
76
77
|
);
|
|
77
78
|
};
|
|
@@ -21,6 +21,8 @@ var _errors = require("../errors");
|
|
|
21
21
|
var _analytics = require("../utils/analytics");
|
|
22
22
|
var _mediaInlineCardAnalytics = require("./mediaInlineCardAnalytics");
|
|
23
23
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
24
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
|
+
var _usePressTracing = _interopRequireDefault(require("@atlaskit/react-ufo/use-press-tracing"));
|
|
24
26
|
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
27
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
26
28
|
var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
@@ -55,6 +57,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
55
57
|
setMediaViewerVisible = _useState0[1];
|
|
56
58
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
57
59
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
60
|
+
var pressTracing = (0, _usePressTracing.default)('click-media-inline-card');
|
|
58
61
|
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
59
62
|
var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _errors.MediaCardError('missing-error-data');
|
|
60
63
|
var failReason = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -82,6 +85,11 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
82
85
|
if (shouldOpenMediaViewer) {
|
|
83
86
|
setMediaViewerVisible(true);
|
|
84
87
|
}
|
|
88
|
+
|
|
89
|
+
// Abort VC when click media inline card
|
|
90
|
+
if ((0, _platformFeatureFlags.fg)('platform_abort_vc_click_file_card')) {
|
|
91
|
+
pressTracing();
|
|
92
|
+
}
|
|
85
93
|
};
|
|
86
94
|
var onMediaViewerClose = function onMediaViewerClose() {
|
|
87
95
|
return setMediaViewerVisible(false);
|
|
@@ -15,7 +15,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
17
|
var packageName = "@atlaskit/media-card";
|
|
18
|
-
var packageVersion = "79.3.
|
|
18
|
+
var packageVersion = "79.3.6";
|
|
19
19
|
var SAMPLE_RATE = 0.05;
|
|
20
20
|
var concurrentExperience;
|
|
21
21
|
var getExperience = function getExperience(id) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
10
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "79.3.
|
|
12
|
+
const packageVersion = "79.3.6";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
2
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
3
|
-
import {
|
|
3
|
+
import { getRandomTelemetryId } from '@atlaskit/media-common';
|
|
4
4
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
5
5
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
import ReactDOM from 'react-dom';
|
|
@@ -46,7 +46,7 @@ export const ExternalImageCard = ({
|
|
|
46
46
|
|
|
47
47
|
// Generate unique traceId for file
|
|
48
48
|
const traceContext = useMemo(() => ({
|
|
49
|
-
traceId:
|
|
49
|
+
traceId: getRandomTelemetryId()
|
|
50
50
|
}), []);
|
|
51
51
|
const fileStateFlagsRef = useRef({
|
|
52
52
|
wasStatusUploading: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
2
|
import { globalMediaEventEmitter, RECENTS_COLLECTION, imageResizeModeToFileImageMode, isProcessedFileState, isErrorFileState, toCommonMediaClientError } from '@atlaskit/media-client';
|
|
3
3
|
import { useFileState, useMediaClient } from '@atlaskit/media-client-react';
|
|
4
|
-
import {
|
|
4
|
+
import { isMimeTypeSupportedByBrowser, isVideoMimeTypeSupportedByBrowser, getRandomTelemetryId } from '@atlaskit/media-common';
|
|
5
5
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
6
6
|
import React, { Suspense, useEffect, useMemo, useRef, useState, useCallback } from 'react';
|
|
7
7
|
import { useMergeRefs } from 'use-callback-ref';
|
|
@@ -28,6 +28,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
28
28
|
import { AbuseModal } from '@atlaskit/media-ui/abuseModal';
|
|
29
29
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
30
30
|
import { getActiveTrace } from '@atlaskit/react-ufo/experience-trace-id-context';
|
|
31
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
31
32
|
const traceContextRetriever = () => {
|
|
32
33
|
const trace = getActiveTrace();
|
|
33
34
|
if (trace && fg('platform-filecard-ufo-trace')) {
|
|
@@ -37,7 +38,7 @@ const traceContextRetriever = () => {
|
|
|
37
38
|
};
|
|
38
39
|
} else {
|
|
39
40
|
return {
|
|
40
|
-
traceId:
|
|
41
|
+
traceId: getRandomTelemetryId()
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
};
|
|
@@ -83,6 +84,7 @@ export const FileCard = ({
|
|
|
83
84
|
//------------ State, Refs & Initial Values ----------------------//
|
|
84
85
|
//----------------------------------------------------------------//
|
|
85
86
|
|
|
87
|
+
const pressTracing = usePressTracing('click-file-card');
|
|
86
88
|
const mediaClient = useMediaClient();
|
|
87
89
|
const [cardElement, setCardElement] = useState(null);
|
|
88
90
|
const cardDimensions = dimensions || getDefaultCardDimensions(appearance);
|
|
@@ -352,6 +354,11 @@ export const FileCard = ({
|
|
|
352
354
|
occurrenceKey: identifier.occurrenceKey
|
|
353
355
|
});
|
|
354
356
|
}
|
|
357
|
+
|
|
358
|
+
// Abort VC when click file card
|
|
359
|
+
if (fg('platform_abort_vc_click_file_card')) {
|
|
360
|
+
pressTracing();
|
|
361
|
+
}
|
|
355
362
|
};
|
|
356
363
|
|
|
357
364
|
//----------------------------------------------------------------//
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "79.3.
|
|
69
|
+
const packageVersion = "79.3.6";
|
|
70
70
|
|
|
71
71
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
72
72
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import TickIcon from '@atlaskit/icon/
|
|
2
|
+
import TickIcon from '@atlaskit/icon/core/migration/check-mark--check';
|
|
3
3
|
import { TickBoxWrapper } from './tickBoxWrapper';
|
|
4
4
|
export const TickBox = ({
|
|
5
5
|
selected
|
|
@@ -7,5 +7,6 @@ export const TickBox = ({
|
|
|
7
7
|
selected: selected
|
|
8
8
|
}, /*#__PURE__*/React.createElement(TickIcon, {
|
|
9
9
|
color: "currentColor",
|
|
10
|
-
label: "tick"
|
|
10
|
+
label: "tick",
|
|
11
|
+
size: "small"
|
|
11
12
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import EditorWarningIcon from '@atlaskit/icon/
|
|
3
|
+
import EditorWarningIcon from '@atlaskit/icon/core/migration/warning--editor-warning';
|
|
4
4
|
import { messages } from '@atlaskit/media-ui';
|
|
5
5
|
import { R300 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { ErrorMessageWrapper, TitleBoxWrapper } from './titleBoxComponents';
|
|
@@ -14,6 +14,7 @@ export const FailedTitleBox = ({
|
|
|
14
14
|
label: 'Warning',
|
|
15
15
|
LEGACY_size: 'small',
|
|
16
16
|
LEGACY_margin: `0 ${"var(--ds-space-negative-025, -2px)"}`,
|
|
17
|
-
color: `var(--ds-text-danger, ${R300})
|
|
17
|
+
color: `var(--ds-text-danger, ${R300})`,
|
|
18
|
+
size: "small"
|
|
18
19
|
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, customMessage))));
|
|
19
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import LockFilledIcon from '@atlaskit/icon/
|
|
3
|
+
import LockFilledIcon from '@atlaskit/icon/core/migration/lock-locked--lock-filled';
|
|
4
4
|
import { Truncate } from '@atlaskit/media-ui/truncateText';
|
|
5
5
|
import { formatDate } from '@atlaskit/media-ui/formatDate';
|
|
6
6
|
import { TitleBoxWrapper, TitleBoxFooter, TitleBoxHeader, TitleBoxIcon } from './titleBoxComponents';
|
|
@@ -29,7 +29,8 @@ export const TitleBox = injectIntl(({
|
|
|
29
29
|
}, createdAt !== undefined && isValidTimestamp(createdAt) ? formatDate(createdAt, (_intl$locale = intl === null || intl === void 0 ? void 0 : intl.locale) !== null && _intl$locale !== void 0 ? _intl$locale : 'en') : placeholderText), titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/React.createElement(TitleBoxIcon, null, /*#__PURE__*/React.createElement(LockFilledIcon, {
|
|
30
30
|
color: "currentColor",
|
|
31
31
|
label: "",
|
|
32
|
-
LEGACY_size: "small"
|
|
32
|
+
LEGACY_size: "small",
|
|
33
|
+
size: "small"
|
|
33
34
|
})));
|
|
34
35
|
}, {
|
|
35
36
|
enforceContext: false
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "79.3.
|
|
40
|
+
packageName: "79.3.6",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { B300, R300, N30A, N900 } from '@atlaskit/theme/colors';
|
|
5
|
-
import WarningIcon from '@atlaskit/icon/
|
|
5
|
+
import WarningIcon from '@atlaskit/icon/core/migration/warning';
|
|
6
6
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
7
7
|
const ErrorBoundaryComponent = ({
|
|
8
8
|
message,
|
|
@@ -59,7 +59,8 @@ const ErrorBoundaryComponent = ({
|
|
|
59
59
|
LEGACY_margin: `0 ${"var(--ds-space-negative-050, -4px)"} 0 0`,
|
|
60
60
|
label: "error",
|
|
61
61
|
LEGACY_size: "small",
|
|
62
|
-
color: `var(--ds-icon-danger, ${R300})
|
|
62
|
+
color: `var(--ds-icon-danger, ${R300})`,
|
|
63
|
+
size: "small"
|
|
63
64
|
}), message)
|
|
64
65
|
);
|
|
65
66
|
};
|
|
@@ -12,6 +12,8 @@ import { MediaCardError } from '../errors';
|
|
|
12
12
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
13
13
|
import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
|
|
14
14
|
import { useCopyIntent } from '@atlaskit/media-client-react';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
15
17
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
16
18
|
export const MediaInlineCardInternal = ({
|
|
17
19
|
mediaClient,
|
|
@@ -32,6 +34,7 @@ export const MediaInlineCardInternal = ({
|
|
|
32
34
|
const {
|
|
33
35
|
createAnalyticsEvent
|
|
34
36
|
} = useAnalyticsEvents();
|
|
37
|
+
const pressTracing = usePressTracing('click-media-inline-card');
|
|
35
38
|
const fireFailedOperationalEvent = (error = new MediaCardError('missing-error-data'), failReason) => {
|
|
36
39
|
const payload = failReason ? getFailedProcessingStatusPayload(identifier.id, fileState) : getErrorStatusPayload(identifier.id, error, fileState);
|
|
37
40
|
setIsFailedEventSent(true);
|
|
@@ -58,6 +61,11 @@ export const MediaInlineCardInternal = ({
|
|
|
58
61
|
if (shouldOpenMediaViewer) {
|
|
59
62
|
setMediaViewerVisible(true);
|
|
60
63
|
}
|
|
64
|
+
|
|
65
|
+
// Abort VC when click media inline card
|
|
66
|
+
if (fg('platform_abort_vc_click_file_card')) {
|
|
67
|
+
pressTracing();
|
|
68
|
+
}
|
|
61
69
|
};
|
|
62
70
|
const onMediaViewerClose = () => setMediaViewerVisible(false);
|
|
63
71
|
const renderMediaViewer = () => {
|
|
@@ -5,7 +5,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
5
5
|
import { MediaCardError } from '../errors';
|
|
6
6
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
7
7
|
const packageName = "@atlaskit/media-card";
|
|
8
|
-
const packageVersion = "79.3.
|
|
8
|
+
const packageVersion = "79.3.6";
|
|
9
9
|
const SAMPLE_RATE = 0.05;
|
|
10
10
|
let concurrentExperience;
|
|
11
11
|
const getExperience = id => {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "79.3.
|
|
14
|
+
var packageVersion = "79.3.6";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -4,7 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
4
4
|
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) { _defineProperty(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; }
|
|
5
5
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
6
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
7
|
-
import {
|
|
7
|
+
import { getRandomTelemetryId } from '@atlaskit/media-common';
|
|
8
8
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
9
9
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
@@ -56,7 +56,7 @@ export var ExternalImageCard = function ExternalImageCard(_ref) {
|
|
|
56
56
|
// Generate unique traceId for file
|
|
57
57
|
var traceContext = useMemo(function () {
|
|
58
58
|
return {
|
|
59
|
-
traceId:
|
|
59
|
+
traceId: getRandomTelemetryId()
|
|
60
60
|
};
|
|
61
61
|
}, []);
|
|
62
62
|
var fileStateFlagsRef = useRef({
|
|
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
9
9
|
import { globalMediaEventEmitter, RECENTS_COLLECTION, imageResizeModeToFileImageMode, isProcessedFileState, isErrorFileState, toCommonMediaClientError } from '@atlaskit/media-client';
|
|
10
10
|
import { useFileState, useMediaClient } from '@atlaskit/media-client-react';
|
|
11
|
-
import {
|
|
11
|
+
import { isMimeTypeSupportedByBrowser, isVideoMimeTypeSupportedByBrowser, getRandomTelemetryId } from '@atlaskit/media-common';
|
|
12
12
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
13
13
|
import React, { Suspense, useEffect, useMemo, useRef, useState, useCallback } from 'react';
|
|
14
14
|
import { useMergeRefs } from 'use-callback-ref';
|
|
@@ -35,6 +35,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
35
35
|
import { AbuseModal } from '@atlaskit/media-ui/abuseModal';
|
|
36
36
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
37
37
|
import { getActiveTrace } from '@atlaskit/react-ufo/experience-trace-id-context';
|
|
38
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
38
39
|
var traceContextRetriever = function traceContextRetriever() {
|
|
39
40
|
var trace = getActiveTrace();
|
|
40
41
|
if (trace && fg('platform-filecard-ufo-trace')) {
|
|
@@ -44,7 +45,7 @@ var traceContextRetriever = function traceContextRetriever() {
|
|
|
44
45
|
};
|
|
45
46
|
} else {
|
|
46
47
|
return {
|
|
47
|
-
traceId:
|
|
48
|
+
traceId: getRandomTelemetryId()
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
};
|
|
@@ -94,6 +95,7 @@ export var FileCard = function FileCard(_ref) {
|
|
|
94
95
|
//------------ State, Refs & Initial Values ----------------------//
|
|
95
96
|
//----------------------------------------------------------------//
|
|
96
97
|
|
|
98
|
+
var pressTracing = usePressTracing('click-file-card');
|
|
97
99
|
var mediaClient = useMediaClient();
|
|
98
100
|
var _useState3 = useState(null),
|
|
99
101
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -421,6 +423,11 @@ export var FileCard = function FileCard(_ref) {
|
|
|
421
423
|
occurrenceKey: identifier.occurrenceKey
|
|
422
424
|
});
|
|
423
425
|
}
|
|
426
|
+
|
|
427
|
+
// Abort VC when click file card
|
|
428
|
+
if (fg('platform_abort_vc_click_file_card')) {
|
|
429
|
+
pressTracing();
|
|
430
|
+
}
|
|
424
431
|
};
|
|
425
432
|
|
|
426
433
|
//----------------------------------------------------------------//
|
|
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
80
80
|
}(React.Component);
|
|
81
81
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
82
82
|
var packageName = "@atlaskit/media-card";
|
|
83
|
-
var packageVersion = "79.3.
|
|
83
|
+
var packageVersion = "79.3.6";
|
|
84
84
|
|
|
85
85
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
86
86
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import TickIcon from '@atlaskit/icon/
|
|
2
|
+
import TickIcon from '@atlaskit/icon/core/migration/check-mark--check';
|
|
3
3
|
import { TickBoxWrapper } from './tickBoxWrapper';
|
|
4
4
|
export var TickBox = function TickBox(_ref) {
|
|
5
5
|
var selected = _ref.selected;
|
|
@@ -7,6 +7,7 @@ export var TickBox = function TickBox(_ref) {
|
|
|
7
7
|
selected: selected
|
|
8
8
|
}, /*#__PURE__*/React.createElement(TickIcon, {
|
|
9
9
|
color: "currentColor",
|
|
10
|
-
label: "tick"
|
|
10
|
+
label: "tick",
|
|
11
|
+
size: "small"
|
|
11
12
|
}));
|
|
12
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
-
import EditorWarningIcon from '@atlaskit/icon/
|
|
3
|
+
import EditorWarningIcon from '@atlaskit/icon/core/migration/warning--editor-warning';
|
|
4
4
|
import { messages } from '@atlaskit/media-ui';
|
|
5
5
|
import { R300 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { ErrorMessageWrapper, TitleBoxWrapper } from './titleBoxComponents';
|
|
@@ -14,6 +14,7 @@ export var FailedTitleBox = function FailedTitleBox(_ref) {
|
|
|
14
14
|
label: 'Warning',
|
|
15
15
|
LEGACY_size: 'small',
|
|
16
16
|
LEGACY_margin: "0 ".concat("var(--ds-space-negative-025, -2px)"),
|
|
17
|
-
color: "var(--ds-text-danger, ".concat(R300, ")")
|
|
17
|
+
color: "var(--ds-text-danger, ".concat(R300, ")"),
|
|
18
|
+
size: "small"
|
|
18
19
|
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, customMessage))));
|
|
19
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import LockFilledIcon from '@atlaskit/icon/
|
|
3
|
+
import LockFilledIcon from '@atlaskit/icon/core/migration/lock-locked--lock-filled';
|
|
4
4
|
import { Truncate } from '@atlaskit/media-ui/truncateText';
|
|
5
5
|
import { formatDate } from '@atlaskit/media-ui/formatDate';
|
|
6
6
|
import { TitleBoxWrapper, TitleBoxFooter, TitleBoxHeader, TitleBoxIcon } from './titleBoxComponents';
|
|
@@ -30,7 +30,8 @@ export var TitleBox = injectIntl(function (_ref) {
|
|
|
30
30
|
}, createdAt !== undefined && isValidTimestamp(createdAt) ? formatDate(createdAt, (_intl$locale = intl === null || intl === void 0 ? void 0 : intl.locale) !== null && _intl$locale !== void 0 ? _intl$locale : 'en') : placeholderText), titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/React.createElement(TitleBoxIcon, null, /*#__PURE__*/React.createElement(LockFilledIcon, {
|
|
31
31
|
color: "currentColor",
|
|
32
32
|
label: "",
|
|
33
|
-
LEGACY_size: "small"
|
|
33
|
+
LEGACY_size: "small",
|
|
34
|
+
size: "small"
|
|
34
35
|
})));
|
|
35
36
|
}, {
|
|
36
37
|
enforceContext: false
|
|
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
101
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
102
102
|
var analyticsContext = {
|
|
103
103
|
packageVersion: "@atlaskit/media-card",
|
|
104
|
-
packageName: "79.3.
|
|
104
|
+
packageName: "79.3.6",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -11,7 +11,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
13
13
|
import { B300, R300, N30A, N900 } from '@atlaskit/theme/colors';
|
|
14
|
-
import WarningIcon from '@atlaskit/icon/
|
|
14
|
+
import WarningIcon from '@atlaskit/icon/core/migration/warning';
|
|
15
15
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
16
16
|
var ErrorBoundaryComponent = function ErrorBoundaryComponent(_ref) {
|
|
17
17
|
var message = _ref.message,
|
|
@@ -64,7 +64,8 @@ var ErrorBoundaryComponent = function ErrorBoundaryComponent(_ref) {
|
|
|
64
64
|
LEGACY_margin: "0 ".concat("var(--ds-space-negative-050, -4px)", " 0 0"),
|
|
65
65
|
label: "error",
|
|
66
66
|
LEGACY_size: "small",
|
|
67
|
-
color: "var(--ds-icon-danger, ".concat(R300, ")")
|
|
67
|
+
color: "var(--ds-icon-danger, ".concat(R300, ")"),
|
|
68
|
+
size: "small"
|
|
68
69
|
}), message)
|
|
69
70
|
);
|
|
70
71
|
};
|
|
@@ -13,6 +13,8 @@ import { MediaCardError } from '../errors';
|
|
|
13
13
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
14
14
|
import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
|
|
15
15
|
import { useCopyIntent } from '@atlaskit/media-client-react';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
16
18
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
17
19
|
export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
18
20
|
var mediaClient = _ref.mediaClient,
|
|
@@ -46,6 +48,7 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
46
48
|
setMediaViewerVisible = _useState0[1];
|
|
47
49
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
48
50
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
51
|
+
var pressTracing = usePressTracing('click-media-inline-card');
|
|
49
52
|
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
50
53
|
var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new MediaCardError('missing-error-data');
|
|
51
54
|
var failReason = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -73,6 +76,11 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
73
76
|
if (shouldOpenMediaViewer) {
|
|
74
77
|
setMediaViewerVisible(true);
|
|
75
78
|
}
|
|
79
|
+
|
|
80
|
+
// Abort VC when click media inline card
|
|
81
|
+
if (fg('platform_abort_vc_click_file_card')) {
|
|
82
|
+
pressTracing();
|
|
83
|
+
}
|
|
76
84
|
};
|
|
77
85
|
var onMediaViewerClose = function onMediaViewerClose() {
|
|
78
86
|
return setMediaViewerVisible(false);
|
|
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
8
8
|
import { MediaCardError } from '../errors';
|
|
9
9
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
10
10
|
var packageName = "@atlaskit/media-card";
|
|
11
|
-
var packageVersion = "79.3.
|
|
11
|
+
var packageVersion = "79.3.6";
|
|
12
12
|
var SAMPLE_RATE = 0.05;
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
var getExperience = function getExperience(id) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "79.3.
|
|
3
|
+
"version": "79.3.6",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
43
43
|
"@atlaskit/icon": "^26.4.0",
|
|
44
44
|
"@atlaskit/link": "^3.2.0",
|
|
45
|
-
"@atlaskit/media-client": "^33.
|
|
45
|
+
"@atlaskit/media-client": "^33.4.0",
|
|
46
46
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
47
|
-
"@atlaskit/media-common": "^12.
|
|
47
|
+
"@atlaskit/media-common": "^12.2.0",
|
|
48
48
|
"@atlaskit/media-file-preview": "^0.11.0",
|
|
49
49
|
"@atlaskit/media-svg": "^2.1.0",
|
|
50
|
-
"@atlaskit/media-ui": "^28.
|
|
50
|
+
"@atlaskit/media-ui": "^28.3.0",
|
|
51
51
|
"@atlaskit/media-viewer": "^52.2.0",
|
|
52
52
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
53
53
|
"@atlaskit/primitives": "^14.8.0",
|
|
54
54
|
"@atlaskit/react-ufo": "^3.13.0",
|
|
55
55
|
"@atlaskit/spinner": "^18.0.0",
|
|
56
56
|
"@atlaskit/theme": "^18.0.0",
|
|
57
|
-
"@atlaskit/tokens": "^5.
|
|
58
|
-
"@atlaskit/tooltip": "^20.
|
|
57
|
+
"@atlaskit/tokens": "^5.2.0",
|
|
58
|
+
"@atlaskit/tooltip": "^20.3.0",
|
|
59
59
|
"@atlaskit/ufo": "^0.4.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
79
79
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
80
80
|
"@atlaskit/form": "^12.0.0",
|
|
81
|
-
"@atlaskit/inline-message": "^15.
|
|
81
|
+
"@atlaskit/inline-message": "^15.3.0",
|
|
82
82
|
"@atlaskit/media-core": "^36.1.0",
|
|
83
83
|
"@atlaskit/media-picker": "^69.0.0",
|
|
84
84
|
"@atlaskit/media-state": "^1.6.0",
|
|
85
|
-
"@atlaskit/media-test-data": "^3.
|
|
86
|
-
"@atlaskit/media-test-helpers": "^36.
|
|
85
|
+
"@atlaskit/media-test-data": "^3.1.0",
|
|
86
|
+
"@atlaskit/media-test-helpers": "^36.1.0",
|
|
87
87
|
"@atlaskit/radio": "^8.1.0",
|
|
88
|
-
"@atlaskit/range": "^9.
|
|
88
|
+
"@atlaskit/range": "^9.1.0",
|
|
89
89
|
"@atlaskit/ssr": "workspace:^",
|
|
90
90
|
"@atlaskit/toggle": "^15.0.0",
|
|
91
91
|
"@atlaskit/visual-regression": "workspace:^",
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
},
|
|
146
146
|
"platform_media_resume_video_on_token_expiry": {
|
|
147
147
|
"type": "boolean"
|
|
148
|
+
},
|
|
149
|
+
"platform_abort_vc_click_file_card": {
|
|
150
|
+
"type": "boolean"
|
|
148
151
|
}
|
|
149
152
|
},
|
|
150
153
|
"techstack": {
|