@atlaskit/media-card 81.6.16 → 81.7.0
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 +20 -0
- package/dist/cjs/card/card.js +3 -3
- package/dist/cjs/card/cardAnalytics.js +2 -2
- package/dist/cjs/card/cardLoader.js +3 -3
- package/dist/cjs/card/cardView.js +9 -9
- package/dist/cjs/card/cardWithMediaClient.js +6 -5
- package/dist/cjs/card/externalImageCard.js +2 -2
- package/dist/cjs/card/fileCard.js +13 -12
- package/dist/cjs/card/inlinePlayer.js +7 -6
- package/dist/cjs/card/inlinePlayerWrapper-compiled.js +2 -2
- package/dist/cjs/card/media-card-analytics-error-boundary.js +3 -3
- package/dist/cjs/card/svgView/svgImage-compiled.js +2 -1
- package/dist/cjs/card/svgView/svgView.js +2 -2
- package/dist/cjs/card/svgView/svgViewV2.js +2 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +2 -2
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionIconButton.js +4 -4
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +9 -8
- package/dist/cjs/card/ui/imageRenderer/helpers.js +4 -4
- package/dist/cjs/card/ui/imageRenderer/imageRendererV2.js +2 -2
- package/dist/cjs/card/ui/imageRenderer/index.js +2 -2
- package/dist/cjs/card/ui/openMediaViewerButton/openMediaViewerButton.js +2 -2
- package/dist/cjs/inline/loader.js +3 -3
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +2 -2
- package/dist/cjs/inline/mediaInlineCard.js +8 -8
- package/dist/cjs/utils/lightCards/cardLoading.js +1 -1
- package/dist/cjs/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +3 -3
- package/dist/cjs/utils/ufoExperiences.js +12 -9
- package/dist/es2019/card/card.js +2 -2
- package/dist/es2019/card/cardAnalytics.js +1 -1
- package/dist/es2019/card/cardLoader.js +1 -1
- package/dist/es2019/card/cardView.js +4 -4
- package/dist/es2019/card/cardWithMediaClient.js +3 -2
- package/dist/es2019/card/externalImageCard.js +1 -1
- package/dist/es2019/card/fileCard.js +4 -3
- package/dist/es2019/card/inlinePlayer.js +3 -2
- package/dist/es2019/card/inlinePlayerWrapper-compiled.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +2 -2
- package/dist/es2019/card/svgView/svgImage-compiled.js +2 -1
- package/dist/es2019/card/svgView/svgView.js +1 -1
- package/dist/es2019/card/svgView/svgViewV2.js +2 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +1 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionIconButton.js +2 -2
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +5 -3
- package/dist/es2019/card/ui/imageRenderer/helpers.js +1 -1
- package/dist/es2019/card/ui/imageRenderer/imageRendererV2.js +1 -1
- package/dist/es2019/card/ui/imageRenderer/index.js +1 -1
- package/dist/es2019/card/ui/openMediaViewerButton/openMediaViewerButton.js +1 -1
- package/dist/es2019/inline/loader.js +2 -2
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/es2019/inline/mediaInlineCard.js +4 -4
- package/dist/es2019/utils/lightCards/cardLoading.js +1 -1
- package/dist/es2019/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +5 -3
- package/dist/esm/card/card.js +2 -2
- package/dist/esm/card/cardAnalytics.js +1 -1
- package/dist/esm/card/cardLoader.js +1 -1
- package/dist/esm/card/cardView.js +4 -4
- package/dist/esm/card/cardWithMediaClient.js +3 -2
- package/dist/esm/card/externalImageCard.js +1 -1
- package/dist/esm/card/fileCard.js +4 -3
- package/dist/esm/card/inlinePlayer.js +3 -2
- package/dist/esm/card/inlinePlayerWrapper-compiled.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +2 -2
- package/dist/esm/card/svgView/svgImage-compiled.js +2 -1
- package/dist/esm/card/svgView/svgView.js +1 -1
- package/dist/esm/card/svgView/svgViewV2.js +2 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +1 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionIconButton.js +2 -2
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +5 -3
- package/dist/esm/card/ui/imageRenderer/helpers.js +1 -1
- package/dist/esm/card/ui/imageRenderer/imageRendererV2.js +1 -1
- package/dist/esm/card/ui/imageRenderer/index.js +1 -1
- package/dist/esm/card/ui/openMediaViewerButton/openMediaViewerButton.js +1 -1
- package/dist/esm/inline/loader.js +2 -2
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/esm/inline/mediaInlineCard.js +4 -4
- package/dist/esm/utils/lightCards/cardLoading.js +1 -1
- package/dist/esm/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +5 -3
- package/dist/types/card/cardAnalytics.d.ts +1 -1
- package/dist/types/card/cardView.d.ts +2 -1
- package/dist/types/card/inlinePlayer.d.ts +2 -1
- package/dist/types/card/media-card-analytics-error-boundary.d.ts +1 -1
- package/dist/types/card/types.d.ts +2 -2
- package/dist/types/card/ui/actionsBar/cardActions/styles.d.ts +1 -1
- package/dist/types/card/ui/wrapper/types.d.ts +1 -1
- package/dist/types/inline/loader.d.ts +1 -1
- package/dist/types/inline/mediaInlineAnalyticsErrorBoundary.d.ts +1 -1
- package/dist/types/inline/mediaInlineCardAnalytics.d.ts +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types/utils/analytics/analytics.d.ts +2 -1
- package/example-helpers/index.tsx +2 -1
- package/example-helpers/selectableCard.tsx +1 -1
- package/example-helpers/svg-helpers/dimensionPicker.tsx +2 -2
- package/example-helpers/svg-helpers/toggle.tsx +1 -1
- package/example-helpers/svg-helpers/uploader.ts +1 -1
- package/package.json +32 -27
|
@@ -8,7 +8,7 @@ exports.ImageRenderer = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _imageRenderer = require("./imageRenderer");
|
|
10
10
|
var _imageRendererV = require("./imageRendererV2");
|
|
11
|
-
var
|
|
11
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
12
|
var ImageRenderer = exports.ImageRenderer = function ImageRenderer(props) {
|
|
13
|
-
return (0,
|
|
13
|
+
return (0, _fg.fg)('platform_media_card_image_render') ? /*#__PURE__*/_react.default.createElement(_imageRendererV.ImageRenderer, props) : /*#__PURE__*/_react.default.createElement(_imageRenderer.ImageRenderer, props);
|
|
14
14
|
};
|
|
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _reactIntl = require("react-intl");
|
|
12
12
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
13
|
-
var
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
15
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden/visually-hidden"));
|
|
16
16
|
var _excluded = ["fileName", "innerRef"];
|
|
@@ -21,7 +21,7 @@ var OpenMediaViewerButton = function OpenMediaViewerButton(_ref) {
|
|
|
21
21
|
var intl = (0, _reactIntl.useIntl)();
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement(_visuallyHidden.default, null, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, (0, _extends2.default)({
|
|
23
23
|
ref: innerRef
|
|
24
|
-
}, props, (0,
|
|
24
|
+
}, props, (0, _fg.fg)('create_modernization_ga_fixes_drop_2') ? {
|
|
25
25
|
'aria-label': intl.formatMessage(_mediaUi.messages.open_file_in_viewer_aria_label, {
|
|
26
26
|
name: fileName
|
|
27
27
|
})
|
|
@@ -17,7 +17,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireDefault(require("react"));
|
|
19
19
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
20
|
-
var
|
|
20
|
+
var _AnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/AnalyticsContext"));
|
|
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 _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
22
22
|
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)); }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -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: "81.6.
|
|
119
|
+
packageName: "81.6.16",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -125,7 +125,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
125
125
|
message: ""
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_AnalyticsContext.default, {
|
|
129
129
|
data: analyticsContext
|
|
130
130
|
}, /*#__PURE__*/_react.default.createElement(ErrorBoundary, {
|
|
131
131
|
isSelected: this.props.isSelected
|
|
@@ -12,7 +12,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var
|
|
15
|
+
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
16
16
|
var _statusWarning = _interopRequireDefault(require("@atlaskit/icon/core/status-warning"));
|
|
17
17
|
var _analytics = require("../utils/analytics");
|
|
18
18
|
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)); }
|
|
@@ -133,5 +133,5 @@ var WrappedMediaInlineAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Com
|
|
|
133
133
|
}]);
|
|
134
134
|
}(_react.default.Component); // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
135
135
|
(0, _defineProperty2.default)(WrappedMediaInlineAnalyticsErrorBoundary, "displayName", 'MediaInlineAnalyticsErrorBoundary');
|
|
136
|
-
var MediaInlineAnalyticsErrorBoundary = (0,
|
|
136
|
+
var MediaInlineAnalyticsErrorBoundary = (0, _withAnalyticsEvents.default)()(WrappedMediaInlineAnalyticsErrorBoundary);
|
|
137
137
|
var _default = exports.default = MediaInlineAnalyticsErrorBoundary;
|
|
@@ -7,21 +7,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.MediaInlineCardInternal = exports.MediaInlineCard = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var
|
|
10
|
+
var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
11
11
|
var _mediaClient = require("@atlaskit/media-client");
|
|
12
12
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
13
13
|
var _formatDate = require("@atlaskit/media-ui/formatDate");
|
|
14
14
|
var _mimeTypeIcon = require("@atlaskit/media-ui/mime-type-icon");
|
|
15
15
|
var _mediaViewer = require("@atlaskit/media-viewer");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
16
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
|
+
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
20
20
|
var _reactIntl = require("react-intl");
|
|
21
21
|
var _errors = require("../errors");
|
|
22
22
|
var _analytics = require("../utils/analytics");
|
|
23
23
|
var _mediaInlineCardAnalytics = require("./mediaInlineCardAnalytics");
|
|
24
|
-
var
|
|
24
|
+
var _useCopyIntent2 = require("@atlaskit/media-client-react/use-copy-intent");
|
|
25
25
|
var _usePressTracing = _interopRequireDefault(require("@atlaskit/react-ufo/use-press-tracing"));
|
|
26
26
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
27
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); }
|
|
@@ -38,7 +38,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
38
38
|
viewerOptions = _ref.viewerOptions,
|
|
39
39
|
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher,
|
|
40
40
|
ssrFileState = _ref.ssrFileState;
|
|
41
|
-
var initialFileState = (0,
|
|
41
|
+
var initialFileState = (0, _fg.fg)('platform_media_ssr_data_seed') ? ssrFileState : undefined;
|
|
42
42
|
// Capture as a ref so it's a stable one-time SSR seed that doesn't affect
|
|
43
43
|
// the useEffect dependency array (including it would cause repeated
|
|
44
44
|
// unsubscribe/resubscribe cycles whenever ssrFileState changes reference).
|
|
@@ -72,7 +72,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
72
72
|
fallbackMediaNameFetchFailed = _useState12[0],
|
|
73
73
|
setFallbackMediaNameFetchFailed = _useState12[1];
|
|
74
74
|
var fallbackMediaNameFetchAttempted = (0, _react.useRef)(false);
|
|
75
|
-
var _useAnalyticsEvents = (0,
|
|
75
|
+
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
76
76
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
77
77
|
var pressTracing = (0, _usePressTracing.default)('click-media-inline-card');
|
|
78
78
|
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
@@ -90,7 +90,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
90
90
|
setIsSucceededEventSent(true);
|
|
91
91
|
(0, _analytics.fireMediaCardEvent)(payload, createAnalyticsEvent);
|
|
92
92
|
};
|
|
93
|
-
var _useCopyIntent = (0,
|
|
93
|
+
var _useCopyIntent = (0, _useCopyIntent2.useCopyIntent)(identifier.id, {
|
|
94
94
|
collectionName: identifier.collectionName
|
|
95
95
|
}),
|
|
96
96
|
copyNodeRef = _useCopyIntent.copyNodeRef;
|
|
@@ -252,7 +252,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
252
252
|
fireSucceededOperationalEvent();
|
|
253
253
|
}
|
|
254
254
|
if (shouldDisplayToolTip === undefined || shouldDisplayToolTip === true) {
|
|
255
|
-
return renderContent( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
255
|
+
return renderContent( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
256
256
|
position: "bottom",
|
|
257
257
|
content: formattedDate,
|
|
258
258
|
tag: "span"
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.CardLoading = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
9
|
+
var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
10
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
11
|
var _loadingBar = require("../../card/ui/loadingBar/loadingBar");
|
|
12
12
|
var _getDimensionsWithDefault = require("./getDimensionsWithDefault");
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.startResourceObserver = exports.setAnalyticsContext = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _analytics = require("@atlaskit/media-common/analytics");
|
|
10
|
-
var
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
11
|
var _interactionMetrics = require("@atlaskit/react-ufo/interaction-metrics");
|
|
12
12
|
var _durationMetrics = require("./durationMetrics");
|
|
13
13
|
var _ufo = require("./ufo");
|
|
@@ -50,14 +50,14 @@ var createAndGetResourceObserver = function createAndGetResourceObserver() {
|
|
|
50
50
|
fileId: fileId,
|
|
51
51
|
mediaClientId: clientId,
|
|
52
52
|
featureFlags: {
|
|
53
|
-
'media-perf-lazy-loading-optimisation': (0,
|
|
53
|
+
'media-perf-lazy-loading-optimisation': (0, _fg.fg)('media-perf-lazy-loading-optimisation')
|
|
54
54
|
}
|
|
55
55
|
}, mediaDurationMetrics)
|
|
56
56
|
});
|
|
57
57
|
if (shouldSamplePerfObserver()) {
|
|
58
58
|
event.fire(_analytics.ANALYTICS_MEDIA_CHANNEL);
|
|
59
59
|
}
|
|
60
|
-
if ((0,
|
|
60
|
+
if ((0, _fg.fg)('platform_media_card_ufo_network_metrics')) {
|
|
61
61
|
var ufoDurationMetrics = (0, _durationMetrics.createUfoDurationMetrics)(entry, interactionStartTime);
|
|
62
62
|
var endpointName = 'image';
|
|
63
63
|
(0, _ufo.sendUfoDurationMetrics)(ufoDurationMetrics, endpointName);
|
|
@@ -8,9 +8,12 @@ exports.useMediaCardUfoExperience = exports.startUfoExperience = exports.shouldP
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _react = require("react");
|
|
11
|
-
var
|
|
11
|
+
var _experience = require("@atlaskit/ufo/experience");
|
|
12
|
+
var _experienceTypes = require("@atlaskit/ufo/experience-types");
|
|
13
|
+
var _concurrentExperience = require("@atlaskit/ufo/concurrent-experience");
|
|
12
14
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
13
15
|
var _isValidUuid = require("@atlaskit/media-common/isValidUuid");
|
|
16
|
+
var _experienceState = require("@atlaskit/ufo/experience-state");
|
|
14
17
|
var _analytics = require("./analytics");
|
|
15
18
|
var _errors = require("../errors");
|
|
16
19
|
var _mediaClient = require("@atlaskit/media-client");
|
|
@@ -19,7 +22,7 @@ var _globalScope = require("./globalScope/globalScope");
|
|
|
19
22
|
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; }
|
|
20
23
|
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; }
|
|
21
24
|
var packageName = "@atlaskit/media-card";
|
|
22
|
-
var packageVersion = "81.6.
|
|
25
|
+
var packageVersion = "81.6.16";
|
|
23
26
|
var SAMPLE_RATE = 0.05;
|
|
24
27
|
|
|
25
28
|
/**
|
|
@@ -197,12 +200,12 @@ var getBasePayloadAttributes = function getBasePayloadAttributes() {
|
|
|
197
200
|
*/
|
|
198
201
|
var createExperience = function createExperience(instanceId) {
|
|
199
202
|
var timings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
200
|
-
return new
|
|
203
|
+
return new _experience.UFOExperience('media-card-render', {
|
|
201
204
|
platform: {
|
|
202
205
|
component: 'media-card'
|
|
203
206
|
},
|
|
204
|
-
type:
|
|
205
|
-
performanceType:
|
|
207
|
+
type: _experienceTypes.ExperienceTypes.Experience,
|
|
208
|
+
performanceType: _experienceTypes.ExperiencePerformanceTypes.InlineResult,
|
|
206
209
|
featureFlags: (0, _mediaCommon.getFeatureFlagKeysAllProducts)(),
|
|
207
210
|
timings: timings
|
|
208
211
|
}, instanceId);
|
|
@@ -322,7 +325,7 @@ var useMediaCardUfoExperience = exports.useMediaCardUfoExperience = function use
|
|
|
322
325
|
ssrReliability: ssrReliability,
|
|
323
326
|
fileStateFlags: fileStateFlags
|
|
324
327
|
}, getBasePayloadAttributes()));
|
|
325
|
-
experience.transition(
|
|
328
|
+
experience.transition(_experienceState.UFOExperienceState.SUCCEEDED, endTime);
|
|
326
329
|
break;
|
|
327
330
|
case 'failed-processing':
|
|
328
331
|
experience.failure({
|
|
@@ -408,11 +411,11 @@ var getExperience = function getExperience(id) {
|
|
|
408
411
|
platform: {
|
|
409
412
|
component: 'media-card'
|
|
410
413
|
},
|
|
411
|
-
type:
|
|
412
|
-
performanceType:
|
|
414
|
+
type: _experienceTypes.ExperienceTypes.Experience,
|
|
415
|
+
performanceType: _experienceTypes.ExperiencePerformanceTypes.InlineResult,
|
|
413
416
|
featureFlags: (0, _mediaCommon.getFeatureFlagKeysAllProducts)()
|
|
414
417
|
};
|
|
415
|
-
concurrentExperience = new
|
|
418
|
+
concurrentExperience = new _concurrentExperience.ConcurrentExperience('media-card-render', inlineExperience);
|
|
416
419
|
}
|
|
417
420
|
return concurrentExperience.getInstance(id);
|
|
418
421
|
};
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -6,10 +6,10 @@ import { IntlProvider, injectIntl } from 'react-intl';
|
|
|
6
6
|
import { ExternalImageCard } from './externalImageCard';
|
|
7
7
|
import { FileCard } from './fileCard';
|
|
8
8
|
import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerformanceObserver/mediaPerformanceObserver';
|
|
9
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
9
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
10
10
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "81.6.
|
|
12
|
+
const packageVersion = "81.6.16";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fireMediaCardEvent, getRenderSucceededEventPayload, getRenderErrorEventPayload, getRenderFailedFileStatusPayload, getErrorEventPayload, getDownloadSucceededEventPayload, getDownloadFailedEventPayload } from '../utils/analytics';
|
|
2
2
|
import { MediaCardError } from '../errors';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
|
|
5
5
|
// Sampling rate for mediaCardRender success events (10%)
|
|
6
6
|
const MEDIA_CARD_RENDER_SUCCESS_SAMPLE_RATE = 0.1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { Suspense, useContext } from 'react';
|
|
3
3
|
import Loadable from 'react-loadable';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { CardLoading } from '../utils/lightCards/cardLoading';
|
|
6
6
|
import UFOSegment from '@atlaskit/react-ufo/segment';
|
|
7
7
|
const MediaCardContext = /*#__PURE__*/React.createContext({});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl';
|
|
3
3
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
4
|
-
import
|
|
4
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
5
|
import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
|
|
6
|
-
import SpinnerIcon from '@atlaskit/spinner';
|
|
7
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
6
|
+
import SpinnerIcon from '@atlaskit/spinner/spinner';
|
|
7
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
8
8
|
import { useMergeRefs } from 'use-callback-ref';
|
|
9
9
|
import { messages } from '@atlaskit/media-ui';
|
|
10
10
|
import { createAndFireMediaCardEvent } from '../utils/analytics';
|
|
@@ -28,7 +28,7 @@ import { useBreakpoint } from './useBreakpoint';
|
|
|
28
28
|
import OpenMediaViewerButton from './ui/openMediaViewerButton/openMediaViewerButton';
|
|
29
29
|
import { useCurrentValueRef } from '../utils/useCurrentValueRef';
|
|
30
30
|
import { SvgView } from './svgView';
|
|
31
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
31
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
32
32
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
33
33
|
const i18n = defineMessages({
|
|
34
34
|
traceIdTooltip: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { withMediaClientAndSettings
|
|
2
|
+
import { withMediaClientAndSettings } from '@atlaskit/media-client-react/with-media-client-and-settings';
|
|
3
|
+
import { withMediaClient } from '@atlaskit/media-client-react/with-media-client';
|
|
3
4
|
import MediaCardAnalyticsErrorBoundary from './media-card-analytics-error-boundary';
|
|
4
5
|
import { Card as InternalCard } from './card';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
7
|
export const CardWithMediaClient = props => {
|
|
7
8
|
const {
|
|
8
9
|
dimensions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
1
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
2
2
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
3
3
|
import { getRandomTelemetryId } from '@atlaskit/media-common';
|
|
4
4
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
1
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
2
2
|
import { globalMediaEventEmitter, RECENTS_COLLECTION, imageResizeModeToFileImageMode, isProcessedFileState, isErrorFileState, toCommonMediaClientError } from '@atlaskit/media-client';
|
|
3
|
-
import { useFileState
|
|
3
|
+
import { useFileState } from '@atlaskit/media-client-react/use-file-state';
|
|
4
|
+
import { useMediaClient } from '@atlaskit/media-client-react/use-media-client';
|
|
4
5
|
import { isMimeTypeSupportedByBrowser, isVideoMimeTypeSupportedByBrowser, getRandomTelemetryId } from '@atlaskit/media-common';
|
|
5
6
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
6
7
|
import React, { Suspense, useEffect, useMemo, useRef, useState, useCallback } from 'react';
|
|
@@ -28,7 +29,7 @@ import { useContext } from 'react';
|
|
|
28
29
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
29
30
|
import { useIntl } from 'react-intl';
|
|
30
31
|
import { AbuseModal } from '@atlaskit/media-ui/abuseModal';
|
|
31
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
32
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
32
33
|
import { getActiveTrace } from '@atlaskit/react-ufo/experience-trace-id-context';
|
|
33
34
|
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
34
35
|
const traceContextRetriever = () => {
|
|
@@ -7,8 +7,9 @@ import { CardLoading } from '../utils/lightCards/cardLoading';
|
|
|
7
7
|
import { ProgressBar } from './ui/progressBar/progressBar';
|
|
8
8
|
import { InlinePlayerWrapper } from './inlinePlayerWrapper';
|
|
9
9
|
import { useBreakpoint } from './useBreakpoint';
|
|
10
|
-
import { useFileState
|
|
11
|
-
import {
|
|
10
|
+
import { useFileState } from '@atlaskit/media-client-react/use-file-state';
|
|
11
|
+
import { useMediaClient } from '@atlaskit/media-client-react/use-media-client';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
13
|
export const getPreferredVideoArtifact = fileState => {
|
|
13
14
|
if (fileState.status === 'processed' || fileState.status === 'processing') {
|
|
14
15
|
const {
|
|
@@ -6,7 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
|
|
7
7
|
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
8
8
|
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
const hideNativeBrowserTextSelectionStyles = null;
|
|
11
11
|
const selectedBorderStyle = null;
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
4
4
|
import { UnhandledErrorCard } from './ui/unhandledErrorCard';
|
|
5
|
-
import
|
|
5
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
6
6
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
7
7
|
class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
8
8
|
constructor(props) {
|
|
@@ -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 = "81.6.
|
|
69
|
+
const packageVersion = "81.6.16";
|
|
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({
|
|
@@ -4,7 +4,8 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
5
5
|
import { MediaCardError } from '../../errors';
|
|
6
6
|
import { calculateSvgDimensions } from './helpers';
|
|
7
|
-
import { useResolveSvg
|
|
7
|
+
import { useResolveSvg } from '@atlaskit/media-svg/use-resolve-svg';
|
|
8
|
+
import { MediaSVGError } from '@atlaskit/media-svg';
|
|
8
9
|
const getErrorReason = svgReason => {
|
|
9
10
|
switch (svgReason) {
|
|
10
11
|
case 'img-error':
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
3
|
import { SvgView as SvgViewCompiled } from './svgImage-compiled';
|
|
4
4
|
import { SvgView as SvgViewV2 } from './svgViewV2';
|
|
5
5
|
export const SvgView = props => {
|
|
@@ -7,7 +7,8 @@ import React from 'react';
|
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
9
|
import { MediaCardError } from '../../errors';
|
|
10
|
-
import { useResolveSvg
|
|
10
|
+
import { useResolveSvg } from '@atlaskit/media-svg/use-resolve-svg';
|
|
11
|
+
import { MediaSVGError } from '@atlaskit/media-svg';
|
|
11
12
|
import { ImageRenderer } from '../ui/imageRenderer/imageRendererV2';
|
|
12
13
|
const getErrorReason = svgReason => {
|
|
13
14
|
switch (svgReason) {
|
|
@@ -6,7 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
const variantStyleMap = {
|
|
11
11
|
filled: "_bfhk1bhr _irr36o2t",
|
|
12
12
|
default: "_irr31dpa"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { CardActionButton } from './cardActionButton';
|
|
4
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
4
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
5
5
|
import { fireMediaCardEvent } from '../../../../utils/analytics';
|
|
6
6
|
export const CardActionIconButton = ({
|
|
7
7
|
icon,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
4
4
|
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
5
|
-
import DropdownMenu
|
|
6
|
-
import
|
|
5
|
+
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
6
|
+
import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
|
|
7
|
+
import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
|
|
8
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
7
9
|
import { createAndFireMediaCardEvent, fireMediaCardEvent } from '../../../../utils/analytics';
|
|
8
10
|
import { CardActionButton } from './cardActionButton';
|
|
9
11
|
// Trick applied due to the lack of props type of DropdownItem
|
|
@@ -6,7 +6,7 @@ import { calculateDimensions, calculateInitialDimensions } from './helpers';
|
|
|
6
6
|
import { useCurrentValueRef } from '../../../utils/useCurrentValueRef';
|
|
7
7
|
import { ImageRendererWrapper } from './wrapper';
|
|
8
8
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
11
11
|
import { useInteractionContext } from '@atlaskit/react-ufo/interaction-context';
|
|
12
12
|
const baseStyles = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ImageRenderer as ImageRendererV1 } from './imageRenderer';
|
|
3
3
|
import { ImageRenderer as ImageRendererV2 } from './imageRendererV2';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
export const ImageRenderer = props => {
|
|
6
6
|
return fg('platform_media_card_image_render') ? /*#__PURE__*/React.createElement(ImageRendererV2, props) : /*#__PURE__*/React.createElement(ImageRendererV1, props);
|
|
7
7
|
};
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { injectIntl, IntlProvider, useIntl } from 'react-intl';
|
|
4
4
|
import { messages } from '@atlaskit/media-ui';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
7
7
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
8
8
|
const OpenMediaViewerButton = ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
|
|
4
|
-
import
|
|
4
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
5
5
|
export default class MediaInlineCardLoader extends React.PureComponent {
|
|
6
6
|
constructor(...args) {
|
|
7
7
|
super(...args);
|
|
@@ -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: "81.6.
|
|
40
|
+
packageName: "81.6.16",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
4
4
|
import WarningIcon from '@atlaskit/icon/core/status-warning';
|
|
5
5
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
6
6
|
const ErrorBoundaryComponent = ({
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
1
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
2
2
|
import { FileFetcherError, toCommonMediaClientError } from '@atlaskit/media-client';
|
|
3
3
|
import { MediaInlineCardErroredView, MediaInlineCardLoadedView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
|
|
4
4
|
import { formatDate } from '@atlaskit/media-ui/formatDate';
|
|
5
5
|
import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
|
|
6
6
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
9
9
|
import React, { useEffect, useRef, useState } from 'react';
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
11
11
|
import { createIntl, injectIntl, IntlProvider } from 'react-intl';
|
|
12
12
|
import { MediaCardError } from '../errors';
|
|
13
13
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
14
14
|
import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
|
|
15
|
-
import { useCopyIntent } from '@atlaskit/media-client-react';
|
|
15
|
+
import { useCopyIntent } from '@atlaskit/media-client-react/use-copy-intent';
|
|
16
16
|
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
18
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import SpinnerIcon from '@atlaskit/spinner';
|
|
2
|
+
import SpinnerIcon from '@atlaskit/spinner/spinner';
|
|
3
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
4
|
import { LoadingBar } from '../../card/ui/loadingBar/loadingBar';
|
|
5
5
|
import { getDimensionsWithDefault } from './getDimensionsWithDefault';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common/analytics';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
3
|
import { getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
4
4
|
import { createMediaDurationMetrics, createUfoDurationMetrics } from './durationMetrics';
|
|
5
5
|
import { sendUfoDurationMetrics } from './ufo';
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import { UFOExperience
|
|
2
|
+
import { UFOExperience } from '@atlaskit/ufo/experience';
|
|
3
|
+
import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
|
|
4
|
+
import { ConcurrentExperience } from '@atlaskit/ufo/concurrent-experience';
|
|
3
5
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
4
6
|
import { isValidUuid } from '@atlaskit/media-common/isValidUuid';
|
|
5
|
-
import { UFOExperienceState } from '@atlaskit/ufo';
|
|
7
|
+
import { UFOExperienceState } from '@atlaskit/ufo/experience-state';
|
|
6
8
|
import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
7
9
|
import { MediaCardError } from '../errors';
|
|
8
10
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
9
11
|
import { getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
10
12
|
import { getMediaGlobalScope } from './globalScope/globalScope';
|
|
11
13
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "81.6.
|
|
14
|
+
const packageVersion = "81.6.16";
|
|
13
15
|
const SAMPLE_RATE = 0.05;
|
|
14
16
|
|
|
15
17
|
/**
|
package/dist/esm/card/card.js
CHANGED
|
@@ -8,10 +8,10 @@ import { IntlProvider, injectIntl } from 'react-intl';
|
|
|
8
8
|
import { ExternalImageCard } from './externalImageCard';
|
|
9
9
|
import { FileCard } from './fileCard';
|
|
10
10
|
import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerformanceObserver/mediaPerformanceObserver';
|
|
11
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
11
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
12
12
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "81.6.
|
|
14
|
+
var packageVersion = "81.6.16";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fireMediaCardEvent, getRenderSucceededEventPayload, getRenderErrorEventPayload, getRenderFailedFileStatusPayload, getErrorEventPayload, getDownloadSucceededEventPayload, getDownloadFailedEventPayload } from '../utils/analytics';
|
|
2
2
|
import { MediaCardError } from '../errors';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
|
|
5
5
|
// Sampling rate for mediaCardRender success events (10%)
|
|
6
6
|
var MEDIA_CARD_RENDER_SUCCESS_SAMPLE_RATE = 0.1;
|