@atlaskit/smart-card 38.5.1 → 38.5.2
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 +9 -0
- package/dist/cjs/extractors/flexible/extract-link-title.js +23 -0
- package/dist/cjs/extractors/flexible/index.js +13 -5
- package/dist/cjs/state/helpers.js +4 -1
- package/dist/cjs/state/hooks/useSmartLink.js +6 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +24 -15
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.js +15 -10
- package/dist/cjs/view/BlockCard/views/utils/index.js +10 -2
- package/dist/cjs/view/CardWithUrl/component.js +29 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/index.js +17 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +16 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +17 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +64 -17
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +19 -5
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +18 -6
- package/dist/cjs/view/FlexibleCard/components/container/index.js +12 -2
- package/dist/cjs/view/FlexibleCard/components/elements/title-element/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +3 -0
- package/dist/cjs/view/FlexibleCard/index.js +5 -2
- package/dist/cjs/view/FlexibleCard/utils.js +11 -18
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -1
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +21 -14
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +22 -14
- package/dist/cjs/view/HoverCard/styled.js +13 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/extract-link-title.js +17 -0
- package/dist/es2019/extractors/flexible/index.js +9 -1
- package/dist/es2019/state/helpers.js +1 -0
- package/dist/es2019/state/hooks/useSmartLink.js +6 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +25 -16
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.js +16 -11
- package/dist/es2019/view/BlockCard/views/utils/index.js +9 -1
- package/dist/es2019/view/CardWithUrl/component.js +30 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/index.js +17 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +17 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +17 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +48 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +20 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +19 -7
- package/dist/es2019/view/FlexibleCard/components/container/index.js +10 -2
- package/dist/es2019/view/FlexibleCard/components/elements/title-element/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +3 -0
- package/dist/es2019/view/FlexibleCard/index.js +5 -2
- package/dist/es2019/view/FlexibleCard/utils.js +14 -21
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +3 -2
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +21 -14
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +22 -14
- package/dist/es2019/view/HoverCard/styled.js +12 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/extract-link-title.js +17 -0
- package/dist/esm/extractors/flexible/index.js +13 -5
- package/dist/esm/state/helpers.js +3 -0
- package/dist/esm/state/hooks/useSmartLink.js +6 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +25 -16
- package/dist/esm/view/BlockCard/views/unresolved-view/index.js +16 -11
- package/dist/esm/view/BlockCard/views/utils/index.js +9 -1
- package/dist/esm/view/CardWithUrl/component.js +30 -9
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/index.js +17 -3
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +17 -5
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +17 -3
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +64 -17
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +20 -6
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +18 -6
- package/dist/esm/view/FlexibleCard/components/container/index.js +12 -2
- package/dist/esm/view/FlexibleCard/components/elements/title-element/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +3 -0
- package/dist/esm/view/FlexibleCard/index.js +5 -2
- package/dist/esm/view/FlexibleCard/utils.js +12 -19
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +3 -2
- package/dist/esm/view/HoverCard/components/views/forbidden/index.js +21 -14
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +22 -14
- package/dist/esm/view/HoverCard/styled.js +12 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/flexible/extract-link-title.d.ts +4 -0
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +11 -0
- package/dist/types/state/helpers.d.ts +1 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +2 -0
- package/dist/types/utils/analytics/types.d.ts +1 -1
- package/dist/types/view/BlockCard/views/utils/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +1 -1
- package/dist/types/view/HoverCard/styled.d.ts +4 -0
- package/dist/types-ts4.5/extractors/flexible/extract-link-title.d.ts +4 -0
- package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +11 -0
- package/dist/types-ts4.5/state/helpers.d.ts +1 -0
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +2 -0
- package/dist/types-ts4.5/utils/analytics/types.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/utils/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/styled.d.ts +4 -0
- package/package.json +7 -4
|
@@ -64,33 +64,41 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
64
64
|
fallbackElementHeight: snippetHeight.current,
|
|
65
65
|
response: cardState.details
|
|
66
66
|
});
|
|
67
|
-
var snippet = imagePreview ? null : /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
68
|
-
status: SmartLinkStatus.Resolved
|
|
67
|
+
var snippet = imagePreview ? null : /*#__PURE__*/React.createElement(SnippetBlock, _extends({}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
68
|
+
status: SmartLinkStatus.Resolved
|
|
69
|
+
}, {
|
|
69
70
|
className: ax([fg('platform-linking-visual-refresh-v1') && "_ca0q1b66"])
|
|
70
|
-
});
|
|
71
|
+
}));
|
|
71
72
|
var aiSummaryMinHeight = snippet ? snippetHeight.current : 0;
|
|
72
73
|
return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
|
|
73
|
-
metadataPosition: SmartLinkPosition.Top
|
|
74
|
-
|
|
74
|
+
metadataPosition: SmartLinkPosition.Top
|
|
75
|
+
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
76
|
+
status: SmartLinkStatus.Resolved
|
|
77
|
+
}, {
|
|
75
78
|
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _quenze3t _oebj1txw _13mh1pd9" : "_zulpu2gc _quenui7n _oebj1txw _x7z0u2gc _1ljqu2gc _13mh1pd9"])
|
|
76
|
-
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
79
|
+
})), /*#__PURE__*/React.createElement(MetadataBlock, _extends({
|
|
77
80
|
primary: primary,
|
|
78
81
|
secondary: secondary,
|
|
79
82
|
maxLines: 1,
|
|
80
|
-
size: SmartLinkSize.Medium
|
|
81
|
-
|
|
83
|
+
size: SmartLinkSize.Medium
|
|
84
|
+
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
85
|
+
status: SmartLinkStatus.Resolved
|
|
86
|
+
}, {
|
|
82
87
|
className: ax([!fg('platform-linking-visual-refresh-v1') && "_zulpidpf _2aco1o8v _fmt31ohn _yklxcxkx _w3mucxkx _ia0l11wp _3tmpcxkx"])
|
|
83
|
-
}), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
88
|
+
})), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, _extends({
|
|
84
89
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
85
|
-
placeholder: snippet
|
|
90
|
+
placeholder: snippet
|
|
91
|
+
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
86
92
|
status: SmartLinkStatus.Resolved
|
|
87
|
-
}) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
93
|
+
})) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, _extends({
|
|
88
94
|
testId: "hidden-snippet",
|
|
89
95
|
onRender: onSnippetRender,
|
|
90
|
-
blockRef: snippetBlockRef
|
|
91
|
-
|
|
96
|
+
blockRef: snippetBlockRef
|
|
97
|
+
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
98
|
+
status: SmartLinkStatus.Resolved
|
|
99
|
+
}, {
|
|
92
100
|
className: ax(["_3um015vq _kqswstnw"])
|
|
93
|
-
}), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
101
|
+
})), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
94
102
|
onClick: onActionClick,
|
|
95
103
|
spaceInline: "space.100",
|
|
96
104
|
className: ax([fg('platform-linking-visual-refresh-v1') && "_n3td1b66"])
|
|
@@ -2,10 +2,22 @@ import { layers } from '@atlaskit/theme/constants';
|
|
|
2
2
|
import { SmartLinkSize } from '../../constants';
|
|
3
3
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
4
4
|
export var HOVER_CARD_Z_INDEX = layers.modal();
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
8
|
+
*/
|
|
9
|
+
export var flexibleUiOptionsOld = {
|
|
10
|
+
hideBackground: true,
|
|
11
|
+
hideElevation: true,
|
|
12
|
+
hideLegacyButton: true,
|
|
13
|
+
size: SmartLinkSize.Medium,
|
|
14
|
+
zIndex: HOVER_CARD_Z_INDEX + 1
|
|
15
|
+
};
|
|
5
16
|
export var flexibleUiOptions = {
|
|
6
17
|
hideBackground: true,
|
|
7
18
|
hideElevation: true,
|
|
8
19
|
hideLegacyButton: true,
|
|
20
|
+
removeBlockRestriction: true,
|
|
9
21
|
size: SmartLinkSize.Medium,
|
|
10
22
|
zIndex: HOVER_CARD_Z_INDEX + 1
|
|
11
23
|
};
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "38.5.
|
|
16
|
+
packageVersion: "38.5.2",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { LinkTitle } from '../../state/flexible-ui-context/types';
|
|
3
|
+
declare const extractLinkTitle: (status?: string, propUrl?: string, response?: SmartLinkResponse, onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>) => LinkTitle | undefined;
|
|
4
|
+
export default extractLinkTitle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, origin, renderers, resolve, actionOptions, response, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, renderers, resolve, actionOptions, response, status, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
2
3
|
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
3
4
|
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
@@ -122,6 +123,10 @@ export type FlexibleUiDataContext = {
|
|
|
122
123
|
* @see LinkIcon
|
|
123
124
|
*/
|
|
124
125
|
linkIcon?: Icon;
|
|
126
|
+
/**
|
|
127
|
+
* Contains the link text and url
|
|
128
|
+
*/
|
|
129
|
+
linkTitle?: LinkTitle;
|
|
125
130
|
/**
|
|
126
131
|
* Contains the name of the entity that last modified the resource.
|
|
127
132
|
* @type string
|
|
@@ -212,6 +217,7 @@ export type FlexibleUiDataContext = {
|
|
|
212
217
|
* Contains the Title of the linked resource.
|
|
213
218
|
* @type string
|
|
214
219
|
* @see Title
|
|
220
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
215
221
|
*/
|
|
216
222
|
title?: string;
|
|
217
223
|
/**
|
|
@@ -246,6 +252,11 @@ export type FlexibleUiDataContext = {
|
|
|
246
252
|
tenantId?: string;
|
|
247
253
|
};
|
|
248
254
|
};
|
|
255
|
+
export type LinkTitle = {
|
|
256
|
+
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
257
|
+
text?: string;
|
|
258
|
+
url?: string;
|
|
259
|
+
};
|
|
249
260
|
export type Icon = {
|
|
250
261
|
icon?: IconType;
|
|
251
262
|
label?: string;
|
|
@@ -6,6 +6,7 @@ export declare const getByDefinitionId: (definitionId: string | undefined, store
|
|
|
6
6
|
export declare const getClickUrl: (url: string, jsonLd?: JsonLd.Response) => string;
|
|
7
7
|
export declare const getDefinitionId: (details?: JsonLd.Response) => string | undefined;
|
|
8
8
|
export declare const getExtensionKey: (details?: JsonLd.Response) => string | undefined;
|
|
9
|
+
export declare const getObjectAri: (details?: JsonLd.Response) => string | undefined;
|
|
9
10
|
export declare const getResourceType: (details?: JsonLd.Response) => string | undefined;
|
|
10
11
|
export declare const getProduct: (details?: JsonLd.Response) => DestinationProduct | string | undefined;
|
|
11
12
|
export declare const getSubproduct: (details?: JsonLd.Response) => DestinationSubproduct | string | undefined;
|
|
@@ -10,4 +10,6 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
10
10
|
config: import("@atlaskit/link-provider").CardAuthFlowOpts | undefined;
|
|
11
11
|
renderers: import("@atlaskit/link-provider").CardProviderRenderers | undefined;
|
|
12
12
|
error: Error | null;
|
|
13
|
+
isGlancePanelAvailable: ((props: import("packages/linking-platform/link-provider/dist/types/state/context/types").GlancePanelProps) => boolean) | undefined;
|
|
14
|
+
openGlancePanel: ((props: import("packages/linking-platform/link-provider/dist/types/state/context/types").GlancePanelProps) => void) | undefined;
|
|
13
15
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
|
|
2
2
|
export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
|
|
3
3
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
4
|
-
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
|
|
4
|
+
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'glancePanel' | 'unknown';
|
|
5
5
|
export type UiLinkClickedEventProps = {
|
|
6
6
|
/**
|
|
7
7
|
* Whether the click occurred with the left, middle or right mouse button
|
|
@@ -9,6 +9,10 @@ type SimulatedMetadata = {
|
|
|
9
9
|
topMetadata: ElementItem[];
|
|
10
10
|
bottomMetadata?: ElementItem[];
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
14
|
+
*/
|
|
15
|
+
export declare const FlexibleCardUiOptionsOld: InternalFlexibleUiOptions;
|
|
12
16
|
export declare const FlexibleCardUiOptions: InternalFlexibleUiOptions;
|
|
13
17
|
export declare const titleBlockOptions: Partial<TitleBlockProps>;
|
|
14
18
|
export declare const PreviewBlockOptions: Partial<PreviewBlockProps>;
|
|
@@ -12,5 +12,5 @@ import { type TitleBlockProps } from './types';
|
|
|
12
12
|
* @see TitleBlockResolvedViewNew
|
|
13
13
|
* @see TitleBlockErroredViewNew
|
|
14
14
|
*/
|
|
15
|
-
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, ...props }: TitleBlockProps) => JSX.Element;
|
|
15
|
+
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, ...props }: TitleBlockProps) => JSX.Element;
|
|
16
16
|
export default TitleBlock;
|
|
@@ -48,6 +48,7 @@ export type TitleBlockProps = {
|
|
|
48
48
|
/**
|
|
49
49
|
* Determines the onClick behaviour of the Link. By default used for analytics.
|
|
50
50
|
* @internal
|
|
51
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
51
52
|
*/
|
|
52
53
|
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
53
54
|
/**
|
|
@@ -88,6 +89,7 @@ export type TitleBlockProps = {
|
|
|
88
89
|
/**
|
|
89
90
|
* The theme of the link text. Can be Black or Link (default URL blue)
|
|
90
91
|
* @internal
|
|
92
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
91
93
|
*/
|
|
92
94
|
theme?: SmartLinkTheme;
|
|
93
95
|
/**
|
|
@@ -29,6 +29,7 @@ export type BlockProps = {
|
|
|
29
29
|
* The status of the Smart Link. Used to conditionally render different blocks
|
|
30
30
|
* when Smart Link is in different states.
|
|
31
31
|
* @internal
|
|
32
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
32
33
|
*/
|
|
33
34
|
status?: SmartLinkStatus;
|
|
34
35
|
/**
|
package/dist/types/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export type BaseIconElementProps = ElementProps & {
|
|
|
43
43
|
*/
|
|
44
44
|
declare const IconElement: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, }: BaseIconElementProps) => JSX.Element;
|
|
45
45
|
export default IconElement;
|
|
46
|
-
export declare const toLinkIconProps: (data: FlexibleUiDataContext[keyof FlexibleUiDataContext] | undefined, type: FlexibleUiDataContext['type']) => string[] | import("../../../../../../state/flexible-ui-context/types").LinkLocation | import("../../../../../../state/flexible-ui-context/types").Media | import("../../../../../../state/flexible-ui-context/types").FlexibleUiActions | import("../../../../../../state/flexible-ui-context/types").PreviewActionData | import("../../../../../../extractors/common/lozenge/types").LinkLozenge | import("@atlaskit/link-extractors").LinkPerson[] | {
|
|
46
|
+
export declare const toLinkIconProps: (data: FlexibleUiDataContext[keyof FlexibleUiDataContext] | undefined, type: FlexibleUiDataContext['type']) => string[] | import("../../../../../../state/flexible-ui-context/types").LinkTitle | import("../../../../../../state/flexible-ui-context/types").LinkLocation | import("../../../../../../state/flexible-ui-context/types").Media | import("../../../../../../state/flexible-ui-context/types").FlexibleUiActions | import("../../../../../../state/flexible-ui-context/types").PreviewActionData | import("../../../../../../extractors/common/lozenge/types").LinkLozenge | import("@atlaskit/link-extractors").LinkPerson[] | {
|
|
47
47
|
objectId?: string | undefined;
|
|
48
48
|
resourceType?: string | undefined;
|
|
49
49
|
tenantId?: string | undefined;
|
|
@@ -148,7 +148,7 @@ export type RetryOptions = {
|
|
|
148
148
|
*/
|
|
149
149
|
values?: Record<string, string>;
|
|
150
150
|
};
|
|
151
|
-
export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appearance' | 'id' | 'actionOptions' | 'origin' | 'onAuthorize' | 'renderers' | 'url'> & {
|
|
151
|
+
export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appearance' | 'id' | 'actionOptions' | 'origin' | 'onAuthorize' | 'onClick' | 'renderers' | 'url'> & {
|
|
152
152
|
fireEvent?: FireEventFunction;
|
|
153
153
|
status?: SmartLinkStatus;
|
|
154
154
|
response?: SmartLinkResponse;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { type InternalFlexibleUiOptions } from '../FlexibleCard/types';
|
|
2
2
|
export declare const HOVER_CARD_Z_INDEX: 510;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
5
|
+
*/
|
|
6
|
+
export declare const flexibleUiOptionsOld: InternalFlexibleUiOptions;
|
|
3
7
|
export declare const flexibleUiOptions: InternalFlexibleUiOptions;
|
|
4
8
|
export declare const CARD_WIDTH_REM = 24;
|
|
5
9
|
export declare const CARD_GAP_PX = 10;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type SmartLinkResponse } from '@atlaskit/linking-types';
|
|
2
|
+
import { LinkTitle } from '../../state/flexible-ui-context/types';
|
|
3
|
+
declare const extractLinkTitle: (status?: string, propUrl?: string, response?: SmartLinkResponse, onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>) => LinkTitle | undefined;
|
|
4
|
+
export default extractLinkTitle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, origin, renderers, resolve, actionOptions, response, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, renderers, resolve, actionOptions, response, status, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
2
3
|
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
3
4
|
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
@@ -122,6 +123,10 @@ export type FlexibleUiDataContext = {
|
|
|
122
123
|
* @see LinkIcon
|
|
123
124
|
*/
|
|
124
125
|
linkIcon?: Icon;
|
|
126
|
+
/**
|
|
127
|
+
* Contains the link text and url
|
|
128
|
+
*/
|
|
129
|
+
linkTitle?: LinkTitle;
|
|
125
130
|
/**
|
|
126
131
|
* Contains the name of the entity that last modified the resource.
|
|
127
132
|
* @type string
|
|
@@ -212,6 +217,7 @@ export type FlexibleUiDataContext = {
|
|
|
212
217
|
* Contains the Title of the linked resource.
|
|
213
218
|
* @type string
|
|
214
219
|
* @see Title
|
|
220
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
215
221
|
*/
|
|
216
222
|
title?: string;
|
|
217
223
|
/**
|
|
@@ -246,6 +252,11 @@ export type FlexibleUiDataContext = {
|
|
|
246
252
|
tenantId?: string;
|
|
247
253
|
};
|
|
248
254
|
};
|
|
255
|
+
export type LinkTitle = {
|
|
256
|
+
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
257
|
+
text?: string;
|
|
258
|
+
url?: string;
|
|
259
|
+
};
|
|
249
260
|
export type Icon = {
|
|
250
261
|
icon?: IconType;
|
|
251
262
|
label?: string;
|
|
@@ -6,6 +6,7 @@ export declare const getByDefinitionId: (definitionId: string | undefined, store
|
|
|
6
6
|
export declare const getClickUrl: (url: string, jsonLd?: JsonLd.Response) => string;
|
|
7
7
|
export declare const getDefinitionId: (details?: JsonLd.Response) => string | undefined;
|
|
8
8
|
export declare const getExtensionKey: (details?: JsonLd.Response) => string | undefined;
|
|
9
|
+
export declare const getObjectAri: (details?: JsonLd.Response) => string | undefined;
|
|
9
10
|
export declare const getResourceType: (details?: JsonLd.Response) => string | undefined;
|
|
10
11
|
export declare const getProduct: (details?: JsonLd.Response) => DestinationProduct | string | undefined;
|
|
11
12
|
export declare const getSubproduct: (details?: JsonLd.Response) => DestinationSubproduct | string | undefined;
|
|
@@ -10,4 +10,6 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
10
10
|
config: import("@atlaskit/link-provider").CardAuthFlowOpts | undefined;
|
|
11
11
|
renderers: import("@atlaskit/link-provider").CardProviderRenderers | undefined;
|
|
12
12
|
error: Error | null;
|
|
13
|
+
isGlancePanelAvailable: ((props: import("packages/linking-platform/link-provider/dist/types/state/context/types").GlancePanelProps) => boolean) | undefined;
|
|
14
|
+
openGlancePanel: ((props: import("packages/linking-platform/link-provider/dist/types/state/context/types").GlancePanelProps) => void) | undefined;
|
|
13
15
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
|
|
2
2
|
export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
|
|
3
3
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
4
|
-
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
|
|
4
|
+
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'glancePanel' | 'unknown';
|
|
5
5
|
export type UiLinkClickedEventProps = {
|
|
6
6
|
/**
|
|
7
7
|
* Whether the click occurred with the left, middle or right mouse button
|
|
@@ -9,6 +9,10 @@ type SimulatedMetadata = {
|
|
|
9
9
|
topMetadata: ElementItem[];
|
|
10
10
|
bottomMetadata?: ElementItem[];
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
14
|
+
*/
|
|
15
|
+
export declare const FlexibleCardUiOptionsOld: InternalFlexibleUiOptions;
|
|
12
16
|
export declare const FlexibleCardUiOptions: InternalFlexibleUiOptions;
|
|
13
17
|
export declare const titleBlockOptions: Partial<TitleBlockProps>;
|
|
14
18
|
export declare const PreviewBlockOptions: Partial<PreviewBlockProps>;
|
|
@@ -12,5 +12,5 @@ import { type TitleBlockProps } from './types';
|
|
|
12
12
|
* @see TitleBlockResolvedViewNew
|
|
13
13
|
* @see TitleBlockErroredViewNew
|
|
14
14
|
*/
|
|
15
|
-
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, ...props }: TitleBlockProps) => JSX.Element;
|
|
15
|
+
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, ...props }: TitleBlockProps) => JSX.Element;
|
|
16
16
|
export default TitleBlock;
|
|
@@ -48,6 +48,7 @@ export type TitleBlockProps = {
|
|
|
48
48
|
/**
|
|
49
49
|
* Determines the onClick behaviour of the Link. By default used for analytics.
|
|
50
50
|
* @internal
|
|
51
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
51
52
|
*/
|
|
52
53
|
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
53
54
|
/**
|
|
@@ -88,6 +89,7 @@ export type TitleBlockProps = {
|
|
|
88
89
|
/**
|
|
89
90
|
* The theme of the link text. Can be Black or Link (default URL blue)
|
|
90
91
|
* @internal
|
|
92
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
91
93
|
*/
|
|
92
94
|
theme?: SmartLinkTheme;
|
|
93
95
|
/**
|
|
@@ -29,6 +29,7 @@ export type BlockProps = {
|
|
|
29
29
|
* The status of the Smart Link. Used to conditionally render different blocks
|
|
30
30
|
* when Smart Link is in different states.
|
|
31
31
|
* @internal
|
|
32
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
32
33
|
*/
|
|
33
34
|
status?: SmartLinkStatus;
|
|
34
35
|
/**
|
package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export type BaseIconElementProps = ElementProps & {
|
|
|
43
43
|
*/
|
|
44
44
|
declare const IconElement: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, }: BaseIconElementProps) => JSX.Element;
|
|
45
45
|
export default IconElement;
|
|
46
|
-
export declare const toLinkIconProps: (data: FlexibleUiDataContext[keyof FlexibleUiDataContext] | undefined, type: FlexibleUiDataContext['type']) => string[] | import("../../../../../../state/flexible-ui-context/types").LinkLocation | import("../../../../../../state/flexible-ui-context/types").Media | import("../../../../../../state/flexible-ui-context/types").FlexibleUiActions | import("../../../../../../state/flexible-ui-context/types").PreviewActionData | import("../../../../../../extractors/common/lozenge/types").LinkLozenge | import("@atlaskit/link-extractors").LinkPerson[] | {
|
|
46
|
+
export declare const toLinkIconProps: (data: FlexibleUiDataContext[keyof FlexibleUiDataContext] | undefined, type: FlexibleUiDataContext['type']) => string[] | import("../../../../../../state/flexible-ui-context/types").LinkTitle | import("../../../../../../state/flexible-ui-context/types").LinkLocation | import("../../../../../../state/flexible-ui-context/types").Media | import("../../../../../../state/flexible-ui-context/types").FlexibleUiActions | import("../../../../../../state/flexible-ui-context/types").PreviewActionData | import("../../../../../../extractors/common/lozenge/types").LinkLozenge | import("@atlaskit/link-extractors").LinkPerson[] | {
|
|
47
47
|
objectId?: string | undefined;
|
|
48
48
|
resourceType?: string | undefined;
|
|
49
49
|
tenantId?: string | undefined;
|
|
@@ -148,7 +148,7 @@ export type RetryOptions = {
|
|
|
148
148
|
*/
|
|
149
149
|
values?: Record<string, string>;
|
|
150
150
|
};
|
|
151
|
-
export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appearance' | 'id' | 'actionOptions' | 'origin' | 'onAuthorize' | 'renderers' | 'url'> & {
|
|
151
|
+
export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appearance' | 'id' | 'actionOptions' | 'origin' | 'onAuthorize' | 'onClick' | 'renderers' | 'url'> & {
|
|
152
152
|
fireEvent?: FireEventFunction;
|
|
153
153
|
status?: SmartLinkStatus;
|
|
154
154
|
response?: SmartLinkResponse;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { type InternalFlexibleUiOptions } from '../FlexibleCard/types';
|
|
2
2
|
export declare const HOVER_CARD_Z_INDEX: 510;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
5
|
+
*/
|
|
6
|
+
export declare const flexibleUiOptionsOld: InternalFlexibleUiOptions;
|
|
3
7
|
export declare const flexibleUiOptions: InternalFlexibleUiOptions;
|
|
4
8
|
export declare const CARD_WIDTH_REM = 24;
|
|
5
9
|
export declare const CARD_GAP_PX = 10;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "38.5.
|
|
3
|
+
"version": "38.5.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@atlaskit/form": "^12.0.0",
|
|
40
40
|
"@atlaskit/frontend-utilities": "^3.0.0",
|
|
41
41
|
"@atlaskit/heading": "^5.2.0",
|
|
42
|
-
"@atlaskit/icon": "^26.
|
|
42
|
+
"@atlaskit/icon": "^26.3.0",
|
|
43
43
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
44
|
-
"@atlaskit/icon-lab": "^4.
|
|
44
|
+
"@atlaskit/icon-lab": "^4.16.0",
|
|
45
45
|
"@atlaskit/icon-object": "^7.1.0",
|
|
46
46
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
47
47
|
"@atlaskit/image": "^3.0.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/modal-dialog": "^14.2.0",
|
|
60
60
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
62
|
-
"@atlaskit/popup": "^4.
|
|
62
|
+
"@atlaskit/popup": "^4.3.0",
|
|
63
63
|
"@atlaskit/primitives": "^14.8.0",
|
|
64
64
|
"@atlaskit/section-message": "^8.2.0",
|
|
65
65
|
"@atlaskit/select": "^20.6.0",
|
|
@@ -254,6 +254,9 @@
|
|
|
254
254
|
},
|
|
255
255
|
"cc-ai-linking-platform-snippet-renderer": {
|
|
256
256
|
"type": "boolean"
|
|
257
|
+
},
|
|
258
|
+
"fun-1765_wire_up_glance_panel_to_smart_cards": {
|
|
259
|
+
"type": "boolean"
|
|
257
260
|
}
|
|
258
261
|
},
|
|
259
262
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"
|