@atlaskit/smart-card 32.7.6 → 32.7.8
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/index.js +5 -7
- package/dist/cjs/state/actions/index.js +13 -38
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +54 -305
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
- package/dist/cjs/utils/analytics/analytics.js +28 -304
- package/dist/cjs/utils/analytics/index.js +0 -66
- package/dist/cjs/utils/mocks.js +5 -7
- package/dist/cjs/view/BlockCard/views/styled.js +1 -1
- package/dist/cjs/view/Card/index.js +5 -7
- package/dist/cjs/view/CardWithUrl/component.js +7 -22
- package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +34 -34
- package/dist/cjs/view/FlexibleCard/components/utils.js +5 -5
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/cjs/view/HoverCard/styled.js +1 -1
- package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -11
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +10 -13
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +7 -10
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +5 -7
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +5 -7
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/LinkView/index.js +5 -7
- package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/es2019/state/actions/index.js +13 -38
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -238
- package/dist/es2019/utils/analytics/analytics.js +2 -286
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/view/BlockCard/views/styled.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +8 -23
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
- package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/es2019/view/HoverCard/styled.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/esm/extractors/flexible/actions/index.js +5 -7
- package/dist/esm/state/actions/index.js +13 -38
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +55 -306
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
- package/dist/esm/utils/analytics/analytics.js +27 -303
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/utils/mocks.js +5 -7
- package/dist/esm/view/BlockCard/views/styled.js +1 -1
- package/dist/esm/view/Card/index.js +5 -7
- package/dist/esm/view/CardWithUrl/component.js +8 -23
- package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +34 -34
- package/dist/esm/view/FlexibleCard/components/utils.js +5 -5
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/esm/view/HoverCard/styled.js +1 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +8 -11
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +10 -13
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +7 -10
- package/dist/esm/view/InlineCard/ResolvedView/index.js +5 -7
- package/dist/esm/view/InlineCard/ResolvingView/index.js +5 -7
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/LinkView/index.js +5 -7
- package/dist/esm/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -12
- package/dist/types/utils/analytics/analytics.d.ts +1 -51
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +0 -60
- package/dist/types/utils/mocks.d.ts +0 -12
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +1 -1
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -12
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -51
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -60
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -12
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +1 -1
- package/package.json +2 -5
|
@@ -8,7 +8,6 @@ import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
|
|
10
10
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
13
12
|
import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../constants';
|
|
14
13
|
import { useSmartLinkAnalytics } from '../../../state/analytics';
|
|
@@ -57,17 +56,13 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
57
56
|
var isAISummaryEnabled = getIsAISummaryEnabled(isAdminHubAIEnabled, cardState.details);
|
|
58
57
|
var services = getServices(linkState.details);
|
|
59
58
|
var statusRef = useRef(linkStatus);
|
|
60
|
-
var analyticsRef = useRef(analytics);
|
|
61
59
|
var fireEventRef = useRef(fireEvent);
|
|
62
60
|
var definitionIdRef = useRef(definitionId);
|
|
63
61
|
useEffect(function () {
|
|
64
62
|
/**
|
|
65
|
-
* Must access
|
|
63
|
+
* Must access object value via ref because its not stable
|
|
66
64
|
* and it can trigger useEffect to re-run below
|
|
67
65
|
*/
|
|
68
|
-
if (analyticsRef.current !== analytics) {
|
|
69
|
-
analyticsRef.current = analytics;
|
|
70
|
-
}
|
|
71
66
|
if (statusRef.current !== linkStatus) {
|
|
72
67
|
statusRef.current = linkStatus;
|
|
73
68
|
}
|
|
@@ -77,66 +72,39 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
77
72
|
if (definitionIdRef.current !== definitionId) {
|
|
78
73
|
definitionIdRef.current = definitionId;
|
|
79
74
|
}
|
|
80
|
-
}, [
|
|
75
|
+
}, [linkStatus, fireEvent, definitionId]);
|
|
81
76
|
useEffect(function () {
|
|
77
|
+
var _definitionIdRef$curr;
|
|
82
78
|
var previewDisplay = 'card';
|
|
83
79
|
var previewInvokeMethod = 'mouse_hover';
|
|
84
80
|
var cardOpenTime = Date.now();
|
|
85
81
|
var fireEventCurrent = fireEventRef.current;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
fireEventCurrent('ui.hoverCard.viewed', {
|
|
83
|
+
previewDisplay: previewDisplay,
|
|
84
|
+
previewInvokeMethod: previewInvokeMethod,
|
|
85
|
+
definitionId: (_definitionIdRef$curr = definitionIdRef.current) !== null && _definitionIdRef$curr !== void 0 ? _definitionIdRef$curr : null
|
|
86
|
+
});
|
|
87
|
+
return function () {
|
|
88
|
+
var _definitionIdRef$curr2;
|
|
89
|
+
var hoverTime = Date.now() - cardOpenTime;
|
|
90
|
+
fireEventCurrent('ui.hoverCard.dismissed', {
|
|
95
91
|
previewDisplay: previewDisplay,
|
|
96
92
|
previewInvokeMethod: previewInvokeMethod,
|
|
97
|
-
|
|
93
|
+
hoverTime: hoverTime,
|
|
94
|
+
definitionId: (_definitionIdRef$curr2 = definitionIdRef.current) !== null && _definitionIdRef$curr2 !== void 0 ? _definitionIdRef$curr2 : null
|
|
98
95
|
});
|
|
99
|
-
}
|
|
100
|
-
return function () {
|
|
101
|
-
var hoverTime = Date.now() - cardOpenTime;
|
|
102
|
-
if (fg('platform_migrate-some-ui-events-smart-card')) {
|
|
103
|
-
var _definitionIdRef$curr2;
|
|
104
|
-
fireEventCurrent('ui.hoverCard.dismissed', {
|
|
105
|
-
previewDisplay: previewDisplay,
|
|
106
|
-
previewInvokeMethod: previewInvokeMethod,
|
|
107
|
-
hoverTime: hoverTime,
|
|
108
|
-
definitionId: (_definitionIdRef$curr2 = definitionIdRef.current) !== null && _definitionIdRef$curr2 !== void 0 ? _definitionIdRef$curr2 : null
|
|
109
|
-
});
|
|
110
|
-
} else {
|
|
111
|
-
analyticsRef.current.ui.hoverCardDismissedEvent({
|
|
112
|
-
previewDisplay: previewDisplay,
|
|
113
|
-
previewInvokeMethod: previewInvokeMethod,
|
|
114
|
-
hoverTime: hoverTime,
|
|
115
|
-
status: statusRef.current
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
96
|
};
|
|
119
97
|
}, []);
|
|
120
98
|
var onClick = useCallback(function (event) {
|
|
121
99
|
var isModifierKeyPressed = isSpecialEvent(event);
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
analytics.ui.cardClickedEvent({
|
|
131
|
-
id: id,
|
|
132
|
-
display: CardDisplay.HoverCardPreview,
|
|
133
|
-
status: cardState.status,
|
|
134
|
-
isModifierKeyPressed: isModifierKeyPressed,
|
|
135
|
-
actionSubjectId: 'titleGoToLink'
|
|
136
|
-
});
|
|
137
|
-
}
|
|
100
|
+
fireEvent('ui.smartLink.clicked.titleGoToLink', {
|
|
101
|
+
id: id,
|
|
102
|
+
display: CardDisplay.HoverCardPreview,
|
|
103
|
+
isModifierKeyPressed: isModifierKeyPressed,
|
|
104
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
105
|
+
});
|
|
138
106
|
fireLinkClickedEvent(createAnalyticsEvent)(event);
|
|
139
|
-
}, [createAnalyticsEvent,
|
|
107
|
+
}, [createAnalyticsEvent, id, fireEvent, definitionId]);
|
|
140
108
|
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
141
109
|
var _getMetadata = getMetadata(extensionKey, data),
|
|
142
110
|
subtitle = _getMetadata.subtitle;
|
|
@@ -32,7 +32,7 @@ export var separatorCss = css({
|
|
|
32
32
|
export var HoverCardContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tbackground: none;\n\tborder-width: 0;\n\tbox-sizing: border-box;\n\twidth: ", "rem;\n\n\t.", " {\n\t\tdisplay: none;\n\t}\n"])), NEW_CARD_WIDTH_REM, loadingPlaceholderClassName);
|
|
33
33
|
|
|
34
34
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
|
-
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tgap: ", ";\n\n\t", "\n\n\t// title and subtitle element group\n [data-smart-element-group] {\n\t\t// gap between title and subtitle\n\t\tgap: 0.06rem;\n\t\tdisplay: flex;\n\t\t/* subtitle element group */\n\t\t> [data-smart-element-group] {\n\t\t\t> span {\n\t\t\t\tmargin-right: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t[data-smart-element='Title'] {\n\t\tfont-weight:
|
|
35
|
+
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tgap: ", ";\n\n\t", "\n\n\t// title and subtitle element group\n [data-smart-element-group] {\n\t\t// gap between title and subtitle\n\t\tgap: 0.06rem;\n\t\tdisplay: flex;\n\t\t/* subtitle element group */\n\t\t> [data-smart-element-group] {\n\t\t\t> span {\n\t\t\t\tmargin-right: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t[data-smart-element='Title'] {\n\t\tfont-weight: ", ";\n\t}\n"])), blockGap, separatorCss, elementGap, "var(--ds-font-weight-semibold, 600)");
|
|
36
36
|
export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
37
37
|
return css({
|
|
38
38
|
transition: 'height 300ms ease-in-out',
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -20,17 +19,15 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
|
20
19
|
import { IconStyledButton } from '../styled';
|
|
21
20
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
22
21
|
export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
23
|
-
_inherits(InlineCardErroredView, _React$Component);
|
|
24
|
-
var _super = _createSuper(InlineCardErroredView);
|
|
25
22
|
function InlineCardErroredView() {
|
|
26
23
|
var _this;
|
|
27
24
|
_classCallCheck(this, InlineCardErroredView);
|
|
28
25
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
26
|
args[_key] = arguments[_key];
|
|
30
27
|
}
|
|
31
|
-
_this =
|
|
32
|
-
_defineProperty(
|
|
33
|
-
_defineProperty(
|
|
28
|
+
_this = _callSuper(this, InlineCardErroredView, [].concat(args));
|
|
29
|
+
_defineProperty(_this, "frameRef", /*#__PURE__*/React.createRef());
|
|
30
|
+
_defineProperty(_this, "handleRetry", function (event) {
|
|
34
31
|
var onRetry = _this.props.onRetry;
|
|
35
32
|
if (onRetry) {
|
|
36
33
|
event.preventDefault();
|
|
@@ -38,7 +35,7 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
38
35
|
onRetry();
|
|
39
36
|
}
|
|
40
37
|
});
|
|
41
|
-
_defineProperty(
|
|
38
|
+
_defineProperty(_this, "renderActionButton", function () {
|
|
42
39
|
var onRetry = _this.props.onRetry;
|
|
43
40
|
var ActionButton = withFrameStyleControl(Button, _this.frameRef);
|
|
44
41
|
return onRetry && /*#__PURE__*/React.createElement(ActionButton, {
|
|
@@ -50,7 +47,8 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
50
47
|
});
|
|
51
48
|
return _this;
|
|
52
49
|
}
|
|
53
|
-
|
|
50
|
+
_inherits(InlineCardErroredView, _React$Component);
|
|
51
|
+
return _createClass(InlineCardErroredView, [{
|
|
54
52
|
key: "render",
|
|
55
53
|
value: function render() {
|
|
56
54
|
var _this$props = this.props,
|
|
@@ -87,5 +85,4 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
87
85
|
return content;
|
|
88
86
|
}
|
|
89
87
|
}]);
|
|
90
|
-
return InlineCardErroredView;
|
|
91
88
|
}(React.Component);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React from 'react';
|
|
12
11
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -29,8 +28,6 @@ var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null
|
|
|
29
28
|
testId: "forbidden-view-fallback-icon"
|
|
30
29
|
}));
|
|
31
30
|
export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
32
|
-
_inherits(InlineCardForbiddenView, _React$Component);
|
|
33
|
-
var _super = _createSuper(InlineCardForbiddenView);
|
|
34
31
|
function InlineCardForbiddenView() {
|
|
35
32
|
var _this$props;
|
|
36
33
|
var _this;
|
|
@@ -38,12 +35,12 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
38
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
36
|
args[_key] = arguments[_key];
|
|
40
37
|
}
|
|
41
|
-
_this =
|
|
42
|
-
_defineProperty(
|
|
43
|
-
_defineProperty(
|
|
38
|
+
_this = _callSuper(this, InlineCardForbiddenView, [].concat(args));
|
|
39
|
+
_defineProperty(_this, "frameRef", /*#__PURE__*/React.createRef());
|
|
40
|
+
_defineProperty(_this, "state", {
|
|
44
41
|
hasRequestAccessContextMessage: !!((_this$props = _this.props) !== null && _this$props !== void 0 && (_this$props = _this$props.requestAccessContext) !== null && _this$props !== void 0 && _this$props.callToActionMessageKey)
|
|
45
42
|
});
|
|
46
|
-
_defineProperty(
|
|
43
|
+
_defineProperty(_this, "handleRetry", function (event) {
|
|
47
44
|
var onAuthorise = _this.props.onAuthorise;
|
|
48
45
|
event.preventDefault();
|
|
49
46
|
event.stopPropagation();
|
|
@@ -54,7 +51,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
54
51
|
(_this$props2 = _this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.requestAccessContext) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.action) === null || _this$props2 === void 0 || _this$props2.promise();
|
|
55
52
|
}
|
|
56
53
|
});
|
|
57
|
-
_defineProperty(
|
|
54
|
+
_defineProperty(_this, "renderForbiddenAccessMessage", function () {
|
|
58
55
|
var _this$props3;
|
|
59
56
|
if ((_this$props3 = _this.props) !== null && _this$props3 !== void 0 && (_this$props3 = _this$props3.requestAccessContext) !== null && _this$props3 !== void 0 && _this$props3.callToActionMessageKey) {
|
|
60
57
|
var callToActionMessageKey = _this.props.requestAccessContext.callToActionMessageKey;
|
|
@@ -68,7 +65,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
68
65
|
return /*#__PURE__*/React.createElement(React.Fragment, null, formattedMessage);
|
|
69
66
|
}));
|
|
70
67
|
});
|
|
71
|
-
_defineProperty(
|
|
68
|
+
_defineProperty(_this, "renderActionButton", function () {
|
|
72
69
|
var _this$props$requestAc;
|
|
73
70
|
var onAuthorise = _this.props.onAuthorise;
|
|
74
71
|
var ActionButton = withFrameStyleControl(Button, _this.frameRef);
|
|
@@ -98,7 +95,8 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
98
95
|
});
|
|
99
96
|
return _this;
|
|
100
97
|
}
|
|
101
|
-
|
|
98
|
+
_inherits(InlineCardForbiddenView, _React$Component);
|
|
99
|
+
return _createClass(InlineCardForbiddenView, [{
|
|
102
100
|
key: "render",
|
|
103
101
|
value: function render() {
|
|
104
102
|
var _this$props4 = this.props,
|
|
@@ -129,5 +127,4 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
129
127
|
return content;
|
|
130
128
|
}
|
|
131
129
|
}]);
|
|
132
|
-
return InlineCardForbiddenView;
|
|
133
130
|
}(React.Component);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import ImageLoader from 'react-render-image';
|
|
@@ -14,16 +13,14 @@ import { Icon, Shimmer } from '../Icon';
|
|
|
14
13
|
import { LinkAppearance, NoLinkAppearance } from '../styled';
|
|
15
14
|
import { EmojiWrapper, IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, TitleWrapperClassName } from './styled';
|
|
16
15
|
export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(IconAndTitleLayout, _React$Component);
|
|
18
|
-
var _super = _createSuper(IconAndTitleLayout);
|
|
19
16
|
function IconAndTitleLayout() {
|
|
20
17
|
var _this;
|
|
21
18
|
_classCallCheck(this, IconAndTitleLayout);
|
|
22
19
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
20
|
args[_key] = arguments[_key];
|
|
24
21
|
}
|
|
25
|
-
_this =
|
|
26
|
-
_defineProperty(
|
|
22
|
+
_this = _callSuper(this, IconAndTitleLayout, [].concat(args));
|
|
23
|
+
_defineProperty(_this, "handleClick", function (event) {
|
|
27
24
|
var onClick = _this.props.onClick;
|
|
28
25
|
if (onClick) {
|
|
29
26
|
event.preventDefault();
|
|
@@ -31,7 +28,7 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
31
28
|
onClick(event);
|
|
32
29
|
}
|
|
33
30
|
});
|
|
34
|
-
_defineProperty(
|
|
31
|
+
_defineProperty(_this, "handleKeyPress", function (event) {
|
|
35
32
|
var onClick = _this.props.onClick;
|
|
36
33
|
if (event.key !== ' ' && event.key !== 'Enter') {
|
|
37
34
|
return;
|
|
@@ -44,7 +41,8 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
44
41
|
});
|
|
45
42
|
return _this;
|
|
46
43
|
}
|
|
47
|
-
|
|
44
|
+
_inherits(IconAndTitleLayout, _React$Component);
|
|
45
|
+
return _createClass(IconAndTitleLayout, [{
|
|
48
46
|
key: "renderAtlaskitIcon",
|
|
49
47
|
value: function renderAtlaskitIcon() {
|
|
50
48
|
var _this$props = this.props,
|
|
@@ -151,7 +149,6 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
151
149
|
);
|
|
152
150
|
}
|
|
153
151
|
}]);
|
|
154
|
-
return IconAndTitleLayout;
|
|
155
152
|
}(React.Component);
|
|
156
153
|
_defineProperty(IconAndTitleLayout, "defaultProps", {
|
|
157
154
|
rightSideSpacer: true
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Lozenge from '@atlaskit/lozenge';
|
|
@@ -12,13 +12,12 @@ import { Frame } from '../Frame';
|
|
|
12
12
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
13
13
|
import { LozengeWrapper } from '../IconAndTitleLayout/styled';
|
|
14
14
|
export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
15
|
-
_inherits(InlineCardResolvedView, _React$Component);
|
|
16
|
-
var _super = _createSuper(InlineCardResolvedView);
|
|
17
15
|
function InlineCardResolvedView() {
|
|
18
16
|
_classCallCheck(this, InlineCardResolvedView);
|
|
19
|
-
return
|
|
17
|
+
return _callSuper(this, InlineCardResolvedView, arguments);
|
|
20
18
|
}
|
|
21
|
-
|
|
19
|
+
_inherits(InlineCardResolvedView, _React$Component);
|
|
20
|
+
return _createClass(InlineCardResolvedView, [{
|
|
22
21
|
key: "renderLozenge",
|
|
23
22
|
value: function renderLozenge() {
|
|
24
23
|
var lozenge = this.props.lozenge;
|
|
@@ -80,5 +79,4 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
80
79
|
return inlineCardResolvedView;
|
|
81
80
|
}
|
|
82
81
|
}]);
|
|
83
|
-
return InlineCardResolvedView;
|
|
84
82
|
}(React.Component);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -12,13 +12,12 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
|
12
12
|
import { IconTitleWrapper, RightIconPositionWrapper } from '../IconAndTitleLayout/styled';
|
|
13
13
|
import { SpinnerWrapper } from './styled';
|
|
14
14
|
export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
15
|
-
_inherits(InlineCardResolvingView, _React$Component);
|
|
16
|
-
var _super = _createSuper(InlineCardResolvingView);
|
|
17
15
|
function InlineCardResolvingView() {
|
|
18
16
|
_classCallCheck(this, InlineCardResolvingView);
|
|
19
|
-
return
|
|
17
|
+
return _callSuper(this, InlineCardResolvingView, arguments);
|
|
20
18
|
}
|
|
21
|
-
|
|
19
|
+
_inherits(InlineCardResolvingView, _React$Component);
|
|
20
|
+
return _createClass(InlineCardResolvingView, [{
|
|
22
21
|
key: "render",
|
|
23
22
|
value: function render() {
|
|
24
23
|
var _this$props = this.props,
|
|
@@ -61,5 +60,4 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
}]);
|
|
64
|
-
return InlineCardResolvingView;
|
|
65
63
|
}(React.Component);
|
|
@@ -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: "32.7.
|
|
16
|
+
packageVersion: "32.7.8",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { Frame } from '../InlineCard/Frame';
|
|
11
11
|
export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
|
|
12
|
-
_inherits(CardLinkView, _React$PureComponent);
|
|
13
|
-
var _super = _createSuper(CardLinkView);
|
|
14
12
|
function CardLinkView() {
|
|
15
13
|
_classCallCheck(this, CardLinkView);
|
|
16
|
-
return
|
|
14
|
+
return _callSuper(this, CardLinkView, arguments);
|
|
17
15
|
}
|
|
18
|
-
|
|
16
|
+
_inherits(CardLinkView, _React$PureComponent);
|
|
17
|
+
return _createClass(CardLinkView, [{
|
|
19
18
|
key: "render",
|
|
20
19
|
value: function render() {
|
|
21
20
|
return /*#__PURE__*/React.createElement(Frame, _extends({
|
|
@@ -23,5 +22,4 @@ export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
23
22
|
}, this.props), this.props.placeholder || this.props.link);
|
|
24
23
|
}
|
|
25
24
|
}]);
|
|
26
|
-
return CardLinkView;
|
|
27
25
|
}(React.PureComponent);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
6
5
|
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
7
6
|
import { messages } from '../../messages';
|
|
@@ -13,17 +12,12 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
13
12
|
var providerName = _ref.providerName,
|
|
14
13
|
isProductIntegrationSupported = _ref.isProductIntegrationSupported,
|
|
15
14
|
_ref$testId = _ref.testId,
|
|
16
|
-
testId = _ref$testId === void 0 ? 'unauthorised-view-content' : _ref$testId
|
|
17
|
-
analytics = _ref.analytics;
|
|
15
|
+
testId = _ref$testId === void 0 ? 'unauthorised-view-content' : _ref$testId;
|
|
18
16
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
19
17
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
20
18
|
var handleLearnMoreClick = useCallback(function () {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} else {
|
|
24
|
-
analytics === null || analytics === void 0 || analytics.ui.learnMoreClickedEvent();
|
|
25
|
-
}
|
|
26
|
-
}, [analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent]);
|
|
19
|
+
fireEvent('ui.button.clicked.learnMore', {});
|
|
20
|
+
}, [fireEvent]);
|
|
27
21
|
var learnMoreMessage = isProductIntegrationSupported ? messages.learn_more_about_connecting_account : messages.learn_more_about_smart_links;
|
|
28
22
|
return /*#__PURE__*/React.createElement(React.Fragment, null, providerName ? /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_unauthorised_account_description, {
|
|
29
23
|
values: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type
|
|
1
|
+
import { type InvokeFailedEventProps, type InvokeSucceededEventProps, type UiActionClickedEventProps, type UiRenderFailedEventProps, type UiRenderSuccessEventProps } from '../../utils/analytics/types';
|
|
2
2
|
import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
|
|
3
3
|
/**
|
|
4
4
|
* This hook provides usage of Smart Link analytics outside of the Card component.
|
|
@@ -11,26 +11,6 @@ import { type AnalyticsName, type AnalyticsPayload } from '../../utils/types';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLocation?: string) => {
|
|
13
13
|
ui: {
|
|
14
|
-
/**
|
|
15
|
-
* This fires an event that represents when a user clicks on the authentication
|
|
16
|
-
* call to action with no current authenticated account. (i.e. Connect to Preview).
|
|
17
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
18
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
19
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
20
|
-
* @returns
|
|
21
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
22
|
-
*/
|
|
23
|
-
authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthEventProps) => void;
|
|
24
|
-
/**
|
|
25
|
-
* This fires an event that represents when a user clicks on the authentication
|
|
26
|
-
* call to action with a forbidden authenticated account. (i.e. Try another account).
|
|
27
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
28
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
29
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
30
|
-
* @returns
|
|
31
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
32
|
-
*/
|
|
33
|
-
authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthAlternateAccountEventProps) => void;
|
|
34
14
|
/**
|
|
35
15
|
* This fires an event that represents when a user
|
|
36
16
|
* click a button.
|
|
@@ -39,20 +19,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
39
19
|
buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
|
|
40
20
|
actionSubjectId: Required<string>;
|
|
41
21
|
}) => void;
|
|
42
|
-
/**
|
|
43
|
-
* This fires an event that represents when a user clicks on a Smart Link.
|
|
44
|
-
* @param id The unique ID for this Smart Link.
|
|
45
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
46
|
-
* @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
|
|
47
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
48
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
49
|
-
* @param isModifierKeyPressed Whether a modifier key was pressed when clicking the Smart Link.
|
|
50
|
-
* @param location Where the Smart Link is currently rendered.
|
|
51
|
-
* @param destinationProduct The product the Smart Link is linked to.
|
|
52
|
-
* @returns
|
|
53
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
54
|
-
*/
|
|
55
|
-
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
|
|
56
22
|
/**
|
|
57
23
|
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
58
24
|
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
@@ -63,25 +29,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
63
29
|
* @returns
|
|
64
30
|
*/
|
|
65
31
|
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
66
|
-
/**
|
|
67
|
-
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
68
|
-
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
69
|
-
* @param previewDisplay What format the preview is in.
|
|
70
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
71
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
72
|
-
* @param previewInvokeMethod How the preview was triggered.
|
|
73
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
74
|
-
*/
|
|
75
|
-
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
|
|
76
|
-
/**
|
|
77
|
-
* This fires an event that represents when a user closed the authentication window without authenticating after opening it.
|
|
78
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
79
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
80
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
81
|
-
* @returns
|
|
82
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
83
|
-
*/
|
|
84
|
-
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
|
|
85
32
|
/**
|
|
86
33
|
* This fires an event that represents when a user close a modal.
|
|
87
34
|
* @param data A partial analytics event payload
|
|
@@ -107,53 +54,6 @@ export declare const useSmartLinkAnalytics: (url: string, id?: string, defaultLo
|
|
|
107
54
|
* @param errorInfo: Additional details about the error including the stack trace.
|
|
108
55
|
*/
|
|
109
56
|
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
|
|
110
|
-
/**
|
|
111
|
-
* This fires an event that represents a hover preview being opened.
|
|
112
|
-
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
113
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
114
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
115
|
-
* @param previewInvokeMethod How the preview was triggered.
|
|
116
|
-
* @returns
|
|
117
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
118
|
-
*/
|
|
119
|
-
hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardViewedEventProps) => void;
|
|
120
|
-
/**
|
|
121
|
-
* This fires an event that represents a hover preview being dismissed.
|
|
122
|
-
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
123
|
-
* @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
|
|
124
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
125
|
-
* @param extensionKey The extensionKey of the Smart Link resolver invoked.
|
|
126
|
-
* @param previewInvokeMethod How the preview was triggered.
|
|
127
|
-
* @returns
|
|
128
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
129
|
-
*/
|
|
130
|
-
hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardDismissedEventProps) => void;
|
|
131
|
-
/**
|
|
132
|
-
* Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
|
|
133
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
134
|
-
* @param location The location where a link is displayed (jiraWebLinks, confluencePages etc)
|
|
135
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
136
|
-
*/
|
|
137
|
-
learnMoreClickedEvent: () => void;
|
|
138
|
-
/**
|
|
139
|
-
* Fires an event that represent a click was performed on a Status Lozenge
|
|
140
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
141
|
-
*/
|
|
142
|
-
smartLinkLozengeActionClickedEvent: () => void;
|
|
143
|
-
/**
|
|
144
|
-
* Fires an event that represent a click was performed on a Status Lozenge's dropdown item
|
|
145
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
146
|
-
*/
|
|
147
|
-
smartLinkLozengeActionListItemClickedEvent: () => void;
|
|
148
|
-
/**
|
|
149
|
-
* Fires an event that represent a click was performed on a Status Lozenge open preview button
|
|
150
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
151
|
-
*/
|
|
152
|
-
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
153
|
-
/**
|
|
154
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
155
|
-
*/
|
|
156
|
-
smartLinkServerActionClickedEvent: (props: UiServerActionClickedEventProps) => void;
|
|
157
57
|
};
|
|
158
58
|
operational: {
|
|
159
59
|
/**
|
|
@@ -10,27 +10,15 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
10
10
|
config: (import("@atlaskit/link-provider").CardProviderCacheOpts & import("@atlaskit/link-provider").CardAuthFlowOpts) | undefined;
|
|
11
11
|
analytics: {
|
|
12
12
|
ui: {
|
|
13
|
-
authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthEventProps) => void;
|
|
14
|
-
authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiAuthAlternateAccountEventProps) => void;
|
|
15
13
|
buttonClickedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
16
14
|
actionSubjectId: string;
|
|
17
15
|
}) => void;
|
|
18
|
-
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
19
16
|
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
20
|
-
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
21
|
-
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
22
17
|
modalClosedEvent: (data: Partial<import("../..").AnalyticsPayload> & {
|
|
23
18
|
actionSubjectId: string;
|
|
24
19
|
}) => void;
|
|
25
20
|
renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, canBeDatasource, }: import("../../utils/analytics/types").UiRenderSuccessEventProps) => void;
|
|
26
21
|
renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiRenderFailedEventProps) => void;
|
|
27
|
-
hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardViewedEventProps) => void;
|
|
28
|
-
hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: import("../../utils/analytics/types").UiHoverCardDismissedEventProps) => void;
|
|
29
|
-
learnMoreClickedEvent: () => void;
|
|
30
|
-
smartLinkLozengeActionClickedEvent: () => void;
|
|
31
|
-
smartLinkLozengeActionListItemClickedEvent: () => void;
|
|
32
|
-
smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
|
|
33
|
-
smartLinkServerActionClickedEvent: (props: import("../../utils/analytics/types").UiServerActionClickedEventProps) => void;
|
|
34
22
|
};
|
|
35
23
|
operational: {
|
|
36
24
|
invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").InvokeSucceededEventProps) => void;
|