@atlaskit/smart-card 26.56.0 → 26.56.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 +13 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -3
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +12 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -3
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +2 -2
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +12 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -3
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +2 -2
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +12 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +2 -1
- package/dist/types/view/HoverCard/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +2 -1
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.56.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#91072](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91072) [`77e51a1ecca8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77e51a1ecca8) - Integrate AI summary and action redesign feature flags in hover card.
|
|
8
|
+
|
|
9
|
+
## 26.56.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#91413](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91413) [`4aac6aa61313`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4aac6aa61313) - Hide HoverCard when clicking on PreviewAction from ActionBlock
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 26.56.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "26.56.
|
|
25
|
+
packageVersion: "26.56.2"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -82,12 +82,12 @@ var ActionStackItem = function ActionStackItem(_ref) {
|
|
|
82
82
|
as: "button",
|
|
83
83
|
xcss: [buttonStyles, xcss]
|
|
84
84
|
}, tooltipProps, {
|
|
85
|
-
onClick: onClick
|
|
85
|
+
onClick: onClick,
|
|
86
|
+
testId: testId
|
|
86
87
|
}), /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
87
88
|
alignBlock: "center",
|
|
88
89
|
grow: "fill",
|
|
89
|
-
space: space
|
|
90
|
-
testId: testId
|
|
90
|
+
space: space
|
|
91
91
|
}, icon, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
92
92
|
xcss: contentStyles
|
|
93
93
|
}, content)));
|
|
@@ -176,7 +176,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
176
176
|
}) : linkActions;
|
|
177
177
|
}, [hidePreviewButton, linkActions]);
|
|
178
178
|
var onActionClick = (0, _react2.useCallback)(function (actionId) {
|
|
179
|
-
if (actionId === 'preview-content') {
|
|
179
|
+
if (actionId === 'preview-content' || actionId === _constants.ActionName.PreviewAction) {
|
|
180
180
|
hideCard();
|
|
181
181
|
}
|
|
182
182
|
}, [hideCard]);
|
|
@@ -148,6 +148,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
148
148
|
data: data,
|
|
149
149
|
fallbackElementHeight: snippetHeight.current
|
|
150
150
|
});
|
|
151
|
+
var isActionBlockEnabled = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-action-redesign') ? true : false;
|
|
151
152
|
return /*#__PURE__*/_react.default.createElement(_FlexibleCard.default, flexibleCardProps, imagePreview, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, titleBlockProps, {
|
|
152
153
|
metadataPosition: _constants.SmartLinkPosition.Top
|
|
153
154
|
})), /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock, {
|
|
@@ -184,18 +185,25 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
184
185
|
}), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-hover-card-related-urls') && /*#__PURE__*/_react.default.createElement(_blocks.RelatedUrlsBlock, {
|
|
185
186
|
url: url,
|
|
186
187
|
size: _constants.SmartLinkSize.Small
|
|
187
|
-
}), isAISummaryEnabled
|
|
188
|
+
}), isAISummaryEnabled && /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
|
|
188
189
|
metadata: [{
|
|
189
190
|
name: _constants.ElementName.Provider
|
|
190
191
|
}],
|
|
191
192
|
actions: footerActions,
|
|
192
193
|
aiSummaryMinHeight: connectedAIBlockHeight.current
|
|
193
|
-
})
|
|
194
|
+
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
|
|
195
|
+
onClick: onActionClick,
|
|
196
|
+
spaceInline: "space.150"
|
|
197
|
+
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock, {
|
|
198
|
+
secondary: [{
|
|
199
|
+
name: _constants.ElementName.Provider,
|
|
200
|
+
testId: 'smart-element-provider'
|
|
201
|
+
}],
|
|
202
|
+
testId: "smart-block-action-footer"
|
|
203
|
+
}), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, {
|
|
194
204
|
actions: footerActions,
|
|
195
205
|
size: _constants.SmartLinkSize.Large,
|
|
196
206
|
overrideCss: _styled.footerBlockCss
|
|
197
|
-
}), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
|
|
198
|
-
spaceInline: "space.150"
|
|
199
207
|
}));
|
|
200
208
|
};
|
|
201
209
|
var _default = exports.default = HoverCardResolvedView;
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "26.56.
|
|
20
|
+
packageVersion: "26.56.2",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.56.
|
|
7
|
+
packageVersion: "26.56.2"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -72,12 +72,12 @@ const ActionStackItem = ({
|
|
|
72
72
|
as: "button",
|
|
73
73
|
xcss: [buttonStyles, xcss]
|
|
74
74
|
}, tooltipProps, {
|
|
75
|
-
onClick: onClick
|
|
75
|
+
onClick: onClick,
|
|
76
|
+
testId: testId
|
|
76
77
|
}), /*#__PURE__*/React.createElement(Inline, {
|
|
77
78
|
alignBlock: "center",
|
|
78
79
|
grow: "fill",
|
|
79
|
-
space: space
|
|
80
|
-
testId: testId
|
|
80
|
+
space: space
|
|
81
81
|
}, icon, /*#__PURE__*/React.createElement(Box, {
|
|
82
82
|
xcss: contentStyles
|
|
83
83
|
}, content))));
|
|
@@ -9,7 +9,7 @@ import { useSmartCardState as useLinkState } from '../../../state/store';
|
|
|
9
9
|
import HoverCardContent from '../components/HoverCardContent';
|
|
10
10
|
import CustomPopupContainer from '../components/CustomPopupContainer';
|
|
11
11
|
import { CARD_GAP_PX, HOVER_CARD_Z_INDEX } from '../styled';
|
|
12
|
-
import { CardDisplay } from '../../../constants';
|
|
12
|
+
import { ActionName, CardDisplay } from '../../../constants';
|
|
13
13
|
import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAnalyticsContext';
|
|
14
14
|
import { combineActionOptions } from '../../../utils/actions/combine-action-options';
|
|
15
15
|
import { useSmartCardActions } from '../../../state/actions';
|
|
@@ -153,7 +153,7 @@ export const HoverCardComponent = ({
|
|
|
153
153
|
return hidePreviewButton ? linkActions.filter(action => action.id !== 'preview-content') : linkActions;
|
|
154
154
|
}, [hidePreviewButton, linkActions]);
|
|
155
155
|
const onActionClick = useCallback(actionId => {
|
|
156
|
-
if (actionId === 'preview-content') {
|
|
156
|
+
if (actionId === 'preview-content' || actionId === ActionName.PreviewAction) {
|
|
157
157
|
hideCard();
|
|
158
158
|
}
|
|
159
159
|
}, [hideCard]);
|
|
@@ -141,6 +141,7 @@ const HoverCardResolvedView = ({
|
|
|
141
141
|
data: data,
|
|
142
142
|
fallbackElementHeight: snippetHeight.current
|
|
143
143
|
});
|
|
144
|
+
const isActionBlockEnabled = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? true : false;
|
|
144
145
|
return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
|
|
145
146
|
metadataPosition: SmartLinkPosition.Top
|
|
146
147
|
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
@@ -177,18 +178,25 @@ const HoverCardResolvedView = ({
|
|
|
177
178
|
}), getBooleanFF('platform.linking-platform.smart-card.enable-hover-card-related-urls') && /*#__PURE__*/React.createElement(RelatedUrlsBlock, {
|
|
178
179
|
url: url,
|
|
179
180
|
size: SmartLinkSize.Small
|
|
180
|
-
}), isAISummaryEnabled
|
|
181
|
+
}), isAISummaryEnabled && /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
181
182
|
metadata: [{
|
|
182
183
|
name: ElementName.Provider
|
|
183
184
|
}],
|
|
184
185
|
actions: footerActions,
|
|
185
186
|
aiSummaryMinHeight: connectedAIBlockHeight.current
|
|
186
|
-
})
|
|
187
|
+
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(ActionBlock, {
|
|
188
|
+
onClick: onActionClick,
|
|
189
|
+
spaceInline: "space.150"
|
|
190
|
+
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
191
|
+
secondary: [{
|
|
192
|
+
name: ElementName.Provider,
|
|
193
|
+
testId: 'smart-element-provider'
|
|
194
|
+
}],
|
|
195
|
+
testId: "smart-block-action-footer"
|
|
196
|
+
}), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
187
197
|
actions: footerActions,
|
|
188
198
|
size: SmartLinkSize.Large,
|
|
189
199
|
overrideCss: footerBlockCss
|
|
190
|
-
}), getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/React.createElement(ActionBlock, {
|
|
191
|
-
spaceInline: "space.150"
|
|
192
200
|
}));
|
|
193
201
|
};
|
|
194
202
|
export default HoverCardResolvedView;
|
|
@@ -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.56.
|
|
10
|
+
packageVersion: "26.56.2",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -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.56.
|
|
18
|
+
packageVersion: "26.56.2"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -72,12 +72,12 @@ var ActionStackItem = function ActionStackItem(_ref) {
|
|
|
72
72
|
as: "button",
|
|
73
73
|
xcss: [buttonStyles, xcss]
|
|
74
74
|
}, tooltipProps, {
|
|
75
|
-
onClick: onClick
|
|
75
|
+
onClick: onClick,
|
|
76
|
+
testId: testId
|
|
76
77
|
}), /*#__PURE__*/React.createElement(Inline, {
|
|
77
78
|
alignBlock: "center",
|
|
78
79
|
grow: "fill",
|
|
79
|
-
space: space
|
|
80
|
-
testId: testId
|
|
80
|
+
space: space
|
|
81
81
|
}, icon, /*#__PURE__*/React.createElement(Box, {
|
|
82
82
|
xcss: contentStyles
|
|
83
83
|
}, content)));
|
|
@@ -10,7 +10,7 @@ import { useSmartCardState as useLinkState } from '../../../state/store';
|
|
|
10
10
|
import HoverCardContent from '../components/HoverCardContent';
|
|
11
11
|
import CustomPopupContainer from '../components/CustomPopupContainer';
|
|
12
12
|
import { CARD_GAP_PX, HOVER_CARD_Z_INDEX } from '../styled';
|
|
13
|
-
import { CardDisplay } from '../../../constants';
|
|
13
|
+
import { ActionName, CardDisplay } from '../../../constants';
|
|
14
14
|
import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAnalyticsContext';
|
|
15
15
|
import { combineActionOptions } from '../../../utils/actions/combine-action-options';
|
|
16
16
|
import { useSmartCardActions } from '../../../state/actions';
|
|
@@ -165,7 +165,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
165
165
|
}) : linkActions;
|
|
166
166
|
}, [hidePreviewButton, linkActions]);
|
|
167
167
|
var onActionClick = useCallback(function (actionId) {
|
|
168
|
-
if (actionId === 'preview-content') {
|
|
168
|
+
if (actionId === 'preview-content' || actionId === ActionName.PreviewAction) {
|
|
169
169
|
hideCard();
|
|
170
170
|
}
|
|
171
171
|
}, [hideCard]);
|
|
@@ -139,6 +139,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
139
139
|
data: data,
|
|
140
140
|
fallbackElementHeight: snippetHeight.current
|
|
141
141
|
});
|
|
142
|
+
var isActionBlockEnabled = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? true : false;
|
|
142
143
|
return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
|
|
143
144
|
metadataPosition: SmartLinkPosition.Top
|
|
144
145
|
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
@@ -175,18 +176,25 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
175
176
|
}), getBooleanFF('platform.linking-platform.smart-card.enable-hover-card-related-urls') && /*#__PURE__*/React.createElement(RelatedUrlsBlock, {
|
|
176
177
|
url: url,
|
|
177
178
|
size: SmartLinkSize.Small
|
|
178
|
-
}), isAISummaryEnabled
|
|
179
|
+
}), isAISummaryEnabled && /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
179
180
|
metadata: [{
|
|
180
181
|
name: ElementName.Provider
|
|
181
182
|
}],
|
|
182
183
|
actions: footerActions,
|
|
183
184
|
aiSummaryMinHeight: connectedAIBlockHeight.current
|
|
184
|
-
})
|
|
185
|
+
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(ActionBlock, {
|
|
186
|
+
onClick: onActionClick,
|
|
187
|
+
spaceInline: "space.150"
|
|
188
|
+
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
189
|
+
secondary: [{
|
|
190
|
+
name: ElementName.Provider,
|
|
191
|
+
testId: 'smart-element-provider'
|
|
192
|
+
}],
|
|
193
|
+
testId: "smart-block-action-footer"
|
|
194
|
+
}), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
185
195
|
actions: footerActions,
|
|
186
196
|
size: SmartLinkSize.Large,
|
|
187
197
|
overrideCss: footerBlockCss
|
|
188
|
-
}), getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/React.createElement(ActionBlock, {
|
|
189
|
-
spaceInline: "space.150"
|
|
190
198
|
}));
|
|
191
199
|
};
|
|
192
200
|
export default HoverCardResolvedView;
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "26.56.
|
|
13
|
+
packageVersion: "26.56.2",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -2,6 +2,7 @@ import { AnalyticsFacade } from '../../../../../state/analytics';
|
|
|
2
2
|
import { LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
3
3
|
import { CardState } from '@atlaskit/linking-common';
|
|
4
4
|
import { HoverCardLoadingViewProps } from '../resolving/types';
|
|
5
|
+
import type { ActionName } from '../../../../../constants';
|
|
5
6
|
export type HoverCardResolvedProps = {
|
|
6
7
|
extensionKey?: string;
|
|
7
8
|
id?: string;
|
|
@@ -10,5 +11,5 @@ export type HoverCardResolvedProps = {
|
|
|
10
11
|
cardActions?: LinkAction[];
|
|
11
12
|
cardState: CardState;
|
|
12
13
|
isAISummaryEnabled?: boolean;
|
|
13
|
-
onActionClick: (actionId: string) => void;
|
|
14
|
+
onActionClick: (actionId: string | ActionName) => void;
|
|
14
15
|
} & HoverCardLoadingViewProps;
|
|
@@ -8,6 +8,7 @@ import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
|
8
8
|
import { MouseEventHandler, ReactElement } from 'react';
|
|
9
9
|
import { JsonLd } from 'json-ld-types';
|
|
10
10
|
import type { CardActionOptions } from '../Card/types';
|
|
11
|
+
import type { ActionName } from '../../constants';
|
|
11
12
|
export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
12
13
|
/**
|
|
13
14
|
* Unique ID for a hover card. Used for analytics.
|
|
@@ -92,7 +93,7 @@ export type HoverCardContentProps = {
|
|
|
92
93
|
cardActions?: LinkAction[];
|
|
93
94
|
cardState: CardState;
|
|
94
95
|
renderers?: CardProviderRenderers;
|
|
95
|
-
onActionClick: (actionId: string) => void;
|
|
96
|
+
onActionClick: (actionId: string | ActionName) => void;
|
|
96
97
|
onResolve: () => void;
|
|
97
98
|
url: string;
|
|
98
99
|
onMouseEnter?: MouseEventHandler;
|
|
@@ -2,6 +2,7 @@ import { AnalyticsFacade } from '../../../../../state/analytics';
|
|
|
2
2
|
import { LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
3
3
|
import { CardState } from '@atlaskit/linking-common';
|
|
4
4
|
import { HoverCardLoadingViewProps } from '../resolving/types';
|
|
5
|
+
import type { ActionName } from '../../../../../constants';
|
|
5
6
|
export type HoverCardResolvedProps = {
|
|
6
7
|
extensionKey?: string;
|
|
7
8
|
id?: string;
|
|
@@ -10,5 +11,5 @@ export type HoverCardResolvedProps = {
|
|
|
10
11
|
cardActions?: LinkAction[];
|
|
11
12
|
cardState: CardState;
|
|
12
13
|
isAISummaryEnabled?: boolean;
|
|
13
|
-
onActionClick: (actionId: string) => void;
|
|
14
|
+
onActionClick: (actionId: string | ActionName) => void;
|
|
14
15
|
} & HoverCardLoadingViewProps;
|
|
@@ -8,6 +8,7 @@ import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
|
8
8
|
import { MouseEventHandler, ReactElement } from 'react';
|
|
9
9
|
import { JsonLd } from 'json-ld-types';
|
|
10
10
|
import type { CardActionOptions } from '../Card/types';
|
|
11
|
+
import type { ActionName } from '../../constants';
|
|
11
12
|
export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
12
13
|
/**
|
|
13
14
|
* Unique ID for a hover card. Used for analytics.
|
|
@@ -92,7 +93,7 @@ export type HoverCardContentProps = {
|
|
|
92
93
|
cardActions?: LinkAction[];
|
|
93
94
|
cardState: CardState;
|
|
94
95
|
renderers?: CardProviderRenderers;
|
|
95
|
-
onActionClick: (actionId: string) => void;
|
|
96
|
+
onActionClick: (actionId: string | ActionName) => void;
|
|
96
97
|
onResolve: () => void;
|
|
97
98
|
url: string;
|
|
98
99
|
onMouseEnter?: MouseEventHandler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.56.
|
|
3
|
+
"version": "26.56.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
35
35
|
"@atlaskit/badge": "^16.0.0",
|
|
36
36
|
"@atlaskit/button": "^17.12.0",
|
|
37
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
37
|
+
"@atlaskit/dropdown-menu": "^12.9.0",
|
|
38
38
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
39
39
|
"@atlaskit/icon": "^22.1.0",
|
|
40
40
|
"@atlaskit/icon-file-type": "^6.4.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/linking-types": "^8.8.0",
|
|
49
49
|
"@atlaskit/logo": "^13.15.0",
|
|
50
50
|
"@atlaskit/lozenge": "^11.6.0",
|
|
51
|
-
"@atlaskit/modal-dialog": "^12.
|
|
51
|
+
"@atlaskit/modal-dialog": "^12.11.0",
|
|
52
52
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
54
54
|
"@atlaskit/popup": "^1.14.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@af/integration-testing": "*",
|
|
85
85
|
"@af/visual-regression": "*",
|
|
86
86
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
87
|
-
"@atlaskit/css-reset": "^6.
|
|
87
|
+
"@atlaskit/css-reset": "^6.9.0",
|
|
88
88
|
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
89
89
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
90
90
|
"@atlaskit/ssr": "*",
|