@atlaskit/smart-card 32.5.0 → 32.6.0

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/analytics.spec.yaml +163 -0
  3. package/dist/cjs/state/actions/index.js +53 -49
  4. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +14 -128
  5. package/dist/cjs/utils/analytics/analytics.js +150 -234
  6. package/dist/cjs/utils/analytics/index.js +1 -89
  7. package/dist/cjs/view/CardWithUrl/component.js +37 -40
  8. package/dist/cjs/view/CardWithUrl/loader.js +7 -16
  9. package/dist/cjs/view/EmbedCard/index.js +19 -44
  10. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
  11. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
  12. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -2
  13. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +64 -20
  14. package/dist/cjs/view/LinkUrl/index.js +12 -5
  15. package/dist/cjs/view/common/Metadata.js +1 -1
  16. package/dist/cjs/view/common/UnauthorisedViewContent.js +10 -2
  17. package/dist/es2019/state/actions/index.js +53 -49
  18. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +15 -136
  19. package/dist/es2019/utils/analytics/analytics.js +43 -133
  20. package/dist/es2019/utils/analytics/index.js +1 -61
  21. package/dist/es2019/view/CardWithUrl/component.js +37 -40
  22. package/dist/es2019/view/CardWithUrl/loader.js +7 -16
  23. package/dist/es2019/view/EmbedCard/index.js +20 -45
  24. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
  25. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
  26. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +11 -2
  27. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +63 -20
  28. package/dist/es2019/view/LinkUrl/index.js +9 -3
  29. package/dist/es2019/view/common/Metadata.js +1 -1
  30. package/dist/es2019/view/common/UnauthorisedViewContent.js +11 -2
  31. package/dist/esm/state/actions/index.js +53 -49
  32. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +15 -129
  33. package/dist/esm/utils/analytics/analytics.js +149 -233
  34. package/dist/esm/utils/analytics/index.js +1 -59
  35. package/dist/esm/view/CardWithUrl/component.js +37 -40
  36. package/dist/esm/view/CardWithUrl/loader.js +7 -16
  37. package/dist/esm/view/EmbedCard/index.js +19 -44
  38. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
  39. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
  40. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -2
  41. package/dist/esm/view/HoverCard/components/HoverCardContent.js +65 -21
  42. package/dist/esm/view/LinkUrl/index.js +11 -4
  43. package/dist/esm/view/common/Metadata.js +1 -1
  44. package/dist/esm/view/common/UnauthorisedViewContent.js +10 -2
  45. package/dist/types/common/analytics/generated/analytics.types.d.ts +83 -1
  46. package/dist/types/state/analytics/useLinkClicked.d.ts +1 -1
  47. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +15 -38
  48. package/dist/types/state/hooks/useSmartLink.d.ts +0 -4
  49. package/dist/types/utils/analytics/analytics.d.ts +32 -16
  50. package/dist/types/utils/analytics/click.d.ts +3 -8
  51. package/dist/types/utils/analytics/index.d.ts +1 -7
  52. package/dist/types/utils/analytics/types.d.ts +22 -22
  53. package/dist/types/utils/mocks.d.ts +0 -4
  54. package/dist/types/view/LinkUrl/index.d.ts +4 -0
  55. package/dist/types/view/LinkUrl/types.d.ts +1 -0
  56. package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +83 -1
  57. package/dist/types-ts4.5/state/analytics/useLinkClicked.d.ts +1 -1
  58. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +15 -38
  59. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -4
  60. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +32 -16
  61. package/dist/types-ts4.5/utils/analytics/click.d.ts +3 -8
  62. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -7
  63. package/dist/types-ts4.5/utils/analytics/types.d.ts +22 -22
  64. package/dist/types-ts4.5/utils/mocks.d.ts +0 -4
  65. package/dist/types-ts4.5/view/LinkUrl/index.d.ts +4 -0
  66. package/dist/types-ts4.5/view/LinkUrl/types.d.ts +1 -0
  67. package/package.json +14 -14
@@ -10,7 +10,7 @@ export var ANALYTICS_CHANNEL = 'media';
10
10
  export var context = {
11
11
  componentName: 'smart-cards',
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "32.5.0"
13
+ packageVersion: "32.6.0"
14
14
  };
15
15
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
16
16
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -57,69 +57,15 @@ export var fireSmartLinkEvent = function fireSmartLinkEvent(payload, createAnaly
57
57
  createAnalyticsEvent(payload).fire(ANALYTICS_CHANNEL);
58
58
  }
59
59
  };
60
-
61
- /**
62
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
63
- */
64
- export var resolvedEvent = function resolvedEvent(props) {
65
- return {
66
- action: 'resolved',
67
- actionSubject: 'smartLink',
68
- eventType: 'operational',
69
- attributes: _objectSpread(_objectSpread({}, props), context)
70
- };
71
- };
72
-
73
- /**
74
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
75
- */
76
- export var unresolvedEvent = function unresolvedEvent(_ref) {
60
+ export var invokeSucceededEvent = function invokeSucceededEvent(_ref) {
77
61
  var id = _ref.id,
78
- definitionId = _ref.definitionId,
62
+ actionType = _ref.actionType,
63
+ display = _ref.display,
79
64
  extensionKey = _ref.extensionKey,
80
- resourceType = _ref.resourceType,
81
- destinationSubproduct = _ref.destinationSubproduct,
65
+ definitionId = _ref.definitionId,
82
66
  destinationProduct = _ref.destinationProduct,
83
- error = _ref.error,
84
- status = _ref.status,
67
+ destinationSubproduct = _ref.destinationSubproduct,
85
68
  location = _ref.location;
86
- return {
87
- action: 'unresolved',
88
- actionSubject: 'smartLink',
89
- eventType: 'operational',
90
- attributes: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
91
- id: id
92
- }, context), definitionId ? {
93
- definitionId: definitionId
94
- } : {}), extensionKey ? {
95
- extensionKey: extensionKey
96
- } : {}), resourceType ? {
97
- resourceType: resourceType
98
- } : {}), destinationSubproduct ? {
99
- destinationSubproduct: destinationSubproduct
100
- } : {}), destinationProduct ? {
101
- destinationProduct: destinationProduct
102
- } : {}), location ? {
103
- location: location
104
- } : {}), {}, {
105
- reason: status,
106
- error: error ? {
107
- message: error === null || error === void 0 ? void 0 : error.message,
108
- kind: error === null || error === void 0 ? void 0 : error.kind,
109
- type: error === null || error === void 0 ? void 0 : error.type
110
- } : undefined
111
- })
112
- };
113
- };
114
- export var invokeSucceededEvent = function invokeSucceededEvent(_ref2) {
115
- var id = _ref2.id,
116
- actionType = _ref2.actionType,
117
- display = _ref2.display,
118
- extensionKey = _ref2.extensionKey,
119
- definitionId = _ref2.definitionId,
120
- destinationProduct = _ref2.destinationProduct,
121
- destinationSubproduct = _ref2.destinationSubproduct,
122
- location = _ref2.location;
123
69
  var measure = id ? getMeasure(id, 'resolved') : undefined;
124
70
  return {
125
71
  action: 'resolved',
@@ -138,16 +84,16 @@ export var invokeSucceededEvent = function invokeSucceededEvent(_ref2) {
138
84
  })
139
85
  };
140
86
  };
141
- export var invokeFailedEvent = function invokeFailedEvent(_ref3) {
142
- var id = _ref3.id,
143
- actionType = _ref3.actionType,
144
- display = _ref3.display,
145
- reason = _ref3.reason,
146
- extensionKey = _ref3.extensionKey,
147
- definitionId = _ref3.definitionId,
148
- destinationProduct = _ref3.destinationProduct,
149
- destinationSubproduct = _ref3.destinationSubproduct,
150
- location = _ref3.location;
87
+ export var invokeFailedEvent = function invokeFailedEvent(_ref2) {
88
+ var id = _ref2.id,
89
+ actionType = _ref2.actionType,
90
+ display = _ref2.display,
91
+ reason = _ref2.reason,
92
+ extensionKey = _ref2.extensionKey,
93
+ definitionId = _ref2.definitionId,
94
+ destinationProduct = _ref2.destinationProduct,
95
+ destinationSubproduct = _ref2.destinationSubproduct,
96
+ location = _ref2.location;
151
97
  var measure = id ? getMeasure(id, 'errored') : undefined;
152
98
  return {
153
99
  action: 'unresolved',
@@ -169,60 +115,15 @@ export var invokeFailedEvent = function invokeFailedEvent(_ref3) {
169
115
  };
170
116
 
171
117
  /**
172
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
173
- */
174
- export var connectSucceededEvent = function connectSucceededEvent(_ref4) {
175
- var definitionId = _ref4.definitionId,
176
- extensionKey = _ref4.extensionKey,
177
- destinationProduct = _ref4.destinationProduct,
178
- destinationSubproduct = _ref4.destinationSubproduct,
179
- location = _ref4.location;
180
- return {
181
- action: 'connectSucceeded',
182
- actionSubject: 'smartLink',
183
- eventType: 'operational',
184
- attributes: _objectSpread(_objectSpread({}, context), {}, {
185
- definitionId: definitionId,
186
- extensionKey: extensionKey,
187
- destinationProduct: destinationProduct,
188
- destinationSubproduct: destinationSubproduct,
189
- location: location
190
- })
191
- };
192
- };
193
-
194
- /**
195
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
118
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
196
119
  */
197
- export var connectFailedEvent = function connectFailedEvent(_ref5) {
198
- var definitionId = _ref5.definitionId,
199
- extensionKey = _ref5.extensionKey,
200
- destinationProduct = _ref5.destinationProduct,
201
- destinationSubproduct = _ref5.destinationSubproduct,
202
- location = _ref5.location,
203
- reason = _ref5.reason;
204
- return {
205
- action: 'connectFailed',
206
- actionSubject: 'smartLink',
207
- actionSubjectId: reason,
208
- eventType: 'operational',
209
- attributes: _objectSpread(_objectSpread({}, context), {}, {
210
- reason: reason,
211
- extensionKey: extensionKey,
212
- definitionId: definitionId,
213
- destinationProduct: destinationProduct,
214
- destinationSubproduct: destinationSubproduct,
215
- location: location
216
- })
217
- };
218
- };
219
- export var uiAuthEvent = function uiAuthEvent(_ref6) {
220
- var definitionId = _ref6.definitionId,
221
- extensionKey = _ref6.extensionKey,
222
- destinationProduct = _ref6.destinationProduct,
223
- destinationSubproduct = _ref6.destinationSubproduct,
224
- location = _ref6.location,
225
- display = _ref6.display;
120
+ export var uiAuthEvent = function uiAuthEvent(_ref3) {
121
+ var definitionId = _ref3.definitionId,
122
+ extensionKey = _ref3.extensionKey,
123
+ destinationProduct = _ref3.destinationProduct,
124
+ destinationSubproduct = _ref3.destinationSubproduct,
125
+ location = _ref3.location,
126
+ display = _ref3.display;
226
127
  return {
227
128
  action: 'clicked',
228
129
  actionSubject: 'button',
@@ -238,13 +139,17 @@ export var uiAuthEvent = function uiAuthEvent(_ref6) {
238
139
  })
239
140
  };
240
141
  };
241
- export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref7) {
242
- var definitionId = _ref7.definitionId,
243
- extensionKey = _ref7.extensionKey,
244
- destinationProduct = _ref7.destinationProduct,
245
- destinationSubproduct = _ref7.destinationSubproduct,
246
- location = _ref7.location,
247
- display = _ref7.display;
142
+
143
+ /**
144
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
145
+ */
146
+ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref4) {
147
+ var definitionId = _ref4.definitionId,
148
+ extensionKey = _ref4.extensionKey,
149
+ destinationProduct = _ref4.destinationProduct,
150
+ destinationSubproduct = _ref4.destinationSubproduct,
151
+ location = _ref4.location,
152
+ display = _ref4.display;
248
153
  return {
249
154
  action: 'clicked',
250
155
  actionSubject: 'smartLink',
@@ -260,17 +165,21 @@ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_r
260
165
  })
261
166
  };
262
167
  };
263
- export var uiCardClickedEvent = function uiCardClickedEvent(_ref8) {
264
- var id = _ref8.id,
265
- display = _ref8.display,
266
- status = _ref8.status,
267
- definitionId = _ref8.definitionId,
268
- extensionKey = _ref8.extensionKey,
269
- isModifierKeyPressed = _ref8.isModifierKeyPressed,
270
- location = _ref8.location,
271
- destinationProduct = _ref8.destinationProduct,
272
- destinationSubproduct = _ref8.destinationSubproduct,
273
- actionSubjectId = _ref8.actionSubjectId;
168
+
169
+ /**
170
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
171
+ */
172
+ export var uiCardClickedEvent = function uiCardClickedEvent(_ref5) {
173
+ var id = _ref5.id,
174
+ display = _ref5.display,
175
+ status = _ref5.status,
176
+ definitionId = _ref5.definitionId,
177
+ extensionKey = _ref5.extensionKey,
178
+ isModifierKeyPressed = _ref5.isModifierKeyPressed,
179
+ location = _ref5.location,
180
+ destinationProduct = _ref5.destinationProduct,
181
+ destinationSubproduct = _ref5.destinationSubproduct,
182
+ actionSubjectId = _ref5.actionSubjectId;
274
183
  return {
275
184
  action: 'clicked',
276
185
  actionSubject: 'smartLink',
@@ -289,15 +198,15 @@ export var uiCardClickedEvent = function uiCardClickedEvent(_ref8) {
289
198
  })
290
199
  };
291
200
  };
292
- export var uiActionClickedEvent = function uiActionClickedEvent(_ref9) {
293
- var id = _ref9.id,
294
- actionType = _ref9.actionType,
295
- extensionKey = _ref9.extensionKey,
296
- display = _ref9.display,
297
- definitionId = _ref9.definitionId,
298
- destinationProduct = _ref9.destinationProduct,
299
- destinationSubproduct = _ref9.destinationSubproduct,
300
- location = _ref9.location;
201
+ export var uiActionClickedEvent = function uiActionClickedEvent(_ref6) {
202
+ var id = _ref6.id,
203
+ actionType = _ref6.actionType,
204
+ extensionKey = _ref6.extensionKey,
205
+ display = _ref6.display,
206
+ definitionId = _ref6.definitionId,
207
+ destinationProduct = _ref6.destinationProduct,
208
+ destinationSubproduct = _ref6.destinationSubproduct,
209
+ location = _ref6.location;
301
210
  return {
302
211
  action: 'clicked',
303
212
  actionSubject: 'button',
@@ -315,13 +224,17 @@ export var uiActionClickedEvent = function uiActionClickedEvent(_ref9) {
315
224
  })
316
225
  };
317
226
  };
318
- export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref10) {
319
- var display = _ref10.display,
320
- extensionKey = _ref10.extensionKey,
321
- definitionId = _ref10.definitionId,
322
- destinationProduct = _ref10.destinationProduct,
323
- destinationSubproduct = _ref10.destinationSubproduct,
324
- location = _ref10.location;
227
+
228
+ /**
229
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
230
+ */
231
+ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref7) {
232
+ var display = _ref7.display,
233
+ extensionKey = _ref7.extensionKey,
234
+ definitionId = _ref7.definitionId,
235
+ destinationProduct = _ref7.destinationProduct,
236
+ destinationSubproduct = _ref7.destinationSubproduct,
237
+ location = _ref7.location;
325
238
  return {
326
239
  action: 'closed',
327
240
  actionSubject: 'consentModal',
@@ -336,15 +249,15 @@ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref10) {
336
249
  })
337
250
  };
338
251
  };
339
- export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref11) {
340
- var display = _ref11.display,
341
- status = _ref11.status,
342
- extensionKey = _ref11.extensionKey,
343
- definitionId = _ref11.definitionId,
344
- destinationProduct = _ref11.destinationProduct,
345
- destinationSubproduct = _ref11.destinationSubproduct,
346
- location = _ref11.location,
347
- canBeDatasource = _ref11.canBeDatasource;
252
+ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref8) {
253
+ var display = _ref8.display,
254
+ status = _ref8.status,
255
+ extensionKey = _ref8.extensionKey,
256
+ definitionId = _ref8.definitionId,
257
+ destinationProduct = _ref8.destinationProduct,
258
+ destinationSubproduct = _ref8.destinationSubproduct,
259
+ location = _ref8.location,
260
+ canBeDatasource = _ref8.canBeDatasource;
348
261
  return {
349
262
  action: 'renderSuccess',
350
263
  actionSubject: 'smartLink',
@@ -361,15 +274,15 @@ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref11) {
361
274
  })
362
275
  };
363
276
  };
364
- export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref12) {
365
- var display = _ref12.display,
366
- error = _ref12.error,
367
- errorInfo = _ref12.errorInfo,
368
- extensionKey = _ref12.extensionKey,
369
- definitionId = _ref12.definitionId,
370
- destinationProduct = _ref12.destinationProduct,
371
- destinationSubproduct = _ref12.destinationSubproduct,
372
- location = _ref12.location;
277
+ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref9) {
278
+ var display = _ref9.display,
279
+ error = _ref9.error,
280
+ errorInfo = _ref9.errorInfo,
281
+ extensionKey = _ref9.extensionKey,
282
+ definitionId = _ref9.definitionId,
283
+ destinationProduct = _ref9.destinationProduct,
284
+ destinationSubproduct = _ref9.destinationSubproduct,
285
+ location = _ref9.location;
373
286
  return {
374
287
  actionSubject: 'smartLink',
375
288
  action: 'renderFailed',
@@ -386,16 +299,20 @@ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref12) {
386
299
  })
387
300
  };
388
301
  };
389
- export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref13) {
390
- var id = _ref13.id,
391
- previewDisplay = _ref13.previewDisplay,
392
- extensionKey = _ref13.extensionKey,
393
- definitionId = _ref13.definitionId,
394
- destinationProduct = _ref13.destinationProduct,
395
- destinationSubproduct = _ref13.destinationSubproduct,
396
- location = _ref13.location,
397
- previewInvokeMethod = _ref13.previewInvokeMethod,
398
- status = _ref13.status;
302
+
303
+ /**
304
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
305
+ */
306
+ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref10) {
307
+ var id = _ref10.id,
308
+ previewDisplay = _ref10.previewDisplay,
309
+ extensionKey = _ref10.extensionKey,
310
+ definitionId = _ref10.definitionId,
311
+ destinationProduct = _ref10.destinationProduct,
312
+ destinationSubproduct = _ref10.destinationSubproduct,
313
+ location = _ref10.location,
314
+ previewInvokeMethod = _ref10.previewInvokeMethod,
315
+ status = _ref10.status;
399
316
  return {
400
317
  action: 'viewed',
401
318
  actionSubject: 'hoverCard',
@@ -413,17 +330,21 @@ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref13) {
413
330
  })
414
331
  };
415
332
  };
416
- export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref14) {
417
- var id = _ref14.id,
418
- previewDisplay = _ref14.previewDisplay,
419
- hoverTime = _ref14.hoverTime,
420
- extensionKey = _ref14.extensionKey,
421
- definitionId = _ref14.definitionId,
422
- destinationProduct = _ref14.destinationProduct,
423
- destinationSubproduct = _ref14.destinationSubproduct,
424
- location = _ref14.location,
425
- previewInvokeMethod = _ref14.previewInvokeMethod,
426
- status = _ref14.status;
333
+
334
+ /**
335
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
336
+ */
337
+ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref11) {
338
+ var id = _ref11.id,
339
+ previewDisplay = _ref11.previewDisplay,
340
+ hoverTime = _ref11.hoverTime,
341
+ extensionKey = _ref11.extensionKey,
342
+ definitionId = _ref11.definitionId,
343
+ destinationProduct = _ref11.destinationProduct,
344
+ destinationSubproduct = _ref11.destinationSubproduct,
345
+ location = _ref11.location,
346
+ previewInvokeMethod = _ref11.previewInvokeMethod,
347
+ status = _ref11.status;
427
348
  return {
428
349
  action: 'dismissed',
429
350
  actionSubject: 'hoverCard',
@@ -442,15 +363,19 @@ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref14
442
363
  })
443
364
  };
444
365
  };
445
- export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref15) {
446
- var id = _ref15.id,
447
- previewDisplay = _ref15.previewDisplay,
448
- extensionKey = _ref15.extensionKey,
449
- definitionId = _ref15.definitionId,
450
- destinationProduct = _ref15.destinationProduct,
451
- destinationSubproduct = _ref15.destinationSubproduct,
452
- location = _ref15.location,
453
- previewInvokeMethod = _ref15.previewInvokeMethod;
366
+
367
+ /**
368
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
369
+ */
370
+ export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref12) {
371
+ var id = _ref12.id,
372
+ previewDisplay = _ref12.previewDisplay,
373
+ extensionKey = _ref12.extensionKey,
374
+ definitionId = _ref12.definitionId,
375
+ destinationProduct = _ref12.destinationProduct,
376
+ destinationSubproduct = _ref12.destinationSubproduct,
377
+ location = _ref12.location,
378
+ previewInvokeMethod = _ref12.previewInvokeMethod;
454
379
  return {
455
380
  action: 'clicked',
456
381
  actionSubject: 'button',
@@ -468,6 +393,10 @@ export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClicked
468
393
  })
469
394
  };
470
395
  };
396
+
397
+ /**
398
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
399
+ */
471
400
  export var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent() {
472
401
  return {
473
402
  action: 'clicked',
@@ -479,33 +408,8 @@ export var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent()
479
408
  };
480
409
 
481
410
  /**
482
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
411
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
483
412
  */
484
- export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref16) {
485
- var display = _ref16.display,
486
- error = _ref16.error,
487
- errorInfo = _ref16.errorInfo,
488
- extensionKey = _ref16.extensionKey,
489
- definitionId = _ref16.definitionId,
490
- destinationProduct = _ref16.destinationProduct,
491
- destinationSubproduct = _ref16.destinationSubproduct,
492
- location = _ref16.location;
493
- return {
494
- action: 'chunkLoadFailed',
495
- actionSubject: 'smartLink',
496
- eventType: 'operational',
497
- attributes: _objectSpread(_objectSpread({}, context), {}, {
498
- error: error,
499
- errorInfo: errorInfo,
500
- display: display,
501
- extensionKey: extensionKey,
502
- definitionId: definitionId,
503
- destinationProduct: destinationProduct,
504
- destinationSubproduct: destinationSubproduct,
505
- location: location
506
- })
507
- };
508
- };
509
413
  export var uiSmartLinkStatusLozengeButtonClicked = function uiSmartLinkStatusLozengeButtonClicked() {
510
414
  return {
511
415
  action: 'clicked',
@@ -515,6 +419,10 @@ export var uiSmartLinkStatusLozengeButtonClicked = function uiSmartLinkStatusLoz
515
419
  attributes: _objectSpread({}, context)
516
420
  };
517
421
  };
422
+
423
+ /**
424
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
425
+ */
518
426
  export var uiSmartLinkStatusListItemButtonClicked = function uiSmartLinkStatusListItemButtonClicked() {
519
427
  return {
520
428
  action: 'clicked',
@@ -524,6 +432,10 @@ export var uiSmartLinkStatusListItemButtonClicked = function uiSmartLinkStatusLi
524
432
  attributes: _objectSpread({}, context)
525
433
  };
526
434
  };
435
+
436
+ /**
437
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
438
+ */
527
439
  export var uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatusOpenPreviewButtonClicked() {
528
440
  return {
529
441
  action: 'clicked',
@@ -533,9 +445,13 @@ export var uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatu
533
445
  attributes: _objectSpread({}, context)
534
446
  };
535
447
  };
536
- export var uiServerActionClicked = function uiServerActionClicked(_ref17) {
448
+
449
+ /**
450
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
451
+ */
452
+ export var uiServerActionClicked = function uiServerActionClicked(_ref13) {
537
453
  var _SmartLinkActionTypeU2;
538
- var smartLinkActionType = _ref17.smartLinkActionType;
454
+ var smartLinkActionType = _ref13.smartLinkActionType;
539
455
  return {
540
456
  action: 'clicked',
541
457
  actionSubject: 'button',
@@ -1,59 +1 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- 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; }
3
- 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) { _defineProperty(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; }
4
- import { getMeasure } from '../performance';
5
- import { resolvedEvent, unresolvedEvent } from './analytics';
6
- export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from './analytics';
7
-
8
- /**
9
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
10
- */
11
- export var instrumentEvent = function instrumentEvent(_ref) {
12
- var id = _ref.id,
13
- status = _ref.status,
14
- extensionKey = _ref.extensionKey,
15
- definitionId = _ref.definitionId,
16
- resourceType = _ref.resourceType,
17
- destinationProduct = _ref.destinationProduct,
18
- destinationSubproduct = _ref.destinationSubproduct,
19
- location = _ref.location,
20
- error = _ref.error;
21
- var measure = getMeasure(id, status) || {
22
- duration: undefined
23
- };
24
- if (status === 'resolved') {
25
- var event = resolvedEvent({
26
- id: id,
27
- extensionKey: extensionKey,
28
- definitionId: definitionId,
29
- resourceType: resourceType,
30
- destinationProduct: destinationProduct,
31
- destinationSubproduct: destinationSubproduct,
32
- location: location
33
- });
34
- return _objectSpread(_objectSpread({}, event), {}, {
35
- attributes: _objectSpread(_objectSpread({}, event.attributes), {}, {
36
- duration: measure.duration
37
- })
38
- });
39
- } else {
40
- if ((error === null || error === void 0 ? void 0 : error.type) !== 'ResolveUnsupportedError') {
41
- var _event = unresolvedEvent({
42
- id: id,
43
- status: status,
44
- extensionKey: extensionKey,
45
- definitionId: definitionId,
46
- resourceType: resourceType,
47
- destinationProduct: destinationProduct,
48
- destinationSubproduct: destinationSubproduct,
49
- location: location,
50
- error: error
51
- });
52
- return _objectSpread(_objectSpread({}, _event), {}, {
53
- attributes: _objectSpread(_objectSpread({}, _event.attributes), {}, {
54
- duration: measure.duration
55
- })
56
- });
57
- }
58
- }
59
- };
1
+ export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, invokeSucceededEvent, invokeFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from './analytics';