@atlaskit/media-card 81.12.8 → 81.12.10
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 +13 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardLoader.js +1 -1
- package/dist/cjs/card/cardWithMediaClient.js +3 -3
- package/dist/cjs/card/fileCard.js +2 -2
- package/dist/cjs/card/fireOperationalEvent.js +1 -1
- package/dist/cjs/card/inlinePlayerWrapper-compiled.compiled.css +0 -2
- package/dist/cjs/card/inlinePlayerWrapper-compiled.js +3 -7
- package/dist/cjs/card/inlinePlayerWrapperStyles.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +3 -3
- package/dist/cjs/card/svgView/svgViewV2.js +2 -2
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionIconButton.js +1 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +3 -3
- package/dist/cjs/card/ui/imageRenderer/imageRenderer.js +1 -1
- package/dist/cjs/card/ui/imageRenderer/index.js +1 -1
- package/dist/cjs/card/ui/playButton/playButton.js +1 -1
- package/dist/cjs/card/ui/wrapper/wrapper-compiled.js +2 -2
- package/dist/cjs/ensureMediaCardError.js +1 -1
- package/dist/cjs/inline/loader.js +2 -2
- package/dist/cjs/utils/lightCards/cardError.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardLoader.js +1 -1
- package/dist/es2019/card/cardWithMediaClient.js +3 -3
- package/dist/es2019/card/fileCard.js +2 -2
- package/dist/es2019/card/fireOperationalEvent.js +2 -1
- package/dist/es2019/card/inlinePlayerWrapper-compiled.compiled.css +0 -2
- package/dist/es2019/card/inlinePlayerWrapper-compiled.js +3 -7
- package/dist/es2019/card/inlinePlayerWrapperStyles.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +3 -3
- package/dist/es2019/card/svgView/svgViewV2.js +4 -3
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +1 -0
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionIconButton.js +1 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +3 -3
- package/dist/es2019/card/ui/imageRenderer/imageRenderer.js +1 -1
- package/dist/es2019/card/ui/imageRenderer/index.js +1 -1
- package/dist/es2019/card/ui/playButton/playButton.js +1 -1
- package/dist/es2019/card/ui/playButton/playButtonBackground.js +1 -0
- package/dist/es2019/card/ui/wrapper/wrapper-compiled.js +2 -2
- package/dist/es2019/ensureMediaCardError.js +1 -1
- package/dist/es2019/inline/loader.js +2 -2
- package/dist/es2019/inline/mediaInlineCardAnalytics.js +1 -0
- package/dist/es2019/utils/getMediaCardCursor.js +1 -0
- package/dist/es2019/utils/lightCards/cardError.js +1 -1
- package/dist/es2019/utils/lightCards/errorIcon/index.js +2 -1
- package/dist/es2019/utils/lightCards/errorIcon/styles.js +0 -1
- package/dist/es2019/utils/lightCards/lightCardWrappers.js +1 -0
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardLoader.js +1 -1
- package/dist/esm/card/cardWithMediaClient.js +3 -3
- package/dist/esm/card/fileCard.js +2 -2
- package/dist/esm/card/fireOperationalEvent.js +2 -1
- package/dist/esm/card/inlinePlayerWrapper-compiled.compiled.css +0 -2
- package/dist/esm/card/inlinePlayerWrapper-compiled.js +3 -7
- package/dist/esm/card/inlinePlayerWrapperStyles.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +3 -3
- package/dist/esm/card/svgView/svgViewV2.js +4 -3
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +1 -0
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionIconButton.js +1 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +3 -3
- package/dist/esm/card/ui/imageRenderer/imageRenderer.js +1 -1
- package/dist/esm/card/ui/imageRenderer/index.js +1 -1
- package/dist/esm/card/ui/playButton/playButton.js +1 -1
- package/dist/esm/card/ui/playButton/playButtonBackground.js +1 -0
- package/dist/esm/card/ui/wrapper/wrapper-compiled.js +2 -2
- package/dist/esm/ensureMediaCardError.js +1 -1
- package/dist/esm/inline/loader.js +2 -2
- package/dist/esm/inline/mediaInlineCardAnalytics.js +1 -0
- package/dist/esm/utils/getMediaCardCursor.js +1 -0
- package/dist/esm/utils/lightCards/cardError.js +1 -1
- package/dist/esm/utils/lightCards/errorIcon/index.js +2 -1
- package/dist/esm/utils/lightCards/errorIcon/styles.js +0 -1
- package/dist/esm/utils/lightCards/lightCardWrappers.js +1 -0
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/inlinePlayerWrapper-compiled.d.ts +4 -0
- package/dist/types/card/media-card-analytics-error-boundary.d.ts +1 -1
- package/dist/types/card/ui/actionsBar/cardActions/styles.d.ts +1 -1
- package/dist/types/card/ui/aiBorder/aiBorder.d.ts +4 -0
- package/dist/types/card/ui/imageRenderer/wrapper.d.ts +4 -0
- package/dist/types/card/ui/titleBox/types.d.ts +1 -1
- package/dist/types/card/ui/wrapper/types.d.ts +1 -1
- package/dist/types/inline/mediaInlineAnalyticsErrorBoundary.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/utils/getMediaCardCursor.d.ts +1 -1
- package/dist/types/utils/lightCards/types.d.ts +1 -1
- package/example-helpers/cardViewWrapper.tsx +2 -0
- package/example-helpers/cards.tsx +3 -3
- package/example-helpers/developmentUseMessage.tsx +1 -0
- package/example-helpers/index.tsx +3 -3
- package/example-helpers/selectableCard.tsx +3 -1
- package/example-helpers/ssrHelpers.tsx +2 -0
- package/example-helpers/styles.ts +2 -1
- package/package.json +4 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
4
3
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
4
|
+
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
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.12.
|
|
40
|
+
packageName: "81.12.9",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated Use `import { getSucceededStatusPayload } from '@atlaskit/media-card/mediaInlineCardAnalytics'` instead.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
export { getSucceededStatusPayload } from './getSucceededStatusPayload';
|
|
6
7
|
/**
|
|
7
8
|
* @deprecated Use `import { getErrorStatusPayload } from '@atlaskit/media-card/mediaInlineCardAnalytics'` instead.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { ErrorIcon } from './errorIcon';
|
|
4
|
-
import { Wrapper } from './lightCardWrappers';
|
|
5
4
|
import { getDimensionsWithDefault } from './getDimensionsWithDefault';
|
|
5
|
+
import { Wrapper } from './lightCardWrappers';
|
|
6
6
|
export class CardError extends Component {
|
|
7
7
|
render() {
|
|
8
8
|
const dimensions = getDimensionsWithDefault(this.props.dimensions);
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { Component } from 'react';
|
|
7
|
+
|
|
6
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
9
|
import { jsx } from '@emotion/react';
|
|
8
|
-
import { Component } from 'react';
|
|
9
10
|
import WarningIcon from '@atlaskit/icon/core/status-warning';
|
|
10
11
|
import { errorIconWrapperStyles } from './styles';
|
|
11
12
|
export class ErrorIcon extends Component {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
4
|
export const errorIconWrapperStyles = css({
|
|
6
5
|
display: 'flex',
|
|
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
+
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { jsx } from '@emotion/react';
|
|
9
10
|
import { wrapperStyles } from './styles';
|
|
@@ -12,7 +12,7 @@ import { extractErrorInfo } from './analytics/extractErrorInfo';
|
|
|
12
12
|
import { getRenderErrorRequestMetadata } from './analytics/getRenderErrorRequestMetadata';
|
|
13
13
|
import { getMediaGlobalScope } from './globalScope/getMediaGlobalScope';
|
|
14
14
|
const packageName = "@atlaskit/media-card";
|
|
15
|
-
const packageVersion = "81.12.
|
|
15
|
+
const packageVersion = "81.12.9";
|
|
16
16
|
const SAMPLE_RATE = 0.05;
|
|
17
17
|
|
|
18
18
|
/**
|
package/dist/esm/card/card.js
CHANGED
|
@@ -2,7 +2,7 @@ import { injectIntl } from 'react-intl';
|
|
|
2
2
|
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
3
3
|
import { CardWithPerformanceObserver } from './CardWithPerformanceObserver';
|
|
4
4
|
var packageName = "@atlaskit/media-card";
|
|
5
|
-
var packageVersion = "81.12.
|
|
5
|
+
var packageVersion = "81.12.9";
|
|
6
6
|
export var Card = withMediaAnalyticsContext({
|
|
7
7
|
packageVersion: packageVersion,
|
|
8
8
|
packageName: packageName,
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { Suspense, useContext } from 'react';
|
|
3
3
|
import Loadable from 'react-loadable';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
|
-
import { CardLoading } from '../utils/lightCards/cardLoading';
|
|
6
5
|
import UFOSegment from '@atlaskit/react-ufo/ufo-segment';
|
|
6
|
+
import { CardLoading } from '../utils/lightCards/cardLoading';
|
|
7
7
|
var MediaCardContext = /*#__PURE__*/React.createContext({});
|
|
8
8
|
var CardLoadingWithContext = function CardLoadingWithContext() {
|
|
9
9
|
var props = useContext(MediaCardContext);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { withMediaClientAndSettings } from '@atlaskit/media-client-react/with-media-client-and-settings';
|
|
3
2
|
import { withMediaClient } from '@atlaskit/media-client-react/with-media-client';
|
|
4
|
-
import
|
|
5
|
-
import { Card as InternalCard } from './card';
|
|
3
|
+
import { withMediaClientAndSettings } from '@atlaskit/media-client-react/with-media-client-and-settings';
|
|
6
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
|
+
import { Card as InternalCard } from './card';
|
|
6
|
+
import MediaCardAnalyticsErrorBoundary from './media-card-analytics-error-boundary';
|
|
7
7
|
export var CardWithMediaClient = function CardWithMediaClient(props) {
|
|
8
8
|
var dimensions = props.dimensions,
|
|
9
9
|
onClick = props.onClick;
|
|
@@ -22,12 +22,12 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
22
22
|
import { getActiveTrace } from '@atlaskit/react-ufo/get-active-trace';
|
|
23
23
|
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
24
24
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
25
|
-
import { MediaCardError } from '../MediaCardError';
|
|
26
25
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
27
26
|
import { isSSRPreview } from '../isSSRPreview';
|
|
27
|
+
import { MediaCardError } from '../MediaCardError';
|
|
28
28
|
import { fireMediaCardEvent } from '../utils/analytics/fireMediaCardEvent';
|
|
29
|
-
import { getAuthProviderSucceededPayload } from '../utils/analytics/getAuthProviderSucceededPayload';
|
|
30
29
|
import { getAuthProviderFailedPayload } from '../utils/analytics/getAuthProviderFailedPayload';
|
|
30
|
+
import { getAuthProviderSucceededPayload } from '../utils/analytics/getAuthProviderSucceededPayload';
|
|
31
31
|
import { getDefaultCardDimensions } from '../utils/cardDimensions';
|
|
32
32
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
33
33
|
import { getMediaCardCursor } from '../utils/getMediaCardCursor';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
2
|
import { MediaCardError } from '../MediaCardError';
|
|
3
3
|
import { fireMediaCardEvent } from '../utils/analytics/fireMediaCardEvent';
|
|
4
|
-
import { getRenderSucceededEventPayload } from '../utils/analytics/getRenderSucceededEventPayload';
|
|
5
4
|
import { getRenderErrorEventPayload } from '../utils/analytics/getRenderErrorEventPayload';
|
|
6
5
|
import { getRenderFailedFileStatusPayload } from '../utils/analytics/getRenderFailedFileStatusPayload';
|
|
6
|
+
import { getRenderSucceededEventPayload } from '../utils/analytics/getRenderSucceededEventPayload';
|
|
7
|
+
|
|
7
8
|
// Sampling rate for mediaCardRender success events (10%)
|
|
8
9
|
var MEDIA_CARD_RENDER_SUCCESS_SAMPLE_RATE = 0.1;
|
|
9
10
|
export var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes, ssrReliability) {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
._14mj1kw7:after{border-radius:inherit}
|
|
2
|
-
._14mjfajl:after{border-radius:var(--ds-radius-small,3px)}
|
|
3
2
|
._2rko1mok{border-radius:var(--ds-radius-large,8px)}
|
|
4
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
5
3
|
._eq43fyzg:after{border:var(--ds-border-width,1px) solid var(--ds-border-selected,#1868db)}._11fnglyw:after{pointer-events:none}
|
|
6
4
|
._14r11j28::-moz-selection{background-color:transparent}
|
|
7
5
|
._15l2idpf:after{top:0}
|
|
@@ -4,10 +4,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
import "./inlinePlayerWrapper-compiled.compiled.css";
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
|
|
8
|
-
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
9
7
|
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
10
|
-
import {
|
|
8
|
+
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
9
|
+
import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
|
|
11
10
|
var hideNativeBrowserTextSelectionStyles = null;
|
|
12
11
|
var selectedBorderStyle = null;
|
|
13
12
|
|
|
@@ -16,15 +15,12 @@ var selectedBorderStyle = null;
|
|
|
16
15
|
* shrinking the image OR growing the card size
|
|
17
16
|
*/
|
|
18
17
|
var borderStyle = null;
|
|
19
|
-
var updatedBorderStyle = null;
|
|
20
18
|
export var inlinePlayerClassName = 'media-card-inline-player';
|
|
21
19
|
export var LOCAL_WIDTH_VARIABLE = '--media-inline-player-wrapper-width';
|
|
22
20
|
export var LOCAL_HEIGHT_VARIABLE = '--media-inline-player-wrapper-height';
|
|
23
21
|
var inlinePlayerWrapperStyles = null;
|
|
24
|
-
var updatedInlinePlayerWrapperStyles = null;
|
|
25
22
|
|
|
26
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
|
-
|
|
28
24
|
export var InlinePlayerWrapper = function InlinePlayerWrapper(props) {
|
|
29
25
|
var testId = props.testId,
|
|
30
26
|
selected = props.selected,
|
|
@@ -37,7 +33,7 @@ export var InlinePlayerWrapper = function InlinePlayerWrapper(props) {
|
|
|
37
33
|
role: "none"
|
|
38
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
35
|
,
|
|
40
|
-
className: ax([
|
|
36
|
+
className: ax(["_1reo15vq _18m915vq _2rko1mok _kqswh2mm _p12f1osq _c71l1osq _1bsb1ez3 _4t3i1amq _1y2k1osq _z18o1osq", selected && "_1p1y1j28 _1rk81j28 _14r11j28 _1np21j28", "_14mj1kw7 _aetrb3bt _z0ai1osq _1qdg1osq _18postnw _15l2idpf _631ousvi _11fnglyw", selected && "_eq43fyzg", inlinePlayerClassName]),
|
|
41
37
|
onClick: onClick,
|
|
42
38
|
ref: innerRef
|
|
43
39
|
}, VcMediaWrapperProps, {
|
|
@@ -2,8 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
-
import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
|
|
6
5
|
import { getSelectionStyles, SelectionStyle, hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
|
|
6
|
+
import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
|
|
7
7
|
/*
|
|
8
8
|
* Used to display the blue border around a selected card without
|
|
9
9
|
* shrinking the image OR growing the card size
|
|
@@ -9,10 +9,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
13
|
-
import { UnhandledErrorCard } from './ui/unhandledErrorCard';
|
|
14
12
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
13
|
+
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
15
14
|
import { fireMediaCardEvent } from '../utils/analytics/fireMediaCardEvent';
|
|
15
|
+
import { UnhandledErrorCard } from './ui/unhandledErrorCard';
|
|
16
16
|
var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
17
17
|
function WrappedMediaCardAnalyticsErrorBoundary(props) {
|
|
18
18
|
var _this;
|
|
@@ -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 = "81.12.
|
|
83
|
+
var packageVersion = "81.12.9";
|
|
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({
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
|
+
import { useMemo } from 'react';
|
|
8
|
+
|
|
7
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
10
|
import { jsx } from '@emotion/react';
|
|
9
|
-
import { useMemo } from 'react';
|
|
10
|
-
import { MediaCardError } from '../../MediaCardError';
|
|
11
|
-
import { useResolveSvg } from '@atlaskit/media-svg/use-resolve-svg';
|
|
12
11
|
import { MediaSVGError } from '@atlaskit/media-svg/media-svg-error';
|
|
12
|
+
import { useResolveSvg } from '@atlaskit/media-svg/use-resolve-svg';
|
|
13
|
+
import { MediaCardError } from '../../MediaCardError';
|
|
13
14
|
import { ImageRenderer } from '../ui/imageRenderer/imageRendererV2';
|
|
14
15
|
var getErrorReason = function getErrorReason(svgReason) {
|
|
15
16
|
switch (svgReason) {
|
|
@@ -7,6 +7,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
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; }
|
|
8
8
|
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; }
|
|
9
9
|
import { forwardRef } from 'react';
|
|
10
|
+
|
|
10
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
12
|
|
|
12
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
|
-
import { CardActionButton } from './cardActionButton';
|
|
4
3
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
5
4
|
import { fireMediaCardEvent } from '../../../../utils/analytics/fireMediaCardEvent';
|
|
5
|
+
import { CardActionButton } from './cardActionButton';
|
|
6
6
|
export var CardActionIconButton = function CardActionIconButton(_ref) {
|
|
7
7
|
var icon = _ref.icon,
|
|
8
8
|
label = _ref.label,
|
|
@@ -3,11 +3,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
var _excluded = ["triggerRef", "isSelected", "testId", "onClick"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
6
|
-
import
|
|
6
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
7
7
|
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
8
|
-
import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
|
|
9
8
|
import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
|
|
10
|
-
import
|
|
9
|
+
import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
|
|
10
|
+
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
11
11
|
import { createAndFireMediaCardEvent } from '../../../../utils/analytics/createAndFireMediaCardEvent';
|
|
12
12
|
import { fireMediaCardEvent } from '../../../../utils/analytics/fireMediaCardEvent';
|
|
13
13
|
import { CardActionButton } from './cardActionButton';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { MediaImage } from '@atlaskit/media-ui/mediaImage';
|
|
4
|
-
import { resizeModeToMediaImageProps } from './resizeModeToMediaImageProps';
|
|
5
4
|
import { useCurrentValueRef } from '../../../utils/useCurrentValueRef';
|
|
5
|
+
import { resizeModeToMediaImageProps } from './resizeModeToMediaImageProps';
|
|
6
6
|
export var ImageRenderer = function ImageRenderer(_ref) {
|
|
7
7
|
var cardPreview = _ref.cardPreview,
|
|
8
8
|
alt = _ref.alt,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
3
|
import { ImageRenderer as ImageRendererV1 } from './imageRenderer';
|
|
3
4
|
import { ImageRenderer as ImageRendererV2 } from './imageRendererV2';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
export var ImageRenderer = function ImageRenderer(props) {
|
|
6
6
|
return fg('platform_media_card_image_render') ? /*#__PURE__*/React.createElement(ImageRendererV2, props) : /*#__PURE__*/React.createElement(ImageRendererV1, props);
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import VidPlayIcon from '@atlaskit/icon/core/video-play-overlay';
|
|
3
|
-
import { PlayButtonWrapper } from './playButtonWrapper';
|
|
4
3
|
import { PlayButtonBackground } from './playButtonBackground';
|
|
4
|
+
import { PlayButtonWrapper } from './playButtonWrapper';
|
|
5
5
|
export var PlayButton = function PlayButton() {
|
|
6
6
|
return /*#__PURE__*/React.createElement(PlayButtonWrapper, null, /*#__PURE__*/React.createElement(PlayButtonBackground, null), /*#__PURE__*/React.createElement(VidPlayIcon, {
|
|
7
7
|
color: "currentColor",
|
|
@@ -6,11 +6,11 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
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; }
|
|
8
8
|
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; }
|
|
9
|
-
import
|
|
9
|
+
import UFOCustomData from '@atlaskit/react-ufo/custom-data';
|
|
10
10
|
import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
|
|
11
11
|
import { getDefaultCardDimensions } from '../../../utils/cardDimensions';
|
|
12
12
|
import { getCSSUnitValue } from '../../../utils/getCSSUnitValue';
|
|
13
|
-
import
|
|
13
|
+
import { newFileExperienceClassName } from '../../cardConstants';
|
|
14
14
|
export var LOCAL_WIDTH_VARIABLE = '--media-wrapper-width';
|
|
15
15
|
export var LOCAL_HEIGHT_VARIABLE = '--media-wrapper-height';
|
|
16
16
|
var wrapperStyles = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MediaCardError } from './MediaCardError';
|
|
2
1
|
import { isMediaCardError } from './isMediaCardError';
|
|
2
|
+
import { MediaCardError } from './MediaCardError';
|
|
3
3
|
|
|
4
4
|
// In a try/catch statement, the error caught is the type of unknown.
|
|
5
5
|
// We can use this helper to ensure that the error handled is the type of MediaCardError if unsure
|
|
@@ -10,8 +10,8 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
10
10
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
14
13
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
14
|
+
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
15
15
|
var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
16
16
|
function MediaInlineCardLoader() {
|
|
17
17
|
var _this;
|
|
@@ -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: "81.12.
|
|
104
|
+
packageName: "81.12.9",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated Use `import { getSucceededStatusPayload } from '@atlaskit/media-card/mediaInlineCardAnalytics'` instead.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
export { getSucceededStatusPayload } from './getSucceededStatusPayload';
|
|
6
7
|
/**
|
|
7
8
|
* @deprecated Use `import { getErrorStatusPayload } from '@atlaskit/media-card/mediaInlineCardAnalytics'` instead.
|
|
@@ -8,8 +8,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { Component } from 'react';
|
|
10
10
|
import { ErrorIcon } from './errorIcon';
|
|
11
|
-
import { Wrapper } from './lightCardWrappers';
|
|
12
11
|
import { getDimensionsWithDefault } from './getDimensionsWithDefault';
|
|
12
|
+
import { Wrapper } from './lightCardWrappers';
|
|
13
13
|
export var CardError = /*#__PURE__*/function (_Component) {
|
|
14
14
|
function CardError() {
|
|
15
15
|
_classCallCheck(this, CardError);
|
|
@@ -10,9 +10,10 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
10
10
|
* @jsx jsx
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
+
import { Component } from 'react';
|
|
14
|
+
|
|
13
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
16
|
import { jsx } from '@emotion/react';
|
|
15
|
-
import { Component } from 'react';
|
|
16
17
|
import WarningIcon from '@atlaskit/icon/core/status-warning';
|
|
17
18
|
import { errorIconWrapperStyles } from './styles';
|
|
18
19
|
export var ErrorIcon = /*#__PURE__*/function (_Component) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
4
|
export var errorIconWrapperStyles = css({
|
|
6
5
|
display: 'flex',
|
|
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
+
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
9
|
import { jsx } from '@emotion/react';
|
|
9
10
|
import { wrapperStyles } from './styles';
|
|
@@ -16,7 +16,7 @@ import { extractErrorInfo } from './analytics/extractErrorInfo';
|
|
|
16
16
|
import { getRenderErrorRequestMetadata } from './analytics/getRenderErrorRequestMetadata';
|
|
17
17
|
import { getMediaGlobalScope } from './globalScope/getMediaGlobalScope';
|
|
18
18
|
var packageName = "@atlaskit/media-card";
|
|
19
|
-
var packageVersion = "81.12.
|
|
19
|
+
var packageVersion = "81.12.9";
|
|
20
20
|
var SAMPLE_RATE = 0.05;
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
2
3
|
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
4
|
import { type CardDimensions, type CardOnClickCallback } from '../types';
|
|
4
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
5
|
export type MediaCardAnalyticsErrorBoundaryProps = PropsWithChildren<{
|
|
6
6
|
dimensions?: CardDimensions;
|
|
7
7
|
data?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type SerializedStyles } from '@emotion/react';
|
|
2
1
|
import { type MouseEvent, type HTMLAttributes } from 'react';
|
|
3
2
|
import type React from 'react';
|
|
3
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
4
4
|
import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
5
5
|
export declare enum CardActionIconButtonVariant {
|
|
6
6
|
default = "default",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl';
|
|
2
|
-
import { type Breakpoint } from '../common';
|
|
3
2
|
import { type TitleBoxIcon as TitleBoxIconType } from '../../../types';
|
|
3
|
+
import { type Breakpoint } from '../common';
|
|
4
4
|
export type TitleBoxProps = {
|
|
5
5
|
name?: string;
|
|
6
6
|
breakpoint: Breakpoint;
|
|
@@ -2,8 +2,8 @@ import { type FocusEvent, type MouseEvent } from 'react';
|
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
4
4
|
import { type CardDimensions, type CardAppearance } from '../../../types';
|
|
5
|
-
import { type Breakpoint } from '../common';
|
|
6
5
|
import { type MediaCardCursor } from '../../../types';
|
|
6
|
+
import { type Breakpoint } from '../common';
|
|
7
7
|
export interface WrapperProps {
|
|
8
8
|
testId?: string;
|
|
9
9
|
breakpoint: Breakpoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
2
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
3
|
+
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
4
4
|
export type MediaInlineAnalyticsErrorBoundaryProps = PropsWithChildren<{
|
|
5
5
|
isSelected?: boolean;
|
|
6
6
|
data?: {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import type { SsrMediaItem } from '@atlaskit/media-client/ssr-media-item';
|
|
|
9
9
|
import { type MediaFeatureFlags, type NumericalCardDimensions, type SSR } from '@atlaskit/media-common';
|
|
10
10
|
import type { MediaFilePreviewErrorPrimaryReason } from '@atlaskit/media-file-preview/media-file-preview-error';
|
|
11
11
|
import { type ViewerOptionsProps, type MediaViewerExtensions } from '@atlaskit/media-viewer';
|
|
12
|
-
import type { MediaCardError, MediaCardErrorPrimaryReason } from './MediaCardError';
|
|
13
12
|
import { type CardAction } from './card/actions';
|
|
13
|
+
import type { MediaCardError, MediaCardErrorPrimaryReason } from './MediaCardError';
|
|
14
14
|
export type CardStatus = 'uploading' | 'loading' | 'processing' | 'loading-preview' | 'complete' | 'error' | 'failed-processing';
|
|
15
15
|
export type FilePreviewStatus = {
|
|
16
16
|
hasFilesize: boolean;
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
+
|
|
6
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
8
|
import { jsx } from '@emotion/react';
|
|
9
|
+
|
|
8
10
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
9
11
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
10
12
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import { type FileIdentifier } from '@atlaskit/media-client';
|
|
3
4
|
import {
|
|
4
5
|
createStorybookMediaClientConfig,
|
|
5
6
|
imageFileId,
|
|
@@ -12,12 +13,11 @@ import {
|
|
|
12
13
|
wideImageFileId,
|
|
13
14
|
largeImageFileId,
|
|
14
15
|
} from '@atlaskit/media-test-helpers';
|
|
15
|
-
import { type FileIdentifier } from '@atlaskit/media-client';
|
|
16
16
|
|
|
17
17
|
import { createApiCards, actions } from '.';
|
|
18
|
-
import { CardLoading } from '../src/utils/lightCards/cardLoading';
|
|
19
|
-
import { CardError } from '../src/utils/lightCards/cardError';
|
|
20
18
|
import Card from '../src/card/cardLoader';
|
|
19
|
+
import { CardError } from '../src/utils/lightCards/cardError';
|
|
20
|
+
import { CardLoading } from '../src/utils/lightCards/cardLoading';
|
|
21
21
|
|
|
22
22
|
const mediaClientConfig = createStorybookMediaClientConfig();
|
|
23
23
|
// standard
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// eslint-disable-line no-console
|
|
2
2
|
|
|
3
3
|
import React, { type PropsWithChildren } from 'react';
|
|
4
|
-
import { IntlProvider } from 'react-intl';
|
|
5
4
|
|
|
6
|
-
import {
|
|
5
|
+
import { IntlProvider } from 'react-intl';
|
|
7
6
|
|
|
8
7
|
import FabricAnalyticsListeners from '@atlaskit/analytics-listeners/FabricAnalyticsListeners';
|
|
9
8
|
import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners/types';
|
|
@@ -19,9 +18,10 @@ import {
|
|
|
19
18
|
enableMediaUfoLogger,
|
|
20
19
|
FeatureFlagsWrapper,
|
|
21
20
|
} from '@atlaskit/media-test-helpers';
|
|
21
|
+
import { payloadPublisher } from '@atlassian/ufo/publisher';
|
|
22
22
|
|
|
23
|
-
import Card from '../src/card/cardLoader';
|
|
24
23
|
import { type CardAction } from '../src/card/actions';
|
|
24
|
+
import Card from '../src/card/cardLoader';
|
|
25
25
|
import { MediaCardError } from '../src/MediaCardError';
|
|
26
26
|
import type { CardFocusEvent, CardAppearance, CardEvent } from '../src/types';
|
|
27
27
|
import DevelopmentUseMessage from './developmentUseMessage';
|