@atlaskit/smart-card 26.59.1 → 26.60.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 +22 -0
- package/dist/cjs/extractors/flexible/actions/extract-ai-summary-action.js +2 -2
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
- package/dist/cjs/utils/{get-is-ai-summary-enabled.js → ai-summary.js} +21 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/utils/index.js +8 -0
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +4 -51
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +2 -0
- package/dist/cjs/view/EmbedCard/components/styled.js +5 -1
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +22 -14
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/utils.js +32 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +67 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +23 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +5 -24
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +4 -4
- package/dist/cjs/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.js → common/ai-summary/ai-event-error-viewed.js} +1 -1
- package/dist/cjs/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/common/motion-wrapper/types.js +5 -0
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -2
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +1 -7
- package/dist/cjs/view/HoverCard/utils.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/actions/extract-ai-summary-action.js +1 -1
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -0
- package/dist/es2019/utils/ai-summary.js +25 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/utils/index.js +8 -0
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -44
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +2 -0
- package/dist/es2019/view/EmbedCard/components/styled.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +21 -13
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/utils.js +24 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +61 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +19 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +3 -22
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +4 -4
- package/dist/es2019/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.js → common/ai-summary/ai-event-error-viewed.js} +1 -1
- package/dist/es2019/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/index.js +2 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +1 -7
- package/dist/es2019/view/HoverCard/utils.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/actions/extract-ai-summary-action.js +1 -1
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
- package/dist/esm/utils/{get-is-ai-summary-enabled.js → ai-summary.js} +20 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/utils/index.js +8 -0
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +3 -50
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +2 -0
- package/dist/esm/view/EmbedCard/components/styled.js +5 -1
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +22 -14
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/utils.js +25 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +60 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +23 -4
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +5 -24
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +4 -4
- package/dist/esm/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.js → common/ai-summary/ai-event-error-viewed.js} +1 -1
- package/dist/esm/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.js +1 -1
- package/dist/esm/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/common/motion-wrapper/types.js +1 -0
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +1 -7
- package/dist/esm/view/HoverCard/utils.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/flexible/actions/extract-ai-summary-action.d.ts +3 -3
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +1 -1
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
- package/dist/types/state/hooks/use-ai-summary/index.d.ts +1 -1
- package/dist/types/utils/ai-summary.d.ts +8 -0
- package/dist/types/view/BlockCard/views/flexible/utils/index.d.ts +2 -2
- package/dist/types/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +1 -4
- package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +2 -2
- package/dist/types/view/EmbedCard/components/styled.d.ts +1 -0
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +11 -1
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/utils.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/action-footer/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/action-footer/types.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/motion-wrapper/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/types.d.ts +1 -1
- package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +2 -2
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +3 -3
- package/dist/types-ts4.5/extractors/flexible/actions/extract-ai-summary-action.d.ts +3 -3
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/ai-summary.d.ts +8 -0
- package/dist/types-ts4.5/view/BlockCard/views/flexible/utils/index.d.ts +2 -2
- package/dist/types-ts4.5/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +1 -4
- package/dist/types-ts4.5/view/EmbedCard/components/ExpandedFrame.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +11 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/utils.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/action-footer/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/action-footer/types.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/motion-wrapper/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/types.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardContent.d.ts +2 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +3 -3
- package/package.json +5 -5
- package/dist/es2019/utils/get-is-ai-summary-enabled.js +0 -5
- package/dist/types/utils/get-is-ai-summary-enabled.d.ts +0 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +0 -4
- package/dist/types-ts4.5/utils/get-is-ai-summary-enabled.d.ts +0 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +0 -4
- /package/dist/cjs/view/FlexibleCard/components/blocks/{ai-summary-block/ai-motion-wrapper → action-block/action-footer}/types.js +0 -0
- /package/dist/es2019/view/FlexibleCard/components/blocks/{ai-summary-block/ai-motion-wrapper → action-block/action-footer}/types.js +0 -0
- /package/dist/{esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper → es2019/view/FlexibleCard/components/common/motion-wrapper}/types.js +0 -0
- /package/dist/types/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.d.ts → common/ai-summary/ai-event-error-viewed.d.ts} +0 -0
- /package/dist/types/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.d.ts +0 -0
- /package/dist/types-ts4.5/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.d.ts → common/ai-summary/ai-event-error-viewed.d.ts} +0 -0
- /package/dist/types-ts4.5/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.d.ts +0 -0
|
@@ -3,7 +3,13 @@ import type { Space, XCSS } from '@atlaskit/primitives';
|
|
|
3
3
|
import type { SerializedStyles } from '@emotion/react';
|
|
4
4
|
import type { ReactChild, ReactNode } from 'react';
|
|
5
5
|
import type { SmartLinkSize } from '../../../../../constants';
|
|
6
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
+
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
+
export type ActionMessageAppearance = 'error';
|
|
8
|
+
export type ActionMessage = {
|
|
9
|
+
appearance?: ActionMessageAppearance;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
};
|
|
7
13
|
export type ActionProps = {
|
|
8
14
|
/**
|
|
9
15
|
* Determines the appearance of the action.
|
|
@@ -25,6 +31,10 @@ export type ActionProps = {
|
|
|
25
31
|
* Determines the onClick behaviour of the Action.
|
|
26
32
|
*/
|
|
27
33
|
onClick: () => any;
|
|
34
|
+
/**
|
|
35
|
+
* Error callback - each action is to provide its own implementation.
|
|
36
|
+
*/
|
|
37
|
+
onError?: (error: ActionMessage) => void;
|
|
28
38
|
/**
|
|
29
39
|
* Determines the icon rendered within the Action.
|
|
30
40
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AISummaryActionData } from '../../../../../state/flexible-ui-context/types';
|
|
3
|
-
import { AISummaryActionProps } from './types';
|
|
4
|
-
export declare const AISummaryActionComponent: ({ onClick: onClickCallback, url, ari, product, ...props }: AISummaryActionProps & AISummaryActionData) => JSX.Element | null;
|
|
2
|
+
import { type AISummaryActionData } from '../../../../../state/flexible-ui-context/types';
|
|
3
|
+
import { type AISummaryActionProps } from './types';
|
|
4
|
+
export declare const AISummaryActionComponent: ({ onClick: onClickCallback, onError: onErrorCallback, url, ari, product, ...props }: AISummaryActionProps & AISummaryActionData) => JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import type { ActionBlockProps } from './types';
|
|
4
4
|
declare const ActionBlock: ({ blockRef, onClick: onClickCallback, size, spaceInline, testId, }: ActionBlockProps) => jsx.JSX.Element | null;
|
|
5
5
|
export default ActionBlock;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { ActionItem } from '../../FlexibleCard/components/blocks/types';
|
|
3
|
-
import { HoverCardContentProps } from '../types';
|
|
2
|
+
import { type ActionItem } from '../../FlexibleCard/components/blocks/types';
|
|
3
|
+
import { type HoverCardContentProps } from '../types';
|
|
4
4
|
export declare const hoverCardClassName = "smart-links-hover-preview";
|
|
5
5
|
export declare const getCopyAction: (url: string) => ActionItem;
|
|
6
6
|
declare const HoverCardContent: ({ id, analytics: _analytics, cardActions, cardState, onActionClick, onResolve, renderers, url, onMouseEnter, onMouseLeave, actionOptions, }: HoverCardContentProps) => jsx.JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ActionItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
3
|
-
import { LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
4
|
-
import { HoverCardResolvedProps } from './types';
|
|
2
|
+
import { type ActionItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
3
|
+
import { type LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
4
|
+
import { type HoverCardResolvedProps } from './types';
|
|
5
5
|
export declare const toFooterActions: (cardActions: LinkAction[], onActionClick?: ((actionId: string) => void) | undefined) => ActionItem[];
|
|
6
6
|
declare const HoverCardResolvedView: React.FC<HoverCardResolvedProps>;
|
|
7
7
|
export default HoverCardResolvedView;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonLd } from 'json-ld-types';
|
|
1
|
+
import { type JsonLd } from 'json-ld-types';
|
|
2
2
|
import { type CardActionOptions } from '../../../view/Card/types';
|
|
3
|
-
import { AISummaryActionData } from '../../../state/flexible-ui-context/types';
|
|
4
|
-
import { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
3
|
+
import { type AISummaryActionData } from '../../../state/flexible-ui-context/types';
|
|
4
|
+
import { type AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
5
5
|
export declare const extractAISummaryAction: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, aiSummaryConfig?: AISummaryConfig) => AISummaryActionData | undefined;
|
|
@@ -10,7 +10,7 @@ export declare class AISummaryService implements AISummaryServiceInt {
|
|
|
10
10
|
private onError?;
|
|
11
11
|
constructor(props: AISummaryServiceProps);
|
|
12
12
|
private fetchStream;
|
|
13
|
-
summariseUrl(): Promise<
|
|
13
|
+
summariseUrl(): Promise<AISummaryState>;
|
|
14
14
|
private isExpectedError;
|
|
15
15
|
subscribe(stateSetter: StateSetter): () => void;
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="filesystem" />
|
|
2
2
|
import type { ProductType } from '@atlaskit/linking-common';
|
|
3
3
|
export interface AISummaryServiceInt {
|
|
4
|
-
summariseUrl: () => Promise<
|
|
4
|
+
summariseUrl: () => Promise<AISummaryState>;
|
|
5
5
|
state: AISummaryState;
|
|
6
6
|
subscribe: (stateSetter: StateSetter) => () => void;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AISummaryServiceProps, AISummaryState } from './ai-summary-service/types';
|
|
2
2
|
export declare const useAISummary: (props: AISummaryServiceProps) => {
|
|
3
|
-
summariseUrl: () => Promise<
|
|
3
|
+
summariseUrl: () => Promise<AISummaryState> | undefined;
|
|
4
4
|
state: AISummaryState;
|
|
5
5
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JsonLd } from 'json-ld-types';
|
|
2
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
import type { ErrorMessage } from '../state/hooks/use-ai-summary/ai-summary-service/types';
|
|
4
|
+
export declare const getIsAISummaryEnabled: (isAdminHubAIEnabled?: boolean, response?: JsonLd.Response) => boolean;
|
|
5
|
+
export declare const getAISummaryErrorMessage: (error?: ErrorMessage) => {
|
|
6
|
+
message: MessageDescriptor;
|
|
7
|
+
url?: string;
|
|
8
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JsonLd } from 'json-ld-types';
|
|
1
|
+
import type { JsonLd } from 'json-ld-types';
|
|
2
2
|
import type { FlexibleUiOptions } from '../../../../FlexibleCard/types';
|
|
3
3
|
import type { FooterBlockProps } from '../../../../FlexibleCard/components/blocks/footer-block/types';
|
|
4
4
|
import type { PreviewBlockProps } from '../../../../FlexibleCard/components/blocks/preview-block/types';
|
|
5
5
|
import type { TitleBlockProps } from '../../../../FlexibleCard/components/blocks/title-block/types';
|
|
6
|
-
import { ElementItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
6
|
+
import type { ElementItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
7
7
|
export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
|
|
8
8
|
type SimulatedMetadata = {
|
|
9
9
|
titleMetadata: ElementItem[];
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from '../types';
|
|
3
|
-
declare function
|
|
4
|
-
declare function LazyIntersectionObserverCardNext(props: CardWithUrlContentProps): JSX.Element;
|
|
5
|
-
export declare const LazyIntersectionObserverCard: typeof LazyIntersectionObserverCardNext | typeof LazyIntersectionObserverCardLegacy;
|
|
6
|
-
export {};
|
|
3
|
+
export declare function LazyIntersectionObserverCard(props: CardWithUrlContentProps): JSX.Element;
|
|
@@ -46,6 +46,7 @@ export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
46
46
|
export interface ContentProps {
|
|
47
47
|
isInteractive: boolean;
|
|
48
48
|
allowScrollBar: boolean;
|
|
49
|
+
removeOverflow?: boolean;
|
|
49
50
|
frameStyle?: FrameStyle;
|
|
50
51
|
}
|
|
51
52
|
export declare const Content: import("@emotion/styled").StyledComponent<{
|
|
@@ -3,7 +3,13 @@ import type { Space, XCSS } from '@atlaskit/primitives';
|
|
|
3
3
|
import type { SerializedStyles } from '@emotion/react';
|
|
4
4
|
import type { ReactChild, ReactNode } from 'react';
|
|
5
5
|
import type { SmartLinkSize } from '../../../../../constants';
|
|
6
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
+
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
+
export type ActionMessageAppearance = 'error';
|
|
8
|
+
export type ActionMessage = {
|
|
9
|
+
appearance?: ActionMessageAppearance;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
};
|
|
7
13
|
export type ActionProps = {
|
|
8
14
|
/**
|
|
9
15
|
* Determines the appearance of the action.
|
|
@@ -25,6 +31,10 @@ export type ActionProps = {
|
|
|
25
31
|
* Determines the onClick behaviour of the Action.
|
|
26
32
|
*/
|
|
27
33
|
onClick: () => any;
|
|
34
|
+
/**
|
|
35
|
+
* Error callback - each action is to provide its own implementation.
|
|
36
|
+
*/
|
|
37
|
+
onError?: (error: ActionMessage) => void;
|
|
28
38
|
/**
|
|
29
39
|
* Determines the icon rendered within the Action.
|
|
30
40
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AISummaryActionData } from '../../../../../state/flexible-ui-context/types';
|
|
3
|
-
import { AISummaryActionProps } from './types';
|
|
4
|
-
export declare const AISummaryActionComponent: ({ onClick: onClickCallback, url, ari, product, ...props }: AISummaryActionProps & AISummaryActionData) => JSX.Element | null;
|
|
2
|
+
import { type AISummaryActionData } from '../../../../../state/flexible-ui-context/types';
|
|
3
|
+
import { type AISummaryActionProps } from './types';
|
|
4
|
+
export declare const AISummaryActionComponent: ({ onClick: onClickCallback, onError: onErrorCallback, url, ari, product, ...props }: AISummaryActionProps & AISummaryActionData) => JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import type { ActionBlockProps } from './types';
|
|
4
4
|
declare const ActionBlock: ({ blockRef, onClick: onClickCallback, size, spaceInline, testId, }: ActionBlockProps) => jsx.JSX.Element | null;
|
|
5
5
|
export default ActionBlock;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { ActionItem } from '../../FlexibleCard/components/blocks/types';
|
|
3
|
-
import { HoverCardContentProps } from '../types';
|
|
2
|
+
import { type ActionItem } from '../../FlexibleCard/components/blocks/types';
|
|
3
|
+
import { type HoverCardContentProps } from '../types';
|
|
4
4
|
export declare const hoverCardClassName = "smart-links-hover-preview";
|
|
5
5
|
export declare const getCopyAction: (url: string) => ActionItem;
|
|
6
6
|
declare const HoverCardContent: ({ id, analytics: _analytics, cardActions, cardState, onActionClick, onResolve, renderers, url, onMouseEnter, onMouseLeave, actionOptions, }: HoverCardContentProps) => jsx.JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ActionItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
3
|
-
import { LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
4
|
-
import { HoverCardResolvedProps } from './types';
|
|
2
|
+
import { type ActionItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
3
|
+
import { type LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
4
|
+
import { type HoverCardResolvedProps } from './types';
|
|
5
5
|
export declare const toFooterActions: (cardActions: LinkAction[], onActionClick?: ((actionId: string) => void) | undefined) => ActionItem[];
|
|
6
6
|
declare const HoverCardResolvedView: React.FC<HoverCardResolvedProps>;
|
|
7
7
|
export default HoverCardResolvedView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.60.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
54
54
|
"@atlaskit/popup": "^1.17.0",
|
|
55
|
-
"@atlaskit/primitives": "^6.
|
|
55
|
+
"@atlaskit/primitives": "^6.1.0",
|
|
56
56
|
"@atlaskit/spinner": "^16.1.0",
|
|
57
57
|
"@atlaskit/theme": "^12.7.0",
|
|
58
58
|
"@atlaskit/tokens": "^1.45.0",
|
|
@@ -162,9 +162,6 @@
|
|
|
162
162
|
"platform.linking-platform.smart-card.hover-card-ai-summaries-release-stable": {
|
|
163
163
|
"type": "boolean"
|
|
164
164
|
},
|
|
165
|
-
"platform.linking-platform.smart-card.fix-intersection-observer": {
|
|
166
|
-
"type": "boolean"
|
|
167
|
-
},
|
|
168
165
|
"platform.linking-platform.smart-card.enable-embed-card-header-tooltip_g9saw": {
|
|
169
166
|
"type": "boolean"
|
|
170
167
|
},
|
|
@@ -176,6 +173,9 @@
|
|
|
176
173
|
},
|
|
177
174
|
"platform.linking-platform.smart-card.standardise-smart-link-icon-behaviour": {
|
|
178
175
|
"type": "boolean"
|
|
176
|
+
},
|
|
177
|
+
"platform.linking-platform.smart-card.fix-embed-card-blurring": {
|
|
178
|
+
"type": "boolean"
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
181
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
|
-
export const getIsAISummaryEnabled = (isAdminHubAIEnabled = false, response) => {
|
|
3
|
-
var _response$meta, _response$meta$suppor;
|
|
4
|
-
return Boolean(getBooleanFF('platform.linking-platform.smart-card.hover-card-ai-summaries') && isAdminHubAIEnabled && (response === null || response === void 0 ? void 0 : (_response$meta = response.meta) === null || _response$meta === void 0 ? void 0 : (_response$meta$suppor = _response$meta.supportedFeature) === null || _response$meta$suppor === void 0 ? void 0 : _response$meta$suppor.includes('AISummary')));
|
|
5
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|