@atlaskit/smart-card 40.10.10 → 40.12.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 +18 -0
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +68 -41
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +2 -4
- package/dist/cjs/extractors/flexible/actions/index.js +6 -2
- package/dist/cjs/extractors/flexible/extract-state.js +9 -7
- package/dist/cjs/extractors/flexible/index.js +8 -3
- package/dist/cjs/messages.js +25 -0
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +8 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +29 -4
- package/dist/cjs/view/FlexibleCard/index.js +8 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +4 -3
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +49 -27
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +2 -4
- package/dist/es2019/extractors/flexible/actions/index.js +6 -2
- package/dist/es2019/extractors/flexible/extract-state.js +9 -7
- package/dist/es2019/extractors/flexible/index.js +7 -2
- package/dist/es2019/messages.js +25 -0
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +9 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +29 -4
- package/dist/es2019/view/FlexibleCard/index.js +9 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +4 -3
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +69 -42
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +2 -4
- package/dist/esm/extractors/flexible/actions/index.js +6 -2
- package/dist/esm/extractors/flexible/extract-state.js +9 -7
- package/dist/esm/extractors/flexible/index.js +8 -3
- package/dist/esm/messages.js +25 -0
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +8 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +29 -4
- package/dist/esm/view/FlexibleCard/index.js +8 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +4 -3
- package/dist/types/extractors/action/extract-invoke-preview-action.d.ts +15 -1
- package/dist/types/extractors/flexible/actions/index.d.ts +10 -1
- package/dist/types/extractors/flexible/extract-state.d.ts +8 -1
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/types.d.ts +9 -0
- package/dist/types-ts4.5/extractors/action/extract-invoke-preview-action.d.ts +15 -1
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +10 -1
- package/dist/types-ts4.5/extractors/flexible/extract-state.d.ts +8 -1
- package/dist/types-ts4.5/extractors/flexible/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 +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +9 -0
- package/package.json +5 -2
|
@@ -4,6 +4,8 @@ var _excluded = ["onClick"];
|
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import MediaServicesActualSizeIcon from '@atlaskit/icon/core/migration/grow-diagonal--media-services-actual-size';
|
|
7
|
+
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
9
|
import { ActionName } from '../../../../../constants';
|
|
8
10
|
import { messages } from '../../../../../messages';
|
|
9
11
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -16,6 +18,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
16
18
|
var context = useFlexibleUiContext();
|
|
17
19
|
var invoke = useInvokeClientAction({});
|
|
18
20
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
|
|
21
|
+
var hasPreviewPanel = data === null || data === void 0 ? void 0 : data.hasPreviewPanel;
|
|
19
22
|
var onClick = useCallback(function () {
|
|
20
23
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
21
24
|
invoke(data.invokeAction);
|
|
@@ -24,13 +27,35 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
24
27
|
}, [data, invoke, onClickCallback]);
|
|
25
28
|
var isStackItem = props.as === 'stack-item';
|
|
26
29
|
var tooltipMessage = isStackItem ? messages.preview_description : messages.preview_improved;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
var actionIcon = useCallback(function () {
|
|
31
|
+
// Only use panel icon if experiment is enabled and hasPreviewPanel is true
|
|
32
|
+
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
33
|
+
return /*#__PURE__*/React.createElement(PanelRightIcon, {
|
|
34
|
+
color: "currentColor",
|
|
35
|
+
spacing: "spacious",
|
|
36
|
+
label: "Open preview panel"
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/React.createElement(MediaServicesActualSizeIcon, {
|
|
30
40
|
color: "currentColor",
|
|
31
41
|
spacing: "spacious",
|
|
32
42
|
label: "Open preview"
|
|
33
|
-
})
|
|
43
|
+
});
|
|
44
|
+
}, [hasPreviewPanel]);
|
|
45
|
+
var actionLabel = useCallback(function () {
|
|
46
|
+
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
47
|
+
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
48
|
+
return /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_panel);
|
|
49
|
+
}
|
|
50
|
+
// Fall back to modal message if experiment is enabled, otherwise use original preview message
|
|
51
|
+
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test')) {
|
|
52
|
+
return /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_modal);
|
|
53
|
+
}
|
|
54
|
+
return /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_improved);
|
|
55
|
+
}, [hasPreviewPanel]);
|
|
56
|
+
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
57
|
+
content: actionLabel(),
|
|
58
|
+
icon: actionIcon(),
|
|
34
59
|
onClick: onClick,
|
|
35
60
|
testId: "smart-action-preview-action",
|
|
36
61
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect, useMemo } from 'react';
|
|
3
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
3
4
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
4
5
|
import { InternalActionName, SmartLinkStatus } from '../../constants';
|
|
5
6
|
import { FlexibleCardContext } from '../../state/flexible-ui-context';
|
|
@@ -35,6 +36,9 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
35
36
|
url = _ref.url;
|
|
36
37
|
var aiSummaryConfig = useAISummaryConfig();
|
|
37
38
|
var resolve = useResolve();
|
|
39
|
+
var _useSmartLinkContext = useSmartLinkContext(),
|
|
40
|
+
isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
|
|
41
|
+
openPreviewPanel = _useSmartLinkContext.openPreviewPanel;
|
|
38
42
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
39
43
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
40
44
|
var cardType = cardState.status,
|
|
@@ -54,9 +58,11 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
54
58
|
resolve: resolve,
|
|
55
59
|
actionOptions: actionOptions,
|
|
56
60
|
status: status,
|
|
57
|
-
url: url
|
|
61
|
+
url: url,
|
|
62
|
+
isPreviewPanelAvailable: isPreviewPanelAvailable,
|
|
63
|
+
openPreviewPanel: openPreviewPanel
|
|
58
64
|
});
|
|
59
|
-
}, [aiSummaryConfig, appearance, fireEvent, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, status, url]);
|
|
65
|
+
}, [aiSummaryConfig, appearance, fireEvent, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, status, url, isPreviewPanelAvailable, openPreviewPanel]);
|
|
60
66
|
var flexibleCardContext = useMemo(function () {
|
|
61
67
|
return {
|
|
62
68
|
data: context,
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "40.
|
|
15
|
+
packageVersion: "40.11.0",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { Anchor } from '@atlaskit/primitives/compiled';
|
|
5
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
6
7
|
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
@@ -19,12 +20,12 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
19
20
|
var handleLearnMoreClick = useCallback(function () {
|
|
20
21
|
fireEvent('ui.button.clicked.learnMore', {});
|
|
21
22
|
}, [fireEvent]);
|
|
22
|
-
var learnMoreMessage = isProductIntegrationSupported ? messages.learn_more_about_connecting_account : messages.learn_more_about_smart_links;
|
|
23
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, providerName ? /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_unauthorised_account_description, {
|
|
23
|
+
var learnMoreMessage = isProductIntegrationSupported ? fg('product-terminology-refresh') ? messages.learn_more_about_connecting_account_appify : messages.learn_more_about_connecting_account : messages.learn_more_about_smart_links;
|
|
24
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, providerName ? /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, fg('product-terminology-refresh') ? messages.connect_unauthorised_account_description_appify : messages.connect_unauthorised_account_description, {
|
|
24
25
|
values: {
|
|
25
26
|
context: providerName
|
|
26
27
|
}
|
|
27
|
-
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/React.createElement(Anchor, {
|
|
28
|
+
})) : /*#__PURE__*/React.createElement(FormattedMessage, fg('product-terminology-refresh') ? messages.connect_unauthorised_account_description_no_provider_appify : messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/React.createElement(Anchor, {
|
|
28
29
|
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
29
30
|
target: "_blank",
|
|
30
31
|
testId: "".concat(testId, "-learn-more"),
|
|
@@ -7,5 +7,19 @@ export type ExtractInvokePreviewActionParam = ExtractClientActionsParam & {
|
|
|
7
7
|
fireEvent?: FireEventFunction;
|
|
8
8
|
onClose?: EmbedModalProps['onClose'];
|
|
9
9
|
origin?: AnalyticsOrigin;
|
|
10
|
+
isPreviewPanelAvailable?: (params: {
|
|
11
|
+
ari: string;
|
|
12
|
+
}) => boolean;
|
|
13
|
+
openPreviewPanel?: (params: {
|
|
14
|
+
ari: string;
|
|
15
|
+
url: string;
|
|
16
|
+
name: string;
|
|
17
|
+
iconUrl: string | undefined;
|
|
18
|
+
}) => void;
|
|
10
19
|
};
|
|
11
|
-
|
|
20
|
+
type ExtractInvokePreviewActionReturn = {
|
|
21
|
+
invokeAction: InvokeClientActionProps;
|
|
22
|
+
hasPreviewPanel?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const extractInvokePreviewAction: (param: ExtractInvokePreviewActionParam) => ExtractInvokePreviewActionReturn | undefined;
|
|
25
|
+
export {};
|
|
@@ -13,5 +13,14 @@ export type ExtractActionsParam = {
|
|
|
13
13
|
appearance?: CardInnerAppearance;
|
|
14
14
|
origin?: AnalyticsOrigin;
|
|
15
15
|
fireEvent?: FireEventFunction;
|
|
16
|
+
isPreviewPanelAvailable?: (params: {
|
|
17
|
+
ari: string;
|
|
18
|
+
}) => boolean;
|
|
19
|
+
openPreviewPanel?: (params: {
|
|
20
|
+
ari: string;
|
|
21
|
+
url: string;
|
|
22
|
+
name: string;
|
|
23
|
+
iconUrl: string | undefined;
|
|
24
|
+
}) => void;
|
|
16
25
|
};
|
|
17
|
-
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, url, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
26
|
+
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, url, isPreviewPanelAvailable, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
@@ -4,5 +4,12 @@ import { type ResolveFunction } from '../../state/hooks/use-resolve';
|
|
|
4
4
|
import { type AnalyticsOrigin } from '../../utils/types';
|
|
5
5
|
import { type CardActionOptions, type CardInnerAppearance } from '../../view/Card/types';
|
|
6
6
|
import { type LinkLozenge } from '../common/lozenge/types';
|
|
7
|
-
declare const extractState: (response?: JsonLd.Response, actionOptions?: CardActionOptions, id?: string, appearance?: CardInnerAppearance, origin?: AnalyticsOrigin, fireEvent?: FireEventFunction, resolve?: ResolveFunction
|
|
7
|
+
declare const extractState: (response?: JsonLd.Response, actionOptions?: CardActionOptions, id?: string, appearance?: CardInnerAppearance, origin?: AnalyticsOrigin, fireEvent?: FireEventFunction, resolve?: ResolveFunction, isPreviewPanelAvailable?: (params: {
|
|
8
|
+
ari: string;
|
|
9
|
+
}) => boolean, openPreviewPanel?: (params: {
|
|
10
|
+
ari: string;
|
|
11
|
+
url: string;
|
|
12
|
+
name: string;
|
|
13
|
+
iconUrl: string | undefined;
|
|
14
|
+
}) => void) => LinkLozenge | undefined;
|
|
8
15
|
export default extractState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, renderers, resolve, actionOptions, response, status, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, renderers, resolve, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, openPreviewPanel, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
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_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' | 'compass_applied_components_count' | '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_descriptionGalaxia' | 'follow_project' | 'follow_projectGalaxia' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | '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' | 'owned_by_override' | '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_descriptionGalaxia' | 'unfollow_projectGalaxia' | 'unfollow_project' | 'unfollow_projectGalaxia' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh';
|
|
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' | 'compass_applied_components_count' | '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_descriptionGalaxia' | 'follow_project' | 'follow_projectGalaxia' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | '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' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | '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_descriptionGalaxia' | 'unfollow_projectGalaxia' | 'unfollow_project' | 'unfollow_projectGalaxia' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_appify';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -168,6 +168,15 @@ export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appear
|
|
|
168
168
|
response?: SmartLinkResponse;
|
|
169
169
|
resolve?: ResolveFunction;
|
|
170
170
|
aiSummaryConfig?: AISummaryConfig;
|
|
171
|
+
isPreviewPanelAvailable?: (params: {
|
|
172
|
+
ari: string;
|
|
173
|
+
}) => boolean;
|
|
174
|
+
openPreviewPanel?: (params: {
|
|
175
|
+
ari: string;
|
|
176
|
+
url: string;
|
|
177
|
+
name: string;
|
|
178
|
+
iconUrl: string | undefined;
|
|
179
|
+
}) => void;
|
|
171
180
|
};
|
|
172
181
|
/**
|
|
173
182
|
* Mark a specific props in the type as optional.
|
|
@@ -7,5 +7,19 @@ export type ExtractInvokePreviewActionParam = ExtractClientActionsParam & {
|
|
|
7
7
|
fireEvent?: FireEventFunction;
|
|
8
8
|
onClose?: EmbedModalProps['onClose'];
|
|
9
9
|
origin?: AnalyticsOrigin;
|
|
10
|
+
isPreviewPanelAvailable?: (params: {
|
|
11
|
+
ari: string;
|
|
12
|
+
}) => boolean;
|
|
13
|
+
openPreviewPanel?: (params: {
|
|
14
|
+
ari: string;
|
|
15
|
+
url: string;
|
|
16
|
+
name: string;
|
|
17
|
+
iconUrl: string | undefined;
|
|
18
|
+
}) => void;
|
|
10
19
|
};
|
|
11
|
-
|
|
20
|
+
type ExtractInvokePreviewActionReturn = {
|
|
21
|
+
invokeAction: InvokeClientActionProps;
|
|
22
|
+
hasPreviewPanel?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const extractInvokePreviewAction: (param: ExtractInvokePreviewActionParam) => ExtractInvokePreviewActionReturn | undefined;
|
|
25
|
+
export {};
|
|
@@ -13,5 +13,14 @@ export type ExtractActionsParam = {
|
|
|
13
13
|
appearance?: CardInnerAppearance;
|
|
14
14
|
origin?: AnalyticsOrigin;
|
|
15
15
|
fireEvent?: FireEventFunction;
|
|
16
|
+
isPreviewPanelAvailable?: (params: {
|
|
17
|
+
ari: string;
|
|
18
|
+
}) => boolean;
|
|
19
|
+
openPreviewPanel?: (params: {
|
|
20
|
+
ari: string;
|
|
21
|
+
url: string;
|
|
22
|
+
name: string;
|
|
23
|
+
iconUrl: string | undefined;
|
|
24
|
+
}) => void;
|
|
16
25
|
};
|
|
17
|
-
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, url, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
26
|
+
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, url, isPreviewPanelAvailable, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
@@ -4,5 +4,12 @@ import { type ResolveFunction } from '../../state/hooks/use-resolve';
|
|
|
4
4
|
import { type AnalyticsOrigin } from '../../utils/types';
|
|
5
5
|
import { type CardActionOptions, type CardInnerAppearance } from '../../view/Card/types';
|
|
6
6
|
import { type LinkLozenge } from '../common/lozenge/types';
|
|
7
|
-
declare const extractState: (response?: JsonLd.Response, actionOptions?: CardActionOptions, id?: string, appearance?: CardInnerAppearance, origin?: AnalyticsOrigin, fireEvent?: FireEventFunction, resolve?: ResolveFunction
|
|
7
|
+
declare const extractState: (response?: JsonLd.Response, actionOptions?: CardActionOptions, id?: string, appearance?: CardInnerAppearance, origin?: AnalyticsOrigin, fireEvent?: FireEventFunction, resolve?: ResolveFunction, isPreviewPanelAvailable?: (params: {
|
|
8
|
+
ari: string;
|
|
9
|
+
}) => boolean, openPreviewPanel?: (params: {
|
|
10
|
+
ari: string;
|
|
11
|
+
url: string;
|
|
12
|
+
name: string;
|
|
13
|
+
iconUrl: string | undefined;
|
|
14
|
+
}) => void) => LinkLozenge | undefined;
|
|
8
15
|
export default extractState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, renderers, resolve, actionOptions, response, status, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, origin, renderers, resolve, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, openPreviewPanel, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
|
@@ -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_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' | 'compass_applied_components_count' | '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_descriptionGalaxia' | 'follow_project' | 'follow_projectGalaxia' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | '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' | 'owned_by_override' | '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_descriptionGalaxia' | 'unfollow_projectGalaxia' | 'unfollow_project' | 'unfollow_projectGalaxia' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh';
|
|
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' | 'compass_applied_components_count' | '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_descriptionGalaxia' | 'follow_project' | 'follow_projectGalaxia' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | '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' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | '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_descriptionGalaxia' | 'unfollow_projectGalaxia' | 'unfollow_project' | 'unfollow_projectGalaxia' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_appify';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -168,6 +168,15 @@ export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appear
|
|
|
168
168
|
response?: SmartLinkResponse;
|
|
169
169
|
resolve?: ResolveFunction;
|
|
170
170
|
aiSummaryConfig?: AISummaryConfig;
|
|
171
|
+
isPreviewPanelAvailable?: (params: {
|
|
172
|
+
ari: string;
|
|
173
|
+
}) => boolean;
|
|
174
|
+
openPreviewPanel?: (params: {
|
|
175
|
+
ari: string;
|
|
176
|
+
url: string;
|
|
177
|
+
name: string;
|
|
178
|
+
iconUrl: string | undefined;
|
|
179
|
+
}) => void;
|
|
171
180
|
};
|
|
172
181
|
/**
|
|
173
182
|
* Mark a specific props in the type as optional.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.12.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/form": "^12.1.0",
|
|
40
40
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
41
41
|
"@atlaskit/heading": "^5.2.0",
|
|
42
|
-
"@atlaskit/icon": "^
|
|
42
|
+
"@atlaskit/icon": "^28.0.0",
|
|
43
43
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
44
44
|
"@atlaskit/icon-lab": "^5.6.0",
|
|
45
45
|
"@atlaskit/icon-object": "^7.2.0",
|
|
@@ -212,6 +212,9 @@
|
|
|
212
212
|
"platform_renderer_blindspots": {
|
|
213
213
|
"type": "boolean"
|
|
214
214
|
},
|
|
215
|
+
"product-terminology-refresh": {
|
|
216
|
+
"type": "boolean"
|
|
217
|
+
},
|
|
215
218
|
"platform-linking-enable-avatar-data-separator": {
|
|
216
219
|
"type": "boolean"
|
|
217
220
|
},
|