@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 32.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#174435](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/174435)
|
|
8
|
+
[`fc8332240eec9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fc8332240eec9) -
|
|
9
|
+
Migration of some UI analytics
|
|
10
|
+
- [#174257](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/174257)
|
|
11
|
+
[`d2af0045121e9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d2af0045121e9) -
|
|
12
|
+
Clean up smart-card-remove-block-card-from-embed and update embed card resolving view testId
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#175610](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175610)
|
|
17
|
+
[`cd659ec54a158`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cd659ec54a158) -
|
|
18
|
+
Remove FF platform_smart-card-migrate-operational-analytics
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 32.5.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#171430](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171430)
|
|
26
|
+
[`d100d121a8a38`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d100d121a8a38) -
|
|
27
|
+
[ux] Update editor's links to use design system's standards
|
|
28
|
+
|
|
3
29
|
## 32.5.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/analytics.spec.yaml
CHANGED
|
@@ -444,3 +444,166 @@ events:
|
|
|
444
444
|
required: true
|
|
445
445
|
description: Additional details about the error including the stack trace.
|
|
446
446
|
type: object
|
|
447
|
+
- smartLink clicked:
|
|
448
|
+
type: ui
|
|
449
|
+
description: fires an event that represents when a user clicks on a Smart Link.
|
|
450
|
+
attributes:
|
|
451
|
+
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
452
|
+
id:
|
|
453
|
+
required: true
|
|
454
|
+
type: string
|
|
455
|
+
description: The unique ID for this Smart Link.
|
|
456
|
+
display:
|
|
457
|
+
required: true
|
|
458
|
+
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
459
|
+
description: Whether the card was an Inline, Block, Embed or Flexible UI
|
|
460
|
+
definitionId:
|
|
461
|
+
required: false
|
|
462
|
+
type: string
|
|
463
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
464
|
+
isModifierKeyPressed:
|
|
465
|
+
required: false
|
|
466
|
+
type: boolean
|
|
467
|
+
description: Whether a modifier key was pressed when clicking the Smart Link.
|
|
468
|
+
- smartLink clicked (titleGoToLink):
|
|
469
|
+
type: ui
|
|
470
|
+
description: fires an event that represents when a user clicks on a Smart Link.
|
|
471
|
+
attributes:
|
|
472
|
+
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
473
|
+
id:
|
|
474
|
+
required: true
|
|
475
|
+
type: string
|
|
476
|
+
description: The unique ID for this Smart Link.
|
|
477
|
+
display:
|
|
478
|
+
required: true
|
|
479
|
+
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
480
|
+
description: Whether the card was an Inline, Block, Embed or Flexible UI
|
|
481
|
+
definitionId:
|
|
482
|
+
required: false
|
|
483
|
+
type: string
|
|
484
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
485
|
+
isModifierKeyPressed:
|
|
486
|
+
required: false
|
|
487
|
+
type: boolean
|
|
488
|
+
description: Whether a modifier key was pressed when clicking the Smart Link.
|
|
489
|
+
- hoverCard viewed:
|
|
490
|
+
type: ui
|
|
491
|
+
description: fires an event that represents a hover preview being opened.
|
|
492
|
+
attributes:
|
|
493
|
+
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
494
|
+
previewDisplay:
|
|
495
|
+
type: ['card', 'embed']
|
|
496
|
+
required: true
|
|
497
|
+
description: What format the preview is in.
|
|
498
|
+
previewInvokeMethod:
|
|
499
|
+
type: ['keyboard', 'mouse_hover', 'mouse_click']
|
|
500
|
+
required: false
|
|
501
|
+
description: How the preview was triggered.
|
|
502
|
+
definitionId:
|
|
503
|
+
required: false
|
|
504
|
+
type: string
|
|
505
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
506
|
+
- hoverCard dismissed:
|
|
507
|
+
type: ui
|
|
508
|
+
description: fires an event that represents a hover preview being dismissed.
|
|
509
|
+
attributes:
|
|
510
|
+
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
511
|
+
previewDisplay:
|
|
512
|
+
type: ['card', 'embed']
|
|
513
|
+
required: true
|
|
514
|
+
description: What format the preview is in.
|
|
515
|
+
hoverTime:
|
|
516
|
+
type: number
|
|
517
|
+
required: true
|
|
518
|
+
description:
|
|
519
|
+
The duration that the user hovered over a Smart Link before the preview was dismissed.
|
|
520
|
+
previewInvokeMethod:
|
|
521
|
+
type: ['keyboard', 'mouse_hover', 'mouse_click']
|
|
522
|
+
required: false
|
|
523
|
+
description: How the preview was triggered.
|
|
524
|
+
definitionId:
|
|
525
|
+
required: false
|
|
526
|
+
type: string
|
|
527
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
528
|
+
- button clicked (connectAccount):
|
|
529
|
+
type: ui
|
|
530
|
+
description:
|
|
531
|
+
fires an event that represents when a user clicks on the authentication call to action with
|
|
532
|
+
no current authenticated account. (i.e. Connect to Preview).
|
|
533
|
+
attributes:
|
|
534
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
535
|
+
display:
|
|
536
|
+
required: true
|
|
537
|
+
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
538
|
+
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
539
|
+
definitionId:
|
|
540
|
+
required: false
|
|
541
|
+
type: string
|
|
542
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
543
|
+
- smartLink clicked (tryAnotherAccount):
|
|
544
|
+
type: ui
|
|
545
|
+
description:
|
|
546
|
+
fires an event that represents when a user clicks on the authentication call to action with
|
|
547
|
+
a forbidden authenticated account. (i.e. Try another account).
|
|
548
|
+
attributes:
|
|
549
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
550
|
+
display:
|
|
551
|
+
required: true
|
|
552
|
+
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
553
|
+
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
554
|
+
definitionId:
|
|
555
|
+
required: false
|
|
556
|
+
type: string
|
|
557
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
558
|
+
- consentModal closed:
|
|
559
|
+
type: ui
|
|
560
|
+
description:
|
|
561
|
+
fires an event that represents when a user closed the authentication window without
|
|
562
|
+
authenticating after opening it.
|
|
563
|
+
attributes:
|
|
564
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
565
|
+
display:
|
|
566
|
+
required: true
|
|
567
|
+
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
568
|
+
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
569
|
+
definitionId:
|
|
570
|
+
required: false
|
|
571
|
+
type: string
|
|
572
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
573
|
+
- button clicked (learnMore):
|
|
574
|
+
type: ui
|
|
575
|
+
description:
|
|
576
|
+
fires an event that signifies that a "Learn More" link was clicked on an unauthenticated
|
|
577
|
+
card
|
|
578
|
+
attributes:
|
|
579
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
580
|
+
- button clicked (smartLinkStatusLozenge):
|
|
581
|
+
type: ui
|
|
582
|
+
description: fires an event that represent a click was performed on a Status Lozenge
|
|
583
|
+
attributes:
|
|
584
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
585
|
+
- button clicked (smartLinkStatusListItem):
|
|
586
|
+
type: ui
|
|
587
|
+
description:
|
|
588
|
+
fires an event that represent a click was performed on a Status Lozenge's dropdown item
|
|
589
|
+
attributes:
|
|
590
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
591
|
+
- button clicked (smartLinkStatusOpenPreview):
|
|
592
|
+
type: ui
|
|
593
|
+
description:
|
|
594
|
+
fires an event that represent a click was performed on a Status Lozenge open preview button
|
|
595
|
+
attributes:
|
|
596
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
597
|
+
- button clicked (smartLinkFollowButton):
|
|
598
|
+
type: ui
|
|
599
|
+
description: fires an event that represents a click was performed on the follow button.
|
|
600
|
+
attributes:
|
|
601
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
602
|
+
- button clicked (StatusUpdateAction):
|
|
603
|
+
type: ui
|
|
604
|
+
attributes:
|
|
605
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
606
|
+
- button clicked (GetStatusTransitionsAction):
|
|
607
|
+
type: ui
|
|
608
|
+
attributes:
|
|
609
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
@@ -107,18 +107,32 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
|
|
|
107
107
|
var services = (0, _helpers.getServices)(details);
|
|
108
108
|
// When authentication is triggered, let GAS know!
|
|
109
109
|
if (status === 'unauthorized') {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
if ((0, _platformFeatureFlags.fg)('platform_migrate-some-ui-events-smart-card')) {
|
|
111
|
+
fireEvent('ui.button.clicked.connectAccount', {
|
|
112
|
+
display: appearance,
|
|
113
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
114
|
+
});
|
|
115
|
+
} else {
|
|
116
|
+
analytics.ui.authEvent({
|
|
117
|
+
display: appearance,
|
|
118
|
+
definitionId: definitionId,
|
|
119
|
+
extensionKey: extensionKey
|
|
120
|
+
});
|
|
121
|
+
}
|
|
115
122
|
}
|
|
116
123
|
if (status === 'forbidden') {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
if ((0, _platformFeatureFlags.fg)('platform_migrate-some-ui-events-smart-card')) {
|
|
125
|
+
fireEvent('ui.smartLink.clicked.tryAnotherAccount', {
|
|
126
|
+
display: appearance,
|
|
127
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
128
|
+
});
|
|
129
|
+
} else {
|
|
130
|
+
analytics.ui.authAlternateAccountEvent({
|
|
131
|
+
display: appearance,
|
|
132
|
+
definitionId: definitionId,
|
|
133
|
+
extensionKey: extensionKey
|
|
134
|
+
});
|
|
135
|
+
}
|
|
122
136
|
}
|
|
123
137
|
if (services.length > 0) {
|
|
124
138
|
fireEvent('screen.consentModal.viewed', {
|
|
@@ -128,52 +142,42 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
|
|
|
128
142
|
fireEvent('track.applicationAccount.connected', {
|
|
129
143
|
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
130
144
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
});
|
|
139
|
-
} else {
|
|
140
|
-
analytics.operational.connectSucceededEvent({
|
|
141
|
-
id: id,
|
|
142
|
-
definitionId: definitionId,
|
|
143
|
-
extensionKey: extensionKey
|
|
144
|
-
});
|
|
145
|
-
}
|
|
145
|
+
(0, _analytics.startUfoExperience)('smart-link-authenticated', id, {
|
|
146
|
+
extensionKey: extensionKey,
|
|
147
|
+
status: 'success'
|
|
148
|
+
});
|
|
149
|
+
fireEvent('operational.smartLink.connectSucceeded', {
|
|
150
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
151
|
+
});
|
|
146
152
|
reload();
|
|
147
153
|
}, function (err) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
});
|
|
158
|
-
} else {
|
|
159
|
-
analytics.operational.connectFailedEvent({
|
|
160
|
-
id: id,
|
|
161
|
-
definitionId: definitionId,
|
|
162
|
-
extensionKey: extensionKey,
|
|
163
|
-
reason: err.type
|
|
164
|
-
});
|
|
165
|
-
}
|
|
154
|
+
var _err$type;
|
|
155
|
+
(0, _analytics.startUfoExperience)('smart-link-authenticated', id, {
|
|
156
|
+
extensionKey: extensionKey,
|
|
157
|
+
status: err.type
|
|
158
|
+
});
|
|
159
|
+
fireEvent('operational.smartLink.connectFailed', {
|
|
160
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
161
|
+
reason: (_err$type = err.type) !== null && _err$type !== void 0 ? _err$type : null
|
|
162
|
+
});
|
|
166
163
|
if (err.type === 'auth_window_closed') {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
if ((0, _platformFeatureFlags.fg)('platform_migrate-some-ui-events-smart-card')) {
|
|
165
|
+
fireEvent('ui.consentModal.closed', {
|
|
166
|
+
display: appearance,
|
|
167
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
168
|
+
});
|
|
169
|
+
} else {
|
|
170
|
+
analytics.ui.closedAuthEvent({
|
|
171
|
+
display: appearance,
|
|
172
|
+
definitionId: definitionId,
|
|
173
|
+
extensionKey: extensionKey
|
|
174
|
+
});
|
|
175
|
+
}
|
|
172
176
|
}
|
|
173
177
|
reload();
|
|
174
178
|
});
|
|
175
179
|
}
|
|
176
|
-
}, [getSmartLinkState, analytics.ui,
|
|
180
|
+
}, [getSmartLinkState, analytics.ui, id, reload, fireEvent]);
|
|
177
181
|
var invoke = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
178
182
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(opts, appearance) {
|
|
179
183
|
var key, action, source;
|
|
@@ -79,6 +79,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
79
79
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
80
80
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
81
81
|
* @returns
|
|
82
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
82
83
|
*/
|
|
83
84
|
authEvent: function authEvent(_ref) {
|
|
84
85
|
var display = _ref.display,
|
|
@@ -105,6 +106,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
105
106
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
106
107
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
107
108
|
* @returns
|
|
109
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
108
110
|
*/
|
|
109
111
|
authAlternateAccountEvent: function authAlternateAccountEvent(_ref2) {
|
|
110
112
|
var display = _ref2.display,
|
|
@@ -149,6 +151,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
149
151
|
* @param location Where the Smart Link is currently rendered.
|
|
150
152
|
* @param destinationProduct The product the Smart Link is linked to.
|
|
151
153
|
* @returns
|
|
154
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
152
155
|
*/
|
|
153
156
|
cardClickedEvent: function cardClickedEvent(_ref3) {
|
|
154
157
|
var id = _ref3.id,
|
|
@@ -213,6 +216,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
213
216
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
214
217
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
215
218
|
* @param previewInvokeMethod How the preview was triggered.
|
|
219
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
216
220
|
*/
|
|
217
221
|
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(_ref5) {
|
|
218
222
|
var previewDisplay = _ref5.previewDisplay,
|
|
@@ -239,6 +243,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
239
243
|
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
240
244
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
241
245
|
* @returns
|
|
246
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
242
247
|
*/
|
|
243
248
|
closedAuthEvent: function closedAuthEvent(_ref6) {
|
|
244
249
|
var display = _ref6.display,
|
|
@@ -357,6 +362,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
357
362
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
358
363
|
* @param previewInvokeMethod How the preview was triggered.
|
|
359
364
|
* @returns
|
|
365
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
360
366
|
*/
|
|
361
367
|
hoverCardViewedEvent: function hoverCardViewedEvent(_ref9) {
|
|
362
368
|
var previewDisplay = _ref9.previewDisplay,
|
|
@@ -390,6 +396,7 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
390
396
|
* @param extensionKey The extensionKey of the Smart Link resolver invoked.
|
|
391
397
|
* @param previewInvokeMethod How the preview was triggered.
|
|
392
398
|
* @returns
|
|
399
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
393
400
|
*/
|
|
394
401
|
hoverCardDismissedEvent: function hoverCardDismissedEvent(_ref10) {
|
|
395
402
|
var id = _ref10.id,
|
|
@@ -421,28 +428,35 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
421
428
|
* Fires an event that signifies that a "Learn More" link was clicked on an unauthenticated card
|
|
422
429
|
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
423
430
|
* @param location The location where a link is displayed (jiraWebLinks, confluencePages etc)
|
|
431
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
424
432
|
*/
|
|
425
433
|
learnMoreClickedEvent: function learnMoreClickedEvent() {
|
|
426
434
|
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiLearnMoreLinkClickedEvent)(), commonAttributes));
|
|
427
435
|
},
|
|
428
436
|
/**
|
|
429
437
|
* Fires an event that represent a click was performed on a Status Lozenge
|
|
438
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
430
439
|
*/
|
|
431
440
|
smartLinkLozengeActionClickedEvent: function smartLinkLozengeActionClickedEvent() {
|
|
432
441
|
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusLozengeButtonClicked)(), commonAttributes));
|
|
433
442
|
},
|
|
434
443
|
/**
|
|
435
444
|
* Fires an event that represent a click was performed on a Status Lozenge's dropdown item
|
|
445
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
436
446
|
*/
|
|
437
447
|
smartLinkLozengeActionListItemClickedEvent: function smartLinkLozengeActionListItemClickedEvent() {
|
|
438
448
|
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusListItemButtonClicked)(), commonAttributes));
|
|
439
449
|
},
|
|
440
450
|
/**
|
|
441
451
|
* Fires an event that represent a click was performed on a Status Lozenge open preview button
|
|
452
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
442
453
|
*/
|
|
443
454
|
smartLinkLozengeActionErrorOpenPreviewClickedEvent: function smartLinkLozengeActionErrorOpenPreviewClickedEvent() {
|
|
444
455
|
return dispatchAnalytics(applyCommonAttributes((0, _analytics.uiSmartLinkStatusOpenPreviewButtonClicked)(), commonAttributes));
|
|
445
456
|
},
|
|
457
|
+
/**
|
|
458
|
+
* @deprecated consider removing when cleaning up FF platform_migrate-some-ui-events-smart-card
|
|
459
|
+
*/
|
|
446
460
|
smartLinkServerActionClickedEvent: function smartLinkServerActionClickedEvent(props) {
|
|
447
461
|
return dispatchAnalytics(applyCommonAttributes((0, _analytics2.uiServerActionClicked)(props), commonAttributes));
|
|
448
462
|
}
|
|
@@ -512,134 +526,6 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
512
526
|
destinationSubproduct: destinationSubproduct,
|
|
513
527
|
location: location
|
|
514
528
|
}), commonAttributes));
|
|
515
|
-
},
|
|
516
|
-
/**
|
|
517
|
-
* This fires an event that represents an account successfully being connected via a Smart Link.
|
|
518
|
-
* @param id The unique ID for this Smart Link.
|
|
519
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
520
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
521
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
522
|
-
*/
|
|
523
|
-
connectSucceededEvent: function connectSucceededEvent(_ref13) {
|
|
524
|
-
var id = _ref13.id,
|
|
525
|
-
extensionKey = _ref13.extensionKey,
|
|
526
|
-
definitionId = _ref13.definitionId,
|
|
527
|
-
resourceType = _ref13.resourceType,
|
|
528
|
-
destinationProduct = _ref13.destinationProduct,
|
|
529
|
-
destinationSubproduct = _ref13.destinationSubproduct,
|
|
530
|
-
location = _ref13.location;
|
|
531
|
-
var experienceId = id ? id : defaultId;
|
|
532
|
-
(0, _ufoExperiences.startUfoExperience)('smart-link-authenticated', experienceId, {
|
|
533
|
-
extensionKey: extensionKey,
|
|
534
|
-
status: 'success'
|
|
535
|
-
});
|
|
536
|
-
dispatchAnalytics(applyCommonAttributes((0, _analytics.connectSucceededEvent)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
537
|
-
id: experienceId,
|
|
538
|
-
extensionKey: extensionKey,
|
|
539
|
-
definitionId: definitionId,
|
|
540
|
-
resourceType: resourceType,
|
|
541
|
-
destinationProduct: destinationProduct,
|
|
542
|
-
destinationSubproduct: destinationSubproduct,
|
|
543
|
-
location: location
|
|
544
|
-
})), commonAttributes));
|
|
545
|
-
},
|
|
546
|
-
/**
|
|
547
|
-
* This fires an event that represents an account unsuccessfully being connected.
|
|
548
|
-
* @param id The unique ID for this Smart Link.
|
|
549
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
550
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
551
|
-
* @param reason The reason why the Smart Link connect account failed.
|
|
552
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
553
|
-
*/
|
|
554
|
-
connectFailedEvent: function connectFailedEvent(_ref14) {
|
|
555
|
-
var id = _ref14.id,
|
|
556
|
-
reason = _ref14.reason,
|
|
557
|
-
extensionKey = _ref14.extensionKey,
|
|
558
|
-
definitionId = _ref14.definitionId,
|
|
559
|
-
resourceType = _ref14.resourceType,
|
|
560
|
-
destinationProduct = _ref14.destinationProduct,
|
|
561
|
-
destinationSubproduct = _ref14.destinationSubproduct,
|
|
562
|
-
location = _ref14.location;
|
|
563
|
-
var experienceId = id ? id : defaultId;
|
|
564
|
-
(0, _ufoExperiences.startUfoExperience)('smart-link-authenticated', experienceId, {
|
|
565
|
-
extensionKey: extensionKey,
|
|
566
|
-
status: reason
|
|
567
|
-
});
|
|
568
|
-
dispatchAnalytics(applyCommonAttributes((0, _analytics.connectFailedEvent)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
569
|
-
id: experienceId,
|
|
570
|
-
reason: reason,
|
|
571
|
-
extensionKey: extensionKey,
|
|
572
|
-
definitionId: definitionId,
|
|
573
|
-
resourceType: resourceType,
|
|
574
|
-
destinationProduct: destinationProduct,
|
|
575
|
-
destinationSubproduct: destinationSubproduct,
|
|
576
|
-
location: location
|
|
577
|
-
})), commonAttributes));
|
|
578
|
-
},
|
|
579
|
-
/**
|
|
580
|
-
* This fires an event which represents a Smart Link request succeeding or failing based on the status.
|
|
581
|
-
* @param id The unique ID for this Smart Link.
|
|
582
|
-
* @param status The status of the Smart Link.
|
|
583
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
584
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
585
|
-
* @param resourceType The type of resource that was invoked. This is provider specific (e.g. File, PullRequest).
|
|
586
|
-
* @param error An error representing why the Smart Link request failed.
|
|
587
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
588
|
-
*/
|
|
589
|
-
instrument: function instrument(_ref15) {
|
|
590
|
-
var id = _ref15.id,
|
|
591
|
-
status = _ref15.status,
|
|
592
|
-
extensionKey = _ref15.extensionKey,
|
|
593
|
-
definitionId = _ref15.definitionId,
|
|
594
|
-
resourceType = _ref15.resourceType,
|
|
595
|
-
destinationProduct = _ref15.destinationProduct,
|
|
596
|
-
destinationSubproduct = _ref15.destinationSubproduct,
|
|
597
|
-
location = _ref15.location,
|
|
598
|
-
error = _ref15.error;
|
|
599
|
-
var event = (0, _analytics.instrumentEvent)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
600
|
-
id: id,
|
|
601
|
-
status: status,
|
|
602
|
-
extensionKey: extensionKey,
|
|
603
|
-
definitionId: definitionId,
|
|
604
|
-
resourceType: resourceType,
|
|
605
|
-
destinationProduct: destinationProduct,
|
|
606
|
-
destinationSubproduct: destinationSubproduct,
|
|
607
|
-
location: location,
|
|
608
|
-
error: error
|
|
609
|
-
}));
|
|
610
|
-
if (event) {
|
|
611
|
-
dispatchAnalytics(applyCommonAttributes(event, commonAttributes));
|
|
612
|
-
}
|
|
613
|
-
},
|
|
614
|
-
/**
|
|
615
|
-
* This fires an event that represents when a Smart Link renders unsuccessfully.
|
|
616
|
-
* @param display Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
617
|
-
* @param id The unique ID for this Smart Link.
|
|
618
|
-
* @param error: An error representing why the Smart Link render failed.
|
|
619
|
-
* @param errorInfo: Additional details about the error including the stack trace.
|
|
620
|
-
* @deprecated remove with platform_smart-card-migrate-operational-analytics clean up
|
|
621
|
-
*/
|
|
622
|
-
chunkloadFailedEvent: function chunkloadFailedEvent(_ref16) {
|
|
623
|
-
var display = _ref16.display,
|
|
624
|
-
error = _ref16.error,
|
|
625
|
-
errorInfo = _ref16.errorInfo,
|
|
626
|
-
extensionKey = _ref16.extensionKey,
|
|
627
|
-
definitionId = _ref16.definitionId,
|
|
628
|
-
resourceType = _ref16.resourceType,
|
|
629
|
-
destinationProduct = _ref16.destinationProduct,
|
|
630
|
-
destinationSubproduct = _ref16.destinationSubproduct,
|
|
631
|
-
location = _ref16.location;
|
|
632
|
-
dispatchAnalytics(applyCommonAttributes((0, _analytics.chunkloadFailedEvent)({
|
|
633
|
-
display: display,
|
|
634
|
-
error: error,
|
|
635
|
-
errorInfo: errorInfo,
|
|
636
|
-
extensionKey: extensionKey,
|
|
637
|
-
definitionId: definitionId,
|
|
638
|
-
resourceType: resourceType,
|
|
639
|
-
destinationProduct: destinationProduct,
|
|
640
|
-
destinationSubproduct: destinationSubproduct,
|
|
641
|
-
location: location
|
|
642
|
-
}), commonAttributes));
|
|
643
529
|
}
|
|
644
530
|
};
|
|
645
531
|
}, [defaultId, commonAttributes, dispatchAnalytics]);
|