@atlaskit/smart-card 26.66.0 → 26.68.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 +29 -0
- package/CONTRIBUTING.md +3 -0
- package/dist/cjs/constants.js +1 -0
- package/dist/cjs/extractors/flexible/actions/extract-automation-action.js +53 -0
- package/dist/cjs/extractors/flexible/actions/index.js +2 -1
- package/dist/cjs/messages.js +50 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
- package/dist/cjs/state/hooks/use-ai-summary/index.js +3 -2
- package/dist/cjs/utils/ai-summary.js +4 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/Card/types.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +7 -5
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +57 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/manaul-triggers-icon/index.js +31 -0
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +19 -8
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/utils.js +24 -0
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +7 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +8 -3
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +13 -0
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +3 -7
- package/dist/cjs/view/HoverCard/components/views/resolved/redesign.js +81 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/extractors/flexible/actions/extract-automation-action.js +48 -0
- package/dist/es2019/extractors/flexible/actions/index.js +2 -0
- package/dist/es2019/messages.js +50 -0
- package/dist/es2019/state/flexible-ui-context/types.js +3 -1
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
- package/dist/es2019/state/hooks/use-ai-summary/index.js +3 -2
- package/dist/es2019/utils/ai-summary.js +4 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/Card/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +42 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/manaul-triggers-icon/index.js +23 -0
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +19 -5
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/utils.js +16 -0
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +7 -7
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +8 -3
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +13 -0
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +4 -8
- package/dist/es2019/view/HoverCard/components/views/resolved/redesign.js +73 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/constants.js +1 -0
- package/dist/esm/extractors/flexible/actions/extract-automation-action.js +46 -0
- package/dist/esm/extractors/flexible/actions/index.js +2 -1
- package/dist/esm/messages.js +50 -0
- package/dist/esm/state/flexible-ui-context/types.js +3 -1
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
- package/dist/esm/state/hooks/use-ai-summary/index.js +3 -2
- package/dist/esm/utils/ai-summary.js +4 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/Card/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +7 -5
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +47 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/manaul-triggers-icon/index.js +24 -0
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +19 -8
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/utils.js +18 -0
- package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +7 -7
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +8 -3
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +13 -0
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +4 -8
- package/dist/esm/view/HoverCard/components/views/resolved/redesign.js +71 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/__fixtures__/flexible-ui-data-context.d.ts +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/extractors/flexible/actions/extract-automation-action.d.ts +3 -0
- package/dist/types/extractors/flexible/actions/index.d.ts +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +12 -0
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/actions/action/server-action/index.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/actions/action/server-action/types.d.ts +4 -3
- package/dist/types/view/FlexibleCard/components/actions/automation-action/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/manaul-triggers-icon/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/actions/follow-action/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/follow-action/utils.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +7 -2
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +5 -5
- package/dist/types/view/HoverCard/components/views/resolved/redesign.d.ts +4 -0
- package/dist/types-ts4.5/__fixtures__/flexible-ui-data-context.d.ts +1 -1
- package/dist/types-ts4.5/constants.d.ts +1 -0
- package/dist/types-ts4.5/extractors/flexible/actions/extract-automation-action.d.ts +3 -0
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +1 -1
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +12 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +2 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/server-action/index.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/server-action/types.d.ts +4 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/manaul-triggers-icon/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/utils.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +7 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +5 -5
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/redesign.d.ts +4 -0
- package/package.json +6 -3
|
@@ -63,7 +63,8 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
63
63
|
testId = props.testId,
|
|
64
64
|
_props$aiSummaryMinHe = props.aiSummaryMinHeight,
|
|
65
65
|
aiSummaryMinHeight = _props$aiSummaryMinHe === void 0 ? 0 : _props$aiSummaryMinHe,
|
|
66
|
-
metadata = props.metadata
|
|
66
|
+
metadata = props.metadata,
|
|
67
|
+
placeholder = props.placeholder;
|
|
67
68
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
68
69
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
69
70
|
var context = useFlexibleUiContext();
|
|
@@ -89,6 +90,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
89
90
|
status === 'loading' && !!content;
|
|
90
91
|
var isSummarisedOnMountRef = useRef(status === 'done');
|
|
91
92
|
var isErroredOnMountRef = useRef(status === 'error');
|
|
93
|
+
var minHeight = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
|
|
92
94
|
useEffect(function () {
|
|
93
95
|
// if the error was apparent on mount and the status is changed to loading we can
|
|
94
96
|
// clear the initial error on mount state
|
|
@@ -131,6 +133,9 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
131
133
|
});
|
|
132
134
|
}
|
|
133
135
|
}, [onActionMenuOpenChange]);
|
|
136
|
+
if (!showAISummary && getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign')) {
|
|
137
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, placeholder);
|
|
138
|
+
}
|
|
134
139
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
135
140
|
direction: SmartLinkDirection.Vertical,
|
|
136
141
|
testId: "".concat(testId, "-resolved-view")
|
|
@@ -144,12 +149,12 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
144
149
|
}), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
|
|
145
150
|
fromCache: isSummarisedOnMountRef.current
|
|
146
151
|
}), /*#__PURE__*/React.createElement(MotionWrapper, {
|
|
147
|
-
minHeight:
|
|
152
|
+
minHeight: minHeight,
|
|
148
153
|
show: showAISummary,
|
|
149
154
|
showTransition: !isSummarisedOnMountRef.current
|
|
150
155
|
}, /*#__PURE__*/React.createElement(AISummary, {
|
|
151
156
|
testId: "".concat(testId, "-ai-summary"),
|
|
152
|
-
minHeight:
|
|
157
|
+
minHeight: minHeight,
|
|
153
158
|
content: content,
|
|
154
159
|
showIcon: !getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && isSummarisedOnMountRef.current
|
|
155
160
|
})), !getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Inline, {
|
|
@@ -16,6 +16,7 @@ import { getMetadata } from '../utils';
|
|
|
16
16
|
import HoverCardLoadingView from './views/resolving';
|
|
17
17
|
import HoverCardUnauthorisedView from './views/unauthorised';
|
|
18
18
|
import HoverCardResolvedView from './views/resolved';
|
|
19
|
+
import HoverCardRedesignedResolvedView from './views/resolved/redesign';
|
|
19
20
|
import { FormattedMessage } from 'react-intl-next';
|
|
20
21
|
import { messages } from '../../../messages';
|
|
21
22
|
import { fireLinkClickedEvent } from '../../../utils/analytics/click';
|
|
@@ -180,6 +181,18 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
183
|
if (cardState.status === 'resolved') {
|
|
184
|
+
if (getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign')) {
|
|
185
|
+
return jsx(HoverCardRedesignedResolvedView, {
|
|
186
|
+
analytics: analytics,
|
|
187
|
+
cardState: cardState,
|
|
188
|
+
extensionKey: extensionKey,
|
|
189
|
+
flexibleCardProps: flexibleCardProps,
|
|
190
|
+
isAISummaryEnabled: isAISummaryEnabled,
|
|
191
|
+
onActionClick: onActionClick,
|
|
192
|
+
titleBlockProps: titleBlockProps,
|
|
193
|
+
url: url
|
|
194
|
+
});
|
|
195
|
+
}
|
|
183
196
|
return jsx(HoverCardResolvedView, {
|
|
184
197
|
id: id,
|
|
185
198
|
url: url,
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
4
4
|
import { ActionName, CardDisplay, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkDirection } from '../../../../../constants';
|
|
5
|
-
import { FooterBlock, MetadataBlock, RelatedUrlsBlock, SnippetBlock, TitleBlock, AISummaryBlock, CustomBlock
|
|
5
|
+
import { FooterBlock, MetadataBlock, RelatedUrlsBlock, SnippetBlock, TitleBlock, AISummaryBlock, CustomBlock } from '../../../../FlexibleCard/components/blocks';
|
|
6
6
|
import { footerBlockCss, hiddenSnippetStyles, metadataBlockCss } from './styled';
|
|
7
7
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
8
8
|
import { getMetadata } from '../../../utils';
|
|
@@ -77,7 +77,7 @@ var ConnectedAIBlock = function ConnectedAIBlock(_ref) {
|
|
|
77
77
|
return showData ? /*#__PURE__*/React.createElement(React.Fragment, null, !imagePreview && /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
78
78
|
testId: 'connected-AI',
|
|
79
79
|
status: SmartLinkStatus.Resolved
|
|
80
|
-
}),
|
|
80
|
+
}), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
81
81
|
primary: bottomPrimary,
|
|
82
82
|
size: SmartLinkSize.Large,
|
|
83
83
|
overrideCss: metadataBlockCss,
|
|
@@ -136,7 +136,6 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
136
136
|
data: data,
|
|
137
137
|
fallbackElementHeight: snippetHeight.current
|
|
138
138
|
});
|
|
139
|
-
var isActionBlockEnabled = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? true : false;
|
|
140
139
|
return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
|
|
141
140
|
metadataPosition: SmartLinkPosition.Top
|
|
142
141
|
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
@@ -164,7 +163,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
164
163
|
onRender: onSnippetRender,
|
|
165
164
|
blockRef: snippetBlockRef,
|
|
166
165
|
overrideCss: hiddenSnippetStyles
|
|
167
|
-
}), !isAISummaryEnabled &&
|
|
166
|
+
}), !isAISummaryEnabled && /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
168
167
|
primary: tertiary,
|
|
169
168
|
size: SmartLinkSize.Large,
|
|
170
169
|
overrideCss: metadataBlockCss,
|
|
@@ -179,10 +178,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
179
178
|
}],
|
|
180
179
|
actions: footerActions,
|
|
181
180
|
aiSummaryMinHeight: connectedAIBlockHeight.current
|
|
182
|
-
}),
|
|
183
|
-
onClick: onActionClick,
|
|
184
|
-
spaceInline: "space.100"
|
|
185
|
-
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(AIFooterBlock, null), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
181
|
+
}), !isAISummaryEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
186
182
|
actions: footerActions,
|
|
187
183
|
size: SmartLinkSize.Large,
|
|
188
184
|
overrideCss: footerBlockCss
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
|
+
import { CardDisplay, SmartLinkPosition, SmartLinkSize, SmartLinkStatus } from '../../../../../constants';
|
|
4
|
+
import { getCanBeDatasource } from '../../../../../state/helpers';
|
|
5
|
+
import FlexibleCard from '../../../../FlexibleCard';
|
|
6
|
+
import { ActionBlock, AIFooterBlock, AISummaryBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
|
|
7
|
+
import { getMetadata } from '../../../utils';
|
|
8
|
+
import ImagePreview from '../../ImagePreview';
|
|
9
|
+
import { hiddenSnippetStyles, metadataBlockCss } from './styled';
|
|
10
|
+
var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
11
|
+
var _cardState$details;
|
|
12
|
+
var analytics = _ref.analytics,
|
|
13
|
+
cardState = _ref.cardState,
|
|
14
|
+
extensionKey = _ref.extensionKey,
|
|
15
|
+
flexibleCardProps = _ref.flexibleCardProps,
|
|
16
|
+
isAISummaryEnabled = _ref.isAISummaryEnabled,
|
|
17
|
+
onActionClick = _ref.onActionClick,
|
|
18
|
+
titleBlockProps = _ref.titleBlockProps;
|
|
19
|
+
var canBeDatasource = getCanBeDatasource(cardState.details);
|
|
20
|
+
useEffect(function () {
|
|
21
|
+
// Since this hover view is only rendered on resolved status,
|
|
22
|
+
// there is no need to check for statuses.
|
|
23
|
+
analytics.ui.renderSuccessEvent({
|
|
24
|
+
display: CardDisplay.HoverCardPreview,
|
|
25
|
+
status: cardState.status,
|
|
26
|
+
canBeDatasource: canBeDatasource
|
|
27
|
+
});
|
|
28
|
+
}, [analytics.ui, cardState.status, canBeDatasource]);
|
|
29
|
+
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
30
|
+
var _useMemo = useMemo(function () {
|
|
31
|
+
return getMetadata(extensionKey, data);
|
|
32
|
+
}, [data, extensionKey]),
|
|
33
|
+
primary = _useMemo.primary,
|
|
34
|
+
secondary = _useMemo.secondary;
|
|
35
|
+
var snippetHeight = React.useRef(0);
|
|
36
|
+
var snippetBlockRef = useRef(null);
|
|
37
|
+
var onSnippetRender = useCallback(function () {
|
|
38
|
+
var _snippetBlockRef$curr, _snippetBlockRef$curr2;
|
|
39
|
+
snippetHeight.current = (_snippetBlockRef$curr = (_snippetBlockRef$curr2 = snippetBlockRef.current) === null || _snippetBlockRef$curr2 === void 0 ? void 0 : _snippetBlockRef$curr2.getBoundingClientRect().height) !== null && _snippetBlockRef$curr !== void 0 ? _snippetBlockRef$curr : 0;
|
|
40
|
+
}, []);
|
|
41
|
+
var imagePreview = ImagePreview({
|
|
42
|
+
data: data,
|
|
43
|
+
fallbackElementHeight: snippetHeight.current
|
|
44
|
+
});
|
|
45
|
+
var snippet = imagePreview ? null : /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
46
|
+
status: SmartLinkStatus.Resolved
|
|
47
|
+
});
|
|
48
|
+
var aiSummaryMinHeight = snippet ? snippetHeight.current : 0;
|
|
49
|
+
return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
|
|
50
|
+
metadataPosition: SmartLinkPosition.Top
|
|
51
|
+
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
52
|
+
primary: primary,
|
|
53
|
+
secondary: secondary,
|
|
54
|
+
overrideCss: metadataBlockCss,
|
|
55
|
+
maxLines: 1,
|
|
56
|
+
size: SmartLinkSize.Medium
|
|
57
|
+
}), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
58
|
+
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
59
|
+
placeholder: snippet,
|
|
60
|
+
status: SmartLinkStatus.Resolved
|
|
61
|
+
}) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
62
|
+
testId: "hidden-snippet",
|
|
63
|
+
onRender: onSnippetRender,
|
|
64
|
+
blockRef: snippetBlockRef,
|
|
65
|
+
overrideCss: hiddenSnippetStyles
|
|
66
|
+
}), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
67
|
+
onClick: onActionClick,
|
|
68
|
+
spaceInline: "space.100"
|
|
69
|
+
}), /*#__PURE__*/React.createElement(AIFooterBlock, null));
|
|
70
|
+
};
|
|
71
|
+
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.
|
|
13
|
+
packageVersion: "26.68.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -132,6 +132,7 @@ export declare enum ActionName {
|
|
|
132
132
|
EditAction = "EditAction",
|
|
133
133
|
FollowAction = "FollowAction",
|
|
134
134
|
PreviewAction = "PreviewAction",
|
|
135
|
+
AutomationAction = "AutomationAction",
|
|
135
136
|
/**
|
|
136
137
|
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-8954 Internal documentation for deprecation (no external access)}
|
|
137
138
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonLd } from 'json-ld-types';
|
|
2
2
|
import type { FlexibleUiActions } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
3
|
+
import type { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
4
4
|
import type { CardActionOptions } from '../../../view/Card/types';
|
|
5
5
|
declare const extractActions: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, id?: string, aiSummaryConfig?: AISummaryConfig) => FlexibleUiActions | undefined;
|
|
6
6
|
export default extractActions;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_action' | 'ai_summary_action_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_goal' | 'unfollow_goal_description' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -5,6 +5,7 @@ import { InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
|
5
5
|
import type { CardInnerAppearance } from '../../view/Card/types';
|
|
6
6
|
import type { AnalyticsFacade } from '../analytics';
|
|
7
7
|
import type { ProductType } from '@atlaskit/linking-common';
|
|
8
|
+
import { MessageDescriptor } from 'react-intl-next';
|
|
8
9
|
/**
|
|
9
10
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
10
11
|
* underlying elements.
|
|
@@ -247,6 +248,7 @@ export type FlexibleUiActions = {
|
|
|
247
248
|
[ActionName.FollowAction]?: ServerActionProp<boolean>;
|
|
248
249
|
[ActionName.CopyLinkAction]?: CopyLinkActionData;
|
|
249
250
|
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
251
|
+
[ActionName.AutomationAction]?: AutomationActionData;
|
|
250
252
|
};
|
|
251
253
|
export type PreviewActionData = {
|
|
252
254
|
downloadUrl?: string;
|
|
@@ -271,6 +273,16 @@ export type AISummaryActionData = {
|
|
|
271
273
|
product: ProductType;
|
|
272
274
|
url: string;
|
|
273
275
|
};
|
|
276
|
+
export type AutomationActionData = {
|
|
277
|
+
baseAutomationUrl: string;
|
|
278
|
+
objectAri: any;
|
|
279
|
+
siteAri: any;
|
|
280
|
+
canManageAutomation: boolean;
|
|
281
|
+
analyticsSource: string;
|
|
282
|
+
objectName?: string;
|
|
283
|
+
modalTitle: MessageDescriptor;
|
|
284
|
+
modalDescription: MessageDescriptor;
|
|
285
|
+
};
|
|
274
286
|
export type FlexibleAnalyticsContextType = AnalyticsFacade & {
|
|
275
287
|
display?: CardInnerAppearance;
|
|
276
288
|
extensionKey?: string;
|
|
@@ -37,7 +37,7 @@ export type AgentInputContext = {
|
|
|
37
37
|
};
|
|
38
38
|
export type PromptId = 'smart_links';
|
|
39
39
|
export type SummaryOutputMimeType = 'text/adf' | 'text/markdown' | 'text/json';
|
|
40
|
-
export declare const errorMessages: readonly ["NETWORK_ERROR", "NO_ANSWER", "RATE_LIMIT", "NO_AGENT", "PLUGIN_ERRORED", "OPENAI_RATE_LIMIT_USER_ABUSE", "ACCEPTABLE_USE_VIOLATIONS", "AI_DISABLED", "UNEXPECTED", "HIPAA_CONTENT_DETECTED"];
|
|
40
|
+
export declare const errorMessages: readonly ["NETWORK_ERROR", "NO_ANSWER", "RATE_LIMIT", "NO_AGENT", "PLUGIN_ERRORED", "OPENAI_RATE_LIMIT_USER_ABUSE", "ACCEPTABLE_USE_VIOLATIONS", "AI_DISABLED", "UNEXPECTED", "HIPAA_CONTENT_DETECTED", "EXCEEDING_CONTEXT_LENGTH_ERROR"];
|
|
41
41
|
export type ErrorMessage = (typeof errorMessages)[number];
|
|
42
42
|
export type AISummaryState = {
|
|
43
43
|
content: string;
|
|
@@ -21,7 +21,8 @@ export declare enum CardAction {
|
|
|
21
21
|
ChangeStatusAction = "ChangeStatusAction",
|
|
22
22
|
FollowAction = "FollowAction",
|
|
23
23
|
CopyLinkAction = "CopyLinkAction",
|
|
24
|
-
AISummaryAction = "AISummaryAction"
|
|
24
|
+
AISummaryAction = "AISummaryAction",
|
|
25
|
+
AutomationAction = "AutomationAction"
|
|
25
26
|
}
|
|
26
27
|
export type CardActionOptions = {
|
|
27
28
|
hide: true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ServerActionProps } from './types';
|
|
3
|
-
declare const ServerAction:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ServerActionProps } from './types';
|
|
3
|
+
declare const ServerAction: ({ action, onClick, onError: onErrorCallback, ...props }: ServerActionProps) => JSX.Element;
|
|
4
4
|
export default ServerAction;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ActionProps } from '../types';
|
|
2
|
-
import { InvokeRequestWithCardDetails } from '../../../../../../state/hooks/use-invoke/types';
|
|
3
|
-
export type ServerActionProps = Omit<ActionProps, 'onClick'> & {
|
|
1
|
+
import type { ActionProps } from '../types';
|
|
2
|
+
import type { InvokeRequestWithCardDetails } from '../../../../../../state/hooks/use-invoke/types';
|
|
3
|
+
export type ServerActionProps = Omit<ActionProps, 'onClick' | 'onError'> & {
|
|
4
4
|
action?: InvokeRequestWithCardDetails;
|
|
5
5
|
onClick?: ActionProps['onClick'];
|
|
6
|
+
onError?: () => void;
|
|
6
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { type FollowActionProps } from './types';
|
|
3
|
-
declare const FollowAction:
|
|
3
|
+
declare const FollowAction: (props: FollowActionProps) => JSX.Element | null;
|
|
4
4
|
export default FollowAction;
|
|
@@ -6,3 +6,4 @@ export { default as FollowAction } from './follow-action';
|
|
|
6
6
|
export { default as PreviewAction } from './preview-action';
|
|
7
7
|
export { default as CopyLinkAction } from './copy-link-action';
|
|
8
8
|
export { default as AISummaryAction } from './ai-summary-action';
|
|
9
|
+
export { default as AutomationAction } from './automation-action';
|
|
@@ -3,7 +3,7 @@ import type { AISummaryBlockProps } from '../types';
|
|
|
3
3
|
import type { AISummaryStatus, ErrorMessage } from '../../../../../../state/hooks/use-ai-summary/ai-summary-service/types';
|
|
4
4
|
export declare const AISummaryBlockErrorIndicator: ({ showErrorIndicator, error, showTransition, testId, }: {
|
|
5
5
|
showErrorIndicator: boolean;
|
|
6
|
-
error?: "NETWORK_ERROR" | "NO_ANSWER" | "RATE_LIMIT" | "NO_AGENT" | "PLUGIN_ERRORED" | "OPENAI_RATE_LIMIT_USER_ABUSE" | "ACCEPTABLE_USE_VIOLATIONS" | "AI_DISABLED" | "UNEXPECTED" | "HIPAA_CONTENT_DETECTED" | undefined;
|
|
6
|
+
error?: "NETWORK_ERROR" | "NO_ANSWER" | "RATE_LIMIT" | "NO_AGENT" | "PLUGIN_ERRORED" | "OPENAI_RATE_LIMIT_USER_ABUSE" | "ACCEPTABLE_USE_VIOLATIONS" | "AI_DISABLED" | "UNEXPECTED" | "HIPAA_CONTENT_DETECTED" | "EXCEEDING_CONTEXT_LENGTH_ERROR" | undefined;
|
|
7
7
|
showTransition: boolean;
|
|
8
8
|
} & Pick<AISummaryBlockProps, "testId">) => JSX.Element;
|
|
9
9
|
export declare const AISummaryBlockStatusIndicator: ({ showStatusIndicator, metadata, status, testId, }: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ActionItem, type BlockProps, type ElementItem } from '../types';
|
|
3
|
+
import { type OnActionMenuOpenChangeOptions } from '../types';
|
|
3
4
|
export type AISummaryBlockProps = {
|
|
4
5
|
/**
|
|
5
6
|
* An array of actions to be displayed on the right
|
|
@@ -20,4 +21,8 @@ export type AISummaryBlockProps = {
|
|
|
20
21
|
* Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
|
|
21
22
|
*/
|
|
22
23
|
aiSummaryMinHeight?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Placeholder to show when summary is not available
|
|
26
|
+
*/
|
|
27
|
+
placeholder?: ReactNode;
|
|
23
28
|
} & BlockProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ActionName, ElementName, SmartLinkDirection, SmartLinkSize, SmartLinkStatus } from '../../../../constants';
|
|
2
|
-
import { SerializedStyles } from '@emotion/react';
|
|
3
|
-
import { ActionProps } from '../actions/action/types';
|
|
4
|
-
import { PropsWithChildren, Ref } from 'react';
|
|
1
|
+
import { type ActionName, type ElementName, type SmartLinkDirection, type SmartLinkSize, type SmartLinkStatus } from '../../../../constants';
|
|
2
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
3
|
+
import { type ActionProps } from '../actions/action/types';
|
|
4
|
+
import { type PropsWithChildren, type Ref } from 'react';
|
|
5
5
|
export type BlockProps = PropsWithChildren<{
|
|
6
6
|
/**
|
|
7
7
|
* The direction that the block should arrange it's elements. Can be vertical
|
|
@@ -161,7 +161,7 @@ export type BaseDataActionItem = {
|
|
|
161
161
|
* renders a preview modal when clicked.
|
|
162
162
|
*/
|
|
163
163
|
export type NamedDataActionItem = BaseDataActionItem & {
|
|
164
|
-
name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction
|
|
164
|
+
name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction
|
|
165
165
|
/**
|
|
166
166
|
* To be removed once ActionName.ViewAction is retired
|
|
167
167
|
* Currently left in to maintain backwards compatibility with public API
|
|
@@ -132,6 +132,7 @@ export declare enum ActionName {
|
|
|
132
132
|
EditAction = "EditAction",
|
|
133
133
|
FollowAction = "FollowAction",
|
|
134
134
|
PreviewAction = "PreviewAction",
|
|
135
|
+
AutomationAction = "AutomationAction",
|
|
135
136
|
/**
|
|
136
137
|
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-8954 Internal documentation for deprecation (no external access)}
|
|
137
138
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonLd } from 'json-ld-types';
|
|
2
2
|
import type { FlexibleUiActions } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
3
|
+
import type { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
4
4
|
import type { CardActionOptions } from '../../../view/Card/types';
|
|
5
5
|
declare const extractActions: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, id?: string, aiSummaryConfig?: AISummaryConfig) => FlexibleUiActions | undefined;
|
|
6
6
|
export default extractActions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_action' | 'ai_summary_action_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_goal' | 'unfollow_goal_description' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -5,6 +5,7 @@ import { InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
|
5
5
|
import type { CardInnerAppearance } from '../../view/Card/types';
|
|
6
6
|
import type { AnalyticsFacade } from '../analytics';
|
|
7
7
|
import type { ProductType } from '@atlaskit/linking-common';
|
|
8
|
+
import { MessageDescriptor } from 'react-intl-next';
|
|
8
9
|
/**
|
|
9
10
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
10
11
|
* underlying elements.
|
|
@@ -247,6 +248,7 @@ export type FlexibleUiActions = {
|
|
|
247
248
|
[ActionName.FollowAction]?: ServerActionProp<boolean>;
|
|
248
249
|
[ActionName.CopyLinkAction]?: CopyLinkActionData;
|
|
249
250
|
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
251
|
+
[ActionName.AutomationAction]?: AutomationActionData;
|
|
250
252
|
};
|
|
251
253
|
export type PreviewActionData = {
|
|
252
254
|
downloadUrl?: string;
|
|
@@ -271,6 +273,16 @@ export type AISummaryActionData = {
|
|
|
271
273
|
product: ProductType;
|
|
272
274
|
url: string;
|
|
273
275
|
};
|
|
276
|
+
export type AutomationActionData = {
|
|
277
|
+
baseAutomationUrl: string;
|
|
278
|
+
objectAri: any;
|
|
279
|
+
siteAri: any;
|
|
280
|
+
canManageAutomation: boolean;
|
|
281
|
+
analyticsSource: string;
|
|
282
|
+
objectName?: string;
|
|
283
|
+
modalTitle: MessageDescriptor;
|
|
284
|
+
modalDescription: MessageDescriptor;
|
|
285
|
+
};
|
|
274
286
|
export type FlexibleAnalyticsContextType = AnalyticsFacade & {
|
|
275
287
|
display?: CardInnerAppearance;
|
|
276
288
|
extensionKey?: string;
|
|
@@ -47,7 +47,8 @@ export declare const errorMessages: readonly [
|
|
|
47
47
|
"ACCEPTABLE_USE_VIOLATIONS",
|
|
48
48
|
"AI_DISABLED",
|
|
49
49
|
"UNEXPECTED",
|
|
50
|
-
"HIPAA_CONTENT_DETECTED"
|
|
50
|
+
"HIPAA_CONTENT_DETECTED",
|
|
51
|
+
"EXCEEDING_CONTEXT_LENGTH_ERROR"
|
|
51
52
|
];
|
|
52
53
|
export type ErrorMessage = (typeof errorMessages)[number];
|
|
53
54
|
export type AISummaryState = {
|
|
@@ -21,7 +21,8 @@ export declare enum CardAction {
|
|
|
21
21
|
ChangeStatusAction = "ChangeStatusAction",
|
|
22
22
|
FollowAction = "FollowAction",
|
|
23
23
|
CopyLinkAction = "CopyLinkAction",
|
|
24
|
-
AISummaryAction = "AISummaryAction"
|
|
24
|
+
AISummaryAction = "AISummaryAction",
|
|
25
|
+
AutomationAction = "AutomationAction"
|
|
25
26
|
}
|
|
26
27
|
export type CardActionOptions = {
|
|
27
28
|
hide: true;
|
package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/server-action/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ServerActionProps } from './types';
|
|
3
|
-
declare const ServerAction:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ServerActionProps } from './types';
|
|
3
|
+
declare const ServerAction: ({ action, onClick, onError: onErrorCallback, ...props }: ServerActionProps) => JSX.Element;
|
|
4
4
|
export default ServerAction;
|
package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/server-action/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ActionProps } from '../types';
|
|
2
|
-
import { InvokeRequestWithCardDetails } from '../../../../../../state/hooks/use-invoke/types';
|
|
3
|
-
export type ServerActionProps = Omit<ActionProps, 'onClick'> & {
|
|
1
|
+
import type { ActionProps } from '../types';
|
|
2
|
+
import type { InvokeRequestWithCardDetails } from '../../../../../../state/hooks/use-invoke/types';
|
|
3
|
+
export type ServerActionProps = Omit<ActionProps, 'onClick' | 'onError'> & {
|
|
4
4
|
action?: InvokeRequestWithCardDetails;
|
|
5
5
|
onClick?: ActionProps['onClick'];
|
|
6
|
+
onError?: () => void;
|
|
6
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { type FollowActionProps } from './types';
|
|
3
|
-
declare const FollowAction:
|
|
3
|
+
declare const FollowAction: (props: FollowActionProps) => JSX.Element | null;
|
|
4
4
|
export default FollowAction;
|
|
@@ -6,3 +6,4 @@ export { default as FollowAction } from './follow-action';
|
|
|
6
6
|
export { default as PreviewAction } from './preview-action';
|
|
7
7
|
export { default as CopyLinkAction } from './copy-link-action';
|
|
8
8
|
export { default as AISummaryAction } from './ai-summary-action';
|
|
9
|
+
export { default as AutomationAction } from './automation-action';
|
package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { AISummaryBlockProps } from '../types';
|
|
|
3
3
|
import type { AISummaryStatus, ErrorMessage } from '../../../../../../state/hooks/use-ai-summary/ai-summary-service/types';
|
|
4
4
|
export declare const AISummaryBlockErrorIndicator: ({ showErrorIndicator, error, showTransition, testId, }: {
|
|
5
5
|
showErrorIndicator: boolean;
|
|
6
|
-
error?: "NETWORK_ERROR" | "NO_ANSWER" | "RATE_LIMIT" | "NO_AGENT" | "PLUGIN_ERRORED" | "OPENAI_RATE_LIMIT_USER_ABUSE" | "ACCEPTABLE_USE_VIOLATIONS" | "AI_DISABLED" | "UNEXPECTED" | "HIPAA_CONTENT_DETECTED" | undefined;
|
|
6
|
+
error?: "NETWORK_ERROR" | "NO_ANSWER" | "RATE_LIMIT" | "NO_AGENT" | "PLUGIN_ERRORED" | "OPENAI_RATE_LIMIT_USER_ABUSE" | "ACCEPTABLE_USE_VIOLATIONS" | "AI_DISABLED" | "UNEXPECTED" | "HIPAA_CONTENT_DETECTED" | "EXCEEDING_CONTEXT_LENGTH_ERROR" | undefined;
|
|
7
7
|
showTransition: boolean;
|
|
8
8
|
} & Pick<AISummaryBlockProps, "testId">) => JSX.Element;
|
|
9
9
|
export declare const AISummaryBlockStatusIndicator: ({ showStatusIndicator, metadata, status, testId, }: {
|