@atlaskit/smart-card 30.3.4 → 30.4.1

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/messages.js +3 -3
  3. package/dist/cjs/state/actions/index.js +4 -11
  4. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +6 -81
  5. package/dist/cjs/utils/analytics/analytics.js +104 -216
  6. package/dist/cjs/utils/analytics/index.js +0 -12
  7. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +3 -11
  8. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  9. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  10. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  11. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -10
  12. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -98
  13. package/dist/cjs/view/LinkUrl/index.js +1 -1
  14. package/dist/es2019/messages.js +3 -3
  15. package/dist/es2019/state/actions/index.js +4 -11
  16. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +3 -78
  17. package/dist/es2019/utils/analytics/analytics.js +1 -118
  18. package/dist/es2019/utils/analytics/index.js +1 -1
  19. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -12
  20. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  21. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  22. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  23. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +2 -10
  24. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -79
  25. package/dist/es2019/view/LinkUrl/index.js +1 -1
  26. package/dist/esm/messages.js +3 -3
  27. package/dist/esm/state/actions/index.js +4 -11
  28. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +8 -83
  29. package/dist/esm/utils/analytics/analytics.js +103 -215
  30. package/dist/esm/utils/analytics/index.js +1 -1
  31. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -12
  32. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +2 -9
  33. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +11 -31
  34. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +10 -39
  35. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +2 -10
  36. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -98
  37. package/dist/esm/view/LinkUrl/index.js +1 -1
  38. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -49
  39. package/dist/types/state/hooks/useSmartLink.d.ts +0 -16
  40. package/dist/types/utils/analytics/analytics.d.ts +1 -32
  41. package/dist/types/utils/analytics/index.d.ts +1 -1
  42. package/dist/types/utils/analytics/types.d.ts +0 -1
  43. package/dist/types/utils/mocks.d.ts +0 -16
  44. package/dist/types/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  45. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  46. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -49
  47. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -16
  48. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -32
  49. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  50. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -1
  51. package/dist/types-ts4.5/utils/mocks.d.ts +0 -16
  52. package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  53. package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  54. package/package.json +7 -10
@@ -1,8 +1,7 @@
1
1
  import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
- import { SmartLinkActionType } from '@atlaskit/linking-types';
3
2
  import { type CardInnerAppearance } from '../../view/Card/types';
4
3
  import { type AnalyticsPayload } from '../types';
5
- import { type CommonEventProps, type ConnectFailedEventProps, type ConnectSucceededEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ResolvedEventProps, type ScreenAuthPopupEventProps, type TrackAppAccountConnectedProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps, type UnresolvedEventProps } from './types';
4
+ import { type ConnectFailedEventProps, type ConnectSucceededEventProps, type InvokeFailedEventProps, type InvokeSucceededEventProps, type ResolvedEventProps, type ScreenAuthPopupEventProps, type UiActionClickedEventProps, type UiAuthAlternateAccountEventProps, type UiAuthEventProps, type UiCardClickedEventProps, type UiClosedAuthEventProps, type UiHoverCardDismissedEventProps, type UiHoverCardOpenLinkClickedEventProps, type UiHoverCardViewedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps, type UiServerActionClickedEventProps, type UnresolvedEventProps } from './types';
6
5
  export declare const ANALYTICS_CHANNEL = "media";
7
6
  export declare const context: {
8
7
  componentName: string;
@@ -29,36 +28,6 @@ export declare const invokeSucceededEvent: ({ id, actionType, display, extension
29
28
  export declare const invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => AnalyticsPayload;
30
29
  export declare const connectSucceededEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => AnalyticsPayload;
31
30
  export declare const connectFailedEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, reason, }: ConnectFailedEventProps) => AnalyticsPayload;
32
- /**
33
- * @deprecated
34
- */
35
- export declare const trackAppAccountConnected: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => AnalyticsPayload;
36
- /**
37
- * @deprecated
38
- */
39
- export declare const trackAppAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => AnalyticsPayload;
40
- /**
41
- * @deprecated
42
- */
43
- export declare const trackSmartLinkQuickActionStarted: ({ smartLinkActionType, ...attributes }: CommonEventProps & {
44
- smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
45
- }) => AnalyticsPayload;
46
- /**
47
- * @deprecated
48
- */
49
- export declare const trackSmartLinkQuickActionSuccess: ({ smartLinkActionType, ...attributes }: CommonEventProps & {
50
- smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
51
- }) => AnalyticsPayload;
52
- /**
53
- * @deprecated
54
- */
55
- export declare const trackSmartLinkQuickActionFailed: ({ smartLinkActionType, ...attributes }: CommonEventProps & {
56
- smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
57
- }) => AnalyticsPayload;
58
- /**
59
- * @deprecated
60
- */
61
- export declare const trackHoverCardResolutionStarted: ({ display, ...attributes }: UiAuthEventProps) => AnalyticsPayload;
62
31
  export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
63
32
  export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
64
33
  export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
@@ -1,4 +1,4 @@
1
1
  import { type AnalyticsPayload } from '../types';
2
2
  import { type InstrumentEventProps } from './types';
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, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked, } from './analytics';
3
+ export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked, } from './analytics';
4
4
  export declare const instrumentEvent: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => AnalyticsPayload | undefined;
@@ -43,7 +43,6 @@ export type ConnectFailedEventProps = CommonEventProps & {
43
43
  id?: string;
44
44
  reason?: string;
45
45
  };
46
- export type TrackAppAccountConnectedProps = CommonEventProps;
47
46
  export type UiAuthEventProps = CommonEventProps & {
48
47
  display: CardInnerAppearance;
49
48
  };
@@ -121,22 +121,6 @@ export declare const mockAnalytics: {
121
121
  instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: import("./analytics/types").InstrumentEventProps) => void;
122
122
  chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
123
123
  };
124
- track: {
125
- appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").CommonEventProps) => void;
126
- appAccountAuthStarted: ({ extensionKey, location }: import("./analytics/types").CommonEventProps) => void;
127
- smartLinkQuickActionStarted: (props: {
128
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("./analytics/analytics").TrackQuickActionType;
129
- }) => void;
130
- smartLinkQuickActionSuccess: (props: {
131
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("./analytics/analytics").TrackQuickActionType;
132
- }) => void;
133
- smartLinkQuickActionFailed: (props: {
134
- smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("./analytics/analytics").TrackQuickActionType;
135
- reason?: import("./analytics/analytics").TrackQuickActionFailureReason | undefined;
136
- step?: string | undefined;
137
- }) => void;
138
- hoverCardResolutionStarted: () => void;
139
- };
140
124
  screen: {
141
125
  authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").CommonEventProps) => void;
142
126
  modalViewedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type HoverCardUnauthorisedProps } from './types';
3
- declare const HoverCardUnauthorisedView: ({ analytics, extensionKey, id, flexibleCardProps, testId, url, }: HoverCardUnauthorisedProps) => JSX.Element;
3
+ declare const HoverCardUnauthorisedView: ({ analytics, id, flexibleCardProps, testId, url, }: HoverCardUnauthorisedProps) => JSX.Element;
4
4
  export default HoverCardUnauthorisedView;
@@ -26,4 +26,4 @@ export interface InlineCardUnauthorizedViewProps {
26
26
  /** Truncates the card to one line */
27
27
  truncateInline?: boolean;
28
28
  }
29
- export declare const InlineCardUnauthorizedView: (props: InlineCardUnauthorizedViewProps) => JSX.Element;
29
+ export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showAuthTooltip, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "30.3.4",
3
+ "version": "30.4.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,12 +31,12 @@
31
31
  "@atlaskit/avatar-group": "^10.0.0",
32
32
  "@atlaskit/badge": "^16.4.0",
33
33
  "@atlaskit/button": "^20.3.0",
34
- "@atlaskit/checkbox": "^15.1.0",
35
- "@atlaskit/dropdown-menu": "^12.22.0",
34
+ "@atlaskit/checkbox": "^15.2.0",
35
+ "@atlaskit/dropdown-menu": "^12.23.0",
36
36
  "@atlaskit/form": "^10.5.0",
37
37
  "@atlaskit/frontend-utilities": "^2.7.0",
38
38
  "@atlaskit/heading": "^3.1.0",
39
- "@atlaskit/icon": "^22.25.0",
39
+ "@atlaskit/icon": "^22.26.0",
40
40
  "@atlaskit/icon-file-type": "^6.7.0",
41
41
  "@atlaskit/icon-object": "^6.7.0",
42
42
  "@atlaskit/icon-priority": "^6.3.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/popup": "^1.29.0",
56
56
  "@atlaskit/primitives": "^13.2.0",
57
57
  "@atlaskit/section-message": "^6.7.0",
58
- "@atlaskit/select": "^18.5.0",
58
+ "@atlaskit/select": "^18.6.0",
59
59
  "@atlaskit/spinner": "^16.3.0",
60
60
  "@atlaskit/textarea": "^5.6.0",
61
61
  "@atlaskit/textfield": "^6.5.0",
@@ -80,7 +80,7 @@
80
80
  "uuid": "^3.1.0"
81
81
  },
82
82
  "peerDependencies": {
83
- "@atlaskit/link-provider": "^1.16.0",
83
+ "@atlaskit/link-provider": "^1.17.0",
84
84
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
85
85
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
86
86
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -88,7 +88,7 @@
88
88
  "devDependencies": {
89
89
  "@af/integration-testing": "*",
90
90
  "@af/visual-regression": "*",
91
- "@atlaskit/analytics-listeners": "^8.11.0",
91
+ "@atlaskit/analytics-listeners": "^8.12.0",
92
92
  "@atlaskit/css-reset": "^6.11.0",
93
93
  "@atlaskit/link": "^1.2.1",
94
94
  "@atlaskit/link-test-helpers": "^7.5.0",
@@ -175,9 +175,6 @@
175
175
  "smart_links_for_plans_platform": {
176
176
  "type": "boolean"
177
177
  },
178
- "smart-card-migrate-track-analytics": {
179
- "type": "boolean"
180
- },
181
178
  "platform_smart-card-migrate-screen-analytics": {
182
179
  "type": "boolean"
183
180
  }