@atlaskit/smart-card 32.7.7 → 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 +8 -0
- package/dist/cjs/state/actions/index.js +13 -38
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +54 -305
- 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 -22
- 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/HoverCardContent.js +21 -53
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- 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/CardWithUrl/component.js +8 -23
- 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/HoverCardContent.js +21 -53
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +3 -9
- package/dist/esm/state/actions/index.js +13 -38
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +55 -306
- 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 -23
- 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/HoverCardContent.js +21 -53
- package/dist/esm/view/LinkUrl/index.js +1 -1
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 32.7.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#178101](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178101)
|
|
8
|
+
[`cdea830cdccf2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cdea830cdccf2) -
|
|
9
|
+
FF clean up platform_migrate-some-ui-events-smart-card
|
|
10
|
+
|
|
3
11
|
## 32.7.7
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _react = require("react");
|
|
|
11
11
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
12
12
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
13
13
|
var _outboundAuthFlowClient = require("@atlaskit/outbound-auth-flow-client");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
16
15
|
var _constants = require("../../constants");
|
|
17
16
|
var _analytics = require("../analytics");
|
|
@@ -107,32 +106,16 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
|
|
|
107
106
|
var services = (0, _helpers.getServices)(details);
|
|
108
107
|
// When authentication is triggered, let GAS know!
|
|
109
108
|
if (status === 'unauthorized') {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
});
|
|
115
|
-
} else {
|
|
116
|
-
analytics.ui.authEvent({
|
|
117
|
-
display: appearance,
|
|
118
|
-
definitionId: definitionId,
|
|
119
|
-
extensionKey: extensionKey
|
|
120
|
-
});
|
|
121
|
-
}
|
|
109
|
+
fireEvent('ui.button.clicked.connectAccount', {
|
|
110
|
+
display: appearance,
|
|
111
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
112
|
+
});
|
|
122
113
|
}
|
|
123
114
|
if (status === 'forbidden') {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
analytics.ui.authAlternateAccountEvent({
|
|
131
|
-
display: appearance,
|
|
132
|
-
definitionId: definitionId,
|
|
133
|
-
extensionKey: extensionKey
|
|
134
|
-
});
|
|
135
|
-
}
|
|
115
|
+
fireEvent('ui.smartLink.clicked.tryAnotherAccount', {
|
|
116
|
+
display: appearance,
|
|
117
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
118
|
+
});
|
|
136
119
|
}
|
|
137
120
|
if (services.length > 0) {
|
|
138
121
|
fireEvent('screen.consentModal.viewed', {
|
|
@@ -161,23 +144,15 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
|
|
|
161
144
|
reason: (_err$type = err.type) !== null && _err$type !== void 0 ? _err$type : null
|
|
162
145
|
});
|
|
163
146
|
if (err.type === 'auth_window_closed') {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
});
|
|
169
|
-
} else {
|
|
170
|
-
analytics.ui.closedAuthEvent({
|
|
171
|
-
display: appearance,
|
|
172
|
-
definitionId: definitionId,
|
|
173
|
-
extensionKey: extensionKey
|
|
174
|
-
});
|
|
175
|
-
}
|
|
147
|
+
fireEvent('ui.consentModal.closed', {
|
|
148
|
+
display: appearance,
|
|
149
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
150
|
+
});
|
|
176
151
|
}
|
|
177
152
|
reload();
|
|
178
153
|
});
|
|
179
154
|
}
|
|
180
|
-
}, [getSmartLinkState,
|
|
155
|
+
}, [getSmartLinkState, id, reload, fireEvent]);
|
|
181
156
|
var invoke = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
182
157
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(opts, appearance) {
|
|
183
158
|
var key, action, source;
|
|
@@ -11,7 +11,6 @@ var _react = require("react");
|
|
|
11
11
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
12
12
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
13
13
|
var _analytics = require("../../utils/analytics");
|
|
14
|
-
var _analytics2 = require("../../utils/analytics/analytics");
|
|
15
14
|
var _helpers = require("../helpers");
|
|
16
15
|
var _ufoExperiences = require("./ufoExperiences");
|
|
17
16
|
var _useDispatchAnalytics2 = require("./useDispatchAnalytics");
|
|
@@ -72,60 +71,6 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
72
71
|
/** Contains all ui analytics events */
|
|
73
72
|
var ui = (0, _react.useMemo)(function () {
|
|
74
73
|
return {
|
|
75
|
-
/**
|
|
76
|
-
* This fires an event that represents when a user clicks on the authentication
|
|
77
|
-
* call to action with no current authenticated account. (i.e. Connect to Preview).
|
|
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
|
-
authEvent: function authEvent(_ref) {
|
|
85
|
-
var display = _ref.display,
|
|
86
|
-
extensionKey = _ref.extensionKey,
|
|
87
|
-
definitionId = _ref.definitionId,
|
|
88
|
-
resourceType = _ref.resourceType,
|
|
89
|
-
destinationProduct = _ref.destinationProduct,
|
|
90
|
-
destinationSubproduct = _ref.destinationSubproduct,
|
|
91
|
-
location = _ref.location;
|
|
92
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiAuthEvent)({
|
|
93
|
-
display: display,
|
|
94
|
-
extensionKey: extensionKey,
|
|
95
|
-
definitionId: definitionId,
|
|
96
|
-
resourceType: resourceType,
|
|
97
|
-
destinationProduct: destinationProduct,
|
|
98
|
-
destinationSubproduct: destinationSubproduct,
|
|
99
|
-
location: location
|
|
100
|
-
}), commonAttributes));
|
|
101
|
-
},
|
|
102
|
-
/**
|
|
103
|
-
* This fires an event that represents when a user clicks on the authentication
|
|
104
|
-
* call to action with a forbidden authenticated account. (i.e. Try another account).
|
|
105
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
106
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
107
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
108
|
-
* @returns
|
|
109
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
110
|
-
*/
|
|
111
|
-
authAlternateAccountEvent: function authAlternateAccountEvent(_ref2) {
|
|
112
|
-
var display = _ref2.display,
|
|
113
|
-
extensionKey = _ref2.extensionKey,
|
|
114
|
-
definitionId = _ref2.definitionId,
|
|
115
|
-
resourceType = _ref2.resourceType,
|
|
116
|
-
destinationProduct = _ref2.destinationProduct,
|
|
117
|
-
destinationSubproduct = _ref2.destinationSubproduct,
|
|
118
|
-
location = _ref2.location;
|
|
119
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiAuthAlternateAccountEvent)({
|
|
120
|
-
display: display,
|
|
121
|
-
extensionKey: extensionKey,
|
|
122
|
-
definitionId: definitionId,
|
|
123
|
-
resourceType: resourceType,
|
|
124
|
-
destinationProduct: destinationProduct,
|
|
125
|
-
destinationSubproduct: destinationSubproduct,
|
|
126
|
-
location: location
|
|
127
|
-
}), commonAttributes));
|
|
128
|
-
},
|
|
129
74
|
/**
|
|
130
75
|
* This fires an event that represents when a user
|
|
131
76
|
* click a button.
|
|
@@ -140,43 +85,6 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
140
85
|
eventType: 'ui'
|
|
141
86
|
}, commonAttributes));
|
|
142
87
|
},
|
|
143
|
-
/**
|
|
144
|
-
* This fires an event that represents when a user clicks on a Smart Link.
|
|
145
|
-
* @param id The unique ID for this Smart Link.
|
|
146
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
147
|
-
* @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
|
|
148
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
149
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
150
|
-
* @param isModifierKeyPressed Whether a modifier key was pressed when clicking the Smart Link.
|
|
151
|
-
* @param location Where the Smart Link is currently rendered.
|
|
152
|
-
* @param destinationProduct The product the Smart Link is linked to.
|
|
153
|
-
* @returns
|
|
154
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
155
|
-
*/
|
|
156
|
-
cardClickedEvent: function cardClickedEvent(_ref3) {
|
|
157
|
-
var id = _ref3.id,
|
|
158
|
-
display = _ref3.display,
|
|
159
|
-
status = _ref3.status,
|
|
160
|
-
definitionId = _ref3.definitionId,
|
|
161
|
-
extensionKey = _ref3.extensionKey,
|
|
162
|
-
isModifierKeyPressed = _ref3.isModifierKeyPressed,
|
|
163
|
-
location = _ref3.location,
|
|
164
|
-
destinationProduct = _ref3.destinationProduct,
|
|
165
|
-
destinationSubproduct = _ref3.destinationSubproduct,
|
|
166
|
-
actionSubjectId = _ref3.actionSubjectId;
|
|
167
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiCardClickedEvent)({
|
|
168
|
-
id: id,
|
|
169
|
-
display: display,
|
|
170
|
-
status: status,
|
|
171
|
-
definitionId: definitionId,
|
|
172
|
-
extensionKey: extensionKey,
|
|
173
|
-
isModifierKeyPressed: isModifierKeyPressed,
|
|
174
|
-
location: location,
|
|
175
|
-
destinationProduct: destinationProduct,
|
|
176
|
-
destinationSubproduct: destinationSubproduct,
|
|
177
|
-
actionSubjectId: actionSubjectId
|
|
178
|
-
}), commonAttributes));
|
|
179
|
-
},
|
|
180
88
|
/**
|
|
181
89
|
* This fires an event that represents when a user clicks on a Smart Link action.
|
|
182
90
|
* Note: This also starts the UFO smart-link-action-invocation experience.
|
|
@@ -186,16 +94,16 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
186
94
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
187
95
|
* @returns
|
|
188
96
|
*/
|
|
189
|
-
actionClickedEvent: function actionClickedEvent(
|
|
190
|
-
var id =
|
|
191
|
-
actionType =
|
|
192
|
-
display =
|
|
193
|
-
overrideExtensionKey =
|
|
194
|
-
definitionId =
|
|
195
|
-
resourceType =
|
|
196
|
-
destinationProduct =
|
|
197
|
-
destinationSubproduct =
|
|
198
|
-
location =
|
|
97
|
+
actionClickedEvent: function actionClickedEvent(_ref) {
|
|
98
|
+
var id = _ref.id,
|
|
99
|
+
actionType = _ref.actionType,
|
|
100
|
+
display = _ref.display,
|
|
101
|
+
overrideExtensionKey = _ref.extensionKey,
|
|
102
|
+
definitionId = _ref.definitionId,
|
|
103
|
+
resourceType = _ref.resourceType,
|
|
104
|
+
destinationProduct = _ref.destinationProduct,
|
|
105
|
+
destinationSubproduct = _ref.destinationSubproduct,
|
|
106
|
+
location = _ref.location;
|
|
199
107
|
var extensionKey = overrideExtensionKey !== null && overrideExtensionKey !== void 0 ? overrideExtensionKey : extractedExtensionKey;
|
|
200
108
|
dispatchAnalytics(applyCommonAttributes((0, _analytics.uiActionClickedEvent)({
|
|
201
109
|
id: id !== null && id !== void 0 ? id : defaultId,
|
|
@@ -209,60 +117,6 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
209
117
|
location: location
|
|
210
118
|
}), commonAttributes));
|
|
211
119
|
},
|
|
212
|
-
/**
|
|
213
|
-
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
214
|
-
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
215
|
-
* @param previewDisplay What format the preview is in.
|
|
216
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
217
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
218
|
-
* @param previewInvokeMethod How the preview was triggered.
|
|
219
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
220
|
-
*/
|
|
221
|
-
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref5) {
|
|
222
|
-
var previewDisplay = _ref5.previewDisplay,
|
|
223
|
-
definitionId = _ref5.definitionId,
|
|
224
|
-
extensionKey = _ref5.extensionKey,
|
|
225
|
-
destinationProduct = _ref5.destinationProduct,
|
|
226
|
-
destinationSubproduct = _ref5.destinationSubproduct,
|
|
227
|
-
location = _ref5.location,
|
|
228
|
-
previewInvokeMethod = _ref5.previewInvokeMethod;
|
|
229
|
-
dispatchAnalytics(applyCommonAttributes((0, _analytics.uiHoverCardOpenLinkClickedEvent)({
|
|
230
|
-
id: defaultId,
|
|
231
|
-
previewDisplay: previewDisplay,
|
|
232
|
-
definitionId: definitionId,
|
|
233
|
-
extensionKey: extensionKey,
|
|
234
|
-
destinationProduct: destinationProduct,
|
|
235
|
-
destinationSubproduct: destinationSubproduct,
|
|
236
|
-
location: location,
|
|
237
|
-
previewInvokeMethod: previewInvokeMethod
|
|
238
|
-
}), commonAttributes));
|
|
239
|
-
},
|
|
240
|
-
/**
|
|
241
|
-
* This fires an event that represents when a user closed the authentication window without authenticating after opening it.
|
|
242
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
243
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
244
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
245
|
-
* @returns
|
|
246
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
247
|
-
*/
|
|
248
|
-
closedAuthEvent: function closedAuthEvent(_ref6) {
|
|
249
|
-
var display = _ref6.display,
|
|
250
|
-
extensionKey = _ref6.extensionKey,
|
|
251
|
-
definitionId = _ref6.definitionId,
|
|
252
|
-
resourceType = _ref6.resourceType,
|
|
253
|
-
destinationProduct = _ref6.destinationProduct,
|
|
254
|
-
destinationSubproduct = _ref6.destinationSubproduct,
|
|
255
|
-
location = _ref6.location;
|
|
256
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiClosedAuthEvent)({
|
|
257
|
-
display: display,
|
|
258
|
-
extensionKey: extensionKey,
|
|
259
|
-
definitionId: definitionId,
|
|
260
|
-
resourceType: resourceType,
|
|
261
|
-
destinationProduct: destinationProduct,
|
|
262
|
-
destinationSubproduct: destinationSubproduct,
|
|
263
|
-
location: location
|
|
264
|
-
}), commonAttributes));
|
|
265
|
-
},
|
|
266
120
|
/**
|
|
267
121
|
* This fires an event that represents when a user close a modal.
|
|
268
122
|
* @param data A partial analytics event payload
|
|
@@ -285,18 +139,18 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
285
139
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
286
140
|
* @param canBeDatasource An indicator that shows that a smart link can be converted to a datasource
|
|
287
141
|
*/
|
|
288
|
-
renderSuccessEvent: function renderSuccessEvent(
|
|
289
|
-
var display =
|
|
290
|
-
status =
|
|
291
|
-
id =
|
|
292
|
-
extensionKey =
|
|
293
|
-
definitionId =
|
|
294
|
-
resourceType =
|
|
295
|
-
destinationProduct =
|
|
296
|
-
destinationSubproduct =
|
|
297
|
-
location =
|
|
298
|
-
|
|
299
|
-
canBeDatasource =
|
|
142
|
+
renderSuccessEvent: function renderSuccessEvent(_ref2) {
|
|
143
|
+
var display = _ref2.display,
|
|
144
|
+
status = _ref2.status,
|
|
145
|
+
id = _ref2.id,
|
|
146
|
+
extensionKey = _ref2.extensionKey,
|
|
147
|
+
definitionId = _ref2.definitionId,
|
|
148
|
+
resourceType = _ref2.resourceType,
|
|
149
|
+
destinationProduct = _ref2.destinationProduct,
|
|
150
|
+
destinationSubproduct = _ref2.destinationSubproduct,
|
|
151
|
+
location = _ref2.location,
|
|
152
|
+
_ref2$canBeDatasource = _ref2.canBeDatasource,
|
|
153
|
+
canBeDatasource = _ref2$canBeDatasource === void 0 ? false : _ref2$canBeDatasource;
|
|
300
154
|
var experienceId = id ? id : defaultId;
|
|
301
155
|
(0, _ufoExperiences.succeedUfoExperience)('smart-link-rendered', experienceId, {
|
|
302
156
|
extensionKey: extensionKey,
|
|
@@ -326,17 +180,17 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
326
180
|
* @param error: An error representing why the Smart Link render failed.
|
|
327
181
|
* @param errorInfo: Additional details about the error including the stack trace.
|
|
328
182
|
*/
|
|
329
|
-
renderFailedEvent: function renderFailedEvent(
|
|
330
|
-
var display =
|
|
331
|
-
id =
|
|
332
|
-
error =
|
|
333
|
-
errorInfo =
|
|
334
|
-
extensionKey =
|
|
335
|
-
definitionId =
|
|
336
|
-
resourceType =
|
|
337
|
-
destinationProduct =
|
|
338
|
-
destinationSubproduct =
|
|
339
|
-
location =
|
|
183
|
+
renderFailedEvent: function renderFailedEvent(_ref3) {
|
|
184
|
+
var display = _ref3.display,
|
|
185
|
+
id = _ref3.id,
|
|
186
|
+
error = _ref3.error,
|
|
187
|
+
errorInfo = _ref3.errorInfo,
|
|
188
|
+
extensionKey = _ref3.extensionKey,
|
|
189
|
+
definitionId = _ref3.definitionId,
|
|
190
|
+
resourceType = _ref3.resourceType,
|
|
191
|
+
destinationProduct = _ref3.destinationProduct,
|
|
192
|
+
destinationSubproduct = _ref3.destinationSubproduct,
|
|
193
|
+
location = _ref3.location;
|
|
340
194
|
var experienceId = id ? id : defaultId;
|
|
341
195
|
// Start and fail the smart-link-rendered experience. If it has already
|
|
342
196
|
// been started nothing happens.
|
|
@@ -354,111 +208,6 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
354
208
|
destinationSubproduct: destinationSubproduct,
|
|
355
209
|
location: location
|
|
356
210
|
}), commonAttributes));
|
|
357
|
-
},
|
|
358
|
-
/**
|
|
359
|
-
* This fires an event that represents a hover preview being opened.
|
|
360
|
-
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
361
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
362
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
363
|
-
* @param previewInvokeMethod How the preview was triggered.
|
|
364
|
-
* @returns
|
|
365
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
366
|
-
*/
|
|
367
|
-
hoverCardViewedEvent: function hoverCardViewedEvent(_ref9) {
|
|
368
|
-
var previewDisplay = _ref9.previewDisplay,
|
|
369
|
-
previewInvokeMethod = _ref9.previewInvokeMethod,
|
|
370
|
-
id = _ref9.id,
|
|
371
|
-
extensionKey = _ref9.extensionKey,
|
|
372
|
-
definitionId = _ref9.definitionId,
|
|
373
|
-
resourceType = _ref9.resourceType,
|
|
374
|
-
destinationProduct = _ref9.destinationProduct,
|
|
375
|
-
destinationSubproduct = _ref9.destinationSubproduct,
|
|
376
|
-
location = _ref9.location,
|
|
377
|
-
status = _ref9.status;
|
|
378
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiHoverCardViewedEvent)({
|
|
379
|
-
id: id,
|
|
380
|
-
previewDisplay: previewDisplay,
|
|
381
|
-
extensionKey: extensionKey,
|
|
382
|
-
definitionId: definitionId,
|
|
383
|
-
resourceType: resourceType,
|
|
384
|
-
destinationProduct: destinationProduct,
|
|
385
|
-
destinationSubproduct: destinationSubproduct,
|
|
386
|
-
location: location,
|
|
387
|
-
previewInvokeMethod: previewInvokeMethod,
|
|
388
|
-
status: status
|
|
389
|
-
}), commonAttributes));
|
|
390
|
-
},
|
|
391
|
-
/**
|
|
392
|
-
* This fires an event that represents a hover preview being dismissed.
|
|
393
|
-
* @param hoverDisplay Whether the hover preview was displayed as a card or embed.
|
|
394
|
-
* @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
|
|
395
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
396
|
-
* @param extensionKey The extensionKey of the Smart Link resolver invoked.
|
|
397
|
-
* @param previewInvokeMethod How the preview was triggered.
|
|
398
|
-
* @returns
|
|
399
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
400
|
-
*/
|
|
401
|
-
hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref10) {
|
|
402
|
-
var id = _ref10.id,
|
|
403
|
-
previewDisplay = _ref10.previewDisplay,
|
|
404
|
-
hoverTime = _ref10.hoverTime,
|
|
405
|
-
previewInvokeMethod = _ref10.previewInvokeMethod,
|
|
406
|
-
extensionKey = _ref10.extensionKey,
|
|
407
|
-
definitionId = _ref10.definitionId,
|
|
408
|
-
resourceType = _ref10.resourceType,
|
|
409
|
-
destinationProduct = _ref10.destinationProduct,
|
|
410
|
-
destinationSubproduct = _ref10.destinationSubproduct,
|
|
411
|
-
location = _ref10.location,
|
|
412
|
-
status = _ref10.status;
|
|
413
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiHoverCardDismissedEvent)({
|
|
414
|
-
previewDisplay: previewDisplay,
|
|
415
|
-
id: id,
|
|
416
|
-
hoverTime: hoverTime,
|
|
417
|
-
extensionKey: extensionKey,
|
|
418
|
-
definitionId: definitionId,
|
|
419
|
-
resourceType: resourceType,
|
|
420
|
-
destinationProduct: destinationProduct,
|
|
421
|
-
destinationSubproduct: destinationSubproduct,
|
|
422
|
-
location: location,
|
|
423
|
-
previewInvokeMethod: previewInvokeMethod,
|
|
424
|
-
status: status
|
|
425
|
-
}), commonAttributes));
|
|
426
|
-
},
|
|
427
|
-
/**
|
|
428
|
-
* Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
|
|
429
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
430
|
-
* @param location The location where a link is displayed (jiraWebLinks, confluencePages etc)
|
|
431
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
432
|
-
*/
|
|
433
|
-
learnMoreClickedEvent: function learnMoreClickedEvent() {
|
|
434
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiLearnMoreLinkClickedEvent)(), commonAttributes));
|
|
435
|
-
},
|
|
436
|
-
/**
|
|
437
|
-
* Fires an event that represent a click was performed on a Status Lozenge
|
|
438
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
439
|
-
*/
|
|
440
|
-
smartLinkLozengeActionClickedEvent: function smartLinkLozengeActionClickedEvent() {
|
|
441
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusLozengeButtonClicked)(), commonAttributes));
|
|
442
|
-
},
|
|
443
|
-
/**
|
|
444
|
-
* Fires an event that represent a click was performed on a Status Lozenge's dropdown item
|
|
445
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
446
|
-
*/
|
|
447
|
-
smartLinkLozengeActionListItemClickedEvent: function smartLinkLozengeActionListItemClickedEvent() {
|
|
448
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusListItemButtonClicked)(), commonAttributes));
|
|
449
|
-
},
|
|
450
|
-
/**
|
|
451
|
-
* Fires an event that represent a click was performed on a Status Lozenge open preview button
|
|
452
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
453
|
-
*/
|
|
454
|
-
smartLinkLozengeActionErrorOpenPreviewClickedEvent: function smartLinkLozengeActionErrorOpenPreviewClickedEvent() {
|
|
455
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusOpenPreviewButtonClicked)(), commonAttributes));
|
|
456
|
-
},
|
|
457
|
-
/**
|
|
458
|
-
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
459
|
-
*/
|
|
460
|
-
smartLinkServerActionClickedEvent: function smartLinkServerActionClickedEvent(props) {
|
|
461
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics2.uiServerActionClicked)(props), commonAttributes));
|
|
462
211
|
}
|
|
463
212
|
};
|
|
464
213
|
}, [dispatchAnalytics, commonAttributes, defaultId, extractedExtensionKey]);
|
|
@@ -473,16 +222,16 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
473
222
|
* @param actionType The type of action invoked, e.g. PreviewAction
|
|
474
223
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
475
224
|
*/
|
|
476
|
-
invokeSucceededEvent: function invokeSucceededEvent(
|
|
477
|
-
var id =
|
|
478
|
-
actionType =
|
|
479
|
-
display =
|
|
480
|
-
extensionKey =
|
|
481
|
-
definitionId =
|
|
482
|
-
resourceType =
|
|
483
|
-
destinationProduct =
|
|
484
|
-
destinationSubproduct =
|
|
485
|
-
location =
|
|
225
|
+
invokeSucceededEvent: function invokeSucceededEvent(_ref4) {
|
|
226
|
+
var id = _ref4.id,
|
|
227
|
+
actionType = _ref4.actionType,
|
|
228
|
+
display = _ref4.display,
|
|
229
|
+
extensionKey = _ref4.extensionKey,
|
|
230
|
+
definitionId = _ref4.definitionId,
|
|
231
|
+
resourceType = _ref4.resourceType,
|
|
232
|
+
destinationProduct = _ref4.destinationProduct,
|
|
233
|
+
destinationSubproduct = _ref4.destinationSubproduct,
|
|
234
|
+
location = _ref4.location;
|
|
486
235
|
dispatchAnalytics(applyCommonAttributes((0, _analytics.invokeSucceededEvent)({
|
|
487
236
|
id: id !== null && id !== void 0 ? id : defaultId,
|
|
488
237
|
actionType: actionType,
|
|
@@ -503,17 +252,17 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
503
252
|
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
504
253
|
* @param reason The reason the invocation failed.
|
|
505
254
|
*/
|
|
506
|
-
invokeFailedEvent: function invokeFailedEvent(
|
|
507
|
-
var id =
|
|
508
|
-
actionType =
|
|
509
|
-
display =
|
|
510
|
-
reason =
|
|
511
|
-
extensionKey =
|
|
512
|
-
definitionId =
|
|
513
|
-
resourceType =
|
|
514
|
-
destinationProduct =
|
|
515
|
-
destinationSubproduct =
|
|
516
|
-
location =
|
|
255
|
+
invokeFailedEvent: function invokeFailedEvent(_ref5) {
|
|
256
|
+
var id = _ref5.id,
|
|
257
|
+
actionType = _ref5.actionType,
|
|
258
|
+
display = _ref5.display,
|
|
259
|
+
reason = _ref5.reason,
|
|
260
|
+
extensionKey = _ref5.extensionKey,
|
|
261
|
+
definitionId = _ref5.definitionId,
|
|
262
|
+
resourceType = _ref5.resourceType,
|
|
263
|
+
destinationProduct = _ref5.destinationProduct,
|
|
264
|
+
destinationSubproduct = _ref5.destinationSubproduct,
|
|
265
|
+
location = _ref5.location;
|
|
517
266
|
dispatchAnalytics(applyCommonAttributes((0, _analytics.invokeFailedEvent)({
|
|
518
267
|
id: id !== null && id !== void 0 ? id : defaultId,
|
|
519
268
|
actionType: actionType,
|