@atlaskit/smart-card 18.0.12 → 18.0.15
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 +25 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +9 -0
- package/dist/cjs/state/flexible-ui-context/index.js +4 -0
- package/dist/cjs/utils/analytics/analytics.js +52 -2
- package/dist/cjs/utils/analytics/index.js +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +4 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +26 -4
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +39 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +92 -17
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +45 -9
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -12
- package/dist/cjs/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +7 -3
- package/dist/cjs/view/FlexibleCard/index.js +6 -0
- package/dist/cjs/view/HoverCard/index.js +48 -10
- package/dist/cjs/view/HoverCard/styled.js +3 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -2
- package/dist/es2019/state/flexible-ui-context/index.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +35 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +4 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +37 -4
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +31 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +77 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +35 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -11
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +8 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +11 -4
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +5 -2
- package/dist/es2019/view/FlexibleCard/index.js +6 -0
- package/dist/es2019/view/HoverCard/index.js +40 -10
- package/dist/es2019/view/HoverCard/styled.js +6 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +10 -1
- package/dist/esm/state/flexible-ui-context/index.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +41 -0
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +4 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +25 -4
- package/dist/esm/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +33 -16
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +79 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +39 -8
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +22 -11
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +5 -3
- package/dist/esm/view/FlexibleCard/index.js +6 -0
- package/dist/esm/view/HoverCard/index.js +42 -10
- package/dist/esm/view/HoverCard/styled.js +2 -1
- package/dist/types/client/errors.d.ts +3 -2
- package/dist/types/extractors/block/index.d.ts +2 -2
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +46 -66
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +1 -1
- package/dist/types/extractors/common/title-prefix/extractTitlePrefix.d.ts +2 -1
- package/dist/types/extractors/embed/index.d.ts +1 -1
- package/dist/types/extractors/flexible/icon/extract-url-icon.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/types.d.ts +102 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -0
- package/dist/types/utils/analytics/analytics.d.ts +5 -1
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/view/BlockCard/utils/handlers.d.ts +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/EmbedCard/components/styled.d.ts +9 -9
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +4 -2
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +9 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +7 -3
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +10 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +7 -5
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +5 -1
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +77 -0
- package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/media/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/elements/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/index.d.ts +6 -0
- package/dist/types/view/HoverCard/index.d.ts +3 -2
- package/dist/types/view/HoverCard/types.d.ts +5 -2
- package/dist/types/view/InlineCard/Icon.d.ts +3 -3
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +9 -9
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +3 -3
- package/dist/types/view/InlineCard/styled.d.ts +4 -4
- package/package.json +8 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/utils.js +0 -105
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/utils.js +0 -71
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/utils.js +0 -76
- package/dist/types/view/FlexibleCard/components/blocks/title-block/utils.d.ts +0 -11
|
@@ -11,9 +11,18 @@ import { SmartLinkSize, ActionName } from '../../constants';
|
|
|
11
11
|
import { useSmartLinkActions } from '../../state/hooks-external/useSmartLinkActions';
|
|
12
12
|
import { HoverCardContainer } from './styled';
|
|
13
13
|
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
14
|
-
|
|
14
|
+
import { withAnalyticsEvents, withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
15
|
+
import { fireSmartLinkEvent } from '../../utils/analytics';
|
|
16
|
+
import { useSmartCardState as useLinkState } from '../../state/store';
|
|
17
|
+
import { useSmartLinkAnalytics } from '../../state/analytics';
|
|
18
|
+
import { getExtensionKey, getDefinitionId } from '../../state/helpers';
|
|
19
|
+
export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
15
20
|
var children = _ref.children,
|
|
16
|
-
url = _ref.url
|
|
21
|
+
url = _ref.url,
|
|
22
|
+
createAnalyticsEvent = _ref.createAnalyticsEvent;
|
|
23
|
+
var analyticsHandler = useCallback(function (analyticsPayload) {
|
|
24
|
+
fireSmartLinkEvent(analyticsPayload, createAnalyticsEvent);
|
|
25
|
+
}, [createAnalyticsEvent]);
|
|
17
26
|
var delay = 300;
|
|
18
27
|
|
|
19
28
|
var _React$useState = React.useState(false),
|
|
@@ -23,26 +32,45 @@ export var HoverCard = function HoverCard(_ref) {
|
|
|
23
32
|
|
|
24
33
|
var fadeOutTimeoutId = useRef();
|
|
25
34
|
var fadeInTimeoutId = useRef();
|
|
35
|
+
var cardOpenTime = useRef();
|
|
36
|
+
var linkState = useLinkState(url);
|
|
37
|
+
var analytics = useSmartLinkAnalytics(analyticsHandler);
|
|
38
|
+
var extensionKey = useMemo(function () {
|
|
39
|
+
return getExtensionKey(linkState.details);
|
|
40
|
+
}, [linkState]);
|
|
41
|
+
var definitionId = useMemo(function () {
|
|
42
|
+
return getDefinitionId(linkState.details);
|
|
43
|
+
}, [linkState]);
|
|
26
44
|
var initHideCard = useCallback(function () {
|
|
27
45
|
if (fadeInTimeoutId.current) {
|
|
28
46
|
clearTimeout(fadeInTimeoutId.current);
|
|
29
47
|
}
|
|
30
48
|
|
|
31
49
|
fadeOutTimeoutId.current = setTimeout(function () {
|
|
50
|
+
//Check its previously open to avoid firing events when moving between the child and hover card components
|
|
51
|
+
if (isOpen === true && cardOpenTime.current) {
|
|
52
|
+
var hoverTime = Date.now() - cardOpenTime.current;
|
|
53
|
+
analytics.ui.hoverCardDismissedEvent('card', hoverTime, definitionId, extensionKey);
|
|
54
|
+
}
|
|
55
|
+
|
|
32
56
|
setIsOpen(false);
|
|
33
57
|
}, delay);
|
|
34
|
-
}, [delay]);
|
|
58
|
+
}, [delay, isOpen, definitionId, extensionKey, analytics]);
|
|
35
59
|
var initShowCard = useCallback(function () {
|
|
36
60
|
if (fadeOutTimeoutId.current) {
|
|
37
61
|
clearTimeout(fadeOutTimeoutId.current);
|
|
38
62
|
}
|
|
39
63
|
|
|
40
64
|
fadeInTimeoutId.current = setTimeout(function () {
|
|
65
|
+
//Check if its previously closed to avoid firing events when moving between the child and hover card components
|
|
66
|
+
if (isOpen === false) {
|
|
67
|
+
cardOpenTime.current = Date.now();
|
|
68
|
+
analytics.ui.hoverCardViewedEvent('card', definitionId, extensionKey);
|
|
69
|
+
}
|
|
70
|
+
|
|
41
71
|
setIsOpen(true);
|
|
42
72
|
}, delay);
|
|
43
|
-
}, [delay
|
|
44
|
-
|
|
45
|
-
var analyticsHandler = useCallback(function () {}, []);
|
|
73
|
+
}, [delay, isOpen, definitionId, extensionKey, analytics]);
|
|
46
74
|
var linkActions = useSmartLinkActions({
|
|
47
75
|
url: url,
|
|
48
76
|
appearance: 'block',
|
|
@@ -69,11 +97,12 @@ export var HoverCard = function HoverCard(_ref) {
|
|
|
69
97
|
}),
|
|
70
98
|
iconPosition: 'before',
|
|
71
99
|
onClick: function onClick() {
|
|
72
|
-
|
|
100
|
+
window.open(url, '_blank');
|
|
101
|
+
analytics.ui.hoverCardOpenLinkClickedEvent('card', definitionId, extensionKey);
|
|
73
102
|
},
|
|
74
103
|
testId: 'hover-card-open-button'
|
|
75
104
|
};
|
|
76
|
-
}, [url]);
|
|
105
|
+
}, [url, definitionId, extensionKey, analytics]);
|
|
77
106
|
|
|
78
107
|
var cardComponent = function cardComponent() {
|
|
79
108
|
return jsx("div", {
|
|
@@ -101,7 +130,7 @@ export var HoverCard = function HoverCard(_ref) {
|
|
|
101
130
|
testId: "hover-card",
|
|
102
131
|
isOpen: isOpen,
|
|
103
132
|
onClose: onClose,
|
|
104
|
-
placement: "bottom",
|
|
133
|
+
placement: "bottom-start",
|
|
105
134
|
content: cardComponent,
|
|
106
135
|
trigger: function trigger(triggerProps) {
|
|
107
136
|
return jsx("span", _extends({}, triggerProps, {
|
|
@@ -110,4 +139,7 @@ export var HoverCard = function HoverCard(_ref) {
|
|
|
110
139
|
}), children);
|
|
111
140
|
}
|
|
112
141
|
});
|
|
113
|
-
};
|
|
142
|
+
};
|
|
143
|
+
export var HoverCard = withAnalyticsContext({
|
|
144
|
+
source: 'smartLinkPreviewHoverCard'
|
|
145
|
+
})(withAnalyticsEvents()(HoverCardComponent));
|
|
@@ -3,4 +3,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/core';
|
|
6
|
-
|
|
6
|
+
import { loadingPlaceholderClassName } from '../../index';
|
|
7
|
+
export var HoverCardContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: none;\n border-width: 0;\n max-width: 350px;\n padding: 0;\n\n .", " {\n display: none;\n }\n"])), loadingPlaceholderClassName);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ErrorType } from './types/responses';
|
|
1
2
|
export declare type APIErrorKind = 'fatal' | 'auth' | 'error' | 'fallback';
|
|
2
3
|
export declare class APIError extends Error {
|
|
3
4
|
readonly kind: APIErrorKind;
|
|
4
5
|
readonly hostname: string;
|
|
5
6
|
readonly message: string;
|
|
6
|
-
readonly type?:
|
|
7
|
-
constructor(kind: APIErrorKind, hostname: string, message: string, type?:
|
|
7
|
+
readonly type?: ErrorType | undefined;
|
|
8
|
+
constructor(kind: APIErrorKind, hostname: string, message: string, type?: ErrorType | undefined);
|
|
8
9
|
}
|
|
@@ -4,6 +4,6 @@ import { ExtractBlockOpts } from './types';
|
|
|
4
4
|
import { CardProviderRenderers } from '../../state/context/types';
|
|
5
5
|
import { BlockCardResolvedViewProps } from '../../view/BlockCard';
|
|
6
6
|
import { ActionProps } from '../../view/BlockCard/components/Action';
|
|
7
|
-
export declare const extractBlockActions: (props: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, opts?: ExtractBlockOpts | undefined, platform?:
|
|
7
|
+
export declare const extractBlockActions: (props: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, opts?: ExtractBlockOpts | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => ActionProps[];
|
|
8
8
|
export declare const extractBlockUsers: (jsonLd: JsonLd.Data.BaseData) => LinkPerson[] | undefined;
|
|
9
|
-
export declare const extractBlockProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, opts?: ExtractBlockOpts | undefined, renderers?: CardProviderRenderers | undefined, platform?:
|
|
9
|
+
export declare const extractBlockProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, opts?: ExtractBlockOpts | undefined, renderers?: CardProviderRenderers | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => BlockCardResolvedViewProps;
|
|
@@ -27,11 +27,11 @@ export declare const TEST_ASSIGN_ACTION: JsonLd.Data.BaseData['schema:potentialA
|
|
|
27
27
|
export declare const TEST_NO_ID_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
|
|
28
28
|
export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
29
29
|
'schema:potentialAction': any[];
|
|
30
|
-
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (
|
|
30
|
+
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
|
|
31
31
|
'schema:fileFormat'?: string | undefined;
|
|
32
32
|
'atlassian:fileSize'?: number | undefined;
|
|
33
33
|
'schema:dateCreated'?: string | undefined;
|
|
34
|
-
'atlassian:updatedBy'?:
|
|
34
|
+
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | undefined;
|
|
35
35
|
'schema:commentCount'?: number | undefined;
|
|
36
36
|
'atlassian:isDeleted'?: boolean | undefined;
|
|
37
37
|
'atlassian:dateViewed'?: string | undefined;
|
|
@@ -44,38 +44,28 @@ export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
|
44
44
|
'atlassian:visitUrl'?: string | undefined;
|
|
45
45
|
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
46
46
|
'@id'?: string | undefined;
|
|
47
|
-
attachment?:
|
|
48
|
-
attributedTo?: (
|
|
49
|
-
actor?:
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
context?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
66
|
-
generator?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
67
|
-
icon?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
68
|
-
image?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
69
|
-
inReplyTo?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
70
|
-
location?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
71
|
-
oneOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
72
|
-
anyOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
73
|
-
closed?: string | boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
74
|
-
preview?: string | (JsonLd.Primitives.Object<any> & JsonLd.Primitives.PreviewExtension) | (JsonLd.Primitives.LinkModel & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
47
|
+
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
48
|
+
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
49
|
+
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
50
|
+
}> | undefined;
|
|
51
|
+
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
52
|
+
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
53
|
+
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
54
|
+
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
55
|
+
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
56
|
+
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
57
|
+
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
58
|
+
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
59
|
+
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
60
|
+
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
61
|
+
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
62
|
+
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
63
|
+
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
64
|
+
preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
75
65
|
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
76
|
-
tag?:
|
|
77
|
-
to?:
|
|
78
|
-
url?:
|
|
66
|
+
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
67
|
+
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
68
|
+
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
79
69
|
content?: string | undefined;
|
|
80
70
|
contentMap?: Record<string, string> | undefined;
|
|
81
71
|
name?: string | undefined;
|
|
@@ -92,14 +82,14 @@ export declare const TEST_DOCUMENT_WITH_ACTIONS: {
|
|
|
92
82
|
export declare const PREVIEW: JsonLd.Data.BaseData['preview'];
|
|
93
83
|
export declare const TEST_DOCUMENT_WITH_PREVIEW: {
|
|
94
84
|
preview: JsonLd.Primitives.LinkModel & JsonLd.Primitives.PreviewExtension;
|
|
95
|
-
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (
|
|
85
|
+
'@type': "Collection" | "Document" | "schema:BlogPosting" | "schema:TextDigitalDocument" | "schema:DigitalDocument" | "schema:PresentationDigitalDocument" | "schema:SpreadsheetDigitalDocument" | "atlassian:UndefinedLink" | ("Object" | "Document")[] | (JsonLd.Data.DocumentChildType | JsonLd.Data.DocumentParentType)[] | ("Document" | "schema:DigitalDocument")[];
|
|
96
86
|
'schema:fileFormat'?: string | undefined;
|
|
97
87
|
'atlassian:fileSize'?: number | undefined;
|
|
98
88
|
'schema:dateCreated'?: string | undefined;
|
|
99
|
-
'atlassian:updatedBy'?:
|
|
89
|
+
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | undefined;
|
|
100
90
|
'schema:commentCount'?: number | undefined;
|
|
101
91
|
'atlassian:isDeleted'?: boolean | undefined;
|
|
102
|
-
'schema:potentialAction'?:
|
|
92
|
+
'schema:potentialAction'?: JsonLd.Primitives.Property<JsonLd.Data.DocumentAction> | undefined;
|
|
103
93
|
'atlassian:dateViewed'?: string | undefined;
|
|
104
94
|
'atlassian:reactCount'?: number | undefined;
|
|
105
95
|
'atlassian:state'?: string | undefined;
|
|
@@ -110,37 +100,27 @@ export declare const TEST_DOCUMENT_WITH_PREVIEW: {
|
|
|
110
100
|
'atlassian:visitUrl'?: string | undefined;
|
|
111
101
|
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
112
102
|
'@id'?: string | undefined;
|
|
113
|
-
attachment?:
|
|
114
|
-
attributedTo?: (
|
|
115
|
-
actor?:
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
cc?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
131
|
-
context?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
132
|
-
generator?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
133
|
-
icon?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
134
|
-
image?: string | JsonLd.Primitives.LinkModel | JsonLd.Primitives.Image | undefined;
|
|
135
|
-
inReplyTo?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
136
|
-
location?: string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
137
|
-
oneOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
138
|
-
anyOf?: (string | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel)[] | undefined;
|
|
139
|
-
closed?: string | boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel | undefined;
|
|
103
|
+
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
104
|
+
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
105
|
+
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
106
|
+
}> | undefined;
|
|
107
|
+
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
108
|
+
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
109
|
+
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
110
|
+
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
111
|
+
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
112
|
+
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
113
|
+
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
114
|
+
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
115
|
+
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
116
|
+
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
117
|
+
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
118
|
+
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
119
|
+
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
140
120
|
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
141
|
-
tag?:
|
|
142
|
-
to?:
|
|
143
|
-
url?:
|
|
121
|
+
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
122
|
+
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
123
|
+
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
144
124
|
content?: string | undefined;
|
|
145
125
|
contentMap?: Record<string, string> | undefined;
|
|
146
126
|
name?: string | undefined;
|
|
@@ -2,4 +2,4 @@ import { JsonLd } from 'json-ld-types';
|
|
|
2
2
|
import { InvokeHandler } from '../../../model/invoke-handler';
|
|
3
3
|
import { AnalyticsHandler } from '../../../utils/types';
|
|
4
4
|
import { BlockCardResolvedViewProps } from '../../../view/BlockCard';
|
|
5
|
-
export declare const extractPreviewAction: (extensionKey: string | undefined, viewProps: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, handleInvoke: InvokeHandler, handleAnalytics: AnalyticsHandler, testId?: string | undefined, platform?:
|
|
5
|
+
export declare const extractPreviewAction: (extensionKey: string | undefined, viewProps: BlockCardResolvedViewProps, jsonLd: JsonLd.Data.BaseData, handleInvoke: InvokeHandler, handleAnalytics: AnalyticsHandler, testId?: string | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => import("../../../view/BlockCard/components/Action").ActionProps | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { JsonLd } from 'json-ld-types';
|
|
3
3
|
import { CardProviderRenderers } from '../../../state/context/types';
|
|
4
|
-
|
|
4
|
+
import { CardAppearance } from '../../../view/Card';
|
|
5
|
+
export declare const extractTitlePrefix: (jsonLd: JsonLd.Data.BaseData, renderers?: CardProviderRenderers | undefined, type?: CardAppearance | undefined) => string | React.ReactNode | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
import { EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
3
|
-
export declare const extractEmbedProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, platform?:
|
|
3
|
+
export declare const extractEmbedProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta | undefined, platform?: JsonLd.Primitives.Platforms | undefined) => EmbedCardResolvedViewProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
2
|
import { IconDescriptor } from './types';
|
|
3
|
-
declare const extractUrlIcon: (icon?:
|
|
3
|
+
declare const extractUrlIcon: (icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined, label?: string | undefined) => IconDescriptor | undefined;
|
|
4
4
|
export default extractUrlIcon;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnalyticsHandler } from '../../utils/types';
|
|
2
2
|
import { CardInnerAppearance } from '../../view/Card/types';
|
|
3
|
+
import { PreviewDisplay, PreviewInvokeMethod } from '../../view/HoverCard/types';
|
|
3
4
|
import { CardType } from '../store/types';
|
|
4
5
|
import { APIError } from '../../client/errors';
|
|
5
6
|
import { InvokeType } from '../../model/invoke-opts';
|
|
@@ -9,8 +10,11 @@ export declare const useSmartLinkAnalytics: (dispatchAnalytics: AnalyticsHandler
|
|
|
9
10
|
authAlternateAccountEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
10
11
|
cardClickedEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined) => void;
|
|
11
12
|
actionClickedEvent: (id: string, extensionKey: string, actionType: string, display: CardInnerAppearance, invokeType: InvokeType) => void;
|
|
13
|
+
hoverCardOpenLinkClickedEvent: (previewDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
12
14
|
closedAuthEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
13
15
|
renderSuccessEvent: (display: CardInnerAppearance, id: string, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
16
|
+
hoverCardViewedEvent: (hoverDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
17
|
+
hoverCardDismissedEvent: (hoverDisplay: PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => void;
|
|
14
18
|
};
|
|
15
19
|
operational: {
|
|
16
20
|
resolvedEvent: (id: string, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined) => void;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FlexibleUiDataContext } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
5
|
+
* underlying elements.
|
|
6
|
+
*/
|
|
3
7
|
export declare const FlexibleUiContext: import("react").Context<FlexibleUiDataContext | undefined>;
|
|
4
8
|
export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefined;
|
|
@@ -1,26 +1,128 @@
|
|
|
1
1
|
import { LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
2
|
import { LinkPerson } from '../../extractors/common/person/types';
|
|
3
3
|
import { IconType, MediaType } from '../../constants';
|
|
4
|
+
/**
|
|
5
|
+
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
6
|
+
* underlying elements.
|
|
7
|
+
*/
|
|
4
8
|
export declare type FlexibleUiDataContext = {
|
|
9
|
+
/**
|
|
10
|
+
* An array containing data used to populate the AuthorGroup element.
|
|
11
|
+
* @see AvatarGroup
|
|
12
|
+
*/
|
|
5
13
|
authorGroup?: LinkPerson[];
|
|
14
|
+
/**
|
|
15
|
+
* An array containing a @type {LinkPerson} used to populate the CollaboratorGroup element.
|
|
16
|
+
* @see CollaboratorGroup
|
|
17
|
+
*/
|
|
6
18
|
collaboratorGroup?: LinkPerson[];
|
|
19
|
+
/**
|
|
20
|
+
* Contains the number of comments of the linked resource.
|
|
21
|
+
* @type number
|
|
22
|
+
* @see CommentCount
|
|
23
|
+
*/
|
|
7
24
|
commentCount?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Contains the number of views of the linked resource.
|
|
27
|
+
* @type number
|
|
28
|
+
* @see ViewCount
|
|
29
|
+
*/
|
|
8
30
|
viewCount?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Contains the number of react of the linked resource.
|
|
33
|
+
* @type number
|
|
34
|
+
* @see ReactCount
|
|
35
|
+
*/
|
|
9
36
|
reactCount?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Contains the number of votes of the linked resource.
|
|
39
|
+
* @type number
|
|
40
|
+
* @see VoteCount
|
|
41
|
+
*/
|
|
10
42
|
voteCount?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Contains the name of the entity that created the resource.
|
|
45
|
+
* @type string
|
|
46
|
+
* @see CreatedBy
|
|
47
|
+
*/
|
|
11
48
|
createdBy?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Contains the ISO timestamp of when the resource was created.
|
|
51
|
+
* @type string - ISO Timestamp
|
|
52
|
+
* @see CreatedOn
|
|
53
|
+
*/
|
|
12
54
|
createdOn?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Contains the favicon of the resource.
|
|
57
|
+
* @type Icon
|
|
58
|
+
* @see LinkIcon
|
|
59
|
+
*/
|
|
13
60
|
linkIcon?: Icon;
|
|
61
|
+
/**
|
|
62
|
+
* Contains the name of the entity that last modified the resource.
|
|
63
|
+
* @type string
|
|
64
|
+
* @see ModifiedBy
|
|
65
|
+
*/
|
|
14
66
|
modifiedBy?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Contains the ISO timestamp of when the resource was last modified.
|
|
69
|
+
* @type string - ISO Timestamp
|
|
70
|
+
* @see ModifiedOn
|
|
71
|
+
*/
|
|
15
72
|
modifiedOn?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Contains the preview (typically the thumbnail) of the resource.
|
|
75
|
+
* @type Media
|
|
76
|
+
* @see Preview
|
|
77
|
+
*/
|
|
16
78
|
preview?: Media;
|
|
79
|
+
/**
|
|
80
|
+
* Contains the priority icon of the resource.
|
|
81
|
+
* @type Icon
|
|
82
|
+
* @see Priority
|
|
83
|
+
*/
|
|
17
84
|
priority?: Icon;
|
|
85
|
+
/**
|
|
86
|
+
* Contains the programming language of the resource.
|
|
87
|
+
* @type string
|
|
88
|
+
* @see ProgrammingLanguage
|
|
89
|
+
*/
|
|
18
90
|
programmingLanguage?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Contains the snippet of the resource.
|
|
93
|
+
* @type string
|
|
94
|
+
* @see Snippet
|
|
95
|
+
*/
|
|
19
96
|
snippet?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Contains the number of subscribers of the linked resource.
|
|
99
|
+
* @type number
|
|
100
|
+
* @see SubscriberCount
|
|
101
|
+
*/
|
|
20
102
|
subscriberCount?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Contains the number of subscribers of the linked resource.
|
|
105
|
+
* @type number
|
|
106
|
+
* @see SubscriberCount
|
|
107
|
+
*/
|
|
21
108
|
state?: LinkLozenge;
|
|
109
|
+
/**
|
|
110
|
+
* Contains the Title of the linked resource.
|
|
111
|
+
* @type string
|
|
112
|
+
* @see Title
|
|
113
|
+
*/
|
|
22
114
|
title?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Contains the url of the linked resource.
|
|
117
|
+
* @type string
|
|
118
|
+
* @see Title
|
|
119
|
+
*/
|
|
23
120
|
url?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Contains the provider icon of the linked resource.
|
|
123
|
+
* @type Icon
|
|
124
|
+
* @see Provider
|
|
125
|
+
*/
|
|
24
126
|
provider?: Icon;
|
|
25
127
|
};
|
|
26
128
|
export declare type Icon = {
|
|
@@ -14,8 +14,11 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
|
|
|
14
14
|
authAlternateAccountEvent: (display: import("../../view/Card/types").CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
15
15
|
cardClickedEvent: (display: import("../../view/Card/types").CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined) => void;
|
|
16
16
|
actionClickedEvent: (id: string, extensionKey: string, actionType: string, display: import("../../view/Card/types").CardInnerAppearance, invokeType: import("../../model/invoke-opts").InvokeType) => void;
|
|
17
|
+
hoverCardOpenLinkClickedEvent: (previewDisplay: import("../../view/HoverCard/types").PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: import("../../view/HoverCard/types").PreviewInvokeMethod | undefined) => void;
|
|
17
18
|
closedAuthEvent: (display: import("../../view/Card/types").CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
18
19
|
renderSuccessEvent: (display: import("../../view/Card/types").CardInnerAppearance, id: string, definitionId?: string | undefined, extensionKey?: string | undefined) => void;
|
|
20
|
+
hoverCardViewedEvent: (hoverDisplay: import("../../view/HoverCard/types").PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: import("../../view/HoverCard/types").PreviewInvokeMethod | undefined) => void;
|
|
21
|
+
hoverCardDismissedEvent: (hoverDisplay: import("../../view/HoverCard/types").PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: import("../../view/HoverCard/types").PreviewInvokeMethod | undefined) => void;
|
|
19
22
|
};
|
|
20
23
|
operational: {
|
|
21
24
|
resolvedEvent: (id: string, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined) => void;
|
|
@@ -2,6 +2,7 @@ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import { AnalyticsPayload } from '../types';
|
|
3
3
|
import { ErrorInfo } from 'react';
|
|
4
4
|
import { CardInnerAppearance } from '../../view/Card/types';
|
|
5
|
+
import { PreviewDisplay, PreviewInvokeMethod } from '../../view/HoverCard/types';
|
|
5
6
|
import { APIError } from '../../client/errors';
|
|
6
7
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
7
8
|
export declare const context: {
|
|
@@ -23,8 +24,11 @@ export declare const trackAppAccountConnected: (definitionId?: string | undefine
|
|
|
23
24
|
export declare const uiAuthEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
24
25
|
export declare const uiAuthAlternateAccountEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
25
26
|
export declare const uiCardClickedEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined, isModifierKeyPressed?: boolean | undefined) => AnalyticsPayload;
|
|
26
|
-
export declare const uiActionClickedEvent: (extensionKey: string, actionType: string, display?:
|
|
27
|
+
export declare const uiActionClickedEvent: (extensionKey: string, actionType: string, display?: CardInnerAppearance | undefined) => AnalyticsPayload;
|
|
27
28
|
export declare const uiClosedAuthEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
28
29
|
export declare const screenAuthPopupEvent: (definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
29
30
|
export declare const uiRenderSuccessEvent: (display: CardInnerAppearance, definitionId?: string | undefined, extensionKey?: string | undefined) => AnalyticsPayload;
|
|
30
31
|
export declare const uiRenderFailedEvent: (display: CardInnerAppearance, error: Error, errorInfo: ErrorInfo) => AnalyticsPayload;
|
|
32
|
+
export declare const uiHoverCardViewedEvent: (hoverDisplay: PreviewDisplay, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => AnalyticsPayload;
|
|
33
|
+
export declare const uiHoverCardDismissedEvent: (hoverDisplay: PreviewDisplay, hoverTime: number, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => AnalyticsPayload;
|
|
34
|
+
export declare const uiHoverCardOpenLinkClickedEvent: (previewDisplay: string, definitionId?: string | undefined, extensionKey?: string | undefined, previewInvokeMethod?: PreviewInvokeMethod | undefined) => AnalyticsPayload;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CardType } from '../../state/store/types';
|
|
2
2
|
import { APIError } from '../../client/errors';
|
|
3
3
|
import { AnalyticsPayload } from '../types';
|
|
4
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, } from './analytics';
|
|
4
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, connectSucceededEvent, connectFailedEvent, trackAppAccountConnected, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, screenAuthPopupEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, } from './analytics';
|
|
5
5
|
export declare const instrumentEvent: (id: string, status: CardType, definitionId?: string | undefined, extensionKey?: string | undefined, resourceType?: string | undefined, error?: APIError | undefined) => AnalyticsPayload | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import { CardInnerAppearance } from '../view/Card/types';
|
|
3
|
-
export declare type AnalyticsAction = 'resolved' | 'unresolved' | 'connectSucceeded' | 'connectFailed' | 'connected' | 'clicked' | 'closed' | 'renderFailed' | 'renderWithStatus' | 'renderSuccess' | 'inserted';
|
|
4
|
-
export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal';
|
|
3
|
+
export declare type AnalyticsAction = 'resolved' | 'unresolved' | 'connectSucceeded' | 'connectFailed' | 'connected' | 'clicked' | 'closed' | 'renderFailed' | 'renderWithStatus' | 'renderSuccess' | 'inserted' | 'viewed' | 'dismissed';
|
|
4
|
+
export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal' | 'hoverCard';
|
|
5
5
|
export declare type AnalyticsPayload = GasPayload & {
|
|
6
6
|
action?: AnalyticsAction;
|
|
7
7
|
actionSubject: AnalyticsActionSubject;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const handleClickCommon: (event: React.MouseEvent, onClick?:
|
|
2
|
+
export declare const handleClickCommon: (event: React.MouseEvent, onClick?: React.MouseEventHandler<Element> | undefined) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardAppearance, CardPlatform, CardProps } from './types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "data" | "appearance" | "testId" | "isSelected" | "inheritDimensions" | "onClick" | "analyticsContext" | "key" | "url" | "ui" | "showActions" | "onResolve" | "platform" | "isFrameVisible" | "embedIframeRef" | "forwardedRef" | "importer" | "container" | "inlinePreloaderStyle" | "showHoverPreview"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from './types';
|
|
3
|
-
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, }: CardWithUrlContentProps): JSX.Element;
|
|
3
|
+
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, }: CardWithUrlContentProps): JSX.Element;
|