@atlaskit/smart-card 33.1.0 → 33.3.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 +16 -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/actions/index.js +2 -4
- package/dist/cjs/state/analytics/index.js +1 -8
- package/dist/cjs/state/flexible-ui-context/index.js +1 -10
- package/dist/cjs/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/cjs/state/hooks/useSmartLink.js +1 -4
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +5 -21
- package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/cjs/state/index.js +1 -8
- package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
- package/dist/cjs/utils/analytics/analytics.js +2 -144
- package/dist/cjs/utils/analytics/index.js +0 -30
- package/dist/cjs/utils/analytics/types.js +1 -5
- package/dist/cjs/utils/mocks.js +1 -23
- package/dist/cjs/view/BlockCard/index.js +1 -3
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +2 -4
- package/dist/cjs/view/CardWithUrl/component.js +13 -33
- package/dist/cjs/view/CardWithUrl/loader.js +10 -22
- package/dist/cjs/view/EmbedCard/index.js +0 -4
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +3 -5
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +40 -89
- package/dist/cjs/view/EmbedModal/index.js +9 -68
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +27 -67
- package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +5 -44
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +5 -51
- 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/FlexibleCard/index.js +3 -17
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -3
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +13 -30
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +3 -5
- package/dist/cjs/view/HoverCard/index.js +10 -22
- package/dist/cjs/view/InlineCard/index.js +1 -3
- 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/actions/index.js +2 -4
- package/dist/es2019/state/analytics/index.js +1 -2
- package/dist/es2019/state/flexible-ui-context/index.js +0 -7
- package/dist/es2019/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/es2019/state/hooks/useSmartLink.js +1 -4
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +5 -21
- package/dist/es2019/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/es2019/state/index.js +1 -2
- package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +3 -40
- package/dist/es2019/utils/analytics/analytics.js +2 -145
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/utils/analytics/types.js +0 -1
- package/dist/es2019/utils/mocks.js +1 -23
- package/dist/es2019/view/BlockCard/index.js +1 -3
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +1 -3
- package/dist/es2019/view/CardWithUrl/component.js +14 -34
- package/dist/es2019/view/CardWithUrl/loader.js +11 -23
- package/dist/es2019/view/EmbedCard/index.js +0 -4
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -3
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +39 -88
- package/dist/es2019/view/EmbedModal/index.js +10 -35
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +13 -37
- package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +6 -27
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +6 -32
- 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/FlexibleCard/index.js +3 -15
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -3
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +12 -25
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +2 -4
- package/dist/es2019/view/HoverCard/index.js +11 -23
- package/dist/es2019/view/InlineCard/index.js +0 -2
- 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/actions/index.js +2 -4
- package/dist/esm/state/analytics/index.js +1 -2
- package/dist/esm/state/flexible-ui-context/index.js +0 -9
- package/dist/esm/state/hooks/use-invoke-client-action/index.js +21 -44
- package/dist/esm/state/hooks/useSmartLink.js +1 -4
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +5 -21
- package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -3
- package/dist/esm/state/index.js +1 -2
- package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
- package/dist/esm/utils/analytics/analytics.js +1 -143
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/utils/analytics/types.js +0 -1
- package/dist/esm/utils/mocks.js +0 -22
- package/dist/esm/view/BlockCard/index.js +1 -3
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -3
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +2 -4
- package/dist/esm/view/CardWithUrl/component.js +14 -34
- package/dist/esm/view/CardWithUrl/loader.js +10 -22
- package/dist/esm/view/EmbedCard/index.js +0 -4
- package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +3 -5
- package/dist/esm/view/EmbedModal/components/analytics/index.js +40 -89
- package/dist/esm/view/EmbedModal/index.js +11 -70
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +28 -68
- package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +6 -45
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +6 -52
- 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/FlexibleCard/index.js +4 -18
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -3
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -8
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +13 -30
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -5
- package/dist/esm/view/HoverCard/index.js +10 -22
- package/dist/esm/view/InlineCard/index.js +1 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/actions/types.d.ts +0 -2
- 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/actions/index.d.ts +1 -2
- package/dist/types/state/analytics/index.d.ts +0 -2
- package/dist/types/state/flexible-ui-context/index.d.ts +1 -7
- package/dist/types/state/flexible-ui-context/types.d.ts +4 -25
- 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/use-invoke-client-action/types.d.ts +0 -6
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -22
- package/dist/types/state/index.d.ts +0 -1
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
- package/dist/types/utils/analytics/analytics.d.ts +0 -6
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +0 -42
- package/dist/types/utils/mocks.d.ts +0 -22
- package/dist/types/view/BlockCard/index.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +0 -2
- package/dist/types/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +0 -2
- package/dist/types/view/EmbedCard/types.d.ts +0 -2
- package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
- package/dist/types/view/EmbedModal/components/analytics/types.d.ts +0 -2
- 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/FlexibleCard/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +0 -6
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
- package/dist/types/view/HoverCard/types.d.ts +0 -3
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
- package/dist/types/view/InlineCard/index.d.ts +1 -1
- package/dist/types/view/InlineCard/types.d.ts +0 -2
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +0 -6
- package/dist/types-ts4.5/extractors/common/actions/types.d.ts +0 -2
- 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/actions/index.d.ts +1 -2
- package/dist/types-ts4.5/state/analytics/index.d.ts +0 -2
- package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +1 -7
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -25
- 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/use-invoke-client-action/types.d.ts +0 -6
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -22
- package/dist/types-ts4.5/state/index.d.ts +0 -1
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +0 -6
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -42
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -22
- package/dist/types-ts4.5/view/BlockCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedModal/components/analytics/types.d.ts +0 -2
- 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/FlexibleCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.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/HoverCardContent.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +0 -3
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -2
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +0 -6
- 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/cjs/state/analytics/useSmartLinkAnalytics.js +0 -311
- 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/es2019/state/analytics/useSmartLinkAnalytics.js +0 -296
- 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/esm/state/analytics/useSmartLinkAnalytics.js +0 -304
- 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/state/analytics/useSmartLinkAnalytics.d.ts +0 -91
- package/dist/types/utils/analytics/__mocks__/analytics.d.ts +0 -2
- 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/state/analytics/useSmartLinkAnalytics.d.ts +0 -91
- package/dist/types-ts4.5/utils/analytics/__mocks__/analytics.d.ts +0 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
|
@@ -12,10 +12,8 @@ import { jsx } from '@emotion/react';
|
|
|
12
12
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
13
13
|
import { di } from 'react-magnetic-di';
|
|
14
14
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
17
16
|
import { CardDisplay } from '../../constants';
|
|
18
|
-
import { useSmartLinkAnalytics } from '../../state';
|
|
19
17
|
import { failUfoExperience, startUfoExperience } from '../../state/analytics';
|
|
20
18
|
import { SmartLinkModalProvider } from '../../state/modal';
|
|
21
19
|
import { useSmartLinkAnalyticsContext } from '../../utils/analytics/SmartLinkAnalyticsContext';
|
|
@@ -26,7 +24,6 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
|
|
|
26
24
|
var url = props.url,
|
|
27
25
|
id = props.id,
|
|
28
26
|
children = props.children;
|
|
29
|
-
var analytics = useSmartLinkAnalytics(url, id);
|
|
30
27
|
var analyticsContext = useSmartLinkAnalyticsContext({
|
|
31
28
|
display: CardDisplay.HoverCardPreview,
|
|
32
29
|
id: id,
|
|
@@ -34,25 +31,16 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
|
|
|
34
31
|
url: url
|
|
35
32
|
});
|
|
36
33
|
var onError = useCallback(function (error, info) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} else {
|
|
48
|
-
analytics.ui.renderFailedEvent({
|
|
49
|
-
display: CardDisplay.HoverCardPreview,
|
|
50
|
-
id: id,
|
|
51
|
-
error: error,
|
|
52
|
-
errorInfo: info
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}, [analytics.ui, analyticsContext, id, fireEvent]);
|
|
34
|
+
startUfoExperience('smart-link-rendered', id || 'NULL');
|
|
35
|
+
failUfoExperience('smart-link-rendered', id || 'NULL');
|
|
36
|
+
failUfoExperience('smart-link-authenticated', id || 'NULL');
|
|
37
|
+
fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
38
|
+
display: CardDisplay.HoverCardPreview,
|
|
39
|
+
id: id !== null && id !== void 0 ? id : null,
|
|
40
|
+
error: error,
|
|
41
|
+
errorInfo: info
|
|
42
|
+
}));
|
|
43
|
+
}, [analyticsContext, id, fireEvent]);
|
|
56
44
|
return jsx(ErrorBoundary, {
|
|
57
45
|
fallback: children,
|
|
58
46
|
onError: onError
|
|
@@ -17,8 +17,7 @@ import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
|
17
17
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView };
|
|
18
18
|
export var InlineCard = function InlineCard(_ref) {
|
|
19
19
|
var _details$meta, _providerForbidden$te;
|
|
20
|
-
var
|
|
21
|
-
id = _ref.id,
|
|
20
|
+
var id = _ref.id,
|
|
22
21
|
url = _ref.url,
|
|
23
22
|
cardState = _ref.cardState,
|
|
24
23
|
handleAuthorize = _ref.handleAuthorize,
|
|
@@ -107,7 +106,6 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
107
106
|
testId: testIdWithStatus,
|
|
108
107
|
showHoverPreview: showHoverPreview,
|
|
109
108
|
id: id,
|
|
110
|
-
analytics: analytics,
|
|
111
109
|
extensionKey: extensionKey,
|
|
112
110
|
truncateInline: truncateInline
|
|
113
111
|
});
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "33.
|
|
16
|
+
packageVersion: "33.3.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { type JsonLd } from 'json-ld-types';
|
|
2
|
-
import { type AnalyticsFacade } from '../../../state/analytics';
|
|
3
2
|
import { type AnalyticsOrigin } from '../../../utils/types';
|
|
4
3
|
import { type CardActionOptions, type CardInnerAppearance } from '../../../view/Card/types';
|
|
5
4
|
export type ExtractActionsProps = {
|
|
6
5
|
response: JsonLd.Response;
|
|
7
|
-
analytics: AnalyticsFacade;
|
|
8
6
|
actionOptions?: CardActionOptions;
|
|
9
7
|
extensionKey?: string;
|
|
10
8
|
source?: CardInnerAppearance;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
1
|
import { type CopyLinkActionData } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { type CardActionOptions } from '../../../view/Card/types';
|
|
4
2
|
import { type ExtractClientActionsParam } from '../../action/types';
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
7
|
-
* Replaced with extractCopyLinkClientAction()
|
|
8
|
-
*/
|
|
9
|
-
export declare const extractCopyLinkAction: (data: JsonLd.Data.BaseData, actionOptions?: CardActionOptions) => CopyLinkActionData | undefined;
|
|
10
3
|
export declare const extractCopyLinkClientAction: (param: ExtractClientActionsParam) => CopyLinkActionData | undefined;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
1
|
import { type DownloadActionData } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { type CardActionOptions } from '../../../view/Card/types';
|
|
4
2
|
import { type ExtractClientActionsParam } from '../../action/types';
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
7
|
-
* Replaced with extractDownloadClientAction()
|
|
8
|
-
*/
|
|
9
|
-
export declare const extractDownloadAction: (data: JsonLd.Data.BaseData, actionOptions?: CardActionOptions) => DownloadActionData | undefined;
|
|
10
3
|
export declare const extractDownloadClientAction: (param: ExtractClientActionsParam) => DownloadActionData | undefined;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { type JsonLd } from 'json-ld-types';
|
|
2
1
|
import { type PreviewActionData } from '../../../state/flexible-ui-context/types';
|
|
3
|
-
import { type CardActionOptions } from '../../../view/Card/types';
|
|
4
2
|
import { type ExtractInvokePreviewActionParam } from '../../action/extract-invoke-preview-action';
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
7
|
-
* Replaced with extractPreviewClientAction()
|
|
8
|
-
*/
|
|
9
|
-
export declare const extractPreviewAction: (response: JsonLd.Response, actionOptions?: CardActionOptions) => PreviewActionData | undefined;
|
|
10
3
|
export declare const extractPreviewClientAction: (param: ExtractInvokePreviewActionParam) => PreviewActionData | undefined;
|
|
@@ -15,9 +15,3 @@ export type ExtractActionsParam = {
|
|
|
15
15
|
fireEvent?: FireEventFunction;
|
|
16
16
|
};
|
|
17
17
|
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, response, url, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
20
|
-
* Replaced with extractFlexibleCardActions()
|
|
21
|
-
*/
|
|
22
|
-
declare const extractActions: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, id?: string, aiSummaryConfig?: AISummaryConfig) => FlexibleUiActions | undefined;
|
|
23
|
-
export default extractActions;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type JsonLd } from 'json-ld-types';
|
|
2
2
|
import { type InvokeClientOpts, type InvokeServerOpts } from '../../model/invoke-opts';
|
|
3
3
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
4
|
-
|
|
5
|
-
export declare const useSmartCardActions: (id: string, url: string, analytics: AnalyticsFacade) => {
|
|
4
|
+
export declare const useSmartCardActions: (id: string, url: string) => {
|
|
6
5
|
register: () => Promise<void>;
|
|
7
6
|
reload: () => void;
|
|
8
7
|
authorize: (appearance: CardInnerAppearance) => void;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type FlexibleUiOptions } from '../../view/FlexibleCard/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { FlexibleUiDataContext } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
6
6
|
* underlying elements.
|
|
7
7
|
*/
|
|
8
8
|
export declare const FlexibleUiContext: import("react").Context<FlexibleUiDataContext | undefined>;
|
|
9
9
|
export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
12
|
-
* underlying elements.
|
|
13
|
-
*/
|
|
14
|
-
export declare const FlexibleUiAnalyticsContext: import("react").Context<FlexibleAnalyticsContextType | undefined>;
|
|
15
|
-
export declare const useFlexibleUiAnalyticsContext: () => FlexibleAnalyticsContextType | undefined;
|
|
16
10
|
/**
|
|
17
11
|
* This provides the ui options that will be used by Smart Links Flexible UI
|
|
18
12
|
* to render its underlying elements.
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
2
2
|
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
3
3
|
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
4
|
-
import { type AnalyticsOrigin } from '../../utils/types';
|
|
5
|
-
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
6
|
-
import { type AnalyticsFacade } from '../analytics';
|
|
7
4
|
import { type InvokeClientActionProps } from '../hooks/use-invoke-client-action/types';
|
|
8
5
|
import { type InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
9
6
|
/**
|
|
@@ -107,7 +104,7 @@ export type FlexibleUiDataContext = {
|
|
|
107
104
|
* @type ViewActionData
|
|
108
105
|
* @see ViewAction
|
|
109
106
|
*/
|
|
110
|
-
viewAction?:
|
|
107
|
+
viewAction?: PreviewActionData;
|
|
111
108
|
/**
|
|
112
109
|
* Contains the information about the latest commit in the repository
|
|
113
110
|
*/
|
|
@@ -252,27 +249,13 @@ export type FlexibleUiActions = {
|
|
|
252
249
|
[InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
|
|
253
250
|
};
|
|
254
251
|
export type PreviewActionData = {
|
|
255
|
-
invokeAction
|
|
256
|
-
downloadUrl?: string;
|
|
257
|
-
linkIcon?: Icon;
|
|
258
|
-
providerName?: string;
|
|
259
|
-
origin?: AnalyticsOrigin;
|
|
260
|
-
src?: string;
|
|
261
|
-
title?: string;
|
|
262
|
-
url?: string;
|
|
263
|
-
isSupportTheming?: boolean;
|
|
264
|
-
isTrusted?: boolean;
|
|
265
|
-
};
|
|
266
|
-
export type ViewActionData = {
|
|
267
|
-
viewUrl?: string;
|
|
252
|
+
invokeAction: InvokeClientActionProps;
|
|
268
253
|
};
|
|
269
254
|
export type DownloadActionData = {
|
|
270
|
-
invokeAction
|
|
271
|
-
downloadUrl?: string;
|
|
255
|
+
invokeAction: InvokeClientActionProps;
|
|
272
256
|
};
|
|
273
257
|
export type CopyLinkActionData = {
|
|
274
|
-
invokeAction
|
|
275
|
-
url?: string;
|
|
258
|
+
invokeAction: InvokeClientActionProps;
|
|
276
259
|
};
|
|
277
260
|
export type AISummaryActionData = {
|
|
278
261
|
url: string;
|
|
@@ -290,10 +273,6 @@ export type AutomationActionData = {
|
|
|
290
273
|
export type ViewRelatedLinksActionData = {
|
|
291
274
|
ari: string;
|
|
292
275
|
};
|
|
293
|
-
export type FlexibleAnalyticsContextType = AnalyticsFacade & {
|
|
294
|
-
display?: CardInnerAppearance;
|
|
295
|
-
extensionKey?: string;
|
|
296
|
-
};
|
|
297
276
|
export type ServerActionProp<TValue> = {
|
|
298
277
|
action: InvokeRequestWithCardDetails;
|
|
299
278
|
value?: TValue;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
|
|
2
|
-
import { type PreviewActionData } from '../../flexible-ui-context/types';
|
|
3
2
|
import type { InvokeClientActionProps } from '../use-invoke-client-action/types';
|
|
4
3
|
/**
|
|
5
4
|
* Additional details for invoke function that may be required for component
|
|
@@ -17,11 +16,6 @@ export type CardDetails = {
|
|
|
17
16
|
* The URL of the Smart Link
|
|
18
17
|
*/
|
|
19
18
|
url?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Preview Modal information. If present, will be used to render an embed modal on an error link click
|
|
22
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
23
|
-
*/
|
|
24
|
-
previewData?: PreviewActionData | null;
|
|
25
19
|
};
|
|
26
20
|
/**
|
|
27
21
|
* Additional details to reload smart links
|
|
@@ -2,5 +2,5 @@ import { type InvokeClientActionHandler, type UseInvokeClientActionProps } from
|
|
|
2
2
|
/**
|
|
3
3
|
* Invoke client action such as preview, download and open link
|
|
4
4
|
*/
|
|
5
|
-
declare const useInvokeClientAction: ({
|
|
5
|
+
declare const useInvokeClientAction: ({ fireEvent: fireEventProp, }: UseInvokeClientActionProps) => InvokeClientActionHandler;
|
|
6
6
|
export default useInvokeClientAction;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { type FireEventFunction } from '../../../common/analytics/types';
|
|
2
2
|
import { type CardInnerAppearance } from '../../../view/Card/types';
|
|
3
|
-
import { type AnalyticsFacade } from '../../analytics';
|
|
4
3
|
export type UseInvokeClientActionProps = {
|
|
5
|
-
/**
|
|
6
|
-
* Analytics object
|
|
7
|
-
*/
|
|
8
|
-
analytics?: AnalyticsFacade;
|
|
9
4
|
/**
|
|
10
5
|
* A function to dispatch analytics events.
|
|
11
6
|
*/
|
|
@@ -38,7 +33,6 @@ export type InvokeClientActionProps = {
|
|
|
38
33
|
/**
|
|
39
34
|
* Link provider extension key
|
|
40
35
|
* This value should have already been set in analytics object through
|
|
41
|
-
* useSmartLinkAnalytics() and/or into the analytic context.
|
|
42
36
|
*/
|
|
43
37
|
extensionKey?: string;
|
|
44
38
|
/**
|
|
@@ -8,28 +8,6 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
8
8
|
loadMetadata: () => Promise<void> | undefined;
|
|
9
9
|
};
|
|
10
10
|
config: (import("@atlaskit/link-provider").CardProviderCacheOpts & import("@atlaskit/link-provider").CardAuthFlowOpts) | undefined;
|
|
11
|
-
analytics: {
|
|
12
|
-
ui: {
|
|
13
|
-
buttonClickedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
14
|
-
actionSubjectId: string;
|
|
15
|
-
}) => void;
|
|
16
|
-
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
17
|
-
modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
18
|
-
actionSubjectId: string;
|
|
19
|
-
}) => void;
|
|
20
|
-
renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
|
|
21
|
-
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
|
|
22
|
-
};
|
|
23
|
-
operational: {
|
|
24
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|
|
25
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeFailedEventProps) => void;
|
|
26
|
-
};
|
|
27
|
-
screen: {
|
|
28
|
-
modalViewedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
29
|
-
name: "embedPreviewModal";
|
|
30
|
-
}) => void;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
11
|
renderers: import("@atlaskit/link-provider").CardProviderRenderers | undefined;
|
|
34
12
|
error: Error | null;
|
|
35
13
|
};
|
|
@@ -2,4 +2,3 @@ export { SmartCardContext, SmartCardProvider, useSmartLinkContext } from '@atlas
|
|
|
2
2
|
export type { CardContext, ProviderProps } from '@atlaskit/link-provider';
|
|
3
3
|
export type { CardType } from '@atlaskit/linking-common';
|
|
4
4
|
export { useSmartLink, usePrefetch } from './hooks';
|
|
5
|
-
export { useSmartLinkAnalytics } from './analytics';
|
|
@@ -24,5 +24,5 @@ export declare const useSmartLinkAnalyticsContext: ({ display, id, source, url,
|
|
|
24
24
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
25
25
|
* and the link state in the store
|
|
26
26
|
*/
|
|
27
|
-
export declare const SmartLinkAnalyticsContext: (
|
|
27
|
+
export declare const SmartLinkAnalyticsContext: ({ children, display, id, source, url, }: SmartLinkAnalyticsContextProps) => JSX.Element;
|
|
28
28
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
3
3
|
import { type AnalyticsPayload } from '../types';
|
|
4
|
-
import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps } from './types';
|
|
5
4
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
6
5
|
export declare const context: {
|
|
7
6
|
componentName: string;
|
|
@@ -20,8 +19,3 @@ export declare class SmartLinkEvents {
|
|
|
20
19
|
insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
|
|
21
20
|
}
|
|
22
21
|
export declare const fireSmartLinkEvent: (payload: AnalyticsPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent) => void;
|
|
23
|
-
export declare const invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => AnalyticsPayload;
|
|
24
|
-
export declare const invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => AnalyticsPayload;
|
|
25
|
-
export declare const uiActionClickedEvent: ({ id, actionType, extensionKey, display, definitionId, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => AnalyticsPayload;
|
|
26
|
-
export declare const uiRenderSuccessEvent: ({ display, status, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, canBeDatasource, }: UiRenderSuccessEventProps) => AnalyticsPayload;
|
|
27
|
-
export declare const uiRenderFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => AnalyticsPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent
|
|
1
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent } from './analytics';
|
|
@@ -1,47 +1,5 @@
|
|
|
1
|
-
import { type ErrorInfo } from 'react';
|
|
2
|
-
import { type CardType } from '@atlaskit/linking-common';
|
|
3
|
-
import { type InvokeType } from '../../model/invoke-opts';
|
|
4
|
-
import { type CardInnerAppearance } from '../../view/Card/types';
|
|
5
1
|
export type DestinationProduct = 'jira' | 'confluence' | 'bitbucket' | 'trello';
|
|
6
2
|
export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
|
|
7
|
-
export interface CommonEventProps {
|
|
8
|
-
id?: string;
|
|
9
|
-
definitionId?: string;
|
|
10
|
-
extensionKey?: string;
|
|
11
|
-
resourceType?: string;
|
|
12
|
-
destinatinoObjectType?: string;
|
|
13
|
-
destinationSubproduct?: DestinationSubproduct | string;
|
|
14
|
-
destinationProduct?: DestinationProduct | string;
|
|
15
|
-
location?: string;
|
|
16
|
-
statusDetails?: string;
|
|
17
|
-
}
|
|
18
|
-
export type InvokeSucceededEventProps = CommonEventProps & {
|
|
19
|
-
id?: string;
|
|
20
|
-
actionType: string;
|
|
21
|
-
display?: CardInnerAppearance;
|
|
22
|
-
};
|
|
23
|
-
export type InvokeFailedEventProps = CommonEventProps & {
|
|
24
|
-
id?: string;
|
|
25
|
-
actionType: string;
|
|
26
|
-
display?: CardInnerAppearance;
|
|
27
|
-
reason: string;
|
|
28
|
-
};
|
|
29
|
-
export type UiActionClickedEventProps = CommonEventProps & {
|
|
30
|
-
id?: string;
|
|
31
|
-
display?: CardInnerAppearance;
|
|
32
|
-
actionType: string;
|
|
33
|
-
invokeType?: InvokeType;
|
|
34
|
-
};
|
|
35
|
-
export type UiRenderSuccessEventProps = CommonEventProps & {
|
|
36
|
-
display: CardInnerAppearance;
|
|
37
|
-
status: CardType;
|
|
38
|
-
canBeDatasource?: boolean;
|
|
39
|
-
};
|
|
40
|
-
export type UiRenderFailedEventProps = CommonEventProps & {
|
|
41
|
-
display: CardInnerAppearance;
|
|
42
|
-
error: Error;
|
|
43
|
-
errorInfo: ErrorInfo;
|
|
44
|
-
};
|
|
45
3
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
46
4
|
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'unknown';
|
|
47
5
|
export type UiLinkClickedEventProps = {
|
|
@@ -89,25 +89,3 @@ export declare const mocks: {
|
|
|
89
89
|
export declare const fakeResponse: () => Promise<JsonLd.Response<JsonLd.Data.BaseData>>;
|
|
90
90
|
export declare const fakeFactory: any;
|
|
91
91
|
export declare const waitFor: (time?: number) => Promise<unknown>;
|
|
92
|
-
export declare const mockAnalytics: {
|
|
93
|
-
ui: {
|
|
94
|
-
buttonClickedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
95
|
-
actionSubjectId: string;
|
|
96
|
-
}) => void;
|
|
97
|
-
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
98
|
-
modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
99
|
-
actionSubjectId: string;
|
|
100
|
-
}) => void;
|
|
101
|
-
renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("./analytics/types").UiRenderSuccessEventProps) => void;
|
|
102
|
-
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiRenderFailedEventProps) => void;
|
|
103
|
-
};
|
|
104
|
-
operational: {
|
|
105
|
-
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeSucceededEventProps) => void;
|
|
106
|
-
invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").InvokeFailedEventProps) => void;
|
|
107
|
-
};
|
|
108
|
-
screen: {
|
|
109
|
-
modalViewedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
110
|
-
name: "embedPreviewModal";
|
|
111
|
-
}) => void;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type BlockCardProps } from './types';
|
|
3
|
-
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId,
|
|
3
|
+
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, }: BlockCardProps) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type CardAuthFlowOpts, type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
4
3
|
import { type CardState } from '../../state/types';
|
|
5
4
|
import { type CardActionOptions, type OnResolveCallback } from '../Card/types';
|
|
6
5
|
import { type OnErrorCallback } from '../types';
|
|
@@ -17,5 +16,4 @@ export type BlockCardProps = {
|
|
|
17
16
|
testId?: string;
|
|
18
17
|
actionOptions?: CardActionOptions;
|
|
19
18
|
renderers?: CardProviderRenderers;
|
|
20
|
-
analytics: AnalyticsFacade;
|
|
21
19
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type FlexibleCardProps } from '../../FlexibleCard/types';
|
|
2
|
-
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, '
|
|
2
|
+
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url'>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type EventHandler, type KeyboardEvent, type MouseEvent } from 'react';
|
|
2
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
3
2
|
import type { CardActionOptions, CardAppearance, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
4
3
|
import { type FrameStyle } from '../EmbedCard/types';
|
|
5
4
|
import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
@@ -27,7 +26,6 @@ export type CardWithUrlContentProps = {
|
|
|
27
26
|
children?: React.ReactNode;
|
|
28
27
|
showHoverPreview?: boolean;
|
|
29
28
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
30
|
-
analyticsEvents?: AnalyticsFacade;
|
|
31
29
|
placeholder?: string;
|
|
32
30
|
removeTextHighlightingFromTitle?: boolean;
|
|
33
31
|
resolvingPlaceholder?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
3
|
import { type InvokeHandler } from '../../model/invoke-handler';
|
|
4
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
5
4
|
import { type CardState } from '../../state/types';
|
|
6
5
|
import type { CardActionOptions, CardPlatform, EmbedIframeUrlType, OnResolveCallback } from '../Card/types';
|
|
7
6
|
import { type OnErrorCallback } from '../types';
|
|
@@ -11,7 +10,6 @@ export type EmbedCardProps = {
|
|
|
11
10
|
handleAuthorize: (() => void) | undefined;
|
|
12
11
|
handleErrorRetry: () => void;
|
|
13
12
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
14
|
-
analytics: AnalyticsFacade;
|
|
15
13
|
handleInvoke: InvokeHandler;
|
|
16
14
|
id?: string;
|
|
17
15
|
isSelected?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type UnauthorizedViewProps } from './types';
|
|
3
|
-
declare const UnauthorizedView: ({
|
|
3
|
+
declare const UnauthorizedView: ({ context, extensionKey, isProductIntegrationSupported, onAuthorize, testId, ...unresolvedViewProps }: UnauthorizedViewProps) => JSX.Element;
|
|
4
4
|
export default UnauthorizedView;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AnalyticsFacade } from '../../../../state/analytics';
|
|
2
1
|
import type { ContextViewModel } from '../../types';
|
|
3
2
|
import type { UnresolvedViewCardProps } from '../unresolved-view/types';
|
|
4
3
|
export type UnauthorizedViewProps = UnresolvedViewCardProps & {
|
|
5
|
-
analytics: AnalyticsFacade;
|
|
6
4
|
context?: ContextViewModel;
|
|
7
5
|
extensionKey?: string;
|
|
8
6
|
isProductIntegrationSupported?: boolean;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmbedModalSize } from './types';
|
|
3
3
|
declare const _default: (props: {
|
|
4
|
-
download?: string | undefined;
|
|
5
4
|
fireEvent?: (<K extends keyof import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes>(eventKey: K, ...params_1: undefined extends import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K] ? [param?: import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K] | undefined] : [param: import("../../common/analytics/generated/analytics.types").AnalyticsEventAttributes[K]]) => void) | undefined;
|
|
6
|
-
icon?: import("../common/Icon").IconProps | undefined;
|
|
7
5
|
invokeDownloadAction?: import("../../state/hooks/use-invoke-client-action/types").InvokeClientActionProps | undefined;
|
|
8
6
|
invokeViewAction?: import("../../state/hooks/use-invoke-client-action/types").InvokeClientActionProps | undefined;
|
|
9
7
|
iframeName: string;
|
|
@@ -2,7 +2,6 @@ import { type ErrorInfo } from 'react';
|
|
|
2
2
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
3
3
|
import { type Icon } from '../../state/flexible-ui-context/types';
|
|
4
4
|
import { type InvokeClientActionProps } from '../../state/hooks/use-invoke-client-action/types';
|
|
5
|
-
import { type IconProps } from '../common/Icon';
|
|
6
5
|
import { type WithAnalytics } from './components/analytics/types';
|
|
7
6
|
export declare enum EmbedModalSize {
|
|
8
7
|
Large = "large",
|
|
@@ -13,9 +12,7 @@ export type EmbedModalContext = {
|
|
|
13
12
|
size: EmbedModalSize;
|
|
14
13
|
};
|
|
15
14
|
export type EmbedModalProps = {
|
|
16
|
-
download?: string;
|
|
17
15
|
fireEvent?: FireEventFunction;
|
|
18
|
-
icon?: IconProps;
|
|
19
16
|
invokeDownloadAction?: InvokeClientActionProps;
|
|
20
17
|
invokeViewAction?: InvokeClientActionProps;
|
|
21
18
|
iframeName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { LozengeActionErrorProps } from './types';
|
|
3
|
-
declare const LozengeActionError: ({ errorMessage, testId, maxLineNumber, invokePreviewAction,
|
|
3
|
+
declare const LozengeActionError: ({ errorMessage, testId, maxLineNumber, invokePreviewAction, }: LozengeActionErrorProps) => jsx.JSX.Element;
|
|
4
4
|
export default LozengeActionError;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type PreviewActionData } from '../../../../../../../state/flexible-ui-context/types';
|
|
2
1
|
import { type InvokeClientActionProps } from '../../../../../../../state/hooks/use-invoke-client-action/types';
|
|
3
2
|
import { type MessageProps } from '../../../../types';
|
|
4
3
|
export type LozengeActionErrorProps = {
|
|
@@ -22,11 +21,6 @@ export type LozengeActionErrorProps = {
|
|
|
22
21
|
* The url of the link. Used in reload functionality
|
|
23
22
|
*/
|
|
24
23
|
url?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Preview Modal information. If present, will be used to render an embed modal on an error link click
|
|
27
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
28
|
-
*/
|
|
29
|
-
previewData?: PreviewActionData | null;
|
|
30
24
|
};
|
|
31
25
|
export declare const LozengeActionErrorMessages: {
|
|
32
26
|
noData: {
|
|
@@ -4,8 +4,6 @@ import { type IntlShape, type MessageDescriptor } from 'react-intl-next';
|
|
|
4
4
|
import { type Spacing } from '@atlaskit/button';
|
|
5
5
|
import type { Space } from '@atlaskit/primitives';
|
|
6
6
|
import { SmartLinkSize } from '../../../constants';
|
|
7
|
-
import { type PreviewActionData } from '../../../state/flexible-ui-context/types';
|
|
8
|
-
import { type EmbedModalProps } from '../../EmbedModal/types';
|
|
9
7
|
import { type MessageProps } from './types';
|
|
10
8
|
export declare const sizeToButtonSpacing: Record<SmartLinkSize, Spacing>;
|
|
11
9
|
export declare const getFormattedMessage: (message?: MessageProps) => JSX.Element | undefined;
|
|
@@ -29,7 +27,3 @@ export declare const getPrimitivesInlineSpaceBySize: (size: SmartLinkSize) => Sp
|
|
|
29
27
|
export declare const getPrimitivesPaddingSpaceBySize: (size: SmartLinkSize) => Space;
|
|
30
28
|
export declare const getTruncateStyles: (maxLines: number, lineHeight?: string, wordBreak?: 'break-word' | 'break-all') => SerializedStyles;
|
|
31
29
|
export declare const hasWhiteSpace: (str: string) => boolean;
|
|
32
|
-
/**
|
|
33
|
-
* TODO: Remove on cleanup of platform-smart-card-migrate-embed-modal-analytics
|
|
34
|
-
*/
|
|
35
|
-
export declare const openEmbedModalWithFlexibleUiIcon: ({ linkIcon, ...props }: Partial<EmbedModalProps> & Pick<PreviewActionData, 'linkIcon'>) => Promise<void>;
|
|
@@ -6,5 +6,5 @@ import { type FlexibleCardProps } from './types';
|
|
|
6
6
|
* Note: TitleBlock is mandatory for a Flexible Card to render.
|
|
7
7
|
* @see Container
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleCard: ({
|
|
9
|
+
declare const FlexibleCard: ({ appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -5,7 +5,6 @@ import { type CardProviderRenderers } from '@atlaskit/link-provider';
|
|
|
5
5
|
import { type CardState, type LinkingPlatformFeatureFlags } from '@atlaskit/linking-common';
|
|
6
6
|
import { type FireEventFunction } from '../../common/analytics/types';
|
|
7
7
|
import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
|
|
8
|
-
import { type AnalyticsFacade } from '../../state/analytics';
|
|
9
8
|
import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
|
|
10
9
|
import { type ResolveFunction } from '../../state/hooks/use-resolve';
|
|
11
10
|
import { type AnalyticsOrigin } from '../../utils/types';
|
|
@@ -17,11 +16,6 @@ export type FlexibleCardProps = {
|
|
|
17
16
|
* @internal A unique ID for a Smart Link.
|
|
18
17
|
*/
|
|
19
18
|
id?: string;
|
|
20
|
-
/**
|
|
21
|
-
* An analytics facade object which will be used to send analytics.
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
analytics?: AnalyticsFacade;
|
|
25
19
|
/**
|
|
26
20
|
* Determines the appearance of the Smart Link.
|
|
27
21
|
* @internal
|