@atlaskit/smart-card 33.1.0 → 33.2.0
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 +8 -0
- package/dist/cjs/extractors/flexible/actions/extract-copy-link-action.js +1 -20
- package/dist/cjs/extractors/flexible/actions/extract-download-action.js +1 -23
- package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +1 -34
- package/dist/cjs/extractors/flexible/actions/index.js +2 -15
- package/dist/cjs/extractors/flexible/extract-state.js +1 -5
- package/dist/cjs/extractors/flexible/index.js +3 -7
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +18 -190
- package/dist/cjs/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +4 -18
- package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +12 -25
- package/dist/cjs/view/CardWithUrl/loader.js +10 -22
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +40 -89
- package/dist/cjs/view/EmbedModal/index.js +8 -65
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +26 -63
- package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +4 -40
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +4 -47
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -26
- package/dist/cjs/view/FlexibleCard/components/utils.js +1 -28
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +13 -30
- package/dist/cjs/view/HoverCard/index.js +10 -22
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +0 -19
- package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -21
- package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -34
- package/dist/es2019/extractors/flexible/actions/index.js +4 -23
- package/dist/es2019/extractors/flexible/extract-state.js +1 -5
- package/dist/es2019/extractors/flexible/index.js +3 -4
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -172
- package/dist/es2019/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +4 -18
- package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +3 -40
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +13 -26
- package/dist/es2019/view/CardWithUrl/loader.js +11 -23
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +39 -88
- package/dist/es2019/view/EmbedModal/index.js +10 -33
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +11 -32
- package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +4 -22
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +4 -27
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -24
- package/dist/es2019/view/FlexibleCard/components/utils.js +0 -25
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +12 -25
- package/dist/es2019/view/HoverCard/index.js +11 -23
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +0 -19
- package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -23
- package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -34
- package/dist/esm/extractors/flexible/actions/index.js +4 -17
- package/dist/esm/extractors/flexible/extract-state.js +1 -5
- package/dist/esm/extractors/flexible/index.js +3 -4
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +19 -191
- package/dist/esm/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +4 -18
- package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +13 -26
- package/dist/esm/view/CardWithUrl/loader.js +10 -22
- package/dist/esm/view/EmbedModal/components/analytics/index.js +40 -89
- package/dist/esm/view/EmbedModal/index.js +10 -67
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +26 -63
- package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +4 -40
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +4 -47
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -26
- package/dist/esm/view/FlexibleCard/components/utils.js +0 -27
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +13 -30
- package/dist/esm/view/HoverCard/index.js +10 -22
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/extract-download-action.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/index.d.ts +0 -6
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
- package/dist/types/state/flexible-ui-context/types.d.ts +4 -19
- package/dist/types/state/hooks/use-invoke/types.d.ts +0 -6
- package/dist/types/state/hooks/use-invoke-client-action/index.d.ts +1 -1
- package/dist/types/state/hooks/useSmartLink.d.ts +1 -16
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
- package/dist/types/utils/mocks.d.ts +1 -16
- package/dist/types/view/EmbedModal/index.d.ts +0 -2
- package/dist/types/view/EmbedModal/types.d.ts +0 -3
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
- package/dist/types/view/FlexibleCard/components/utils.d.ts +0 -6
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/extract-download-action.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +0 -6
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +2 -60
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -19
- package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +0 -6
- package/dist/types-ts4.5/state/hooks/use-invoke-client-action/index.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +1 -16
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
- package/dist/types-ts4.5/utils/mocks.d.ts +1 -16
- package/dist/types-ts4.5/view/EmbedModal/index.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedModal/types.d.ts +0 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +0 -6
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/package.json +1 -4
- package/dist/cjs/extractors/action/extractDownloadActionProps.js +0 -32
- package/dist/cjs/extractors/action/extractPreviewActionProps.js +0 -47
- package/dist/cjs/extractors/action/extractViewActionProps.js +0 -31
- package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -27
- package/dist/es2019/extractors/action/extractDownloadActionProps.js +0 -24
- package/dist/es2019/extractors/action/extractPreviewActionProps.js +0 -36
- package/dist/es2019/extractors/action/extractViewActionProps.js +0 -23
- package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -20
- package/dist/esm/extractors/action/extractDownloadActionProps.js +0 -27
- package/dist/esm/extractors/action/extractPreviewActionProps.js +0 -41
- package/dist/esm/extractors/action/extractViewActionProps.js +0 -26
- package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -22
- package/dist/types/extractors/action/extractDownloadActionProps.d.ts +0 -7
- package/dist/types/extractors/action/extractPreviewActionProps.d.ts +0 -7
- package/dist/types/extractors/action/extractViewActionProps.d.ts +0 -7
- package/dist/types/extractors/flexible/actions/extract-view-action.d.ts +0 -7
- package/dist/types/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
- package/dist/types-ts4.5/extractors/action/extractDownloadActionProps.d.ts +0 -7
- package/dist/types-ts4.5/extractors/action/extractPreviewActionProps.d.ts +0 -7
- package/dist/types-ts4.5/extractors/action/extractViewActionProps.d.ts +0 -7
- package/dist/types-ts4.5/extractors/flexible/actions/extract-view-action.d.ts +0 -7
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
|
@@ -2,9 +2,7 @@ import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
|
|
|
2
2
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
3
3
|
import { di } from 'react-magnetic-di';
|
|
4
4
|
import uuid from 'uuid';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
7
|
-
import { useSmartLinkAnalytics } from '../../state';
|
|
8
6
|
import { failUfoExperience, startUfoExperience } from '../../state/analytics';
|
|
9
7
|
import { importWithRetry } from '../../utils';
|
|
10
8
|
import { useSmartLinkAnalyticsContext } from '../../utils/analytics/SmartLinkAnalyticsContext';
|
|
@@ -51,7 +49,6 @@ export function CardWithURLRenderer(props) {
|
|
|
51
49
|
resolvingPlaceholder,
|
|
52
50
|
truncateInline
|
|
53
51
|
} = props;
|
|
54
|
-
const analytics = useSmartLinkAnalytics(url !== null && url !== void 0 ? url : '', id);
|
|
55
52
|
const isFlexibleUi = isFlexibleUiCard(children);
|
|
56
53
|
const analyticsContext = useSmartLinkAnalyticsContext({
|
|
57
54
|
display: isFlexibleUi ? 'flexible' : appearance,
|
|
@@ -79,32 +76,23 @@ export function CardWithURLRenderer(props) {
|
|
|
79
76
|
definitionId: null
|
|
80
77
|
});
|
|
81
78
|
} else if (error.name !== 'APIError') {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
});
|
|
93
|
-
} else {
|
|
94
|
-
analytics.ui.renderFailedEvent({
|
|
95
|
-
display: isFlexibleUi ? 'flexible' : appearance,
|
|
96
|
-
id,
|
|
97
|
-
error,
|
|
98
|
-
errorInfo
|
|
99
|
-
});
|
|
100
|
-
}
|
|
79
|
+
startUfoExperience('smart-link-rendered', id || 'NULL');
|
|
80
|
+
failUfoExperience('smart-link-rendered', id || 'NULL');
|
|
81
|
+
failUfoExperience('smart-link-authenticated', id || 'NULL');
|
|
82
|
+
fireEvent('ui.smartLink.renderFailed', {
|
|
83
|
+
...(analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes),
|
|
84
|
+
display: isFlexibleUi ? 'flexible' : appearance,
|
|
85
|
+
id: id !== null && id !== void 0 ? id : null,
|
|
86
|
+
error: error,
|
|
87
|
+
errorInfo: errorInfo
|
|
88
|
+
});
|
|
101
89
|
}
|
|
102
90
|
onError && onError({
|
|
103
91
|
status: 'errored',
|
|
104
92
|
url: url !== null && url !== void 0 ? url : '',
|
|
105
93
|
err: error
|
|
106
94
|
});
|
|
107
|
-
}, [
|
|
95
|
+
}, [analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes, appearance, fireEvent, id, isFlexibleUi, onError, url]);
|
|
108
96
|
if (!url) {
|
|
109
97
|
throw new Error('@atlaskit/smart-card: url property is missing.');
|
|
110
98
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { CardDisplay } from '../../../../constants';
|
|
5
4
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from '../../../../state/analytics';
|
|
6
5
|
import { EmbedModalSize } from '../../types';
|
|
7
6
|
const getResizeFrom = size => size === EmbedModalSize.Small ? EmbedModalSize.Large : EmbedModalSize.Small;
|
|
8
7
|
const withAnalytics = Component => props => {
|
|
9
8
|
const {
|
|
10
|
-
analytics,
|
|
11
9
|
fireEvent,
|
|
12
10
|
extensionKey,
|
|
13
11
|
id,
|
|
@@ -18,108 +16,61 @@ const withAnalytics = Component => props => {
|
|
|
18
16
|
origin
|
|
19
17
|
} = props;
|
|
20
18
|
const handleOnOpen = useCallback(context => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
attributes: {
|
|
30
|
-
origin,
|
|
31
|
-
size: context.size
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
36
|
-
succeedUfoExperience('smart-link-rendered', id || 'NULL', {
|
|
37
|
-
extensionKey,
|
|
38
|
-
display: CardDisplay.EmbedPreview
|
|
39
|
-
});
|
|
19
|
+
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('screen.embedPreviewModal.viewed', {
|
|
20
|
+
origin: origin !== null && origin !== void 0 ? origin : null,
|
|
21
|
+
size: context.size
|
|
22
|
+
});
|
|
23
|
+
succeedUfoExperience('smart-link-rendered', id || 'NULL', {
|
|
24
|
+
extensionKey,
|
|
25
|
+
display: CardDisplay.EmbedPreview
|
|
26
|
+
});
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} else {
|
|
49
|
-
analytics === null || analytics === void 0 ? void 0 : analytics.ui.renderSuccessEvent({
|
|
50
|
-
status: 'resolved',
|
|
51
|
-
display: CardDisplay.EmbedPreview
|
|
52
|
-
});
|
|
53
|
-
}
|
|
28
|
+
// UFO will disregard this if authentication experience has not yet been started
|
|
29
|
+
succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
|
|
30
|
+
display: CardDisplay.EmbedPreview
|
|
31
|
+
});
|
|
32
|
+
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('ui.smartLink.renderSuccess', {
|
|
33
|
+
display: CardDisplay.EmbedPreview
|
|
34
|
+
});
|
|
54
35
|
if (onOpen) {
|
|
55
36
|
onOpen(context);
|
|
56
37
|
}
|
|
57
|
-
}, [
|
|
38
|
+
}, [fireEvent, extensionKey, id, onOpen, origin]);
|
|
58
39
|
const handleOnOpenFailed = useCallback((error, errorInfo) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
} else {
|
|
70
|
-
analytics === null || analytics === void 0 ? void 0 : analytics.ui.renderFailedEvent({
|
|
71
|
-
display: CardDisplay.EmbedPreview,
|
|
72
|
-
error,
|
|
73
|
-
errorInfo
|
|
74
|
-
});
|
|
75
|
-
}
|
|
40
|
+
startUfoExperience('smart-link-rendered', id || 'NULL');
|
|
41
|
+
failUfoExperience('smart-link-rendered', id || 'NULL');
|
|
42
|
+
failUfoExperience('smart-link-authenticated', id || 'NULL');
|
|
43
|
+
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('ui.smartLink.renderFailed', {
|
|
44
|
+
display: CardDisplay.EmbedPreview,
|
|
45
|
+
error: error,
|
|
46
|
+
errorInfo: errorInfo,
|
|
47
|
+
id: id !== null && id !== void 0 ? id : null
|
|
48
|
+
});
|
|
76
49
|
if (onOpenFailed) {
|
|
77
50
|
onOpenFailed(error, errorInfo);
|
|
78
51
|
}
|
|
79
|
-
}, [
|
|
52
|
+
}, [fireEvent, id, onOpenFailed]);
|
|
80
53
|
const handleOnClose = useCallback(context => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
});
|
|
88
|
-
} else {
|
|
89
|
-
analytics === null || analytics === void 0 ? void 0 : analytics.ui.modalClosedEvent({
|
|
90
|
-
actionSubjectId: 'embedPreview',
|
|
91
|
-
attributes: {
|
|
92
|
-
origin,
|
|
93
|
-
previewTime: context.duration,
|
|
94
|
-
size: context.size
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
54
|
+
var _context$duration;
|
|
55
|
+
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('ui.modal.closed.embedPreview', {
|
|
56
|
+
origin: origin !== null && origin !== void 0 ? origin : null,
|
|
57
|
+
previewTime: (_context$duration = context.duration) !== null && _context$duration !== void 0 ? _context$duration : null,
|
|
58
|
+
size: context.size
|
|
59
|
+
});
|
|
98
60
|
if (onClose) {
|
|
99
61
|
onClose(context);
|
|
100
62
|
}
|
|
101
|
-
}, [
|
|
63
|
+
}, [fireEvent, onClose, origin]);
|
|
102
64
|
const handleOnResize = useCallback(context => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
});
|
|
109
|
-
} else {
|
|
110
|
-
analytics === null || analytics === void 0 ? void 0 : analytics.ui.buttonClickedEvent({
|
|
111
|
-
actionSubjectId: 'embedPreviewResize',
|
|
112
|
-
attributes: {
|
|
113
|
-
newSize: context.size,
|
|
114
|
-
origin,
|
|
115
|
-
previousSize: getResizeFrom(context.size)
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
}
|
|
65
|
+
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('ui.button.clicked.embedPreviewResize', {
|
|
66
|
+
newSize: context.size,
|
|
67
|
+
origin: origin !== null && origin !== void 0 ? origin : null,
|
|
68
|
+
previousSize: getResizeFrom(context.size)
|
|
69
|
+
});
|
|
119
70
|
if (onResize) {
|
|
120
71
|
onResize(context);
|
|
121
72
|
}
|
|
122
|
-
}, [
|
|
73
|
+
}, [fireEvent, onResize, origin]);
|
|
123
74
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
124
75
|
onClose: handleOnClose,
|
|
125
76
|
onOpen: handleOnOpen,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useRef, useState } from 'react';
|
|
3
3
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
6
|
-
import {
|
|
5
|
+
import { SmartLinkSize } from '../../constants';
|
|
7
6
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
8
|
-
import {
|
|
7
|
+
import { getPreviewUrlWithTheme } from '../../utils';
|
|
9
8
|
import Icon from '../FlexibleCard/components/elements/icon';
|
|
10
9
|
import withAnalytics from './components/analytics';
|
|
11
10
|
import EmbedContent from './components/embed-content';
|
|
@@ -17,11 +16,8 @@ const toSize = width => width === MAX_MODAL_SIZE ? EmbedModalSize.Large : EmbedM
|
|
|
17
16
|
const toWidth = size => size === EmbedModalSize.Large ? MAX_MODAL_SIZE : MIN_MODAL_SIZE;
|
|
18
17
|
const EmbedModal = ({
|
|
19
18
|
analytics,
|
|
20
|
-
download,
|
|
21
19
|
invokeDownloadAction,
|
|
22
|
-
extensionKey,
|
|
23
20
|
fireEvent,
|
|
24
|
-
icon,
|
|
25
21
|
iframeName,
|
|
26
22
|
isSupportTheming,
|
|
27
23
|
isTrusted = false,
|
|
@@ -35,7 +31,6 @@ const EmbedModal = ({
|
|
|
35
31
|
src,
|
|
36
32
|
testId = 'smart-embed-preview-modal',
|
|
37
33
|
title,
|
|
38
|
-
url,
|
|
39
34
|
invokeViewAction
|
|
40
35
|
}) => {
|
|
41
36
|
const defaultWidth = toWidth(size);
|
|
@@ -76,29 +71,11 @@ const EmbedModal = ({
|
|
|
76
71
|
const themeState = useThemeObserver();
|
|
77
72
|
let previewUrl = src;
|
|
78
73
|
const handleOnViewActionClick = useCallback(() => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
} else {
|
|
82
|
-
invoke({
|
|
83
|
-
actionType: 'ViewAction',
|
|
84
|
-
actionFn: async () => openUrl(url),
|
|
85
|
-
display: CardDisplay.EmbedPreview,
|
|
86
|
-
extensionKey
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}, [extensionKey, invoke, url, invokeViewAction]);
|
|
74
|
+
invokeViewAction && invoke(invokeViewAction);
|
|
75
|
+
}, [invoke, invokeViewAction]);
|
|
90
76
|
const handleOnDownloadActionClick = useCallback(() => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
} else {
|
|
94
|
-
invoke({
|
|
95
|
-
actionType: ActionName.DownloadAction,
|
|
96
|
-
actionFn: async () => downloadUrl(download),
|
|
97
|
-
display: CardDisplay.EmbedPreview,
|
|
98
|
-
extensionKey
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}, [download, invokeDownloadAction, extensionKey, invoke]);
|
|
77
|
+
invokeDownloadAction && invoke(invokeDownloadAction);
|
|
78
|
+
}, [invokeDownloadAction, invoke]);
|
|
102
79
|
if (previewUrl && isSupportTheming) {
|
|
103
80
|
previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
|
|
104
81
|
}
|
|
@@ -110,15 +87,15 @@ const EmbedModal = ({
|
|
|
110
87
|
testId: testId,
|
|
111
88
|
width: width
|
|
112
89
|
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
113
|
-
icon:
|
|
90
|
+
icon: linkIcon && {
|
|
114
91
|
icon: /*#__PURE__*/React.createElement(Icon, _extends({}, linkIcon, {
|
|
115
92
|
size: SmartLinkSize.Large
|
|
116
93
|
})),
|
|
117
94
|
isFlexibleUi: true
|
|
118
|
-
}
|
|
95
|
+
},
|
|
119
96
|
providerName: providerName,
|
|
120
|
-
onViewButtonClick:
|
|
121
|
-
onDownloadButtonClick:
|
|
97
|
+
onViewButtonClick: invokeViewAction ? handleOnViewActionClick : undefined,
|
|
98
|
+
onDownloadButtonClick: invokeDownloadAction ? handleOnDownloadActionClick : undefined,
|
|
122
99
|
onResizeButtonClick: handleOnResizeClick,
|
|
123
100
|
size: width,
|
|
124
101
|
title: title,
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { ActionName } from '../../../../../constants';
|
|
7
6
|
import { messages } from '../../../../../messages';
|
|
8
7
|
import { useFlexibleUiAnalyticsContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -21,38 +20,18 @@ const CopyLinkAction = ({
|
|
|
21
20
|
const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.CopyLinkAction];
|
|
22
21
|
const [tooltipMessage, setTooltipMessage] = useState(messages.copy_url_to_clipboard);
|
|
23
22
|
const onClick = useCallback(() => {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback();
|
|
35
|
-
}
|
|
36
|
-
} else {
|
|
37
|
-
if (data && data.url) {
|
|
38
|
-
invoke({
|
|
39
|
-
actionType: ActionName.CopyLinkAction,
|
|
40
|
-
actionFn: async () => {
|
|
41
|
-
var _data$url;
|
|
42
|
-
await navigator.clipboard.writeText((_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : '');
|
|
43
|
-
setTooltipMessage(messages.copied_url_to_clipboard);
|
|
44
|
-
},
|
|
45
|
-
// These values have already been set in analytics context.
|
|
46
|
-
// We only pass these here for ufo experience.
|
|
47
|
-
display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
|
|
48
|
-
extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if (onClickCallback) {
|
|
52
|
-
onClickCallback();
|
|
53
|
-
}
|
|
23
|
+
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
24
|
+
invoke({
|
|
25
|
+
...data.invokeAction,
|
|
26
|
+
actionFn: async () => {
|
|
27
|
+
var _data$invokeAction;
|
|
28
|
+
await ((_data$invokeAction = data.invokeAction) === null || _data$invokeAction === void 0 ? void 0 : _data$invokeAction.actionFn());
|
|
29
|
+
setTooltipMessage(messages.copied_url_to_clipboard);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback();
|
|
54
33
|
}
|
|
55
|
-
}, [
|
|
34
|
+
}, [data, invoke, onClickCallback]);
|
|
56
35
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
57
36
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.copy_url_to_clipboard),
|
|
58
37
|
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
@@ -2,12 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { ActionName } from '../../../../../constants';
|
|
7
6
|
import { messages } from '../../../../../messages';
|
|
8
7
|
import { useFlexibleUiAnalyticsContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
9
8
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
10
|
-
import { downloadUrl as download } from '../../../../../utils';
|
|
11
9
|
import Action from '../action';
|
|
12
10
|
const DownloadAction = ({
|
|
13
11
|
onClick: onClickCallback,
|
|
@@ -21,27 +19,11 @@ const DownloadAction = ({
|
|
|
21
19
|
});
|
|
22
20
|
const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.DownloadAction];
|
|
23
21
|
const onClick = useCallback(() => {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback();
|
|
28
|
-
}
|
|
29
|
-
} else {
|
|
30
|
-
if (data !== null && data !== void 0 && data.downloadUrl) {
|
|
31
|
-
invoke({
|
|
32
|
-
actionType: ActionName.DownloadAction,
|
|
33
|
-
actionFn: async () => download(data === null || data === void 0 ? void 0 : data.downloadUrl),
|
|
34
|
-
// These values have already been set in analytics context.
|
|
35
|
-
// We only pass these here for ufo experience.
|
|
36
|
-
display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
|
|
37
|
-
extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
|
|
38
|
-
});
|
|
39
|
-
if (onClickCallback) {
|
|
40
|
-
onClickCallback();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
22
|
+
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
23
|
+
invoke(data.invokeAction);
|
|
24
|
+
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback();
|
|
43
25
|
}
|
|
44
|
-
}, [
|
|
26
|
+
}, [data, invoke, onClickCallback]);
|
|
45
27
|
const isStackItem = props.as === 'stack-item';
|
|
46
28
|
const label = isStackItem ? messages.download_file : messages.download;
|
|
47
29
|
const tooltipMessage = isStackItem ? messages.download_description : messages.download;
|
|
@@ -2,12 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import MediaServicesActualSizeIcon from '@atlaskit/icon/core/migration/grow-diagonal--media-services-actual-size';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { ActionName } from '../../../../../constants';
|
|
7
6
|
import { messages } from '../../../../../messages';
|
|
8
7
|
import { useFlexibleUiAnalyticsContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
9
8
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
10
|
-
import { openEmbedModalWithFlexibleUiIcon } from '../../utils';
|
|
11
9
|
import Action from '../action';
|
|
12
10
|
const PreviewAction = ({
|
|
13
11
|
onClick: onClickCallback,
|
|
@@ -21,32 +19,11 @@ const PreviewAction = ({
|
|
|
21
19
|
});
|
|
22
20
|
const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
|
|
23
21
|
const onClick = useCallback(() => {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback();
|
|
28
|
-
}
|
|
29
|
-
} else {
|
|
30
|
-
if (data) {
|
|
31
|
-
invoke({
|
|
32
|
-
actionType: ActionName.PreviewAction,
|
|
33
|
-
actionFn: async () => openEmbedModalWithFlexibleUiIcon({
|
|
34
|
-
download: data === null || data === void 0 ? void 0 : data.downloadUrl,
|
|
35
|
-
extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey,
|
|
36
|
-
analytics,
|
|
37
|
-
...data
|
|
38
|
-
}),
|
|
39
|
-
// These values have already been set in analytics context.
|
|
40
|
-
// We only pass these here for ufo experience.
|
|
41
|
-
display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
|
|
42
|
-
extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
if (onClickCallback) {
|
|
46
|
-
onClickCallback();
|
|
47
|
-
}
|
|
22
|
+
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
23
|
+
invoke(data.invokeAction);
|
|
24
|
+
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback();
|
|
48
25
|
}
|
|
49
|
-
}, [
|
|
26
|
+
}, [data, invoke, onClickCallback]);
|
|
50
27
|
const isStackItem = props.as === 'stack-item';
|
|
51
28
|
const tooltipMessage = isStackItem ? messages.preview_description : messages.preview_improved;
|
|
52
29
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
@@ -55,7 +55,7 @@ const LozengeAction = ({
|
|
|
55
55
|
const {
|
|
56
56
|
url,
|
|
57
57
|
id: linkId,
|
|
58
|
-
|
|
58
|
+
invokePreviewAction
|
|
59
59
|
} = (action === null || action === void 0 ? void 0 : (_action$update = action.update) === null || _action$update === void 0 ? void 0 : _action$update.details) || {};
|
|
60
60
|
const handleOpenChange = useCallback(async args => {
|
|
61
61
|
setIsOpen(args.isOpen);
|
|
@@ -135,7 +135,7 @@ const LozengeAction = ({
|
|
|
135
135
|
errorMessage: errorMessage,
|
|
136
136
|
testId: testId,
|
|
137
137
|
url: url,
|
|
138
|
-
|
|
138
|
+
invokePreviewAction: invokePreviewAction
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
if (items && items.length > 0) {
|
|
@@ -145,7 +145,7 @@ const LozengeAction = ({
|
|
|
145
145
|
onClick: handleItemClick
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
}, [errorMessage, handleItemClick, items,
|
|
148
|
+
}, [errorMessage, handleItemClick, items, invokePreviewAction, testId, url]);
|
|
149
149
|
return jsx(DropdownMenu, {
|
|
150
150
|
isLoading: isLoading,
|
|
151
151
|
isOpen: isOpen,
|
|
@@ -9,50 +9,32 @@ import { jsx } from '@emotion/react';
|
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
11
11
|
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { R50, R500 } from '@atlaskit/theme/colors';
|
|
14
13
|
import { useAnalyticsEvents } from '../../../../../../../common/analytics/generated/use-analytics-events';
|
|
15
14
|
import { messages } from '../../../../../../../messages';
|
|
16
|
-
import { useFlexibleUiAnalyticsContext } from '../../../../../../../state/flexible-ui-context';
|
|
17
15
|
import useInvokeClientAction from '../../../../../../../state/hooks/use-invoke-client-action';
|
|
18
|
-
import
|
|
19
|
-
import { getFormattedMessage, openEmbedModalWithFlexibleUiIcon } from '../../../../utils';
|
|
16
|
+
import { getFormattedMessage } from '../../../../utils';
|
|
20
17
|
import { contentStyles, dropdownItemGroupStyles, linkStyles, textStyles } from './styled';
|
|
21
18
|
const MAX_LINE_NUMBER = 8;
|
|
22
19
|
const LozengeActionError = ({
|
|
23
20
|
errorMessage,
|
|
24
21
|
testId,
|
|
25
22
|
maxLineNumber = MAX_LINE_NUMBER,
|
|
26
|
-
invokePreviewAction
|
|
27
|
-
url,
|
|
28
|
-
previewData
|
|
23
|
+
invokePreviewAction
|
|
29
24
|
}) => {
|
|
30
25
|
const {
|
|
31
26
|
fireEvent
|
|
32
27
|
} = useAnalyticsEvents();
|
|
33
|
-
const reload = useResolve();
|
|
34
|
-
const analytics = useFlexibleUiAnalyticsContext();
|
|
35
28
|
const invoke = useInvokeClientAction({});
|
|
36
|
-
const isPreviewAvailable =
|
|
37
|
-
const handlePreviewClose = useCallback(() => {
|
|
38
|
-
if (url) {
|
|
39
|
-
reload(url, true);
|
|
40
|
-
}
|
|
41
|
-
}, [reload, url]);
|
|
29
|
+
const isPreviewAvailable = invokePreviewAction !== undefined;
|
|
42
30
|
const handlePreviewOpen = useCallback(() => {
|
|
43
31
|
if (isPreviewAvailable) {
|
|
44
32
|
fireEvent('ui.button.clicked.smartLinkStatusOpenPreview', {});
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
} else {
|
|
48
|
-
return openEmbedModalWithFlexibleUiIcon({
|
|
49
|
-
...previewData,
|
|
50
|
-
analytics,
|
|
51
|
-
onClose: handlePreviewClose
|
|
52
|
-
});
|
|
33
|
+
if (invokePreviewAction) {
|
|
34
|
+
invoke(invokePreviewAction);
|
|
53
35
|
}
|
|
54
36
|
}
|
|
55
|
-
}, [
|
|
37
|
+
}, [isPreviewAvailable, invoke, invokePreviewAction, fireEvent]);
|
|
56
38
|
const content = useMemo(() => {
|
|
57
39
|
return jsx(Fragment, null, jsx("div", {
|
|
58
40
|
css: contentStyles
|
|
@@ -6,8 +6,6 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
7
|
import Loadable from 'react-loadable';
|
|
8
8
|
import { SmartLinkSize } from '../../../constants';
|
|
9
|
-
import { openEmbedModal } from '../../EmbedModal/utils';
|
|
10
|
-
import Icon from './elements/icon';
|
|
11
9
|
export const sizeToButtonSpacing = {
|
|
12
10
|
[SmartLinkSize.Small]: 'none',
|
|
13
11
|
[SmartLinkSize.Medium]: 'compact',
|
|
@@ -194,27 +192,4 @@ export const getTruncateStyles = (maxLines, lineHeight = '1rem', wordBreak = 'br
|
|
|
194
192
|
});
|
|
195
193
|
export const hasWhiteSpace = str => {
|
|
196
194
|
return str.search(/\s/) >= 0;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
201
|
-
*/
|
|
202
|
-
export const openEmbedModalWithFlexibleUiIcon = ({
|
|
203
|
-
linkIcon,
|
|
204
|
-
...props
|
|
205
|
-
}) => {
|
|
206
|
-
const icon = {
|
|
207
|
-
icon: /*#__PURE__*/React.createElement(Icon, _extends({}, linkIcon, {
|
|
208
|
-
size: SmartLinkSize.Large
|
|
209
|
-
})),
|
|
210
|
-
isFlexibleUi: true
|
|
211
|
-
};
|
|
212
|
-
return openEmbedModal({
|
|
213
|
-
...props,
|
|
214
|
-
icon,
|
|
215
|
-
// Flex should not send origin as block card. It should be able to support
|
|
216
|
-
// its internal parent components like hover card, block card and
|
|
217
|
-
// itself as a standalone. To be investigated and fix in EDM-7520.
|
|
218
|
-
origin: 'smartLinkCard'
|
|
219
|
-
});
|
|
220
195
|
};
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
5
4
|
import { CardDisplay, SmartLinkPosition, SmartLinkSize, SmartLinkStatus } from '../../../../../constants';
|
|
6
5
|
import { succeedUfoExperience } from '../../../../../state/analytics';
|
|
7
|
-
import { getCanBeDatasource, getDefinitionId } from '../../../../../state/helpers';
|
|
8
6
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
9
7
|
import { ActionBlock, AIFooterBlock, AISummaryBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
|
|
10
8
|
import { getMetadata } from '../../../utils';
|
|
11
9
|
import ImagePreview from '../../ImagePreview';
|
|
12
10
|
import { hiddenSnippetStyles, metadataBlockCss } from './styled';
|
|
13
11
|
const HoverCardResolvedView = ({
|
|
14
|
-
analytics,
|
|
15
12
|
cardState,
|
|
16
13
|
extensionKey,
|
|
17
14
|
flexibleCardProps,
|
|
@@ -24,32 +21,22 @@ const HoverCardResolvedView = ({
|
|
|
24
21
|
const {
|
|
25
22
|
fireEvent
|
|
26
23
|
} = useAnalyticsEvents();
|
|
27
|
-
const definitionId = React.useMemo(() => getDefinitionId(cardState.details), [cardState.details]);
|
|
28
|
-
const canBeDatasource = React.useMemo(() => getCanBeDatasource(cardState.details), [cardState.details]);
|
|
29
24
|
useEffect(() => {
|
|
30
25
|
// Since this hover view is only rendered on resolved status,
|
|
31
26
|
// there is no need to check for statuses.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
27
|
+
succeedUfoExperience('smart-link-rendered', id || 'NULL', {
|
|
28
|
+
extensionKey,
|
|
29
|
+
display: CardDisplay.HoverCardPreview
|
|
30
|
+
});
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
analytics.ui.renderSuccessEvent({
|
|
47
|
-
display: CardDisplay.HoverCardPreview,
|
|
48
|
-
status: cardState.status,
|
|
49
|
-
canBeDatasource
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}, [analytics.ui, cardState.status, canBeDatasource, fireEvent, definitionId, extensionKey, id]);
|
|
32
|
+
// UFO will disregard this if authentication experience has not yet been started
|
|
33
|
+
succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
|
|
34
|
+
display: CardDisplay.HoverCardPreview
|
|
35
|
+
});
|
|
36
|
+
fireEvent('ui.smartLink.renderSuccess', {
|
|
37
|
+
display: CardDisplay.HoverCardPreview
|
|
38
|
+
});
|
|
39
|
+
}, [extensionKey, fireEvent, id]);
|
|
53
40
|
const data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
54
41
|
const {
|
|
55
42
|
primary,
|