@atlaskit/media-card 79.3.5 → 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 +9 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/externalImageCard.js +1 -1
- package/dist/cjs/card/fileCard.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- 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 +3 -3
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/inline/mediaInlineCard.js +1 -1
- 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 +3 -3
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/inline/mediaInlineCard.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
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
|
+
|
|
3
12
|
## 79.3.5
|
|
4
13
|
|
|
5
14
|
### 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)({
|
|
@@ -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)({
|
|
@@ -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
|
};
|
|
@@ -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,7 +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
|
|
31
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
32
32
|
const traceContextRetriever = () => {
|
|
33
33
|
const trace = getActiveTrace();
|
|
34
34
|
if (trace && fg('platform-filecard-ufo-trace')) {
|
|
@@ -38,7 +38,7 @@ const traceContextRetriever = () => {
|
|
|
38
38
|
};
|
|
39
39
|
} else {
|
|
40
40
|
return {
|
|
41
|
-
traceId:
|
|
41
|
+
traceId: getRandomTelemetryId()
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
};
|
|
@@ -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({
|
|
@@ -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
|
};
|
|
@@ -13,7 +13,7 @@ import { fireMediaCardEvent } from '../utils/analytics';
|
|
|
13
13
|
import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
|
|
14
14
|
import { useCopyIntent } from '@atlaskit/media-client-react';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
-
import usePressTracing from
|
|
16
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
17
17
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
18
18
|
export const MediaInlineCardInternal = ({
|
|
19
19
|
mediaClient,
|
|
@@ -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,7 +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
|
|
38
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
39
39
|
var traceContextRetriever = function traceContextRetriever() {
|
|
40
40
|
var trace = getActiveTrace();
|
|
41
41
|
if (trace && fg('platform-filecard-ufo-trace')) {
|
|
@@ -45,7 +45,7 @@ var traceContextRetriever = function traceContextRetriever() {
|
|
|
45
45
|
};
|
|
46
46
|
} else {
|
|
47
47
|
return {
|
|
48
|
-
traceId:
|
|
48
|
+
traceId: getRandomTelemetryId()
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
};
|
|
@@ -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({
|
|
@@ -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
|
};
|
|
@@ -14,7 +14,7 @@ import { fireMediaCardEvent } from '../utils/analytics';
|
|
|
14
14
|
import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
|
|
15
15
|
import { useCopyIntent } from '@atlaskit/media-client-react';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
-
import usePressTracing from
|
|
17
|
+
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
18
18
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
19
19
|
export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
20
20
|
var mediaClient = _ref.mediaClient,
|
|
@@ -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,19 +42,19 @@
|
|
|
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.
|
|
57
|
+
"@atlaskit/tokens": "^5.2.0",
|
|
58
58
|
"@atlaskit/tooltip": "^20.3.0",
|
|
59
59
|
"@atlaskit/ufo": "^0.4.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|