@atlaskit/smart-card 32.7.2 → 32.7.3
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 +12 -0
- package/analytics.spec.yaml +112 -53
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +26 -9
- package/dist/cjs/view/CardWithUrl/loader.js +21 -7
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +35 -8
- package/dist/cjs/view/HoverCard/index.js +25 -8
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +26 -9
- package/dist/es2019/view/CardWithUrl/loader.js +21 -7
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +33 -9
- package/dist/es2019/view/HoverCard/index.js +26 -8
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +26 -9
- package/dist/esm/view/CardWithUrl/loader.js +21 -7
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +36 -9
- package/dist/esm/view/HoverCard/index.js +25 -8
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/analytics/generated/analytics.types.d.ts +35 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +35 -1
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 32.7.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#170382](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170382)
|
|
8
|
+
[`7f76b5be1e203`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7f76b5be1e203) -
|
|
9
|
+
Migrate UI events outside EmbedModal
|
|
10
|
+
- [#176427](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/176427)
|
|
11
|
+
[`f4a255aa30b2b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f4a255aa30b2b) -
|
|
12
|
+
Migrated smart-card proxied exports (linking-common, link-provider, json-ld-types) to import from
|
|
13
|
+
modules directly
|
|
14
|
+
|
|
3
15
|
## 32.7.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/analytics.spec.yaml
CHANGED
|
@@ -62,7 +62,7 @@ context:
|
|
|
62
62
|
values
|
|
63
63
|
required: false
|
|
64
64
|
displayCategory:
|
|
65
|
-
type: ['smartLink', 'link']
|
|
65
|
+
type: [ 'smartLink', 'link' ]
|
|
66
66
|
description: |
|
|
67
67
|
The overarching category of what the link is shown as.
|
|
68
68
|
`smartLink` : we are able to resolve the link and is displayed as a smart link
|
|
@@ -192,23 +192,28 @@ events:
|
|
|
192
192
|
description: Fired when an view link is clicked
|
|
193
193
|
attributes:
|
|
194
194
|
<<: [*PackageMetaDataContext, *ResolvedContext, *ClientActionAttributes ]
|
|
195
|
+
- button clicked (issueStatusUpdate):
|
|
196
|
+
type: ui
|
|
197
|
+
description: fires an event that represents a user clicking on the preview action button
|
|
198
|
+
attributes:
|
|
199
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *ClientActionAttributes ]
|
|
195
200
|
- button clicked (aiSummary):
|
|
196
201
|
type: ui
|
|
197
202
|
description: fired when an ai summary is clicked
|
|
198
203
|
attributes:
|
|
199
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
204
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
200
205
|
|
|
201
206
|
- button clicked (copySummary):
|
|
202
207
|
type: ui
|
|
203
208
|
description: fired when the copy ai summary button is clicked
|
|
204
209
|
attributes:
|
|
205
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
210
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
206
211
|
|
|
207
212
|
- summary viewed:
|
|
208
213
|
type: ui
|
|
209
214
|
description: fired when a summary is viewed
|
|
210
215
|
attributes:
|
|
211
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
216
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
212
217
|
fromCache:
|
|
213
218
|
required: false
|
|
214
219
|
type: boolean
|
|
@@ -218,19 +223,19 @@ events:
|
|
|
218
223
|
type: ui
|
|
219
224
|
description: fired when a summary error is viewed
|
|
220
225
|
attributes:
|
|
221
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
226
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
222
227
|
|
|
223
228
|
- summary success:
|
|
224
229
|
type: operational
|
|
225
230
|
description: fired when a summary request finishes with a successful response
|
|
226
231
|
attributes:
|
|
227
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
232
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
228
233
|
|
|
229
234
|
- summary failed:
|
|
230
235
|
type: operational
|
|
231
236
|
description: fired when a summary request finishes with a failed response
|
|
232
237
|
attributes:
|
|
233
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
238
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
234
239
|
reason:
|
|
235
240
|
required: false
|
|
236
241
|
type: string
|
|
@@ -244,31 +249,31 @@ events:
|
|
|
244
249
|
type: track
|
|
245
250
|
description: fired when an explicit request is made to use an AI-powered feature
|
|
246
251
|
attributes:
|
|
247
|
-
<<: [*PackageMetaDataContext, *AiInteractionAttributes]
|
|
252
|
+
<<: [ *PackageMetaDataContext, *AiInteractionAttributes ]
|
|
248
253
|
|
|
249
254
|
- button clicked (automationAction):
|
|
250
255
|
type: ui
|
|
251
256
|
description: fired when the automation action button is clicked
|
|
252
257
|
attributes:
|
|
253
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
258
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
254
259
|
|
|
255
260
|
- button clicked (relatedLinks):
|
|
256
261
|
type: ui
|
|
257
262
|
description: fired when the related links action button is clicked
|
|
258
263
|
attributes:
|
|
259
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
264
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
260
265
|
|
|
261
266
|
- modal opened (relatedLinks):
|
|
262
267
|
type: ui
|
|
263
268
|
description: fired when related links modal is opened
|
|
264
269
|
attributes:
|
|
265
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
270
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
266
271
|
|
|
267
272
|
- modal closed (relatedLinks):
|
|
268
273
|
type: ui
|
|
269
274
|
description: fired when related links modal is closed
|
|
270
275
|
attributes:
|
|
271
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
276
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
272
277
|
dwellTime:
|
|
273
278
|
required: true
|
|
274
279
|
type: number
|
|
@@ -278,7 +283,7 @@ events:
|
|
|
278
283
|
type: operational
|
|
279
284
|
description: fired when related links are retrieved successfully
|
|
280
285
|
attributes:
|
|
281
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
286
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
282
287
|
incomingCount:
|
|
283
288
|
type: number
|
|
284
289
|
required: true
|
|
@@ -292,7 +297,7 @@ events:
|
|
|
292
297
|
type: operational
|
|
293
298
|
description: fired when related links retrieval fails
|
|
294
299
|
attributes:
|
|
295
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
300
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
296
301
|
reason:
|
|
297
302
|
required: true
|
|
298
303
|
type: string
|
|
@@ -301,14 +306,14 @@ events:
|
|
|
301
306
|
type: ui
|
|
302
307
|
description: fired when a user dwells their cursor on a Smart Link's iframe
|
|
303
308
|
attributes:
|
|
304
|
-
<<: [*PackageMetaDataContext, *ResolvedContext]
|
|
309
|
+
<<: [ *PackageMetaDataContext, *ResolvedContext ]
|
|
305
310
|
id:
|
|
306
311
|
required: true
|
|
307
312
|
type: string
|
|
308
313
|
description: The unique ID for this Smart Link
|
|
309
314
|
display:
|
|
310
315
|
required: true
|
|
311
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
316
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
312
317
|
description: Whether the card was an Inline, Block, Embed or Flexible UI
|
|
313
318
|
definitionId:
|
|
314
319
|
required: false
|
|
@@ -332,7 +337,7 @@ events:
|
|
|
332
337
|
description: The unique ID for this Smart Link.
|
|
333
338
|
display:
|
|
334
339
|
required: true
|
|
335
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
340
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
336
341
|
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
337
342
|
definitionId:
|
|
338
343
|
required: false
|
|
@@ -342,36 +347,36 @@ events:
|
|
|
342
347
|
type: track
|
|
343
348
|
description: user connecting their account to view a Smart Link.
|
|
344
349
|
attributes:
|
|
345
|
-
<<: [*PackageMetaDataContext, *CommonAttributes, *CommonContext]
|
|
350
|
+
<<: [ *PackageMetaDataContext, *CommonAttributes, *CommonContext ]
|
|
346
351
|
- applicationAccount authStarted:
|
|
347
352
|
type: track
|
|
348
353
|
description: user starting the Smart Link connect account process.
|
|
349
354
|
attributes:
|
|
350
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
355
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
351
356
|
- smartLinkQuickAction started:
|
|
352
357
|
type: track
|
|
353
358
|
description: fires event before an action invoke api call is made
|
|
354
359
|
attributes:
|
|
355
|
-
<<: [*PackageMetaDataContext, *CommonContext, *smartLinkActionTypeAttribute]
|
|
360
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *smartLinkActionTypeAttribute ]
|
|
356
361
|
- smartLinkQuickAction success:
|
|
357
362
|
type: track
|
|
358
363
|
description: fires a tracking event after an action invoke api call is successful
|
|
359
364
|
attributes:
|
|
360
|
-
<<: [*PackageMetaDataContext, *CommonContext, *smartLinkActionTypeAttribute]
|
|
365
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *smartLinkActionTypeAttribute ]
|
|
361
366
|
- smartLinkQuickAction failed:
|
|
362
367
|
type: track
|
|
363
368
|
description: fires a tracking event after an action invoke api call has failed
|
|
364
369
|
attributes:
|
|
365
|
-
<<: [*PackageMetaDataContext, *CommonContext, *smartLinkActionTypeAttribute]
|
|
370
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *smartLinkActionTypeAttribute ]
|
|
366
371
|
reason:
|
|
367
372
|
required: false
|
|
368
373
|
description: The reason for the failure
|
|
369
|
-
type: ['PermissionError', 'ValidationError', 'UnknownError']
|
|
374
|
+
type: [ 'PermissionError', 'ValidationError', 'UnknownError' ]
|
|
370
375
|
- consentModal viewed:
|
|
371
376
|
type: screen
|
|
372
377
|
description: fires an event which represents the connect account page being opened.
|
|
373
378
|
attributes:
|
|
374
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
379
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
375
380
|
definitionId:
|
|
376
381
|
required: false
|
|
377
382
|
type: string
|
|
@@ -381,7 +386,7 @@ events:
|
|
|
381
386
|
description:
|
|
382
387
|
fires an event that represents an account successfully being connected via a Smart Link.
|
|
383
388
|
attributes:
|
|
384
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
389
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
385
390
|
definitionId:
|
|
386
391
|
required: false
|
|
387
392
|
type: string
|
|
@@ -390,7 +395,7 @@ events:
|
|
|
390
395
|
type: operational
|
|
391
396
|
description: fires an event that represents an account unsuccessfully being connected.
|
|
392
397
|
attributes:
|
|
393
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
398
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
394
399
|
reason:
|
|
395
400
|
required: false
|
|
396
401
|
description: The reason why the Smart Link connect account failed.
|
|
@@ -403,7 +408,7 @@ events:
|
|
|
403
408
|
type: operational
|
|
404
409
|
description: fires an event which represents a Smart Link request succeeding.
|
|
405
410
|
attributes:
|
|
406
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
411
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
407
412
|
status:
|
|
408
413
|
type:
|
|
409
414
|
[
|
|
@@ -429,7 +434,7 @@ events:
|
|
|
429
434
|
type: operational
|
|
430
435
|
description: fires an event which represents a Smart Link request failing.
|
|
431
436
|
attributes:
|
|
432
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
437
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
433
438
|
status:
|
|
434
439
|
type:
|
|
435
440
|
[
|
|
@@ -459,10 +464,10 @@ events:
|
|
|
459
464
|
type: operational
|
|
460
465
|
description: fires an event that represents when a Smart Link renders unsuccessfully.
|
|
461
466
|
attributes:
|
|
462
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
467
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
463
468
|
display:
|
|
464
469
|
required: true
|
|
465
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
470
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
466
471
|
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
467
472
|
definitionId:
|
|
468
473
|
required: false
|
|
@@ -502,14 +507,14 @@ events:
|
|
|
502
507
|
type: ui
|
|
503
508
|
description: fires an event that represents when a user clicks on a Smart Link.
|
|
504
509
|
attributes:
|
|
505
|
-
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
510
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *ResolvedContext ]
|
|
506
511
|
id:
|
|
507
512
|
required: true
|
|
508
513
|
type: string
|
|
509
514
|
description: The unique ID for this Smart Link.
|
|
510
515
|
display:
|
|
511
516
|
required: true
|
|
512
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
517
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
513
518
|
description: Whether the card was an Inline, Block, Embed or Flexible UI
|
|
514
519
|
definitionId:
|
|
515
520
|
required: false
|
|
@@ -523,14 +528,14 @@ events:
|
|
|
523
528
|
type: ui
|
|
524
529
|
description: fires an event that represents when a user clicks on a Smart Link.
|
|
525
530
|
attributes:
|
|
526
|
-
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
531
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *ResolvedContext ]
|
|
527
532
|
id:
|
|
528
533
|
required: true
|
|
529
534
|
type: string
|
|
530
535
|
description: The unique ID for this Smart Link.
|
|
531
536
|
display:
|
|
532
537
|
required: true
|
|
533
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
538
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
534
539
|
description: Whether the card was an Inline, Block, Embed or Flexible UI
|
|
535
540
|
definitionId:
|
|
536
541
|
required: false
|
|
@@ -544,13 +549,13 @@ events:
|
|
|
544
549
|
type: ui
|
|
545
550
|
description: fires an event that represents a hover preview being opened.
|
|
546
551
|
attributes:
|
|
547
|
-
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
552
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *ResolvedContext ]
|
|
548
553
|
previewDisplay:
|
|
549
|
-
type: ['card', 'embed']
|
|
554
|
+
type: [ 'card', 'embed' ]
|
|
550
555
|
required: true
|
|
551
556
|
description: What format the preview is in.
|
|
552
557
|
previewInvokeMethod:
|
|
553
|
-
type: ['keyboard', 'mouse_hover', 'mouse_click']
|
|
558
|
+
type: [ 'keyboard', 'mouse_hover', 'mouse_click' ]
|
|
554
559
|
required: false
|
|
555
560
|
description: How the preview was triggered.
|
|
556
561
|
definitionId:
|
|
@@ -561,9 +566,9 @@ events:
|
|
|
561
566
|
type: ui
|
|
562
567
|
description: fires an event that represents a hover preview being dismissed.
|
|
563
568
|
attributes:
|
|
564
|
-
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
569
|
+
<<: [ *PackageMetaDataContext, *CommonContext, *ResolvedContext ]
|
|
565
570
|
previewDisplay:
|
|
566
|
-
type: ['card', 'embed']
|
|
571
|
+
type: [ 'card', 'embed' ]
|
|
567
572
|
required: true
|
|
568
573
|
description: What format the preview is in.
|
|
569
574
|
hoverTime:
|
|
@@ -572,7 +577,7 @@ events:
|
|
|
572
577
|
description:
|
|
573
578
|
The duration that the user hovered over a Smart Link before the preview was dismissed.
|
|
574
579
|
previewInvokeMethod:
|
|
575
|
-
type: ['keyboard', 'mouse_hover', 'mouse_click']
|
|
580
|
+
type: [ 'keyboard', 'mouse_hover', 'mouse_click' ]
|
|
576
581
|
required: false
|
|
577
582
|
description: How the preview was triggered.
|
|
578
583
|
definitionId:
|
|
@@ -585,10 +590,10 @@ events:
|
|
|
585
590
|
fires an event that represents when a user clicks on the authentication call to action with
|
|
586
591
|
no current authenticated account. (i.e. Connect to Preview).
|
|
587
592
|
attributes:
|
|
588
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
593
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
589
594
|
display:
|
|
590
595
|
required: true
|
|
591
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
596
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
592
597
|
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
593
598
|
definitionId:
|
|
594
599
|
required: false
|
|
@@ -600,10 +605,10 @@ events:
|
|
|
600
605
|
fires an event that represents when a user clicks on the authentication call to action with
|
|
601
606
|
a forbidden authenticated account. (i.e. Try another account).
|
|
602
607
|
attributes:
|
|
603
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
608
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
604
609
|
display:
|
|
605
610
|
required: true
|
|
606
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
611
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
607
612
|
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
608
613
|
definitionId:
|
|
609
614
|
required: false
|
|
@@ -615,10 +620,10 @@ events:
|
|
|
615
620
|
fires an event that represents when a user closed the authentication window without
|
|
616
621
|
authenticating after opening it.
|
|
617
622
|
attributes:
|
|
618
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
623
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
619
624
|
display:
|
|
620
625
|
required: true
|
|
621
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
|
|
626
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
622
627
|
description: Whether the card was an Inline, Block, Embed or Flexible UI.
|
|
623
628
|
definitionId:
|
|
624
629
|
required: false
|
|
@@ -630,34 +635,88 @@ events:
|
|
|
630
635
|
fires an event that signifies that a "Learn More" link was clicked on an unauthenticated
|
|
631
636
|
card
|
|
632
637
|
attributes:
|
|
633
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
638
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
634
639
|
- button clicked (smartLinkStatusLozenge):
|
|
635
640
|
type: ui
|
|
636
641
|
description: fires an event that represent a click was performed on a Status Lozenge
|
|
637
642
|
attributes:
|
|
638
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
643
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
639
644
|
- button clicked (smartLinkStatusListItem):
|
|
640
645
|
type: ui
|
|
641
646
|
description:
|
|
642
647
|
fires an event that represent a click was performed on a Status Lozenge's dropdown item
|
|
643
648
|
attributes:
|
|
644
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
649
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
645
650
|
- button clicked (smartLinkStatusOpenPreview):
|
|
646
651
|
type: ui
|
|
647
652
|
description:
|
|
648
653
|
fires an event that represent a click was performed on a Status Lozenge open preview button
|
|
649
654
|
attributes:
|
|
650
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
655
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
651
656
|
- button clicked (smartLinkFollowButton):
|
|
652
657
|
type: ui
|
|
653
658
|
description: fires an event that represents a click was performed on the follow button.
|
|
654
659
|
attributes:
|
|
655
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
660
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
656
661
|
- button clicked (StatusUpdateAction):
|
|
657
662
|
type: ui
|
|
658
663
|
attributes:
|
|
659
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
664
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
660
665
|
- button clicked (GetStatusTransitionsAction):
|
|
661
666
|
type: ui
|
|
662
667
|
attributes:
|
|
663
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
668
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
669
|
+
- button clicked (embedPreviewResize):
|
|
670
|
+
type: ui
|
|
671
|
+
description:
|
|
672
|
+
fires an event that represents a user clicking on the resize button in the embed preview
|
|
673
|
+
attributes:
|
|
674
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
675
|
+
newSize:
|
|
676
|
+
required: true
|
|
677
|
+
type: [ 'large', 'small' ]
|
|
678
|
+
description: The new size of the embed preview
|
|
679
|
+
origin:
|
|
680
|
+
required: false
|
|
681
|
+
type: [ 'smartLinkCard', 'smartLinkEmbed', 'smartLinkInline', 'smartLinkPreviewHoverCard' ]
|
|
682
|
+
description: The origin of the resize event
|
|
683
|
+
previousSize:
|
|
684
|
+
required: true
|
|
685
|
+
type: [ 'large', 'small' ]
|
|
686
|
+
description: The previous size of the embed preview
|
|
687
|
+
- smartLink renderSuccess:
|
|
688
|
+
type: ui
|
|
689
|
+
description:
|
|
690
|
+
fires an event that represents when a Smart Link was rendered successfully (even if the
|
|
691
|
+
Smart Link errors out)
|
|
692
|
+
attributes:
|
|
693
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
694
|
+
display:
|
|
695
|
+
required: true
|
|
696
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
697
|
+
description: Whether the card was an Inline, Block, Embed or Flexible UI
|
|
698
|
+
definitionId:
|
|
699
|
+
required: false
|
|
700
|
+
type: string
|
|
701
|
+
description: The definitionId of the Smart Link resolver invoked.
|
|
702
|
+
- smartLink renderFailed:
|
|
703
|
+
type: ui
|
|
704
|
+
description: fires an event that represents when a Smart Link renders unsuccessfully.
|
|
705
|
+
attributes:
|
|
706
|
+
<<: [ *PackageMetaDataContext, *CommonContext ]
|
|
707
|
+
display:
|
|
708
|
+
required: true
|
|
709
|
+
type: [ 'inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview' ]
|
|
710
|
+
description: Whether the card was an Inline, Block, Embed or Flexible UI
|
|
711
|
+
error:
|
|
712
|
+
required: true
|
|
713
|
+
description: An error object representing why the Smart Link render failed.
|
|
714
|
+
type: object
|
|
715
|
+
errorInfo:
|
|
716
|
+
required: true
|
|
717
|
+
description: Additional details about the error including the stack trace.
|
|
718
|
+
type: object
|
|
719
|
+
id:
|
|
720
|
+
required: false
|
|
721
|
+
type: string
|
|
722
|
+
description: The unique ID for this Smart Link
|
|
@@ -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.7.
|
|
20
|
+
packageVersion: "32.7.3"
|
|
21
21
|
};
|
|
22
22
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
23
23
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,6 +12,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
12
12
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
13
13
|
var _constants = require("../../constants");
|
|
14
14
|
var _state = require("../../state");
|
|
15
|
+
var _analytics = require("../../state/analytics");
|
|
15
16
|
var _helpers = require("../../state/helpers");
|
|
16
17
|
var _modal = require("../../state/modal");
|
|
17
18
|
var _utils = require("../../utils");
|
|
@@ -166,16 +167,32 @@ function Component(_ref) {
|
|
|
166
167
|
// - the unresolved states: viz. forbidden, not_found, unauthorized, errored.
|
|
167
168
|
(0, _react.useEffect)(function () {
|
|
168
169
|
if ((0, _helpers.isFinalState)(state.status)) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
if ((0, _platformFeatureFlags.fg)('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
171
|
+
(0, _analytics.succeedUfoExperience)('smart-link-rendered', id || 'NULL', {
|
|
172
|
+
extensionKey: extensionKey,
|
|
173
|
+
display: isFlexibleUi ? 'flexible' : appearance
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// UFO will disregard this if authentication experience has not yet been started
|
|
177
|
+
(0, _analytics.succeedUfoExperience)('smart-link-authenticated', id || 'NULL', {
|
|
178
|
+
display: isFlexibleUi ? 'flexible' : appearance
|
|
179
|
+
});
|
|
180
|
+
fireEvent('ui.smartLink.renderSuccess', {
|
|
181
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
182
|
+
display: isFlexibleUi ? 'flexible' : appearance
|
|
183
|
+
});
|
|
184
|
+
} else {
|
|
185
|
+
analytics.ui.renderSuccessEvent({
|
|
186
|
+
display: isFlexibleUi ? 'flexible' : appearance,
|
|
187
|
+
status: state.status,
|
|
188
|
+
id: id,
|
|
189
|
+
definitionId: definitionId,
|
|
190
|
+
extensionKey: extensionKey,
|
|
191
|
+
canBeDatasource: canBeDatasource
|
|
192
|
+
});
|
|
193
|
+
}
|
|
177
194
|
}
|
|
178
|
-
}, [isFlexibleUi, appearance, state.status, url, definitionId, extensionKey, analytics.ui, id, canBeDatasource]);
|
|
195
|
+
}, [isFlexibleUi, appearance, state.status, url, definitionId, extensionKey, analytics.ui, id, canBeDatasource, fireEvent]);
|
|
179
196
|
var onIframeDwell = (0, _react.useCallback)(function (dwellTime, dwellPercentVisible) {
|
|
180
197
|
fireEvent('ui.smartLinkIframe.dwelled', {
|
|
181
198
|
id: id,
|
|
@@ -12,7 +12,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _reactErrorBoundary = require("react-error-boundary");
|
|
13
13
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
14
14
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
17
|
+
var _state = require("../../state");
|
|
16
18
|
var _analytics = require("../../state/analytics");
|
|
17
19
|
var _utils = require("../../utils");
|
|
18
20
|
var _flexible = require("../../utils/flexible");
|
|
@@ -68,7 +70,7 @@ function CardWithURLRenderer(props) {
|
|
|
68
70
|
removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
|
|
69
71
|
resolvingPlaceholder = props.resolvingPlaceholder,
|
|
70
72
|
truncateInline = props.truncateInline;
|
|
71
|
-
var analytics = (0,
|
|
73
|
+
var analytics = (0, _state.useSmartLinkAnalytics)(url !== null && url !== void 0 ? url : '', id);
|
|
72
74
|
var isFlexibleUi = (0, _flexible.isFlexibleUiCard)(children);
|
|
73
75
|
var errorHandler = (0, _react.useCallback)(function (error, info) {
|
|
74
76
|
var componentStack = info.componentStack;
|
|
@@ -88,12 +90,24 @@ function CardWithURLRenderer(props) {
|
|
|
88
90
|
definitionId: null
|
|
89
91
|
});
|
|
90
92
|
} else if (error.name !== 'APIError') {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
id
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
if ((0, _platformFeatureFlags.fg)('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
94
|
+
(0, _analytics.startUfoExperience)('smart-link-rendered', id || 'NULL');
|
|
95
|
+
(0, _analytics.failUfoExperience)('smart-link-rendered', id || 'NULL');
|
|
96
|
+
(0, _analytics.failUfoExperience)('smart-link-authenticated', id || 'NULL');
|
|
97
|
+
fireEvent('ui.smartLink.renderFailed', {
|
|
98
|
+
display: isFlexibleUi ? 'flexible' : appearance,
|
|
99
|
+
id: id !== null && id !== void 0 ? id : null,
|
|
100
|
+
error: error,
|
|
101
|
+
errorInfo: errorInfo
|
|
102
|
+
});
|
|
103
|
+
} else {
|
|
104
|
+
analytics.ui.renderFailedEvent({
|
|
105
|
+
display: isFlexibleUi ? 'flexible' : appearance,
|
|
106
|
+
id: id,
|
|
107
|
+
error: error,
|
|
108
|
+
errorInfo: errorInfo
|
|
109
|
+
});
|
|
110
|
+
}
|
|
97
111
|
}
|
|
98
112
|
onError && onError({
|
|
99
113
|
status: 'errored',
|
|
@@ -8,7 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
+
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
11
13
|
var _constants = require("../../../../../constants");
|
|
14
|
+
var _analytics = require("../../../../../state/analytics");
|
|
12
15
|
var _helpers = require("../../../../../state/helpers");
|
|
13
16
|
var _FlexibleCard = _interopRequireDefault(require("../../../../FlexibleCard"));
|
|
14
17
|
var _blocks = require("../../../../FlexibleCard/components/blocks");
|
|
@@ -25,17 +28,41 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
25
28
|
flexibleCardProps = _ref.flexibleCardProps,
|
|
26
29
|
isAISummaryEnabled = _ref.isAISummaryEnabled,
|
|
27
30
|
onActionClick = _ref.onActionClick,
|
|
28
|
-
titleBlockProps = _ref.titleBlockProps
|
|
29
|
-
|
|
31
|
+
titleBlockProps = _ref.titleBlockProps,
|
|
32
|
+
id = _ref.id;
|
|
33
|
+
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
34
|
+
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
35
|
+
var definitionId = _react.default.useMemo(function () {
|
|
36
|
+
return (0, _helpers.getDefinitionId)(cardState.details);
|
|
37
|
+
}, [cardState.details]);
|
|
38
|
+
var canBeDatasource = _react.default.useMemo(function () {
|
|
39
|
+
return (0, _helpers.getCanBeDatasource)(cardState.details);
|
|
40
|
+
}, [cardState.details]);
|
|
30
41
|
(0, _react.useEffect)(function () {
|
|
31
42
|
// Since this hover view is only rendered on resolved status,
|
|
32
43
|
// there is no need to check for statuses.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
if ((0, _platformFeatureFlags.fg)('platform-smart-card-migrate-embed-modal-analytics')) {
|
|
45
|
+
(0, _analytics.succeedUfoExperience)('smart-link-rendered', id || 'NULL', {
|
|
46
|
+
extensionKey: extensionKey,
|
|
47
|
+
display: _constants.CardDisplay.HoverCardPreview
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// UFO will disregard this if authentication experience has not yet been started
|
|
51
|
+
(0, _analytics.succeedUfoExperience)('smart-link-authenticated', id || 'NULL', {
|
|
52
|
+
display: _constants.CardDisplay.HoverCardPreview
|
|
53
|
+
});
|
|
54
|
+
fireEvent('ui.smartLink.renderSuccess', {
|
|
55
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
|
|
56
|
+
display: _constants.CardDisplay.HoverCardPreview
|
|
57
|
+
});
|
|
58
|
+
} else {
|
|
59
|
+
analytics.ui.renderSuccessEvent({
|
|
60
|
+
display: _constants.CardDisplay.HoverCardPreview,
|
|
61
|
+
status: cardState.status,
|
|
62
|
+
canBeDatasource: canBeDatasource
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}, [analytics.ui, cardState.status, canBeDatasource, fireEvent, definitionId, extensionKey, id]);
|
|
39
66
|
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
40
67
|
var _useMemo = (0, _react.useMemo)(function () {
|
|
41
68
|
return (0, _utils.getMetadata)(extensionKey, data);
|