@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.
- package/CHANGELOG.md +26 -0
- package/analytics.spec.yaml +163 -0
- package/dist/cjs/state/actions/index.js +53 -49
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +14 -128
- package/dist/cjs/utils/analytics/analytics.js +150 -234
- package/dist/cjs/utils/analytics/index.js +1 -89
- package/dist/cjs/view/CardWithUrl/component.js +37 -40
- package/dist/cjs/view/CardWithUrl/loader.js +7 -16
- package/dist/cjs/view/EmbedCard/index.js +19 -44
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +64 -20
- package/dist/cjs/view/LinkUrl/index.js +12 -5
- package/dist/cjs/view/common/Metadata.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +10 -2
- package/dist/es2019/state/actions/index.js +53 -49
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +15 -136
- package/dist/es2019/utils/analytics/analytics.js +43 -133
- package/dist/es2019/utils/analytics/index.js +1 -61
- package/dist/es2019/view/CardWithUrl/component.js +37 -40
- package/dist/es2019/view/CardWithUrl/loader.js +7 -16
- package/dist/es2019/view/EmbedCard/index.js +20 -45
- package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +11 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +63 -20
- package/dist/es2019/view/LinkUrl/index.js +9 -3
- package/dist/es2019/view/common/Metadata.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +11 -2
- package/dist/esm/state/actions/index.js +53 -49
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +15 -129
- package/dist/esm/utils/analytics/analytics.js +149 -233
- package/dist/esm/utils/analytics/index.js +1 -59
- package/dist/esm/view/CardWithUrl/component.js +37 -40
- package/dist/esm/view/CardWithUrl/loader.js +7 -16
- package/dist/esm/view/EmbedCard/index.js +19 -44
- package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +12 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +11 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -2
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +65 -21
- package/dist/esm/view/LinkUrl/index.js +11 -4
- package/dist/esm/view/common/Metadata.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +10 -2
- package/dist/types/common/analytics/generated/analytics.types.d.ts +83 -1
- package/dist/types/state/analytics/useLinkClicked.d.ts +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +15 -38
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -4
- package/dist/types/utils/analytics/analytics.d.ts +32 -16
- package/dist/types/utils/analytics/click.d.ts +3 -8
- package/dist/types/utils/analytics/index.d.ts +1 -7
- package/dist/types/utils/analytics/types.d.ts +22 -22
- package/dist/types/utils/mocks.d.ts +0 -4
- package/dist/types/view/LinkUrl/index.d.ts +4 -0
- package/dist/types/view/LinkUrl/types.d.ts +1 -0
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +83 -1
- package/dist/types-ts4.5/state/analytics/useLinkClicked.d.ts +1 -1
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +15 -38
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -4
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +32 -16
- package/dist/types-ts4.5/utils/analytics/click.d.ts +3 -8
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -7
- package/dist/types-ts4.5/utils/analytics/types.d.ts +22 -22
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -4
- package/dist/types-ts4.5/view/LinkUrl/index.d.ts +4 -0
- package/dist/types-ts4.5/view/LinkUrl/types.d.ts +1 -0
- package/package.json +14 -14
|
@@ -100,18 +100,32 @@ export var useSmartCardActions = function useSmartCardActions(id, url, analytics
|
|
|
100
100
|
var services = getServices(details);
|
|
101
101
|
// When authentication is triggered, let GAS know!
|
|
102
102
|
if (status === 'unauthorized') {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
if (fg('platform_migrate-some-ui-events-smart-card')) {
|
|
104
|
+
fireEvent('ui.button.clicked.connectAccount', {
|
|
105
|
+
display: appearance,
|
|
106
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
analytics.ui.authEvent({
|
|
110
|
+
display: appearance,
|
|
111
|
+
definitionId: definitionId,
|
|
112
|
+
extensionKey: extensionKey
|
|
113
|
+
});
|
|
114
|
+
}
|
|
108
115
|
}
|
|
109
116
|
if (status === 'forbidden') {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
if (fg('platform_migrate-some-ui-events-smart-card')) {
|
|
118
|
+
fireEvent('ui.smartLink.clicked.tryAnotherAccount', {
|
|
119
|
+
display: appearance,
|
|
120
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
121
|
+
});
|
|
122
|
+
} else {
|
|
123
|
+
analytics.ui.authAlternateAccountEvent({
|
|
124
|
+
display: appearance,
|
|
125
|
+
definitionId: definitionId,
|
|
126
|
+
extensionKey: extensionKey
|
|
127
|
+
});
|
|
128
|
+
}
|
|
115
129
|
}
|
|
116
130
|
if (services.length > 0) {
|
|
117
131
|
fireEvent('screen.consentModal.viewed', {
|
|
@@ -121,52 +135,42 @@ export var useSmartCardActions = function useSmartCardActions(id, url, analytics
|
|
|
121
135
|
fireEvent('track.applicationAccount.connected', {
|
|
122
136
|
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
123
137
|
});
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
132
|
-
} else {
|
|
133
|
-
analytics.operational.connectSucceededEvent({
|
|
134
|
-
id: id,
|
|
135
|
-
definitionId: definitionId,
|
|
136
|
-
extensionKey: extensionKey
|
|
137
|
-
});
|
|
138
|
-
}
|
|
138
|
+
startUfoExperience('smart-link-authenticated', id, {
|
|
139
|
+
extensionKey: extensionKey,
|
|
140
|
+
status: 'success'
|
|
141
|
+
});
|
|
142
|
+
fireEvent('operational.smartLink.connectSucceeded', {
|
|
143
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
144
|
+
});
|
|
139
145
|
reload();
|
|
140
146
|
}, function (err) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
});
|
|
151
|
-
} else {
|
|
152
|
-
analytics.operational.connectFailedEvent({
|
|
153
|
-
id: id,
|
|
154
|
-
definitionId: definitionId,
|
|
155
|
-
extensionKey: extensionKey,
|
|
156
|
-
reason: err.type
|
|
157
|
-
});
|
|
158
|
-
}
|
|
147
|
+
var _err$type;
|
|
148
|
+
startUfoExperience('smart-link-authenticated', id, {
|
|
149
|
+
extensionKey: extensionKey,
|
|
150
|
+
status: err.type
|
|
151
|
+
});
|
|
152
|
+
fireEvent('operational.smartLink.connectFailed', {
|
|
153
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
154
|
+
reason: (_err$type = err.type) !== null && _err$type !== void 0 ? _err$type : null
|
|
155
|
+
});
|
|
159
156
|
if (err.type === 'auth_window_closed') {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
157
|
+
if (fg('platform_migrate-some-ui-events-smart-card')) {
|
|
158
|
+
fireEvent('ui.consentModal.closed', {
|
|
159
|
+
display: appearance,
|
|
160
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
161
|
+
});
|
|
162
|
+
} else {
|
|
163
|
+
analytics.ui.closedAuthEvent({
|
|
164
|
+
display: appearance,
|
|
165
|
+
definitionId: definitionId,
|
|
166
|
+
extensionKey: extensionKey
|
|
167
|
+
});
|
|
168
|
+
}
|
|
165
169
|
}
|
|
166
170
|
reload();
|
|
167
171
|
});
|
|
168
172
|
}
|
|
169
|
-
}, [getSmartLinkState, analytics.ui,
|
|
173
|
+
}, [getSmartLinkState, analytics.ui, id, reload, fireEvent]);
|
|
170
174
|
var invoke = useCallback( /*#__PURE__*/function () {
|
|
171
175
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(opts, appearance) {
|
|
172
176
|
var key, action, source;
|
|
@@ -5,7 +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 {
|
|
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
9
|
import { uiServerActionClicked } from '../../utils/analytics/analytics';
|
|
10
10
|
import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getStatusDetails, getSubproduct } from '../helpers';
|
|
11
11
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
|
|
@@ -72,6 +72,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
72
72
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
73
73
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
74
74
|
* @returns
|
|
75
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
75
76
|
*/
|
|
76
77
|
authEvent: function authEvent(_ref) {
|
|
77
78
|
var display = _ref.display,
|
|
@@ -98,6 +99,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
98
99
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
99
100
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
100
101
|
* @returns
|
|
102
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
101
103
|
*/
|
|
102
104
|
authAlternateAccountEvent: function authAlternateAccountEvent(_ref2) {
|
|
103
105
|
var display = _ref2.display,
|
|
@@ -142,6 +144,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
142
144
|
* @param location Where the Smart Link is currently rendered.
|
|
143
145
|
* @param destinationProduct The product the Smart Link is linked to.
|
|
144
146
|
* @returns
|
|
147
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
145
148
|
*/
|
|
146
149
|
cardClickedEvent: function cardClickedEvent(_ref3) {
|
|
147
150
|
var id = _ref3.id,
|
|
@@ -206,6 +209,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
206
209
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
207
210
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
208
211
|
* @param previewInvokeMethod How the preview was triggered.
|
|
212
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
209
213
|
*/
|
|
210
214
|
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref5) {
|
|
211
215
|
var previewDisplay = _ref5.previewDisplay,
|
|
@@ -232,6 +236,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
232
236
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
233
237
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
234
238
|
* @returns
|
|
239
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
235
240
|
*/
|
|
236
241
|
closedAuthEvent: function closedAuthEvent(_ref6) {
|
|
237
242
|
var display = _ref6.display,
|
|
@@ -350,6 +355,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
350
355
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
351
356
|
* @param previewInvokeMethod How the preview was triggered.
|
|
352
357
|
* @returns
|
|
358
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
353
359
|
*/
|
|
354
360
|
hoverCardViewedEvent: function hoverCardViewedEvent(_ref9) {
|
|
355
361
|
var previewDisplay = _ref9.previewDisplay,
|
|
@@ -383,6 +389,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
383
389
|
* @param extensionKey The extensionKey of the Smart Link resolver invoked.
|
|
384
390
|
* @param previewInvokeMethod How the preview was triggered.
|
|
385
391
|
* @returns
|
|
392
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
386
393
|
*/
|
|
387
394
|
hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref10) {
|
|
388
395
|
var id = _ref10.id,
|
|
@@ -414,28 +421,35 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
414
421
|
* Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
|
|
415
422
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
416
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
|
|
417
425
|
*/
|
|
418
426
|
learnMoreClickedEvent: function learnMoreClickedEvent() {
|
|
419
427
|
return dispatchAnalytics(applyCommonAttributes(uiLearnMoreLinkClickedEvent(), commonAttributes));
|
|
420
428
|
},
|
|
421
429
|
/**
|
|
422
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
|
|
423
432
|
*/
|
|
424
433
|
smartLinkLozengeActionClickedEvent: function smartLinkLozengeActionClickedEvent() {
|
|
425
434
|
return dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusLozengeButtonClicked(), commonAttributes));
|
|
426
435
|
},
|
|
427
436
|
/**
|
|
428
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
|
|
429
439
|
*/
|
|
430
440
|
smartLinkLozengeActionListItemClickedEvent: function smartLinkLozengeActionListItemClickedEvent() {
|
|
431
441
|
return dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusListItemButtonClicked(), commonAttributes));
|
|
432
442
|
},
|
|
433
443
|
/**
|
|
434
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
|
|
435
446
|
*/
|
|
436
447
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: function smartLinkLozengeActionErrorOpenPreviewClickedEvent() {
|
|
437
448
|
return dispatchAnalytics(applyCommonAttributes(uiSmartLinkStatusOpenPreviewButtonClicked(), commonAttributes));
|
|
438
449
|
},
|
|
450
|
+
/**
|
|
451
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
452
|
+
*/
|
|
439
453
|
smartLinkServerActionClickedEvent: function smartLinkServerActionClickedEvent(props) {
|
|
440
454
|
return dispatchAnalytics(applyCommonAttributes(uiServerActionClicked(props), commonAttributes));
|
|
441
455
|
}
|
|
@@ -505,134 +519,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, id, defau
|
|
|
505
519
|
destinationSubproduct: destinationSubproduct,
|
|
506
520
|
location: location
|
|
507
521
|
}), commonAttributes));
|
|
508
|
-
},
|
|
509
|
-
/**
|
|
510
|
-
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
511
|
-
* @param id The unique ID for this Smart Link.
|
|
512
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
513
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
514
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
515
|
-
*/
|
|
516
|
-
connectSucceededEvent: function connectSucceededEvent(_ref13) {
|
|
517
|
-
var id = _ref13.id,
|
|
518
|
-
extensionKey = _ref13.extensionKey,
|
|
519
|
-
definitionId = _ref13.definitionId,
|
|
520
|
-
resourceType = _ref13.resourceType,
|
|
521
|
-
destinationProduct = _ref13.destinationProduct,
|
|
522
|
-
destinationSubproduct = _ref13.destinationSubproduct,
|
|
523
|
-
location = _ref13.location;
|
|
524
|
-
var experienceId = id ? id : defaultId;
|
|
525
|
-
startUfoExperience('smart-link-authenticated', experienceId, {
|
|
526
|
-
extensionKey: extensionKey,
|
|
527
|
-
status: 'success'
|
|
528
|
-
});
|
|
529
|
-
dispatchAnalytics(applyCommonAttributes(_connectSucceededEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
530
|
-
id: experienceId,
|
|
531
|
-
extensionKey: extensionKey,
|
|
532
|
-
definitionId: definitionId,
|
|
533
|
-
resourceType: resourceType,
|
|
534
|
-
destinationProduct: destinationProduct,
|
|
535
|
-
destinationSubproduct: destinationSubproduct,
|
|
536
|
-
location: location
|
|
537
|
-
})), commonAttributes));
|
|
538
|
-
},
|
|
539
|
-
/**
|
|
540
|
-
* This fires an event that represents an account unsuccessfully being connected.
|
|
541
|
-
* @param id The unique ID for this Smart Link.
|
|
542
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
543
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
544
|
-
* @param reason The reason why the Smart Link connect account failed.
|
|
545
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
546
|
-
*/
|
|
547
|
-
connectFailedEvent: function connectFailedEvent(_ref14) {
|
|
548
|
-
var id = _ref14.id,
|
|
549
|
-
reason = _ref14.reason,
|
|
550
|
-
extensionKey = _ref14.extensionKey,
|
|
551
|
-
definitionId = _ref14.definitionId,
|
|
552
|
-
resourceType = _ref14.resourceType,
|
|
553
|
-
destinationProduct = _ref14.destinationProduct,
|
|
554
|
-
destinationSubproduct = _ref14.destinationSubproduct,
|
|
555
|
-
location = _ref14.location;
|
|
556
|
-
var experienceId = id ? id : defaultId;
|
|
557
|
-
startUfoExperience('smart-link-authenticated', experienceId, {
|
|
558
|
-
extensionKey: extensionKey,
|
|
559
|
-
status: reason
|
|
560
|
-
});
|
|
561
|
-
dispatchAnalytics(applyCommonAttributes(_connectFailedEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
562
|
-
id: experienceId,
|
|
563
|
-
reason: reason,
|
|
564
|
-
extensionKey: extensionKey,
|
|
565
|
-
definitionId: definitionId,
|
|
566
|
-
resourceType: resourceType,
|
|
567
|
-
destinationProduct: destinationProduct,
|
|
568
|
-
destinationSubproduct: destinationSubproduct,
|
|
569
|
-
location: location
|
|
570
|
-
})), commonAttributes));
|
|
571
|
-
},
|
|
572
|
-
/**
|
|
573
|
-
* This fires an event which represents a Smart Link request succeeding or failing based on the status.
|
|
574
|
-
* @param id The unique ID for this Smart Link.
|
|
575
|
-
* @param status The status of the Smart Link.
|
|
576
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
577
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
578
|
-
* @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
|
|
579
|
-
* @param error An error representing why the Smart Link request failed.
|
|
580
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
581
|
-
*/
|
|
582
|
-
instrument: function instrument(_ref15) {
|
|
583
|
-
var id = _ref15.id,
|
|
584
|
-
status = _ref15.status,
|
|
585
|
-
extensionKey = _ref15.extensionKey,
|
|
586
|
-
definitionId = _ref15.definitionId,
|
|
587
|
-
resourceType = _ref15.resourceType,
|
|
588
|
-
destinationProduct = _ref15.destinationProduct,
|
|
589
|
-
destinationSubproduct = _ref15.destinationSubproduct,
|
|
590
|
-
location = _ref15.location,
|
|
591
|
-
error = _ref15.error;
|
|
592
|
-
var event = instrumentEvent(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
593
|
-
id: id,
|
|
594
|
-
status: status,
|
|
595
|
-
extensionKey: extensionKey,
|
|
596
|
-
definitionId: definitionId,
|
|
597
|
-
resourceType: resourceType,
|
|
598
|
-
destinationProduct: destinationProduct,
|
|
599
|
-
destinationSubproduct: destinationSubproduct,
|
|
600
|
-
location: location,
|
|
601
|
-
error: error
|
|
602
|
-
}));
|
|
603
|
-
if (event) {
|
|
604
|
-
dispatchAnalytics(applyCommonAttributes(event, commonAttributes));
|
|
605
|
-
}
|
|
606
|
-
},
|
|
607
|
-
/**
|
|
608
|
-
* This fires an event that represents when a Smart Link renders unsuccessfully.
|
|
609
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
610
|
-
* @param id The unique ID for this Smart Link.
|
|
611
|
-
* @param error: An error representing why the Smart Link render failed.
|
|
612
|
-
* @param errorInfo: Additional details about the error including the stack trace.
|
|
613
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
614
|
-
*/
|
|
615
|
-
chunkloadFailedEvent: function chunkloadFailedEvent(_ref16) {
|
|
616
|
-
var display = _ref16.display,
|
|
617
|
-
error = _ref16.error,
|
|
618
|
-
errorInfo = _ref16.errorInfo,
|
|
619
|
-
extensionKey = _ref16.extensionKey,
|
|
620
|
-
definitionId = _ref16.definitionId,
|
|
621
|
-
resourceType = _ref16.resourceType,
|
|
622
|
-
destinationProduct = _ref16.destinationProduct,
|
|
623
|
-
destinationSubproduct = _ref16.destinationSubproduct,
|
|
624
|
-
location = _ref16.location;
|
|
625
|
-
dispatchAnalytics(applyCommonAttributes(_chunkloadFailedEvent({
|
|
626
|
-
display: display,
|
|
627
|
-
error: error,
|
|
628
|
-
errorInfo: errorInfo,
|
|
629
|
-
extensionKey: extensionKey,
|
|
630
|
-
definitionId: definitionId,
|
|
631
|
-
resourceType: resourceType,
|
|
632
|
-
destinationProduct: destinationProduct,
|
|
633
|
-
destinationSubproduct: destinationSubproduct,
|
|
634
|
-
location: location
|
|
635
|
-
}), commonAttributes));
|
|
636
522
|
}
|
|
637
523
|
};
|
|
638
524
|
}, [defaultId, commonAttributes, dispatchAnalytics]);
|