@atlaskit/smart-card 22.0.0 → 22.1.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.
Files changed (109) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/__tests_external__/index.js +53 -0
  3. package/dist/cjs/__tests_external__/page-objects/BaseCard.js +115 -0
  4. package/dist/cjs/__tests_external__/page-objects/BlockCard.js +43 -0
  5. package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +43 -0
  6. package/dist/cjs/__tests_external__/page-objects/InlineCard.js +43 -0
  7. package/dist/cjs/__tests_external__/test-cases/card.js +27 -0
  8. package/dist/cjs/__tests_external__/test-cases/embed.js +27 -0
  9. package/dist/cjs/__tests_external__/test-cases/inline.js +27 -0
  10. package/dist/cjs/__tests_external__/test-cases/types.js +5 -0
  11. package/dist/cjs/extractors/block/index.js +6 -7
  12. package/dist/cjs/extractors/common/actions/extractPreviewAction.js +16 -27
  13. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +43 -0
  14. package/dist/cjs/state/hooks-external/useSmartLinkActions.js +5 -3
  15. package/dist/cjs/utils/analytics/analytics.js +2 -2
  16. package/dist/cjs/utils/mocks.js +28 -2
  17. package/dist/cjs/version.json +1 -1
  18. package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -2
  19. package/dist/cjs/view/BlockCard/index.js +6 -5
  20. package/dist/cjs/view/CardWithUrl/component.js +2 -2
  21. package/dist/cjs/view/EmbedCard/index.js +3 -2
  22. package/dist/cjs/view/EmbedModal/components/analytics/index.js +100 -0
  23. package/dist/cjs/view/EmbedModal/components/analytics/types.js +5 -0
  24. package/dist/cjs/view/EmbedModal/components/size-experiment/index.js +5 -10
  25. package/dist/cjs/view/EmbedModal/index.js +54 -15
  26. package/dist/cjs/view/EmbedModal/types.js +9 -1
  27. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -1
  28. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +2 -2
  29. package/dist/cjs/view/common/Modal.js +29 -4
  30. package/dist/cjs/view/common/ModalHeader.js +3 -2
  31. package/dist/es2019/__tests_external__/index.js +6 -0
  32. package/dist/es2019/__tests_external__/page-objects/BaseCard.js +61 -0
  33. package/dist/es2019/__tests_external__/page-objects/BlockCard.js +8 -0
  34. package/dist/es2019/__tests_external__/page-objects/EmbedCard.js +8 -0
  35. package/dist/es2019/__tests_external__/page-objects/InlineCard.js +8 -0
  36. package/dist/es2019/__tests_external__/test-cases/card.js +14 -0
  37. package/dist/es2019/__tests_external__/test-cases/embed.js +14 -0
  38. package/dist/es2019/__tests_external__/test-cases/inline.js +14 -0
  39. package/dist/es2019/__tests_external__/test-cases/types.js +1 -0
  40. package/dist/es2019/extractors/block/index.js +6 -7
  41. package/dist/es2019/extractors/common/actions/extractPreviewAction.js +16 -18
  42. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +46 -3
  43. package/dist/es2019/state/hooks-external/useSmartLinkActions.js +5 -3
  44. package/dist/es2019/utils/analytics/analytics.js +1 -1
  45. package/dist/es2019/utils/mocks.js +26 -1
  46. package/dist/es2019/version.json +1 -1
  47. package/dist/es2019/view/BlockCard/actions/PreviewAction.js +3 -3
  48. package/dist/es2019/view/BlockCard/index.js +5 -4
  49. package/dist/es2019/view/CardWithUrl/component.js +2 -2
  50. package/dist/es2019/view/EmbedCard/index.js +3 -2
  51. package/dist/es2019/view/EmbedModal/components/analytics/index.js +80 -0
  52. package/dist/es2019/view/EmbedModal/components/analytics/types.js +1 -0
  53. package/dist/es2019/view/EmbedModal/components/size-experiment/index.js +5 -9
  54. package/dist/es2019/view/EmbedModal/index.js +46 -13
  55. package/dist/es2019/view/EmbedModal/types.js +6 -1
  56. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +2 -1
  57. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +0 -2
  58. package/dist/es2019/view/common/Modal.js +27 -6
  59. package/dist/es2019/view/common/ModalHeader.js +3 -2
  60. package/dist/esm/__tests_external__/index.js +6 -0
  61. package/dist/esm/__tests_external__/page-objects/BaseCard.js +101 -0
  62. package/dist/esm/__tests_external__/page-objects/BlockCard.js +28 -0
  63. package/dist/esm/__tests_external__/page-objects/EmbedCard.js +28 -0
  64. package/dist/esm/__tests_external__/page-objects/InlineCard.js +28 -0
  65. package/dist/esm/__tests_external__/test-cases/card.js +16 -0
  66. package/dist/esm/__tests_external__/test-cases/embed.js +16 -0
  67. package/dist/esm/__tests_external__/test-cases/inline.js +16 -0
  68. package/dist/esm/__tests_external__/test-cases/types.js +1 -0
  69. package/dist/esm/extractors/block/index.js +6 -7
  70. package/dist/esm/extractors/common/actions/extractPreviewAction.js +17 -27
  71. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +45 -2
  72. package/dist/esm/state/hooks-external/useSmartLinkActions.js +5 -3
  73. package/dist/esm/utils/analytics/analytics.js +2 -2
  74. package/dist/esm/utils/mocks.js +25 -0
  75. package/dist/esm/version.json +1 -1
  76. package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -3
  77. package/dist/esm/view/BlockCard/index.js +5 -4
  78. package/dist/esm/view/CardWithUrl/component.js +2 -2
  79. package/dist/esm/view/EmbedCard/index.js +3 -2
  80. package/dist/esm/view/EmbedModal/components/analytics/index.js +82 -0
  81. package/dist/esm/view/EmbedModal/components/analytics/types.js +1 -0
  82. package/dist/esm/view/EmbedModal/components/size-experiment/index.js +5 -10
  83. package/dist/esm/view/EmbedModal/index.js +52 -15
  84. package/dist/esm/view/EmbedModal/types.js +6 -1
  85. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +2 -1
  86. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +2 -2
  87. package/dist/esm/view/common/Modal.js +28 -6
  88. package/dist/esm/view/common/ModalHeader.js +3 -2
  89. package/dist/types/extractors/block/types.d.ts +4 -2
  90. package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +7 -5
  91. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +23 -1
  92. package/dist/types/state/hooks/useSmartLink.d.ts +9 -0
  93. package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +6 -2
  94. package/dist/types/utils/mocks.d.ts +48 -0
  95. package/dist/types/utils/types.d.ts +3 -1
  96. package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +4 -0
  97. package/dist/types/view/BlockCard/index.d.ts +2 -2
  98. package/dist/types/view/BlockCard/types.d.ts +4 -4
  99. package/dist/types/view/Card/index.d.ts +1 -1
  100. package/dist/types/view/EmbedCard/types.d.ts +2 -2
  101. package/dist/types/view/EmbedModal/components/analytics/index.d.ts +5 -0
  102. package/dist/types/view/EmbedModal/components/analytics/types.d.ts +6 -0
  103. package/dist/types/view/EmbedModal/components/size-experiment/index.d.ts +4 -3
  104. package/dist/types/view/EmbedModal/index.d.ts +3 -1
  105. package/dist/types/view/EmbedModal/types.d.ts +14 -4
  106. package/dist/types/view/HoverCard/index.d.ts +1 -1
  107. package/dist/types/view/common/Modal.d.ts +6 -8
  108. package/package.json +22 -22
  109. package/report.api.md +35 -3
@@ -1,9 +1,11 @@
1
1
  import React, { ErrorInfo } from 'react';
2
2
  import { LinkingPlatformFeatureFlags } from '@atlaskit/linking-common';
3
+ import { AnalyticsFacade } from '../../../state/analytics';
3
4
  import { EmbedModalWithExperimentProps } from '../../EmbedModal/types';
4
5
  import { ActionProps } from '../components/Action';
5
6
  import { IconProps } from '../../common/Icon';
6
7
  import { MetadataProps } from '../../common/Metadata';
8
+ import { AnalyticsOrigin } from '../../../utils/types';
7
9
  export interface PreviewFunctionArg extends EmbedModalWithExperimentProps {
8
10
  popupMountPointId: string;
9
11
  }
@@ -23,6 +25,8 @@ declare type PreviewInfo = {
23
25
  onOpen?: () => void;
24
26
  onOpenFailed?: (error: Error, errorInfo: ErrorInfo) => void;
25
27
  featureFlags?: Partial<LinkingPlatformFeatureFlags>;
28
+ analytics: AnalyticsFacade;
29
+ origin?: AnalyticsOrigin;
26
30
  };
27
31
  declare const _default: ({ details, ...rest }: PreviewInfo) => ActionProps;
28
32
  export default _default;
@@ -1,14 +1,14 @@
1
1
  import { FC } from 'react';
2
2
  import { BlockCardProps } from './types';
3
- export { default as PreviewAction } from './actions/PreviewAction';
4
3
  import { AuthorizeAction } from './actions/AuthorizeAction';
5
4
  import { ForbiddenAction } from './actions/ForbiddenAction';
6
5
  import { ResolvedView as BlockCardResolvedView } from './views/ResolvedView';
7
- export type { ResolvedViewProps as BlockCardResolvedViewProps } from './views/ResolvedView';
8
6
  import { NotFoundView as BlockCardNotFoundView } from './views/NotFoundView';
9
7
  import { ResolvingView as BlockCardResolvingView } from './views/ResolvingView';
10
8
  import { UnauthorizedView as BlockCardUnauthorisedView } from './views/UnauthorizedView';
11
9
  import { ForbiddenView as BlockCardForbiddenView } from './views/ForbiddenView';
12
10
  import { ErroredView as BlockCardErroredView } from './views/ErroredView';
11
+ export { default as PreviewAction } from './actions/PreviewAction';
12
+ export type { ResolvedViewProps as BlockCardResolvedViewProps } from './views/ResolvedView';
13
13
  export { ForbiddenAction, AuthorizeAction, BlockCardResolvedView, BlockCardResolvingView, BlockCardUnauthorisedView, BlockCardForbiddenView, BlockCardErroredView, BlockCardNotFoundView, };
14
14
  export declare const BlockCard: FC<BlockCardProps>;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { CardProviderRenderers, CardAuthFlowOpts } from '@atlaskit/link-provider';
2
+ import { CardAuthFlowOpts, CardProviderRenderers } from '@atlaskit/link-provider';
3
3
  import { CardState } from '../../state/types';
4
4
  import { InvokeHandler } from '../../model/invoke-handler';
5
- import { AnalyticsHandler } from '../../utils/types';
6
- import { OnResolveCallback, CardPlatform } from '../Card/types';
5
+ import { CardPlatform, OnResolveCallback } from '../Card/types';
7
6
  import { OnErrorCallback } from '../types';
7
+ import { AnalyticsFacade } from '../../state/analytics';
8
8
  export declare type BlockCardProps = {
9
9
  id: string;
10
10
  url: string;
@@ -12,7 +12,6 @@ export declare type BlockCardProps = {
12
12
  authFlow?: CardAuthFlowOpts['authFlow'];
13
13
  handleAuthorize: (() => void) | undefined;
14
14
  handleErrorRetry: () => void;
15
- handleAnalytics: AnalyticsHandler;
16
15
  handleInvoke: InvokeHandler;
17
16
  handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
18
17
  isSelected?: boolean;
@@ -22,4 +21,5 @@ export declare type BlockCardProps = {
22
21
  showActions?: boolean;
23
22
  renderers?: CardProviderRenderers;
24
23
  platform?: CardPlatform;
24
+ analytics: AnalyticsFacade;
25
25
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { CardAppearance, CardPlatform, CardProps } from './types';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
- export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "data" | "appearance" | "testId" | "isSelected" | "inheritDimensions" | "id" | "placeholder" | "onError" | "onClick" | "analyticsContext" | "key" | "url" | "ui" | "showHoverPreview" | "showActions" | "onResolve" | "platform" | "isFrameVisible" | "embedIframeRef" | "inlinePreloaderStyle" | "importer" | "container" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
4
+ export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "appearance" | "testId" | "isSelected" | "inheritDimensions" | "id" | "placeholder" | "onError" | "onClick" | "analyticsContext" | "key" | "ui" | "showActions" | "showHoverPreview" | "onResolve" | "platform" | "isFrameVisible" | "embedIframeRef" | "inlinePreloaderStyle" | "importer" | "container" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
5
5
  export type { CardAppearance, CardProps, CardPlatform };
@@ -1,18 +1,18 @@
1
1
  import { CardState } from '../../state/types';
2
2
  import { InvokeHandler } from '../../model/invoke-handler';
3
- import { AnalyticsHandler } from '../../utils/types';
4
3
  import { CardPlatform, OnResolveCallback } from '../Card/types';
5
4
  import { ReactNode } from 'react';
6
5
  import { ActionProps } from '../BlockCard/components/Action';
7
6
  import { RequestAccessMessageKey } from '../../messages';
8
7
  import { OnErrorCallback } from '../types';
8
+ import { AnalyticsFacade } from '../../state/analytics';
9
9
  export declare type EmbedCardProps = {
10
10
  url: string;
11
11
  cardState: CardState;
12
12
  handleAuthorize: (() => void) | undefined;
13
13
  handleErrorRetry: () => void;
14
14
  handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
15
- handleAnalytics: AnalyticsHandler;
15
+ analytics: AnalyticsFacade;
16
16
  handleInvoke: InvokeHandler;
17
17
  id?: string;
18
18
  isSelected?: boolean;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { EmbedModalProps } from '../../types';
3
+ import { WithAnalytics } from './types';
4
+ declare const withAnalytics: (Component: React.ComponentType<EmbedModalProps>) => React.FC<EmbedModalProps & WithAnalytics>;
5
+ export default withAnalytics;
@@ -0,0 +1,6 @@
1
+ import { AnalyticsFacade } from '../../../../state/analytics';
2
+ import { AnalyticsOrigin } from '../../../../utils/types';
3
+ export declare type WithAnalytics = {
4
+ analytics: AnalyticsFacade;
5
+ origin?: AnalyticsOrigin;
6
+ };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { ModalProps } from '../../../common/Modal';
3
- import { EmbedModalProps } from '../../types';
2
+ import Modal from '../../../common/Modal';
4
3
  import { WithSizeExperimentProps } from './types';
5
- declare const withSizeExperiment: (Component: React.ComponentType<EmbedModalProps>) => React.FC<(EmbedModalProps | ModalProps) & WithSizeExperimentProps>;
4
+ declare const withSizeExperiment: <Props, Component>(Component: React.ComponentType<Props>) => React.FC<Props & import("../../types").EmbedModalProps & import("../analytics/types").WithAnalytics & {
5
+ children?: React.ReactNode;
6
+ } & WithSizeExperimentProps>;
6
7
  export default withSizeExperiment;
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
2
  import { EmbedModalProps } from './types';
3
- declare const _default: React.FC<(import("../common/Modal").ModalProps | EmbedModalProps) & import("./components/size-experiment/types").WithSizeExperimentProps>;
3
+ declare const _default: React.FC<EmbedModalProps & import("./components/analytics/types").WithAnalytics & {
4
+ children?: React.ReactNode;
5
+ } & import("./components/size-experiment/types").WithSizeExperimentProps>;
4
6
  export default _default;
@@ -2,23 +2,33 @@ import { ErrorInfo } from 'react';
2
2
  import { IconProps } from '../common/Icon';
3
3
  import { WithSizeExperimentProps } from './components/size-experiment/types';
4
4
  import { ModalProps } from '../common/Modal';
5
+ import { WithAnalytics } from './components/analytics/types';
6
+ export declare enum EmbedModalSize {
7
+ Large = "large",
8
+ Small = "small"
9
+ }
10
+ export declare type EmbedModalContext = {
11
+ duration?: number;
12
+ size: EmbedModalSize;
13
+ };
5
14
  export declare type EmbedModalProps = {
6
15
  closeLabel?: string;
7
16
  download?: string;
8
17
  icon?: IconProps;
9
18
  iframeName: string;
10
19
  isTrusted?: boolean;
11
- onClose: () => any;
20
+ onClose: (context: EmbedModalContext) => void;
12
21
  onDownloadActionClick?: () => void;
13
- onOpen?: () => void;
22
+ onOpen?: (context: EmbedModalContext) => void;
14
23
  onOpenFailed?: (error: Error, errorInfo: ErrorInfo) => void;
24
+ onResize?: (context: EmbedModalContext) => void;
15
25
  onViewActionClick?: () => void;
16
26
  providerName?: string;
17
27
  showModal?: boolean;
18
- size?: string;
28
+ size?: EmbedModalSize;
19
29
  src?: string;
20
30
  testId?: string;
21
31
  title?: string;
22
32
  url?: string;
23
33
  };
24
- export declare type EmbedModalWithExperimentProps = EmbedModalProps & ModalProps & WithSizeExperimentProps;
34
+ export declare type EmbedModalWithExperimentProps = EmbedModalProps & ModalProps & WithSizeExperimentProps & WithAnalytics;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { HoverCardProps } from './types';
3
- export declare const HoverCard: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").PropsWithChildren<HoverCardProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "id" | "analyticsContext" | "key" | "url"> & import("react").RefAttributes<any>>;
3
+ export declare const HoverCard: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").PropsWithChildren<HoverCardProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "id" | "analyticsContext" | "key"> & import("react").RefAttributes<any>>;
@@ -1,15 +1,16 @@
1
1
  import React, { ErrorInfo } from 'react';
2
2
  import { IconProps } from './Icon';
3
3
  import { MetadataListProps } from './MetadataList';
4
+ import { EmbedModalContext } from '../EmbedModal/types';
4
5
  export interface ModalProps {
5
- onClose: () => any;
6
- onOpen?: () => void;
6
+ onClose: (context: EmbedModalContext) => void;
7
+ onOpen?: (context: EmbedModalContext) => void;
7
8
  onOpenFailed?: (error: Error, errorInfo: ErrorInfo) => void;
8
9
  src?: string;
9
10
  showModal?: boolean;
10
11
  iframeName: string;
11
12
  providerName?: string;
12
- closeLabel: string;
13
+ closeLabel?: string;
13
14
  url?: string;
14
15
  title?: string;
15
16
  metadata?: MetadataListProps;
@@ -21,8 +22,5 @@ export interface ModalProps {
21
22
  onDownloadActionClick?: () => void;
22
23
  testId?: string;
23
24
  }
24
- declare class ModalWithErrorBoundary extends React.Component<ModalProps> {
25
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
26
- render(): JSX.Element;
27
- }
28
- export default ModalWithErrorBoundary;
25
+ declare const _default: React.FC<import("../EmbedModal/types").EmbedModalProps & import("../EmbedModal/components/analytics/types").WithAnalytics>;
26
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "22.0.0",
3
+ "version": "22.1.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,21 +27,21 @@
27
27
  "@atlaskit/avatar": "^21.0.0",
28
28
  "@atlaskit/avatar-group": "^9.0.0",
29
29
  "@atlaskit/button": "^16.3.0",
30
- "@atlaskit/dropdown-menu": "^11.3.0",
30
+ "@atlaskit/dropdown-menu": "^11.5.0",
31
31
  "@atlaskit/icon": "^21.10.0",
32
32
  "@atlaskit/icon-file-type": "^6.3.0",
33
33
  "@atlaskit/icon-object": "^6.2.0",
34
34
  "@atlaskit/icon-priority": "^6.3.0",
35
35
  "@atlaskit/in-product-testing": "^0.1.0",
36
- "@atlaskit/linking-common": "^1.6.0",
37
- "@atlaskit/logo": "^13.8.0",
38
- "@atlaskit/lozenge": "^11.1.0",
36
+ "@atlaskit/linking-common": "^1.8.0",
37
+ "@atlaskit/logo": "^13.9.0",
38
+ "@atlaskit/lozenge": "^11.2.0",
39
39
  "@atlaskit/media-common": "^2.16.0",
40
- "@atlaskit/modal-dialog": "^12.2.0",
40
+ "@atlaskit/modal-dialog": "^12.3.0",
41
41
  "@atlaskit/outbound-auth-flow-client": "^3.3.0",
42
42
  "@atlaskit/popup": "^1.4.0",
43
43
  "@atlaskit/spinner": "^15.1.0",
44
- "@atlaskit/theme": "^12.1.0",
44
+ "@atlaskit/theme": "^12.2.0",
45
45
  "@atlaskit/tokens": "^0.10.0",
46
46
  "@atlaskit/tooltip": "^17.5.2",
47
47
  "@atlaskit/ufo": "^0.1.0",
@@ -58,7 +58,7 @@
58
58
  "uuid": "^3.1.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@atlaskit/link-provider": "^1.2.4",
61
+ "@atlaskit/link-provider": "^1.2.6",
62
62
  "react": "^16.8.0",
63
63
  "react-dom": "^16.8.0",
64
64
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -71,26 +71,26 @@
71
71
  "@atlaskit/docs": "*",
72
72
  "@atlaskit/field-base": "^15.0.6",
73
73
  "@atlaskit/form": "^8.5.0",
74
- "@atlaskit/inline-message": "^11.3.0",
75
- "@atlaskit/lozenge": "^11.1.0",
74
+ "@atlaskit/inline-message": "^11.4.0",
75
+ "@atlaskit/lozenge": "^11.2.0",
76
76
  "@atlaskit/media-integration-test-helpers": "^2.6.0",
77
77
  "@atlaskit/media-test-helpers": "^30.0.0",
78
- "@atlaskit/page": "^12.1.0",
79
- "@atlaskit/radio": "^5.3.0",
78
+ "@atlaskit/page": "^12.2.0",
79
+ "@atlaskit/radio": "^5.4.0",
80
80
  "@atlaskit/range": "^6.0.0",
81
- "@atlaskit/section-message": "^6.1.5",
82
- "@atlaskit/select": "^15.6.0",
83
- "@atlaskit/table-tree": "^9.1.0",
84
- "@atlaskit/tabs": "^13.2.10",
81
+ "@atlaskit/section-message": "^6.2.0",
82
+ "@atlaskit/select": "^15.7.0",
83
+ "@atlaskit/table-tree": "^9.2.0",
84
+ "@atlaskit/tabs": "^13.3.0",
85
85
  "@atlaskit/textarea": "^4.3.0",
86
- "@atlaskit/textfield": "^5.1.0",
87
- "@atlaskit/toggle": "^12.4.0",
86
+ "@atlaskit/textfield": "^5.2.0",
87
+ "@atlaskit/toggle": "^12.5.0",
88
88
  "@atlaskit/visual-regression": "*",
89
89
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
90
- "@testing-library/jest-dom": "^4.1.0",
91
- "@testing-library/react": "^8.0.1",
92
- "@testing-library/react-hooks": "^1.0.4",
93
- "@testing-library/user-event": "10.4.0",
90
+ "@testing-library/jest-dom": "^5.16.5",
91
+ "@testing-library/react": "^12.1.5",
92
+ "@testing-library/react-hooks": "^1.1.0",
93
+ "@testing-library/user-event": "^13.5.0",
94
94
  "@types/enzyme": "^3.1.15",
95
95
  "@types/lorem-ipsum": "^1.0.2",
96
96
  "@types/react": "^16.8.0",
package/report.api.md CHANGED
@@ -115,12 +115,16 @@ export declare type AnalyticsActionSubject =
115
115
  | 'applicationAccount'
116
116
  | 'button'
117
117
  | 'consentModal'
118
- | 'hoverCard';
118
+ | 'hoverCard'
119
+ | 'modal'
120
+ | 'embedPreviewModal';
119
121
 
120
122
  declare type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
121
123
 
122
124
  export declare type AnalyticsHandler = (event: AnalyticsPayload) => void;
123
125
 
126
+ declare type AnalyticsName = 'embedPreviewModal';
127
+
124
128
  export declare type AnalyticsPayload = GasPayload & {
125
129
  action?: AnalyticsAction;
126
130
  actionSubject: AnalyticsActionSubject;
@@ -264,6 +268,7 @@ export declare const Card: React_2.ForwardRefExoticComponent<
264
268
  > &
265
269
  React_2.RefAttributes<any> &
266
270
  WithContextProps,
271
+ | 'url'
267
272
  | 'children'
268
273
  | 'data'
269
274
  | 'appearance'
@@ -276,10 +281,9 @@ export declare const Card: React_2.ForwardRefExoticComponent<
276
281
  | 'onClick'
277
282
  | 'analyticsContext'
278
283
  | 'key'
279
- | 'url'
280
284
  | 'ui'
281
- | 'showHoverPreview'
282
285
  | 'showActions'
286
+ | 'showHoverPreview'
283
287
  | 'onResolve'
284
288
  | 'platform'
285
289
  | 'isFrameVisible'
@@ -1129,6 +1133,16 @@ export declare const useSmartLinkAnalytics: (
1129
1133
  destinationSubproduct,
1130
1134
  location,
1131
1135
  }: UiAuthAlternateAccountEventProps) => void;
1136
+ /**
1137
+ * This fires an event that represents when a user
1138
+ * click a button.
1139
+ * @param data A partial analytics event payload
1140
+ */
1141
+ buttonClickedEvent: (
1142
+ data: Partial<AnalyticsPayload> & {
1143
+ actionSubjectId: Required<string>;
1144
+ },
1145
+ ) => void;
1132
1146
  /**
1133
1147
  * This fires an event that represents when a user clicks on a Smart Link.
1134
1148
  * @param id The unique ID for this Smart Link.
@@ -1208,6 +1222,15 @@ export declare const useSmartLinkAnalytics: (
1208
1222
  destinationSubproduct,
1209
1223
  location,
1210
1224
  }: UiClosedAuthEventProps) => void;
1225
+ /**
1226
+ * This fires an event that represents when a user close a modal.
1227
+ * @param data A partial analytics event payload
1228
+ */
1229
+ modalClosedEvent: (
1230
+ data: Partial<AnalyticsPayload> & {
1231
+ actionSubjectId: Required<string>;
1232
+ },
1233
+ ) => void;
1211
1234
  /**
1212
1235
  * This fires an event that represents when a Smart Link was rendered successfully.
1213
1236
  * Note: this fires even if the Smart Link request errored out.
@@ -1410,6 +1433,15 @@ export declare const useSmartLinkAnalytics: (
1410
1433
  destinationSubproduct,
1411
1434
  location,
1412
1435
  }: ScreenAuthPopupEventProps) => void;
1436
+ /**
1437
+ * This fires an event that represents when a user view a modal.
1438
+ * @param data A partial analytics event payload
1439
+ */
1440
+ modalViewedEvent: (
1441
+ data: Partial<AnalyticsPayload> & {
1442
+ name: Extract<AnalyticsName, 'embedPreviewModal'>;
1443
+ },
1444
+ ) => void;
1413
1445
  };
1414
1446
  };
1415
1447