@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
|
@@ -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.8"
|
|
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]);
|
|
@@ -12,9 +12,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _useAnalyticsEvents2 = require("../../../../../../common/analytics/generated/use-analytics-events");
|
|
17
|
-
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
18
16
|
var _useInvoke = _interopRequireDefault(require("../../../../../../state/hooks/use-invoke"));
|
|
19
17
|
var _utils = require("../../../../../../state/hooks/use-invoke/utils");
|
|
20
18
|
var _useResolve = _interopRequireDefault(require("../../../../../../state/hooks/use-resolve"));
|
|
@@ -32,7 +30,6 @@ var ServerAction = function ServerAction(_ref) {
|
|
|
32
30
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
33
31
|
isLoading = _useState2[0],
|
|
34
32
|
setIsLoading = _useState2[1];
|
|
35
|
-
var analytics = (0, _flexibleUiContext.useFlexibleUiAnalyticsContext)();
|
|
36
33
|
var invoke = (0, _useInvoke.default)();
|
|
37
34
|
var reload = (0, _useResolve.default)();
|
|
38
35
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
@@ -49,16 +46,10 @@ var ServerAction = function ServerAction(_ref) {
|
|
|
49
46
|
smartLinkActionType = (_action$action = action.action) === null || _action$action === void 0 ? void 0 : _action$action.actionType;
|
|
50
47
|
_context.prev = 2;
|
|
51
48
|
setIsLoading(true);
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
fireEvent('ui.button.clicked.smartLinkFollowButton', {});
|
|
55
|
-
} else {
|
|
56
|
-
fireEvent("ui.button.clicked.".concat(smartLinkActionType), {});
|
|
57
|
-
}
|
|
49
|
+
if (smartLinkActionType === 'FollowEntityAction' || smartLinkActionType === 'UnfollowEntityAction') {
|
|
50
|
+
fireEvent('ui.button.clicked.smartLinkFollowButton', {});
|
|
58
51
|
} else {
|
|
59
|
-
|
|
60
|
-
smartLinkActionType: smartLinkActionType
|
|
61
|
-
});
|
|
52
|
+
fireEvent("ui.button.clicked.".concat(smartLinkActionType), {});
|
|
62
53
|
}
|
|
63
54
|
fireEvent('track.smartLinkQuickAction.started', {
|
|
64
55
|
smartLinkActionType: smartLinkActionType
|
|
@@ -97,7 +88,7 @@ var ServerAction = function ServerAction(_ref) {
|
|
|
97
88
|
return _context.stop();
|
|
98
89
|
}
|
|
99
90
|
}, _callee, null, [[2, 17]]);
|
|
100
|
-
})), [action,
|
|
91
|
+
})), [action, invoke, onClick, onErrorCallback, reload, fireEvent]);
|
|
101
92
|
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({}, props, {
|
|
102
93
|
isLoading: isLoading,
|
|
103
94
|
onClick: handleClick
|
|
@@ -12,10 +12,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
12
12
|
var _react = require("react");
|
|
13
13
|
var _react2 = require("@emotion/react");
|
|
14
14
|
var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu"));
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _useAnalyticsEvents2 = require("../../../../../../common/analytics/generated/use-analytics-events");
|
|
17
16
|
var _extractLozengeActionItems = _interopRequireDefault(require("../../../../../../extractors/action/extract-lozenge-action-items"));
|
|
18
|
-
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
19
17
|
var _useInvoke = _interopRequireDefault(require("../../../../../../state/hooks/use-invoke"));
|
|
20
18
|
var _utils = require("../../../../../../state/hooks/use-invoke/utils");
|
|
21
19
|
var _useResolve = _interopRequireDefault(require("../../../../../../state/hooks/use-resolve"));
|
|
@@ -77,8 +75,6 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
77
75
|
errorMessage = _useState12[0],
|
|
78
76
|
setErrorMessage = _useState12[1];
|
|
79
77
|
var reload = (0, _useResolve.default)();
|
|
80
|
-
//TODO EDM-6583 Replace usage of useFlexibleUiAnalyticsContext with linking platform analytics context from find team.
|
|
81
|
-
var analytics = (0, _flexibleUiContext.useFlexibleUiAnalyticsContext)();
|
|
82
78
|
var invoke = (0, _useInvoke.default)();
|
|
83
79
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
84
80
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
@@ -103,11 +99,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
103
99
|
_context.next = 24;
|
|
104
100
|
break;
|
|
105
101
|
}
|
|
106
|
-
|
|
107
|
-
fireEvent('ui.button.clicked.smartLinkStatusLozenge', {});
|
|
108
|
-
} else {
|
|
109
|
-
analytics === null || analytics === void 0 || analytics.ui.smartLinkLozengeActionClickedEvent();
|
|
110
|
-
}
|
|
102
|
+
fireEvent('ui.button.clicked.smartLinkStatusLozenge', {});
|
|
111
103
|
fireEvent('track.smartLinkQuickAction.started', {
|
|
112
104
|
smartLinkActionType: _analytics.TrackQuickActionType.StatusUpdate
|
|
113
105
|
});
|
|
@@ -154,7 +146,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
154
146
|
return function (_x) {
|
|
155
147
|
return _ref3.apply(this, arguments);
|
|
156
148
|
};
|
|
157
|
-
}(), [action.read,
|
|
149
|
+
}(), [action.read, invoke, isLoaded, text, fireEvent]);
|
|
158
150
|
var trigger = (0, _react.useCallback)(function (props) {
|
|
159
151
|
return (0, _react2.jsx)(_lozengeActionTrigger.default, (0, _extends2.default)({}, props, {
|
|
160
152
|
appearance: selected.appearance,
|
|
@@ -170,11 +162,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
170
162
|
while (1) switch (_context2.prev = _context2.next) {
|
|
171
163
|
case 0:
|
|
172
164
|
_context2.prev = 0;
|
|
173
|
-
|
|
174
|
-
fireEvent('ui.button.clicked.smartLinkStatusListItem', {});
|
|
175
|
-
} else {
|
|
176
|
-
analytics === null || analytics === void 0 || analytics.ui.smartLinkLozengeActionListItemClickedEvent();
|
|
177
|
-
}
|
|
165
|
+
fireEvent('ui.button.clicked.smartLinkStatusListItem', {});
|
|
178
166
|
updateAction = action === null || action === void 0 ? void 0 : action.update;
|
|
179
167
|
if (!(updateAction && id)) {
|
|
180
168
|
_context2.next = 17;
|
|
@@ -225,7 +213,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
225
213
|
return function (_x2, _x3, _x4) {
|
|
226
214
|
return _ref4.apply(this, arguments);
|
|
227
215
|
};
|
|
228
|
-
}(), [action === null || action === void 0 ? void 0 : action.update,
|
|
216
|
+
}(), [action === null || action === void 0 ? void 0 : action.update, invoke, linkId, reload, url, fireEvent]);
|
|
229
217
|
var dropdownItemGroup = (0, _react.useMemo)(function () {
|
|
230
218
|
if (errorMessage) {
|
|
231
219
|
return (0, _react2.jsx)(_lozengeActionError.default, {
|
|
@@ -47,11 +47,7 @@ var LozengeActionError = function LozengeActionError(_ref) {
|
|
|
47
47
|
}, [reload, url]);
|
|
48
48
|
var handlePreviewOpen = (0, _react.useCallback)(function () {
|
|
49
49
|
if (isPreviewAvailable) {
|
|
50
|
-
|
|
51
|
-
fireEvent('ui.button.clicked.smartLinkStatusOpenPreview', {});
|
|
52
|
-
} else {
|
|
53
|
-
analytics === null || analytics === void 0 || analytics.ui.smartLinkLozengeActionErrorOpenPreviewClickedEvent();
|
|
54
|
-
}
|
|
50
|
+
fireEvent('ui.button.clicked.smartLinkStatusOpenPreview', {});
|
|
55
51
|
if ((0, _platformFeatureFlags.fg)('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
56
52
|
invokePreviewAction && invoke(invokePreviewAction);
|
|
57
53
|
} else {
|