@atlaskit/smart-card 26.46.2 → 26.46.3
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 +6 -0
- package/dist/cjs/constants.js +2 -2
- package/dist/cjs/messages.js +15 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-container.js +28 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +35 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-learn-more-anchor.js +22 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +116 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-loading.js +35 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.js +35 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +37 -28
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-icon-loading/index.js +60 -0
- package/dist/es2019/constants.js +1 -1
- package/dist/es2019/messages.js +15 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-container.js +22 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +29 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-learn-more-anchor.js +12 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +105 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-loading.js +29 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.js +26 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +36 -31
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-icon-loading/index.js +64 -0
- package/dist/esm/constants.js +1 -1
- package/dist/esm/messages.js +15 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-container.js +21 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +25 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-learn-more-anchor.js +15 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +108 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-loading.js +28 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.js +27 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +40 -31
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-icon-loading/index.js +54 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-container.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-learn-more-anchor.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-loading.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +18 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -1
- package/dist/types/view/common/ai-icon-loading/index.d.ts +7 -0
- package/dist/types-ts4.5/constants.d.ts +1 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-container.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-learn-more-anchor.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-loading.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +18 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -1
- package/dist/types-ts4.5/view/common/ai-icon-loading/index.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
-
import
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import { Box, Inline } from '@atlaskit/primitives';
|
|
7
|
+
import { ActionName, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
|
|
7
8
|
import ActionGroup from '../../action-group';
|
|
8
9
|
import Block from '../../block';
|
|
9
10
|
import ElementGroup from '../../element-group';
|
|
10
|
-
import
|
|
11
|
+
import AIStateIndicator from '../ai-state-indicator';
|
|
12
|
+
import { renderElementItems } from '../../utils';
|
|
11
13
|
import { messages } from '../../../../../../messages';
|
|
12
14
|
import AiIcon from '../../../../../common/ai-icon';
|
|
13
15
|
var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
@@ -19,29 +21,32 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
19
21
|
onAIActionChange = props.onAIActionChange,
|
|
20
22
|
_props$size = props.size,
|
|
21
23
|
size = _props$size === void 0 ? SmartLinkSize.Medium : _props$size;
|
|
22
|
-
var
|
|
24
|
+
var _useState = useState('ready'),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
aiState = _useState2[0],
|
|
27
|
+
setAIState = _useState2[1];
|
|
23
28
|
var metadataElements = renderElementItems(metadata);
|
|
24
29
|
var onAIActionClick = useCallback(function () {
|
|
30
|
+
setAIState('loading');
|
|
25
31
|
if (onAIActionChange) {
|
|
26
|
-
onAIActionChange();
|
|
32
|
+
onAIActionChange('loading');
|
|
27
33
|
}
|
|
28
34
|
}, [onAIActionChange]);
|
|
29
35
|
var combinedActions = useMemo(function () {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}, [combinedActions, context]);
|
|
36
|
+
if (aiState === 'ready') {
|
|
37
|
+
var aiAction = {
|
|
38
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.ai_summarize),
|
|
39
|
+
name: ActionName.CustomAction,
|
|
40
|
+
onClick: onAIActionClick,
|
|
41
|
+
testId: "".concat(testId, "-ai-summary-action"),
|
|
42
|
+
icon: /*#__PURE__*/React.createElement(AiIcon, {
|
|
43
|
+
label: "AiIcon"
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
return [aiAction].concat(_toConsumableArray(actions));
|
|
47
|
+
}
|
|
48
|
+
return actions;
|
|
49
|
+
}, [actions, aiState, onAIActionClick, testId]);
|
|
45
50
|
var onDropdownOpenChange = useCallback(function (isOpen) {
|
|
46
51
|
if (onActionMenuOpenChange) {
|
|
47
52
|
onActionMenuOpenChange({
|
|
@@ -51,17 +56,21 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
51
56
|
}, [onActionMenuOpenChange]);
|
|
52
57
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
53
58
|
testId: "".concat(testId, "-resolved-view")
|
|
54
|
-
}), /*#__PURE__*/React.createElement(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
}), /*#__PURE__*/React.createElement(Inline, {
|
|
60
|
+
alignBlock: "center",
|
|
61
|
+
alignInline: "end",
|
|
62
|
+
grow: "fill",
|
|
63
|
+
spread: "space-between"
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Box, null, aiState === 'loading' || aiState === 'done' ? /*#__PURE__*/React.createElement(AIStateIndicator, {
|
|
65
|
+
state: aiState,
|
|
66
|
+
testId: testId
|
|
67
|
+
}) : /*#__PURE__*/React.createElement(ElementGroup, {
|
|
68
|
+
width: SmartLinkWidth.FitToContent
|
|
69
|
+
}, metadataElements)), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(ActionGroup, {
|
|
62
70
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
63
71
|
items: combinedActions,
|
|
64
|
-
appearance: "default"
|
|
65
|
-
|
|
72
|
+
appearance: "default",
|
|
73
|
+
size: size
|
|
74
|
+
}))));
|
|
66
75
|
};
|
|
67
76
|
export default AISummaryBlockResolvedView;
|
|
@@ -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.46.
|
|
13
|
+
packageVersion: "26.46.3",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
5
|
+
import SVG from '@atlaskit/icon/svg';
|
|
6
|
+
import { aiThemeTokens } from '../ai-prism/constants';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The bulk of this file is originally from
|
|
10
|
+
* https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
|
|
11
|
+
* with modifications
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
var bounce = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n transform: translateY(0);\n }\n\n // 200ms of 1200ms = 16.67%\n 16.67% {\n transform: translateY(-2px);\n }\n\n // 400ms of 1200ms = 33.33%\n 33.33% {\n transform: translateY(0px);\n }\n"])));
|
|
15
|
+
var BASE_DELAY = 400;
|
|
16
|
+
var QUEUE_DELAY = 200;
|
|
17
|
+
var animationStyles = css({
|
|
18
|
+
animation: "".concat(bounce, " 1.2s linear infinite normal")
|
|
19
|
+
});
|
|
20
|
+
var firstDelayStyles = css({
|
|
21
|
+
animationDelay: "".concat(BASE_DELAY + QUEUE_DELAY, "ms")
|
|
22
|
+
});
|
|
23
|
+
var secondDelayStyles = css({
|
|
24
|
+
animationDelay: "".concat(BASE_DELAY + QUEUE_DELAY * 2, "ms")
|
|
25
|
+
});
|
|
26
|
+
var thirdDelayStyles = css({
|
|
27
|
+
animationDelay: "".concat(BASE_DELAY + QUEUE_DELAY * 3, "ms")
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* this icon is theme agnostic, no need for tokens
|
|
32
|
+
*/
|
|
33
|
+
var AIIconLoading = function AIIconLoading(props) {
|
|
34
|
+
return jsx(SVG, props, jsx("circle", {
|
|
35
|
+
css: [animationStyles, firstDelayStyles],
|
|
36
|
+
cx: "6",
|
|
37
|
+
cy: "12",
|
|
38
|
+
r: "1.5",
|
|
39
|
+
fill: aiThemeTokens.blue700
|
|
40
|
+
}), jsx("circle", {
|
|
41
|
+
css: [animationStyles, secondDelayStyles],
|
|
42
|
+
cx: "12",
|
|
43
|
+
cy: "12",
|
|
44
|
+
r: "1.5",
|
|
45
|
+
fill: aiThemeTokens.blue600
|
|
46
|
+
}), jsx("circle", {
|
|
47
|
+
css: [animationStyles, thirdDelayStyles],
|
|
48
|
+
cx: "17.5",
|
|
49
|
+
cy: "12",
|
|
50
|
+
r: "1.5",
|
|
51
|
+
fill: aiThemeTokens.blue500
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
54
|
+
export default AIIconLoading;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const CONTENT_URL_SECURITY_AND_PERMISSIONS = "https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links";
|
|
2
2
|
export declare const CONTENT_URL_3P_ACCOUNT_AUTH = "https://support.atlassian.com/confluence-cloud/docs/what-data-is-sent-and-received-when-pasting-a-smart-link/";
|
|
3
|
+
export declare const CONTENT_URL_AI = "https://www.atlassian.com/trust/atlassian-intelligence";
|
|
3
4
|
/**
|
|
4
5
|
* The alignment of Flexible UI component.
|
|
5
6
|
*/
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { 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_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | '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' | 'could_not_load_link' | 'download' | 'follow' | '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_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' | '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_info' | 'ai_summarizing' | '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' | 'could_not_load_link' | 'download' | 'follow' | '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_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' | '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
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TooltipProps } from '@atlaskit/tooltip';
|
|
3
|
+
import type { AIState } from '../types';
|
|
4
|
+
export type AIStateAppearance = 'default' | 'icon-only';
|
|
5
|
+
export type AIStateIndicatorProps = {
|
|
6
|
+
appearance?: AIStateAppearance;
|
|
7
|
+
state: AIState;
|
|
8
|
+
testId?: string;
|
|
9
|
+
};
|
|
10
|
+
export type AIIndicatorContainerProps = {
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
content?: React.ReactNode;
|
|
13
|
+
testId?: string;
|
|
14
|
+
};
|
|
15
|
+
export type AIIndicatorTooltipProps = {
|
|
16
|
+
content: TooltipProps['content'];
|
|
17
|
+
trigger: React.ReactNode;
|
|
18
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActionItem, BlockProps, ElementItem } from '../types';
|
|
2
2
|
import { OnActionMenuOpenChangeOptions } from '../types';
|
|
3
|
+
export type AIState = 'ready' | 'loading' | 'error' | 'done';
|
|
3
4
|
export type AISummaryBlockProps = {
|
|
4
5
|
/**
|
|
5
6
|
* An array of actions to be displayed on the right
|
|
@@ -19,5 +20,5 @@ export type AISummaryBlockProps = {
|
|
|
19
20
|
/**
|
|
20
21
|
* Function to be called when AI Summary state changed.
|
|
21
22
|
*/
|
|
22
|
-
onAIActionChange?: () => void;
|
|
23
|
+
onAIActionChange?: (state: AIState) => void;
|
|
23
24
|
} & BlockProps;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const CONTENT_URL_SECURITY_AND_PERMISSIONS = "https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links";
|
|
2
2
|
export declare const CONTENT_URL_3P_ACCOUNT_AUTH = "https://support.atlassian.com/confluence-cloud/docs/what-data-is-sent-and-received-when-pasting-a-smart-link/";
|
|
3
|
+
export declare const CONTENT_URL_AI = "https://www.atlassian.com/trust/atlassian-intelligence";
|
|
3
4
|
/**
|
|
4
5
|
* The alignment of Flexible UI component.
|
|
5
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { 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_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | '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' | 'could_not_load_link' | 'download' | 'follow' | '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_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' | '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_info' | 'ai_summarizing' | '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' | 'could_not_load_link' | 'download' | 'follow' | '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_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' | '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
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TooltipProps } from '@atlaskit/tooltip';
|
|
3
|
+
import type { AIState } from '../types';
|
|
4
|
+
export type AIStateAppearance = 'default' | 'icon-only';
|
|
5
|
+
export type AIStateIndicatorProps = {
|
|
6
|
+
appearance?: AIStateAppearance;
|
|
7
|
+
state: AIState;
|
|
8
|
+
testId?: string;
|
|
9
|
+
};
|
|
10
|
+
export type AIIndicatorContainerProps = {
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
content?: React.ReactNode;
|
|
13
|
+
testId?: string;
|
|
14
|
+
};
|
|
15
|
+
export type AIIndicatorTooltipProps = {
|
|
16
|
+
content: TooltipProps['content'];
|
|
17
|
+
trigger: React.ReactNode;
|
|
18
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActionItem, BlockProps, ElementItem } from '../types';
|
|
2
2
|
import { OnActionMenuOpenChangeOptions } from '../types';
|
|
3
|
+
export type AIState = 'ready' | 'loading' | 'error' | 'done';
|
|
3
4
|
export type AISummaryBlockProps = {
|
|
4
5
|
/**
|
|
5
6
|
* An array of actions to be displayed on the right
|
|
@@ -19,5 +20,5 @@ export type AISummaryBlockProps = {
|
|
|
19
20
|
/**
|
|
20
21
|
* Function to be called when AI Summary state changed.
|
|
21
22
|
*/
|
|
22
|
-
onAIActionChange?: () => void;
|
|
23
|
+
onAIActionChange?: (state: AIState) => void;
|
|
23
24
|
} & BlockProps;
|