@atlaskit/smart-card 32.7.7 → 32.7.9
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/analytics.spec.yaml +31 -5
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +7 -6
- package/dist/cjs/state/actions/index.js +13 -38
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +59 -306
- package/dist/cjs/utils/analytics/LinkAnalyticsContext.js +2 -7
- package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +99 -6
- package/dist/cjs/utils/analytics/analytics.js +27 -301
- package/dist/cjs/utils/analytics/index.js +0 -66
- package/dist/cjs/view/CardWithUrl/component.js +7 -23
- package/dist/cjs/view/CardWithUrl/loader.js +14 -5
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +88 -32
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +0 -1
- package/dist/cjs/view/HoverCard/index.js +15 -8
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +8 -7
- package/dist/es2019/state/actions/index.js +13 -38
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -239
- package/dist/es2019/utils/analytics/LinkAnalyticsContext.js +0 -3
- package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +97 -2
- package/dist/es2019/utils/analytics/analytics.js +2 -286
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +8 -24
- package/dist/es2019/view/CardWithUrl/loader.js +9 -1
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +88 -32
- package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +0 -1
- package/dist/es2019/view/HoverCard/index.js +10 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +8 -7
- package/dist/esm/state/actions/index.js +13 -38
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +60 -307
- package/dist/esm/utils/analytics/LinkAnalyticsContext.js +2 -7
- package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +95 -5
- package/dist/esm/utils/analytics/analytics.js +26 -300
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +8 -24
- package/dist/esm/view/CardWithUrl/loader.js +14 -5
- package/dist/esm/view/EmbedModal/components/analytics/index.js +88 -32
- package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +0 -1
- package/dist/esm/view/HoverCard/index.js +14 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/types/common/analytics/generated/analytics.types.d.ts +16 -2
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +6 -102
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -12
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +14 -0
- package/dist/types/utils/analytics/analytics.d.ts +1 -51
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +0 -60
- package/dist/types/utils/mocks.d.ts +0 -12
- package/dist/types/view/EmbedModal/components/analytics/types.d.ts +1 -0
- package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -0
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +1 -1
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +16 -2
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +6 -102
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -12
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +14 -0
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -51
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -60
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -12
- package/dist/types-ts4.5/view/EmbedModal/components/analytics/types.d.ts +1 -0
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -0
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +1 -1
- package/package.json +2 -5
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type ErrorInfo } from 'react';
|
|
2
2
|
import { type APIError, type CardType } from '@atlaskit/linking-common';
|
|
3
|
-
import { type SmartLinkActionType } from '@atlaskit/linking-types';
|
|
4
3
|
import { type InvokeType } from '../../model/invoke-opts';
|
|
5
4
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
6
|
-
import { type PreviewDisplay, type PreviewInvokeMethod } from '../../view/HoverCard/types';
|
|
7
5
|
export type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
|
|
8
6
|
export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
|
|
9
7
|
export interface CommonEventProps {
|
|
@@ -36,46 +34,12 @@ export type InvokeFailedEventProps = CommonEventProps & {
|
|
|
36
34
|
display?: CardInnerAppearance;
|
|
37
35
|
reason: string;
|
|
38
36
|
};
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
41
|
-
*/
|
|
42
|
-
export type UiAuthEventProps = CommonEventProps & {
|
|
43
|
-
display: CardInnerAppearance;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
47
|
-
*/
|
|
48
|
-
export type UiAuthAlternateAccountEventProps = CommonEventProps & {
|
|
49
|
-
display: CardInnerAppearance;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
53
|
-
*/
|
|
54
|
-
export type UiCardClickedEventProps = CommonEventProps & {
|
|
55
|
-
id: string;
|
|
56
|
-
display: CardInnerAppearance;
|
|
57
|
-
status: CardType;
|
|
58
|
-
isModifierKeyPressed?: boolean;
|
|
59
|
-
actionSubjectId?: string;
|
|
60
|
-
};
|
|
61
37
|
export type UiActionClickedEventProps = CommonEventProps & {
|
|
62
38
|
id?: string;
|
|
63
39
|
display?: CardInnerAppearance;
|
|
64
40
|
actionType: string;
|
|
65
41
|
invokeType?: InvokeType;
|
|
66
42
|
};
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
69
|
-
*/
|
|
70
|
-
export type UiServerActionClickedEventProps = CommonEventProps & {
|
|
71
|
-
smartLinkActionType: SmartLinkActionType;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
75
|
-
*/
|
|
76
|
-
export type UiClosedAuthEventProps = CommonEventProps & {
|
|
77
|
-
display: CardInnerAppearance;
|
|
78
|
-
};
|
|
79
43
|
export type UiRenderSuccessEventProps = CommonEventProps & {
|
|
80
44
|
display: CardInnerAppearance;
|
|
81
45
|
status: CardType;
|
|
@@ -86,30 +50,6 @@ export type UiRenderFailedEventProps = CommonEventProps & {
|
|
|
86
50
|
error: Error;
|
|
87
51
|
errorInfo: ErrorInfo;
|
|
88
52
|
};
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
91
|
-
*/
|
|
92
|
-
export type UiHoverCardViewedEventProps = CommonEventProps & {
|
|
93
|
-
previewDisplay: PreviewDisplay;
|
|
94
|
-
previewInvokeMethod?: PreviewInvokeMethod;
|
|
95
|
-
status: CardType;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
99
|
-
*/
|
|
100
|
-
export type UiHoverCardDismissedEventProps = CommonEventProps & {
|
|
101
|
-
previewDisplay: PreviewDisplay;
|
|
102
|
-
hoverTime: number;
|
|
103
|
-
previewInvokeMethod?: PreviewInvokeMethod;
|
|
104
|
-
status: CardType;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
108
|
-
*/
|
|
109
|
-
export type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
|
|
110
|
-
previewDisplay: PreviewDisplay;
|
|
111
|
-
previewInvokeMethod?: PreviewInvokeMethod;
|
|
112
|
-
};
|
|
113
53
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
114
54
|
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
|
|
115
55
|
export type UiLinkClickedEventProps = {
|
|
@@ -91,27 +91,15 @@ export declare const fakeFactory: any;
|
|
|
91
91
|
export declare const waitFor: (time?: number) => Promise<unknown>;
|
|
92
92
|
export declare const mockAnalytics: {
|
|
93
93
|
ui: {
|
|
94
|
-
authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiAuthEventProps) => void;
|
|
95
|
-
authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiAuthAlternateAccountEventProps) => void;
|
|
96
94
|
buttonClickedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
97
95
|
actionSubjectId: string;
|
|
98
96
|
}) => void;
|
|
99
|
-
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
|
|
100
97
|
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
101
|
-
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
102
|
-
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
|
|
103
98
|
modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
104
99
|
actionSubjectId: string;
|
|
105
100
|
}) => void;
|
|
106
101
|
renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("./analytics/types").UiRenderSuccessEventProps) => void;
|
|
107
102
|
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
|
|
108
|
-
hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("./analytics/types").UiHoverCardViewedEventProps) => void;
|
|
109
|
-
hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("./analytics/types").UiHoverCardDismissedEventProps) => void;
|
|
110
|
-
learnMoreClickedEvent: () => void;
|
|
111
|
-
smartLinkLozengeActionClickedEvent: () => void;
|
|
112
|
-
smartLinkLozengeActionListItemClickedEvent: () => void;
|
|
113
|
-
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
114
|
-
smartLinkServerActionClickedEvent: (props: import("./analytics/types").UiServerActionClickedEventProps) => void;
|
|
115
103
|
};
|
|
116
104
|
operational: {
|
|
117
105
|
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { type HoverCardComponentProps } from '../types';
|
|
3
|
+
export declare const HOVER_CARD_SOURCE = "smartLinkPreviewHoverCard";
|
|
3
4
|
export declare const HoverCardComponent: ({ children, url, id, canOpen, closeOnChildClick, actionOptions, allowEventPropagation, zIndex, noFadeDelay, hoverPreviewOptions, }: HoverCardComponentProps) => jsx.JSX.Element;
|
|
@@ -27,5 +27,5 @@ type UnauthorisedViewContentProps = {
|
|
|
27
27
|
* This component is used in unauthorized views of a smart link.
|
|
28
28
|
* It represents the main text that provides a user with information on how to connect their account
|
|
29
29
|
*/
|
|
30
|
-
declare const UnauthorisedViewContent: ({ providerName, isProductIntegrationSupported, testId,
|
|
30
|
+
declare const UnauthorisedViewContent: ({ providerName, isProductIntegrationSupported, testId, }: UnauthorisedViewContentProps) => JSX.Element;
|
|
31
31
|
export default UnauthorisedViewContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "32.7.
|
|
3
|
+
"version": "32.7.9",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/popup": "^1.30.0",
|
|
57
57
|
"@atlaskit/primitives": "^13.3.0",
|
|
58
58
|
"@atlaskit/section-message": "^6.8.0",
|
|
59
|
-
"@atlaskit/select": "^18.
|
|
59
|
+
"@atlaskit/select": "^18.9.0",
|
|
60
60
|
"@atlaskit/spinner": "^16.3.0",
|
|
61
61
|
"@atlaskit/textarea": "^5.7.0",
|
|
62
62
|
"@atlaskit/textfield": "^6.7.0",
|
|
@@ -165,9 +165,6 @@
|
|
|
165
165
|
"send-smart-link-rendered-ufo-event-half-time": {
|
|
166
166
|
"type": "boolean"
|
|
167
167
|
},
|
|
168
|
-
"platform_migrate-some-ui-events-smart-card": {
|
|
169
|
-
"type": "boolean"
|
|
170
|
-
},
|
|
171
168
|
"platform-visual-refresh-icons": {
|
|
172
169
|
"type": "boolean"
|
|
173
170
|
},
|