@atlaskit/smart-card 34.2.1 → 34.3.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 +17 -0
- package/dist/cjs/common/ui/icons/angle-brackets-icon.js +22 -0
- package/dist/cjs/common/ui/icons/audio-icon.js +22 -0
- package/dist/cjs/common/ui/icons/chart-bar-icon.js +22 -0
- package/dist/cjs/common/ui/icons/file-icon.js +22 -0
- package/dist/cjs/common/ui/icons/folder-icon.js +22 -0
- package/dist/cjs/common/ui/icons/image-icon.js +22 -0
- package/dist/cjs/common/ui/icons/list-bullet-icon.js +22 -0
- package/dist/cjs/common/ui/icons/page-icon.js +23 -0
- package/dist/cjs/common/ui/icons/video-icon.js +22 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +258 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +8 -13
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +5 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +33 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/block/indexOld.js +56 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/indexOld.js +37 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +18 -52
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +104 -0
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +4 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/common/ui/icons/angle-brackets-icon.js +15 -0
- package/dist/es2019/common/ui/icons/audio-icon.js +15 -0
- package/dist/es2019/common/ui/icons/chart-bar-icon.js +15 -0
- package/dist/es2019/common/ui/icons/file-icon.js +15 -0
- package/dist/es2019/common/ui/icons/folder-icon.js +15 -0
- package/dist/es2019/common/ui/icons/image-icon.js +15 -0
- package/dist/es2019/common/ui/icons/list-bullet-icon.js +15 -0
- package/dist/es2019/common/ui/icons/page-icon.js +16 -0
- package/dist/es2019/common/ui/icons/video-icon.js +15 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +56 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +32 -35
- package/dist/es2019/view/FlexibleCard/components/blocks/block/indexOld.js +62 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/indexOld.js +28 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +14 -62
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +106 -0
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +1 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/common/ui/icons/angle-brackets-icon.js +15 -0
- package/dist/esm/common/ui/icons/audio-icon.js +15 -0
- package/dist/esm/common/ui/icons/chart-bar-icon.js +15 -0
- package/dist/esm/common/ui/icons/file-icon.js +15 -0
- package/dist/esm/common/ui/icons/folder-icon.js +15 -0
- package/dist/esm/common/ui/icons/image-icon.js +15 -0
- package/dist/esm/common/ui/icons/list-bullet-icon.js +15 -0
- package/dist/esm/common/ui/icons/page-icon.js +16 -0
- package/dist/esm/common/ui/icons/video-icon.js +15 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +158 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +31 -20
- package/dist/esm/view/FlexibleCard/components/blocks/block/indexOld.js +50 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/indexOld.js +30 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +15 -53
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +98 -0
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +1 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/ui/icons/angle-brackets-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/audio-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/chart-bar-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/file-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/folder-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/image-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/list-bullet-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/page-icon.d.ts +7 -0
- package/dist/types/common/ui/icons/video-icon.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +3 -10
- package/dist/types/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +3 -13
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -0
- package/dist/types-ts4.5/common/ui/icons/angle-brackets-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/audio-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/chart-bar-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/file-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/folder-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/image-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/list-bullet-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/page-icon.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/icons/video-icon.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/index.d.ts +3 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/index.d.ts +3 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +1 -0
- package/package.json +8 -3
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import ImageLoader from 'react-render-image';
|
|
5
3
|
import LoadingSkeleton from '../loading-skeleton';
|
|
6
4
|
const ImageIcon = ({
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "34.
|
|
13
|
+
packageVersion: "34.3.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/source-code/16';
|
|
5
|
+
import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
|
|
6
|
+
var AngleBracketsIconWithColor = function AngleBracketsIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "blueBold",
|
|
9
|
+
icon: AngleBracketsIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
AngleBracketsIconWithColor.displayName = 'AngleBracketsIconWithColor';
|
|
15
|
+
export default AngleBracketsIconWithColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/audio/16';
|
|
5
|
+
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
6
|
+
var AudioIconWithColor = function AudioIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "redBold",
|
|
9
|
+
icon: AudioIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
AudioIconWithColor.displayName = 'AudioIconWithColor';
|
|
15
|
+
export default AudioIconWithColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/presentation/16';
|
|
5
|
+
import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
|
|
6
|
+
var ChartBarIconWithColor = function ChartBarIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "purpleBold",
|
|
9
|
+
icon: ChartBarIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
ChartBarIconWithColor.displayName = 'ChartBarIconWithColor';
|
|
15
|
+
export default ChartBarIconWithColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/generic/16';
|
|
5
|
+
import FileIcon from '@atlaskit/icon/core/file';
|
|
6
|
+
var FileIconWithColor = function FileIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "grayBold",
|
|
9
|
+
icon: FileIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
FileIconWithColor.displayName = 'FileIconWithColor';
|
|
15
|
+
export default FileIconWithColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/folder/16';
|
|
5
|
+
import FolderClosedIcon from '@atlaskit/icon/core/folder-closed';
|
|
6
|
+
var FolderClosedIconWithColor = function FolderClosedIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "blueBold",
|
|
9
|
+
icon: FolderClosedIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
FolderClosedIconWithColor.displayName = 'FolderClosedIconWithColor';
|
|
15
|
+
export default FolderClosedIconWithColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/image/16';
|
|
5
|
+
import ImageIcon from '@atlaskit/icon/core/image';
|
|
6
|
+
var ImageIconWithColor = function ImageIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "yellowBold",
|
|
9
|
+
icon: ImageIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
ImageIconWithColor.displayName = 'ImageIconWithColor';
|
|
15
|
+
export default ImageIconWithColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/spreadsheet/16';
|
|
5
|
+
import ListBulletedIcon from '@atlaskit/icon/core/list-bulleted';
|
|
6
|
+
var ListBulletedIconWithColor = function ListBulletedIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "greenBold",
|
|
9
|
+
icon: ListBulletedIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
ListBulletedIconWithColor.displayName = 'ListBulletedIconWithColor';
|
|
15
|
+
export default ListBulletedIconWithColor;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/document/16';
|
|
5
|
+
import PageIcon from '@atlaskit/icon/core/page';
|
|
6
|
+
var PageIconWithColor = function PageIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({
|
|
8
|
+
appearance: "blueBold",
|
|
9
|
+
icon: PageIcon,
|
|
10
|
+
size: "16"
|
|
11
|
+
}, props, {
|
|
12
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
PageIconWithColor.displayName = 'PageIconWithColor';
|
|
16
|
+
export default PageIconWithColor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IconTile } from '@atlaskit/icon';
|
|
4
|
+
import LegacyIcon from '@atlaskit/icon-file-type/glyph/video/16';
|
|
5
|
+
import VideoIcon from '@atlaskit/icon/core/video';
|
|
6
|
+
var VideoIconWithColor = function VideoIconWithColor(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconTile, _extends({}, props, {
|
|
8
|
+
appearance: "redBold",
|
|
9
|
+
icon: VideoIcon,
|
|
10
|
+
size: "16",
|
|
11
|
+
LEGACY_fallbackComponent: /*#__PURE__*/React.createElement(LegacyIcon, props)
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
VideoIconWithColor.displayName = 'VideoIconWithColor';
|
|
15
|
+
export default VideoIconWithColor;
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "34.
|
|
7
|
+
packageVersion: "34.3.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Loadable from 'react-loadable';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { themeObjectToString } from '@atlaskit/tokens';
|
|
7
8
|
export var isSpecialEvent = function isSpecialEvent(evt) {
|
|
8
9
|
return evt.isDefaultPrevented() && (isIframe() || isSpecialKey(evt) || isSpecialClick(evt));
|
|
@@ -30,7 +31,7 @@ export var getIconForFileType = function getIconForFileType(fileMimeType) {
|
|
|
30
31
|
if (!fileMimeType) {
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
var icon = typeToIcon[fileMimeType.toLowerCase()];
|
|
34
|
+
var icon = fg('platform-smart-card-icon-migration') ? getTypeToIconMap()[fileMimeType.toLowerCase()] : typeToIcon[fileMimeType.toLowerCase()];
|
|
34
35
|
if (!icon) {
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
@@ -57,7 +58,7 @@ export var getIconForFileType = function getIconForFileType(fileMimeType) {
|
|
|
57
58
|
});
|
|
58
59
|
};
|
|
59
60
|
export var getLabelForFileType = function getLabelForFileType(fileMimeType) {
|
|
60
|
-
var icon = typeToIcon[fileMimeType.toLowerCase()];
|
|
61
|
+
var icon = fg('platform-smart-card-icon-migration') ? getTypeToIconMap()[fileMimeType.toLowerCase()] : typeToIcon[fileMimeType.toLowerCase()];
|
|
61
62
|
if (!icon) {
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
@@ -218,6 +219,161 @@ var typeToIcon = {
|
|
|
218
219
|
return import('@atlaskit/icon-file-type/glyph/folder/16');
|
|
219
220
|
}]
|
|
220
221
|
};
|
|
222
|
+
var getTypeToIconMap = function getTypeToIconMap() {
|
|
223
|
+
return {
|
|
224
|
+
'text/plain': ['Document', function () {
|
|
225
|
+
return import( /* webpackChunkName: "@atlaskit-internal_page-icon" */'../common/ui/icons/page-icon');
|
|
226
|
+
}],
|
|
227
|
+
'application/vnd.oasis.opendocument.text': ['Document', function () {
|
|
228
|
+
return import( /* webpackChunkName: "@atlaskit-internal_page-icon" */'../common/ui/icons/page-icon');
|
|
229
|
+
}],
|
|
230
|
+
'application/vnd.apple.pages': ['Document', function () {
|
|
231
|
+
return import( /* webpackChunkName: "@atlaskit-internal_page-icon" */'../common/ui/icons/page-icon');
|
|
232
|
+
}],
|
|
233
|
+
'application/vnd.google-apps.document': ['Google Doc', function () {
|
|
234
|
+
return import('@atlaskit/icon-file-type/glyph/google-doc/16');
|
|
235
|
+
}],
|
|
236
|
+
'application/msword': ['Word document', function () {
|
|
237
|
+
return import('@atlaskit/icon-file-type/glyph/word-document/16');
|
|
238
|
+
}],
|
|
239
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': ['Word document', function () {
|
|
240
|
+
return import('@atlaskit/icon-file-type/glyph/word-document/16');
|
|
241
|
+
}],
|
|
242
|
+
'application/pdf': ['PDF document', function () {
|
|
243
|
+
return import('@atlaskit/icon-file-type/glyph/pdf-document/16');
|
|
244
|
+
}],
|
|
245
|
+
'application/vnd.oasis.opendocument.spreadsheet': ['Spreadsheet', function () {
|
|
246
|
+
return import( /* webpackChunkName: "@atlaskit-internal_list-bullet-icon" */'../common/ui/icons/list-bullet-icon');
|
|
247
|
+
}],
|
|
248
|
+
'application/vnd.apple.numbers': ['Spreadsheet', function () {
|
|
249
|
+
return import( /* webpackChunkName: "@atlaskit-internal_list-bullet-icon" */'../common/ui/icons/list-bullet-icon');
|
|
250
|
+
}],
|
|
251
|
+
'application/vnd.google-apps.spreadsheet': ['Google Sheet', function () {
|
|
252
|
+
return import('@atlaskit/icon-file-type/glyph/google-sheet/16');
|
|
253
|
+
}],
|
|
254
|
+
'application/vnd.ms-excel': ['Excel spreadsheet', function () {
|
|
255
|
+
return import('@atlaskit/icon-file-type/glyph/excel-spreadsheet/16');
|
|
256
|
+
}],
|
|
257
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['Excel spreadsheet', function () {
|
|
258
|
+
return import('@atlaskit/icon-file-type/glyph/excel-spreadsheet/16');
|
|
259
|
+
}],
|
|
260
|
+
'application/vnd.oasis.opendocument.presentation': ['Presentation', function () {
|
|
261
|
+
return import( /* webpackChunkName: "@atlaskit-internal_chart-bar-icon" */'../common/ui/icons/chart-bar-icon');
|
|
262
|
+
}],
|
|
263
|
+
'application/vnd.apple.keynote': ['Presentation', function () {
|
|
264
|
+
return import( /* webpackChunkName: "@atlaskit-internal_chart-bar-icon" */'../common/ui/icons/chart-bar-icon');
|
|
265
|
+
}],
|
|
266
|
+
'application/vnd.google-apps.presentation': ['Google Slide', function () {
|
|
267
|
+
return import('@atlaskit/icon-file-type/glyph/google-slide/16');
|
|
268
|
+
}],
|
|
269
|
+
'application/vnd.ms-powerpoint': ['PowerPoint presentation', function () {
|
|
270
|
+
return import('@atlaskit/icon-file-type/glyph/powerpoint-presentation/16');
|
|
271
|
+
}],
|
|
272
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation': ['PowerPoint presentation', function () {
|
|
273
|
+
return import('@atlaskit/icon-file-type/glyph/powerpoint-presentation/16');
|
|
274
|
+
}],
|
|
275
|
+
'application/vnd.google-apps.form': ['Google Form', function () {
|
|
276
|
+
return import('@atlaskit/icon-file-type/glyph/google-form/16');
|
|
277
|
+
}],
|
|
278
|
+
'image/png': ['Image', function () {
|
|
279
|
+
return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
|
|
280
|
+
}],
|
|
281
|
+
'image/jpeg': ['Image', function () {
|
|
282
|
+
return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
|
|
283
|
+
}],
|
|
284
|
+
'image/bmp': ['Image', function () {
|
|
285
|
+
return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
|
|
286
|
+
}],
|
|
287
|
+
'image/webp': ['Image', function () {
|
|
288
|
+
return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
|
|
289
|
+
}],
|
|
290
|
+
'image/svg+xml': ['Image', function () {
|
|
291
|
+
return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
|
|
292
|
+
}],
|
|
293
|
+
'image/gif': ['GIF', function () {
|
|
294
|
+
return import('@atlaskit/icon-file-type/glyph/gif/16');
|
|
295
|
+
}],
|
|
296
|
+
'audio/midi': ['Audio', function () {
|
|
297
|
+
return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
|
|
298
|
+
}],
|
|
299
|
+
'audio/mpeg': ['Audio', function () {
|
|
300
|
+
return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
|
|
301
|
+
}],
|
|
302
|
+
'audio/webm': ['Audio', function () {
|
|
303
|
+
return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
|
|
304
|
+
}],
|
|
305
|
+
'audio/ogg': ['Audio', function () {
|
|
306
|
+
return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
|
|
307
|
+
}],
|
|
308
|
+
'audio/wav': ['Audio', function () {
|
|
309
|
+
return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
|
|
310
|
+
}],
|
|
311
|
+
'video/mp4': ['Video', function () {
|
|
312
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
313
|
+
}],
|
|
314
|
+
'video/quicktime': ['Video', function () {
|
|
315
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
316
|
+
}],
|
|
317
|
+
'video/mov': ['Video', function () {
|
|
318
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
319
|
+
}],
|
|
320
|
+
'video/webm': ['Video', function () {
|
|
321
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
322
|
+
}],
|
|
323
|
+
'video/ogg': ['Video', function () {
|
|
324
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
325
|
+
}],
|
|
326
|
+
'video/x-ms-wmv': ['Video', function () {
|
|
327
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
328
|
+
}],
|
|
329
|
+
'video/x-msvideo': ['Video', function () {
|
|
330
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
331
|
+
}],
|
|
332
|
+
'application/zip': ['Archive', function () {
|
|
333
|
+
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
334
|
+
}],
|
|
335
|
+
'application/x-tar': ['Archive', function () {
|
|
336
|
+
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
337
|
+
}],
|
|
338
|
+
'application/x-gtar': ['Archive', function () {
|
|
339
|
+
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
340
|
+
}],
|
|
341
|
+
'application/x-7z-compressed': ['Archive', function () {
|
|
342
|
+
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
343
|
+
}],
|
|
344
|
+
'application/x-apple-diskimage': ['Archive', function () {
|
|
345
|
+
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
346
|
+
}],
|
|
347
|
+
'application/vnd.rar': ['Archive', function () {
|
|
348
|
+
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
349
|
+
}],
|
|
350
|
+
'application/dmg': ['Executable', function () {
|
|
351
|
+
return import('@atlaskit/icon-file-type/glyph/executable/16');
|
|
352
|
+
}],
|
|
353
|
+
'text/css': ['Source Code', function () {
|
|
354
|
+
return import( /* webpackChunkName: "@atlaskit-internal_angle-brackets-icon" */'../common/ui/icons/angle-brackets-icon');
|
|
355
|
+
}],
|
|
356
|
+
'text/html': ['Source Code', function () {
|
|
357
|
+
return import( /* webpackChunkName: "@atlaskit-internal_angle-brackets-icon" */'../common/ui/icons/angle-brackets-icon');
|
|
358
|
+
}],
|
|
359
|
+
'application/javascript': ['Source Code', function () {
|
|
360
|
+
return import( /* webpackChunkName: "@atlaskit-internal_angle-brackets-icon" */'../common/ui/icons/angle-brackets-icon');
|
|
361
|
+
}],
|
|
362
|
+
'application/octet-stream': ['Binary file', function () {
|
|
363
|
+
return import( /* webpackChunkName: "@atlaskit-internal_file-icon" */'../common/ui/icons/file-icon');
|
|
364
|
+
}],
|
|
365
|
+
'application/invision.prototype': ['Prototype', function () {
|
|
366
|
+
return import( /* webpackChunkName: "@atlaskit-internal_file-icon" */'../common/ui/icons/file-icon');
|
|
367
|
+
}],
|
|
368
|
+
// TODO: Figure a way to detect those
|
|
369
|
+
'application/sketch': ['Sketch', function () {
|
|
370
|
+
return import('@atlaskit/icon-file-type/glyph/sketch/16');
|
|
371
|
+
}],
|
|
372
|
+
folder: ['Folder', function () {
|
|
373
|
+
return import( /* webpackChunkName: "@atlaskit-internal_folder-icon" */'../common/ui/icons/folder-icon');
|
|
374
|
+
}]
|
|
375
|
+
};
|
|
376
|
+
};
|
|
221
377
|
export var getIframeSandboxAttribute = function getIframeSandboxAttribute(isTrusted) {
|
|
222
378
|
if (isTrusted) {
|
|
223
379
|
return undefined;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
3
|
import { SmartLinkSize } from '../../../../../constants';
|
|
6
4
|
import ActionButton from './action-button';
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["onClick"];
|
|
5
|
-
import
|
|
6
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
import { lazy, useCallback } from 'react';
|
|
4
|
+
import React, { lazy, useCallback } from 'react';
|
|
8
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
6
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
10
7
|
import { messages } from '../../../../../messages';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
._zulp1j6v{gap:1rem}
|
|
3
|
+
._zulp1k92{gap:1.25rem}
|
|
4
|
+
._zulp1kwk{gap:.5rem}
|
|
5
|
+
._zulp6mu8{gap:.25rem}._12ji1kw7{outline-color:inherit}
|
|
6
|
+
._12ji1snc{outline-color:currentColor!important}
|
|
7
|
+
._12y310yn{outline-width:medium!important}
|
|
8
|
+
._181uglyw{-webkit-user-select:none}
|
|
9
|
+
._18m915vq{overflow-y:hidden}
|
|
10
|
+
._18ql1j28{-webkit-tap-highlight-color:transparent}
|
|
11
|
+
._1bah1y6m{justify-content:flex-start}
|
|
12
|
+
._1e0c1txw{display:flex}
|
|
13
|
+
._1ifmglyw{-webkit-touch-callout:none}
|
|
14
|
+
._1ljq1j6v [data-separator]+[data-separator]:before{margin-right:1rem}
|
|
15
|
+
._1ljq1k92 [data-separator]+[data-separator]:before{margin-right:1.25rem}
|
|
16
|
+
._1ljq1kwk [data-separator]+[data-separator]:before{margin-right:.5rem}
|
|
17
|
+
._1ljq6mu8 [data-separator]+[data-separator]:before{margin-right:.25rem}
|
|
18
|
+
._1ouwidpf>*{min-width:0}
|
|
19
|
+
._1qu2agmp{outline-style:none!important}
|
|
20
|
+
._1reo15vq{overflow-x:hidden}
|
|
21
|
+
._1rkwglyw{-moz-user-select:none}
|
|
22
|
+
._1ul9idpf{min-width:0}
|
|
23
|
+
._1uzp1mp2 [data-separator]+[data-separator]:before{content:"•"}
|
|
24
|
+
._2lx21bp4{flex-direction:column}
|
|
25
|
+
._2lx2vrvc{flex-direction:row}
|
|
26
|
+
._4cvr1h6o{align-items:center}
|
|
27
|
+
._4cvr1y6m{align-items:flex-start}
|
|
28
|
+
._a7e8uxlv [data-smart-element=TargetBranch]+[data-smart-element=SourceBranch]:before{content:"←"}
|
|
29
|
+
._f6ju1ns9>[data-fit-to-content]{min-width:-moz-fit-content;min-width:fit-content}
|
|
30
|
+
._fiawglyw:empty{display:none}
|
|
31
|
+
._syaz1kw7{color:inherit}
|
|
32
|
+
._te17glyw{-ms-user-select:none}
|
|
33
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
34
|
+
._ytq1bjq5 [data-smart-element=SourceBranch]+[data-smart-element=TargetBranch]:before{content:"→"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @jsx jsx
|
|
6
|
-
*/
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
7
5
|
import { useEffect } from 'react';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
8
|
+
import { renderChildren } from '../utils';
|
|
9
|
+
import BlockOld from './indexOld';
|
|
10
|
+
var BaseBlockStyles = null;
|
|
11
|
+
var highlightRemoveStyles = null;
|
|
12
|
+
var gapsStyles = {
|
|
13
|
+
xlarge: "_zulp1k92 _1ljq1k92",
|
|
14
|
+
large: "_zulp1j6v _1ljq1j6v",
|
|
15
|
+
medium: "_zulp1kwk _1ljq1kwk",
|
|
16
|
+
small: "_zulp6mu8 _1ljq6mu8"
|
|
17
|
+
};
|
|
18
|
+
var directionStyles = {
|
|
19
|
+
vertical: "_2lx21bp4 _4cvr1y6m",
|
|
20
|
+
horizontal: "_2lx2vrvc _4cvr1h6o"
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
/**
|
|
@@ -31,20 +35,27 @@ var Block = function Block(_ref) {
|
|
|
31
35
|
size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
|
|
32
36
|
_ref$testId = _ref.testId,
|
|
33
37
|
testId = _ref$testId === void 0 ? 'smart-block' : _ref$testId,
|
|
34
|
-
|
|
38
|
+
className = _ref.className,
|
|
35
39
|
blockRef = _ref.blockRef,
|
|
36
40
|
onRender = _ref.onRender,
|
|
37
41
|
onTransitionEnd = _ref.onTransitionEnd;
|
|
38
42
|
useEffect(function () {
|
|
39
43
|
onRender && onRender();
|
|
40
44
|
}, [onRender]);
|
|
41
|
-
return
|
|
42
|
-
// eslint-disable-next-line @atlaskit/
|
|
43
|
-
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
47
|
+
className: ax(["_1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1ouwidpf _f6ju1ns9 _1uzp1mp2 _ytq1bjq5 _a7e8uxlv", "_12ji1snc _1qu2agmp _12y310yn _12ji1kw7 _syaz1kw7 _18ql1j28 _1ifmglyw _181uglyw _1rkwglyw _te17glyw _uiztglyw", directionStyles[direction], gapsStyles[size], className]),
|
|
44
48
|
"data-smart-block": true,
|
|
45
49
|
"data-testid": testId,
|
|
46
50
|
onTransitionEnd: onTransitionEnd,
|
|
47
51
|
ref: blockRef
|
|
48
52
|
}, renderChildren(children, size));
|
|
49
53
|
};
|
|
50
|
-
|
|
54
|
+
var Exported = function Exported(props) {
|
|
55
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
56
|
+
return /*#__PURE__*/React.createElement(Block, props);
|
|
57
|
+
} else {
|
|
58
|
+
return /*#__PURE__*/React.createElement(BlockOld, props);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export default Exported;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect } from 'react';
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
import { css, jsx } from '@emotion/react';
|
|
11
|
+
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
12
|
+
import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
|
|
13
|
+
var getBlockStyles = function getBlockStyles(direction, size
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
15
|
+
) {
|
|
16
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t", "\n\t", "\n justify-content: flex-start;\n\t[data-separator] + [data-separator]:before {\n\t\tcontent: '\u2022';\n\t\tmargin-right: ", "rem;\n\t}\n\t// Pull request elements: source branch \u2192 target branch\n\t[data-smart-element='", "']\n\t\t+ [data-smart-element='", "']:before {\n\t\tcontent: '\u2192';\n\t}\n\t// Pull request elements: target branch \u2190 source branch\n\t[data-smart-element='", "']\n\t\t+ [data-smart-element='", "']:before {\n\t\tcontent: '\u2190';\n\t}\n"])), getBaseStyles(direction, size), highlightRemoveStyles, getGapSize(size), ElementName.SourceBranch, ElementName.TargetBranch, ElementName.TargetBranch, ElementName.SourceBranch);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A block represents a collection of elements and actions that are arranged
|
|
21
|
+
* in a row. All elements and actions should be contained within a Block.
|
|
22
|
+
* @internal
|
|
23
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
24
|
+
* @see Action
|
|
25
|
+
*/
|
|
26
|
+
var Block = function Block(_ref) {
|
|
27
|
+
var children = _ref.children,
|
|
28
|
+
_ref$direction = _ref.direction,
|
|
29
|
+
direction = _ref$direction === void 0 ? SmartLinkDirection.Horizontal : _ref$direction,
|
|
30
|
+
_ref$size = _ref.size,
|
|
31
|
+
size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
|
|
32
|
+
_ref$testId = _ref.testId,
|
|
33
|
+
testId = _ref$testId === void 0 ? 'smart-block' : _ref$testId,
|
|
34
|
+
overrideCss = _ref.overrideCss,
|
|
35
|
+
blockRef = _ref.blockRef,
|
|
36
|
+
onRender = _ref.onRender,
|
|
37
|
+
onTransitionEnd = _ref.onTransitionEnd;
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
onRender && onRender();
|
|
40
|
+
}, [onRender]);
|
|
41
|
+
return jsx("div", {
|
|
42
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
43
|
+
css: [getBlockStyles(direction, size), overrideCss],
|
|
44
|
+
"data-smart-block": true,
|
|
45
|
+
"data-testid": testId,
|
|
46
|
+
onTransitionEnd: onTransitionEnd,
|
|
47
|
+
ref: blockRef
|
|
48
|
+
}, renderChildren(children, size));
|
|
49
|
+
};
|
|
50
|
+
export default Block;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["status", "testId", "overrideUrl"];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @jsx jsx
|
|
7
|
-
*/
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
6
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
7
|
+
import PreviewBlockOld from './indexOld';
|
|
11
8
|
import PreviewBlockResolvedView from './resolved';
|
|
12
9
|
/**
|
|
13
10
|
* Represents a PreviewBlock, which typically contains media or other large format content.
|
|
@@ -22,9 +19,16 @@ var PreviewBlock = function PreviewBlock(_ref) {
|
|
|
22
19
|
testId = _ref$testId === void 0 ? 'smart-block-preview' : _ref$testId,
|
|
23
20
|
overrideUrl = _ref.overrideUrl,
|
|
24
21
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
return
|
|
22
|
+
return /*#__PURE__*/React.createElement(PreviewBlockResolvedView, _extends({}, blockProps, {
|
|
26
23
|
testId: testId,
|
|
27
24
|
overrideUrl: overrideUrl
|
|
28
25
|
}));
|
|
29
26
|
};
|
|
30
|
-
|
|
27
|
+
var Exported = function Exported(props) {
|
|
28
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
29
|
+
return /*#__PURE__*/React.createElement(PreviewBlock, props);
|
|
30
|
+
} else {
|
|
31
|
+
return /*#__PURE__*/React.createElement(PreviewBlockOld, props);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export default Exported;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["status", "testId", "overrideUrl"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
|
+
import { SmartLinkStatus } from '../../../../../constants';
|
|
11
|
+
import PreviewBlockResolvedView from './resolved/indexOld';
|
|
12
|
+
/**
|
|
13
|
+
* Represents a PreviewBlock, which typically contains media or other large format content.
|
|
14
|
+
* @public
|
|
15
|
+
* @param {PreviewBlockProps} PreviewBlock
|
|
16
|
+
* @see Block
|
|
17
|
+
*/
|
|
18
|
+
var PreviewBlock = function PreviewBlock(_ref) {
|
|
19
|
+
var _ref$status = _ref.status,
|
|
20
|
+
status = _ref$status === void 0 ? SmartLinkStatus.Fallback : _ref$status,
|
|
21
|
+
_ref$testId = _ref.testId,
|
|
22
|
+
testId = _ref$testId === void 0 ? 'smart-block-preview' : _ref$testId,
|
|
23
|
+
overrideUrl = _ref.overrideUrl,
|
|
24
|
+
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
return jsx(PreviewBlockResolvedView, _extends({}, blockProps, {
|
|
26
|
+
testId: testId,
|
|
27
|
+
overrideUrl: overrideUrl
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
export default PreviewBlock;
|
package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
._10aa1osq [data-smart-element-media=image]{width:100%}
|
|
2
|
+
._154iidpf{top:0}
|
|
3
|
+
._18u01ivi{margin-left:calc(var(--container-gap-left)*-1)}
|
|
4
|
+
._1bsb795p{width:calc(var(--preview-block-width))}
|
|
5
|
+
._1ltvidpf{left:0}
|
|
6
|
+
._1t26n7od [data-smart-element-media=image]{aspect-ratio:unset}
|
|
7
|
+
._1xi2idpf{right:0}
|
|
8
|
+
._2hwxc10g{margin-right:calc(var(--container-gap-right)*-1)}
|
|
9
|
+
._94n5idpf{bottom:0}
|
|
10
|
+
._dmhj1ya9:last-of-type{margin-bottom:calc(var(--container-padding)*-1)}
|
|
11
|
+
._e0oi1ya9:first-of-type{margin-top:calc(var(--container-padding)*-1)}
|
|
12
|
+
._kqswstnw{position:absolute}
|
|
13
|
+
._mr051dfr [data-smart-element-media=image]{object-fit:cover}
|
|
14
|
+
._rjuj1osq [data-smart-element-media=image]{height:100%}
|
|
15
|
+
._ze72n7od [data-smart-element-media=image]{padding-top:unset}
|