@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
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiServerActionClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.SmartLinkActionTypeUiEventMapper = exports.SmartLinkActionTypeTrackingEventMapper = exports.ANALYTICS_CHANNEL = void 0;
7
+ exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiServerActionClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.SmartLinkActionTypeUiEventMapper = exports.SmartLinkActionTypeTrackingEventMapper = exports.ANALYTICS_CHANNEL = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
@@ -17,7 +17,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
17
17
  var context = exports.context = {
18
18
  componentName: 'smart-cards',
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "32.5.0"
20
+ packageVersion: "32.6.0"
21
21
  };
22
22
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
23
23
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -64,69 +64,15 @@ var fireSmartLinkEvent = exports.fireSmartLinkEvent = function fireSmartLinkEven
64
64
  createAnalyticsEvent(payload).fire(ANALYTICS_CHANNEL);
65
65
  }
66
66
  };
67
-
68
- /**
69
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
70
- */
71
- var resolvedEvent = exports.resolvedEvent = function resolvedEvent(props) {
72
- return {
73
- action: 'resolved',
74
- actionSubject: 'smartLink',
75
- eventType: 'operational',
76
- attributes: _objectSpread(_objectSpread({}, props), context)
77
- };
78
- };
79
-
80
- /**
81
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
82
- */
83
- var unresolvedEvent = exports.unresolvedEvent = function unresolvedEvent(_ref) {
67
+ var invokeSucceededEvent = exports.invokeSucceededEvent = function invokeSucceededEvent(_ref) {
84
68
  var id = _ref.id,
85
- definitionId = _ref.definitionId,
69
+ actionType = _ref.actionType,
70
+ display = _ref.display,
86
71
  extensionKey = _ref.extensionKey,
87
- resourceType = _ref.resourceType,
88
- destinationSubproduct = _ref.destinationSubproduct,
72
+ definitionId = _ref.definitionId,
89
73
  destinationProduct = _ref.destinationProduct,
90
- error = _ref.error,
91
- status = _ref.status,
74
+ destinationSubproduct = _ref.destinationSubproduct,
92
75
  location = _ref.location;
93
- return {
94
- action: 'unresolved',
95
- actionSubject: 'smartLink',
96
- eventType: 'operational',
97
- attributes: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
98
- id: id
99
- }, context), definitionId ? {
100
- definitionId: definitionId
101
- } : {}), extensionKey ? {
102
- extensionKey: extensionKey
103
- } : {}), resourceType ? {
104
- resourceType: resourceType
105
- } : {}), destinationSubproduct ? {
106
- destinationSubproduct: destinationSubproduct
107
- } : {}), destinationProduct ? {
108
- destinationProduct: destinationProduct
109
- } : {}), location ? {
110
- location: location
111
- } : {}), {}, {
112
- reason: status,
113
- error: error ? {
114
- message: error === null || error === void 0 ? void 0 : error.message,
115
- kind: error === null || error === void 0 ? void 0 : error.kind,
116
- type: error === null || error === void 0 ? void 0 : error.type
117
- } : undefined
118
- })
119
- };
120
- };
121
- var invokeSucceededEvent = exports.invokeSucceededEvent = function invokeSucceededEvent(_ref2) {
122
- var id = _ref2.id,
123
- actionType = _ref2.actionType,
124
- display = _ref2.display,
125
- extensionKey = _ref2.extensionKey,
126
- definitionId = _ref2.definitionId,
127
- destinationProduct = _ref2.destinationProduct,
128
- destinationSubproduct = _ref2.destinationSubproduct,
129
- location = _ref2.location;
130
76
  var measure = id ? (0, _performance.getMeasure)(id, 'resolved') : undefined;
131
77
  return {
132
78
  action: 'resolved',
@@ -145,16 +91,16 @@ var invokeSucceededEvent = exports.invokeSucceededEvent = function invokeSucceed
145
91
  })
146
92
  };
147
93
  };
148
- var invokeFailedEvent = exports.invokeFailedEvent = function invokeFailedEvent(_ref3) {
149
- var id = _ref3.id,
150
- actionType = _ref3.actionType,
151
- display = _ref3.display,
152
- reason = _ref3.reason,
153
- extensionKey = _ref3.extensionKey,
154
- definitionId = _ref3.definitionId,
155
- destinationProduct = _ref3.destinationProduct,
156
- destinationSubproduct = _ref3.destinationSubproduct,
157
- location = _ref3.location;
94
+ var invokeFailedEvent = exports.invokeFailedEvent = function invokeFailedEvent(_ref2) {
95
+ var id = _ref2.id,
96
+ actionType = _ref2.actionType,
97
+ display = _ref2.display,
98
+ reason = _ref2.reason,
99
+ extensionKey = _ref2.extensionKey,
100
+ definitionId = _ref2.definitionId,
101
+ destinationProduct = _ref2.destinationProduct,
102
+ destinationSubproduct = _ref2.destinationSubproduct,
103
+ location = _ref2.location;
158
104
  var measure = id ? (0, _performance.getMeasure)(id, 'errored') : undefined;
159
105
  return {
160
106
  action: 'unresolved',
@@ -176,60 +122,15 @@ var invokeFailedEvent = exports.invokeFailedEvent = function invokeFailedEvent(_
176
122
  };
177
123
 
178
124
  /**
179
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
180
- */
181
- var connectSucceededEvent = exports.connectSucceededEvent = function connectSucceededEvent(_ref4) {
182
- var definitionId = _ref4.definitionId,
183
- extensionKey = _ref4.extensionKey,
184
- destinationProduct = _ref4.destinationProduct,
185
- destinationSubproduct = _ref4.destinationSubproduct,
186
- location = _ref4.location;
187
- return {
188
- action: 'connectSucceeded',
189
- actionSubject: 'smartLink',
190
- eventType: 'operational',
191
- attributes: _objectSpread(_objectSpread({}, context), {}, {
192
- definitionId: definitionId,
193
- extensionKey: extensionKey,
194
- destinationProduct: destinationProduct,
195
- destinationSubproduct: destinationSubproduct,
196
- location: location
197
- })
198
- };
199
- };
200
-
201
- /**
202
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
125
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
203
126
  */
204
- var connectFailedEvent = exports.connectFailedEvent = function connectFailedEvent(_ref5) {
205
- var definitionId = _ref5.definitionId,
206
- extensionKey = _ref5.extensionKey,
207
- destinationProduct = _ref5.destinationProduct,
208
- destinationSubproduct = _ref5.destinationSubproduct,
209
- location = _ref5.location,
210
- reason = _ref5.reason;
211
- return {
212
- action: 'connectFailed',
213
- actionSubject: 'smartLink',
214
- actionSubjectId: reason,
215
- eventType: 'operational',
216
- attributes: _objectSpread(_objectSpread({}, context), {}, {
217
- reason: reason,
218
- extensionKey: extensionKey,
219
- definitionId: definitionId,
220
- destinationProduct: destinationProduct,
221
- destinationSubproduct: destinationSubproduct,
222
- location: location
223
- })
224
- };
225
- };
226
- var uiAuthEvent = exports.uiAuthEvent = function uiAuthEvent(_ref6) {
227
- var definitionId = _ref6.definitionId,
228
- extensionKey = _ref6.extensionKey,
229
- destinationProduct = _ref6.destinationProduct,
230
- destinationSubproduct = _ref6.destinationSubproduct,
231
- location = _ref6.location,
232
- display = _ref6.display;
127
+ var uiAuthEvent = exports.uiAuthEvent = function uiAuthEvent(_ref3) {
128
+ var definitionId = _ref3.definitionId,
129
+ extensionKey = _ref3.extensionKey,
130
+ destinationProduct = _ref3.destinationProduct,
131
+ destinationSubproduct = _ref3.destinationSubproduct,
132
+ location = _ref3.location,
133
+ display = _ref3.display;
233
134
  return {
234
135
  action: 'clicked',
235
136
  actionSubject: 'button',
@@ -245,13 +146,17 @@ var uiAuthEvent = exports.uiAuthEvent = function uiAuthEvent(_ref6) {
245
146
  })
246
147
  };
247
148
  };
248
- var uiAuthAlternateAccountEvent = exports.uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref7) {
249
- var definitionId = _ref7.definitionId,
250
- extensionKey = _ref7.extensionKey,
251
- destinationProduct = _ref7.destinationProduct,
252
- destinationSubproduct = _ref7.destinationSubproduct,
253
- location = _ref7.location,
254
- display = _ref7.display;
149
+
150
+ /**
151
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
152
+ */
153
+ var uiAuthAlternateAccountEvent = exports.uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref4) {
154
+ var definitionId = _ref4.definitionId,
155
+ extensionKey = _ref4.extensionKey,
156
+ destinationProduct = _ref4.destinationProduct,
157
+ destinationSubproduct = _ref4.destinationSubproduct,
158
+ location = _ref4.location,
159
+ display = _ref4.display;
255
160
  return {
256
161
  action: 'clicked',
257
162
  actionSubject: 'smartLink',
@@ -267,17 +172,21 @@ var uiAuthAlternateAccountEvent = exports.uiAuthAlternateAccountEvent = function
267
172
  })
268
173
  };
269
174
  };
270
- var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEvent(_ref8) {
271
- var id = _ref8.id,
272
- display = _ref8.display,
273
- status = _ref8.status,
274
- definitionId = _ref8.definitionId,
275
- extensionKey = _ref8.extensionKey,
276
- isModifierKeyPressed = _ref8.isModifierKeyPressed,
277
- location = _ref8.location,
278
- destinationProduct = _ref8.destinationProduct,
279
- destinationSubproduct = _ref8.destinationSubproduct,
280
- actionSubjectId = _ref8.actionSubjectId;
175
+
176
+ /**
177
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
178
+ */
179
+ var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEvent(_ref5) {
180
+ var id = _ref5.id,
181
+ display = _ref5.display,
182
+ status = _ref5.status,
183
+ definitionId = _ref5.definitionId,
184
+ extensionKey = _ref5.extensionKey,
185
+ isModifierKeyPressed = _ref5.isModifierKeyPressed,
186
+ location = _ref5.location,
187
+ destinationProduct = _ref5.destinationProduct,
188
+ destinationSubproduct = _ref5.destinationSubproduct,
189
+ actionSubjectId = _ref5.actionSubjectId;
281
190
  return {
282
191
  action: 'clicked',
283
192
  actionSubject: 'smartLink',
@@ -296,15 +205,15 @@ var uiCardClickedEvent = exports.uiCardClickedEvent = function uiCardClickedEven
296
205
  })
297
206
  };
298
207
  };
299
- var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref9) {
300
- var id = _ref9.id,
301
- actionType = _ref9.actionType,
302
- extensionKey = _ref9.extensionKey,
303
- display = _ref9.display,
304
- definitionId = _ref9.definitionId,
305
- destinationProduct = _ref9.destinationProduct,
306
- destinationSubproduct = _ref9.destinationSubproduct,
307
- location = _ref9.location;
208
+ var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClickedEvent(_ref6) {
209
+ var id = _ref6.id,
210
+ actionType = _ref6.actionType,
211
+ extensionKey = _ref6.extensionKey,
212
+ display = _ref6.display,
213
+ definitionId = _ref6.definitionId,
214
+ destinationProduct = _ref6.destinationProduct,
215
+ destinationSubproduct = _ref6.destinationSubproduct,
216
+ location = _ref6.location;
308
217
  return {
309
218
  action: 'clicked',
310
219
  actionSubject: 'button',
@@ -322,13 +231,17 @@ var uiActionClickedEvent = exports.uiActionClickedEvent = function uiActionClick
322
231
  })
323
232
  };
324
233
  };
325
- var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_ref10) {
326
- var display = _ref10.display,
327
- extensionKey = _ref10.extensionKey,
328
- definitionId = _ref10.definitionId,
329
- destinationProduct = _ref10.destinationProduct,
330
- destinationSubproduct = _ref10.destinationSubproduct,
331
- location = _ref10.location;
234
+
235
+ /**
236
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
237
+ */
238
+ var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_ref7) {
239
+ var display = _ref7.display,
240
+ extensionKey = _ref7.extensionKey,
241
+ definitionId = _ref7.definitionId,
242
+ destinationProduct = _ref7.destinationProduct,
243
+ destinationSubproduct = _ref7.destinationSubproduct,
244
+ location = _ref7.location;
332
245
  return {
333
246
  action: 'closed',
334
247
  actionSubject: 'consentModal',
@@ -343,15 +256,15 @@ var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_
343
256
  })
344
257
  };
345
258
  };
346
- var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref11) {
347
- var display = _ref11.display,
348
- status = _ref11.status,
349
- extensionKey = _ref11.extensionKey,
350
- definitionId = _ref11.definitionId,
351
- destinationProduct = _ref11.destinationProduct,
352
- destinationSubproduct = _ref11.destinationSubproduct,
353
- location = _ref11.location,
354
- canBeDatasource = _ref11.canBeDatasource;
259
+ var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref8) {
260
+ var display = _ref8.display,
261
+ status = _ref8.status,
262
+ extensionKey = _ref8.extensionKey,
263
+ definitionId = _ref8.definitionId,
264
+ destinationProduct = _ref8.destinationProduct,
265
+ destinationSubproduct = _ref8.destinationSubproduct,
266
+ location = _ref8.location,
267
+ canBeDatasource = _ref8.canBeDatasource;
355
268
  return {
356
269
  action: 'renderSuccess',
357
270
  actionSubject: 'smartLink',
@@ -368,15 +281,15 @@ var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSucce
368
281
  })
369
282
  };
370
283
  };
371
- var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref12) {
372
- var display = _ref12.display,
373
- error = _ref12.error,
374
- errorInfo = _ref12.errorInfo,
375
- extensionKey = _ref12.extensionKey,
376
- definitionId = _ref12.definitionId,
377
- destinationProduct = _ref12.destinationProduct,
378
- destinationSubproduct = _ref12.destinationSubproduct,
379
- location = _ref12.location;
284
+ var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref9) {
285
+ var display = _ref9.display,
286
+ error = _ref9.error,
287
+ errorInfo = _ref9.errorInfo,
288
+ extensionKey = _ref9.extensionKey,
289
+ definitionId = _ref9.definitionId,
290
+ destinationProduct = _ref9.destinationProduct,
291
+ destinationSubproduct = _ref9.destinationSubproduct,
292
+ location = _ref9.location;
380
293
  return {
381
294
  actionSubject: 'smartLink',
382
295
  action: 'renderFailed',
@@ -393,16 +306,20 @@ var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedE
393
306
  })
394
307
  };
395
308
  };
396
- var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref13) {
397
- var id = _ref13.id,
398
- previewDisplay = _ref13.previewDisplay,
399
- extensionKey = _ref13.extensionKey,
400
- definitionId = _ref13.definitionId,
401
- destinationProduct = _ref13.destinationProduct,
402
- destinationSubproduct = _ref13.destinationSubproduct,
403
- location = _ref13.location,
404
- previewInvokeMethod = _ref13.previewInvokeMethod,
405
- status = _ref13.status;
309
+
310
+ /**
311
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
312
+ */
313
+ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref10) {
314
+ var id = _ref10.id,
315
+ previewDisplay = _ref10.previewDisplay,
316
+ extensionKey = _ref10.extensionKey,
317
+ definitionId = _ref10.definitionId,
318
+ destinationProduct = _ref10.destinationProduct,
319
+ destinationSubproduct = _ref10.destinationSubproduct,
320
+ location = _ref10.location,
321
+ previewInvokeMethod = _ref10.previewInvokeMethod,
322
+ status = _ref10.status;
406
323
  return {
407
324
  action: 'viewed',
408
325
  actionSubject: 'hoverCard',
@@ -420,17 +337,21 @@ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCa
420
337
  })
421
338
  };
422
339
  };
423
- var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref14) {
424
- var id = _ref14.id,
425
- previewDisplay = _ref14.previewDisplay,
426
- hoverTime = _ref14.hoverTime,
427
- extensionKey = _ref14.extensionKey,
428
- definitionId = _ref14.definitionId,
429
- destinationProduct = _ref14.destinationProduct,
430
- destinationSubproduct = _ref14.destinationSubproduct,
431
- location = _ref14.location,
432
- previewInvokeMethod = _ref14.previewInvokeMethod,
433
- status = _ref14.status;
340
+
341
+ /**
342
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
343
+ */
344
+ var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref11) {
345
+ var id = _ref11.id,
346
+ previewDisplay = _ref11.previewDisplay,
347
+ hoverTime = _ref11.hoverTime,
348
+ extensionKey = _ref11.extensionKey,
349
+ definitionId = _ref11.definitionId,
350
+ destinationProduct = _ref11.destinationProduct,
351
+ destinationSubproduct = _ref11.destinationSubproduct,
352
+ location = _ref11.location,
353
+ previewInvokeMethod = _ref11.previewInvokeMethod,
354
+ status = _ref11.status;
434
355
  return {
435
356
  action: 'dismissed',
436
357
  actionSubject: 'hoverCard',
@@ -449,15 +370,19 @@ var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiH
449
370
  })
450
371
  };
451
372
  };
452
- var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref15) {
453
- var id = _ref15.id,
454
- previewDisplay = _ref15.previewDisplay,
455
- extensionKey = _ref15.extensionKey,
456
- definitionId = _ref15.definitionId,
457
- destinationProduct = _ref15.destinationProduct,
458
- destinationSubproduct = _ref15.destinationSubproduct,
459
- location = _ref15.location,
460
- previewInvokeMethod = _ref15.previewInvokeMethod;
373
+
374
+ /**
375
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
376
+ */
377
+ var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref12) {
378
+ var id = _ref12.id,
379
+ previewDisplay = _ref12.previewDisplay,
380
+ extensionKey = _ref12.extensionKey,
381
+ definitionId = _ref12.definitionId,
382
+ destinationProduct = _ref12.destinationProduct,
383
+ destinationSubproduct = _ref12.destinationSubproduct,
384
+ location = _ref12.location,
385
+ previewInvokeMethod = _ref12.previewInvokeMethod;
461
386
  return {
462
387
  action: 'clicked',
463
388
  actionSubject: 'button',
@@ -475,6 +400,10 @@ var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent =
475
400
  })
476
401
  };
477
402
  };
403
+
404
+ /**
405
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
406
+ */
478
407
  var uiLearnMoreLinkClickedEvent = exports.uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent() {
479
408
  return {
480
409
  action: 'clicked',
@@ -486,33 +415,8 @@ var uiLearnMoreLinkClickedEvent = exports.uiLearnMoreLinkClickedEvent = function
486
415
  };
487
416
 
488
417
  /**
489
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
418
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
490
419
  */
491
- var chunkloadFailedEvent = exports.chunkloadFailedEvent = function chunkloadFailedEvent(_ref16) {
492
- var display = _ref16.display,
493
- error = _ref16.error,
494
- errorInfo = _ref16.errorInfo,
495
- extensionKey = _ref16.extensionKey,
496
- definitionId = _ref16.definitionId,
497
- destinationProduct = _ref16.destinationProduct,
498
- destinationSubproduct = _ref16.destinationSubproduct,
499
- location = _ref16.location;
500
- return {
501
- action: 'chunkLoadFailed',
502
- actionSubject: 'smartLink',
503
- eventType: 'operational',
504
- attributes: _objectSpread(_objectSpread({}, context), {}, {
505
- error: error,
506
- errorInfo: errorInfo,
507
- display: display,
508
- extensionKey: extensionKey,
509
- definitionId: definitionId,
510
- destinationProduct: destinationProduct,
511
- destinationSubproduct: destinationSubproduct,
512
- location: location
513
- })
514
- };
515
- };
516
420
  var uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = function uiSmartLinkStatusLozengeButtonClicked() {
517
421
  return {
518
422
  action: 'clicked',
@@ -522,6 +426,10 @@ var uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusLozengeButt
522
426
  attributes: _objectSpread({}, context)
523
427
  };
524
428
  };
429
+
430
+ /**
431
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
432
+ */
525
433
  var uiSmartLinkStatusListItemButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = function uiSmartLinkStatusListItemButtonClicked() {
526
434
  return {
527
435
  action: 'clicked',
@@ -531,6 +439,10 @@ var uiSmartLinkStatusListItemButtonClicked = exports.uiSmartLinkStatusListItemBu
531
439
  attributes: _objectSpread({}, context)
532
440
  };
533
441
  };
442
+
443
+ /**
444
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
445
+ */
534
446
  var uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusOpenPreviewButtonClicked = function uiSmartLinkStatusOpenPreviewButtonClicked() {
535
447
  return {
536
448
  action: 'clicked',
@@ -540,9 +452,13 @@ var uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusOpenPre
540
452
  attributes: _objectSpread({}, context)
541
453
  };
542
454
  };
543
- var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref17) {
455
+
456
+ /**
457
+ * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
458
+ */
459
+ var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref13) {
544
460
  var _SmartLinkActionTypeU2;
545
- var smartLinkActionType = _ref17.smartLinkActionType;
461
+ var smartLinkActionType = _ref13.smartLinkActionType;
546
462
  return {
547
463
  action: 'clicked',
548
464
  actionSubject: 'button',
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -10,24 +9,6 @@ Object.defineProperty(exports, "ANALYTICS_CHANNEL", {
10
9
  return _analytics.ANALYTICS_CHANNEL;
11
10
  }
12
11
  });
13
- Object.defineProperty(exports, "chunkloadFailedEvent", {
14
- enumerable: true,
15
- get: function get() {
16
- return _analytics.chunkloadFailedEvent;
17
- }
18
- });
19
- Object.defineProperty(exports, "connectFailedEvent", {
20
- enumerable: true,
21
- get: function get() {
22
- return _analytics.connectFailedEvent;
23
- }
24
- });
25
- Object.defineProperty(exports, "connectSucceededEvent", {
26
- enumerable: true,
27
- get: function get() {
28
- return _analytics.connectSucceededEvent;
29
- }
30
- });
31
12
  Object.defineProperty(exports, "context", {
32
13
  enumerable: true,
33
14
  get: function get() {
@@ -40,7 +21,6 @@ Object.defineProperty(exports, "fireSmartLinkEvent", {
40
21
  return _analytics.fireSmartLinkEvent;
41
22
  }
42
23
  });
43
- exports.instrumentEvent = void 0;
44
24
  Object.defineProperty(exports, "invokeFailedEvent", {
45
25
  enumerable: true,
46
26
  get: function get() {
@@ -53,12 +33,6 @@ Object.defineProperty(exports, "invokeSucceededEvent", {
53
33
  return _analytics.invokeSucceededEvent;
54
34
  }
55
35
  });
56
- Object.defineProperty(exports, "resolvedEvent", {
57
- enumerable: true,
58
- get: function get() {
59
- return _analytics.resolvedEvent;
60
- }
61
- });
62
36
  Object.defineProperty(exports, "uiActionClickedEvent", {
63
37
  enumerable: true,
64
38
  get: function get() {
@@ -143,66 +117,4 @@ Object.defineProperty(exports, "uiSmartLinkStatusOpenPreviewButtonClicked", {
143
117
  return _analytics.uiSmartLinkStatusOpenPreviewButtonClicked;
144
118
  }
145
119
  });
146
- Object.defineProperty(exports, "unresolvedEvent", {
147
- enumerable: true,
148
- get: function get() {
149
- return _analytics.unresolvedEvent;
150
- }
151
- });
152
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
153
- var _performance = require("../performance");
154
- var _analytics = require("./analytics");
155
- 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; }
156
- 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; }
157
- /**
158
- * @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
159
- */
160
- var instrumentEvent = exports.instrumentEvent = function instrumentEvent(_ref) {
161
- var id = _ref.id,
162
- status = _ref.status,
163
- extensionKey = _ref.extensionKey,
164
- definitionId = _ref.definitionId,
165
- resourceType = _ref.resourceType,
166
- destinationProduct = _ref.destinationProduct,
167
- destinationSubproduct = _ref.destinationSubproduct,
168
- location = _ref.location,
169
- error = _ref.error;
170
- var measure = (0, _performance.getMeasure)(id, status) || {
171
- duration: undefined
172
- };
173
- if (status === 'resolved') {
174
- var event = (0, _analytics.resolvedEvent)({
175
- id: id,
176
- extensionKey: extensionKey,
177
- definitionId: definitionId,
178
- resourceType: resourceType,
179
- destinationProduct: destinationProduct,
180
- destinationSubproduct: destinationSubproduct,
181
- location: location
182
- });
183
- return _objectSpread(_objectSpread({}, event), {}, {
184
- attributes: _objectSpread(_objectSpread({}, event.attributes), {}, {
185
- duration: measure.duration
186
- })
187
- });
188
- } else {
189
- if ((error === null || error === void 0 ? void 0 : error.type) !== 'ResolveUnsupportedError') {
190
- var _event = (0, _analytics.unresolvedEvent)({
191
- id: id,
192
- status: status,
193
- extensionKey: extensionKey,
194
- definitionId: definitionId,
195
- resourceType: resourceType,
196
- destinationProduct: destinationProduct,
197
- destinationSubproduct: destinationSubproduct,
198
- location: location,
199
- error: error
200
- });
201
- return _objectSpread(_objectSpread({}, _event), {}, {
202
- attributes: _objectSpread(_objectSpread({}, _event.attributes), {}, {
203
- duration: measure.duration
204
- })
205
- });
206
- }
207
- }
208
- };
120
+ var _analytics = require("./analytics");