@atlaskit/smart-card 32.7.6 → 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.
Files changed (96) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/extractors/flexible/actions/index.js +5 -7
  3. package/dist/cjs/state/actions/index.js +13 -38
  4. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +54 -305
  5. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  6. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
  7. package/dist/cjs/utils/analytics/analytics.js +28 -304
  8. package/dist/cjs/utils/analytics/index.js +0 -66
  9. package/dist/cjs/utils/mocks.js +5 -7
  10. package/dist/cjs/view/BlockCard/views/styled.js +1 -1
  11. package/dist/cjs/view/Card/index.js +5 -7
  12. package/dist/cjs/view/CardWithUrl/component.js +7 -22
  13. package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
  14. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  15. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  16. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
  17. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -1
  18. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
  19. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -1
  20. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  21. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  22. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +34 -34
  23. package/dist/cjs/view/FlexibleCard/components/utils.js +5 -5
  24. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +21 -53
  25. package/dist/cjs/view/HoverCard/styled.js +1 -1
  26. package/dist/cjs/view/InlineCard/ErroredView/index.js +8 -11
  27. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +10 -13
  28. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +7 -10
  29. package/dist/cjs/view/InlineCard/ResolvedView/index.js +5 -7
  30. package/dist/cjs/view/InlineCard/ResolvingView/index.js +5 -7
  31. package/dist/cjs/view/LinkUrl/index.js +1 -1
  32. package/dist/cjs/view/LinkView/index.js +5 -7
  33. package/dist/cjs/view/common/UnauthorisedViewContent.js +3 -9
  34. package/dist/es2019/state/actions/index.js +13 -38
  35. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +2 -238
  36. package/dist/es2019/utils/analytics/analytics.js +2 -286
  37. package/dist/es2019/utils/analytics/index.js +1 -1
  38. package/dist/es2019/view/BlockCard/views/styled.js +1 -1
  39. package/dist/es2019/view/CardWithUrl/component.js +8 -23
  40. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  41. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  42. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +3 -3
  43. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  44. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  45. package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
  46. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +21 -53
  47. package/dist/es2019/view/HoverCard/styled.js +1 -1
  48. package/dist/es2019/view/LinkUrl/index.js +1 -1
  49. package/dist/es2019/view/common/UnauthorisedViewContent.js +3 -9
  50. package/dist/esm/extractors/flexible/actions/index.js +5 -7
  51. package/dist/esm/state/actions/index.js +13 -38
  52. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +55 -306
  53. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  54. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +4 -5
  55. package/dist/esm/utils/analytics/analytics.js +27 -303
  56. package/dist/esm/utils/analytics/index.js +1 -1
  57. package/dist/esm/utils/mocks.js +5 -7
  58. package/dist/esm/view/BlockCard/views/styled.js +1 -1
  59. package/dist/esm/view/Card/index.js +5 -7
  60. package/dist/esm/view/CardWithUrl/component.js +8 -23
  61. package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +7 -10
  62. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
  63. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -13
  64. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +10 -12
  65. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -1
  66. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +61 -61
  67. package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +1 -1
  68. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +4 -16
  69. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -5
  70. package/dist/esm/view/FlexibleCard/components/elements/utils.js +34 -34
  71. package/dist/esm/view/FlexibleCard/components/utils.js +5 -5
  72. package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -53
  73. package/dist/esm/view/HoverCard/styled.js +1 -1
  74. package/dist/esm/view/InlineCard/ErroredView/index.js +8 -11
  75. package/dist/esm/view/InlineCard/ForbiddenView/index.js +10 -13
  76. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +7 -10
  77. package/dist/esm/view/InlineCard/ResolvedView/index.js +5 -7
  78. package/dist/esm/view/InlineCard/ResolvingView/index.js +5 -7
  79. package/dist/esm/view/LinkUrl/index.js +1 -1
  80. package/dist/esm/view/LinkView/index.js +5 -7
  81. package/dist/esm/view/common/UnauthorisedViewContent.js +3 -9
  82. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
  83. package/dist/types/state/hooks/useSmartLink.d.ts +0 -12
  84. package/dist/types/utils/analytics/analytics.d.ts +1 -51
  85. package/dist/types/utils/analytics/index.d.ts +1 -1
  86. package/dist/types/utils/analytics/types.d.ts +0 -60
  87. package/dist/types/utils/mocks.d.ts +0 -12
  88. package/dist/types/view/common/UnauthorisedViewContent.d.ts +1 -1
  89. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -101
  90. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -12
  91. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -51
  92. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  93. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -60
  94. package/dist/types-ts4.5/utils/mocks.d.ts +0 -12
  95. package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +1 -1
  96. package/package.json +2 -5
@@ -5,8 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { useMemo } from 'react';
6
6
  import { useSmartLinkContext } from '@atlaskit/link-provider';
7
7
  import { getUrl } from '@atlaskit/linking-common';
8
- import { context, invokeFailedEvent as _invokeFailedEvent, invokeSucceededEvent as _invokeSucceededEvent, uiActionClickedEvent, uiAuthAlternateAccountEvent, uiAuthEvent, uiCardClickedEvent, uiClosedAuthEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiHoverCardViewedEvent, uiLearnMoreLinkClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from '../../utils/analytics';
9
- import { uiServerActionClicked } from '../../utils/analytics/analytics';
8
+ import { context, invokeFailedEvent as _invokeFailedEvent, invokeSucceededEvent as _invokeSucceededEvent, uiActionClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent } from '../../utils/analytics';
10
9
  import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getStatusDetails, getSubproduct } from '../helpers';
11
10
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
12
11
  import { useDispatchAnalytics } from './useDispatchAnalytics';
@@ -65,60 +64,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
65
64
  /** Contains all ui analytics events */
66
65
  var ui = useMemo(function () {
67
66
  return {
68
- /**
69
- * This fires an event that represents when a user clicks on the authentication
70
- * call to action with no current authenticated account. (i.e. Connect to Preview).
71
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
72
- * @param definitionId The definitionId of the Smart Link resolver invoked.
73
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
74
- * @returns
75
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
76
- */
77
- authEvent: function authEvent(_ref) {
78
- var display = _ref.display,
79
- extensionKey = _ref.extensionKey,
80
- definitionId = _ref.definitionId,
81
- resourceType = _ref.resourceType,
82
- destinationProduct = _ref.destinationProduct,
83
- destinationSubproduct = _ref.destinationSubproduct,
84
- location = _ref.location;
85
- return dispatchAnalytics(applyCommonAttributes(uiAuthEvent({
86
- display: display,
87
- extensionKey: extensionKey,
88
- definitionId: definitionId,
89
- resourceType: resourceType,
90
- destinationProduct: destinationProduct,
91
- destinationSubproduct: destinationSubproduct,
92
- location: location
93
- }), commonAttributes));
94
- },
95
- /**
96
- * This fires an event that represents when a user clicks on the authentication
97
- * call to action with a forbidden authenticated account. (i.e. Try another account).
98
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
99
- * @param definitionId The definitionId of the Smart Link resolver invoked.
100
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
101
- * @returns
102
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
103
- */
104
- authAlternateAccountEvent: function authAlternateAccountEvent(_ref2) {
105
- var display = _ref2.display,
106
- extensionKey = _ref2.extensionKey,
107
- definitionId = _ref2.definitionId,
108
- resourceType = _ref2.resourceType,
109
- destinationProduct = _ref2.destinationProduct,
110
- destinationSubproduct = _ref2.destinationSubproduct,
111
- location = _ref2.location;
112
- return dispatchAnalytics(applyCommonAttributes(uiAuthAlternateAccountEvent({
113
- display: display,
114
- extensionKey: extensionKey,
115
- definitionId: definitionId,
116
- resourceType: resourceType,
117
- destinationProduct: destinationProduct,
118
- destinationSubproduct: destinationSubproduct,
119
- location: location
120
- }), commonAttributes));
121
- },
122
67
  /**
123
68
  * This fires an event that represents when a user
124
69
  * click a button.
@@ -133,43 +78,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
133
78
  eventType: 'ui'
134
79
  }, commonAttributes));
135
80
  },
136
- /**
137
- * This fires an event that represents when a user clicks on a Smart Link.
138
- * @param id The unique ID for this Smart Link.
139
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
140
- * @param status What status the Smart Link is currently in (e.g. resolved, unresolved)
141
- * @param definitionId The definitionId of the Smart Link resolver invoked.
142
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
143
- * @param isModifierKeyPressed Whether a modifier key was pressed when clicking the Smart Link.
144
- * @param location Where the Smart Link is currently rendered.
145
- * @param destinationProduct The product the Smart Link is linked to.
146
- * @returns
147
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
148
- */
149
- cardClickedEvent: function cardClickedEvent(_ref3) {
150
- var id = _ref3.id,
151
- display = _ref3.display,
152
- status = _ref3.status,
153
- definitionId = _ref3.definitionId,
154
- extensionKey = _ref3.extensionKey,
155
- isModifierKeyPressed = _ref3.isModifierKeyPressed,
156
- location = _ref3.location,
157
- destinationProduct = _ref3.destinationProduct,
158
- destinationSubproduct = _ref3.destinationSubproduct,
159
- actionSubjectId = _ref3.actionSubjectId;
160
- return dispatchAnalytics(applyCommonAttributes(uiCardClickedEvent({
161
- id: id,
162
- display: display,
163
- status: status,
164
- definitionId: definitionId,
165
- extensionKey: extensionKey,
166
- isModifierKeyPressed: isModifierKeyPressed,
167
- location: location,
168
- destinationProduct: destinationProduct,
169
- destinationSubproduct: destinationSubproduct,
170
- actionSubjectId: actionSubjectId
171
- }), commonAttributes));
172
- },
173
81
  /**
174
82
  * This fires an event that represents when a user clicks on a Smart Link action.
175
83
  * Note: This also starts the UFO smart-link-action-invocation experience.
@@ -179,16 +87,16 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
179
87
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
180
88
  * @returns
181
89
  */
182
- actionClickedEvent: function actionClickedEvent(_ref4) {
183
- var id = _ref4.id,
184
- actionType = _ref4.actionType,
185
- display = _ref4.display,
186
- overrideExtensionKey = _ref4.extensionKey,
187
- definitionId = _ref4.definitionId,
188
- resourceType = _ref4.resourceType,
189
- destinationProduct = _ref4.destinationProduct,
190
- destinationSubproduct = _ref4.destinationSubproduct,
191
- location = _ref4.location;
90
+ actionClickedEvent: function actionClickedEvent(_ref) {
91
+ var id = _ref.id,
92
+ actionType = _ref.actionType,
93
+ display = _ref.display,
94
+ overrideExtensionKey = _ref.extensionKey,
95
+ definitionId = _ref.definitionId,
96
+ resourceType = _ref.resourceType,
97
+ destinationProduct = _ref.destinationProduct,
98
+ destinationSubproduct = _ref.destinationSubproduct,
99
+ location = _ref.location;
192
100
  var extensionKey = overrideExtensionKey !== null && overrideExtensionKey !== void 0 ? overrideExtensionKey : extractedExtensionKey;
193
101
  dispatchAnalytics(applyCommonAttributes(uiActionClickedEvent({
194
102
  id: id !== null && id !== void 0 ? id : defaultId,
@@ -202,60 +110,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
202
110
  location: location
203
111
  }), commonAttributes));
204
112
  },
205
- /**
206
- * This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
207
- * https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
208
- * @param previewDisplay What format the preview is in.
209
- * @param definitionId The definitionId of the Smart Link resolver invoked.
210
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
211
- * @param previewInvokeMethod How the preview was triggered.
212
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
213
- */
214
- hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref5) {
215
- var previewDisplay = _ref5.previewDisplay,
216
- definitionId = _ref5.definitionId,
217
- extensionKey = _ref5.extensionKey,
218
- destinationProduct = _ref5.destinationProduct,
219
- destinationSubproduct = _ref5.destinationSubproduct,
220
- location = _ref5.location,
221
- previewInvokeMethod = _ref5.previewInvokeMethod;
222
- dispatchAnalytics(applyCommonAttributes(uiHoverCardOpenLinkClickedEvent({
223
- id: defaultId,
224
- previewDisplay: previewDisplay,
225
- definitionId: definitionId,
226
- extensionKey: extensionKey,
227
- destinationProduct: destinationProduct,
228
- destinationSubproduct: destinationSubproduct,
229
- location: location,
230
- previewInvokeMethod: previewInvokeMethod
231
- }), commonAttributes));
232
- },
233
- /**
234
- * This fires an event that represents when a user closed the authentication window without authenticating after opening it.
235
- * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
236
- * @param definitionId The definitionId of the Smart Link resolver invoked.
237
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
238
- * @returns
239
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
240
- */
241
- closedAuthEvent: function closedAuthEvent(_ref6) {
242
- var display = _ref6.display,
243
- extensionKey = _ref6.extensionKey,
244
- definitionId = _ref6.definitionId,
245
- resourceType = _ref6.resourceType,
246
- destinationProduct = _ref6.destinationProduct,
247
- destinationSubproduct = _ref6.destinationSubproduct,
248
- location = _ref6.location;
249
- return dispatchAnalytics(applyCommonAttributes(uiClosedAuthEvent({
250
- display: display,
251
- extensionKey: extensionKey,
252
- definitionId: definitionId,
253
- resourceType: resourceType,
254
- destinationProduct: destinationProduct,
255
- destinationSubproduct: destinationSubproduct,
256
- location: location
257
- }), commonAttributes));
258
- },
259
113
  /**
260
114
  * This fires an event that represents when a user close a modal.
261
115
  * @param data A partial analytics event payload
@@ -278,18 +132,18 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
278
132
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
279
133
  * @param canBeDatasource An indicator that shows that a smart link can be converted to a datasource
280
134
  */
281
- renderSuccessEvent: function renderSuccessEvent(_ref7) {
282
- var display = _ref7.display,
283
- status = _ref7.status,
284
- id = _ref7.id,
285
- extensionKey = _ref7.extensionKey,
286
- definitionId = _ref7.definitionId,
287
- resourceType = _ref7.resourceType,
288
- destinationProduct = _ref7.destinationProduct,
289
- destinationSubproduct = _ref7.destinationSubproduct,
290
- location = _ref7.location,
291
- _ref7$canBeDatasource = _ref7.canBeDatasource,
292
- canBeDatasource = _ref7$canBeDatasource === void 0 ? false : _ref7$canBeDatasource;
135
+ renderSuccessEvent: function renderSuccessEvent(_ref2) {
136
+ var display = _ref2.display,
137
+ status = _ref2.status,
138
+ id = _ref2.id,
139
+ extensionKey = _ref2.extensionKey,
140
+ definitionId = _ref2.definitionId,
141
+ resourceType = _ref2.resourceType,
142
+ destinationProduct = _ref2.destinationProduct,
143
+ destinationSubproduct = _ref2.destinationSubproduct,
144
+ location = _ref2.location,
145
+ _ref2$canBeDatasource = _ref2.canBeDatasource,
146
+ canBeDatasource = _ref2$canBeDatasource === void 0 ? false : _ref2$canBeDatasource;
293
147
  var experienceId = id ? id : defaultId;
294
148
  succeedUfoExperience('smart-link-rendered', experienceId, {
295
149
  extensionKey: extensionKey,
@@ -319,17 +173,17 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
319
173
  * @param error: An error representing why the Smart Link render failed.
320
174
  * @param errorInfo: Additional details about the error including the stack trace.
321
175
  */
322
- renderFailedEvent: function renderFailedEvent(_ref8) {
323
- var display = _ref8.display,
324
- id = _ref8.id,
325
- error = _ref8.error,
326
- errorInfo = _ref8.errorInfo,
327
- extensionKey = _ref8.extensionKey,
328
- definitionId = _ref8.definitionId,
329
- resourceType = _ref8.resourceType,
330
- destinationProduct = _ref8.destinationProduct,
331
- destinationSubproduct = _ref8.destinationSubproduct,
332
- location = _ref8.location;
176
+ renderFailedEvent: function renderFailedEvent(_ref3) {
177
+ var display = _ref3.display,
178
+ id = _ref3.id,
179
+ error = _ref3.error,
180
+ errorInfo = _ref3.errorInfo,
181
+ extensionKey = _ref3.extensionKey,
182
+ definitionId = _ref3.definitionId,
183
+ resourceType = _ref3.resourceType,
184
+ destinationProduct = _ref3.destinationProduct,
185
+ destinationSubproduct = _ref3.destinationSubproduct,
186
+ location = _ref3.location;
333
187
  var experienceId = id ? id : defaultId;
334
188
  // Start and fail the smart-link-rendered experience. If it has already
335
189
  // been started nothing happens.
@@ -347,111 +201,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
347
201
  destinationSubproduct: destinationSubproduct,
348
202
  location: location
349
203
  }), commonAttributes));
350
- },
351
- /**
352
- * This fires an event that represents a hover preview being opened.
353
- * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
354
- * @param definitionId The definitionId of the Smart Link resolver invoked.
355
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
356
- * @param previewInvokeMethod How the preview was triggered.
357
- * @returns
358
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
359
- */
360
- hoverCardViewedEvent: function hoverCardViewedEvent(_ref9) {
361
- var previewDisplay = _ref9.previewDisplay,
362
- previewInvokeMethod = _ref9.previewInvokeMethod,
363
- id = _ref9.id,
364
- extensionKey = _ref9.extensionKey,
365
- definitionId = _ref9.definitionId,
366
- resourceType = _ref9.resourceType,
367
- destinationProduct = _ref9.destinationProduct,
368
- destinationSubproduct = _ref9.destinationSubproduct,
369
- location = _ref9.location,
370
- status = _ref9.status;
371
- return dispatchAnalytics(applyCommonAttributes(uiHoverCardViewedEvent({
372
- id: id,
373
- previewDisplay: previewDisplay,
374
- extensionKey: extensionKey,
375
- definitionId: definitionId,
376
- resourceType: resourceType,
377
- destinationProduct: destinationProduct,
378
- destinationSubproduct: destinationSubproduct,
379
- location: location,
380
- previewInvokeMethod: previewInvokeMethod,
381
- status: status
382
- }), commonAttributes));
383
- },
384
- /**
385
- * This fires an event that represents a hover preview being dismissed.
386
- * @param hoverDisplay Whether the hover preview was displayed as a card or embed.
387
- * @param hoverTime The duration that the user hovered over a Smart Link before the preview was dismissed.
388
- * @param definitionId The definitionId of the Smart Link resolver invoked.
389
- * @param extensionKey The extensionKey of the Smart Link resolver invoked.
390
- * @param previewInvokeMethod How the preview was triggered.
391
- * @returns
392
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
393
- */
394
- hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref10) {
395
- var id = _ref10.id,
396
- previewDisplay = _ref10.previewDisplay,
397
- hoverTime = _ref10.hoverTime,
398
- previewInvokeMethod = _ref10.previewInvokeMethod,
399
- extensionKey = _ref10.extensionKey,
400
- definitionId = _ref10.definitionId,
401
- resourceType = _ref10.resourceType,
402
- destinationProduct = _ref10.destinationProduct,
403
- destinationSubproduct = _ref10.destinationSubproduct,
404
- location = _ref10.location,
405
- status = _ref10.status;
406
- return dispatchAnalytics(applyCommonAttributes(uiHoverCardDismissedEvent({
407
- previewDisplay: previewDisplay,
408
- id: id,
409
- hoverTime: hoverTime,
410
- extensionKey: extensionKey,
411
- definitionId: definitionId,
412
- resourceType: resourceType,
413
- destinationProduct: destinationProduct,
414
- destinationSubproduct: destinationSubproduct,
415
- location: location,
416
- previewInvokeMethod: previewInvokeMethod,
417
- status: status
418
- }), commonAttributes));
419
- },
420
- /**
421
- * Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
422
- * @param extensionKey The extensionKey of the Smart Link resovler invoked.
423
- * @param location The location where a link is displayed (jiraWebLinks, confluencePages etc)
424
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
425
- */
426
- learnMoreClickedEvent: function learnMoreClickedEvent() {
427
- return dispatchAnalytics(applyCommonAttributes(uiLearnMoreLinkClickedEvent(), commonAttributes));
428
- },
429
- /**
430
- * Fires an event that represent a click was performed on a Status Lozenge
431
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
432
- */
433
- smartLinkLozengeActionClickedEvent: function smartLinkLozengeActionClickedEvent() {
434
- return dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusLozengeButtonClicked(), commonAttributes));
435
- },
436
- /**
437
- * Fires an event that represent a click was performed on a Status Lozenge's dropdown item
438
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
439
- */
440
- smartLinkLozengeActionListItemClickedEvent: function smartLinkLozengeActionListItemClickedEvent() {
441
- return dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusListItemButtonClicked(), commonAttributes));
442
- },
443
- /**
444
- * Fires an event that represent a click was performed on a Status Lozenge open preview button
445
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
446
- */
447
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: function smartLinkLozengeActionErrorOpenPreviewClickedEvent() {
448
- return dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusOpenPreviewButtonClicked(), commonAttributes));
449
- },
450
- /**
451
- * @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
452
- */
453
- smartLinkServerActionClickedEvent: function smartLinkServerActionClickedEvent(props) {
454
- return dispatchAnalytics(applyCommonAttributes(uiServerActionClicked(props), commonAttributes));
455
204
  }
456
205
  };
457
206
  }, [dispatchAnalytics, commonAttributes, defaultId, extractedExtensionKey]);
@@ -466,16 +215,16 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
466
215
  * @param actionType The type of action invoked, e.g. PreviewAction
467
216
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
468
217
  */
469
- invokeSucceededEvent: function invokeSucceededEvent(_ref11) {
470
- var id = _ref11.id,
471
- actionType = _ref11.actionType,
472
- display = _ref11.display,
473
- extensionKey = _ref11.extensionKey,
474
- definitionId = _ref11.definitionId,
475
- resourceType = _ref11.resourceType,
476
- destinationProduct = _ref11.destinationProduct,
477
- destinationSubproduct = _ref11.destinationSubproduct,
478
- location = _ref11.location;
218
+ invokeSucceededEvent: function invokeSucceededEvent(_ref4) {
219
+ var id = _ref4.id,
220
+ actionType = _ref4.actionType,
221
+ display = _ref4.display,
222
+ extensionKey = _ref4.extensionKey,
223
+ definitionId = _ref4.definitionId,
224
+ resourceType = _ref4.resourceType,
225
+ destinationProduct = _ref4.destinationProduct,
226
+ destinationSubproduct = _ref4.destinationSubproduct,
227
+ location = _ref4.location;
479
228
  dispatchAnalytics(applyCommonAttributes(_invokeSucceededEvent({
480
229
  id: id !== null && id !== void 0 ? id : defaultId,
481
230
  actionType: actionType,
@@ -496,17 +245,17 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
496
245
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
497
246
  * @param reason The reason the invocation failed.
498
247
  */
499
- invokeFailedEvent: function invokeFailedEvent(_ref12) {
500
- var id = _ref12.id,
501
- actionType = _ref12.actionType,
502
- display = _ref12.display,
503
- reason = _ref12.reason,
504
- extensionKey = _ref12.extensionKey,
505
- definitionId = _ref12.definitionId,
506
- resourceType = _ref12.resourceType,
507
- destinationProduct = _ref12.destinationProduct,
508
- destinationSubproduct = _ref12.destinationSubproduct,
509
- location = _ref12.location;
248
+ invokeFailedEvent: function invokeFailedEvent(_ref5) {
249
+ var id = _ref5.id,
250
+ actionType = _ref5.actionType,
251
+ display = _ref5.display,
252
+ reason = _ref5.reason,
253
+ extensionKey = _ref5.extensionKey,
254
+ definitionId = _ref5.definitionId,
255
+ resourceType = _ref5.resourceType,
256
+ destinationProduct = _ref5.destinationProduct,
257
+ destinationSubproduct = _ref5.destinationSubproduct,
258
+ location = _ref5.location;
510
259
  dispatchAnalytics(applyCommonAttributes(_invokeFailedEvent({
511
260
  id: id !== null && id !== void 0 ? id : defaultId,
512
261
  actionType: actionType,
@@ -88,7 +88,7 @@ export var AISummaryService = /*#__PURE__*/function () {
88
88
  this.onSuccess = props.onSuccess;
89
89
  this.onError = props.onError;
90
90
  }
91
- _createClass(AISummaryService, [{
91
+ return _createClass(AISummaryService, [{
92
92
  key: "summariseUrl",
93
93
  value: function () {
94
94
  var _summariseUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
@@ -242,5 +242,4 @@ export var AISummaryService = /*#__PURE__*/function () {
242
242
  };
243
243
  }
244
244
  }]);
245
- return AISummaryService;
246
245
  }();
@@ -1,18 +1,17 @@
1
1
  import _createClass from "@babel/runtime/helpers/createClass";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
7
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  export var ChunkProcessingError = /*#__PURE__*/function (_Error) {
10
- _inherits(ChunkProcessingError, _Error);
11
- var _super = _createSuper(ChunkProcessingError);
12
10
  function ChunkProcessingError(error) {
13
11
  _classCallCheck(this, ChunkProcessingError);
14
- return _super.call(this, error);
12
+ return _callSuper(this, ChunkProcessingError, [error]);
15
13
  }
14
+ _inherits(ChunkProcessingError, _Error);
16
15
  return _createClass(ChunkProcessingError);
17
16
  }( /*#__PURE__*/_wrapNativeSuper(Error));
18
17
  export var errorMessages = ['NETWORK_ERROR', 'NO_ANSWER', 'RATE_LIMIT', 'NO_AGENT', 'PLUGIN_ERRORED', 'OPENAI_RATE_LIMIT_USER_ABUSE', 'ACCEPTABLE_USE_VIOLATIONS', 'AI_DISABLED', 'UNEXPECTED', 'HIPAA_CONTENT_DETECTED', 'EXCEEDING_CONTEXT_LENGTH_ERROR'];