@atlaskit/smart-card 21.3.0 → 22.1.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.
- package/CHANGELOG.md +56 -0
- package/dist/cjs/extractors/block/index.js +6 -7
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +16 -19
- package/dist/cjs/state/actions/index.js +54 -10
- package/dist/cjs/state/analytics/types.js +5 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +429 -109
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +5 -3
- package/dist/cjs/utils/analytics/analytics.js +241 -74
- package/dist/cjs/utils/analytics/index.js +32 -5
- package/dist/cjs/utils/mocks.js +28 -2
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/actions/PreviewAction.js +2 -2
- package/dist/cjs/view/BlockCard/index.js +6 -5
- package/dist/cjs/view/CardWithUrl/component.js +27 -5
- package/dist/cjs/view/CardWithUrl/loader.js +6 -1
- package/dist/cjs/view/EmbedCard/index.js +3 -2
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +100 -0
- package/dist/cjs/view/EmbedModal/components/analytics/types.js +5 -0
- package/dist/cjs/view/EmbedModal/components/size-experiment/index.js +5 -10
- package/dist/cjs/view/EmbedModal/index.js +54 -15
- package/dist/cjs/view/EmbedModal/types.js +9 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +11 -3
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +15 -4
- package/dist/cjs/view/HoverCard/index.js +6 -1
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +2 -2
- package/dist/cjs/view/common/Modal.js +29 -4
- package/dist/cjs/view/common/ModalHeader.js +3 -2
- package/dist/es2019/extractors/block/index.js +6 -7
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +16 -10
- package/dist/es2019/state/actions/index.js +54 -10
- package/dist/es2019/state/analytics/types.js +1 -0
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +424 -41
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +5 -3
- package/dist/es2019/utils/analytics/analytics.js +254 -79
- package/dist/es2019/utils/analytics/index.js +32 -4
- package/dist/es2019/utils/mocks.js +26 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/actions/PreviewAction.js +3 -3
- package/dist/es2019/view/BlockCard/index.js +5 -4
- package/dist/es2019/view/CardWithUrl/component.js +27 -5
- package/dist/es2019/view/CardWithUrl/loader.js +6 -1
- package/dist/es2019/view/EmbedCard/index.js +3 -2
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +80 -0
- package/dist/es2019/view/EmbedModal/components/analytics/types.js +1 -0
- package/dist/es2019/view/EmbedModal/components/size-experiment/index.js +5 -9
- package/dist/es2019/view/EmbedModal/index.js +46 -13
- package/dist/es2019/view/EmbedModal/types.js +6 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +11 -3
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +15 -4
- package/dist/es2019/view/HoverCard/index.js +6 -1
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +0 -2
- package/dist/es2019/view/common/Modal.js +27 -6
- package/dist/es2019/view/common/ModalHeader.js +3 -2
- package/dist/esm/extractors/block/index.js +6 -7
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +17 -19
- package/dist/esm/state/actions/index.js +54 -10
- package/dist/esm/state/analytics/types.js +1 -0
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +428 -111
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +5 -3
- package/dist/esm/utils/analytics/analytics.js +241 -74
- package/dist/esm/utils/analytics/index.js +31 -4
- package/dist/esm/utils/mocks.js +25 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/actions/PreviewAction.js +3 -3
- package/dist/esm/view/BlockCard/index.js +5 -4
- package/dist/esm/view/CardWithUrl/component.js +27 -5
- package/dist/esm/view/CardWithUrl/loader.js +6 -1
- package/dist/esm/view/EmbedCard/index.js +3 -2
- package/dist/esm/view/EmbedModal/components/analytics/index.js +82 -0
- package/dist/esm/view/EmbedModal/components/analytics/types.js +1 -0
- package/dist/esm/view/EmbedModal/components/size-experiment/index.js +5 -10
- package/dist/esm/view/EmbedModal/index.js +52 -15
- package/dist/esm/view/EmbedModal/types.js +6 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +11 -3
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +15 -4
- package/dist/esm/view/HoverCard/index.js +6 -1
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +2 -2
- package/dist/esm/view/common/Modal.js +28 -6
- package/dist/esm/view/common/ModalHeader.js +3 -2
- package/dist/types/extractors/block/types.d.ts +4 -2
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +7 -5
- package/dist/types/state/analytics/types.d.ts +9 -0
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +41 -24
- package/dist/types/state/hooks/useSmartLink.d.ts +26 -18
- package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +6 -2
- package/dist/types/utils/analytics/analytics.d.ts +19 -21
- package/dist/types/utils/analytics/index.d.ts +2 -2
- package/dist/types/utils/analytics/types.d.ts +91 -0
- package/dist/types/utils/mocks.d.ts +48 -0
- package/dist/types/utils/types.d.ts +3 -1
- package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +4 -0
- package/dist/types/view/BlockCard/index.d.ts +2 -2
- package/dist/types/view/BlockCard/types.d.ts +4 -4
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/EmbedCard/types.d.ts +2 -2
- package/dist/types/view/EmbedModal/components/analytics/index.d.ts +5 -0
- package/dist/types/view/EmbedModal/components/analytics/types.d.ts +6 -0
- package/dist/types/view/EmbedModal/components/size-experiment/index.d.ts +4 -3
- package/dist/types/view/EmbedModal/index.d.ts +3 -1
- package/dist/types/view/EmbedModal/types.d.ts +14 -4
- package/dist/types/view/common/Modal.d.ts +6 -8
- package/package.json +17 -17
- package/report.api.md +302 -107
|
@@ -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
|
-
|
|
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;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { EmbedModalProps } from '../../types';
|
|
2
|
+
import Modal from '../../../common/Modal';
|
|
4
3
|
import { WithSizeExperimentProps } from './types';
|
|
5
|
-
declare const withSizeExperiment: (Component: React.ComponentType<
|
|
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<
|
|
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: () =>
|
|
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?:
|
|
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,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: () =>
|
|
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
|
|
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
|
|
25
|
-
|
|
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": "
|
|
3
|
+
"version": "22.1.1",
|
|
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.
|
|
30
|
+
"@atlaskit/dropdown-menu": "^11.4.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.
|
|
37
|
-
"@atlaskit/logo": "^13.
|
|
38
|
-
"@atlaskit/lozenge": "^11.
|
|
36
|
+
"@atlaskit/linking-common": "^1.7.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.
|
|
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.
|
|
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",
|
|
@@ -71,20 +71,20 @@
|
|
|
71
71
|
"@atlaskit/docs": "*",
|
|
72
72
|
"@atlaskit/field-base": "^15.0.6",
|
|
73
73
|
"@atlaskit/form": "^8.5.0",
|
|
74
|
-
"@atlaskit/inline-message": "^11.
|
|
75
|
-
"@atlaskit/lozenge": "^11.
|
|
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.
|
|
79
|
-
"@atlaskit/radio": "^5.
|
|
78
|
+
"@atlaskit/page": "^12.2.0",
|
|
79
|
+
"@atlaskit/radio": "^5.4.0",
|
|
80
80
|
"@atlaskit/range": "^6.0.0",
|
|
81
|
-
"@atlaskit/section-message": "^6.
|
|
82
|
-
"@atlaskit/select": "^15.
|
|
83
|
-
"@atlaskit/table-tree": "^9.
|
|
84
|
-
"@atlaskit/tabs": "^13.
|
|
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.
|
|
87
|
-
"@atlaskit/toggle": "^12.
|
|
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
90
|
"@testing-library/jest-dom": "^4.1.0",
|