@atlaskit/media-card 79.0.11 → 79.0.12
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 +6 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/fileCard.js +16 -5
- 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/fileCard.js +16 -3
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/fileCard.js +16 -5
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
package/dist/cjs/card/card.js
CHANGED
|
@@ -21,7 +21,7 @@ var _excluded = ["identifier"];
|
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
var packageName = "@atlaskit/media-card";
|
|
24
|
-
var packageVersion = "79.0.
|
|
24
|
+
var packageVersion = "79.0.12";
|
|
25
25
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
26
26
|
var identifier = _ref.identifier,
|
|
27
27
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -38,10 +38,25 @@ var _performance = require("./performance");
|
|
|
38
38
|
var _dateOverrideContext = require("../dateOverrideContext");
|
|
39
39
|
var _reactIntlNext = require("react-intl-next");
|
|
40
40
|
var _abuseModal = require("@atlaskit/media-ui/abuseModal");
|
|
41
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
42
|
+
var _experienceTraceIdContext = require("@atlaskit/react-ufo/experience-trace-id-context");
|
|
41
43
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
42
44
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
43
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; }
|
|
44
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; }
|
|
47
|
+
var traceContextRetriever = function traceContextRetriever() {
|
|
48
|
+
var trace = (0, _experienceTraceIdContext.getActiveTrace)();
|
|
49
|
+
if (trace && (0, _platformFeatureFlags.fg)('platform-filecard-ufo-trace')) {
|
|
50
|
+
return {
|
|
51
|
+
traceId: trace === null || trace === void 0 ? void 0 : trace.traceId,
|
|
52
|
+
spanId: trace === null || trace === void 0 ? void 0 : trace.spanId
|
|
53
|
+
};
|
|
54
|
+
} else {
|
|
55
|
+
return {
|
|
56
|
+
traceId: (0, _mediaCommon.getRandomHex)(8)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
45
60
|
var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
46
61
|
var _ref$appearance = _ref.appearance,
|
|
47
62
|
appearance = _ref$appearance === void 0 ? 'auto' : _ref$appearance,
|
|
@@ -145,11 +160,7 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
145
160
|
var mediaViewerButtonRef = (0, _react.useRef)(null);
|
|
146
161
|
|
|
147
162
|
// Generate unique traceId for file
|
|
148
|
-
var traceContext = (0, _react.useMemo)(
|
|
149
|
-
return {
|
|
150
|
-
traceId: (0, _mediaCommon.getRandomHex)(8)
|
|
151
|
-
};
|
|
152
|
-
}, []);
|
|
163
|
+
var traceContext = (0, _react.useMemo)(traceContextRetriever, []);
|
|
153
164
|
var _useState7 = (0, _react.useState)('loading'),
|
|
154
165
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
155
166
|
status = _useState8[0],
|
|
@@ -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.0.
|
|
90
|
+
var packageVersion = "79.0.12";
|
|
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)({
|
|
@@ -117,7 +117,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
117
117
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
118
118
|
var analyticsContext = {
|
|
119
119
|
packageVersion: "@atlaskit/media-card",
|
|
120
|
-
packageName: "79.0.
|
|
120
|
+
packageName: "79.0.12",
|
|
121
121
|
componentName: 'mediaInlineCard',
|
|
122
122
|
component: 'mediaInlineCard'
|
|
123
123
|
};
|
|
@@ -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.0.
|
|
18
|
+
var packageVersion = "79.0.12";
|
|
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.0.
|
|
12
|
+
const packageVersion = "79.0.12";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -26,6 +26,21 @@ import { useContext } from 'react';
|
|
|
26
26
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
27
27
|
import { useIntl } from 'react-intl-next';
|
|
28
28
|
import { AbuseModal } from '@atlaskit/media-ui/abuseModal';
|
|
29
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
30
|
+
import { getActiveTrace } from '@atlaskit/react-ufo/experience-trace-id-context';
|
|
31
|
+
const traceContextRetriever = () => {
|
|
32
|
+
const trace = getActiveTrace();
|
|
33
|
+
if (trace && fg('platform-filecard-ufo-trace')) {
|
|
34
|
+
return {
|
|
35
|
+
traceId: trace === null || trace === void 0 ? void 0 : trace.traceId,
|
|
36
|
+
spanId: trace === null || trace === void 0 ? void 0 : trace.spanId
|
|
37
|
+
};
|
|
38
|
+
} else {
|
|
39
|
+
return {
|
|
40
|
+
traceId: getRandomHex(8)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
29
44
|
export const FileCard = ({
|
|
30
45
|
appearance = 'auto',
|
|
31
46
|
resizeMode = 'crop',
|
|
@@ -113,9 +128,7 @@ export const FileCard = ({
|
|
|
113
128
|
const mediaViewerButtonRef = useRef(null);
|
|
114
129
|
|
|
115
130
|
// Generate unique traceId for file
|
|
116
|
-
const traceContext = useMemo(
|
|
117
|
-
traceId: getRandomHex(8)
|
|
118
|
-
}), []);
|
|
131
|
+
const traceContext = useMemo(traceContextRetriever, []);
|
|
119
132
|
const [status, setStatus] = useState('loading');
|
|
120
133
|
const [isPlayingFile, setIsPlayingFile] = useState(false);
|
|
121
134
|
const [shouldAutoplay, setShouldAutoplay] = useState(false);
|
|
@@ -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.0.
|
|
69
|
+
const packageVersion = "79.0.12";
|
|
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.0.
|
|
40
|
+
packageName: "79.0.12",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -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.0.
|
|
8
|
+
const packageVersion = "79.0.12";
|
|
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.0.
|
|
14
|
+
var packageVersion = "79.0.12";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -33,6 +33,21 @@ import { useContext } from 'react';
|
|
|
33
33
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
34
34
|
import { useIntl } from 'react-intl-next';
|
|
35
35
|
import { AbuseModal } from '@atlaskit/media-ui/abuseModal';
|
|
36
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
37
|
+
import { getActiveTrace } from '@atlaskit/react-ufo/experience-trace-id-context';
|
|
38
|
+
var traceContextRetriever = function traceContextRetriever() {
|
|
39
|
+
var trace = getActiveTrace();
|
|
40
|
+
if (trace && fg('platform-filecard-ufo-trace')) {
|
|
41
|
+
return {
|
|
42
|
+
traceId: trace === null || trace === void 0 ? void 0 : trace.traceId,
|
|
43
|
+
spanId: trace === null || trace === void 0 ? void 0 : trace.spanId
|
|
44
|
+
};
|
|
45
|
+
} else {
|
|
46
|
+
return {
|
|
47
|
+
traceId: getRandomHex(8)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
};
|
|
36
51
|
export var FileCard = function FileCard(_ref) {
|
|
37
52
|
var _ref$appearance = _ref.appearance,
|
|
38
53
|
appearance = _ref$appearance === void 0 ? 'auto' : _ref$appearance,
|
|
@@ -136,11 +151,7 @@ export var FileCard = function FileCard(_ref) {
|
|
|
136
151
|
var mediaViewerButtonRef = useRef(null);
|
|
137
152
|
|
|
138
153
|
// Generate unique traceId for file
|
|
139
|
-
var traceContext = useMemo(
|
|
140
|
-
return {
|
|
141
|
-
traceId: getRandomHex(8)
|
|
142
|
-
};
|
|
143
|
-
}, []);
|
|
154
|
+
var traceContext = useMemo(traceContextRetriever, []);
|
|
144
155
|
var _useState7 = useState('loading'),
|
|
145
156
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
146
157
|
status = _useState8[0],
|
|
@@ -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.0.
|
|
83
|
+
var packageVersion = "79.0.12";
|
|
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.0.
|
|
104
|
+
packageName: "79.0.12",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -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.0.
|
|
11
|
+
var packageVersion = "79.0.12";
|
|
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.0.
|
|
3
|
+
"version": "79.0.12",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
41
|
-
"@atlaskit/dropdown-menu": "^
|
|
41
|
+
"@atlaskit/dropdown-menu": "^14.0.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
43
|
-
"@atlaskit/icon": "^25.
|
|
43
|
+
"@atlaskit/icon": "^25.3.0",
|
|
44
44
|
"@atlaskit/media-client": "^32.0.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
46
46
|
"@atlaskit/media-common": "^12.0.0",
|
|
@@ -106,6 +106,9 @@
|
|
|
106
106
|
"wait-for-expect": "^1.2.0"
|
|
107
107
|
},
|
|
108
108
|
"platform-feature-flags": {
|
|
109
|
+
"platform-filecard-ufo-trace": {
|
|
110
|
+
"type": "boolean"
|
|
111
|
+
},
|
|
109
112
|
"platform.media-card-performance-observer_a803k": {
|
|
110
113
|
"type": "boolean"
|
|
111
114
|
},
|