@atlaskit/smart-card 23.10.0 → 23.10.2
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 +12 -0
- package/dist/cjs/messages.js +1 -1
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +47 -17
- package/dist/cjs/utils/analytics/analytics.js +30 -2
- package/dist/cjs/utils/analytics/index.js +6 -0
- package/dist/cjs/utils/index.js +65 -2
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/loader.js +19 -8
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +40 -18
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +5 -2
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +1 -1
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +2 -2
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +32 -1
- package/dist/es2019/utils/analytics/analytics.js +24 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/utils/index.js +16 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/loader.js +16 -8
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +40 -19
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +6 -2
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +0 -3
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +3 -3
- package/dist/esm/messages.js +1 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +48 -18
- package/dist/esm/utils/analytics/analytics.js +25 -0
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/utils/index.js +56 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/loader.js +19 -9
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +40 -19
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +6 -2
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +1 -1
- package/dist/esm/view/InlineCard/ResolvedView/index.js +3 -3
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +8 -0
- package/dist/types/state/flexible-ui-context/index.d.ts +2 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +1 -0
- package/dist/types/utils/analytics/analytics.d.ts +1 -0
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/mocks.d.ts +1 -0
- package/dist/types/utils/types.d.ts +1 -1
- package/dist/types/view/InlineCard/ForbiddenView/index.d.ts +3 -0
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +4 -0
- package/package.json +1 -1
- package/report.api.md +12 -0
- package/tmp/api-report-tmp.d.ts +2 -1
|
@@ -35,6 +35,7 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
|
|
|
35
35
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectSucceededEventProps) => void;
|
|
36
36
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").ConnectFailedEventProps) => void;
|
|
37
37
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("../../utils/analytics/types").InstrumentEventProps) => void;
|
|
38
|
+
chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
|
|
38
39
|
};
|
|
39
40
|
track: {
|
|
40
41
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
@@ -32,3 +32,4 @@ export declare const uiHoverCardViewedEvent: ({ id, previewDisplay, extensionKey
|
|
|
32
32
|
export declare const uiHoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, status, }: UiHoverCardDismissedEventProps) => AnalyticsPayload;
|
|
33
33
|
export declare const uiHoverCardOpenLinkClickedEvent: ({ id, previewDisplay, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => AnalyticsPayload;
|
|
34
34
|
export declare const uiLearnMoreLinkClickedEvent: () => AnalyticsPayload;
|
|
35
|
+
export declare const chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => AnalyticsPayload;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AnalyticsPayload } from '../types';
|
|
2
2
|
import { InstrumentEventProps } from './types';
|
|
3
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, } from './analytics';
|
|
3
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountAuthStarted, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, } from './analytics';
|
|
4
4
|
export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;
|
|
@@ -10,3 +10,5 @@ export declare const getLabelForFileType: (fileMimeType: string) => React.ReactN
|
|
|
10
10
|
export declare const getIframeSandboxAttribute: (isTrusted: boolean) => "allow-downloads allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts" | undefined;
|
|
11
11
|
export declare const handleOnClick: (handler: Function) => (e: React.BaseSyntheticEvent) => void;
|
|
12
12
|
export declare const isIntersectionObserverSupported: () => boolean;
|
|
13
|
+
export declare const sleep: (ms: number) => Promise<void>;
|
|
14
|
+
export declare const importWithRetry: <T>(importFn: () => Promise<T>, retries?: number, interval?: number) => Promise<T>;
|
|
@@ -65,6 +65,7 @@ export declare const mockAnalytics: {
|
|
|
65
65
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").ConnectSucceededEventProps) => void;
|
|
66
66
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").ConnectFailedEventProps) => void;
|
|
67
67
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("./analytics/types").InstrumentEventProps) => void;
|
|
68
|
+
chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
|
|
68
69
|
};
|
|
69
70
|
track: {
|
|
70
71
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import { CardInnerAppearance } from '../view/Card/types';
|
|
3
|
-
export declare type AnalyticsAction = 'authStarted' | 'clicked' | 'closed' | 'connected' | 'connectFailed' | 'connectSucceeded' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'viewed' | 'unresolved';
|
|
3
|
+
export declare type AnalyticsAction = 'authStarted' | 'clicked' | 'closed' | 'connected' | 'connectFailed' | 'connectSucceeded' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'viewed' | 'unresolved' | 'chunkLoadFailed';
|
|
4
4
|
export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal' | 'hoverCard' | 'modal' | 'embedPreviewModal';
|
|
5
5
|
export declare type AnalyticsName = 'embedPreviewModal';
|
|
6
6
|
export declare type AnalyticsOrigin = 'smartLinkCard' | 'smartLinkEmbed' | 'smartLinkInline' | 'smartLinkPreviewHoverCard';
|
|
@@ -18,6 +18,9 @@ export interface InlineCardForbiddenViewProps {
|
|
|
18
18
|
requestAccessContext?: RequestAccessContextProps;
|
|
19
19
|
}
|
|
20
20
|
export declare class InlineCardForbiddenView extends React.Component<InlineCardForbiddenViewProps> {
|
|
21
|
+
state: {
|
|
22
|
+
hasRequestAccessContextMessage: boolean;
|
|
23
|
+
};
|
|
21
24
|
handleRetry: (event: React.MouseEvent<HTMLElement>) => void;
|
|
22
25
|
renderForbiddenAccessMessage: () => JSX.Element;
|
|
23
26
|
renderRightSide: () => JSX.Element | null;
|
|
@@ -11,9 +11,13 @@ export interface IconAndTitleLayoutProps {
|
|
|
11
11
|
testId?: string;
|
|
12
12
|
link?: string;
|
|
13
13
|
rightSide?: React.ReactNode;
|
|
14
|
+
rightSideSpacer: boolean;
|
|
14
15
|
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
15
16
|
}
|
|
16
17
|
export declare class IconAndTitleLayout extends React.Component<IconAndTitleLayoutProps> {
|
|
18
|
+
static defaultProps: {
|
|
19
|
+
rightSideSpacer: boolean;
|
|
20
|
+
};
|
|
17
21
|
private renderAtlaskitIcon;
|
|
18
22
|
private renderImageIcon;
|
|
19
23
|
private renderIconPlaceholder;
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -86,6 +86,7 @@ type ActionProps = {
|
|
|
86
86
|
// @public (undocumented)
|
|
87
87
|
export type AnalyticsAction =
|
|
88
88
|
| 'authStarted'
|
|
89
|
+
| 'chunkLoadFailed'
|
|
89
90
|
| 'clicked'
|
|
90
91
|
| 'closed'
|
|
91
92
|
| 'connectFailed'
|
|
@@ -1097,6 +1098,17 @@ export const useSmartLinkAnalytics: (
|
|
|
1097
1098
|
location,
|
|
1098
1099
|
error,
|
|
1099
1100
|
}: InstrumentEventProps) => void;
|
|
1101
|
+
chunkloadFailedEvent: ({
|
|
1102
|
+
display,
|
|
1103
|
+
error,
|
|
1104
|
+
errorInfo,
|
|
1105
|
+
extensionKey,
|
|
1106
|
+
definitionId,
|
|
1107
|
+
resourceType,
|
|
1108
|
+
destinationProduct,
|
|
1109
|
+
destinationSubproduct,
|
|
1110
|
+
location,
|
|
1111
|
+
}: UiRenderFailedEventProps) => void;
|
|
1100
1112
|
};
|
|
1101
1113
|
track: {
|
|
1102
1114
|
appAccountConnected: ({
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ type ActionProps = {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// @public (undocumented)
|
|
73
|
-
export type AnalyticsAction = 'authStarted' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'unresolved' | 'viewed';
|
|
73
|
+
export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'unresolved' | 'viewed';
|
|
74
74
|
|
|
75
75
|
// @public (undocumented)
|
|
76
76
|
export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'modal' | 'smartLink' | 'smartLinkAction';
|
|
@@ -815,6 +815,7 @@ export const useSmartLinkAnalytics: (url: string, dispatchAnalytics: AnalyticsHa
|
|
|
815
815
|
connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
|
|
816
816
|
connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
|
|
817
817
|
instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;
|
|
818
|
+
chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
|
|
818
819
|
};
|
|
819
820
|
track: {
|
|
820
821
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
|