@atlaskit/smart-card 32.7.7 → 32.7.9
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/analytics.spec.yaml +31 -5
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +7 -6
- package/dist/cjs/state/actions/index.js +13 -38
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +59 -306
- package/dist/cjs/utils/analytics/LinkAnalyticsContext.js +2 -7
- package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +99 -6
- package/dist/cjs/utils/analytics/analytics.js +27 -301
- package/dist/cjs/utils/analytics/index.js +0 -66
- package/dist/cjs/view/CardWithUrl/component.js +7 -23
- package/dist/cjs/view/CardWithUrl/loader.js +14 -5
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +88 -32
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- 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/HoverCard/components/HoverCardComponent.js +2 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +0 -1
- package/dist/cjs/view/HoverCard/index.js +15 -8
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +8 -7
- package/dist/es2019/state/actions/index.js +13 -38
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -239
- package/dist/es2019/utils/analytics/LinkAnalyticsContext.js +0 -3
- package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +97 -2
- package/dist/es2019/utils/analytics/analytics.js +2 -286
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +8 -24
- package/dist/es2019/view/CardWithUrl/loader.js +9 -1
- package/dist/es2019/view/EmbedModal/components/analytics/index.js +88 -32
- package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- 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/HoverCard/components/HoverCardComponent.js +1 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +0 -1
- package/dist/es2019/view/HoverCard/index.js +10 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +8 -7
- package/dist/esm/state/actions/index.js +13 -38
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +60 -307
- package/dist/esm/utils/analytics/LinkAnalyticsContext.js +2 -7
- package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +95 -5
- package/dist/esm/utils/analytics/analytics.js +26 -300
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +8 -24
- package/dist/esm/view/CardWithUrl/loader.js +14 -5
- package/dist/esm/view/EmbedModal/components/analytics/index.js +88 -32
- package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
- 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/HoverCard/components/HoverCardComponent.js +1 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -53
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +0 -1
- package/dist/esm/view/HoverCard/index.js +14 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/types/common/analytics/generated/analytics.types.d.ts +16 -2
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +6 -102
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -12
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +14 -0
- 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/EmbedModal/components/analytics/types.d.ts +1 -0
- package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -0
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +1 -1
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +16 -2
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +6 -102
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -12
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +14 -0
- 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/EmbedModal/components/analytics/types.d.ts +1 -0
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -0
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +1 -1
- package/package.json +2 -5
|
@@ -5,13 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.LinkAnalyticsContext = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _analytics = require("./analytics");
|
|
13
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
10
|
/**
|
|
16
11
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
17
12
|
*/
|
|
@@ -24,11 +19,11 @@ var LinkAnalyticsContext = exports.LinkAnalyticsContext = function LinkAnalytics
|
|
|
24
19
|
return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
25
20
|
data: {
|
|
26
21
|
source: source,
|
|
27
|
-
attributes:
|
|
22
|
+
attributes: {
|
|
28
23
|
displayCategory: displayCategory,
|
|
29
24
|
display: display,
|
|
30
25
|
id: id
|
|
31
|
-
}
|
|
26
|
+
}
|
|
32
27
|
}
|
|
33
28
|
}, children);
|
|
34
29
|
};
|
|
@@ -1,27 +1,112 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
|
-
exports.SmartLinkAnalyticsContext = void 0;
|
|
8
|
+
exports.useSmartLinkAnalyticsContext = exports.SmartLinkAnalyticsContext = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
11
13
|
var _resolvedAttributes = require("@atlaskit/link-analytics/resolved-attributes");
|
|
14
|
+
var _linkProvider = require("@atlaskit/link-provider");
|
|
15
|
+
var _linkingCommon = require("@atlaskit/linking-common");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
17
|
var _store = require("../../state/store");
|
|
18
|
+
var _analytics = require("./analytics");
|
|
13
19
|
var _LinkAnalyticsContext = require("./LinkAnalyticsContext");
|
|
20
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
+
var getExtendedResolvedAttributes = function getExtendedResolvedAttributes(linkDetails, details, linkStatus) {
|
|
25
|
+
var _details$meta$definit, _details$meta, _details$meta$resourc, _details$meta2;
|
|
26
|
+
return _objectSpread({
|
|
27
|
+
definitionId: (_details$meta$definit = details === null || details === void 0 || (_details$meta = details.meta) === null || _details$meta === void 0 ? void 0 : _details$meta.definitionId) !== null && _details$meta$definit !== void 0 ? _details$meta$definit : null,
|
|
28
|
+
resourceType: (_details$meta$resourc = details === null || details === void 0 || (_details$meta2 = details.meta) === null || _details$meta2 === void 0 ? void 0 : _details$meta2.resourceType) !== null && _details$meta$resourc !== void 0 ? _details$meta$resourc : null
|
|
29
|
+
}, (0, _resolvedAttributes.getResolvedAttributes)(linkDetails, details, linkStatus));
|
|
30
|
+
};
|
|
31
|
+
var getSmartLinkAnalyticsContext = function getSmartLinkAnalyticsContext(_ref) {
|
|
32
|
+
var display = _ref.display,
|
|
33
|
+
id = _ref.id,
|
|
34
|
+
response = _ref.response,
|
|
35
|
+
source = _ref.source,
|
|
36
|
+
status = _ref.status,
|
|
37
|
+
url = _ref.url;
|
|
38
|
+
var resolvedAttributes = getExtendedResolvedAttributes({
|
|
39
|
+
url: url
|
|
40
|
+
}, response, status);
|
|
41
|
+
return {
|
|
42
|
+
source: source,
|
|
43
|
+
attributes: _objectSpread(_objectSpread({}, _analytics.context), {}, {
|
|
44
|
+
display: display,
|
|
45
|
+
id: id
|
|
46
|
+
}, resolvedAttributes)
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Provides an analytics context data to supply attributes to events based on a URL
|
|
51
|
+
* and the link state in the store
|
|
52
|
+
*/
|
|
53
|
+
var useSmartLinkAnalyticsContext = exports.useSmartLinkAnalyticsContext = function useSmartLinkAnalyticsContext(_ref2) {
|
|
54
|
+
var display = _ref2.display,
|
|
55
|
+
id = _ref2.id,
|
|
56
|
+
source = _ref2.source,
|
|
57
|
+
url = _ref2.url;
|
|
58
|
+
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
59
|
+
store = _useSmartLinkContext.store;
|
|
60
|
+
var state = store ? (0, _linkingCommon.getUrl)(store, url) : undefined;
|
|
61
|
+
return (0, _react.useMemo)(function () {
|
|
62
|
+
return (0, _platformFeatureFlags.fg)('platform-smart-card-migrate-embed-modal-analytics') ? getSmartLinkAnalyticsContext({
|
|
63
|
+
display: display,
|
|
64
|
+
id: id,
|
|
65
|
+
response: state === null || state === void 0 ? void 0 : state.details,
|
|
66
|
+
source: source,
|
|
67
|
+
status: state === null || state === void 0 ? void 0 : state.status,
|
|
68
|
+
url: url
|
|
69
|
+
}) : {};
|
|
70
|
+
}, [display, id, source, state === null || state === void 0 ? void 0 : state.details, state === null || state === void 0 ? void 0 : state.status, url]);
|
|
71
|
+
};
|
|
72
|
+
|
|
14
73
|
/**
|
|
15
74
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
16
75
|
* and the link state in the store
|
|
17
76
|
*/
|
|
18
|
-
var
|
|
19
|
-
var children =
|
|
20
|
-
|
|
21
|
-
|
|
77
|
+
var ExtendedSmartLinkAnalyticsContext = function ExtendedSmartLinkAnalyticsContext(_ref3) {
|
|
78
|
+
var children = _ref3.children,
|
|
79
|
+
display = _ref3.display,
|
|
80
|
+
id = _ref3.id,
|
|
81
|
+
source = _ref3.source,
|
|
82
|
+
url = _ref3.url;
|
|
22
83
|
var _useSmartLinkState = (0, _store.useSmartCardState)(url),
|
|
23
84
|
details = _useSmartLinkState.details,
|
|
24
85
|
status = _useSmartLinkState.status;
|
|
86
|
+
var data = getSmartLinkAnalyticsContext({
|
|
87
|
+
display: display,
|
|
88
|
+
id: id,
|
|
89
|
+
response: details,
|
|
90
|
+
source: source,
|
|
91
|
+
status: status,
|
|
92
|
+
url: url
|
|
93
|
+
});
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
95
|
+
data: data
|
|
96
|
+
}, children);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Provides an analytics context to supply attributes to events based on a URL
|
|
101
|
+
* and the link state in the store
|
|
102
|
+
*/
|
|
103
|
+
var LegacySmartLinkAnalyticsContext = function LegacySmartLinkAnalyticsContext(props) {
|
|
104
|
+
var children = props.children,
|
|
105
|
+
url = props.url,
|
|
106
|
+
display = props.display;
|
|
107
|
+
var _useSmartLinkState2 = (0, _store.useSmartCardState)(url),
|
|
108
|
+
details = _useSmartLinkState2.details,
|
|
109
|
+
status = _useSmartLinkState2.status;
|
|
25
110
|
var attributes = (0, _resolvedAttributes.getResolvedAttributes)({
|
|
26
111
|
url: url
|
|
27
112
|
}, details, status);
|
|
@@ -32,4 +117,12 @@ var SmartLinkAnalyticsContext = exports.SmartLinkAnalyticsContext = function Sma
|
|
|
32
117
|
attributes: attributes
|
|
33
118
|
}
|
|
34
119
|
}, children));
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Provides an analytics context to supply attributes to events based on a URL
|
|
124
|
+
* and the link state in the store
|
|
125
|
+
*/
|
|
126
|
+
var SmartLinkAnalyticsContext = exports.SmartLinkAnalyticsContext = function SmartLinkAnalyticsContext(props) {
|
|
127
|
+
return (0, _platformFeatureFlags.fg)('platform-smart-card-migrate-embed-modal-analytics') ? /*#__PURE__*/_react.default.createElement(ExtendedSmartLinkAnalyticsContext, props) : /*#__PURE__*/_react.default.createElement(LegacySmartLinkAnalyticsContext, props);
|
|
35
128
|
};
|
|
@@ -4,11 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiActionClickedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _linkingTypes = require("@atlaskit/linking-types");
|
|
12
11
|
var _performance = require("../performance");
|
|
13
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -16,7 +15,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
16
15
|
var context = exports.context = {
|
|
17
16
|
componentName: 'smart-cards',
|
|
18
17
|
packageName: "@atlaskit/smart-card",
|
|
19
|
-
packageVersion: "32.7.
|
|
18
|
+
packageVersion: "32.7.9"
|
|
20
19
|
};
|
|
21
20
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
22
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -28,8 +27,6 @@ var TrackQuickActionFailureReason = exports.TrackQuickActionFailureReason = /*#_
|
|
|
28
27
|
TrackQuickActionFailureReason["UnknownError"] = "UnknownError";
|
|
29
28
|
return TrackQuickActionFailureReason;
|
|
30
29
|
}({});
|
|
31
|
-
var SmartLinkActionTypeTrackingEventMapper = exports.SmartLinkActionTypeTrackingEventMapper = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _linkingTypes.SmartLinkActionType.FollowEntityAction, 'Follow'), _linkingTypes.SmartLinkActionType.StatusUpdateAction, 'StatusUpdate'), _linkingTypes.SmartLinkActionType.UnfollowEntityAction, 'Unfollow');
|
|
32
|
-
var SmartLinkActionTypeUiEventMapper = exports.SmartLinkActionTypeUiEventMapper = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _linkingTypes.SmartLinkActionType.FollowEntityAction, 'smartLinkFollowButton'), _linkingTypes.SmartLinkActionType.UnfollowEntityAction, 'smartLinkFollowButton');
|
|
33
30
|
var uiActionSubjectIds = {
|
|
34
31
|
DownloadAction: 'downloadDocument',
|
|
35
32
|
PreviewAction: 'invokePreviewScreen',
|
|
@@ -118,100 +115,15 @@ var invokeFailedEvent = exports.invokeFailedEvent = function invokeFailedEvent(_
|
|
|
118
115
|
})
|
|
119
116
|
};
|
|
120
117
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
*/
|
|
125
|
-
var uiAuthEvent = exports.uiAuthEvent = function uiAuthEvent(_ref3) {
|
|
126
|
-
var definitionId = _ref3.definitionId,
|
|
118
|
+
var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref3) {
|
|
119
|
+
var id = _ref3.id,
|
|
120
|
+
actionType = _ref3.actionType,
|
|
127
121
|
extensionKey = _ref3.extensionKey,
|
|
122
|
+
display = _ref3.display,
|
|
123
|
+
definitionId = _ref3.definitionId,
|
|
128
124
|
destinationProduct = _ref3.destinationProduct,
|
|
129
125
|
destinationSubproduct = _ref3.destinationSubproduct,
|
|
130
|
-
location = _ref3.location
|
|
131
|
-
display = _ref3.display;
|
|
132
|
-
return {
|
|
133
|
-
action: 'clicked',
|
|
134
|
-
actionSubject: 'button',
|
|
135
|
-
actionSubjectId: 'connectAccount',
|
|
136
|
-
eventType: 'ui',
|
|
137
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
138
|
-
definitionId: definitionId,
|
|
139
|
-
extensionKey: extensionKey,
|
|
140
|
-
destinationProduct: destinationProduct,
|
|
141
|
-
destinationSubproduct: destinationSubproduct,
|
|
142
|
-
location: location,
|
|
143
|
-
display: display
|
|
144
|
-
})
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
150
|
-
*/
|
|
151
|
-
var uiAuthAlternateAccountEvent = exports.uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref4) {
|
|
152
|
-
var definitionId = _ref4.definitionId,
|
|
153
|
-
extensionKey = _ref4.extensionKey,
|
|
154
|
-
destinationProduct = _ref4.destinationProduct,
|
|
155
|
-
destinationSubproduct = _ref4.destinationSubproduct,
|
|
156
|
-
location = _ref4.location,
|
|
157
|
-
display = _ref4.display;
|
|
158
|
-
return {
|
|
159
|
-
action: 'clicked',
|
|
160
|
-
actionSubject: 'smartLink',
|
|
161
|
-
actionSubjectId: 'tryAnotherAccount',
|
|
162
|
-
eventType: 'ui',
|
|
163
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
164
|
-
definitionId: definitionId,
|
|
165
|
-
extensionKey: extensionKey,
|
|
166
|
-
destinationProduct: destinationProduct,
|
|
167
|
-
destinationSubproduct: destinationSubproduct,
|
|
168
|
-
location: location,
|
|
169
|
-
display: display
|
|
170
|
-
})
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
176
|
-
*/
|
|
177
|
-
var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEvent(_ref5) {
|
|
178
|
-
var id = _ref5.id,
|
|
179
|
-
display = _ref5.display,
|
|
180
|
-
status = _ref5.status,
|
|
181
|
-
definitionId = _ref5.definitionId,
|
|
182
|
-
extensionKey = _ref5.extensionKey,
|
|
183
|
-
isModifierKeyPressed = _ref5.isModifierKeyPressed,
|
|
184
|
-
location = _ref5.location,
|
|
185
|
-
destinationProduct = _ref5.destinationProduct,
|
|
186
|
-
destinationSubproduct = _ref5.destinationSubproduct,
|
|
187
|
-
actionSubjectId = _ref5.actionSubjectId;
|
|
188
|
-
return {
|
|
189
|
-
action: 'clicked',
|
|
190
|
-
actionSubject: 'smartLink',
|
|
191
|
-
actionSubjectId: actionSubjectId,
|
|
192
|
-
eventType: 'ui',
|
|
193
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
194
|
-
id: id,
|
|
195
|
-
status: status,
|
|
196
|
-
definitionId: definitionId,
|
|
197
|
-
extensionKey: extensionKey,
|
|
198
|
-
display: display,
|
|
199
|
-
isModifierKeyPressed: isModifierKeyPressed,
|
|
200
|
-
location: location,
|
|
201
|
-
destinationProduct: destinationProduct,
|
|
202
|
-
destinationSubproduct: destinationSubproduct
|
|
203
|
-
})
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref6) {
|
|
207
|
-
var id = _ref6.id,
|
|
208
|
-
actionType = _ref6.actionType,
|
|
209
|
-
extensionKey = _ref6.extensionKey,
|
|
210
|
-
display = _ref6.display,
|
|
211
|
-
definitionId = _ref6.definitionId,
|
|
212
|
-
destinationProduct = _ref6.destinationProduct,
|
|
213
|
-
destinationSubproduct = _ref6.destinationSubproduct,
|
|
214
|
-
location = _ref6.location;
|
|
126
|
+
location = _ref3.location;
|
|
215
127
|
return {
|
|
216
128
|
action: 'clicked',
|
|
217
129
|
actionSubject: 'button',
|
|
@@ -229,40 +141,15 @@ var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClick
|
|
|
229
141
|
})
|
|
230
142
|
};
|
|
231
143
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
destinationSubproduct = _ref7.destinationSubproduct,
|
|
242
|
-
location = _ref7.location;
|
|
243
|
-
return {
|
|
244
|
-
action: 'closed',
|
|
245
|
-
actionSubject: 'consentModal',
|
|
246
|
-
eventType: 'ui',
|
|
247
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
248
|
-
extensionKey: extensionKey,
|
|
249
|
-
definitionId: definitionId,
|
|
250
|
-
destinationProduct: destinationProduct,
|
|
251
|
-
destinationSubproduct: destinationSubproduct,
|
|
252
|
-
location: location,
|
|
253
|
-
display: display
|
|
254
|
-
})
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
|
-
var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref8) {
|
|
258
|
-
var display = _ref8.display,
|
|
259
|
-
status = _ref8.status,
|
|
260
|
-
extensionKey = _ref8.extensionKey,
|
|
261
|
-
definitionId = _ref8.definitionId,
|
|
262
|
-
destinationProduct = _ref8.destinationProduct,
|
|
263
|
-
destinationSubproduct = _ref8.destinationSubproduct,
|
|
264
|
-
location = _ref8.location,
|
|
265
|
-
canBeDatasource = _ref8.canBeDatasource;
|
|
144
|
+
var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref4) {
|
|
145
|
+
var display = _ref4.display,
|
|
146
|
+
status = _ref4.status,
|
|
147
|
+
extensionKey = _ref4.extensionKey,
|
|
148
|
+
definitionId = _ref4.definitionId,
|
|
149
|
+
destinationProduct = _ref4.destinationProduct,
|
|
150
|
+
destinationSubproduct = _ref4.destinationSubproduct,
|
|
151
|
+
location = _ref4.location,
|
|
152
|
+
canBeDatasource = _ref4.canBeDatasource;
|
|
266
153
|
return {
|
|
267
154
|
action: 'renderSuccess',
|
|
268
155
|
actionSubject: 'smartLink',
|
|
@@ -279,15 +166,15 @@ var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSucce
|
|
|
279
166
|
})
|
|
280
167
|
};
|
|
281
168
|
};
|
|
282
|
-
var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(
|
|
283
|
-
var display =
|
|
284
|
-
error =
|
|
285
|
-
errorInfo =
|
|
286
|
-
extensionKey =
|
|
287
|
-
definitionId =
|
|
288
|
-
destinationProduct =
|
|
289
|
-
destinationSubproduct =
|
|
290
|
-
location =
|
|
169
|
+
var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref5) {
|
|
170
|
+
var display = _ref5.display,
|
|
171
|
+
error = _ref5.error,
|
|
172
|
+
errorInfo = _ref5.errorInfo,
|
|
173
|
+
extensionKey = _ref5.extensionKey,
|
|
174
|
+
definitionId = _ref5.definitionId,
|
|
175
|
+
destinationProduct = _ref5.destinationProduct,
|
|
176
|
+
destinationSubproduct = _ref5.destinationSubproduct,
|
|
177
|
+
location = _ref5.location;
|
|
291
178
|
return {
|
|
292
179
|
actionSubject: 'smartLink',
|
|
293
180
|
action: 'renderFailed',
|
|
@@ -303,165 +190,4 @@ var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedE
|
|
|
303
190
|
location: location
|
|
304
191
|
})
|
|
305
192
|
};
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
310
|
-
*/
|
|
311
|
-
var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref10) {
|
|
312
|
-
var id = _ref10.id,
|
|
313
|
-
previewDisplay = _ref10.previewDisplay,
|
|
314
|
-
extensionKey = _ref10.extensionKey,
|
|
315
|
-
definitionId = _ref10.definitionId,
|
|
316
|
-
destinationProduct = _ref10.destinationProduct,
|
|
317
|
-
destinationSubproduct = _ref10.destinationSubproduct,
|
|
318
|
-
location = _ref10.location,
|
|
319
|
-
previewInvokeMethod = _ref10.previewInvokeMethod,
|
|
320
|
-
status = _ref10.status;
|
|
321
|
-
return {
|
|
322
|
-
action: 'viewed',
|
|
323
|
-
actionSubject: 'hoverCard',
|
|
324
|
-
eventType: 'ui',
|
|
325
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
326
|
-
id: id,
|
|
327
|
-
previewDisplay: previewDisplay,
|
|
328
|
-
extensionKey: extensionKey,
|
|
329
|
-
definitionId: definitionId,
|
|
330
|
-
destinationProduct: destinationProduct,
|
|
331
|
-
destinationSubproduct: destinationSubproduct,
|
|
332
|
-
location: location,
|
|
333
|
-
previewInvokeMethod: previewInvokeMethod,
|
|
334
|
-
status: status
|
|
335
|
-
})
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
341
|
-
*/
|
|
342
|
-
var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref11) {
|
|
343
|
-
var id = _ref11.id,
|
|
344
|
-
previewDisplay = _ref11.previewDisplay,
|
|
345
|
-
hoverTime = _ref11.hoverTime,
|
|
346
|
-
extensionKey = _ref11.extensionKey,
|
|
347
|
-
definitionId = _ref11.definitionId,
|
|
348
|
-
destinationProduct = _ref11.destinationProduct,
|
|
349
|
-
destinationSubproduct = _ref11.destinationSubproduct,
|
|
350
|
-
location = _ref11.location,
|
|
351
|
-
previewInvokeMethod = _ref11.previewInvokeMethod,
|
|
352
|
-
status = _ref11.status;
|
|
353
|
-
return {
|
|
354
|
-
action: 'dismissed',
|
|
355
|
-
actionSubject: 'hoverCard',
|
|
356
|
-
eventType: 'ui',
|
|
357
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
358
|
-
id: id,
|
|
359
|
-
previewDisplay: previewDisplay,
|
|
360
|
-
hoverTime: hoverTime,
|
|
361
|
-
extensionKey: extensionKey,
|
|
362
|
-
definitionId: definitionId,
|
|
363
|
-
destinationProduct: destinationProduct,
|
|
364
|
-
destinationSubproduct: destinationSubproduct,
|
|
365
|
-
location: location,
|
|
366
|
-
previewInvokeMethod: previewInvokeMethod,
|
|
367
|
-
status: status
|
|
368
|
-
})
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
374
|
-
*/
|
|
375
|
-
var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref12) {
|
|
376
|
-
var id = _ref12.id,
|
|
377
|
-
previewDisplay = _ref12.previewDisplay,
|
|
378
|
-
extensionKey = _ref12.extensionKey,
|
|
379
|
-
definitionId = _ref12.definitionId,
|
|
380
|
-
destinationProduct = _ref12.destinationProduct,
|
|
381
|
-
destinationSubproduct = _ref12.destinationSubproduct,
|
|
382
|
-
location = _ref12.location,
|
|
383
|
-
previewInvokeMethod = _ref12.previewInvokeMethod;
|
|
384
|
-
return {
|
|
385
|
-
action: 'clicked',
|
|
386
|
-
actionSubject: 'button',
|
|
387
|
-
actionSubjectId: 'shortcutGoToLink',
|
|
388
|
-
eventType: 'ui',
|
|
389
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
390
|
-
id: id,
|
|
391
|
-
previewDisplay: previewDisplay,
|
|
392
|
-
extensionKey: extensionKey,
|
|
393
|
-
definitionId: definitionId,
|
|
394
|
-
destinationProduct: destinationProduct,
|
|
395
|
-
destinationSubproduct: destinationSubproduct,
|
|
396
|
-
location: location,
|
|
397
|
-
previewInvokeMethod: previewInvokeMethod
|
|
398
|
-
})
|
|
399
|
-
};
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
404
|
-
*/
|
|
405
|
-
var uiLearnMoreLinkClickedEvent = exports.uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent() {
|
|
406
|
-
return {
|
|
407
|
-
action: 'clicked',
|
|
408
|
-
actionSubject: 'button',
|
|
409
|
-
actionSubjectId: 'learnMore',
|
|
410
|
-
eventType: 'ui',
|
|
411
|
-
attributes: _objectSpread({}, context)
|
|
412
|
-
};
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
417
|
-
*/
|
|
418
|
-
var uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = function uiSmartLinkStatusLozengeButtonClicked() {
|
|
419
|
-
return {
|
|
420
|
-
action: 'clicked',
|
|
421
|
-
actionSubject: 'button',
|
|
422
|
-
actionSubjectId: 'smartLinkStatusLozenge',
|
|
423
|
-
eventType: 'ui',
|
|
424
|
-
attributes: _objectSpread({}, context)
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
430
|
-
*/
|
|
431
|
-
var uiSmartLinkStatusListItemButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = function uiSmartLinkStatusListItemButtonClicked() {
|
|
432
|
-
return {
|
|
433
|
-
action: 'clicked',
|
|
434
|
-
actionSubject: 'button',
|
|
435
|
-
actionSubjectId: 'smartLinkStatusListItem',
|
|
436
|
-
eventType: 'ui',
|
|
437
|
-
attributes: _objectSpread({}, context)
|
|
438
|
-
};
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
443
|
-
*/
|
|
444
|
-
var uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatusOpenPreviewButtonClicked() {
|
|
445
|
-
return {
|
|
446
|
-
action: 'clicked',
|
|
447
|
-
actionSubject: 'button',
|
|
448
|
-
actionSubjectId: 'smartLinkStatusOpenPreview',
|
|
449
|
-
eventType: 'ui',
|
|
450
|
-
attributes: _objectSpread({}, context)
|
|
451
|
-
};
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
456
|
-
*/
|
|
457
|
-
var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref13) {
|
|
458
|
-
var _SmartLinkActionTypeU2;
|
|
459
|
-
var smartLinkActionType = _ref13.smartLinkActionType;
|
|
460
|
-
return {
|
|
461
|
-
action: 'clicked',
|
|
462
|
-
actionSubject: 'button',
|
|
463
|
-
actionSubjectId: (_SmartLinkActionTypeU2 = SmartLinkActionTypeUiEventMapper[smartLinkActionType]) !== null && _SmartLinkActionTypeU2 !== void 0 ? _SmartLinkActionTypeU2 : smartLinkActionType,
|
|
464
|
-
eventType: 'ui',
|
|
465
|
-
attributes: _objectSpread({}, context)
|
|
466
|
-
};
|
|
467
193
|
};
|
|
@@ -39,54 +39,6 @@ Object.defineProperty(exports, "uiActionClickedEvent", {
|
|
|
39
39
|
return _analytics.uiActionClickedEvent;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
Object.defineProperty(exports, "uiAuthAlternateAccountEvent", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _analytics.uiAuthAlternateAccountEvent;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "uiAuthEvent", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _analytics.uiAuthEvent;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "uiCardClickedEvent", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _analytics.uiCardClickedEvent;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "uiClosedAuthEvent", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function get() {
|
|
63
|
-
return _analytics.uiClosedAuthEvent;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "uiHoverCardDismissedEvent", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function get() {
|
|
69
|
-
return _analytics.uiHoverCardDismissedEvent;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "uiHoverCardOpenLinkClickedEvent", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function get() {
|
|
75
|
-
return _analytics.uiHoverCardOpenLinkClickedEvent;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "uiHoverCardViewedEvent", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function get() {
|
|
81
|
-
return _analytics.uiHoverCardViewedEvent;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "uiLearnMoreLinkClickedEvent", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function get() {
|
|
87
|
-
return _analytics.uiLearnMoreLinkClickedEvent;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
42
|
Object.defineProperty(exports, "uiRenderFailedEvent", {
|
|
91
43
|
enumerable: true,
|
|
92
44
|
get: function get() {
|
|
@@ -99,22 +51,4 @@ Object.defineProperty(exports, "uiRenderSuccessEvent", {
|
|
|
99
51
|
return _analytics.uiRenderSuccessEvent;
|
|
100
52
|
}
|
|
101
53
|
});
|
|
102
|
-
Object.defineProperty(exports, "uiSmartLinkStatusListItemButtonClicked", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function get() {
|
|
105
|
-
return _analytics.uiSmartLinkStatusListItemButtonClicked;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "uiSmartLinkStatusLozengeButtonClicked", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function get() {
|
|
111
|
-
return _analytics.uiSmartLinkStatusLozengeButtonClicked;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "uiSmartLinkStatusOpenPreviewButtonClicked", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function get() {
|
|
117
|
-
return _analytics.uiSmartLinkStatusOpenPreviewButtonClicked;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
54
|
var _analytics = require("./analytics");
|
|
@@ -70,8 +70,6 @@ function Component(_ref) {
|
|
|
70
70
|
var definitionId = (0, _helpers.getDefinitionId)(state.details);
|
|
71
71
|
var extensionKey = (0, _helpers.getExtensionKey)(state.details);
|
|
72
72
|
var resourceType = (0, _helpers.getResourceType)(state.details);
|
|
73
|
-
var product = (0, _helpers.getProduct)(state.details);
|
|
74
|
-
var subproduct = (0, _helpers.getSubproduct)(state.details);
|
|
75
73
|
var services = (0, _helpers.getServices)(state.details);
|
|
76
74
|
var canBeDatasource = (0, _helpers.getCanBeDatasource)(state.details);
|
|
77
75
|
var isFlexibleUi = (0, _react.useMemo)(function () {
|
|
@@ -85,25 +83,12 @@ function Component(_ref) {
|
|
|
85
83
|
// Setup UI handlers.
|
|
86
84
|
var handleClickWrapper = (0, _react.useCallback)(function (event) {
|
|
87
85
|
var isModifierKeyPressed = (0, _utils.isSpecialEvent)(event);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
});
|
|
95
|
-
} else {
|
|
96
|
-
analytics.ui.cardClickedEvent({
|
|
97
|
-
id: id,
|
|
98
|
-
display: isFlexibleUi ? _constants.CardDisplay.Flexible : appearance,
|
|
99
|
-
status: state.status,
|
|
100
|
-
definitionId: definitionId,
|
|
101
|
-
extensionKey: extensionKey,
|
|
102
|
-
isModifierKeyPressed: isModifierKeyPressed,
|
|
103
|
-
destinationProduct: product,
|
|
104
|
-
destinationSubproduct: subproduct
|
|
105
|
-
});
|
|
106
|
-
}
|
|
86
|
+
fireEvent('ui.smartLink.clicked', {
|
|
87
|
+
id: id,
|
|
88
|
+
display: isFlexibleUi ? _constants.CardDisplay.Flexible : appearance,
|
|
89
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
90
|
+
isModifierKeyPressed: isModifierKeyPressed
|
|
91
|
+
});
|
|
107
92
|
if (!onClick && !isFlexibleUi) {
|
|
108
93
|
var clickUrl = (0, _helpers.getClickUrl)(url, state.details);
|
|
109
94
|
// Ctrl+left click on mac typically doesn't trigger onClick
|
|
@@ -123,7 +108,7 @@ function Component(_ref) {
|
|
|
123
108
|
}
|
|
124
109
|
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event);
|
|
125
110
|
}
|
|
126
|
-
}, [id, url, state.details,
|
|
111
|
+
}, [id, url, state.details, appearance, definitionId, onClick, isFlexibleUi, createAnalyticsEvent, fireEvent]);
|
|
127
112
|
var handleAuthorize = (0, _react.useCallback)(function () {
|
|
128
113
|
return actions.authorize(appearance);
|
|
129
114
|
}, [actions, appearance]);
|
|
@@ -178,7 +163,6 @@ function Component(_ref) {
|
|
|
178
163
|
display: isFlexibleUi ? 'flexible' : appearance
|
|
179
164
|
});
|
|
180
165
|
fireEvent('ui.smartLink.renderSuccess', {
|
|
181
|
-
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
182
166
|
display: isFlexibleUi ? 'flexible' : appearance
|
|
183
167
|
});
|
|
184
168
|
} else {
|