@atlaskit/smart-card 26.42.11 → 26.43.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 +12 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/Action.js +8 -5
- package/dist/cjs/view/BlockCard/components/ActionList.js +11 -9
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +5 -2
- package/dist/cjs/view/BlockCard/components/Content.js +4 -1
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +4 -1
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +4 -1
- package/dist/cjs/view/BlockCard/components/Emoji.js +5 -2
- package/dist/cjs/view/BlockCard/components/Frame.js +6 -5
- package/dist/cjs/view/BlockCard/components/Link.js +4 -1
- package/dist/cjs/view/BlockCard/components/Name.js +4 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +6 -3
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +6 -5
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +4 -1
- package/dist/cjs/view/BlockCard/index.js +19 -16
- package/dist/cjs/view/BlockCard/views/ErroredView.js +12 -11
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +12 -9
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +11 -10
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +16 -13
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +7 -4
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +10 -9
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -4
- package/dist/cjs/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +5 -2
- package/dist/cjs/view/CardWithUrl/component.js +2 -0
- package/dist/cjs/view/CardWithUrl/loader.js +2 -0
- package/dist/cjs/view/EmbedCard/components/Frame.js +15 -12
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +2 -0
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +8 -5
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +12 -9
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +10 -8
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +14 -11
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +2 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +27 -24
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +9 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +6 -5
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +6 -5
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +10 -7
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +19 -16
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +14 -13
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +6 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +12 -10
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +2 -1
- package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +29 -26
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +19 -16
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +15 -12
- package/dist/cjs/view/HoverCard/index.js +9 -6
- package/dist/cjs/view/InlineCard/Frame/index.js +4 -2
- package/dist/cjs/view/InlineCard/Frame/styled.js +13 -4
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/cjs/view/InlineCard/index.js +2 -0
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +12 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Byline.js +4 -1
- package/dist/cjs/view/common/Icon.js +5 -4
- package/dist/cjs/view/common/Metadata.js +7 -4
- package/dist/cjs/view/common/MetadataList.js +5 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +5 -3
- package/dist/es2019/view/BlockCard/components/ActionList.js +10 -8
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +4 -2
- package/dist/es2019/view/BlockCard/components/Content.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/es2019/view/BlockCard/components/Emoji.js +3 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +5 -3
- package/dist/es2019/view/BlockCard/components/Link.js +3 -1
- package/dist/es2019/view/BlockCard/components/Name.js +3 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +5 -3
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +6 -4
- package/dist/es2019/view/BlockCard/components/UnresolvedText.js +3 -1
- package/dist/es2019/view/BlockCard/index.js +19 -16
- package/dist/es2019/view/BlockCard/views/ErroredView.js +10 -8
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +11 -9
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +10 -8
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +15 -13
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +6 -4
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +10 -8
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +6 -5
- package/dist/es2019/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +4 -2
- package/dist/es2019/view/CardWithUrl/component.js +2 -0
- package/dist/es2019/view/CardWithUrl/loader.js +2 -0
- package/dist/es2019/view/EmbedCard/components/Frame.js +4 -2
- package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +1 -0
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +7 -5
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +6 -4
- package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +10 -9
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +10 -8
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +4 -2
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +22 -20
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +6 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +10 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +6 -5
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +6 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -8
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +7 -5
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +3 -2
- package/dist/es2019/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +7 -5
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +9 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +13 -11
- package/dist/es2019/view/HoverCard/index.js +6 -4
- package/dist/es2019/view/InlineCard/Frame/index.js +4 -2
- package/dist/es2019/view/InlineCard/Frame/styled.js +17 -5
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/es2019/view/InlineCard/index.js +2 -0
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +11 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Byline.js +3 -1
- package/dist/es2019/view/common/Icon.js +6 -5
- package/dist/es2019/view/common/Metadata.js +6 -4
- package/dist/es2019/view/common/MetadataList.js +4 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +5 -3
- package/dist/esm/view/BlockCard/components/ActionList.js +11 -9
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +4 -2
- package/dist/esm/view/BlockCard/components/Content.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/esm/view/BlockCard/components/Emoji.js +3 -1
- package/dist/esm/view/BlockCard/components/Frame.js +5 -3
- package/dist/esm/view/BlockCard/components/Link.js +3 -1
- package/dist/esm/view/BlockCard/components/Name.js +3 -1
- package/dist/esm/view/BlockCard/components/Provider.js +5 -3
- package/dist/esm/view/BlockCard/components/Thumbnail.js +6 -4
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +3 -1
- package/dist/esm/view/BlockCard/index.js +19 -16
- package/dist/esm/view/BlockCard/views/ErroredView.js +10 -8
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +11 -9
- package/dist/esm/view/BlockCard/views/NotFoundView.js +10 -8
- package/dist/esm/view/BlockCard/views/ResolvedView.js +15 -13
- package/dist/esm/view/BlockCard/views/ResolvingView.js +6 -4
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +10 -8
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +6 -5
- package/dist/esm/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +4 -2
- package/dist/esm/view/CardWithUrl/component.js +2 -0
- package/dist/esm/view/CardWithUrl/loader.js +2 -0
- package/dist/esm/view/EmbedCard/components/Frame.js +4 -2
- package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +1 -0
- package/dist/esm/view/EmbedCard/views/ErroredView.js +7 -5
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +6 -4
- package/dist/esm/view/EmbedCard/views/UnresolvedView.js +10 -9
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +10 -8
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -2
- package/dist/esm/view/EmbedModal/components/link-info/index.js +22 -20
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +6 -5
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +10 -9
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -6
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +7 -6
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +6 -5
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +6 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -8
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +7 -5
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +3 -2
- package/dist/esm/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +7 -5
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +9 -7
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +13 -11
- package/dist/esm/view/HoverCard/index.js +6 -4
- package/dist/esm/view/InlineCard/Frame/index.js +4 -2
- package/dist/esm/view/InlineCard/Frame/styled.js +13 -4
- package/dist/esm/view/InlineCard/ResolvedView/index.js +2 -0
- package/dist/esm/view/InlineCard/index.js +2 -0
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +11 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Byline.js +3 -1
- package/dist/esm/view/common/Icon.js +6 -5
- package/dist/esm/view/common/Metadata.js +6 -4
- package/dist/esm/view/common/MetadataList.js +4 -2
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +2 -0
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/InlineCard/Frame/index.d.ts +2 -0
- package/dist/types/view/InlineCard/Frame/styled.d.ts +1 -0
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types/view/InlineCard/types.d.ts +1 -0
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +2 -0
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +2 -0
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +2 -0
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "26.
|
|
10
|
+
packageVersion: "26.43.0",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { N300 } from '@atlaskit/theme/colors';
|
|
2
4
|
import { gs, mq } from './utils';
|
|
3
5
|
export const Byline = ({
|
|
@@ -5,7 +7,7 @@ export const Byline = ({
|
|
|
5
7
|
children,
|
|
6
8
|
testId,
|
|
7
9
|
className
|
|
8
|
-
}) =>
|
|
10
|
+
}) => jsx("span", {
|
|
9
11
|
css: mq({
|
|
10
12
|
fontSize: gs(1.5),
|
|
11
13
|
lineHeight: gs(2.5),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import ImageLoader from 'react-render-image';
|
|
4
5
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
@@ -32,21 +33,21 @@ export const Icon = ({
|
|
|
32
33
|
testId = 'block-card-icon',
|
|
33
34
|
isFlexibleUi = false
|
|
34
35
|
}) => {
|
|
35
|
-
const placeholder = defaultIcon ||
|
|
36
|
+
const placeholder = defaultIcon || jsx(LinkIcon, {
|
|
36
37
|
label: "link",
|
|
37
38
|
size: "small",
|
|
38
39
|
testId: `${testId}-default`
|
|
39
40
|
});
|
|
40
|
-
const image = url &&
|
|
41
|
+
const image = url && jsx(ImageLoader, {
|
|
41
42
|
src: url,
|
|
42
|
-
loaded:
|
|
43
|
+
loaded: jsx("img", {
|
|
43
44
|
css: getImageStyles(isFlexibleUi),
|
|
44
45
|
src: url,
|
|
45
46
|
"data-testid": `${testId}-image`
|
|
46
47
|
}),
|
|
47
48
|
errored: placeholder
|
|
48
49
|
});
|
|
49
|
-
return
|
|
50
|
+
return jsx("span", {
|
|
50
51
|
css: getSpanStyles(isFlexibleUi),
|
|
51
52
|
"data-testid": testId,
|
|
52
53
|
className: blockCardIconImageClassName
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
2
4
|
import { N300 } from '@atlaskit/theme/colors';
|
|
3
5
|
export const Metadata = ({
|
|
@@ -8,7 +10,7 @@ export const Metadata = ({
|
|
|
8
10
|
}) => {
|
|
9
11
|
let metadataIcon = icon || null;
|
|
10
12
|
if (!metadataIcon && iconUrl) {
|
|
11
|
-
metadataIcon =
|
|
13
|
+
metadataIcon = jsx("img", {
|
|
12
14
|
src: iconUrl,
|
|
13
15
|
css: {
|
|
14
16
|
width: "var(--ds-space-100, 8px)",
|
|
@@ -16,13 +18,13 @@ export const Metadata = ({
|
|
|
16
18
|
}
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
|
-
const metadata =
|
|
21
|
+
const metadata = jsx("div", {
|
|
20
22
|
css: {
|
|
21
23
|
display: 'flex',
|
|
22
24
|
alignItems: 'center',
|
|
23
25
|
marginRight: "var(--ds-space-050, 4px)"
|
|
24
26
|
}
|
|
25
|
-
}, metadataIcon,
|
|
27
|
+
}, metadataIcon, jsx("span", {
|
|
26
28
|
css: {
|
|
27
29
|
fontSize: "var(--ds-space-150, 12px)",
|
|
28
30
|
color: `${`var(--ds-text-subtlest, ${N300})`}`,
|
|
@@ -31,7 +33,7 @@ export const Metadata = ({
|
|
|
31
33
|
}
|
|
32
34
|
}, text));
|
|
33
35
|
if (tooltip) {
|
|
34
|
-
return
|
|
36
|
+
return jsx(Tooltip, {
|
|
35
37
|
content: tooltip
|
|
36
38
|
}, metadata);
|
|
37
39
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import { Metadata } from './Metadata';
|
|
3
5
|
import { gs } from './utils';
|
|
4
6
|
export const metadataListClassName = 'smart-link-metadata-list';
|
|
@@ -6,7 +8,7 @@ export const MetadataList = ({
|
|
|
6
8
|
items,
|
|
7
9
|
testId
|
|
8
10
|
}) => {
|
|
9
|
-
return
|
|
11
|
+
return jsx("div", {
|
|
10
12
|
css: {
|
|
11
13
|
display: 'flex',
|
|
12
14
|
marginTop: gs(0.5),
|
|
@@ -17,7 +19,7 @@ export const MetadataList = ({
|
|
|
17
19
|
},
|
|
18
20
|
"data-testid": testId,
|
|
19
21
|
className: metadataListClassName
|
|
20
|
-
}, items.map(item =>
|
|
22
|
+
}, items.map(item => jsx(Metadata, _extends({
|
|
21
23
|
key: item.text
|
|
22
24
|
}, item))));
|
|
23
25
|
};
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.43.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import { useState } from 'react';
|
|
3
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
4
6
|
import { ActionIcon } from './ActionIcon';
|
|
@@ -13,7 +15,7 @@ export var Action = function Action(_ref) {
|
|
|
13
15
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14
16
|
state = _useState2[0],
|
|
15
17
|
setState = _useState2[1];
|
|
16
|
-
return
|
|
18
|
+
return jsx(Button, {
|
|
17
19
|
spacing: "compact",
|
|
18
20
|
appearance: buttonAppearance,
|
|
19
21
|
isLoading: state === 'loading',
|
|
@@ -34,12 +36,12 @@ export var Action = function Action(_ref) {
|
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
|
-
},
|
|
39
|
+
}, jsx("div", {
|
|
38
40
|
css: {
|
|
39
41
|
transition: 'opacity 0.3s',
|
|
40
42
|
opacity: state !== 'init' ? 0 : 1
|
|
41
43
|
}
|
|
42
|
-
}, text),
|
|
44
|
+
}, text), jsx(ActionIcon, {
|
|
43
45
|
state: state
|
|
44
46
|
}));
|
|
45
47
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
var _excluded = ["triggerRef"];
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
4
6
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
5
7
|
import Button from '@atlaskit/button/standard-button';
|
|
6
8
|
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
@@ -11,25 +13,25 @@ export var ActionList = function ActionList(_ref) {
|
|
|
11
13
|
var items = _ref.items;
|
|
12
14
|
var actionsToShow = items.slice(0, 2);
|
|
13
15
|
var actionsToList = items.slice(2, items.length);
|
|
14
|
-
return
|
|
16
|
+
return jsx("div", {
|
|
15
17
|
css: mq({
|
|
16
18
|
display: 'flex',
|
|
17
19
|
marginTop: [gs(2), 0]
|
|
18
20
|
})
|
|
19
|
-
},
|
|
20
|
-
return
|
|
21
|
+
}, jsx(ButtonGroup, null, actionsToShow.map(function (action) {
|
|
22
|
+
return jsx(Action, _extends({
|
|
21
23
|
key: action.id
|
|
22
24
|
}, action));
|
|
23
|
-
})), actionsToList.length ?
|
|
25
|
+
})), actionsToList.length ? jsx("div", {
|
|
24
26
|
css: {
|
|
25
27
|
marginLeft: gs(0.5)
|
|
26
28
|
}
|
|
27
|
-
},
|
|
29
|
+
}, jsx(DropdownMenu, {
|
|
28
30
|
trigger: function trigger(_ref2) {
|
|
29
31
|
var triggerRef = _ref2.triggerRef,
|
|
30
32
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
31
|
-
return
|
|
32
|
-
iconBefore:
|
|
33
|
+
return jsx(Button, _extends({}, props, {
|
|
34
|
+
iconBefore: jsx(MoreIcon, {
|
|
33
35
|
label: "more"
|
|
34
36
|
}),
|
|
35
37
|
ref: triggerRef,
|
|
@@ -40,10 +42,10 @@ export var ActionList = function ActionList(_ref) {
|
|
|
40
42
|
}));
|
|
41
43
|
},
|
|
42
44
|
placement: "right-start"
|
|
43
|
-
},
|
|
45
|
+
}, jsx(DropdownItemGroup, {
|
|
44
46
|
testId: "dropdown-menu"
|
|
45
47
|
}, actionsToList.map(function (actionToList) {
|
|
46
|
-
return
|
|
48
|
+
return jsx(DropdownItem, {
|
|
47
49
|
key: actionToList.id
|
|
48
50
|
}, actionToList.text);
|
|
49
51
|
})))) : null);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
2
4
|
import { mq } from '../../common/utils';
|
|
3
5
|
export var CollaboratorList = function CollaboratorList(_ref) {
|
|
@@ -11,11 +13,11 @@ export var CollaboratorList = function CollaboratorList(_ref) {
|
|
|
11
13
|
if (items.length === 0) {
|
|
12
14
|
return null;
|
|
13
15
|
}
|
|
14
|
-
return
|
|
16
|
+
return jsx("span", {
|
|
15
17
|
css: mq({
|
|
16
18
|
display: ['none', 'inherit']
|
|
17
19
|
})
|
|
18
|
-
},
|
|
20
|
+
}, jsx(AvatarGroup, {
|
|
19
21
|
maxCount: 4,
|
|
20
22
|
appearance: "stack",
|
|
21
23
|
size: "small",
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { gs, mq } from '../../common/utils';
|
|
2
4
|
export var blockCardContentClassName = 'block-card-content';
|
|
3
5
|
export var Content = function Content(_ref) {
|
|
4
6
|
var children = _ref.children,
|
|
5
7
|
_ref$isCompact = _ref.isCompact,
|
|
6
8
|
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact;
|
|
7
|
-
return
|
|
9
|
+
return jsx("div", {
|
|
8
10
|
css: mq({
|
|
9
11
|
padding: isCompact ? gs(1) : gs(2),
|
|
10
12
|
display: 'flex',
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { gs, mq } from '../../common/utils';
|
|
2
4
|
export var contentFooterClassName = 'smart-link-content-footer';
|
|
3
5
|
export var ContentFooter = function ContentFooter(_ref) {
|
|
4
6
|
var children = _ref.children,
|
|
5
7
|
_ref$hasSpaceBetween = _ref.hasSpaceBetween,
|
|
6
8
|
hasSpaceBetween = _ref$hasSpaceBetween === void 0 ? false : _ref$hasSpaceBetween;
|
|
7
|
-
return
|
|
9
|
+
return jsx("div", {
|
|
8
10
|
css: mq({
|
|
9
11
|
display: 'flex',
|
|
10
12
|
flexDirection: ['column', 'row'],
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
2
4
|
export var blockCardContentHeaderClassName = 'block-card-content-header';
|
|
3
5
|
export var ContentHeader = function ContentHeader(_ref) {
|
|
@@ -5,7 +7,7 @@ export var ContentHeader = function ContentHeader(_ref) {
|
|
|
5
7
|
link = _ref.link,
|
|
6
8
|
children = _ref.children;
|
|
7
9
|
var onMouseDown = useMouseDownEvent();
|
|
8
|
-
return
|
|
10
|
+
return jsx("a", {
|
|
9
11
|
onClick: onClick,
|
|
10
12
|
onMouseDown: onMouseDown,
|
|
11
13
|
href: link,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { gs } from '../../common/utils';
|
|
3
5
|
export var Emoji = function Emoji(_ref) {
|
|
4
6
|
var emoji = _ref.emoji;
|
|
5
|
-
return
|
|
7
|
+
return jsx("span", {
|
|
6
8
|
css: {
|
|
7
9
|
height: gs(2.5),
|
|
8
10
|
width: gs(2),
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
4
6
|
import React from 'react';
|
|
5
7
|
import { N20A, N30A, B200, N40A, N50A } from '@atlaskit/theme/colors';
|
|
6
8
|
import { gs, br, mq } from '../../common/utils';
|
|
@@ -10,7 +12,7 @@ export var Frame = function Frame() {
|
|
|
10
12
|
isHoverable: false,
|
|
11
13
|
isFluidHeight: false
|
|
12
14
|
};
|
|
13
|
-
return props.compact ?
|
|
15
|
+
return props.compact ? jsx(CompactFrame, props) : jsx(ExpandedFrame, props);
|
|
14
16
|
};
|
|
15
17
|
var sharedFrameStyles = {
|
|
16
18
|
maxWidth: gs(95),
|
|
@@ -25,7 +27,7 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
25
27
|
testId = _ref.testId,
|
|
26
28
|
className = _ref.className,
|
|
27
29
|
isFluidHeight = _ref.isFluidHeight;
|
|
28
|
-
return
|
|
30
|
+
return jsx("div", {
|
|
29
31
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
30
32
|
'&:hover': isHoverable ? {
|
|
31
33
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4064
|
|
@@ -51,7 +53,7 @@ export var CompactFrame = function CompactFrame(_ref2) {
|
|
|
51
53
|
testId = _ref2.testId,
|
|
52
54
|
className = _ref2.className,
|
|
53
55
|
inheritDimensions = _ref2.inheritDimensions;
|
|
54
|
-
return
|
|
56
|
+
return jsx("div", {
|
|
55
57
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
56
58
|
'&:hover': isHoverable ? {
|
|
57
59
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30A, ")")
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { B400 } from '@atlaskit/theme/colors';
|
|
2
4
|
export var Link = function Link(_ref) {
|
|
3
5
|
var url = _ref.url,
|
|
4
6
|
_ref$testId = _ref.testId,
|
|
5
7
|
testId = _ref$testId === void 0 ? 'block-card' : _ref$testId,
|
|
6
8
|
className = _ref.className;
|
|
7
|
-
return
|
|
9
|
+
return jsx("span", {
|
|
8
10
|
"data-testid": "".concat(testId, "-link"),
|
|
9
11
|
className: className,
|
|
10
12
|
css: {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
2
4
|
import { gs } from '../../common/utils';
|
|
3
5
|
export var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
@@ -7,7 +9,7 @@ export var Name = function Name(_ref) {
|
|
|
7
9
|
isLeftPadded = _ref$isLeftPadded === void 0 ? true : _ref$isLeftPadded,
|
|
8
10
|
testId = _ref.testId,
|
|
9
11
|
textColor = _ref.textColor;
|
|
10
|
-
return
|
|
12
|
+
return jsx("span", {
|
|
11
13
|
css: {
|
|
12
14
|
fontSize: "".concat(fontSize(), "px"),
|
|
13
15
|
fontWeight: 500,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { N300 } from '@atlaskit/theme/colors';
|
|
2
4
|
import { gs } from '../../common/utils';
|
|
3
5
|
export var Provider = function Provider(_ref) {
|
|
@@ -5,7 +7,7 @@ export var Provider = function Provider(_ref) {
|
|
|
5
7
|
icon = _ref.icon;
|
|
6
8
|
var iconToRender = icon || null;
|
|
7
9
|
if (typeof icon === 'string') {
|
|
8
|
-
iconToRender =
|
|
10
|
+
iconToRender = jsx("img", {
|
|
9
11
|
className: "smart-link-icon",
|
|
10
12
|
css: {
|
|
11
13
|
height: gs(1.5),
|
|
@@ -14,14 +16,14 @@ export var Provider = function Provider(_ref) {
|
|
|
14
16
|
src: icon
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
|
-
return
|
|
19
|
+
return jsx("div", {
|
|
18
20
|
css: {
|
|
19
21
|
display: 'flex',
|
|
20
22
|
alignItems: 'center',
|
|
21
23
|
fontSize: gs(1.5),
|
|
22
24
|
whiteSpace: 'normal'
|
|
23
25
|
}
|
|
24
|
-
}, iconToRender,
|
|
26
|
+
}, iconToRender, jsx("span", {
|
|
25
27
|
css: {
|
|
26
28
|
color: "var(--ds-text-subtlest, ".concat(N300, ")"),
|
|
27
29
|
margin: 0,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
4
6
|
import { gs, mq } from '../../common/utils';
|
|
5
7
|
export var Thumbnail = function Thumbnail(props) {
|
|
6
|
-
return props.color ?
|
|
8
|
+
return props.color ? jsx(ThumbnailWithBackground, props) : jsx(ThumbnailDefault, props);
|
|
7
9
|
};
|
|
8
10
|
var sharedStyles = {
|
|
9
11
|
// The dimensions of the image are set in this manner
|
|
@@ -14,7 +16,7 @@ var sharedStyles = {
|
|
|
14
16
|
export var ThumbnailDefault = function ThumbnailDefault(_ref) {
|
|
15
17
|
var src = _ref.src,
|
|
16
18
|
testId = _ref.testId;
|
|
17
|
-
return
|
|
19
|
+
return jsx("div", {
|
|
18
20
|
css: mq(_objectSpread(_objectSpread({}, sharedStyles), {}, {
|
|
19
21
|
backgroundSize: 'cover',
|
|
20
22
|
backgroundRepeat: 'no-repeat',
|
|
@@ -29,7 +31,7 @@ export var ThumbnailWithBackground = function ThumbnailWithBackground(_ref2) {
|
|
|
29
31
|
var src = _ref2.src,
|
|
30
32
|
color = _ref2.color,
|
|
31
33
|
testId = _ref2.testId;
|
|
32
|
-
return
|
|
34
|
+
return jsx("div", {
|
|
33
35
|
css: mq(_objectSpread(_objectSpread({}, sharedStyles), {}, {
|
|
34
36
|
backgroundColor: color,
|
|
35
37
|
display: 'flex',
|
|
@@ -38,7 +40,7 @@ export var ThumbnailWithBackground = function ThumbnailWithBackground(_ref2) {
|
|
|
38
40
|
})),
|
|
39
41
|
"data-testid": testId,
|
|
40
42
|
"data-trello-do-not-use-override": testId
|
|
41
|
-
},
|
|
43
|
+
}, jsx("img", {
|
|
42
44
|
src: src,
|
|
43
45
|
css: {
|
|
44
46
|
height: '90px',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
export var UnresolvedText = function UnresolvedText(_ref) {
|
|
2
4
|
var icon = _ref.icon,
|
|
3
5
|
text = _ref.text;
|
|
4
|
-
return
|
|
6
|
+
return jsx("span", {
|
|
5
7
|
css: {
|
|
6
8
|
display: 'flex',
|
|
7
9
|
alignItems: 'center'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import { getExtensionKey } from '../../state/helpers';
|
|
3
5
|
import { extractBlockProps } from '../../extractors/block';
|
|
4
6
|
import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
|
|
@@ -19,6 +21,7 @@ import FlexibleNotFoundViewOld from './views/flexible/FlexibleNotFoundViewOld';
|
|
|
19
21
|
import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
|
|
20
22
|
import FlexibleForbiddenViewOld from './views/flexible/FlexibleForbiddenViewOld';
|
|
21
23
|
import FlexibleErroredView from './views/flexible/FlexibleErroredView';
|
|
24
|
+
import { jsx } from '@emotion/react';
|
|
22
25
|
import { handleClickCommon } from './utils/handlers';
|
|
23
26
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
24
27
|
export { default as PreviewAction } from './actions/PreviewAction';
|
|
@@ -72,25 +75,25 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
72
75
|
switch (status) {
|
|
73
76
|
case 'pending':
|
|
74
77
|
case 'resolving':
|
|
75
|
-
return
|
|
78
|
+
return jsx(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
76
79
|
testId: 'smart-block-resolving-view'
|
|
77
80
|
}));
|
|
78
81
|
case 'resolved':
|
|
79
|
-
return
|
|
82
|
+
return jsx(FlexibleResolvedView, flexibleBlockCardProps);
|
|
80
83
|
case 'unauthorized':
|
|
81
|
-
return
|
|
84
|
+
return jsx(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
82
85
|
onAuthorize: handleAuthorize
|
|
83
86
|
}));
|
|
84
87
|
case 'forbidden':
|
|
85
|
-
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ?
|
|
88
|
+
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
86
89
|
onAuthorize: handleAuthorize
|
|
87
|
-
})) :
|
|
90
|
+
})) : jsx(FlexibleForbiddenViewOld, _extends({}, flexibleBlockCardProps, {
|
|
88
91
|
onAuthorize: handleAuthorize
|
|
89
92
|
}));
|
|
90
93
|
case 'not_found':
|
|
91
|
-
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ?
|
|
94
|
+
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
92
95
|
onAuthorize: handleAuthorize
|
|
93
|
-
})) :
|
|
96
|
+
})) : jsx(FlexibleNotFoundViewOld, _extends({}, flexibleBlockCardProps, {
|
|
94
97
|
onAuthorize: handleAuthorize
|
|
95
98
|
}));
|
|
96
99
|
case 'fallback':
|
|
@@ -103,14 +106,14 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
103
106
|
});
|
|
104
107
|
}
|
|
105
108
|
if (authFlow && authFlow === 'disabled') {
|
|
106
|
-
return
|
|
109
|
+
return jsx(CardLinkView, {
|
|
107
110
|
link: url,
|
|
108
111
|
isSelected: isSelected,
|
|
109
112
|
onClick: handleFrameClick,
|
|
110
113
|
testId: "".concat(testId, "-").concat(status)
|
|
111
114
|
});
|
|
112
115
|
}
|
|
113
|
-
return
|
|
116
|
+
return jsx(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
114
117
|
onAuthorize: handleAuthorize
|
|
115
118
|
}));
|
|
116
119
|
}
|
|
@@ -118,7 +121,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
118
121
|
switch (status) {
|
|
119
122
|
case 'pending':
|
|
120
123
|
case 'resolving':
|
|
121
|
-
return
|
|
124
|
+
return jsx(BlockCardResolvingView, {
|
|
122
125
|
testId: testId,
|
|
123
126
|
isSelected: isSelected
|
|
124
127
|
});
|
|
@@ -130,7 +133,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
130
133
|
url: url
|
|
131
134
|
});
|
|
132
135
|
}
|
|
133
|
-
return
|
|
136
|
+
return jsx(BlockCardResolvedView, _extends({}, resolvedViewProps, {
|
|
134
137
|
isSelected: isSelected,
|
|
135
138
|
testId: testId,
|
|
136
139
|
showActions: showActions,
|
|
@@ -144,7 +147,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
144
147
|
});
|
|
145
148
|
}
|
|
146
149
|
var unauthorizedViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
147
|
-
return
|
|
150
|
+
return jsx(BlockCardUnauthorisedView, _extends({}, unauthorizedViewProps, {
|
|
148
151
|
isSelected: isSelected,
|
|
149
152
|
testId: testId,
|
|
150
153
|
showActions: showActions,
|
|
@@ -165,7 +168,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
165
168
|
url: url,
|
|
166
169
|
context: (_forbiddenViewProps$c = forbiddenViewProps.context) === null || _forbiddenViewProps$c === void 0 ? void 0 : _forbiddenViewProps$c.text
|
|
167
170
|
});
|
|
168
|
-
return
|
|
171
|
+
return jsx(BlockCardForbiddenView, _extends({}, forbiddenViewProps, {
|
|
169
172
|
isSelected: isSelected,
|
|
170
173
|
showActions: showActions,
|
|
171
174
|
actions: handleAuthorize ? [ForbiddenAction(handleAuthorize)] : [],
|
|
@@ -180,7 +183,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
180
183
|
});
|
|
181
184
|
}
|
|
182
185
|
var notFoundViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
183
|
-
return
|
|
186
|
+
return jsx(BlockCardNotFoundView, _extends({}, notFoundViewProps, {
|
|
184
187
|
isSelected: isSelected,
|
|
185
188
|
testId: testId,
|
|
186
189
|
onClick: handleFrameClick
|
|
@@ -195,14 +198,14 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
195
198
|
});
|
|
196
199
|
}
|
|
197
200
|
if (authFlow && authFlow === 'disabled') {
|
|
198
|
-
return
|
|
201
|
+
return jsx(CardLinkView, {
|
|
199
202
|
link: url,
|
|
200
203
|
isSelected: isSelected,
|
|
201
204
|
onClick: handleFrameClick,
|
|
202
205
|
testId: "".concat(testId, "-").concat(status)
|
|
203
206
|
});
|
|
204
207
|
}
|
|
205
|
-
return
|
|
208
|
+
return jsx(BlockCardErroredView, {
|
|
206
209
|
link: url,
|
|
207
210
|
isSelected: isSelected,
|
|
208
211
|
onRetry: handleErrorRetry,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
4
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
7
|
import { useMemo } from 'react';
|
|
6
8
|
import { R300 } from '@atlaskit/theme/colors';
|
|
@@ -36,29 +38,29 @@ export var ErroredView = function ErroredView(_ref) {
|
|
|
36
38
|
var actions = useMemo(function () {
|
|
37
39
|
return onRetry ? [RetryAction(onRetry)] : [];
|
|
38
40
|
}, [onRetry]);
|
|
39
|
-
return
|
|
41
|
+
return jsx(Frame, {
|
|
40
42
|
isSelected: isSelected,
|
|
41
43
|
testId: testId,
|
|
42
44
|
className: blockCardErroredViewClassName,
|
|
43
45
|
isFluidHeight: true,
|
|
44
46
|
inheritDimensions: inheritDimensions
|
|
45
|
-
},
|
|
47
|
+
}, jsx(Content, {
|
|
46
48
|
isCompact: true
|
|
47
|
-
},
|
|
49
|
+
}, jsx("div", null, jsx(ContentHeader, {
|
|
48
50
|
onClick: handleClick,
|
|
49
51
|
link: link
|
|
50
|
-
},
|
|
52
|
+
}, jsx(Link, {
|
|
51
53
|
url: link,
|
|
52
54
|
testId: testId
|
|
53
|
-
})),
|
|
54
|
-
icon:
|
|
55
|
+
})), jsx(Byline, null, jsx(UnresolvedText, {
|
|
56
|
+
icon: jsx(WarningIcon, {
|
|
55
57
|
label: "errored-warning-icon",
|
|
56
58
|
size: "small",
|
|
57
59
|
primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
|
|
58
60
|
testId: "".concat(testId, "-warning-icon")
|
|
59
61
|
}),
|
|
60
|
-
text:
|
|
61
|
-
}))),
|
|
62
|
+
text: jsx(FormattedMessage, textDescriptionProps)
|
|
63
|
+
}))), jsx(ContentFooter, null, jsx(ActionList, {
|
|
62
64
|
items: actions
|
|
63
65
|
}))));
|
|
64
66
|
};
|