@atlaskit/smart-card 33.2.0 → 33.4.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 +16 -0
- package/dist/cjs/state/actions/index.js +2 -4
- package/dist/cjs/state/analytics/index.js +1 -8
- package/dist/cjs/state/flexible-ui-context/index.js +1 -10
- package/dist/cjs/state/hooks/useSmartLink.js +1 -4
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +1 -3
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/cjs/state/index.js +1 -8
- package/dist/cjs/utils/analytics/analytics.js +2 -144
- package/dist/cjs/utils/analytics/index.js +0 -30
- package/dist/cjs/utils/analytics/types.js +1 -5
- package/dist/cjs/utils/mocks.js +1 -23
- package/dist/cjs/view/BlockCard/index.js +1 -3
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +2 -4
- package/dist/cjs/view/CardWithUrl/component.js +1 -8
- package/dist/cjs/view/EmbedCard/index.js +0 -4
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +3 -5
- package/dist/cjs/view/EmbedModal/index.js +1 -3
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/index.js +3 -17
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +9 -5
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +3 -5
- package/dist/cjs/view/InlineCard/index.js +1 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/actions/index.js +2 -4
- package/dist/es2019/state/analytics/index.js +1 -2
- package/dist/es2019/state/flexible-ui-context/index.js +0 -7
- package/dist/es2019/state/hooks/useSmartLink.js +1 -4
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +1 -3
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/es2019/state/index.js +1 -2
- package/dist/es2019/utils/analytics/analytics.js +2 -145
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/utils/analytics/types.js +0 -1
- package/dist/es2019/utils/mocks.js +1 -23
- package/dist/es2019/view/BlockCard/index.js +1 -3
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +1 -3
- package/dist/es2019/view/CardWithUrl/component.js +1 -8
- package/dist/es2019/view/EmbedCard/index.js +0 -4
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -3
- package/dist/es2019/view/EmbedModal/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +2 -5
- package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +2 -5
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +2 -5
- package/dist/es2019/view/FlexibleCard/index.js +3 -15
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +9 -5
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +2 -4
- package/dist/es2019/view/InlineCard/index.js +0 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/actions/index.js +2 -4
- package/dist/esm/state/analytics/index.js +1 -2
- package/dist/esm/state/flexible-ui-context/index.js +0 -9
- package/dist/esm/state/hooks/useSmartLink.js +1 -4
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +1 -3
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/esm/state/index.js +1 -2
- package/dist/esm/utils/analytics/analytics.js +1 -143
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/utils/analytics/types.js +0 -1
- package/dist/esm/utils/mocks.js +0 -22
- package/dist/esm/view/BlockCard/index.js +1 -3
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +2 -4
- package/dist/esm/view/CardWithUrl/component.js +1 -8
- package/dist/esm/view/EmbedCard/index.js +0 -4
- package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +3 -5
- package/dist/esm/view/EmbedModal/index.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +2 -5
- package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +2 -5
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +2 -5
- package/dist/esm/view/FlexibleCard/index.js +4 -18
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +9 -5
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -5
- package/dist/esm/view/InlineCard/index.js +1 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/actions/types.d.ts +0 -2
- package/dist/types/state/actions/index.d.ts +1 -2
- package/dist/types/state/analytics/index.d.ts +0 -2
- package/dist/types/state/flexible-ui-context/index.d.ts +1 -7
- package/dist/types/state/flexible-ui-context/types.d.ts +0 -6
- package/dist/types/state/hooks/use-invoke-client-action/types.d.ts +0 -6
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -7
- package/dist/types/state/index.d.ts +0 -1
- package/dist/types/utils/analytics/analytics.d.ts +0 -6
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +0 -42
- package/dist/types/utils/mocks.d.ts +0 -7
- package/dist/types/view/BlockCard/index.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +0 -2
- package/dist/types/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +0 -2
- package/dist/types/view/EmbedCard/types.d.ts +0 -2
- package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
- package/dist/types/view/EmbedModal/components/analytics/types.d.ts +0 -2
- package/dist/types/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +0 -6
- package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
- package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
- package/dist/types/view/HoverCard/types.d.ts +15 -3
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
- package/dist/types/view/InlineCard/index.d.ts +1 -1
- package/dist/types/view/InlineCard/types.d.ts +0 -2
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +0 -6
- package/dist/types-ts4.5/extractors/common/actions/types.d.ts +0 -2
- package/dist/types-ts4.5/state/actions/index.d.ts +1 -2
- package/dist/types-ts4.5/state/analytics/index.d.ts +0 -2
- package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +1 -7
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +0 -6
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/types.d.ts +0 -6
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -7
- package/dist/types-ts4.5/state/index.d.ts +0 -1
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +0 -6
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -42
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -7
- package/dist/types-ts4.5/view/BlockCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedModal/components/analytics/types.d.ts +0 -2
- package/dist/types-ts4.5/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +0 -6
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardContent.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +15 -3
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +0 -6
- package/package.json +1 -1
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +0 -139
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +0 -126
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +0 -132
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +0 -33
- package/dist/types/utils/analytics/__mocks__/analytics.d.ts +0 -2
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +0 -33
- package/dist/types-ts4.5/utils/analytics/__mocks__/analytics.d.ts +0 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type CardAuthFlowOpts, type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
4
3
|
import { type CardState } from '../../state/types';
|
|
5
4
|
import { type CardActionOptions, type OnResolveCallback } from '../Card/types';
|
|
6
5
|
import { type OnErrorCallback } from '../types';
|
|
@@ -17,5 +16,4 @@ export type BlockCardProps = {
|
|
|
17
16
|
testId?: string;
|
|
18
17
|
actionOptions?: CardActionOptions;
|
|
19
18
|
renderers?: CardProviderRenderers;
|
|
20
|
-
analytics: AnalyticsFacade;
|
|
21
19
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type FlexibleCardProps } from '../../FlexibleCard/types';
|
|
2
|
-
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, '
|
|
2
|
+
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url'>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type EventHandler, type KeyboardEvent, type MouseEvent } from 'react';
|
|
2
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
3
2
|
import type { CardActionOptions, CardAppearance, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
4
3
|
import { type FrameStyle } from '../EmbedCard/types';
|
|
5
4
|
import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
@@ -27,7 +26,6 @@ export type CardWithUrlContentProps = {
|
|
|
27
26
|
children?: React.ReactNode;
|
|
28
27
|
showHoverPreview?: boolean;
|
|
29
28
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
30
|
-
analyticsEvents?: AnalyticsFacade;
|
|
31
29
|
placeholder?: string;
|
|
32
30
|
removeTextHighlightingFromTitle?: boolean;
|
|
33
31
|
resolvingPlaceholder?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
3
|
import { type InvokeHandler } from '../../model/invoke-handler';
|
|
4
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
5
4
|
import { type CardState } from '../../state/types';
|
|
6
5
|
import type { CardActionOptions, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
7
6
|
import { type OnErrorCallback } from '../types';
|
|
@@ -11,7 +10,6 @@ export type EmbedCardProps = {
|
|
|
11
10
|
handleAuthorize: (() => void) | undefined;
|
|
12
11
|
handleErrorRetry: () => void;
|
|
13
12
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
14
|
-
analytics: AnalyticsFacade;
|
|
15
13
|
handleInvoke: InvokeHandler;
|
|
16
14
|
id?: string;
|
|
17
15
|
isSelected?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type UnauthorizedViewProps } from './types';
|
|
3
|
-
declare const UnauthorizedView: ({
|
|
3
|
+
declare const UnauthorizedView: ({ context, extensionKey, isProductIntegrationSupported, onAuthorize, testId, ...unresolvedViewProps }: UnauthorizedViewProps) => JSX.Element;
|
|
4
4
|
export default UnauthorizedView;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AnalyticsFacade } from '../../../../state/analytics';
|
|
2
1
|
import type { ContextViewModel } from '../../types';
|
|
3
2
|
import type { UnresolvedViewCardProps } from '../unresolved-view/types';
|
|
4
3
|
export type UnauthorizedViewProps = UnresolvedViewCardProps & {
|
|
5
|
-
analytics: AnalyticsFacade;
|
|
6
4
|
context?: ContextViewModel;
|
|
7
5
|
extensionKey?: string;
|
|
8
6
|
isProductIntegrationSupported?: boolean;
|
|
@@ -6,5 +6,5 @@ import { type FlexibleCardProps } from './types';
|
|
|
6
6
|
* Note: TitleBlock is mandatory for a Flexible Card to render.
|
|
7
7
|
* @see Container
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleCard: ({
|
|
9
|
+
declare const FlexibleCard: ({ appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -5,7 +5,6 @@ import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
|
5
5
|
import { type CardState, type LinkingPlatformFeatureFlags } from '@atlaskit/linking-common';
|
|
6
6
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
7
7
|
import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
|
|
8
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
9
8
|
import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|
|
10
9
|
import { type ResolveFunction } from '../../state/hooks/use-resolve';
|
|
11
10
|
import { type AnalyticsOrigin } from '../../utils/types';
|
|
@@ -17,11 +16,6 @@ export type FlexibleCardProps = {
|
|
|
17
16
|
* @internal A unique ID for a Smart Link.
|
|
18
17
|
*/
|
|
19
18
|
id?: string;
|
|
20
|
-
/**
|
|
21
|
-
* An analytics facade object which will be used to send analytics.
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
analytics?: AnalyticsFacade;
|
|
25
19
|
/**
|
|
26
20
|
* Determines the appearance of the Smart Link.
|
|
27
21
|
* @internal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type HoverCardComponentProps } from '../types';
|
|
3
3
|
export declare const HOVER_CARD_SOURCE = "smartLinkPreviewHoverCard";
|
|
4
|
-
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
4
|
+
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, role, label, titleId }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type HoverCardContentProps } from '../types';
|
|
3
3
|
export declare const hoverCardClassName = "smart-links-hover-preview";
|
|
4
|
-
declare const HoverCardContent: ({ id,
|
|
4
|
+
declare const HoverCardContent: ({ id, cardState, onActionClick, onResolve, renderers, url, onMouseEnter, onMouseLeave, actionOptions, }: HoverCardContentProps) => jsx.JSX.Element | null;
|
|
5
5
|
export default HoverCardContent;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type CardState } from '@atlaskit/linking-common';
|
|
2
2
|
import type { ActionName } from '../../../../../constants';
|
|
3
|
-
import { type AnalyticsFacade } from '../../../../../state/analytics';
|
|
4
3
|
import { type LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
5
4
|
import { type HoverCardLoadingViewProps } from '../resolving/types';
|
|
6
5
|
export type HoverCardResolvedProps = {
|
|
7
6
|
extensionKey?: string;
|
|
8
7
|
id?: string;
|
|
9
8
|
url: string;
|
|
10
|
-
analytics: AnalyticsFacade;
|
|
11
9
|
cardActions?: LinkAction[];
|
|
12
10
|
cardState: CardState;
|
|
13
11
|
isAISummaryEnabled?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type HoverCardUnauthorisedProps } from './types';
|
|
3
|
-
declare const HoverCardUnauthorisedView: ({
|
|
3
|
+
declare const HoverCardUnauthorisedView: ({ id, flexibleCardProps, testId, url, }: HoverCardUnauthorisedProps) => JSX.Element;
|
|
4
4
|
export default HoverCardUnauthorisedView;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { type AnalyticsFacade } from '../../../../../state/analytics';
|
|
2
1
|
import { type FlexibleCardProps } from '../../../../FlexibleCard/types';
|
|
3
2
|
export type HoverCardUnauthorisedProps = {
|
|
4
|
-
/**
|
|
5
|
-
* An AnalyticsFacade object used for calling analytics.
|
|
6
|
-
*/
|
|
7
|
-
analytics: AnalyticsFacade;
|
|
8
3
|
/**
|
|
9
4
|
* Provides the extensionKey of a Smart Link resolver invoked.
|
|
10
5
|
*/
|
|
@@ -4,7 +4,6 @@ import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
4
4
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
5
5
|
import { type CardState } from '@atlaskit/linking-common';
|
|
6
6
|
import type { ActionName } from '../../constants';
|
|
7
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
8
7
|
import { type AnalyticsHandler } from '../../utils/types';
|
|
9
8
|
import type { CardActionOptions } from '../Card/types';
|
|
10
9
|
export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
@@ -43,6 +42,21 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
43
42
|
* Additional configurations for hover card.
|
|
44
43
|
*/
|
|
45
44
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Use this to set the accessibility role for the hover card.
|
|
47
|
+
* Should be used along with `label` or `titleId` for supported roles.
|
|
48
|
+
*/
|
|
49
|
+
role?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Refers to an `aria-label` attribute. Sets an accessible name for the hover card to announce it to users of assistive technology.
|
|
52
|
+
* Usage of either this, or the `titleId` attribute is strongly recommended.
|
|
53
|
+
*/
|
|
54
|
+
label?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Id referenced by the hover card `aria-labelledby` attribute.
|
|
57
|
+
* Usage of either this, or the `label` attribute is strongly recommended.
|
|
58
|
+
*/
|
|
59
|
+
titleId?: string;
|
|
46
60
|
}
|
|
47
61
|
/**
|
|
48
62
|
* An internal props that internal smart-card components can use to configure
|
|
@@ -63,13 +77,11 @@ export interface HoverCardInternalProps {
|
|
|
63
77
|
}
|
|
64
78
|
export interface HoverCardComponentProps extends HoverCardProps, HoverCardInternalProps {
|
|
65
79
|
analyticsHandler?: AnalyticsHandler;
|
|
66
|
-
analytics?: AnalyticsFacade;
|
|
67
80
|
canOpen?: boolean;
|
|
68
81
|
closeOnChildClick?: boolean;
|
|
69
82
|
}
|
|
70
83
|
export type HoverCardContentProps = {
|
|
71
84
|
id?: string;
|
|
72
|
-
analytics?: AnalyticsFacade;
|
|
73
85
|
cardState: CardState;
|
|
74
86
|
renderers?: CardProviderRenderers;
|
|
75
87
|
onActionClick: (actionId: string | ActionName) => void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type AnalyticsFacade } from '../../../state/analytics';
|
|
3
2
|
export interface InlineCardUnauthorizedViewProps {
|
|
4
3
|
/** The url to display */
|
|
5
4
|
url: string;
|
|
@@ -19,8 +18,6 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
19
18
|
showHoverPreview?: boolean;
|
|
20
19
|
/** A smart link id that may be used in analytics */
|
|
21
20
|
id?: string;
|
|
22
|
-
/** An AnalyticsFacade object used for calling analytics. */
|
|
23
|
-
analytics: AnalyticsFacade;
|
|
24
21
|
/** An identifier of the provider which will be executing the action. */
|
|
25
22
|
extensionKey?: string;
|
|
26
23
|
/** Truncates the card to one line */
|
|
@@ -6,4 +6,4 @@ import { InlineCardResolvingView } from './ResolvingView';
|
|
|
6
6
|
import { type InlineCardProps } from './types';
|
|
7
7
|
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
8
8
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView, };
|
|
9
|
-
export declare const InlineCard: ({
|
|
9
|
+
export declare const InlineCard: ({ id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, actionOptions, removeTextHighlightingFromTitle, resolvingPlaceholder, truncateInline, }: InlineCardProps) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type EventHandler, type KeyboardEvent, type MouseEvent } from 'react';
|
|
2
2
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
4
3
|
import { type CardState } from '../../state/types';
|
|
5
4
|
import type { CardActionOptions } from '../Card/types';
|
|
6
5
|
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
@@ -24,7 +23,6 @@ export type InlineCardProps = {
|
|
|
24
23
|
showHoverPreview?: boolean;
|
|
25
24
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
26
25
|
actionOptions?: CardActionOptions;
|
|
27
|
-
analytics: AnalyticsFacade;
|
|
28
26
|
removeTextHighlightingFromTitle?: boolean;
|
|
29
27
|
resolvingPlaceholder?: string;
|
|
30
28
|
truncateInline?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
3
2
|
type UnauthorisedViewContentProps = {
|
|
4
3
|
/**
|
|
5
4
|
* Is the name of the provider for the account that needs to be connected
|
|
@@ -17,11 +16,6 @@ type UnauthorisedViewContentProps = {
|
|
|
17
16
|
* serving as a hook for automated tests
|
|
18
17
|
*/
|
|
19
18
|
testId?: string;
|
|
20
|
-
/**
|
|
21
|
-
* An analytics facade object which will be used to send analytics.
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
analytics?: AnalyticsFacade;
|
|
25
19
|
};
|
|
26
20
|
/**
|
|
27
21
|
* This component is used in unauthorized views of a smart link.
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
import { type AnalyticsFacade } from '../../../state/analytics';
|
|
3
2
|
import { type AnalyticsOrigin } from '../../../utils/types';
|
|
4
3
|
import { type CardActionOptions, type CardInnerAppearance } from '../../../view/Card/types';
|
|
5
4
|
export type ExtractActionsProps = {
|
|
6
5
|
response: JsonLd.Response;
|
|
7
|
-
analytics: AnalyticsFacade;
|
|
8
6
|
actionOptions?: CardActionOptions;
|
|
9
7
|
extensionKey?: string;
|
|
10
8
|
source?: CardInnerAppearance;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type JsonLd } from 'json-ld-types';
|
|
2
2
|
import { type InvokeClientOpts, type InvokeServerOpts } from '../../model/invoke-opts';
|
|
3
3
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
4
|
-
|
|
5
|
-
export declare const useSmartCardActions: (id: string, url: string, analytics: AnalyticsFacade) => {
|
|
4
|
+
export declare const useSmartCardActions: (id: string, url: string) => {
|
|
6
5
|
register: () => Promise<void>;
|
|
7
6
|
reload: () => void;
|
|
8
7
|
authorize: (appearance: CardInnerAppearance) => void;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type FlexibleUiOptions } from '../../view/FlexibleCard/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { FlexibleUiDataContext } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
6
6
|
* underlying elements.
|
|
7
7
|
*/
|
|
8
8
|
export declare const FlexibleUiContext: import("react").Context<FlexibleUiDataContext | undefined>;
|
|
9
9
|
export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
12
|
-
* underlying elements.
|
|
13
|
-
*/
|
|
14
|
-
export declare const FlexibleUiAnalyticsContext: import("react").Context<FlexibleAnalyticsContextType | undefined>;
|
|
15
|
-
export declare const useFlexibleUiAnalyticsContext: () => FlexibleAnalyticsContextType | undefined;
|
|
16
10
|
/**
|
|
17
11
|
* This provides the ui options that will be used by Smart Links Flexible UI
|
|
18
12
|
* to render its underlying elements.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
2
2
|
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
3
3
|
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
4
|
-
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
5
|
-
import { type AnalyticsFacade } from '../analytics';
|
|
6
4
|
import { type InvokeClientActionProps } from '../hooks/use-invoke-client-action/types';
|
|
7
5
|
import { type InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
8
6
|
/**
|
|
@@ -275,10 +273,6 @@ export type AutomationActionData = {
|
|
|
275
273
|
export type ViewRelatedLinksActionData = {
|
|
276
274
|
ari: string;
|
|
277
275
|
};
|
|
278
|
-
export type FlexibleAnalyticsContextType = AnalyticsFacade & {
|
|
279
|
-
display?: CardInnerAppearance;
|
|
280
|
-
extensionKey?: string;
|
|
281
|
-
};
|
|
282
276
|
export type ServerActionProp<TValue> = {
|
|
283
277
|
action: InvokeRequestWithCardDetails;
|
|
284
278
|
value?: TValue;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { type FireEventFunction } from '../../../common/analytics/types';
|
|
2
2
|
import { type CardInnerAppearance } from '../../../view/Card/types';
|
|
3
|
-
import { type AnalyticsFacade } from '../../analytics';
|
|
4
3
|
export type UseInvokeClientActionProps = {
|
|
5
|
-
/**
|
|
6
|
-
* Analytics object
|
|
7
|
-
*/
|
|
8
|
-
analytics?: AnalyticsFacade;
|
|
9
4
|
/**
|
|
10
5
|
* A function to dispatch analytics events.
|
|
11
6
|
*/
|
|
@@ -38,7 +33,6 @@ export type InvokeClientActionProps = {
|
|
|
38
33
|
/**
|
|
39
34
|
* Link provider extension key
|
|
40
35
|
* This value should have already been set in analytics object through
|
|
41
|
-
* useSmartLinkAnalytics() and/or into the analytic context.
|
|
42
36
|
*/
|
|
43
37
|
extensionKey?: string;
|
|
44
38
|
/**
|
|
@@ -8,13 +8,6 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
8
8
|
loadMetadata: () => Promise<void> | undefined;
|
|
9
9
|
};
|
|
10
10
|
config: (import("@atlaskit/link-provider").CardProviderCacheOpts & import("@atlaskit/link-provider").CardAuthFlowOpts) | undefined;
|
|
11
|
-
analytics: {
|
|
12
|
-
operational: {
|
|
13
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
14
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
15
|
-
};
|
|
16
|
-
screen: Screen;
|
|
17
|
-
};
|
|
18
11
|
renderers: import("@atlaskit/link-provider").CardProviderRenderers | undefined;
|
|
19
12
|
error: Error | null;
|
|
20
13
|
};
|
|
@@ -2,4 +2,3 @@ export { SmartCardContext, SmartCardProvider, useSmartLinkContext } from '@atlas
|
|
|
2
2
|
export type { CardContext, ProviderProps } from '@atlaskit/link-provider';
|
|
3
3
|
export type { CardType } from '@atlaskit/linking-common';
|
|
4
4
|
export { useSmartLink, usePrefetch } from './hooks';
|
|
5
|
-
export { useSmartLinkAnalytics } from './analytics';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
3
3
|
import { type AnalyticsPayload } from '../types';
|
|
4
|
-
import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps } from './types';
|
|
5
4
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
6
5
|
export declare const context: {
|
|
7
6
|
componentName: string;
|
|
@@ -20,8 +19,3 @@ export declare class SmartLinkEvents {
|
|
|
20
19
|
insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
|
|
21
20
|
}
|
|
22
21
|
export declare const fireSmartLinkEvent: (payload: AnalyticsPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent) => void;
|
|
23
|
-
export declare const invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => AnalyticsPayload;
|
|
24
|
-
export declare const invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => AnalyticsPayload;
|
|
25
|
-
export declare const uiActionClickedEvent: ({ id, actionType, extensionKey, display, definitionId, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => AnalyticsPayload;
|
|
26
|
-
export declare const uiRenderSuccessEvent: ({ display, status, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, canBeDatasource, }: UiRenderSuccessEventProps) => AnalyticsPayload;
|
|
27
|
-
export declare const uiRenderFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => AnalyticsPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent
|
|
1
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent } from './analytics';
|
|
@@ -1,47 +1,5 @@
|
|
|
1
|
-
import { type ErrorInfo } from 'react';
|
|
2
|
-
import { type CardType } from '@atlaskit/linking-common';
|
|
3
|
-
import { type InvokeType } from '../../model/invoke-opts';
|
|
4
|
-
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
5
1
|
export type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
|
|
6
2
|
export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
|
|
7
|
-
export interface CommonEventProps {
|
|
8
|
-
id?: string;
|
|
9
|
-
definitionId?: string;
|
|
10
|
-
extensionKey?: string;
|
|
11
|
-
resourceType?: string;
|
|
12
|
-
destinatinoObjectType?: string;
|
|
13
|
-
destinationSubproduct?: DestinationSubproduct | string;
|
|
14
|
-
destinationProduct?: DestinationProduct | string;
|
|
15
|
-
location?: string;
|
|
16
|
-
statusDetails?: string;
|
|
17
|
-
}
|
|
18
|
-
export type InvokeSucceededEventProps = CommonEventProps & {
|
|
19
|
-
id?: string;
|
|
20
|
-
actionType: string;
|
|
21
|
-
display?: CardInnerAppearance;
|
|
22
|
-
};
|
|
23
|
-
export type InvokeFailedEventProps = CommonEventProps & {
|
|
24
|
-
id?: string;
|
|
25
|
-
actionType: string;
|
|
26
|
-
display?: CardInnerAppearance;
|
|
27
|
-
reason: string;
|
|
28
|
-
};
|
|
29
|
-
export type UiActionClickedEventProps = CommonEventProps & {
|
|
30
|
-
id?: string;
|
|
31
|
-
display?: CardInnerAppearance;
|
|
32
|
-
actionType: string;
|
|
33
|
-
invokeType?: InvokeType;
|
|
34
|
-
};
|
|
35
|
-
export type UiRenderSuccessEventProps = CommonEventProps & {
|
|
36
|
-
display: CardInnerAppearance;
|
|
37
|
-
status: CardType;
|
|
38
|
-
canBeDatasource?: boolean;
|
|
39
|
-
};
|
|
40
|
-
export type UiRenderFailedEventProps = CommonEventProps & {
|
|
41
|
-
display: CardInnerAppearance;
|
|
42
|
-
error: Error;
|
|
43
|
-
errorInfo: ErrorInfo;
|
|
44
|
-
};
|
|
45
3
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
46
4
|
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
|
|
47
5
|
export type UiLinkClickedEventProps = {
|
|
@@ -89,10 +89,3 @@ export declare const mocks: {
|
|
|
89
89
|
export declare const fakeResponse: () => Promise<JsonLd.Response<JsonLd.Data.BaseData>>;
|
|
90
90
|
export declare const fakeFactory: any;
|
|
91
91
|
export declare const waitFor: (time?: number) => Promise<unknown>;
|
|
92
|
-
export declare const mockAnalytics: {
|
|
93
|
-
operational: {
|
|
94
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
|
|
95
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeFailedEventProps) => void;
|
|
96
|
-
};
|
|
97
|
-
screen: Screen;
|
|
98
|
-
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type BlockCardProps } from './types';
|
|
3
|
-
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId,
|
|
3
|
+
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, }: BlockCardProps) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type CardAuthFlowOpts, type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
4
3
|
import { type CardState } from '../../state/types';
|
|
5
4
|
import { type CardActionOptions, type OnResolveCallback } from '../Card/types';
|
|
6
5
|
import { type OnErrorCallback } from '../types';
|
|
@@ -17,5 +16,4 @@ export type BlockCardProps = {
|
|
|
17
16
|
testId?: string;
|
|
18
17
|
actionOptions?: CardActionOptions;
|
|
19
18
|
renderers?: CardProviderRenderers;
|
|
20
|
-
analytics: AnalyticsFacade;
|
|
21
19
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type FlexibleCardProps } from '../../FlexibleCard/types';
|
|
2
|
-
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, '
|
|
2
|
+
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url'>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type EventHandler, type KeyboardEvent, type MouseEvent } from 'react';
|
|
2
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
3
2
|
import type { CardActionOptions, CardAppearance, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
4
3
|
import { type FrameStyle } from '../EmbedCard/types';
|
|
5
4
|
import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
@@ -27,7 +26,6 @@ export type CardWithUrlContentProps = {
|
|
|
27
26
|
children?: React.ReactNode;
|
|
28
27
|
showHoverPreview?: boolean;
|
|
29
28
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
30
|
-
analyticsEvents?: AnalyticsFacade;
|
|
31
29
|
placeholder?: string;
|
|
32
30
|
removeTextHighlightingFromTitle?: boolean;
|
|
33
31
|
resolvingPlaceholder?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
3
|
import { type InvokeHandler } from '../../model/invoke-handler';
|
|
4
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
5
4
|
import { type CardState } from '../../state/types';
|
|
6
5
|
import type { CardActionOptions, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
7
6
|
import { type OnErrorCallback } from '../types';
|
|
@@ -11,7 +10,6 @@ export type EmbedCardProps = {
|
|
|
11
10
|
handleAuthorize: (() => void) | undefined;
|
|
12
11
|
handleErrorRetry: () => void;
|
|
13
12
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
14
|
-
analytics: AnalyticsFacade;
|
|
15
13
|
handleInvoke: InvokeHandler;
|
|
16
14
|
id?: string;
|
|
17
15
|
isSelected?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type UnauthorizedViewProps } from './types';
|
|
3
|
-
declare const UnauthorizedView: ({
|
|
3
|
+
declare const UnauthorizedView: ({ context, extensionKey, isProductIntegrationSupported, onAuthorize, testId, ...unresolvedViewProps }: UnauthorizedViewProps) => JSX.Element;
|
|
4
4
|
export default UnauthorizedView;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AnalyticsFacade } from '../../../../state/analytics';
|
|
2
1
|
import type { ContextViewModel } from '../../types';
|
|
3
2
|
import type { UnresolvedViewCardProps } from '../unresolved-view/types';
|
|
4
3
|
export type UnauthorizedViewProps = UnresolvedViewCardProps & {
|
|
5
|
-
analytics: AnalyticsFacade;
|
|
6
4
|
context?: ContextViewModel;
|
|
7
5
|
extensionKey?: string;
|
|
8
6
|
isProductIntegrationSupported?: boolean;
|
|
@@ -6,5 +6,5 @@ import { type FlexibleCardProps } from './types';
|
|
|
6
6
|
* Note: TitleBlock is mandatory for a Flexible Card to render.
|
|
7
7
|
* @see Container
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleCard: ({
|
|
9
|
+
declare const FlexibleCard: ({ appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -5,7 +5,6 @@ import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
|
5
5
|
import { type CardState, type LinkingPlatformFeatureFlags } from '@atlaskit/linking-common';
|
|
6
6
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
7
7
|
import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
|
|
8
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
9
8
|
import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|
|
10
9
|
import { type ResolveFunction } from '../../state/hooks/use-resolve';
|
|
11
10
|
import { type AnalyticsOrigin } from '../../utils/types';
|
|
@@ -17,11 +16,6 @@ export type FlexibleCardProps = {
|
|
|
17
16
|
* @internal A unique ID for a Smart Link.
|
|
18
17
|
*/
|
|
19
18
|
id?: string;
|
|
20
|
-
/**
|
|
21
|
-
* An analytics facade object which will be used to send analytics.
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
analytics?: AnalyticsFacade;
|
|
25
19
|
/**
|
|
26
20
|
* Determines the appearance of the Smart Link.
|
|
27
21
|
* @internal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type HoverCardComponentProps } from '../types';
|
|
3
3
|
export declare const HOVER_CARD_SOURCE = "smartLinkPreviewHoverCard";
|
|
4
|
-
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
4
|
+
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, role, label, titleId }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type HoverCardContentProps } from '../types';
|
|
3
3
|
export declare const hoverCardClassName = "smart-links-hover-preview";
|
|
4
|
-
declare const HoverCardContent: ({ id,
|
|
4
|
+
declare const HoverCardContent: ({ id, cardState, onActionClick, onResolve, renderers, url, onMouseEnter, onMouseLeave, actionOptions, }: HoverCardContentProps) => jsx.JSX.Element | null;
|
|
5
5
|
export default HoverCardContent;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type CardState } from '@atlaskit/linking-common';
|
|
2
2
|
import type { ActionName } from '../../../../../constants';
|
|
3
|
-
import { type AnalyticsFacade } from '../../../../../state/analytics';
|
|
4
3
|
import { type LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
|
|
5
4
|
import { type HoverCardLoadingViewProps } from '../resolving/types';
|
|
6
5
|
export type HoverCardResolvedProps = {
|
|
7
6
|
extensionKey?: string;
|
|
8
7
|
id?: string;
|
|
9
8
|
url: string;
|
|
10
|
-
analytics: AnalyticsFacade;
|
|
11
9
|
cardActions?: LinkAction[];
|
|
12
10
|
cardState: CardState;
|
|
13
11
|
isAISummaryEnabled?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type HoverCardUnauthorisedProps } from './types';
|
|
3
|
-
declare const HoverCardUnauthorisedView: ({
|
|
3
|
+
declare const HoverCardUnauthorisedView: ({ id, flexibleCardProps, testId, url, }: HoverCardUnauthorisedProps) => JSX.Element;
|
|
4
4
|
export default HoverCardUnauthorisedView;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { type AnalyticsFacade } from '../../../../../state/analytics';
|
|
2
1
|
import { type FlexibleCardProps } from '../../../../FlexibleCard/types';
|
|
3
2
|
export type HoverCardUnauthorisedProps = {
|
|
4
|
-
/**
|
|
5
|
-
* An AnalyticsFacade object used for calling analytics.
|
|
6
|
-
*/
|
|
7
|
-
analytics: AnalyticsFacade;
|
|
8
3
|
/**
|
|
9
4
|
* Provides the extensionKey of a Smart Link resolver invoked.
|
|
10
5
|
*/
|