@atlaskit/smart-card 33.0.0 → 33.2.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 +20 -0
- package/dist/cjs/extractors/flexible/actions/extract-copy-link-action.js +1 -20
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +1 -23
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +1 -34
- package/dist/cjs/extractors/flexible/actions/index.js +2 -15
- package/dist/cjs/extractors/flexible/extract-state.js +1 -5
- package/dist/cjs/extractors/flexible/index.js +3 -7
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +18 -190
- package/dist/cjs/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +4 -18
- package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +12 -28
- package/dist/cjs/view/CardWithUrl/loader.js +10 -24
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +40 -89
- package/dist/cjs/view/EmbedModal/index.js +8 -65
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +26 -63
- package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +4 -40
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +4 -47
- package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -26
- package/dist/cjs/view/FlexibleCard/components/utils.js +1 -28
- package/dist/cjs/view/FlexibleCard/index.js +0 -3
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +13 -30
- package/dist/cjs/view/HoverCard/index.js +10 -22
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -4
- package/dist/cjs/view/InlineCard/index.js +0 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +0 -19
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -21
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -34
- package/dist/es2019/extractors/flexible/actions/index.js +4 -23
- package/dist/es2019/extractors/flexible/extract-state.js +1 -5
- package/dist/es2019/extractors/flexible/index.js +3 -4
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -172
- package/dist/es2019/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -18
- package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +3 -40
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +13 -29
- package/dist/es2019/view/CardWithUrl/loader.js +11 -25
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +39 -88
- package/dist/es2019/view/EmbedModal/index.js +10 -33
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +11 -32
- package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +4 -22
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +4 -27
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -24
- package/dist/es2019/view/FlexibleCard/components/utils.js +0 -25
- package/dist/es2019/view/FlexibleCard/index.js +0 -3
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +12 -25
- package/dist/es2019/view/HoverCard/index.js +11 -23
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -3
- package/dist/es2019/view/InlineCard/index.js +0 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +0 -19
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -23
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -34
- package/dist/esm/extractors/flexible/actions/index.js +4 -17
- package/dist/esm/extractors/flexible/extract-state.js +1 -5
- package/dist/esm/extractors/flexible/index.js +3 -4
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +19 -191
- package/dist/esm/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +4 -18
- package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +13 -29
- package/dist/esm/view/CardWithUrl/loader.js +10 -24
- package/dist/esm/view/EmbedModal/components/analytics/index.js +40 -89
- package/dist/esm/view/EmbedModal/index.js +10 -67
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +26 -63
- package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +4 -40
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +4 -47
- package/dist/esm/view/FlexibleCard/components/container/index.js +1 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -26
- package/dist/esm/view/FlexibleCard/components/utils.js +0 -27
- package/dist/esm/view/FlexibleCard/index.js +0 -3
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +13 -30
- package/dist/esm/view/HoverCard/index.js +10 -22
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -4
- package/dist/esm/view/InlineCard/index.js +0 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/extract-download-action.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/index.d.ts +0 -6
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
- package/dist/types/state/flexible-ui-context/types.d.ts +4 -19
- package/dist/types/state/hooks/use-invoke/types.d.ts +0 -6
- package/dist/types/state/hooks/use-invoke-client-action/index.d.ts +1 -1
- package/dist/types/state/hooks/useSmartLink.d.ts +1 -16
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
- package/dist/types/utils/mocks.d.ts +1 -16
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +0 -5
- package/dist/types/view/CardWithUrl/types.d.ts +0 -4
- package/dist/types/view/EmbedModal/index.d.ts +0 -2
- package/dist/types/view/EmbedModal/types.d.ts +0 -3
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
- package/dist/types/view/FlexibleCard/components/utils.d.ts +0 -6
- 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/CustomPopupContainer.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -6
- package/dist/types/view/InlineCard/index.d.ts +1 -1
- package/dist/types/view/InlineCard/types.d.ts +0 -4
- package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/extract-download-action.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +0 -6
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -19
- package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +0 -6
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/index.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +1 -16
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
- package/dist/types-ts4.5/utils/mocks.d.ts +1 -16
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +0 -5
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -4
- package/dist/types-ts4.5/view/EmbedModal/index.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedModal/types.d.ts +0 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +0 -6
- 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/CustomPopupContainer.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +1 -6
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -4
- package/package.json +2 -8
- package/dist/cjs/extractors/action/extractDownloadActionProps.js +0 -32
- package/dist/cjs/extractors/action/extractPreviewActionProps.js +0 -47
- package/dist/cjs/extractors/action/extractViewActionProps.js +0 -31
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -27
- package/dist/es2019/extractors/action/extractDownloadActionProps.js +0 -24
- package/dist/es2019/extractors/action/extractPreviewActionProps.js +0 -36
- package/dist/es2019/extractors/action/extractViewActionProps.js +0 -23
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -20
- package/dist/esm/extractors/action/extractDownloadActionProps.js +0 -27
- package/dist/esm/extractors/action/extractPreviewActionProps.js +0 -41
- package/dist/esm/extractors/action/extractViewActionProps.js +0 -26
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -22
- package/dist/types/extractors/action/extractDownloadActionProps.d.ts +0 -7
- package/dist/types/extractors/action/extractPreviewActionProps.d.ts +0 -7
- package/dist/types/extractors/action/extractViewActionProps.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/extract-view-action.d.ts +0 -7
- package/dist/types/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
- package/dist/types-ts4.5/extractors/action/extractDownloadActionProps.d.ts +0 -7
- package/dist/types-ts4.5/extractors/action/extractPreviewActionProps.d.ts +0 -7
- package/dist/types-ts4.5/extractors/action/extractViewActionProps.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/extract-view-action.d.ts +0 -7
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
|
@@ -48,11 +48,6 @@ interface HoverPreviewProps extends ActionProps {
|
|
|
48
48
|
* Configuration for hover card.
|
|
49
49
|
*/
|
|
50
50
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
51
|
-
/**
|
|
52
|
-
* Flag to display unresolved views on hover preview.
|
|
53
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
54
|
-
*/
|
|
55
|
-
showAuthTooltip?: boolean;
|
|
56
51
|
}
|
|
57
52
|
export interface BaseCardProps {
|
|
58
53
|
/**
|
|
@@ -27,10 +27,6 @@ export type CardWithUrlContentProps = {
|
|
|
27
27
|
children?: React.ReactNode;
|
|
28
28
|
showHoverPreview?: boolean;
|
|
29
29
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
32
|
-
*/
|
|
33
|
-
showAuthTooltip?: boolean;
|
|
34
30
|
analyticsEvents?: AnalyticsFacade;
|
|
35
31
|
placeholder?: string;
|
|
36
32
|
removeTextHighlightingFromTitle?: boolean;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmbedModalSize } from './types';
|
|
3
3
|
declare const _default: (props: {
|
|
4
|
-
download?: string | undefined;
|
|
5
4
|
fireEvent?: (<K extends keyof import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes>(eventKey: K, ...params_1: undefined extends import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K] ? [param?: import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K] | undefined] : [param: import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K]]) => void) | undefined;
|
|
6
|
-
icon?: import("../common/Icon").IconProps | undefined;
|
|
7
5
|
invokeDownloadAction?: import("../../state/hooks/use-invoke-client-action/types").InvokeClientActionProps | undefined;
|
|
8
6
|
invokeViewAction?: import("../../state/hooks/use-invoke-client-action/types").InvokeClientActionProps | undefined;
|
|
9
7
|
iframeName: string;
|
|
@@ -2,7 +2,6 @@ import { type ErrorInfo } from 'react';
|
|
|
2
2
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
3
3
|
import { type Icon } from '../../state/flexible-ui-context/types';
|
|
4
4
|
import { type InvokeClientActionProps } from '../../state/hooks/use-invoke-client-action/types';
|
|
5
|
-
import { type IconProps } from '../common/Icon';
|
|
6
5
|
import { type WithAnalytics } from './components/analytics/types';
|
|
7
6
|
export declare enum EmbedModalSize {
|
|
8
7
|
Large = "large",
|
|
@@ -13,9 +12,7 @@ export type EmbedModalContext = {
|
|
|
13
12
|
size: EmbedModalSize;
|
|
14
13
|
};
|
|
15
14
|
export type EmbedModalProps = {
|
|
16
|
-
download?: string;
|
|
17
15
|
fireEvent?: FireEventFunction;
|
|
18
|
-
icon?: IconProps;
|
|
19
16
|
invokeDownloadAction?: InvokeClientActionProps;
|
|
20
17
|
invokeViewAction?: InvokeClientActionProps;
|
|
21
18
|
iframeName: string;
|
|
@@ -10,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
|
|
|
10
10
|
* @internal
|
|
11
11
|
* @see Block
|
|
12
12
|
*/
|
|
13
|
-
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry,
|
|
13
|
+
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
|
|
14
14
|
export default Container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type SmartLinkStatus } from '../../../../constants';
|
|
3
3
|
import { type FlexibleCardProps, type FlexibleUiOptions, type RetryOptions } from '../../types';
|
|
4
|
-
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'
|
|
4
|
+
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'> & FlexibleUiOptions & {
|
|
5
5
|
/**
|
|
6
6
|
* The options that determine the retry behaviour when a Smart Link errors.
|
|
7
7
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { LozengeActionErrorProps } from './types';
|
|
3
|
-
declare const LozengeActionError: ({ errorMessage, testId, maxLineNumber, invokePreviewAction,
|
|
3
|
+
declare const LozengeActionError: ({ errorMessage, testId, maxLineNumber, invokePreviewAction, }: LozengeActionErrorProps) => jsx.JSX.Element;
|
|
4
4
|
export default LozengeActionError;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type PreviewActionData } from '../../../../../../../state/flexible-ui-context/types';
|
|
2
1
|
import { type InvokeClientActionProps } from '../../../../../../../state/hooks/use-invoke-client-action/types';
|
|
3
2
|
import { type MessageProps } from '../../../../types';
|
|
4
3
|
export type LozengeActionErrorProps = {
|
|
@@ -22,11 +21,6 @@ export type LozengeActionErrorProps = {
|
|
|
22
21
|
* The url of the link. Used in reload functionality
|
|
23
22
|
*/
|
|
24
23
|
url?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Preview Modal information. If present, will be used to render an embed modal on an error link click
|
|
27
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
28
|
-
*/
|
|
29
|
-
previewData?: PreviewActionData | null;
|
|
30
24
|
};
|
|
31
25
|
export declare const LozengeActionErrorMessages: {
|
|
32
26
|
noData: {
|
|
@@ -4,8 +4,6 @@ import { type IntlShape, type MessageDescriptor } from 'react-intl-next';
|
|
|
4
4
|
import { type Spacing } from '@atlaskit/button';
|
|
5
5
|
import type { Space } from '@atlaskit/primitives';
|
|
6
6
|
import { SmartLinkSize } from '../../../constants';
|
|
7
|
-
import { type PreviewActionData } from '../../../state/flexible-ui-context/types';
|
|
8
|
-
import { type EmbedModalProps } from '../../EmbedModal/types';
|
|
9
7
|
import { type MessageProps } from './types';
|
|
10
8
|
export declare const sizeToButtonSpacing: Record<SmartLinkSize, Spacing>;
|
|
11
9
|
export declare const getFormattedMessage: (message?: MessageProps) => JSX.Element | undefined;
|
|
@@ -29,7 +27,3 @@ export declare const getPrimitivesInlineSpaceBySize: (size: SmartLinkSize) => Sp
|
|
|
29
27
|
export declare const getPrimitivesPaddingSpaceBySize: (size: SmartLinkSize) => Space;
|
|
30
28
|
export declare const getTruncateStyles: (maxLines: number, lineHeight?: string, wordBreak?: 'break-word' | 'break-all') => SerializedStyles;
|
|
31
29
|
export declare const hasWhiteSpace: (str: string) => boolean;
|
|
32
|
-
/**
|
|
33
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
34
|
-
*/
|
|
35
|
-
export declare const openEmbedModalWithFlexibleUiIcon: ({ linkIcon, ...props }: Partial<EmbedModalProps> & Pick<PreviewActionData, 'linkIcon'>) => Promise<void>;
|
|
@@ -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: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers,
|
|
9
|
+
declare const FlexibleCard: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -93,12 +93,6 @@ export type FlexibleCardProps = {
|
|
|
93
93
|
* Configuration options for hover preview
|
|
94
94
|
*/
|
|
95
95
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
96
|
-
/**
|
|
97
|
-
* Determines whether to show an unauthorised view of the hover card
|
|
98
|
-
* when a user hovers over a smartlink.
|
|
99
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
100
|
-
*/
|
|
101
|
-
showAuthTooltip?: boolean;
|
|
102
96
|
};
|
|
103
97
|
export type FlexibleUiOptions = {
|
|
104
98
|
/**
|
|
@@ -9,5 +9,5 @@ import { type PopupComponentProps } from '@atlaskit/popup';
|
|
|
9
9
|
* HoverCard border implementation is in ContentContainer where it can
|
|
10
10
|
* change between the default border and prism border during runtime.
|
|
11
11
|
*/
|
|
12
|
-
declare const CustomPopupContainer: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "appearance" | "style" | "id" | "tabIndex" | "role" | "children" | "data-testid" | "
|
|
12
|
+
declare const CustomPopupContainer: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "appearance" | "style" | "id" | "tabIndex" | "role" | "children" | "data-testid" | "xcss" | "shouldFitContainer" | "shouldRenderToParent" | "data-placement"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export default CustomPopupContainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type HoverCardResolvedProps } from './types';
|
|
3
|
-
declare const HoverCardResolvedView: ({
|
|
3
|
+
declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
|
|
4
4
|
export default HoverCardResolvedView;
|
|
@@ -15,11 +15,6 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
15
15
|
isSelected?: boolean;
|
|
16
16
|
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
17
17
|
testId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* A flag that determines is a tooltip should show up on hover over the unauthorised link
|
|
20
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
21
|
-
*/
|
|
22
|
-
showAuthTooltip?: boolean;
|
|
23
18
|
/** Enables showing a custom preview on hover of link */
|
|
24
19
|
showHoverPreview?: boolean;
|
|
25
20
|
/** A smart link id that may be used in analytics */
|
|
@@ -31,4 +26,4 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
31
26
|
/** Truncates the card to one line */
|
|
32
27
|
truncateInline?: boolean;
|
|
33
28
|
}
|
|
34
|
-
export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId,
|
|
29
|
+
export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showHoverPreview, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
|
|
@@ -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: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions,
|
|
9
|
+
export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, actionOptions, removeTextHighlightingFromTitle, resolvingPlaceholder, truncateInline, }: InlineCardProps) => JSX.Element;
|
|
@@ -23,10 +23,6 @@ export type InlineCardProps = {
|
|
|
23
23
|
renderers?: CardProviderRenderers;
|
|
24
24
|
showHoverPreview?: boolean;
|
|
25
25
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
28
|
-
*/
|
|
29
|
-
showAuthTooltip?: boolean;
|
|
30
26
|
actionOptions?: CardActionOptions;
|
|
31
27
|
analytics: AnalyticsFacade;
|
|
32
28
|
removeTextHighlightingFromTitle?: boolean;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
1
|
import { type CopyLinkActionData } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { type CardActionOptions } from '../../../view/Card/types';
|
|
4
2
|
import { type ExtractClientActionsParam } from '../../action/types';
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
7
|
-
* Replaced with extractCopyLinkClientAction()
|
|
8
|
-
*/
|
|
9
|
-
export declare const extractCopyLinkAction: (data: JsonLd.Data.BaseData, actionOptions?: CardActionOptions) => CopyLinkActionData | undefined;
|
|
10
3
|
export declare const extractCopyLinkClientAction: (param: ExtractClientActionsParam) => CopyLinkActionData | undefined;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
1
|
import { type DownloadActionData } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { type CardActionOptions } from '../../../view/Card/types';
|
|
4
2
|
import { type ExtractClientActionsParam } from '../../action/types';
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
7
|
-
* Replaced with extractDownloadClientAction()
|
|
8
|
-
*/
|
|
9
|
-
export declare const extractDownloadAction: (data: JsonLd.Data.BaseData, actionOptions?: CardActionOptions) => DownloadActionData | undefined;
|
|
10
3
|
export declare const extractDownloadClientAction: (param: ExtractClientActionsParam) => DownloadActionData | undefined;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
1
|
import { type PreviewActionData } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { type CardActionOptions } from '../../../view/Card/types';
|
|
4
2
|
import { type ExtractInvokePreviewActionParam } from '../../action/extract-invoke-preview-action';
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
7
|
-
* Replaced with extractPreviewClientAction()
|
|
8
|
-
*/
|
|
9
|
-
export declare const extractPreviewAction: (response: JsonLd.Response, actionOptions?: CardActionOptions) => PreviewActionData | undefined;
|
|
10
3
|
export declare const extractPreviewClientAction: (param: ExtractInvokePreviewActionParam) => PreviewActionData | undefined;
|
|
@@ -15,9 +15,3 @@ export type ExtractActionsParam = {
|
|
|
15
15
|
fireEvent?: FireEventFunction;
|
|
16
16
|
};
|
|
17
17
|
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, url, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
20
|
-
* Replaced with extractFlexibleCardActions()
|
|
21
|
-
*/
|
|
22
|
-
declare const extractActions: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, id?: string, aiSummaryConfig?: AISummaryConfig) => FlexibleUiActions | undefined;
|
|
23
|
-
export default extractActions;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type InvokeFailedEventProps, type InvokeSucceededEventProps
|
|
2
|
-
import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
|
|
1
|
+
import { type InvokeFailedEventProps, type InvokeSucceededEventProps } from '../../utils/analytics/types';
|
|
3
2
|
/**
|
|
4
3
|
* This hook provides usage of Smart Link analytics outside of the Card component.
|
|
5
4
|
* Can be provided to Card via the analyticsEvents prop to change the analytics events.
|
|
@@ -10,55 +9,6 @@ import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
|
|
|
10
9
|
* @returns
|
|
11
10
|
*/
|
|
12
11
|
export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLocation?: string) => {
|
|
13
|
-
ui: {
|
|
14
|
-
/**
|
|
15
|
-
* This fires an event that represents when a user
|
|
16
|
-
* click a button.
|
|
17
|
-
* @param data A partial analytics event payload
|
|
18
|
-
* @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
|
|
19
|
-
*/
|
|
20
|
-
buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
|
|
21
|
-
actionSubjectId: Required<string>;
|
|
22
|
-
}) => void;
|
|
23
|
-
/**
|
|
24
|
-
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
25
|
-
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
26
|
-
* @param id The unique ID for this Smart Link.
|
|
27
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
28
|
-
* @param actionType The type of the action that was clicked, e.g. PreviewAction
|
|
29
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
30
|
-
* @returns
|
|
31
|
-
*/
|
|
32
|
-
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
33
|
-
/**
|
|
34
|
-
* This fires an event that represents when a user close a modal.
|
|
35
|
-
* @param data A partial analytics event payload
|
|
36
|
-
* @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
|
|
37
|
-
*/
|
|
38
|
-
modalClosedEvent: (data: Partial<AnalyticsPayload> & {
|
|
39
|
-
actionSubjectId: Required<string>;
|
|
40
|
-
}) => void;
|
|
41
|
-
/**
|
|
42
|
-
* This fires an event that represents when a Smart Link was rendered successfully.
|
|
43
|
-
* Note: this fires even if the Smart Link request errored out.
|
|
44
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
45
|
-
* @param id The unique ID for this Smart Link.
|
|
46
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
47
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
48
|
-
* @param canBeDatasource An indicator that shows that a smart link can be converted to a datasource
|
|
49
|
-
* @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
|
|
50
|
-
*/
|
|
51
|
-
renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: UiRenderSuccessEventProps) => void;
|
|
52
|
-
/**
|
|
53
|
-
* This fires an event that represents when a Smart Link renders unsuccessfuly.
|
|
54
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
55
|
-
* @param id The unique ID for this Smart Link.
|
|
56
|
-
* @param error: An error representing why the Smart Link render failed.
|
|
57
|
-
* @param errorInfo: Additional details about the error including the stack trace.
|
|
58
|
-
* @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
|
|
59
|
-
*/
|
|
60
|
-
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
|
|
61
|
-
};
|
|
62
12
|
operational: {
|
|
63
13
|
/**
|
|
64
14
|
* This fires an event that represents an action being successfully invoked.
|
|
@@ -78,14 +28,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
78
28
|
*/
|
|
79
29
|
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
|
|
80
30
|
};
|
|
81
|
-
screen:
|
|
82
|
-
/**
|
|
83
|
-
* This fires an event that represents when a user view a modal.
|
|
84
|
-
* @deprecated consider removing when cleaning up FF platform-smart-card-migrate-embed-modal-analytics
|
|
85
|
-
*/
|
|
86
|
-
modalViewedEvent: (data: Partial<AnalyticsPayload> & {
|
|
87
|
-
name: Extract<AnalyticsName, 'embedPreviewModal'>;
|
|
88
|
-
}) => void;
|
|
89
|
-
};
|
|
31
|
+
screen: Screen;
|
|
90
32
|
};
|
|
91
33
|
export type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
|
|
@@ -1,7 +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 AnalyticsOrigin } from '../../utils/types';
|
|
5
4
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
6
5
|
import { type AnalyticsFacade } from '../analytics';
|
|
7
6
|
import { type InvokeClientActionProps } from '../hooks/use-invoke-client-action/types';
|
|
@@ -107,7 +106,7 @@ export type FlexibleUiDataContext = {
|
|
|
107
106
|
* @type ViewActionData
|
|
108
107
|
* @see ViewAction
|
|
109
108
|
*/
|
|
110
|
-
viewAction?:
|
|
109
|
+
viewAction?: PreviewActionData;
|
|
111
110
|
/**
|
|
112
111
|
* Contains the information about the latest commit in the repository
|
|
113
112
|
*/
|
|
@@ -252,27 +251,13 @@ export type FlexibleUiActions = {
|
|
|
252
251
|
[InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
|
|
253
252
|
};
|
|
254
253
|
export type PreviewActionData = {
|
|
255
|
-
invokeAction
|
|
256
|
-
downloadUrl?: string;
|
|
257
|
-
linkIcon?: Icon;
|
|
258
|
-
providerName?: string;
|
|
259
|
-
origin?: AnalyticsOrigin;
|
|
260
|
-
src?: string;
|
|
261
|
-
title?: string;
|
|
262
|
-
url?: string;
|
|
263
|
-
isSupportTheming?: boolean;
|
|
264
|
-
isTrusted?: boolean;
|
|
265
|
-
};
|
|
266
|
-
export type ViewActionData = {
|
|
267
|
-
viewUrl?: string;
|
|
254
|
+
invokeAction: InvokeClientActionProps;
|
|
268
255
|
};
|
|
269
256
|
export type DownloadActionData = {
|
|
270
|
-
invokeAction
|
|
271
|
-
downloadUrl?: string;
|
|
257
|
+
invokeAction: InvokeClientActionProps;
|
|
272
258
|
};
|
|
273
259
|
export type CopyLinkActionData = {
|
|
274
|
-
invokeAction
|
|
275
|
-
url?: string;
|
|
260
|
+
invokeAction: InvokeClientActionProps;
|
|
276
261
|
};
|
|
277
262
|
export type AISummaryActionData = {
|
|
278
263
|
url: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
|
|
2
|
-
import { type PreviewActionData } from '../../flexible-ui-context/types';
|
|
3
2
|
import type { InvokeClientActionProps } from '../use-invoke-client-action/types';
|
|
4
3
|
/**
|
|
5
4
|
* Additional details for invoke function that may be required for component
|
|
@@ -17,11 +16,6 @@ export type CardDetails = {
|
|
|
17
16
|
* The URL of the Smart Link
|
|
18
17
|
*/
|
|
19
18
|
url?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Preview Modal information. If present, will be used to render an embed modal on an error link click
|
|
22
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
23
|
-
*/
|
|
24
|
-
previewData?: PreviewActionData | null;
|
|
25
19
|
};
|
|
26
20
|
/**
|
|
27
21
|
* Additional details to reload smart links
|
|
@@ -2,5 +2,5 @@ import { type InvokeClientActionHandler, type UseInvokeClientActionProps } from
|
|
|
2
2
|
/**
|
|
3
3
|
* Invoke client action such as preview, download and open link
|
|
4
4
|
*/
|
|
5
|
-
declare const useInvokeClientAction: ({
|
|
5
|
+
declare const useInvokeClientAction: ({ fireEvent: fireEventProp, }: UseInvokeClientActionProps) => InvokeClientActionHandler;
|
|
6
6
|
export default useInvokeClientAction;
|
|
@@ -9,26 +9,11 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
9
9
|
};
|
|
10
10
|
config: (import("@atlaskit/link-provider").CardProviderCacheOpts & import("@atlaskit/link-provider").CardAuthFlowOpts) | undefined;
|
|
11
11
|
analytics: {
|
|
12
|
-
ui: {
|
|
13
|
-
buttonClickedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
14
|
-
actionSubjectId: string;
|
|
15
|
-
}) => void;
|
|
16
|
-
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
17
|
-
modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
18
|
-
actionSubjectId: string;
|
|
19
|
-
}) => void;
|
|
20
|
-
renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
|
|
21
|
-
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
|
|
22
|
-
};
|
|
23
12
|
operational: {
|
|
24
13
|
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
25
14
|
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
26
15
|
};
|
|
27
|
-
screen:
|
|
28
|
-
modalViewedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
29
|
-
name: "embedPreviewModal";
|
|
30
|
-
}) => void;
|
|
31
|
-
};
|
|
16
|
+
screen: Screen;
|
|
32
17
|
};
|
|
33
18
|
renderers: import("@atlaskit/link-provider").CardProviderRenderers | undefined;
|
|
34
19
|
error: Error | null;
|
|
@@ -24,5 +24,5 @@ export declare const useSmartLinkAnalyticsContext: ({ display, id, source, url,
|
|
|
24
24
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
25
25
|
* and the link state in the store
|
|
26
26
|
*/
|
|
27
|
-
export declare const SmartLinkAnalyticsContext: (
|
|
27
|
+
export declare const SmartLinkAnalyticsContext: ({ children, display, id, source, url, }: SmartLinkAnalyticsContextProps) => JSX.Element;
|
|
28
28
|
export {};
|
|
@@ -90,24 +90,9 @@ export declare const fakeResponse: () => Promise<JsonLd.Response<JsonLd.Data.Bas
|
|
|
90
90
|
export declare const fakeFactory: any;
|
|
91
91
|
export declare const waitFor: (time?: number) => Promise<unknown>;
|
|
92
92
|
export declare const mockAnalytics: {
|
|
93
|
-
ui: {
|
|
94
|
-
buttonClickedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
95
|
-
actionSubjectId: string;
|
|
96
|
-
}) => void;
|
|
97
|
-
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
98
|
-
modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
99
|
-
actionSubjectId: string;
|
|
100
|
-
}) => void;
|
|
101
|
-
renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("./analytics/types").UiRenderSuccessEventProps) => void;
|
|
102
|
-
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
|
|
103
|
-
};
|
|
104
93
|
operational: {
|
|
105
94
|
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
|
|
106
95
|
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeFailedEventProps) => void;
|
|
107
96
|
};
|
|
108
|
-
screen:
|
|
109
|
-
modalViewedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
110
|
-
name: "embedPreviewModal";
|
|
111
|
-
}) => void;
|
|
112
|
-
};
|
|
97
|
+
screen: Screen;
|
|
113
98
|
};
|
|
@@ -3,5 +3,5 @@ import { type WrappedComponentProps } from 'react-intl-next';
|
|
|
3
3
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
4
4
|
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<Omit<CardProps & WrappedComponentProps, "intl"> & {
|
|
5
5
|
forwardedRef?: React.Ref<any> | undefined;
|
|
6
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "
|
|
6
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "inlinePreloaderStyle" | "isHovered" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "truncateInline" | "fallbackComponent" | "isSelected" | "embedIframeRef" | "embedIframeUrlType" | "frameStyle" | "inheritDimensions" | "platform" | "analyticsContext" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
7
7
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -48,11 +48,6 @@ interface HoverPreviewProps extends ActionProps {
|
|
|
48
48
|
* Configuration for hover card.
|
|
49
49
|
*/
|
|
50
50
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
51
|
-
/**
|
|
52
|
-
* Flag to display unresolved views on hover preview.
|
|
53
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
54
|
-
*/
|
|
55
|
-
showAuthTooltip?: boolean;
|
|
56
51
|
}
|
|
57
52
|
export interface BaseCardProps {
|
|
58
53
|
/**
|
|
@@ -27,10 +27,6 @@ export type CardWithUrlContentProps = {
|
|
|
27
27
|
children?: React.ReactNode;
|
|
28
28
|
showHoverPreview?: boolean;
|
|
29
29
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
32
|
-
*/
|
|
33
|
-
showAuthTooltip?: boolean;
|
|
34
30
|
analyticsEvents?: AnalyticsFacade;
|
|
35
31
|
placeholder?: string;
|
|
36
32
|
removeTextHighlightingFromTitle?: boolean;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmbedModalSize } from './types';
|
|
3
3
|
declare const _default: (props: {
|
|
4
|
-
download?: string | undefined;
|
|
5
4
|
fireEvent?: (<K extends keyof import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes>(eventKey: K, ...params_1: undefined extends import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K] ? [
|
|
6
5
|
param?: import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K] | undefined
|
|
7
6
|
] : [
|
|
8
7
|
param: import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K]
|
|
9
8
|
]) => void) | undefined;
|
|
10
|
-
icon?: import("../common/Icon").IconProps | undefined;
|
|
11
9
|
invokeDownloadAction?: import("../../state/hooks/use-invoke-client-action/types").InvokeClientActionProps | undefined;
|
|
12
10
|
invokeViewAction?: import("../../state/hooks/use-invoke-client-action/types").InvokeClientActionProps | undefined;
|
|
13
11
|
iframeName: string;
|
|
@@ -2,7 +2,6 @@ import { type ErrorInfo } from 'react';
|
|
|
2
2
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
3
3
|
import { type Icon } from '../../state/flexible-ui-context/types';
|
|
4
4
|
import { type InvokeClientActionProps } from '../../state/hooks/use-invoke-client-action/types';
|
|
5
|
-
import { type IconProps } from '../common/Icon';
|
|
6
5
|
import { type WithAnalytics } from './components/analytics/types';
|
|
7
6
|
export declare enum EmbedModalSize {
|
|
8
7
|
Large = "large",
|
|
@@ -13,9 +12,7 @@ export type EmbedModalContext = {
|
|
|
13
12
|
size: EmbedModalSize;
|
|
14
13
|
};
|
|
15
14
|
export type EmbedModalProps = {
|
|
16
|
-
download?: string;
|
|
17
15
|
fireEvent?: FireEventFunction;
|
|
18
|
-
icon?: IconProps;
|
|
19
16
|
invokeDownloadAction?: InvokeClientActionProps;
|
|
20
17
|
invokeViewAction?: InvokeClientActionProps;
|
|
21
18
|
iframeName: string;
|
|
@@ -10,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
|
|
|
10
10
|
* @internal
|
|
11
11
|
* @see Block
|
|
12
12
|
*/
|
|
13
|
-
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry,
|
|
13
|
+
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
|
|
14
14
|
export default Container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type SmartLinkStatus } from '../../../../constants';
|
|
3
3
|
import { type FlexibleCardProps, type FlexibleUiOptions, type RetryOptions } from '../../types';
|
|
4
|
-
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'
|
|
4
|
+
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'> & FlexibleUiOptions & {
|
|
5
5
|
/**
|
|
6
6
|
* The options that determine the retry behaviour when a Smart Link errors.
|
|
7
7
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { LozengeActionErrorProps } from './types';
|
|
3
|
-
declare const LozengeActionError: ({ errorMessage, testId, maxLineNumber, invokePreviewAction,
|
|
3
|
+
declare const LozengeActionError: ({ errorMessage, testId, maxLineNumber, invokePreviewAction, }: LozengeActionErrorProps) => jsx.JSX.Element;
|
|
4
4
|
export default LozengeActionError;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type PreviewActionData } from '../../../../../../../state/flexible-ui-context/types';
|
|
2
1
|
import { type InvokeClientActionProps } from '../../../../../../../state/hooks/use-invoke-client-action/types';
|
|
3
2
|
import { type MessageProps } from '../../../../types';
|
|
4
3
|
export type LozengeActionErrorProps = {
|
|
@@ -22,11 +21,6 @@ export type LozengeActionErrorProps = {
|
|
|
22
21
|
* The url of the link. Used in reload functionality
|
|
23
22
|
*/
|
|
24
23
|
url?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Preview Modal information. If present, will be used to render an embed modal on an error link click
|
|
27
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
28
|
-
*/
|
|
29
|
-
previewData?: PreviewActionData | null;
|
|
30
24
|
};
|
|
31
25
|
export declare const LozengeActionErrorMessages: {
|
|
32
26
|
noData: {
|
|
@@ -4,8 +4,6 @@ import { type IntlShape, type MessageDescriptor } from 'react-intl-next';
|
|
|
4
4
|
import { type Spacing } from '@atlaskit/button';
|
|
5
5
|
import type { Space } from '@atlaskit/primitives';
|
|
6
6
|
import { SmartLinkSize } from '../../../constants';
|
|
7
|
-
import { type PreviewActionData } from '../../../state/flexible-ui-context/types';
|
|
8
|
-
import { type EmbedModalProps } from '../../EmbedModal/types';
|
|
9
7
|
import { type MessageProps } from './types';
|
|
10
8
|
export declare const sizeToButtonSpacing: Record<SmartLinkSize, Spacing>;
|
|
11
9
|
export declare const getFormattedMessage: (message?: MessageProps) => JSX.Element | undefined;
|
|
@@ -29,7 +27,3 @@ export declare const getPrimitivesInlineSpaceBySize: (size: SmartLinkSize) => Sp
|
|
|
29
27
|
export declare const getPrimitivesPaddingSpaceBySize: (size: SmartLinkSize) => Space;
|
|
30
28
|
export declare const getTruncateStyles: (maxLines: number, lineHeight?: string, wordBreak?: 'break-word' | 'break-all') => SerializedStyles;
|
|
31
29
|
export declare const hasWhiteSpace: (str: string) => boolean;
|
|
32
|
-
/**
|
|
33
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
34
|
-
*/
|
|
35
|
-
export declare const openEmbedModalWithFlexibleUiIcon: ({ linkIcon, ...props }: Partial<EmbedModalProps> & Pick<PreviewActionData, 'linkIcon'>) => Promise<void>;
|
|
@@ -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: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers,
|
|
9
|
+
declare const FlexibleCard: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -93,12 +93,6 @@ export type FlexibleCardProps = {
|
|
|
93
93
|
* Configuration options for hover preview
|
|
94
94
|
*/
|
|
95
95
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
96
|
-
/**
|
|
97
|
-
* Determines whether to show an unauthorised view of the hover card
|
|
98
|
-
* when a user hovers over a smartlink.
|
|
99
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
100
|
-
*/
|
|
101
|
-
showAuthTooltip?: boolean;
|
|
102
96
|
};
|
|
103
97
|
export type FlexibleUiOptions = {
|
|
104
98
|
/**
|